generator-kodly-react-app 1.0.15 → 1.0.17
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/generators/app/index.js +15 -1
- package/generators/app/templates/.env.sandbox +4 -3
- package/generators/app/templates/.node-version +1 -0
- package/generators/app/templates/.pnpmfile.cjs +14 -0
- package/generators/app/templates/.prettierignore +13 -0
- package/generators/app/templates/AGENTS.md +14 -0
- package/generators/app/templates/I18N_MIGRATION.md +13 -13
- package/generators/app/templates/STRUCTURE.md +26 -26
- package/generators/app/templates/TESTING.md +30 -0
- package/generators/app/templates/index.html +6 -14
- package/generators/app/templates/openapi-ts.config.ts +16 -12
- package/generators/app/templates/oxlint.config.ts +72 -0
- package/generators/app/templates/package.json +66 -52
- package/generators/app/templates/pnpm-workspace.yaml +19 -0
- package/generators/app/templates/scripts/check-duplicates.mjs +28 -0
- package/generators/app/templates/scripts/generated-files.mjs +21 -0
- package/generators/app/templates/src/app.tsx +20 -20
- package/generators/app/templates/src/components/layout/language-switcher.tsx +20 -16
- package/generators/app/templates/src/components/layout/page-layout.tsx +31 -0
- package/generators/app/templates/src/components/layout/theme-switcher.tsx +16 -15
- package/generators/app/templates/src/components/theme/theme-provider.tsx +20 -13
- package/generators/app/templates/src/components/ui/button.tsx +15 -14
- package/generators/app/templates/src/components/ui/card.tsx +23 -16
- package/generators/app/templates/src/components/ui/field.tsx +35 -35
- package/generators/app/templates/src/components/ui/form.tsx +66 -30
- package/generators/app/templates/src/components/ui/input-group.tsx +22 -28
- package/generators/app/templates/src/components/ui/input.tsx +8 -8
- package/generators/app/templates/src/components/ui/label.tsx +9 -9
- package/generators/app/templates/src/components/ui/select.tsx +0 -1
- package/generators/app/templates/src/components/ui/separator.tsx +10 -10
- package/generators/app/templates/src/components/ui/textarea.tsx +7 -7
- package/generators/app/templates/src/index.css +78 -68
- package/generators/app/templates/src/lib/i18n.ts +40 -31
- package/generators/app/templates/src/lib/routes.ts +2 -3
- package/generators/app/templates/src/lib/utils/error-handler.ts +21 -14
- package/generators/app/templates/src/lib/utils.ts +3 -3
- package/generators/app/templates/src/locales/index.ts +12 -12
- package/generators/app/templates/src/locales/ja/theme.json +0 -1
- package/generators/app/templates/src/main.tsx +10 -12
- package/generators/app/templates/src/modules/app/layouts/app-layout.tsx +14 -25
- package/generators/app/templates/src/modules/app/locales/app-en.json +0 -1
- package/generators/app/templates/src/modules/app/locales/app-ja.json +0 -1
- package/generators/app/templates/src/modules/auth/components/auth-form.tsx +86 -0
- package/generators/app/templates/src/modules/auth/components/forgot-password-form.tsx +27 -52
- package/generators/app/templates/src/modules/auth/components/login-form.tsx +42 -72
- package/generators/app/templates/src/modules/auth/components/login-link.tsx +12 -0
- package/generators/app/templates/src/modules/auth/components/reset-password-form.tsx +46 -92
- package/generators/app/templates/src/modules/auth/components/signup-form.tsx +35 -71
- package/generators/app/templates/src/modules/auth/contexts/auth-context.tsx +10 -6
- package/generators/app/templates/src/modules/auth/hooks/use-auth-hook.ts +54 -39
- package/generators/app/templates/src/modules/auth/layouts/auth-layout.tsx +12 -15
- package/generators/app/templates/src/modules/auth/locales/auth-en.json +0 -1
- package/generators/app/templates/src/modules/auth/locales/auth-ja.json +0 -1
- package/generators/app/templates/src/modules/auth/schemas/form-schemas.ts +14 -10
- package/generators/app/templates/src/modules/landing/components/auth-hero.tsx +20 -18
- package/generators/app/templates/src/modules/landing/components/welcome-hero.tsx +13 -11
- package/generators/app/templates/src/modules/landing/landing-page-layout.tsx +1 -24
- package/generators/app/templates/src/modules/landing/landing-page.tsx +11 -6
- package/generators/app/templates/src/modules/landing/layouts/landing-page-layout.tsx +2 -21
- package/generators/app/templates/src/modules/landing/locales/landing-en.json +0 -1
- package/generators/app/templates/src/openapi-client-config.ts +1 -1
- package/generators/app/templates/src/routeTree.gen.ts +188 -188
- package/generators/app/templates/src/router.tsx +4 -4
- package/generators/app/templates/src/routes/$.tsx +0 -1
- package/generators/app/templates/src/routes/__root.tsx +3 -3
- package/generators/app/templates/src/routes/_landing/index.tsx +3 -3
- package/generators/app/templates/src/routes/_landing/route.tsx +3 -3
- package/generators/app/templates/src/routes/app/index.tsx +6 -6
- package/generators/app/templates/src/routes/app/route.tsx +4 -4
- package/generators/app/templates/src/routes/auth/forgot-password.tsx +1 -1
- package/generators/app/templates/src/routes/auth/login.tsx +3 -3
- package/generators/app/templates/src/routes/auth/reset-password.tsx +3 -3
- package/generators/app/templates/src/routes/auth/route.tsx +16 -8
- package/generators/app/templates/src/routes/auth/signup.tsx +1 -2
- package/generators/app/templates/src/sdk/@tanstack/react-query.gen.ts +157 -76
- package/generators/app/templates/src/sdk/client/client.gen.ts +35 -37
- package/generators/app/templates/src/sdk/client/index.ts +8 -8
- package/generators/app/templates/src/sdk/client/types.gen.ts +22 -19
- package/generators/app/templates/src/sdk/client/utils.gen.ts +53 -45
- package/generators/app/templates/src/sdk/client.gen.ts +14 -5
- package/generators/app/templates/src/sdk/core/auth.gen.ts +6 -6
- package/generators/app/templates/src/sdk/core/bodySerializer.gen.ts +25 -27
- package/generators/app/templates/src/sdk/core/params.gen.ts +12 -12
- package/generators/app/templates/src/sdk/core/pathSerializer.gen.ts +40 -41
- package/generators/app/templates/src/sdk/core/queryKeySerializer.gen.ts +12 -29
- package/generators/app/templates/src/sdk/core/serverSentEvents.gen.ts +26 -24
- package/generators/app/templates/src/sdk/core/types.gen.ts +17 -15
- package/generators/app/templates/src/sdk/core/utils.gen.ts +18 -18
- package/generators/app/templates/src/sdk/index.ts +40 -2
- package/generators/app/templates/src/sdk/schemas.gen.ts +108 -166
- package/generators/app/templates/src/sdk/sdk.gen.ts +145 -63
- package/generators/app/templates/src/sdk/types.gen.ts +90 -84
- package/generators/app/templates/src/sdk/zod.gen.ts +57 -74
- package/generators/app/templates/src/types/i18n.d.ts +0 -1
- package/generators/app/templates/stylelint.config.js +55 -0
- package/generators/app/templates/tailwind.config.js +0 -1
- package/generators/app/templates/tests/form-controls.test.tsx +39 -0
- package/generators/app/templates/tests/sdk.test.ts +49 -0
- package/generators/app/templates/tests/setup.ts +5 -0
- package/generators/app/templates/tsconfig.app.json +0 -2
- package/generators/app/templates/tsconfig.json +2 -2
- package/generators/app/templates/tsr.config.json +4 -0
- package/generators/app/templates/vite.config.js +14 -16
- package/generators/app/templates/vitest.config.ts +14 -0
- package/package.json +9 -10
- package/generators/app/templates/postcss.config.js +0 -6
|
@@ -1,195 +1,137 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
|
+
const emailSchema = {
|
|
4
|
+
type: "string",
|
|
5
|
+
format: "email",
|
|
6
|
+
maxLength: 256,
|
|
7
|
+
minLength: 1,
|
|
8
|
+
} as const;
|
|
9
|
+
const passwordSchema = {
|
|
10
|
+
type: "string",
|
|
11
|
+
format: "password",
|
|
12
|
+
maxLength: 32,
|
|
13
|
+
minLength: 6,
|
|
14
|
+
} as const;
|
|
15
|
+
|
|
3
16
|
export const AuthResponseDtoUserDetailDtoSchema = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
type: [
|
|
24
|
-
'array',
|
|
25
|
-
'null'
|
|
26
|
-
],
|
|
27
|
-
items: {
|
|
28
|
-
$ref: '#/components/schemas/ModulePermission'
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
17
|
+
type: "object",
|
|
18
|
+
properties: {
|
|
19
|
+
token: {
|
|
20
|
+
type: ["string", "null"],
|
|
21
|
+
},
|
|
22
|
+
data: {
|
|
23
|
+
type: "null",
|
|
24
|
+
$ref: "#/components/schemas/UserDetailDto",
|
|
25
|
+
},
|
|
26
|
+
roleName: {
|
|
27
|
+
type: ["string", "null"],
|
|
28
|
+
},
|
|
29
|
+
modulePermissions: {
|
|
30
|
+
type: ["array", "null"],
|
|
31
|
+
items: {
|
|
32
|
+
$ref: "#/components/schemas/ModulePermission",
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
},
|
|
32
36
|
} as const;
|
|
33
37
|
|
|
34
38
|
export const ModuleDefinitionSchema = {} as const;
|
|
35
39
|
|
|
36
40
|
export const ModulePermissionSchema = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
'module',
|
|
53
|
-
'permissions'
|
|
54
|
-
]
|
|
41
|
+
type: "object",
|
|
42
|
+
properties: {
|
|
43
|
+
module: {
|
|
44
|
+
$ref: "#/components/schemas/ModuleDefinition",
|
|
45
|
+
},
|
|
46
|
+
permissions: {
|
|
47
|
+
type: "array",
|
|
48
|
+
items: {
|
|
49
|
+
$ref: "#/components/schemas/PermissionDefinition",
|
|
50
|
+
},
|
|
51
|
+
maxItems: 512,
|
|
52
|
+
minItems: 0,
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
required: ["module", "permissions"],
|
|
55
56
|
} as const;
|
|
56
57
|
|
|
57
58
|
export const PermissionDefinitionSchema = {} as const;
|
|
58
59
|
|
|
59
60
|
export const RestResponseAuthResponseDtoUserDetailDtoSchema = {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
data: {
|
|
75
|
-
type: 'null',
|
|
76
|
-
$ref: '#/components/schemas/AuthResponseDtoUserDetailDto'
|
|
77
|
-
}
|
|
78
|
-
}
|
|
61
|
+
type: "object",
|
|
62
|
+
properties: {
|
|
63
|
+
message: {
|
|
64
|
+
type: ["string", "null"],
|
|
65
|
+
},
|
|
66
|
+
status: {
|
|
67
|
+
type: ["boolean", "null"],
|
|
68
|
+
},
|
|
69
|
+
data: {
|
|
70
|
+
type: "null",
|
|
71
|
+
$ref: "#/components/schemas/AuthResponseDtoUserDetailDto",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
79
74
|
} as const;
|
|
80
75
|
|
|
81
76
|
export const UserDetailDtoSchema = {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
maxLength: 256,
|
|
94
|
-
minLength: 1
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
|
-
required: [
|
|
98
|
-
'email',
|
|
99
|
-
'id',
|
|
100
|
-
'slug'
|
|
101
|
-
]
|
|
77
|
+
type: "object",
|
|
78
|
+
properties: {
|
|
79
|
+
id: {
|
|
80
|
+
type: "string",
|
|
81
|
+
},
|
|
82
|
+
slug: {
|
|
83
|
+
type: "string",
|
|
84
|
+
},
|
|
85
|
+
email: emailSchema,
|
|
86
|
+
},
|
|
87
|
+
required: ["email", "id", "slug"],
|
|
102
88
|
} as const;
|
|
103
89
|
|
|
104
90
|
export const RestResponseStringSchema = {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
]
|
|
118
|
-
},
|
|
119
|
-
data: {
|
|
120
|
-
type: [
|
|
121
|
-
'string',
|
|
122
|
-
'null'
|
|
123
|
-
]
|
|
124
|
-
}
|
|
125
|
-
}
|
|
91
|
+
type: "object",
|
|
92
|
+
properties: {
|
|
93
|
+
message: {
|
|
94
|
+
type: ["string", "null"],
|
|
95
|
+
},
|
|
96
|
+
status: {
|
|
97
|
+
type: ["boolean", "null"],
|
|
98
|
+
},
|
|
99
|
+
data: {
|
|
100
|
+
type: ["string", "null"],
|
|
101
|
+
},
|
|
102
|
+
},
|
|
126
103
|
} as const;
|
|
127
104
|
|
|
128
105
|
export const UserResetPasswordDtoSchema = {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
maxLength: 32,
|
|
141
|
-
minLength: 6
|
|
142
|
-
},
|
|
143
|
-
otp: {
|
|
144
|
-
type: 'string',
|
|
145
|
-
maxLength: 12,
|
|
146
|
-
minLength: 4
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
required: [
|
|
150
|
-
'email',
|
|
151
|
-
'otp',
|
|
152
|
-
'password'
|
|
153
|
-
]
|
|
106
|
+
type: "object",
|
|
107
|
+
properties: {
|
|
108
|
+
email: emailSchema,
|
|
109
|
+
password: passwordSchema,
|
|
110
|
+
otp: {
|
|
111
|
+
type: "string",
|
|
112
|
+
maxLength: 12,
|
|
113
|
+
minLength: 4,
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
required: ["email", "otp", "password"],
|
|
154
117
|
} as const;
|
|
155
118
|
|
|
156
119
|
export const UserSignupDtoSchema = {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
maxLength: 256,
|
|
166
|
-
minLength: 1
|
|
167
|
-
}
|
|
168
|
-
},
|
|
169
|
-
required: [
|
|
170
|
-
'email',
|
|
171
|
-
'password'
|
|
172
|
-
]
|
|
120
|
+
type: "object",
|
|
121
|
+
properties: {
|
|
122
|
+
password: {
|
|
123
|
+
type: "string",
|
|
124
|
+
},
|
|
125
|
+
email: emailSchema,
|
|
126
|
+
},
|
|
127
|
+
required: ["email", "password"],
|
|
173
128
|
} as const;
|
|
174
129
|
|
|
175
130
|
export const UserLoginDtoSchema = {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
minLength: 1
|
|
183
|
-
},
|
|
184
|
-
password: {
|
|
185
|
-
type: 'string',
|
|
186
|
-
format: 'password',
|
|
187
|
-
maxLength: 32,
|
|
188
|
-
minLength: 6
|
|
189
|
-
}
|
|
190
|
-
},
|
|
191
|
-
required: [
|
|
192
|
-
'email',
|
|
193
|
-
'password'
|
|
194
|
-
]
|
|
131
|
+
type: "object",
|
|
132
|
+
properties: {
|
|
133
|
+
email: emailSchema,
|
|
134
|
+
password: passwordSchema,
|
|
135
|
+
},
|
|
136
|
+
required: ["email", "password"],
|
|
195
137
|
} as const;
|
|
@@ -1,80 +1,162 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
2
|
|
|
3
|
-
import type { Client, Options as Options2, TDataShape } from
|
|
4
|
-
import { client } from
|
|
5
|
-
import type {
|
|
6
|
-
|
|
3
|
+
import type { Client, Options as Options2, TDataShape } from "./client";
|
|
4
|
+
import { client } from "./client.gen";
|
|
5
|
+
import type {
|
|
6
|
+
LoginUserAuthData,
|
|
7
|
+
LoginUserAuthResponses,
|
|
8
|
+
LogoutUserAuthData,
|
|
9
|
+
LogoutUserAuthResponses,
|
|
10
|
+
RegisterUserAuthData,
|
|
11
|
+
RegisterUserAuthResponses,
|
|
12
|
+
ResetPasswordUserAuthData,
|
|
13
|
+
ResetPasswordUserAuthResponses,
|
|
14
|
+
SendOtpUserAuthData,
|
|
15
|
+
SendOtpUserAuthResponses,
|
|
16
|
+
ValidateTokenUserAuthData,
|
|
17
|
+
ValidateTokenUserAuthResponses,
|
|
18
|
+
} from "./types.gen";
|
|
19
|
+
import {
|
|
20
|
+
zLoginUserAuthData,
|
|
21
|
+
zLoginUserAuthResponse,
|
|
22
|
+
zLogoutUserAuthData,
|
|
23
|
+
zLogoutUserAuthResponse,
|
|
24
|
+
zRegisterUserAuthData,
|
|
25
|
+
zRegisterUserAuthResponse,
|
|
26
|
+
zResetPasswordUserAuthData,
|
|
27
|
+
zResetPasswordUserAuthResponse,
|
|
28
|
+
zSendOtpUserAuthData,
|
|
29
|
+
zSendOtpUserAuthResponse,
|
|
30
|
+
zValidateTokenUserAuthData,
|
|
31
|
+
zValidateTokenUserAuthResponse,
|
|
32
|
+
} from "./zod.gen";
|
|
7
33
|
|
|
8
|
-
export type Options<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
34
|
+
export type Options<
|
|
35
|
+
TData extends TDataShape = TDataShape,
|
|
36
|
+
ThrowOnError extends boolean = boolean,
|
|
37
|
+
> = Options2<TData, ThrowOnError> & {
|
|
38
|
+
/**
|
|
39
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
40
|
+
* individual options. This might be also useful if you want to implement a
|
|
41
|
+
* custom client.
|
|
42
|
+
*/
|
|
43
|
+
client?: Client;
|
|
44
|
+
/**
|
|
45
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
46
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
47
|
+
*/
|
|
48
|
+
meta?: Record<string, unknown>;
|
|
20
49
|
};
|
|
21
50
|
|
|
22
|
-
export const validateTokenUserAuth = <ThrowOnError extends boolean = false>(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
51
|
+
export const validateTokenUserAuth = <ThrowOnError extends boolean = false>(
|
|
52
|
+
options?: Options<ValidateTokenUserAuthData, ThrowOnError>,
|
|
53
|
+
) =>
|
|
54
|
+
(options?.client ?? client).post<
|
|
55
|
+
ValidateTokenUserAuthResponses,
|
|
56
|
+
unknown,
|
|
57
|
+
ThrowOnError
|
|
58
|
+
>({
|
|
59
|
+
requestValidator: async (data) =>
|
|
60
|
+
await zValidateTokenUserAuthData.parseAsync(data),
|
|
61
|
+
responseValidator: async (data) =>
|
|
62
|
+
await zValidateTokenUserAuthResponse.parseAsync(data),
|
|
63
|
+
security: [{ name: "X-AUTH-TOKEN", type: "apiKey" }],
|
|
64
|
+
url: "/api/v1/auth/user/validate-token",
|
|
65
|
+
...options,
|
|
66
|
+
});
|
|
29
67
|
|
|
30
|
-
export const sendOtpUserAuth = <ThrowOnError extends boolean = false>(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
68
|
+
export const sendOtpUserAuth = <ThrowOnError extends boolean = false>(
|
|
69
|
+
options: Options<SendOtpUserAuthData, ThrowOnError>,
|
|
70
|
+
) =>
|
|
71
|
+
(options.client ?? client).post<
|
|
72
|
+
SendOtpUserAuthResponses,
|
|
73
|
+
unknown,
|
|
74
|
+
ThrowOnError
|
|
75
|
+
>({
|
|
76
|
+
requestValidator: async (data) =>
|
|
77
|
+
await zSendOtpUserAuthData.parseAsync(data),
|
|
78
|
+
responseValidator: async (data) =>
|
|
79
|
+
await zSendOtpUserAuthResponse.parseAsync(data),
|
|
80
|
+
security: [{ name: "X-AUTH-TOKEN", type: "apiKey" }],
|
|
81
|
+
url: "/api/v1/auth/user/send-otp",
|
|
82
|
+
...options,
|
|
83
|
+
});
|
|
37
84
|
|
|
38
|
-
export const resetPasswordUserAuth = <ThrowOnError extends boolean = false>(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
85
|
+
export const resetPasswordUserAuth = <ThrowOnError extends boolean = false>(
|
|
86
|
+
options: Options<ResetPasswordUserAuthData, ThrowOnError>,
|
|
87
|
+
) =>
|
|
88
|
+
(options.client ?? client).post<
|
|
89
|
+
ResetPasswordUserAuthResponses,
|
|
90
|
+
unknown,
|
|
91
|
+
ThrowOnError
|
|
92
|
+
>({
|
|
93
|
+
requestValidator: async (data) =>
|
|
94
|
+
await zResetPasswordUserAuthData.parseAsync(data),
|
|
95
|
+
responseValidator: async (data) =>
|
|
96
|
+
await zResetPasswordUserAuthResponse.parseAsync(data),
|
|
97
|
+
security: [{ name: "X-AUTH-TOKEN", type: "apiKey" }],
|
|
98
|
+
url: "/api/v1/auth/user/reset",
|
|
43
99
|
...options,
|
|
44
100
|
headers: {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
});
|
|
101
|
+
"Content-Type": "application/json",
|
|
102
|
+
...options.headers,
|
|
103
|
+
},
|
|
104
|
+
});
|
|
49
105
|
|
|
50
|
-
export const registerUserAuth = <ThrowOnError extends boolean = false>(
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
106
|
+
export const registerUserAuth = <ThrowOnError extends boolean = false>(
|
|
107
|
+
options: Options<RegisterUserAuthData, ThrowOnError>,
|
|
108
|
+
) =>
|
|
109
|
+
(options.client ?? client).post<
|
|
110
|
+
RegisterUserAuthResponses,
|
|
111
|
+
unknown,
|
|
112
|
+
ThrowOnError
|
|
113
|
+
>({
|
|
114
|
+
requestValidator: async (data) =>
|
|
115
|
+
await zRegisterUserAuthData.parseAsync(data),
|
|
116
|
+
responseValidator: async (data) =>
|
|
117
|
+
await zRegisterUserAuthResponse.parseAsync(data),
|
|
118
|
+
security: [{ name: "X-AUTH-TOKEN", type: "apiKey" }],
|
|
119
|
+
url: "/api/v1/auth/user/register",
|
|
55
120
|
...options,
|
|
56
121
|
headers: {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
});
|
|
122
|
+
"Content-Type": "application/json",
|
|
123
|
+
...options.headers,
|
|
124
|
+
},
|
|
125
|
+
});
|
|
61
126
|
|
|
62
|
-
export const logoutUserAuth = <ThrowOnError extends boolean = false>(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
127
|
+
export const logoutUserAuth = <ThrowOnError extends boolean = false>(
|
|
128
|
+
options?: Options<LogoutUserAuthData, ThrowOnError>,
|
|
129
|
+
) =>
|
|
130
|
+
(options?.client ?? client).post<
|
|
131
|
+
LogoutUserAuthResponses,
|
|
132
|
+
unknown,
|
|
133
|
+
ThrowOnError
|
|
134
|
+
>({
|
|
135
|
+
requestValidator: async (data) =>
|
|
136
|
+
await zLogoutUserAuthData.parseAsync(data),
|
|
137
|
+
responseValidator: async (data) =>
|
|
138
|
+
await zLogoutUserAuthResponse.parseAsync(data),
|
|
139
|
+
security: [{ name: "X-AUTH-TOKEN", type: "apiKey" }],
|
|
140
|
+
url: "/api/v1/auth/user/logout",
|
|
141
|
+
...options,
|
|
142
|
+
});
|
|
69
143
|
|
|
70
|
-
export const loginUserAuth = <ThrowOnError extends boolean = false>(
|
|
144
|
+
export const loginUserAuth = <ThrowOnError extends boolean = false>(
|
|
145
|
+
options: Options<LoginUserAuthData, ThrowOnError>,
|
|
146
|
+
) =>
|
|
147
|
+
(options.client ?? client).post<
|
|
148
|
+
LoginUserAuthResponses,
|
|
149
|
+
unknown,
|
|
150
|
+
ThrowOnError
|
|
151
|
+
>({
|
|
71
152
|
requestValidator: async (data) => await zLoginUserAuthData.parseAsync(data),
|
|
72
|
-
responseValidator: async (data) =>
|
|
73
|
-
|
|
74
|
-
|
|
153
|
+
responseValidator: async (data) =>
|
|
154
|
+
await zLoginUserAuthResponse.parseAsync(data),
|
|
155
|
+
security: [{ name: "X-AUTH-TOKEN", type: "apiKey" }],
|
|
156
|
+
url: "/api/v1/auth/user/login",
|
|
75
157
|
...options,
|
|
76
158
|
headers: {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
});
|
|
159
|
+
"Content-Type": "application/json",
|
|
160
|
+
...options.headers,
|
|
161
|
+
},
|
|
162
|
+
});
|