@emilgroup/insurance-sdk-node 1.7.3 → 1.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md 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-node@1.7.1 --save
20
+ npm install @emilgroup/insurance-sdk-node@1.7.4 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/insurance-sdk-node@1.7.1
24
+ yarn add @emilgroup/insurance-sdk-node@1.7.4
25
25
  ```
26
26
 
27
27
  And then you can import `PoliciesApi`.
@@ -427,13 +427,16 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
427
427
  * Withdraw policy by tenant.
428
428
  * @summary Withdraw policy by tenant
429
429
  * @param {string} policyCode The policy code.
430
+ * @param {object} body
430
431
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
431
432
  * @param {*} [options] Override http request option.
432
433
  * @throws {RequiredError}
433
434
  */
434
- withdrawPolicy: async (policyCode: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
435
+ withdrawPolicy: async (policyCode: string, body: object, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
435
436
  // verify required parameter 'policyCode' is not null or undefined
436
437
  assertParamExists('withdrawPolicy', 'policyCode', policyCode)
438
+ // verify required parameter 'body' is not null or undefined
439
+ assertParamExists('withdrawPolicy', 'body', body)
437
440
  const localVarPath = `/insuranceservice/v1/policies/{policyCode}/withdraw`
438
441
  .replace(`{${"policyCode"}}`, encodeURIComponent(String(policyCode)));
439
442
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -459,9 +462,12 @@ export const PoliciesApiAxiosParamCreator = function (configuration?: Configurat
459
462
 
460
463
 
461
464
 
465
+ localVarHeaderParameter['Content-Type'] = 'application/json';
466
+
462
467
  setSearchParams(localVarUrlObj, localVarQueryParameter);
463
468
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
464
469
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
470
+ localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration)
465
471
 
466
472
  return {
467
473
  url: toPathString(localVarUrlObj),
@@ -576,12 +582,13 @@ export const PoliciesApiFp = function(configuration?: Configuration) {
576
582
  * Withdraw policy by tenant.
577
583
  * @summary Withdraw policy by tenant
578
584
  * @param {string} policyCode The policy code.
585
+ * @param {object} body
579
586
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
580
587
  * @param {*} [options] Override http request option.
581
588
  * @throws {RequiredError}
582
589
  */
583
- async withdrawPolicy(policyCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WithdrawPolicyResponseClass>> {
584
- const localVarAxiosArgs = await localVarAxiosParamCreator.withdrawPolicy(policyCode, authorization, options);
590
+ async withdrawPolicy(policyCode: string, body: object, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WithdrawPolicyResponseClass>> {
591
+ const localVarAxiosArgs = await localVarAxiosParamCreator.withdrawPolicy(policyCode, body, authorization, options);
585
592
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
586
593
  },
587
594
  }
@@ -685,12 +692,13 @@ export const PoliciesApiFactory = function (configuration?: Configuration, baseP
685
692
  * Withdraw policy by tenant.
686
693
  * @summary Withdraw policy by tenant
687
694
  * @param {string} policyCode The policy code.
695
+ * @param {object} body
688
696
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
689
697
  * @param {*} [options] Override http request option.
690
698
  * @throws {RequiredError}
691
699
  */
692
- withdrawPolicy(policyCode: string, authorization?: string, options?: any): AxiosPromise<WithdrawPolicyResponseClass> {
693
- return localVarFp.withdrawPolicy(policyCode, authorization, options).then((request) => request(axios, basePath));
700
+ withdrawPolicy(policyCode: string, body: object, authorization?: string, options?: any): AxiosPromise<WithdrawPolicyResponseClass> {
701
+ return localVarFp.withdrawPolicy(policyCode, body, authorization, options).then((request) => request(axios, basePath));
694
702
  },
695
703
  };
696
704
  };
@@ -925,6 +933,13 @@ export interface PoliciesApiWithdrawPolicyRequest {
925
933
  */
926
934
  readonly policyCode: string
927
935
 
936
+ /**
937
+ *
938
+ * @type {object}
939
+ * @memberof PoliciesApiWithdrawPolicy
940
+ */
941
+ readonly body: object
942
+
928
943
  /**
929
944
  * Bearer Token: provided by the login endpoint under the name accessToken.
930
945
  * @type {string}
@@ -1033,6 +1048,6 @@ export class PoliciesApi extends BaseAPI {
1033
1048
  * @memberof PoliciesApi
1034
1049
  */
1035
1050
  public withdrawPolicy(requestParameters: PoliciesApiWithdrawPolicyRequest, options?: AxiosRequestConfig) {
1036
- return PoliciesApiFp(this.configuration).withdrawPolicy(requestParameters.policyCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1051
+ return PoliciesApiFp(this.configuration).withdrawPolicy(requestParameters.policyCode, requestParameters.body, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
1037
1052
  }
1038
1053
  }
@@ -105,11 +105,12 @@ export declare const PoliciesApiAxiosParamCreator: (configuration?: Configuratio
105
105
  * Withdraw policy by tenant.
106
106
  * @summary Withdraw policy by tenant
107
107
  * @param {string} policyCode The policy code.
108
+ * @param {object} body
108
109
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
109
110
  * @param {*} [options] Override http request option.
110
111
  * @throws {RequiredError}
111
112
  */
112
- withdrawPolicy: (policyCode: string, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
113
+ withdrawPolicy: (policyCode: string, body: object, authorization?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
113
114
  };
114
115
  /**
115
116
  * PoliciesApi - functional programming interface
@@ -193,11 +194,12 @@ export declare const PoliciesApiFp: (configuration?: Configuration) => {
193
194
  * Withdraw policy by tenant.
194
195
  * @summary Withdraw policy by tenant
195
196
  * @param {string} policyCode The policy code.
197
+ * @param {object} body
196
198
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
197
199
  * @param {*} [options] Override http request option.
198
200
  * @throws {RequiredError}
199
201
  */
200
- withdrawPolicy(policyCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WithdrawPolicyResponseClass>>;
202
+ withdrawPolicy(policyCode: string, body: object, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WithdrawPolicyResponseClass>>;
201
203
  };
202
204
  /**
203
205
  * PoliciesApi - factory interface
@@ -281,11 +283,12 @@ export declare const PoliciesApiFactory: (configuration?: Configuration, basePat
281
283
  * Withdraw policy by tenant.
282
284
  * @summary Withdraw policy by tenant
283
285
  * @param {string} policyCode The policy code.
286
+ * @param {object} body
284
287
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
285
288
  * @param {*} [options] Override http request option.
286
289
  * @throws {RequiredError}
287
290
  */
288
- withdrawPolicy(policyCode: string, authorization?: string, options?: any): AxiosPromise<WithdrawPolicyResponseClass>;
291
+ withdrawPolicy(policyCode: string, body: object, authorization?: string, options?: any): AxiosPromise<WithdrawPolicyResponseClass>;
289
292
  };
290
293
  /**
291
294
  * Request parameters for createPolicy operation in PoliciesApi.
@@ -492,6 +495,12 @@ export interface PoliciesApiWithdrawPolicyRequest {
492
495
  * @memberof PoliciesApiWithdrawPolicy
493
496
  */
494
497
  readonly policyCode: string;
498
+ /**
499
+ *
500
+ * @type {object}
501
+ * @memberof PoliciesApiWithdrawPolicy
502
+ */
503
+ readonly body: object;
495
504
  /**
496
505
  * Bearer Token: provided by the login endpoint under the name accessToken.
497
506
  * @type {string}
@@ -480,11 +480,12 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
480
480
  * Withdraw policy by tenant.
481
481
  * @summary Withdraw policy by tenant
482
482
  * @param {string} policyCode The policy code.
483
+ * @param {object} body
483
484
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
484
485
  * @param {*} [options] Override http request option.
485
486
  * @throws {RequiredError}
486
487
  */
487
- withdrawPolicy: function (policyCode, authorization, options) {
488
+ withdrawPolicy: function (policyCode, body, authorization, options) {
488
489
  if (options === void 0) { options = {}; }
489
490
  return __awaiter(_this, void 0, void 0, function () {
490
491
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
@@ -493,6 +494,8 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
493
494
  case 0:
494
495
  // verify required parameter 'policyCode' is not null or undefined
495
496
  (0, common_1.assertParamExists)('withdrawPolicy', 'policyCode', policyCode);
497
+ // verify required parameter 'body' is not null or undefined
498
+ (0, common_1.assertParamExists)('withdrawPolicy', 'body', body);
496
499
  localVarPath = "/insuranceservice/v1/policies/{policyCode}/withdraw"
497
500
  .replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)));
498
501
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -513,9 +516,11 @@ var PoliciesApiAxiosParamCreator = function (configuration) {
513
516
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
514
517
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
515
518
  }
519
+ localVarHeaderParameter['Content-Type'] = 'application/json';
516
520
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
517
521
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
518
522
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
523
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
519
524
  return [2 /*return*/, {
520
525
  url: (0, common_1.toPathString)(localVarUrlObj),
521
526
  options: localVarRequestOptions,
@@ -695,16 +700,17 @@ var PoliciesApiFp = function (configuration) {
695
700
  * Withdraw policy by tenant.
696
701
  * @summary Withdraw policy by tenant
697
702
  * @param {string} policyCode The policy code.
703
+ * @param {object} body
698
704
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
699
705
  * @param {*} [options] Override http request option.
700
706
  * @throws {RequiredError}
701
707
  */
702
- withdrawPolicy: function (policyCode, authorization, options) {
708
+ withdrawPolicy: function (policyCode, body, authorization, options) {
703
709
  return __awaiter(this, void 0, void 0, function () {
704
710
  var localVarAxiosArgs;
705
711
  return __generator(this, function (_a) {
706
712
  switch (_a.label) {
707
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.withdrawPolicy(policyCode, authorization, options)];
713
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.withdrawPolicy(policyCode, body, authorization, options)];
708
714
  case 1:
709
715
  localVarAxiosArgs = _a.sent();
710
716
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -813,12 +819,13 @@ var PoliciesApiFactory = function (configuration, basePath, axios) {
813
819
  * Withdraw policy by tenant.
814
820
  * @summary Withdraw policy by tenant
815
821
  * @param {string} policyCode The policy code.
822
+ * @param {object} body
816
823
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
817
824
  * @param {*} [options] Override http request option.
818
825
  * @throws {RequiredError}
819
826
  */
820
- withdrawPolicy: function (policyCode, authorization, options) {
821
- return localVarFp.withdrawPolicy(policyCode, authorization, options).then(function (request) { return request(axios, basePath); });
827
+ withdrawPolicy: function (policyCode, body, authorization, options) {
828
+ return localVarFp.withdrawPolicy(policyCode, body, authorization, options).then(function (request) { return request(axios, basePath); });
822
829
  },
823
830
  };
824
831
  };
@@ -929,7 +936,7 @@ var PoliciesApi = /** @class */ (function (_super) {
929
936
  */
930
937
  PoliciesApi.prototype.withdrawPolicy = function (requestParameters, options) {
931
938
  var _this = this;
932
- return (0, exports.PoliciesApiFp)(this.configuration).withdrawPolicy(requestParameters.policyCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
939
+ return (0, exports.PoliciesApiFp)(this.configuration).withdrawPolicy(requestParameters.policyCode, requestParameters.body, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
933
940
  };
934
941
  return PoliciesApi;
935
942
  }(base_1.BaseAPI));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@emilgroup/insurance-sdk-node",
3
- "version": "1.7.3",
3
+ "version": "1.7.4",
4
4
  "description": "OpenAPI client for @emilgroup/insurance-sdk-node",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -23,7 +23,7 @@
23
23
  "url": "^0.11.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@types/node": "^12.11.5",
26
+ "@types/node": "^12.11.5",
27
27
  "typescript": "^4.0"
28
28
  }
29
29
  }