@emilgroup/document-sdk-node 1.36.0 → 1.36.1-beta.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.
- package/README.md +2 -2
- package/api/docx-templates-api.ts +20 -6
- package/dist/api/docx-templates-api.d.ts +12 -3
- package/dist/api/docx-templates-api.js +12 -6
- package/package.json +1 -1
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-node@1.36.0 --save
|
|
20
|
+
npm install @emilgroup/document-sdk-node@1.36.1-beta.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/document-sdk-node@1.36.0
|
|
24
|
+
yarn add @emilgroup/document-sdk-node@1.36.1-beta.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `DocumentsApi`.
|
|
@@ -96,10 +96,11 @@ export const DocxTemplatesApiAxiosParamCreator = function (configuration?: Confi
|
|
|
96
96
|
* @summary Get pre-signed url for downloading docx template
|
|
97
97
|
* @param {string} code
|
|
98
98
|
* @param {string} [authorization] Bearer Token
|
|
99
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
99
100
|
* @param {*} [options] Override http request option.
|
|
100
101
|
* @throws {RequiredError}
|
|
101
102
|
*/
|
|
102
|
-
downloadDocxTemplate: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
103
|
+
downloadDocxTemplate: async (code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
103
104
|
// verify required parameter 'code' is not null or undefined
|
|
104
105
|
assertParamExists('downloadDocxTemplate', 'code', code)
|
|
105
106
|
const localVarPath = `/documentservice/v1/docx-templates/{code}/download-url`
|
|
@@ -121,6 +122,10 @@ export const DocxTemplatesApiAxiosParamCreator = function (configuration?: Confi
|
|
|
121
122
|
// http bearer authentication required
|
|
122
123
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
123
124
|
|
|
125
|
+
if (contentDisposition !== undefined) {
|
|
126
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
127
|
+
}
|
|
128
|
+
|
|
124
129
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
125
130
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
126
131
|
}
|
|
@@ -382,11 +387,12 @@ export const DocxTemplatesApiFp = function(configuration?: Configuration) {
|
|
|
382
387
|
* @summary Get pre-signed url for downloading docx template
|
|
383
388
|
* @param {string} code
|
|
384
389
|
* @param {string} [authorization] Bearer Token
|
|
390
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
385
391
|
* @param {*} [options] Override http request option.
|
|
386
392
|
* @throws {RequiredError}
|
|
387
393
|
*/
|
|
388
|
-
async downloadDocxTemplate(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDocxTemplateDownloadUrlResponseClass>> {
|
|
389
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadDocxTemplate(code, authorization, options);
|
|
394
|
+
async downloadDocxTemplate(code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDocxTemplateDownloadUrlResponseClass>> {
|
|
395
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadDocxTemplate(code, authorization, contentDisposition, options);
|
|
390
396
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
391
397
|
},
|
|
392
398
|
/**
|
|
@@ -470,11 +476,12 @@ export const DocxTemplatesApiFactory = function (configuration?: Configuration,
|
|
|
470
476
|
* @summary Get pre-signed url for downloading docx template
|
|
471
477
|
* @param {string} code
|
|
472
478
|
* @param {string} [authorization] Bearer Token
|
|
479
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
473
480
|
* @param {*} [options] Override http request option.
|
|
474
481
|
* @throws {RequiredError}
|
|
475
482
|
*/
|
|
476
|
-
downloadDocxTemplate(code: string, authorization?: string, options?: any): AxiosPromise<GetDocxTemplateDownloadUrlResponseClass> {
|
|
477
|
-
return localVarFp.downloadDocxTemplate(code, authorization, options).then((request) => request(axios, basePath));
|
|
483
|
+
downloadDocxTemplate(code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: any): AxiosPromise<GetDocxTemplateDownloadUrlResponseClass> {
|
|
484
|
+
return localVarFp.downloadDocxTemplate(code, authorization, contentDisposition, options).then((request) => request(axios, basePath));
|
|
478
485
|
},
|
|
479
486
|
/**
|
|
480
487
|
* Get a docx template.
|
|
@@ -570,6 +577,13 @@ export interface DocxTemplatesApiDownloadDocxTemplateRequest {
|
|
|
570
577
|
* @memberof DocxTemplatesApiDownloadDocxTemplate
|
|
571
578
|
*/
|
|
572
579
|
readonly authorization?: string
|
|
580
|
+
|
|
581
|
+
/**
|
|
582
|
+
* Content disposition override. Default will be depending on the document type.
|
|
583
|
+
* @type {'attachment' | 'inline'}
|
|
584
|
+
* @memberof DocxTemplatesApiDownloadDocxTemplate
|
|
585
|
+
*/
|
|
586
|
+
readonly contentDisposition?: 'attachment' | 'inline'
|
|
573
587
|
}
|
|
574
588
|
|
|
575
589
|
/**
|
|
@@ -733,7 +747,7 @@ export class DocxTemplatesApi extends BaseAPI {
|
|
|
733
747
|
* @memberof DocxTemplatesApi
|
|
734
748
|
*/
|
|
735
749
|
public downloadDocxTemplate(requestParameters: DocxTemplatesApiDownloadDocxTemplateRequest, options?: AxiosRequestConfig) {
|
|
736
|
-
return DocxTemplatesApiFp(this.configuration).downloadDocxTemplate(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
750
|
+
return DocxTemplatesApiFp(this.configuration).downloadDocxTemplate(requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, options).then((request) => request(this.axios, this.basePath));
|
|
737
751
|
}
|
|
738
752
|
|
|
739
753
|
/**
|
|
@@ -39,10 +39,11 @@ export declare const DocxTemplatesApiAxiosParamCreator: (configuration?: Configu
|
|
|
39
39
|
* @summary Get pre-signed url for downloading docx template
|
|
40
40
|
* @param {string} code
|
|
41
41
|
* @param {string} [authorization] Bearer Token
|
|
42
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
42
43
|
* @param {*} [options] Override http request option.
|
|
43
44
|
* @throws {RequiredError}
|
|
44
45
|
*/
|
|
45
|
-
downloadDocxTemplate: (code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
46
|
+
downloadDocxTemplate: (code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
46
47
|
/**
|
|
47
48
|
* Get a docx template.
|
|
48
49
|
* @summary Retrieve the docx template
|
|
@@ -106,10 +107,11 @@ export declare const DocxTemplatesApiFp: (configuration?: Configuration) => {
|
|
|
106
107
|
* @summary Get pre-signed url for downloading docx template
|
|
107
108
|
* @param {string} code
|
|
108
109
|
* @param {string} [authorization] Bearer Token
|
|
110
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
109
111
|
* @param {*} [options] Override http request option.
|
|
110
112
|
* @throws {RequiredError}
|
|
111
113
|
*/
|
|
112
|
-
downloadDocxTemplate(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDocxTemplateDownloadUrlResponseClass>>;
|
|
114
|
+
downloadDocxTemplate(code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDocxTemplateDownloadUrlResponseClass>>;
|
|
113
115
|
/**
|
|
114
116
|
* Get a docx template.
|
|
115
117
|
* @summary Retrieve the docx template
|
|
@@ -173,10 +175,11 @@ export declare const DocxTemplatesApiFactory: (configuration?: Configuration, ba
|
|
|
173
175
|
* @summary Get pre-signed url for downloading docx template
|
|
174
176
|
* @param {string} code
|
|
175
177
|
* @param {string} [authorization] Bearer Token
|
|
178
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
176
179
|
* @param {*} [options] Override http request option.
|
|
177
180
|
* @throws {RequiredError}
|
|
178
181
|
*/
|
|
179
|
-
downloadDocxTemplate(code: string, authorization?: string, options?: any): AxiosPromise<GetDocxTemplateDownloadUrlResponseClass>;
|
|
182
|
+
downloadDocxTemplate(code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: any): AxiosPromise<GetDocxTemplateDownloadUrlResponseClass>;
|
|
180
183
|
/**
|
|
181
184
|
* Get a docx template.
|
|
182
185
|
* @summary Retrieve the docx template
|
|
@@ -258,6 +261,12 @@ export interface DocxTemplatesApiDownloadDocxTemplateRequest {
|
|
|
258
261
|
* @memberof DocxTemplatesApiDownloadDocxTemplate
|
|
259
262
|
*/
|
|
260
263
|
readonly authorization?: string;
|
|
264
|
+
/**
|
|
265
|
+
* Content disposition override. Default will be depending on the document type.
|
|
266
|
+
* @type {'attachment' | 'inline'}
|
|
267
|
+
* @memberof DocxTemplatesApiDownloadDocxTemplate
|
|
268
|
+
*/
|
|
269
|
+
readonly contentDisposition?: 'attachment' | 'inline';
|
|
261
270
|
}
|
|
262
271
|
/**
|
|
263
272
|
* Request parameters for getDocxTemplate operation in DocxTemplatesApi.
|
|
@@ -149,10 +149,11 @@ var DocxTemplatesApiAxiosParamCreator = function (configuration) {
|
|
|
149
149
|
* @summary Get pre-signed url for downloading docx template
|
|
150
150
|
* @param {string} code
|
|
151
151
|
* @param {string} [authorization] Bearer Token
|
|
152
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
152
153
|
* @param {*} [options] Override http request option.
|
|
153
154
|
* @throws {RequiredError}
|
|
154
155
|
*/
|
|
155
|
-
downloadDocxTemplate: function (code, authorization, options) {
|
|
156
|
+
downloadDocxTemplate: function (code, authorization, contentDisposition, options) {
|
|
156
157
|
if (options === void 0) { options = {}; }
|
|
157
158
|
return __awaiter(_this, void 0, void 0, function () {
|
|
158
159
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
@@ -178,6 +179,9 @@ var DocxTemplatesApiAxiosParamCreator = function (configuration) {
|
|
|
178
179
|
// authentication bearer required
|
|
179
180
|
// http bearer authentication required
|
|
180
181
|
_a.sent();
|
|
182
|
+
if (contentDisposition !== undefined) {
|
|
183
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
184
|
+
}
|
|
181
185
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
182
186
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
183
187
|
}
|
|
@@ -450,15 +454,16 @@ var DocxTemplatesApiFp = function (configuration) {
|
|
|
450
454
|
* @summary Get pre-signed url for downloading docx template
|
|
451
455
|
* @param {string} code
|
|
452
456
|
* @param {string} [authorization] Bearer Token
|
|
457
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
453
458
|
* @param {*} [options] Override http request option.
|
|
454
459
|
* @throws {RequiredError}
|
|
455
460
|
*/
|
|
456
|
-
downloadDocxTemplate: function (code, authorization, options) {
|
|
461
|
+
downloadDocxTemplate: function (code, authorization, contentDisposition, options) {
|
|
457
462
|
return __awaiter(this, void 0, void 0, function () {
|
|
458
463
|
var localVarAxiosArgs;
|
|
459
464
|
return __generator(this, function (_a) {
|
|
460
465
|
switch (_a.label) {
|
|
461
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadDocxTemplate(code, authorization, options)];
|
|
466
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadDocxTemplate(code, authorization, contentDisposition, options)];
|
|
462
467
|
case 1:
|
|
463
468
|
localVarAxiosArgs = _a.sent();
|
|
464
469
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -583,11 +588,12 @@ var DocxTemplatesApiFactory = function (configuration, basePath, axios) {
|
|
|
583
588
|
* @summary Get pre-signed url for downloading docx template
|
|
584
589
|
* @param {string} code
|
|
585
590
|
* @param {string} [authorization] Bearer Token
|
|
591
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
586
592
|
* @param {*} [options] Override http request option.
|
|
587
593
|
* @throws {RequiredError}
|
|
588
594
|
*/
|
|
589
|
-
downloadDocxTemplate: function (code, authorization, options) {
|
|
590
|
-
return localVarFp.downloadDocxTemplate(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
595
|
+
downloadDocxTemplate: function (code, authorization, contentDisposition, options) {
|
|
596
|
+
return localVarFp.downloadDocxTemplate(code, authorization, contentDisposition, options).then(function (request) { return request(axios, basePath); });
|
|
591
597
|
},
|
|
592
598
|
/**
|
|
593
599
|
* Get a docx template.
|
|
@@ -676,7 +682,7 @@ var DocxTemplatesApi = /** @class */ (function (_super) {
|
|
|
676
682
|
*/
|
|
677
683
|
DocxTemplatesApi.prototype.downloadDocxTemplate = function (requestParameters, options) {
|
|
678
684
|
var _this = this;
|
|
679
|
-
return (0, exports.DocxTemplatesApiFp)(this.configuration).downloadDocxTemplate(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
685
|
+
return (0, exports.DocxTemplatesApiFp)(this.configuration).downloadDocxTemplate(requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
680
686
|
};
|
|
681
687
|
/**
|
|
682
688
|
* Get a docx template.
|