1
1
// This file is auto-generated by @hey-api/openapi-ts
2
2
3
- import { createClient , createConfig , type Options , urlSearchParamsBodySerializer } from '@hey-api/client-fetch' ;
3
+ import {
4
+ createClient ,
5
+ createConfig ,
6
+ type Options ,
7
+ urlSearchParamsBodySerializer ,
8
+ } from "@hey-api/client-fetch" ;
4
9
import type {
5
- AuthJwtLoginData ,
6
- AuthJwtLoginError ,
7
- AuthJwtLoginResponse ,
8
- AuthJwtLogoutError ,
9
- AuthJwtLogoutResponse ,
10
- RegisterRegisterData ,
11
- RegisterRegisterError ,
12
- RegisterRegisterResponse ,
13
- ResetForgotPasswordData ,
14
- ResetForgotPasswordError ,
15
- ResetForgotPasswordResponse ,
16
- ResetResetPasswordData ,
17
- ResetResetPasswordError ,
18
- ResetResetPasswordResponse ,
19
- VerifyRequestTokenData ,
20
- VerifyRequestTokenError ,
21
- VerifyRequestTokenResponse ,
22
- VerifyVerifyData ,
23
- VerifyVerifyError ,
24
- VerifyVerifyResponse ,
25
- UsersCurrentUserError ,
26
- UsersCurrentUserResponse ,
27
- UsersPatchCurrentUserData ,
28
- UsersPatchCurrentUserError ,
29
- UsersPatchCurrentUserResponse ,
30
- UsersUserData ,
31
- UsersUserError ,
32
- UsersUserResponse ,
33
- UsersPatchUserData ,
34
- UsersPatchUserError ,
35
- UsersPatchUserResponse ,
36
- UsersDeleteUserData ,
37
- UsersDeleteUserError ,
38
- UsersDeleteUserResponse ,
39
- AuthenticatedRouteError ,
40
- AuthenticatedRouteResponse
41
- } from ' ./types.gen' ;
10
+ AuthJwtLoginData ,
11
+ AuthJwtLoginError ,
12
+ AuthJwtLoginResponse ,
13
+ AuthJwtLogoutError ,
14
+ AuthJwtLogoutResponse ,
15
+ RegisterRegisterData ,
16
+ RegisterRegisterError ,
17
+ RegisterRegisterResponse ,
18
+ ResetForgotPasswordData ,
19
+ ResetForgotPasswordError ,
20
+ ResetForgotPasswordResponse ,
21
+ ResetResetPasswordData ,
22
+ ResetResetPasswordError ,
23
+ ResetResetPasswordResponse ,
24
+ VerifyRequestTokenData ,
25
+ VerifyRequestTokenError ,
26
+ VerifyRequestTokenResponse ,
27
+ VerifyVerifyData ,
28
+ VerifyVerifyError ,
29
+ VerifyVerifyResponse ,
30
+ UsersCurrentUserError ,
31
+ UsersCurrentUserResponse ,
32
+ UsersPatchCurrentUserData ,
33
+ UsersPatchCurrentUserError ,
34
+ UsersPatchCurrentUserResponse ,
35
+ UsersUserData ,
36
+ UsersUserError ,
37
+ UsersUserResponse ,
38
+ UsersPatchUserData ,
39
+ UsersPatchUserError ,
40
+ UsersPatchUserResponse ,
41
+ UsersDeleteUserData ,
42
+ UsersDeleteUserError ,
43
+ UsersDeleteUserResponse ,
44
+ AuthenticatedRouteError ,
45
+ AuthenticatedRouteResponse ,
46
+ } from " ./types.gen" ;
42
47
43
48
export const client = createClient ( createConfig ( ) ) ;
44
49
45
50
/**
46
51
* Auth:Jwt.Login
47
52
*/
48
- export const authJwtLogin = < ThrowOnError extends boolean = false > ( options : Options < AuthJwtLoginData , ThrowOnError > ) => {
49
- return ( options ?. client ?? client ) . post < AuthJwtLoginResponse , AuthJwtLoginError , ThrowOnError > ( {
50
- ...options ,
51
- ...urlSearchParamsBodySerializer ,
52
- headers : {
53
- 'Content-Type' : 'application/x-www-form-urlencoded' ,
54
- ...options ?. headers
55
- } ,
56
- url : '/auth/jwt/login'
57
- } ) ;
53
+ export const authJwtLogin = < ThrowOnError extends boolean = false > (
54
+ options : Options < AuthJwtLoginData , ThrowOnError > ,
55
+ ) => {
56
+ return ( options ?. client ?? client ) . post <
57
+ AuthJwtLoginResponse ,
58
+ AuthJwtLoginError ,
59
+ ThrowOnError
60
+ > ( {
61
+ ...options ,
62
+ ...urlSearchParamsBodySerializer ,
63
+ headers : {
64
+ "Content-Type" : "application/x-www-form-urlencoded" ,
65
+ ...options ?. headers ,
66
+ } ,
67
+ url : "/auth/jwt/login" ,
68
+ } ) ;
58
69
} ;
59
70
60
71
/**
61
72
* Auth:Jwt.Logout
62
73
*/
63
- export const authJwtLogout = < ThrowOnError extends boolean = false > ( options ?: Options < unknown , ThrowOnError > ) => {
64
- return ( options ?. client ?? client ) . post < AuthJwtLogoutResponse , AuthJwtLogoutError , ThrowOnError > ( {
65
- ...options ,
66
- url : '/auth/jwt/logout'
67
- } ) ;
74
+ export const authJwtLogout = < ThrowOnError extends boolean = false > (
75
+ options ?: Options < unknown , ThrowOnError > ,
76
+ ) => {
77
+ return ( options ?. client ?? client ) . post <
78
+ AuthJwtLogoutResponse ,
79
+ AuthJwtLogoutError ,
80
+ ThrowOnError
81
+ > ( {
82
+ ...options ,
83
+ url : "/auth/jwt/logout" ,
84
+ } ) ;
68
85
} ;
69
86
70
87
/**
71
88
* Register:Register
72
89
*/
73
- export const registerRegister = < ThrowOnError extends boolean = false > ( options : Options < RegisterRegisterData , ThrowOnError > ) => {
74
- return ( options ?. client ?? client ) . post < RegisterRegisterResponse , RegisterRegisterError , ThrowOnError > ( {
75
- ...options ,
76
- url : '/auth/register'
77
- } ) ;
90
+ export const registerRegister = < ThrowOnError extends boolean = false > (
91
+ options : Options < RegisterRegisterData , ThrowOnError > ,
92
+ ) => {
93
+ return ( options ?. client ?? client ) . post <
94
+ RegisterRegisterResponse ,
95
+ RegisterRegisterError ,
96
+ ThrowOnError
97
+ > ( {
98
+ ...options ,
99
+ url : "/auth/register" ,
100
+ } ) ;
78
101
} ;
79
102
80
103
/**
81
104
* Reset:Forgot Password
82
105
*/
83
- export const resetForgotPassword = < ThrowOnError extends boolean = false > ( options : Options < ResetForgotPasswordData , ThrowOnError > ) => {
84
- return ( options ?. client ?? client ) . post < ResetForgotPasswordResponse , ResetForgotPasswordError , ThrowOnError > ( {
85
- ...options ,
86
- url : '/auth/forgot-password'
87
- } ) ;
106
+ export const resetForgotPassword = < ThrowOnError extends boolean = false > (
107
+ options : Options < ResetForgotPasswordData , ThrowOnError > ,
108
+ ) => {
109
+ return ( options ?. client ?? client ) . post <
110
+ ResetForgotPasswordResponse ,
111
+ ResetForgotPasswordError ,
112
+ ThrowOnError
113
+ > ( {
114
+ ...options ,
115
+ url : "/auth/forgot-password" ,
116
+ } ) ;
88
117
} ;
89
118
90
119
/**
91
120
* Reset:Reset Password
92
121
*/
93
- export const resetResetPassword = < ThrowOnError extends boolean = false > ( options : Options < ResetResetPasswordData , ThrowOnError > ) => {
94
- return ( options ?. client ?? client ) . post < ResetResetPasswordResponse , ResetResetPasswordError , ThrowOnError > ( {
95
- ...options ,
96
- url : '/auth/reset-password'
97
- } ) ;
122
+ export const resetResetPassword = < ThrowOnError extends boolean = false > (
123
+ options : Options < ResetResetPasswordData , ThrowOnError > ,
124
+ ) => {
125
+ return ( options ?. client ?? client ) . post <
126
+ ResetResetPasswordResponse ,
127
+ ResetResetPasswordError ,
128
+ ThrowOnError
129
+ > ( {
130
+ ...options ,
131
+ url : "/auth/reset-password" ,
132
+ } ) ;
98
133
} ;
99
134
100
135
/**
101
136
* Verify:Request-Token
102
137
*/
103
- export const verifyRequestToken = < ThrowOnError extends boolean = false > ( options : Options < VerifyRequestTokenData , ThrowOnError > ) => {
104
- return ( options ?. client ?? client ) . post < VerifyRequestTokenResponse , VerifyRequestTokenError , ThrowOnError > ( {
105
- ...options ,
106
- url : '/auth/request-verify-token'
107
- } ) ;
138
+ export const verifyRequestToken = < ThrowOnError extends boolean = false > (
139
+ options : Options < VerifyRequestTokenData , ThrowOnError > ,
140
+ ) => {
141
+ return ( options ?. client ?? client ) . post <
142
+ VerifyRequestTokenResponse ,
143
+ VerifyRequestTokenError ,
144
+ ThrowOnError
145
+ > ( {
146
+ ...options ,
147
+ url : "/auth/request-verify-token" ,
148
+ } ) ;
108
149
} ;
109
150
110
151
/**
111
152
* Verify:Verify
112
153
*/
113
- export const verifyVerify = < ThrowOnError extends boolean = false > ( options : Options < VerifyVerifyData , ThrowOnError > ) => {
114
- return ( options ?. client ?? client ) . post < VerifyVerifyResponse , VerifyVerifyError , ThrowOnError > ( {
115
- ...options ,
116
- url : '/auth/verify'
117
- } ) ;
154
+ export const verifyVerify = < ThrowOnError extends boolean = false > (
155
+ options : Options < VerifyVerifyData , ThrowOnError > ,
156
+ ) => {
157
+ return ( options ?. client ?? client ) . post <
158
+ VerifyVerifyResponse ,
159
+ VerifyVerifyError ,
160
+ ThrowOnError
161
+ > ( {
162
+ ...options ,
163
+ url : "/auth/verify" ,
164
+ } ) ;
118
165
} ;
119
166
120
167
/**
121
168
* Users:Current User
122
169
*/
123
- export const usersCurrentUser = < ThrowOnError extends boolean = false > ( options ?: Options < unknown , ThrowOnError > ) => {
124
- return ( options ?. client ?? client ) . get < UsersCurrentUserResponse , UsersCurrentUserError , ThrowOnError > ( {
125
- ...options ,
126
- url : '/users/me'
127
- } ) ;
170
+ export const usersCurrentUser = < ThrowOnError extends boolean = false > (
171
+ options ?: Options < unknown , ThrowOnError > ,
172
+ ) => {
173
+ return ( options ?. client ?? client ) . get <
174
+ UsersCurrentUserResponse ,
175
+ UsersCurrentUserError ,
176
+ ThrowOnError
177
+ > ( {
178
+ ...options ,
179
+ url : "/users/me" ,
180
+ } ) ;
128
181
} ;
129
182
130
183
/**
131
184
* Users:Patch Current User
132
185
*/
133
- export const usersPatchCurrentUser = < ThrowOnError extends boolean = false > ( options : Options < UsersPatchCurrentUserData , ThrowOnError > ) => {
134
- return ( options ?. client ?? client ) . patch < UsersPatchCurrentUserResponse , UsersPatchCurrentUserError , ThrowOnError > ( {
135
- ...options ,
136
- url : '/users/me'
137
- } ) ;
186
+ export const usersPatchCurrentUser = < ThrowOnError extends boolean = false > (
187
+ options : Options < UsersPatchCurrentUserData , ThrowOnError > ,
188
+ ) => {
189
+ return ( options ?. client ?? client ) . patch <
190
+ UsersPatchCurrentUserResponse ,
191
+ UsersPatchCurrentUserError ,
192
+ ThrowOnError
193
+ > ( {
194
+ ...options ,
195
+ url : "/users/me" ,
196
+ } ) ;
138
197
} ;
139
198
140
199
/**
141
200
* Users:User
142
201
*/
143
- export const usersUser = < ThrowOnError extends boolean = false > ( options : Options < UsersUserData , ThrowOnError > ) => {
144
- return ( options ?. client ?? client ) . get < UsersUserResponse , UsersUserError , ThrowOnError > ( {
145
- ...options ,
146
- url : '/users/{id}'
147
- } ) ;
202
+ export const usersUser = < ThrowOnError extends boolean = false > (
203
+ options : Options < UsersUserData , ThrowOnError > ,
204
+ ) => {
205
+ return ( options ?. client ?? client ) . get <
206
+ UsersUserResponse ,
207
+ UsersUserError ,
208
+ ThrowOnError
209
+ > ( {
210
+ ...options ,
211
+ url : "/users/{id}" ,
212
+ } ) ;
148
213
} ;
149
214
150
215
/**
151
216
* Users:Patch User
152
217
*/
153
- export const usersPatchUser = < ThrowOnError extends boolean = false > ( options : Options < UsersPatchUserData , ThrowOnError > ) => {
154
- return ( options ?. client ?? client ) . patch < UsersPatchUserResponse , UsersPatchUserError , ThrowOnError > ( {
155
- ...options ,
156
- url : '/users/{id}'
157
- } ) ;
218
+ export const usersPatchUser = < ThrowOnError extends boolean = false > (
219
+ options : Options < UsersPatchUserData , ThrowOnError > ,
220
+ ) => {
221
+ return ( options ?. client ?? client ) . patch <
222
+ UsersPatchUserResponse ,
223
+ UsersPatchUserError ,
224
+ ThrowOnError
225
+ > ( {
226
+ ...options ,
227
+ url : "/users/{id}" ,
228
+ } ) ;
158
229
} ;
159
230
160
231
/**
161
232
* Users:Delete User
162
233
*/
163
- export const usersDeleteUser = < ThrowOnError extends boolean = false > ( options : Options < UsersDeleteUserData , ThrowOnError > ) => {
164
- return ( options ?. client ?? client ) . delete < UsersDeleteUserResponse , UsersDeleteUserError , ThrowOnError > ( {
165
- ...options ,
166
- url : '/users/{id}'
167
- } ) ;
234
+ export const usersDeleteUser = < ThrowOnError extends boolean = false > (
235
+ options : Options < UsersDeleteUserData , ThrowOnError > ,
236
+ ) => {
237
+ return ( options ?. client ?? client ) . delete <
238
+ UsersDeleteUserResponse ,
239
+ UsersDeleteUserError ,
240
+ ThrowOnError
241
+ > ( {
242
+ ...options ,
243
+ url : "/users/{id}" ,
244
+ } ) ;
168
245
} ;
169
246
170
247
/**
171
248
* Authenticated Route
172
249
*/
173
- export const authenticatedRoute = < ThrowOnError extends boolean = false > ( options ?: Options < unknown , ThrowOnError > ) => {
174
- return ( options ?. client ?? client ) . get < AuthenticatedRouteResponse , AuthenticatedRouteError , ThrowOnError > ( {
175
- ...options ,
176
- url : '/authenticated-route'
177
- } ) ;
178
- } ;
250
+ export const authenticatedRoute = < ThrowOnError extends boolean = false > (
251
+ options ?: Options < unknown , ThrowOnError > ,
252
+ ) => {
253
+ return ( options ?. client ?? client ) . get <
254
+ AuthenticatedRouteResponse ,
255
+ AuthenticatedRouteError ,
256
+ ThrowOnError
257
+ > ( {
258
+ ...options ,
259
+ url : "/authenticated-route" ,
260
+ } ) ;
261
+ } ;
0 commit comments