@opexa/portal-sdk 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/README.md +1591 -0
- package/dist/graphql/account.service.d.ts +24 -0
- package/dist/graphql/announcement.d.ts +29 -0
- package/dist/graphql/auth.service.d.ts +16 -0
- package/dist/graphql/bet-record.d.ts +71 -0
- package/dist/graphql/bonus.d.ts +43 -0
- package/dist/graphql/cashback.d.ts +22 -0
- package/dist/graphql/deposit.d.ts +94 -0
- package/dist/graphql/file.d.ts +38 -0
- package/dist/graphql/file.service.d.ts +11 -0
- package/dist/graphql/game.d.ts +84 -0
- package/dist/graphql/game.service.d.ts +14 -0
- package/dist/graphql/index.d.ts +23 -0
- package/dist/graphql/member.d.ts +182 -0
- package/dist/graphql/platform.d.ts +38 -0
- package/dist/graphql/points.d.ts +22 -0
- package/dist/graphql/portal.service.d.ts +9 -0
- package/dist/graphql/promo.d.ts +35 -0
- package/dist/graphql/report.service.d.ts +18 -0
- package/dist/graphql/session.d.ts +25 -0
- package/dist/graphql/static.service.d.ts +12 -0
- package/dist/graphql/transaction.d.ts +26 -0
- package/dist/graphql/types.d.ts +93 -0
- package/dist/graphql/wallet.d.ts +14 -0
- package/dist/graphql/wallet.service.d.ts +30 -0
- package/dist/graphql/withdrawal.d.ts +106 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1007 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2916 -0
- package/dist/index.mjs.map +1 -0
- package/dist/logger.d.ts +15 -0
- package/dist/object-id.d.ts +1 -0
- package/dist/object-type.d.ts +9 -0
- package/dist/sdk.d.ts +228 -0
- package/dist/session-service.d.ts +25 -0
- package/dist/transformer.d.ts +52 -0
- package/dist/types.d.ts +839 -0
- package/dist/utils/add-days.d.ts +1 -0
- package/dist/utils/add-minutes.d.ts +1 -0
- package/dist/utils/clone-date.d.ts +1 -0
- package/dist/utils/gql.d.ts +1 -0
- package/dist/utils/graphql-client.d.ts +29 -0
- package/dist/utils/http-error.d.ts +6 -0
- package/dist/utils/is-after.d.ts +4 -0
- package/dist/utils/parse-decimal.d.ts +2 -0
- package/dist/utils/sha256.d.ts +1 -0
- package/dist/utils/sub-minutes.d.ts +1 -0
- package/dist/utils/types.d.ts +5 -0
- package/package.json +81 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,839 @@
|
|
|
1
|
+
import { HttpError } from './utils/http-error';
|
|
2
|
+
import type * as Internal from './graphql';
|
|
3
|
+
type WithCursor<T> = T & {
|
|
4
|
+
cursor: string;
|
|
5
|
+
};
|
|
6
|
+
type PaginatedQueryResult<K extends string, T> = Record<K, Array<WithCursor<T>>> & ({
|
|
7
|
+
totalCount: number;
|
|
8
|
+
hasNextPage: false;
|
|
9
|
+
nextCursor?: never;
|
|
10
|
+
} | {
|
|
11
|
+
totalCount: number;
|
|
12
|
+
hasNextPage: true;
|
|
13
|
+
nextCursor: string;
|
|
14
|
+
});
|
|
15
|
+
export type UnknownError = Internal.UnknownError;
|
|
16
|
+
interface SignIn__NameAndPassword {
|
|
17
|
+
name: string;
|
|
18
|
+
password: string;
|
|
19
|
+
mobileNumber?: never;
|
|
20
|
+
verificationCode?: never;
|
|
21
|
+
}
|
|
22
|
+
interface SignIn__MobileNumber {
|
|
23
|
+
name?: never;
|
|
24
|
+
password?: never;
|
|
25
|
+
mobileNumber: string;
|
|
26
|
+
verificationCode: string;
|
|
27
|
+
}
|
|
28
|
+
export type SignInInput = SignIn__MobileNumber | SignIn__NameAndPassword;
|
|
29
|
+
export type SignInError = Internal.CreateSessionError;
|
|
30
|
+
export type SignInReturn = Internal.OperationResult<SignInError>;
|
|
31
|
+
export interface Session {
|
|
32
|
+
id: string;
|
|
33
|
+
dateTimeCreated: Date;
|
|
34
|
+
}
|
|
35
|
+
export type SessionReturn = Internal.OperationResult<never, Session | null>;
|
|
36
|
+
export interface File__UploadingOrFailed {
|
|
37
|
+
id: string;
|
|
38
|
+
url?: never;
|
|
39
|
+
status: 'UPLOADING' | 'FAILED';
|
|
40
|
+
dateTimeCreated: Date;
|
|
41
|
+
}
|
|
42
|
+
export interface File__Ready {
|
|
43
|
+
id: string;
|
|
44
|
+
url: string;
|
|
45
|
+
status: 'READY';
|
|
46
|
+
dateTimeCreated: Date;
|
|
47
|
+
}
|
|
48
|
+
export interface File__Deleted {
|
|
49
|
+
id: string;
|
|
50
|
+
url?: string;
|
|
51
|
+
status: 'DELETED';
|
|
52
|
+
dateTimeCreated: Date;
|
|
53
|
+
}
|
|
54
|
+
export type File = File__UploadingOrFailed | File__Ready | File__Deleted;
|
|
55
|
+
export type FileReturn = Internal.OperationResult<never, File | null>;
|
|
56
|
+
export interface UploadImageFileInput {
|
|
57
|
+
/**
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
61
|
+
*
|
|
62
|
+
* const id = ObjectId.generate(ObjectType.File).toString()
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
65
|
+
id?: string;
|
|
66
|
+
/**
|
|
67
|
+
* @validation
|
|
68
|
+
*
|
|
69
|
+
* - _type_: `image/png`, `image/jpg`, `image/jpeg`,
|
|
70
|
+
* - _max file size_: `10MB`
|
|
71
|
+
* - _max name length (excluding extension)_: `52`
|
|
72
|
+
*/
|
|
73
|
+
file: globalThis.File;
|
|
74
|
+
}
|
|
75
|
+
export type UploadImageFileError = Internal.UploadPrivateImageFileError;
|
|
76
|
+
export type UploadImageFileReturn = Internal.OperationResult<UploadImageFileError, {
|
|
77
|
+
id: string;
|
|
78
|
+
}>;
|
|
79
|
+
export type AccountStatus = Internal.MemberAccountStatus;
|
|
80
|
+
export type AccountVerificationStatus = Internal.MemberAccountVerificationStatus;
|
|
81
|
+
export interface Account {
|
|
82
|
+
id: string;
|
|
83
|
+
name: string;
|
|
84
|
+
status: AccountStatus;
|
|
85
|
+
realName?: string;
|
|
86
|
+
nickName?: string;
|
|
87
|
+
dateOfBirth?: Date;
|
|
88
|
+
validId?: string;
|
|
89
|
+
emailAddress?: string;
|
|
90
|
+
mobileNumber?: string;
|
|
91
|
+
verified: boolean;
|
|
92
|
+
verificationStatus: AccountVerificationStatus;
|
|
93
|
+
mobileNumberVerified: boolean;
|
|
94
|
+
mobileNumberVerificationRequired: boolean;
|
|
95
|
+
transactionPassword: boolean;
|
|
96
|
+
dateTimeLastActive?: Date;
|
|
97
|
+
dateTimeCreated: Date;
|
|
98
|
+
dateTimeLastUpdated: Date;
|
|
99
|
+
}
|
|
100
|
+
export type AccountReturn = Internal.OperationResult<never, Account>;
|
|
101
|
+
export type VerificationDetailsStatus = Internal.MemberVerificationStatus;
|
|
102
|
+
export interface VerificationDetails {
|
|
103
|
+
id: string;
|
|
104
|
+
status: VerificationDetailsStatus;
|
|
105
|
+
address: string;
|
|
106
|
+
sourceOfIncome: string;
|
|
107
|
+
natureOfWork: string;
|
|
108
|
+
nationality: string;
|
|
109
|
+
placeOfBirth: string;
|
|
110
|
+
idFrontImage: File;
|
|
111
|
+
selfieImage: File;
|
|
112
|
+
}
|
|
113
|
+
export type VerificationDetailsReturn = Internal.OperationResult<never, VerificationDetails | null>;
|
|
114
|
+
export interface ProfileCompletion {
|
|
115
|
+
completionPercentage: number;
|
|
116
|
+
personalInformation: boolean;
|
|
117
|
+
accountVerification: boolean;
|
|
118
|
+
mobileNumberVerification: boolean;
|
|
119
|
+
transactionPassword: boolean;
|
|
120
|
+
accountPassword: boolean;
|
|
121
|
+
}
|
|
122
|
+
export type ProfileCompletionReturn = Internal.OperationResult<never, ProfileCompletion>;
|
|
123
|
+
export interface CreateAccountInput {
|
|
124
|
+
/**
|
|
125
|
+
* @example
|
|
126
|
+
* ```ts
|
|
127
|
+
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
128
|
+
*
|
|
129
|
+
* const id = ObjectId.generate(ObjectType.Account).toString()
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
132
|
+
id?: string;
|
|
133
|
+
/**
|
|
134
|
+
* @validation
|
|
135
|
+
* - _min_: `8`
|
|
136
|
+
* - _max_: `30`
|
|
137
|
+
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
138
|
+
*/
|
|
139
|
+
name: string;
|
|
140
|
+
/**
|
|
141
|
+
* @validation
|
|
142
|
+
* - _min_: `8`
|
|
143
|
+
* - _max_: `30`
|
|
144
|
+
*/
|
|
145
|
+
password: string;
|
|
146
|
+
/**
|
|
147
|
+
* @validation
|
|
148
|
+
* - _pattern_: /^(\+?63|0)?9\d{9}$/
|
|
149
|
+
*
|
|
150
|
+
* @example
|
|
151
|
+
* ```bash
|
|
152
|
+
* +639190000000
|
|
153
|
+
* 09190000000
|
|
154
|
+
* 9190000000
|
|
155
|
+
* ```
|
|
156
|
+
*/
|
|
157
|
+
mobileNumber: string;
|
|
158
|
+
/**
|
|
159
|
+
* @validation
|
|
160
|
+
* - _format_: `date`
|
|
161
|
+
* - _min_: `21 (years)`
|
|
162
|
+
*/
|
|
163
|
+
dateOfBirth: Date | string;
|
|
164
|
+
/**
|
|
165
|
+
* @validation
|
|
166
|
+
* - _format_: `url`
|
|
167
|
+
*/
|
|
168
|
+
domain?: string;
|
|
169
|
+
/**
|
|
170
|
+
* @validation
|
|
171
|
+
* - _min_: `4`
|
|
172
|
+
* - _max_: `10`
|
|
173
|
+
* - _pattern_: `/^\d{4,10}$/`
|
|
174
|
+
*/
|
|
175
|
+
verificationCode?: string;
|
|
176
|
+
reCAPTCHAResponse?: string;
|
|
177
|
+
}
|
|
178
|
+
export type CreateAccountError = Internal.RegisterMemberAccountError;
|
|
179
|
+
export type CreateAccountReturn = Internal.OperationResult<CreateAccountError, {
|
|
180
|
+
id: string;
|
|
181
|
+
}>;
|
|
182
|
+
export interface UpdateAccountInput {
|
|
183
|
+
/**
|
|
184
|
+
* @validation
|
|
185
|
+
* - _min_: `8`
|
|
186
|
+
* - _max_: `30`
|
|
187
|
+
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
188
|
+
*/
|
|
189
|
+
name?: string;
|
|
190
|
+
/**
|
|
191
|
+
* @validation
|
|
192
|
+
* - _pattern_: /^(\+?63|0)?9\d{9}$/
|
|
193
|
+
*
|
|
194
|
+
* @example
|
|
195
|
+
* ```bash
|
|
196
|
+
* +639190000000
|
|
197
|
+
* 09190000000
|
|
198
|
+
* 9190000000
|
|
199
|
+
* ```
|
|
200
|
+
*/
|
|
201
|
+
password?: string;
|
|
202
|
+
/**
|
|
203
|
+
* @validation
|
|
204
|
+
* - _format_: `email`
|
|
205
|
+
*/
|
|
206
|
+
emailAddress?: string;
|
|
207
|
+
/**
|
|
208
|
+
* @validation
|
|
209
|
+
* - _pattern_: /^(\+?63|0)?9\d{9}$/
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* ```bash
|
|
213
|
+
* +639190000000
|
|
214
|
+
* 09190000000
|
|
215
|
+
* 9190000000
|
|
216
|
+
* ```
|
|
217
|
+
*/
|
|
218
|
+
mobileNumber?: string;
|
|
219
|
+
/**
|
|
220
|
+
* @validation
|
|
221
|
+
* - _max_: `240`
|
|
222
|
+
*/
|
|
223
|
+
realName?: string;
|
|
224
|
+
/**
|
|
225
|
+
* @validation
|
|
226
|
+
* - _min_: `2`
|
|
227
|
+
* - _max_: `30`
|
|
228
|
+
* - _pattern_: `/^[a-z]{2,30}$/i`
|
|
229
|
+
*/
|
|
230
|
+
nickName?: string;
|
|
231
|
+
validId?: string;
|
|
232
|
+
/**
|
|
233
|
+
* @validation
|
|
234
|
+
* - _min_: `8`
|
|
235
|
+
* - _max_: `30`
|
|
236
|
+
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
237
|
+
*/
|
|
238
|
+
transactionPassword?: string;
|
|
239
|
+
}
|
|
240
|
+
export type UpdateAccountError = Internal.UpdateMemberAccountError;
|
|
241
|
+
export type UpdateAccountReturn = Internal.OperationResult<UpdateAccountError>;
|
|
242
|
+
export type DeleteAccountReturn = Internal.OperationResult<UnknownError>;
|
|
243
|
+
export interface ResetPasswordInput {
|
|
244
|
+
/**
|
|
245
|
+
* @validation
|
|
246
|
+
* - _pattern_: /^(\+?63|0)?9\d{9}$/
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* ```bash
|
|
250
|
+
* +639190000000
|
|
251
|
+
* 09190000000
|
|
252
|
+
* 9190000000
|
|
253
|
+
* ```
|
|
254
|
+
*/
|
|
255
|
+
mobileNumber: string;
|
|
256
|
+
/**
|
|
257
|
+
* @validation
|
|
258
|
+
* - _min_: `8`
|
|
259
|
+
* - _max_: `30`
|
|
260
|
+
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
261
|
+
*/
|
|
262
|
+
newPassword: string;
|
|
263
|
+
/**
|
|
264
|
+
* @validation
|
|
265
|
+
* - _min_: `4`
|
|
266
|
+
* - _max_: `10`
|
|
267
|
+
* - _pattern_: `/^\d{4,10}$/`
|
|
268
|
+
*/
|
|
269
|
+
verificationCode: string;
|
|
270
|
+
}
|
|
271
|
+
export type ResetPasswordError = Internal.ResetPasswordError;
|
|
272
|
+
export type ResetPasswordReturn = Internal.OperationResult<ResetPasswordError>;
|
|
273
|
+
export interface SubmitVerificationDetailsInput {
|
|
274
|
+
/**
|
|
275
|
+
* @example
|
|
276
|
+
* ```ts
|
|
277
|
+
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
278
|
+
*
|
|
279
|
+
* const id = ObjectId.generate(ObjectType.Verification).toString()
|
|
280
|
+
* ```
|
|
281
|
+
*/
|
|
282
|
+
id?: string;
|
|
283
|
+
/**
|
|
284
|
+
* @description id of the uploaded file
|
|
285
|
+
* @example
|
|
286
|
+
* ```ts
|
|
287
|
+
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
288
|
+
*
|
|
289
|
+
* const id = ObjectId.generate(ObjectType.File).toString()
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
idFrontImage: string;
|
|
293
|
+
/**
|
|
294
|
+
* @description id of the uploaded file
|
|
295
|
+
* @example
|
|
296
|
+
* ```ts
|
|
297
|
+
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
298
|
+
*
|
|
299
|
+
* const id = ObjectId.generate(ObjectType.File).toString()
|
|
300
|
+
* ```
|
|
301
|
+
*/
|
|
302
|
+
selfieImage: string;
|
|
303
|
+
/**
|
|
304
|
+
* @validation
|
|
305
|
+
* - _min_: `2`
|
|
306
|
+
* - _max_: `120`
|
|
307
|
+
*/
|
|
308
|
+
address: string;
|
|
309
|
+
/**
|
|
310
|
+
* @validation
|
|
311
|
+
* - _min_: `2`
|
|
312
|
+
* - _max_: `120`
|
|
313
|
+
*/
|
|
314
|
+
sourceOfIncome: string;
|
|
315
|
+
/**
|
|
316
|
+
* @validation
|
|
317
|
+
* - _min_: `2`
|
|
318
|
+
* - _max_: `120`
|
|
319
|
+
*/
|
|
320
|
+
natureOfWork: string;
|
|
321
|
+
/**
|
|
322
|
+
* @validation
|
|
323
|
+
* - _min_: `2`
|
|
324
|
+
* - _max_: `20`
|
|
325
|
+
*/
|
|
326
|
+
nationality: string;
|
|
327
|
+
/**
|
|
328
|
+
* @validation
|
|
329
|
+
* - _min_: `2`
|
|
330
|
+
* - _max_: `120`
|
|
331
|
+
*/
|
|
332
|
+
placeOfBirth: string;
|
|
333
|
+
}
|
|
334
|
+
export type SubmitVerificationError = Internal.CreateMemberVerificationError;
|
|
335
|
+
export type SubmitVerificationDetailsReturn = Internal.OperationResult<SubmitVerificationError, {
|
|
336
|
+
id: string;
|
|
337
|
+
}>;
|
|
338
|
+
export interface UpdateVerificationDetailsInput extends Partial<Omit<SubmitVerificationDetailsInput, 'id'>> {
|
|
339
|
+
}
|
|
340
|
+
export type UpdateVerificationError = Internal.UpdateMemberVerificationError;
|
|
341
|
+
export type UpdateVerificationDetailsReturn = Internal.OperationResult<UpdateVerificationError>;
|
|
342
|
+
export type SendVerificationCodeError = Internal.SendVerificationCodeError;
|
|
343
|
+
export type SendVerificationCodeReturn = Internal.OperationResult<SendVerificationCodeError>;
|
|
344
|
+
export type VerifyMobileNumberError = Internal.VerifyMobileNumberError;
|
|
345
|
+
export type VerifyMobileNumberReturn = Internal.OperationResult<VerifyMobileNumberError>;
|
|
346
|
+
export type Currency = Internal.Currency;
|
|
347
|
+
export interface Wallet {
|
|
348
|
+
id: string;
|
|
349
|
+
balance: number;
|
|
350
|
+
currency: Currency;
|
|
351
|
+
dateTimeCreated: Date;
|
|
352
|
+
dateTimeLastUpdated: Date;
|
|
353
|
+
}
|
|
354
|
+
export type WalletReturn = Internal.OperationResult<never, Wallet | null>;
|
|
355
|
+
export interface PointsWallet {
|
|
356
|
+
id: string;
|
|
357
|
+
points: number;
|
|
358
|
+
account: string;
|
|
359
|
+
dateTimeCreated: Date;
|
|
360
|
+
}
|
|
361
|
+
export type PointsWalletReturn = Internal.OperationResult<never, PointsWallet | null>;
|
|
362
|
+
export type PointsToCashConversionError = Internal.PointsToCashConversionError;
|
|
363
|
+
export type PointsToCashConversionReturn = Internal.OperationResult<PointsToCashConversionError>;
|
|
364
|
+
export type GameType = Internal.GameType;
|
|
365
|
+
export type GameProvider = Internal.GameProvider;
|
|
366
|
+
export type GameProvider__Next = Internal.GameProvider__Next;
|
|
367
|
+
export type GameSessionStatus = Internal.GameSessionStatus;
|
|
368
|
+
export interface Game {
|
|
369
|
+
id: string;
|
|
370
|
+
name: string;
|
|
371
|
+
type: GameType;
|
|
372
|
+
image: string;
|
|
373
|
+
provider: GameProvider;
|
|
374
|
+
}
|
|
375
|
+
export interface GamesInput {
|
|
376
|
+
after?: string;
|
|
377
|
+
first?: number;
|
|
378
|
+
filter?: {
|
|
379
|
+
id?: Internal.ObjectIdFilterField;
|
|
380
|
+
name?: Internal.StringFilterField;
|
|
381
|
+
type?: Internal.EnumFilterField<GameType>;
|
|
382
|
+
provider?: Internal.EnumFilterField<Exclude<GameProvider, GameProvider__Next>>;
|
|
383
|
+
};
|
|
384
|
+
}
|
|
385
|
+
export interface GamesInput__Next {
|
|
386
|
+
after?: string;
|
|
387
|
+
first?: number;
|
|
388
|
+
filter?: {
|
|
389
|
+
id?: Internal.ObjectIdFilterField;
|
|
390
|
+
name?: Internal.StringFilterField;
|
|
391
|
+
type?: Internal.EnumFilterField<GameType>;
|
|
392
|
+
provider?: Internal.EnumFilterField<GameProvider__Next>;
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
export type GamesReturn = Internal.OperationResult<never, PaginatedQueryResult<'games', Game>>;
|
|
396
|
+
export interface GamesByNameInput {
|
|
397
|
+
search: string;
|
|
398
|
+
filter?: GamesInput['filter'];
|
|
399
|
+
}
|
|
400
|
+
export interface GamesByNameInput__Next {
|
|
401
|
+
search: string;
|
|
402
|
+
filter: GamesInput__Next['filter'];
|
|
403
|
+
}
|
|
404
|
+
export type GamesByNameReturn = Internal.OperationResult<never, Game[]>;
|
|
405
|
+
export type GameSession = {
|
|
406
|
+
id: string;
|
|
407
|
+
game: Game;
|
|
408
|
+
status: Extract<GameSessionStatus, 'READY'>;
|
|
409
|
+
launchUrl: string;
|
|
410
|
+
dateTimeCreated: Date;
|
|
411
|
+
dateTimeLastUpdated: Date;
|
|
412
|
+
} | {
|
|
413
|
+
id: string;
|
|
414
|
+
game: Game;
|
|
415
|
+
status: Exclude<GameSessionStatus, 'READY'>;
|
|
416
|
+
dateTimeCreated: Date;
|
|
417
|
+
dateTimeLastUpdated: Date;
|
|
418
|
+
};
|
|
419
|
+
export type GameSessionReturn = Internal.OperationResult<never, GameSession | null>;
|
|
420
|
+
export interface CreateGameSessionInput {
|
|
421
|
+
/**
|
|
422
|
+
* @example
|
|
423
|
+
* ```ts
|
|
424
|
+
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
425
|
+
*
|
|
426
|
+
* const id = ObjectId.generate(ObjectType.GameSession).toString()
|
|
427
|
+
* ```
|
|
428
|
+
*/
|
|
429
|
+
id?: string;
|
|
430
|
+
/**
|
|
431
|
+
* @description id of the game
|
|
432
|
+
*/
|
|
433
|
+
game: string;
|
|
434
|
+
}
|
|
435
|
+
export type CreateGameSessionError = Internal.CreateGameSessionError;
|
|
436
|
+
export type CreateGameSessionReturn = Internal.OperationResult<CreateGameSessionError, {
|
|
437
|
+
id: string;
|
|
438
|
+
}>;
|
|
439
|
+
export type EndGameSessionReturn = Internal.OperationResult<UnknownError>;
|
|
440
|
+
export type AnnouncementStatus = Internal.AnnouncementStatus;
|
|
441
|
+
export type AnnouncementType = Internal.AnnouncementType;
|
|
442
|
+
export interface Announcement {
|
|
443
|
+
id: string;
|
|
444
|
+
type: AnnouncementType;
|
|
445
|
+
title: string;
|
|
446
|
+
status: AnnouncementStatus;
|
|
447
|
+
message: string;
|
|
448
|
+
activationStartDateTime: Date;
|
|
449
|
+
activationEndDateTime: Date;
|
|
450
|
+
dateTimeCreated: Date;
|
|
451
|
+
dateTimeLastUpdated: Date;
|
|
452
|
+
}
|
|
453
|
+
export interface AnnouncementsInput extends Omit<Internal.AnnouncementsQueryVariables, 'filter'> {
|
|
454
|
+
}
|
|
455
|
+
export type AnnouncementsReturn = Internal.OperationResult<never, PaginatedQueryResult<'announcements', Announcement>>;
|
|
456
|
+
export type BetRecordStatus = Internal.BetRecordStatus;
|
|
457
|
+
export interface BetRecord {
|
|
458
|
+
id: string;
|
|
459
|
+
game: Game;
|
|
460
|
+
status: BetRecordStatus;
|
|
461
|
+
serialCode: string;
|
|
462
|
+
vendorRoundId?: string;
|
|
463
|
+
bet: number;
|
|
464
|
+
payout: number;
|
|
465
|
+
validBet: number;
|
|
466
|
+
jackpotContribution: number;
|
|
467
|
+
jackpotPayout: number;
|
|
468
|
+
winloss?: number;
|
|
469
|
+
dateTimeSettled?: Date;
|
|
470
|
+
dateTimeCreated: Date;
|
|
471
|
+
dateTimeLastUpdated: Date;
|
|
472
|
+
betContent?: string;
|
|
473
|
+
contestName?: string;
|
|
474
|
+
externalCategory?: string;
|
|
475
|
+
metadata: {
|
|
476
|
+
odds?: string;
|
|
477
|
+
validBet?: number;
|
|
478
|
+
};
|
|
479
|
+
}
|
|
480
|
+
export interface BetRecordsInput extends Internal.BetRecordsQueryVariables {
|
|
481
|
+
}
|
|
482
|
+
export type BetRecordsReturn = Internal.OperationResult<never, PaginatedQueryResult<'betRecords', BetRecord>>;
|
|
483
|
+
export interface LatestBetRecord {
|
|
484
|
+
id: string;
|
|
485
|
+
member: {
|
|
486
|
+
id: string;
|
|
487
|
+
name: string;
|
|
488
|
+
};
|
|
489
|
+
game: Game;
|
|
490
|
+
bet: number;
|
|
491
|
+
payout: number;
|
|
492
|
+
validBet: number;
|
|
493
|
+
dateTimeSettled: Date;
|
|
494
|
+
dateTimeCreated: Date;
|
|
495
|
+
}
|
|
496
|
+
export type LatestBetRecordsReturn = Internal.OperationResult<never, LatestBetRecord[]>;
|
|
497
|
+
export type TransactionRecordType = Internal.TransactionRecordType;
|
|
498
|
+
export interface TransactionRecord {
|
|
499
|
+
id: string;
|
|
500
|
+
type: TransactionRecordType;
|
|
501
|
+
amount: number;
|
|
502
|
+
content?: string;
|
|
503
|
+
currentBalance: number;
|
|
504
|
+
referenceNumber: string;
|
|
505
|
+
dateTimeCreated: Date;
|
|
506
|
+
dateTimeLastUpdated: Date;
|
|
507
|
+
}
|
|
508
|
+
export interface TransactionRecordsInput extends Internal.TransactionRecordsQueryVariables {
|
|
509
|
+
}
|
|
510
|
+
export type TransactionRecordsReturn = Internal.OperationResult<never, PaginatedQueryResult<'transactionRecords', TransactionRecord>>;
|
|
511
|
+
export type DepositRecordType = Internal.DepositRecordType;
|
|
512
|
+
export type DepositRecordStatus = Internal.DepositRecordStatus;
|
|
513
|
+
export interface DepositRecord {
|
|
514
|
+
id: string;
|
|
515
|
+
type: DepositRecordType;
|
|
516
|
+
status: DepositRecordStatus;
|
|
517
|
+
amount: number;
|
|
518
|
+
netAmount: number;
|
|
519
|
+
fee: number;
|
|
520
|
+
reference?: string;
|
|
521
|
+
depositNumber: string;
|
|
522
|
+
dateTimeCreated: Date;
|
|
523
|
+
dateTimeLastUpdated: Date;
|
|
524
|
+
}
|
|
525
|
+
export interface DepositRecordsInput extends Internal.DepositRecordsQueryVariables {
|
|
526
|
+
}
|
|
527
|
+
export type DepositRecordsReturn = Internal.OperationResult<never, PaginatedQueryResult<'depositRecords', DepositRecord>>;
|
|
528
|
+
export type DepositsCountReturn = Internal.OperationResult<never, number>;
|
|
529
|
+
type Deposit__Common = Omit<DepositRecord, 'depositNumber'>;
|
|
530
|
+
type Deposit__Failed = Deposit__Common & {
|
|
531
|
+
status: 'REJECTED' | 'CANCELLED';
|
|
532
|
+
checkoutUrl?: string;
|
|
533
|
+
};
|
|
534
|
+
type Deposit__Pending = Deposit__Common & {
|
|
535
|
+
status: 'PENDING';
|
|
536
|
+
checkoutUrl?: never;
|
|
537
|
+
};
|
|
538
|
+
type Deposit__Success = Deposit__Common & {
|
|
539
|
+
status: 'ACCEPTED' | 'APPROVED' | 'CONFIRMED';
|
|
540
|
+
checkoutUrl: string;
|
|
541
|
+
};
|
|
542
|
+
export type Deposit = Deposit__Failed | Deposit__Pending | Deposit__Success;
|
|
543
|
+
export type DepositReturn = Internal.OperationResult<never, Deposit | null>;
|
|
544
|
+
export interface CreateMayaDepositInput {
|
|
545
|
+
/**
|
|
546
|
+
* @example
|
|
547
|
+
* ```ts
|
|
548
|
+
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
549
|
+
*
|
|
550
|
+
* const id = ObjectId.generate(ObjectType.Deposit).toString()
|
|
551
|
+
* ```
|
|
552
|
+
*/
|
|
553
|
+
id?: string;
|
|
554
|
+
type: 'MAYA';
|
|
555
|
+
amount: number;
|
|
556
|
+
/**
|
|
557
|
+
* @description id of the promo
|
|
558
|
+
*/
|
|
559
|
+
promo?: string;
|
|
560
|
+
}
|
|
561
|
+
export interface CreateGCashDepositInput {
|
|
562
|
+
/**
|
|
563
|
+
* @example
|
|
564
|
+
* ```ts
|
|
565
|
+
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
566
|
+
*
|
|
567
|
+
* const id = ObjectId.generate(ObjectType.Deposit).toString()
|
|
568
|
+
* ```
|
|
569
|
+
*/
|
|
570
|
+
id?: string;
|
|
571
|
+
type: 'GCASH';
|
|
572
|
+
amount: number;
|
|
573
|
+
/**
|
|
574
|
+
* @description id of the promo
|
|
575
|
+
*/
|
|
576
|
+
promo?: string;
|
|
577
|
+
}
|
|
578
|
+
export interface CreateMayaAppDepositInput {
|
|
579
|
+
/**
|
|
580
|
+
* @example
|
|
581
|
+
* ```ts
|
|
582
|
+
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
583
|
+
*
|
|
584
|
+
* const id = ObjectId.generate(ObjectType.Deposit).toString()
|
|
585
|
+
* ```
|
|
586
|
+
*/
|
|
587
|
+
id?: string;
|
|
588
|
+
type: 'MAYA_APP';
|
|
589
|
+
amount: number;
|
|
590
|
+
/**
|
|
591
|
+
* @description id of the promo
|
|
592
|
+
*/
|
|
593
|
+
promo?: string;
|
|
594
|
+
}
|
|
595
|
+
export type CreateDepositInput = CreateMayaDepositInput | CreateGCashDepositInput | CreateMayaAppDepositInput;
|
|
596
|
+
export type CreateDepositError = Internal.CreateDepositError;
|
|
597
|
+
export type CreateDepositReturn = Internal.OperationResult<CreateDepositError, {
|
|
598
|
+
id: string;
|
|
599
|
+
}>;
|
|
600
|
+
export type WithdrawalRecordStatus = Internal.WithdrawalRecordStatus;
|
|
601
|
+
interface WithdrawalRecord__Common {
|
|
602
|
+
id: string;
|
|
603
|
+
fee: number;
|
|
604
|
+
amount: number;
|
|
605
|
+
netAmount: number;
|
|
606
|
+
status: WithdrawalRecordStatus;
|
|
607
|
+
reference?: string;
|
|
608
|
+
withdrawalNumber: string;
|
|
609
|
+
dateTimeConfirmed?: Date;
|
|
610
|
+
dateTimeCreated: Date;
|
|
611
|
+
dateTimeLastUpdated: Date;
|
|
612
|
+
}
|
|
613
|
+
export interface ManualWithdrawalRecord extends WithdrawalRecord__Common {
|
|
614
|
+
type: 'MANUAL';
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* - `AUBKPHMM` - ASIA UNITED BANK
|
|
618
|
+
* - `MBTCPHMM` - METROPOLITAN BANK AND TRUST CO.
|
|
619
|
+
* - `BNORPHMM` - BDO UNIBANK, INC.
|
|
620
|
+
* - `MKRUPHM1` - BANK OF MAKATI
|
|
621
|
+
*/
|
|
622
|
+
export type Bank = Internal.Bank;
|
|
623
|
+
export interface BankWithdrawalRecord extends WithdrawalRecord__Common {
|
|
624
|
+
type: 'BANK';
|
|
625
|
+
bank: Bank;
|
|
626
|
+
}
|
|
627
|
+
export interface GCashWithdrawalRecord extends WithdrawalRecord__Common {
|
|
628
|
+
type: 'GCASH';
|
|
629
|
+
recipientMobileNumber: string;
|
|
630
|
+
}
|
|
631
|
+
export interface MayaWithdrawalRecord extends WithdrawalRecord__Common {
|
|
632
|
+
type: 'MAYA';
|
|
633
|
+
recipientMobileNumber: string;
|
|
634
|
+
}
|
|
635
|
+
export type WithdrawalRecord = ManualWithdrawalRecord | BankWithdrawalRecord | GCashWithdrawalRecord | MayaWithdrawalRecord;
|
|
636
|
+
export interface WithdrawalRecordsInput extends Internal.WithdrawalRecordsQueryVariables {
|
|
637
|
+
}
|
|
638
|
+
export type WithdrawalRecordsReturn = Internal.OperationResult<never, PaginatedQueryResult<'withdrawalRecords', WithdrawalRecord>>;
|
|
639
|
+
export type RemainingDailyWithdrawalsCountReturn = Internal.OperationResult<never, number>;
|
|
640
|
+
export interface CreateBankWithdrawalInput {
|
|
641
|
+
/**
|
|
642
|
+
* @example
|
|
643
|
+
* ```ts
|
|
644
|
+
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
645
|
+
*
|
|
646
|
+
* const id = ObjectId.generate(ObjectType.Withdrawal).toString()
|
|
647
|
+
* ```
|
|
648
|
+
*/
|
|
649
|
+
id?: string;
|
|
650
|
+
type: 'BANK';
|
|
651
|
+
amount: number;
|
|
652
|
+
/**
|
|
653
|
+
* @validation
|
|
654
|
+
* - _min_: `8`
|
|
655
|
+
* - _max_: `30`
|
|
656
|
+
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
657
|
+
*/
|
|
658
|
+
transactionPassword: string;
|
|
659
|
+
}
|
|
660
|
+
export interface CreateGCashWithdrawalInput {
|
|
661
|
+
/**
|
|
662
|
+
* @example
|
|
663
|
+
* ```ts
|
|
664
|
+
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
665
|
+
*
|
|
666
|
+
* const id = ObjectId.generate(ObjectType.Withdrawal).toString()
|
|
667
|
+
* ```
|
|
668
|
+
*/
|
|
669
|
+
id?: string;
|
|
670
|
+
type: 'GCASH';
|
|
671
|
+
amount: number;
|
|
672
|
+
/**
|
|
673
|
+
* @validation
|
|
674
|
+
* - _min_: `8`
|
|
675
|
+
* - _max_: `30`
|
|
676
|
+
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
677
|
+
*/
|
|
678
|
+
transactionPassword: string;
|
|
679
|
+
/**
|
|
680
|
+
* @validation
|
|
681
|
+
* - _pattern_: /^(\+?63|0)?9\d{9}$/
|
|
682
|
+
*
|
|
683
|
+
* @example
|
|
684
|
+
* ```bash
|
|
685
|
+
* +639190000000
|
|
686
|
+
* 09190000000
|
|
687
|
+
* 9190000000
|
|
688
|
+
* ```
|
|
689
|
+
*/
|
|
690
|
+
recipientMobileNumber: string;
|
|
691
|
+
}
|
|
692
|
+
export interface CreateMayaWithdrawalInput {
|
|
693
|
+
/**
|
|
694
|
+
* @example
|
|
695
|
+
* ```ts
|
|
696
|
+
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
697
|
+
*
|
|
698
|
+
* const id = ObjectId.generate(ObjectType.Withdrawal).toString()
|
|
699
|
+
* ```
|
|
700
|
+
*/
|
|
701
|
+
id?: string;
|
|
702
|
+
type: 'MAYA';
|
|
703
|
+
amount: number;
|
|
704
|
+
/**
|
|
705
|
+
* @validation
|
|
706
|
+
* - _min_: `8`
|
|
707
|
+
* - _max_: `30`
|
|
708
|
+
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
709
|
+
*/
|
|
710
|
+
transactionPassword: string;
|
|
711
|
+
/**
|
|
712
|
+
* @validation
|
|
713
|
+
* - _pattern_: /^(\+?63|0)?9\d{9}$/
|
|
714
|
+
*
|
|
715
|
+
* @example
|
|
716
|
+
* ```bash
|
|
717
|
+
* +639190000000
|
|
718
|
+
* 09190000000
|
|
719
|
+
* 9190000000
|
|
720
|
+
* ```
|
|
721
|
+
*/
|
|
722
|
+
recipientMobileNumber: string;
|
|
723
|
+
}
|
|
724
|
+
export interface CreateMayaAppWithdrawalInput {
|
|
725
|
+
/**
|
|
726
|
+
* @example
|
|
727
|
+
* ```ts
|
|
728
|
+
* import { ObjectId, ObjectType } from '@opexa/portal-sdk';
|
|
729
|
+
*
|
|
730
|
+
* const id = ObjectId.generate(ObjectType.Withdrawal).toString()
|
|
731
|
+
* ```
|
|
732
|
+
*/
|
|
733
|
+
id?: string;
|
|
734
|
+
type: 'MAYA_APP';
|
|
735
|
+
amount: number;
|
|
736
|
+
/**
|
|
737
|
+
* @validation
|
|
738
|
+
* - _min_: `8`
|
|
739
|
+
* - _max_: `30`
|
|
740
|
+
* - _pattern_: `/^[a-z0-9]{8,30}$/`
|
|
741
|
+
*/
|
|
742
|
+
transactionPassword: string;
|
|
743
|
+
}
|
|
744
|
+
export type CreateWithdrawalInput = CreateBankWithdrawalInput | CreateGCashWithdrawalInput | CreateMayaWithdrawalInput | CreateMayaAppWithdrawalInput;
|
|
745
|
+
export type CreateWithdrawalError = Internal.CreateWithdrawalError;
|
|
746
|
+
export type CreateWithdrawalReturn = Internal.OperationResult<CreateWithdrawalError, {
|
|
747
|
+
id: string;
|
|
748
|
+
}>;
|
|
749
|
+
export interface GatewaySettings {
|
|
750
|
+
minimumAmount?: number;
|
|
751
|
+
maximumAmount?: number;
|
|
752
|
+
fixedFee?: number;
|
|
753
|
+
percentageFee?: number;
|
|
754
|
+
webEnabled: boolean;
|
|
755
|
+
mobileWebEnabled: boolean;
|
|
756
|
+
androidEnabled: boolean;
|
|
757
|
+
iosEnabled: boolean;
|
|
758
|
+
}
|
|
759
|
+
export interface PointsClubSettings {
|
|
760
|
+
multiplier: number;
|
|
761
|
+
}
|
|
762
|
+
export interface PaymentSettings {
|
|
763
|
+
minimumFirstDepositAmount?: number;
|
|
764
|
+
restrictWithdrawalsToVerifiedMembers: boolean;
|
|
765
|
+
depositGateway: {
|
|
766
|
+
bank: GatewaySettings;
|
|
767
|
+
gcash: GatewaySettings;
|
|
768
|
+
maya: GatewaySettings;
|
|
769
|
+
mayaApp: GatewaySettings;
|
|
770
|
+
};
|
|
771
|
+
withdrawalGateway: {
|
|
772
|
+
bank: GatewaySettings;
|
|
773
|
+
gcash: GatewaySettings;
|
|
774
|
+
maya: GatewaySettings;
|
|
775
|
+
mayaApp: GatewaySettings;
|
|
776
|
+
};
|
|
777
|
+
}
|
|
778
|
+
export interface Platform {
|
|
779
|
+
paymentSettings: PaymentSettings;
|
|
780
|
+
pointsClubSettings: PointsClubSettings;
|
|
781
|
+
}
|
|
782
|
+
export type PlatformReturn = Internal.OperationResult<never, Platform>;
|
|
783
|
+
export type PromoType = Internal.PromoType;
|
|
784
|
+
export type PromoStatus = Internal.PromoStatus;
|
|
785
|
+
export interface Promo {
|
|
786
|
+
id: string;
|
|
787
|
+
type: PromoType;
|
|
788
|
+
name: string;
|
|
789
|
+
banner: File__Ready;
|
|
790
|
+
status: PromoStatus;
|
|
791
|
+
description: string;
|
|
792
|
+
minimumBonusAmount?: number;
|
|
793
|
+
maximumBonusAmount?: number;
|
|
794
|
+
activationStartDateTime: Date;
|
|
795
|
+
activationEndDateTime: Date;
|
|
796
|
+
dateTimeCreated: Date;
|
|
797
|
+
dateTimeLastUpdated: Date;
|
|
798
|
+
}
|
|
799
|
+
export type PromosReturn = Internal.OperationResult<never, Promo[]>;
|
|
800
|
+
export type AvailablePromosReturn = Internal.OperationResult<never, Promo[]>;
|
|
801
|
+
export type CashbackStatus = Internal.CashbackStatus;
|
|
802
|
+
export interface Cashback {
|
|
803
|
+
id: string;
|
|
804
|
+
name: string;
|
|
805
|
+
banner: File__Ready;
|
|
806
|
+
status: CashbackStatus;
|
|
807
|
+
description: string;
|
|
808
|
+
activationStartDateTime: Date;
|
|
809
|
+
activationEndDateTime: Date;
|
|
810
|
+
dateTimeCreated: Date;
|
|
811
|
+
dateTimeLastUpdated: Date;
|
|
812
|
+
}
|
|
813
|
+
export type CashbacksReturn = Internal.OperationResult<never, Cashback[]>;
|
|
814
|
+
export interface Bonus {
|
|
815
|
+
id: string;
|
|
816
|
+
promo: Promo;
|
|
817
|
+
deposit?: Omit<DepositRecord, 'id' | 'depositNumber'>;
|
|
818
|
+
amount: number;
|
|
819
|
+
balance: number;
|
|
820
|
+
turnoverRequirement: number;
|
|
821
|
+
currentTurnoverRequirementContribution: number;
|
|
822
|
+
currentTurnoverRequirementContributionPercentage: number;
|
|
823
|
+
expiration: Date;
|
|
824
|
+
dateTimeCreated: Date;
|
|
825
|
+
dateTimeLastUpdated: Date;
|
|
826
|
+
}
|
|
827
|
+
export type BonusReturn = Internal.OperationResult<never, Bonus | null>;
|
|
828
|
+
export interface CashbackBonus {
|
|
829
|
+
id: string;
|
|
830
|
+
balance: number;
|
|
831
|
+
cashback: Cashback;
|
|
832
|
+
dateTimeCreated: Date;
|
|
833
|
+
dateTimeLastUpdated: Date;
|
|
834
|
+
}
|
|
835
|
+
export type CashbackBonusReturn = Internal.OperationResult<never, CashbackBonus[]>;
|
|
836
|
+
export type ClaimCashbackBonusError = Internal.ClaimCashbackBonusError;
|
|
837
|
+
export type ClaimCashbackBonusReturn = Internal.OperationResult<ClaimCashbackBonusError>;
|
|
838
|
+
export type Error = HttpError | UnknownError | SignInError | UploadImageFileError | CreateAccountError | UpdateAccountError | ResetPasswordError | SubmitVerificationError | UpdateVerificationError | SendVerificationCodeError | VerifyMobileNumberError | PointsToCashConversionError | CreateGameSessionError | CreateDepositError | CreateWithdrawalError | ClaimCashbackBonusError;
|
|
839
|
+
export {};
|