@opexa/portal-sdk 0.0.24 → 0.0.25

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.
@@ -4,6 +4,7 @@ export declare const ObjectType: {
4
4
  Withdrawal: number;
5
5
  Verification: number;
6
6
  File: number;
7
+ Game: number;
7
8
  GameSession: number;
8
9
  MayaSession: number;
9
10
  };
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, GameReturn, GamesByNameInput, GamesByNameReturn, GameSessionReturn, GamesInput, GamesReturn, 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';
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
- game(id: string): Promise<GameReturn>;
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<GamesReturn>;
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;
@@ -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 GameReturn = OperationResult<never, Game | null>;
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;
@@ -1,5 +1,5 @@
1
1
  import { OperationResult } from '../utils/types';
2
- import { Game, GamesQueryVariables, PaginatedQueryResult, Site } from './types';
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
- siteInfo(): Promise<OperationResult<never, Site>>;
15
- games(variables?: GamesQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<Game>>>;
16
- game(id: string): Promise<OperationResult<never, Game | null | undefined>>;
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;
@@ -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;
@@ -120,15 +117,30 @@ export interface AnnouncementsQueryVariables {
120
117
  }
121
118
  export type GameType = 'SLOTS' | 'SPORTS' | 'BINGO' | 'FISHING' | 'LIVE' | 'GAMES' | 'TABLE';
122
119
  export type GameProvider = 'JILI' | 'PGSOFT' | 'FACHAI' | 'PLAYTECH' | 'CQ9' | 'JDB' | 'BOOONGO' | 'HABANERO' | 'RELAXGAMING' | 'DG' | 'E2E' | 'BTI' | 'DARWIN' | 'MEGABALL' | 'DRBINGO' | 'RTG';
120
+ export type GameStatus = 'ACTIVE' | 'INACTIVE';
121
+ /** @deprecated */
123
122
  export interface Game {
124
123
  id: string;
125
124
  name: string;
126
125
  type: GameType;
127
126
  provider: GameProvider;
128
127
  }
128
+ export interface Game__Next extends Game {
129
+ game: string;
130
+ tags: string[];
131
+ rank: Decimal;
132
+ site: string;
133
+ cursor: string;
134
+ status: GameStatus;
135
+ platform: string;
136
+ externalId: string;
137
+ dateTimeCreated: DateString;
138
+ dateTimeLastUpdated: DateString;
139
+ }
129
140
  export interface GameQueryVariables {
130
141
  id: string;
131
142
  }
143
+ /** @deprecated */
132
144
  export interface GameQuery {
133
145
  node?: Game | null;
134
146
  }
@@ -141,6 +153,7 @@ export interface GamesQueryVariables {
141
153
  provider?: EnumFilterField<GameProvider>;
142
154
  };
143
155
  }
156
+ /** @deprecated */
144
157
  export interface GamesQuery extends PaginatedQuery<'games', Game> {
145
158
  }
146
159
  export interface GamesByNameQueryVariables {
@@ -148,16 +161,17 @@ export interface GamesByNameQueryVariables {
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: WithCursor<Game>[];
169
+ data: Game__Next[];
156
170
  next?: string | null;
157
171
  totalCount: number;
158
172
  }
159
173
  export interface GameQuery__Next {
160
- data?: Game | null;
174
+ data?: Game__Next | null;
161
175
  }
162
176
  export type GameSessionStatus = 'PENDING' | 'STARTING' | 'READY' | 'ENDED' | 'CANCELLED';
163
177
  export interface GameSession {
@@ -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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@opexa/portal-sdk",
3
3
  "type": "module",
4
- "version": "0.0.24",
4
+ "version": "0.0.25",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "typings": "dist/index.d.ts",