@opexa/portal-sdk 0.0.74 → 0.0.76
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 +127 -112
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +529 -595
- package/dist/index.mjs.map +1 -1
- package/dist/sdk/sdk.d.ts +9 -31
- package/dist/sdk/transformer.d.ts +5 -9
- package/dist/sdk/types.d.ts +20 -28
- package/dist/services/auth.service.d.ts +2 -2
- package/dist/services/cms-portal.service.d.ts +3 -3
- package/dist/services/game.service.d.ts +3 -14
- package/dist/services/queries.d.ts +9 -7
- package/dist/services/report.service.d.ts +2 -2
- package/dist/services/types.d.ts +58 -61
- package/dist/services/utils.d.ts +2 -2
- package/dist/services/wallet.service.d.ts +1 -12
- package/package.json +1 -1
package/dist/sdk/sdk.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountReturn, ActivityRecordsInput, ActivityRecordsReturn, AnnouncementsInput, AnnouncementsReturn, AuthenticateInput, AuthenticateReturn, AvailablePromosReturn, BetRecordsInput, BetRecordsReturn, BonusReturn, CashbackBonusReturn, CashbacksReturn, ClaimCashbackBonusReturn, CreateAccountInput, CreateAccountInput__Next, CreateAccountReturn, CreateDepositInput, CreateDepositReturn, CreateGameSessionInput, CreateGameSessionReturn, CreateWithdrawalInput, CreateWithdrawalReturn, DeleteAccountReturn, DepositRecordsInput, DepositRecordsReturn, DepositReturn, DepositsCountReturn, EndGameSessionReturn,
|
|
1
|
+
import { AccountReturn, ActivityRecordsInput, ActivityRecordsReturn, AnnouncementsInput, AnnouncementsReturn, AuthenticateInput, AuthenticateReturn, AvailablePromosReturn, BetRecordsInput, BetRecordsReturn, BonusReturn, CashbackBonusReturn, CashbacksReturn, ClaimCashbackBonusReturn, CreateAccountInput, CreateAccountInput__Next, CreateAccountReturn, CreateDepositInput, CreateDepositReturn, CreateGameSessionInput, CreateGameSessionReturn, CreateWithdrawalInput, CreateWithdrawalReturn, DeleteAccountReturn, DepositRecordsInput, DepositRecordsReturn, DepositReturn, DepositsCountReturn, EndGameSessionReturn, FileReturn, GameReturn, GameSessionReturn, GamesInput, GamesReturn, LatestBetRecordsReturn, MayaSignInInput, MayaSignInReturn, MobileNumberSignInInput, MobileNumberSignInReturn, NameAndPasswordSignInInput, NameAndPasswordSignInReturn, PlatformReturn, PointsToCashConversionReturn, PointsWalletReturn, PointsWalletTransactionsInput, PointsWalletTransactionsReturn, ProfileCompletionReturn, PromosReturn, ReferralCodeReturn, ReferralCommissionsInput, ReferralCommissionsReturn, ReferralsInput, ReferralsReturn, RegisterMayaAccountInput, RegisterMayaAccountReturn, RemainingDailyWithdrawalsCountReturn, ResetPasswordInput, ResetPasswordReturn, SendVerificationCodeReturn, SendVerificationCodeReturn__Next, SessionReturn, SiteReturn, SubmitVerificationDetailsInput, SubmitVerificationDetailsReturn, TransactionRecordsInput, TransactionRecordsReturn, UpdateAccountInput, UpdateAccountReturn, UpdateReferralCodeInput, UpdateReferralCodeReturn, UpdateVerificationDetailsInput, UpdateVerificationDetailsReturn, UploadImageFileInput, UploadImageFileReturn, ValidateMayaSessionReturn, VerificationDetailsReturn, VerifyMobileNumberReturn, WalletReturn, WatchSessionInput, WithdrawalRecordsInput, WithdrawalRecordsReturn } from './types';
|
|
2
2
|
|
|
3
3
|
export interface SdkConfig {
|
|
4
4
|
site: string;
|
|
@@ -32,6 +32,9 @@ export declare class Sdk {
|
|
|
32
32
|
site(): Promise<SiteReturn>;
|
|
33
33
|
platform(): Promise<PlatformReturn>;
|
|
34
34
|
account(): Promise<AccountReturn>;
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated use `createAccount__next`
|
|
37
|
+
*/
|
|
35
38
|
createAccount(input: CreateAccountInput): Promise<CreateAccountReturn>;
|
|
36
39
|
createAccount__next(input: CreateAccountInput__Next): Promise<CreateAccountReturn>;
|
|
37
40
|
registerMayaAccount(input: RegisterMayaAccountInput): Promise<RegisterMayaAccountReturn>;
|
|
@@ -43,6 +46,9 @@ export declare class Sdk {
|
|
|
43
46
|
resetPassword(input: ResetPasswordInput): Promise<ResetPasswordReturn>;
|
|
44
47
|
verifyMobileNumber(verificationCode: string): Promise<VerifyMobileNumberReturn>;
|
|
45
48
|
profileCompletion(): Promise<ProfileCompletionReturn>;
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated use `sendVerificationCode__next`
|
|
51
|
+
*/
|
|
46
52
|
sendVerificationCode(mobileNumber: string): Promise<SendVerificationCodeReturn>;
|
|
47
53
|
sendVerificationCode__next(mobileNumber: string): Promise<SendVerificationCodeReturn__Next>;
|
|
48
54
|
wallet(): Promise<WalletReturn>;
|
|
@@ -63,40 +69,11 @@ export declare class Sdk {
|
|
|
63
69
|
bonus(): Promise<BonusReturn>;
|
|
64
70
|
cashbackBonuses(): Promise<CashbackBonusReturn>;
|
|
65
71
|
claimCashbackBonus(id: string): Promise<ClaimCashbackBonusReturn>;
|
|
66
|
-
|
|
67
|
-
game(id: string): Promise<{
|
|
68
|
-
ok: false;
|
|
69
|
-
data?: never;
|
|
70
|
-
error: import('../utils/types').OperationError<import('../utils/types').HttpError | "UnknownError">;
|
|
71
|
-
} | {
|
|
72
|
-
ok: true;
|
|
73
|
-
data: import('./types').Game__Next | null;
|
|
74
|
-
error?: never;
|
|
75
|
-
}>;
|
|
76
|
-
game__next(id: string): Promise<GameReturn__Next>;
|
|
77
|
-
/** @deprecated use `games__next` */
|
|
72
|
+
game(id: string): Promise<GameReturn>;
|
|
78
73
|
games(input?: GamesInput): Promise<GamesReturn>;
|
|
79
|
-
games__next(input?: GamesInput): Promise<GamesReturn__Next>;
|
|
80
|
-
/** @deprecated use `games__next` */
|
|
81
|
-
games__legacy(input?: GamesInput): Promise<GamesReturn>;
|
|
82
|
-
/** @deprecated use `games__next` */
|
|
83
|
-
gamesByName(input?: GamesByNameInput): Promise<GamesByNameReturn>;
|
|
84
|
-
/** @deprecated use `games__next` */
|
|
85
|
-
gamesByName__legacy(input?: GamesByNameInput): Promise<GamesByNameReturn>;
|
|
86
|
-
/** @deprecated use `gameSession__next` */
|
|
87
74
|
gameSession(id: string): Promise<GameSessionReturn>;
|
|
88
|
-
/** @deprecated use `gameSession__next` */
|
|
89
|
-
gameSession__legacy(id: string): Promise<GameSessionReturn>;
|
|
90
|
-
gameSession__next(id: string): Promise<GameSessionReturn>;
|
|
91
75
|
createGameSession(input: CreateGameSessionInput): Promise<CreateGameSessionReturn>;
|
|
92
|
-
/** @deprecated use `createGameSession__next` */
|
|
93
|
-
createGameSession__legacy(input: CreateGameSessionInput): Promise<CreateGameSessionReturn>;
|
|
94
|
-
createGameSession__next(input: CreateGameSessionInput): Promise<CreateGameSessionReturn>;
|
|
95
|
-
/** @deprecated use `endGameSession__next` */
|
|
96
76
|
endGameSession(id: string): Promise<EndGameSessionReturn>;
|
|
97
|
-
/** @deprecated use `endGameSession__next` */
|
|
98
|
-
endGameSession__legacy(id: string): Promise<EndGameSessionReturn__Legacy>;
|
|
99
|
-
endGameSession__next(id: string): Promise<EndGameSessionReturn__Legacy>;
|
|
100
77
|
file(id: string): Promise<FileReturn>;
|
|
101
78
|
uploadImageFile(input: UploadImageFileInput): Promise<UploadImageFileReturn>;
|
|
102
79
|
pointsWallet(): Promise<PointsWalletReturn>;
|
|
@@ -106,5 +83,6 @@ export declare class Sdk {
|
|
|
106
83
|
referralCode(): Promise<ReferralCodeReturn>;
|
|
107
84
|
updateReferralCode(input: UpdateReferralCodeInput): Promise<UpdateReferralCodeReturn>;
|
|
108
85
|
referrals(input?: ReferralsInput): Promise<ReferralsReturn>;
|
|
86
|
+
referralCommissions(input?: ReferralCommissionsInput): Promise<ReferralCommissionsReturn>;
|
|
109
87
|
}
|
|
110
88
|
export default Sdk;
|
|
@@ -9,7 +9,7 @@ export declare class Transformer {
|
|
|
9
9
|
get transform(): {
|
|
10
10
|
site: (data: Internal.Site) => External.Site;
|
|
11
11
|
platform: (data: Internal.Platform) => External.Platform;
|
|
12
|
-
account: (data: Internal.MemberAccount
|
|
12
|
+
account: (data: Internal.MemberAccount) => External.Account;
|
|
13
13
|
wallet: (data: Internal.Wallet) => External.Wallet;
|
|
14
14
|
verificationDetails: (data: Internal.MemberVerification) => External.VerificationDetails;
|
|
15
15
|
profileCompletion: (data: Internal.ProfileCompletion) => External.ProfileCompletion;
|
|
@@ -20,9 +20,7 @@ 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 */
|
|
24
23
|
game: (data: Internal.Game) => External.Game;
|
|
25
|
-
game__next: (data: Internal.Game__Next) => External.Game__Next;
|
|
26
24
|
gameSession: (data: Internal.GameSession) => External.GameSession;
|
|
27
25
|
promo: (data: Internal.Promo) => External.Promo;
|
|
28
26
|
cashback: (data: Internal.Cashback) => External.Cashback;
|
|
@@ -32,7 +30,8 @@ export declare class Transformer {
|
|
|
32
30
|
pointsWallet: (data: Internal.PointsWallet) => External.PointsWallet;
|
|
33
31
|
pointsWalletTransaction: (data: Internal.PointsWalletTransaction) => External.PointsWalletTransaction;
|
|
34
32
|
activityRecord: (data: Internal.ActivityRecord) => External.ActivityRecord;
|
|
35
|
-
|
|
33
|
+
referral: (data: Internal.Referral) => External.Referral;
|
|
34
|
+
referralCommission: (data: Internal.ReferralCommission) => External.ReferralCommission;
|
|
36
35
|
};
|
|
37
36
|
private site;
|
|
38
37
|
private platform;
|
|
@@ -47,11 +46,7 @@ export declare class Transformer {
|
|
|
47
46
|
private betRecord;
|
|
48
47
|
private latestBetRecord;
|
|
49
48
|
private transactionRecord;
|
|
50
|
-
/**
|
|
51
|
-
* @deprecated
|
|
52
|
-
*/
|
|
53
49
|
private game;
|
|
54
|
-
private game__next;
|
|
55
50
|
private gameSession;
|
|
56
51
|
private promo;
|
|
57
52
|
private cashback;
|
|
@@ -61,6 +56,7 @@ export declare class Transformer {
|
|
|
61
56
|
private pointsWallet;
|
|
62
57
|
private pointsWalletTransaction;
|
|
63
58
|
private activityRecord;
|
|
64
|
-
private
|
|
59
|
+
private referral;
|
|
60
|
+
private referralCommission;
|
|
65
61
|
}
|
|
66
62
|
export {};
|
package/dist/sdk/types.d.ts
CHANGED
|
@@ -106,10 +106,6 @@ export interface Account {
|
|
|
106
106
|
mobileNumberVerificationRequired: boolean;
|
|
107
107
|
transactionPassword: boolean;
|
|
108
108
|
secretAnswerSubmitted: boolean;
|
|
109
|
-
/**
|
|
110
|
-
* @deprecated use `sdk.activityRecords` and pass `LOGIN` to `filter.type`
|
|
111
|
-
*/
|
|
112
|
-
dateTimeLastActive?: Date;
|
|
113
109
|
dateTimeCreated: Date;
|
|
114
110
|
dateTimeLastUpdated: Date;
|
|
115
111
|
}
|
|
@@ -255,38 +251,19 @@ export type PointsWalletTransactionsReturn = OperationResult<never, PaginatedQue
|
|
|
255
251
|
export type GameTag = UnionAlias<Internal.GameTag>;
|
|
256
252
|
export type GameType = UnionAlias<Internal.GameType>;
|
|
257
253
|
export type GameProvider = UnionAlias<Internal.GameProvider>;
|
|
258
|
-
/** @deprecated use `Games__Next` */
|
|
259
254
|
export interface Game {
|
|
260
255
|
id: string;
|
|
261
256
|
name: string;
|
|
262
257
|
type: GameType;
|
|
263
|
-
|
|
264
|
-
provider: GameProvider;
|
|
265
|
-
}
|
|
266
|
-
export interface Game__Next {
|
|
267
|
-
id: string;
|
|
268
|
-
name: string;
|
|
269
|
-
type: GameType;
|
|
258
|
+
tags: GameTag[];
|
|
270
259
|
images: string[];
|
|
271
260
|
provider: GameProvider;
|
|
272
261
|
reference: string;
|
|
273
|
-
/** @deprecated use `reference` instead */
|
|
274
|
-
externalId: string;
|
|
275
|
-
tags: GameTag[];
|
|
276
262
|
}
|
|
277
263
|
export interface GamesInput extends Internal.GamesQueryVariables {
|
|
278
264
|
}
|
|
279
|
-
/** @deprecated use `GamesReturn__Next` */
|
|
280
265
|
export type GamesReturn = OperationResult<never, PaginatedQueryResult<'games', Game>>;
|
|
281
|
-
export type GamesReturn__Next = OperationResult<never, PaginatedQueryResult<'games', Game__Next>>;
|
|
282
|
-
/** @deprecated */
|
|
283
|
-
export interface GamesByNameInput extends Internal.GamesByNameQueryVariables {
|
|
284
|
-
}
|
|
285
|
-
/** @deprecated */
|
|
286
|
-
export type GamesByNameReturn = OperationResult<never, Game[]>;
|
|
287
|
-
/** @deprecated use `GameReturn__Next` */
|
|
288
266
|
export type GameReturn = OperationResult<never, Game | null>;
|
|
289
|
-
export type GameReturn__Next = OperationResult<never, Game__Next | null>;
|
|
290
267
|
export type GameSessionStatus = UnionAlias<Internal.GameSessionStatus>;
|
|
291
268
|
export type GameSession = {
|
|
292
269
|
id: string;
|
|
@@ -311,8 +288,6 @@ export type CreateGameSessionReturn = OperationResult<CreateGameSessionError, {
|
|
|
311
288
|
id: string;
|
|
312
289
|
}>;
|
|
313
290
|
export type EndGameSessionReturn = OperationResult;
|
|
314
|
-
export type EndGameSessionError__Legacy = UnionAlias<Internal.EndGameSessionError__Legacy>;
|
|
315
|
-
export type EndGameSessionReturn__Legacy = OperationResult<EndGameSessionError__Legacy>;
|
|
316
291
|
export type AnnouncementType = UnionAlias<Internal.AnnouncementType>;
|
|
317
292
|
export type AnnouncementStatus = UnionAlias<Internal.AnnouncementStatus>;
|
|
318
293
|
export interface Announcement {
|
|
@@ -739,12 +714,12 @@ export type ReferralCodeReturn = OperationResult<never, string | null>;
|
|
|
739
714
|
export interface Referral {
|
|
740
715
|
id: string;
|
|
741
716
|
upline: {
|
|
742
|
-
id:
|
|
717
|
+
id: string;
|
|
743
718
|
name: string;
|
|
744
719
|
realName: string;
|
|
745
720
|
};
|
|
746
721
|
downline: {
|
|
747
|
-
id:
|
|
722
|
+
id: string;
|
|
748
723
|
name: string;
|
|
749
724
|
realName: string;
|
|
750
725
|
};
|
|
@@ -756,4 +731,21 @@ export interface Referral {
|
|
|
756
731
|
export interface ReferralsInput extends Internal.ReferralsQueryVariables {
|
|
757
732
|
}
|
|
758
733
|
export type ReferralsReturn = OperationResult<never, PaginatedQueryResult<'referrals', Referral>>;
|
|
734
|
+
export interface ReferralCommission {
|
|
735
|
+
id: string;
|
|
736
|
+
commission: number;
|
|
737
|
+
referralCode: String;
|
|
738
|
+
referralsCount: number;
|
|
739
|
+
level1Commission: number;
|
|
740
|
+
level2Commission: number;
|
|
741
|
+
level3Commission: number;
|
|
742
|
+
level1ReferralsCount: number;
|
|
743
|
+
level2ReferralsCount: number;
|
|
744
|
+
level3ReferralsCount: number;
|
|
745
|
+
dateTimeCreated: Date;
|
|
746
|
+
dateTimeLastUpdated: Date;
|
|
747
|
+
}
|
|
748
|
+
export interface ReferralCommissionsInput extends Internal.ReferralCommissionsQueryVariables {
|
|
749
|
+
}
|
|
750
|
+
export type ReferralCommissionsReturn = OperationResult<never, PaginatedQueryResult<'referralCommissions', ReferralCommission>>;
|
|
759
751
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OperationResult } from '../utils/types';
|
|
2
|
-
import { AuthenticateError, AuthenticateInput, AuthenticateMutation, CreateSessionError, CreateSessionInput, CreateSessionMutation, RefreshSessionError, RefreshSessionMutation } from './types';
|
|
2
|
+
import { AuthenticateError, AuthenticateInput, AuthenticateMutation, CreateSessionError, CreateSessionInput, CreateSessionMutation, RefreshSessionError, RefreshSessionMutation, SendVerificationCodeInput } from './types';
|
|
3
3
|
|
|
4
4
|
export interface AuthServiceConfig {
|
|
5
5
|
url: string;
|
|
@@ -15,5 +15,5 @@ export declare class AuthService {
|
|
|
15
15
|
refreshSession(refreshToken: string): Promise<OperationResult<RefreshSessionError, RefreshSessionMutation>>;
|
|
16
16
|
destroySession(accessToken: string): Promise<OperationResult>;
|
|
17
17
|
verifySession(accessToken: string): Promise<boolean>;
|
|
18
|
-
sendVerificationCode(
|
|
18
|
+
sendVerificationCode(input: SendVerificationCodeInput): Promise<OperationResult>;
|
|
19
19
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OperationResult } from '../utils/types';
|
|
2
|
-
import {
|
|
2
|
+
import { Game, GamesQueryVariables, PaginatedQueryResult, Site } from './types';
|
|
3
3
|
|
|
4
4
|
export interface CmsPortalServiceConfig {
|
|
5
5
|
url: string;
|
|
@@ -12,7 +12,7 @@ export declare class CmsPortalService {
|
|
|
12
12
|
private platformId;
|
|
13
13
|
constructor(config: CmsPortalServiceConfig);
|
|
14
14
|
self(): Promise<OperationResult<never, Site>>;
|
|
15
|
-
games(variables?: GamesQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<
|
|
16
|
-
game(id: string): Promise<OperationResult<never,
|
|
15
|
+
games(variables?: GamesQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<Game>>>;
|
|
16
|
+
game(id: string): Promise<OperationResult<never, Game | null | undefined>>;
|
|
17
17
|
private getJson;
|
|
18
18
|
}
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
import { GraphQLClient } from '../utils/graphql-client';
|
|
2
2
|
import { OperationResult } from '../utils/types';
|
|
3
|
-
import { CreateGameSessionError, CreateGameSessionMutationVariables,
|
|
3
|
+
import { CreateGameSessionError, CreateGameSessionMutationVariables, EndGameSessionMutationVariables, GameSession, GameSessionQueryVariables } from './types';
|
|
4
4
|
|
|
5
5
|
export declare class GameService {
|
|
6
6
|
private client;
|
|
7
7
|
constructor(client: GraphQLClient);
|
|
8
|
-
|
|
9
|
-
games(variables?: GamesQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<Game>>>;
|
|
10
|
-
/** @deprecated */
|
|
11
|
-
gamesByName(variables?: GamesByNameQueryVariables): Promise<{
|
|
12
|
-
ok: false;
|
|
13
|
-
data?: never;
|
|
14
|
-
error: import('../utils/types').OperationError<import('../utils/types').HttpError | "UnknownError">;
|
|
15
|
-
} | {
|
|
16
|
-
ok: true;
|
|
17
|
-
data: Game[];
|
|
18
|
-
}>;
|
|
19
|
-
gameSession(variables: GameSessionQueryVariables): Promise<OperationResult<never, GameSession__Legacy | null | undefined>>;
|
|
8
|
+
gameSession(variables: GameSessionQueryVariables): Promise<OperationResult<never, GameSession | null | undefined>>;
|
|
20
9
|
createGameSession(variables: CreateGameSessionMutationVariables): Promise<OperationResult<CreateGameSessionError>>;
|
|
21
|
-
endGameSession(variables: EndGameSessionMutationVariables): Promise<OperationResult
|
|
10
|
+
endGameSession(variables: EndGameSessionMutationVariables): Promise<OperationResult>;
|
|
22
11
|
}
|
|
@@ -5,14 +5,15 @@ 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
|
export declare const POINTS_WALLET_TRANSACTIONS_QUERY: string;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export declare const GAME_SESSION_QUERY: string;
|
|
8
|
+
export declare const GAME_SESSION_QUERY: {
|
|
9
|
+
current: string;
|
|
10
|
+
legacy: string;
|
|
11
|
+
};
|
|
13
12
|
export declare const CREATE_GAME_SESSION_MUTATION: string;
|
|
14
|
-
export declare const END_GAME_SESSION_MUTATION:
|
|
15
|
-
|
|
13
|
+
export declare const END_GAME_SESSION_MUTATION: {
|
|
14
|
+
current: string;
|
|
15
|
+
legacy: string;
|
|
16
|
+
};
|
|
16
17
|
export declare const ANNOUNCEMENTS_QUERY: string;
|
|
17
18
|
export declare const WITHDRAWAL_RECORDS_QUERY: string;
|
|
18
19
|
export declare const CREATE_GCASH_WITHDRAWAL_MUTATION: string;
|
|
@@ -62,3 +63,4 @@ export declare const ACTIVITY_RECORDS_QUERY: string;
|
|
|
62
63
|
export declare const REFERRAL_CODE_QUERY: string;
|
|
63
64
|
export declare const UPDATE_REFERRAL_CODE_MUTATION: string;
|
|
64
65
|
export declare const REFERRALS_QUERY: string;
|
|
66
|
+
export declare const REFERRAL_COMMISSIONS_QUERY: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GraphQLClient } from '../utils/graphql-client';
|
|
2
2
|
import { OperationResult } from '../utils/types';
|
|
3
|
-
import { ActivityRecord, ActivityRecordsQueryVariables, BetRecord, BetRecordsQueryVariables, DepositRecord, DepositRecordsQueryVariables,
|
|
3
|
+
import { ActivityRecord, ActivityRecordsQueryVariables, BetRecord, BetRecordsQueryVariables, DepositRecord, DepositRecordsQueryVariables, PaginatedQueryResult, PointsWalletTransaction, PointsWalletTransactionsQueryVariables, Referral, ReferralCommission, ReferralCommissionsQueryVariables, ReferralsQueryVariables, TransactionRecord, TransactionRecordsQueryVariables, WithdrawalRecord, WithdrawalRecordsQueryVariables } from './types';
|
|
4
4
|
|
|
5
5
|
export declare class ReportService {
|
|
6
6
|
private client;
|
|
@@ -10,8 +10,8 @@ export declare class ReportService {
|
|
|
10
10
|
withdrawalRecords(variables?: WithdrawalRecordsQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<WithdrawalRecord>>>;
|
|
11
11
|
depositRecords(variables?: DepositRecordsQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<DepositRecord>>>;
|
|
12
12
|
depositsCount(): Promise<OperationResult<never, number>>;
|
|
13
|
-
member(): Promise<OperationResult<never, Member>>;
|
|
14
13
|
pointsWalletTransactions(variables?: PointsWalletTransactionsQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<PointsWalletTransaction>>>;
|
|
15
14
|
activityRecords(variables?: ActivityRecordsQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<ActivityRecord>>>;
|
|
16
15
|
referrals(variables?: ReferralsQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<Referral>>>;
|
|
16
|
+
referralCommissions(variables?: ReferralCommissionsQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<ReferralCommission>>>;
|
|
17
17
|
}
|
package/dist/services/types.d.ts
CHANGED
|
@@ -115,20 +115,15 @@ export interface AnnouncementsQueryVariables {
|
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
117
|
export type GameType = 'SLOTS' | 'SPORTS' | 'FISHING' | 'BINGO' | 'LIVE' | 'GAMES' | 'TABLE' | 'SPECIALTY';
|
|
118
|
-
export type GameProvider = 'JILI' | 'PGSOFT' | 'FACHAI' | 'BTI' | 'DG' | 'PLAYTECH' | 'E2E' | 'EVOLUTION' | 'EVOLUTION_NETENT' | 'EVOLUTION_REDTIGER' | 'MEGABALL' | 'DARWIN' | 'RTG' | 'DRBINGO' | 'HOLLYWOODTV' | 'CQ9' | 'JDB' | 'HABANERO'
|
|
119
|
-
/** @deprecated */
|
|
120
|
-
| 'PRAGMATICPLAY' | 'SPINIX' | 'JOKER' | 'HACKSAW' | 'EVOLUTIONNETENT' | 'JDBGTF' | 'JDBSPRIBE' | 'MICROGAMING' | 'RELAXGAMING' | 'EVOPLAY' | 'BOOONGO' | 'BGAMING' | 'KINGMAKER' | 'KINGMIDAS' | 'YELLOWBAT';
|
|
118
|
+
export type GameProvider = 'JILI' | 'PGSOFT' | 'FACHAI' | 'BTI' | 'DG' | 'PLAYTECH' | 'E2E' | 'EVOLUTION' | 'EVOLUTION_NETENT' | 'EVOLUTION_REDTIGER' | 'MEGABALL' | 'DARWIN' | 'RTG' | 'DRBINGO' | 'HOLLYWOODTV' | 'CQ9' | 'JDB' | 'HABANERO' | 'SPINIX' | 'JOKER' | 'HACKSAW' | 'EVOLUTIONNETENT' | 'JDBGTF' | 'JDBSPRIBE' | 'MICROGAMING' | 'RELAXGAMING' | 'EVOPLAY' | 'BOOONGO' | 'BGAMING' | 'KINGMAKER' | 'KINGMIDAS' | 'YELLOWBAT';
|
|
121
119
|
export type GameStatus = 'ACTIVE' | 'INACTIVE';
|
|
122
|
-
|
|
120
|
+
export type GameTag = 'HOT' | 'hot' | 'NEW' | 'new' | 'TOP' | 'top' | 'POPULAR' | 'popular' | (string & {});
|
|
123
121
|
export interface Game {
|
|
124
122
|
id: string;
|
|
123
|
+
game: string;
|
|
125
124
|
name: string;
|
|
126
125
|
type: GameType;
|
|
127
126
|
provider: GameProvider;
|
|
128
|
-
}
|
|
129
|
-
export type GameTag = 'HOT' | 'hot' | 'NEW' | 'new' | 'TOP' | 'top' | 'POPULAR' | 'popular' | (string & {});
|
|
130
|
-
export interface Game__Next extends Game {
|
|
131
|
-
game: string;
|
|
132
127
|
tags?: GameTag[];
|
|
133
128
|
rank: Decimal;
|
|
134
129
|
site: string;
|
|
@@ -138,15 +133,12 @@ export interface Game__Next extends Game {
|
|
|
138
133
|
platform: string;
|
|
139
134
|
reference: string;
|
|
140
135
|
customImage?: string;
|
|
141
|
-
/** @deprecated use `reference` instead */
|
|
142
|
-
externalId: string;
|
|
143
136
|
dateTimeCreated: DateString;
|
|
144
137
|
dateTimeLastUpdated: DateString;
|
|
145
138
|
}
|
|
146
139
|
export interface GameQueryVariables {
|
|
147
140
|
id: string;
|
|
148
141
|
}
|
|
149
|
-
/** @deprecated */
|
|
150
142
|
export interface GameQuery {
|
|
151
143
|
node?: Game | null;
|
|
152
144
|
}
|
|
@@ -160,37 +152,34 @@ export interface GamesQueryVariables {
|
|
|
160
152
|
provider?: EnumFilterField<GameProvider>;
|
|
161
153
|
};
|
|
162
154
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
/** @deprecated */
|
|
167
|
-
export interface GamesByNameQueryVariables {
|
|
168
|
-
first?: number;
|
|
169
|
-
search: string;
|
|
170
|
-
filter?: GamesQueryVariables['filter'];
|
|
171
|
-
}
|
|
172
|
-
/** @deprecated */
|
|
173
|
-
export interface GamesByNameQuery {
|
|
174
|
-
gamesByName: Game[];
|
|
175
|
-
}
|
|
176
|
-
export interface GamesQuery__Next {
|
|
177
|
-
data: Game__Next[];
|
|
155
|
+
export interface GamesQuery {
|
|
156
|
+
data: Game[];
|
|
178
157
|
next?: string | null;
|
|
179
158
|
totalCount?: number | null;
|
|
180
159
|
}
|
|
181
|
-
export interface
|
|
182
|
-
data?:
|
|
160
|
+
export interface GameQuery {
|
|
161
|
+
data?: Game | null;
|
|
183
162
|
}
|
|
184
163
|
export type GameSessionStatus = 'PENDING' | 'STARTING' | 'READY' | 'ENDED' | 'CANCELLED';
|
|
185
|
-
export
|
|
164
|
+
export type GameSession<Legacy extends boolean = false> = [Legacy] extends [true] ? {
|
|
186
165
|
id: string;
|
|
166
|
+
game: {
|
|
167
|
+
id: string;
|
|
168
|
+
};
|
|
187
169
|
status: GameSessionStatus;
|
|
188
170
|
launchUrl?: string | null;
|
|
189
171
|
dateTimeCreated: DateString;
|
|
190
172
|
dateTimeLastUpdated: DateString;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
|
|
173
|
+
} : {
|
|
174
|
+
id: string;
|
|
175
|
+
game: string;
|
|
176
|
+
status: GameSessionStatus;
|
|
177
|
+
launchUrl?: string | null;
|
|
178
|
+
dateTimeCreated: DateString;
|
|
179
|
+
dateTimeLastUpdated: DateString;
|
|
180
|
+
};
|
|
181
|
+
export interface GameSessionQuery<Legacy extends boolean = false> {
|
|
182
|
+
node?: GameSession<Legacy> | null;
|
|
194
183
|
}
|
|
195
184
|
export interface GameSessionQueryVariables {
|
|
196
185
|
id: string;
|
|
@@ -207,33 +196,19 @@ export interface CreateGameSessionMutationVariables {
|
|
|
207
196
|
game: string;
|
|
208
197
|
};
|
|
209
198
|
}
|
|
210
|
-
export
|
|
199
|
+
export type EndGameSessionError = 'GameSessionDoesNotExistError' | 'GameSessionAlreadyClosedError' | 'GameProviderError';
|
|
200
|
+
export type EndGameSessionMutation<Legacy extends boolean = false> = [Legacy] extends [true] ? {
|
|
201
|
+
endGameSession?: null | {
|
|
202
|
+
__typename: EndGameSessionError;
|
|
203
|
+
};
|
|
204
|
+
} : {
|
|
211
205
|
endGameSession: boolean;
|
|
212
|
-
}
|
|
206
|
+
};
|
|
213
207
|
export interface EndGameSessionMutationVariables {
|
|
214
208
|
input: {
|
|
215
209
|
id: string;
|
|
216
210
|
};
|
|
217
211
|
}
|
|
218
|
-
export interface GameSession__Legacy {
|
|
219
|
-
id: string;
|
|
220
|
-
game: {
|
|
221
|
-
id: string;
|
|
222
|
-
};
|
|
223
|
-
status: GameSessionStatus;
|
|
224
|
-
launchUrl?: string | null;
|
|
225
|
-
dateTimeCreated: DateString;
|
|
226
|
-
dateTimeLastUpdated: DateString;
|
|
227
|
-
}
|
|
228
|
-
export interface GameSessionQuery__Legacy {
|
|
229
|
-
node?: GameSession__Legacy | null;
|
|
230
|
-
}
|
|
231
|
-
export type EndGameSessionError__Legacy = 'GameSessionDoesNotExistError' | 'GameSessionAlreadyClosedError' | 'GameProviderError';
|
|
232
|
-
export interface EndGameSessionMutation__Legacy {
|
|
233
|
-
endGameSession?: null | {
|
|
234
|
-
__typename: EndGameSessionError__Legacy;
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
212
|
export type BetRecordStatus = 'STARTED' | 'SETTLED' | 'CANCELLED';
|
|
238
213
|
export interface BetRecordMetadata {
|
|
239
214
|
odds?: string | null;
|
|
@@ -622,12 +597,6 @@ export interface PointsWalletTransactionsQueryVariables {
|
|
|
622
597
|
export interface PointsWalletTransactionsQuery {
|
|
623
598
|
member: PaginatedQuery<'pointsWalletTransactions', PointsWalletTransaction>;
|
|
624
599
|
}
|
|
625
|
-
export interface Member {
|
|
626
|
-
dateTimeLastActive?: DateString | null;
|
|
627
|
-
}
|
|
628
|
-
export interface MemberQuery {
|
|
629
|
-
member: Member;
|
|
630
|
-
}
|
|
631
600
|
export type MemberAccountStatus = 'ACTIVE' | 'DISABLED' | 'BLACKLISTED';
|
|
632
601
|
export type MemberAccountVerificationStatus = 'UNVERIFIED' | 'PENDING' | 'VERIFIED';
|
|
633
602
|
export type MemberVerificationStatus = 'PENDING' | 'APPROVED' | 'REJECTED' | 'VERIFIED' | 'UNVERIFIED';
|
|
@@ -952,6 +921,10 @@ export interface MayaSessionQueryVariables {
|
|
|
952
921
|
export interface ValidateMayaSessionMutation {
|
|
953
922
|
validateMayaSession: boolean;
|
|
954
923
|
}
|
|
924
|
+
export interface SendVerificationCodeInput {
|
|
925
|
+
channel: 'SMS' | 'EMAIL';
|
|
926
|
+
recipient: string;
|
|
927
|
+
}
|
|
955
928
|
export interface TextField {
|
|
956
929
|
id: string;
|
|
957
930
|
type: 'text';
|
|
@@ -1064,12 +1037,12 @@ export interface UpdateReferralCodeMutation {
|
|
|
1064
1037
|
export interface Referral {
|
|
1065
1038
|
id: string;
|
|
1066
1039
|
upline: {
|
|
1067
|
-
id:
|
|
1040
|
+
id: string;
|
|
1068
1041
|
name: string;
|
|
1069
1042
|
realName: string;
|
|
1070
1043
|
};
|
|
1071
1044
|
downline: {
|
|
1072
|
-
id:
|
|
1045
|
+
id: string;
|
|
1073
1046
|
name: string;
|
|
1074
1047
|
realName: string;
|
|
1075
1048
|
};
|
|
@@ -1090,3 +1063,27 @@ export interface ReferralsQueryVariables {
|
|
|
1090
1063
|
downline?: ObjectIdFilterField;
|
|
1091
1064
|
};
|
|
1092
1065
|
}
|
|
1066
|
+
export interface ReferralCommission {
|
|
1067
|
+
id: string;
|
|
1068
|
+
commission: Decimal;
|
|
1069
|
+
referralCode: String;
|
|
1070
|
+
referralsCount: number;
|
|
1071
|
+
level1Commission: Decimal;
|
|
1072
|
+
level2Commission: Decimal;
|
|
1073
|
+
level3Commission: Decimal;
|
|
1074
|
+
level1ReferralsCount: number;
|
|
1075
|
+
level2ReferralsCount: number;
|
|
1076
|
+
level3ReferralsCount: number;
|
|
1077
|
+
dateTimeCreated: DateString;
|
|
1078
|
+
dateTimeLastUpdated: DateString;
|
|
1079
|
+
}
|
|
1080
|
+
export interface ReferralCommissionsQuery {
|
|
1081
|
+
member: PaginatedQuery<'referralCommissions', ReferralCommission>;
|
|
1082
|
+
}
|
|
1083
|
+
export interface ReferralCommissionsQueryVariables {
|
|
1084
|
+
first?: number;
|
|
1085
|
+
after?: string;
|
|
1086
|
+
filter?: {
|
|
1087
|
+
id?: ObjectIdFilterField;
|
|
1088
|
+
};
|
|
1089
|
+
}
|
package/dist/services/utils.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OperationError } from '../utils/types';
|
|
2
|
-
import { AuthenticateError, ClaimCashbackBonusError, CreateDepositError, CreateGameSessionError, CreateMemberVerificationError, CreateSessionError, CreateWithdrawalError,
|
|
2
|
+
import { AuthenticateError, ClaimCashbackBonusError, CreateDepositError, CreateGameSessionError, CreateMemberVerificationError, CreateSessionError, CreateWithdrawalError, EndGameSessionError, PointsToCashConversionError, RefreshSessionError, RegisterMayaMemberAccountError, RegisterMemberAccountError, ResetPasswordError, SendVerificationCodeError, UpdateMemberAccountError, UpdateMemberVerificationError, UpdateReferralCodeError, UploadPrivateImageFileError, VerifyMobileNumberError } from './types';
|
|
3
3
|
|
|
4
|
-
type E = ClaimCashbackBonusError | CreateDepositError | UploadPrivateImageFileError | CreateGameSessionError |
|
|
4
|
+
type E = ClaimCashbackBonusError | CreateDepositError | UploadPrivateImageFileError | CreateGameSessionError | EndGameSessionError | RegisterMemberAccountError | RegisterMayaMemberAccountError | UpdateMemberAccountError | ResetPasswordError | SendVerificationCodeError | VerifyMobileNumberError | CreateMemberVerificationError | UpdateMemberVerificationError | PointsToCashConversionError | CreateWithdrawalError | CreateSessionError | RefreshSessionError | AuthenticateError | UpdateReferralCodeError;
|
|
5
5
|
export declare function createOperationError<T extends E>(code: T): OperationError<T>;
|
|
6
6
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GraphQLClient } from '../utils/graphql-client';
|
|
2
2
|
import { OperationResult } from '../utils/types';
|
|
3
|
-
import { AvailablePromosQueryVariables, Bonus, Cashback, CashbackBonus, ClaimCashbackBonusError, ClaimCashbackBonusMutationVariables, CreateBankWithdrawalMutationVariables, CreateDepositError, CreateGCashDepositMutationVariables, CreateGCashWithdrawalMutationVariables, CreateGameSessionError, CreateGameSessionMutationVariables, CreateMayaAppDepositMutationVariables, CreateMayaAppWithdrawalMutationVariables, CreateMayaDepositMutationVariables, CreateMayaWithdrawalMutationVariables, CreateWithdrawalError, Deposit, DepositQueryVariables, EndGameSessionMutationVariables,
|
|
3
|
+
import { AvailablePromosQueryVariables, Bonus, Cashback, CashbackBonus, ClaimCashbackBonusError, ClaimCashbackBonusMutationVariables, CreateBankWithdrawalMutationVariables, CreateDepositError, CreateGCashDepositMutationVariables, CreateGCashWithdrawalMutationVariables, CreateGameSessionError, CreateGameSessionMutationVariables, CreateMayaAppDepositMutationVariables, CreateMayaAppWithdrawalMutationVariables, CreateMayaDepositMutationVariables, CreateMayaWithdrawalMutationVariables, CreateWithdrawalError, Deposit, DepositQueryVariables, EndGameSessionMutationVariables, GameSession, GameSessionQueryVariables, MayaSession, MayaSessionQueryVariables, PointsToCashConversionError, PointsToCashConversionMutationVariables, PointsWallet, Promo, Wallet } from './types';
|
|
4
4
|
|
|
5
5
|
export declare class WalletService {
|
|
6
6
|
private client;
|
|
@@ -24,17 +24,6 @@ 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 */
|
|
28
|
-
games(variables?: GamesQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<Game>>>;
|
|
29
|
-
/** @deprecated */
|
|
30
|
-
gamesByName(variables?: GamesByNameQueryVariables): Promise<{
|
|
31
|
-
ok: false;
|
|
32
|
-
data?: never;
|
|
33
|
-
error: import('../utils/types').OperationError<import('../utils/types').HttpError | "UnknownError">;
|
|
34
|
-
} | {
|
|
35
|
-
ok: true;
|
|
36
|
-
data: Game[];
|
|
37
|
-
}>;
|
|
38
27
|
gameSession(variables: GameSessionQueryVariables): Promise<OperationResult<never, GameSession | null | undefined>>;
|
|
39
28
|
createGameSession(variables: CreateGameSessionMutationVariables): Promise<OperationResult<CreateGameSessionError>>;
|
|
40
29
|
endGameSession(variables: EndGameSessionMutationVariables): Promise<OperationResult>;
|