generaltranslation 9.4.1 → 9.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # generaltranslation
2
2
 
3
+ ## 9.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`a569f0d`](https://github.com/generaltranslation/gt/commit/a569f0d661ba6b28dc55375b56113a68403e2e8d)]:
8
+ - @generaltranslation/api@0.3.1
9
+
3
10
  ## 9.4.1
4
11
 
5
12
  ### Patch Changes
@@ -75,12 +75,12 @@ export declare function createGtApiAdapter(defaultConfig?: ApiClientConfig): {
75
75
  sourceLocale: string;
76
76
  }): Promise<{
77
77
  uploadedFiles: {
78
- branchId?: string;
78
+ branchId: string;
79
79
  fileId: string;
80
80
  versionId: string;
81
81
  fileName: string;
82
82
  fileFormat: import("@generaltranslation/api").FileFormat;
83
- dataFormat?: string;
83
+ dataFormat?: import("@generaltranslation/api").DataFormat;
84
84
  locale?: string;
85
85
  }[];
86
86
  }>;
@@ -89,12 +89,12 @@ export declare function createGtApiAdapter(defaultConfig?: ApiClientConfig): {
89
89
  sourceLocale: string;
90
90
  }): Promise<{
91
91
  uploadedFiles: {
92
- branchId?: string;
92
+ branchId: string;
93
93
  fileId: string;
94
94
  versionId: string;
95
95
  fileName: string;
96
96
  fileFormat: import("@generaltranslation/api").FileFormat;
97
- dataFormat?: string;
97
+ dataFormat?: import("@generaltranslation/api").DataFormat;
98
98
  locale?: string;
99
99
  }[];
100
100
  }>;
@@ -169,12 +169,12 @@ declare function createGtApiAdapter(defaultConfig?: ApiClientConfig): {
169
169
  sourceLocale: string;
170
170
  }): Promise<{
171
171
  uploadedFiles: {
172
- branchId?: string;
172
+ branchId: string;
173
173
  fileId: string;
174
174
  versionId: string;
175
175
  fileName: string;
176
176
  fileFormat: _$_generaltranslation_api0.FileFormat;
177
- dataFormat?: string;
177
+ dataFormat?: _$_generaltranslation_api0.DataFormat;
178
178
  locale?: string;
179
179
  }[];
180
180
  }>;
@@ -183,12 +183,12 @@ declare function createGtApiAdapter(defaultConfig?: ApiClientConfig): {
183
183
  sourceLocale: string;
184
184
  }): Promise<{
185
185
  uploadedFiles: {
186
- branchId?: string;
186
+ branchId: string;
187
187
  fileId: string;
188
188
  versionId: string;
189
189
  fileName: string;
190
190
  fileFormat: _$_generaltranslation_api0.FileFormat;
191
- dataFormat?: string;
191
+ dataFormat?: _$_generaltranslation_api0.DataFormat;
192
192
  locale?: string;
193
193
  }[];
194
194
  }>;
@@ -169,12 +169,12 @@ declare function createGtApiAdapter(defaultConfig?: ApiClientConfig): {
169
169
  sourceLocale: string;
170
170
  }): Promise<{
171
171
  uploadedFiles: {
172
- branchId?: string;
172
+ branchId: string;
173
173
  fileId: string;
174
174
  versionId: string;
175
175
  fileName: string;
176
176
  fileFormat: _$_generaltranslation_api0.FileFormat;
177
- dataFormat?: string;
177
+ dataFormat?: _$_generaltranslation_api0.DataFormat;
178
178
  locale?: string;
179
179
  }[];
180
180
  }>;
@@ -183,12 +183,12 @@ declare function createGtApiAdapter(defaultConfig?: ApiClientConfig): {
183
183
  sourceLocale: string;
184
184
  }): Promise<{
185
185
  uploadedFiles: {
186
- branchId?: string;
186
+ branchId: string;
187
187
  fileId: string;
188
188
  versionId: string;
189
189
  fileName: string;
190
190
  fileFormat: _$_generaltranslation_api0.FileFormat;
191
- dataFormat?: string;
191
+ dataFormat?: _$_generaltranslation_api0.DataFormat;
192
192
  locale?: string;
193
193
  }[];
194
194
  }>;
package/dist/openapi.json CHANGED
@@ -165,6 +165,10 @@
165
165
  }
166
166
  ]
167
167
  },
168
+ "DataFormat": {
169
+ "type": "string",
170
+ "enum": ["JSX", "ICU", "I18NEXT", "STRING"]
171
+ },
168
172
  "ModelProvider": {
169
173
  "type": "string",
170
174
  "enum": ["ANTHROPIC", "OPENAI", "XAI", "GOOGLE"]
@@ -211,10 +215,6 @@
211
215
  ]
212
216
  }
213
217
  },
214
- "DataFormat": {
215
- "type": "string",
216
- "enum": ["JSX", "ICU", "I18NEXT", "STRING"]
217
- },
218
218
  "RuntimeTranslationRequest": {
219
219
  "type": "object",
220
220
  "properties": {
@@ -242,6 +242,9 @@
242
242
  "dataFormat": {
243
243
  "$ref": "#/components/schemas/DataFormat"
244
244
  },
245
+ "fileFormat": {
246
+ "$ref": "#/components/schemas/RuntimeFileFormat"
247
+ },
245
248
  "actionType": {
246
249
  "type": "string",
247
250
  "enum": ["fast", "standard"],
@@ -267,9 +270,6 @@
267
270
  "required": ["before", "target", "after"]
268
271
  }
269
272
  }
270
- },
271
- "fileFormat": {
272
- "$ref": "#/components/schemas/RuntimeFileFormat"
273
273
  }
274
274
  },
275
275
  "default": {
@@ -299,6 +299,10 @@
299
299
  },
300
300
  "required": ["requests", "targetLocale", "sourceLocale", "metadata"]
301
301
  },
302
+ "RuntimeFileFormat": {
303
+ "type": "string",
304
+ "enum": ["MD", "MDX"]
305
+ },
302
306
  "CreateCliWizardSessionResponse": {
303
307
  "type": "object",
304
308
  "properties": {
@@ -319,7 +323,9 @@
319
323
  "CliKeyType": {
320
324
  "type": "string",
321
325
  "enum": ["development", "production", "all"],
322
- "default": "production"
326
+ "default": "production",
327
+ "deprecated": true,
328
+ "description": "Compatibility response slots. The wizard creates one project API key for all requested environments."
323
329
  },
324
330
  "CliWizardSessionReadyResponse": {
325
331
  "anyOf": [
@@ -382,10 +388,6 @@
382
388
  }
383
389
  },
384
390
  "required": ["message"]
385
- },
386
- "RuntimeFileFormat": {
387
- "type": "string",
388
- "enum": ["MD", "MDX"]
389
391
  }
390
392
  },
391
393
  "parameters": {}
@@ -412,11 +414,13 @@
412
414
  "properties": {
413
415
  "fileId": {
414
416
  "type": "string",
415
- "minLength": 1
417
+ "minLength": 1,
418
+ "description": "File ID assigned by Google Drive, found in the Google Docs or Slides URL after /d/. This is not a GT database file ID. May identify a source file or a GT-managed translated copy. Supply hostApp with fileId for file-specific context; omit both to list connected projects."
416
419
  },
417
420
  "hostApp": {
418
421
  "type": "string",
419
- "enum": ["DOCS", "SLIDES"]
422
+ "enum": ["DOCS", "SLIDES"],
423
+ "description": "Google editor for the file: DOCS for Google Docs or SLIDES for Google Slides. Supply fileId with hostApp for file-specific context."
420
424
  }
421
425
  }
422
426
  }
@@ -845,15 +849,18 @@
845
849
  "properties": {
846
850
  "projectId": {
847
851
  "type": "string",
848
- "minLength": 1
852
+ "minLength": 1,
853
+ "description": "GT project ID returned by get_google_drive_context. The project must have a Google Drive integration connected in the GT dashboard."
849
854
  },
850
855
  "fileId": {
851
856
  "type": "string",
852
- "minLength": 1
857
+ "minLength": 1,
858
+ "description": "File ID assigned by Google Drive, found in the Google Docs or Slides URL after /d/. This is not a GT database file ID. May identify a source file or a GT-managed translated copy."
853
859
  },
854
860
  "hostApp": {
855
861
  "type": "string",
856
- "enum": ["DOCS", "SLIDES"]
862
+ "enum": ["DOCS", "SLIDES"],
863
+ "description": "Google editor for the file: DOCS for Google Docs or SLIDES for Google Slides."
857
864
  },
858
865
  "targetLocales": {
859
866
  "type": "array",
@@ -862,14 +869,17 @@
862
869
  "minLength": 1
863
870
  },
864
871
  "minItems": 1,
865
- "maxItems": 100
872
+ "maxItems": 100,
873
+ "description": "One to 100 supported target locale codes, such as fr or es-MX. Must respect the project locale whitelist. For a GT-managed translated copy, only that copy’s target locale is used."
866
874
  },
867
875
  "sourceLocale": {
868
876
  "type": "string",
869
- "minLength": 1
877
+ "minLength": 1,
878
+ "description": "Optional source locale code, such as en. Defaults to the file’s stored source locale, then the project default. Ignored for a GT-managed translated copy, whose original source locale is used."
870
879
  },
871
880
  "force": {
872
- "type": "boolean"
881
+ "type": "boolean",
882
+ "description": "Whether to force retranslation of existing translations. Defaults to false. Retranslation may incur additional translation charges."
873
883
  }
874
884
  },
875
885
  "required": ["projectId", "fileId", "hostApp", "targetLocales"]
@@ -1146,15 +1156,18 @@
1146
1156
  "properties": {
1147
1157
  "projectId": {
1148
1158
  "type": "string",
1149
- "minLength": 1
1159
+ "minLength": 1,
1160
+ "description": "GT project ID returned by get_google_drive_context. The project must have a Google Drive integration connected in the GT dashboard."
1150
1161
  },
1151
1162
  "fileId": {
1152
1163
  "type": "string",
1153
- "minLength": 1
1164
+ "minLength": 1,
1165
+ "description": "File ID assigned by Google Drive, found in the Google Docs or Slides URL after /d/. This is not a GT database file ID. May identify a source file or a GT-managed translated copy."
1154
1166
  },
1155
1167
  "hostApp": {
1156
1168
  "type": "string",
1157
- "enum": ["DOCS", "SLIDES"]
1169
+ "enum": ["DOCS", "SLIDES"],
1170
+ "description": "Google editor for the file: DOCS for Google Docs or SLIDES for Google Slides."
1158
1171
  }
1159
1172
  },
1160
1173
  "required": ["projectId", "fileId", "hostApp"]
@@ -1968,7 +1981,50 @@
1968
1981
  "type": "number"
1969
1982
  }
1970
1983
  },
1971
- "required": ["x", "y", "width", "height"]
1984
+ "required": ["x", "y", "width", "height"],
1985
+ "additionalProperties": false
1986
+ },
1987
+ "render": {
1988
+ "type": "object",
1989
+ "properties": {
1990
+ "x": {
1991
+ "type": "number"
1992
+ },
1993
+ "y": {
1994
+ "type": "number"
1995
+ },
1996
+ "width": {
1997
+ "type": "number"
1998
+ },
1999
+ "height": {
2000
+ "type": "number"
2001
+ }
2002
+ },
2003
+ "required": ["x", "y", "width", "height"],
2004
+ "additionalProperties": false
2005
+ },
2006
+ "room": {
2007
+ "type": "object",
2008
+ "properties": {
2009
+ "left": {
2010
+ "type": "number",
2011
+ "minimum": 0
2012
+ },
2013
+ "right": {
2014
+ "type": "number",
2015
+ "minimum": 0
2016
+ },
2017
+ "up": {
2018
+ "type": "number",
2019
+ "minimum": 0
2020
+ },
2021
+ "down": {
2022
+ "type": "number",
2023
+ "minimum": 0
2024
+ }
2025
+ },
2026
+ "required": ["left", "right", "up", "down"],
2027
+ "additionalProperties": false
1972
2028
  },
1973
2029
  "autoResize": {
1974
2030
  "type": "string",
@@ -1979,6 +2035,10 @@
1979
2035
  "TRUNCATE"
1980
2036
  ]
1981
2037
  },
2038
+ "textAlignHorizontal": {
2039
+ "type": "string",
2040
+ "enum": ["LEFT", "CENTER", "RIGHT", "JUSTIFIED"]
2041
+ },
1982
2042
  "baseFontPt": {
1983
2043
  "type": "number"
1984
2044
  },
@@ -3376,7 +3436,7 @@
3376
3436
  "type": "string"
3377
3437
  },
3378
3438
  "defaultLocale": {
3379
- "type": ["string", "null"]
3439
+ "type": "string"
3380
3440
  },
3381
3441
  "currentLocales": {
3382
3442
  "type": "array",
@@ -7022,13 +7082,14 @@
7022
7082
  "$ref": "#/components/schemas/FileFormat"
7023
7083
  },
7024
7084
  "dataFormat": {
7025
- "type": "string"
7085
+ "$ref": "#/components/schemas/DataFormat"
7026
7086
  },
7027
7087
  "locale": {
7028
7088
  "type": "string"
7029
7089
  }
7030
7090
  },
7031
7091
  "required": [
7092
+ "branchId",
7032
7093
  "fileId",
7033
7094
  "versionId",
7034
7095
  "fileName",
@@ -7620,7 +7681,7 @@
7620
7681
  "post": {
7621
7682
  "operationId": "translate",
7622
7683
  "summary": "Translate content at runtime",
7623
- "description": "Translate one or more strings or structured content entries with caching and memoization. Development API keys are accepted for this endpoint.",
7684
+ "description": "Translate one or more strings, structured content entries, or markdown documents with caching and memoization. Markdown and MDX documents are sent as strings with `fileFormat` set to MD or MDX. Development API keys are accepted for this endpoint.",
7624
7685
  "security": [
7625
7686
  {
7626
7687
  "BearerAuth": []
@@ -8042,13 +8103,14 @@
8042
8103
  "$ref": "#/components/schemas/FileFormat"
8043
8104
  },
8044
8105
  "dataFormat": {
8045
- "type": "string"
8106
+ "$ref": "#/components/schemas/DataFormat"
8046
8107
  },
8047
8108
  "locale": {
8048
8109
  "type": "string"
8049
8110
  }
8050
8111
  },
8051
8112
  "required": [
8113
+ "branchId",
8052
8114
  "fileId",
8053
8115
  "versionId",
8054
8116
  "fileName",
@@ -8240,7 +8302,8 @@
8240
8302
  "type": {
8241
8303
  "type": "string",
8242
8304
  "enum": ["production", "development"],
8243
- "default": "production"
8305
+ "deprecated": true,
8306
+ "description": "Ignored. All new keys are project-scoped API keys for any environment."
8244
8307
  }
8245
8308
  },
8246
8309
  "required": ["name"],
@@ -8274,7 +8337,9 @@
8274
8337
  },
8275
8338
  "type": {
8276
8339
  "type": "string",
8277
- "enum": ["production", "development"]
8340
+ "enum": ["production"],
8341
+ "deprecated": true,
8342
+ "description": "Compatibility field. All project API keys work in any environment."
8278
8343
  }
8279
8344
  },
8280
8345
  "required": ["id", "name", "key", "projectId", "type"]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generaltranslation",
3
- "version": "9.4.1",
3
+ "version": "9.4.2",
4
4
  "description": "A language toolkit for AI developers",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -40,7 +40,7 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@noble/hashes": "^2.2.0",
43
- "@generaltranslation/api": "0.3.0",
43
+ "@generaltranslation/api": "0.3.1",
44
44
  "@generaltranslation/icu": "0.1.2",
45
45
  "@generaltranslation/format": "0.1.9"
46
46
  },