@emilgroup/customer-sdk-node 1.25.0 → 1.25.1

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 (206) hide show
  1. package/README.md +2 -2
  2. package/dist/api/authentication-api.d.ts +332 -0
  3. package/dist/api/authentication-api.js +604 -0
  4. package/dist/api/claims-api.d.ts +431 -0
  5. package/dist/api/claims-api.js +670 -0
  6. package/dist/api/customers-api.d.ts +271 -0
  7. package/dist/api/customers-api.js +425 -0
  8. package/dist/api/default-api.d.ts +66 -0
  9. package/dist/api/default-api.js +200 -0
  10. package/dist/api/documents-api.d.ts +262 -0
  11. package/dist/api/documents-api.js +417 -0
  12. package/dist/api/invites-api.d.ts +249 -0
  13. package/dist/api/invites-api.js +456 -0
  14. package/dist/api/invoices-api.d.ts +150 -0
  15. package/dist/api/invoices-api.js +253 -0
  16. package/dist/api/leads-api.d.ts +365 -0
  17. package/dist/api/leads-api.js +571 -0
  18. package/dist/api/payments-api.d.ts +162 -0
  19. package/dist/api/payments-api.js +306 -0
  20. package/dist/api/policies-api.d.ts +578 -0
  21. package/dist/api/policies-api.js +808 -0
  22. package/dist/api/products-api.d.ts +215 -0
  23. package/dist/api/products-api.js +341 -0
  24. package/dist/api.d.ts +22 -0
  25. package/dist/api.js +40 -0
  26. package/dist/base.d.ts +82 -0
  27. package/dist/base.js +502 -0
  28. package/dist/common.d.ts +66 -0
  29. package/dist/common.js +244 -0
  30. package/dist/configuration.d.ts +98 -0
  31. package/dist/configuration.js +45 -0
  32. package/dist/index.d.ts +15 -0
  33. package/dist/index.js +36 -0
  34. package/dist/models/account-class.d.ts +169 -0
  35. package/dist/models/account-class.js +26 -0
  36. package/dist/models/account-policy-class.d.ts +30 -0
  37. package/dist/models/account-policy-class.js +15 -0
  38. package/dist/models/authentication-result-class.d.ts +30 -0
  39. package/dist/models/authentication-result-class.js +15 -0
  40. package/dist/models/claim-class.d.ts +156 -0
  41. package/dist/models/claim-class.js +15 -0
  42. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +48 -0
  43. package/dist/models/complete-braintree-payment-setup-request-dto.js +15 -0
  44. package/dist/models/complete-payment-setup-psp-request.d.ts +32 -0
  45. package/dist/models/complete-payment-setup-psp-request.js +15 -0
  46. package/dist/models/complete-payment-setup-response-class.d.ts +24 -0
  47. package/dist/models/complete-payment-setup-response-class.js +15 -0
  48. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +60 -0
  49. package/dist/models/complete-stripe-payment-setup-request-dto.js +15 -0
  50. package/dist/models/create-account-request-dto.d.ts +132 -0
  51. package/dist/models/create-account-request-dto.js +31 -0
  52. package/dist/models/create-bank-account-request-dto.d.ts +30 -0
  53. package/dist/models/create-bank-account-request-dto.js +15 -0
  54. package/dist/models/create-customer-claim-request-dto.d.ts +114 -0
  55. package/dist/models/create-customer-claim-request-dto.js +15 -0
  56. package/dist/models/create-customer-claim-response-class.d.ts +25 -0
  57. package/dist/models/create-customer-claim-response-class.js +15 -0
  58. package/dist/models/create-customer-request-dto.d.ts +43 -0
  59. package/dist/models/create-customer-request-dto.js +15 -0
  60. package/dist/models/create-customer-response-class.d.ts +25 -0
  61. package/dist/models/create-customer-response-class.js +15 -0
  62. package/dist/models/create-lead-request-dto.d.ts +83 -0
  63. package/dist/models/create-lead-request-dto.js +15 -0
  64. package/dist/models/create-lead-response-class.d.ts +25 -0
  65. package/dist/models/create-lead-response-class.js +15 -0
  66. package/dist/models/create-payment-method-request-dto.d.ts +31 -0
  67. package/dist/models/create-payment-method-request-dto.js +15 -0
  68. package/dist/models/create-policy-request-dto.d.ts +56 -0
  69. package/dist/models/create-policy-request-dto.js +15 -0
  70. package/dist/models/create-presigned-post-response-class.d.ts +30 -0
  71. package/dist/models/create-presigned-post-response-class.js +15 -0
  72. package/dist/models/customer-class.d.ts +73 -0
  73. package/dist/models/customer-class.js +15 -0
  74. package/dist/models/customer-document-class.d.ts +99 -0
  75. package/dist/models/customer-document-class.js +36 -0
  76. package/dist/models/customer-product-class.d.ts +54 -0
  77. package/dist/models/customer-product-class.js +15 -0
  78. package/dist/models/forgot-password-request-dto.d.ts +30 -0
  79. package/dist/models/forgot-password-request-dto.js +15 -0
  80. package/dist/models/get-customer-claim-response-class.d.ts +25 -0
  81. package/dist/models/get-customer-claim-response-class.js +15 -0
  82. package/dist/models/get-customer-document-download-url-response-class.d.ts +24 -0
  83. package/dist/models/get-customer-document-download-url-response-class.js +15 -0
  84. package/dist/models/get-customer-response-class.d.ts +25 -0
  85. package/dist/models/get-customer-response-class.js +15 -0
  86. package/dist/models/get-lead-response-class.d.ts +25 -0
  87. package/dist/models/get-lead-response-class.js +15 -0
  88. package/dist/models/get-policy-response-class.d.ts +25 -0
  89. package/dist/models/get-policy-response-class.js +15 -0
  90. package/dist/models/get-product-response-class.d.ts +25 -0
  91. package/dist/models/get-product-response-class.js +15 -0
  92. package/dist/models/grpc-update-lead-request-dto.d.ts +50 -0
  93. package/dist/models/grpc-update-lead-request-dto.js +15 -0
  94. package/dist/models/index.d.ts +85 -0
  95. package/dist/models/index.js +101 -0
  96. package/dist/models/initiate-auth-request-dto.d.ts +36 -0
  97. package/dist/models/initiate-auth-request-dto.js +15 -0
  98. package/dist/models/initiate-auth-response-class.d.ts +43 -0
  99. package/dist/models/initiate-auth-response-class.js +15 -0
  100. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +24 -0
  101. package/dist/models/initiate-braintree-payment-setup-response-class.js +15 -0
  102. package/dist/models/initiate-payment-setup-response-class.d.ts +32 -0
  103. package/dist/models/initiate-payment-setup-response-class.js +15 -0
  104. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +30 -0
  105. package/dist/models/initiate-stripe-payment-setup-response-class.js +15 -0
  106. package/dist/models/inline-response200.d.ts +54 -0
  107. package/dist/models/inline-response200.js +15 -0
  108. package/dist/models/inline-response503.d.ts +54 -0
  109. package/dist/models/inline-response503.js +15 -0
  110. package/dist/models/invite-by-customer-request-dto.d.ts +30 -0
  111. package/dist/models/invite-by-customer-request-dto.js +15 -0
  112. package/dist/models/invite-by-customer-response-class.d.ts +25 -0
  113. package/dist/models/invite-by-customer-response-class.js +15 -0
  114. package/dist/models/invite-by-tenant-request-dto.d.ts +24 -0
  115. package/dist/models/invite-by-tenant-request-dto.js +15 -0
  116. package/dist/models/invite-by-tenant-response-class.d.ts +25 -0
  117. package/dist/models/invite-by-tenant-response-class.js +15 -0
  118. package/dist/models/invite-class.d.ts +54 -0
  119. package/dist/models/invite-class.js +15 -0
  120. package/dist/models/invoice-class.d.ts +148 -0
  121. package/dist/models/invoice-class.js +28 -0
  122. package/dist/models/lead-bank-account-class.d.ts +30 -0
  123. package/dist/models/lead-bank-account-class.js +15 -0
  124. package/dist/models/lead-class.d.ts +121 -0
  125. package/dist/models/lead-class.js +15 -0
  126. package/dist/models/list-customer-claims-response-class.d.ts +31 -0
  127. package/dist/models/list-customer-claims-response-class.js +15 -0
  128. package/dist/models/list-documents-response-class.d.ts +31 -0
  129. package/dist/models/list-documents-response-class.js +15 -0
  130. package/dist/models/list-invoices-response-class.d.ts +31 -0
  131. package/dist/models/list-invoices-response-class.js +15 -0
  132. package/dist/models/list-leads-response-class.d.ts +43 -0
  133. package/dist/models/list-leads-response-class.js +15 -0
  134. package/dist/models/list-policies-response-class.d.ts +43 -0
  135. package/dist/models/list-policies-response-class.js +15 -0
  136. package/dist/models/list-products-response-class.d.ts +31 -0
  137. package/dist/models/list-products-response-class.js +15 -0
  138. package/dist/models/policy-class.d.ts +80 -0
  139. package/dist/models/policy-class.js +15 -0
  140. package/dist/models/policy-object-class.d.ts +54 -0
  141. package/dist/models/policy-object-class.js +15 -0
  142. package/dist/models/policy-object-dto.d.ts +42 -0
  143. package/dist/models/policy-object-dto.js +15 -0
  144. package/dist/models/policy-premium-class.d.ts +43 -0
  145. package/dist/models/policy-premium-class.js +15 -0
  146. package/dist/models/policy-premium-item-class.d.ts +36 -0
  147. package/dist/models/policy-premium-item-class.js +15 -0
  148. package/dist/models/policy-version-class.d.ts +49 -0
  149. package/dist/models/policy-version-class.js +15 -0
  150. package/dist/models/premium-override-dto.d.ts +55 -0
  151. package/dist/models/premium-override-dto.js +27 -0
  152. package/dist/models/premium-override-request-class.d.ts +25 -0
  153. package/dist/models/premium-override-request-class.js +15 -0
  154. package/dist/models/premium-override-request-dto.d.ts +25 -0
  155. package/dist/models/premium-override-request-dto.js +15 -0
  156. package/dist/models/refresh-token-dto.d.ts +30 -0
  157. package/dist/models/refresh-token-dto.js +15 -0
  158. package/dist/models/request-policy-update-request-dto.d.ts +43 -0
  159. package/dist/models/request-policy-update-request-dto.js +15 -0
  160. package/dist/models/request-policy-update-response-class.d.ts +25 -0
  161. package/dist/models/request-policy-update-response-class.js +15 -0
  162. package/dist/models/reset-password-by-customer-request-dto.d.ts +36 -0
  163. package/dist/models/reset-password-by-customer-request-dto.js +15 -0
  164. package/dist/models/respond-to-auth-challenge-class.d.ts +43 -0
  165. package/dist/models/respond-to-auth-challenge-class.js +15 -0
  166. package/dist/models/respond-to-auth-challenge-request-dto.d.ts +42 -0
  167. package/dist/models/respond-to-auth-challenge-request-dto.js +15 -0
  168. package/dist/models/sepa-dto.d.ts +30 -0
  169. package/dist/models/sepa-dto.js +15 -0
  170. package/dist/models/shared-customer-policy-object-request-dto.d.ts +36 -0
  171. package/dist/models/shared-customer-policy-object-request-dto.js +15 -0
  172. package/dist/models/shared-invoice-item-class.d.ts +129 -0
  173. package/dist/models/shared-invoice-item-class.js +24 -0
  174. package/dist/models/shared-invoice-status-class.d.ts +47 -0
  175. package/dist/models/shared-invoice-status-class.js +20 -0
  176. package/dist/models/terminate-customer-policy-request-dto.d.ts +24 -0
  177. package/dist/models/terminate-customer-policy-request-dto.js +15 -0
  178. package/dist/models/terminate-customer-policy-response-class.d.ts +25 -0
  179. package/dist/models/terminate-customer-policy-response-class.js +15 -0
  180. package/dist/models/timeslice-class.d.ts +56 -0
  181. package/dist/models/timeslice-class.js +15 -0
  182. package/dist/models/update-account-request-dto.d.ts +113 -0
  183. package/dist/models/update-account-request-dto.js +25 -0
  184. package/dist/models/update-customer-claim-request-dto.d.ts +120 -0
  185. package/dist/models/update-customer-claim-request-dto.js +15 -0
  186. package/dist/models/update-customer-claim-response-class.d.ts +25 -0
  187. package/dist/models/update-customer-claim-response-class.js +15 -0
  188. package/dist/models/update-customer-request-dto.d.ts +31 -0
  189. package/dist/models/update-customer-request-dto.js +15 -0
  190. package/dist/models/update-customer-response-class.d.ts +25 -0
  191. package/dist/models/update-customer-response-class.js +15 -0
  192. package/dist/models/update-lead-request-dto.d.ts +44 -0
  193. package/dist/models/update-lead-request-dto.js +15 -0
  194. package/dist/models/update-lead-response-class.d.ts +25 -0
  195. package/dist/models/update-lead-response-class.js +15 -0
  196. package/dist/models/upload-customer-claim-documents-request-dto.d.ts +36 -0
  197. package/dist/models/upload-customer-claim-documents-request-dto.js +15 -0
  198. package/dist/models/upload-customer-policy-documents-request-dto.d.ts +47 -0
  199. package/dist/models/upload-customer-policy-documents-request-dto.js +20 -0
  200. package/dist/models/uploaded-document-dto.d.ts +24 -0
  201. package/dist/models/uploaded-document-dto.js +15 -0
  202. package/dist/models/verify-customer-invite-response-class.d.ts +36 -0
  203. package/dist/models/verify-customer-invite-response-class.js +15 -0
  204. package/dist/models/withdraw-customer-policy-response-class.d.ts +25 -0
  205. package/dist/models/withdraw-customer-policy-response-class.js +15 -0
  206. package/package.json +2 -2
@@ -0,0 +1,808 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL CustomerService
6
+ * The EMIL CustomerService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ * Contact: kontakt@emil.de
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ var __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.PoliciesApi = exports.PoliciesApiFactory = exports.PoliciesApiFp = exports.PoliciesApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ // URLSearchParams not necessarily used
89
+ // @ts-ignore
90
+ var url_1 = require("url");
91
+ var FormData = require('form-data');
92
+ /**
93
+ * PoliciesApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var PoliciesApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * Get detailed policy that belongs to a customer; the details are filtered to return only the current version and the interval timeline that the provided date is included. If the date is not specified, the system will return the whole timeline.
101
+ * @summary Get current version details
102
+ * @param {string} policyCode The policy code.
103
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
104
+ * @param {string} [timesliceDate] This date is used to filter data of the policy, to select the appropriate timeslice. If no date is specified, the system returns all the timeslices.
105
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
106
+ * @param {*} [options] Override http request option.
107
+ * @throws {RequiredError}
108
+ */
109
+ getCustomerPolicyDataByDate: function (policyCode, customerCode, timesliceDate, authorization, options) {
110
+ if (options === void 0) { options = {}; }
111
+ return __awaiter(_this, void 0, void 0, function () {
112
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
113
+ return __generator(this, function (_a) {
114
+ // verify required parameter 'policyCode' is not null or undefined
115
+ (0, common_1.assertParamExists)('getCustomerPolicyDataByDate', 'policyCode', policyCode);
116
+ // verify required parameter 'customerCode' is not null or undefined
117
+ (0, common_1.assertParamExists)('getCustomerPolicyDataByDate', 'customerCode', customerCode);
118
+ localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}/current-version"
119
+ .replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)))
120
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
121
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
122
+ if (configuration) {
123
+ baseOptions = configuration.baseOptions;
124
+ baseAccessToken = configuration.accessToken;
125
+ }
126
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
127
+ localVarHeaderParameter = {};
128
+ localVarQueryParameter = {};
129
+ if (timesliceDate !== undefined) {
130
+ localVarQueryParameter['timesliceDate'] = timesliceDate;
131
+ }
132
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
134
+ }
135
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
136
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
137
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
138
+ return [2 /*return*/, {
139
+ url: (0, common_1.toPathString)(localVarUrlObj),
140
+ options: localVarRequestOptions,
141
+ }];
142
+ });
143
+ });
144
+ },
145
+ /**
146
+ * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
147
+ * @summary Get policy details
148
+ * @param {string} policyCode The policy code.
149
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
150
+ * @param {string} [expand] Fields to expand response by - [versions, premiumItems]
151
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
152
+ * @param {*} [options] Override http request option.
153
+ * @throws {RequiredError}
154
+ */
155
+ getPolicy: function (policyCode, customerCode, expand, authorization, options) {
156
+ if (options === void 0) { options = {}; }
157
+ return __awaiter(_this, void 0, void 0, function () {
158
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
159
+ return __generator(this, function (_a) {
160
+ // verify required parameter 'policyCode' is not null or undefined
161
+ (0, common_1.assertParamExists)('getPolicy', 'policyCode', policyCode);
162
+ // verify required parameter 'customerCode' is not null or undefined
163
+ (0, common_1.assertParamExists)('getPolicy', 'customerCode', customerCode);
164
+ localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}"
165
+ .replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)))
166
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
167
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
168
+ if (configuration) {
169
+ baseOptions = configuration.baseOptions;
170
+ baseAccessToken = configuration.accessToken;
171
+ }
172
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
173
+ localVarHeaderParameter = {};
174
+ localVarQueryParameter = {};
175
+ if (expand !== undefined) {
176
+ localVarQueryParameter['expand'] = expand;
177
+ }
178
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
179
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
180
+ }
181
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
182
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
183
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
184
+ return [2 /*return*/, {
185
+ url: (0, common_1.toPathString)(localVarUrlObj),
186
+ options: localVarRequestOptions,
187
+ }];
188
+ });
189
+ });
190
+ },
191
+ /**
192
+ * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
193
+ * @summary List policies
194
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
195
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
196
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
197
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
198
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
199
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
200
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
201
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
202
+ * @param {*} [options] Override http request option.
203
+ * @throws {RequiredError}
204
+ */
205
+ listPolicies: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
206
+ if (options === void 0) { options = {}; }
207
+ return __awaiter(_this, void 0, void 0, function () {
208
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
209
+ return __generator(this, function (_a) {
210
+ // verify required parameter 'customerCode' is not null or undefined
211
+ (0, common_1.assertParamExists)('listPolicies', 'customerCode', customerCode);
212
+ localVarPath = "/v1/customers/{customerCode}/policies"
213
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
214
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
215
+ if (configuration) {
216
+ baseOptions = configuration.baseOptions;
217
+ baseAccessToken = configuration.accessToken;
218
+ }
219
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
220
+ localVarHeaderParameter = {};
221
+ localVarQueryParameter = {};
222
+ if (pageSize !== undefined) {
223
+ localVarQueryParameter['pageSize'] = pageSize;
224
+ }
225
+ if (pageToken !== undefined) {
226
+ localVarQueryParameter['pageToken'] = pageToken;
227
+ }
228
+ if (filter !== undefined) {
229
+ localVarQueryParameter['filter'] = filter;
230
+ }
231
+ if (search !== undefined) {
232
+ localVarQueryParameter['search'] = search;
233
+ }
234
+ if (order !== undefined) {
235
+ localVarQueryParameter['order'] = order;
236
+ }
237
+ if (expand !== undefined) {
238
+ localVarQueryParameter['expand'] = expand;
239
+ }
240
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
241
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
242
+ }
243
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
244
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
245
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
246
+ return [2 /*return*/, {
247
+ url: (0, common_1.toPathString)(localVarUrlObj),
248
+ options: localVarRequestOptions,
249
+ }];
250
+ });
251
+ });
252
+ },
253
+ /**
254
+ * Request to update an existing policy by customer.
255
+ * @summary Request policy update
256
+ * @param {string} policyCode The code of the policy that the customer wants to update.
257
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
258
+ * @param {RequestPolicyUpdateRequestDto} requestPolicyUpdateRequestDto
259
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
260
+ * @param {*} [options] Override http request option.
261
+ * @throws {RequiredError}
262
+ */
263
+ requestPolicyUpdate: function (policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options) {
264
+ if (options === void 0) { options = {}; }
265
+ return __awaiter(_this, void 0, void 0, function () {
266
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
267
+ return __generator(this, function (_a) {
268
+ // verify required parameter 'policyCode' is not null or undefined
269
+ (0, common_1.assertParamExists)('requestPolicyUpdate', 'policyCode', policyCode);
270
+ // verify required parameter 'customerCode' is not null or undefined
271
+ (0, common_1.assertParamExists)('requestPolicyUpdate', 'customerCode', customerCode);
272
+ // verify required parameter 'requestPolicyUpdateRequestDto' is not null or undefined
273
+ (0, common_1.assertParamExists)('requestPolicyUpdate', 'requestPolicyUpdateRequestDto', requestPolicyUpdateRequestDto);
274
+ localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}/request-update"
275
+ .replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)))
276
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
277
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
278
+ if (configuration) {
279
+ baseOptions = configuration.baseOptions;
280
+ baseAccessToken = configuration.accessToken;
281
+ }
282
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
283
+ localVarHeaderParameter = {};
284
+ localVarQueryParameter = {};
285
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
286
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
287
+ }
288
+ localVarHeaderParameter['Content-Type'] = 'application/json';
289
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
290
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
291
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
292
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(requestPolicyUpdateRequestDto, localVarRequestOptions, configuration);
293
+ return [2 /*return*/, {
294
+ url: (0, common_1.toPathString)(localVarUrlObj),
295
+ options: localVarRequestOptions,
296
+ }];
297
+ });
298
+ });
299
+ },
300
+ /**
301
+ * Request to terminate an existing policy by customer.
302
+ * @summary Terminate a policy
303
+ * @param {string} policyCode The code of the policy that the customer wants to terminate.
304
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
305
+ * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
306
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
307
+ * @param {*} [options] Override http request option.
308
+ * @throws {RequiredError}
309
+ */
310
+ terminateCustomerPolicy: function (policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options) {
311
+ if (options === void 0) { options = {}; }
312
+ return __awaiter(_this, void 0, void 0, function () {
313
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
314
+ return __generator(this, function (_a) {
315
+ // verify required parameter 'policyCode' is not null or undefined
316
+ (0, common_1.assertParamExists)('terminateCustomerPolicy', 'policyCode', policyCode);
317
+ // verify required parameter 'customerCode' is not null or undefined
318
+ (0, common_1.assertParamExists)('terminateCustomerPolicy', 'customerCode', customerCode);
319
+ // verify required parameter 'terminateCustomerPolicyRequestDto' is not null or undefined
320
+ (0, common_1.assertParamExists)('terminateCustomerPolicy', 'terminateCustomerPolicyRequestDto', terminateCustomerPolicyRequestDto);
321
+ localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}/terminate"
322
+ .replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)))
323
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
324
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
325
+ if (configuration) {
326
+ baseOptions = configuration.baseOptions;
327
+ baseAccessToken = configuration.accessToken;
328
+ }
329
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
330
+ localVarHeaderParameter = {};
331
+ localVarQueryParameter = {};
332
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
333
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
334
+ }
335
+ localVarHeaderParameter['Content-Type'] = 'application/json';
336
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
337
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
338
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
339
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(terminateCustomerPolicyRequestDto, localVarRequestOptions, configuration);
340
+ return [2 /*return*/, {
341
+ url: (0, common_1.toPathString)(localVarUrlObj),
342
+ options: localVarRequestOptions,
343
+ }];
344
+ });
345
+ });
346
+ },
347
+ /**
348
+ * API to upload and attach documents to a policy.
349
+ * @summary Upload policy documents
350
+ * @param {string} customerCode
351
+ * @param {string} policyCode The policy code to identify a policy.
352
+ * @param {UploadCustomerPolicyDocumentsRequestDto} uploadCustomerPolicyDocumentsRequestDto
353
+ * @param {*} [options] Override http request option.
354
+ * @throws {RequiredError}
355
+ */
356
+ uploadCustomerPolicyDocuments: function (customerCode, policyCode, uploadCustomerPolicyDocumentsRequestDto, options) {
357
+ if (options === void 0) { options = {}; }
358
+ return __awaiter(_this, void 0, void 0, function () {
359
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
360
+ return __generator(this, function (_a) {
361
+ // verify required parameter 'customerCode' is not null or undefined
362
+ (0, common_1.assertParamExists)('uploadCustomerPolicyDocuments', 'customerCode', customerCode);
363
+ // verify required parameter 'policyCode' is not null or undefined
364
+ (0, common_1.assertParamExists)('uploadCustomerPolicyDocuments', 'policyCode', policyCode);
365
+ // verify required parameter 'uploadCustomerPolicyDocumentsRequestDto' is not null or undefined
366
+ (0, common_1.assertParamExists)('uploadCustomerPolicyDocuments', 'uploadCustomerPolicyDocumentsRequestDto', uploadCustomerPolicyDocumentsRequestDto);
367
+ localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}/documents"
368
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)))
369
+ .replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)));
370
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
371
+ if (configuration) {
372
+ baseOptions = configuration.baseOptions;
373
+ baseAccessToken = configuration.accessToken;
374
+ }
375
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
376
+ localVarHeaderParameter = {};
377
+ localVarQueryParameter = {};
378
+ localVarHeaderParameter['Content-Type'] = 'application/json';
379
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
380
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
381
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
382
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(uploadCustomerPolicyDocumentsRequestDto, localVarRequestOptions, configuration);
383
+ return [2 /*return*/, {
384
+ url: (0, common_1.toPathString)(localVarUrlObj),
385
+ options: localVarRequestOptions,
386
+ }];
387
+ });
388
+ });
389
+ },
390
+ /**
391
+ * Withdraw policy by customer.
392
+ * @summary Withdraw the policy
393
+ * @param {string} policyCode The code of the policy that the customer wants to withdraw.
394
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
395
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
396
+ * @param {*} [options] Override http request option.
397
+ * @throws {RequiredError}
398
+ */
399
+ withdrawCustomerPolicy: function (policyCode, customerCode, authorization, options) {
400
+ if (options === void 0) { options = {}; }
401
+ return __awaiter(_this, void 0, void 0, function () {
402
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
403
+ return __generator(this, function (_a) {
404
+ // verify required parameter 'policyCode' is not null or undefined
405
+ (0, common_1.assertParamExists)('withdrawCustomerPolicy', 'policyCode', policyCode);
406
+ // verify required parameter 'customerCode' is not null or undefined
407
+ (0, common_1.assertParamExists)('withdrawCustomerPolicy', 'customerCode', customerCode);
408
+ localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}/withdraw"
409
+ .replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)))
410
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
411
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
412
+ if (configuration) {
413
+ baseOptions = configuration.baseOptions;
414
+ baseAccessToken = configuration.accessToken;
415
+ }
416
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
417
+ localVarHeaderParameter = {};
418
+ localVarQueryParameter = {};
419
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
420
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
421
+ }
422
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
423
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
424
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
425
+ return [2 /*return*/, {
426
+ url: (0, common_1.toPathString)(localVarUrlObj),
427
+ options: localVarRequestOptions,
428
+ }];
429
+ });
430
+ });
431
+ },
432
+ };
433
+ };
434
+ exports.PoliciesApiAxiosParamCreator = PoliciesApiAxiosParamCreator;
435
+ /**
436
+ * PoliciesApi - functional programming interface
437
+ * @export
438
+ */
439
+ var PoliciesApiFp = function (configuration) {
440
+ var localVarAxiosParamCreator = (0, exports.PoliciesApiAxiosParamCreator)(configuration);
441
+ return {
442
+ /**
443
+ * Get detailed policy that belongs to a customer; the details are filtered to return only the current version and the interval timeline that the provided date is included. If the date is not specified, the system will return the whole timeline.
444
+ * @summary Get current version details
445
+ * @param {string} policyCode The policy code.
446
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
447
+ * @param {string} [timesliceDate] This date is used to filter data of the policy, to select the appropriate timeslice. If no date is specified, the system returns all the timeslices.
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
+ getCustomerPolicyDataByDate: function (policyCode, customerCode, timesliceDate, authorization, options) {
453
+ return __awaiter(this, void 0, void 0, function () {
454
+ var localVarAxiosArgs;
455
+ return __generator(this, function (_a) {
456
+ switch (_a.label) {
457
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getCustomerPolicyDataByDate(policyCode, customerCode, timesliceDate, authorization, options)];
458
+ case 1:
459
+ localVarAxiosArgs = _a.sent();
460
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
461
+ }
462
+ });
463
+ });
464
+ },
465
+ /**
466
+ * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
467
+ * @summary Get policy details
468
+ * @param {string} policyCode The policy code.
469
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
470
+ * @param {string} [expand] Fields to expand response by - [versions, premiumItems]
471
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
472
+ * @param {*} [options] Override http request option.
473
+ * @throws {RequiredError}
474
+ */
475
+ getPolicy: function (policyCode, customerCode, expand, authorization, options) {
476
+ return __awaiter(this, void 0, void 0, function () {
477
+ var localVarAxiosArgs;
478
+ return __generator(this, function (_a) {
479
+ switch (_a.label) {
480
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPolicy(policyCode, customerCode, expand, authorization, options)];
481
+ case 1:
482
+ localVarAxiosArgs = _a.sent();
483
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
484
+ }
485
+ });
486
+ });
487
+ },
488
+ /**
489
+ * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
490
+ * @summary List policies
491
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
492
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
493
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
494
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
495
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
496
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
497
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
498
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
499
+ * @param {*} [options] Override http request option.
500
+ * @throws {RequiredError}
501
+ */
502
+ listPolicies: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
503
+ return __awaiter(this, void 0, void 0, function () {
504
+ var localVarAxiosArgs;
505
+ return __generator(this, function (_a) {
506
+ switch (_a.label) {
507
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPolicies(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options)];
508
+ case 1:
509
+ localVarAxiosArgs = _a.sent();
510
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
511
+ }
512
+ });
513
+ });
514
+ },
515
+ /**
516
+ * Request to update an existing policy by customer.
517
+ * @summary Request policy update
518
+ * @param {string} policyCode The code of the policy that the customer wants to update.
519
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
520
+ * @param {RequestPolicyUpdateRequestDto} requestPolicyUpdateRequestDto
521
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
522
+ * @param {*} [options] Override http request option.
523
+ * @throws {RequiredError}
524
+ */
525
+ requestPolicyUpdate: function (policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options) {
526
+ return __awaiter(this, void 0, void 0, function () {
527
+ var localVarAxiosArgs;
528
+ return __generator(this, function (_a) {
529
+ switch (_a.label) {
530
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.requestPolicyUpdate(policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options)];
531
+ case 1:
532
+ localVarAxiosArgs = _a.sent();
533
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
534
+ }
535
+ });
536
+ });
537
+ },
538
+ /**
539
+ * Request to terminate an existing policy by customer.
540
+ * @summary Terminate a policy
541
+ * @param {string} policyCode The code of the policy that the customer wants to terminate.
542
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
543
+ * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
544
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
545
+ * @param {*} [options] Override http request option.
546
+ * @throws {RequiredError}
547
+ */
548
+ terminateCustomerPolicy: function (policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options) {
549
+ return __awaiter(this, void 0, void 0, function () {
550
+ var localVarAxiosArgs;
551
+ return __generator(this, function (_a) {
552
+ switch (_a.label) {
553
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.terminateCustomerPolicy(policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options)];
554
+ case 1:
555
+ localVarAxiosArgs = _a.sent();
556
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
557
+ }
558
+ });
559
+ });
560
+ },
561
+ /**
562
+ * API to upload and attach documents to a policy.
563
+ * @summary Upload policy documents
564
+ * @param {string} customerCode
565
+ * @param {string} policyCode The policy code to identify a policy.
566
+ * @param {UploadCustomerPolicyDocumentsRequestDto} uploadCustomerPolicyDocumentsRequestDto
567
+ * @param {*} [options] Override http request option.
568
+ * @throws {RequiredError}
569
+ */
570
+ uploadCustomerPolicyDocuments: function (customerCode, policyCode, uploadCustomerPolicyDocumentsRequestDto, options) {
571
+ return __awaiter(this, void 0, void 0, function () {
572
+ var localVarAxiosArgs;
573
+ return __generator(this, function (_a) {
574
+ switch (_a.label) {
575
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.uploadCustomerPolicyDocuments(customerCode, policyCode, uploadCustomerPolicyDocumentsRequestDto, options)];
576
+ case 1:
577
+ localVarAxiosArgs = _a.sent();
578
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
579
+ }
580
+ });
581
+ });
582
+ },
583
+ /**
584
+ * Withdraw policy by customer.
585
+ * @summary Withdraw the policy
586
+ * @param {string} policyCode The code of the policy that the customer wants to withdraw.
587
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
588
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
589
+ * @param {*} [options] Override http request option.
590
+ * @throws {RequiredError}
591
+ */
592
+ withdrawCustomerPolicy: function (policyCode, customerCode, authorization, options) {
593
+ return __awaiter(this, void 0, void 0, function () {
594
+ var localVarAxiosArgs;
595
+ return __generator(this, function (_a) {
596
+ switch (_a.label) {
597
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.withdrawCustomerPolicy(policyCode, customerCode, authorization, options)];
598
+ case 1:
599
+ localVarAxiosArgs = _a.sent();
600
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
601
+ }
602
+ });
603
+ });
604
+ },
605
+ };
606
+ };
607
+ exports.PoliciesApiFp = PoliciesApiFp;
608
+ /**
609
+ * PoliciesApi - factory interface
610
+ * @export
611
+ */
612
+ var PoliciesApiFactory = function (configuration, basePath, axios) {
613
+ var localVarFp = (0, exports.PoliciesApiFp)(configuration);
614
+ return {
615
+ /**
616
+ * Get detailed policy that belongs to a customer; the details are filtered to return only the current version and the interval timeline that the provided date is included. If the date is not specified, the system will return the whole timeline.
617
+ * @summary Get current version details
618
+ * @param {string} policyCode The policy code.
619
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
620
+ * @param {string} [timesliceDate] This date is used to filter data of the policy, to select the appropriate timeslice. If no date is specified, the system returns all the timeslices.
621
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
622
+ * @param {*} [options] Override http request option.
623
+ * @throws {RequiredError}
624
+ */
625
+ getCustomerPolicyDataByDate: function (policyCode, customerCode, timesliceDate, authorization, options) {
626
+ return localVarFp.getCustomerPolicyDataByDate(policyCode, customerCode, timesliceDate, authorization, options).then(function (request) { return request(axios, basePath); });
627
+ },
628
+ /**
629
+ * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
630
+ * @summary Get policy details
631
+ * @param {string} policyCode The policy code.
632
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
633
+ * @param {string} [expand] Fields to expand response by - [versions, premiumItems]
634
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
635
+ * @param {*} [options] Override http request option.
636
+ * @throws {RequiredError}
637
+ */
638
+ getPolicy: function (policyCode, customerCode, expand, authorization, options) {
639
+ return localVarFp.getPolicy(policyCode, customerCode, expand, authorization, options).then(function (request) { return request(axios, basePath); });
640
+ },
641
+ /**
642
+ * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
643
+ * @summary List policies
644
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
645
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
646
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
647
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
648
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
649
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
650
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
651
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
652
+ * @param {*} [options] Override http request option.
653
+ * @throws {RequiredError}
654
+ */
655
+ listPolicies: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
656
+ return localVarFp.listPolicies(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options).then(function (request) { return request(axios, basePath); });
657
+ },
658
+ /**
659
+ * Request to update an existing policy by customer.
660
+ * @summary Request policy update
661
+ * @param {string} policyCode The code of the policy that the customer wants to update.
662
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
663
+ * @param {RequestPolicyUpdateRequestDto} requestPolicyUpdateRequestDto
664
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
665
+ * @param {*} [options] Override http request option.
666
+ * @throws {RequiredError}
667
+ */
668
+ requestPolicyUpdate: function (policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options) {
669
+ return localVarFp.requestPolicyUpdate(policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
670
+ },
671
+ /**
672
+ * Request to terminate an existing policy by customer.
673
+ * @summary Terminate a policy
674
+ * @param {string} policyCode The code of the policy that the customer wants to terminate.
675
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
676
+ * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
677
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
678
+ * @param {*} [options] Override http request option.
679
+ * @throws {RequiredError}
680
+ */
681
+ terminateCustomerPolicy: function (policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options) {
682
+ return localVarFp.terminateCustomerPolicy(policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
683
+ },
684
+ /**
685
+ * API to upload and attach documents to a policy.
686
+ * @summary Upload policy documents
687
+ * @param {string} customerCode
688
+ * @param {string} policyCode The policy code to identify a policy.
689
+ * @param {UploadCustomerPolicyDocumentsRequestDto} uploadCustomerPolicyDocumentsRequestDto
690
+ * @param {*} [options] Override http request option.
691
+ * @throws {RequiredError}
692
+ */
693
+ uploadCustomerPolicyDocuments: function (customerCode, policyCode, uploadCustomerPolicyDocumentsRequestDto, options) {
694
+ return localVarFp.uploadCustomerPolicyDocuments(customerCode, policyCode, uploadCustomerPolicyDocumentsRequestDto, options).then(function (request) { return request(axios, basePath); });
695
+ },
696
+ /**
697
+ * Withdraw policy by customer.
698
+ * @summary Withdraw the policy
699
+ * @param {string} policyCode The code of the policy that the customer wants to withdraw.
700
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
701
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
702
+ * @param {*} [options] Override http request option.
703
+ * @throws {RequiredError}
704
+ */
705
+ withdrawCustomerPolicy: function (policyCode, customerCode, authorization, options) {
706
+ return localVarFp.withdrawCustomerPolicy(policyCode, customerCode, authorization, options).then(function (request) { return request(axios, basePath); });
707
+ },
708
+ };
709
+ };
710
+ exports.PoliciesApiFactory = PoliciesApiFactory;
711
+ /**
712
+ * PoliciesApi - object-oriented interface
713
+ * @export
714
+ * @class PoliciesApi
715
+ * @extends {BaseAPI}
716
+ */
717
+ var PoliciesApi = /** @class */ (function (_super) {
718
+ __extends(PoliciesApi, _super);
719
+ function PoliciesApi() {
720
+ return _super !== null && _super.apply(this, arguments) || this;
721
+ }
722
+ /**
723
+ * Get detailed policy that belongs to a customer; the details are filtered to return only the current version and the interval timeline that the provided date is included. If the date is not specified, the system will return the whole timeline.
724
+ * @summary Get current version details
725
+ * @param {PoliciesApiGetCustomerPolicyDataByDateRequest} requestParameters Request parameters.
726
+ * @param {*} [options] Override http request option.
727
+ * @throws {RequiredError}
728
+ * @memberof PoliciesApi
729
+ */
730
+ PoliciesApi.prototype.getCustomerPolicyDataByDate = function (requestParameters, options) {
731
+ var _this = this;
732
+ return (0, exports.PoliciesApiFp)(this.configuration).getCustomerPolicyDataByDate(requestParameters.policyCode, requestParameters.customerCode, requestParameters.timesliceDate, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
733
+ };
734
+ /**
735
+ * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
736
+ * @summary Get policy details
737
+ * @param {PoliciesApiGetPolicyRequest} requestParameters Request parameters.
738
+ * @param {*} [options] Override http request option.
739
+ * @throws {RequiredError}
740
+ * @memberof PoliciesApi
741
+ */
742
+ PoliciesApi.prototype.getPolicy = function (requestParameters, options) {
743
+ var _this = this;
744
+ return (0, exports.PoliciesApiFp)(this.configuration).getPolicy(requestParameters.policyCode, requestParameters.customerCode, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
745
+ };
746
+ /**
747
+ * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
748
+ * @summary List policies
749
+ * @param {PoliciesApiListPoliciesRequest} requestParameters Request parameters.
750
+ * @param {*} [options] Override http request option.
751
+ * @throws {RequiredError}
752
+ * @memberof PoliciesApi
753
+ */
754
+ PoliciesApi.prototype.listPolicies = function (requestParameters, options) {
755
+ var _this = this;
756
+ return (0, exports.PoliciesApiFp)(this.configuration).listPolicies(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
757
+ };
758
+ /**
759
+ * Request to update an existing policy by customer.
760
+ * @summary Request policy update
761
+ * @param {PoliciesApiRequestPolicyUpdateRequest} requestParameters Request parameters.
762
+ * @param {*} [options] Override http request option.
763
+ * @throws {RequiredError}
764
+ * @memberof PoliciesApi
765
+ */
766
+ PoliciesApi.prototype.requestPolicyUpdate = function (requestParameters, options) {
767
+ var _this = this;
768
+ return (0, exports.PoliciesApiFp)(this.configuration).requestPolicyUpdate(requestParameters.policyCode, requestParameters.customerCode, requestParameters.requestPolicyUpdateRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
769
+ };
770
+ /**
771
+ * Request to terminate an existing policy by customer.
772
+ * @summary Terminate a policy
773
+ * @param {PoliciesApiTerminateCustomerPolicyRequest} requestParameters Request parameters.
774
+ * @param {*} [options] Override http request option.
775
+ * @throws {RequiredError}
776
+ * @memberof PoliciesApi
777
+ */
778
+ PoliciesApi.prototype.terminateCustomerPolicy = function (requestParameters, options) {
779
+ var _this = this;
780
+ return (0, exports.PoliciesApiFp)(this.configuration).terminateCustomerPolicy(requestParameters.policyCode, requestParameters.customerCode, requestParameters.terminateCustomerPolicyRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
781
+ };
782
+ /**
783
+ * API to upload and attach documents to a policy.
784
+ * @summary Upload policy documents
785
+ * @param {PoliciesApiUploadCustomerPolicyDocumentsRequest} requestParameters Request parameters.
786
+ * @param {*} [options] Override http request option.
787
+ * @throws {RequiredError}
788
+ * @memberof PoliciesApi
789
+ */
790
+ PoliciesApi.prototype.uploadCustomerPolicyDocuments = function (requestParameters, options) {
791
+ var _this = this;
792
+ return (0, exports.PoliciesApiFp)(this.configuration).uploadCustomerPolicyDocuments(requestParameters.customerCode, requestParameters.policyCode, requestParameters.uploadCustomerPolicyDocumentsRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
793
+ };
794
+ /**
795
+ * Withdraw policy by customer.
796
+ * @summary Withdraw the policy
797
+ * @param {PoliciesApiWithdrawCustomerPolicyRequest} requestParameters Request parameters.
798
+ * @param {*} [options] Override http request option.
799
+ * @throws {RequiredError}
800
+ * @memberof PoliciesApi
801
+ */
802
+ PoliciesApi.prototype.withdrawCustomerPolicy = function (requestParameters, options) {
803
+ var _this = this;
804
+ return (0, exports.PoliciesApiFp)(this.configuration).withdrawCustomerPolicy(requestParameters.policyCode, requestParameters.customerCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
805
+ };
806
+ return PoliciesApi;
807
+ }(base_1.BaseAPI));
808
+ exports.PoliciesApi = PoliciesApi;