Skip to content

Commit 15a154f

Browse files
Updated client
1 parent 9e13a9e commit 15a154f

File tree

2 files changed

+275
-187
lines changed

2 files changed

+275
-187
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,178 +1,261 @@
11
// This file is auto-generated by @hey-api/openapi-ts
22

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";
49
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";
4247

4348
export const client = createClient(createConfig());
4449

4550
/**
4651
* Auth:Jwt.Login
4752
*/
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+
});
5869
};
5970

6071
/**
6172
* Auth:Jwt.Logout
6273
*/
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+
});
6885
};
6986

7087
/**
7188
* Register:Register
7289
*/
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+
});
78101
};
79102

80103
/**
81104
* Reset:Forgot Password
82105
*/
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+
});
88117
};
89118

90119
/**
91120
* Reset:Reset Password
92121
*/
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+
});
98133
};
99134

100135
/**
101136
* Verify:Request-Token
102137
*/
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+
});
108149
};
109150

110151
/**
111152
* Verify:Verify
112153
*/
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+
});
118165
};
119166

120167
/**
121168
* Users:Current User
122169
*/
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+
});
128181
};
129182

130183
/**
131184
* Users:Patch Current User
132185
*/
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+
});
138197
};
139198

140199
/**
141200
* Users:User
142201
*/
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+
});
148213
};
149214

150215
/**
151216
* Users:Patch User
152217
*/
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+
});
158229
};
159230

160231
/**
161232
* Users:Delete User
162233
*/
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+
});
168245
};
169246

170247
/**
171248
* Authenticated Route
172249
*/
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

Comments
 (0)