@opexa/portal-sdk 0.0.20 → 0.0.22

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.
Files changed (38) hide show
  1. package/README.md +19 -17
  2. package/dist/index.js +466 -469
  3. package/dist/index.js.map +1 -1
  4. package/dist/index.mjs +902 -868
  5. package/dist/index.mjs.map +1 -1
  6. package/dist/sdk/sdk.d.ts +8 -23
  7. package/dist/sdk/session-manager.d.ts +8 -3
  8. package/dist/sdk/types.d.ts +141 -98
  9. package/dist/services/account.service.d.ts +1 -4
  10. package/dist/services/auth.service.d.ts +2 -4
  11. package/dist/services/file.service.d.ts +1 -1
  12. package/dist/services/game.service.d.ts +11 -6
  13. package/dist/services/index.d.ts +0 -16
  14. package/dist/services/portal.service.d.ts +1 -1
  15. package/dist/services/queries.d.ts +54 -0
  16. package/dist/services/report.service.d.ts +1 -6
  17. package/dist/services/types.d.ts +780 -8
  18. package/dist/services/utils.d.ts +2 -9
  19. package/dist/services/wallet.service.d.ts +17 -10
  20. package/dist/utils/clamp.d.ts +1 -0
  21. package/dist/utils/graphql-client.d.ts +8 -1
  22. package/dist/utils/pollable.d.ts +28 -0
  23. package/package.json +4 -1
  24. package/dist/services/announcement.d.ts +0 -29
  25. package/dist/services/bet-record.d.ts +0 -65
  26. package/dist/services/bonus.d.ts +0 -45
  27. package/dist/services/cashback.d.ts +0 -20
  28. package/dist/services/deposit.d.ts +0 -90
  29. package/dist/services/file.d.ts +0 -49
  30. package/dist/services/game.d.ts +0 -98
  31. package/dist/services/member.d.ts +0 -202
  32. package/dist/services/platform.d.ts +0 -38
  33. package/dist/services/points.d.ts +0 -24
  34. package/dist/services/promo.d.ts +0 -33
  35. package/dist/services/session.d.ts +0 -80
  36. package/dist/services/transaction.d.ts +0 -25
  37. package/dist/services/wallet.d.ts +0 -14
  38. package/dist/services/withdrawal.d.ts +0 -114
package/README.md CHANGED
@@ -5,7 +5,7 @@ A library that provides a set of functions to interact with Opexa Portal API.
5
5
  ## Installation
6
6
 
7
7
  ```bash
8
- npm install @highoutputventures/opexa-portal-sdk
8
+ npm install @opexa/portal-sdk
9
9
  ```
10
10
 
11
11
  ## Usage
@@ -14,11 +14,11 @@ npm install @highoutputventures/opexa-portal-sdk
14
14
 
15
15
  ```ts
16
16
  // lib/sdk.js
17
- import Sdk from '@highoutputventures/opexa-portal-sdk';
17
+ import Sdk from '@opexa/portal-sdk';
18
18
 
19
19
  export const sdk = new Sdk({
20
20
  platform: 'Z892',
21
- baseUrl: 'https://portal.development.opexa.io',
21
+ environment: 'development',
22
22
  });
23
23
  ```
24
24
 
@@ -63,10 +63,12 @@ function Page() {
63
63
  ```ts
64
64
  type SignInInput =
65
65
  | {
66
+ type: 'NAME_AND_PASSWORD';
66
67
  name: string;
67
68
  password: string;
68
69
  }
69
70
  | {
71
+ type: 'MOBILE_NUMBER';
70
72
  mobileNumber: string;
71
73
  verificationCode: string;
72
74
  };
@@ -80,7 +82,7 @@ function Page() {
80
82
  error:
81
83
  | HttpError
82
84
  | {
83
- code: 'AccountNotFound';
85
+ name: 'AccountNotFound';
84
86
  message: string;
85
87
  };
86
88
  };
@@ -204,7 +206,7 @@ function Page() {
204
206
  error:
205
207
  | HttpError
206
208
  | {
207
- code:
209
+ name:
208
210
  | 'AccountNameNotAvailableError'
209
211
  | 'InvalidPlatformError'
210
212
  | 'InvalidReCAPTCHAResponseError'
@@ -233,7 +235,7 @@ function Page() {
233
235
  ok: false;
234
236
  data?: never;
235
237
  error: {
236
- code:
238
+ name:
237
239
  | 'AccountNameNotAvailableError'
238
240
  | 'EmailAddressNotAvailableError'
239
241
  | 'InvalidTransactionPasswordError'
@@ -285,7 +287,7 @@ function Page() {
285
287
  error:
286
288
  | HttpError
287
289
  | {
288
- code: 'AccountNotFoundError' | 'InvalidVerificationCodeError';
290
+ name: 'AccountNotFoundError' | 'InvalidVerificationCodeError';
289
291
  message: string;
290
292
  };
291
293
  };
@@ -351,7 +353,7 @@ function Page() {
351
353
  error:
352
354
  | HttpError
353
355
  | {
354
- code:
356
+ name:
355
357
  | 'FileDoesNotExistError'
356
358
  | 'FileNotReadyError'
357
359
  | 'MemberVerificationAlreadyExistsError';
@@ -386,7 +388,7 @@ function Page() {
386
388
  error:
387
389
  | HttpError
388
390
  | {
389
- code:
391
+ name:
390
392
  | 'FileDoesNotExistError'
391
393
  | 'FileNotReadyError'
392
394
  | 'MemberVerificationAlreadyApprovedError'
@@ -412,7 +414,7 @@ function Page() {
412
414
  error:
413
415
  | HttpError
414
416
  | {
415
- code: 'InvalidSMSVerificationCodeError' | 'MobileNumberAlreadyVerifiedError';
417
+ name: 'InvalidSMSVerificationCodeError' | 'MobileNumberAlreadyVerifiedError';
416
418
  message: string;
417
419
  };
418
420
  };
@@ -461,7 +463,7 @@ function Page() {
461
463
  error:
462
464
  | HttpError
463
465
  | {
464
- code: 'InvalidPlatformError' | 'NotReadyToSendVerficationCodeError';
466
+ name: 'InvalidPlatformError' | 'NotReadyToSendVerficationCodeError';
465
467
  message: string;
466
468
  };
467
469
  };
@@ -588,7 +590,7 @@ function Page() {
588
590
  error:
589
591
  | HttpError
590
592
  | {
591
- code:
593
+ name:
592
594
  | 'MobileNumberNotVerifiedError'
593
595
  | 'AccountNotVerifiedError'
594
596
  | 'InvalidWithdrawalAmountError'
@@ -760,7 +762,7 @@ function Page() {
760
762
  error:
761
763
  | HttpError
762
764
  | {
763
- code:
765
+ name:
764
766
  | 'DepositPromoMaximumAmountExceededError'
765
767
  | 'DepositPromoMinimumAmountNotMetError'
766
768
  | 'HasActiveBonusError'
@@ -1309,7 +1311,7 @@ function Page() {
1309
1311
  error:
1310
1312
  | HttpError
1311
1313
  | {
1312
- code: 'CashbackBonusDoesNotExistError';
1314
+ name: 'CashbackBonusDoesNotExistError';
1313
1315
  message: string;
1314
1316
  };
1315
1317
  };
@@ -1457,7 +1459,7 @@ function Page() {
1457
1459
  error:
1458
1460
  | HttpError
1459
1461
  | {
1460
- code: 'GameDoesNotExistError';
1462
+ name: 'GameDoesNotExistError';
1461
1463
  message: string;
1462
1464
  };
1463
1465
  };
@@ -1537,7 +1539,7 @@ function Page() {
1537
1539
  error:
1538
1540
  | HttpError
1539
1541
  | {
1540
- code: 'FileFormatNotSupportedError' | 'FileNameTooLongError' | 'FileSizeTooBigError';
1542
+ name: 'FileFormatNotSupportedError' | 'FileNameTooLongError' | 'FileSizeTooBigError';
1541
1543
  message: string;
1542
1544
  };
1543
1545
  };
@@ -1584,7 +1586,7 @@ function Page() {
1584
1586
  error:
1585
1587
  | HttpError
1586
1588
  | {
1587
- code: 'InsufficientPointsError';
1589
+ name: 'InsufficientPointsError';
1588
1590
  message: string;
1589
1591
  };
1590
1592
  };