@emilgroup/document-sdk-node 1.7.1 → 1.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,764 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL DocumentService
5
+ * The EMIL DocumentService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { DeleteResponseClass } from '../models';
25
+ // @ts-ignore
26
+ import { GetDocxTemplateDownloadUrlResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { SharedUpdateDocxTemplateRequestDto } from '../models';
29
+ // @ts-ignore
30
+ import { UploadDocxTemplateRequestDto } from '../models';
31
+ // URLSearchParams not necessarily used
32
+ // @ts-ignore
33
+ import { URL, URLSearchParams } from 'url';
34
+ const FormData = require('form-data');
35
+ /**
36
+ * DocxTemplatesApi - axios parameter creator
37
+ * @export
38
+ */
39
+ export const DocxTemplatesApiAxiosParamCreator = function (configuration?: Configuration) {
40
+ return {
41
+ /**
42
+ * Permanently deletes the docx template. Supply the unique code that was returned when you created the docx template and this will delete it.
43
+ * @summary Delete the docx template
44
+ * @param {string} code
45
+ * @param {string} [authorization] Bearer Token
46
+ * @param {*} [options] Override http request option.
47
+ * @throws {RequiredError}
48
+ */
49
+ deleteDocxTemplate: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
50
+ // verify required parameter 'code' is not null or undefined
51
+ assertParamExists('deleteDocxTemplate', 'code', code)
52
+ const localVarPath = `/documentservice/v1/docx-templates/{code}`
53
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
54
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
55
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
56
+ let baseOptions;
57
+ let baseAccessToken;
58
+ if (configuration) {
59
+ baseOptions = configuration.baseOptions;
60
+ baseAccessToken = configuration.accessToken;
61
+ }
62
+
63
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
64
+ const localVarHeaderParameter = {} as any;
65
+ const localVarQueryParameter = {} as any;
66
+
67
+ // authentication bearer required
68
+ // http bearer authentication required
69
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
70
+
71
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
72
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
73
+ }
74
+
75
+
76
+
77
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
78
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
79
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
80
+
81
+ return {
82
+ url: toPathString(localVarUrlObj),
83
+ options: localVarRequestOptions,
84
+ };
85
+ },
86
+ /**
87
+ * Get a pre-signed download url for the given docx template.
88
+ * @summary Get pre-signed url for downloading docx template
89
+ * @param {string} code
90
+ * @param {string} [authorization] Bearer Token
91
+ * @param {*} [options] Override http request option.
92
+ * @throws {RequiredError}
93
+ */
94
+ downloadDocxTemplate: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
95
+ // verify required parameter 'code' is not null or undefined
96
+ assertParamExists('downloadDocxTemplate', 'code', code)
97
+ const localVarPath = `/documentservice/v1/docx-templates/{code}/download-url`
98
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
99
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
100
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
101
+ let baseOptions;
102
+ let baseAccessToken;
103
+ if (configuration) {
104
+ baseOptions = configuration.baseOptions;
105
+ baseAccessToken = configuration.accessToken;
106
+ }
107
+
108
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
109
+ const localVarHeaderParameter = {} as any;
110
+ const localVarQueryParameter = {} as any;
111
+
112
+ // authentication bearer required
113
+ // http bearer authentication required
114
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
115
+
116
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
117
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
118
+ }
119
+
120
+
121
+
122
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
123
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
124
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
125
+
126
+ return {
127
+ url: toPathString(localVarUrlObj),
128
+ options: localVarRequestOptions,
129
+ };
130
+ },
131
+ /**
132
+ * Get a docx template.
133
+ * @summary Retrieve the docx template
134
+ * @param {string} code
135
+ * @param {string} [authorization] Bearer Token
136
+ * @param {*} [options] Override http request option.
137
+ * @throws {RequiredError}
138
+ */
139
+ getDocxTemplate: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
140
+ // verify required parameter 'code' is not null or undefined
141
+ assertParamExists('getDocxTemplate', 'code', code)
142
+ const localVarPath = `/documentservice/v1/docx-templates/{code}`
143
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
144
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
145
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
146
+ let baseOptions;
147
+ let baseAccessToken;
148
+ if (configuration) {
149
+ baseOptions = configuration.baseOptions;
150
+ baseAccessToken = configuration.accessToken;
151
+ }
152
+
153
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
154
+ const localVarHeaderParameter = {} as any;
155
+ const localVarQueryParameter = {} as any;
156
+
157
+ // authentication bearer required
158
+ // http bearer authentication required
159
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
160
+
161
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
162
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
163
+ }
164
+
165
+
166
+
167
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
168
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
169
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
170
+
171
+ return {
172
+ url: toPathString(localVarUrlObj),
173
+ options: localVarRequestOptions,
174
+ };
175
+ },
176
+ /**
177
+ * Returns a list of docx templates you have previously created. The docx templates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
178
+ * @summary List docx templates
179
+ * @param {string} [authorization] Bearer Token
180
+ * @param {number} [pageSize] Page size
181
+ * @param {string} [pageToken] Page token
182
+ * @param {string} [filter] List filter
183
+ * @param {string} [search] Search query
184
+ * @param {string} [order] Ordering criteria
185
+ * @param {string} [expand] Extra fields to fetch
186
+ * @param {*} [options] Override http request option.
187
+ * @throws {RequiredError}
188
+ */
189
+ listDocxTemplates: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
190
+ const localVarPath = `/documentservice/v1/docx-templates`;
191
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
192
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
193
+ let baseOptions;
194
+ let baseAccessToken;
195
+ if (configuration) {
196
+ baseOptions = configuration.baseOptions;
197
+ baseAccessToken = configuration.accessToken;
198
+ }
199
+
200
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
201
+ const localVarHeaderParameter = {} as any;
202
+ const localVarQueryParameter = {} as any;
203
+
204
+ // authentication bearer required
205
+ // http bearer authentication required
206
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
207
+
208
+ if (pageSize !== undefined) {
209
+ localVarQueryParameter['pageSize'] = pageSize;
210
+ }
211
+
212
+ if (pageToken !== undefined) {
213
+ localVarQueryParameter['pageToken'] = pageToken;
214
+ }
215
+
216
+ if (filter !== undefined) {
217
+ localVarQueryParameter['filter'] = filter;
218
+ }
219
+
220
+ if (search !== undefined) {
221
+ localVarQueryParameter['search'] = search;
222
+ }
223
+
224
+ if (order !== undefined) {
225
+ localVarQueryParameter['order'] = order;
226
+ }
227
+
228
+ if (expand !== undefined) {
229
+ localVarQueryParameter['expand'] = expand;
230
+ }
231
+
232
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
233
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
234
+ }
235
+
236
+
237
+
238
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
239
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
240
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
241
+
242
+ return {
243
+ url: toPathString(localVarUrlObj),
244
+ options: localVarRequestOptions,
245
+ };
246
+ },
247
+ /**
248
+ * Updates a docx template metadata.
249
+ * @summary Update the docx template
250
+ * @param {string} code
251
+ * @param {SharedUpdateDocxTemplateRequestDto} sharedUpdateDocxTemplateRequestDto
252
+ * @param {string} [authorization] Bearer Token
253
+ * @param {*} [options] Override http request option.
254
+ * @throws {RequiredError}
255
+ */
256
+ updateDocxTemplate: async (code: string, sharedUpdateDocxTemplateRequestDto: SharedUpdateDocxTemplateRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
257
+ // verify required parameter 'code' is not null or undefined
258
+ assertParamExists('updateDocxTemplate', 'code', code)
259
+ // verify required parameter 'sharedUpdateDocxTemplateRequestDto' is not null or undefined
260
+ assertParamExists('updateDocxTemplate', 'sharedUpdateDocxTemplateRequestDto', sharedUpdateDocxTemplateRequestDto)
261
+ const localVarPath = `/documentservice/v1/docx-templates/{code}`
262
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
263
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
264
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
265
+ let baseOptions;
266
+ let baseAccessToken;
267
+ if (configuration) {
268
+ baseOptions = configuration.baseOptions;
269
+ baseAccessToken = configuration.accessToken;
270
+ }
271
+
272
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
273
+ const localVarHeaderParameter = {} as any;
274
+ const localVarQueryParameter = {} as any;
275
+
276
+ // authentication bearer required
277
+ // http bearer authentication required
278
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
279
+
280
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
281
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
282
+ }
283
+
284
+
285
+
286
+ localVarHeaderParameter['Content-Type'] = 'application/json';
287
+
288
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
289
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
290
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
291
+ localVarRequestOptions.data = serializeDataIfNeeded(sharedUpdateDocxTemplateRequestDto, localVarRequestOptions, configuration)
292
+
293
+ return {
294
+ url: toPathString(localVarUrlObj),
295
+ options: localVarRequestOptions,
296
+ };
297
+ },
298
+ /**
299
+ * Upload a docx template via a presigned Url.
300
+ * @summary Upload a docx template.
301
+ * @param {UploadDocxTemplateRequestDto} uploadDocxTemplateRequestDto
302
+ * @param {string} [authorization] Bearer Token
303
+ * @param {*} [options] Override http request option.
304
+ * @throws {RequiredError}
305
+ */
306
+ uploadDocxTemplate: async (uploadDocxTemplateRequestDto: UploadDocxTemplateRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
307
+ // verify required parameter 'uploadDocxTemplateRequestDto' is not null or undefined
308
+ assertParamExists('uploadDocxTemplate', 'uploadDocxTemplateRequestDto', uploadDocxTemplateRequestDto)
309
+ const localVarPath = `/documentservice/v1/docx-templates`;
310
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
311
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
312
+ let baseOptions;
313
+ let baseAccessToken;
314
+ if (configuration) {
315
+ baseOptions = configuration.baseOptions;
316
+ baseAccessToken = configuration.accessToken;
317
+ }
318
+
319
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
320
+ const localVarHeaderParameter = {} as any;
321
+ const localVarQueryParameter = {} as any;
322
+
323
+ // authentication bearer required
324
+ // http bearer authentication required
325
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
326
+
327
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
328
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
329
+ }
330
+
331
+
332
+
333
+ localVarHeaderParameter['Content-Type'] = 'application/json';
334
+
335
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
336
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
337
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
338
+ localVarRequestOptions.data = serializeDataIfNeeded(uploadDocxTemplateRequestDto, localVarRequestOptions, configuration)
339
+
340
+ return {
341
+ url: toPathString(localVarUrlObj),
342
+ options: localVarRequestOptions,
343
+ };
344
+ },
345
+ }
346
+ };
347
+
348
+ /**
349
+ * DocxTemplatesApi - functional programming interface
350
+ * @export
351
+ */
352
+ export const DocxTemplatesApiFp = function(configuration?: Configuration) {
353
+ const localVarAxiosParamCreator = DocxTemplatesApiAxiosParamCreator(configuration)
354
+ return {
355
+ /**
356
+ * Permanently deletes the docx template. Supply the unique code that was returned when you created the docx template and this will delete it.
357
+ * @summary Delete the docx template
358
+ * @param {string} code
359
+ * @param {string} [authorization] Bearer Token
360
+ * @param {*} [options] Override http request option.
361
+ * @throws {RequiredError}
362
+ */
363
+ async deleteDocxTemplate(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteResponseClass>> {
364
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDocxTemplate(code, authorization, options);
365
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
366
+ },
367
+ /**
368
+ * Get a pre-signed download url for the given docx template.
369
+ * @summary Get pre-signed url for downloading docx template
370
+ * @param {string} code
371
+ * @param {string} [authorization] Bearer Token
372
+ * @param {*} [options] Override http request option.
373
+ * @throws {RequiredError}
374
+ */
375
+ async downloadDocxTemplate(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDocxTemplateDownloadUrlResponseClass>> {
376
+ const localVarAxiosArgs = await localVarAxiosParamCreator.downloadDocxTemplate(code, authorization, options);
377
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
378
+ },
379
+ /**
380
+ * Get a docx template.
381
+ * @summary Retrieve the docx template
382
+ * @param {string} code
383
+ * @param {string} [authorization] Bearer Token
384
+ * @param {*} [options] Override http request option.
385
+ * @throws {RequiredError}
386
+ */
387
+ async getDocxTemplate(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
388
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getDocxTemplate(code, authorization, options);
389
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
390
+ },
391
+ /**
392
+ * Returns a list of docx templates you have previously created. The docx templates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
393
+ * @summary List docx templates
394
+ * @param {string} [authorization] Bearer Token
395
+ * @param {number} [pageSize] Page size
396
+ * @param {string} [pageToken] Page token
397
+ * @param {string} [filter] List filter
398
+ * @param {string} [search] Search query
399
+ * @param {string} [order] Ordering criteria
400
+ * @param {string} [expand] Extra fields to fetch
401
+ * @param {*} [options] Override http request option.
402
+ * @throws {RequiredError}
403
+ */
404
+ async listDocxTemplates(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
405
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listDocxTemplates(authorization, pageSize, pageToken, filter, search, order, expand, options);
406
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
407
+ },
408
+ /**
409
+ * Updates a docx template metadata.
410
+ * @summary Update the docx template
411
+ * @param {string} code
412
+ * @param {SharedUpdateDocxTemplateRequestDto} sharedUpdateDocxTemplateRequestDto
413
+ * @param {string} [authorization] Bearer Token
414
+ * @param {*} [options] Override http request option.
415
+ * @throws {RequiredError}
416
+ */
417
+ async updateDocxTemplate(code: string, sharedUpdateDocxTemplateRequestDto: SharedUpdateDocxTemplateRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
418
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateDocxTemplate(code, sharedUpdateDocxTemplateRequestDto, authorization, options);
419
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
420
+ },
421
+ /**
422
+ * Upload a docx template via a presigned Url.
423
+ * @summary Upload a docx template.
424
+ * @param {UploadDocxTemplateRequestDto} uploadDocxTemplateRequestDto
425
+ * @param {string} [authorization] Bearer Token
426
+ * @param {*} [options] Override http request option.
427
+ * @throws {RequiredError}
428
+ */
429
+ async uploadDocxTemplate(uploadDocxTemplateRequestDto: UploadDocxTemplateRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
430
+ const localVarAxiosArgs = await localVarAxiosParamCreator.uploadDocxTemplate(uploadDocxTemplateRequestDto, authorization, options);
431
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
432
+ },
433
+ }
434
+ };
435
+
436
+ /**
437
+ * DocxTemplatesApi - factory interface
438
+ * @export
439
+ */
440
+ export const DocxTemplatesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
441
+ const localVarFp = DocxTemplatesApiFp(configuration)
442
+ return {
443
+ /**
444
+ * Permanently deletes the docx template. Supply the unique code that was returned when you created the docx template and this will delete it.
445
+ * @summary Delete the docx template
446
+ * @param {string} code
447
+ * @param {string} [authorization] Bearer Token
448
+ * @param {*} [options] Override http request option.
449
+ * @throws {RequiredError}
450
+ */
451
+ deleteDocxTemplate(code: string, authorization?: string, options?: any): AxiosPromise<DeleteResponseClass> {
452
+ return localVarFp.deleteDocxTemplate(code, authorization, options).then((request) => request(axios, basePath));
453
+ },
454
+ /**
455
+ * Get a pre-signed download url for the given docx template.
456
+ * @summary Get pre-signed url for downloading docx template
457
+ * @param {string} code
458
+ * @param {string} [authorization] Bearer Token
459
+ * @param {*} [options] Override http request option.
460
+ * @throws {RequiredError}
461
+ */
462
+ downloadDocxTemplate(code: string, authorization?: string, options?: any): AxiosPromise<GetDocxTemplateDownloadUrlResponseClass> {
463
+ return localVarFp.downloadDocxTemplate(code, authorization, options).then((request) => request(axios, basePath));
464
+ },
465
+ /**
466
+ * Get a docx template.
467
+ * @summary Retrieve the docx template
468
+ * @param {string} code
469
+ * @param {string} [authorization] Bearer Token
470
+ * @param {*} [options] Override http request option.
471
+ * @throws {RequiredError}
472
+ */
473
+ getDocxTemplate(code: string, authorization?: string, options?: any): AxiosPromise<object> {
474
+ return localVarFp.getDocxTemplate(code, authorization, options).then((request) => request(axios, basePath));
475
+ },
476
+ /**
477
+ * Returns a list of docx templates you have previously created. The docx templates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
478
+ * @summary List docx templates
479
+ * @param {string} [authorization] Bearer Token
480
+ * @param {number} [pageSize] Page size
481
+ * @param {string} [pageToken] Page token
482
+ * @param {string} [filter] List filter
483
+ * @param {string} [search] Search query
484
+ * @param {string} [order] Ordering criteria
485
+ * @param {string} [expand] Extra fields to fetch
486
+ * @param {*} [options] Override http request option.
487
+ * @throws {RequiredError}
488
+ */
489
+ listDocxTemplates(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise<object> {
490
+ return localVarFp.listDocxTemplates(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
491
+ },
492
+ /**
493
+ * Updates a docx template metadata.
494
+ * @summary Update the docx template
495
+ * @param {string} code
496
+ * @param {SharedUpdateDocxTemplateRequestDto} sharedUpdateDocxTemplateRequestDto
497
+ * @param {string} [authorization] Bearer Token
498
+ * @param {*} [options] Override http request option.
499
+ * @throws {RequiredError}
500
+ */
501
+ updateDocxTemplate(code: string, sharedUpdateDocxTemplateRequestDto: SharedUpdateDocxTemplateRequestDto, authorization?: string, options?: any): AxiosPromise<object> {
502
+ return localVarFp.updateDocxTemplate(code, sharedUpdateDocxTemplateRequestDto, authorization, options).then((request) => request(axios, basePath));
503
+ },
504
+ /**
505
+ * Upload a docx template via a presigned Url.
506
+ * @summary Upload a docx template.
507
+ * @param {UploadDocxTemplateRequestDto} uploadDocxTemplateRequestDto
508
+ * @param {string} [authorization] Bearer Token
509
+ * @param {*} [options] Override http request option.
510
+ * @throws {RequiredError}
511
+ */
512
+ uploadDocxTemplate(uploadDocxTemplateRequestDto: UploadDocxTemplateRequestDto, authorization?: string, options?: any): AxiosPromise<object> {
513
+ return localVarFp.uploadDocxTemplate(uploadDocxTemplateRequestDto, authorization, options).then((request) => request(axios, basePath));
514
+ },
515
+ };
516
+ };
517
+
518
+ /**
519
+ * Request parameters for deleteDocxTemplate operation in DocxTemplatesApi.
520
+ * @export
521
+ * @interface DocxTemplatesApiDeleteDocxTemplateRequest
522
+ */
523
+ export interface DocxTemplatesApiDeleteDocxTemplateRequest {
524
+ /**
525
+ *
526
+ * @type {string}
527
+ * @memberof DocxTemplatesApiDeleteDocxTemplate
528
+ */
529
+ readonly code: string
530
+
531
+ /**
532
+ * Bearer Token
533
+ * @type {string}
534
+ * @memberof DocxTemplatesApiDeleteDocxTemplate
535
+ */
536
+ readonly authorization?: string
537
+ }
538
+
539
+ /**
540
+ * Request parameters for downloadDocxTemplate operation in DocxTemplatesApi.
541
+ * @export
542
+ * @interface DocxTemplatesApiDownloadDocxTemplateRequest
543
+ */
544
+ export interface DocxTemplatesApiDownloadDocxTemplateRequest {
545
+ /**
546
+ *
547
+ * @type {string}
548
+ * @memberof DocxTemplatesApiDownloadDocxTemplate
549
+ */
550
+ readonly code: string
551
+
552
+ /**
553
+ * Bearer Token
554
+ * @type {string}
555
+ * @memberof DocxTemplatesApiDownloadDocxTemplate
556
+ */
557
+ readonly authorization?: string
558
+ }
559
+
560
+ /**
561
+ * Request parameters for getDocxTemplate operation in DocxTemplatesApi.
562
+ * @export
563
+ * @interface DocxTemplatesApiGetDocxTemplateRequest
564
+ */
565
+ export interface DocxTemplatesApiGetDocxTemplateRequest {
566
+ /**
567
+ *
568
+ * @type {string}
569
+ * @memberof DocxTemplatesApiGetDocxTemplate
570
+ */
571
+ readonly code: string
572
+
573
+ /**
574
+ * Bearer Token
575
+ * @type {string}
576
+ * @memberof DocxTemplatesApiGetDocxTemplate
577
+ */
578
+ readonly authorization?: string
579
+ }
580
+
581
+ /**
582
+ * Request parameters for listDocxTemplates operation in DocxTemplatesApi.
583
+ * @export
584
+ * @interface DocxTemplatesApiListDocxTemplatesRequest
585
+ */
586
+ export interface DocxTemplatesApiListDocxTemplatesRequest {
587
+ /**
588
+ * Bearer Token
589
+ * @type {string}
590
+ * @memberof DocxTemplatesApiListDocxTemplates
591
+ */
592
+ readonly authorization?: string
593
+
594
+ /**
595
+ * Page size
596
+ * @type {number}
597
+ * @memberof DocxTemplatesApiListDocxTemplates
598
+ */
599
+ readonly pageSize?: number
600
+
601
+ /**
602
+ * Page token
603
+ * @type {string}
604
+ * @memberof DocxTemplatesApiListDocxTemplates
605
+ */
606
+ readonly pageToken?: string
607
+
608
+ /**
609
+ * List filter
610
+ * @type {string}
611
+ * @memberof DocxTemplatesApiListDocxTemplates
612
+ */
613
+ readonly filter?: string
614
+
615
+ /**
616
+ * Search query
617
+ * @type {string}
618
+ * @memberof DocxTemplatesApiListDocxTemplates
619
+ */
620
+ readonly search?: string
621
+
622
+ /**
623
+ * Ordering criteria
624
+ * @type {string}
625
+ * @memberof DocxTemplatesApiListDocxTemplates
626
+ */
627
+ readonly order?: string
628
+
629
+ /**
630
+ * Extra fields to fetch
631
+ * @type {string}
632
+ * @memberof DocxTemplatesApiListDocxTemplates
633
+ */
634
+ readonly expand?: string
635
+ }
636
+
637
+ /**
638
+ * Request parameters for updateDocxTemplate operation in DocxTemplatesApi.
639
+ * @export
640
+ * @interface DocxTemplatesApiUpdateDocxTemplateRequest
641
+ */
642
+ export interface DocxTemplatesApiUpdateDocxTemplateRequest {
643
+ /**
644
+ *
645
+ * @type {string}
646
+ * @memberof DocxTemplatesApiUpdateDocxTemplate
647
+ */
648
+ readonly code: string
649
+
650
+ /**
651
+ *
652
+ * @type {SharedUpdateDocxTemplateRequestDto}
653
+ * @memberof DocxTemplatesApiUpdateDocxTemplate
654
+ */
655
+ readonly sharedUpdateDocxTemplateRequestDto: SharedUpdateDocxTemplateRequestDto
656
+
657
+ /**
658
+ * Bearer Token
659
+ * @type {string}
660
+ * @memberof DocxTemplatesApiUpdateDocxTemplate
661
+ */
662
+ readonly authorization?: string
663
+ }
664
+
665
+ /**
666
+ * Request parameters for uploadDocxTemplate operation in DocxTemplatesApi.
667
+ * @export
668
+ * @interface DocxTemplatesApiUploadDocxTemplateRequest
669
+ */
670
+ export interface DocxTemplatesApiUploadDocxTemplateRequest {
671
+ /**
672
+ *
673
+ * @type {UploadDocxTemplateRequestDto}
674
+ * @memberof DocxTemplatesApiUploadDocxTemplate
675
+ */
676
+ readonly uploadDocxTemplateRequestDto: UploadDocxTemplateRequestDto
677
+
678
+ /**
679
+ * Bearer Token
680
+ * @type {string}
681
+ * @memberof DocxTemplatesApiUploadDocxTemplate
682
+ */
683
+ readonly authorization?: string
684
+ }
685
+
686
+ /**
687
+ * DocxTemplatesApi - object-oriented interface
688
+ * @export
689
+ * @class DocxTemplatesApi
690
+ * @extends {BaseAPI}
691
+ */
692
+ export class DocxTemplatesApi extends BaseAPI {
693
+ /**
694
+ * Permanently deletes the docx template. Supply the unique code that was returned when you created the docx template and this will delete it.
695
+ * @summary Delete the docx template
696
+ * @param {DocxTemplatesApiDeleteDocxTemplateRequest} requestParameters Request parameters.
697
+ * @param {*} [options] Override http request option.
698
+ * @throws {RequiredError}
699
+ * @memberof DocxTemplatesApi
700
+ */
701
+ public deleteDocxTemplate(requestParameters: DocxTemplatesApiDeleteDocxTemplateRequest, options?: AxiosRequestConfig) {
702
+ return DocxTemplatesApiFp(this.configuration).deleteDocxTemplate(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
703
+ }
704
+
705
+ /**
706
+ * Get a pre-signed download url for the given docx template.
707
+ * @summary Get pre-signed url for downloading docx template
708
+ * @param {DocxTemplatesApiDownloadDocxTemplateRequest} requestParameters Request parameters.
709
+ * @param {*} [options] Override http request option.
710
+ * @throws {RequiredError}
711
+ * @memberof DocxTemplatesApi
712
+ */
713
+ public downloadDocxTemplate(requestParameters: DocxTemplatesApiDownloadDocxTemplateRequest, options?: AxiosRequestConfig) {
714
+ return DocxTemplatesApiFp(this.configuration).downloadDocxTemplate(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
715
+ }
716
+
717
+ /**
718
+ * Get a docx template.
719
+ * @summary Retrieve the docx template
720
+ * @param {DocxTemplatesApiGetDocxTemplateRequest} requestParameters Request parameters.
721
+ * @param {*} [options] Override http request option.
722
+ * @throws {RequiredError}
723
+ * @memberof DocxTemplatesApi
724
+ */
725
+ public getDocxTemplate(requestParameters: DocxTemplatesApiGetDocxTemplateRequest, options?: AxiosRequestConfig) {
726
+ return DocxTemplatesApiFp(this.configuration).getDocxTemplate(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
727
+ }
728
+
729
+ /**
730
+ * Returns a list of docx templates you have previously created. The docx templates are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
731
+ * @summary List docx templates
732
+ * @param {DocxTemplatesApiListDocxTemplatesRequest} requestParameters Request parameters.
733
+ * @param {*} [options] Override http request option.
734
+ * @throws {RequiredError}
735
+ * @memberof DocxTemplatesApi
736
+ */
737
+ public listDocxTemplates(requestParameters: DocxTemplatesApiListDocxTemplatesRequest = {}, options?: AxiosRequestConfig) {
738
+ return DocxTemplatesApiFp(this.configuration).listDocxTemplates(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
739
+ }
740
+
741
+ /**
742
+ * Updates a docx template metadata.
743
+ * @summary Update the docx template
744
+ * @param {DocxTemplatesApiUpdateDocxTemplateRequest} requestParameters Request parameters.
745
+ * @param {*} [options] Override http request option.
746
+ * @throws {RequiredError}
747
+ * @memberof DocxTemplatesApi
748
+ */
749
+ public updateDocxTemplate(requestParameters: DocxTemplatesApiUpdateDocxTemplateRequest, options?: AxiosRequestConfig) {
750
+ return DocxTemplatesApiFp(this.configuration).updateDocxTemplate(requestParameters.code, requestParameters.sharedUpdateDocxTemplateRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
751
+ }
752
+
753
+ /**
754
+ * Upload a docx template via a presigned Url.
755
+ * @summary Upload a docx template.
756
+ * @param {DocxTemplatesApiUploadDocxTemplateRequest} requestParameters Request parameters.
757
+ * @param {*} [options] Override http request option.
758
+ * @throws {RequiredError}
759
+ * @memberof DocxTemplatesApi
760
+ */
761
+ public uploadDocxTemplate(requestParameters: DocxTemplatesApiUploadDocxTemplateRequest, options?: AxiosRequestConfig) {
762
+ return DocxTemplatesApiFp(this.configuration).uploadDocxTemplate(requestParameters.uploadDocxTemplateRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
763
+ }
764
+ }