@opexa/portal-sdk 0.59.148 → 0.59.150

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.
@@ -304,9 +304,21 @@ var GAME_SESSION_QUERY = {
304
304
  var CREATE_GAME_SESSION_MUTATION = gql`
305
305
  mutation CreateGameSession($input: CreateGameSessionInput!) {
306
306
  createGameSession(input: $input) {
307
- ... on BetLimitExceededError {
307
+ ... on GameDoesNotExistError {
308
+ __typename
309
+ }
310
+ ... on GameProviderNotEnabledError {
311
+ __typename
312
+ }
313
+ ... on GameTypeNotEnabledError {
308
314
  __typename
309
315
  }
316
+ }
317
+ }
318
+ `;
319
+ var CREATE_GAME_SESSION_MUTATION_NEXT = gql`
320
+ mutation CreateGameSession($input: CreateGameSessionInput!) {
321
+ createGameSession(input: $input) {
310
322
  ... on GameDoesNotExistError {
311
323
  __typename
312
324
  }
@@ -883,9 +895,6 @@ var DEPOSIT_RECORDS_QUERY = gql`
883
895
  var CREATE_GCASH_DEPOSIT_MUTATION = gql`
884
896
  mutation CreateGCashDeposit($input: CreateGCashDepositInput!) {
885
897
  createGCashDeposit(input: $input) {
886
- ... on DepositLimitReachedError {
887
- __typename
888
- }
889
898
  ... on DepositPromoMaximumAmountExceededError {
890
899
  __typename
891
900
  }
@@ -916,9 +925,6 @@ var CREATE_GCASH_DEPOSIT_MUTATION = gql`
916
925
  var CREATE_GCASH_WEBPAY_DEPOSIT_MUTATION = gql`
917
926
  mutation CreateGCashWebpayDeposit($input: CreateGCashWebpayDepositInput!) {
918
927
  createGCashWebpayDeposit(input: $input) {
919
- ... on DepositLimitReachedError {
920
- __typename
921
- }
922
928
  ... on DepositPromoMaximumAmountExceededError {
923
929
  __typename
924
930
  }
@@ -949,9 +955,6 @@ var CREATE_GCASH_WEBPAY_DEPOSIT_MUTATION = gql`
949
955
  var CREATE_MAYA_WEBPAY_DEPOSIT_MUTATION = gql`
950
956
  mutation CreateMayaWebpayDeposit($input: CreateMayaWebpayDepositInput!) {
951
957
  createMayaWebpayDeposit(input: $input) {
952
- ... on DepositLimitReachedError {
953
- __typename
954
- }
955
958
  ... on DepositPromoMaximumAmountExceededError {
956
959
  __typename
957
960
  }
@@ -979,9 +982,6 @@ var CREATE_MAYA_WEBPAY_DEPOSIT_MUTATION = gql`
979
982
  var CREATE_MAYA_DEPOSIT_MUTATION = gql`
980
983
  mutation CreateMayaDeposit($input: CreateMayaDepositInput!) {
981
984
  createMayaDeposit(input: $input) {
982
- ... on DepositLimitReachedError {
983
- __typename
984
- }
985
985
  ... on DepositPromoMaximumAmountExceededError {
986
986
  __typename
987
987
  }
@@ -1012,9 +1012,6 @@ var CREATE_MAYA_DEPOSIT_MUTATION = gql`
1012
1012
  var CREATE_TEST_DEPOSIT_MUTATION = gql`
1013
1013
  mutation CreateTestDeposit($input: CreateTestDepositInput!) {
1014
1014
  createTestDeposit(input: $input) {
1015
- ... on DepositLimitReachedError {
1016
- __typename
1017
- }
1018
1015
  ... on DepositPromoMaximumAmountExceededError {
1019
1016
  __typename
1020
1017
  }
@@ -1045,9 +1042,6 @@ var CREATE_TEST_DEPOSIT_MUTATION = gql`
1045
1042
  var CREATE_MAYA_APP_DEPOSIT_MUTATION = gql`
1046
1043
  mutation CreateMayaAppDeposit($input: CreateMayaAppDepositInput!) {
1047
1044
  createMayaAppDeposit(input: $input) {
1048
- ... on DepositLimitReachedError {
1049
- __typename
1050
- }
1051
1045
  ... on DepositPromoMaximumAmountExceededError {
1052
1046
  __typename
1053
1047
  }
@@ -1075,9 +1069,6 @@ var CREATE_MAYA_APP_DEPOSIT_MUTATION = gql`
1075
1069
  var CREATE_AIO_QRPH_DEPOSIT_MUTATION = gql`
1076
1070
  mutation CreateAIOQRPHDeposit($input: CreateAIOQRPHDepositInput!) {
1077
1071
  createAIOQRPHDeposit(input: $input) {
1078
- ... on DepositLimitReachedError {
1079
- __typename
1080
- }
1081
1072
  ... on DepositPromoMaximumAmountExceededError {
1082
1073
  __typename
1083
1074
  }
@@ -1111,9 +1102,6 @@ var CREATE_AIO_QRPH_DEPOSIT_MUTATION = gql`
1111
1102
  var CREATE_AIO_GCASH_DEPOSIT_MUTATION = gql`
1112
1103
  mutation CreateAiOGCashDeposit($input: CreateAiOGCashDepositInput!) {
1113
1104
  createAiOGCashDeposit(input: $input) {
1114
- ... on DepositLimitReachedError {
1115
- __typename
1116
- }
1117
1105
  ... on DepositPromoMaximumAmountExceededError {
1118
1106
  __typename
1119
1107
  }
@@ -1144,9 +1132,6 @@ var CREATE_AIO_GCASH_DEPOSIT_MUTATION = gql`
1144
1132
  var CREATE_AIO_PAY_MAYA_DEPOSIT_MUTATION = gql`
1145
1133
  mutation CreateAiOPayMayaDeposit($input: CreateAiOPayMayaDepositInput!) {
1146
1134
  createAiOPayMayaDeposit(input: $input) {
1147
- ... on DepositLimitReachedError {
1148
- __typename
1149
- }
1150
1135
  ... on DepositPromoMaximumAmountExceededError {
1151
1136
  __typename
1152
1137
  }
@@ -1177,9 +1162,6 @@ var CREATE_AIO_PAY_MAYA_DEPOSIT_MUTATION = gql`
1177
1162
  var CREATE_AIO_GRAB_PAY_DEPOSIT_MUTATION = gql`
1178
1163
  mutation CreateAiOGrabPayDeposit($input: CreateAiOGrabPayDepositInput!) {
1179
1164
  createAiOGrabPayDeposit(input: $input) {
1180
- ... on DepositLimitReachedError {
1181
- __typename
1182
- }
1183
1165
  ... on DepositPromoMaximumAmountExceededError {
1184
1166
  __typename
1185
1167
  }
@@ -1212,9 +1194,6 @@ var CREATE_AIO_PALAWAN_PAY_DEPOSIT_MUTATION = gql`
1212
1194
  $input: CreateAiOPalawanPayDepositInput!
1213
1195
  ) {
1214
1196
  createAiOPalawanPayDeposit(input: $input) {
1215
- ... on DepositLimitReachedError {
1216
- __typename
1217
- }
1218
1197
  ... on DepositPromoMaximumAmountExceededError {
1219
1198
  __typename
1220
1199
  }
@@ -1247,9 +1226,6 @@ var CREATE_AIO_ONLINE_BANK_DEPOSIT_MUTATION = gql`
1247
1226
  $input: CreateAIOOnlineBankDepositInput!
1248
1227
  ) {
1249
1228
  createAIOOnlineBankDeposit(input: $input) {
1250
- ... on DepositLimitReachedError {
1251
- __typename
1252
- }
1253
1229
  ... on DepositPromoMaximumAmountExceededError {
1254
1230
  __typename
1255
1231
  }
@@ -1280,9 +1256,6 @@ var CREATE_AIO_ONLINE_BANK_DEPOSIT_MUTATION = gql`
1280
1256
  var CREATE_MANUAL_BANK_DEPOSIT_MUTATION = gql`
1281
1257
  mutation CreateManualBankDeposit($input: CreateManualBankDepositInput!) {
1282
1258
  createManualBankDeposit(input: $input) {
1283
- ... on DepositLimitReachedError {
1284
- __typename
1285
- }
1286
1259
  ... on WalletDoesNotExistError {
1287
1260
  __typename
1288
1261
  }
@@ -1319,9 +1292,6 @@ var CREATE_MANUAL_BANK_DEPOSIT_MUTATION = gql`
1319
1292
  var CREATE_MANUAL_UPI_DEPOSIT_MUTATION = gql`
1320
1293
  mutation CreateManualUPIDeposit($input: CreateManualUPIDepositInput!) {
1321
1294
  createManualUPIDeposit(input: $input) {
1322
- ... on DepositLimitReachedError {
1323
- __typename
1324
- }
1325
1295
  ... on DepositPromoMaximumAmountExceededError {
1326
1296
  __typename
1327
1297
  }
@@ -4166,8 +4136,6 @@ var _GAME_NODE_QUERY = gql`
4166
4136
  // src/services/utils.ts
4167
4137
  function createOperationError(code) {
4168
4138
  const messages = {
4169
- BetLimitExceededError: "Bet limit exceeded, please try again tomorrow",
4170
- DepositLimitReachedError: "Deposit limit reached, please try again tomorrow",
4171
4139
  PointsNotDivisibleBy100Error: "Please input points that are multiples of 100.",
4172
4140
  MaximumBonusesCountLimitExceededError: "Maximum bonuses reached",
4173
4141
  InvalidPromoCodeError: "Invalid Promo Code",
@@ -5695,8 +5663,10 @@ var FileService = class {
5695
5663
  // src/services/game.service.ts
5696
5664
  var GameService = class {
5697
5665
  client;
5698
- constructor(client) {
5666
+ environment;
5667
+ constructor(client, environment = "development") {
5699
5668
  this.client = client;
5669
+ this.environment = environment;
5700
5670
  }
5701
5671
  async gameSession(variables) {
5702
5672
  const res = await this.client.request(GAME_SESSION_QUERY.legacy, variables);
@@ -5709,13 +5679,14 @@ var GameService = class {
5709
5679
  }
5710
5680
  async createGameSession(variables) {
5711
5681
  const { domain, ...others } = variables;
5712
- const res = await this.client.request(CREATE_GAME_SESSION_MUTATION, others, {
5682
+ const requestOptions = {
5713
5683
  headers: {
5714
5684
  ...domain && {
5715
5685
  Domain: domain
5716
5686
  }
5717
5687
  }
5718
- });
5688
+ };
5689
+ const res = this.environment === "staging" ? await this.client.request(CREATE_GAME_SESSION_MUTATION_NEXT, others, requestOptions) : await this.client.request(CREATE_GAME_SESSION_MUTATION, others, requestOptions);
5719
5690
  if (!res.ok) return res;
5720
5691
  if (res.data.createGameSession) {
5721
5692
  return {
@@ -7036,13 +7007,14 @@ var WalletService = class {
7036
7007
  }
7037
7008
  async createGameSession(variables) {
7038
7009
  const { domain, ...others } = variables;
7039
- const res = await this.client.request(CREATE_GAME_SESSION_MUTATION, others, {
7010
+ const requestOptions = {
7040
7011
  headers: {
7041
7012
  ...domain && {
7042
7013
  Domain: domain
7043
7014
  }
7044
7015
  }
7045
- });
7016
+ };
7017
+ const res = this.environment === "staging" ? await this.client.request(CREATE_GAME_SESSION_MUTATION_NEXT, others, requestOptions) : await this.client.request(CREATE_GAME_SESSION_MUTATION, others, requestOptions);
7046
7018
  if (!res.ok) return res;
7047
7019
  if (res.data.createGameSession) {
7048
7020
  return {
@@ -7349,5 +7321,5 @@ var ExtensionService = class {
7349
7321
  };
7350
7322
 
7351
7323
  export { AccountService, AuthService, CmsPortalService, ExtensionService, FileService, GameService, PortalService, ReportService, TriggerService, WalletService, captureFingerprintPreference, getFingerPrint, isIOSPlatform };
7352
- //# sourceMappingURL=chunk-AEJXQDQT.js.map
7353
- //# sourceMappingURL=chunk-AEJXQDQT.js.map
7324
+ //# sourceMappingURL=chunk-HRHTDXOZ.js.map
7325
+ //# sourceMappingURL=chunk-HRHTDXOZ.js.map