@opexa/portal-components 0.0.752 → 0.0.754

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 (37) hide show
  1. package/dist/client/hooks/useAiOGCashDepositMutation.js +0 -1
  2. package/dist/client/hooks/useAiOGrabPayDepositMutation.js +0 -1
  3. package/dist/client/hooks/useAiOPalawanPayDepositMutation.js +0 -1
  4. package/dist/client/hooks/useAiOPayMayaDepositMutation.js +0 -1
  5. package/dist/client/hooks/useCreatePisoPayDepositMutation.js +0 -1
  6. package/dist/client/hooks/useCreateQRPHDepositMutation.js +0 -1
  7. package/dist/client/hooks/useRequireFirstDepositQuery.d.ts +2 -0
  8. package/dist/client/hooks/useRequireFirstDepositQuery.js +31 -0
  9. package/dist/components/DepositWithdrawal/Deposit/AiOGCashDeposit/AiOGCashDeposit.js +8 -1
  10. package/dist/components/DepositWithdrawal/Deposit/AiOGrabPayDeposit/AiOGrabPayDeposit.js +6 -1
  11. package/dist/components/DepositWithdrawal/Deposit/AiOPalawanPayDeposit/AiOPalawanPayDeposit.js +6 -1
  12. package/dist/components/DepositWithdrawal/Deposit/AiOPayMayaDeposit/AiOPayMayaDeposit.js +6 -1
  13. package/dist/components/DepositWithdrawal/Deposit/PisoPayDeposit/PisoPayDeposit.js +6 -1
  14. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/QRPHDepositContext.d.ts +2 -2
  15. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.d.ts +1 -1
  16. package/dist/components/DepositWithdrawal/Deposit/QRPHDeposit/useQRPHDeposit.js +4 -0
  17. package/dist/components/DepositWithdrawal/Withdrawal/GCashStandardCashInWithdrawal/GCashStandardCashInWithdrawal.js +2 -1
  18. package/dist/components/DepositWithdrawal/Withdrawal/GCashWithdrawal/GCashWithdrawal.js +2 -1
  19. package/dist/components/DepositWithdrawal/Withdrawal/InstapayWithdrawal/InstapayWithdrawal.js +2 -1
  20. package/dist/components/DepositWithdrawal/Withdrawal/MayaAppWithdrawal/MayaAppWithdrawal.js +2 -1
  21. package/dist/components/DepositWithdrawal/Withdrawal/MayaWithdrawal/MayaWithdrawal.js +2 -1
  22. package/dist/components/DepositWithdrawal/Withdrawal/PisoPayWithdrawal/PisoPayWithdrawal.js +2 -1
  23. package/dist/components/DepositWithdrawal/Withdrawal/RequireFirstDeposit.d.ts +1 -0
  24. package/dist/components/DepositWithdrawal/Withdrawal/RequireFirstDeposit.js +10 -0
  25. package/dist/components/DepositWithdrawal/Withdrawal/VentajaWithdrawal/VentajaWithdrawal.js +2 -1
  26. package/dist/components/DepositWithdrawal/utils.js +2 -0
  27. package/dist/icons/CreditCardUpIcon.d.ts +2 -0
  28. package/dist/icons/CreditCardUpIcon.js +4 -0
  29. package/dist/services/account.d.ts +4 -0
  30. package/dist/services/account.js +5 -1
  31. package/dist/services/queries.d.ts +12 -11
  32. package/dist/services/queries.js +50 -0
  33. package/dist/services/wallet.d.ts +3 -0
  34. package/dist/services/wallet.js +1 -0
  35. package/dist/utils/queryKeys.d.ts +1 -0
  36. package/dist/utils/queryKeys.js +1 -0
  37. package/package.json +1 -1
@@ -73,7 +73,6 @@ export const useCreateAiOGCashDepositMutation = (config) => {
73
73
  });
74
74
  });
75
75
  }
76
- queryClient.setQueryData(getDepositsCountQueryKey(), (prev) => prev ? prev + 1 : 1);
77
76
  return res;
78
77
  },
79
78
  });
@@ -73,7 +73,6 @@ export const useCreateAiOGrabPayDepositMutation = (config) => {
73
73
  });
74
74
  });
75
75
  }
76
- queryClient.setQueryData(getDepositsCountQueryKey(), (prev) => prev ? prev + 1 : 1);
77
76
  return res;
78
77
  },
79
78
  });
@@ -73,7 +73,6 @@ export const useCreateAiOPalawanPayDepositMutation = (config) => {
73
73
  });
74
74
  });
75
75
  }
76
- queryClient.setQueryData(getDepositsCountQueryKey(), (prev) => prev ? prev + 1 : 1);
77
76
  return res;
78
77
  },
79
78
  });
@@ -73,7 +73,6 @@ export const useCreateAiOPayMayaDepositMutation = (config) => {
73
73
  });
74
74
  });
75
75
  }
76
- queryClient.setQueryData(getDepositsCountQueryKey(), (prev) => prev ? prev + 1 : 1);
77
76
  return res;
78
77
  },
79
78
  });
@@ -65,7 +65,6 @@ export const useCreatePisoPayDepositMutation = (config) => {
65
65
  });
66
66
  });
67
67
  }
68
- queryClient.setQueryData(getDepositsCountQueryKey(), (prev) => prev ? prev + 1 : 1);
69
68
  return res;
70
69
  },
71
70
  });
@@ -68,7 +68,6 @@ export const useCreateQRPHDepositMutation = (config) => {
68
68
  });
69
69
  });
70
70
  }
71
- queryClient.setQueryData(getDepositsCountQueryKey(), (prev) => prev ? prev + 1 : 1);
72
71
  return res;
73
72
  },
74
73
  });
@@ -0,0 +1,2 @@
1
+ import type { Query } from '../../types';
2
+ export declare const useRequireFirstDepositQuery: Query<boolean | null>;
@@ -0,0 +1,31 @@
1
+ import { useQuery } from '@tanstack/react-query';
2
+ import invariant from 'tiny-invariant';
3
+ import { getRequireFirstDeposit } from '../../services/account.js';
4
+ import { getQueryClient } from '../../utils/getQueryClient.js';
5
+ import { getRequireFirstDepositQueryKey, getSessionQueryKey } from '../../utils/queryKeys.js';
6
+ import { getSession } from '../services/getSession.js';
7
+ import { useSessionQuery } from './useSessionQuery.js';
8
+ export const useRequireFirstDepositQuery = (config) => {
9
+ const sessionQuery = useSessionQuery();
10
+ const query = useQuery({
11
+ ...config,
12
+ enabled: config?.enabled === false
13
+ ? false
14
+ : sessionQuery.data?.status === 'authenticated',
15
+ queryKey: getRequireFirstDepositQueryKey(),
16
+ queryFn: async ({ signal }) => {
17
+ const session = await getQueryClient().fetchQuery({
18
+ queryKey: getSessionQueryKey(),
19
+ queryFn: async () => getSession(),
20
+ });
21
+ invariant(session.status === 'authenticated');
22
+ return await getRequireFirstDeposit({
23
+ signal,
24
+ headers: {
25
+ Authorization: `Bearer ${session.token}`,
26
+ },
27
+ });
28
+ },
29
+ });
30
+ return query;
31
+ };
@@ -23,9 +23,12 @@ import { Button } from '../../../../ui/Button/index.js';
23
23
  import { Field } from '../../../../ui/Field/index.js';
24
24
  import { NumberInput } from '../../../../ui/NumberInput/index.js';
25
25
  import { Portal } from '../../../../ui/Portal/index.js';
26
+ import { getQueryClient } from '../../../../utils/getQueryClient.js';
26
27
  import { parseDecimal } from '../../../../utils/parseDecimal.js';
28
+ import { getDepositsCountQueryKey } from '../../../../utils/queryKeys.js';
27
29
  import { AmountChoices } from '../../AmountChoices.js';
28
30
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
31
+ import { explainError } from '../../utils.js';
29
32
  import { AvailablePromos } from '../AvailablePromos.js';
30
33
  export function AiOGCashDeposit() {
31
34
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -43,8 +46,12 @@ export function AiOGCashDeposit() {
43
46
  setStatus('processing');
44
47
  },
45
48
  onSuccess(data) {
49
+ const queryClient = getQueryClient();
46
50
  invariant(data.checkoutUrl);
47
51
  window.open(data.checkoutUrl, '_blank', 'noopener,noreferrer');
52
+ queryClient.invalidateQueries({
53
+ queryKey: getDepositsCountQueryKey(),
54
+ });
48
55
  setStatus('success');
49
56
  },
50
57
  onError() {
@@ -160,7 +167,7 @@ export function AiOGCashDeposit() {
160
167
  }
161
168
  }, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
162
169
  "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
163
- 'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
170
+ explainError(createDepositMutation?.error?.name)] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
164
171
  api.setOpen(false);
165
172
  }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
166
173
  }
@@ -23,9 +23,12 @@ import { Button } from '../../../../ui/Button/index.js';
23
23
  import { Field } from '../../../../ui/Field/index.js';
24
24
  import { NumberInput } from '../../../../ui/NumberInput/index.js';
25
25
  import { Portal } from '../../../../ui/Portal/index.js';
26
+ import { getQueryClient } from '../../../../utils/getQueryClient.js';
26
27
  import { parseDecimal } from '../../../../utils/parseDecimal.js';
28
+ import { getDepositsCountQueryKey } from '../../../../utils/queryKeys.js';
27
29
  import { AmountChoices } from '../../AmountChoices.js';
28
30
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
31
+ import { explainError } from '../../utils.js';
29
32
  import { AvailablePromos } from '../AvailablePromos.js';
30
33
  export function AiOGrabPayDeposit() {
31
34
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -43,8 +46,10 @@ export function AiOGrabPayDeposit() {
43
46
  setStatus('processing');
44
47
  },
45
48
  onSuccess(data) {
49
+ const queryClient = getQueryClient();
46
50
  invariant(data.checkoutUrl);
47
51
  window.open(data.checkoutUrl, '_blank', 'noopener,noreferrer');
52
+ queryClient.invalidateQueries({ queryKey: getDepositsCountQueryKey() });
48
53
  setStatus('success');
49
54
  },
50
55
  onError() {
@@ -160,7 +165,7 @@ export function AiOGrabPayDeposit() {
160
165
  }
161
166
  }, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
162
167
  "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
163
- 'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
168
+ explainError(createDepositMutation?.error?.name)] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
164
169
  api.setOpen(false);
165
170
  }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
166
171
  }
@@ -23,9 +23,12 @@ import { Button } from '../../../../ui/Button/index.js';
23
23
  import { Field } from '../../../../ui/Field/index.js';
24
24
  import { NumberInput } from '../../../../ui/NumberInput/index.js';
25
25
  import { Portal } from '../../../../ui/Portal/index.js';
26
+ import { getQueryClient } from '../../../../utils/getQueryClient.js';
26
27
  import { parseDecimal } from '../../../../utils/parseDecimal.js';
28
+ import { getDepositsCountQueryKey } from '../../../../utils/queryKeys.js';
27
29
  import { AmountChoices } from '../../AmountChoices.js';
28
30
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
31
+ import { explainError } from '../../utils.js';
29
32
  import { AvailablePromos } from '../AvailablePromos.js';
30
33
  export function AiOPalawanPayDeposit() {
31
34
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -43,8 +46,10 @@ export function AiOPalawanPayDeposit() {
43
46
  setStatus('processing');
44
47
  },
45
48
  onSuccess(data) {
49
+ const queryClient = getQueryClient();
46
50
  invariant(data.checkoutUrl);
47
51
  window.open(data.checkoutUrl, '_blank', 'noopener,noreferrer');
52
+ queryClient.invalidateQueries({ queryKey: getDepositsCountQueryKey() });
48
53
  setStatus('success');
49
54
  },
50
55
  onError() {
@@ -160,7 +165,7 @@ export function AiOPalawanPayDeposit() {
160
165
  }
161
166
  }, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
162
167
  "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
163
- 'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
168
+ explainError(createDepositMutation?.error?.name)] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
164
169
  api.setOpen(false);
165
170
  }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
166
171
  }
@@ -23,9 +23,12 @@ import { Button } from '../../../../ui/Button/index.js';
23
23
  import { Field } from '../../../../ui/Field/index.js';
24
24
  import { NumberInput } from '../../../../ui/NumberInput/index.js';
25
25
  import { Portal } from '../../../../ui/Portal/index.js';
26
+ import { getQueryClient } from '../../../../utils/getQueryClient.js';
26
27
  import { parseDecimal } from '../../../../utils/parseDecimal.js';
28
+ import { getDepositsCountQueryKey } from '../../../../utils/queryKeys.js';
27
29
  import { AmountChoices } from '../../AmountChoices.js';
28
30
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
31
+ import { explainError } from '../../utils.js';
29
32
  import { AvailablePromos } from '../AvailablePromos.js';
30
33
  export function AiOPayMayaDeposit() {
31
34
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -43,8 +46,10 @@ export function AiOPayMayaDeposit() {
43
46
  setStatus('processing');
44
47
  },
45
48
  onSuccess(data) {
49
+ const queryClient = getQueryClient();
46
50
  invariant(data.checkoutUrl);
47
51
  window.open(data.checkoutUrl, '_blank', 'noopener,noreferrer');
52
+ queryClient.invalidateQueries({ queryKey: getDepositsCountQueryKey() });
48
53
  setStatus('success');
49
54
  },
50
55
  onError() {
@@ -160,7 +165,7 @@ export function AiOPayMayaDeposit() {
160
165
  }
161
166
  }, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
162
167
  "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
163
- 'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
168
+ explainError(createDepositMutation?.error?.name)] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
164
169
  api.setOpen(false);
165
170
  }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
166
171
  }
@@ -22,9 +22,12 @@ import { AlertDialog } from '../../../../ui/AlertDialog/index.js';
22
22
  import { Button } from '../../../../ui/Button/index.js';
23
23
  import { Field } from '../../../../ui/Field/index.js';
24
24
  import { Portal } from '../../../../ui/Portal/index.js';
25
+ import { getQueryClient } from '../../../../utils/getQueryClient.js';
25
26
  import { parseDecimal } from '../../../../utils/parseDecimal.js';
27
+ import { getDepositsCountQueryKey } from '../../../../utils/queryKeys.js';
26
28
  import { AmountChoices } from '../../AmountChoices.js';
27
29
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
30
+ import { explainError } from '../../utils.js';
28
31
  import { AvailablePromos } from '../AvailablePromos.js';
29
32
  export function PisoPayDeposit() {
30
33
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -42,8 +45,10 @@ export function PisoPayDeposit() {
42
45
  setStatus('processing');
43
46
  },
44
47
  onSuccess(data) {
48
+ const queryClient = getQueryClient();
45
49
  invariant(data.checkoutUrl);
46
50
  window.open(data.checkoutUrl, '_blank', 'noopener,noreferrer');
51
+ queryClient.invalidateQueries({ queryKey: getDepositsCountQueryKey() });
47
52
  setStatus('success');
48
53
  },
49
54
  onError() {
@@ -169,7 +174,7 @@ export function PisoPayDeposit() {
169
174
  }
170
175
  }, lazyMount: true, unmountOnExit: true, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, { className: "!z-[calc(var(--z-dialog)+2)]" }), _jsx(AlertDialog.Positioner, { className: "!z-[calc(var(--z-dialog)+3)]", children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsxs(AlertDialog.Header, { children: [status === 'processing' && (_jsx(SpinnerIcon, { className: "size-12 text-text-brand-primary-600" })), status === 'success' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-success-secondary text-text-featured-icon-light-success", children: _jsx(AlertCircleIcon, {}) })), status === 'failed' && (_jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, {}) }))] }), _jsxs(AlertDialog.Body, { children: [_jsxs(AlertDialog.Title, { children: [status === 'processing' && 'Processing Deposit', status === 'success' && 'Deposit Successful', status === 'failed' && 'Deposit Failed'] }), _jsxs(AlertDialog.Description, { children: [status === 'processing' &&
171
176
  "We're verifying your account and amount. Please hold a moment.", status === 'success' && (_jsxs(_Fragment, { children: ["Your deposit has been successfully processed. ", _jsx("br", {}), " If you are not redirected automatically, click", ' ', !!createDepositMutation.data?.checkoutUrl && (_jsx("a", { href: createDepositMutation.data?.checkoutUrl, target: "_blank", rel: "noopener noreferrer", className: "text-text-brand underline underline-offset-2", children: "here" })), "."] })), status === 'failed' &&
172
- 'Something went wrong while processing your deposit. Please try again or contact support.'] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
177
+ explainError(createDepositMutation?.error?.name)] })] }), (status === 'failed' || status === 'success') && (_jsx(AlertDialog.Footer, { children: _jsx(AlertDialog.Context, { children: (api) => (_jsx(Button, { onClick: () => {
173
178
  api.setOpen(false);
174
179
  }, children: status === 'failed' ? 'Try Again' : 'Ok' })) }) }))] }) })] }) })] }));
175
180
  }
@@ -1,6 +1,6 @@
1
1
  export declare const QRPHDepositContext: (props: {
2
2
  value: {
3
- view: "form" | "qrCode";
3
+ view: "qrCode" | "form";
4
4
  status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
5
5
  verify: () => void;
6
6
  reset: () => void;
@@ -13,7 +13,7 @@ export declare const QRPHDepositContext: (props: {
13
13
  } & {
14
14
  children?: import("react").ReactNode | undefined;
15
15
  }) => React.ReactNode, useQRPHDepositContext: () => {
16
- view: "form" | "qrCode";
16
+ view: "qrCode" | "form";
17
17
  status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
18
18
  verify: () => void;
19
19
  reset: () => void;
@@ -1,7 +1,7 @@
1
1
  import type { Deposit } from '../../../../types';
2
2
  export type UseQRPHDepositReturn = ReturnType<typeof useQRPHDeposit>;
3
3
  export declare function useQRPHDeposit(): {
4
- view: "form" | "qrCode";
4
+ view: "qrCode" | "form";
5
5
  status: "waiting" | "processing" | "failed" | "verification-waiting" | "verification-processing" | "verification-failed" | "verification-success";
6
6
  verify: () => void;
7
7
  reset: () => void;
@@ -5,6 +5,8 @@ import { useCreateQRPHDepositMutation } from '../../../../client/hooks/useCreate
5
5
  import { useDepositQuery } from '../../../../client/hooks/useDepositQuery.js';
6
6
  import { useGlobalStore } from '../../../../client/hooks/useGlobalStore.js';
7
7
  import { useMemberVerificationQuery } from '../../../../client/hooks/useMemberVerificationQuery.js';
8
+ import { getQueryClient } from '../../../../utils/getQueryClient.js';
9
+ import { getDepositsCountQueryKey } from '../../../../utils/queryKeys.js';
8
10
  export function useQRPHDeposit() {
9
11
  const globalStore = useGlobalStore(useShallow((ctx) => ({
10
12
  kycVerificationStatus: ctx.kycVerificationStatus,
@@ -24,8 +26,10 @@ export function useQRPHDeposit() {
24
26
  setStatus('processing');
25
27
  },
26
28
  onSuccess(data) {
29
+ const queryClient = getQueryClient();
27
30
  invariant(data.qrCode);
28
31
  setStatus('verification-waiting');
32
+ queryClient.invalidateQueries({ queryKey: getDepositsCountQueryKey() });
29
33
  setDeposit(data);
30
34
  },
31
35
  onError() {
@@ -29,6 +29,7 @@ import { AmountChoices } from '../../AmountChoices.js';
29
29
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
30
30
  import { explainError } from '../../utils.js';
31
31
  import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
32
+ import { RequireFirstDeposit } from '../RequireFirstDeposit.js';
32
33
  import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
33
34
  export function GCashStandardCashInWithdrawal() {
34
35
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -125,7 +126,7 @@ export function GCashStandardCashInWithdrawal() {
125
126
  shouldDirty: true,
126
127
  shouldValidate: true,
127
128
  });
128
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
129
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(RequireFirstDeposit, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
129
130
  if (!details.open) {
130
131
  setStatus('waiting');
131
132
  }
@@ -29,6 +29,7 @@ import { AmountChoices } from '../../AmountChoices.js';
29
29
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
30
30
  import { explainError } from '../../utils.js';
31
31
  import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
32
+ import { RequireFirstDeposit } from '../RequireFirstDeposit.js';
32
33
  import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
33
34
  export function GCashWithdrawal() {
34
35
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -125,7 +126,7 @@ export function GCashWithdrawal() {
125
126
  shouldDirty: true,
126
127
  shouldValidate: true,
127
128
  });
128
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
129
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(RequireFirstDeposit, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
129
130
  if (!details.open) {
130
131
  setStatus('waiting');
131
132
  }
@@ -32,6 +32,7 @@ import { AmountChoices } from '../../AmountChoices.js';
32
32
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
33
33
  import { explainError } from '../../utils.js';
34
34
  import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
35
+ import { RequireFirstDeposit } from '../RequireFirstDeposit.js';
35
36
  import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
36
37
  export function InstapayWithdrawal() {
37
38
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -162,7 +163,7 @@ export function InstapayWithdrawal() {
162
163
  shouldDirty: true,
163
164
  shouldValidate: true,
164
165
  });
165
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
166
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(RequireFirstDeposit, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
166
167
  if (!details.open) {
167
168
  setStatus('waiting');
168
169
  }
@@ -27,6 +27,7 @@ import { AmountChoices } from '../../AmountChoices.js';
27
27
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
28
28
  import { explainError } from '../../utils.js';
29
29
  import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
30
+ import { RequireFirstDeposit } from '../RequireFirstDeposit.js';
30
31
  import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
31
32
  export function MayaAppWithdrawal() {
32
33
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -115,7 +116,7 @@ export function MayaAppWithdrawal() {
115
116
  shouldDirty: true,
116
117
  shouldValidate: true,
117
118
  });
118
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
119
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(RequireFirstDeposit, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
119
120
  if (!details.open) {
120
121
  setStatus('waiting');
121
122
  }
@@ -29,6 +29,7 @@ import { AmountChoices } from '../../AmountChoices.js';
29
29
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
30
30
  import { explainError } from '../../utils.js';
31
31
  import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
32
+ import { RequireFirstDeposit } from '../RequireFirstDeposit.js';
32
33
  import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
33
34
  export function MayaWithdrawal() {
34
35
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -125,7 +126,7 @@ export function MayaWithdrawal() {
125
126
  shouldDirty: true,
126
127
  shouldValidate: true,
127
128
  });
128
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
129
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(RequireFirstDeposit, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
129
130
  if (!details.open) {
130
131
  setStatus('waiting');
131
132
  }
@@ -31,6 +31,7 @@ import { AmountChoices } from '../../AmountChoices.js';
31
31
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
32
32
  import { explainError } from '../../utils.js';
33
33
  import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
34
+ import { RequireFirstDeposit } from '../RequireFirstDeposit.js';
34
35
  import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
35
36
  export function PisoPayWithdrawal() {
36
37
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -151,7 +152,7 @@ export function PisoPayWithdrawal() {
151
152
  shouldDirty: true,
152
153
  shouldValidate: true,
153
154
  });
154
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
155
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(RequireFirstDeposit, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
155
156
  if (!details.open) {
156
157
  setStatus('waiting');
157
158
  }
@@ -0,0 +1 @@
1
+ export declare function RequireFirstDeposit(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,10 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRequireFirstDepositQuery } from '../../../client/hooks/useRequireFirstDepositQuery.js';
3
+ import { CreditCardUpIcon } from '../../../icons/CreditCardUpIcon.js';
4
+ export function RequireFirstDeposit() {
5
+ const requireFirstDepositQuery = useRequireFirstDepositQuery();
6
+ const requireFirstDeposit = requireFirstDepositQuery.data;
7
+ if (!requireFirstDeposit)
8
+ return null;
9
+ return (_jsxs("div", { className: "mt-lg rounded-xl border border-border-primary bg-bg-primary-alt p-xl", children: [_jsx("div", { className: "flex size-8.5 items-center justify-center rounded-full border-[1.667px] border-text-warning-primary/10", children: _jsx("div", { className: "flex size-6.5 items-center justify-center rounded-full border-[1.667px] border-text-warning-primary/30", children: _jsx(CreditCardUpIcon, { className: "size-5 text-text-warning-primary" }) }) }), _jsx("p", { className: "mt-lg text-sm text-text-tertiary-600", children: "It looks like you still need to make your first deposit before you can withdraw funds." })] }));
10
+ }
@@ -31,6 +31,7 @@ import { AmountChoices } from '../../AmountChoices.js';
31
31
  import { useDepositWithdrawalPropsContext } from '../../DepositWithdrawalContext.js';
32
32
  import { explainError } from '../../utils.js';
33
33
  import { ActiveTurnoverRequirement } from '../ActiveTurnoverRequirement.js';
34
+ import { RequireFirstDeposit } from '../RequireFirstDeposit.js';
34
35
  import { TransactionPasswordNotSet } from '../TransactionPasswordNotSet.js';
35
36
  export function VentajaWithdrawal() {
36
37
  const depositWithdrawalProps = useDepositWithdrawalPropsContext();
@@ -151,7 +152,7 @@ export function VentajaWithdrawal() {
151
152
  shouldDirty: true,
152
153
  shouldValidate: true,
153
154
  });
154
- }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
155
+ }, min: minimumAmount, max: maximumAmount, className: "mt-xl" }), _jsxs(Field.Root, { className: "mt-3xl", invalid: !!form.formState.errors.password, children: [_jsxs(PasswordInput.Root, { children: [_jsx(PasswordInput.Label, { children: "Transaction Password" }), _jsxs(PasswordInput.Control, { children: [_jsx(PasswordInput.Input, { placeholder: "Enter password", ...form.register('password') }), _jsx(PasswordInput.VisibilityTrigger, { children: _jsx(PasswordInput.Indicator, { fallback: _jsx(EyeOffIcon, {}), asChild: true, children: _jsx(EyeIcon, {}) }) })] })] }), _jsx(Field.ErrorText, { children: form.formState.errors.password?.message })] }), _jsx(TransactionPasswordNotSet, {}), _jsx(ActiveTurnoverRequirement, {}), _jsx(RequireFirstDeposit, {}), _jsx(Button, { type: "submit", className: "mt-6", disabled: createWithdrawalMutation.isPending || turnoverRequirement > 0, children: "Withdraw" }), depositWithdrawalProps.hasPrivacyPolicyAndTermsOfUse && (_jsxs("p", { className: "mt-lg text-text-tertiary-600 text-xs", children: ["Upon withdrawing, you agree to our", ' ', _jsx(Link, { href: depositWithdrawalProps.termsOfUseUrl ?? '/terms-of-use', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Terms of Use" }), ' ', "and", ' ', _jsx(Link, { href: depositWithdrawalProps.privacyPolicyUrl ?? '/privacy-policy', onClick: () => globalStore.depositWithdrawal.setOpen(false), className: "text-text-warning-primary-600 underline underline-offset-2", children: "Privacy Policy" }), "."] })), _jsx(AlertDialog.Root, { open: status !== 'waiting', onOpenChange: (details) => {
155
156
  if (!details.open) {
156
157
  setStatus('waiting');
157
158
  }
@@ -40,6 +40,8 @@ const errorMap = {
40
40
  ReCAPTCHAVerificationFailedError: 'reCAPTCHA verification failed. Please try again.',
41
41
  WalletDoesNotExistError: 'Wallet does not exist. Please check your wallet settings or contact support.',
42
42
  WithdrawalDailyLimitExceededError: 'You have exceeded your daily withdrawal limit. Please try again tomorrow.',
43
+ MinimumFirstDepositAmountNotMetError: 'The minimum first deposit amount is not met. Please enter a valid amount.',
44
+ FirstDepositRequiredError: 'First deposit is required before making a withdrawal.',
43
45
  };
44
46
  export function explainError(error) {
45
47
  if (error && errorMap[error]) {
@@ -0,0 +1,2 @@
1
+ import type { ComponentPropsWithRef } from 'react';
2
+ export declare function CreditCardUpIcon(props: ComponentPropsWithRef<'svg'>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function CreditCardUpIcon(props) {
3
+ return (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", ...props, children: _jsx("path", { d: "m16 18 3-3m0 0 3 3m-3-3v6m3-11H2m20 2V8.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C20.48 5 19.92 5 18.8 5H5.2c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C2 6.52 2 7.08 2 8.2v7.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C3.52 19 4.08 19 5.2 19H12" }) }));
4
+ }
@@ -375,8 +375,12 @@ export interface GoogleClientIdQuery {
375
375
  export interface FacebookClientIdQuery {
376
376
  facebookClientId?: string | null;
377
377
  }
378
+ export interface RequireFirstDepositQuery {
379
+ requireFirstDeposit?: boolean | null;
380
+ }
378
381
  export declare const getGoogleClientId: (options?: GraphQLRequestOptions) => Promise<string | null>;
379
382
  export declare const getFacebookClientId: (options?: GraphQLRequestOptions) => Promise<string | null>;
383
+ export declare const getRequireFirstDeposit: (options?: GraphQLRequestOptions) => Promise<boolean | null>;
380
384
  export interface UnlinkGoogleMutation {
381
385
  unlinkGoogle: boolean;
382
386
  }
@@ -1,7 +1,7 @@
1
1
  import { cache } from 'react';
2
2
  import { ACCOUNT_GRAPHQL_ENDPOINT } from '../constants/index.js';
3
3
  import { graphqlRequest } from './graphqlRequest.js';
4
- import { ANNOUNCEMENTS, APPROVE_MEMBER_VERIFICATION__NEXT, CREATE_MEMBER_VERIFICATION, CREATE_MEMBER_VERIFICATION__NEXT, DELETE_MEMBER_ACCOUNT, FACEBOOK_CLIENT_ID, GENERATE_SUMSUB_VERIFICATION_TOKEN, GOOGLE_CLIENT_ID, MEMBER_ACCOUNT, MEMBER_VERIFICATION, PAYMENT_SETTINGS, POINTS_CLUB_SETTINGS, PROFILE_COMPLETION, REFERRAL_CODE, REGISTER_MAYA_MEMBER_ACCOUNT, REGISTER_MEMBER_ACCOUNT, REGISTER_MEMBER_ACCOUNT__NEXT, REGISTER_MEMBER_ACCOUNT_BY_MOBILE_NUMBER, REGISTER_MEMBER_ACCOUNT_BY_NAME, REGISTER_MEMBER_ACCOUNT_VIA_MOBILE, RESET_PASSWORD, UNLINK_FACEBOOK, UNLINK_GOOGLE, UPDATE_MEMBER_ACCOUNT, UPDATE_MEMBER_VERIFICATION, UPDATE_MEMBER_VERIFICATION__NEXT, UPDATE_REFERRAL_CODE, VERIFY_MOBILE_NUMBER, } from './queries.js';
4
+ import { ANNOUNCEMENTS, APPROVE_MEMBER_VERIFICATION__NEXT, CREATE_MEMBER_VERIFICATION, CREATE_MEMBER_VERIFICATION__NEXT, DELETE_MEMBER_ACCOUNT, FACEBOOK_CLIENT_ID, GENERATE_SUMSUB_VERIFICATION_TOKEN, GOOGLE_CLIENT_ID, MEMBER_ACCOUNT, MEMBER_VERIFICATION, PAYMENT_SETTINGS, POINTS_CLUB_SETTINGS, PROFILE_COMPLETION, REFERRAL_CODE, REGISTER_MAYA_MEMBER_ACCOUNT, REGISTER_MEMBER_ACCOUNT, REGISTER_MEMBER_ACCOUNT__NEXT, REGISTER_MEMBER_ACCOUNT_BY_MOBILE_NUMBER, REGISTER_MEMBER_ACCOUNT_BY_NAME, REGISTER_MEMBER_ACCOUNT_VIA_MOBILE, REQUIRE_FIRST_DEPOSIT, RESET_PASSWORD, UNLINK_FACEBOOK, UNLINK_GOOGLE, UPDATE_MEMBER_ACCOUNT, UPDATE_MEMBER_VERIFICATION, UPDATE_MEMBER_VERIFICATION__NEXT, UPDATE_REFERRAL_CODE, VERIFY_MOBILE_NUMBER, } from './queries.js';
5
5
  import { sha256 } from './sha256.js';
6
6
  export const getMemberAccount = cache(async (options) => {
7
7
  const res = await graphqlRequest(ACCOUNT_GRAPHQL_ENDPOINT, MEMBER_ACCOUNT, undefined, options);
@@ -266,6 +266,10 @@ export const getFacebookClientId = cache(async (options) => {
266
266
  const res = await graphqlRequest(ACCOUNT_GRAPHQL_ENDPOINT, FACEBOOK_CLIENT_ID, undefined, options);
267
267
  return res.facebookClientId ?? null;
268
268
  });
269
+ export const getRequireFirstDeposit = cache(async (options) => {
270
+ const res = await graphqlRequest(ACCOUNT_GRAPHQL_ENDPOINT, REQUIRE_FIRST_DEPOSIT, undefined, options);
271
+ return res.requireFirstDeposit ?? null;
272
+ });
269
273
  export const unlinkGoogle = async (id, options) => {
270
274
  await graphqlRequest(ACCOUNT_GRAPHQL_ENDPOINT, UNLINK_GOOGLE, { input: { id } }, options);
271
275
  };
@@ -15,17 +15,17 @@ export declare const END_GAME_SESSION__LEGACY = "\n mutation EndGameSession($in
15
15
  export declare const RECOMMENDED_GAMES = "\n query RecommendedGames {\n recommendedGames {\n id\n name\n type\n provider\n }\n }\n";
16
16
  export declare const ANNOUNCEMENTS = "\n query Announcements(\n $first: Int\n $after: Cursor\n $filter: AnnouncementFilterInput\n ) {\n announcements(first: $first, after: $after, filter: $filter) {\n edges {\n cursor\n node {\n ... on Announcement {\n id\n type\n title\n status\n message\n activationStartDateTime\n activationEndDateTime\n dateTimeCreated\n dateTimeLastUpdated\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n";
17
17
  export declare const WITHDRAWAL_RECORDS = "\n query WithdrawalRecords(\n $first: Int\n $after: Cursor\n $filter: WithdrawalRecordFilterInput\n ) {\n member {\n withdrawalRecords(first: $first, after: $after, filter: $filter) {\n edges {\n cursor\n node {\n ... on BankWithdrawalRecord {\n id\n type\n bank\n fee\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n serialCode\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on GCashWithdrawalRecord {\n id\n type\n fee\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n serialCode\n recipientMobileNumber\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on ManualWithdrawalRecord {\n id\n type\n fee\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n serialCode\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on MayaAppWithdrawalRecord {\n id\n type\n fee\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n serialCode\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on InstapayWithdrawalRecord {\n id\n type\n fee\n netAmount\n bankName\n reference\n accountName\n amount\n status\n error\n withdrawalNumber\n serialCode\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on ManualUPIWithdrawalRecord {\n id\n type\n fee\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n serialCode\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on ManualBankWithdrawalRecord {\n id\n type\n fee\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n serialCode\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on VentajaDisbursementWithdrawalRecord {\n bankName\n id\n type\n fee\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n serialCode\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on PisoPayRemittanceWithdrawalRecord {\n bankName\n id\n type\n fee\n accountName\n accountNumber\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n serialCode\n dateTimeCreated\n dateTimeLastUpdated\n }\n ... on GCashStandardCashInWithdrawalRecord {\n id\n type\n fee\n netAmount\n reference\n amount\n status\n error\n withdrawalNumber\n serialCode\n recipientMobileNumber\n dateTimeCreated\n dateTimeLastUpdated\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n";
18
- export declare const CREATE_GCASH_WITHDRAWAL = "\n mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {\n createGCashWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on MobileNumberNotVerifiedError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on ReCAPTCHAVerificationFailedError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n }\n }\n";
19
- export declare const CREATE_GCASH_STANDARD_CASH_IN_WITHDRAWAL = "\n mutation CreateGCashStandardCashInWithdrawal(\n $input: CreateGCashStandardCashInWithdrawalInput!\n ) {\n createGCashStandardCashInWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on MobileNumberNotVerifiedError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on ReCAPTCHAVerificationFailedError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n }\n }\n";
20
- export declare const CREATE_MAYA_WITHDRAWAL = "\n mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {\n createMayaWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on MobileNumberNotVerifiedError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n }\n }\n";
21
- export declare const CREATE_MAYA_APP_WITHDRAWAL = "\n mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {\n createMayaAppWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n }\n }\n";
22
- export declare const CREATE_BANK_WITHDRAWAL = "\n mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {\n createBankWithdrawal(input: $input) {\n ... on MobileNumberNotVerifiedError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n }\n }\n";
23
- export declare const CREATE_AIO_INSTAPAY_WITHDRAWAL = "\n mutation CreateAIOInstapayWithdrawal(\n $input: CreateAIOInstapayWithdrawalInput!\n ) {\n createAIOInstapayWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n }\n }\n";
24
- export declare const CREATE_AIO_INSTAPAY_WITHDRAWAL_NEXT = "\n mutation CreateAIOInstapayWithdrawal_next(\n $input: CreateAIOInstapayWithdrawalInput_next!\n ) {\n createAIOInstapayWithdrawal_next(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n }\n }\n";
25
- export declare const CREATE_VENTAJA_WITHDRAWAL = "\n mutation CreateVentajaDisbursementWithdrawal(\n $input: CreateVentajaDisbursementWithdrawalInput!\n $transactionPassword: String!\n ) {\n createVentajaDisbursementWithdrawal(\n input: $input\n transactionPassword: $transactionPassword\n ) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n }\n }\n";
26
- export declare const CREATE_PISO_PAY_WITHDRAWAL = "\n mutation CreatePisopayWithdrawal(\n $input: CreatePisoPayRemittanceWithdrawalInput!\n $transactionPassword: String!\n ) {\n createPisoPayRemittanceWithdrawal(\n input: $input\n transactionPassword: $transactionPassword\n ) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n }\n }\n";
27
- export declare const CREATE_MANUAL_UPI_WITHDRAWAL = "\n mutation CreateManualUPIWithdrawal($input: CreateManualUPIWithdrawalInput!) {\n createManualUPIWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n }\n }\n";
28
- export declare const CREATE_MANUAL_BANK_WITHDRAWAL = "\n mutation CreateManualBankWithdrawal(\n $input: CreateManualBankWithdrawalInput!\n ) {\n createManualBankWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n }\n }\n";
18
+ export declare const CREATE_GCASH_WITHDRAWAL = "\n mutation CreateGCashWithdrawal($input: CreateGCashWithdrawalInput!) {\n createGCashWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on MobileNumberNotVerifiedError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on ReCAPTCHAVerificationFailedError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n }\n }\n";
19
+ export declare const CREATE_GCASH_STANDARD_CASH_IN_WITHDRAWAL = "\n mutation CreateGCashStandardCashInWithdrawal(\n $input: CreateGCashStandardCashInWithdrawalInput!\n ) {\n createGCashStandardCashInWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on MobileNumberNotVerifiedError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on ReCAPTCHAVerificationFailedError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n }\n }\n";
20
+ export declare const CREATE_MAYA_WITHDRAWAL = "\n mutation CreateMayaWithdrawal($input: CreateMayaWithdrawalInput!) {\n createMayaWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on MobileNumberNotVerifiedError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n }\n }\n";
21
+ export declare const CREATE_MAYA_APP_WITHDRAWAL = "\n mutation CreateMayaAppWithdrawal($input: CreateMayaAppWithdrawalInput!) {\n createMayaAppWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n }\n }\n";
22
+ export declare const CREATE_BANK_WITHDRAWAL = "\n mutation CreateBankWithdrawal($input: CreateBankWithdrawalInput!) {\n createBankWithdrawal(input: $input) {\n ... on MobileNumberNotVerifiedError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n }\n }\n";
23
+ export declare const CREATE_AIO_INSTAPAY_WITHDRAWAL = "\n mutation CreateAIOInstapayWithdrawal(\n $input: CreateAIOInstapayWithdrawalInput!\n ) {\n createAIOInstapayWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n \n }\n }\n";
24
+ export declare const CREATE_AIO_INSTAPAY_WITHDRAWAL_NEXT = "\n mutation CreateAIOInstapayWithdrawal_next(\n $input: CreateAIOInstapayWithdrawalInput_next!\n ) {\n createAIOInstapayWithdrawal_next(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n }\n }\n";
25
+ export declare const CREATE_VENTAJA_WITHDRAWAL = "\n mutation CreateVentajaDisbursementWithdrawal(\n $input: CreateVentajaDisbursementWithdrawalInput!\n $transactionPassword: String!\n ) {\n createVentajaDisbursementWithdrawal(\n input: $input\n transactionPassword: $transactionPassword\n ) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n }\n }\n";
26
+ export declare const CREATE_PISO_PAY_WITHDRAWAL = "\n mutation CreatePisopayWithdrawal(\n $input: CreatePisoPayRemittanceWithdrawalInput!\n $transactionPassword: String!\n ) {\n createPisoPayRemittanceWithdrawal(\n input: $input\n transactionPassword: $transactionPassword\n ) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TransactionPasswordNotSetError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n }\n }\n";
27
+ export declare const CREATE_MANUAL_UPI_WITHDRAWAL = "\n mutation CreateManualUPIWithdrawal($input: CreateManualUPIWithdrawalInput!) {\n createManualUPIWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n }\n }\n";
28
+ export declare const CREATE_MANUAL_BANK_WITHDRAWAL = "\n mutation CreateManualBankWithdrawal(\n $input: CreateManualBankWithdrawalInput!\n ) {\n createManualBankWithdrawal(input: $input) {\n ... on AccountNotVerifiedError {\n name: __typename\n message\n }\n ... on InvalidWithdrawalAmountError {\n name: __typename\n message\n }\n ... on WithdrawalDailyLimitExceededError {\n name: __typename\n message\n }\n ... on NotEnoughBalanceError {\n name: __typename\n message\n }\n ... on WalletDoesNotExistError {\n name: __typename\n message\n }\n ... on TurnoverRequirementNotYetFulfilledError {\n name: __typename\n message\n }\n ... on FirstDepositRequiredError {\n name: __typename\n message\n }\n }\n }\n";
29
29
  export declare const INSTAPAY_BANK_LIST = "\n query InstapayBankList {\n instapayBankList {\n id\n code\n name\n }\n }\n";
30
30
  export declare const REMAINING_DAILY_WITHDRAWALS_COUNT = "\n query RemainingDailyWithdrawalsCount {\n remainingDailyWithdrawalsCount\n }\n";
31
31
  export declare const DEPOSIT_RECORDS = "\n query DepositRecords(\n $after: Cursor\n $first: Int\n $filter: DepositRecordFilterInput\n ) {\n member {\n depositRecords(after: $after, first: $first, filter: $filter) {\n edges {\n cursor\n node {\n ... on DepositRecord {\n id\n type\n amount\n netAmount\n fee\n status\n deposit\n reference\n depositNumber\n dateTimeCreated\n dateTimeLastUpdated\n }\n }\n }\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n }\n";
@@ -132,6 +132,7 @@ export declare const UNMARK_GAME_AS_FAVORITE = "\n mutation UnmarkGameAsFavorit
132
132
  export declare const FAVORITE_GAMES = "\n query FavoriteGames {\n favoriteGames {\n ... on Game {\n id\n name\n type\n provider\n }\n }\n }\n";
133
133
  export declare const GOOGLE_CLIENT_ID = "\n query GoogleClientId {\n googleClientId\n }\n";
134
134
  export declare const FACEBOOK_CLIENT_ID = "\n query FacebookClientId {\n facebookClientId\n }\n";
135
+ export declare const REQUIRE_FIRST_DEPOSIT = "\n query RequireFirstDeposit {\n requireFirstDeposit\n }\n";
135
136
  export declare const UNLINK_GOOGLE = "\n mutation UnlinkGoogle($input: UnlinkGoogleInput!) {\n unlinkGoogle(input: $input)\n }\n";
136
137
  export declare const UNLINK_FACEBOOK = "\n mutation UnlinkFacebook($input: UnlinkFacebookInput!) {\n unlinkFacebook(input: $input)\n }\n";
137
138
  export declare const TOURNAMENTS = "\n query Tournaments(\n $first: Int\n $after: Cursor\n $filter: TournamentFilterInput\n ) {\n tournaments(first: $first, after: $after, filter: $filter) {\n totalCount\n pageInfo {\n hasNextPage\n endCursor\n }\n edges {\n node {\n ... on MultiplierTournament {\n id\n type\n name\n winnersCount\n status\n description\n activationStartDateTime\n activationEndDateTime\n topPayouts {\n id\n multiplier\n amount\n member {\n id\n name\n }\n }\n currentLeaderboard {\n totalCount\n edges {\n node {\n ... on TournamentLeaderboard {\n id\n username\n multiplier\n dateTimeCreated\n }\n }\n }\n }\n previousLeaderboard {\n totalCount\n edges {\n node {\n ... on TournamentLeaderboard {\n id\n username\n multiplier\n dateTimeCreated\n }\n }\n }\n }\n enabledGameProviders\n frequency\n mode\n mobileBanner {\n id\n url\n mimeType\n }\n webBanner {\n id\n url\n mimeType\n }\n rewardSettings\n }\n }\n }\n }\n }\n";
@@ -448,6 +448,10 @@ export const CREATE_GCASH_WITHDRAWAL = /* GraphQL */ `
448
448
  name: __typename
449
449
  message
450
450
  }
451
+ ... on FirstDepositRequiredError {
452
+ name: __typename
453
+ message
454
+ }
451
455
  }
452
456
  }
453
457
  `;
@@ -496,6 +500,10 @@ export const CREATE_GCASH_STANDARD_CASH_IN_WITHDRAWAL = /* GraphQL */ `
496
500
  name: __typename
497
501
  message
498
502
  }
503
+ ... on FirstDepositRequiredError {
504
+ name: __typename
505
+ message
506
+ }
499
507
  }
500
508
  }
501
509
  `;
@@ -530,6 +538,10 @@ export const CREATE_MAYA_WITHDRAWAL = /* GraphQL */ `
530
538
  name: __typename
531
539
  message
532
540
  }
541
+ ... on FirstDepositRequiredError {
542
+ name: __typename
543
+ message
544
+ }
533
545
  }
534
546
  }
535
547
  `;
@@ -568,6 +580,10 @@ export const CREATE_MAYA_APP_WITHDRAWAL = /* GraphQL */ `
568
580
  name: __typename
569
581
  message
570
582
  }
583
+ ... on FirstDepositRequiredError {
584
+ name: __typename
585
+ message
586
+ }
571
587
  }
572
588
  }
573
589
  `;
@@ -582,6 +598,10 @@ export const CREATE_BANK_WITHDRAWAL = /* GraphQL */ `
582
598
  name: __typename
583
599
  message
584
600
  }
601
+ ... on FirstDepositRequiredError {
602
+ name: __typename
603
+ message
604
+ }
585
605
  }
586
606
  }
587
607
  `;
@@ -622,6 +642,11 @@ export const CREATE_AIO_INSTAPAY_WITHDRAWAL = /* GraphQL */ `
622
642
  name: __typename
623
643
  message
624
644
  }
645
+ ... on FirstDepositRequiredError {
646
+ name: __typename
647
+ message
648
+ }
649
+
625
650
  }
626
651
  }
627
652
  `;
@@ -662,6 +687,10 @@ export const CREATE_AIO_INSTAPAY_WITHDRAWAL_NEXT = /* GraphQL */ `
662
687
  name: __typename
663
688
  message
664
689
  }
690
+ ... on FirstDepositRequiredError {
691
+ name: __typename
692
+ message
693
+ }
665
694
  }
666
695
  }
667
696
  `;
@@ -706,6 +735,10 @@ export const CREATE_VENTAJA_WITHDRAWAL = /* GraphQL */ `
706
735
  name: __typename
707
736
  message
708
737
  }
738
+ ... on FirstDepositRequiredError {
739
+ name: __typename
740
+ message
741
+ }
709
742
  }
710
743
  }
711
744
  `;
@@ -750,6 +783,10 @@ export const CREATE_PISO_PAY_WITHDRAWAL = /* GraphQL */ `
750
783
  name: __typename
751
784
  message
752
785
  }
786
+ ... on FirstDepositRequiredError {
787
+ name: __typename
788
+ message
789
+ }
753
790
  }
754
791
  }
755
792
  `;
@@ -780,6 +817,10 @@ export const CREATE_MANUAL_UPI_WITHDRAWAL = /* GraphQL */ `
780
817
  name: __typename
781
818
  message
782
819
  }
820
+ ... on FirstDepositRequiredError {
821
+ name: __typename
822
+ message
823
+ }
783
824
  }
784
825
  }
785
826
  `;
@@ -812,6 +853,10 @@ export const CREATE_MANUAL_BANK_WITHDRAWAL = /* GraphQL */ `
812
853
  name: __typename
813
854
  message
814
855
  }
856
+ ... on FirstDepositRequiredError {
857
+ name: __typename
858
+ message
859
+ }
815
860
  }
816
861
  }
817
862
  `;
@@ -2975,6 +3020,11 @@ export const FACEBOOK_CLIENT_ID = /* GraphQL */ `
2975
3020
  facebookClientId
2976
3021
  }
2977
3022
  `;
3023
+ export const REQUIRE_FIRST_DEPOSIT = /* GraphQL */ `
3024
+ query RequireFirstDeposit {
3025
+ requireFirstDeposit
3026
+ }
3027
+ `;
2978
3028
  export const UNLINK_GOOGLE = /* GraphQL */ `
2979
3029
  mutation UnlinkGoogle($input: UnlinkGoogleInput!) {
2980
3030
  unlinkGoogle(input: $input)
@@ -344,6 +344,9 @@ export type CreateWithdrawalError = {
344
344
  } | {
345
345
  name: 'TurnoverRequirementNotYetFulfilledError';
346
346
  message: string;
347
+ } | {
348
+ name: 'FirstDepositRequiredError';
349
+ message: string;
347
350
  };
348
351
  export interface CreateGCashWithdrawalMutation {
349
352
  createGCashWithdrawal?: null | CreateWithdrawalError;
@@ -556,4 +556,5 @@ const ERROR_CODES_MESSAGE_MAP = {
556
556
  GCashDirectApiRequestError: 'GCash direct API request error',
557
557
  ExpiredSessionError: 'Libangan Session has expired',
558
558
  TurnoverRequirementNotYetFulfilledError: 'Turnover requirement not yet fulfilled',
559
+ FirstDepositRequiredError: 'First deposit is required',
559
560
  };
@@ -49,3 +49,4 @@ export declare const getSiteQueryKey: () => QueryKey;
49
49
  export declare const getSessionHealthQueryKey: () => QueryKey;
50
50
  export declare const getGoogleClientIdQueryKey: () => QueryKey;
51
51
  export declare const getFacebookClientIdQueryKey: () => QueryKey;
52
+ export declare const getRequireFirstDepositQueryKey: () => QueryKey;
@@ -46,3 +46,4 @@ export const getSiteQueryKey = () => [PARENT_KEY, 'site', SITE_ID].filter(Boolea
46
46
  export const getSessionHealthQueryKey = () => [PARENT_KEY, 'sessionHealth'].filter(Boolean);
47
47
  export const getGoogleClientIdQueryKey = () => [PARENT_KEY, 'googleClientId'].filter(Boolean);
48
48
  export const getFacebookClientIdQueryKey = () => [PARENT_KEY, 'facebookClientId'].filter(Boolean);
49
+ export const getRequireFirstDepositQueryKey = () => [PARENT_KEY, 'requireFirstDeposit'].filter(Boolean);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.752",
3
+ "version": "0.0.754",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",