@emilgroup/insurance-sdk-node 1.60.0 → 1.62.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/commission-agreement-items-api.ts +4 -4
- package/api/commission-agreement-versions-api.ts +4 -4
- package/api/commission-recipients-api.ts +4 -4
- package/api/policies-api.ts +29 -15
- package/api/products-api.ts +46 -56
- package/base.ts +7 -15
- package/dist/api/commission-agreement-items-api.d.ts +4 -4
- package/dist/api/commission-agreement-items-api.js +3 -3
- package/dist/api/commission-agreement-versions-api.d.ts +4 -4
- package/dist/api/commission-agreement-versions-api.js +3 -3
- package/dist/api/commission-recipients-api.d.ts +4 -4
- package/dist/api/commission-recipients-api.js +3 -3
- package/dist/api/policies-api.d.ts +21 -12
- package/dist/api/policies-api.js +15 -9
- package/dist/api/products-api.d.ts +39 -39
- package/dist/api/products-api.js +28 -37
- package/dist/base.d.ts +1 -3
- package/dist/base.js +20 -26
- package/dist/models/booking-funnel-class.d.ts +6 -0
- package/dist/models/create-booking-funnel-request-dto.d.ts +7 -1
- package/dist/models/create-lead-status-request-dto.d.ts +6 -0
- package/dist/models/create-partner-role-request-dto.d.ts +6 -0
- package/dist/models/get-policy-data-by-date-request-dto.d.ts +6 -0
- package/dist/models/get-product-request-dto.d.ts +3 -3
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/dist/models/lead-class.d.ts +3 -3
- package/dist/models/lead-status-class.d.ts +6 -0
- package/dist/models/link-lead-partner-request-dto.d.ts +16 -4
- package/dist/models/link-partner-request-dto.d.ts +16 -4
- package/dist/models/omit-type-class.d.ts +84 -0
- package/dist/models/omit-type-class.js +15 -0
- package/dist/models/partner-role-class.d.ts +6 -0
- package/dist/models/update-lead-status-request-dto.d.ts +6 -0
- package/dist/models/update-partner-role-request-dto.d.ts +6 -0
- package/models/booking-funnel-class.ts +6 -0
- package/models/create-booking-funnel-request-dto.ts +7 -1
- package/models/create-lead-status-request-dto.ts +6 -0
- package/models/create-partner-role-request-dto.ts +6 -0
- package/models/get-policy-data-by-date-request-dto.ts +6 -0
- package/models/get-product-request-dto.ts +3 -3
- package/models/index.ts +1 -0
- package/models/lead-class.ts +3 -3
- package/models/lead-status-class.ts +6 -0
- package/models/link-lead-partner-request-dto.ts +16 -4
- package/models/link-partner-request-dto.ts +16 -4
- package/models/omit-type-class.ts +90 -0
- package/models/partner-role-class.ts +6 -0
- package/models/update-lead-status-request-dto.ts +6 -0
- package/models/update-partner-role-request-dto.ts +6 -0
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -180,6 +180,7 @@ models/list-products-response-class.ts
|
|
|
180
180
|
models/list-request-dto.ts
|
|
181
181
|
models/list-status-transition-rules-response-class.ts
|
|
182
182
|
models/named-range-class.ts
|
|
183
|
+
models/omit-type-class.ts
|
|
183
184
|
models/partner-class.ts
|
|
184
185
|
models/partner-link-class.ts
|
|
185
186
|
models/partner-role-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/insurance-sdk-node@1.
|
|
20
|
+
npm install @emilgroup/insurance-sdk-node@1.62.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/insurance-sdk-node@1.
|
|
24
|
+
yarn add @emilgroup/insurance-sdk-node@1.62.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `PoliciesApi`.
|
|
@@ -201,7 +201,7 @@ export const CommissionAgreementItemsApiAxiosParamCreator = function (configurat
|
|
|
201
201
|
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, itemName, itemDescription, commissionFormula, commissionAgreementVersionId</i>
|
|
202
202
|
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: itemName, itemDescription, commissionFormula, code</i>
|
|
203
203
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, itemName, itemDescription, commissionFormula, code, , createdAt, updatedAt</i>
|
|
204
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
204
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
205
205
|
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, itemName, itemDescription, commissionFormula, commissionAgreementVersionId</i>
|
|
206
206
|
* @param {*} [options] Override http request option.
|
|
207
207
|
* @throws {RequiredError}
|
|
@@ -376,7 +376,7 @@ export const CommissionAgreementItemsApiFp = function(configuration?: Configurat
|
|
|
376
376
|
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, itemName, itemDescription, commissionFormula, commissionAgreementVersionId</i>
|
|
377
377
|
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: itemName, itemDescription, commissionFormula, code</i>
|
|
378
378
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, itemName, itemDescription, commissionFormula, code, , createdAt, updatedAt</i>
|
|
379
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
379
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
380
380
|
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, itemName, itemDescription, commissionFormula, commissionAgreementVersionId</i>
|
|
381
381
|
* @param {*} [options] Override http request option.
|
|
382
382
|
* @throws {RequiredError}
|
|
@@ -452,7 +452,7 @@ export const CommissionAgreementItemsApiFactory = function (configuration?: Conf
|
|
|
452
452
|
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, itemName, itemDescription, commissionFormula, commissionAgreementVersionId</i>
|
|
453
453
|
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: itemName, itemDescription, commissionFormula, code</i>
|
|
454
454
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, itemName, itemDescription, commissionFormula, code, , createdAt, updatedAt</i>
|
|
455
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
455
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
456
456
|
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, itemName, itemDescription, commissionFormula, commissionAgreementVersionId</i>
|
|
457
457
|
* @param {*} [options] Override http request option.
|
|
458
458
|
* @throws {RequiredError}
|
|
@@ -601,7 +601,7 @@ export interface CommissionAgreementItemsApiListCommissionAgreementItemsRequest
|
|
|
601
601
|
readonly order?: string
|
|
602
602
|
|
|
603
603
|
/**
|
|
604
|
-
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
604
|
+
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
605
605
|
* @type {string}
|
|
606
606
|
* @memberof CommissionAgreementItemsApiListCommissionAgreementItems
|
|
607
607
|
*/
|
|
@@ -197,7 +197,7 @@ export const CommissionAgreementVersionsApiAxiosParamCreator = function (configu
|
|
|
197
197
|
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, description, commissionAgreementId</i>
|
|
198
198
|
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: versionDescription, code</i>
|
|
199
199
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, versionDescription, code, createdAt, updatedAt</i>
|
|
200
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
200
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
201
201
|
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, description, commissionAgreementId</i>
|
|
202
202
|
* @param {*} [options] Override http request option.
|
|
203
203
|
* @throws {RequiredError}
|
|
@@ -321,7 +321,7 @@ export const CommissionAgreementVersionsApiFp = function(configuration?: Configu
|
|
|
321
321
|
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, description, commissionAgreementId</i>
|
|
322
322
|
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: versionDescription, code</i>
|
|
323
323
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, versionDescription, code, createdAt, updatedAt</i>
|
|
324
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
324
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
325
325
|
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, description, commissionAgreementId</i>
|
|
326
326
|
* @param {*} [options] Override http request option.
|
|
327
327
|
* @throws {RequiredError}
|
|
@@ -384,7 +384,7 @@ export const CommissionAgreementVersionsApiFactory = function (configuration?: C
|
|
|
384
384
|
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, description, commissionAgreementId</i>
|
|
385
385
|
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: versionDescription, code</i>
|
|
386
386
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, versionDescription, code, createdAt, updatedAt</i>
|
|
387
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
387
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
388
388
|
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, description, commissionAgreementId</i>
|
|
389
389
|
* @param {*} [options] Override http request option.
|
|
390
390
|
* @throws {RequiredError}
|
|
@@ -521,7 +521,7 @@ export interface CommissionAgreementVersionsApiListCommissionAgreementVersionsRe
|
|
|
521
521
|
readonly order?: string
|
|
522
522
|
|
|
523
523
|
/**
|
|
524
|
-
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
524
|
+
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
525
525
|
* @type {string}
|
|
526
526
|
* @memberof CommissionAgreementVersionsApiListCommissionAgreementVersions
|
|
527
527
|
*/
|
|
@@ -194,7 +194,7 @@ export const CommissionRecipientsApiAxiosParamCreator = function (configuration?
|
|
|
194
194
|
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, partnerCode, displayName, commissionAgreementId</i>
|
|
195
195
|
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: displayName, partnerCode, code</i>
|
|
196
196
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, displayName, partnerCode, code, createdAt, updatedAt</i>
|
|
197
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
197
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
198
198
|
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, partnerCode, displayName, commissionAgreementId</i>
|
|
199
199
|
* @param {*} [options] Override http request option.
|
|
200
200
|
* @throws {RequiredError}
|
|
@@ -368,7 +368,7 @@ export const CommissionRecipientsApiFp = function(configuration?: Configuration)
|
|
|
368
368
|
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, partnerCode, displayName, commissionAgreementId</i>
|
|
369
369
|
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: displayName, partnerCode, code</i>
|
|
370
370
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, displayName, partnerCode, code, createdAt, updatedAt</i>
|
|
371
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
371
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
372
372
|
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, partnerCode, displayName, commissionAgreementId</i>
|
|
373
373
|
* @param {*} [options] Override http request option.
|
|
374
374
|
* @throws {RequiredError}
|
|
@@ -443,7 +443,7 @@ export const CommissionRecipientsApiFactory = function (configuration?: Configur
|
|
|
443
443
|
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: code, partnerCode, displayName, commissionAgreementId</i>
|
|
444
444
|
* @param {string} [search] Search the response for matches in any searchable field. Use filter instead where possible for improved performance.<br/> <br/> <i>Searchable fields: displayName, partnerCode, code</i>
|
|
445
445
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, displayName, partnerCode, code, createdAt, updatedAt</i>
|
|
446
|
-
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
446
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
447
447
|
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: code, partnerCode, displayName, commissionAgreementId</i>
|
|
448
448
|
* @param {*} [options] Override http request option.
|
|
449
449
|
* @throws {RequiredError}
|
|
@@ -585,7 +585,7 @@ export interface CommissionRecipientsApiListCommissionRecipientsRequest {
|
|
|
585
585
|
readonly order?: string
|
|
586
586
|
|
|
587
587
|
/**
|
|
588
|
-
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
588
|
+
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
589
589
|
* @type {string}
|
|
590
590
|
* @memberof CommissionRecipientsApiListCommissionRecipients
|
|
591
591
|
*/
|
package/api/policies-api.ts
CHANGED
|
@@ -370,10 +370,11 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
370
370
|
* @param {string} code Unique identifier for the object.
|
|
371
371
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
372
372
|
* @param {string} [timesliceDate] This date is used to filter data of the policy, to select the appropriate timeslice. If no date is specified, the system returns all the timeslices available.
|
|
373
|
+
* @param {string} [expand] Expand to fetch additional information for current version or specified timeslice of the policy.<br/> <br/> <i>Expand by: \"premiums\", \"premiumItems\", \"premiumFormulas\", \"timelines,product\", or \"timelines,partnerLinks\"<i>
|
|
373
374
|
* @param {*} [options] Override http request option.
|
|
374
375
|
* @throws {RequiredError}
|
|
375
376
|
*/
|
|
376
|
-
getPolicyDataByDate: async (code: string, authorization?: string, timesliceDate?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
377
|
+
getPolicyDataByDate: async (code: string, authorization?: string, timesliceDate?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
377
378
|
// verify required parameter 'code' is not null or undefined
|
|
378
379
|
assertParamExists('getPolicyDataByDate', 'code', code)
|
|
379
380
|
const localVarPath = `/insuranceservice/v1/policies/{code}/current-version`
|
|
@@ -399,6 +400,10 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
399
400
|
localVarQueryParameter['timesliceDate'] = timesliceDate;
|
|
400
401
|
}
|
|
401
402
|
|
|
403
|
+
if (expand !== undefined) {
|
|
404
|
+
localVarQueryParameter['expand'] = expand;
|
|
405
|
+
}
|
|
406
|
+
|
|
402
407
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
403
408
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
404
409
|
}
|
|
@@ -499,12 +504,12 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
499
504
|
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, insuredObjectId, insuredObjectName, policyCode, date</i>
|
|
500
505
|
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
501
506
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, timesliceId, insuredObjectId, createdAt, updatedAt</i>
|
|
502
|
-
* @param {
|
|
507
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
503
508
|
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, insuredObjectId, insuredObjectName, policyCode, date</i>
|
|
504
509
|
* @param {*} [options] Override http request option.
|
|
505
510
|
* @throws {RequiredError}
|
|
506
511
|
*/
|
|
507
|
-
listPolicyObjects: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?:
|
|
512
|
+
listPolicyObjects: async (authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
508
513
|
const localVarPath = `/insuranceservice/v1/policies/policy-objects`;
|
|
509
514
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
510
515
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -1044,11 +1049,12 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
|
|
|
1044
1049
|
* @param {string} code Unique identifier for the object.
|
|
1045
1050
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1046
1051
|
* @param {string} [timesliceDate] This date is used to filter data of the policy, to select the appropriate timeslice. If no date is specified, the system returns all the timeslices available.
|
|
1052
|
+
* @param {string} [expand] Expand to fetch additional information for current version or specified timeslice of the policy.<br/> <br/> <i>Expand by: \"premiums\", \"premiumItems\", \"premiumFormulas\", \"timelines,product\", or \"timelines,partnerLinks\"<i>
|
|
1047
1053
|
* @param {*} [options] Override http request option.
|
|
1048
1054
|
* @throws {RequiredError}
|
|
1049
1055
|
*/
|
|
1050
|
-
async getPolicyDataByDate(code: string, authorization?: string, timesliceDate?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPolicyResponseClass>> {
|
|
1051
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getPolicyDataByDate(code, authorization, timesliceDate, options);
|
|
1056
|
+
async getPolicyDataByDate(code: string, authorization?: string, timesliceDate?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetPolicyResponseClass>> {
|
|
1057
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPolicyDataByDate(code, authorization, timesliceDate, expand, options);
|
|
1052
1058
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1053
1059
|
},
|
|
1054
1060
|
/**
|
|
@@ -1078,12 +1084,12 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
|
|
|
1078
1084
|
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, insuredObjectId, insuredObjectName, policyCode, date</i>
|
|
1079
1085
|
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
1080
1086
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, timesliceId, insuredObjectId, createdAt, updatedAt</i>
|
|
1081
|
-
* @param {
|
|
1087
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
1082
1088
|
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, insuredObjectId, insuredObjectName, policyCode, date</i>
|
|
1083
1089
|
* @param {*} [options] Override http request option.
|
|
1084
1090
|
* @throws {RequiredError}
|
|
1085
1091
|
*/
|
|
1086
|
-
async listPolicyObjects(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?:
|
|
1092
|
+
async listPolicyObjects(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPolicyObjectsResponseClass>> {
|
|
1087
1093
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listPolicyObjects(authorization, pageSize, pageToken, filter, search, order, expand, filters, options);
|
|
1088
1094
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1089
1095
|
},
|
|
@@ -1270,11 +1276,12 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
|
|
|
1270
1276
|
* @param {string} code Unique identifier for the object.
|
|
1271
1277
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
1272
1278
|
* @param {string} [timesliceDate] This date is used to filter data of the policy, to select the appropriate timeslice. If no date is specified, the system returns all the timeslices available.
|
|
1279
|
+
* @param {string} [expand] Expand to fetch additional information for current version or specified timeslice of the policy.<br/> <br/> <i>Expand by: \"premiums\", \"premiumItems\", \"premiumFormulas\", \"timelines,product\", or \"timelines,partnerLinks\"<i>
|
|
1273
1280
|
* @param {*} [options] Override http request option.
|
|
1274
1281
|
* @throws {RequiredError}
|
|
1275
1282
|
*/
|
|
1276
|
-
getPolicyDataByDate(code: string, authorization?: string, timesliceDate?: string, options?: any): AxiosPromise<GetPolicyResponseClass> {
|
|
1277
|
-
return localVarFp.getPolicyDataByDate(code, authorization, timesliceDate, options).then((request) => request(axios, basePath));
|
|
1283
|
+
getPolicyDataByDate(code: string, authorization?: string, timesliceDate?: string, expand?: string, options?: any): AxiosPromise<GetPolicyResponseClass> {
|
|
1284
|
+
return localVarFp.getPolicyDataByDate(code, authorization, timesliceDate, expand, options).then((request) => request(axios, basePath));
|
|
1278
1285
|
},
|
|
1279
1286
|
/**
|
|
1280
1287
|
* Returns a list of policies you have previously created. The policies are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
@@ -1302,12 +1309,12 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
|
|
|
1302
1309
|
* @param {string} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, insuredObjectId, insuredObjectName, policyCode, date</i>
|
|
1303
1310
|
* @param {any} [search] To search the list by any field, pass search=xxx to fetch the result.
|
|
1304
1311
|
* @param {string} [order] Order allows you to specify the desired order of entities retrieved from the server by ascending (ASC) or descending (DESC) order.<br/> <br/> <i>Allowed values: id, code, timesliceId, insuredObjectId, createdAt, updatedAt</i>
|
|
1305
|
-
* @param {
|
|
1312
|
+
* @param {string} [expand] Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
1306
1313
|
* @param {string} [filters] Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, insuredObjectId, insuredObjectName, policyCode, date</i>
|
|
1307
1314
|
* @param {*} [options] Override http request option.
|
|
1308
1315
|
* @throws {RequiredError}
|
|
1309
1316
|
*/
|
|
1310
|
-
listPolicyObjects(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?:
|
|
1317
|
+
listPolicyObjects(authorization?: string, pageSize?: any, pageToken?: any, filter?: string, search?: any, order?: string, expand?: string, filters?: string, options?: any): AxiosPromise<ListPolicyObjectsResponseClass> {
|
|
1311
1318
|
return localVarFp.listPolicyObjects(authorization, pageSize, pageToken, filter, search, order, expand, filters, options).then((request) => request(axios, basePath));
|
|
1312
1319
|
},
|
|
1313
1320
|
/**
|
|
@@ -1583,6 +1590,13 @@ export interface PoliciesApiGetPolicyDataByDateRequest {
|
|
|
1583
1590
|
* @memberof PoliciesApiGetPolicyDataByDate
|
|
1584
1591
|
*/
|
|
1585
1592
|
readonly timesliceDate?: string
|
|
1593
|
+
|
|
1594
|
+
/**
|
|
1595
|
+
* Expand to fetch additional information for current version or specified timeslice of the policy.<br/> <br/> <i>Expand by: \"premiums\", \"premiumItems\", \"premiumFormulas\", \"timelines,product\", or \"timelines,partnerLinks\"<i>
|
|
1596
|
+
* @type {string}
|
|
1597
|
+
* @memberof PoliciesApiGetPolicyDataByDate
|
|
1598
|
+
*/
|
|
1599
|
+
readonly expand?: string
|
|
1586
1600
|
}
|
|
1587
1601
|
|
|
1588
1602
|
/**
|
|
@@ -1697,11 +1711,11 @@ export interface PoliciesApiListPolicyObjectsRequest {
|
|
|
1697
1711
|
readonly order?: string
|
|
1698
1712
|
|
|
1699
1713
|
/**
|
|
1700
|
-
*
|
|
1701
|
-
* @type {
|
|
1714
|
+
* Expand to fetch additional information about the list items. Expanding resources can reduce the number of API calls required to accomplish a task. Use with discretion as some expanded fields can drastically increase payload size.<br/> <br/>
|
|
1715
|
+
* @type {string}
|
|
1702
1716
|
* @memberof PoliciesApiListPolicyObjects
|
|
1703
1717
|
*/
|
|
1704
|
-
readonly expand?:
|
|
1718
|
+
readonly expand?: string
|
|
1705
1719
|
|
|
1706
1720
|
/**
|
|
1707
1721
|
* Filters the response by one or multiple fields. Advanced filter functionality allows you to perform more complex filtering operations.<br/> <br/> <i>Allowed values: id, code, insuredObjectId, insuredObjectName, policyCode, date</i>
|
|
@@ -2037,7 +2051,7 @@ export class PoliciesApi extends BaseAPI {
|
|
|
2037
2051
|
* @memberof PoliciesApi
|
|
2038
2052
|
*/
|
|
2039
2053
|
public getPolicyDataByDate(requestParameters: PoliciesApiGetPolicyDataByDateRequest, options?: AxiosRequestConfig) {
|
|
2040
|
-
return PoliciesApiFp(this.configuration).getPolicyDataByDate(requestParameters.code, requestParameters.authorization, requestParameters.timesliceDate, options).then((request) => request(this.axios, this.basePath));
|
|
2054
|
+
return PoliciesApiFp(this.configuration).getPolicyDataByDate(requestParameters.code, requestParameters.authorization, requestParameters.timesliceDate, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
2041
2055
|
}
|
|
2042
2056
|
|
|
2043
2057
|
/**
|
package/api/products-api.ts
CHANGED
|
@@ -140,20 +140,16 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
140
140
|
* Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
|
|
141
141
|
* @summary Retrieve the product
|
|
142
142
|
* @param {string} code Unique identifier for the object.
|
|
143
|
-
* @param {number} id Unique identifier referencing the product.
|
|
144
|
-
* @param {string} slug A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
145
143
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
144
|
+
* @param {number} [id] Unique identifier referencing the product.
|
|
145
|
+
* @param {string} [slug] A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
146
146
|
* @param {string} [expand] Fields to expand response by
|
|
147
147
|
* @param {*} [options] Override http request option.
|
|
148
148
|
* @throws {RequiredError}
|
|
149
149
|
*/
|
|
150
|
-
getProductByCode: async (code: string, id
|
|
150
|
+
getProductByCode: async (code: string, authorization?: string, id?: number, slug?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
151
151
|
// verify required parameter 'code' is not null or undefined
|
|
152
152
|
assertParamExists('getProductByCode', 'code', code)
|
|
153
|
-
// verify required parameter 'id' is not null or undefined
|
|
154
|
-
assertParamExists('getProductByCode', 'id', id)
|
|
155
|
-
// verify required parameter 'slug' is not null or undefined
|
|
156
|
-
assertParamExists('getProductByCode', 'slug', slug)
|
|
157
153
|
const localVarPath = `/insuranceservice/v1/products/code/{code}`
|
|
158
154
|
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
159
155
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -203,21 +199,15 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
203
199
|
/**
|
|
204
200
|
* Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
|
|
205
201
|
* @summary Retrieve the product
|
|
206
|
-
* @param {number} id Unique identifier referencing the product.
|
|
207
|
-
* @param {string} code Unique identifier of the product that this object belongs to.
|
|
208
|
-
* @param {string} slug A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
209
202
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
203
|
+
* @param {number} [id] Unique identifier referencing the product.
|
|
204
|
+
* @param {string} [code] Unique identifier of the product that this object belongs to.
|
|
205
|
+
* @param {string} [slug] A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
210
206
|
* @param {string} [expand] Fields to expand response by
|
|
211
207
|
* @param {*} [options] Override http request option.
|
|
212
208
|
* @throws {RequiredError}
|
|
213
209
|
*/
|
|
214
|
-
getProductByIdentifier: async (id
|
|
215
|
-
// verify required parameter 'id' is not null or undefined
|
|
216
|
-
assertParamExists('getProductByIdentifier', 'id', id)
|
|
217
|
-
// verify required parameter 'code' is not null or undefined
|
|
218
|
-
assertParamExists('getProductByIdentifier', 'code', code)
|
|
219
|
-
// verify required parameter 'slug' is not null or undefined
|
|
220
|
-
assertParamExists('getProductByIdentifier', 'slug', slug)
|
|
210
|
+
getProductByIdentifier: async (authorization?: string, id?: number, code?: string, slug?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
221
211
|
const localVarPath = `/insuranceservice/v1/products/get-by-identifier`;
|
|
222
212
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
223
213
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -432,30 +422,30 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
432
422
|
* Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
|
|
433
423
|
* @summary Retrieve the product
|
|
434
424
|
* @param {string} code Unique identifier for the object.
|
|
435
|
-
* @param {number} id Unique identifier referencing the product.
|
|
436
|
-
* @param {string} slug A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
437
425
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
426
|
+
* @param {number} [id] Unique identifier referencing the product.
|
|
427
|
+
* @param {string} [slug] A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
438
428
|
* @param {string} [expand] Fields to expand response by
|
|
439
429
|
* @param {*} [options] Override http request option.
|
|
440
430
|
* @throws {RequiredError}
|
|
441
431
|
*/
|
|
442
|
-
async getProductByCode(code: string, id
|
|
443
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductByCode(code, id, slug,
|
|
432
|
+
async getProductByCode(code: string, authorization?: string, id?: number, slug?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductResponseClass>> {
|
|
433
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductByCode(code, authorization, id, slug, expand, options);
|
|
444
434
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
445
435
|
},
|
|
446
436
|
/**
|
|
447
437
|
* Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
|
|
448
438
|
* @summary Retrieve the product
|
|
449
|
-
* @param {number} id Unique identifier referencing the product.
|
|
450
|
-
* @param {string} code Unique identifier of the product that this object belongs to.
|
|
451
|
-
* @param {string} slug A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
452
439
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
440
|
+
* @param {number} [id] Unique identifier referencing the product.
|
|
441
|
+
* @param {string} [code] Unique identifier of the product that this object belongs to.
|
|
442
|
+
* @param {string} [slug] A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
453
443
|
* @param {string} [expand] Fields to expand response by
|
|
454
444
|
* @param {*} [options] Override http request option.
|
|
455
445
|
* @throws {RequiredError}
|
|
456
446
|
*/
|
|
457
|
-
async getProductByIdentifier(id
|
|
458
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductByIdentifier(id, code, slug,
|
|
447
|
+
async getProductByIdentifier(authorization?: string, id?: number, code?: string, slug?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductResponseClass>> {
|
|
448
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductByIdentifier(authorization, id, code, slug, expand, options);
|
|
459
449
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
460
450
|
},
|
|
461
451
|
/**
|
|
@@ -525,29 +515,29 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
525
515
|
* Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
|
|
526
516
|
* @summary Retrieve the product
|
|
527
517
|
* @param {string} code Unique identifier for the object.
|
|
528
|
-
* @param {number} id Unique identifier referencing the product.
|
|
529
|
-
* @param {string} slug A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
530
518
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
519
|
+
* @param {number} [id] Unique identifier referencing the product.
|
|
520
|
+
* @param {string} [slug] A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
531
521
|
* @param {string} [expand] Fields to expand response by
|
|
532
522
|
* @param {*} [options] Override http request option.
|
|
533
523
|
* @throws {RequiredError}
|
|
534
524
|
*/
|
|
535
|
-
getProductByCode(code: string, id
|
|
536
|
-
return localVarFp.getProductByCode(code, id, slug,
|
|
525
|
+
getProductByCode(code: string, authorization?: string, id?: number, slug?: string, expand?: string, options?: any): AxiosPromise<GetProductResponseClass> {
|
|
526
|
+
return localVarFp.getProductByCode(code, authorization, id, slug, expand, options).then((request) => request(axios, basePath));
|
|
537
527
|
},
|
|
538
528
|
/**
|
|
539
529
|
* Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
|
|
540
530
|
* @summary Retrieve the product
|
|
541
|
-
* @param {number} id Unique identifier referencing the product.
|
|
542
|
-
* @param {string} code Unique identifier of the product that this object belongs to.
|
|
543
|
-
* @param {string} slug A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
544
531
|
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
532
|
+
* @param {number} [id] Unique identifier referencing the product.
|
|
533
|
+
* @param {string} [code] Unique identifier of the product that this object belongs to.
|
|
534
|
+
* @param {string} [slug] A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
545
535
|
* @param {string} [expand] Fields to expand response by
|
|
546
536
|
* @param {*} [options] Override http request option.
|
|
547
537
|
* @throws {RequiredError}
|
|
548
538
|
*/
|
|
549
|
-
getProductByIdentifier(id
|
|
550
|
-
return localVarFp.getProductByIdentifier(id, code, slug,
|
|
539
|
+
getProductByIdentifier(authorization?: string, id?: number, code?: string, slug?: string, expand?: string, options?: any): AxiosPromise<GetProductResponseClass> {
|
|
540
|
+
return localVarFp.getProductByIdentifier(authorization, id, code, slug, expand, options).then((request) => request(axios, basePath));
|
|
551
541
|
},
|
|
552
542
|
/**
|
|
553
543
|
* 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.
|
|
@@ -637,25 +627,25 @@ export interface ProductsApiGetProductByCodeRequest {
|
|
|
637
627
|
readonly code: string
|
|
638
628
|
|
|
639
629
|
/**
|
|
640
|
-
*
|
|
641
|
-
* @type {
|
|
630
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
631
|
+
* @type {string}
|
|
642
632
|
* @memberof ProductsApiGetProductByCode
|
|
643
633
|
*/
|
|
644
|
-
readonly
|
|
634
|
+
readonly authorization?: string
|
|
645
635
|
|
|
646
636
|
/**
|
|
647
|
-
*
|
|
648
|
-
* @type {
|
|
637
|
+
* Unique identifier referencing the product.
|
|
638
|
+
* @type {number}
|
|
649
639
|
* @memberof ProductsApiGetProductByCode
|
|
650
640
|
*/
|
|
651
|
-
readonly
|
|
641
|
+
readonly id?: number
|
|
652
642
|
|
|
653
643
|
/**
|
|
654
|
-
*
|
|
644
|
+
* A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
655
645
|
* @type {string}
|
|
656
646
|
* @memberof ProductsApiGetProductByCode
|
|
657
647
|
*/
|
|
658
|
-
readonly
|
|
648
|
+
readonly slug?: string
|
|
659
649
|
|
|
660
650
|
/**
|
|
661
651
|
* Fields to expand response by
|
|
@@ -672,32 +662,32 @@ export interface ProductsApiGetProductByCodeRequest {
|
|
|
672
662
|
*/
|
|
673
663
|
export interface ProductsApiGetProductByIdentifierRequest {
|
|
674
664
|
/**
|
|
675
|
-
*
|
|
676
|
-
* @type {
|
|
665
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
666
|
+
* @type {string}
|
|
677
667
|
* @memberof ProductsApiGetProductByIdentifier
|
|
678
668
|
*/
|
|
679
|
-
readonly
|
|
669
|
+
readonly authorization?: string
|
|
680
670
|
|
|
681
671
|
/**
|
|
682
|
-
* Unique identifier
|
|
683
|
-
* @type {
|
|
672
|
+
* Unique identifier referencing the product.
|
|
673
|
+
* @type {number}
|
|
684
674
|
* @memberof ProductsApiGetProductByIdentifier
|
|
685
675
|
*/
|
|
686
|
-
readonly
|
|
676
|
+
readonly id?: number
|
|
687
677
|
|
|
688
678
|
/**
|
|
689
|
-
*
|
|
679
|
+
* Unique identifier of the product that this object belongs to.
|
|
690
680
|
* @type {string}
|
|
691
681
|
* @memberof ProductsApiGetProductByIdentifier
|
|
692
682
|
*/
|
|
693
|
-
readonly
|
|
683
|
+
readonly code?: string
|
|
694
684
|
|
|
695
685
|
/**
|
|
696
|
-
*
|
|
686
|
+
* A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
697
687
|
* @type {string}
|
|
698
688
|
* @memberof ProductsApiGetProductByIdentifier
|
|
699
689
|
*/
|
|
700
|
-
readonly
|
|
690
|
+
readonly slug?: string
|
|
701
691
|
|
|
702
692
|
/**
|
|
703
693
|
* Fields to expand response by
|
|
@@ -838,7 +828,7 @@ export class ProductsApi extends BaseAPI {
|
|
|
838
828
|
* @memberof ProductsApi
|
|
839
829
|
*/
|
|
840
830
|
public getProductByCode(requestParameters: ProductsApiGetProductByCodeRequest, options?: AxiosRequestConfig) {
|
|
841
|
-
return ProductsApiFp(this.configuration).getProductByCode(requestParameters.code, requestParameters.
|
|
831
|
+
return ProductsApiFp(this.configuration).getProductByCode(requestParameters.code, requestParameters.authorization, requestParameters.id, requestParameters.slug, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
842
832
|
}
|
|
843
833
|
|
|
844
834
|
/**
|
|
@@ -849,8 +839,8 @@ export class ProductsApi extends BaseAPI {
|
|
|
849
839
|
* @throws {RequiredError}
|
|
850
840
|
* @memberof ProductsApi
|
|
851
841
|
*/
|
|
852
|
-
public getProductByIdentifier(requestParameters: ProductsApiGetProductByIdentifierRequest, options?: AxiosRequestConfig) {
|
|
853
|
-
return ProductsApiFp(this.configuration).getProductByIdentifier(requestParameters.
|
|
842
|
+
public getProductByIdentifier(requestParameters: ProductsApiGetProductByIdentifierRequest = {}, options?: AxiosRequestConfig) {
|
|
843
|
+
return ProductsApiFp(this.configuration).getProductByIdentifier(requestParameters.authorization, requestParameters.id, requestParameters.code, requestParameters.slug, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
854
844
|
}
|
|
855
845
|
|
|
856
846
|
/**
|
package/base.ts
CHANGED
|
@@ -79,7 +79,6 @@ export class BaseAPI {
|
|
|
79
79
|
protected configuration: Configuration;
|
|
80
80
|
private username?: string;
|
|
81
81
|
private password?: string;
|
|
82
|
-
private permissions?: string;
|
|
83
82
|
|
|
84
83
|
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
|
85
84
|
if (configuration) {
|
|
@@ -150,10 +149,6 @@ export class BaseAPI {
|
|
|
150
149
|
this.configuration.basePath = env;
|
|
151
150
|
}
|
|
152
151
|
|
|
153
|
-
getPermissions(): Array<string> {
|
|
154
|
-
return this.permissions.split(',');
|
|
155
|
-
}
|
|
156
|
-
|
|
157
152
|
async authorize(username: string, password: string): Promise<void> {
|
|
158
153
|
const options: AxiosRequestConfig = {
|
|
159
154
|
method: 'POST',
|
|
@@ -168,21 +163,20 @@ export class BaseAPI {
|
|
|
168
163
|
|
|
169
164
|
const response = await globalAxios.request<LoginClass>(options);
|
|
170
165
|
|
|
171
|
-
const { data: { accessToken
|
|
166
|
+
const { data: { accessToken } } = response;
|
|
172
167
|
this.configuration.username = username;
|
|
173
168
|
this.configuration.accessToken = `Bearer ${accessToken}`;
|
|
174
|
-
this.permissions = permissions;
|
|
175
169
|
|
|
176
170
|
const refreshToken = this.extractRefreshToken(response)
|
|
177
171
|
this.configuration.refreshToken = refreshToken;
|
|
178
172
|
}
|
|
179
173
|
|
|
180
|
-
async refreshTokenInternal(): Promise<
|
|
174
|
+
async refreshTokenInternal(): Promise<string> {
|
|
181
175
|
const { username, refreshToken } = this.configuration;
|
|
182
176
|
|
|
183
177
|
|
|
184
178
|
if (!username || !refreshToken) {
|
|
185
|
-
|
|
179
|
+
return '';
|
|
186
180
|
}
|
|
187
181
|
|
|
188
182
|
const options: AxiosRequestConfig = {
|
|
@@ -196,9 +190,9 @@ export class BaseAPI {
|
|
|
196
190
|
withCredentials: true,
|
|
197
191
|
};
|
|
198
192
|
|
|
199
|
-
const
|
|
193
|
+
const { data: { accessToken } } = await globalAxios.request<LoginClass>(options);
|
|
200
194
|
|
|
201
|
-
return
|
|
195
|
+
return accessToken;
|
|
202
196
|
}
|
|
203
197
|
|
|
204
198
|
private extractRefreshToken(response: AxiosResponse): string {
|
|
@@ -227,9 +221,8 @@ export class BaseAPI {
|
|
|
227
221
|
if (err.response.status === 401 && !originalConfig._retry) {
|
|
228
222
|
originalConfig._retry = true;
|
|
229
223
|
try {
|
|
230
|
-
const
|
|
224
|
+
const tokenString = await this.refreshTokenInternal();
|
|
231
225
|
const accessToken = `Bearer ${tokenString}`;
|
|
232
|
-
this.permissions = permissions;
|
|
233
226
|
|
|
234
227
|
originalConfig.headers['Authorization'] = `Bearer ${accessToken}`
|
|
235
228
|
|
|
@@ -253,9 +246,8 @@ export class BaseAPI {
|
|
|
253
246
|
){
|
|
254
247
|
_retry_count++;
|
|
255
248
|
try {
|
|
256
|
-
const
|
|
249
|
+
const tokenString = await this.refreshTokenInternal();
|
|
257
250
|
const accessToken = `Bearer ${tokenString}`;
|
|
258
|
-
this.permissions = permissions;
|
|
259
251
|
|
|
260
252
|
_retry = true;
|
|
261
253
|
originalConfig.headers['Authorization'] = accessToken;
|