@opexa/portal-sdk 0.59.47 → 0.59.49
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-LRFLE5E6.js → chunk-EWOIQLLS.js} +74 -42
- package/dist/chunk-EWOIQLLS.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 +98 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +51 -3
- package/dist/index.d.ts +51 -3
- package/dist/index.js +31 -205
- package/dist/index.js.map +1 -1
- package/dist/services/index.cjs +70 -0
- package/dist/services/index.cjs.map +1 -1
- package/dist/services/index.d.cts +9 -3
- package/dist/services/index.d.ts +9 -3
- package/dist/services/index.js +2 -1
- package/dist/{types-DaaT487t.d.cts → types-BZVQCB0h.d.cts} +44 -57
- package/dist/{types-DaaT487t.d.ts → types-GXwS5U3c.d.ts} +44 -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 +15 -1
- package/dist/chunk-LRFLE5E6.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`
|
|
@@ -1593,6 +1585,19 @@ var CASHBACKS_QUERY = gql`
|
|
|
1593
1585
|
}
|
|
1594
1586
|
}
|
|
1595
1587
|
`;
|
|
1588
|
+
var PROMOS_AND_CASHBACKS_QUERY = gql`
|
|
1589
|
+
${CASHBACK_FRAGMENT}
|
|
1590
|
+
${PROMO_FRAGMENT}
|
|
1591
|
+
|
|
1592
|
+
query PromosAndCashbacks {
|
|
1593
|
+
cashbacks {
|
|
1594
|
+
...CashbackFragment
|
|
1595
|
+
}
|
|
1596
|
+
promos {
|
|
1597
|
+
...PromoFragment
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
`;
|
|
1596
1601
|
var BONUS_QUERY = gql`
|
|
1597
1602
|
${PROMO_FRAGMENT}
|
|
1598
1603
|
|
|
@@ -3238,6 +3243,34 @@ var WALLET_GAMES_QUERY = gql`
|
|
|
3238
3243
|
}
|
|
3239
3244
|
}
|
|
3240
3245
|
`;
|
|
3246
|
+
var PLATFORM_GAMES_QUERY = gql`
|
|
3247
|
+
query PlatformGames($first: Int, $after: Cursor, $filter: _GameFilterInput) {
|
|
3248
|
+
_games(first: $first, after: $after, filter: $filter) {
|
|
3249
|
+
totalCount
|
|
3250
|
+
pageInfo {
|
|
3251
|
+
hasNextPage
|
|
3252
|
+
endCursor
|
|
3253
|
+
}
|
|
3254
|
+
edges {
|
|
3255
|
+
cursor
|
|
3256
|
+
node {
|
|
3257
|
+
... on _Game {
|
|
3258
|
+
id
|
|
3259
|
+
reference
|
|
3260
|
+
name
|
|
3261
|
+
displayName
|
|
3262
|
+
type
|
|
3263
|
+
provider
|
|
3264
|
+
status
|
|
3265
|
+
hidden
|
|
3266
|
+
hasFreeBet
|
|
3267
|
+
hasJackpot
|
|
3268
|
+
}
|
|
3269
|
+
}
|
|
3270
|
+
}
|
|
3271
|
+
}
|
|
3272
|
+
}
|
|
3273
|
+
`;
|
|
3241
3274
|
var GOOGLE_CLIEND_ID_QUERY = gql`
|
|
3242
3275
|
query GoogleClientId {
|
|
3243
3276
|
googleClientId
|
|
@@ -4245,24 +4278,6 @@ var AccountService = class {
|
|
|
4245
4278
|
}
|
|
4246
4279
|
};
|
|
4247
4280
|
|
|
4248
|
-
// src/utils/status-code-to-operation-error.ts
|
|
4249
|
-
function statusCodeToOperationError(value, message) {
|
|
4250
|
-
const e = ERROR_MAP[value] ? ERROR_MAP[value] : ERROR_MAP[500];
|
|
4251
|
-
return {
|
|
4252
|
-
name: e.name,
|
|
4253
|
-
message: message ?? e.message
|
|
4254
|
-
};
|
|
4255
|
-
}
|
|
4256
|
-
var ERROR_MAP = {
|
|
4257
|
-
400: { name: "HttpBadRequest", message: "Bad Request" },
|
|
4258
|
-
401: { name: "HttpUnauthorized", message: "Unauthorized" },
|
|
4259
|
-
403: { name: "HttpForbidden", message: "Forbidden" },
|
|
4260
|
-
404: { name: "HttpNotFound", message: "Not Found" },
|
|
4261
|
-
408: { name: "HttpRequestTimeout", message: "Request Timeout" },
|
|
4262
|
-
429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
|
|
4263
|
-
500: { name: "HttpInternalServerError", message: "Internal Server Error" }
|
|
4264
|
-
};
|
|
4265
|
-
|
|
4266
4281
|
// src/services/auth.service.ts
|
|
4267
4282
|
var AuthService = class {
|
|
4268
4283
|
url;
|
|
@@ -4548,18 +4563,6 @@ var AuthService = class {
|
|
|
4548
4563
|
}
|
|
4549
4564
|
};
|
|
4550
4565
|
|
|
4551
|
-
// src/utils/call-if-fn.ts
|
|
4552
|
-
function isFunction(value) {
|
|
4553
|
-
return typeof value === "function";
|
|
4554
|
-
}
|
|
4555
|
-
function callIfFn(value, ...args) {
|
|
4556
|
-
if (isFunction(value)) {
|
|
4557
|
-
return value(...args);
|
|
4558
|
-
} else {
|
|
4559
|
-
return value;
|
|
4560
|
-
}
|
|
4561
|
-
}
|
|
4562
|
-
|
|
4563
4566
|
// src/services/cms-portal.service.ts
|
|
4564
4567
|
var CmsPortalService = class {
|
|
4565
4568
|
config;
|
|
@@ -5284,6 +5287,18 @@ var WalletService = class {
|
|
|
5284
5287
|
const res = await this.client.request(CASHBACKS_QUERY);
|
|
5285
5288
|
return res.ok ? { ok: res.ok, data: res.data.cashbacks } : res;
|
|
5286
5289
|
}
|
|
5290
|
+
async promosAndCashbacks() {
|
|
5291
|
+
const res = await this.client.request(
|
|
5292
|
+
PROMOS_AND_CASHBACKS_QUERY
|
|
5293
|
+
);
|
|
5294
|
+
return res.ok ? {
|
|
5295
|
+
ok: res.ok,
|
|
5296
|
+
data: {
|
|
5297
|
+
promos: res.data.promos,
|
|
5298
|
+
cashbacks: res.data.cashbacks
|
|
5299
|
+
}
|
|
5300
|
+
} : res;
|
|
5301
|
+
}
|
|
5287
5302
|
async availablePromos(variables) {
|
|
5288
5303
|
const res = await this.client.request(AVAILABLE_PROMOS_QUERY, variables);
|
|
5289
5304
|
return res.ok ? { ok: res.ok, data: res.data.availablePromos } : res;
|
|
@@ -6153,6 +6168,23 @@ var WalletService = class {
|
|
|
6153
6168
|
data: res.data.games
|
|
6154
6169
|
};
|
|
6155
6170
|
}
|
|
6171
|
+
async platformGames(variables) {
|
|
6172
|
+
const res = await this.client.request(PLATFORM_GAMES_QUERY, variables);
|
|
6173
|
+
if (!res.ok) return res;
|
|
6174
|
+
if (!res.data._games) {
|
|
6175
|
+
return {
|
|
6176
|
+
ok: false,
|
|
6177
|
+
error: {
|
|
6178
|
+
name: "UnknownError",
|
|
6179
|
+
message: "Something went wrong."
|
|
6180
|
+
}
|
|
6181
|
+
};
|
|
6182
|
+
}
|
|
6183
|
+
return {
|
|
6184
|
+
ok: true,
|
|
6185
|
+
data: res.data._games
|
|
6186
|
+
};
|
|
6187
|
+
}
|
|
6156
6188
|
async cabinetWithdrawal(variables) {
|
|
6157
6189
|
const res = await this.client.request(CABINET_WITHDRAWAL_QUERY, variables);
|
|
6158
6190
|
return res.ok ? { ok: res.ok, data: res.data.node } : res;
|
|
@@ -6207,6 +6239,6 @@ var ExtensionService = class {
|
|
|
6207
6239
|
}
|
|
6208
6240
|
};
|
|
6209
6241
|
|
|
6210
|
-
export { AccountService, AuthService, CmsPortalService, ExtensionService, FileService, GameService, PortalService, ReportService, TriggerService, WalletService
|
|
6211
|
-
//# sourceMappingURL=chunk-
|
|
6212
|
-
//# sourceMappingURL=chunk-
|
|
6242
|
+
export { AccountService, AuthService, CmsPortalService, ExtensionService, FileService, GameService, PortalService, ReportService, TriggerService, WalletService };
|
|
6243
|
+
//# sourceMappingURL=chunk-EWOIQLLS.js.map
|
|
6244
|
+
//# sourceMappingURL=chunk-EWOIQLLS.js.map
|