@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
|
@@ -0,0 +1,650 @@
|
|
|
1
|
+
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
+
import * as z from 'zod';
|
|
3
|
+
export const zBooleanish = z.boolean().default(false);
|
|
4
|
+
export const zCreateCommentRequestBody = z.object({
|
|
5
|
+
projectId: z.string(),
|
|
6
|
+
keyId: z.string(),
|
|
7
|
+
comment: z.string().min(1).max(1024),
|
|
8
|
+
commentId: z.string(),
|
|
9
|
+
});
|
|
10
|
+
export const zDeleteCommentRequestQuery = z.object({
|
|
11
|
+
commentId: z.string(),
|
|
12
|
+
projectId: z.string(),
|
|
13
|
+
});
|
|
14
|
+
export const zDeleteTranslationRequestQuery = z.object({
|
|
15
|
+
projectId: z.string(),
|
|
16
|
+
keyId: z.string(),
|
|
17
|
+
});
|
|
18
|
+
export const zDeleteTranslationsRequestBody = z.object({
|
|
19
|
+
projectId: z.string(),
|
|
20
|
+
keys: z.array(z.string()).min(1),
|
|
21
|
+
});
|
|
22
|
+
export const zErrorResponse = z.object({
|
|
23
|
+
error: z.string(),
|
|
24
|
+
details: z.string().optional(),
|
|
25
|
+
});
|
|
26
|
+
export const zGetCommentsRequestQuery = z.object({
|
|
27
|
+
projectId: z.string(),
|
|
28
|
+
keyId: z.string(),
|
|
29
|
+
});
|
|
30
|
+
export const zGetLocalesRequestQuery = z.object({
|
|
31
|
+
projectId: z.string(),
|
|
32
|
+
});
|
|
33
|
+
export const zGetTranslationRequestQuery = z.object({
|
|
34
|
+
projectId: z.string(),
|
|
35
|
+
keyId: z.string(),
|
|
36
|
+
});
|
|
37
|
+
export const zGetTranslationTagsRequestQuery = z.object({
|
|
38
|
+
projectId: z.string(),
|
|
39
|
+
keyId: z.string(),
|
|
40
|
+
});
|
|
41
|
+
export const zInvitationProject = z.object({
|
|
42
|
+
id: z.string(),
|
|
43
|
+
name: z.string(),
|
|
44
|
+
description: z.string().optional(),
|
|
45
|
+
});
|
|
46
|
+
export const zInvitedBy = z.object({
|
|
47
|
+
user_id: z.string(),
|
|
48
|
+
name: z.string(),
|
|
49
|
+
thumbnail_url: z.string().optional(),
|
|
50
|
+
email: z.string(),
|
|
51
|
+
});
|
|
52
|
+
export const zInviteUserRequestBody = z.object({
|
|
53
|
+
email: z
|
|
54
|
+
.email()
|
|
55
|
+
.regex(/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/),
|
|
56
|
+
});
|
|
57
|
+
export const zLocale = z.enum([
|
|
58
|
+
'af_ZA',
|
|
59
|
+
'am_ET',
|
|
60
|
+
'ar_SA',
|
|
61
|
+
'ar_EG',
|
|
62
|
+
'ar_AE',
|
|
63
|
+
'ar_MA',
|
|
64
|
+
'ha_NG',
|
|
65
|
+
'ig_NG',
|
|
66
|
+
'om_ET',
|
|
67
|
+
'ps_AF',
|
|
68
|
+
'so_SO',
|
|
69
|
+
'sw_KE',
|
|
70
|
+
'sw_TZ',
|
|
71
|
+
'wo_SN',
|
|
72
|
+
'xh_ZA',
|
|
73
|
+
'yo_NG',
|
|
74
|
+
'yo_BJ',
|
|
75
|
+
'zu_ZA',
|
|
76
|
+
'az_AZ',
|
|
77
|
+
'hy_AM',
|
|
78
|
+
'ka_GE',
|
|
79
|
+
'kk_KZ',
|
|
80
|
+
'ky_KG',
|
|
81
|
+
'tk_TM',
|
|
82
|
+
'ug_CN',
|
|
83
|
+
'uz_UZ',
|
|
84
|
+
'ks_IN',
|
|
85
|
+
'ks_PK',
|
|
86
|
+
'be_BY',
|
|
87
|
+
'bg_BG',
|
|
88
|
+
'bs_BA',
|
|
89
|
+
'cs_CZ',
|
|
90
|
+
'hr_HR',
|
|
91
|
+
'lt_LT',
|
|
92
|
+
'lv_LV',
|
|
93
|
+
'mk_MK',
|
|
94
|
+
'pl_PL',
|
|
95
|
+
'ru_RU',
|
|
96
|
+
'sk_SK',
|
|
97
|
+
'sl_SI',
|
|
98
|
+
'sq_AL',
|
|
99
|
+
'sr_RS',
|
|
100
|
+
'sr_BA',
|
|
101
|
+
'sr_ME',
|
|
102
|
+
'uk_UA',
|
|
103
|
+
'ca_ES',
|
|
104
|
+
'cy_GB',
|
|
105
|
+
'da_DK',
|
|
106
|
+
'de_DE',
|
|
107
|
+
'de_AT',
|
|
108
|
+
'de_CH',
|
|
109
|
+
'el_GR',
|
|
110
|
+
'et_EE',
|
|
111
|
+
'eu_ES',
|
|
112
|
+
'fi_FI',
|
|
113
|
+
'ga_IE',
|
|
114
|
+
'gl_ES',
|
|
115
|
+
'hu_HU',
|
|
116
|
+
'is_IS',
|
|
117
|
+
'it_IT',
|
|
118
|
+
'it_CH',
|
|
119
|
+
'mt_MT',
|
|
120
|
+
'nl_NL',
|
|
121
|
+
'nl_BE',
|
|
122
|
+
'no_NO',
|
|
123
|
+
'nn_NO',
|
|
124
|
+
'ro_RO',
|
|
125
|
+
'sv_SE',
|
|
126
|
+
'en_US',
|
|
127
|
+
'en_GB',
|
|
128
|
+
'en_AU',
|
|
129
|
+
'en_CA',
|
|
130
|
+
'en_NZ',
|
|
131
|
+
'en_IN',
|
|
132
|
+
'en_IE',
|
|
133
|
+
'en_ZA',
|
|
134
|
+
'en_SG',
|
|
135
|
+
'fr_FR',
|
|
136
|
+
'fr_CA',
|
|
137
|
+
'fr_BE',
|
|
138
|
+
'fr_CH',
|
|
139
|
+
'fr_MA',
|
|
140
|
+
'es_ES',
|
|
141
|
+
'es_MX',
|
|
142
|
+
'es_AR',
|
|
143
|
+
'es_CO',
|
|
144
|
+
'es_CL',
|
|
145
|
+
'es_PE',
|
|
146
|
+
'es_VE',
|
|
147
|
+
'es_US',
|
|
148
|
+
'pt_PT',
|
|
149
|
+
'pt_BR',
|
|
150
|
+
'as_IN',
|
|
151
|
+
'bho_IN',
|
|
152
|
+
'bn_BD',
|
|
153
|
+
'bn_IN',
|
|
154
|
+
'dv_MV',
|
|
155
|
+
'fa_IR',
|
|
156
|
+
'fa_AF',
|
|
157
|
+
'gu_IN',
|
|
158
|
+
'he_IL',
|
|
159
|
+
'hi_IN',
|
|
160
|
+
'kn_IN',
|
|
161
|
+
'ku_TR',
|
|
162
|
+
'ku_IR',
|
|
163
|
+
'ku_IQ',
|
|
164
|
+
'ku_SY',
|
|
165
|
+
'mai_IN',
|
|
166
|
+
'ml_IN',
|
|
167
|
+
'mr_IN',
|
|
168
|
+
'ne_NP',
|
|
169
|
+
'pa_IN',
|
|
170
|
+
'pa_PK',
|
|
171
|
+
'sd_IN',
|
|
172
|
+
'sd_PK',
|
|
173
|
+
'si_LK',
|
|
174
|
+
'ta_IN',
|
|
175
|
+
'te_IN',
|
|
176
|
+
'ur_PK',
|
|
177
|
+
'ur_IN',
|
|
178
|
+
'bo_CN',
|
|
179
|
+
'bo_IN',
|
|
180
|
+
'dz_BT',
|
|
181
|
+
'id_ID',
|
|
182
|
+
'ja_JP',
|
|
183
|
+
'jv_ID',
|
|
184
|
+
'km_KH',
|
|
185
|
+
'ko_KR',
|
|
186
|
+
'lo_LA',
|
|
187
|
+
'mn_MN',
|
|
188
|
+
'ms_MY',
|
|
189
|
+
'ms_BN',
|
|
190
|
+
'my_MM',
|
|
191
|
+
'su_ID',
|
|
192
|
+
'th_TH',
|
|
193
|
+
'tl_PH',
|
|
194
|
+
'vi_VN',
|
|
195
|
+
'zh_CN',
|
|
196
|
+
'zh_TW',
|
|
197
|
+
'zh_HK',
|
|
198
|
+
'zh_SG',
|
|
199
|
+
'gug_PY',
|
|
200
|
+
'yi_US',
|
|
201
|
+
'yi_IL',
|
|
202
|
+
'yi_DE',
|
|
203
|
+
'tr_TR',
|
|
204
|
+
]);
|
|
205
|
+
export const zCreateLocaleRequestBody = z.object({
|
|
206
|
+
projectId: z.string(),
|
|
207
|
+
locale: zLocale,
|
|
208
|
+
});
|
|
209
|
+
export const zCreateProjectRequestBody = z.object({
|
|
210
|
+
name: z.string().min(1).max(50),
|
|
211
|
+
description: z.string().max(200).optional(),
|
|
212
|
+
locales: z.array(zLocale).optional(),
|
|
213
|
+
});
|
|
214
|
+
export const zDeleteLocaleRequestBody = z.object({
|
|
215
|
+
projectId: z.string(),
|
|
216
|
+
locale: zLocale,
|
|
217
|
+
});
|
|
218
|
+
export const zGenerateTranslationsRequestQuery = z.object({
|
|
219
|
+
project_id: z.string(),
|
|
220
|
+
key: z.string(),
|
|
221
|
+
from_locale: zLocale,
|
|
222
|
+
to_locale: zLocale,
|
|
223
|
+
});
|
|
224
|
+
export const zLanguageItem = z.object({
|
|
225
|
+
id: z.string(),
|
|
226
|
+
locale: zLocale,
|
|
227
|
+
is_reference: z.boolean(),
|
|
228
|
+
});
|
|
229
|
+
export const zCreateLocaleResponse = z.object({
|
|
230
|
+
data: z.array(zLanguageItem),
|
|
231
|
+
});
|
|
232
|
+
export const zGetLocaleResponse = z.object({
|
|
233
|
+
data: z.array(zLanguageItem),
|
|
234
|
+
});
|
|
235
|
+
export const zPagination = z.object({
|
|
236
|
+
offset: z.number(),
|
|
237
|
+
count: z.number(),
|
|
238
|
+
total_count: z.number(),
|
|
239
|
+
has_next: z.boolean(),
|
|
240
|
+
});
|
|
241
|
+
export const zPermissionCategory = z.enum([
|
|
242
|
+
'translations',
|
|
243
|
+
'languages',
|
|
244
|
+
'collaborators',
|
|
245
|
+
'project',
|
|
246
|
+
]);
|
|
247
|
+
export const zPermissionRole = z.enum(['viewer', 'editor']);
|
|
248
|
+
export const zPlurality = z.enum([
|
|
249
|
+
'zero',
|
|
250
|
+
'one',
|
|
251
|
+
'two',
|
|
252
|
+
'few',
|
|
253
|
+
'many',
|
|
254
|
+
'other',
|
|
255
|
+
]);
|
|
256
|
+
export const zProjectFeature = z.enum(['auto-translate', 'suggestions']);
|
|
257
|
+
export const zProjectPermissions = z.record(z.string(), zPermissionRole);
|
|
258
|
+
export const zCreateAccessTokenRequestBody = z.object({
|
|
259
|
+
permissions: zProjectPermissions,
|
|
260
|
+
});
|
|
261
|
+
export const zGetUserPermissionsResponse = z.object({
|
|
262
|
+
data: zProjectPermissions,
|
|
263
|
+
});
|
|
264
|
+
export const zRole = z.enum(['owner', 'collaborator']);
|
|
265
|
+
export const zCollaborator = z.object({
|
|
266
|
+
id: z.string(),
|
|
267
|
+
name: z.string(),
|
|
268
|
+
email: z.string(),
|
|
269
|
+
thumbnail_url: z.url().optional(),
|
|
270
|
+
role: zRole,
|
|
271
|
+
});
|
|
272
|
+
export const zSuccessResponse = z.object({
|
|
273
|
+
success: z.boolean(),
|
|
274
|
+
});
|
|
275
|
+
export const zTimestamp = z.iso
|
|
276
|
+
.datetime()
|
|
277
|
+
.regex(/^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$/);
|
|
278
|
+
export const zComment = z.object({
|
|
279
|
+
id: z.string(),
|
|
280
|
+
key_id: z.string(),
|
|
281
|
+
project_id: z.string(),
|
|
282
|
+
created_on: zTimestamp,
|
|
283
|
+
edited_on: zTimestamp.optional(),
|
|
284
|
+
user: z.object({
|
|
285
|
+
id: z.string(),
|
|
286
|
+
name: z.string(),
|
|
287
|
+
email: z.string(),
|
|
288
|
+
thumbnail_url: z.string().optional(),
|
|
289
|
+
}),
|
|
290
|
+
content: z.string(),
|
|
291
|
+
});
|
|
292
|
+
export const zGetCommentsResponse = z.object({
|
|
293
|
+
data: z.array(zComment),
|
|
294
|
+
});
|
|
295
|
+
export const zInvitation = z.object({
|
|
296
|
+
id: z.string(),
|
|
297
|
+
role: zRole,
|
|
298
|
+
invited_on: zTimestamp,
|
|
299
|
+
project: zInvitationProject,
|
|
300
|
+
invited_by: zInvitedBy,
|
|
301
|
+
});
|
|
302
|
+
export const zGetInvitationsResponse = z.object({
|
|
303
|
+
data: z.array(zInvitation),
|
|
304
|
+
});
|
|
305
|
+
export const zProject = z.object({
|
|
306
|
+
id: z.string(),
|
|
307
|
+
description: z.string().optional(),
|
|
308
|
+
name: z.string(),
|
|
309
|
+
created_on: zTimestamp,
|
|
310
|
+
features: z.array(zProjectFeature),
|
|
311
|
+
updated_on: zTimestamp.optional(),
|
|
312
|
+
owner_user_id: z.string(),
|
|
313
|
+
created_by: zCollaborator,
|
|
314
|
+
users: z.array(zCollaborator),
|
|
315
|
+
});
|
|
316
|
+
export const zCreateProjectResponse = z.object({
|
|
317
|
+
data: zProject,
|
|
318
|
+
});
|
|
319
|
+
export const zGetProjectsResponse = z.object({
|
|
320
|
+
data: z.array(zProject),
|
|
321
|
+
});
|
|
322
|
+
export const zProjectApiKeyDetails = z.object({
|
|
323
|
+
id: z.string(),
|
|
324
|
+
name: z.string().optional(),
|
|
325
|
+
start: z.string(),
|
|
326
|
+
enabled: z.boolean(),
|
|
327
|
+
permissions: zProjectPermissions,
|
|
328
|
+
created_on: zTimestamp,
|
|
329
|
+
last_request: zTimestamp.optional(),
|
|
330
|
+
request_count: z.number(),
|
|
331
|
+
expires_on: zTimestamp.optional(),
|
|
332
|
+
});
|
|
333
|
+
export const zCreateAccessTokenResponse = z.object({
|
|
334
|
+
key: z.string(),
|
|
335
|
+
details: zProjectApiKeyDetails,
|
|
336
|
+
});
|
|
337
|
+
export const zTranslationsExportRequestQuery = z.object({
|
|
338
|
+
projectId: z.string(),
|
|
339
|
+
format: z.enum([
|
|
340
|
+
'json',
|
|
341
|
+
'yaml',
|
|
342
|
+
'ts',
|
|
343
|
+
'po',
|
|
344
|
+
'android_strings',
|
|
345
|
+
'apple_strings',
|
|
346
|
+
'xliff',
|
|
347
|
+
'xcstrings',
|
|
348
|
+
]),
|
|
349
|
+
file_name: z.string().optional(),
|
|
350
|
+
include_tags: zBooleanish.optional(),
|
|
351
|
+
include_untranslated: zBooleanish.optional(),
|
|
352
|
+
include_description: zBooleanish.optional(),
|
|
353
|
+
});
|
|
354
|
+
export const zTranslationTags = z.array(z.string());
|
|
355
|
+
export const zExtendedTranslationItem = z.object({
|
|
356
|
+
key: z.string(),
|
|
357
|
+
key_id: z.string(),
|
|
358
|
+
translations: z.record(z.string(), z.string()),
|
|
359
|
+
plurals: z.record(z.string(), z.record(z.string(), z.string())),
|
|
360
|
+
comment_count: z.number(),
|
|
361
|
+
description: z.string().nullish(),
|
|
362
|
+
tags: zTranslationTags,
|
|
363
|
+
created_at: zTimestamp,
|
|
364
|
+
updated_at: zTimestamp.optional(),
|
|
365
|
+
created_by: z
|
|
366
|
+
.object({
|
|
367
|
+
id: z.string(),
|
|
368
|
+
name: z.string(),
|
|
369
|
+
email: z.string(),
|
|
370
|
+
thumbnail: z.string().optional(),
|
|
371
|
+
})
|
|
372
|
+
.optional(),
|
|
373
|
+
});
|
|
374
|
+
export const zGetTranslationDataResponse = z.object({
|
|
375
|
+
data: zExtendedTranslationItem,
|
|
376
|
+
});
|
|
377
|
+
export const zGetTranslationTagsResponse = z.object({
|
|
378
|
+
data: zTranslationTags,
|
|
379
|
+
});
|
|
380
|
+
export const zTranslationExportItem = z.object({
|
|
381
|
+
key: z.string(),
|
|
382
|
+
tags: zTranslationTags,
|
|
383
|
+
description: z.string().optional(),
|
|
384
|
+
translations: z.record(z.string(), z.string()),
|
|
385
|
+
plurals: z.record(z.string(), z.record(z.string(), z.string())),
|
|
386
|
+
});
|
|
387
|
+
export const zTranslationItem = z.object({
|
|
388
|
+
key: z.string(),
|
|
389
|
+
key_id: z.string(),
|
|
390
|
+
translations: z.record(z.string(), z.string()),
|
|
391
|
+
plurals: z.record(z.string(), z.record(z.string(), z.string())),
|
|
392
|
+
comment_count: z.number(),
|
|
393
|
+
description: z.string().nullish(),
|
|
394
|
+
tags: zTranslationTags,
|
|
395
|
+
});
|
|
396
|
+
export const zGetTranslationsResponse = z.object({
|
|
397
|
+
data: z.array(zTranslationItem),
|
|
398
|
+
pagination: zPagination,
|
|
399
|
+
});
|
|
400
|
+
export const zUpdateAccessTokenPermissionsRequestBody = z.object({
|
|
401
|
+
permissions: zProjectPermissions,
|
|
402
|
+
});
|
|
403
|
+
export const zUpdateAccessTokenPermissionsResponse = z.object({
|
|
404
|
+
details: zProjectApiKeyDetails,
|
|
405
|
+
});
|
|
406
|
+
export const zUpdateInvitationStatusRequestBody = z.object({
|
|
407
|
+
invitationId: z.string(),
|
|
408
|
+
status: z.enum(['accepted', 'declined']),
|
|
409
|
+
});
|
|
410
|
+
export const zUpdateProjectResponse = z.object({
|
|
411
|
+
name: z.string().min(3).max(50),
|
|
412
|
+
description: z.string().max(200).optional(),
|
|
413
|
+
});
|
|
414
|
+
export const zUpdateReferenceLocaleRequestBody = z.object({
|
|
415
|
+
projectId: z.string(),
|
|
416
|
+
locale: zLocale,
|
|
417
|
+
});
|
|
418
|
+
export const zUpdateTranslationRequestBody = z.object({
|
|
419
|
+
projectId: z.string(),
|
|
420
|
+
keyId: z.string(),
|
|
421
|
+
newKeyName: z.string().min(4).max(512),
|
|
422
|
+
});
|
|
423
|
+
export const zUpdateTranslationsRequestBody = z.object({
|
|
424
|
+
projectId: z.string(),
|
|
425
|
+
entries: z.record(z.string(), z.object({
|
|
426
|
+
tags: z.array(z.string()).optional(),
|
|
427
|
+
description: z.string().optional(),
|
|
428
|
+
translations: z.record(z.string(), z.string()),
|
|
429
|
+
plurals: z
|
|
430
|
+
.record(z.string(), z.record(z.string(), z.string()))
|
|
431
|
+
.optional(),
|
|
432
|
+
})),
|
|
433
|
+
});
|
|
434
|
+
export const zUpdateTranslationTagsRequestBody = z.object({
|
|
435
|
+
projectId: z.string(),
|
|
436
|
+
keyId: z.string(),
|
|
437
|
+
tags: z.array(z.string().max(32)).min(1),
|
|
438
|
+
});
|
|
439
|
+
export const zUpdateTranslationTagsResponse = z.object({
|
|
440
|
+
data: zTranslationTags,
|
|
441
|
+
});
|
|
442
|
+
export const zUpdateUserPermissionsRequestBody = z.object({
|
|
443
|
+
permissions: zProjectPermissions,
|
|
444
|
+
});
|
|
445
|
+
export const zUser = z.object({
|
|
446
|
+
id: z.string(),
|
|
447
|
+
name: z.string(),
|
|
448
|
+
email: z.string(),
|
|
449
|
+
thumbnail_url: z.url().optional(),
|
|
450
|
+
});
|
|
451
|
+
/**
|
|
452
|
+
* Ok
|
|
453
|
+
*/
|
|
454
|
+
export const zGetInvitationsResponse2 = zGetInvitationsResponse;
|
|
455
|
+
export const zRespondToInvitationBody = zUpdateInvitationStatusRequestBody;
|
|
456
|
+
/**
|
|
457
|
+
* Resource Created
|
|
458
|
+
*/
|
|
459
|
+
export const zRespondToInvitationResponse = zSuccessResponse;
|
|
460
|
+
export const zRevokeAccessTokenPath = z.object({
|
|
461
|
+
projectId: z.string(),
|
|
462
|
+
});
|
|
463
|
+
/**
|
|
464
|
+
* Ok
|
|
465
|
+
*/
|
|
466
|
+
export const zRevokeAccessTokenResponse = zSuccessResponse;
|
|
467
|
+
export const zUpdateAccessTokenBody = zUpdateAccessTokenPermissionsRequestBody;
|
|
468
|
+
export const zUpdateAccessTokenPath = z.object({
|
|
469
|
+
projectId: z.string(),
|
|
470
|
+
});
|
|
471
|
+
/**
|
|
472
|
+
* Ok
|
|
473
|
+
*/
|
|
474
|
+
export const zUpdateAccessTokenResponse = zUpdateAccessTokenPermissionsResponse;
|
|
475
|
+
export const zCreateAccessTokenBody = zCreateAccessTokenRequestBody;
|
|
476
|
+
export const zCreateAccessTokenPath = z.object({
|
|
477
|
+
projectId: z.string(),
|
|
478
|
+
});
|
|
479
|
+
/**
|
|
480
|
+
* Resource Created
|
|
481
|
+
*/
|
|
482
|
+
export const zCreateAccessTokenResponse2 = zCreateAccessTokenResponse;
|
|
483
|
+
export const zInviteUserToProjectBody = zInviteUserRequestBody;
|
|
484
|
+
export const zInviteUserToProjectPath = z.object({
|
|
485
|
+
projectId: z.string(),
|
|
486
|
+
});
|
|
487
|
+
/**
|
|
488
|
+
* Ok
|
|
489
|
+
*/
|
|
490
|
+
export const zInviteUserToProjectResponse = zSuccessResponse;
|
|
491
|
+
export const zDeleteProjectPath = z.object({
|
|
492
|
+
projectId: z.string(),
|
|
493
|
+
});
|
|
494
|
+
/**
|
|
495
|
+
* Ok
|
|
496
|
+
*/
|
|
497
|
+
export const zDeleteProjectResponse = zSuccessResponse;
|
|
498
|
+
export const zUpdateProjectBody = zUpdateProjectResponse;
|
|
499
|
+
export const zUpdateProjectPath = z.object({
|
|
500
|
+
projectId: z.string(),
|
|
501
|
+
});
|
|
502
|
+
/**
|
|
503
|
+
* Ok
|
|
504
|
+
*/
|
|
505
|
+
export const zUpdateProjectResponse2 = zSuccessResponse;
|
|
506
|
+
export const zRemoveUserFromProjectPath = z.object({
|
|
507
|
+
projectId: z.string(),
|
|
508
|
+
userId: z.string(),
|
|
509
|
+
});
|
|
510
|
+
/**
|
|
511
|
+
* Ok
|
|
512
|
+
*/
|
|
513
|
+
export const zRemoveUserFromProjectResponse = zSuccessResponse;
|
|
514
|
+
export const zGetUserProjectPermissionsPath = z.object({
|
|
515
|
+
projectId: z.string(),
|
|
516
|
+
userId: z.string(),
|
|
517
|
+
});
|
|
518
|
+
/**
|
|
519
|
+
* Ok
|
|
520
|
+
*/
|
|
521
|
+
export const zGetUserProjectPermissionsResponse = zGetUserPermissionsResponse;
|
|
522
|
+
export const zUpdateUserPermissionsBody = zUpdateUserPermissionsRequestBody;
|
|
523
|
+
export const zUpdateUserPermissionsPath = z.object({
|
|
524
|
+
projectId: z.string(),
|
|
525
|
+
userId: z.string(),
|
|
526
|
+
});
|
|
527
|
+
/**
|
|
528
|
+
* Ok
|
|
529
|
+
*/
|
|
530
|
+
export const zUpdateUserPermissionsResponse = zSuccessResponse;
|
|
531
|
+
/**
|
|
532
|
+
* Ok
|
|
533
|
+
*/
|
|
534
|
+
export const zGetProjectsResponse2 = zGetProjectsResponse;
|
|
535
|
+
export const zCreateProjectBody = zCreateProjectRequestBody;
|
|
536
|
+
/**
|
|
537
|
+
* Resource Created
|
|
538
|
+
*/
|
|
539
|
+
export const zCreateProjectResponse2 = zCreateProjectResponse;
|
|
540
|
+
export const zGenerateTranslationsQuery = z.object({
|
|
541
|
+
project_id: z.string(),
|
|
542
|
+
key: z.string(),
|
|
543
|
+
from_locale: zLocale,
|
|
544
|
+
to_locale: zLocale,
|
|
545
|
+
});
|
|
546
|
+
/**
|
|
547
|
+
* Ok
|
|
548
|
+
*/
|
|
549
|
+
export const zGenerateTranslationsResponse = z.string();
|
|
550
|
+
export const zDeleteTranslationQuery = z.object({
|
|
551
|
+
projectId: z.string(),
|
|
552
|
+
keyId: z.string(),
|
|
553
|
+
});
|
|
554
|
+
/**
|
|
555
|
+
* Ok
|
|
556
|
+
*/
|
|
557
|
+
export const zDeleteTranslationResponse = zSuccessResponse;
|
|
558
|
+
export const zGetTranslationQuery = z.object({
|
|
559
|
+
projectId: z.string(),
|
|
560
|
+
keyId: z.string(),
|
|
561
|
+
});
|
|
562
|
+
/**
|
|
563
|
+
* Ok
|
|
564
|
+
*/
|
|
565
|
+
export const zGetTranslationResponse = zGetTranslationDataResponse;
|
|
566
|
+
export const zRenameTranslationKeyBody = zUpdateTranslationRequestBody;
|
|
567
|
+
/**
|
|
568
|
+
* Ok
|
|
569
|
+
*/
|
|
570
|
+
export const zRenameTranslationKeyResponse = zSuccessResponse;
|
|
571
|
+
export const zGetTranslationTagsQuery = z.object({
|
|
572
|
+
projectId: z.string(),
|
|
573
|
+
keyId: z.string(),
|
|
574
|
+
});
|
|
575
|
+
/**
|
|
576
|
+
* Ok
|
|
577
|
+
*/
|
|
578
|
+
export const zGetTranslationTagsResponse2 = zGetTranslationTagsResponse;
|
|
579
|
+
export const zUpdateTranslationTagsBody = zUpdateTranslationTagsRequestBody;
|
|
580
|
+
/**
|
|
581
|
+
* Ok
|
|
582
|
+
*/
|
|
583
|
+
export const zUpdateTranslationTagsResponse2 = zUpdateTranslationTagsResponse;
|
|
584
|
+
export const zExportTranslationsQuery = z.object({
|
|
585
|
+
projectId: z.string(),
|
|
586
|
+
format: z.enum([
|
|
587
|
+
'json',
|
|
588
|
+
'yaml',
|
|
589
|
+
'ts',
|
|
590
|
+
'po',
|
|
591
|
+
'android_strings',
|
|
592
|
+
'apple_strings',
|
|
593
|
+
'xliff',
|
|
594
|
+
'xcstrings',
|
|
595
|
+
]),
|
|
596
|
+
file_name: z.string().optional(),
|
|
597
|
+
include_tags: zBooleanish.optional(),
|
|
598
|
+
include_untranslated: zBooleanish.optional(),
|
|
599
|
+
include_description: zBooleanish.optional(),
|
|
600
|
+
});
|
|
601
|
+
export const zExportTranslationsResponse = z.union([z.string(), z.void()]);
|
|
602
|
+
export const zDeleteLocaleQuery = z.object({
|
|
603
|
+
projectId: z.string(),
|
|
604
|
+
locale: zLocale,
|
|
605
|
+
});
|
|
606
|
+
/**
|
|
607
|
+
* Ok
|
|
608
|
+
*/
|
|
609
|
+
export const zDeleteLocaleResponse = zSuccessResponse;
|
|
610
|
+
export const zGetLocalesQuery = z.object({
|
|
611
|
+
projectId: z.string(),
|
|
612
|
+
});
|
|
613
|
+
/**
|
|
614
|
+
* Ok
|
|
615
|
+
*/
|
|
616
|
+
export const zGetLocalesResponse = zGetLocaleResponse;
|
|
617
|
+
export const zUpdateReferenceLocaleBody = zUpdateReferenceLocaleRequestBody;
|
|
618
|
+
/**
|
|
619
|
+
* Ok
|
|
620
|
+
*/
|
|
621
|
+
export const zUpdateReferenceLocaleResponse = zSuccessResponse;
|
|
622
|
+
export const zAddLocaleBody = zCreateLocaleRequestBody;
|
|
623
|
+
/**
|
|
624
|
+
* Resource Created
|
|
625
|
+
*/
|
|
626
|
+
export const zAddLocaleResponse = zCreateLocaleResponse;
|
|
627
|
+
export const zDeleteTranslationsBody = zDeleteTranslationsRequestBody;
|
|
628
|
+
/**
|
|
629
|
+
* Ok
|
|
630
|
+
*/
|
|
631
|
+
export const zDeleteTranslationsResponse = zSuccessResponse;
|
|
632
|
+
export const zGetTranslationsQuery = z.object({
|
|
633
|
+
projectId: z.string(),
|
|
634
|
+
limit: z.string().optional(),
|
|
635
|
+
offset: z.string().optional(),
|
|
636
|
+
q: z.string().optional(),
|
|
637
|
+
tags: z.string().optional(),
|
|
638
|
+
lang: z.string().optional(),
|
|
639
|
+
case_sensitive: zBooleanish.optional(),
|
|
640
|
+
untranslated_only: zBooleanish.optional(),
|
|
641
|
+
});
|
|
642
|
+
/**
|
|
643
|
+
* Ok
|
|
644
|
+
*/
|
|
645
|
+
export const zGetTranslationsResponse2 = zGetTranslationsResponse;
|
|
646
|
+
export const zUpdateTranslationsBody = zUpdateTranslationsRequestBody;
|
|
647
|
+
/**
|
|
648
|
+
* Resource Created
|
|
649
|
+
*/
|
|
650
|
+
export const zUpdateTranslationsResponse = zSuccessResponse;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { addLocale, createAccessToken, deleteLocale, deleteTranslation, deleteTranslations, exportTranslations, generateTranslations, getLocales, getProjects, getTranslation, getTranslations, getTranslationTags, getUserProjectPermissions, inviteUserToProject, removeUserFromProject, renameTranslationKey, revokeAccessToken, updateAccessToken, updateReferenceLocale, updateTranslations, updateTranslationTags, updateUserPermissions } from './generated/index.js';
|
|
2
|
+
declare const wrapper: {
|
|
3
|
+
projects: {
|
|
4
|
+
get: typeof getProjects;
|
|
5
|
+
};
|
|
6
|
+
project: {
|
|
7
|
+
collaborators: {
|
|
8
|
+
invite: typeof inviteUserToProject;
|
|
9
|
+
remove: typeof removeUserFromProject;
|
|
10
|
+
permissions: {
|
|
11
|
+
get: typeof getUserProjectPermissions;
|
|
12
|
+
set: typeof updateUserPermissions;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
translations: {
|
|
16
|
+
get: typeof getTranslations;
|
|
17
|
+
update: typeof updateTranslations;
|
|
18
|
+
delete: typeof deleteTranslations;
|
|
19
|
+
export: typeof exportTranslations;
|
|
20
|
+
locales: {
|
|
21
|
+
reference: {
|
|
22
|
+
set: typeof updateReferenceLocale;
|
|
23
|
+
};
|
|
24
|
+
add: typeof addLocale;
|
|
25
|
+
get: typeof getLocales;
|
|
26
|
+
delete: typeof deleteLocale;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
translation: {
|
|
30
|
+
generate: typeof generateTranslations;
|
|
31
|
+
get: typeof getTranslation;
|
|
32
|
+
delete: typeof deleteTranslation;
|
|
33
|
+
key: {
|
|
34
|
+
rename: typeof renameTranslationKey;
|
|
35
|
+
};
|
|
36
|
+
tags: {
|
|
37
|
+
update: typeof updateTranslationTags;
|
|
38
|
+
get: typeof getTranslationTags;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
accessToken: {
|
|
42
|
+
create: typeof createAccessToken;
|
|
43
|
+
revoke: typeof revokeAccessToken;
|
|
44
|
+
permissions: {
|
|
45
|
+
set: typeof updateAccessToken;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
export { wrapper as labeleer };
|
|
51
|
+
export default wrapper;
|