@emilgroup/customer-sdk-node 1.6.0 → 1.9.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/.openapi-generator/FILES +19 -0
  2. package/README.md +2 -2
  3. package/api/claims-api.ts +557 -0
  4. package/api/customers-api.ts +248 -712
  5. package/api/policies-api.ts +856 -0
  6. package/api.ts +5 -1
  7. package/base.ts +24 -32
  8. package/common.ts +2 -1
  9. package/configuration.ts +1 -1
  10. package/dist/api/claims-api.d.ts +327 -0
  11. package/dist/api/claims-api.js +508 -0
  12. package/dist/api/customers-api.d.ts +171 -448
  13. package/dist/api/customers-api.js +189 -508
  14. package/dist/api/policies-api.d.ts +505 -0
  15. package/dist/api/policies-api.js +714 -0
  16. package/dist/api.d.ts +3 -1
  17. package/dist/api.js +3 -1
  18. package/dist/base.d.ts +2 -3
  19. package/dist/base.js +20 -21
  20. package/dist/common.d.ts +1 -1
  21. package/dist/common.js +2 -2
  22. package/dist/configuration.d.ts +1 -1
  23. package/dist/configuration.js +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.js +1 -1
  26. package/dist/models/account-class.d.ts +4 -3
  27. package/dist/models/account-class.js +1 -1
  28. package/dist/models/account-policy-class.d.ts +30 -0
  29. package/dist/models/account-policy-class.js +15 -0
  30. package/dist/models/authentication-result-class.d.ts +1 -1
  31. package/dist/models/authentication-result-class.js +1 -1
  32. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +48 -0
  33. package/dist/models/complete-braintree-payment-setup-request-dto.js +15 -0
  34. package/dist/models/complete-payment-setup-psp-request.d.ts +32 -0
  35. package/dist/models/complete-payment-setup-psp-request.js +15 -0
  36. package/dist/models/complete-payment-setup-response-class.d.ts +24 -0
  37. package/dist/models/complete-payment-setup-response-class.js +15 -0
  38. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +60 -0
  39. package/dist/models/complete-stripe-payment-setup-request-dto.js +15 -0
  40. package/dist/models/create-account-request-dto.d.ts +96 -0
  41. package/dist/models/create-account-request-dto.js +21 -0
  42. package/dist/models/create-customer-claim-request-dto.d.ts +108 -0
  43. package/dist/models/create-customer-claim-request-dto.js +15 -0
  44. package/dist/models/create-customer-request-dto.d.ts +8 -1
  45. package/dist/models/create-customer-request-dto.js +1 -1
  46. package/dist/models/create-customer-response-class.d.ts +1 -1
  47. package/dist/models/create-customer-response-class.js +1 -1
  48. package/dist/models/create-presigned-post-response-class.d.ts +30 -0
  49. package/dist/models/create-presigned-post-response-class.js +15 -0
  50. package/dist/models/customer-class.d.ts +8 -2
  51. package/dist/models/customer-class.js +1 -1
  52. package/dist/models/customer-document-class.d.ts +2 -2
  53. package/dist/models/customer-document-class.js +1 -1
  54. package/dist/models/forgot-password-request-dto.d.ts +1 -1
  55. package/dist/models/forgot-password-request-dto.js +1 -1
  56. package/dist/models/get-customer-document-download-url-response-class.d.ts +1 -1
  57. package/dist/models/get-customer-document-download-url-response-class.js +1 -1
  58. package/dist/models/get-customer-response-class.d.ts +1 -1
  59. package/dist/models/get-customer-response-class.js +1 -1
  60. package/dist/models/get-policy-response-class.d.ts +1 -1
  61. package/dist/models/get-policy-response-class.js +1 -1
  62. package/dist/models/index.d.ts +17 -0
  63. package/dist/models/index.js +17 -0
  64. package/dist/models/initiate-auth-request-dto.d.ts +1 -1
  65. package/dist/models/initiate-auth-request-dto.js +1 -1
  66. package/dist/models/initiate-auth-response-class.d.ts +1 -1
  67. package/dist/models/initiate-auth-response-class.js +1 -1
  68. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +24 -0
  69. package/dist/models/initiate-braintree-payment-setup-response-class.js +15 -0
  70. package/dist/models/initiate-payment-setup-response-class.d.ts +32 -0
  71. package/dist/models/initiate-payment-setup-response-class.js +15 -0
  72. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +30 -0
  73. package/dist/models/initiate-stripe-payment-setup-response-class.js +15 -0
  74. package/dist/models/invite-by-customer-request-dto.d.ts +1 -1
  75. package/dist/models/invite-by-customer-request-dto.js +1 -1
  76. package/dist/models/invite-by-customer-response-class.d.ts +1 -1
  77. package/dist/models/invite-by-customer-response-class.js +1 -1
  78. package/dist/models/invite-by-tenant-response-class.d.ts +1 -1
  79. package/dist/models/invite-by-tenant-response-class.js +1 -1
  80. package/dist/models/invite-class.d.ts +1 -1
  81. package/dist/models/invite-class.js +1 -1
  82. package/dist/models/invoice-class.d.ts +3 -3
  83. package/dist/models/invoice-class.js +1 -1
  84. package/dist/models/list-documents-response-class.d.ts +1 -1
  85. package/dist/models/list-documents-response-class.js +1 -1
  86. package/dist/models/list-invoices-response-class.d.ts +1 -1
  87. package/dist/models/list-invoices-response-class.js +1 -1
  88. package/dist/models/list-policies-response-class.d.ts +1 -1
  89. package/dist/models/list-policies-response-class.js +1 -1
  90. package/dist/models/policy-class.d.ts +14 -1
  91. package/dist/models/policy-class.js +1 -1
  92. package/dist/models/policy-object-class.d.ts +1 -1
  93. package/dist/models/policy-object-class.js +1 -1
  94. package/dist/models/policy-premium-class.d.ts +1 -1
  95. package/dist/models/policy-premium-class.js +1 -1
  96. package/dist/models/policy-premium-item-class.d.ts +1 -1
  97. package/dist/models/policy-premium-item-class.js +1 -1
  98. package/dist/models/policy-version-class.d.ts +1 -1
  99. package/dist/models/policy-version-class.js +1 -1
  100. package/dist/models/refresh-token-dto.d.ts +1 -1
  101. package/dist/models/refresh-token-dto.js +1 -1
  102. package/dist/models/request-policy-update-request-dto.d.ts +4 -3
  103. package/dist/models/request-policy-update-request-dto.js +1 -1
  104. package/dist/models/request-policy-update-response-class.d.ts +1 -1
  105. package/dist/models/request-policy-update-response-class.js +1 -1
  106. package/dist/models/reset-password-by-customer-request-dto.d.ts +1 -1
  107. package/dist/models/reset-password-by-customer-request-dto.js +1 -1
  108. package/dist/models/respond-to-auth-challenge-class.d.ts +1 -1
  109. package/dist/models/respond-to-auth-challenge-class.js +1 -1
  110. package/dist/models/respond-to-auth-challenge-request-dto.d.ts +1 -1
  111. package/dist/models/respond-to-auth-challenge-request-dto.js +1 -1
  112. package/dist/models/shared-customer-policy-object-request-dto.d.ts +30 -0
  113. package/dist/models/shared-customer-policy-object-request-dto.js +15 -0
  114. package/dist/models/shared-customer-product-class.d.ts +54 -0
  115. package/dist/models/shared-customer-product-class.js +15 -0
  116. package/dist/models/shared-invoice-item-class.d.ts +1 -1
  117. package/dist/models/shared-invoice-item-class.js +1 -1
  118. package/dist/models/terminate-customer-policy-request-dto.d.ts +1 -1
  119. package/dist/models/terminate-customer-policy-request-dto.js +1 -1
  120. package/dist/models/terminate-customer-policy-response-class.d.ts +1 -1
  121. package/dist/models/terminate-customer-policy-response-class.js +1 -1
  122. package/dist/models/timeslice-class.d.ts +1 -1
  123. package/dist/models/timeslice-class.js +1 -1
  124. package/dist/models/to-grpc-customer-product-class.d.ts +54 -0
  125. package/dist/models/to-grpc-customer-product-class.js +15 -0
  126. package/dist/models/update-account-request-dto.d.ts +2 -2
  127. package/dist/models/update-account-request-dto.js +1 -1
  128. package/dist/models/update-customer-claim-request-dto.d.ts +120 -0
  129. package/dist/models/update-customer-claim-request-dto.js +15 -0
  130. package/dist/models/update-customer-request-dto.d.ts +1 -1
  131. package/dist/models/update-customer-request-dto.js +1 -1
  132. package/dist/models/update-customer-response-class.d.ts +1 -1
  133. package/dist/models/update-customer-response-class.js +1 -1
  134. package/dist/models/upload-customer-claim-documents-request-dto.d.ts +36 -0
  135. package/dist/models/upload-customer-claim-documents-request-dto.js +15 -0
  136. package/dist/models/upload-customer-policy-documents-request-dto.d.ts +47 -0
  137. package/dist/models/upload-customer-policy-documents-request-dto.js +20 -0
  138. package/dist/models/verify-customer-invite-response-class.d.ts +1 -1
  139. package/dist/models/verify-customer-invite-response-class.js +1 -1
  140. package/dist/models/withdraw-customer-policy-response-class.d.ts +1 -1
  141. package/dist/models/withdraw-customer-policy-response-class.js +1 -1
  142. package/index.ts +1 -1
  143. package/models/account-class.ts +4 -3
  144. package/models/account-policy-class.ts +36 -0
  145. package/models/authentication-result-class.ts +1 -1
  146. package/models/complete-braintree-payment-setup-request-dto.ts +54 -0
  147. package/models/complete-payment-setup-psp-request.ts +38 -0
  148. package/models/complete-payment-setup-response-class.ts +30 -0
  149. package/models/complete-stripe-payment-setup-request-dto.ts +66 -0
  150. package/models/create-account-request-dto.ts +105 -0
  151. package/models/create-customer-claim-request-dto.ts +114 -0
  152. package/models/create-customer-request-dto.ts +8 -1
  153. package/models/create-customer-response-class.ts +1 -1
  154. package/models/create-presigned-post-response-class.ts +36 -0
  155. package/models/customer-class.ts +8 -2
  156. package/models/customer-document-class.ts +1 -1
  157. package/models/forgot-password-request-dto.ts +1 -1
  158. package/models/get-customer-document-download-url-response-class.ts +1 -1
  159. package/models/get-customer-response-class.ts +1 -1
  160. package/models/get-policy-response-class.ts +1 -1
  161. package/models/index.ts +17 -0
  162. package/models/initiate-auth-request-dto.ts +1 -1
  163. package/models/initiate-auth-response-class.ts +1 -1
  164. package/models/initiate-braintree-payment-setup-response-class.ts +30 -0
  165. package/models/initiate-payment-setup-response-class.ts +38 -0
  166. package/models/initiate-stripe-payment-setup-response-class.ts +36 -0
  167. package/models/invite-by-customer-request-dto.ts +1 -1
  168. package/models/invite-by-customer-response-class.ts +1 -1
  169. package/models/invite-by-tenant-response-class.ts +1 -1
  170. package/models/invite-class.ts +1 -1
  171. package/models/invoice-class.ts +1 -1
  172. package/models/list-documents-response-class.ts +1 -1
  173. package/models/list-invoices-response-class.ts +1 -1
  174. package/models/list-policies-response-class.ts +1 -1
  175. package/models/policy-class.ts +14 -1
  176. package/models/policy-object-class.ts +1 -1
  177. package/models/policy-premium-class.ts +1 -1
  178. package/models/policy-premium-item-class.ts +1 -1
  179. package/models/policy-version-class.ts +1 -1
  180. package/models/refresh-token-dto.ts +1 -1
  181. package/models/request-policy-update-request-dto.ts +4 -3
  182. package/models/request-policy-update-response-class.ts +1 -1
  183. package/models/reset-password-by-customer-request-dto.ts +1 -1
  184. package/models/respond-to-auth-challenge-class.ts +1 -1
  185. package/models/respond-to-auth-challenge-request-dto.ts +1 -1
  186. package/models/shared-customer-policy-object-request-dto.ts +36 -0
  187. package/models/shared-customer-product-class.ts +60 -0
  188. package/models/shared-invoice-item-class.ts +1 -1
  189. package/models/terminate-customer-policy-request-dto.ts +1 -1
  190. package/models/terminate-customer-policy-response-class.ts +1 -1
  191. package/models/timeslice-class.ts +1 -1
  192. package/models/to-grpc-customer-product-class.ts +60 -0
  193. package/models/update-account-request-dto.ts +1 -1
  194. package/models/update-customer-claim-request-dto.ts +126 -0
  195. package/models/update-customer-request-dto.ts +1 -1
  196. package/models/update-customer-response-class.ts +1 -1
  197. package/models/upload-customer-claim-documents-request-dto.ts +42 -0
  198. package/models/upload-customer-policy-documents-request-dto.ts +56 -0
  199. package/models/verify-customer-invite-response-class.ts +1 -1
  200. package/models/withdraw-customer-policy-response-class.ts +1 -1
  201. package/package.json +2 -3
@@ -0,0 +1,714 @@
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 can be expanded using expand query parameter.
101
+ * @summary Get policy details
102
+ * @param {string} policyCode The code of the policy that the customer wants to fetch
103
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
104
+ * @param {string} [expand] Fields to expand response by - [versions, premiumItems]
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
+ getPolicy: function (policyCode, customerCode, expand, 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)('getPolicy', 'policyCode', policyCode);
116
+ // verify required parameter 'customerCode' is not null or undefined
117
+ (0, common_1.assertParamExists)('getPolicy', 'customerCode', customerCode);
118
+ localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}"
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 (expand !== undefined) {
130
+ localVarQueryParameter['expand'] = expand;
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
+ * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
147
+ * @summary List policies of a customer
148
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
149
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
150
+ * @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.
151
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
152
+ * @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.
153
+ * @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.
154
+ * @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.
155
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
156
+ * @param {*} [options] Override http request option.
157
+ * @throws {RequiredError}
158
+ */
159
+ listPolicies: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
160
+ if (options === void 0) { options = {}; }
161
+ return __awaiter(_this, void 0, void 0, function () {
162
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
163
+ return __generator(this, function (_a) {
164
+ // verify required parameter 'customerCode' is not null or undefined
165
+ (0, common_1.assertParamExists)('listPolicies', 'customerCode', customerCode);
166
+ localVarPath = "/v1/customers/{customerCode}/policies"
167
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
168
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
169
+ if (configuration) {
170
+ baseOptions = configuration.baseOptions;
171
+ baseAccessToken = configuration.accessToken;
172
+ }
173
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
174
+ localVarHeaderParameter = {};
175
+ localVarQueryParameter = {};
176
+ if (pageSize !== undefined) {
177
+ localVarQueryParameter['pageSize'] = pageSize;
178
+ }
179
+ if (pageToken !== undefined) {
180
+ localVarQueryParameter['pageToken'] = pageToken;
181
+ }
182
+ if (filter !== undefined) {
183
+ localVarQueryParameter['filter'] = filter;
184
+ }
185
+ if (search !== undefined) {
186
+ localVarQueryParameter['search'] = search;
187
+ }
188
+ if (order !== undefined) {
189
+ localVarQueryParameter['order'] = order;
190
+ }
191
+ if (expand !== undefined) {
192
+ localVarQueryParameter['expand'] = expand;
193
+ }
194
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
195
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
196
+ }
197
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
198
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
199
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
200
+ return [2 /*return*/, {
201
+ url: (0, common_1.toPathString)(localVarUrlObj),
202
+ options: localVarRequestOptions,
203
+ }];
204
+ });
205
+ });
206
+ },
207
+ /**
208
+ * Request to update an existing policy by customer.
209
+ * @summary Request policy update by customer
210
+ * @param {string} policyCode The code of the policy that the customer wants to update.
211
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
212
+ * @param {RequestPolicyUpdateRequestDto} requestPolicyUpdateRequestDto
213
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
214
+ * @param {*} [options] Override http request option.
215
+ * @throws {RequiredError}
216
+ */
217
+ requestPolicyUpdate: function (policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options) {
218
+ if (options === void 0) { options = {}; }
219
+ return __awaiter(_this, void 0, void 0, function () {
220
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
221
+ return __generator(this, function (_a) {
222
+ // verify required parameter 'policyCode' is not null or undefined
223
+ (0, common_1.assertParamExists)('requestPolicyUpdate', 'policyCode', policyCode);
224
+ // verify required parameter 'customerCode' is not null or undefined
225
+ (0, common_1.assertParamExists)('requestPolicyUpdate', 'customerCode', customerCode);
226
+ // verify required parameter 'requestPolicyUpdateRequestDto' is not null or undefined
227
+ (0, common_1.assertParamExists)('requestPolicyUpdate', 'requestPolicyUpdateRequestDto', requestPolicyUpdateRequestDto);
228
+ localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}/request-update"
229
+ .replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)))
230
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
231
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
232
+ if (configuration) {
233
+ baseOptions = configuration.baseOptions;
234
+ baseAccessToken = configuration.accessToken;
235
+ }
236
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
237
+ localVarHeaderParameter = {};
238
+ localVarQueryParameter = {};
239
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
240
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
241
+ }
242
+ localVarHeaderParameter['Content-Type'] = 'application/json';
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
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(requestPolicyUpdateRequestDto, localVarRequestOptions, configuration);
247
+ return [2 /*return*/, {
248
+ url: (0, common_1.toPathString)(localVarUrlObj),
249
+ options: localVarRequestOptions,
250
+ }];
251
+ });
252
+ });
253
+ },
254
+ /**
255
+ * Request to terminate an existing policy by customer.
256
+ * @summary Terminate a policy by customer
257
+ * @param {string} policyCode The code of the policy that the customer wants to terminate.
258
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
259
+ * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
260
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
261
+ * @param {*} [options] Override http request option.
262
+ * @throws {RequiredError}
263
+ */
264
+ terminateCustomerPolicy: function (policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options) {
265
+ if (options === void 0) { options = {}; }
266
+ return __awaiter(_this, void 0, void 0, function () {
267
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
268
+ return __generator(this, function (_a) {
269
+ // verify required parameter 'policyCode' is not null or undefined
270
+ (0, common_1.assertParamExists)('terminateCustomerPolicy', 'policyCode', policyCode);
271
+ // verify required parameter 'customerCode' is not null or undefined
272
+ (0, common_1.assertParamExists)('terminateCustomerPolicy', 'customerCode', customerCode);
273
+ // verify required parameter 'terminateCustomerPolicyRequestDto' is not null or undefined
274
+ (0, common_1.assertParamExists)('terminateCustomerPolicy', 'terminateCustomerPolicyRequestDto', terminateCustomerPolicyRequestDto);
275
+ localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}/terminate"
276
+ .replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)))
277
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
278
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
279
+ if (configuration) {
280
+ baseOptions = configuration.baseOptions;
281
+ baseAccessToken = configuration.accessToken;
282
+ }
283
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
284
+ localVarHeaderParameter = {};
285
+ localVarQueryParameter = {};
286
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
287
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
288
+ }
289
+ localVarHeaderParameter['Content-Type'] = 'application/json';
290
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
291
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
292
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
293
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(terminateCustomerPolicyRequestDto, localVarRequestOptions, configuration);
294
+ return [2 /*return*/, {
295
+ url: (0, common_1.toPathString)(localVarUrlObj),
296
+ options: localVarRequestOptions,
297
+ }];
298
+ });
299
+ });
300
+ },
301
+ /**
302
+ * API to upload and attach documents to a policy.
303
+ * @summary Upload policy documents
304
+ * @param {string} customerCode
305
+ * @param {string} policyCode The policy code to identify a policy.
306
+ * @param {UploadCustomerPolicyDocumentsRequestDto} uploadCustomerPolicyDocumentsRequestDto
307
+ * @param {*} [options] Override http request option.
308
+ * @throws {RequiredError}
309
+ */
310
+ uploadCustomerPolicyDocuments: function (customerCode, policyCode, uploadCustomerPolicyDocumentsRequestDto, 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 'customerCode' is not null or undefined
316
+ (0, common_1.assertParamExists)('uploadCustomerPolicyDocuments', 'customerCode', customerCode);
317
+ // verify required parameter 'policyCode' is not null or undefined
318
+ (0, common_1.assertParamExists)('uploadCustomerPolicyDocuments', 'policyCode', policyCode);
319
+ // verify required parameter 'uploadCustomerPolicyDocumentsRequestDto' is not null or undefined
320
+ (0, common_1.assertParamExists)('uploadCustomerPolicyDocuments', 'uploadCustomerPolicyDocumentsRequestDto', uploadCustomerPolicyDocumentsRequestDto);
321
+ localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}/documents"
322
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)))
323
+ .replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)));
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
+ localVarHeaderParameter['Content-Type'] = 'application/json';
333
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
334
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
335
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
336
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(uploadCustomerPolicyDocumentsRequestDto, localVarRequestOptions, configuration);
337
+ return [2 /*return*/, {
338
+ url: (0, common_1.toPathString)(localVarUrlObj),
339
+ options: localVarRequestOptions,
340
+ }];
341
+ });
342
+ });
343
+ },
344
+ /**
345
+ * Withdraw policy by customer.
346
+ * @summary Withdraw policy by customer
347
+ * @param {string} policyCode The code of the policy that the customer wants to withdraw.
348
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
349
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
350
+ * @param {*} [options] Override http request option.
351
+ * @throws {RequiredError}
352
+ */
353
+ withdrawCustomerPolicy: function (policyCode, customerCode, authorization, options) {
354
+ if (options === void 0) { options = {}; }
355
+ return __awaiter(_this, void 0, void 0, function () {
356
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
357
+ return __generator(this, function (_a) {
358
+ // verify required parameter 'policyCode' is not null or undefined
359
+ (0, common_1.assertParamExists)('withdrawCustomerPolicy', 'policyCode', policyCode);
360
+ // verify required parameter 'customerCode' is not null or undefined
361
+ (0, common_1.assertParamExists)('withdrawCustomerPolicy', 'customerCode', customerCode);
362
+ localVarPath = "/v1/customers/{customerCode}/policies/{policyCode}/withdraw"
363
+ .replace("{".concat("policyCode", "}"), encodeURIComponent(String(policyCode)))
364
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
365
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
366
+ if (configuration) {
367
+ baseOptions = configuration.baseOptions;
368
+ baseAccessToken = configuration.accessToken;
369
+ }
370
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
371
+ localVarHeaderParameter = {};
372
+ localVarQueryParameter = {};
373
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
374
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
375
+ }
376
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
377
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
378
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
379
+ return [2 /*return*/, {
380
+ url: (0, common_1.toPathString)(localVarUrlObj),
381
+ options: localVarRequestOptions,
382
+ }];
383
+ });
384
+ });
385
+ },
386
+ };
387
+ };
388
+ exports.PoliciesApiAxiosParamCreator = PoliciesApiAxiosParamCreator;
389
+ /**
390
+ * PoliciesApi - functional programming interface
391
+ * @export
392
+ */
393
+ var PoliciesApiFp = function (configuration) {
394
+ var localVarAxiosParamCreator = (0, exports.PoliciesApiAxiosParamCreator)(configuration);
395
+ return {
396
+ /**
397
+ * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
398
+ * @summary Get policy details
399
+ * @param {string} policyCode The code of the policy that the customer wants to fetch
400
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
401
+ * @param {string} [expand] Fields to expand response by - [versions, premiumItems]
402
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
403
+ * @param {*} [options] Override http request option.
404
+ * @throws {RequiredError}
405
+ */
406
+ getPolicy: function (policyCode, customerCode, expand, authorization, options) {
407
+ return __awaiter(this, void 0, void 0, function () {
408
+ var localVarAxiosArgs;
409
+ return __generator(this, function (_a) {
410
+ switch (_a.label) {
411
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPolicy(policyCode, customerCode, expand, authorization, options)];
412
+ case 1:
413
+ localVarAxiosArgs = _a.sent();
414
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
415
+ }
416
+ });
417
+ });
418
+ },
419
+ /**
420
+ * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
421
+ * @summary List policies of a customer
422
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
423
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
424
+ * @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.
425
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
426
+ * @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.
427
+ * @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.
428
+ * @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.
429
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
430
+ * @param {*} [options] Override http request option.
431
+ * @throws {RequiredError}
432
+ */
433
+ listPolicies: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
434
+ return __awaiter(this, void 0, void 0, function () {
435
+ var localVarAxiosArgs;
436
+ return __generator(this, function (_a) {
437
+ switch (_a.label) {
438
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPolicies(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options)];
439
+ case 1:
440
+ localVarAxiosArgs = _a.sent();
441
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
442
+ }
443
+ });
444
+ });
445
+ },
446
+ /**
447
+ * Request to update an existing policy by customer.
448
+ * @summary Request policy update by customer
449
+ * @param {string} policyCode The code of the policy that the customer wants to update.
450
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
451
+ * @param {RequestPolicyUpdateRequestDto} requestPolicyUpdateRequestDto
452
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
453
+ * @param {*} [options] Override http request option.
454
+ * @throws {RequiredError}
455
+ */
456
+ requestPolicyUpdate: function (policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options) {
457
+ return __awaiter(this, void 0, void 0, function () {
458
+ var localVarAxiosArgs;
459
+ return __generator(this, function (_a) {
460
+ switch (_a.label) {
461
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.requestPolicyUpdate(policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options)];
462
+ case 1:
463
+ localVarAxiosArgs = _a.sent();
464
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
465
+ }
466
+ });
467
+ });
468
+ },
469
+ /**
470
+ * Request to terminate an existing policy by customer.
471
+ * @summary Terminate a policy by customer
472
+ * @param {string} policyCode The code of the policy that the customer wants to terminate.
473
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
474
+ * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
475
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
476
+ * @param {*} [options] Override http request option.
477
+ * @throws {RequiredError}
478
+ */
479
+ terminateCustomerPolicy: function (policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options) {
480
+ return __awaiter(this, void 0, void 0, function () {
481
+ var localVarAxiosArgs;
482
+ return __generator(this, function (_a) {
483
+ switch (_a.label) {
484
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.terminateCustomerPolicy(policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options)];
485
+ case 1:
486
+ localVarAxiosArgs = _a.sent();
487
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
488
+ }
489
+ });
490
+ });
491
+ },
492
+ /**
493
+ * API to upload and attach documents to a policy.
494
+ * @summary Upload policy documents
495
+ * @param {string} customerCode
496
+ * @param {string} policyCode The policy code to identify a policy.
497
+ * @param {UploadCustomerPolicyDocumentsRequestDto} uploadCustomerPolicyDocumentsRequestDto
498
+ * @param {*} [options] Override http request option.
499
+ * @throws {RequiredError}
500
+ */
501
+ uploadCustomerPolicyDocuments: function (customerCode, policyCode, uploadCustomerPolicyDocumentsRequestDto, options) {
502
+ return __awaiter(this, void 0, void 0, function () {
503
+ var localVarAxiosArgs;
504
+ return __generator(this, function (_a) {
505
+ switch (_a.label) {
506
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.uploadCustomerPolicyDocuments(customerCode, policyCode, uploadCustomerPolicyDocumentsRequestDto, options)];
507
+ case 1:
508
+ localVarAxiosArgs = _a.sent();
509
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
510
+ }
511
+ });
512
+ });
513
+ },
514
+ /**
515
+ * Withdraw policy by customer.
516
+ * @summary Withdraw policy by customer
517
+ * @param {string} policyCode The code of the policy that the customer wants to withdraw.
518
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
519
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
520
+ * @param {*} [options] Override http request option.
521
+ * @throws {RequiredError}
522
+ */
523
+ withdrawCustomerPolicy: function (policyCode, customerCode, authorization, options) {
524
+ return __awaiter(this, void 0, void 0, function () {
525
+ var localVarAxiosArgs;
526
+ return __generator(this, function (_a) {
527
+ switch (_a.label) {
528
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.withdrawCustomerPolicy(policyCode, customerCode, authorization, options)];
529
+ case 1:
530
+ localVarAxiosArgs = _a.sent();
531
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
532
+ }
533
+ });
534
+ });
535
+ },
536
+ };
537
+ };
538
+ exports.PoliciesApiFp = PoliciesApiFp;
539
+ /**
540
+ * PoliciesApi - factory interface
541
+ * @export
542
+ */
543
+ var PoliciesApiFactory = function (configuration, basePath, axios) {
544
+ var localVarFp = (0, exports.PoliciesApiFp)(configuration);
545
+ return {
546
+ /**
547
+ * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
548
+ * @summary Get policy details
549
+ * @param {string} policyCode The code of the policy that the customer wants to fetch
550
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
551
+ * @param {string} [expand] Fields to expand response by - [versions, premiumItems]
552
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
553
+ * @param {*} [options] Override http request option.
554
+ * @throws {RequiredError}
555
+ */
556
+ getPolicy: function (policyCode, customerCode, expand, authorization, options) {
557
+ return localVarFp.getPolicy(policyCode, customerCode, expand, authorization, options).then(function (request) { return request(axios, basePath); });
558
+ },
559
+ /**
560
+ * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
561
+ * @summary List policies of a customer
562
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
563
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
564
+ * @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.
565
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
566
+ * @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.
567
+ * @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.
568
+ * @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.
569
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
570
+ * @param {*} [options] Override http request option.
571
+ * @throws {RequiredError}
572
+ */
573
+ listPolicies: function (customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options) {
574
+ return localVarFp.listPolicies(customerCode, pageSize, pageToken, filter, search, order, expand, authorization, options).then(function (request) { return request(axios, basePath); });
575
+ },
576
+ /**
577
+ * Request to update an existing policy by customer.
578
+ * @summary Request policy update by customer
579
+ * @param {string} policyCode The code of the policy that the customer wants to update.
580
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
581
+ * @param {RequestPolicyUpdateRequestDto} requestPolicyUpdateRequestDto
582
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
583
+ * @param {*} [options] Override http request option.
584
+ * @throws {RequiredError}
585
+ */
586
+ requestPolicyUpdate: function (policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options) {
587
+ return localVarFp.requestPolicyUpdate(policyCode, customerCode, requestPolicyUpdateRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
588
+ },
589
+ /**
590
+ * Request to terminate an existing policy by customer.
591
+ * @summary Terminate a policy by customer
592
+ * @param {string} policyCode The code of the policy that the customer wants to terminate.
593
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
594
+ * @param {TerminateCustomerPolicyRequestDto} terminateCustomerPolicyRequestDto
595
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
596
+ * @param {*} [options] Override http request option.
597
+ * @throws {RequiredError}
598
+ */
599
+ terminateCustomerPolicy: function (policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options) {
600
+ return localVarFp.terminateCustomerPolicy(policyCode, customerCode, terminateCustomerPolicyRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
601
+ },
602
+ /**
603
+ * API to upload and attach documents to a policy.
604
+ * @summary Upload policy documents
605
+ * @param {string} customerCode
606
+ * @param {string} policyCode The policy code to identify a policy.
607
+ * @param {UploadCustomerPolicyDocumentsRequestDto} uploadCustomerPolicyDocumentsRequestDto
608
+ * @param {*} [options] Override http request option.
609
+ * @throws {RequiredError}
610
+ */
611
+ uploadCustomerPolicyDocuments: function (customerCode, policyCode, uploadCustomerPolicyDocumentsRequestDto, options) {
612
+ return localVarFp.uploadCustomerPolicyDocuments(customerCode, policyCode, uploadCustomerPolicyDocumentsRequestDto, options).then(function (request) { return request(axios, basePath); });
613
+ },
614
+ /**
615
+ * Withdraw policy by customer.
616
+ * @summary Withdraw policy by customer
617
+ * @param {string} policyCode The code of the policy that the customer wants to withdraw.
618
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
619
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
620
+ * @param {*} [options] Override http request option.
621
+ * @throws {RequiredError}
622
+ */
623
+ withdrawCustomerPolicy: function (policyCode, customerCode, authorization, options) {
624
+ return localVarFp.withdrawCustomerPolicy(policyCode, customerCode, authorization, options).then(function (request) { return request(axios, basePath); });
625
+ },
626
+ };
627
+ };
628
+ exports.PoliciesApiFactory = PoliciesApiFactory;
629
+ /**
630
+ * PoliciesApi - object-oriented interface
631
+ * @export
632
+ * @class PoliciesApi
633
+ * @extends {BaseAPI}
634
+ */
635
+ var PoliciesApi = /** @class */ (function (_super) {
636
+ __extends(PoliciesApi, _super);
637
+ function PoliciesApi() {
638
+ return _super !== null && _super.apply(this, arguments) || this;
639
+ }
640
+ /**
641
+ * Get detailed policy that belongs to a customer; the details can be expanded using expand query parameter.
642
+ * @summary Get policy details
643
+ * @param {PoliciesApiGetPolicyRequest} requestParameters Request parameters.
644
+ * @param {*} [options] Override http request option.
645
+ * @throws {RequiredError}
646
+ * @memberof PoliciesApi
647
+ */
648
+ PoliciesApi.prototype.getPolicy = function (requestParameters, options) {
649
+ var _this = this;
650
+ 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); });
651
+ };
652
+ /**
653
+ * List all the policies that belong to a customer, the policies can be filtered by policy code, policy number.
654
+ * @summary List policies of a customer
655
+ * @param {PoliciesApiListPoliciesRequest} requestParameters Request parameters.
656
+ * @param {*} [options] Override http request option.
657
+ * @throws {RequiredError}
658
+ * @memberof PoliciesApi
659
+ */
660
+ PoliciesApi.prototype.listPolicies = function (requestParameters, options) {
661
+ var _this = this;
662
+ 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); });
663
+ };
664
+ /**
665
+ * Request to update an existing policy by customer.
666
+ * @summary Request policy update by customer
667
+ * @param {PoliciesApiRequestPolicyUpdateRequest} requestParameters Request parameters.
668
+ * @param {*} [options] Override http request option.
669
+ * @throws {RequiredError}
670
+ * @memberof PoliciesApi
671
+ */
672
+ PoliciesApi.prototype.requestPolicyUpdate = function (requestParameters, options) {
673
+ var _this = this;
674
+ 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); });
675
+ };
676
+ /**
677
+ * Request to terminate an existing policy by customer.
678
+ * @summary Terminate a policy by customer
679
+ * @param {PoliciesApiTerminateCustomerPolicyRequest} requestParameters Request parameters.
680
+ * @param {*} [options] Override http request option.
681
+ * @throws {RequiredError}
682
+ * @memberof PoliciesApi
683
+ */
684
+ PoliciesApi.prototype.terminateCustomerPolicy = function (requestParameters, options) {
685
+ var _this = this;
686
+ 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); });
687
+ };
688
+ /**
689
+ * API to upload and attach documents to a policy.
690
+ * @summary Upload policy documents
691
+ * @param {PoliciesApiUploadCustomerPolicyDocumentsRequest} requestParameters Request parameters.
692
+ * @param {*} [options] Override http request option.
693
+ * @throws {RequiredError}
694
+ * @memberof PoliciesApi
695
+ */
696
+ PoliciesApi.prototype.uploadCustomerPolicyDocuments = function (requestParameters, options) {
697
+ var _this = this;
698
+ return (0, exports.PoliciesApiFp)(this.configuration).uploadCustomerPolicyDocuments(requestParameters.customerCode, requestParameters.policyCode, requestParameters.uploadCustomerPolicyDocumentsRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
699
+ };
700
+ /**
701
+ * Withdraw policy by customer.
702
+ * @summary Withdraw policy by customer
703
+ * @param {PoliciesApiWithdrawCustomerPolicyRequest} requestParameters Request parameters.
704
+ * @param {*} [options] Override http request option.
705
+ * @throws {RequiredError}
706
+ * @memberof PoliciesApi
707
+ */
708
+ PoliciesApi.prototype.withdrawCustomerPolicy = function (requestParameters, options) {
709
+ var _this = this;
710
+ return (0, exports.PoliciesApiFp)(this.configuration).withdrawCustomerPolicy(requestParameters.policyCode, requestParameters.customerCode, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
711
+ };
712
+ return PoliciesApi;
713
+ }(base_1.BaseAPI));
714
+ exports.PoliciesApi = PoliciesApi;