@opexa/portal-sdk 0.0.72 → 0.0.74
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/index.js +48 -21
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +225 -421
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/sdk.d.ts +1 -219
- package/dist/sdk/types.d.ts +13 -383
- package/dist/services/account.service.d.ts +2 -1
- package/dist/services/auth.service.d.ts +0 -4
- package/dist/services/queries.d.ts +1 -0
- package/dist/services/types.d.ts +18 -4
- package/package.json +1 -1
package/dist/sdk/types.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export interface NameAndPasswordSignInInput {
|
|
|
28
28
|
export interface MobileNumberSignInInput {
|
|
29
29
|
type: 'MOBILE_NUMBER';
|
|
30
30
|
mobileNumber: string;
|
|
31
|
-
|
|
31
|
+
verificationCode: string;
|
|
32
32
|
}
|
|
33
33
|
export interface MayaSignInInput {
|
|
34
34
|
type: 'MAYA';
|
|
@@ -52,7 +52,6 @@ export interface SecurityQuestionAuthenticateInput extends Internal.SecurityQues
|
|
|
52
52
|
export type AuthenticateInput = SecurityQuestionAuthenticateInput;
|
|
53
53
|
export type AuthenticateError = UnionAlias<Internal.AuthenticateError>;
|
|
54
54
|
export type AuthenticateReturn = OperationResult<AuthenticateError>;
|
|
55
|
-
export type SendAuthenticationCodeReturn = OperationResult;
|
|
56
55
|
export interface Session {
|
|
57
56
|
id: string;
|
|
58
57
|
dateTimeCreated: Date;
|
|
@@ -60,11 +59,6 @@ export interface Session {
|
|
|
60
59
|
export type SessionError = UnionAlias<RefreshSessionError>;
|
|
61
60
|
export type SessionReturn = OperationResult<SessionError, Session | null>;
|
|
62
61
|
export interface WatchSessionInput {
|
|
63
|
-
/**
|
|
64
|
-
* @default 30000
|
|
65
|
-
* @min `30000` (30s)
|
|
66
|
-
* @max `300000` (5m)
|
|
67
|
-
*/
|
|
68
62
|
interval?: number;
|
|
69
63
|
onInvalid: () => void | Promise<void>;
|
|
70
64
|
}
|
|
@@ -87,22 +81,7 @@ export type File = {
|
|
|
87
81
|
};
|
|
88
82
|
export type FileReturn = OperationResult<never, File | null>;
|
|
89
83
|
export interface UploadImageFileInput {
|
|
90
|
-
/**
|
|
91
|
-
* @example
|
|
92
|
-
* ```ts
|
|
93
|
-
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
94
|
-
*
|
|
95
|
-
* const id = ObjectId.generate(ObjectType.File).toString()
|
|
96
|
-
* ```
|
|
97
|
-
*/
|
|
98
84
|
id?: string;
|
|
99
|
-
/**
|
|
100
|
-
* @validation
|
|
101
|
-
*
|
|
102
|
-
* - _type_: `image/png`, `image/jpg`, `image/jpeg`,
|
|
103
|
-
* - _max file size_: `10MB`
|
|
104
|
-
* - _max name length (excluding extension)_: `52`
|
|
105
|
-
*/
|
|
106
85
|
file: globalThis.File;
|
|
107
86
|
}
|
|
108
87
|
export type UploadImageFileError = UnionAlias<Internal.UploadPrivateImageFileError>;
|
|
@@ -159,195 +138,53 @@ export interface ProfileCompletion {
|
|
|
159
138
|
}
|
|
160
139
|
export type ProfileCompletionReturn = OperationResult<never, ProfileCompletion>;
|
|
161
140
|
export interface CreateAccountInput {
|
|
162
|
-
/**
|
|
163
|
-
* @example
|
|
164
|
-
* ```ts
|
|
165
|
-
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
166
|
-
*
|
|
167
|
-
* const id = ObjectId.generate(ObjectType.Account).toString()
|
|
168
|
-
* ```
|
|
169
|
-
*/
|
|
170
141
|
id?: string;
|
|
171
|
-
/**
|
|
172
|
-
* @validation
|
|
173
|
-
* - _min_: `8`
|
|
174
|
-
* - _max_: `30`
|
|
175
|
-
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
176
|
-
*/
|
|
177
142
|
name: string;
|
|
178
|
-
/**
|
|
179
|
-
* @validation
|
|
180
|
-
* - _min_: `8`
|
|
181
|
-
* - _max_: `30`
|
|
182
|
-
*/
|
|
183
143
|
password: string;
|
|
184
|
-
/**
|
|
185
|
-
* @validation
|
|
186
|
-
* - _pattern_: /^(\+?63|0)?9\d{9}$/
|
|
187
|
-
*
|
|
188
|
-
* @example
|
|
189
|
-
* ```bash
|
|
190
|
-
* +639190000000
|
|
191
|
-
* 09190000000
|
|
192
|
-
* 9190000000
|
|
193
|
-
* ```
|
|
194
|
-
*/
|
|
195
144
|
mobileNumber: string;
|
|
196
|
-
/**
|
|
197
|
-
* @validation
|
|
198
|
-
* - _format_: `date`
|
|
199
|
-
* - _min_: `21 (years)`
|
|
200
|
-
*/
|
|
201
145
|
dateOfBirth: Date | string;
|
|
202
|
-
/**
|
|
203
|
-
* @validation
|
|
204
|
-
* - _format_: `url`
|
|
205
|
-
*/
|
|
206
146
|
domain?: string;
|
|
207
|
-
/**
|
|
208
|
-
* @deprecated use `referralCode`
|
|
209
|
-
*/
|
|
210
147
|
btag?: string;
|
|
211
|
-
|
|
212
|
-
* @validation
|
|
213
|
-
* - _min_: `4`
|
|
214
|
-
* - _max_: `10`
|
|
215
|
-
* - _pattern_: `/^\d{4,10}$/`
|
|
216
|
-
*/
|
|
148
|
+
referralCode?: string;
|
|
217
149
|
verificationCode?: string;
|
|
218
150
|
reCAPTCHAResponse?: string;
|
|
219
|
-
/**
|
|
220
|
-
* @validation
|
|
221
|
-
* - _min_: `4`
|
|
222
|
-
* - _max_: `12`
|
|
223
|
-
* - _pattern_: `/^[A-Z0-9]+$/`
|
|
224
|
-
*/
|
|
225
|
-
referralCode?: string;
|
|
226
151
|
}
|
|
227
|
-
export interface
|
|
228
|
-
|
|
229
|
-
* @example
|
|
230
|
-
* ```ts
|
|
231
|
-
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
232
|
-
*
|
|
233
|
-
* const id = ObjectId.generate(ObjectType.Account).toString()
|
|
234
|
-
* ```
|
|
235
|
-
*/
|
|
152
|
+
export interface NameAndPasswordCreateAccountInput {
|
|
153
|
+
type: 'NAME_AND_PASSWORD';
|
|
236
154
|
id?: string;
|
|
237
|
-
/**
|
|
238
|
-
* @validation
|
|
239
|
-
* - _min_: `8`
|
|
240
|
-
* - _max_: `30`
|
|
241
|
-
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
242
|
-
*/
|
|
243
155
|
name: string;
|
|
244
|
-
/**
|
|
245
|
-
* @validation
|
|
246
|
-
* - _min_: `8`
|
|
247
|
-
* - _max_: `30`
|
|
248
|
-
*/
|
|
249
156
|
password: string;
|
|
250
|
-
/**
|
|
251
|
-
* @validation
|
|
252
|
-
* - _pattern_: /^(\+?63|0)?9\d{9}$/
|
|
253
|
-
*
|
|
254
|
-
* @example
|
|
255
|
-
* ```bash
|
|
256
|
-
* +639190000000
|
|
257
|
-
* 09190000000
|
|
258
|
-
* 9190000000
|
|
259
|
-
* ```
|
|
260
|
-
*/
|
|
261
157
|
mobileNumber?: string | undefined;
|
|
262
|
-
/**
|
|
263
|
-
* @validation
|
|
264
|
-
* - _format_: `date`
|
|
265
|
-
* - _min_: `21 (years)`
|
|
266
|
-
*/
|
|
267
158
|
reCAPTCHAResponse?: string;
|
|
268
159
|
}
|
|
160
|
+
export interface MobileNumberCreateAccountInput {
|
|
161
|
+
type: 'MOBILE_NUMBER';
|
|
162
|
+
id?: string;
|
|
163
|
+
mobileNumber: string;
|
|
164
|
+
referralCode?: string;
|
|
165
|
+
verificationCode?: string;
|
|
166
|
+
reCAPTCHAResponse?: string;
|
|
167
|
+
}
|
|
168
|
+
export type CreateAccountInput__Next = NameAndPasswordCreateAccountInput | MobileNumberCreateAccountInput;
|
|
269
169
|
export type CreateAccountError = UnionAlias<Internal.RegisterMemberAccountError>;
|
|
270
170
|
export type CreateAccountReturn = OperationResult<CreateAccountError, {
|
|
271
171
|
id: string;
|
|
272
172
|
}>;
|
|
273
173
|
export interface RegisterMayaAccountInput {
|
|
274
|
-
/**
|
|
275
|
-
* @validation
|
|
276
|
-
* - _min_: `8`
|
|
277
|
-
* - _max_: `30`
|
|
278
|
-
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
279
|
-
*/
|
|
280
174
|
name: string;
|
|
281
|
-
/**
|
|
282
|
-
* @validation
|
|
283
|
-
* - _min_: `8`
|
|
284
|
-
* - _max_: `30`
|
|
285
|
-
*/
|
|
286
175
|
password: string;
|
|
287
|
-
/**
|
|
288
|
-
* @validation
|
|
289
|
-
* - _format_: `url`
|
|
290
|
-
*/
|
|
291
176
|
domain?: string;
|
|
292
177
|
}
|
|
293
178
|
export type RegisterMayaAccountError = UnionAlias<Internal.RegisterMayaMemberAccountError>;
|
|
294
179
|
export type RegisterMayaAccountReturn = OperationResult<RegisterMayaAccountError>;
|
|
295
180
|
export interface UpdateAccountInput {
|
|
296
|
-
/**
|
|
297
|
-
* @validation
|
|
298
|
-
* - _min_: `8`
|
|
299
|
-
* - _max_: `30`
|
|
300
|
-
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
301
|
-
*/
|
|
302
181
|
name?: string;
|
|
303
|
-
/**
|
|
304
|
-
* @validation
|
|
305
|
-
* - _pattern_: /^(\+?63|0)?9\d{9}$/
|
|
306
|
-
*
|
|
307
|
-
* @example
|
|
308
|
-
* ```bash
|
|
309
|
-
* +639190000000
|
|
310
|
-
* 09190000000
|
|
311
|
-
* 9190000000
|
|
312
|
-
* ```
|
|
313
|
-
*/
|
|
314
182
|
password?: string;
|
|
315
|
-
/**
|
|
316
|
-
* @validation
|
|
317
|
-
* - _format_: `email`
|
|
318
|
-
*/
|
|
319
183
|
emailAddress?: string;
|
|
320
|
-
/**
|
|
321
|
-
* @validation
|
|
322
|
-
* - _pattern_: /^(\+?63|0)?9\d{9}$/
|
|
323
|
-
*
|
|
324
|
-
* @example
|
|
325
|
-
* ```bash
|
|
326
|
-
* +639190000000
|
|
327
|
-
* 09190000000
|
|
328
|
-
* 9190000000
|
|
329
|
-
* ```
|
|
330
|
-
*/
|
|
331
184
|
mobileNumber?: string;
|
|
332
|
-
/**
|
|
333
|
-
* @validation
|
|
334
|
-
* - _max_: `240`
|
|
335
|
-
*/
|
|
336
185
|
realName?: string;
|
|
337
|
-
/**
|
|
338
|
-
* @validation
|
|
339
|
-
* - _min_: `2`
|
|
340
|
-
* - _max_: `30`
|
|
341
|
-
* - _pattern_: `/^[a-z]{2,30}$/i`
|
|
342
|
-
*/
|
|
343
186
|
nickName?: string;
|
|
344
187
|
validId?: string;
|
|
345
|
-
/**
|
|
346
|
-
* @validation
|
|
347
|
-
* - _min_: `8`
|
|
348
|
-
* - _max_: `30`
|
|
349
|
-
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
350
|
-
*/
|
|
351
188
|
transactionPassword?: string;
|
|
352
189
|
secretQuestion?: SecretQuestion;
|
|
353
190
|
secretAnswer?: string;
|
|
@@ -356,100 +193,21 @@ export type UpdateAccountError = UnionAlias<Internal.UpdateMemberAccountError>;
|
|
|
356
193
|
export type UpdateAccountReturn = OperationResult<UpdateAccountError>;
|
|
357
194
|
export type DeleteAccountReturn = OperationResult;
|
|
358
195
|
export interface ResetPasswordInput {
|
|
359
|
-
/**
|
|
360
|
-
* @validation
|
|
361
|
-
* - _pattern_: /^(\+?63|0)?9\d{9}$/
|
|
362
|
-
*
|
|
363
|
-
* @example
|
|
364
|
-
* ```bash
|
|
365
|
-
* +639190000000
|
|
366
|
-
* 09190000000
|
|
367
|
-
* 9190000000
|
|
368
|
-
* ```
|
|
369
|
-
*/
|
|
370
196
|
mobileNumber: string;
|
|
371
|
-
/**
|
|
372
|
-
* @validation
|
|
373
|
-
* - _min_: `8`
|
|
374
|
-
* - _max_: `30`
|
|
375
|
-
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
376
|
-
*/
|
|
377
197
|
newPassword: string;
|
|
378
|
-
/**
|
|
379
|
-
* @validation
|
|
380
|
-
* - _min_: `4`
|
|
381
|
-
* - _max_: `10`
|
|
382
|
-
* - _pattern_: `/^\d{4,10}$/`
|
|
383
|
-
*/
|
|
384
198
|
verificationCode: string;
|
|
385
199
|
}
|
|
386
200
|
export type ResetPasswordError = UnionAlias<Internal.ResetPasswordError>;
|
|
387
201
|
export type ResetPasswordReturn = OperationResult<ResetPasswordError>;
|
|
388
202
|
export interface SubmitVerificationDetailsInput {
|
|
389
|
-
/**
|
|
390
|
-
* @example
|
|
391
|
-
* ```ts
|
|
392
|
-
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
393
|
-
*
|
|
394
|
-
* const id = ObjectId.generate(ObjectType.Verification).toString()
|
|
395
|
-
* ```
|
|
396
|
-
*/
|
|
397
203
|
id?: string;
|
|
398
|
-
/**
|
|
399
|
-
* @description id of the uploaded file
|
|
400
|
-
* @example
|
|
401
|
-
* ```ts
|
|
402
|
-
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
403
|
-
*
|
|
404
|
-
* const id = ObjectId.generate(ObjectType.File).toString()
|
|
405
|
-
* ```
|
|
406
|
-
*/
|
|
407
204
|
idFrontImage: string;
|
|
408
|
-
/**
|
|
409
|
-
* @description id of the uploaded file
|
|
410
|
-
* @example
|
|
411
|
-
* ```ts
|
|
412
|
-
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
413
|
-
*
|
|
414
|
-
* const id = ObjectId.generate(ObjectType.File).toString()
|
|
415
|
-
* ```
|
|
416
|
-
*/
|
|
417
205
|
selfieImage: string;
|
|
418
|
-
/**
|
|
419
|
-
* @validation
|
|
420
|
-
* - _min_: `2`
|
|
421
|
-
* - _max_: `120`
|
|
422
|
-
*/
|
|
423
206
|
address: string;
|
|
424
|
-
/**
|
|
425
|
-
* @validation
|
|
426
|
-
* - _min_: `2`
|
|
427
|
-
* - _max_: `120`
|
|
428
|
-
*/
|
|
429
207
|
permanentAddress: string;
|
|
430
|
-
/**
|
|
431
|
-
* @validation
|
|
432
|
-
* - _min_: `2`
|
|
433
|
-
* - _max_: `120`
|
|
434
|
-
*/
|
|
435
208
|
sourceOfIncome: string;
|
|
436
|
-
/**
|
|
437
|
-
* @validation
|
|
438
|
-
* - _min_: `2`
|
|
439
|
-
* - _max_: `120`
|
|
440
|
-
*/
|
|
441
209
|
natureOfWork: string;
|
|
442
|
-
/**
|
|
443
|
-
* @validation
|
|
444
|
-
* - _min_: `2`
|
|
445
|
-
* - _max_: `20`
|
|
446
|
-
*/
|
|
447
210
|
nationality: string;
|
|
448
|
-
/**
|
|
449
|
-
* @validation
|
|
450
|
-
* - _min_: `2`
|
|
451
|
-
* - _max_: `120`
|
|
452
|
-
*/
|
|
453
211
|
placeOfBirth: string;
|
|
454
212
|
}
|
|
455
213
|
export type SubmitVerificationError = UnionAlias<Internal.CreateMemberVerificationError>;
|
|
@@ -545,18 +303,7 @@ export type GameSession = {
|
|
|
545
303
|
};
|
|
546
304
|
export type GameSessionReturn = OperationResult<never, GameSession | null>;
|
|
547
305
|
export interface CreateGameSessionInput {
|
|
548
|
-
/**
|
|
549
|
-
* @example
|
|
550
|
-
* ```ts
|
|
551
|
-
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
552
|
-
*
|
|
553
|
-
* const id = ObjectId.generate(ObjectType.GameSession).toString()
|
|
554
|
-
* ```
|
|
555
|
-
*/
|
|
556
306
|
id?: string;
|
|
557
|
-
/**
|
|
558
|
-
* @description id of the game
|
|
559
|
-
*/
|
|
560
307
|
game: `SPORTS:${Extract<GameProvider, 'BTI'>}` | (string & {});
|
|
561
308
|
}
|
|
562
309
|
export type CreateGameSessionError = UnionAlias<Internal.CreateGameSessionError>;
|
|
@@ -754,54 +501,21 @@ export type Deposit = GCashDeposit | MayaDeposit | MayaAppDeposit | BankDeposit
|
|
|
754
501
|
export type DepositReturn = OperationResult<never, Deposit | null>;
|
|
755
502
|
export type DepositsCountReturn = OperationResult<never, number>;
|
|
756
503
|
export interface CreateMayaDepositInput {
|
|
757
|
-
/**
|
|
758
|
-
* @example
|
|
759
|
-
* ```ts
|
|
760
|
-
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
761
|
-
*
|
|
762
|
-
* const id = ObjectId.generate(ObjectType.Deposit).toString()
|
|
763
|
-
* ```
|
|
764
|
-
*/
|
|
765
504
|
id?: string;
|
|
766
505
|
type: 'MAYA';
|
|
767
506
|
amount: number;
|
|
768
|
-
/**
|
|
769
|
-
* @description id of the promo
|
|
770
|
-
*/
|
|
771
507
|
promo?: string;
|
|
772
508
|
}
|
|
773
509
|
export interface CreateGCashDepositInput {
|
|
774
|
-
/**
|
|
775
|
-
* @example
|
|
776
|
-
* ```ts
|
|
777
|
-
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
778
|
-
*
|
|
779
|
-
* const id = ObjectId.generate(ObjectType.Deposit).toString()
|
|
780
|
-
* ```
|
|
781
|
-
*/
|
|
782
510
|
id?: string;
|
|
783
511
|
type: 'GCASH';
|
|
784
512
|
amount: number;
|
|
785
|
-
/**
|
|
786
|
-
* @description id of the promo
|
|
787
|
-
*/
|
|
788
513
|
promo?: string;
|
|
789
514
|
}
|
|
790
515
|
export interface CreateMayaAppDepositInput {
|
|
791
|
-
/**
|
|
792
|
-
* @example
|
|
793
|
-
* ```ts
|
|
794
|
-
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
795
|
-
*
|
|
796
|
-
* const id = ObjectId.generate(ObjectType.Deposit).toString()
|
|
797
|
-
* ```
|
|
798
|
-
*/
|
|
799
516
|
id?: string;
|
|
800
517
|
type: 'MAYA_APP';
|
|
801
518
|
amount: number;
|
|
802
|
-
/**
|
|
803
|
-
* @description id of the promo
|
|
804
|
-
*/
|
|
805
519
|
promo?: string;
|
|
806
520
|
}
|
|
807
521
|
export type CreateDepositInput = CreateMayaDepositInput | CreateGCashDepositInput | CreateMayaAppDepositInput;
|
|
@@ -856,107 +570,29 @@ export interface WithdrawalRecordsInput extends Internal.WithdrawalRecordsQueryV
|
|
|
856
570
|
export type WithdrawalRecordsReturn = OperationResult<never, PaginatedQueryResult<'withdrawalRecords', WithdrawalRecord>>;
|
|
857
571
|
export type RemainingDailyWithdrawalsCountReturn = OperationResult<never, number>;
|
|
858
572
|
export interface CreateBankWithdrawalInput {
|
|
859
|
-
/**
|
|
860
|
-
* @example
|
|
861
|
-
* ```ts
|
|
862
|
-
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
863
|
-
*
|
|
864
|
-
* const id = ObjectId.generate(ObjectType.Withdrawal).toString()
|
|
865
|
-
* ```
|
|
866
|
-
*/
|
|
867
573
|
id?: string;
|
|
868
574
|
type: 'BANK';
|
|
869
575
|
amount: number;
|
|
870
|
-
/**
|
|
871
|
-
* @validation
|
|
872
|
-
* - _min_: `8`
|
|
873
|
-
* - _max_: `30`
|
|
874
|
-
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
875
|
-
*/
|
|
876
576
|
transactionPassword: string;
|
|
877
577
|
}
|
|
878
578
|
export interface CreateGCashWithdrawalInput {
|
|
879
|
-
/**
|
|
880
|
-
* @example
|
|
881
|
-
* ```ts
|
|
882
|
-
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
883
|
-
*
|
|
884
|
-
* const id = ObjectId.generate(ObjectType.Withdrawal).toString()
|
|
885
|
-
* ```
|
|
886
|
-
*/
|
|
887
579
|
id?: string;
|
|
888
580
|
type: 'GCASH';
|
|
889
581
|
amount: number;
|
|
890
|
-
/**
|
|
891
|
-
* @validation
|
|
892
|
-
* - _min_: `8`
|
|
893
|
-
* - _max_: `30`
|
|
894
|
-
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
895
|
-
*/
|
|
896
582
|
transactionPassword: string;
|
|
897
|
-
/**
|
|
898
|
-
* @validation
|
|
899
|
-
* - _pattern_: /^(\+?63|0)?9\d{9}$/
|
|
900
|
-
*
|
|
901
|
-
* @example
|
|
902
|
-
* ```bash
|
|
903
|
-
* +639190000000
|
|
904
|
-
* 09190000000
|
|
905
|
-
* 9190000000
|
|
906
|
-
* ```
|
|
907
|
-
*/
|
|
908
583
|
recipientMobileNumber: string;
|
|
909
584
|
}
|
|
910
585
|
export interface CreateMayaWithdrawalInput {
|
|
911
|
-
/**
|
|
912
|
-
* @example
|
|
913
|
-
* ```ts
|
|
914
|
-
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
915
|
-
*
|
|
916
|
-
* const id = ObjectId.generate(ObjectType.Withdrawal).toString()
|
|
917
|
-
* ```
|
|
918
|
-
*/
|
|
919
586
|
id?: string;
|
|
920
587
|
type: 'MAYA';
|
|
921
588
|
amount: number;
|
|
922
|
-
/**
|
|
923
|
-
* @validation
|
|
924
|
-
* - _min_: `8`
|
|
925
|
-
* - _max_: `30`
|
|
926
|
-
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
927
|
-
*/
|
|
928
589
|
transactionPassword: string;
|
|
929
|
-
/**
|
|
930
|
-
* @validation
|
|
931
|
-
* - _pattern_: /^(\+?63|0)?9\d{9}$/
|
|
932
|
-
*
|
|
933
|
-
* @example
|
|
934
|
-
* ```bash
|
|
935
|
-
* +639190000000
|
|
936
|
-
* 09190000000
|
|
937
|
-
* 9190000000
|
|
938
|
-
* ```
|
|
939
|
-
*/
|
|
940
590
|
recipientMobileNumber: string;
|
|
941
591
|
}
|
|
942
592
|
export interface CreateMayaAppWithdrawalInput {
|
|
943
|
-
/**
|
|
944
|
-
* @example
|
|
945
|
-
* ```ts
|
|
946
|
-
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
947
|
-
*
|
|
948
|
-
* const id = ObjectId.generate(ObjectType.Withdrawal).toString()
|
|
949
|
-
* ```
|
|
950
|
-
*/
|
|
951
593
|
id?: string;
|
|
952
594
|
type: 'MAYA_APP';
|
|
953
595
|
amount: number;
|
|
954
|
-
/**
|
|
955
|
-
* @validation
|
|
956
|
-
* - _min_: `8`
|
|
957
|
-
* - _max_: `30`
|
|
958
|
-
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
959
|
-
*/
|
|
960
596
|
transactionPassword: string;
|
|
961
597
|
}
|
|
962
598
|
export type CreateWithdrawalInput = CreateBankWithdrawalInput | CreateGCashWithdrawalInput | CreateMayaWithdrawalInput | CreateMayaAppWithdrawalInput;
|
|
@@ -1095,12 +731,6 @@ export interface Site {
|
|
|
1095
731
|
}
|
|
1096
732
|
export type SiteReturn = OperationResult<never, Site>;
|
|
1097
733
|
export interface UpdateReferralCodeInput {
|
|
1098
|
-
/**
|
|
1099
|
-
* @validation
|
|
1100
|
-
* - _min_: `4`
|
|
1101
|
-
* - _max_: `12`
|
|
1102
|
-
* - _pattern_: `/^[A-Z0-9]+$/`
|
|
1103
|
-
*/
|
|
1104
734
|
code: string;
|
|
1105
735
|
}
|
|
1106
736
|
export type UpdateReferralCodeError = UnionAlias<Internal.UpdateReferralCodeError>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GraphQLClient } from '../utils/graphql-client';
|
|
2
2
|
import { OperationResult } from '../utils/types';
|
|
3
|
-
import { Announcement, AnnouncementsQueryVariables, CreateMemberVerificationError, CreateMemberVerificationMutationVariables, DeleteMemberAccountMutationVariables, MemberAccount, MemberVerification, PaginatedQueryResult, Platform, ProfileCompletion, RegisterMayaMemberAccountError, RegisterMayaMemberAccountMutationVariables, RegisterMemberAccountError, RegisterMemberAccountMutationVariables, RegisterMemberAccountMutationVariables__Next, ResetPasswordError, ResetPasswordMutationVariables, SendVerificationCodeError, SendVerificationCodeMutationVariables, UpdateMemberAccountError, UpdateMemberAccountMutationVariables, UpdateMemberVerificationError, UpdateMemberVerificationMutationVariables, UpdateReferralCodeError, UpdateReferralCodeMutationVariables, VerifyMobileNumberError, VerifyMobileNumberMutationVariables } from './types';
|
|
3
|
+
import { Announcement, AnnouncementsQueryVariables, CreateMemberVerificationError, CreateMemberVerificationMutationVariables, DeleteMemberAccountMutationVariables, MemberAccount, MemberVerification, PaginatedQueryResult, Platform, ProfileCompletion, RegisterMayaMemberAccountError, RegisterMayaMemberAccountMutationVariables, RegisterMemberAccountError, RegisterMemberAccountMutationVariables, RegisterMemberAccountMutationVariables__Next, RegisterMemberAccountViaMobileMutationVariables, ResetPasswordError, ResetPasswordMutationVariables, SendVerificationCodeError, SendVerificationCodeMutationVariables, UpdateMemberAccountError, UpdateMemberAccountMutationVariables, UpdateMemberVerificationError, UpdateMemberVerificationMutationVariables, UpdateReferralCodeError, UpdateReferralCodeMutationVariables, VerifyMobileNumberError, VerifyMobileNumberMutationVariables } from './types';
|
|
4
4
|
|
|
5
5
|
export declare class AccountService {
|
|
6
6
|
private client;
|
|
@@ -8,6 +8,7 @@ export declare class AccountService {
|
|
|
8
8
|
/** aka `Query.self` */
|
|
9
9
|
memberAccount(): Promise<OperationResult<never, MemberAccount>>;
|
|
10
10
|
registerMemberAccount(variables: RegisterMemberAccountMutationVariables): Promise<OperationResult<RegisterMemberAccountError>>;
|
|
11
|
+
registerMemberAccountViaMobile(variables: RegisterMemberAccountViaMobileMutationVariables): Promise<OperationResult<RegisterMemberAccountError>>;
|
|
11
12
|
registerMemberAccount__next(variables: RegisterMemberAccountMutationVariables__Next): Promise<OperationResult<RegisterMemberAccountError>>;
|
|
12
13
|
updateMemberAccount(variables: UpdateMemberAccountMutationVariables): Promise<OperationResult<UpdateMemberAccountError>>;
|
|
13
14
|
deleteMemberAccount(variables: DeleteMemberAccountMutationVariables): Promise<OperationResult>;
|
|
@@ -15,9 +15,5 @@ export declare class AuthService {
|
|
|
15
15
|
refreshSession(refreshToken: string): Promise<OperationResult<RefreshSessionError, RefreshSessionMutation>>;
|
|
16
16
|
destroySession(accessToken: string): Promise<OperationResult>;
|
|
17
17
|
verifySession(accessToken: string): Promise<boolean>;
|
|
18
|
-
/**
|
|
19
|
-
* @deprecated use `sendOtp`
|
|
20
|
-
*/
|
|
21
18
|
sendVerificationCode(mobileNumber: string): Promise<OperationResult>;
|
|
22
|
-
sendVerificationCode__next(mobileNumber: string): Promise<OperationResult>;
|
|
23
19
|
}
|
|
@@ -44,6 +44,7 @@ export declare const MEMBER_QUERY: string;
|
|
|
44
44
|
export declare const MEMBER_ACCOUNT_QUERY: string;
|
|
45
45
|
export declare const MEMBER_VERIFICATION_QUERY: string;
|
|
46
46
|
export declare const REGISTER_MEMBER_ACCOUNT_MUTATION: string;
|
|
47
|
+
export declare const REGISTER_MEMBER_ACCOUNT_VIA_MOBILE_MUTATION: string;
|
|
47
48
|
export declare const REGISTER_MEMBER_ACCOUNT_MUTATION__NEXT: string;
|
|
48
49
|
export declare const REGISTER_MAYA_MEMBER_ACCOUNT_MUTATION: string;
|
|
49
50
|
export declare const UPDATE_MEMBER_ACCOUNT_MUTATION: string;
|
package/dist/services/types.d.ts
CHANGED
|
@@ -686,16 +686,30 @@ export interface RegisterMemberAccountMutationVariables {
|
|
|
686
686
|
domain?: string;
|
|
687
687
|
btag?: string;
|
|
688
688
|
};
|
|
689
|
+
referralCode?: string;
|
|
689
690
|
verificationCode?: string;
|
|
690
691
|
reCAPTCHAResponse?: string;
|
|
692
|
+
}
|
|
693
|
+
export interface RegisterMemberAccountViaMobileMutation {
|
|
694
|
+
registerMemberAccountViaMobile?: null | {
|
|
695
|
+
__typename: RegisterMemberAccountError;
|
|
696
|
+
};
|
|
697
|
+
}
|
|
698
|
+
export interface RegisterMemberAccountViaMobileMutationVariables {
|
|
699
|
+
input: {
|
|
700
|
+
id: string;
|
|
701
|
+
mobileNumber: string;
|
|
702
|
+
};
|
|
691
703
|
referralCode?: string;
|
|
704
|
+
verificationCode?: string;
|
|
705
|
+
reCAPTCHAResponse?: string;
|
|
692
706
|
}
|
|
693
707
|
export interface RegisterMemberAccountMutationVariables__Next {
|
|
694
708
|
input: {
|
|
695
709
|
id: string;
|
|
696
710
|
name: string;
|
|
697
711
|
password: string;
|
|
698
|
-
mobileNumber
|
|
712
|
+
mobileNumber?: string;
|
|
699
713
|
};
|
|
700
714
|
reCAPTCHAResponse?: string;
|
|
701
715
|
}
|
|
@@ -875,19 +889,19 @@ export type CreateSessionInput = {
|
|
|
875
889
|
name: string;
|
|
876
890
|
password: string;
|
|
877
891
|
mobileNumber?: never;
|
|
878
|
-
|
|
892
|
+
verificationCode?: never;
|
|
879
893
|
sessionId?: never;
|
|
880
894
|
} | {
|
|
881
895
|
name?: never;
|
|
882
896
|
password?: never;
|
|
883
897
|
mobileNumber: string;
|
|
884
|
-
|
|
898
|
+
verificationCode: string;
|
|
885
899
|
sessionId?: never;
|
|
886
900
|
} | {
|
|
887
901
|
name?: never;
|
|
888
902
|
password?: never;
|
|
889
903
|
mobileNumber?: never;
|
|
890
|
-
|
|
904
|
+
verificationCode?: never;
|
|
891
905
|
sessionId: string;
|
|
892
906
|
};
|
|
893
907
|
export type Authenticator = {
|