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