@opexa/portal-sdk 0.0.1
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/README.md +1591 -0
- package/dist/graphql/account.service.d.ts +24 -0
- package/dist/graphql/announcement.d.ts +29 -0
- package/dist/graphql/auth.service.d.ts +16 -0
- package/dist/graphql/bet-record.d.ts +71 -0
- package/dist/graphql/bonus.d.ts +43 -0
- package/dist/graphql/cashback.d.ts +22 -0
- package/dist/graphql/deposit.d.ts +94 -0
- package/dist/graphql/file.d.ts +38 -0
- package/dist/graphql/file.service.d.ts +11 -0
- package/dist/graphql/game.d.ts +84 -0
- package/dist/graphql/game.service.d.ts +14 -0
- package/dist/graphql/index.d.ts +23 -0
- package/dist/graphql/member.d.ts +182 -0
- package/dist/graphql/platform.d.ts +38 -0
- package/dist/graphql/points.d.ts +22 -0
- package/dist/graphql/portal.service.d.ts +9 -0
- package/dist/graphql/promo.d.ts +35 -0
- package/dist/graphql/report.service.d.ts +18 -0
- package/dist/graphql/session.d.ts +25 -0
- package/dist/graphql/static.service.d.ts +12 -0
- package/dist/graphql/transaction.d.ts +26 -0
- package/dist/graphql/types.d.ts +93 -0
- package/dist/graphql/wallet.d.ts +14 -0
- package/dist/graphql/wallet.service.d.ts +30 -0
- package/dist/graphql/withdrawal.d.ts +106 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +1007 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2916 -0
- package/dist/index.mjs.map +1 -0
- package/dist/logger.d.ts +15 -0
- package/dist/object-id.d.ts +1 -0
- package/dist/object-type.d.ts +9 -0
- package/dist/sdk.d.ts +228 -0
- package/dist/session-service.d.ts +25 -0
- package/dist/transformer.d.ts +52 -0
- package/dist/types.d.ts +839 -0
- package/dist/utils/add-days.d.ts +1 -0
- package/dist/utils/add-minutes.d.ts +1 -0
- package/dist/utils/clone-date.d.ts +1 -0
- package/dist/utils/gql.d.ts +1 -0
- package/dist/utils/graphql-client.d.ts +29 -0
- package/dist/utils/http-error.d.ts +6 -0
- package/dist/utils/is-after.d.ts +4 -0
- package/dist/utils/parse-decimal.d.ts +2 -0
- package/dist/utils/sha256.d.ts +1 -0
- package/dist/utils/sub-minutes.d.ts +1 -0
- package/dist/utils/types.d.ts +5 -0
- package/package.json +81 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { GraphQLClient } from '../utils/graphql-client';
|
|
2
|
+
import { Announcement, AnnouncementsQueryVariables } from './announcement';
|
|
3
|
+
import { CreateMemberVerificationError, CreateMemberVerificationMutationVariables, DeleteMemberAccountMutationVariables, MemberAccount, MemberVerification, ProfileCompletion, RegisterMemberAccountError, RegisterMemberAccountMutationVariables, ResetPasswordError, ResetPasswordMutationVariables, SendVerificationCodeError, SendVerificationCodeMutationVariables, UpdateMemberAccountError, UpdateMemberAccountMutationVariables, UpdateMemberVerificationError, UpdateMemberVerificationMutationVariables, VerifyMobileNumberError, VerifyMobileNumberMutationVariables } from './member';
|
|
4
|
+
import { Platform } from './platform';
|
|
5
|
+
import { OperationResult, PaginatedQueryResult, UnknownError } from './types';
|
|
6
|
+
|
|
7
|
+
export declare class AccountService {
|
|
8
|
+
private client;
|
|
9
|
+
constructor(client: GraphQLClient);
|
|
10
|
+
/** aka `Query.self` */
|
|
11
|
+
memberAccount(): Promise<OperationResult<never, MemberAccount>>;
|
|
12
|
+
registerMemberAccount(variables: RegisterMemberAccountMutationVariables): Promise<OperationResult<RegisterMemberAccountError>>;
|
|
13
|
+
updateMemberAccount(variables: UpdateMemberAccountMutationVariables): Promise<OperationResult<UpdateMemberAccountError>>;
|
|
14
|
+
deleteMemberAccount(variables: DeleteMemberAccountMutationVariables): Promise<OperationResult<UnknownError>>;
|
|
15
|
+
resetPassword(variables: ResetPasswordMutationVariables): Promise<OperationResult<ResetPasswordError>>;
|
|
16
|
+
profileCompletion(): Promise<OperationResult<never, ProfileCompletion>>;
|
|
17
|
+
platform(): Promise<OperationResult<never, Platform>>;
|
|
18
|
+
sendVerificationCode(variables: SendVerificationCodeMutationVariables): Promise<OperationResult<SendVerificationCodeError>>;
|
|
19
|
+
verifyMobileNumber(variables: VerifyMobileNumberMutationVariables): Promise<OperationResult<VerifyMobileNumberError>>;
|
|
20
|
+
createMemberVerification(variables: CreateMemberVerificationMutationVariables): Promise<OperationResult<CreateMemberVerificationError>>;
|
|
21
|
+
updateMemberVerification(variables: UpdateMemberVerificationMutationVariables): Promise<OperationResult<UpdateMemberVerificationError>>;
|
|
22
|
+
memberVerification(): Promise<OperationResult<never, MemberVerification | null | undefined>>;
|
|
23
|
+
announcements(variables?: AnnouncementsQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<Announcement>>>;
|
|
24
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DateFilterField, DateString, EnumFilterField, Html, PaginatedQuery } from './types';
|
|
2
|
+
|
|
3
|
+
export type AnnouncementType = 'RELEASE' | 'SCHEDULED_MAINTENANCE';
|
|
4
|
+
export type AnnouncementStatus = 'ACTIVE' | 'INACTIVE';
|
|
5
|
+
export type AnnouncementVisibility = 'MEMBER' | 'OPERATOR' | 'GLOBAL';
|
|
6
|
+
export interface Announcement {
|
|
7
|
+
id: string;
|
|
8
|
+
type: AnnouncementType;
|
|
9
|
+
title: string;
|
|
10
|
+
status: AnnouncementStatus;
|
|
11
|
+
message: Html;
|
|
12
|
+
activationStartDateTime: DateString;
|
|
13
|
+
activationEndDateTime: DateString;
|
|
14
|
+
dateTimeCreated: DateString;
|
|
15
|
+
dateTimeLastUpdated: DateString;
|
|
16
|
+
}
|
|
17
|
+
export interface AnnouncementsQuery extends PaginatedQuery<'announcements', Announcement> {
|
|
18
|
+
}
|
|
19
|
+
export interface AnnouncementsQueryVariables {
|
|
20
|
+
first?: number;
|
|
21
|
+
after?: string;
|
|
22
|
+
filter?: {
|
|
23
|
+
type?: EnumFilterField<AnnouncementType>;
|
|
24
|
+
visibility?: EnumFilterField<AnnouncementVisibility>;
|
|
25
|
+
activationStartDateTime?: DateFilterField;
|
|
26
|
+
activationEndDateTime?: DateFilterField;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export declare const ANNOUNCEMENTS_QUERY: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CreateSessionError, CreateSessionInput, CreateSessionMutation, RefreshSessionError, RefreshSessionMutation } from './session';
|
|
2
|
+
import { OperationResult, UnknownError } from './types';
|
|
3
|
+
|
|
4
|
+
export interface AuthServiceConfig {
|
|
5
|
+
url: string;
|
|
6
|
+
platform: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class AuthService {
|
|
9
|
+
private url;
|
|
10
|
+
private platform;
|
|
11
|
+
constructor(config: AuthServiceConfig);
|
|
12
|
+
createSession(input: CreateSessionInput): Promise<OperationResult<CreateSessionError, CreateSessionMutation>>;
|
|
13
|
+
refreshSession(refreshToken: string): Promise<OperationResult<RefreshSessionError, RefreshSessionMutation>>;
|
|
14
|
+
destroySession(accessToken: string): Promise<OperationResult<UnknownError>>;
|
|
15
|
+
verifySession(accessToken: string): Promise<boolean>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { GameType, Game } from './game';
|
|
2
|
+
import { DateFilterField, DateString, Decimal, EnumFilterField, ObjectIdFilterField, PaginatedQuery, SortOrder, StringFilterField } from './types';
|
|
3
|
+
|
|
4
|
+
export type BetRecordStatus = 'STARTED' | 'SETTLED' | 'CANCELLED';
|
|
5
|
+
export interface BetRecordMetadata {
|
|
6
|
+
odds?: string | null;
|
|
7
|
+
validBet?: Decimal | null;
|
|
8
|
+
betContent?: string | null;
|
|
9
|
+
contestName?: string | null;
|
|
10
|
+
}
|
|
11
|
+
export interface BetRecord {
|
|
12
|
+
id: string;
|
|
13
|
+
game: Game;
|
|
14
|
+
status: BetRecordStatus;
|
|
15
|
+
serialCode: string;
|
|
16
|
+
vendorRoundId?: string | null;
|
|
17
|
+
bet: Decimal;
|
|
18
|
+
payout: Decimal;
|
|
19
|
+
validBet: Decimal;
|
|
20
|
+
jackpotContribution: Decimal;
|
|
21
|
+
jackpotPayout: Decimal;
|
|
22
|
+
winloss?: Decimal | null;
|
|
23
|
+
dateTimeSettled?: DateString | null;
|
|
24
|
+
dateTimeCreated: DateString;
|
|
25
|
+
dateTimeLastUpdated: DateString;
|
|
26
|
+
betContent?: string | null;
|
|
27
|
+
contestName?: string | null;
|
|
28
|
+
externalCategory?: string | null;
|
|
29
|
+
metadata?: {
|
|
30
|
+
odds?: string | null;
|
|
31
|
+
validBet?: Decimal | null;
|
|
32
|
+
} | null;
|
|
33
|
+
}
|
|
34
|
+
export interface BetRecordsQuery {
|
|
35
|
+
member: PaginatedQuery<'betRecords', BetRecord>;
|
|
36
|
+
}
|
|
37
|
+
export interface BetRecordsQueryVariables {
|
|
38
|
+
first?: number;
|
|
39
|
+
after?: string;
|
|
40
|
+
sort?: SortOrder;
|
|
41
|
+
filter?: {
|
|
42
|
+
serialCode?: StringFilterField;
|
|
43
|
+
game?: ObjectIdFilterField;
|
|
44
|
+
game__externalId?: StringFilterField;
|
|
45
|
+
game__type?: EnumFilterField<GameType>;
|
|
46
|
+
game__provider?: EnumFilterField<string>;
|
|
47
|
+
dateTimeCreated?: DateFilterField;
|
|
48
|
+
vendorRoundId?: StringFilterField;
|
|
49
|
+
status?: EnumFilterField<BetRecordStatus>;
|
|
50
|
+
};
|
|
51
|
+
startDateTime?: DateFilterField;
|
|
52
|
+
endDateTime?: DateFilterField;
|
|
53
|
+
}
|
|
54
|
+
export declare const BET_RECORDS_QUERY: string;
|
|
55
|
+
export interface LatestBetRecord {
|
|
56
|
+
id: string;
|
|
57
|
+
member: {
|
|
58
|
+
id: string;
|
|
59
|
+
name: string;
|
|
60
|
+
};
|
|
61
|
+
game: Game;
|
|
62
|
+
bet: Decimal;
|
|
63
|
+
payout: Decimal;
|
|
64
|
+
validBet: Decimal;
|
|
65
|
+
dateTimeSettled: DateString;
|
|
66
|
+
dateTimeCreated: DateString;
|
|
67
|
+
}
|
|
68
|
+
export interface LatestBetRecordsQuery {
|
|
69
|
+
latestBetRecords: LatestBetRecord[];
|
|
70
|
+
}
|
|
71
|
+
export declare const LATEST_BET_RECORDS_QUERY: string;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { DepositRecord } from '..';
|
|
2
|
+
import { Cashback } from './cashback';
|
|
3
|
+
import { Promo } from './promo';
|
|
4
|
+
import { DateString, Decimal, MutationError } from './types';
|
|
5
|
+
|
|
6
|
+
export interface Bonus {
|
|
7
|
+
id: string;
|
|
8
|
+
promo: Promo;
|
|
9
|
+
deposit?: Omit<DepositRecord, 'id' | 'depositNumber'> | null;
|
|
10
|
+
amount: Decimal;
|
|
11
|
+
balance: Decimal;
|
|
12
|
+
turnoverRequirement: Decimal;
|
|
13
|
+
currentTurnoverRequirementContribution: Decimal;
|
|
14
|
+
currentTurnoverRequirementContributionPercentage: Decimal;
|
|
15
|
+
expiration: DateString;
|
|
16
|
+
dateTimeCreated: DateString;
|
|
17
|
+
dateTimeLastUpdated: DateString;
|
|
18
|
+
}
|
|
19
|
+
export interface BonusQuery {
|
|
20
|
+
bonus?: Bonus | null;
|
|
21
|
+
}
|
|
22
|
+
export declare const BONUS_QUERY: string;
|
|
23
|
+
export interface CashbackBonus {
|
|
24
|
+
id: string;
|
|
25
|
+
balance: Decimal;
|
|
26
|
+
cashback: Cashback;
|
|
27
|
+
dateTimeCreated: DateString;
|
|
28
|
+
dateTimeLastUpdated: DateString;
|
|
29
|
+
}
|
|
30
|
+
export interface CashbackBonusesQuery {
|
|
31
|
+
cashbackBonuses: CashbackBonus[];
|
|
32
|
+
}
|
|
33
|
+
export declare const CASHBACK_BONUSES_QUERY: string;
|
|
34
|
+
export type ClaimCashbackBonusError = MutationError<'CashbackBonusDoesNotExistError'>;
|
|
35
|
+
export interface ClaimCashbackBonusMutation {
|
|
36
|
+
claimCashbackBonus?: null | ClaimCashbackBonusError;
|
|
37
|
+
}
|
|
38
|
+
export interface ClaimCashbackBonusMutationVariables {
|
|
39
|
+
input: {
|
|
40
|
+
id: string;
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export declare const CLAIM_CASHBACK_BONUS_MUTATION: string;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { File } from './file';
|
|
2
|
+
import { DateString, Html } from './types';
|
|
3
|
+
|
|
4
|
+
export type CashbackStatus = 'ACTIVE' | 'INACTIVE';
|
|
5
|
+
export interface Cashback {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
banner: Extract<File, {
|
|
9
|
+
status: 'READY';
|
|
10
|
+
}>;
|
|
11
|
+
status: CashbackStatus;
|
|
12
|
+
description: Html;
|
|
13
|
+
activationStartDateTime: DateString;
|
|
14
|
+
activationEndDateTime: DateString;
|
|
15
|
+
dateTimeCreated: DateString;
|
|
16
|
+
dateTimeLastUpdated: DateString;
|
|
17
|
+
}
|
|
18
|
+
export interface CashbacksQuery {
|
|
19
|
+
cashbacks: Cashback[];
|
|
20
|
+
}
|
|
21
|
+
export declare const CASHBACK_FRAGMENT: string;
|
|
22
|
+
export declare const CASHBACKS_QUERY: string;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { DateFilterField, DateString, Decimal, EnumFilterField, MutationError, PaginatedQuery, StringFilterField } from './types';
|
|
2
|
+
|
|
3
|
+
export type DepositRecordType = 'BANK' | 'GCASH' | 'MANUAL' | 'MAYA' | 'MAYA_APP';
|
|
4
|
+
export type DepositRecordStatus = 'PENDING' | 'ACCEPTED' | 'APPROVED' | 'REJECTED' | 'CONFIRMED' | 'CANCELLED';
|
|
5
|
+
export interface DepositRecord {
|
|
6
|
+
id: string;
|
|
7
|
+
type: DepositRecordType;
|
|
8
|
+
status: DepositRecordStatus;
|
|
9
|
+
amount: Decimal;
|
|
10
|
+
netAmount: Decimal;
|
|
11
|
+
fee: Decimal;
|
|
12
|
+
reference?: string | null;
|
|
13
|
+
depositNumber: string;
|
|
14
|
+
dateTimeCreated: DateString;
|
|
15
|
+
dateTimeLastUpdated: DateString;
|
|
16
|
+
}
|
|
17
|
+
export interface DepositRecordsQuery {
|
|
18
|
+
member: PaginatedQuery<'depositRecords', DepositRecord>;
|
|
19
|
+
}
|
|
20
|
+
export interface DepositRecordsQueryVariables {
|
|
21
|
+
first?: number;
|
|
22
|
+
after?: string;
|
|
23
|
+
filter?: {
|
|
24
|
+
depositNumber?: StringFilterField;
|
|
25
|
+
type?: EnumFilterField<DepositRecordType>;
|
|
26
|
+
reference?: StringFilterField;
|
|
27
|
+
status?: EnumFilterField<DepositRecordStatus>;
|
|
28
|
+
dateTimeCreated?: DateFilterField;
|
|
29
|
+
dateTimeLastUpdated?: DateFilterField;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
export declare const DEPOSIT_RECORDS_QUERY: string;
|
|
33
|
+
export type CreateDepositError = MutationError<'DepositPromoMaximumAmountExceededError' | 'DepositPromoMinimumAmountNotMetError' | 'HasActiveBonusError' | 'MaximumDepositAmountExceededError' | 'MinimumDepositAmountNotMetError' | 'MinimumFirstDepositAmountNotMetError' | 'PromoNotEnabledError' | 'WalletDoesNotExistError'>;
|
|
34
|
+
export interface CreateGCashDepositMutation {
|
|
35
|
+
createGCashDeposit?: CreateDepositError | null;
|
|
36
|
+
}
|
|
37
|
+
export interface CreateGCashDepositMutationVariables {
|
|
38
|
+
input: {
|
|
39
|
+
id: string;
|
|
40
|
+
amount: Decimal;
|
|
41
|
+
promo?: string;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export declare const CREATE_GCASH_DEPOSIT_MUTATION: string;
|
|
45
|
+
export interface CreateMayaDepositMutation {
|
|
46
|
+
createMayaDeposit?: CreateDepositError | null;
|
|
47
|
+
}
|
|
48
|
+
export interface CreateMayaDepositMutationVariables {
|
|
49
|
+
input: {
|
|
50
|
+
id: string;
|
|
51
|
+
amount: Decimal;
|
|
52
|
+
promo?: string;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export declare const CREATE_MAYA_DEPOSIT_MUTATION: string;
|
|
56
|
+
export interface CreateMayaAppDepositMutation {
|
|
57
|
+
createMayaAppDeposit?: CreateDepositError | null;
|
|
58
|
+
}
|
|
59
|
+
export interface CreateMayaAppDepositMutationVariables {
|
|
60
|
+
input: {
|
|
61
|
+
id: string;
|
|
62
|
+
amount: Decimal;
|
|
63
|
+
promo?: string;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export declare const CREATE_MAYA_APP_DEPOSIT_MUTATION: string;
|
|
67
|
+
type Deposit__Common = Omit<DepositRecord, 'depositNumber' | 'status'>;
|
|
68
|
+
type Deposit__Failed = Deposit__Common & {
|
|
69
|
+
status: 'REJECTED' | 'CANCELLED';
|
|
70
|
+
checkoutUrl?: string | null;
|
|
71
|
+
};
|
|
72
|
+
type Deposit__Pending = Deposit__Common & {
|
|
73
|
+
status: 'PENDING';
|
|
74
|
+
checkoutUrl?: never;
|
|
75
|
+
};
|
|
76
|
+
type Deposit__Success = Deposit__Common & {
|
|
77
|
+
status: 'ACCEPTED' | 'APPROVED' | 'CONFIRMED';
|
|
78
|
+
checkoutUrl: string;
|
|
79
|
+
};
|
|
80
|
+
export type Deposit = Deposit__Failed | Deposit__Pending | Deposit__Success;
|
|
81
|
+
export interface DepositQuery {
|
|
82
|
+
node?: Deposit | null;
|
|
83
|
+
}
|
|
84
|
+
export interface DepositQueryVariables {
|
|
85
|
+
id: string;
|
|
86
|
+
}
|
|
87
|
+
export declare const DEPOSIT_QUERY: string;
|
|
88
|
+
export interface DepositsCountQuery {
|
|
89
|
+
member: {
|
|
90
|
+
depositsCount: number;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
export declare const DEPOSITS_COUNT_QUERY: string;
|
|
94
|
+
export {};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DateString, MutationError } from './types';
|
|
2
|
+
|
|
3
|
+
export type FileStatus = File['status'];
|
|
4
|
+
export type File = {
|
|
5
|
+
id: string;
|
|
6
|
+
url?: never;
|
|
7
|
+
status: 'UPLOADING' | 'FAILED';
|
|
8
|
+
dateTimeCreated: DateString;
|
|
9
|
+
} | {
|
|
10
|
+
id: string;
|
|
11
|
+
url: string;
|
|
12
|
+
status: 'READY';
|
|
13
|
+
dateTimeCreated: DateString;
|
|
14
|
+
} | {
|
|
15
|
+
id: string;
|
|
16
|
+
url?: string | null;
|
|
17
|
+
status: 'DELETED';
|
|
18
|
+
dateTimeCreated: DateString;
|
|
19
|
+
};
|
|
20
|
+
export interface FileQuery {
|
|
21
|
+
node?: File | null;
|
|
22
|
+
}
|
|
23
|
+
export interface FileQueryVariables {
|
|
24
|
+
id: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const FILE_FRAGMENT: string;
|
|
27
|
+
export declare const FILE_QUERY: string;
|
|
28
|
+
export type UploadPrivateImageFileError = MutationError<'FileFormatNotSupportedError' | 'FileNameTooLongError' | 'FileSizeTooBigError'>;
|
|
29
|
+
export interface UploadPrivateImageFileMutation {
|
|
30
|
+
uploadPrivateImageFile?: UploadPrivateImageFileError | null;
|
|
31
|
+
}
|
|
32
|
+
export interface UploadPrivateImageFileMutationVariables {
|
|
33
|
+
input: {
|
|
34
|
+
id: string;
|
|
35
|
+
file: globalThis.File;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export declare const UPLOAD_PRIVATE_IMAGE_FILE_MUTATION: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FileQueryVariables, UploadPrivateImageFileMutationVariables } from '../graphql';
|
|
2
|
+
import { GraphQLClient } from '../utils/graphql-client';
|
|
3
|
+
import { File, UploadPrivateImageFileError } from './file';
|
|
4
|
+
import { OperationResult } from './types';
|
|
5
|
+
|
|
6
|
+
export declare class FileService {
|
|
7
|
+
private client;
|
|
8
|
+
constructor(client: GraphQLClient);
|
|
9
|
+
file(variables: FileQueryVariables): Promise<OperationResult<never, File | null | undefined>>;
|
|
10
|
+
uploadPrivateImageFile(variables: UploadPrivateImageFileMutationVariables): Promise<OperationResult<UploadPrivateImageFileError>>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { DateString, EnumFilterField, MutationError, ObjectIdFilterField, PaginatedQuery, StringFilterField } from './types';
|
|
2
|
+
|
|
3
|
+
export type GameType = 'SLOTS' | 'SPORTS' | 'BINGO' | 'FISHING' | 'LIVE' | 'GAMES';
|
|
4
|
+
export type GameProvider__Next = 'DARWIN' | 'MEGABALL' | 'DRBINGO' | 'RTG';
|
|
5
|
+
export type GameProvider = 'JILI' | 'PGSOFT' | 'FACHAI' | 'PLAYTECH' | 'CQ9' | 'JDB' | 'BOOONGO' | 'HABANERO' | 'RELAXGAMING' | 'DG' | 'E2E' | 'BTI' | GameProvider__Next;
|
|
6
|
+
export interface Game {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
type: GameType;
|
|
10
|
+
provider: GameProvider;
|
|
11
|
+
}
|
|
12
|
+
export interface GamesQuery extends PaginatedQuery<'games', Game> {
|
|
13
|
+
}
|
|
14
|
+
export interface GamesQueryVariables {
|
|
15
|
+
after?: string;
|
|
16
|
+
first?: number;
|
|
17
|
+
filter?: {
|
|
18
|
+
id?: ObjectIdFilterField;
|
|
19
|
+
name?: StringFilterField;
|
|
20
|
+
type?: EnumFilterField<GameType>;
|
|
21
|
+
provider?: EnumFilterField<GameProvider>;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare const GAME_FRAGMENT: string;
|
|
25
|
+
export interface GameQuery {
|
|
26
|
+
node?: Game | null;
|
|
27
|
+
}
|
|
28
|
+
export interface GameQueryVariables {
|
|
29
|
+
id: string;
|
|
30
|
+
}
|
|
31
|
+
export declare const GAME_QUERY: string;
|
|
32
|
+
export declare const GAMES_QUERY: string;
|
|
33
|
+
export interface GamesByNameQuery {
|
|
34
|
+
gamesByName: Game[];
|
|
35
|
+
}
|
|
36
|
+
export interface GamesByNameQueryVariables {
|
|
37
|
+
search: string;
|
|
38
|
+
first?: number;
|
|
39
|
+
filter?: GamesQueryVariables['filter'];
|
|
40
|
+
}
|
|
41
|
+
export declare const GAMES_BY_NAME_QUERY: string;
|
|
42
|
+
export type GameSessionStatus = 'PENDING' | 'STARTING' | 'READY' | 'ENDED' | 'CANCELLED';
|
|
43
|
+
export type GameSession = {
|
|
44
|
+
id: string;
|
|
45
|
+
game: Game;
|
|
46
|
+
status: Extract<GameSessionStatus, 'READY'>;
|
|
47
|
+
launchUrl: string;
|
|
48
|
+
dateTimeCreated: DateString;
|
|
49
|
+
dateTimeLastUpdated: DateString;
|
|
50
|
+
} | {
|
|
51
|
+
id: string;
|
|
52
|
+
game: Game;
|
|
53
|
+
status: Exclude<GameSessionStatus, 'READY'>;
|
|
54
|
+
launchUrl?: never;
|
|
55
|
+
dateTimeCreated: DateString;
|
|
56
|
+
dateTimeLastUpdated: DateString;
|
|
57
|
+
};
|
|
58
|
+
export interface GameSessionQuery {
|
|
59
|
+
node?: GameSession | null;
|
|
60
|
+
}
|
|
61
|
+
export interface GameSessionQueryVariables {
|
|
62
|
+
id: string;
|
|
63
|
+
}
|
|
64
|
+
export declare const GAME_SESSION_QUERY: string;
|
|
65
|
+
export type CreateGameSessionError = MutationError<'GameDoesNotExistError'>;
|
|
66
|
+
export interface CreateGameSessionMutation {
|
|
67
|
+
createGameSession?: null | CreateGameSessionError;
|
|
68
|
+
}
|
|
69
|
+
export interface CreateGameSessionMutationVariables {
|
|
70
|
+
input: {
|
|
71
|
+
id: string;
|
|
72
|
+
game: string;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export declare const CREATE_GAME_SESSION_MUTATION: string;
|
|
76
|
+
export interface EndGameSessionMutation {
|
|
77
|
+
endGameSession: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface EndGameSessionMutationVariables {
|
|
80
|
+
input: {
|
|
81
|
+
id: string;
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
export declare const END_GAME_SESSION_MUTATION: string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { GraphQLClient } from '../utils/graphql-client';
|
|
2
|
+
import { CreateGameSessionError, CreateGameSessionMutationVariables, EndGameSessionMutationVariables, Game, GameQueryVariables, GameSession, GameSessionQueryVariables, GamesByNameQueryVariables, GamesQueryVariables } from './game';
|
|
3
|
+
import { OperationResult, PaginatedQueryResult, UnknownError } from './types';
|
|
4
|
+
|
|
5
|
+
export declare class GameService {
|
|
6
|
+
protected client: GraphQLClient;
|
|
7
|
+
constructor(client: GraphQLClient);
|
|
8
|
+
game(variables?: GameQueryVariables): Promise<OperationResult<never, Game | null | undefined>>;
|
|
9
|
+
games(variables?: GamesQueryVariables): Promise<OperationResult<never, PaginatedQueryResult<Game>>>;
|
|
10
|
+
gamesByName(variables?: GamesByNameQueryVariables): Promise<OperationResult<never, Game[]>>;
|
|
11
|
+
gameSession(variables: GameSessionQueryVariables): Promise<OperationResult<never, GameSession | null | undefined>>;
|
|
12
|
+
createGameSession(variables: CreateGameSessionMutationVariables): Promise<OperationResult<CreateGameSessionError>>;
|
|
13
|
+
endGameSession(variables: EndGameSessionMutationVariables): Promise<OperationResult<UnknownError>>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export * from './announcement';
|
|
2
|
+
export * from './bet-record';
|
|
3
|
+
export * from './bonus';
|
|
4
|
+
export * from './cashback';
|
|
5
|
+
export * from './deposit';
|
|
6
|
+
export * from './file';
|
|
7
|
+
export * from './game';
|
|
8
|
+
export * from './member';
|
|
9
|
+
export * from './platform';
|
|
10
|
+
export * from './points';
|
|
11
|
+
export * from './promo';
|
|
12
|
+
export * from './session';
|
|
13
|
+
export * from './transaction';
|
|
14
|
+
export * from './types';
|
|
15
|
+
export * from './wallet';
|
|
16
|
+
export * from './withdrawal';
|
|
17
|
+
export * from './account.service';
|
|
18
|
+
export * from './auth.service';
|
|
19
|
+
export * from './file.service';
|
|
20
|
+
export * from './game.service';
|
|
21
|
+
export * from './report.service';
|
|
22
|
+
export * from './static.service';
|
|
23
|
+
export * from './wallet.service';
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { File } from './file';
|
|
2
|
+
import { DateString, Decimal, MutationError } from './types';
|
|
3
|
+
|
|
4
|
+
export interface Member {
|
|
5
|
+
dateTimeLastActive?: DateString | null;
|
|
6
|
+
}
|
|
7
|
+
export interface MemberQuery {
|
|
8
|
+
member: Member;
|
|
9
|
+
}
|
|
10
|
+
export declare const MEMBER_QUERY: string;
|
|
11
|
+
export type MemberAccountStatus = 'ACTIVE' | 'DISABLED' | 'BLACKLISTED';
|
|
12
|
+
export type MemberAccountVerificationStatus = 'UNVERIFIED' | 'PENDING' | 'VERIFIED';
|
|
13
|
+
export type MemberVerificationStatus = 'PENDING' | 'APPROVED' | 'REJECTED' | 'VERIFIED' | 'UNVERIFIED';
|
|
14
|
+
export interface MemberAccount {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
status: MemberAccountStatus;
|
|
18
|
+
realName?: string | null;
|
|
19
|
+
nickName?: string | null;
|
|
20
|
+
birthDay?: DateString | null;
|
|
21
|
+
validId?: string | null;
|
|
22
|
+
emailAddress?: string | null;
|
|
23
|
+
mobileNumber?: string | null;
|
|
24
|
+
verified: boolean;
|
|
25
|
+
verificationStatus: MemberAccountVerificationStatus;
|
|
26
|
+
mobileNumberVerified?: boolean | null;
|
|
27
|
+
mobileNumberVerificationRequired?: boolean | null;
|
|
28
|
+
transactionPassword: boolean;
|
|
29
|
+
dateTimeCreated: DateString;
|
|
30
|
+
dateTimeLastUpdated: DateString;
|
|
31
|
+
}
|
|
32
|
+
export interface MemberAccountQuery {
|
|
33
|
+
memberAccount: MemberAccount;
|
|
34
|
+
}
|
|
35
|
+
export declare const MEMBER_ACCOUNT_QUERY: string;
|
|
36
|
+
export interface MemberVerification {
|
|
37
|
+
id: string;
|
|
38
|
+
status: MemberVerificationStatus;
|
|
39
|
+
address: string;
|
|
40
|
+
sourceOfIncome: string;
|
|
41
|
+
natureOfWork: string;
|
|
42
|
+
nationality: string;
|
|
43
|
+
placeOfBirth: string;
|
|
44
|
+
idFrontImage: File;
|
|
45
|
+
selfieImage: File;
|
|
46
|
+
}
|
|
47
|
+
export interface MemberVerificationQuery {
|
|
48
|
+
memberAccount: {
|
|
49
|
+
verification?: MemberVerification | null;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export declare const MEMBER_VERIFICATION_QUERY: string;
|
|
53
|
+
export type RegisterMemberAccountError = MutationError<'AccountNameNotAvailableError' | 'InvalidPlatformError' | 'InvalidReCAPTCHAResponseError' | 'InvalidSMSVerificationCodeError' | 'MinimumAgeRequirementError' | 'MobileNumberNotAvailableError'>;
|
|
54
|
+
export interface RegisterMemberAccountMutation {
|
|
55
|
+
registerMemberAccount?: null | RegisterMemberAccountError;
|
|
56
|
+
}
|
|
57
|
+
export interface RegisterMemberAccountMutationVariables {
|
|
58
|
+
input: {
|
|
59
|
+
id: string;
|
|
60
|
+
name: string;
|
|
61
|
+
password: string;
|
|
62
|
+
mobileNumber: string;
|
|
63
|
+
birthDay: string;
|
|
64
|
+
domain?: string;
|
|
65
|
+
};
|
|
66
|
+
verificationCode?: string;
|
|
67
|
+
reCAPTCHAResponse?: string;
|
|
68
|
+
}
|
|
69
|
+
export declare const REGISTER_MEMBER_ACCOUNT_MUTATION: string;
|
|
70
|
+
export type UpdateMemberAccountError = MutationError<'AccountNameNotAvailableError' | 'EmailAddressNotAvailableError' | 'InvalidTransactionPasswordError' | 'MobileNumberNotAvailableError' | 'NickNameNotAvailableError' | 'RealNameAlreadySetError' | 'ValidIdAlreadySetError'>;
|
|
71
|
+
export interface UpdateMemberAccountMutation {
|
|
72
|
+
updateMemberAccount?: null | UpdateMemberAccountError;
|
|
73
|
+
}
|
|
74
|
+
export interface UpdateMemberAccountMutationVariables {
|
|
75
|
+
input: {
|
|
76
|
+
id: string;
|
|
77
|
+
data: {
|
|
78
|
+
name?: string;
|
|
79
|
+
password?: string;
|
|
80
|
+
emailAddress?: string;
|
|
81
|
+
mobileNumber?: string;
|
|
82
|
+
realName?: string;
|
|
83
|
+
nickName?: string;
|
|
84
|
+
transactionPassword?: string;
|
|
85
|
+
validId?: string;
|
|
86
|
+
mobileNumberVerificationRequired?: boolean;
|
|
87
|
+
secretQuestion?: string;
|
|
88
|
+
secretAnswer?: string;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
export declare const UPDATE_MEMBER_ACCOUNT_MUTATION: string;
|
|
93
|
+
export type ResetPasswordError = MutationError<'AccountNotFoundError' | 'InvalidVerificationCodeError'>;
|
|
94
|
+
export interface ResetPasswordMutation {
|
|
95
|
+
resetPassword?: ResetPasswordError | null;
|
|
96
|
+
}
|
|
97
|
+
export interface ResetPasswordMutationVariables {
|
|
98
|
+
input: {
|
|
99
|
+
mobileNumber: string;
|
|
100
|
+
newPassword: string;
|
|
101
|
+
};
|
|
102
|
+
verificationCode: string;
|
|
103
|
+
}
|
|
104
|
+
export declare const RESET_PASSWORD_MUTATION: string;
|
|
105
|
+
export interface DeleteMemberAccountMutation {
|
|
106
|
+
deleteMemberAccount: boolean;
|
|
107
|
+
}
|
|
108
|
+
export interface DeleteMemberAccountMutationVariables {
|
|
109
|
+
input: {
|
|
110
|
+
id: string;
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
export declare const DELETE_MEMBER_ACCOUNT_MUTATION: string;
|
|
114
|
+
export type SendVerificationCodeError = MutationError<'InvalidPlatformError' | 'NotReadyToSendVerficationCodeError'>;
|
|
115
|
+
export interface SendVerificationCodeMutation {
|
|
116
|
+
sendVerificationCode?: SendVerificationCodeError | null;
|
|
117
|
+
}
|
|
118
|
+
export interface SendVerificationCodeMutationVariables {
|
|
119
|
+
input: {
|
|
120
|
+
channel: 'SMS' | 'EMAIL';
|
|
121
|
+
recipient: string;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
export declare const SEND_VERIFICATION_CODE_MUTATION: string;
|
|
125
|
+
export type VerifyMobileNumberError = MutationError<'InvalidSMSVerificationCodeError' | 'MobileNumberAlreadyVerifiedError'>;
|
|
126
|
+
export interface VerifyMobileNumberMutation {
|
|
127
|
+
verifyMobileNumber?: VerifyMobileNumberError | null;
|
|
128
|
+
}
|
|
129
|
+
export interface VerifyMobileNumberMutationVariables {
|
|
130
|
+
input: {
|
|
131
|
+
verificationCode: string;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
export declare const VERIFY_MOBILE_NUMBER_MUTATION: string;
|
|
135
|
+
export type CreateMemberVerificationError = MutationError<'FileDoesNotExistError' | 'FileNotReadyError' | 'MemberVerificationAlreadyExistsError'>;
|
|
136
|
+
export interface CreateMemberVerificationMutation {
|
|
137
|
+
createMemberVerification?: CreateMemberVerificationError | null;
|
|
138
|
+
}
|
|
139
|
+
export interface CreateMemberVerificationMutationVariables {
|
|
140
|
+
input: {
|
|
141
|
+
id: string;
|
|
142
|
+
idFrontImage: string;
|
|
143
|
+
selfieImage: string;
|
|
144
|
+
address: string;
|
|
145
|
+
sourceOfIncome: string;
|
|
146
|
+
natureOfWork: string;
|
|
147
|
+
nationality: string;
|
|
148
|
+
placeOfBirth: string;
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
export declare const CREATE_MEMBER_VERIFICATION_MUTATION: string;
|
|
152
|
+
export type UpdateMemberVerificationError = MutationError<'FileDoesNotExistError' | 'FileNotReadyError' | 'MemberVerificationAlreadyApprovedError' | 'MemberVerificationDoesNotExistError'>;
|
|
153
|
+
export interface UpdateMemberVerificationMutation {
|
|
154
|
+
updateMemberVerification?: UpdateMemberVerificationError | null;
|
|
155
|
+
}
|
|
156
|
+
export interface UpdateMemberVerificationMutationVariables {
|
|
157
|
+
input: {
|
|
158
|
+
id: string;
|
|
159
|
+
data: {
|
|
160
|
+
idFrontImage?: string;
|
|
161
|
+
selfieImage?: string;
|
|
162
|
+
address?: string;
|
|
163
|
+
sourceOfIncome?: string;
|
|
164
|
+
natureOfWork?: string;
|
|
165
|
+
nationality?: string;
|
|
166
|
+
placeOfBirth?: string;
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
export declare const UPDATE_MEMBER_VERIFICATION_MUTATION: string;
|
|
171
|
+
export interface ProfileCompletion {
|
|
172
|
+
completionPercentage: Decimal;
|
|
173
|
+
personalInformation: boolean;
|
|
174
|
+
accountVerification: boolean;
|
|
175
|
+
mobileNumberVerification: boolean;
|
|
176
|
+
transactionPassword: boolean;
|
|
177
|
+
accountPassword: boolean;
|
|
178
|
+
}
|
|
179
|
+
export interface ProfileCompletionQuery {
|
|
180
|
+
profileCompletion: ProfileCompletion;
|
|
181
|
+
}
|
|
182
|
+
export declare const PROFILE_COMPLETION_QUERY: string;
|