@emilgroup/insurance-sdk-node 1.1.1 → 1.2.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.
Files changed (58) hide show
  1. package/.openapi-generator/FILES +7 -0
  2. package/README.md +3 -3
  3. package/api/policies-api.ts +223 -0
  4. package/api/products-api.ts +144 -8
  5. package/base.ts +43 -5
  6. package/dist/api/policies-api.d.ts +122 -0
  7. package/dist/api/policies-api.js +191 -0
  8. package/dist/api/products-api.d.ts +82 -8
  9. package/dist/api/products-api.js +116 -8
  10. package/dist/base.d.ts +1 -0
  11. package/dist/base.js +35 -5
  12. package/dist/models/calculate-premium-request-dto.d.ts +7 -0
  13. package/dist/models/create-account-request-dto.d.ts +6 -0
  14. package/dist/models/create-dummy-policy-request-dto.d.ts +7 -0
  15. package/dist/models/create-lead-request-dto.d.ts +7 -0
  16. package/dist/models/create-policy-request-dto.d.ts +7 -0
  17. package/dist/models/get-product-factors-for-version-request-dto.d.ts +36 -0
  18. package/dist/models/get-product-factors-for-version-request-dto.js +15 -0
  19. package/dist/models/get-product-factors-for-version-response-class.d.ts +25 -0
  20. package/dist/models/get-product-factors-for-version-response-class.js +15 -0
  21. package/dist/models/grpc-update-policy-request-dto.d.ts +7 -0
  22. package/dist/models/index.d.ts +7 -0
  23. package/dist/models/index.js +7 -0
  24. package/dist/models/policy-class.d.ts +1 -1
  25. package/dist/models/policy-premium-item-class.d.ts +6 -0
  26. package/dist/models/premium-override-dto.d.ts +53 -0
  27. package/dist/models/premium-override-dto.js +25 -0
  28. package/dist/models/premium-override-request-dto.d.ts +25 -0
  29. package/dist/models/premium-override-request-dto.js +15 -0
  30. package/dist/models/terminate-policy-request-dto.d.ts +24 -0
  31. package/dist/models/terminate-policy-request-dto.js +15 -0
  32. package/dist/models/terminate-policy-response-class.d.ts +25 -0
  33. package/dist/models/terminate-policy-response-class.js +15 -0
  34. package/dist/models/to-grpc-create-policy-request-dto.d.ts +7 -0
  35. package/dist/models/update-lead-request-dto.d.ts +7 -0
  36. package/dist/models/update-policy-request-dto.d.ts +7 -0
  37. package/dist/models/withdraw-policy-response-class.d.ts +25 -0
  38. package/dist/models/withdraw-policy-response-class.js +15 -0
  39. package/models/calculate-premium-request-dto.ts +7 -0
  40. package/models/create-account-request-dto.ts +6 -0
  41. package/models/create-dummy-policy-request-dto.ts +7 -0
  42. package/models/create-lead-request-dto.ts +7 -0
  43. package/models/create-policy-request-dto.ts +7 -0
  44. package/models/get-product-factors-for-version-request-dto.ts +42 -0
  45. package/models/get-product-factors-for-version-response-class.ts +31 -0
  46. package/models/grpc-update-policy-request-dto.ts +7 -0
  47. package/models/index.ts +7 -0
  48. package/models/policy-class.ts +1 -1
  49. package/models/policy-premium-item-class.ts +6 -0
  50. package/models/premium-override-dto.ts +63 -0
  51. package/models/premium-override-request-dto.ts +31 -0
  52. package/models/terminate-policy-request-dto.ts +30 -0
  53. package/models/terminate-policy-response-class.ts +31 -0
  54. package/models/to-grpc-create-policy-request-dto.ts +7 -0
  55. package/models/update-lead-request-dto.ts +7 -0
  56. package/models/update-policy-request-dto.ts +7 -0
  57. package/models/withdraw-policy-response-class.ts +31 -0
  58. package/package.json +4 -3
@@ -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
@@ -72,6 +74,8 @@ models/policy-premium-class.ts
72
74
  models/policy-premium-item-class.ts
73
75
  models/policy-version-class.ts
74
76
  models/premium-formula-class.ts
77
+ models/premium-override-dto.ts
78
+ models/premium-override-request-dto.ts
75
79
  models/product-class.ts
76
80
  models/product-factor-class.ts
77
81
  models/product-factor-value-class.ts
@@ -79,6 +83,8 @@ models/product-field-class.ts
79
83
  models/product-version-class.ts
80
84
  models/store-product-factors-request-dto.ts
81
85
  models/store-product-factors-response-class.ts
86
+ models/terminate-policy-request-dto.ts
87
+ models/terminate-policy-response-class.ts
82
88
  models/timeslice-class.ts
83
89
  models/to-grpc-create-policy-request-dto.ts
84
90
  models/update-insured-object-request-dto.ts
@@ -95,5 +101,6 @@ models/update-product-version-request-dto.ts
95
101
  models/update-product-version-response-class.ts
96
102
  models/uploaded-document-dto.ts
97
103
  models/validate-product-factors-request-dto.ts
104
+ models/withdraw-policy-response-class.ts
98
105
  package.json
99
106
  tsconfig.json
package/README.md CHANGED
@@ -10,18 +10,18 @@ Module system
10
10
  * CommonJS
11
11
  * ES6 module system
12
12
 
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))
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/).
14
14
 
15
15
  ## Consuming
16
16
 
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/insurance-sdk-node@1.1.1 --save
20
+ npm install @emilgroup/insurance-sdk-node@1.2.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/insurance-sdk-node@1.1.1
24
+ yarn add @emilgroup/insurance-sdk-node@1.2.0
25
25
  ```
26
26
 
27
27
  And then you can import `PoliciesApi`.
@@ -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
  // URLSearchParams not necessarily used
36
42
  // @ts-ignore
37
43
  import { URL, URLSearchParams } from 'url';
@@ -210,6 +216,57 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
210
216
  options: localVarRequestOptions,
211
217
  };
212
218
  },
219
+ /**
220
+ * Request to terminate an existing policy by tenant
221
+ * @summary Terminate a policy by tenant
222
+ * @param {string} policyCode The policy code
223
+ * @param {TerminatePolicyRequestDto} terminatePolicyRequestDto
224
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
225
+ * @param {*} [options] Override http request option.
226
+ * @throws {RequiredError}
227
+ */
228
+ terminatePolicy: async (policyCode: string, terminatePolicyRequestDto: TerminatePolicyRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
229
+ // verify required parameter 'policyCode' is not null or undefined
230
+ assertParamExists('terminatePolicy', 'policyCode', policyCode)
231
+ // verify required parameter 'terminatePolicyRequestDto' is not null or undefined
232
+ assertParamExists('terminatePolicy', 'terminatePolicyRequestDto', terminatePolicyRequestDto)
233
+ const localVarPath = `/insuranceservice/v1/policies/{policyCode}/terminate`
234
+ .replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)));
235
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
236
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
237
+ let baseOptions;
238
+ let baseAccessToken;
239
+ if (configuration) {
240
+ baseOptions = configuration.baseOptions;
241
+ baseAccessToken = configuration.accessToken;
242
+ }
243
+
244
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
245
+ const localVarHeaderParameter = {} as any;
246
+ const localVarQueryParameter = {} as any;
247
+
248
+ // authentication bearer required
249
+ // http bearer authentication required
250
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
251
+
252
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
253
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
254
+ }
255
+
256
+
257
+
258
+ localVarHeaderParameter['Content-Type'] = 'application/json';
259
+
260
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
261
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
262
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
263
+ localVarRequestOptions.data = serializeDataIfNeeded(terminatePolicyRequestDto, localVarRequestOptions, configuration)
264
+
265
+ return {
266
+ url: toPathString(localVarUrlObj),
267
+ options: localVarRequestOptions,
268
+ };
269
+ },
213
270
  /**
214
271
  * Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
215
272
  * @summary Update the policy
@@ -256,6 +313,51 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
256
313
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
257
314
  localVarRequestOptions.data = serializeDataIfNeeded(updatePolicyRequestDto, localVarRequestOptions, configuration)
258
315
 
316
+ return {
317
+ url: toPathString(localVarUrlObj),
318
+ options: localVarRequestOptions,
319
+ };
320
+ },
321
+ /**
322
+ * Withdraw policy by tenant
323
+ * @summary Withdraw policy by tenant
324
+ * @param {string} policyCode The policy code
325
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
326
+ * @param {*} [options] Override http request option.
327
+ * @throws {RequiredError}
328
+ */
329
+ withdrawPolicy: async (policyCode: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
330
+ // verify required parameter 'policyCode' is not null or undefined
331
+ assertParamExists('withdrawPolicy', 'policyCode', policyCode)
332
+ const localVarPath = `/insuranceservice/v1/policies/{policyCode}/withdraw`
333
+ .replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)));
334
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
335
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
336
+ let baseOptions;
337
+ let baseAccessToken;
338
+ if (configuration) {
339
+ baseOptions = configuration.baseOptions;
340
+ baseAccessToken = configuration.accessToken;
341
+ }
342
+
343
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
344
+ const localVarHeaderParameter = {} as any;
345
+ const localVarQueryParameter = {} as any;
346
+
347
+ // authentication bearer required
348
+ // http bearer authentication required
349
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
350
+
351
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
352
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
353
+ }
354
+
355
+
356
+
357
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
358
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
359
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
360
+
259
361
  return {
260
362
  url: toPathString(localVarUrlObj),
261
363
  options: localVarRequestOptions,
@@ -313,6 +415,19 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
313
415
  const localVarAxiosArgs = await localVarAxiosParamCreator.listPolicies(authorization, pageSize, pageToken, filter, search, order, expand, options);
314
416
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
315
417
  },
418
+ /**
419
+ * Request to terminate an existing policy by tenant
420
+ * @summary Terminate a policy by tenant
421
+ * @param {string} policyCode The policy code
422
+ * @param {TerminatePolicyRequestDto} terminatePolicyRequestDto
423
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
424
+ * @param {*} [options] Override http request option.
425
+ * @throws {RequiredError}
426
+ */
427
+ async terminatePolicy(policyCode: string, terminatePolicyRequestDto: TerminatePolicyRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TerminatePolicyResponseClass>> {
428
+ const localVarAxiosArgs = await localVarAxiosParamCreator.terminatePolicy(policyCode, terminatePolicyRequestDto, authorization, options);
429
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
430
+ },
316
431
  /**
317
432
  * Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
318
433
  * @summary Update the policy
@@ -326,6 +441,18 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
326
441
  const localVarAxiosArgs = await localVarAxiosParamCreator.updatePolicy(code, updatePolicyRequestDto, authorization, options);
327
442
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
328
443
  },
444
+ /**
445
+ * Withdraw policy by tenant
446
+ * @summary Withdraw policy by tenant
447
+ * @param {string} policyCode The policy code
448
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
449
+ * @param {*} [options] Override http request option.
450
+ * @throws {RequiredError}
451
+ */
452
+ async withdrawPolicy(policyCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WithdrawPolicyResponseClass>> {
453
+ const localVarAxiosArgs = await localVarAxiosParamCreator.withdrawPolicy(policyCode, authorization, options);
454
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
455
+ },
329
456
  }
330
457
  };
331
458
 
@@ -375,6 +502,18 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
375
502
  listPolicies(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListPoliciesResponseClass> {
376
503
  return localVarFp.listPolicies(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
377
504
  },
505
+ /**
506
+ * Request to terminate an existing policy by tenant
507
+ * @summary Terminate a policy by tenant
508
+ * @param {string} policyCode The policy code
509
+ * @param {TerminatePolicyRequestDto} terminatePolicyRequestDto
510
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
511
+ * @param {*} [options] Override http request option.
512
+ * @throws {RequiredError}
513
+ */
514
+ terminatePolicy(policyCode: string, terminatePolicyRequestDto: TerminatePolicyRequestDto, authorization?: string, options?: any): AxiosPromise<TerminatePolicyResponseClass> {
515
+ return localVarFp.terminatePolicy(policyCode, terminatePolicyRequestDto, authorization, options).then((request) => request(axios, basePath));
516
+ },
378
517
  /**
379
518
  * Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
380
519
  * @summary Update the policy
@@ -387,6 +526,17 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
387
526
  updatePolicy(code: string, updatePolicyRequestDto: UpdatePolicyRequestDto, authorization?: string, options?: any): AxiosPromise<UpdatePolicyResponseClass> {
388
527
  return localVarFp.updatePolicy(code, updatePolicyRequestDto, authorization, options).then((request) => request(axios, basePath));
389
528
  },
529
+ /**
530
+ * Withdraw policy by tenant
531
+ * @summary Withdraw policy by tenant
532
+ * @param {string} policyCode The policy code
533
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
534
+ * @param {*} [options] Override http request option.
535
+ * @throws {RequiredError}
536
+ */
537
+ withdrawPolicy(policyCode: string, authorization?: string, options?: any): AxiosPromise<WithdrawPolicyResponseClass> {
538
+ return localVarFp.withdrawPolicy(policyCode, authorization, options).then((request) => request(axios, basePath));
539
+ },
390
540
  };
391
541
  };
392
542
 
@@ -495,6 +645,34 @@ export interface PoliciesApiListPoliciesRequest {
495
645
  readonly expand?: string
496
646
  }
497
647
 
648
+ /**
649
+ * Request parameters for terminatePolicy operation in PoliciesApi.
650
+ * @export
651
+ * @interface PoliciesApiTerminatePolicyRequest
652
+ */
653
+ export interface PoliciesApiTerminatePolicyRequest {
654
+ /**
655
+ * The policy code
656
+ * @type {string}
657
+ * @memberof PoliciesApiTerminatePolicy
658
+ */
659
+ readonly policyCode: string
660
+
661
+ /**
662
+ *
663
+ * @type {TerminatePolicyRequestDto}
664
+ * @memberof PoliciesApiTerminatePolicy
665
+ */
666
+ readonly terminatePolicyRequestDto: TerminatePolicyRequestDto
667
+
668
+ /**
669
+ * Bearer Token: provided by the login endpoint under the name accessToken.
670
+ * @type {string}
671
+ * @memberof PoliciesApiTerminatePolicy
672
+ */
673
+ readonly authorization?: string
674
+ }
675
+
498
676
  /**
499
677
  * Request parameters for updatePolicy operation in PoliciesApi.
500
678
  * @export
@@ -523,6 +701,27 @@ export interface PoliciesApiUpdatePolicyRequest {
523
701
  readonly authorization?: string
524
702
  }
525
703
 
704
+ /**
705
+ * Request parameters for withdrawPolicy operation in PoliciesApi.
706
+ * @export
707
+ * @interface PoliciesApiWithdrawPolicyRequest
708
+ */
709
+ export interface PoliciesApiWithdrawPolicyRequest {
710
+ /**
711
+ * The policy code
712
+ * @type {string}
713
+ * @memberof PoliciesApiWithdrawPolicy
714
+ */
715
+ readonly policyCode: string
716
+
717
+ /**
718
+ * Bearer Token: provided by the login endpoint under the name accessToken.
719
+ * @type {string}
720
+ * @memberof PoliciesApiWithdrawPolicy
721
+ */
722
+ readonly authorization?: string
723
+ }
724
+
526
725
  /**
527
726
  * PoliciesApi - object-oriented interface
528
727
  * @export
@@ -566,6 +765,18 @@ export class PoliciesApi extends BaseAPI {
566
765
  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));
567
766
  }
568
767
 
768
+ /**
769
+ * Request to terminate an existing policy by tenant
770
+ * @summary Terminate a policy by tenant
771
+ * @param {PoliciesApiTerminatePolicyRequest} requestParameters Request parameters.
772
+ * @param {*} [options] Override http request option.
773
+ * @throws {RequiredError}
774
+ * @memberof PoliciesApi
775
+ */
776
+ public terminatePolicy(requestParameters: PoliciesApiTerminatePolicyRequest, options?: AxiosRequestConfig) {
777
+ return PoliciesApiFp(this.configuration).terminatePolicy(requestParameters.policyCode, requestParameters.terminatePolicyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
778
+ }
779
+
569
780
  /**
570
781
  * Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
571
782
  * @summary Update the policy
@@ -577,4 +788,16 @@ export class PoliciesApi extends BaseAPI {
577
788
  public updatePolicy(requestParameters: PoliciesApiUpdatePolicyRequest, options?: AxiosRequestConfig) {
578
789
  return PoliciesApiFp(this.configuration).updatePolicy(requestParameters.code, requestParameters.updatePolicyRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
579
790
  }
791
+
792
+ /**
793
+ * Withdraw policy by tenant
794
+ * @summary Withdraw policy by tenant
795
+ * @param {PoliciesApiWithdrawPolicyRequest} requestParameters Request parameters.
796
+ * @param {*} [options] Override http request option.
797
+ * @throws {RequiredError}
798
+ * @memberof PoliciesApi
799
+ */
800
+ public withdrawPolicy(requestParameters: PoliciesApiWithdrawPolicyRequest, options?: AxiosRequestConfig) {
801
+ return PoliciesApiFp(this.configuration).withdrawPolicy(requestParameters.policyCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
802
+ }
580
803
  }
@@ -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';
@@ -586,6 +588,66 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
586
588
 
587
589
 
588
590
 
591
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
592
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
593
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
594
+
595
+ return {
596
+ url: toPathString(localVarUrlObj),
597
+ options: localVarRequestOptions,
598
+ };
599
+ },
600
+ /**
601
+ * 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).
602
+ * @summary Returns all product factors for the product version with all without values
603
+ * @param {number} productVersionId Product Version Id
604
+ * @param {string} values Which values to return for every factor (None or Short for short value lists only or All)
605
+ * @param {string} [authorization] Bearer Token
606
+ * @param {boolean} [forPublic] true if this is a call from PublivAPI or false otherwise (default)
607
+ * @param {*} [options] Override http request option.
608
+ * @throws {RequiredError}
609
+ */
610
+ getProductFactorsForVersion: async (productVersionId: number, values: string, authorization?: string, forPublic?: boolean, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
611
+ // verify required parameter 'productVersionId' is not null or undefined
612
+ assertParamExists('getProductFactorsForVersion', 'productVersionId', productVersionId)
613
+ // verify required parameter 'values' is not null or undefined
614
+ assertParamExists('getProductFactorsForVersion', 'values', values)
615
+ const localVarPath = `/insuranceservice/v1/product-factors/for-version`;
616
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
617
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
618
+ let baseOptions;
619
+ let baseAccessToken;
620
+ if (configuration) {
621
+ baseOptions = configuration.baseOptions;
622
+ baseAccessToken = configuration.accessToken;
623
+ }
624
+
625
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
626
+ const localVarHeaderParameter = {} as any;
627
+ const localVarQueryParameter = {} as any;
628
+
629
+ // authentication bearer required
630
+ // http bearer authentication required
631
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
632
+
633
+ if (productVersionId !== undefined) {
634
+ localVarQueryParameter['productVersionId'] = productVersionId;
635
+ }
636
+
637
+ if (values !== undefined) {
638
+ localVarQueryParameter['values'] = values;
639
+ }
640
+
641
+ if (forPublic !== undefined) {
642
+ localVarQueryParameter['forPublic'] = forPublic;
643
+ }
644
+
645
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
646
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
647
+ }
648
+
649
+
650
+
589
651
  setSearchParams(localVarUrlObj, localVarQueryParameter);
590
652
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
591
653
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -1048,7 +1110,7 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
1048
1110
  };
1049
1111
  },
1050
1112
  /**
1051
- * 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.
1113
+ * 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.
1052
1114
  * @summary Upload product factors
1053
1115
  * @param {string} [authorization] Bearer Token
1054
1116
  * @param {number} [productVersionId]
@@ -1307,7 +1369,7 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
1307
1369
  };
1308
1370
  },
1309
1371
  /**
1310
- * Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
1372
+ * Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
1311
1373
  * @summary Validate product factors
1312
1374
  * @param {string} [authorization] Bearer Token
1313
1375
  * @param {any} [factors]
@@ -1494,6 +1556,20 @@ export const ProductsApiFp = function(configuration?: Configuration) {
1494
1556
  const localVarAxiosArgs = await localVarAxiosParamCreator.getProductFactorValue(productVersionId, label, key, name, authorization, options);
1495
1557
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1496
1558
  },
1559
+ /**
1560
+ * 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).
1561
+ * @summary Returns all product factors for the product version with all without values
1562
+ * @param {number} productVersionId Product Version Id
1563
+ * @param {string} values Which values to return for every factor (None or Short for short value lists only or All)
1564
+ * @param {string} [authorization] Bearer Token
1565
+ * @param {boolean} [forPublic] true if this is a call from PublivAPI or false otherwise (default)
1566
+ * @param {*} [options] Override http request option.
1567
+ * @throws {RequiredError}
1568
+ */
1569
+ async getProductFactorsForVersion(productVersionId: number, values: string, authorization?: string, forPublic?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetProductFactorsForVersionResponseClass>> {
1570
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getProductFactorsForVersion(productVersionId, values, authorization, forPublic, options);
1571
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1572
+ },
1497
1573
  /**
1498
1574
  * 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.
1499
1575
  * @summary Retrieve the product field
@@ -1605,7 +1681,7 @@ export const ProductsApiFp = function(configuration?: Configuration) {
1605
1681
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1606
1682
  },
1607
1683
  /**
1608
- * 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.
1684
+ * 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.
1609
1685
  * @summary Upload product factors
1610
1686
  * @param {string} [authorization] Bearer Token
1611
1687
  * @param {number} [productVersionId]
@@ -1670,7 +1746,7 @@ export const ProductsApiFp = function(configuration?: Configuration) {
1670
1746
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1671
1747
  },
1672
1748
  /**
1673
- * Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
1749
+ * Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
1674
1750
  * @summary Validate product factors
1675
1751
  * @param {string} [authorization] Bearer Token
1676
1752
  * @param {any} [factors]
@@ -1809,6 +1885,19 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
1809
1885
  getProductFactorValue(productVersionId: number, label: string, key: string, name: string, authorization?: string, options?: any): AxiosPromise<GetProductFactorValueResponseClass> {
1810
1886
  return localVarFp.getProductFactorValue(productVersionId, label, key, name, authorization, options).then((request) => request(axios, basePath));
1811
1887
  },
1888
+ /**
1889
+ * 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).
1890
+ * @summary Returns all product factors for the product version with all without values
1891
+ * @param {number} productVersionId Product Version Id
1892
+ * @param {string} values Which values to return for every factor (None or Short for short value lists only or All)
1893
+ * @param {string} [authorization] Bearer Token
1894
+ * @param {boolean} [forPublic] true if this is a call from PublivAPI or false otherwise (default)
1895
+ * @param {*} [options] Override http request option.
1896
+ * @throws {RequiredError}
1897
+ */
1898
+ getProductFactorsForVersion(productVersionId: number, values: string, authorization?: string, forPublic?: boolean, options?: any): AxiosPromise<GetProductFactorsForVersionResponseClass> {
1899
+ return localVarFp.getProductFactorsForVersion(productVersionId, values, authorization, forPublic, options).then((request) => request(axios, basePath));
1900
+ },
1812
1901
  /**
1813
1902
  * 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.
1814
1903
  * @summary Retrieve the product field
@@ -1913,7 +2002,7 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
1913
2002
  return localVarFp.listProducts(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
1914
2003
  },
1915
2004
  /**
1916
- * 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.
2005
+ * 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.
1917
2006
  * @summary Upload product factors
1918
2007
  * @param {string} [authorization] Bearer Token
1919
2008
  * @param {number} [productVersionId]
@@ -1973,7 +2062,7 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
1973
2062
  return localVarFp.updateProductVersion(id, updateProductVersionRequestDto, authorization, options).then((request) => request(axios, basePath));
1974
2063
  },
1975
2064
  /**
1976
- * Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
2065
+ * Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
1977
2066
  * @summary Validate product factors
1978
2067
  * @param {string} [authorization] Bearer Token
1979
2068
  * @param {any} [factors]
@@ -2252,6 +2341,41 @@ export interface ProductsApiGetProductFactorValueRequest {
2252
2341
  readonly authorization?: string
2253
2342
  }
2254
2343
 
2344
+ /**
2345
+ * Request parameters for getProductFactorsForVersion operation in ProductsApi.
2346
+ * @export
2347
+ * @interface ProductsApiGetProductFactorsForVersionRequest
2348
+ */
2349
+ export interface ProductsApiGetProductFactorsForVersionRequest {
2350
+ /**
2351
+ * Product Version Id
2352
+ * @type {number}
2353
+ * @memberof ProductsApiGetProductFactorsForVersion
2354
+ */
2355
+ readonly productVersionId: number
2356
+
2357
+ /**
2358
+ * Which values to return for every factor (None or Short for short value lists only or All)
2359
+ * @type {string}
2360
+ * @memberof ProductsApiGetProductFactorsForVersion
2361
+ */
2362
+ readonly values: string
2363
+
2364
+ /**
2365
+ * Bearer Token
2366
+ * @type {string}
2367
+ * @memberof ProductsApiGetProductFactorsForVersion
2368
+ */
2369
+ readonly authorization?: string
2370
+
2371
+ /**
2372
+ * true if this is a call from PublivAPI or false otherwise (default)
2373
+ * @type {boolean}
2374
+ * @memberof ProductsApiGetProductFactorsForVersion
2375
+ */
2376
+ readonly forPublic?: boolean
2377
+ }
2378
+
2255
2379
  /**
2256
2380
  * Request parameters for getProductField operation in ProductsApi.
2257
2381
  * @export
@@ -2869,6 +2993,18 @@ export class ProductsApi extends BaseAPI {
2869
2993
  return ProductsApiFp(this.configuration).getProductFactorValue(requestParameters.productVersionId, requestParameters.label, requestParameters.key, requestParameters.name, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
2870
2994
  }
2871
2995
 
2996
+ /**
2997
+ * 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).
2998
+ * @summary Returns all product factors for the product version with all without values
2999
+ * @param {ProductsApiGetProductFactorsForVersionRequest} requestParameters Request parameters.
3000
+ * @param {*} [options] Override http request option.
3001
+ * @throws {RequiredError}
3002
+ * @memberof ProductsApi
3003
+ */
3004
+ public getProductFactorsForVersion(requestParameters: ProductsApiGetProductFactorsForVersionRequest, options?: AxiosRequestConfig) {
3005
+ return ProductsApiFp(this.configuration).getProductFactorsForVersion(requestParameters.productVersionId, requestParameters.values, requestParameters.authorization, requestParameters.forPublic, options).then((request) => request(this.axios, this.basePath));
3006
+ }
3007
+
2872
3008
  /**
2873
3009
  * 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.
2874
3010
  * @summary Retrieve the product field
@@ -2954,7 +3090,7 @@ export class ProductsApi extends BaseAPI {
2954
3090
  }
2955
3091
 
2956
3092
  /**
2957
- * 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.
3093
+ * 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.
2958
3094
  * @summary Upload product factors
2959
3095
  * @param {ProductsApiStoreProductFactorsRequest} requestParameters Request parameters.
2960
3096
  * @param {*} [options] Override http request option.
@@ -3014,7 +3150,7 @@ export class ProductsApi extends BaseAPI {
3014
3150
  }
3015
3151
 
3016
3152
  /**
3017
- * Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
3153
+ * Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
3018
3154
  * @summary Validate product factors
3019
3155
  * @param {ProductsApiValidateProductFactorsRequest} requestParameters Request parameters.
3020
3156
  * @param {*} [options] Override http request option.