@generaltranslation/api 0.0.0 → 0.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/CHANGELOG.md +7 -0
- package/LICENSE.md +21 -0
- package/dist/index.cjs +1091 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2146 -0
- package/dist/index.d.mts +2146 -0
- package/dist/index.mjs +1056 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +48 -5
- package/spec/openapi.json +5804 -0
- package/README.md +0 -3
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,2146 @@
|
|
|
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: `${string}://${string}` | (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
|
+
path?: never;
|
|
473
|
+
query?: never;
|
|
474
|
+
url: '/v2/project/files/upload-files';
|
|
475
|
+
};
|
|
476
|
+
type UploadSourceFilesErrors = {
|
|
477
|
+
/**
|
|
478
|
+
* Request error
|
|
479
|
+
*/
|
|
480
|
+
400: ErrorResponse;
|
|
481
|
+
/**
|
|
482
|
+
* Request error
|
|
483
|
+
*/
|
|
484
|
+
401: ErrorResponse;
|
|
485
|
+
/**
|
|
486
|
+
* Request error
|
|
487
|
+
*/
|
|
488
|
+
403: ErrorResponse;
|
|
489
|
+
/**
|
|
490
|
+
* Request error
|
|
491
|
+
*/
|
|
492
|
+
404: ErrorResponse;
|
|
493
|
+
/**
|
|
494
|
+
* Request error
|
|
495
|
+
*/
|
|
496
|
+
413: ErrorResponse;
|
|
497
|
+
/**
|
|
498
|
+
* Request error
|
|
499
|
+
*/
|
|
500
|
+
429: ErrorResponse;
|
|
501
|
+
/**
|
|
502
|
+
* Request error
|
|
503
|
+
*/
|
|
504
|
+
500: ErrorResponse;
|
|
505
|
+
/**
|
|
506
|
+
* Request error
|
|
507
|
+
*/
|
|
508
|
+
503: ErrorResponse;
|
|
509
|
+
};
|
|
510
|
+
type UploadSourceFilesError = UploadSourceFilesErrors[keyof UploadSourceFilesErrors];
|
|
511
|
+
type UploadSourceFilesResponses = {
|
|
512
|
+
/**
|
|
513
|
+
* Uploaded source files
|
|
514
|
+
*/
|
|
515
|
+
201: {
|
|
516
|
+
uploadedFiles: Array<{
|
|
517
|
+
branchId?: string;
|
|
518
|
+
fileId: string;
|
|
519
|
+
versionId: string;
|
|
520
|
+
fileName: string;
|
|
521
|
+
fileFormat: FileFormat;
|
|
522
|
+
dataFormat?: string;
|
|
523
|
+
locale?: string;
|
|
524
|
+
}>;
|
|
525
|
+
count: number;
|
|
526
|
+
message: string;
|
|
527
|
+
};
|
|
528
|
+
};
|
|
529
|
+
type UploadSourceFilesResponse = UploadSourceFilesResponses[keyof UploadSourceFilesResponses];
|
|
530
|
+
type UploadTranslationsData = {
|
|
531
|
+
body: {
|
|
532
|
+
data: Array<{
|
|
533
|
+
source: {
|
|
534
|
+
content: string;
|
|
535
|
+
fileName: string;
|
|
536
|
+
fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
|
|
537
|
+
dataFormat?: string;
|
|
538
|
+
locale: string;
|
|
539
|
+
fileId?: string;
|
|
540
|
+
versionId?: string;
|
|
541
|
+
branchId?: string;
|
|
542
|
+
checkedOutBranchId?: string;
|
|
543
|
+
incomingBranchId?: string;
|
|
544
|
+
formatMetadata?: {
|
|
545
|
+
[key: string]: unknown;
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
translations: Array<{
|
|
549
|
+
content: string;
|
|
550
|
+
fileName: string;
|
|
551
|
+
fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
|
|
552
|
+
dataFormat?: string;
|
|
553
|
+
locale: string;
|
|
554
|
+
transformFormat?: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
|
|
555
|
+
}>;
|
|
556
|
+
}>;
|
|
557
|
+
sourceLocale?: string;
|
|
558
|
+
};
|
|
559
|
+
headers?: {
|
|
560
|
+
/**
|
|
561
|
+
* API contract version. Defaults to the oldest supported version.
|
|
562
|
+
*/
|
|
563
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
564
|
+
};
|
|
565
|
+
path?: never;
|
|
566
|
+
query?: never;
|
|
567
|
+
url: '/v2/project/files/upload-translations';
|
|
568
|
+
};
|
|
569
|
+
type UploadTranslationsErrors = {
|
|
570
|
+
/**
|
|
571
|
+
* Request error
|
|
572
|
+
*/
|
|
573
|
+
400: ErrorResponse;
|
|
574
|
+
/**
|
|
575
|
+
* Request error
|
|
576
|
+
*/
|
|
577
|
+
401: ErrorResponse;
|
|
578
|
+
/**
|
|
579
|
+
* Request error
|
|
580
|
+
*/
|
|
581
|
+
403: ErrorResponse;
|
|
582
|
+
/**
|
|
583
|
+
* Request error
|
|
584
|
+
*/
|
|
585
|
+
404: ErrorResponse;
|
|
586
|
+
/**
|
|
587
|
+
* Request error
|
|
588
|
+
*/
|
|
589
|
+
413: ErrorResponse;
|
|
590
|
+
/**
|
|
591
|
+
* Request error
|
|
592
|
+
*/
|
|
593
|
+
429: ErrorResponse;
|
|
594
|
+
/**
|
|
595
|
+
* Request error
|
|
596
|
+
*/
|
|
597
|
+
500: ErrorResponse;
|
|
598
|
+
/**
|
|
599
|
+
* Request error
|
|
600
|
+
*/
|
|
601
|
+
503: ErrorResponse;
|
|
602
|
+
};
|
|
603
|
+
type UploadTranslationsError = UploadTranslationsErrors[keyof UploadTranslationsErrors];
|
|
604
|
+
type UploadTranslationsResponses = {
|
|
605
|
+
/**
|
|
606
|
+
* Uploaded translation files
|
|
607
|
+
*/
|
|
608
|
+
201: {
|
|
609
|
+
uploadedFiles: Array<{
|
|
610
|
+
branchId?: string;
|
|
611
|
+
fileId: string;
|
|
612
|
+
versionId: string;
|
|
613
|
+
fileName: string;
|
|
614
|
+
fileFormat: FileFormat;
|
|
615
|
+
dataFormat?: string;
|
|
616
|
+
locale?: string;
|
|
617
|
+
}>;
|
|
618
|
+
count: number;
|
|
619
|
+
message: string;
|
|
620
|
+
};
|
|
621
|
+
};
|
|
622
|
+
type UploadTranslationsResponse = UploadTranslationsResponses[keyof UploadTranslationsResponses];
|
|
623
|
+
type UploadAssetsData = {
|
|
624
|
+
body: {
|
|
625
|
+
assets: Array<{
|
|
626
|
+
assetType: 'FONT';
|
|
627
|
+
content: string;
|
|
628
|
+
fileName: string;
|
|
629
|
+
family?: string;
|
|
630
|
+
style?: string;
|
|
631
|
+
}>;
|
|
632
|
+
};
|
|
633
|
+
headers?: {
|
|
634
|
+
/**
|
|
635
|
+
* API contract version. Defaults to the oldest supported version.
|
|
636
|
+
*/
|
|
637
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
638
|
+
};
|
|
639
|
+
path?: never;
|
|
640
|
+
query?: never;
|
|
641
|
+
url: '/v2/project/assets';
|
|
642
|
+
};
|
|
643
|
+
type UploadAssetsErrors = {
|
|
644
|
+
/**
|
|
645
|
+
* Request error
|
|
646
|
+
*/
|
|
647
|
+
400: ErrorResponse;
|
|
648
|
+
/**
|
|
649
|
+
* Request error
|
|
650
|
+
*/
|
|
651
|
+
401: ErrorResponse;
|
|
652
|
+
/**
|
|
653
|
+
* Request error
|
|
654
|
+
*/
|
|
655
|
+
403: ErrorResponse;
|
|
656
|
+
/**
|
|
657
|
+
* Request error
|
|
658
|
+
*/
|
|
659
|
+
404: ErrorResponse;
|
|
660
|
+
/**
|
|
661
|
+
* Request error
|
|
662
|
+
*/
|
|
663
|
+
413: ErrorResponse;
|
|
664
|
+
/**
|
|
665
|
+
* Request error
|
|
666
|
+
*/
|
|
667
|
+
429: ErrorResponse;
|
|
668
|
+
/**
|
|
669
|
+
* Request error
|
|
670
|
+
*/
|
|
671
|
+
500: ErrorResponse;
|
|
672
|
+
};
|
|
673
|
+
type UploadAssetsError = UploadAssetsErrors[keyof UploadAssetsErrors];
|
|
674
|
+
type UploadAssetsResponses = {
|
|
675
|
+
/**
|
|
676
|
+
* Uploaded assets
|
|
677
|
+
*/
|
|
678
|
+
201: {
|
|
679
|
+
assets: Array<{
|
|
680
|
+
id: string;
|
|
681
|
+
assetKey: string;
|
|
682
|
+
fileName: string;
|
|
683
|
+
}>;
|
|
684
|
+
count: number;
|
|
685
|
+
};
|
|
686
|
+
};
|
|
687
|
+
type UploadAssetsResponse = UploadAssetsResponses[keyof UploadAssetsResponses];
|
|
688
|
+
type SubmitUserEditDiffsData = {
|
|
689
|
+
body: {
|
|
690
|
+
projectId?: string;
|
|
691
|
+
diffs: Array<{
|
|
692
|
+
locale: string;
|
|
693
|
+
diff: string;
|
|
694
|
+
branchId?: string;
|
|
695
|
+
versionId: string;
|
|
696
|
+
fileId: string;
|
|
697
|
+
localContent: string;
|
|
698
|
+
}>;
|
|
699
|
+
};
|
|
700
|
+
headers?: {
|
|
701
|
+
/**
|
|
702
|
+
* API contract version. Defaults to the oldest supported version.
|
|
703
|
+
*/
|
|
704
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
705
|
+
};
|
|
706
|
+
path?: never;
|
|
707
|
+
query?: never;
|
|
708
|
+
url: '/v2/project/files/diffs';
|
|
709
|
+
};
|
|
710
|
+
type SubmitUserEditDiffsErrors = {
|
|
711
|
+
/**
|
|
712
|
+
* Request error
|
|
713
|
+
*/
|
|
714
|
+
400: ErrorResponse;
|
|
715
|
+
/**
|
|
716
|
+
* Request error
|
|
717
|
+
*/
|
|
718
|
+
401: ErrorResponse;
|
|
719
|
+
/**
|
|
720
|
+
* Request error
|
|
721
|
+
*/
|
|
722
|
+
403: ErrorResponse;
|
|
723
|
+
/**
|
|
724
|
+
* Request error
|
|
725
|
+
*/
|
|
726
|
+
413: ErrorResponse;
|
|
727
|
+
/**
|
|
728
|
+
* Request error
|
|
729
|
+
*/
|
|
730
|
+
429: ErrorResponse;
|
|
731
|
+
/**
|
|
732
|
+
* Request error
|
|
733
|
+
*/
|
|
734
|
+
500: ErrorResponse;
|
|
735
|
+
};
|
|
736
|
+
type SubmitUserEditDiffsError = SubmitUserEditDiffsErrors[keyof SubmitUserEditDiffsErrors];
|
|
737
|
+
type SubmitUserEditDiffsResponses = {
|
|
738
|
+
/**
|
|
739
|
+
* Processed user translation edits
|
|
740
|
+
*/
|
|
741
|
+
200: {
|
|
742
|
+
filesProcessed: number;
|
|
743
|
+
entriesReceived: number;
|
|
744
|
+
message: string;
|
|
745
|
+
};
|
|
746
|
+
};
|
|
747
|
+
type SubmitUserEditDiffsResponse = SubmitUserEditDiffsResponses[keyof SubmitUserEditDiffsResponses];
|
|
748
|
+
type ShouldGenerateProjectContextData = {
|
|
749
|
+
body?: never;
|
|
750
|
+
headers?: {
|
|
751
|
+
/**
|
|
752
|
+
* API contract version. Defaults to the oldest supported version.
|
|
753
|
+
*/
|
|
754
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
755
|
+
};
|
|
756
|
+
path?: never;
|
|
757
|
+
query?: never;
|
|
758
|
+
url: '/v2/project/setup/should-generate';
|
|
759
|
+
};
|
|
760
|
+
type ShouldGenerateProjectContextErrors = {
|
|
761
|
+
/**
|
|
762
|
+
* Request error
|
|
763
|
+
*/
|
|
764
|
+
400: ErrorResponse;
|
|
765
|
+
/**
|
|
766
|
+
* Request error
|
|
767
|
+
*/
|
|
768
|
+
401: ErrorResponse;
|
|
769
|
+
/**
|
|
770
|
+
* Request error
|
|
771
|
+
*/
|
|
772
|
+
403: ErrorResponse;
|
|
773
|
+
/**
|
|
774
|
+
* Request error
|
|
775
|
+
*/
|
|
776
|
+
404: ErrorResponse;
|
|
777
|
+
/**
|
|
778
|
+
* Request error
|
|
779
|
+
*/
|
|
780
|
+
429: ErrorResponse;
|
|
781
|
+
/**
|
|
782
|
+
* Request error
|
|
783
|
+
*/
|
|
784
|
+
500: ErrorResponse;
|
|
785
|
+
};
|
|
786
|
+
type ShouldGenerateProjectContextError = ShouldGenerateProjectContextErrors[keyof ShouldGenerateProjectContextErrors];
|
|
787
|
+
type ShouldGenerateProjectContextResponses = {
|
|
788
|
+
/**
|
|
789
|
+
* Whether project context should be generated
|
|
790
|
+
*/
|
|
791
|
+
200: {
|
|
792
|
+
shouldSetupProject: boolean;
|
|
793
|
+
};
|
|
794
|
+
};
|
|
795
|
+
type ShouldGenerateProjectContextResponse = ShouldGenerateProjectContextResponses[keyof ShouldGenerateProjectContextResponses];
|
|
796
|
+
type GenerateProjectContextData = {
|
|
797
|
+
body: {
|
|
798
|
+
files: Array<{
|
|
799
|
+
branchId?: string;
|
|
800
|
+
fileId: string;
|
|
801
|
+
versionId: string;
|
|
802
|
+
}>;
|
|
803
|
+
locales?: Array<string>;
|
|
804
|
+
force?: boolean;
|
|
805
|
+
};
|
|
806
|
+
headers?: {
|
|
807
|
+
/**
|
|
808
|
+
* API contract version. Defaults to the oldest supported version.
|
|
809
|
+
*/
|
|
810
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
811
|
+
};
|
|
812
|
+
path?: never;
|
|
813
|
+
query?: never;
|
|
814
|
+
url: '/v2/project/setup/generate';
|
|
815
|
+
};
|
|
816
|
+
type GenerateProjectContextErrors = {
|
|
817
|
+
/**
|
|
818
|
+
* Request error
|
|
819
|
+
*/
|
|
820
|
+
400: ErrorResponse;
|
|
821
|
+
/**
|
|
822
|
+
* Request error
|
|
823
|
+
*/
|
|
824
|
+
401: ErrorResponse;
|
|
825
|
+
/**
|
|
826
|
+
* Request error
|
|
827
|
+
*/
|
|
828
|
+
403: ErrorResponse;
|
|
829
|
+
/**
|
|
830
|
+
* Request error
|
|
831
|
+
*/
|
|
832
|
+
404: ErrorResponse;
|
|
833
|
+
/**
|
|
834
|
+
* Request error
|
|
835
|
+
*/
|
|
836
|
+
413: ErrorResponse;
|
|
837
|
+
/**
|
|
838
|
+
* Request error
|
|
839
|
+
*/
|
|
840
|
+
429: ErrorResponse;
|
|
841
|
+
/**
|
|
842
|
+
* Request error
|
|
843
|
+
*/
|
|
844
|
+
500: ErrorResponse;
|
|
845
|
+
};
|
|
846
|
+
type GenerateProjectContextError = GenerateProjectContextErrors[keyof GenerateProjectContextErrors];
|
|
847
|
+
type GenerateProjectContextResponses = {
|
|
848
|
+
/**
|
|
849
|
+
* Context generation status
|
|
850
|
+
*/
|
|
851
|
+
200: {
|
|
852
|
+
status: 'completed';
|
|
853
|
+
} | {
|
|
854
|
+
setupJobId: string;
|
|
855
|
+
status: 'queued';
|
|
856
|
+
};
|
|
857
|
+
};
|
|
858
|
+
type GenerateProjectContextResponse = GenerateProjectContextResponses[keyof GenerateProjectContextResponses];
|
|
859
|
+
type GetProjectContextGenerationStatusData = {
|
|
860
|
+
body?: never;
|
|
861
|
+
headers?: {
|
|
862
|
+
/**
|
|
863
|
+
* API contract version. Defaults to the oldest supported version.
|
|
864
|
+
*/
|
|
865
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
866
|
+
};
|
|
867
|
+
path: {
|
|
868
|
+
jobId: string;
|
|
869
|
+
};
|
|
870
|
+
query?: never;
|
|
871
|
+
url: '/v2/project/setup/status/{jobId}';
|
|
872
|
+
};
|
|
873
|
+
type GetProjectContextGenerationStatusErrors = {
|
|
874
|
+
/**
|
|
875
|
+
* Request error
|
|
876
|
+
*/
|
|
877
|
+
400: ErrorResponse;
|
|
878
|
+
/**
|
|
879
|
+
* Request error
|
|
880
|
+
*/
|
|
881
|
+
401: ErrorResponse;
|
|
882
|
+
/**
|
|
883
|
+
* Request error
|
|
884
|
+
*/
|
|
885
|
+
403: ErrorResponse;
|
|
886
|
+
/**
|
|
887
|
+
* Request error
|
|
888
|
+
*/
|
|
889
|
+
404: ErrorResponse;
|
|
890
|
+
/**
|
|
891
|
+
* Request error
|
|
892
|
+
*/
|
|
893
|
+
429: ErrorResponse;
|
|
894
|
+
/**
|
|
895
|
+
* Request error
|
|
896
|
+
*/
|
|
897
|
+
500: ErrorResponse;
|
|
898
|
+
};
|
|
899
|
+
type GetProjectContextGenerationStatusError = GetProjectContextGenerationStatusErrors[keyof GetProjectContextGenerationStatusErrors];
|
|
900
|
+
type GetProjectContextGenerationStatusResponses = {
|
|
901
|
+
/**
|
|
902
|
+
* Context generation job status
|
|
903
|
+
*/
|
|
904
|
+
200: {
|
|
905
|
+
status: 'completed';
|
|
906
|
+
} | {
|
|
907
|
+
jobId: string;
|
|
908
|
+
status: 'queued' | 'processing' | 'failed' | 'unknown';
|
|
909
|
+
};
|
|
910
|
+
};
|
|
911
|
+
type GetProjectContextGenerationStatusResponse = GetProjectContextGenerationStatusResponses[keyof GetProjectContextGenerationStatusResponses];
|
|
912
|
+
type EnqueueFileTranslationsData = {
|
|
913
|
+
body: {
|
|
914
|
+
files: Array<{
|
|
915
|
+
branchId?: string;
|
|
916
|
+
fileId: string;
|
|
917
|
+
versionId: string;
|
|
918
|
+
fileName?: string;
|
|
919
|
+
transformFormat?: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
|
|
920
|
+
}>;
|
|
921
|
+
targetLocales?: Array<string>;
|
|
922
|
+
sourceLocale?: string;
|
|
923
|
+
force?: boolean;
|
|
924
|
+
modelProvider?: 'ANTHROPIC' | 'OPENAI' | 'XAI' | 'GOOGLE';
|
|
925
|
+
publish?: boolean;
|
|
926
|
+
};
|
|
927
|
+
headers?: {
|
|
928
|
+
/**
|
|
929
|
+
* API contract version. Defaults to the oldest supported version.
|
|
930
|
+
*/
|
|
931
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
932
|
+
};
|
|
933
|
+
path?: never;
|
|
934
|
+
query?: never;
|
|
935
|
+
url: '/v2/project/translations/enqueue';
|
|
936
|
+
};
|
|
937
|
+
type EnqueueFileTranslationsErrors = {
|
|
938
|
+
/**
|
|
939
|
+
* Invalid request or missing source files
|
|
940
|
+
*/
|
|
941
|
+
400: ErrorResponse | {
|
|
942
|
+
error: string;
|
|
943
|
+
missing: Array<{
|
|
944
|
+
fileId: string;
|
|
945
|
+
versionId: string;
|
|
946
|
+
}>;
|
|
947
|
+
count: number;
|
|
948
|
+
};
|
|
949
|
+
/**
|
|
950
|
+
* Request error
|
|
951
|
+
*/
|
|
952
|
+
401: ErrorResponse;
|
|
953
|
+
/**
|
|
954
|
+
* Request error
|
|
955
|
+
*/
|
|
956
|
+
402: ErrorResponse;
|
|
957
|
+
/**
|
|
958
|
+
* Request error
|
|
959
|
+
*/
|
|
960
|
+
403: ErrorResponse;
|
|
961
|
+
/**
|
|
962
|
+
* Request error
|
|
963
|
+
*/
|
|
964
|
+
404: ErrorResponse;
|
|
965
|
+
/**
|
|
966
|
+
* Request error
|
|
967
|
+
*/
|
|
968
|
+
413: ErrorResponse;
|
|
969
|
+
/**
|
|
970
|
+
* Request error
|
|
971
|
+
*/
|
|
972
|
+
429: ErrorResponse;
|
|
973
|
+
/**
|
|
974
|
+
* Request error
|
|
975
|
+
*/
|
|
976
|
+
500: ErrorResponse;
|
|
977
|
+
};
|
|
978
|
+
type EnqueueFileTranslationsError = EnqueueFileTranslationsErrors[keyof EnqueueFileTranslationsErrors];
|
|
979
|
+
type EnqueueFileTranslationsResponses = {
|
|
980
|
+
/**
|
|
981
|
+
* Enqueued translations. Shape depends on gt-api-version (legacy before 2025-11-03.v1).
|
|
982
|
+
*/
|
|
983
|
+
200: {
|
|
984
|
+
jobData: {
|
|
985
|
+
[key: string]: {
|
|
986
|
+
kind?: 'file_translation';
|
|
987
|
+
sourceFileId: string;
|
|
988
|
+
fileId: string;
|
|
989
|
+
versionId: string;
|
|
990
|
+
branchId: string;
|
|
991
|
+
targetLocale: string;
|
|
992
|
+
projectId: string;
|
|
993
|
+
force: boolean;
|
|
994
|
+
outputFileFormat?: FileFormat;
|
|
995
|
+
modelProvider?: 'ANTHROPIC' | 'OPENAI' | 'XAI' | 'GOOGLE';
|
|
996
|
+
glossaryRetranslate?: boolean;
|
|
997
|
+
changedGlossaryTerms?: Array<string>;
|
|
998
|
+
onComplete?: {
|
|
999
|
+
kind: 'google_drive_apply';
|
|
1000
|
+
userId?: string;
|
|
1001
|
+
};
|
|
1002
|
+
};
|
|
1003
|
+
};
|
|
1004
|
+
locales: Array<string>;
|
|
1005
|
+
message: string;
|
|
1006
|
+
} | {
|
|
1007
|
+
translations: Array<{
|
|
1008
|
+
locale: string;
|
|
1009
|
+
metadata?: unknown;
|
|
1010
|
+
fileId: string;
|
|
1011
|
+
fileName: string;
|
|
1012
|
+
versionId: string;
|
|
1013
|
+
branchId: string;
|
|
1014
|
+
id: string;
|
|
1015
|
+
isReady: boolean;
|
|
1016
|
+
downloadUrl: string;
|
|
1017
|
+
}>;
|
|
1018
|
+
data: {
|
|
1019
|
+
[key: string]: {
|
|
1020
|
+
fileName: string;
|
|
1021
|
+
versionId: string;
|
|
1022
|
+
};
|
|
1023
|
+
};
|
|
1024
|
+
locales: Array<string>;
|
|
1025
|
+
message: string;
|
|
1026
|
+
};
|
|
1027
|
+
};
|
|
1028
|
+
type EnqueueFileTranslationsResponse = EnqueueFileTranslationsResponses[keyof EnqueueFileTranslationsResponses];
|
|
1029
|
+
type PublishFilesData = {
|
|
1030
|
+
body: {
|
|
1031
|
+
files: Array<{
|
|
1032
|
+
fileId: string;
|
|
1033
|
+
versionId: string;
|
|
1034
|
+
branchId?: string;
|
|
1035
|
+
publish: boolean;
|
|
1036
|
+
}>;
|
|
1037
|
+
};
|
|
1038
|
+
headers?: {
|
|
1039
|
+
/**
|
|
1040
|
+
* API contract version. Defaults to the oldest supported version.
|
|
1041
|
+
*/
|
|
1042
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1043
|
+
};
|
|
1044
|
+
path?: never;
|
|
1045
|
+
query?: never;
|
|
1046
|
+
url: '/v2/project/files/publish';
|
|
1047
|
+
};
|
|
1048
|
+
type PublishFilesErrors = {
|
|
1049
|
+
/**
|
|
1050
|
+
* Request error
|
|
1051
|
+
*/
|
|
1052
|
+
400: ErrorResponse;
|
|
1053
|
+
/**
|
|
1054
|
+
* Request error
|
|
1055
|
+
*/
|
|
1056
|
+
401: ErrorResponse;
|
|
1057
|
+
/**
|
|
1058
|
+
* Request error
|
|
1059
|
+
*/
|
|
1060
|
+
403: ErrorResponse;
|
|
1061
|
+
/**
|
|
1062
|
+
* Request error
|
|
1063
|
+
*/
|
|
1064
|
+
404: ErrorResponse;
|
|
1065
|
+
/**
|
|
1066
|
+
* Request error
|
|
1067
|
+
*/
|
|
1068
|
+
413: ErrorResponse;
|
|
1069
|
+
/**
|
|
1070
|
+
* Request error
|
|
1071
|
+
*/
|
|
1072
|
+
429: ErrorResponse;
|
|
1073
|
+
/**
|
|
1074
|
+
* Request error
|
|
1075
|
+
*/
|
|
1076
|
+
500: ErrorResponse;
|
|
1077
|
+
};
|
|
1078
|
+
type PublishFilesError = PublishFilesErrors[keyof PublishFilesErrors];
|
|
1079
|
+
type PublishFilesResponses = {
|
|
1080
|
+
/**
|
|
1081
|
+
* File publish results
|
|
1082
|
+
*/
|
|
1083
|
+
200: {
|
|
1084
|
+
results: Array<{
|
|
1085
|
+
fileId: string;
|
|
1086
|
+
versionId: string;
|
|
1087
|
+
locale?: string;
|
|
1088
|
+
branchId: string;
|
|
1089
|
+
success: boolean;
|
|
1090
|
+
error?: string;
|
|
1091
|
+
}>;
|
|
1092
|
+
};
|
|
1093
|
+
};
|
|
1094
|
+
type PublishFilesResponse = PublishFilesResponses[keyof PublishFilesResponses];
|
|
1095
|
+
type DownloadFileData = {
|
|
1096
|
+
body?: never;
|
|
1097
|
+
headers?: {
|
|
1098
|
+
/**
|
|
1099
|
+
* API contract version. Defaults to the oldest supported version.
|
|
1100
|
+
*/
|
|
1101
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1102
|
+
};
|
|
1103
|
+
path: {
|
|
1104
|
+
fileId: string;
|
|
1105
|
+
};
|
|
1106
|
+
query?: {
|
|
1107
|
+
branchId?: string;
|
|
1108
|
+
versionId?: string;
|
|
1109
|
+
locale?: string;
|
|
1110
|
+
};
|
|
1111
|
+
url: '/v2/project/files/download/{fileId}';
|
|
1112
|
+
};
|
|
1113
|
+
type DownloadFileErrors = {
|
|
1114
|
+
/**
|
|
1115
|
+
* Request error
|
|
1116
|
+
*/
|
|
1117
|
+
400: ErrorResponse;
|
|
1118
|
+
/**
|
|
1119
|
+
* Request error
|
|
1120
|
+
*/
|
|
1121
|
+
401: ErrorResponse;
|
|
1122
|
+
/**
|
|
1123
|
+
* Request error
|
|
1124
|
+
*/
|
|
1125
|
+
403: ErrorResponse;
|
|
1126
|
+
/**
|
|
1127
|
+
* Request error
|
|
1128
|
+
*/
|
|
1129
|
+
404: ErrorResponse;
|
|
1130
|
+
/**
|
|
1131
|
+
* Translation is still processing
|
|
1132
|
+
*/
|
|
1133
|
+
425: {
|
|
1134
|
+
status: 'processing';
|
|
1135
|
+
message: string;
|
|
1136
|
+
};
|
|
1137
|
+
/**
|
|
1138
|
+
* Request error
|
|
1139
|
+
*/
|
|
1140
|
+
429: ErrorResponse;
|
|
1141
|
+
/**
|
|
1142
|
+
* Request error
|
|
1143
|
+
*/
|
|
1144
|
+
500: ErrorResponse;
|
|
1145
|
+
};
|
|
1146
|
+
type DownloadFileError = DownloadFileErrors[keyof DownloadFileErrors];
|
|
1147
|
+
type DownloadFileResponses = {
|
|
1148
|
+
/**
|
|
1149
|
+
* Downloaded file
|
|
1150
|
+
*/
|
|
1151
|
+
200: {
|
|
1152
|
+
data: string;
|
|
1153
|
+
};
|
|
1154
|
+
};
|
|
1155
|
+
type DownloadFileResponse = DownloadFileResponses[keyof DownloadFileResponses];
|
|
1156
|
+
type DownloadFilesData = {
|
|
1157
|
+
body: Array<{
|
|
1158
|
+
fileId: string;
|
|
1159
|
+
branchId?: string;
|
|
1160
|
+
versionId?: string;
|
|
1161
|
+
locale?: string;
|
|
1162
|
+
useLatestAvailableVersion?: boolean;
|
|
1163
|
+
}>;
|
|
1164
|
+
headers?: {
|
|
1165
|
+
/**
|
|
1166
|
+
* API contract version. Defaults to the oldest supported version.
|
|
1167
|
+
*/
|
|
1168
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1169
|
+
};
|
|
1170
|
+
path?: never;
|
|
1171
|
+
query?: never;
|
|
1172
|
+
url: '/v2/project/files/download';
|
|
1173
|
+
};
|
|
1174
|
+
type DownloadFilesErrors = {
|
|
1175
|
+
/**
|
|
1176
|
+
* Request error
|
|
1177
|
+
*/
|
|
1178
|
+
400: ErrorResponse;
|
|
1179
|
+
/**
|
|
1180
|
+
* Request error
|
|
1181
|
+
*/
|
|
1182
|
+
401: ErrorResponse;
|
|
1183
|
+
/**
|
|
1184
|
+
* Request error
|
|
1185
|
+
*/
|
|
1186
|
+
403: ErrorResponse;
|
|
1187
|
+
/**
|
|
1188
|
+
* Request error
|
|
1189
|
+
*/
|
|
1190
|
+
413: ErrorResponse;
|
|
1191
|
+
/**
|
|
1192
|
+
* Request error
|
|
1193
|
+
*/
|
|
1194
|
+
429: ErrorResponse;
|
|
1195
|
+
/**
|
|
1196
|
+
* Request error
|
|
1197
|
+
*/
|
|
1198
|
+
500: ErrorResponse;
|
|
1199
|
+
};
|
|
1200
|
+
type DownloadFilesError = DownloadFilesErrors[keyof DownloadFilesErrors];
|
|
1201
|
+
type DownloadFilesResponses = {
|
|
1202
|
+
/**
|
|
1203
|
+
* Downloaded files
|
|
1204
|
+
*/
|
|
1205
|
+
200: {
|
|
1206
|
+
files: Array<{
|
|
1207
|
+
id: string;
|
|
1208
|
+
branchId: string;
|
|
1209
|
+
fileId: string;
|
|
1210
|
+
versionId: string;
|
|
1211
|
+
locale?: string;
|
|
1212
|
+
fileName?: string;
|
|
1213
|
+
data: string;
|
|
1214
|
+
metadata: {
|
|
1215
|
+
[key: string]: unknown;
|
|
1216
|
+
};
|
|
1217
|
+
fileFormat: FileFormat;
|
|
1218
|
+
}>;
|
|
1219
|
+
count: number;
|
|
1220
|
+
pending?: Array<{
|
|
1221
|
+
branchId: string;
|
|
1222
|
+
fileId: string;
|
|
1223
|
+
locale: string;
|
|
1224
|
+
versionId: string;
|
|
1225
|
+
}>;
|
|
1226
|
+
};
|
|
1227
|
+
};
|
|
1228
|
+
type DownloadFilesResponse = DownloadFilesResponses[keyof DownloadFilesResponses];
|
|
1229
|
+
type GetBranchInfoData = {
|
|
1230
|
+
body: {
|
|
1231
|
+
branchNames?: Array<string>;
|
|
1232
|
+
};
|
|
1233
|
+
headers?: {
|
|
1234
|
+
/**
|
|
1235
|
+
* API contract version. Defaults to the oldest supported version.
|
|
1236
|
+
*/
|
|
1237
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1238
|
+
};
|
|
1239
|
+
path?: never;
|
|
1240
|
+
query?: never;
|
|
1241
|
+
url: '/v2/project/branches/info';
|
|
1242
|
+
};
|
|
1243
|
+
type GetBranchInfoErrors = {
|
|
1244
|
+
/**
|
|
1245
|
+
* Request error
|
|
1246
|
+
*/
|
|
1247
|
+
400: ErrorResponse;
|
|
1248
|
+
/**
|
|
1249
|
+
* Request error
|
|
1250
|
+
*/
|
|
1251
|
+
401: ErrorResponse;
|
|
1252
|
+
/**
|
|
1253
|
+
* Request error
|
|
1254
|
+
*/
|
|
1255
|
+
403: ErrorResponse;
|
|
1256
|
+
/**
|
|
1257
|
+
* Request error
|
|
1258
|
+
*/
|
|
1259
|
+
413: ErrorResponse;
|
|
1260
|
+
/**
|
|
1261
|
+
* Request error
|
|
1262
|
+
*/
|
|
1263
|
+
429: ErrorResponse;
|
|
1264
|
+
/**
|
|
1265
|
+
* Request error
|
|
1266
|
+
*/
|
|
1267
|
+
500: ErrorResponse;
|
|
1268
|
+
};
|
|
1269
|
+
type GetBranchInfoError = GetBranchInfoErrors[keyof GetBranchInfoErrors];
|
|
1270
|
+
type GetBranchInfoResponses = {
|
|
1271
|
+
/**
|
|
1272
|
+
* Branch information
|
|
1273
|
+
*/
|
|
1274
|
+
200: {
|
|
1275
|
+
branches: Array<Branch>;
|
|
1276
|
+
defaultBranch: Branch & ({
|
|
1277
|
+
[key: string]: unknown;
|
|
1278
|
+
} | null);
|
|
1279
|
+
};
|
|
1280
|
+
};
|
|
1281
|
+
type GetBranchInfoResponse = GetBranchInfoResponses[keyof GetBranchInfoResponses];
|
|
1282
|
+
type CreateBranchData = {
|
|
1283
|
+
body: {
|
|
1284
|
+
branchName: string;
|
|
1285
|
+
defaultBranch?: boolean;
|
|
1286
|
+
};
|
|
1287
|
+
headers?: {
|
|
1288
|
+
/**
|
|
1289
|
+
* API contract version. Defaults to the oldest supported version.
|
|
1290
|
+
*/
|
|
1291
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1292
|
+
};
|
|
1293
|
+
path?: never;
|
|
1294
|
+
query?: never;
|
|
1295
|
+
url: '/v2/project/branches/create';
|
|
1296
|
+
};
|
|
1297
|
+
type CreateBranchErrors = {
|
|
1298
|
+
/**
|
|
1299
|
+
* Request error
|
|
1300
|
+
*/
|
|
1301
|
+
400: ErrorResponse;
|
|
1302
|
+
/**
|
|
1303
|
+
* Request error
|
|
1304
|
+
*/
|
|
1305
|
+
401: ErrorResponse;
|
|
1306
|
+
/**
|
|
1307
|
+
* Request error
|
|
1308
|
+
*/
|
|
1309
|
+
403: ErrorResponse;
|
|
1310
|
+
/**
|
|
1311
|
+
* Request error
|
|
1312
|
+
*/
|
|
1313
|
+
409: ErrorResponse;
|
|
1314
|
+
/**
|
|
1315
|
+
* Request error
|
|
1316
|
+
*/
|
|
1317
|
+
413: ErrorResponse;
|
|
1318
|
+
/**
|
|
1319
|
+
* Request error
|
|
1320
|
+
*/
|
|
1321
|
+
429: ErrorResponse;
|
|
1322
|
+
/**
|
|
1323
|
+
* Request error
|
|
1324
|
+
*/
|
|
1325
|
+
500: ErrorResponse;
|
|
1326
|
+
};
|
|
1327
|
+
type CreateBranchError = CreateBranchErrors[keyof CreateBranchErrors];
|
|
1328
|
+
type CreateBranchResponses = {
|
|
1329
|
+
/**
|
|
1330
|
+
* Created or existing branch
|
|
1331
|
+
*/
|
|
1332
|
+
200: {
|
|
1333
|
+
branch: Branch;
|
|
1334
|
+
};
|
|
1335
|
+
};
|
|
1336
|
+
type CreateBranchResponse = CreateBranchResponses[keyof CreateBranchResponses];
|
|
1337
|
+
type CreateTagData = {
|
|
1338
|
+
body: {
|
|
1339
|
+
tagId: string;
|
|
1340
|
+
files: Array<{
|
|
1341
|
+
fileId: string;
|
|
1342
|
+
versionId: string;
|
|
1343
|
+
branchId: string;
|
|
1344
|
+
}>;
|
|
1345
|
+
message?: string;
|
|
1346
|
+
};
|
|
1347
|
+
headers?: {
|
|
1348
|
+
/**
|
|
1349
|
+
* API contract version. Defaults to the oldest supported version.
|
|
1350
|
+
*/
|
|
1351
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1352
|
+
};
|
|
1353
|
+
path?: never;
|
|
1354
|
+
query?: never;
|
|
1355
|
+
url: '/v2/project/tags/create';
|
|
1356
|
+
};
|
|
1357
|
+
type CreateTagErrors = {
|
|
1358
|
+
/**
|
|
1359
|
+
* Request error
|
|
1360
|
+
*/
|
|
1361
|
+
400: ErrorResponse;
|
|
1362
|
+
/**
|
|
1363
|
+
* Request error
|
|
1364
|
+
*/
|
|
1365
|
+
401: ErrorResponse;
|
|
1366
|
+
/**
|
|
1367
|
+
* Request error
|
|
1368
|
+
*/
|
|
1369
|
+
403: ErrorResponse;
|
|
1370
|
+
/**
|
|
1371
|
+
* Request error
|
|
1372
|
+
*/
|
|
1373
|
+
413: ErrorResponse;
|
|
1374
|
+
/**
|
|
1375
|
+
* Request error
|
|
1376
|
+
*/
|
|
1377
|
+
429: ErrorResponse;
|
|
1378
|
+
/**
|
|
1379
|
+
* Request error
|
|
1380
|
+
*/
|
|
1381
|
+
500: ErrorResponse;
|
|
1382
|
+
};
|
|
1383
|
+
type CreateTagError = CreateTagErrors[keyof CreateTagErrors];
|
|
1384
|
+
type CreateTagResponses = {
|
|
1385
|
+
/**
|
|
1386
|
+
* Created or updated file tag
|
|
1387
|
+
*/
|
|
1388
|
+
200: {
|
|
1389
|
+
tag: {
|
|
1390
|
+
id: string;
|
|
1391
|
+
tagId: string;
|
|
1392
|
+
message: string | null;
|
|
1393
|
+
createdAt: string;
|
|
1394
|
+
updatedAt: string;
|
|
1395
|
+
};
|
|
1396
|
+
};
|
|
1397
|
+
};
|
|
1398
|
+
type CreateTagResponse = CreateTagResponses[keyof CreateTagResponses];
|
|
1399
|
+
type GetProjectInfoData = {
|
|
1400
|
+
body?: never;
|
|
1401
|
+
headers?: {
|
|
1402
|
+
/**
|
|
1403
|
+
* API contract version. Defaults to the oldest supported version.
|
|
1404
|
+
*/
|
|
1405
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1406
|
+
};
|
|
1407
|
+
path: {
|
|
1408
|
+
projectId: string;
|
|
1409
|
+
};
|
|
1410
|
+
query?: never;
|
|
1411
|
+
url: '/v2/project/info/{projectId}';
|
|
1412
|
+
};
|
|
1413
|
+
type GetProjectInfoErrors = {
|
|
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
|
+
404: ErrorResponse;
|
|
1430
|
+
/**
|
|
1431
|
+
* Request error
|
|
1432
|
+
*/
|
|
1433
|
+
429: ErrorResponse;
|
|
1434
|
+
/**
|
|
1435
|
+
* Request error
|
|
1436
|
+
*/
|
|
1437
|
+
500: ErrorResponse;
|
|
1438
|
+
};
|
|
1439
|
+
type GetProjectInfoError = GetProjectInfoErrors[keyof GetProjectInfoErrors];
|
|
1440
|
+
type GetProjectInfoResponses = {
|
|
1441
|
+
/**
|
|
1442
|
+
* Project information
|
|
1443
|
+
*/
|
|
1444
|
+
200: {
|
|
1445
|
+
id: string;
|
|
1446
|
+
name: string;
|
|
1447
|
+
orgId: string;
|
|
1448
|
+
defaultLocale: string | null;
|
|
1449
|
+
currentLocales: Array<string>;
|
|
1450
|
+
autoApprove: boolean;
|
|
1451
|
+
};
|
|
1452
|
+
};
|
|
1453
|
+
type GetProjectInfoResponse = GetProjectInfoResponses[keyof GetProjectInfoResponses];
|
|
1454
|
+
type UpdateProjectInfoData = {
|
|
1455
|
+
body: {
|
|
1456
|
+
defaultLocale?: string;
|
|
1457
|
+
cdnEnabled?: boolean;
|
|
1458
|
+
};
|
|
1459
|
+
headers?: {
|
|
1460
|
+
/**
|
|
1461
|
+
* API contract version. Defaults to the oldest supported version.
|
|
1462
|
+
*/
|
|
1463
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1464
|
+
};
|
|
1465
|
+
path: {
|
|
1466
|
+
projectId: string;
|
|
1467
|
+
};
|
|
1468
|
+
query?: never;
|
|
1469
|
+
url: '/v2/project/info/{projectId}';
|
|
1470
|
+
};
|
|
1471
|
+
type UpdateProjectInfoErrors = {
|
|
1472
|
+
/**
|
|
1473
|
+
* Request error
|
|
1474
|
+
*/
|
|
1475
|
+
400: ErrorResponse;
|
|
1476
|
+
/**
|
|
1477
|
+
* Request error
|
|
1478
|
+
*/
|
|
1479
|
+
401: ErrorResponse;
|
|
1480
|
+
/**
|
|
1481
|
+
* Request error
|
|
1482
|
+
*/
|
|
1483
|
+
403: ErrorResponse;
|
|
1484
|
+
/**
|
|
1485
|
+
* Request error
|
|
1486
|
+
*/
|
|
1487
|
+
404: ErrorResponse;
|
|
1488
|
+
/**
|
|
1489
|
+
* Request error
|
|
1490
|
+
*/
|
|
1491
|
+
413: ErrorResponse;
|
|
1492
|
+
/**
|
|
1493
|
+
* Request error
|
|
1494
|
+
*/
|
|
1495
|
+
429: ErrorResponse;
|
|
1496
|
+
/**
|
|
1497
|
+
* Request error
|
|
1498
|
+
*/
|
|
1499
|
+
500: ErrorResponse;
|
|
1500
|
+
};
|
|
1501
|
+
type UpdateProjectInfoError = UpdateProjectInfoErrors[keyof UpdateProjectInfoErrors];
|
|
1502
|
+
type UpdateProjectInfoResponses = {
|
|
1503
|
+
/**
|
|
1504
|
+
* Project settings updated
|
|
1505
|
+
*/
|
|
1506
|
+
200: {
|
|
1507
|
+
success: true;
|
|
1508
|
+
};
|
|
1509
|
+
};
|
|
1510
|
+
type UpdateProjectInfoResponse = UpdateProjectInfoResponses[keyof UpdateProjectInfoResponses];
|
|
1511
|
+
type GetTranslationJobInfoData = {
|
|
1512
|
+
body: {
|
|
1513
|
+
jobIds: Array<string>;
|
|
1514
|
+
};
|
|
1515
|
+
headers?: {
|
|
1516
|
+
/**
|
|
1517
|
+
* API contract version. Defaults to the oldest supported version.
|
|
1518
|
+
*/
|
|
1519
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1520
|
+
};
|
|
1521
|
+
path?: never;
|
|
1522
|
+
query?: never;
|
|
1523
|
+
url: '/v2/project/jobs/info';
|
|
1524
|
+
};
|
|
1525
|
+
type GetTranslationJobInfoErrors = {
|
|
1526
|
+
/**
|
|
1527
|
+
* Request error
|
|
1528
|
+
*/
|
|
1529
|
+
400: ErrorResponse;
|
|
1530
|
+
/**
|
|
1531
|
+
* Request error
|
|
1532
|
+
*/
|
|
1533
|
+
401: ErrorResponse;
|
|
1534
|
+
/**
|
|
1535
|
+
* Request error
|
|
1536
|
+
*/
|
|
1537
|
+
403: ErrorResponse;
|
|
1538
|
+
/**
|
|
1539
|
+
* Request error
|
|
1540
|
+
*/
|
|
1541
|
+
404: ErrorResponse;
|
|
1542
|
+
/**
|
|
1543
|
+
* Request error
|
|
1544
|
+
*/
|
|
1545
|
+
413: ErrorResponse;
|
|
1546
|
+
/**
|
|
1547
|
+
* Request error
|
|
1548
|
+
*/
|
|
1549
|
+
429: ErrorResponse;
|
|
1550
|
+
/**
|
|
1551
|
+
* Request error
|
|
1552
|
+
*/
|
|
1553
|
+
500: ErrorResponse;
|
|
1554
|
+
};
|
|
1555
|
+
type GetTranslationJobInfoError = GetTranslationJobInfoErrors[keyof GetTranslationJobInfoErrors];
|
|
1556
|
+
type GetTranslationJobInfoResponses = {
|
|
1557
|
+
/**
|
|
1558
|
+
* Translation job statuses
|
|
1559
|
+
*/
|
|
1560
|
+
200: Array<{
|
|
1561
|
+
status: 'queued';
|
|
1562
|
+
jobId: string;
|
|
1563
|
+
} | {
|
|
1564
|
+
status: 'processing';
|
|
1565
|
+
jobId: string;
|
|
1566
|
+
} | {
|
|
1567
|
+
status: 'failed';
|
|
1568
|
+
jobId: string;
|
|
1569
|
+
error: {
|
|
1570
|
+
message: string | null;
|
|
1571
|
+
};
|
|
1572
|
+
} | {
|
|
1573
|
+
status: 'completed';
|
|
1574
|
+
jobId: string;
|
|
1575
|
+
} | {
|
|
1576
|
+
status: 'unknown';
|
|
1577
|
+
jobId: string;
|
|
1578
|
+
}>;
|
|
1579
|
+
};
|
|
1580
|
+
type GetTranslationJobInfoResponse = GetTranslationJobInfoResponses[keyof GetTranslationJobInfoResponses];
|
|
1581
|
+
type TranslateData = {
|
|
1582
|
+
body: RuntimeTranslationRequest;
|
|
1583
|
+
headers?: {
|
|
1584
|
+
/**
|
|
1585
|
+
* API contract version. Defaults to the oldest supported version.
|
|
1586
|
+
*/
|
|
1587
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1588
|
+
};
|
|
1589
|
+
path?: never;
|
|
1590
|
+
query?: never;
|
|
1591
|
+
url: '/v2/translate';
|
|
1592
|
+
};
|
|
1593
|
+
type TranslateErrors = {
|
|
1594
|
+
/**
|
|
1595
|
+
* Request error
|
|
1596
|
+
*/
|
|
1597
|
+
400: ErrorResponse;
|
|
1598
|
+
/**
|
|
1599
|
+
* Request error
|
|
1600
|
+
*/
|
|
1601
|
+
401: ErrorResponse;
|
|
1602
|
+
/**
|
|
1603
|
+
* Request error
|
|
1604
|
+
*/
|
|
1605
|
+
402: ErrorResponse;
|
|
1606
|
+
/**
|
|
1607
|
+
* Request error
|
|
1608
|
+
*/
|
|
1609
|
+
403: ErrorResponse;
|
|
1610
|
+
/**
|
|
1611
|
+
* Request error
|
|
1612
|
+
*/
|
|
1613
|
+
404: ErrorResponse;
|
|
1614
|
+
/**
|
|
1615
|
+
* Request error
|
|
1616
|
+
*/
|
|
1617
|
+
413: ErrorResponse;
|
|
1618
|
+
/**
|
|
1619
|
+
* Request error
|
|
1620
|
+
*/
|
|
1621
|
+
429: ErrorResponse;
|
|
1622
|
+
/**
|
|
1623
|
+
* Request error
|
|
1624
|
+
*/
|
|
1625
|
+
500: ErrorResponse;
|
|
1626
|
+
};
|
|
1627
|
+
type TranslateError = TranslateErrors[keyof TranslateErrors];
|
|
1628
|
+
type TranslateResponses = {
|
|
1629
|
+
/**
|
|
1630
|
+
* All translations were served from cache
|
|
1631
|
+
*/
|
|
1632
|
+
200: RuntimeTranslationResponse;
|
|
1633
|
+
/**
|
|
1634
|
+
* Translations completed
|
|
1635
|
+
*/
|
|
1636
|
+
201: RuntimeTranslationResponse;
|
|
1637
|
+
};
|
|
1638
|
+
type TranslateResponse = TranslateResponses[keyof TranslateResponses];
|
|
1639
|
+
type GetFileInfoData = {
|
|
1640
|
+
body: {
|
|
1641
|
+
sourceFiles?: Array<{
|
|
1642
|
+
fileId: string;
|
|
1643
|
+
versionId: string;
|
|
1644
|
+
branchId: string;
|
|
1645
|
+
}>;
|
|
1646
|
+
translatedFiles?: Array<{
|
|
1647
|
+
fileId: string;
|
|
1648
|
+
versionId: string;
|
|
1649
|
+
branchId: string;
|
|
1650
|
+
locale: string;
|
|
1651
|
+
}>;
|
|
1652
|
+
};
|
|
1653
|
+
headers?: {
|
|
1654
|
+
/**
|
|
1655
|
+
* API contract version. Defaults to the oldest supported version.
|
|
1656
|
+
*/
|
|
1657
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1658
|
+
};
|
|
1659
|
+
path?: never;
|
|
1660
|
+
query?: never;
|
|
1661
|
+
url: '/v2/project/files/info';
|
|
1662
|
+
};
|
|
1663
|
+
type GetFileInfoErrors = {
|
|
1664
|
+
/**
|
|
1665
|
+
* Request error
|
|
1666
|
+
*/
|
|
1667
|
+
400: ErrorResponse;
|
|
1668
|
+
/**
|
|
1669
|
+
* Request error
|
|
1670
|
+
*/
|
|
1671
|
+
401: ErrorResponse;
|
|
1672
|
+
/**
|
|
1673
|
+
* Request error
|
|
1674
|
+
*/
|
|
1675
|
+
403: ErrorResponse;
|
|
1676
|
+
/**
|
|
1677
|
+
* Request error
|
|
1678
|
+
*/
|
|
1679
|
+
413: ErrorResponse;
|
|
1680
|
+
/**
|
|
1681
|
+
* Request error
|
|
1682
|
+
*/
|
|
1683
|
+
429: ErrorResponse;
|
|
1684
|
+
/**
|
|
1685
|
+
* Request error
|
|
1686
|
+
*/
|
|
1687
|
+
500: ErrorResponse;
|
|
1688
|
+
};
|
|
1689
|
+
type GetFileInfoError = GetFileInfoErrors[keyof GetFileInfoErrors];
|
|
1690
|
+
type GetFileInfoResponses = {
|
|
1691
|
+
/**
|
|
1692
|
+
* File information
|
|
1693
|
+
*/
|
|
1694
|
+
200: {
|
|
1695
|
+
sourceFiles: Array<{
|
|
1696
|
+
branchId: string;
|
|
1697
|
+
fileId: string;
|
|
1698
|
+
versionId: string;
|
|
1699
|
+
fileName: string;
|
|
1700
|
+
fileFormat: FileFormat;
|
|
1701
|
+
dataFormat: string | null;
|
|
1702
|
+
createdAt: string;
|
|
1703
|
+
updatedAt: string;
|
|
1704
|
+
publishedAt: string | null;
|
|
1705
|
+
locales: Array<string>;
|
|
1706
|
+
sourceLocale: string;
|
|
1707
|
+
}>;
|
|
1708
|
+
translatedFiles: Array<{
|
|
1709
|
+
branchId: string;
|
|
1710
|
+
fileId: string;
|
|
1711
|
+
versionId: string;
|
|
1712
|
+
fileFormat: FileFormat;
|
|
1713
|
+
dataFormat: string | null;
|
|
1714
|
+
createdAt: string;
|
|
1715
|
+
updatedAt: string;
|
|
1716
|
+
approvedAt: string | null;
|
|
1717
|
+
publishedAt: string | null;
|
|
1718
|
+
completedAt: string | null;
|
|
1719
|
+
locale: string;
|
|
1720
|
+
}>;
|
|
1721
|
+
};
|
|
1722
|
+
};
|
|
1723
|
+
type GetFileInfoResponse = GetFileInfoResponses[keyof GetFileInfoResponses];
|
|
1724
|
+
type GetTranslationStatusData = {
|
|
1725
|
+
body?: never;
|
|
1726
|
+
headers?: {
|
|
1727
|
+
/**
|
|
1728
|
+
* API contract version. Defaults to the oldest supported version.
|
|
1729
|
+
*/
|
|
1730
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1731
|
+
};
|
|
1732
|
+
path: {
|
|
1733
|
+
fileId: string;
|
|
1734
|
+
};
|
|
1735
|
+
query?: {
|
|
1736
|
+
versionId?: string;
|
|
1737
|
+
branchId?: string;
|
|
1738
|
+
};
|
|
1739
|
+
url: '/v2/project/translations/files/status/{fileId}';
|
|
1740
|
+
};
|
|
1741
|
+
type GetTranslationStatusErrors = {
|
|
1742
|
+
/**
|
|
1743
|
+
* Request error
|
|
1744
|
+
*/
|
|
1745
|
+
400: ErrorResponse;
|
|
1746
|
+
/**
|
|
1747
|
+
* Request error
|
|
1748
|
+
*/
|
|
1749
|
+
401: ErrorResponse;
|
|
1750
|
+
/**
|
|
1751
|
+
* Request error
|
|
1752
|
+
*/
|
|
1753
|
+
403: ErrorResponse;
|
|
1754
|
+
/**
|
|
1755
|
+
* Request error
|
|
1756
|
+
*/
|
|
1757
|
+
404: ErrorResponse;
|
|
1758
|
+
/**
|
|
1759
|
+
* Request error
|
|
1760
|
+
*/
|
|
1761
|
+
429: ErrorResponse;
|
|
1762
|
+
/**
|
|
1763
|
+
* Request error
|
|
1764
|
+
*/
|
|
1765
|
+
500: ErrorResponse;
|
|
1766
|
+
};
|
|
1767
|
+
type GetTranslationStatusError = GetTranslationStatusErrors[keyof GetTranslationStatusErrors];
|
|
1768
|
+
type GetTranslationStatusResponses = {
|
|
1769
|
+
/**
|
|
1770
|
+
* Translation status
|
|
1771
|
+
*/
|
|
1772
|
+
200: {
|
|
1773
|
+
translations: Array<{
|
|
1774
|
+
locale: string;
|
|
1775
|
+
completedAt: string | null;
|
|
1776
|
+
approvedAt: string | null;
|
|
1777
|
+
publishedAt: string | null;
|
|
1778
|
+
createdAt: string | null;
|
|
1779
|
+
updatedAt: string | null;
|
|
1780
|
+
}>;
|
|
1781
|
+
sourceFile: {
|
|
1782
|
+
id: string;
|
|
1783
|
+
branchId: string;
|
|
1784
|
+
fileId: string;
|
|
1785
|
+
versionId: string;
|
|
1786
|
+
fileName: string;
|
|
1787
|
+
sourceLocale: string;
|
|
1788
|
+
fileFormat: FileFormat;
|
|
1789
|
+
dataFormat: string | null;
|
|
1790
|
+
createdAt: string;
|
|
1791
|
+
updatedAt: string;
|
|
1792
|
+
locales: Array<string>;
|
|
1793
|
+
};
|
|
1794
|
+
};
|
|
1795
|
+
};
|
|
1796
|
+
type GetTranslationStatusResponse = GetTranslationStatusResponses[keyof GetTranslationStatusResponses];
|
|
1797
|
+
type ProcessFileMovesData = {
|
|
1798
|
+
body: {
|
|
1799
|
+
branchId?: string;
|
|
1800
|
+
moves: Array<{
|
|
1801
|
+
oldFileId: string;
|
|
1802
|
+
newFileId: string;
|
|
1803
|
+
newFileName: string;
|
|
1804
|
+
}>;
|
|
1805
|
+
};
|
|
1806
|
+
headers?: {
|
|
1807
|
+
/**
|
|
1808
|
+
* API contract version. Defaults to the oldest supported version.
|
|
1809
|
+
*/
|
|
1810
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1811
|
+
};
|
|
1812
|
+
path?: never;
|
|
1813
|
+
query?: never;
|
|
1814
|
+
url: '/v2/project/files/moves';
|
|
1815
|
+
};
|
|
1816
|
+
type ProcessFileMovesErrors = {
|
|
1817
|
+
/**
|
|
1818
|
+
* Request error
|
|
1819
|
+
*/
|
|
1820
|
+
400: ErrorResponse;
|
|
1821
|
+
/**
|
|
1822
|
+
* Request error
|
|
1823
|
+
*/
|
|
1824
|
+
401: ErrorResponse;
|
|
1825
|
+
/**
|
|
1826
|
+
* Request error
|
|
1827
|
+
*/
|
|
1828
|
+
403: ErrorResponse;
|
|
1829
|
+
/**
|
|
1830
|
+
* Request error
|
|
1831
|
+
*/
|
|
1832
|
+
404: ErrorResponse;
|
|
1833
|
+
/**
|
|
1834
|
+
* Request error
|
|
1835
|
+
*/
|
|
1836
|
+
413: ErrorResponse;
|
|
1837
|
+
/**
|
|
1838
|
+
* Request error
|
|
1839
|
+
*/
|
|
1840
|
+
429: ErrorResponse;
|
|
1841
|
+
/**
|
|
1842
|
+
* Request error
|
|
1843
|
+
*/
|
|
1844
|
+
500: ErrorResponse;
|
|
1845
|
+
};
|
|
1846
|
+
type ProcessFileMovesError = ProcessFileMovesErrors[keyof ProcessFileMovesErrors];
|
|
1847
|
+
type ProcessFileMovesResponses = {
|
|
1848
|
+
/**
|
|
1849
|
+
* File move results
|
|
1850
|
+
*/
|
|
1851
|
+
200: {
|
|
1852
|
+
results: Array<{
|
|
1853
|
+
oldFileId: string;
|
|
1854
|
+
newFileId: string;
|
|
1855
|
+
success: boolean;
|
|
1856
|
+
newSourceFileId?: string;
|
|
1857
|
+
clonedTranslationsCount?: number;
|
|
1858
|
+
error?: string;
|
|
1859
|
+
}>;
|
|
1860
|
+
summary?: {
|
|
1861
|
+
total: number;
|
|
1862
|
+
succeeded: number;
|
|
1863
|
+
failed: number;
|
|
1864
|
+
};
|
|
1865
|
+
};
|
|
1866
|
+
};
|
|
1867
|
+
type ProcessFileMovesResponse = ProcessFileMovesResponses[keyof ProcessFileMovesResponses];
|
|
1868
|
+
type GetOrphanedFilesData = {
|
|
1869
|
+
body: {
|
|
1870
|
+
branchId: string;
|
|
1871
|
+
fileIds?: Array<string>;
|
|
1872
|
+
};
|
|
1873
|
+
headers?: {
|
|
1874
|
+
/**
|
|
1875
|
+
* API contract version. Defaults to the oldest supported version.
|
|
1876
|
+
*/
|
|
1877
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1878
|
+
};
|
|
1879
|
+
path?: never;
|
|
1880
|
+
query?: never;
|
|
1881
|
+
url: '/v2/project/files/orphaned';
|
|
1882
|
+
};
|
|
1883
|
+
type GetOrphanedFilesErrors = {
|
|
1884
|
+
/**
|
|
1885
|
+
* Request error
|
|
1886
|
+
*/
|
|
1887
|
+
400: ErrorResponse;
|
|
1888
|
+
/**
|
|
1889
|
+
* Request error
|
|
1890
|
+
*/
|
|
1891
|
+
401: ErrorResponse;
|
|
1892
|
+
/**
|
|
1893
|
+
* Request error
|
|
1894
|
+
*/
|
|
1895
|
+
403: ErrorResponse;
|
|
1896
|
+
/**
|
|
1897
|
+
* Request error
|
|
1898
|
+
*/
|
|
1899
|
+
404: ErrorResponse;
|
|
1900
|
+
/**
|
|
1901
|
+
* Request error
|
|
1902
|
+
*/
|
|
1903
|
+
413: ErrorResponse;
|
|
1904
|
+
/**
|
|
1905
|
+
* Request error
|
|
1906
|
+
*/
|
|
1907
|
+
429: ErrorResponse;
|
|
1908
|
+
/**
|
|
1909
|
+
* Request error
|
|
1910
|
+
*/
|
|
1911
|
+
500: ErrorResponse;
|
|
1912
|
+
};
|
|
1913
|
+
type GetOrphanedFilesError = GetOrphanedFilesErrors[keyof GetOrphanedFilesErrors];
|
|
1914
|
+
type GetOrphanedFilesResponses = {
|
|
1915
|
+
/**
|
|
1916
|
+
* Files present on the branch but absent from the request
|
|
1917
|
+
*/
|
|
1918
|
+
200: {
|
|
1919
|
+
orphanedFiles: Array<{
|
|
1920
|
+
fileId: string;
|
|
1921
|
+
versionId: string;
|
|
1922
|
+
fileName: string;
|
|
1923
|
+
}>;
|
|
1924
|
+
};
|
|
1925
|
+
};
|
|
1926
|
+
type GetOrphanedFilesResponse = GetOrphanedFilesResponses[keyof GetOrphanedFilesResponses];
|
|
1927
|
+
type CreateCliWizardSessionData = {
|
|
1928
|
+
body: CreateCliWizardSessionRequest;
|
|
1929
|
+
headers?: {
|
|
1930
|
+
/**
|
|
1931
|
+
* API contract version. Defaults to the oldest supported version.
|
|
1932
|
+
*/
|
|
1933
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1934
|
+
};
|
|
1935
|
+
path?: never;
|
|
1936
|
+
query?: never;
|
|
1937
|
+
url: '/cli/wizard/session';
|
|
1938
|
+
};
|
|
1939
|
+
type CreateCliWizardSessionErrors = {
|
|
1940
|
+
/**
|
|
1941
|
+
* Request error
|
|
1942
|
+
*/
|
|
1943
|
+
400: ErrorResponse;
|
|
1944
|
+
/**
|
|
1945
|
+
* Request error
|
|
1946
|
+
*/
|
|
1947
|
+
413: ErrorResponse;
|
|
1948
|
+
/**
|
|
1949
|
+
* Request error
|
|
1950
|
+
*/
|
|
1951
|
+
429: ErrorResponse;
|
|
1952
|
+
/**
|
|
1953
|
+
* Request error
|
|
1954
|
+
*/
|
|
1955
|
+
500: ErrorResponse;
|
|
1956
|
+
};
|
|
1957
|
+
type CreateCliWizardSessionError = CreateCliWizardSessionErrors[keyof CreateCliWizardSessionErrors];
|
|
1958
|
+
type CreateCliWizardSessionResponses = {
|
|
1959
|
+
/**
|
|
1960
|
+
* CLI wizard session created
|
|
1961
|
+
*/
|
|
1962
|
+
200: CreateCliWizardSessionResponse;
|
|
1963
|
+
};
|
|
1964
|
+
type CreateCliWizardSessionResponse2 = CreateCliWizardSessionResponses[keyof CreateCliWizardSessionResponses];
|
|
1965
|
+
type DeleteCliWizardSessionData = {
|
|
1966
|
+
body?: never;
|
|
1967
|
+
headers?: {
|
|
1968
|
+
/**
|
|
1969
|
+
* API contract version. Defaults to the oldest supported version.
|
|
1970
|
+
*/
|
|
1971
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1972
|
+
};
|
|
1973
|
+
path: {
|
|
1974
|
+
sessionId: string;
|
|
1975
|
+
};
|
|
1976
|
+
query?: never;
|
|
1977
|
+
url: '/cli/wizard/{sessionId}';
|
|
1978
|
+
};
|
|
1979
|
+
type DeleteCliWizardSessionErrors = {
|
|
1980
|
+
/**
|
|
1981
|
+
* Request error
|
|
1982
|
+
*/
|
|
1983
|
+
400: 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 DeleteCliWizardSessionError = DeleteCliWizardSessionErrors[keyof DeleteCliWizardSessionErrors];
|
|
2002
|
+
type DeleteCliWizardSessionResponses = {
|
|
2003
|
+
/**
|
|
2004
|
+
* CLI wizard session deleted
|
|
2005
|
+
*/
|
|
2006
|
+
200: DeleteCliWizardSessionResponse;
|
|
2007
|
+
};
|
|
2008
|
+
type DeleteCliWizardSessionResponse2 = DeleteCliWizardSessionResponses[keyof DeleteCliWizardSessionResponses];
|
|
2009
|
+
type GetCliWizardSessionData = {
|
|
2010
|
+
body?: never;
|
|
2011
|
+
headers?: {
|
|
2012
|
+
/**
|
|
2013
|
+
* API contract version. Defaults to the oldest supported version.
|
|
2014
|
+
*/
|
|
2015
|
+
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
2016
|
+
};
|
|
2017
|
+
path: {
|
|
2018
|
+
sessionId: string;
|
|
2019
|
+
};
|
|
2020
|
+
query?: never;
|
|
2021
|
+
url: '/cli/wizard/{sessionId}';
|
|
2022
|
+
};
|
|
2023
|
+
type GetCliWizardSessionErrors = {
|
|
2024
|
+
/**
|
|
2025
|
+
* Request error
|
|
2026
|
+
*/
|
|
2027
|
+
400: ErrorResponse;
|
|
2028
|
+
/**
|
|
2029
|
+
* Request error
|
|
2030
|
+
*/
|
|
2031
|
+
404: 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 GetCliWizardSessionError = GetCliWizardSessionErrors[keyof GetCliWizardSessionErrors];
|
|
2046
|
+
type GetCliWizardSessionResponses = {
|
|
2047
|
+
/**
|
|
2048
|
+
* CLI wizard session credentials
|
|
2049
|
+
*/
|
|
2050
|
+
200: CliWizardSessionReadyResponse;
|
|
2051
|
+
/**
|
|
2052
|
+
* CLI wizard session is waiting for sign-in
|
|
2053
|
+
*/
|
|
2054
|
+
202: CliWizardSessionWaitingResponse;
|
|
2055
|
+
};
|
|
2056
|
+
type GetCliWizardSessionResponse = GetCliWizardSessionResponses[keyof GetCliWizardSessionResponses];
|
|
2057
|
+
//#endregion
|
|
2058
|
+
//#region src/wrappers/awaitJobs.d.ts
|
|
2059
|
+
type JobResult = GetTranslationJobInfoResponse[number];
|
|
2060
|
+
type AwaitJobsOptions = {
|
|
2061
|
+
pollingIntervalSeconds?: number;
|
|
2062
|
+
timeoutSeconds?: number;
|
|
2063
|
+
};
|
|
2064
|
+
type AwaitJobsResult = {
|
|
2065
|
+
complete: boolean;
|
|
2066
|
+
jobs: JobResult[];
|
|
2067
|
+
};
|
|
2068
|
+
declare function awaitJobs(client: Client, jobIds: readonly string[], options?: AwaitJobsOptions): Promise<AwaitJobsResult>;
|
|
2069
|
+
//#endregion
|
|
2070
|
+
//#region src/wrappers/base64.d.ts
|
|
2071
|
+
declare function encodeBase64(data: string): string;
|
|
2072
|
+
declare function decodeBase64(base64: string): string;
|
|
2073
|
+
declare function encodeFileContent(content: string, fileFormat: FileFormat): string;
|
|
2074
|
+
declare function decodeFileContent(content: string, fileFormat: FileFormat): string;
|
|
2075
|
+
//#endregion
|
|
2076
|
+
//#region src/wrappers/batch.d.ts
|
|
2077
|
+
declare const DEFAULT_BATCH_SIZE = 100;
|
|
2078
|
+
type BatchOptions = {
|
|
2079
|
+
batchSize?: number;
|
|
2080
|
+
parallel?: boolean;
|
|
2081
|
+
};
|
|
2082
|
+
declare function processBatches<TInput, TOutput>(items: readonly TInput[], processBatch: (batch: TInput[]) => Promise<TOutput[]>, {
|
|
2083
|
+
batchSize,
|
|
2084
|
+
parallel
|
|
2085
|
+
}?: BatchOptions): Promise<TOutput[]>;
|
|
2086
|
+
//#endregion
|
|
2087
|
+
//#region src/wrappers/transport.d.ts
|
|
2088
|
+
type RetryPolicy = 'exponential' | 'linear' | 'none';
|
|
2089
|
+
//#endregion
|
|
2090
|
+
//#region src/wrappers/client.d.ts
|
|
2091
|
+
type ApiVersion = NonNullable<NonNullable<GetProjectInfoData['headers']>['gt-api-version']>;
|
|
2092
|
+
declare const API_VERSION: ApiVersion;
|
|
2093
|
+
type ApiClientConfig = {
|
|
2094
|
+
apiKey?: string;
|
|
2095
|
+
apiVersion?: ApiVersion;
|
|
2096
|
+
baseUrl: string;
|
|
2097
|
+
fetch?: typeof fetch;
|
|
2098
|
+
projectId?: string;
|
|
2099
|
+
retryPolicy?: RetryPolicy;
|
|
2100
|
+
timeoutMs?: number;
|
|
2101
|
+
};
|
|
2102
|
+
declare function createApiClient(config: ApiClientConfig): Client;
|
|
2103
|
+
//#endregion
|
|
2104
|
+
//#region src/generated/sdk.gen.d.ts
|
|
2105
|
+
type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options$1<TData, ThrowOnError> & {
|
|
2106
|
+
/**
|
|
2107
|
+
* You can provide a client instance returned by `createClient()` instead of
|
|
2108
|
+
* individual options. This might be also useful if you want to implement a
|
|
2109
|
+
* custom client.
|
|
2110
|
+
*/
|
|
2111
|
+
client: Client;
|
|
2112
|
+
/**
|
|
2113
|
+
* You can pass arbitrary values through the `meta` object. This can be
|
|
2114
|
+
* used to access values that aren't defined as part of the SDK function.
|
|
2115
|
+
*/
|
|
2116
|
+
meta?: Record<string, unknown>;
|
|
2117
|
+
};
|
|
2118
|
+
declare const createProject: <ThrowOnError extends boolean = false>(options: Options<CreateProjectData, ThrowOnError>) => RequestResult<CreateProjectResponses, CreateProjectErrors, ThrowOnError, "fields">;
|
|
2119
|
+
declare const uploadSourceFiles: <ThrowOnError extends boolean = false>(options: Options<UploadSourceFilesData, ThrowOnError>) => RequestResult<UploadSourceFilesResponses, UploadSourceFilesErrors, ThrowOnError, "fields">;
|
|
2120
|
+
declare const uploadTranslations: <ThrowOnError extends boolean = false>(options: Options<UploadTranslationsData, ThrowOnError>) => RequestResult<UploadTranslationsResponses, UploadTranslationsErrors, ThrowOnError, "fields">;
|
|
2121
|
+
declare const uploadAssets: <ThrowOnError extends boolean = false>(options: Options<UploadAssetsData, ThrowOnError>) => RequestResult<UploadAssetsResponses, UploadAssetsErrors, ThrowOnError, "fields">;
|
|
2122
|
+
declare const submitUserEditDiffs: <ThrowOnError extends boolean = false>(options: Options<SubmitUserEditDiffsData, ThrowOnError>) => RequestResult<SubmitUserEditDiffsResponses, SubmitUserEditDiffsErrors, ThrowOnError, "fields">;
|
|
2123
|
+
declare const shouldGenerateProjectContext: <ThrowOnError extends boolean = false>(options: Options<ShouldGenerateProjectContextData, ThrowOnError>) => RequestResult<ShouldGenerateProjectContextResponses, ShouldGenerateProjectContextErrors, ThrowOnError, "fields">;
|
|
2124
|
+
declare const generateProjectContext: <ThrowOnError extends boolean = false>(options: Options<GenerateProjectContextData, ThrowOnError>) => RequestResult<GenerateProjectContextResponses, GenerateProjectContextErrors, ThrowOnError, "fields">;
|
|
2125
|
+
declare const getProjectContextGenerationStatus: <ThrowOnError extends boolean = false>(options: Options<GetProjectContextGenerationStatusData, ThrowOnError>) => RequestResult<GetProjectContextGenerationStatusResponses, GetProjectContextGenerationStatusErrors, ThrowOnError, "fields">;
|
|
2126
|
+
declare const enqueueFileTranslations: <ThrowOnError extends boolean = false>(options: Options<EnqueueFileTranslationsData, ThrowOnError>) => RequestResult<EnqueueFileTranslationsResponses, EnqueueFileTranslationsErrors, ThrowOnError, "fields">;
|
|
2127
|
+
declare const publishFiles: <ThrowOnError extends boolean = false>(options: Options<PublishFilesData, ThrowOnError>) => RequestResult<PublishFilesResponses, PublishFilesErrors, ThrowOnError, "fields">;
|
|
2128
|
+
declare const downloadFile: <ThrowOnError extends boolean = false>(options: Options<DownloadFileData, ThrowOnError>) => RequestResult<DownloadFileResponses, DownloadFileErrors, ThrowOnError, "fields">;
|
|
2129
|
+
declare const downloadFiles: <ThrowOnError extends boolean = false>(options: Options<DownloadFilesData, ThrowOnError>) => RequestResult<DownloadFilesResponses, DownloadFilesErrors, ThrowOnError, "fields">;
|
|
2130
|
+
declare const getBranchInfo: <ThrowOnError extends boolean = false>(options: Options<GetBranchInfoData, ThrowOnError>) => RequestResult<GetBranchInfoResponses, GetBranchInfoErrors, ThrowOnError, "fields">;
|
|
2131
|
+
declare const createBranch: <ThrowOnError extends boolean = false>(options: Options<CreateBranchData, ThrowOnError>) => RequestResult<CreateBranchResponses, CreateBranchErrors, ThrowOnError, "fields">;
|
|
2132
|
+
declare const createTag: <ThrowOnError extends boolean = false>(options: Options<CreateTagData, ThrowOnError>) => RequestResult<CreateTagResponses, CreateTagErrors, ThrowOnError, "fields">;
|
|
2133
|
+
declare const getProjectInfo: <ThrowOnError extends boolean = false>(options: Options<GetProjectInfoData, ThrowOnError>) => RequestResult<GetProjectInfoResponses, GetProjectInfoErrors, ThrowOnError, "fields">;
|
|
2134
|
+
declare const updateProjectInfo: <ThrowOnError extends boolean = false>(options: Options<UpdateProjectInfoData, ThrowOnError>) => RequestResult<UpdateProjectInfoResponses, UpdateProjectInfoErrors, ThrowOnError, "fields">;
|
|
2135
|
+
declare const getTranslationJobInfo: <ThrowOnError extends boolean = false>(options: Options<GetTranslationJobInfoData, ThrowOnError>) => RequestResult<GetTranslationJobInfoResponses, GetTranslationJobInfoErrors, ThrowOnError, "fields">;
|
|
2136
|
+
declare const translate: <ThrowOnError extends boolean = false>(options: Options<TranslateData, ThrowOnError>) => RequestResult<TranslateResponses, TranslateErrors, ThrowOnError, "fields">;
|
|
2137
|
+
declare const getFileInfo: <ThrowOnError extends boolean = false>(options: Options<GetFileInfoData, ThrowOnError>) => RequestResult<GetFileInfoResponses, GetFileInfoErrors, ThrowOnError, "fields">;
|
|
2138
|
+
declare const getTranslationStatus: <ThrowOnError extends boolean = false>(options: Options<GetTranslationStatusData, ThrowOnError>) => RequestResult<GetTranslationStatusResponses, GetTranslationStatusErrors, ThrowOnError, "fields">;
|
|
2139
|
+
declare const processFileMoves: <ThrowOnError extends boolean = false>(options: Options<ProcessFileMovesData, ThrowOnError>) => RequestResult<ProcessFileMovesResponses, ProcessFileMovesErrors, ThrowOnError, "fields">;
|
|
2140
|
+
declare const getOrphanedFiles: <ThrowOnError extends boolean = false>(options: Options<GetOrphanedFilesData, ThrowOnError>) => RequestResult<GetOrphanedFilesResponses, GetOrphanedFilesErrors, ThrowOnError, "fields">;
|
|
2141
|
+
declare const createCliWizardSession: <ThrowOnError extends boolean = false>(options: Options<CreateCliWizardSessionData, ThrowOnError>) => RequestResult<CreateCliWizardSessionResponses, CreateCliWizardSessionErrors, ThrowOnError, "fields">;
|
|
2142
|
+
declare const deleteCliWizardSession: <ThrowOnError extends boolean = false>(options: Options<DeleteCliWizardSessionData, ThrowOnError>) => RequestResult<DeleteCliWizardSessionResponses, DeleteCliWizardSessionErrors, ThrowOnError, "fields">;
|
|
2143
|
+
declare const getCliWizardSession: <ThrowOnError extends boolean = false>(options: Options<GetCliWizardSessionData, ThrowOnError>) => RequestResult<GetCliWizardSessionResponses, GetCliWizardSessionErrors, ThrowOnError, "fields">;
|
|
2144
|
+
//#endregion
|
|
2145
|
+
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 };
|
|
2146
|
+
//# sourceMappingURL=index.d.cts.map
|