@emilgroup/public-api-sdk-node 1.26.0 → 1.27.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 (172) hide show
  1. package/README.md +2 -2
  2. package/dist/api/address-completions-validations-api.d.ts +215 -0
  3. package/dist/api/address-completions-validations-api.js +373 -0
  4. package/dist/api/default-api.d.ts +66 -0
  5. package/dist/api/default-api.js +200 -0
  6. package/dist/api/documents-api.d.ts +539 -0
  7. package/dist/api/documents-api.js +855 -0
  8. package/dist/api/leads-api.d.ts +441 -0
  9. package/dist/api/leads-api.js +791 -0
  10. package/dist/api/notifications-api.d.ts +211 -0
  11. package/dist/api/notifications-api.js +414 -0
  12. package/dist/api/payments-setup-api.d.ts +228 -0
  13. package/dist/api/payments-setup-api.js +426 -0
  14. package/dist/api/products-api.d.ts +563 -0
  15. package/dist/api/products-api.js +926 -0
  16. package/dist/api.d.ts +18 -0
  17. package/dist/api.js +36 -0
  18. package/dist/base.d.ts +78 -0
  19. package/dist/base.js +394 -0
  20. package/dist/common.d.ts +92 -0
  21. package/dist/common.js +277 -0
  22. package/dist/configuration.d.ts +90 -0
  23. package/dist/configuration.js +44 -0
  24. package/dist/index.d.ts +15 -0
  25. package/dist/index.js +36 -0
  26. package/dist/models/address-completion-item-class.d.ts +49 -0
  27. package/dist/models/address-completion-item-class.js +15 -0
  28. package/dist/models/address-completion-response-class.d.ts +25 -0
  29. package/dist/models/address-completion-response-class.js +15 -0
  30. package/dist/models/address-field-score-class.d.ts +48 -0
  31. package/dist/models/address-field-score-class.js +15 -0
  32. package/dist/models/calculate-product-fields-request-dto.d.ts +31 -0
  33. package/dist/models/calculate-product-fields-request-dto.js +15 -0
  34. package/dist/models/calculate-product-fields-response-class.d.ts +25 -0
  35. package/dist/models/calculate-product-fields-response-class.js +15 -0
  36. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +48 -0
  37. package/dist/models/complete-braintree-payment-setup-request-dto.js +15 -0
  38. package/dist/models/complete-email-verification-dto.d.ts +30 -0
  39. package/dist/models/complete-email-verification-dto.js +15 -0
  40. package/dist/models/complete-email-verification-response-class.d.ts +24 -0
  41. package/dist/models/complete-email-verification-response-class.js +15 -0
  42. package/dist/models/complete-payment-setup-request-dto.d.ts +32 -0
  43. package/dist/models/complete-payment-setup-request-dto.js +15 -0
  44. package/dist/models/complete-payment-setup-response-class.d.ts +25 -0
  45. package/dist/models/complete-payment-setup-response-class.js +15 -0
  46. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +60 -0
  47. package/dist/models/complete-stripe-payment-setup-request-dto.js +15 -0
  48. package/dist/models/create-account-request-dto.d.ts +132 -0
  49. package/dist/models/create-account-request-dto.js +31 -0
  50. package/dist/models/create-bank-account-request-dto.d.ts +30 -0
  51. package/dist/models/create-bank-account-request-dto.js +15 -0
  52. package/dist/models/create-custom-application-request-dto.d.ts +35 -0
  53. package/dist/models/create-custom-application-request-dto.js +20 -0
  54. package/dist/models/create-custom-application-response-class.d.ts +24 -0
  55. package/dist/models/create-custom-application-response-class.js +15 -0
  56. package/dist/models/create-document-request-dto.d.ts +132 -0
  57. package/dist/models/create-document-request-dto.js +43 -0
  58. package/dist/models/create-estimated-invoice-request-dto.d.ts +55 -0
  59. package/dist/models/create-estimated-invoice-request-dto.js +20 -0
  60. package/dist/models/create-estimated-invoice-response-class.d.ts +38 -0
  61. package/dist/models/create-estimated-invoice-response-class.js +15 -0
  62. package/dist/models/create-lead-async-response-class.d.ts +24 -0
  63. package/dist/models/create-lead-async-response-class.js +15 -0
  64. package/dist/models/create-lead-request-dto.d.ts +108 -0
  65. package/dist/models/create-lead-request-dto.js +15 -0
  66. package/dist/models/create-lead-response-class.d.ts +25 -0
  67. package/dist/models/create-lead-response-class.js +15 -0
  68. package/dist/models/create-payment-method-request-dto.d.ts +36 -0
  69. package/dist/models/create-payment-method-request-dto.js +20 -0
  70. package/dist/models/create-presigned-post-request-dto.d.ts +128 -0
  71. package/dist/models/create-presigned-post-request-dto.js +52 -0
  72. package/dist/models/create-presigned-post-response-class.d.ts +30 -0
  73. package/dist/models/create-presigned-post-response-class.js +15 -0
  74. package/dist/models/document-class.d.ts +144 -0
  75. package/dist/models/document-class.js +49 -0
  76. package/dist/models/get-custom-css-response-class.d.ts +24 -0
  77. package/dist/models/get-custom-css-response-class.js +15 -0
  78. package/dist/models/get-lead-response-class.d.ts +25 -0
  79. package/dist/models/get-lead-response-class.js +15 -0
  80. package/dist/models/get-product-document-download-url-response-class.d.ts +24 -0
  81. package/dist/models/get-product-document-download-url-response-class.js +15 -0
  82. package/dist/models/get-public-psp-settings-response-class.d.ts +30 -0
  83. package/dist/models/get-public-psp-settings-response-class.js +15 -0
  84. package/dist/models/index.d.ts +72 -0
  85. package/dist/models/index.js +88 -0
  86. package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +30 -0
  87. package/dist/models/initiate-braintree-payment-setup-request-dto.js +15 -0
  88. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +24 -0
  89. package/dist/models/initiate-braintree-payment-setup-response-class.js +15 -0
  90. package/dist/models/initiate-email-verification-dto.d.ts +30 -0
  91. package/dist/models/initiate-email-verification-dto.js +15 -0
  92. package/dist/models/initiate-email-verification-response-class.d.ts +24 -0
  93. package/dist/models/initiate-email-verification-response-class.js +15 -0
  94. package/dist/models/initiate-lead-response-class.d.ts +24 -0
  95. package/dist/models/initiate-lead-response-class.js +15 -0
  96. package/dist/models/initiate-payment-setup-request-dto.d.ts +32 -0
  97. package/dist/models/initiate-payment-setup-request-dto.js +15 -0
  98. package/dist/models/initiate-payment-setup-response-class.d.ts +32 -0
  99. package/dist/models/initiate-payment-setup-response-class.js +15 -0
  100. package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +30 -0
  101. package/dist/models/initiate-stripe-payment-setup-request-dto.js +15 -0
  102. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +30 -0
  103. package/dist/models/initiate-stripe-payment-setup-response-class.js +15 -0
  104. package/dist/models/inline-response200.d.ts +54 -0
  105. package/dist/models/inline-response200.js +15 -0
  106. package/dist/models/inline-response503.d.ts +54 -0
  107. package/dist/models/inline-response503.js +15 -0
  108. package/dist/models/insured-object-class.d.ts +85 -0
  109. package/dist/models/insured-object-class.js +15 -0
  110. package/dist/models/insured-object-type-class.d.ts +48 -0
  111. package/dist/models/insured-object-type-class.js +15 -0
  112. package/dist/models/invoice-class.d.ts +134 -0
  113. package/dist/models/invoice-class.js +15 -0
  114. package/dist/models/invoice-item-class.d.ts +120 -0
  115. package/dist/models/invoice-item-class.js +15 -0
  116. package/dist/models/invoice-status-class.d.ts +42 -0
  117. package/dist/models/invoice-status-class.js +15 -0
  118. package/dist/models/lead-account-class.d.ts +109 -0
  119. package/dist/models/lead-account-class.js +22 -0
  120. package/dist/models/lead-bank-account-class.d.ts +30 -0
  121. package/dist/models/lead-bank-account-class.js +15 -0
  122. package/dist/models/lead-class.d.ts +109 -0
  123. package/dist/models/lead-class.js +15 -0
  124. package/dist/models/lead-policy-class.d.ts +43 -0
  125. package/dist/models/lead-policy-class.js +15 -0
  126. package/dist/models/lead-policy-object-class.d.ts +36 -0
  127. package/dist/models/lead-policy-object-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-product-documents-response-class.d.ts +31 -0
  131. package/dist/models/list-product-documents-response-class.js +15 -0
  132. package/dist/models/list-products-response-class.d.ts +31 -0
  133. package/dist/models/list-products-response-class.js +15 -0
  134. package/dist/models/payment-method-class.d.ts +60 -0
  135. package/dist/models/payment-method-class.js +15 -0
  136. package/dist/models/policy-object-request-dto.d.ts +42 -0
  137. package/dist/models/policy-object-request-dto.js +15 -0
  138. package/dist/models/policy-object-response-class.d.ts +36 -0
  139. package/dist/models/policy-object-response-class.js +15 -0
  140. package/dist/models/premium-override-dto.d.ts +55 -0
  141. package/dist/models/premium-override-dto.js +27 -0
  142. package/dist/models/premium-override-request-dto.d.ts +25 -0
  143. package/dist/models/premium-override-request-dto.js +15 -0
  144. package/dist/models/product-class.d.ts +80 -0
  145. package/dist/models/product-class.js +15 -0
  146. package/dist/models/product-document-class.d.ts +111 -0
  147. package/dist/models/product-document-class.js +36 -0
  148. package/dist/models/product-factor-for-version-class.d.ts +60 -0
  149. package/dist/models/product-factor-for-version-class.js +15 -0
  150. package/dist/models/product-field-class.d.ts +132 -0
  151. package/dist/models/product-field-class.js +15 -0
  152. package/dist/models/product-version-class.d.ts +61 -0
  153. package/dist/models/product-version-class.js +22 -0
  154. package/dist/models/send-notification-request-dto.d.ts +36 -0
  155. package/dist/models/send-notification-request-dto.js +15 -0
  156. package/dist/models/send-notification-response-class.d.ts +24 -0
  157. package/dist/models/send-notification-response-class.js +15 -0
  158. package/dist/models/sepa-dto.d.ts +30 -0
  159. package/dist/models/sepa-dto.js +15 -0
  160. package/dist/models/structured-address-class.d.ts +54 -0
  161. package/dist/models/structured-address-class.js +15 -0
  162. package/dist/models/suggested-address-details-class.d.ts +90 -0
  163. package/dist/models/suggested-address-details-class.js +15 -0
  164. package/dist/models/update-lead-request-dto.d.ts +95 -0
  165. package/dist/models/update-lead-request-dto.js +15 -0
  166. package/dist/models/update-lead-response-class.d.ts +25 -0
  167. package/dist/models/update-lead-response-class.js +15 -0
  168. package/dist/models/uploaded-document-dto.d.ts +24 -0
  169. package/dist/models/uploaded-document-dto.js +15 -0
  170. package/dist/models/validate-address-response-class.d.ts +50 -0
  171. package/dist/models/validate-address-response-class.js +15 -0
  172. package/package.json +1 -1
@@ -0,0 +1,791 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Emil PublicAPI
6
+ * The Emil Public 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 {CreateLeadRequestDto} createLeadRequestDto
103
+ * @param {string} [authorization] Bearer Token
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ */
107
+ createLead: function (createLeadRequestDto, authorization, 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
+ switch (_a.label) {
113
+ case 0:
114
+ // verify required parameter 'createLeadRequestDto' is not null or undefined
115
+ (0, common_1.assertParamExists)('createLead', 'createLeadRequestDto', createLeadRequestDto);
116
+ localVarPath = "/publicapi/v1/leads";
117
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
118
+ if (configuration) {
119
+ baseOptions = configuration.baseOptions;
120
+ baseAccessToken = configuration.accessToken;
121
+ }
122
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
123
+ localVarHeaderParameter = {};
124
+ localVarQueryParameter = {};
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ case 1:
129
+ // authentication bearer required
130
+ // http bearer authentication required
131
+ _a.sent();
132
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
134
+ }
135
+ localVarHeaderParameter['Content-Type'] = 'application/json';
136
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createLeadRequestDto, localVarRequestOptions, configuration);
140
+ return [2 /*return*/, {
141
+ url: (0, common_1.toPathString)(localVarUrlObj),
142
+ options: localVarRequestOptions,
143
+ }];
144
+ }
145
+ });
146
+ });
147
+ },
148
+ /**
149
+ * This will send the lead to the queue for creation. Should be used when creating multiple leads at the same time - also called \'batch processing\'.
150
+ * @summary Create the lead asynchronously
151
+ * @param {CreateLeadRequestDto} createLeadRequestDto
152
+ * @param {string} [authorization] Bearer Token
153
+ * @param {*} [options] Override http request option.
154
+ * @throws {RequiredError}
155
+ */
156
+ createLeadAsync: function (createLeadRequestDto, authorization, options) {
157
+ if (options === void 0) { options = {}; }
158
+ return __awaiter(_this, void 0, void 0, function () {
159
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
+ return __generator(this, function (_a) {
161
+ switch (_a.label) {
162
+ case 0:
163
+ // verify required parameter 'createLeadRequestDto' is not null or undefined
164
+ (0, common_1.assertParamExists)('createLeadAsync', 'createLeadRequestDto', createLeadRequestDto);
165
+ localVarPath = "/publicapi/v1/leads-async";
166
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
167
+ if (configuration) {
168
+ baseOptions = configuration.baseOptions;
169
+ baseAccessToken = configuration.accessToken;
170
+ }
171
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
172
+ localVarHeaderParameter = {};
173
+ localVarQueryParameter = {};
174
+ // authentication bearer required
175
+ // http bearer authentication required
176
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
177
+ case 1:
178
+ // authentication bearer required
179
+ // http bearer authentication required
180
+ _a.sent();
181
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
182
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
183
+ }
184
+ localVarHeaderParameter['Content-Type'] = 'application/json';
185
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
188
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createLeadRequestDto, localVarRequestOptions, configuration);
189
+ return [2 /*return*/, {
190
+ url: (0, common_1.toPathString)(localVarUrlObj),
191
+ options: localVarRequestOptions,
192
+ }];
193
+ }
194
+ });
195
+ });
196
+ },
197
+ /**
198
+ * This endpoint initiates the creation of a lead, which is the initial step in a comprehensive workflow responsible for the creation of an account, policy, and banking information. Unlike the standard lead creation endpoint, this variant ensures that the process waits until the entire workflow is successfully completed before providing a response.
199
+ * @summary Create the lead synchronously
200
+ * @param {CreateLeadRequestDto} createLeadRequestDto
201
+ * @param {string} [authorization] Bearer Token
202
+ * @param {*} [options] Override http request option.
203
+ * @throws {RequiredError}
204
+ */
205
+ createLeadSync: function (createLeadRequestDto, authorization, options) {
206
+ if (options === void 0) { options = {}; }
207
+ return __awaiter(_this, void 0, void 0, function () {
208
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
209
+ return __generator(this, function (_a) {
210
+ switch (_a.label) {
211
+ case 0:
212
+ // verify required parameter 'createLeadRequestDto' is not null or undefined
213
+ (0, common_1.assertParamExists)('createLeadSync', 'createLeadRequestDto', createLeadRequestDto);
214
+ localVarPath = "/publicapi/v1/leads-sync";
215
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
216
+ if (configuration) {
217
+ baseOptions = configuration.baseOptions;
218
+ baseAccessToken = configuration.accessToken;
219
+ }
220
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
221
+ localVarHeaderParameter = {};
222
+ localVarQueryParameter = {};
223
+ // authentication bearer required
224
+ // http bearer authentication required
225
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
226
+ case 1:
227
+ // authentication bearer required
228
+ // http bearer authentication required
229
+ _a.sent();
230
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
231
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
232
+ }
233
+ localVarHeaderParameter['Content-Type'] = 'application/json';
234
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
235
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
236
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
237
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createLeadRequestDto, localVarRequestOptions, configuration);
238
+ return [2 /*return*/, {
239
+ url: (0, common_1.toPathString)(localVarUrlObj),
240
+ options: localVarRequestOptions,
241
+ }];
242
+ }
243
+ });
244
+ });
245
+ },
246
+ /**
247
+ * 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.
248
+ * @summary Retrieve the lead
249
+ * @param {string} code Unique identifier for the object.
250
+ * @param {string} [authorization] Bearer Token
251
+ * @param {*} [options] Override http request option.
252
+ * @throws {RequiredError}
253
+ */
254
+ getLead: function (code, authorization, options) {
255
+ if (options === void 0) { options = {}; }
256
+ return __awaiter(_this, void 0, void 0, function () {
257
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
258
+ return __generator(this, function (_a) {
259
+ switch (_a.label) {
260
+ case 0:
261
+ // verify required parameter 'code' is not null or undefined
262
+ (0, common_1.assertParamExists)('getLead', 'code', code);
263
+ localVarPath = "/publicapi/v1/leads/{code}"
264
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
265
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
266
+ if (configuration) {
267
+ baseOptions = configuration.baseOptions;
268
+ baseAccessToken = configuration.accessToken;
269
+ }
270
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
271
+ localVarHeaderParameter = {};
272
+ localVarQueryParameter = {};
273
+ // authentication bearer required
274
+ // http bearer authentication required
275
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
276
+ case 1:
277
+ // authentication bearer required
278
+ // http bearer authentication required
279
+ _a.sent();
280
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
281
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
282
+ }
283
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
284
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
285
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
286
+ return [2 /*return*/, {
287
+ url: (0, common_1.toPathString)(localVarUrlObj),
288
+ options: localVarRequestOptions,
289
+ }];
290
+ }
291
+ });
292
+ });
293
+ },
294
+ /**
295
+ * This will initiate a lead code.
296
+ * @summary Initiate a lead code
297
+ * @param {string} [authorization] Bearer Token
298
+ * @param {*} [options] Override http request option.
299
+ * @throws {RequiredError}
300
+ */
301
+ initiateLead: function (authorization, options) {
302
+ if (options === void 0) { options = {}; }
303
+ return __awaiter(_this, void 0, void 0, function () {
304
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
305
+ return __generator(this, function (_a) {
306
+ switch (_a.label) {
307
+ case 0:
308
+ localVarPath = "/publicapi/v1/leads/initiate";
309
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
310
+ if (configuration) {
311
+ baseOptions = configuration.baseOptions;
312
+ baseAccessToken = configuration.accessToken;
313
+ }
314
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
315
+ localVarHeaderParameter = {};
316
+ localVarQueryParameter = {};
317
+ // authentication bearer required
318
+ // http bearer authentication required
319
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
320
+ case 1:
321
+ // authentication bearer required
322
+ // http bearer authentication required
323
+ _a.sent();
324
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
325
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
326
+ }
327
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
328
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
329
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
330
+ return [2 /*return*/, {
331
+ url: (0, common_1.toPathString)(localVarUrlObj),
332
+ options: localVarRequestOptions,
333
+ }];
334
+ }
335
+ });
336
+ });
337
+ },
338
+ /**
339
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
340
+ * @summary Update the lead
341
+ * @param {string} code Unique identifier for the object.
342
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
343
+ * @param {string} [authorization] Bearer Token
344
+ * @param {*} [options] Override http request option.
345
+ * @throws {RequiredError}
346
+ */
347
+ updateLead: function (code, updateLeadRequestDto, authorization, options) {
348
+ if (options === void 0) { options = {}; }
349
+ return __awaiter(_this, void 0, void 0, function () {
350
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
351
+ return __generator(this, function (_a) {
352
+ switch (_a.label) {
353
+ case 0:
354
+ // verify required parameter 'code' is not null or undefined
355
+ (0, common_1.assertParamExists)('updateLead', 'code', code);
356
+ // verify required parameter 'updateLeadRequestDto' is not null or undefined
357
+ (0, common_1.assertParamExists)('updateLead', 'updateLeadRequestDto', updateLeadRequestDto);
358
+ localVarPath = "/publicapi/v1/leads/{code}"
359
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
360
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
361
+ if (configuration) {
362
+ baseOptions = configuration.baseOptions;
363
+ baseAccessToken = configuration.accessToken;
364
+ }
365
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
366
+ localVarHeaderParameter = {};
367
+ localVarQueryParameter = {};
368
+ // authentication bearer required
369
+ // http bearer authentication required
370
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
371
+ case 1:
372
+ // authentication bearer required
373
+ // http bearer authentication required
374
+ _a.sent();
375
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
376
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
377
+ }
378
+ localVarHeaderParameter['Content-Type'] = 'application/json';
379
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
380
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
381
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
382
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateLeadRequestDto, localVarRequestOptions, configuration);
383
+ return [2 /*return*/, {
384
+ url: (0, common_1.toPathString)(localVarUrlObj),
385
+ options: localVarRequestOptions,
386
+ }];
387
+ }
388
+ });
389
+ });
390
+ },
391
+ /**
392
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
393
+ * @summary Update the lead
394
+ * @param {string} code Unique identifier for the object.
395
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
396
+ * @param {string} [authorization] Bearer Token
397
+ * @param {*} [options] Override http request option.
398
+ * @throws {RequiredError}
399
+ */
400
+ updateLeadSync: function (code, updateLeadRequestDto, authorization, options) {
401
+ if (options === void 0) { options = {}; }
402
+ return __awaiter(_this, void 0, void 0, function () {
403
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
404
+ return __generator(this, function (_a) {
405
+ switch (_a.label) {
406
+ case 0:
407
+ // verify required parameter 'code' is not null or undefined
408
+ (0, common_1.assertParamExists)('updateLeadSync', 'code', code);
409
+ // verify required parameter 'updateLeadRequestDto' is not null or undefined
410
+ (0, common_1.assertParamExists)('updateLeadSync', 'updateLeadRequestDto', updateLeadRequestDto);
411
+ localVarPath = "/publicapi/v1/leads-sync/{code}"
412
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
413
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
414
+ if (configuration) {
415
+ baseOptions = configuration.baseOptions;
416
+ baseAccessToken = configuration.accessToken;
417
+ }
418
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
419
+ localVarHeaderParameter = {};
420
+ localVarQueryParameter = {};
421
+ // authentication bearer required
422
+ // http bearer authentication required
423
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
424
+ case 1:
425
+ // authentication bearer required
426
+ // http bearer authentication required
427
+ _a.sent();
428
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
429
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
430
+ }
431
+ localVarHeaderParameter['Content-Type'] = 'application/json';
432
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
433
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
434
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
435
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateLeadRequestDto, localVarRequestOptions, configuration);
436
+ return [2 /*return*/, {
437
+ url: (0, common_1.toPathString)(localVarUrlObj),
438
+ options: localVarRequestOptions,
439
+ }];
440
+ }
441
+ });
442
+ });
443
+ },
444
+ };
445
+ };
446
+ exports.LeadsApiAxiosParamCreator = LeadsApiAxiosParamCreator;
447
+ /**
448
+ * LeadsApi - functional programming interface
449
+ * @export
450
+ */
451
+ var LeadsApiFp = function (configuration) {
452
+ var localVarAxiosParamCreator = (0, exports.LeadsApiAxiosParamCreator)(configuration);
453
+ return {
454
+ /**
455
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
456
+ * @summary Create the lead
457
+ * @param {CreateLeadRequestDto} createLeadRequestDto
458
+ * @param {string} [authorization] Bearer Token
459
+ * @param {*} [options] Override http request option.
460
+ * @throws {RequiredError}
461
+ */
462
+ createLead: function (createLeadRequestDto, authorization, options) {
463
+ return __awaiter(this, void 0, void 0, function () {
464
+ var localVarAxiosArgs;
465
+ return __generator(this, function (_a) {
466
+ switch (_a.label) {
467
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createLead(createLeadRequestDto, authorization, options)];
468
+ case 1:
469
+ localVarAxiosArgs = _a.sent();
470
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
471
+ }
472
+ });
473
+ });
474
+ },
475
+ /**
476
+ * This will send the lead to the queue for creation. Should be used when creating multiple leads at the same time - also called \'batch processing\'.
477
+ * @summary Create the lead asynchronously
478
+ * @param {CreateLeadRequestDto} createLeadRequestDto
479
+ * @param {string} [authorization] Bearer Token
480
+ * @param {*} [options] Override http request option.
481
+ * @throws {RequiredError}
482
+ */
483
+ createLeadAsync: function (createLeadRequestDto, authorization, options) {
484
+ return __awaiter(this, void 0, void 0, function () {
485
+ var localVarAxiosArgs;
486
+ return __generator(this, function (_a) {
487
+ switch (_a.label) {
488
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createLeadAsync(createLeadRequestDto, authorization, options)];
489
+ case 1:
490
+ localVarAxiosArgs = _a.sent();
491
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
492
+ }
493
+ });
494
+ });
495
+ },
496
+ /**
497
+ * This endpoint initiates the creation of a lead, which is the initial step in a comprehensive workflow responsible for the creation of an account, policy, and banking information. Unlike the standard lead creation endpoint, this variant ensures that the process waits until the entire workflow is successfully completed before providing a response.
498
+ * @summary Create the lead synchronously
499
+ * @param {CreateLeadRequestDto} createLeadRequestDto
500
+ * @param {string} [authorization] Bearer Token
501
+ * @param {*} [options] Override http request option.
502
+ * @throws {RequiredError}
503
+ */
504
+ createLeadSync: function (createLeadRequestDto, authorization, options) {
505
+ return __awaiter(this, void 0, void 0, function () {
506
+ var localVarAxiosArgs;
507
+ return __generator(this, function (_a) {
508
+ switch (_a.label) {
509
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createLeadSync(createLeadRequestDto, authorization, options)];
510
+ case 1:
511
+ localVarAxiosArgs = _a.sent();
512
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
513
+ }
514
+ });
515
+ });
516
+ },
517
+ /**
518
+ * 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.
519
+ * @summary Retrieve the lead
520
+ * @param {string} code Unique identifier for the object.
521
+ * @param {string} [authorization] Bearer Token
522
+ * @param {*} [options] Override http request option.
523
+ * @throws {RequiredError}
524
+ */
525
+ getLead: function (code, authorization, options) {
526
+ return __awaiter(this, void 0, void 0, function () {
527
+ var localVarAxiosArgs;
528
+ return __generator(this, function (_a) {
529
+ switch (_a.label) {
530
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getLead(code, authorization, options)];
531
+ case 1:
532
+ localVarAxiosArgs = _a.sent();
533
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
534
+ }
535
+ });
536
+ });
537
+ },
538
+ /**
539
+ * This will initiate a lead code.
540
+ * @summary Initiate a lead code
541
+ * @param {string} [authorization] Bearer Token
542
+ * @param {*} [options] Override http request option.
543
+ * @throws {RequiredError}
544
+ */
545
+ initiateLead: function (authorization, options) {
546
+ return __awaiter(this, void 0, void 0, function () {
547
+ var localVarAxiosArgs;
548
+ return __generator(this, function (_a) {
549
+ switch (_a.label) {
550
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.initiateLead(authorization, options)];
551
+ case 1:
552
+ localVarAxiosArgs = _a.sent();
553
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
554
+ }
555
+ });
556
+ });
557
+ },
558
+ /**
559
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
560
+ * @summary Update the lead
561
+ * @param {string} code Unique identifier for the object.
562
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
563
+ * @param {string} [authorization] Bearer Token
564
+ * @param {*} [options] Override http request option.
565
+ * @throws {RequiredError}
566
+ */
567
+ updateLead: function (code, updateLeadRequestDto, authorization, options) {
568
+ return __awaiter(this, void 0, void 0, function () {
569
+ var localVarAxiosArgs;
570
+ return __generator(this, function (_a) {
571
+ switch (_a.label) {
572
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateLead(code, updateLeadRequestDto, authorization, options)];
573
+ case 1:
574
+ localVarAxiosArgs = _a.sent();
575
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
576
+ }
577
+ });
578
+ });
579
+ },
580
+ /**
581
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
582
+ * @summary Update the lead
583
+ * @param {string} code Unique identifier for the object.
584
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
585
+ * @param {string} [authorization] Bearer Token
586
+ * @param {*} [options] Override http request option.
587
+ * @throws {RequiredError}
588
+ */
589
+ updateLeadSync: function (code, updateLeadRequestDto, authorization, options) {
590
+ return __awaiter(this, void 0, void 0, function () {
591
+ var localVarAxiosArgs;
592
+ return __generator(this, function (_a) {
593
+ switch (_a.label) {
594
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateLeadSync(code, updateLeadRequestDto, authorization, options)];
595
+ case 1:
596
+ localVarAxiosArgs = _a.sent();
597
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
598
+ }
599
+ });
600
+ });
601
+ },
602
+ };
603
+ };
604
+ exports.LeadsApiFp = LeadsApiFp;
605
+ /**
606
+ * LeadsApi - factory interface
607
+ * @export
608
+ */
609
+ var LeadsApiFactory = function (configuration, basePath, axios) {
610
+ var localVarFp = (0, exports.LeadsApiFp)(configuration);
611
+ return {
612
+ /**
613
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
614
+ * @summary Create the lead
615
+ * @param {CreateLeadRequestDto} createLeadRequestDto
616
+ * @param {string} [authorization] Bearer Token
617
+ * @param {*} [options] Override http request option.
618
+ * @throws {RequiredError}
619
+ */
620
+ createLead: function (createLeadRequestDto, authorization, options) {
621
+ return localVarFp.createLead(createLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
622
+ },
623
+ /**
624
+ * This will send the lead to the queue for creation. Should be used when creating multiple leads at the same time - also called \'batch processing\'.
625
+ * @summary Create the lead asynchronously
626
+ * @param {CreateLeadRequestDto} createLeadRequestDto
627
+ * @param {string} [authorization] Bearer Token
628
+ * @param {*} [options] Override http request option.
629
+ * @throws {RequiredError}
630
+ */
631
+ createLeadAsync: function (createLeadRequestDto, authorization, options) {
632
+ return localVarFp.createLeadAsync(createLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
633
+ },
634
+ /**
635
+ * This endpoint initiates the creation of a lead, which is the initial step in a comprehensive workflow responsible for the creation of an account, policy, and banking information. Unlike the standard lead creation endpoint, this variant ensures that the process waits until the entire workflow is successfully completed before providing a response.
636
+ * @summary Create the lead synchronously
637
+ * @param {CreateLeadRequestDto} createLeadRequestDto
638
+ * @param {string} [authorization] Bearer Token
639
+ * @param {*} [options] Override http request option.
640
+ * @throws {RequiredError}
641
+ */
642
+ createLeadSync: function (createLeadRequestDto, authorization, options) {
643
+ return localVarFp.createLeadSync(createLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
644
+ },
645
+ /**
646
+ * 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.
647
+ * @summary Retrieve the lead
648
+ * @param {string} code Unique identifier for the object.
649
+ * @param {string} [authorization] Bearer Token
650
+ * @param {*} [options] Override http request option.
651
+ * @throws {RequiredError}
652
+ */
653
+ getLead: function (code, authorization, options) {
654
+ return localVarFp.getLead(code, authorization, options).then(function (request) { return request(axios, basePath); });
655
+ },
656
+ /**
657
+ * This will initiate a lead code.
658
+ * @summary Initiate a lead code
659
+ * @param {string} [authorization] Bearer Token
660
+ * @param {*} [options] Override http request option.
661
+ * @throws {RequiredError}
662
+ */
663
+ initiateLead: function (authorization, options) {
664
+ return localVarFp.initiateLead(authorization, options).then(function (request) { return request(axios, basePath); });
665
+ },
666
+ /**
667
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
668
+ * @summary Update the lead
669
+ * @param {string} code Unique identifier for the object.
670
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
671
+ * @param {string} [authorization] Bearer Token
672
+ * @param {*} [options] Override http request option.
673
+ * @throws {RequiredError}
674
+ */
675
+ updateLead: function (code, updateLeadRequestDto, authorization, options) {
676
+ return localVarFp.updateLead(code, updateLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
677
+ },
678
+ /**
679
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
680
+ * @summary Update the lead
681
+ * @param {string} code Unique identifier for the object.
682
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
683
+ * @param {string} [authorization] Bearer Token
684
+ * @param {*} [options] Override http request option.
685
+ * @throws {RequiredError}
686
+ */
687
+ updateLeadSync: function (code, updateLeadRequestDto, authorization, options) {
688
+ return localVarFp.updateLeadSync(code, updateLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
689
+ },
690
+ };
691
+ };
692
+ exports.LeadsApiFactory = LeadsApiFactory;
693
+ /**
694
+ * LeadsApi - object-oriented interface
695
+ * @export
696
+ * @class LeadsApi
697
+ * @extends {BaseAPI}
698
+ */
699
+ var LeadsApi = /** @class */ (function (_super) {
700
+ __extends(LeadsApi, _super);
701
+ function LeadsApi() {
702
+ return _super !== null && _super.apply(this, arguments) || this;
703
+ }
704
+ /**
705
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
706
+ * @summary Create the lead
707
+ * @param {LeadsApiCreateLeadRequest} requestParameters Request parameters.
708
+ * @param {*} [options] Override http request option.
709
+ * @throws {RequiredError}
710
+ * @memberof LeadsApi
711
+ */
712
+ LeadsApi.prototype.createLead = function (requestParameters, options) {
713
+ var _this = this;
714
+ return (0, exports.LeadsApiFp)(this.configuration).createLead(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
715
+ };
716
+ /**
717
+ * This will send the lead to the queue for creation. Should be used when creating multiple leads at the same time - also called \'batch processing\'.
718
+ * @summary Create the lead asynchronously
719
+ * @param {LeadsApiCreateLeadAsyncRequest} requestParameters Request parameters.
720
+ * @param {*} [options] Override http request option.
721
+ * @throws {RequiredError}
722
+ * @memberof LeadsApi
723
+ */
724
+ LeadsApi.prototype.createLeadAsync = function (requestParameters, options) {
725
+ var _this = this;
726
+ return (0, exports.LeadsApiFp)(this.configuration).createLeadAsync(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
727
+ };
728
+ /**
729
+ * This endpoint initiates the creation of a lead, which is the initial step in a comprehensive workflow responsible for the creation of an account, policy, and banking information. Unlike the standard lead creation endpoint, this variant ensures that the process waits until the entire workflow is successfully completed before providing a response.
730
+ * @summary Create the lead synchronously
731
+ * @param {LeadsApiCreateLeadSyncRequest} requestParameters Request parameters.
732
+ * @param {*} [options] Override http request option.
733
+ * @throws {RequiredError}
734
+ * @memberof LeadsApi
735
+ */
736
+ LeadsApi.prototype.createLeadSync = function (requestParameters, options) {
737
+ var _this = this;
738
+ return (0, exports.LeadsApiFp)(this.configuration).createLeadSync(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
739
+ };
740
+ /**
741
+ * 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.
742
+ * @summary Retrieve the lead
743
+ * @param {LeadsApiGetLeadRequest} requestParameters Request parameters.
744
+ * @param {*} [options] Override http request option.
745
+ * @throws {RequiredError}
746
+ * @memberof LeadsApi
747
+ */
748
+ LeadsApi.prototype.getLead = function (requestParameters, options) {
749
+ var _this = this;
750
+ return (0, exports.LeadsApiFp)(this.configuration).getLead(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
751
+ };
752
+ /**
753
+ * This will initiate a lead code.
754
+ * @summary Initiate a lead code
755
+ * @param {LeadsApiInitiateLeadRequest} requestParameters Request parameters.
756
+ * @param {*} [options] Override http request option.
757
+ * @throws {RequiredError}
758
+ * @memberof LeadsApi
759
+ */
760
+ LeadsApi.prototype.initiateLead = function (requestParameters, options) {
761
+ var _this = this;
762
+ if (requestParameters === void 0) { requestParameters = {}; }
763
+ return (0, exports.LeadsApiFp)(this.configuration).initiateLead(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
764
+ };
765
+ /**
766
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
767
+ * @summary Update the lead
768
+ * @param {LeadsApiUpdateLeadRequest} requestParameters Request parameters.
769
+ * @param {*} [options] Override http request option.
770
+ * @throws {RequiredError}
771
+ * @memberof LeadsApi
772
+ */
773
+ LeadsApi.prototype.updateLead = function (requestParameters, options) {
774
+ var _this = this;
775
+ return (0, exports.LeadsApiFp)(this.configuration).updateLead(requestParameters.code, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
776
+ };
777
+ /**
778
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
779
+ * @summary Update the lead
780
+ * @param {LeadsApiUpdateLeadSyncRequest} requestParameters Request parameters.
781
+ * @param {*} [options] Override http request option.
782
+ * @throws {RequiredError}
783
+ * @memberof LeadsApi
784
+ */
785
+ LeadsApi.prototype.updateLeadSync = function (requestParameters, options) {
786
+ var _this = this;
787
+ return (0, exports.LeadsApiFp)(this.configuration).updateLeadSync(requestParameters.code, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
788
+ };
789
+ return LeadsApi;
790
+ }(base_1.BaseAPI));
791
+ exports.LeadsApi = LeadsApi;