@opexa/portal-components 0.0.520 → 0.0.521

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 (92) hide show
  1. package/dist/client/hooks/useAccountQuery.js +31 -1
  2. package/dist/client/services/refreshSession.d.ts +2 -0
  3. package/dist/client/services/refreshSession.js +17 -0
  4. package/dist/components/KYC/KYCReminder.lazy.js +24 -6
  5. package/dist/constants/EnvVar.d.ts +1 -1
  6. package/dist/handlers/deleteAccessTokenSession.d.ts +9 -0
  7. package/dist/handlers/deleteAccessTokenSession.js +9 -0
  8. package/dist/handlers/index.js +4 -0
  9. package/dist/ui/Badge/Badge.d.ts +12 -12
  10. package/dist/ui/Badge/badge.anatomy.d.ts +1 -1
  11. package/dist/ui/Badge/badge.recipe.d.ts +3 -3
  12. package/dist/ui/Carousel/Carousel.d.ts +72 -72
  13. package/dist/ui/Carousel/carousel.recipe.d.ts +8 -8
  14. package/dist/ui/Checkbox/Checkbox.d.ts +23 -23
  15. package/dist/ui/Checkbox/checkbox.recipe.d.ts +3 -3
  16. package/dist/ui/Clipboard/Clipboard.d.ts +18 -18
  17. package/dist/ui/Clipboard/clipboard.recipe.d.ts +3 -3
  18. package/dist/ui/Collapsible/Collapsible.d.ts +20 -20
  19. package/dist/ui/Collapsible/collapsible.recipe.d.ts +5 -5
  20. package/dist/ui/Combobox/Combobox.d.ts +42 -42
  21. package/dist/ui/Combobox/combobox.recipe.d.ts +3 -3
  22. package/dist/ui/DatePicker/DatePicker.d.ts +72 -72
  23. package/dist/ui/DatePicker/datePicker.recipe.d.ts +3 -3
  24. package/dist/ui/Dialog/Dialog.d.ts +33 -33
  25. package/dist/ui/Dialog/dialog.recipe.d.ts +3 -3
  26. package/dist/ui/Field/Field.d.ts +21 -21
  27. package/dist/ui/Field/field.recipe.d.ts +3 -3
  28. package/dist/ui/Menu/Menu.d.ts +198 -198
  29. package/dist/ui/Menu/menu.recipe.d.ts +11 -11
  30. package/dist/ui/NumberInput/NumberInput.d.ts +24 -24
  31. package/dist/ui/NumberInput/numberInput.recipe.d.ts +3 -3
  32. package/dist/ui/PasswordInput/PasswordInput.d.ts +18 -18
  33. package/dist/ui/PasswordInput/passwordInput.recipe.d.ts +3 -3
  34. package/dist/ui/PinInput/PinInput.d.ts +12 -12
  35. package/dist/ui/PinInput/pinInput.recipe.d.ts +3 -3
  36. package/dist/ui/Popover/Popover.d.ts +55 -55
  37. package/dist/ui/Popover/popover.recipe.d.ts +5 -5
  38. package/dist/ui/Progress/Progress.d.ts +27 -27
  39. package/dist/ui/Progress/progress.recipe.d.ts +3 -3
  40. package/dist/ui/QrCode/QrCode.d.ts +25 -25
  41. package/dist/ui/QrCode/qrCode.recipe.d.ts +5 -5
  42. package/dist/ui/SegmentGroup/SegmentGroup.d.ts +18 -18
  43. package/dist/ui/SegmentGroup/segmentGroup.recipe.d.ts +3 -3
  44. package/dist/ui/Select/Select.d.ts +45 -45
  45. package/dist/ui/Select/select.recipe.d.ts +3 -3
  46. package/dist/ui/Table/Table.d.ts +21 -21
  47. package/dist/ui/Table/table.anatomy.d.ts +1 -1
  48. package/dist/ui/Table/table.recipe.d.ts +3 -3
  49. package/dist/ui/Tabs/Tabs.d.ts +15 -15
  50. package/dist/ui/Tabs/tabs.recipe.d.ts +3 -3
  51. package/package.json +1 -1
  52. package/dist/components/Banner/Banner.client.d.ts +0 -12
  53. package/dist/components/Banner/Banner.client.js +0 -49
  54. package/dist/components/DigitainLauncher/Loading.d.ts +0 -1
  55. package/dist/components/DigitainLauncher/Loading.js +0 -5
  56. package/dist/components/KYC/BasicInformation.d.ts +0 -1
  57. package/dist/components/KYC/BasicInformation.js +0 -101
  58. package/dist/components/KYC/IdentityVerification.d.ts +0 -1
  59. package/dist/components/KYC/IdentityVerification.js +0 -120
  60. package/dist/components/KYC/Indicator.d.ts +0 -1
  61. package/dist/components/KYC/Indicator.js +0 -8
  62. package/dist/components/KYC/KYC.lazy.d.ts +0 -6
  63. package/dist/components/KYC/KYC.lazy.js +0 -45
  64. package/dist/components/KYC/KYCContext.d.ts +0 -6
  65. package/dist/components/KYC/KYCContext.js +0 -2
  66. package/dist/components/KYC/PersonalInformation.d.ts +0 -1
  67. package/dist/components/KYC/PersonalInformation.js +0 -122
  68. package/dist/components/KYC/useKYC.d.ts +0 -25
  69. package/dist/components/KYC/useKYC.js +0 -38
  70. package/dist/components/SessionWatcher/SessionWatcher.d.ts +0 -1
  71. package/dist/components/SessionWatcher/SessionWatcher.js +0 -20
  72. package/dist/components/SessionWatcher/index.d.ts +0 -1
  73. package/dist/components/SessionWatcher/index.js +0 -1
  74. package/dist/components/SignIn/utils.d.ts +0 -8
  75. package/dist/components/SignIn/utils.js +0 -26
  76. package/dist/constants/Branches.d.ts +0 -2
  77. package/dist/constants/Branches.js +0 -42
  78. package/dist/images/responsible-gaming-yellow.png +0 -0
  79. package/dist/third-parties/FacebookPixel/FacebookPixel.d.ts +0 -4
  80. package/dist/third-parties/FacebookPixel/FacebookPixel.js +0 -4
  81. package/dist/third-parties/FacebookPixel/api.d.ts +0 -0
  82. package/dist/third-parties/FacebookPixel/api.js +0 -1
  83. package/dist/third-parties/FacebookPixel/index.d.ts +0 -1
  84. package/dist/third-parties/FacebookPixel/index.js +0 -1
  85. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.d.ts +0 -4
  86. package/dist/third-parties/GoogleRecaptcha/GoogleRecaptcha.js +0 -4
  87. package/dist/third-parties/GoogleRecaptcha/api.d.ts +0 -0
  88. package/dist/third-parties/GoogleRecaptcha/api.js +0 -1
  89. package/dist/third-parties/GoogleRecaptcha/index.d.ts +0 -1
  90. package/dist/third-parties/GoogleRecaptcha/index.js +0 -1
  91. package/dist/third-parties/index.d.ts +0 -2
  92. package/dist/third-parties/index.js +0 -2
@@ -5,8 +5,16 @@ import { getQueryClient } from '../../utils/getQueryClient.js';
5
5
  import { getAccountQueryKey, getSessionQueryKey } from '../../utils/queryKeys.js';
6
6
  import { getSession } from '../services/getSession.js';
7
7
  import { useSessionQuery } from './useSessionQuery.js';
8
+ import { useFeatureFlag } from './useFeatureFlag.js';
9
+ import { useGlobalStore } from './useGlobalStore.js';
10
+ import { refreshSession } from '../services/refreshSession.js';
11
+ import { useShallow } from 'zustand/shallow';
8
12
  export const useAccountQuery = (config) => {
9
13
  const sessionQuery = useSessionQuery();
14
+ const globalStore = useGlobalStore(useShallow((ctx) => ({
15
+ kycReminder: ctx.kycReminder,
16
+ })));
17
+ const featureFlag = useFeatureFlag();
10
18
  const query = useQuery({
11
19
  ...config,
12
20
  enabled: config?.enabled === false
@@ -19,12 +27,34 @@ export const useAccountQuery = (config) => {
19
27
  queryFn: async () => getSession(),
20
28
  });
21
29
  invariant(session.status === 'authenticated');
22
- return await getMemberAccount({
30
+ const res = await getMemberAccount({
23
31
  signal,
24
32
  headers: {
25
33
  Authorization: `Bearer ${session.token}`,
26
34
  },
27
35
  });
36
+ if (res?.status === "ACTIVE" &&
37
+ res?.verificationStatus === "VERIFIED" &&
38
+ session.status === 'authenticated' &&
39
+ typeof window !== "undefined" &&
40
+ featureFlag.enabled) {
41
+ console.log("it works!");
42
+ globalStore.kycReminder.setOpen(false);
43
+ await refreshSession();
44
+ await getSession();
45
+ }
46
+ return res;
47
+ },
48
+ refetchOnMount: true,
49
+ refetchOnReconnect: true,
50
+ refetchOnWindowFocus: true,
51
+ refetchInterval: (query) => {
52
+ const data = query.state.data;
53
+ if (data?.status === "ACTIVE" &&
54
+ data?.verificationStatus === "VERIFIED") {
55
+ return false;
56
+ }
57
+ return 1500;
28
58
  },
29
59
  });
30
60
  return query;
@@ -0,0 +1,2 @@
1
+ import { type HttpRequestOptions } from '../../services/httpRequest';
2
+ export declare function refreshSession(options?: HttpRequestOptions): Promise<boolean>;
@@ -0,0 +1,17 @@
1
+ import { httpRequest, } from '../../services/httpRequest.js';
2
+ export async function refreshSession(options) {
3
+ try {
4
+ const res = await httpRequest.json('/api/refresh-sessions', {
5
+ ...options,
6
+ method: 'DELETE',
7
+ headers: {
8
+ 'Content-Type': 'application/json',
9
+ Accept: 'application/json',
10
+ },
11
+ });
12
+ return res.ok;
13
+ }
14
+ catch {
15
+ return false;
16
+ }
17
+ }
@@ -13,11 +13,25 @@ import responsibleGamingLogo from '../../images/responsible-gaming-gold.png';
13
13
  import { Button } from '../../ui/Button/index.js';
14
14
  import { Dialog } from '../../ui/Dialog/index.js';
15
15
  import { Portal } from '../../ui/Portal/index.js';
16
+ import { useSignOutMutation } from '../../client/hooks/useSignOutMutation.js';
17
+ import { useRouter } from 'next/navigation';
18
+ import { useFeatureFlag } from '../../client/hooks/useFeatureFlag.js';
16
19
  export function KYCReminder(props) {
20
+ const router = useRouter();
17
21
  const globalStore = useGlobalStore(useShallow((ctx) => ({
18
22
  kyc: ctx.kyc,
19
23
  kycReminder: ctx.kycReminder,
24
+ account: ctx.account,
25
+ account__mobile: ctx.account__mobile,
20
26
  })));
27
+ const signOutMutation = useSignOutMutation({
28
+ onSuccess() {
29
+ localStorage.clear();
30
+ sessionStorage.clear();
31
+ router.replace('/');
32
+ },
33
+ });
34
+ const featureFlag = useFeatureFlag();
21
35
  const { data: session, isLoading: sessionLoading } = useSessionQuery();
22
36
  const { data: account, isLoading: accountLoading } = useAccountQuery();
23
37
  const isVerificationLocked = account?.status === 'VERIFICATION_LOCKED';
@@ -37,19 +51,23 @@ export function KYCReminder(props) {
37
51
  (!isPending || isVerificationLocked) &&
38
52
  session?.status === 'authenticated', onOpenChange: (details) => {
39
53
  globalStore.kycReminder.setOpen(details.open);
40
- }, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto h-fit max-w-[calc(100dvw-1rem)] overflow-y-auto rounded-lg bg-bg-primary lg:max-w-[400px]", children: [isVerificationLocked && !isPending && (_jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto mb-4 w-fit rounded-full p-2", children: _jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "Temporarily Locked" }), _jsx("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: "Your account has been locked due to incomplete verification. Please complete your verification to restore full access." }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: props.pagcorLogo ?? pagcorLogo, alt: "PAGCOR logo", height: 43, width: 88, className: "h-[43px] w-auto shrink-0", draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: "h-[50px] w-auto shrink-0", draggable: false, unoptimized: true })] }), _jsx(Dialog.Context, { children: (api) => (_jsx("div", { className: "mt-6 space-y-lg", children: _jsx(Button, { onClick: () => {
54
+ }, closeOnEscape: false, closeOnInteractOutside: false, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(Dialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+3)]" }), _jsx(Dialog.Positioner, { className: "!z-[calc(var(--z-dialog)+4)] flex items-center justify-center", children: _jsxs(Dialog.Content, { className: "mx-auto h-fit max-w-[calc(100dvw-1rem)] overflow-y-auto rounded-lg bg-bg-primary lg:max-w-[400px]", children: [isVerificationLocked && !isPending && featureFlag.enabled && (_jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto mb-4 w-fit rounded-full p-2", children: _jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "Temporarily Locked" }), _jsx("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: "Your account has been locked due to incomplete verification. Please complete your verification to restore full access." }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: props.pagcorLogo ?? pagcorLogo, alt: "PAGCOR logo", height: 43, width: 88, className: "h-[43px] w-auto shrink-0", draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: "h-[50px] w-auto shrink-0", draggable: false, unoptimized: true })] }), _jsx(Dialog.Context, { children: (api) => (_jsx("div", { className: "mt-6 space-y-lg", children: _jsx(Button, { onClick: () => {
41
55
  api.setOpen(false);
42
56
  globalStore.kyc.setOpen(true);
43
57
  }, children: "Complete KYC" }) })) })] })), isNotVerified &&
44
58
  daysFromCreationToNow <= 3 &&
45
59
  daysFromCreationToNow >= 1 &&
46
- !isVerificationLocked && (_jsxs(_Fragment, { children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto mb-4 w-fit rounded-full bg-bg-primary p-2", children: _jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "JUST A FRIENDLY REMINDER" }), _jsxs("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: ["Please complete your KYC information within", ' ', _jsx("span", { className: "font-semibold text-[#FF0000]", children: "3 days" }), ' ', "to avoid temporary lock on your account."] }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: props.pagcorLogo ?? pagcorLogo, alt: "PAGCOR logo", height: 43, width: 88, className: "h-[43px] w-auto shrink-0", draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: "h-[50px] w-auto shrink-0", draggable: false, unoptimized: true })] }), _jsx(Dialog.Context, { children: (api) => (_jsx("div", { className: "mt-6 space-y-lg", children: _jsx(Button, { onClick: () => {
60
+ !isVerificationLocked &&
61
+ featureFlag.enabled && (_jsxs(_Fragment, { children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto mb-4 w-fit rounded-full bg-bg-primary p-2", children: _jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "JUST A FRIENDLY REMINDER" }), _jsxs("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: ["Please complete your KYC information within", ' ', _jsx("span", { className: "font-semibold text-[#FF0000]", children: "3 days" }), ' ', "to avoid temporary lock on your account."] }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: props.pagcorLogo ?? pagcorLogo, alt: "PAGCOR logo", height: 43, width: 88, className: "h-[43px] w-auto shrink-0", draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: "h-[50px] w-auto shrink-0", draggable: false, unoptimized: true })] }), _jsx(Dialog.Context, { children: (api) => (_jsx("div", { className: "mt-6 space-y-lg", children: _jsx(Button, { onClick: () => {
47
62
  api.setOpen(false);
48
63
  globalStore.kyc.setOpen(true);
49
- }, children: "Complete KYC" }) })) })] })] })), isNotVerified &&
50
- !(daysFromCreationToNow <= 3 && daysFromCreationToNow >= 1) &&
51
- !isVerificationLocked && (_jsxs(_Fragment, { children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto w-fit rounded-full bg-bg-primary p-2", children: _jsx(FileCheck02Icon, { className: "text-[#FEDF89]" }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "Personal Verification" }), _jsxs("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: ["All new users are required to complete identity verification to access the full range of ", props.siteName, ' ', "services, including withdrawals."] }), _jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "mt-3xl space-y-lg", children: [_jsx(Button, { onClick: () => {
64
+ }, children: "Complete KYC" }) })) })] })] })), (isNotVerified || isPending) && !featureFlag.enabled && (_jsxs(_Fragment, { children: [_jsx(Dialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto w-fit rounded-full bg-bg-primary p-2", children: _jsx(FileCheck02Icon, { className: "text-[#FEDF89]" }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "Personal Verification" }), _jsxs("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: ["All new users are required to complete identity verification to access the full range of ", props.siteName, ' ', "services, including withdrawals."] }), _jsx(Dialog.Context, { children: (api) => (_jsxs("div", { className: "mt-3xl space-y-lg", children: [_jsx(Button, { onClick: () => {
52
65
  api.setOpen(false);
53
66
  globalStore.kyc.setOpen(true);
54
- }, children: "Verify Now" }), _jsx(Button, { type: "button", variant: "outline", fullWidth: true, onClick: () => api.setOpen(false), children: "Do it later" })] })) })] })] })), isPending && (_jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto mb-4 w-fit rounded-full bg-bg-primary p-2", children: _jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }) }), _jsx("div", { className: "mx-auto w-fit rounded-full border border-[#F9DBAF] bg-[#FEF6EE] px-2.5 py-0.5 dark:border-[#932F19] dark:bg-[#511C10]", children: _jsx("p", { className: "font-medium text-[#B93815] text-sm dark:text-[#F7B27A]", children: "Pending..." }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "VERIFICATION IN PROGRESS" }), _jsx("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: "Your account is verification-locked. Please wait for approval to regain full access to this platform." }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: props.pagcorLogo ?? pagcorLogo, alt: "PAGCOR logo", height: 43, width: 88, className: "h-[43px] w-auto shrink-0", draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: "h-[50px] w-auto shrink-0", draggable: false, unoptimized: true })] })] }))] }) })] }) }));
67
+ }, children: "Verify Now" }), _jsx(Button, { type: "button", variant: "outline", fullWidth: true, onClick: () => api.setOpen(false), children: "Do it later" })] })) })] })] })), isPending && featureFlag.enabled && (_jsxs("div", { className: "p-3xl text-center", children: [_jsx("div", { className: "mx-auto mb-4 w-fit rounded-full bg-bg-primary p-2", children: _jsx(Image, { src: props.logo, alt: `${props.siteName} logo`, width: 200, height: 100, className: "mx-auto h-auto w-[120px]", draggable: false }) }), _jsx("h2", { className: `mt-4 font-semibold text-lg ${props.titleBgColor}`, children: "VERIFICATION IN PROGRESS" }), _jsx("p", { className: `mt-xs text-sm text-text-tertiary-600 ${props.descriptionBgColor}`, children: "Your account is verification-locked. Please wait for approval to regain full access to this platform." }), _jsxs("div", { className: "mt-6 flex w-full items-center justify-center gap-3xl", children: [_jsx(Image, { src: props.pagcorLogo ?? pagcorLogo, alt: "PAGCOR logo", height: 43, width: 88, className: "h-[43px] w-auto shrink-0", draggable: false, unoptimized: true }), _jsx(Image, { src: props.responsibleGamingLogo ?? responsibleGamingLogo, alt: "Responsible Gaming logo", height: 50, width: 186, className: "h-[50px] w-auto shrink-0", draggable: false, unoptimized: true })] }), _jsx(Dialog.Context, { children: (api) => (_jsx("div", { className: "mt-6 space-y-lg", children: _jsx(Button, { onClick: () => {
68
+ signOutMutation.mutate();
69
+ globalStore.account.setOpen(false);
70
+ globalStore.account__mobile.setOpen(false);
71
+ router.push('/');
72
+ }, children: "Log Out" }) })) })] }))] }) })] }) }));
55
73
  }
@@ -1,5 +1,5 @@
1
1
  export declare const SITE_ID: string;
2
2
  export declare const PLATFORM_ID: string;
3
3
  export declare const PLATFORM_CODE: string;
4
- export declare const ENVIRONMENT: "development" | "production";
4
+ export declare const ENVIRONMENT: "production" | "development";
5
5
  export declare const INTERNALS__REPORT_WEB_VITALS: boolean;
@@ -0,0 +1,9 @@
1
+ import { NextResponse, type NextRequest } from 'next/server';
2
+ export declare function deleteAccessTokenSession(request: NextRequest): Promise<NextResponse<{
3
+ ok: true;
4
+ data?: never;
5
+ } | {
6
+ ok: false;
7
+ message: string;
8
+ __error?: unknown;
9
+ }>>;
@@ -0,0 +1,9 @@
1
+ import { NextResponse } from 'next/server';
2
+ import { ACCESS_TOKEN_COOKIE_NAME, } from '../constants/index.js';
3
+ export async function deleteAccessTokenSession(request) {
4
+ const response = NextResponse.json({
5
+ ok: true,
6
+ });
7
+ response.cookies.delete(ACCESS_TOKEN_COOKIE_NAME);
8
+ return response;
9
+ }
@@ -1,5 +1,6 @@
1
1
  import { NextResponse } from 'next/server';
2
2
  import { deleteSession } from './deleteSession.js';
3
+ import { deleteAccessTokenSession } from './deleteAccessTokenSession.js';
3
4
  import { getHealthCheck } from './getHealthCheck.js';
4
5
  import { getSession } from './getSession.js';
5
6
  import { patchSession } from './patchSession.js';
@@ -22,6 +23,9 @@ export const DELETE = async (req, { params }) => {
22
23
  if (path === 'sessions') {
23
24
  return await deleteSession(req);
24
25
  }
26
+ if (path === 'refresh-sessions') {
27
+ return await deleteAccessTokenSession(req);
28
+ }
25
29
  return NextResponse.json({ ok: false, message: 'Not found' }, { status: 404 });
26
30
  };
27
31
  export const POST = async (req, { params }) => {
@@ -37,7 +37,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
37
37
  root: string;
38
38
  };
39
39
  };
40
- }, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, {
40
+ }, Record<"root" | "indicator" | "label" | "icon", string | string[]>, undefined, {
41
41
  size: {
42
42
  md: {
43
43
  root: string;
@@ -72,7 +72,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
72
72
  root: string;
73
73
  };
74
74
  };
75
- }, Record<"label" | "root" | "indicator" | "icon", string | string[]>, import("tailwind-variants").TVReturnType<{
75
+ }, Record<"root" | "indicator" | "label" | "icon", string | string[]>, import("tailwind-variants").TVReturnType<{
76
76
  size: {
77
77
  md: {
78
78
  root: string;
@@ -107,7 +107,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
107
107
  root: string;
108
108
  };
109
109
  };
110
- }, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
110
+ }, Record<"root" | "indicator" | "label" | "icon", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
111
111
  interface BadgeLabelProps extends ComponentPropsWithRef<'span'> {
112
112
  asChild?: boolean;
113
113
  }
@@ -146,7 +146,7 @@ export declare const Label: import("react").ComponentType<import("@ark-ui/react"
146
146
  root: string;
147
147
  };
148
148
  };
149
- }, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, {
149
+ }, Record<"root" | "indicator" | "label" | "icon", string | string[]>, undefined, {
150
150
  size: {
151
151
  md: {
152
152
  root: string;
@@ -181,7 +181,7 @@ export declare const Label: import("react").ComponentType<import("@ark-ui/react"
181
181
  root: string;
182
182
  };
183
183
  };
184
- }, Record<"label" | "root" | "indicator" | "icon", string | string[]>, import("tailwind-variants").TVReturnType<{
184
+ }, Record<"root" | "indicator" | "label" | "icon", string | string[]>, import("tailwind-variants").TVReturnType<{
185
185
  size: {
186
186
  md: {
187
187
  root: string;
@@ -216,7 +216,7 @@ export declare const Label: import("react").ComponentType<import("@ark-ui/react"
216
216
  root: string;
217
217
  };
218
218
  };
219
- }, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
219
+ }, Record<"root" | "indicator" | "label" | "icon", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
220
220
  interface BadgeIndicatorProps extends ComponentPropsWithRef<'svg'> {
221
221
  asChild?: boolean;
222
222
  }
@@ -255,7 +255,7 @@ export declare const Indicator: import("react").ComponentType<import("@ark-ui/re
255
255
  root: string;
256
256
  };
257
257
  };
258
- }, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, {
258
+ }, Record<"root" | "indicator" | "label" | "icon", string | string[]>, undefined, {
259
259
  size: {
260
260
  md: {
261
261
  root: string;
@@ -290,7 +290,7 @@ export declare const Indicator: import("react").ComponentType<import("@ark-ui/re
290
290
  root: string;
291
291
  };
292
292
  };
293
- }, Record<"label" | "root" | "indicator" | "icon", string | string[]>, import("tailwind-variants").TVReturnType<{
293
+ }, Record<"root" | "indicator" | "label" | "icon", string | string[]>, import("tailwind-variants").TVReturnType<{
294
294
  size: {
295
295
  md: {
296
296
  root: string;
@@ -325,7 +325,7 @@ export declare const Indicator: import("react").ComponentType<import("@ark-ui/re
325
325
  root: string;
326
326
  };
327
327
  };
328
- }, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
328
+ }, Record<"root" | "indicator" | "label" | "icon", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
329
329
  interface BadgeIconProps extends ComponentPropsWithRef<'svg'> {
330
330
  asChild?: boolean;
331
331
  }
@@ -364,7 +364,7 @@ export declare const Icon: import("react").ComponentType<import("@ark-ui/react")
364
364
  root: string;
365
365
  };
366
366
  };
367
- }, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, {
367
+ }, Record<"root" | "indicator" | "label" | "icon", string | string[]>, undefined, {
368
368
  size: {
369
369
  md: {
370
370
  root: string;
@@ -399,7 +399,7 @@ export declare const Icon: import("react").ComponentType<import("@ark-ui/react")
399
399
  root: string;
400
400
  };
401
401
  };
402
- }, Record<"label" | "root" | "indicator" | "icon", string | string[]>, import("tailwind-variants").TVReturnType<{
402
+ }, Record<"root" | "indicator" | "label" | "icon", string | string[]>, import("tailwind-variants").TVReturnType<{
403
403
  size: {
404
404
  md: {
405
405
  root: string;
@@ -434,5 +434,5 @@ export declare const Icon: import("react").ComponentType<import("@ark-ui/react")
434
434
  root: string;
435
435
  };
436
436
  };
437
- }, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
437
+ }, Record<"root" | "indicator" | "label" | "icon", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
438
438
  export {};
@@ -1 +1 @@
1
- export declare const badgeAnatomy: import("@ark-ui/react/anatomy").AnatomyInstance<"label" | "root" | "indicator" | "icon">;
1
+ export declare const badgeAnatomy: import("@ark-ui/react/anatomy").AnatomyInstance<"root" | "indicator" | "label" | "icon">;
@@ -33,7 +33,7 @@ export declare const badgeRecipe: import("tailwind-variants").TVReturnType<{
33
33
  root: string;
34
34
  };
35
35
  };
36
- }, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, {
36
+ }, Record<"root" | "indicator" | "label" | "icon", string | string[]>, undefined, {
37
37
  size: {
38
38
  md: {
39
39
  root: string;
@@ -68,7 +68,7 @@ export declare const badgeRecipe: import("tailwind-variants").TVReturnType<{
68
68
  root: string;
69
69
  };
70
70
  };
71
- }, Record<"label" | "root" | "indicator" | "icon", string | string[]>, import("tailwind-variants").TVReturnType<{
71
+ }, Record<"root" | "indicator" | "label" | "icon", string | string[]>, import("tailwind-variants").TVReturnType<{
72
72
  size: {
73
73
  md: {
74
74
  root: string;
@@ -103,4 +103,4 @@ export declare const badgeRecipe: import("tailwind-variants").TVReturnType<{
103
103
  root: string;
104
104
  };
105
105
  };
106
- }, Record<"label" | "root" | "indicator" | "icon", string | string[]>, undefined, unknown, unknown, undefined>>;
106
+ }, Record<"root" | "indicator" | "label" | "icon", string | string[]>, undefined, unknown, unknown, undefined>>;