@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,181 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "error.proto";
|
|
4
|
+
|
|
5
|
+
/***************************************************************************************
|
|
6
|
+
Stripe Models
|
|
7
|
+
****************************************************************************************/
|
|
8
|
+
|
|
9
|
+
message StripeConnectAccount {
|
|
10
|
+
string name = 0;
|
|
11
|
+
string country = 1;
|
|
12
|
+
string email = 2;
|
|
13
|
+
bool payoutsEnabled = 3;
|
|
14
|
+
string stripeAccountId = 4;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message StripeCharge {
|
|
18
|
+
string brand = 0;
|
|
19
|
+
string last4 = 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message StripeCustomer {
|
|
23
|
+
string stripeCustomerId = 0;
|
|
24
|
+
string email = 1;
|
|
25
|
+
repeated StripeSource sources = 2;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message StripeSource {
|
|
29
|
+
string sourceId = 0;
|
|
30
|
+
string brand = 1;
|
|
31
|
+
string last4 = 2;
|
|
32
|
+
string expMonth = 3;
|
|
33
|
+
string expYear = 4;
|
|
34
|
+
string funding = 5;
|
|
35
|
+
string country = 6;
|
|
36
|
+
string type = 7;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/***************************************************************************************
|
|
40
|
+
Connect Account
|
|
41
|
+
****************************************************************************************/
|
|
42
|
+
|
|
43
|
+
message ConnectStripeUserRequest {
|
|
44
|
+
string spanContext = 0;
|
|
45
|
+
string orgId = 1;
|
|
46
|
+
string connectCode = 2;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
message ConnectStripeUserResponse {
|
|
50
|
+
StatusCode status = 0;
|
|
51
|
+
repeated Error errors = 1;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
message RetrieveStripeConnectAccountRequest {
|
|
55
|
+
string spanContext = 0;
|
|
56
|
+
string stripeAccountId = 1;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message RetrieveStripeConnectAccountResponse {
|
|
60
|
+
StatusCode status = 0;
|
|
61
|
+
repeated Error errors = 1;
|
|
62
|
+
StripeConnectAccount stripeConnectAccount = 2;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/***************************************************************************************
|
|
66
|
+
Charge
|
|
67
|
+
****************************************************************************************/
|
|
68
|
+
|
|
69
|
+
message CreateStripeChargeRequest {
|
|
70
|
+
string spanContext = 0;
|
|
71
|
+
string orgId = 1;
|
|
72
|
+
string userId = 2;
|
|
73
|
+
// The total amount being processed
|
|
74
|
+
// i.e. the order total, etc
|
|
75
|
+
int32 amount = 3;
|
|
76
|
+
// The amount the promoter will recieive
|
|
77
|
+
// (subtracts sellout and stripe fees)
|
|
78
|
+
int32 transferAmount = 4;
|
|
79
|
+
// Amount sellout takes as a fee
|
|
80
|
+
int32 feeAmount = 5;
|
|
81
|
+
string description = 6;
|
|
82
|
+
string stripeToken = 7;
|
|
83
|
+
string currency = 8;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message CreateStripeChargeResponse {
|
|
87
|
+
StatusCode status = 0;
|
|
88
|
+
repeated Error errors = 1;
|
|
89
|
+
string stripeChargeId = 2;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
message RefundStripeChargeRequest {
|
|
93
|
+
string spanContext = 0;
|
|
94
|
+
string orgId = 1;
|
|
95
|
+
string stripeChargeId = 2;
|
|
96
|
+
int32 amount = 3;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
message RefundStripeChargeResponse {
|
|
100
|
+
StatusCode status = 0;
|
|
101
|
+
repeated Error errors = 1;
|
|
102
|
+
string refundId = 2;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
message RetrieveStripeChargeRequest {
|
|
106
|
+
string spanContext = 0;
|
|
107
|
+
string orgId = 1;
|
|
108
|
+
string stripeChargeId = 2;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
message RetrieveStripeChargeResponse {
|
|
112
|
+
StatusCode status = 0;
|
|
113
|
+
repeated Error errors = 1;
|
|
114
|
+
StripeCharge stripeCharge = 2;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/***************************************************************************************
|
|
118
|
+
Customer
|
|
119
|
+
****************************************************************************************/
|
|
120
|
+
|
|
121
|
+
message CreateStripeCustomerRequest {
|
|
122
|
+
string spanContext = 0;
|
|
123
|
+
string userId = 1;
|
|
124
|
+
string stripeToken = 2;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
message CreateStripeCustomerResponse {
|
|
128
|
+
StatusCode status = 0;
|
|
129
|
+
repeated Error errors = 1;
|
|
130
|
+
StripeCustomer stripeCustomer = 2;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
message RetrieveStripeCustomerRequest {
|
|
134
|
+
string spanContext = 0;
|
|
135
|
+
string stripeCustomerId = 1;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
message RetrieveStripeCustomerResponse {
|
|
139
|
+
StatusCode status = 0;
|
|
140
|
+
repeated Error errors = 1;
|
|
141
|
+
StripeCustomer stripeCustomer = 2;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
message CreateStripeSourceRequest {
|
|
145
|
+
string spanContext = 0;
|
|
146
|
+
string userId = 1;
|
|
147
|
+
string stripeToken = 2;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
message CreateStripeSourceResponse {
|
|
151
|
+
StatusCode status = 0;
|
|
152
|
+
repeated Error errors = 1;
|
|
153
|
+
StripeCustomer stripeCustomer = 2;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
message DeleteStripeSourceRequest {
|
|
157
|
+
string spanContext = 0;
|
|
158
|
+
string userId = 1;
|
|
159
|
+
string sourceId = 2;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
message DeleteStripeSourceResponse {
|
|
163
|
+
StatusCode status = 0;
|
|
164
|
+
repeated Error errors = 1;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/***************************************************************************************
|
|
168
|
+
RPC
|
|
169
|
+
****************************************************************************************/
|
|
170
|
+
|
|
171
|
+
service StripeService {
|
|
172
|
+
rpc connectStripeUser(ConnectStripeUserRequest) returns (ConnectStripeUserResponse) {}
|
|
173
|
+
rpc retrieveStripeConnectAccount(RetrieveStripeConnectAccountRequest) returns (RetrieveStripeConnectAccountResponse) {}
|
|
174
|
+
rpc createStripeCharge(CreateStripeChargeRequest) returns (CreateStripeChargeResponse) {}
|
|
175
|
+
rpc refundStripeCharge(RefundStripeChargeRequest) returns (RefundStripeChargeResponse) {}
|
|
176
|
+
rpc retrieveStripeCharge(RetrieveStripeChargeRequest) returns (RetrieveStripeChargeResponse) {}
|
|
177
|
+
rpc createStripeCustomer(CreateStripeCustomerRequest) returns (CreateStripeCustomerResponse) {}
|
|
178
|
+
rpc retrieveStripeCustomer(RetrieveStripeCustomerRequest) returns (RetrieveStripeCustomerResponse) {}
|
|
179
|
+
rpc createStripeSource(CreateStripeSourceRequest) returns (CreateStripeSourceResponse) {}
|
|
180
|
+
rpc deleteStripeSource(DeleteStripeSourceRequest) returns (DeleteStripeSourceResponse) {}
|
|
181
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "error.proto";
|
|
4
|
+
import "common.proto";
|
|
5
|
+
|
|
6
|
+
/****************************************************************************************
|
|
7
|
+
Task Models
|
|
8
|
+
****************************************************************************************/
|
|
9
|
+
|
|
10
|
+
message Task {
|
|
11
|
+
string _id = 0;
|
|
12
|
+
string taskType = 1;
|
|
13
|
+
int32 createdAt = 2;
|
|
14
|
+
int32 executeAt = 3;
|
|
15
|
+
int32 startedAt = 4;
|
|
16
|
+
int32 endedAt = 5;
|
|
17
|
+
bool success = 6;
|
|
18
|
+
string userId = 7;
|
|
19
|
+
string orgId = 8;
|
|
20
|
+
string eventId = 9;
|
|
21
|
+
string orderId = 10;
|
|
22
|
+
repeated string venueIds = 11;
|
|
23
|
+
repeated string artistIds = 12;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message CreateTaskRequest {
|
|
27
|
+
string spanContext = 0;
|
|
28
|
+
repeated Task task = 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message CreateTaskResponse {
|
|
32
|
+
StatusCode status = 0;
|
|
33
|
+
repeated Error errors = 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
service TaskService {
|
|
37
|
+
// Create
|
|
38
|
+
rpc createTask(CreateTaskRequest) returns (CreateTaskResponse) {}
|
|
39
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "error.proto";
|
|
4
|
+
|
|
5
|
+
message RegisterTwilioUserRequest {
|
|
6
|
+
string spanContext = 0;
|
|
7
|
+
string email = 1;
|
|
8
|
+
string phoneNumber = 2;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
message RegisterTwilioUserResponse {
|
|
12
|
+
StatusCode status = 0;
|
|
13
|
+
repeated Error errors = 1;
|
|
14
|
+
string authyId = 2;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message SendTwilioVerificationRequest {
|
|
18
|
+
string spanContext = 0;
|
|
19
|
+
string phoneNumber = 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message SendTwilioVerificationResponse {
|
|
23
|
+
StatusCode status = 0;
|
|
24
|
+
repeated Error errors = 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message VerifyTwilioTokenRequest {
|
|
28
|
+
string spanContext = 0;
|
|
29
|
+
string phoneNumber = 1;
|
|
30
|
+
string token = 2;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
message VerifyTwilioTokenResponse {
|
|
34
|
+
StatusCode status = 0;
|
|
35
|
+
repeated Error errors = 1;
|
|
36
|
+
bool phoneVerified = 2;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
service TwilioService {
|
|
40
|
+
rpc registerTwilioUser(RegisterTwilioUserRequest) returns (RegisterTwilioUserResponse) {}
|
|
41
|
+
rpc sendTwilioVerification(SendTwilioVerificationRequest) returns (SendTwilioVerificationResponse) {}
|
|
42
|
+
rpc verifyTwilioToken(VerifyTwilioTokenRequest) returns (VerifyTwilioTokenResponse) {}
|
|
43
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "error.proto";
|
|
4
|
+
import "common.proto";
|
|
5
|
+
|
|
6
|
+
message UserProfile {
|
|
7
|
+
string _id = 0;
|
|
8
|
+
string userId = 1;
|
|
9
|
+
string firstName = 2;
|
|
10
|
+
string lastName = 3;
|
|
11
|
+
string email = 4;
|
|
12
|
+
string phoneNumber = 5;
|
|
13
|
+
string authyId = 6;
|
|
14
|
+
string stripeCustomerId = 7;
|
|
15
|
+
string imageUrl = 8;
|
|
16
|
+
repeated Metrics metrics = 9;
|
|
17
|
+
repeated string orgIds = 10;
|
|
18
|
+
repeated string eventIds = 11;
|
|
19
|
+
repeated string venueIds = 12;
|
|
20
|
+
repeated string artistIds = 13;
|
|
21
|
+
Address address = 14;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/****************************************************************************************
|
|
25
|
+
Create Profile
|
|
26
|
+
****************************************************************************************/
|
|
27
|
+
message CreateUserProfileRequest {
|
|
28
|
+
string spanContext = 0;
|
|
29
|
+
string userId = 1;
|
|
30
|
+
string firstName = 2;
|
|
31
|
+
string lastName = 3;
|
|
32
|
+
string email = 4;
|
|
33
|
+
string phoneNumber = 5;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
message CreateUserProfileResponse {
|
|
37
|
+
StatusCode status = 0;
|
|
38
|
+
repeated Error errors = 1;
|
|
39
|
+
UserProfile userProfile = 2;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
/****************************************************************************************
|
|
44
|
+
Update Profile
|
|
45
|
+
****************************************************************************************/
|
|
46
|
+
message UpdateUserProfileRequest {
|
|
47
|
+
string spanContext = 0;
|
|
48
|
+
UserProfile userProfile = 1;
|
|
49
|
+
string userId = 2;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message UpdateUserProfileResponse {
|
|
53
|
+
StatusCode status = 0;
|
|
54
|
+
repeated Error errors = 1;
|
|
55
|
+
UserProfile userProfile = 2;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/****************************************************************************************
|
|
59
|
+
Profile Report
|
|
60
|
+
****************************************************************************************/
|
|
61
|
+
|
|
62
|
+
message GenerateUserProfileReportRequest {
|
|
63
|
+
string spanContext = 0;
|
|
64
|
+
string orgId = 1;
|
|
65
|
+
UserProfileQuery query = 2;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
message GenerateUserProfileReportResponse {
|
|
69
|
+
StatusCode status = 0;
|
|
70
|
+
repeated Error errors = 1;
|
|
71
|
+
string url = 2;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/****************************************************************************************
|
|
76
|
+
Find Profile
|
|
77
|
+
****************************************************************************************/
|
|
78
|
+
|
|
79
|
+
message UserProfileQuery {
|
|
80
|
+
repeated string eventIds = 0;
|
|
81
|
+
repeated string venueIds = 1;
|
|
82
|
+
repeated string artistIds = 2;
|
|
83
|
+
repeated string userIds = 3;
|
|
84
|
+
string name = 4;
|
|
85
|
+
string email = 5;
|
|
86
|
+
string phoneNumber = 6;
|
|
87
|
+
bool any = 7;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
message QueryUserProfilesRequest {
|
|
91
|
+
string spanContext = 0;
|
|
92
|
+
string orgId = 1;
|
|
93
|
+
UserProfileQuery query = 2;
|
|
94
|
+
Pagination pagination = 3;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
message QueryUserProfilesResponse {
|
|
98
|
+
StatusCode status = 0;
|
|
99
|
+
repeated Error errors = 1;
|
|
100
|
+
repeated UserProfile userProfiles = 2;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
message FindUserProfileRequest {
|
|
104
|
+
string spanContext = 0;
|
|
105
|
+
string userId = 1;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
message FindUserProfileResponse {
|
|
109
|
+
StatusCode status = 0;
|
|
110
|
+
repeated Error errors = 1;
|
|
111
|
+
UserProfile userProfile = 2;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
service UserProfileService {
|
|
115
|
+
// Create
|
|
116
|
+
rpc createUserProfile(CreateUserProfileRequest) returns (CreateUserProfileResponse) {}
|
|
117
|
+
// Update
|
|
118
|
+
rpc updateUserProfile(UpdateUserProfileRequest) returns (UpdateUserProfileResponse) {}
|
|
119
|
+
// Report
|
|
120
|
+
rpc generateUserProfileReport(GenerateUserProfileReportRequest) returns (GenerateUserProfileReportResponse) {}
|
|
121
|
+
// Find
|
|
122
|
+
rpc findUserProfile(FindUserProfileRequest) returns (FindUserProfileResponse) {}
|
|
123
|
+
rpc queryUserProfiles(QueryUserProfilesRequest) returns (QueryUserProfilesResponse) {}
|
|
124
|
+
}
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "error.proto";
|
|
4
|
+
|
|
5
|
+
message User {
|
|
6
|
+
string _id = 1;
|
|
7
|
+
string email = 2;
|
|
8
|
+
string password = 3;
|
|
9
|
+
string passwordHash = 4;
|
|
10
|
+
string firstName = 5;
|
|
11
|
+
string lastName = 6;
|
|
12
|
+
int32 createdAt = 7;
|
|
13
|
+
string phoneNumber = 8;
|
|
14
|
+
int32 phoneNumberVerifiedAt = 9;
|
|
15
|
+
string emailVerifyCode = 10;
|
|
16
|
+
int32 emailVerifiedAt = 11;
|
|
17
|
+
string forgotPasswordCode = 12;
|
|
18
|
+
int32 lastChangedPasswordAt = 13;
|
|
19
|
+
string orgContextId = 14;
|
|
20
|
+
string orgRole = 15;
|
|
21
|
+
string phoneNumberWaitingForVerify = 16;
|
|
22
|
+
string emailWaitingForVerify = 17;
|
|
23
|
+
string preferredLogin = 18;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Create User
|
|
27
|
+
|
|
28
|
+
message CreateUserRequest {
|
|
29
|
+
string spanContext = 0;
|
|
30
|
+
User user = 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
message CreateUserResponse {
|
|
34
|
+
StatusCode status = 1;
|
|
35
|
+
repeated Error errors = 2;
|
|
36
|
+
User user = 3;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
// Verify Email
|
|
41
|
+
|
|
42
|
+
message SendUserEmailVerificationRequest {
|
|
43
|
+
string spanContext = 0;
|
|
44
|
+
string userId = 1;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message SendUserEmailVerificationResponse {
|
|
48
|
+
StatusCode status = 0;
|
|
49
|
+
repeated Error errors = 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message VerifyUserEmailRequest {
|
|
53
|
+
string spanContext = 0;
|
|
54
|
+
string emailVerificationToken = 1;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message VerifyUserEmailResponse {
|
|
58
|
+
StatusCode status = 0;
|
|
59
|
+
repeated Error errors = 1;
|
|
60
|
+
bool emailVerified = 2;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
//Verify Phone
|
|
64
|
+
message SendUserPhoneVerificationRequest {
|
|
65
|
+
string spanContext = 1;
|
|
66
|
+
string userId = 2;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
message SendUserPhoneVerificationResponse {
|
|
70
|
+
StatusCode status = 1;
|
|
71
|
+
repeated Error errors = 2;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
message VerifyUserPhoneNumberRequest {
|
|
75
|
+
string spanContext = 1;
|
|
76
|
+
string userId = 2;
|
|
77
|
+
string phoneVerificationToken = 3;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
message VerifyUserPhoneNumberResponse {
|
|
81
|
+
StatusCode status = 1;
|
|
82
|
+
repeated Error errors = 2;
|
|
83
|
+
bool phoneVerified = 3;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Set User Organization Context Id
|
|
87
|
+
|
|
88
|
+
message SetUserOrgContextIdRequest {
|
|
89
|
+
string spanContext = 0;
|
|
90
|
+
string userId = 1;
|
|
91
|
+
string orgId = 2;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
message SetUserOrgContextIdResponse {
|
|
95
|
+
StatusCode status = 1;
|
|
96
|
+
repeated Error errors = 2;
|
|
97
|
+
User user = 3;
|
|
98
|
+
string token = 4;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Auth User
|
|
102
|
+
|
|
103
|
+
message AuthUserRequest {
|
|
104
|
+
string spanContext = 1;
|
|
105
|
+
string email = 2;
|
|
106
|
+
string password = 3;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
message AuthUserResponse {
|
|
110
|
+
StatusCode status = 1;
|
|
111
|
+
repeated Error errors = 2;
|
|
112
|
+
User user = 3;
|
|
113
|
+
string token = 4;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Phone Authentication
|
|
117
|
+
|
|
118
|
+
message UserPhoneAuthenticationRequest {
|
|
119
|
+
string spanContext = 0;
|
|
120
|
+
string email = 1;
|
|
121
|
+
string phoneNumber = 2;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
message UserPhoneAuthenticationResponse {
|
|
125
|
+
StatusCode status = 1;
|
|
126
|
+
repeated Error errors = 2;
|
|
127
|
+
User user = 3;
|
|
128
|
+
string phoneNumber = 4;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
message VerifyUserPhoneAuthenticationRequest {
|
|
132
|
+
string spanContext = 0;
|
|
133
|
+
string email = 1;
|
|
134
|
+
string phoneNumber = 2;
|
|
135
|
+
string phoneVerificationToken = 3;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
message VerifyUserPhoneAuthenticationResponse {
|
|
139
|
+
StatusCode status = 1;
|
|
140
|
+
repeated Error errors = 2;
|
|
141
|
+
User user = 3;
|
|
142
|
+
string token = 4;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// Forgot Password
|
|
146
|
+
message ForgotUserPasswordRequest {
|
|
147
|
+
string spanContext = 1;
|
|
148
|
+
string email = 2;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
message ForgotUserPasswordResponse {
|
|
152
|
+
StatusCode status = 1;
|
|
153
|
+
repeated Error errors = 2;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
message ResetUserPasswordRequest {
|
|
157
|
+
string spanContext = 1;
|
|
158
|
+
string forgotPasswordCode = 2;
|
|
159
|
+
string password = 3;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
message ResetUserPasswordResponse {
|
|
163
|
+
StatusCode status = 1;
|
|
164
|
+
repeated Error errors = 2;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// update user password - for when user only has phone login and wants to add password
|
|
168
|
+
message SetUserPasswordRequest {
|
|
169
|
+
string spanContext = 0;
|
|
170
|
+
string userId = 1;
|
|
171
|
+
string password = 2;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
message SetUserPasswordResponse {
|
|
175
|
+
StatusCode status = 0;
|
|
176
|
+
repeated Error errors = 1;
|
|
177
|
+
User user = 2;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// Find User
|
|
181
|
+
|
|
182
|
+
message FindUserByIdRequest {
|
|
183
|
+
string spanContext = 1;
|
|
184
|
+
string userId = 2;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
message FindUserByIdResponse {
|
|
188
|
+
StatusCode status = 1;
|
|
189
|
+
repeated Error errors = 2;
|
|
190
|
+
User user = 3;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
message FindUserByEmailRequest {
|
|
194
|
+
string spanContext = 1;
|
|
195
|
+
string email = 2;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
message FindUserByEmailResponse {
|
|
199
|
+
StatusCode status = 1;
|
|
200
|
+
repeated Error errors = 2;
|
|
201
|
+
User user = 3;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
// Update User Phone and Email
|
|
205
|
+
|
|
206
|
+
message UpdateUserPhoneNumberRequest {
|
|
207
|
+
string spanContext = 1;
|
|
208
|
+
string userId = 2;
|
|
209
|
+
string newPhoneNumber = 3;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
message UpdateUserPhoneNumberResponse {
|
|
213
|
+
StatusCode status = 1;
|
|
214
|
+
repeated Error errors = 2;
|
|
215
|
+
User user = 3;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
message UpdateUserEmailRequest {
|
|
219
|
+
string spanContext = 1;
|
|
220
|
+
string userId = 2;
|
|
221
|
+
string newEmail = 3;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
message UpdateUserEmailResponse {
|
|
225
|
+
StatusCode status = 1;
|
|
226
|
+
repeated Error errors = 2;
|
|
227
|
+
User user = 3;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
// Update login method
|
|
231
|
+
message UpdateUserPreferredLoginRequest {
|
|
232
|
+
string spanContext = 1;
|
|
233
|
+
string userId = 2;
|
|
234
|
+
string preferredLogin = 3;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
message UpdateUserPreferredLoginResponse {
|
|
238
|
+
StatusCode status = 1;
|
|
239
|
+
repeated Error errors = 2;
|
|
240
|
+
User user = 3;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// Delete User
|
|
244
|
+
message DeleteUnverifiedUserRequest {
|
|
245
|
+
string spanContext = 0;
|
|
246
|
+
string userId = 1;
|
|
247
|
+
string email = 2;
|
|
248
|
+
string phoneNumber = 3;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
message DeleteUnverifiedUserResponse {
|
|
252
|
+
StatusCode status = 0;
|
|
253
|
+
repeated Error errors = 1;
|
|
254
|
+
bool deleted = 2;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
service UserService {
|
|
258
|
+
// Create
|
|
259
|
+
rpc createUser(CreateUserRequest) returns (CreateUserResponse) {}
|
|
260
|
+
// Verify
|
|
261
|
+
rpc sendUserEmailVerification(SendUserEmailVerificationRequest) returns (SendUserEmailVerificationResponse) {}
|
|
262
|
+
rpc verifyUserEmail(VerifyUserEmailRequest) returns (VerifyUserEmailResponse) {}
|
|
263
|
+
rpc sendUserPhoneVerification(SendUserPhoneVerificationRequest) returns (SendUserPhoneVerificationResponse) {}
|
|
264
|
+
rpc verifyUserPhoneNumber(VerifyUserPhoneNumberRequest) returns (VerifyUserPhoneNumberResponse) {}
|
|
265
|
+
// Auth
|
|
266
|
+
rpc authUser(AuthUserRequest) returns (AuthUserResponse) {}
|
|
267
|
+
rpc sendUserPhoneAuthentication(UserPhoneAuthenticationRequest) returns (UserPhoneAuthenticationResponse) {}
|
|
268
|
+
rpc verifyUserPhoneAuthentication(VerifyUserPhoneAuthenticationRequest) returns (VerifyUserPhoneAuthenticationResponse) {}
|
|
269
|
+
// Org Context
|
|
270
|
+
rpc setUserOrgContextId(SetUserOrgContextIdRequest) returns (SetUserOrgContextIdResponse) {}
|
|
271
|
+
// Forgot Passord
|
|
272
|
+
rpc forgotUserPassword(ForgotUserPasswordRequest) returns (ForgotUserPasswordResponse) {}
|
|
273
|
+
rpc resetUserPassword(ResetUserPasswordRequest) returns (ResetUserPasswordResponse) {}
|
|
274
|
+
// Find
|
|
275
|
+
rpc findUserById(FindUserByIdRequest) returns (FindUserByIdResponse) {}
|
|
276
|
+
rpc findUserByEmail(FindUserByEmailRequest) returns (FindUserByEmailResponse) {}
|
|
277
|
+
// Update
|
|
278
|
+
rpc updateUserPhoneNumber(UpdateUserPhoneNumberRequest) returns (UpdateUserPhoneNumberResponse) {}
|
|
279
|
+
rpc updateUserEmail(UpdateUserEmailRequest) returns (UpdateUserEmailResponse) {}
|
|
280
|
+
rpc updateUserPreferredLogin(UpdateUserPreferredLoginRequest) returns (UpdateUserPreferredLoginResponse) {}
|
|
281
|
+
rpc setUserPassword(SetUserPasswordRequest) returns (SetUserPasswordResponse) {}
|
|
282
|
+
// Delete
|
|
283
|
+
rpc deleteUnverifiedUser(DeleteUnverifiedUserRequest) returns (DeleteUnverifiedUserResponse) {}
|
|
284
|
+
}
|