This repository has been archived by the owner on Nov 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathinvite.proto
97 lines (78 loc) · 2.08 KB
/
invite.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
syntax = "proto3";
package invite;
import "google/api/annotations.proto";
option csharp_namespace = "Improbable.OnlineServices.Proto.Invite";
message Invite {
enum Status {
UNKNOWN = 0;
PENDING = 1;
ACCEPTED = 2;
DECLINED = 3;
}
string id = 1;
string sender_player_id = 2;
string receiver_player_id = 3;
string party_id = 4;
map<string, string> metadata = 5;
Status current_status = 6;
}
message CreateInviteRequest {
string receiver_player_id = 1;
map<string, string> metadata = 2;
}
message CreateInviteResponse {
string invite_id = 1;
}
message DeleteInviteRequest {
string invite_id = 1;
}
message DeleteInviteResponse {
}
message UpdateInviteRequest {
Invite updated_invite = 1;
}
message UpdateInviteResponse {
Invite invite = 1;
}
message GetInviteRequest {
string invite_id = 1;
}
message GetInviteResponse {
Invite invite = 1;
}
message ListAllInvitesRequest {
}
message ListAllInvitesResponse {
repeated Invite outbound_invites = 1;
repeated Invite inbound_invites = 2;
}
service InviteService {
rpc CreateInvite (CreateInviteRequest) returns (CreateInviteResponse) {
option (google.api.http) = {
post: "/v1/create_invite"
body: "*"
};
}
rpc DeleteInvite (DeleteInviteRequest) returns (DeleteInviteResponse) {
option (google.api.http) = {
post: "/v1/delete_invite/{invite_id}"
};
}
// Updates the metadata and current status. Sender, receiver and party id are ignored.
rpc UpdateInvite (UpdateInviteRequest) returns (UpdateInviteResponse) {
option (google.api.http) = {
post: "/v1/update_invite"
body: "*"
};
}
rpc GetInvite (GetInviteRequest) returns (GetInviteResponse) {
option (google.api.http) = {
post: "/v1/get_invite/{invite_id}"
};
}
rpc ListAllInvites (ListAllInvitesRequest) returns (ListAllInvitesResponse) {
option (google.api.http) = {
post: "/v1/list_all_invites"
};
}
}