@emilgroup/customer-sdk-node 1.25.0 → 1.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/README.md +2 -2
  2. package/dist/api/authentication-api.d.ts +332 -0
  3. package/dist/api/authentication-api.js +604 -0
  4. package/dist/api/claims-api.d.ts +431 -0
  5. package/dist/api/claims-api.js +670 -0
  6. package/dist/api/customers-api.d.ts +271 -0
  7. package/dist/api/customers-api.js +425 -0
  8. package/dist/api/default-api.d.ts +66 -0
  9. package/dist/api/default-api.js +200 -0
  10. package/dist/api/documents-api.d.ts +262 -0
  11. package/dist/api/documents-api.js +417 -0
  12. package/dist/api/invites-api.d.ts +249 -0
  13. package/dist/api/invites-api.js +456 -0
  14. package/dist/api/invoices-api.d.ts +150 -0
  15. package/dist/api/invoices-api.js +253 -0
  16. package/dist/api/leads-api.d.ts +365 -0
  17. package/dist/api/leads-api.js +571 -0
  18. package/dist/api/payments-api.d.ts +162 -0
  19. package/dist/api/payments-api.js +306 -0
  20. package/dist/api/policies-api.d.ts +578 -0
  21. package/dist/api/policies-api.js +808 -0
  22. package/dist/api/products-api.d.ts +215 -0
  23. package/dist/api/products-api.js +341 -0
  24. package/dist/api.d.ts +22 -0
  25. package/dist/api.js +40 -0
  26. package/dist/base.d.ts +82 -0
  27. package/dist/base.js +502 -0
  28. package/dist/common.d.ts +66 -0
  29. package/dist/common.js +244 -0
  30. package/dist/configuration.d.ts +98 -0
  31. package/dist/configuration.js +45 -0
  32. package/dist/index.d.ts +15 -0
  33. package/dist/index.js +36 -0
  34. package/dist/models/account-class.d.ts +169 -0
  35. package/dist/models/account-class.js +26 -0
  36. package/dist/models/account-policy-class.d.ts +30 -0
  37. package/dist/models/account-policy-class.js +15 -0
  38. package/dist/models/authentication-result-class.d.ts +30 -0
  39. package/dist/models/authentication-result-class.js +15 -0
  40. package/dist/models/claim-class.d.ts +156 -0
  41. package/dist/models/claim-class.js +15 -0
  42. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +48 -0
  43. package/dist/models/complete-braintree-payment-setup-request-dto.js +15 -0
  44. package/dist/models/complete-payment-setup-psp-request.d.ts +32 -0
  45. package/dist/models/complete-payment-setup-psp-request.js +15 -0
  46. package/dist/models/complete-payment-setup-response-class.d.ts +24 -0
  47. package/dist/models/complete-payment-setup-response-class.js +15 -0
  48. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +60 -0
  49. package/dist/models/complete-stripe-payment-setup-request-dto.js +15 -0
  50. package/dist/models/create-account-request-dto.d.ts +132 -0
  51. package/dist/models/create-account-request-dto.js +31 -0
  52. package/dist/models/create-bank-account-request-dto.d.ts +30 -0
  53. package/dist/models/create-bank-account-request-dto.js +15 -0
  54. package/dist/models/create-customer-claim-request-dto.d.ts +114 -0
  55. package/dist/models/create-customer-claim-request-dto.js +15 -0
  56. package/dist/models/create-customer-claim-response-class.d.ts +25 -0
  57. package/dist/models/create-customer-claim-response-class.js +15 -0
  58. package/dist/models/create-customer-request-dto.d.ts +43 -0
  59. package/dist/models/create-customer-request-dto.js +15 -0
  60. package/dist/models/create-customer-response-class.d.ts +25 -0
  61. package/dist/models/create-customer-response-class.js +15 -0
  62. package/dist/models/create-lead-request-dto.d.ts +83 -0
  63. package/dist/models/create-lead-request-dto.js +15 -0
  64. package/dist/models/create-lead-response-class.d.ts +25 -0
  65. package/dist/models/create-lead-response-class.js +15 -0
  66. package/dist/models/create-payment-method-request-dto.d.ts +31 -0
  67. package/dist/models/create-payment-method-request-dto.js +15 -0
  68. package/dist/models/create-policy-request-dto.d.ts +56 -0
  69. package/dist/models/create-policy-request-dto.js +15 -0
  70. package/dist/models/create-presigned-post-response-class.d.ts +30 -0
  71. package/dist/models/create-presigned-post-response-class.js +15 -0
  72. package/dist/models/customer-class.d.ts +73 -0
  73. package/dist/models/customer-class.js +15 -0
  74. package/dist/models/customer-document-class.d.ts +99 -0
  75. package/dist/models/customer-document-class.js +36 -0
  76. package/dist/models/customer-product-class.d.ts +54 -0
  77. package/dist/models/customer-product-class.js +15 -0
  78. package/dist/models/forgot-password-request-dto.d.ts +30 -0
  79. package/dist/models/forgot-password-request-dto.js +15 -0
  80. package/dist/models/get-customer-claim-response-class.d.ts +25 -0
  81. package/dist/models/get-customer-claim-response-class.js +15 -0
  82. package/dist/models/get-customer-document-download-url-response-class.d.ts +24 -0
  83. package/dist/models/get-customer-document-download-url-response-class.js +15 -0
  84. package/dist/models/get-customer-response-class.d.ts +25 -0
  85. package/dist/models/get-customer-response-class.js +15 -0
  86. package/dist/models/get-lead-response-class.d.ts +25 -0
  87. package/dist/models/get-lead-response-class.js +15 -0
  88. package/dist/models/get-policy-response-class.d.ts +25 -0
  89. package/dist/models/get-policy-response-class.js +15 -0
  90. package/dist/models/get-product-response-class.d.ts +25 -0
  91. package/dist/models/get-product-response-class.js +15 -0
  92. package/dist/models/grpc-update-lead-request-dto.d.ts +50 -0
  93. package/dist/models/grpc-update-lead-request-dto.js +15 -0
  94. package/dist/models/index.d.ts +85 -0
  95. package/dist/models/index.js +101 -0
  96. package/dist/models/initiate-auth-request-dto.d.ts +36 -0
  97. package/dist/models/initiate-auth-request-dto.js +15 -0
  98. package/dist/models/initiate-auth-response-class.d.ts +43 -0
  99. package/dist/models/initiate-auth-response-class.js +15 -0
  100. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +24 -0
  101. package/dist/models/initiate-braintree-payment-setup-response-class.js +15 -0
  102. package/dist/models/initiate-payment-setup-response-class.d.ts +32 -0
  103. package/dist/models/initiate-payment-setup-response-class.js +15 -0
  104. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +30 -0
  105. package/dist/models/initiate-stripe-payment-setup-response-class.js +15 -0
  106. package/dist/models/inline-response200.d.ts +54 -0
  107. package/dist/models/inline-response200.js +15 -0
  108. package/dist/models/inline-response503.d.ts +54 -0
  109. package/dist/models/inline-response503.js +15 -0
  110. package/dist/models/invite-by-customer-request-dto.d.ts +30 -0
  111. package/dist/models/invite-by-customer-request-dto.js +15 -0
  112. package/dist/models/invite-by-customer-response-class.d.ts +25 -0
  113. package/dist/models/invite-by-customer-response-class.js +15 -0
  114. package/dist/models/invite-by-tenant-request-dto.d.ts +24 -0
  115. package/dist/models/invite-by-tenant-request-dto.js +15 -0
  116. package/dist/models/invite-by-tenant-response-class.d.ts +25 -0
  117. package/dist/models/invite-by-tenant-response-class.js +15 -0
  118. package/dist/models/invite-class.d.ts +54 -0
  119. package/dist/models/invite-class.js +15 -0
  120. package/dist/models/invoice-class.d.ts +148 -0
  121. package/dist/models/invoice-class.js +28 -0
  122. package/dist/models/lead-bank-account-class.d.ts +30 -0
  123. package/dist/models/lead-bank-account-class.js +15 -0
  124. package/dist/models/lead-class.d.ts +121 -0
  125. package/dist/models/lead-class.js +15 -0
  126. package/dist/models/list-customer-claims-response-class.d.ts +31 -0
  127. package/dist/models/list-customer-claims-response-class.js +15 -0
  128. package/dist/models/list-documents-response-class.d.ts +31 -0
  129. package/dist/models/list-documents-response-class.js +15 -0
  130. package/dist/models/list-invoices-response-class.d.ts +31 -0
  131. package/dist/models/list-invoices-response-class.js +15 -0
  132. package/dist/models/list-leads-response-class.d.ts +43 -0
  133. package/dist/models/list-leads-response-class.js +15 -0
  134. package/dist/models/list-policies-response-class.d.ts +43 -0
  135. package/dist/models/list-policies-response-class.js +15 -0
  136. package/dist/models/list-products-response-class.d.ts +31 -0
  137. package/dist/models/list-products-response-class.js +15 -0
  138. package/dist/models/policy-class.d.ts +80 -0
  139. package/dist/models/policy-class.js +15 -0
  140. package/dist/models/policy-object-class.d.ts +54 -0
  141. package/dist/models/policy-object-class.js +15 -0
  142. package/dist/models/policy-object-dto.d.ts +42 -0
  143. package/dist/models/policy-object-dto.js +15 -0
  144. package/dist/models/policy-premium-class.d.ts +43 -0
  145. package/dist/models/policy-premium-class.js +15 -0
  146. package/dist/models/policy-premium-item-class.d.ts +36 -0
  147. package/dist/models/policy-premium-item-class.js +15 -0
  148. package/dist/models/policy-version-class.d.ts +49 -0
  149. package/dist/models/policy-version-class.js +15 -0
  150. package/dist/models/premium-override-dto.d.ts +55 -0
  151. package/dist/models/premium-override-dto.js +27 -0
  152. package/dist/models/premium-override-request-class.d.ts +25 -0
  153. package/dist/models/premium-override-request-class.js +15 -0
  154. package/dist/models/premium-override-request-dto.d.ts +25 -0
  155. package/dist/models/premium-override-request-dto.js +15 -0
  156. package/dist/models/refresh-token-dto.d.ts +30 -0
  157. package/dist/models/refresh-token-dto.js +15 -0
  158. package/dist/models/request-policy-update-request-dto.d.ts +43 -0
  159. package/dist/models/request-policy-update-request-dto.js +15 -0
  160. package/dist/models/request-policy-update-response-class.d.ts +25 -0
  161. package/dist/models/request-policy-update-response-class.js +15 -0
  162. package/dist/models/reset-password-by-customer-request-dto.d.ts +36 -0
  163. package/dist/models/reset-password-by-customer-request-dto.js +15 -0
  164. package/dist/models/respond-to-auth-challenge-class.d.ts +43 -0
  165. package/dist/models/respond-to-auth-challenge-class.js +15 -0
  166. package/dist/models/respond-to-auth-challenge-request-dto.d.ts +42 -0
  167. package/dist/models/respond-to-auth-challenge-request-dto.js +15 -0
  168. package/dist/models/sepa-dto.d.ts +30 -0
  169. package/dist/models/sepa-dto.js +15 -0
  170. package/dist/models/shared-customer-policy-object-request-dto.d.ts +36 -0
  171. package/dist/models/shared-customer-policy-object-request-dto.js +15 -0
  172. package/dist/models/shared-invoice-item-class.d.ts +129 -0
  173. package/dist/models/shared-invoice-item-class.js +24 -0
  174. package/dist/models/shared-invoice-status-class.d.ts +47 -0
  175. package/dist/models/shared-invoice-status-class.js +20 -0
  176. package/dist/models/terminate-customer-policy-request-dto.d.ts +24 -0
  177. package/dist/models/terminate-customer-policy-request-dto.js +15 -0
  178. package/dist/models/terminate-customer-policy-response-class.d.ts +25 -0
  179. package/dist/models/terminate-customer-policy-response-class.js +15 -0
  180. package/dist/models/timeslice-class.d.ts +56 -0
  181. package/dist/models/timeslice-class.js +15 -0
  182. package/dist/models/update-account-request-dto.d.ts +113 -0
  183. package/dist/models/update-account-request-dto.js +25 -0
  184. package/dist/models/update-customer-claim-request-dto.d.ts +120 -0
  185. package/dist/models/update-customer-claim-request-dto.js +15 -0
  186. package/dist/models/update-customer-claim-response-class.d.ts +25 -0
  187. package/dist/models/update-customer-claim-response-class.js +15 -0
  188. package/dist/models/update-customer-request-dto.d.ts +31 -0
  189. package/dist/models/update-customer-request-dto.js +15 -0
  190. package/dist/models/update-customer-response-class.d.ts +25 -0
  191. package/dist/models/update-customer-response-class.js +15 -0
  192. package/dist/models/update-lead-request-dto.d.ts +44 -0
  193. package/dist/models/update-lead-request-dto.js +15 -0
  194. package/dist/models/update-lead-response-class.d.ts +25 -0
  195. package/dist/models/update-lead-response-class.js +15 -0
  196. package/dist/models/upload-customer-claim-documents-request-dto.d.ts +36 -0
  197. package/dist/models/upload-customer-claim-documents-request-dto.js +15 -0
  198. package/dist/models/upload-customer-policy-documents-request-dto.d.ts +47 -0
  199. package/dist/models/upload-customer-policy-documents-request-dto.js +20 -0
  200. package/dist/models/uploaded-document-dto.d.ts +24 -0
  201. package/dist/models/uploaded-document-dto.js +15 -0
  202. package/dist/models/verify-customer-invite-response-class.d.ts +36 -0
  203. package/dist/models/verify-customer-invite-response-class.js +15 -0
  204. package/dist/models/withdraw-customer-policy-response-class.d.ts +25 -0
  205. package/dist/models/withdraw-customer-policy-response-class.js +15 -0
  206. package/package.json +2 -2
@@ -0,0 +1,571 @@
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.LeadsApi = exports.LeadsApiFactory = exports.LeadsApiFp = exports.LeadsApiAxiosParamCreator = 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
+ * LeadsApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var LeadsApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
101
+ * @summary Create the lead
102
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
103
+ * @param {CreateLeadRequestDto} createLeadRequestDto
104
+ * @param {string} [authorization] Bearer Token
105
+ * @param {*} [options] Override http request option.
106
+ * @throws {RequiredError}
107
+ */
108
+ createLead: function (customerCode, createLeadRequestDto, authorization, options) {
109
+ if (options === void 0) { options = {}; }
110
+ return __awaiter(_this, void 0, void 0, function () {
111
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
112
+ return __generator(this, function (_a) {
113
+ switch (_a.label) {
114
+ case 0:
115
+ // verify required parameter 'customerCode' is not null or undefined
116
+ (0, common_1.assertParamExists)('createLead', 'customerCode', customerCode);
117
+ // verify required parameter 'createLeadRequestDto' is not null or undefined
118
+ (0, common_1.assertParamExists)('createLead', 'createLeadRequestDto', createLeadRequestDto);
119
+ localVarPath = "/v1/customers/{customerCode}/leads"
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: 'POST' }, baseOptions), options);
127
+ localVarHeaderParameter = {};
128
+ localVarQueryParameter = {};
129
+ // authentication bearer required
130
+ // http bearer authentication required
131
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
132
+ case 1:
133
+ // authentication bearer required
134
+ // http bearer authentication required
135
+ _a.sent();
136
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
137
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
138
+ }
139
+ localVarHeaderParameter['Content-Type'] = 'application/json';
140
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
141
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
142
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
143
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createLeadRequestDto, localVarRequestOptions, configuration);
144
+ return [2 /*return*/, {
145
+ url: (0, common_1.toPathString)(localVarUrlObj),
146
+ options: localVarRequestOptions,
147
+ }];
148
+ }
149
+ });
150
+ });
151
+ },
152
+ /**
153
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
154
+ * @summary Retrieve the lead
155
+ * @param {string} code Unique identifier for the object.
156
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
157
+ * @param {string} [authorization] Bearer Token
158
+ * @param {string} [expand]
159
+ * @param {*} [options] Override http request option.
160
+ * @throws {RequiredError}
161
+ */
162
+ getLead: function (code, customerCode, authorization, expand, options) {
163
+ if (options === void 0) { options = {}; }
164
+ return __awaiter(_this, void 0, void 0, function () {
165
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
166
+ return __generator(this, function (_a) {
167
+ switch (_a.label) {
168
+ case 0:
169
+ // verify required parameter 'code' is not null or undefined
170
+ (0, common_1.assertParamExists)('getLead', 'code', code);
171
+ // verify required parameter 'customerCode' is not null or undefined
172
+ (0, common_1.assertParamExists)('getLead', 'customerCode', customerCode);
173
+ localVarPath = "/v1/customers/{customerCode}/leads/{code}"
174
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)))
175
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
176
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
177
+ if (configuration) {
178
+ baseOptions = configuration.baseOptions;
179
+ baseAccessToken = configuration.accessToken;
180
+ }
181
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
182
+ localVarHeaderParameter = {};
183
+ localVarQueryParameter = {};
184
+ // authentication bearer required
185
+ // http bearer authentication required
186
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
187
+ case 1:
188
+ // authentication bearer required
189
+ // http bearer authentication required
190
+ _a.sent();
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
+ /**
209
+ * Returns a list of leads you have previously created. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
210
+ * @summary List leads
211
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
212
+ * @param {string} [authorization] Bearer Token
213
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
214
+ * @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.
215
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
216
+ * @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.
217
+ * @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.
218
+ * @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.
219
+ * @param {*} [options] Override http request option.
220
+ * @throws {RequiredError}
221
+ */
222
+ listLeads: function (customerCode, authorization, pageSize, pageToken, filter, search, order, expand, options) {
223
+ if (options === void 0) { options = {}; }
224
+ return __awaiter(_this, void 0, void 0, function () {
225
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
226
+ return __generator(this, function (_a) {
227
+ switch (_a.label) {
228
+ case 0:
229
+ // verify required parameter 'customerCode' is not null or undefined
230
+ (0, common_1.assertParamExists)('listLeads', 'customerCode', customerCode);
231
+ localVarPath = "/v1/customers/{customerCode}/leads"
232
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
233
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
234
+ if (configuration) {
235
+ baseOptions = configuration.baseOptions;
236
+ baseAccessToken = configuration.accessToken;
237
+ }
238
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
239
+ localVarHeaderParameter = {};
240
+ localVarQueryParameter = {};
241
+ // authentication bearer required
242
+ // http bearer authentication required
243
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
244
+ case 1:
245
+ // authentication bearer required
246
+ // http bearer authentication required
247
+ _a.sent();
248
+ if (pageSize !== undefined) {
249
+ localVarQueryParameter['pageSize'] = pageSize;
250
+ }
251
+ if (pageToken !== undefined) {
252
+ localVarQueryParameter['pageToken'] = pageToken;
253
+ }
254
+ if (filter !== undefined) {
255
+ localVarQueryParameter['filter'] = filter;
256
+ }
257
+ if (search !== undefined) {
258
+ localVarQueryParameter['search'] = search;
259
+ }
260
+ if (order !== undefined) {
261
+ localVarQueryParameter['order'] = order;
262
+ }
263
+ if (expand !== undefined) {
264
+ localVarQueryParameter['expand'] = expand;
265
+ }
266
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
267
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
268
+ }
269
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
270
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
271
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
272
+ return [2 /*return*/, {
273
+ url: (0, common_1.toPathString)(localVarUrlObj),
274
+ options: localVarRequestOptions,
275
+ }];
276
+ }
277
+ });
278
+ });
279
+ },
280
+ /**
281
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
282
+ * @summary Update the lead
283
+ * @param {string} code Unique identifier for the object.
284
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
285
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
286
+ * @param {string} [authorization] Bearer Token
287
+ * @param {*} [options] Override http request option.
288
+ * @throws {RequiredError}
289
+ */
290
+ updateLead: function (code, customerCode, updateLeadRequestDto, authorization, options) {
291
+ if (options === void 0) { options = {}; }
292
+ return __awaiter(_this, void 0, void 0, function () {
293
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
294
+ return __generator(this, function (_a) {
295
+ switch (_a.label) {
296
+ case 0:
297
+ // verify required parameter 'code' is not null or undefined
298
+ (0, common_1.assertParamExists)('updateLead', 'code', code);
299
+ // verify required parameter 'customerCode' is not null or undefined
300
+ (0, common_1.assertParamExists)('updateLead', 'customerCode', customerCode);
301
+ // verify required parameter 'updateLeadRequestDto' is not null or undefined
302
+ (0, common_1.assertParamExists)('updateLead', 'updateLeadRequestDto', updateLeadRequestDto);
303
+ localVarPath = "/v1/customers/{customerCode}/leads/{code}"
304
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)))
305
+ .replace("{".concat("customerCode", "}"), encodeURIComponent(String(customerCode)));
306
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
307
+ if (configuration) {
308
+ baseOptions = configuration.baseOptions;
309
+ baseAccessToken = configuration.accessToken;
310
+ }
311
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
312
+ localVarHeaderParameter = {};
313
+ localVarQueryParameter = {};
314
+ // authentication bearer required
315
+ // http bearer authentication required
316
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
317
+ case 1:
318
+ // authentication bearer required
319
+ // http bearer authentication required
320
+ _a.sent();
321
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
322
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
323
+ }
324
+ localVarHeaderParameter['Content-Type'] = 'application/json';
325
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
326
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
327
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
328
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateLeadRequestDto, localVarRequestOptions, configuration);
329
+ return [2 /*return*/, {
330
+ url: (0, common_1.toPathString)(localVarUrlObj),
331
+ options: localVarRequestOptions,
332
+ }];
333
+ }
334
+ });
335
+ });
336
+ },
337
+ };
338
+ };
339
+ exports.LeadsApiAxiosParamCreator = LeadsApiAxiosParamCreator;
340
+ /**
341
+ * LeadsApi - functional programming interface
342
+ * @export
343
+ */
344
+ var LeadsApiFp = function (configuration) {
345
+ var localVarAxiosParamCreator = (0, exports.LeadsApiAxiosParamCreator)(configuration);
346
+ return {
347
+ /**
348
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
349
+ * @summary Create the lead
350
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
351
+ * @param {CreateLeadRequestDto} createLeadRequestDto
352
+ * @param {string} [authorization] Bearer Token
353
+ * @param {*} [options] Override http request option.
354
+ * @throws {RequiredError}
355
+ */
356
+ createLead: function (customerCode, createLeadRequestDto, authorization, options) {
357
+ return __awaiter(this, void 0, void 0, function () {
358
+ var localVarAxiosArgs;
359
+ return __generator(this, function (_a) {
360
+ switch (_a.label) {
361
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createLead(customerCode, createLeadRequestDto, authorization, options)];
362
+ case 1:
363
+ localVarAxiosArgs = _a.sent();
364
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
365
+ }
366
+ });
367
+ });
368
+ },
369
+ /**
370
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
371
+ * @summary Retrieve the lead
372
+ * @param {string} code Unique identifier for the object.
373
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
374
+ * @param {string} [authorization] Bearer Token
375
+ * @param {string} [expand]
376
+ * @param {*} [options] Override http request option.
377
+ * @throws {RequiredError}
378
+ */
379
+ getLead: function (code, customerCode, authorization, expand, options) {
380
+ return __awaiter(this, void 0, void 0, function () {
381
+ var localVarAxiosArgs;
382
+ return __generator(this, function (_a) {
383
+ switch (_a.label) {
384
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getLead(code, customerCode, authorization, expand, options)];
385
+ case 1:
386
+ localVarAxiosArgs = _a.sent();
387
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
388
+ }
389
+ });
390
+ });
391
+ },
392
+ /**
393
+ * Returns a list of leads you have previously created. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
394
+ * @summary List leads
395
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
396
+ * @param {string} [authorization] Bearer Token
397
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
398
+ * @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.
399
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
400
+ * @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.
401
+ * @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.
402
+ * @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.
403
+ * @param {*} [options] Override http request option.
404
+ * @throws {RequiredError}
405
+ */
406
+ listLeads: function (customerCode, authorization, pageSize, pageToken, filter, search, order, expand, 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.listLeads(customerCode, authorization, pageSize, pageToken, filter, search, order, expand, 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
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
421
+ * @summary Update the lead
422
+ * @param {string} code Unique identifier for the object.
423
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
424
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
425
+ * @param {string} [authorization] Bearer Token
426
+ * @param {*} [options] Override http request option.
427
+ * @throws {RequiredError}
428
+ */
429
+ updateLead: function (code, customerCode, updateLeadRequestDto, authorization, options) {
430
+ return __awaiter(this, void 0, void 0, function () {
431
+ var localVarAxiosArgs;
432
+ return __generator(this, function (_a) {
433
+ switch (_a.label) {
434
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateLead(code, customerCode, updateLeadRequestDto, authorization, options)];
435
+ case 1:
436
+ localVarAxiosArgs = _a.sent();
437
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
438
+ }
439
+ });
440
+ });
441
+ },
442
+ };
443
+ };
444
+ exports.LeadsApiFp = LeadsApiFp;
445
+ /**
446
+ * LeadsApi - factory interface
447
+ * @export
448
+ */
449
+ var LeadsApiFactory = function (configuration, basePath, axios) {
450
+ var localVarFp = (0, exports.LeadsApiFp)(configuration);
451
+ return {
452
+ /**
453
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
454
+ * @summary Create the lead
455
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
456
+ * @param {CreateLeadRequestDto} createLeadRequestDto
457
+ * @param {string} [authorization] Bearer Token
458
+ * @param {*} [options] Override http request option.
459
+ * @throws {RequiredError}
460
+ */
461
+ createLead: function (customerCode, createLeadRequestDto, authorization, options) {
462
+ return localVarFp.createLead(customerCode, createLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
463
+ },
464
+ /**
465
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
466
+ * @summary Retrieve the lead
467
+ * @param {string} code Unique identifier for the object.
468
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
469
+ * @param {string} [authorization] Bearer Token
470
+ * @param {string} [expand]
471
+ * @param {*} [options] Override http request option.
472
+ * @throws {RequiredError}
473
+ */
474
+ getLead: function (code, customerCode, authorization, expand, options) {
475
+ return localVarFp.getLead(code, customerCode, authorization, expand, options).then(function (request) { return request(axios, basePath); });
476
+ },
477
+ /**
478
+ * Returns a list of leads you have previously created. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
479
+ * @summary List leads
480
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
481
+ * @param {string} [authorization] Bearer Token
482
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
483
+ * @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.
484
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
485
+ * @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.
486
+ * @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.
487
+ * @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.
488
+ * @param {*} [options] Override http request option.
489
+ * @throws {RequiredError}
490
+ */
491
+ listLeads: function (customerCode, authorization, pageSize, pageToken, filter, search, order, expand, options) {
492
+ return localVarFp.listLeads(customerCode, authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
493
+ },
494
+ /**
495
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
496
+ * @summary Update the lead
497
+ * @param {string} code Unique identifier for the object.
498
+ * @param {string} customerCode The customer code or \&quot;me\&quot; for the currently logged in customer.
499
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
500
+ * @param {string} [authorization] Bearer Token
501
+ * @param {*} [options] Override http request option.
502
+ * @throws {RequiredError}
503
+ */
504
+ updateLead: function (code, customerCode, updateLeadRequestDto, authorization, options) {
505
+ return localVarFp.updateLead(code, customerCode, updateLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
506
+ },
507
+ };
508
+ };
509
+ exports.LeadsApiFactory = LeadsApiFactory;
510
+ /**
511
+ * LeadsApi - object-oriented interface
512
+ * @export
513
+ * @class LeadsApi
514
+ * @extends {BaseAPI}
515
+ */
516
+ var LeadsApi = /** @class */ (function (_super) {
517
+ __extends(LeadsApi, _super);
518
+ function LeadsApi() {
519
+ return _super !== null && _super.apply(this, arguments) || this;
520
+ }
521
+ /**
522
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
523
+ * @summary Create the lead
524
+ * @param {LeadsApiCreateLeadRequest} requestParameters Request parameters.
525
+ * @param {*} [options] Override http request option.
526
+ * @throws {RequiredError}
527
+ * @memberof LeadsApi
528
+ */
529
+ LeadsApi.prototype.createLead = function (requestParameters, options) {
530
+ var _this = this;
531
+ return (0, exports.LeadsApiFp)(this.configuration).createLead(requestParameters.customerCode, requestParameters.createLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
532
+ };
533
+ /**
534
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
535
+ * @summary Retrieve the lead
536
+ * @param {LeadsApiGetLeadRequest} requestParameters Request parameters.
537
+ * @param {*} [options] Override http request option.
538
+ * @throws {RequiredError}
539
+ * @memberof LeadsApi
540
+ */
541
+ LeadsApi.prototype.getLead = function (requestParameters, options) {
542
+ var _this = this;
543
+ return (0, exports.LeadsApiFp)(this.configuration).getLead(requestParameters.code, requestParameters.customerCode, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
544
+ };
545
+ /**
546
+ * Returns a list of leads you have previously created. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
547
+ * @summary List leads
548
+ * @param {LeadsApiListLeadsRequest} requestParameters Request parameters.
549
+ * @param {*} [options] Override http request option.
550
+ * @throws {RequiredError}
551
+ * @memberof LeadsApi
552
+ */
553
+ LeadsApi.prototype.listLeads = function (requestParameters, options) {
554
+ var _this = this;
555
+ return (0, exports.LeadsApiFp)(this.configuration).listLeads(requestParameters.customerCode, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
556
+ };
557
+ /**
558
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
559
+ * @summary Update the lead
560
+ * @param {LeadsApiUpdateLeadRequest} requestParameters Request parameters.
561
+ * @param {*} [options] Override http request option.
562
+ * @throws {RequiredError}
563
+ * @memberof LeadsApi
564
+ */
565
+ LeadsApi.prototype.updateLead = function (requestParameters, options) {
566
+ var _this = this;
567
+ return (0, exports.LeadsApiFp)(this.configuration).updateLead(requestParameters.code, requestParameters.customerCode, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
568
+ };
569
+ return LeadsApi;
570
+ }(base_1.BaseAPI));
571
+ exports.LeadsApi = LeadsApi;