@sellout/models 0.0.429 → 0.0.430

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sellout/models",
3
- "version": "0.0.429",
3
+ "version": "0.0.430",
4
4
  "description": "Sellout.io models",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -18,7 +18,7 @@
18
18
  "dependencies": {
19
19
  "@apollo/client": "^3.9.6",
20
20
  "@hapi/joi": "^17.1.1",
21
- "@sellout/utils": "^0.0.429",
21
+ "@sellout/utils": "^0.0.430",
22
22
  "@types/hapi__joi": "^16.0.1",
23
23
  "@types/shortid": "^0.0.29",
24
24
  "@types/zen-observable": "^0.8.7",
@@ -33,5 +33,5 @@
33
33
  "protobufjs": "^6.11.2",
34
34
  "typescript": "^4.9.5"
35
35
  },
36
- "gitHead": "29265758859924c2be553ccb66ee046872964ba7"
36
+ "gitHead": "720eb3c460b6973e1d5daf7ce7775077e52bfbb0"
37
37
  }
@@ -0,0 +1,10 @@
1
+ import {gql} from '@apollo/client';
2
+
3
+
4
+ const mutation = gql`
5
+ mutation sendRegistrationEmailCode($email: String!) {
6
+ sendRegistrationEmailCode(email: $email)
7
+ }
8
+ `;
9
+
10
+ export default mutation;
@@ -0,0 +1,10 @@
1
+ import {gql} from '@apollo/client';
2
+
3
+
4
+ const mutation = gql`
5
+ mutation verifyRegistrationEmailCode($email: String!, $code: String!) {
6
+ verifyRegistrationEmailCode(email: $email, code: $code)
7
+ }
8
+ `;
9
+
10
+ export default mutation;
@@ -0,0 +1,8 @@
1
+ export default interface IEmailVerification {
2
+ _id?: string;
3
+ email: string;
4
+ code: string;
5
+ attempts?: number;
6
+ createdAt?: number;
7
+ expiresAt: number;
8
+ }
@@ -12,6 +12,7 @@ export enum TaskTypes {
12
12
  SendAnvilCloseEvent = 'SendAnvilCloseEvent',
13
13
  SendEmailTicketHolders = 'SendEmailTicketHolders',
14
14
  ProcessTicketShareLifecycle = 'ProcessTicketShareLifecycle',
15
+ ClearExpiredEmailVerifications = 'ClearExpiredEmailVerifications',
15
16
  }
16
17
 
17
18
  export default interface ITask {
@@ -67,6 +67,38 @@ message VerifyUserEmailResponse {
67
67
  bool emailVerified = 2;
68
68
  }
69
69
 
70
+ message SendRegistrationEmailCodeRequest {
71
+ string spanContext = 1;
72
+ string email = 2;
73
+ }
74
+
75
+ message SendRegistrationEmailCodeResponse {
76
+ StatusCode status = 1;
77
+ repeated Error errors = 2;
78
+ }
79
+
80
+ message VerifyRegistrationEmailCodeRequest {
81
+ string spanContext = 1;
82
+ string email = 2;
83
+ string code = 3;
84
+ }
85
+
86
+ message VerifyRegistrationEmailCodeResponse {
87
+ StatusCode status = 1;
88
+ repeated Error errors = 2;
89
+ bool emailVerified = 3;
90
+ }
91
+
92
+ message ClearExpiredRegistrationEmailCodesRequest {
93
+ string spanContext = 1;
94
+ }
95
+
96
+ message ClearExpiredRegistrationEmailCodesResponse {
97
+ StatusCode status = 1;
98
+ repeated Error errors = 2;
99
+ int32 deletedCount = 3;
100
+ }
101
+
70
102
  //Verify Phone
71
103
  message SendUserPhoneVerificationRequest {
72
104
  string spanContext = 1;
@@ -460,6 +492,9 @@ service UserService {
460
492
  // Verify
461
493
  rpc sendUserEmailVerification(SendUserEmailVerificationRequest) returns (SendUserEmailVerificationResponse) {}
462
494
  rpc verifyUserEmail(VerifyUserEmailRequest) returns (VerifyUserEmailResponse) {}
495
+ rpc sendRegistrationEmailCode(SendRegistrationEmailCodeRequest) returns (SendRegistrationEmailCodeResponse) {}
496
+ rpc verifyRegistrationEmailCode(VerifyRegistrationEmailCodeRequest) returns (VerifyRegistrationEmailCodeResponse) {}
497
+ rpc clearExpiredRegistrationEmailCodes(ClearExpiredRegistrationEmailCodesRequest) returns (ClearExpiredRegistrationEmailCodesResponse) {}
463
498
  rpc sendUserPhoneVerification(SendUserPhoneVerificationRequest) returns (SendUserPhoneVerificationResponse) {}
464
499
  rpc verifyUserPhoneNumber(VerifyUserPhoneNumberRequest) returns (VerifyUserPhoneNumberResponse) {}
465
500
  // Auth