@generaltranslation/api 0.0.1 → 0.0.3

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