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