@emilgroup/insurance-sdk 1.2.0 → 1.3.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 +10 -1
- package/README.md +11 -11
- package/api/policies-api.ts +223 -0
- package/api/products-api.ts +144 -8
- package/base.ts +91 -62
- package/configuration.ts +0 -8
- package/dist/api/policies-api.d.ts +122 -0
- package/dist/api/policies-api.js +191 -0
- package/dist/api/products-api.d.ts +82 -8
- package/dist/api/products-api.js +116 -8
- package/dist/base.d.ts +3 -2
- package/dist/base.js +82 -59
- package/dist/configuration.d.ts +0 -7
- package/dist/models/calculate-custom-premium-request-dto.d.ts +1 -0
- package/dist/models/calculate-custom-premium-request-dto.js +2 -1
- package/dist/models/calculate-premium-request-dto.d.ts +10 -3
- package/dist/models/create-account-request-dto.d.ts +6 -0
- package/dist/models/create-custom-application-request-dto.d.ts +1 -0
- package/dist/models/create-custom-application-request-dto.js +2 -1
- package/dist/models/create-dummy-policy-request-dto.d.ts +7 -0
- package/dist/models/create-lead-request-dto.d.ts +8 -1
- package/dist/models/create-policy-request-dto.d.ts +7 -0
- package/dist/models/create-product-field-request-dto.d.ts +6 -0
- package/dist/models/get-product-factors-for-version-request-dto.d.ts +36 -0
- package/dist/models/{grpc-create-policy-request-dto.js → get-product-factors-for-version-request-dto.js} +0 -0
- package/dist/models/get-product-factors-for-version-response-class.d.ts +25 -0
- package/dist/models/get-product-factors-for-version-response-class.js +15 -0
- package/dist/models/grpc-policy-object-dto.d.ts +30 -0
- package/dist/models/grpc-policy-object-dto.js +15 -0
- package/dist/models/grpc-update-policy-request-dto.d.ts +50 -0
- package/dist/models/grpc-update-policy-request-dto.js +15 -0
- package/dist/models/index.d.ts +10 -1
- package/dist/models/index.js +10 -1
- package/dist/models/policy-class.d.ts +6 -0
- package/dist/models/policy-premium-item-class.d.ts +6 -0
- package/dist/models/premium-override-dto.d.ts +53 -0
- package/dist/models/premium-override-dto.js +25 -0
- package/dist/models/premium-override-request-dto.d.ts +25 -0
- package/dist/models/premium-override-request-dto.js +15 -0
- package/dist/models/terminate-policy-request-dto.d.ts +24 -0
- package/dist/models/terminate-policy-request-dto.js +15 -0
- package/dist/models/terminate-policy-response-class.d.ts +25 -0
- package/dist/models/terminate-policy-response-class.js +15 -0
- package/dist/models/{grpc-create-policy-request-dto.d.ts → to-grpc-create-policy-request-dto.d.ts} +12 -5
- package/dist/models/to-grpc-create-policy-request-dto.js +15 -0
- package/dist/models/update-lead-request-dto.d.ts +7 -0
- package/dist/models/update-policy-request-dto.d.ts +7 -6
- package/dist/models/update-product-field-request-dto.d.ts +6 -0
- package/dist/models/withdraw-policy-response-class.d.ts +25 -0
- package/dist/models/withdraw-policy-response-class.js +15 -0
- package/models/calculate-custom-premium-request-dto.ts +2 -1
- package/models/calculate-premium-request-dto.ts +10 -3
- package/models/create-account-request-dto.ts +6 -0
- package/models/create-custom-application-request-dto.ts +2 -1
- package/models/create-dummy-policy-request-dto.ts +7 -0
- package/models/create-lead-request-dto.ts +8 -1
- package/models/create-policy-request-dto.ts +7 -0
- package/models/create-product-field-request-dto.ts +6 -0
- package/models/get-product-factors-for-version-request-dto.ts +42 -0
- package/models/get-product-factors-for-version-response-class.ts +31 -0
- package/models/grpc-policy-object-dto.ts +36 -0
- package/models/grpc-update-policy-request-dto.ts +56 -0
- package/models/index.ts +10 -1
- package/models/policy-class.ts +6 -0
- package/models/policy-premium-item-class.ts +6 -0
- package/models/premium-override-dto.ts +63 -0
- package/models/premium-override-request-dto.ts +31 -0
- package/models/terminate-policy-request-dto.ts +30 -0
- package/models/terminate-policy-response-class.ts +31 -0
- package/models/{grpc-create-policy-request-dto.ts → to-grpc-create-policy-request-dto.ts} +12 -5
- package/models/update-lead-request-dto.ts +7 -0
- package/models/update-policy-request-dto.ts +7 -6
- package/models/update-product-field-request-dto.ts +6 -0
- package/models/withdraw-policy-response-class.ts +31 -0
- package/package.json +3 -2
package/.openapi-generator/FILES
CHANGED
|
@@ -42,6 +42,8 @@ models/get-premium-formula-response-class.ts
|
|
|
42
42
|
models/get-product-factor-response-class.ts
|
|
43
43
|
models/get-product-factor-value-request-dto.ts
|
|
44
44
|
models/get-product-factor-value-response-class.ts
|
|
45
|
+
models/get-product-factors-for-version-request-dto.ts
|
|
46
|
+
models/get-product-factors-for-version-response-class.ts
|
|
45
47
|
models/get-product-field-request-dto.ts
|
|
46
48
|
models/get-product-field-response-class.ts
|
|
47
49
|
models/get-product-request-dto.ts
|
|
@@ -51,7 +53,8 @@ models/get-product-version-response-class.ts
|
|
|
51
53
|
models/grouped-product-factor-class.ts
|
|
52
54
|
models/grouped-product-factor-value-class.ts
|
|
53
55
|
models/grouped-product-factors-response-class.ts
|
|
54
|
-
models/grpc-
|
|
56
|
+
models/grpc-policy-object-dto.ts
|
|
57
|
+
models/grpc-update-policy-request-dto.ts
|
|
55
58
|
models/index.ts
|
|
56
59
|
models/insured-object-class.ts
|
|
57
60
|
models/insured-object-type-class.ts
|
|
@@ -71,6 +74,8 @@ models/policy-premium-class.ts
|
|
|
71
74
|
models/policy-premium-item-class.ts
|
|
72
75
|
models/policy-version-class.ts
|
|
73
76
|
models/premium-formula-class.ts
|
|
77
|
+
models/premium-override-dto.ts
|
|
78
|
+
models/premium-override-request-dto.ts
|
|
74
79
|
models/product-class.ts
|
|
75
80
|
models/product-factor-class.ts
|
|
76
81
|
models/product-factor-value-class.ts
|
|
@@ -78,7 +83,10 @@ models/product-field-class.ts
|
|
|
78
83
|
models/product-version-class.ts
|
|
79
84
|
models/store-product-factors-request-dto.ts
|
|
80
85
|
models/store-product-factors-response-class.ts
|
|
86
|
+
models/terminate-policy-request-dto.ts
|
|
87
|
+
models/terminate-policy-response-class.ts
|
|
81
88
|
models/timeslice-class.ts
|
|
89
|
+
models/to-grpc-create-policy-request-dto.ts
|
|
82
90
|
models/update-insured-object-request-dto.ts
|
|
83
91
|
models/update-lead-request-dto.ts
|
|
84
92
|
models/update-policy-request-dto.ts
|
|
@@ -93,5 +101,6 @@ models/update-product-version-request-dto.ts
|
|
|
93
101
|
models/update-product-version-response-class.ts
|
|
94
102
|
models/uploaded-document-dto.ts
|
|
95
103
|
models/validate-product-factors-request-dto.ts
|
|
104
|
+
models/withdraw-policy-response-class.ts
|
|
96
105
|
package.json
|
|
97
106
|
tsconfig.json
|
package/README.md
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
# Emil Insurance SDK
|
|
2
2
|
|
|
3
|
-
This TypeScript/JavaScript client utilizes [axios](https://github.com/axios/axios). The generated
|
|
4
|
-
|
|
5
|
-
Environment
|
|
6
|
-
* Node.js
|
|
7
|
-
* Webpack
|
|
8
|
-
* Browserify
|
|
3
|
+
This TypeScript/JavaScript client utilizes [axios](https://github.com/axios/axios). The generated module can be used with client-based applications (i.e. React).
|
|
9
4
|
|
|
10
5
|
Language level
|
|
11
6
|
* ES5 - you must have a Promises/A+ library installed
|
|
@@ -15,15 +10,20 @@ Module system
|
|
|
15
10
|
* CommonJS
|
|
16
11
|
* ES6 module system
|
|
17
12
|
|
|
18
|
-
|
|
13
|
+
Although this package can be used in both TypeScript and JavaScript, it is intended to be used with TypeScript. The definition should be automatically resolved via `package.json`. ([Reference](http://www.typescriptlang.org/docs/handbook/typings-for-npm-packages.html)). For more information, you can go to [Emil Api documentation](https://emil.stoplight.io/docs/emil-api/).
|
|
19
14
|
|
|
20
|
-
|
|
15
|
+
## Consuming
|
|
21
16
|
|
|
22
|
-
|
|
17
|
+
Navigate to the folder of your consuming project and run one of the following commands:
|
|
23
18
|
|
|
24
19
|
```
|
|
25
|
-
npm install @emilgroup/insurance-sdk@1.
|
|
20
|
+
npm install @emilgroup/insurance-sdk@1.3.0 --save
|
|
21
|
+
```
|
|
22
|
+
or
|
|
26
23
|
```
|
|
24
|
+
yarn add @emilgroup/insurance-sdk@1.3.0
|
|
25
|
+
```
|
|
26
|
+
|
|
27
27
|
And then you can import `PoliciesApi`.
|
|
28
28
|
|
|
29
29
|
```ts
|
package/api/policies-api.ts
CHANGED
|
@@ -29,9 +29,15 @@ import { GetPolicyResponseClass } from '../models';
|
|
|
29
29
|
// @ts-ignore
|
|
30
30
|
import { ListPoliciesResponseClass } from '../models';
|
|
31
31
|
// @ts-ignore
|
|
32
|
+
import { TerminatePolicyRequestDto } from '../models';
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
import { TerminatePolicyResponseClass } from '../models';
|
|
35
|
+
// @ts-ignore
|
|
32
36
|
import { UpdatePolicyRequestDto } from '../models';
|
|
33
37
|
// @ts-ignore
|
|
34
38
|
import { UpdatePolicyResponseClass } from '../models';
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
import { WithdrawPolicyResponseClass } from '../models';
|
|
35
41
|
/**
|
|
36
42
|
* PoliciesApi - axios parameter creator
|
|
37
43
|
* @export
|
|
@@ -206,6 +212,57 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
206
212
|
options: localVarRequestOptions,
|
|
207
213
|
};
|
|
208
214
|
},
|
|
215
|
+
/**
|
|
216
|
+
* Request to terminate an existing policy by tenant
|
|
217
|
+
* @summary Terminate a policy by tenant
|
|
218
|
+
* @param {string} policyCode The policy code
|
|
219
|
+
* @param {TerminatePolicyRequestDto} terminatePolicyRequestDto
|
|
220
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
221
|
+
* @param {*} [options] Override http request option.
|
|
222
|
+
* @throws {RequiredError}
|
|
223
|
+
*/
|
|
224
|
+
terminatePolicy: async (policyCode: string, terminatePolicyRequestDto: TerminatePolicyRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
225
|
+
// verify required parameter 'policyCode' is not null or undefined
|
|
226
|
+
assertParamExists('terminatePolicy', 'policyCode', policyCode)
|
|
227
|
+
// verify required parameter 'terminatePolicyRequestDto' is not null or undefined
|
|
228
|
+
assertParamExists('terminatePolicy', 'terminatePolicyRequestDto', terminatePolicyRequestDto)
|
|
229
|
+
const localVarPath = `/insuranceservice/v1/policies/{policyCode}/terminate`
|
|
230
|
+
.replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)));
|
|
231
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
232
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
233
|
+
let baseOptions;
|
|
234
|
+
let baseAccessToken;
|
|
235
|
+
if (configuration) {
|
|
236
|
+
baseOptions = configuration.baseOptions;
|
|
237
|
+
baseAccessToken = configuration.accessToken;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
241
|
+
const localVarHeaderParameter = {} as any;
|
|
242
|
+
const localVarQueryParameter = {} as any;
|
|
243
|
+
|
|
244
|
+
// authentication bearer required
|
|
245
|
+
// http bearer authentication required
|
|
246
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
247
|
+
|
|
248
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
249
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
255
|
+
|
|
256
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
257
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
258
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
259
|
+
localVarRequestOptions.data = serializeDataIfNeeded(terminatePolicyRequestDto, localVarRequestOptions, configuration)
|
|
260
|
+
|
|
261
|
+
return {
|
|
262
|
+
url: toPathString(localVarUrlObj),
|
|
263
|
+
options: localVarRequestOptions,
|
|
264
|
+
};
|
|
265
|
+
},
|
|
209
266
|
/**
|
|
210
267
|
* Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
211
268
|
* @summary Update the policy
|
|
@@ -252,6 +309,51 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
252
309
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
253
310
|
localVarRequestOptions.data = serializeDataIfNeeded(updatePolicyRequestDto, localVarRequestOptions, configuration)
|
|
254
311
|
|
|
312
|
+
return {
|
|
313
|
+
url: toPathString(localVarUrlObj),
|
|
314
|
+
options: localVarRequestOptions,
|
|
315
|
+
};
|
|
316
|
+
},
|
|
317
|
+
/**
|
|
318
|
+
* Withdraw policy by tenant
|
|
319
|
+
* @summary Withdraw policy by tenant
|
|
320
|
+
* @param {string} policyCode The policy code
|
|
321
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
322
|
+
* @param {*} [options] Override http request option.
|
|
323
|
+
* @throws {RequiredError}
|
|
324
|
+
*/
|
|
325
|
+
withdrawPolicy: async (policyCode: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
326
|
+
// verify required parameter 'policyCode' is not null or undefined
|
|
327
|
+
assertParamExists('withdrawPolicy', 'policyCode', policyCode)
|
|
328
|
+
const localVarPath = `/insuranceservice/v1/policies/{policyCode}/withdraw`
|
|
329
|
+
.replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)));
|
|
330
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
331
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
332
|
+
let baseOptions;
|
|
333
|
+
let baseAccessToken;
|
|
334
|
+
if (configuration) {
|
|
335
|
+
baseOptions = configuration.baseOptions;
|
|
336
|
+
baseAccessToken = configuration.accessToken;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
340
|
+
const localVarHeaderParameter = {} as any;
|
|
341
|
+
const localVarQueryParameter = {} as any;
|
|
342
|
+
|
|
343
|
+
// authentication bearer required
|
|
344
|
+
// http bearer authentication required
|
|
345
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
346
|
+
|
|
347
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
348
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
354
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
355
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
356
|
+
|
|
255
357
|
return {
|
|
256
358
|
url: toPathString(localVarUrlObj),
|
|
257
359
|
options: localVarRequestOptions,
|
|
@@ -309,6 +411,19 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
|
|
|
309
411
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listPolicies(authorization, pageSize, pageToken, filter, search, order, expand, options);
|
|
310
412
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
311
413
|
},
|
|
414
|
+
/**
|
|
415
|
+
* Request to terminate an existing policy by tenant
|
|
416
|
+
* @summary Terminate a policy by tenant
|
|
417
|
+
* @param {string} policyCode The policy code
|
|
418
|
+
* @param {TerminatePolicyRequestDto} terminatePolicyRequestDto
|
|
419
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
420
|
+
* @param {*} [options] Override http request option.
|
|
421
|
+
* @throws {RequiredError}
|
|
422
|
+
*/
|
|
423
|
+
async terminatePolicy(policyCode: string, terminatePolicyRequestDto: TerminatePolicyRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TerminatePolicyResponseClass>> {
|
|
424
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.terminatePolicy(policyCode, terminatePolicyRequestDto, authorization, options);
|
|
425
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
426
|
+
},
|
|
312
427
|
/**
|
|
313
428
|
* Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
314
429
|
* @summary Update the policy
|
|
@@ -322,6 +437,18 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
|
|
|
322
437
|
const localVarAxiosArgs = await localVarAxiosParamCreator.updatePolicy(code, updatePolicyRequestDto, authorization, options);
|
|
323
438
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
324
439
|
},
|
|
440
|
+
/**
|
|
441
|
+
* Withdraw policy by tenant
|
|
442
|
+
* @summary Withdraw policy by tenant
|
|
443
|
+
* @param {string} policyCode The policy code
|
|
444
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
445
|
+
* @param {*} [options] Override http request option.
|
|
446
|
+
* @throws {RequiredError}
|
|
447
|
+
*/
|
|
448
|
+
async withdrawPolicy(policyCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WithdrawPolicyResponseClass>> {
|
|
449
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.withdrawPolicy(policyCode, authorization, options);
|
|
450
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
451
|
+
},
|
|
325
452
|
}
|
|
326
453
|
};
|
|
327
454
|
|
|
@@ -371,6 +498,18 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
|
|
|
371
498
|
listPolicies(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListPoliciesResponseClass> {
|
|
372
499
|
return localVarFp.listPolicies(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
|
|
373
500
|
},
|
|
501
|
+
/**
|
|
502
|
+
* Request to terminate an existing policy by tenant
|
|
503
|
+
* @summary Terminate a policy by tenant
|
|
504
|
+
* @param {string} policyCode The policy code
|
|
505
|
+
* @param {TerminatePolicyRequestDto} terminatePolicyRequestDto
|
|
506
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
507
|
+
* @param {*} [options] Override http request option.
|
|
508
|
+
* @throws {RequiredError}
|
|
509
|
+
*/
|
|
510
|
+
terminatePolicy(policyCode: string, terminatePolicyRequestDto: TerminatePolicyRequestDto, authorization?: string, options?: any): AxiosPromise<TerminatePolicyResponseClass> {
|
|
511
|
+
return localVarFp.terminatePolicy(policyCode, terminatePolicyRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
512
|
+
},
|
|
374
513
|
/**
|
|
375
514
|
* Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
376
515
|
* @summary Update the policy
|
|
@@ -383,6 +522,17 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
|
|
|
383
522
|
updatePolicy(code: string, updatePolicyRequestDto: UpdatePolicyRequestDto, authorization?: string, options?: any): AxiosPromise<UpdatePolicyResponseClass> {
|
|
384
523
|
return localVarFp.updatePolicy(code, updatePolicyRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
385
524
|
},
|
|
525
|
+
/**
|
|
526
|
+
* Withdraw policy by tenant
|
|
527
|
+
* @summary Withdraw policy by tenant
|
|
528
|
+
* @param {string} policyCode The policy code
|
|
529
|
+
* @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
|
|
530
|
+
* @param {*} [options] Override http request option.
|
|
531
|
+
* @throws {RequiredError}
|
|
532
|
+
*/
|
|
533
|
+
withdrawPolicy(policyCode: string, authorization?: string, options?: any): AxiosPromise<WithdrawPolicyResponseClass> {
|
|
534
|
+
return localVarFp.withdrawPolicy(policyCode, authorization, options).then((request) => request(axios, basePath));
|
|
535
|
+
},
|
|
386
536
|
};
|
|
387
537
|
};
|
|
388
538
|
|
|
@@ -491,6 +641,34 @@ export interface PoliciesApiListPoliciesRequest {
|
|
|
491
641
|
readonly expand?: string
|
|
492
642
|
}
|
|
493
643
|
|
|
644
|
+
/**
|
|
645
|
+
* Request parameters for terminatePolicy operation in PoliciesApi.
|
|
646
|
+
* @export
|
|
647
|
+
* @interface PoliciesApiTerminatePolicyRequest
|
|
648
|
+
*/
|
|
649
|
+
export interface PoliciesApiTerminatePolicyRequest {
|
|
650
|
+
/**
|
|
651
|
+
* The policy code
|
|
652
|
+
* @type {string}
|
|
653
|
+
* @memberof PoliciesApiTerminatePolicy
|
|
654
|
+
*/
|
|
655
|
+
readonly policyCode: string
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
*
|
|
659
|
+
* @type {TerminatePolicyRequestDto}
|
|
660
|
+
* @memberof PoliciesApiTerminatePolicy
|
|
661
|
+
*/
|
|
662
|
+
readonly terminatePolicyRequestDto: TerminatePolicyRequestDto
|
|
663
|
+
|
|
664
|
+
/**
|
|
665
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
666
|
+
* @type {string}
|
|
667
|
+
* @memberof PoliciesApiTerminatePolicy
|
|
668
|
+
*/
|
|
669
|
+
readonly authorization?: string
|
|
670
|
+
}
|
|
671
|
+
|
|
494
672
|
/**
|
|
495
673
|
* Request parameters for updatePolicy operation in PoliciesApi.
|
|
496
674
|
* @export
|
|
@@ -519,6 +697,27 @@ export interface PoliciesApiUpdatePolicyRequest {
|
|
|
519
697
|
readonly authorization?: string
|
|
520
698
|
}
|
|
521
699
|
|
|
700
|
+
/**
|
|
701
|
+
* Request parameters for withdrawPolicy operation in PoliciesApi.
|
|
702
|
+
* @export
|
|
703
|
+
* @interface PoliciesApiWithdrawPolicyRequest
|
|
704
|
+
*/
|
|
705
|
+
export interface PoliciesApiWithdrawPolicyRequest {
|
|
706
|
+
/**
|
|
707
|
+
* The policy code
|
|
708
|
+
* @type {string}
|
|
709
|
+
* @memberof PoliciesApiWithdrawPolicy
|
|
710
|
+
*/
|
|
711
|
+
readonly policyCode: string
|
|
712
|
+
|
|
713
|
+
/**
|
|
714
|
+
* Bearer Token: provided by the login endpoint under the name accessToken.
|
|
715
|
+
* @type {string}
|
|
716
|
+
* @memberof PoliciesApiWithdrawPolicy
|
|
717
|
+
*/
|
|
718
|
+
readonly authorization?: string
|
|
719
|
+
}
|
|
720
|
+
|
|
522
721
|
/**
|
|
523
722
|
* PoliciesApi - object-oriented interface
|
|
524
723
|
* @export
|
|
@@ -562,6 +761,18 @@ export class PoliciesApi extends BaseAPI {
|
|
|
562
761
|
return PoliciesApiFp(this.configuration).listPolicies(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
|
|
563
762
|
}
|
|
564
763
|
|
|
764
|
+
/**
|
|
765
|
+
* Request to terminate an existing policy by tenant
|
|
766
|
+
* @summary Terminate a policy by tenant
|
|
767
|
+
* @param {PoliciesApiTerminatePolicyRequest} requestParameters Request parameters.
|
|
768
|
+
* @param {*} [options] Override http request option.
|
|
769
|
+
* @throws {RequiredError}
|
|
770
|
+
* @memberof PoliciesApi
|
|
771
|
+
*/
|
|
772
|
+
public terminatePolicy(requestParameters: PoliciesApiTerminatePolicyRequest, options?: AxiosRequestConfig) {
|
|
773
|
+
return PoliciesApiFp(this.configuration).terminatePolicy(requestParameters.policyCode, requestParameters.terminatePolicyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
774
|
+
}
|
|
775
|
+
|
|
565
776
|
/**
|
|
566
777
|
* Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
|
|
567
778
|
* @summary Update the policy
|
|
@@ -573,4 +784,16 @@ export class PoliciesApi extends BaseAPI {
|
|
|
573
784
|
public updatePolicy(requestParameters: PoliciesApiUpdatePolicyRequest, options?: AxiosRequestConfig) {
|
|
574
785
|
return PoliciesApiFp(this.configuration).updatePolicy(requestParameters.code, requestParameters.updatePolicyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
575
786
|
}
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Withdraw policy by tenant
|
|
790
|
+
* @summary Withdraw policy by tenant
|
|
791
|
+
* @param {PoliciesApiWithdrawPolicyRequest} requestParameters Request parameters.
|
|
792
|
+
* @param {*} [options] Override http request option.
|
|
793
|
+
* @throws {RequiredError}
|
|
794
|
+
* @memberof PoliciesApi
|
|
795
|
+
*/
|
|
796
|
+
public withdrawPolicy(requestParameters: PoliciesApiWithdrawPolicyRequest, options?: AxiosRequestConfig) {
|
|
797
|
+
return PoliciesApiFp(this.configuration).withdrawPolicy(requestParameters.policyCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
798
|
+
}
|
|
576
799
|
}
|
package/api/products-api.ts
CHANGED
|
@@ -39,6 +39,8 @@ import { GetProductFactorResponseClass } from '../models';
|
|
|
39
39
|
// @ts-ignore
|
|
40
40
|
import { GetProductFactorValueResponseClass } from '../models';
|
|
41
41
|
// @ts-ignore
|
|
42
|
+
import { GetProductFactorsForVersionResponseClass } from '../models';
|
|
43
|
+
// @ts-ignore
|
|
42
44
|
import { GetProductFieldResponseClass } from '../models';
|
|
43
45
|
// @ts-ignore
|
|
44
46
|
import { GetProductResponseClass } from '../models';
|
|
@@ -582,6 +584,66 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
582
584
|
|
|
583
585
|
|
|
584
586
|
|
|
587
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
588
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
589
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
590
|
+
|
|
591
|
+
return {
|
|
592
|
+
url: toPathString(localVarUrlObj),
|
|
593
|
+
options: localVarRequestOptions,
|
|
594
|
+
};
|
|
595
|
+
},
|
|
596
|
+
/**
|
|
597
|
+
* Returns product factors without values (values=none), or with values if their number less or equal to 200 (values=short), or with all values (values=all - this may take several seconds).
|
|
598
|
+
* @summary Returns all product factors for the product version with all without values
|
|
599
|
+
* @param {number} productVersionId Product Version Id
|
|
600
|
+
* @param {string} values Which values to return for every factor (None or Short for short value lists only or All)
|
|
601
|
+
* @param {string} [authorization] Bearer Token
|
|
602
|
+
* @param {boolean} [forPublic] true if this is a call from PublivAPI or false otherwise (default)
|
|
603
|
+
* @param {*} [options] Override http request option.
|
|
604
|
+
* @throws {RequiredError}
|
|
605
|
+
*/
|
|
606
|
+
getProductFactorsForVersion: async (productVersionId: number, values: string, authorization?: string, forPublic?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
607
|
+
// verify required parameter 'productVersionId' is not null or undefined
|
|
608
|
+
assertParamExists('getProductFactorsForVersion', 'productVersionId', productVersionId)
|
|
609
|
+
// verify required parameter 'values' is not null or undefined
|
|
610
|
+
assertParamExists('getProductFactorsForVersion', 'values', values)
|
|
611
|
+
const localVarPath = `/insuranceservice/v1/product-factors/for-version`;
|
|
612
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
613
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
614
|
+
let baseOptions;
|
|
615
|
+
let baseAccessToken;
|
|
616
|
+
if (configuration) {
|
|
617
|
+
baseOptions = configuration.baseOptions;
|
|
618
|
+
baseAccessToken = configuration.accessToken;
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
622
|
+
const localVarHeaderParameter = {} as any;
|
|
623
|
+
const localVarQueryParameter = {} as any;
|
|
624
|
+
|
|
625
|
+
// authentication bearer required
|
|
626
|
+
// http bearer authentication required
|
|
627
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
628
|
+
|
|
629
|
+
if (productVersionId !== undefined) {
|
|
630
|
+
localVarQueryParameter['productVersionId'] = productVersionId;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
if (values !== undefined) {
|
|
634
|
+
localVarQueryParameter['values'] = values;
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
if (forPublic !== undefined) {
|
|
638
|
+
localVarQueryParameter['forPublic'] = forPublic;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
642
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
|
|
646
|
+
|
|
585
647
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
586
648
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
587
649
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -1044,7 +1106,7 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
1044
1106
|
};
|
|
1045
1107
|
},
|
|
1046
1108
|
/**
|
|
1047
|
-
* Upload a CSV file containing product factors necessary for a product.
|
|
1109
|
+
* Upload a CSV file containing product factors necessary for a product. The columns must be in the following order: group,label,key,name,value. It is advised to validate the file first.
|
|
1048
1110
|
* @summary Upload product factors
|
|
1049
1111
|
* @param {string} [authorization] Bearer Token
|
|
1050
1112
|
* @param {number} [productVersionId]
|
|
@@ -1303,7 +1365,7 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
1303
1365
|
};
|
|
1304
1366
|
},
|
|
1305
1367
|
/**
|
|
1306
|
-
* Validate a CSV file containing all product factors.
|
|
1368
|
+
* Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
|
|
1307
1369
|
* @summary Validate product factors
|
|
1308
1370
|
* @param {string} [authorization] Bearer Token
|
|
1309
1371
|
* @param {any} [factors]
|
|
@@ -1490,6 +1552,20 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
1490
1552
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductFactorValue(productVersionId, label, key, name, authorization, options);
|
|
1491
1553
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1492
1554
|
},
|
|
1555
|
+
/**
|
|
1556
|
+
* Returns product factors without values (values=none), or with values if their number less or equal to 200 (values=short), or with all values (values=all - this may take several seconds).
|
|
1557
|
+
* @summary Returns all product factors for the product version with all without values
|
|
1558
|
+
* @param {number} productVersionId Product Version Id
|
|
1559
|
+
* @param {string} values Which values to return for every factor (None or Short for short value lists only or All)
|
|
1560
|
+
* @param {string} [authorization] Bearer Token
|
|
1561
|
+
* @param {boolean} [forPublic] true if this is a call from PublivAPI or false otherwise (default)
|
|
1562
|
+
* @param {*} [options] Override http request option.
|
|
1563
|
+
* @throws {RequiredError}
|
|
1564
|
+
*/
|
|
1565
|
+
async getProductFactorsForVersion(productVersionId: number, values: string, authorization?: string, forPublic?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductFactorsForVersionResponseClass>> {
|
|
1566
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductFactorsForVersion(productVersionId, values, authorization, forPublic, options);
|
|
1567
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1568
|
+
},
|
|
1493
1569
|
/**
|
|
1494
1570
|
* Retrieves the details of the product field that was previously created. Supply the unique product field id that was returned when you created it and Emil Api will return the corresponding product field information.
|
|
1495
1571
|
* @summary Retrieve the product field
|
|
@@ -1601,7 +1677,7 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
1601
1677
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1602
1678
|
},
|
|
1603
1679
|
/**
|
|
1604
|
-
* Upload a CSV file containing product factors necessary for a product.
|
|
1680
|
+
* Upload a CSV file containing product factors necessary for a product. The columns must be in the following order: group,label,key,name,value. It is advised to validate the file first.
|
|
1605
1681
|
* @summary Upload product factors
|
|
1606
1682
|
* @param {string} [authorization] Bearer Token
|
|
1607
1683
|
* @param {number} [productVersionId]
|
|
@@ -1666,7 +1742,7 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
1666
1742
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1667
1743
|
},
|
|
1668
1744
|
/**
|
|
1669
|
-
* Validate a CSV file containing all product factors.
|
|
1745
|
+
* Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
|
|
1670
1746
|
* @summary Validate product factors
|
|
1671
1747
|
* @param {string} [authorization] Bearer Token
|
|
1672
1748
|
* @param {any} [factors]
|
|
@@ -1805,6 +1881,19 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
1805
1881
|
getProductFactorValue(productVersionId: number, label: string, key: string, name: string, authorization?: string, options?: any): AxiosPromise<GetProductFactorValueResponseClass> {
|
|
1806
1882
|
return localVarFp.getProductFactorValue(productVersionId, label, key, name, authorization, options).then((request) => request(axios, basePath));
|
|
1807
1883
|
},
|
|
1884
|
+
/**
|
|
1885
|
+
* Returns product factors without values (values=none), or with values if their number less or equal to 200 (values=short), or with all values (values=all - this may take several seconds).
|
|
1886
|
+
* @summary Returns all product factors for the product version with all without values
|
|
1887
|
+
* @param {number} productVersionId Product Version Id
|
|
1888
|
+
* @param {string} values Which values to return for every factor (None or Short for short value lists only or All)
|
|
1889
|
+
* @param {string} [authorization] Bearer Token
|
|
1890
|
+
* @param {boolean} [forPublic] true if this is a call from PublivAPI or false otherwise (default)
|
|
1891
|
+
* @param {*} [options] Override http request option.
|
|
1892
|
+
* @throws {RequiredError}
|
|
1893
|
+
*/
|
|
1894
|
+
getProductFactorsForVersion(productVersionId: number, values: string, authorization?: string, forPublic?: boolean, options?: any): AxiosPromise<GetProductFactorsForVersionResponseClass> {
|
|
1895
|
+
return localVarFp.getProductFactorsForVersion(productVersionId, values, authorization, forPublic, options).then((request) => request(axios, basePath));
|
|
1896
|
+
},
|
|
1808
1897
|
/**
|
|
1809
1898
|
* Retrieves the details of the product field that was previously created. Supply the unique product field id that was returned when you created it and Emil Api will return the corresponding product field information.
|
|
1810
1899
|
* @summary Retrieve the product field
|
|
@@ -1909,7 +1998,7 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
1909
1998
|
return localVarFp.listProducts(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
|
|
1910
1999
|
},
|
|
1911
2000
|
/**
|
|
1912
|
-
* Upload a CSV file containing product factors necessary for a product.
|
|
2001
|
+
* Upload a CSV file containing product factors necessary for a product. The columns must be in the following order: group,label,key,name,value. It is advised to validate the file first.
|
|
1913
2002
|
* @summary Upload product factors
|
|
1914
2003
|
* @param {string} [authorization] Bearer Token
|
|
1915
2004
|
* @param {number} [productVersionId]
|
|
@@ -1969,7 +2058,7 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
1969
2058
|
return localVarFp.updateProductVersion(id, updateProductVersionRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
1970
2059
|
},
|
|
1971
2060
|
/**
|
|
1972
|
-
* Validate a CSV file containing all product factors.
|
|
2061
|
+
* Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
|
|
1973
2062
|
* @summary Validate product factors
|
|
1974
2063
|
* @param {string} [authorization] Bearer Token
|
|
1975
2064
|
* @param {any} [factors]
|
|
@@ -2248,6 +2337,41 @@ export interface ProductsApiGetProductFactorValueRequest {
|
|
|
2248
2337
|
readonly authorization?: string
|
|
2249
2338
|
}
|
|
2250
2339
|
|
|
2340
|
+
/**
|
|
2341
|
+
* Request parameters for getProductFactorsForVersion operation in ProductsApi.
|
|
2342
|
+
* @export
|
|
2343
|
+
* @interface ProductsApiGetProductFactorsForVersionRequest
|
|
2344
|
+
*/
|
|
2345
|
+
export interface ProductsApiGetProductFactorsForVersionRequest {
|
|
2346
|
+
/**
|
|
2347
|
+
* Product Version Id
|
|
2348
|
+
* @type {number}
|
|
2349
|
+
* @memberof ProductsApiGetProductFactorsForVersion
|
|
2350
|
+
*/
|
|
2351
|
+
readonly productVersionId: number
|
|
2352
|
+
|
|
2353
|
+
/**
|
|
2354
|
+
* Which values to return for every factor (None or Short for short value lists only or All)
|
|
2355
|
+
* @type {string}
|
|
2356
|
+
* @memberof ProductsApiGetProductFactorsForVersion
|
|
2357
|
+
*/
|
|
2358
|
+
readonly values: string
|
|
2359
|
+
|
|
2360
|
+
/**
|
|
2361
|
+
* Bearer Token
|
|
2362
|
+
* @type {string}
|
|
2363
|
+
* @memberof ProductsApiGetProductFactorsForVersion
|
|
2364
|
+
*/
|
|
2365
|
+
readonly authorization?: string
|
|
2366
|
+
|
|
2367
|
+
/**
|
|
2368
|
+
* true if this is a call from PublivAPI or false otherwise (default)
|
|
2369
|
+
* @type {boolean}
|
|
2370
|
+
* @memberof ProductsApiGetProductFactorsForVersion
|
|
2371
|
+
*/
|
|
2372
|
+
readonly forPublic?: boolean
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2251
2375
|
/**
|
|
2252
2376
|
* Request parameters for getProductField operation in ProductsApi.
|
|
2253
2377
|
* @export
|
|
@@ -2865,6 +2989,18 @@ export class ProductsApi extends BaseAPI {
|
|
|
2865
2989
|
return ProductsApiFp(this.configuration).getProductFactorValue(requestParameters.productVersionId, requestParameters.label, requestParameters.key, requestParameters.name, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
2866
2990
|
}
|
|
2867
2991
|
|
|
2992
|
+
/**
|
|
2993
|
+
* Returns product factors without values (values=none), or with values if their number less or equal to 200 (values=short), or with all values (values=all - this may take several seconds).
|
|
2994
|
+
* @summary Returns all product factors for the product version with all without values
|
|
2995
|
+
* @param {ProductsApiGetProductFactorsForVersionRequest} requestParameters Request parameters.
|
|
2996
|
+
* @param {*} [options] Override http request option.
|
|
2997
|
+
* @throws {RequiredError}
|
|
2998
|
+
* @memberof ProductsApi
|
|
2999
|
+
*/
|
|
3000
|
+
public getProductFactorsForVersion(requestParameters: ProductsApiGetProductFactorsForVersionRequest, options?: AxiosRequestConfig) {
|
|
3001
|
+
return ProductsApiFp(this.configuration).getProductFactorsForVersion(requestParameters.productVersionId, requestParameters.values, requestParameters.authorization, requestParameters.forPublic, options).then((request) => request(this.axios, this.basePath));
|
|
3002
|
+
}
|
|
3003
|
+
|
|
2868
3004
|
/**
|
|
2869
3005
|
* Retrieves the details of the product field that was previously created. Supply the unique product field id that was returned when you created it and Emil Api will return the corresponding product field information.
|
|
2870
3006
|
* @summary Retrieve the product field
|
|
@@ -2950,7 +3086,7 @@ export class ProductsApi extends BaseAPI {
|
|
|
2950
3086
|
}
|
|
2951
3087
|
|
|
2952
3088
|
/**
|
|
2953
|
-
* Upload a CSV file containing product factors necessary for a product.
|
|
3089
|
+
* Upload a CSV file containing product factors necessary for a product. The columns must be in the following order: group,label,key,name,value. It is advised to validate the file first.
|
|
2954
3090
|
* @summary Upload product factors
|
|
2955
3091
|
* @param {ProductsApiStoreProductFactorsRequest} requestParameters Request parameters.
|
|
2956
3092
|
* @param {*} [options] Override http request option.
|
|
@@ -3010,7 +3146,7 @@ export class ProductsApi extends BaseAPI {
|
|
|
3010
3146
|
}
|
|
3011
3147
|
|
|
3012
3148
|
/**
|
|
3013
|
-
* Validate a CSV file containing all product factors.
|
|
3149
|
+
* Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
|
|
3014
3150
|
* @summary Validate product factors
|
|
3015
3151
|
* @param {ProductsApiValidateProductFactorsRequest} requestParameters Request parameters.
|
|
3016
3152
|
* @param {*} [options] Override http request option.
|