@sellout/models 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dist/interfaces/IAddress.d.ts +13 -0
- package/.dist/interfaces/IAddress.js +3 -0
- package/.dist/interfaces/IAddress.js.map +1 -0
- package/.dist/interfaces/IMetrics.d.ts +29 -0
- package/.dist/interfaces/IMetrics.js +3 -0
- package/.dist/interfaces/IMetrics.js.map +1 -0
- package/.dist/interfaces/IPagination.d.ts +4 -0
- package/.dist/interfaces/IPagination.js +3 -0
- package/.dist/interfaces/IPagination.js.map +1 -0
- package/.dist/interfaces/IQuery.d.ts +15 -0
- package/.dist/interfaces/IQuery.js +20 -0
- package/.dist/interfaces/IQuery.js.map +1 -0
- package/.dist/mongo/Address.d.ts +58 -0
- package/.dist/mongo/Address.js +60 -0
- package/.dist/mongo/Address.js.map +1 -0
- package/.dist/mongo/Metrics.d.ts +131 -0
- package/.dist/mongo/Metrics.js +137 -0
- package/.dist/mongo/Metrics.js.map +1 -0
- package/.dist/schemas/Address.d.ts +58 -0
- package/.dist/schemas/Address.js +60 -0
- package/.dist/schemas/Address.js.map +1 -0
- package/.dist/schemas/Metrics.d.ts +131 -0
- package/.dist/schemas/Metrics.js +137 -0
- package/.dist/schemas/Metrics.js.map +1 -0
- package/.dist/sellout-proto.js +92266 -0
- package/.dist/utils/EventUtil.d.ts +38 -0
- package/.dist/utils/EventUtil.js +188 -0
- package/.dist/utils/EventUtil.js.map +1 -0
- package/.dist/utils/FeeUtil.d.ts +7 -0
- package/.dist/utils/FeeUtil.js +37 -0
- package/.dist/utils/FeeUtil.js.map +1 -0
- package/.dist/utils/OrderUtil.d.ts +29 -0
- package/.dist/utils/OrderUtil.js +216 -0
- package/.dist/utils/OrderUtil.js.map +1 -0
- package/.dist/utils/WebFlowUtil.d.ts +7 -0
- package/.dist/utils/WebFlowUtil.js +10 -0
- package/.dist/utils/WebFlowUtil.js.map +1 -0
- package/package.json +29 -0
- package/src/interfaces/IAddress.ts +13 -0
- package/src/interfaces/IArtist.ts +14 -0
- package/src/interfaces/IArtistContact.ts +8 -0
- package/src/interfaces/IArtistPressKit.ts +8 -0
- package/src/interfaces/IEvent.ts +62 -0
- package/src/interfaces/IEventCustomField.ts +16 -0
- package/src/interfaces/IEventPromotion.ts +15 -0
- package/src/interfaces/IEventSchedule.ts +7 -0
- package/src/interfaces/IEventUpgrade.ts +13 -0
- package/src/interfaces/IFee.ts +46 -0
- package/src/interfaces/IFile.ts +7 -0
- package/src/interfaces/IMetrics.ts +33 -0
- package/src/interfaces/IOrder.ts +32 -0
- package/src/interfaces/IOrderCustomField.ts +7 -0
- package/src/interfaces/IOrderState.ts +19 -0
- package/src/interfaces/IOrderSummary.ts +37 -0
- package/src/interfaces/IOrderTicket.ts +15 -0
- package/src/interfaces/IOrderType.ts +5 -0
- package/src/interfaces/IOrderUpgrade.ts +14 -0
- package/src/interfaces/IOrganization.ts +19 -0
- package/src/interfaces/IPagination.ts +4 -0
- package/src/interfaces/IPerformance.ts +18 -0
- package/src/interfaces/IQuery.ts +30 -0
- package/src/interfaces/IRefund.ts +6 -0
- package/src/interfaces/IRole.ts +17 -0
- package/src/interfaces/IScan.ts +5 -0
- package/src/interfaces/ISeating.ts +9 -0
- package/src/interfaces/ISocialAccountLink.ts +14 -0
- package/src/interfaces/ITask.ts +22 -0
- package/src/interfaces/ITicketExchange.ts +11 -0
- package/src/interfaces/ITicketHold.ts +6 -0
- package/src/interfaces/ITicketTier.ts +9 -0
- package/src/interfaces/ITicketType.ts +12 -0
- package/src/interfaces/IUser.ts +26 -0
- package/src/interfaces/IUserProfile.ts +20 -0
- package/src/interfaces/IVenue.ts +17 -0
- package/src/interfaces/IWebFlow.ts +55 -0
- package/src/proto/artist.proto +156 -0
- package/src/proto/broadcast.proto +157 -0
- package/src/proto/common.proto +59 -0
- package/src/proto/email.proto +179 -0
- package/src/proto/error.proto +31 -0
- package/src/proto/event.proto +270 -0
- package/src/proto/fee.proto +196 -0
- package/src/proto/file-upload.proto +27 -0
- package/src/proto/order.proto +272 -0
- package/src/proto/organization.proto +107 -0
- package/src/proto/role.proto +136 -0
- package/src/proto/seating.proto +64 -0
- package/src/proto/stripe.proto +181 -0
- package/src/proto/task.proto +39 -0
- package/src/proto/twilio.proto +43 -0
- package/src/proto/user-profile.proto +124 -0
- package/src/proto/user.proto +284 -0
- package/src/proto/venue.proto +120 -0
- package/src/proto/web-flow.proto +315 -0
- package/src/schemas/Address.ts +57 -0
- package/src/schemas/Artist.ts +104 -0
- package/src/schemas/Event.ts +400 -0
- package/src/schemas/Fee.ts +74 -0
- package/src/schemas/Metrics.ts +134 -0
- package/src/schemas/Order.ts +200 -0
- package/src/schemas/Organization.ts +108 -0
- package/src/schemas/Role.ts +37 -0
- package/src/schemas/Seating.ts +34 -0
- package/src/schemas/User.ts +95 -0
- package/src/schemas/UserProfile.ts +67 -0
- package/src/schemas/Venue.ts +58 -0
- package/src/schemas/WebFlow.ts +132 -0
- package/src/utils/EventUtil.ts +186 -0
- package/src/utils/FeeUtil.ts +34 -0
- package/src/utils/OrderUtil.ts +226 -0
- package/src/utils/WebFlowUtil.ts +8 -0
- package/tsconfig.json +27 -0
- package/tslint.json +21 -0
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "error.proto";
|
|
4
|
+
import "common.proto";
|
|
5
|
+
|
|
6
|
+
/****************************************************************************************
|
|
7
|
+
Order Models
|
|
8
|
+
****************************************************************************************/
|
|
9
|
+
|
|
10
|
+
message Order {
|
|
11
|
+
string _id = 0;
|
|
12
|
+
string orgId = 1;
|
|
13
|
+
string userId = 2;
|
|
14
|
+
string eventId = 3;
|
|
15
|
+
string eventName = 4;
|
|
16
|
+
repeated string venueIds = 5;
|
|
17
|
+
repeated string artistIds = 6;
|
|
18
|
+
repeated string feeIds = 7;
|
|
19
|
+
int32 createdAt = 8;
|
|
20
|
+
string stripeChargeId = 9;
|
|
21
|
+
repeated OrderTicket tickets = 10;
|
|
22
|
+
repeated OrderUpgrade upgrades = 11;
|
|
23
|
+
repeated string recipientEmails = 12;
|
|
24
|
+
string qrCodeUrl = 13;
|
|
25
|
+
string state = 14;
|
|
26
|
+
int32 refundedAmount = 15;
|
|
27
|
+
string type = 16;
|
|
28
|
+
string createdBy = 17;
|
|
29
|
+
string promotionCode = 18;
|
|
30
|
+
string ipAddress = 19;
|
|
31
|
+
Address address = 20;
|
|
32
|
+
repeated OrderCustomField customFields = 21;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message OrderTicket {
|
|
36
|
+
string _id = 0;
|
|
37
|
+
string name = 1;
|
|
38
|
+
string ticketTypeId = 2;
|
|
39
|
+
string ticketTierId = 3;
|
|
40
|
+
int32 price = 4;
|
|
41
|
+
string seat = 7;
|
|
42
|
+
Refund refund = 8;
|
|
43
|
+
Scan scan = 9;
|
|
44
|
+
string state = 10;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message OrderUpgrade {
|
|
48
|
+
string _id = 0;
|
|
49
|
+
string name = 1;
|
|
50
|
+
string upgradeId = 2;
|
|
51
|
+
int32 price = 3;
|
|
52
|
+
Refund refund = 6;
|
|
53
|
+
Scan scan = 7;
|
|
54
|
+
string state = 8;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message Scan {
|
|
58
|
+
bool scanned = 0;
|
|
59
|
+
int32 scannedAt = 1;
|
|
60
|
+
string scannedBy = 2;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
message Refund {
|
|
64
|
+
bool refunded = 0;
|
|
65
|
+
int32 refundedAt = 1;
|
|
66
|
+
string refundedBy = 2;
|
|
67
|
+
int32 refundedAmount = 3;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
message OrderCustomField {
|
|
71
|
+
string _id = 0;
|
|
72
|
+
string label = 1;
|
|
73
|
+
string value = 2;
|
|
74
|
+
string customFieldId = 3;
|
|
75
|
+
string type = 4;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/****************************************************************************************
|
|
79
|
+
Create Order
|
|
80
|
+
****************************************************************************************/
|
|
81
|
+
|
|
82
|
+
message CreateOrderRequest {
|
|
83
|
+
string spanContext = 0;
|
|
84
|
+
string requestorId = 1;
|
|
85
|
+
Order order = 2;
|
|
86
|
+
string stripeToken = 3;
|
|
87
|
+
string holdToken = 4;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
message CreateOrderResponse {
|
|
91
|
+
StatusCode status = 1;
|
|
92
|
+
repeated Error errors = 2;
|
|
93
|
+
Order order = 3;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/****************************************************************************************
|
|
97
|
+
Refund Order
|
|
98
|
+
****************************************************************************************/
|
|
99
|
+
|
|
100
|
+
message RefundOrderRequest {
|
|
101
|
+
string spanContext = 0;
|
|
102
|
+
string orgId = 1;
|
|
103
|
+
string orderId = 2;
|
|
104
|
+
int32 refundAmount = 3;
|
|
105
|
+
repeated string ticketIds = 4;
|
|
106
|
+
repeated string upgradeIds = 5;
|
|
107
|
+
string refundedBy = 6;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
message RefundOrderResponse {
|
|
111
|
+
StatusCode status = 1;
|
|
112
|
+
repeated Error errors = 2;
|
|
113
|
+
Order order = 3;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
message RefundEventOrdersRequest {
|
|
117
|
+
string spanContext = 0;
|
|
118
|
+
string orgId = 1;
|
|
119
|
+
string eventId = 2;
|
|
120
|
+
string refundedBy = 3;
|
|
121
|
+
bool dryRun = 4;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
message RefundEventOrdersResponse {
|
|
125
|
+
StatusCode status = 0;
|
|
126
|
+
repeated Error errors = 1;
|
|
127
|
+
bool allRefunded = 2;
|
|
128
|
+
int32 refundCount = 3;
|
|
129
|
+
int32 refundAmount = 4;
|
|
130
|
+
int32 feeAmount = 5;
|
|
131
|
+
bool dryRun = 6;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/****************************************************************************************
|
|
135
|
+
QR Code
|
|
136
|
+
****************************************************************************************/
|
|
137
|
+
|
|
138
|
+
// TODO add orgId to these requests
|
|
139
|
+
|
|
140
|
+
message SendOrderReceiptEmailRequest {
|
|
141
|
+
string spanContext = 0;
|
|
142
|
+
string orderId = 1;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
message SendOrderReceiptEmailResponse {
|
|
146
|
+
StatusCode status = 0;
|
|
147
|
+
repeated Error errors = 1;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
message SendOrderQRCodeEmailRequest {
|
|
151
|
+
string spanContext = 0;
|
|
152
|
+
string orderId = 1;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
message SendOrderQRCodeEmailResponse {
|
|
156
|
+
StatusCode status = 0;
|
|
157
|
+
repeated Error errors = 1;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
message SendOrderRefundEmailRequest {
|
|
161
|
+
string spanContext = 0;
|
|
162
|
+
string orderId = 1;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
message SendOrderRefundEmailResponse {
|
|
166
|
+
StatusCode status = 0;
|
|
167
|
+
repeated Error errors = 1;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
message ScanOrderRequest {
|
|
171
|
+
string spanContext = 0;
|
|
172
|
+
string orderId = 1;
|
|
173
|
+
repeated string ticketIds = 2;
|
|
174
|
+
repeated string upgradeIds = 3;
|
|
175
|
+
string scannedBy = 4;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
message ScanOrderResponse {
|
|
179
|
+
StatusCode status = 0;
|
|
180
|
+
repeated Error errors = 1;
|
|
181
|
+
Order order = 2;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/****************************************************************************************
|
|
185
|
+
Order Report
|
|
186
|
+
****************************************************************************************/
|
|
187
|
+
|
|
188
|
+
message GenerateOrderReportRequest {
|
|
189
|
+
string spanContext = 0;
|
|
190
|
+
string orgId = 1;
|
|
191
|
+
OrderQuery query = 2;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
message GenerateOrderReportResponse {
|
|
195
|
+
StatusCode status = 0;
|
|
196
|
+
repeated Error errors = 1;
|
|
197
|
+
string url = 2;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/****************************************************************************************
|
|
201
|
+
Find Order
|
|
202
|
+
****************************************************************************************/
|
|
203
|
+
|
|
204
|
+
message OrderQuery {
|
|
205
|
+
repeated string orderIds = 0;
|
|
206
|
+
repeated string eventIds = 1;
|
|
207
|
+
repeated string venueIds = 2;
|
|
208
|
+
repeated string artistIds = 3;
|
|
209
|
+
repeated string userIds = 4;
|
|
210
|
+
repeated string states = 5;
|
|
211
|
+
repeated string types = 6;
|
|
212
|
+
string userQuery = 7;
|
|
213
|
+
int32 startDate = 8;
|
|
214
|
+
int32 endDate = 9;
|
|
215
|
+
bool any = 10;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
message QueryOrdersRequest {
|
|
219
|
+
string spanContext = 0;
|
|
220
|
+
string orgId = 1;
|
|
221
|
+
OrderQuery query = 2;
|
|
222
|
+
Pagination pagination = 3;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
message QueryOrdersResponse {
|
|
226
|
+
StatusCode status = 1;
|
|
227
|
+
repeated Error errors = 2;
|
|
228
|
+
repeated Order orders = 3;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
message FindOrderByIdRequest {
|
|
232
|
+
string spanContext = 0;
|
|
233
|
+
string orderId = 1;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
message FindOrderByIdResponse {
|
|
237
|
+
StatusCode status = 0;
|
|
238
|
+
repeated Error errors = 1;
|
|
239
|
+
Order order = 2;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
message FindOrderByEmailRequest {
|
|
243
|
+
string spanContext = 0;
|
|
244
|
+
string email = 1;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
message FindOrderByEmailResponse {
|
|
248
|
+
StatusCode status = 0;
|
|
249
|
+
repeated Error errors = 1;
|
|
250
|
+
Order order = 2;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
service OrderService {
|
|
255
|
+
// Create
|
|
256
|
+
rpc createOrder(CreateOrderRequest) returns (CreateOrderResponse) {}
|
|
257
|
+
// QR Code
|
|
258
|
+
rpc sendOrderQRCodeEmail(SendOrderQRCodeEmailRequest) returns (SendOrderQRCodeEmailResponse) {}
|
|
259
|
+
rpc sendOrderReceiptEmail(SendOrderReceiptEmailRequest) returns (SendOrderReceiptEmailResponse) {}
|
|
260
|
+
rpc sendOrderRefundEmail(SendOrderRefundEmailRequest) returns (SendOrderRefundEmailResponse) {}
|
|
261
|
+
rpc scanOrder(ScanOrderRequest) returns (ScanOrderResponse) {}
|
|
262
|
+
// Refund
|
|
263
|
+
rpc refundOrder(RefundOrderRequest) returns (RefundOrderResponse) {}
|
|
264
|
+
rpc refundEventOrders(RefundEventOrdersRequest) returns (RefundEventOrdersResponse) {}
|
|
265
|
+
// Report
|
|
266
|
+
rpc generateOrderReport(GenerateOrderReportRequest) returns (GenerateOrderReportResponse) {}
|
|
267
|
+
// Find
|
|
268
|
+
rpc queryOrders(QueryOrdersRequest) returns (QueryOrdersResponse) {}
|
|
269
|
+
rpc findOrderById(FindOrderByIdRequest) returns (FindOrderByIdResponse) {}
|
|
270
|
+
rpc findOrderByEmail(FindOrderByEmailRequest) returns (FindOrderByEmailResponse) {}
|
|
271
|
+
|
|
272
|
+
}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "error.proto";
|
|
4
|
+
import "common.proto";
|
|
5
|
+
|
|
6
|
+
message Organization {
|
|
7
|
+
string _id = 0;
|
|
8
|
+
string userId = 1;
|
|
9
|
+
int32 createdAt = 2;
|
|
10
|
+
string authyId = 3;
|
|
11
|
+
string stripeId = 4;
|
|
12
|
+
string orgName = 5;
|
|
13
|
+
repeated string orgUrls = 6;
|
|
14
|
+
Address address = 7;
|
|
15
|
+
string orgLogoUrl = 8;
|
|
16
|
+
string orgColorHex = 9;
|
|
17
|
+
string bio = 10;
|
|
18
|
+
string email = 11;
|
|
19
|
+
string phoneNumber = 12;
|
|
20
|
+
string facebookPixelId = 13;
|
|
21
|
+
string googleAnalyticsId = 14;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// Create Organization
|
|
25
|
+
message CreateOrganizationRequest {
|
|
26
|
+
string spanContext = 0;
|
|
27
|
+
string userId = 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
message CreateOrganizationResponse {
|
|
31
|
+
StatusCode status = 0;
|
|
32
|
+
repeated Error errors = 1;
|
|
33
|
+
Organization organization = 3;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// List OrgUrls
|
|
37
|
+
message ListOrganizationUrlsRequest {
|
|
38
|
+
string spanContext = 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message ListOrganizationUrlsResponse {
|
|
42
|
+
StatusCode status = 0;
|
|
43
|
+
repeated Error errors = 1;
|
|
44
|
+
repeated string orgUrls = 2;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Update Organization
|
|
48
|
+
message UpdateOrganizationRequest {
|
|
49
|
+
string spanContext = 0;
|
|
50
|
+
Organization organization = 1;
|
|
51
|
+
string orgId = 2;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
message UpdateOrganizationResponse {
|
|
55
|
+
StatusCode status = 0;
|
|
56
|
+
repeated Error errors = 1;
|
|
57
|
+
Organization organization = 2;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/****************************************************************************************
|
|
61
|
+
Find Organizations
|
|
62
|
+
****************************************************************************************/
|
|
63
|
+
|
|
64
|
+
message OrganizationQuery {
|
|
65
|
+
string name = 0;
|
|
66
|
+
repeated string orgIds = 1;
|
|
67
|
+
int32 startDate = 2;
|
|
68
|
+
int32 endDate = 3;
|
|
69
|
+
bool any = 4;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
message QueryOrganizationsRequest {
|
|
73
|
+
string spanContext = 0;
|
|
74
|
+
OrganizationQuery query = 1;
|
|
75
|
+
Pagination pagination = 2;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
message QueryOrganizationsResponse {
|
|
79
|
+
StatusCode status = 0;
|
|
80
|
+
repeated Error errors = 1;
|
|
81
|
+
repeated Organization organizations = 2;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// Find Organization
|
|
85
|
+
message FindOrganizationRequest {
|
|
86
|
+
string spanContext = 0;
|
|
87
|
+
string orgId = 1;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
message FindOrganizationResponse {
|
|
91
|
+
StatusCode status = 0;
|
|
92
|
+
repeated Error errors = 1;
|
|
93
|
+
Organization organization = 2;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
service OrganizationService {
|
|
97
|
+
// Create
|
|
98
|
+
rpc createOrganization(CreateOrganizationRequest) returns (CreateOrganizationResponse) {}
|
|
99
|
+
// List
|
|
100
|
+
rpc listOrganizationUrls(ListOrganizationUrlsRequest) returns (ListOrganizationUrlsResponse) {}
|
|
101
|
+
// Query
|
|
102
|
+
rpc queryOrganizations(QueryOrganizationsRequest) returns (QueryOrganizationsResponse) {}
|
|
103
|
+
// Update
|
|
104
|
+
rpc updateOrganization(UpdateOrganizationRequest) returns (UpdateOrganizationResponse) {}
|
|
105
|
+
// Find
|
|
106
|
+
rpc findOrganization(FindOrganizationRequest) returns (FindOrganizationResponse) {}
|
|
107
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "error.proto";
|
|
4
|
+
import "common.proto";
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
message Role {
|
|
8
|
+
string _id = 0;
|
|
9
|
+
string orgId = 1;
|
|
10
|
+
string userId = 2;
|
|
11
|
+
string userEmail = 3;
|
|
12
|
+
int32 createdAt = 4;
|
|
13
|
+
string createdBy = 5;
|
|
14
|
+
string role = 6;
|
|
15
|
+
int32 acceptedAt = 7;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/****************************************************************************************
|
|
19
|
+
Create Role
|
|
20
|
+
****************************************************************************************/
|
|
21
|
+
message CreateRoleRequest {
|
|
22
|
+
string spanContext = 0;
|
|
23
|
+
Role role = 1;
|
|
24
|
+
string creatorId = 2;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message CreateRoleResponse {
|
|
28
|
+
StatusCode status = 0;
|
|
29
|
+
repeated Error errors = 1;
|
|
30
|
+
Role role = 2;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/****************************************************************************************
|
|
34
|
+
Delete Role
|
|
35
|
+
****************************************************************************************/
|
|
36
|
+
message DeleteRoleRequest {
|
|
37
|
+
string spanContext = 0;
|
|
38
|
+
string roleId = 2;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message DeleteRoleResponse {
|
|
42
|
+
StatusCode status = 0;
|
|
43
|
+
repeated Error errors = 1;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/****************************************************************************************
|
|
47
|
+
Accept Role
|
|
48
|
+
****************************************************************************************/
|
|
49
|
+
message AcceptRoleRequest {
|
|
50
|
+
string spanContext = 0;
|
|
51
|
+
string roleId = 1;
|
|
52
|
+
bool accept = 2;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
message AcceptRoleResponse {
|
|
56
|
+
StatusCode status = 0;
|
|
57
|
+
repeated Error errors = 1;
|
|
58
|
+
Role role = 2;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/****************************************************************************************
|
|
62
|
+
Assign UserId
|
|
63
|
+
****************************************************************************************/
|
|
64
|
+
|
|
65
|
+
message AssignUserIdToRolesRequest {
|
|
66
|
+
string spanContext = 0;
|
|
67
|
+
string userId = 1;
|
|
68
|
+
string userEmail = 2;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
message AssignUserIdToRolesResponse {
|
|
72
|
+
StatusCode status = 0;
|
|
73
|
+
repeated Error errors = 1;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/****************************************************************************************
|
|
77
|
+
Find Role
|
|
78
|
+
****************************************************************************************/
|
|
79
|
+
message FindRoleByIdRequest {
|
|
80
|
+
string spanContext = 0;
|
|
81
|
+
string roleId = 1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
message FindRoleByIdResponse {
|
|
85
|
+
StatusCode status = 0;
|
|
86
|
+
repeated Error errors = 1;
|
|
87
|
+
Role role = 2;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/****************************************************************************************
|
|
91
|
+
Find User Role
|
|
92
|
+
****************************************************************************************/
|
|
93
|
+
message FindUserRoleRequest {
|
|
94
|
+
string spanContext = 0;
|
|
95
|
+
string userId = 1;
|
|
96
|
+
string orgId = 2;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
message FindUserRoleResponse {
|
|
100
|
+
StatusCode status = 0;
|
|
101
|
+
repeated Error errors = 1;
|
|
102
|
+
Role role = 2;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/****************************************************************************************
|
|
106
|
+
Query Roles
|
|
107
|
+
****************************************************************************************/
|
|
108
|
+
message QueryRolesRequest {
|
|
109
|
+
string spanContext = 0;
|
|
110
|
+
repeated Query query = 1;
|
|
111
|
+
Pagination pagination = 2;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
message QueryRolesResponse {
|
|
115
|
+
StatusCode status = 0;
|
|
116
|
+
repeated Error errors = 1;
|
|
117
|
+
repeated Role roles = 2;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
service RoleService {
|
|
123
|
+
// Create
|
|
124
|
+
rpc createRole(CreateRoleRequest) returns (CreateRoleResponse) {}
|
|
125
|
+
// Delete
|
|
126
|
+
rpc deleteRole(DeleteRoleRequest) returns (DeleteRoleResponse) {}
|
|
127
|
+
// Accept
|
|
128
|
+
rpc acceptRole(AcceptRoleRequest) returns (AcceptRoleResponse) {}
|
|
129
|
+
// Assign UserId
|
|
130
|
+
rpc assignUserIdToRoles(AssignUserIdToRolesRequest) returns (AssignUserIdToRolesResponse) {}
|
|
131
|
+
// Find
|
|
132
|
+
rpc findRoleById(FindRoleByIdRequest) returns (FindRoleByIdResponse) {}
|
|
133
|
+
rpc findUserRole(FindUserRoleRequest) returns (FindUserRoleResponse) {}
|
|
134
|
+
// List
|
|
135
|
+
rpc queryRoles(QueryRolesRequest) returns (QueryRolesResponse) {}
|
|
136
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "error.proto";
|
|
4
|
+
import "common.proto";
|
|
5
|
+
|
|
6
|
+
/***************************************************************************************
|
|
7
|
+
Seating Models
|
|
8
|
+
****************************************************************************************/
|
|
9
|
+
|
|
10
|
+
message Seating {
|
|
11
|
+
string _id = 0;
|
|
12
|
+
string orgId = 1;
|
|
13
|
+
string publicKey = 2;
|
|
14
|
+
string secretKey = 3;
|
|
15
|
+
string designerKey = 4;
|
|
16
|
+
int32 createdAt = 5;
|
|
17
|
+
int32 updatedAt = 6;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/***************************************************************************************
|
|
21
|
+
Seating
|
|
22
|
+
****************************************************************************************/
|
|
23
|
+
|
|
24
|
+
message CreateSeatingRequest {
|
|
25
|
+
string spanContext = 0;
|
|
26
|
+
string orgId = 1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
message CreateSeatingResponse {
|
|
30
|
+
StatusCode status = 0;
|
|
31
|
+
repeated Error errors = 1;
|
|
32
|
+
Seating seating = 2;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
message BookSeatsRequest {
|
|
36
|
+
string spanContext = 0;
|
|
37
|
+
string orgId = 1;
|
|
38
|
+
string eventId = 2;
|
|
39
|
+
string holdToken = 3;
|
|
40
|
+
repeated string seats = 4;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
message BookSeatsResponse {
|
|
44
|
+
StatusCode status = 0;
|
|
45
|
+
repeated Error errors = 1;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message FindOrganizationSeatingRequest {
|
|
49
|
+
string spanContext = 0;
|
|
50
|
+
string orgId = 1;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message FindOrganizationSeatingResponse {
|
|
54
|
+
StatusCode status = 0;
|
|
55
|
+
repeated Error errors = 1;
|
|
56
|
+
Seating seating = 2;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
service SeatingService {
|
|
60
|
+
// Seating
|
|
61
|
+
rpc createSeating(CreateSeatingRequest) returns (CreateSeatingResponse) {}
|
|
62
|
+
rpc bookSeats(BookSeatsRequest) returns (BookSeatsResponse) {}
|
|
63
|
+
rpc findOrganizationSeating(FindOrganizationSeatingRequest) returns (FindOrganizationSeatingResponse) {}
|
|
64
|
+
}
|