@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,442 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL InsuranceService
5
+ * The EMIL InsuranceService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { CreateInsuredObjectRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateInsuredObjectResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { GetInsuredObjectResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { ListInsuredObjectsResponseClass } from '../models';
31
+ /**
32
+ * InsuredObjectsApi - axios parameter creator
33
+ * @export
34
+ */
35
+ export const InsuredObjectsApiAxiosParamCreator = function (configuration?: Configuration) {
36
+ return {
37
+ /**
38
+ * Creates an insured object.
39
+ * @summary Create the insured object
40
+ * @param {CreateInsuredObjectRequestDto} createInsuredObjectRequestDto
41
+ * @param {string} [authorization] Bearer Token
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ createInsuredObject: async (createInsuredObjectRequestDto: CreateInsuredObjectRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
46
+ // verify required parameter 'createInsuredObjectRequestDto' is not null or undefined
47
+ assertParamExists('createInsuredObject', 'createInsuredObjectRequestDto', createInsuredObjectRequestDto)
48
+ const localVarPath = `/insuranceservice/v1/insured-objects`;
49
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
50
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
51
+ let baseOptions;
52
+ let baseAccessToken;
53
+ if (configuration) {
54
+ baseOptions = configuration.baseOptions;
55
+ baseAccessToken = configuration.accessToken;
56
+ }
57
+
58
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
59
+ const localVarHeaderParameter = {} as any;
60
+ const localVarQueryParameter = {} as any;
61
+
62
+ // authentication bearer required
63
+ // http bearer authentication required
64
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
65
+
66
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
67
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
68
+ }
69
+
70
+
71
+
72
+ localVarHeaderParameter['Content-Type'] = 'application/json';
73
+
74
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
75
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
76
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
77
+ localVarRequestOptions.data = serializeDataIfNeeded(createInsuredObjectRequestDto, localVarRequestOptions, configuration)
78
+
79
+ return {
80
+ url: toPathString(localVarUrlObj),
81
+ options: localVarRequestOptions,
82
+ };
83
+ },
84
+ /**
85
+ * Retrieves the details of the insured object that was previously created. Supply the unique insured object id that was returned when you created it and Emil Api will return the corresponding insured object information.
86
+ * @summary Retrieve the insured object
87
+ * @param {string} id
88
+ * @param {string} [authorization] Bearer Token
89
+ * @param {*} [options] Override http request option.
90
+ * @throws {RequiredError}
91
+ */
92
+ getInsuredObject: async (id: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
93
+ // verify required parameter 'id' is not null or undefined
94
+ assertParamExists('getInsuredObject', 'id', id)
95
+ const localVarPath = `/insuranceservice/v1/insured-objects/{id}`
96
+ .replace(`{${"id"}}`, encodeURIComponent(String(id)));
97
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
98
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
99
+ let baseOptions;
100
+ let baseAccessToken;
101
+ if (configuration) {
102
+ baseOptions = configuration.baseOptions;
103
+ baseAccessToken = configuration.accessToken;
104
+ }
105
+
106
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
107
+ const localVarHeaderParameter = {} as any;
108
+ const localVarQueryParameter = {} as any;
109
+
110
+ // authentication bearer required
111
+ // http bearer authentication required
112
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
113
+
114
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
115
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
116
+ }
117
+
118
+
119
+
120
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
121
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
122
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
123
+
124
+ return {
125
+ url: toPathString(localVarUrlObj),
126
+ options: localVarRequestOptions,
127
+ };
128
+ },
129
+ /**
130
+ * Returns a list of insured objects you have previously created. The insured objects are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
131
+ * @summary List insured objects
132
+ * @param {string} [authorization] Bearer Token
133
+ * @param {number} [pageSize] Page size
134
+ * @param {string} [pageToken] Page token
135
+ * @param {string} [filter] List filter
136
+ * @param {string} [search] Search query
137
+ * @param {string} [order] Ordering criteria
138
+ * @param {string} [expand] Extra fields to fetch
139
+ * @param {*} [options] Override http request option.
140
+ * @throws {RequiredError}
141
+ */
142
+ listInsuredObjects: async (authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
143
+ const localVarPath = `/insuranceservice/v1/insured-objects`;
144
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
145
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
146
+ let baseOptions;
147
+ let baseAccessToken;
148
+ if (configuration) {
149
+ baseOptions = configuration.baseOptions;
150
+ baseAccessToken = configuration.accessToken;
151
+ }
152
+
153
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
154
+ const localVarHeaderParameter = {} as any;
155
+ const localVarQueryParameter = {} as any;
156
+
157
+ // authentication bearer required
158
+ // http bearer authentication required
159
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
160
+
161
+ if (pageSize !== undefined) {
162
+ localVarQueryParameter['pageSize'] = pageSize;
163
+ }
164
+
165
+ if (pageToken !== undefined) {
166
+ localVarQueryParameter['pageToken'] = pageToken;
167
+ }
168
+
169
+ if (filter !== undefined) {
170
+ localVarQueryParameter['filter'] = filter;
171
+ }
172
+
173
+ if (search !== undefined) {
174
+ localVarQueryParameter['search'] = search;
175
+ }
176
+
177
+ if (order !== undefined) {
178
+ localVarQueryParameter['order'] = order;
179
+ }
180
+
181
+ if (expand !== undefined) {
182
+ localVarQueryParameter['expand'] = expand;
183
+ }
184
+
185
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
186
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
187
+ }
188
+
189
+
190
+
191
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
192
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
193
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
194
+
195
+ return {
196
+ url: toPathString(localVarUrlObj),
197
+ options: localVarRequestOptions,
198
+ };
199
+ },
200
+ }
201
+ };
202
+
203
+ /**
204
+ * InsuredObjectsApi - functional programming interface
205
+ * @export
206
+ */
207
+ export const InsuredObjectsApiFp = function(configuration?: Configuration) {
208
+ const localVarAxiosParamCreator = InsuredObjectsApiAxiosParamCreator(configuration)
209
+ return {
210
+ /**
211
+ * Creates an insured object.
212
+ * @summary Create the insured object
213
+ * @param {CreateInsuredObjectRequestDto} createInsuredObjectRequestDto
214
+ * @param {string} [authorization] Bearer Token
215
+ * @param {*} [options] Override http request option.
216
+ * @throws {RequiredError}
217
+ */
218
+ async createInsuredObject(createInsuredObjectRequestDto: CreateInsuredObjectRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateInsuredObjectResponseClass>> {
219
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createInsuredObject(createInsuredObjectRequestDto, authorization, options);
220
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
221
+ },
222
+ /**
223
+ * Retrieves the details of the insured object that was previously created. Supply the unique insured object id that was returned when you created it and Emil Api will return the corresponding insured object information.
224
+ * @summary Retrieve the insured object
225
+ * @param {string} id
226
+ * @param {string} [authorization] Bearer Token
227
+ * @param {*} [options] Override http request option.
228
+ * @throws {RequiredError}
229
+ */
230
+ async getInsuredObject(id: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetInsuredObjectResponseClass>> {
231
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getInsuredObject(id, authorization, options);
232
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
233
+ },
234
+ /**
235
+ * Returns a list of insured objects you have previously created. The insured objects are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
236
+ * @summary List insured objects
237
+ * @param {string} [authorization] Bearer Token
238
+ * @param {number} [pageSize] Page size
239
+ * @param {string} [pageToken] Page token
240
+ * @param {string} [filter] List filter
241
+ * @param {string} [search] Search query
242
+ * @param {string} [order] Ordering criteria
243
+ * @param {string} [expand] Extra fields to fetch
244
+ * @param {*} [options] Override http request option.
245
+ * @throws {RequiredError}
246
+ */
247
+ async listInsuredObjects(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ListInsuredObjectsResponseClass>> {
248
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listInsuredObjects(authorization, pageSize, pageToken, filter, search, order, expand, options);
249
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
250
+ },
251
+ }
252
+ };
253
+
254
+ /**
255
+ * InsuredObjectsApi - factory interface
256
+ * @export
257
+ */
258
+ export const InsuredObjectsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
259
+ const localVarFp = InsuredObjectsApiFp(configuration)
260
+ return {
261
+ /**
262
+ * Creates an insured object.
263
+ * @summary Create the insured object
264
+ * @param {CreateInsuredObjectRequestDto} createInsuredObjectRequestDto
265
+ * @param {string} [authorization] Bearer Token
266
+ * @param {*} [options] Override http request option.
267
+ * @throws {RequiredError}
268
+ */
269
+ createInsuredObject(createInsuredObjectRequestDto: CreateInsuredObjectRequestDto, authorization?: string, options?: any): AxiosPromise<CreateInsuredObjectResponseClass> {
270
+ return localVarFp.createInsuredObject(createInsuredObjectRequestDto, authorization, options).then((request) => request(axios, basePath));
271
+ },
272
+ /**
273
+ * Retrieves the details of the insured object that was previously created. Supply the unique insured object id that was returned when you created it and Emil Api will return the corresponding insured object information.
274
+ * @summary Retrieve the insured object
275
+ * @param {string} id
276
+ * @param {string} [authorization] Bearer Token
277
+ * @param {*} [options] Override http request option.
278
+ * @throws {RequiredError}
279
+ */
280
+ getInsuredObject(id: string, authorization?: string, options?: any): AxiosPromise<GetInsuredObjectResponseClass> {
281
+ return localVarFp.getInsuredObject(id, authorization, options).then((request) => request(axios, basePath));
282
+ },
283
+ /**
284
+ * Returns a list of insured objects you have previously created. The insured objects are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
285
+ * @summary List insured objects
286
+ * @param {string} [authorization] Bearer Token
287
+ * @param {number} [pageSize] Page size
288
+ * @param {string} [pageToken] Page token
289
+ * @param {string} [filter] List filter
290
+ * @param {string} [search] Search query
291
+ * @param {string} [order] Ordering criteria
292
+ * @param {string} [expand] Extra fields to fetch
293
+ * @param {*} [options] Override http request option.
294
+ * @throws {RequiredError}
295
+ */
296
+ listInsuredObjects(authorization?: string, pageSize?: number, pageToken?: string, filter?: string, search?: string, order?: string, expand?: string, options?: any): AxiosPromise<ListInsuredObjectsResponseClass> {
297
+ return localVarFp.listInsuredObjects(authorization, pageSize, pageToken, filter, search, order, expand, options).then((request) => request(axios, basePath));
298
+ },
299
+ };
300
+ };
301
+
302
+ /**
303
+ * Request parameters for createInsuredObject operation in InsuredObjectsApi.
304
+ * @export
305
+ * @interface InsuredObjectsApiCreateInsuredObjectRequest
306
+ */
307
+ export interface InsuredObjectsApiCreateInsuredObjectRequest {
308
+ /**
309
+ *
310
+ * @type {CreateInsuredObjectRequestDto}
311
+ * @memberof InsuredObjectsApiCreateInsuredObject
312
+ */
313
+ readonly createInsuredObjectRequestDto: CreateInsuredObjectRequestDto
314
+
315
+ /**
316
+ * Bearer Token
317
+ * @type {string}
318
+ * @memberof InsuredObjectsApiCreateInsuredObject
319
+ */
320
+ readonly authorization?: string
321
+ }
322
+
323
+ /**
324
+ * Request parameters for getInsuredObject operation in InsuredObjectsApi.
325
+ * @export
326
+ * @interface InsuredObjectsApiGetInsuredObjectRequest
327
+ */
328
+ export interface InsuredObjectsApiGetInsuredObjectRequest {
329
+ /**
330
+ *
331
+ * @type {string}
332
+ * @memberof InsuredObjectsApiGetInsuredObject
333
+ */
334
+ readonly id: string
335
+
336
+ /**
337
+ * Bearer Token
338
+ * @type {string}
339
+ * @memberof InsuredObjectsApiGetInsuredObject
340
+ */
341
+ readonly authorization?: string
342
+ }
343
+
344
+ /**
345
+ * Request parameters for listInsuredObjects operation in InsuredObjectsApi.
346
+ * @export
347
+ * @interface InsuredObjectsApiListInsuredObjectsRequest
348
+ */
349
+ export interface InsuredObjectsApiListInsuredObjectsRequest {
350
+ /**
351
+ * Bearer Token
352
+ * @type {string}
353
+ * @memberof InsuredObjectsApiListInsuredObjects
354
+ */
355
+ readonly authorization?: string
356
+
357
+ /**
358
+ * Page size
359
+ * @type {number}
360
+ * @memberof InsuredObjectsApiListInsuredObjects
361
+ */
362
+ readonly pageSize?: number
363
+
364
+ /**
365
+ * Page token
366
+ * @type {string}
367
+ * @memberof InsuredObjectsApiListInsuredObjects
368
+ */
369
+ readonly pageToken?: string
370
+
371
+ /**
372
+ * List filter
373
+ * @type {string}
374
+ * @memberof InsuredObjectsApiListInsuredObjects
375
+ */
376
+ readonly filter?: string
377
+
378
+ /**
379
+ * Search query
380
+ * @type {string}
381
+ * @memberof InsuredObjectsApiListInsuredObjects
382
+ */
383
+ readonly search?: string
384
+
385
+ /**
386
+ * Ordering criteria
387
+ * @type {string}
388
+ * @memberof InsuredObjectsApiListInsuredObjects
389
+ */
390
+ readonly order?: string
391
+
392
+ /**
393
+ * Extra fields to fetch
394
+ * @type {string}
395
+ * @memberof InsuredObjectsApiListInsuredObjects
396
+ */
397
+ readonly expand?: string
398
+ }
399
+
400
+ /**
401
+ * InsuredObjectsApi - object-oriented interface
402
+ * @export
403
+ * @class InsuredObjectsApi
404
+ * @extends {BaseAPI}
405
+ */
406
+ export class InsuredObjectsApi extends BaseAPI {
407
+ /**
408
+ * Creates an insured object.
409
+ * @summary Create the insured object
410
+ * @param {InsuredObjectsApiCreateInsuredObjectRequest} requestParameters Request parameters.
411
+ * @param {*} [options] Override http request option.
412
+ * @throws {RequiredError}
413
+ * @memberof InsuredObjectsApi
414
+ */
415
+ public createInsuredObject(requestParameters: InsuredObjectsApiCreateInsuredObjectRequest, options?: AxiosRequestConfig) {
416
+ return InsuredObjectsApiFp(this.configuration).createInsuredObject(requestParameters.createInsuredObjectRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
417
+ }
418
+
419
+ /**
420
+ * Retrieves the details of the insured object that was previously created. Supply the unique insured object id that was returned when you created it and Emil Api will return the corresponding insured object information.
421
+ * @summary Retrieve the insured object
422
+ * @param {InsuredObjectsApiGetInsuredObjectRequest} requestParameters Request parameters.
423
+ * @param {*} [options] Override http request option.
424
+ * @throws {RequiredError}
425
+ * @memberof InsuredObjectsApi
426
+ */
427
+ public getInsuredObject(requestParameters: InsuredObjectsApiGetInsuredObjectRequest, options?: AxiosRequestConfig) {
428
+ return InsuredObjectsApiFp(this.configuration).getInsuredObject(requestParameters.id, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
429
+ }
430
+
431
+ /**
432
+ * Returns a list of insured objects you have previously created. The insured objects are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
433
+ * @summary List insured objects
434
+ * @param {InsuredObjectsApiListInsuredObjectsRequest} requestParameters Request parameters.
435
+ * @param {*} [options] Override http request option.
436
+ * @throws {RequiredError}
437
+ * @memberof InsuredObjectsApi
438
+ */
439
+ public listInsuredObjects(requestParameters: InsuredObjectsApiListInsuredObjectsRequest = {}, options?: AxiosRequestConfig) {
440
+ return InsuredObjectsApiFp(this.configuration).listInsuredObjects(requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filter, requestParameters.search, requestParameters.order, requestParameters.expand, options).then((request) => request(this.axios, this.basePath));
441
+ }
442
+ }
@@ -0,0 +1,163 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * EMIL InsuranceService
5
+ * The EMIL InsuranceService API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+
16
+ import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig } from 'axios';
17
+ import { Configuration } from '../configuration';
18
+ // Some imports not used depending on template conditions
19
+ // @ts-ignore
20
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
21
+ // @ts-ignore
22
+ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
+ // @ts-ignore
24
+ import { SharedCreateLeadRequestDto } from '../models';
25
+ /**
26
+ * LeadsApi - axios parameter creator
27
+ * @export
28
+ */
29
+ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration) {
30
+ return {
31
+ /**
32
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
33
+ * @summary Create the lead
34
+ * @param {SharedCreateLeadRequestDto} sharedCreateLeadRequestDto
35
+ * @param {string} [authorization] Bearer Token
36
+ * @param {*} [options] Override http request option.
37
+ * @throws {RequiredError}
38
+ */
39
+ createLead: async (sharedCreateLeadRequestDto: SharedCreateLeadRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
40
+ // verify required parameter 'sharedCreateLeadRequestDto' is not null or undefined
41
+ assertParamExists('createLead', 'sharedCreateLeadRequestDto', sharedCreateLeadRequestDto)
42
+ const localVarPath = `/insuranceservice/v1/leads`;
43
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
44
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
45
+ let baseOptions;
46
+ let baseAccessToken;
47
+ if (configuration) {
48
+ baseOptions = configuration.baseOptions;
49
+ baseAccessToken = configuration.accessToken;
50
+ }
51
+
52
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
53
+ const localVarHeaderParameter = {} as any;
54
+ const localVarQueryParameter = {} as any;
55
+
56
+ // authentication bearer required
57
+ // http bearer authentication required
58
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
59
+
60
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
61
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
62
+ }
63
+
64
+
65
+
66
+ localVarHeaderParameter['Content-Type'] = 'application/json';
67
+
68
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
69
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
70
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
71
+ localVarRequestOptions.data = serializeDataIfNeeded(sharedCreateLeadRequestDto, localVarRequestOptions, configuration)
72
+
73
+ return {
74
+ url: toPathString(localVarUrlObj),
75
+ options: localVarRequestOptions,
76
+ };
77
+ },
78
+ }
79
+ };
80
+
81
+ /**
82
+ * LeadsApi - functional programming interface
83
+ * @export
84
+ */
85
+ export const LeadsApiFp = function(configuration?: Configuration) {
86
+ const localVarAxiosParamCreator = LeadsApiAxiosParamCreator(configuration)
87
+ return {
88
+ /**
89
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
90
+ * @summary Create the lead
91
+ * @param {SharedCreateLeadRequestDto} sharedCreateLeadRequestDto
92
+ * @param {string} [authorization] Bearer Token
93
+ * @param {*} [options] Override http request option.
94
+ * @throws {RequiredError}
95
+ */
96
+ async createLead(sharedCreateLeadRequestDto: SharedCreateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
97
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createLead(sharedCreateLeadRequestDto, authorization, options);
98
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
99
+ },
100
+ }
101
+ };
102
+
103
+ /**
104
+ * LeadsApi - factory interface
105
+ * @export
106
+ */
107
+ export const LeadsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
108
+ const localVarFp = LeadsApiFp(configuration)
109
+ return {
110
+ /**
111
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
112
+ * @summary Create the lead
113
+ * @param {SharedCreateLeadRequestDto} sharedCreateLeadRequestDto
114
+ * @param {string} [authorization] Bearer Token
115
+ * @param {*} [options] Override http request option.
116
+ * @throws {RequiredError}
117
+ */
118
+ createLead(sharedCreateLeadRequestDto: SharedCreateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<object> {
119
+ return localVarFp.createLead(sharedCreateLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
120
+ },
121
+ };
122
+ };
123
+
124
+ /**
125
+ * Request parameters for createLead operation in LeadsApi.
126
+ * @export
127
+ * @interface LeadsApiCreateLeadRequest
128
+ */
129
+ export interface LeadsApiCreateLeadRequest {
130
+ /**
131
+ *
132
+ * @type {SharedCreateLeadRequestDto}
133
+ * @memberof LeadsApiCreateLead
134
+ */
135
+ readonly sharedCreateLeadRequestDto: SharedCreateLeadRequestDto
136
+
137
+ /**
138
+ * Bearer Token
139
+ * @type {string}
140
+ * @memberof LeadsApiCreateLead
141
+ */
142
+ readonly authorization?: string
143
+ }
144
+
145
+ /**
146
+ * LeadsApi - object-oriented interface
147
+ * @export
148
+ * @class LeadsApi
149
+ * @extends {BaseAPI}
150
+ */
151
+ export class LeadsApi extends BaseAPI {
152
+ /**
153
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
154
+ * @summary Create the lead
155
+ * @param {LeadsApiCreateLeadRequest} requestParameters Request parameters.
156
+ * @param {*} [options] Override http request option.
157
+ * @throws {RequiredError}
158
+ * @memberof LeadsApi
159
+ */
160
+ public createLead(requestParameters: LeadsApiCreateLeadRequest, options?: AxiosRequestConfig) {
161
+ return LeadsApiFp(this.configuration).createLead(requestParameters.sharedCreateLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
162
+ }
163
+ }