@generaltranslation/api 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/dist/index.cjs +136 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +239 -10
- package/dist/index.d.mts +239 -10
- package/dist/index.mjs +136 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/spec/openapi.json +420 -58
package/dist/index.d.mts
CHANGED
|
@@ -310,12 +310,19 @@ type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boole
|
|
|
310
310
|
//#endregion
|
|
311
311
|
//#region src/generated/types.gen.d.ts
|
|
312
312
|
type ClientOptions = {
|
|
313
|
-
baseUrl:
|
|
313
|
+
baseUrl: 'https://api.gtx.dev' | (string & {});
|
|
314
314
|
};
|
|
315
315
|
type ErrorResponse = {
|
|
316
316
|
error: string;
|
|
317
317
|
};
|
|
318
318
|
type FileFormat = 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG';
|
|
319
|
+
type ModelProvider = 'ANTHROPIC' | 'OPENAI' | 'XAI' | 'GOOGLE';
|
|
320
|
+
type JsonObject = {
|
|
321
|
+
[key: string]: JsonValue;
|
|
322
|
+
};
|
|
323
|
+
type JsonValue = string | number | boolean | null | Array<JsonValue | null> | {
|
|
324
|
+
[key: string]: JsonValue | null;
|
|
325
|
+
};
|
|
319
326
|
type Branch = {
|
|
320
327
|
id: string;
|
|
321
328
|
name: string;
|
|
@@ -323,7 +330,7 @@ type Branch = {
|
|
|
323
330
|
type RuntimeTranslationResponse = {
|
|
324
331
|
[key: string]: {
|
|
325
332
|
success: true;
|
|
326
|
-
translation?:
|
|
333
|
+
translation?: JsonValue;
|
|
327
334
|
dataFormat: 'JSX' | 'ICU' | 'I18NEXT' | 'STRING';
|
|
328
335
|
locale: string;
|
|
329
336
|
} | {
|
|
@@ -342,7 +349,7 @@ type RuntimeTranslationRequest = {
|
|
|
342
349
|
context?: string;
|
|
343
350
|
maxChars?: number;
|
|
344
351
|
dataFormat?: 'JSX' | 'ICU' | 'I18NEXT' | 'STRING';
|
|
345
|
-
actionType?: 'fast';
|
|
352
|
+
actionType?: 'fast' | 'standard';
|
|
346
353
|
sourceCode?: {
|
|
347
354
|
[key: string]: Array<{
|
|
348
355
|
before: string;
|
|
@@ -356,7 +363,7 @@ type RuntimeTranslationRequest = {
|
|
|
356
363
|
targetLocale: string;
|
|
357
364
|
sourceLocale: string;
|
|
358
365
|
metadata: {
|
|
359
|
-
modelProvider?:
|
|
366
|
+
modelProvider?: ModelProvider;
|
|
360
367
|
};
|
|
361
368
|
};
|
|
362
369
|
type CreateCliWizardSessionResponse = {
|
|
@@ -468,6 +475,10 @@ type UploadSourceFilesData = {
|
|
|
468
475
|
* API contract version. Defaults to the oldest supported version.
|
|
469
476
|
*/
|
|
470
477
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
478
|
+
/**
|
|
479
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
480
|
+
*/
|
|
481
|
+
'gt-project-id'?: string;
|
|
471
482
|
};
|
|
472
483
|
path?: never;
|
|
473
484
|
query?: never;
|
|
@@ -561,6 +572,10 @@ type UploadTranslationsData = {
|
|
|
561
572
|
* API contract version. Defaults to the oldest supported version.
|
|
562
573
|
*/
|
|
563
574
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
575
|
+
/**
|
|
576
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
577
|
+
*/
|
|
578
|
+
'gt-project-id'?: string;
|
|
564
579
|
};
|
|
565
580
|
path?: never;
|
|
566
581
|
query?: never;
|
|
@@ -635,6 +650,10 @@ type UploadAssetsData = {
|
|
|
635
650
|
* API contract version. Defaults to the oldest supported version.
|
|
636
651
|
*/
|
|
637
652
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
653
|
+
/**
|
|
654
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
655
|
+
*/
|
|
656
|
+
'gt-project-id'?: string;
|
|
638
657
|
};
|
|
639
658
|
path?: never;
|
|
640
659
|
query?: never;
|
|
@@ -702,6 +721,10 @@ type SubmitUserEditDiffsData = {
|
|
|
702
721
|
* API contract version. Defaults to the oldest supported version.
|
|
703
722
|
*/
|
|
704
723
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
724
|
+
/**
|
|
725
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
726
|
+
*/
|
|
727
|
+
'gt-project-id'?: string;
|
|
705
728
|
};
|
|
706
729
|
path?: never;
|
|
707
730
|
query?: never;
|
|
@@ -752,6 +775,10 @@ type ShouldGenerateProjectContextData = {
|
|
|
752
775
|
* API contract version. Defaults to the oldest supported version.
|
|
753
776
|
*/
|
|
754
777
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
778
|
+
/**
|
|
779
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
780
|
+
*/
|
|
781
|
+
'gt-project-id'?: string;
|
|
755
782
|
};
|
|
756
783
|
path?: never;
|
|
757
784
|
query?: never;
|
|
@@ -808,6 +835,10 @@ type GenerateProjectContextData = {
|
|
|
808
835
|
* API contract version. Defaults to the oldest supported version.
|
|
809
836
|
*/
|
|
810
837
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
838
|
+
/**
|
|
839
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
840
|
+
*/
|
|
841
|
+
'gt-project-id'?: string;
|
|
811
842
|
};
|
|
812
843
|
path?: never;
|
|
813
844
|
query?: never;
|
|
@@ -863,6 +894,10 @@ type GetProjectContextGenerationStatusData = {
|
|
|
863
894
|
* API contract version. Defaults to the oldest supported version.
|
|
864
895
|
*/
|
|
865
896
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
897
|
+
/**
|
|
898
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
899
|
+
*/
|
|
900
|
+
'gt-project-id'?: string;
|
|
866
901
|
};
|
|
867
902
|
path: {
|
|
868
903
|
jobId: string;
|
|
@@ -921,7 +956,7 @@ type EnqueueFileTranslationsData = {
|
|
|
921
956
|
targetLocales?: Array<string>;
|
|
922
957
|
sourceLocale?: string;
|
|
923
958
|
force?: boolean;
|
|
924
|
-
modelProvider?:
|
|
959
|
+
modelProvider?: ModelProvider;
|
|
925
960
|
publish?: boolean;
|
|
926
961
|
};
|
|
927
962
|
headers?: {
|
|
@@ -929,6 +964,10 @@ type EnqueueFileTranslationsData = {
|
|
|
929
964
|
* API contract version. Defaults to the oldest supported version.
|
|
930
965
|
*/
|
|
931
966
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
967
|
+
/**
|
|
968
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
969
|
+
*/
|
|
970
|
+
'gt-project-id'?: string;
|
|
932
971
|
};
|
|
933
972
|
path?: never;
|
|
934
973
|
query?: never;
|
|
@@ -992,7 +1031,7 @@ type EnqueueFileTranslationsResponses = {
|
|
|
992
1031
|
projectId: string;
|
|
993
1032
|
force: boolean;
|
|
994
1033
|
outputFileFormat?: FileFormat;
|
|
995
|
-
modelProvider?:
|
|
1034
|
+
modelProvider?: ModelProvider;
|
|
996
1035
|
glossaryRetranslate?: boolean;
|
|
997
1036
|
changedGlossaryTerms?: Array<string>;
|
|
998
1037
|
onComplete?: {
|
|
@@ -1040,6 +1079,10 @@ type PublishFilesData = {
|
|
|
1040
1079
|
* API contract version. Defaults to the oldest supported version.
|
|
1041
1080
|
*/
|
|
1042
1081
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1082
|
+
/**
|
|
1083
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
1084
|
+
*/
|
|
1085
|
+
'gt-project-id'?: string;
|
|
1043
1086
|
};
|
|
1044
1087
|
path?: never;
|
|
1045
1088
|
query?: never;
|
|
@@ -1099,6 +1142,10 @@ type DownloadFileData = {
|
|
|
1099
1142
|
* API contract version. Defaults to the oldest supported version.
|
|
1100
1143
|
*/
|
|
1101
1144
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1145
|
+
/**
|
|
1146
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
1147
|
+
*/
|
|
1148
|
+
'gt-project-id'?: string;
|
|
1102
1149
|
};
|
|
1103
1150
|
path: {
|
|
1104
1151
|
fileId: string;
|
|
@@ -1166,6 +1213,10 @@ type DownloadFilesData = {
|
|
|
1166
1213
|
* API contract version. Defaults to the oldest supported version.
|
|
1167
1214
|
*/
|
|
1168
1215
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1216
|
+
/**
|
|
1217
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
1218
|
+
*/
|
|
1219
|
+
'gt-project-id'?: string;
|
|
1169
1220
|
};
|
|
1170
1221
|
path?: never;
|
|
1171
1222
|
query?: never;
|
|
@@ -1211,9 +1262,7 @@ type DownloadFilesResponses = {
|
|
|
1211
1262
|
locale?: string;
|
|
1212
1263
|
fileName?: string;
|
|
1213
1264
|
data: string;
|
|
1214
|
-
metadata:
|
|
1215
|
-
[key: string]: unknown;
|
|
1216
|
-
};
|
|
1265
|
+
metadata: JsonObject;
|
|
1217
1266
|
fileFormat: FileFormat;
|
|
1218
1267
|
}>;
|
|
1219
1268
|
count: number;
|
|
@@ -1235,6 +1284,10 @@ type GetBranchInfoData = {
|
|
|
1235
1284
|
* API contract version. Defaults to the oldest supported version.
|
|
1236
1285
|
*/
|
|
1237
1286
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1287
|
+
/**
|
|
1288
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
1289
|
+
*/
|
|
1290
|
+
'gt-project-id'?: string;
|
|
1238
1291
|
};
|
|
1239
1292
|
path?: never;
|
|
1240
1293
|
query?: never;
|
|
@@ -1289,6 +1342,10 @@ type CreateBranchData = {
|
|
|
1289
1342
|
* API contract version. Defaults to the oldest supported version.
|
|
1290
1343
|
*/
|
|
1291
1344
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1345
|
+
/**
|
|
1346
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
1347
|
+
*/
|
|
1348
|
+
'gt-project-id'?: string;
|
|
1292
1349
|
};
|
|
1293
1350
|
path?: never;
|
|
1294
1351
|
query?: never;
|
|
@@ -1349,6 +1406,10 @@ type CreateTagData = {
|
|
|
1349
1406
|
* API contract version. Defaults to the oldest supported version.
|
|
1350
1407
|
*/
|
|
1351
1408
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1409
|
+
/**
|
|
1410
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
1411
|
+
*/
|
|
1412
|
+
'gt-project-id'?: string;
|
|
1352
1413
|
};
|
|
1353
1414
|
path?: never;
|
|
1354
1415
|
query?: never;
|
|
@@ -1403,6 +1464,10 @@ type GetProjectInfoData = {
|
|
|
1403
1464
|
* API contract version. Defaults to the oldest supported version.
|
|
1404
1465
|
*/
|
|
1405
1466
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1467
|
+
/**
|
|
1468
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
1469
|
+
*/
|
|
1470
|
+
'gt-project-id'?: string;
|
|
1406
1471
|
};
|
|
1407
1472
|
path: {
|
|
1408
1473
|
projectId: string;
|
|
@@ -1461,6 +1526,10 @@ type UpdateProjectInfoData = {
|
|
|
1461
1526
|
* API contract version. Defaults to the oldest supported version.
|
|
1462
1527
|
*/
|
|
1463
1528
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1529
|
+
/**
|
|
1530
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
1531
|
+
*/
|
|
1532
|
+
'gt-project-id'?: string;
|
|
1464
1533
|
};
|
|
1465
1534
|
path: {
|
|
1466
1535
|
projectId: string;
|
|
@@ -1517,6 +1586,10 @@ type GetTranslationJobInfoData = {
|
|
|
1517
1586
|
* API contract version. Defaults to the oldest supported version.
|
|
1518
1587
|
*/
|
|
1519
1588
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1589
|
+
/**
|
|
1590
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
1591
|
+
*/
|
|
1592
|
+
'gt-project-id'?: string;
|
|
1520
1593
|
};
|
|
1521
1594
|
path?: never;
|
|
1522
1595
|
query?: never;
|
|
@@ -1585,6 +1658,10 @@ type TranslateData = {
|
|
|
1585
1658
|
* API contract version. Defaults to the oldest supported version.
|
|
1586
1659
|
*/
|
|
1587
1660
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1661
|
+
/**
|
|
1662
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
1663
|
+
*/
|
|
1664
|
+
'gt-project-id'?: string;
|
|
1588
1665
|
};
|
|
1589
1666
|
path?: never;
|
|
1590
1667
|
query?: never;
|
|
@@ -1655,6 +1732,10 @@ type GetFileInfoData = {
|
|
|
1655
1732
|
* API contract version. Defaults to the oldest supported version.
|
|
1656
1733
|
*/
|
|
1657
1734
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1735
|
+
/**
|
|
1736
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
1737
|
+
*/
|
|
1738
|
+
'gt-project-id'?: string;
|
|
1658
1739
|
};
|
|
1659
1740
|
path?: never;
|
|
1660
1741
|
query?: never;
|
|
@@ -1728,6 +1809,10 @@ type GetTranslationStatusData = {
|
|
|
1728
1809
|
* API contract version. Defaults to the oldest supported version.
|
|
1729
1810
|
*/
|
|
1730
1811
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1812
|
+
/**
|
|
1813
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
1814
|
+
*/
|
|
1815
|
+
'gt-project-id'?: string;
|
|
1731
1816
|
};
|
|
1732
1817
|
path: {
|
|
1733
1818
|
fileId: string;
|
|
@@ -1808,6 +1893,10 @@ type ProcessFileMovesData = {
|
|
|
1808
1893
|
* API contract version. Defaults to the oldest supported version.
|
|
1809
1894
|
*/
|
|
1810
1895
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1896
|
+
/**
|
|
1897
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
1898
|
+
*/
|
|
1899
|
+
'gt-project-id'?: string;
|
|
1811
1900
|
};
|
|
1812
1901
|
path?: never;
|
|
1813
1902
|
query?: never;
|
|
@@ -1875,6 +1964,10 @@ type GetOrphanedFilesData = {
|
|
|
1875
1964
|
* API contract version. Defaults to the oldest supported version.
|
|
1876
1965
|
*/
|
|
1877
1966
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1967
|
+
/**
|
|
1968
|
+
* Target project ID. Required when authenticating with an organization API key; ignored with project-scoped API keys (the project is resolved from the key).
|
|
1969
|
+
*/
|
|
1970
|
+
'gt-project-id'?: string;
|
|
1878
1971
|
};
|
|
1879
1972
|
path?: never;
|
|
1880
1973
|
query?: never;
|
|
@@ -2115,32 +2208,168 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
|
|
|
2115
2208
|
*/
|
|
2116
2209
|
meta?: Record<string, unknown>;
|
|
2117
2210
|
};
|
|
2211
|
+
/**
|
|
2212
|
+
* Create a Project
|
|
2213
|
+
*
|
|
2214
|
+
* 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`.
|
|
2215
|
+
*/
|
|
2118
2216
|
declare const createProject: <ThrowOnError extends boolean = false>(options: Options<CreateProjectData, ThrowOnError>) => RequestResult<CreateProjectResponses, CreateProjectErrors, ThrowOnError, "fields">;
|
|
2217
|
+
/**
|
|
2218
|
+
* Upload source files
|
|
2219
|
+
*
|
|
2220
|
+
* Upload one or more source files to the project. Max 100 files per request.
|
|
2221
|
+
*/
|
|
2119
2222
|
declare const uploadSourceFiles: <ThrowOnError extends boolean = false>(options: Options<UploadSourceFilesData, ThrowOnError>) => RequestResult<UploadSourceFilesResponses, UploadSourceFilesErrors, ThrowOnError, "fields">;
|
|
2223
|
+
/**
|
|
2224
|
+
* Upload translated files
|
|
2225
|
+
*
|
|
2226
|
+
* Upload translated files linked to their source files. Max 100 files per request.
|
|
2227
|
+
*/
|
|
2120
2228
|
declare const uploadTranslations: <ThrowOnError extends boolean = false>(options: Options<UploadTranslationsData, ThrowOnError>) => RequestResult<UploadTranslationsResponses, UploadTranslationsErrors, ThrowOnError, "fields">;
|
|
2229
|
+
/**
|
|
2230
|
+
* Upload Project assets
|
|
2231
|
+
*
|
|
2232
|
+
* 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.
|
|
2233
|
+
*/
|
|
2121
2234
|
declare const uploadAssets: <ThrowOnError extends boolean = false>(options: Options<UploadAssetsData, ThrowOnError>) => RequestResult<UploadAssetsResponses, UploadAssetsErrors, ThrowOnError, "fields">;
|
|
2235
|
+
/**
|
|
2236
|
+
* Submit translation diffs
|
|
2237
|
+
*
|
|
2238
|
+
* Overwrite translations with user-provided localized content.
|
|
2239
|
+
*/
|
|
2122
2240
|
declare const submitUserEditDiffs: <ThrowOnError extends boolean = false>(options: Options<SubmitUserEditDiffsData, ThrowOnError>) => RequestResult<SubmitUserEditDiffsResponses, SubmitUserEditDiffsErrors, ThrowOnError, "fields">;
|
|
2241
|
+
/**
|
|
2242
|
+
* Check if context generation is needed
|
|
2243
|
+
*
|
|
2244
|
+
* Check whether the Project needs translation context generated. This deprecated endpoint is retained for backward compatibility and is no longer called by current clients.
|
|
2245
|
+
*
|
|
2246
|
+
* @deprecated
|
|
2247
|
+
*/
|
|
2123
2248
|
declare const shouldGenerateProjectContext: <ThrowOnError extends boolean = false>(options: Options<ShouldGenerateProjectContextData, ThrowOnError>) => RequestResult<ShouldGenerateProjectContextResponses, ShouldGenerateProjectContextErrors, ThrowOnError, "fields">;
|
|
2249
|
+
/**
|
|
2250
|
+
* Generate translation context
|
|
2251
|
+
*
|
|
2252
|
+
* Generate glossaries and translation instructions for the project.
|
|
2253
|
+
*/
|
|
2124
2254
|
declare const generateProjectContext: <ThrowOnError extends boolean = false>(options: Options<GenerateProjectContextData, ThrowOnError>) => RequestResult<GenerateProjectContextResponses, GenerateProjectContextErrors, ThrowOnError, "fields">;
|
|
2255
|
+
/**
|
|
2256
|
+
* Get context generation job status
|
|
2257
|
+
*
|
|
2258
|
+
* Track a context generation job. This deprecated endpoint is retained for backward compatibility; new integrations should use `POST /v2/project/jobs/info`.
|
|
2259
|
+
*
|
|
2260
|
+
* @deprecated
|
|
2261
|
+
*/
|
|
2125
2262
|
declare const getProjectContextGenerationStatus: <ThrowOnError extends boolean = false>(options: Options<GetProjectContextGenerationStatusData, ThrowOnError>) => RequestResult<GetProjectContextGenerationStatusResponses, GetProjectContextGenerationStatusErrors, ThrowOnError, "fields">;
|
|
2263
|
+
/**
|
|
2264
|
+
* Queue files for translation
|
|
2265
|
+
*
|
|
2266
|
+
* Enqueue uploaded source files for background translation. Max 100 files per request. The response shape depends on the requested `gt-api-version`.
|
|
2267
|
+
*/
|
|
2126
2268
|
declare const enqueueFileTranslations: <ThrowOnError extends boolean = false>(options: Options<EnqueueFileTranslationsData, ThrowOnError>) => RequestResult<EnqueueFileTranslationsResponses, EnqueueFileTranslationsErrors, ThrowOnError, "fields">;
|
|
2269
|
+
/**
|
|
2270
|
+
* Publish or unpublish files
|
|
2271
|
+
*
|
|
2272
|
+
* Publish or unpublish translated files to the CDN. Requires CDN to be enabled.
|
|
2273
|
+
*/
|
|
2127
2274
|
declare const publishFiles: <ThrowOnError extends boolean = false>(options: Options<PublishFilesData, ThrowOnError>) => RequestResult<PublishFilesResponses, PublishFilesErrors, ThrowOnError, "fields">;
|
|
2275
|
+
/**
|
|
2276
|
+
* Download a single file
|
|
2277
|
+
*
|
|
2278
|
+
* Download a single source or translated file. This deprecated endpoint is retained for backward compatibility; new integrations should use `POST /v2/project/files/download`.
|
|
2279
|
+
*
|
|
2280
|
+
* @deprecated
|
|
2281
|
+
*/
|
|
2128
2282
|
declare const downloadFile: <ThrowOnError extends boolean = false>(options: Options<DownloadFileData, ThrowOnError>) => RequestResult<DownloadFileResponses, DownloadFileErrors, ThrowOnError, "fields">;
|
|
2283
|
+
/**
|
|
2284
|
+
* Download multiple files
|
|
2285
|
+
*
|
|
2286
|
+
* Download up to 100 source or translated files in one request.
|
|
2287
|
+
*/
|
|
2129
2288
|
declare const downloadFiles: <ThrowOnError extends boolean = false>(options: Options<DownloadFilesData, ThrowOnError>) => RequestResult<DownloadFilesResponses, DownloadFilesErrors, ThrowOnError, "fields">;
|
|
2289
|
+
/**
|
|
2290
|
+
* Get branch information
|
|
2291
|
+
*
|
|
2292
|
+
* Return the Project's default branch and any branches requested by name.
|
|
2293
|
+
*/
|
|
2130
2294
|
declare const getBranchInfo: <ThrowOnError extends boolean = false>(options: Options<GetBranchInfoData, ThrowOnError>) => RequestResult<GetBranchInfoResponses, GetBranchInfoErrors, ThrowOnError, "fields">;
|
|
2295
|
+
/**
|
|
2296
|
+
* Create a branch
|
|
2297
|
+
*
|
|
2298
|
+
* Create a new branch, or rename and confirm the default branch.
|
|
2299
|
+
*/
|
|
2131
2300
|
declare const createBranch: <ThrowOnError extends boolean = false>(options: Options<CreateBranchData, ThrowOnError>) => RequestResult<CreateBranchResponses, CreateBranchErrors, ThrowOnError, "fields">;
|
|
2301
|
+
/**
|
|
2302
|
+
* Create or update a tag
|
|
2303
|
+
*
|
|
2304
|
+
* Create or upsert a tag that points at a set of file versions.
|
|
2305
|
+
*/
|
|
2132
2306
|
declare const createTag: <ThrowOnError extends boolean = false>(options: Options<CreateTagData, ThrowOnError>) => RequestResult<CreateTagResponses, CreateTagErrors, ThrowOnError, "fields">;
|
|
2307
|
+
/**
|
|
2308
|
+
* Get Project information
|
|
2309
|
+
*
|
|
2310
|
+
* Read the authenticated Project's name, Organization ID, locale settings, and auto-approval setting.
|
|
2311
|
+
*/
|
|
2133
2312
|
declare const getProjectInfo: <ThrowOnError extends boolean = false>(options: Options<GetProjectInfoData, ThrowOnError>) => RequestResult<GetProjectInfoResponses, GetProjectInfoErrors, ThrowOnError, "fields">;
|
|
2313
|
+
/**
|
|
2314
|
+
* Update Project information
|
|
2315
|
+
*
|
|
2316
|
+
* Update the Project's default locale or CDN delivery setting.
|
|
2317
|
+
*/
|
|
2134
2318
|
declare const updateProjectInfo: <ThrowOnError extends boolean = false>(options: Options<UpdateProjectInfoData, ThrowOnError>) => RequestResult<UpdateProjectInfoResponses, UpdateProjectInfoErrors, ThrowOnError, "fields">;
|
|
2319
|
+
/**
|
|
2320
|
+
* Get translation job status
|
|
2321
|
+
*
|
|
2322
|
+
* Return normalized status information for one or more queued translation or context generation jobs.
|
|
2323
|
+
*/
|
|
2135
2324
|
declare const getTranslationJobInfo: <ThrowOnError extends boolean = false>(options: Options<GetTranslationJobInfoData, ThrowOnError>) => RequestResult<GetTranslationJobInfoResponses, GetTranslationJobInfoErrors, ThrowOnError, "fields">;
|
|
2325
|
+
/**
|
|
2326
|
+
* Translate content at runtime
|
|
2327
|
+
*
|
|
2328
|
+
* Translate one or more strings or structured content entries with caching and memoization. Development API keys are accepted for this endpoint.
|
|
2329
|
+
*/
|
|
2136
2330
|
declare const translate: <ThrowOnError extends boolean = false>(options: Options<TranslateData, ThrowOnError>) => RequestResult<TranslateResponses, TranslateErrors, ThrowOnError, "fields">;
|
|
2331
|
+
/**
|
|
2332
|
+
* Get file metadata
|
|
2333
|
+
*
|
|
2334
|
+
* Get detailed metadata for specific source and translated files.
|
|
2335
|
+
*/
|
|
2137
2336
|
declare const getFileInfo: <ThrowOnError extends boolean = false>(options: Options<GetFileInfoData, ThrowOnError>) => RequestResult<GetFileInfoResponses, GetFileInfoErrors, ThrowOnError, "fields">;
|
|
2337
|
+
/**
|
|
2338
|
+
* Get translation status for a file
|
|
2339
|
+
*
|
|
2340
|
+
* Return translation progress and availability by locale for one source file, along with its source metadata.
|
|
2341
|
+
*/
|
|
2138
2342
|
declare const getTranslationStatus: <ThrowOnError extends boolean = false>(options: Options<GetTranslationStatusData, ThrowOnError>) => RequestResult<GetTranslationStatusResponses, GetTranslationStatusErrors, ThrowOnError, "fields">;
|
|
2343
|
+
/**
|
|
2344
|
+
* Move or rename files
|
|
2345
|
+
*
|
|
2346
|
+
* Clone source files and their translations under new file IDs.
|
|
2347
|
+
*/
|
|
2139
2348
|
declare const processFileMoves: <ThrowOnError extends boolean = false>(options: Options<ProcessFileMovesData, ThrowOnError>) => RequestResult<ProcessFileMovesResponses, ProcessFileMovesErrors, ThrowOnError, "fields">;
|
|
2349
|
+
/**
|
|
2350
|
+
* Find orphaned files
|
|
2351
|
+
*
|
|
2352
|
+
* Return files on a branch that are not present in the provided file ID list.
|
|
2353
|
+
*/
|
|
2140
2354
|
declare const getOrphanedFiles: <ThrowOnError extends boolean = false>(options: Options<GetOrphanedFilesData, ThrowOnError>) => RequestResult<GetOrphanedFilesResponses, GetOrphanedFilesErrors, ThrowOnError, "fields">;
|
|
2355
|
+
/**
|
|
2356
|
+
* Create a CLI wizard session
|
|
2357
|
+
*
|
|
2358
|
+
* Create a temporary session for CLI browser authentication.
|
|
2359
|
+
*/
|
|
2141
2360
|
declare const createCliWizardSession: <ThrowOnError extends boolean = false>(options: Options<CreateCliWizardSessionData, ThrowOnError>) => RequestResult<CreateCliWizardSessionResponses, CreateCliWizardSessionErrors, ThrowOnError, "fields">;
|
|
2361
|
+
/**
|
|
2362
|
+
* Delete a CLI wizard session
|
|
2363
|
+
*
|
|
2364
|
+
* Delete a completed or abandoned CLI wizard session.
|
|
2365
|
+
*/
|
|
2142
2366
|
declare const deleteCliWizardSession: <ThrowOnError extends boolean = false>(options: Options<DeleteCliWizardSessionData, ThrowOnError>) => RequestResult<DeleteCliWizardSessionResponses, DeleteCliWizardSessionErrors, ThrowOnError, "fields">;
|
|
2367
|
+
/**
|
|
2368
|
+
* Get a CLI wizard session
|
|
2369
|
+
*
|
|
2370
|
+
* Get credentials for a completed CLI wizard session or its current waiting status.
|
|
2371
|
+
*/
|
|
2143
2372
|
declare const getCliWizardSession: <ThrowOnError extends boolean = false>(options: Options<GetCliWizardSessionData, ThrowOnError>) => RequestResult<GetCliWizardSessionResponses, GetCliWizardSessionErrors, ThrowOnError, "fields">;
|
|
2144
2373
|
//#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 };
|
|
2374
|
+
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, JsonObject, JsonValue, ModelProvider, 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
2375
|
//# sourceMappingURL=index.d.mts.map
|