@emilgroup/insurance-sdk-node 1.32.1 → 1.35.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/models/product-field-class.ts +1 -1
- package/models/shared-product-field-class.ts +1 -1
- package/models/terminate-policy-request-dto.ts +23 -0
- package/models/update-policy-request-dto.ts +6 -0
- package/package.json +2 -2
- package/dist/api/default-api.d.ts +0 -66
- package/dist/api/default-api.js +0 -200
- package/dist/api/insured-object-types-api.d.ts +0 -141
- package/dist/api/insured-object-types-api.js +0 -258
- package/dist/api/insured-objects-api.d.ts +0 -318
- package/dist/api/insured-objects-api.js +0 -539
- package/dist/api/lead-statuses-api.d.ts +0 -265
- package/dist/api/lead-statuses-api.js +0 -505
- package/dist/api/leads-api.d.ts +0 -626
- package/dist/api/leads-api.js +0 -1024
- package/dist/api/named-ranges-api.d.ts +0 -376
- package/dist/api/named-ranges-api.js +0 -634
- package/dist/api/policies-api.d.ts +0 -722
- package/dist/api/policies-api.js +0 -1141
- package/dist/api/premium-formulas-api.d.ts +0 -433
- package/dist/api/premium-formulas-api.js +0 -727
- package/dist/api/product-factors-api.d.ts +0 -493
- package/dist/api/product-factors-api.js +0 -788
- package/dist/api/product-fields-api.d.ts +0 -477
- package/dist/api/product-fields-api.js +0 -757
- package/dist/api/product-versions-api.d.ts +0 -189
- package/dist/api/product-versions-api.js +0 -346
- package/dist/api/products-api.d.ts +0 -485
- package/dist/api/products-api.js +0 -772
- package/dist/api.d.ts +0 -23
- package/dist/api.js +0 -41
- package/dist/base.d.ts +0 -78
- package/dist/base.js +0 -394
- package/dist/common.d.ts +0 -92
- package/dist/common.js +0 -277
- package/dist/configuration.d.ts +0 -90
- package/dist/configuration.js +0 -44
- package/dist/index.d.ts +0 -15
- package/dist/index.js +0 -36
- package/dist/models/activate-policy-request-dto.d.ts +0 -24
- package/dist/models/activate-policy-request-dto.js +0 -15
- package/dist/models/activate-policy-response-class.d.ts +0 -25
- package/dist/models/activate-policy-response-class.js +0 -15
- package/dist/models/calculate-custom-premium-request-dto.d.ts +0 -35
- package/dist/models/calculate-custom-premium-request-dto.js +0 -20
- package/dist/models/calculate-premium-request-dto.d.ts +0 -38
- package/dist/models/calculate-premium-request-dto.js +0 -15
- package/dist/models/calculate-product-fields-request-dto.d.ts +0 -31
- package/dist/models/calculate-product-fields-request-dto.js +0 -15
- package/dist/models/clone-product-version-request-dto.d.ts +0 -36
- package/dist/models/clone-product-version-request-dto.js +0 -15
- package/dist/models/create-account-request-dto.d.ts +0 -120
- package/dist/models/create-account-request-dto.js +0 -26
- package/dist/models/create-bank-account-request-dto.d.ts +0 -30
- package/dist/models/create-bank-account-request-dto.js +0 -15
- package/dist/models/create-custom-application-request-dto.d.ts +0 -41
- package/dist/models/create-custom-application-request-dto.js +0 -20
- package/dist/models/create-dummy-policy-request-dto.d.ts +0 -44
- package/dist/models/create-dummy-policy-request-dto.js +0 -15
- package/dist/models/create-insured-object-request-dto.d.ts +0 -60
- package/dist/models/create-insured-object-request-dto.js +0 -15
- package/dist/models/create-insured-object-response-class.d.ts +0 -25
- package/dist/models/create-insured-object-response-class.js +0 -15
- package/dist/models/create-lead-async-response-class.d.ts +0 -24
- package/dist/models/create-lead-async-response-class.js +0 -15
- package/dist/models/create-lead-policy-request-dto.d.ts +0 -56
- package/dist/models/create-lead-policy-request-dto.js +0 -15
- package/dist/models/create-lead-request-dto.d.ts +0 -96
- package/dist/models/create-lead-request-dto.js +0 -15
- package/dist/models/create-lead-response-class.d.ts +0 -25
- package/dist/models/create-lead-response-class.js +0 -15
- package/dist/models/create-lead-status-request-dto.d.ts +0 -30
- package/dist/models/create-lead-status-request-dto.js +0 -15
- package/dist/models/create-lead-status-response-class.d.ts +0 -25
- package/dist/models/create-lead-status-response-class.js +0 -15
- package/dist/models/create-named-range-request-dto.d.ts +0 -55
- package/dist/models/create-named-range-request-dto.js +0 -15
- package/dist/models/create-named-range-response-class.d.ts +0 -25
- package/dist/models/create-named-range-response-class.js +0 -15
- package/dist/models/create-named-request-s3-data-class.d.ts +0 -30
- package/dist/models/create-named-request-s3-data-class.js +0 -15
- package/dist/models/create-payment-method-request-dto.d.ts +0 -31
- package/dist/models/create-payment-method-request-dto.js +0 -15
- package/dist/models/create-policy-request-dto.d.ts +0 -62
- package/dist/models/create-policy-request-dto.js +0 -15
- package/dist/models/create-policy-response-class.d.ts +0 -25
- package/dist/models/create-policy-response-class.js +0 -15
- package/dist/models/create-premium-formula-request-dto.d.ts +0 -105
- package/dist/models/create-premium-formula-request-dto.js +0 -39
- package/dist/models/create-premium-formula-response-class.d.ts +0 -25
- package/dist/models/create-premium-formula-response-class.js +0 -15
- package/dist/models/create-product-field-request-dto.d.ts +0 -137
- package/dist/models/create-product-field-request-dto.js +0 -20
- package/dist/models/create-product-field-response-class.d.ts +0 -25
- package/dist/models/create-product-field-response-class.js +0 -15
- package/dist/models/create-product-request-dto.d.ts +0 -85
- package/dist/models/create-product-request-dto.js +0 -51
- package/dist/models/create-product-response-class.d.ts +0 -25
- package/dist/models/create-product-response-class.js +0 -15
- package/dist/models/csv-product-factor-dto.d.ts +0 -48
- package/dist/models/csv-product-factor-dto.js +0 -15
- package/dist/models/delete-request-dto.d.ts +0 -24
- package/dist/models/delete-request-dto.js +0 -15
- package/dist/models/delete-response-class.d.ts +0 -24
- package/dist/models/delete-response-class.js +0 -15
- package/dist/models/empty-response-class.d.ts +0 -24
- package/dist/models/empty-response-class.js +0 -15
- package/dist/models/get-insured-object-response-class.d.ts +0 -25
- package/dist/models/get-insured-object-response-class.js +0 -15
- package/dist/models/get-lead-response-class.d.ts +0 -25
- package/dist/models/get-lead-response-class.js +0 -15
- package/dist/models/get-lead-status-response-class.d.ts +0 -25
- package/dist/models/get-lead-status-response-class.js +0 -15
- package/dist/models/get-named-range-response-class.d.ts +0 -25
- package/dist/models/get-named-range-response-class.js +0 -15
- package/dist/models/get-policy-data-by-date-request-dto.d.ts +0 -30
- package/dist/models/get-policy-data-by-date-request-dto.js +0 -15
- package/dist/models/get-policy-request-dto.d.ts +0 -30
- package/dist/models/get-policy-request-dto.js +0 -15
- package/dist/models/get-policy-response-class.d.ts +0 -25
- package/dist/models/get-policy-response-class.js +0 -15
- package/dist/models/get-premium-formula-request-dto.d.ts +0 -24
- package/dist/models/get-premium-formula-request-dto.js +0 -15
- package/dist/models/get-premium-formula-response-class.d.ts +0 -25
- package/dist/models/get-premium-formula-response-class.js +0 -15
- package/dist/models/get-product-factor-response-class.d.ts +0 -32
- package/dist/models/get-product-factor-response-class.js +0 -15
- package/dist/models/get-product-factor-value-request-dto.d.ts +0 -42
- package/dist/models/get-product-factor-value-request-dto.js +0 -15
- package/dist/models/get-product-factor-value-response-class.d.ts +0 -25
- package/dist/models/get-product-factor-value-response-class.js +0 -15
- package/dist/models/get-product-factors-for-version-request-dto.d.ts +0 -36
- package/dist/models/get-product-factors-for-version-request-dto.js +0 -15
- package/dist/models/get-product-factors-for-version-response-class.d.ts +0 -25
- package/dist/models/get-product-factors-for-version-response-class.js +0 -15
- package/dist/models/get-product-field-request-dto.d.ts +0 -24
- package/dist/models/get-product-field-request-dto.js +0 -15
- package/dist/models/get-product-field-response-class.d.ts +0 -25
- package/dist/models/get-product-field-response-class.js +0 -15
- package/dist/models/get-product-request-dto.d.ts +0 -42
- package/dist/models/get-product-request-dto.js +0 -15
- package/dist/models/get-product-response-class.d.ts +0 -25
- package/dist/models/get-product-response-class.js +0 -15
- package/dist/models/get-product-version-request-dto.d.ts +0 -36
- package/dist/models/get-product-version-request-dto.js +0 -15
- package/dist/models/get-product-version-response-class.d.ts +0 -25
- package/dist/models/get-product-version-response-class.js +0 -15
- package/dist/models/grouped-product-factor-class.d.ts +0 -37
- package/dist/models/grouped-product-factor-class.js +0 -15
- package/dist/models/grouped-product-factor-value-class.d.ts +0 -42
- package/dist/models/grouped-product-factor-value-class.js +0 -15
- package/dist/models/grouped-product-factors-response-class.d.ts +0 -25
- package/dist/models/grouped-product-factors-response-class.js +0 -15
- package/dist/models/grpc-patch-lead-request-dto.d.ts +0 -102
- package/dist/models/grpc-patch-lead-request-dto.js +0 -15
- package/dist/models/grpc-update-lead-request-dto.d.ts +0 -102
- package/dist/models/grpc-update-lead-request-dto.js +0 -15
- package/dist/models/index.d.ts +0 -136
- package/dist/models/index.js +0 -152
- package/dist/models/inline-response200.d.ts +0 -54
- package/dist/models/inline-response200.js +0 -15
- package/dist/models/inline-response503.d.ts +0 -54
- package/dist/models/inline-response503.js +0 -15
- package/dist/models/insured-object-class.d.ts +0 -85
- package/dist/models/insured-object-class.js +0 -15
- package/dist/models/insured-object-type-class.d.ts +0 -48
- package/dist/models/insured-object-type-class.js +0 -15
- package/dist/models/invoice-item-class.d.ts +0 -117
- package/dist/models/invoice-item-class.js +0 -24
- package/dist/models/invoice-status-class.d.ts +0 -47
- package/dist/models/invoice-status-class.js +0 -20
- package/dist/models/lead-bank-account-class.d.ts +0 -30
- package/dist/models/lead-bank-account-class.js +0 -15
- package/dist/models/lead-class.d.ts +0 -133
- package/dist/models/lead-class.js +0 -15
- package/dist/models/lead-status-class.d.ts +0 -36
- package/dist/models/lead-status-class.js +0 -15
- package/dist/models/list-insured-object-types-response-class.d.ts +0 -31
- package/dist/models/list-insured-object-types-response-class.js +0 -15
- package/dist/models/list-insured-objects-response-class.d.ts +0 -31
- package/dist/models/list-insured-objects-response-class.js +0 -15
- package/dist/models/list-lead-statuses-response-class.d.ts +0 -31
- package/dist/models/list-lead-statuses-response-class.js +0 -15
- package/dist/models/list-leads-response-class.d.ts +0 -43
- package/dist/models/list-leads-response-class.js +0 -15
- package/dist/models/list-named-ranges-response-class.d.ts +0 -30
- package/dist/models/list-named-ranges-response-class.js +0 -15
- package/dist/models/list-policies-response-class.d.ts +0 -43
- package/dist/models/list-policies-response-class.js +0 -15
- package/dist/models/list-premium-formulas-response-class.d.ts +0 -31
- package/dist/models/list-premium-formulas-response-class.js +0 -15
- package/dist/models/list-product-factors-response-class.d.ts +0 -31
- package/dist/models/list-product-factors-response-class.js +0 -15
- package/dist/models/list-product-field-types-response-class.d.ts +0 -31
- package/dist/models/list-product-field-types-response-class.js +0 -15
- package/dist/models/list-product-fields-response-class.d.ts +0 -31
- package/dist/models/list-product-fields-response-class.js +0 -15
- package/dist/models/list-products-response-class.d.ts +0 -31
- package/dist/models/list-products-response-class.js +0 -15
- package/dist/models/list-request-dto.d.ts +0 -54
- package/dist/models/list-request-dto.js +0 -15
- package/dist/models/named-range-class.d.ts +0 -78
- package/dist/models/named-range-class.js +0 -15
- package/dist/models/patch-lead-request-dto.d.ts +0 -90
- package/dist/models/patch-lead-request-dto.js +0 -15
- package/dist/models/patch-lead-response-class.d.ts +0 -25
- package/dist/models/patch-lead-response-class.js +0 -15
- package/dist/models/patch-policy-request-dto.d.ts +0 -50
- package/dist/models/patch-policy-request-dto.js +0 -15
- package/dist/models/patch-policy-response-class.d.ts +0 -25
- package/dist/models/patch-policy-response-class.js +0 -15
- package/dist/models/policy-class.d.ts +0 -128
- package/dist/models/policy-class.js +0 -15
- package/dist/models/policy-object-class.d.ts +0 -60
- package/dist/models/policy-object-class.js +0 -15
- package/dist/models/policy-object-dto.d.ts +0 -42
- package/dist/models/policy-object-dto.js +0 -15
- package/dist/models/policy-premium-class.d.ts +0 -49
- package/dist/models/policy-premium-class.js +0 -15
- package/dist/models/policy-premium-item-class.d.ts +0 -55
- package/dist/models/policy-premium-item-class.js +0 -15
- package/dist/models/policy-version-class.d.ts +0 -55
- package/dist/models/policy-version-class.js +0 -15
- package/dist/models/premium-formula-class.d.ts +0 -96
- package/dist/models/premium-formula-class.js +0 -15
- package/dist/models/premium-override-dto.d.ts +0 -55
- package/dist/models/premium-override-dto.js +0 -27
- package/dist/models/premium-override-request-class.d.ts +0 -25
- package/dist/models/premium-override-request-class.js +0 -15
- package/dist/models/premium-override-request-dto.d.ts +0 -25
- package/dist/models/premium-override-request-dto.js +0 -15
- package/dist/models/product-class.d.ts +0 -80
- package/dist/models/product-class.js +0 -15
- package/dist/models/product-factor-class.d.ts +0 -61
- package/dist/models/product-factor-class.js +0 -15
- package/dist/models/product-factor-for-version-class.d.ts +0 -61
- package/dist/models/product-factor-for-version-class.js +0 -15
- package/dist/models/product-factor-value-class.d.ts +0 -60
- package/dist/models/product-factor-value-class.js +0 -15
- package/dist/models/product-factor-value-for-version-class.d.ts +0 -42
- package/dist/models/product-factor-value-for-version-class.js +0 -15
- package/dist/models/product-field-class.d.ts +0 -132
- package/dist/models/product-field-class.js +0 -15
- package/dist/models/product-field-type-class.d.ts +0 -48
- package/dist/models/product-field-type-class.js +0 -15
- package/dist/models/product-version-class.d.ts +0 -61
- package/dist/models/product-version-class.js +0 -22
- package/dist/models/sepa-dto.d.ts +0 -30
- package/dist/models/sepa-dto.js +0 -15
- package/dist/models/shared-create-lead-policy-request-dto.d.ts +0 -56
- package/dist/models/shared-create-lead-policy-request-dto.js +0 -15
- package/dist/models/shared-invoice-class.d.ts +0 -150
- package/dist/models/shared-invoice-class.js +0 -30
- package/dist/models/shared-lead-policy-object-dto.d.ts +0 -42
- package/dist/models/shared-lead-policy-object-dto.js +0 -15
- package/dist/models/shared-product-field-class.d.ts +0 -132
- package/dist/models/shared-product-field-class.js +0 -15
- package/dist/models/shared-update-named-range-request-dto.d.ts +0 -42
- package/dist/models/shared-update-named-range-request-dto.js +0 -15
- package/dist/models/shared-update-premium-formula-request-dto.d.ts +0 -111
- package/dist/models/shared-update-premium-formula-request-dto.js +0 -39
- package/dist/models/store-product-factors-request-dto.d.ts +0 -31
- package/dist/models/store-product-factors-request-dto.js +0 -15
- package/dist/models/store-product-factors-response-class.d.ts +0 -25
- package/dist/models/store-product-factors-response-class.js +0 -15
- package/dist/models/suspend-policy-request-dto.d.ts +0 -24
- package/dist/models/suspend-policy-request-dto.js +0 -15
- package/dist/models/suspend-policy-response-class.d.ts +0 -25
- package/dist/models/suspend-policy-response-class.js +0 -15
- package/dist/models/swap-premium-formulas-order-request-dto.d.ts +0 -30
- package/dist/models/swap-premium-formulas-order-request-dto.js +0 -15
- package/dist/models/terminate-policy-request-dto.d.ts +0 -24
- package/dist/models/terminate-policy-request-dto.js +0 -15
- package/dist/models/terminate-policy-response-class.d.ts +0 -25
- package/dist/models/terminate-policy-response-class.js +0 -15
- package/dist/models/timeslice-class.d.ts +0 -62
- package/dist/models/timeslice-class.js +0 -15
- package/dist/models/update-insured-object-request-dto.d.ts +0 -66
- package/dist/models/update-insured-object-request-dto.js +0 -15
- package/dist/models/update-lead-request-dto.d.ts +0 -90
- package/dist/models/update-lead-request-dto.js +0 -15
- package/dist/models/update-lead-response-class.d.ts +0 -25
- package/dist/models/update-lead-response-class.js +0 -15
- package/dist/models/update-named-range-request-dto.d.ts +0 -36
- package/dist/models/update-named-range-request-dto.js +0 -15
- package/dist/models/update-named-range-response-class.d.ts +0 -25
- package/dist/models/update-named-range-response-class.js +0 -15
- package/dist/models/update-policy-request-dto.d.ts +0 -70
- package/dist/models/update-policy-request-dto.js +0 -23
- package/dist/models/update-policy-response-class.d.ts +0 -25
- package/dist/models/update-policy-response-class.js +0 -15
- package/dist/models/update-premium-formula-request-dto.d.ts +0 -105
- package/dist/models/update-premium-formula-request-dto.js +0 -39
- package/dist/models/update-premium-formula-response-class.d.ts +0 -25
- package/dist/models/update-premium-formula-response-class.js +0 -15
- package/dist/models/update-product-field-request-dto.d.ts +0 -143
- package/dist/models/update-product-field-request-dto.js +0 -20
- package/dist/models/update-product-field-response-class.d.ts +0 -25
- package/dist/models/update-product-field-response-class.js +0 -15
- package/dist/models/update-product-request-dto.d.ts +0 -42
- package/dist/models/update-product-request-dto.js +0 -15
- package/dist/models/update-product-response-class.d.ts +0 -25
- package/dist/models/update-product-response-class.js +0 -15
- package/dist/models/update-product-version-request-dto.d.ts +0 -43
- package/dist/models/update-product-version-request-dto.js +0 -22
- package/dist/models/update-product-version-response-class.d.ts +0 -25
- package/dist/models/update-product-version-response-class.js +0 -15
- package/dist/models/uploaded-document-dto.d.ts +0 -24
- package/dist/models/uploaded-document-dto.js +0 -15
- package/dist/models/validate-product-factors-request-dto.d.ts +0 -31
- package/dist/models/validate-product-factors-request-dto.js +0 -15
- package/dist/models/withdraw-policy-response-class.d.ts +0 -25
- package/dist/models/withdraw-policy-response-class.js +0 -15
package/dist/api.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* EMIL InsuranceService
|
|
3
|
-
* The EMIL InsuranceService API description
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
* Contact: kontakt@emil.de
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
export * from './api/default-api';
|
|
13
|
-
export * from './api/insured-object-types-api';
|
|
14
|
-
export * from './api/insured-objects-api';
|
|
15
|
-
export * from './api/lead-statuses-api';
|
|
16
|
-
export * from './api/leads-api';
|
|
17
|
-
export * from './api/named-ranges-api';
|
|
18
|
-
export * from './api/policies-api';
|
|
19
|
-
export * from './api/premium-formulas-api';
|
|
20
|
-
export * from './api/product-factors-api';
|
|
21
|
-
export * from './api/product-fields-api';
|
|
22
|
-
export * from './api/product-versions-api';
|
|
23
|
-
export * from './api/products-api';
|
package/dist/api.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* EMIL InsuranceService
|
|
6
|
-
* The EMIL InsuranceService API description
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 1.0
|
|
9
|
-
* Contact: kontakt@emil.de
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
-
if (k2 === undefined) k2 = k;
|
|
17
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
-
}
|
|
21
|
-
Object.defineProperty(o, k2, desc);
|
|
22
|
-
}) : (function(o, m, k, k2) {
|
|
23
|
-
if (k2 === undefined) k2 = k;
|
|
24
|
-
o[k2] = m[k];
|
|
25
|
-
}));
|
|
26
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
27
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
28
|
-
};
|
|
29
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
__exportStar(require("./api/default-api"), exports);
|
|
31
|
-
__exportStar(require("./api/insured-object-types-api"), exports);
|
|
32
|
-
__exportStar(require("./api/insured-objects-api"), exports);
|
|
33
|
-
__exportStar(require("./api/lead-statuses-api"), exports);
|
|
34
|
-
__exportStar(require("./api/leads-api"), exports);
|
|
35
|
-
__exportStar(require("./api/named-ranges-api"), exports);
|
|
36
|
-
__exportStar(require("./api/policies-api"), exports);
|
|
37
|
-
__exportStar(require("./api/premium-formulas-api"), exports);
|
|
38
|
-
__exportStar(require("./api/product-factors-api"), exports);
|
|
39
|
-
__exportStar(require("./api/product-fields-api"), exports);
|
|
40
|
-
__exportStar(require("./api/product-versions-api"), exports);
|
|
41
|
-
__exportStar(require("./api/products-api"), exports);
|
package/dist/base.d.ts
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* EMIL InsuranceService
|
|
3
|
-
* The EMIL InsuranceService API description
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
* Contact: kontakt@emil.de
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import { Configuration } from "./configuration";
|
|
13
|
-
import { AxiosInstance, AxiosRequestConfig } from 'axios';
|
|
14
|
-
export declare const BASE_PATH: string;
|
|
15
|
-
/**
|
|
16
|
-
*
|
|
17
|
-
* @export
|
|
18
|
-
*/
|
|
19
|
-
export declare const COLLECTION_FORMATS: {
|
|
20
|
-
csv: string;
|
|
21
|
-
ssv: string;
|
|
22
|
-
tsv: string;
|
|
23
|
-
pipes: string;
|
|
24
|
-
};
|
|
25
|
-
export interface LoginClass {
|
|
26
|
-
accessToken: string;
|
|
27
|
-
permissions: Array<string>;
|
|
28
|
-
}
|
|
29
|
-
export declare enum Environment {
|
|
30
|
-
Production = "https://apiv2.emil.de",
|
|
31
|
-
Test = "https://apiv2-test.emil.de",
|
|
32
|
-
Development = "https://apiv2-dev.emil.de",
|
|
33
|
-
ProductionZurich = "https://eu-central-2.apiv2.emil.de"
|
|
34
|
-
}
|
|
35
|
-
export declare function resetRetry(): void;
|
|
36
|
-
/**
|
|
37
|
-
*
|
|
38
|
-
* @export
|
|
39
|
-
* @interface RequestArgs
|
|
40
|
-
*/
|
|
41
|
-
export interface RequestArgs {
|
|
42
|
-
url: string;
|
|
43
|
-
options: AxiosRequestConfig;
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
*
|
|
47
|
-
* @export
|
|
48
|
-
* @class BaseAPI
|
|
49
|
-
*/
|
|
50
|
-
export declare class BaseAPI {
|
|
51
|
-
protected basePath: string;
|
|
52
|
-
protected axios: AxiosInstance;
|
|
53
|
-
protected configuration: Configuration;
|
|
54
|
-
private username?;
|
|
55
|
-
private password?;
|
|
56
|
-
constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
|
|
57
|
-
initialize(env?: Environment): Promise<void>;
|
|
58
|
-
private loadCredentials;
|
|
59
|
-
private readConfigFile;
|
|
60
|
-
private readEnvVariables;
|
|
61
|
-
selectEnvironment(env: Environment): void;
|
|
62
|
-
authorize(username: string, password: string): Promise<void>;
|
|
63
|
-
refreshTokenInternal(): Promise<string>;
|
|
64
|
-
private extractRefreshToken;
|
|
65
|
-
getConfiguration(): Configuration;
|
|
66
|
-
private attachInterceptor;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
*
|
|
70
|
-
* @export
|
|
71
|
-
* @class RequiredError
|
|
72
|
-
* @extends {Error}
|
|
73
|
-
*/
|
|
74
|
-
export declare class RequiredError extends Error {
|
|
75
|
-
field: string;
|
|
76
|
-
name: "RequiredError";
|
|
77
|
-
constructor(field: string, msg?: string);
|
|
78
|
-
}
|
package/dist/base.js
DELETED
|
@@ -1,394 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
/**
|
|
5
|
-
* EMIL InsuranceService
|
|
6
|
-
* The EMIL InsuranceService API description
|
|
7
|
-
*
|
|
8
|
-
* The version of the OpenAPI document: 1.0
|
|
9
|
-
* Contact: kontakt@emil.de
|
|
10
|
-
*
|
|
11
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
-
* https://openapi-generator.tech
|
|
13
|
-
* Do not edit the class manually.
|
|
14
|
-
*/
|
|
15
|
-
var __extends = (this && this.__extends) || (function () {
|
|
16
|
-
var extendStatics = function (d, b) {
|
|
17
|
-
extendStatics = Object.setPrototypeOf ||
|
|
18
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
19
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
20
|
-
return extendStatics(d, b);
|
|
21
|
-
};
|
|
22
|
-
return function (d, b) {
|
|
23
|
-
if (typeof b !== "function" && b !== null)
|
|
24
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
25
|
-
extendStatics(d, b);
|
|
26
|
-
function __() { this.constructor = d; }
|
|
27
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
28
|
-
};
|
|
29
|
-
})();
|
|
30
|
-
var __assign = (this && this.__assign) || function () {
|
|
31
|
-
__assign = Object.assign || function(t) {
|
|
32
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
33
|
-
s = arguments[i];
|
|
34
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
35
|
-
t[p] = s[p];
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
};
|
|
39
|
-
return __assign.apply(this, arguments);
|
|
40
|
-
};
|
|
41
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
42
|
-
if (k2 === undefined) k2 = k;
|
|
43
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
44
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
45
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
46
|
-
}
|
|
47
|
-
Object.defineProperty(o, k2, desc);
|
|
48
|
-
}) : (function(o, m, k, k2) {
|
|
49
|
-
if (k2 === undefined) k2 = k;
|
|
50
|
-
o[k2] = m[k];
|
|
51
|
-
}));
|
|
52
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
53
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
54
|
-
}) : function(o, v) {
|
|
55
|
-
o["default"] = v;
|
|
56
|
-
});
|
|
57
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
58
|
-
if (mod && mod.__esModule) return mod;
|
|
59
|
-
var result = {};
|
|
60
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
61
|
-
__setModuleDefault(result, mod);
|
|
62
|
-
return result;
|
|
63
|
-
};
|
|
64
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
65
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
66
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
67
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
68
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
69
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
70
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
74
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
75
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
76
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
77
|
-
function step(op) {
|
|
78
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
79
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
80
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
81
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
82
|
-
switch (op[0]) {
|
|
83
|
-
case 0: case 1: t = op; break;
|
|
84
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
85
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
86
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
87
|
-
default:
|
|
88
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
89
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
90
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
91
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
92
|
-
if (t[2]) _.ops.pop();
|
|
93
|
-
_.trys.pop(); continue;
|
|
94
|
-
}
|
|
95
|
-
op = body.call(thisArg, _);
|
|
96
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
97
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
101
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
102
|
-
};
|
|
103
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
104
|
-
exports.RequiredError = exports.BaseAPI = exports.resetRetry = exports.Environment = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
|
|
105
|
-
var configuration_1 = require("./configuration");
|
|
106
|
-
// Some imports not used depending on template conditions
|
|
107
|
-
// @ts-ignore
|
|
108
|
-
var axios_1 = __importDefault(require("axios"));
|
|
109
|
-
var fs = __importStar(require("fs"));
|
|
110
|
-
var path = __importStar(require("path"));
|
|
111
|
-
var os = __importStar(require("os"));
|
|
112
|
-
exports.BASE_PATH = "https://apiv2.emil.de".replace(/\/+$/, "");
|
|
113
|
-
var CONFIG_DIRECTORY = '.emil';
|
|
114
|
-
var CONFIG_FILENAME = 'credentials';
|
|
115
|
-
var KEY_USERNAME = 'emil_username';
|
|
116
|
-
var KEY_PASSWORD = 'emil_password';
|
|
117
|
-
var filePath = os.homedir() + path.sep + CONFIG_DIRECTORY + path.sep + CONFIG_FILENAME;
|
|
118
|
-
/**
|
|
119
|
-
*
|
|
120
|
-
* @export
|
|
121
|
-
*/
|
|
122
|
-
exports.COLLECTION_FORMATS = {
|
|
123
|
-
csv: ",",
|
|
124
|
-
ssv: " ",
|
|
125
|
-
tsv: "\t",
|
|
126
|
-
pipes: "|",
|
|
127
|
-
};
|
|
128
|
-
var Environment;
|
|
129
|
-
(function (Environment) {
|
|
130
|
-
Environment["Production"] = "https://apiv2.emil.de";
|
|
131
|
-
Environment["Test"] = "https://apiv2-test.emil.de";
|
|
132
|
-
Environment["Development"] = "https://apiv2-dev.emil.de";
|
|
133
|
-
Environment["ProductionZurich"] = "https://eu-central-2.apiv2.emil.de";
|
|
134
|
-
})(Environment = exports.Environment || (exports.Environment = {}));
|
|
135
|
-
var _retry_count = 0;
|
|
136
|
-
var _retry = null;
|
|
137
|
-
function resetRetry() {
|
|
138
|
-
_retry_count = 0;
|
|
139
|
-
}
|
|
140
|
-
exports.resetRetry = resetRetry;
|
|
141
|
-
var NETWORK_ERROR_MESSAGE = "Network Error";
|
|
142
|
-
/**
|
|
143
|
-
*
|
|
144
|
-
* @export
|
|
145
|
-
* @class BaseAPI
|
|
146
|
-
*/
|
|
147
|
-
var BaseAPI = /** @class */ (function () {
|
|
148
|
-
function BaseAPI(configuration, basePath, axios) {
|
|
149
|
-
if (basePath === void 0) { basePath = exports.BASE_PATH; }
|
|
150
|
-
if (axios === void 0) { axios = axios_1.default; }
|
|
151
|
-
this.basePath = basePath;
|
|
152
|
-
this.axios = axios;
|
|
153
|
-
if (configuration) {
|
|
154
|
-
this.configuration = configuration;
|
|
155
|
-
this.basePath = configuration.basePath || this.basePath;
|
|
156
|
-
}
|
|
157
|
-
else {
|
|
158
|
-
this.configuration = new configuration_1.Configuration({
|
|
159
|
-
basePath: this.basePath,
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
this.attachInterceptor(axios);
|
|
163
|
-
}
|
|
164
|
-
BaseAPI.prototype.initialize = function (env) {
|
|
165
|
-
if (env === void 0) { env = Environment.Production; }
|
|
166
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
167
|
-
return __generator(this, function (_a) {
|
|
168
|
-
switch (_a.label) {
|
|
169
|
-
case 0:
|
|
170
|
-
this.configuration.basePath = env;
|
|
171
|
-
return [4 /*yield*/, this.loadCredentials()];
|
|
172
|
-
case 1:
|
|
173
|
-
_a.sent();
|
|
174
|
-
if (!this.username) return [3 /*break*/, 3];
|
|
175
|
-
return [4 /*yield*/, this.authorize(this.username, this.password)];
|
|
176
|
-
case 2:
|
|
177
|
-
_a.sent();
|
|
178
|
-
this.password = null; // to avoid keeping password loaded in memory.
|
|
179
|
-
_a.label = 3;
|
|
180
|
-
case 3: return [2 /*return*/];
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
});
|
|
184
|
-
};
|
|
185
|
-
BaseAPI.prototype.loadCredentials = function () {
|
|
186
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
187
|
-
var error_1;
|
|
188
|
-
return __generator(this, function (_a) {
|
|
189
|
-
switch (_a.label) {
|
|
190
|
-
case 0:
|
|
191
|
-
_a.trys.push([0, 2, , 3]);
|
|
192
|
-
return [4 /*yield*/, this.readConfigFile()];
|
|
193
|
-
case 1:
|
|
194
|
-
_a.sent();
|
|
195
|
-
return [3 /*break*/, 3];
|
|
196
|
-
case 2:
|
|
197
|
-
error_1 = _a.sent();
|
|
198
|
-
console.warn("No credentials file found. Check that ".concat(filePath, " exists."));
|
|
199
|
-
return [3 /*break*/, 3];
|
|
200
|
-
case 3:
|
|
201
|
-
this.readEnvVariables();
|
|
202
|
-
if (!this.username) {
|
|
203
|
-
console.info("No credentials found in credentials file or environment variables. Either provide some or use \n authorize() function.");
|
|
204
|
-
}
|
|
205
|
-
return [2 /*return*/];
|
|
206
|
-
}
|
|
207
|
-
});
|
|
208
|
-
});
|
|
209
|
-
};
|
|
210
|
-
BaseAPI.prototype.readConfigFile = function () {
|
|
211
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
212
|
-
var file, lines;
|
|
213
|
-
var _this = this;
|
|
214
|
-
return __generator(this, function (_a) {
|
|
215
|
-
switch (_a.label) {
|
|
216
|
-
case 0: return [4 /*yield*/, fs.promises.readFile(filePath, 'utf-8')];
|
|
217
|
-
case 1:
|
|
218
|
-
file = _a.sent();
|
|
219
|
-
lines = file.split(os.EOL)
|
|
220
|
-
.filter(Boolean);
|
|
221
|
-
lines.forEach(function (line) {
|
|
222
|
-
if (line.startsWith(KEY_USERNAME)) {
|
|
223
|
-
_this.username = line.length > KEY_USERNAME.length + 1 ? line.substring(KEY_USERNAME.length + 1) : '';
|
|
224
|
-
}
|
|
225
|
-
else if (line.startsWith(KEY_PASSWORD)) {
|
|
226
|
-
_this.password = line.length > KEY_PASSWORD.length + 1 ? line.substring(KEY_PASSWORD.length + 1) : '';
|
|
227
|
-
}
|
|
228
|
-
});
|
|
229
|
-
return [2 /*return*/];
|
|
230
|
-
}
|
|
231
|
-
});
|
|
232
|
-
});
|
|
233
|
-
};
|
|
234
|
-
BaseAPI.prototype.readEnvVariables = function () {
|
|
235
|
-
if (process.env.EMIL_USERNAME) {
|
|
236
|
-
this.username = process.env.EMIL_USERNAME;
|
|
237
|
-
this.password = process.env.EMIL_PASSWORD || '';
|
|
238
|
-
return true;
|
|
239
|
-
}
|
|
240
|
-
return false;
|
|
241
|
-
};
|
|
242
|
-
BaseAPI.prototype.selectEnvironment = function (env) {
|
|
243
|
-
this.configuration.basePath = env;
|
|
244
|
-
};
|
|
245
|
-
BaseAPI.prototype.authorize = function (username, password) {
|
|
246
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
247
|
-
var options, response, accessToken, refreshToken;
|
|
248
|
-
return __generator(this, function (_a) {
|
|
249
|
-
switch (_a.label) {
|
|
250
|
-
case 0:
|
|
251
|
-
options = {
|
|
252
|
-
method: 'POST',
|
|
253
|
-
url: "".concat(this.configuration.basePath, "/authservice/v1/login"),
|
|
254
|
-
headers: { 'Content-Type': 'application/json' },
|
|
255
|
-
data: {
|
|
256
|
-
username: username,
|
|
257
|
-
password: password,
|
|
258
|
-
},
|
|
259
|
-
withCredentials: true,
|
|
260
|
-
};
|
|
261
|
-
return [4 /*yield*/, axios_1.default.request(options)];
|
|
262
|
-
case 1:
|
|
263
|
-
response = _a.sent();
|
|
264
|
-
accessToken = response.data.accessToken;
|
|
265
|
-
this.configuration.username = username;
|
|
266
|
-
this.configuration.accessToken = "Bearer ".concat(accessToken);
|
|
267
|
-
refreshToken = this.extractRefreshToken(response);
|
|
268
|
-
this.configuration.refreshToken = refreshToken;
|
|
269
|
-
return [2 /*return*/];
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
});
|
|
273
|
-
};
|
|
274
|
-
BaseAPI.prototype.refreshTokenInternal = function () {
|
|
275
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
276
|
-
var _a, username, refreshToken, options, accessToken;
|
|
277
|
-
return __generator(this, function (_b) {
|
|
278
|
-
switch (_b.label) {
|
|
279
|
-
case 0:
|
|
280
|
-
_a = this.configuration, username = _a.username, refreshToken = _a.refreshToken;
|
|
281
|
-
if (!username || !refreshToken) {
|
|
282
|
-
return [2 /*return*/, ''];
|
|
283
|
-
}
|
|
284
|
-
options = {
|
|
285
|
-
method: 'POST',
|
|
286
|
-
url: "".concat(this.configuration.basePath, "/authservice/v1/refresh-token"),
|
|
287
|
-
headers: {
|
|
288
|
-
'Content-Type': 'application/json',
|
|
289
|
-
Cookie: refreshToken,
|
|
290
|
-
},
|
|
291
|
-
data: { username: username },
|
|
292
|
-
withCredentials: true,
|
|
293
|
-
};
|
|
294
|
-
return [4 /*yield*/, axios_1.default.request(options)];
|
|
295
|
-
case 1:
|
|
296
|
-
accessToken = (_b.sent()).data.accessToken;
|
|
297
|
-
return [2 /*return*/, accessToken];
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
});
|
|
301
|
-
};
|
|
302
|
-
BaseAPI.prototype.extractRefreshToken = function (response) {
|
|
303
|
-
if (response.headers && response.headers['set-cookie']
|
|
304
|
-
&& response.headers['set-cookie'].length > 0) {
|
|
305
|
-
return "".concat(response.headers['set-cookie'][0].split(';')[0], ";");
|
|
306
|
-
}
|
|
307
|
-
return '';
|
|
308
|
-
};
|
|
309
|
-
BaseAPI.prototype.getConfiguration = function () {
|
|
310
|
-
return this.configuration;
|
|
311
|
-
};
|
|
312
|
-
BaseAPI.prototype.attachInterceptor = function (axios) {
|
|
313
|
-
var _this = this;
|
|
314
|
-
axios.interceptors.response.use(function (res) {
|
|
315
|
-
return res;
|
|
316
|
-
}, function (err) { return __awaiter(_this, void 0, void 0, function () {
|
|
317
|
-
var originalConfig, tokenString, accessToken, _error_1, tokenString, accessToken, _error_2;
|
|
318
|
-
return __generator(this, function (_a) {
|
|
319
|
-
switch (_a.label) {
|
|
320
|
-
case 0:
|
|
321
|
-
originalConfig = err.config;
|
|
322
|
-
if (!err.response) return [3 /*break*/, 5];
|
|
323
|
-
if (!(err.response.status === 401 && !originalConfig._retry)) return [3 /*break*/, 4];
|
|
324
|
-
originalConfig._retry = true;
|
|
325
|
-
_a.label = 1;
|
|
326
|
-
case 1:
|
|
327
|
-
_a.trys.push([1, 3, , 4]);
|
|
328
|
-
return [4 /*yield*/, this.refreshTokenInternal()];
|
|
329
|
-
case 2:
|
|
330
|
-
tokenString = _a.sent();
|
|
331
|
-
accessToken = "Bearer ".concat(tokenString);
|
|
332
|
-
originalConfig.headers['Authorization'] = "Bearer ".concat(accessToken);
|
|
333
|
-
this.configuration.accessToken = accessToken;
|
|
334
|
-
return [2 /*return*/, axios.request(originalConfig)];
|
|
335
|
-
case 3:
|
|
336
|
-
_error_1 = _a.sent();
|
|
337
|
-
if (_error_1.response && _error_1.response.data) {
|
|
338
|
-
return [2 /*return*/, Promise.reject(_error_1.response.data)];
|
|
339
|
-
}
|
|
340
|
-
return [2 /*return*/, Promise.reject(_error_1)];
|
|
341
|
-
case 4:
|
|
342
|
-
if (err.response.status === 403 && err.response.data) {
|
|
343
|
-
return [2 /*return*/, Promise.reject(err.response.data)];
|
|
344
|
-
}
|
|
345
|
-
return [3 /*break*/, 9];
|
|
346
|
-
case 5:
|
|
347
|
-
if (!(err.message === NETWORK_ERROR_MESSAGE
|
|
348
|
-
&& err.isAxiosError
|
|
349
|
-
&& originalConfig.headers.hasOwnProperty('Authorization')
|
|
350
|
-
&& _retry_count < 4)) return [3 /*break*/, 9];
|
|
351
|
-
_retry_count++;
|
|
352
|
-
_a.label = 6;
|
|
353
|
-
case 6:
|
|
354
|
-
_a.trys.push([6, 8, , 9]);
|
|
355
|
-
return [4 /*yield*/, this.refreshTokenInternal()];
|
|
356
|
-
case 7:
|
|
357
|
-
tokenString = _a.sent();
|
|
358
|
-
accessToken = "Bearer ".concat(tokenString);
|
|
359
|
-
_retry = true;
|
|
360
|
-
originalConfig.headers['Authorization'] = accessToken;
|
|
361
|
-
this.configuration.accessToken = accessToken;
|
|
362
|
-
return [2 /*return*/, axios.request(__assign({}, originalConfig))];
|
|
363
|
-
case 8:
|
|
364
|
-
_error_2 = _a.sent();
|
|
365
|
-
if (_error_2.response && _error_2.response.data) {
|
|
366
|
-
return [2 /*return*/, Promise.reject(_error_2.response.data)];
|
|
367
|
-
}
|
|
368
|
-
return [2 /*return*/, Promise.reject(_error_2)];
|
|
369
|
-
case 9: return [2 /*return*/, Promise.reject(err)];
|
|
370
|
-
}
|
|
371
|
-
});
|
|
372
|
-
}); });
|
|
373
|
-
};
|
|
374
|
-
return BaseAPI;
|
|
375
|
-
}());
|
|
376
|
-
exports.BaseAPI = BaseAPI;
|
|
377
|
-
;
|
|
378
|
-
/**
|
|
379
|
-
*
|
|
380
|
-
* @export
|
|
381
|
-
* @class RequiredError
|
|
382
|
-
* @extends {Error}
|
|
383
|
-
*/
|
|
384
|
-
var RequiredError = /** @class */ (function (_super) {
|
|
385
|
-
__extends(RequiredError, _super);
|
|
386
|
-
function RequiredError(field, msg) {
|
|
387
|
-
var _this = _super.call(this, msg) || this;
|
|
388
|
-
_this.field = field;
|
|
389
|
-
_this.name = "RequiredError";
|
|
390
|
-
return _this;
|
|
391
|
-
}
|
|
392
|
-
return RequiredError;
|
|
393
|
-
}(Error));
|
|
394
|
-
exports.RequiredError = RequiredError;
|
package/dist/common.d.ts
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* EMIL InsuranceService
|
|
3
|
-
* The EMIL InsuranceService API description
|
|
4
|
-
*
|
|
5
|
-
* The version of the OpenAPI document: 1.0
|
|
6
|
-
* Contact: kontakt@emil.de
|
|
7
|
-
*
|
|
8
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
-
* https://openapi-generator.tech
|
|
10
|
-
* Do not edit the class manually.
|
|
11
|
-
*/
|
|
12
|
-
import { Configuration } from "./configuration";
|
|
13
|
-
import { RequestArgs } from "./base";
|
|
14
|
-
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
15
|
-
import { URL } from 'url';
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
*/
|
|
20
|
-
export declare const DUMMY_BASE_URL = "https://example.com";
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
* @throws {RequiredError}
|
|
24
|
-
* @export
|
|
25
|
-
*/
|
|
26
|
-
export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
|
|
27
|
-
/**
|
|
28
|
-
*
|
|
29
|
-
* @export
|
|
30
|
-
*/
|
|
31
|
-
export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
|
|
32
|
-
/**
|
|
33
|
-
*
|
|
34
|
-
* @export
|
|
35
|
-
*/
|
|
36
|
-
export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
|
|
37
|
-
/**
|
|
38
|
-
*
|
|
39
|
-
* @export
|
|
40
|
-
*/
|
|
41
|
-
export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
|
|
42
|
-
/**
|
|
43
|
-
*
|
|
44
|
-
* @export
|
|
45
|
-
*/
|
|
46
|
-
export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
|
|
47
|
-
/**
|
|
48
|
-
*
|
|
49
|
-
* @export
|
|
50
|
-
*/
|
|
51
|
-
export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
|
|
52
|
-
/**
|
|
53
|
-
*
|
|
54
|
-
* @export
|
|
55
|
-
*/
|
|
56
|
-
export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
|
|
57
|
-
/**
|
|
58
|
-
*
|
|
59
|
-
* @export
|
|
60
|
-
*/
|
|
61
|
-
export declare const toPathString: (url: URL) => string;
|
|
62
|
-
/**
|
|
63
|
-
*
|
|
64
|
-
* @export
|
|
65
|
-
*/
|
|
66
|
-
export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
|
|
67
|
-
/**
|
|
68
|
-
* EMIL InsuranceService
|
|
69
|
-
* The EMIL InsuranceService API description
|
|
70
|
-
*
|
|
71
|
-
* The version of the OpenAPI document: 1.0
|
|
72
|
-
* Contact: kontakt@emil.de
|
|
73
|
-
*
|
|
74
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
75
|
-
* https://openapi-generator.tech
|
|
76
|
-
* Do not edit the class manually.
|
|
77
|
-
*/
|
|
78
|
-
export interface IStorageConverter<D, SD> {
|
|
79
|
-
toStorageData(data: D): SD;
|
|
80
|
-
fromStorageData(storageData: SD): D;
|
|
81
|
-
}
|
|
82
|
-
export interface IStorage {
|
|
83
|
-
get<T>(key: string, converter?: IStorageConverter<T, any>): T | null;
|
|
84
|
-
set<T>(key: string, value: T, converter?: IStorageConverter<T, any>): void;
|
|
85
|
-
}
|
|
86
|
-
export declare class LocalStorage implements IStorage {
|
|
87
|
-
readonly storage: Storage;
|
|
88
|
-
constructor();
|
|
89
|
-
get<T>(key: string, converter?: IStorageConverter<T, any>): T | null;
|
|
90
|
-
set<T>(key: string, value: T, converter?: IStorageConverter<T, any>): void;
|
|
91
|
-
}
|
|
92
|
-
export declare const defaultStorage: () => IStorage;
|