@emilgroup/insurance-sdk 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 (256) hide show
  1. package/.openapi-generator/FILES +90 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator-ignore +23 -0
  4. package/README.md +157 -0
  5. package/api/insured-object-types-api.ts +232 -0
  6. package/api/insured-objects-api.ts +442 -0
  7. package/api/leads-api.ts +163 -0
  8. package/api/policies-api.ts +576 -0
  9. package/api/products-api.ts +2174 -0
  10. package/api.ts +40 -0
  11. package/base.ts +182 -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 +251 -0
  16. package/dist/api/insured-objects-api.d.ts +254 -0
  17. package/dist/api/insured-objects-api.js +436 -0
  18. package/dist/api/leads-api.d.ts +96 -0
  19. package/dist/api/leads-api.js +221 -0
  20. package/dist/api/policies-api.d.ts +329 -0
  21. package/dist/api/policies-api.js +541 -0
  22. package/dist/api/products-api.d.ts +1218 -0
  23. package/dist/api/products-api.js +1809 -0
  24. package/dist/api.d.ts +20 -0
  25. package/dist/api.js +40 -0
  26. package/dist/base.d.ts +68 -0
  27. package/dist/base.js +243 -0
  28. package/dist/common.d.ts +65 -0
  29. package/dist/common.js +243 -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-insured-object-request-dto.d.ts +42 -0
  47. package/dist/models/create-insured-object-request-dto.js +15 -0
  48. package/dist/models/create-insured-object-response-class.d.ts +25 -0
  49. package/dist/models/create-insured-object-response-class.js +15 -0
  50. package/dist/models/create-lead-request-dto.d.ts +45 -0
  51. package/dist/models/create-lead-request-dto.js +15 -0
  52. package/dist/models/create-policy-request-dto.d.ts +37 -0
  53. package/dist/models/create-policy-request-dto.js +15 -0
  54. package/dist/models/create-policy-response-class.d.ts +25 -0
  55. package/dist/models/create-policy-response-class.js +15 -0
  56. package/dist/models/create-premium-formula-request-dto.d.ts +65 -0
  57. package/dist/models/create-premium-formula-request-dto.js +25 -0
  58. package/dist/models/create-premium-formula-response-class.d.ts +25 -0
  59. package/dist/models/create-premium-formula-response-class.js +15 -0
  60. package/dist/models/create-product-field-request-dto.d.ts +113 -0
  61. package/dist/models/create-product-field-request-dto.js +20 -0
  62. package/dist/models/create-product-field-response-class.d.ts +25 -0
  63. package/dist/models/create-product-field-response-class.js +15 -0
  64. package/dist/models/create-product-request-dto.d.ts +57 -0
  65. package/dist/models/create-product-request-dto.js +30 -0
  66. package/dist/models/create-product-response-class.d.ts +25 -0
  67. package/dist/models/create-product-response-class.js +15 -0
  68. package/dist/models/csv-product-factor-dto.d.ts +48 -0
  69. package/dist/models/csv-product-factor-dto.js +15 -0
  70. package/dist/models/delete-request-dto.d.ts +24 -0
  71. package/dist/models/delete-request-dto.js +15 -0
  72. package/dist/models/get-insured-object-request-dto.d.ts +24 -0
  73. package/dist/models/get-insured-object-request-dto.js +15 -0
  74. package/dist/models/get-insured-object-response-class.d.ts +25 -0
  75. package/dist/models/get-insured-object-response-class.js +15 -0
  76. package/dist/models/get-policy-request-dto.d.ts +30 -0
  77. package/dist/models/get-policy-request-dto.js +15 -0
  78. package/dist/models/get-policy-response-class.d.ts +25 -0
  79. package/dist/models/get-policy-response-class.js +15 -0
  80. package/dist/models/get-premium-formula-request-dto.d.ts +24 -0
  81. package/dist/models/get-premium-formula-request-dto.js +15 -0
  82. package/dist/models/get-premium-formula-response-class.d.ts +25 -0
  83. package/dist/models/get-premium-formula-response-class.js +15 -0
  84. package/dist/models/get-product-factor-response-class.d.ts +32 -0
  85. package/dist/models/get-product-factor-response-class.js +15 -0
  86. package/dist/models/get-product-factor-value-request-dto.d.ts +42 -0
  87. package/dist/models/get-product-factor-value-request-dto.js +15 -0
  88. package/dist/models/get-product-factor-value-response-class.d.ts +25 -0
  89. package/dist/models/get-product-factor-value-response-class.js +15 -0
  90. package/dist/models/get-product-field-request-dto.d.ts +24 -0
  91. package/dist/models/get-product-field-request-dto.js +15 -0
  92. package/dist/models/get-product-field-response-class.d.ts +25 -0
  93. package/dist/models/get-product-field-response-class.js +15 -0
  94. package/dist/models/get-product-request-dto.d.ts +36 -0
  95. package/dist/models/get-product-request-dto.js +15 -0
  96. package/dist/models/get-product-response-class.d.ts +25 -0
  97. package/dist/models/get-product-response-class.js +15 -0
  98. package/dist/models/get-product-version-request-dto.d.ts +24 -0
  99. package/dist/models/get-product-version-request-dto.js +15 -0
  100. package/dist/models/get-product-version-response-class.d.ts +25 -0
  101. package/dist/models/get-product-version-response-class.js +15 -0
  102. package/dist/models/grouped-product-factor-class.d.ts +37 -0
  103. package/dist/models/grouped-product-factor-class.js +15 -0
  104. package/dist/models/grouped-product-factor-value-class.d.ts +36 -0
  105. package/dist/models/grouped-product-factor-value-class.js +15 -0
  106. package/dist/models/grouped-product-factors-response-class.d.ts +25 -0
  107. package/dist/models/grouped-product-factors-response-class.js +15 -0
  108. package/dist/models/index.d.ts +72 -0
  109. package/dist/models/index.js +88 -0
  110. package/dist/models/insured-object-class.d.ts +67 -0
  111. package/dist/models/insured-object-class.js +15 -0
  112. package/dist/models/insured-object-type-class.d.ts +48 -0
  113. package/dist/models/insured-object-type-class.js +15 -0
  114. package/dist/models/list-insured-object-types-response-class.d.ts +31 -0
  115. package/dist/models/list-insured-object-types-response-class.js +15 -0
  116. package/dist/models/list-insured-objects-response-class.d.ts +30 -0
  117. package/dist/models/list-insured-objects-response-class.js +15 -0
  118. package/dist/models/list-policies-response-class.d.ts +31 -0
  119. package/dist/models/list-policies-response-class.js +15 -0
  120. package/dist/models/list-premium-formulas-response-class.d.ts +31 -0
  121. package/dist/models/list-premium-formulas-response-class.js +15 -0
  122. package/dist/models/list-product-factors-response-class.d.ts +31 -0
  123. package/dist/models/list-product-factors-response-class.js +15 -0
  124. package/dist/models/list-product-field-types-response-class.d.ts +30 -0
  125. package/dist/models/list-product-field-types-response-class.js +15 -0
  126. package/dist/models/list-product-fields-response-class.d.ts +31 -0
  127. package/dist/models/list-product-fields-response-class.js +15 -0
  128. package/dist/models/list-products-response-class.d.ts +31 -0
  129. package/dist/models/list-products-response-class.js +15 -0
  130. package/dist/models/list-request-dto.d.ts +54 -0
  131. package/dist/models/list-request-dto.js +15 -0
  132. package/dist/models/policy-class.d.ts +86 -0
  133. package/dist/models/policy-class.js +15 -0
  134. package/dist/models/policy-object-class.d.ts +42 -0
  135. package/dist/models/policy-object-class.js +15 -0
  136. package/dist/models/policy-object-dto.d.ts +30 -0
  137. package/dist/models/policy-object-dto.js +15 -0
  138. package/dist/models/policy-premium-class.d.ts +43 -0
  139. package/dist/models/policy-premium-class.js +15 -0
  140. package/dist/models/policy-premium-item-class.d.ts +49 -0
  141. package/dist/models/policy-premium-item-class.js +15 -0
  142. package/dist/models/policy-version-class.d.ts +55 -0
  143. package/dist/models/policy-version-class.js +15 -0
  144. package/dist/models/premium-formula-class.d.ts +79 -0
  145. package/dist/models/premium-formula-class.js +15 -0
  146. package/dist/models/product-class.d.ts +74 -0
  147. package/dist/models/product-class.js +15 -0
  148. package/dist/models/product-factor-class.d.ts +68 -0
  149. package/dist/models/product-factor-class.js +15 -0
  150. package/dist/models/product-factor-value-class.d.ts +80 -0
  151. package/dist/models/product-factor-value-class.js +15 -0
  152. package/dist/models/product-field-class.d.ts +114 -0
  153. package/dist/models/product-field-class.js +15 -0
  154. package/dist/models/product-version-class.d.ts +54 -0
  155. package/dist/models/product-version-class.js +15 -0
  156. package/dist/models/shared-create-lead-request-dto.d.ts +45 -0
  157. package/dist/models/shared-create-lead-request-dto.js +15 -0
  158. package/dist/models/store-product-factors-request-dto.d.ts +30 -0
  159. package/dist/models/store-product-factors-request-dto.js +15 -0
  160. package/dist/models/store-product-factors-response-class.d.ts +25 -0
  161. package/dist/models/store-product-factors-response-class.js +15 -0
  162. package/dist/models/timeslice-class.d.ts +62 -0
  163. package/dist/models/timeslice-class.js +15 -0
  164. package/dist/models/update-insured-object-request-dto.d.ts +48 -0
  165. package/dist/models/update-insured-object-request-dto.js +15 -0
  166. package/dist/models/update-policy-request-dto.d.ts +42 -0
  167. package/dist/models/update-policy-request-dto.js +15 -0
  168. package/dist/models/update-policy-response-class.d.ts +25 -0
  169. package/dist/models/update-policy-response-class.js +15 -0
  170. package/dist/models/update-premium-formula-request-dto.d.ts +71 -0
  171. package/dist/models/update-premium-formula-request-dto.js +25 -0
  172. package/dist/models/update-product-field-request-dto.d.ts +119 -0
  173. package/dist/models/update-product-field-request-dto.js +20 -0
  174. package/dist/models/update-product-request-dto.d.ts +42 -0
  175. package/dist/models/update-product-request-dto.js +15 -0
  176. package/dist/models/update-product-version-request-dto.d.ts +43 -0
  177. package/dist/models/update-product-version-request-dto.js +22 -0
  178. package/dist/models/validate-product-factors-request-dto.d.ts +30 -0
  179. package/dist/models/validate-product-factors-request-dto.js +15 -0
  180. package/git_push.sh +57 -0
  181. package/index.ts +19 -0
  182. package/models/calculate-custom-premium-request-dto.ts +43 -0
  183. package/models/calculate-premium-request-dto.ts +37 -0
  184. package/models/create-account-request-dto.ts +90 -0
  185. package/models/create-bank-account-request-dto.ts +36 -0
  186. package/models/create-claim-request-dto.ts +93 -0
  187. package/models/create-custom-application-request-dto.ts +49 -0
  188. package/models/create-insured-object-request-dto.ts +48 -0
  189. package/models/create-insured-object-response-class.ts +31 -0
  190. package/models/create-lead-request-dto.ts +51 -0
  191. package/models/create-policy-request-dto.ts +43 -0
  192. package/models/create-policy-response-class.ts +31 -0
  193. package/models/create-premium-formula-request-dto.ts +75 -0
  194. package/models/create-premium-formula-response-class.ts +31 -0
  195. package/models/create-product-field-request-dto.ts +122 -0
  196. package/models/create-product-field-response-class.ts +31 -0
  197. package/models/create-product-request-dto.ts +66 -0
  198. package/models/create-product-response-class.ts +31 -0
  199. package/models/csv-product-factor-dto.ts +54 -0
  200. package/models/delete-request-dto.ts +30 -0
  201. package/models/get-insured-object-request-dto.ts +30 -0
  202. package/models/get-insured-object-response-class.ts +31 -0
  203. package/models/get-policy-request-dto.ts +36 -0
  204. package/models/get-policy-response-class.ts +31 -0
  205. package/models/get-premium-formula-request-dto.ts +30 -0
  206. package/models/get-premium-formula-response-class.ts +31 -0
  207. package/models/get-product-factor-response-class.ts +38 -0
  208. package/models/get-product-factor-value-request-dto.ts +48 -0
  209. package/models/get-product-factor-value-response-class.ts +31 -0
  210. package/models/get-product-field-request-dto.ts +30 -0
  211. package/models/get-product-field-response-class.ts +31 -0
  212. package/models/get-product-request-dto.ts +42 -0
  213. package/models/get-product-response-class.ts +31 -0
  214. package/models/get-product-version-request-dto.ts +30 -0
  215. package/models/get-product-version-response-class.ts +31 -0
  216. package/models/grouped-product-factor-class.ts +43 -0
  217. package/models/grouped-product-factor-value-class.ts +42 -0
  218. package/models/grouped-product-factors-response-class.ts +31 -0
  219. package/models/index.ts +72 -0
  220. package/models/insured-object-class.ts +73 -0
  221. package/models/insured-object-type-class.ts +54 -0
  222. package/models/list-insured-object-types-response-class.ts +37 -0
  223. package/models/list-insured-objects-response-class.ts +36 -0
  224. package/models/list-policies-response-class.ts +37 -0
  225. package/models/list-premium-formulas-response-class.ts +37 -0
  226. package/models/list-product-factors-response-class.ts +37 -0
  227. package/models/list-product-field-types-response-class.ts +36 -0
  228. package/models/list-product-fields-response-class.ts +37 -0
  229. package/models/list-products-response-class.ts +37 -0
  230. package/models/list-request-dto.ts +60 -0
  231. package/models/policy-class.ts +92 -0
  232. package/models/policy-object-class.ts +48 -0
  233. package/models/policy-object-dto.ts +36 -0
  234. package/models/policy-premium-class.ts +49 -0
  235. package/models/policy-premium-item-class.ts +55 -0
  236. package/models/policy-version-class.ts +61 -0
  237. package/models/premium-formula-class.ts +85 -0
  238. package/models/product-class.ts +80 -0
  239. package/models/product-factor-class.ts +74 -0
  240. package/models/product-factor-value-class.ts +86 -0
  241. package/models/product-field-class.ts +120 -0
  242. package/models/product-version-class.ts +60 -0
  243. package/models/shared-create-lead-request-dto.ts +51 -0
  244. package/models/store-product-factors-request-dto.ts +36 -0
  245. package/models/store-product-factors-response-class.ts +31 -0
  246. package/models/timeslice-class.ts +68 -0
  247. package/models/update-insured-object-request-dto.ts +54 -0
  248. package/models/update-policy-request-dto.ts +48 -0
  249. package/models/update-policy-response-class.ts +31 -0
  250. package/models/update-premium-formula-request-dto.ts +81 -0
  251. package/models/update-product-field-request-dto.ts +128 -0
  252. package/models/update-product-request-dto.ts +48 -0
  253. package/models/update-product-version-request-dto.ts +52 -0
  254. package/models/validate-product-factors-request-dto.ts +36 -0
  255. package/package.json +27 -0
  256. package/tsconfig.json +21 -0
@@ -0,0 +1,1809 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
78
+ exports.ProductsApi = exports.ProductsApiFactory = exports.ProductsApiFp = exports.ProductsApiAxiosParamCreator = void 0;
79
+ var axios_1 = require("axios");
80
+ // Some imports not used depending on template conditions
81
+ // @ts-ignore
82
+ var common_1 = require("../common");
83
+ // @ts-ignore
84
+ var base_1 = require("../base");
85
+ /**
86
+ * ProductsApi - axios parameter creator
87
+ * @export
88
+ */
89
+ var ProductsApiAxiosParamCreator = function (configuration) {
90
+ var _this = this;
91
+ return {
92
+ /**
93
+ * Creates a premium formula.
94
+ * @summary Create the premium formula
95
+ * @param {CreatePremiumFormulaRequestDto} createPremiumFormulaRequestDto
96
+ * @param {string} [authorization] Bearer Token
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ createPremiumFormula: function (createPremiumFormulaRequestDto, authorization, options) {
101
+ if (options === void 0) { options = {}; }
102
+ return __awaiter(_this, void 0, void 0, function () {
103
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
104
+ return __generator(this, function (_a) {
105
+ switch (_a.label) {
106
+ case 0:
107
+ // verify required parameter 'createPremiumFormulaRequestDto' is not null or undefined
108
+ (0, common_1.assertParamExists)('createPremiumFormula', 'createPremiumFormulaRequestDto', createPremiumFormulaRequestDto);
109
+ localVarPath = "/insuranceservice/v1/premium-formulas";
110
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
111
+ if (configuration) {
112
+ baseOptions = configuration.baseOptions;
113
+ baseAccessToken = configuration.accessToken;
114
+ }
115
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
116
+ localVarHeaderParameter = {};
117
+ localVarQueryParameter = {};
118
+ // authentication bearer required
119
+ // http bearer authentication required
120
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
121
+ case 1:
122
+ // authentication bearer required
123
+ // http bearer authentication required
124
+ _a.sent();
125
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
126
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
127
+ }
128
+ localVarHeaderParameter['Content-Type'] = 'application/json';
129
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
130
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
131
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
132
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createPremiumFormulaRequestDto, localVarRequestOptions, configuration);
133
+ return [2 /*return*/, {
134
+ url: (0, common_1.toPathString)(localVarUrlObj),
135
+ options: localVarRequestOptions,
136
+ }];
137
+ }
138
+ });
139
+ });
140
+ },
141
+ /**
142
+ * Creates a blank product. The product cannot be used as long as it is missing product factors, insured objects and premium formulas.
143
+ * @summary Create the product
144
+ * @param {CreateProductRequestDto} createProductRequestDto
145
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
146
+ * @param {*} [options] Override http request option.
147
+ * @throws {RequiredError}
148
+ */
149
+ createProduct: function (createProductRequestDto, authorization, options) {
150
+ if (options === void 0) { options = {}; }
151
+ return __awaiter(_this, void 0, void 0, function () {
152
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
153
+ return __generator(this, function (_a) {
154
+ switch (_a.label) {
155
+ case 0:
156
+ // verify required parameter 'createProductRequestDto' is not null or undefined
157
+ (0, common_1.assertParamExists)('createProduct', 'createProductRequestDto', createProductRequestDto);
158
+ localVarPath = "/insuranceservice/v1/products";
159
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
160
+ if (configuration) {
161
+ baseOptions = configuration.baseOptions;
162
+ baseAccessToken = configuration.accessToken;
163
+ }
164
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
165
+ localVarHeaderParameter = {};
166
+ localVarQueryParameter = {};
167
+ // authentication bearer required
168
+ // http bearer authentication required
169
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
170
+ case 1:
171
+ // authentication bearer required
172
+ // http bearer authentication required
173
+ _a.sent();
174
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
175
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
176
+ }
177
+ localVarHeaderParameter['Content-Type'] = 'application/json';
178
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
179
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
180
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
181
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createProductRequestDto, localVarRequestOptions, configuration);
182
+ return [2 /*return*/, {
183
+ url: (0, common_1.toPathString)(localVarUrlObj),
184
+ options: localVarRequestOptions,
185
+ }];
186
+ }
187
+ });
188
+ });
189
+ },
190
+ /**
191
+ * Create a product field in the database.
192
+ * @summary Create the product field
193
+ * @param {CreateProductFieldRequestDto} createProductFieldRequestDto
194
+ * @param {string} [authorization] Bearer Token
195
+ * @param {*} [options] Override http request option.
196
+ * @throws {RequiredError}
197
+ */
198
+ createProductField: function (createProductFieldRequestDto, authorization, options) {
199
+ if (options === void 0) { options = {}; }
200
+ return __awaiter(_this, void 0, void 0, function () {
201
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
202
+ return __generator(this, function (_a) {
203
+ switch (_a.label) {
204
+ case 0:
205
+ // verify required parameter 'createProductFieldRequestDto' is not null or undefined
206
+ (0, common_1.assertParamExists)('createProductField', 'createProductFieldRequestDto', createProductFieldRequestDto);
207
+ localVarPath = "/insuranceservice/v1/product-fields";
208
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
209
+ if (configuration) {
210
+ baseOptions = configuration.baseOptions;
211
+ baseAccessToken = configuration.accessToken;
212
+ }
213
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
214
+ localVarHeaderParameter = {};
215
+ localVarQueryParameter = {};
216
+ // authentication bearer required
217
+ // http bearer authentication required
218
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
219
+ case 1:
220
+ // authentication bearer required
221
+ // http bearer authentication required
222
+ _a.sent();
223
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
224
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
225
+ }
226
+ localVarHeaderParameter['Content-Type'] = 'application/json';
227
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
228
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
229
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
230
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createProductFieldRequestDto, localVarRequestOptions, configuration);
231
+ return [2 /*return*/, {
232
+ url: (0, common_1.toPathString)(localVarUrlObj),
233
+ options: localVarRequestOptions,
234
+ }];
235
+ }
236
+ });
237
+ });
238
+ },
239
+ /**
240
+ * 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.
241
+ * @summary Retrieve the premium formula
242
+ * @param {string} id
243
+ * @param {number} id2 Product formula id
244
+ * @param {string} [authorization] Bearer Token
245
+ * @param {*} [options] Override http request option.
246
+ * @throws {RequiredError}
247
+ */
248
+ getPremiumFormula: function (id, id2, authorization, options) {
249
+ if (options === void 0) { options = {}; }
250
+ return __awaiter(_this, void 0, void 0, function () {
251
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
252
+ return __generator(this, function (_a) {
253
+ switch (_a.label) {
254
+ case 0:
255
+ // verify required parameter 'id' is not null or undefined
256
+ (0, common_1.assertParamExists)('getPremiumFormula', 'id', id);
257
+ // verify required parameter 'id2' is not null or undefined
258
+ (0, common_1.assertParamExists)('getPremiumFormula', 'id2', id2);
259
+ localVarPath = "/insuranceservice/v1/premium-formulas/{id}"
260
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
261
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
262
+ if (configuration) {
263
+ baseOptions = configuration.baseOptions;
264
+ baseAccessToken = configuration.accessToken;
265
+ }
266
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
267
+ localVarHeaderParameter = {};
268
+ localVarQueryParameter = {};
269
+ // authentication bearer required
270
+ // http bearer authentication required
271
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
272
+ case 1:
273
+ // authentication bearer required
274
+ // http bearer authentication required
275
+ _a.sent();
276
+ if (id2 !== undefined) {
277
+ localVarQueryParameter['id'] = id2;
278
+ }
279
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
280
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
281
+ }
282
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
283
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
284
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
285
+ return [2 /*return*/, {
286
+ url: (0, common_1.toPathString)(localVarUrlObj),
287
+ options: localVarRequestOptions,
288
+ }];
289
+ }
290
+ });
291
+ });
292
+ },
293
+ /**
294
+ * 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.
295
+ * @summary Retrieve the product
296
+ * @param {string} code Unique identifier for the object.
297
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
298
+ * @param {string} [expand] Fields to expand response by
299
+ * @param {*} [options] Override http request option.
300
+ * @throws {RequiredError}
301
+ */
302
+ getProductByCode: function (code, authorization, expand, 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 'code' is not null or undefined
310
+ (0, common_1.assertParamExists)('getProductByCode', 'code', code);
311
+ localVarPath = "/insuranceservice/v1/products/code/{code}"
312
+ .replace("{".concat("code", "}"), encodeURIComponent(String(code)));
313
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
314
+ if (configuration) {
315
+ baseOptions = configuration.baseOptions;
316
+ baseAccessToken = configuration.accessToken;
317
+ }
318
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, 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 (expand !== undefined) {
329
+ localVarQueryParameter['expand'] = expand;
330
+ }
331
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
332
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
333
+ }
334
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
335
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
336
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
337
+ return [2 /*return*/, {
338
+ url: (0, common_1.toPathString)(localVarUrlObj),
339
+ options: localVarRequestOptions,
340
+ }];
341
+ }
342
+ });
343
+ });
344
+ },
345
+ /**
346
+ * 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.
347
+ * @summary Retrieve the product factor
348
+ * @param {number} id
349
+ * @param {number} id2 Product factor id
350
+ * @param {string} [authorization] Bearer Token
351
+ * @param {string} [expand] Fields to expand response by
352
+ * @param {*} [options] Override http request option.
353
+ * @throws {RequiredError}
354
+ */
355
+ getProductFactor: function (id, id2, authorization, expand, options) {
356
+ if (options === void 0) { options = {}; }
357
+ return __awaiter(_this, void 0, void 0, function () {
358
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
359
+ return __generator(this, function (_a) {
360
+ switch (_a.label) {
361
+ case 0:
362
+ // verify required parameter 'id' is not null or undefined
363
+ (0, common_1.assertParamExists)('getProductFactor', 'id', id);
364
+ // verify required parameter 'id2' is not null or undefined
365
+ (0, common_1.assertParamExists)('getProductFactor', 'id2', id2);
366
+ localVarPath = "/insuranceservice/v1/product-factors/{id}"
367
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
368
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
369
+ if (configuration) {
370
+ baseOptions = configuration.baseOptions;
371
+ baseAccessToken = configuration.accessToken;
372
+ }
373
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
374
+ localVarHeaderParameter = {};
375
+ localVarQueryParameter = {};
376
+ // authentication bearer required
377
+ // http bearer authentication required
378
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
379
+ case 1:
380
+ // authentication bearer required
381
+ // http bearer authentication required
382
+ _a.sent();
383
+ if (id2 !== undefined) {
384
+ localVarQueryParameter['id'] = id2;
385
+ }
386
+ if (expand !== undefined) {
387
+ localVarQueryParameter['expand'] = expand;
388
+ }
389
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
390
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
391
+ }
392
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
393
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
394
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
395
+ return [2 /*return*/, {
396
+ url: (0, common_1.toPathString)(localVarUrlObj),
397
+ options: localVarRequestOptions,
398
+ }];
399
+ }
400
+ });
401
+ });
402
+ },
403
+ /**
404
+ * Get the value corresponding to a specific product factor.
405
+ * @summary Get product factor value
406
+ * @param {number} productVersionId Product Version Id
407
+ * @param {string} label Product factor label
408
+ * @param {string} [authorization] Bearer Token
409
+ * @param {*} [options] Override http request option.
410
+ * @throws {RequiredError}
411
+ */
412
+ getProductFactorValue: function (productVersionId, label, authorization, options) {
413
+ if (options === void 0) { options = {}; }
414
+ return __awaiter(_this, void 0, void 0, function () {
415
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
416
+ return __generator(this, function (_a) {
417
+ switch (_a.label) {
418
+ case 0:
419
+ // verify required parameter 'productVersionId' is not null or undefined
420
+ (0, common_1.assertParamExists)('getProductFactorValue', 'productVersionId', productVersionId);
421
+ // verify required parameter 'label' is not null or undefined
422
+ (0, common_1.assertParamExists)('getProductFactorValue', 'label', label);
423
+ localVarPath = "/insuranceservice/v1/product-factors/values";
424
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
425
+ if (configuration) {
426
+ baseOptions = configuration.baseOptions;
427
+ baseAccessToken = configuration.accessToken;
428
+ }
429
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
430
+ localVarHeaderParameter = {};
431
+ localVarQueryParameter = {};
432
+ // authentication bearer required
433
+ // http bearer authentication required
434
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
435
+ case 1:
436
+ // authentication bearer required
437
+ // http bearer authentication required
438
+ _a.sent();
439
+ if (productVersionId !== undefined) {
440
+ localVarQueryParameter['productVersionId'] = productVersionId;
441
+ }
442
+ if (label !== undefined) {
443
+ localVarQueryParameter['label'] = label;
444
+ }
445
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
446
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
447
+ }
448
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
449
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
450
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
451
+ return [2 /*return*/, {
452
+ url: (0, common_1.toPathString)(localVarUrlObj),
453
+ options: localVarRequestOptions,
454
+ }];
455
+ }
456
+ });
457
+ });
458
+ },
459
+ /**
460
+ * 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.
461
+ * @summary Retrieve the product field
462
+ * @param {string} id
463
+ * @param {string} [authorization] Bearer Token
464
+ * @param {*} [options] Override http request option.
465
+ * @throws {RequiredError}
466
+ */
467
+ getProductField: function (id, authorization, options) {
468
+ if (options === void 0) { options = {}; }
469
+ return __awaiter(_this, void 0, void 0, function () {
470
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
471
+ return __generator(this, function (_a) {
472
+ switch (_a.label) {
473
+ case 0:
474
+ // verify required parameter 'id' is not null or undefined
475
+ (0, common_1.assertParamExists)('getProductField', 'id', id);
476
+ localVarPath = "/insuranceservice/v1/product-fields/{id}"
477
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
478
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
479
+ if (configuration) {
480
+ baseOptions = configuration.baseOptions;
481
+ baseAccessToken = configuration.accessToken;
482
+ }
483
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
484
+ localVarHeaderParameter = {};
485
+ localVarQueryParameter = {};
486
+ // authentication bearer required
487
+ // http bearer authentication required
488
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
489
+ case 1:
490
+ // authentication bearer required
491
+ // http bearer authentication required
492
+ _a.sent();
493
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
494
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
495
+ }
496
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
497
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
498
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
499
+ return [2 /*return*/, {
500
+ url: (0, common_1.toPathString)(localVarUrlObj),
501
+ options: localVarRequestOptions,
502
+ }];
503
+ }
504
+ });
505
+ });
506
+ },
507
+ /**
508
+ * 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.
509
+ * @summary Retrieve the product version
510
+ * @param {string} id
511
+ * @param {number} id2 Product version id
512
+ * @param {string} [authorization] Bearer Token
513
+ * @param {*} [options] Override http request option.
514
+ * @throws {RequiredError}
515
+ */
516
+ getProductVersion: function (id, id2, authorization, options) {
517
+ if (options === void 0) { options = {}; }
518
+ return __awaiter(_this, void 0, void 0, function () {
519
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
520
+ return __generator(this, function (_a) {
521
+ switch (_a.label) {
522
+ case 0:
523
+ // verify required parameter 'id' is not null or undefined
524
+ (0, common_1.assertParamExists)('getProductVersion', 'id', id);
525
+ // verify required parameter 'id2' is not null or undefined
526
+ (0, common_1.assertParamExists)('getProductVersion', 'id2', id2);
527
+ localVarPath = "/insuranceservice/v1/product-versions/{id}"
528
+ .replace("{".concat("id", "}"), encodeURIComponent(String(id)));
529
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
530
+ if (configuration) {
531
+ baseOptions = configuration.baseOptions;
532
+ baseAccessToken = configuration.accessToken;
533
+ }
534
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
535
+ localVarHeaderParameter = {};
536
+ localVarQueryParameter = {};
537
+ // authentication bearer required
538
+ // http bearer authentication required
539
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
540
+ case 1:
541
+ // authentication bearer required
542
+ // http bearer authentication required
543
+ _a.sent();
544
+ if (id2 !== undefined) {
545
+ localVarQueryParameter['id'] = id2;
546
+ }
547
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
548
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
549
+ }
550
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
551
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
552
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
553
+ return [2 /*return*/, {
554
+ url: (0, common_1.toPathString)(localVarUrlObj),
555
+ options: localVarRequestOptions,
556
+ }];
557
+ }
558
+ });
559
+ });
560
+ },
561
+ /**
562
+ * 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.
563
+ * @summary List premium formulas
564
+ * @param {string} [authorization] Bearer Token
565
+ * @param {number} [pageSize] Page size
566
+ * @param {string} [pageToken] Page token
567
+ * @param {string} [filter] List filter
568
+ * @param {string} [search] Search query
569
+ * @param {string} [order] Ordering criteria
570
+ * @param {string} [expand] Extra fields to fetch
571
+ * @param {*} [options] Override http request option.
572
+ * @throws {RequiredError}
573
+ */
574
+ listPremiumFormulas: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
575
+ if (options === void 0) { options = {}; }
576
+ return __awaiter(_this, void 0, void 0, function () {
577
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
578
+ return __generator(this, function (_a) {
579
+ switch (_a.label) {
580
+ case 0:
581
+ localVarPath = "/insuranceservice/v1/premium-formulas";
582
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
583
+ if (configuration) {
584
+ baseOptions = configuration.baseOptions;
585
+ baseAccessToken = configuration.accessToken;
586
+ }
587
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
588
+ localVarHeaderParameter = {};
589
+ localVarQueryParameter = {};
590
+ // authentication bearer required
591
+ // http bearer authentication required
592
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
593
+ case 1:
594
+ // authentication bearer required
595
+ // http bearer authentication required
596
+ _a.sent();
597
+ if (pageSize !== undefined) {
598
+ localVarQueryParameter['pageSize'] = pageSize;
599
+ }
600
+ if (pageToken !== undefined) {
601
+ localVarQueryParameter['pageToken'] = pageToken;
602
+ }
603
+ if (filter !== undefined) {
604
+ localVarQueryParameter['filter'] = filter;
605
+ }
606
+ if (search !== undefined) {
607
+ localVarQueryParameter['search'] = search;
608
+ }
609
+ if (order !== undefined) {
610
+ localVarQueryParameter['order'] = order;
611
+ }
612
+ if (expand !== undefined) {
613
+ localVarQueryParameter['expand'] = expand;
614
+ }
615
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
616
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
617
+ }
618
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
619
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
620
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
621
+ return [2 /*return*/, {
622
+ url: (0, common_1.toPathString)(localVarUrlObj),
623
+ options: localVarRequestOptions,
624
+ }];
625
+ }
626
+ });
627
+ });
628
+ },
629
+ /**
630
+ * 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.
631
+ * @summary List product factors
632
+ * @param {string} [authorization] Bearer Token
633
+ * @param {number} [pageSize] Page size
634
+ * @param {string} [pageToken] Page token
635
+ * @param {string} [filter] List filter
636
+ * @param {string} [search] Search query
637
+ * @param {string} [order] Ordering criteria
638
+ * @param {string} [expand] Extra fields to fetch
639
+ * @param {*} [options] Override http request option.
640
+ * @throws {RequiredError}
641
+ */
642
+ listProductFactors: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
643
+ if (options === void 0) { options = {}; }
644
+ return __awaiter(_this, void 0, void 0, function () {
645
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
646
+ return __generator(this, function (_a) {
647
+ switch (_a.label) {
648
+ case 0:
649
+ localVarPath = "/insuranceservice/v1/product-factors";
650
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
651
+ if (configuration) {
652
+ baseOptions = configuration.baseOptions;
653
+ baseAccessToken = configuration.accessToken;
654
+ }
655
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
656
+ localVarHeaderParameter = {};
657
+ localVarQueryParameter = {};
658
+ // authentication bearer required
659
+ // http bearer authentication required
660
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
661
+ case 1:
662
+ // authentication bearer required
663
+ // http bearer authentication required
664
+ _a.sent();
665
+ if (pageSize !== undefined) {
666
+ localVarQueryParameter['pageSize'] = pageSize;
667
+ }
668
+ if (pageToken !== undefined) {
669
+ localVarQueryParameter['pageToken'] = pageToken;
670
+ }
671
+ if (filter !== undefined) {
672
+ localVarQueryParameter['filter'] = filter;
673
+ }
674
+ if (search !== undefined) {
675
+ localVarQueryParameter['search'] = search;
676
+ }
677
+ if (order !== undefined) {
678
+ localVarQueryParameter['order'] = order;
679
+ }
680
+ if (expand !== undefined) {
681
+ localVarQueryParameter['expand'] = expand;
682
+ }
683
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
684
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
685
+ }
686
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
687
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
688
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
689
+ return [2 /*return*/, {
690
+ url: (0, common_1.toPathString)(localVarUrlObj),
691
+ options: localVarRequestOptions,
692
+ }];
693
+ }
694
+ });
695
+ });
696
+ },
697
+ /**
698
+ * 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.
699
+ * @summary List product field types
700
+ * @param {string} [authorization] Bearer Token
701
+ * @param {number} [pageSize] Page size
702
+ * @param {string} [pageToken] Page token
703
+ * @param {string} [filter] List filter
704
+ * @param {string} [search] Search query
705
+ * @param {string} [order] Ordering criteria
706
+ * @param {string} [expand] Extra fields to fetch
707
+ * @param {*} [options] Override http request option.
708
+ * @throws {RequiredError}
709
+ */
710
+ listProductFieldTypes: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
711
+ if (options === void 0) { options = {}; }
712
+ return __awaiter(_this, void 0, void 0, function () {
713
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
714
+ return __generator(this, function (_a) {
715
+ switch (_a.label) {
716
+ case 0:
717
+ localVarPath = "/insuranceservice/v1/product-fields/types";
718
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
719
+ if (configuration) {
720
+ baseOptions = configuration.baseOptions;
721
+ baseAccessToken = configuration.accessToken;
722
+ }
723
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
724
+ localVarHeaderParameter = {};
725
+ localVarQueryParameter = {};
726
+ // authentication bearer required
727
+ // http bearer authentication required
728
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
729
+ case 1:
730
+ // authentication bearer required
731
+ // http bearer authentication required
732
+ _a.sent();
733
+ if (pageSize !== undefined) {
734
+ localVarQueryParameter['pageSize'] = pageSize;
735
+ }
736
+ if (pageToken !== undefined) {
737
+ localVarQueryParameter['pageToken'] = pageToken;
738
+ }
739
+ if (filter !== undefined) {
740
+ localVarQueryParameter['filter'] = filter;
741
+ }
742
+ if (search !== undefined) {
743
+ localVarQueryParameter['search'] = search;
744
+ }
745
+ if (order !== undefined) {
746
+ localVarQueryParameter['order'] = order;
747
+ }
748
+ if (expand !== undefined) {
749
+ localVarQueryParameter['expand'] = expand;
750
+ }
751
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
752
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
753
+ }
754
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
755
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
756
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
757
+ return [2 /*return*/, {
758
+ url: (0, common_1.toPathString)(localVarUrlObj),
759
+ options: localVarRequestOptions,
760
+ }];
761
+ }
762
+ });
763
+ });
764
+ },
765
+ /**
766
+ * 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.
767
+ * @summary List product fields
768
+ * @param {string} [authorization] Bearer Token
769
+ * @param {number} [pageSize] Page size
770
+ * @param {string} [pageToken] Page token
771
+ * @param {string} [filter] List filter
772
+ * @param {string} [search] Search query
773
+ * @param {string} [order] Ordering criteria
774
+ * @param {string} [expand] Extra fields to fetch
775
+ * @param {*} [options] Override http request option.
776
+ * @throws {RequiredError}
777
+ */
778
+ listProductFields: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
779
+ if (options === void 0) { options = {}; }
780
+ return __awaiter(_this, void 0, void 0, function () {
781
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
782
+ return __generator(this, function (_a) {
783
+ switch (_a.label) {
784
+ case 0:
785
+ localVarPath = "/insuranceservice/v1/product-fields";
786
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
787
+ if (configuration) {
788
+ baseOptions = configuration.baseOptions;
789
+ baseAccessToken = configuration.accessToken;
790
+ }
791
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
792
+ localVarHeaderParameter = {};
793
+ localVarQueryParameter = {};
794
+ // authentication bearer required
795
+ // http bearer authentication required
796
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
797
+ case 1:
798
+ // authentication bearer required
799
+ // http bearer authentication required
800
+ _a.sent();
801
+ if (pageSize !== undefined) {
802
+ localVarQueryParameter['pageSize'] = pageSize;
803
+ }
804
+ if (pageToken !== undefined) {
805
+ localVarQueryParameter['pageToken'] = pageToken;
806
+ }
807
+ if (filter !== undefined) {
808
+ localVarQueryParameter['filter'] = filter;
809
+ }
810
+ if (search !== undefined) {
811
+ localVarQueryParameter['search'] = search;
812
+ }
813
+ if (order !== undefined) {
814
+ localVarQueryParameter['order'] = order;
815
+ }
816
+ if (expand !== undefined) {
817
+ localVarQueryParameter['expand'] = expand;
818
+ }
819
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
820
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
821
+ }
822
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
823
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
824
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
825
+ return [2 /*return*/, {
826
+ url: (0, common_1.toPathString)(localVarUrlObj),
827
+ options: localVarRequestOptions,
828
+ }];
829
+ }
830
+ });
831
+ });
832
+ },
833
+ /**
834
+ * 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.
835
+ * @summary List products
836
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
837
+ * @param {number} [pageSize] Page size
838
+ * @param {string} [pageToken] Page token
839
+ * @param {string} [filter] List filter
840
+ * @param {string} [search] Search query
841
+ * @param {string} [order] Ordering criteria
842
+ * @param {string} [expand] Extra fields to fetch
843
+ * @param {*} [options] Override http request option.
844
+ * @throws {RequiredError}
845
+ */
846
+ listProducts: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
847
+ if (options === void 0) { options = {}; }
848
+ return __awaiter(_this, void 0, void 0, function () {
849
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
850
+ return __generator(this, function (_a) {
851
+ switch (_a.label) {
852
+ case 0:
853
+ localVarPath = "/insuranceservice/v1/products";
854
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
855
+ if (configuration) {
856
+ baseOptions = configuration.baseOptions;
857
+ baseAccessToken = configuration.accessToken;
858
+ }
859
+ localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
860
+ localVarHeaderParameter = {};
861
+ localVarQueryParameter = {};
862
+ // authentication bearer required
863
+ // http bearer authentication required
864
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
865
+ case 1:
866
+ // authentication bearer required
867
+ // http bearer authentication required
868
+ _a.sent();
869
+ if (pageSize !== undefined) {
870
+ localVarQueryParameter['pageSize'] = pageSize;
871
+ }
872
+ if (pageToken !== undefined) {
873
+ localVarQueryParameter['pageToken'] = pageToken;
874
+ }
875
+ if (filter !== undefined) {
876
+ localVarQueryParameter['filter'] = filter;
877
+ }
878
+ if (search !== undefined) {
879
+ localVarQueryParameter['search'] = search;
880
+ }
881
+ if (order !== undefined) {
882
+ localVarQueryParameter['order'] = order;
883
+ }
884
+ if (expand !== undefined) {
885
+ localVarQueryParameter['expand'] = expand;
886
+ }
887
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
888
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
889
+ }
890
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
891
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
892
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
893
+ return [2 /*return*/, {
894
+ url: (0, common_1.toPathString)(localVarUrlObj),
895
+ options: localVarRequestOptions,
896
+ }];
897
+ }
898
+ });
899
+ });
900
+ },
901
+ /**
902
+ * 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.
903
+ * @summary Upload product factors
904
+ * @param {string} [authorization] Bearer Token
905
+ * @param {number} [productVersionId]
906
+ * @param {any} [factors]
907
+ * @param {*} [options] Override http request option.
908
+ * @throws {RequiredError}
909
+ */
910
+ storeProductFactors: function (authorization, productVersionId, factors, options) {
911
+ if (options === void 0) { options = {}; }
912
+ return __awaiter(_this, void 0, void 0, function () {
913
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, localVarFormParams, headersFromBaseOptions;
914
+ return __generator(this, function (_a) {
915
+ switch (_a.label) {
916
+ case 0:
917
+ localVarPath = "/insuranceservice/v1/product-factors";
918
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
919
+ if (configuration) {
920
+ baseOptions = configuration.baseOptions;
921
+ baseAccessToken = configuration.accessToken;
922
+ }
923
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
924
+ localVarHeaderParameter = {};
925
+ localVarQueryParameter = {};
926
+ localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
927
+ // authentication bearer required
928
+ // http bearer authentication required
929
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
930
+ case 1:
931
+ // authentication bearer required
932
+ // http bearer authentication required
933
+ _a.sent();
934
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
935
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
936
+ }
937
+ if (productVersionId !== undefined) {
938
+ localVarFormParams.append('productVersionId', productVersionId);
939
+ }
940
+ if (factors !== undefined) {
941
+ localVarFormParams.append('factors', factors);
942
+ }
943
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
944
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
945
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
946
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
947
+ localVarRequestOptions.data = localVarFormParams;
948
+ return [2 /*return*/, {
949
+ url: (0, common_1.toPathString)(localVarUrlObj),
950
+ options: localVarRequestOptions,
951
+ }];
952
+ }
953
+ });
954
+ });
955
+ },
956
+ /**
957
+ * Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
958
+ * @summary Validate product factors
959
+ * @param {string} [authorization] Bearer Token
960
+ * @param {*} [options] Override http request option.
961
+ * @throws {RequiredError}
962
+ */
963
+ validateProductFactors: function (authorization, options) {
964
+ if (options === void 0) { options = {}; }
965
+ return __awaiter(_this, void 0, void 0, function () {
966
+ var localVarPath, localVarUrlObj, baseOptions, baseAccessToken, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
967
+ return __generator(this, function (_a) {
968
+ switch (_a.label) {
969
+ case 0:
970
+ localVarPath = "/insuranceservice/v1/product-factors/validate";
971
+ localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
972
+ if (configuration) {
973
+ baseOptions = configuration.baseOptions;
974
+ baseAccessToken = configuration.accessToken;
975
+ }
976
+ localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
977
+ localVarHeaderParameter = {};
978
+ localVarQueryParameter = {};
979
+ // authentication bearer required
980
+ // http bearer authentication required
981
+ return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
982
+ case 1:
983
+ // authentication bearer required
984
+ // http bearer authentication required
985
+ _a.sent();
986
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
987
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
988
+ }
989
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
990
+ headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
991
+ localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
992
+ return [2 /*return*/, {
993
+ url: (0, common_1.toPathString)(localVarUrlObj),
994
+ options: localVarRequestOptions,
995
+ }];
996
+ }
997
+ });
998
+ });
999
+ },
1000
+ };
1001
+ };
1002
+ exports.ProductsApiAxiosParamCreator = ProductsApiAxiosParamCreator;
1003
+ /**
1004
+ * ProductsApi - functional programming interface
1005
+ * @export
1006
+ */
1007
+ var ProductsApiFp = function (configuration) {
1008
+ var localVarAxiosParamCreator = (0, exports.ProductsApiAxiosParamCreator)(configuration);
1009
+ return {
1010
+ /**
1011
+ * Creates a premium formula.
1012
+ * @summary Create the premium formula
1013
+ * @param {CreatePremiumFormulaRequestDto} createPremiumFormulaRequestDto
1014
+ * @param {string} [authorization] Bearer Token
1015
+ * @param {*} [options] Override http request option.
1016
+ * @throws {RequiredError}
1017
+ */
1018
+ createPremiumFormula: function (createPremiumFormulaRequestDto, authorization, options) {
1019
+ return __awaiter(this, void 0, void 0, function () {
1020
+ var localVarAxiosArgs;
1021
+ return __generator(this, function (_a) {
1022
+ switch (_a.label) {
1023
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createPremiumFormula(createPremiumFormulaRequestDto, authorization, options)];
1024
+ case 1:
1025
+ localVarAxiosArgs = _a.sent();
1026
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1027
+ }
1028
+ });
1029
+ });
1030
+ },
1031
+ /**
1032
+ * Creates a blank product. The product cannot be used as long as it is missing product factors, insured objects and premium formulas.
1033
+ * @summary Create the product
1034
+ * @param {CreateProductRequestDto} createProductRequestDto
1035
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1036
+ * @param {*} [options] Override http request option.
1037
+ * @throws {RequiredError}
1038
+ */
1039
+ createProduct: function (createProductRequestDto, authorization, options) {
1040
+ return __awaiter(this, void 0, void 0, function () {
1041
+ var localVarAxiosArgs;
1042
+ return __generator(this, function (_a) {
1043
+ switch (_a.label) {
1044
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createProduct(createProductRequestDto, authorization, options)];
1045
+ case 1:
1046
+ localVarAxiosArgs = _a.sent();
1047
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1048
+ }
1049
+ });
1050
+ });
1051
+ },
1052
+ /**
1053
+ * Create a product field in the database.
1054
+ * @summary Create the product field
1055
+ * @param {CreateProductFieldRequestDto} createProductFieldRequestDto
1056
+ * @param {string} [authorization] Bearer Token
1057
+ * @param {*} [options] Override http request option.
1058
+ * @throws {RequiredError}
1059
+ */
1060
+ createProductField: function (createProductFieldRequestDto, authorization, options) {
1061
+ return __awaiter(this, void 0, void 0, function () {
1062
+ var localVarAxiosArgs;
1063
+ return __generator(this, function (_a) {
1064
+ switch (_a.label) {
1065
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.createProductField(createProductFieldRequestDto, authorization, options)];
1066
+ case 1:
1067
+ localVarAxiosArgs = _a.sent();
1068
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1069
+ }
1070
+ });
1071
+ });
1072
+ },
1073
+ /**
1074
+ * 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.
1075
+ * @summary Retrieve the premium formula
1076
+ * @param {string} id
1077
+ * @param {number} id2 Product formula id
1078
+ * @param {string} [authorization] Bearer Token
1079
+ * @param {*} [options] Override http request option.
1080
+ * @throws {RequiredError}
1081
+ */
1082
+ getPremiumFormula: function (id, id2, authorization, options) {
1083
+ return __awaiter(this, void 0, void 0, function () {
1084
+ var localVarAxiosArgs;
1085
+ return __generator(this, function (_a) {
1086
+ switch (_a.label) {
1087
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getPremiumFormula(id, id2, authorization, options)];
1088
+ case 1:
1089
+ localVarAxiosArgs = _a.sent();
1090
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1091
+ }
1092
+ });
1093
+ });
1094
+ },
1095
+ /**
1096
+ * 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.
1097
+ * @summary Retrieve the product
1098
+ * @param {string} code Unique identifier for the object.
1099
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1100
+ * @param {string} [expand] Fields to expand response by
1101
+ * @param {*} [options] Override http request option.
1102
+ * @throws {RequiredError}
1103
+ */
1104
+ getProductByCode: function (code, authorization, expand, options) {
1105
+ return __awaiter(this, void 0, void 0, function () {
1106
+ var localVarAxiosArgs;
1107
+ return __generator(this, function (_a) {
1108
+ switch (_a.label) {
1109
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProductByCode(code, authorization, expand, options)];
1110
+ case 1:
1111
+ localVarAxiosArgs = _a.sent();
1112
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1113
+ }
1114
+ });
1115
+ });
1116
+ },
1117
+ /**
1118
+ * 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.
1119
+ * @summary Retrieve the product factor
1120
+ * @param {number} id
1121
+ * @param {number} id2 Product factor id
1122
+ * @param {string} [authorization] Bearer Token
1123
+ * @param {string} [expand] Fields to expand response by
1124
+ * @param {*} [options] Override http request option.
1125
+ * @throws {RequiredError}
1126
+ */
1127
+ getProductFactor: function (id, id2, authorization, expand, options) {
1128
+ return __awaiter(this, void 0, void 0, function () {
1129
+ var localVarAxiosArgs;
1130
+ return __generator(this, function (_a) {
1131
+ switch (_a.label) {
1132
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProductFactor(id, id2, authorization, expand, options)];
1133
+ case 1:
1134
+ localVarAxiosArgs = _a.sent();
1135
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1136
+ }
1137
+ });
1138
+ });
1139
+ },
1140
+ /**
1141
+ * Get the value corresponding to a specific product factor.
1142
+ * @summary Get product factor value
1143
+ * @param {number} productVersionId Product Version Id
1144
+ * @param {string} label Product factor label
1145
+ * @param {string} [authorization] Bearer Token
1146
+ * @param {*} [options] Override http request option.
1147
+ * @throws {RequiredError}
1148
+ */
1149
+ getProductFactorValue: function (productVersionId, label, authorization, options) {
1150
+ return __awaiter(this, void 0, void 0, function () {
1151
+ var localVarAxiosArgs;
1152
+ return __generator(this, function (_a) {
1153
+ switch (_a.label) {
1154
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProductFactorValue(productVersionId, label, authorization, options)];
1155
+ case 1:
1156
+ localVarAxiosArgs = _a.sent();
1157
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1158
+ }
1159
+ });
1160
+ });
1161
+ },
1162
+ /**
1163
+ * 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.
1164
+ * @summary Retrieve the product field
1165
+ * @param {string} id
1166
+ * @param {string} [authorization] Bearer Token
1167
+ * @param {*} [options] Override http request option.
1168
+ * @throws {RequiredError}
1169
+ */
1170
+ getProductField: function (id, authorization, options) {
1171
+ return __awaiter(this, void 0, void 0, function () {
1172
+ var localVarAxiosArgs;
1173
+ return __generator(this, function (_a) {
1174
+ switch (_a.label) {
1175
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProductField(id, authorization, options)];
1176
+ case 1:
1177
+ localVarAxiosArgs = _a.sent();
1178
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1179
+ }
1180
+ });
1181
+ });
1182
+ },
1183
+ /**
1184
+ * 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.
1185
+ * @summary Retrieve the product version
1186
+ * @param {string} id
1187
+ * @param {number} id2 Product version id
1188
+ * @param {string} [authorization] Bearer Token
1189
+ * @param {*} [options] Override http request option.
1190
+ * @throws {RequiredError}
1191
+ */
1192
+ getProductVersion: function (id, id2, authorization, options) {
1193
+ return __awaiter(this, void 0, void 0, function () {
1194
+ var localVarAxiosArgs;
1195
+ return __generator(this, function (_a) {
1196
+ switch (_a.label) {
1197
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.getProductVersion(id, id2, authorization, options)];
1198
+ case 1:
1199
+ localVarAxiosArgs = _a.sent();
1200
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1201
+ }
1202
+ });
1203
+ });
1204
+ },
1205
+ /**
1206
+ * 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.
1207
+ * @summary List premium formulas
1208
+ * @param {string} [authorization] Bearer Token
1209
+ * @param {number} [pageSize] Page size
1210
+ * @param {string} [pageToken] Page token
1211
+ * @param {string} [filter] List filter
1212
+ * @param {string} [search] Search query
1213
+ * @param {string} [order] Ordering criteria
1214
+ * @param {string} [expand] Extra fields to fetch
1215
+ * @param {*} [options] Override http request option.
1216
+ * @throws {RequiredError}
1217
+ */
1218
+ listPremiumFormulas: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
1219
+ return __awaiter(this, void 0, void 0, function () {
1220
+ var localVarAxiosArgs;
1221
+ return __generator(this, function (_a) {
1222
+ switch (_a.label) {
1223
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listPremiumFormulas(authorization, pageSize, pageToken, filter, search, order, expand, options)];
1224
+ case 1:
1225
+ localVarAxiosArgs = _a.sent();
1226
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1227
+ }
1228
+ });
1229
+ });
1230
+ },
1231
+ /**
1232
+ * 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.
1233
+ * @summary List product factors
1234
+ * @param {string} [authorization] Bearer Token
1235
+ * @param {number} [pageSize] Page size
1236
+ * @param {string} [pageToken] Page token
1237
+ * @param {string} [filter] List filter
1238
+ * @param {string} [search] Search query
1239
+ * @param {string} [order] Ordering criteria
1240
+ * @param {string} [expand] Extra fields to fetch
1241
+ * @param {*} [options] Override http request option.
1242
+ * @throws {RequiredError}
1243
+ */
1244
+ listProductFactors: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
1245
+ return __awaiter(this, void 0, void 0, function () {
1246
+ var localVarAxiosArgs;
1247
+ return __generator(this, function (_a) {
1248
+ switch (_a.label) {
1249
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProductFactors(authorization, pageSize, pageToken, filter, search, order, expand, options)];
1250
+ case 1:
1251
+ localVarAxiosArgs = _a.sent();
1252
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1253
+ }
1254
+ });
1255
+ });
1256
+ },
1257
+ /**
1258
+ * 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.
1259
+ * @summary List product field types
1260
+ * @param {string} [authorization] Bearer Token
1261
+ * @param {number} [pageSize] Page size
1262
+ * @param {string} [pageToken] Page token
1263
+ * @param {string} [filter] List filter
1264
+ * @param {string} [search] Search query
1265
+ * @param {string} [order] Ordering criteria
1266
+ * @param {string} [expand] Extra fields to fetch
1267
+ * @param {*} [options] Override http request option.
1268
+ * @throws {RequiredError}
1269
+ */
1270
+ listProductFieldTypes: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
1271
+ return __awaiter(this, void 0, void 0, function () {
1272
+ var localVarAxiosArgs;
1273
+ return __generator(this, function (_a) {
1274
+ switch (_a.label) {
1275
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProductFieldTypes(authorization, pageSize, pageToken, filter, search, order, expand, options)];
1276
+ case 1:
1277
+ localVarAxiosArgs = _a.sent();
1278
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1279
+ }
1280
+ });
1281
+ });
1282
+ },
1283
+ /**
1284
+ * 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.
1285
+ * @summary List product fields
1286
+ * @param {string} [authorization] Bearer Token
1287
+ * @param {number} [pageSize] Page size
1288
+ * @param {string} [pageToken] Page token
1289
+ * @param {string} [filter] List filter
1290
+ * @param {string} [search] Search query
1291
+ * @param {string} [order] Ordering criteria
1292
+ * @param {string} [expand] Extra fields to fetch
1293
+ * @param {*} [options] Override http request option.
1294
+ * @throws {RequiredError}
1295
+ */
1296
+ listProductFields: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
1297
+ return __awaiter(this, void 0, void 0, function () {
1298
+ var localVarAxiosArgs;
1299
+ return __generator(this, function (_a) {
1300
+ switch (_a.label) {
1301
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProductFields(authorization, pageSize, pageToken, filter, search, order, expand, options)];
1302
+ case 1:
1303
+ localVarAxiosArgs = _a.sent();
1304
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1305
+ }
1306
+ });
1307
+ });
1308
+ },
1309
+ /**
1310
+ * 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.
1311
+ * @summary List products
1312
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1313
+ * @param {number} [pageSize] Page size
1314
+ * @param {string} [pageToken] Page token
1315
+ * @param {string} [filter] List filter
1316
+ * @param {string} [search] Search query
1317
+ * @param {string} [order] Ordering criteria
1318
+ * @param {string} [expand] Extra fields to fetch
1319
+ * @param {*} [options] Override http request option.
1320
+ * @throws {RequiredError}
1321
+ */
1322
+ listProducts: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
1323
+ return __awaiter(this, void 0, void 0, function () {
1324
+ var localVarAxiosArgs;
1325
+ return __generator(this, function (_a) {
1326
+ switch (_a.label) {
1327
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.listProducts(authorization, pageSize, pageToken, filter, search, order, expand, options)];
1328
+ case 1:
1329
+ localVarAxiosArgs = _a.sent();
1330
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1331
+ }
1332
+ });
1333
+ });
1334
+ },
1335
+ /**
1336
+ * 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.
1337
+ * @summary Upload product factors
1338
+ * @param {string} [authorization] Bearer Token
1339
+ * @param {number} [productVersionId]
1340
+ * @param {any} [factors]
1341
+ * @param {*} [options] Override http request option.
1342
+ * @throws {RequiredError}
1343
+ */
1344
+ storeProductFactors: function (authorization, productVersionId, factors, options) {
1345
+ return __awaiter(this, void 0, void 0, function () {
1346
+ var localVarAxiosArgs;
1347
+ return __generator(this, function (_a) {
1348
+ switch (_a.label) {
1349
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.storeProductFactors(authorization, productVersionId, factors, options)];
1350
+ case 1:
1351
+ localVarAxiosArgs = _a.sent();
1352
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1353
+ }
1354
+ });
1355
+ });
1356
+ },
1357
+ /**
1358
+ * Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
1359
+ * @summary Validate product factors
1360
+ * @param {string} [authorization] Bearer Token
1361
+ * @param {*} [options] Override http request option.
1362
+ * @throws {RequiredError}
1363
+ */
1364
+ validateProductFactors: function (authorization, options) {
1365
+ return __awaiter(this, void 0, void 0, function () {
1366
+ var localVarAxiosArgs;
1367
+ return __generator(this, function (_a) {
1368
+ switch (_a.label) {
1369
+ case 0: return [4 /*yield*/, localVarAxiosParamCreator.validateProductFactors(authorization, options)];
1370
+ case 1:
1371
+ localVarAxiosArgs = _a.sent();
1372
+ return [2 /*return*/, (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)];
1373
+ }
1374
+ });
1375
+ });
1376
+ },
1377
+ };
1378
+ };
1379
+ exports.ProductsApiFp = ProductsApiFp;
1380
+ /**
1381
+ * ProductsApi - factory interface
1382
+ * @export
1383
+ */
1384
+ var ProductsApiFactory = function (configuration, basePath, axios) {
1385
+ var localVarFp = (0, exports.ProductsApiFp)(configuration);
1386
+ return {
1387
+ /**
1388
+ * Creates a premium formula.
1389
+ * @summary Create the premium formula
1390
+ * @param {CreatePremiumFormulaRequestDto} createPremiumFormulaRequestDto
1391
+ * @param {string} [authorization] Bearer Token
1392
+ * @param {*} [options] Override http request option.
1393
+ * @throws {RequiredError}
1394
+ */
1395
+ createPremiumFormula: function (createPremiumFormulaRequestDto, authorization, options) {
1396
+ return localVarFp.createPremiumFormula(createPremiumFormulaRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1397
+ },
1398
+ /**
1399
+ * Creates a blank product. The product cannot be used as long as it is missing product factors, insured objects and premium formulas.
1400
+ * @summary Create the product
1401
+ * @param {CreateProductRequestDto} createProductRequestDto
1402
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1403
+ * @param {*} [options] Override http request option.
1404
+ * @throws {RequiredError}
1405
+ */
1406
+ createProduct: function (createProductRequestDto, authorization, options) {
1407
+ return localVarFp.createProduct(createProductRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1408
+ },
1409
+ /**
1410
+ * Create a product field in the database.
1411
+ * @summary Create the product field
1412
+ * @param {CreateProductFieldRequestDto} createProductFieldRequestDto
1413
+ * @param {string} [authorization] Bearer Token
1414
+ * @param {*} [options] Override http request option.
1415
+ * @throws {RequiredError}
1416
+ */
1417
+ createProductField: function (createProductFieldRequestDto, authorization, options) {
1418
+ return localVarFp.createProductField(createProductFieldRequestDto, authorization, options).then(function (request) { return request(axios, basePath); });
1419
+ },
1420
+ /**
1421
+ * 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.
1422
+ * @summary Retrieve the premium formula
1423
+ * @param {string} id
1424
+ * @param {number} id2 Product formula id
1425
+ * @param {string} [authorization] Bearer Token
1426
+ * @param {*} [options] Override http request option.
1427
+ * @throws {RequiredError}
1428
+ */
1429
+ getPremiumFormula: function (id, id2, authorization, options) {
1430
+ return localVarFp.getPremiumFormula(id, id2, authorization, options).then(function (request) { return request(axios, basePath); });
1431
+ },
1432
+ /**
1433
+ * 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.
1434
+ * @summary Retrieve the product
1435
+ * @param {string} code Unique identifier for the object.
1436
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1437
+ * @param {string} [expand] Fields to expand response by
1438
+ * @param {*} [options] Override http request option.
1439
+ * @throws {RequiredError}
1440
+ */
1441
+ getProductByCode: function (code, authorization, expand, options) {
1442
+ return localVarFp.getProductByCode(code, authorization, expand, options).then(function (request) { return request(axios, basePath); });
1443
+ },
1444
+ /**
1445
+ * 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.
1446
+ * @summary Retrieve the product factor
1447
+ * @param {number} id
1448
+ * @param {number} id2 Product factor id
1449
+ * @param {string} [authorization] Bearer Token
1450
+ * @param {string} [expand] Fields to expand response by
1451
+ * @param {*} [options] Override http request option.
1452
+ * @throws {RequiredError}
1453
+ */
1454
+ getProductFactor: function (id, id2, authorization, expand, options) {
1455
+ return localVarFp.getProductFactor(id, id2, authorization, expand, options).then(function (request) { return request(axios, basePath); });
1456
+ },
1457
+ /**
1458
+ * Get the value corresponding to a specific product factor.
1459
+ * @summary Get product factor value
1460
+ * @param {number} productVersionId Product Version Id
1461
+ * @param {string} label Product factor label
1462
+ * @param {string} [authorization] Bearer Token
1463
+ * @param {*} [options] Override http request option.
1464
+ * @throws {RequiredError}
1465
+ */
1466
+ getProductFactorValue: function (productVersionId, label, authorization, options) {
1467
+ return localVarFp.getProductFactorValue(productVersionId, label, authorization, options).then(function (request) { return request(axios, basePath); });
1468
+ },
1469
+ /**
1470
+ * 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.
1471
+ * @summary Retrieve the product field
1472
+ * @param {string} id
1473
+ * @param {string} [authorization] Bearer Token
1474
+ * @param {*} [options] Override http request option.
1475
+ * @throws {RequiredError}
1476
+ */
1477
+ getProductField: function (id, authorization, options) {
1478
+ return localVarFp.getProductField(id, authorization, options).then(function (request) { return request(axios, basePath); });
1479
+ },
1480
+ /**
1481
+ * 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.
1482
+ * @summary Retrieve the product version
1483
+ * @param {string} id
1484
+ * @param {number} id2 Product version id
1485
+ * @param {string} [authorization] Bearer Token
1486
+ * @param {*} [options] Override http request option.
1487
+ * @throws {RequiredError}
1488
+ */
1489
+ getProductVersion: function (id, id2, authorization, options) {
1490
+ return localVarFp.getProductVersion(id, id2, authorization, options).then(function (request) { return request(axios, basePath); });
1491
+ },
1492
+ /**
1493
+ * 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.
1494
+ * @summary List premium formulas
1495
+ * @param {string} [authorization] Bearer Token
1496
+ * @param {number} [pageSize] Page size
1497
+ * @param {string} [pageToken] Page token
1498
+ * @param {string} [filter] List filter
1499
+ * @param {string} [search] Search query
1500
+ * @param {string} [order] Ordering criteria
1501
+ * @param {string} [expand] Extra fields to fetch
1502
+ * @param {*} [options] Override http request option.
1503
+ * @throws {RequiredError}
1504
+ */
1505
+ listPremiumFormulas: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
1506
+ return localVarFp.listPremiumFormulas(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
1507
+ },
1508
+ /**
1509
+ * 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.
1510
+ * @summary List product factors
1511
+ * @param {string} [authorization] Bearer Token
1512
+ * @param {number} [pageSize] Page size
1513
+ * @param {string} [pageToken] Page token
1514
+ * @param {string} [filter] List filter
1515
+ * @param {string} [search] Search query
1516
+ * @param {string} [order] Ordering criteria
1517
+ * @param {string} [expand] Extra fields to fetch
1518
+ * @param {*} [options] Override http request option.
1519
+ * @throws {RequiredError}
1520
+ */
1521
+ listProductFactors: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
1522
+ return localVarFp.listProductFactors(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
1523
+ },
1524
+ /**
1525
+ * 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.
1526
+ * @summary List product field types
1527
+ * @param {string} [authorization] Bearer Token
1528
+ * @param {number} [pageSize] Page size
1529
+ * @param {string} [pageToken] Page token
1530
+ * @param {string} [filter] List filter
1531
+ * @param {string} [search] Search query
1532
+ * @param {string} [order] Ordering criteria
1533
+ * @param {string} [expand] Extra fields to fetch
1534
+ * @param {*} [options] Override http request option.
1535
+ * @throws {RequiredError}
1536
+ */
1537
+ listProductFieldTypes: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
1538
+ return localVarFp.listProductFieldTypes(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
1539
+ },
1540
+ /**
1541
+ * 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.
1542
+ * @summary List product fields
1543
+ * @param {string} [authorization] Bearer Token
1544
+ * @param {number} [pageSize] Page size
1545
+ * @param {string} [pageToken] Page token
1546
+ * @param {string} [filter] List filter
1547
+ * @param {string} [search] Search query
1548
+ * @param {string} [order] Ordering criteria
1549
+ * @param {string} [expand] Extra fields to fetch
1550
+ * @param {*} [options] Override http request option.
1551
+ * @throws {RequiredError}
1552
+ */
1553
+ listProductFields: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
1554
+ return localVarFp.listProductFields(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
1555
+ },
1556
+ /**
1557
+ * 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.
1558
+ * @summary List products
1559
+ * @param {string} [authorization] Bearer Token: provided by the login endpoint under the name accessToken.
1560
+ * @param {number} [pageSize] Page size
1561
+ * @param {string} [pageToken] Page token
1562
+ * @param {string} [filter] List filter
1563
+ * @param {string} [search] Search query
1564
+ * @param {string} [order] Ordering criteria
1565
+ * @param {string} [expand] Extra fields to fetch
1566
+ * @param {*} [options] Override http request option.
1567
+ * @throws {RequiredError}
1568
+ */
1569
+ listProducts: function (authorization, pageSize, pageToken, filter, search, order, expand, options) {
1570
+ return localVarFp.listProducts(authorization, pageSize, pageToken, filter, search, order, expand, options).then(function (request) { return request(axios, basePath); });
1571
+ },
1572
+ /**
1573
+ * 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.
1574
+ * @summary Upload product factors
1575
+ * @param {string} [authorization] Bearer Token
1576
+ * @param {number} [productVersionId]
1577
+ * @param {any} [factors]
1578
+ * @param {*} [options] Override http request option.
1579
+ * @throws {RequiredError}
1580
+ */
1581
+ storeProductFactors: function (authorization, productVersionId, factors, options) {
1582
+ return localVarFp.storeProductFactors(authorization, productVersionId, factors, options).then(function (request) { return request(axios, basePath); });
1583
+ },
1584
+ /**
1585
+ * Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
1586
+ * @summary Validate product factors
1587
+ * @param {string} [authorization] Bearer Token
1588
+ * @param {*} [options] Override http request option.
1589
+ * @throws {RequiredError}
1590
+ */
1591
+ validateProductFactors: function (authorization, options) {
1592
+ return localVarFp.validateProductFactors(authorization, options).then(function (request) { return request(axios, basePath); });
1593
+ },
1594
+ };
1595
+ };
1596
+ exports.ProductsApiFactory = ProductsApiFactory;
1597
+ /**
1598
+ * ProductsApi - object-oriented interface
1599
+ * @export
1600
+ * @class ProductsApi
1601
+ * @extends {BaseAPI}
1602
+ */
1603
+ var ProductsApi = /** @class */ (function (_super) {
1604
+ __extends(ProductsApi, _super);
1605
+ function ProductsApi() {
1606
+ return _super !== null && _super.apply(this, arguments) || this;
1607
+ }
1608
+ /**
1609
+ * Creates a premium formula.
1610
+ * @summary Create the premium formula
1611
+ * @param {ProductsApiCreatePremiumFormulaRequest} requestParameters Request parameters.
1612
+ * @param {*} [options] Override http request option.
1613
+ * @throws {RequiredError}
1614
+ * @memberof ProductsApi
1615
+ */
1616
+ ProductsApi.prototype.createPremiumFormula = function (requestParameters, options) {
1617
+ var _this = this;
1618
+ return (0, exports.ProductsApiFp)(this.configuration).createPremiumFormula(requestParameters.createPremiumFormulaRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1619
+ };
1620
+ /**
1621
+ * Creates a blank product. The product cannot be used as long as it is missing product factors, insured objects and premium formulas.
1622
+ * @summary Create the product
1623
+ * @param {ProductsApiCreateProductRequest} requestParameters Request parameters.
1624
+ * @param {*} [options] Override http request option.
1625
+ * @throws {RequiredError}
1626
+ * @memberof ProductsApi
1627
+ */
1628
+ ProductsApi.prototype.createProduct = function (requestParameters, options) {
1629
+ var _this = this;
1630
+ return (0, exports.ProductsApiFp)(this.configuration).createProduct(requestParameters.createProductRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1631
+ };
1632
+ /**
1633
+ * Create a product field in the database.
1634
+ * @summary Create the product field
1635
+ * @param {ProductsApiCreateProductFieldRequest} requestParameters Request parameters.
1636
+ * @param {*} [options] Override http request option.
1637
+ * @throws {RequiredError}
1638
+ * @memberof ProductsApi
1639
+ */
1640
+ ProductsApi.prototype.createProductField = function (requestParameters, options) {
1641
+ var _this = this;
1642
+ return (0, exports.ProductsApiFp)(this.configuration).createProductField(requestParameters.createProductFieldRequestDto, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1643
+ };
1644
+ /**
1645
+ * 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.
1646
+ * @summary Retrieve the premium formula
1647
+ * @param {ProductsApiGetPremiumFormulaRequest} requestParameters Request parameters.
1648
+ * @param {*} [options] Override http request option.
1649
+ * @throws {RequiredError}
1650
+ * @memberof ProductsApi
1651
+ */
1652
+ ProductsApi.prototype.getPremiumFormula = function (requestParameters, options) {
1653
+ var _this = this;
1654
+ return (0, exports.ProductsApiFp)(this.configuration).getPremiumFormula(requestParameters.id, requestParameters.id2, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1655
+ };
1656
+ /**
1657
+ * 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.
1658
+ * @summary Retrieve the product
1659
+ * @param {ProductsApiGetProductByCodeRequest} requestParameters Request parameters.
1660
+ * @param {*} [options] Override http request option.
1661
+ * @throws {RequiredError}
1662
+ * @memberof ProductsApi
1663
+ */
1664
+ ProductsApi.prototype.getProductByCode = function (requestParameters, options) {
1665
+ var _this = this;
1666
+ return (0, exports.ProductsApiFp)(this.configuration).getProductByCode(requestParameters.code, requestParameters.authorization, requestParameters.expand, options).then(function (request) { return request(_this.axios, _this.basePath); });
1667
+ };
1668
+ /**
1669
+ * 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.
1670
+ * @summary Retrieve the product factor
1671
+ * @param {ProductsApiGetProductFactorRequest} requestParameters Request parameters.
1672
+ * @param {*} [options] Override http request option.
1673
+ * @throws {RequiredError}
1674
+ * @memberof ProductsApi
1675
+ */
1676
+ ProductsApi.prototype.getProductFactor = function (requestParameters, options) {
1677
+ var _this = this;
1678
+ 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); });
1679
+ };
1680
+ /**
1681
+ * Get the value corresponding to a specific product factor.
1682
+ * @summary Get product factor value
1683
+ * @param {ProductsApiGetProductFactorValueRequest} requestParameters Request parameters.
1684
+ * @param {*} [options] Override http request option.
1685
+ * @throws {RequiredError}
1686
+ * @memberof ProductsApi
1687
+ */
1688
+ ProductsApi.prototype.getProductFactorValue = function (requestParameters, options) {
1689
+ var _this = this;
1690
+ return (0, exports.ProductsApiFp)(this.configuration).getProductFactorValue(requestParameters.productVersionId, requestParameters.label, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1691
+ };
1692
+ /**
1693
+ * 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.
1694
+ * @summary Retrieve the product field
1695
+ * @param {ProductsApiGetProductFieldRequest} requestParameters Request parameters.
1696
+ * @param {*} [options] Override http request option.
1697
+ * @throws {RequiredError}
1698
+ * @memberof ProductsApi
1699
+ */
1700
+ ProductsApi.prototype.getProductField = function (requestParameters, options) {
1701
+ var _this = this;
1702
+ return (0, exports.ProductsApiFp)(this.configuration).getProductField(requestParameters.id, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1703
+ };
1704
+ /**
1705
+ * 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.
1706
+ * @summary Retrieve the product version
1707
+ * @param {ProductsApiGetProductVersionRequest} requestParameters Request parameters.
1708
+ * @param {*} [options] Override http request option.
1709
+ * @throws {RequiredError}
1710
+ * @memberof ProductsApi
1711
+ */
1712
+ ProductsApi.prototype.getProductVersion = function (requestParameters, options) {
1713
+ var _this = this;
1714
+ return (0, exports.ProductsApiFp)(this.configuration).getProductVersion(requestParameters.id, requestParameters.id2, requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1715
+ };
1716
+ /**
1717
+ * 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.
1718
+ * @summary List premium formulas
1719
+ * @param {ProductsApiListPremiumFormulasRequest} requestParameters Request parameters.
1720
+ * @param {*} [options] Override http request option.
1721
+ * @throws {RequiredError}
1722
+ * @memberof ProductsApi
1723
+ */
1724
+ ProductsApi.prototype.listPremiumFormulas = function (requestParameters, options) {
1725
+ var _this = this;
1726
+ if (requestParameters === void 0) { requestParameters = {}; }
1727
+ 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); });
1728
+ };
1729
+ /**
1730
+ * 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.
1731
+ * @summary List product factors
1732
+ * @param {ProductsApiListProductFactorsRequest} requestParameters Request parameters.
1733
+ * @param {*} [options] Override http request option.
1734
+ * @throws {RequiredError}
1735
+ * @memberof ProductsApi
1736
+ */
1737
+ ProductsApi.prototype.listProductFactors = function (requestParameters, options) {
1738
+ var _this = this;
1739
+ if (requestParameters === void 0) { requestParameters = {}; }
1740
+ 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); });
1741
+ };
1742
+ /**
1743
+ * 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.
1744
+ * @summary List product field types
1745
+ * @param {ProductsApiListProductFieldTypesRequest} requestParameters Request parameters.
1746
+ * @param {*} [options] Override http request option.
1747
+ * @throws {RequiredError}
1748
+ * @memberof ProductsApi
1749
+ */
1750
+ ProductsApi.prototype.listProductFieldTypes = function (requestParameters, options) {
1751
+ var _this = this;
1752
+ if (requestParameters === void 0) { requestParameters = {}; }
1753
+ 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); });
1754
+ };
1755
+ /**
1756
+ * 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.
1757
+ * @summary List product fields
1758
+ * @param {ProductsApiListProductFieldsRequest} requestParameters Request parameters.
1759
+ * @param {*} [options] Override http request option.
1760
+ * @throws {RequiredError}
1761
+ * @memberof ProductsApi
1762
+ */
1763
+ ProductsApi.prototype.listProductFields = function (requestParameters, options) {
1764
+ var _this = this;
1765
+ if (requestParameters === void 0) { requestParameters = {}; }
1766
+ 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); });
1767
+ };
1768
+ /**
1769
+ * 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.
1770
+ * @summary List products
1771
+ * @param {ProductsApiListProductsRequest} requestParameters Request parameters.
1772
+ * @param {*} [options] Override http request option.
1773
+ * @throws {RequiredError}
1774
+ * @memberof ProductsApi
1775
+ */
1776
+ ProductsApi.prototype.listProducts = function (requestParameters, options) {
1777
+ var _this = this;
1778
+ if (requestParameters === void 0) { requestParameters = {}; }
1779
+ 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); });
1780
+ };
1781
+ /**
1782
+ * 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.
1783
+ * @summary Upload product factors
1784
+ * @param {ProductsApiStoreProductFactorsRequest} requestParameters Request parameters.
1785
+ * @param {*} [options] Override http request option.
1786
+ * @throws {RequiredError}
1787
+ * @memberof ProductsApi
1788
+ */
1789
+ ProductsApi.prototype.storeProductFactors = function (requestParameters, options) {
1790
+ var _this = this;
1791
+ if (requestParameters === void 0) { requestParameters = {}; }
1792
+ return (0, exports.ProductsApiFp)(this.configuration).storeProductFactors(requestParameters.authorization, requestParameters.productVersionId, requestParameters.factors, options).then(function (request) { return request(_this.axios, _this.basePath); });
1793
+ };
1794
+ /**
1795
+ * Validate a CSV file containing all product factors. The columns must be in the following order: group,label,key,name,value.
1796
+ * @summary Validate product factors
1797
+ * @param {ProductsApiValidateProductFactorsRequest} requestParameters Request parameters.
1798
+ * @param {*} [options] Override http request option.
1799
+ * @throws {RequiredError}
1800
+ * @memberof ProductsApi
1801
+ */
1802
+ ProductsApi.prototype.validateProductFactors = function (requestParameters, options) {
1803
+ var _this = this;
1804
+ if (requestParameters === void 0) { requestParameters = {}; }
1805
+ return (0, exports.ProductsApiFp)(this.configuration).validateProductFactors(requestParameters.authorization, options).then(function (request) { return request(_this.axios, _this.basePath); });
1806
+ };
1807
+ return ProductsApi;
1808
+ }(base_1.BaseAPI));
1809
+ exports.ProductsApi = ProductsApi;