@opexa/portal-sdk 0.59.65 → 0.59.67
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/{chunk-CY6AO3EN.js → chunk-DKB4XCT5.js} +18 -52
- package/dist/chunk-DKB4XCT5.js.map +1 -0
- package/dist/index.cjs +24 -61
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -12
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +16 -50
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.d.cts +1 -1
- package/dist/services/index.d.ts +1 -1
- package/dist/services/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-CY6AO3EN.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -4626,7 +4626,7 @@ var AuthService = class {
|
|
|
4626
4626
|
return true;
|
|
4627
4627
|
}
|
|
4628
4628
|
}
|
|
4629
|
-
async sendVerificationCode(input
|
|
4629
|
+
async sendVerificationCode(input) {
|
|
4630
4630
|
if (input.channel === "EMAIL")
|
|
4631
4631
|
throw new Error("Email channel is not yet supported");
|
|
4632
4632
|
function getErrorCode(message) {
|
|
@@ -4644,15 +4644,8 @@ var AuthService = class {
|
|
|
4644
4644
|
try {
|
|
4645
4645
|
const res = await fetch(`${this.url}/otps`, {
|
|
4646
4646
|
method: "POST",
|
|
4647
|
-
headers:
|
|
4648
|
-
|
|
4649
|
-
...recaptchaResponse && {
|
|
4650
|
-
"google-recaptcha-response": recaptchaResponse
|
|
4651
|
-
}
|
|
4652
|
-
},
|
|
4653
|
-
body: JSON.stringify({
|
|
4654
|
-
...input
|
|
4655
|
-
})
|
|
4647
|
+
headers: this.headers,
|
|
4648
|
+
body: JSON.stringify(input)
|
|
4656
4649
|
});
|
|
4657
4650
|
if (res.status === 403) {
|
|
4658
4651
|
const data = await res.json();
|
|
@@ -5116,13 +5109,7 @@ var PortalService = class {
|
|
|
5116
5109
|
};
|
|
5117
5110
|
}
|
|
5118
5111
|
async topWinsNext() {
|
|
5119
|
-
const res = await this.client.request(
|
|
5120
|
-
TOP_WINS_NEXT_QUERY,
|
|
5121
|
-
void 0,
|
|
5122
|
-
{
|
|
5123
|
-
method: "GET"
|
|
5124
|
-
}
|
|
5125
|
-
);
|
|
5112
|
+
const res = await this.client.request(TOP_WINS_NEXT_QUERY);
|
|
5126
5113
|
if (!res.ok) return res;
|
|
5127
5114
|
return {
|
|
5128
5115
|
ok: true,
|
|
@@ -5130,13 +5117,7 @@ var PortalService = class {
|
|
|
5130
5117
|
};
|
|
5131
5118
|
}
|
|
5132
5119
|
async topWins__next() {
|
|
5133
|
-
const res = await this.client.request(
|
|
5134
|
-
TOP_WINS_QUERY__NEXT,
|
|
5135
|
-
void 0,
|
|
5136
|
-
{
|
|
5137
|
-
method: "GET"
|
|
5138
|
-
}
|
|
5139
|
-
);
|
|
5120
|
+
const res = await this.client.request(TOP_WINS_QUERY__NEXT);
|
|
5140
5121
|
if (!res.ok) return res;
|
|
5141
5122
|
return {
|
|
5142
5123
|
ok: true,
|
|
@@ -5214,9 +5195,7 @@ var ReportService = class {
|
|
|
5214
5195
|
return res.ok ? { ok: res.ok, data: res.data.promoByCode } : res;
|
|
5215
5196
|
}
|
|
5216
5197
|
async jackpots(variables) {
|
|
5217
|
-
const res = await this.client.request(JACKPOTS_QUERY, variables
|
|
5218
|
-
method: "GET"
|
|
5219
|
-
});
|
|
5198
|
+
const res = await this.client.request(JACKPOTS_QUERY, variables);
|
|
5220
5199
|
if (!res.ok) return res;
|
|
5221
5200
|
return {
|
|
5222
5201
|
ok: true,
|
|
@@ -5224,9 +5203,7 @@ var ReportService = class {
|
|
|
5224
5203
|
};
|
|
5225
5204
|
}
|
|
5226
5205
|
async _jackpots(variables) {
|
|
5227
|
-
const res = await this.client.request(_JACKPOTS_QUERY, variables
|
|
5228
|
-
method: "GET"
|
|
5229
|
-
});
|
|
5206
|
+
const res = await this.client.request(_JACKPOTS_QUERY, variables);
|
|
5230
5207
|
if (!res.ok) return res;
|
|
5231
5208
|
return {
|
|
5232
5209
|
ok: true,
|
|
@@ -5234,9 +5211,7 @@ var ReportService = class {
|
|
|
5234
5211
|
};
|
|
5235
5212
|
}
|
|
5236
5213
|
async jackpotsIds(variables) {
|
|
5237
|
-
const res = await this.client.request(JACKPOTS_IDS_QUERY, variables
|
|
5238
|
-
method: "GET"
|
|
5239
|
-
});
|
|
5214
|
+
const res = await this.client.request(JACKPOTS_IDS_QUERY, variables);
|
|
5240
5215
|
if (!res.ok) return res;
|
|
5241
5216
|
return {
|
|
5242
5217
|
ok: true,
|
|
@@ -5252,9 +5227,7 @@ var ReportService = class {
|
|
|
5252
5227
|
};
|
|
5253
5228
|
}
|
|
5254
5229
|
async tournaments(variables) {
|
|
5255
|
-
const res = await this.client.request(TOURNAMENTS_QUERY, variables
|
|
5256
|
-
method: "GET"
|
|
5257
|
-
});
|
|
5230
|
+
const res = await this.client.request(TOURNAMENTS_QUERY, variables);
|
|
5258
5231
|
if (!res.ok) return res;
|
|
5259
5232
|
return {
|
|
5260
5233
|
ok: true,
|
|
@@ -5262,9 +5235,7 @@ var ReportService = class {
|
|
|
5262
5235
|
};
|
|
5263
5236
|
}
|
|
5264
5237
|
async tournamentsIds(variables) {
|
|
5265
|
-
const res = await this.client.request(TOURNAMENTS_IDS_QUERY, variables
|
|
5266
|
-
method: "GET"
|
|
5267
|
-
});
|
|
5238
|
+
const res = await this.client.request(TOURNAMENTS_IDS_QUERY, variables);
|
|
5268
5239
|
if (!res.ok) return res;
|
|
5269
5240
|
return {
|
|
5270
5241
|
ok: true,
|
|
@@ -5475,24 +5446,19 @@ var WalletService = class {
|
|
|
5475
5446
|
this.client = client;
|
|
5476
5447
|
}
|
|
5477
5448
|
async promos() {
|
|
5478
|
-
const res = await this.client.request(PROMOS_QUERY, void 0
|
|
5479
|
-
method: "GET"
|
|
5480
|
-
});
|
|
5449
|
+
const res = await this.client.request(PROMOS_QUERY, void 0);
|
|
5481
5450
|
return res.ok ? { ok: res.ok, data: res.data.promos } : res;
|
|
5482
5451
|
}
|
|
5483
5452
|
async cashbacks() {
|
|
5484
|
-
const res = await this.client.request(
|
|
5485
|
-
|
|
5486
|
-
|
|
5453
|
+
const res = await this.client.request(
|
|
5454
|
+
CASHBACKS_QUERY,
|
|
5455
|
+
void 0
|
|
5456
|
+
);
|
|
5487
5457
|
return res.ok ? { ok: res.ok, data: res.data.cashbacks } : res;
|
|
5488
5458
|
}
|
|
5489
5459
|
async promosAndCashbacks() {
|
|
5490
5460
|
const res = await this.client.request(
|
|
5491
|
-
PROMOS_AND_CASHBACKS_QUERY
|
|
5492
|
-
void 0,
|
|
5493
|
-
{
|
|
5494
|
-
method: "GET"
|
|
5495
|
-
}
|
|
5461
|
+
PROMOS_AND_CASHBACKS_QUERY
|
|
5496
5462
|
);
|
|
5497
5463
|
return res.ok ? {
|
|
5498
5464
|
ok: res.ok,
|
|
@@ -10492,18 +10458,15 @@ var Sdk = class {
|
|
|
10492
10458
|
}
|
|
10493
10459
|
});
|
|
10494
10460
|
}
|
|
10495
|
-
async sendVerificationCode__next(input
|
|
10461
|
+
async sendVerificationCode__next(input) {
|
|
10496
10462
|
if (input.type === "SMS") {
|
|
10497
|
-
return this.authService.sendVerificationCode(
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
},
|
|
10505
|
-
recaptchaResponse
|
|
10506
|
-
);
|
|
10463
|
+
return this.authService.sendVerificationCode({
|
|
10464
|
+
channel: "SMS",
|
|
10465
|
+
recipient: addAreaCode(input.mobileNumber, await this.locale),
|
|
10466
|
+
...input.strict && {
|
|
10467
|
+
verificationType: "MEMBER"
|
|
10468
|
+
}
|
|
10469
|
+
});
|
|
10507
10470
|
}
|
|
10508
10471
|
throw new Error("'Email' verification code is not yet supported");
|
|
10509
10472
|
}
|