@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,508 @@
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.ClaimsApi = exports.ClaimsApiFactory = exports.ClaimsApiFp = exports.ClaimsApiAxiosParamCreator = 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
+ * ClaimsApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var ClaimsApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * Create a new claim for customer.
101
+ * @summary Create a new claim for customer
102
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
103
+ * @param {CreateCustomerClaimRequestDto} createCustomerClaimRequestDto
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ */
107
+ createCustomerClaim: function (customerCode, createCustomerClaimRequestDto, options) {
108
+ if (options === void 0) { options = {}; }
109
+ return __awaiter(_this, void 0, void 0, function () {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ return __generator(this, function (_a) {
112
+ // verify required parameter 'customerCode' is not null or undefined
113
+ (0, common_1.assertParamExists)('createCustomerClaim', 'customerCode', customerCode);
114
+ // verify required parameter 'createCustomerClaimRequestDto' is not null or undefined
115
+ (0, common_1.assertParamExists)('createCustomerClaim', 'createCustomerClaimRequestDto', createCustomerClaimRequestDto);
116
+ localVarPath = "/v1/customers/{customerCode}/claims"
117
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
118
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
119
+ if (configuration) {
120
+ baseOptions = configuration.baseOptions;
121
+ baseAccessToken = configuration.accessToken;
122
+ }
123
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
124
+ localVarHeaderParameter = {};
125
+ localVarQueryParameter = {};
126
+ localVarHeaderParameter['Content-Type'] = 'application/json';
127
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
128
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
129
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
130
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createCustomerClaimRequestDto, localVarRequestOptions, configuration);
131
+ return [2 /*return*/, {
132
+ url: (0, common_1.toPathString)(localVarUrlObj),
133
+ options: localVarRequestOptions,
134
+ }];
135
+ });
136
+ });
137
+ },
138
+ /**
139
+ * List claims by customer.
140
+ * @summary List claims by customer
141
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
142
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
143
+ * @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.
144
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
145
+ * @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.
146
+ * @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.
147
+ * @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.
148
+ * @param {*} [options] Override http request option.
149
+ * @throws {RequiredError}
150
+ */
151
+ listCustomerClaims: function (customerCode, pageSize, pageToken, filter, search, order, expand, options) {
152
+ if (options === void 0) { options = {}; }
153
+ return __awaiter(_this, void 0, void 0, function () {
154
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
155
+ return __generator(this, function (_a) {
156
+ // verify required parameter 'customerCode' is not null or undefined
157
+ (0, common_1.assertParamExists)('listCustomerClaims', 'customerCode', customerCode);
158
+ localVarPath = "/v1/customers/{customerCode}/claims"
159
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
160
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
161
+ if (configuration) {
162
+ baseOptions = configuration.baseOptions;
163
+ baseAccessToken = configuration.accessToken;
164
+ }
165
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
166
+ localVarHeaderParameter = {};
167
+ localVarQueryParameter = {};
168
+ if (pageSize !== undefined) {
169
+ localVarQueryParameter['pageSize'] = pageSize;
170
+ }
171
+ if (pageToken !== undefined) {
172
+ localVarQueryParameter['pageToken'] = pageToken;
173
+ }
174
+ if (filter !== undefined) {
175
+ localVarQueryParameter['filter'] = filter;
176
+ }
177
+ if (search !== undefined) {
178
+ localVarQueryParameter['search'] = search;
179
+ }
180
+ if (order !== undefined) {
181
+ localVarQueryParameter['order'] = order;
182
+ }
183
+ if (expand !== undefined) {
184
+ localVarQueryParameter['expand'] = expand;
185
+ }
186
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
187
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
188
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
189
+ return [2 /*return*/, {
190
+ url: (0, common_1.toPathString)(localVarUrlObj),
191
+ options: localVarRequestOptions,
192
+ }];
193
+ });
194
+ });
195
+ },
196
+ /**
197
+ * Update claim for customer.
198
+ * @summary Update claim for customer
199
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
200
+ * @param {string} claimCode The claim code to identify a claim.
201
+ * @param {UpdateCustomerClaimRequestDto} updateCustomerClaimRequestDto
202
+ * @param {*} [options] Override http request option.
203
+ * @throws {RequiredError}
204
+ */
205
+ updateCustomerClaim: function (customerCode, claimCode, updateCustomerClaimRequestDto, 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)('updateCustomerClaim', 'customerCode', customerCode);
212
+ // verify required parameter 'claimCode' is not null or undefined
213
+ (0, common_1.assertParamExists)('updateCustomerClaim', 'claimCode', claimCode);
214
+ // verify required parameter 'updateCustomerClaimRequestDto' is not null or undefined
215
+ (0, common_1.assertParamExists)('updateCustomerClaim', 'updateCustomerClaimRequestDto', updateCustomerClaimRequestDto);
216
+ localVarPath = "/v1/customers/{customerCode}/claims/{claimCode}"
217
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)))
218
+ .replace("{".concat("claimCode", "}"), encodeURIComponent(String(claimCode)));
219
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
220
+ if (configuration) {
221
+ baseOptions = configuration.baseOptions;
222
+ baseAccessToken = configuration.accessToken;
223
+ }
224
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
225
+ localVarHeaderParameter = {};
226
+ localVarQueryParameter = {};
227
+ localVarHeaderParameter['Content-Type'] = 'application/json';
228
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
229
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
230
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
231
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateCustomerClaimRequestDto, localVarRequestOptions, configuration);
232
+ return [2 /*return*/, {
233
+ url: (0, common_1.toPathString)(localVarUrlObj),
234
+ options: localVarRequestOptions,
235
+ }];
236
+ });
237
+ });
238
+ },
239
+ /**
240
+ * API to upload and attach documents to a claim.
241
+ * @summary Upload claim documents
242
+ * @param {string} customerCode
243
+ * @param {string} claimCode The claim code to identify a claim.
244
+ * @param {UploadCustomerClaimDocumentsRequestDto} uploadCustomerClaimDocumentsRequestDto
245
+ * @param {*} [options] Override http request option.
246
+ * @throws {RequiredError}
247
+ */
248
+ uploadCustomerClaimDocuments: function (customerCode, claimCode, uploadCustomerClaimDocumentsRequestDto, options) {
249
+ if (options === void 0) { options = {}; }
250
+ return __awaiter(_this, void 0, void 0, function () {
251
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
252
+ return __generator(this, function (_a) {
253
+ // verify required parameter 'customerCode' is not null or undefined
254
+ (0, common_1.assertParamExists)('uploadCustomerClaimDocuments', 'customerCode', customerCode);
255
+ // verify required parameter 'claimCode' is not null or undefined
256
+ (0, common_1.assertParamExists)('uploadCustomerClaimDocuments', 'claimCode', claimCode);
257
+ // verify required parameter 'uploadCustomerClaimDocumentsRequestDto' is not null or undefined
258
+ (0, common_1.assertParamExists)('uploadCustomerClaimDocuments', 'uploadCustomerClaimDocumentsRequestDto', uploadCustomerClaimDocumentsRequestDto);
259
+ localVarPath = "/v1/customers/{customerCode}/claims/{claimCode}/documents"
260
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)))
261
+ .replace("{".concat("claimCode", "}"), encodeURIComponent(String(claimCode)));
262
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
263
+ if (configuration) {
264
+ baseOptions = configuration.baseOptions;
265
+ baseAccessToken = configuration.accessToken;
266
+ }
267
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
268
+ localVarHeaderParameter = {};
269
+ localVarQueryParameter = {};
270
+ localVarHeaderParameter['Content-Type'] = 'application/json';
271
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
272
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
273
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
274
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(uploadCustomerClaimDocumentsRequestDto, localVarRequestOptions, configuration);
275
+ return [2 /*return*/, {
276
+ url: (0, common_1.toPathString)(localVarUrlObj),
277
+ options: localVarRequestOptions,
278
+ }];
279
+ });
280
+ });
281
+ },
282
+ };
283
+ };
284
+ exports.ClaimsApiAxiosParamCreator = ClaimsApiAxiosParamCreator;
285
+ /**
286
+ * ClaimsApi - functional programming interface
287
+ * @export
288
+ */
289
+ var ClaimsApiFp = function (configuration) {
290
+ var localVarAxiosParamCreator = (0, exports.ClaimsApiAxiosParamCreator)(configuration);
291
+ return {
292
+ /**
293
+ * Create a new claim for customer.
294
+ * @summary Create a new claim for customer
295
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
296
+ * @param {CreateCustomerClaimRequestDto} createCustomerClaimRequestDto
297
+ * @param {*} [options] Override http request option.
298
+ * @throws {RequiredError}
299
+ */
300
+ createCustomerClaim: function (customerCode, createCustomerClaimRequestDto, options) {
301
+ return __awaiter(this, void 0, void 0, function () {
302
+ var localVarAxiosArgs;
303
+ return __generator(this, function (_a) {
304
+ switch (_a.label) {
305
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createCustomerClaim(customerCode, createCustomerClaimRequestDto, options)];
306
+ case 1:
307
+ localVarAxiosArgs = _a.sent();
308
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
309
+ }
310
+ });
311
+ });
312
+ },
313
+ /**
314
+ * List claims by customer.
315
+ * @summary List claims by customer
316
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
317
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
318
+ * @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.
319
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
320
+ * @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.
321
+ * @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.
322
+ * @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.
323
+ * @param {*} [options] Override http request option.
324
+ * @throws {RequiredError}
325
+ */
326
+ listCustomerClaims: function (customerCode, pageSize, pageToken, filter, search, order, expand, options) {
327
+ return __awaiter(this, void 0, void 0, function () {
328
+ var localVarAxiosArgs;
329
+ return __generator(this, function (_a) {
330
+ switch (_a.label) {
331
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listCustomerClaims(customerCode, pageSize, pageToken, filter, search, order, expand, options)];
332
+ case 1:
333
+ localVarAxiosArgs = _a.sent();
334
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
335
+ }
336
+ });
337
+ });
338
+ },
339
+ /**
340
+ * Update claim for customer.
341
+ * @summary Update claim for customer
342
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
343
+ * @param {string} claimCode The claim code to identify a claim.
344
+ * @param {UpdateCustomerClaimRequestDto} updateCustomerClaimRequestDto
345
+ * @param {*} [options] Override http request option.
346
+ * @throws {RequiredError}
347
+ */
348
+ updateCustomerClaim: function (customerCode, claimCode, updateCustomerClaimRequestDto, options) {
349
+ return __awaiter(this, void 0, void 0, function () {
350
+ var localVarAxiosArgs;
351
+ return __generator(this, function (_a) {
352
+ switch (_a.label) {
353
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateCustomerClaim(customerCode, claimCode, updateCustomerClaimRequestDto, options)];
354
+ case 1:
355
+ localVarAxiosArgs = _a.sent();
356
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
357
+ }
358
+ });
359
+ });
360
+ },
361
+ /**
362
+ * API to upload and attach documents to a claim.
363
+ * @summary Upload claim documents
364
+ * @param {string} customerCode
365
+ * @param {string} claimCode The claim code to identify a claim.
366
+ * @param {UploadCustomerClaimDocumentsRequestDto} uploadCustomerClaimDocumentsRequestDto
367
+ * @param {*} [options] Override http request option.
368
+ * @throws {RequiredError}
369
+ */
370
+ uploadCustomerClaimDocuments: function (customerCode, claimCode, uploadCustomerClaimDocumentsRequestDto, options) {
371
+ return __awaiter(this, void 0, void 0, function () {
372
+ var localVarAxiosArgs;
373
+ return __generator(this, function (_a) {
374
+ switch (_a.label) {
375
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.uploadCustomerClaimDocuments(customerCode, claimCode, uploadCustomerClaimDocumentsRequestDto, options)];
376
+ case 1:
377
+ localVarAxiosArgs = _a.sent();
378
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
379
+ }
380
+ });
381
+ });
382
+ },
383
+ };
384
+ };
385
+ exports.ClaimsApiFp = ClaimsApiFp;
386
+ /**
387
+ * ClaimsApi - factory interface
388
+ * @export
389
+ */
390
+ var ClaimsApiFactory = function (configuration, basePath, axios) {
391
+ var localVarFp = (0, exports.ClaimsApiFp)(configuration);
392
+ return {
393
+ /**
394
+ * Create a new claim for customer.
395
+ * @summary Create a new claim for customer
396
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
397
+ * @param {CreateCustomerClaimRequestDto} createCustomerClaimRequestDto
398
+ * @param {*} [options] Override http request option.
399
+ * @throws {RequiredError}
400
+ */
401
+ createCustomerClaim: function (customerCode, createCustomerClaimRequestDto, options) {
402
+ return localVarFp.createCustomerClaim(customerCode, createCustomerClaimRequestDto, options).then(function (request) { return request(axios, basePath); });
403
+ },
404
+ /**
405
+ * List claims by customer.
406
+ * @summary List claims by customer
407
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
408
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
409
+ * @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.
410
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
411
+ * @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.
412
+ * @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.
413
+ * @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.
414
+ * @param {*} [options] Override http request option.
415
+ * @throws {RequiredError}
416
+ */
417
+ listCustomerClaims: function (customerCode, pageSize, pageToken, filter, search, order, expand, options) {
418
+ return localVarFp.listCustomerClaims(customerCode, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
419
+ },
420
+ /**
421
+ * Update claim for customer.
422
+ * @summary Update claim for customer
423
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
424
+ * @param {string} claimCode The claim code to identify a claim.
425
+ * @param {UpdateCustomerClaimRequestDto} updateCustomerClaimRequestDto
426
+ * @param {*} [options] Override http request option.
427
+ * @throws {RequiredError}
428
+ */
429
+ updateCustomerClaim: function (customerCode, claimCode, updateCustomerClaimRequestDto, options) {
430
+ return localVarFp.updateCustomerClaim(customerCode, claimCode, updateCustomerClaimRequestDto, options).then(function (request) { return request(axios, basePath); });
431
+ },
432
+ /**
433
+ * API to upload and attach documents to a claim.
434
+ * @summary Upload claim documents
435
+ * @param {string} customerCode
436
+ * @param {string} claimCode The claim code to identify a claim.
437
+ * @param {UploadCustomerClaimDocumentsRequestDto} uploadCustomerClaimDocumentsRequestDto
438
+ * @param {*} [options] Override http request option.
439
+ * @throws {RequiredError}
440
+ */
441
+ uploadCustomerClaimDocuments: function (customerCode, claimCode, uploadCustomerClaimDocumentsRequestDto, options) {
442
+ return localVarFp.uploadCustomerClaimDocuments(customerCode, claimCode, uploadCustomerClaimDocumentsRequestDto, options).then(function (request) { return request(axios, basePath); });
443
+ },
444
+ };
445
+ };
446
+ exports.ClaimsApiFactory = ClaimsApiFactory;
447
+ /**
448
+ * ClaimsApi - object-oriented interface
449
+ * @export
450
+ * @class ClaimsApi
451
+ * @extends {BaseAPI}
452
+ */
453
+ var ClaimsApi = /** @class */ (function (_super) {
454
+ __extends(ClaimsApi, _super);
455
+ function ClaimsApi() {
456
+ return _super !== null && _super.apply(this, arguments) || this;
457
+ }
458
+ /**
459
+ * Create a new claim for customer.
460
+ * @summary Create a new claim for customer
461
+ * @param {ClaimsApiCreateCustomerClaimRequest} requestParameters Request parameters.
462
+ * @param {*} [options] Override http request option.
463
+ * @throws {RequiredError}
464
+ * @memberof ClaimsApi
465
+ */
466
+ ClaimsApi.prototype.createCustomerClaim = function (requestParameters, options) {
467
+ var _this = this;
468
+ return (0, exports.ClaimsApiFp)(this.configuration).createCustomerClaim(requestParameters.customerCode, requestParameters.createCustomerClaimRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
469
+ };
470
+ /**
471
+ * List claims by customer.
472
+ * @summary List claims by customer
473
+ * @param {ClaimsApiListCustomerClaimsRequest} requestParameters Request parameters.
474
+ * @param {*} [options] Override http request option.
475
+ * @throws {RequiredError}
476
+ * @memberof ClaimsApi
477
+ */
478
+ ClaimsApi.prototype.listCustomerClaims = function (requestParameters, options) {
479
+ var _this = this;
480
+ return (0, exports.ClaimsApiFp)(this.configuration).listCustomerClaims(requestParameters.customerCode, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
481
+ };
482
+ /**
483
+ * Update claim for customer.
484
+ * @summary Update claim for customer
485
+ * @param {ClaimsApiUpdateCustomerClaimRequest} requestParameters Request parameters.
486
+ * @param {*} [options] Override http request option.
487
+ * @throws {RequiredError}
488
+ * @memberof ClaimsApi
489
+ */
490
+ ClaimsApi.prototype.updateCustomerClaim = function (requestParameters, options) {
491
+ var _this = this;
492
+ return (0, exports.ClaimsApiFp)(this.configuration).updateCustomerClaim(requestParameters.customerCode, requestParameters.claimCode, requestParameters.updateCustomerClaimRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
493
+ };
494
+ /**
495
+ * API to upload and attach documents to a claim.
496
+ * @summary Upload claim documents
497
+ * @param {ClaimsApiUploadCustomerClaimDocumentsRequest} requestParameters Request parameters.
498
+ * @param {*} [options] Override http request option.
499
+ * @throws {RequiredError}
500
+ * @memberof ClaimsApi
501
+ */
502
+ ClaimsApi.prototype.uploadCustomerClaimDocuments = function (requestParameters, options) {
503
+ var _this = this;
504
+ return (0, exports.ClaimsApiFp)(this.configuration).uploadCustomerClaimDocuments(requestParameters.customerCode, requestParameters.claimCode, requestParameters.uploadCustomerClaimDocumentsRequestDto, options).then(function (request) { return request(_this.axios, _this.basePath); });
505
+ };
506
+ return ClaimsApi;
507
+ }(base_1.BaseAPI));
508
+ exports.ClaimsApi = ClaimsApi;