@opexa/portal-sdk 0.5.0 → 0.6.0

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.d.cts CHANGED
@@ -158,7 +158,7 @@ interface DepositRecordsQueryVariables {
158
158
  dateTimeLastUpdated?: DateFilterField;
159
159
  };
160
160
  }
161
- type CreateDepositError$1 = 'DepositPromoMaximumAmountExceededError' | 'DepositPromoMinimumAmountNotMetError' | 'MaximumDepositAmountExceededError' | 'MinimumDepositAmountNotMetError' | 'MinimumFirstDepositAmountNotMetError' | 'PromoNotEnabledError' | 'WalletDoesNotExistError' | 'ReCAPTCHAVerificationFailedError';
161
+ type CreateDepositError$1 = 'DepositPromoMaximumAmountExceededError' | 'DepositPromoMinimumAmountNotMetError' | 'MaximumDepositAmountExceededError' | 'MinimumDepositAmountNotMetError' | 'MinimumFirstDepositAmountNotMetError' | 'PromoNotEnabledError' | 'WalletDoesNotExistError' | 'ReCAPTCHAVerificationFailedError' | 'UPIReferenceNotAvailableError';
162
162
  type Bank$1 = 'AUBKPHMM' | 'MBTCPHMM' | 'BNORPHMM' | 'MKRUPHM1';
163
163
  type WithdrawalType$1 = 'MANUAL' | 'BANK' | 'GCASH' | 'MAYA_APP' | 'INSTAPAY' | 'MANUAL_UPI' | 'MANUAL_BANK';
164
164
  type WithdrawalStatus$1 = 'PENDING' | 'ACCEPTED' | 'APPROVED' | 'REJECTED' | 'CONFIRMED' | 'CANCELLED' | 'FAILED';
@@ -1529,11 +1529,13 @@ declare class Sdk {
1529
1529
  cashbacks(): Promise<CashbacksReturn>;
1530
1530
  /** @deprecated */
1531
1531
  bonus(): Promise<BonusReturn>;
1532
+ bonuses(): Promise<BonusesReturn>;
1532
1533
  cashbackBonuses(): Promise<CashbackBonusReturn>;
1533
1534
  claimCashbackBonus(id: string): Promise<ClaimCashbackBonusReturn>;
1534
1535
  claimSpotBonus(code: string): Promise<ClaimSpotBonusReturn>;
1535
1536
  promoByCode(code: string): Promise<PromoByCodeReturn>;
1536
1537
  game(id: string): Promise<GameReturn>;
1538
+ /** @deprecated */
1537
1539
  games(input?: GamesInput): Promise<GamesReturn>;
1538
1540
  games__next(input?: GamesInput__Next): Promise<GamesReturn>;
1539
1541
  recommendedGames(input?: RecommendedGamesInput): Promise<RecommendedGamesReturn>;
@@ -1561,7 +1563,6 @@ declare class Sdk {
1561
1563
  markMessageAsRead(id: string): Promise<MarkMessageAsReadReturn>;
1562
1564
  markAllMessageAsRead(): Promise<MarkAllMessagesAsReadReturn>;
1563
1565
  claimReward(id: string): Promise<ClaimRewardReturn>;
1564
- bonuses(): Promise<BonusesReturn>;
1565
1566
  onboardingStatus(): Promise<OnboardingStatusReturn>;
1566
1567
  completeOnboarding(input: CompleteOnboardingInput): Promise<CompleteOnboardingReturn>;
1567
1568
  skipOnboarding(): Promise<SkipOnboardingReturn>;
package/dist/index.d.ts CHANGED
@@ -158,7 +158,7 @@ interface DepositRecordsQueryVariables {
158
158
  dateTimeLastUpdated?: DateFilterField;
159
159
  };
160
160
  }
161
- type CreateDepositError$1 = 'DepositPromoMaximumAmountExceededError' | 'DepositPromoMinimumAmountNotMetError' | 'MaximumDepositAmountExceededError' | 'MinimumDepositAmountNotMetError' | 'MinimumFirstDepositAmountNotMetError' | 'PromoNotEnabledError' | 'WalletDoesNotExistError' | 'ReCAPTCHAVerificationFailedError';
161
+ type CreateDepositError$1 = 'DepositPromoMaximumAmountExceededError' | 'DepositPromoMinimumAmountNotMetError' | 'MaximumDepositAmountExceededError' | 'MinimumDepositAmountNotMetError' | 'MinimumFirstDepositAmountNotMetError' | 'PromoNotEnabledError' | 'WalletDoesNotExistError' | 'ReCAPTCHAVerificationFailedError' | 'UPIReferenceNotAvailableError';
162
162
  type Bank$1 = 'AUBKPHMM' | 'MBTCPHMM' | 'BNORPHMM' | 'MKRUPHM1';
163
163
  type WithdrawalType$1 = 'MANUAL' | 'BANK' | 'GCASH' | 'MAYA_APP' | 'INSTAPAY' | 'MANUAL_UPI' | 'MANUAL_BANK';
164
164
  type WithdrawalStatus$1 = 'PENDING' | 'ACCEPTED' | 'APPROVED' | 'REJECTED' | 'CONFIRMED' | 'CANCELLED' | 'FAILED';
@@ -1529,11 +1529,13 @@ declare class Sdk {
1529
1529
  cashbacks(): Promise<CashbacksReturn>;
1530
1530
  /** @deprecated */
1531
1531
  bonus(): Promise<BonusReturn>;
1532
+ bonuses(): Promise<BonusesReturn>;
1532
1533
  cashbackBonuses(): Promise<CashbackBonusReturn>;
1533
1534
  claimCashbackBonus(id: string): Promise<ClaimCashbackBonusReturn>;
1534
1535
  claimSpotBonus(code: string): Promise<ClaimSpotBonusReturn>;
1535
1536
  promoByCode(code: string): Promise<PromoByCodeReturn>;
1536
1537
  game(id: string): Promise<GameReturn>;
1538
+ /** @deprecated */
1537
1539
  games(input?: GamesInput): Promise<GamesReturn>;
1538
1540
  games__next(input?: GamesInput__Next): Promise<GamesReturn>;
1539
1541
  recommendedGames(input?: RecommendedGamesInput): Promise<RecommendedGamesReturn>;
@@ -1561,7 +1563,6 @@ declare class Sdk {
1561
1563
  markMessageAsRead(id: string): Promise<MarkMessageAsReadReturn>;
1562
1564
  markAllMessageAsRead(): Promise<MarkAllMessagesAsReadReturn>;
1563
1565
  claimReward(id: string): Promise<ClaimRewardReturn>;
1564
- bonuses(): Promise<BonusesReturn>;
1565
1566
  onboardingStatus(): Promise<OnboardingStatusReturn>;
1566
1567
  completeOnboarding(input: CompleteOnboardingInput): Promise<CompleteOnboardingReturn>;
1567
1568
  skipOnboarding(): Promise<SkipOnboardingReturn>;
package/dist/index.js CHANGED
@@ -357,6 +357,9 @@ var CREATE_GCASH_WITHDRAWAL_MUTATION = gql`
357
357
  ... on WalletDoesNotExistError {
358
358
  __typename
359
359
  }
360
+ ... on TransactionPasswordNotSetError {
361
+ __typename
362
+ }
360
363
  }
361
364
  }
362
365
  `;
@@ -405,6 +408,9 @@ var CREATE_MAYA_APP_WITHDRAWAL_MUTATION = gql`
405
408
  ... on WalletDoesNotExistError {
406
409
  __typename
407
410
  }
411
+ ... on TransactionPasswordNotSetError {
412
+ __typename
413
+ }
408
414
  }
409
415
  }
410
416
  `;
@@ -438,6 +444,9 @@ var CREATE_AIO_INSTAPAY_WITHDRAWAL_MUTATION = gql`
438
444
  ... on WalletDoesNotExistError {
439
445
  __typename
440
446
  }
447
+ ... on TransactionPasswordNotSetError {
448
+ __typename
449
+ }
441
450
  }
442
451
  }
443
452
  `;
@@ -726,6 +735,9 @@ var CREATE_MANUAL_UPI_DEPOSIT_MUTATION = gql`
726
735
  ... on WalletDoesNotExistError {
727
736
  __typename
728
737
  }
738
+ ... on UPIReferenceNotAvailableError {
739
+ __typename
740
+ }
729
741
  }
730
742
  }
731
743
  `;
@@ -1993,7 +2005,7 @@ var UNMARK_GAME_AS_FAVORITE = gql`
1993
2005
  }
1994
2006
  `;
1995
2007
  var FAVORITE_GAMES_QUERY = gql`
1996
- query favoriteGames {
2008
+ query FavoriteGames {
1997
2009
  favoriteGames {
1998
2010
  id
1999
2011
  }
@@ -2057,7 +2069,9 @@ function createOperationError(code) {
2057
2069
  RateLimitExceededError: "Maximum number of requests reached",
2058
2070
  RewardAlreadyClaimedError: "Reward is already claimed",
2059
2071
  ReCAPTCHAVerificationFailedError: "Invalid reCAPTCHA",
2060
- AccountSuspendedError: "Account is suspended"
2072
+ AccountSuspendedError: "Account is suspended",
2073
+ TransactionPasswordNotSetError: "Transaction password is not set",
2074
+ UPIReferenceNotAvailableError: "UPI reference is no longer available"
2061
2075
  };
2062
2076
  return {
2063
2077
  name: code,
@@ -5364,6 +5378,9 @@ var Sdk = class {
5364
5378
  });
5365
5379
  }
5366
5380
  async signIn(input) {
5381
+ if (input.type === "TOKEN") {
5382
+ console.warn("'TOKEN (signIn)' is deprecated. Please use 'SOCIALS' instead.");
5383
+ }
5367
5384
  switch (input.type) {
5368
5385
  case "NAME_AND_PASSWORD": {
5369
5386
  const res = await this.sessionManager.create({
@@ -5493,6 +5510,7 @@ var Sdk = class {
5493
5510
  /**/
5494
5511
  /** @deprecated */
5495
5512
  async platform() {
5513
+ console.warn("'platform' is deprecated. Please use 'platform__next' instead.");
5496
5514
  const res = await this.accountService.platform();
5497
5515
  if (!res.ok) return res;
5498
5516
  return {
@@ -5533,6 +5551,7 @@ var Sdk = class {
5533
5551
  * @deprecated use `createAccount__next`
5534
5552
  */
5535
5553
  async createAccount(input) {
5554
+ console.warn("'createAccount' is deprecated. Please use 'createAccount__next' instead.");
5536
5555
  const id = input.id ?? ObjectId.generate(ObjectType.Account).toString();
5537
5556
  const res = await this.accountService.registerMemberAccount({
5538
5557
  input: {
@@ -5686,6 +5705,9 @@ var Sdk = class {
5686
5705
  * @deprecated use `sendVerificationCode__next`
5687
5706
  */
5688
5707
  async sendVerificationCode(mobileNumber) {
5708
+ console.warn(
5709
+ "'sendVerificationCode' is deprecated. Please use 'sendVerificationCode__next' instead."
5710
+ );
5689
5711
  return await this.accountService.sendVerificationCode({
5690
5712
  input: {
5691
5713
  channel: "SMS",
@@ -6139,6 +6161,7 @@ var Sdk = class {
6139
6161
  }
6140
6162
  /** @deprecated */
6141
6163
  async bonus() {
6164
+ console.warn("'bonus' is deprecated. Please use 'bonuses' instead.");
6142
6165
  const res = await this.walletService.bonus();
6143
6166
  if (!res.ok) return res;
6144
6167
  return {
@@ -6146,6 +6169,14 @@ var Sdk = class {
6146
6169
  data: res.data ? this.transformer.transform.bonus(res.data) : null
6147
6170
  };
6148
6171
  }
6172
+ async bonuses() {
6173
+ const res = await this.walletService.bonuses();
6174
+ if (!res.ok) return res;
6175
+ return {
6176
+ ok: true,
6177
+ data: res.data.map(this.transformer.transform.bonus)
6178
+ };
6179
+ }
6149
6180
  async cashbackBonuses() {
6150
6181
  const res = await this.walletService.cashbackBonuses();
6151
6182
  if (!res.ok) return res;
@@ -6181,7 +6212,9 @@ var Sdk = class {
6181
6212
  data: res.data ? this.transformer.transform.game(res.data) : null
6182
6213
  };
6183
6214
  }
6215
+ /** @deprecated */
6184
6216
  async games(input) {
6217
+ console.warn("'games' is deprecated. Please use 'games__next' instead.");
6185
6218
  const res = await this.cmsPortalService.games(input);
6186
6219
  if (!res.ok) return res;
6187
6220
  return {
@@ -6527,14 +6560,6 @@ var Sdk = class {
6527
6560
  async claimReward(id) {
6528
6561
  return await this.triggerService.claimReward({ id });
6529
6562
  }
6530
- async bonuses() {
6531
- const res = await this.walletService.bonuses();
6532
- if (!res.ok) return res;
6533
- return {
6534
- ok: true,
6535
- data: res.data.map(this.transformer.transform.bonus)
6536
- };
6537
- }
6538
6563
  /**/
6539
6564
  /*+----------------------------------------+*/
6540
6565
  /*+ ONBOARDING +*/