@generaltranslation/api 0.2.0 → 0.2.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 +6 -0
- package/dist/index.cjs +163 -111
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +595 -648
- package/dist/index.d.mts +595 -648
- package/dist/index.mjs +163 -110
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/spec/openapi.json +1731 -1766
package/dist/index.d.cts
CHANGED
|
@@ -315,18 +315,7 @@ type ClientOptions = {
|
|
|
315
315
|
type ErrorResponse = {
|
|
316
316
|
error: string;
|
|
317
317
|
};
|
|
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
|
-
};
|
|
326
|
-
type Branch = {
|
|
327
|
-
id: string;
|
|
328
|
-
name: string;
|
|
329
|
-
};
|
|
318
|
+
type FileFormat = 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'XCSTRINGS' | 'DOT_STRINGS' | 'DOT_STRINGSDICT' | 'ANDROID_STRINGS';
|
|
330
319
|
type RuntimeTranslationResponse = {
|
|
331
320
|
[key: string]: {
|
|
332
321
|
success: true;
|
|
@@ -339,6 +328,9 @@ type RuntimeTranslationResponse = {
|
|
|
339
328
|
code: number;
|
|
340
329
|
};
|
|
341
330
|
};
|
|
331
|
+
type JsonValue = string | number | boolean | null | Array<JsonValue | null> | {
|
|
332
|
+
[key: string]: JsonValue | null;
|
|
333
|
+
};
|
|
342
334
|
type RuntimeTranslationRequest = {
|
|
343
335
|
requests: {
|
|
344
336
|
[key: string]: {
|
|
@@ -366,6 +358,14 @@ type RuntimeTranslationRequest = {
|
|
|
366
358
|
modelProvider?: ModelProvider;
|
|
367
359
|
};
|
|
368
360
|
};
|
|
361
|
+
type ModelProvider = 'ANTHROPIC' | 'OPENAI' | 'XAI' | 'GOOGLE';
|
|
362
|
+
type Branch = {
|
|
363
|
+
id: string;
|
|
364
|
+
name: string;
|
|
365
|
+
};
|
|
366
|
+
type JsonObject = {
|
|
367
|
+
[key: string]: JsonValue;
|
|
368
|
+
};
|
|
369
369
|
type CreateCliWizardSessionResponse = {
|
|
370
370
|
sessionId: string;
|
|
371
371
|
};
|
|
@@ -400,9 +400,11 @@ type CreateProjectData = {
|
|
|
400
400
|
*/
|
|
401
401
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
402
402
|
};
|
|
403
|
-
path
|
|
403
|
+
path: {
|
|
404
|
+
orgId: string;
|
|
405
|
+
};
|
|
404
406
|
query?: never;
|
|
405
|
-
url: '/v2/projects';
|
|
407
|
+
url: '/v2/orgs/{orgId}/projects';
|
|
406
408
|
};
|
|
407
409
|
type CreateProjectErrors = {
|
|
408
410
|
/**
|
|
@@ -449,42 +451,24 @@ type CreateProjectResponses = {
|
|
|
449
451
|
};
|
|
450
452
|
};
|
|
451
453
|
type CreateProjectResponse = CreateProjectResponses[keyof CreateProjectResponses];
|
|
452
|
-
type
|
|
454
|
+
type CreateProjectApiKeyData = {
|
|
453
455
|
body: {
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
content: string;
|
|
457
|
-
fileName: string;
|
|
458
|
-
fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'DOT_STRINGS' | 'DOT_STRINGSDICT' | 'ANDROID_STRINGS' | 'XCSTRINGS';
|
|
459
|
-
dataFormat?: string;
|
|
460
|
-
locale: string;
|
|
461
|
-
fileId?: string;
|
|
462
|
-
versionId?: string;
|
|
463
|
-
branchId?: string;
|
|
464
|
-
checkedOutBranchId?: string;
|
|
465
|
-
incomingBranchId?: string;
|
|
466
|
-
formatMetadata?: {
|
|
467
|
-
[key: string]: unknown;
|
|
468
|
-
};
|
|
469
|
-
};
|
|
470
|
-
}>;
|
|
471
|
-
sourceLocale?: string;
|
|
456
|
+
name: string;
|
|
457
|
+
type?: 'production' | 'development';
|
|
472
458
|
};
|
|
473
459
|
headers?: {
|
|
474
460
|
/**
|
|
475
461
|
* API contract version. Defaults to the oldest supported version.
|
|
476
462
|
*/
|
|
477
463
|
'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;
|
|
482
464
|
};
|
|
483
|
-
path
|
|
465
|
+
path: {
|
|
466
|
+
projectId: string;
|
|
467
|
+
};
|
|
484
468
|
query?: never;
|
|
485
|
-
url: '/v2/
|
|
469
|
+
url: '/v2/projects/{projectId}/api-keys';
|
|
486
470
|
};
|
|
487
|
-
type
|
|
471
|
+
type CreateProjectApiKeyErrors = {
|
|
488
472
|
/**
|
|
489
473
|
* Request error
|
|
490
474
|
*/
|
|
@@ -513,38 +497,30 @@ type UploadSourceFilesErrors = {
|
|
|
513
497
|
* Request error
|
|
514
498
|
*/
|
|
515
499
|
500: ErrorResponse;
|
|
516
|
-
/**
|
|
517
|
-
* Request error
|
|
518
|
-
*/
|
|
519
|
-
503: ErrorResponse;
|
|
520
500
|
};
|
|
521
|
-
type
|
|
522
|
-
type
|
|
501
|
+
type CreateProjectApiKeyError = CreateProjectApiKeyErrors[keyof CreateProjectApiKeyErrors];
|
|
502
|
+
type CreateProjectApiKeyResponses = {
|
|
523
503
|
/**
|
|
524
|
-
*
|
|
504
|
+
* Project API key created
|
|
525
505
|
*/
|
|
526
506
|
201: {
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
locale?: string;
|
|
535
|
-
}>;
|
|
536
|
-
count: number;
|
|
537
|
-
message: string;
|
|
507
|
+
apiKey: {
|
|
508
|
+
id: string;
|
|
509
|
+
name: string;
|
|
510
|
+
key: string;
|
|
511
|
+
projectId: string;
|
|
512
|
+
type: 'production' | 'development';
|
|
513
|
+
};
|
|
538
514
|
};
|
|
539
515
|
};
|
|
540
|
-
type
|
|
516
|
+
type CreateProjectApiKeyResponse = CreateProjectApiKeyResponses[keyof CreateProjectApiKeyResponses];
|
|
541
517
|
type UploadTranslationsData = {
|
|
542
518
|
body: {
|
|
543
519
|
data: Array<{
|
|
544
520
|
source: {
|
|
545
521
|
content: string;
|
|
546
522
|
fileName: string;
|
|
547
|
-
fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | '
|
|
523
|
+
fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'XCSTRINGS' | 'DOT_STRINGS' | 'DOT_STRINGSDICT' | 'ANDROID_STRINGS';
|
|
548
524
|
dataFormat?: string;
|
|
549
525
|
locale: string;
|
|
550
526
|
fileId?: string;
|
|
@@ -559,10 +535,10 @@ type UploadTranslationsData = {
|
|
|
559
535
|
translations: Array<{
|
|
560
536
|
content: string;
|
|
561
537
|
fileName: string;
|
|
562
|
-
fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | '
|
|
538
|
+
fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'XCSTRINGS' | 'DOT_STRINGS' | 'DOT_STRINGSDICT' | 'ANDROID_STRINGS';
|
|
563
539
|
dataFormat?: string;
|
|
564
540
|
locale: string;
|
|
565
|
-
transformFormat?: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | '
|
|
541
|
+
transformFormat?: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'XCSTRINGS' | 'DOT_STRINGS' | 'DOT_STRINGSDICT' | 'ANDROID_STRINGS';
|
|
566
542
|
}>;
|
|
567
543
|
}>;
|
|
568
544
|
sourceLocale?: string;
|
|
@@ -573,7 +549,7 @@ type UploadTranslationsData = {
|
|
|
573
549
|
*/
|
|
574
550
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
575
551
|
/**
|
|
576
|
-
* Target project ID
|
|
552
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
577
553
|
*/
|
|
578
554
|
'gt-project-id'?: string;
|
|
579
555
|
};
|
|
@@ -635,31 +611,25 @@ type UploadTranslationsResponses = {
|
|
|
635
611
|
};
|
|
636
612
|
};
|
|
637
613
|
type UploadTranslationsResponse = UploadTranslationsResponses[keyof UploadTranslationsResponses];
|
|
638
|
-
type
|
|
639
|
-
body
|
|
640
|
-
assets: Array<{
|
|
641
|
-
assetType: 'FONT';
|
|
642
|
-
content: string;
|
|
643
|
-
fileName: string;
|
|
644
|
-
family?: string;
|
|
645
|
-
style?: string;
|
|
646
|
-
}>;
|
|
647
|
-
};
|
|
614
|
+
type GetProjectInfoData = {
|
|
615
|
+
body?: never;
|
|
648
616
|
headers?: {
|
|
649
617
|
/**
|
|
650
618
|
* API contract version. Defaults to the oldest supported version.
|
|
651
619
|
*/
|
|
652
620
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
653
621
|
/**
|
|
654
|
-
* Target project ID
|
|
622
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
655
623
|
*/
|
|
656
624
|
'gt-project-id'?: string;
|
|
657
625
|
};
|
|
658
|
-
path
|
|
626
|
+
path: {
|
|
627
|
+
projectId: string;
|
|
628
|
+
};
|
|
659
629
|
query?: never;
|
|
660
|
-
url: '/v2/project/
|
|
630
|
+
url: '/v2/project/info/{projectId}';
|
|
661
631
|
};
|
|
662
|
-
type
|
|
632
|
+
type GetProjectInfoErrors = {
|
|
663
633
|
/**
|
|
664
634
|
* Request error
|
|
665
635
|
*/
|
|
@@ -676,10 +646,6 @@ type UploadAssetsErrors = {
|
|
|
676
646
|
* Request error
|
|
677
647
|
*/
|
|
678
648
|
404: ErrorResponse;
|
|
679
|
-
/**
|
|
680
|
-
* Request error
|
|
681
|
-
*/
|
|
682
|
-
413: ErrorResponse;
|
|
683
649
|
/**
|
|
684
650
|
* Request error
|
|
685
651
|
*/
|
|
@@ -689,32 +655,25 @@ type UploadAssetsErrors = {
|
|
|
689
655
|
*/
|
|
690
656
|
500: ErrorResponse;
|
|
691
657
|
};
|
|
692
|
-
type
|
|
693
|
-
type
|
|
658
|
+
type GetProjectInfoError = GetProjectInfoErrors[keyof GetProjectInfoErrors];
|
|
659
|
+
type GetProjectInfoResponses = {
|
|
694
660
|
/**
|
|
695
|
-
*
|
|
661
|
+
* Project information
|
|
696
662
|
*/
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
663
|
+
200: {
|
|
664
|
+
id: string;
|
|
665
|
+
name: string;
|
|
666
|
+
orgId: string;
|
|
667
|
+
defaultLocale: string | null;
|
|
668
|
+
currentLocales: Array<string>;
|
|
669
|
+
autoApprove: boolean;
|
|
704
670
|
};
|
|
705
671
|
};
|
|
706
|
-
type
|
|
707
|
-
type
|
|
672
|
+
type GetProjectInfoResponse = GetProjectInfoResponses[keyof GetProjectInfoResponses];
|
|
673
|
+
type UpdateProjectInfoData = {
|
|
708
674
|
body: {
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
locale: string;
|
|
712
|
-
diff: string;
|
|
713
|
-
branchId?: string;
|
|
714
|
-
versionId: string;
|
|
715
|
-
fileId: string;
|
|
716
|
-
localContent: string;
|
|
717
|
-
}>;
|
|
675
|
+
defaultLocale?: string;
|
|
676
|
+
cdnEnabled?: boolean;
|
|
718
677
|
};
|
|
719
678
|
headers?: {
|
|
720
679
|
/**
|
|
@@ -722,15 +681,17 @@ type SubmitUserEditDiffsData = {
|
|
|
722
681
|
*/
|
|
723
682
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
724
683
|
/**
|
|
725
|
-
* Target project ID
|
|
684
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
726
685
|
*/
|
|
727
686
|
'gt-project-id'?: string;
|
|
728
687
|
};
|
|
729
|
-
path
|
|
688
|
+
path: {
|
|
689
|
+
projectId: string;
|
|
690
|
+
};
|
|
730
691
|
query?: never;
|
|
731
|
-
url: '/v2/project/
|
|
692
|
+
url: '/v2/project/info/{projectId}';
|
|
732
693
|
};
|
|
733
|
-
type
|
|
694
|
+
type UpdateProjectInfoErrors = {
|
|
734
695
|
/**
|
|
735
696
|
* Request error
|
|
736
697
|
*/
|
|
@@ -743,6 +704,10 @@ type SubmitUserEditDiffsErrors = {
|
|
|
743
704
|
* Request error
|
|
744
705
|
*/
|
|
745
706
|
403: ErrorResponse;
|
|
707
|
+
/**
|
|
708
|
+
* Request error
|
|
709
|
+
*/
|
|
710
|
+
404: ErrorResponse;
|
|
746
711
|
/**
|
|
747
712
|
* Request error
|
|
748
713
|
*/
|
|
@@ -756,35 +721,33 @@ type SubmitUserEditDiffsErrors = {
|
|
|
756
721
|
*/
|
|
757
722
|
500: ErrorResponse;
|
|
758
723
|
};
|
|
759
|
-
type
|
|
760
|
-
type
|
|
724
|
+
type UpdateProjectInfoError = UpdateProjectInfoErrors[keyof UpdateProjectInfoErrors];
|
|
725
|
+
type UpdateProjectInfoResponses = {
|
|
761
726
|
/**
|
|
762
|
-
*
|
|
727
|
+
* Project settings updated
|
|
763
728
|
*/
|
|
764
729
|
200: {
|
|
765
|
-
|
|
766
|
-
entriesReceived: number;
|
|
767
|
-
message: string;
|
|
730
|
+
success: true;
|
|
768
731
|
};
|
|
769
732
|
};
|
|
770
|
-
type
|
|
771
|
-
type
|
|
772
|
-
body
|
|
733
|
+
type UpdateProjectInfoResponse = UpdateProjectInfoResponses[keyof UpdateProjectInfoResponses];
|
|
734
|
+
type TranslateData = {
|
|
735
|
+
body: RuntimeTranslationRequest;
|
|
773
736
|
headers?: {
|
|
774
737
|
/**
|
|
775
738
|
* API contract version. Defaults to the oldest supported version.
|
|
776
739
|
*/
|
|
777
740
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
778
741
|
/**
|
|
779
|
-
* Target project ID
|
|
742
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
780
743
|
*/
|
|
781
744
|
'gt-project-id'?: string;
|
|
782
745
|
};
|
|
783
746
|
path?: never;
|
|
784
747
|
query?: never;
|
|
785
|
-
url: '/v2/
|
|
748
|
+
url: '/v2/translate';
|
|
786
749
|
};
|
|
787
|
-
type
|
|
750
|
+
type TranslateErrors = {
|
|
788
751
|
/**
|
|
789
752
|
* Request error
|
|
790
753
|
*/
|
|
@@ -793,6 +756,10 @@ type ShouldGenerateProjectContextErrors = {
|
|
|
793
756
|
* Request error
|
|
794
757
|
*/
|
|
795
758
|
401: ErrorResponse;
|
|
759
|
+
/**
|
|
760
|
+
* Request error
|
|
761
|
+
*/
|
|
762
|
+
402: ErrorResponse;
|
|
796
763
|
/**
|
|
797
764
|
* Request error
|
|
798
765
|
*/
|
|
@@ -801,6 +768,10 @@ type ShouldGenerateProjectContextErrors = {
|
|
|
801
768
|
* Request error
|
|
802
769
|
*/
|
|
803
770
|
404: ErrorResponse;
|
|
771
|
+
/**
|
|
772
|
+
* Request error
|
|
773
|
+
*/
|
|
774
|
+
413: ErrorResponse;
|
|
804
775
|
/**
|
|
805
776
|
* Request error
|
|
806
777
|
*/
|
|
@@ -810,41 +781,40 @@ type ShouldGenerateProjectContextErrors = {
|
|
|
810
781
|
*/
|
|
811
782
|
500: ErrorResponse;
|
|
812
783
|
};
|
|
813
|
-
type
|
|
814
|
-
type
|
|
784
|
+
type TranslateError = TranslateErrors[keyof TranslateErrors];
|
|
785
|
+
type TranslateResponses = {
|
|
815
786
|
/**
|
|
816
|
-
*
|
|
787
|
+
* All translations were served from cache
|
|
817
788
|
*/
|
|
818
|
-
200:
|
|
819
|
-
|
|
820
|
-
|
|
789
|
+
200: RuntimeTranslationResponse;
|
|
790
|
+
/**
|
|
791
|
+
* Translations completed
|
|
792
|
+
*/
|
|
793
|
+
201: RuntimeTranslationResponse;
|
|
821
794
|
};
|
|
822
|
-
type
|
|
823
|
-
type
|
|
824
|
-
body
|
|
825
|
-
files: Array<{
|
|
826
|
-
branchId?: string;
|
|
827
|
-
fileId: string;
|
|
828
|
-
versionId: string;
|
|
829
|
-
}>;
|
|
830
|
-
locales?: Array<string>;
|
|
831
|
-
force?: boolean;
|
|
832
|
-
};
|
|
795
|
+
type TranslateResponse = TranslateResponses[keyof TranslateResponses];
|
|
796
|
+
type GetTranslationStatusData = {
|
|
797
|
+
body?: never;
|
|
833
798
|
headers?: {
|
|
834
799
|
/**
|
|
835
800
|
* API contract version. Defaults to the oldest supported version.
|
|
836
801
|
*/
|
|
837
802
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
838
803
|
/**
|
|
839
|
-
* Target project ID
|
|
804
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
840
805
|
*/
|
|
841
806
|
'gt-project-id'?: string;
|
|
842
807
|
};
|
|
843
|
-
path
|
|
844
|
-
|
|
845
|
-
|
|
808
|
+
path: {
|
|
809
|
+
fileId: string;
|
|
810
|
+
};
|
|
811
|
+
query?: {
|
|
812
|
+
versionId?: string;
|
|
813
|
+
branchId?: string;
|
|
814
|
+
};
|
|
815
|
+
url: '/v2/project/translations/files/status/{fileId}';
|
|
846
816
|
};
|
|
847
|
-
type
|
|
817
|
+
type GetTranslationStatusErrors = {
|
|
848
818
|
/**
|
|
849
819
|
* Request error
|
|
850
820
|
*/
|
|
@@ -861,10 +831,6 @@ type GenerateProjectContextErrors = {
|
|
|
861
831
|
* Request error
|
|
862
832
|
*/
|
|
863
833
|
404: ErrorResponse;
|
|
864
|
-
/**
|
|
865
|
-
* Request error
|
|
866
|
-
*/
|
|
867
|
-
413: ErrorResponse;
|
|
868
834
|
/**
|
|
869
835
|
* Request error
|
|
870
836
|
*/
|
|
@@ -874,38 +840,55 @@ type GenerateProjectContextErrors = {
|
|
|
874
840
|
*/
|
|
875
841
|
500: ErrorResponse;
|
|
876
842
|
};
|
|
877
|
-
type
|
|
878
|
-
type
|
|
843
|
+
type GetTranslationStatusError = GetTranslationStatusErrors[keyof GetTranslationStatusErrors];
|
|
844
|
+
type GetTranslationStatusResponses = {
|
|
879
845
|
/**
|
|
880
|
-
*
|
|
846
|
+
* Translation status
|
|
881
847
|
*/
|
|
882
848
|
200: {
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
849
|
+
translations: Array<{
|
|
850
|
+
locale: string;
|
|
851
|
+
completedAt: string | null;
|
|
852
|
+
approvedAt: string | null;
|
|
853
|
+
publishedAt: string | null;
|
|
854
|
+
createdAt: string | null;
|
|
855
|
+
updatedAt: string | null;
|
|
856
|
+
}>;
|
|
857
|
+
sourceFile: {
|
|
858
|
+
id: string;
|
|
859
|
+
branchId: string;
|
|
860
|
+
fileId: string;
|
|
861
|
+
versionId: string;
|
|
862
|
+
fileName: string;
|
|
863
|
+
sourceLocale: string;
|
|
864
|
+
fileFormat: FileFormat;
|
|
865
|
+
dataFormat: string | null;
|
|
866
|
+
createdAt: string;
|
|
867
|
+
updatedAt: string;
|
|
868
|
+
locales: Array<string>;
|
|
869
|
+
};
|
|
887
870
|
};
|
|
888
871
|
};
|
|
889
|
-
type
|
|
890
|
-
type
|
|
891
|
-
body
|
|
872
|
+
type GetTranslationStatusResponse = GetTranslationStatusResponses[keyof GetTranslationStatusResponses];
|
|
873
|
+
type GetBranchInfoData = {
|
|
874
|
+
body: {
|
|
875
|
+
branchNames?: Array<string>;
|
|
876
|
+
};
|
|
892
877
|
headers?: {
|
|
893
878
|
/**
|
|
894
879
|
* API contract version. Defaults to the oldest supported version.
|
|
895
880
|
*/
|
|
896
881
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
897
882
|
/**
|
|
898
|
-
* Target project ID
|
|
883
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
899
884
|
*/
|
|
900
885
|
'gt-project-id'?: string;
|
|
901
886
|
};
|
|
902
|
-
path
|
|
903
|
-
jobId: string;
|
|
904
|
-
};
|
|
887
|
+
path?: never;
|
|
905
888
|
query?: never;
|
|
906
|
-
url: '/v2/project/
|
|
889
|
+
url: '/v2/project/branches/info';
|
|
907
890
|
};
|
|
908
|
-
type
|
|
891
|
+
type GetBranchInfoErrors = {
|
|
909
892
|
/**
|
|
910
893
|
* Request error
|
|
911
894
|
*/
|
|
@@ -921,7 +904,7 @@ type GetProjectContextGenerationStatusErrors = {
|
|
|
921
904
|
/**
|
|
922
905
|
* Request error
|
|
923
906
|
*/
|
|
924
|
-
|
|
907
|
+
413: ErrorResponse;
|
|
925
908
|
/**
|
|
926
909
|
* Request error
|
|
927
910
|
*/
|
|
@@ -931,33 +914,23 @@ type GetProjectContextGenerationStatusErrors = {
|
|
|
931
914
|
*/
|
|
932
915
|
500: ErrorResponse;
|
|
933
916
|
};
|
|
934
|
-
type
|
|
935
|
-
type
|
|
917
|
+
type GetBranchInfoError = GetBranchInfoErrors[keyof GetBranchInfoErrors];
|
|
918
|
+
type GetBranchInfoResponses = {
|
|
936
919
|
/**
|
|
937
|
-
*
|
|
920
|
+
* Branch information
|
|
938
921
|
*/
|
|
939
922
|
200: {
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
923
|
+
branches: Array<Branch>;
|
|
924
|
+
defaultBranch: Branch & ({
|
|
925
|
+
[key: string]: unknown;
|
|
926
|
+
} | null);
|
|
944
927
|
};
|
|
945
928
|
};
|
|
946
|
-
type
|
|
947
|
-
type
|
|
929
|
+
type GetBranchInfoResponse = GetBranchInfoResponses[keyof GetBranchInfoResponses];
|
|
930
|
+
type CreateBranchData = {
|
|
948
931
|
body: {
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
fileId: string;
|
|
952
|
-
versionId: string;
|
|
953
|
-
fileName?: string;
|
|
954
|
-
transformFormat?: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'DOT_STRINGS' | 'DOT_STRINGSDICT' | 'ANDROID_STRINGS' | 'XCSTRINGS';
|
|
955
|
-
}>;
|
|
956
|
-
targetLocales?: Array<string>;
|
|
957
|
-
sourceLocale?: string;
|
|
958
|
-
force?: boolean;
|
|
959
|
-
modelProvider?: ModelProvider;
|
|
960
|
-
publish?: boolean;
|
|
932
|
+
branchName: string;
|
|
933
|
+
defaultBranch?: boolean;
|
|
961
934
|
};
|
|
962
935
|
headers?: {
|
|
963
936
|
/**
|
|
@@ -965,34 +938,23 @@ type EnqueueFileTranslationsData = {
|
|
|
965
938
|
*/
|
|
966
939
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
967
940
|
/**
|
|
968
|
-
* Target project ID
|
|
941
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
969
942
|
*/
|
|
970
943
|
'gt-project-id'?: string;
|
|
971
944
|
};
|
|
972
945
|
path?: never;
|
|
973
946
|
query?: never;
|
|
974
|
-
url: '/v2/project/
|
|
947
|
+
url: '/v2/project/branches/create';
|
|
975
948
|
};
|
|
976
|
-
type
|
|
977
|
-
/**
|
|
978
|
-
* Invalid request or missing source files
|
|
979
|
-
*/
|
|
980
|
-
400: ErrorResponse | {
|
|
981
|
-
error: string;
|
|
982
|
-
missing: Array<{
|
|
983
|
-
fileId: string;
|
|
984
|
-
versionId: string;
|
|
985
|
-
}>;
|
|
986
|
-
count: number;
|
|
987
|
-
};
|
|
949
|
+
type CreateBranchErrors = {
|
|
988
950
|
/**
|
|
989
951
|
* Request error
|
|
990
952
|
*/
|
|
991
|
-
|
|
953
|
+
400: ErrorResponse;
|
|
992
954
|
/**
|
|
993
955
|
* Request error
|
|
994
956
|
*/
|
|
995
|
-
|
|
957
|
+
401: ErrorResponse;
|
|
996
958
|
/**
|
|
997
959
|
* Request error
|
|
998
960
|
*/
|
|
@@ -1000,7 +962,7 @@ type EnqueueFileTranslationsErrors = {
|
|
|
1000
962
|
/**
|
|
1001
963
|
* Request error
|
|
1002
964
|
*/
|
|
1003
|
-
|
|
965
|
+
409: ErrorResponse;
|
|
1004
966
|
/**
|
|
1005
967
|
* Request error
|
|
1006
968
|
*/
|
|
@@ -1014,65 +976,25 @@ type EnqueueFileTranslationsErrors = {
|
|
|
1014
976
|
*/
|
|
1015
977
|
500: ErrorResponse;
|
|
1016
978
|
};
|
|
1017
|
-
type
|
|
1018
|
-
type
|
|
979
|
+
type CreateBranchError = CreateBranchErrors[keyof CreateBranchErrors];
|
|
980
|
+
type CreateBranchResponses = {
|
|
1019
981
|
/**
|
|
1020
|
-
*
|
|
982
|
+
* Created or existing branch
|
|
1021
983
|
*/
|
|
1022
984
|
200: {
|
|
1023
|
-
|
|
1024
|
-
[key: string]: {
|
|
1025
|
-
kind?: 'file_translation';
|
|
1026
|
-
sourceFileId: string;
|
|
1027
|
-
fileId: string;
|
|
1028
|
-
versionId: string;
|
|
1029
|
-
branchId: string;
|
|
1030
|
-
targetLocale: string;
|
|
1031
|
-
projectId: string;
|
|
1032
|
-
force: boolean;
|
|
1033
|
-
outputFileFormat?: FileFormat;
|
|
1034
|
-
modelProvider?: ModelProvider;
|
|
1035
|
-
glossaryRetranslate?: boolean;
|
|
1036
|
-
changedGlossaryTerms?: Array<string>;
|
|
1037
|
-
onComplete?: {
|
|
1038
|
-
kind: 'google_drive_apply';
|
|
1039
|
-
userId?: string;
|
|
1040
|
-
};
|
|
1041
|
-
};
|
|
1042
|
-
};
|
|
1043
|
-
locales: Array<string>;
|
|
1044
|
-
message: string;
|
|
1045
|
-
} | {
|
|
1046
|
-
translations: Array<{
|
|
1047
|
-
locale: string;
|
|
1048
|
-
metadata?: unknown;
|
|
1049
|
-
fileId: string;
|
|
1050
|
-
fileName: string;
|
|
1051
|
-
versionId: string;
|
|
1052
|
-
branchId: string;
|
|
1053
|
-
id: string;
|
|
1054
|
-
isReady: boolean;
|
|
1055
|
-
downloadUrl: string;
|
|
1056
|
-
}>;
|
|
1057
|
-
data: {
|
|
1058
|
-
[key: string]: {
|
|
1059
|
-
fileName: string;
|
|
1060
|
-
versionId: string;
|
|
1061
|
-
};
|
|
1062
|
-
};
|
|
1063
|
-
locales: Array<string>;
|
|
1064
|
-
message: string;
|
|
985
|
+
branch: Branch;
|
|
1065
986
|
};
|
|
1066
987
|
};
|
|
1067
|
-
type
|
|
1068
|
-
type
|
|
988
|
+
type CreateBranchResponse = CreateBranchResponses[keyof CreateBranchResponses];
|
|
989
|
+
type CreateTagData = {
|
|
1069
990
|
body: {
|
|
991
|
+
tagId: string;
|
|
1070
992
|
files: Array<{
|
|
1071
993
|
fileId: string;
|
|
1072
994
|
versionId: string;
|
|
1073
|
-
branchId
|
|
1074
|
-
publish: boolean;
|
|
995
|
+
branchId: string;
|
|
1075
996
|
}>;
|
|
997
|
+
message?: string;
|
|
1076
998
|
};
|
|
1077
999
|
headers?: {
|
|
1078
1000
|
/**
|
|
@@ -1080,15 +1002,15 @@ type PublishFilesData = {
|
|
|
1080
1002
|
*/
|
|
1081
1003
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1082
1004
|
/**
|
|
1083
|
-
* Target project ID
|
|
1005
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
1084
1006
|
*/
|
|
1085
1007
|
'gt-project-id'?: string;
|
|
1086
1008
|
};
|
|
1087
1009
|
path?: never;
|
|
1088
1010
|
query?: never;
|
|
1089
|
-
url: '/v2/project/
|
|
1011
|
+
url: '/v2/project/tags/create';
|
|
1090
1012
|
};
|
|
1091
|
-
type
|
|
1013
|
+
type CreateTagErrors = {
|
|
1092
1014
|
/**
|
|
1093
1015
|
* Request error
|
|
1094
1016
|
*/
|
|
@@ -1101,10 +1023,6 @@ type PublishFilesErrors = {
|
|
|
1101
1023
|
* Request error
|
|
1102
1024
|
*/
|
|
1103
1025
|
403: ErrorResponse;
|
|
1104
|
-
/**
|
|
1105
|
-
* Request error
|
|
1106
|
-
*/
|
|
1107
|
-
404: ErrorResponse;
|
|
1108
1026
|
/**
|
|
1109
1027
|
* Request error
|
|
1110
1028
|
*/
|
|
@@ -1118,46 +1036,47 @@ type PublishFilesErrors = {
|
|
|
1118
1036
|
*/
|
|
1119
1037
|
500: ErrorResponse;
|
|
1120
1038
|
};
|
|
1121
|
-
type
|
|
1122
|
-
type
|
|
1039
|
+
type CreateTagError = CreateTagErrors[keyof CreateTagErrors];
|
|
1040
|
+
type CreateTagResponses = {
|
|
1123
1041
|
/**
|
|
1124
|
-
*
|
|
1042
|
+
* Created or updated file tag
|
|
1125
1043
|
*/
|
|
1126
1044
|
200: {
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
}>;
|
|
1045
|
+
tag: {
|
|
1046
|
+
id: string;
|
|
1047
|
+
tagId: string;
|
|
1048
|
+
message: string | null;
|
|
1049
|
+
createdAt: string;
|
|
1050
|
+
updatedAt: string;
|
|
1051
|
+
};
|
|
1135
1052
|
};
|
|
1136
1053
|
};
|
|
1137
|
-
type
|
|
1138
|
-
type
|
|
1139
|
-
body
|
|
1054
|
+
type CreateTagResponse = CreateTagResponses[keyof CreateTagResponses];
|
|
1055
|
+
type UploadAssetsData = {
|
|
1056
|
+
body: {
|
|
1057
|
+
assets: Array<{
|
|
1058
|
+
assetType: 'FONT';
|
|
1059
|
+
content: string;
|
|
1060
|
+
fileName: string;
|
|
1061
|
+
family?: string;
|
|
1062
|
+
style?: string;
|
|
1063
|
+
}>;
|
|
1064
|
+
};
|
|
1140
1065
|
headers?: {
|
|
1141
1066
|
/**
|
|
1142
1067
|
* API contract version. Defaults to the oldest supported version.
|
|
1143
1068
|
*/
|
|
1144
1069
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1145
1070
|
/**
|
|
1146
|
-
* Target project ID
|
|
1071
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
1147
1072
|
*/
|
|
1148
1073
|
'gt-project-id'?: string;
|
|
1149
1074
|
};
|
|
1150
|
-
path
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
query?: {
|
|
1154
|
-
branchId?: string;
|
|
1155
|
-
versionId?: string;
|
|
1156
|
-
locale?: string;
|
|
1157
|
-
};
|
|
1158
|
-
url: '/v2/project/files/download/{fileId}';
|
|
1075
|
+
path?: never;
|
|
1076
|
+
query?: never;
|
|
1077
|
+
url: '/v2/project/assets';
|
|
1159
1078
|
};
|
|
1160
|
-
type
|
|
1079
|
+
type UploadAssetsErrors = {
|
|
1161
1080
|
/**
|
|
1162
1081
|
* Request error
|
|
1163
1082
|
*/
|
|
@@ -1175,12 +1094,9 @@ type DownloadFileErrors = {
|
|
|
1175
1094
|
*/
|
|
1176
1095
|
404: ErrorResponse;
|
|
1177
1096
|
/**
|
|
1178
|
-
*
|
|
1097
|
+
* Request error
|
|
1179
1098
|
*/
|
|
1180
|
-
|
|
1181
|
-
status: 'processing';
|
|
1182
|
-
message: string;
|
|
1183
|
-
};
|
|
1099
|
+
413: ErrorResponse;
|
|
1184
1100
|
/**
|
|
1185
1101
|
* Request error
|
|
1186
1102
|
*/
|
|
@@ -1190,39 +1106,48 @@ type DownloadFileErrors = {
|
|
|
1190
1106
|
*/
|
|
1191
1107
|
500: ErrorResponse;
|
|
1192
1108
|
};
|
|
1193
|
-
type
|
|
1194
|
-
type
|
|
1109
|
+
type UploadAssetsError = UploadAssetsErrors[keyof UploadAssetsErrors];
|
|
1110
|
+
type UploadAssetsResponses = {
|
|
1195
1111
|
/**
|
|
1196
|
-
*
|
|
1112
|
+
* Uploaded assets
|
|
1197
1113
|
*/
|
|
1198
|
-
|
|
1199
|
-
|
|
1114
|
+
201: {
|
|
1115
|
+
assets: Array<{
|
|
1116
|
+
id: string;
|
|
1117
|
+
assetKey: string;
|
|
1118
|
+
fileName: string;
|
|
1119
|
+
}>;
|
|
1120
|
+
count: number;
|
|
1200
1121
|
};
|
|
1201
1122
|
};
|
|
1202
|
-
type
|
|
1203
|
-
type
|
|
1204
|
-
body:
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1123
|
+
type UploadAssetsResponse = UploadAssetsResponses[keyof UploadAssetsResponses];
|
|
1124
|
+
type SubmitUserEditDiffsData = {
|
|
1125
|
+
body: {
|
|
1126
|
+
projectId?: string;
|
|
1127
|
+
diffs: Array<{
|
|
1128
|
+
locale: string;
|
|
1129
|
+
diff: string;
|
|
1130
|
+
branchId?: string;
|
|
1131
|
+
versionId: string;
|
|
1132
|
+
fileId: string;
|
|
1133
|
+
localContent: string;
|
|
1134
|
+
}>;
|
|
1135
|
+
};
|
|
1211
1136
|
headers?: {
|
|
1212
1137
|
/**
|
|
1213
1138
|
* API contract version. Defaults to the oldest supported version.
|
|
1214
1139
|
*/
|
|
1215
1140
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1216
1141
|
/**
|
|
1217
|
-
* Target project ID
|
|
1142
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
1218
1143
|
*/
|
|
1219
1144
|
'gt-project-id'?: string;
|
|
1220
1145
|
};
|
|
1221
1146
|
path?: never;
|
|
1222
1147
|
query?: never;
|
|
1223
|
-
url: '/v2/project/files/
|
|
1148
|
+
url: '/v2/project/files/diffs';
|
|
1224
1149
|
};
|
|
1225
|
-
type
|
|
1150
|
+
type SubmitUserEditDiffsErrors = {
|
|
1226
1151
|
/**
|
|
1227
1152
|
* Request error
|
|
1228
1153
|
*/
|
|
@@ -1248,36 +1173,26 @@ type DownloadFilesErrors = {
|
|
|
1248
1173
|
*/
|
|
1249
1174
|
500: ErrorResponse;
|
|
1250
1175
|
};
|
|
1251
|
-
type
|
|
1252
|
-
type
|
|
1176
|
+
type SubmitUserEditDiffsError = SubmitUserEditDiffsErrors[keyof SubmitUserEditDiffsErrors];
|
|
1177
|
+
type SubmitUserEditDiffsResponses = {
|
|
1253
1178
|
/**
|
|
1254
|
-
*
|
|
1179
|
+
* Processed user translation edits
|
|
1255
1180
|
*/
|
|
1256
1181
|
200: {
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
fileId: string;
|
|
1261
|
-
versionId: string;
|
|
1262
|
-
locale?: string;
|
|
1263
|
-
fileName?: string;
|
|
1264
|
-
data: string;
|
|
1265
|
-
metadata: JsonObject;
|
|
1266
|
-
fileFormat: FileFormat;
|
|
1267
|
-
}>;
|
|
1268
|
-
count: number;
|
|
1269
|
-
pending?: Array<{
|
|
1270
|
-
branchId: string;
|
|
1271
|
-
fileId: string;
|
|
1272
|
-
locale: string;
|
|
1273
|
-
versionId: string;
|
|
1274
|
-
}>;
|
|
1182
|
+
filesProcessed: number;
|
|
1183
|
+
entriesReceived: number;
|
|
1184
|
+
message: string;
|
|
1275
1185
|
};
|
|
1276
1186
|
};
|
|
1277
|
-
type
|
|
1278
|
-
type
|
|
1187
|
+
type SubmitUserEditDiffsResponse = SubmitUserEditDiffsResponses[keyof SubmitUserEditDiffsResponses];
|
|
1188
|
+
type ProcessFileMovesData = {
|
|
1279
1189
|
body: {
|
|
1280
|
-
|
|
1190
|
+
branchId?: string;
|
|
1191
|
+
moves: Array<{
|
|
1192
|
+
oldFileId: string;
|
|
1193
|
+
newFileId: string;
|
|
1194
|
+
newFileName: string;
|
|
1195
|
+
}>;
|
|
1281
1196
|
};
|
|
1282
1197
|
headers?: {
|
|
1283
1198
|
/**
|
|
@@ -1285,15 +1200,15 @@ type GetBranchInfoData = {
|
|
|
1285
1200
|
*/
|
|
1286
1201
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1287
1202
|
/**
|
|
1288
|
-
* Target project ID
|
|
1203
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
1289
1204
|
*/
|
|
1290
1205
|
'gt-project-id'?: string;
|
|
1291
1206
|
};
|
|
1292
1207
|
path?: never;
|
|
1293
1208
|
query?: never;
|
|
1294
|
-
url: '/v2/project/
|
|
1209
|
+
url: '/v2/project/files/moves';
|
|
1295
1210
|
};
|
|
1296
|
-
type
|
|
1211
|
+
type ProcessFileMovesErrors = {
|
|
1297
1212
|
/**
|
|
1298
1213
|
* Request error
|
|
1299
1214
|
*/
|
|
@@ -1306,6 +1221,10 @@ type GetBranchInfoErrors = {
|
|
|
1306
1221
|
* Request error
|
|
1307
1222
|
*/
|
|
1308
1223
|
403: ErrorResponse;
|
|
1224
|
+
/**
|
|
1225
|
+
* Request error
|
|
1226
|
+
*/
|
|
1227
|
+
404: ErrorResponse;
|
|
1309
1228
|
/**
|
|
1310
1229
|
* Request error
|
|
1311
1230
|
*/
|
|
@@ -1319,23 +1238,32 @@ type GetBranchInfoErrors = {
|
|
|
1319
1238
|
*/
|
|
1320
1239
|
500: ErrorResponse;
|
|
1321
1240
|
};
|
|
1322
|
-
type
|
|
1323
|
-
type
|
|
1241
|
+
type ProcessFileMovesError = ProcessFileMovesErrors[keyof ProcessFileMovesErrors];
|
|
1242
|
+
type ProcessFileMovesResponses = {
|
|
1324
1243
|
/**
|
|
1325
|
-
*
|
|
1244
|
+
* File move results
|
|
1326
1245
|
*/
|
|
1327
1246
|
200: {
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1247
|
+
results: Array<{
|
|
1248
|
+
oldFileId: string;
|
|
1249
|
+
newFileId: string;
|
|
1250
|
+
success: boolean;
|
|
1251
|
+
newSourceFileId?: string;
|
|
1252
|
+
clonedTranslationsCount?: number;
|
|
1253
|
+
error?: string;
|
|
1254
|
+
}>;
|
|
1255
|
+
summary?: {
|
|
1256
|
+
total: number;
|
|
1257
|
+
succeeded: number;
|
|
1258
|
+
failed: number;
|
|
1259
|
+
};
|
|
1332
1260
|
};
|
|
1333
1261
|
};
|
|
1334
|
-
type
|
|
1335
|
-
type
|
|
1262
|
+
type ProcessFileMovesResponse = ProcessFileMovesResponses[keyof ProcessFileMovesResponses];
|
|
1263
|
+
type GetOrphanedFilesData = {
|
|
1336
1264
|
body: {
|
|
1337
|
-
|
|
1338
|
-
|
|
1265
|
+
branchId: string;
|
|
1266
|
+
fileIds?: Array<string>;
|
|
1339
1267
|
};
|
|
1340
1268
|
headers?: {
|
|
1341
1269
|
/**
|
|
@@ -1343,15 +1271,15 @@ type CreateBranchData = {
|
|
|
1343
1271
|
*/
|
|
1344
1272
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1345
1273
|
/**
|
|
1346
|
-
* Target project ID
|
|
1274
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
1347
1275
|
*/
|
|
1348
1276
|
'gt-project-id'?: string;
|
|
1349
1277
|
};
|
|
1350
1278
|
path?: never;
|
|
1351
1279
|
query?: never;
|
|
1352
|
-
url: '/v2/project/
|
|
1280
|
+
url: '/v2/project/files/orphaned';
|
|
1353
1281
|
};
|
|
1354
|
-
type
|
|
1282
|
+
type GetOrphanedFilesErrors = {
|
|
1355
1283
|
/**
|
|
1356
1284
|
* Request error
|
|
1357
1285
|
*/
|
|
@@ -1367,7 +1295,7 @@ type CreateBranchErrors = {
|
|
|
1367
1295
|
/**
|
|
1368
1296
|
* Request error
|
|
1369
1297
|
*/
|
|
1370
|
-
|
|
1298
|
+
404: ErrorResponse;
|
|
1371
1299
|
/**
|
|
1372
1300
|
* Request error
|
|
1373
1301
|
*/
|
|
@@ -1381,25 +1309,33 @@ type CreateBranchErrors = {
|
|
|
1381
1309
|
*/
|
|
1382
1310
|
500: ErrorResponse;
|
|
1383
1311
|
};
|
|
1384
|
-
type
|
|
1385
|
-
type
|
|
1312
|
+
type GetOrphanedFilesError = GetOrphanedFilesErrors[keyof GetOrphanedFilesErrors];
|
|
1313
|
+
type GetOrphanedFilesResponses = {
|
|
1386
1314
|
/**
|
|
1387
|
-
*
|
|
1315
|
+
* Files present on the branch but absent from the request
|
|
1388
1316
|
*/
|
|
1389
1317
|
200: {
|
|
1390
|
-
|
|
1318
|
+
orphanedFiles: Array<{
|
|
1319
|
+
fileId: string;
|
|
1320
|
+
versionId: string;
|
|
1321
|
+
fileName: string;
|
|
1322
|
+
}>;
|
|
1391
1323
|
};
|
|
1392
1324
|
};
|
|
1393
|
-
type
|
|
1394
|
-
type
|
|
1325
|
+
type GetOrphanedFilesResponse = GetOrphanedFilesResponses[keyof GetOrphanedFilesResponses];
|
|
1326
|
+
type GetFileInfoData = {
|
|
1395
1327
|
body: {
|
|
1396
|
-
|
|
1397
|
-
files: Array<{
|
|
1328
|
+
sourceFiles?: Array<{
|
|
1398
1329
|
fileId: string;
|
|
1399
1330
|
versionId: string;
|
|
1400
1331
|
branchId: string;
|
|
1401
1332
|
}>;
|
|
1402
|
-
|
|
1333
|
+
translatedFiles?: Array<{
|
|
1334
|
+
fileId: string;
|
|
1335
|
+
versionId: string;
|
|
1336
|
+
branchId: string;
|
|
1337
|
+
locale: string;
|
|
1338
|
+
}>;
|
|
1403
1339
|
};
|
|
1404
1340
|
headers?: {
|
|
1405
1341
|
/**
|
|
@@ -1407,15 +1343,15 @@ type CreateTagData = {
|
|
|
1407
1343
|
*/
|
|
1408
1344
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1409
1345
|
/**
|
|
1410
|
-
* Target project ID
|
|
1346
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
1411
1347
|
*/
|
|
1412
1348
|
'gt-project-id'?: string;
|
|
1413
1349
|
};
|
|
1414
1350
|
path?: never;
|
|
1415
1351
|
query?: never;
|
|
1416
|
-
url: '/v2/project/
|
|
1352
|
+
url: '/v2/project/files/info';
|
|
1417
1353
|
};
|
|
1418
|
-
type
|
|
1354
|
+
type GetFileInfoErrors = {
|
|
1419
1355
|
/**
|
|
1420
1356
|
* Request error
|
|
1421
1357
|
*/
|
|
@@ -1441,41 +1377,64 @@ type CreateTagErrors = {
|
|
|
1441
1377
|
*/
|
|
1442
1378
|
500: ErrorResponse;
|
|
1443
1379
|
};
|
|
1444
|
-
type
|
|
1445
|
-
type
|
|
1380
|
+
type GetFileInfoError = GetFileInfoErrors[keyof GetFileInfoErrors];
|
|
1381
|
+
type GetFileInfoResponses = {
|
|
1446
1382
|
/**
|
|
1447
|
-
*
|
|
1383
|
+
* File information
|
|
1448
1384
|
*/
|
|
1449
1385
|
200: {
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1386
|
+
sourceFiles: Array<{
|
|
1387
|
+
branchId: string;
|
|
1388
|
+
fileId: string;
|
|
1389
|
+
versionId: string;
|
|
1390
|
+
fileName: string;
|
|
1391
|
+
fileFormat: FileFormat;
|
|
1392
|
+
dataFormat: string | null;
|
|
1454
1393
|
createdAt: string;
|
|
1455
1394
|
updatedAt: string;
|
|
1456
|
-
|
|
1395
|
+
publishedAt: string | null;
|
|
1396
|
+
locales: Array<string>;
|
|
1397
|
+
sourceLocale: string;
|
|
1398
|
+
}>;
|
|
1399
|
+
translatedFiles: Array<{
|
|
1400
|
+
branchId: string;
|
|
1401
|
+
fileId: string;
|
|
1402
|
+
versionId: string;
|
|
1403
|
+
fileFormat: FileFormat;
|
|
1404
|
+
dataFormat: string | null;
|
|
1405
|
+
createdAt: string;
|
|
1406
|
+
updatedAt: string;
|
|
1407
|
+
approvedAt: string | null;
|
|
1408
|
+
publishedAt: string | null;
|
|
1409
|
+
completedAt: string | null;
|
|
1410
|
+
locale: string;
|
|
1411
|
+
}>;
|
|
1457
1412
|
};
|
|
1458
1413
|
};
|
|
1459
|
-
type
|
|
1460
|
-
type
|
|
1461
|
-
body
|
|
1414
|
+
type GetFileInfoResponse = GetFileInfoResponses[keyof GetFileInfoResponses];
|
|
1415
|
+
type DownloadFilesData = {
|
|
1416
|
+
body: Array<{
|
|
1417
|
+
fileId: string;
|
|
1418
|
+
branchId?: string;
|
|
1419
|
+
versionId?: string;
|
|
1420
|
+
locale?: string;
|
|
1421
|
+
useLatestAvailableVersion?: boolean;
|
|
1422
|
+
}>;
|
|
1462
1423
|
headers?: {
|
|
1463
1424
|
/**
|
|
1464
1425
|
* API contract version. Defaults to the oldest supported version.
|
|
1465
1426
|
*/
|
|
1466
1427
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1467
1428
|
/**
|
|
1468
|
-
* Target project ID
|
|
1469
|
-
*/
|
|
1470
|
-
'gt-project-id'?: string;
|
|
1471
|
-
};
|
|
1472
|
-
path: {
|
|
1473
|
-
projectId: string;
|
|
1429
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
1430
|
+
*/
|
|
1431
|
+
'gt-project-id'?: string;
|
|
1474
1432
|
};
|
|
1433
|
+
path?: never;
|
|
1475
1434
|
query?: never;
|
|
1476
|
-
url: '/v2/project/
|
|
1435
|
+
url: '/v2/project/files/download';
|
|
1477
1436
|
};
|
|
1478
|
-
type
|
|
1437
|
+
type DownloadFilesErrors = {
|
|
1479
1438
|
/**
|
|
1480
1439
|
* Request error
|
|
1481
1440
|
*/
|
|
@@ -1491,7 +1450,7 @@ type GetProjectInfoErrors = {
|
|
|
1491
1450
|
/**
|
|
1492
1451
|
* Request error
|
|
1493
1452
|
*/
|
|
1494
|
-
|
|
1453
|
+
413: ErrorResponse;
|
|
1495
1454
|
/**
|
|
1496
1455
|
* Request error
|
|
1497
1456
|
*/
|
|
@@ -1501,43 +1460,56 @@ type GetProjectInfoErrors = {
|
|
|
1501
1460
|
*/
|
|
1502
1461
|
500: ErrorResponse;
|
|
1503
1462
|
};
|
|
1504
|
-
type
|
|
1505
|
-
type
|
|
1463
|
+
type DownloadFilesError = DownloadFilesErrors[keyof DownloadFilesErrors];
|
|
1464
|
+
type DownloadFilesResponses = {
|
|
1506
1465
|
/**
|
|
1507
|
-
*
|
|
1466
|
+
* Downloaded files
|
|
1508
1467
|
*/
|
|
1509
1468
|
200: {
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1469
|
+
files: Array<{
|
|
1470
|
+
id: string;
|
|
1471
|
+
branchId: string;
|
|
1472
|
+
fileId: string;
|
|
1473
|
+
versionId: string;
|
|
1474
|
+
locale?: string;
|
|
1475
|
+
fileName?: string;
|
|
1476
|
+
data: string;
|
|
1477
|
+
metadata: JsonObject;
|
|
1478
|
+
fileFormat: FileFormat;
|
|
1479
|
+
}>;
|
|
1480
|
+
count: number;
|
|
1481
|
+
pending?: Array<{
|
|
1482
|
+
branchId: string;
|
|
1483
|
+
fileId: string;
|
|
1484
|
+
locale: string;
|
|
1485
|
+
versionId: string;
|
|
1486
|
+
}>;
|
|
1516
1487
|
};
|
|
1517
1488
|
};
|
|
1518
|
-
type
|
|
1519
|
-
type
|
|
1520
|
-
body
|
|
1521
|
-
defaultLocale?: string;
|
|
1522
|
-
cdnEnabled?: boolean;
|
|
1523
|
-
};
|
|
1489
|
+
type DownloadFilesResponse = DownloadFilesResponses[keyof DownloadFilesResponses];
|
|
1490
|
+
type DownloadFileData = {
|
|
1491
|
+
body?: never;
|
|
1524
1492
|
headers?: {
|
|
1525
1493
|
/**
|
|
1526
1494
|
* API contract version. Defaults to the oldest supported version.
|
|
1527
1495
|
*/
|
|
1528
1496
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1529
1497
|
/**
|
|
1530
|
-
* Target project ID
|
|
1498
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
1531
1499
|
*/
|
|
1532
1500
|
'gt-project-id'?: string;
|
|
1533
1501
|
};
|
|
1534
1502
|
path: {
|
|
1535
|
-
|
|
1503
|
+
fileId: string;
|
|
1536
1504
|
};
|
|
1537
|
-
query?:
|
|
1538
|
-
|
|
1505
|
+
query?: {
|
|
1506
|
+
branchId?: string;
|
|
1507
|
+
versionId?: string;
|
|
1508
|
+
locale?: string;
|
|
1509
|
+
};
|
|
1510
|
+
url: '/v2/project/files/download/{fileId}';
|
|
1539
1511
|
};
|
|
1540
|
-
type
|
|
1512
|
+
type DownloadFileErrors = {
|
|
1541
1513
|
/**
|
|
1542
1514
|
* Request error
|
|
1543
1515
|
*/
|
|
@@ -1555,9 +1527,12 @@ type UpdateProjectInfoErrors = {
|
|
|
1555
1527
|
*/
|
|
1556
1528
|
404: ErrorResponse;
|
|
1557
1529
|
/**
|
|
1558
|
-
*
|
|
1530
|
+
* Translation is still processing
|
|
1559
1531
|
*/
|
|
1560
|
-
|
|
1532
|
+
425: {
|
|
1533
|
+
status: 'processing';
|
|
1534
|
+
message: string;
|
|
1535
|
+
};
|
|
1561
1536
|
/**
|
|
1562
1537
|
* Request error
|
|
1563
1538
|
*/
|
|
@@ -1567,16 +1542,16 @@ type UpdateProjectInfoErrors = {
|
|
|
1567
1542
|
*/
|
|
1568
1543
|
500: ErrorResponse;
|
|
1569
1544
|
};
|
|
1570
|
-
type
|
|
1571
|
-
type
|
|
1545
|
+
type DownloadFileError = DownloadFileErrors[keyof DownloadFileErrors];
|
|
1546
|
+
type DownloadFileResponses = {
|
|
1572
1547
|
/**
|
|
1573
|
-
*
|
|
1548
|
+
* Downloaded file
|
|
1574
1549
|
*/
|
|
1575
1550
|
200: {
|
|
1576
|
-
|
|
1551
|
+
data: string;
|
|
1577
1552
|
};
|
|
1578
1553
|
};
|
|
1579
|
-
type
|
|
1554
|
+
type DownloadFileResponse = DownloadFileResponses[keyof DownloadFileResponses];
|
|
1580
1555
|
type GetTranslationJobInfoData = {
|
|
1581
1556
|
body: {
|
|
1582
1557
|
jobIds: Array<string>;
|
|
@@ -1587,7 +1562,7 @@ type GetTranslationJobInfoData = {
|
|
|
1587
1562
|
*/
|
|
1588
1563
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1589
1564
|
/**
|
|
1590
|
-
* Target project ID
|
|
1565
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
1591
1566
|
*/
|
|
1592
1567
|
'gt-project-id'?: string;
|
|
1593
1568
|
};
|
|
@@ -1651,23 +1626,31 @@ type GetTranslationJobInfoResponses = {
|
|
|
1651
1626
|
}>;
|
|
1652
1627
|
};
|
|
1653
1628
|
type GetTranslationJobInfoResponse = GetTranslationJobInfoResponses[keyof GetTranslationJobInfoResponses];
|
|
1654
|
-
type
|
|
1655
|
-
body:
|
|
1629
|
+
type GenerateProjectContextData = {
|
|
1630
|
+
body: {
|
|
1631
|
+
files: Array<{
|
|
1632
|
+
branchId?: string;
|
|
1633
|
+
fileId: string;
|
|
1634
|
+
versionId: string;
|
|
1635
|
+
}>;
|
|
1636
|
+
locales?: Array<string>;
|
|
1637
|
+
force?: boolean;
|
|
1638
|
+
};
|
|
1656
1639
|
headers?: {
|
|
1657
1640
|
/**
|
|
1658
1641
|
* API contract version. Defaults to the oldest supported version.
|
|
1659
1642
|
*/
|
|
1660
1643
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1661
1644
|
/**
|
|
1662
|
-
* Target project ID
|
|
1645
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
1663
1646
|
*/
|
|
1664
1647
|
'gt-project-id'?: string;
|
|
1665
1648
|
};
|
|
1666
1649
|
path?: never;
|
|
1667
1650
|
query?: never;
|
|
1668
|
-
url: '/v2/
|
|
1651
|
+
url: '/v2/project/setup/generate';
|
|
1669
1652
|
};
|
|
1670
|
-
type
|
|
1653
|
+
type GenerateProjectContextErrors = {
|
|
1671
1654
|
/**
|
|
1672
1655
|
* Request error
|
|
1673
1656
|
*/
|
|
@@ -1676,10 +1659,6 @@ type TranslateErrors = {
|
|
|
1676
1659
|
* Request error
|
|
1677
1660
|
*/
|
|
1678
1661
|
401: ErrorResponse;
|
|
1679
|
-
/**
|
|
1680
|
-
* Request error
|
|
1681
|
-
*/
|
|
1682
|
-
402: ErrorResponse;
|
|
1683
1662
|
/**
|
|
1684
1663
|
* Request error
|
|
1685
1664
|
*/
|
|
@@ -1701,30 +1680,26 @@ type TranslateErrors = {
|
|
|
1701
1680
|
*/
|
|
1702
1681
|
500: ErrorResponse;
|
|
1703
1682
|
};
|
|
1704
|
-
type
|
|
1705
|
-
type
|
|
1706
|
-
/**
|
|
1707
|
-
* All translations were served from cache
|
|
1708
|
-
*/
|
|
1709
|
-
200: RuntimeTranslationResponse;
|
|
1683
|
+
type GenerateProjectContextError = GenerateProjectContextErrors[keyof GenerateProjectContextErrors];
|
|
1684
|
+
type GenerateProjectContextResponses = {
|
|
1710
1685
|
/**
|
|
1711
|
-
*
|
|
1686
|
+
* Context generation status
|
|
1712
1687
|
*/
|
|
1713
|
-
|
|
1688
|
+
200: {
|
|
1689
|
+
status: 'completed';
|
|
1690
|
+
} | {
|
|
1691
|
+
setupJobId: string;
|
|
1692
|
+
status: 'queued';
|
|
1693
|
+
};
|
|
1714
1694
|
};
|
|
1715
|
-
type
|
|
1716
|
-
type
|
|
1695
|
+
type GenerateProjectContextResponse = GenerateProjectContextResponses[keyof GenerateProjectContextResponses];
|
|
1696
|
+
type PublishFilesData = {
|
|
1717
1697
|
body: {
|
|
1718
|
-
|
|
1719
|
-
fileId: string;
|
|
1720
|
-
versionId: string;
|
|
1721
|
-
branchId: string;
|
|
1722
|
-
}>;
|
|
1723
|
-
translatedFiles?: Array<{
|
|
1698
|
+
files: Array<{
|
|
1724
1699
|
fileId: string;
|
|
1725
1700
|
versionId: string;
|
|
1726
|
-
branchId
|
|
1727
|
-
|
|
1701
|
+
branchId?: string;
|
|
1702
|
+
publish: boolean;
|
|
1728
1703
|
}>;
|
|
1729
1704
|
};
|
|
1730
1705
|
headers?: {
|
|
@@ -1733,15 +1708,15 @@ type GetFileInfoData = {
|
|
|
1733
1708
|
*/
|
|
1734
1709
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1735
1710
|
/**
|
|
1736
|
-
* Target project ID
|
|
1711
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
1737
1712
|
*/
|
|
1738
1713
|
'gt-project-id'?: string;
|
|
1739
1714
|
};
|
|
1740
1715
|
path?: never;
|
|
1741
1716
|
query?: never;
|
|
1742
|
-
url: '/v2/project/files/
|
|
1717
|
+
url: '/v2/project/files/publish';
|
|
1743
1718
|
};
|
|
1744
|
-
type
|
|
1719
|
+
type PublishFilesErrors = {
|
|
1745
1720
|
/**
|
|
1746
1721
|
* Request error
|
|
1747
1722
|
*/
|
|
@@ -1757,89 +1732,11 @@ type GetFileInfoErrors = {
|
|
|
1757
1732
|
/**
|
|
1758
1733
|
* Request error
|
|
1759
1734
|
*/
|
|
1760
|
-
|
|
1761
|
-
/**
|
|
1762
|
-
* Request error
|
|
1763
|
-
*/
|
|
1764
|
-
429: ErrorResponse;
|
|
1765
|
-
/**
|
|
1766
|
-
* Request error
|
|
1767
|
-
*/
|
|
1768
|
-
500: ErrorResponse;
|
|
1769
|
-
};
|
|
1770
|
-
type GetFileInfoError = GetFileInfoErrors[keyof GetFileInfoErrors];
|
|
1771
|
-
type GetFileInfoResponses = {
|
|
1772
|
-
/**
|
|
1773
|
-
* File information
|
|
1774
|
-
*/
|
|
1775
|
-
200: {
|
|
1776
|
-
sourceFiles: Array<{
|
|
1777
|
-
branchId: string;
|
|
1778
|
-
fileId: string;
|
|
1779
|
-
versionId: string;
|
|
1780
|
-
fileName: string;
|
|
1781
|
-
fileFormat: FileFormat;
|
|
1782
|
-
dataFormat: string | null;
|
|
1783
|
-
createdAt: string;
|
|
1784
|
-
updatedAt: string;
|
|
1785
|
-
publishedAt: string | null;
|
|
1786
|
-
locales: Array<string>;
|
|
1787
|
-
sourceLocale: string;
|
|
1788
|
-
}>;
|
|
1789
|
-
translatedFiles: Array<{
|
|
1790
|
-
branchId: string;
|
|
1791
|
-
fileId: string;
|
|
1792
|
-
versionId: string;
|
|
1793
|
-
fileFormat: FileFormat;
|
|
1794
|
-
dataFormat: string | null;
|
|
1795
|
-
createdAt: string;
|
|
1796
|
-
updatedAt: string;
|
|
1797
|
-
approvedAt: string | null;
|
|
1798
|
-
publishedAt: string | null;
|
|
1799
|
-
completedAt: string | null;
|
|
1800
|
-
locale: string;
|
|
1801
|
-
}>;
|
|
1802
|
-
};
|
|
1803
|
-
};
|
|
1804
|
-
type GetFileInfoResponse = GetFileInfoResponses[keyof GetFileInfoResponses];
|
|
1805
|
-
type GetTranslationStatusData = {
|
|
1806
|
-
body?: never;
|
|
1807
|
-
headers?: {
|
|
1808
|
-
/**
|
|
1809
|
-
* API contract version. Defaults to the oldest supported version.
|
|
1810
|
-
*/
|
|
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;
|
|
1816
|
-
};
|
|
1817
|
-
path: {
|
|
1818
|
-
fileId: string;
|
|
1819
|
-
};
|
|
1820
|
-
query?: {
|
|
1821
|
-
versionId?: string;
|
|
1822
|
-
branchId?: string;
|
|
1823
|
-
};
|
|
1824
|
-
url: '/v2/project/translations/files/status/{fileId}';
|
|
1825
|
-
};
|
|
1826
|
-
type GetTranslationStatusErrors = {
|
|
1827
|
-
/**
|
|
1828
|
-
* Request error
|
|
1829
|
-
*/
|
|
1830
|
-
400: ErrorResponse;
|
|
1831
|
-
/**
|
|
1832
|
-
* Request error
|
|
1833
|
-
*/
|
|
1834
|
-
401: ErrorResponse;
|
|
1835
|
-
/**
|
|
1836
|
-
* Request error
|
|
1837
|
-
*/
|
|
1838
|
-
403: ErrorResponse;
|
|
1735
|
+
404: ErrorResponse;
|
|
1839
1736
|
/**
|
|
1840
1737
|
* Request error
|
|
1841
1738
|
*/
|
|
1842
|
-
|
|
1739
|
+
413: ErrorResponse;
|
|
1843
1740
|
/**
|
|
1844
1741
|
* Request error
|
|
1845
1742
|
*/
|
|
@@ -1849,44 +1746,43 @@ type GetTranslationStatusErrors = {
|
|
|
1849
1746
|
*/
|
|
1850
1747
|
500: ErrorResponse;
|
|
1851
1748
|
};
|
|
1852
|
-
type
|
|
1853
|
-
type
|
|
1749
|
+
type PublishFilesError = PublishFilesErrors[keyof PublishFilesErrors];
|
|
1750
|
+
type PublishFilesResponses = {
|
|
1854
1751
|
/**
|
|
1855
|
-
*
|
|
1752
|
+
* File publish results
|
|
1856
1753
|
*/
|
|
1857
1754
|
200: {
|
|
1858
|
-
|
|
1859
|
-
locale: string;
|
|
1860
|
-
completedAt: string | null;
|
|
1861
|
-
approvedAt: string | null;
|
|
1862
|
-
publishedAt: string | null;
|
|
1863
|
-
createdAt: string | null;
|
|
1864
|
-
updatedAt: string | null;
|
|
1865
|
-
}>;
|
|
1866
|
-
sourceFile: {
|
|
1867
|
-
id: string;
|
|
1868
|
-
branchId: string;
|
|
1755
|
+
results: Array<{
|
|
1869
1756
|
fileId: string;
|
|
1870
1757
|
versionId: string;
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
updatedAt: string;
|
|
1877
|
-
locales: Array<string>;
|
|
1878
|
-
};
|
|
1758
|
+
locale?: string;
|
|
1759
|
+
branchId: string;
|
|
1760
|
+
success: boolean;
|
|
1761
|
+
error?: string;
|
|
1762
|
+
}>;
|
|
1879
1763
|
};
|
|
1880
1764
|
};
|
|
1881
|
-
type
|
|
1882
|
-
type
|
|
1765
|
+
type PublishFilesResponse = PublishFilesResponses[keyof PublishFilesResponses];
|
|
1766
|
+
type UploadSourceFilesData = {
|
|
1883
1767
|
body: {
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1768
|
+
data: Array<{
|
|
1769
|
+
source: {
|
|
1770
|
+
content: string;
|
|
1771
|
+
fileName: string;
|
|
1772
|
+
fileFormat: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'XCSTRINGS' | 'DOT_STRINGS' | 'DOT_STRINGSDICT' | 'ANDROID_STRINGS';
|
|
1773
|
+
dataFormat?: string;
|
|
1774
|
+
locale: string;
|
|
1775
|
+
fileId?: string;
|
|
1776
|
+
versionId?: string;
|
|
1777
|
+
branchId?: string;
|
|
1778
|
+
checkedOutBranchId?: string;
|
|
1779
|
+
incomingBranchId?: string;
|
|
1780
|
+
formatMetadata?: {
|
|
1781
|
+
[key: string]: unknown;
|
|
1782
|
+
};
|
|
1783
|
+
};
|
|
1889
1784
|
}>;
|
|
1785
|
+
sourceLocale?: string;
|
|
1890
1786
|
};
|
|
1891
1787
|
headers?: {
|
|
1892
1788
|
/**
|
|
@@ -1894,15 +1790,15 @@ type ProcessFileMovesData = {
|
|
|
1894
1790
|
*/
|
|
1895
1791
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1896
1792
|
/**
|
|
1897
|
-
* Target project ID
|
|
1793
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
1898
1794
|
*/
|
|
1899
1795
|
'gt-project-id'?: string;
|
|
1900
1796
|
};
|
|
1901
1797
|
path?: never;
|
|
1902
1798
|
query?: never;
|
|
1903
|
-
url: '/v2/project/files/
|
|
1799
|
+
url: '/v2/project/files/upload-files';
|
|
1904
1800
|
};
|
|
1905
|
-
type
|
|
1801
|
+
type UploadSourceFilesErrors = {
|
|
1906
1802
|
/**
|
|
1907
1803
|
* Request error
|
|
1908
1804
|
*/
|
|
@@ -1931,33 +1827,45 @@ type ProcessFileMovesErrors = {
|
|
|
1931
1827
|
* Request error
|
|
1932
1828
|
*/
|
|
1933
1829
|
500: ErrorResponse;
|
|
1830
|
+
/**
|
|
1831
|
+
* Request error
|
|
1832
|
+
*/
|
|
1833
|
+
503: ErrorResponse;
|
|
1934
1834
|
};
|
|
1935
|
-
type
|
|
1936
|
-
type
|
|
1835
|
+
type UploadSourceFilesError = UploadSourceFilesErrors[keyof UploadSourceFilesErrors];
|
|
1836
|
+
type UploadSourceFilesResponses = {
|
|
1937
1837
|
/**
|
|
1938
|
-
*
|
|
1838
|
+
* Uploaded source files
|
|
1939
1839
|
*/
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1840
|
+
201: {
|
|
1841
|
+
uploadedFiles: Array<{
|
|
1842
|
+
branchId?: string;
|
|
1843
|
+
fileId: string;
|
|
1844
|
+
versionId: string;
|
|
1845
|
+
fileName: string;
|
|
1846
|
+
fileFormat: FileFormat;
|
|
1847
|
+
dataFormat?: string;
|
|
1848
|
+
locale?: string;
|
|
1948
1849
|
}>;
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
succeeded: number;
|
|
1952
|
-
failed: number;
|
|
1953
|
-
};
|
|
1850
|
+
count: number;
|
|
1851
|
+
message: string;
|
|
1954
1852
|
};
|
|
1955
1853
|
};
|
|
1956
|
-
type
|
|
1957
|
-
type
|
|
1854
|
+
type UploadSourceFilesResponse = UploadSourceFilesResponses[keyof UploadSourceFilesResponses];
|
|
1855
|
+
type EnqueueFileTranslationsData = {
|
|
1958
1856
|
body: {
|
|
1959
|
-
|
|
1960
|
-
|
|
1857
|
+
files: Array<{
|
|
1858
|
+
branchId?: string;
|
|
1859
|
+
fileId: string;
|
|
1860
|
+
versionId: string;
|
|
1861
|
+
fileName?: string;
|
|
1862
|
+
transformFormat?: 'GTJSON' | 'MDX' | 'JSON' | 'YAML' | 'MD' | 'TS' | 'JS' | 'HTML' | 'TXT' | 'PO' | 'POT' | 'TWILIO_CONTENT_JSON' | 'LOTTIE' | 'SVG' | 'XCSTRINGS' | 'DOT_STRINGS' | 'DOT_STRINGSDICT' | 'ANDROID_STRINGS';
|
|
1863
|
+
}>;
|
|
1864
|
+
targetLocales?: Array<string>;
|
|
1865
|
+
sourceLocale?: string;
|
|
1866
|
+
force?: boolean;
|
|
1867
|
+
modelProvider?: ModelProvider;
|
|
1868
|
+
publish?: boolean;
|
|
1961
1869
|
};
|
|
1962
1870
|
headers?: {
|
|
1963
1871
|
/**
|
|
@@ -1965,23 +1873,34 @@ type GetOrphanedFilesData = {
|
|
|
1965
1873
|
*/
|
|
1966
1874
|
'gt-api-version'?: '2025-01-01.v0' | '2025-11-03.v1' | '2026-02-18.v1' | '2026-03-06.v1';
|
|
1967
1875
|
/**
|
|
1968
|
-
* Target project ID
|
|
1876
|
+
* Target project ID when no project ID is present in the path. Project API keys default to their bound project. If supplied, the header must match both the path target and the key’s bound project.
|
|
1969
1877
|
*/
|
|
1970
1878
|
'gt-project-id'?: string;
|
|
1971
1879
|
};
|
|
1972
1880
|
path?: never;
|
|
1973
1881
|
query?: never;
|
|
1974
|
-
url: '/v2/project/
|
|
1882
|
+
url: '/v2/project/translations/enqueue';
|
|
1975
1883
|
};
|
|
1976
|
-
type
|
|
1884
|
+
type EnqueueFileTranslationsErrors = {
|
|
1977
1885
|
/**
|
|
1978
|
-
*
|
|
1886
|
+
* Invalid request or missing source files
|
|
1979
1887
|
*/
|
|
1980
|
-
400: ErrorResponse
|
|
1888
|
+
400: ErrorResponse | {
|
|
1889
|
+
error: string;
|
|
1890
|
+
missing: Array<{
|
|
1891
|
+
fileId: string;
|
|
1892
|
+
versionId: string;
|
|
1893
|
+
}>;
|
|
1894
|
+
count: number;
|
|
1895
|
+
};
|
|
1981
1896
|
/**
|
|
1982
1897
|
* Request error
|
|
1983
1898
|
*/
|
|
1984
1899
|
401: ErrorResponse;
|
|
1900
|
+
/**
|
|
1901
|
+
* Request error
|
|
1902
|
+
*/
|
|
1903
|
+
402: ErrorResponse;
|
|
1985
1904
|
/**
|
|
1986
1905
|
* Request error
|
|
1987
1906
|
*/
|
|
@@ -2003,20 +1922,58 @@ type GetOrphanedFilesErrors = {
|
|
|
2003
1922
|
*/
|
|
2004
1923
|
500: ErrorResponse;
|
|
2005
1924
|
};
|
|
2006
|
-
type
|
|
2007
|
-
type
|
|
1925
|
+
type EnqueueFileTranslationsError = EnqueueFileTranslationsErrors[keyof EnqueueFileTranslationsErrors];
|
|
1926
|
+
type EnqueueFileTranslationsResponses = {
|
|
2008
1927
|
/**
|
|
2009
|
-
*
|
|
1928
|
+
* Enqueued translations. Shape depends on gt-api-version (legacy before 2025-11-03.v1).
|
|
2010
1929
|
*/
|
|
2011
1930
|
200: {
|
|
2012
|
-
|
|
1931
|
+
jobData: {
|
|
1932
|
+
[key: string]: {
|
|
1933
|
+
kind?: 'file_translation';
|
|
1934
|
+
sourceFileId: string;
|
|
1935
|
+
fileId: string;
|
|
1936
|
+
versionId: string;
|
|
1937
|
+
branchId: string;
|
|
1938
|
+
targetLocale: string;
|
|
1939
|
+
projectId: string;
|
|
1940
|
+
orgId: string;
|
|
1941
|
+
force: boolean;
|
|
1942
|
+
outputFileFormat?: FileFormat;
|
|
1943
|
+
modelProvider?: ModelProvider;
|
|
1944
|
+
glossaryRetranslate?: boolean;
|
|
1945
|
+
changedGlossaryTerms?: Array<string>;
|
|
1946
|
+
onComplete?: {
|
|
1947
|
+
kind: 'google_drive_apply';
|
|
1948
|
+
userId?: string;
|
|
1949
|
+
};
|
|
1950
|
+
};
|
|
1951
|
+
};
|
|
1952
|
+
locales: Array<string>;
|
|
1953
|
+
message: string;
|
|
1954
|
+
} | {
|
|
1955
|
+
translations: Array<{
|
|
1956
|
+
locale: string;
|
|
1957
|
+
metadata?: unknown;
|
|
2013
1958
|
fileId: string;
|
|
2014
|
-
versionId: string;
|
|
2015
1959
|
fileName: string;
|
|
1960
|
+
versionId: string;
|
|
1961
|
+
branchId: string;
|
|
1962
|
+
id: string;
|
|
1963
|
+
isReady: boolean;
|
|
1964
|
+
downloadUrl: string;
|
|
2016
1965
|
}>;
|
|
1966
|
+
data: {
|
|
1967
|
+
[key: string]: {
|
|
1968
|
+
fileName: string;
|
|
1969
|
+
versionId: string;
|
|
1970
|
+
};
|
|
1971
|
+
};
|
|
1972
|
+
locales: Array<string>;
|
|
1973
|
+
message: string;
|
|
2017
1974
|
};
|
|
2018
1975
|
};
|
|
2019
|
-
type
|
|
1976
|
+
type EnqueueFileTranslationsResponse = EnqueueFileTranslationsResponses[keyof EnqueueFileTranslationsResponses];
|
|
2020
1977
|
type CreateCliWizardSessionData = {
|
|
2021
1978
|
body: CreateCliWizardSessionRequest;
|
|
2022
1979
|
headers?: {
|
|
@@ -2213,15 +2170,15 @@ type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean
|
|
|
2213
2170
|
/**
|
|
2214
2171
|
* Create a Project
|
|
2215
2172
|
*
|
|
2216
|
-
* Create a Project in the Organization
|
|
2173
|
+
* Create a Project in the Organization selected by the orgId path parameter. Requires org:projects:create. Enabling CDN delivery also requires project:write.
|
|
2217
2174
|
*/
|
|
2218
2175
|
declare const createProject: <ThrowOnError extends boolean = false>(options: Options<CreateProjectData, ThrowOnError>) => RequestResult<CreateProjectResponses, CreateProjectErrors, ThrowOnError, "fields">;
|
|
2219
2176
|
/**
|
|
2220
|
-
*
|
|
2177
|
+
* Create a Project API Key
|
|
2221
2178
|
*
|
|
2222
|
-
*
|
|
2179
|
+
* Create an API key for the selected Project. Requires project:api_keys:write and delegates only Project permissions held by the request identity.
|
|
2223
2180
|
*/
|
|
2224
|
-
declare const
|
|
2181
|
+
declare const createProjectApiKey: <ThrowOnError extends boolean = false>(options: Options<CreateProjectApiKeyData, ThrowOnError>) => RequestResult<CreateProjectApiKeyResponses, CreateProjectApiKeyErrors, ThrowOnError, "fields">;
|
|
2225
2182
|
/**
|
|
2226
2183
|
* Upload translated files
|
|
2227
2184
|
*
|
|
@@ -2229,95 +2186,91 @@ declare const uploadSourceFiles: <ThrowOnError extends boolean = false>(options:
|
|
|
2229
2186
|
*/
|
|
2230
2187
|
declare const uploadTranslations: <ThrowOnError extends boolean = false>(options: Options<UploadTranslationsData, ThrowOnError>) => RequestResult<UploadTranslationsResponses, UploadTranslationsErrors, ThrowOnError, "fields">;
|
|
2231
2188
|
/**
|
|
2232
|
-
*
|
|
2189
|
+
* Get Project information
|
|
2233
2190
|
*
|
|
2234
|
-
*
|
|
2191
|
+
* Read the authenticated Project's name, Organization ID, locale settings, and auto-approval setting.
|
|
2235
2192
|
*/
|
|
2236
|
-
declare const
|
|
2193
|
+
declare const getProjectInfo: <ThrowOnError extends boolean = false>(options: Options<GetProjectInfoData, ThrowOnError>) => RequestResult<GetProjectInfoResponses, GetProjectInfoErrors, ThrowOnError, "fields">;
|
|
2237
2194
|
/**
|
|
2238
|
-
*
|
|
2195
|
+
* Update Project information
|
|
2239
2196
|
*
|
|
2240
|
-
*
|
|
2197
|
+
* Update the Project's default locale or CDN delivery setting.
|
|
2241
2198
|
*/
|
|
2242
|
-
declare const
|
|
2199
|
+
declare const updateProjectInfo: <ThrowOnError extends boolean = false>(options: Options<UpdateProjectInfoData, ThrowOnError>) => RequestResult<UpdateProjectInfoResponses, UpdateProjectInfoErrors, ThrowOnError, "fields">;
|
|
2243
2200
|
/**
|
|
2244
|
-
*
|
|
2245
|
-
*
|
|
2246
|
-
* Check whether the Project needs translation context generated. This deprecated endpoint is retained for backward compatibility and is no longer called by current clients.
|
|
2201
|
+
* Translate content at runtime
|
|
2247
2202
|
*
|
|
2248
|
-
*
|
|
2203
|
+
* Translate one or more strings or structured content entries with caching and memoization. Development API keys are accepted for this endpoint.
|
|
2249
2204
|
*/
|
|
2250
|
-
declare const
|
|
2205
|
+
declare const translate: <ThrowOnError extends boolean = false>(options: Options<TranslateData, ThrowOnError>) => RequestResult<TranslateResponses, TranslateErrors, ThrowOnError, "fields">;
|
|
2251
2206
|
/**
|
|
2252
|
-
*
|
|
2207
|
+
* Get translation status for a file
|
|
2253
2208
|
*
|
|
2254
|
-
*
|
|
2209
|
+
* Return translation progress and availability by locale for one source file, along with its source metadata.
|
|
2255
2210
|
*/
|
|
2256
|
-
declare const
|
|
2211
|
+
declare const getTranslationStatus: <ThrowOnError extends boolean = false>(options: Options<GetTranslationStatusData, ThrowOnError>) => RequestResult<GetTranslationStatusResponses, GetTranslationStatusErrors, ThrowOnError, "fields">;
|
|
2257
2212
|
/**
|
|
2258
|
-
* Get
|
|
2259
|
-
*
|
|
2260
|
-
* Track a context generation job. This deprecated endpoint is retained for backward compatibility; new integrations should use `POST /v2/project/jobs/info`.
|
|
2213
|
+
* Get branch information
|
|
2261
2214
|
*
|
|
2262
|
-
*
|
|
2215
|
+
* Return the Project's default branch and any branches requested by name.
|
|
2263
2216
|
*/
|
|
2264
|
-
declare const
|
|
2217
|
+
declare const getBranchInfo: <ThrowOnError extends boolean = false>(options: Options<GetBranchInfoData, ThrowOnError>) => RequestResult<GetBranchInfoResponses, GetBranchInfoErrors, ThrowOnError, "fields">;
|
|
2265
2218
|
/**
|
|
2266
|
-
*
|
|
2219
|
+
* Create a branch
|
|
2267
2220
|
*
|
|
2268
|
-
*
|
|
2221
|
+
* Create a new branch, or rename and confirm the default branch.
|
|
2269
2222
|
*/
|
|
2270
|
-
declare const
|
|
2223
|
+
declare const createBranch: <ThrowOnError extends boolean = false>(options: Options<CreateBranchData, ThrowOnError>) => RequestResult<CreateBranchResponses, CreateBranchErrors, ThrowOnError, "fields">;
|
|
2271
2224
|
/**
|
|
2272
|
-
*
|
|
2225
|
+
* Create or update a tag
|
|
2273
2226
|
*
|
|
2274
|
-
*
|
|
2227
|
+
* Create or upsert a tag that points at a set of file versions.
|
|
2275
2228
|
*/
|
|
2276
|
-
declare const
|
|
2229
|
+
declare const createTag: <ThrowOnError extends boolean = false>(options: Options<CreateTagData, ThrowOnError>) => RequestResult<CreateTagResponses, CreateTagErrors, ThrowOnError, "fields">;
|
|
2277
2230
|
/**
|
|
2278
|
-
*
|
|
2279
|
-
*
|
|
2280
|
-
* Download a single source or translated file. This deprecated endpoint is retained for backward compatibility; new integrations should use `POST /v2/project/files/download`.
|
|
2231
|
+
* Upload Project assets
|
|
2281
2232
|
*
|
|
2282
|
-
*
|
|
2233
|
+
* 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.
|
|
2283
2234
|
*/
|
|
2284
|
-
declare const
|
|
2235
|
+
declare const uploadAssets: <ThrowOnError extends boolean = false>(options: Options<UploadAssetsData, ThrowOnError>) => RequestResult<UploadAssetsResponses, UploadAssetsErrors, ThrowOnError, "fields">;
|
|
2285
2236
|
/**
|
|
2286
|
-
*
|
|
2237
|
+
* Submit translation diffs
|
|
2287
2238
|
*
|
|
2288
|
-
*
|
|
2239
|
+
* Overwrite translations with user-provided localized content.
|
|
2289
2240
|
*/
|
|
2290
|
-
declare const
|
|
2241
|
+
declare const submitUserEditDiffs: <ThrowOnError extends boolean = false>(options: Options<SubmitUserEditDiffsData, ThrowOnError>) => RequestResult<SubmitUserEditDiffsResponses, SubmitUserEditDiffsErrors, ThrowOnError, "fields">;
|
|
2291
2242
|
/**
|
|
2292
|
-
*
|
|
2243
|
+
* Move or rename files
|
|
2293
2244
|
*
|
|
2294
|
-
*
|
|
2245
|
+
* Clone source files and their translations under new file IDs.
|
|
2295
2246
|
*/
|
|
2296
|
-
declare const
|
|
2247
|
+
declare const processFileMoves: <ThrowOnError extends boolean = false>(options: Options<ProcessFileMovesData, ThrowOnError>) => RequestResult<ProcessFileMovesResponses, ProcessFileMovesErrors, ThrowOnError, "fields">;
|
|
2297
2248
|
/**
|
|
2298
|
-
*
|
|
2249
|
+
* Find orphaned files
|
|
2299
2250
|
*
|
|
2300
|
-
*
|
|
2251
|
+
* Return files on a branch that are not present in the provided file ID list.
|
|
2301
2252
|
*/
|
|
2302
|
-
declare const
|
|
2253
|
+
declare const getOrphanedFiles: <ThrowOnError extends boolean = false>(options: Options<GetOrphanedFilesData, ThrowOnError>) => RequestResult<GetOrphanedFilesResponses, GetOrphanedFilesErrors, ThrowOnError, "fields">;
|
|
2303
2254
|
/**
|
|
2304
|
-
*
|
|
2255
|
+
* Get file metadata
|
|
2305
2256
|
*
|
|
2306
|
-
*
|
|
2257
|
+
* Get detailed metadata for specific source and translated files.
|
|
2307
2258
|
*/
|
|
2308
|
-
declare const
|
|
2259
|
+
declare const getFileInfo: <ThrowOnError extends boolean = false>(options: Options<GetFileInfoData, ThrowOnError>) => RequestResult<GetFileInfoResponses, GetFileInfoErrors, ThrowOnError, "fields">;
|
|
2309
2260
|
/**
|
|
2310
|
-
*
|
|
2261
|
+
* Download multiple files
|
|
2311
2262
|
*
|
|
2312
|
-
*
|
|
2263
|
+
* Download up to 100 source or translated files in one request.
|
|
2313
2264
|
*/
|
|
2314
|
-
declare const
|
|
2265
|
+
declare const downloadFiles: <ThrowOnError extends boolean = false>(options: Options<DownloadFilesData, ThrowOnError>) => RequestResult<DownloadFilesResponses, DownloadFilesErrors, ThrowOnError, "fields">;
|
|
2315
2266
|
/**
|
|
2316
|
-
*
|
|
2267
|
+
* Download a single file
|
|
2317
2268
|
*
|
|
2318
|
-
*
|
|
2269
|
+
* Download a single source or translated file. This deprecated endpoint is retained for backward compatibility; new integrations should use `POST /v2/project/files/download`.
|
|
2270
|
+
*
|
|
2271
|
+
* @deprecated
|
|
2319
2272
|
*/
|
|
2320
|
-
declare const
|
|
2273
|
+
declare const downloadFile: <ThrowOnError extends boolean = false>(options: Options<DownloadFileData, ThrowOnError>) => RequestResult<DownloadFileResponses, DownloadFileErrors, ThrowOnError, "fields">;
|
|
2321
2274
|
/**
|
|
2322
2275
|
* Get translation job status
|
|
2323
2276
|
*
|
|
@@ -2325,35 +2278,29 @@ declare const updateProjectInfo: <ThrowOnError extends boolean = false>(options:
|
|
|
2325
2278
|
*/
|
|
2326
2279
|
declare const getTranslationJobInfo: <ThrowOnError extends boolean = false>(options: Options<GetTranslationJobInfoData, ThrowOnError>) => RequestResult<GetTranslationJobInfoResponses, GetTranslationJobInfoErrors, ThrowOnError, "fields">;
|
|
2327
2280
|
/**
|
|
2328
|
-
*
|
|
2329
|
-
*
|
|
2330
|
-
* Translate one or more strings or structured content entries with caching and memoization. Development API keys are accepted for this endpoint.
|
|
2331
|
-
*/
|
|
2332
|
-
declare const translate: <ThrowOnError extends boolean = false>(options: Options<TranslateData, ThrowOnError>) => RequestResult<TranslateResponses, TranslateErrors, ThrowOnError, "fields">;
|
|
2333
|
-
/**
|
|
2334
|
-
* Get file metadata
|
|
2281
|
+
* Generate translation context
|
|
2335
2282
|
*
|
|
2336
|
-
*
|
|
2283
|
+
* Generate glossaries and translation instructions for the project.
|
|
2337
2284
|
*/
|
|
2338
|
-
declare const
|
|
2285
|
+
declare const generateProjectContext: <ThrowOnError extends boolean = false>(options: Options<GenerateProjectContextData, ThrowOnError>) => RequestResult<GenerateProjectContextResponses, GenerateProjectContextErrors, ThrowOnError, "fields">;
|
|
2339
2286
|
/**
|
|
2340
|
-
*
|
|
2287
|
+
* Publish or unpublish files
|
|
2341
2288
|
*
|
|
2342
|
-
*
|
|
2289
|
+
* Publish or unpublish translated files to the CDN. Requires CDN to be enabled.
|
|
2343
2290
|
*/
|
|
2344
|
-
declare const
|
|
2291
|
+
declare const publishFiles: <ThrowOnError extends boolean = false>(options: Options<PublishFilesData, ThrowOnError>) => RequestResult<PublishFilesResponses, PublishFilesErrors, ThrowOnError, "fields">;
|
|
2345
2292
|
/**
|
|
2346
|
-
*
|
|
2293
|
+
* Upload source files
|
|
2347
2294
|
*
|
|
2348
|
-
*
|
|
2295
|
+
* Upload one or more source files to the project. Max 100 files per request.
|
|
2349
2296
|
*/
|
|
2350
|
-
declare const
|
|
2297
|
+
declare const uploadSourceFiles: <ThrowOnError extends boolean = false>(options: Options<UploadSourceFilesData, ThrowOnError>) => RequestResult<UploadSourceFilesResponses, UploadSourceFilesErrors, ThrowOnError, "fields">;
|
|
2351
2298
|
/**
|
|
2352
|
-
*
|
|
2299
|
+
* Queue files for translation
|
|
2353
2300
|
*
|
|
2354
|
-
*
|
|
2301
|
+
* Enqueue uploaded source files for background translation. Max 100 files per request. The response shape depends on the requested `gt-api-version`.
|
|
2355
2302
|
*/
|
|
2356
|
-
declare const
|
|
2303
|
+
declare const enqueueFileTranslations: <ThrowOnError extends boolean = false>(options: Options<EnqueueFileTranslationsData, ThrowOnError>) => RequestResult<EnqueueFileTranslationsResponses, EnqueueFileTranslationsErrors, ThrowOnError, "fields">;
|
|
2357
2304
|
/**
|
|
2358
2305
|
* Create a CLI wizard session
|
|
2359
2306
|
*
|
|
@@ -2373,5 +2320,5 @@ declare const deleteCliWizardSession: <ThrowOnError extends boolean = false>(opt
|
|
|
2373
2320
|
*/
|
|
2374
2321
|
declare const getCliWizardSession: <ThrowOnError extends boolean = false>(options: Options<GetCliWizardSessionData, ThrowOnError>) => RequestResult<GetCliWizardSessionResponses, GetCliWizardSessionErrors, ThrowOnError, "fields">;
|
|
2375
2322
|
//#endregion
|
|
2376
|
-
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, type GetJobStatuses, GetOrphanedFilesData, GetOrphanedFilesError, GetOrphanedFilesErrors, GetOrphanedFilesResponse, GetOrphanedFilesResponses,
|
|
2323
|
+
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, CreateProjectApiKeyData, CreateProjectApiKeyError, CreateProjectApiKeyErrors, CreateProjectApiKeyResponse, CreateProjectApiKeyResponses, 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, type GetJobStatuses, GetOrphanedFilesData, GetOrphanedFilesError, GetOrphanedFilesErrors, GetOrphanedFilesResponse, GetOrphanedFilesResponses, 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, 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, createProjectApiKey, createTag, decodeBase64, decodeFileContent, deleteCliWizardSession, downloadFile, downloadFiles, encodeBase64, encodeFileContent, enqueueFileTranslations, generateProjectContext, getBranchInfo, getCliWizardSession, getFileInfo, getOrphanedFiles, getProjectInfo, getTranslationJobInfo, getTranslationStatus, pollJobs, processBatches, processFileMoves, publishFiles, submitUserEditDiffs, translate, updateProjectInfo, uploadAssets, uploadSourceFiles, uploadTranslations };
|
|
2377
2324
|
//# sourceMappingURL=index.d.cts.map
|