Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add error codes to InviteAPIs #198

Merged
merged 3 commits into from
Jan 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion cs3/ocm/invite/v1beta1/invite_api.proto
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,18 @@ service InviteAPI {
// Generates a new token for the user with a validity of 24 hours.
rpc GenerateInviteToken(GenerateInviteTokenRequest) returns (GenerateInviteTokenResponse);
// Forwards a received invite to the sync'n'share system provider.
// MUST return CODE_NOT_FOUND if the token does not exist.
// MUST return CODE_INVALID_ARGUMENT if the token expired.
// MUST return CODE_ALREADY_EXISTS if the user already accepted an invite.
// MUST return CODE_PERMISSION_DENIED if the remote service is not trusted to accept invitations.
rpc ForwardInvite(ForwardInviteRequest) returns (ForwardInviteResponse);
// Completes an invitation acceptance.
// MUST return CODE_NOT_FOUND if the token does not exist.
// MUST return CODE_INVALID_ARGUMENT if the token expired.
// MUST return CODE_ALREADY_EXISTS if the user already accepted an invite.
rpc AcceptInvite(AcceptInviteRequest) returns (AcceptInviteResponse);
// Retrieves details about a remote user who has accepted an invite to share.
// MUST return CODE_NOT_FOUND if the user does not exist.
rpc GetAcceptedUser(GetAcceptedUserRequest) returns (GetAcceptedUserResponse);
// Finds users who accepted invite tokens by their attributes.
rpc FindAcceptedUsers(FindAcceptedUsersRequest) returns (FindAcceptedUsersResponse);
Expand Down Expand Up @@ -103,7 +111,7 @@ message ForwardInviteResponse {
// OPTIONAL.
// Opaque information.
cs3.types.v1beta1.Opaque opaque = 2;
// REQUIRED.
// REQUIRED.
// The initiator's user id of the workflow.
cs3.identity.user.v1beta1.UserId user_id = 3;
// REQUIRED.
Expand Down
38 changes: 35 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9143,6 +9143,30 @@ <h3 id="cs3.ocm.invite.v1beta1.ForwardInviteResponse">ForwardInviteResponse</h3>
Opaque information. </p></td>
</tr>

<tr>
<td>user_id</td>
<td><a href="#cs3.identity.user.v1beta1.UserId">cs3.identity.user.v1beta1.UserId</a></td>
<td></td>
<td><p>REQUIRED.
The initiator&#39;s user id of the workflow. </p></td>
</tr>

<tr>
<td>email</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>REQUIRED.
The initiator&#39;s email of the workflow. </p></td>
</tr>

<tr>
<td>display_name</td>
<td><a href="#string">string</a></td>
<td></td>
<td><p>REQUIRED.
The initiator&#39;s display name of the workflow. </p></td>
</tr>

</tbody>
</table>

Expand Down Expand Up @@ -9315,21 +9339,29 @@ <h3 id="cs3.ocm.invite.v1beta1.InviteAPI">InviteAPI</h3>
<td>ForwardInvite</td>
<td><a href="#cs3.ocm.invite.v1beta1.ForwardInviteRequest">ForwardInviteRequest</a></td>
<td><a href="#cs3.ocm.invite.v1beta1.ForwardInviteResponse">ForwardInviteResponse</a></td>
<td><p>Forwards a received invite to the sync&#39;n&#39;share system provider.</p></td>
<td><p>Forwards a received invite to the sync&#39;n&#39;share system provider.
MUST return CODE_NOT_FOUND if the token does not exist.
MUST return CODE_INVALID_ARGUMENT if the token expired.
MUST return CODE_ALREADY_EXISTS if the user already accepted an invite.
MUST return CODE_PERMISSION_DENIED if the remote service is not trusted to accept invitations.</p></td>
</tr>

<tr>
<td>AcceptInvite</td>
<td><a href="#cs3.ocm.invite.v1beta1.AcceptInviteRequest">AcceptInviteRequest</a></td>
<td><a href="#cs3.ocm.invite.v1beta1.AcceptInviteResponse">AcceptInviteResponse</a></td>
<td><p>Completes an invitation acceptance.</p></td>
<td><p>Completes an invitation acceptance.
MUST return CODE_NOT_FOUND if the token does not exist.
MUST return CODE_INVALID_ARGUMENT if the token expired.
MUST return CODE_ALREADY_EXISTS if the user already accepted an invite.</p></td>
</tr>

<tr>
<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>
<td><p>Retrieves details about a remote user who has accepted an invite to share.
MUST return CODE_NOT_FOUND if the user does not exist.</p></td>
</tr>

<tr>
Expand Down