@opexa/portal-components 0.0.727 → 0.0.729
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/hooks/useJackpotsNextQuery.d.ts +3 -0
- package/dist/client/hooks/useJackpotsNextQuery.js +22 -0
- package/dist/components/Jackpots/Jackpots.js +13 -0
- package/dist/components/Jackpots/Jackpots.module.css +35 -0
- package/dist/components/Jackpots/JackpotsList/JackpotsList.d.ts +16 -0
- package/dist/components/Jackpots/JackpotsList/JackpotsList.js +7 -0
- package/dist/components/Jackpots/JackpotsListNext/JackpotMultiStageDesktop.d.ts +33 -0
- package/dist/components/Jackpots/JackpotsListNext/JackpotMultiStageDesktop.js +107 -0
- package/dist/components/Jackpots/JackpotsListNext/JackpotMultiStageMobile.d.ts +55 -0
- package/dist/components/Jackpots/JackpotsListNext/JackpotMultiStageMobile.js +136 -0
- package/dist/components/Jackpots/JackpotsListNext/JackpotsList.d.ts +106 -0
- package/dist/components/Jackpots/JackpotsListNext/JackpotsList.js +51 -0
- package/dist/components/Jackpots/JackpotsListNext/JackpotsListContext.d.ts +12 -0
- package/dist/components/Jackpots/JackpotsListNext/JackpotsListContext.js +3 -0
- package/dist/components/Jackpots/JackpotsListNext/JackpotsListItemDesktop.d.ts +43 -0
- package/dist/components/Jackpots/JackpotsListNext/JackpotsListItemDesktop.js +117 -0
- package/dist/components/Jackpots/JackpotsListNext/JackpotsListItemGameProviders.d.ts +5 -0
- package/dist/components/Jackpots/JackpotsListNext/JackpotsListItemGameProviders.js +54 -0
- package/dist/components/Jackpots/JackpotsListNext/JackpotsListItemMobile.d.ts +43 -0
- package/dist/components/Jackpots/JackpotsListNext/JackpotsListItemMobile.js +147 -0
- package/dist/components/Jackpots/JackpotsListNext/JackpotsListItemRules.d.ts +8 -0
- package/dist/components/Jackpots/JackpotsListNext/JackpotsListItemRules.js +15 -0
- package/dist/components/Jackpots/JackpotsListNext/useJackpotsListItemData.d.ts +20 -0
- package/dist/components/Jackpots/JackpotsListNext/useJackpotsListItemData.js +88 -0
- package/dist/components/KYC/KYCDefault/IdentityVerification.js +1 -1
- package/dist/components/KYC/KYCDefault/PersonalInformation.js +1 -1
- package/dist/icons/Flag05Icon.d.ts +2 -0
- package/dist/icons/Flag05Icon.js +4 -0
- package/dist/server/utils/prefetchJackpotsNextQuery.d.ts +2 -0
- package/dist/server/utils/prefetchJackpotsNextQuery.js +16 -0
- package/dist/services/queries.d.ts +2 -1
- package/dist/services/queries.js +60 -0
- package/dist/services/report.d.ts +21 -1
- package/dist/services/report.js +13 -1
- package/dist/types/index.d.ts +33 -0
- package/dist/ui/AlertDialog/AlertDialog.d.ts +55 -55
- package/dist/ui/AlertDialog/alertDialog.recipe.d.ts +5 -5
- package/dist/ui/Badge/Badge.d.ts +12 -12
- package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
- package/dist/ui/Badge/badge.recipe.d.ts +3 -3
- package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
- package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
- package/dist/ui/Combobox/Combobox.d.ts +42 -42
- package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
- package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
- package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
- package/dist/ui/Dialog/Dialog.d.ts +33 -33
- package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
- package/dist/ui/Drawer/Drawer.d.ts +33 -33
- package/dist/ui/Drawer/drawer.recipe.d.ts +3 -3
- package/dist/ui/Menu/Menu.d.ts +198 -198
- package/dist/ui/Menu/menu.recipe.d.ts +11 -11
- package/dist/ui/Popover/Popover.d.ts +55 -55
- package/dist/ui/Popover/popover.recipe.d.ts +5 -5
- package/dist/ui/Progress/Progress.d.ts +27 -27
- package/dist/ui/Progress/progress.recipe.d.ts +3 -3
- package/dist/ui/Select/Select.d.ts +45 -45
- package/dist/ui/Select/select.recipe.d.ts +3 -3
- package/dist/ui/Tabs/Tabs.d.ts +15 -15
- package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
- package/dist/ui/Tooltip/Tooltip.d.ts +30 -30
- package/dist/ui/Tooltip/tooltip.recipe.d.ts +5 -5
- package/dist/utils/queryKeys.d.ts +1 -0
- package/dist/utils/queryKeys.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useMemo } from 'react';
|
|
3
|
+
import { twMerge } from 'tailwind-merge';
|
|
4
|
+
import { useIntersectionObserver } from 'usehooks-ts';
|
|
5
|
+
import { useJackpotPayoutsQuery } from '../../../client/hooks/useJackpotPayoutsQuery.js';
|
|
6
|
+
import { useLocaleInfo } from '../../../client/hooks/useLocaleInfo.js';
|
|
7
|
+
import { GAME_PROVIDER_DATA } from '../../../constants/index.js';
|
|
8
|
+
import { ChevronLeftIcon } from '../../../icons/ChevronLeftIcon.js';
|
|
9
|
+
import { ChevronRightIcon } from '../../../icons/ChevronRightIcon.js';
|
|
10
|
+
import styles from '../Jackpots.module.css';
|
|
11
|
+
import { useJackpotsListItemContext, useJackpotsListPropsContext, } from './JackpotsListContext.js';
|
|
12
|
+
export function useJackpotsListItemData() {
|
|
13
|
+
const jackpotsListProps = useJackpotsListPropsContext();
|
|
14
|
+
const jackpot = useJackpotsListItemContext();
|
|
15
|
+
const gameProviders = Object.entries(jackpotsListProps.gameProviders ?? {}).map(([key, cfg]) => {
|
|
16
|
+
const id = key;
|
|
17
|
+
const base = GAME_PROVIDER_DATA[id];
|
|
18
|
+
return {
|
|
19
|
+
...base,
|
|
20
|
+
redirectUrl: cfg.redirectUrl,
|
|
21
|
+
providedLogo: cfg.image,
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
const [rootRef, inView] = useIntersectionObserver({
|
|
25
|
+
threshold: 0.25,
|
|
26
|
+
});
|
|
27
|
+
const jackpotPayoutsQuery = useJackpotPayoutsQuery({
|
|
28
|
+
first: 30,
|
|
29
|
+
filter: {
|
|
30
|
+
jackpot: {
|
|
31
|
+
equal: jackpot.id,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
}, {
|
|
35
|
+
enabled: typeof window !== 'undefined' && inView,
|
|
36
|
+
});
|
|
37
|
+
const jackpotPayouts = jackpotPayoutsQuery.data?.pages[0].edges.map((edge) => edge.node) ?? [];
|
|
38
|
+
const topJackpotPayout = jackpotPayouts[0] ?? [];
|
|
39
|
+
const enabledJackpotGameProviders = useMemo(() => {
|
|
40
|
+
const gameProvider = Object.entries(jackpot?.jackpotTurnoverContributionPercentagePerGameProvider ?? {})
|
|
41
|
+
.filter(([, value]) => Number(value) > 0)
|
|
42
|
+
.map(([key]) => key);
|
|
43
|
+
return gameProvider;
|
|
44
|
+
}, [jackpot]);
|
|
45
|
+
const filteredGameProviders = gameProviders.filter((provider) => enabledJackpotGameProviders.includes(provider.id));
|
|
46
|
+
const localeInfo = useLocaleInfo();
|
|
47
|
+
const isPayingOut = jackpot.drawing;
|
|
48
|
+
const jackpotAmount = jackpot.pool;
|
|
49
|
+
const Arrow = useCallback(({ index }) => {
|
|
50
|
+
const Icon = isPayingOut ? ChevronLeftIcon : ChevronRightIcon;
|
|
51
|
+
return (_jsx(Icon, { className: twMerge('min-w-2.5 scale-400 text-brand-300 lg:min-w-4 lg:scale-250', isPayingOut
|
|
52
|
+
? styles['animate-wave-color-error']
|
|
53
|
+
: styles['animate-wave-color-success']), style: {
|
|
54
|
+
animationDelay: isPayingOut
|
|
55
|
+
? `${(40 - index - 1) * 0.1}s`
|
|
56
|
+
: `${index * 0.1}s`,
|
|
57
|
+
} }));
|
|
58
|
+
}, [isPayingOut]);
|
|
59
|
+
const arrowImages = useMemo(() => Array.from({ length: 40 }, (_, i) => (_jsx(Arrow, { isFirst: i === 0, index: i }, i))), [Arrow]);
|
|
60
|
+
const getAccumulatingJackpotDescription = (part, total) => {
|
|
61
|
+
const percentage = total === 0 ? 0 : (part / total) * 100;
|
|
62
|
+
return percentage <= 90
|
|
63
|
+
? 'The jackpot is heating up! Keep playing to stay in the action and watch it grow!'
|
|
64
|
+
: '🔥 It’s about to pop! Stay in the game for your shot at the prize!';
|
|
65
|
+
};
|
|
66
|
+
const getTierFromName = (name) => {
|
|
67
|
+
const lowerName = name.toLowerCase();
|
|
68
|
+
if (lowerName.includes('grand'))
|
|
69
|
+
return 'grand';
|
|
70
|
+
if (lowerName.includes('major'))
|
|
71
|
+
return 'major';
|
|
72
|
+
if (lowerName.includes('minor'))
|
|
73
|
+
return 'minor';
|
|
74
|
+
return 'default';
|
|
75
|
+
};
|
|
76
|
+
return {
|
|
77
|
+
rootRef,
|
|
78
|
+
jackpotPayouts,
|
|
79
|
+
topJackpotPayout,
|
|
80
|
+
filteredGameProviders,
|
|
81
|
+
localeInfo,
|
|
82
|
+
isPayingOut,
|
|
83
|
+
jackpotAmount,
|
|
84
|
+
arrowImages,
|
|
85
|
+
getAccumulatingJackpotDescription,
|
|
86
|
+
getTierFromName,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
@@ -134,7 +134,7 @@ export function IdentityVerification() {
|
|
|
134
134
|
type: 'validate',
|
|
135
135
|
message: error.message,
|
|
136
136
|
});
|
|
137
|
-
} }), _jsx(Field.ErrorText, { children: o.fieldState.error?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-6", disabled: createPending || updatePending, children: "Continue" }), kyc.isSkippable && (_jsx(Button, { variant: "outline", colorScheme: "gray", className: "mt-lg", onClick: () => {
|
|
137
|
+
} }), _jsx(Field.ErrorText, { children: o.fieldState.error?.message })] })) }), _jsx(Button, { type: "submit", className: "mt-6", disabled: createPending || updatePending, children: "Continue" }), kyc.isSkippable && (_jsx(Button, { variant: "outline", colorScheme: "gray", className: "mt-lg", type: "button", onClick: () => {
|
|
138
138
|
globalStore.kyc.setOpen(false);
|
|
139
139
|
globalStore.kycReminder.setOpen(true);
|
|
140
140
|
}, children: "Skip for now" })), _jsx(Button, { className: "bg-transparent text-text-brand-primary-600", onClick: () => {
|
|
@@ -142,7 +142,7 @@ export function PersonalInformation() {
|
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
}, disabled: !permanentAddress, children: [_jsx(Checkbox.Control, { children: _jsx(Checkbox.Indicator, { asChild: true, children: _jsx(CheckIcon, {}) }) }), _jsx(Checkbox.Label, { children: "Use permanent address as current address" }), _jsx(Checkbox.HiddenInput, {})] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.sourceOfIncome, children: [_jsx(Field.Label, { children: "Source of income" }), _jsx(Field.Input, { placeholder: "Enter your source of income", ...form.register('sourceOfIncome') }), _jsx(Field.ErrorText, { children: form.formState.errors.sourceOfIncome?.message })] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.natureOfWork, children: [_jsx(Field.Label, { children: "Nature of Work" }), _jsx(Field.Input, { placeholder: "Enter your nature of work", ...form.register('natureOfWork') }), _jsx(Field.ErrorText, { children: form.formState.errors.natureOfWork?.message })] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.placeOfBirth, children: [_jsx(Field.Label, { children: "Place of birth" }), _jsx(Field.Input, { placeholder: "Enter your place of birth", ...form.register('placeOfBirth') }), _jsx(Field.ErrorText, { children: form.formState.errors.placeOfBirth?.message })] }), _jsxs(Field.Root, { className: "mt-2xl", invalid: !!form.formState.errors.nationality, children: [_jsx(Field.Label, { children: "Nationality" }), _jsx(Field.Input, { placeholder: "Enter your nationality", ...form.register('nationality') }), _jsx(Field.ErrorText, { children: form.formState.errors.nationality?.message })] }), _jsx(Button, { type: "submit", className: "mt-4xl", disabled: updateMemberVerificationMutation.isPending ||
|
|
145
|
-
createMemberVerificationMutation.isPending, children: "Continue" }), kyc.isSkippable && (_jsx(Button, { variant: "outline", colorScheme: "gray", className: "mt-lg", onClick: () => {
|
|
145
|
+
createMemberVerificationMutation.isPending, children: "Continue" }), kyc.isSkippable && (_jsx(Button, { variant: "outline", colorScheme: "gray", className: "mt-lg", type: "button", onClick: () => {
|
|
146
146
|
globalStore.kyc.setOpen(false);
|
|
147
147
|
globalStore.kycReminder.setOpen(true);
|
|
148
148
|
}, disabled: updateMemberVerificationMutation.isPending ||
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export function Flag05Icon(props) {
|
|
3
|
+
return (_jsx("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", ...props, children: _jsx("path", { d: "M14.111 6.722h6.03c.447 0 .67 0 .801.094a.5.5 0 0 1 .205.348c.019.16-.09.356-.307.747l-1.47 2.645c-.079.142-.118.213-.133.288a.5.5 0 0 0 0 .201c.015.075.054.146.133.288l1.47 2.645c.217.391.326.587.307.747a.5.5 0 0 1-.205.348c-.13.094-.354.094-.802.094h-7.596c-.56 0-.84 0-1.053-.11a1 1 0 0 1-.437-.436c-.11-.214-.11-.494-.11-1.054v-2.623M7.25 21.5 3.028 4.611m1.583 6.333h7.9c.56 0 .84 0 1.054-.109a1 1 0 0 0 .437-.437c.11-.213.11-.493.11-1.054V4.1c0-.56 0-.84-.11-1.054a1 1 0 0 0-.437-.437c-.214-.109-.494-.109-1.054-.109H4.55c-.698 0-1.048 0-1.286.145a1 1 0 0 0-.438.56c-.082.267.003.605.172 1.283z" }) }));
|
|
4
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { cache } from 'react';
|
|
2
|
+
import { getJackpotsNext } from '../../services/report.js';
|
|
3
|
+
import { getQueryClient } from '../../utils/getQueryClient.js';
|
|
4
|
+
import { log } from '../../utils/log.js';
|
|
5
|
+
import { getJackpotsNextQueryKey } from '../../utils/queryKeys.js';
|
|
6
|
+
export const prefetchJackpotsNextQuery = cache(async (input) => {
|
|
7
|
+
await getQueryClient()
|
|
8
|
+
.prefetchInfiniteQuery({
|
|
9
|
+
queryKey: getJackpotsNextQueryKey(input),
|
|
10
|
+
queryFn: async ({ signal }) => {
|
|
11
|
+
return await getJackpotsNext(input, { signal });
|
|
12
|
+
},
|
|
13
|
+
initialPageParam: undefined,
|
|
14
|
+
})
|
|
15
|
+
.catch(() => log.text("'prefetchJackpotsNextQuery' failed", 'error'));
|
|
16
|
+
});
|
|
@@ -122,8 +122,9 @@ export declare const AVAILABLE_QUEST_IDS = "\n query AvailableQuestIds {\n a
|
|
|
122
122
|
export declare const CHECK_IN_DAILY_QUEST = "\n mutation checkInDailyCheckInQuest($input: CheckInDailyCheckInQuestInput!) {\n checkInDailyCheckInQuest(input: $input)\n }\n";
|
|
123
123
|
export declare const TOP_WINS = "\n query TopWins($first: Int) {\n topWins(first: $first) {\n id\n game {\n id\n name\n type\n provider\n }\n member {\n id\n name\n }\n multiplier\n payout\n }\n }\n";
|
|
124
124
|
export declare const JACKPOTS = "\n query Jackpots(\n $first: Int\n $after: Cursor\n $sort: JackpotSortInput\n $filter: JackpotFilterInput\n ) {\n jackpots(first: $first, after: $after, sort: $sort, filter: $filter) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n node {\n ... on Jackpot {\n id\n name\n description\n pool\n status\n minimumJackpotPoolDrawingLimit\n maximumJackpotPoolLimit\n drawing\n minimumMultiplier\n minimumBet\n jackpotPayoutPercentage\n jackpotTurnoverContributionPercentagePerGameProvider\n totalPayout\n }\n }\n }\n }\n }\n";
|
|
125
|
+
export declare const JACKPOTS_NEXT = "\n query _Jackpots(\n $first: Int\n $after: Cursor\n $sort: JackpotSortInput\n $filter: JackpotFilterInput\n ) {\n _jackpots(first: $first, after: $after, sort: $sort, filter: $filter) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n node {\n ... on MultiplierJackpot {\n id\n name\n description\n pool\n status\n minimumJackpotPoolDrawingLimit\n maximumJackpotPoolLimit\n drawing\n minimumMultiplier\n minimumBet\n jackpotPayoutPercentage\n jackpotTurnoverContributionPercentagePerGameProvider\n totalPayout\n }\n ... on MultiStageJackpot{\n id\n name\n description\n status\n paused\n minimumBet\n activationDate\n deleted\n stage\n dateTimeCreated\n dateTimeLastUpdated\n jackpotTurnoverContributionPercentagePerGameProvider\n totalPayout\n totalTurnover\n stages {\n targetTurnover\n jackpotPayout\n member {\n name\n }\n dateTimeCompleted\n }\n }\n }\n }\n }\n }\n";
|
|
125
126
|
export declare const JACKPOTS_COUNT = "\n query JackpotsCount($filter: JackpotFilterInput) {\n jackpots(filter: $filter) {\n totalCount\n }\n }\n";
|
|
126
|
-
export declare const JACKPOT_PAYOUTS = "\n query JackpotPayouts(\n $first: Int\n $after: Cursor\n $sort: JackpotPayoutSortInput\n $filter: JackpotPayoutFilterInput\n ) {\n jackpotPayouts(first: $first, after: $after, sort: $sort, filter: $filter) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n node {\n ... on JackpotPayout {\n id\n member {\n id\n name\n }\n serialCode\n jackpot {\n id\n name\n }\n multiplier\n bet\n amount\n dateTimeCreated\n game {\n provider\n }\n }\n }\n }\n }\n }\n";
|
|
127
|
+
export declare const JACKPOT_PAYOUTS = "\n query JackpotPayouts(\n $first: Int\n $after: Cursor\n $sort: JackpotPayoutSortInput\n $filter: JackpotPayoutFilterInput\n ) {\n jackpotPayouts(first: $first, after: $after, sort: $sort, filter: $filter) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n node {\n ... on JackpotPayout {\n id\n member {\n id\n name\n }\n serialCode\n jackpot {\n id\n name\n }\n multiplier\n bet\n amount\n dateTimeCreated\n game {\n provider\n }\n stage\n }\n }\n }\n }\n }\n";
|
|
127
128
|
export declare const REGISTER_FCM_DEVICE = "\n mutation RegisterFCMDevice($input: RegisterFCMDeviceInput!) {\n registerFCMDevice(input: $input)\n }\n";
|
|
128
129
|
export declare const UNREGISTER_FCM_DEVICE = "\n mutation UnregisterFCMDevice($input: UnregisterFCMDeviceInput!) {\n unregisterFCMDevice(input: $input)\n }\n";
|
|
129
130
|
export declare const MARK_GAME_AS_FAVORITE = "\n mutation MarkGameAsFavorite($input: MarkGameAsFavoriteInput!) {\n markGameAsFavorite(input: $input)\n }\n";
|
package/dist/services/queries.js
CHANGED
|
@@ -2824,6 +2824,65 @@ export const JACKPOTS = /* GraphQL */ `
|
|
|
2824
2824
|
}
|
|
2825
2825
|
}
|
|
2826
2826
|
`;
|
|
2827
|
+
export const JACKPOTS_NEXT = /* GraphQL */ `
|
|
2828
|
+
query _Jackpots(
|
|
2829
|
+
$first: Int
|
|
2830
|
+
$after: Cursor
|
|
2831
|
+
$sort: JackpotSortInput
|
|
2832
|
+
$filter: JackpotFilterInput
|
|
2833
|
+
) {
|
|
2834
|
+
_jackpots(first: $first, after: $after, sort: $sort, filter: $filter) {
|
|
2835
|
+
totalCount
|
|
2836
|
+
pageInfo {
|
|
2837
|
+
hasNextPage
|
|
2838
|
+
endCursor
|
|
2839
|
+
}
|
|
2840
|
+
edges {
|
|
2841
|
+
node {
|
|
2842
|
+
... on MultiplierJackpot {
|
|
2843
|
+
id
|
|
2844
|
+
name
|
|
2845
|
+
description
|
|
2846
|
+
pool
|
|
2847
|
+
status
|
|
2848
|
+
minimumJackpotPoolDrawingLimit
|
|
2849
|
+
maximumJackpotPoolLimit
|
|
2850
|
+
drawing
|
|
2851
|
+
minimumMultiplier
|
|
2852
|
+
minimumBet
|
|
2853
|
+
jackpotPayoutPercentage
|
|
2854
|
+
jackpotTurnoverContributionPercentagePerGameProvider
|
|
2855
|
+
totalPayout
|
|
2856
|
+
}
|
|
2857
|
+
... on MultiStageJackpot{
|
|
2858
|
+
id
|
|
2859
|
+
name
|
|
2860
|
+
description
|
|
2861
|
+
status
|
|
2862
|
+
paused
|
|
2863
|
+
minimumBet
|
|
2864
|
+
activationDate
|
|
2865
|
+
deleted
|
|
2866
|
+
stage
|
|
2867
|
+
dateTimeCreated
|
|
2868
|
+
dateTimeLastUpdated
|
|
2869
|
+
jackpotTurnoverContributionPercentagePerGameProvider
|
|
2870
|
+
totalPayout
|
|
2871
|
+
totalTurnover
|
|
2872
|
+
stages {
|
|
2873
|
+
targetTurnover
|
|
2874
|
+
jackpotPayout
|
|
2875
|
+
member {
|
|
2876
|
+
name
|
|
2877
|
+
}
|
|
2878
|
+
dateTimeCompleted
|
|
2879
|
+
}
|
|
2880
|
+
}
|
|
2881
|
+
}
|
|
2882
|
+
}
|
|
2883
|
+
}
|
|
2884
|
+
}
|
|
2885
|
+
`;
|
|
2827
2886
|
export const JACKPOTS_COUNT = /* GraphQL */ `
|
|
2828
2887
|
query JackpotsCount($filter: JackpotFilterInput) {
|
|
2829
2888
|
jackpots(filter: $filter) {
|
|
@@ -2864,6 +2923,7 @@ export const JACKPOT_PAYOUTS = /* GraphQL */ `
|
|
|
2864
2923
|
game {
|
|
2865
2924
|
provider
|
|
2866
2925
|
}
|
|
2926
|
+
stage
|
|
2867
2927
|
}
|
|
2868
2928
|
}
|
|
2869
2929
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
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';
|
|
2
|
+
import type { _Jackpot, ActivityRecord, ActivityRecordType, BetRecord, BetRecordStatus, BooleanFilterField, DateFilterField, DepositRecord, DepositStatus, DepositType, EnumFilterField, GameProvider, GameType, Jackpot, JackpotCursor, JackpotPayout, JackpotPayoutCursor, JackpotStatus, JackpotType, NumberFilterField, ObjectIdFilterField, PaginatedQuery, PointsWalletTransaction, PointsWalletTransactionType, Referral, ReferralCommission, SortOrder, SpotBonusPromo, StringFilterField, Tournament, TournamentStatus, TournamentType, TransactionRecord, TransactionType, WithdrawalRecord, WithdrawalStatus, WithdrawalType } from '../types';
|
|
3
3
|
import { type GraphQLRequestOptions } from './graphqlRequest';
|
|
4
4
|
export type BetRecordsInput = SimplifyDeep<BetRecordsQueryVariables>;
|
|
5
5
|
export interface BetRecordsQuery {
|
|
@@ -151,6 +151,8 @@ export interface PromoByCodeQuery {
|
|
|
151
151
|
export declare const getPromoByCode: (code: string, options?: GraphQLRequestOptions) => Promise<SpotBonusPromo>;
|
|
152
152
|
export interface JackpotsQuery extends PaginatedQuery<'jackpots', Jackpot> {
|
|
153
153
|
}
|
|
154
|
+
export interface _JackpotsQuery extends PaginatedQuery<'_jackpots', _Jackpot> {
|
|
155
|
+
}
|
|
154
156
|
export interface JackpotsQueryVariables {
|
|
155
157
|
after?: string;
|
|
156
158
|
first?: number;
|
|
@@ -166,8 +168,26 @@ export interface JackpotsQueryVariables {
|
|
|
166
168
|
cursor: JackpotCursor;
|
|
167
169
|
};
|
|
168
170
|
}
|
|
171
|
+
export interface _JackpotsQueryVariables {
|
|
172
|
+
after?: string;
|
|
173
|
+
first?: number;
|
|
174
|
+
filter?: {
|
|
175
|
+
id?: ObjectIdFilterField;
|
|
176
|
+
name?: StringFilterField;
|
|
177
|
+
status?: EnumFilterField<JackpotStatus>;
|
|
178
|
+
type?: EnumFilterField<JackpotType>;
|
|
179
|
+
deleted?: BooleanFilterField;
|
|
180
|
+
paused?: BooleanFilterField;
|
|
181
|
+
};
|
|
182
|
+
sort?: {
|
|
183
|
+
order: SortOrder;
|
|
184
|
+
cursor: JackpotCursor;
|
|
185
|
+
};
|
|
186
|
+
}
|
|
169
187
|
export type JackpotsInput = SimplifyDeep<JackpotsQueryVariables>;
|
|
188
|
+
export type _JackpotsInput = SimplifyDeep<_JackpotsQueryVariables>;
|
|
170
189
|
export declare const getJackpots: (input?: JackpotsInput, options?: GraphQLRequestOptions) => Promise<import("../types").PaginatedQueryResult<Jackpot>>;
|
|
190
|
+
export declare const getJackpotsNext: (input?: _JackpotsInput, options?: GraphQLRequestOptions) => Promise<import("../types").PaginatedQueryResult<_Jackpot>>;
|
|
171
191
|
export interface JackpotsCountQuery {
|
|
172
192
|
jackpots: {
|
|
173
193
|
totalCount: number;
|
package/dist/services/report.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cache } from 'react';
|
|
2
2
|
import { REPORT_GRAPHQL_ENDPOINT } from '../constants/index.js';
|
|
3
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';
|
|
4
|
+
import { ACTIVITY_RECORDS, BET_RECORDS, DEPOSIT_RECORDS, DEPOSITS_COUNT, DOWNLINES_BY_NAME, JACKPOT_PAYOUTS, JACKPOTS, JACKPOTS_COUNT, JACKPOTS_NEXT, POINTS_WALLET_TRANSACTIONS, PROMO_BY_CODE, REFERRAL_COMMISSION, REFERRALS, TOURNAMENTS, TOURNAMENTS_COUNT, TRANSACTION_RECORDS, UPLINES_BY_NAME, WITHDRAWAL_RECORDS, } from './queries.js';
|
|
5
5
|
export const getBetRecords = cache(async (input, options) => {
|
|
6
6
|
const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, BET_RECORDS, input, options);
|
|
7
7
|
return res.member.betRecords;
|
|
@@ -62,6 +62,18 @@ export const getJackpots = cache(async (input, options) => {
|
|
|
62
62
|
});
|
|
63
63
|
return res.jackpots;
|
|
64
64
|
});
|
|
65
|
+
export const getJackpotsNext = cache(async (input, options) => {
|
|
66
|
+
const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, JACKPOTS_NEXT, input, {
|
|
67
|
+
cache: 'force-cache',
|
|
68
|
+
...options,
|
|
69
|
+
next: {
|
|
70
|
+
tags: ['jackpots', JSON.stringify(input)],
|
|
71
|
+
revalidate: 60,
|
|
72
|
+
...options?.next,
|
|
73
|
+
},
|
|
74
|
+
});
|
|
75
|
+
return res._jackpots;
|
|
76
|
+
});
|
|
65
77
|
export const getJackpotsCount = cache(async (input, options) => {
|
|
66
78
|
const res = await graphqlRequest(REPORT_GRAPHQL_ENDPOINT, JACKPOTS_COUNT, input, {
|
|
67
79
|
cache: 'force-cache',
|
package/dist/types/index.d.ts
CHANGED
|
@@ -783,6 +783,7 @@ export interface TopWin {
|
|
|
783
783
|
payout: string;
|
|
784
784
|
}
|
|
785
785
|
export type JackpotStatus = 'ACTIVE' | 'CLOSING' | 'DISABLED';
|
|
786
|
+
export type JackpotType = 'MULTIPLIER' | 'MULTI_STAGE';
|
|
786
787
|
export type JackpotCursor = 'POOL';
|
|
787
788
|
export type JackpotPayoutCursor = 'AMOUNT';
|
|
788
789
|
export interface Jackpot {
|
|
@@ -800,6 +801,38 @@ export interface Jackpot {
|
|
|
800
801
|
jackpotTurnoverContributionPercentagePerGameProvider: Partial<Record<GameProvider, string>>;
|
|
801
802
|
totalPayout: string;
|
|
802
803
|
}
|
|
804
|
+
export interface MultiStageJackpotStage {
|
|
805
|
+
targetTurnover: string;
|
|
806
|
+
jackpotPayout: string;
|
|
807
|
+
member: {
|
|
808
|
+
id: string;
|
|
809
|
+
name: string;
|
|
810
|
+
};
|
|
811
|
+
dateTimeCompleted: Date;
|
|
812
|
+
}
|
|
813
|
+
export interface _Jackpot {
|
|
814
|
+
id: string;
|
|
815
|
+
name: string;
|
|
816
|
+
pool: string;
|
|
817
|
+
description: string;
|
|
818
|
+
status: JackpotStatus;
|
|
819
|
+
minimumJackpotPoolDrawingLimit: string;
|
|
820
|
+
maximumJackpotPoolLimit: string;
|
|
821
|
+
drawing: boolean;
|
|
822
|
+
minimumMultiplier: string;
|
|
823
|
+
minimumBet: string;
|
|
824
|
+
jackpotPayoutPercentage: string;
|
|
825
|
+
jackpotTurnoverContributionPercentagePerGameProvider: Partial<Record<GameProvider, string>>;
|
|
826
|
+
totalPayout: string;
|
|
827
|
+
stage?: number;
|
|
828
|
+
stages?: MultiStageJackpotStage[];
|
|
829
|
+
deleted: boolean;
|
|
830
|
+
paused?: boolean;
|
|
831
|
+
totalTurnover: string;
|
|
832
|
+
activationDate?: Date;
|
|
833
|
+
dateTimeCreated: Date;
|
|
834
|
+
dateTimeLastUpdated: Date;
|
|
835
|
+
}
|
|
803
836
|
export interface JackpotPayout {
|
|
804
837
|
id: string;
|
|
805
838
|
member: {
|