@emilgroup/insurance-sdk-node 1.1.1 → 1.4.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 (345) hide show
  1. package/.openapi-generator/FILES +25 -5
  2. package/README.md +3 -3
  3. package/api/insured-object-types-api.ts +29 -29
  4. package/api/insured-objects-api.ts +44 -33
  5. package/api/leads-api.ts +187 -7
  6. package/api/policies-api.ts +483 -25
  7. package/api/premium-formulas-api.ts +669 -0
  8. package/api/product-factors-api.ts +889 -0
  9. package/api/product-fields-api.ts +843 -0
  10. package/api/product-versions-api.ts +301 -0
  11. package/api/products-api.ts +229 -2557
  12. package/api.ts +9 -1
  13. package/base.ts +42 -14
  14. package/common.ts +62 -1
  15. package/configuration.ts +1 -1
  16. package/dist/api/insured-object-types-api.d.ts +29 -29
  17. package/dist/api/insured-object-types-api.js +25 -25
  18. package/dist/api/insured-objects-api.d.ts +38 -29
  19. package/dist/api/insured-objects-api.js +31 -27
  20. package/dist/api/leads-api.d.ts +114 -10
  21. package/dist/api/leads-api.js +125 -2
  22. package/dist/api/policies-api.d.ts +277 -25
  23. package/dist/api/policies-api.js +408 -20
  24. package/dist/api/premium-formulas-api.d.ts +376 -0
  25. package/dist/api/premium-formulas-api.js +634 -0
  26. package/dist/api/product-factors-api.d.ts +493 -0
  27. package/dist/api/product-factors-api.js +788 -0
  28. package/dist/api/product-fields-api.d.ts +477 -0
  29. package/dist/api/product-fields-api.js +757 -0
  30. package/dist/api/product-versions-api.d.ts +171 -0
  31. package/dist/api/product-versions-api.js +334 -0
  32. package/dist/api/products-api.d.ts +36 -1325
  33. package/dist/api/products-api.js +140 -2013
  34. package/dist/api.d.ts +5 -1
  35. package/dist/api.js +5 -1
  36. package/dist/base.d.ts +2 -2
  37. package/dist/base.js +40 -12
  38. package/dist/common.d.ts +27 -1
  39. package/dist/common.js +36 -3
  40. package/dist/configuration.d.ts +1 -1
  41. package/dist/configuration.js +1 -1
  42. package/dist/index.d.ts +1 -1
  43. package/dist/index.js +1 -1
  44. package/dist/models/calculate-custom-premium-request-dto.d.ts +4 -4
  45. package/dist/models/calculate-custom-premium-request-dto.js +1 -1
  46. package/dist/models/calculate-premium-request-dto.d.ts +13 -6
  47. package/dist/models/calculate-premium-request-dto.js +1 -1
  48. package/dist/models/create-account-request-dto.d.ts +31 -12
  49. package/dist/models/create-account-request-dto.js +8 -1
  50. package/dist/models/create-bank-account-request-dto.d.ts +3 -3
  51. package/dist/models/create-bank-account-request-dto.js +1 -1
  52. package/dist/models/create-custom-application-request-dto.d.ts +5 -5
  53. package/dist/models/create-custom-application-request-dto.js +1 -1
  54. package/dist/models/create-dummy-policy-request-dto.d.ts +10 -3
  55. package/dist/models/create-dummy-policy-request-dto.js +1 -1
  56. package/dist/models/create-insured-object-request-dto.d.ts +5 -5
  57. package/dist/models/create-insured-object-request-dto.js +1 -1
  58. package/dist/models/create-insured-object-response-class.d.ts +5 -5
  59. package/dist/models/create-insured-object-response-class.js +1 -1
  60. package/dist/models/create-lead-request-dto.d.ts +25 -18
  61. package/dist/models/create-lead-request-dto.js +1 -1
  62. package/dist/models/create-lead-response-class.d.ts +25 -0
  63. package/dist/models/{grpc-policy-object-dto.js → create-lead-response-class.js} +1 -1
  64. package/dist/models/create-policy-request-dto.d.ts +23 -4
  65. package/dist/models/create-policy-request-dto.js +1 -1
  66. package/dist/models/create-policy-response-class.d.ts +1 -1
  67. package/dist/models/create-policy-response-class.js +1 -1
  68. package/dist/models/create-premium-formula-request-dto.d.ts +10 -9
  69. package/dist/models/create-premium-formula-request-dto.js +3 -2
  70. package/dist/models/create-premium-formula-response-class.d.ts +2 -2
  71. package/dist/models/create-premium-formula-response-class.js +1 -1
  72. package/dist/models/create-product-field-request-dto.d.ts +2 -2
  73. package/dist/models/create-product-field-request-dto.js +1 -1
  74. package/dist/models/create-product-field-response-class.d.ts +2 -2
  75. package/dist/models/create-product-field-response-class.js +1 -1
  76. package/dist/models/create-product-request-dto.d.ts +6 -6
  77. package/dist/models/create-product-request-dto.js +1 -1
  78. package/dist/models/create-product-response-class.d.ts +1 -1
  79. package/dist/models/create-product-response-class.js +1 -1
  80. package/dist/models/csv-product-factor-dto.d.ts +6 -6
  81. package/dist/models/csv-product-factor-dto.js +1 -1
  82. package/dist/models/delete-request-dto.d.ts +2 -2
  83. package/dist/models/delete-request-dto.js +1 -1
  84. package/dist/models/{get-insured-object-request-dto.d.ts → delete-response-class.d.ts} +7 -7
  85. package/dist/models/{to-grpc-create-policy-request-dto.js → delete-response-class.js} +1 -1
  86. package/dist/models/get-insured-object-response-class.d.ts +2 -2
  87. package/dist/models/get-insured-object-response-class.js +1 -1
  88. package/dist/models/get-lead-response-class.d.ts +25 -0
  89. package/dist/models/{grpc-update-policy-request-dto.js → get-lead-response-class.js} +1 -1
  90. package/dist/models/{grpc-policy-object-dto.d.ts → get-policy-data-by-date-request-dto.d.ts} +11 -11
  91. package/dist/models/{get-insured-object-request-dto.js → get-policy-data-by-date-request-dto.js} +1 -1
  92. package/dist/models/get-policy-request-dto.d.ts +3 -3
  93. package/dist/models/get-policy-request-dto.js +1 -1
  94. package/dist/models/get-policy-response-class.d.ts +2 -2
  95. package/dist/models/get-policy-response-class.js +1 -1
  96. package/dist/models/get-premium-formula-request-dto.d.ts +2 -2
  97. package/dist/models/get-premium-formula-request-dto.js +1 -1
  98. package/dist/models/get-premium-formula-response-class.d.ts +2 -2
  99. package/dist/models/get-premium-formula-response-class.js +1 -1
  100. package/dist/models/get-product-factor-response-class.d.ts +2 -2
  101. package/dist/models/get-product-factor-response-class.js +1 -1
  102. package/dist/models/get-product-factor-value-request-dto.d.ts +1 -1
  103. package/dist/models/get-product-factor-value-request-dto.js +1 -1
  104. package/dist/models/get-product-factor-value-response-class.d.ts +2 -2
  105. package/dist/models/get-product-factor-value-response-class.js +1 -1
  106. package/dist/models/get-product-factors-for-version-request-dto.d.ts +36 -0
  107. package/dist/models/get-product-factors-for-version-request-dto.js +15 -0
  108. package/dist/models/get-product-factors-for-version-response-class.d.ts +25 -0
  109. package/dist/models/get-product-factors-for-version-response-class.js +15 -0
  110. package/dist/models/get-product-field-request-dto.d.ts +2 -2
  111. package/dist/models/get-product-field-request-dto.js +1 -1
  112. package/dist/models/get-product-field-response-class.d.ts +2 -2
  113. package/dist/models/get-product-field-response-class.js +1 -1
  114. package/dist/models/get-product-request-dto.d.ts +1 -1
  115. package/dist/models/get-product-request-dto.js +1 -1
  116. package/dist/models/get-product-response-class.d.ts +1 -1
  117. package/dist/models/get-product-response-class.js +1 -1
  118. package/dist/models/get-product-version-request-dto.d.ts +2 -2
  119. package/dist/models/get-product-version-request-dto.js +1 -1
  120. package/dist/models/get-product-version-response-class.d.ts +1 -1
  121. package/dist/models/get-product-version-response-class.js +1 -1
  122. package/dist/models/grouped-product-factor-class.d.ts +4 -4
  123. package/dist/models/grouped-product-factor-class.js +1 -1
  124. package/dist/models/grouped-product-factor-value-class.d.ts +10 -4
  125. package/dist/models/grouped-product-factor-value-class.js +1 -1
  126. package/dist/models/grouped-product-factors-response-class.d.ts +1 -1
  127. package/dist/models/grouped-product-factors-response-class.js +1 -1
  128. package/dist/models/index.d.ts +21 -5
  129. package/dist/models/index.js +21 -5
  130. package/dist/models/insured-object-class.d.ts +12 -12
  131. package/dist/models/insured-object-class.js +1 -1
  132. package/dist/models/insured-object-type-class.d.ts +6 -6
  133. package/dist/models/insured-object-type-class.js +1 -1
  134. package/dist/models/lead-bank-account-class.d.ts +30 -0
  135. package/dist/models/lead-bank-account-class.js +15 -0
  136. package/dist/models/lead-class.d.ts +95 -0
  137. package/dist/models/lead-class.js +15 -0
  138. package/dist/models/list-insured-object-types-response-class.d.ts +3 -3
  139. package/dist/models/list-insured-object-types-response-class.js +1 -1
  140. package/dist/models/list-insured-objects-response-class.d.ts +5 -4
  141. package/dist/models/list-insured-objects-response-class.js +1 -1
  142. package/dist/models/list-leads-response-class.d.ts +31 -0
  143. package/dist/models/list-leads-response-class.js +15 -0
  144. package/dist/models/list-policies-response-class.d.ts +2 -2
  145. package/dist/models/list-policies-response-class.js +1 -1
  146. package/dist/models/list-premium-formulas-response-class.d.ts +3 -3
  147. package/dist/models/list-premium-formulas-response-class.js +1 -1
  148. package/dist/models/list-product-factors-response-class.d.ts +7 -7
  149. package/dist/models/list-product-factors-response-class.js +1 -1
  150. package/dist/models/list-product-field-types-response-class.d.ts +6 -5
  151. package/dist/models/list-product-field-types-response-class.js +1 -1
  152. package/dist/models/list-product-fields-response-class.d.ts +3 -3
  153. package/dist/models/list-product-fields-response-class.js +1 -1
  154. package/dist/models/list-products-response-class.d.ts +3 -3
  155. package/dist/models/list-products-response-class.js +1 -1
  156. package/dist/models/list-request-dto.d.ts +6 -6
  157. package/dist/models/list-request-dto.js +1 -1
  158. package/dist/models/omit-type-class.d.ts +60 -0
  159. package/dist/models/omit-type-class.js +15 -0
  160. package/dist/models/policy-class.d.ts +32 -14
  161. package/dist/models/policy-class.js +1 -1
  162. package/dist/models/policy-object-class.d.ts +5 -5
  163. package/dist/models/policy-object-class.js +1 -1
  164. package/dist/models/policy-object-dto.d.ts +3 -3
  165. package/dist/models/policy-object-dto.js +1 -1
  166. package/dist/models/policy-premium-class.d.ts +5 -5
  167. package/dist/models/policy-premium-class.js +1 -1
  168. package/dist/models/policy-premium-item-class.d.ts +12 -6
  169. package/dist/models/policy-premium-item-class.js +1 -1
  170. package/dist/models/policy-version-class.d.ts +6 -6
  171. package/dist/models/policy-version-class.js +1 -1
  172. package/dist/models/premium-formula-class.d.ts +10 -17
  173. package/dist/models/premium-formula-class.js +1 -1
  174. package/dist/models/premium-override-dto.d.ts +54 -0
  175. package/dist/models/{create-claim-request-dto.js → premium-override-dto.js} +10 -9
  176. package/dist/models/premium-override-request-dto.d.ts +25 -0
  177. package/dist/models/premium-override-request-dto.js +15 -0
  178. package/dist/models/product-class.d.ts +10 -10
  179. package/dist/models/product-class.js +1 -1
  180. package/dist/models/product-factor-class.d.ts +9 -9
  181. package/dist/models/product-factor-class.js +1 -1
  182. package/dist/models/product-factor-value-class.d.ts +8 -28
  183. package/dist/models/product-factor-value-class.js +1 -1
  184. package/dist/models/product-field-class.d.ts +10 -10
  185. package/dist/models/product-field-class.js +1 -1
  186. package/dist/models/product-field-type-class.d.ts +48 -0
  187. package/dist/models/product-field-type-class.js +15 -0
  188. package/dist/models/product-version-class.d.ts +15 -8
  189. package/dist/models/product-version-class.js +8 -1
  190. package/dist/models/shared-product-field-class.d.ts +114 -0
  191. package/dist/models/shared-product-field-class.js +15 -0
  192. package/dist/models/shared-update-premium-formula-request-dto.d.ts +72 -0
  193. package/dist/models/shared-update-premium-formula-request-dto.js +26 -0
  194. package/dist/models/store-product-factors-request-dto.d.ts +2 -2
  195. package/dist/models/store-product-factors-request-dto.js +1 -1
  196. package/dist/models/store-product-factors-response-class.d.ts +1 -1
  197. package/dist/models/store-product-factors-response-class.js +1 -1
  198. package/dist/models/suspend-policy-request-dto.d.ts +24 -0
  199. package/dist/models/suspend-policy-request-dto.js +15 -0
  200. package/dist/models/suspend-policy-response-class.d.ts +25 -0
  201. package/dist/models/suspend-policy-response-class.js +15 -0
  202. package/dist/models/terminate-policy-request-dto.d.ts +24 -0
  203. package/dist/models/terminate-policy-request-dto.js +15 -0
  204. package/dist/models/terminate-policy-response-class.d.ts +25 -0
  205. package/dist/models/terminate-policy-response-class.js +15 -0
  206. package/dist/models/timeslice-class.d.ts +8 -8
  207. package/dist/models/timeslice-class.js +1 -1
  208. package/dist/models/update-insured-object-request-dto.d.ts +6 -6
  209. package/dist/models/update-insured-object-request-dto.js +1 -1
  210. package/dist/models/update-lead-request-dto.d.ts +12 -11
  211. package/dist/models/update-lead-request-dto.js +1 -1
  212. package/dist/models/update-lead-response-class.d.ts +25 -0
  213. package/dist/models/update-lead-response-class.js +15 -0
  214. package/dist/models/update-policy-request-dto.d.ts +29 -3
  215. package/dist/models/update-policy-request-dto.js +8 -1
  216. package/dist/models/update-policy-response-class.d.ts +1 -1
  217. package/dist/models/update-policy-response-class.js +1 -1
  218. package/dist/models/update-premium-formula-request-dto.d.ts +10 -15
  219. package/dist/models/update-premium-formula-request-dto.js +3 -2
  220. package/dist/models/update-premium-formula-response-class.d.ts +2 -2
  221. package/dist/models/update-premium-formula-response-class.js +1 -1
  222. package/dist/models/update-product-field-request-dto.d.ts +15 -15
  223. package/dist/models/update-product-field-request-dto.js +1 -1
  224. package/dist/models/update-product-field-response-class.d.ts +2 -2
  225. package/dist/models/update-product-field-response-class.js +1 -1
  226. package/dist/models/update-product-request-dto.d.ts +5 -5
  227. package/dist/models/update-product-request-dto.js +1 -1
  228. package/dist/models/update-product-response-class.d.ts +1 -1
  229. package/dist/models/update-product-response-class.js +1 -1
  230. package/dist/models/update-product-version-request-dto.d.ts +5 -5
  231. package/dist/models/update-product-version-request-dto.js +1 -1
  232. package/dist/models/update-product-version-response-class.d.ts +1 -1
  233. package/dist/models/update-product-version-response-class.js +1 -1
  234. package/dist/models/uploaded-document-dto.d.ts +2 -2
  235. package/dist/models/uploaded-document-dto.js +1 -1
  236. package/dist/models/validate-product-factors-request-dto.d.ts +2 -2
  237. package/dist/models/validate-product-factors-request-dto.js +1 -1
  238. package/dist/models/withdraw-policy-response-class.d.ts +25 -0
  239. package/dist/models/withdraw-policy-response-class.js +15 -0
  240. package/index.ts +1 -1
  241. package/models/calculate-custom-premium-request-dto.ts +3 -3
  242. package/models/calculate-premium-request-dto.ts +13 -6
  243. package/models/create-account-request-dto.ts +34 -12
  244. package/models/create-bank-account-request-dto.ts +3 -3
  245. package/models/create-custom-application-request-dto.ts +4 -4
  246. package/models/create-dummy-policy-request-dto.ts +10 -3
  247. package/models/create-insured-object-request-dto.ts +5 -5
  248. package/models/create-insured-object-response-class.ts +5 -5
  249. package/models/create-lead-request-dto.ts +24 -17
  250. package/models/create-lead-response-class.ts +31 -0
  251. package/models/create-policy-request-dto.ts +23 -4
  252. package/models/create-policy-response-class.ts +1 -1
  253. package/models/create-premium-formula-request-dto.ts +9 -8
  254. package/models/create-premium-formula-response-class.ts +2 -2
  255. package/models/create-product-field-request-dto.ts +1 -1
  256. package/models/create-product-field-response-class.ts +2 -2
  257. package/models/create-product-request-dto.ts +5 -5
  258. package/models/create-product-response-class.ts +1 -1
  259. package/models/csv-product-factor-dto.ts +6 -6
  260. package/models/delete-request-dto.ts +2 -2
  261. package/models/{get-insured-object-request-dto.ts → delete-response-class.ts} +7 -7
  262. package/models/get-insured-object-response-class.ts +2 -2
  263. package/models/get-lead-response-class.ts +31 -0
  264. package/models/{grpc-policy-object-dto.ts → get-policy-data-by-date-request-dto.ts} +11 -11
  265. package/models/get-policy-request-dto.ts +3 -3
  266. package/models/get-policy-response-class.ts +2 -2
  267. package/models/get-premium-formula-request-dto.ts +2 -2
  268. package/models/get-premium-formula-response-class.ts +2 -2
  269. package/models/get-product-factor-response-class.ts +2 -2
  270. package/models/get-product-factor-value-request-dto.ts +1 -1
  271. package/models/get-product-factor-value-response-class.ts +2 -2
  272. package/models/get-product-factors-for-version-request-dto.ts +42 -0
  273. package/models/get-product-factors-for-version-response-class.ts +31 -0
  274. package/models/get-product-field-request-dto.ts +2 -2
  275. package/models/get-product-field-response-class.ts +2 -2
  276. package/models/get-product-request-dto.ts +1 -1
  277. package/models/get-product-response-class.ts +1 -1
  278. package/models/get-product-version-request-dto.ts +2 -2
  279. package/models/get-product-version-response-class.ts +1 -1
  280. package/models/grouped-product-factor-class.ts +4 -4
  281. package/models/grouped-product-factor-value-class.ts +10 -4
  282. package/models/grouped-product-factors-response-class.ts +1 -1
  283. package/models/index.ts +21 -5
  284. package/models/insured-object-class.ts +12 -12
  285. package/models/insured-object-type-class.ts +6 -6
  286. package/models/lead-bank-account-class.ts +36 -0
  287. package/models/lead-class.ts +101 -0
  288. package/models/list-insured-object-types-response-class.ts +3 -3
  289. package/models/list-insured-objects-response-class.ts +5 -4
  290. package/models/list-leads-response-class.ts +37 -0
  291. package/models/list-policies-response-class.ts +2 -2
  292. package/models/list-premium-formulas-response-class.ts +3 -3
  293. package/models/list-product-factors-response-class.ts +7 -7
  294. package/models/list-product-field-types-response-class.ts +6 -5
  295. package/models/list-product-fields-response-class.ts +3 -3
  296. package/models/list-products-response-class.ts +3 -3
  297. package/models/list-request-dto.ts +6 -6
  298. package/models/omit-type-class.ts +66 -0
  299. package/models/policy-class.ts +32 -14
  300. package/models/policy-object-class.ts +5 -5
  301. package/models/policy-object-dto.ts +3 -3
  302. package/models/policy-premium-class.ts +5 -5
  303. package/models/policy-premium-item-class.ts +12 -6
  304. package/models/policy-version-class.ts +6 -6
  305. package/models/premium-formula-class.ts +10 -17
  306. package/models/premium-override-dto.ts +64 -0
  307. package/models/premium-override-request-dto.ts +31 -0
  308. package/models/product-class.ts +10 -10
  309. package/models/product-factor-class.ts +9 -9
  310. package/models/product-factor-value-class.ts +8 -28
  311. package/models/product-field-class.ts +10 -10
  312. package/models/product-field-type-class.ts +54 -0
  313. package/models/product-version-class.ts +18 -8
  314. package/models/shared-product-field-class.ts +120 -0
  315. package/models/shared-update-premium-formula-request-dto.ts +82 -0
  316. package/models/store-product-factors-request-dto.ts +2 -2
  317. package/models/store-product-factors-response-class.ts +1 -1
  318. package/models/suspend-policy-request-dto.ts +30 -0
  319. package/models/suspend-policy-response-class.ts +31 -0
  320. package/models/terminate-policy-request-dto.ts +30 -0
  321. package/models/terminate-policy-response-class.ts +31 -0
  322. package/models/timeslice-class.ts +8 -8
  323. package/models/update-insured-object-request-dto.ts +6 -6
  324. package/models/update-lead-request-dto.ts +11 -10
  325. package/models/update-lead-response-class.ts +31 -0
  326. package/models/update-policy-request-dto.ts +32 -3
  327. package/models/update-policy-response-class.ts +1 -1
  328. package/models/update-premium-formula-request-dto.ts +9 -14
  329. package/models/update-premium-formula-response-class.ts +2 -2
  330. package/models/update-product-field-request-dto.ts +14 -14
  331. package/models/update-product-field-response-class.ts +2 -2
  332. package/models/update-product-request-dto.ts +5 -5
  333. package/models/update-product-response-class.ts +1 -1
  334. package/models/update-product-version-request-dto.ts +4 -4
  335. package/models/update-product-version-response-class.ts +1 -1
  336. package/models/uploaded-document-dto.ts +2 -2
  337. package/models/validate-product-factors-request-dto.ts +2 -2
  338. package/models/withdraw-policy-response-class.ts +31 -0
  339. package/package.json +3 -3
  340. package/dist/models/create-claim-request-dto.d.ts +0 -83
  341. package/dist/models/grpc-update-policy-request-dto.d.ts +0 -43
  342. package/dist/models/to-grpc-create-policy-request-dto.d.ts +0 -37
  343. package/models/create-claim-request-dto.ts +0 -93
  344. package/models/grpc-update-policy-request-dto.ts +0 -49
  345. package/models/to-grpc-create-policy-request-dto.ts +0 -43
@@ -6,7 +6,7 @@
6
6
  * The EMIL InsuranceService API description
7
7
  *
8
8
  * The version of the OpenAPI document: 1.0
9
- *
9
+ * Contact: kontakt@emil.de
10
10
  *
11
11
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
12
  * https://openapi-generator.tech
@@ -53,7 +53,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
53
53
  function verb(n) { return function (v) { return step([n, v]); }; }
54
54
  function step(op) {
55
55
  if (f) throw new TypeError("Generator is already executing.");
56
- while (_) try {
56
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
57
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
58
  if (y = 0, t) op = [op[0] & 2, t.value];
59
59
  switch (op[0]) {
@@ -97,23 +97,23 @@ var ProductsApiAxiosParamCreator = function (configuration) {
97
97
  var _this = this;
98
98
  return {
99
99
  /**
100
- * Creates a premium formula.
101
- * @summary Create the premium formula
102
- * @param {CreatePremiumFormulaRequestDto} createPremiumFormulaRequestDto
103
- * @param {string} [authorization] Bearer Token
100
+ * Create a blank product. The product cannot be used as long as it is missing product factors, insured objects and premium formulas.
101
+ * @summary Create the product
102
+ * @param {CreateProductRequestDto} createProductRequestDto
103
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
104
104
  * @param {*} [options] Override http request option.
105
105
  * @throws {RequiredError}
106
106
  */
107
- createPremiumFormula: function (createPremiumFormulaRequestDto, authorization, options) {
107
+ createProduct: function (createProductRequestDto, authorization, options) {
108
108
  if (options === void 0) { options = {}; }
109
109
  return __awaiter(_this, void 0, void 0, function () {
110
110
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
111
  return __generator(this, function (_a) {
112
112
  switch (_a.label) {
113
113
  case 0:
114
- // verify required parameter 'createPremiumFormulaRequestDto' is not null or undefined
115
- (0, common_1.assertParamExists)('createPremiumFormula', 'createPremiumFormulaRequestDto', createPremiumFormulaRequestDto);
116
- localVarPath = "/insuranceservice/v1/premium-formulas";
114
+ // verify required parameter 'createProductRequestDto' is not null or undefined
115
+ (0, common_1.assertParamExists)('createProduct', 'createProductRequestDto', createProductRequestDto);
116
+ localVarPath = "/insuranceservice/v1/products";
117
117
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
118
118
  if (configuration) {
119
119
  baseOptions = configuration.baseOptions;
@@ -136,7 +136,7 @@ var ProductsApiAxiosParamCreator = function (configuration) {
136
136
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
137
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
138
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createPremiumFormulaRequestDto, localVarRequestOptions, configuration);
139
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createProductRequestDto, localVarRequestOptions, configuration);
140
140
  return [2 /*return*/, {
141
141
  url: (0, common_1.toPathString)(localVarUrlObj),
142
142
  options: localVarRequestOptions,
@@ -146,29 +146,30 @@ var ProductsApiAxiosParamCreator = function (configuration) {
146
146
  });
147
147
  },
148
148
  /**
149
- * Create a blank product. The product cannot be used as long as it is missing product factors, insured objects and premium formulas.
150
- * @summary Create the product
151
- * @param {CreateProductRequestDto} createProductRequestDto
149
+ * Permanently deletes the product. Supply the unique id that was returned when you created the product and this will delete it.
150
+ * @summary Delete the product
151
+ * @param {number} id
152
152
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
153
153
  * @param {*} [options] Override http request option.
154
154
  * @throws {RequiredError}
155
155
  */
156
- createProduct: function (createProductRequestDto, authorization, options) {
156
+ deleteProduct: function (id, authorization, options) {
157
157
  if (options === void 0) { options = {}; }
158
158
  return __awaiter(_this, void 0, void 0, function () {
159
159
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
160
  return __generator(this, function (_a) {
161
161
  switch (_a.label) {
162
162
  case 0:
163
- // verify required parameter 'createProductRequestDto' is not null or undefined
164
- (0, common_1.assertParamExists)('createProduct', 'createProductRequestDto', createProductRequestDto);
165
- localVarPath = "/insuranceservice/v1/products";
163
+ // verify required parameter 'id' is not null or undefined
164
+ (0, common_1.assertParamExists)('deleteProduct', 'id', id);
165
+ localVarPath = "/insuranceservice/v1/products/{id}"
166
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
166
167
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
167
168
  if (configuration) {
168
169
  baseOptions = configuration.baseOptions;
169
170
  baseAccessToken = configuration.accessToken;
170
171
  }
171
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
172
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
172
173
  localVarHeaderParameter = {};
173
174
  localVarQueryParameter = {};
174
175
  // authentication bearer required
@@ -181,11 +182,9 @@ var ProductsApiAxiosParamCreator = function (configuration) {
181
182
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
182
183
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
183
184
  }
184
- localVarHeaderParameter['Content-Type'] = 'application/json';
185
185
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
186
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
187
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
188
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createProductRequestDto, localVarRequestOptions, configuration);
189
188
  return [2 /*return*/, {
190
189
  url: (0, common_1.toPathString)(localVarUrlObj),
191
190
  options: localVarRequestOptions,
@@ -195,29 +194,34 @@ var ProductsApiAxiosParamCreator = function (configuration) {
195
194
  });
196
195
  },
197
196
  /**
198
- * Create a product field in the database.
199
- * @summary Create the product field
200
- * @param {CreateProductFieldRequestDto} createProductFieldRequestDto
201
- * @param {string} [authorization] Bearer Token
197
+ * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
198
+ * @summary Retrieve the product
199
+ * @param {string} code Unique identifier for the object.
200
+ * @param {number} id Product id
201
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
202
+ * @param {string} [expand] Fields to expand response by
202
203
  * @param {*} [options] Override http request option.
203
204
  * @throws {RequiredError}
204
205
  */
205
- createProductField: function (createProductFieldRequestDto, authorization, options) {
206
+ getProductByCode: function (code, id, authorization, expand, options) {
206
207
  if (options === void 0) { options = {}; }
207
208
  return __awaiter(_this, void 0, void 0, function () {
208
209
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
209
210
  return __generator(this, function (_a) {
210
211
  switch (_a.label) {
211
212
  case 0:
212
- // verify required parameter 'createProductFieldRequestDto' is not null or undefined
213
- (0, common_1.assertParamExists)('createProductField', 'createProductFieldRequestDto', createProductFieldRequestDto);
214
- localVarPath = "/insuranceservice/v1/product-fields";
213
+ // verify required parameter 'code' is not null or undefined
214
+ (0, common_1.assertParamExists)('getProductByCode', 'code', code);
215
+ // verify required parameter 'id' is not null or undefined
216
+ (0, common_1.assertParamExists)('getProductByCode', 'id', id);
217
+ localVarPath = "/insuranceservice/v1/products/code/{code}"
218
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
215
219
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
216
220
  if (configuration) {
217
221
  baseOptions = configuration.baseOptions;
218
222
  baseAccessToken = configuration.accessToken;
219
223
  }
220
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
224
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
221
225
  localVarHeaderParameter = {};
222
226
  localVarQueryParameter = {};
223
227
  // authentication bearer required
@@ -227,14 +231,18 @@ var ProductsApiAxiosParamCreator = function (configuration) {
227
231
  // authentication bearer required
228
232
  // http bearer authentication required
229
233
  _a.sent();
234
+ if (id !== undefined) {
235
+ localVarQueryParameter['id'] = id;
236
+ }
237
+ if (expand !== undefined) {
238
+ localVarQueryParameter['expand'] = expand;
239
+ }
230
240
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
231
241
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
232
242
  }
233
- localVarHeaderParameter['Content-Type'] = 'application/json';
234
243
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
235
244
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
236
245
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
237
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createProductFieldRequestDto, localVarRequestOptions, configuration);
238
246
  return [2 /*return*/, {
239
247
  url: (0, common_1.toPathString)(localVarUrlObj),
240
248
  options: localVarRequestOptions,
@@ -244,30 +252,32 @@ var ProductsApiAxiosParamCreator = function (configuration) {
244
252
  });
245
253
  },
246
254
  /**
247
- * Permanently deletes the premium formula. Supply the unique id that was returned when you created the premium formula and this will delete it.
248
- * @summary Delete the premium formula
249
- * @param {number} id
250
- * @param {string} [authorization] Bearer Token
255
+ * Returns a list of products you have previously created. The products are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
256
+ * @summary List products
257
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
258
+ * @param {number} [pageSize] Page size.
259
+ * @param {string} [pageToken] Page token.
260
+ * @param {string} [filter] List filter
261
+ * @param {string} [search] Search query.
262
+ * @param {string} [order] Ordering criteria.
263
+ * @param {string} [expand] Extra fields to fetch.
251
264
  * @param {*} [options] Override http request option.
252
265
  * @throws {RequiredError}
253
266
  */
254
- deletePremiumFormula: function (id, authorization, options) {
267
+ listProducts: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
255
268
  if (options === void 0) { options = {}; }
256
269
  return __awaiter(_this, void 0, void 0, function () {
257
270
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
258
271
  return __generator(this, function (_a) {
259
272
  switch (_a.label) {
260
273
  case 0:
261
- // verify required parameter 'id' is not null or undefined
262
- (0, common_1.assertParamExists)('deletePremiumFormula', 'id', id);
263
- localVarPath = "/insuranceservice/v1/premium-formulas/{id}"
264
- .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
274
+ localVarPath = "/insuranceservice/v1/products";
265
275
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
266
276
  if (configuration) {
267
277
  baseOptions = configuration.baseOptions;
268
278
  baseAccessToken = configuration.accessToken;
269
279
  }
270
- localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
280
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
271
281
  localVarHeaderParameter = {};
272
282
  localVarQueryParameter = {};
273
283
  // authentication bearer required
@@ -277,6 +287,24 @@ var ProductsApiAxiosParamCreator = function (configuration) {
277
287
  // authentication bearer required
278
288
  // http bearer authentication required
279
289
  _a.sent();
290
+ if (pageSize !== undefined) {
291
+ localVarQueryParameter['pageSize'] = pageSize;
292
+ }
293
+ if (pageToken !== undefined) {
294
+ localVarQueryParameter['pageToken'] = pageToken;
295
+ }
296
+ if (filter !== undefined) {
297
+ localVarQueryParameter['filter'] = filter;
298
+ }
299
+ if (search !== undefined) {
300
+ localVarQueryParameter['search'] = search;
301
+ }
302
+ if (order !== undefined) {
303
+ localVarQueryParameter['order'] = order;
304
+ }
305
+ if (expand !== undefined) {
306
+ localVarQueryParameter['expand'] = expand;
307
+ }
280
308
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
281
309
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
282
310
  }
@@ -292,14 +320,15 @@ var ProductsApiAxiosParamCreator = function (configuration) {
292
320
  });
293
321
  },
294
322
  /**
295
- * Permanently deletes the product. Supply the unique id that was returned when you created the product and this will delete it.
296
- * @summary Delete the product
323
+ * Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
324
+ * @summary Update the product
297
325
  * @param {number} id
326
+ * @param {UpdateProductRequestDto} updateProductRequestDto
298
327
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
299
328
  * @param {*} [options] Override http request option.
300
329
  * @throws {RequiredError}
301
330
  */
302
- deleteProduct: function (id, authorization, options) {
331
+ updateProduct: function (id, updateProductRequestDto, authorization, options) {
303
332
  if (options === void 0) { options = {}; }
304
333
  return __awaiter(_this, void 0, void 0, function () {
305
334
  var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
@@ -307,7 +336,9 @@ var ProductsApiAxiosParamCreator = function (configuration) {
307
336
  switch (_a.label) {
308
337
  case 0:
309
338
  // verify required parameter 'id' is not null or undefined
310
- (0, common_1.assertParamExists)('deleteProduct', 'id', id);
339
+ (0, common_1.assertParamExists)('updateProduct', 'id', id);
340
+ // verify required parameter 'updateProductRequestDto' is not null or undefined
341
+ (0, common_1.assertParamExists)('updateProduct', 'updateProductRequestDto', updateProductRequestDto);
311
342
  localVarPath = "/insuranceservice/v1/products/{id}"
312
343
  .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
313
344
  localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
@@ -315,7 +346,7 @@ var ProductsApiAxiosParamCreator = function (configuration) {
315
346
  baseOptions = configuration.baseOptions;
316
347
  baseAccessToken = configuration.accessToken;
317
348
  }
318
- localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
349
+ localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
319
350
  localVarHeaderParameter = {};
320
351
  localVarQueryParameter = {};
321
352
  // authentication bearer required
@@ -328,9 +359,11 @@ var ProductsApiAxiosParamCreator = function (configuration) {
328
359
  if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
329
360
  localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
330
361
  }
362
+ localVarHeaderParameter['Content-Type'] = 'application/json';
331
363
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
332
364
  headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
333
365
  localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
366
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateProductRequestDto, localVarRequestOptions, configuration);
334
367
  return [2 /*return*/, {
335
368
  url: (0, common_1.toPathString)(localVarUrlObj),
336
369
  options: localVarRequestOptions,
@@ -339,104 +372,54 @@ var ProductsApiAxiosParamCreator = function (configuration) {
339
372
  });
340
373
  });
341
374
  },
375
+ };
376
+ };
377
+ exports.ProductsApiAxiosParamCreator = ProductsApiAxiosParamCreator;
378
+ /**
379
+ * ProductsApi - functional programming interface
380
+ * @export
381
+ */
382
+ var ProductsApiFp = function (configuration) {
383
+ var localVarAxiosParamCreator = (0, exports.ProductsApiAxiosParamCreator)(configuration);
384
+ return {
342
385
  /**
343
- * Permanently deletes the product. Supply the unique id that was returned when you created the product and this will delete it.
344
- * @summary Delete the product
345
- * @param {string} id
346
- * @param {string} [authorization] Bearer Token
386
+ * Create a blank product. The product cannot be used as long as it is missing product factors, insured objects and premium formulas.
387
+ * @summary Create the product
388
+ * @param {CreateProductRequestDto} createProductRequestDto
389
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
347
390
  * @param {*} [options] Override http request option.
348
391
  * @throws {RequiredError}
349
392
  */
350
- deleteProductField: function (id, authorization, options) {
351
- if (options === void 0) { options = {}; }
352
- return __awaiter(_this, void 0, void 0, function () {
353
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
393
+ createProduct: function (createProductRequestDto, authorization, options) {
394
+ return __awaiter(this, void 0, void 0, function () {
395
+ var localVarAxiosArgs;
354
396
  return __generator(this, function (_a) {
355
397
  switch (_a.label) {
356
- case 0:
357
- // verify required parameter 'id' is not null or undefined
358
- (0, common_1.assertParamExists)('deleteProductField', 'id', id);
359
- localVarPath = "/insuranceservice/v1/product-fields/{id}"
360
- .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
361
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
362
- if (configuration) {
363
- baseOptions = configuration.baseOptions;
364
- baseAccessToken = configuration.accessToken;
365
- }
366
- localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
367
- localVarHeaderParameter = {};
368
- localVarQueryParameter = {};
369
- // authentication bearer required
370
- // http bearer authentication required
371
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
398
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createProduct(createProductRequestDto, authorization, options)];
372
399
  case 1:
373
- // authentication bearer required
374
- // http bearer authentication required
375
- _a.sent();
376
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
377
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
378
- }
379
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
380
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
381
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
382
- return [2 /*return*/, {
383
- url: (0, common_1.toPathString)(localVarUrlObj),
384
- options: localVarRequestOptions,
385
- }];
400
+ localVarAxiosArgs = _a.sent();
401
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
386
402
  }
387
403
  });
388
404
  });
389
405
  },
390
406
  /**
391
- * Retrieves the details of the premium formula that was previously created. Supply the unique premium formula id that was returned when you created it and Emil Api will return the corresponding premium formula information.
392
- * @summary Retrieve the premium formula
393
- * @param {string} id
394
- * @param {number} id2 Product formula id
395
- * @param {string} [authorization] Bearer Token
407
+ * Permanently deletes the product. Supply the unique id that was returned when you created the product and this will delete it.
408
+ * @summary Delete the product
409
+ * @param {number} id
410
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
396
411
  * @param {*} [options] Override http request option.
397
412
  * @throws {RequiredError}
398
413
  */
399
- getPremiumFormula: function (id, id2, authorization, options) {
400
- if (options === void 0) { options = {}; }
401
- return __awaiter(_this, void 0, void 0, function () {
402
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
414
+ deleteProduct: function (id, authorization, options) {
415
+ return __awaiter(this, void 0, void 0, function () {
416
+ var localVarAxiosArgs;
403
417
  return __generator(this, function (_a) {
404
418
  switch (_a.label) {
405
- case 0:
406
- // verify required parameter 'id' is not null or undefined
407
- (0, common_1.assertParamExists)('getPremiumFormula', 'id', id);
408
- // verify required parameter 'id2' is not null or undefined
409
- (0, common_1.assertParamExists)('getPremiumFormula', 'id2', id2);
410
- localVarPath = "/insuranceservice/v1/premium-formulas/{id}"
411
- .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
412
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
413
- if (configuration) {
414
- baseOptions = configuration.baseOptions;
415
- baseAccessToken = configuration.accessToken;
416
- }
417
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
418
- localVarHeaderParameter = {};
419
- localVarQueryParameter = {};
420
- // authentication bearer required
421
- // http bearer authentication required
422
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
419
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteProduct(id, authorization, options)];
423
420
  case 1:
424
- // authentication bearer required
425
- // http bearer authentication required
426
- _a.sent();
427
- if (id2 !== undefined) {
428
- localVarQueryParameter['id'] = id2;
429
- }
430
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
431
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
432
- }
433
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
434
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
435
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
436
- return [2 /*return*/, {
437
- url: (0, common_1.toPathString)(localVarUrlObj),
438
- options: localVarRequestOptions,
439
- }];
421
+ localVarAxiosArgs = _a.sent();
422
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
440
423
  }
441
424
  });
442
425
  });
@@ -452,1443 +435,37 @@ var ProductsApiAxiosParamCreator = function (configuration) {
452
435
  * @throws {RequiredError}
453
436
  */
454
437
  getProductByCode: function (code, id, authorization, expand, options) {
455
- if (options === void 0) { options = {}; }
456
- return __awaiter(_this, void 0, void 0, function () {
457
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
438
+ return __awaiter(this, void 0, void 0, function () {
439
+ var localVarAxiosArgs;
458
440
  return __generator(this, function (_a) {
459
441
  switch (_a.label) {
460
- case 0:
461
- // verify required parameter 'code' is not null or undefined
462
- (0, common_1.assertParamExists)('getProductByCode', 'code', code);
463
- // verify required parameter 'id' is not null or undefined
464
- (0, common_1.assertParamExists)('getProductByCode', 'id', id);
465
- localVarPath = "/insuranceservice/v1/products/code/{code}"
466
- .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
467
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
468
- if (configuration) {
469
- baseOptions = configuration.baseOptions;
470
- baseAccessToken = configuration.accessToken;
471
- }
472
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
473
- localVarHeaderParameter = {};
474
- localVarQueryParameter = {};
475
- // authentication bearer required
476
- // http bearer authentication required
477
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
442
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProductByCode(code, id, authorization, expand, options)];
478
443
  case 1:
479
- // authentication bearer required
480
- // http bearer authentication required
481
- _a.sent();
482
- if (id !== undefined) {
483
- localVarQueryParameter['id'] = id;
484
- }
485
- if (expand !== undefined) {
486
- localVarQueryParameter['expand'] = expand;
487
- }
488
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
489
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
490
- }
491
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
492
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
493
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
494
- return [2 /*return*/, {
495
- url: (0, common_1.toPathString)(localVarUrlObj),
496
- options: localVarRequestOptions,
497
- }];
444
+ localVarAxiosArgs = _a.sent();
445
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
498
446
  }
499
447
  });
500
448
  });
501
449
  },
502
450
  /**
503
- * Retrieves the details of the product factor that was previously created. Supply the unique product factor id that was returned when you created it and Emil Api will return the corresponding product factor information.
504
- * @summary Retrieve the product factor
505
- * @param {number} id
506
- * @param {number} id2 Product factor id
507
- * @param {string} [authorization] Bearer Token
508
- * @param {string} [expand] Fields to expand response by
451
+ * Returns a list of products you have previously created. The products are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
452
+ * @summary List products
453
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
454
+ * @param {number} [pageSize] Page size.
455
+ * @param {string} [pageToken] Page token.
456
+ * @param {string} [filter] List filter
457
+ * @param {string} [search] Search query.
458
+ * @param {string} [order] Ordering criteria.
459
+ * @param {string} [expand] Extra fields to fetch.
509
460
  * @param {*} [options] Override http request option.
510
461
  * @throws {RequiredError}
511
462
  */
512
- getProductFactor: function (id, id2, authorization, expand, options) {
513
- if (options === void 0) { options = {}; }
514
- return __awaiter(_this, void 0, void 0, function () {
515
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
463
+ listProducts: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
464
+ return __awaiter(this, void 0, void 0, function () {
465
+ var localVarAxiosArgs;
516
466
  return __generator(this, function (_a) {
517
467
  switch (_a.label) {
518
- case 0:
519
- // verify required parameter 'id' is not null or undefined
520
- (0, common_1.assertParamExists)('getProductFactor', 'id', id);
521
- // verify required parameter 'id2' is not null or undefined
522
- (0, common_1.assertParamExists)('getProductFactor', 'id2', id2);
523
- localVarPath = "/insuranceservice/v1/product-factors/{id}"
524
- .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
525
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
526
- if (configuration) {
527
- baseOptions = configuration.baseOptions;
528
- baseAccessToken = configuration.accessToken;
529
- }
530
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
531
- localVarHeaderParameter = {};
532
- localVarQueryParameter = {};
533
- // authentication bearer required
534
- // http bearer authentication required
535
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
536
- case 1:
537
- // authentication bearer required
538
- // http bearer authentication required
539
- _a.sent();
540
- if (id2 !== undefined) {
541
- localVarQueryParameter['id'] = id2;
542
- }
543
- if (expand !== undefined) {
544
- localVarQueryParameter['expand'] = expand;
545
- }
546
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
547
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
548
- }
549
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
550
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
551
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
552
- return [2 /*return*/, {
553
- url: (0, common_1.toPathString)(localVarUrlObj),
554
- options: localVarRequestOptions,
555
- }];
556
- }
557
- });
558
- });
559
- },
560
- /**
561
- * Get the value corresponding to a specific product factor.
562
- * @summary Get product factor value
563
- * @param {number} productVersionId Product Version Id
564
- * @param {string} label Product factor label
565
- * @param {string} key Key for the product factor value
566
- * @param {string} name Name for the product factor value
567
- * @param {string} [authorization] Bearer Token
568
- * @param {*} [options] Override http request option.
569
- * @throws {RequiredError}
570
- */
571
- getProductFactorValue: function (productVersionId, label, key, name, authorization, options) {
572
- if (options === void 0) { options = {}; }
573
- return __awaiter(_this, void 0, void 0, function () {
574
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
575
- return __generator(this, function (_a) {
576
- switch (_a.label) {
577
- case 0:
578
- // verify required parameter 'productVersionId' is not null or undefined
579
- (0, common_1.assertParamExists)('getProductFactorValue', 'productVersionId', productVersionId);
580
- // verify required parameter 'label' is not null or undefined
581
- (0, common_1.assertParamExists)('getProductFactorValue', 'label', label);
582
- // verify required parameter 'key' is not null or undefined
583
- (0, common_1.assertParamExists)('getProductFactorValue', 'key', key);
584
- // verify required parameter 'name' is not null or undefined
585
- (0, common_1.assertParamExists)('getProductFactorValue', 'name', name);
586
- localVarPath = "/insuranceservice/v1/product-factors/values";
587
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
588
- if (configuration) {
589
- baseOptions = configuration.baseOptions;
590
- baseAccessToken = configuration.accessToken;
591
- }
592
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
593
- localVarHeaderParameter = {};
594
- localVarQueryParameter = {};
595
- // authentication bearer required
596
- // http bearer authentication required
597
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
598
- case 1:
599
- // authentication bearer required
600
- // http bearer authentication required
601
- _a.sent();
602
- if (productVersionId !== undefined) {
603
- localVarQueryParameter['productVersionId'] = productVersionId;
604
- }
605
- if (label !== undefined) {
606
- localVarQueryParameter['label'] = label;
607
- }
608
- if (key !== undefined) {
609
- localVarQueryParameter['key'] = key;
610
- }
611
- if (name !== undefined) {
612
- localVarQueryParameter['name'] = name;
613
- }
614
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
615
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
616
- }
617
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
618
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
619
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
620
- return [2 /*return*/, {
621
- url: (0, common_1.toPathString)(localVarUrlObj),
622
- options: localVarRequestOptions,
623
- }];
624
- }
625
- });
626
- });
627
- },
628
- /**
629
- * Retrieves the details of the product field that was previously created. Supply the unique product field id that was returned when you created it and Emil Api will return the corresponding product field information.
630
- * @summary Retrieve the product field
631
- * @param {string} id
632
- * @param {string} [authorization] Bearer Token
633
- * @param {*} [options] Override http request option.
634
- * @throws {RequiredError}
635
- */
636
- getProductField: function (id, authorization, options) {
637
- if (options === void 0) { options = {}; }
638
- return __awaiter(_this, void 0, void 0, function () {
639
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
640
- return __generator(this, function (_a) {
641
- switch (_a.label) {
642
- case 0:
643
- // verify required parameter 'id' is not null or undefined
644
- (0, common_1.assertParamExists)('getProductField', 'id', id);
645
- localVarPath = "/insuranceservice/v1/product-fields/{id}"
646
- .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
647
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
648
- if (configuration) {
649
- baseOptions = configuration.baseOptions;
650
- baseAccessToken = configuration.accessToken;
651
- }
652
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
653
- localVarHeaderParameter = {};
654
- localVarQueryParameter = {};
655
- // authentication bearer required
656
- // http bearer authentication required
657
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
658
- case 1:
659
- // authentication bearer required
660
- // http bearer authentication required
661
- _a.sent();
662
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
663
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
664
- }
665
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
666
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
667
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
668
- return [2 /*return*/, {
669
- url: (0, common_1.toPathString)(localVarUrlObj),
670
- options: localVarRequestOptions,
671
- }];
672
- }
673
- });
674
- });
675
- },
676
- /**
677
- * Retrieves the details of the product version that was previously created. Supply the unique product version id that was returned when you created it and Emil Api will return the corresponding product version information.
678
- * @summary Retrieve the product version
679
- * @param {string} id
680
- * @param {number} id2 Product version id
681
- * @param {string} [authorization] Bearer Token
682
- * @param {*} [options] Override http request option.
683
- * @throws {RequiredError}
684
- */
685
- getProductVersion: function (id, id2, authorization, options) {
686
- if (options === void 0) { options = {}; }
687
- return __awaiter(_this, void 0, void 0, function () {
688
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
689
- return __generator(this, function (_a) {
690
- switch (_a.label) {
691
- case 0:
692
- // verify required parameter 'id' is not null or undefined
693
- (0, common_1.assertParamExists)('getProductVersion', 'id', id);
694
- // verify required parameter 'id2' is not null or undefined
695
- (0, common_1.assertParamExists)('getProductVersion', 'id2', id2);
696
- localVarPath = "/insuranceservice/v1/product-versions/{id}"
697
- .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
698
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
699
- if (configuration) {
700
- baseOptions = configuration.baseOptions;
701
- baseAccessToken = configuration.accessToken;
702
- }
703
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
704
- localVarHeaderParameter = {};
705
- localVarQueryParameter = {};
706
- // authentication bearer required
707
- // http bearer authentication required
708
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
709
- case 1:
710
- // authentication bearer required
711
- // http bearer authentication required
712
- _a.sent();
713
- if (id2 !== undefined) {
714
- localVarQueryParameter['id'] = id2;
715
- }
716
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
717
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
718
- }
719
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
720
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
721
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
722
- return [2 /*return*/, {
723
- url: (0, common_1.toPathString)(localVarUrlObj),
724
- options: localVarRequestOptions,
725
- }];
726
- }
727
- });
728
- });
729
- },
730
- /**
731
- * Returns a list of premium formulas you have previously created. The premium formulas are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
732
- * @summary List premium formulas
733
- * @param {string} [authorization] Bearer Token
734
- * @param {number} [pageSize] Page size
735
- * @param {string} [pageToken] Page token
736
- * @param {string} [filter] List filter
737
- * @param {string} [search] Search query
738
- * @param {string} [order] Ordering criteria
739
- * @param {string} [expand] Extra fields to fetch
740
- * @param {*} [options] Override http request option.
741
- * @throws {RequiredError}
742
- */
743
- listPremiumFormulas: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
744
- if (options === void 0) { options = {}; }
745
- return __awaiter(_this, void 0, void 0, function () {
746
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
747
- return __generator(this, function (_a) {
748
- switch (_a.label) {
749
- case 0:
750
- localVarPath = "/insuranceservice/v1/premium-formulas";
751
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
752
- if (configuration) {
753
- baseOptions = configuration.baseOptions;
754
- baseAccessToken = configuration.accessToken;
755
- }
756
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
757
- localVarHeaderParameter = {};
758
- localVarQueryParameter = {};
759
- // authentication bearer required
760
- // http bearer authentication required
761
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
762
- case 1:
763
- // authentication bearer required
764
- // http bearer authentication required
765
- _a.sent();
766
- if (pageSize !== undefined) {
767
- localVarQueryParameter['pageSize'] = pageSize;
768
- }
769
- if (pageToken !== undefined) {
770
- localVarQueryParameter['pageToken'] = pageToken;
771
- }
772
- if (filter !== undefined) {
773
- localVarQueryParameter['filter'] = filter;
774
- }
775
- if (search !== undefined) {
776
- localVarQueryParameter['search'] = search;
777
- }
778
- if (order !== undefined) {
779
- localVarQueryParameter['order'] = order;
780
- }
781
- if (expand !== undefined) {
782
- localVarQueryParameter['expand'] = expand;
783
- }
784
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
785
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
786
- }
787
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
788
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
789
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
790
- return [2 /*return*/, {
791
- url: (0, common_1.toPathString)(localVarUrlObj),
792
- options: localVarRequestOptions,
793
- }];
794
- }
795
- });
796
- });
797
- },
798
- /**
799
- * Returns a list of product factors you have previously created. The product factors are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
800
- * @summary List product factors
801
- * @param {string} [authorization] Bearer Token
802
- * @param {number} [pageSize] Page size
803
- * @param {string} [pageToken] Page token
804
- * @param {string} [filter] List filter
805
- * @param {string} [search] Search query
806
- * @param {string} [order] Ordering criteria
807
- * @param {string} [expand] Extra fields to fetch
808
- * @param {*} [options] Override http request option.
809
- * @throws {RequiredError}
810
- */
811
- listProductFactors: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
812
- if (options === void 0) { options = {}; }
813
- return __awaiter(_this, void 0, void 0, function () {
814
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
815
- return __generator(this, function (_a) {
816
- switch (_a.label) {
817
- case 0:
818
- localVarPath = "/insuranceservice/v1/product-factors";
819
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
820
- if (configuration) {
821
- baseOptions = configuration.baseOptions;
822
- baseAccessToken = configuration.accessToken;
823
- }
824
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
825
- localVarHeaderParameter = {};
826
- localVarQueryParameter = {};
827
- // authentication bearer required
828
- // http bearer authentication required
829
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
830
- case 1:
831
- // authentication bearer required
832
- // http bearer authentication required
833
- _a.sent();
834
- if (pageSize !== undefined) {
835
- localVarQueryParameter['pageSize'] = pageSize;
836
- }
837
- if (pageToken !== undefined) {
838
- localVarQueryParameter['pageToken'] = pageToken;
839
- }
840
- if (filter !== undefined) {
841
- localVarQueryParameter['filter'] = filter;
842
- }
843
- if (search !== undefined) {
844
- localVarQueryParameter['search'] = search;
845
- }
846
- if (order !== undefined) {
847
- localVarQueryParameter['order'] = order;
848
- }
849
- if (expand !== undefined) {
850
- localVarQueryParameter['expand'] = expand;
851
- }
852
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
853
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
854
- }
855
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
856
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
857
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
858
- return [2 /*return*/, {
859
- url: (0, common_1.toPathString)(localVarUrlObj),
860
- options: localVarRequestOptions,
861
- }];
862
- }
863
- });
864
- });
865
- },
866
- /**
867
- * Returns a list of product field types you have previously created. The product field types are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
868
- * @summary List product field types
869
- * @param {string} [authorization] Bearer Token
870
- * @param {number} [pageSize] Page size
871
- * @param {string} [pageToken] Page token
872
- * @param {string} [filter] List filter
873
- * @param {string} [search] Search query
874
- * @param {string} [order] Ordering criteria
875
- * @param {string} [expand] Extra fields to fetch
876
- * @param {*} [options] Override http request option.
877
- * @throws {RequiredError}
878
- */
879
- listProductFieldTypes: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
880
- if (options === void 0) { options = {}; }
881
- return __awaiter(_this, void 0, void 0, function () {
882
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
883
- return __generator(this, function (_a) {
884
- switch (_a.label) {
885
- case 0:
886
- localVarPath = "/insuranceservice/v1/product-fields/types";
887
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
888
- if (configuration) {
889
- baseOptions = configuration.baseOptions;
890
- baseAccessToken = configuration.accessToken;
891
- }
892
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
893
- localVarHeaderParameter = {};
894
- localVarQueryParameter = {};
895
- // authentication bearer required
896
- // http bearer authentication required
897
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
898
- case 1:
899
- // authentication bearer required
900
- // http bearer authentication required
901
- _a.sent();
902
- if (pageSize !== undefined) {
903
- localVarQueryParameter['pageSize'] = pageSize;
904
- }
905
- if (pageToken !== undefined) {
906
- localVarQueryParameter['pageToken'] = pageToken;
907
- }
908
- if (filter !== undefined) {
909
- localVarQueryParameter['filter'] = filter;
910
- }
911
- if (search !== undefined) {
912
- localVarQueryParameter['search'] = search;
913
- }
914
- if (order !== undefined) {
915
- localVarQueryParameter['order'] = order;
916
- }
917
- if (expand !== undefined) {
918
- localVarQueryParameter['expand'] = expand;
919
- }
920
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
921
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
922
- }
923
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
924
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
925
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
926
- return [2 /*return*/, {
927
- url: (0, common_1.toPathString)(localVarUrlObj),
928
- options: localVarRequestOptions,
929
- }];
930
- }
931
- });
932
- });
933
- },
934
- /**
935
- * Returns a list of product fields you have previously created. The product fields are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
936
- * @summary List product fields
937
- * @param {string} [authorization] Bearer Token
938
- * @param {number} [pageSize] Page size
939
- * @param {string} [pageToken] Page token
940
- * @param {string} [filter] List filter
941
- * @param {string} [search] Search query
942
- * @param {string} [order] Ordering criteria
943
- * @param {string} [expand] Extra fields to fetch
944
- * @param {*} [options] Override http request option.
945
- * @throws {RequiredError}
946
- */
947
- listProductFields: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
948
- if (options === void 0) { options = {}; }
949
- return __awaiter(_this, void 0, void 0, function () {
950
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
951
- return __generator(this, function (_a) {
952
- switch (_a.label) {
953
- case 0:
954
- localVarPath = "/insuranceservice/v1/product-fields";
955
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
956
- if (configuration) {
957
- baseOptions = configuration.baseOptions;
958
- baseAccessToken = configuration.accessToken;
959
- }
960
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
961
- localVarHeaderParameter = {};
962
- localVarQueryParameter = {};
963
- // authentication bearer required
964
- // http bearer authentication required
965
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
966
- case 1:
967
- // authentication bearer required
968
- // http bearer authentication required
969
- _a.sent();
970
- if (pageSize !== undefined) {
971
- localVarQueryParameter['pageSize'] = pageSize;
972
- }
973
- if (pageToken !== undefined) {
974
- localVarQueryParameter['pageToken'] = pageToken;
975
- }
976
- if (filter !== undefined) {
977
- localVarQueryParameter['filter'] = filter;
978
- }
979
- if (search !== undefined) {
980
- localVarQueryParameter['search'] = search;
981
- }
982
- if (order !== undefined) {
983
- localVarQueryParameter['order'] = order;
984
- }
985
- if (expand !== undefined) {
986
- localVarQueryParameter['expand'] = expand;
987
- }
988
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
989
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
990
- }
991
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
992
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
993
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
994
- return [2 /*return*/, {
995
- url: (0, common_1.toPathString)(localVarUrlObj),
996
- options: localVarRequestOptions,
997
- }];
998
- }
999
- });
1000
- });
1001
- },
1002
- /**
1003
- * Returns a list of products you have previously created. The products are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
1004
- * @summary List products
1005
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1006
- * @param {number} [pageSize] Page size
1007
- * @param {string} [pageToken] Page token
1008
- * @param {string} [filter] List filter
1009
- * @param {string} [search] Search query
1010
- * @param {string} [order] Ordering criteria
1011
- * @param {string} [expand] Extra fields to fetch
1012
- * @param {*} [options] Override http request option.
1013
- * @throws {RequiredError}
1014
- */
1015
- listProducts: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
1016
- if (options === void 0) { options = {}; }
1017
- return __awaiter(_this, void 0, void 0, function () {
1018
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1019
- return __generator(this, function (_a) {
1020
- switch (_a.label) {
1021
- case 0:
1022
- localVarPath = "/insuranceservice/v1/products";
1023
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1024
- if (configuration) {
1025
- baseOptions = configuration.baseOptions;
1026
- baseAccessToken = configuration.accessToken;
1027
- }
1028
- localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
1029
- localVarHeaderParameter = {};
1030
- localVarQueryParameter = {};
1031
- // authentication bearer required
1032
- // http bearer authentication required
1033
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1034
- case 1:
1035
- // authentication bearer required
1036
- // http bearer authentication required
1037
- _a.sent();
1038
- if (pageSize !== undefined) {
1039
- localVarQueryParameter['pageSize'] = pageSize;
1040
- }
1041
- if (pageToken !== undefined) {
1042
- localVarQueryParameter['pageToken'] = pageToken;
1043
- }
1044
- if (filter !== undefined) {
1045
- localVarQueryParameter['filter'] = filter;
1046
- }
1047
- if (search !== undefined) {
1048
- localVarQueryParameter['search'] = search;
1049
- }
1050
- if (order !== undefined) {
1051
- localVarQueryParameter['order'] = order;
1052
- }
1053
- if (expand !== undefined) {
1054
- localVarQueryParameter['expand'] = expand;
1055
- }
1056
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
1057
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
1058
- }
1059
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1060
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1061
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1062
- return [2 /*return*/, {
1063
- url: (0, common_1.toPathString)(localVarUrlObj),
1064
- options: localVarRequestOptions,
1065
- }];
1066
- }
1067
- });
1068
- });
1069
- },
1070
- /**
1071
- * Upload a CSV file containing product factors necessary for a product. The columns must be in the following order: group,label,key,name,value. It is advised to validate the file first.
1072
- * @summary Upload product factors
1073
- * @param {string} [authorization] Bearer Token
1074
- * @param {number} [productVersionId]
1075
- * @param {any} [factors]
1076
- * @param {*} [options] Override http request option.
1077
- * @throws {RequiredError}
1078
- */
1079
- storeProductFactors: function (authorization, productVersionId, factors, options) {
1080
- if (options === void 0) { options = {}; }
1081
- return __awaiter(_this, void 0, void 0, function () {
1082
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, headersFromBaseOptions;
1083
- return __generator(this, function (_a) {
1084
- switch (_a.label) {
1085
- case 0:
1086
- localVarPath = "/insuranceservice/v1/product-factors";
1087
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1088
- if (configuration) {
1089
- baseOptions = configuration.baseOptions;
1090
- baseAccessToken = configuration.accessToken;
1091
- }
1092
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
1093
- localVarHeaderParameter = {};
1094
- localVarQueryParameter = {};
1095
- localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
1096
- // authentication bearer required
1097
- // http bearer authentication required
1098
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1099
- case 1:
1100
- // authentication bearer required
1101
- // http bearer authentication required
1102
- _a.sent();
1103
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
1104
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
1105
- }
1106
- if (productVersionId !== undefined) {
1107
- localVarFormParams.append('productVersionId', productVersionId);
1108
- }
1109
- if (factors !== undefined) {
1110
- localVarFormParams.append('factors', factors);
1111
- }
1112
- localVarHeaderParameter['Content-Type'] = 'multipart/form-data; boundary=' + localVarFormParams.getBoundary();
1113
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1114
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1115
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1116
- localVarRequestOptions.data = localVarFormParams;
1117
- return [2 /*return*/, {
1118
- url: (0, common_1.toPathString)(localVarUrlObj),
1119
- options: localVarRequestOptions,
1120
- }];
1121
- }
1122
- });
1123
- });
1124
- },
1125
- /**
1126
- * Updates the specified premium formula by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1127
- * @summary Update the premium formula
1128
- * @param {number} id
1129
- * @param {UpdatePremiumFormulaRequestDto} updatePremiumFormulaRequestDto
1130
- * @param {string} [authorization] Bearer Token
1131
- * @param {*} [options] Override http request option.
1132
- * @throws {RequiredError}
1133
- */
1134
- updatePremiumFormula: function (id, updatePremiumFormulaRequestDto, authorization, options) {
1135
- if (options === void 0) { options = {}; }
1136
- return __awaiter(_this, void 0, void 0, function () {
1137
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1138
- return __generator(this, function (_a) {
1139
- switch (_a.label) {
1140
- case 0:
1141
- // verify required parameter 'id' is not null or undefined
1142
- (0, common_1.assertParamExists)('updatePremiumFormula', 'id', id);
1143
- // verify required parameter 'updatePremiumFormulaRequestDto' is not null or undefined
1144
- (0, common_1.assertParamExists)('updatePremiumFormula', 'updatePremiumFormulaRequestDto', updatePremiumFormulaRequestDto);
1145
- localVarPath = "/insuranceservice/v1/premium-formulas/{id}"
1146
- .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
1147
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1148
- if (configuration) {
1149
- baseOptions = configuration.baseOptions;
1150
- baseAccessToken = configuration.accessToken;
1151
- }
1152
- localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
1153
- localVarHeaderParameter = {};
1154
- localVarQueryParameter = {};
1155
- // authentication bearer required
1156
- // http bearer authentication required
1157
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1158
- case 1:
1159
- // authentication bearer required
1160
- // http bearer authentication required
1161
- _a.sent();
1162
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
1163
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
1164
- }
1165
- localVarHeaderParameter['Content-Type'] = 'application/json';
1166
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1167
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1168
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1169
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updatePremiumFormulaRequestDto, localVarRequestOptions, configuration);
1170
- return [2 /*return*/, {
1171
- url: (0, common_1.toPathString)(localVarUrlObj),
1172
- options: localVarRequestOptions,
1173
- }];
1174
- }
1175
- });
1176
- });
1177
- },
1178
- /**
1179
- * Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1180
- * @summary Update the product
1181
- * @param {number} id
1182
- * @param {UpdateProductRequestDto} updateProductRequestDto
1183
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1184
- * @param {*} [options] Override http request option.
1185
- * @throws {RequiredError}
1186
- */
1187
- updateProduct: function (id, updateProductRequestDto, authorization, options) {
1188
- if (options === void 0) { options = {}; }
1189
- return __awaiter(_this, void 0, void 0, function () {
1190
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1191
- return __generator(this, function (_a) {
1192
- switch (_a.label) {
1193
- case 0:
1194
- // verify required parameter 'id' is not null or undefined
1195
- (0, common_1.assertParamExists)('updateProduct', 'id', id);
1196
- // verify required parameter 'updateProductRequestDto' is not null or undefined
1197
- (0, common_1.assertParamExists)('updateProduct', 'updateProductRequestDto', updateProductRequestDto);
1198
- localVarPath = "/insuranceservice/v1/products/{id}"
1199
- .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
1200
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1201
- if (configuration) {
1202
- baseOptions = configuration.baseOptions;
1203
- baseAccessToken = configuration.accessToken;
1204
- }
1205
- localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
1206
- localVarHeaderParameter = {};
1207
- localVarQueryParameter = {};
1208
- // authentication bearer required
1209
- // http bearer authentication required
1210
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1211
- case 1:
1212
- // authentication bearer required
1213
- // http bearer authentication required
1214
- _a.sent();
1215
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
1216
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
1217
- }
1218
- localVarHeaderParameter['Content-Type'] = 'application/json';
1219
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1220
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1221
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1222
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateProductRequestDto, localVarRequestOptions, configuration);
1223
- return [2 /*return*/, {
1224
- url: (0, common_1.toPathString)(localVarUrlObj),
1225
- options: localVarRequestOptions,
1226
- }];
1227
- }
1228
- });
1229
- });
1230
- },
1231
- /**
1232
- * Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1233
- * @summary Update the product
1234
- * @param {string} id
1235
- * @param {UpdateProductFieldRequestDto} updateProductFieldRequestDto
1236
- * @param {string} [authorization] Bearer Token
1237
- * @param {*} [options] Override http request option.
1238
- * @throws {RequiredError}
1239
- */
1240
- updateProductField: function (id, updateProductFieldRequestDto, authorization, options) {
1241
- if (options === void 0) { options = {}; }
1242
- return __awaiter(_this, void 0, void 0, function () {
1243
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1244
- return __generator(this, function (_a) {
1245
- switch (_a.label) {
1246
- case 0:
1247
- // verify required parameter 'id' is not null or undefined
1248
- (0, common_1.assertParamExists)('updateProductField', 'id', id);
1249
- // verify required parameter 'updateProductFieldRequestDto' is not null or undefined
1250
- (0, common_1.assertParamExists)('updateProductField', 'updateProductFieldRequestDto', updateProductFieldRequestDto);
1251
- localVarPath = "/insuranceservice/v1/product-fields/{id}"
1252
- .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
1253
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1254
- if (configuration) {
1255
- baseOptions = configuration.baseOptions;
1256
- baseAccessToken = configuration.accessToken;
1257
- }
1258
- localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
1259
- localVarHeaderParameter = {};
1260
- localVarQueryParameter = {};
1261
- // authentication bearer required
1262
- // http bearer authentication required
1263
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1264
- case 1:
1265
- // authentication bearer required
1266
- // http bearer authentication required
1267
- _a.sent();
1268
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
1269
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
1270
- }
1271
- localVarHeaderParameter['Content-Type'] = 'application/json';
1272
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1273
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1274
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1275
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateProductFieldRequestDto, localVarRequestOptions, configuration);
1276
- return [2 /*return*/, {
1277
- url: (0, common_1.toPathString)(localVarUrlObj),
1278
- options: localVarRequestOptions,
1279
- }];
1280
- }
1281
- });
1282
- });
1283
- },
1284
- /**
1285
- * Updates the specified product version by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1286
- * @summary Update the product version
1287
- * @param {number} id
1288
- * @param {UpdateProductVersionRequestDto} updateProductVersionRequestDto
1289
- * @param {string} [authorization] Bearer Token
1290
- * @param {*} [options] Override http request option.
1291
- * @throws {RequiredError}
1292
- */
1293
- updateProductVersion: function (id, updateProductVersionRequestDto, authorization, options) {
1294
- if (options === void 0) { options = {}; }
1295
- return __awaiter(_this, void 0, void 0, function () {
1296
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
1297
- return __generator(this, function (_a) {
1298
- switch (_a.label) {
1299
- case 0:
1300
- // verify required parameter 'id' is not null or undefined
1301
- (0, common_1.assertParamExists)('updateProductVersion', 'id', id);
1302
- // verify required parameter 'updateProductVersionRequestDto' is not null or undefined
1303
- (0, common_1.assertParamExists)('updateProductVersion', 'updateProductVersionRequestDto', updateProductVersionRequestDto);
1304
- localVarPath = "/insuranceservice/v1/product-versions/{id}"
1305
- .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
1306
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1307
- if (configuration) {
1308
- baseOptions = configuration.baseOptions;
1309
- baseAccessToken = configuration.accessToken;
1310
- }
1311
- localVarRequestOptions = __assign(__assign({ method: 'PUT' }, baseOptions), options);
1312
- localVarHeaderParameter = {};
1313
- localVarQueryParameter = {};
1314
- // authentication bearer required
1315
- // http bearer authentication required
1316
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1317
- case 1:
1318
- // authentication bearer required
1319
- // http bearer authentication required
1320
- _a.sent();
1321
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
1322
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
1323
- }
1324
- localVarHeaderParameter['Content-Type'] = 'application/json';
1325
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1326
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1327
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1328
- localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(updateProductVersionRequestDto, localVarRequestOptions, configuration);
1329
- return [2 /*return*/, {
1330
- url: (0, common_1.toPathString)(localVarUrlObj),
1331
- options: localVarRequestOptions,
1332
- }];
1333
- }
1334
- });
1335
- });
1336
- },
1337
- /**
1338
- * Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
1339
- * @summary Validate product factors
1340
- * @param {string} [authorization] Bearer Token
1341
- * @param {any} [factors]
1342
- * @param {*} [options] Override http request option.
1343
- * @throws {RequiredError}
1344
- */
1345
- validateProductFactors: function (authorization, factors, options) {
1346
- if (options === void 0) { options = {}; }
1347
- return __awaiter(_this, void 0, void 0, function () {
1348
- var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, headersFromBaseOptions;
1349
- return __generator(this, function (_a) {
1350
- switch (_a.label) {
1351
- case 0:
1352
- localVarPath = "/insuranceservice/v1/product-factors/validate";
1353
- localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
1354
- if (configuration) {
1355
- baseOptions = configuration.baseOptions;
1356
- baseAccessToken = configuration.accessToken;
1357
- }
1358
- localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
1359
- localVarHeaderParameter = {};
1360
- localVarQueryParameter = {};
1361
- localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
1362
- // authentication bearer required
1363
- // http bearer authentication required
1364
- return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
1365
- case 1:
1366
- // authentication bearer required
1367
- // http bearer authentication required
1368
- _a.sent();
1369
- if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
1370
- localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
1371
- }
1372
- if (factors !== undefined) {
1373
- localVarFormParams.append('factors', factors);
1374
- }
1375
- localVarHeaderParameter['Content-Type'] = 'multipart/form-data; boundary=' + localVarFormParams.getBoundary();
1376
- (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
1377
- headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1378
- localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1379
- localVarRequestOptions.data = localVarFormParams;
1380
- return [2 /*return*/, {
1381
- url: (0, common_1.toPathString)(localVarUrlObj),
1382
- options: localVarRequestOptions,
1383
- }];
1384
- }
1385
- });
1386
- });
1387
- },
1388
- };
1389
- };
1390
- exports.ProductsApiAxiosParamCreator = ProductsApiAxiosParamCreator;
1391
- /**
1392
- * ProductsApi - functional programming interface
1393
- * @export
1394
- */
1395
- var ProductsApiFp = function (configuration) {
1396
- var localVarAxiosParamCreator = (0, exports.ProductsApiAxiosParamCreator)(configuration);
1397
- return {
1398
- /**
1399
- * Creates a premium formula.
1400
- * @summary Create the premium formula
1401
- * @param {CreatePremiumFormulaRequestDto} createPremiumFormulaRequestDto
1402
- * @param {string} [authorization] Bearer Token
1403
- * @param {*} [options] Override http request option.
1404
- * @throws {RequiredError}
1405
- */
1406
- createPremiumFormula: function (createPremiumFormulaRequestDto, authorization, options) {
1407
- return __awaiter(this, void 0, void 0, function () {
1408
- var localVarAxiosArgs;
1409
- return __generator(this, function (_a) {
1410
- switch (_a.label) {
1411
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.createPremiumFormula(createPremiumFormulaRequestDto, authorization, options)];
1412
- case 1:
1413
- localVarAxiosArgs = _a.sent();
1414
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1415
- }
1416
- });
1417
- });
1418
- },
1419
- /**
1420
- * Create a blank product. The product cannot be used as long as it is missing product factors, insured objects and premium formulas.
1421
- * @summary Create the product
1422
- * @param {CreateProductRequestDto} createProductRequestDto
1423
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1424
- * @param {*} [options] Override http request option.
1425
- * @throws {RequiredError}
1426
- */
1427
- createProduct: function (createProductRequestDto, authorization, options) {
1428
- return __awaiter(this, void 0, void 0, function () {
1429
- var localVarAxiosArgs;
1430
- return __generator(this, function (_a) {
1431
- switch (_a.label) {
1432
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.createProduct(createProductRequestDto, authorization, options)];
1433
- case 1:
1434
- localVarAxiosArgs = _a.sent();
1435
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1436
- }
1437
- });
1438
- });
1439
- },
1440
- /**
1441
- * Create a product field in the database.
1442
- * @summary Create the product field
1443
- * @param {CreateProductFieldRequestDto} createProductFieldRequestDto
1444
- * @param {string} [authorization] Bearer Token
1445
- * @param {*} [options] Override http request option.
1446
- * @throws {RequiredError}
1447
- */
1448
- createProductField: function (createProductFieldRequestDto, authorization, options) {
1449
- return __awaiter(this, void 0, void 0, function () {
1450
- var localVarAxiosArgs;
1451
- return __generator(this, function (_a) {
1452
- switch (_a.label) {
1453
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.createProductField(createProductFieldRequestDto, authorization, options)];
1454
- case 1:
1455
- localVarAxiosArgs = _a.sent();
1456
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1457
- }
1458
- });
1459
- });
1460
- },
1461
- /**
1462
- * Permanently deletes the premium formula. Supply the unique id that was returned when you created the premium formula and this will delete it.
1463
- * @summary Delete the premium formula
1464
- * @param {number} id
1465
- * @param {string} [authorization] Bearer Token
1466
- * @param {*} [options] Override http request option.
1467
- * @throws {RequiredError}
1468
- */
1469
- deletePremiumFormula: function (id, authorization, options) {
1470
- return __awaiter(this, void 0, void 0, function () {
1471
- var localVarAxiosArgs;
1472
- return __generator(this, function (_a) {
1473
- switch (_a.label) {
1474
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.deletePremiumFormula(id, authorization, options)];
1475
- case 1:
1476
- localVarAxiosArgs = _a.sent();
1477
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1478
- }
1479
- });
1480
- });
1481
- },
1482
- /**
1483
- * Permanently deletes the product. Supply the unique id that was returned when you created the product and this will delete it.
1484
- * @summary Delete the product
1485
- * @param {number} id
1486
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1487
- * @param {*} [options] Override http request option.
1488
- * @throws {RequiredError}
1489
- */
1490
- deleteProduct: function (id, authorization, options) {
1491
- return __awaiter(this, void 0, void 0, function () {
1492
- var localVarAxiosArgs;
1493
- return __generator(this, function (_a) {
1494
- switch (_a.label) {
1495
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteProduct(id, authorization, options)];
1496
- case 1:
1497
- localVarAxiosArgs = _a.sent();
1498
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1499
- }
1500
- });
1501
- });
1502
- },
1503
- /**
1504
- * Permanently deletes the product. Supply the unique id that was returned when you created the product and this will delete it.
1505
- * @summary Delete the product
1506
- * @param {string} id
1507
- * @param {string} [authorization] Bearer Token
1508
- * @param {*} [options] Override http request option.
1509
- * @throws {RequiredError}
1510
- */
1511
- deleteProductField: function (id, authorization, options) {
1512
- return __awaiter(this, void 0, void 0, function () {
1513
- var localVarAxiosArgs;
1514
- return __generator(this, function (_a) {
1515
- switch (_a.label) {
1516
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.deleteProductField(id, authorization, options)];
1517
- case 1:
1518
- localVarAxiosArgs = _a.sent();
1519
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1520
- }
1521
- });
1522
- });
1523
- },
1524
- /**
1525
- * Retrieves the details of the premium formula that was previously created. Supply the unique premium formula id that was returned when you created it and Emil Api will return the corresponding premium formula information.
1526
- * @summary Retrieve the premium formula
1527
- * @param {string} id
1528
- * @param {number} id2 Product formula id
1529
- * @param {string} [authorization] Bearer Token
1530
- * @param {*} [options] Override http request option.
1531
- * @throws {RequiredError}
1532
- */
1533
- getPremiumFormula: function (id, id2, authorization, options) {
1534
- return __awaiter(this, void 0, void 0, function () {
1535
- var localVarAxiosArgs;
1536
- return __generator(this, function (_a) {
1537
- switch (_a.label) {
1538
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPremiumFormula(id, id2, authorization, options)];
1539
- case 1:
1540
- localVarAxiosArgs = _a.sent();
1541
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1542
- }
1543
- });
1544
- });
1545
- },
1546
- /**
1547
- * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
1548
- * @summary Retrieve the product
1549
- * @param {string} code Unique identifier for the object.
1550
- * @param {number} id Product id
1551
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1552
- * @param {string} [expand] Fields to expand response by
1553
- * @param {*} [options] Override http request option.
1554
- * @throws {RequiredError}
1555
- */
1556
- getProductByCode: function (code, id, authorization, expand, options) {
1557
- return __awaiter(this, void 0, void 0, function () {
1558
- var localVarAxiosArgs;
1559
- return __generator(this, function (_a) {
1560
- switch (_a.label) {
1561
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProductByCode(code, id, authorization, expand, options)];
1562
- case 1:
1563
- localVarAxiosArgs = _a.sent();
1564
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1565
- }
1566
- });
1567
- });
1568
- },
1569
- /**
1570
- * Retrieves the details of the product factor that was previously created. Supply the unique product factor id that was returned when you created it and Emil Api will return the corresponding product factor information.
1571
- * @summary Retrieve the product factor
1572
- * @param {number} id
1573
- * @param {number} id2 Product factor id
1574
- * @param {string} [authorization] Bearer Token
1575
- * @param {string} [expand] Fields to expand response by
1576
- * @param {*} [options] Override http request option.
1577
- * @throws {RequiredError}
1578
- */
1579
- getProductFactor: function (id, id2, authorization, expand, options) {
1580
- return __awaiter(this, void 0, void 0, function () {
1581
- var localVarAxiosArgs;
1582
- return __generator(this, function (_a) {
1583
- switch (_a.label) {
1584
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProductFactor(id, id2, authorization, expand, options)];
1585
- case 1:
1586
- localVarAxiosArgs = _a.sent();
1587
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1588
- }
1589
- });
1590
- });
1591
- },
1592
- /**
1593
- * Get the value corresponding to a specific product factor.
1594
- * @summary Get product factor value
1595
- * @param {number} productVersionId Product Version Id
1596
- * @param {string} label Product factor label
1597
- * @param {string} key Key for the product factor value
1598
- * @param {string} name Name for the product factor value
1599
- * @param {string} [authorization] Bearer Token
1600
- * @param {*} [options] Override http request option.
1601
- * @throws {RequiredError}
1602
- */
1603
- getProductFactorValue: function (productVersionId, label, key, name, authorization, options) {
1604
- return __awaiter(this, void 0, void 0, function () {
1605
- var localVarAxiosArgs;
1606
- return __generator(this, function (_a) {
1607
- switch (_a.label) {
1608
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProductFactorValue(productVersionId, label, key, name, authorization, options)];
1609
- case 1:
1610
- localVarAxiosArgs = _a.sent();
1611
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1612
- }
1613
- });
1614
- });
1615
- },
1616
- /**
1617
- * Retrieves the details of the product field that was previously created. Supply the unique product field id that was returned when you created it and Emil Api will return the corresponding product field information.
1618
- * @summary Retrieve the product field
1619
- * @param {string} id
1620
- * @param {string} [authorization] Bearer Token
1621
- * @param {*} [options] Override http request option.
1622
- * @throws {RequiredError}
1623
- */
1624
- getProductField: function (id, authorization, options) {
1625
- return __awaiter(this, void 0, void 0, function () {
1626
- var localVarAxiosArgs;
1627
- return __generator(this, function (_a) {
1628
- switch (_a.label) {
1629
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProductField(id, authorization, options)];
1630
- case 1:
1631
- localVarAxiosArgs = _a.sent();
1632
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1633
- }
1634
- });
1635
- });
1636
- },
1637
- /**
1638
- * Retrieves the details of the product version that was previously created. Supply the unique product version id that was returned when you created it and Emil Api will return the corresponding product version information.
1639
- * @summary Retrieve the product version
1640
- * @param {string} id
1641
- * @param {number} id2 Product version id
1642
- * @param {string} [authorization] Bearer Token
1643
- * @param {*} [options] Override http request option.
1644
- * @throws {RequiredError}
1645
- */
1646
- getProductVersion: function (id, id2, authorization, options) {
1647
- return __awaiter(this, void 0, void 0, function () {
1648
- var localVarAxiosArgs;
1649
- return __generator(this, function (_a) {
1650
- switch (_a.label) {
1651
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProductVersion(id, id2, authorization, options)];
1652
- case 1:
1653
- localVarAxiosArgs = _a.sent();
1654
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1655
- }
1656
- });
1657
- });
1658
- },
1659
- /**
1660
- * Returns a list of premium formulas you have previously created. The premium formulas are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
1661
- * @summary List premium formulas
1662
- * @param {string} [authorization] Bearer Token
1663
- * @param {number} [pageSize] Page size
1664
- * @param {string} [pageToken] Page token
1665
- * @param {string} [filter] List filter
1666
- * @param {string} [search] Search query
1667
- * @param {string} [order] Ordering criteria
1668
- * @param {string} [expand] Extra fields to fetch
1669
- * @param {*} [options] Override http request option.
1670
- * @throws {RequiredError}
1671
- */
1672
- listPremiumFormulas: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
1673
- return __awaiter(this, void 0, void 0, function () {
1674
- var localVarAxiosArgs;
1675
- return __generator(this, function (_a) {
1676
- switch (_a.label) {
1677
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPremiumFormulas(authorization, pageSize, pageToken, filter, search, order, expand, options)];
1678
- case 1:
1679
- localVarAxiosArgs = _a.sent();
1680
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1681
- }
1682
- });
1683
- });
1684
- },
1685
- /**
1686
- * Returns a list of product factors you have previously created. The product factors are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
1687
- * @summary List product factors
1688
- * @param {string} [authorization] Bearer Token
1689
- * @param {number} [pageSize] Page size
1690
- * @param {string} [pageToken] Page token
1691
- * @param {string} [filter] List filter
1692
- * @param {string} [search] Search query
1693
- * @param {string} [order] Ordering criteria
1694
- * @param {string} [expand] Extra fields to fetch
1695
- * @param {*} [options] Override http request option.
1696
- * @throws {RequiredError}
1697
- */
1698
- listProductFactors: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
1699
- return __awaiter(this, void 0, void 0, function () {
1700
- var localVarAxiosArgs;
1701
- return __generator(this, function (_a) {
1702
- switch (_a.label) {
1703
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProductFactors(authorization, pageSize, pageToken, filter, search, order, expand, options)];
1704
- case 1:
1705
- localVarAxiosArgs = _a.sent();
1706
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1707
- }
1708
- });
1709
- });
1710
- },
1711
- /**
1712
- * Returns a list of product field types you have previously created. The product field types are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
1713
- * @summary List product field types
1714
- * @param {string} [authorization] Bearer Token
1715
- * @param {number} [pageSize] Page size
1716
- * @param {string} [pageToken] Page token
1717
- * @param {string} [filter] List filter
1718
- * @param {string} [search] Search query
1719
- * @param {string} [order] Ordering criteria
1720
- * @param {string} [expand] Extra fields to fetch
1721
- * @param {*} [options] Override http request option.
1722
- * @throws {RequiredError}
1723
- */
1724
- listProductFieldTypes: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
1725
- return __awaiter(this, void 0, void 0, function () {
1726
- var localVarAxiosArgs;
1727
- return __generator(this, function (_a) {
1728
- switch (_a.label) {
1729
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProductFieldTypes(authorization, pageSize, pageToken, filter, search, order, expand, options)];
1730
- case 1:
1731
- localVarAxiosArgs = _a.sent();
1732
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1733
- }
1734
- });
1735
- });
1736
- },
1737
- /**
1738
- * Returns a list of product fields you have previously created. The product fields are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
1739
- * @summary List product fields
1740
- * @param {string} [authorization] Bearer Token
1741
- * @param {number} [pageSize] Page size
1742
- * @param {string} [pageToken] Page token
1743
- * @param {string} [filter] List filter
1744
- * @param {string} [search] Search query
1745
- * @param {string} [order] Ordering criteria
1746
- * @param {string} [expand] Extra fields to fetch
1747
- * @param {*} [options] Override http request option.
1748
- * @throws {RequiredError}
1749
- */
1750
- listProductFields: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
1751
- return __awaiter(this, void 0, void 0, function () {
1752
- var localVarAxiosArgs;
1753
- return __generator(this, function (_a) {
1754
- switch (_a.label) {
1755
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProductFields(authorization, pageSize, pageToken, filter, search, order, expand, options)];
1756
- case 1:
1757
- localVarAxiosArgs = _a.sent();
1758
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1759
- }
1760
- });
1761
- });
1762
- },
1763
- /**
1764
- * Returns a list of products you have previously created. The products are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
1765
- * @summary List products
1766
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1767
- * @param {number} [pageSize] Page size
1768
- * @param {string} [pageToken] Page token
1769
- * @param {string} [filter] List filter
1770
- * @param {string} [search] Search query
1771
- * @param {string} [order] Ordering criteria
1772
- * @param {string} [expand] Extra fields to fetch
1773
- * @param {*} [options] Override http request option.
1774
- * @throws {RequiredError}
1775
- */
1776
- listProducts: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
1777
- return __awaiter(this, void 0, void 0, function () {
1778
- var localVarAxiosArgs;
1779
- return __generator(this, function (_a) {
1780
- switch (_a.label) {
1781
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProducts(authorization, pageSize, pageToken, filter, search, order, expand, options)];
1782
- case 1:
1783
- localVarAxiosArgs = _a.sent();
1784
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1785
- }
1786
- });
1787
- });
1788
- },
1789
- /**
1790
- * Upload a CSV file containing product factors necessary for a product. The columns must be in the following order: group,label,key,name,value. It is advised to validate the file first.
1791
- * @summary Upload product factors
1792
- * @param {string} [authorization] Bearer Token
1793
- * @param {number} [productVersionId]
1794
- * @param {any} [factors]
1795
- * @param {*} [options] Override http request option.
1796
- * @throws {RequiredError}
1797
- */
1798
- storeProductFactors: function (authorization, productVersionId, factors, options) {
1799
- return __awaiter(this, void 0, void 0, function () {
1800
- var localVarAxiosArgs;
1801
- return __generator(this, function (_a) {
1802
- switch (_a.label) {
1803
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.storeProductFactors(authorization, productVersionId, factors, options)];
1804
- case 1:
1805
- localVarAxiosArgs = _a.sent();
1806
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1807
- }
1808
- });
1809
- });
1810
- },
1811
- /**
1812
- * Updates the specified premium formula by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1813
- * @summary Update the premium formula
1814
- * @param {number} id
1815
- * @param {UpdatePremiumFormulaRequestDto} updatePremiumFormulaRequestDto
1816
- * @param {string} [authorization] Bearer Token
1817
- * @param {*} [options] Override http request option.
1818
- * @throws {RequiredError}
1819
- */
1820
- updatePremiumFormula: function (id, updatePremiumFormulaRequestDto, authorization, options) {
1821
- return __awaiter(this, void 0, void 0, function () {
1822
- var localVarAxiosArgs;
1823
- return __generator(this, function (_a) {
1824
- switch (_a.label) {
1825
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.updatePremiumFormula(id, updatePremiumFormulaRequestDto, authorization, options)];
1826
- case 1:
1827
- localVarAxiosArgs = _a.sent();
1828
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1829
- }
1830
- });
1831
- });
1832
- },
1833
- /**
1834
- * Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1835
- * @summary Update the product
1836
- * @param {number} id
1837
- * @param {UpdateProductRequestDto} updateProductRequestDto
1838
- * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1839
- * @param {*} [options] Override http request option.
1840
- * @throws {RequiredError}
1841
- */
1842
- updateProduct: function (id, updateProductRequestDto, authorization, options) {
1843
- return __awaiter(this, void 0, void 0, function () {
1844
- var localVarAxiosArgs;
1845
- return __generator(this, function (_a) {
1846
- switch (_a.label) {
1847
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateProduct(id, updateProductRequestDto, authorization, options)];
1848
- case 1:
1849
- localVarAxiosArgs = _a.sent();
1850
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1851
- }
1852
- });
1853
- });
1854
- },
1855
- /**
1856
- * Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1857
- * @summary Update the product
1858
- * @param {string} id
1859
- * @param {UpdateProductFieldRequestDto} updateProductFieldRequestDto
1860
- * @param {string} [authorization] Bearer Token
1861
- * @param {*} [options] Override http request option.
1862
- * @throws {RequiredError}
1863
- */
1864
- updateProductField: function (id, updateProductFieldRequestDto, authorization, options) {
1865
- return __awaiter(this, void 0, void 0, function () {
1866
- var localVarAxiosArgs;
1867
- return __generator(this, function (_a) {
1868
- switch (_a.label) {
1869
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateProductField(id, updateProductFieldRequestDto, authorization, options)];
1870
- case 1:
1871
- localVarAxiosArgs = _a.sent();
1872
- return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1873
- }
1874
- });
1875
- });
1876
- },
1877
- /**
1878
- * Updates the specified product version by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
1879
- * @summary Update the product version
1880
- * @param {number} id
1881
- * @param {UpdateProductVersionRequestDto} updateProductVersionRequestDto
1882
- * @param {string} [authorization] Bearer Token
1883
- * @param {*} [options] Override http request option.
1884
- * @throws {RequiredError}
1885
- */
1886
- updateProductVersion: function (id, updateProductVersionRequestDto, authorization, options) {
1887
- return __awaiter(this, void 0, void 0, function () {
1888
- var localVarAxiosArgs;
1889
- return __generator(this, function (_a) {
1890
- switch (_a.label) {
1891
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateProductVersion(id, updateProductVersionRequestDto, authorization, options)];
468
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProducts(authorization, pageSize, pageToken, filter, search, order, expand, options)];
1892
469
  case 1:
1893
470
  localVarAxiosArgs = _a.sent();
1894
471
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -1897,19 +474,20 @@ var ProductsApiFp = function (configuration) {
1897
474
  });
1898
475
  },
1899
476
  /**
1900
- * Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
1901
- * @summary Validate product factors
1902
- * @param {string} [authorization] Bearer Token
1903
- * @param {any} [factors]
477
+ * Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
478
+ * @summary Update the product
479
+ * @param {number} id
480
+ * @param {UpdateProductRequestDto} updateProductRequestDto
481
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1904
482
  * @param {*} [options] Override http request option.
1905
483
  * @throws {RequiredError}
1906
484
  */
1907
- validateProductFactors: function (authorization, factors, options) {
485
+ updateProduct: function (id, updateProductRequestDto, authorization, options) {
1908
486
  return __awaiter(this, void 0, void 0, function () {
1909
487
  var localVarAxiosArgs;
1910
488
  return __generator(this, function (_a) {
1911
489
  switch (_a.label) {
1912
- case 0: return [4 /*yield*/, localVarAxiosParamCreator.validateProductFactors(authorization, factors, options)];
490
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.updateProduct(id, updateProductRequestDto, authorization, options)];
1913
491
  case 1:
1914
492
  localVarAxiosArgs = _a.sent();
1915
493
  return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
@@ -1927,17 +505,6 @@ exports.ProductsApiFp = ProductsApiFp;
1927
505
  var ProductsApiFactory = function (configuration, basePath, axios) {
1928
506
  var localVarFp = (0, exports.ProductsApiFp)(configuration);
1929
507
  return {
1930
- /**
1931
- * Creates a premium formula.
1932
- * @summary Create the premium formula
1933
- * @param {CreatePremiumFormulaRequestDto} createPremiumFormulaRequestDto
1934
- * @param {string} [authorization] Bearer Token
1935
- * @param {*} [options] Override http request option.
1936
- * @throws {RequiredError}
1937
- */
1938
- createPremiumFormula: function (createPremiumFormulaRequestDto, authorization, options) {
1939
- return localVarFp.createPremiumFormula(createPremiumFormulaRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1940
- },
1941
508
  /**
1942
509
  * Create a blank product. The product cannot be used as long as it is missing product factors, insured objects and premium formulas.
1943
510
  * @summary Create the product
@@ -1949,28 +516,6 @@ var ProductsApiFactory = function (configuration, basePath, axios) {
1949
516
  createProduct: function (createProductRequestDto, authorization, options) {
1950
517
  return localVarFp.createProduct(createProductRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1951
518
  },
1952
- /**
1953
- * Create a product field in the database.
1954
- * @summary Create the product field
1955
- * @param {CreateProductFieldRequestDto} createProductFieldRequestDto
1956
- * @param {string} [authorization] Bearer Token
1957
- * @param {*} [options] Override http request option.
1958
- * @throws {RequiredError}
1959
- */
1960
- createProductField: function (createProductFieldRequestDto, authorization, options) {
1961
- return localVarFp.createProductField(createProductFieldRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1962
- },
1963
- /**
1964
- * Permanently deletes the premium formula. Supply the unique id that was returned when you created the premium formula and this will delete it.
1965
- * @summary Delete the premium formula
1966
- * @param {number} id
1967
- * @param {string} [authorization] Bearer Token
1968
- * @param {*} [options] Override http request option.
1969
- * @throws {RequiredError}
1970
- */
1971
- deletePremiumFormula: function (id, authorization, options) {
1972
- return localVarFp.deletePremiumFormula(id, authorization, options).then(function (request) { return request(axios, basePath); });
1973
- },
1974
519
  /**
1975
520
  * Permanently deletes the product. Supply the unique id that was returned when you created the product and this will delete it.
1976
521
  * @summary Delete the product
@@ -1982,29 +527,6 @@ var ProductsApiFactory = function (configuration, basePath, axios) {
1982
527
  deleteProduct: function (id, authorization, options) {
1983
528
  return localVarFp.deleteProduct(id, authorization, options).then(function (request) { return request(axios, basePath); });
1984
529
  },
1985
- /**
1986
- * Permanently deletes the product. Supply the unique id that was returned when you created the product and this will delete it.
1987
- * @summary Delete the product
1988
- * @param {string} id
1989
- * @param {string} [authorization] Bearer Token
1990
- * @param {*} [options] Override http request option.
1991
- * @throws {RequiredError}
1992
- */
1993
- deleteProductField: function (id, authorization, options) {
1994
- return localVarFp.deleteProductField(id, authorization, options).then(function (request) { return request(axios, basePath); });
1995
- },
1996
- /**
1997
- * Retrieves the details of the premium formula that was previously created. Supply the unique premium formula id that was returned when you created it and Emil Api will return the corresponding premium formula information.
1998
- * @summary Retrieve the premium formula
1999
- * @param {string} id
2000
- * @param {number} id2 Product formula id
2001
- * @param {string} [authorization] Bearer Token
2002
- * @param {*} [options] Override http request option.
2003
- * @throws {RequiredError}
2004
- */
2005
- getPremiumFormula: function (id, id2, authorization, options) {
2006
- return localVarFp.getPremiumFormula(id, id2, authorization, options).then(function (request) { return request(axios, basePath); });
2007
- },
2008
530
  /**
2009
531
  * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
2010
532
  * @summary Retrieve the product
@@ -2018,160 +540,22 @@ var ProductsApiFactory = function (configuration, basePath, axios) {
2018
540
  getProductByCode: function (code, id, authorization, expand, options) {
2019
541
  return localVarFp.getProductByCode(code, id, authorization, expand, options).then(function (request) { return request(axios, basePath); });
2020
542
  },
2021
- /**
2022
- * Retrieves the details of the product factor that was previously created. Supply the unique product factor id that was returned when you created it and Emil Api will return the corresponding product factor information.
2023
- * @summary Retrieve the product factor
2024
- * @param {number} id
2025
- * @param {number} id2 Product factor id
2026
- * @param {string} [authorization] Bearer Token
2027
- * @param {string} [expand] Fields to expand response by
2028
- * @param {*} [options] Override http request option.
2029
- * @throws {RequiredError}
2030
- */
2031
- getProductFactor: function (id, id2, authorization, expand, options) {
2032
- return localVarFp.getProductFactor(id, id2, authorization, expand, options).then(function (request) { return request(axios, basePath); });
2033
- },
2034
- /**
2035
- * Get the value corresponding to a specific product factor.
2036
- * @summary Get product factor value
2037
- * @param {number} productVersionId Product Version Id
2038
- * @param {string} label Product factor label
2039
- * @param {string} key Key for the product factor value
2040
- * @param {string} name Name for the product factor value
2041
- * @param {string} [authorization] Bearer Token
2042
- * @param {*} [options] Override http request option.
2043
- * @throws {RequiredError}
2044
- */
2045
- getProductFactorValue: function (productVersionId, label, key, name, authorization, options) {
2046
- return localVarFp.getProductFactorValue(productVersionId, label, key, name, authorization, options).then(function (request) { return request(axios, basePath); });
2047
- },
2048
- /**
2049
- * Retrieves the details of the product field that was previously created. Supply the unique product field id that was returned when you created it and Emil Api will return the corresponding product field information.
2050
- * @summary Retrieve the product field
2051
- * @param {string} id
2052
- * @param {string} [authorization] Bearer Token
2053
- * @param {*} [options] Override http request option.
2054
- * @throws {RequiredError}
2055
- */
2056
- getProductField: function (id, authorization, options) {
2057
- return localVarFp.getProductField(id, authorization, options).then(function (request) { return request(axios, basePath); });
2058
- },
2059
- /**
2060
- * Retrieves the details of the product version that was previously created. Supply the unique product version id that was returned when you created it and Emil Api will return the corresponding product version information.
2061
- * @summary Retrieve the product version
2062
- * @param {string} id
2063
- * @param {number} id2 Product version id
2064
- * @param {string} [authorization] Bearer Token
2065
- * @param {*} [options] Override http request option.
2066
- * @throws {RequiredError}
2067
- */
2068
- getProductVersion: function (id, id2, authorization, options) {
2069
- return localVarFp.getProductVersion(id, id2, authorization, options).then(function (request) { return request(axios, basePath); });
2070
- },
2071
- /**
2072
- * Returns a list of premium formulas you have previously created. The premium formulas are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
2073
- * @summary List premium formulas
2074
- * @param {string} [authorization] Bearer Token
2075
- * @param {number} [pageSize] Page size
2076
- * @param {string} [pageToken] Page token
2077
- * @param {string} [filter] List filter
2078
- * @param {string} [search] Search query
2079
- * @param {string} [order] Ordering criteria
2080
- * @param {string} [expand] Extra fields to fetch
2081
- * @param {*} [options] Override http request option.
2082
- * @throws {RequiredError}
2083
- */
2084
- listPremiumFormulas: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
2085
- return localVarFp.listPremiumFormulas(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
2086
- },
2087
- /**
2088
- * Returns a list of product factors you have previously created. The product factors are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
2089
- * @summary List product factors
2090
- * @param {string} [authorization] Bearer Token
2091
- * @param {number} [pageSize] Page size
2092
- * @param {string} [pageToken] Page token
2093
- * @param {string} [filter] List filter
2094
- * @param {string} [search] Search query
2095
- * @param {string} [order] Ordering criteria
2096
- * @param {string} [expand] Extra fields to fetch
2097
- * @param {*} [options] Override http request option.
2098
- * @throws {RequiredError}
2099
- */
2100
- listProductFactors: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
2101
- return localVarFp.listProductFactors(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
2102
- },
2103
- /**
2104
- * Returns a list of product field types you have previously created. The product field types are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
2105
- * @summary List product field types
2106
- * @param {string} [authorization] Bearer Token
2107
- * @param {number} [pageSize] Page size
2108
- * @param {string} [pageToken] Page token
2109
- * @param {string} [filter] List filter
2110
- * @param {string} [search] Search query
2111
- * @param {string} [order] Ordering criteria
2112
- * @param {string} [expand] Extra fields to fetch
2113
- * @param {*} [options] Override http request option.
2114
- * @throws {RequiredError}
2115
- */
2116
- listProductFieldTypes: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
2117
- return localVarFp.listProductFieldTypes(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
2118
- },
2119
- /**
2120
- * Returns a list of product fields you have previously created. The product fields are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
2121
- * @summary List product fields
2122
- * @param {string} [authorization] Bearer Token
2123
- * @param {number} [pageSize] Page size
2124
- * @param {string} [pageToken] Page token
2125
- * @param {string} [filter] List filter
2126
- * @param {string} [search] Search query
2127
- * @param {string} [order] Ordering criteria
2128
- * @param {string} [expand] Extra fields to fetch
2129
- * @param {*} [options] Override http request option.
2130
- * @throws {RequiredError}
2131
- */
2132
- listProductFields: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
2133
- return localVarFp.listProductFields(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
2134
- },
2135
543
  /**
2136
544
  * Returns a list of products you have previously created. The products are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
2137
545
  * @summary List products
2138
546
  * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
2139
- * @param {number} [pageSize] Page size
2140
- * @param {string} [pageToken] Page token
547
+ * @param {number} [pageSize] Page size.
548
+ * @param {string} [pageToken] Page token.
2141
549
  * @param {string} [filter] List filter
2142
- * @param {string} [search] Search query
2143
- * @param {string} [order] Ordering criteria
2144
- * @param {string} [expand] Extra fields to fetch
550
+ * @param {string} [search] Search query.
551
+ * @param {string} [order] Ordering criteria.
552
+ * @param {string} [expand] Extra fields to fetch.
2145
553
  * @param {*} [options] Override http request option.
2146
554
  * @throws {RequiredError}
2147
555
  */
2148
556
  listProducts: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
2149
557
  return localVarFp.listProducts(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
2150
558
  },
2151
- /**
2152
- * Upload a CSV file containing product factors necessary for a product. The columns must be in the following order: group,label,key,name,value. It is advised to validate the file first.
2153
- * @summary Upload product factors
2154
- * @param {string} [authorization] Bearer Token
2155
- * @param {number} [productVersionId]
2156
- * @param {any} [factors]
2157
- * @param {*} [options] Override http request option.
2158
- * @throws {RequiredError}
2159
- */
2160
- storeProductFactors: function (authorization, productVersionId, factors, options) {
2161
- return localVarFp.storeProductFactors(authorization, productVersionId, factors, options).then(function (request) { return request(axios, basePath); });
2162
- },
2163
- /**
2164
- * Updates the specified premium formula by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
2165
- * @summary Update the premium formula
2166
- * @param {number} id
2167
- * @param {UpdatePremiumFormulaRequestDto} updatePremiumFormulaRequestDto
2168
- * @param {string} [authorization] Bearer Token
2169
- * @param {*} [options] Override http request option.
2170
- * @throws {RequiredError}
2171
- */
2172
- updatePremiumFormula: function (id, updatePremiumFormulaRequestDto, authorization, options) {
2173
- return localVarFp.updatePremiumFormula(id, updatePremiumFormulaRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
2174
- },
2175
559
  /**
2176
560
  * Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
2177
561
  * @summary Update the product
@@ -2184,41 +568,6 @@ var ProductsApiFactory = function (configuration, basePath, axios) {
2184
568
  updateProduct: function (id, updateProductRequestDto, authorization, options) {
2185
569
  return localVarFp.updateProduct(id, updateProductRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
2186
570
  },
2187
- /**
2188
- * Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
2189
- * @summary Update the product
2190
- * @param {string} id
2191
- * @param {UpdateProductFieldRequestDto} updateProductFieldRequestDto
2192
- * @param {string} [authorization] Bearer Token
2193
- * @param {*} [options] Override http request option.
2194
- * @throws {RequiredError}
2195
- */
2196
- updateProductField: function (id, updateProductFieldRequestDto, authorization, options) {
2197
- return localVarFp.updateProductField(id, updateProductFieldRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
2198
- },
2199
- /**
2200
- * Updates the specified product version by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
2201
- * @summary Update the product version
2202
- * @param {number} id
2203
- * @param {UpdateProductVersionRequestDto} updateProductVersionRequestDto
2204
- * @param {string} [authorization] Bearer Token
2205
- * @param {*} [options] Override http request option.
2206
- * @throws {RequiredError}
2207
- */
2208
- updateProductVersion: function (id, updateProductVersionRequestDto, authorization, options) {
2209
- return localVarFp.updateProductVersion(id, updateProductVersionRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
2210
- },
2211
- /**
2212
- * Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
2213
- * @summary Validate product factors
2214
- * @param {string} [authorization] Bearer Token
2215
- * @param {any} [factors]
2216
- * @param {*} [options] Override http request option.
2217
- * @throws {RequiredError}
2218
- */
2219
- validateProductFactors: function (authorization, factors, options) {
2220
- return localVarFp.validateProductFactors(authorization, factors, options).then(function (request) { return request(axios, basePath); });
2221
- },
2222
571
  };
2223
572
  };
2224
573
  exports.ProductsApiFactory = ProductsApiFactory;
@@ -2233,18 +582,6 @@ var ProductsApi = /** @class */ (function (_super) {
2233
582
  function ProductsApi() {
2234
583
  return _super !== null && _super.apply(this, arguments) || this;
2235
584
  }
2236
- /**
2237
- * Creates a premium formula.
2238
- * @summary Create the premium formula
2239
- * @param {ProductsApiCreatePremiumFormulaRequest} requestParameters Request parameters.
2240
- * @param {*} [options] Override http request option.
2241
- * @throws {RequiredError}
2242
- * @memberof ProductsApi
2243
- */
2244
- ProductsApi.prototype.createPremiumFormula = function (requestParameters, options) {
2245
- var _this = this;
2246
- return (0, exports.ProductsApiFp)(this.configuration).createPremiumFormula(requestParameters.createPremiumFormulaRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2247
- };
2248
585
  /**
2249
586
  * Create a blank product. The product cannot be used as long as it is missing product factors, insured objects and premium formulas.
2250
587
  * @summary Create the product
@@ -2257,30 +594,6 @@ var ProductsApi = /** @class */ (function (_super) {
2257
594
  var _this = this;
2258
595
  return (0, exports.ProductsApiFp)(this.configuration).createProduct(requestParameters.createProductRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2259
596
  };
2260
- /**
2261
- * Create a product field in the database.
2262
- * @summary Create the product field
2263
- * @param {ProductsApiCreateProductFieldRequest} requestParameters Request parameters.
2264
- * @param {*} [options] Override http request option.
2265
- * @throws {RequiredError}
2266
- * @memberof ProductsApi
2267
- */
2268
- ProductsApi.prototype.createProductField = function (requestParameters, options) {
2269
- var _this = this;
2270
- return (0, exports.ProductsApiFp)(this.configuration).createProductField(requestParameters.createProductFieldRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2271
- };
2272
- /**
2273
- * Permanently deletes the premium formula. Supply the unique id that was returned when you created the premium formula and this will delete it.
2274
- * @summary Delete the premium formula
2275
- * @param {ProductsApiDeletePremiumFormulaRequest} requestParameters Request parameters.
2276
- * @param {*} [options] Override http request option.
2277
- * @throws {RequiredError}
2278
- * @memberof ProductsApi
2279
- */
2280
- ProductsApi.prototype.deletePremiumFormula = function (requestParameters, options) {
2281
- var _this = this;
2282
- return (0, exports.ProductsApiFp)(this.configuration).deletePremiumFormula(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2283
- };
2284
597
  /**
2285
598
  * Permanently deletes the product. Supply the unique id that was returned when you created the product and this will delete it.
2286
599
  * @summary Delete the product
@@ -2293,30 +606,6 @@ var ProductsApi = /** @class */ (function (_super) {
2293
606
  var _this = this;
2294
607
  return (0, exports.ProductsApiFp)(this.configuration).deleteProduct(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2295
608
  };
2296
- /**
2297
- * Permanently deletes the product. Supply the unique id that was returned when you created the product and this will delete it.
2298
- * @summary Delete the product
2299
- * @param {ProductsApiDeleteProductFieldRequest} requestParameters Request parameters.
2300
- * @param {*} [options] Override http request option.
2301
- * @throws {RequiredError}
2302
- * @memberof ProductsApi
2303
- */
2304
- ProductsApi.prototype.deleteProductField = function (requestParameters, options) {
2305
- var _this = this;
2306
- return (0, exports.ProductsApiFp)(this.configuration).deleteProductField(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2307
- };
2308
- /**
2309
- * Retrieves the details of the premium formula that was previously created. Supply the unique premium formula id that was returned when you created it and Emil Api will return the corresponding premium formula information.
2310
- * @summary Retrieve the premium formula
2311
- * @param {ProductsApiGetPremiumFormulaRequest} requestParameters Request parameters.
2312
- * @param {*} [options] Override http request option.
2313
- * @throws {RequiredError}
2314
- * @memberof ProductsApi
2315
- */
2316
- ProductsApi.prototype.getPremiumFormula = function (requestParameters, options) {
2317
- var _this = this;
2318
- return (0, exports.ProductsApiFp)(this.configuration).getPremiumFormula(requestParameters.id, requestParameters.id2, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2319
- };
2320
609
  /**
2321
610
  * Retrieves the details of the product that was previously created. Supply the unique product code that was returned when you created it and Emil Api will return the corresponding product information.
2322
611
  * @summary Retrieve the product
@@ -2329,106 +618,6 @@ var ProductsApi = /** @class */ (function (_super) {
2329
618
  var _this = this;
2330
619
  return (0, exports.ProductsApiFp)(this.configuration).getProductByCode(requestParameters.code, requestParameters.id, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
2331
620
  };
2332
- /**
2333
- * Retrieves the details of the product factor that was previously created. Supply the unique product factor id that was returned when you created it and Emil Api will return the corresponding product factor information.
2334
- * @summary Retrieve the product factor
2335
- * @param {ProductsApiGetProductFactorRequest} requestParameters Request parameters.
2336
- * @param {*} [options] Override http request option.
2337
- * @throws {RequiredError}
2338
- * @memberof ProductsApi
2339
- */
2340
- ProductsApi.prototype.getProductFactor = function (requestParameters, options) {
2341
- var _this = this;
2342
- return (0, exports.ProductsApiFp)(this.configuration).getProductFactor(requestParameters.id, requestParameters.id2, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
2343
- };
2344
- /**
2345
- * Get the value corresponding to a specific product factor.
2346
- * @summary Get product factor value
2347
- * @param {ProductsApiGetProductFactorValueRequest} requestParameters Request parameters.
2348
- * @param {*} [options] Override http request option.
2349
- * @throws {RequiredError}
2350
- * @memberof ProductsApi
2351
- */
2352
- ProductsApi.prototype.getProductFactorValue = function (requestParameters, options) {
2353
- var _this = this;
2354
- return (0, exports.ProductsApiFp)(this.configuration).getProductFactorValue(requestParameters.productVersionId, requestParameters.label, requestParameters.key, requestParameters.name, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2355
- };
2356
- /**
2357
- * Retrieves the details of the product field that was previously created. Supply the unique product field id that was returned when you created it and Emil Api will return the corresponding product field information.
2358
- * @summary Retrieve the product field
2359
- * @param {ProductsApiGetProductFieldRequest} requestParameters Request parameters.
2360
- * @param {*} [options] Override http request option.
2361
- * @throws {RequiredError}
2362
- * @memberof ProductsApi
2363
- */
2364
- ProductsApi.prototype.getProductField = function (requestParameters, options) {
2365
- var _this = this;
2366
- return (0, exports.ProductsApiFp)(this.configuration).getProductField(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2367
- };
2368
- /**
2369
- * Retrieves the details of the product version that was previously created. Supply the unique product version id that was returned when you created it and Emil Api will return the corresponding product version information.
2370
- * @summary Retrieve the product version
2371
- * @param {ProductsApiGetProductVersionRequest} requestParameters Request parameters.
2372
- * @param {*} [options] Override http request option.
2373
- * @throws {RequiredError}
2374
- * @memberof ProductsApi
2375
- */
2376
- ProductsApi.prototype.getProductVersion = function (requestParameters, options) {
2377
- var _this = this;
2378
- return (0, exports.ProductsApiFp)(this.configuration).getProductVersion(requestParameters.id, requestParameters.id2, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2379
- };
2380
- /**
2381
- * Returns a list of premium formulas you have previously created. The premium formulas are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
2382
- * @summary List premium formulas
2383
- * @param {ProductsApiListPremiumFormulasRequest} requestParameters Request parameters.
2384
- * @param {*} [options] Override http request option.
2385
- * @throws {RequiredError}
2386
- * @memberof ProductsApi
2387
- */
2388
- ProductsApi.prototype.listPremiumFormulas = function (requestParameters, options) {
2389
- var _this = this;
2390
- if (requestParameters === void 0) { requestParameters = {}; }
2391
- return (0, exports.ProductsApiFp)(this.configuration).listPremiumFormulas(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
2392
- };
2393
- /**
2394
- * Returns a list of product factors you have previously created. The product factors are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
2395
- * @summary List product factors
2396
- * @param {ProductsApiListProductFactorsRequest} requestParameters Request parameters.
2397
- * @param {*} [options] Override http request option.
2398
- * @throws {RequiredError}
2399
- * @memberof ProductsApi
2400
- */
2401
- ProductsApi.prototype.listProductFactors = function (requestParameters, options) {
2402
- var _this = this;
2403
- if (requestParameters === void 0) { requestParameters = {}; }
2404
- return (0, exports.ProductsApiFp)(this.configuration).listProductFactors(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
2405
- };
2406
- /**
2407
- * Returns a list of product field types you have previously created. The product field types are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
2408
- * @summary List product field types
2409
- * @param {ProductsApiListProductFieldTypesRequest} requestParameters Request parameters.
2410
- * @param {*} [options] Override http request option.
2411
- * @throws {RequiredError}
2412
- * @memberof ProductsApi
2413
- */
2414
- ProductsApi.prototype.listProductFieldTypes = function (requestParameters, options) {
2415
- var _this = this;
2416
- if (requestParameters === void 0) { requestParameters = {}; }
2417
- return (0, exports.ProductsApiFp)(this.configuration).listProductFieldTypes(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
2418
- };
2419
- /**
2420
- * Returns a list of product fields you have previously created. The product fields are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
2421
- * @summary List product fields
2422
- * @param {ProductsApiListProductFieldsRequest} requestParameters Request parameters.
2423
- * @param {*} [options] Override http request option.
2424
- * @throws {RequiredError}
2425
- * @memberof ProductsApi
2426
- */
2427
- ProductsApi.prototype.listProductFields = function (requestParameters, options) {
2428
- var _this = this;
2429
- if (requestParameters === void 0) { requestParameters = {}; }
2430
- return (0, exports.ProductsApiFp)(this.configuration).listProductFields(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
2431
- };
2432
621
  /**
2433
622
  * Returns a list of products you have previously created. The products are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
2434
623
  * @summary List products
@@ -2442,31 +631,6 @@ var ProductsApi = /** @class */ (function (_super) {
2442
631
  if (requestParameters === void 0) { requestParameters = {}; }
2443
632
  return (0, exports.ProductsApiFp)(this.configuration).listProducts(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
2444
633
  };
2445
- /**
2446
- * Upload a CSV file containing product factors necessary for a product. The columns must be in the following order: group,label,key,name,value. It is advised to validate the file first.
2447
- * @summary Upload product factors
2448
- * @param {ProductsApiStoreProductFactorsRequest} requestParameters Request parameters.
2449
- * @param {*} [options] Override http request option.
2450
- * @throws {RequiredError}
2451
- * @memberof ProductsApi
2452
- */
2453
- ProductsApi.prototype.storeProductFactors = function (requestParameters, options) {
2454
- var _this = this;
2455
- if (requestParameters === void 0) { requestParameters = {}; }
2456
- return (0, exports.ProductsApiFp)(this.configuration).storeProductFactors(requestParameters.authorization, requestParameters.productVersionId, requestParameters.factors, options).then(function (request) { return request(_this.axios, _this.basePath); });
2457
- };
2458
- /**
2459
- * Updates the specified premium formula by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
2460
- * @summary Update the premium formula
2461
- * @param {ProductsApiUpdatePremiumFormulaRequest} requestParameters Request parameters.
2462
- * @param {*} [options] Override http request option.
2463
- * @throws {RequiredError}
2464
- * @memberof ProductsApi
2465
- */
2466
- ProductsApi.prototype.updatePremiumFormula = function (requestParameters, options) {
2467
- var _this = this;
2468
- return (0, exports.ProductsApiFp)(this.configuration).updatePremiumFormula(requestParameters.id, requestParameters.updatePremiumFormulaRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2469
- };
2470
634
  /**
2471
635
  * Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
2472
636
  * @summary Update the product
@@ -2479,43 +643,6 @@ var ProductsApi = /** @class */ (function (_super) {
2479
643
  var _this = this;
2480
644
  return (0, exports.ProductsApiFp)(this.configuration).updateProduct(requestParameters.id, requestParameters.updateProductRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2481
645
  };
2482
- /**
2483
- * Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
2484
- * @summary Update the product
2485
- * @param {ProductsApiUpdateProductFieldRequest} requestParameters Request parameters.
2486
- * @param {*} [options] Override http request option.
2487
- * @throws {RequiredError}
2488
- * @memberof ProductsApi
2489
- */
2490
- ProductsApi.prototype.updateProductField = function (requestParameters, options) {
2491
- var _this = this;
2492
- return (0, exports.ProductsApiFp)(this.configuration).updateProductField(requestParameters.id, requestParameters.updateProductFieldRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2493
- };
2494
- /**
2495
- * Updates the specified product version by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
2496
- * @summary Update the product version
2497
- * @param {ProductsApiUpdateProductVersionRequest} requestParameters Request parameters.
2498
- * @param {*} [options] Override http request option.
2499
- * @throws {RequiredError}
2500
- * @memberof ProductsApi
2501
- */
2502
- ProductsApi.prototype.updateProductVersion = function (requestParameters, options) {
2503
- var _this = this;
2504
- return (0, exports.ProductsApiFp)(this.configuration).updateProductVersion(requestParameters.id, requestParameters.updateProductVersionRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2505
- };
2506
- /**
2507
- * Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
2508
- * @summary Validate product factors
2509
- * @param {ProductsApiValidateProductFactorsRequest} requestParameters Request parameters.
2510
- * @param {*} [options] Override http request option.
2511
- * @throws {RequiredError}
2512
- * @memberof ProductsApi
2513
- */
2514
- ProductsApi.prototype.validateProductFactors = function (requestParameters, options) {
2515
- var _this = this;
2516
- if (requestParameters === void 0) { requestParameters = {}; }
2517
- return (0, exports.ProductsApiFp)(this.configuration).validateProductFactors(requestParameters.authorization, requestParameters.factors, options).then(function (request) { return request(_this.axios, _this.basePath); });
2518
- };
2519
646
  return ProductsApi;
2520
647
  }(base_1.BaseAPI));
2521
648
  exports.ProductsApi = ProductsApi;