@emilgroup/insurance-sdk 1.38.0 → 1.39.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.
@@ -102,6 +102,7 @@ models/list-lead-versions-response-class.ts
102
102
  models/list-leads-response-class.ts
103
103
  models/list-named-ranges-response-class.ts
104
104
  models/list-policies-response-class.ts
105
+ models/list-policy-objects-response-class.ts
105
106
  models/list-premium-formulas-response-class.ts
106
107
  models/list-product-factors-response-class.ts
107
108
  models/list-product-field-types-response-class.ts
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/insurance-sdk@1.38.0 --save
20
+ npm install @emilgroup/insurance-sdk@1.39.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/insurance-sdk@1.38.0
24
+ yarn add @emilgroup/insurance-sdk@1.39.0
25
25
  ```
26
26
 
27
27
  And then you can import `PoliciesApi`.
@@ -33,6 +33,8 @@ import { GetPolicyResponseClass } from '../models';
33
33
  // @ts-ignore
34
34
  import { ListPoliciesResponseClass } from '../models';
35
35
  // @ts-ignore
36
+ import { ListPolicyObjectsResponseClass } from '../models';
37
+ // @ts-ignore
36
38
  import { PatchPolicyRequestDto } from '../models';
37
39
  // @ts-ignore
38
40
  import { PatchPolicyResponseClass } from '../models';
@@ -316,6 +318,79 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
316
318
 
317
319
 
318
320
 
321
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
322
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
323
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
324
+
325
+ return {
326
+ url: toPathString(localVarUrlObj),
327
+ options: localVarRequestOptions,
328
+ };
329
+ },
330
+ /**
331
+ * This will return a policy objects for the given policy. You may filter the objects to return by the insured object, or return only the objects that exists for a particular date (providing the object code or ID).
332
+ * @summary List policy objects
333
+ * @param {string} filter Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.<br/> <br/> <i>Allowed values: id, code, insuredObjectId, policyCode, date</i> <br/> <i>policyCode</i> is required, other filters are optional.
334
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
335
+ * @param {number} [pageSize] Page size.
336
+ * @param {string} [pageToken] Page token.
337
+ * @param {string} [search] Search query.
338
+ * @param {string} [order] Order allowing you to specify the desired order of entities retrieved from the server.<br/> <br/> <i>Allowed values: id, code, timesliceId, insuredObjectId, insuredObject, createdAt, updatedAt</i>
339
+ * @param {string} [expand] No expanding supported
340
+ * @param {*} [options] Override http request option.
341
+ * @throws {RequiredError}
342
+ */
343
+ listPolicyObjects: async (filter: string, authorization?: string, pageSize?: number, pageToken?: string, search?: string, order?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
344
+ // verify required parameter 'filter' is not null or undefined
345
+ assertParamExists('listPolicyObjects', 'filter', filter)
346
+ const localVarPath = `/insuranceservice/v1/policies/policy-objects`;
347
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
348
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
349
+ let baseOptions;
350
+ let baseAccessToken;
351
+ if (configuration) {
352
+ baseOptions = configuration.baseOptions;
353
+ baseAccessToken = configuration.accessToken;
354
+ }
355
+
356
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
357
+ const localVarHeaderParameter = {} as any;
358
+ const localVarQueryParameter = {} as any;
359
+
360
+ // authentication bearer required
361
+ // http bearer authentication required
362
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
363
+
364
+ if (pageSize !== undefined) {
365
+ localVarQueryParameter['pageSize'] = pageSize;
366
+ }
367
+
368
+ if (pageToken !== undefined) {
369
+ localVarQueryParameter['pageToken'] = pageToken;
370
+ }
371
+
372
+ if (filter !== undefined) {
373
+ localVarQueryParameter['filter'] = filter;
374
+ }
375
+
376
+ if (search !== undefined) {
377
+ localVarQueryParameter['search'] = search;
378
+ }
379
+
380
+ if (order !== undefined) {
381
+ localVarQueryParameter['order'] = order;
382
+ }
383
+
384
+ if (expand !== undefined) {
385
+ localVarQueryParameter['expand'] = expand;
386
+ }
387
+
388
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
389
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
390
+ }
391
+
392
+
393
+
319
394
  setSearchParams(localVarUrlObj, localVarQueryParameter);
320
395
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
321
396
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -658,6 +733,23 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
658
733
  const localVarAxiosArgs = await localVarAxiosParamCreator.listPolicies(authorization, pageSize, pageToken, filter, search, order, expand, options);
659
734
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
660
735
  },
736
+ /**
737
+ * This will return a policy objects for the given policy. You may filter the objects to return by the insured object, or return only the objects that exists for a particular date (providing the object code or ID).
738
+ * @summary List policy objects
739
+ * @param {string} filter Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, insuredObjectId, policyCode, date&lt;/i&gt; &lt;br/&gt; &lt;i&gt;policyCode&lt;/i&gt; is required, other filters are optional.
740
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
741
+ * @param {number} [pageSize] Page size.
742
+ * @param {string} [pageToken] Page token.
743
+ * @param {string} [search] Search query.
744
+ * @param {string} [order] Order allowing you to specify the desired order of entities retrieved from the server.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, timesliceId, insuredObjectId, insuredObject, createdAt, updatedAt&lt;/i&gt;
745
+ * @param {string} [expand] No expanding supported
746
+ * @param {*} [options] Override http request option.
747
+ * @throws {RequiredError}
748
+ */
749
+ async listPolicyObjects(filter: string, authorization?: string, pageSize?: number, pageToken?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListPolicyObjectsResponseClass>> {
750
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listPolicyObjects(filter, authorization, pageSize, pageToken, search, order, expand, options);
751
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
752
+ },
661
753
  /**
662
754
  * Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
663
755
  * @summary Update the policy
@@ -796,6 +888,22 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
796
888
  listPolicies(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: 'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas', options?: any): AxiosPromise<ListPoliciesResponseClass> {
797
889
  return localVarFp.listPolicies(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
798
890
  },
891
+ /**
892
+ * This will return a policy objects for the given policy. You may filter the objects to return by the insured object, or return only the objects that exists for a particular date (providing the object code or ID).
893
+ * @summary List policy objects
894
+ * @param {string} filter Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, insuredObjectId, policyCode, date&lt;/i&gt; &lt;br/&gt; &lt;i&gt;policyCode&lt;/i&gt; is required, other filters are optional.
895
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
896
+ * @param {number} [pageSize] Page size.
897
+ * @param {string} [pageToken] Page token.
898
+ * @param {string} [search] Search query.
899
+ * @param {string} [order] Order allowing you to specify the desired order of entities retrieved from the server.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, timesliceId, insuredObjectId, insuredObject, createdAt, updatedAt&lt;/i&gt;
900
+ * @param {string} [expand] No expanding supported
901
+ * @param {*} [options] Override http request option.
902
+ * @throws {RequiredError}
903
+ */
904
+ listPolicyObjects(filter: string, authorization?: string, pageSize?: number, pageToken?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListPolicyObjectsResponseClass> {
905
+ return localVarFp.listPolicyObjects(filter, authorization, pageSize, pageToken, search, order, expand, options).then((request) => request(axios, basePath));
906
+ },
799
907
  /**
800
908
  * Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
801
909
  * @summary Update the policy
@@ -1020,6 +1128,62 @@ export interface PoliciesApiListPoliciesRequest {
1020
1128
  readonly expand?: 'versions' | 'product' | 'timelines' | 'premiums' | 'premiumItems' | 'premiumFormulas' | 'currentVersion' | 'currentTimelines' | 'currentPremiums' | 'currentPremiumItems' | 'currentPremiumFormulas'
1021
1129
  }
1022
1130
 
1131
+ /**
1132
+ * Request parameters for listPolicyObjects operation in PoliciesApi.
1133
+ * @export
1134
+ * @interface PoliciesApiListPolicyObjectsRequest
1135
+ */
1136
+ export interface PoliciesApiListPolicyObjectsRequest {
1137
+ /**
1138
+ * Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, insuredObjectId, policyCode, date&lt;/i&gt; &lt;br/&gt; &lt;i&gt;policyCode&lt;/i&gt; is required, other filters are optional.
1139
+ * @type {string}
1140
+ * @memberof PoliciesApiListPolicyObjects
1141
+ */
1142
+ readonly filter: string
1143
+
1144
+ /**
1145
+ * Bearer Token: provided by the login endpoint under the name accessToken.
1146
+ * @type {string}
1147
+ * @memberof PoliciesApiListPolicyObjects
1148
+ */
1149
+ readonly authorization?: string
1150
+
1151
+ /**
1152
+ * Page size.
1153
+ * @type {number}
1154
+ * @memberof PoliciesApiListPolicyObjects
1155
+ */
1156
+ readonly pageSize?: number
1157
+
1158
+ /**
1159
+ * Page token.
1160
+ * @type {string}
1161
+ * @memberof PoliciesApiListPolicyObjects
1162
+ */
1163
+ readonly pageToken?: string
1164
+
1165
+ /**
1166
+ * Search query.
1167
+ * @type {string}
1168
+ * @memberof PoliciesApiListPolicyObjects
1169
+ */
1170
+ readonly search?: string
1171
+
1172
+ /**
1173
+ * Order allowing you to specify the desired order of entities retrieved from the server.&lt;br/&gt; &lt;br/&gt; &lt;i&gt;Allowed values: id, code, timesliceId, insuredObjectId, insuredObject, createdAt, updatedAt&lt;/i&gt;
1174
+ * @type {string}
1175
+ * @memberof PoliciesApiListPolicyObjects
1176
+ */
1177
+ readonly order?: string
1178
+
1179
+ /**
1180
+ * No expanding supported
1181
+ * @type {string}
1182
+ * @memberof PoliciesApiListPolicyObjects
1183
+ */
1184
+ readonly expand?: string
1185
+ }
1186
+
1023
1187
  /**
1024
1188
  * Request parameters for patchPolicy operation in PoliciesApi.
1025
1189
  * @export
@@ -1227,6 +1391,18 @@ export class PoliciesApi extends BaseAPI {
1227
1391
  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));
1228
1392
  }
1229
1393
 
1394
+ /**
1395
+ * This will return a policy objects for the given policy. You may filter the objects to return by the insured object, or return only the objects that exists for a particular date (providing the object code or ID).
1396
+ * @summary List policy objects
1397
+ * @param {PoliciesApiListPolicyObjectsRequest} requestParameters Request parameters.
1398
+ * @param {*} [options] Override http request option.
1399
+ * @throws {RequiredError}
1400
+ * @memberof PoliciesApi
1401
+ */
1402
+ public listPolicyObjects(requestParameters: PoliciesApiListPolicyObjectsRequest, options?: AxiosRequestConfig) {
1403
+ return PoliciesApiFp(this.configuration).listPolicyObjects(requestParameters.filter, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
1404
+ }
1405
+
1230
1406
  /**
1231
1407
  * Updates the specified policy by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1232
1408
  * @summary Update the policy
package/models/index.ts CHANGED
@@ -77,6 +77,7 @@ export * from './list-lead-versions-response-class';
77
77
  export * from './list-leads-response-class';
78
78
  export * from './list-named-ranges-response-class';
79
79
  export * from './list-policies-response-class';
80
+ export * from './list-policy-objects-response-class';
80
81
  export * from './list-premium-formulas-response-class';
81
82
  export * from './list-product-factors-response-class';
82
83
  export * from './list-product-field-types-response-class';
@@ -0,0 +1,49 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL InsuranceService
5
+ * The EMIL InsuranceService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import { PolicyObjectClass } from './policy-object-class';
17
+
18
+ /**
19
+ *
20
+ * @export
21
+ * @interface ListPolicyObjectsResponseClass
22
+ */
23
+ export interface ListPolicyObjectsResponseClass {
24
+ /**
25
+ * Policy objects
26
+ * @type {Array<PolicyObjectClass>}
27
+ * @memberof ListPolicyObjectsResponseClass
28
+ */
29
+ 'items': Array<PolicyObjectClass>;
30
+ /**
31
+ * Next page token.
32
+ * @type {string}
33
+ * @memberof ListPolicyObjectsResponseClass
34
+ */
35
+ 'nextPageToken': string;
36
+ /**
37
+ * Items per page.
38
+ * @type {number}
39
+ * @memberof ListPolicyObjectsResponseClass
40
+ */
41
+ 'itemsPerPage': number;
42
+ /**
43
+ * Total amount of items.
44
+ * @type {number}
45
+ * @memberof ListPolicyObjectsResponseClass
46
+ */
47
+ 'totalItems': number;
48
+ }
49
+
@@ -31,10 +31,10 @@ export interface TerminatePolicyRequestDto {
31
31
  * @type {string}
32
32
  * @memberof TerminatePolicyRequestDto
33
33
  */
34
- 'reason'?: TerminatePolicyRequestDtoReasonEnum;
34
+ 'terminationReason'?: TerminatePolicyRequestDtoTerminationReasonEnum;
35
35
  }
36
36
 
37
- export const TerminatePolicyRequestDtoReasonEnum = {
37
+ export const TerminatePolicyRequestDtoTerminationReasonEnum = {
38
38
  TerminationAtRenewal: 'termination_at_renewal',
39
39
  TerminationAfterClaim: 'termination_after_claim',
40
40
  TerminationDueToUnderwriting: 'termination_due_to_underwriting',
@@ -48,6 +48,6 @@ export const TerminatePolicyRequestDtoReasonEnum = {
48
48
  Other: 'other'
49
49
  } as const;
50
50
 
51
- export type TerminatePolicyRequestDtoReasonEnum = typeof TerminatePolicyRequestDtoReasonEnum[keyof typeof TerminatePolicyRequestDtoReasonEnum];
51
+ export type TerminatePolicyRequestDtoTerminationReasonEnum = typeof TerminatePolicyRequestDtoTerminationReasonEnum[keyof typeof TerminatePolicyRequestDtoTerminationReasonEnum];
52
52
 
53
53
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/insurance-sdk",
3
- "version": "1.38.0",
3
+ "version": "1.39.0",
4
4
  "description": "OpenAPI client for @emilgroup/insurance-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [