@generaltranslation/api 0.0.0 → 0.0.2

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.
@@ -0,0 +1,2370 @@
1
+ //#region src/generated/core/auth.gen.d.ts
2
+ type AuthToken = string | undefined;
3
+ interface Auth {
4
+ /**
5
+ * Which part of the request do we use to send the auth?
6
+ *
7
+ * @default 'header'
8
+ */
9
+ in?: 'header' | 'query' | 'cookie';
10
+ /**
11
+ * Header or query parameter name.
12
+ *
13
+ * @default 'Authorization'
14
+ */
15
+ name?: string;
16
+ scheme?: 'basic' | 'bearer';
17
+ type: 'apiKey' | 'http';
18
+ }
19
+ //#endregion
20
+ //#region src/generated/core/pathSerializer.gen.d.ts
21
+ interface SerializerOptions<T> {
22
+ /**
23
+ * @default true
24
+ */
25
+ explode: boolean;
26
+ style: T;
27
+ }
28
+ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
29
+ type ObjectStyle = 'form' | 'deepObject';
30
+ //#endregion
31
+ //#region src/generated/core/bodySerializer.gen.d.ts
32
+ type QuerySerializer = (query: Record<string, unknown>) => string;
33
+ type BodySerializer = (body: any) => any;
34
+ type QuerySerializerOptionsObject = {
35
+ allowReserved?: boolean;
36
+ array?: Partial<SerializerOptions<ArrayStyle>>;
37
+ object?: Partial<SerializerOptions<ObjectStyle>>;
38
+ };
39
+ type QuerySerializerOptions = QuerySerializerOptionsObject & {
40
+ /**
41
+ * Per-parameter serialization overrides. When provided, these settings
42
+ * override the global array/object settings for specific parameter names.
43
+ */
44
+ parameters?: Record<string, QuerySerializerOptionsObject>;
45
+ };
46
+ //#endregion
47
+ //#region src/generated/core/types.gen.d.ts
48
+ type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
49
+ type Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
50
+ /**
51
+ * Returns the final request URL.
52
+ */
53
+ buildUrl: BuildUrlFn;
54
+ getConfig: () => Config;
55
+ request: RequestFn;
56
+ setConfig: (config: Config) => Config;
57
+ } & { [K in HttpMethod]: MethodFn } & ([SseFn] extends [never] ? {
58
+ sse?: never;
59
+ } : {
60
+ sse: { [K in HttpMethod]: SseFn };
61
+ });
62
+ interface Config$1 {
63
+ /**
64
+ * Auth token or a function returning auth token. The resolved value will be
65
+ * added to the request payload as defined by its `security` array.
66
+ */
67
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
68
+ /**
69
+ * A function for serializing request body parameter. By default,
70
+ * {@link JSON.stringify()} will be used.
71
+ */
72
+ bodySerializer?: BodySerializer | null;
73
+ /**
74
+ * An object containing any HTTP headers that you want to pre-populate your
75
+ * `Headers` object with.
76
+ *
77
+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
78
+ */
79
+ headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
80
+ /**
81
+ * The request method.
82
+ *
83
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
84
+ */
85
+ method?: Uppercase<HttpMethod>;
86
+ /**
87
+ * A function for serializing request query parameters. By default, arrays
88
+ * will be exploded in form style, objects will be exploded in deepObject
89
+ * style, and reserved characters are percent-encoded.
90
+ *
91
+ * This method will have no effect if the native `paramsSerializer()` Axios
92
+ * API function is used.
93
+ *
94
+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
95
+ */
96
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
97
+ /**
98
+ * A function validating request data. This is useful if you want to ensure
99
+ * the request conforms to the desired shape, so it can be safely sent to
100
+ * the server.
101
+ */
102
+ requestValidator?: (data: unknown) => Promise<unknown>;
103
+ /**
104
+ * A function transforming response data before it's returned. This is useful
105
+ * for post-processing data, e.g. converting ISO strings into Date objects.
106
+ */
107
+ responseTransformer?: (data: unknown) => Promise<unknown>;
108
+ /**
109
+ * A function validating response data. This is useful if you want to ensure
110
+ * the response conforms to the desired shape, so it can be safely passed to
111
+ * the transformers and returned to the user.
112
+ */
113
+ responseValidator?: (data: unknown) => Promise<unknown>;
114
+ }
115
+ //#endregion
116
+ //#region src/generated/core/serverSentEvents.gen.d.ts
117
+ type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
118
+ /**
119
+ * Fetch API implementation. You can use this option to provide a custom
120
+ * fetch instance.
121
+ *
122
+ * @default globalThis.fetch
123
+ */
124
+ fetch?: typeof fetch;
125
+ /**
126
+ * Implementing clients can call request interceptors inside this hook.
127
+ */
128
+ onRequest?: (url: string, init: RequestInit) => Promise<Request>;
129
+ /**
130
+ * Callback invoked when a network or parsing error occurs during streaming.
131
+ *
132
+ * This option applies only if the endpoint returns a stream of events.
133
+ *
134
+ * @param error The error that occurred.
135
+ */
136
+ onSseError?: (error: unknown) => void;
137
+ /**
138
+ * Callback invoked when an event is streamed from the server.
139
+ *
140
+ * This option applies only if the endpoint returns a stream of events.
141
+ *
142
+ * @param event Event streamed from the server.
143
+ * @returns Nothing (void).
144
+ */
145
+ onSseEvent?: (event: StreamEvent<TData>) => void;
146
+ serializedBody?: RequestInit['body'];
147
+ /**
148
+ * Default retry delay in milliseconds.
149
+ *
150
+ * This option applies only if the endpoint returns a stream of events.
151
+ *
152
+ * @default 3000
153
+ */
154
+ sseDefaultRetryDelay?: number;
155
+ /**
156
+ * Maximum number of retry attempts before giving up.
157
+ */
158
+ sseMaxRetryAttempts?: number;
159
+ /**
160
+ * Maximum retry delay in milliseconds.
161
+ *
162
+ * Applies only when exponential backoff is used.
163
+ *
164
+ * This option applies only if the endpoint returns a stream of events.
165
+ *
166
+ * @default 30000
167
+ */
168
+ sseMaxRetryDelay?: number;
169
+ /**
170
+ * Optional sleep function for retry backoff.
171
+ *
172
+ * Defaults to using `setTimeout`.
173
+ */
174
+ sseSleepFn?: (ms: number) => Promise<void>;
175
+ url: string;
176
+ };
177
+ interface StreamEvent<TData = unknown> {
178
+ data: TData;
179
+ event?: string;
180
+ id?: string;
181
+ retry?: number;
182
+ }
183
+ type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
184
+ stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
185
+ };
186
+ //#endregion
187
+ //#region src/generated/client/utils.gen.d.ts
188
+ type ErrInterceptor<Err, Res, Req, Options> = (error: Err, response: Res, request: Req, options: Options) => Err | Promise<Err>;
189
+ type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
190
+ type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
191
+ declare class Interceptors<Interceptor> {
192
+ fns: Array<Interceptor | null>;
193
+ clear(): void;
194
+ eject(id: number | Interceptor): void;
195
+ exists(id: number | Interceptor): boolean;
196
+ getInterceptorIndex(id: number | Interceptor): number;
197
+ update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
198
+ use(fn: Interceptor): number;
199
+ }
200
+ interface Middleware<Req, Res, Err, Options> {
201
+ error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;
202
+ request: Interceptors<ReqInterceptor<Req, Options>>;
203
+ response: Interceptors<ResInterceptor<Res, Req, Options>>;
204
+ }
205
+ //#endregion
206
+ //#region src/generated/client/types.gen.d.ts
207
+ type ResponseStyle = 'data' | 'fields';
208
+ interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
209
+ /**
210
+ * Base URL for all requests made by this client.
211
+ */
212
+ baseUrl?: T['baseUrl'];
213
+ /**
214
+ * Fetch API implementation. You can use this option to provide a custom
215
+ * fetch instance.
216
+ *
217
+ * @default globalThis.fetch
218
+ */
219
+ fetch?: typeof fetch;
220
+ /**
221
+ * Please don't use the Fetch client for Next.js applications. The `next`
222
+ * options won't have any effect.
223
+ *
224
+ * Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
225
+ */
226
+ next?: never;
227
+ /**
228
+ * Return the response data parsed in a specified format. By default, `auto`
229
+ * will infer the appropriate method from the `Content-Type` response header.
230
+ * You can override this behavior with any of the {@link Body} methods.
231
+ * Select `stream` if you don't want to parse response data at all.
232
+ *
233
+ * @default 'auto'
234
+ */
235
+ parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
236
+ /**
237
+ * Should we return only data or multiple fields (data, error, response, etc.)?
238
+ *
239
+ * @default 'fields'
240
+ */
241
+ responseStyle?: ResponseStyle;
242
+ /**
243
+ * Throw an error instead of returning it in the response?
244
+ *
245
+ * @default false
246
+ */
247
+ throwOnError?: T['throwOnError'];
248
+ }
249
+ interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
250
+ responseStyle: TResponseStyle;
251
+ throwOnError: ThrowOnError;
252
+ }>, Pick<ServerSentEventsOptions<TData>, 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
253
+ /**
254
+ * Any body that you want to add to your request.
255
+ *
256
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
257
+ */
258
+ body?: unknown;
259
+ path?: Record<string, unknown>;
260
+ query?: Record<string, unknown>;
261
+ /**
262
+ * Security mechanism(s) to use for the request.
263
+ */
264
+ security?: ReadonlyArray<Auth>;
265
+ url: Url;
266
+ }
267
+ interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
268
+ serializedBody?: string;
269
+ }
270
+ type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
271
+ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
272
+ request: Request;
273
+ response: Response;
274
+ }> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
275
+ data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
276
+ error: undefined;
277
+ } | {
278
+ data: undefined;
279
+ error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
280
+ }) & {
281
+ request: Request;
282
+ response: Response;
283
+ }>;
284
+ interface ClientOptions$1 {
285
+ baseUrl?: string;
286
+ responseStyle?: ResponseStyle;
287
+ throwOnError?: boolean;
288
+ }
289
+ type MethodFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
290
+ type SseFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
291
+ type RequestFn = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
292
+ type BuildUrlFn = <TData extends {
293
+ body?: unknown;
294
+ path?: Record<string, unknown>;
295
+ query?: Record<string, unknown>;
296
+ url: string;
297
+ }>(options: TData & Options$1<TData>) => string;
298
+ type Client = Client$1<RequestFn, Config, MethodFn, BuildUrlFn, SseFn> & {
299
+ interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
300
+ };
301
+ interface TDataShape {
302
+ body?: unknown;
303
+ headers?: unknown;
304
+ path?: unknown;
305
+ query?: unknown;
306
+ url: string;
307
+ }
308
+ type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
309
+ type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
310
+ //#endregion
311
+ //#region src/generated/types.gen.d.ts
312
+ type ClientOptions = {
313
+ baseUrl: 'https://api.gtx.dev' | (string & {});
314
+ };
315
+ type ErrorResponse = {
316
+ error: string;
317
+ };
318
+ type FileFormat = 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
319
+ type Branch = {
320
+ id: string;
321
+ name: string;
322
+ };
323
+ type RuntimeTranslationResponse = {
324
+ [key: string]: {
325
+ success: true;
326
+ translation?: unknown;
327
+ dataFormat: 'JSX' | 'ICU' | 'I18NEXT' | 'STRING';
328
+ locale: string;
329
+ } | {
330
+ success: false;
331
+ error: string;
332
+ code: number;
333
+ };
334
+ };
335
+ type RuntimeTranslationRequest = {
336
+ requests: {
337
+ [key: string]: {
338
+ source?: unknown;
339
+ metadata?: {
340
+ id?: string;
341
+ hash?: string;
342
+ context?: string;
343
+ maxChars?: number;
344
+ dataFormat?: 'JSX' | 'ICU' | 'I18NEXT' | 'STRING';
345
+ actionType?: 'fast';
346
+ sourceCode?: {
347
+ [key: string]: Array<{
348
+ before: string;
349
+ target: string;
350
+ after: string;
351
+ }>;
352
+ };
353
+ };
354
+ };
355
+ };
356
+ targetLocale: string;
357
+ sourceLocale: string;
358
+ metadata: {
359
+ modelProvider?: 'ANTHROPIC' | 'OPENAI' | 'XAI' | 'GOOGLE';
360
+ };
361
+ };
362
+ type CreateCliWizardSessionResponse = {
363
+ sessionId: string;
364
+ };
365
+ type CreateCliWizardSessionRequest = {
366
+ keyType?: 'development' | 'production' | 'all';
367
+ };
368
+ type CliWizardSessionReadyResponse = {
369
+ apiKeys: Array<{
370
+ key: string;
371
+ type: 'development' | 'production';
372
+ }>;
373
+ projectId: string;
374
+ } | {
375
+ apiKey: string;
376
+ projectId: string;
377
+ };
378
+ type CliWizardSessionWaitingResponse = {
379
+ message: string;
380
+ };
381
+ type DeleteCliWizardSessionResponse = {
382
+ message: string;
383
+ };
384
+ type CreateProjectData = {
385
+ body: {
386
+ name: string;
387
+ defaultLocale: string;
388
+ cdnEnabled?: boolean;
389
+ };
390
+ headers?: {
391
+ /**
392
+ * API contract version. Defaults to the oldest supported version.
393
+ */
394
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
395
+ };
396
+ path?: never;
397
+ query?: never;
398
+ url: '/v2/projects';
399
+ };
400
+ type CreateProjectErrors = {
401
+ /**
402
+ * Request error
403
+ */
404
+ 400: ErrorResponse;
405
+ /**
406
+ * Request error
407
+ */
408
+ 401: ErrorResponse;
409
+ /**
410
+ * Request error
411
+ */
412
+ 403: ErrorResponse;
413
+ /**
414
+ * Request error
415
+ */
416
+ 409: ErrorResponse;
417
+ /**
418
+ * Request error
419
+ */
420
+ 413: ErrorResponse;
421
+ /**
422
+ * Request error
423
+ */
424
+ 429: ErrorResponse;
425
+ /**
426
+ * Request error
427
+ */
428
+ 500: ErrorResponse;
429
+ };
430
+ type CreateProjectError = CreateProjectErrors[keyof CreateProjectErrors];
431
+ type CreateProjectResponses = {
432
+ /**
433
+ * Project created
434
+ */
435
+ 201: {
436
+ project: {
437
+ id: string;
438
+ name: string;
439
+ orgId: string;
440
+ defaultLocale: string;
441
+ };
442
+ };
443
+ };
444
+ type CreateProjectResponse = CreateProjectResponses[keyof CreateProjectResponses];
445
+ type UploadSourceFilesData = {
446
+ body: {
447
+ data: Array<{
448
+ source: {
449
+ content: string;
450
+ fileName: string;
451
+ fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
452
+ dataFormat?: string;
453
+ locale: string;
454
+ fileId?: string;
455
+ versionId?: string;
456
+ branchId?: string;
457
+ checkedOutBranchId?: string;
458
+ incomingBranchId?: string;
459
+ formatMetadata?: {
460
+ [key: string]: unknown;
461
+ };
462
+ };
463
+ }>;
464
+ sourceLocale?: string;
465
+ };
466
+ headers?: {
467
+ /**
468
+ * API contract version. Defaults to the oldest supported version.
469
+ */
470
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
471
+ /**
472
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
473
+ */
474
+ 'gt-project-id'?: string;
475
+ };
476
+ path?: never;
477
+ query?: never;
478
+ url: '/v2/project/files/upload-files';
479
+ };
480
+ type UploadSourceFilesErrors = {
481
+ /**
482
+ * Request error
483
+ */
484
+ 400: ErrorResponse;
485
+ /**
486
+ * Request error
487
+ */
488
+ 401: ErrorResponse;
489
+ /**
490
+ * Request error
491
+ */
492
+ 403: ErrorResponse;
493
+ /**
494
+ * Request error
495
+ */
496
+ 404: ErrorResponse;
497
+ /**
498
+ * Request error
499
+ */
500
+ 413: ErrorResponse;
501
+ /**
502
+ * Request error
503
+ */
504
+ 429: ErrorResponse;
505
+ /**
506
+ * Request error
507
+ */
508
+ 500: ErrorResponse;
509
+ /**
510
+ * Request error
511
+ */
512
+ 503: ErrorResponse;
513
+ };
514
+ type UploadSourceFilesError = UploadSourceFilesErrors[keyof UploadSourceFilesErrors];
515
+ type UploadSourceFilesResponses = {
516
+ /**
517
+ * Uploaded source files
518
+ */
519
+ 201: {
520
+ uploadedFiles: Array<{
521
+ branchId?: string;
522
+ fileId: string;
523
+ versionId: string;
524
+ fileName: string;
525
+ fileFormat: FileFormat;
526
+ dataFormat?: string;
527
+ locale?: string;
528
+ }>;
529
+ count: number;
530
+ message: string;
531
+ };
532
+ };
533
+ type UploadSourceFilesResponse = UploadSourceFilesResponses[keyof UploadSourceFilesResponses];
534
+ type UploadTranslationsData = {
535
+ body: {
536
+ data: Array<{
537
+ source: {
538
+ content: string;
539
+ fileName: string;
540
+ fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
541
+ dataFormat?: string;
542
+ locale: string;
543
+ fileId?: string;
544
+ versionId?: string;
545
+ branchId?: string;
546
+ checkedOutBranchId?: string;
547
+ incomingBranchId?: string;
548
+ formatMetadata?: {
549
+ [key: string]: unknown;
550
+ };
551
+ };
552
+ translations: Array<{
553
+ content: string;
554
+ fileName: string;
555
+ fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
556
+ dataFormat?: string;
557
+ locale: string;
558
+ transformFormat?: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
559
+ }>;
560
+ }>;
561
+ sourceLocale?: string;
562
+ };
563
+ headers?: {
564
+ /**
565
+ * API contract version. Defaults to the oldest supported version.
566
+ */
567
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
568
+ /**
569
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
570
+ */
571
+ 'gt-project-id'?: string;
572
+ };
573
+ path?: never;
574
+ query?: never;
575
+ url: '/v2/project/files/upload-translations';
576
+ };
577
+ type UploadTranslationsErrors = {
578
+ /**
579
+ * Request error
580
+ */
581
+ 400: ErrorResponse;
582
+ /**
583
+ * Request error
584
+ */
585
+ 401: ErrorResponse;
586
+ /**
587
+ * Request error
588
+ */
589
+ 403: ErrorResponse;
590
+ /**
591
+ * Request error
592
+ */
593
+ 404: ErrorResponse;
594
+ /**
595
+ * Request error
596
+ */
597
+ 413: ErrorResponse;
598
+ /**
599
+ * Request error
600
+ */
601
+ 429: ErrorResponse;
602
+ /**
603
+ * Request error
604
+ */
605
+ 500: ErrorResponse;
606
+ /**
607
+ * Request error
608
+ */
609
+ 503: ErrorResponse;
610
+ };
611
+ type UploadTranslationsError = UploadTranslationsErrors[keyof UploadTranslationsErrors];
612
+ type UploadTranslationsResponses = {
613
+ /**
614
+ * Uploaded translation files
615
+ */
616
+ 201: {
617
+ uploadedFiles: Array<{
618
+ branchId?: string;
619
+ fileId: string;
620
+ versionId: string;
621
+ fileName: string;
622
+ fileFormat: FileFormat;
623
+ dataFormat?: string;
624
+ locale?: string;
625
+ }>;
626
+ count: number;
627
+ message: string;
628
+ };
629
+ };
630
+ type UploadTranslationsResponse = UploadTranslationsResponses[keyof UploadTranslationsResponses];
631
+ type UploadAssetsData = {
632
+ body: {
633
+ assets: Array<{
634
+ assetType: 'FONT';
635
+ content: string;
636
+ fileName: string;
637
+ family?: string;
638
+ style?: string;
639
+ }>;
640
+ };
641
+ headers?: {
642
+ /**
643
+ * API contract version. Defaults to the oldest supported version.
644
+ */
645
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
646
+ /**
647
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
648
+ */
649
+ 'gt-project-id'?: string;
650
+ };
651
+ path?: never;
652
+ query?: never;
653
+ url: '/v2/project/assets';
654
+ };
655
+ type UploadAssetsErrors = {
656
+ /**
657
+ * Request error
658
+ */
659
+ 400: ErrorResponse;
660
+ /**
661
+ * Request error
662
+ */
663
+ 401: ErrorResponse;
664
+ /**
665
+ * Request error
666
+ */
667
+ 403: ErrorResponse;
668
+ /**
669
+ * Request error
670
+ */
671
+ 404: ErrorResponse;
672
+ /**
673
+ * Request error
674
+ */
675
+ 413: ErrorResponse;
676
+ /**
677
+ * Request error
678
+ */
679
+ 429: ErrorResponse;
680
+ /**
681
+ * Request error
682
+ */
683
+ 500: ErrorResponse;
684
+ };
685
+ type UploadAssetsError = UploadAssetsErrors[keyof UploadAssetsErrors];
686
+ type UploadAssetsResponses = {
687
+ /**
688
+ * Uploaded assets
689
+ */
690
+ 201: {
691
+ assets: Array<{
692
+ id: string;
693
+ assetKey: string;
694
+ fileName: string;
695
+ }>;
696
+ count: number;
697
+ };
698
+ };
699
+ type UploadAssetsResponse = UploadAssetsResponses[keyof UploadAssetsResponses];
700
+ type SubmitUserEditDiffsData = {
701
+ body: {
702
+ projectId?: string;
703
+ diffs: Array<{
704
+ locale: string;
705
+ diff: string;
706
+ branchId?: string;
707
+ versionId: string;
708
+ fileId: string;
709
+ localContent: string;
710
+ }>;
711
+ };
712
+ headers?: {
713
+ /**
714
+ * API contract version. Defaults to the oldest supported version.
715
+ */
716
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
717
+ /**
718
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
719
+ */
720
+ 'gt-project-id'?: string;
721
+ };
722
+ path?: never;
723
+ query?: never;
724
+ url: '/v2/project/files/diffs';
725
+ };
726
+ type SubmitUserEditDiffsErrors = {
727
+ /**
728
+ * Request error
729
+ */
730
+ 400: ErrorResponse;
731
+ /**
732
+ * Request error
733
+ */
734
+ 401: ErrorResponse;
735
+ /**
736
+ * Request error
737
+ */
738
+ 403: ErrorResponse;
739
+ /**
740
+ * Request error
741
+ */
742
+ 413: ErrorResponse;
743
+ /**
744
+ * Request error
745
+ */
746
+ 429: ErrorResponse;
747
+ /**
748
+ * Request error
749
+ */
750
+ 500: ErrorResponse;
751
+ };
752
+ type SubmitUserEditDiffsError = SubmitUserEditDiffsErrors[keyof SubmitUserEditDiffsErrors];
753
+ type SubmitUserEditDiffsResponses = {
754
+ /**
755
+ * Processed user translation edits
756
+ */
757
+ 200: {
758
+ filesProcessed: number;
759
+ entriesReceived: number;
760
+ message: string;
761
+ };
762
+ };
763
+ type SubmitUserEditDiffsResponse = SubmitUserEditDiffsResponses[keyof SubmitUserEditDiffsResponses];
764
+ type ShouldGenerateProjectContextData = {
765
+ body?: never;
766
+ headers?: {
767
+ /**
768
+ * API contract version. Defaults to the oldest supported version.
769
+ */
770
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
771
+ /**
772
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
773
+ */
774
+ 'gt-project-id'?: string;
775
+ };
776
+ path?: never;
777
+ query?: never;
778
+ url: '/v2/project/setup/should-generate';
779
+ };
780
+ type ShouldGenerateProjectContextErrors = {
781
+ /**
782
+ * Request error
783
+ */
784
+ 400: ErrorResponse;
785
+ /**
786
+ * Request error
787
+ */
788
+ 401: ErrorResponse;
789
+ /**
790
+ * Request error
791
+ */
792
+ 403: ErrorResponse;
793
+ /**
794
+ * Request error
795
+ */
796
+ 404: ErrorResponse;
797
+ /**
798
+ * Request error
799
+ */
800
+ 429: ErrorResponse;
801
+ /**
802
+ * Request error
803
+ */
804
+ 500: ErrorResponse;
805
+ };
806
+ type ShouldGenerateProjectContextError = ShouldGenerateProjectContextErrors[keyof ShouldGenerateProjectContextErrors];
807
+ type ShouldGenerateProjectContextResponses = {
808
+ /**
809
+ * Whether project context should be generated
810
+ */
811
+ 200: {
812
+ shouldSetupProject: boolean;
813
+ };
814
+ };
815
+ type ShouldGenerateProjectContextResponse = ShouldGenerateProjectContextResponses[keyof ShouldGenerateProjectContextResponses];
816
+ type GenerateProjectContextData = {
817
+ body: {
818
+ files: Array<{
819
+ branchId?: string;
820
+ fileId: string;
821
+ versionId: string;
822
+ }>;
823
+ locales?: Array<string>;
824
+ force?: boolean;
825
+ };
826
+ headers?: {
827
+ /**
828
+ * API contract version. Defaults to the oldest supported version.
829
+ */
830
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
831
+ /**
832
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
833
+ */
834
+ 'gt-project-id'?: string;
835
+ };
836
+ path?: never;
837
+ query?: never;
838
+ url: '/v2/project/setup/generate';
839
+ };
840
+ type GenerateProjectContextErrors = {
841
+ /**
842
+ * Request error
843
+ */
844
+ 400: ErrorResponse;
845
+ /**
846
+ * Request error
847
+ */
848
+ 401: ErrorResponse;
849
+ /**
850
+ * Request error
851
+ */
852
+ 403: ErrorResponse;
853
+ /**
854
+ * Request error
855
+ */
856
+ 404: ErrorResponse;
857
+ /**
858
+ * Request error
859
+ */
860
+ 413: ErrorResponse;
861
+ /**
862
+ * Request error
863
+ */
864
+ 429: ErrorResponse;
865
+ /**
866
+ * Request error
867
+ */
868
+ 500: ErrorResponse;
869
+ };
870
+ type GenerateProjectContextError = GenerateProjectContextErrors[keyof GenerateProjectContextErrors];
871
+ type GenerateProjectContextResponses = {
872
+ /**
873
+ * Context generation status
874
+ */
875
+ 200: {
876
+ status: 'completed';
877
+ } | {
878
+ setupJobId: string;
879
+ status: 'queued';
880
+ };
881
+ };
882
+ type GenerateProjectContextResponse = GenerateProjectContextResponses[keyof GenerateProjectContextResponses];
883
+ type GetProjectContextGenerationStatusData = {
884
+ body?: never;
885
+ headers?: {
886
+ /**
887
+ * API contract version. Defaults to the oldest supported version.
888
+ */
889
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
890
+ /**
891
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
892
+ */
893
+ 'gt-project-id'?: string;
894
+ };
895
+ path: {
896
+ jobId: string;
897
+ };
898
+ query?: never;
899
+ url: '/v2/project/setup/status/{jobId}';
900
+ };
901
+ type GetProjectContextGenerationStatusErrors = {
902
+ /**
903
+ * Request error
904
+ */
905
+ 400: ErrorResponse;
906
+ /**
907
+ * Request error
908
+ */
909
+ 401: ErrorResponse;
910
+ /**
911
+ * Request error
912
+ */
913
+ 403: ErrorResponse;
914
+ /**
915
+ * Request error
916
+ */
917
+ 404: ErrorResponse;
918
+ /**
919
+ * Request error
920
+ */
921
+ 429: ErrorResponse;
922
+ /**
923
+ * Request error
924
+ */
925
+ 500: ErrorResponse;
926
+ };
927
+ type GetProjectContextGenerationStatusError = GetProjectContextGenerationStatusErrors[keyof GetProjectContextGenerationStatusErrors];
928
+ type GetProjectContextGenerationStatusResponses = {
929
+ /**
930
+ * Context generation job status
931
+ */
932
+ 200: {
933
+ status: 'completed';
934
+ } | {
935
+ jobId: string;
936
+ status: 'queued' | 'processing' | 'failed' | 'unknown';
937
+ };
938
+ };
939
+ type GetProjectContextGenerationStatusResponse = GetProjectContextGenerationStatusResponses[keyof GetProjectContextGenerationStatusResponses];
940
+ type EnqueueFileTranslationsData = {
941
+ body: {
942
+ files: Array<{
943
+ branchId?: string;
944
+ fileId: string;
945
+ versionId: string;
946
+ fileName?: string;
947
+ transformFormat?: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
948
+ }>;
949
+ targetLocales?: Array<string>;
950
+ sourceLocale?: string;
951
+ force?: boolean;
952
+ modelProvider?: 'ANTHROPIC' | 'OPENAI' | 'XAI' | 'GOOGLE';
953
+ publish?: boolean;
954
+ };
955
+ headers?: {
956
+ /**
957
+ * API contract version. Defaults to the oldest supported version.
958
+ */
959
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
960
+ /**
961
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
962
+ */
963
+ 'gt-project-id'?: string;
964
+ };
965
+ path?: never;
966
+ query?: never;
967
+ url: '/v2/project/translations/enqueue';
968
+ };
969
+ type EnqueueFileTranslationsErrors = {
970
+ /**
971
+ * Invalid request or missing source files
972
+ */
973
+ 400: ErrorResponse | {
974
+ error: string;
975
+ missing: Array<{
976
+ fileId: string;
977
+ versionId: string;
978
+ }>;
979
+ count: number;
980
+ };
981
+ /**
982
+ * Request error
983
+ */
984
+ 401: ErrorResponse;
985
+ /**
986
+ * Request error
987
+ */
988
+ 402: ErrorResponse;
989
+ /**
990
+ * Request error
991
+ */
992
+ 403: ErrorResponse;
993
+ /**
994
+ * Request error
995
+ */
996
+ 404: ErrorResponse;
997
+ /**
998
+ * Request error
999
+ */
1000
+ 413: ErrorResponse;
1001
+ /**
1002
+ * Request error
1003
+ */
1004
+ 429: ErrorResponse;
1005
+ /**
1006
+ * Request error
1007
+ */
1008
+ 500: ErrorResponse;
1009
+ };
1010
+ type EnqueueFileTranslationsError = EnqueueFileTranslationsErrors[keyof EnqueueFileTranslationsErrors];
1011
+ type EnqueueFileTranslationsResponses = {
1012
+ /**
1013
+ * Enqueued translations. Shape depends on gt-api-version (legacy before 2025-11-03.v1).
1014
+ */
1015
+ 200: {
1016
+ jobData: {
1017
+ [key: string]: {
1018
+ kind?: 'file_translation';
1019
+ sourceFileId: string;
1020
+ fileId: string;
1021
+ versionId: string;
1022
+ branchId: string;
1023
+ targetLocale: string;
1024
+ projectId: string;
1025
+ force: boolean;
1026
+ outputFileFormat?: FileFormat;
1027
+ modelProvider?: 'ANTHROPIC' | 'OPENAI' | 'XAI' | 'GOOGLE';
1028
+ glossaryRetranslate?: boolean;
1029
+ changedGlossaryTerms?: Array<string>;
1030
+ onComplete?: {
1031
+ kind: 'google_drive_apply';
1032
+ userId?: string;
1033
+ };
1034
+ };
1035
+ };
1036
+ locales: Array<string>;
1037
+ message: string;
1038
+ } | {
1039
+ translations: Array<{
1040
+ locale: string;
1041
+ metadata?: unknown;
1042
+ fileId: string;
1043
+ fileName: string;
1044
+ versionId: string;
1045
+ branchId: string;
1046
+ id: string;
1047
+ isReady: boolean;
1048
+ downloadUrl: string;
1049
+ }>;
1050
+ data: {
1051
+ [key: string]: {
1052
+ fileName: string;
1053
+ versionId: string;
1054
+ };
1055
+ };
1056
+ locales: Array<string>;
1057
+ message: string;
1058
+ };
1059
+ };
1060
+ type EnqueueFileTranslationsResponse = EnqueueFileTranslationsResponses[keyof EnqueueFileTranslationsResponses];
1061
+ type PublishFilesData = {
1062
+ body: {
1063
+ files: Array<{
1064
+ fileId: string;
1065
+ versionId: string;
1066
+ branchId?: string;
1067
+ publish: boolean;
1068
+ }>;
1069
+ };
1070
+ headers?: {
1071
+ /**
1072
+ * API contract version. Defaults to the oldest supported version.
1073
+ */
1074
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
1075
+ /**
1076
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
1077
+ */
1078
+ 'gt-project-id'?: string;
1079
+ };
1080
+ path?: never;
1081
+ query?: never;
1082
+ url: '/v2/project/files/publish';
1083
+ };
1084
+ type PublishFilesErrors = {
1085
+ /**
1086
+ * Request error
1087
+ */
1088
+ 400: ErrorResponse;
1089
+ /**
1090
+ * Request error
1091
+ */
1092
+ 401: ErrorResponse;
1093
+ /**
1094
+ * Request error
1095
+ */
1096
+ 403: ErrorResponse;
1097
+ /**
1098
+ * Request error
1099
+ */
1100
+ 404: ErrorResponse;
1101
+ /**
1102
+ * Request error
1103
+ */
1104
+ 413: ErrorResponse;
1105
+ /**
1106
+ * Request error
1107
+ */
1108
+ 429: ErrorResponse;
1109
+ /**
1110
+ * Request error
1111
+ */
1112
+ 500: ErrorResponse;
1113
+ };
1114
+ type PublishFilesError = PublishFilesErrors[keyof PublishFilesErrors];
1115
+ type PublishFilesResponses = {
1116
+ /**
1117
+ * File publish results
1118
+ */
1119
+ 200: {
1120
+ results: Array<{
1121
+ fileId: string;
1122
+ versionId: string;
1123
+ locale?: string;
1124
+ branchId: string;
1125
+ success: boolean;
1126
+ error?: string;
1127
+ }>;
1128
+ };
1129
+ };
1130
+ type PublishFilesResponse = PublishFilesResponses[keyof PublishFilesResponses];
1131
+ type DownloadFileData = {
1132
+ body?: never;
1133
+ headers?: {
1134
+ /**
1135
+ * API contract version. Defaults to the oldest supported version.
1136
+ */
1137
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
1138
+ /**
1139
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
1140
+ */
1141
+ 'gt-project-id'?: string;
1142
+ };
1143
+ path: {
1144
+ fileId: string;
1145
+ };
1146
+ query?: {
1147
+ branchId?: string;
1148
+ versionId?: string;
1149
+ locale?: string;
1150
+ };
1151
+ url: '/v2/project/files/download/{fileId}';
1152
+ };
1153
+ type DownloadFileErrors = {
1154
+ /**
1155
+ * Request error
1156
+ */
1157
+ 400: ErrorResponse;
1158
+ /**
1159
+ * Request error
1160
+ */
1161
+ 401: ErrorResponse;
1162
+ /**
1163
+ * Request error
1164
+ */
1165
+ 403: ErrorResponse;
1166
+ /**
1167
+ * Request error
1168
+ */
1169
+ 404: ErrorResponse;
1170
+ /**
1171
+ * Translation is still processing
1172
+ */
1173
+ 425: {
1174
+ status: 'processing';
1175
+ message: string;
1176
+ };
1177
+ /**
1178
+ * Request error
1179
+ */
1180
+ 429: ErrorResponse;
1181
+ /**
1182
+ * Request error
1183
+ */
1184
+ 500: ErrorResponse;
1185
+ };
1186
+ type DownloadFileError = DownloadFileErrors[keyof DownloadFileErrors];
1187
+ type DownloadFileResponses = {
1188
+ /**
1189
+ * Downloaded file
1190
+ */
1191
+ 200: {
1192
+ data: string;
1193
+ };
1194
+ };
1195
+ type DownloadFileResponse = DownloadFileResponses[keyof DownloadFileResponses];
1196
+ type DownloadFilesData = {
1197
+ body: Array<{
1198
+ fileId: string;
1199
+ branchId?: string;
1200
+ versionId?: string;
1201
+ locale?: string;
1202
+ useLatestAvailableVersion?: boolean;
1203
+ }>;
1204
+ headers?: {
1205
+ /**
1206
+ * API contract version. Defaults to the oldest supported version.
1207
+ */
1208
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
1209
+ /**
1210
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
1211
+ */
1212
+ 'gt-project-id'?: string;
1213
+ };
1214
+ path?: never;
1215
+ query?: never;
1216
+ url: '/v2/project/files/download';
1217
+ };
1218
+ type DownloadFilesErrors = {
1219
+ /**
1220
+ * Request error
1221
+ */
1222
+ 400: ErrorResponse;
1223
+ /**
1224
+ * Request error
1225
+ */
1226
+ 401: ErrorResponse;
1227
+ /**
1228
+ * Request error
1229
+ */
1230
+ 403: ErrorResponse;
1231
+ /**
1232
+ * Request error
1233
+ */
1234
+ 413: ErrorResponse;
1235
+ /**
1236
+ * Request error
1237
+ */
1238
+ 429: ErrorResponse;
1239
+ /**
1240
+ * Request error
1241
+ */
1242
+ 500: ErrorResponse;
1243
+ };
1244
+ type DownloadFilesError = DownloadFilesErrors[keyof DownloadFilesErrors];
1245
+ type DownloadFilesResponses = {
1246
+ /**
1247
+ * Downloaded files
1248
+ */
1249
+ 200: {
1250
+ files: Array<{
1251
+ id: string;
1252
+ branchId: string;
1253
+ fileId: string;
1254
+ versionId: string;
1255
+ locale?: string;
1256
+ fileName?: string;
1257
+ data: string;
1258
+ metadata: {
1259
+ [key: string]: unknown;
1260
+ };
1261
+ fileFormat: FileFormat;
1262
+ }>;
1263
+ count: number;
1264
+ pending?: Array<{
1265
+ branchId: string;
1266
+ fileId: string;
1267
+ locale: string;
1268
+ versionId: string;
1269
+ }>;
1270
+ };
1271
+ };
1272
+ type DownloadFilesResponse = DownloadFilesResponses[keyof DownloadFilesResponses];
1273
+ type GetBranchInfoData = {
1274
+ body: {
1275
+ branchNames?: Array<string>;
1276
+ };
1277
+ headers?: {
1278
+ /**
1279
+ * API contract version. Defaults to the oldest supported version.
1280
+ */
1281
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
1282
+ /**
1283
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
1284
+ */
1285
+ 'gt-project-id'?: string;
1286
+ };
1287
+ path?: never;
1288
+ query?: never;
1289
+ url: '/v2/project/branches/info';
1290
+ };
1291
+ type GetBranchInfoErrors = {
1292
+ /**
1293
+ * Request error
1294
+ */
1295
+ 400: ErrorResponse;
1296
+ /**
1297
+ * Request error
1298
+ */
1299
+ 401: ErrorResponse;
1300
+ /**
1301
+ * Request error
1302
+ */
1303
+ 403: ErrorResponse;
1304
+ /**
1305
+ * Request error
1306
+ */
1307
+ 413: ErrorResponse;
1308
+ /**
1309
+ * Request error
1310
+ */
1311
+ 429: ErrorResponse;
1312
+ /**
1313
+ * Request error
1314
+ */
1315
+ 500: ErrorResponse;
1316
+ };
1317
+ type GetBranchInfoError = GetBranchInfoErrors[keyof GetBranchInfoErrors];
1318
+ type GetBranchInfoResponses = {
1319
+ /**
1320
+ * Branch information
1321
+ */
1322
+ 200: {
1323
+ branches: Array<Branch>;
1324
+ defaultBranch: Branch & ({
1325
+ [key: string]: unknown;
1326
+ } | null);
1327
+ };
1328
+ };
1329
+ type GetBranchInfoResponse = GetBranchInfoResponses[keyof GetBranchInfoResponses];
1330
+ type CreateBranchData = {
1331
+ body: {
1332
+ branchName: string;
1333
+ defaultBranch?: boolean;
1334
+ };
1335
+ headers?: {
1336
+ /**
1337
+ * API contract version. Defaults to the oldest supported version.
1338
+ */
1339
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
1340
+ /**
1341
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
1342
+ */
1343
+ 'gt-project-id'?: string;
1344
+ };
1345
+ path?: never;
1346
+ query?: never;
1347
+ url: '/v2/project/branches/create';
1348
+ };
1349
+ type CreateBranchErrors = {
1350
+ /**
1351
+ * Request error
1352
+ */
1353
+ 400: ErrorResponse;
1354
+ /**
1355
+ * Request error
1356
+ */
1357
+ 401: ErrorResponse;
1358
+ /**
1359
+ * Request error
1360
+ */
1361
+ 403: ErrorResponse;
1362
+ /**
1363
+ * Request error
1364
+ */
1365
+ 409: ErrorResponse;
1366
+ /**
1367
+ * Request error
1368
+ */
1369
+ 413: ErrorResponse;
1370
+ /**
1371
+ * Request error
1372
+ */
1373
+ 429: ErrorResponse;
1374
+ /**
1375
+ * Request error
1376
+ */
1377
+ 500: ErrorResponse;
1378
+ };
1379
+ type CreateBranchError = CreateBranchErrors[keyof CreateBranchErrors];
1380
+ type CreateBranchResponses = {
1381
+ /**
1382
+ * Created or existing branch
1383
+ */
1384
+ 200: {
1385
+ branch: Branch;
1386
+ };
1387
+ };
1388
+ type CreateBranchResponse = CreateBranchResponses[keyof CreateBranchResponses];
1389
+ type CreateTagData = {
1390
+ body: {
1391
+ tagId: string;
1392
+ files: Array<{
1393
+ fileId: string;
1394
+ versionId: string;
1395
+ branchId: string;
1396
+ }>;
1397
+ message?: string;
1398
+ };
1399
+ headers?: {
1400
+ /**
1401
+ * API contract version. Defaults to the oldest supported version.
1402
+ */
1403
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
1404
+ /**
1405
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
1406
+ */
1407
+ 'gt-project-id'?: string;
1408
+ };
1409
+ path?: never;
1410
+ query?: never;
1411
+ url: '/v2/project/tags/create';
1412
+ };
1413
+ type CreateTagErrors = {
1414
+ /**
1415
+ * Request error
1416
+ */
1417
+ 400: ErrorResponse;
1418
+ /**
1419
+ * Request error
1420
+ */
1421
+ 401: ErrorResponse;
1422
+ /**
1423
+ * Request error
1424
+ */
1425
+ 403: ErrorResponse;
1426
+ /**
1427
+ * Request error
1428
+ */
1429
+ 413: ErrorResponse;
1430
+ /**
1431
+ * Request error
1432
+ */
1433
+ 429: ErrorResponse;
1434
+ /**
1435
+ * Request error
1436
+ */
1437
+ 500: ErrorResponse;
1438
+ };
1439
+ type CreateTagError = CreateTagErrors[keyof CreateTagErrors];
1440
+ type CreateTagResponses = {
1441
+ /**
1442
+ * Created or updated file tag
1443
+ */
1444
+ 200: {
1445
+ tag: {
1446
+ id: string;
1447
+ tagId: string;
1448
+ message: string | null;
1449
+ createdAt: string;
1450
+ updatedAt: string;
1451
+ };
1452
+ };
1453
+ };
1454
+ type CreateTagResponse = CreateTagResponses[keyof CreateTagResponses];
1455
+ type GetProjectInfoData = {
1456
+ body?: never;
1457
+ headers?: {
1458
+ /**
1459
+ * API contract version. Defaults to the oldest supported version.
1460
+ */
1461
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
1462
+ /**
1463
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
1464
+ */
1465
+ 'gt-project-id'?: string;
1466
+ };
1467
+ path: {
1468
+ projectId: string;
1469
+ };
1470
+ query?: never;
1471
+ url: '/v2/project/info/{projectId}';
1472
+ };
1473
+ type GetProjectInfoErrors = {
1474
+ /**
1475
+ * Request error
1476
+ */
1477
+ 400: ErrorResponse;
1478
+ /**
1479
+ * Request error
1480
+ */
1481
+ 401: ErrorResponse;
1482
+ /**
1483
+ * Request error
1484
+ */
1485
+ 403: ErrorResponse;
1486
+ /**
1487
+ * Request error
1488
+ */
1489
+ 404: ErrorResponse;
1490
+ /**
1491
+ * Request error
1492
+ */
1493
+ 429: ErrorResponse;
1494
+ /**
1495
+ * Request error
1496
+ */
1497
+ 500: ErrorResponse;
1498
+ };
1499
+ type GetProjectInfoError = GetProjectInfoErrors[keyof GetProjectInfoErrors];
1500
+ type GetProjectInfoResponses = {
1501
+ /**
1502
+ * Project information
1503
+ */
1504
+ 200: {
1505
+ id: string;
1506
+ name: string;
1507
+ orgId: string;
1508
+ defaultLocale: string | null;
1509
+ currentLocales: Array<string>;
1510
+ autoApprove: boolean;
1511
+ };
1512
+ };
1513
+ type GetProjectInfoResponse = GetProjectInfoResponses[keyof GetProjectInfoResponses];
1514
+ type UpdateProjectInfoData = {
1515
+ body: {
1516
+ defaultLocale?: string;
1517
+ cdnEnabled?: boolean;
1518
+ };
1519
+ headers?: {
1520
+ /**
1521
+ * API contract version. Defaults to the oldest supported version.
1522
+ */
1523
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
1524
+ /**
1525
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
1526
+ */
1527
+ 'gt-project-id'?: string;
1528
+ };
1529
+ path: {
1530
+ projectId: string;
1531
+ };
1532
+ query?: never;
1533
+ url: '/v2/project/info/{projectId}';
1534
+ };
1535
+ type UpdateProjectInfoErrors = {
1536
+ /**
1537
+ * Request error
1538
+ */
1539
+ 400: ErrorResponse;
1540
+ /**
1541
+ * Request error
1542
+ */
1543
+ 401: ErrorResponse;
1544
+ /**
1545
+ * Request error
1546
+ */
1547
+ 403: ErrorResponse;
1548
+ /**
1549
+ * Request error
1550
+ */
1551
+ 404: ErrorResponse;
1552
+ /**
1553
+ * Request error
1554
+ */
1555
+ 413: ErrorResponse;
1556
+ /**
1557
+ * Request error
1558
+ */
1559
+ 429: ErrorResponse;
1560
+ /**
1561
+ * Request error
1562
+ */
1563
+ 500: ErrorResponse;
1564
+ };
1565
+ type UpdateProjectInfoError = UpdateProjectInfoErrors[keyof UpdateProjectInfoErrors];
1566
+ type UpdateProjectInfoResponses = {
1567
+ /**
1568
+ * Project settings updated
1569
+ */
1570
+ 200: {
1571
+ success: true;
1572
+ };
1573
+ };
1574
+ type UpdateProjectInfoResponse = UpdateProjectInfoResponses[keyof UpdateProjectInfoResponses];
1575
+ type GetTranslationJobInfoData = {
1576
+ body: {
1577
+ jobIds: Array<string>;
1578
+ };
1579
+ headers?: {
1580
+ /**
1581
+ * API contract version. Defaults to the oldest supported version.
1582
+ */
1583
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
1584
+ /**
1585
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
1586
+ */
1587
+ 'gt-project-id'?: string;
1588
+ };
1589
+ path?: never;
1590
+ query?: never;
1591
+ url: '/v2/project/jobs/info';
1592
+ };
1593
+ type GetTranslationJobInfoErrors = {
1594
+ /**
1595
+ * Request error
1596
+ */
1597
+ 400: ErrorResponse;
1598
+ /**
1599
+ * Request error
1600
+ */
1601
+ 401: ErrorResponse;
1602
+ /**
1603
+ * Request error
1604
+ */
1605
+ 403: ErrorResponse;
1606
+ /**
1607
+ * Request error
1608
+ */
1609
+ 404: ErrorResponse;
1610
+ /**
1611
+ * Request error
1612
+ */
1613
+ 413: ErrorResponse;
1614
+ /**
1615
+ * Request error
1616
+ */
1617
+ 429: ErrorResponse;
1618
+ /**
1619
+ * Request error
1620
+ */
1621
+ 500: ErrorResponse;
1622
+ };
1623
+ type GetTranslationJobInfoError = GetTranslationJobInfoErrors[keyof GetTranslationJobInfoErrors];
1624
+ type GetTranslationJobInfoResponses = {
1625
+ /**
1626
+ * Translation job statuses
1627
+ */
1628
+ 200: Array<{
1629
+ status: 'queued';
1630
+ jobId: string;
1631
+ } | {
1632
+ status: 'processing';
1633
+ jobId: string;
1634
+ } | {
1635
+ status: 'failed';
1636
+ jobId: string;
1637
+ error: {
1638
+ message: string | null;
1639
+ };
1640
+ } | {
1641
+ status: 'completed';
1642
+ jobId: string;
1643
+ } | {
1644
+ status: 'unknown';
1645
+ jobId: string;
1646
+ }>;
1647
+ };
1648
+ type GetTranslationJobInfoResponse = GetTranslationJobInfoResponses[keyof GetTranslationJobInfoResponses];
1649
+ type TranslateData = {
1650
+ body: RuntimeTranslationRequest;
1651
+ headers?: {
1652
+ /**
1653
+ * API contract version. Defaults to the oldest supported version.
1654
+ */
1655
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
1656
+ /**
1657
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
1658
+ */
1659
+ 'gt-project-id'?: string;
1660
+ };
1661
+ path?: never;
1662
+ query?: never;
1663
+ url: '/v2/translate';
1664
+ };
1665
+ type TranslateErrors = {
1666
+ /**
1667
+ * Request error
1668
+ */
1669
+ 400: ErrorResponse;
1670
+ /**
1671
+ * Request error
1672
+ */
1673
+ 401: ErrorResponse;
1674
+ /**
1675
+ * Request error
1676
+ */
1677
+ 402: ErrorResponse;
1678
+ /**
1679
+ * Request error
1680
+ */
1681
+ 403: ErrorResponse;
1682
+ /**
1683
+ * Request error
1684
+ */
1685
+ 404: ErrorResponse;
1686
+ /**
1687
+ * Request error
1688
+ */
1689
+ 413: ErrorResponse;
1690
+ /**
1691
+ * Request error
1692
+ */
1693
+ 429: ErrorResponse;
1694
+ /**
1695
+ * Request error
1696
+ */
1697
+ 500: ErrorResponse;
1698
+ };
1699
+ type TranslateError = TranslateErrors[keyof TranslateErrors];
1700
+ type TranslateResponses = {
1701
+ /**
1702
+ * All translations were served from cache
1703
+ */
1704
+ 200: RuntimeTranslationResponse;
1705
+ /**
1706
+ * Translations completed
1707
+ */
1708
+ 201: RuntimeTranslationResponse;
1709
+ };
1710
+ type TranslateResponse = TranslateResponses[keyof TranslateResponses];
1711
+ type GetFileInfoData = {
1712
+ body: {
1713
+ sourceFiles?: Array<{
1714
+ fileId: string;
1715
+ versionId: string;
1716
+ branchId: string;
1717
+ }>;
1718
+ translatedFiles?: Array<{
1719
+ fileId: string;
1720
+ versionId: string;
1721
+ branchId: string;
1722
+ locale: string;
1723
+ }>;
1724
+ };
1725
+ headers?: {
1726
+ /**
1727
+ * API contract version. Defaults to the oldest supported version.
1728
+ */
1729
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
1730
+ /**
1731
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
1732
+ */
1733
+ 'gt-project-id'?: string;
1734
+ };
1735
+ path?: never;
1736
+ query?: never;
1737
+ url: '/v2/project/files/info';
1738
+ };
1739
+ type GetFileInfoErrors = {
1740
+ /**
1741
+ * Request error
1742
+ */
1743
+ 400: ErrorResponse;
1744
+ /**
1745
+ * Request error
1746
+ */
1747
+ 401: ErrorResponse;
1748
+ /**
1749
+ * Request error
1750
+ */
1751
+ 403: ErrorResponse;
1752
+ /**
1753
+ * Request error
1754
+ */
1755
+ 413: ErrorResponse;
1756
+ /**
1757
+ * Request error
1758
+ */
1759
+ 429: ErrorResponse;
1760
+ /**
1761
+ * Request error
1762
+ */
1763
+ 500: ErrorResponse;
1764
+ };
1765
+ type GetFileInfoError = GetFileInfoErrors[keyof GetFileInfoErrors];
1766
+ type GetFileInfoResponses = {
1767
+ /**
1768
+ * File information
1769
+ */
1770
+ 200: {
1771
+ sourceFiles: Array<{
1772
+ branchId: string;
1773
+ fileId: string;
1774
+ versionId: string;
1775
+ fileName: string;
1776
+ fileFormat: FileFormat;
1777
+ dataFormat: string | null;
1778
+ createdAt: string;
1779
+ updatedAt: string;
1780
+ publishedAt: string | null;
1781
+ locales: Array<string>;
1782
+ sourceLocale: string;
1783
+ }>;
1784
+ translatedFiles: Array<{
1785
+ branchId: string;
1786
+ fileId: string;
1787
+ versionId: string;
1788
+ fileFormat: FileFormat;
1789
+ dataFormat: string | null;
1790
+ createdAt: string;
1791
+ updatedAt: string;
1792
+ approvedAt: string | null;
1793
+ publishedAt: string | null;
1794
+ completedAt: string | null;
1795
+ locale: string;
1796
+ }>;
1797
+ };
1798
+ };
1799
+ type GetFileInfoResponse = GetFileInfoResponses[keyof GetFileInfoResponses];
1800
+ type GetTranslationStatusData = {
1801
+ body?: never;
1802
+ headers?: {
1803
+ /**
1804
+ * API contract version. Defaults to the oldest supported version.
1805
+ */
1806
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
1807
+ /**
1808
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
1809
+ */
1810
+ 'gt-project-id'?: string;
1811
+ };
1812
+ path: {
1813
+ fileId: string;
1814
+ };
1815
+ query?: {
1816
+ versionId?: string;
1817
+ branchId?: string;
1818
+ };
1819
+ url: '/v2/project/translations/files/status/{fileId}';
1820
+ };
1821
+ type GetTranslationStatusErrors = {
1822
+ /**
1823
+ * Request error
1824
+ */
1825
+ 400: ErrorResponse;
1826
+ /**
1827
+ * Request error
1828
+ */
1829
+ 401: ErrorResponse;
1830
+ /**
1831
+ * Request error
1832
+ */
1833
+ 403: ErrorResponse;
1834
+ /**
1835
+ * Request error
1836
+ */
1837
+ 404: ErrorResponse;
1838
+ /**
1839
+ * Request error
1840
+ */
1841
+ 429: ErrorResponse;
1842
+ /**
1843
+ * Request error
1844
+ */
1845
+ 500: ErrorResponse;
1846
+ };
1847
+ type GetTranslationStatusError = GetTranslationStatusErrors[keyof GetTranslationStatusErrors];
1848
+ type GetTranslationStatusResponses = {
1849
+ /**
1850
+ * Translation status
1851
+ */
1852
+ 200: {
1853
+ translations: Array<{
1854
+ locale: string;
1855
+ completedAt: string | null;
1856
+ approvedAt: string | null;
1857
+ publishedAt: string | null;
1858
+ createdAt: string | null;
1859
+ updatedAt: string | null;
1860
+ }>;
1861
+ sourceFile: {
1862
+ id: string;
1863
+ branchId: string;
1864
+ fileId: string;
1865
+ versionId: string;
1866
+ fileName: string;
1867
+ sourceLocale: string;
1868
+ fileFormat: FileFormat;
1869
+ dataFormat: string | null;
1870
+ createdAt: string;
1871
+ updatedAt: string;
1872
+ locales: Array<string>;
1873
+ };
1874
+ };
1875
+ };
1876
+ type GetTranslationStatusResponse = GetTranslationStatusResponses[keyof GetTranslationStatusResponses];
1877
+ type ProcessFileMovesData = {
1878
+ body: {
1879
+ branchId?: string;
1880
+ moves: Array<{
1881
+ oldFileId: string;
1882
+ newFileId: string;
1883
+ newFileName: string;
1884
+ }>;
1885
+ };
1886
+ headers?: {
1887
+ /**
1888
+ * API contract version. Defaults to the oldest supported version.
1889
+ */
1890
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
1891
+ /**
1892
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
1893
+ */
1894
+ 'gt-project-id'?: string;
1895
+ };
1896
+ path?: never;
1897
+ query?: never;
1898
+ url: '/v2/project/files/moves';
1899
+ };
1900
+ type ProcessFileMovesErrors = {
1901
+ /**
1902
+ * Request error
1903
+ */
1904
+ 400: ErrorResponse;
1905
+ /**
1906
+ * Request error
1907
+ */
1908
+ 401: ErrorResponse;
1909
+ /**
1910
+ * Request error
1911
+ */
1912
+ 403: ErrorResponse;
1913
+ /**
1914
+ * Request error
1915
+ */
1916
+ 404: ErrorResponse;
1917
+ /**
1918
+ * Request error
1919
+ */
1920
+ 413: ErrorResponse;
1921
+ /**
1922
+ * Request error
1923
+ */
1924
+ 429: ErrorResponse;
1925
+ /**
1926
+ * Request error
1927
+ */
1928
+ 500: ErrorResponse;
1929
+ };
1930
+ type ProcessFileMovesError = ProcessFileMovesErrors[keyof ProcessFileMovesErrors];
1931
+ type ProcessFileMovesResponses = {
1932
+ /**
1933
+ * File move results
1934
+ */
1935
+ 200: {
1936
+ results: Array<{
1937
+ oldFileId: string;
1938
+ newFileId: string;
1939
+ success: boolean;
1940
+ newSourceFileId?: string;
1941
+ clonedTranslationsCount?: number;
1942
+ error?: string;
1943
+ }>;
1944
+ summary?: {
1945
+ total: number;
1946
+ succeeded: number;
1947
+ failed: number;
1948
+ };
1949
+ };
1950
+ };
1951
+ type ProcessFileMovesResponse = ProcessFileMovesResponses[keyof ProcessFileMovesResponses];
1952
+ type GetOrphanedFilesData = {
1953
+ body: {
1954
+ branchId: string;
1955
+ fileIds?: Array<string>;
1956
+ };
1957
+ headers?: {
1958
+ /**
1959
+ * API contract version. Defaults to the oldest supported version.
1960
+ */
1961
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
1962
+ /**
1963
+ * Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
1964
+ */
1965
+ 'gt-project-id'?: string;
1966
+ };
1967
+ path?: never;
1968
+ query?: never;
1969
+ url: '/v2/project/files/orphaned';
1970
+ };
1971
+ type GetOrphanedFilesErrors = {
1972
+ /**
1973
+ * Request error
1974
+ */
1975
+ 400: ErrorResponse;
1976
+ /**
1977
+ * Request error
1978
+ */
1979
+ 401: ErrorResponse;
1980
+ /**
1981
+ * Request error
1982
+ */
1983
+ 403: ErrorResponse;
1984
+ /**
1985
+ * Request error
1986
+ */
1987
+ 404: ErrorResponse;
1988
+ /**
1989
+ * Request error
1990
+ */
1991
+ 413: ErrorResponse;
1992
+ /**
1993
+ * Request error
1994
+ */
1995
+ 429: ErrorResponse;
1996
+ /**
1997
+ * Request error
1998
+ */
1999
+ 500: ErrorResponse;
2000
+ };
2001
+ type GetOrphanedFilesError = GetOrphanedFilesErrors[keyof GetOrphanedFilesErrors];
2002
+ type GetOrphanedFilesResponses = {
2003
+ /**
2004
+ * Files present on the branch but absent from the request
2005
+ */
2006
+ 200: {
2007
+ orphanedFiles: Array<{
2008
+ fileId: string;
2009
+ versionId: string;
2010
+ fileName: string;
2011
+ }>;
2012
+ };
2013
+ };
2014
+ type GetOrphanedFilesResponse = GetOrphanedFilesResponses[keyof GetOrphanedFilesResponses];
2015
+ type CreateCliWizardSessionData = {
2016
+ body: CreateCliWizardSessionRequest;
2017
+ headers?: {
2018
+ /**
2019
+ * API contract version. Defaults to the oldest supported version.
2020
+ */
2021
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
2022
+ };
2023
+ path?: never;
2024
+ query?: never;
2025
+ url: '/cli/wizard/session';
2026
+ };
2027
+ type CreateCliWizardSessionErrors = {
2028
+ /**
2029
+ * Request error
2030
+ */
2031
+ 400: ErrorResponse;
2032
+ /**
2033
+ * Request error
2034
+ */
2035
+ 413: ErrorResponse;
2036
+ /**
2037
+ * Request error
2038
+ */
2039
+ 429: ErrorResponse;
2040
+ /**
2041
+ * Request error
2042
+ */
2043
+ 500: ErrorResponse;
2044
+ };
2045
+ type CreateCliWizardSessionError = CreateCliWizardSessionErrors[keyof CreateCliWizardSessionErrors];
2046
+ type CreateCliWizardSessionResponses = {
2047
+ /**
2048
+ * CLI wizard session created
2049
+ */
2050
+ 200: CreateCliWizardSessionResponse;
2051
+ };
2052
+ type CreateCliWizardSessionResponse2 = CreateCliWizardSessionResponses[keyof CreateCliWizardSessionResponses];
2053
+ type DeleteCliWizardSessionData = {
2054
+ body?: never;
2055
+ headers?: {
2056
+ /**
2057
+ * API contract version. Defaults to the oldest supported version.
2058
+ */
2059
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
2060
+ };
2061
+ path: {
2062
+ sessionId: string;
2063
+ };
2064
+ query?: never;
2065
+ url: '/cli/wizard/{sessionId}';
2066
+ };
2067
+ type DeleteCliWizardSessionErrors = {
2068
+ /**
2069
+ * Request error
2070
+ */
2071
+ 400: ErrorResponse;
2072
+ /**
2073
+ * Request error
2074
+ */
2075
+ 404: ErrorResponse;
2076
+ /**
2077
+ * Request error
2078
+ */
2079
+ 413: ErrorResponse;
2080
+ /**
2081
+ * Request error
2082
+ */
2083
+ 429: ErrorResponse;
2084
+ /**
2085
+ * Request error
2086
+ */
2087
+ 500: ErrorResponse;
2088
+ };
2089
+ type DeleteCliWizardSessionError = DeleteCliWizardSessionErrors[keyof DeleteCliWizardSessionErrors];
2090
+ type DeleteCliWizardSessionResponses = {
2091
+ /**
2092
+ * CLI wizard session deleted
2093
+ */
2094
+ 200: DeleteCliWizardSessionResponse;
2095
+ };
2096
+ type DeleteCliWizardSessionResponse2 = DeleteCliWizardSessionResponses[keyof DeleteCliWizardSessionResponses];
2097
+ type GetCliWizardSessionData = {
2098
+ body?: never;
2099
+ headers?: {
2100
+ /**
2101
+ * API contract version. Defaults to the oldest supported version.
2102
+ */
2103
+ 'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
2104
+ };
2105
+ path: {
2106
+ sessionId: string;
2107
+ };
2108
+ query?: never;
2109
+ url: '/cli/wizard/{sessionId}';
2110
+ };
2111
+ type GetCliWizardSessionErrors = {
2112
+ /**
2113
+ * Request error
2114
+ */
2115
+ 400: ErrorResponse;
2116
+ /**
2117
+ * Request error
2118
+ */
2119
+ 404: ErrorResponse;
2120
+ /**
2121
+ * Request error
2122
+ */
2123
+ 413: ErrorResponse;
2124
+ /**
2125
+ * Request error
2126
+ */
2127
+ 429: ErrorResponse;
2128
+ /**
2129
+ * Request error
2130
+ */
2131
+ 500: ErrorResponse;
2132
+ };
2133
+ type GetCliWizardSessionError = GetCliWizardSessionErrors[keyof GetCliWizardSessionErrors];
2134
+ type GetCliWizardSessionResponses = {
2135
+ /**
2136
+ * CLI wizard session credentials
2137
+ */
2138
+ 200: CliWizardSessionReadyResponse;
2139
+ /**
2140
+ * CLI wizard session is waiting for sign-in
2141
+ */
2142
+ 202: CliWizardSessionWaitingResponse;
2143
+ };
2144
+ type GetCliWizardSessionResponse = GetCliWizardSessionResponses[keyof GetCliWizardSessionResponses];
2145
+ //#endregion
2146
+ //#region src/wrappers/awaitJobs.d.ts
2147
+ type JobResult = GetTranslationJobInfoResponse[number];
2148
+ type AwaitJobsOptions = {
2149
+ pollingIntervalSeconds?: number;
2150
+ timeoutSeconds?: number;
2151
+ };
2152
+ type AwaitJobsResult = {
2153
+ complete: boolean;
2154
+ jobs: JobResult[];
2155
+ };
2156
+ declare function awaitJobs(client: Client, jobIds: readonly string[], options?: AwaitJobsOptions): Promise<AwaitJobsResult>;
2157
+ //#endregion
2158
+ //#region src/wrappers/base64.d.ts
2159
+ declare function encodeBase64(data: string): string;
2160
+ declare function decodeBase64(base64: string): string;
2161
+ declare function encodeFileContent(content: string, fileFormat: FileFormat): string;
2162
+ declare function decodeFileContent(content: string, fileFormat: FileFormat): string;
2163
+ //#endregion
2164
+ //#region src/wrappers/batch.d.ts
2165
+ declare const DEFAULT_BATCH_SIZE = 100;
2166
+ type BatchOptions = {
2167
+ batchSize?: number;
2168
+ parallel?: boolean;
2169
+ };
2170
+ declare function processBatches<TInput, TOutput>(items: readonly TInput[], processBatch: (batch: TInput[]) => Promise<TOutput[]>, {
2171
+ batchSize,
2172
+ parallel
2173
+ }?: BatchOptions): Promise<TOutput[]>;
2174
+ //#endregion
2175
+ //#region src/wrappers/transport.d.ts
2176
+ type RetryPolicy = 'exponential' | 'linear' | 'none';
2177
+ //#endregion
2178
+ //#region src/wrappers/client.d.ts
2179
+ type ApiVersion = NonNullable<NonNullable<GetProjectInfoData['headers']>['gt-api-version']>;
2180
+ declare const API_VERSION: ApiVersion;
2181
+ type ApiClientConfig = {
2182
+ apiKey?: string;
2183
+ apiVersion?: ApiVersion;
2184
+ baseUrl: string;
2185
+ fetch?: typeof fetch;
2186
+ projectId?: string;
2187
+ retryPolicy?: RetryPolicy;
2188
+ timeoutMs?: number;
2189
+ };
2190
+ declare function createApiClient(config: ApiClientConfig): Client;
2191
+ //#endregion
2192
+ //#region src/generated/sdk.gen.d.ts
2193
+ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
2194
+ /**
2195
+ * You can provide a client instance returned by `createClient()` instead of
2196
+ * individual options. This might be also useful if you want to implement a
2197
+ * custom client.
2198
+ */
2199
+ client: Client;
2200
+ /**
2201
+ * You can pass arbitrary values through the `meta` object. This can be
2202
+ * used to access values that aren't defined as part of the SDK function.
2203
+ */
2204
+ meta?: Record<string, unknown>;
2205
+ };
2206
+ /**
2207
+ * Create a Project
2208
+ *
2209
+ * Create a Project in the Organization associated with an Organization API key. The key must have the `org:projects:create` permission. Project keys cannot use this endpoint. Enabling CDN delivery also requires `project:write`.
2210
+ */
2211
+ declare const createProject: <ThrowOnError extends boolean = false>(options: Options<CreateProjectData, ThrowOnError>) => RequestResult<CreateProjectResponses, CreateProjectErrors, ThrowOnError, "fields">;
2212
+ /**
2213
+ * Upload source files
2214
+ *
2215
+ * Upload one or more source files to the project. Max 100 files per request.
2216
+ */
2217
+ declare const uploadSourceFiles: <ThrowOnError extends boolean = false>(options: Options<UploadSourceFilesData, ThrowOnError>) => RequestResult<UploadSourceFilesResponses, UploadSourceFilesErrors, ThrowOnError, "fields">;
2218
+ /**
2219
+ * Upload translated files
2220
+ *
2221
+ * Upload translated files linked to their source files. Max 100 files per request.
2222
+ */
2223
+ declare const uploadTranslations: <ThrowOnError extends boolean = false>(options: Options<UploadTranslationsData, ThrowOnError>) => RequestResult<UploadTranslationsResponses, UploadTranslationsErrors, ThrowOnError, "fields">;
2224
+ /**
2225
+ * Upload Project assets
2226
+ *
2227
+ * Upload OpenType or TrueType fonts through a Project and make them available to Lottie translation workflows across its Organization. Each font is keyed by a normalized identity derived from its family, weight, and italic style (from the supplied `family` and `style`, or from the font metadata and file name). Re-uploading the same identity overwrites the existing asset, so complete retries after a `500` response are safe.
2228
+ */
2229
+ declare const uploadAssets: <ThrowOnError extends boolean = false>(options: Options<UploadAssetsData, ThrowOnError>) => RequestResult<UploadAssetsResponses, UploadAssetsErrors, ThrowOnError, "fields">;
2230
+ /**
2231
+ * Submit translation diffs
2232
+ *
2233
+ * Overwrite translations with user-provided localized content.
2234
+ */
2235
+ declare const submitUserEditDiffs: <ThrowOnError extends boolean = false>(options: Options<SubmitUserEditDiffsData, ThrowOnError>) => RequestResult<SubmitUserEditDiffsResponses, SubmitUserEditDiffsErrors, ThrowOnError, "fields">;
2236
+ /**
2237
+ * Check if context generation is needed
2238
+ *
2239
+ * Check whether the Project needs translation context generated. This deprecated endpoint is retained for backward compatibility and is no longer called by current clients.
2240
+ *
2241
+ * @deprecated
2242
+ */
2243
+ declare const shouldGenerateProjectContext: <ThrowOnError extends boolean = false>(options: Options<ShouldGenerateProjectContextData, ThrowOnError>) => RequestResult<ShouldGenerateProjectContextResponses, ShouldGenerateProjectContextErrors, ThrowOnError, "fields">;
2244
+ /**
2245
+ * Generate translation context
2246
+ *
2247
+ * Generate glossaries and translation instructions for the project.
2248
+ */
2249
+ declare const generateProjectContext: <ThrowOnError extends boolean = false>(options: Options<GenerateProjectContextData, ThrowOnError>) => RequestResult<GenerateProjectContextResponses, GenerateProjectContextErrors, ThrowOnError, "fields">;
2250
+ /**
2251
+ * Get context generation job status
2252
+ *
2253
+ * Track a context generation job. This deprecated endpoint is retained for backward compatibility; new integrations should use `POST /v2/project/jobs/info`.
2254
+ *
2255
+ * @deprecated
2256
+ */
2257
+ declare const getProjectContextGenerationStatus: <ThrowOnError extends boolean = false>(options: Options<GetProjectContextGenerationStatusData, ThrowOnError>) => RequestResult<GetProjectContextGenerationStatusResponses, GetProjectContextGenerationStatusErrors, ThrowOnError, "fields">;
2258
+ /**
2259
+ * Queue files for translation
2260
+ *
2261
+ * Enqueue uploaded source files for background translation. Max 100 files per request. The response shape depends on the requested `gt-api-version`.
2262
+ */
2263
+ declare const enqueueFileTranslations: <ThrowOnError extends boolean = false>(options: Options<EnqueueFileTranslationsData, ThrowOnError>) => RequestResult<EnqueueFileTranslationsResponses, EnqueueFileTranslationsErrors, ThrowOnError, "fields">;
2264
+ /**
2265
+ * Publish or unpublish files
2266
+ *
2267
+ * Publish or unpublish translated files to the CDN. Requires CDN to be enabled.
2268
+ */
2269
+ declare const publishFiles: <ThrowOnError extends boolean = false>(options: Options<PublishFilesData, ThrowOnError>) => RequestResult<PublishFilesResponses, PublishFilesErrors, ThrowOnError, "fields">;
2270
+ /**
2271
+ * Download a single file
2272
+ *
2273
+ * Download a single source or translated file. This deprecated endpoint is retained for backward compatibility; new integrations should use `POST /v2/project/files/download`.
2274
+ *
2275
+ * @deprecated
2276
+ */
2277
+ declare const downloadFile: <ThrowOnError extends boolean = false>(options: Options<DownloadFileData, ThrowOnError>) => RequestResult<DownloadFileResponses, DownloadFileErrors, ThrowOnError, "fields">;
2278
+ /**
2279
+ * Download multiple files
2280
+ *
2281
+ * Download up to 100 source or translated files in one request.
2282
+ */
2283
+ declare const downloadFiles: <ThrowOnError extends boolean = false>(options: Options<DownloadFilesData, ThrowOnError>) => RequestResult<DownloadFilesResponses, DownloadFilesErrors, ThrowOnError, "fields">;
2284
+ /**
2285
+ * Get branch information
2286
+ *
2287
+ * Return the Project's default branch and any branches requested by name.
2288
+ */
2289
+ declare const getBranchInfo: <ThrowOnError extends boolean = false>(options: Options<GetBranchInfoData, ThrowOnError>) => RequestResult<GetBranchInfoResponses, GetBranchInfoErrors, ThrowOnError, "fields">;
2290
+ /**
2291
+ * Create a branch
2292
+ *
2293
+ * Create a new branch, or rename and confirm the default branch.
2294
+ */
2295
+ declare const createBranch: <ThrowOnError extends boolean = false>(options: Options<CreateBranchData, ThrowOnError>) => RequestResult<CreateBranchResponses, CreateBranchErrors, ThrowOnError, "fields">;
2296
+ /**
2297
+ * Create or update a tag
2298
+ *
2299
+ * Create or upsert a tag that points at a set of file versions.
2300
+ */
2301
+ declare const createTag: <ThrowOnError extends boolean = false>(options: Options<CreateTagData, ThrowOnError>) => RequestResult<CreateTagResponses, CreateTagErrors, ThrowOnError, "fields">;
2302
+ /**
2303
+ * Get Project information
2304
+ *
2305
+ * Read the authenticated Project's name, Organization ID, locale settings, and auto-approval setting.
2306
+ */
2307
+ declare const getProjectInfo: <ThrowOnError extends boolean = false>(options: Options<GetProjectInfoData, ThrowOnError>) => RequestResult<GetProjectInfoResponses, GetProjectInfoErrors, ThrowOnError, "fields">;
2308
+ /**
2309
+ * Update Project information
2310
+ *
2311
+ * Update the Project's default locale or CDN delivery setting.
2312
+ */
2313
+ declare const updateProjectInfo: <ThrowOnError extends boolean = false>(options: Options<UpdateProjectInfoData, ThrowOnError>) => RequestResult<UpdateProjectInfoResponses, UpdateProjectInfoErrors, ThrowOnError, "fields">;
2314
+ /**
2315
+ * Get translation job status
2316
+ *
2317
+ * Return normalized status information for one or more queued translation or context generation jobs.
2318
+ */
2319
+ declare const getTranslationJobInfo: <ThrowOnError extends boolean = false>(options: Options<GetTranslationJobInfoData, ThrowOnError>) => RequestResult<GetTranslationJobInfoResponses, GetTranslationJobInfoErrors, ThrowOnError, "fields">;
2320
+ /**
2321
+ * Translate content at runtime
2322
+ *
2323
+ * Translate one or more strings or structured content entries with caching and memoization. Development API keys are accepted for this endpoint.
2324
+ */
2325
+ declare const translate: <ThrowOnError extends boolean = false>(options: Options<TranslateData, ThrowOnError>) => RequestResult<TranslateResponses, TranslateErrors, ThrowOnError, "fields">;
2326
+ /**
2327
+ * Get file metadata
2328
+ *
2329
+ * Get detailed metadata for specific source and translated files.
2330
+ */
2331
+ declare const getFileInfo: <ThrowOnError extends boolean = false>(options: Options<GetFileInfoData, ThrowOnError>) => RequestResult<GetFileInfoResponses, GetFileInfoErrors, ThrowOnError, "fields">;
2332
+ /**
2333
+ * Get translation status for a file
2334
+ *
2335
+ * Return translation progress and availability by locale for one source file, along with its source metadata.
2336
+ */
2337
+ declare const getTranslationStatus: <ThrowOnError extends boolean = false>(options: Options<GetTranslationStatusData, ThrowOnError>) => RequestResult<GetTranslationStatusResponses, GetTranslationStatusErrors, ThrowOnError, "fields">;
2338
+ /**
2339
+ * Move or rename files
2340
+ *
2341
+ * Clone source files and their translations under new file IDs.
2342
+ */
2343
+ declare const processFileMoves: <ThrowOnError extends boolean = false>(options: Options<ProcessFileMovesData, ThrowOnError>) => RequestResult<ProcessFileMovesResponses, ProcessFileMovesErrors, ThrowOnError, "fields">;
2344
+ /**
2345
+ * Find orphaned files
2346
+ *
2347
+ * Return files on a branch that are not present in the provided file ID list.
2348
+ */
2349
+ declare const getOrphanedFiles: <ThrowOnError extends boolean = false>(options: Options<GetOrphanedFilesData, ThrowOnError>) => RequestResult<GetOrphanedFilesResponses, GetOrphanedFilesErrors, ThrowOnError, "fields">;
2350
+ /**
2351
+ * Create a CLI wizard session
2352
+ *
2353
+ * Create a temporary session for CLI browser authentication.
2354
+ */
2355
+ declare const createCliWizardSession: <ThrowOnError extends boolean = false>(options: Options<CreateCliWizardSessionData, ThrowOnError>) => RequestResult<CreateCliWizardSessionResponses, CreateCliWizardSessionErrors, ThrowOnError, "fields">;
2356
+ /**
2357
+ * Delete a CLI wizard session
2358
+ *
2359
+ * Delete a completed or abandoned CLI wizard session.
2360
+ */
2361
+ declare const deleteCliWizardSession: <ThrowOnError extends boolean = false>(options: Options<DeleteCliWizardSessionData, ThrowOnError>) => RequestResult<DeleteCliWizardSessionResponses, DeleteCliWizardSessionErrors, ThrowOnError, "fields">;
2362
+ /**
2363
+ * Get a CLI wizard session
2364
+ *
2365
+ * Get credentials for a completed CLI wizard session or its current waiting status.
2366
+ */
2367
+ declare const getCliWizardSession: <ThrowOnError extends boolean = false>(options: Options<GetCliWizardSessionData, ThrowOnError>) => RequestResult<GetCliWizardSessionResponses, GetCliWizardSessionErrors, ThrowOnError, "fields">;
2368
+ //#endregion
2369
+ export { API_VERSION, type ApiClientConfig, type ApiVersion, type AwaitJobsOptions, type AwaitJobsResult, type BatchOptions, Branch, CliWizardSessionReadyResponse, CliWizardSessionWaitingResponse, type Client, ClientOptions, CreateBranchData, CreateBranchError, CreateBranchErrors, CreateBranchResponse, CreateBranchResponses, CreateCliWizardSessionData, CreateCliWizardSessionError, CreateCliWizardSessionErrors, CreateCliWizardSessionRequest, CreateCliWizardSessionResponse, CreateCliWizardSessionResponse2, CreateCliWizardSessionResponses, CreateProjectData, CreateProjectError, CreateProjectErrors, CreateProjectResponse, CreateProjectResponses, CreateTagData, CreateTagError, CreateTagErrors, CreateTagResponse, CreateTagResponses, DEFAULT_BATCH_SIZE, DeleteCliWizardSessionData, DeleteCliWizardSessionError, DeleteCliWizardSessionErrors, DeleteCliWizardSessionResponse, DeleteCliWizardSessionResponse2, DeleteCliWizardSessionResponses, DownloadFileData, DownloadFileError, DownloadFileErrors, DownloadFileResponse, DownloadFileResponses, DownloadFilesData, DownloadFilesError, DownloadFilesErrors, DownloadFilesResponse, DownloadFilesResponses, EnqueueFileTranslationsData, EnqueueFileTranslationsError, EnqueueFileTranslationsErrors, EnqueueFileTranslationsResponse, EnqueueFileTranslationsResponses, ErrorResponse, FileFormat, GenerateProjectContextData, GenerateProjectContextError, GenerateProjectContextErrors, GenerateProjectContextResponse, GenerateProjectContextResponses, GetBranchInfoData, GetBranchInfoError, GetBranchInfoErrors, GetBranchInfoResponse, GetBranchInfoResponses, GetCliWizardSessionData, GetCliWizardSessionError, GetCliWizardSessionErrors, GetCliWizardSessionResponse, GetCliWizardSessionResponses, GetFileInfoData, GetFileInfoError, GetFileInfoErrors, GetFileInfoResponse, GetFileInfoResponses, GetOrphanedFilesData, GetOrphanedFilesError, GetOrphanedFilesErrors, GetOrphanedFilesResponse, GetOrphanedFilesResponses, GetProjectContextGenerationStatusData, GetProjectContextGenerationStatusError, GetProjectContextGenerationStatusErrors, GetProjectContextGenerationStatusResponse, GetProjectContextGenerationStatusResponses, GetProjectInfoData, GetProjectInfoError, GetProjectInfoErrors, GetProjectInfoResponse, GetProjectInfoResponses, GetTranslationJobInfoData, GetTranslationJobInfoError, GetTranslationJobInfoErrors, GetTranslationJobInfoResponse, GetTranslationJobInfoResponses, GetTranslationStatusData, GetTranslationStatusError, GetTranslationStatusErrors, GetTranslationStatusResponse, GetTranslationStatusResponses, type JobResult, Options, ProcessFileMovesData, ProcessFileMovesError, ProcessFileMovesErrors, ProcessFileMovesResponse, ProcessFileMovesResponses, PublishFilesData, PublishFilesError, PublishFilesErrors, PublishFilesResponse, PublishFilesResponses, type RetryPolicy, RuntimeTranslationRequest, RuntimeTranslationResponse, ShouldGenerateProjectContextData, ShouldGenerateProjectContextError, ShouldGenerateProjectContextErrors, ShouldGenerateProjectContextResponse, ShouldGenerateProjectContextResponses, SubmitUserEditDiffsData, SubmitUserEditDiffsError, SubmitUserEditDiffsErrors, SubmitUserEditDiffsResponse, SubmitUserEditDiffsResponses, TranslateData, TranslateError, TranslateErrors, TranslateResponse, TranslateResponses, UpdateProjectInfoData, UpdateProjectInfoError, UpdateProjectInfoErrors, UpdateProjectInfoResponse, UpdateProjectInfoResponses, UploadAssetsData, UploadAssetsError, UploadAssetsErrors, UploadAssetsResponse, UploadAssetsResponses, UploadSourceFilesData, UploadSourceFilesError, UploadSourceFilesErrors, UploadSourceFilesResponse, UploadSourceFilesResponses, UploadTranslationsData, UploadTranslationsError, UploadTranslationsErrors, UploadTranslationsResponse, UploadTranslationsResponses, awaitJobs, createApiClient, createBranch, createCliWizardSession, createProject, createTag, decodeBase64, decodeFileContent, deleteCliWizardSession, downloadFile, downloadFiles, encodeBase64, encodeFileContent, enqueueFileTranslations, generateProjectContext, getBranchInfo, getCliWizardSession, getFileInfo, getOrphanedFiles, getProjectContextGenerationStatus, getProjectInfo, getTranslationJobInfo, getTranslationStatus, processBatches, processFileMoves, publishFiles, shouldGenerateProjectContext, submitUserEditDiffs, translate, updateProjectInfo, uploadAssets, uploadSourceFiles, uploadTranslations };
2370
+ //# sourceMappingURL=index.d.mts.map