@emilgroup/document-sdk 1.37.0 → 1.37.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@1.37.0 --save
|
|
20
|
+
npm install @emilgroup/document-sdk@1.37.1-beta.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/document-sdk@1.37.0
|
|
24
|
+
yarn add @emilgroup/document-sdk@1.37.1-beta.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `DocumentsApi`.
|
|
@@ -92,10 +92,11 @@ export const DocxTemplatesApiAxiosParamCreator = function (configuration?: Confi
|
|
|
92
92
|
* @summary Get pre-signed url for downloading docx template
|
|
93
93
|
* @param {string} code
|
|
94
94
|
* @param {string} [authorization] Bearer Token
|
|
95
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
95
96
|
* @param {*} [options] Override http request option.
|
|
96
97
|
* @throws {RequiredError}
|
|
97
98
|
*/
|
|
98
|
-
downloadDocxTemplate: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
99
|
+
downloadDocxTemplate: async (code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
99
100
|
// verify required parameter 'code' is not null or undefined
|
|
100
101
|
assertParamExists('downloadDocxTemplate', 'code', code)
|
|
101
102
|
const localVarPath = `/documentservice/v1/docx-templates/{code}/download-url`
|
|
@@ -117,6 +118,10 @@ export const DocxTemplatesApiAxiosParamCreator = function (configuration?: Confi
|
|
|
117
118
|
// http bearer authentication required
|
|
118
119
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
119
120
|
|
|
121
|
+
if (contentDisposition !== undefined) {
|
|
122
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
123
|
+
}
|
|
124
|
+
|
|
120
125
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
121
126
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
122
127
|
}
|
|
@@ -378,11 +383,12 @@ export const DocxTemplatesApiFp = function(configuration?: Configuration) {
|
|
|
378
383
|
* @summary Get pre-signed url for downloading docx template
|
|
379
384
|
* @param {string} code
|
|
380
385
|
* @param {string} [authorization] Bearer Token
|
|
386
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
381
387
|
* @param {*} [options] Override http request option.
|
|
382
388
|
* @throws {RequiredError}
|
|
383
389
|
*/
|
|
384
|
-
async downloadDocxTemplate(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDocxTemplateDownloadUrlResponseClass>> {
|
|
385
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadDocxTemplate(code, authorization, options);
|
|
390
|
+
async downloadDocxTemplate(code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetDocxTemplateDownloadUrlResponseClass>> {
|
|
391
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadDocxTemplate(code, authorization, contentDisposition, options);
|
|
386
392
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
387
393
|
},
|
|
388
394
|
/**
|
|
@@ -466,11 +472,12 @@ export const DocxTemplatesApiFactory = function (configuration?: Configuration,
|
|
|
466
472
|
* @summary Get pre-signed url for downloading docx template
|
|
467
473
|
* @param {string} code
|
|
468
474
|
* @param {string} [authorization] Bearer Token
|
|
475
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
469
476
|
* @param {*} [options] Override http request option.
|
|
470
477
|
* @throws {RequiredError}
|
|
471
478
|
*/
|
|
472
|
-
downloadDocxTemplate(code: string, authorization?: string, options?: any): AxiosPromise<GetDocxTemplateDownloadUrlResponseClass> {
|
|
473
|
-
return localVarFp.downloadDocxTemplate(code, authorization, options).then((request) => request(axios, basePath));
|
|
479
|
+
downloadDocxTemplate(code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: any): AxiosPromise<GetDocxTemplateDownloadUrlResponseClass> {
|
|
480
|
+
return localVarFp.downloadDocxTemplate(code, authorization, contentDisposition, options).then((request) => request(axios, basePath));
|
|
474
481
|
},
|
|
475
482
|
/**
|
|
476
483
|
* Get a docx template.
|
|
@@ -566,6 +573,13 @@ export interface DocxTemplatesApiDownloadDocxTemplateRequest {
|
|
|
566
573
|
* @memberof DocxTemplatesApiDownloadDocxTemplate
|
|
567
574
|
*/
|
|
568
575
|
readonly authorization?: string
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* Content disposition override. Default will be depending on the document type.
|
|
579
|
+
* @type {'attachment' | 'inline'}
|
|
580
|
+
* @memberof DocxTemplatesApiDownloadDocxTemplate
|
|
581
|
+
*/
|
|
582
|
+
readonly contentDisposition?: 'attachment' | 'inline'
|
|
569
583
|
}
|
|
570
584
|
|
|
571
585
|
/**
|
|
@@ -729,7 +743,7 @@ export class DocxTemplatesApi extends BaseAPI {
|
|
|
729
743
|
* @memberof DocxTemplatesApi
|
|
730
744
|
*/
|
|
731
745
|
public downloadDocxTemplate(requestParameters: DocxTemplatesApiDownloadDocxTemplateRequest, options?: AxiosRequestConfig) {
|
|
732
|
-
return DocxTemplatesApiFp(this.configuration).downloadDocxTemplate(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
746
|
+
return DocxTemplatesApiFp(this.configuration).downloadDocxTemplate(requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, options).then((request) => request(this.axios, this.basePath));
|
|
733
747
|
}
|
|
734
748
|
|
|
735
749
|
/**
|
|
@@ -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.
|
|
@@ -145,10 +145,11 @@ var DocxTemplatesApiAxiosParamCreator = function (configuration) {
|
|
|
145
145
|
* @summary Get pre-signed url for downloading docx template
|
|
146
146
|
* @param {string} code
|
|
147
147
|
* @param {string} [authorization] Bearer Token
|
|
148
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
148
149
|
* @param {*} [options] Override http request option.
|
|
149
150
|
* @throws {RequiredError}
|
|
150
151
|
*/
|
|
151
|
-
downloadDocxTemplate: function (code, authorization, options) {
|
|
152
|
+
downloadDocxTemplate: function (code, authorization, contentDisposition, options) {
|
|
152
153
|
if (options === void 0) { options = {}; }
|
|
153
154
|
return __awaiter(_this, void 0, void 0, function () {
|
|
154
155
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
@@ -174,6 +175,9 @@ var DocxTemplatesApiAxiosParamCreator = function (configuration) {
|
|
|
174
175
|
// authentication bearer required
|
|
175
176
|
// http bearer authentication required
|
|
176
177
|
_a.sent();
|
|
178
|
+
if (contentDisposition !== undefined) {
|
|
179
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
180
|
+
}
|
|
177
181
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
178
182
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
179
183
|
}
|
|
@@ -446,15 +450,16 @@ var DocxTemplatesApiFp = function (configuration) {
|
|
|
446
450
|
* @summary Get pre-signed url for downloading docx template
|
|
447
451
|
* @param {string} code
|
|
448
452
|
* @param {string} [authorization] Bearer Token
|
|
453
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
449
454
|
* @param {*} [options] Override http request option.
|
|
450
455
|
* @throws {RequiredError}
|
|
451
456
|
*/
|
|
452
|
-
downloadDocxTemplate: function (code, authorization, options) {
|
|
457
|
+
downloadDocxTemplate: function (code, authorization, contentDisposition, options) {
|
|
453
458
|
return __awaiter(this, void 0, void 0, function () {
|
|
454
459
|
var localVarAxiosArgs;
|
|
455
460
|
return __generator(this, function (_a) {
|
|
456
461
|
switch (_a.label) {
|
|
457
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadDocxTemplate(code, authorization, options)];
|
|
462
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadDocxTemplate(code, authorization, contentDisposition, options)];
|
|
458
463
|
case 1:
|
|
459
464
|
localVarAxiosArgs = _a.sent();
|
|
460
465
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -579,11 +584,12 @@ var DocxTemplatesApiFactory = function (configuration, basePath, axios) {
|
|
|
579
584
|
* @summary Get pre-signed url for downloading docx template
|
|
580
585
|
* @param {string} code
|
|
581
586
|
* @param {string} [authorization] Bearer Token
|
|
587
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
582
588
|
* @param {*} [options] Override http request option.
|
|
583
589
|
* @throws {RequiredError}
|
|
584
590
|
*/
|
|
585
|
-
downloadDocxTemplate: function (code, authorization, options) {
|
|
586
|
-
return localVarFp.downloadDocxTemplate(code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
591
|
+
downloadDocxTemplate: function (code, authorization, contentDisposition, options) {
|
|
592
|
+
return localVarFp.downloadDocxTemplate(code, authorization, contentDisposition, options).then(function (request) { return request(axios, basePath); });
|
|
587
593
|
},
|
|
588
594
|
/**
|
|
589
595
|
* Get a docx template.
|
|
@@ -672,7 +678,7 @@ var DocxTemplatesApi = /** @class */ (function (_super) {
|
|
|
672
678
|
*/
|
|
673
679
|
DocxTemplatesApi.prototype.downloadDocxTemplate = function (requestParameters, options) {
|
|
674
680
|
var _this = this;
|
|
675
|
-
return (0, exports.DocxTemplatesApiFp)(this.configuration).downloadDocxTemplate(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
681
|
+
return (0, exports.DocxTemplatesApiFp)(this.configuration).downloadDocxTemplate(requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
676
682
|
};
|
|
677
683
|
/**
|
|
678
684
|
* Get a docx template.
|