@generaltranslation/api 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @generaltranslation/api
2
2
 
3
+ ## 0.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#2195](https://github.com/generaltranslation/gt/pull/2195) [`ca08766`](https://github.com/generaltranslation/gt/commit/ca0876633182eb01d969d56dea21dd1e88612339) Thanks [@internal-gt-public-api-sync](https://github.com/apps/internal-gt-public-api-sync)! - Sync the GT API OpenAPI contract and regenerate the SDK.
8
+
3
9
  ## 0.0.1
4
10
 
5
11
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -1,5 +1,10 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region src/generated/sdk.gen.ts
3
+ /**
4
+ * Create a Project
5
+ *
6
+ * Create a Project in the Organization associated with an Organization API key. The key must have the `org:projects:create` permission. Project keys cannot use this endpoint. Enabling CDN delivery also requires `project:write`.
7
+ */
3
8
  const createProject = (options) => options.client.post({
4
9
  security: [{
5
10
  scheme: "bearer",
@@ -12,6 +17,11 @@ const createProject = (options) => options.client.post({
12
17
  ...options.headers
13
18
  }
14
19
  });
20
+ /**
21
+ * Upload source files
22
+ *
23
+ * Upload one or more source files to the project. Max 100 files per request.
24
+ */
15
25
  const uploadSourceFiles = (options) => options.client.post({
16
26
  security: [{
17
27
  scheme: "bearer",
@@ -24,6 +34,11 @@ const uploadSourceFiles = (options) => options.client.post({
24
34
  ...options.headers
25
35
  }
26
36
  });
37
+ /**
38
+ * Upload translated files
39
+ *
40
+ * Upload translated files linked to their source files. Max 100 files per request.
41
+ */
27
42
  const uploadTranslations = (options) => options.client.post({
28
43
  security: [{
29
44
  scheme: "bearer",
@@ -36,6 +51,11 @@ const uploadTranslations = (options) => options.client.post({
36
51
  ...options.headers
37
52
  }
38
53
  });
54
+ /**
55
+ * Upload Project assets
56
+ *
57
+ * 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.
58
+ */
39
59
  const uploadAssets = (options) => options.client.post({
40
60
  security: [{
41
61
  scheme: "bearer",
@@ -48,6 +68,11 @@ const uploadAssets = (options) => options.client.post({
48
68
  ...options.headers
49
69
  }
50
70
  });
71
+ /**
72
+ * Submit translation diffs
73
+ *
74
+ * Overwrite translations with user-provided localized content.
75
+ */
51
76
  const submitUserEditDiffs = (options) => options.client.post({
52
77
  security: [{
53
78
  scheme: "bearer",
@@ -60,6 +85,13 @@ const submitUserEditDiffs = (options) => options.client.post({
60
85
  ...options.headers
61
86
  }
62
87
  });
88
+ /**
89
+ * Check if context generation is needed
90
+ *
91
+ * Check whether the Project needs translation context generated. This deprecated endpoint is retained for backward compatibility and is no longer called by current clients.
92
+ *
93
+ * @deprecated
94
+ */
63
95
  const shouldGenerateProjectContext = (options) => options.client.get({
64
96
  security: [{
65
97
  scheme: "bearer",
@@ -68,6 +100,11 @@ const shouldGenerateProjectContext = (options) => options.client.get({
68
100
  url: "/v2/project/setup/should-generate",
69
101
  ...options
70
102
  });
103
+ /**
104
+ * Generate translation context
105
+ *
106
+ * Generate glossaries and translation instructions for the project.
107
+ */
71
108
  const generateProjectContext = (options) => options.client.post({
72
109
  security: [{
73
110
  scheme: "bearer",
@@ -80,6 +117,13 @@ const generateProjectContext = (options) => options.client.post({
80
117
  ...options.headers
81
118
  }
82
119
  });
120
+ /**
121
+ * Get context generation job status
122
+ *
123
+ * Track a context generation job. This deprecated endpoint is retained for backward compatibility; new integrations should use `POST /v2/project/jobs/info`.
124
+ *
125
+ * @deprecated
126
+ */
83
127
  const getProjectContextGenerationStatus = (options) => options.client.get({
84
128
  security: [{
85
129
  scheme: "bearer",
@@ -88,6 +132,11 @@ const getProjectContextGenerationStatus = (options) => options.client.get({
88
132
  url: "/v2/project/setup/status/{jobId}",
89
133
  ...options
90
134
  });
135
+ /**
136
+ * Queue files for translation
137
+ *
138
+ * Enqueue uploaded source files for background translation. Max 100 files per request. The response shape depends on the requested `gt-api-version`.
139
+ */
91
140
  const enqueueFileTranslations = (options) => options.client.post({
92
141
  security: [{
93
142
  scheme: "bearer",
@@ -100,6 +149,11 @@ const enqueueFileTranslations = (options) => options.client.post({
100
149
  ...options.headers
101
150
  }
102
151
  });
152
+ /**
153
+ * Publish or unpublish files
154
+ *
155
+ * Publish or unpublish translated files to the CDN. Requires CDN to be enabled.
156
+ */
103
157
  const publishFiles = (options) => options.client.post({
104
158
  security: [{
105
159
  scheme: "bearer",
@@ -112,6 +166,13 @@ const publishFiles = (options) => options.client.post({
112
166
  ...options.headers
113
167
  }
114
168
  });
169
+ /**
170
+ * Download a single file
171
+ *
172
+ * Download a single source or translated file. This deprecated endpoint is retained for backward compatibility; new integrations should use `POST /v2/project/files/download`.
173
+ *
174
+ * @deprecated
175
+ */
115
176
  const downloadFile = (options) => options.client.get({
116
177
  security: [{
117
178
  scheme: "bearer",
@@ -120,6 +181,11 @@ const downloadFile = (options) => options.client.get({
120
181
  url: "/v2/project/files/download/{fileId}",
121
182
  ...options
122
183
  });
184
+ /**
185
+ * Download multiple files
186
+ *
187
+ * Download up to 100 source or translated files in one request.
188
+ */
123
189
  const downloadFiles = (options) => options.client.post({
124
190
  security: [{
125
191
  scheme: "bearer",
@@ -132,6 +198,11 @@ const downloadFiles = (options) => options.client.post({
132
198
  ...options.headers
133
199
  }
134
200
  });
201
+ /**
202
+ * Get branch information
203
+ *
204
+ * Return the Project's default branch and any branches requested by name.
205
+ */
135
206
  const getBranchInfo = (options) => options.client.post({
136
207
  security: [{
137
208
  scheme: "bearer",
@@ -144,6 +215,11 @@ const getBranchInfo = (options) => options.client.post({
144
215
  ...options.headers
145
216
  }
146
217
  });
218
+ /**
219
+ * Create a branch
220
+ *
221
+ * Create a new branch, or rename and confirm the default branch.
222
+ */
147
223
  const createBranch = (options) => options.client.post({
148
224
  security: [{
149
225
  scheme: "bearer",
@@ -156,6 +232,11 @@ const createBranch = (options) => options.client.post({
156
232
  ...options.headers
157
233
  }
158
234
  });
235
+ /**
236
+ * Create or update a tag
237
+ *
238
+ * Create or upsert a tag that points at a set of file versions.
239
+ */
159
240
  const createTag = (options) => options.client.post({
160
241
  security: [{
161
242
  scheme: "bearer",
@@ -168,6 +249,11 @@ const createTag = (options) => options.client.post({
168
249
  ...options.headers
169
250
  }
170
251
  });
252
+ /**
253
+ * Get Project information
254
+ *
255
+ * Read the authenticated Project's name, Organization ID, locale settings, and auto-approval setting.
256
+ */
171
257
  const getProjectInfo = (options) => options.client.get({
172
258
  security: [{
173
259
  scheme: "bearer",
@@ -176,6 +262,11 @@ const getProjectInfo = (options) => options.client.get({
176
262
  url: "/v2/project/info/{projectId}",
177
263
  ...options
178
264
  });
265
+ /**
266
+ * Update Project information
267
+ *
268
+ * Update the Project's default locale or CDN delivery setting.
269
+ */
179
270
  const updateProjectInfo = (options) => options.client.post({
180
271
  security: [{
181
272
  scheme: "bearer",
@@ -188,6 +279,11 @@ const updateProjectInfo = (options) => options.client.post({
188
279
  ...options.headers
189
280
  }
190
281
  });
282
+ /**
283
+ * Get translation job status
284
+ *
285
+ * Return normalized status information for one or more queued translation or context generation jobs.
286
+ */
191
287
  const getTranslationJobInfo = (options) => options.client.post({
192
288
  security: [{
193
289
  scheme: "bearer",
@@ -200,6 +296,11 @@ const getTranslationJobInfo = (options) => options.client.post({
200
296
  ...options.headers
201
297
  }
202
298
  });
299
+ /**
300
+ * Translate content at runtime
301
+ *
302
+ * Translate one or more strings or structured content entries with caching and memoization. Development API keys are accepted for this endpoint.
303
+ */
203
304
  const translate = (options) => options.client.post({
204
305
  security: [{
205
306
  scheme: "bearer",
@@ -212,6 +313,11 @@ const translate = (options) => options.client.post({
212
313
  ...options.headers
213
314
  }
214
315
  });
316
+ /**
317
+ * Get file metadata
318
+ *
319
+ * Get detailed metadata for specific source and translated files.
320
+ */
215
321
  const getFileInfo = (options) => options.client.post({
216
322
  security: [{
217
323
  scheme: "bearer",
@@ -224,6 +330,11 @@ const getFileInfo = (options) => options.client.post({
224
330
  ...options.headers
225
331
  }
226
332
  });
333
+ /**
334
+ * Get translation status for a file
335
+ *
336
+ * Return translation progress and availability by locale for one source file, along with its source metadata.
337
+ */
227
338
  const getTranslationStatus = (options) => options.client.get({
228
339
  security: [{
229
340
  scheme: "bearer",
@@ -232,6 +343,11 @@ const getTranslationStatus = (options) => options.client.get({
232
343
  url: "/v2/project/translations/files/status/{fileId}",
233
344
  ...options
234
345
  });
346
+ /**
347
+ * Move or rename files
348
+ *
349
+ * Clone source files and their translations under new file IDs.
350
+ */
235
351
  const processFileMoves = (options) => options.client.post({
236
352
  security: [{
237
353
  scheme: "bearer",
@@ -244,6 +360,11 @@ const processFileMoves = (options) => options.client.post({
244
360
  ...options.headers
245
361
  }
246
362
  });
363
+ /**
364
+ * Find orphaned files
365
+ *
366
+ * Return files on a branch that are not present in the provided file ID list.
367
+ */
247
368
  const getOrphanedFiles = (options) => options.client.post({
248
369
  security: [{
249
370
  scheme: "bearer",
@@ -256,6 +377,11 @@ const getOrphanedFiles = (options) => options.client.post({
256
377
  ...options.headers
257
378
  }
258
379
  });
380
+ /**
381
+ * Create a CLI wizard session
382
+ *
383
+ * Create a temporary session for CLI browser authentication.
384
+ */
259
385
  const createCliWizardSession = (options) => options.client.post({
260
386
  url: "/cli/wizard/session",
261
387
  ...options,
@@ -264,10 +390,20 @@ const createCliWizardSession = (options) => options.client.post({
264
390
  ...options.headers
265
391
  }
266
392
  });
393
+ /**
394
+ * Delete a CLI wizard session
395
+ *
396
+ * Delete a completed or abandoned CLI wizard session.
397
+ */
267
398
  const deleteCliWizardSession = (options) => options.client.delete({
268
399
  url: "/cli/wizard/{sessionId}",
269
400
  ...options
270
401
  });
402
+ /**
403
+ * Get a CLI wizard session
404
+ *
405
+ * Get credentials for a completed CLI wizard session or its current waiting status.
406
+ */
271
407
  const getCliWizardSession = (options) => options.client.get({
272
408
  url: "/cli/wizard/{sessionId}",
273
409
  ...options