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