@emilgroup/insurance-sdk-node 1.35.0 → 1.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/README.md +2 -2
  2. package/dist/api/default-api.d.ts +66 -0
  3. package/dist/api/default-api.js +200 -0
  4. package/dist/api/insured-object-types-api.d.ts +141 -0
  5. package/dist/api/insured-object-types-api.js +258 -0
  6. package/dist/api/insured-objects-api.d.ts +318 -0
  7. package/dist/api/insured-objects-api.js +539 -0
  8. package/dist/api/lead-statuses-api.d.ts +265 -0
  9. package/dist/api/lead-statuses-api.js +505 -0
  10. package/dist/api/leads-api.d.ts +626 -0
  11. package/dist/api/leads-api.js +1024 -0
  12. package/dist/api/named-ranges-api.d.ts +376 -0
  13. package/dist/api/named-ranges-api.js +634 -0
  14. package/dist/api/policies-api.d.ts +722 -0
  15. package/dist/api/policies-api.js +1141 -0
  16. package/dist/api/premium-formulas-api.d.ts +433 -0
  17. package/dist/api/premium-formulas-api.js +727 -0
  18. package/dist/api/product-factors-api.d.ts +493 -0
  19. package/dist/api/product-factors-api.js +788 -0
  20. package/dist/api/product-fields-api.d.ts +477 -0
  21. package/dist/api/product-fields-api.js +757 -0
  22. package/dist/api/product-versions-api.d.ts +189 -0
  23. package/dist/api/product-versions-api.js +346 -0
  24. package/dist/api/products-api.d.ts +485 -0
  25. package/dist/api/products-api.js +772 -0
  26. package/dist/api.d.ts +23 -0
  27. package/dist/api.js +41 -0
  28. package/dist/base.d.ts +78 -0
  29. package/dist/base.js +394 -0
  30. package/dist/common.d.ts +92 -0
  31. package/dist/common.js +277 -0
  32. package/dist/configuration.d.ts +90 -0
  33. package/dist/configuration.js +44 -0
  34. package/dist/index.d.ts +15 -0
  35. package/dist/index.js +36 -0
  36. package/dist/models/activate-policy-request-dto.d.ts +24 -0
  37. package/dist/models/activate-policy-request-dto.js +15 -0
  38. package/dist/models/activate-policy-response-class.d.ts +25 -0
  39. package/dist/models/activate-policy-response-class.js +15 -0
  40. package/dist/models/calculate-custom-premium-request-dto.d.ts +35 -0
  41. package/dist/models/calculate-custom-premium-request-dto.js +20 -0
  42. package/dist/models/calculate-premium-request-dto.d.ts +38 -0
  43. package/dist/models/calculate-premium-request-dto.js +15 -0
  44. package/dist/models/calculate-product-fields-request-dto.d.ts +31 -0
  45. package/dist/models/calculate-product-fields-request-dto.js +15 -0
  46. package/dist/models/clone-product-version-request-dto.d.ts +36 -0
  47. package/dist/models/clone-product-version-request-dto.js +15 -0
  48. package/dist/models/create-account-request-dto.d.ts +120 -0
  49. package/dist/models/create-account-request-dto.js +26 -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 +41 -0
  53. package/dist/models/create-custom-application-request-dto.js +20 -0
  54. package/dist/models/create-dummy-policy-request-dto.d.ts +44 -0
  55. package/dist/models/create-dummy-policy-request-dto.js +15 -0
  56. package/dist/models/create-insured-object-request-dto.d.ts +60 -0
  57. package/dist/models/create-insured-object-request-dto.js +15 -0
  58. package/dist/models/create-insured-object-response-class.d.ts +25 -0
  59. package/dist/models/create-insured-object-response-class.js +15 -0
  60. package/dist/models/create-lead-async-response-class.d.ts +24 -0
  61. package/dist/models/create-lead-async-response-class.js +15 -0
  62. package/dist/models/create-lead-policy-request-dto.d.ts +56 -0
  63. package/dist/models/create-lead-policy-request-dto.js +15 -0
  64. package/dist/models/create-lead-request-dto.d.ts +96 -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-lead-status-request-dto.d.ts +30 -0
  69. package/dist/models/create-lead-status-request-dto.js +15 -0
  70. package/dist/models/create-lead-status-response-class.d.ts +25 -0
  71. package/dist/models/create-lead-status-response-class.js +15 -0
  72. package/dist/models/create-named-range-request-dto.d.ts +55 -0
  73. package/dist/models/create-named-range-request-dto.js +15 -0
  74. package/dist/models/create-named-range-response-class.d.ts +25 -0
  75. package/dist/models/create-named-range-response-class.js +15 -0
  76. package/dist/models/create-named-request-s3-data-class.d.ts +30 -0
  77. package/dist/models/create-named-request-s3-data-class.js +15 -0
  78. package/dist/models/create-payment-method-request-dto.d.ts +31 -0
  79. package/dist/models/create-payment-method-request-dto.js +15 -0
  80. package/dist/models/create-policy-request-dto.d.ts +62 -0
  81. package/dist/models/create-policy-request-dto.js +15 -0
  82. package/dist/models/create-policy-response-class.d.ts +25 -0
  83. package/dist/models/create-policy-response-class.js +15 -0
  84. package/dist/models/create-premium-formula-request-dto.d.ts +105 -0
  85. package/dist/models/create-premium-formula-request-dto.js +39 -0
  86. package/dist/models/create-premium-formula-response-class.d.ts +25 -0
  87. package/dist/models/create-premium-formula-response-class.js +15 -0
  88. package/dist/models/create-product-field-request-dto.d.ts +137 -0
  89. package/dist/models/create-product-field-request-dto.js +20 -0
  90. package/dist/models/create-product-field-response-class.d.ts +25 -0
  91. package/dist/models/create-product-field-response-class.js +15 -0
  92. package/dist/models/create-product-request-dto.d.ts +85 -0
  93. package/dist/models/create-product-request-dto.js +51 -0
  94. package/dist/models/create-product-response-class.d.ts +25 -0
  95. package/dist/models/create-product-response-class.js +15 -0
  96. package/dist/models/csv-product-factor-dto.d.ts +48 -0
  97. package/dist/models/csv-product-factor-dto.js +15 -0
  98. package/dist/models/delete-request-dto.d.ts +24 -0
  99. package/dist/models/delete-request-dto.js +15 -0
  100. package/dist/models/delete-response-class.d.ts +24 -0
  101. package/dist/models/delete-response-class.js +15 -0
  102. package/dist/models/empty-response-class.d.ts +24 -0
  103. package/dist/models/empty-response-class.js +15 -0
  104. package/dist/models/get-insured-object-response-class.d.ts +25 -0
  105. package/dist/models/get-insured-object-response-class.js +15 -0
  106. package/dist/models/get-lead-response-class.d.ts +25 -0
  107. package/dist/models/get-lead-response-class.js +15 -0
  108. package/dist/models/get-lead-status-response-class.d.ts +25 -0
  109. package/dist/models/get-lead-status-response-class.js +15 -0
  110. package/dist/models/get-named-range-response-class.d.ts +25 -0
  111. package/dist/models/get-named-range-response-class.js +15 -0
  112. package/dist/models/get-policy-data-by-date-request-dto.d.ts +30 -0
  113. package/dist/models/get-policy-data-by-date-request-dto.js +15 -0
  114. package/dist/models/get-policy-request-dto.d.ts +30 -0
  115. package/dist/models/get-policy-request-dto.js +15 -0
  116. package/dist/models/get-policy-response-class.d.ts +25 -0
  117. package/dist/models/get-policy-response-class.js +15 -0
  118. package/dist/models/get-premium-formula-request-dto.d.ts +24 -0
  119. package/dist/models/get-premium-formula-request-dto.js +15 -0
  120. package/dist/models/get-premium-formula-response-class.d.ts +25 -0
  121. package/dist/models/get-premium-formula-response-class.js +15 -0
  122. package/dist/models/get-product-factor-response-class.d.ts +32 -0
  123. package/dist/models/get-product-factor-response-class.js +15 -0
  124. package/dist/models/get-product-factor-value-request-dto.d.ts +42 -0
  125. package/dist/models/get-product-factor-value-request-dto.js +15 -0
  126. package/dist/models/get-product-factor-value-response-class.d.ts +25 -0
  127. package/dist/models/get-product-factor-value-response-class.js +15 -0
  128. package/dist/models/get-product-factors-for-version-request-dto.d.ts +36 -0
  129. package/dist/models/get-product-factors-for-version-request-dto.js +15 -0
  130. package/dist/models/get-product-factors-for-version-response-class.d.ts +25 -0
  131. package/dist/models/get-product-factors-for-version-response-class.js +15 -0
  132. package/dist/models/get-product-field-request-dto.d.ts +24 -0
  133. package/dist/models/get-product-field-request-dto.js +15 -0
  134. package/dist/models/get-product-field-response-class.d.ts +25 -0
  135. package/dist/models/get-product-field-response-class.js +15 -0
  136. package/dist/models/get-product-request-dto.d.ts +42 -0
  137. package/dist/models/get-product-request-dto.js +15 -0
  138. package/dist/models/get-product-response-class.d.ts +25 -0
  139. package/dist/models/get-product-response-class.js +15 -0
  140. package/dist/models/get-product-version-request-dto.d.ts +36 -0
  141. package/dist/models/get-product-version-request-dto.js +15 -0
  142. package/dist/models/get-product-version-response-class.d.ts +25 -0
  143. package/dist/models/get-product-version-response-class.js +15 -0
  144. package/dist/models/grouped-product-factor-class.d.ts +37 -0
  145. package/dist/models/grouped-product-factor-class.js +15 -0
  146. package/dist/models/grouped-product-factor-value-class.d.ts +42 -0
  147. package/dist/models/grouped-product-factor-value-class.js +15 -0
  148. package/dist/models/grouped-product-factors-response-class.d.ts +25 -0
  149. package/dist/models/grouped-product-factors-response-class.js +15 -0
  150. package/dist/models/grpc-patch-lead-request-dto.d.ts +102 -0
  151. package/dist/models/grpc-patch-lead-request-dto.js +15 -0
  152. package/dist/models/grpc-update-lead-request-dto.d.ts +102 -0
  153. package/dist/models/grpc-update-lead-request-dto.js +15 -0
  154. package/dist/models/index.d.ts +136 -0
  155. package/dist/models/index.js +152 -0
  156. package/dist/models/inline-response200.d.ts +54 -0
  157. package/dist/models/inline-response200.js +15 -0
  158. package/dist/models/inline-response503.d.ts +54 -0
  159. package/dist/models/inline-response503.js +15 -0
  160. package/dist/models/insured-object-class.d.ts +85 -0
  161. package/dist/models/insured-object-class.js +15 -0
  162. package/dist/models/insured-object-type-class.d.ts +48 -0
  163. package/dist/models/insured-object-type-class.js +15 -0
  164. package/dist/models/invoice-item-class.d.ts +117 -0
  165. package/dist/models/invoice-item-class.js +24 -0
  166. package/dist/models/invoice-status-class.d.ts +47 -0
  167. package/dist/models/invoice-status-class.js +20 -0
  168. package/dist/models/lead-bank-account-class.d.ts +30 -0
  169. package/dist/models/lead-bank-account-class.js +15 -0
  170. package/dist/models/lead-class.d.ts +133 -0
  171. package/dist/models/lead-class.js +15 -0
  172. package/dist/models/lead-status-class.d.ts +36 -0
  173. package/dist/models/lead-status-class.js +15 -0
  174. package/dist/models/list-insured-object-types-response-class.d.ts +31 -0
  175. package/dist/models/list-insured-object-types-response-class.js +15 -0
  176. package/dist/models/list-insured-objects-response-class.d.ts +31 -0
  177. package/dist/models/list-insured-objects-response-class.js +15 -0
  178. package/dist/models/list-lead-statuses-response-class.d.ts +31 -0
  179. package/dist/models/list-lead-statuses-response-class.js +15 -0
  180. package/dist/models/list-leads-response-class.d.ts +43 -0
  181. package/dist/models/list-leads-response-class.js +15 -0
  182. package/dist/models/list-named-ranges-response-class.d.ts +30 -0
  183. package/dist/models/list-named-ranges-response-class.js +15 -0
  184. package/dist/models/list-policies-response-class.d.ts +43 -0
  185. package/dist/models/list-policies-response-class.js +15 -0
  186. package/dist/models/list-premium-formulas-response-class.d.ts +31 -0
  187. package/dist/models/list-premium-formulas-response-class.js +15 -0
  188. package/dist/models/list-product-factors-response-class.d.ts +31 -0
  189. package/dist/models/list-product-factors-response-class.js +15 -0
  190. package/dist/models/list-product-field-types-response-class.d.ts +31 -0
  191. package/dist/models/list-product-field-types-response-class.js +15 -0
  192. package/dist/models/list-product-fields-response-class.d.ts +31 -0
  193. package/dist/models/list-product-fields-response-class.js +15 -0
  194. package/dist/models/list-products-response-class.d.ts +31 -0
  195. package/dist/models/list-products-response-class.js +15 -0
  196. package/dist/models/list-request-dto.d.ts +54 -0
  197. package/dist/models/list-request-dto.js +15 -0
  198. package/dist/models/named-range-class.d.ts +78 -0
  199. package/dist/models/named-range-class.js +15 -0
  200. package/dist/models/patch-lead-request-dto.d.ts +90 -0
  201. package/dist/models/patch-lead-request-dto.js +15 -0
  202. package/dist/models/patch-lead-response-class.d.ts +25 -0
  203. package/dist/models/patch-lead-response-class.js +15 -0
  204. package/dist/models/patch-policy-request-dto.d.ts +50 -0
  205. package/dist/models/patch-policy-request-dto.js +15 -0
  206. package/dist/models/patch-policy-response-class.d.ts +25 -0
  207. package/dist/models/patch-policy-response-class.js +15 -0
  208. package/dist/models/policy-class.d.ts +128 -0
  209. package/dist/models/policy-class.js +15 -0
  210. package/dist/models/policy-object-class.d.ts +60 -0
  211. package/dist/models/policy-object-class.js +15 -0
  212. package/dist/models/policy-object-dto.d.ts +42 -0
  213. package/dist/models/policy-object-dto.js +15 -0
  214. package/dist/models/policy-premium-class.d.ts +49 -0
  215. package/dist/models/policy-premium-class.js +15 -0
  216. package/dist/models/policy-premium-item-class.d.ts +55 -0
  217. package/dist/models/policy-premium-item-class.js +15 -0
  218. package/dist/models/policy-version-class.d.ts +55 -0
  219. package/dist/models/policy-version-class.js +15 -0
  220. package/dist/models/premium-formula-class.d.ts +96 -0
  221. package/dist/models/premium-formula-class.js +15 -0
  222. package/dist/models/premium-override-dto.d.ts +55 -0
  223. package/dist/models/premium-override-dto.js +27 -0
  224. package/dist/models/premium-override-request-class.d.ts +25 -0
  225. package/dist/models/premium-override-request-class.js +15 -0
  226. package/dist/models/premium-override-request-dto.d.ts +25 -0
  227. package/dist/models/premium-override-request-dto.js +15 -0
  228. package/dist/models/product-class.d.ts +80 -0
  229. package/dist/models/product-class.js +15 -0
  230. package/dist/models/product-factor-class.d.ts +61 -0
  231. package/dist/models/product-factor-class.js +15 -0
  232. package/dist/models/product-factor-for-version-class.d.ts +61 -0
  233. package/dist/models/product-factor-for-version-class.js +15 -0
  234. package/dist/models/product-factor-value-class.d.ts +60 -0
  235. package/dist/models/product-factor-value-class.js +15 -0
  236. package/dist/models/product-factor-value-for-version-class.d.ts +42 -0
  237. package/dist/models/product-factor-value-for-version-class.js +15 -0
  238. package/dist/models/product-field-class.d.ts +132 -0
  239. package/dist/models/product-field-class.js +15 -0
  240. package/dist/models/product-field-type-class.d.ts +48 -0
  241. package/dist/models/product-field-type-class.js +15 -0
  242. package/dist/models/product-version-class.d.ts +61 -0
  243. package/dist/models/product-version-class.js +22 -0
  244. package/dist/models/sepa-dto.d.ts +30 -0
  245. package/dist/models/sepa-dto.js +15 -0
  246. package/dist/models/shared-create-lead-policy-request-dto.d.ts +56 -0
  247. package/dist/models/shared-create-lead-policy-request-dto.js +15 -0
  248. package/dist/models/shared-invoice-class.d.ts +150 -0
  249. package/dist/models/shared-invoice-class.js +30 -0
  250. package/dist/models/shared-lead-policy-object-dto.d.ts +42 -0
  251. package/dist/models/shared-lead-policy-object-dto.js +15 -0
  252. package/dist/models/shared-product-field-class.d.ts +132 -0
  253. package/dist/models/shared-product-field-class.js +15 -0
  254. package/dist/models/shared-update-named-range-request-dto.d.ts +42 -0
  255. package/dist/models/shared-update-named-range-request-dto.js +15 -0
  256. package/dist/models/shared-update-premium-formula-request-dto.d.ts +111 -0
  257. package/dist/models/shared-update-premium-formula-request-dto.js +39 -0
  258. package/dist/models/store-product-factors-request-dto.d.ts +31 -0
  259. package/dist/models/store-product-factors-request-dto.js +15 -0
  260. package/dist/models/store-product-factors-response-class.d.ts +25 -0
  261. package/dist/models/store-product-factors-response-class.js +15 -0
  262. package/dist/models/suspend-policy-request-dto.d.ts +24 -0
  263. package/dist/models/suspend-policy-request-dto.js +15 -0
  264. package/dist/models/suspend-policy-response-class.d.ts +25 -0
  265. package/dist/models/suspend-policy-response-class.js +15 -0
  266. package/dist/models/swap-premium-formulas-order-request-dto.d.ts +30 -0
  267. package/dist/models/swap-premium-formulas-order-request-dto.js +15 -0
  268. package/dist/models/terminate-policy-request-dto.d.ts +44 -0
  269. package/dist/models/terminate-policy-request-dto.js +29 -0
  270. package/dist/models/terminate-policy-response-class.d.ts +25 -0
  271. package/dist/models/terminate-policy-response-class.js +15 -0
  272. package/dist/models/timeslice-class.d.ts +62 -0
  273. package/dist/models/timeslice-class.js +15 -0
  274. package/dist/models/update-insured-object-request-dto.d.ts +66 -0
  275. package/dist/models/update-insured-object-request-dto.js +15 -0
  276. package/dist/models/update-lead-request-dto.d.ts +90 -0
  277. package/dist/models/update-lead-request-dto.js +15 -0
  278. package/dist/models/update-lead-response-class.d.ts +25 -0
  279. package/dist/models/update-lead-response-class.js +15 -0
  280. package/dist/models/update-named-range-request-dto.d.ts +36 -0
  281. package/dist/models/update-named-range-request-dto.js +15 -0
  282. package/dist/models/update-named-range-response-class.d.ts +25 -0
  283. package/dist/models/update-named-range-response-class.js +15 -0
  284. package/dist/models/update-policy-request-dto.d.ts +76 -0
  285. package/dist/models/update-policy-request-dto.js +23 -0
  286. package/dist/models/update-policy-response-class.d.ts +25 -0
  287. package/dist/models/update-policy-response-class.js +15 -0
  288. package/dist/models/update-premium-formula-request-dto.d.ts +105 -0
  289. package/dist/models/update-premium-formula-request-dto.js +39 -0
  290. package/dist/models/update-premium-formula-response-class.d.ts +25 -0
  291. package/dist/models/update-premium-formula-response-class.js +15 -0
  292. package/dist/models/update-product-field-request-dto.d.ts +143 -0
  293. package/dist/models/update-product-field-request-dto.js +20 -0
  294. package/dist/models/update-product-field-response-class.d.ts +25 -0
  295. package/dist/models/update-product-field-response-class.js +15 -0
  296. package/dist/models/update-product-request-dto.d.ts +42 -0
  297. package/dist/models/update-product-request-dto.js +15 -0
  298. package/dist/models/update-product-response-class.d.ts +25 -0
  299. package/dist/models/update-product-response-class.js +15 -0
  300. package/dist/models/update-product-version-request-dto.d.ts +43 -0
  301. package/dist/models/update-product-version-request-dto.js +22 -0
  302. package/dist/models/update-product-version-response-class.d.ts +25 -0
  303. package/dist/models/update-product-version-response-class.js +15 -0
  304. package/dist/models/uploaded-document-dto.d.ts +24 -0
  305. package/dist/models/uploaded-document-dto.js +15 -0
  306. package/dist/models/validate-product-factors-request-dto.d.ts +31 -0
  307. package/dist/models/validate-product-factors-request-dto.js +15 -0
  308. package/dist/models/withdraw-policy-response-class.d.ts +25 -0
  309. package/dist/models/withdraw-policy-response-class.js +15 -0
  310. package/package.json +2 -2
@@ -0,0 +1,1024 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL InsuranceService
6
+ * The EMIL InsuranceService 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 = "/insuranceservice/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 = "/insuranceservice/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
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 = "/insuranceservice/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
+ * Permanently deletes the lead. Supply the unique code that was returned when you created the lead and this will delete it.
248
+ * @summary Delete the lead
249
+ * @param {string} code
250
+ * @param {string} [authorization] Bearer Token
251
+ * @param {*} [options] Override http request option.
252
+ * @throws {RequiredError}
253
+ */
254
+ deleteLead: 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)('deleteLead', 'code', code);
263
+ localVarPath = "/insuranceservice/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: 'DELETE' }, 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
+ * 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.
296
+ * @summary Retrieve the lead
297
+ * @param {string} code Unique identifier for the object.
298
+ * @param {string} [authorization] Bearer Token
299
+ * @param {string} [expand]
300
+ * @param {*} [options] Override http request option.
301
+ * @throws {RequiredError}
302
+ */
303
+ getLead: function (code, authorization, expand, options) {
304
+ if (options === void 0) { options = {}; }
305
+ return __awaiter(_this, void 0, void 0, function () {
306
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
307
+ return __generator(this, function (_a) {
308
+ switch (_a.label) {
309
+ case 0:
310
+ // verify required parameter 'code' is not null or undefined
311
+ (0, common_1.assertParamExists)('getLead', 'code', code);
312
+ localVarPath = "/insuranceservice/v1/leads/{code}"
313
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
314
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
315
+ if (configuration) {
316
+ baseOptions = configuration.baseOptions;
317
+ baseAccessToken = configuration.accessToken;
318
+ }
319
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
320
+ localVarHeaderParameter = {};
321
+ localVarQueryParameter = {};
322
+ // authentication bearer required
323
+ // http bearer authentication required
324
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
325
+ case 1:
326
+ // authentication bearer required
327
+ // http bearer authentication required
328
+ _a.sent();
329
+ if (expand !== undefined) {
330
+ localVarQueryParameter['expand'] = expand;
331
+ }
332
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
333
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
334
+ }
335
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
336
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
337
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
338
+ return [2 /*return*/, {
339
+ url: (0, common_1.toPathString)(localVarUrlObj),
340
+ options: localVarRequestOptions,
341
+ }];
342
+ }
343
+ });
344
+ });
345
+ },
346
+ /**
347
+ * Returns a list of leads you have previously created. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
348
+ * @summary List leads
349
+ * @param {string} [authorization] Bearer Token
350
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
351
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
352
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
353
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
354
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
355
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
356
+ * @param {*} [options] Override http request option.
357
+ * @throws {RequiredError}
358
+ */
359
+ listLeads: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
360
+ if (options === void 0) { options = {}; }
361
+ return __awaiter(_this, void 0, void 0, function () {
362
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
363
+ return __generator(this, function (_a) {
364
+ switch (_a.label) {
365
+ case 0:
366
+ localVarPath = "/insuranceservice/v1/leads";
367
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
368
+ if (configuration) {
369
+ baseOptions = configuration.baseOptions;
370
+ baseAccessToken = configuration.accessToken;
371
+ }
372
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
373
+ localVarHeaderParameter = {};
374
+ localVarQueryParameter = {};
375
+ // authentication bearer required
376
+ // http bearer authentication required
377
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
378
+ case 1:
379
+ // authentication bearer required
380
+ // http bearer authentication required
381
+ _a.sent();
382
+ if (pageSize !== undefined) {
383
+ localVarQueryParameter['pageSize'] = pageSize;
384
+ }
385
+ if (pageToken !== undefined) {
386
+ localVarQueryParameter['pageToken'] = pageToken;
387
+ }
388
+ if (filter !== undefined) {
389
+ localVarQueryParameter['filter'] = filter;
390
+ }
391
+ if (search !== undefined) {
392
+ localVarQueryParameter['search'] = search;
393
+ }
394
+ if (order !== undefined) {
395
+ localVarQueryParameter['order'] = order;
396
+ }
397
+ if (expand !== undefined) {
398
+ localVarQueryParameter['expand'] = expand;
399
+ }
400
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
401
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
402
+ }
403
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
404
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
405
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
406
+ return [2 /*return*/, {
407
+ url: (0, common_1.toPathString)(localVarUrlObj),
408
+ options: localVarRequestOptions,
409
+ }];
410
+ }
411
+ });
412
+ });
413
+ },
414
+ /**
415
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
416
+ * @summary Patch the lead
417
+ * @param {string} code Unique identifier for the object.
418
+ * @param {PatchLeadRequestDto} patchLeadRequestDto
419
+ * @param {string} [authorization] Bearer Token
420
+ * @param {*} [options] Override http request option.
421
+ * @throws {RequiredError}
422
+ */
423
+ patchLead: function (code, patchLeadRequestDto, authorization, options) {
424
+ if (options === void 0) { options = {}; }
425
+ return __awaiter(_this, void 0, void 0, function () {
426
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
427
+ return __generator(this, function (_a) {
428
+ switch (_a.label) {
429
+ case 0:
430
+ // verify required parameter 'code' is not null or undefined
431
+ (0, common_1.assertParamExists)('patchLead', 'code', code);
432
+ // verify required parameter 'patchLeadRequestDto' is not null or undefined
433
+ (0, common_1.assertParamExists)('patchLead', 'patchLeadRequestDto', patchLeadRequestDto);
434
+ localVarPath = "/insuranceservice/v1/leads/{code}"
435
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
436
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
437
+ if (configuration) {
438
+ baseOptions = configuration.baseOptions;
439
+ baseAccessToken = configuration.accessToken;
440
+ }
441
+ localVarRequestOptions = __assign(__assign({ method: 'PATCH' }, baseOptions), options);
442
+ localVarHeaderParameter = {};
443
+ localVarQueryParameter = {};
444
+ // authentication bearer required
445
+ // http bearer authentication required
446
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
447
+ case 1:
448
+ // authentication bearer required
449
+ // http bearer authentication required
450
+ _a.sent();
451
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
452
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
453
+ }
454
+ localVarHeaderParameter['Content-Type'] = 'application/json';
455
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
456
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
457
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
458
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(patchLeadRequestDto, localVarRequestOptions, configuration);
459
+ return [2 /*return*/, {
460
+ url: (0, common_1.toPathString)(localVarUrlObj),
461
+ options: localVarRequestOptions,
462
+ }];
463
+ }
464
+ });
465
+ });
466
+ },
467
+ /**
468
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
469
+ * @summary Update the lead
470
+ * @param {string} code Unique identifier for the object.
471
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
472
+ * @param {string} [authorization] Bearer Token
473
+ * @param {*} [options] Override http request option.
474
+ * @throws {RequiredError}
475
+ */
476
+ updateLead: function (code, updateLeadRequestDto, authorization, options) {
477
+ if (options === void 0) { options = {}; }
478
+ return __awaiter(_this, void 0, void 0, function () {
479
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
480
+ return __generator(this, function (_a) {
481
+ switch (_a.label) {
482
+ case 0:
483
+ // verify required parameter 'code' is not null or undefined
484
+ (0, common_1.assertParamExists)('updateLead', 'code', code);
485
+ // verify required parameter 'updateLeadRequestDto' is not null or undefined
486
+ (0, common_1.assertParamExists)('updateLead', 'updateLeadRequestDto', updateLeadRequestDto);
487
+ localVarPath = "/insuranceservice/v1/leads/{code}"
488
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
489
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
490
+ if (configuration) {
491
+ baseOptions = configuration.baseOptions;
492
+ baseAccessToken = configuration.accessToken;
493
+ }
494
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
495
+ localVarHeaderParameter = {};
496
+ localVarQueryParameter = {};
497
+ // authentication bearer required
498
+ // http bearer authentication required
499
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
500
+ case 1:
501
+ // authentication bearer required
502
+ // http bearer authentication required
503
+ _a.sent();
504
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
505
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
506
+ }
507
+ localVarHeaderParameter['Content-Type'] = 'application/json';
508
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
509
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
510
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
511
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateLeadRequestDto, localVarRequestOptions, configuration);
512
+ return [2 /*return*/, {
513
+ url: (0, common_1.toPathString)(localVarUrlObj),
514
+ options: localVarRequestOptions,
515
+ }];
516
+ }
517
+ });
518
+ });
519
+ },
520
+ /**
521
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
522
+ * @summary Update the lead
523
+ * @param {string} code Unique identifier for the object.
524
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
525
+ * @param {string} [authorization] Bearer Token
526
+ * @param {*} [options] Override http request option.
527
+ * @throws {RequiredError}
528
+ */
529
+ updateLeadSync: function (code, updateLeadRequestDto, authorization, options) {
530
+ if (options === void 0) { options = {}; }
531
+ return __awaiter(_this, void 0, void 0, function () {
532
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
533
+ return __generator(this, function (_a) {
534
+ switch (_a.label) {
535
+ case 0:
536
+ // verify required parameter 'code' is not null or undefined
537
+ (0, common_1.assertParamExists)('updateLeadSync', 'code', code);
538
+ // verify required parameter 'updateLeadRequestDto' is not null or undefined
539
+ (0, common_1.assertParamExists)('updateLeadSync', 'updateLeadRequestDto', updateLeadRequestDto);
540
+ localVarPath = "/insuranceservice/v1/leads-sync/{code}"
541
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
542
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
543
+ if (configuration) {
544
+ baseOptions = configuration.baseOptions;
545
+ baseAccessToken = configuration.accessToken;
546
+ }
547
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
548
+ localVarHeaderParameter = {};
549
+ localVarQueryParameter = {};
550
+ // authentication bearer required
551
+ // http bearer authentication required
552
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
553
+ case 1:
554
+ // authentication bearer required
555
+ // http bearer authentication required
556
+ _a.sent();
557
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
558
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
559
+ }
560
+ localVarHeaderParameter['Content-Type'] = 'application/json';
561
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
562
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
563
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
564
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateLeadRequestDto, localVarRequestOptions, configuration);
565
+ return [2 /*return*/, {
566
+ url: (0, common_1.toPathString)(localVarUrlObj),
567
+ options: localVarRequestOptions,
568
+ }];
569
+ }
570
+ });
571
+ });
572
+ },
573
+ };
574
+ };
575
+ exports.LeadsApiAxiosParamCreator = LeadsApiAxiosParamCreator;
576
+ /**
577
+ * LeadsApi - functional programming interface
578
+ * @export
579
+ */
580
+ var LeadsApiFp = function (configuration) {
581
+ var localVarAxiosParamCreator = (0, exports.LeadsApiAxiosParamCreator)(configuration);
582
+ return {
583
+ /**
584
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
585
+ * @summary Create the lead
586
+ * @param {CreateLeadRequestDto} createLeadRequestDto
587
+ * @param {string} [authorization] Bearer Token
588
+ * @param {*} [options] Override http request option.
589
+ * @throws {RequiredError}
590
+ */
591
+ createLead: function (createLeadRequestDto, authorization, options) {
592
+ return __awaiter(this, void 0, void 0, function () {
593
+ var localVarAxiosArgs;
594
+ return __generator(this, function (_a) {
595
+ switch (_a.label) {
596
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createLead(createLeadRequestDto, authorization, options)];
597
+ case 1:
598
+ localVarAxiosArgs = _a.sent();
599
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
600
+ }
601
+ });
602
+ });
603
+ },
604
+ /**
605
+ * 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\'.
606
+ * @summary Create the lead asynchronously
607
+ * @param {CreateLeadRequestDto} createLeadRequestDto
608
+ * @param {string} [authorization] Bearer Token
609
+ * @param {*} [options] Override http request option.
610
+ * @throws {RequiredError}
611
+ */
612
+ createLeadAsync: function (createLeadRequestDto, authorization, options) {
613
+ return __awaiter(this, void 0, void 0, function () {
614
+ var localVarAxiosArgs;
615
+ return __generator(this, function (_a) {
616
+ switch (_a.label) {
617
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createLeadAsync(createLeadRequestDto, authorization, options)];
618
+ case 1:
619
+ localVarAxiosArgs = _a.sent();
620
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
621
+ }
622
+ });
623
+ });
624
+ },
625
+ /**
626
+ * 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.
627
+ * @summary Create the lead
628
+ * @param {CreateLeadRequestDto} createLeadRequestDto
629
+ * @param {string} [authorization] Bearer Token
630
+ * @param {*} [options] Override http request option.
631
+ * @throws {RequiredError}
632
+ */
633
+ createLeadSync: function (createLeadRequestDto, authorization, options) {
634
+ return __awaiter(this, void 0, void 0, function () {
635
+ var localVarAxiosArgs;
636
+ return __generator(this, function (_a) {
637
+ switch (_a.label) {
638
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createLeadSync(createLeadRequestDto, authorization, options)];
639
+ case 1:
640
+ localVarAxiosArgs = _a.sent();
641
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
642
+ }
643
+ });
644
+ });
645
+ },
646
+ /**
647
+ * Permanently deletes the lead. Supply the unique code that was returned when you created the lead and this will delete it.
648
+ * @summary Delete the lead
649
+ * @param {string} code
650
+ * @param {string} [authorization] Bearer Token
651
+ * @param {*} [options] Override http request option.
652
+ * @throws {RequiredError}
653
+ */
654
+ deleteLead: function (code, authorization, options) {
655
+ return __awaiter(this, void 0, void 0, function () {
656
+ var localVarAxiosArgs;
657
+ return __generator(this, function (_a) {
658
+ switch (_a.label) {
659
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteLead(code, authorization, options)];
660
+ case 1:
661
+ localVarAxiosArgs = _a.sent();
662
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
663
+ }
664
+ });
665
+ });
666
+ },
667
+ /**
668
+ * 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.
669
+ * @summary Retrieve the lead
670
+ * @param {string} code Unique identifier for the object.
671
+ * @param {string} [authorization] Bearer Token
672
+ * @param {string} [expand]
673
+ * @param {*} [options] Override http request option.
674
+ * @throws {RequiredError}
675
+ */
676
+ getLead: function (code, authorization, expand, options) {
677
+ return __awaiter(this, void 0, void 0, function () {
678
+ var localVarAxiosArgs;
679
+ return __generator(this, function (_a) {
680
+ switch (_a.label) {
681
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getLead(code, authorization, expand, options)];
682
+ case 1:
683
+ localVarAxiosArgs = _a.sent();
684
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
685
+ }
686
+ });
687
+ });
688
+ },
689
+ /**
690
+ * Returns a list of leads you have previously created. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
691
+ * @summary List leads
692
+ * @param {string} [authorization] Bearer Token
693
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
694
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
695
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
696
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
697
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
698
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
699
+ * @param {*} [options] Override http request option.
700
+ * @throws {RequiredError}
701
+ */
702
+ listLeads: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
703
+ return __awaiter(this, void 0, void 0, function () {
704
+ var localVarAxiosArgs;
705
+ return __generator(this, function (_a) {
706
+ switch (_a.label) {
707
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listLeads(authorization, pageSize, pageToken, filter, search, order, expand, options)];
708
+ case 1:
709
+ localVarAxiosArgs = _a.sent();
710
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
711
+ }
712
+ });
713
+ });
714
+ },
715
+ /**
716
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
717
+ * @summary Patch the lead
718
+ * @param {string} code Unique identifier for the object.
719
+ * @param {PatchLeadRequestDto} patchLeadRequestDto
720
+ * @param {string} [authorization] Bearer Token
721
+ * @param {*} [options] Override http request option.
722
+ * @throws {RequiredError}
723
+ */
724
+ patchLead: function (code, patchLeadRequestDto, authorization, options) {
725
+ return __awaiter(this, void 0, void 0, function () {
726
+ var localVarAxiosArgs;
727
+ return __generator(this, function (_a) {
728
+ switch (_a.label) {
729
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.patchLead(code, patchLeadRequestDto, authorization, options)];
730
+ case 1:
731
+ localVarAxiosArgs = _a.sent();
732
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
733
+ }
734
+ });
735
+ });
736
+ },
737
+ /**
738
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
739
+ * @summary Update the lead
740
+ * @param {string} code Unique identifier for the object.
741
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
742
+ * @param {string} [authorization] Bearer Token
743
+ * @param {*} [options] Override http request option.
744
+ * @throws {RequiredError}
745
+ */
746
+ updateLead: function (code, updateLeadRequestDto, authorization, options) {
747
+ return __awaiter(this, void 0, void 0, function () {
748
+ var localVarAxiosArgs;
749
+ return __generator(this, function (_a) {
750
+ switch (_a.label) {
751
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateLead(code, updateLeadRequestDto, authorization, options)];
752
+ case 1:
753
+ localVarAxiosArgs = _a.sent();
754
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
755
+ }
756
+ });
757
+ });
758
+ },
759
+ /**
760
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
761
+ * @summary Update the lead
762
+ * @param {string} code Unique identifier for the object.
763
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
764
+ * @param {string} [authorization] Bearer Token
765
+ * @param {*} [options] Override http request option.
766
+ * @throws {RequiredError}
767
+ */
768
+ updateLeadSync: function (code, updateLeadRequestDto, authorization, options) {
769
+ return __awaiter(this, void 0, void 0, function () {
770
+ var localVarAxiosArgs;
771
+ return __generator(this, function (_a) {
772
+ switch (_a.label) {
773
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateLeadSync(code, updateLeadRequestDto, authorization, options)];
774
+ case 1:
775
+ localVarAxiosArgs = _a.sent();
776
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
777
+ }
778
+ });
779
+ });
780
+ },
781
+ };
782
+ };
783
+ exports.LeadsApiFp = LeadsApiFp;
784
+ /**
785
+ * LeadsApi - factory interface
786
+ * @export
787
+ */
788
+ var LeadsApiFactory = function (configuration, basePath, axios) {
789
+ var localVarFp = (0, exports.LeadsApiFp)(configuration);
790
+ return {
791
+ /**
792
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
793
+ * @summary Create the lead
794
+ * @param {CreateLeadRequestDto} createLeadRequestDto
795
+ * @param {string} [authorization] Bearer Token
796
+ * @param {*} [options] Override http request option.
797
+ * @throws {RequiredError}
798
+ */
799
+ createLead: function (createLeadRequestDto, authorization, options) {
800
+ return localVarFp.createLead(createLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
801
+ },
802
+ /**
803
+ * 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\'.
804
+ * @summary Create the lead asynchronously
805
+ * @param {CreateLeadRequestDto} createLeadRequestDto
806
+ * @param {string} [authorization] Bearer Token
807
+ * @param {*} [options] Override http request option.
808
+ * @throws {RequiredError}
809
+ */
810
+ createLeadAsync: function (createLeadRequestDto, authorization, options) {
811
+ return localVarFp.createLeadAsync(createLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
812
+ },
813
+ /**
814
+ * 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.
815
+ * @summary Create the lead
816
+ * @param {CreateLeadRequestDto} createLeadRequestDto
817
+ * @param {string} [authorization] Bearer Token
818
+ * @param {*} [options] Override http request option.
819
+ * @throws {RequiredError}
820
+ */
821
+ createLeadSync: function (createLeadRequestDto, authorization, options) {
822
+ return localVarFp.createLeadSync(createLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
823
+ },
824
+ /**
825
+ * Permanently deletes the lead. Supply the unique code that was returned when you created the lead and this will delete it.
826
+ * @summary Delete the lead
827
+ * @param {string} code
828
+ * @param {string} [authorization] Bearer Token
829
+ * @param {*} [options] Override http request option.
830
+ * @throws {RequiredError}
831
+ */
832
+ deleteLead: function (code, authorization, options) {
833
+ return localVarFp.deleteLead(code, authorization, options).then(function (request) { return request(axios, basePath); });
834
+ },
835
+ /**
836
+ * 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.
837
+ * @summary Retrieve the lead
838
+ * @param {string} code Unique identifier for the object.
839
+ * @param {string} [authorization] Bearer Token
840
+ * @param {string} [expand]
841
+ * @param {*} [options] Override http request option.
842
+ * @throws {RequiredError}
843
+ */
844
+ getLead: function (code, authorization, expand, options) {
845
+ return localVarFp.getLead(code, authorization, expand, options).then(function (request) { return request(axios, basePath); });
846
+ },
847
+ /**
848
+ * Returns a list of leads you have previously created. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
849
+ * @summary List leads
850
+ * @param {string} [authorization] Bearer Token
851
+ * @param {any} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 100. Default: 10.
852
+ * @param {any} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken&#x3D;1, your subsequent call can include pageToken&#x3D;2 in order to fetch the next page of the list.
853
+ * @param {any} [filter] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
854
+ * @param {any} [search] Search the list by any field. For instance, if you want to search by code add code&#x3D;xxx in order to fetch the result.
855
+ * @param {any} [order] The order parameter determines how the results should be sorted according to a specified field. It functions similarly to an SQL ORDER BY. Sorting can be performed in either ascending (ASC) or descending (DESC) order. Default: ASC.
856
+ * @param {any} [expand] Use this parameter to fetch additional information about the list items. The expand query parameter increases the set of fields that appear in the response in addition to the default ones. Expanding resources can reduce the number of API calls required to accomplish a task. However, use this with parsimony as some expanded fields can drastically increase payload size.
857
+ * @param {*} [options] Override http request option.
858
+ * @throws {RequiredError}
859
+ */
860
+ listLeads: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
861
+ return localVarFp.listLeads(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
862
+ },
863
+ /**
864
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
865
+ * @summary Patch the lead
866
+ * @param {string} code Unique identifier for the object.
867
+ * @param {PatchLeadRequestDto} patchLeadRequestDto
868
+ * @param {string} [authorization] Bearer Token
869
+ * @param {*} [options] Override http request option.
870
+ * @throws {RequiredError}
871
+ */
872
+ patchLead: function (code, patchLeadRequestDto, authorization, options) {
873
+ return localVarFp.patchLead(code, patchLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
874
+ },
875
+ /**
876
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
877
+ * @summary Update the lead
878
+ * @param {string} code Unique identifier for the object.
879
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
880
+ * @param {string} [authorization] Bearer Token
881
+ * @param {*} [options] Override http request option.
882
+ * @throws {RequiredError}
883
+ */
884
+ updateLead: function (code, updateLeadRequestDto, authorization, options) {
885
+ return localVarFp.updateLead(code, updateLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
886
+ },
887
+ /**
888
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
889
+ * @summary Update the lead
890
+ * @param {string} code Unique identifier for the object.
891
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
892
+ * @param {string} [authorization] Bearer Token
893
+ * @param {*} [options] Override http request option.
894
+ * @throws {RequiredError}
895
+ */
896
+ updateLeadSync: function (code, updateLeadRequestDto, authorization, options) {
897
+ return localVarFp.updateLeadSync(code, updateLeadRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
898
+ },
899
+ };
900
+ };
901
+ exports.LeadsApiFactory = LeadsApiFactory;
902
+ /**
903
+ * LeadsApi - object-oriented interface
904
+ * @export
905
+ * @class LeadsApi
906
+ * @extends {BaseAPI}
907
+ */
908
+ var LeadsApi = /** @class */ (function (_super) {
909
+ __extends(LeadsApi, _super);
910
+ function LeadsApi() {
911
+ return _super !== null && _super.apply(this, arguments) || this;
912
+ }
913
+ /**
914
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
915
+ * @summary Create the lead
916
+ * @param {LeadsApiCreateLeadRequest} requestParameters Request parameters.
917
+ * @param {*} [options] Override http request option.
918
+ * @throws {RequiredError}
919
+ * @memberof LeadsApi
920
+ */
921
+ LeadsApi.prototype.createLead = function (requestParameters, options) {
922
+ var _this = this;
923
+ return (0, exports.LeadsApiFp)(this.configuration).createLead(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
924
+ };
925
+ /**
926
+ * 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\'.
927
+ * @summary Create the lead asynchronously
928
+ * @param {LeadsApiCreateLeadAsyncRequest} requestParameters Request parameters.
929
+ * @param {*} [options] Override http request option.
930
+ * @throws {RequiredError}
931
+ * @memberof LeadsApi
932
+ */
933
+ LeadsApi.prototype.createLeadAsync = function (requestParameters, options) {
934
+ var _this = this;
935
+ return (0, exports.LeadsApiFp)(this.configuration).createLeadAsync(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
936
+ };
937
+ /**
938
+ * 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.
939
+ * @summary Create the lead
940
+ * @param {LeadsApiCreateLeadSyncRequest} requestParameters Request parameters.
941
+ * @param {*} [options] Override http request option.
942
+ * @throws {RequiredError}
943
+ * @memberof LeadsApi
944
+ */
945
+ LeadsApi.prototype.createLeadSync = function (requestParameters, options) {
946
+ var _this = this;
947
+ return (0, exports.LeadsApiFp)(this.configuration).createLeadSync(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
948
+ };
949
+ /**
950
+ * Permanently deletes the lead. Supply the unique code that was returned when you created the lead and this will delete it.
951
+ * @summary Delete the lead
952
+ * @param {LeadsApiDeleteLeadRequest} requestParameters Request parameters.
953
+ * @param {*} [options] Override http request option.
954
+ * @throws {RequiredError}
955
+ * @memberof LeadsApi
956
+ */
957
+ LeadsApi.prototype.deleteLead = function (requestParameters, options) {
958
+ var _this = this;
959
+ return (0, exports.LeadsApiFp)(this.configuration).deleteLead(requestParameters.code, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
960
+ };
961
+ /**
962
+ * 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.
963
+ * @summary Retrieve the lead
964
+ * @param {LeadsApiGetLeadRequest} requestParameters Request parameters.
965
+ * @param {*} [options] Override http request option.
966
+ * @throws {RequiredError}
967
+ * @memberof LeadsApi
968
+ */
969
+ LeadsApi.prototype.getLead = function (requestParameters, options) {
970
+ var _this = this;
971
+ return (0, exports.LeadsApiFp)(this.configuration).getLead(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
972
+ };
973
+ /**
974
+ * Returns a list of leads you have previously created. The leads are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
975
+ * @summary List leads
976
+ * @param {LeadsApiListLeadsRequest} requestParameters Request parameters.
977
+ * @param {*} [options] Override http request option.
978
+ * @throws {RequiredError}
979
+ * @memberof LeadsApi
980
+ */
981
+ LeadsApi.prototype.listLeads = function (requestParameters, options) {
982
+ var _this = this;
983
+ if (requestParameters === void 0) { requestParameters = {}; }
984
+ return (0, exports.LeadsApiFp)(this.configuration).listLeads(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
985
+ };
986
+ /**
987
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
988
+ * @summary Patch the lead
989
+ * @param {LeadsApiPatchLeadRequest} requestParameters Request parameters.
990
+ * @param {*} [options] Override http request option.
991
+ * @throws {RequiredError}
992
+ * @memberof LeadsApi
993
+ */
994
+ LeadsApi.prototype.patchLead = function (requestParameters, options) {
995
+ var _this = this;
996
+ return (0, exports.LeadsApiFp)(this.configuration).patchLead(requestParameters.code, requestParameters.patchLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
997
+ };
998
+ /**
999
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1000
+ * @summary Update the lead
1001
+ * @param {LeadsApiUpdateLeadRequest} requestParameters Request parameters.
1002
+ * @param {*} [options] Override http request option.
1003
+ * @throws {RequiredError}
1004
+ * @memberof LeadsApi
1005
+ */
1006
+ LeadsApi.prototype.updateLead = function (requestParameters, options) {
1007
+ var _this = this;
1008
+ return (0, exports.LeadsApiFp)(this.configuration).updateLead(requestParameters.code, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1009
+ };
1010
+ /**
1011
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1012
+ * @summary Update the lead
1013
+ * @param {LeadsApiUpdateLeadSyncRequest} requestParameters Request parameters.
1014
+ * @param {*} [options] Override http request option.
1015
+ * @throws {RequiredError}
1016
+ * @memberof LeadsApi
1017
+ */
1018
+ LeadsApi.prototype.updateLeadSync = function (requestParameters, options) {
1019
+ var _this = this;
1020
+ return (0, exports.LeadsApiFp)(this.configuration).updateLeadSync(requestParameters.code, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1021
+ };
1022
+ return LeadsApi;
1023
+ }(base_1.BaseAPI));
1024
+ exports.LeadsApi = LeadsApi;