@opexa/portal-sdk 0.59.48 → 0.59.50
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-TFG2D5CR.js → chunk-6BZILZI4.js} +82 -46
- package/dist/chunk-6BZILZI4.js.map +1 -0
- package/dist/chunk-JTAO2DVT.js +208 -0
- package/dist/chunk-JTAO2DVT.js.map +1 -0
- package/dist/chunk-WVFSGB7Y.js +43 -0
- package/dist/chunk-WVFSGB7Y.js.map +1 -0
- package/dist/graphql-client-Czq2Pigo.d.cts +58 -0
- package/dist/graphql-client-Czq2Pigo.d.ts +58 -0
- package/dist/index.cjs +94 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -3
- package/dist/index.d.ts +6 -3
- package/dist/index.js +19 -204
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +78 -4
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.d.cts +5 -3
- package/dist/services/index.d.ts +5 -3
- package/dist/services/index.js +2 -1
- package/dist/{types-DF4cppjz.d.cts → types-BZVQCB0h.d.cts} +35 -57
- package/dist/{types-DF4cppjz.d.ts → types-GXwS5U3c.d.ts} +35 -57
- package/dist/utils/index.cjs +249 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +5 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-TFG2D5CR.js.map +0 -1
|
@@ -1,12 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
function gql(strings, ...values) {
|
|
3
|
-
let result = "";
|
|
4
|
-
for (const [index, string] of strings.entries()) {
|
|
5
|
-
const value = values.at(index) ?? "";
|
|
6
|
-
result = `${result}${string}${value}`;
|
|
7
|
-
}
|
|
8
|
-
return result.trim();
|
|
9
|
-
}
|
|
1
|
+
import { gql, statusCodeToOperationError, callIfFn } from './chunk-WVFSGB7Y.js';
|
|
10
2
|
|
|
11
3
|
// src/services/queries.ts
|
|
12
4
|
var FILE_FRAGMENT = gql`
|
|
@@ -1594,15 +1586,44 @@ var CASHBACKS_QUERY = gql`
|
|
|
1594
1586
|
}
|
|
1595
1587
|
`;
|
|
1596
1588
|
var PROMOS_AND_CASHBACKS_QUERY = gql`
|
|
1597
|
-
${
|
|
1598
|
-
${PROMO_FRAGMENT}
|
|
1589
|
+
${FILE_FRAGMENT}
|
|
1599
1590
|
|
|
1600
1591
|
query PromosAndCashbacks {
|
|
1601
1592
|
cashbacks {
|
|
1602
|
-
|
|
1593
|
+
id
|
|
1594
|
+
name
|
|
1595
|
+
banner {
|
|
1596
|
+
...FileFragment
|
|
1597
|
+
}
|
|
1598
|
+
minimumCashback
|
|
1599
|
+
maximumMonthlyCashback
|
|
1600
|
+
status
|
|
1601
|
+
description
|
|
1602
|
+
activationStartDateTime
|
|
1603
|
+
activationEndDateTime
|
|
1604
|
+
turnoverContributionPercentagePerGameProvider
|
|
1605
|
+
dateTimeCreated
|
|
1606
|
+
dateTimeLastUpdated
|
|
1603
1607
|
}
|
|
1604
1608
|
promos {
|
|
1605
|
-
|
|
1609
|
+
id
|
|
1610
|
+
type
|
|
1611
|
+
name
|
|
1612
|
+
banner {
|
|
1613
|
+
...FileFragment
|
|
1614
|
+
}
|
|
1615
|
+
status
|
|
1616
|
+
description
|
|
1617
|
+
maximumBonusAmount
|
|
1618
|
+
minimumBonusAmount
|
|
1619
|
+
maximumDepositAmount
|
|
1620
|
+
minimumDepositAmount
|
|
1621
|
+
depositBonusAmountPercentage
|
|
1622
|
+
activationStartDateTime
|
|
1623
|
+
turnoverRequirementContributionPercentagePerGameProvider
|
|
1624
|
+
activationEndDateTime
|
|
1625
|
+
dateTimeCreated
|
|
1626
|
+
dateTimeLastUpdated
|
|
1606
1627
|
}
|
|
1607
1628
|
}
|
|
1608
1629
|
`;
|
|
@@ -3251,6 +3272,34 @@ var WALLET_GAMES_QUERY = gql`
|
|
|
3251
3272
|
}
|
|
3252
3273
|
}
|
|
3253
3274
|
`;
|
|
3275
|
+
var PLATFORM_GAMES_QUERY = gql`
|
|
3276
|
+
query PlatformGames($first: Int, $after: Cursor, $filter: _GameFilterInput) {
|
|
3277
|
+
_games(first: $first, after: $after, filter: $filter) {
|
|
3278
|
+
totalCount
|
|
3279
|
+
pageInfo {
|
|
3280
|
+
hasNextPage
|
|
3281
|
+
endCursor
|
|
3282
|
+
}
|
|
3283
|
+
edges {
|
|
3284
|
+
cursor
|
|
3285
|
+
node {
|
|
3286
|
+
... on _Game {
|
|
3287
|
+
id
|
|
3288
|
+
reference
|
|
3289
|
+
name
|
|
3290
|
+
displayName
|
|
3291
|
+
type
|
|
3292
|
+
provider
|
|
3293
|
+
status
|
|
3294
|
+
hidden
|
|
3295
|
+
hasFreeBet
|
|
3296
|
+
hasJackpot
|
|
3297
|
+
}
|
|
3298
|
+
}
|
|
3299
|
+
}
|
|
3300
|
+
}
|
|
3301
|
+
}
|
|
3302
|
+
`;
|
|
3254
3303
|
var GOOGLE_CLIEND_ID_QUERY = gql`
|
|
3255
3304
|
query GoogleClientId {
|
|
3256
3305
|
googleClientId
|
|
@@ -4258,24 +4307,6 @@ var AccountService = class {
|
|
|
4258
4307
|
}
|
|
4259
4308
|
};
|
|
4260
4309
|
|
|
4261
|
-
// src/utils/status-code-to-operation-error.ts
|
|
4262
|
-
function statusCodeToOperationError(value, message) {
|
|
4263
|
-
const e = ERROR_MAP[value] ? ERROR_MAP[value] : ERROR_MAP[500];
|
|
4264
|
-
return {
|
|
4265
|
-
name: e.name,
|
|
4266
|
-
message: message ?? e.message
|
|
4267
|
-
};
|
|
4268
|
-
}
|
|
4269
|
-
var ERROR_MAP = {
|
|
4270
|
-
400: { name: "HttpBadRequest", message: "Bad Request" },
|
|
4271
|
-
401: { name: "HttpUnauthorized", message: "Unauthorized" },
|
|
4272
|
-
403: { name: "HttpForbidden", message: "Forbidden" },
|
|
4273
|
-
404: { name: "HttpNotFound", message: "Not Found" },
|
|
4274
|
-
408: { name: "HttpRequestTimeout", message: "Request Timeout" },
|
|
4275
|
-
429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
|
|
4276
|
-
500: { name: "HttpInternalServerError", message: "Internal Server Error" }
|
|
4277
|
-
};
|
|
4278
|
-
|
|
4279
4310
|
// src/services/auth.service.ts
|
|
4280
4311
|
var AuthService = class {
|
|
4281
4312
|
url;
|
|
@@ -4561,18 +4592,6 @@ var AuthService = class {
|
|
|
4561
4592
|
}
|
|
4562
4593
|
};
|
|
4563
4594
|
|
|
4564
|
-
// src/utils/call-if-fn.ts
|
|
4565
|
-
function isFunction(value) {
|
|
4566
|
-
return typeof value === "function";
|
|
4567
|
-
}
|
|
4568
|
-
function callIfFn(value, ...args) {
|
|
4569
|
-
if (isFunction(value)) {
|
|
4570
|
-
return value(...args);
|
|
4571
|
-
} else {
|
|
4572
|
-
return value;
|
|
4573
|
-
}
|
|
4574
|
-
}
|
|
4575
|
-
|
|
4576
4595
|
// src/services/cms-portal.service.ts
|
|
4577
4596
|
var CmsPortalService = class {
|
|
4578
4597
|
config;
|
|
@@ -6178,6 +6197,23 @@ var WalletService = class {
|
|
|
6178
6197
|
data: res.data.games
|
|
6179
6198
|
};
|
|
6180
6199
|
}
|
|
6200
|
+
async platformGames(variables) {
|
|
6201
|
+
const res = await this.client.request(PLATFORM_GAMES_QUERY, variables);
|
|
6202
|
+
if (!res.ok) return res;
|
|
6203
|
+
if (!res.data._games) {
|
|
6204
|
+
return {
|
|
6205
|
+
ok: false,
|
|
6206
|
+
error: {
|
|
6207
|
+
name: "UnknownError",
|
|
6208
|
+
message: "Something went wrong."
|
|
6209
|
+
}
|
|
6210
|
+
};
|
|
6211
|
+
}
|
|
6212
|
+
return {
|
|
6213
|
+
ok: true,
|
|
6214
|
+
data: res.data._games
|
|
6215
|
+
};
|
|
6216
|
+
}
|
|
6181
6217
|
async cabinetWithdrawal(variables) {
|
|
6182
6218
|
const res = await this.client.request(CABINET_WITHDRAWAL_QUERY, variables);
|
|
6183
6219
|
return res.ok ? { ok: res.ok, data: res.data.node } : res;
|
|
@@ -6232,6 +6268,6 @@ var ExtensionService = class {
|
|
|
6232
6268
|
}
|
|
6233
6269
|
};
|
|
6234
6270
|
|
|
6235
|
-
export { AccountService, AuthService, CmsPortalService, ExtensionService, FileService, GameService, PortalService, ReportService, TriggerService, WalletService
|
|
6236
|
-
//# sourceMappingURL=chunk-
|
|
6237
|
-
//# sourceMappingURL=chunk-
|
|
6271
|
+
export { AccountService, AuthService, CmsPortalService, ExtensionService, FileService, GameService, PortalService, ReportService, TriggerService, WalletService };
|
|
6272
|
+
//# sourceMappingURL=chunk-6BZILZI4.js.map
|
|
6273
|
+
//# sourceMappingURL=chunk-6BZILZI4.js.map
|