@emilgroup/public-api-sdk 1.26.0 → 1.27.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/documents-api.ts +20 -6
- package/base.ts +5 -1
- package/dist/api/documents-api.d.ts +12 -3
- package/dist/api/documents-api.js +12 -6
- package/dist/base.d.ts +1 -0
- package/dist/base.js +4 -1
- 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/public-api-sdk@1.
|
|
20
|
+
npm install @emilgroup/public-api-sdk@1.27.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/public-api-sdk@1.
|
|
24
|
+
yarn add @emilgroup/public-api-sdk@1.27.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `PublicApi`.
|
package/api/documents-api.ts
CHANGED
|
@@ -185,10 +185,11 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
185
185
|
* @param {string} productCode
|
|
186
186
|
* @param {string} code
|
|
187
187
|
* @param {string} [authorization] Bearer Token
|
|
188
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
188
189
|
* @param {*} [options] Override http request option.
|
|
189
190
|
* @throws {RequiredError}
|
|
190
191
|
*/
|
|
191
|
-
downloadProductDocumentUrl: async (productCode: string, code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
192
|
+
downloadProductDocumentUrl: async (productCode: string, code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
192
193
|
// verify required parameter 'productCode' is not null or undefined
|
|
193
194
|
assertParamExists('downloadProductDocumentUrl', 'productCode', productCode)
|
|
194
195
|
// verify required parameter 'code' is not null or undefined
|
|
@@ -213,6 +214,10 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
213
214
|
// http bearer authentication required
|
|
214
215
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
215
216
|
|
|
217
|
+
if (contentDisposition !== undefined) {
|
|
218
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
219
|
+
}
|
|
220
|
+
|
|
216
221
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
217
222
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
218
223
|
}
|
|
@@ -476,11 +481,12 @@ export const DocumentsApiFp = function(configuration?: Configuration) {
|
|
|
476
481
|
* @param {string} productCode
|
|
477
482
|
* @param {string} code
|
|
478
483
|
* @param {string} [authorization] Bearer Token
|
|
484
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
479
485
|
* @param {*} [options] Override http request option.
|
|
480
486
|
* @throws {RequiredError}
|
|
481
487
|
*/
|
|
482
|
-
async downloadProductDocumentUrl(productCode: string, code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductDocumentDownloadUrlResponseClass>> {
|
|
483
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadProductDocumentUrl(productCode, code, authorization, options);
|
|
488
|
+
async downloadProductDocumentUrl(productCode: string, code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductDocumentDownloadUrlResponseClass>> {
|
|
489
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadProductDocumentUrl(productCode, code, authorization, contentDisposition, options);
|
|
484
490
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
485
491
|
},
|
|
486
492
|
/**
|
|
@@ -580,11 +586,12 @@ export const DocumentsApiFactory = function (configuration?: Configuration, base
|
|
|
580
586
|
* @param {string} productCode
|
|
581
587
|
* @param {string} code
|
|
582
588
|
* @param {string} [authorization] Bearer Token
|
|
589
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
583
590
|
* @param {*} [options] Override http request option.
|
|
584
591
|
* @throws {RequiredError}
|
|
585
592
|
*/
|
|
586
|
-
downloadProductDocumentUrl(productCode: string, code: string, authorization?: string, options?: any): AxiosPromise<GetProductDocumentDownloadUrlResponseClass> {
|
|
587
|
-
return localVarFp.downloadProductDocumentUrl(productCode, code, authorization, options).then((request) => request(axios, basePath));
|
|
593
|
+
downloadProductDocumentUrl(productCode: string, code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: any): AxiosPromise<GetProductDocumentDownloadUrlResponseClass> {
|
|
594
|
+
return localVarFp.downloadProductDocumentUrl(productCode, code, authorization, contentDisposition, options).then((request) => request(axios, basePath));
|
|
588
595
|
},
|
|
589
596
|
/**
|
|
590
597
|
* Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
@@ -729,6 +736,13 @@ export interface DocumentsApiDownloadProductDocumentUrlRequest {
|
|
|
729
736
|
* @memberof DocumentsApiDownloadProductDocumentUrl
|
|
730
737
|
*/
|
|
731
738
|
readonly authorization?: string
|
|
739
|
+
|
|
740
|
+
/**
|
|
741
|
+
* Content disposition override. Default will be depending on the document type.
|
|
742
|
+
* @type {'attachment' | 'inline'}
|
|
743
|
+
* @memberof DocumentsApiDownloadProductDocumentUrl
|
|
744
|
+
*/
|
|
745
|
+
readonly contentDisposition?: 'attachment' | 'inline'
|
|
732
746
|
}
|
|
733
747
|
|
|
734
748
|
/**
|
|
@@ -923,7 +937,7 @@ export class DocumentsApi extends BaseAPI {
|
|
|
923
937
|
* @memberof DocumentsApi
|
|
924
938
|
*/
|
|
925
939
|
public downloadProductDocumentUrl(requestParameters: DocumentsApiDownloadProductDocumentUrlRequest, options?: AxiosRequestConfig) {
|
|
926
|
-
return DocumentsApiFp(this.configuration).downloadProductDocumentUrl(requestParameters.productCode, requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
940
|
+
return DocumentsApiFp(this.configuration).downloadProductDocumentUrl(requestParameters.productCode, requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, options).then((request) => request(this.axios, this.basePath));
|
|
927
941
|
}
|
|
928
942
|
|
|
929
943
|
/**
|
package/base.ts
CHANGED
|
@@ -102,7 +102,11 @@ export class BaseAPI {
|
|
|
102
102
|
}
|
|
103
103
|
|
|
104
104
|
selectEnvironment(env: Environment) {
|
|
105
|
-
this.
|
|
105
|
+
this.selectBasePath(env);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
selectBasePath(path: string) {
|
|
109
|
+
this.configuration.basePath = path;
|
|
106
110
|
}
|
|
107
111
|
|
|
108
112
|
async authorize(username: string, password: string): Promise<void> {
|
|
@@ -57,10 +57,11 @@ export declare const DocumentsApiAxiosParamCreator: (configuration?: Configurati
|
|
|
57
57
|
* @param {string} productCode
|
|
58
58
|
* @param {string} code
|
|
59
59
|
* @param {string} [authorization] Bearer Token
|
|
60
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
60
61
|
* @param {*} [options] Override http request option.
|
|
61
62
|
* @throws {RequiredError}
|
|
62
63
|
*/
|
|
63
|
-
downloadProductDocumentUrl: (productCode: string, code: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
64
|
+
downloadProductDocumentUrl: (productCode: string, code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
64
65
|
/**
|
|
65
66
|
* Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
66
67
|
* @summary List documents
|
|
@@ -139,10 +140,11 @@ export declare const DocumentsApiFp: (configuration?: Configuration) => {
|
|
|
139
140
|
* @param {string} productCode
|
|
140
141
|
* @param {string} code
|
|
141
142
|
* @param {string} [authorization] Bearer Token
|
|
143
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
142
144
|
* @param {*} [options] Override http request option.
|
|
143
145
|
* @throws {RequiredError}
|
|
144
146
|
*/
|
|
145
|
-
downloadProductDocumentUrl(productCode: string, code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductDocumentDownloadUrlResponseClass>>;
|
|
147
|
+
downloadProductDocumentUrl(productCode: string, code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductDocumentDownloadUrlResponseClass>>;
|
|
146
148
|
/**
|
|
147
149
|
* Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
148
150
|
* @summary List documents
|
|
@@ -221,10 +223,11 @@ export declare const DocumentsApiFactory: (configuration?: Configuration, basePa
|
|
|
221
223
|
* @param {string} productCode
|
|
222
224
|
* @param {string} code
|
|
223
225
|
* @param {string} [authorization] Bearer Token
|
|
226
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
224
227
|
* @param {*} [options] Override http request option.
|
|
225
228
|
* @throws {RequiredError}
|
|
226
229
|
*/
|
|
227
|
-
downloadProductDocumentUrl(productCode: string, code: string, authorization?: string, options?: any): AxiosPromise<GetProductDocumentDownloadUrlResponseClass>;
|
|
230
|
+
downloadProductDocumentUrl(productCode: string, code: string, authorization?: string, contentDisposition?: 'attachment' | 'inline', options?: any): AxiosPromise<GetProductDocumentDownloadUrlResponseClass>;
|
|
228
231
|
/**
|
|
229
232
|
* Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
230
233
|
* @summary List documents
|
|
@@ -351,6 +354,12 @@ export interface DocumentsApiDownloadProductDocumentUrlRequest {
|
|
|
351
354
|
* @memberof DocumentsApiDownloadProductDocumentUrl
|
|
352
355
|
*/
|
|
353
356
|
readonly authorization?: string;
|
|
357
|
+
/**
|
|
358
|
+
* Content disposition override. Default will be depending on the document type.
|
|
359
|
+
* @type {'attachment' | 'inline'}
|
|
360
|
+
* @memberof DocumentsApiDownloadProductDocumentUrl
|
|
361
|
+
*/
|
|
362
|
+
readonly contentDisposition?: 'attachment' | 'inline';
|
|
354
363
|
}
|
|
355
364
|
/**
|
|
356
365
|
* Request parameters for listDocuments operation in DocumentsApi.
|
|
@@ -247,10 +247,11 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
247
247
|
* @param {string} productCode
|
|
248
248
|
* @param {string} code
|
|
249
249
|
* @param {string} [authorization] Bearer Token
|
|
250
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
250
251
|
* @param {*} [options] Override http request option.
|
|
251
252
|
* @throws {RequiredError}
|
|
252
253
|
*/
|
|
253
|
-
downloadProductDocumentUrl: function (productCode, code, authorization, options) {
|
|
254
|
+
downloadProductDocumentUrl: function (productCode, code, authorization, contentDisposition, options) {
|
|
254
255
|
if (options === void 0) { options = {}; }
|
|
255
256
|
return __awaiter(_this, void 0, void 0, function () {
|
|
256
257
|
var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
@@ -279,6 +280,9 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
279
280
|
// authentication bearer required
|
|
280
281
|
// http bearer authentication required
|
|
281
282
|
_a.sent();
|
|
283
|
+
if (contentDisposition !== undefined) {
|
|
284
|
+
localVarQueryParameter['contentDisposition'] = contentDisposition;
|
|
285
|
+
}
|
|
282
286
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
283
287
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
284
288
|
}
|
|
@@ -564,15 +568,16 @@ var DocumentsApiFp = function (configuration) {
|
|
|
564
568
|
* @param {string} productCode
|
|
565
569
|
* @param {string} code
|
|
566
570
|
* @param {string} [authorization] Bearer Token
|
|
571
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
567
572
|
* @param {*} [options] Override http request option.
|
|
568
573
|
* @throws {RequiredError}
|
|
569
574
|
*/
|
|
570
|
-
downloadProductDocumentUrl: function (productCode, code, authorization, options) {
|
|
575
|
+
downloadProductDocumentUrl: function (productCode, code, authorization, contentDisposition, options) {
|
|
571
576
|
return __awaiter(this, void 0, void 0, function () {
|
|
572
577
|
var localVarAxiosArgs;
|
|
573
578
|
return __generator(this, function (_a) {
|
|
574
579
|
switch (_a.label) {
|
|
575
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadProductDocumentUrl(productCode, code, authorization, options)];
|
|
580
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.downloadProductDocumentUrl(productCode, code, authorization, contentDisposition, options)];
|
|
576
581
|
case 1:
|
|
577
582
|
localVarAxiosArgs = _a.sent();
|
|
578
583
|
return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
|
|
@@ -704,11 +709,12 @@ var DocumentsApiFactory = function (configuration, basePath, axios) {
|
|
|
704
709
|
* @param {string} productCode
|
|
705
710
|
* @param {string} code
|
|
706
711
|
* @param {string} [authorization] Bearer Token
|
|
712
|
+
* @param {'attachment' | 'inline'} [contentDisposition] Content disposition override. Default will be depending on the document type.
|
|
707
713
|
* @param {*} [options] Override http request option.
|
|
708
714
|
* @throws {RequiredError}
|
|
709
715
|
*/
|
|
710
|
-
downloadProductDocumentUrl: function (productCode, code, authorization, options) {
|
|
711
|
-
return localVarFp.downloadProductDocumentUrl(productCode, code, authorization, options).then(function (request) { return request(axios, basePath); });
|
|
716
|
+
downloadProductDocumentUrl: function (productCode, code, authorization, contentDisposition, options) {
|
|
717
|
+
return localVarFp.downloadProductDocumentUrl(productCode, code, authorization, contentDisposition, options).then(function (request) { return request(axios, basePath); });
|
|
712
718
|
},
|
|
713
719
|
/**
|
|
714
720
|
* Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
@@ -814,7 +820,7 @@ var DocumentsApi = /** @class */ (function (_super) {
|
|
|
814
820
|
*/
|
|
815
821
|
DocumentsApi.prototype.downloadProductDocumentUrl = function (requestParameters, options) {
|
|
816
822
|
var _this = this;
|
|
817
|
-
return (0, exports.DocumentsApiFp)(this.configuration).downloadProductDocumentUrl(requestParameters.productCode, requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
823
|
+
return (0, exports.DocumentsApiFp)(this.configuration).downloadProductDocumentUrl(requestParameters.productCode, requestParameters.code, requestParameters.authorization, requestParameters.contentDisposition, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
818
824
|
};
|
|
819
825
|
/**
|
|
820
826
|
* Returns a list of documents you have previously created. The documents are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
package/dist/base.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export declare class BaseAPI {
|
|
|
54
54
|
private tokenData?;
|
|
55
55
|
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
56
56
|
selectEnvironment(env: Environment): void;
|
|
57
|
+
selectBasePath(path: string): void;
|
|
57
58
|
authorize(username: string, password: string): Promise<void>;
|
|
58
59
|
refreshTokenInternal(): Promise<string>;
|
|
59
60
|
private storeTokenData;
|
package/dist/base.js
CHANGED
|
@@ -138,7 +138,10 @@ var BaseAPI = /** @class */ (function () {
|
|
|
138
138
|
this.attachInterceptor(axios);
|
|
139
139
|
}
|
|
140
140
|
BaseAPI.prototype.selectEnvironment = function (env) {
|
|
141
|
-
this.
|
|
141
|
+
this.selectBasePath(env);
|
|
142
|
+
};
|
|
143
|
+
BaseAPI.prototype.selectBasePath = function (path) {
|
|
144
|
+
this.configuration.basePath = path;
|
|
142
145
|
};
|
|
143
146
|
BaseAPI.prototype.authorize = function (username, password) {
|
|
144
147
|
return __awaiter(this, void 0, void 0, function () {
|