@emilgroup/insurance-sdk-node 1.104.1-beta.11 → 1.104.1-beta.110

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.
Files changed (103) hide show
  1. package/.openapi-generator/FILES +5 -2
  2. package/README.md +2 -2
  3. package/api/booking-funnel-versions-api.ts +8 -4
  4. package/api/booking-funnels-api.ts +24 -12
  5. package/api/commission-agreement-items-api.ts +20 -10
  6. package/api/commission-agreement-products-api.ts +20 -10
  7. package/api/commission-agreement-versions-api.ts +16 -8
  8. package/api/commission-agreements-api.ts +20 -10
  9. package/api/commission-recipients-api.ts +20 -10
  10. package/api/emil-functions-api.ts +44 -22
  11. package/api/health-check-api.ts +6 -10
  12. package/api/insured-object-types-api.ts +4 -2
  13. package/api/insured-objects-api.ts +16 -8
  14. package/api/lead-statuses-api.ts +20 -10
  15. package/api/lead-versions-api.ts +8 -4
  16. package/api/leads-api.ts +44 -24
  17. package/api/named-ranges-api.ts +24 -12
  18. package/api/partner-links-api.ts +24 -12
  19. package/api/partner-roles-api.ts +20 -10
  20. package/api/policies-api.ts +100 -66
  21. package/api/premium-calculation-api.ts +171 -0
  22. package/api/premium-formulas-api.ts +24 -12
  23. package/api/product-configs-api.ts +24 -12
  24. package/api/product-factors-api.ts +28 -14
  25. package/api/product-fields-api.ts +28 -14
  26. package/api/product-versions-api.ts +8 -4
  27. package/api/products-api.ts +24 -12
  28. package/api/status-transition-rules-api.ts +24 -12
  29. package/api.ts +2 -0
  30. package/dist/api/booking-funnel-versions-api.js +11 -7
  31. package/dist/api/booking-funnels-api.js +39 -23
  32. package/dist/api/commission-agreement-items-api.js +29 -18
  33. package/dist/api/commission-agreement-products-api.js +29 -18
  34. package/dist/api/commission-agreement-versions-api.js +22 -14
  35. package/dist/api/commission-agreements-api.js +29 -18
  36. package/dist/api/commission-recipients-api.js +32 -19
  37. package/dist/api/emil-functions-api.js +74 -43
  38. package/dist/api/health-check-api.d.ts +7 -8
  39. package/dist/api/health-check-api.js +4 -4
  40. package/dist/api/insured-object-types-api.js +4 -3
  41. package/dist/api/insured-objects-api.js +22 -14
  42. package/dist/api/lead-statuses-api.js +32 -19
  43. package/dist/api/lead-versions-api.js +11 -7
  44. package/dist/api/leads-api.d.ts +4 -4
  45. package/dist/api/leads-api.js +67 -41
  46. package/dist/api/named-ranges-api.js +36 -22
  47. package/dist/api/partner-links-api.js +36 -22
  48. package/dist/api/partner-roles-api.js +32 -19
  49. package/dist/api/policies-api.d.ts +32 -32
  50. package/dist/api/policies-api.js +129 -90
  51. package/dist/api/premium-calculation-api.d.ts +97 -0
  52. package/dist/api/premium-calculation-api.js +231 -0
  53. package/dist/api/premium-formulas-api.js +39 -23
  54. package/dist/api/product-configs-api.js +39 -23
  55. package/dist/api/product-factors-api.js +37 -24
  56. package/dist/api/product-fields-api.js +43 -26
  57. package/dist/api/product-versions-api.js +11 -7
  58. package/dist/api/products-api.js +33 -21
  59. package/dist/api/status-transition-rules-api.js +36 -22
  60. package/dist/api.d.ts +1 -0
  61. package/dist/api.js +1 -0
  62. package/dist/models/calculate-premium-response-class.d.ts +39 -0
  63. package/dist/models/calculated-policy-objects-class.d.ts +25 -0
  64. package/dist/models/claim-config-class.d.ts +7 -0
  65. package/dist/models/create-draft-policy-request-dto.d.ts +1 -1
  66. package/dist/models/create-premium-formula-request-dto.d.ts +6 -0
  67. package/dist/models/create-product-request-dto.d.ts +12 -0
  68. package/dist/models/create-product-version-request-dto.d.ts +6 -0
  69. package/dist/models/get-draft-policy-request-dto.d.ts +1 -1
  70. package/dist/models/index.d.ts +4 -2
  71. package/dist/models/index.js +4 -2
  72. package/dist/models/partner-class.d.ts +6 -0
  73. package/dist/models/patch-draft-policy-request-dto.d.ts +2 -2
  74. package/dist/models/policy-object-dto.d.ts +1 -1
  75. package/dist/models/policy-premium-item-class.d.ts +1 -1
  76. package/dist/models/premium-formula-class.d.ts +6 -0
  77. package/dist/models/regulation-subtype-class.d.ts +30 -0
  78. package/dist/models/regulation-subtype-class.js +15 -0
  79. package/dist/models/regulation-subtypes-class.d.ts +37 -0
  80. package/dist/models/regulation-subtypes-class.js +15 -0
  81. package/models/calculate-premium-response-class.ts +45 -0
  82. package/models/calculated-policy-objects-class.ts +31 -0
  83. package/models/claim-config-class.ts +7 -0
  84. package/models/create-draft-policy-request-dto.ts +1 -1
  85. package/models/create-premium-formula-request-dto.ts +6 -0
  86. package/models/create-product-request-dto.ts +12 -0
  87. package/models/create-product-version-request-dto.ts +6 -0
  88. package/models/get-draft-policy-request-dto.ts +1 -1
  89. package/models/index.ts +4 -2
  90. package/models/partner-class.ts +6 -0
  91. package/models/patch-draft-policy-request-dto.ts +2 -2
  92. package/models/policy-object-dto.ts +1 -1
  93. package/models/policy-premium-item-class.ts +1 -1
  94. package/models/premium-formula-class.ts +6 -0
  95. package/models/regulation-subtype-class.ts +36 -0
  96. package/models/regulation-subtypes-class.ts +43 -0
  97. package/package.json +1 -1
  98. package/dist/models/inline-response200.d.ts +0 -54
  99. package/dist/models/inline-response503.d.ts +0 -54
  100. package/models/inline-response200.ts +0 -48
  101. package/models/inline-response503.ts +0 -48
  102. /package/dist/models/{inline-response200.js → calculate-premium-response-class.js} +0 -0
  103. /package/dist/models/{inline-response503.js → calculated-policy-objects-class.js} +0 -0
@@ -0,0 +1,97 @@
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 { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
13
+ import { Configuration } from '../configuration';
14
+ import { RequestArgs, BaseAPI } from '../base';
15
+ import { CalculatePremiumRequestDto } from '../models';
16
+ import { CalculatePremiumResponseClass } from '../models';
17
+ /**
18
+ * PremiumCalculationApi - axios parameter creator
19
+ * @export
20
+ */
21
+ export declare const PremiumCalculationApiAxiosParamCreator: (configuration?: Configuration) => {
22
+ /**
23
+ * Calculates the premium for a set of policy objects under a given product version, without creating or persisting a policy. Use this to quote a premium ahead of policy/lead creation. An optional premiumOverride can be supplied to calculate against manually overridden premium values instead of the product\'s own rating. **Required Permissions** \"policy-management.policies.view\"
24
+ * @summary Calculate premium
25
+ * @param {CalculatePremiumRequestDto} calculatePremiumRequestDto
26
+ * @param {string} [authorization] Bearer Token
27
+ * @param {*} [options] Override http request option.
28
+ * @throws {RequiredError}
29
+ */
30
+ calculatePremium: (calculatePremiumRequestDto: CalculatePremiumRequestDto, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
31
+ };
32
+ /**
33
+ * PremiumCalculationApi - functional programming interface
34
+ * @export
35
+ */
36
+ export declare const PremiumCalculationApiFp: (configuration?: Configuration) => {
37
+ /**
38
+ * Calculates the premium for a set of policy objects under a given product version, without creating or persisting a policy. Use this to quote a premium ahead of policy/lead creation. An optional premiumOverride can be supplied to calculate against manually overridden premium values instead of the product\'s own rating. **Required Permissions** \"policy-management.policies.view\"
39
+ * @summary Calculate premium
40
+ * @param {CalculatePremiumRequestDto} calculatePremiumRequestDto
41
+ * @param {string} [authorization] Bearer Token
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ calculatePremium(calculatePremiumRequestDto: CalculatePremiumRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CalculatePremiumResponseClass>>;
46
+ };
47
+ /**
48
+ * PremiumCalculationApi - factory interface
49
+ * @export
50
+ */
51
+ export declare const PremiumCalculationApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
52
+ /**
53
+ * Calculates the premium for a set of policy objects under a given product version, without creating or persisting a policy. Use this to quote a premium ahead of policy/lead creation. An optional premiumOverride can be supplied to calculate against manually overridden premium values instead of the product\'s own rating. **Required Permissions** \"policy-management.policies.view\"
54
+ * @summary Calculate premium
55
+ * @param {CalculatePremiumRequestDto} calculatePremiumRequestDto
56
+ * @param {string} [authorization] Bearer Token
57
+ * @param {*} [options] Override http request option.
58
+ * @throws {RequiredError}
59
+ */
60
+ calculatePremium(calculatePremiumRequestDto: CalculatePremiumRequestDto, authorization?: string, options?: any): AxiosPromise<CalculatePremiumResponseClass>;
61
+ };
62
+ /**
63
+ * Request parameters for calculatePremium operation in PremiumCalculationApi.
64
+ * @export
65
+ * @interface PremiumCalculationApiCalculatePremiumRequest
66
+ */
67
+ export interface PremiumCalculationApiCalculatePremiumRequest {
68
+ /**
69
+ *
70
+ * @type {CalculatePremiumRequestDto}
71
+ * @memberof PremiumCalculationApiCalculatePremium
72
+ */
73
+ readonly calculatePremiumRequestDto: CalculatePremiumRequestDto;
74
+ /**
75
+ * Bearer Token
76
+ * @type {string}
77
+ * @memberof PremiumCalculationApiCalculatePremium
78
+ */
79
+ readonly authorization?: string;
80
+ }
81
+ /**
82
+ * PremiumCalculationApi - object-oriented interface
83
+ * @export
84
+ * @class PremiumCalculationApi
85
+ * @extends {BaseAPI}
86
+ */
87
+ export declare class PremiumCalculationApi extends BaseAPI {
88
+ /**
89
+ * Calculates the premium for a set of policy objects under a given product version, without creating or persisting a policy. Use this to quote a premium ahead of policy/lead creation. An optional premiumOverride can be supplied to calculate against manually overridden premium values instead of the product\'s own rating. **Required Permissions** \"policy-management.policies.view\"
90
+ * @summary Calculate premium
91
+ * @param {PremiumCalculationApiCalculatePremiumRequest} requestParameters Request parameters.
92
+ * @param {*} [options] Override http request option.
93
+ * @throws {RequiredError}
94
+ * @memberof PremiumCalculationApi
95
+ */
96
+ calculatePremium(requestParameters: PremiumCalculationApiCalculatePremiumRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CalculatePremiumResponseClass, any, {}>>;
97
+ }
@@ -0,0 +1,231 @@
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 __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ 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;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ var __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.PremiumCalculationApi = exports.PremiumCalculationApiFactory = exports.PremiumCalculationApiFp = exports.PremiumCalculationApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ // URLSearchParams not necessarily used
89
+ // @ts-ignore
90
+ var url_1 = require("url");
91
+ var FormData = require('form-data');
92
+ /**
93
+ * PremiumCalculationApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var PremiumCalculationApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * Calculates the premium for a set of policy objects under a given product version, without creating or persisting a policy. Use this to quote a premium ahead of policy/lead creation. An optional premiumOverride can be supplied to calculate against manually overridden premium values instead of the product\'s own rating. **Required Permissions** \"policy-management.policies.view\"
101
+ * @summary Calculate premium
102
+ * @param {CalculatePremiumRequestDto} calculatePremiumRequestDto
103
+ * @param {string} [authorization] Bearer Token
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ */
107
+ calculatePremium: function (calculatePremiumRequestDto, authorization, options) {
108
+ if (options === void 0) { options = {}; }
109
+ return __awaiter(_this, void 0, void 0, function () {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
113
+ case 0:
114
+ // verify required parameter 'calculatePremiumRequestDto' is not null or undefined
115
+ (0, common_1.assertParamExists)('calculatePremium', 'calculatePremiumRequestDto', calculatePremiumRequestDto);
116
+ localVarPath = "/insuranceservice/v1/calculate-premium";
117
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
118
+ if (configuration) {
119
+ baseOptions = configuration.baseOptions;
120
+ baseAccessToken = configuration.accessToken;
121
+ }
122
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
123
+ localVarHeaderParameter = {};
124
+ localVarQueryParameter = {};
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
128
+ // Only Authorization falls back to the configured token; an empty value is never sent.
129
+ ];
130
+ case 1:
131
+ // authentication bearer required
132
+ // http bearer authentication required
133
+ _a.sent();
134
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
135
+ if (authorizationValue) {
136
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
137
+ }
138
+ localVarHeaderParameter['Content-Type'] = 'application/json';
139
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
140
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
141
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
142
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(calculatePremiumRequestDto, localVarRequestOptions, configuration);
143
+ return [2 /*return*/, {
144
+ url: (0, common_1.toPathString)(localVarUrlObj),
145
+ options: localVarRequestOptions,
146
+ }];
147
+ }
148
+ });
149
+ });
150
+ },
151
+ };
152
+ };
153
+ exports.PremiumCalculationApiAxiosParamCreator = PremiumCalculationApiAxiosParamCreator;
154
+ /**
155
+ * PremiumCalculationApi - functional programming interface
156
+ * @export
157
+ */
158
+ var PremiumCalculationApiFp = function (configuration) {
159
+ var localVarAxiosParamCreator = (0, exports.PremiumCalculationApiAxiosParamCreator)(configuration);
160
+ return {
161
+ /**
162
+ * Calculates the premium for a set of policy objects under a given product version, without creating or persisting a policy. Use this to quote a premium ahead of policy/lead creation. An optional premiumOverride can be supplied to calculate against manually overridden premium values instead of the product\'s own rating. **Required Permissions** \"policy-management.policies.view\"
163
+ * @summary Calculate premium
164
+ * @param {CalculatePremiumRequestDto} calculatePremiumRequestDto
165
+ * @param {string} [authorization] Bearer Token
166
+ * @param {*} [options] Override http request option.
167
+ * @throws {RequiredError}
168
+ */
169
+ calculatePremium: function (calculatePremiumRequestDto, authorization, options) {
170
+ return __awaiter(this, void 0, void 0, function () {
171
+ var localVarAxiosArgs;
172
+ return __generator(this, function (_a) {
173
+ switch (_a.label) {
174
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.calculatePremium(calculatePremiumRequestDto, authorization, options)];
175
+ case 1:
176
+ localVarAxiosArgs = _a.sent();
177
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
178
+ }
179
+ });
180
+ });
181
+ },
182
+ };
183
+ };
184
+ exports.PremiumCalculationApiFp = PremiumCalculationApiFp;
185
+ /**
186
+ * PremiumCalculationApi - factory interface
187
+ * @export
188
+ */
189
+ var PremiumCalculationApiFactory = function (configuration, basePath, axios) {
190
+ var localVarFp = (0, exports.PremiumCalculationApiFp)(configuration);
191
+ return {
192
+ /**
193
+ * Calculates the premium for a set of policy objects under a given product version, without creating or persisting a policy. Use this to quote a premium ahead of policy/lead creation. An optional premiumOverride can be supplied to calculate against manually overridden premium values instead of the product\'s own rating. **Required Permissions** \"policy-management.policies.view\"
194
+ * @summary Calculate premium
195
+ * @param {CalculatePremiumRequestDto} calculatePremiumRequestDto
196
+ * @param {string} [authorization] Bearer Token
197
+ * @param {*} [options] Override http request option.
198
+ * @throws {RequiredError}
199
+ */
200
+ calculatePremium: function (calculatePremiumRequestDto, authorization, options) {
201
+ return localVarFp.calculatePremium(calculatePremiumRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
202
+ },
203
+ };
204
+ };
205
+ exports.PremiumCalculationApiFactory = PremiumCalculationApiFactory;
206
+ /**
207
+ * PremiumCalculationApi - object-oriented interface
208
+ * @export
209
+ * @class PremiumCalculationApi
210
+ * @extends {BaseAPI}
211
+ */
212
+ var PremiumCalculationApi = /** @class */ (function (_super) {
213
+ __extends(PremiumCalculationApi, _super);
214
+ function PremiumCalculationApi() {
215
+ return _super !== null && _super.apply(this, arguments) || this;
216
+ }
217
+ /**
218
+ * Calculates the premium for a set of policy objects under a given product version, without creating or persisting a policy. Use this to quote a premium ahead of policy/lead creation. An optional premiumOverride can be supplied to calculate against manually overridden premium values instead of the product\'s own rating. **Required Permissions** \"policy-management.policies.view\"
219
+ * @summary Calculate premium
220
+ * @param {PremiumCalculationApiCalculatePremiumRequest} requestParameters Request parameters.
221
+ * @param {*} [options] Override http request option.
222
+ * @throws {RequiredError}
223
+ * @memberof PremiumCalculationApi
224
+ */
225
+ PremiumCalculationApi.prototype.calculatePremium = function (requestParameters, options) {
226
+ var _this = this;
227
+ return (0, exports.PremiumCalculationApiFp)(this.configuration).calculatePremium(requestParameters.calculatePremiumRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
228
+ };
229
+ return PremiumCalculationApi;
230
+ }(base_1.BaseAPI));
231
+ exports.PremiumCalculationApi = PremiumCalculationApi;
@@ -107,7 +107,7 @@ var PremiumFormulasApiAxiosParamCreator = function (configuration) {
107
107
  createPremiumFormula: function (createPremiumFormulaRequestDto, authorization, options) {
108
108
  if (options === void 0) { options = {}; }
109
109
  return __awaiter(_this, void 0, void 0, function () {
110
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
111
111
  return __generator(this, function (_a) {
112
112
  switch (_a.label) {
113
113
  case 0:
@@ -124,13 +124,16 @@ var PremiumFormulasApiAxiosParamCreator = function (configuration) {
124
124
  localVarQueryParameter = {};
125
125
  // authentication bearer required
126
126
  // http bearer authentication required
127
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
128
+ // Only Authorization falls back to the configured token; an empty value is never sent.
129
+ ];
128
130
  case 1:
129
131
  // authentication bearer required
130
132
  // http bearer authentication required
131
133
  _a.sent();
132
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
134
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
135
+ if (authorizationValue) {
136
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
134
137
  }
135
138
  localVarHeaderParameter['Content-Type'] = 'application/json';
136
139
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -156,7 +159,7 @@ var PremiumFormulasApiAxiosParamCreator = function (configuration) {
156
159
  deletePremiumFormula: function (id, authorization, options) {
157
160
  if (options === void 0) { options = {}; }
158
161
  return __awaiter(_this, void 0, void 0, function () {
159
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
162
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
160
163
  return __generator(this, function (_a) {
161
164
  switch (_a.label) {
162
165
  case 0:
@@ -174,13 +177,16 @@ var PremiumFormulasApiAxiosParamCreator = function (configuration) {
174
177
  localVarQueryParameter = {};
175
178
  // authentication bearer required
176
179
  // http bearer authentication required
177
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
180
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
181
+ // Only Authorization falls back to the configured token; an empty value is never sent.
182
+ ];
178
183
  case 1:
179
184
  // authentication bearer required
180
185
  // http bearer authentication required
181
186
  _a.sent();
182
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
183
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
187
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
188
+ if (authorizationValue) {
189
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
184
190
  }
185
191
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
192
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -204,7 +210,7 @@ var PremiumFormulasApiAxiosParamCreator = function (configuration) {
204
210
  getPremiumFormula: function (id, authorization, options) {
205
211
  if (options === void 0) { options = {}; }
206
212
  return __awaiter(_this, void 0, void 0, function () {
207
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
213
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
208
214
  return __generator(this, function (_a) {
209
215
  switch (_a.label) {
210
216
  case 0:
@@ -222,13 +228,16 @@ var PremiumFormulasApiAxiosParamCreator = function (configuration) {
222
228
  localVarQueryParameter = {};
223
229
  // authentication bearer required
224
230
  // http bearer authentication required
225
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
231
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
232
+ // Only Authorization falls back to the configured token; an empty value is never sent.
233
+ ];
226
234
  case 1:
227
235
  // authentication bearer required
228
236
  // http bearer authentication required
229
237
  _a.sent();
230
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
231
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
238
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
239
+ if (authorizationValue) {
240
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
232
241
  }
233
242
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
234
243
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -258,7 +267,7 @@ var PremiumFormulasApiAxiosParamCreator = function (configuration) {
258
267
  listPremiumFormulas: function (authorization, pageSize, pageToken, filter, search, order, expand, filters, options) {
259
268
  if (options === void 0) { options = {}; }
260
269
  return __awaiter(_this, void 0, void 0, function () {
261
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
270
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
262
271
  return __generator(this, function (_a) {
263
272
  switch (_a.label) {
264
273
  case 0:
@@ -299,8 +308,9 @@ var PremiumFormulasApiAxiosParamCreator = function (configuration) {
299
308
  if (filters !== undefined) {
300
309
  localVarQueryParameter['filters'] = filters;
301
310
  }
302
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
303
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
311
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
312
+ if (authorizationValue) {
313
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
304
314
  }
305
315
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
306
316
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
@@ -324,7 +334,7 @@ var PremiumFormulasApiAxiosParamCreator = function (configuration) {
324
334
  swapPremiumFormulasOrder: function (swapPremiumFormulasOrderRequestDto, authorization, options) {
325
335
  if (options === void 0) { options = {}; }
326
336
  return __awaiter(_this, void 0, void 0, function () {
327
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
337
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
328
338
  return __generator(this, function (_a) {
329
339
  switch (_a.label) {
330
340
  case 0:
@@ -341,13 +351,16 @@ var PremiumFormulasApiAxiosParamCreator = function (configuration) {
341
351
  localVarQueryParameter = {};
342
352
  // authentication bearer required
343
353
  // http bearer authentication required
344
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
354
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
355
+ // Only Authorization falls back to the configured token; an empty value is never sent.
356
+ ];
345
357
  case 1:
346
358
  // authentication bearer required
347
359
  // http bearer authentication required
348
360
  _a.sent();
349
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
350
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
361
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
362
+ if (authorizationValue) {
363
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
351
364
  }
352
365
  localVarHeaderParameter['Content-Type'] = 'application/json';
353
366
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
@@ -374,7 +387,7 @@ var PremiumFormulasApiAxiosParamCreator = function (configuration) {
374
387
  updatePremiumFormula: function (id, updatePremiumFormulaRequestDto, authorization, options) {
375
388
  if (options === void 0) { options = {}; }
376
389
  return __awaiter(_this, void 0, void 0, function () {
377
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
390
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, authorizationValue, headersFromBaseOptions;
378
391
  return __generator(this, function (_a) {
379
392
  switch (_a.label) {
380
393
  case 0:
@@ -394,13 +407,16 @@ var PremiumFormulasApiAxiosParamCreator = function (configuration) {
394
407
  localVarQueryParameter = {};
395
408
  // authentication bearer required
396
409
  // http bearer authentication required
397
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
410
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)
411
+ // Only Authorization falls back to the configured token; an empty value is never sent.
412
+ ];
398
413
  case 1:
399
414
  // authentication bearer required
400
415
  // http bearer authentication required
401
416
  _a.sent();
402
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
403
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
417
+ authorizationValue = 'Authorization'.toLowerCase() === 'authorization' ? (authorization || baseAccessToken) : authorization;
418
+ if (authorizationValue) {
419
+ localVarHeaderParameter['Authorization'] = String(authorizationValue);
404
420
  }
405
421
  localVarHeaderParameter['Content-Type'] = 'application/json';
406
422
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);