@opexa/portal-sdk 0.59.48 → 0.59.49

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.
@@ -1,59 +1,4 @@
1
- type GenericObject = Record<string, any>;
2
- type Assign<Target, Source> = Omit<Target, keyof Source> & Source;
3
- type Alias<T> = T & {
4
- _?: never;
5
- };
6
- type HttpError = /* 400 */ 'HttpBadRequest' | /* 401 */ 'HttpUnauthorized' | /* 403 */ 'HttpForbidden' | /* 404 */ 'HttpNotFound' | /* 408 */ 'HttpRequestTimeout' | /* 429 */ 'HttpTooManyRequests' | /* 500 */ 'HttpInternalServerError';
7
- type OperationError<T extends string = string> = {
8
- name: T;
9
- message: string;
10
- };
11
- type OperationResult<Error extends string = never, Data = never> = [
12
- Data
13
- ] extends [never] ? {
14
- ok: false;
15
- data?: never;
16
- error: [Error] extends [never] ? OperationError<HttpError | 'UnknownError'> : OperationError<Error> | OperationError<HttpError | 'UnknownError'>;
17
- } | {
18
- ok: true;
19
- data?: never;
20
- error?: never;
21
- } : {
22
- ok: false;
23
- data?: never;
24
- error: [Error] extends [never] ? OperationError<HttpError | 'UnknownError'> : OperationError<Error> | OperationError<HttpError | 'UnknownError'>;
25
- } | {
26
- ok: true;
27
- data: Data;
28
- error?: never;
29
- };
30
-
31
- type ModifiableKey = 'mode' | 'cache' | 'signal' | 'headers' | 'integrity' | 'keepalive' | 'credentials';
32
- type Modifiable = {
33
- [K in ModifiableKey]: Request[K];
34
- };
35
- interface ModifiedRequest extends Readonly<Omit<Request, ModifiableKey>>, Modifiable {
36
- }
37
- type GraphQLClientMiddleware = (request: ModifiedRequest) => ModifiedRequest | Promise<ModifiedRequest>;
38
- interface GraphQLClientFetchOptions extends Omit<RequestInit, 'body' | 'method'> {
39
- }
40
- interface GraphQLClientConfig {
41
- fetch?: typeof globalThis.fetch | null;
42
- fetchOptions?: GraphQLClientFetchOptions;
43
- middlewares?: GraphQLClientMiddleware[];
44
- }
45
- type Getter<T> = () => T;
46
- declare class GraphQLClient {
47
- private url;
48
- private config;
49
- constructor(url: string, config?: Getter<GraphQLClientConfig> | GraphQLClientConfig);
50
- request<Data, Variables extends GenericObject = GenericObject>(query: string, variables?: Variables, userOptions?: GraphQLClientFetchOptions): Promise<OperationResult<never, Data>>;
51
- /** Single file upload */
52
- upload<Data, Variables extends GenericObject = GenericObject>(query: string, variables: Variables, options?: GraphQLClientFetchOptions): Promise<OperationResult<never, Data>>;
53
- private exec;
54
- private runMiddlewares;
55
- private createUploadBody;
56
- }
1
+ import { c as Alias, a as OperationResult } from './graphql-client-Czq2Pigo.js';
57
2
 
58
3
  type ID = Alias<string>;
59
4
  type Decimal = Alias<string>;
@@ -198,6 +143,18 @@ interface WalletGame$1 {
198
143
  provider: GameProvider$1;
199
144
  favorite: boolean;
200
145
  }
146
+ interface PlatformGame$1 {
147
+ id: string;
148
+ reference?: string | null;
149
+ name?: string | null;
150
+ displayName?: string | null;
151
+ type?: GameType$1 | null;
152
+ provider?: GameProvider$1 | null;
153
+ status: GameStatus;
154
+ hidden: boolean;
155
+ hasFreeBet: boolean;
156
+ hasJackpot: boolean;
157
+ }
201
158
  interface GameQueryVariables {
202
159
  id: string;
203
160
  }
@@ -226,6 +183,20 @@ interface WalletGamesQueryVariables {
226
183
  id?: ObjectIdFilterField;
227
184
  };
228
185
  }
186
+ interface PlatformGamesQueryVariables {
187
+ after?: string;
188
+ first?: number;
189
+ filter?: {
190
+ id?: ObjectIdFilterField;
191
+ reference?: StringFilterField;
192
+ name?: StringFilterField;
193
+ displayName?: StringFilterField;
194
+ type?: EnumFilterField<GameType$1>;
195
+ provider?: EnumFilterField<GameProvider$1>;
196
+ hasFreeBet?: BooleanFilterField;
197
+ hasJackpot?: BooleanFilterField;
198
+ };
199
+ }
229
200
  interface GamesQueryVariables__Next {
230
201
  after?: string;
231
202
  first?: number;
@@ -248,6 +219,8 @@ interface GamesQuery {
248
219
  }
249
220
  interface WalletGamesQuery extends PaginatedQuery<'games', WalletGame$1> {
250
221
  }
222
+ interface PlatformGamesQuery extends PaginatedQuery<'_games', PlatformGame$1> {
223
+ }
251
224
  interface RecommendedGame {
252
225
  id: string;
253
226
  }
@@ -3361,14 +3334,19 @@ interface WalletGame {
3361
3334
  provider: GameProvider;
3362
3335
  favorite: boolean;
3363
3336
  }
3337
+ interface PlatformGame extends PlatformGame$1 {
3338
+ }
3364
3339
  interface GamesInput extends GamesQueryVariables {
3365
3340
  }
3366
3341
  interface WalletGameInput extends WalletGamesQueryVariables {
3367
3342
  }
3343
+ interface PlatformGamesInput extends PlatformGamesQueryVariables {
3344
+ }
3368
3345
  interface GamesInput__Next extends GamesQueryVariables__Next {
3369
3346
  }
3370
3347
  type GamesReturn = OperationResult<never, PaginatedQueryResult<'games', Game>>;
3371
3348
  type WalletGamesReturn = OperationResult<never, PaginatedQueryResult<'games', WalletGame>>;
3349
+ type PlatformGamesReturn = OperationResult<never, PaginatedQueryResult<'platformGames', PlatformGame>>;
3372
3350
  type GameReturn = OperationResult<never, Game | null>;
3373
3351
  interface RecommendedGamesInput {
3374
3352
  first?: number;
@@ -4533,4 +4511,4 @@ interface SubmitMemberVerificationRequestPersonalDetailsInput {
4533
4511
  type SubmitMemberVerificationRequestPersonalDetailsReturn = OperationResult<never, boolean>;
4534
4512
  type MemberVerificationRequestAutomaticApprovalEnabledReturn = OperationResult<never, boolean>;
4535
4513
 
4536
- export { type SubmitMemberVerificationReturn as $, type AuthenticateInput as A, type RegisterAgentAccountReturn as B, type CabinetSignInInput as C, type UpdateAccountReturn as D, type Environment as E, type DeleteAccountReturn as F, type GraphQLClientMiddleware as G, type UpdateDailyBetLimitInput as H, type UpdateAccountLimitReturn as I, type UpdateMonthlyBetLimitInput as J, type UpdateDailyDepositLimitInput as K, type UpdateMonthlyDepositLimitInput as L, type MobileNumberSignInInput as M, type NameAndPasswordSignInInput as N, type VerificationDetailsReturn as O, type PlatformReturn as P, type SubmitVerificationDetailsInput as Q, type RegisterMayaAccountInput as R, type SocialsSignInInput as S, type TokenSignInInput as T, type UpdateAccountInput as U, type ValidateMayaSessionReturn as V, type WatchSessionInput as W, type SubmitVerificationDetailsReturn as X, type SubmitVerificationDetailsInputNext as Y, type UpdateVerificationDetailsInput as Z, type UpdateVerificationDetailsReturn as _, type NameAndPasswordSignInReturn as a, type MarkGameAsFavoriteInput as a$, type ResetPasswordInput as a0, type ResetPasswordReturn as a1, type VerifyMobileNumberReturn as a2, type ProfileCompletionReturn as a3, type SendVerificationCodeReturn as a4, type SendVerificationCodeInput__Next as a5, type SendVerificationCodeReturn__Next as a6, type WalletReturn as a7, type MemberWalletAccountReturn as a8, type AnnouncementsInput as a9, type TransactionRecordsInput as aA, type TransactionRecordsReturn as aB, type PromosReturn as aC, type PromoFilterInput as aD, type AvailablePromosReturn as aE, type CashbacksReturn as aF, type PromosAndCashbacksReturn as aG, type BonusReturn as aH, type BonusesReturn as aI, type CashbackBonusReturn as aJ, type ClaimCashbackBonusReturn as aK, type ClaimRebateReturn as aL, type ClaimSpotBonusReturn as aM, type PromoByCodeReturn as aN, type GameReturn as aO, type GamesInput as aP, type GamesReturn as aQ, type WalletGameInput as aR, type WalletGamesReturn as aS, type GamesInput__Next as aT, type RecommendedGamesInput as aU, type RecommendedGamesReturn as aV, type GameProvider as aW, type GameSessionReturn as aX, type CreateGameSessionInput as aY, type CreateGameSessionReturn as aZ, type EndGameSessionReturn as a_, type AnnouncementsReturn as aa, type CreateWithdrawalInput as ab, type CreateWithdrawalReturn as ac, type WithdrawalRecordsInput as ad, type WithdrawalRecordsReturn as ae, type RemainingDailyWithdrawalsCountReturn as af, type InstapayBankListReturn as ag, type CreateDepositInput as ah, type CreateDepositReturn as ai, type DepositReturn as aj, type DepositRecordsInput as ak, type DepositRecordsReturn as al, type DepositsCountReturn as am, type TouchDepositInput as an, type TouchDepositReturn as ao, type RedeemVoucherInput as ap, type RedeemVoucherReturn as aq, type BetRecordsInput as ar, type BetRecordsReturn as as, type LatestBetRecordsReturn as at, type FreeBetDropsInput as au, type FreeBetDropsReturn as av, type MemberFreeBetDropsInput as aw, type MemberFreeBetDropsReturn as ax, type CancelFreeBetDropInput as ay, type CancelFreeBetDropReturn as az, type MobileNumberSignInReturn as b, type LinkFirebaseCloudMessagingDeviceReturn as b$, type MarkGameAsFavoriteReturn as b0, type UnmarkGameAsFavoriteInput as b1, type UnmarkGameAsFavoriteReturn as b2, type FavoriteGamesReturn as b3, type FileReturn as b4, type UploadImageFileInput as b5, type UploadImageFileReturn as b6, type PointsWalletReturn as b7, type RedeemPointsInput as b8, type RedeemPointsReturn as b9, type MarkMessageAsReadReturn as bA, type MarkAllMessagesAsReadReturn as bB, type ClaimRewardReturn as bC, type OnboardingStatusReturn as bD, type CompleteOnboardingInput as bE, type CompleteOnboardingReturn as bF, type SkipOnboardingReturn as bG, type AvailableQuestsReturn as bH, type CheckInDailyQuestReturn as bI, type TopWinsReturn as bJ, type JackpotsInput as bK, type JackpotsReturn as bL, type JackpotsIdsInput as bM, type JackpotsIdsReturn as bN, type _JackpotsInput as bO, type _JackpotsReturn as bP, type JackpotPayoutsInput as bQ, type JackpotPayoutsReturn as bR, type TournamentsInput as bS, type TournamentsReturn as bT, type TournamentsIdsInput as bU, type TournamentsIdsReturn as bV, type RegisterFCMDeviceInput as bW, type RegisterFCMDeviceReturn as bX, type UnregisterFCMDeviceInput as bY, type UnregisterFCMDeviceReturn as bZ, type LinkFirebaseCloudMessagingDeviceInput as b_, type PointsWalletTransactionsInput as ba, type PointsWalletTransactionsReturn as bb, type AchievementPointsHistoryRecordInput as bc, type AchievementPointsHistoryRecordReturn as bd, type MemberAchievementReturn as be, type MemberRebatesInput as bf, type MemberRebatesReturn as bg, type MemberRebateContributionInput as bh, type MemberRebateContributionReturn as bi, type ActivityRecordsInput as bj, type ActivityRecordsReturn as bk, type ReferralCodeReturn as bl, type UpdateReferralCodeInput as bm, type UpdateReferralCodeReturn as bn, type ReferralsInput as bo, type ReferralsReturn as bp, type ReferralCommissionReturn as bq, type UplinesByNameInput as br, type UplinesByNameReturn as bs, type DownlinesByNameInput as bt, type DownlinesByNameReturn as bu, type PointsClubSettingsReturn as bv, type MessagesInput as bw, type MessagesReturn as bx, type UnreadMessagesCountInput as by, type UnreadMessagesCountReturn as bz, type MayaSignInInput as c, type Rebate as c$, type UnlinkFirebaseCloudMessagingDeviceInput as c0, type UnlinkFirebaseCloudMessagingDeviceReturn as c1, type GoogleClientIdReturn as c2, type RequireFirstDepositReturn as c3, type MemberVerificationRequestReturn as c4, type SubmitMemberVerificationRequestBasicDetailsInput as c5, type SubmitMemberVerificationRequestBasicDetailsReturn as c6, type SubmitMemberVerificationRequestImageDetailsInput as c7, type SubmitMemberVerificationRequestImageDetailsReturn as c8, type SubmitMemberVerificationRequestPersonalDetailsInput as c9, type BetRecord$1 as cA, type Game$1 as cB, type BetRecord as cC, type LatestBetRecord$1 as cD, type LatestBetRecord as cE, type TransactionRecord$1 as cF, type TransactionRecord as cG, type Game as cH, type GameSession$1 as cI, type GameSession as cJ, type Promo$1 as cK, type Promo as cL, type Cashback$1 as cM, type Cashback as cN, type Bonus$1 as cO, type Bonus as cP, type CashbackBonus$1 as cQ, type CashbackBonus as cR, type CabinetSiteMachine$1 as cS, type CabinetSiteMachine as cT, type File$1 as cU, type File as cV, type PointsWallet$1 as cW, type PointsWallet as cX, type PointsWalletTransaction$1 as cY, type PointsWalletTransaction as cZ, type Rebate$1 as c_, type SubmitMemberVerificationRequestPersonalDetailsReturn as ca, type MemberVerificationRequestAutomaticApprovalEnabledReturn as cb, type Site$1 as cc, type Site as cd, type Platform$1 as ce, type Platform as cf, type MemberAccount as cg, type Member as ch, type Account as ci, type Wallet$1 as cj, type Wallet as ck, type MemberVerification as cl, type VerificationDetails as cm, type ProfileCompletion$1 as cn, type ProfileCompletion as co, type Announcement$1 as cp, type Announcement as cq, type WithdrawalRecord$1 as cr, type WithdrawalRecord as cs, type Deposit$1 as ct, type Deposit as cu, type CabinetWithdrawal as cv, type CabinetWithdrawalRecord as cw, type DepositRecord$1 as cx, type DepositRecord as cy, type Assign as cz, type MayaSignInReturn as d, type CreateSingleUseTokenError as d$, type MemberRebateContribution$1 as d0, type MemberRebateContribution as d1, type ActivityRecord$1 as d2, type ActivityRecord as d3, type Referral$1 as d4, type Referral as d5, type ReferralCommission$1 as d6, type ReferralCommission as d7, type Platform__Next$1 as d8, type Platform__Next as d9, type AchievementPointsHistoryRecord as dA, type MemberAchievement$1 as dB, type MemberAchievement as dC, type MemberVerificationRequest$1 as dD, type MemberVerificationRequest as dE, type FreeBetDrop$1 as dF, type FreeBetDrop as dG, type MemberFreeBetDrop$1 as dH, type MemberFreeBetDrop as dI, type MemberWalletAccount$1 as dJ, type MemberWalletAccount as dK, type HttpError as dL, type OperationError as dM, type OperationResult as dN, type LoginChannel as dO, type SecretQuestion as dP, type SecurityQuestionAuthenticator as dQ, type Authenticator as dR, type SignInInput as dS, type SignInError as dT, type SignInReturn as dU, type RefreshSessionError as dV, type SecurityQuestionAuthenticateInput as dW, type AuthenticateError as dX, type Session as dY, type SessionError as dZ, type CreateSingleUseTokenInput as d_, type PointsClubSettings$1 as da, type PointsClubSettings as db, type PaymentSettings$1 as dc, type PaymentSettings as dd, type Message$1 as de, type Message as df, type InstapayBank$1 as dg, type InstapayBank as dh, type SpotBonusPromo$1 as di, type SpotBonusPromo as dj, type Quest$1 as dk, type Quest as dl, type TopWin$1 as dm, type TopWin as dn, type Jackpot$1 as dp, type Jackpot as dq, type JackpotPayout$1 as dr, type JackpotPayout as ds, type Tournament$1 as dt, type Tournament as du, type MemberLevelSettings$1 as dv, type MemberLevelSettings as dw, type AchievementSettingsResponse$1 as dx, type AchievementSettingsResponse as dy, type AchievementPointsHistoryRecord$1 as dz, type TokenSignInReturn as e, type ManualDeposit as e$, type UploadImageFileError as e0, type AccountStatus as e1, type AccountVerificationStatus as e2, type Agent as e3, type GigRewardsQuestDetails as e4, type CellxpertDetails as e5, type VerificationDetailsStatus as e6, type NameAndPasswordCreateAccountInput as e7, type MobileNumberCreateAccountInput as e8, type MobileNumberInrCreateAccountInput as e9, type ClaimRebateError as eA, type GameTag as eB, type GameType as eC, type WalletGame as eD, type GameSessionStatus as eE, type GameSessionLaunchOptions as eF, type CreateGameSessionByReferenceInput as eG, type CreateGameSessionByIdInput as eH, type CreateGameSessionError as eI, type AnnouncementType as eJ, type AnnouncementStatus as eK, type BetRecordStatus as eL, type FreeBetDropStatus as eM, type MemberFreeBetDropBetRecord as eN, type TransactionType as eO, type DepositType as eP, type DepositStatus as eQ, type KnownDepositError as eR, type GCashDeposit as eS, type GcashWebpayDeposit as eT, type AiOGCashDeposit as eU, type AiOPayMayaDeposit as eV, type AiOGrabPayDeposit as eW, type AiOPalawanPayDeposit as eX, type MayaDeposit as eY, type MayaAppDeposit as eZ, type BankDeposit as e_, type NameCreateAccountInput as ea, type MobileNumberCreateAccountInput__next as eb, type CreateAccountError as ec, type RegisterMayaAccountError as ed, type RegisterAgentAccountError as ee, type UpdateAccountError as ef, type ResetPasswordError as eg, type SubmitVerificationError as eh, type SubmitMemberVerificationError as ei, type UpdateVerificationError as ej, type SendVerificationCodeError as ek, type SendSmsVerificationCodeInput as el, type SendEmailVerificationCodeInput as em, type SendVerificationCodeError__Next as en, type VerifyMobileNumberError as eo, type Currency as ep, type AchievementSettings as eq, type RedeemPointsError as er, type PointsWalletTransactionType as es, type RebateStatus as et, type RebateCursor as eu, type RebateType as ev, type RebateSettingsPerMemberLevel as ew, type RebateProgram as ex, type MemberRebateContributionPerGameCategory as ey, type MemberRebateContributionPerGame as ez, type SocialsSignInReturn as f, type Field as f$, type QRPHDeposit as f0, type OnlineBankDeposit as f1, type ManualBankDeposit as f2, type ManualUPIDeposit as f3, type CreateMayaDepositInput as f4, type CreateGCashDepositInput as f5, type CreateAiOGCashDepositInput as f6, type CreateAiOPayMayaDepositInput as f7, type CreateAiOGrabPayDepositInput as f8, type CreateAiOPalawanPayDepositInput as f9, type CreateMayaAppWithdrawalInput as fA, type CreateAIOInstapayWithdrawalInput as fB, type CreateAIOInstapayWithdrawalInput_Next as fC, type CreateManualUPIWithdrawalInput as fD, type CreateManualBankWithdrawalInput as fE, type CreateCabinetWithdrawalInput as fF, type CreateWithdrawalError as fG, type GatewaySettings as fH, type MemberLevelSetting as fI, type Locale as fJ, type AchievementType as fK, type GeneralMemberLevelSettings as fL, type PromoType as fM, type PromoStatus as fN, type TurnoverRequirementType as fO, type CashbackStatus as fP, type PromosAndCashbacks as fQ, type ClaimCashbackBonusError as fR, type ActivityRecordType as fS, type FieldType as fT, type TextField as fU, type RichTextField as fV, type ImageField as fW, type SelectField as fX, type MultiSelectField as fY, type ToggleField as fZ, type CompoundField as f_, type CreateGCashWebpayDepositInput as fa, type CreateMayaAppDepositInput as fb, type CreateAIOQRPHDepositInput as fc, type CreateAIOOnlineBankDepositInput as fd, type CreateManualUPIDepositInput as fe, type CreateManualBankDepositInput as ff, type CreateMayaWebpayDepositInput as fg, type CreateTestDepositInput as fh, type CreateDepositError as fi, type VoucherType as fj, type WithdrawalType as fk, type WithdrawalStatus as fl, type WithdrawalError as fm, type ManualWithdrawalRecord as fn, type Bank as fo, type BankWithdrawalRecord as fp, type GCashWithdrawalRecord as fq, type MayaWithdrawalRecord as fr, type InstapayWithdrawalRecord as fs, type ManualBankWithdrawalRecord as ft, type ManualUPIWithdrawalRecord as fu, type InstapayBankType as fv, type CreateBankWithdrawalInput as fw, type CreateGCashWithdrawalInput as fx, type CreateGCashStandardCashInWithdrawalInput as fy, type CreateMayaWithdrawalInput as fz, type CabinetSignInReturn as g, type RegisterMemberAccountByMobileNumberMutationVariables__Next as g$, type UpdateReferralCodeError as g0, type ClaimRewardError as g1, type MessageIcon as g2, type MessageAction as g3, type MessageType as g4, type OnboardingStatus as g5, type OnboardingPlayerExperience as g6, type QuestType as g7, type QuestStatus as g8, type QuestProgramStatus as g9, type UpdateDailyBetLimitMutationVariables as gA, type UpdateMonthlyBetLimitMutationVariables as gB, type UpdateDailyDepositLimitMutationVariables as gC, type UpdateMonthlyDepositLimitMutationVariables as gD, type UnlinkGoogleMutationVariables as gE, type ResetPasswordMutationVariables as gF, type ResetPasswordError$1 as gG, type GeneralMemberLevelSettings$1 as gH, type SendVerificationCodeMutationVariables as gI, type SendVerificationCodeError$1 as gJ, type VerifyMobileNumberMutationVariables as gK, type VerifyMobileNumberError$1 as gL, type CreateMemberVerificationMutationVariables as gM, type CreateMemberVerificationError as gN, type CreateMemberVerificationNextMutationVariables as gO, type UpdateMemberVerificationMutationVariables as gP, type UpdateMemberVerificationError as gQ, type UpdateMemberVerificationNextMutationVariables as gR, type SubmitMemberVerificationMutationVariables as gS, type SubmitMemberVerificationError$1 as gT, type AnnouncementsQueryVariables as gU, type PaginatedQueryResult$1 as gV, type RegisterMayaMemberAccountMutationVariables as gW, type RegisterMayaMemberAccountError as gX, type UpdateReferralCodeMutationVariables as gY, type UpdateReferralCodeError$1 as gZ, type RegisterMemberAccountByMobileNumberMutationVariables as g_, type QuestProgram as ga, type MemberStatus as gb, type JourneyQuestMilestoneType as gc, type JourneyQuestMilestone as gd, type WageringQuestStage as ge, type WageringQuestStageSettings as gf, type JackpotStatus as gg, type FCMDeviceType as gh, type FirebaseCloudMessagingDeviceType as gi, type TournamentStatus as gj, type TournamentType as gk, type TournamentFrequency as gl, type TournamentMode as gm, type TournamentLeaderboard as gn, type TournamentPayout as go, type CabinetSiteMachineStatus as gp, type MemberVerificationRequestStatus as gq, GraphQLClient as gr, type RegisterMemberAccountMutationVariables as gs, type RegisterMemberAccountError as gt, type RegisterMemberAccountViaMobileMutationVariables as gu, type RegisterMemberAccountMutationVariables__Next as gv, type RegisterMemberAccountByNameMutationVariables as gw, type UpdateMemberAccountMutationVariables as gx, type UpdateMemberAccountError as gy, type DeleteMemberAccountMutationVariables as gz, type SingleUseTokenSignInInput as h, type AvailablePromosQueryVariables as h$, type RegisterAgentAccountMutationVariables as h0, type RegisterAgentAccountError$1 as h1, type MemberVerificationRequestByIdQueryVariables as h2, type SubmitMemberVerificationRequestBasicDetailsMutationVariables as h3, type SubmitMemberVerificationRequestImageDetailsMutationVariables as h4, type SubmitMemberVerificationRequestPersonalDetailsMutationVariables as h5, type FileQueryVariables as h6, type CreateSessionInput as h7, type CreateSessionError as h8, type CreateSessionMutation as h9, type MemberRebatesQueryVariables as hA, type MemberRebateContributionQueryVariables as hB, type AchievementPointsHistoryRecordQueryVariables as hC, type ActivityRecordsQueryVariables as hD, type ReferralsQueryVariables as hE, type UplinesByNameQueryVariables as hF, type DownlinesByNameQueryVariables as hG, type PromoByCodeQueryVariables as hH, type JackpotsQueryVariables as hI, type _JackpotsQueryVariables as hJ, type _Jackpot as hK, type JackpotsIdsQueryVariables as hL, type JackpotPayoutsQueryVariables as hM, type TournamentsQueryVariables as hN, type TournamentsIdsQueryVariables as hO, type FreeBetDropsQueryVariables as hP, type MemberFreeBetDropsQueryVariables as hQ, type MessagesQueryVariables as hR, type UnreadMessagesCountQueryVariables as hS, type MarkMessageAsReadMutationVariables as hT, type ClaimRewardMutationVariables as hU, type ClaimRewardError$1 as hV, type CheckInDailyQuestQueryVariables as hW, type RegisterFCMDeviceMutationVariables as hX, type UnregisterFCMDeviceMutationVariables as hY, type LinkFirebaseCloudMessagingDeviceMutationVariables as hZ, type UnlinkFirebaseCloudMessagingDeviceMutationVariables as h_, type AuthenticateInput$1 as ha, type AuthenticateError$1 as hb, type AuthenticateMutation as hc, type RefreshSessionError$1 as hd, type RefreshSessionMutation as he, type SendVerificationCodeInput__Next$1 as hf, type SendVerificationCodeError__Next$1 as hg, type CreateSingleUseTokenError$1 as hh, type CreateSingleUseTokenMutation as hi, type GamesQueryVariables as hj, type GamesQueryVariables__Next as hk, type UploadPrivateImageFileMutationVariables as hl, type UploadPrivateImageFileError as hm, type GameSessionQueryVariables as hn, type CreateGameSessionMutationVariables as ho, type CreateGameSessionError$1 as hp, type EndGameSessionMutationVariables as hq, type PlatformQuery__Next as hr, type RecommendedGame as hs, type OnboardingStatus$1 as ht, type CompleteOnboardingMutationVariables as hu, type BetRecordsQueryVariables as hv, type TransactionRecordsQueryVariables as hw, type WithdrawalRecordsQueryVariables as hx, type DepositRecordsQueryVariables as hy, type PointsWalletTransactionsQueryVariables as hz, type SingleUseTokenSignInReturn as i, type EnumFilterField as i$, type CancelFreeBetDropMutationVariables as i0, type ClaimCashbackBonusMutationVariables as i1, type ClaimCashbackBonusError$1 as i2, type ClaimRebateMutationVariables as i3, type ClaimRebateError$1 as i4, type DepositQueryVariables as i5, type CreateGCashDepositMutationVariables as i6, type CreateDepositError$1 as i7, type CreateGCashWebpayDepositMutationVariables as i8, type CreateMayaWebpayDepositMutationVariables as i9, type RedeemPointsToCashError as iA, type MayaSessionQueryVariables as iB, type MayaSession as iC, type ClaimSpotBonusMutationVariables as iD, type ClaimSpotBonusError as iE, type TouchGCashDepositMutationVariables as iF, type TouchQrphDepositMutationVariables as iG, type MarkGameAsFavoriteMutationVariables as iH, type UnmarkGameAsFavoriteMutationVariables as iI, type FavoriteGame as iJ, type WalletGamesQueryVariables as iK, type CabinetWithdrawalQueryVariables as iL, type RedeemVoucherMutationVariables as iM, type RedeemVoucherError as iN, type CreateCabinetWithdrawalMutationVariables as iO, type ID as iP, type Decimal as iQ, type DateString as iR, type Html as iS, type Edge as iT, type PageInfo as iU, type PaginatedQuery as iV, type ObjectIdFilterField as iW, type StringFilterField as iX, type NumberFilterField as iY, type BooleanFilterField as iZ, type DateFilterField as i_, type CreateMayaDepositMutationVariables as ia, type CreateTestDepositMutationVariables as ib, type CreateTestDepositError as ic, type CreateAIOQRPHDepositMutationVariables as id, type CreateAiOGCcashDepositMutationVariables as ie, type CreateAiOPayMayaDepositMutationVariables as ig, type CreateAiOGrabPayDepositMutationVariables as ih, type CreateAiOPalawanPayDepositMutationVariables as ii, type CreateAIOOnlineBankDepositMutationVariables as ij, type CreateManualBankDeposiMutationVariables as ik, type CreateManualUPIDepositMutationVariables as il, type CreateMayaAppDepositMutationVariables as im, type CreateManualUpiDepositMutationVariables as io, type CreateGCashWithdrawalMutationVariables as ip, type CreateWithdrawalError$1 as iq, type CreateGCashStandardCashInWithdrawalMutationVariables as ir, type CreateMayaWithdrawalMutationVariables as is, type CreateMayaAppWithdrawalMutationVariables as it, type CreateBankWithdrawalMutationVariables as iu, type CreateAIOInstapayWithdrawalMutationVariables as iv, type CreateAIOInstapayWithdrawalNextMutationVariables as iw, type CreateManualUpiWithdrawalMutationVariables as ix, type CreateManualBankWithdrawalMutationVariables as iy, type RedeemPointsToCashMutationVariables as iz, type AuthenticateReturn as j, type CreateBankWithdrawalMutation as j$, type SortOrder as j0, type FileStatus as j1, type FileQuery as j2, type UploadPrivateImageFileMutation as j3, type AnnouncementType$1 as j4, type AnnouncementStatus$1 as j5, type AnnouncementVisibility as j6, type AnnouncementsQuery as j7, type GameType$1 as j8, type GameProvider$1 as j9, type CreateMayaWebpayDepositMutation as jA, type CreateMayaDepositMutation as jB, type CreateTestDepositMutation as jC, type CreateAIOQRPHDepositMutation as jD, type CreateManualBankDepositMutation as jE, type CreateManualUPIDepositMutation as jF, type CreateAiOGCashDepositMutation as jG, type CreateAiOPayMayaDepositMutation as jH, type CreateAiOGrabPayDepositMutation as jI, type CreateAiOPalawanPayDepositMutation as jJ, type CreateAIOOnlineBankDepositMutation as jK, type CreateManualBankDepositMutationVariables as jL, type CreateMayaAppDepositMutation as jM, type DepositQuery as jN, type DepositsCountQuery as jO, type TouchGCashDepositMutation as jP, type TouchQrphDepositMutation as jQ, type CreateManualUpiDepositMutation as jR, type Bank$1 as jS, type WithdrawalType$1 as jT, type WithdrawalStatus$1 as jU, type WithdrawalError$1 as jV, type WithdrawalRecordsQuery as jW, type CreateGCashWithdrawalMutation as jX, type CreateGCashStandardCashInWithdrawalMutation as jY, type CreateMayaWithdrawalMutation as jZ, type CreateMayaAppWithdrawalMutation as j_, type GameStatus as ja, type GameTag$1 as jb, type WalletGame$1 as jc, type GameQueryVariables as jd, type GameQuery as je, type GamesQuery as jf, type WalletGamesQuery as jg, type RecommendedGamesQuery as jh, type GameSessionStatus$1 as ji, type GameSessionLaunchOptions$1 as jj, type GameSessionQuery as jk, type CreateGameSessionMutation as jl, type EndGameSessionError as jm, type EndGameSessionMutation as jn, type BetRecordStatus$1 as jo, type BetRecordMetadata as jp, type BetRecordsQuery as jq, type LatestBetRecordsQuery as jr, type DepositType$1 as js, type DepositStatus$1 as jt, type KnownDepositError$1 as ju, type VoucherType$1 as jv, type DepositRecordsQuery as jw, type RedeemVoucherMutation as jx, type CreateGCashDepositMutation as jy, type CreateGCashWebpayDepositMutation as jz, type SessionReturn as k, type UpdateMonthlyDepositLimitMutation as k$, type CreateAIOInstapayWithdrawalMutation as k0, type CreateAIOInstapayWithdrawalNextMutation as k1, type CreateManualUpiWithdrawalMutation as k2, type CreateManualBankWithdrawalMutation as k3, type CreateCabinetWithdrawalMutation as k4, type InstapayBankListQuery as k5, type RemainingDailyWithdrawalsCountQuery as k6, type PromoType$1 as k7, type PromoStatus$1 as k8, type PromosQuery as k9, type MemberRebatesQuery as kA, type MemberRebateContributionPerGameCategory$1 as kB, type MemberRebateContributionPerGame$1 as kC, type MemberRebateContributionQuery as kD, type AchievementPointsHistoryRecordQuery as kE, type MemberAccountStatus as kF, type MemberAccountVerificationStatus as kG, type MemberVerificationStatus as kH, type GigRewardsQuestDetails$1 as kI, type CellxpertDetails$1 as kJ, type MemberQuery as kK, type MemberAccountQuery as kL, type MemberVerificationQuery as kM, type RegisterMemberAccountMutation as kN, type RegisterMemberAccountByNameMutation as kO, type RegisterMemberAccountViaMobileMutation as kP, type RegisterAgentAccountMutation as kQ, type RegisterMayaMemberAccountMutation as kR, type UpdateMemberAccountMutation as kS, type SecretQuestion$1 as kT, type ResetPasswordMutation as kU, type AchievementType$1 as kV, type AchievementSettingsQueryVariables as kW, type DeleteMemberAccountMutation as kX, type UpdateDailyBetLimitMutation as kY, type UpdateMonthlyBetLimitMutation as kZ, type UpdateDailyDepositLimitMutation as k_, type AvailablePromosQuery as ka, type CashbackStatus$1 as kb, type PromosAndCashbacksQuery as kc, type CashbacksQuery as kd, type ClaimSpotBonusMutation as ke, type TurnoverRequirementType$1 as kf, type PromoByCodeQuery as kg, type BonusQuery as kh, type BonusesQuery as ki, type CashbackBonusesQuery as kj, type ClaimCashbackBonusMutation as kk, type ClaimRebateMutation as kl, type TransactionType$1 as km, type TransactionRecordsQuery as kn, type Currency$1 as ko, type WalletQuery as kp, type MemberWalletQuery as kq, type PointsWalletQuery as kr, type RedeemPointsToCashMutation as ks, type PointsWalletTransactionType$1 as kt, type PointsWalletTransactionsQuery as ku, type RebateStatus$1 as kv, type RebateCursor$1 as kw, type RebateType$1 as kx, type RebateSettingsPerMemberLevel$1 as ky, type RebateProgram$1 as kz, type CreateSingleUseTokenReturn as l, type QuestProgram$1 as l$, type UnlinkGoogleMutation as l0, type SendVerificationCodeInput as l1, type SendVerificationCodeMutation as l2, type VerifyMobileNumberMutation as l3, type CreateMemberVerificationMutation as l4, type CreateMemberVerificationNextMutation as l5, type UpdateMemberVerificationMutation as l6, type UpdateMemberVerificationNextMutation as l7, type SubmitMemberVerificationMutation as l8, type ProfileCompletionQuery as l9, type ActivityRecordType$1 as lA, type ActivityRecordsQuery as lB, type ReferralCodeQuery as lC, type UpdateReferralCodeMutation as lD, type ReferralsQuery as lE, type ReferralCommissionQuery as lF, type UplinesByNameQuery as lG, type DownlinesByNameQuery as lH, type PointsClubSettingsQuery as lI, type AchievementSettings$1 as lJ, type AchievementSettingsQuery as lK, type MessageAction$1 as lL, type MessageIcon$1 as lM, type MessageType$1 as lN, type MessagesQuery as lO, type MarkMessageAsReadMutation as lP, type MarkAllMessageAsReadMutation as lQ, type MarkAllMessagesAsReadMutation as lR, type UnreadMessagesCountQuery as lS, type ClaimRewardMutation as lT, type OnboardingPlayerExperience$1 as lU, type OnboardingStatusQuery as lV, type CompleteOnboardingMutation as lW, type SkipOnboardingMutation as lX, type QuestType$1 as lY, type QuestStatus$1 as lZ, type QuestProgramStatus$1 as l_, type RegisterMemberAccountByMobileNumberMutation as la, type RegisterMemberAccountByMobileNumberMutation__Next as lb, type DepositGatewaySettings as lc, type WithdrawalGatewaySettings as ld, type MemberLevelSetting$1 as le, type MemberLevelSettingsQuery as lf, type GeneralMemberLevelSettingsQuery as lg, type PlatformQuery as lh, type PaymentSettingsQuery as li, type LoginChannel$1 as lj, type Session$1 as lk, type Authenticator$1 as ll, type SecurityQuestionAuthenticateInput$1 as lm, type MayaSessionQuery as ln, type ValidateMayaSessionMutation as lo, type TextField$1 as lp, type RichTextField$1 as lq, type ImageField$1 as lr, type SelectField$1 as ls, type MultiSelectField$1 as lt, type ToggleField$1 as lu, type CompoundField$1 as lv, type Field$1 as lw, type FieldType$1 as lx, type SiteConfig as ly, type SiteQuery as lz, type SiteReturn as m, type JourneyQuestMilestoneType$1 as m0, type JourneyQuestMilestone$1 as m1, type WageringQuestStage$1 as m2, type WageringQuestStageSettings$1 as m3, type MemberStatus$1 as m4, type AvailableQuestsQuery as m5, type CheckInDailyQuestMutation as m6, type TopWinsQuery as m7, type TopWinsNextQuery as m8, type JackpotStatus$1 as m9, type MemberAchievementsQuery as mA, type RequireFirstDepositQuery as mB, type CabinetSiteMachineStatus$1 as mC, type MemberCabinetSiteMachineQuery as mD, type CabinetWithdrawalQuery as mE, type MemberVerificationRequestStatus$1 as mF, type MemberVerificationRequestQuery as mG, type MemberVerificationRequestByIdQuery as mH, type SubmitMemberVerificationRequestBasicDetailsMutation as mI, type SubmitMemberVerificationRequestImageDetailsMutation as mJ, type SubmitMemberVerificationRequestPersonalDetailsMutation as mK, type MemberVerificationRequestAutomaticApprovalEnabledQuery as mL, type FreeBetDropStatus$1 as mM, type CancelFreeBetDropMutation as mN, type MemberFreeBetDropBetRecord$1 as mO, type MemberFreeBetDropsQuery as mP, type FreeBetDropsQuery as mQ, type JackpotCursor as ma, type JackpotPayoutCursor as mb, type JackpotsQuery as mc, type _JackpotsQuery as md, type JackpotsIdsQuery as me, type JackpotPayoutsQuery as mf, type FCMDeviceType$1 as mg, type FirebaseCloudMessagingDeviceType$1 as mh, type RegisterFCMDeviceMutation as mi, type UnregisterFCMDeviceMutation as mj, type LinkFirebaseCloudMessagingDeviceMutation as mk, type UnlinkFirebaseCloudMessagingDeviceMutation as ml, type MarkGameAsFavoriteMutation as mm, type UnmarkGameAsFavoriteMutation as mn, type FavoriteGamesQuery as mo, type TransactionPasswordNotSetError as mp, type UPIReferenceNotAvailableError as mq, type GoogleClientIdQuery as mr, type TournamentStatus$1 as ms, type TournamentType$1 as mt, type TournamentFrequency$1 as mu, type TournamentMode$1 as mv, type TournamentLeaderboard$1 as mw, type TournamentPayout$1 as mx, type TournamentsQuery as my, type TournamentsIdsQuery as mz, type CabinetSiteMachineReturn as n, type CabinetWithdrawalReturn as o, type PlatformReturn__Next as p, type PaymentSettingsReturn as q, type MemberLevelSettingsReturn as r, type GeneralMemberLevelSettingsReturn as s, type AchievementSettingsReturn as t, type AccountReturn as u, type CreateAccountInput as v, type CreateAccountReturn as w, type CreateAccountInput__Next as x, type RegisterMayaAccountReturn as y, type RegisterAgentAccountInput as z };
4514
+ export type { ResetPasswordInput as $, AuthenticateInput as A, UpdateAccountReturn as B, CabinetSignInInput as C, DeleteAccountReturn as D, Environment as E, UpdateDailyBetLimitInput as F, GeneralMemberLevelSettingsReturn as G, UpdateAccountLimitReturn as H, UpdateMonthlyBetLimitInput as I, UpdateDailyDepositLimitInput as J, UpdateMonthlyDepositLimitInput as K, VerificationDetailsReturn as L, MobileNumberSignInInput as M, NameAndPasswordSignInInput as N, SubmitVerificationDetailsInput as O, PlatformReturn as P, SubmitVerificationDetailsReturn as Q, RegisterMayaAccountInput as R, SocialsSignInInput as S, TokenSignInInput as T, UpdateAccountInput as U, ValidateMayaSessionReturn as V, WatchSessionInput as W, SubmitVerificationDetailsInputNext as X, UpdateVerificationDetailsInput as Y, UpdateVerificationDetailsReturn as Z, SubmitMemberVerificationReturn as _, NameAndPasswordSignInReturn as a, EndGameSessionReturn as a$, ResetPasswordReturn as a0, VerifyMobileNumberReturn as a1, ProfileCompletionReturn as a2, SendVerificationCodeReturn as a3, SendVerificationCodeInput__Next as a4, SendVerificationCodeReturn__Next as a5, WalletReturn as a6, MemberWalletAccountReturn as a7, AnnouncementsInput as a8, AnnouncementsReturn as a9, TransactionRecordsReturn as aA, PromosReturn as aB, PromoFilterInput as aC, AvailablePromosReturn as aD, CashbacksReturn as aE, PromosAndCashbacksReturn as aF, BonusReturn as aG, BonusesReturn as aH, CashbackBonusReturn as aI, ClaimCashbackBonusReturn as aJ, ClaimRebateReturn as aK, ClaimSpotBonusReturn as aL, PromoByCodeReturn as aM, GameReturn as aN, GamesInput as aO, GamesReturn as aP, WalletGameInput as aQ, WalletGamesReturn as aR, PlatformGamesInput as aS, PlatformGamesReturn as aT, GamesInput__Next as aU, RecommendedGamesInput as aV, RecommendedGamesReturn as aW, GameProvider as aX, GameSessionReturn as aY, CreateGameSessionInput as aZ, CreateGameSessionReturn as a_, CreateWithdrawalInput as aa, CreateWithdrawalReturn as ab, WithdrawalRecordsInput as ac, WithdrawalRecordsReturn as ad, RemainingDailyWithdrawalsCountReturn as ae, InstapayBankListReturn as af, CreateDepositInput as ag, CreateDepositReturn as ah, DepositReturn as ai, DepositRecordsInput as aj, DepositRecordsReturn as ak, DepositsCountReturn as al, TouchDepositInput as am, TouchDepositReturn as an, RedeemVoucherInput as ao, RedeemVoucherReturn as ap, BetRecordsInput as aq, BetRecordsReturn as ar, LatestBetRecordsReturn as as, FreeBetDropsInput as at, FreeBetDropsReturn as au, MemberFreeBetDropsInput as av, MemberFreeBetDropsReturn as aw, CancelFreeBetDropInput as ax, CancelFreeBetDropReturn as ay, TransactionRecordsInput as az, MobileNumberSignInReturn as b, LinkFirebaseCloudMessagingDeviceInput as b$, MarkGameAsFavoriteInput as b0, MarkGameAsFavoriteReturn as b1, UnmarkGameAsFavoriteInput as b2, UnmarkGameAsFavoriteReturn as b3, FavoriteGamesReturn as b4, FileReturn as b5, UploadImageFileInput as b6, UploadImageFileReturn as b7, PointsWalletReturn as b8, RedeemPointsInput as b9, UnreadMessagesCountReturn as bA, MarkMessageAsReadReturn as bB, MarkAllMessagesAsReadReturn as bC, ClaimRewardReturn as bD, OnboardingStatusReturn as bE, CompleteOnboardingInput as bF, CompleteOnboardingReturn as bG, SkipOnboardingReturn as bH, AvailableQuestsReturn as bI, CheckInDailyQuestReturn as bJ, TopWinsReturn as bK, JackpotsInput as bL, JackpotsReturn as bM, JackpotsIdsInput as bN, JackpotsIdsReturn as bO, _JackpotsInput as bP, _JackpotsReturn as bQ, JackpotPayoutsInput as bR, JackpotPayoutsReturn as bS, TournamentsInput as bT, TournamentsReturn as bU, TournamentsIdsInput as bV, TournamentsIdsReturn as bW, RegisterFCMDeviceInput as bX, RegisterFCMDeviceReturn as bY, UnregisterFCMDeviceInput as bZ, UnregisterFCMDeviceReturn as b_, RedeemPointsReturn as ba, PointsWalletTransactionsInput as bb, PointsWalletTransactionsReturn as bc, AchievementPointsHistoryRecordInput as bd, AchievementPointsHistoryRecordReturn as be, MemberAchievementReturn as bf, MemberRebatesInput as bg, MemberRebatesReturn as bh, MemberRebateContributionInput as bi, MemberRebateContributionReturn as bj, ActivityRecordsInput as bk, ActivityRecordsReturn as bl, ReferralCodeReturn as bm, UpdateReferralCodeInput as bn, UpdateReferralCodeReturn as bo, ReferralsInput as bp, ReferralsReturn as bq, ReferralCommissionReturn as br, UplinesByNameInput as bs, UplinesByNameReturn as bt, DownlinesByNameInput as bu, DownlinesByNameReturn as bv, PointsClubSettingsReturn as bw, MessagesInput as bx, MessagesReturn as by, UnreadMessagesCountInput as bz, MayaSignInInput as c, Rebate as c$, LinkFirebaseCloudMessagingDeviceReturn as c0, UnlinkFirebaseCloudMessagingDeviceInput as c1, UnlinkFirebaseCloudMessagingDeviceReturn as c2, GoogleClientIdReturn as c3, RequireFirstDepositReturn as c4, MemberVerificationRequestReturn as c5, SubmitMemberVerificationRequestBasicDetailsInput as c6, SubmitMemberVerificationRequestBasicDetailsReturn as c7, SubmitMemberVerificationRequestImageDetailsInput as c8, SubmitMemberVerificationRequestImageDetailsReturn as c9, BetRecord$1 as cA, Game$1 as cB, BetRecord as cC, LatestBetRecord$1 as cD, LatestBetRecord as cE, TransactionRecord$1 as cF, TransactionRecord as cG, Game as cH, GameSession$1 as cI, GameSession as cJ, Promo$1 as cK, Promo as cL, Cashback$1 as cM, Cashback as cN, Bonus$1 as cO, Bonus as cP, CashbackBonus$1 as cQ, CashbackBonus as cR, CabinetSiteMachine$1 as cS, CabinetSiteMachine as cT, File$1 as cU, File as cV, PointsWallet$1 as cW, PointsWallet as cX, PointsWalletTransaction$1 as cY, PointsWalletTransaction as cZ, Rebate$1 as c_, SubmitMemberVerificationRequestPersonalDetailsInput as ca, SubmitMemberVerificationRequestPersonalDetailsReturn as cb, MemberVerificationRequestAutomaticApprovalEnabledReturn as cc, Site$1 as cd, Site as ce, Platform$1 as cf, Platform as cg, MemberAccount as ch, Member as ci, Account as cj, Wallet$1 as ck, Wallet as cl, MemberVerification as cm, VerificationDetails as cn, ProfileCompletion$1 as co, ProfileCompletion as cp, Announcement$1 as cq, Announcement as cr, WithdrawalRecord$1 as cs, WithdrawalRecord as ct, Deposit$1 as cu, Deposit as cv, CabinetWithdrawal as cw, CabinetWithdrawalRecord as cx, DepositRecord$1 as cy, DepositRecord as cz, MayaSignInReturn as d, AccountVerificationStatus as d$, MemberRebateContribution$1 as d0, MemberRebateContribution as d1, ActivityRecord$1 as d2, ActivityRecord as d3, Referral$1 as d4, Referral as d5, ReferralCommission$1 as d6, ReferralCommission as d7, Platform__Next$1 as d8, Platform__Next as d9, AchievementPointsHistoryRecord as dA, MemberAchievement$1 as dB, MemberAchievement as dC, MemberVerificationRequest$1 as dD, MemberVerificationRequest as dE, FreeBetDrop$1 as dF, FreeBetDrop as dG, MemberFreeBetDrop$1 as dH, MemberFreeBetDrop as dI, MemberWalletAccount$1 as dJ, MemberWalletAccount as dK, LoginChannel as dL, SecretQuestion as dM, SecurityQuestionAuthenticator as dN, Authenticator as dO, SignInInput as dP, SignInError as dQ, SignInReturn as dR, RefreshSessionError as dS, SecurityQuestionAuthenticateInput as dT, AuthenticateError as dU, Session as dV, SessionError as dW, CreateSingleUseTokenInput as dX, CreateSingleUseTokenError as dY, UploadImageFileError as dZ, AccountStatus as d_, PointsClubSettings$1 as da, PointsClubSettings as db, PaymentSettings$1 as dc, PaymentSettings as dd, Message$1 as de, Message as df, InstapayBank$1 as dg, InstapayBank as dh, SpotBonusPromo$1 as di, SpotBonusPromo as dj, Quest$1 as dk, Quest as dl, TopWin$1 as dm, TopWin as dn, Jackpot$1 as dp, Jackpot as dq, JackpotPayout$1 as dr, JackpotPayout as ds, Tournament$1 as dt, Tournament as du, MemberLevelSettings$1 as dv, MemberLevelSettings as dw, AchievementSettingsResponse$1 as dx, AchievementSettingsResponse as dy, AchievementPointsHistoryRecord$1 as dz, TokenSignInReturn as e, OnlineBankDeposit as e$, Agent as e0, GigRewardsQuestDetails as e1, CellxpertDetails as e2, VerificationDetailsStatus as e3, NameAndPasswordCreateAccountInput as e4, MobileNumberCreateAccountInput as e5, MobileNumberInrCreateAccountInput as e6, NameCreateAccountInput as e7, MobileNumberCreateAccountInput__next as e8, CreateAccountError as e9, WalletGame as eA, PlatformGame as eB, GameSessionStatus as eC, GameSessionLaunchOptions as eD, CreateGameSessionByReferenceInput as eE, CreateGameSessionByIdInput as eF, CreateGameSessionError as eG, AnnouncementType as eH, AnnouncementStatus as eI, BetRecordStatus as eJ, FreeBetDropStatus as eK, MemberFreeBetDropBetRecord as eL, TransactionType as eM, DepositType as eN, DepositStatus as eO, KnownDepositError as eP, GCashDeposit as eQ, GcashWebpayDeposit as eR, AiOGCashDeposit as eS, AiOPayMayaDeposit as eT, AiOGrabPayDeposit as eU, AiOPalawanPayDeposit as eV, MayaDeposit as eW, MayaAppDeposit as eX, BankDeposit as eY, ManualDeposit as eZ, QRPHDeposit as e_, RegisterMayaAccountError as ea, RegisterAgentAccountError as eb, UpdateAccountError as ec, ResetPasswordError as ed, SubmitVerificationError as ee, SubmitMemberVerificationError as ef, UpdateVerificationError as eg, SendVerificationCodeError as eh, SendSmsVerificationCodeInput as ei, SendEmailVerificationCodeInput as ej, SendVerificationCodeError__Next as ek, VerifyMobileNumberError as el, Currency as em, AchievementSettings as en, RedeemPointsError as eo, PointsWalletTransactionType as ep, RebateStatus as eq, RebateCursor as er, RebateType as es, RebateSettingsPerMemberLevel as et, RebateProgram as eu, MemberRebateContributionPerGameCategory as ev, MemberRebateContributionPerGame as ew, ClaimRebateError as ex, GameTag as ey, GameType as ez, SocialsSignInReturn as f, ClaimRewardError as f$, ManualBankDeposit as f0, ManualUPIDeposit as f1, CreateMayaDepositInput as f2, CreateGCashDepositInput as f3, CreateAiOGCashDepositInput as f4, CreateAiOPayMayaDepositInput as f5, CreateAiOGrabPayDepositInput as f6, CreateAiOPalawanPayDepositInput as f7, CreateGCashWebpayDepositInput as f8, CreateMayaAppDepositInput as f9, CreateAIOInstapayWithdrawalInput_Next as fA, CreateManualUPIWithdrawalInput as fB, CreateManualBankWithdrawalInput as fC, CreateCabinetWithdrawalInput as fD, CreateWithdrawalError as fE, GatewaySettings as fF, MemberLevelSetting as fG, Locale as fH, AchievementType as fI, GeneralMemberLevelSettings as fJ, PromoType as fK, PromoStatus as fL, TurnoverRequirementType as fM, CashbackStatus as fN, PromosAndCashbacks as fO, ClaimCashbackBonusError as fP, ActivityRecordType as fQ, FieldType as fR, TextField as fS, RichTextField as fT, ImageField as fU, SelectField as fV, MultiSelectField as fW, ToggleField as fX, CompoundField as fY, Field as fZ, UpdateReferralCodeError as f_, CreateAIOQRPHDepositInput as fa, CreateAIOOnlineBankDepositInput as fb, CreateManualUPIDepositInput as fc, CreateManualBankDepositInput as fd, CreateMayaWebpayDepositInput as fe, CreateTestDepositInput as ff, CreateDepositError as fg, VoucherType as fh, WithdrawalType as fi, WithdrawalStatus as fj, WithdrawalError as fk, ManualWithdrawalRecord as fl, Bank as fm, BankWithdrawalRecord as fn, GCashWithdrawalRecord as fo, MayaWithdrawalRecord as fp, InstapayWithdrawalRecord as fq, ManualBankWithdrawalRecord as fr, ManualUPIWithdrawalRecord as fs, InstapayBankType as ft, CreateBankWithdrawalInput as fu, CreateGCashWithdrawalInput as fv, CreateGCashStandardCashInWithdrawalInput as fw, CreateMayaWithdrawalInput as fx, CreateMayaAppWithdrawalInput as fy, CreateAIOInstapayWithdrawalInput as fz, CabinetSignInReturn as g, MemberVerificationRequestByIdQueryVariables as g$, MessageIcon as g0, MessageAction as g1, MessageType as g2, OnboardingStatus as g3, OnboardingPlayerExperience as g4, QuestType as g5, QuestStatus as g6, QuestProgramStatus as g7, QuestProgram as g8, MemberStatus as g9, UpdateMonthlyDepositLimitMutationVariables as gA, UnlinkGoogleMutationVariables as gB, ResetPasswordMutationVariables as gC, ResetPasswordError$1 as gD, GeneralMemberLevelSettings$1 as gE, SendVerificationCodeMutationVariables as gF, SendVerificationCodeError$1 as gG, VerifyMobileNumberMutationVariables as gH, VerifyMobileNumberError$1 as gI, CreateMemberVerificationMutationVariables as gJ, CreateMemberVerificationError as gK, CreateMemberVerificationNextMutationVariables as gL, UpdateMemberVerificationMutationVariables as gM, UpdateMemberVerificationError as gN, UpdateMemberVerificationNextMutationVariables as gO, SubmitMemberVerificationMutationVariables as gP, SubmitMemberVerificationError$1 as gQ, AnnouncementsQueryVariables as gR, PaginatedQueryResult$1 as gS, RegisterMayaMemberAccountMutationVariables as gT, RegisterMayaMemberAccountError as gU, UpdateReferralCodeMutationVariables as gV, UpdateReferralCodeError$1 as gW, RegisterMemberAccountByMobileNumberMutationVariables as gX, RegisterMemberAccountByMobileNumberMutationVariables__Next as gY, RegisterAgentAccountMutationVariables as gZ, RegisterAgentAccountError$1 as g_, JourneyQuestMilestoneType as ga, JourneyQuestMilestone as gb, WageringQuestStage as gc, WageringQuestStageSettings as gd, JackpotStatus as ge, FCMDeviceType as gf, FirebaseCloudMessagingDeviceType as gg, TournamentStatus as gh, TournamentType as gi, TournamentFrequency as gj, TournamentMode as gk, TournamentLeaderboard as gl, TournamentPayout as gm, CabinetSiteMachineStatus as gn, MemberVerificationRequestStatus as go, RegisterMemberAccountMutationVariables as gp, RegisterMemberAccountError as gq, RegisterMemberAccountViaMobileMutationVariables as gr, RegisterMemberAccountMutationVariables__Next as gs, RegisterMemberAccountByNameMutationVariables as gt, UpdateMemberAccountMutationVariables as gu, UpdateMemberAccountError as gv, DeleteMemberAccountMutationVariables as gw, UpdateDailyBetLimitMutationVariables as gx, UpdateMonthlyBetLimitMutationVariables as gy, UpdateDailyDepositLimitMutationVariables as gz, SingleUseTokenSignInInput as h, ClaimCashbackBonusError$1 as h$, SubmitMemberVerificationRequestBasicDetailsMutationVariables as h0, SubmitMemberVerificationRequestImageDetailsMutationVariables as h1, SubmitMemberVerificationRequestPersonalDetailsMutationVariables as h2, FileQueryVariables as h3, CreateSessionInput as h4, CreateSessionError as h5, CreateSessionMutation as h6, AuthenticateInput$1 as h7, AuthenticateError$1 as h8, AuthenticateMutation as h9, ActivityRecordsQueryVariables as hA, ReferralsQueryVariables as hB, UplinesByNameQueryVariables as hC, DownlinesByNameQueryVariables as hD, PromoByCodeQueryVariables as hE, JackpotsQueryVariables as hF, _JackpotsQueryVariables as hG, _Jackpot as hH, JackpotsIdsQueryVariables as hI, JackpotPayoutsQueryVariables as hJ, TournamentsQueryVariables as hK, TournamentsIdsQueryVariables as hL, FreeBetDropsQueryVariables as hM, MemberFreeBetDropsQueryVariables as hN, MessagesQueryVariables as hO, UnreadMessagesCountQueryVariables as hP, MarkMessageAsReadMutationVariables as hQ, ClaimRewardMutationVariables as hR, ClaimRewardError$1 as hS, CheckInDailyQuestQueryVariables as hT, RegisterFCMDeviceMutationVariables as hU, UnregisterFCMDeviceMutationVariables as hV, LinkFirebaseCloudMessagingDeviceMutationVariables as hW, UnlinkFirebaseCloudMessagingDeviceMutationVariables as hX, AvailablePromosQueryVariables as hY, CancelFreeBetDropMutationVariables as hZ, ClaimCashbackBonusMutationVariables as h_, RefreshSessionError$1 as ha, RefreshSessionMutation as hb, SendVerificationCodeInput__Next$1 as hc, SendVerificationCodeError__Next$1 as hd, CreateSingleUseTokenError$1 as he, CreateSingleUseTokenMutation as hf, GamesQueryVariables as hg, GamesQueryVariables__Next as hh, UploadPrivateImageFileMutationVariables as hi, UploadPrivateImageFileError as hj, GameSessionQueryVariables as hk, CreateGameSessionMutationVariables as hl, CreateGameSessionError$1 as hm, EndGameSessionMutationVariables as hn, PlatformQuery__Next as ho, RecommendedGame as hp, OnboardingStatus$1 as hq, CompleteOnboardingMutationVariables as hr, BetRecordsQueryVariables as hs, TransactionRecordsQueryVariables as ht, WithdrawalRecordsQueryVariables as hu, DepositRecordsQueryVariables as hv, PointsWalletTransactionsQueryVariables as hw, MemberRebatesQueryVariables as hx, MemberRebateContributionQueryVariables as hy, AchievementPointsHistoryRecordQueryVariables as hz, SingleUseTokenSignInReturn as i, SortOrder as i$, ClaimRebateMutationVariables as i0, ClaimRebateError$1 as i1, DepositQueryVariables as i2, CreateGCashDepositMutationVariables as i3, CreateDepositError$1 as i4, CreateGCashWebpayDepositMutationVariables as i5, CreateMayaWebpayDepositMutationVariables as i6, CreateMayaDepositMutationVariables as i7, CreateTestDepositMutationVariables as i8, CreateTestDepositError as i9, ClaimSpotBonusMutationVariables as iA, ClaimSpotBonusError as iB, TouchGCashDepositMutationVariables as iC, TouchQrphDepositMutationVariables as iD, MarkGameAsFavoriteMutationVariables as iE, UnmarkGameAsFavoriteMutationVariables as iF, FavoriteGame as iG, WalletGamesQueryVariables as iH, PlatformGamesQueryVariables as iI, PlatformGame$1 as iJ, CabinetWithdrawalQueryVariables as iK, RedeemVoucherMutationVariables as iL, RedeemVoucherError as iM, CreateCabinetWithdrawalMutationVariables as iN, ID as iO, Decimal as iP, DateString as iQ, Html as iR, Edge as iS, PageInfo as iT, PaginatedQuery as iU, ObjectIdFilterField as iV, StringFilterField as iW, NumberFilterField as iX, BooleanFilterField as iY, DateFilterField as iZ, EnumFilterField as i_, CreateAIOQRPHDepositMutationVariables as ia, CreateAiOGCcashDepositMutationVariables as ib, CreateAiOPayMayaDepositMutationVariables as ic, CreateAiOGrabPayDepositMutationVariables as id, CreateAiOPalawanPayDepositMutationVariables as ie, CreateAIOOnlineBankDepositMutationVariables as ig, CreateManualBankDeposiMutationVariables as ih, CreateManualUPIDepositMutationVariables as ii, CreateMayaAppDepositMutationVariables as ij, CreateManualUpiDepositMutationVariables as ik, CreateGCashWithdrawalMutationVariables as il, CreateWithdrawalError$1 as im, CreateGCashStandardCashInWithdrawalMutationVariables as io, CreateMayaWithdrawalMutationVariables as ip, CreateMayaAppWithdrawalMutationVariables as iq, CreateBankWithdrawalMutationVariables as ir, CreateAIOInstapayWithdrawalMutationVariables as is, CreateAIOInstapayWithdrawalNextMutationVariables as it, CreateManualUpiWithdrawalMutationVariables as iu, CreateManualBankWithdrawalMutationVariables as iv, RedeemPointsToCashMutationVariables as iw, RedeemPointsToCashError as ix, MayaSessionQueryVariables as iy, MayaSession as iz, AuthenticateReturn as j, CreateBankWithdrawalMutation as j$, FileStatus as j0, FileQuery as j1, UploadPrivateImageFileMutation as j2, AnnouncementType$1 as j3, AnnouncementStatus$1 as j4, AnnouncementVisibility as j5, AnnouncementsQuery as j6, GameType$1 as j7, GameProvider$1 as j8, GameStatus as j9, CreateMayaWebpayDepositMutation as jA, CreateMayaDepositMutation as jB, CreateTestDepositMutation as jC, CreateAIOQRPHDepositMutation as jD, CreateManualBankDepositMutation as jE, CreateManualUPIDepositMutation as jF, CreateAiOGCashDepositMutation as jG, CreateAiOPayMayaDepositMutation as jH, CreateAiOGrabPayDepositMutation as jI, CreateAiOPalawanPayDepositMutation as jJ, CreateAIOOnlineBankDepositMutation as jK, CreateManualBankDepositMutationVariables as jL, CreateMayaAppDepositMutation as jM, DepositQuery as jN, DepositsCountQuery as jO, TouchGCashDepositMutation as jP, TouchQrphDepositMutation as jQ, CreateManualUpiDepositMutation as jR, Bank$1 as jS, WithdrawalType$1 as jT, WithdrawalStatus$1 as jU, WithdrawalError$1 as jV, WithdrawalRecordsQuery as jW, CreateGCashWithdrawalMutation as jX, CreateGCashStandardCashInWithdrawalMutation as jY, CreateMayaWithdrawalMutation as jZ, CreateMayaAppWithdrawalMutation as j_, GameTag$1 as ja, WalletGame$1 as jb, GameQueryVariables as jc, GameQuery as jd, GamesQuery as je, WalletGamesQuery as jf, PlatformGamesQuery as jg, RecommendedGamesQuery as jh, GameSessionStatus$1 as ji, GameSessionLaunchOptions$1 as jj, GameSessionQuery as jk, CreateGameSessionMutation as jl, EndGameSessionError as jm, EndGameSessionMutation as jn, BetRecordStatus$1 as jo, BetRecordMetadata as jp, BetRecordsQuery as jq, LatestBetRecordsQuery as jr, DepositType$1 as js, DepositStatus$1 as jt, KnownDepositError$1 as ju, VoucherType$1 as jv, DepositRecordsQuery as jw, RedeemVoucherMutation as jx, CreateGCashDepositMutation as jy, CreateGCashWebpayDepositMutation as jz, SessionReturn as k, UpdateMonthlyDepositLimitMutation as k$, CreateAIOInstapayWithdrawalMutation as k0, CreateAIOInstapayWithdrawalNextMutation as k1, CreateManualUpiWithdrawalMutation as k2, CreateManualBankWithdrawalMutation as k3, CreateCabinetWithdrawalMutation as k4, InstapayBankListQuery as k5, RemainingDailyWithdrawalsCountQuery as k6, PromoType$1 as k7, PromoStatus$1 as k8, PromosQuery as k9, MemberRebatesQuery as kA, MemberRebateContributionPerGameCategory$1 as kB, MemberRebateContributionPerGame$1 as kC, MemberRebateContributionQuery as kD, AchievementPointsHistoryRecordQuery as kE, MemberAccountStatus as kF, MemberAccountVerificationStatus as kG, MemberVerificationStatus as kH, GigRewardsQuestDetails$1 as kI, CellxpertDetails$1 as kJ, MemberQuery as kK, MemberAccountQuery as kL, MemberVerificationQuery as kM, RegisterMemberAccountMutation as kN, RegisterMemberAccountByNameMutation as kO, RegisterMemberAccountViaMobileMutation as kP, RegisterAgentAccountMutation as kQ, RegisterMayaMemberAccountMutation as kR, UpdateMemberAccountMutation as kS, SecretQuestion$1 as kT, ResetPasswordMutation as kU, AchievementType$1 as kV, AchievementSettingsQueryVariables as kW, DeleteMemberAccountMutation as kX, UpdateDailyBetLimitMutation as kY, UpdateMonthlyBetLimitMutation as kZ, UpdateDailyDepositLimitMutation as k_, AvailablePromosQuery as ka, CashbackStatus$1 as kb, PromosAndCashbacksQuery as kc, CashbacksQuery as kd, ClaimSpotBonusMutation as ke, TurnoverRequirementType$1 as kf, PromoByCodeQuery as kg, BonusQuery as kh, BonusesQuery as ki, CashbackBonusesQuery as kj, ClaimCashbackBonusMutation as kk, ClaimRebateMutation as kl, TransactionType$1 as km, TransactionRecordsQuery as kn, Currency$1 as ko, WalletQuery as kp, MemberWalletQuery as kq, PointsWalletQuery as kr, RedeemPointsToCashMutation as ks, PointsWalletTransactionType$1 as kt, PointsWalletTransactionsQuery as ku, RebateStatus$1 as kv, RebateCursor$1 as kw, RebateType$1 as kx, RebateSettingsPerMemberLevel$1 as ky, RebateProgram$1 as kz, CreateSingleUseTokenReturn as l, QuestProgram$1 as l$, UnlinkGoogleMutation as l0, SendVerificationCodeInput as l1, SendVerificationCodeMutation as l2, VerifyMobileNumberMutation as l3, CreateMemberVerificationMutation as l4, CreateMemberVerificationNextMutation as l5, UpdateMemberVerificationMutation as l6, UpdateMemberVerificationNextMutation as l7, SubmitMemberVerificationMutation as l8, ProfileCompletionQuery as l9, ActivityRecordType$1 as lA, ActivityRecordsQuery as lB, ReferralCodeQuery as lC, UpdateReferralCodeMutation as lD, ReferralsQuery as lE, ReferralCommissionQuery as lF, UplinesByNameQuery as lG, DownlinesByNameQuery as lH, PointsClubSettingsQuery as lI, AchievementSettings$1 as lJ, AchievementSettingsQuery as lK, MessageAction$1 as lL, MessageIcon$1 as lM, MessageType$1 as lN, MessagesQuery as lO, MarkMessageAsReadMutation as lP, MarkAllMessageAsReadMutation as lQ, MarkAllMessagesAsReadMutation as lR, UnreadMessagesCountQuery as lS, ClaimRewardMutation as lT, OnboardingPlayerExperience$1 as lU, OnboardingStatusQuery as lV, CompleteOnboardingMutation as lW, SkipOnboardingMutation as lX, QuestType$1 as lY, QuestStatus$1 as lZ, QuestProgramStatus$1 as l_, RegisterMemberAccountByMobileNumberMutation as la, RegisterMemberAccountByMobileNumberMutation__Next as lb, DepositGatewaySettings as lc, WithdrawalGatewaySettings as ld, MemberLevelSetting$1 as le, MemberLevelSettingsQuery as lf, GeneralMemberLevelSettingsQuery as lg, PlatformQuery as lh, PaymentSettingsQuery as li, LoginChannel$1 as lj, Session$1 as lk, Authenticator$1 as ll, SecurityQuestionAuthenticateInput$1 as lm, MayaSessionQuery as ln, ValidateMayaSessionMutation as lo, TextField$1 as lp, RichTextField$1 as lq, ImageField$1 as lr, SelectField$1 as ls, MultiSelectField$1 as lt, ToggleField$1 as lu, CompoundField$1 as lv, Field$1 as lw, FieldType$1 as lx, SiteConfig as ly, SiteQuery as lz, SiteReturn as m, JourneyQuestMilestoneType$1 as m0, JourneyQuestMilestone$1 as m1, WageringQuestStage$1 as m2, WageringQuestStageSettings$1 as m3, MemberStatus$1 as m4, AvailableQuestsQuery as m5, CheckInDailyQuestMutation as m6, TopWinsQuery as m7, TopWinsNextQuery as m8, JackpotStatus$1 as m9, MemberAchievementsQuery as mA, RequireFirstDepositQuery as mB, CabinetSiteMachineStatus$1 as mC, MemberCabinetSiteMachineQuery as mD, CabinetWithdrawalQuery as mE, MemberVerificationRequestStatus$1 as mF, MemberVerificationRequestQuery as mG, MemberVerificationRequestByIdQuery as mH, SubmitMemberVerificationRequestBasicDetailsMutation as mI, SubmitMemberVerificationRequestImageDetailsMutation as mJ, SubmitMemberVerificationRequestPersonalDetailsMutation as mK, MemberVerificationRequestAutomaticApprovalEnabledQuery as mL, FreeBetDropStatus$1 as mM, CancelFreeBetDropMutation as mN, MemberFreeBetDropBetRecord$1 as mO, MemberFreeBetDropsQuery as mP, FreeBetDropsQuery as mQ, JackpotCursor as ma, JackpotPayoutCursor as mb, JackpotsQuery as mc, _JackpotsQuery as md, JackpotsIdsQuery as me, JackpotPayoutsQuery as mf, FCMDeviceType$1 as mg, FirebaseCloudMessagingDeviceType$1 as mh, RegisterFCMDeviceMutation as mi, UnregisterFCMDeviceMutation as mj, LinkFirebaseCloudMessagingDeviceMutation as mk, UnlinkFirebaseCloudMessagingDeviceMutation as ml, MarkGameAsFavoriteMutation as mm, UnmarkGameAsFavoriteMutation as mn, FavoriteGamesQuery as mo, TransactionPasswordNotSetError as mp, UPIReferenceNotAvailableError as mq, GoogleClientIdQuery as mr, TournamentStatus$1 as ms, TournamentType$1 as mt, TournamentFrequency$1 as mu, TournamentMode$1 as mv, TournamentLeaderboard$1 as mw, TournamentPayout$1 as mx, TournamentsQuery as my, TournamentsIdsQuery as mz, CabinetSiteMachineReturn as n, CabinetWithdrawalReturn as o, PlatformReturn__Next as p, PaymentSettingsReturn as q, MemberLevelSettingsReturn as r, AchievementSettingsReturn as s, AccountReturn as t, CreateAccountInput as u, CreateAccountReturn as v, CreateAccountInput__Next as w, RegisterMayaAccountReturn as x, RegisterAgentAccountInput as y, RegisterAgentAccountReturn as z };
@@ -0,0 +1,249 @@
1
+ 'use strict';
2
+
3
+ // src/utils/gql.ts
4
+ function gql(strings, ...values) {
5
+ let result = "";
6
+ for (const [index, string] of strings.entries()) {
7
+ const value = values.at(index) ?? "";
8
+ result = `${result}${string}${value}`;
9
+ }
10
+ return result.trim();
11
+ }
12
+
13
+ // src/utils/call-if-fn.ts
14
+ function isFunction(value) {
15
+ return typeof value === "function";
16
+ }
17
+ function callIfFn(value, ...args) {
18
+ if (isFunction(value)) {
19
+ return value(...args);
20
+ } else {
21
+ return value;
22
+ }
23
+ }
24
+
25
+ // src/utils/is-plain-object.ts
26
+ function isPlainObject(value) {
27
+ return Object.prototype.toString.call(value) === "[object Object]" && Object(value) === value;
28
+ }
29
+
30
+ // src/utils/flatten.ts
31
+ function flatten(value) {
32
+ const result = [];
33
+ function fn(o, parentKeys = []) {
34
+ for (const k in o) {
35
+ const v = o[k];
36
+ if (isPlainObject(v)) {
37
+ fn(v, [...parentKeys, k]);
38
+ } else if (Array.isArray(v)) {
39
+ fn(arrayToObject(v), [...parentKeys, k]);
40
+ } else {
41
+ result.push({
42
+ key: [...parentKeys, k],
43
+ value: v
44
+ });
45
+ }
46
+ }
47
+ }
48
+ fn(value);
49
+ return result;
50
+ }
51
+ function arrayToObject(array) {
52
+ return array.reduce((o, v, i) => {
53
+ o[i] = v;
54
+ return o;
55
+ }, {});
56
+ }
57
+
58
+ // src/utils/status-code-to-operation-error.ts
59
+ function statusCodeToOperationError(value, message) {
60
+ const e = ERROR_MAP[value] ? ERROR_MAP[value] : ERROR_MAP[500];
61
+ return {
62
+ name: e.name,
63
+ message: message ?? e.message
64
+ };
65
+ }
66
+ var ERROR_MAP = {
67
+ 400: { name: "HttpBadRequest", message: "Bad Request" },
68
+ 401: { name: "HttpUnauthorized", message: "Unauthorized" },
69
+ 403: { name: "HttpForbidden", message: "Forbidden" },
70
+ 404: { name: "HttpNotFound", message: "Not Found" },
71
+ 408: { name: "HttpRequestTimeout", message: "Request Timeout" },
72
+ 429: { name: "HttpTooManyRequests", message: "Too Many Requests" },
73
+ 500: { name: "HttpInternalServerError", message: "Internal Server Error" }
74
+ };
75
+
76
+ // src/utils/graphql-client.ts
77
+ var GraphQLClient = class {
78
+ url;
79
+ config;
80
+ constructor(url, config = {}) {
81
+ this.url = url;
82
+ this.config = config;
83
+ }
84
+ async request(query, variables, userOptions) {
85
+ const config = callIfFn(this.config);
86
+ const options = mergeFetchOptions(
87
+ {
88
+ ...config?.fetchOptions,
89
+ headers: new Headers(config?.fetchOptions?.headers)
90
+ },
91
+ userOptions
92
+ );
93
+ const body = JSON.stringify({
94
+ query,
95
+ variables
96
+ });
97
+ const headers = new Headers(options.headers);
98
+ headers.set("Content-Type", "application/json");
99
+ headers.set("Accept", "application/json");
100
+ const url = new URL(this.url);
101
+ const operationInfo = getOperationInfo(query);
102
+ if (operationInfo) {
103
+ url.searchParams.set(`_${operationInfo.type}`, operationInfo.name);
104
+ }
105
+ const req = await this.runMiddlewares(
106
+ new Request(url, {
107
+ ...options,
108
+ body,
109
+ headers,
110
+ method: "POST"
111
+ }),
112
+ config?.middlewares ?? []
113
+ );
114
+ return await this.exec(req);
115
+ }
116
+ /** Single file upload */
117
+ async upload(query, variables, options) {
118
+ const cfg = callIfFn(this.config);
119
+ const opts = mergeFetchOptions(
120
+ {
121
+ ...cfg?.fetchOptions,
122
+ headers: new Headers(cfg?.fetchOptions?.headers)
123
+ },
124
+ options
125
+ );
126
+ const body = this.createUploadBody(query, variables);
127
+ const headers = new Headers(opts.headers);
128
+ headers.delete("Content-Type");
129
+ const url = new URL(this.url);
130
+ const operationInfo = getOperationInfo(query);
131
+ if (operationInfo) {
132
+ url.searchParams.set(`_${operationInfo.type}`, operationInfo.name);
133
+ }
134
+ const req = await this.runMiddlewares(
135
+ new Request(url, {
136
+ ...opts,
137
+ body,
138
+ headers,
139
+ method: "POST"
140
+ }),
141
+ cfg?.middlewares ?? []
142
+ );
143
+ return await this.exec(req);
144
+ }
145
+ async exec(request) {
146
+ const config = callIfFn(this.config);
147
+ const fetch_ = config.fetch ?? fetch;
148
+ try {
149
+ const res = await fetch_(request);
150
+ if (!res.ok) {
151
+ return { ok: false, error: statusCodeToOperationError(res.status) };
152
+ }
153
+ const json = await res.json();
154
+ const data = json.data;
155
+ const error = json.errors?.at(0);
156
+ if (error) {
157
+ if (error.extensions?.code === "FORBIDDEN" || error.extensions?.code === "ACCESS_TOKEN_EXPIRED") {
158
+ return {
159
+ ok: false,
160
+ error: statusCodeToOperationError(403, error.message)
161
+ };
162
+ }
163
+ if (error.extensions?.code === "UNAUTHORIZED") {
164
+ return {
165
+ ok: false,
166
+ error: statusCodeToOperationError(401, error.message)
167
+ };
168
+ }
169
+ if (error.extensions?.code === "BAD_USER_INPUT" || error.extensions?.code === "BAD_REQUEST") {
170
+ return {
171
+ ok: false,
172
+ error: statusCodeToOperationError(400, error.message)
173
+ };
174
+ }
175
+ return {
176
+ ok: false,
177
+ error: statusCodeToOperationError(500, error.message)
178
+ };
179
+ }
180
+ return {
181
+ ok: true,
182
+ data
183
+ };
184
+ } catch {
185
+ return {
186
+ ok: false,
187
+ error: statusCodeToOperationError(500)
188
+ };
189
+ }
190
+ }
191
+ async runMiddlewares(req, middlewares) {
192
+ let result = req.clone();
193
+ for (const middleware of middlewares) {
194
+ result = await middleware(result);
195
+ }
196
+ return result;
197
+ }
198
+ createUploadBody(query, variables) {
199
+ const files = flatten(variables).filter(
200
+ (o) => o.value instanceof File || o.value instanceof Blob
201
+ );
202
+ const body = new FormData();
203
+ body.append(
204
+ "operations",
205
+ JSON.stringify({
206
+ query,
207
+ variables
208
+ })
209
+ );
210
+ const map = {};
211
+ files.forEach((o, i) => {
212
+ map[i.toString()] = [`variables.${o.key.join(".")}`];
213
+ });
214
+ body.append("map", JSON.stringify(map));
215
+ files.forEach((o, i) => {
216
+ body.append(i.toString(), o.value);
217
+ });
218
+ return body;
219
+ }
220
+ };
221
+ function getOperationInfo(query) {
222
+ const l = query.match(/(query|mutation)\s+(\w+)/);
223
+ if (!l) return null;
224
+ const k = l.at(1);
225
+ const v = l.at(2);
226
+ return k && v ? { type: k, name: v } : null;
227
+ }
228
+ function mergeFetchOptions(i, j) {
229
+ if (!i) return j ?? {};
230
+ if (!j) return i ?? {};
231
+ return {
232
+ ...i,
233
+ ...j,
234
+ headers: mergeHeaders(i.headers, j.headers)
235
+ };
236
+ }
237
+ function mergeHeaders(i, j) {
238
+ if (!i) return j;
239
+ if (!j) return i;
240
+ const h = new Headers();
241
+ new Headers(i).forEach((v, k) => h.append(k, v));
242
+ new Headers(j).forEach((v, k) => h.append(k, v));
243
+ return h;
244
+ }
245
+
246
+ exports.GraphQLClient = GraphQLClient;
247
+ exports.gql = gql;
248
+ //# sourceMappingURL=index.cjs.map
249
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/utils/gql.ts","../../src/utils/call-if-fn.ts","../../src/utils/is-plain-object.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,GAAG,CAAA;AAAA,IACH,GAAG,CAAA;AAAA,IAEH,OAAA,EAAS,YAAA,CAAa,CAAA,CAAE,OAAA,EAAS,EAAE,OAAO;AAAA,GAC3C;AACD;AAEA,SAAS,YAAA,CAAa,GAA4B,CAAA,EAA4B;AAC7E,EAAA,IAAI,CAAC,GAAG,OAAO,CAAA;AACf,EAAA,IAAI,CAAC,GAAG,OAAO,CAAA;AAEf,EAAA,MAAM,CAAA,GAAI,IAAI,OAAA,EAAQ;AAEtB,EAAA,IAAI,OAAA,CAAQ,CAAC,CAAA,CAAE,OAAA,CAAQ,CAAC,CAAA,EAAG,CAAA,KAAM,CAAA,CAAE,MAAA,CAAO,CAAA,EAAG,CAAC,CAAC,CAAA;AAC/C,EAAA,IAAI,OAAA,CAAQ,CAAC,CAAA,CAAE,OAAA,CAAQ,CAAC,CAAA,EAAG,CAAA,KAAM,CAAA,CAAE,MAAA,CAAO,CAAA,EAAG,CAAC,CAAC,CAAA;AAE/C,EAAA,OAAO,CAAA;AACR","file":"index.cjs","sourcesContent":["export function gql(strings: TemplateStringsArray, ...values: unknown[]) {\r\n\tlet result = '';\r\n\r\n\tfor (const [index, string] of strings.entries()) {\r\n\t\tconst value = values.at(index) ?? '';\r\n\r\n\t\tresult = `${result}${string}${value}`;\r\n\t}\r\n\r\n\treturn result.trim();\r\n}\r\n","function isFunction<Return, Args = never>(\r\n\tvalue: unknown | ((...args: Args[]) => Return),\r\n): value is (...args: Args[]) => Return {\r\n\treturn typeof value === 'function';\r\n}\r\n\r\nexport function callIfFn<Return, Args = never>(\r\n\tvalue: Return | ((...args: Args[]) => Return),\r\n\t...args: Args[]\r\n) {\r\n\tif (isFunction<Return, Args>(value)) {\r\n\t\treturn value(...args);\r\n\t} else {\r\n\t\treturn value;\r\n\t}\r\n}\r\n","export function isPlainObject(value: unknown): value is Record<string, any> {\r\n\treturn (\r\n\t\tObject.prototype.toString.call(value) === '[object Object]' &&\r\n\t\tObject(value) === value\r\n\t);\r\n}\r\n","import { isPlainObject } from './is-plain-object.js';\r\n\r\nexport function flatten(value: Record<string, any> | any[]) {\r\n\tconst result: {\r\n\t\tkey: string[];\r\n\t\tvalue: any;\r\n\t}[] = [];\r\n\r\n\tfunction fn(o: Record<string, any>, parentKeys: string[] = []) {\r\n\t\tfor (const k in o) {\r\n\t\t\tconst v = o[k];\r\n\r\n\t\t\tif (isPlainObject(v)) {\r\n\t\t\t\tfn(v, [...parentKeys, k]);\r\n\t\t\t} else if (Array.isArray(v)) {\r\n\t\t\t\tfn(arrayToObject(v), [...parentKeys, k]);\r\n\t\t\t} else {\r\n\t\t\t\tresult.push({\r\n\t\t\t\t\tkey: [...parentKeys, k],\r\n\t\t\t\t\tvalue: v,\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tfn(value);\r\n\r\n\treturn result;\r\n}\r\n\r\nfunction arrayToObject(array: unknown[]) {\r\n\treturn array.reduce<Record<string, any>>((o, v, i) => {\r\n\t\to[i] = v;\r\n\t\treturn o;\r\n\t}, {});\r\n}\r\n","import type { HttpError, OperationError } from '../types/index.js';\r\n\r\nexport function statusCodeToOperationError(\r\n\tvalue: number,\r\n\tmessage?: string,\r\n): OperationError<HttpError> {\r\n\tconst e = ERROR_MAP[value] ? ERROR_MAP[value] : ERROR_MAP[500];\r\n\r\n\treturn {\r\n\t\tname: e.name,\r\n\t\tmessage: message ?? e.message,\r\n\t};\r\n}\r\n\r\nconst ERROR_MAP: Record<number, OperationError<HttpError>> = {\r\n\t400: { name: 'HttpBadRequest', message: 'Bad Request' },\r\n\t401: { name: 'HttpUnauthorized', message: 'Unauthorized' },\r\n\t403: { name: 'HttpForbidden', message: 'Forbidden' },\r\n\t404: { name: 'HttpNotFound', message: 'Not Found' },\r\n\t408: { name: 'HttpRequestTimeout', message: 'Request Timeout' },\r\n\t429: { name: 'HttpTooManyRequests', message: 'Too Many Requests' },\r\n\t500: { name: 'HttpInternalServerError', message: 'Internal Server Error' },\r\n};\r\n","import type { GenericObject, OperationResult } from '../types/index.js';\r\nimport { callIfFn } from './call-if-fn.js';\r\nimport { flatten } from './flatten.js';\r\nimport { statusCodeToOperationError } from './status-code-to-operation-error.js';\r\n\r\ntype ModifiableKey =\r\n\t| 'mode'\r\n\t| 'cache'\r\n\t| 'signal'\r\n\t| 'headers'\r\n\t| 'integrity'\r\n\t| 'keepalive'\r\n\t| 'credentials';\r\n\r\ntype Modifiable = {\r\n\t[K in ModifiableKey]: Request[K];\r\n};\r\n\r\nexport interface ModifiedRequest\r\n\textends Readonly<Omit<Request, ModifiableKey>>,\r\n\t\tModifiable {}\r\n\r\nexport type GraphQLClientMiddleware = (\r\n\trequest: ModifiedRequest,\r\n) => ModifiedRequest | Promise<ModifiedRequest>;\r\n\r\nexport interface GraphQLClientFetchOptions\r\n\textends Omit<RequestInit, 'body' | 'method'> {}\r\n\r\nexport interface GraphQLClientConfig {\r\n\tfetch?: typeof globalThis.fetch | null;\r\n\tfetchOptions?: GraphQLClientFetchOptions;\r\n\tmiddlewares?: GraphQLClientMiddleware[];\r\n}\r\n\r\n/* ref: https://www.apollographql.com/docs/apollo-server/data/errors/#graphql_parse_failed */\r\ntype GraphQLErrorExtensionCode =\r\n\t| 'FORBIDDEN'\r\n\t| 'UNAUTHORIZED'\r\n\t| 'BAD_REQUEST'\r\n\t| 'BAD_USER_INPUT'\r\n\t| 'INTERNAL_SERVER_ERROR'\r\n\t| 'ACCESS_TOKEN_EXPIRED';\r\n\r\ninterface GraphQLErrorExtensions {\r\n\tcode: GraphQLErrorExtensionCode;\r\n\tstacktrace: string[];\r\n}\r\n\r\ninterface GraphQLErrorLocation {\r\n\tline: number;\r\n\tcolumn: number;\r\n}\r\n\r\ninterface GraphQLError {\r\n\tpath: string[];\r\n\tmessage?: string;\r\n\textensions?: GraphQLErrorExtensions;\r\n\tlocations: GraphQLErrorLocation[];\r\n}\r\n\r\ntype Getter<T> = () => T;\r\n\r\nexport class GraphQLClient {\r\n\tprivate url: string;\r\n\tprivate config: Getter<GraphQLClientConfig> | GraphQLClientConfig;\r\n\r\n\tconstructor(\r\n\t\turl: string,\r\n\t\tconfig: Getter<GraphQLClientConfig> | GraphQLClientConfig = {},\r\n\t) {\r\n\t\tthis.url = url;\r\n\t\tthis.config = config;\r\n\t}\r\n\r\n\tasync request<Data, Variables extends GenericObject = GenericObject>(\r\n\t\tquery: string,\r\n\t\tvariables?: Variables,\r\n\t\tuserOptions?: GraphQLClientFetchOptions,\r\n\t) {\r\n\t\tconst config = callIfFn(this.config);\r\n\t\tconst options = mergeFetchOptions(\r\n\t\t\t{\r\n\t\t\t\t...config?.fetchOptions,\r\n\t\t\t\theaders: new Headers(config?.fetchOptions?.headers),\r\n\t\t\t},\r\n\t\t\tuserOptions,\r\n\t\t);\r\n\r\n\t\tconst body = JSON.stringify({\r\n\t\t\tquery,\r\n\t\t\tvariables,\r\n\t\t});\r\n\r\n\t\tconst headers = new Headers(options.headers);\r\n\r\n\t\theaders.set('Content-Type', 'application/json');\r\n\t\theaders.set('Accept', 'application/json');\r\n\r\n\t\tconst url = new URL(this.url);\r\n\t\tconst operationInfo = getOperationInfo(query);\r\n\r\n\t\tif (operationInfo) {\r\n\t\t\turl.searchParams.set(`_${operationInfo.type}`, operationInfo.name);\r\n\t\t}\r\n\r\n\t\tconst req = await this.runMiddlewares(\r\n\t\t\tnew Request(url, {\r\n\t\t\t\t...options,\r\n\t\t\t\tbody,\r\n\t\t\t\theaders,\r\n\t\t\t\tmethod: 'POST',\r\n\t\t\t}),\r\n\t\t\tconfig?.middlewares ?? [],\r\n\t\t);\r\n\r\n\t\treturn await this.exec<Data>(req);\r\n\t}\r\n\r\n\t/** Single file upload */\r\n\tasync upload<Data, Variables extends GenericObject = GenericObject>(\r\n\t\tquery: string,\r\n\t\tvariables: Variables,\r\n\t\toptions?: GraphQLClientFetchOptions,\r\n\t) {\r\n\t\tconst cfg = callIfFn(this.config);\r\n\t\tconst opts = mergeFetchOptions(\r\n\t\t\t{\r\n\t\t\t\t...cfg?.fetchOptions,\r\n\t\t\t\theaders: new Headers(cfg?.fetchOptions?.headers),\r\n\t\t\t},\r\n\t\t\toptions,\r\n\t\t);\r\n\r\n\t\tconst body = this.createUploadBody(query, variables);\r\n\t\tconst headers = new Headers(opts.headers);\r\n\r\n\t\theaders.delete('Content-Type');\r\n\r\n\t\tconst url = new URL(this.url);\r\n\t\tconst operationInfo = getOperationInfo(query);\r\n\r\n\t\tif (operationInfo) {\r\n\t\t\turl.searchParams.set(`_${operationInfo.type}`, operationInfo.name);\r\n\t\t}\r\n\r\n\t\tconst req = await this.runMiddlewares(\r\n\t\t\tnew Request(url, {\r\n\t\t\t\t...opts,\r\n\t\t\t\tbody,\r\n\t\t\t\theaders,\r\n\t\t\t\tmethod: 'POST',\r\n\t\t\t}),\r\n\t\t\tcfg?.middlewares ?? [],\r\n\t\t);\r\n\r\n\t\treturn await this.exec<Data>(req);\r\n\t}\r\n\r\n\tprivate async exec<T>(request: Request): Promise<OperationResult<never, T>> {\r\n\t\tconst config = callIfFn(this.config);\r\n\r\n\t\tconst fetch_ = config.fetch ?? fetch;\r\n\r\n\t\ttry {\r\n\t\t\tconst res = await fetch_(request);\r\n\r\n\t\t\tif (!res.ok) {\r\n\t\t\t\treturn { ok: false, error: statusCodeToOperationError(res.status) };\r\n\t\t\t}\r\n\r\n\t\t\tconst json = await res.json();\r\n\t\t\tconst data = json.data;\r\n\t\t\tconst error = json.errors?.at(0) as GraphQLError | undefined;\r\n\r\n\t\t\tif (error) {\r\n\t\t\t\tif (\r\n\t\t\t\t\terror.extensions?.code === 'FORBIDDEN' ||\r\n\t\t\t\t\terror.extensions?.code === 'ACCESS_TOKEN_EXPIRED'\r\n\t\t\t\t) {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tok: false,\r\n\t\t\t\t\t\terror: statusCodeToOperationError(403, error.message),\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (error.extensions?.code === 'UNAUTHORIZED') {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tok: false,\r\n\t\t\t\t\t\terror: statusCodeToOperationError(401, error.message),\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (\r\n\t\t\t\t\terror.extensions?.code === 'BAD_USER_INPUT' ||\r\n\t\t\t\t\terror.extensions?.code === 'BAD_REQUEST'\r\n\t\t\t\t) {\r\n\t\t\t\t\treturn {\r\n\t\t\t\t\t\tok: false,\r\n\t\t\t\t\t\terror: statusCodeToOperationError(400, error.message),\r\n\t\t\t\t\t};\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Fallback for unknown error codes */\r\n\t\t\t\treturn {\r\n\t\t\t\t\tok: false,\r\n\t\t\t\t\terror: statusCodeToOperationError(500, error.message),\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\treturn {\r\n\t\t\t\tok: true,\r\n\t\t\t\tdata,\r\n\t\t\t};\r\n\t\t} catch {\r\n\t\t\treturn {\r\n\t\t\t\tok: false,\r\n\t\t\t\terror: statusCodeToOperationError(500),\r\n\t\t\t};\r\n\t\t}\r\n\t}\r\n\r\n\tprivate async runMiddlewares(\r\n\t\treq: ModifiedRequest,\r\n\t\tmiddlewares: GraphQLClientMiddleware[],\r\n\t): Promise<ModifiedRequest> {\r\n\t\tlet result = req.clone();\r\n\r\n\t\tfor (const middleware of middlewares) {\r\n\t\t\tresult = await middleware(result);\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}\r\n\r\n\tprivate createUploadBody<Variables extends GenericObject = GenericObject>(\r\n\t\tquery: string,\r\n\t\tvariables: Variables,\r\n\t) {\r\n\t\tconst files = flatten(variables).filter(\r\n\t\t\t(o) => o.value instanceof File || o.value instanceof Blob,\r\n\t\t);\r\n\r\n\t\tconst body = new FormData();\r\n\r\n\t\tbody.append(\r\n\t\t\t'operations',\r\n\t\t\tJSON.stringify({\r\n\t\t\t\tquery,\r\n\t\t\t\tvariables,\r\n\t\t\t}),\r\n\t\t);\r\n\r\n\t\tconst map: GenericObject = {};\r\n\r\n\t\tfiles.forEach((o, i) => {\r\n\t\t\tmap[i.toString()] = [`variables.${o.key.join('.')}`];\r\n\t\t});\r\n\r\n\t\tbody.append('map', JSON.stringify(map));\r\n\r\n\t\tfiles.forEach((o, i) => {\r\n\t\t\tbody.append(i.toString(), o.value);\r\n\t\t});\r\n\r\n\t\treturn body;\r\n\t}\r\n}\r\n\r\nfunction getOperationInfo(query: string) {\r\n\tconst l = query.match(/(query|mutation)\\s+(\\w+)/);\r\n\r\n\tif (!l) return null;\r\n\r\n\tconst k = l.at(1);\r\n\tconst v = l.at(2);\r\n\r\n\treturn k && v ? { type: k, name: v } : null;\r\n}\r\n\r\nfunction mergeFetchOptions(\r\n\ti: GraphQLClientFetchOptions | undefined,\r\n\tj: GraphQLClientFetchOptions | undefined,\r\n): GraphQLClientFetchOptions {\r\n\tif (!i) return j ?? {};\r\n\tif (!j) return i ?? {};\r\n\r\n\treturn {\r\n\t\t...i,\r\n\t\t...j,\r\n\r\n\t\theaders: mergeHeaders(i.headers, j.headers),\r\n\t};\r\n}\r\n\r\nfunction mergeHeaders(i: HeadersInit | undefined, j: HeadersInit | undefined) {\r\n\tif (!i) return j;\r\n\tif (!j) return i;\r\n\r\n\tconst h = new Headers();\r\n\r\n\tnew Headers(i).forEach((v, k) => h.append(k, v));\r\n\tnew Headers(j).forEach((v, k) => h.append(k, v));\r\n\r\n\treturn h;\r\n}\r\n"]}
@@ -0,0 +1,5 @@
1
+ export { b as GraphQLClient, e as GraphQLClientConfig, d as GraphQLClientFetchOptions, G as GraphQLClientMiddleware, M as ModifiedRequest } from '../graphql-client-Czq2Pigo.cjs';
2
+
3
+ declare function gql(strings: TemplateStringsArray, ...values: unknown[]): string;
4
+
5
+ export { gql };
@@ -0,0 +1,5 @@
1
+ export { b as GraphQLClient, e as GraphQLClientConfig, d as GraphQLClientFetchOptions, G as GraphQLClientMiddleware, M as ModifiedRequest } from '../graphql-client-Czq2Pigo.js';
2
+
3
+ declare function gql(strings: TemplateStringsArray, ...values: unknown[]): string;
4
+
5
+ export { gql };
@@ -0,0 +1,4 @@
1
+ export { GraphQLClient } from '../chunk-JTAO2DVT.js';
2
+ export { gql } from '../chunk-WVFSGB7Y.js';
3
+ //# sourceMappingURL=index.js.map
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@opexa/portal-sdk",
3
3
  "type": "module",
4
- "version": "0.59.48",
4
+ "version": "0.59.49",
5
5
  "main": "./dist/index.cjs",
6
6
  "files": [
7
7
  "dist",