@opexa/portal-sdk 0.0.24 → 0.0.26
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.js +76 -95
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +436 -417
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/object-type.d.ts +1 -0
- package/dist/sdk/sdk.d.ts +26 -3
- package/dist/sdk/transformer.d.ts +3 -0
- package/dist/sdk/types.d.ts +21 -3
- package/dist/services/cms-portal.service.d.ts +5 -4
- package/dist/services/game.service.d.ts +2 -0
- package/dist/services/queries.d.ts +2 -2
- package/dist/services/types.d.ts +31 -10
- package/dist/services/wallet.service.d.ts +2 -0
- package/package.json +1 -1
package/dist/sdk/sdk.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountReturn, AnnouncementsInput, AnnouncementsReturn, AuthenticateInput, AuthenticateReturn, AvailablePromosReturn, BetRecordsInput, BetRecordsReturn, BonusReturn, CashbackBonusReturn, CashbacksReturn, ClaimCashbackBonusReturn, CreateAccountInput, CreateAccountReturn, CreateDepositInput, CreateDepositReturn, CreateGameSessionInput, CreateGameSessionReturn, CreateWithdrawalInput, CreateWithdrawalReturn, DeleteAccountReturn, DepositRecordsInput, DepositRecordsReturn, DepositReturn, DepositsCountReturn, EndGameSessionReturn, EndGameSessionReturn__Legacy, FileReturn,
|
|
1
|
+
import { AccountReturn, AnnouncementsInput, AnnouncementsReturn, AuthenticateInput, AuthenticateReturn, AvailablePromosReturn, BetRecordsInput, BetRecordsReturn, BonusReturn, CashbackBonusReturn, CashbacksReturn, ClaimCashbackBonusReturn, CreateAccountInput, CreateAccountReturn, CreateDepositInput, CreateDepositReturn, CreateGameSessionInput, CreateGameSessionReturn, CreateWithdrawalInput, CreateWithdrawalReturn, DeleteAccountReturn, DepositRecordsInput, DepositRecordsReturn, DepositReturn, DepositsCountReturn, EndGameSessionReturn, EndGameSessionReturn__Legacy, FileReturn, GameReturn__Next, GamesByNameInput, GamesByNameReturn, GameSessionReturn, GamesInput, GamesReturn, GamesReturn__Next, LatestBetRecordsReturn, MayaSignInInput, MayaSignInReturn, MobileNumberSignInInput, MobileNumberSignInReturn, NameAndPasswordSignInInput, NameAndPasswordSignInReturn, PlatformReturn, PointsToCashConversionReturn, PointsWalletReturn, ProfileCompletionReturn, PromosReturn, RemainingDailyWithdrawalsCountReturn, ResetPasswordInput, ResetPasswordReturn, SendVerificationCodeReturn, SessionReturn, SiteReturn, SubmitVerificationDetailsInput, SubmitVerificationDetailsReturn, TransactionRecordsInput, TransactionRecordsReturn, UpdateAccountInput, UpdateAccountReturn, UpdateVerificationDetailsInput, UpdateVerificationDetailsReturn, UploadImageFileInput, UploadImageFileReturn, VerificationDetailsReturn, VerifyMobileNumberReturn, WalletReturn, WatchSessionInput, WithdrawalRecordsInput, WithdrawalRecordsReturn } from './types';
|
|
2
2
|
|
|
3
3
|
export interface SdkConfig {
|
|
4
4
|
site: string;
|
|
@@ -221,15 +221,33 @@ export declare class Sdk {
|
|
|
221
221
|
bonus(): Promise<BonusReturn>;
|
|
222
222
|
cashbackBonuses(): Promise<CashbackBonusReturn>;
|
|
223
223
|
claimCashbackBonus(id: string): Promise<ClaimCashbackBonusReturn>;
|
|
224
|
-
|
|
224
|
+
/** @deprecated use `game__next` */
|
|
225
|
+
game(id: string): Promise<{
|
|
226
|
+
ok: false;
|
|
227
|
+
data?: never;
|
|
228
|
+
error: import('../utils/types').OperationError<import('../utils/types').HttpError | "UnknownError"> | import('../utils/types').OperationError<never>;
|
|
229
|
+
} | {
|
|
230
|
+
ok: true;
|
|
231
|
+
data: import('./types').Game__Next | null;
|
|
232
|
+
error?: never;
|
|
233
|
+
}>;
|
|
234
|
+
game__next(id: string): Promise<GameReturn__Next>;
|
|
235
|
+
/** @deprecated use `games__next` */
|
|
225
236
|
games(input?: GamesInput): Promise<GamesReturn>;
|
|
226
|
-
games__next(input?: GamesInput): Promise<
|
|
237
|
+
games__next(input?: GamesInput): Promise<GamesReturn__Next>;
|
|
238
|
+
/** @deprecated use `games__next` */
|
|
227
239
|
games__legacy(input?: GamesInput): Promise<GamesReturn>;
|
|
240
|
+
/** @deprecated use `games__next` */
|
|
228
241
|
gamesByName(input?: GamesByNameInput): Promise<GamesByNameReturn>;
|
|
242
|
+
/** @deprecated use `games__next` */
|
|
229
243
|
gamesByName__legacy(input?: GamesByNameInput): Promise<GamesByNameReturn>;
|
|
244
|
+
/** @deprecated use `gameSession__next` */
|
|
230
245
|
gameSession(id: string): Promise<GameSessionReturn>;
|
|
246
|
+
/** @deprecated use `gameSession__next` */
|
|
231
247
|
gameSession__legacy(id: string): Promise<GameSessionReturn>;
|
|
248
|
+
gameSession__next(id: string): Promise<GameSessionReturn>;
|
|
232
249
|
/**
|
|
250
|
+
* @deprecated use `createGameSession__next`
|
|
233
251
|
* @example
|
|
234
252
|
* ```ts
|
|
235
253
|
* const res = await sdk.createGameSession({
|
|
@@ -245,9 +263,14 @@ export declare class Sdk {
|
|
|
245
263
|
* ```
|
|
246
264
|
*/
|
|
247
265
|
createGameSession(input: CreateGameSessionInput): Promise<CreateGameSessionReturn>;
|
|
266
|
+
/** @deprecated use `createGameSession__next` */
|
|
248
267
|
createGameSession__legacy(input: CreateGameSessionInput): Promise<CreateGameSessionReturn>;
|
|
268
|
+
createGameSession__next(input: CreateGameSessionInput): Promise<CreateGameSessionReturn>;
|
|
269
|
+
/** @deprecated use `endGameSession__next` */
|
|
249
270
|
endGameSession(id: string): Promise<EndGameSessionReturn>;
|
|
271
|
+
/** @deprecated use `endGameSession__next` */
|
|
250
272
|
endGameSession__legacy(id: string): Promise<EndGameSessionReturn__Legacy>;
|
|
273
|
+
endGameSession__next(id: string): Promise<EndGameSessionReturn__Legacy>;
|
|
251
274
|
file(id: string): Promise<FileReturn>;
|
|
252
275
|
/**
|
|
253
276
|
* @example
|
|
@@ -20,7 +20,9 @@ export declare class Transformer {
|
|
|
20
20
|
betRecord: (data: Internal.BetRecord) => External.BetRecord;
|
|
21
21
|
latestBetRecord: (data: Internal.LatestBetRecord) => External.LatestBetRecord;
|
|
22
22
|
transactionRecord: (data: Internal.TransactionRecord) => External.TransactionRecord;
|
|
23
|
+
/** @deprecated */
|
|
23
24
|
game: (data: Internal.Game) => External.Game;
|
|
25
|
+
game__next: (data: Internal.Game__Next) => External.Game__Next;
|
|
24
26
|
gameSession: (data: Internal.GameSession) => External.GameSession;
|
|
25
27
|
promo: (data: Internal.Promo) => External.Promo;
|
|
26
28
|
cashback: (data: Internal.Cashback) => External.Cashback;
|
|
@@ -43,6 +45,7 @@ export declare class Transformer {
|
|
|
43
45
|
private latestBetRecord;
|
|
44
46
|
private transactionRecord;
|
|
45
47
|
private game;
|
|
48
|
+
private game__next;
|
|
46
49
|
private gameSession;
|
|
47
50
|
private promo;
|
|
48
51
|
private cashback;
|
package/dist/sdk/types.d.ts
CHANGED
|
@@ -398,6 +398,7 @@ export type PointsToCashConversionError = UnionAlias<Internal.PointsToCashConver
|
|
|
398
398
|
export type PointsToCashConversionReturn = OperationResult<PointsToCashConversionError>;
|
|
399
399
|
export type GameType = UnionAlias<Internal.GameType>;
|
|
400
400
|
export type GameProvider = UnionAlias<Internal.GameProvider>;
|
|
401
|
+
/** @deprecated use `Games__Next` */
|
|
401
402
|
export interface Game {
|
|
402
403
|
id: string;
|
|
403
404
|
name: string;
|
|
@@ -405,13 +406,22 @@ export interface Game {
|
|
|
405
406
|
images: string[];
|
|
406
407
|
provider: GameProvider;
|
|
407
408
|
}
|
|
409
|
+
export interface Game__Next extends Game {
|
|
410
|
+
externalId: string;
|
|
411
|
+
}
|
|
408
412
|
export interface GamesInput extends Internal.GamesQueryVariables {
|
|
409
413
|
}
|
|
414
|
+
/** @deprecated use `GamesReturn__Next` */
|
|
410
415
|
export type GamesReturn = OperationResult<never, PaginatedQueryResult<'games', Game>>;
|
|
411
|
-
export type
|
|
416
|
+
export type GamesReturn__Next = OperationResult<never, PaginatedQueryResult<'games', Game__Next>>;
|
|
417
|
+
/** @deprecated */
|
|
412
418
|
export interface GamesByNameInput extends Internal.GamesByNameQueryVariables {
|
|
413
419
|
}
|
|
420
|
+
/** @deprecated */
|
|
414
421
|
export type GamesByNameReturn = OperationResult<never, Game[]>;
|
|
422
|
+
/** @deprecated use `GameReturn__Next` */
|
|
423
|
+
export type GameReturn = OperationResult<never, Game | null>;
|
|
424
|
+
export type GameReturn__Next = OperationResult<never, Game__Next | null>;
|
|
415
425
|
export type GameSessionStatus = UnionAlias<Internal.GameSessionStatus>;
|
|
416
426
|
export type GameSession = {
|
|
417
427
|
id: string;
|
|
@@ -468,7 +478,11 @@ export type AnnouncementsReturn = OperationResult<never, PaginatedQueryResult<'a
|
|
|
468
478
|
export type BetRecordStatus = UnionAlias<Internal.BetRecordStatus>;
|
|
469
479
|
export interface BetRecord {
|
|
470
480
|
id: string;
|
|
471
|
-
game:
|
|
481
|
+
game: {
|
|
482
|
+
name: string;
|
|
483
|
+
type: GameType;
|
|
484
|
+
provider: GameProvider;
|
|
485
|
+
};
|
|
472
486
|
status: BetRecordStatus;
|
|
473
487
|
serialCode: string;
|
|
474
488
|
vendorRoundId?: string;
|
|
@@ -497,7 +511,11 @@ export interface LatestBetRecord {
|
|
|
497
511
|
id: string;
|
|
498
512
|
name: string;
|
|
499
513
|
};
|
|
500
|
-
game:
|
|
514
|
+
game: {
|
|
515
|
+
name: string;
|
|
516
|
+
type: GameType;
|
|
517
|
+
provider: GameProvider;
|
|
518
|
+
};
|
|
501
519
|
bet: number;
|
|
502
520
|
payout: number;
|
|
503
521
|
validBet: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OperationResult } from '../utils/types';
|
|
2
|
-
import {
|
|
2
|
+
import { Game__Next, GamesQueryVariables, PaginatedQueryResult, Site } from './types';
|
|
3
3
|
|
|
4
4
|
export interface CmsPortalServiceConfig {
|
|
5
5
|
url: string;
|
|
@@ -11,7 +11,8 @@ export declare class CmsPortalService {
|
|
|
11
11
|
private siteId;
|
|
12
12
|
private platformId;
|
|
13
13
|
constructor(config: CmsPortalServiceConfig);
|
|
14
|
-
|
|
15
|
-
games(variables?: GamesQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<
|
|
16
|
-
game(id: string): Promise<OperationResult<never,
|
|
14
|
+
self(): Promise<OperationResult<never, Site>>;
|
|
15
|
+
games(variables?: GamesQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<Game__Next>>>;
|
|
16
|
+
game(id: string): Promise<OperationResult<never, Game__Next | null | undefined>>;
|
|
17
|
+
private getJson;
|
|
17
18
|
}
|
|
@@ -5,7 +5,9 @@ import { CreateGameSessionError, CreateGameSessionMutationVariables, EndGameSess
|
|
|
5
5
|
export declare class GameService {
|
|
6
6
|
private client;
|
|
7
7
|
constructor(client: GraphQLClient);
|
|
8
|
+
/** @deprecated */
|
|
8
9
|
games(variables?: GamesQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<Game>>>;
|
|
10
|
+
/** @deprecated */
|
|
9
11
|
gamesByName(variables?: GamesByNameQueryVariables): Promise<{
|
|
10
12
|
ok: false;
|
|
11
13
|
data?: never;
|
|
@@ -4,13 +4,13 @@ export declare const UPLOAD_PRIVATE_IMAGE_FILE_MUTATION: string;
|
|
|
4
4
|
export declare const WALLET_QUERY: string;
|
|
5
5
|
export declare const POINTS_WALLET_QUERY: string;
|
|
6
6
|
export declare const POINTS_TO_CASH_CONVERSION_MUTATION: string;
|
|
7
|
-
|
|
7
|
+
/** @deprecated */
|
|
8
8
|
export declare const GAMES_QUERY: string;
|
|
9
|
+
/** @deprecated */
|
|
9
10
|
export declare const GAMES_BY_NAME_QUERY: string;
|
|
10
11
|
export declare const GAME_SESSION_QUERY: string;
|
|
11
12
|
export declare const CREATE_GAME_SESSION_MUTATION: string;
|
|
12
13
|
export declare const END_GAME_SESSION_MUTATION: string;
|
|
13
|
-
export declare const GAME_SESSION_QUERY_LEGACY: string;
|
|
14
14
|
export declare const END_GAME_SESSION_MUTATION__LEGACY: string;
|
|
15
15
|
export declare const ANNOUNCEMENTS_QUERY: string;
|
|
16
16
|
export declare const WITHDRAWAL_RECORDS_QUERY: string;
|
package/dist/services/types.d.ts
CHANGED
|
@@ -18,9 +18,6 @@ export interface PaginatedQueryResult<T> {
|
|
|
18
18
|
totalCount: number;
|
|
19
19
|
}
|
|
20
20
|
export type PaginatedQuery<Key extends string, T> = Record<Key, PaginatedQueryResult<T>>;
|
|
21
|
-
export type WithCursor<T> = T & {
|
|
22
|
-
cursor: string;
|
|
23
|
-
};
|
|
24
21
|
export interface ObjectIdFilterField {
|
|
25
22
|
equal?: string;
|
|
26
23
|
notEqual?: string;
|
|
@@ -32,7 +29,6 @@ export interface StringFilterField {
|
|
|
32
29
|
notEqual?: string;
|
|
33
30
|
in?: string[];
|
|
34
31
|
notIn?: string[];
|
|
35
|
-
contains?: string;
|
|
36
32
|
}
|
|
37
33
|
export interface NumberFilterField {
|
|
38
34
|
equal?: number;
|
|
@@ -120,49 +116,66 @@ export interface AnnouncementsQueryVariables {
|
|
|
120
116
|
}
|
|
121
117
|
export type GameType = 'SLOTS' | 'SPORTS' | 'BINGO' | 'FISHING' | 'LIVE' | 'GAMES' | 'TABLE';
|
|
122
118
|
export type GameProvider = 'JILI' | 'PGSOFT' | 'FACHAI' | 'PLAYTECH' | 'CQ9' | 'JDB' | 'BOOONGO' | 'HABANERO' | 'RELAXGAMING' | 'DG' | 'E2E' | 'BTI' | 'DARWIN' | 'MEGABALL' | 'DRBINGO' | 'RTG';
|
|
119
|
+
export type GameStatus = 'ACTIVE' | 'INACTIVE';
|
|
120
|
+
/** @deprecated */
|
|
123
121
|
export interface Game {
|
|
124
122
|
id: string;
|
|
125
123
|
name: string;
|
|
126
124
|
type: GameType;
|
|
127
125
|
provider: GameProvider;
|
|
128
126
|
}
|
|
127
|
+
export interface Game__Next extends Game {
|
|
128
|
+
game: string;
|
|
129
|
+
tags: string[];
|
|
130
|
+
rank: Decimal;
|
|
131
|
+
site: string;
|
|
132
|
+
cursor: string;
|
|
133
|
+
status: GameStatus;
|
|
134
|
+
platform: string;
|
|
135
|
+
externalId: string;
|
|
136
|
+
dateTimeCreated: DateString;
|
|
137
|
+
dateTimeLastUpdated: DateString;
|
|
138
|
+
}
|
|
129
139
|
export interface GameQueryVariables {
|
|
130
140
|
id: string;
|
|
131
141
|
}
|
|
142
|
+
/** @deprecated */
|
|
132
143
|
export interface GameQuery {
|
|
133
144
|
node?: Game | null;
|
|
134
145
|
}
|
|
135
146
|
export interface GamesQueryVariables {
|
|
136
147
|
after?: string;
|
|
137
148
|
first?: number;
|
|
149
|
+
search?: string;
|
|
138
150
|
filter?: {
|
|
139
|
-
name?: StringFilterField;
|
|
140
151
|
type?: EnumFilterField<GameType>;
|
|
141
152
|
provider?: EnumFilterField<GameProvider>;
|
|
142
153
|
};
|
|
143
154
|
}
|
|
155
|
+
/** @deprecated */
|
|
144
156
|
export interface GamesQuery extends PaginatedQuery<'games', Game> {
|
|
145
157
|
}
|
|
158
|
+
/** @deprecated */
|
|
146
159
|
export interface GamesByNameQueryVariables {
|
|
147
160
|
first?: number;
|
|
148
161
|
search: string;
|
|
149
162
|
filter?: GamesQueryVariables['filter'];
|
|
150
163
|
}
|
|
164
|
+
/** @deprecated */
|
|
151
165
|
export interface GamesByNameQuery {
|
|
152
166
|
gamesByName: Game[];
|
|
153
167
|
}
|
|
154
168
|
export interface GamesQuery__Next {
|
|
155
|
-
data:
|
|
169
|
+
data: Game__Next[];
|
|
156
170
|
next?: string | null;
|
|
157
171
|
totalCount: number;
|
|
158
172
|
}
|
|
159
173
|
export interface GameQuery__Next {
|
|
160
|
-
data?:
|
|
174
|
+
data?: Game__Next | null;
|
|
161
175
|
}
|
|
162
176
|
export type GameSessionStatus = 'PENDING' | 'STARTING' | 'READY' | 'ENDED' | 'CANCELLED';
|
|
163
177
|
export interface GameSession {
|
|
164
178
|
id: string;
|
|
165
|
-
game: string;
|
|
166
179
|
status: GameSessionStatus;
|
|
167
180
|
launchUrl?: string | null;
|
|
168
181
|
dateTimeCreated: DateString;
|
|
@@ -219,7 +232,11 @@ export interface BetRecordMetadata {
|
|
|
219
232
|
}
|
|
220
233
|
export interface BetRecord {
|
|
221
234
|
id: string;
|
|
222
|
-
game:
|
|
235
|
+
game: {
|
|
236
|
+
name: string;
|
|
237
|
+
type: GameType;
|
|
238
|
+
provider: GameProvider;
|
|
239
|
+
};
|
|
223
240
|
status: BetRecordStatus;
|
|
224
241
|
serialCode: string;
|
|
225
242
|
vendorRoundId?: string | null;
|
|
@@ -263,7 +280,11 @@ export interface LatestBetRecord {
|
|
|
263
280
|
id: string;
|
|
264
281
|
name: string;
|
|
265
282
|
};
|
|
266
|
-
game:
|
|
283
|
+
game: {
|
|
284
|
+
name: string;
|
|
285
|
+
type: GameType;
|
|
286
|
+
provider: GameProvider;
|
|
287
|
+
};
|
|
267
288
|
bet: Decimal;
|
|
268
289
|
payout: Decimal;
|
|
269
290
|
validBet: Decimal;
|
|
@@ -24,7 +24,9 @@ export declare class WalletService {
|
|
|
24
24
|
pointsWallet(): Promise<OperationResult<never, PointsWallet | null | undefined>>;
|
|
25
25
|
pointsToCashConversion(variables: PointsToCashConversionMutationVariables): Promise<OperationResult<PointsToCashConversionError>>;
|
|
26
26
|
mayaSession(variables: MayaSessionQueryVariables): Promise<OperationResult<never, MayaSession | null | undefined>>;
|
|
27
|
+
/** @deprecated */
|
|
27
28
|
games(variables?: GamesQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<Game>>>;
|
|
29
|
+
/** @deprecated */
|
|
28
30
|
gamesByName(variables?: GamesByNameQueryVariables): Promise<{
|
|
29
31
|
ok: false;
|
|
30
32
|
data?: never;
|