@opexa/portal-components 0.0.100 → 0.0.102

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.
Files changed (78) hide show
  1. package/dist/components/Bonus/Bonus.client.js +1 -1
  2. package/dist/components/Cashback/Cashback.client.js +1 -1
  3. package/dist/components/GameLaunch/GameLaunch.lazy.js +1 -1
  4. package/dist/components/GamesSearch/GamesSearch.js +1 -1
  5. package/dist/components/Jackpots/JackpotsCarousel/JackpotsCarouselItem.js +5 -6
  6. package/dist/components/Jackpots/JackpotsList/JackpotsList.d.ts +3 -1
  7. package/dist/components/Jackpots/JackpotsList/JackpotsList.js +7 -7
  8. package/dist/components/Jackpots/JackpotsList/JackpotsListItemDesktop.js +6 -7
  9. package/dist/components/Jackpots/JackpotsList/JackpotsListItemGameProviders.js +8 -2
  10. package/dist/components/Jackpots/JackpotsList/JackpotsListItemMobile.js +4 -5
  11. package/dist/components/Jackpots/JackpotsList/useJackpotsListItemData.d.ts +0 -4
  12. package/dist/components/Jackpots/JackpotsList/useJackpotsListItemData.js +0 -23
  13. package/dist/components/KYC/BasicInformation.d.ts +1 -0
  14. package/dist/components/KYC/BasicInformation.js +12 -0
  15. package/dist/components/KYC/IdentityVerification.d.ts +1 -0
  16. package/dist/components/KYC/IdentityVerification.js +20 -0
  17. package/dist/components/KYC/Indicator.js +2 -3
  18. package/dist/components/KYC/KYC.d.ts +3 -1
  19. package/dist/components/KYC/KYC.js +2 -2
  20. package/dist/components/KYC/KYC.lazy.d.ts +5 -1
  21. package/dist/components/KYC/KYC.lazy.js +9 -13
  22. package/dist/components/KYC/PersonalInformation.d.ts +1 -0
  23. package/dist/components/KYC/PersonalInformation.js +20 -0
  24. package/dist/components/KYC/{Header.js → backup/Header.js} +4 -4
  25. package/dist/components/KYC/backup/Indicator.d.ts +1 -0
  26. package/dist/components/KYC/backup/Indicator.js +9 -0
  27. package/dist/components/KYC/backup/KYC.d.ts +1 -0
  28. package/dist/components/KYC/backup/KYC.js +14 -0
  29. package/dist/components/KYC/backup/KYC.lazy.d.ts +1 -0
  30. package/dist/components/KYC/backup/KYC.lazy.js +26 -0
  31. package/dist/components/KYC/backup/KYCContext.d.ts +2 -0
  32. package/dist/components/KYC/backup/KYCContext.js +2 -0
  33. package/dist/components/KYC/{Step1.js → backup/Step1.js} +4 -4
  34. package/dist/components/KYC/{Step2.js → backup/Step2.js} +4 -4
  35. package/dist/components/KYC/{Step3.js → backup/Step3.js} +4 -4
  36. package/dist/components/KYC/{Step4.js → backup/Step4.js} +3 -3
  37. package/dist/components/KYC/backup/useKYC.d.ts +10 -0
  38. package/dist/components/KYC/backup/useKYC.js +8 -0
  39. package/dist/components/KYC/useKYC.d.ts +5 -8
  40. package/dist/components/KYC/useKYC.js +3 -0
  41. package/dist/components/Promo/Promo.client.js +1 -1
  42. package/dist/components/Search/Search.lazy.js +1 -1
  43. package/dist/next.config.js +4 -0
  44. package/dist/styles/theme.css +3 -2
  45. package/dist/ui/Presence/index.d.ts +1 -0
  46. package/dist/ui/Presence/index.js +1 -0
  47. package/dist/ui/Prose/index.d.ts +1 -0
  48. package/dist/ui/Prose/index.js +1 -0
  49. package/package.json +1 -1
  50. package/dist/services/account.service.d.ts +0 -341
  51. package/dist/services/account.service.js +0 -233
  52. package/dist/services/auth.service.d.ts +0 -80
  53. package/dist/services/auth.service.js +0 -152
  54. package/dist/services/cmsPortal.service.d.ts +0 -43
  55. package/dist/services/cmsPortal.service.js +0 -148
  56. package/dist/services/file.service.d.ts +0 -33
  57. package/dist/services/file.service.js +0 -18
  58. package/dist/services/game.service.d.ts +0 -44
  59. package/dist/services/game.service.js +0 -33
  60. package/dist/services/portal.service.d.ts +0 -37
  61. package/dist/services/portal.service.js +0 -44
  62. package/dist/services/report.service.d.ts +0 -223
  63. package/dist/services/report.service.js +0 -72
  64. package/dist/services/trigger.service.d.ts +0 -94
  65. package/dist/services/trigger.service.js +0 -88
  66. package/dist/services/wallet.service.d.ts +0 -475
  67. package/dist/services/wallet.service.js +0 -365
  68. package/dist/utils/isMobile.d.ts +0 -5
  69. package/dist/utils/isMobile.js +0 -9
  70. /package/dist/components/KYC/{Header.d.ts → backup/Header.d.ts} +0 -0
  71. /package/dist/components/KYC/{Step1.d.ts → backup/Step1.d.ts} +0 -0
  72. /package/dist/components/KYC/{Step2.d.ts → backup/Step2.d.ts} +0 -0
  73. /package/dist/components/KYC/{Step3.d.ts → backup/Step3.d.ts} +0 -0
  74. /package/dist/components/KYC/{Step4.d.ts → backup/Step4.d.ts} +0 -0
  75. /package/dist/ui/{Presence.d.ts → Presence/Presence.d.ts} +0 -0
  76. /package/dist/ui/{Presence.js → Presence/Presence.js} +0 -0
  77. /package/dist/ui/{Prose.d.ts → Prose/Prose.d.ts} +0 -0
  78. /package/dist/ui/{Prose.js → Prose/Prose.js} +0 -0
@@ -1,18 +0,0 @@
1
- import { cache } from 'react';
2
- import { FILE_GRAPHQL_ENDPOINT } from '../constants/index.js';
3
- import { graphqlRequest, graphqlUpload, } from './graphqlRequest.js';
4
- import { FILE, UPLOAD_PRIVATE_IMAGE_FILE } from './queries.js';
5
- export const getFile = cache(async (id, options) => {
6
- const res = await graphqlRequest(FILE_GRAPHQL_ENDPOINT, FILE, { id }, options);
7
- return res.node ?? null;
8
- });
9
- export const uploadPrivateImageFile = async (input, options) => {
10
- const res = await graphqlUpload(FILE_GRAPHQL_ENDPOINT, UPLOAD_PRIVATE_IMAGE_FILE, { input }, options);
11
- if (res.uploadPrivateImageFile) {
12
- const error = new Error();
13
- error.name = res.uploadPrivateImageFile.name;
14
- error.message = res.uploadPrivateImageFile.message;
15
- Error.captureStackTrace?.(error, uploadPrivateImageFile);
16
- throw error;
17
- }
18
- };
@@ -1,44 +0,0 @@
1
- import type { Simplify } from 'type-fest';
2
- import type { GameSession, GameSession__Legacy } from '../types';
3
- import { type GraphQLRequestOptions } from './graphqlRequest';
4
- export interface GameSessionQuery__Legacy {
5
- node?: GameSession__Legacy | null;
6
- }
7
- export interface GameSessionQueryVariables__Legacy {
8
- id: string;
9
- }
10
- export declare const getGameSession__legacy: (id: string, options?: GraphQLRequestOptions) => Promise<GameSession | null>;
11
- export type CreateGameSessionError__Legacy = {
12
- name: 'GameDoesNotExistError';
13
- message: string;
14
- };
15
- export interface CreateGameSessionMutation__Legacy {
16
- createGameSession?: null | CreateGameSessionError__Legacy;
17
- }
18
- export interface CreateGameSessionMutationVariables__Legacy {
19
- input: {
20
- id: string;
21
- game: string;
22
- };
23
- }
24
- export type CreateGameSessionInput__Legacy = Simplify<CreateGameSessionMutationVariables__Legacy['input']>;
25
- export declare function createGameSession__legacy(input: CreateGameSessionInput__Legacy, options?: GraphQLRequestOptions): Promise<void>;
26
- export type EndGameSessionError = {
27
- name: 'GameSessionDoesNotExistError';
28
- message: string;
29
- } | {
30
- name: 'GameSessionAlreadyClosedError';
31
- message: string;
32
- } | {
33
- name: 'GameProviderError';
34
- message: string;
35
- };
36
- export interface EndGameSessionMutation__Legacy {
37
- endGameSession?: null | EndGameSessionError;
38
- }
39
- export interface EndGameSessionMutationVariables__Legacy {
40
- input: {
41
- id: string;
42
- };
43
- }
44
- export declare function endGameSession__legacy(id: string, options?: GraphQLRequestOptions): Promise<void>;
@@ -1,33 +0,0 @@
1
- import { cache } from 'react';
2
- import { GAME_GRAPHQL_ENDPOINT } from '../constants/index.js';
3
- import { graphqlRequest } from './graphqlRequest.js';
4
- import { CREATE_GAME_SESSION, END_GAME_SESSION__LEGACY, GAME_SESSION__LEGACY, } from './queries.js';
5
- export const getGameSession__legacy = cache(async (id, options) => {
6
- const res = await graphqlRequest(GAME_GRAPHQL_ENDPOINT, GAME_SESSION__LEGACY, { id }, options);
7
- if (!res.node)
8
- return null;
9
- return {
10
- ...res.node,
11
- game: res.node.game.id,
12
- };
13
- });
14
- export async function createGameSession__legacy(input, options) {
15
- const res = await graphqlRequest(GAME_GRAPHQL_ENDPOINT, CREATE_GAME_SESSION, { input }, options);
16
- if (res.createGameSession) {
17
- const error = new Error();
18
- error.name = res.createGameSession.name;
19
- error.message = res.createGameSession.message;
20
- Error.captureStackTrace?.(error, createGameSession__legacy);
21
- throw error;
22
- }
23
- }
24
- export async function endGameSession__legacy(id, options) {
25
- const res = await graphqlRequest(GAME_GRAPHQL_ENDPOINT, END_GAME_SESSION__LEGACY, { input: { id } }, options);
26
- if (res.endGameSession) {
27
- const error = new Error();
28
- error.name = res.endGameSession.name;
29
- error.message = res.endGameSession.message;
30
- Error.captureStackTrace?.(error, endGameSession__legacy);
31
- throw error;
32
- }
33
- }
@@ -1,37 +0,0 @@
1
- import type { Simplify } from 'type-fest';
2
- import type { GameType, LatestBetRecord, OnboardingPlayerExperience, OnboardingStatus, Platform, RecommendedGame, TopWin } from '../types';
3
- import { type GraphQLRequestOptions } from './graphqlRequest';
4
- export interface LatestBetRecordsQuery {
5
- latestBetRecords: LatestBetRecord[];
6
- }
7
- export declare const getLatestBetRecords: (options?: GraphQLRequestOptions) => Promise<LatestBetRecord[]>;
8
- export interface PlatformQuery extends Platform {
9
- }
10
- export declare const getPlatform: (options?: GraphQLRequestOptions) => Promise<PlatformQuery>;
11
- export interface RecommendedGamesQuery {
12
- recommendedGames: RecommendedGame[];
13
- }
14
- export declare const getRecommendedGames: (options?: GraphQLRequestOptions) => Promise<RecommendedGame[]>;
15
- export interface OnboardingStatusQuery {
16
- onboardingStatus?: OnboardingStatus | null;
17
- }
18
- export declare const getOnboardingStatus: (options?: GraphQLRequestOptions) => Promise<OnboardingStatus | null>;
19
- export interface CompleteOnboardingMutationVariables {
20
- input: {
21
- playerExperience: OnboardingPlayerExperience;
22
- favoriteGameTypes: GameType[];
23
- };
24
- }
25
- export interface CompleteOnboardingMutation {
26
- completeOnboarding: boolean;
27
- }
28
- export type CompleteOnboardingInput = Simplify<CompleteOnboardingMutationVariables['input']>;
29
- export declare const completeOnboarding: (input: CompleteOnboardingInput, options?: GraphQLRequestOptions) => Promise<void>;
30
- export interface SkipOnboardingMutation {
31
- skipOnboarding: boolean;
32
- }
33
- export declare const skipOnboarding: (options?: GraphQLRequestOptions) => Promise<void>;
34
- export interface TopWinsQuery {
35
- topWins: TopWin[];
36
- }
37
- export declare const getTopWins: (options?: GraphQLRequestOptions) => Promise<TopWin[]>;
@@ -1,44 +0,0 @@
1
- import { cache } from 'react';
2
- import { PORTAL_GRAPHQL_ENDPOINT } from '../constants/index.js';
3
- import { graphqlRequest } from './graphqlRequest.js';
4
- import { COMPLETE_ONBOARDING, LATEST_BET_RECORDS, ONBOARDING_STATUS, PLATFORM, RECOMMENDED_GAMES, SKIP_ONBOARDING, TOP_WINS, } from './queries.js';
5
- export const getLatestBetRecords = cache(async (options) => {
6
- const res = await graphqlRequest(PORTAL_GRAPHQL_ENDPOINT, LATEST_BET_RECORDS, undefined, options);
7
- return res.latestBetRecords;
8
- });
9
- export const getPlatform = cache(async (options) => {
10
- const res = await graphqlRequest(PORTAL_GRAPHQL_ENDPOINT, PLATFORM, undefined, options);
11
- return res;
12
- });
13
- export const getRecommendedGames = cache(async (options) => {
14
- const res = await graphqlRequest(PORTAL_GRAPHQL_ENDPOINT, RECOMMENDED_GAMES, undefined, options);
15
- return res.recommendedGames;
16
- });
17
- export const getOnboardingStatus = cache(async (options) => {
18
- const res = await graphqlRequest(PORTAL_GRAPHQL_ENDPOINT, ONBOARDING_STATUS, undefined, options);
19
- return res.onboardingStatus ?? null;
20
- });
21
- export const completeOnboarding = async (input, options) => {
22
- const res = await graphqlRequest(PORTAL_GRAPHQL_ENDPOINT, COMPLETE_ONBOARDING, { input }, options);
23
- if (!res.completeOnboarding) {
24
- const error = new Error();
25
- error.name = 'UnknownError';
26
- error.message = 'Something went wrong';
27
- Error.captureStackTrace?.(error, completeOnboarding);
28
- throw error;
29
- }
30
- };
31
- export const skipOnboarding = async (options) => {
32
- const res = await graphqlRequest(PORTAL_GRAPHQL_ENDPOINT, SKIP_ONBOARDING, undefined, options);
33
- if (!res.skipOnboarding) {
34
- const error = new Error();
35
- error.name = 'UnknownError';
36
- error.message = 'Something went wrong';
37
- Error.captureStackTrace?.(error, skipOnboarding);
38
- throw error;
39
- }
40
- };
41
- export const getTopWins = cache(async (options) => {
42
- const res = await graphqlRequest(PORTAL_GRAPHQL_ENDPOINT, TOP_WINS, undefined, options);
43
- return res.topWins;
44
- });
@@ -1,223 +0,0 @@
1
- import type { SimplifyDeep } from 'type-fest';
2
- import type { ActivityRecord, ActivityRecordType, BetRecord, BetRecordStatus, BooleanFilterField, DateFilterField, DepositRecord, DepositStatus, DepositType, EnumFilterField, GameProvider, GameType, Jackpot, JackpotCursor, JackpotPayout, JackpotPayoutCursor, JackpotStatus, NumberFilterField, ObjectIdFilterField, PaginatedQuery, PointsWalletTransaction, PointsWalletTransactionType, Referral, ReferralCommission, SortOrder, SpotBonusPromo, StringFilterField, Tournament, TournamentStatus, TournamentType, TransactionRecord, TransactionType, WithdrawalRecord, WithdrawalStatus, WithdrawalType } from '../types';
3
- import { type GraphQLRequestOptions } from './graphqlRequest';
4
- export type BetRecordsInput = SimplifyDeep<BetRecordsQueryVariables>;
5
- export interface BetRecordsQuery {
6
- member: PaginatedQuery<'betRecords', BetRecord>;
7
- }
8
- export interface BetRecordsQueryVariables {
9
- first?: number;
10
- after?: string;
11
- sort?: SortOrder;
12
- filter?: {
13
- game__type?: EnumFilterField<GameType>;
14
- game__provider?: EnumFilterField<GameProvider>;
15
- serialCode?: StringFilterField;
16
- dateTimeCreated?: DateFilterField;
17
- vendorRoundId?: StringFilterField;
18
- status?: EnumFilterField<BetRecordStatus>;
19
- };
20
- startDateTime?: DateFilterField;
21
- endDateTime?: DateFilterField;
22
- }
23
- export declare const getBetRecords: (input?: BetRecordsInput, options?: GraphQLRequestOptions) => Promise<import("../types").PaginatedQueryResult<BetRecord>>;
24
- export interface TransactionRecordsQuery {
25
- member: PaginatedQuery<'transactionRecords', TransactionRecord>;
26
- }
27
- export interface TransactionRecordsQueryVariables {
28
- first?: number;
29
- after?: string;
30
- filter?: {
31
- referenceNumber?: StringFilterField;
32
- type?: EnumFilterField<TransactionType>;
33
- dateTimeCreated?: DateFilterField;
34
- };
35
- }
36
- export type TransactionRecordsInput = SimplifyDeep<TransactionRecordsQueryVariables>;
37
- export declare const getTransactionRecords: (input?: TransactionRecordsInput, options?: GraphQLRequestOptions) => Promise<import("../types").PaginatedQueryResult<TransactionRecord>>;
38
- export interface WithdrawalRecordsQuery {
39
- member: PaginatedQuery<'withdrawalRecords', WithdrawalRecord>;
40
- }
41
- export interface WithdrawalRecordsQueryVariables {
42
- first?: number;
43
- after?: string;
44
- filter?: {
45
- id?: ObjectIdFilterField;
46
- type?: EnumFilterField<WithdrawalType>;
47
- status?: EnumFilterField<WithdrawalStatus>;
48
- reference?: StringFilterField;
49
- withdrawal?: ObjectIdFilterField;
50
- withdrawalNumber?: StringFilterField;
51
- dateTimeCreated?: DateFilterField;
52
- dateTimeLastUpdated?: DateFilterField;
53
- };
54
- }
55
- export type WithdrawalRecordsInput = SimplifyDeep<WithdrawalRecordsQueryVariables>;
56
- export declare const getWithdrawalRecords: (input?: WithdrawalRecordsInput, options?: GraphQLRequestOptions) => Promise<import("../types").PaginatedQueryResult<WithdrawalRecord>>;
57
- export interface DepositRecordsQuery {
58
- member: PaginatedQuery<'depositRecords', DepositRecord>;
59
- }
60
- export interface DepositRecordsQueryVariables {
61
- first?: number;
62
- after?: string;
63
- filter?: {
64
- id?: ObjectIdFilterField;
65
- type?: EnumFilterField<DepositType>;
66
- status?: EnumFilterField<DepositStatus>;
67
- deposit?: ObjectIdFilterField;
68
- depositNumber?: StringFilterField;
69
- reference?: StringFilterField;
70
- dateTimeCreated?: DateFilterField;
71
- dateTimeLastUpdated?: DateFilterField;
72
- };
73
- }
74
- export type DepositRecordsInput = SimplifyDeep<DepositRecordsQueryVariables>;
75
- export declare const getDepositRecords: (input?: DepositRecordsInput, options?: GraphQLRequestOptions) => Promise<import("../types").PaginatedQueryResult<DepositRecord>>;
76
- export interface DepositsCountQuery {
77
- member: {
78
- depositsCount: number;
79
- };
80
- }
81
- export declare const getDepositsCount: (options?: GraphQLRequestOptions) => Promise<number>;
82
- export interface PointsWalletTransactionsQueryVariables {
83
- first?: number;
84
- after?: string;
85
- filter?: {
86
- type?: EnumFilterField<PointsWalletTransactionType>;
87
- };
88
- }
89
- export interface PointsWalletTransactionsQuery {
90
- member: PaginatedQuery<'pointsWalletTransactions', PointsWalletTransaction>;
91
- }
92
- export type PointsWalletTransactionsInput = SimplifyDeep<PointsWalletTransactionsQueryVariables>;
93
- export declare const getPointsWalletTransactions: (input?: PointsWalletTransactionsInput, options?: GraphQLRequestOptions) => Promise<import("../types").PaginatedQueryResult<PointsWalletTransaction>>;
94
- export interface ActivityRecordsQuery {
95
- member: PaginatedQuery<'activityRecords', ActivityRecord>;
96
- }
97
- export interface ActivityRecordsQueryVariables {
98
- first?: number;
99
- after?: string;
100
- filter?: {
101
- type?: EnumFilterField<ActivityRecordType>;
102
- dateTimeCreated?: DateFilterField;
103
- };
104
- }
105
- export type ActivityRecordsInput = SimplifyDeep<ActivityRecordsQueryVariables>;
106
- export declare const getActivityRecords: (input?: ActivityRecordsInput, options?: GraphQLRequestOptions) => Promise<import("../types").PaginatedQueryResult<ActivityRecord>>;
107
- export interface ReferralsQuery {
108
- member: PaginatedQuery<'referrals', Referral>;
109
- }
110
- export interface ReferralsQueryVariables {
111
- first?: number;
112
- after?: string;
113
- filter?: {
114
- level?: NumberFilterField;
115
- upline?: ObjectIdFilterField;
116
- downline?: ObjectIdFilterField;
117
- };
118
- }
119
- export type ReferralsInput = SimplifyDeep<ReferralsQueryVariables>;
120
- export declare const getReferrals: (input?: ReferralsInput, options?: GraphQLRequestOptions) => Promise<import("../types").PaginatedQueryResult<Referral>>;
121
- export interface ReferralCommissionQuery {
122
- member: {
123
- referralCommission?: ReferralCommission | null;
124
- };
125
- }
126
- export declare const getReferralCommission: (options?: GraphQLRequestOptions) => Promise<ReferralCommission | null>;
127
- export interface UplinesByNameQuery {
128
- uplinesByName: Referral[];
129
- }
130
- export interface UplinesByNameQueryVariables {
131
- search: string;
132
- first?: number;
133
- }
134
- export type UplinesByNameInput = SimplifyDeep<UplinesByNameQueryVariables>;
135
- export declare const getUplinesByName: (input?: UplinesByNameInput, options?: GraphQLRequestOptions) => Promise<Referral[]>;
136
- export interface DownlinesByNameQueryVariables {
137
- search: string;
138
- first?: number;
139
- }
140
- export interface DownlinesByNameQuery {
141
- downlinesByName: Referral[];
142
- }
143
- export type DownlinesByNameInput = SimplifyDeep<DownlinesByNameQueryVariables>;
144
- export declare const getDownlinesByName: (input?: DownlinesByNameInput, options?: GraphQLRequestOptions) => Promise<Referral[]>;
145
- export interface PromoByCodeQueryVariables {
146
- code: string;
147
- }
148
- export interface PromoByCodeQuery {
149
- promoByCode: SpotBonusPromo;
150
- }
151
- export declare const getPromoByCode: (code: string, options?: GraphQLRequestOptions) => Promise<SpotBonusPromo>;
152
- export interface JackpotsQuery extends PaginatedQuery<'jackpots', Jackpot> {
153
- }
154
- export interface JackpotsQueryVariables {
155
- after?: string;
156
- first?: number;
157
- filter?: {
158
- id?: ObjectIdFilterField;
159
- name?: StringFilterField;
160
- status?: EnumFilterField<JackpotStatus>;
161
- drawing?: BooleanFilterField;
162
- deleted?: BooleanFilterField;
163
- };
164
- sort?: {
165
- order: SortOrder;
166
- cursor: JackpotCursor;
167
- };
168
- }
169
- export type JackpotsInput = SimplifyDeep<JackpotsQueryVariables>;
170
- export declare const getJackpots: (input?: JackpotsInput, options?: GraphQLRequestOptions) => Promise<import("../types").PaginatedQueryResult<Jackpot>>;
171
- export interface JackpotsCountQuery {
172
- jackpots: {
173
- totalCount: number;
174
- };
175
- }
176
- export interface JackpotsCountQueryVariables {
177
- filter?: JackpotsQueryVariables['filter'];
178
- }
179
- export type JackpotsCountInput = SimplifyDeep<JackpotsCountQueryVariables>;
180
- export declare const getJackpotsCount: (input?: JackpotsCountInput, options?: GraphQLRequestOptions) => Promise<number>;
181
- export interface JackpotPayoutsQuery extends PaginatedQuery<'jackpotPayouts', JackpotPayout> {
182
- }
183
- export interface JackpotPayoutsQueryVariables {
184
- after?: string;
185
- first?: number;
186
- filter?: {
187
- id?: ObjectIdFilterField;
188
- member?: ObjectIdFilterField;
189
- jackpot?: ObjectIdFilterField;
190
- dateTimeCreated?: DateFilterField;
191
- };
192
- sort?: {
193
- order: SortOrder;
194
- cursor: JackpotPayoutCursor;
195
- };
196
- }
197
- export type JackpotPayoutsInput = SimplifyDeep<JackpotPayoutsQueryVariables>;
198
- export declare const getJackpotPayouts: (input?: JackpotPayoutsInput, options?: GraphQLRequestOptions) => Promise<import("../types").PaginatedQueryResult<JackpotPayout>>;
199
- export interface TournamentsQuery extends PaginatedQuery<'tournaments', Tournament> {
200
- }
201
- export interface TournamentsQueryVariables {
202
- after?: string;
203
- first?: number;
204
- filter?: {
205
- id?: ObjectIdFilterField;
206
- type?: EnumFilterField<TournamentType>;
207
- status?: EnumFilterField<TournamentStatus>;
208
- activationStartDateTime?: DateFilterField;
209
- activationEndDateTime?: DateFilterField;
210
- };
211
- }
212
- export type TournamentsInput = SimplifyDeep<TournamentsQueryVariables>;
213
- export declare const getTournaments: (input?: TournamentsInput, options?: GraphQLRequestOptions) => Promise<import("../types").PaginatedQueryResult<Tournament>>;
214
- export interface TournamentsCountQuery {
215
- tournaments: {
216
- totalCount: number;
217
- };
218
- }
219
- export interface TournamentsCountQueryVariables {
220
- filter?: TournamentsQueryVariables['filter'];
221
- }
222
- export type TournamentsCountInput = SimplifyDeep<TournamentsCountQueryVariables>;
223
- export declare const getTournamentsCount: (input?: TournamentsCountInput, options?: GraphQLRequestOptions) => Promise<number>;
@@ -1,72 +0,0 @@
1
- import { cache } from 'react';
2
- import { REPORT_GRAPHQL_ENDPOINT } from '../constants/index.js';
3
- import { graphqlRequest } from './graphqlRequest.js';
4
- import { ACTIVITY_RECORDS, BET_RECORDS, DEPOSIT_RECORDS, DEPOSITS_COUNT, DOWNLINES_BY_NAME, JACKPOT_PAYOUTS, JACKPOTS, JACKPOTS_COUNT, POINTS_WALLET_TRANSACTIONS, PROMO_BY_CODE, REFERRAL_COMMISSION, REFERRALS, TOURNAMENTS, TOURNAMENTS_COUNT, TRANSACTION_RECORDS, UPLINES_BY_NAME, WITHDRAWAL_RECORDS, } from './queries.js';
5
- export const getBetRecords = cache(async (input, options) => {
6
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, BET_RECORDS, input, options);
7
- return res.member.betRecords;
8
- });
9
- export const getTransactionRecords = cache(async (input, options) => {
10
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, TRANSACTION_RECORDS, input, options);
11
- return res.member.transactionRecords;
12
- });
13
- export const getWithdrawalRecords = cache(async (input, options) => {
14
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, WITHDRAWAL_RECORDS, input, options);
15
- return res.member.withdrawalRecords;
16
- });
17
- export const getDepositRecords = cache(async (input, options) => {
18
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, DEPOSIT_RECORDS, input, options);
19
- return res.member.depositRecords;
20
- });
21
- export const getDepositsCount = cache(async (options) => {
22
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, DEPOSITS_COUNT, undefined, options);
23
- return res.member.depositsCount;
24
- });
25
- export const getPointsWalletTransactions = cache(async (input, options) => {
26
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, POINTS_WALLET_TRANSACTIONS, input, options);
27
- return res.member.pointsWalletTransactions;
28
- });
29
- export const getActivityRecords = cache(async (input, options) => {
30
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, ACTIVITY_RECORDS, input, options);
31
- return res.member.activityRecords;
32
- });
33
- export const getReferrals = cache(async (input, options) => {
34
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, REFERRALS, input, options);
35
- return res.member.referrals;
36
- });
37
- export const getReferralCommission = cache(async (options) => {
38
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, REFERRAL_COMMISSION, undefined, options);
39
- return res.member.referralCommission ?? null;
40
- });
41
- export const getUplinesByName = cache(async (input, options) => {
42
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, UPLINES_BY_NAME, input, options);
43
- return res.uplinesByName;
44
- });
45
- export const getDownlinesByName = cache(async (input, options) => {
46
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, DOWNLINES_BY_NAME, input, options);
47
- return res.downlinesByName;
48
- });
49
- export const getPromoByCode = cache(async (code, options) => {
50
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, PROMO_BY_CODE, { code }, options);
51
- return res.promoByCode;
52
- });
53
- export const getJackpots = cache(async (input, options) => {
54
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, JACKPOTS, input, options);
55
- return res.jackpots;
56
- });
57
- export const getJackpotsCount = cache(async (input, options) => {
58
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, JACKPOTS_COUNT, input, options);
59
- return res.jackpots.totalCount ?? 0;
60
- });
61
- export const getJackpotPayouts = cache(async (input, options) => {
62
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, JACKPOT_PAYOUTS, input, options);
63
- return res.jackpotPayouts;
64
- });
65
- export const getTournaments = cache(async (input, options) => {
66
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, TOURNAMENTS, input, options);
67
- return res.tournaments;
68
- });
69
- export const getTournamentsCount = cache(async (input, options) => {
70
- const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, TOURNAMENTS_COUNT, input, options);
71
- return res.tournaments.totalCount ?? 0;
72
- });
@@ -1,94 +0,0 @@
1
- import type { Simplify, SimplifyDeep } from 'type-fest';
2
- import type { BooleanFilterField, FCMDeviceType, Message, PaginatedQuery, Quest } from '../types';
3
- import { type GraphQLRequestOptions } from './graphqlRequest';
4
- export interface MessagesQueryVariables {
5
- first?: number;
6
- after?: string;
7
- filter?: {
8
- popup?: BooleanFilterField;
9
- markedAsRead?: BooleanFilterField;
10
- };
11
- }
12
- export interface MessagesQuery extends PaginatedQuery<'messages', Message> {
13
- }
14
- export interface MessagesInput extends SimplifyDeep<MessagesQueryVariables> {
15
- }
16
- export declare const getMessages: (input?: MessagesInput, options?: GraphQLRequestOptions) => Promise<import("../types").PaginatedQueryResult<Message>>;
17
- export interface UnreadMessagesCountQuery {
18
- messages: {
19
- totalCount: number;
20
- };
21
- }
22
- export interface UnreadMessagesCountQueryVariables {
23
- filter?: {
24
- popup?: BooleanFilterField;
25
- };
26
- }
27
- export type UnreadMessagesCountInput = SimplifyDeep<UnreadMessagesCountQueryVariables>;
28
- export declare const getUnreadMessagesCount: (input?: UnreadMessagesCountInput, options?: GraphQLRequestOptions) => Promise<number>;
29
- export interface MarkMessageAsReadMutationVariables {
30
- id: string;
31
- }
32
- export interface MarkMessageAsReadMutation {
33
- markMessageAsRead: boolean;
34
- }
35
- export declare const markMessageAsRead: (id: string, options?: GraphQLRequestOptions) => Promise<void>;
36
- export interface MarkAllMessagesAsReadMutation {
37
- markAllMessagesAsRead: boolean;
38
- }
39
- export declare const markAllMessagesAsRead: (options?: GraphQLRequestOptions) => Promise<void>;
40
- export interface ClaimRewardMutationVariables {
41
- id: string;
42
- }
43
- export type ClaimRewardError = {
44
- name: 'RewardAlreadyClaimedError';
45
- message: string;
46
- } | {
47
- name: 'RewardAlreadyExpiredError';
48
- message: string;
49
- };
50
- export interface ClaimRewardMutation {
51
- claimReward?: null | ClaimRewardError;
52
- }
53
- export declare const claimReward: (id: string, options?: GraphQLRequestOptions) => Promise<void>;
54
- export interface AvailableQuestsQuery {
55
- availableQuests: Quest[];
56
- }
57
- export declare const getAvailableQuests: (options?: GraphQLRequestOptions) => Promise<Quest[]>;
58
- export interface AvailableQuestsIdsQuery {
59
- availableQuests: {
60
- id: string;
61
- }[];
62
- }
63
- export declare const getAvailableQuestsCount: (options?: GraphQLRequestOptions) => Promise<number>;
64
- export interface CheckInDailyCheckInQuestMutation {
65
- checkInDailyCheckInQuest: boolean;
66
- }
67
- export interface CheckInDailyCheckInQuestMutationVariables {
68
- input: {
69
- id: string;
70
- };
71
- }
72
- export declare const checkInDailyCheckInQuest: (id: string, options?: GraphQLRequestOptions) => Promise<void>;
73
- export interface RegisterFCMDeviceMutationVariables {
74
- input: {
75
- type: FCMDeviceType;
76
- token: string;
77
- };
78
- }
79
- export interface RegisterFCMDeviceMutation {
80
- registerFCMDevice: boolean;
81
- }
82
- export type RegisterFCMDeviceInput = Simplify<RegisterFCMDeviceMutationVariables['input']>;
83
- export declare const registerFCMDevice: (input: RegisterFCMDeviceInput, options?: GraphQLRequestOptions) => Promise<void>;
84
- export interface UnregisterFCMDeviceMutationVariables {
85
- input: {
86
- type: FCMDeviceType;
87
- token: string;
88
- };
89
- }
90
- export interface UnregisterFCMDeviceMutation {
91
- unregisterFCMDevice: boolean;
92
- }
93
- export type UnregisterFCMDeviceInput = Simplify<UnregisterFCMDeviceMutationVariables['input']>;
94
- export declare const unregisterFCMDevice: (input: UnregisterFCMDeviceInput, options?: GraphQLRequestOptions) => Promise<void>;
@@ -1,88 +0,0 @@
1
- import { cache } from 'react';
2
- import { TRIGGER_GRAPHQL_ENDPOINT } from '../constants/index.js';
3
- import { graphqlRequest } from './graphqlRequest.js';
4
- import { AVAILABLE_QUESTS, AVAILABLE_QUESTS_IDS, CHECK_IN_DAILY_QUEST, CLAIM_REWARD, MARK_ALL_MESSAGES_AS_READ, MARK_MESSAGE_AS_READ, MESSAGES, REGISTER_FCM_DEVICE, UNREAD_MESSAGES_COUNT, UNREGISTER_FCM_DEVICE, } from './queries.js';
5
- export const getMessages = cache(async (input, options) => {
6
- const res = await graphqlRequest(TRIGGER_GRAPHQL_ENDPOINT, MESSAGES, input, options);
7
- return res.messages;
8
- });
9
- export const getUnreadMessagesCount = cache(async (input, options) => {
10
- const res = await graphqlRequest(TRIGGER_GRAPHQL_ENDPOINT, UNREAD_MESSAGES_COUNT, {
11
- ...input,
12
- filter: {
13
- ...input?.filter,
14
- markedAsRead: {
15
- equal: false,
16
- },
17
- },
18
- }, options);
19
- return res.messages.totalCount ?? 0;
20
- });
21
- export const markMessageAsRead = async (id, options) => {
22
- const res = await graphqlRequest(TRIGGER_GRAPHQL_ENDPOINT, MARK_MESSAGE_AS_READ, { id }, options);
23
- if (!res.markMessageAsRead) {
24
- const error = new Error();
25
- error.name = 'UnknownError';
26
- error.message = 'Something went wrong.';
27
- Error.captureStackTrace?.(error, markMessageAsRead);
28
- throw error;
29
- }
30
- };
31
- export const markAllMessagesAsRead = async (options) => {
32
- const res = await graphqlRequest(TRIGGER_GRAPHQL_ENDPOINT, MARK_ALL_MESSAGES_AS_READ, undefined, options);
33
- if (!res.markAllMessagesAsRead) {
34
- const error = new Error();
35
- error.name = 'UnknownError';
36
- error.message = 'Something went wrong.';
37
- Error.captureStackTrace?.(error, markAllMessagesAsRead);
38
- throw error;
39
- }
40
- };
41
- export const claimReward = async (id, options) => {
42
- const res = await graphqlRequest(TRIGGER_GRAPHQL_ENDPOINT, CLAIM_REWARD, { id }, options);
43
- if (res.claimReward) {
44
- const error = new Error();
45
- error.name = res.claimReward.name;
46
- error.message = res.claimReward.message;
47
- Error.captureStackTrace?.(error, claimReward);
48
- throw error;
49
- }
50
- };
51
- export const getAvailableQuests = cache(async (options) => {
52
- const res = await graphqlRequest(TRIGGER_GRAPHQL_ENDPOINT, AVAILABLE_QUESTS, undefined, options);
53
- return res.availableQuests;
54
- });
55
- export const getAvailableQuestsCount = cache(async (options) => {
56
- const res = await graphqlRequest(TRIGGER_GRAPHQL_ENDPOINT, AVAILABLE_QUESTS_IDS, undefined, options);
57
- return res.availableQuests.length ?? 0;
58
- });
59
- export const checkInDailyCheckInQuest = async (id, options) => {
60
- const res = await graphqlRequest(TRIGGER_GRAPHQL_ENDPOINT, CHECK_IN_DAILY_QUEST, { input: { id } }, options);
61
- if (!res.checkInDailyCheckInQuest) {
62
- const error = new Error();
63
- error.name = 'UnknownError';
64
- error.message = 'Something went wrong.';
65
- Error.captureStackTrace?.(error, checkInDailyCheckInQuest);
66
- throw error;
67
- }
68
- };
69
- export const registerFCMDevice = async (input, options) => {
70
- const res = await graphqlRequest(TRIGGER_GRAPHQL_ENDPOINT, REGISTER_FCM_DEVICE, { input }, options);
71
- if (!res.registerFCMDevice) {
72
- const error = new Error();
73
- error.name = 'UnknownError';
74
- error.message = 'Something went wrong.';
75
- Error.captureStackTrace?.(error, registerFCMDevice);
76
- throw error;
77
- }
78
- };
79
- export const unregisterFCMDevice = async (input, options) => {
80
- const res = await graphqlRequest(TRIGGER_GRAPHQL_ENDPOINT, UNREGISTER_FCM_DEVICE, { input }, options);
81
- if (!res.unregisterFCMDevice) {
82
- const error = new Error();
83
- error.name = 'UnknownError';
84
- error.message = 'Something went wrong.';
85
- Error.captureStackTrace?.(error, unregisterFCMDevice);
86
- throw error;
87
- }
88
- };