@emilgroup/document-sdk 1.7.0 → 1.8.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.
@@ -36,6 +36,7 @@ models/download-document-request-dto.ts
36
36
  models/get-doc-template-request-dto.ts
37
37
  models/get-doc-template-response-class.ts
38
38
  models/get-document-download-url-response-class.ts
39
+ models/get-docx-template-download-url-response-class.ts
39
40
  models/get-layout-request-dto.ts
40
41
  models/get-layout-response-class.ts
41
42
  models/get-product-document-download-url-response-class.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/document-sdk@1.7.0 --save
20
+ npm install @emilgroup/document-sdk@1.8.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/document-sdk@1.7.0
24
+ yarn add @emilgroup/document-sdk@1.8.0
25
25
  ```
26
26
 
27
27
  And then you can import `DocumentsApi`.
@@ -21,6 +21,10 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
21
21
  // @ts-ignore
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
23
  // @ts-ignore
24
+ import { DeleteResponseClass } from '../models';
25
+ // @ts-ignore
26
+ import { GetDocxTemplateDownloadUrlResponseClass } from '../models';
27
+ // @ts-ignore
24
28
  import { SharedUpdateDocxTemplateRequestDto } from '../models';
25
29
  // @ts-ignore
26
30
  import { UploadDocxTemplateRequestDto } from '../models';
@@ -30,6 +34,96 @@ import { UploadDocxTemplateRequestDto } from '../models';
30
34
  */
31
35
  export const DocxTemplatesApiAxiosParamCreator = function (configuration?: Configuration) {
32
36
  return {
37
+ /**
38
+ * Permanently deletes the docx template. Supply the unique code that was returned when you created the docx template and this will delete it.
39
+ * @summary Delete the docx template
40
+ * @param {string} code
41
+ * @param {string} [authorization] Bearer Token
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ deleteDocxTemplate: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
46
+ // verify required parameter 'code' is not null or undefined
47
+ assertParamExists('deleteDocxTemplate', 'code', code)
48
+ const localVarPath = `/documentservice/v1/docx-templates/{code}`
49
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
50
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
51
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
52
+ let baseOptions;
53
+ let baseAccessToken;
54
+ if (configuration) {
55
+ baseOptions = configuration.baseOptions;
56
+ baseAccessToken = configuration.accessToken;
57
+ }
58
+
59
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
60
+ const localVarHeaderParameter = {} as any;
61
+ const localVarQueryParameter = {} as any;
62
+
63
+ // authentication bearer required
64
+ // http bearer authentication required
65
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
66
+
67
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
68
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
69
+ }
70
+
71
+
72
+
73
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
74
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
75
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
76
+
77
+ return {
78
+ url: toPathString(localVarUrlObj),
79
+ options: localVarRequestOptions,
80
+ };
81
+ },
82
+ /**
83
+ * Get a pre-signed download url for the given docx template.
84
+ * @summary Get pre-signed url for downloading docx template
85
+ * @param {string} code
86
+ * @param {string} [authorization] Bearer Token
87
+ * @param {*} [options] Override http request option.
88
+ * @throws {RequiredError}
89
+ */
90
+ downloadDocxTemplate: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
91
+ // verify required parameter 'code' is not null or undefined
92
+ assertParamExists('downloadDocxTemplate', 'code', code)
93
+ const localVarPath = `/documentservice/v1/docx-templates/{code}/download-url`
94
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
95
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
96
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
97
+ let baseOptions;
98
+ let baseAccessToken;
99
+ if (configuration) {
100
+ baseOptions = configuration.baseOptions;
101
+ baseAccessToken = configuration.accessToken;
102
+ }
103
+
104
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
105
+ const localVarHeaderParameter = {} as any;
106
+ const localVarQueryParameter = {} as any;
107
+
108
+ // authentication bearer required
109
+ // http bearer authentication required
110
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
111
+
112
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
113
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
114
+ }
115
+
116
+
117
+
118
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
119
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
120
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
121
+
122
+ return {
123
+ url: toPathString(localVarUrlObj),
124
+ options: localVarRequestOptions,
125
+ };
126
+ },
33
127
  /**
34
128
  * Get a docx template.
35
129
  * @summary Retrieve the docx template
@@ -254,6 +348,30 @@ export const DocxTemplatesApiAxiosParamCreator = function (configuration?: Confi
254
348
  export const DocxTemplatesApiFp = function(configuration?: Configuration) {
255
349
  const localVarAxiosParamCreator = DocxTemplatesApiAxiosParamCreator(configuration)
256
350
  return {
351
+ /**
352
+ * Permanently deletes the docx template. Supply the unique code that was returned when you created the docx template and this will delete it.
353
+ * @summary Delete the docx template
354
+ * @param {string} code
355
+ * @param {string} [authorization] Bearer Token
356
+ * @param {*} [options] Override http request option.
357
+ * @throws {RequiredError}
358
+ */
359
+ async deleteDocxTemplate(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteResponseClass>> {
360
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteDocxTemplate(code, authorization, options);
361
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
362
+ },
363
+ /**
364
+ * Get a pre-signed download url for the given docx template.
365
+ * @summary Get pre-signed url for downloading docx template
366
+ * @param {string} code
367
+ * @param {string} [authorization] Bearer Token
368
+ * @param {*} [options] Override http request option.
369
+ * @throws {RequiredError}
370
+ */
371
+ async downloadDocxTemplate(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDocxTemplateDownloadUrlResponseClass>> {
372
+ const localVarAxiosArgs = await localVarAxiosParamCreator.downloadDocxTemplate(code, authorization, options);
373
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
374
+ },
257
375
  /**
258
376
  * Get a docx template.
259
377
  * @summary Retrieve the docx template
@@ -318,6 +436,28 @@ export const DocxTemplatesApiFp = function(configuration?: Configuration) {
318
436
  export const DocxTemplatesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
319
437
  const localVarFp = DocxTemplatesApiFp(configuration)
320
438
  return {
439
+ /**
440
+ * Permanently deletes the docx template. Supply the unique code that was returned when you created the docx template and this will delete it.
441
+ * @summary Delete the docx template
442
+ * @param {string} code
443
+ * @param {string} [authorization] Bearer Token
444
+ * @param {*} [options] Override http request option.
445
+ * @throws {RequiredError}
446
+ */
447
+ deleteDocxTemplate(code: string, authorization?: string, options?: any): AxiosPromise<DeleteResponseClass> {
448
+ return localVarFp.deleteDocxTemplate(code, authorization, options).then((request) => request(axios, basePath));
449
+ },
450
+ /**
451
+ * Get a pre-signed download url for the given docx template.
452
+ * @summary Get pre-signed url for downloading docx template
453
+ * @param {string} code
454
+ * @param {string} [authorization] Bearer Token
455
+ * @param {*} [options] Override http request option.
456
+ * @throws {RequiredError}
457
+ */
458
+ downloadDocxTemplate(code: string, authorization?: string, options?: any): AxiosPromise<GetDocxTemplateDownloadUrlResponseClass> {
459
+ return localVarFp.downloadDocxTemplate(code, authorization, options).then((request) => request(axios, basePath));
460
+ },
321
461
  /**
322
462
  * Get a docx template.
323
463
  * @summary Retrieve the docx template
@@ -371,6 +511,48 @@ export const DocxTemplatesApiFactory = function (configuration?: Configuration,
371
511
  };
372
512
  };
373
513
 
514
+ /**
515
+ * Request parameters for deleteDocxTemplate operation in DocxTemplatesApi.
516
+ * @export
517
+ * @interface DocxTemplatesApiDeleteDocxTemplateRequest
518
+ */
519
+ export interface DocxTemplatesApiDeleteDocxTemplateRequest {
520
+ /**
521
+ *
522
+ * @type {string}
523
+ * @memberof DocxTemplatesApiDeleteDocxTemplate
524
+ */
525
+ readonly code: string
526
+
527
+ /**
528
+ * Bearer Token
529
+ * @type {string}
530
+ * @memberof DocxTemplatesApiDeleteDocxTemplate
531
+ */
532
+ readonly authorization?: string
533
+ }
534
+
535
+ /**
536
+ * Request parameters for downloadDocxTemplate operation in DocxTemplatesApi.
537
+ * @export
538
+ * @interface DocxTemplatesApiDownloadDocxTemplateRequest
539
+ */
540
+ export interface DocxTemplatesApiDownloadDocxTemplateRequest {
541
+ /**
542
+ *
543
+ * @type {string}
544
+ * @memberof DocxTemplatesApiDownloadDocxTemplate
545
+ */
546
+ readonly code: string
547
+
548
+ /**
549
+ * Bearer Token
550
+ * @type {string}
551
+ * @memberof DocxTemplatesApiDownloadDocxTemplate
552
+ */
553
+ readonly authorization?: string
554
+ }
555
+
374
556
  /**
375
557
  * Request parameters for getDocxTemplate operation in DocxTemplatesApi.
376
558
  * @export
@@ -504,6 +686,30 @@ export interface DocxTemplatesApiUploadDocxTemplateRequest {
504
686
  * @extends {BaseAPI}
505
687
  */
506
688
  export class DocxTemplatesApi extends BaseAPI {
689
+ /**
690
+ * Permanently deletes the docx template. Supply the unique code that was returned when you created the docx template and this will delete it.
691
+ * @summary Delete the docx template
692
+ * @param {DocxTemplatesApiDeleteDocxTemplateRequest} requestParameters Request parameters.
693
+ * @param {*} [options] Override http request option.
694
+ * @throws {RequiredError}
695
+ * @memberof DocxTemplatesApi
696
+ */
697
+ public deleteDocxTemplate(requestParameters: DocxTemplatesApiDeleteDocxTemplateRequest, options?: AxiosRequestConfig) {
698
+ return DocxTemplatesApiFp(this.configuration).deleteDocxTemplate(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
699
+ }
700
+
701
+ /**
702
+ * Get a pre-signed download url for the given docx template.
703
+ * @summary Get pre-signed url for downloading docx template
704
+ * @param {DocxTemplatesApiDownloadDocxTemplateRequest} requestParameters Request parameters.
705
+ * @param {*} [options] Override http request option.
706
+ * @throws {RequiredError}
707
+ * @memberof DocxTemplatesApi
708
+ */
709
+ public downloadDocxTemplate(requestParameters: DocxTemplatesApiDownloadDocxTemplateRequest, options?: AxiosRequestConfig) {
710
+ return DocxTemplatesApiFp(this.configuration).downloadDocxTemplate(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
711
+ }
712
+
507
713
  /**
508
714
  * Get a docx template.
509
715
  * @summary Retrieve the docx template
@@ -12,6 +12,8 @@
12
12
  import { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
13
  import { Configuration } from '../configuration';
14
14
  import { RequestArgs, BaseAPI } from '../base';
15
+ import { DeleteResponseClass } from '../models';
16
+ import { GetDocxTemplateDownloadUrlResponseClass } from '../models';
15
17
  import { SharedUpdateDocxTemplateRequestDto } from '../models';
16
18
  import { UploadDocxTemplateRequestDto } from '../models';
17
19
  /**
@@ -19,6 +21,24 @@ import { UploadDocxTemplateRequestDto } from '../models';
19
21
  * @export
20
22
  */
21
23
  export declare const DocxTemplatesApiAxiosParamCreator: (configuration?: Configuration) => {
24
+ /**
25
+ * Permanently deletes the docx template. Supply the unique code that was returned when you created the docx template and this will delete it.
26
+ * @summary Delete the docx template
27
+ * @param {string} code
28
+ * @param {string} [authorization] Bearer Token
29
+ * @param {*} [options] Override http request option.
30
+ * @throws {RequiredError}
31
+ */
32
+ deleteDocxTemplate: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
33
+ /**
34
+ * Get a pre-signed download url for the given docx template.
35
+ * @summary Get pre-signed url for downloading docx template
36
+ * @param {string} code
37
+ * @param {string} [authorization] Bearer Token
38
+ * @param {*} [options] Override http request option.
39
+ * @throws {RequiredError}
40
+ */
41
+ downloadDocxTemplate: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
22
42
  /**
23
43
  * Get a docx template.
24
44
  * @summary Retrieve the docx template
@@ -67,6 +87,24 @@ export declare const DocxTemplatesApiAxiosParamCreator: (configuration?: Configu
67
87
  * @export
68
88
  */
69
89
  export declare const DocxTemplatesApiFp: (configuration?: Configuration) => {
90
+ /**
91
+ * Permanently deletes the docx template. Supply the unique code that was returned when you created the docx template and this will delete it.
92
+ * @summary Delete the docx template
93
+ * @param {string} code
94
+ * @param {string} [authorization] Bearer Token
95
+ * @param {*} [options] Override http request option.
96
+ * @throws {RequiredError}
97
+ */
98
+ deleteDocxTemplate(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DeleteResponseClass>>;
99
+ /**
100
+ * Get a pre-signed download url for the given docx template.
101
+ * @summary Get pre-signed url for downloading docx template
102
+ * @param {string} code
103
+ * @param {string} [authorization] Bearer Token
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ */
107
+ downloadDocxTemplate(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDocxTemplateDownloadUrlResponseClass>>;
70
108
  /**
71
109
  * Get a docx template.
72
110
  * @summary Retrieve the docx template
@@ -115,6 +153,24 @@ export declare const DocxTemplatesApiFp: (configuration?: Configuration) => {
115
153
  * @export
116
154
  */
117
155
  export declare const DocxTemplatesApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
156
+ /**
157
+ * Permanently deletes the docx template. Supply the unique code that was returned when you created the docx template and this will delete it.
158
+ * @summary Delete the docx template
159
+ * @param {string} code
160
+ * @param {string} [authorization] Bearer Token
161
+ * @param {*} [options] Override http request option.
162
+ * @throws {RequiredError}
163
+ */
164
+ deleteDocxTemplate(code: string, authorization?: string, options?: any): AxiosPromise<DeleteResponseClass>;
165
+ /**
166
+ * Get a pre-signed download url for the given docx template.
167
+ * @summary Get pre-signed url for downloading docx template
168
+ * @param {string} code
169
+ * @param {string} [authorization] Bearer Token
170
+ * @param {*} [options] Override http request option.
171
+ * @throws {RequiredError}
172
+ */
173
+ downloadDocxTemplate(code: string, authorization?: string, options?: any): AxiosPromise<GetDocxTemplateDownloadUrlResponseClass>;
118
174
  /**
119
175
  * Get a docx template.
120
176
  * @summary Retrieve the docx template
@@ -158,6 +214,44 @@ export declare const DocxTemplatesApiFactory: (configuration?: Configuration, ba
158
214
  */
159
215
  uploadDocxTemplate(uploadDocxTemplateRequestDto: UploadDocxTemplateRequestDto, authorization?: string, options?: any): AxiosPromise<object>;
160
216
  };
217
+ /**
218
+ * Request parameters for deleteDocxTemplate operation in DocxTemplatesApi.
219
+ * @export
220
+ * @interface DocxTemplatesApiDeleteDocxTemplateRequest
221
+ */
222
+ export interface DocxTemplatesApiDeleteDocxTemplateRequest {
223
+ /**
224
+ *
225
+ * @type {string}
226
+ * @memberof DocxTemplatesApiDeleteDocxTemplate
227
+ */
228
+ readonly code: string;
229
+ /**
230
+ * Bearer Token
231
+ * @type {string}
232
+ * @memberof DocxTemplatesApiDeleteDocxTemplate
233
+ */
234
+ readonly authorization?: string;
235
+ }
236
+ /**
237
+ * Request parameters for downloadDocxTemplate operation in DocxTemplatesApi.
238
+ * @export
239
+ * @interface DocxTemplatesApiDownloadDocxTemplateRequest
240
+ */
241
+ export interface DocxTemplatesApiDownloadDocxTemplateRequest {
242
+ /**
243
+ *
244
+ * @type {string}
245
+ * @memberof DocxTemplatesApiDownloadDocxTemplate
246
+ */
247
+ readonly code: string;
248
+ /**
249
+ * Bearer Token
250
+ * @type {string}
251
+ * @memberof DocxTemplatesApiDownloadDocxTemplate
252
+ */
253
+ readonly authorization?: string;
254
+ }
161
255
  /**
162
256
  * Request parameters for getDocxTemplate operation in DocxTemplatesApi.
163
257
  * @export
@@ -277,6 +371,24 @@ export interface DocxTemplatesApiUploadDocxTemplateRequest {
277
371
  * @extends {BaseAPI}
278
372
  */
279
373
  export declare class DocxTemplatesApi extends BaseAPI {
374
+ /**
375
+ * Permanently deletes the docx template. Supply the unique code that was returned when you created the docx template and this will delete it.
376
+ * @summary Delete the docx template
377
+ * @param {DocxTemplatesApiDeleteDocxTemplateRequest} requestParameters Request parameters.
378
+ * @param {*} [options] Override http request option.
379
+ * @throws {RequiredError}
380
+ * @memberof DocxTemplatesApi
381
+ */
382
+ deleteDocxTemplate(requestParameters: DocxTemplatesApiDeleteDocxTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<DeleteResponseClass, any>>;
383
+ /**
384
+ * Get a pre-signed download url for the given docx template.
385
+ * @summary Get pre-signed url for downloading docx template
386
+ * @param {DocxTemplatesApiDownloadDocxTemplateRequest} requestParameters Request parameters.
387
+ * @param {*} [options] Override http request option.
388
+ * @throws {RequiredError}
389
+ * @memberof DocxTemplatesApi
390
+ */
391
+ downloadDocxTemplate(requestParameters: DocxTemplatesApiDownloadDocxTemplateRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetDocxTemplateDownloadUrlResponseClass, any>>;
280
392
  /**
281
393
  * Get a docx template.
282
394
  * @summary Retrieve the docx template
@@ -92,6 +92,102 @@ var base_1 = require("../base");
92
92
  var DocxTemplatesApiAxiosParamCreator = function (configuration) {
93
93
  var _this = this;
94
94
  return {
95
+ /**
96
+ * Permanently deletes the docx template. Supply the unique code that was returned when you created the docx template and this will delete it.
97
+ * @summary Delete the docx template
98
+ * @param {string} code
99
+ * @param {string} [authorization] Bearer Token
100
+ * @param {*} [options] Override http request option.
101
+ * @throws {RequiredError}
102
+ */
103
+ deleteDocxTemplate: function (code, authorization, options) {
104
+ if (options === void 0) { options = {}; }
105
+ return __awaiter(_this, void 0, void 0, function () {
106
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
107
+ return __generator(this, function (_a) {
108
+ switch (_a.label) {
109
+ case 0:
110
+ // verify required parameter 'code' is not null or undefined
111
+ (0, common_1.assertParamExists)('deleteDocxTemplate', 'code', code);
112
+ localVarPath = "/documentservice/v1/docx-templates/{code}"
113
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
114
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
115
+ if (configuration) {
116
+ baseOptions = configuration.baseOptions;
117
+ baseAccessToken = configuration.accessToken;
118
+ }
119
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
120
+ localVarHeaderParameter = {};
121
+ localVarQueryParameter = {};
122
+ // authentication bearer required
123
+ // http bearer authentication required
124
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
125
+ case 1:
126
+ // authentication bearer required
127
+ // http bearer authentication required
128
+ _a.sent();
129
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
130
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
131
+ }
132
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
133
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
134
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
135
+ return [2 /*return*/, {
136
+ url: (0, common_1.toPathString)(localVarUrlObj),
137
+ options: localVarRequestOptions,
138
+ }];
139
+ }
140
+ });
141
+ });
142
+ },
143
+ /**
144
+ * Get a pre-signed download url for the given docx template.
145
+ * @summary Get pre-signed url for downloading docx template
146
+ * @param {string} code
147
+ * @param {string} [authorization] Bearer Token
148
+ * @param {*} [options] Override http request option.
149
+ * @throws {RequiredError}
150
+ */
151
+ downloadDocxTemplate: function (code, authorization, options) {
152
+ if (options === void 0) { options = {}; }
153
+ return __awaiter(_this, void 0, void 0, function () {
154
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
155
+ return __generator(this, function (_a) {
156
+ switch (_a.label) {
157
+ case 0:
158
+ // verify required parameter 'code' is not null or undefined
159
+ (0, common_1.assertParamExists)('downloadDocxTemplate', 'code', code);
160
+ localVarPath = "/documentservice/v1/docx-templates/{code}/download-url"
161
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
162
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
163
+ if (configuration) {
164
+ baseOptions = configuration.baseOptions;
165
+ baseAccessToken = configuration.accessToken;
166
+ }
167
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
168
+ localVarHeaderParameter = {};
169
+ localVarQueryParameter = {};
170
+ // authentication bearer required
171
+ // http bearer authentication required
172
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
173
+ case 1:
174
+ // authentication bearer required
175
+ // http bearer authentication required
176
+ _a.sent();
177
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
178
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
179
+ }
180
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
181
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
182
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
183
+ return [2 /*return*/, {
184
+ url: (0, common_1.toPathString)(localVarUrlObj),
185
+ options: localVarRequestOptions,
186
+ }];
187
+ }
188
+ });
189
+ });
190
+ },
95
191
  /**
96
192
  * Get a docx template.
97
193
  * @summary Retrieve the docx template
@@ -320,6 +416,48 @@ exports.DocxTemplatesApiAxiosParamCreator = DocxTemplatesApiAxiosParamCreator;
320
416
  var DocxTemplatesApiFp = function (configuration) {
321
417
  var localVarAxiosParamCreator = (0, exports.DocxTemplatesApiAxiosParamCreator)(configuration);
322
418
  return {
419
+ /**
420
+ * Permanently deletes the docx template. Supply the unique code that was returned when you created the docx template and this will delete it.
421
+ * @summary Delete the docx template
422
+ * @param {string} code
423
+ * @param {string} [authorization] Bearer Token
424
+ * @param {*} [options] Override http request option.
425
+ * @throws {RequiredError}
426
+ */
427
+ deleteDocxTemplate: function (code, authorization, options) {
428
+ return __awaiter(this, void 0, void 0, function () {
429
+ var localVarAxiosArgs;
430
+ return __generator(this, function (_a) {
431
+ switch (_a.label) {
432
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteDocxTemplate(code, authorization, options)];
433
+ case 1:
434
+ localVarAxiosArgs = _a.sent();
435
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
436
+ }
437
+ });
438
+ });
439
+ },
440
+ /**
441
+ * Get a pre-signed download url for the given docx template.
442
+ * @summary Get pre-signed url for downloading docx template
443
+ * @param {string} code
444
+ * @param {string} [authorization] Bearer Token
445
+ * @param {*} [options] Override http request option.
446
+ * @throws {RequiredError}
447
+ */
448
+ downloadDocxTemplate: function (code, authorization, options) {
449
+ return __awaiter(this, void 0, void 0, function () {
450
+ var localVarAxiosArgs;
451
+ return __generator(this, function (_a) {
452
+ switch (_a.label) {
453
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadDocxTemplate(code, authorization, options)];
454
+ case 1:
455
+ localVarAxiosArgs = _a.sent();
456
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
457
+ }
458
+ });
459
+ });
460
+ },
323
461
  /**
324
462
  * Get a docx template.
325
463
  * @summary Retrieve the docx template
@@ -420,6 +558,28 @@ exports.DocxTemplatesApiFp = DocxTemplatesApiFp;
420
558
  var DocxTemplatesApiFactory = function (configuration, basePath, axios) {
421
559
  var localVarFp = (0, exports.DocxTemplatesApiFp)(configuration);
422
560
  return {
561
+ /**
562
+ * Permanently deletes the docx template. Supply the unique code that was returned when you created the docx template and this will delete it.
563
+ * @summary Delete the docx template
564
+ * @param {string} code
565
+ * @param {string} [authorization] Bearer Token
566
+ * @param {*} [options] Override http request option.
567
+ * @throws {RequiredError}
568
+ */
569
+ deleteDocxTemplate: function (code, authorization, options) {
570
+ return localVarFp.deleteDocxTemplate(code, authorization, options).then(function (request) { return request(axios, basePath); });
571
+ },
572
+ /**
573
+ * Get a pre-signed download url for the given docx template.
574
+ * @summary Get pre-signed url for downloading docx template
575
+ * @param {string} code
576
+ * @param {string} [authorization] Bearer Token
577
+ * @param {*} [options] Override http request option.
578
+ * @throws {RequiredError}
579
+ */
580
+ downloadDocxTemplate: function (code, authorization, options) {
581
+ return localVarFp.downloadDocxTemplate(code, authorization, options).then(function (request) { return request(axios, basePath); });
582
+ },
423
583
  /**
424
584
  * Get a docx template.
425
585
  * @summary Retrieve the docx template
@@ -484,6 +644,30 @@ var DocxTemplatesApi = /** @class */ (function (_super) {
484
644
  function DocxTemplatesApi() {
485
645
  return _super !== null && _super.apply(this, arguments) || this;
486
646
  }
647
+ /**
648
+ * Permanently deletes the docx template. Supply the unique code that was returned when you created the docx template and this will delete it.
649
+ * @summary Delete the docx template
650
+ * @param {DocxTemplatesApiDeleteDocxTemplateRequest} requestParameters Request parameters.
651
+ * @param {*} [options] Override http request option.
652
+ * @throws {RequiredError}
653
+ * @memberof DocxTemplatesApi
654
+ */
655
+ DocxTemplatesApi.prototype.deleteDocxTemplate = function (requestParameters, options) {
656
+ var _this = this;
657
+ return (0, exports.DocxTemplatesApiFp)(this.configuration).deleteDocxTemplate(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
658
+ };
659
+ /**
660
+ * Get a pre-signed download url for the given docx template.
661
+ * @summary Get pre-signed url for downloading docx template
662
+ * @param {DocxTemplatesApiDownloadDocxTemplateRequest} requestParameters Request parameters.
663
+ * @param {*} [options] Override http request option.
664
+ * @throws {RequiredError}
665
+ * @memberof DocxTemplatesApi
666
+ */
667
+ DocxTemplatesApi.prototype.downloadDocxTemplate = function (requestParameters, options) {
668
+ var _this = this;
669
+ return (0, exports.DocxTemplatesApiFp)(this.configuration).downloadDocxTemplate(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
670
+ };
487
671
  /**
488
672
  * Get a docx template.
489
673
  * @summary Retrieve the docx template
@@ -0,0 +1,24 @@
1
+ /**
2
+ * EMIL DocumentService
3
+ * The EMIL DocumentService API description
4
+ *
5
+ * The version of the OpenAPI document: 1.0
6
+ * Contact: kontakt@emil.de
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface GetDocxTemplateDownloadUrlResponseClass
16
+ */
17
+ export interface GetDocxTemplateDownloadUrlResponseClass {
18
+ /**
19
+ * Pre-signed url for downloading the docx template.
20
+ * @type {string}
21
+ * @memberof GetDocxTemplateDownloadUrlResponseClass
22
+ */
23
+ 'url': string;
24
+ }
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL DocumentService
6
+ * The EMIL DocumentService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
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 });
@@ -17,6 +17,7 @@ export * from './download-document-request-dto';
17
17
  export * from './get-doc-template-request-dto';
18
18
  export * from './get-doc-template-response-class';
19
19
  export * from './get-document-download-url-response-class';
20
+ export * from './get-docx-template-download-url-response-class';
20
21
  export * from './get-layout-request-dto';
21
22
  export * from './get-layout-response-class';
22
23
  export * from './get-product-document-download-url-response-class';
@@ -33,6 +33,7 @@ __exportStar(require("./download-document-request-dto"), exports);
33
33
  __exportStar(require("./get-doc-template-request-dto"), exports);
34
34
  __exportStar(require("./get-doc-template-response-class"), exports);
35
35
  __exportStar(require("./get-document-download-url-response-class"), exports);
36
+ __exportStar(require("./get-docx-template-download-url-response-class"), exports);
36
37
  __exportStar(require("./get-layout-request-dto"), exports);
37
38
  __exportStar(require("./get-layout-response-class"), exports);
38
39
  __exportStar(require("./get-product-document-download-url-response-class"), exports);
@@ -0,0 +1,30 @@
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
+
17
+ /**
18
+ *
19
+ * @export
20
+ * @interface GetDocxTemplateDownloadUrlResponseClass
21
+ */
22
+ export interface GetDocxTemplateDownloadUrlResponseClass {
23
+ /**
24
+ * Pre-signed url for downloading the docx template.
25
+ * @type {string}
26
+ * @memberof GetDocxTemplateDownloadUrlResponseClass
27
+ */
28
+ 'url': string;
29
+ }
30
+
package/models/index.ts CHANGED
@@ -17,6 +17,7 @@ export * from './download-document-request-dto';
17
17
  export * from './get-doc-template-request-dto';
18
18
  export * from './get-doc-template-response-class';
19
19
  export * from './get-document-download-url-response-class';
20
+ export * from './get-docx-template-download-url-response-class';
20
21
  export * from './get-layout-request-dto';
21
22
  export * from './get-layout-response-class';
22
23
  export * from './get-product-document-download-url-response-class';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/document-sdk",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "OpenAPI client for @emilgroup/document-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [