-
Notifications
You must be signed in to change notification settings - Fork 1
/
invites.proto
68 lines (57 loc) · 1.6 KB
/
invites.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
syntax = "proto3";
import "google/protobuf/struct.proto";
import "google/protobuf/timestamp.proto";
package invites;
option go_package = "github.com/overmindtech/sdp-go;sdp";
// _
// |E]
// .-|=====-.
// | | MAIL |
// |________|___
// ||
// ||
// || www %%%
// vwv || )_(,;;;, ,;,\_/ www
// )_( || \|/ \_/ )_(\| (_)
// \| \ || /\\|/ |/ \| \|// |
// ___\|//jgs||//_\V/_\|//_______\\|//V/\\|/__
//
// Credit: https://www.asciiart.eu/
// provides all operations for inviting people to an organization
service InviteService {
rpc CreateInvite(CreateInviteRequest) returns (CreateInviteResponse);
rpc ListInvites(ListInvitesRequest) returns (ListInvitesResponse);
rpc RevokeInvite(RevokeInviteRequest) returns (RevokeInviteResponse);
rpc ResendInvite(ResendInviteRequest) returns (ResendInviteResponse);
}
message CreateInviteRequest {
repeated string emails = 1;
}
message CreateInviteResponse {
}
message Invite {
string email = 1;
enum InviteStatus {
INVITE_STATUS_UNSPECIFIED = 0;
// The user has been invited but has not yet accepted
INVITE_STATUS_INVITED = 1;
// The user has accepted the invitation
INVITE_STATUS_ACCEPTED = 2;
}
InviteStatus status = 2;
}
message ListInvitesRequest {
}
message ListInvitesResponse {
repeated Invite invites = 1;
}
message RevokeInviteRequest {
string email = 1;
}
message RevokeInviteResponse {
}
message ResendInviteRequest {
string email = 1;
}
message ResendInviteResponse {
}