@emilgroup/insurance-sdk-node 1.0.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 (277) hide show
  1. package/.openapi-generator/FILES +97 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +51 -0
  5. package/api/insured-object-types-api.ts +236 -0
  6. package/api/insured-objects-api.ts +446 -0
  7. package/api/leads-api.ts +402 -0
  8. package/api/policies-api.ts +580 -0
  9. package/api/products-api.ts +3027 -0
  10. package/api.ts +44 -0
  11. package/base.ts +189 -0
  12. package/common.ts +138 -0
  13. package/configuration.ts +109 -0
  14. package/dist/api/insured-object-types-api.d.ts +141 -0
  15. package/dist/api/insured-object-types-api.js +258 -0
  16. package/dist/api/insured-objects-api.d.ts +254 -0
  17. package/dist/api/insured-objects-api.js +443 -0
  18. package/dist/api/leads-api.d.ts +225 -0
  19. package/dist/api/leads-api.js +427 -0
  20. package/dist/api/policies-api.d.ts +329 -0
  21. package/dist/api/policies-api.js +548 -0
  22. package/dist/api/products-api.d.ts +1683 -0
  23. package/dist/api/products-api.js +2521 -0
  24. package/dist/api.d.ts +20 -0
  25. package/dist/api.js +40 -0
  26. package/dist/base.d.ts +69 -0
  27. package/dist/base.js +252 -0
  28. package/dist/common.d.ts +66 -0
  29. package/dist/common.js +244 -0
  30. package/dist/configuration.d.ts +90 -0
  31. package/dist/configuration.js +44 -0
  32. package/dist/index.d.ts +15 -0
  33. package/dist/index.js +35 -0
  34. package/dist/models/calculate-custom-premium-request-dto.d.ts +34 -0
  35. package/dist/models/calculate-custom-premium-request-dto.js +19 -0
  36. package/dist/models/calculate-premium-request-dto.d.ts +31 -0
  37. package/dist/models/calculate-premium-request-dto.js +15 -0
  38. package/dist/models/create-account-request-dto.d.ts +84 -0
  39. package/dist/models/create-account-request-dto.js +15 -0
  40. package/dist/models/create-bank-account-request-dto.d.ts +30 -0
  41. package/dist/models/create-bank-account-request-dto.js +15 -0
  42. package/dist/models/create-claim-request-dto.d.ts +83 -0
  43. package/dist/models/create-claim-request-dto.js +25 -0
  44. package/dist/models/create-custom-application-request-dto.d.ts +40 -0
  45. package/dist/models/create-custom-application-request-dto.js +19 -0
  46. package/dist/models/create-dummy-policy-request-dto.d.ts +31 -0
  47. package/dist/models/create-dummy-policy-request-dto.js +15 -0
  48. package/dist/models/create-insured-object-request-dto.d.ts +42 -0
  49. package/dist/models/create-insured-object-request-dto.js +15 -0
  50. package/dist/models/create-insured-object-response-class.d.ts +25 -0
  51. package/dist/models/create-insured-object-response-class.js +15 -0
  52. package/dist/models/create-lead-request-dto.d.ts +71 -0
  53. package/dist/models/create-lead-request-dto.js +22 -0
  54. package/dist/models/create-policy-request-dto.d.ts +37 -0
  55. package/dist/models/create-policy-request-dto.js +15 -0
  56. package/dist/models/create-policy-response-class.d.ts +25 -0
  57. package/dist/models/create-policy-response-class.js +15 -0
  58. package/dist/models/create-premium-formula-request-dto.d.ts +65 -0
  59. package/dist/models/create-premium-formula-request-dto.js +25 -0
  60. package/dist/models/create-premium-formula-response-class.d.ts +25 -0
  61. package/dist/models/create-premium-formula-response-class.js +15 -0
  62. package/dist/models/create-product-field-request-dto.d.ts +113 -0
  63. package/dist/models/create-product-field-request-dto.js +20 -0
  64. package/dist/models/create-product-field-response-class.d.ts +25 -0
  65. package/dist/models/create-product-field-response-class.js +15 -0
  66. package/dist/models/create-product-request-dto.d.ts +57 -0
  67. package/dist/models/create-product-request-dto.js +30 -0
  68. package/dist/models/create-product-response-class.d.ts +25 -0
  69. package/dist/models/create-product-response-class.js +15 -0
  70. package/dist/models/csv-product-factor-dto.d.ts +48 -0
  71. package/dist/models/csv-product-factor-dto.js +15 -0
  72. package/dist/models/delete-request-dto.d.ts +24 -0
  73. package/dist/models/delete-request-dto.js +15 -0
  74. package/dist/models/get-insured-object-request-dto.d.ts +24 -0
  75. package/dist/models/get-insured-object-request-dto.js +15 -0
  76. package/dist/models/get-insured-object-response-class.d.ts +25 -0
  77. package/dist/models/get-insured-object-response-class.js +15 -0
  78. package/dist/models/get-policy-request-dto.d.ts +30 -0
  79. package/dist/models/get-policy-request-dto.js +15 -0
  80. package/dist/models/get-policy-response-class.d.ts +25 -0
  81. package/dist/models/get-policy-response-class.js +15 -0
  82. package/dist/models/get-premium-formula-request-dto.d.ts +24 -0
  83. package/dist/models/get-premium-formula-request-dto.js +15 -0
  84. package/dist/models/get-premium-formula-response-class.d.ts +25 -0
  85. package/dist/models/get-premium-formula-response-class.js +15 -0
  86. package/dist/models/get-product-factor-response-class.d.ts +32 -0
  87. package/dist/models/get-product-factor-response-class.js +15 -0
  88. package/dist/models/get-product-factor-value-request-dto.d.ts +42 -0
  89. package/dist/models/get-product-factor-value-request-dto.js +15 -0
  90. package/dist/models/get-product-factor-value-response-class.d.ts +25 -0
  91. package/dist/models/get-product-factor-value-response-class.js +15 -0
  92. package/dist/models/get-product-field-request-dto.d.ts +24 -0
  93. package/dist/models/get-product-field-request-dto.js +15 -0
  94. package/dist/models/get-product-field-response-class.d.ts +25 -0
  95. package/dist/models/get-product-field-response-class.js +15 -0
  96. package/dist/models/get-product-request-dto.d.ts +36 -0
  97. package/dist/models/get-product-request-dto.js +15 -0
  98. package/dist/models/get-product-response-class.d.ts +25 -0
  99. package/dist/models/get-product-response-class.js +15 -0
  100. package/dist/models/get-product-version-request-dto.d.ts +24 -0
  101. package/dist/models/get-product-version-request-dto.js +15 -0
  102. package/dist/models/get-product-version-response-class.d.ts +25 -0
  103. package/dist/models/get-product-version-response-class.js +15 -0
  104. package/dist/models/grouped-product-factor-class.d.ts +37 -0
  105. package/dist/models/grouped-product-factor-class.js +15 -0
  106. package/dist/models/grouped-product-factor-value-class.d.ts +36 -0
  107. package/dist/models/grouped-product-factor-value-class.js +15 -0
  108. package/dist/models/grouped-product-factors-response-class.d.ts +25 -0
  109. package/dist/models/grouped-product-factors-response-class.js +15 -0
  110. package/dist/models/grpc-create-policy-request-dto.d.ts +37 -0
  111. package/dist/models/grpc-create-policy-request-dto.js +15 -0
  112. package/dist/models/index.d.ts +79 -0
  113. package/dist/models/index.js +95 -0
  114. package/dist/models/insured-object-class.d.ts +67 -0
  115. package/dist/models/insured-object-class.js +15 -0
  116. package/dist/models/insured-object-type-class.d.ts +48 -0
  117. package/dist/models/insured-object-type-class.js +15 -0
  118. package/dist/models/list-insured-object-types-response-class.d.ts +31 -0
  119. package/dist/models/list-insured-object-types-response-class.js +15 -0
  120. package/dist/models/list-insured-objects-response-class.d.ts +30 -0
  121. package/dist/models/list-insured-objects-response-class.js +15 -0
  122. package/dist/models/list-policies-response-class.d.ts +31 -0
  123. package/dist/models/list-policies-response-class.js +15 -0
  124. package/dist/models/list-premium-formulas-response-class.d.ts +31 -0
  125. package/dist/models/list-premium-formulas-response-class.js +15 -0
  126. package/dist/models/list-product-factors-response-class.d.ts +31 -0
  127. package/dist/models/list-product-factors-response-class.js +15 -0
  128. package/dist/models/list-product-field-types-response-class.d.ts +30 -0
  129. package/dist/models/list-product-field-types-response-class.js +15 -0
  130. package/dist/models/list-product-fields-response-class.d.ts +31 -0
  131. package/dist/models/list-product-fields-response-class.js +15 -0
  132. package/dist/models/list-products-response-class.d.ts +31 -0
  133. package/dist/models/list-products-response-class.js +15 -0
  134. package/dist/models/list-request-dto.d.ts +54 -0
  135. package/dist/models/list-request-dto.js +15 -0
  136. package/dist/models/policy-class.d.ts +86 -0
  137. package/dist/models/policy-class.js +15 -0
  138. package/dist/models/policy-object-class.d.ts +42 -0
  139. package/dist/models/policy-object-class.js +15 -0
  140. package/dist/models/policy-object-dto.d.ts +30 -0
  141. package/dist/models/policy-object-dto.js +15 -0
  142. package/dist/models/policy-premium-class.d.ts +43 -0
  143. package/dist/models/policy-premium-class.js +15 -0
  144. package/dist/models/policy-premium-item-class.d.ts +49 -0
  145. package/dist/models/policy-premium-item-class.js +15 -0
  146. package/dist/models/policy-version-class.d.ts +55 -0
  147. package/dist/models/policy-version-class.js +15 -0
  148. package/dist/models/premium-formula-class.d.ts +79 -0
  149. package/dist/models/premium-formula-class.js +15 -0
  150. package/dist/models/product-class.d.ts +74 -0
  151. package/dist/models/product-class.js +15 -0
  152. package/dist/models/product-factor-class.d.ts +68 -0
  153. package/dist/models/product-factor-class.js +15 -0
  154. package/dist/models/product-factor-value-class.d.ts +80 -0
  155. package/dist/models/product-factor-value-class.js +15 -0
  156. package/dist/models/product-field-class.d.ts +114 -0
  157. package/dist/models/product-field-class.js +15 -0
  158. package/dist/models/product-version-class.d.ts +54 -0
  159. package/dist/models/product-version-class.js +15 -0
  160. package/dist/models/store-product-factors-request-dto.d.ts +31 -0
  161. package/dist/models/store-product-factors-request-dto.js +15 -0
  162. package/dist/models/store-product-factors-response-class.d.ts +25 -0
  163. package/dist/models/store-product-factors-response-class.js +15 -0
  164. package/dist/models/timeslice-class.d.ts +62 -0
  165. package/dist/models/timeslice-class.js +15 -0
  166. package/dist/models/update-insured-object-request-dto.d.ts +48 -0
  167. package/dist/models/update-insured-object-request-dto.js +15 -0
  168. package/dist/models/update-lead-request-dto.d.ts +71 -0
  169. package/dist/models/update-lead-request-dto.js +22 -0
  170. package/dist/models/update-policy-request-dto.d.ts +43 -0
  171. package/dist/models/update-policy-request-dto.js +15 -0
  172. package/dist/models/update-policy-response-class.d.ts +25 -0
  173. package/dist/models/update-policy-response-class.js +15 -0
  174. package/dist/models/update-premium-formula-request-dto.d.ts +71 -0
  175. package/dist/models/update-premium-formula-request-dto.js +25 -0
  176. package/dist/models/update-premium-formula-response-class.d.ts +25 -0
  177. package/dist/models/update-premium-formula-response-class.js +15 -0
  178. package/dist/models/update-product-field-request-dto.d.ts +119 -0
  179. package/dist/models/update-product-field-request-dto.js +20 -0
  180. package/dist/models/update-product-field-response-class.d.ts +25 -0
  181. package/dist/models/update-product-field-response-class.js +15 -0
  182. package/dist/models/update-product-request-dto.d.ts +42 -0
  183. package/dist/models/update-product-request-dto.js +15 -0
  184. package/dist/models/update-product-response-class.d.ts +25 -0
  185. package/dist/models/update-product-response-class.js +15 -0
  186. package/dist/models/update-product-version-request-dto.d.ts +43 -0
  187. package/dist/models/update-product-version-request-dto.js +22 -0
  188. package/dist/models/update-product-version-response-class.d.ts +25 -0
  189. package/dist/models/update-product-version-response-class.js +15 -0
  190. package/dist/models/uploaded-document-dto.d.ts +24 -0
  191. package/dist/models/uploaded-document-dto.js +15 -0
  192. package/dist/models/validate-product-factors-request-dto.d.ts +31 -0
  193. package/dist/models/validate-product-factors-request-dto.js +15 -0
  194. package/git_push.sh +57 -0
  195. package/index.ts +19 -0
  196. package/models/calculate-custom-premium-request-dto.ts +43 -0
  197. package/models/calculate-premium-request-dto.ts +37 -0
  198. package/models/create-account-request-dto.ts +90 -0
  199. package/models/create-bank-account-request-dto.ts +36 -0
  200. package/models/create-claim-request-dto.ts +93 -0
  201. package/models/create-custom-application-request-dto.ts +49 -0
  202. package/models/create-dummy-policy-request-dto.ts +37 -0
  203. package/models/create-insured-object-request-dto.ts +48 -0
  204. package/models/create-insured-object-response-class.ts +31 -0
  205. package/models/create-lead-request-dto.ts +80 -0
  206. package/models/create-policy-request-dto.ts +43 -0
  207. package/models/create-policy-response-class.ts +31 -0
  208. package/models/create-premium-formula-request-dto.ts +75 -0
  209. package/models/create-premium-formula-response-class.ts +31 -0
  210. package/models/create-product-field-request-dto.ts +122 -0
  211. package/models/create-product-field-response-class.ts +31 -0
  212. package/models/create-product-request-dto.ts +66 -0
  213. package/models/create-product-response-class.ts +31 -0
  214. package/models/csv-product-factor-dto.ts +54 -0
  215. package/models/delete-request-dto.ts +30 -0
  216. package/models/get-insured-object-request-dto.ts +30 -0
  217. package/models/get-insured-object-response-class.ts +31 -0
  218. package/models/get-policy-request-dto.ts +36 -0
  219. package/models/get-policy-response-class.ts +31 -0
  220. package/models/get-premium-formula-request-dto.ts +30 -0
  221. package/models/get-premium-formula-response-class.ts +31 -0
  222. package/models/get-product-factor-response-class.ts +38 -0
  223. package/models/get-product-factor-value-request-dto.ts +48 -0
  224. package/models/get-product-factor-value-response-class.ts +31 -0
  225. package/models/get-product-field-request-dto.ts +30 -0
  226. package/models/get-product-field-response-class.ts +31 -0
  227. package/models/get-product-request-dto.ts +42 -0
  228. package/models/get-product-response-class.ts +31 -0
  229. package/models/get-product-version-request-dto.ts +30 -0
  230. package/models/get-product-version-response-class.ts +31 -0
  231. package/models/grouped-product-factor-class.ts +43 -0
  232. package/models/grouped-product-factor-value-class.ts +42 -0
  233. package/models/grouped-product-factors-response-class.ts +31 -0
  234. package/models/grpc-create-policy-request-dto.ts +43 -0
  235. package/models/index.ts +79 -0
  236. package/models/insured-object-class.ts +73 -0
  237. package/models/insured-object-type-class.ts +54 -0
  238. package/models/list-insured-object-types-response-class.ts +37 -0
  239. package/models/list-insured-objects-response-class.ts +36 -0
  240. package/models/list-policies-response-class.ts +37 -0
  241. package/models/list-premium-formulas-response-class.ts +37 -0
  242. package/models/list-product-factors-response-class.ts +37 -0
  243. package/models/list-product-field-types-response-class.ts +36 -0
  244. package/models/list-product-fields-response-class.ts +37 -0
  245. package/models/list-products-response-class.ts +37 -0
  246. package/models/list-request-dto.ts +60 -0
  247. package/models/policy-class.ts +92 -0
  248. package/models/policy-object-class.ts +48 -0
  249. package/models/policy-object-dto.ts +36 -0
  250. package/models/policy-premium-class.ts +49 -0
  251. package/models/policy-premium-item-class.ts +55 -0
  252. package/models/policy-version-class.ts +61 -0
  253. package/models/premium-formula-class.ts +85 -0
  254. package/models/product-class.ts +80 -0
  255. package/models/product-factor-class.ts +74 -0
  256. package/models/product-factor-value-class.ts +86 -0
  257. package/models/product-field-class.ts +120 -0
  258. package/models/product-version-class.ts +60 -0
  259. package/models/store-product-factors-request-dto.ts +37 -0
  260. package/models/store-product-factors-response-class.ts +31 -0
  261. package/models/timeslice-class.ts +68 -0
  262. package/models/update-insured-object-request-dto.ts +54 -0
  263. package/models/update-lead-request-dto.ts +80 -0
  264. package/models/update-policy-request-dto.ts +49 -0
  265. package/models/update-policy-response-class.ts +31 -0
  266. package/models/update-premium-formula-request-dto.ts +81 -0
  267. package/models/update-premium-formula-response-class.ts +31 -0
  268. package/models/update-product-field-request-dto.ts +128 -0
  269. package/models/update-product-field-response-class.ts +31 -0
  270. package/models/update-product-request-dto.ts +48 -0
  271. package/models/update-product-response-class.ts +31 -0
  272. package/models/update-product-version-request-dto.ts +52 -0
  273. package/models/update-product-version-response-class.ts +31 -0
  274. package/models/uploaded-document-dto.ts +30 -0
  275. package/models/validate-product-factors-request-dto.ts +37 -0
  276. package/package.json +29 -0
  277. package/tsconfig.json +22 -0
@@ -0,0 +1,2521 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * EMIL InsuranceService
6
+ * The EMIL InsuranceService API description
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __assign = (this && this.__assign) || function () {
31
+ __assign = Object.assign || function(t) {
32
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
33
+ s = arguments[i];
34
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
35
+ t[p] = s[p];
36
+ }
37
+ return t;
38
+ };
39
+ return __assign.apply(this, arguments);
40
+ };
41
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
42
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
43
+ return new (P || (P = Promise))(function (resolve, reject) {
44
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
45
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
46
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
47
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
48
+ });
49
+ };
50
+ var __generator = (this && this.__generator) || function (thisArg, body) {
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
+ function verb(n) { return function (v) { return step([n, v]); }; }
54
+ function step(op) {
55
+ if (f) throw new TypeError("Generator is already executing.");
56
+ while (_) try {
57
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
58
+ if (y = 0, t) op = [op[0] & 2, t.value];
59
+ switch (op[0]) {
60
+ case 0: case 1: t = op; break;
61
+ case 4: _.label++; return { value: op[1], done: false };
62
+ case 5: _.label++; y = op[1]; op = [0]; continue;
63
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
64
+ default:
65
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
66
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
67
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
68
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
69
+ if (t[2]) _.ops.pop();
70
+ _.trys.pop(); continue;
71
+ }
72
+ op = body.call(thisArg, _);
73
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
74
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
75
+ }
76
+ };
77
+ var __importDefault = (this && this.__importDefault) || function (mod) {
78
+ return (mod && mod.__esModule) ? mod : { "default": mod };
79
+ };
80
+ Object.defineProperty(exports, "__esModule", { value: true });
81
+ exports.ProductsApi = exports.ProductsApiFactory = exports.ProductsApiFp = exports.ProductsApiAxiosParamCreator = void 0;
82
+ var axios_1 = __importDefault(require("axios"));
83
+ // Some imports not used depending on template conditions
84
+ // @ts-ignore
85
+ var common_1 = require("../common");
86
+ // @ts-ignore
87
+ var base_1 = require("../base");
88
+ // URLSearchParams not necessarily used
89
+ // @ts-ignore
90
+ var url_1 = require("url");
91
+ var FormData = require('form-data');
92
+ /**
93
+ * ProductsApi - axios parameter creator
94
+ * @export
95
+ */
96
+ var ProductsApiAxiosParamCreator = function (configuration) {
97
+ var _this = this;
98
+ return {
99
+ /**
100
+ * Creates a premium formula.
101
+ * @summary Create the premium formula
102
+ * @param {CreatePremiumFormulaRequestDto} createPremiumFormulaRequestDto
103
+ * @param {string} [authorization] Bearer Token
104
+ * @param {*} [options] Override http request option.
105
+ * @throws {RequiredError}
106
+ */
107
+ createPremiumFormula: function (createPremiumFormulaRequestDto, authorization, options) {
108
+ if (options === void 0) { options = {}; }
109
+ return __awaiter(_this, void 0, void 0, function () {
110
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
111
+ return __generator(this, function (_a) {
112
+ switch (_a.label) {
113
+ case 0:
114
+ // verify required parameter 'createPremiumFormulaRequestDto' is not null or undefined
115
+ (0, common_1.assertParamExists)('createPremiumFormula', 'createPremiumFormulaRequestDto', createPremiumFormulaRequestDto);
116
+ localVarPath = "/insuranceservice/v1/premium-formulas";
117
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
118
+ if (configuration) {
119
+ baseOptions = configuration.baseOptions;
120
+ baseAccessToken = configuration.accessToken;
121
+ }
122
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
123
+ localVarHeaderParameter = {};
124
+ localVarQueryParameter = {};
125
+ // authentication bearer required
126
+ // http bearer authentication required
127
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
128
+ case 1:
129
+ // authentication bearer required
130
+ // http bearer authentication required
131
+ _a.sent();
132
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
133
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
134
+ }
135
+ localVarHeaderParameter['Content-Type'] = 'application/json';
136
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
137
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
138
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
139
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createPremiumFormulaRequestDto, localVarRequestOptions, configuration);
140
+ return [2 /*return*/, {
141
+ url: (0, common_1.toPathString)(localVarUrlObj),
142
+ options: localVarRequestOptions,
143
+ }];
144
+ }
145
+ });
146
+ });
147
+ },
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
152
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
153
+ * @param {*} [options] Override http request option.
154
+ * @throws {RequiredError}
155
+ */
156
+ createProduct: function (createProductRequestDto, authorization, options) {
157
+ if (options === void 0) { options = {}; }
158
+ return __awaiter(_this, void 0, void 0, function () {
159
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
160
+ return __generator(this, function (_a) {
161
+ switch (_a.label) {
162
+ case 0:
163
+ // verify required parameter 'createProductRequestDto' is not null or undefined
164
+ (0, common_1.assertParamExists)('createProduct', 'createProductRequestDto', createProductRequestDto);
165
+ localVarPath = "/insuranceservice/v1/products";
166
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
167
+ if (configuration) {
168
+ baseOptions = configuration.baseOptions;
169
+ baseAccessToken = configuration.accessToken;
170
+ }
171
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
172
+ localVarHeaderParameter = {};
173
+ localVarQueryParameter = {};
174
+ // authentication bearer required
175
+ // http bearer authentication required
176
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
177
+ case 1:
178
+ // authentication bearer required
179
+ // http bearer authentication required
180
+ _a.sent();
181
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
182
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
183
+ }
184
+ localVarHeaderParameter['Content-Type'] = 'application/json';
185
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
186
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
187
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
188
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createProductRequestDto, localVarRequestOptions, configuration);
189
+ return [2 /*return*/, {
190
+ url: (0, common_1.toPathString)(localVarUrlObj),
191
+ options: localVarRequestOptions,
192
+ }];
193
+ }
194
+ });
195
+ });
196
+ },
197
+ /**
198
+ * Create a product field in the database.
199
+ * @summary Create the product field
200
+ * @param {CreateProductFieldRequestDto} createProductFieldRequestDto
201
+ * @param {string} [authorization] Bearer Token
202
+ * @param {*} [options] Override http request option.
203
+ * @throws {RequiredError}
204
+ */
205
+ createProductField: function (createProductFieldRequestDto, authorization, options) {
206
+ if (options === void 0) { options = {}; }
207
+ return __awaiter(_this, void 0, void 0, function () {
208
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
209
+ return __generator(this, function (_a) {
210
+ switch (_a.label) {
211
+ case 0:
212
+ // verify required parameter 'createProductFieldRequestDto' is not null or undefined
213
+ (0, common_1.assertParamExists)('createProductField', 'createProductFieldRequestDto', createProductFieldRequestDto);
214
+ localVarPath = "/insuranceservice/v1/product-fields";
215
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
216
+ if (configuration) {
217
+ baseOptions = configuration.baseOptions;
218
+ baseAccessToken = configuration.accessToken;
219
+ }
220
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
221
+ localVarHeaderParameter = {};
222
+ localVarQueryParameter = {};
223
+ // authentication bearer required
224
+ // http bearer authentication required
225
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
226
+ case 1:
227
+ // authentication bearer required
228
+ // http bearer authentication required
229
+ _a.sent();
230
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
231
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
232
+ }
233
+ localVarHeaderParameter['Content-Type'] = 'application/json';
234
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
235
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
236
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
237
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createProductFieldRequestDto, localVarRequestOptions, configuration);
238
+ return [2 /*return*/, {
239
+ url: (0, common_1.toPathString)(localVarUrlObj),
240
+ options: localVarRequestOptions,
241
+ }];
242
+ }
243
+ });
244
+ });
245
+ },
246
+ /**
247
+ * Permanently deletes the 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
251
+ * @param {*} [options] Override http request option.
252
+ * @throws {RequiredError}
253
+ */
254
+ deletePremiumFormula: function (id, authorization, options) {
255
+ if (options === void 0) { options = {}; }
256
+ return __awaiter(_this, void 0, void 0, function () {
257
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
258
+ return __generator(this, function (_a) {
259
+ switch (_a.label) {
260
+ case 0:
261
+ // verify required parameter '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)));
265
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
266
+ if (configuration) {
267
+ baseOptions = configuration.baseOptions;
268
+ baseAccessToken = configuration.accessToken;
269
+ }
270
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
271
+ localVarHeaderParameter = {};
272
+ localVarQueryParameter = {};
273
+ // authentication bearer required
274
+ // http bearer authentication required
275
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
276
+ case 1:
277
+ // authentication bearer required
278
+ // http bearer authentication required
279
+ _a.sent();
280
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
281
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
282
+ }
283
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
284
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
285
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
286
+ return [2 /*return*/, {
287
+ url: (0, common_1.toPathString)(localVarUrlObj),
288
+ options: localVarRequestOptions,
289
+ }];
290
+ }
291
+ });
292
+ });
293
+ },
294
+ /**
295
+ * 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
297
+ * @param {number} id
298
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
299
+ * @param {*} [options] Override http request option.
300
+ * @throws {RequiredError}
301
+ */
302
+ deleteProduct: function (id, authorization, options) {
303
+ if (options === void 0) { options = {}; }
304
+ return __awaiter(_this, void 0, void 0, function () {
305
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
306
+ return __generator(this, function (_a) {
307
+ switch (_a.label) {
308
+ case 0:
309
+ // verify required parameter 'id' is not null or undefined
310
+ (0, common_1.assertParamExists)('deleteProduct', 'id', id);
311
+ localVarPath = "/insuranceservice/v1/products/{id}"
312
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
313
+ localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
314
+ if (configuration) {
315
+ baseOptions = configuration.baseOptions;
316
+ baseAccessToken = configuration.accessToken;
317
+ }
318
+ localVarRequestOptions = __assign(__assign({ method: 'DELETE' }, baseOptions), options);
319
+ localVarHeaderParameter = {};
320
+ localVarQueryParameter = {};
321
+ // authentication bearer required
322
+ // http bearer authentication required
323
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
324
+ case 1:
325
+ // authentication bearer required
326
+ // http bearer authentication required
327
+ _a.sent();
328
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
329
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
330
+ }
331
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
332
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
333
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
334
+ return [2 /*return*/, {
335
+ url: (0, common_1.toPathString)(localVarUrlObj),
336
+ options: localVarRequestOptions,
337
+ }];
338
+ }
339
+ });
340
+ });
341
+ },
342
+ /**
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
347
+ * @param {*} [options] Override http request option.
348
+ * @throws {RequiredError}
349
+ */
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;
354
+ return __generator(this, function (_a) {
355
+ 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)];
372
+ 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
+ }];
386
+ }
387
+ });
388
+ });
389
+ },
390
+ /**
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
396
+ * @param {*} [options] Override http request option.
397
+ * @throws {RequiredError}
398
+ */
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;
403
+ return __generator(this, function (_a) {
404
+ 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)];
423
+ 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
+ }];
440
+ }
441
+ });
442
+ });
443
+ },
444
+ /**
445
+ * 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.
446
+ * @summary Retrieve the product
447
+ * @param {string} code Unique identifier for the object.
448
+ * @param {number} id Product id
449
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
450
+ * @param {string} [expand] Fields to expand response by
451
+ * @param {*} [options] Override http request option.
452
+ * @throws {RequiredError}
453
+ */
454
+ 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;
458
+ return __generator(this, function (_a) {
459
+ 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)];
478
+ 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
+ }];
498
+ }
499
+ });
500
+ });
501
+ },
502
+ /**
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
509
+ * @param {*} [options] Override http request option.
510
+ * @throws {RequiredError}
511
+ */
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;
516
+ return __generator(this, function (_a) {
517
+ 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)];
1892
+ case 1:
1893
+ localVarAxiosArgs = _a.sent();
1894
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1895
+ }
1896
+ });
1897
+ });
1898
+ },
1899
+ /**
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]
1904
+ * @param {*} [options] Override http request option.
1905
+ * @throws {RequiredError}
1906
+ */
1907
+ validateProductFactors: function (authorization, factors, options) {
1908
+ return __awaiter(this, void 0, void 0, function () {
1909
+ var localVarAxiosArgs;
1910
+ return __generator(this, function (_a) {
1911
+ switch (_a.label) {
1912
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.validateProductFactors(authorization, factors, options)];
1913
+ case 1:
1914
+ localVarAxiosArgs = _a.sent();
1915
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1916
+ }
1917
+ });
1918
+ });
1919
+ },
1920
+ };
1921
+ };
1922
+ exports.ProductsApiFp = ProductsApiFp;
1923
+ /**
1924
+ * ProductsApi - factory interface
1925
+ * @export
1926
+ */
1927
+ var ProductsApiFactory = function (configuration, basePath, axios) {
1928
+ var localVarFp = (0, exports.ProductsApiFp)(configuration);
1929
+ 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
+ /**
1942
+ * Create a blank product. The product cannot be used as long as it is missing product factors, insured objects and premium formulas.
1943
+ * @summary Create the product
1944
+ * @param {CreateProductRequestDto} createProductRequestDto
1945
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1946
+ * @param {*} [options] Override http request option.
1947
+ * @throws {RequiredError}
1948
+ */
1949
+ createProduct: function (createProductRequestDto, authorization, options) {
1950
+ return localVarFp.createProduct(createProductRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1951
+ },
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
+ /**
1975
+ * Permanently deletes the product. Supply the unique id that was returned when you created the product and this will delete it.
1976
+ * @summary Delete the product
1977
+ * @param {number} id
1978
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1979
+ * @param {*} [options] Override http request option.
1980
+ * @throws {RequiredError}
1981
+ */
1982
+ deleteProduct: function (id, authorization, options) {
1983
+ return localVarFp.deleteProduct(id, authorization, options).then(function (request) { return request(axios, basePath); });
1984
+ },
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
+ /**
2009
+ * 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
+ * @summary Retrieve the product
2011
+ * @param {string} code Unique identifier for the object.
2012
+ * @param {number} id Product id
2013
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
2014
+ * @param {string} [expand] Fields to expand response by
2015
+ * @param {*} [options] Override http request option.
2016
+ * @throws {RequiredError}
2017
+ */
2018
+ getProductByCode: function (code, id, authorization, expand, options) {
2019
+ return localVarFp.getProductByCode(code, id, authorization, expand, options).then(function (request) { return request(axios, basePath); });
2020
+ },
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
+ /**
2136
+ * 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
+ * @summary List products
2138
+ * @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
2141
+ * @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
2145
+ * @param {*} [options] Override http request option.
2146
+ * @throws {RequiredError}
2147
+ */
2148
+ listProducts: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
2149
+ return localVarFp.listProducts(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
2150
+ },
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
+ /**
2176
+ * Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
2177
+ * @summary Update the product
2178
+ * @param {number} id
2179
+ * @param {UpdateProductRequestDto} updateProductRequestDto
2180
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
2181
+ * @param {*} [options] Override http request option.
2182
+ * @throws {RequiredError}
2183
+ */
2184
+ updateProduct: function (id, updateProductRequestDto, authorization, options) {
2185
+ return localVarFp.updateProduct(id, updateProductRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
2186
+ },
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
+ };
2223
+ };
2224
+ exports.ProductsApiFactory = ProductsApiFactory;
2225
+ /**
2226
+ * ProductsApi - object-oriented interface
2227
+ * @export
2228
+ * @class ProductsApi
2229
+ * @extends {BaseAPI}
2230
+ */
2231
+ var ProductsApi = /** @class */ (function (_super) {
2232
+ __extends(ProductsApi, _super);
2233
+ function ProductsApi() {
2234
+ return _super !== null && _super.apply(this, arguments) || this;
2235
+ }
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
+ /**
2249
+ * Create a blank product. The product cannot be used as long as it is missing product factors, insured objects and premium formulas.
2250
+ * @summary Create the product
2251
+ * @param {ProductsApiCreateProductRequest} requestParameters Request parameters.
2252
+ * @param {*} [options] Override http request option.
2253
+ * @throws {RequiredError}
2254
+ * @memberof ProductsApi
2255
+ */
2256
+ ProductsApi.prototype.createProduct = function (requestParameters, options) {
2257
+ var _this = this;
2258
+ return (0, exports.ProductsApiFp)(this.configuration).createProduct(requestParameters.createProductRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2259
+ };
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
+ /**
2285
+ * Permanently deletes the product. Supply the unique id that was returned when you created the product and this will delete it.
2286
+ * @summary Delete the product
2287
+ * @param {ProductsApiDeleteProductRequest} requestParameters Request parameters.
2288
+ * @param {*} [options] Override http request option.
2289
+ * @throws {RequiredError}
2290
+ * @memberof ProductsApi
2291
+ */
2292
+ ProductsApi.prototype.deleteProduct = function (requestParameters, options) {
2293
+ var _this = this;
2294
+ return (0, exports.ProductsApiFp)(this.configuration).deleteProduct(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2295
+ };
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
+ /**
2321
+ * 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
+ * @summary Retrieve the product
2323
+ * @param {ProductsApiGetProductByCodeRequest} requestParameters Request parameters.
2324
+ * @param {*} [options] Override http request option.
2325
+ * @throws {RequiredError}
2326
+ * @memberof ProductsApi
2327
+ */
2328
+ ProductsApi.prototype.getProductByCode = function (requestParameters, options) {
2329
+ var _this = this;
2330
+ 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
+ };
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
+ /**
2433
+ * 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
+ * @summary List products
2435
+ * @param {ProductsApiListProductsRequest} requestParameters Request parameters.
2436
+ * @param {*} [options] Override http request option.
2437
+ * @throws {RequiredError}
2438
+ * @memberof ProductsApi
2439
+ */
2440
+ ProductsApi.prototype.listProducts = function (requestParameters, options) {
2441
+ var _this = this;
2442
+ if (requestParameters === void 0) { requestParameters = {}; }
2443
+ 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
+ };
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
+ /**
2471
+ * Updates the specified product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
2472
+ * @summary Update the product
2473
+ * @param {ProductsApiUpdateProductRequest} requestParameters Request parameters.
2474
+ * @param {*} [options] Override http request option.
2475
+ * @throws {RequiredError}
2476
+ * @memberof ProductsApi
2477
+ */
2478
+ ProductsApi.prototype.updateProduct = function (requestParameters, options) {
2479
+ var _this = this;
2480
+ return (0, exports.ProductsApiFp)(this.configuration).updateProduct(requestParameters.id, requestParameters.updateProductRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
2481
+ };
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
+ return ProductsApi;
2520
+ }(base_1.BaseAPI));
2521
+ exports.ProductsApi = ProductsApi;