@opexa/portal-components 0.0.468 → 0.0.469
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/components/DigitainLauncher/Loading.d.ts +1 -0
- package/dist/components/DigitainLauncher/Loading.js +5 -0
- package/dist/components/Disclaimer/ResponsibleGaming.d.ts +10 -0
- package/dist/components/Disclaimer/ResponsibleGaming.js +13 -0
- package/dist/components/Disclaimer/TermsOfUse.d.ts +11 -0
- package/dist/components/Disclaimer/TermsOfUse.js +13 -0
- package/dist/components/FeatureFlag/FeatureFlag.d.ts +1 -0
- package/dist/components/FeatureFlag/FeatureFlag.js +29 -0
- package/dist/components/FeatureFlag/index.d.ts +1 -0
- package/dist/components/FeatureFlag/index.js +1 -0
- package/dist/components/Jackpots/Jackpots.module.css +184 -184
- package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.module.css +184 -184
- package/dist/components/Jackpots/JackpotsList/JackpotsListItem.module.css +184 -184
- package/dist/components/KYC/AutoOpen.d.ts +1 -0
- package/dist/components/KYC/AutoOpen.js +40 -0
- package/dist/components/KYC/BasicInformation.d.ts +1 -0
- package/dist/components/KYC/BasicInformation.js +101 -0
- package/dist/components/KYC/CaptureIdDocument.d.ts +1 -0
- package/dist/components/KYC/CaptureIdDocument.js +219 -0
- package/dist/components/KYC/CaptureSelfie.d.ts +1 -0
- package/dist/components/KYC/CaptureSelfie.js +285 -0
- package/dist/components/KYC/DisplayImage.d.ts +5 -0
- package/dist/components/KYC/DisplayImage.js +8 -0
- package/dist/components/KYC/FileUpload.d.ts +10 -0
- package/dist/components/KYC/FileUpload.js +72 -0
- package/dist/components/KYC/IdentityVerification.d.ts +1 -0
- package/dist/components/KYC/IdentityVerification.js +120 -0
- package/dist/components/KYC/Indicator.d.ts +1 -0
- package/dist/components/KYC/Indicator.js +8 -0
- package/dist/components/KYC/KYC.lazy.d.ts +6 -0
- package/dist/components/KYC/KYC.lazy.js +45 -0
- package/dist/components/KYC/KYCContext.d.ts +6 -0
- package/dist/components/KYC/KYCContext.js +2 -0
- package/dist/components/KYC/NoCameraError.d.ts +7 -0
- package/dist/components/KYC/NoCameraError.js +6 -0
- package/dist/components/KYC/PersonOverlayDesktop.d.ts +7 -0
- package/dist/components/KYC/PersonOverlayDesktop.js +9 -0
- package/dist/components/KYC/PersonalInformation.d.ts +1 -0
- package/dist/components/KYC/PersonalInformation.js +122 -0
- package/dist/components/KYC/backup/Header.d.ts +1 -0
- package/dist/components/KYC/backup/Header.js +8 -0
- package/dist/components/KYC/backup/Indicator.d.ts +1 -0
- package/dist/components/KYC/backup/Indicator.js +9 -0
- package/dist/components/KYC/backup/KYC.d.ts +1 -0
- package/dist/components/KYC/backup/KYC.js +14 -0
- package/dist/components/KYC/backup/KYC.lazy.d.ts +1 -0
- package/dist/components/KYC/backup/KYC.lazy.js +26 -0
- package/dist/components/KYC/backup/KYCContext.d.ts +6 -0
- package/dist/components/KYC/backup/KYCContext.js +2 -0
- package/dist/components/KYC/backup/Step1.d.ts +1 -0
- package/dist/components/KYC/backup/Step1.js +13 -0
- package/dist/components/KYC/backup/Step2.d.ts +1 -0
- package/dist/components/KYC/backup/Step2.js +13 -0
- package/dist/components/KYC/backup/Step3.d.ts +1 -0
- package/dist/components/KYC/backup/Step3.js +13 -0
- package/dist/components/KYC/backup/Step4.d.ts +1 -0
- package/dist/components/KYC/backup/Step4.js +7 -0
- package/dist/components/KYC/backup/useKYC.d.ts +10 -0
- package/dist/components/KYC/backup/useKYC.js +8 -0
- package/dist/components/KYC/loadModels.d.ts +1 -0
- package/dist/components/KYC/loadModels.js +9 -0
- package/dist/components/KYC/useKYC.d.ts +25 -0
- package/dist/components/KYC/useKYC.js +38 -0
- package/dist/components/KYC/utils.d.ts +9 -0
- package/dist/components/KYC/utils.js +79 -0
- package/dist/components/Messages/Message.d.ts +1 -0
- package/dist/components/Messages/Message.js +35 -0
- package/dist/components/Messages/MessageContext.d.ts +6 -0
- package/dist/components/Messages/MessageContext.js +2 -0
- package/dist/components/Messages/MessagePopup.d.ts +1 -0
- package/dist/components/Messages/MessagePopup.js +20 -0
- package/dist/components/Messages/MessageTrigger.d.ts +8 -0
- package/dist/components/Messages/MessageTrigger.js +19 -0
- package/dist/components/PortalProvider/CXDTokenObserver.d.ts +1 -0
- package/dist/components/PortalProvider/CXDTokenObserver.js +30 -0
- package/dist/components/Quests/CountdownTimer.d.ts +15 -0
- package/dist/components/Quests/CountdownTimer.js +33 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.d.ts +4 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuest.js +78 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.d.ts +8 -0
- package/dist/components/Quests/DailyCheckInQuest/DailyCheckInQuestModal.js +9 -0
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.d.ts +4 -0
- package/dist/components/Quests/OnboardingQuest/OnboardingQuest.js +4 -0
- package/dist/components/Quests/WageringQuest/WageringQuest.d.ts +4 -0
- package/dist/components/Quests/WageringQuest/WageringQuest.js +20 -0
- package/dist/components/Quests/WageringQuest/WageringQuestModal.d.ts +9 -0
- package/dist/components/Quests/WageringQuest/WageringQuestModal.js +9 -0
- package/dist/components/SignIn/utils.d.ts +8 -0
- package/dist/components/SignIn/utils.js +26 -0
- package/dist/components/SignUp/SignUp.lazy.d.ts +12 -0
- package/dist/components/SignUp/SignUp.lazy.js +18 -0
- package/dist/components/SignUp/SignUpContext.d.ts +6 -0
- package/dist/components/SignUp/SignUpContext.js +2 -0
- package/dist/components/SignUp/SignUpDefault/SignUp.lazy.d.ts +17 -0
- package/dist/components/SignUp/SignUpDefault/SignUp.lazy.js +18 -0
- package/dist/components/SignUp/SignUpDefault/SignUpContext.d.ts +6 -0
- package/dist/components/SignUp/SignUpDefault/SignUpContext.js +2 -0
- package/dist/components/SignUp/SignUpDefault/SignUpForm.d.ts +1 -0
- package/dist/components/SignUp/SignUpDefault/SignUpForm.js +310 -0
- package/dist/components/SignUp/SignUpForm.d.ts +1 -0
- package/dist/components/SignUp/SignUpForm.js +284 -0
- package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.d.ts +1 -0
- package/dist/components/SignUp/SignUpKYC/CaptureIdDocument.js +198 -0
- package/dist/components/SignUp/SignUpKYC/CaptureSelfie.d.ts +1 -0
- package/dist/components/SignUp/SignUpKYC/CaptureSelfie.js +251 -0
- package/dist/components/SignUp/SignUpKYC/ImageUploader.d.ts +10 -0
- package/dist/components/SignUp/SignUpKYC/ImageUploader.js +42 -0
- package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.d.ts +7 -0
- package/dist/components/SignUp/SignUpKYC/PersonOverlayDesktop.js +9 -0
- package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.d.ts +1 -0
- package/dist/components/SignUp/SignUpKYC/SignUpFormKYC.js +464 -0
- package/dist/components/SignUp/SignUpKYC/useImageUploader.d.ts +11 -0
- package/dist/components/SignUp/SignUpKYC/useImageUploader.js +20 -0
- package/dist/components/SignUp/SignUpKYC/utils.d.ts +9 -0
- package/dist/components/SignUp/SignUpKYC/utils.js +79 -0
- package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.d.ts +1 -0
- package/dist/components/SignUp/SignUpPagcor/CaptureIdDocument.js +198 -0
- package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.d.ts +1 -0
- package/dist/components/SignUp/SignUpPagcor/CaptureSelfie.js +251 -0
- package/dist/components/SignUp/SignUpPagcor/ImageUploader.d.ts +10 -0
- package/dist/components/SignUp/SignUpPagcor/ImageUploader.js +41 -0
- package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.d.ts +1 -0
- package/dist/components/SignUp/SignUpPagcor/SignUpFormPagcor.js +429 -0
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.d.ts +13 -0
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcor.lazy.js +26 -0
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.d.ts +7 -0
- package/dist/components/SignUp/SignUpPagcor/SignUpPagcorContext.js +2 -0
- package/dist/components/SignUp/SignUpPagcor/useImageUploader.d.ts +11 -0
- package/dist/components/SignUp/SignUpPagcor/useImageUploader.js +20 -0
- package/dist/components/Tournaments/TournamentsCarousel/TournamentsCarouselItem.module.css +184 -184
- package/dist/components/Tournaments/TournamentsList/TournamentItem.module.css +184 -184
- package/dist/components/shared/IdDocumentField.client.d.ts +25 -0
- package/dist/components/shared/IdDocumentField.client.js +204 -0
- package/dist/components/shared/IdDocumentField.d.ts +2 -0
- package/dist/components/shared/IdDocumentField.js +11 -0
- package/dist/components/shared/SelfieField.client.d.ts +20 -0
- package/dist/components/shared/SelfieField.client.js +327 -0
- package/dist/components/shared/SelfieField.d.ts +2 -0
- package/dist/components/shared/SelfieField.js +11 -0
- package/dist/constants/BranchCode.d.ts +4 -0
- package/dist/constants/BranchCode.js +42 -0
- package/dist/constants/Branches.d.ts +2 -0
- package/dist/constants/Branches.js +42 -0
- package/dist/handlers/postTransformIdFrontImage.d.ts +3 -0
- package/dist/handlers/postTransformIdFrontImage.js +67 -0
- package/dist/handlers/postTransformSelfieImage.d.ts +3 -0
- package/dist/handlers/postTransformSelfieImage.js +71 -0
- package/dist/handlers.d.ts +43 -0
- package/dist/handlers.js +297 -0
- package/dist/icons/BellRingIcon.d.ts +2 -0
- package/dist/icons/BellRingIcon.js +4 -0
- package/dist/images/responsible-gaming-yellow.png +0 -0
- package/dist/services/queries.js +2754 -2754
- package/dist/services/wallet.d.ts +53 -53
- package/dist/services/wallet.js +59 -59
- package/dist/styles/theme.css +731 -731
- package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +4 -0
- package/dist/third-parties/FacebookPixel/FacebookPixel.js +4 -0
- package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
- package/dist/third-parties/FacebookPixel/api.js +1 -0
- package/dist/third-parties/FacebookPixel/index.d.ts +1 -0
- package/dist/third-parties/FacebookPixel/index.js +1 -0
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +4 -0
- package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +4 -0
- package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
- package/dist/third-parties/GoogleRecaptcha/api.js +1 -0
- package/dist/third-parties/GoogleRecaptcha/index.d.ts +1 -0
- package/dist/third-parties/GoogleRecaptcha/index.js +1 -0
- package/dist/third-parties/index.d.ts +2 -0
- package/dist/third-parties/index.js +2 -0
- package/dist/ui/Carousel/Carousel.d.ts +72 -72
- package/dist/ui/Carousel/carousel.recipe.d.ts +8 -8
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +90 -90
- package/dist/ui/Menu/menu.recipe.d.ts +5 -5
- package/dist/ui/Progress/Progress.d.ts +27 -27
- package/dist/ui/Progress/progress.recipe.d.ts +3 -3
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/Table/Table.d.ts +21 -21
- package/dist/ui/Table/table.anatomy.d.ts +1 -1
- package/dist/ui/Table/table.recipe.d.ts +3 -3
- package/dist/utils/dataUrlToBlob.d.ts +1 -0
- package/dist/utils/dataUrlToBlob.js +11 -0
- package/dist/utils/gamesAvailable3pmTo3am.d.ts +1 -0
- package/dist/utils/gamesAvailable3pmTo3am.js +1 -0
- package/dist/utils/getGameName.d.ts +1 -0
- package/dist/utils/getGameName.js +6 -0
- package/dist/utils/isBetween3amAnd3pm.d.ts +1 -0
- package/dist/utils/isBetween3amAnd3pm.js +5 -0
- package/dist/utils/resizeImageSize.d.ts +2 -0
- package/dist/utils/resizeImageSize.js +11 -0
- package/package.json +162 -162
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Simplify, SimplifyDeep } from
|
|
2
|
-
import type { Bonus, Cashback, CashbackBonus, DateFilterField, Deposit, EnumFilterField, FavoriteGame, GameSession, InstapayBank, MayaSession, ObjectIdFilterField, PointsWallet, Promo, PromoType, Wallet } from
|
|
3
|
-
import { type GraphQLRequestOptions } from
|
|
1
|
+
import type { Simplify, SimplifyDeep } from 'type-fest';
|
|
2
|
+
import type { Bonus, Cashback, CashbackBonus, DateFilterField, Deposit, EnumFilterField, FavoriteGame, GameSession, InstapayBank, MayaSession, ObjectIdFilterField, PointsWallet, Promo, PromoType, Wallet } from '../types';
|
|
3
|
+
import { type GraphQLRequestOptions } from './graphqlRequest';
|
|
4
4
|
export interface PromosQuery {
|
|
5
5
|
promos: Promo[];
|
|
6
6
|
}
|
|
@@ -23,7 +23,7 @@ export interface CashbackQueryVariables {
|
|
|
23
23
|
id: string;
|
|
24
24
|
}
|
|
25
25
|
export declare const getCashback: (id: string, options?: GraphQLRequestOptions) => Promise<Cashback | null>;
|
|
26
|
-
export type AvailablePromosInput = SimplifyDeep<AvailablePromosQueryVariables[
|
|
26
|
+
export type AvailablePromosInput = SimplifyDeep<AvailablePromosQueryVariables['filter']>;
|
|
27
27
|
export interface AvailablePromosQuery {
|
|
28
28
|
availablePromos: Promo[];
|
|
29
29
|
}
|
|
@@ -44,7 +44,7 @@ export interface CashbackBonusIdsQuery {
|
|
|
44
44
|
}
|
|
45
45
|
export declare const getCashbackBonusesCount: (options?: GraphQLRequestOptions) => Promise<number>;
|
|
46
46
|
export type ClaimCashbackBonusError = {
|
|
47
|
-
name:
|
|
47
|
+
name: 'CashbackBonusDoesNotExistError';
|
|
48
48
|
message: string;
|
|
49
49
|
};
|
|
50
50
|
export interface ClaimCashbackBonusMutation {
|
|
@@ -92,34 +92,34 @@ export interface DepositQueryVariables {
|
|
|
92
92
|
}
|
|
93
93
|
export declare const getDeposit: (id: string, options?: GraphQLRequestOptions) => Promise<Deposit | null>;
|
|
94
94
|
export type CreateDepositError = {
|
|
95
|
-
name:
|
|
95
|
+
name: 'DepositPromoMaximumAmountExceededError';
|
|
96
96
|
message: string;
|
|
97
97
|
} | {
|
|
98
|
-
name:
|
|
98
|
+
name: 'DepositPromoMinimumAmountNotMetError';
|
|
99
99
|
message: string;
|
|
100
100
|
} | {
|
|
101
|
-
name:
|
|
101
|
+
name: 'MaximumDepositAmountExceededError';
|
|
102
102
|
message: string;
|
|
103
103
|
} | {
|
|
104
|
-
name:
|
|
104
|
+
name: 'MinimumDepositAmountNotMetError';
|
|
105
105
|
message: string;
|
|
106
106
|
} | {
|
|
107
|
-
name:
|
|
107
|
+
name: 'MinimumFirstDepositAmountNotMetError';
|
|
108
108
|
message: string;
|
|
109
109
|
} | {
|
|
110
|
-
name:
|
|
110
|
+
name: 'PromoNotEnabledError';
|
|
111
111
|
message: string;
|
|
112
112
|
} | {
|
|
113
|
-
name:
|
|
113
|
+
name: 'WalletDoesNotExistError';
|
|
114
114
|
message: string;
|
|
115
115
|
} | {
|
|
116
|
-
name:
|
|
116
|
+
name: 'ReCAPTCHAVerificationFailedError';
|
|
117
117
|
message: string;
|
|
118
118
|
} | {
|
|
119
|
-
name:
|
|
119
|
+
name: 'UPIReferenceNotAvailableError';
|
|
120
120
|
message: string;
|
|
121
121
|
} | {
|
|
122
|
-
name:
|
|
122
|
+
name: 'GCashDirectApiRequestError';
|
|
123
123
|
message: string;
|
|
124
124
|
};
|
|
125
125
|
export interface CreateGCashDepositMutation {
|
|
@@ -132,7 +132,7 @@ export interface CreateGCashDepositMutationVariables {
|
|
|
132
132
|
promo?: string;
|
|
133
133
|
};
|
|
134
134
|
}
|
|
135
|
-
export type CreateGCashDepositInput = Simplify<CreateGCashDepositMutationVariables[
|
|
135
|
+
export type CreateGCashDepositInput = Simplify<CreateGCashDepositMutationVariables['input']>;
|
|
136
136
|
export declare const createGCashDeposit: (input: CreateGCashDepositInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
137
137
|
export interface CreateLibanganDepositMutationVariables {
|
|
138
138
|
input: {
|
|
@@ -142,7 +142,7 @@ export interface CreateLibanganDepositMutationVariables {
|
|
|
142
142
|
redirectUrl?: string;
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
export type CreateLibanganDepositInput = Simplify<CreateLibanganDepositMutationVariables[
|
|
145
|
+
export type CreateLibanganDepositInput = Simplify<CreateLibanganDepositMutationVariables['input']>;
|
|
146
146
|
export interface CreateLibanganDepositMutation {
|
|
147
147
|
createLibanganPayInDeposit?: null | CreateDepositError;
|
|
148
148
|
}
|
|
@@ -155,7 +155,7 @@ export interface CreateLibanganDepositMutationVariables {
|
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
157
|
export declare const createLibanganDeposit: (input: CreateLibanganDepositInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
158
|
-
export type CreatePisoPayDepositInput = Simplify<CreatePisoPayDepositMutationVariables[
|
|
158
|
+
export type CreatePisoPayDepositInput = Simplify<CreatePisoPayDepositMutationVariables['input']>;
|
|
159
159
|
export interface CreatePisoPayDepositMutation {
|
|
160
160
|
createPisoPayDeposit?: null | CreateDepositError;
|
|
161
161
|
}
|
|
@@ -178,7 +178,7 @@ export interface CreateGCashDirectWebpayDepositMutationVariables {
|
|
|
178
178
|
promo?: string;
|
|
179
179
|
};
|
|
180
180
|
}
|
|
181
|
-
export type CreateGCashDirectWebpayDepositInput = Simplify<CreateGCashDirectWebpayDepositMutationVariables[
|
|
181
|
+
export type CreateGCashDirectWebpayDepositInput = Simplify<CreateGCashDirectWebpayDepositMutationVariables['input']>;
|
|
182
182
|
export declare const createGCashDirectWebpayDeposit: (input: CreateGCashDirectWebpayDepositInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
183
183
|
export interface CreateMayaDepositMutation {
|
|
184
184
|
createMayaDeposit?: null | CreateDepositError;
|
|
@@ -190,7 +190,7 @@ export interface CreateMayaDepositMutationVariables {
|
|
|
190
190
|
promo?: string;
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
|
-
export type CreateMayaDepositInput = Simplify<CreateMayaDepositMutationVariables[
|
|
193
|
+
export type CreateMayaDepositInput = Simplify<CreateMayaDepositMutationVariables['input']>;
|
|
194
194
|
export declare const createMayaDeposit: (input: CreateMayaDepositInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
195
195
|
export interface CreateAIOQRPHDepositMutation {
|
|
196
196
|
createAIOQRPHDeposit?: null | CreateDepositError;
|
|
@@ -202,7 +202,7 @@ export interface CreateAIOQRPHDepositMutationVariables {
|
|
|
202
202
|
promo?: string;
|
|
203
203
|
};
|
|
204
204
|
}
|
|
205
|
-
export type CreateAIOQRPHDepositInput = Simplify<CreateMayaAppDepositMutationVariables[
|
|
205
|
+
export type CreateAIOQRPHDepositInput = Simplify<CreateMayaAppDepositMutationVariables['input']>;
|
|
206
206
|
export declare const createAIOQRPHDeposit: (input: CreateAIOQRPHDepositInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
207
207
|
export interface CreateAIOOnlineBankDepositMutation {
|
|
208
208
|
createAIOOnlineBankDeposit?: null | CreateDepositError;
|
|
@@ -214,7 +214,7 @@ export interface CreateAIOOnlineBankDepositMutationVariables {
|
|
|
214
214
|
promo?: string;
|
|
215
215
|
};
|
|
216
216
|
}
|
|
217
|
-
export type CreateAIOOnlineBankDepositInput = Simplify<CreateAIOOnlineBankDepositMutationVariables[
|
|
217
|
+
export type CreateAIOOnlineBankDepositInput = Simplify<CreateAIOOnlineBankDepositMutationVariables['input']>;
|
|
218
218
|
export declare const createAIOOnlineBankDeposit: (input: CreateAIOOnlineBankDepositInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
219
219
|
export interface CreateManualBankDepositMutation {
|
|
220
220
|
createManualBankDeposit?: null | CreateDepositError;
|
|
@@ -227,7 +227,7 @@ export interface CreateManualBankDeposiMutationVariables {
|
|
|
227
227
|
promo?: string;
|
|
228
228
|
};
|
|
229
229
|
}
|
|
230
|
-
export type CreateManualBankDepositInput = Simplify<CreateManualBankDeposiMutationVariables[
|
|
230
|
+
export type CreateManualBankDepositInput = Simplify<CreateManualBankDeposiMutationVariables['input']>;
|
|
231
231
|
export declare const createManualBankDeposit: (input: CreateManualBankDepositInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
232
232
|
export interface CreateManualUPIDepositMutation {
|
|
233
233
|
createManualUPIDeposit?: null | CreateDepositError;
|
|
@@ -241,7 +241,7 @@ export interface CreateManualUPIDepositMutationVariables {
|
|
|
241
241
|
promo?: string;
|
|
242
242
|
};
|
|
243
243
|
}
|
|
244
|
-
export type CreateManualUPIDepositInput = Simplify<CreateManualUPIDepositMutationVariables[
|
|
244
|
+
export type CreateManualUPIDepositInput = Simplify<CreateManualUPIDepositMutationVariables['input']>;
|
|
245
245
|
export declare const createManualUPIDeposit: (input: CreateManualUPIDepositInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
246
246
|
export interface CreateMayaAppDepositMutation {
|
|
247
247
|
createMayaAppDeposit?: null | CreateDepositError;
|
|
@@ -253,31 +253,31 @@ export interface CreateMayaAppDepositMutationVariables {
|
|
|
253
253
|
promo?: string;
|
|
254
254
|
};
|
|
255
255
|
}
|
|
256
|
-
export type CreateMayaAppDepositInput = Simplify<CreateMayaAppDepositMutationVariables[
|
|
256
|
+
export type CreateMayaAppDepositInput = Simplify<CreateMayaAppDepositMutationVariables['input']>;
|
|
257
257
|
export declare const createMayaAppDeposit: (input: CreateMayaAppDepositInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
258
258
|
export type CreateWithdrawalError = {
|
|
259
|
-
name:
|
|
259
|
+
name: 'AccountNotVerifiedError';
|
|
260
260
|
message: string;
|
|
261
261
|
} | {
|
|
262
|
-
name:
|
|
262
|
+
name: 'InvalidTransactionPasswordError';
|
|
263
263
|
message: string;
|
|
264
264
|
} | {
|
|
265
|
-
name:
|
|
265
|
+
name: 'InvalidWithdrawalAmountError';
|
|
266
266
|
message: string;
|
|
267
267
|
} | {
|
|
268
|
-
name:
|
|
268
|
+
name: 'MobileNumberNotVerifiedError';
|
|
269
269
|
message: string;
|
|
270
270
|
} | {
|
|
271
|
-
name:
|
|
271
|
+
name: 'NotEnoughBalanceError';
|
|
272
272
|
message: string;
|
|
273
273
|
} | {
|
|
274
|
-
name:
|
|
274
|
+
name: 'WithdrawalDailyLimitExceededError';
|
|
275
275
|
message: string;
|
|
276
276
|
} | {
|
|
277
|
-
name:
|
|
277
|
+
name: 'ReCAPTCHAVerificationFailedError';
|
|
278
278
|
message: string;
|
|
279
279
|
} | {
|
|
280
|
-
name:
|
|
280
|
+
name: 'WalletDoesNotExistError';
|
|
281
281
|
message: string;
|
|
282
282
|
};
|
|
283
283
|
export interface CreateGCashWithdrawalMutation {
|
|
@@ -302,12 +302,12 @@ export interface CreateGCashStandardCashInWithdrawalMutationVariables {
|
|
|
302
302
|
recipientMobileNumber: string;
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
|
-
export type CreateGCashWithdrawalInput = Simplify<CreateGCashWithdrawalMutationVariables[
|
|
306
|
-
export type CreateGCashStandardCashInWithdrawalInput = Simplify<CreateGCashStandardCashInWithdrawalMutationVariables[
|
|
305
|
+
export type CreateGCashWithdrawalInput = Simplify<CreateGCashWithdrawalMutationVariables['input']>;
|
|
306
|
+
export type CreateGCashStandardCashInWithdrawalInput = Simplify<CreateGCashStandardCashInWithdrawalMutationVariables['input']>;
|
|
307
307
|
export declare const createGCashWithdrawal: (input: CreateGCashWithdrawalInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
308
308
|
export declare const createGCashStandardCashInWithdrawal: (input: CreateGCashStandardCashInWithdrawalInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
309
309
|
export interface CreatePisoPayWithdrawalMutation {
|
|
310
|
-
|
|
310
|
+
createPisoPayRemittanceWithdrawal?: null | CreateWithdrawalError;
|
|
311
311
|
}
|
|
312
312
|
export interface CreatePisoPayWithdrawalMutationVariables {
|
|
313
313
|
input: {
|
|
@@ -318,7 +318,7 @@ export interface CreatePisoPayWithdrawalMutationVariables {
|
|
|
318
318
|
};
|
|
319
319
|
transactionPassword: string;
|
|
320
320
|
}
|
|
321
|
-
export type CreatePisoPayWithdrawalInput = Simplify<CreatePisoPayWithdrawalMutationVariables[
|
|
321
|
+
export type CreatePisoPayWithdrawalInput = Simplify<CreatePisoPayWithdrawalMutationVariables['input'] & {
|
|
322
322
|
transactionPassword: string;
|
|
323
323
|
}>;
|
|
324
324
|
export declare const createPisoPayWithdrawal: (input: CreatePisoPayWithdrawalInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
@@ -333,7 +333,7 @@ export interface CreateMayaWithdrawalMutationVariables {
|
|
|
333
333
|
recipientMobileNumber: string;
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
|
-
export type CreateMayaWithdrawalInput = Simplify<CreateMayaWithdrawalMutationVariables[
|
|
336
|
+
export type CreateMayaWithdrawalInput = Simplify<CreateMayaWithdrawalMutationVariables['input']>;
|
|
337
337
|
export declare const createMayaWithdrawal: (input: CreateMayaWithdrawalInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
338
338
|
export interface CreateMayaAppWithdrawalMutation {
|
|
339
339
|
createMayaAppWithdrawal?: null | CreateWithdrawalError;
|
|
@@ -345,7 +345,7 @@ export interface CreateMayaAppWithdrawalMutationVariables {
|
|
|
345
345
|
transactionPassword: string;
|
|
346
346
|
};
|
|
347
347
|
}
|
|
348
|
-
export type CreateMayaAppWithdrawalInput = Simplify<CreateMayaAppWithdrawalMutationVariables[
|
|
348
|
+
export type CreateMayaAppWithdrawalInput = Simplify<CreateMayaAppWithdrawalMutationVariables['input']>;
|
|
349
349
|
export declare const createMayaAppWithdrawal: (input: CreateMayaAppWithdrawalInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
350
350
|
export interface CreateBankWithdrawalMutation {
|
|
351
351
|
createBankWithdrawal?: null | CreateWithdrawalError;
|
|
@@ -357,7 +357,7 @@ export interface CreateBankWithdrawalMutationVariables {
|
|
|
357
357
|
transactionPassword: string;
|
|
358
358
|
};
|
|
359
359
|
}
|
|
360
|
-
export type CreateBankWithdrawalInput = Simplify<CreateBankWithdrawalMutationVariables[
|
|
360
|
+
export type CreateBankWithdrawalInput = Simplify<CreateBankWithdrawalMutationVariables['input']>;
|
|
361
361
|
export declare const createBankWithdrawal: (input: CreateBankWithdrawalInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
362
362
|
export interface CreateAIOInstapayWithdrawalMutationVariables {
|
|
363
363
|
input: {
|
|
@@ -385,8 +385,8 @@ export interface CreateAIOInstapayWithdrawalMutation {
|
|
|
385
385
|
export interface CreateAIOInstapayWithdrawalNextMutation {
|
|
386
386
|
createAIOInstapayWithdrawal_next?: null | CreateWithdrawalError;
|
|
387
387
|
}
|
|
388
|
-
export type CreateAIOInstapayWithdrawalInput = Simplify<CreateAIOInstapayWithdrawalMutationVariables[
|
|
389
|
-
export type CreateAIOInstapayWithdrawalNextInput = Simplify<CreateAIOInstapayWithdrawalNextMutationVariables[
|
|
388
|
+
export type CreateAIOInstapayWithdrawalInput = Simplify<CreateAIOInstapayWithdrawalMutationVariables['input']>;
|
|
389
|
+
export type CreateAIOInstapayWithdrawalNextInput = Simplify<CreateAIOInstapayWithdrawalNextMutationVariables['input']>;
|
|
390
390
|
export declare const createAIOInstapayWithdrawal: (input: CreateAIOInstapayWithdrawalInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
391
391
|
export declare const createAIOInstapayWithdrawalNext: (input: CreateAIOInstapayWithdrawalNextInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
392
392
|
export interface CreateVentajaDisbursementWithdrawalVariables {
|
|
@@ -401,8 +401,8 @@ export interface CreateVentajaDisbursementWithdrawalVariables {
|
|
|
401
401
|
export interface CreateVentajaDisbursementWithdrawalMutation {
|
|
402
402
|
createVentajaDisbursementWithdrawal?: null | CreateWithdrawalError;
|
|
403
403
|
}
|
|
404
|
-
export type CreateVentajaDisbursementWithdrawalInput = Simplify<CreateVentajaDisbursementWithdrawalVariables[
|
|
405
|
-
export type CreateVentajaDisbursmentTransactionPasswordInput = Simplify<CreateVentajaDisbursementWithdrawalVariables[
|
|
404
|
+
export type CreateVentajaDisbursementWithdrawalInput = Simplify<CreateVentajaDisbursementWithdrawalVariables['input']>;
|
|
405
|
+
export type CreateVentajaDisbursmentTransactionPasswordInput = Simplify<CreateVentajaDisbursementWithdrawalVariables['transactionPassword']>;
|
|
406
406
|
export declare const createVentajaDisbursementWithdrawal: (input: CreateVentajaDisbursementWithdrawalInput, transactionPassword: CreateVentajaDisbursmentTransactionPasswordInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
407
407
|
export interface CreateManualUpiWithdrawalMutation {
|
|
408
408
|
createManualUpiWithdrawal?: null | CreateWithdrawalError;
|
|
@@ -414,7 +414,7 @@ export interface CreateManualUpiWithdrawalMutationVariables {
|
|
|
414
414
|
upiId: string;
|
|
415
415
|
};
|
|
416
416
|
}
|
|
417
|
-
export type CreateManualUpiWithdrawalInput = Simplify<CreateManualUpiWithdrawalMutationVariables[
|
|
417
|
+
export type CreateManualUpiWithdrawalInput = Simplify<CreateManualUpiWithdrawalMutationVariables['input']>;
|
|
418
418
|
export declare const createManualUpiWithdrawal: (input: CreateManualUpiWithdrawalInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
419
419
|
export interface CreateManualBankWithdrawalMutation {
|
|
420
420
|
createManualBankWithdrawal?: null | CreateWithdrawalError;
|
|
@@ -429,7 +429,7 @@ export interface CreateManualBankWithdrawalMutationVariables {
|
|
|
429
429
|
promo?: string;
|
|
430
430
|
};
|
|
431
431
|
}
|
|
432
|
-
export type CreateManualBankWithdrawalInput = Simplify<CreateManualBankWithdrawalMutationVariables[
|
|
432
|
+
export type CreateManualBankWithdrawalInput = Simplify<CreateManualBankWithdrawalMutationVariables['input']>;
|
|
433
433
|
export declare const createManualBankWithdrawal: (input: CreateManualBankWithdrawalInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
434
434
|
export interface InstapayBankListQuery {
|
|
435
435
|
instapayBankList: InstapayBank[];
|
|
@@ -449,10 +449,10 @@ export interface RedeemPointsToCashMutationVariables {
|
|
|
449
449
|
};
|
|
450
450
|
}
|
|
451
451
|
export type RedeemPointsToCashError = {
|
|
452
|
-
name:
|
|
452
|
+
name: 'InsufficientPointsError';
|
|
453
453
|
message: string;
|
|
454
454
|
} | {
|
|
455
|
-
name:
|
|
455
|
+
name: 'PointsNotDivisibleBy100Error';
|
|
456
456
|
message: string;
|
|
457
457
|
};
|
|
458
458
|
export interface RedeemPointsToCashMutation {
|
|
@@ -474,7 +474,7 @@ export interface GameSessionQueryVariables {
|
|
|
474
474
|
}
|
|
475
475
|
export declare const getGameSession: (id: string, options?: GraphQLRequestOptions) => Promise<GameSession | null>;
|
|
476
476
|
export type CreateGameSessionError = {
|
|
477
|
-
name:
|
|
477
|
+
name: 'GameDoesNotExistError';
|
|
478
478
|
message: string;
|
|
479
479
|
};
|
|
480
480
|
export interface CreateGameSessionMutation {
|
|
@@ -486,7 +486,7 @@ export interface CreateGameSessionMutationVariables {
|
|
|
486
486
|
game: string;
|
|
487
487
|
};
|
|
488
488
|
}
|
|
489
|
-
export type CreateGameSessionInput = Simplify<CreateGameSessionMutationVariables[
|
|
489
|
+
export type CreateGameSessionInput = Simplify<CreateGameSessionMutationVariables['input']>;
|
|
490
490
|
export declare const createGameSession: (input: CreateGameSessionInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
491
491
|
export interface EndGameSessionMutation {
|
|
492
492
|
endGameSession: boolean;
|
|
@@ -520,13 +520,13 @@ export interface BonusIdsQuery {
|
|
|
520
520
|
}
|
|
521
521
|
export declare const getBonusesCount: (options?: GraphQLRequestOptions) => Promise<number>;
|
|
522
522
|
export type ClaimSpotBonusError = {
|
|
523
|
-
name:
|
|
523
|
+
name: 'InvalidPromoCodeError';
|
|
524
524
|
message: string;
|
|
525
525
|
} | {
|
|
526
|
-
name:
|
|
526
|
+
name: 'MaximumBonusesCountLimitExceededError';
|
|
527
527
|
message: string;
|
|
528
528
|
} | {
|
|
529
|
-
name:
|
|
529
|
+
name: 'SpotBonusAlreadyClaimedError';
|
|
530
530
|
message: string;
|
|
531
531
|
};
|
|
532
532
|
export interface ClaimSpotBonusMutationVariables {
|
package/dist/services/wallet.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { cache } from
|
|
2
|
-
import { WALLET_GRAPHQL_ENDPOINT } from
|
|
3
|
-
import { parseDecimal } from
|
|
4
|
-
import { graphqlRequest } from
|
|
5
|
-
import { AVAILABLE_PROMOS, BONUS, BONUS_BALANCES, BONUS_IDS, BONUSES, CASHBACK, CASHBACK_BONUS, CASHBACK_BONUS_IDS, CASHBACK_BONUSES, CASHBACKS, CLAIM_CASHBACK_BONUS, CLAIM_SPOT_BONUS, CREATE_AIO_INSTAPAY_WITHDRAWAL, CREATE_AIO_INSTAPAY_WITHDRAWAL_NEXT, CREATE_AIO_ONLINE_BANK_DEPOSIT, CREATE_AIO_QRPH_DEPOSIT, CREATE_BANK_WITHDRAWAL, CREATE_GAME_SESSION, CREATE_GCASH_DEPOSIT, CREATE_GCASH_DIRECT_WEBPAY_DEPOSIT,
|
|
6
|
-
import { sha256 } from
|
|
1
|
+
import { cache } from 'react';
|
|
2
|
+
import { WALLET_GRAPHQL_ENDPOINT } from '../constants/index.js';
|
|
3
|
+
import { parseDecimal } from '../utils/parseDecimal.js';
|
|
4
|
+
import { graphqlRequest } from './graphqlRequest.js';
|
|
5
|
+
import { AVAILABLE_PROMOS, BONUS, BONUS_BALANCES, BONUS_IDS, BONUSES, CASHBACK, CASHBACK_BONUS, CASHBACK_BONUS_IDS, CASHBACK_BONUSES, CASHBACKS, CLAIM_CASHBACK_BONUS, CLAIM_SPOT_BONUS, CREATE_AIO_INSTAPAY_WITHDRAWAL, CREATE_AIO_INSTAPAY_WITHDRAWAL_NEXT, CREATE_AIO_ONLINE_BANK_DEPOSIT, CREATE_AIO_QRPH_DEPOSIT, CREATE_BANK_WITHDRAWAL, CREATE_GAME_SESSION, CREATE_GCASH_DEPOSIT, CREATE_GCASH_DIRECT_WEBPAY_DEPOSIT, CREATE_GCASH_STANDARD_CASH_IN_WITHDRAWAL, CREATE_GCASH_WITHDRAWAL, CREATE_LIBANGAN_DEPOSIT, CREATE_MANUAL_BANK_DEPOSIT, CREATE_MANUAL_BANK_WITHDRAWAL, CREATE_MANUAL_UPI_DEPOSIT, CREATE_MANUAL_UPI_WITHDRAWAL, CREATE_MAYA_APP_DEPOSIT, CREATE_MAYA_APP_WITHDRAWAL, CREATE_MAYA_DEPOSIT, CREATE_MAYA_WITHDRAWAL, CREATE_PISO_PAY_DEPOSIT, CREATE_PISO_PAY_WITHDRAWAL, CREATE_VENTAJA_WITHDRAWAL, DEPOSIT, END_GAME_SESSION, FAVORITE_GAMES, GAME_SESSION, INSTAPAY_BANK_LIST, MARK_GAME_AS_FAVORITE, MAYA_SESSION, POINTS_WALLET, PROMO, PROMOS, REDEEM_POINTS_TO_CASH, REMAINING_DAILY_WITHDRAWALS_COUNT, TOUCH_GCASH_DEPOSIT, TOUCH_QRPH_DEPOSIT, UNMARK_GAME_AS_FAVORITE, VALIDATE_MAYA_SESSION, WALLET } from './queries.js';
|
|
6
|
+
import { sha256 } from './sha256.js';
|
|
7
7
|
export const getPromos = cache(async (options) => {
|
|
8
8
|
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, PROMOS, undefined, {
|
|
9
|
-
cache:
|
|
9
|
+
cache: 'force-cache',
|
|
10
10
|
...options,
|
|
11
11
|
next: {
|
|
12
|
-
tags: [
|
|
12
|
+
tags: ['promos'],
|
|
13
13
|
revalidate: 60,
|
|
14
14
|
...options?.next,
|
|
15
15
|
},
|
|
@@ -18,10 +18,10 @@ export const getPromos = cache(async (options) => {
|
|
|
18
18
|
});
|
|
19
19
|
export const getCashbacks = cache(async (options) => {
|
|
20
20
|
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, CASHBACKS, undefined, {
|
|
21
|
-
cache:
|
|
21
|
+
cache: 'force-cache',
|
|
22
22
|
...options,
|
|
23
23
|
next: {
|
|
24
|
-
tags: [
|
|
24
|
+
tags: ['cashbacks'],
|
|
25
25
|
revalidate: 60,
|
|
26
26
|
...options?.next,
|
|
27
27
|
},
|
|
@@ -30,10 +30,10 @@ export const getCashbacks = cache(async (options) => {
|
|
|
30
30
|
});
|
|
31
31
|
export const getPromo = cache(async (id, options) => {
|
|
32
32
|
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, PROMO, { id }, {
|
|
33
|
-
cache:
|
|
33
|
+
cache: 'force-cache',
|
|
34
34
|
...options,
|
|
35
35
|
next: {
|
|
36
|
-
tags: [
|
|
36
|
+
tags: ['promo', id],
|
|
37
37
|
revalidate: 60,
|
|
38
38
|
...options?.next,
|
|
39
39
|
},
|
|
@@ -42,10 +42,10 @@ export const getPromo = cache(async (id, options) => {
|
|
|
42
42
|
});
|
|
43
43
|
export const getCashback = cache(async (id, options) => {
|
|
44
44
|
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, CASHBACK, { id }, {
|
|
45
|
-
cache:
|
|
45
|
+
cache: 'force-cache',
|
|
46
46
|
...options,
|
|
47
47
|
next: {
|
|
48
|
-
tags: [
|
|
48
|
+
tags: ['cashback', id],
|
|
49
49
|
revalidate: 60,
|
|
50
50
|
...options?.next,
|
|
51
51
|
},
|
|
@@ -88,12 +88,12 @@ export const getWallet = cache(async (options) => {
|
|
|
88
88
|
graphqlRequest(WALLET_GRAPHQL_ENDPOINT, BONUS_BALANCES, undefined, options),
|
|
89
89
|
]);
|
|
90
90
|
return {
|
|
91
|
-
balance: res0.status ===
|
|
92
|
-
bonus: res1.status ===
|
|
93
|
-
? res1.value.bonuses
|
|
91
|
+
balance: res0.status === 'fulfilled' ? (res0.value.wallet?.balance ?? '0') : '0',
|
|
92
|
+
bonus: res1.status === 'fulfilled'
|
|
93
|
+
? (res1.value.bonuses
|
|
94
94
|
?.reduce((total, n) => total + parseDecimal(n.balance, 0), 0)
|
|
95
|
-
.toString() ??
|
|
96
|
-
:
|
|
95
|
+
.toString() ?? '0')
|
|
96
|
+
: '0',
|
|
97
97
|
};
|
|
98
98
|
});
|
|
99
99
|
export const getDeposit = cache(async (id, options) => {
|
|
@@ -240,10 +240,10 @@ export const createPisoPayWithdrawal = async (input, options) => {
|
|
|
240
240
|
input: others,
|
|
241
241
|
transactionPassword: await sha256(transactionPassword),
|
|
242
242
|
}, options);
|
|
243
|
-
if (res.
|
|
243
|
+
if (res.createPisoPayRemittanceWithdrawal) {
|
|
244
244
|
const error = new Error();
|
|
245
|
-
error.name = res.
|
|
246
|
-
error.message = ERROR_CODES_MESSAGE_MAP[res.
|
|
245
|
+
error.name = res.createPisoPayRemittanceWithdrawal.name;
|
|
246
|
+
error.message = ERROR_CODES_MESSAGE_MAP[res.createPisoPayRemittanceWithdrawal.name];
|
|
247
247
|
Error.captureStackTrace?.(error, createGCashWithdrawal);
|
|
248
248
|
throw error;
|
|
249
249
|
}
|
|
@@ -359,11 +359,11 @@ export const createManualBankWithdrawal = async (input, options) => {
|
|
|
359
359
|
};
|
|
360
360
|
export const getInstapayBankList = cache(async (options) => {
|
|
361
361
|
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, INSTAPAY_BANK_LIST, undefined, {
|
|
362
|
-
cache:
|
|
362
|
+
cache: 'force-cache',
|
|
363
363
|
...options,
|
|
364
364
|
next: {
|
|
365
365
|
revalidate: 60 * 60 * 4,
|
|
366
|
-
tags: [
|
|
366
|
+
tags: ['instapayBankList'],
|
|
367
367
|
},
|
|
368
368
|
});
|
|
369
369
|
return res.instapayBankList;
|
|
@@ -408,8 +408,8 @@ export const endGameSession = async (id, options) => {
|
|
|
408
408
|
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, END_GAME_SESSION, { input: { id } }, options);
|
|
409
409
|
if (!res.endGameSession) {
|
|
410
410
|
const error = new Error();
|
|
411
|
-
error.name =
|
|
412
|
-
error.message =
|
|
411
|
+
error.name = 'UnknownError';
|
|
412
|
+
error.message = 'Something went wrong';
|
|
413
413
|
Error.captureStackTrace?.(error, endGameSession);
|
|
414
414
|
throw error;
|
|
415
415
|
}
|
|
@@ -418,8 +418,8 @@ export const validateMayaSession = async (options) => {
|
|
|
418
418
|
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, VALIDATE_MAYA_SESSION, undefined, options);
|
|
419
419
|
if (!res.validateMayaSession) {
|
|
420
420
|
const error = new Error();
|
|
421
|
-
error.name =
|
|
422
|
-
error.message =
|
|
421
|
+
error.name = 'UnknownError';
|
|
422
|
+
error.message = 'Something went wrong';
|
|
423
423
|
Error.captureStackTrace?.(error, validateMayaSession);
|
|
424
424
|
throw error;
|
|
425
425
|
}
|
|
@@ -446,8 +446,8 @@ export const touchGCashDeposit = async (id, options) => {
|
|
|
446
446
|
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, TOUCH_GCASH_DEPOSIT, { input: { id } }, options);
|
|
447
447
|
if (!res.touchGCashDeposit) {
|
|
448
448
|
const error = new Error();
|
|
449
|
-
error.name =
|
|
450
|
-
error.message =
|
|
449
|
+
error.name = 'UnknownError';
|
|
450
|
+
error.message = 'Something went wrong';
|
|
451
451
|
Error.captureStackTrace?.(error, touchGCashDeposit);
|
|
452
452
|
throw error;
|
|
453
453
|
}
|
|
@@ -456,8 +456,8 @@ export const touchQRPHDeposit = async (id, options) => {
|
|
|
456
456
|
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, TOUCH_QRPH_DEPOSIT, { input: { id } }, options);
|
|
457
457
|
if (!res.touchQRPHDeposit) {
|
|
458
458
|
const error = new Error();
|
|
459
|
-
error.name =
|
|
460
|
-
error.message =
|
|
459
|
+
error.name = 'UnknownError';
|
|
460
|
+
error.message = 'Something went wrong';
|
|
461
461
|
Error.captureStackTrace?.(error, touchQRPHDeposit);
|
|
462
462
|
throw error;
|
|
463
463
|
}
|
|
@@ -466,8 +466,8 @@ export const markGameAsFavorite = async (id, options) => {
|
|
|
466
466
|
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, MARK_GAME_AS_FAVORITE, { input: { id } }, options);
|
|
467
467
|
if (!res.markGameAsFavorite) {
|
|
468
468
|
const error = new Error();
|
|
469
|
-
error.name =
|
|
470
|
-
error.message =
|
|
469
|
+
error.name = 'UnknownError';
|
|
470
|
+
error.message = 'Something went wrong';
|
|
471
471
|
Error.captureStackTrace?.(error, markGameAsFavorite);
|
|
472
472
|
throw error;
|
|
473
473
|
}
|
|
@@ -476,8 +476,8 @@ export const unmarkGameAsFavorite = async (id, options) => {
|
|
|
476
476
|
const res = await graphqlRequest(WALLET_GRAPHQL_ENDPOINT, UNMARK_GAME_AS_FAVORITE, { input: { id } }, options);
|
|
477
477
|
if (!res.unmarkGameAsFavorite) {
|
|
478
478
|
const error = new Error();
|
|
479
|
-
error.name =
|
|
480
|
-
error.message =
|
|
479
|
+
error.name = 'UnknownError';
|
|
480
|
+
error.message = 'Something went wrong';
|
|
481
481
|
Error.captureStackTrace?.(error, unmarkGameAsFavorite);
|
|
482
482
|
throw error;
|
|
483
483
|
}
|
|
@@ -487,27 +487,27 @@ export const getFavoriteGames = cache(async (options) => {
|
|
|
487
487
|
return res.favoriteGames;
|
|
488
488
|
});
|
|
489
489
|
const ERROR_CODES_MESSAGE_MAP = {
|
|
490
|
-
PointsNotDivisibleBy100Error:
|
|
491
|
-
MaximumBonusesCountLimitExceededError:
|
|
492
|
-
InvalidPromoCodeError:
|
|
493
|
-
SpotBonusAlreadyClaimedError:
|
|
494
|
-
AccountNotVerifiedError:
|
|
495
|
-
CashbackBonusDoesNotExistError:
|
|
496
|
-
DepositPromoMaximumAmountExceededError:
|
|
497
|
-
DepositPromoMinimumAmountNotMetError:
|
|
498
|
-
GameDoesNotExistError:
|
|
499
|
-
InsufficientPointsError:
|
|
500
|
-
InvalidTransactionPasswordError:
|
|
501
|
-
InvalidWithdrawalAmountError:
|
|
502
|
-
MaximumDepositAmountExceededError:
|
|
503
|
-
MinimumDepositAmountNotMetError:
|
|
504
|
-
MinimumFirstDepositAmountNotMetError:
|
|
505
|
-
MobileNumberNotVerifiedError:
|
|
506
|
-
NotEnoughBalanceError:
|
|
507
|
-
PromoNotEnabledError:
|
|
508
|
-
WalletDoesNotExistError:
|
|
509
|
-
WithdrawalDailyLimitExceededError:
|
|
510
|
-
ReCAPTCHAVerificationFailedError:
|
|
511
|
-
UPIReferenceNotAvailableError:
|
|
512
|
-
GCashDirectApiRequestError:
|
|
490
|
+
PointsNotDivisibleBy100Error: 'Please input points that are multiples of 100.',
|
|
491
|
+
MaximumBonusesCountLimitExceededError: 'Maximum bonuses reached',
|
|
492
|
+
InvalidPromoCodeError: 'Invalid Promo Code',
|
|
493
|
+
SpotBonusAlreadyClaimedError: 'This promo code has already been redeemed and cannot be used again',
|
|
494
|
+
AccountNotVerifiedError: 'Account is not verified',
|
|
495
|
+
CashbackBonusDoesNotExistError: 'Cashback bonus does not exists',
|
|
496
|
+
DepositPromoMaximumAmountExceededError: 'Deposit amount exceeds maximum amount for selected promo',
|
|
497
|
+
DepositPromoMinimumAmountNotMetError: 'Deposit amount does not meet minimum amount for selected promo',
|
|
498
|
+
GameDoesNotExistError: 'Game does not exist',
|
|
499
|
+
InsufficientPointsError: 'Insufficient points',
|
|
500
|
+
InvalidTransactionPasswordError: 'Invalid transaction password',
|
|
501
|
+
InvalidWithdrawalAmountError: 'Invalid withdrawal amount',
|
|
502
|
+
MaximumDepositAmountExceededError: 'Maximum deposit amount exceeded',
|
|
503
|
+
MinimumDepositAmountNotMetError: 'Minimum deposit amount not met',
|
|
504
|
+
MinimumFirstDepositAmountNotMetError: 'Minimum first deposit amount not met',
|
|
505
|
+
MobileNumberNotVerifiedError: 'Mobile number is not verified',
|
|
506
|
+
NotEnoughBalanceError: 'Insufficient balance',
|
|
507
|
+
PromoNotEnabledError: 'Promo is not enabled',
|
|
508
|
+
WalletDoesNotExistError: 'Wallet does not exist',
|
|
509
|
+
WithdrawalDailyLimitExceededError: 'Daily withdrawal limit exceeded',
|
|
510
|
+
ReCAPTCHAVerificationFailedError: 'Invalid reCAPTCHA',
|
|
511
|
+
UPIReferenceNotAvailableError: 'UPI reference is no longer available',
|
|
512
|
+
GCashDirectApiRequestError: 'GCash direct API request error',
|
|
513
513
|
};
|