@opexa/portal-components 0.0.1085 → 0.0.1087
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/hooks/useRegisterAgentAccount.d.ts +6 -0
- package/dist/client/hooks/useRegisterAgentAccount.js +16 -0
- package/dist/components/AffiliateSignUp/AffiliateSignUp.d.ts +6 -0
- package/dist/components/AffiliateSignUp/AffiliateSignUp.js +175 -0
- package/dist/components/AffiliateSignUp/index.d.ts +1 -0
- package/dist/components/AffiliateSignUp/index.js +1 -0
- package/dist/components/Quests/RemainingTime.js +13 -4
- package/dist/services/account.d.ts +28 -0
- package/dist/services/account.js +11 -1
- package/dist/services/queries.d.ts +1 -0
- package/dist/services/queries.js +19 -0
- package/dist/ui/Field/Field.d.ts +21 -21
- package/dist/ui/Field/field.recipe.d.ts +3 -3
- package/dist/ui/Field/field.recipe.js +1 -1
- package/dist/utils/mutationKeys.d.ts +1 -0
- package/dist/utils/mutationKeys.js +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type RegisterAgentAccountInput } from '../../services/account';
|
|
2
|
+
import type { Mutation } from '../../types';
|
|
3
|
+
export interface RegisterAgentAccountMutationPayload extends RegisterAgentAccountInput {
|
|
4
|
+
agentCode?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare const useRegisterAgentAccount: Mutation<void, RegisterAgentAccountMutationPayload>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { useMutation } from '@tanstack/react-query';
|
|
2
|
+
import { registerAgentAccount, } from '../../services/account.js';
|
|
3
|
+
import { getRegisterAgentAccountMutationKey } from '../../utils/mutationKeys.js';
|
|
4
|
+
export const useRegisterAgentAccount = (config) => {
|
|
5
|
+
return useMutation({
|
|
6
|
+
...config,
|
|
7
|
+
mutationKey: getRegisterAgentAccountMutationKey(),
|
|
8
|
+
mutationFn: async ({ agentCode, ...input }) => {
|
|
9
|
+
await registerAgentAccount(input, {
|
|
10
|
+
headers: {
|
|
11
|
+
...(agentCode ? { 'Agent-Code': agentCode } : {}),
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type ImageProps } from 'next/image';
|
|
2
|
+
export interface AffiliateSignUpProps {
|
|
3
|
+
logo: ImageProps['src'];
|
|
4
|
+
banner: ImageProps['src'];
|
|
5
|
+
}
|
|
6
|
+
export declare function AffiliateSignUp({ logo, banner }: AffiliateSignUpProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { zodResolver } from '@hookform/resolvers/zod';
|
|
4
|
+
import Link from 'next/dist/client/link';
|
|
5
|
+
import Image, {} from 'next/image';
|
|
6
|
+
import { useSearchParams } from 'next/navigation';
|
|
7
|
+
import { useState } from 'react';
|
|
8
|
+
import { useForm, useWatch } from 'react-hook-form';
|
|
9
|
+
import { z } from 'zod';
|
|
10
|
+
import { useLocaleInfo } from '../../client/hooks/useLocaleInfo.js';
|
|
11
|
+
import { useMobileNumberParser } from '../../client/hooks/useMobileNumberParser.js';
|
|
12
|
+
import { useRegisterAgentAccount } from '../../client/hooks/useRegisterAgentAccount.js';
|
|
13
|
+
import { Button } from '../../ui/Button/index.js';
|
|
14
|
+
import { Field } from '../../ui/Field/index.js';
|
|
15
|
+
const visitorOptions = [
|
|
16
|
+
{ label: '10 - 100', value: '10-100' },
|
|
17
|
+
{ label: '100 - 500', value: '100-500' },
|
|
18
|
+
{ label: '1,000 - 5,000', value: '1000-5000' },
|
|
19
|
+
{ label: '5,000 - 10,000', value: '5000-10000' },
|
|
20
|
+
{ label: 'Over 10,000', value: 'over-10000' },
|
|
21
|
+
];
|
|
22
|
+
const signUpOptions = [
|
|
23
|
+
{ label: '10 - 100', value: '10-100' },
|
|
24
|
+
{ label: '100 - 500', value: '100-500' },
|
|
25
|
+
{ label: '500 - 1,000', value: '500-1000' },
|
|
26
|
+
{ label: 'Over 1,000', value: 'over-1000' },
|
|
27
|
+
];
|
|
28
|
+
const affiliateOptions = [
|
|
29
|
+
{ label: 'Freelance individual', value: 'freelance-individual' },
|
|
30
|
+
{ label: 'Email promoter', value: 'email-promoter' },
|
|
31
|
+
{ label: 'Company', value: 'company' },
|
|
32
|
+
{ label: 'Other', value: 'other' },
|
|
33
|
+
];
|
|
34
|
+
const sourceOptions = [
|
|
35
|
+
{ label: 'SEO', value: 'seo' },
|
|
36
|
+
{ label: 'Ads', value: 'ads' },
|
|
37
|
+
{ label: 'Streamer', value: 'streamer' },
|
|
38
|
+
{ label: 'Other', value: 'other' },
|
|
39
|
+
];
|
|
40
|
+
export function AffiliateSignUp({ logo, banner }) {
|
|
41
|
+
const searchParams = useSearchParams();
|
|
42
|
+
const mobileNumberParser = useMobileNumberParser();
|
|
43
|
+
const agentCode = searchParams.get('code') ?? undefined;
|
|
44
|
+
const localeInfo = useLocaleInfo();
|
|
45
|
+
const [statusMessage, setStatusMessage] = useState(null);
|
|
46
|
+
const [statusType, setStatusType] = useState(null);
|
|
47
|
+
const [isSuccess, setIsSuccess] = useState(false);
|
|
48
|
+
const registerAgentAccountMutation = useRegisterAgentAccount();
|
|
49
|
+
const schema = z
|
|
50
|
+
.object({
|
|
51
|
+
name: z
|
|
52
|
+
.string()
|
|
53
|
+
.trim()
|
|
54
|
+
.min(6, 'Name must be at least 6 characters')
|
|
55
|
+
.regex(/^[a-zA-Z0-9]+$/, 'Only letters and numbers allowed'),
|
|
56
|
+
firstName: z.string().trim().min(1, 'First name is required'),
|
|
57
|
+
lastName: z.string().trim().min(1, 'Last name is required'),
|
|
58
|
+
emailAddress: z.string().trim().email('Email is invalid'),
|
|
59
|
+
mobileNumber: z
|
|
60
|
+
.string()
|
|
61
|
+
.min(1, 'Mobile number is required')
|
|
62
|
+
.superRefine((v, ctx) => {
|
|
63
|
+
if (!mobileNumberParser.validate(v)) {
|
|
64
|
+
ctx.addIssue({
|
|
65
|
+
code: z.ZodIssueCode.custom,
|
|
66
|
+
message: 'Invalid mobile number',
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
}),
|
|
70
|
+
affiliateType: z.string().min(1, 'Please select affiliate type'),
|
|
71
|
+
affiliateTypeOther: z.string().optional(),
|
|
72
|
+
sourceType: z.string().min(1, 'Please select source of traffic'),
|
|
73
|
+
sourceTypeOther: z.string().optional(),
|
|
74
|
+
monthlyVisitors: z.string().optional(),
|
|
75
|
+
monthlySignUp: z.string().optional(),
|
|
76
|
+
monthlyDeposit: z.string().optional(),
|
|
77
|
+
})
|
|
78
|
+
.superRefine((values, ctx) => {
|
|
79
|
+
if (values.affiliateType === 'other' && !values.affiliateTypeOther)
|
|
80
|
+
ctx.addIssue({
|
|
81
|
+
code: z.ZodIssueCode.custom,
|
|
82
|
+
message: 'Please specify affiliate type',
|
|
83
|
+
path: ['affiliateTypeOther'],
|
|
84
|
+
});
|
|
85
|
+
if (values.sourceType === 'other' && !values.sourceTypeOther)
|
|
86
|
+
ctx.addIssue({
|
|
87
|
+
code: z.ZodIssueCode.custom,
|
|
88
|
+
message: 'Please specify source of traffic',
|
|
89
|
+
path: ['sourceTypeOther'],
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
const form = useForm({
|
|
93
|
+
resolver: zodResolver(schema),
|
|
94
|
+
defaultValues: {
|
|
95
|
+
name: '',
|
|
96
|
+
firstName: '',
|
|
97
|
+
lastName: '',
|
|
98
|
+
emailAddress: '',
|
|
99
|
+
mobileNumber: '',
|
|
100
|
+
affiliateType: '',
|
|
101
|
+
affiliateTypeOther: '',
|
|
102
|
+
sourceType: '',
|
|
103
|
+
sourceTypeOther: '',
|
|
104
|
+
monthlyVisitors: '',
|
|
105
|
+
monthlySignUp: '',
|
|
106
|
+
monthlyDeposit: '',
|
|
107
|
+
},
|
|
108
|
+
});
|
|
109
|
+
const affiliateType = useWatch({
|
|
110
|
+
control: form.control,
|
|
111
|
+
name: 'affiliateType',
|
|
112
|
+
});
|
|
113
|
+
const sourceType = useWatch({
|
|
114
|
+
control: form.control,
|
|
115
|
+
name: 'sourceType',
|
|
116
|
+
});
|
|
117
|
+
const handleSubmit = form.handleSubmit(async (values) => {
|
|
118
|
+
setStatusMessage(null);
|
|
119
|
+
setStatusType(null);
|
|
120
|
+
const customProperties = [
|
|
121
|
+
{ key: 'visitors_per_month', value: values.monthlyVisitors ?? '' },
|
|
122
|
+
{ key: 'expected_signups', value: values.monthlySignUp ?? '' },
|
|
123
|
+
{ key: 'expected_deposits', value: values.monthlyDeposit ?? '' },
|
|
124
|
+
{
|
|
125
|
+
key: 'affiliate_type',
|
|
126
|
+
value: values.affiliateType === 'other'
|
|
127
|
+
? (values.affiliateTypeOther ?? '')
|
|
128
|
+
: values.affiliateType,
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
key: 'traffic_source',
|
|
132
|
+
value: values.sourceType === 'other'
|
|
133
|
+
? (values.sourceTypeOther ?? '')
|
|
134
|
+
: values.sourceType,
|
|
135
|
+
},
|
|
136
|
+
].filter((item) => item.value.trim() !== '');
|
|
137
|
+
try {
|
|
138
|
+
await registerAgentAccountMutation.mutateAsync({
|
|
139
|
+
name: values.name,
|
|
140
|
+
firstName: values.firstName,
|
|
141
|
+
lastName: values.lastName,
|
|
142
|
+
emailAddress: values.emailAddress,
|
|
143
|
+
mobileNumber: values.mobileNumber.startsWith('+')
|
|
144
|
+
? values.mobileNumber
|
|
145
|
+
: `+63${values.mobileNumber}`,
|
|
146
|
+
customProperties,
|
|
147
|
+
agentCode,
|
|
148
|
+
});
|
|
149
|
+
setStatusType('success');
|
|
150
|
+
setStatusMessage('Registration successful.');
|
|
151
|
+
setIsSuccess(true);
|
|
152
|
+
}
|
|
153
|
+
catch (error) {
|
|
154
|
+
setStatusType('error');
|
|
155
|
+
setStatusMessage(error instanceof Error
|
|
156
|
+
? error.message
|
|
157
|
+
: 'Registration failed. Please try again.');
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
return (_jsx("div", { className: "flex min-h-dvh items-center justify-center", children: _jsx("div", { className: "h-full w-full", children: _jsxs("div", { className: "flex min-h-screen", children: [_jsx(Image, { src: banner, alt: "Affiliate banner", draggable: false, className: "sticky top-0 hidden h-screen w-auto object-contain object-left xl:block" }), isSuccess ? (_jsx(RegistrationSuccess, { onReset: () => {
|
|
161
|
+
setIsSuccess(false);
|
|
162
|
+
setStatusMessage(null);
|
|
163
|
+
setStatusType(null);
|
|
164
|
+
form.reset();
|
|
165
|
+
} })) : (_jsxs("div", { className: "[&::-webkit-scrollbar]:display-none flex-1 grow overflow-y-auto px-4 py-8 [-ms-overflow-style:none] [scrollbar-width:none] xl:p-12 2xl:p-16", children: [_jsx(Image, { src: logo, alt: "Logo", draggable: false, className: "mb-6 block h-10 w-auto" }), _jsx("h1", { className: "font-semibold text-3xl", children: "Affiliate Registration" }), _jsx("p", { className: "mb-5 text-sm text-text-secondary-700 xl:text-base", children: "Register now to start earning commission from your referrals." }), _jsxs("form", { onSubmit: handleSubmit, className: "space-y-4", children: [_jsxs(Field.Root, { invalid: !!form.formState.errors.name, children: [_jsx(Field.Label, { children: "Name" }), _jsx(Field.Input, { ...form.register('name'), placeholder: "Enter username" }), _jsx(Field.ErrorText, { children: form.formState.errors.name?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.firstName, children: [_jsx(Field.Label, { children: "First name" }), _jsx(Field.Input, { ...form.register('firstName'), placeholder: "First name" }), _jsx(Field.ErrorText, { children: form.formState.errors.firstName?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.lastName, children: [_jsx(Field.Label, { children: "Last name" }), _jsx(Field.Input, { ...form.register('lastName'), placeholder: "Last name" }), _jsx(Field.ErrorText, { children: form.formState.errors.lastName?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.emailAddress, children: [_jsx(Field.Label, { children: "Email address" }), _jsx(Field.Input, { ...form.register('emailAddress'), placeholder: "Email" }), _jsx(Field.ErrorText, { children: form.formState.errors.emailAddress?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.mobileNumber, className: "mt-xl", children: [_jsx(Field.Label, { children: "Mobile Number" }), _jsxs("div", { className: "relative", children: [_jsxs("div", { className: "-translate-y-1/2 absolute top-1/2 left-3.5 flex shrink-0 items-center gap-md", children: [_jsx(localeInfo.country.flag, { className: "size-5" }), _jsx("span", { className: "text-text-placeholder", children: localeInfo.mobileNumber.areaCode })] }), _jsx(Field.Input, { style: {
|
|
166
|
+
paddingLeft: `calc(2.75rem + ${localeInfo.mobileNumber.areaCode.length}ch)`,
|
|
167
|
+
}, ...form.register('mobileNumber') })] }), _jsx(Field.ErrorText, { children: form.formState.errors.mobileNumber?.message })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.affiliateType, children: [_jsx(Field.Label, { children: "Affiliate type" }), _jsxs(Field.Select, { ...form.register('affiliateType'), children: [_jsx("option", { value: "", children: "Select affiliate type" }), affiliateOptions.map((option) => (_jsx("option", { value: option.value, children: option.label }, option.value)))] }), _jsx(Field.ErrorText, { children: form.formState.errors.affiliateType?.message })] }), affiliateType === 'other' && (_jsxs(Field.Root, { invalid: !!form.formState.errors.affiliateTypeOther, children: [_jsx(Field.Label, { children: "Other affiliate type" }), _jsx(Field.Input, { ...form.register('affiliateTypeOther'), placeholder: "Type affiliate type" }), _jsx(Field.ErrorText, { children: form.formState.errors.affiliateTypeOther?.message })] })), _jsxs(Field.Root, { invalid: !!form.formState.errors.sourceType, children: [_jsx(Field.Label, { children: "Source of traffic" }), _jsxs(Field.Select, { ...form.register('sourceType'), children: [_jsx("option", { value: "", children: "Select source" }), sourceOptions.map((option) => (_jsx("option", { value: option.value, children: option.label }, option.value)))] }), _jsx(Field.ErrorText, { children: form.formState.errors.sourceType?.message })] }), sourceType === 'other' && (_jsxs(Field.Root, { invalid: !!form.formState.errors.sourceTypeOther, children: [_jsx(Field.Label, { children: "Other source" }), _jsx(Field.Input, { ...form.register('sourceTypeOther'), placeholder: "Source" }), _jsx(Field.ErrorText, { children: form.formState.errors.sourceTypeOther?.message })] })), _jsxs(Field.Root, { invalid: !!form.formState.errors.monthlyVisitors, children: [_jsx(Field.Label, { children: "Estimated monthly visitors" }), _jsxs(Field.Select, { ...form.register('monthlyVisitors'), children: [_jsx("option", { value: "", children: "Select visitors" }), visitorOptions.map((option) => (_jsx("option", { value: option.value, children: option.label }, option.value)))] })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.monthlySignUp, children: [_jsx(Field.Label, { children: "Estimated monthly signups" }), _jsxs(Field.Select, { ...form.register('monthlySignUp'), children: [_jsx("option", { value: "", children: "Select signups" }), signUpOptions.map((option) => (_jsx("option", { value: option.value, children: option.label }, option.value)))] })] }), _jsxs(Field.Root, { invalid: !!form.formState.errors.monthlyDeposit, children: [_jsx(Field.Label, { children: "Estimated monthly deposits" }), _jsxs(Field.Select, { ...form.register('monthlyDeposit'), children: [_jsx("option", { value: "", children: "Select deposits" }), signUpOptions.map((option) => (_jsx("option", { value: option.value, children: option.label }, option.value)))] })] }), statusMessage && (_jsx("div", { className: statusType === 'success'
|
|
168
|
+
? 'rounded border border-green-500 bg-green-50 p-2 text-green-700 text-sm'
|
|
169
|
+
: 'rounded border border-red-500 bg-red-50 p-2 text-red-700 text-sm', children: statusMessage })), _jsx(Button, { type: "submit", disabled: form.formState.isSubmitting, className: "mt-8", children: form.formState.isSubmitting
|
|
170
|
+
? 'Submitting...'
|
|
171
|
+
: 'Register Now' })] })] }))] }) }) }));
|
|
172
|
+
}
|
|
173
|
+
function RegistrationSuccess({ onReset }) {
|
|
174
|
+
return (_jsx("div", { className: "[&::-webkit-scrollbar]:display-none flex-1 grow overflow-y-auto px-4 py-8 [-ms-overflow-style:none] [scrollbar-width:none] xl:p-12 2xl:p-16", children: _jsx("div", { className: "mx-4 flex min-h-full flex-col justify-center md:mx-0", children: _jsxs("div", { className: "w-full space-y-6 text-center", children: [_jsxs("div", { className: "space-y-2", children: [_jsx("h1", { className: "font-semibold text-2xl tracking-tight md:text-3xl", children: "Registration Successful" }), _jsx("p", { className: "text-sm leading-relaxed md:text-base", children: "Thank you for your interest in joining our Affiliate Program. Our team will review your application and contact you via email once it has been processed." })] }), _jsx("div", { className: "pt-4", children: _jsx(Link, { href: "/", onClick: onReset, children: _jsx(Button, { type: "submit", className: "mx-auto mt-8 block w-1/2", children: "Back to Homepage" }) }) })] }) }) }));
|
|
175
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AffiliateSignUp';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './AffiliateSignUp.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { endOfDay } from 'date-fns';
|
|
2
3
|
import { useMemo } from 'react';
|
|
3
4
|
import { useRemainingTime } from '../../client/hooks/useRemainingTime.js';
|
|
4
5
|
import { ClockStopWatchIcon } from '../../icons/ClockStopWatchIcon.js';
|
|
@@ -7,10 +8,18 @@ import { useQuestContext } from './QuestsContext.js';
|
|
|
7
8
|
export function RemainingTime({ endOfDay: useEndOfDay = false, className, }) {
|
|
8
9
|
const quest = useQuestContext();
|
|
9
10
|
const targetDateTime = useMemo(() => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
if (quest.daysToClear) {
|
|
12
|
+
const date = new Date(quest.dateTimeCreated);
|
|
13
|
+
date.setDate(date.getDate() + Number(quest.daysToClear));
|
|
14
|
+
return useEndOfDay ? endOfDay(date) : date;
|
|
15
|
+
}
|
|
16
|
+
return new Date(quest.endDateTime);
|
|
17
|
+
}, [
|
|
18
|
+
quest.dateTimeCreated,
|
|
19
|
+
quest.daysToClear,
|
|
20
|
+
quest.endDateTime,
|
|
21
|
+
useEndOfDay,
|
|
22
|
+
]);
|
|
14
23
|
const remainingTime = useRemainingTime(targetDateTime);
|
|
15
24
|
if (quest.status === 'COMPLETED') {
|
|
16
25
|
return (_jsx(Badge.Root, { size: "lg", colorScheme: "success", round: false, className: className?.completedBadgeRoot, children: _jsx(Badge.Label, { className: className?.completedBadgeLabel, children: "Completed" }) }));
|
|
@@ -373,6 +373,34 @@ export interface RegisterMayaMemberAccountMutationVariables {
|
|
|
373
373
|
}
|
|
374
374
|
export type RegisterMayaMemberAccountInput = Simplify<RegisterMayaMemberAccountMutationVariables['input']>;
|
|
375
375
|
export declare const registerMayaMemberAccount: (input: RegisterMayaMemberAccountInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
376
|
+
export interface RegisterAgentAccountInput {
|
|
377
|
+
name: string;
|
|
378
|
+
firstName: string;
|
|
379
|
+
lastName: string;
|
|
380
|
+
mobileNumber: string;
|
|
381
|
+
emailAddress: string;
|
|
382
|
+
customProperties?: {
|
|
383
|
+
key: string;
|
|
384
|
+
value: string;
|
|
385
|
+
}[];
|
|
386
|
+
}
|
|
387
|
+
export type RegisterAgentAccountError = {
|
|
388
|
+
name: 'AccountNameNotAvailableError';
|
|
389
|
+
message: string;
|
|
390
|
+
} | {
|
|
391
|
+
name: 'EmailAddressNotAvailableError';
|
|
392
|
+
message: string;
|
|
393
|
+
} | {
|
|
394
|
+
name: 'MobileNumberNotAvailableError';
|
|
395
|
+
message: string;
|
|
396
|
+
};
|
|
397
|
+
export interface RegisterAgentAccountMutation {
|
|
398
|
+
registerAgentAccount?: null | RegisterAgentAccountError;
|
|
399
|
+
}
|
|
400
|
+
export interface RegisterAgentAccountMutationVariables {
|
|
401
|
+
input: RegisterAgentAccountInput;
|
|
402
|
+
}
|
|
403
|
+
export declare const registerAgentAccount: (input: RegisterAgentAccountInput, options?: GraphQLRequestOptions) => Promise<void>;
|
|
376
404
|
export interface ReferralCodeQuery {
|
|
377
405
|
referralCode?: string | null;
|
|
378
406
|
}
|
package/dist/services/account.js
CHANGED
|
@@ -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, REQUIRE_FIRST_DEPOSIT, RESET_PASSWORD, RESTRICT_WITHDRAWALS_TO_VERIFIED_MEMBERS, UNLINK_FACEBOOK, UNLINK_GOOGLE, UPDATE_MEMBER_ACCOUNT, UPDATE_MEMBER_VERIFICATION, UPDATE_MEMBER_VERIFICATION__NEXT, UPDATE_MOBILE_NUMBER, 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_AGENT_ACCOUNT, 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, RESTRICT_WITHDRAWALS_TO_VERIFIED_MEMBERS, UNLINK_FACEBOOK, UNLINK_GOOGLE, UPDATE_MEMBER_ACCOUNT, UPDATE_MEMBER_VERIFICATION, UPDATE_MEMBER_VERIFICATION__NEXT, UPDATE_MOBILE_NUMBER, 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);
|
|
@@ -250,6 +250,16 @@ export const registerMayaMemberAccount = async (input, options) => {
|
|
|
250
250
|
throw error;
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
|
+
export const registerAgentAccount = async (input, options) => {
|
|
254
|
+
const res = await graphqlRequest(ACCOUNT_GRAPHQL_ENDPOINT, REGISTER_AGENT_ACCOUNT, { input }, options);
|
|
255
|
+
if (res.registerAgentAccount) {
|
|
256
|
+
const error = new Error();
|
|
257
|
+
error.name = res.registerAgentAccount.name;
|
|
258
|
+
error.message = ERROR_CODES_MESSAGE_MAP[res.registerAgentAccount.name];
|
|
259
|
+
Error.captureStackTrace?.(error, registerAgentAccount);
|
|
260
|
+
throw error;
|
|
261
|
+
}
|
|
262
|
+
};
|
|
253
263
|
export const getReferralCode = cache(async (options) => {
|
|
254
264
|
const res = await graphqlRequest(ACCOUNT_GRAPHQL_ENDPOINT, REFERRAL_CODE, undefined, options);
|
|
255
265
|
return res.referralCode ?? null;
|
|
@@ -85,6 +85,7 @@ export declare const REGISTER_MEMBER_ACCOUNT_BY_NAME = "\n mutation RegisterMem
|
|
|
85
85
|
export declare const REGISTER_MEMBER_ACCOUNT_VIA_MOBILE = "\n mutation RegisterMemberAccountViaMobile(\n $input: RegisterMemberAccountViaMobileInput!\n $referralCode: String\n $reCAPTCHAResponse: String\n $verificationCode: String\n ) {\n registerMemberAccountViaMobile(\n input: $input\n referralCode: $referralCode\n verificationCode: $verificationCode\n reCAPTCHAResponse: $reCAPTCHAResponse\n ) {\n ... on InvalidPlatformError {\n name: __typename\n message\n }\n ... on InvalidReCAPTCHAResponseError {\n name: __typename\n message\n }\n ... on InvalidSMSVerificationCodeError {\n name: __typename\n message\n }\n ... on MobileNumberNotAvailableError {\n name: __typename\n message\n }\n ... on ReCAPTCHAVerificationFailedError {\n name: __typename\n message\n }\n }\n }\n";
|
|
86
86
|
export declare const REGISTER_MEMBER_ACCOUNT__NEXT = "\n mutation RegisterMemberAccount(\n $input: RegisterMemberAccountInput_next!\n $reCAPTCHAResponse: String\n ) {\n registerMemberAccount: registerMemberAccount_next(\n input: $input\n reCAPTCHAResponse: $reCAPTCHAResponse\n ) {\n ... on AccountNameNotAvailableError {\n name: __typename\n message\n }\n ... on InvalidPlatformError {\n name: __typename\n message\n }\n ... on InvalidReCAPTCHAResponseError {\n name: __typename\n message\n }\n ... on InvalidSMSVerificationCodeError {\n name: __typename\n message\n }\n ... on MinimumAgeRequirementError {\n name: __typename\n message\n }\n ... on MobileNumberNotAvailableError {\n name: __typename\n message\n }\n ... on ReCAPTCHAVerificationFailedError {\n name: __typename\n message\n }\n }\n }\n";
|
|
87
87
|
export declare const REGISTER_MAYA_MEMBER_ACCOUNT = "\n mutation RegisterMayaMemberAccount($input: RegisterMayaMemberAccountInput!) {\n registerMayaMemberAccount(input: $input) {\n ... on AccountNameNotAvailableError {\n name: __typename\n message\n }\n }\n }\n";
|
|
88
|
+
export declare const REGISTER_AGENT_ACCOUNT = "\n mutation RegisterAgentAccount($input: RegisterAgentAccountInput!) {\n registerAgentAccount(input: $input) {\n __typename\n ... on AccountNameNotAvailableError {\n name: __typename\n message\n }\n ... on EmailAddressNotAvailableError {\n name: __typename\n message\n }\n ... on MobileNumberNotAvailableError {\n name: __typename\n message\n }\n }\n }\n";
|
|
88
89
|
export declare const UPDATE_MEMBER_ACCOUNT = "\n mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {\n updateMemberAccount(input: $input) {\n ... on AccountNameNotAvailableError {\n name: __typename\n message\n }\n ... on EmailAddressNotAvailableError {\n name: __typename\n message\n }\n ... on InvalidTransactionPasswordError {\n name: __typename\n message\n }\n ... on MobileNumberNotAvailableError {\n name: __typename\n message\n }\n ... on NickNameNotAvailableError {\n name: __typename\n message\n }\n ... on RealNameAlreadySetError {\n name: __typename\n message\n }\n ... on ValidIdAlreadySetError {\n name: __typename\n message\n }\n }\n }\n";
|
|
89
90
|
export declare const RESET_PASSWORD = "\n mutation ResetPassword(\n $input: ResetPasswordInput!\n $verificationCode: String\n ) {\n resetPassword(input: $input, verificationCode: $verificationCode) {\n ... on AccountNotFoundError {\n name: __typename\n message\n }\n ... on InvalidVerificationCodeError {\n name: __typename\n message\n }\n }\n }\n";
|
|
90
91
|
export declare const DELETE_MEMBER_ACCOUNT = "\n mutation DeleteMemberAccount($input: DeleteMemberAccountInput!) {\n deleteMemberAccount(input: $input)\n }\n";
|
package/dist/services/queries.js
CHANGED
|
@@ -2334,6 +2334,25 @@ export const REGISTER_MAYA_MEMBER_ACCOUNT = /* GraphQL */ `
|
|
|
2334
2334
|
}
|
|
2335
2335
|
}
|
|
2336
2336
|
`;
|
|
2337
|
+
export const REGISTER_AGENT_ACCOUNT = /* GraphQL */ `
|
|
2338
|
+
mutation RegisterAgentAccount($input: RegisterAgentAccountInput!) {
|
|
2339
|
+
registerAgentAccount(input: $input) {
|
|
2340
|
+
__typename
|
|
2341
|
+
... on AccountNameNotAvailableError {
|
|
2342
|
+
name: __typename
|
|
2343
|
+
message
|
|
2344
|
+
}
|
|
2345
|
+
... on EmailAddressNotAvailableError {
|
|
2346
|
+
name: __typename
|
|
2347
|
+
message
|
|
2348
|
+
}
|
|
2349
|
+
... on MobileNumberNotAvailableError {
|
|
2350
|
+
name: __typename
|
|
2351
|
+
message
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
2354
|
+
}
|
|
2355
|
+
`;
|
|
2337
2356
|
export const UPDATE_MEMBER_ACCOUNT = /* GraphQL */ `
|
|
2338
2357
|
mutation UpdateMemberAccount($input: UpdateMemberAccountInput!) {
|
|
2339
2358
|
updateMemberAccount(input: $input) {
|
package/dist/ui/Field/Field.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
18
18
|
colorScheme: {
|
|
19
19
|
gray: {};
|
|
20
20
|
};
|
|
21
|
-
}, Record<"
|
|
21
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, undefined, {
|
|
22
22
|
size: {
|
|
23
23
|
sm: {
|
|
24
24
|
input: string;
|
|
@@ -37,7 +37,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
37
37
|
colorScheme: {
|
|
38
38
|
gray: {};
|
|
39
39
|
};
|
|
40
|
-
}, Record<"
|
|
40
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
41
41
|
size: {
|
|
42
42
|
sm: {
|
|
43
43
|
input: string;
|
|
@@ -56,7 +56,7 @@ export declare const Root: import("react").ComponentType<import("@ark-ui/react")
|
|
|
56
56
|
colorScheme: {
|
|
57
57
|
gray: {};
|
|
58
58
|
};
|
|
59
|
-
}, Record<"
|
|
59
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
60
60
|
export declare const Label: import("react").ComponentType<import("@ark-ui/react").Assign<Field.LabelProps & import("react").RefAttributes<HTMLLabelElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
61
61
|
size: {
|
|
62
62
|
sm: {
|
|
@@ -76,7 +76,7 @@ export declare const Label: import("react").ComponentType<import("@ark-ui/react"
|
|
|
76
76
|
colorScheme: {
|
|
77
77
|
gray: {};
|
|
78
78
|
};
|
|
79
|
-
}, Record<"
|
|
79
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, undefined, {
|
|
80
80
|
size: {
|
|
81
81
|
sm: {
|
|
82
82
|
input: string;
|
|
@@ -95,7 +95,7 @@ export declare const Label: import("react").ComponentType<import("@ark-ui/react"
|
|
|
95
95
|
colorScheme: {
|
|
96
96
|
gray: {};
|
|
97
97
|
};
|
|
98
|
-
}, Record<"
|
|
98
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
99
99
|
size: {
|
|
100
100
|
sm: {
|
|
101
101
|
input: string;
|
|
@@ -114,7 +114,7 @@ export declare const Label: import("react").ComponentType<import("@ark-ui/react"
|
|
|
114
114
|
colorScheme: {
|
|
115
115
|
gray: {};
|
|
116
116
|
};
|
|
117
|
-
}, Record<"
|
|
117
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
118
118
|
export declare const Input: import("react").ComponentType<import("@ark-ui/react").Assign<Field.InputProps & import("react").RefAttributes<HTMLInputElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
119
119
|
size: {
|
|
120
120
|
sm: {
|
|
@@ -134,7 +134,7 @@ export declare const Input: import("react").ComponentType<import("@ark-ui/react"
|
|
|
134
134
|
colorScheme: {
|
|
135
135
|
gray: {};
|
|
136
136
|
};
|
|
137
|
-
}, Record<"
|
|
137
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, undefined, {
|
|
138
138
|
size: {
|
|
139
139
|
sm: {
|
|
140
140
|
input: string;
|
|
@@ -153,7 +153,7 @@ export declare const Input: import("react").ComponentType<import("@ark-ui/react"
|
|
|
153
153
|
colorScheme: {
|
|
154
154
|
gray: {};
|
|
155
155
|
};
|
|
156
|
-
}, Record<"
|
|
156
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
157
157
|
size: {
|
|
158
158
|
sm: {
|
|
159
159
|
input: string;
|
|
@@ -172,7 +172,7 @@ export declare const Input: import("react").ComponentType<import("@ark-ui/react"
|
|
|
172
172
|
colorScheme: {
|
|
173
173
|
gray: {};
|
|
174
174
|
};
|
|
175
|
-
}, Record<"
|
|
175
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
176
176
|
export declare const HelperText: import("react").ComponentType<import("@ark-ui/react").Assign<Field.HelperTextProps & import("react").RefAttributes<HTMLSpanElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
177
177
|
size: {
|
|
178
178
|
sm: {
|
|
@@ -192,7 +192,7 @@ export declare const HelperText: import("react").ComponentType<import("@ark-ui/r
|
|
|
192
192
|
colorScheme: {
|
|
193
193
|
gray: {};
|
|
194
194
|
};
|
|
195
|
-
}, Record<"
|
|
195
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, undefined, {
|
|
196
196
|
size: {
|
|
197
197
|
sm: {
|
|
198
198
|
input: string;
|
|
@@ -211,7 +211,7 @@ export declare const HelperText: import("react").ComponentType<import("@ark-ui/r
|
|
|
211
211
|
colorScheme: {
|
|
212
212
|
gray: {};
|
|
213
213
|
};
|
|
214
|
-
}, Record<"
|
|
214
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
215
215
|
size: {
|
|
216
216
|
sm: {
|
|
217
217
|
input: string;
|
|
@@ -230,7 +230,7 @@ export declare const HelperText: import("react").ComponentType<import("@ark-ui/r
|
|
|
230
230
|
colorScheme: {
|
|
231
231
|
gray: {};
|
|
232
232
|
};
|
|
233
|
-
}, Record<"
|
|
233
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
234
234
|
export declare const ErrorText: import("react").ComponentType<import("@ark-ui/react").Assign<Field.ErrorTextProps & import("react").RefAttributes<HTMLSpanElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
235
235
|
size: {
|
|
236
236
|
sm: {
|
|
@@ -250,7 +250,7 @@ export declare const ErrorText: import("react").ComponentType<import("@ark-ui/re
|
|
|
250
250
|
colorScheme: {
|
|
251
251
|
gray: {};
|
|
252
252
|
};
|
|
253
|
-
}, Record<"
|
|
253
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, undefined, {
|
|
254
254
|
size: {
|
|
255
255
|
sm: {
|
|
256
256
|
input: string;
|
|
@@ -269,7 +269,7 @@ export declare const ErrorText: import("react").ComponentType<import("@ark-ui/re
|
|
|
269
269
|
colorScheme: {
|
|
270
270
|
gray: {};
|
|
271
271
|
};
|
|
272
|
-
}, Record<"
|
|
272
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
273
273
|
size: {
|
|
274
274
|
sm: {
|
|
275
275
|
input: string;
|
|
@@ -288,7 +288,7 @@ export declare const ErrorText: import("react").ComponentType<import("@ark-ui/re
|
|
|
288
288
|
colorScheme: {
|
|
289
289
|
gray: {};
|
|
290
290
|
};
|
|
291
|
-
}, Record<"
|
|
291
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
292
292
|
export declare const Select: import("react").ComponentType<import("@ark-ui/react").Assign<Field.SelectProps & import("react").RefAttributes<HTMLSelectElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
293
293
|
size: {
|
|
294
294
|
sm: {
|
|
@@ -308,7 +308,7 @@ export declare const Select: import("react").ComponentType<import("@ark-ui/react
|
|
|
308
308
|
colorScheme: {
|
|
309
309
|
gray: {};
|
|
310
310
|
};
|
|
311
|
-
}, Record<"
|
|
311
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, undefined, {
|
|
312
312
|
size: {
|
|
313
313
|
sm: {
|
|
314
314
|
input: string;
|
|
@@ -327,7 +327,7 @@ export declare const Select: import("react").ComponentType<import("@ark-ui/react
|
|
|
327
327
|
colorScheme: {
|
|
328
328
|
gray: {};
|
|
329
329
|
};
|
|
330
|
-
}, Record<"
|
|
330
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
331
331
|
size: {
|
|
332
332
|
sm: {
|
|
333
333
|
input: string;
|
|
@@ -346,7 +346,7 @@ export declare const Select: import("react").ComponentType<import("@ark-ui/react
|
|
|
346
346
|
colorScheme: {
|
|
347
347
|
gray: {};
|
|
348
348
|
};
|
|
349
|
-
}, Record<"
|
|
349
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
350
350
|
export declare const Textarea: import("react").ComponentType<import("@ark-ui/react").Assign<Field.TextareaProps & import("react").RefAttributes<HTMLTextAreaElement>, import("tailwind-variants").VariantProps<import("tailwind-variants").TVReturnType<{
|
|
351
351
|
size: {
|
|
352
352
|
sm: {
|
|
@@ -366,7 +366,7 @@ export declare const Textarea: import("react").ComponentType<import("@ark-ui/rea
|
|
|
366
366
|
colorScheme: {
|
|
367
367
|
gray: {};
|
|
368
368
|
};
|
|
369
|
-
}, Record<"
|
|
369
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, undefined, {
|
|
370
370
|
size: {
|
|
371
371
|
sm: {
|
|
372
372
|
input: string;
|
|
@@ -385,7 +385,7 @@ export declare const Textarea: import("react").ComponentType<import("@ark-ui/rea
|
|
|
385
385
|
colorScheme: {
|
|
386
386
|
gray: {};
|
|
387
387
|
};
|
|
388
|
-
}, Record<"
|
|
388
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
389
389
|
size: {
|
|
390
390
|
sm: {
|
|
391
391
|
input: string;
|
|
@@ -404,5 +404,5 @@ export declare const Textarea: import("react").ComponentType<import("@ark-ui/rea
|
|
|
404
404
|
colorScheme: {
|
|
405
405
|
gray: {};
|
|
406
406
|
};
|
|
407
|
-
}, Record<"
|
|
407
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, undefined, unknown, unknown, undefined>>>>>;
|
|
408
408
|
export declare const Context: (props: Field.ContextProps) => import("react").ReactNode;
|
|
@@ -17,7 +17,7 @@ export declare const fieldRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
17
17
|
colorScheme: {
|
|
18
18
|
gray: {};
|
|
19
19
|
};
|
|
20
|
-
}, Record<"
|
|
20
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, undefined, {
|
|
21
21
|
size: {
|
|
22
22
|
sm: {
|
|
23
23
|
input: string;
|
|
@@ -36,7 +36,7 @@ export declare const fieldRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
36
36
|
colorScheme: {
|
|
37
37
|
gray: {};
|
|
38
38
|
};
|
|
39
|
-
}, Record<"
|
|
39
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, import("tailwind-variants").TVReturnType<{
|
|
40
40
|
size: {
|
|
41
41
|
sm: {
|
|
42
42
|
input: string;
|
|
@@ -55,4 +55,4 @@ export declare const fieldRecipe: import("tailwind-variants").TVReturnType<{
|
|
|
55
55
|
colorScheme: {
|
|
56
56
|
gray: {};
|
|
57
57
|
};
|
|
58
|
-
}, Record<"
|
|
58
|
+
}, Record<"input" | "root" | "label" | "errorText" | "helperText" | "select" | "textarea" | "requiredIndicator", string | string[]>, undefined, unknown, unknown, undefined>>;
|
|
@@ -9,7 +9,7 @@ export const fieldRecipe = tv({
|
|
|
9
9
|
select: 'block w-full rounded-md outline-none',
|
|
10
10
|
textarea: 'block w-full rounded-md outline-none',
|
|
11
11
|
label: 'mb-sm inline-block font-medium text-sm text-text-secondary-700',
|
|
12
|
-
errorText: 'mt-sm inline-block text-error-
|
|
12
|
+
errorText: 'mt-sm inline-block text-error-600 text-sm',
|
|
13
13
|
helperText: 'text-sm text-text-secondary-700',
|
|
14
14
|
}),
|
|
15
15
|
variants: {
|
|
@@ -41,6 +41,7 @@ export declare const getSignInMutationKey: () => MutationKey;
|
|
|
41
41
|
export declare const getSignInSSOMutationKey: () => MutationKey;
|
|
42
42
|
export declare const getSignOutMutationKey: () => MutationKey;
|
|
43
43
|
export declare const getSignUpMutationKey: () => MutationKey;
|
|
44
|
+
export declare const getRegisterAgentAccountMutationKey: () => MutationKey;
|
|
44
45
|
export declare const getCompleteOnboardingMutationKey: () => MutationKey;
|
|
45
46
|
export declare const getSkipOnboardingMutationKey: () => MutationKey;
|
|
46
47
|
export declare const getUploadFileMutationKey: () => MutationKey;
|
|
@@ -152,6 +152,10 @@ export const getSignInSSOMutationKey = () => [
|
|
|
152
152
|
];
|
|
153
153
|
export const getSignOutMutationKey = () => [PARENT_KEY, 'signOut'];
|
|
154
154
|
export const getSignUpMutationKey = () => [PARENT_KEY, 'signUp'];
|
|
155
|
+
export const getRegisterAgentAccountMutationKey = () => [
|
|
156
|
+
PARENT_KEY,
|
|
157
|
+
'registerAgentAccount',
|
|
158
|
+
];
|
|
155
159
|
export const getCompleteOnboardingMutationKey = () => [
|
|
156
160
|
PARENT_KEY,
|
|
157
161
|
'completeOnboarding',
|