@labeleer/api 1.0.1 → 1.0.3
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/generated/client/client.gen.d.ts +2 -0
- package/dist/generated/client/client.gen.js +217 -0
- package/{src/generated/client/index.ts → dist/generated/client/index.d.ts} +2 -19
- package/dist/generated/client/index.js +6 -0
- package/dist/generated/client/types.gen.d.ts +120 -0
- package/dist/generated/client/types.gen.js +2 -0
- package/dist/generated/client/utils.gen.d.ts +37 -0
- package/dist/generated/client/utils.gen.js +231 -0
- package/{src/generated/client.gen.ts → dist/generated/client.gen.d.ts} +3 -17
- package/dist/generated/client.gen.js +3 -0
- package/dist/generated/core/auth.gen.d.ts +25 -0
- package/dist/generated/core/auth.gen.js +14 -0
- package/dist/generated/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/core/bodySerializer.gen.js +57 -0
- package/dist/generated/core/params.gen.d.ts +43 -0
- package/dist/generated/core/params.gen.js +112 -0
- package/dist/generated/core/pathSerializer.gen.d.ts +33 -0
- package/dist/generated/core/pathSerializer.gen.js +114 -0
- package/dist/generated/core/queryKeySerializer.gen.d.ts +18 -0
- package/dist/generated/core/queryKeySerializer.gen.js +99 -0
- package/dist/generated/core/serverSentEvents.gen.d.ts +71 -0
- package/dist/generated/core/serverSentEvents.gen.js +136 -0
- package/dist/generated/core/types.gen.d.ts +83 -0
- package/dist/generated/core/types.gen.js +2 -0
- package/dist/generated/core/utils.gen.d.ts +19 -0
- package/dist/generated/core/utils.gen.js +87 -0
- package/dist/generated/index.d.ts +2 -0
- package/{src/generated/index.ts → dist/generated/index.js} +0 -1
- package/dist/generated/sdk.gen.d.ts +42 -0
- package/dist/generated/sdk.gen.js +380 -0
- package/dist/generated/types/index.d.ts +1413 -0
- package/dist/generated/types/index.js +181 -0
- package/dist/generated/zod.gen.d.ts +3615 -0
- package/dist/generated/zod.gen.js +650 -0
- package/dist/index.js +2 -0
- package/dist/wrapper.d.ts +51 -0
- package/dist/wrapper.js +49 -0
- package/package.json +5 -4
- package/bin/import-spec.ts +0 -18
- package/openapi-ts.config.ts +0 -35
- package/openapi.yaml +0 -2181
- package/pnpm-workspace.yaml +0 -3
- package/prettier.config.ts +0 -13
- package/src/generated/client/client.gen.ts +0 -300
- package/src/generated/client/types.gen.ts +0 -238
- package/src/generated/client/utils.gen.ts +0 -337
- package/src/generated/core/auth.gen.ts +0 -49
- package/src/generated/core/bodySerializer.gen.ts +0 -96
- package/src/generated/core/params.gen.ts +0 -188
- package/src/generated/core/pathSerializer.gen.ts +0 -186
- package/src/generated/core/queryKeySerializer.gen.ts +0 -134
- package/src/generated/core/serverSentEvents.gen.ts +0 -265
- package/src/generated/core/types.gen.ts +0 -126
- package/src/generated/core/utils.gen.ts +0 -146
- package/src/generated/sdk.gen.ts +0 -890
- package/src/generated/types/index.ts +0 -1611
- package/src/generated/zod.gen.ts +0 -733
- package/src/wrapper.ts +0 -73
- package/tsconfig.json +0 -25
- /package/{src/index.ts → dist/index.d.ts} +0 -0
package/src/generated/sdk.gen.ts
DELETED
|
@@ -1,890 +0,0 @@
|
|
|
1
|
-
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
|
|
3
|
-
import * as z from 'zod';
|
|
4
|
-
|
|
5
|
-
import { client } from './client.gen.js';
|
|
6
|
-
import type {
|
|
7
|
-
Client,
|
|
8
|
-
ClientMeta,
|
|
9
|
-
Options as Options2,
|
|
10
|
-
RequestResult,
|
|
11
|
-
ServerSentEventsResult,
|
|
12
|
-
TDataShape,
|
|
13
|
-
} from './client/index.js';
|
|
14
|
-
import type {
|
|
15
|
-
AddLocaleData,
|
|
16
|
-
AddLocaleErrors,
|
|
17
|
-
AddLocaleResponses,
|
|
18
|
-
CreateAccessTokenData,
|
|
19
|
-
CreateAccessTokenErrors,
|
|
20
|
-
CreateAccessTokenResponses,
|
|
21
|
-
CreateProjectData,
|
|
22
|
-
CreateProjectErrors,
|
|
23
|
-
CreateProjectResponses,
|
|
24
|
-
DeleteLocaleData,
|
|
25
|
-
DeleteLocaleErrors,
|
|
26
|
-
DeleteLocaleResponses,
|
|
27
|
-
DeleteProjectData,
|
|
28
|
-
DeleteProjectErrors,
|
|
29
|
-
DeleteProjectResponses,
|
|
30
|
-
DeleteTranslationData,
|
|
31
|
-
DeleteTranslationErrors,
|
|
32
|
-
DeleteTranslationResponses,
|
|
33
|
-
DeleteTranslationsData,
|
|
34
|
-
DeleteTranslationsErrors,
|
|
35
|
-
DeleteTranslationsResponses,
|
|
36
|
-
ExportTranslationsData,
|
|
37
|
-
ExportTranslationsErrors,
|
|
38
|
-
ExportTranslationsResponses,
|
|
39
|
-
GenerateTranslationsData,
|
|
40
|
-
GenerateTranslationsErrors,
|
|
41
|
-
GenerateTranslationsResponse,
|
|
42
|
-
GenerateTranslationsResponses,
|
|
43
|
-
GetInvitationsData,
|
|
44
|
-
GetInvitationsErrors,
|
|
45
|
-
GetInvitationsResponses,
|
|
46
|
-
GetLocalesData,
|
|
47
|
-
GetLocalesErrors,
|
|
48
|
-
GetLocalesResponses,
|
|
49
|
-
GetProjectsData,
|
|
50
|
-
GetProjectsErrors,
|
|
51
|
-
GetProjectsResponses,
|
|
52
|
-
GetTranslationData,
|
|
53
|
-
GetTranslationErrors,
|
|
54
|
-
GetTranslationResponses,
|
|
55
|
-
GetTranslationsData,
|
|
56
|
-
GetTranslationsErrors,
|
|
57
|
-
GetTranslationsResponses,
|
|
58
|
-
GetTranslationTagsData,
|
|
59
|
-
GetTranslationTagsErrors,
|
|
60
|
-
GetTranslationTagsResponses,
|
|
61
|
-
GetUserProjectPermissionsData,
|
|
62
|
-
GetUserProjectPermissionsErrors,
|
|
63
|
-
GetUserProjectPermissionsResponses,
|
|
64
|
-
InviteUserToProjectData,
|
|
65
|
-
InviteUserToProjectErrors,
|
|
66
|
-
InviteUserToProjectResponses,
|
|
67
|
-
RemoveUserFromProjectData,
|
|
68
|
-
RemoveUserFromProjectErrors,
|
|
69
|
-
RemoveUserFromProjectResponses,
|
|
70
|
-
RenameTranslationKeyData,
|
|
71
|
-
RenameTranslationKeyErrors,
|
|
72
|
-
RenameTranslationKeyResponses,
|
|
73
|
-
RespondToInvitationData,
|
|
74
|
-
RespondToInvitationErrors,
|
|
75
|
-
RespondToInvitationResponses,
|
|
76
|
-
RevokeAccessTokenData,
|
|
77
|
-
RevokeAccessTokenErrors,
|
|
78
|
-
RevokeAccessTokenResponses,
|
|
79
|
-
UpdateAccessTokenData,
|
|
80
|
-
UpdateAccessTokenErrors,
|
|
81
|
-
UpdateAccessTokenResponses,
|
|
82
|
-
UpdateProjectData,
|
|
83
|
-
UpdateProjectErrors,
|
|
84
|
-
UpdateProjectResponses,
|
|
85
|
-
UpdateReferenceLocaleData,
|
|
86
|
-
UpdateReferenceLocaleErrors,
|
|
87
|
-
UpdateReferenceLocaleResponses,
|
|
88
|
-
UpdateTranslationsData,
|
|
89
|
-
UpdateTranslationsErrors,
|
|
90
|
-
UpdateTranslationsResponses,
|
|
91
|
-
UpdateTranslationTagsData,
|
|
92
|
-
UpdateTranslationTagsErrors,
|
|
93
|
-
UpdateTranslationTagsResponses,
|
|
94
|
-
UpdateUserPermissionsData,
|
|
95
|
-
UpdateUserPermissionsErrors,
|
|
96
|
-
UpdateUserPermissionsResponses,
|
|
97
|
-
} from './types/index.js';
|
|
98
|
-
import {
|
|
99
|
-
zAddLocaleBody,
|
|
100
|
-
zAddLocaleResponse,
|
|
101
|
-
zCreateAccessTokenBody,
|
|
102
|
-
zCreateAccessTokenPath,
|
|
103
|
-
zCreateAccessTokenResponse2,
|
|
104
|
-
zCreateProjectBody,
|
|
105
|
-
zCreateProjectResponse2,
|
|
106
|
-
zDeleteLocaleQuery,
|
|
107
|
-
zDeleteLocaleResponse,
|
|
108
|
-
zDeleteProjectPath,
|
|
109
|
-
zDeleteProjectResponse,
|
|
110
|
-
zDeleteTranslationQuery,
|
|
111
|
-
zDeleteTranslationResponse,
|
|
112
|
-
zDeleteTranslationsBody,
|
|
113
|
-
zDeleteTranslationsResponse,
|
|
114
|
-
zExportTranslationsQuery,
|
|
115
|
-
zExportTranslationsResponse,
|
|
116
|
-
zGenerateTranslationsQuery,
|
|
117
|
-
zGenerateTranslationsResponse,
|
|
118
|
-
zGetInvitationsResponse2,
|
|
119
|
-
zGetLocalesQuery,
|
|
120
|
-
zGetLocalesResponse,
|
|
121
|
-
zGetProjectsResponse2,
|
|
122
|
-
zGetTranslationQuery,
|
|
123
|
-
zGetTranslationResponse,
|
|
124
|
-
zGetTranslationsQuery,
|
|
125
|
-
zGetTranslationsResponse2,
|
|
126
|
-
zGetTranslationTagsQuery,
|
|
127
|
-
zGetTranslationTagsResponse2,
|
|
128
|
-
zGetUserProjectPermissionsPath,
|
|
129
|
-
zGetUserProjectPermissionsResponse,
|
|
130
|
-
zInviteUserToProjectBody,
|
|
131
|
-
zInviteUserToProjectPath,
|
|
132
|
-
zInviteUserToProjectResponse,
|
|
133
|
-
zRemoveUserFromProjectPath,
|
|
134
|
-
zRemoveUserFromProjectResponse,
|
|
135
|
-
zRenameTranslationKeyBody,
|
|
136
|
-
zRenameTranslationKeyResponse,
|
|
137
|
-
zRespondToInvitationBody,
|
|
138
|
-
zRespondToInvitationResponse,
|
|
139
|
-
zRevokeAccessTokenPath,
|
|
140
|
-
zRevokeAccessTokenResponse,
|
|
141
|
-
zUpdateAccessTokenBody,
|
|
142
|
-
zUpdateAccessTokenPath,
|
|
143
|
-
zUpdateAccessTokenResponse2,
|
|
144
|
-
zUpdateProjectBody,
|
|
145
|
-
zUpdateProjectPath,
|
|
146
|
-
zUpdateProjectResponse2,
|
|
147
|
-
zUpdateReferenceLocaleBody,
|
|
148
|
-
zUpdateReferenceLocaleResponse,
|
|
149
|
-
zUpdateTranslationsBody,
|
|
150
|
-
zUpdateTranslationsResponse,
|
|
151
|
-
zUpdateTranslationTagsBody,
|
|
152
|
-
zUpdateTranslationTagsResponse2,
|
|
153
|
-
zUpdateUserPermissionsBody,
|
|
154
|
-
zUpdateUserPermissionsPath,
|
|
155
|
-
zUpdateUserPermissionsResponse,
|
|
156
|
-
} from './zod.gen.js';
|
|
157
|
-
|
|
158
|
-
export type Options<
|
|
159
|
-
TData extends TDataShape = TDataShape,
|
|
160
|
-
ThrowOnError extends boolean = boolean,
|
|
161
|
-
TResponse = unknown,
|
|
162
|
-
> = Options2<TData, ThrowOnError, TResponse> & {
|
|
163
|
-
/**
|
|
164
|
-
* You can provide a client instance returned by `createClient()` instead of
|
|
165
|
-
* individual options. This might be also useful if you want to implement a
|
|
166
|
-
* custom client.
|
|
167
|
-
*/
|
|
168
|
-
client?: Client;
|
|
169
|
-
/**
|
|
170
|
-
* You can pass arbitrary values through the `meta` object. This can be
|
|
171
|
-
* used to access values that aren't defined as part of the SDK function.
|
|
172
|
-
*/
|
|
173
|
-
meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
|
|
174
|
-
};
|
|
175
|
-
|
|
176
|
-
export const getInvitations = <ThrowOnError extends boolean = false>(
|
|
177
|
-
options?: Options<GetInvitationsData, ThrowOnError>
|
|
178
|
-
): RequestResult<GetInvitationsResponses, GetInvitationsErrors, ThrowOnError> =>
|
|
179
|
-
(options?.client ?? client).get<
|
|
180
|
-
GetInvitationsResponses,
|
|
181
|
-
GetInvitationsErrors,
|
|
182
|
-
ThrowOnError
|
|
183
|
-
>({
|
|
184
|
-
requestValidator: async data =>
|
|
185
|
-
await z
|
|
186
|
-
.object({
|
|
187
|
-
body: z.never().optional(),
|
|
188
|
-
path: z.never().optional(),
|
|
189
|
-
query: z.never().optional(),
|
|
190
|
-
})
|
|
191
|
-
.parseAsync(data),
|
|
192
|
-
responseValidator: async data =>
|
|
193
|
-
await zGetInvitationsResponse2.parseAsync(data),
|
|
194
|
-
url: '/api/invitations',
|
|
195
|
-
...options,
|
|
196
|
-
});
|
|
197
|
-
|
|
198
|
-
export const respondToInvitation = <ThrowOnError extends boolean = false>(
|
|
199
|
-
options: Options<RespondToInvitationData, ThrowOnError>
|
|
200
|
-
): RequestResult<
|
|
201
|
-
RespondToInvitationResponses,
|
|
202
|
-
RespondToInvitationErrors,
|
|
203
|
-
ThrowOnError
|
|
204
|
-
> =>
|
|
205
|
-
(options.client ?? client).post<
|
|
206
|
-
RespondToInvitationResponses,
|
|
207
|
-
RespondToInvitationErrors,
|
|
208
|
-
ThrowOnError
|
|
209
|
-
>({
|
|
210
|
-
requestValidator: async data =>
|
|
211
|
-
await z
|
|
212
|
-
.object({
|
|
213
|
-
body: zRespondToInvitationBody,
|
|
214
|
-
path: z.never().optional(),
|
|
215
|
-
query: z.never().optional(),
|
|
216
|
-
})
|
|
217
|
-
.parseAsync(data),
|
|
218
|
-
responseValidator: async data =>
|
|
219
|
-
await zRespondToInvitationResponse.parseAsync(data),
|
|
220
|
-
url: '/api/invitations',
|
|
221
|
-
...options,
|
|
222
|
-
headers: {
|
|
223
|
-
'Content-Type': 'application/json',
|
|
224
|
-
...options.headers,
|
|
225
|
-
},
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
export const revokeAccessToken = <ThrowOnError extends boolean = false>(
|
|
229
|
-
options: Options<RevokeAccessTokenData, ThrowOnError>
|
|
230
|
-
): RequestResult<
|
|
231
|
-
RevokeAccessTokenResponses,
|
|
232
|
-
RevokeAccessTokenErrors,
|
|
233
|
-
ThrowOnError
|
|
234
|
-
> =>
|
|
235
|
-
(options.client ?? client).delete<
|
|
236
|
-
RevokeAccessTokenResponses,
|
|
237
|
-
RevokeAccessTokenErrors,
|
|
238
|
-
ThrowOnError
|
|
239
|
-
>({
|
|
240
|
-
requestValidator: async data =>
|
|
241
|
-
await z
|
|
242
|
-
.object({
|
|
243
|
-
body: z.never().optional(),
|
|
244
|
-
path: zRevokeAccessTokenPath,
|
|
245
|
-
query: z.never().optional(),
|
|
246
|
-
})
|
|
247
|
-
.parseAsync(data),
|
|
248
|
-
responseValidator: async data =>
|
|
249
|
-
await zRevokeAccessTokenResponse.parseAsync(data),
|
|
250
|
-
url: '/api/project/{projectId}/access-token',
|
|
251
|
-
...options,
|
|
252
|
-
});
|
|
253
|
-
|
|
254
|
-
export const updateAccessToken = <ThrowOnError extends boolean = false>(
|
|
255
|
-
options: Options<UpdateAccessTokenData, ThrowOnError>
|
|
256
|
-
): RequestResult<
|
|
257
|
-
UpdateAccessTokenResponses,
|
|
258
|
-
UpdateAccessTokenErrors,
|
|
259
|
-
ThrowOnError
|
|
260
|
-
> =>
|
|
261
|
-
(options.client ?? client).patch<
|
|
262
|
-
UpdateAccessTokenResponses,
|
|
263
|
-
UpdateAccessTokenErrors,
|
|
264
|
-
ThrowOnError
|
|
265
|
-
>({
|
|
266
|
-
requestValidator: async data =>
|
|
267
|
-
await z
|
|
268
|
-
.object({
|
|
269
|
-
body: zUpdateAccessTokenBody,
|
|
270
|
-
path: zUpdateAccessTokenPath,
|
|
271
|
-
query: z.never().optional(),
|
|
272
|
-
})
|
|
273
|
-
.parseAsync(data),
|
|
274
|
-
responseValidator: async data =>
|
|
275
|
-
await zUpdateAccessTokenResponse2.parseAsync(data),
|
|
276
|
-
url: '/api/project/{projectId}/access-token',
|
|
277
|
-
...options,
|
|
278
|
-
headers: {
|
|
279
|
-
'Content-Type': 'application/json',
|
|
280
|
-
...options.headers,
|
|
281
|
-
},
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
export const createAccessToken = <ThrowOnError extends boolean = false>(
|
|
285
|
-
options: Options<CreateAccessTokenData, ThrowOnError>
|
|
286
|
-
): RequestResult<
|
|
287
|
-
CreateAccessTokenResponses,
|
|
288
|
-
CreateAccessTokenErrors,
|
|
289
|
-
ThrowOnError
|
|
290
|
-
> =>
|
|
291
|
-
(options.client ?? client).post<
|
|
292
|
-
CreateAccessTokenResponses,
|
|
293
|
-
CreateAccessTokenErrors,
|
|
294
|
-
ThrowOnError
|
|
295
|
-
>({
|
|
296
|
-
requestValidator: async data =>
|
|
297
|
-
await z
|
|
298
|
-
.object({
|
|
299
|
-
body: zCreateAccessTokenBody,
|
|
300
|
-
path: zCreateAccessTokenPath,
|
|
301
|
-
query: z.never().optional(),
|
|
302
|
-
})
|
|
303
|
-
.parseAsync(data),
|
|
304
|
-
responseValidator: async data =>
|
|
305
|
-
await zCreateAccessTokenResponse2.parseAsync(data),
|
|
306
|
-
url: '/api/project/{projectId}/access-token',
|
|
307
|
-
...options,
|
|
308
|
-
headers: {
|
|
309
|
-
'Content-Type': 'application/json',
|
|
310
|
-
...options.headers,
|
|
311
|
-
},
|
|
312
|
-
});
|
|
313
|
-
|
|
314
|
-
export const inviteUserToProject = <ThrowOnError extends boolean = false>(
|
|
315
|
-
options: Options<InviteUserToProjectData, ThrowOnError>
|
|
316
|
-
): RequestResult<
|
|
317
|
-
InviteUserToProjectResponses,
|
|
318
|
-
InviteUserToProjectErrors,
|
|
319
|
-
ThrowOnError
|
|
320
|
-
> =>
|
|
321
|
-
(options.client ?? client).post<
|
|
322
|
-
InviteUserToProjectResponses,
|
|
323
|
-
InviteUserToProjectErrors,
|
|
324
|
-
ThrowOnError
|
|
325
|
-
>({
|
|
326
|
-
requestValidator: async data =>
|
|
327
|
-
await z
|
|
328
|
-
.object({
|
|
329
|
-
body: zInviteUserToProjectBody,
|
|
330
|
-
path: zInviteUserToProjectPath,
|
|
331
|
-
query: z.never().optional(),
|
|
332
|
-
})
|
|
333
|
-
.parseAsync(data),
|
|
334
|
-
responseValidator: async data =>
|
|
335
|
-
await zInviteUserToProjectResponse.parseAsync(data),
|
|
336
|
-
url: '/api/project/{projectId}/invite',
|
|
337
|
-
...options,
|
|
338
|
-
headers: {
|
|
339
|
-
'Content-Type': 'application/json',
|
|
340
|
-
...options.headers,
|
|
341
|
-
},
|
|
342
|
-
});
|
|
343
|
-
|
|
344
|
-
export const deleteProject = <ThrowOnError extends boolean = false>(
|
|
345
|
-
options: Options<DeleteProjectData, ThrowOnError>
|
|
346
|
-
): RequestResult<DeleteProjectResponses, DeleteProjectErrors, ThrowOnError> =>
|
|
347
|
-
(options.client ?? client).delete<
|
|
348
|
-
DeleteProjectResponses,
|
|
349
|
-
DeleteProjectErrors,
|
|
350
|
-
ThrowOnError
|
|
351
|
-
>({
|
|
352
|
-
requestValidator: async data =>
|
|
353
|
-
await z
|
|
354
|
-
.object({
|
|
355
|
-
body: z.never().optional(),
|
|
356
|
-
path: zDeleteProjectPath,
|
|
357
|
-
query: z.never().optional(),
|
|
358
|
-
})
|
|
359
|
-
.parseAsync(data),
|
|
360
|
-
responseValidator: async data =>
|
|
361
|
-
await zDeleteProjectResponse.parseAsync(data),
|
|
362
|
-
url: '/api/project/{projectId}',
|
|
363
|
-
...options,
|
|
364
|
-
});
|
|
365
|
-
|
|
366
|
-
export const updateProject = <ThrowOnError extends boolean = false>(
|
|
367
|
-
options: Options<UpdateProjectData, ThrowOnError>
|
|
368
|
-
): RequestResult<UpdateProjectResponses, UpdateProjectErrors, ThrowOnError> =>
|
|
369
|
-
(options.client ?? client).put<
|
|
370
|
-
UpdateProjectResponses,
|
|
371
|
-
UpdateProjectErrors,
|
|
372
|
-
ThrowOnError
|
|
373
|
-
>({
|
|
374
|
-
requestValidator: async data =>
|
|
375
|
-
await z
|
|
376
|
-
.object({
|
|
377
|
-
body: zUpdateProjectBody,
|
|
378
|
-
path: zUpdateProjectPath,
|
|
379
|
-
query: z.never().optional(),
|
|
380
|
-
})
|
|
381
|
-
.parseAsync(data),
|
|
382
|
-
responseValidator: async data =>
|
|
383
|
-
await zUpdateProjectResponse2.parseAsync(data),
|
|
384
|
-
url: '/api/project/{projectId}',
|
|
385
|
-
...options,
|
|
386
|
-
headers: {
|
|
387
|
-
'Content-Type': 'application/json',
|
|
388
|
-
...options.headers,
|
|
389
|
-
},
|
|
390
|
-
});
|
|
391
|
-
|
|
392
|
-
export const removeUserFromProject = <ThrowOnError extends boolean = false>(
|
|
393
|
-
options: Options<RemoveUserFromProjectData, ThrowOnError>
|
|
394
|
-
): RequestResult<
|
|
395
|
-
RemoveUserFromProjectResponses,
|
|
396
|
-
RemoveUserFromProjectErrors,
|
|
397
|
-
ThrowOnError
|
|
398
|
-
> =>
|
|
399
|
-
(options.client ?? client).delete<
|
|
400
|
-
RemoveUserFromProjectResponses,
|
|
401
|
-
RemoveUserFromProjectErrors,
|
|
402
|
-
ThrowOnError
|
|
403
|
-
>({
|
|
404
|
-
requestValidator: async data =>
|
|
405
|
-
await z
|
|
406
|
-
.object({
|
|
407
|
-
body: z.never().optional(),
|
|
408
|
-
path: zRemoveUserFromProjectPath,
|
|
409
|
-
query: z.never().optional(),
|
|
410
|
-
})
|
|
411
|
-
.parseAsync(data),
|
|
412
|
-
responseValidator: async data =>
|
|
413
|
-
await zRemoveUserFromProjectResponse.parseAsync(data),
|
|
414
|
-
url: '/api/project/{projectId}/users/{userId}',
|
|
415
|
-
...options,
|
|
416
|
-
});
|
|
417
|
-
|
|
418
|
-
export const getUserProjectPermissions = <ThrowOnError extends boolean = false>(
|
|
419
|
-
options: Options<GetUserProjectPermissionsData, ThrowOnError>
|
|
420
|
-
): RequestResult<
|
|
421
|
-
GetUserProjectPermissionsResponses,
|
|
422
|
-
GetUserProjectPermissionsErrors,
|
|
423
|
-
ThrowOnError
|
|
424
|
-
> =>
|
|
425
|
-
(options.client ?? client).get<
|
|
426
|
-
GetUserProjectPermissionsResponses,
|
|
427
|
-
GetUserProjectPermissionsErrors,
|
|
428
|
-
ThrowOnError
|
|
429
|
-
>({
|
|
430
|
-
requestValidator: async data =>
|
|
431
|
-
await z
|
|
432
|
-
.object({
|
|
433
|
-
body: z.never().optional(),
|
|
434
|
-
path: zGetUserProjectPermissionsPath,
|
|
435
|
-
query: z.never().optional(),
|
|
436
|
-
})
|
|
437
|
-
.parseAsync(data),
|
|
438
|
-
responseValidator: async data =>
|
|
439
|
-
await zGetUserProjectPermissionsResponse.parseAsync(data),
|
|
440
|
-
url: '/api/project/{projectId}/users/{userId}',
|
|
441
|
-
...options,
|
|
442
|
-
});
|
|
443
|
-
|
|
444
|
-
export const updateUserPermissions = <ThrowOnError extends boolean = false>(
|
|
445
|
-
options: Options<UpdateUserPermissionsData, ThrowOnError>
|
|
446
|
-
): RequestResult<
|
|
447
|
-
UpdateUserPermissionsResponses,
|
|
448
|
-
UpdateUserPermissionsErrors,
|
|
449
|
-
ThrowOnError
|
|
450
|
-
> =>
|
|
451
|
-
(options.client ?? client).put<
|
|
452
|
-
UpdateUserPermissionsResponses,
|
|
453
|
-
UpdateUserPermissionsErrors,
|
|
454
|
-
ThrowOnError
|
|
455
|
-
>({
|
|
456
|
-
requestValidator: async data =>
|
|
457
|
-
await z
|
|
458
|
-
.object({
|
|
459
|
-
body: zUpdateUserPermissionsBody,
|
|
460
|
-
path: zUpdateUserPermissionsPath,
|
|
461
|
-
query: z.never().optional(),
|
|
462
|
-
})
|
|
463
|
-
.parseAsync(data),
|
|
464
|
-
responseValidator: async data =>
|
|
465
|
-
await zUpdateUserPermissionsResponse.parseAsync(data),
|
|
466
|
-
url: '/api/project/{projectId}/users/{userId}',
|
|
467
|
-
...options,
|
|
468
|
-
headers: {
|
|
469
|
-
'Content-Type': 'application/json',
|
|
470
|
-
...options.headers,
|
|
471
|
-
},
|
|
472
|
-
});
|
|
473
|
-
|
|
474
|
-
export const getProjects = <ThrowOnError extends boolean = false>(
|
|
475
|
-
options?: Options<GetProjectsData, ThrowOnError>
|
|
476
|
-
): RequestResult<GetProjectsResponses, GetProjectsErrors, ThrowOnError> =>
|
|
477
|
-
(options?.client ?? client).get<
|
|
478
|
-
GetProjectsResponses,
|
|
479
|
-
GetProjectsErrors,
|
|
480
|
-
ThrowOnError
|
|
481
|
-
>({
|
|
482
|
-
requestValidator: async data =>
|
|
483
|
-
await z
|
|
484
|
-
.object({
|
|
485
|
-
body: z.never().optional(),
|
|
486
|
-
path: z.never().optional(),
|
|
487
|
-
query: z.never().optional(),
|
|
488
|
-
})
|
|
489
|
-
.parseAsync(data),
|
|
490
|
-
responseValidator: async data =>
|
|
491
|
-
await zGetProjectsResponse2.parseAsync(data),
|
|
492
|
-
url: '/api/project',
|
|
493
|
-
...options,
|
|
494
|
-
});
|
|
495
|
-
|
|
496
|
-
export const createProject = <ThrowOnError extends boolean = false>(
|
|
497
|
-
options: Options<CreateProjectData, ThrowOnError>
|
|
498
|
-
): RequestResult<CreateProjectResponses, CreateProjectErrors, ThrowOnError> =>
|
|
499
|
-
(options.client ?? client).post<
|
|
500
|
-
CreateProjectResponses,
|
|
501
|
-
CreateProjectErrors,
|
|
502
|
-
ThrowOnError
|
|
503
|
-
>({
|
|
504
|
-
requestValidator: async data =>
|
|
505
|
-
await z
|
|
506
|
-
.object({
|
|
507
|
-
body: zCreateProjectBody,
|
|
508
|
-
path: z.never().optional(),
|
|
509
|
-
query: z.never().optional(),
|
|
510
|
-
})
|
|
511
|
-
.parseAsync(data),
|
|
512
|
-
responseValidator: async data =>
|
|
513
|
-
await zCreateProjectResponse2.parseAsync(data),
|
|
514
|
-
url: '/api/project',
|
|
515
|
-
...options,
|
|
516
|
-
headers: {
|
|
517
|
-
'Content-Type': 'application/json',
|
|
518
|
-
...options.headers,
|
|
519
|
-
},
|
|
520
|
-
});
|
|
521
|
-
|
|
522
|
-
export const generateTranslations = <ThrowOnError extends boolean = false>(
|
|
523
|
-
options: Options<
|
|
524
|
-
GenerateTranslationsData,
|
|
525
|
-
ThrowOnError,
|
|
526
|
-
GenerateTranslationsResponse
|
|
527
|
-
>
|
|
528
|
-
): Promise<ServerSentEventsResult<GenerateTranslationsResponses>> =>
|
|
529
|
-
(options.client ?? client).sse.post<
|
|
530
|
-
GenerateTranslationsResponses,
|
|
531
|
-
GenerateTranslationsErrors,
|
|
532
|
-
ThrowOnError
|
|
533
|
-
>({
|
|
534
|
-
requestValidator: async data =>
|
|
535
|
-
await z
|
|
536
|
-
.object({
|
|
537
|
-
body: z.never().optional(),
|
|
538
|
-
path: z.never().optional(),
|
|
539
|
-
query: zGenerateTranslationsQuery,
|
|
540
|
-
})
|
|
541
|
-
.parseAsync(data),
|
|
542
|
-
responseValidator: async data =>
|
|
543
|
-
await zGenerateTranslationsResponse.parseAsync(data),
|
|
544
|
-
url: '/api/translation/generate',
|
|
545
|
-
...options,
|
|
546
|
-
});
|
|
547
|
-
|
|
548
|
-
export const deleteTranslation = <ThrowOnError extends boolean = false>(
|
|
549
|
-
options: Options<DeleteTranslationData, ThrowOnError>
|
|
550
|
-
): RequestResult<
|
|
551
|
-
DeleteTranslationResponses,
|
|
552
|
-
DeleteTranslationErrors,
|
|
553
|
-
ThrowOnError
|
|
554
|
-
> =>
|
|
555
|
-
(options.client ?? client).delete<
|
|
556
|
-
DeleteTranslationResponses,
|
|
557
|
-
DeleteTranslationErrors,
|
|
558
|
-
ThrowOnError
|
|
559
|
-
>({
|
|
560
|
-
requestValidator: async data =>
|
|
561
|
-
await z
|
|
562
|
-
.object({
|
|
563
|
-
body: z.never().optional(),
|
|
564
|
-
path: z.never().optional(),
|
|
565
|
-
query: zDeleteTranslationQuery,
|
|
566
|
-
})
|
|
567
|
-
.parseAsync(data),
|
|
568
|
-
responseValidator: async data =>
|
|
569
|
-
await zDeleteTranslationResponse.parseAsync(data),
|
|
570
|
-
url: '/api/translation',
|
|
571
|
-
...options,
|
|
572
|
-
});
|
|
573
|
-
|
|
574
|
-
export const getTranslation = <ThrowOnError extends boolean = false>(
|
|
575
|
-
options: Options<GetTranslationData, ThrowOnError>
|
|
576
|
-
): RequestResult<GetTranslationResponses, GetTranslationErrors, ThrowOnError> =>
|
|
577
|
-
(options.client ?? client).get<
|
|
578
|
-
GetTranslationResponses,
|
|
579
|
-
GetTranslationErrors,
|
|
580
|
-
ThrowOnError
|
|
581
|
-
>({
|
|
582
|
-
requestValidator: async data =>
|
|
583
|
-
await z
|
|
584
|
-
.object({
|
|
585
|
-
body: z.never().optional(),
|
|
586
|
-
path: z.never().optional(),
|
|
587
|
-
query: zGetTranslationQuery,
|
|
588
|
-
})
|
|
589
|
-
.parseAsync(data),
|
|
590
|
-
responseValidator: async data =>
|
|
591
|
-
await zGetTranslationResponse.parseAsync(data),
|
|
592
|
-
url: '/api/translation',
|
|
593
|
-
...options,
|
|
594
|
-
});
|
|
595
|
-
|
|
596
|
-
export const renameTranslationKey = <ThrowOnError extends boolean = false>(
|
|
597
|
-
options: Options<RenameTranslationKeyData, ThrowOnError>
|
|
598
|
-
): RequestResult<
|
|
599
|
-
RenameTranslationKeyResponses,
|
|
600
|
-
RenameTranslationKeyErrors,
|
|
601
|
-
ThrowOnError
|
|
602
|
-
> =>
|
|
603
|
-
(options.client ?? client).put<
|
|
604
|
-
RenameTranslationKeyResponses,
|
|
605
|
-
RenameTranslationKeyErrors,
|
|
606
|
-
ThrowOnError
|
|
607
|
-
>({
|
|
608
|
-
requestValidator: async data =>
|
|
609
|
-
await z
|
|
610
|
-
.object({
|
|
611
|
-
body: zRenameTranslationKeyBody,
|
|
612
|
-
path: z.never().optional(),
|
|
613
|
-
query: z.never().optional(),
|
|
614
|
-
})
|
|
615
|
-
.parseAsync(data),
|
|
616
|
-
responseValidator: async data =>
|
|
617
|
-
await zRenameTranslationKeyResponse.parseAsync(data),
|
|
618
|
-
url: '/api/translation',
|
|
619
|
-
...options,
|
|
620
|
-
headers: {
|
|
621
|
-
'Content-Type': 'application/json',
|
|
622
|
-
...options.headers,
|
|
623
|
-
},
|
|
624
|
-
});
|
|
625
|
-
|
|
626
|
-
export const getTranslationTags = <ThrowOnError extends boolean = false>(
|
|
627
|
-
options: Options<GetTranslationTagsData, ThrowOnError>
|
|
628
|
-
): RequestResult<
|
|
629
|
-
GetTranslationTagsResponses,
|
|
630
|
-
GetTranslationTagsErrors,
|
|
631
|
-
ThrowOnError
|
|
632
|
-
> =>
|
|
633
|
-
(options.client ?? client).get<
|
|
634
|
-
GetTranslationTagsResponses,
|
|
635
|
-
GetTranslationTagsErrors,
|
|
636
|
-
ThrowOnError
|
|
637
|
-
>({
|
|
638
|
-
requestValidator: async data =>
|
|
639
|
-
await z
|
|
640
|
-
.object({
|
|
641
|
-
body: z.never().optional(),
|
|
642
|
-
path: z.never().optional(),
|
|
643
|
-
query: zGetTranslationTagsQuery,
|
|
644
|
-
})
|
|
645
|
-
.parseAsync(data),
|
|
646
|
-
responseValidator: async data =>
|
|
647
|
-
await zGetTranslationTagsResponse2.parseAsync(data),
|
|
648
|
-
url: '/api/translation/tags',
|
|
649
|
-
...options,
|
|
650
|
-
});
|
|
651
|
-
|
|
652
|
-
export const updateTranslationTags = <ThrowOnError extends boolean = false>(
|
|
653
|
-
options: Options<UpdateTranslationTagsData, ThrowOnError>
|
|
654
|
-
): RequestResult<
|
|
655
|
-
UpdateTranslationTagsResponses,
|
|
656
|
-
UpdateTranslationTagsErrors,
|
|
657
|
-
ThrowOnError
|
|
658
|
-
> =>
|
|
659
|
-
(options.client ?? client).patch<
|
|
660
|
-
UpdateTranslationTagsResponses,
|
|
661
|
-
UpdateTranslationTagsErrors,
|
|
662
|
-
ThrowOnError
|
|
663
|
-
>({
|
|
664
|
-
requestValidator: async data =>
|
|
665
|
-
await z
|
|
666
|
-
.object({
|
|
667
|
-
body: zUpdateTranslationTagsBody,
|
|
668
|
-
path: z.never().optional(),
|
|
669
|
-
query: z.never().optional(),
|
|
670
|
-
})
|
|
671
|
-
.parseAsync(data),
|
|
672
|
-
responseValidator: async data =>
|
|
673
|
-
await zUpdateTranslationTagsResponse2.parseAsync(data),
|
|
674
|
-
url: '/api/translation/tags',
|
|
675
|
-
...options,
|
|
676
|
-
headers: {
|
|
677
|
-
'Content-Type': 'application/json',
|
|
678
|
-
...options.headers,
|
|
679
|
-
},
|
|
680
|
-
});
|
|
681
|
-
|
|
682
|
-
export const exportTranslations = <ThrowOnError extends boolean = false>(
|
|
683
|
-
options: Options<ExportTranslationsData, ThrowOnError>
|
|
684
|
-
): RequestResult<
|
|
685
|
-
ExportTranslationsResponses,
|
|
686
|
-
ExportTranslationsErrors,
|
|
687
|
-
ThrowOnError
|
|
688
|
-
> =>
|
|
689
|
-
(options.client ?? client).get<
|
|
690
|
-
ExportTranslationsResponses,
|
|
691
|
-
ExportTranslationsErrors,
|
|
692
|
-
ThrowOnError
|
|
693
|
-
>({
|
|
694
|
-
requestValidator: async data =>
|
|
695
|
-
await z
|
|
696
|
-
.object({
|
|
697
|
-
body: z.never().optional(),
|
|
698
|
-
path: z.never().optional(),
|
|
699
|
-
query: zExportTranslationsQuery,
|
|
700
|
-
})
|
|
701
|
-
.parseAsync(data),
|
|
702
|
-
responseValidator: async data =>
|
|
703
|
-
await zExportTranslationsResponse.parseAsync(data),
|
|
704
|
-
url: '/api/translations/export',
|
|
705
|
-
...options,
|
|
706
|
-
});
|
|
707
|
-
|
|
708
|
-
export const deleteLocale = <ThrowOnError extends boolean = false>(
|
|
709
|
-
options: Options<DeleteLocaleData, ThrowOnError>
|
|
710
|
-
): RequestResult<DeleteLocaleResponses, DeleteLocaleErrors, ThrowOnError> =>
|
|
711
|
-
(options.client ?? client).delete<
|
|
712
|
-
DeleteLocaleResponses,
|
|
713
|
-
DeleteLocaleErrors,
|
|
714
|
-
ThrowOnError
|
|
715
|
-
>({
|
|
716
|
-
requestValidator: async data =>
|
|
717
|
-
await z
|
|
718
|
-
.object({
|
|
719
|
-
body: z.never().optional(),
|
|
720
|
-
path: z.never().optional(),
|
|
721
|
-
query: zDeleteLocaleQuery,
|
|
722
|
-
})
|
|
723
|
-
.parseAsync(data),
|
|
724
|
-
responseValidator: async data =>
|
|
725
|
-
await zDeleteLocaleResponse.parseAsync(data),
|
|
726
|
-
url: '/api/translations/locales',
|
|
727
|
-
...options,
|
|
728
|
-
});
|
|
729
|
-
|
|
730
|
-
export const getLocales = <ThrowOnError extends boolean = false>(
|
|
731
|
-
options: Options<GetLocalesData, ThrowOnError>
|
|
732
|
-
): RequestResult<GetLocalesResponses, GetLocalesErrors, ThrowOnError> =>
|
|
733
|
-
(options.client ?? client).get<
|
|
734
|
-
GetLocalesResponses,
|
|
735
|
-
GetLocalesErrors,
|
|
736
|
-
ThrowOnError
|
|
737
|
-
>({
|
|
738
|
-
requestValidator: async data =>
|
|
739
|
-
await z
|
|
740
|
-
.object({
|
|
741
|
-
body: z.never().optional(),
|
|
742
|
-
path: z.never().optional(),
|
|
743
|
-
query: zGetLocalesQuery,
|
|
744
|
-
})
|
|
745
|
-
.parseAsync(data),
|
|
746
|
-
responseValidator: async data => await zGetLocalesResponse.parseAsync(data),
|
|
747
|
-
url: '/api/translations/locales',
|
|
748
|
-
...options,
|
|
749
|
-
});
|
|
750
|
-
|
|
751
|
-
export const addLocale = <ThrowOnError extends boolean = false>(
|
|
752
|
-
options: Options<AddLocaleData, ThrowOnError>
|
|
753
|
-
): RequestResult<AddLocaleResponses, AddLocaleErrors, ThrowOnError> =>
|
|
754
|
-
(options.client ?? client).post<
|
|
755
|
-
AddLocaleResponses,
|
|
756
|
-
AddLocaleErrors,
|
|
757
|
-
ThrowOnError
|
|
758
|
-
>({
|
|
759
|
-
requestValidator: async data =>
|
|
760
|
-
await z
|
|
761
|
-
.object({
|
|
762
|
-
body: zAddLocaleBody,
|
|
763
|
-
path: z.never().optional(),
|
|
764
|
-
query: z.never().optional(),
|
|
765
|
-
})
|
|
766
|
-
.parseAsync(data),
|
|
767
|
-
responseValidator: async data => await zAddLocaleResponse.parseAsync(data),
|
|
768
|
-
url: '/api/translations/locales',
|
|
769
|
-
...options,
|
|
770
|
-
headers: {
|
|
771
|
-
'Content-Type': 'application/json',
|
|
772
|
-
...options.headers,
|
|
773
|
-
},
|
|
774
|
-
});
|
|
775
|
-
|
|
776
|
-
export const updateReferenceLocale = <ThrowOnError extends boolean = false>(
|
|
777
|
-
options: Options<UpdateReferenceLocaleData, ThrowOnError>
|
|
778
|
-
): RequestResult<
|
|
779
|
-
UpdateReferenceLocaleResponses,
|
|
780
|
-
UpdateReferenceLocaleErrors,
|
|
781
|
-
ThrowOnError
|
|
782
|
-
> =>
|
|
783
|
-
(options.client ?? client).put<
|
|
784
|
-
UpdateReferenceLocaleResponses,
|
|
785
|
-
UpdateReferenceLocaleErrors,
|
|
786
|
-
ThrowOnError
|
|
787
|
-
>({
|
|
788
|
-
requestValidator: async data =>
|
|
789
|
-
await z
|
|
790
|
-
.object({
|
|
791
|
-
body: zUpdateReferenceLocaleBody,
|
|
792
|
-
path: z.never().optional(),
|
|
793
|
-
query: z.never().optional(),
|
|
794
|
-
})
|
|
795
|
-
.parseAsync(data),
|
|
796
|
-
responseValidator: async data =>
|
|
797
|
-
await zUpdateReferenceLocaleResponse.parseAsync(data),
|
|
798
|
-
url: '/api/translations/locales',
|
|
799
|
-
...options,
|
|
800
|
-
headers: {
|
|
801
|
-
'Content-Type': 'application/json',
|
|
802
|
-
...options.headers,
|
|
803
|
-
},
|
|
804
|
-
});
|
|
805
|
-
|
|
806
|
-
export const deleteTranslations = <ThrowOnError extends boolean = false>(
|
|
807
|
-
options: Options<DeleteTranslationsData, ThrowOnError>
|
|
808
|
-
): RequestResult<
|
|
809
|
-
DeleteTranslationsResponses,
|
|
810
|
-
DeleteTranslationsErrors,
|
|
811
|
-
ThrowOnError
|
|
812
|
-
> =>
|
|
813
|
-
(options.client ?? client).delete<
|
|
814
|
-
DeleteTranslationsResponses,
|
|
815
|
-
DeleteTranslationsErrors,
|
|
816
|
-
ThrowOnError
|
|
817
|
-
>({
|
|
818
|
-
requestValidator: async data =>
|
|
819
|
-
await z
|
|
820
|
-
.object({
|
|
821
|
-
body: zDeleteTranslationsBody,
|
|
822
|
-
path: z.never().optional(),
|
|
823
|
-
query: z.never().optional(),
|
|
824
|
-
})
|
|
825
|
-
.parseAsync(data),
|
|
826
|
-
responseValidator: async data =>
|
|
827
|
-
await zDeleteTranslationsResponse.parseAsync(data),
|
|
828
|
-
url: '/api/translations',
|
|
829
|
-
...options,
|
|
830
|
-
headers: {
|
|
831
|
-
'Content-Type': 'application/json',
|
|
832
|
-
...options.headers,
|
|
833
|
-
},
|
|
834
|
-
});
|
|
835
|
-
|
|
836
|
-
export const getTranslations = <ThrowOnError extends boolean = false>(
|
|
837
|
-
options: Options<GetTranslationsData, ThrowOnError>
|
|
838
|
-
): RequestResult<
|
|
839
|
-
GetTranslationsResponses,
|
|
840
|
-
GetTranslationsErrors,
|
|
841
|
-
ThrowOnError
|
|
842
|
-
> =>
|
|
843
|
-
(options.client ?? client).get<
|
|
844
|
-
GetTranslationsResponses,
|
|
845
|
-
GetTranslationsErrors,
|
|
846
|
-
ThrowOnError
|
|
847
|
-
>({
|
|
848
|
-
requestValidator: async data =>
|
|
849
|
-
await z
|
|
850
|
-
.object({
|
|
851
|
-
body: z.never().optional(),
|
|
852
|
-
path: z.never().optional(),
|
|
853
|
-
query: zGetTranslationsQuery,
|
|
854
|
-
})
|
|
855
|
-
.parseAsync(data),
|
|
856
|
-
responseValidator: async data =>
|
|
857
|
-
await zGetTranslationsResponse2.parseAsync(data),
|
|
858
|
-
url: '/api/translations',
|
|
859
|
-
...options,
|
|
860
|
-
});
|
|
861
|
-
|
|
862
|
-
export const updateTranslations = <ThrowOnError extends boolean = false>(
|
|
863
|
-
options: Options<UpdateTranslationsData, ThrowOnError>
|
|
864
|
-
): RequestResult<
|
|
865
|
-
UpdateTranslationsResponses,
|
|
866
|
-
UpdateTranslationsErrors,
|
|
867
|
-
ThrowOnError
|
|
868
|
-
> =>
|
|
869
|
-
(options.client ?? client).post<
|
|
870
|
-
UpdateTranslationsResponses,
|
|
871
|
-
UpdateTranslationsErrors,
|
|
872
|
-
ThrowOnError
|
|
873
|
-
>({
|
|
874
|
-
requestValidator: async data =>
|
|
875
|
-
await z
|
|
876
|
-
.object({
|
|
877
|
-
body: zUpdateTranslationsBody,
|
|
878
|
-
path: z.never().optional(),
|
|
879
|
-
query: z.never().optional(),
|
|
880
|
-
})
|
|
881
|
-
.parseAsync(data),
|
|
882
|
-
responseValidator: async data =>
|
|
883
|
-
await zUpdateTranslationsResponse.parseAsync(data),
|
|
884
|
-
url: '/api/translations',
|
|
885
|
-
...options,
|
|
886
|
-
headers: {
|
|
887
|
-
'Content-Type': 'application/json',
|
|
888
|
-
...options.headers,
|
|
889
|
-
},
|
|
890
|
-
});
|