Skip to content

Commit

Permalink
Add FindAcceptedUsers to OCM Invite API (cs3org#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
ishank011 authored Mar 10, 2021
1 parent 1e7d068 commit 414d8eb
Show file tree
Hide file tree
Showing 5 changed files with 487 additions and 83 deletions.
4 changes: 3 additions & 1 deletion cs3/gateway/v1beta1/gateway_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,9 @@ service GatewayAPI {
// Completes an invitation acceptance.
rpc AcceptInvite(cs3.ocm.invite.v1beta1.AcceptInviteRequest) returns (cs3.ocm.invite.v1beta1.AcceptInviteResponse);
// Retrieves details about a remote user who has accepted an invite to share.
rpc GetRemoteUser(cs3.ocm.invite.v1beta1.GetRemoteUserRequest) returns (cs3.ocm.invite.v1beta1.GetRemoteUserResponse);
rpc GetAcceptedUser(cs3.ocm.invite.v1beta1.GetAcceptedUserRequest) returns (cs3.ocm.invite.v1beta1.GetAcceptedUserResponse);
// Finds users who accepted invite tokens by their attributes.
rpc FindAcceptedUsers(cs3.ocm.invite.v1beta1.FindAcceptedUsersRequest) returns (cs3.ocm.invite.v1beta1.FindAcceptedUsersResponse);
// *****************************************************************/
// ******************** OCM PROVIDER AUTHORIZER ********************/
// *****************************************************************/
Expand Down
20 changes: 10 additions & 10 deletions cs3/ocm/invite/v1beta1/invite_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ service InviteAPI {
// Completes an invitation acceptance.
rpc AcceptInvite(AcceptInviteRequest) returns (AcceptInviteResponse);
// Retrieves details about a remote user who has accepted an invite to share.
rpc GetRemoteUser(GetRemoteUserRequest) returns (GetRemoteUserResponse);
// Retrieves a list of users that accepted a certain invite token.
rpc GetAcceptedUsers(GetAcceptedUsersRequest) returns (GetAcceptedUsersResponse);
rpc GetAcceptedUser(GetAcceptedUserRequest) returns (GetAcceptedUserResponse);
// Finds users who accepted invite tokens by their attributes.
rpc FindAcceptedUsers(FindAcceptedUsersRequest) returns (FindAcceptedUsersResponse);
}

message GenerateInviteTokenRequest {
Expand Down Expand Up @@ -123,7 +123,7 @@ message AcceptInviteResponse {
cs3.types.v1beta1.Opaque opaque = 2;
}

message GetRemoteUserRequest {
message GetAcceptedUserRequest {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
Expand All @@ -132,7 +132,7 @@ message GetRemoteUserRequest {
cs3.identity.user.v1beta1.UserId remote_user_id = 2;
}

message GetRemoteUserResponse {
message GetAcceptedUserResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
Expand All @@ -144,23 +144,23 @@ message GetRemoteUserResponse {
cs3.identity.user.v1beta1.User remote_user = 3;
}

message GetAcceptedUsersRequest {
message FindAcceptedUsersRequest {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 1;
// REQUIRED.
// The token name to search accepted users for.
string token_name = 2;
// The filter to apply.
string filter = 2;
}

message GetAcceptedUsersResponse {
message FindAcceptedUsersResponse {
// REQUIRED.
// The response status.
cs3.rpc.v1beta1.Status status = 1;
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 2;
// REQUIRED.
// The users that accepted the token with the given name.
// The accepted users matching the specified filter.
repeated cs3.identity.user.v1beta1.User accepted_users = 3;
}
6 changes: 3 additions & 3 deletions cs3/ocm/invite/v1beta1/resources.proto
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ message InviteToken {
// OPTIONAL.
// The time when the token will expire.
cs3.types.v1beta1.Timestamp expiration = 3;
// REQUIRED.
// User-defined token name for token identification.
string name = 4;
// OPTIONAL.
// User-defined description to be forwarded to the invitees.
string description = 4;
}
129 changes: 68 additions & 61 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -743,35 +743,35 @@ <h2>Table of Contents</h2>
</li>

<li>
<a href="#cs3.ocm.invite.v1beta1.ForwardInviteRequest"><span class="badge">M</span>ForwardInviteRequest</a>
<a href="#cs3.ocm.invite.v1beta1.FindAcceptedUsersRequest"><span class="badge">M</span>FindAcceptedUsersRequest</a>
</li>

<li>
<a href="#cs3.ocm.invite.v1beta1.ForwardInviteResponse"><span class="badge">M</span>ForwardInviteResponse</a>
<a href="#cs3.ocm.invite.v1beta1.FindAcceptedUsersResponse"><span class="badge">M</span>FindAcceptedUsersResponse</a>
</li>

<li>
<a href="#cs3.ocm.invite.v1beta1.GenerateInviteTokenRequest"><span class="badge">M</span>GenerateInviteTokenRequest</a>
<a href="#cs3.ocm.invite.v1beta1.ForwardInviteRequest"><span class="badge">M</span>ForwardInviteRequest</a>
</li>

<li>
<a href="#cs3.ocm.invite.v1beta1.GenerateInviteTokenResponse"><span class="badge">M</span>GenerateInviteTokenResponse</a>
<a href="#cs3.ocm.invite.v1beta1.ForwardInviteResponse"><span class="badge">M</span>ForwardInviteResponse</a>
</li>

<li>
<a href="#cs3.ocm.invite.v1beta1.GetAcceptedUsersRequest"><span class="badge">M</span>GetAcceptedUsersRequest</a>
<a href="#cs3.ocm.invite.v1beta1.GenerateInviteTokenRequest"><span class="badge">M</span>GenerateInviteTokenRequest</a>
</li>

<li>
<a href="#cs3.ocm.invite.v1beta1.GetAcceptedUsersResponse"><span class="badge">M</span>GetAcceptedUsersResponse</a>
<a href="#cs3.ocm.invite.v1beta1.GenerateInviteTokenResponse"><span class="badge">M</span>GenerateInviteTokenResponse</a>
</li>

<li>
<a href="#cs3.ocm.invite.v1beta1.GetRemoteUserRequest"><span class="badge">M</span>GetRemoteUserRequest</a>
<a href="#cs3.ocm.invite.v1beta1.GetAcceptedUserRequest"><span class="badge">M</span>GetAcceptedUserRequest</a>
</li>

<li>
<a href="#cs3.ocm.invite.v1beta1.GetRemoteUserResponse"><span class="badge">M</span>GetRemoteUserResponse</a>
<a href="#cs3.ocm.invite.v1beta1.GetAcceptedUserResponse"><span class="badge">M</span>GetAcceptedUserResponse</a>
</li>


Expand Down Expand Up @@ -2841,10 +2841,17 @@ <h3 id="cs3.gateway.v1beta1.GatewayAPI">GatewayAPI</h3>
</tr>

<tr>
<td>GetRemoteUser</td>
<td><a href="#cs3.ocm.invite.v1beta1.GetRemoteUserRequest">.cs3.ocm.invite.v1beta1.GetRemoteUserRequest</a></td>
<td><a href="#cs3.ocm.invite.v1beta1.GetRemoteUserResponse">.cs3.ocm.invite.v1beta1.GetRemoteUserResponse</a></td>
<td><p>Retrieves details about a remote user who has accepted an invite to share.
<td>GetAcceptedUser</td>
<td><a href="#cs3.ocm.invite.v1beta1.GetAcceptedUserRequest">.cs3.ocm.invite.v1beta1.GetAcceptedUserRequest</a></td>
<td><a href="#cs3.ocm.invite.v1beta1.GetAcceptedUserResponse">.cs3.ocm.invite.v1beta1.GetAcceptedUserResponse</a></td>
<td><p>Retrieves details about a remote user who has accepted an invite to share.</p></td>
</tr>

<tr>
<td>FindAcceptedUsers</td>
<td><a href="#cs3.ocm.invite.v1beta1.FindAcceptedUsersRequest">.cs3.ocm.invite.v1beta1.FindAcceptedUsersRequest</a></td>
<td><a href="#cs3.ocm.invite.v1beta1.FindAcceptedUsersResponse">.cs3.ocm.invite.v1beta1.FindAcceptedUsersResponse</a></td>
<td><p>Finds users who accepted invite tokens by their attributes.

*****************************************************************/
******************** OCM PROVIDER AUTHORIZER ********************/
Expand Down Expand Up @@ -6234,7 +6241,7 @@ <h3 id="cs3.ocm.invite.v1beta1.AcceptInviteResponse">AcceptInviteResponse</h3>



<h3 id="cs3.ocm.invite.v1beta1.ForwardInviteRequest">ForwardInviteRequest</h3>
<h3 id="cs3.ocm.invite.v1beta1.FindAcceptedUsersRequest">FindAcceptedUsersRequest</h3>
<p></p>


Expand All @@ -6253,19 +6260,11 @@ <h3 id="cs3.ocm.invite.v1beta1.ForwardInviteRequest">ForwardInviteRequest</h3>
</tr>

<tr>
<td>invite_token</td>
<td><a href="#cs3.ocm.invite.v1beta1.InviteToken">InviteToken</a></td>
<td></td>
<td><p>REQUIRED.
The token to authenticate with. </p></td>
</tr>

<tr>
<td>origin_system_provider</td>
<td><a href="#cs3.ocm.provider.v1beta1.ProviderInfo">cs3.ocm.provider.v1beta1.ProviderInfo</a></td>
<td>filter</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>REQUIRED.
The details of the sync&#39;n&#39;share system provider of the user who sent the invite. </p></td>
The filter to apply. </p></td>
</tr>

</tbody>
Expand All @@ -6275,7 +6274,7 @@ <h3 id="cs3.ocm.invite.v1beta1.ForwardInviteRequest">ForwardInviteRequest</h3>



<h3 id="cs3.ocm.invite.v1beta1.ForwardInviteResponse">ForwardInviteResponse</h3>
<h3 id="cs3.ocm.invite.v1beta1.FindAcceptedUsersResponse">FindAcceptedUsersResponse</h3>
<p></p>


Expand All @@ -6301,14 +6300,22 @@ <h3 id="cs3.ocm.invite.v1beta1.ForwardInviteResponse">ForwardInviteResponse</h3>
Opaque information. </p></td>
</tr>

<tr>
<td>accepted_users</td>
<td><a href="#cs3.identity.user.v1beta1.User">cs3.identity.user.v1beta1.User</a></td>
<td>repeated</td>
<td><p>REQUIRED.
The accepted users matching the specified filter. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.ocm.invite.v1beta1.GenerateInviteTokenRequest">GenerateInviteTokenRequest</h3>
<h3 id="cs3.ocm.invite.v1beta1.ForwardInviteRequest">ForwardInviteRequest</h3>
<p></p>


Expand All @@ -6326,14 +6333,30 @@ <h3 id="cs3.ocm.invite.v1beta1.GenerateInviteTokenRequest">GenerateInviteTokenRe
Opaque information. </p></td>
</tr>

<tr>
<td>invite_token</td>
<td><a href="#cs3.ocm.invite.v1beta1.InviteToken">InviteToken</a></td>
<td></td>
<td><p>REQUIRED.
The token to authenticate with. </p></td>
</tr>

<tr>
<td>origin_system_provider</td>
<td><a href="#cs3.ocm.provider.v1beta1.ProviderInfo">cs3.ocm.provider.v1beta1.ProviderInfo</a></td>
<td></td>
<td><p>REQUIRED.
The details of the sync&#39;n&#39;share system provider of the user who sent the invite. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.ocm.invite.v1beta1.GenerateInviteTokenResponse">GenerateInviteTokenResponse</h3>
<h3 id="cs3.ocm.invite.v1beta1.ForwardInviteResponse">ForwardInviteResponse</h3>
<p></p>


Expand All @@ -6359,22 +6382,14 @@ <h3 id="cs3.ocm.invite.v1beta1.GenerateInviteTokenResponse">GenerateInviteTokenR
Opaque information. </p></td>
</tr>

<tr>
<td>invite_token</td>
<td><a href="#cs3.ocm.invite.v1beta1.InviteToken">InviteToken</a></td>
<td></td>
<td><p>REQUIRED.
The generated token. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.ocm.invite.v1beta1.GetAcceptedUsersRequest">GetAcceptedUsersRequest</h3>
<h3 id="cs3.ocm.invite.v1beta1.GenerateInviteTokenRequest">GenerateInviteTokenRequest</h3>
<p></p>


Expand All @@ -6392,22 +6407,14 @@ <h3 id="cs3.ocm.invite.v1beta1.GetAcceptedUsersRequest">GetAcceptedUsersRequest<
Opaque information. </p></td>
</tr>

<tr>
<td>token_name</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>REQUIRED.
The token name to search accepted users for. </p></td>
</tr>

</tbody>
</table>





<h3 id="cs3.ocm.invite.v1beta1.GetAcceptedUsersResponse">GetAcceptedUsersResponse</h3>
<h3 id="cs3.ocm.invite.v1beta1.GenerateInviteTokenResponse">GenerateInviteTokenResponse</h3>
<p></p>


Expand All @@ -6434,11 +6441,11 @@ <h3 id="cs3.ocm.invite.v1beta1.GetAcceptedUsersResponse">GetAcceptedUsersRespons
</tr>

<tr>
<td>accepted_users</td>
<td><a href="#cs3.identity.user.v1beta1.User">cs3.identity.user.v1beta1.User</a></td>
<td>repeated</td>
<td>invite_token</td>
<td><a href="#cs3.ocm.invite.v1beta1.InviteToken">InviteToken</a></td>
<td></td>
<td><p>REQUIRED.
The users that accepted the token with the given name. </p></td>
The generated token. </p></td>
</tr>

</tbody>
Expand All @@ -6448,7 +6455,7 @@ <h3 id="cs3.ocm.invite.v1beta1.GetAcceptedUsersResponse">GetAcceptedUsersRespons



<h3 id="cs3.ocm.invite.v1beta1.GetRemoteUserRequest">GetRemoteUserRequest</h3>
<h3 id="cs3.ocm.invite.v1beta1.GetAcceptedUserRequest">GetAcceptedUserRequest</h3>
<p></p>


Expand Down Expand Up @@ -6481,7 +6488,7 @@ <h3 id="cs3.ocm.invite.v1beta1.GetRemoteUserRequest">GetRemoteUserRequest</h3>



<h3 id="cs3.ocm.invite.v1beta1.GetRemoteUserResponse">GetRemoteUserResponse</h3>
<h3 id="cs3.ocm.invite.v1beta1.GetAcceptedUserResponse">GetAcceptedUserResponse</h3>
<p></p>


Expand Down Expand Up @@ -6558,17 +6565,17 @@ <h3 id="cs3.ocm.invite.v1beta1.InviteAPI">InviteAPI</h3>
</tr>

<tr>
<td>GetRemoteUser</td>
<td><a href="#cs3.ocm.invite.v1beta1.GetRemoteUserRequest">GetRemoteUserRequest</a></td>
<td><a href="#cs3.ocm.invite.v1beta1.GetRemoteUserResponse">GetRemoteUserResponse</a></td>
<td>GetAcceptedUser</td>
<td><a href="#cs3.ocm.invite.v1beta1.GetAcceptedUserRequest">GetAcceptedUserRequest</a></td>
<td><a href="#cs3.ocm.invite.v1beta1.GetAcceptedUserResponse">GetAcceptedUserResponse</a></td>
<td><p>Retrieves details about a remote user who has accepted an invite to share.</p></td>
</tr>

<tr>
<td>GetAcceptedUsers</td>
<td><a href="#cs3.ocm.invite.v1beta1.GetAcceptedUsersRequest">GetAcceptedUsersRequest</a></td>
<td><a href="#cs3.ocm.invite.v1beta1.GetAcceptedUsersResponse">GetAcceptedUsersResponse</a></td>
<td><p>Retrieves a list of users that accepted a certain invite token.</p></td>
<td>FindAcceptedUsers</td>
<td><a href="#cs3.ocm.invite.v1beta1.FindAcceptedUsersRequest">FindAcceptedUsersRequest</a></td>
<td><a href="#cs3.ocm.invite.v1beta1.FindAcceptedUsersResponse">FindAcceptedUsersResponse</a></td>
<td><p>Finds users who accepted invite tokens by their attributes.</p></td>
</tr>

</tbody>
Expand Down Expand Up @@ -6618,11 +6625,11 @@ <h3 id="cs3.ocm.invite.v1beta1.InviteToken">InviteToken</h3>
</tr>

<tr>
<td>name</td>
<td>description</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>REQUIRED.
User-defined token name for token identification. </p></td>
<td><p>OPTIONAL.
User-defined description to be forwarded to the invitees. </p></td>
</tr>

</tbody>
Expand Down
Loading

0 comments on commit 414d8eb

Please sign in to comment.