@emilgroup/public-api-sdk-node 1.6.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.
- package/.openapi-generator/FILES +1 -0
- package/README.md +2 -2
- package/api/documents-api.ts +16 -16
- package/api/payments-setup-api.ts +104 -0
- package/api/products-api.ts +12 -12
- package/base.ts +4 -4
- package/dist/api/documents-api.d.ts +16 -16
- package/dist/api/documents-api.js +12 -12
- package/dist/api/payments-setup-api.d.ts +56 -0
- package/dist/api/payments-setup-api.js +93 -0
- package/dist/api/products-api.d.ts +12 -12
- package/dist/api/products-api.js +9 -9
- package/dist/base.d.ts +1 -1
- package/dist/base.js +4 -4
- package/dist/models/create-lead-request-dto.d.ts +9 -10
- package/dist/models/create-lead-request-dto.js +0 -7
- package/dist/models/get-public-psp-settings-response-class.d.ts +30 -0
- package/dist/models/get-public-psp-settings-response-class.js +15 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/models/insured-object-class.d.ts +18 -0
- package/dist/models/lead-class.d.ts +7 -0
- package/dist/models/update-lead-request-dto.d.ts +3 -17
- package/dist/models/update-lead-request-dto.js +0 -7
- package/models/create-lead-request-dto.ts +9 -13
- package/models/get-public-psp-settings-response-class.ts +36 -0
- package/models/index.ts +1 -0
- package/models/insured-object-class.ts +18 -0
- package/models/lead-class.ts +7 -0
- package/models/update-lead-request-dto.ts +3 -20
- package/package.json +2 -2
package/.openapi-generator/FILES
CHANGED
|
@@ -29,6 +29,7 @@ models/create-lead-response-class.ts
|
|
|
29
29
|
models/document-class.ts
|
|
30
30
|
models/get-custom-css-response-class.ts
|
|
31
31
|
models/get-lead-response-class.ts
|
|
32
|
+
models/get-public-psp-settings-response-class.ts
|
|
32
33
|
models/index.ts
|
|
33
34
|
models/initiate-braintree-payment-setup-request-dto.ts
|
|
34
35
|
models/initiate-braintree-payment-setup-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/public-api-sdk-node@1.
|
|
20
|
+
npm install @emilgroup/public-api-sdk-node@1.8.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/public-api-sdk-node@1.
|
|
24
|
+
yarn add @emilgroup/public-api-sdk-node@1.8.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `PublicApi`.
|
package/api/documents-api.ts
CHANGED
|
@@ -130,12 +130,12 @@ export const DocumentsApiAxiosParamCreator = function (configuration?: Configura
|
|
|
130
130
|
* 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.
|
|
131
131
|
* @summary List documents
|
|
132
132
|
* @param {string} [authorization] Bearer Token
|
|
133
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned.
|
|
134
|
-
* @param {any} [pageToken] A cursor for use in pagination.
|
|
133
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
134
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
135
135
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
136
136
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
137
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field.
|
|
138
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in
|
|
137
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
138
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
139
139
|
* @param {*} [options] Override http request option.
|
|
140
140
|
* @throws {RequiredError}
|
|
141
141
|
*/
|
|
@@ -235,12 +235,12 @@ export const DocumentsApiFp = function(configuration?: Configuration) {
|
|
|
235
235
|
* 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.
|
|
236
236
|
* @summary List documents
|
|
237
237
|
* @param {string} [authorization] Bearer Token
|
|
238
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned.
|
|
239
|
-
* @param {any} [pageToken] A cursor for use in pagination.
|
|
238
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
239
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
240
240
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
241
241
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
242
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field.
|
|
243
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in
|
|
242
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
243
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
244
244
|
* @param {*} [options] Override http request option.
|
|
245
245
|
* @throws {RequiredError}
|
|
246
246
|
*/
|
|
@@ -284,12 +284,12 @@ export const DocumentsApiFactory = function (configuration?: Configuration, base
|
|
|
284
284
|
* 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.
|
|
285
285
|
* @summary List documents
|
|
286
286
|
* @param {string} [authorization] Bearer Token
|
|
287
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned.
|
|
288
|
-
* @param {any} [pageToken] A cursor for use in pagination.
|
|
287
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
288
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
289
289
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
290
290
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
291
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field.
|
|
292
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in
|
|
291
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
292
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
293
293
|
* @param {*} [options] Override http request option.
|
|
294
294
|
* @throws {RequiredError}
|
|
295
295
|
*/
|
|
@@ -355,14 +355,14 @@ export interface DocumentsApiListDocumentsRequest {
|
|
|
355
355
|
readonly authorization?: string
|
|
356
356
|
|
|
357
357
|
/**
|
|
358
|
-
* A limit on the number of objects to be returned.
|
|
358
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
359
359
|
* @type {any}
|
|
360
360
|
* @memberof DocumentsApiListDocuments
|
|
361
361
|
*/
|
|
362
362
|
readonly pageSize?: any
|
|
363
363
|
|
|
364
364
|
/**
|
|
365
|
-
* A cursor for use in pagination.
|
|
365
|
+
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
366
366
|
* @type {any}
|
|
367
367
|
* @memberof DocumentsApiListDocuments
|
|
368
368
|
*/
|
|
@@ -383,14 +383,14 @@ export interface DocumentsApiListDocumentsRequest {
|
|
|
383
383
|
readonly search?: any
|
|
384
384
|
|
|
385
385
|
/**
|
|
386
|
-
* The order parameter determines how the results should be sorted according to a specified field.
|
|
386
|
+
* The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
387
387
|
* @type {any}
|
|
388
388
|
* @memberof DocumentsApiListDocuments
|
|
389
389
|
*/
|
|
390
390
|
readonly order?: any
|
|
391
391
|
|
|
392
392
|
/**
|
|
393
|
-
* Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in
|
|
393
|
+
* Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
394
394
|
* @type {any}
|
|
395
395
|
* @memberof DocumentsApiListDocuments
|
|
396
396
|
*/
|
|
@@ -25,6 +25,8 @@ import { CompletePaymentSetupRequestDto } from '../models';
|
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
import { CompletePaymentSetupResponseClass } from '../models';
|
|
27
27
|
// @ts-ignore
|
|
28
|
+
import { GetPublicPspSettingsResponseClass } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
28
30
|
import { InitiatePaymentSetupRequestDto } from '../models';
|
|
29
31
|
// @ts-ignore
|
|
30
32
|
import { InitiatePaymentSetupResponseClass } from '../models';
|
|
@@ -90,6 +92,52 @@ export const PaymentsSetupApiAxiosParamCreator = function (configuration?: Confi
|
|
|
90
92
|
options: localVarRequestOptions,
|
|
91
93
|
};
|
|
92
94
|
},
|
|
95
|
+
/**
|
|
96
|
+
* This will send the customer the public key to load the payment form and complete the payment setup.
|
|
97
|
+
* @summary Get public key and psp
|
|
98
|
+
* @param {string} [idempotencyKey] An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.
|
|
99
|
+
* @param {string} [authorization] Bearer Token
|
|
100
|
+
* @param {*} [options] Override http request option.
|
|
101
|
+
* @throws {RequiredError}
|
|
102
|
+
*/
|
|
103
|
+
getPublicPSPConfig: async (idempotencyKey?: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
104
|
+
const localVarPath = `/publicapi/v1/payment-setup/get-psp-config`;
|
|
105
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
106
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
107
|
+
let baseOptions;
|
|
108
|
+
let baseAccessToken;
|
|
109
|
+
if (configuration) {
|
|
110
|
+
baseOptions = configuration.baseOptions;
|
|
111
|
+
baseAccessToken = configuration.accessToken;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
115
|
+
const localVarHeaderParameter = {} as any;
|
|
116
|
+
const localVarQueryParameter = {} as any;
|
|
117
|
+
|
|
118
|
+
// authentication bearer required
|
|
119
|
+
// http bearer authentication required
|
|
120
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
121
|
+
|
|
122
|
+
if (idempotencyKey !== undefined && idempotencyKey !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
123
|
+
localVarHeaderParameter['Idempotency-Key'] = String(idempotencyKey ? idempotencyKey : baseAccessToken);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
127
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
133
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
134
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
135
|
+
|
|
136
|
+
return {
|
|
137
|
+
url: toPathString(localVarUrlObj),
|
|
138
|
+
options: localVarRequestOptions,
|
|
139
|
+
};
|
|
140
|
+
},
|
|
93
141
|
/**
|
|
94
142
|
* This will Initiate an account inside the payment service providers and they will generate a secret token which is allow user add its payment information.
|
|
95
143
|
* @summary Initiate a payment setup
|
|
@@ -165,6 +213,18 @@ export const PaymentsSetupApiFp = function(configuration?: Configuration) {
|
|
|
165
213
|
const localVarAxiosArgs = await localVarAxiosParamCreator.completePaymentSetup(completePaymentSetupRequestDto, idempotencyKey, authorization, options);
|
|
166
214
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
167
215
|
},
|
|
216
|
+
/**
|
|
217
|
+
* This will send the customer the public key to load the payment form and complete the payment setup.
|
|
218
|
+
* @summary Get public key and psp
|
|
219
|
+
* @param {string} [idempotencyKey] An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.
|
|
220
|
+
* @param {string} [authorization] Bearer Token
|
|
221
|
+
* @param {*} [options] Override http request option.
|
|
222
|
+
* @throws {RequiredError}
|
|
223
|
+
*/
|
|
224
|
+
async getPublicPSPConfig(idempotencyKey?: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPublicPspSettingsResponseClass>> {
|
|
225
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPublicPSPConfig(idempotencyKey, authorization, options);
|
|
226
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
227
|
+
},
|
|
168
228
|
/**
|
|
169
229
|
* This will Initiate an account inside the payment service providers and they will generate a secret token which is allow user add its payment information.
|
|
170
230
|
* @summary Initiate a payment setup
|
|
@@ -200,6 +260,17 @@ export const PaymentsSetupApiFactory = function (configuration?: Configuration,
|
|
|
200
260
|
completePaymentSetup(completePaymentSetupRequestDto: CompletePaymentSetupRequestDto, idempotencyKey?: string, authorization?: string, options?: any): AxiosPromise<CompletePaymentSetupResponseClass> {
|
|
201
261
|
return localVarFp.completePaymentSetup(completePaymentSetupRequestDto, idempotencyKey, authorization, options).then((request) => request(axios, basePath));
|
|
202
262
|
},
|
|
263
|
+
/**
|
|
264
|
+
* This will send the customer the public key to load the payment form and complete the payment setup.
|
|
265
|
+
* @summary Get public key and psp
|
|
266
|
+
* @param {string} [idempotencyKey] An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.
|
|
267
|
+
* @param {string} [authorization] Bearer Token
|
|
268
|
+
* @param {*} [options] Override http request option.
|
|
269
|
+
* @throws {RequiredError}
|
|
270
|
+
*/
|
|
271
|
+
getPublicPSPConfig(idempotencyKey?: string, authorization?: string, options?: any): AxiosPromise<GetPublicPspSettingsResponseClass> {
|
|
272
|
+
return localVarFp.getPublicPSPConfig(idempotencyKey, authorization, options).then((request) => request(axios, basePath));
|
|
273
|
+
},
|
|
203
274
|
/**
|
|
204
275
|
* This will Initiate an account inside the payment service providers and they will generate a secret token which is allow user add its payment information.
|
|
205
276
|
* @summary Initiate a payment setup
|
|
@@ -243,6 +314,27 @@ export interface PaymentsSetupApiCompletePaymentSetupRequest {
|
|
|
243
314
|
readonly authorization?: string
|
|
244
315
|
}
|
|
245
316
|
|
|
317
|
+
/**
|
|
318
|
+
* Request parameters for getPublicPSPConfig operation in PaymentsSetupApi.
|
|
319
|
+
* @export
|
|
320
|
+
* @interface PaymentsSetupApiGetPublicPSPConfigRequest
|
|
321
|
+
*/
|
|
322
|
+
export interface PaymentsSetupApiGetPublicPSPConfigRequest {
|
|
323
|
+
/**
|
|
324
|
+
* An idempotency key is a unique value generated by the client which the server uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using V4 UUIDs, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.
|
|
325
|
+
* @type {string}
|
|
326
|
+
* @memberof PaymentsSetupApiGetPublicPSPConfig
|
|
327
|
+
*/
|
|
328
|
+
readonly idempotencyKey?: string
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Bearer Token
|
|
332
|
+
* @type {string}
|
|
333
|
+
* @memberof PaymentsSetupApiGetPublicPSPConfig
|
|
334
|
+
*/
|
|
335
|
+
readonly authorization?: string
|
|
336
|
+
}
|
|
337
|
+
|
|
246
338
|
/**
|
|
247
339
|
* Request parameters for initiatePaymentSetup operation in PaymentsSetupApi.
|
|
248
340
|
* @export
|
|
@@ -290,6 +382,18 @@ export class PaymentsSetupApi extends BaseAPI {
|
|
|
290
382
|
return PaymentsSetupApiFp(this.configuration).completePaymentSetup(requestParameters.completePaymentSetupRequestDto, requestParameters.idempotencyKey, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
291
383
|
}
|
|
292
384
|
|
|
385
|
+
/**
|
|
386
|
+
* This will send the customer the public key to load the payment form and complete the payment setup.
|
|
387
|
+
* @summary Get public key and psp
|
|
388
|
+
* @param {PaymentsSetupApiGetPublicPSPConfigRequest} requestParameters Request parameters.
|
|
389
|
+
* @param {*} [options] Override http request option.
|
|
390
|
+
* @throws {RequiredError}
|
|
391
|
+
* @memberof PaymentsSetupApi
|
|
392
|
+
*/
|
|
393
|
+
public getPublicPSPConfig(requestParameters: PaymentsSetupApiGetPublicPSPConfigRequest = {}, options?: AxiosRequestConfig) {
|
|
394
|
+
return PaymentsSetupApiFp(this.configuration).getPublicPSPConfig(requestParameters.idempotencyKey, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
395
|
+
}
|
|
396
|
+
|
|
293
397
|
/**
|
|
294
398
|
* This will Initiate an account inside the payment service providers and they will generate a secret token which is allow user add its payment information.
|
|
295
399
|
* @summary Initiate a payment setup
|
package/api/products-api.ts
CHANGED
|
@@ -337,11 +337,11 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
337
337
|
* Returns a list of products you have previously created. The products are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
338
338
|
* @summary List products
|
|
339
339
|
* @param {string} [authorization] Bearer Token
|
|
340
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned.
|
|
341
|
-
* @param {any} [pageToken] A cursor for use in pagination.
|
|
340
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
341
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
342
342
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
343
343
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
344
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field.
|
|
344
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
345
345
|
* @param {any} [expand] You can expand product versions and insured object types list in this endpoint.
|
|
346
346
|
* @param {*} [options] Override http request option.
|
|
347
347
|
* @throws {RequiredError}
|
|
@@ -492,11 +492,11 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
492
492
|
* Returns a list of products you have previously created. The products are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
493
493
|
* @summary List products
|
|
494
494
|
* @param {string} [authorization] Bearer Token
|
|
495
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned.
|
|
496
|
-
* @param {any} [pageToken] A cursor for use in pagination.
|
|
495
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
496
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
497
497
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
498
498
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
499
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field.
|
|
499
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
500
500
|
* @param {any} [expand] You can expand product versions and insured object types list in this endpoint.
|
|
501
501
|
* @param {*} [options] Override http request option.
|
|
502
502
|
* @throws {RequiredError}
|
|
@@ -587,11 +587,11 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
587
587
|
* Returns a list of products you have previously created. The products are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
588
588
|
* @summary List products
|
|
589
589
|
* @param {string} [authorization] Bearer Token
|
|
590
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned.
|
|
591
|
-
* @param {any} [pageToken] A cursor for use in pagination.
|
|
590
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
591
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
592
592
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
593
593
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
594
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field.
|
|
594
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
595
595
|
* @param {any} [expand] You can expand product versions and insured object types list in this endpoint.
|
|
596
596
|
* @param {*} [options] Override http request option.
|
|
597
597
|
* @throws {RequiredError}
|
|
@@ -756,14 +756,14 @@ export interface ProductsApiListProductsRequest {
|
|
|
756
756
|
readonly authorization?: string
|
|
757
757
|
|
|
758
758
|
/**
|
|
759
|
-
* A limit on the number of objects to be returned.
|
|
759
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
760
760
|
* @type {any}
|
|
761
761
|
* @memberof ProductsApiListProducts
|
|
762
762
|
*/
|
|
763
763
|
readonly pageSize?: any
|
|
764
764
|
|
|
765
765
|
/**
|
|
766
|
-
* A cursor for use in pagination.
|
|
766
|
+
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
767
767
|
* @type {any}
|
|
768
768
|
* @memberof ProductsApiListProducts
|
|
769
769
|
*/
|
|
@@ -784,7 +784,7 @@ export interface ProductsApiListProductsRequest {
|
|
|
784
784
|
readonly search?: any
|
|
785
785
|
|
|
786
786
|
/**
|
|
787
|
-
* The order parameter determines how the results should be sorted according to a specified field.
|
|
787
|
+
* The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
788
788
|
* @type {any}
|
|
789
789
|
* @memberof ProductsApiListProducts
|
|
790
790
|
*/
|
package/base.ts
CHANGED
|
@@ -21,7 +21,7 @@ import * as fs from 'fs';
|
|
|
21
21
|
import * as path from 'path';
|
|
22
22
|
import * as os from 'os';
|
|
23
23
|
|
|
24
|
-
export const BASE_PATH = "
|
|
24
|
+
export const BASE_PATH = "https://apiv2.emil.de".replace(/\/+$/, "");
|
|
25
25
|
const CONFIG_DIRECTORY = '.emil';
|
|
26
26
|
const CONFIG_FILENAME = 'credentials';
|
|
27
27
|
const KEY_USERNAME = 'emil_username';
|
|
@@ -170,7 +170,7 @@ export class BaseAPI {
|
|
|
170
170
|
this.configuration.refreshToken = refreshToken;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
async
|
|
173
|
+
async refreshTokenInternal(): Promise<string> {
|
|
174
174
|
const { username, refreshToken } = this.configuration;
|
|
175
175
|
|
|
176
176
|
|
|
@@ -220,7 +220,7 @@ export class BaseAPI {
|
|
|
220
220
|
if (err.response.status === 401 && !originalConfig._retry) {
|
|
221
221
|
originalConfig._retry = true;
|
|
222
222
|
try {
|
|
223
|
-
const tokenString = await this.
|
|
223
|
+
const tokenString = await this.refreshTokenInternal();
|
|
224
224
|
const accessToken = `Bearer ${tokenString}`;
|
|
225
225
|
|
|
226
226
|
originalConfig.headers['Authorization'] = `Bearer ${accessToken}`
|
|
@@ -245,7 +245,7 @@ export class BaseAPI {
|
|
|
245
245
|
){
|
|
246
246
|
_retry_count++;
|
|
247
247
|
try {
|
|
248
|
-
const tokenString = await this.
|
|
248
|
+
const tokenString = await this.refreshTokenInternal();
|
|
249
249
|
const accessToken = `Bearer ${tokenString}`;
|
|
250
250
|
|
|
251
251
|
_retry = true;
|
|
@@ -41,12 +41,12 @@ export declare const DocumentsApiAxiosParamCreator: (configuration?: Configurati
|
|
|
41
41
|
* 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.
|
|
42
42
|
* @summary List documents
|
|
43
43
|
* @param {string} [authorization] Bearer Token
|
|
44
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned.
|
|
45
|
-
* @param {any} [pageToken] A cursor for use in pagination.
|
|
44
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
45
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
46
46
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
47
47
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
48
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field.
|
|
49
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in
|
|
48
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
49
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
50
50
|
* @param {*} [options] Override http request option.
|
|
51
51
|
* @throws {RequiredError}
|
|
52
52
|
*/
|
|
@@ -79,12 +79,12 @@ export declare const DocumentsApiFp: (configuration?: Configuration) => {
|
|
|
79
79
|
* 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.
|
|
80
80
|
* @summary List documents
|
|
81
81
|
* @param {string} [authorization] Bearer Token
|
|
82
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned.
|
|
83
|
-
* @param {any} [pageToken] A cursor for use in pagination.
|
|
82
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
83
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
84
84
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
85
85
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
86
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field.
|
|
87
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in
|
|
86
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
87
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
88
88
|
* @param {*} [options] Override http request option.
|
|
89
89
|
* @throws {RequiredError}
|
|
90
90
|
*/
|
|
@@ -117,12 +117,12 @@ export declare const DocumentsApiFactory: (configuration?: Configuration, basePa
|
|
|
117
117
|
* 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.
|
|
118
118
|
* @summary List documents
|
|
119
119
|
* @param {string} [authorization] Bearer Token
|
|
120
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned.
|
|
121
|
-
* @param {any} [pageToken] A cursor for use in pagination.
|
|
120
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
121
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
122
122
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
123
123
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
124
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field.
|
|
125
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in
|
|
124
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
125
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
126
126
|
* @param {*} [options] Override http request option.
|
|
127
127
|
* @throws {RequiredError}
|
|
128
128
|
*/
|
|
@@ -179,13 +179,13 @@ export interface DocumentsApiListDocumentsRequest {
|
|
|
179
179
|
*/
|
|
180
180
|
readonly authorization?: string;
|
|
181
181
|
/**
|
|
182
|
-
* A limit on the number of objects to be returned.
|
|
182
|
+
* A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
183
183
|
* @type {any}
|
|
184
184
|
* @memberof DocumentsApiListDocuments
|
|
185
185
|
*/
|
|
186
186
|
readonly pageSize?: any;
|
|
187
187
|
/**
|
|
188
|
-
* A cursor for use in pagination.
|
|
188
|
+
* A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
189
189
|
* @type {any}
|
|
190
190
|
* @memberof DocumentsApiListDocuments
|
|
191
191
|
*/
|
|
@@ -203,13 +203,13 @@ export interface DocumentsApiListDocumentsRequest {
|
|
|
203
203
|
*/
|
|
204
204
|
readonly search?: any;
|
|
205
205
|
/**
|
|
206
|
-
* The order parameter determines how the results should be sorted according to a specified field.
|
|
206
|
+
* The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
207
207
|
* @type {any}
|
|
208
208
|
* @memberof DocumentsApiListDocuments
|
|
209
209
|
*/
|
|
210
210
|
readonly order?: any;
|
|
211
211
|
/**
|
|
212
|
-
* Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in
|
|
212
|
+
* Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
213
213
|
* @type {any}
|
|
214
214
|
* @memberof DocumentsApiListDocuments
|
|
215
215
|
*/
|
|
@@ -197,12 +197,12 @@ var DocumentsApiAxiosParamCreator = function (configuration) {
|
|
|
197
197
|
* 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.
|
|
198
198
|
* @summary List documents
|
|
199
199
|
* @param {string} [authorization] Bearer Token
|
|
200
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned.
|
|
201
|
-
* @param {any} [pageToken] A cursor for use in pagination.
|
|
200
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
201
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
202
202
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
203
203
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
204
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field.
|
|
205
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in
|
|
204
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
205
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
206
206
|
* @param {*} [options] Override http request option.
|
|
207
207
|
* @throws {RequiredError}
|
|
208
208
|
*/
|
|
@@ -317,12 +317,12 @@ var DocumentsApiFp = function (configuration) {
|
|
|
317
317
|
* 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.
|
|
318
318
|
* @summary List documents
|
|
319
319
|
* @param {string} [authorization] Bearer Token
|
|
320
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned.
|
|
321
|
-
* @param {any} [pageToken] A cursor for use in pagination.
|
|
320
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
321
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
322
322
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
323
323
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
324
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field.
|
|
325
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in
|
|
324
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
325
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
326
326
|
* @param {*} [options] Override http request option.
|
|
327
327
|
* @throws {RequiredError}
|
|
328
328
|
*/
|
|
@@ -375,12 +375,12 @@ var DocumentsApiFactory = function (configuration, basePath, axios) {
|
|
|
375
375
|
* 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.
|
|
376
376
|
* @summary List documents
|
|
377
377
|
* @param {string} [authorization] Bearer Token
|
|
378
|
-
* @param {any} [pageSize] A limit on the number of objects to be returned.
|
|
379
|
-
* @param {any} [pageToken] A cursor for use in pagination.
|
|
378
|
+
* @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
|
|
379
|
+
* @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
380
380
|
* @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
381
381
|
* @param {any} [search] Search the list by any field. For instance, if you want to search by code add code=xxx in order to fetch the result.
|
|
382
|
-
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field.
|
|
383
|
-
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in
|
|
382
|
+
* @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
|
|
383
|
+
* @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
|
|
384
384
|
* @param {*} [options] Override http request option.
|
|
385
385
|
* @throws {RequiredError}
|
|
386
386
|
*/
|