@leancodepl/intl 9.4.0

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.
Files changed (57) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +154 -0
  3. package/package.json +25 -0
  4. package/src/TranslationsServiceClient.d.ts +13 -0
  5. package/src/TranslationsServiceClient.js +3 -0
  6. package/src/TranslationsServiceClient.js.map +1 -0
  7. package/src/bin.d.ts +2 -0
  8. package/src/bin.js +129 -0
  9. package/src/bin.js.map +1 -0
  10. package/src/commands/diff.d.ts +9 -0
  11. package/src/commands/diff.js +35 -0
  12. package/src/commands/diff.js.map +1 -0
  13. package/src/commands/download.d.ts +10 -0
  14. package/src/commands/download.js +39 -0
  15. package/src/commands/download.js.map +1 -0
  16. package/src/commands/local.d.ts +11 -0
  17. package/src/commands/local.js +117 -0
  18. package/src/commands/local.js.map +1 -0
  19. package/src/commands/sync.d.ts +12 -0
  20. package/src/commands/sync.js +34 -0
  21. package/src/commands/sync.js.map +1 -0
  22. package/src/commands/upload.d.ts +10 -0
  23. package/src/commands/upload.js +32 -0
  24. package/src/commands/upload.js.map +1 -0
  25. package/src/formatjs.d.ts +21 -0
  26. package/src/formatjs.js +60 -0
  27. package/src/formatjs.js.map +1 -0
  28. package/src/index.d.ts +6 -0
  29. package/src/index.js +16 -0
  30. package/src/index.js.map +1 -0
  31. package/src/mergeWithEnv.d.ts +7 -0
  32. package/src/mergeWithEnv.js +14 -0
  33. package/src/mergeWithEnv.js.map +1 -0
  34. package/src/mkTranslationsServiceClient.d.ts +5 -0
  35. package/src/mkTranslationsServiceClient.js +14 -0
  36. package/src/mkTranslationsServiceClient.js.map +1 -0
  37. package/src/poeditor/POEditorClient.d.ts +19 -0
  38. package/src/poeditor/POEditorClient.js +88 -0
  39. package/src/poeditor/POEditorClient.js.map +1 -0
  40. package/src/poeditor/api.generated/api.d.ts +2570 -0
  41. package/src/poeditor/api.generated/api.js +2586 -0
  42. package/src/poeditor/api.generated/api.js.map +1 -0
  43. package/src/poeditor/api.generated/base.d.ts +66 -0
  44. package/src/poeditor/api.generated/base.js +70 -0
  45. package/src/poeditor/api.generated/base.js.map +1 -0
  46. package/src/poeditor/api.generated/common.d.ts +65 -0
  47. package/src/poeditor/api.generated/common.js +146 -0
  48. package/src/poeditor/api.generated/common.js.map +1 -0
  49. package/src/poeditor/api.generated/configuration.d.ts +91 -0
  50. package/src/poeditor/api.generated/configuration.js +100 -0
  51. package/src/poeditor/api.generated/configuration.js.map +1 -0
  52. package/src/poeditor/api.generated/index.d.ts +13 -0
  53. package/src/poeditor/api.generated/index.js +18 -0
  54. package/src/poeditor/api.generated/index.js.map +1 -0
  55. package/src/poeditor/generatePoeditorClient.d.ts +1 -0
  56. package/src/poeditor/generatePoeditorClient.js +54 -0
  57. package/src/poeditor/generatePoeditorClient.js.map +1 -0
@@ -0,0 +1,2586 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * API V2
6
+ * Connect your software to POEditor with this simple API
7
+ *
8
+ * The version of the OpenAPI document: 1.0.6
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.TranslationsAutomaticProviderEnum = exports.TranslationsApi = exports.TranslationsApiFactory = exports.TranslationsApiFp = exports.TranslationsApiAxiosParamCreator = exports.TermsUpdateFuzzyTriggerEnum = exports.TermsApi = exports.TermsApiFactory = exports.TermsApiFp = exports.TermsApiAxiosParamCreator = exports.ProjectsUploadFuzzyTriggerEnum = exports.ProjectsUploadReadFromSourceEnum = exports.ProjectsUploadSyncTermsEnum = exports.ProjectsUploadOverwriteEnum = exports.ProjectsUploadUpdatingEnum = exports.ProjectsExportOptionsEnum = exports.ProjectsExportTypeEnum = exports.ProjectsApi = exports.ProjectsApiFactory = exports.ProjectsApiFp = exports.ProjectsApiAxiosParamCreator = exports.LanguagesUpdateFuzzyTriggerEnum = exports.LanguagesApi = exports.LanguagesApiFactory = exports.LanguagesApiFp = exports.LanguagesApiAxiosParamCreator = exports.ContributorsAddAdminEnum = exports.ContributorsApi = exports.ContributorsApiFactory = exports.ContributorsApiFp = exports.ContributorsApiAxiosParamCreator = exports.ProjectLongProjectOpenEnum = exports.ProjectLongProjectPublicEnum = exports.ProjectListProjectsInnerOpenEnum = exports.ProjectListProjectsInnerPublicEnum = void 0;
17
+ const tslib_1 = require("tslib");
18
+ const axios_1 = tslib_1.__importDefault(require("axios"));
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ const common_1 = require("./common");
22
+ // @ts-ignore
23
+ const base_1 = require("./base");
24
+ exports.ProjectListProjectsInnerPublicEnum = {
25
+ NUMBER_0: 0,
26
+ NUMBER_1: 1
27
+ };
28
+ exports.ProjectListProjectsInnerOpenEnum = {
29
+ NUMBER_0: 0,
30
+ NUMBER_1: 1
31
+ };
32
+ exports.ProjectLongProjectPublicEnum = {
33
+ NUMBER_0: 0,
34
+ NUMBER_1: 1
35
+ };
36
+ exports.ProjectLongProjectOpenEnum = {
37
+ NUMBER_0: 0,
38
+ NUMBER_1: 1
39
+ };
40
+ /**
41
+ * ContributorsApi - axios parameter creator
42
+ * @export
43
+ */
44
+ const ContributorsApiAxiosParamCreator = function (configuration) {
45
+ return {
46
+ /**
47
+ * Add Contributor. More details in the [documentation](https://poeditor.com/docs/api#contributors_add).
48
+ * @summary Adds a contributor to a project language or an administrator to a project.
49
+ * @param {string} id The id of project
50
+ * @param {string} name The name of contributor
51
+ * @param {string} email The email of contributor
52
+ * @param {string} [apiToken]
53
+ * @param {string} [language] The language code (Required if adding a contributor)
54
+ * @param {ContributorsAddAdminEnum} [admin] Set it to 1 for adding as administrator
55
+ * @param {*} [options] Override http request option.
56
+ * @throws {RequiredError}
57
+ */
58
+ contributorsAdd: async (id, name, email, apiToken, language, admin, options = {}) => {
59
+ // verify required parameter 'id' is not null or undefined
60
+ (0, common_1.assertParamExists)('contributorsAdd', 'id', id);
61
+ // verify required parameter 'name' is not null or undefined
62
+ (0, common_1.assertParamExists)('contributorsAdd', 'name', name);
63
+ // verify required parameter 'email' is not null or undefined
64
+ (0, common_1.assertParamExists)('contributorsAdd', 'email', email);
65
+ const localVarPath = `/contributors/add`;
66
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
67
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
68
+ let baseOptions;
69
+ if (configuration) {
70
+ baseOptions = configuration.baseOptions;
71
+ }
72
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
73
+ const localVarHeaderParameter = {};
74
+ const localVarQueryParameter = {};
75
+ const localVarFormParams = new URLSearchParams();
76
+ if (apiToken !== undefined) {
77
+ localVarFormParams.set('api_token', apiToken);
78
+ }
79
+ if (id !== undefined) {
80
+ localVarFormParams.set('id', id);
81
+ }
82
+ if (name !== undefined) {
83
+ localVarFormParams.set('name', name);
84
+ }
85
+ if (email !== undefined) {
86
+ localVarFormParams.set('email', email);
87
+ }
88
+ if (language !== undefined) {
89
+ localVarFormParams.set('language', language);
90
+ }
91
+ if (admin !== undefined) {
92
+ localVarFormParams.set('admin', admin);
93
+ }
94
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
95
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
96
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
97
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
98
+ localVarRequestOptions.data = localVarFormParams.toString();
99
+ return {
100
+ url: (0, common_1.toPathString)(localVarUrlObj),
101
+ options: localVarRequestOptions,
102
+ };
103
+ },
104
+ /**
105
+ * Remove Contributor. More details in the [documentation](https://poeditor.com/docs/api#contributors_remove).
106
+ * @summary Removes a contributor from a project language or an admin from a project, if the language is not specified.
107
+ * @param {string} id The id of project
108
+ * @param {string} email The email of contributor
109
+ * @param {string} [apiToken]
110
+ * @param {string} [language] The language code (Required if removing a contributor from a certain language)
111
+ * @param {*} [options] Override http request option.
112
+ * @throws {RequiredError}
113
+ */
114
+ contributorsRemove: async (id, email, apiToken, language, options = {}) => {
115
+ // verify required parameter 'id' is not null or undefined
116
+ (0, common_1.assertParamExists)('contributorsRemove', 'id', id);
117
+ // verify required parameter 'email' is not null or undefined
118
+ (0, common_1.assertParamExists)('contributorsRemove', 'email', email);
119
+ const localVarPath = `/contributors/remove`;
120
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
121
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
122
+ let baseOptions;
123
+ if (configuration) {
124
+ baseOptions = configuration.baseOptions;
125
+ }
126
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
127
+ const localVarHeaderParameter = {};
128
+ const localVarQueryParameter = {};
129
+ const localVarFormParams = new URLSearchParams();
130
+ if (apiToken !== undefined) {
131
+ localVarFormParams.set('api_token', apiToken);
132
+ }
133
+ if (id !== undefined) {
134
+ localVarFormParams.set('id', id);
135
+ }
136
+ if (email !== undefined) {
137
+ localVarFormParams.set('email', email);
138
+ }
139
+ if (language !== undefined) {
140
+ localVarFormParams.set('language', language);
141
+ }
142
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
143
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
144
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
145
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
146
+ localVarRequestOptions.data = localVarFormParams.toString();
147
+ return {
148
+ url: (0, common_1.toPathString)(localVarUrlObj),
149
+ options: localVarRequestOptions,
150
+ };
151
+ },
152
+ /**
153
+ * List Contributors. More details in the [documentation](https://poeditor.com/docs/api#contributors_list).
154
+ * @summary Returns the list of contributors from your projects.
155
+ * @param {string} [apiToken]
156
+ * @param {string} [id] The id of project (Optional, unless language is set. Then, it becomes required)
157
+ * @param {string} [language] The language code
158
+ * @param {*} [options] Override http request option.
159
+ * @throws {RequiredError}
160
+ */
161
+ translationsList: async (apiToken, id, language, options = {}) => {
162
+ const localVarPath = `/contributors/list`;
163
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
164
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
165
+ let baseOptions;
166
+ if (configuration) {
167
+ baseOptions = configuration.baseOptions;
168
+ }
169
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
170
+ const localVarHeaderParameter = {};
171
+ const localVarQueryParameter = {};
172
+ const localVarFormParams = new URLSearchParams();
173
+ if (apiToken !== undefined) {
174
+ localVarFormParams.set('api_token', apiToken);
175
+ }
176
+ if (id !== undefined) {
177
+ localVarFormParams.set('id', id);
178
+ }
179
+ if (language !== undefined) {
180
+ localVarFormParams.set('language', language);
181
+ }
182
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
183
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
184
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
185
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
186
+ localVarRequestOptions.data = localVarFormParams.toString();
187
+ return {
188
+ url: (0, common_1.toPathString)(localVarUrlObj),
189
+ options: localVarRequestOptions,
190
+ };
191
+ },
192
+ };
193
+ };
194
+ exports.ContributorsApiAxiosParamCreator = ContributorsApiAxiosParamCreator;
195
+ /**
196
+ * ContributorsApi - functional programming interface
197
+ * @export
198
+ */
199
+ const ContributorsApiFp = function (configuration) {
200
+ const localVarAxiosParamCreator = (0, exports.ContributorsApiAxiosParamCreator)(configuration);
201
+ return {
202
+ /**
203
+ * Add Contributor. More details in the [documentation](https://poeditor.com/docs/api#contributors_add).
204
+ * @summary Adds a contributor to a project language or an administrator to a project.
205
+ * @param {string} id The id of project
206
+ * @param {string} name The name of contributor
207
+ * @param {string} email The email of contributor
208
+ * @param {string} [apiToken]
209
+ * @param {string} [language] The language code (Required if adding a contributor)
210
+ * @param {ContributorsAddAdminEnum} [admin] Set it to 1 for adding as administrator
211
+ * @param {*} [options] Override http request option.
212
+ * @throws {RequiredError}
213
+ */
214
+ async contributorsAdd(id, name, email, apiToken, language, admin, options) {
215
+ const localVarAxiosArgs = await localVarAxiosParamCreator.contributorsAdd(id, name, email, apiToken, language, admin, options);
216
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
217
+ const localVarOperationServerBasePath = base_1.operationServerMap['ContributorsApi.contributorsAdd']?.[localVarOperationServerIndex]?.url;
218
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
219
+ },
220
+ /**
221
+ * Remove Contributor. More details in the [documentation](https://poeditor.com/docs/api#contributors_remove).
222
+ * @summary Removes a contributor from a project language or an admin from a project, if the language is not specified.
223
+ * @param {string} id The id of project
224
+ * @param {string} email The email of contributor
225
+ * @param {string} [apiToken]
226
+ * @param {string} [language] The language code (Required if removing a contributor from a certain language)
227
+ * @param {*} [options] Override http request option.
228
+ * @throws {RequiredError}
229
+ */
230
+ async contributorsRemove(id, email, apiToken, language, options) {
231
+ const localVarAxiosArgs = await localVarAxiosParamCreator.contributorsRemove(id, email, apiToken, language, options);
232
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
233
+ const localVarOperationServerBasePath = base_1.operationServerMap['ContributorsApi.contributorsRemove']?.[localVarOperationServerIndex]?.url;
234
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
235
+ },
236
+ /**
237
+ * List Contributors. More details in the [documentation](https://poeditor.com/docs/api#contributors_list).
238
+ * @summary Returns the list of contributors from your projects.
239
+ * @param {string} [apiToken]
240
+ * @param {string} [id] The id of project (Optional, unless language is set. Then, it becomes required)
241
+ * @param {string} [language] The language code
242
+ * @param {*} [options] Override http request option.
243
+ * @throws {RequiredError}
244
+ */
245
+ async translationsList(apiToken, id, language, options) {
246
+ const localVarAxiosArgs = await localVarAxiosParamCreator.translationsList(apiToken, id, language, options);
247
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
248
+ const localVarOperationServerBasePath = base_1.operationServerMap['ContributorsApi.translationsList']?.[localVarOperationServerIndex]?.url;
249
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
250
+ },
251
+ };
252
+ };
253
+ exports.ContributorsApiFp = ContributorsApiFp;
254
+ /**
255
+ * ContributorsApi - factory interface
256
+ * @export
257
+ */
258
+ const ContributorsApiFactory = function (configuration, basePath, axios) {
259
+ const localVarFp = (0, exports.ContributorsApiFp)(configuration);
260
+ return {
261
+ /**
262
+ * Add Contributor. More details in the [documentation](https://poeditor.com/docs/api#contributors_add).
263
+ * @summary Adds a contributor to a project language or an administrator to a project.
264
+ * @param {string} id The id of project
265
+ * @param {string} name The name of contributor
266
+ * @param {string} email The email of contributor
267
+ * @param {string} [apiToken]
268
+ * @param {string} [language] The language code (Required if adding a contributor)
269
+ * @param {ContributorsAddAdminEnum} [admin] Set it to 1 for adding as administrator
270
+ * @param {*} [options] Override http request option.
271
+ * @throws {RequiredError}
272
+ */
273
+ contributorsAdd(id, name, email, apiToken, language, admin, options) {
274
+ return localVarFp.contributorsAdd(id, name, email, apiToken, language, admin, options).then((request) => request(axios, basePath));
275
+ },
276
+ /**
277
+ * Remove Contributor. More details in the [documentation](https://poeditor.com/docs/api#contributors_remove).
278
+ * @summary Removes a contributor from a project language or an admin from a project, if the language is not specified.
279
+ * @param {string} id The id of project
280
+ * @param {string} email The email of contributor
281
+ * @param {string} [apiToken]
282
+ * @param {string} [language] The language code (Required if removing a contributor from a certain language)
283
+ * @param {*} [options] Override http request option.
284
+ * @throws {RequiredError}
285
+ */
286
+ contributorsRemove(id, email, apiToken, language, options) {
287
+ return localVarFp.contributorsRemove(id, email, apiToken, language, options).then((request) => request(axios, basePath));
288
+ },
289
+ /**
290
+ * List Contributors. More details in the [documentation](https://poeditor.com/docs/api#contributors_list).
291
+ * @summary Returns the list of contributors from your projects.
292
+ * @param {string} [apiToken]
293
+ * @param {string} [id] The id of project (Optional, unless language is set. Then, it becomes required)
294
+ * @param {string} [language] The language code
295
+ * @param {*} [options] Override http request option.
296
+ * @throws {RequiredError}
297
+ */
298
+ translationsList(apiToken, id, language, options) {
299
+ return localVarFp.translationsList(apiToken, id, language, options).then((request) => request(axios, basePath));
300
+ },
301
+ };
302
+ };
303
+ exports.ContributorsApiFactory = ContributorsApiFactory;
304
+ /**
305
+ * ContributorsApi - object-oriented interface
306
+ * @export
307
+ * @class ContributorsApi
308
+ * @extends {BaseAPI}
309
+ */
310
+ class ContributorsApi extends base_1.BaseAPI {
311
+ /**
312
+ * Add Contributor. More details in the [documentation](https://poeditor.com/docs/api#contributors_add).
313
+ * @summary Adds a contributor to a project language or an administrator to a project.
314
+ * @param {string} id The id of project
315
+ * @param {string} name The name of contributor
316
+ * @param {string} email The email of contributor
317
+ * @param {string} [apiToken]
318
+ * @param {string} [language] The language code (Required if adding a contributor)
319
+ * @param {ContributorsAddAdminEnum} [admin] Set it to 1 for adding as administrator
320
+ * @param {*} [options] Override http request option.
321
+ * @throws {RequiredError}
322
+ * @memberof ContributorsApi
323
+ */
324
+ contributorsAdd(id, name, email, apiToken, language, admin, options) {
325
+ return (0, exports.ContributorsApiFp)(this.configuration).contributorsAdd(id, name, email, apiToken, language, admin, options).then((request) => request(this.axios, this.basePath));
326
+ }
327
+ /**
328
+ * Remove Contributor. More details in the [documentation](https://poeditor.com/docs/api#contributors_remove).
329
+ * @summary Removes a contributor from a project language or an admin from a project, if the language is not specified.
330
+ * @param {string} id The id of project
331
+ * @param {string} email The email of contributor
332
+ * @param {string} [apiToken]
333
+ * @param {string} [language] The language code (Required if removing a contributor from a certain language)
334
+ * @param {*} [options] Override http request option.
335
+ * @throws {RequiredError}
336
+ * @memberof ContributorsApi
337
+ */
338
+ contributorsRemove(id, email, apiToken, language, options) {
339
+ return (0, exports.ContributorsApiFp)(this.configuration).contributorsRemove(id, email, apiToken, language, options).then((request) => request(this.axios, this.basePath));
340
+ }
341
+ /**
342
+ * List Contributors. More details in the [documentation](https://poeditor.com/docs/api#contributors_list).
343
+ * @summary Returns the list of contributors from your projects.
344
+ * @param {string} [apiToken]
345
+ * @param {string} [id] The id of project (Optional, unless language is set. Then, it becomes required)
346
+ * @param {string} [language] The language code
347
+ * @param {*} [options] Override http request option.
348
+ * @throws {RequiredError}
349
+ * @memberof ContributorsApi
350
+ */
351
+ translationsList(apiToken, id, language, options) {
352
+ return (0, exports.ContributorsApiFp)(this.configuration).translationsList(apiToken, id, language, options).then((request) => request(this.axios, this.basePath));
353
+ }
354
+ }
355
+ exports.ContributorsApi = ContributorsApi;
356
+ /**
357
+ * @export
358
+ */
359
+ exports.ContributorsAddAdminEnum = {
360
+ NUMBER_0: 0,
361
+ NUMBER_1: 1
362
+ };
363
+ /**
364
+ * LanguagesApi - axios parameter creator
365
+ * @export
366
+ */
367
+ const LanguagesApiAxiosParamCreator = function (configuration) {
368
+ return {
369
+ /**
370
+ * Add Language to Project. More details in the [documentation](https://poeditor.com/docs/api#languages_add).
371
+ * @summary Adds a new language to project.
372
+ * @param {number} id
373
+ * @param {string} language
374
+ * @param {string} [apiToken]
375
+ * @param {*} [options] Override http request option.
376
+ * @throws {RequiredError}
377
+ */
378
+ languagesAdd: async (id, language, apiToken, options = {}) => {
379
+ // verify required parameter 'id' is not null or undefined
380
+ (0, common_1.assertParamExists)('languagesAdd', 'id', id);
381
+ // verify required parameter 'language' is not null or undefined
382
+ (0, common_1.assertParamExists)('languagesAdd', 'language', language);
383
+ const localVarPath = `/languages/add`;
384
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
385
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
386
+ let baseOptions;
387
+ if (configuration) {
388
+ baseOptions = configuration.baseOptions;
389
+ }
390
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
391
+ const localVarHeaderParameter = {};
392
+ const localVarQueryParameter = {};
393
+ const localVarFormParams = new URLSearchParams();
394
+ if (apiToken !== undefined) {
395
+ localVarFormParams.set('api_token', apiToken);
396
+ }
397
+ if (id !== undefined) {
398
+ localVarFormParams.set('id', id);
399
+ }
400
+ if (language !== undefined) {
401
+ localVarFormParams.set('language', language);
402
+ }
403
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
404
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
405
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
406
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
407
+ localVarRequestOptions.data = localVarFormParams.toString();
408
+ return {
409
+ url: (0, common_1.toPathString)(localVarUrlObj),
410
+ options: localVarRequestOptions,
411
+ };
412
+ },
413
+ /**
414
+ * Delete Language from Project. More details in the [documentation](https://poeditor.com/docs/api#languages_delete).
415
+ * @summary Deletes existing language from project.
416
+ * @param {number} id
417
+ * @param {string} language
418
+ * @param {string} [apiToken]
419
+ * @param {*} [options] Override http request option.
420
+ * @throws {RequiredError}
421
+ */
422
+ languagesDelete: async (id, language, apiToken, options = {}) => {
423
+ // verify required parameter 'id' is not null or undefined
424
+ (0, common_1.assertParamExists)('languagesDelete', 'id', id);
425
+ // verify required parameter 'language' is not null or undefined
426
+ (0, common_1.assertParamExists)('languagesDelete', 'language', language);
427
+ const localVarPath = `/languages/delete`;
428
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
429
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
430
+ let baseOptions;
431
+ if (configuration) {
432
+ baseOptions = configuration.baseOptions;
433
+ }
434
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
435
+ const localVarHeaderParameter = {};
436
+ const localVarQueryParameter = {};
437
+ const localVarFormParams = new URLSearchParams();
438
+ if (apiToken !== undefined) {
439
+ localVarFormParams.set('api_token', apiToken);
440
+ }
441
+ if (id !== undefined) {
442
+ localVarFormParams.set('id', id);
443
+ }
444
+ if (language !== undefined) {
445
+ localVarFormParams.set('language', language);
446
+ }
447
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
448
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
449
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
450
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
451
+ localVarRequestOptions.data = localVarFormParams.toString();
452
+ return {
453
+ url: (0, common_1.toPathString)(localVarUrlObj),
454
+ options: localVarRequestOptions,
455
+ };
456
+ },
457
+ /**
458
+ * List Languages. More details in the [documentation](https://poeditor.com/docs/api#languages_list).
459
+ * @summary Returns project languages, percentage of translation done for each and the datetime (UTC - ISO 8601) when the last change was made.
460
+ * @param {number} id
461
+ * @param {string} [apiToken]
462
+ * @param {*} [options] Override http request option.
463
+ * @throws {RequiredError}
464
+ */
465
+ languagesList: async (id, apiToken, options = {}) => {
466
+ // verify required parameter 'id' is not null or undefined
467
+ (0, common_1.assertParamExists)('languagesList', 'id', id);
468
+ const localVarPath = `/languages/list`;
469
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
470
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
471
+ let baseOptions;
472
+ if (configuration) {
473
+ baseOptions = configuration.baseOptions;
474
+ }
475
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
476
+ const localVarHeaderParameter = {};
477
+ const localVarQueryParameter = {};
478
+ const localVarFormParams = new URLSearchParams();
479
+ if (apiToken !== undefined) {
480
+ localVarFormParams.set('api_token', apiToken);
481
+ }
482
+ if (id !== undefined) {
483
+ localVarFormParams.set('id', id);
484
+ }
485
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
486
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
487
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
488
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
489
+ localVarRequestOptions.data = localVarFormParams.toString();
490
+ return {
491
+ url: (0, common_1.toPathString)(localVarUrlObj),
492
+ options: localVarRequestOptions,
493
+ };
494
+ },
495
+ /**
496
+ * Update Project Language. More details in the [documentation](https://poeditor.com/docs/api#languages_update).
497
+ * @summary Inserts / overwrites translations.
498
+ * @param {number} id
499
+ * @param {string} language The language code
500
+ * @param {string} data JSON format
501
+ * @param {string} [apiToken]
502
+ * @param {LanguagesUpdateFuzzyTriggerEnum} [fuzzyTrigger] Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
503
+ * @param {*} [options] Override http request option.
504
+ * @throws {RequiredError}
505
+ */
506
+ languagesUpdate: async (id, language, data, apiToken, fuzzyTrigger, options = {}) => {
507
+ // verify required parameter 'id' is not null or undefined
508
+ (0, common_1.assertParamExists)('languagesUpdate', 'id', id);
509
+ // verify required parameter 'language' is not null or undefined
510
+ (0, common_1.assertParamExists)('languagesUpdate', 'language', language);
511
+ // verify required parameter 'data' is not null or undefined
512
+ (0, common_1.assertParamExists)('languagesUpdate', 'data', data);
513
+ const localVarPath = `/languages/update`;
514
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
515
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
516
+ let baseOptions;
517
+ if (configuration) {
518
+ baseOptions = configuration.baseOptions;
519
+ }
520
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
521
+ const localVarHeaderParameter = {};
522
+ const localVarQueryParameter = {};
523
+ const localVarFormParams = new URLSearchParams();
524
+ if (apiToken !== undefined) {
525
+ localVarFormParams.set('api_token', apiToken);
526
+ }
527
+ if (id !== undefined) {
528
+ localVarFormParams.set('id', id);
529
+ }
530
+ if (language !== undefined) {
531
+ localVarFormParams.set('language', language);
532
+ }
533
+ if (fuzzyTrigger !== undefined) {
534
+ localVarFormParams.set('fuzzy_trigger', fuzzyTrigger);
535
+ }
536
+ if (data !== undefined) {
537
+ localVarFormParams.set('data', data);
538
+ }
539
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
540
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
541
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
542
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
543
+ localVarRequestOptions.data = localVarFormParams.toString();
544
+ return {
545
+ url: (0, common_1.toPathString)(localVarUrlObj),
546
+ options: localVarRequestOptions,
547
+ };
548
+ },
549
+ /**
550
+ * List Languages. More details in the [documentation](https://poeditor.com/docs/api#languages_available).
551
+ * @summary Returns project languages, percentage of translation done for each and the datetime (UTC - ISO 8601) when the last change was made.
552
+ * @param {number} id
553
+ * @param {string} [apiToken]
554
+ * @param {*} [options] Override http request option.
555
+ * @throws {RequiredError}
556
+ */
557
+ projectsAvailable: async (id, apiToken, options = {}) => {
558
+ // verify required parameter 'id' is not null or undefined
559
+ (0, common_1.assertParamExists)('projectsAvailable', 'id', id);
560
+ const localVarPath = `/languages/available`;
561
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
562
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
563
+ let baseOptions;
564
+ if (configuration) {
565
+ baseOptions = configuration.baseOptions;
566
+ }
567
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
568
+ const localVarHeaderParameter = {};
569
+ const localVarQueryParameter = {};
570
+ const localVarFormParams = new URLSearchParams();
571
+ if (apiToken !== undefined) {
572
+ localVarFormParams.set('api_token', apiToken);
573
+ }
574
+ if (id !== undefined) {
575
+ localVarFormParams.set('id', id);
576
+ }
577
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
578
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
579
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
580
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
581
+ localVarRequestOptions.data = localVarFormParams.toString();
582
+ return {
583
+ url: (0, common_1.toPathString)(localVarUrlObj),
584
+ options: localVarRequestOptions,
585
+ };
586
+ },
587
+ };
588
+ };
589
+ exports.LanguagesApiAxiosParamCreator = LanguagesApiAxiosParamCreator;
590
+ /**
591
+ * LanguagesApi - functional programming interface
592
+ * @export
593
+ */
594
+ const LanguagesApiFp = function (configuration) {
595
+ const localVarAxiosParamCreator = (0, exports.LanguagesApiAxiosParamCreator)(configuration);
596
+ return {
597
+ /**
598
+ * Add Language to Project. More details in the [documentation](https://poeditor.com/docs/api#languages_add).
599
+ * @summary Adds a new language to project.
600
+ * @param {number} id
601
+ * @param {string} language
602
+ * @param {string} [apiToken]
603
+ * @param {*} [options] Override http request option.
604
+ * @throws {RequiredError}
605
+ */
606
+ async languagesAdd(id, language, apiToken, options) {
607
+ const localVarAxiosArgs = await localVarAxiosParamCreator.languagesAdd(id, language, apiToken, options);
608
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
609
+ const localVarOperationServerBasePath = base_1.operationServerMap['LanguagesApi.languagesAdd']?.[localVarOperationServerIndex]?.url;
610
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
611
+ },
612
+ /**
613
+ * Delete Language from Project. More details in the [documentation](https://poeditor.com/docs/api#languages_delete).
614
+ * @summary Deletes existing language from project.
615
+ * @param {number} id
616
+ * @param {string} language
617
+ * @param {string} [apiToken]
618
+ * @param {*} [options] Override http request option.
619
+ * @throws {RequiredError}
620
+ */
621
+ async languagesDelete(id, language, apiToken, options) {
622
+ const localVarAxiosArgs = await localVarAxiosParamCreator.languagesDelete(id, language, apiToken, options);
623
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
624
+ const localVarOperationServerBasePath = base_1.operationServerMap['LanguagesApi.languagesDelete']?.[localVarOperationServerIndex]?.url;
625
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
626
+ },
627
+ /**
628
+ * List Languages. More details in the [documentation](https://poeditor.com/docs/api#languages_list).
629
+ * @summary Returns project languages, percentage of translation done for each and the datetime (UTC - ISO 8601) when the last change was made.
630
+ * @param {number} id
631
+ * @param {string} [apiToken]
632
+ * @param {*} [options] Override http request option.
633
+ * @throws {RequiredError}
634
+ */
635
+ async languagesList(id, apiToken, options) {
636
+ const localVarAxiosArgs = await localVarAxiosParamCreator.languagesList(id, apiToken, options);
637
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
638
+ const localVarOperationServerBasePath = base_1.operationServerMap['LanguagesApi.languagesList']?.[localVarOperationServerIndex]?.url;
639
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
640
+ },
641
+ /**
642
+ * Update Project Language. More details in the [documentation](https://poeditor.com/docs/api#languages_update).
643
+ * @summary Inserts / overwrites translations.
644
+ * @param {number} id
645
+ * @param {string} language The language code
646
+ * @param {string} data JSON format
647
+ * @param {string} [apiToken]
648
+ * @param {LanguagesUpdateFuzzyTriggerEnum} [fuzzyTrigger] Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
649
+ * @param {*} [options] Override http request option.
650
+ * @throws {RequiredError}
651
+ */
652
+ async languagesUpdate(id, language, data, apiToken, fuzzyTrigger, options) {
653
+ const localVarAxiosArgs = await localVarAxiosParamCreator.languagesUpdate(id, language, data, apiToken, fuzzyTrigger, options);
654
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
655
+ const localVarOperationServerBasePath = base_1.operationServerMap['LanguagesApi.languagesUpdate']?.[localVarOperationServerIndex]?.url;
656
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
657
+ },
658
+ /**
659
+ * List Languages. More details in the [documentation](https://poeditor.com/docs/api#languages_available).
660
+ * @summary Returns project languages, percentage of translation done for each and the datetime (UTC - ISO 8601) when the last change was made.
661
+ * @param {number} id
662
+ * @param {string} [apiToken]
663
+ * @param {*} [options] Override http request option.
664
+ * @throws {RequiredError}
665
+ */
666
+ async projectsAvailable(id, apiToken, options) {
667
+ const localVarAxiosArgs = await localVarAxiosParamCreator.projectsAvailable(id, apiToken, options);
668
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
669
+ const localVarOperationServerBasePath = base_1.operationServerMap['LanguagesApi.projectsAvailable']?.[localVarOperationServerIndex]?.url;
670
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
671
+ },
672
+ };
673
+ };
674
+ exports.LanguagesApiFp = LanguagesApiFp;
675
+ /**
676
+ * LanguagesApi - factory interface
677
+ * @export
678
+ */
679
+ const LanguagesApiFactory = function (configuration, basePath, axios) {
680
+ const localVarFp = (0, exports.LanguagesApiFp)(configuration);
681
+ return {
682
+ /**
683
+ * Add Language to Project. More details in the [documentation](https://poeditor.com/docs/api#languages_add).
684
+ * @summary Adds a new language to project.
685
+ * @param {number} id
686
+ * @param {string} language
687
+ * @param {string} [apiToken]
688
+ * @param {*} [options] Override http request option.
689
+ * @throws {RequiredError}
690
+ */
691
+ languagesAdd(id, language, apiToken, options) {
692
+ return localVarFp.languagesAdd(id, language, apiToken, options).then((request) => request(axios, basePath));
693
+ },
694
+ /**
695
+ * Delete Language from Project. More details in the [documentation](https://poeditor.com/docs/api#languages_delete).
696
+ * @summary Deletes existing language from project.
697
+ * @param {number} id
698
+ * @param {string} language
699
+ * @param {string} [apiToken]
700
+ * @param {*} [options] Override http request option.
701
+ * @throws {RequiredError}
702
+ */
703
+ languagesDelete(id, language, apiToken, options) {
704
+ return localVarFp.languagesDelete(id, language, apiToken, options).then((request) => request(axios, basePath));
705
+ },
706
+ /**
707
+ * List Languages. More details in the [documentation](https://poeditor.com/docs/api#languages_list).
708
+ * @summary Returns project languages, percentage of translation done for each and the datetime (UTC - ISO 8601) when the last change was made.
709
+ * @param {number} id
710
+ * @param {string} [apiToken]
711
+ * @param {*} [options] Override http request option.
712
+ * @throws {RequiredError}
713
+ */
714
+ languagesList(id, apiToken, options) {
715
+ return localVarFp.languagesList(id, apiToken, options).then((request) => request(axios, basePath));
716
+ },
717
+ /**
718
+ * Update Project Language. More details in the [documentation](https://poeditor.com/docs/api#languages_update).
719
+ * @summary Inserts / overwrites translations.
720
+ * @param {number} id
721
+ * @param {string} language The language code
722
+ * @param {string} data JSON format
723
+ * @param {string} [apiToken]
724
+ * @param {LanguagesUpdateFuzzyTriggerEnum} [fuzzyTrigger] Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
725
+ * @param {*} [options] Override http request option.
726
+ * @throws {RequiredError}
727
+ */
728
+ languagesUpdate(id, language, data, apiToken, fuzzyTrigger, options) {
729
+ return localVarFp.languagesUpdate(id, language, data, apiToken, fuzzyTrigger, options).then((request) => request(axios, basePath));
730
+ },
731
+ /**
732
+ * List Languages. More details in the [documentation](https://poeditor.com/docs/api#languages_available).
733
+ * @summary Returns project languages, percentage of translation done for each and the datetime (UTC - ISO 8601) when the last change was made.
734
+ * @param {number} id
735
+ * @param {string} [apiToken]
736
+ * @param {*} [options] Override http request option.
737
+ * @throws {RequiredError}
738
+ */
739
+ projectsAvailable(id, apiToken, options) {
740
+ return localVarFp.projectsAvailable(id, apiToken, options).then((request) => request(axios, basePath));
741
+ },
742
+ };
743
+ };
744
+ exports.LanguagesApiFactory = LanguagesApiFactory;
745
+ /**
746
+ * LanguagesApi - object-oriented interface
747
+ * @export
748
+ * @class LanguagesApi
749
+ * @extends {BaseAPI}
750
+ */
751
+ class LanguagesApi extends base_1.BaseAPI {
752
+ /**
753
+ * Add Language to Project. More details in the [documentation](https://poeditor.com/docs/api#languages_add).
754
+ * @summary Adds a new language to project.
755
+ * @param {number} id
756
+ * @param {string} language
757
+ * @param {string} [apiToken]
758
+ * @param {*} [options] Override http request option.
759
+ * @throws {RequiredError}
760
+ * @memberof LanguagesApi
761
+ */
762
+ languagesAdd(id, language, apiToken, options) {
763
+ return (0, exports.LanguagesApiFp)(this.configuration).languagesAdd(id, language, apiToken, options).then((request) => request(this.axios, this.basePath));
764
+ }
765
+ /**
766
+ * Delete Language from Project. More details in the [documentation](https://poeditor.com/docs/api#languages_delete).
767
+ * @summary Deletes existing language from project.
768
+ * @param {number} id
769
+ * @param {string} language
770
+ * @param {string} [apiToken]
771
+ * @param {*} [options] Override http request option.
772
+ * @throws {RequiredError}
773
+ * @memberof LanguagesApi
774
+ */
775
+ languagesDelete(id, language, apiToken, options) {
776
+ return (0, exports.LanguagesApiFp)(this.configuration).languagesDelete(id, language, apiToken, options).then((request) => request(this.axios, this.basePath));
777
+ }
778
+ /**
779
+ * List Languages. More details in the [documentation](https://poeditor.com/docs/api#languages_list).
780
+ * @summary Returns project languages, percentage of translation done for each and the datetime (UTC - ISO 8601) when the last change was made.
781
+ * @param {number} id
782
+ * @param {string} [apiToken]
783
+ * @param {*} [options] Override http request option.
784
+ * @throws {RequiredError}
785
+ * @memberof LanguagesApi
786
+ */
787
+ languagesList(id, apiToken, options) {
788
+ return (0, exports.LanguagesApiFp)(this.configuration).languagesList(id, apiToken, options).then((request) => request(this.axios, this.basePath));
789
+ }
790
+ /**
791
+ * Update Project Language. More details in the [documentation](https://poeditor.com/docs/api#languages_update).
792
+ * @summary Inserts / overwrites translations.
793
+ * @param {number} id
794
+ * @param {string} language The language code
795
+ * @param {string} data JSON format
796
+ * @param {string} [apiToken]
797
+ * @param {LanguagesUpdateFuzzyTriggerEnum} [fuzzyTrigger] Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
798
+ * @param {*} [options] Override http request option.
799
+ * @throws {RequiredError}
800
+ * @memberof LanguagesApi
801
+ */
802
+ languagesUpdate(id, language, data, apiToken, fuzzyTrigger, options) {
803
+ return (0, exports.LanguagesApiFp)(this.configuration).languagesUpdate(id, language, data, apiToken, fuzzyTrigger, options).then((request) => request(this.axios, this.basePath));
804
+ }
805
+ /**
806
+ * List Languages. More details in the [documentation](https://poeditor.com/docs/api#languages_available).
807
+ * @summary Returns project languages, percentage of translation done for each and the datetime (UTC - ISO 8601) when the last change was made.
808
+ * @param {number} id
809
+ * @param {string} [apiToken]
810
+ * @param {*} [options] Override http request option.
811
+ * @throws {RequiredError}
812
+ * @memberof LanguagesApi
813
+ */
814
+ projectsAvailable(id, apiToken, options) {
815
+ return (0, exports.LanguagesApiFp)(this.configuration).projectsAvailable(id, apiToken, options).then((request) => request(this.axios, this.basePath));
816
+ }
817
+ }
818
+ exports.LanguagesApi = LanguagesApi;
819
+ /**
820
+ * @export
821
+ */
822
+ exports.LanguagesUpdateFuzzyTriggerEnum = {
823
+ NUMBER_0: 0,
824
+ NUMBER_1: 1
825
+ };
826
+ /**
827
+ * ProjectsApi - axios parameter creator
828
+ * @export
829
+ */
830
+ const ProjectsApiAxiosParamCreator = function (configuration) {
831
+ return {
832
+ /**
833
+ * Add Project. More details in the [documentation](https://poeditor.com/docs/api#projects_add).
834
+ * @summary Creates a new project. Returns project details (if successful).
835
+ * @param {string} name
836
+ * @param {string} [apiToken]
837
+ * @param {string} [description]
838
+ * @param {*} [options] Override http request option.
839
+ * @throws {RequiredError}
840
+ */
841
+ projectsAdd: async (name, apiToken, description, options = {}) => {
842
+ // verify required parameter 'name' is not null or undefined
843
+ (0, common_1.assertParamExists)('projectsAdd', 'name', name);
844
+ const localVarPath = `/projects/add`;
845
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
846
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
847
+ let baseOptions;
848
+ if (configuration) {
849
+ baseOptions = configuration.baseOptions;
850
+ }
851
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
852
+ const localVarHeaderParameter = {};
853
+ const localVarQueryParameter = {};
854
+ const localVarFormParams = new URLSearchParams();
855
+ if (apiToken !== undefined) {
856
+ localVarFormParams.set('api_token', apiToken);
857
+ }
858
+ if (name !== undefined) {
859
+ localVarFormParams.set('name', name);
860
+ }
861
+ if (description !== undefined) {
862
+ localVarFormParams.set('description', description);
863
+ }
864
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
865
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
866
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
867
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
868
+ localVarRequestOptions.data = localVarFormParams.toString();
869
+ return {
870
+ url: (0, common_1.toPathString)(localVarUrlObj),
871
+ options: localVarRequestOptions,
872
+ };
873
+ },
874
+ /**
875
+ * Delete Project. More details in the [documentation](https://poeditor.com/docs/api#projects_delete).
876
+ * @summary Deletes the project from the account. You must be the owner of the project.
877
+ * @param {number} id
878
+ * @param {string} [apiToken]
879
+ * @param {*} [options] Override http request option.
880
+ * @throws {RequiredError}
881
+ */
882
+ projectsDelete: async (id, apiToken, options = {}) => {
883
+ // verify required parameter 'id' is not null or undefined
884
+ (0, common_1.assertParamExists)('projectsDelete', 'id', id);
885
+ const localVarPath = `/projects/delete`;
886
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
887
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
888
+ let baseOptions;
889
+ if (configuration) {
890
+ baseOptions = configuration.baseOptions;
891
+ }
892
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
893
+ const localVarHeaderParameter = {};
894
+ const localVarQueryParameter = {};
895
+ const localVarFormParams = new URLSearchParams();
896
+ if (apiToken !== undefined) {
897
+ localVarFormParams.set('api_token', apiToken);
898
+ }
899
+ if (id !== undefined) {
900
+ localVarFormParams.set('id', id);
901
+ }
902
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
903
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
904
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
905
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
906
+ localVarRequestOptions.data = localVarFormParams.toString();
907
+ return {
908
+ url: (0, common_1.toPathString)(localVarUrlObj),
909
+ options: localVarRequestOptions,
910
+ };
911
+ },
912
+ /**
913
+ * Export. More details in the [documentation](https://poeditor.com/docs/api#projects_export).
914
+ * @summary Returns the link of the file (expires after 10 minutes). The settings inherited from the project will be the ones at the time of the download.
915
+ * @param {number} id
916
+ * @param {string} language
917
+ * @param {ProjectsExportTypeEnum} type
918
+ * @param {string} [apiToken]
919
+ * @param {string} [filters]
920
+ * @param {string} [order]
921
+ * @param {string} [tags]
922
+ * @param {ProjectsExportOptionsEnum} [_options]
923
+ * @param {*} [options] Override http request option.
924
+ * @throws {RequiredError}
925
+ */
926
+ projectsExport: async (id, language, type, apiToken, filters, order, tags, _options, options = {}) => {
927
+ // verify required parameter 'id' is not null or undefined
928
+ (0, common_1.assertParamExists)('projectsExport', 'id', id);
929
+ // verify required parameter 'language' is not null or undefined
930
+ (0, common_1.assertParamExists)('projectsExport', 'language', language);
931
+ // verify required parameter 'type' is not null or undefined
932
+ (0, common_1.assertParamExists)('projectsExport', 'type', type);
933
+ const localVarPath = `/projects/export`;
934
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
935
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
936
+ let baseOptions;
937
+ if (configuration) {
938
+ baseOptions = configuration.baseOptions;
939
+ }
940
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
941
+ const localVarHeaderParameter = {};
942
+ const localVarQueryParameter = {};
943
+ const localVarFormParams = new URLSearchParams();
944
+ if (apiToken !== undefined) {
945
+ localVarFormParams.set('api_token', apiToken);
946
+ }
947
+ if (id !== undefined) {
948
+ localVarFormParams.set('id', id);
949
+ }
950
+ if (language !== undefined) {
951
+ localVarFormParams.set('language', language);
952
+ }
953
+ if (type !== undefined) {
954
+ localVarFormParams.set('type', type);
955
+ }
956
+ if (filters !== undefined) {
957
+ localVarFormParams.set('filters', filters);
958
+ }
959
+ if (order !== undefined) {
960
+ localVarFormParams.set('order', order);
961
+ }
962
+ if (tags !== undefined) {
963
+ localVarFormParams.set('tags', tags);
964
+ }
965
+ if (_options !== undefined) {
966
+ localVarFormParams.set('options', _options);
967
+ }
968
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
969
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
970
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
971
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
972
+ localVarRequestOptions.data = localVarFormParams.toString();
973
+ return {
974
+ url: (0, common_1.toPathString)(localVarUrlObj),
975
+ options: localVarRequestOptions,
976
+ };
977
+ },
978
+ /**
979
+ * List Projects. More details in the [documentation](https://poeditor.com/docs/api#projects_list).
980
+ * @summary Returns the list of projects owned by user.
981
+ * @param {string} apiToken
982
+ * @param {*} [options] Override http request option.
983
+ * @throws {RequiredError}
984
+ */
985
+ projectsList: async (apiToken, options = {}) => {
986
+ // verify required parameter 'apiToken' is not null or undefined
987
+ (0, common_1.assertParamExists)('projectsList', 'apiToken', apiToken);
988
+ const localVarPath = `/projects/list`;
989
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
990
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
991
+ let baseOptions;
992
+ if (configuration) {
993
+ baseOptions = configuration.baseOptions;
994
+ }
995
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
996
+ const localVarHeaderParameter = {};
997
+ const localVarQueryParameter = {};
998
+ const localVarFormParams = new URLSearchParams();
999
+ if (apiToken !== undefined) {
1000
+ localVarFormParams.set('api_token', apiToken);
1001
+ }
1002
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
1003
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1004
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1005
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1006
+ localVarRequestOptions.data = localVarFormParams.toString();
1007
+ return {
1008
+ url: (0, common_1.toPathString)(localVarUrlObj),
1009
+ options: localVarRequestOptions,
1010
+ };
1011
+ },
1012
+ /**
1013
+ * Sync Terms. More details in the [documentation](https://poeditor.com/docs/api#projects_sync).
1014
+ * @summary Syncs your project with the array you send (terms that are not found in the JSON object will be deleted from project and the new ones added). Please use with caution. If wrong data is sent, existing terms and their translations might be irreversibly lost.
1015
+ * @param {number} id
1016
+ * @param {string} data JSON format
1017
+ * @param {string} [apiToken]
1018
+ * @param {*} [options] Override http request option.
1019
+ * @throws {RequiredError}
1020
+ */
1021
+ projectsSync: async (id, data, apiToken, options = {}) => {
1022
+ // verify required parameter 'id' is not null or undefined
1023
+ (0, common_1.assertParamExists)('projectsSync', 'id', id);
1024
+ // verify required parameter 'data' is not null or undefined
1025
+ (0, common_1.assertParamExists)('projectsSync', 'data', data);
1026
+ const localVarPath = `/projects/sync`;
1027
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1028
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1029
+ let baseOptions;
1030
+ if (configuration) {
1031
+ baseOptions = configuration.baseOptions;
1032
+ }
1033
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1034
+ const localVarHeaderParameter = {};
1035
+ const localVarQueryParameter = {};
1036
+ const localVarFormParams = new URLSearchParams();
1037
+ if (apiToken !== undefined) {
1038
+ localVarFormParams.set('api_token', apiToken);
1039
+ }
1040
+ if (id !== undefined) {
1041
+ localVarFormParams.set('id', id);
1042
+ }
1043
+ if (data !== undefined) {
1044
+ localVarFormParams.set('data', data);
1045
+ }
1046
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
1047
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1048
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1049
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1050
+ localVarRequestOptions.data = localVarFormParams.toString();
1051
+ return {
1052
+ url: (0, common_1.toPathString)(localVarUrlObj),
1053
+ options: localVarRequestOptions,
1054
+ };
1055
+ },
1056
+ /**
1057
+ * Update Project Settings. More details in the [documentation](https://poeditor.com/docs/api#projects_update).
1058
+ * @summary Updates project settings (name, description, reference language, fallback language). If optional parameters are not sent, their respective fields are not updated.
1059
+ * @param {number} id
1060
+ * @param {string} [apiToken]
1061
+ * @param {string} [name]
1062
+ * @param {string} [description]
1063
+ * @param {string} [referenceLanguage]
1064
+ * @param {string} [fallbackLanguage]
1065
+ * @param {*} [options] Override http request option.
1066
+ * @throws {RequiredError}
1067
+ */
1068
+ projectsUpdate: async (id, apiToken, name, description, referenceLanguage, fallbackLanguage, options = {}) => {
1069
+ // verify required parameter 'id' is not null or undefined
1070
+ (0, common_1.assertParamExists)('projectsUpdate', 'id', id);
1071
+ const localVarPath = `/projects/update`;
1072
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1073
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1074
+ let baseOptions;
1075
+ if (configuration) {
1076
+ baseOptions = configuration.baseOptions;
1077
+ }
1078
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1079
+ const localVarHeaderParameter = {};
1080
+ const localVarQueryParameter = {};
1081
+ const localVarFormParams = new URLSearchParams();
1082
+ if (apiToken !== undefined) {
1083
+ localVarFormParams.set('api_token', apiToken);
1084
+ }
1085
+ if (id !== undefined) {
1086
+ localVarFormParams.set('id', id);
1087
+ }
1088
+ if (name !== undefined) {
1089
+ localVarFormParams.set('name', name);
1090
+ }
1091
+ if (description !== undefined) {
1092
+ localVarFormParams.set('description', description);
1093
+ }
1094
+ if (referenceLanguage !== undefined) {
1095
+ localVarFormParams.set('reference_language', referenceLanguage);
1096
+ }
1097
+ if (fallbackLanguage !== undefined) {
1098
+ localVarFormParams.set('fallback_language', fallbackLanguage);
1099
+ }
1100
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
1101
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1102
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1103
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1104
+ localVarRequestOptions.data = localVarFormParams.toString();
1105
+ return {
1106
+ url: (0, common_1.toPathString)(localVarUrlObj),
1107
+ options: localVarRequestOptions,
1108
+ };
1109
+ },
1110
+ /**
1111
+ * Upload. More details in the [documentation](https://poeditor.com/docs/api#projects_upload).
1112
+ * @summary Updates terms / translations - No more than one request every 20 seconds.
1113
+ * @param {ProjectsUploadUpdatingEnum} updating
1114
+ * @param {File} file Uploaded file (.po, .xls or any of the supported file formats)
1115
+ * @param {string} [apiToken]
1116
+ * @param {number} [id]
1117
+ * @param {string} [language] The language code (Required only if `updating` is terms_translations or translations). When using `terms_translations` with `.xcstrings` file format, leave it empty to import all the languages in the file.
1118
+ * @param {ProjectsUploadOverwriteEnum} [overwrite] Set it to 1 if you want to overwrite translations
1119
+ * @param {ProjectsUploadSyncTermsEnum} [syncTerms] Set it to 1 if you want to sync your terms (terms that are not found in the uploaded file will be deleted from project and the new ones added). Ignored if `updating` = translations.
1120
+ * @param {string} [tags] Add tags to the project terms; available when updating terms or terms_translations; you can use the following keys: \\\"all\\\" - for the all the imported terms, \\\"new\\\" - for the terms which arent already in the project, \\\"obsolete\\\" - for the terms which are in the project but not in the imported file and \\\"overwritten_translations\\\" - for the terms for which translations change
1121
+ * @param {ProjectsUploadReadFromSourceEnum} [readFromSource] For .xliff format only - set it to 1 if you want to import translations from the source tag
1122
+ * @param {ProjectsUploadFuzzyTriggerEnum} [fuzzyTrigger] Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
1123
+ * @param {*} [options] Override http request option.
1124
+ * @throws {RequiredError}
1125
+ */
1126
+ projectsUpload: async (updating, file, apiToken, id, language, overwrite, syncTerms, tags, readFromSource, fuzzyTrigger, options = {}) => {
1127
+ // verify required parameter 'updating' is not null or undefined
1128
+ (0, common_1.assertParamExists)('projectsUpload', 'updating', updating);
1129
+ // verify required parameter 'file' is not null or undefined
1130
+ (0, common_1.assertParamExists)('projectsUpload', 'file', file);
1131
+ const localVarPath = `/projects/upload`;
1132
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1133
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1134
+ let baseOptions;
1135
+ if (configuration) {
1136
+ baseOptions = configuration.baseOptions;
1137
+ }
1138
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1139
+ const localVarHeaderParameter = {};
1140
+ const localVarQueryParameter = {};
1141
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
1142
+ if (apiToken !== undefined) {
1143
+ localVarFormParams.append('api_token', apiToken);
1144
+ }
1145
+ if (id !== undefined) {
1146
+ localVarFormParams.append('id', id);
1147
+ }
1148
+ if (updating !== undefined) {
1149
+ localVarFormParams.append('updating', updating);
1150
+ }
1151
+ if (file !== undefined) {
1152
+ localVarFormParams.append('file', file);
1153
+ }
1154
+ if (language !== undefined) {
1155
+ localVarFormParams.append('language', language);
1156
+ }
1157
+ if (overwrite !== undefined) {
1158
+ localVarFormParams.append('overwrite', overwrite);
1159
+ }
1160
+ if (syncTerms !== undefined) {
1161
+ localVarFormParams.append('sync_terms', syncTerms);
1162
+ }
1163
+ if (tags !== undefined) {
1164
+ localVarFormParams.append('tags', tags);
1165
+ }
1166
+ if (readFromSource !== undefined) {
1167
+ localVarFormParams.append('read_from_source', readFromSource);
1168
+ }
1169
+ if (fuzzyTrigger !== undefined) {
1170
+ localVarFormParams.append('fuzzy_trigger', fuzzyTrigger);
1171
+ }
1172
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
1173
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1174
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1175
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1176
+ localVarRequestOptions.data = localVarFormParams;
1177
+ return {
1178
+ url: (0, common_1.toPathString)(localVarUrlObj),
1179
+ options: localVarRequestOptions,
1180
+ };
1181
+ },
1182
+ /**
1183
+ * View Project Details. More details in the [documentation](https://poeditor.com/docs/api#projects_view).
1184
+ * @summary Returns projects details
1185
+ * @param {number} id
1186
+ * @param {string} [apiToken]
1187
+ * @param {*} [options] Override http request option.
1188
+ * @throws {RequiredError}
1189
+ */
1190
+ projectsView: async (id, apiToken, options = {}) => {
1191
+ // verify required parameter 'id' is not null or undefined
1192
+ (0, common_1.assertParamExists)('projectsView', 'id', id);
1193
+ const localVarPath = `/projects/view`;
1194
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1195
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1196
+ let baseOptions;
1197
+ if (configuration) {
1198
+ baseOptions = configuration.baseOptions;
1199
+ }
1200
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1201
+ const localVarHeaderParameter = {};
1202
+ const localVarQueryParameter = {};
1203
+ const localVarFormParams = new URLSearchParams();
1204
+ if (apiToken !== undefined) {
1205
+ localVarFormParams.set('api_token', apiToken);
1206
+ }
1207
+ if (id !== undefined) {
1208
+ localVarFormParams.set('id', id);
1209
+ }
1210
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
1211
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1212
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1213
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1214
+ localVarRequestOptions.data = localVarFormParams.toString();
1215
+ return {
1216
+ url: (0, common_1.toPathString)(localVarUrlObj),
1217
+ options: localVarRequestOptions,
1218
+ };
1219
+ },
1220
+ };
1221
+ };
1222
+ exports.ProjectsApiAxiosParamCreator = ProjectsApiAxiosParamCreator;
1223
+ /**
1224
+ * ProjectsApi - functional programming interface
1225
+ * @export
1226
+ */
1227
+ const ProjectsApiFp = function (configuration) {
1228
+ const localVarAxiosParamCreator = (0, exports.ProjectsApiAxiosParamCreator)(configuration);
1229
+ return {
1230
+ /**
1231
+ * Add Project. More details in the [documentation](https://poeditor.com/docs/api#projects_add).
1232
+ * @summary Creates a new project. Returns project details (if successful).
1233
+ * @param {string} name
1234
+ * @param {string} [apiToken]
1235
+ * @param {string} [description]
1236
+ * @param {*} [options] Override http request option.
1237
+ * @throws {RequiredError}
1238
+ */
1239
+ async projectsAdd(name, apiToken, description, options) {
1240
+ const localVarAxiosArgs = await localVarAxiosParamCreator.projectsAdd(name, apiToken, description, options);
1241
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1242
+ const localVarOperationServerBasePath = base_1.operationServerMap['ProjectsApi.projectsAdd']?.[localVarOperationServerIndex]?.url;
1243
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1244
+ },
1245
+ /**
1246
+ * Delete Project. More details in the [documentation](https://poeditor.com/docs/api#projects_delete).
1247
+ * @summary Deletes the project from the account. You must be the owner of the project.
1248
+ * @param {number} id
1249
+ * @param {string} [apiToken]
1250
+ * @param {*} [options] Override http request option.
1251
+ * @throws {RequiredError}
1252
+ */
1253
+ async projectsDelete(id, apiToken, options) {
1254
+ const localVarAxiosArgs = await localVarAxiosParamCreator.projectsDelete(id, apiToken, options);
1255
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1256
+ const localVarOperationServerBasePath = base_1.operationServerMap['ProjectsApi.projectsDelete']?.[localVarOperationServerIndex]?.url;
1257
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1258
+ },
1259
+ /**
1260
+ * Export. More details in the [documentation](https://poeditor.com/docs/api#projects_export).
1261
+ * @summary Returns the link of the file (expires after 10 minutes). The settings inherited from the project will be the ones at the time of the download.
1262
+ * @param {number} id
1263
+ * @param {string} language
1264
+ * @param {ProjectsExportTypeEnum} type
1265
+ * @param {string} [apiToken]
1266
+ * @param {string} [filters]
1267
+ * @param {string} [order]
1268
+ * @param {string} [tags]
1269
+ * @param {ProjectsExportOptionsEnum} [_options]
1270
+ * @param {*} [options] Override http request option.
1271
+ * @throws {RequiredError}
1272
+ */
1273
+ async projectsExport(id, language, type, apiToken, filters, order, tags, _options, options) {
1274
+ const localVarAxiosArgs = await localVarAxiosParamCreator.projectsExport(id, language, type, apiToken, filters, order, tags, _options, options);
1275
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1276
+ const localVarOperationServerBasePath = base_1.operationServerMap['ProjectsApi.projectsExport']?.[localVarOperationServerIndex]?.url;
1277
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1278
+ },
1279
+ /**
1280
+ * List Projects. More details in the [documentation](https://poeditor.com/docs/api#projects_list).
1281
+ * @summary Returns the list of projects owned by user.
1282
+ * @param {string} apiToken
1283
+ * @param {*} [options] Override http request option.
1284
+ * @throws {RequiredError}
1285
+ */
1286
+ async projectsList(apiToken, options) {
1287
+ const localVarAxiosArgs = await localVarAxiosParamCreator.projectsList(apiToken, options);
1288
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1289
+ const localVarOperationServerBasePath = base_1.operationServerMap['ProjectsApi.projectsList']?.[localVarOperationServerIndex]?.url;
1290
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1291
+ },
1292
+ /**
1293
+ * Sync Terms. More details in the [documentation](https://poeditor.com/docs/api#projects_sync).
1294
+ * @summary Syncs your project with the array you send (terms that are not found in the JSON object will be deleted from project and the new ones added). Please use with caution. If wrong data is sent, existing terms and their translations might be irreversibly lost.
1295
+ * @param {number} id
1296
+ * @param {string} data JSON format
1297
+ * @param {string} [apiToken]
1298
+ * @param {*} [options] Override http request option.
1299
+ * @throws {RequiredError}
1300
+ */
1301
+ async projectsSync(id, data, apiToken, options) {
1302
+ const localVarAxiosArgs = await localVarAxiosParamCreator.projectsSync(id, data, apiToken, options);
1303
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1304
+ const localVarOperationServerBasePath = base_1.operationServerMap['ProjectsApi.projectsSync']?.[localVarOperationServerIndex]?.url;
1305
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1306
+ },
1307
+ /**
1308
+ * Update Project Settings. More details in the [documentation](https://poeditor.com/docs/api#projects_update).
1309
+ * @summary Updates project settings (name, description, reference language, fallback language). If optional parameters are not sent, their respective fields are not updated.
1310
+ * @param {number} id
1311
+ * @param {string} [apiToken]
1312
+ * @param {string} [name]
1313
+ * @param {string} [description]
1314
+ * @param {string} [referenceLanguage]
1315
+ * @param {string} [fallbackLanguage]
1316
+ * @param {*} [options] Override http request option.
1317
+ * @throws {RequiredError}
1318
+ */
1319
+ async projectsUpdate(id, apiToken, name, description, referenceLanguage, fallbackLanguage, options) {
1320
+ const localVarAxiosArgs = await localVarAxiosParamCreator.projectsUpdate(id, apiToken, name, description, referenceLanguage, fallbackLanguage, options);
1321
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1322
+ const localVarOperationServerBasePath = base_1.operationServerMap['ProjectsApi.projectsUpdate']?.[localVarOperationServerIndex]?.url;
1323
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1324
+ },
1325
+ /**
1326
+ * Upload. More details in the [documentation](https://poeditor.com/docs/api#projects_upload).
1327
+ * @summary Updates terms / translations - No more than one request every 20 seconds.
1328
+ * @param {ProjectsUploadUpdatingEnum} updating
1329
+ * @param {File} file Uploaded file (.po, .xls or any of the supported file formats)
1330
+ * @param {string} [apiToken]
1331
+ * @param {number} [id]
1332
+ * @param {string} [language] The language code (Required only if `updating` is terms_translations or translations). When using `terms_translations` with `.xcstrings` file format, leave it empty to import all the languages in the file.
1333
+ * @param {ProjectsUploadOverwriteEnum} [overwrite] Set it to 1 if you want to overwrite translations
1334
+ * @param {ProjectsUploadSyncTermsEnum} [syncTerms] Set it to 1 if you want to sync your terms (terms that are not found in the uploaded file will be deleted from project and the new ones added). Ignored if `updating` = translations.
1335
+ * @param {string} [tags] Add tags to the project terms; available when updating terms or terms_translations; you can use the following keys: \\\"all\\\" - for the all the imported terms, \\\"new\\\" - for the terms which arent already in the project, \\\"obsolete\\\" - for the terms which are in the project but not in the imported file and \\\"overwritten_translations\\\" - for the terms for which translations change
1336
+ * @param {ProjectsUploadReadFromSourceEnum} [readFromSource] For .xliff format only - set it to 1 if you want to import translations from the source tag
1337
+ * @param {ProjectsUploadFuzzyTriggerEnum} [fuzzyTrigger] Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
1338
+ * @param {*} [options] Override http request option.
1339
+ * @throws {RequiredError}
1340
+ */
1341
+ async projectsUpload(updating, file, apiToken, id, language, overwrite, syncTerms, tags, readFromSource, fuzzyTrigger, options) {
1342
+ const localVarAxiosArgs = await localVarAxiosParamCreator.projectsUpload(updating, file, apiToken, id, language, overwrite, syncTerms, tags, readFromSource, fuzzyTrigger, options);
1343
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1344
+ const localVarOperationServerBasePath = base_1.operationServerMap['ProjectsApi.projectsUpload']?.[localVarOperationServerIndex]?.url;
1345
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1346
+ },
1347
+ /**
1348
+ * View Project Details. More details in the [documentation](https://poeditor.com/docs/api#projects_view).
1349
+ * @summary Returns projects details
1350
+ * @param {number} id
1351
+ * @param {string} [apiToken]
1352
+ * @param {*} [options] Override http request option.
1353
+ * @throws {RequiredError}
1354
+ */
1355
+ async projectsView(id, apiToken, options) {
1356
+ const localVarAxiosArgs = await localVarAxiosParamCreator.projectsView(id, apiToken, options);
1357
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1358
+ const localVarOperationServerBasePath = base_1.operationServerMap['ProjectsApi.projectsView']?.[localVarOperationServerIndex]?.url;
1359
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1360
+ },
1361
+ };
1362
+ };
1363
+ exports.ProjectsApiFp = ProjectsApiFp;
1364
+ /**
1365
+ * ProjectsApi - factory interface
1366
+ * @export
1367
+ */
1368
+ const ProjectsApiFactory = function (configuration, basePath, axios) {
1369
+ const localVarFp = (0, exports.ProjectsApiFp)(configuration);
1370
+ return {
1371
+ /**
1372
+ * Add Project. More details in the [documentation](https://poeditor.com/docs/api#projects_add).
1373
+ * @summary Creates a new project. Returns project details (if successful).
1374
+ * @param {string} name
1375
+ * @param {string} [apiToken]
1376
+ * @param {string} [description]
1377
+ * @param {*} [options] Override http request option.
1378
+ * @throws {RequiredError}
1379
+ */
1380
+ projectsAdd(name, apiToken, description, options) {
1381
+ return localVarFp.projectsAdd(name, apiToken, description, options).then((request) => request(axios, basePath));
1382
+ },
1383
+ /**
1384
+ * Delete Project. More details in the [documentation](https://poeditor.com/docs/api#projects_delete).
1385
+ * @summary Deletes the project from the account. You must be the owner of the project.
1386
+ * @param {number} id
1387
+ * @param {string} [apiToken]
1388
+ * @param {*} [options] Override http request option.
1389
+ * @throws {RequiredError}
1390
+ */
1391
+ projectsDelete(id, apiToken, options) {
1392
+ return localVarFp.projectsDelete(id, apiToken, options).then((request) => request(axios, basePath));
1393
+ },
1394
+ /**
1395
+ * Export. More details in the [documentation](https://poeditor.com/docs/api#projects_export).
1396
+ * @summary Returns the link of the file (expires after 10 minutes). The settings inherited from the project will be the ones at the time of the download.
1397
+ * @param {number} id
1398
+ * @param {string} language
1399
+ * @param {ProjectsExportTypeEnum} type
1400
+ * @param {string} [apiToken]
1401
+ * @param {string} [filters]
1402
+ * @param {string} [order]
1403
+ * @param {string} [tags]
1404
+ * @param {ProjectsExportOptionsEnum} [_options]
1405
+ * @param {*} [options] Override http request option.
1406
+ * @throws {RequiredError}
1407
+ */
1408
+ projectsExport(id, language, type, apiToken, filters, order, tags, _options, options) {
1409
+ return localVarFp.projectsExport(id, language, type, apiToken, filters, order, tags, _options, options).then((request) => request(axios, basePath));
1410
+ },
1411
+ /**
1412
+ * List Projects. More details in the [documentation](https://poeditor.com/docs/api#projects_list).
1413
+ * @summary Returns the list of projects owned by user.
1414
+ * @param {string} apiToken
1415
+ * @param {*} [options] Override http request option.
1416
+ * @throws {RequiredError}
1417
+ */
1418
+ projectsList(apiToken, options) {
1419
+ return localVarFp.projectsList(apiToken, options).then((request) => request(axios, basePath));
1420
+ },
1421
+ /**
1422
+ * Sync Terms. More details in the [documentation](https://poeditor.com/docs/api#projects_sync).
1423
+ * @summary Syncs your project with the array you send (terms that are not found in the JSON object will be deleted from project and the new ones added). Please use with caution. If wrong data is sent, existing terms and their translations might be irreversibly lost.
1424
+ * @param {number} id
1425
+ * @param {string} data JSON format
1426
+ * @param {string} [apiToken]
1427
+ * @param {*} [options] Override http request option.
1428
+ * @throws {RequiredError}
1429
+ */
1430
+ projectsSync(id, data, apiToken, options) {
1431
+ return localVarFp.projectsSync(id, data, apiToken, options).then((request) => request(axios, basePath));
1432
+ },
1433
+ /**
1434
+ * Update Project Settings. More details in the [documentation](https://poeditor.com/docs/api#projects_update).
1435
+ * @summary Updates project settings (name, description, reference language, fallback language). If optional parameters are not sent, their respective fields are not updated.
1436
+ * @param {number} id
1437
+ * @param {string} [apiToken]
1438
+ * @param {string} [name]
1439
+ * @param {string} [description]
1440
+ * @param {string} [referenceLanguage]
1441
+ * @param {string} [fallbackLanguage]
1442
+ * @param {*} [options] Override http request option.
1443
+ * @throws {RequiredError}
1444
+ */
1445
+ projectsUpdate(id, apiToken, name, description, referenceLanguage, fallbackLanguage, options) {
1446
+ return localVarFp.projectsUpdate(id, apiToken, name, description, referenceLanguage, fallbackLanguage, options).then((request) => request(axios, basePath));
1447
+ },
1448
+ /**
1449
+ * Upload. More details in the [documentation](https://poeditor.com/docs/api#projects_upload).
1450
+ * @summary Updates terms / translations - No more than one request every 20 seconds.
1451
+ * @param {ProjectsUploadUpdatingEnum} updating
1452
+ * @param {File} file Uploaded file (.po, .xls or any of the supported file formats)
1453
+ * @param {string} [apiToken]
1454
+ * @param {number} [id]
1455
+ * @param {string} [language] The language code (Required only if `updating` is terms_translations or translations). When using `terms_translations` with `.xcstrings` file format, leave it empty to import all the languages in the file.
1456
+ * @param {ProjectsUploadOverwriteEnum} [overwrite] Set it to 1 if you want to overwrite translations
1457
+ * @param {ProjectsUploadSyncTermsEnum} [syncTerms] Set it to 1 if you want to sync your terms (terms that are not found in the uploaded file will be deleted from project and the new ones added). Ignored if `updating` = translations.
1458
+ * @param {string} [tags] Add tags to the project terms; available when updating terms or terms_translations; you can use the following keys: \\\"all\\\" - for the all the imported terms, \\\"new\\\" - for the terms which arent already in the project, \\\"obsolete\\\" - for the terms which are in the project but not in the imported file and \\\"overwritten_translations\\\" - for the terms for which translations change
1459
+ * @param {ProjectsUploadReadFromSourceEnum} [readFromSource] For .xliff format only - set it to 1 if you want to import translations from the source tag
1460
+ * @param {ProjectsUploadFuzzyTriggerEnum} [fuzzyTrigger] Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
1461
+ * @param {*} [options] Override http request option.
1462
+ * @throws {RequiredError}
1463
+ */
1464
+ projectsUpload(updating, file, apiToken, id, language, overwrite, syncTerms, tags, readFromSource, fuzzyTrigger, options) {
1465
+ return localVarFp.projectsUpload(updating, file, apiToken, id, language, overwrite, syncTerms, tags, readFromSource, fuzzyTrigger, options).then((request) => request(axios, basePath));
1466
+ },
1467
+ /**
1468
+ * View Project Details. More details in the [documentation](https://poeditor.com/docs/api#projects_view).
1469
+ * @summary Returns projects details
1470
+ * @param {number} id
1471
+ * @param {string} [apiToken]
1472
+ * @param {*} [options] Override http request option.
1473
+ * @throws {RequiredError}
1474
+ */
1475
+ projectsView(id, apiToken, options) {
1476
+ return localVarFp.projectsView(id, apiToken, options).then((request) => request(axios, basePath));
1477
+ },
1478
+ };
1479
+ };
1480
+ exports.ProjectsApiFactory = ProjectsApiFactory;
1481
+ /**
1482
+ * ProjectsApi - object-oriented interface
1483
+ * @export
1484
+ * @class ProjectsApi
1485
+ * @extends {BaseAPI}
1486
+ */
1487
+ class ProjectsApi extends base_1.BaseAPI {
1488
+ /**
1489
+ * Add Project. More details in the [documentation](https://poeditor.com/docs/api#projects_add).
1490
+ * @summary Creates a new project. Returns project details (if successful).
1491
+ * @param {string} name
1492
+ * @param {string} [apiToken]
1493
+ * @param {string} [description]
1494
+ * @param {*} [options] Override http request option.
1495
+ * @throws {RequiredError}
1496
+ * @memberof ProjectsApi
1497
+ */
1498
+ projectsAdd(name, apiToken, description, options) {
1499
+ return (0, exports.ProjectsApiFp)(this.configuration).projectsAdd(name, apiToken, description, options).then((request) => request(this.axios, this.basePath));
1500
+ }
1501
+ /**
1502
+ * Delete Project. More details in the [documentation](https://poeditor.com/docs/api#projects_delete).
1503
+ * @summary Deletes the project from the account. You must be the owner of the project.
1504
+ * @param {number} id
1505
+ * @param {string} [apiToken]
1506
+ * @param {*} [options] Override http request option.
1507
+ * @throws {RequiredError}
1508
+ * @memberof ProjectsApi
1509
+ */
1510
+ projectsDelete(id, apiToken, options) {
1511
+ return (0, exports.ProjectsApiFp)(this.configuration).projectsDelete(id, apiToken, options).then((request) => request(this.axios, this.basePath));
1512
+ }
1513
+ /**
1514
+ * Export. More details in the [documentation](https://poeditor.com/docs/api#projects_export).
1515
+ * @summary Returns the link of the file (expires after 10 minutes). The settings inherited from the project will be the ones at the time of the download.
1516
+ * @param {number} id
1517
+ * @param {string} language
1518
+ * @param {ProjectsExportTypeEnum} type
1519
+ * @param {string} [apiToken]
1520
+ * @param {string} [filters]
1521
+ * @param {string} [order]
1522
+ * @param {string} [tags]
1523
+ * @param {ProjectsExportOptionsEnum} [_options]
1524
+ * @param {*} [options] Override http request option.
1525
+ * @throws {RequiredError}
1526
+ * @memberof ProjectsApi
1527
+ */
1528
+ projectsExport(id, language, type, apiToken, filters, order, tags, _options, options) {
1529
+ return (0, exports.ProjectsApiFp)(this.configuration).projectsExport(id, language, type, apiToken, filters, order, tags, _options, options).then((request) => request(this.axios, this.basePath));
1530
+ }
1531
+ /**
1532
+ * List Projects. More details in the [documentation](https://poeditor.com/docs/api#projects_list).
1533
+ * @summary Returns the list of projects owned by user.
1534
+ * @param {string} apiToken
1535
+ * @param {*} [options] Override http request option.
1536
+ * @throws {RequiredError}
1537
+ * @memberof ProjectsApi
1538
+ */
1539
+ projectsList(apiToken, options) {
1540
+ return (0, exports.ProjectsApiFp)(this.configuration).projectsList(apiToken, options).then((request) => request(this.axios, this.basePath));
1541
+ }
1542
+ /**
1543
+ * Sync Terms. More details in the [documentation](https://poeditor.com/docs/api#projects_sync).
1544
+ * @summary Syncs your project with the array you send (terms that are not found in the JSON object will be deleted from project and the new ones added). Please use with caution. If wrong data is sent, existing terms and their translations might be irreversibly lost.
1545
+ * @param {number} id
1546
+ * @param {string} data JSON format
1547
+ * @param {string} [apiToken]
1548
+ * @param {*} [options] Override http request option.
1549
+ * @throws {RequiredError}
1550
+ * @memberof ProjectsApi
1551
+ */
1552
+ projectsSync(id, data, apiToken, options) {
1553
+ return (0, exports.ProjectsApiFp)(this.configuration).projectsSync(id, data, apiToken, options).then((request) => request(this.axios, this.basePath));
1554
+ }
1555
+ /**
1556
+ * Update Project Settings. More details in the [documentation](https://poeditor.com/docs/api#projects_update).
1557
+ * @summary Updates project settings (name, description, reference language, fallback language). If optional parameters are not sent, their respective fields are not updated.
1558
+ * @param {number} id
1559
+ * @param {string} [apiToken]
1560
+ * @param {string} [name]
1561
+ * @param {string} [description]
1562
+ * @param {string} [referenceLanguage]
1563
+ * @param {string} [fallbackLanguage]
1564
+ * @param {*} [options] Override http request option.
1565
+ * @throws {RequiredError}
1566
+ * @memberof ProjectsApi
1567
+ */
1568
+ projectsUpdate(id, apiToken, name, description, referenceLanguage, fallbackLanguage, options) {
1569
+ return (0, exports.ProjectsApiFp)(this.configuration).projectsUpdate(id, apiToken, name, description, referenceLanguage, fallbackLanguage, options).then((request) => request(this.axios, this.basePath));
1570
+ }
1571
+ /**
1572
+ * Upload. More details in the [documentation](https://poeditor.com/docs/api#projects_upload).
1573
+ * @summary Updates terms / translations - No more than one request every 20 seconds.
1574
+ * @param {ProjectsUploadUpdatingEnum} updating
1575
+ * @param {File} file Uploaded file (.po, .xls or any of the supported file formats)
1576
+ * @param {string} [apiToken]
1577
+ * @param {number} [id]
1578
+ * @param {string} [language] The language code (Required only if `updating` is terms_translations or translations). When using `terms_translations` with `.xcstrings` file format, leave it empty to import all the languages in the file.
1579
+ * @param {ProjectsUploadOverwriteEnum} [overwrite] Set it to 1 if you want to overwrite translations
1580
+ * @param {ProjectsUploadSyncTermsEnum} [syncTerms] Set it to 1 if you want to sync your terms (terms that are not found in the uploaded file will be deleted from project and the new ones added). Ignored if `updating` = translations.
1581
+ * @param {string} [tags] Add tags to the project terms; available when updating terms or terms_translations; you can use the following keys: \\\"all\\\" - for the all the imported terms, \\\"new\\\" - for the terms which arent already in the project, \\\"obsolete\\\" - for the terms which are in the project but not in the imported file and \\\"overwritten_translations\\\" - for the terms for which translations change
1582
+ * @param {ProjectsUploadReadFromSourceEnum} [readFromSource] For .xliff format only - set it to 1 if you want to import translations from the source tag
1583
+ * @param {ProjectsUploadFuzzyTriggerEnum} [fuzzyTrigger] Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
1584
+ * @param {*} [options] Override http request option.
1585
+ * @throws {RequiredError}
1586
+ * @memberof ProjectsApi
1587
+ */
1588
+ projectsUpload(updating, file, apiToken, id, language, overwrite, syncTerms, tags, readFromSource, fuzzyTrigger, options) {
1589
+ return (0, exports.ProjectsApiFp)(this.configuration).projectsUpload(updating, file, apiToken, id, language, overwrite, syncTerms, tags, readFromSource, fuzzyTrigger, options).then((request) => request(this.axios, this.basePath));
1590
+ }
1591
+ /**
1592
+ * View Project Details. More details in the [documentation](https://poeditor.com/docs/api#projects_view).
1593
+ * @summary Returns projects details
1594
+ * @param {number} id
1595
+ * @param {string} [apiToken]
1596
+ * @param {*} [options] Override http request option.
1597
+ * @throws {RequiredError}
1598
+ * @memberof ProjectsApi
1599
+ */
1600
+ projectsView(id, apiToken, options) {
1601
+ return (0, exports.ProjectsApiFp)(this.configuration).projectsView(id, apiToken, options).then((request) => request(this.axios, this.basePath));
1602
+ }
1603
+ }
1604
+ exports.ProjectsApi = ProjectsApi;
1605
+ /**
1606
+ * @export
1607
+ */
1608
+ exports.ProjectsExportTypeEnum = {
1609
+ Arb: 'arb',
1610
+ Csv: 'csv',
1611
+ Ini: 'ini',
1612
+ KeyValueJson: 'key_value_json',
1613
+ I18next: 'i18next',
1614
+ Json: 'json',
1615
+ Po: 'po',
1616
+ Pot: 'pot',
1617
+ Mo: 'mo',
1618
+ Properties: 'properties',
1619
+ Resw: 'resw',
1620
+ Resx: 'resx',
1621
+ Ts: 'ts',
1622
+ AppleStrings: 'apple_strings',
1623
+ Xliff: 'xliff',
1624
+ Xliff12: 'xliff_1_2',
1625
+ Xlf: 'xlf',
1626
+ Xmb: 'xmb',
1627
+ Xtb: 'xtb',
1628
+ Rise360Xliff: 'rise_360_xliff',
1629
+ Xls: 'xls',
1630
+ Xlsx: 'xlsx',
1631
+ AndroidStrings: 'android_strings',
1632
+ Yml: 'yml',
1633
+ Php: 'php'
1634
+ };
1635
+ /**
1636
+ * @export
1637
+ */
1638
+ exports.ProjectsExportOptionsEnum = {
1639
+ Unquoted1: '[{\"unquoted\": 1}]',
1640
+ Unencoded1: '[{\"unencoded\": 1}]',
1641
+ ExportAll1: '[{\"export_all\": 1}]'
1642
+ };
1643
+ /**
1644
+ * @export
1645
+ */
1646
+ exports.ProjectsUploadUpdatingEnum = {
1647
+ Terms: 'terms',
1648
+ Translations: 'translations',
1649
+ TermsTranslations: 'terms_translations'
1650
+ };
1651
+ /**
1652
+ * @export
1653
+ */
1654
+ exports.ProjectsUploadOverwriteEnum = {
1655
+ NUMBER_0: 0,
1656
+ NUMBER_1: 1
1657
+ };
1658
+ /**
1659
+ * @export
1660
+ */
1661
+ exports.ProjectsUploadSyncTermsEnum = {
1662
+ NUMBER_0: 0,
1663
+ NUMBER_1: 1
1664
+ };
1665
+ /**
1666
+ * @export
1667
+ */
1668
+ exports.ProjectsUploadReadFromSourceEnum = {
1669
+ NUMBER_0: 0,
1670
+ NUMBER_1: 1
1671
+ };
1672
+ /**
1673
+ * @export
1674
+ */
1675
+ exports.ProjectsUploadFuzzyTriggerEnum = {
1676
+ NUMBER_0: 0,
1677
+ NUMBER_1: 1
1678
+ };
1679
+ /**
1680
+ * TermsApi - axios parameter creator
1681
+ * @export
1682
+ */
1683
+ const TermsApiAxiosParamCreator = function (configuration) {
1684
+ return {
1685
+ /**
1686
+ * Add Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_add).
1687
+ * @summary Adds terms to project.
1688
+ * @param {number} id
1689
+ * @param {string} data JSON format
1690
+ * @param {string} [apiToken]
1691
+ * @param {*} [options] Override http request option.
1692
+ * @throws {RequiredError}
1693
+ */
1694
+ termsAdd: async (id, data, apiToken, options = {}) => {
1695
+ // verify required parameter 'id' is not null or undefined
1696
+ (0, common_1.assertParamExists)('termsAdd', 'id', id);
1697
+ // verify required parameter 'data' is not null or undefined
1698
+ (0, common_1.assertParamExists)('termsAdd', 'data', data);
1699
+ const localVarPath = `/terms/add`;
1700
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1701
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1702
+ let baseOptions;
1703
+ if (configuration) {
1704
+ baseOptions = configuration.baseOptions;
1705
+ }
1706
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1707
+ const localVarHeaderParameter = {};
1708
+ const localVarQueryParameter = {};
1709
+ const localVarFormParams = new URLSearchParams();
1710
+ if (apiToken !== undefined) {
1711
+ localVarFormParams.set('api_token', apiToken);
1712
+ }
1713
+ if (id !== undefined) {
1714
+ localVarFormParams.set('id', id);
1715
+ }
1716
+ if (data !== undefined) {
1717
+ localVarFormParams.set('data', data);
1718
+ }
1719
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
1720
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1721
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1722
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1723
+ localVarRequestOptions.data = localVarFormParams.toString();
1724
+ return {
1725
+ url: (0, common_1.toPathString)(localVarUrlObj),
1726
+ options: localVarRequestOptions,
1727
+ };
1728
+ },
1729
+ /**
1730
+ * Add Comment. More details in the [documentation](https://poeditor.com/docs/api#terms_add_comment).
1731
+ * @summary Adds comments to existing terms.
1732
+ * @param {number} id
1733
+ * @param {string} data JSON format
1734
+ * @param {string} [apiToken]
1735
+ * @param {*} [options] Override http request option.
1736
+ * @throws {RequiredError}
1737
+ */
1738
+ termsAddComment: async (id, data, apiToken, options = {}) => {
1739
+ // verify required parameter 'id' is not null or undefined
1740
+ (0, common_1.assertParamExists)('termsAddComment', 'id', id);
1741
+ // verify required parameter 'data' is not null or undefined
1742
+ (0, common_1.assertParamExists)('termsAddComment', 'data', data);
1743
+ const localVarPath = `/terms/add_comment`;
1744
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1745
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1746
+ let baseOptions;
1747
+ if (configuration) {
1748
+ baseOptions = configuration.baseOptions;
1749
+ }
1750
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1751
+ const localVarHeaderParameter = {};
1752
+ const localVarQueryParameter = {};
1753
+ const localVarFormParams = new URLSearchParams();
1754
+ if (apiToken !== undefined) {
1755
+ localVarFormParams.set('api_token', apiToken);
1756
+ }
1757
+ if (id !== undefined) {
1758
+ localVarFormParams.set('id', id);
1759
+ }
1760
+ if (data !== undefined) {
1761
+ localVarFormParams.set('data', data);
1762
+ }
1763
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
1764
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1765
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1766
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1767
+ localVarRequestOptions.data = localVarFormParams.toString();
1768
+ return {
1769
+ url: (0, common_1.toPathString)(localVarUrlObj),
1770
+ options: localVarRequestOptions,
1771
+ };
1772
+ },
1773
+ /**
1774
+ * Delete Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_delete).
1775
+ * @summary Deletes terms from project.
1776
+ * @param {number} id
1777
+ * @param {string} data JSON format
1778
+ * @param {string} [apiToken]
1779
+ * @param {*} [options] Override http request option.
1780
+ * @throws {RequiredError}
1781
+ */
1782
+ termsDelete: async (id, data, apiToken, options = {}) => {
1783
+ // verify required parameter 'id' is not null or undefined
1784
+ (0, common_1.assertParamExists)('termsDelete', 'id', id);
1785
+ // verify required parameter 'data' is not null or undefined
1786
+ (0, common_1.assertParamExists)('termsDelete', 'data', data);
1787
+ const localVarPath = `/terms/delete`;
1788
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1789
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1790
+ let baseOptions;
1791
+ if (configuration) {
1792
+ baseOptions = configuration.baseOptions;
1793
+ }
1794
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1795
+ const localVarHeaderParameter = {};
1796
+ const localVarQueryParameter = {};
1797
+ const localVarFormParams = new URLSearchParams();
1798
+ if (apiToken !== undefined) {
1799
+ localVarFormParams.set('api_token', apiToken);
1800
+ }
1801
+ if (id !== undefined) {
1802
+ localVarFormParams.set('id', id);
1803
+ }
1804
+ if (data !== undefined) {
1805
+ localVarFormParams.set('data', data);
1806
+ }
1807
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
1808
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1809
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1810
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1811
+ localVarRequestOptions.data = localVarFormParams.toString();
1812
+ return {
1813
+ url: (0, common_1.toPathString)(localVarUrlObj),
1814
+ options: localVarRequestOptions,
1815
+ };
1816
+ },
1817
+ /**
1818
+ * List Project Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_list).
1819
+ * @summary Returns project\'s terms and translations if the argument language is provided.
1820
+ * @param {number} id
1821
+ * @param {string} [apiToken]
1822
+ * @param {string} [language] The language code
1823
+ * @param {*} [options] Override http request option.
1824
+ * @throws {RequiredError}
1825
+ */
1826
+ termsList: async (id, apiToken, language, options = {}) => {
1827
+ // verify required parameter 'id' is not null or undefined
1828
+ (0, common_1.assertParamExists)('termsList', 'id', id);
1829
+ const localVarPath = `/terms/list`;
1830
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1831
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1832
+ let baseOptions;
1833
+ if (configuration) {
1834
+ baseOptions = configuration.baseOptions;
1835
+ }
1836
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1837
+ const localVarHeaderParameter = {};
1838
+ const localVarQueryParameter = {};
1839
+ const localVarFormParams = new URLSearchParams();
1840
+ if (apiToken !== undefined) {
1841
+ localVarFormParams.set('api_token', apiToken);
1842
+ }
1843
+ if (id !== undefined) {
1844
+ localVarFormParams.set('id', id);
1845
+ }
1846
+ if (language !== undefined) {
1847
+ localVarFormParams.set('language', language);
1848
+ }
1849
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
1850
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1851
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1852
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1853
+ localVarRequestOptions.data = localVarFormParams.toString();
1854
+ return {
1855
+ url: (0, common_1.toPathString)(localVarUrlObj),
1856
+ options: localVarRequestOptions,
1857
+ };
1858
+ },
1859
+ /**
1860
+ * Update Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_update).
1861
+ * @summary Updates project terms. Lets you change the text, context, reference, plural and tags.
1862
+ * @param {number} id
1863
+ * @param {string} data JSON format
1864
+ * @param {string} [apiToken]
1865
+ * @param {TermsUpdateFuzzyTriggerEnum} [fuzzyTrigger] Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
1866
+ * @param {*} [options] Override http request option.
1867
+ * @throws {RequiredError}
1868
+ */
1869
+ termsUpdate: async (id, data, apiToken, fuzzyTrigger, options = {}) => {
1870
+ // verify required parameter 'id' is not null or undefined
1871
+ (0, common_1.assertParamExists)('termsUpdate', 'id', id);
1872
+ // verify required parameter 'data' is not null or undefined
1873
+ (0, common_1.assertParamExists)('termsUpdate', 'data', data);
1874
+ const localVarPath = `/terms/update`;
1875
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
1876
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1877
+ let baseOptions;
1878
+ if (configuration) {
1879
+ baseOptions = configuration.baseOptions;
1880
+ }
1881
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
1882
+ const localVarHeaderParameter = {};
1883
+ const localVarQueryParameter = {};
1884
+ const localVarFormParams = new URLSearchParams();
1885
+ if (apiToken !== undefined) {
1886
+ localVarFormParams.set('api_token', apiToken);
1887
+ }
1888
+ if (id !== undefined) {
1889
+ localVarFormParams.set('id', id);
1890
+ }
1891
+ if (data !== undefined) {
1892
+ localVarFormParams.set('data', data);
1893
+ }
1894
+ if (fuzzyTrigger !== undefined) {
1895
+ localVarFormParams.set('fuzzy_trigger', fuzzyTrigger);
1896
+ }
1897
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
1898
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1899
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1900
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
1901
+ localVarRequestOptions.data = localVarFormParams.toString();
1902
+ return {
1903
+ url: (0, common_1.toPathString)(localVarUrlObj),
1904
+ options: localVarRequestOptions,
1905
+ };
1906
+ },
1907
+ };
1908
+ };
1909
+ exports.TermsApiAxiosParamCreator = TermsApiAxiosParamCreator;
1910
+ /**
1911
+ * TermsApi - functional programming interface
1912
+ * @export
1913
+ */
1914
+ const TermsApiFp = function (configuration) {
1915
+ const localVarAxiosParamCreator = (0, exports.TermsApiAxiosParamCreator)(configuration);
1916
+ return {
1917
+ /**
1918
+ * Add Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_add).
1919
+ * @summary Adds terms to project.
1920
+ * @param {number} id
1921
+ * @param {string} data JSON format
1922
+ * @param {string} [apiToken]
1923
+ * @param {*} [options] Override http request option.
1924
+ * @throws {RequiredError}
1925
+ */
1926
+ async termsAdd(id, data, apiToken, options) {
1927
+ const localVarAxiosArgs = await localVarAxiosParamCreator.termsAdd(id, data, apiToken, options);
1928
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1929
+ const localVarOperationServerBasePath = base_1.operationServerMap['TermsApi.termsAdd']?.[localVarOperationServerIndex]?.url;
1930
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1931
+ },
1932
+ /**
1933
+ * Add Comment. More details in the [documentation](https://poeditor.com/docs/api#terms_add_comment).
1934
+ * @summary Adds comments to existing terms.
1935
+ * @param {number} id
1936
+ * @param {string} data JSON format
1937
+ * @param {string} [apiToken]
1938
+ * @param {*} [options] Override http request option.
1939
+ * @throws {RequiredError}
1940
+ */
1941
+ async termsAddComment(id, data, apiToken, options) {
1942
+ const localVarAxiosArgs = await localVarAxiosParamCreator.termsAddComment(id, data, apiToken, options);
1943
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1944
+ const localVarOperationServerBasePath = base_1.operationServerMap['TermsApi.termsAddComment']?.[localVarOperationServerIndex]?.url;
1945
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1946
+ },
1947
+ /**
1948
+ * Delete Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_delete).
1949
+ * @summary Deletes terms from project.
1950
+ * @param {number} id
1951
+ * @param {string} data JSON format
1952
+ * @param {string} [apiToken]
1953
+ * @param {*} [options] Override http request option.
1954
+ * @throws {RequiredError}
1955
+ */
1956
+ async termsDelete(id, data, apiToken, options) {
1957
+ const localVarAxiosArgs = await localVarAxiosParamCreator.termsDelete(id, data, apiToken, options);
1958
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1959
+ const localVarOperationServerBasePath = base_1.operationServerMap['TermsApi.termsDelete']?.[localVarOperationServerIndex]?.url;
1960
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1961
+ },
1962
+ /**
1963
+ * List Project Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_list).
1964
+ * @summary Returns project\'s terms and translations if the argument language is provided.
1965
+ * @param {number} id
1966
+ * @param {string} [apiToken]
1967
+ * @param {string} [language] The language code
1968
+ * @param {*} [options] Override http request option.
1969
+ * @throws {RequiredError}
1970
+ */
1971
+ async termsList(id, apiToken, language, options) {
1972
+ const localVarAxiosArgs = await localVarAxiosParamCreator.termsList(id, apiToken, language, options);
1973
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1974
+ const localVarOperationServerBasePath = base_1.operationServerMap['TermsApi.termsList']?.[localVarOperationServerIndex]?.url;
1975
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1976
+ },
1977
+ /**
1978
+ * Update Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_update).
1979
+ * @summary Updates project terms. Lets you change the text, context, reference, plural and tags.
1980
+ * @param {number} id
1981
+ * @param {string} data JSON format
1982
+ * @param {string} [apiToken]
1983
+ * @param {TermsUpdateFuzzyTriggerEnum} [fuzzyTrigger] Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
1984
+ * @param {*} [options] Override http request option.
1985
+ * @throws {RequiredError}
1986
+ */
1987
+ async termsUpdate(id, data, apiToken, fuzzyTrigger, options) {
1988
+ const localVarAxiosArgs = await localVarAxiosParamCreator.termsUpdate(id, data, apiToken, fuzzyTrigger, options);
1989
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1990
+ const localVarOperationServerBasePath = base_1.operationServerMap['TermsApi.termsUpdate']?.[localVarOperationServerIndex]?.url;
1991
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1992
+ },
1993
+ };
1994
+ };
1995
+ exports.TermsApiFp = TermsApiFp;
1996
+ /**
1997
+ * TermsApi - factory interface
1998
+ * @export
1999
+ */
2000
+ const TermsApiFactory = function (configuration, basePath, axios) {
2001
+ const localVarFp = (0, exports.TermsApiFp)(configuration);
2002
+ return {
2003
+ /**
2004
+ * Add Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_add).
2005
+ * @summary Adds terms to project.
2006
+ * @param {number} id
2007
+ * @param {string} data JSON format
2008
+ * @param {string} [apiToken]
2009
+ * @param {*} [options] Override http request option.
2010
+ * @throws {RequiredError}
2011
+ */
2012
+ termsAdd(id, data, apiToken, options) {
2013
+ return localVarFp.termsAdd(id, data, apiToken, options).then((request) => request(axios, basePath));
2014
+ },
2015
+ /**
2016
+ * Add Comment. More details in the [documentation](https://poeditor.com/docs/api#terms_add_comment).
2017
+ * @summary Adds comments to existing terms.
2018
+ * @param {number} id
2019
+ * @param {string} data JSON format
2020
+ * @param {string} [apiToken]
2021
+ * @param {*} [options] Override http request option.
2022
+ * @throws {RequiredError}
2023
+ */
2024
+ termsAddComment(id, data, apiToken, options) {
2025
+ return localVarFp.termsAddComment(id, data, apiToken, options).then((request) => request(axios, basePath));
2026
+ },
2027
+ /**
2028
+ * Delete Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_delete).
2029
+ * @summary Deletes terms from project.
2030
+ * @param {number} id
2031
+ * @param {string} data JSON format
2032
+ * @param {string} [apiToken]
2033
+ * @param {*} [options] Override http request option.
2034
+ * @throws {RequiredError}
2035
+ */
2036
+ termsDelete(id, data, apiToken, options) {
2037
+ return localVarFp.termsDelete(id, data, apiToken, options).then((request) => request(axios, basePath));
2038
+ },
2039
+ /**
2040
+ * List Project Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_list).
2041
+ * @summary Returns project\'s terms and translations if the argument language is provided.
2042
+ * @param {number} id
2043
+ * @param {string} [apiToken]
2044
+ * @param {string} [language] The language code
2045
+ * @param {*} [options] Override http request option.
2046
+ * @throws {RequiredError}
2047
+ */
2048
+ termsList(id, apiToken, language, options) {
2049
+ return localVarFp.termsList(id, apiToken, language, options).then((request) => request(axios, basePath));
2050
+ },
2051
+ /**
2052
+ * Update Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_update).
2053
+ * @summary Updates project terms. Lets you change the text, context, reference, plural and tags.
2054
+ * @param {number} id
2055
+ * @param {string} data JSON format
2056
+ * @param {string} [apiToken]
2057
+ * @param {TermsUpdateFuzzyTriggerEnum} [fuzzyTrigger] Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
2058
+ * @param {*} [options] Override http request option.
2059
+ * @throws {RequiredError}
2060
+ */
2061
+ termsUpdate(id, data, apiToken, fuzzyTrigger, options) {
2062
+ return localVarFp.termsUpdate(id, data, apiToken, fuzzyTrigger, options).then((request) => request(axios, basePath));
2063
+ },
2064
+ };
2065
+ };
2066
+ exports.TermsApiFactory = TermsApiFactory;
2067
+ /**
2068
+ * TermsApi - object-oriented interface
2069
+ * @export
2070
+ * @class TermsApi
2071
+ * @extends {BaseAPI}
2072
+ */
2073
+ class TermsApi extends base_1.BaseAPI {
2074
+ /**
2075
+ * Add Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_add).
2076
+ * @summary Adds terms to project.
2077
+ * @param {number} id
2078
+ * @param {string} data JSON format
2079
+ * @param {string} [apiToken]
2080
+ * @param {*} [options] Override http request option.
2081
+ * @throws {RequiredError}
2082
+ * @memberof TermsApi
2083
+ */
2084
+ termsAdd(id, data, apiToken, options) {
2085
+ return (0, exports.TermsApiFp)(this.configuration).termsAdd(id, data, apiToken, options).then((request) => request(this.axios, this.basePath));
2086
+ }
2087
+ /**
2088
+ * Add Comment. More details in the [documentation](https://poeditor.com/docs/api#terms_add_comment).
2089
+ * @summary Adds comments to existing terms.
2090
+ * @param {number} id
2091
+ * @param {string} data JSON format
2092
+ * @param {string} [apiToken]
2093
+ * @param {*} [options] Override http request option.
2094
+ * @throws {RequiredError}
2095
+ * @memberof TermsApi
2096
+ */
2097
+ termsAddComment(id, data, apiToken, options) {
2098
+ return (0, exports.TermsApiFp)(this.configuration).termsAddComment(id, data, apiToken, options).then((request) => request(this.axios, this.basePath));
2099
+ }
2100
+ /**
2101
+ * Delete Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_delete).
2102
+ * @summary Deletes terms from project.
2103
+ * @param {number} id
2104
+ * @param {string} data JSON format
2105
+ * @param {string} [apiToken]
2106
+ * @param {*} [options] Override http request option.
2107
+ * @throws {RequiredError}
2108
+ * @memberof TermsApi
2109
+ */
2110
+ termsDelete(id, data, apiToken, options) {
2111
+ return (0, exports.TermsApiFp)(this.configuration).termsDelete(id, data, apiToken, options).then((request) => request(this.axios, this.basePath));
2112
+ }
2113
+ /**
2114
+ * List Project Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_list).
2115
+ * @summary Returns project\'s terms and translations if the argument language is provided.
2116
+ * @param {number} id
2117
+ * @param {string} [apiToken]
2118
+ * @param {string} [language] The language code
2119
+ * @param {*} [options] Override http request option.
2120
+ * @throws {RequiredError}
2121
+ * @memberof TermsApi
2122
+ */
2123
+ termsList(id, apiToken, language, options) {
2124
+ return (0, exports.TermsApiFp)(this.configuration).termsList(id, apiToken, language, options).then((request) => request(this.axios, this.basePath));
2125
+ }
2126
+ /**
2127
+ * Update Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_update).
2128
+ * @summary Updates project terms. Lets you change the text, context, reference, plural and tags.
2129
+ * @param {number} id
2130
+ * @param {string} data JSON format
2131
+ * @param {string} [apiToken]
2132
+ * @param {TermsUpdateFuzzyTriggerEnum} [fuzzyTrigger] Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
2133
+ * @param {*} [options] Override http request option.
2134
+ * @throws {RequiredError}
2135
+ * @memberof TermsApi
2136
+ */
2137
+ termsUpdate(id, data, apiToken, fuzzyTrigger, options) {
2138
+ return (0, exports.TermsApiFp)(this.configuration).termsUpdate(id, data, apiToken, fuzzyTrigger, options).then((request) => request(this.axios, this.basePath));
2139
+ }
2140
+ }
2141
+ exports.TermsApi = TermsApi;
2142
+ /**
2143
+ * @export
2144
+ */
2145
+ exports.TermsUpdateFuzzyTriggerEnum = {
2146
+ NUMBER_0: 0,
2147
+ NUMBER_1: 1
2148
+ };
2149
+ /**
2150
+ * TranslationsApi - axios parameter creator
2151
+ * @export
2152
+ */
2153
+ const TranslationsApiAxiosParamCreator = function (configuration) {
2154
+ return {
2155
+ /**
2156
+ * Add Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_add).
2157
+ * @summary Adds translations to project. If translation exists, it will not overwrite it.
2158
+ * @param {number} id
2159
+ * @param {string} language The language code
2160
+ * @param {string} data JSON format
2161
+ * @param {string} [apiToken]
2162
+ * @param {*} [options] Override http request option.
2163
+ * @throws {RequiredError}
2164
+ */
2165
+ translationsAdd: async (id, language, data, apiToken, options = {}) => {
2166
+ // verify required parameter 'id' is not null or undefined
2167
+ (0, common_1.assertParamExists)('translationsAdd', 'id', id);
2168
+ // verify required parameter 'language' is not null or undefined
2169
+ (0, common_1.assertParamExists)('translationsAdd', 'language', language);
2170
+ // verify required parameter 'data' is not null or undefined
2171
+ (0, common_1.assertParamExists)('translationsAdd', 'data', data);
2172
+ const localVarPath = `/translations/add`;
2173
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2174
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2175
+ let baseOptions;
2176
+ if (configuration) {
2177
+ baseOptions = configuration.baseOptions;
2178
+ }
2179
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2180
+ const localVarHeaderParameter = {};
2181
+ const localVarQueryParameter = {};
2182
+ const localVarFormParams = new URLSearchParams();
2183
+ if (apiToken !== undefined) {
2184
+ localVarFormParams.set('api_token', apiToken);
2185
+ }
2186
+ if (id !== undefined) {
2187
+ localVarFormParams.set('id', id);
2188
+ }
2189
+ if (language !== undefined) {
2190
+ localVarFormParams.set('language', language);
2191
+ }
2192
+ if (data !== undefined) {
2193
+ localVarFormParams.set('data', data);
2194
+ }
2195
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
2196
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2197
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2198
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2199
+ localVarRequestOptions.data = localVarFormParams.toString();
2200
+ return {
2201
+ url: (0, common_1.toPathString)(localVarUrlObj),
2202
+ options: localVarRequestOptions,
2203
+ };
2204
+ },
2205
+ /**
2206
+ * Update Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_automatic).
2207
+ * @summary Updates existing translations.
2208
+ * @param {number} id
2209
+ * @param {TranslationsAutomaticProviderEnum} provider
2210
+ * @param {string} [apiToken]
2211
+ * @param {string} [sourceLanguage] The language code
2212
+ * @param {string} [providerSourceLanguage] The language code
2213
+ * @param {string} [targetLanguages] A JSON of the languages to translate to
2214
+ * @param {string} [_options] A JSON of the advanced options you want to use with the selected provider. Possible options include the POEditor tag of the strings you want to send for translation and some provider-specific options
2215
+ * @param {*} [options] Override http request option.
2216
+ * @throws {RequiredError}
2217
+ */
2218
+ translationsAutomatic: async (id, provider, apiToken, sourceLanguage, providerSourceLanguage, targetLanguages, _options, options = {}) => {
2219
+ // verify required parameter 'id' is not null or undefined
2220
+ (0, common_1.assertParamExists)('translationsAutomatic', 'id', id);
2221
+ // verify required parameter 'provider' is not null or undefined
2222
+ (0, common_1.assertParamExists)('translationsAutomatic', 'provider', provider);
2223
+ const localVarPath = `/translations/automatic`;
2224
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2225
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2226
+ let baseOptions;
2227
+ if (configuration) {
2228
+ baseOptions = configuration.baseOptions;
2229
+ }
2230
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2231
+ const localVarHeaderParameter = {};
2232
+ const localVarQueryParameter = {};
2233
+ const localVarFormParams = new URLSearchParams();
2234
+ if (apiToken !== undefined) {
2235
+ localVarFormParams.set('api_token', apiToken);
2236
+ }
2237
+ if (id !== undefined) {
2238
+ localVarFormParams.set('id', id);
2239
+ }
2240
+ if (sourceLanguage !== undefined) {
2241
+ localVarFormParams.set('source_language', sourceLanguage);
2242
+ }
2243
+ if (providerSourceLanguage !== undefined) {
2244
+ localVarFormParams.set('provider_source_language', providerSourceLanguage);
2245
+ }
2246
+ if (provider !== undefined) {
2247
+ localVarFormParams.set('provider', provider);
2248
+ }
2249
+ if (targetLanguages !== undefined) {
2250
+ localVarFormParams.set('target_languages', targetLanguages);
2251
+ }
2252
+ if (_options !== undefined) {
2253
+ localVarFormParams.set('options', _options);
2254
+ }
2255
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
2256
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2257
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2258
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2259
+ localVarRequestOptions.data = localVarFormParams.toString();
2260
+ return {
2261
+ url: (0, common_1.toPathString)(localVarUrlObj),
2262
+ options: localVarRequestOptions,
2263
+ };
2264
+ },
2265
+ /**
2266
+ * Delete Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_delete).
2267
+ * @summary Deletes translations from specified language.
2268
+ * @param {number} id
2269
+ * @param {string} language The language code
2270
+ * @param {string} data JSON format
2271
+ * @param {string} [apiToken]
2272
+ * @param {*} [options] Override http request option.
2273
+ * @throws {RequiredError}
2274
+ */
2275
+ translationsDelete: async (id, language, data, apiToken, options = {}) => {
2276
+ // verify required parameter 'id' is not null or undefined
2277
+ (0, common_1.assertParamExists)('translationsDelete', 'id', id);
2278
+ // verify required parameter 'language' is not null or undefined
2279
+ (0, common_1.assertParamExists)('translationsDelete', 'language', language);
2280
+ // verify required parameter 'data' is not null or undefined
2281
+ (0, common_1.assertParamExists)('translationsDelete', 'data', data);
2282
+ const localVarPath = `/translations/delete`;
2283
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2284
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2285
+ let baseOptions;
2286
+ if (configuration) {
2287
+ baseOptions = configuration.baseOptions;
2288
+ }
2289
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2290
+ const localVarHeaderParameter = {};
2291
+ const localVarQueryParameter = {};
2292
+ const localVarFormParams = new URLSearchParams();
2293
+ if (apiToken !== undefined) {
2294
+ localVarFormParams.set('api_token', apiToken);
2295
+ }
2296
+ if (id !== undefined) {
2297
+ localVarFormParams.set('id', id);
2298
+ }
2299
+ if (language !== undefined) {
2300
+ localVarFormParams.set('language', language);
2301
+ }
2302
+ if (data !== undefined) {
2303
+ localVarFormParams.set('data', data);
2304
+ }
2305
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
2306
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2307
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2308
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2309
+ localVarRequestOptions.data = localVarFormParams.toString();
2310
+ return {
2311
+ url: (0, common_1.toPathString)(localVarUrlObj),
2312
+ options: localVarRequestOptions,
2313
+ };
2314
+ },
2315
+ /**
2316
+ * Update Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_update).
2317
+ * @summary Updates existing translations.
2318
+ * @param {number} id
2319
+ * @param {string} language The language code
2320
+ * @param {string} data JSON format
2321
+ * @param {string} [apiToken]
2322
+ * @param {*} [options] Override http request option.
2323
+ * @throws {RequiredError}
2324
+ */
2325
+ translationsUpdate: async (id, language, data, apiToken, options = {}) => {
2326
+ // verify required parameter 'id' is not null or undefined
2327
+ (0, common_1.assertParamExists)('translationsUpdate', 'id', id);
2328
+ // verify required parameter 'language' is not null or undefined
2329
+ (0, common_1.assertParamExists)('translationsUpdate', 'language', language);
2330
+ // verify required parameter 'data' is not null or undefined
2331
+ (0, common_1.assertParamExists)('translationsUpdate', 'data', data);
2332
+ const localVarPath = `/translations/update`;
2333
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2334
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2335
+ let baseOptions;
2336
+ if (configuration) {
2337
+ baseOptions = configuration.baseOptions;
2338
+ }
2339
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
2340
+ const localVarHeaderParameter = {};
2341
+ const localVarQueryParameter = {};
2342
+ const localVarFormParams = new URLSearchParams();
2343
+ if (apiToken !== undefined) {
2344
+ localVarFormParams.set('api_token', apiToken);
2345
+ }
2346
+ if (id !== undefined) {
2347
+ localVarFormParams.set('id', id);
2348
+ }
2349
+ if (language !== undefined) {
2350
+ localVarFormParams.set('language', language);
2351
+ }
2352
+ if (data !== undefined) {
2353
+ localVarFormParams.set('data', data);
2354
+ }
2355
+ localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
2356
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
2357
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2358
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
2359
+ localVarRequestOptions.data = localVarFormParams.toString();
2360
+ return {
2361
+ url: (0, common_1.toPathString)(localVarUrlObj),
2362
+ options: localVarRequestOptions,
2363
+ };
2364
+ },
2365
+ };
2366
+ };
2367
+ exports.TranslationsApiAxiosParamCreator = TranslationsApiAxiosParamCreator;
2368
+ /**
2369
+ * TranslationsApi - functional programming interface
2370
+ * @export
2371
+ */
2372
+ const TranslationsApiFp = function (configuration) {
2373
+ const localVarAxiosParamCreator = (0, exports.TranslationsApiAxiosParamCreator)(configuration);
2374
+ return {
2375
+ /**
2376
+ * Add Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_add).
2377
+ * @summary Adds translations to project. If translation exists, it will not overwrite it.
2378
+ * @param {number} id
2379
+ * @param {string} language The language code
2380
+ * @param {string} data JSON format
2381
+ * @param {string} [apiToken]
2382
+ * @param {*} [options] Override http request option.
2383
+ * @throws {RequiredError}
2384
+ */
2385
+ async translationsAdd(id, language, data, apiToken, options) {
2386
+ const localVarAxiosArgs = await localVarAxiosParamCreator.translationsAdd(id, language, data, apiToken, options);
2387
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2388
+ const localVarOperationServerBasePath = base_1.operationServerMap['TranslationsApi.translationsAdd']?.[localVarOperationServerIndex]?.url;
2389
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2390
+ },
2391
+ /**
2392
+ * Update Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_automatic).
2393
+ * @summary Updates existing translations.
2394
+ * @param {number} id
2395
+ * @param {TranslationsAutomaticProviderEnum} provider
2396
+ * @param {string} [apiToken]
2397
+ * @param {string} [sourceLanguage] The language code
2398
+ * @param {string} [providerSourceLanguage] The language code
2399
+ * @param {string} [targetLanguages] A JSON of the languages to translate to
2400
+ * @param {string} [_options] A JSON of the advanced options you want to use with the selected provider. Possible options include the POEditor tag of the strings you want to send for translation and some provider-specific options
2401
+ * @param {*} [options] Override http request option.
2402
+ * @throws {RequiredError}
2403
+ */
2404
+ async translationsAutomatic(id, provider, apiToken, sourceLanguage, providerSourceLanguage, targetLanguages, _options, options) {
2405
+ const localVarAxiosArgs = await localVarAxiosParamCreator.translationsAutomatic(id, provider, apiToken, sourceLanguage, providerSourceLanguage, targetLanguages, _options, options);
2406
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2407
+ const localVarOperationServerBasePath = base_1.operationServerMap['TranslationsApi.translationsAutomatic']?.[localVarOperationServerIndex]?.url;
2408
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2409
+ },
2410
+ /**
2411
+ * Delete Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_delete).
2412
+ * @summary Deletes translations from specified language.
2413
+ * @param {number} id
2414
+ * @param {string} language The language code
2415
+ * @param {string} data JSON format
2416
+ * @param {string} [apiToken]
2417
+ * @param {*} [options] Override http request option.
2418
+ * @throws {RequiredError}
2419
+ */
2420
+ async translationsDelete(id, language, data, apiToken, options) {
2421
+ const localVarAxiosArgs = await localVarAxiosParamCreator.translationsDelete(id, language, data, apiToken, options);
2422
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2423
+ const localVarOperationServerBasePath = base_1.operationServerMap['TranslationsApi.translationsDelete']?.[localVarOperationServerIndex]?.url;
2424
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2425
+ },
2426
+ /**
2427
+ * Update Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_update).
2428
+ * @summary Updates existing translations.
2429
+ * @param {number} id
2430
+ * @param {string} language The language code
2431
+ * @param {string} data JSON format
2432
+ * @param {string} [apiToken]
2433
+ * @param {*} [options] Override http request option.
2434
+ * @throws {RequiredError}
2435
+ */
2436
+ async translationsUpdate(id, language, data, apiToken, options) {
2437
+ const localVarAxiosArgs = await localVarAxiosParamCreator.translationsUpdate(id, language, data, apiToken, options);
2438
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2439
+ const localVarOperationServerBasePath = base_1.operationServerMap['TranslationsApi.translationsUpdate']?.[localVarOperationServerIndex]?.url;
2440
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
2441
+ },
2442
+ };
2443
+ };
2444
+ exports.TranslationsApiFp = TranslationsApiFp;
2445
+ /**
2446
+ * TranslationsApi - factory interface
2447
+ * @export
2448
+ */
2449
+ const TranslationsApiFactory = function (configuration, basePath, axios) {
2450
+ const localVarFp = (0, exports.TranslationsApiFp)(configuration);
2451
+ return {
2452
+ /**
2453
+ * Add Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_add).
2454
+ * @summary Adds translations to project. If translation exists, it will not overwrite it.
2455
+ * @param {number} id
2456
+ * @param {string} language The language code
2457
+ * @param {string} data JSON format
2458
+ * @param {string} [apiToken]
2459
+ * @param {*} [options] Override http request option.
2460
+ * @throws {RequiredError}
2461
+ */
2462
+ translationsAdd(id, language, data, apiToken, options) {
2463
+ return localVarFp.translationsAdd(id, language, data, apiToken, options).then((request) => request(axios, basePath));
2464
+ },
2465
+ /**
2466
+ * Update Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_automatic).
2467
+ * @summary Updates existing translations.
2468
+ * @param {number} id
2469
+ * @param {TranslationsAutomaticProviderEnum} provider
2470
+ * @param {string} [apiToken]
2471
+ * @param {string} [sourceLanguage] The language code
2472
+ * @param {string} [providerSourceLanguage] The language code
2473
+ * @param {string} [targetLanguages] A JSON of the languages to translate to
2474
+ * @param {string} [_options] A JSON of the advanced options you want to use with the selected provider. Possible options include the POEditor tag of the strings you want to send for translation and some provider-specific options
2475
+ * @param {*} [options] Override http request option.
2476
+ * @throws {RequiredError}
2477
+ */
2478
+ translationsAutomatic(id, provider, apiToken, sourceLanguage, providerSourceLanguage, targetLanguages, _options, options) {
2479
+ return localVarFp.translationsAutomatic(id, provider, apiToken, sourceLanguage, providerSourceLanguage, targetLanguages, _options, options).then((request) => request(axios, basePath));
2480
+ },
2481
+ /**
2482
+ * Delete Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_delete).
2483
+ * @summary Deletes translations from specified language.
2484
+ * @param {number} id
2485
+ * @param {string} language The language code
2486
+ * @param {string} data JSON format
2487
+ * @param {string} [apiToken]
2488
+ * @param {*} [options] Override http request option.
2489
+ * @throws {RequiredError}
2490
+ */
2491
+ translationsDelete(id, language, data, apiToken, options) {
2492
+ return localVarFp.translationsDelete(id, language, data, apiToken, options).then((request) => request(axios, basePath));
2493
+ },
2494
+ /**
2495
+ * Update Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_update).
2496
+ * @summary Updates existing translations.
2497
+ * @param {number} id
2498
+ * @param {string} language The language code
2499
+ * @param {string} data JSON format
2500
+ * @param {string} [apiToken]
2501
+ * @param {*} [options] Override http request option.
2502
+ * @throws {RequiredError}
2503
+ */
2504
+ translationsUpdate(id, language, data, apiToken, options) {
2505
+ return localVarFp.translationsUpdate(id, language, data, apiToken, options).then((request) => request(axios, basePath));
2506
+ },
2507
+ };
2508
+ };
2509
+ exports.TranslationsApiFactory = TranslationsApiFactory;
2510
+ /**
2511
+ * TranslationsApi - object-oriented interface
2512
+ * @export
2513
+ * @class TranslationsApi
2514
+ * @extends {BaseAPI}
2515
+ */
2516
+ class TranslationsApi extends base_1.BaseAPI {
2517
+ /**
2518
+ * Add Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_add).
2519
+ * @summary Adds translations to project. If translation exists, it will not overwrite it.
2520
+ * @param {number} id
2521
+ * @param {string} language The language code
2522
+ * @param {string} data JSON format
2523
+ * @param {string} [apiToken]
2524
+ * @param {*} [options] Override http request option.
2525
+ * @throws {RequiredError}
2526
+ * @memberof TranslationsApi
2527
+ */
2528
+ translationsAdd(id, language, data, apiToken, options) {
2529
+ return (0, exports.TranslationsApiFp)(this.configuration).translationsAdd(id, language, data, apiToken, options).then((request) => request(this.axios, this.basePath));
2530
+ }
2531
+ /**
2532
+ * Update Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_automatic).
2533
+ * @summary Updates existing translations.
2534
+ * @param {number} id
2535
+ * @param {TranslationsAutomaticProviderEnum} provider
2536
+ * @param {string} [apiToken]
2537
+ * @param {string} [sourceLanguage] The language code
2538
+ * @param {string} [providerSourceLanguage] The language code
2539
+ * @param {string} [targetLanguages] A JSON of the languages to translate to
2540
+ * @param {string} [_options] A JSON of the advanced options you want to use with the selected provider. Possible options include the POEditor tag of the strings you want to send for translation and some provider-specific options
2541
+ * @param {*} [options] Override http request option.
2542
+ * @throws {RequiredError}
2543
+ * @memberof TranslationsApi
2544
+ */
2545
+ translationsAutomatic(id, provider, apiToken, sourceLanguage, providerSourceLanguage, targetLanguages, _options, options) {
2546
+ return (0, exports.TranslationsApiFp)(this.configuration).translationsAutomatic(id, provider, apiToken, sourceLanguage, providerSourceLanguage, targetLanguages, _options, options).then((request) => request(this.axios, this.basePath));
2547
+ }
2548
+ /**
2549
+ * Delete Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_delete).
2550
+ * @summary Deletes translations from specified language.
2551
+ * @param {number} id
2552
+ * @param {string} language The language code
2553
+ * @param {string} data JSON format
2554
+ * @param {string} [apiToken]
2555
+ * @param {*} [options] Override http request option.
2556
+ * @throws {RequiredError}
2557
+ * @memberof TranslationsApi
2558
+ */
2559
+ translationsDelete(id, language, data, apiToken, options) {
2560
+ return (0, exports.TranslationsApiFp)(this.configuration).translationsDelete(id, language, data, apiToken, options).then((request) => request(this.axios, this.basePath));
2561
+ }
2562
+ /**
2563
+ * Update Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_update).
2564
+ * @summary Updates existing translations.
2565
+ * @param {number} id
2566
+ * @param {string} language The language code
2567
+ * @param {string} data JSON format
2568
+ * @param {string} [apiToken]
2569
+ * @param {*} [options] Override http request option.
2570
+ * @throws {RequiredError}
2571
+ * @memberof TranslationsApi
2572
+ */
2573
+ translationsUpdate(id, language, data, apiToken, options) {
2574
+ return (0, exports.TranslationsApiFp)(this.configuration).translationsUpdate(id, language, data, apiToken, options).then((request) => request(this.axios, this.basePath));
2575
+ }
2576
+ }
2577
+ exports.TranslationsApi = TranslationsApi;
2578
+ /**
2579
+ * @export
2580
+ */
2581
+ exports.TranslationsAutomaticProviderEnum = {
2582
+ Google: 'google',
2583
+ Microsoft: 'microsoft',
2584
+ Deepl: 'deepl'
2585
+ };
2586
+ //# sourceMappingURL=api.js.map