@emilgroup/public-api-sdk-node 1.0.2 → 1.1.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 (171) hide show
  1. package/.openapi-generator/FILES +30 -1
  2. package/README.md +3 -5
  3. package/api/documents-api.ts +31 -17
  4. package/api/leads-api.ts +482 -0
  5. package/api/notifications-api.ts +15 -9
  6. package/api/{payment-setup-api.ts → payments-setup-api.ts} +56 -44
  7. package/api/products-api.ts +73 -433
  8. package/api.ts +7 -5
  9. package/base.ts +3 -3
  10. package/common.ts +6 -6
  11. package/configuration.ts +3 -3
  12. package/dist/api/documents-api.d.ts +31 -18
  13. package/dist/api/documents-api.js +28 -16
  14. package/dist/api/leads-api.d.ts +266 -0
  15. package/dist/api/leads-api.js +506 -0
  16. package/dist/api/notifications-api.d.ts +15 -10
  17. package/dist/api/notifications-api.js +12 -8
  18. package/dist/api/{payment-setup-api.d.ts → payments-setup-api.d.ts} +50 -40
  19. package/dist/api/{payment-setup-api.js → payments-setup-api.js} +47 -39
  20. package/dist/api/products-api.d.ts +75 -251
  21. package/dist/api/products-api.js +52 -383
  22. package/dist/api.d.ts +5 -4
  23. package/dist/api.js +5 -4
  24. package/dist/base.d.ts +3 -3
  25. package/dist/base.js +4 -4
  26. package/dist/common.d.ts +6 -6
  27. package/dist/common.js +4 -4
  28. package/dist/configuration.d.ts +3 -3
  29. package/dist/configuration.js +3 -3
  30. package/dist/index.d.ts +3 -3
  31. package/dist/index.js +3 -3
  32. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +8 -8
  33. package/dist/models/complete-braintree-payment-setup-request-dto.js +3 -3
  34. package/dist/models/complete-payment-setup-request-dto.d.ts +3 -3
  35. package/dist/models/complete-payment-setup-request-dto.js +3 -3
  36. package/dist/models/complete-payment-setup-response-class.d.ts +25 -0
  37. package/dist/models/complete-payment-setup-response-class.js +15 -0
  38. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +9 -9
  39. package/dist/models/complete-stripe-payment-setup-request-dto.js +3 -3
  40. package/dist/models/create-account-request-dto.d.ts +19 -6
  41. package/dist/models/create-account-request-dto.js +10 -4
  42. package/dist/models/create-bank-account-request-dto.d.ts +7 -7
  43. package/dist/models/create-bank-account-request-dto.js +3 -3
  44. package/dist/models/create-custom-application-request-dto.d.ts +6 -6
  45. package/dist/models/create-custom-application-request-dto.js +3 -3
  46. package/dist/models/create-custom-application-response-class.d.ts +24 -0
  47. package/dist/models/create-custom-application-response-class.js +15 -0
  48. package/dist/models/create-document-request-dto.d.ts +21 -15
  49. package/dist/models/create-document-request-dto.js +3 -3
  50. package/dist/models/create-estimated-invoice-request-dto.d.ts +11 -11
  51. package/dist/models/create-estimated-invoice-request-dto.js +3 -3
  52. package/dist/models/create-estimated-invoice-response-class.d.ts +25 -0
  53. package/dist/models/create-estimated-invoice-response-class.js +15 -0
  54. package/dist/models/create-lead-request-dto.d.ts +23 -23
  55. package/dist/models/create-lead-request-dto.js +3 -3
  56. package/dist/models/create-lead-response-class.d.ts +25 -0
  57. package/dist/models/create-lead-response-class.js +15 -0
  58. package/dist/models/document-class.d.ts +130 -0
  59. package/dist/models/document-class.js +41 -0
  60. package/dist/models/get-custom-css-response-class.d.ts +24 -0
  61. package/dist/models/get-custom-css-response-class.js +15 -0
  62. package/dist/models/get-lead-response-class.d.ts +25 -0
  63. package/dist/models/get-lead-response-class.js +15 -0
  64. package/dist/models/index.d.ts +27 -0
  65. package/dist/models/index.js +27 -0
  66. package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +4 -4
  67. package/dist/models/initiate-braintree-payment-setup-request-dto.js +3 -3
  68. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +24 -0
  69. package/dist/models/initiate-braintree-payment-setup-response-class.js +15 -0
  70. package/dist/models/initiate-lead-response-class.d.ts +24 -0
  71. package/dist/models/initiate-lead-response-class.js +15 -0
  72. package/dist/models/initiate-payment-setup-request-dto.d.ts +3 -3
  73. package/dist/models/initiate-payment-setup-request-dto.js +3 -3
  74. package/dist/models/initiate-payment-setup-response-class.d.ts +32 -0
  75. package/dist/models/initiate-payment-setup-response-class.js +15 -0
  76. package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +4 -4
  77. package/dist/models/initiate-stripe-payment-setup-request-dto.js +3 -3
  78. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +30 -0
  79. package/dist/models/initiate-stripe-payment-setup-response-class.js +15 -0
  80. package/dist/models/insured-object-class.d.ts +67 -0
  81. package/dist/models/insured-object-class.js +15 -0
  82. package/dist/models/insured-object-type-class.d.ts +48 -0
  83. package/dist/models/insured-object-type-class.js +15 -0
  84. package/dist/models/invoice-class.d.ts +128 -0
  85. package/dist/models/invoice-class.js +15 -0
  86. package/dist/models/invoice-item-class.d.ts +108 -0
  87. package/dist/models/invoice-item-class.js +15 -0
  88. package/dist/models/invoice-status-class.d.ts +42 -0
  89. package/dist/models/invoice-status-class.js +15 -0
  90. package/dist/models/lead-account-class.d.ts +109 -0
  91. package/dist/models/lead-account-class.js +22 -0
  92. package/dist/models/lead-bank-account-class.d.ts +30 -0
  93. package/dist/models/lead-bank-account-class.js +15 -0
  94. package/dist/models/lead-class.d.ts +77 -0
  95. package/dist/models/lead-class.js +15 -0
  96. package/dist/models/lead-policy-class.d.ts +44 -0
  97. package/dist/models/lead-policy-class.js +15 -0
  98. package/dist/models/lead-policy-object-class.d.ts +30 -0
  99. package/dist/models/lead-policy-object-class.js +15 -0
  100. package/dist/models/list-documents-response-class.d.ts +31 -0
  101. package/dist/models/list-documents-response-class.js +15 -0
  102. package/dist/models/payment-method-class.d.ts +60 -0
  103. package/dist/models/payment-method-class.js +15 -0
  104. package/dist/models/policy-object-request-dto.d.ts +5 -5
  105. package/dist/models/policy-object-request-dto.js +3 -3
  106. package/dist/models/premium-override-dto.d.ts +8 -8
  107. package/dist/models/premium-override-dto.js +3 -3
  108. package/dist/models/premium-override-request-dto.d.ts +4 -4
  109. package/dist/models/premium-override-request-dto.js +3 -3
  110. package/dist/models/product-factor-class.d.ts +54 -0
  111. package/dist/models/product-factor-class.js +15 -0
  112. package/dist/models/product-field-class.d.ts +120 -0
  113. package/dist/models/product-field-class.js +15 -0
  114. package/dist/models/send-notification-request-dto.d.ts +5 -5
  115. package/dist/models/send-notification-request-dto.js +3 -3
  116. package/dist/models/send-notification-response-class.d.ts +24 -0
  117. package/dist/models/send-notification-response-class.js +15 -0
  118. package/dist/models/update-lead-request-dto.d.ts +18 -18
  119. package/dist/models/update-lead-request-dto.js +3 -3
  120. package/dist/models/update-lead-response-class.d.ts +25 -0
  121. package/dist/models/update-lead-response-class.js +15 -0
  122. package/dist/models/uploaded-document-dto.d.ts +4 -4
  123. package/dist/models/uploaded-document-dto.js +3 -3
  124. package/index.ts +3 -3
  125. package/models/complete-braintree-payment-setup-request-dto.ts +8 -8
  126. package/models/complete-payment-setup-request-dto.ts +3 -3
  127. package/models/complete-payment-setup-response-class.ts +31 -0
  128. package/models/complete-stripe-payment-setup-request-dto.ts +9 -9
  129. package/models/create-account-request-dto.ts +19 -5
  130. package/models/create-bank-account-request-dto.ts +7 -7
  131. package/models/create-custom-application-request-dto.ts +5 -5
  132. package/models/create-custom-application-response-class.ts +30 -0
  133. package/models/create-document-request-dto.ts +19 -13
  134. package/models/create-estimated-invoice-request-dto.ts +10 -10
  135. package/models/create-estimated-invoice-response-class.ts +31 -0
  136. package/models/create-lead-request-dto.ts +22 -22
  137. package/models/create-lead-response-class.ts +31 -0
  138. package/models/document-class.ts +141 -0
  139. package/models/get-custom-css-response-class.ts +30 -0
  140. package/models/get-lead-response-class.ts +31 -0
  141. package/models/index.ts +27 -0
  142. package/models/initiate-braintree-payment-setup-request-dto.ts +4 -4
  143. package/models/initiate-braintree-payment-setup-response-class.ts +30 -0
  144. package/models/initiate-lead-response-class.ts +30 -0
  145. package/models/initiate-payment-setup-request-dto.ts +3 -3
  146. package/models/initiate-payment-setup-response-class.ts +38 -0
  147. package/models/initiate-stripe-payment-setup-request-dto.ts +4 -4
  148. package/models/initiate-stripe-payment-setup-response-class.ts +36 -0
  149. package/models/insured-object-class.ts +73 -0
  150. package/models/insured-object-type-class.ts +54 -0
  151. package/models/invoice-class.ts +134 -0
  152. package/models/invoice-item-class.ts +114 -0
  153. package/models/invoice-status-class.ts +48 -0
  154. package/models/lead-account-class.ts +118 -0
  155. package/models/lead-bank-account-class.ts +36 -0
  156. package/models/lead-class.ts +83 -0
  157. package/models/lead-policy-class.ts +50 -0
  158. package/models/lead-policy-object-class.ts +36 -0
  159. package/models/list-documents-response-class.ts +37 -0
  160. package/models/payment-method-class.ts +66 -0
  161. package/models/policy-object-request-dto.ts +5 -5
  162. package/models/premium-override-dto.ts +6 -6
  163. package/models/premium-override-request-dto.ts +4 -4
  164. package/models/product-factor-class.ts +60 -0
  165. package/models/product-field-class.ts +126 -0
  166. package/models/send-notification-request-dto.ts +5 -5
  167. package/models/send-notification-response-class.ts +30 -0
  168. package/models/update-lead-request-dto.ts +17 -17
  169. package/models/update-lead-response-class.ts +31 -0
  170. package/models/uploaded-document-dto.ts +4 -4
  171. package/package.json +1 -1
@@ -0,0 +1,482 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Emil PublicAPI
5
+ * The Emil Public API description
6
+ *
7
+ * The version of the OpenAPI document: 1.0
8
+ * Contact: kontakt@emil.de
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 { CreateLeadRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { CreateLeadResponseClass } from '../models';
27
+ // @ts-ignore
28
+ import { GetLeadResponseClass } from '../models';
29
+ // @ts-ignore
30
+ import { InitiateLeadResponseClass } from '../models';
31
+ // @ts-ignore
32
+ import { UpdateLeadRequestDto } from '../models';
33
+ // @ts-ignore
34
+ import { UpdateLeadResponseClass } from '../models';
35
+ // URLSearchParams not necessarily used
36
+ // @ts-ignore
37
+ import { URL, URLSearchParams } from 'url';
38
+ const FormData = require('form-data');
39
+ /**
40
+ * LeadsApi - axios parameter creator
41
+ * @export
42
+ */
43
+ export const LeadsApiAxiosParamCreator = function (configuration?: Configuration) {
44
+ return {
45
+ /**
46
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
47
+ * @summary Create the lead
48
+ * @param {CreateLeadRequestDto} createLeadRequestDto
49
+ * @param {string} [authorization] Bearer Token
50
+ * @param {*} [options] Override http request option.
51
+ * @throws {RequiredError}
52
+ */
53
+ createLead: async (createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
54
+ // verify required parameter 'createLeadRequestDto' is not null or undefined
55
+ assertParamExists('createLead', 'createLeadRequestDto', createLeadRequestDto)
56
+ const localVarPath = `/publicapi/v1/leads`;
57
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
58
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
59
+ let baseOptions;
60
+ let baseAccessToken;
61
+ if (configuration) {
62
+ baseOptions = configuration.baseOptions;
63
+ baseAccessToken = configuration.accessToken;
64
+ }
65
+
66
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
67
+ const localVarHeaderParameter = {} as any;
68
+ const localVarQueryParameter = {} as any;
69
+
70
+ // authentication bearer required
71
+ // http bearer authentication required
72
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
73
+
74
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
75
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
76
+ }
77
+
78
+
79
+
80
+ localVarHeaderParameter['Content-Type'] = 'application/json';
81
+
82
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
83
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
84
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
85
+ localVarRequestOptions.data = serializeDataIfNeeded(createLeadRequestDto, localVarRequestOptions, configuration)
86
+
87
+ return {
88
+ url: toPathString(localVarUrlObj),
89
+ options: localVarRequestOptions,
90
+ };
91
+ },
92
+ /**
93
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
94
+ * @summary Retrieve the lead
95
+ * @param {string} code Unique identifier for the object.
96
+ * @param {string} [authorization] Bearer Token
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ getLead: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
101
+ // verify required parameter 'code' is not null or undefined
102
+ assertParamExists('getLead', 'code', code)
103
+ const localVarPath = `/publicapi/v1/leads/{code}`
104
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
105
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
106
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
107
+ let baseOptions;
108
+ let baseAccessToken;
109
+ if (configuration) {
110
+ baseOptions = configuration.baseOptions;
111
+ baseAccessToken = configuration.accessToken;
112
+ }
113
+
114
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
115
+ const localVarHeaderParameter = {} as any;
116
+ const localVarQueryParameter = {} as any;
117
+
118
+ // authentication bearer required
119
+ // http bearer authentication required
120
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
121
+
122
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
123
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
124
+ }
125
+
126
+
127
+
128
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
129
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
130
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
131
+
132
+ return {
133
+ url: toPathString(localVarUrlObj),
134
+ options: localVarRequestOptions,
135
+ };
136
+ },
137
+ /**
138
+ * This will initiate a lead code.
139
+ * @summary Initiate a lead code
140
+ * @param {string} [authorization] Bearer Token
141
+ * @param {*} [options] Override http request option.
142
+ * @throws {RequiredError}
143
+ */
144
+ initiateLead: async (authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
145
+ const localVarPath = `/publicapi/v1/leads/initiate`;
146
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
147
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
148
+ let baseOptions;
149
+ let baseAccessToken;
150
+ if (configuration) {
151
+ baseOptions = configuration.baseOptions;
152
+ baseAccessToken = configuration.accessToken;
153
+ }
154
+
155
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
156
+ const localVarHeaderParameter = {} as any;
157
+ const localVarQueryParameter = {} as any;
158
+
159
+ // authentication bearer required
160
+ // http bearer authentication required
161
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
162
+
163
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
164
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
165
+ }
166
+
167
+
168
+
169
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
170
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
171
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
172
+
173
+ return {
174
+ url: toPathString(localVarUrlObj),
175
+ options: localVarRequestOptions,
176
+ };
177
+ },
178
+ /**
179
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
180
+ * @summary Update the lead
181
+ * @param {string} code Unique identifier for the object.
182
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
183
+ * @param {string} [authorization] Bearer Token
184
+ * @param {*} [options] Override http request option.
185
+ * @throws {RequiredError}
186
+ */
187
+ updateLead: async (code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
188
+ // verify required parameter 'code' is not null or undefined
189
+ assertParamExists('updateLead', 'code', code)
190
+ // verify required parameter 'updateLeadRequestDto' is not null or undefined
191
+ assertParamExists('updateLead', 'updateLeadRequestDto', updateLeadRequestDto)
192
+ const localVarPath = `/publicapi/v1/leads/{code}`
193
+ .replace(`{${"code"}}`, encodeURIComponent(String(code)));
194
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
195
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
196
+ let baseOptions;
197
+ let baseAccessToken;
198
+ if (configuration) {
199
+ baseOptions = configuration.baseOptions;
200
+ baseAccessToken = configuration.accessToken;
201
+ }
202
+
203
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
204
+ const localVarHeaderParameter = {} as any;
205
+ const localVarQueryParameter = {} as any;
206
+
207
+ // authentication bearer required
208
+ // http bearer authentication required
209
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
210
+
211
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
212
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
213
+ }
214
+
215
+
216
+
217
+ localVarHeaderParameter['Content-Type'] = 'application/json';
218
+
219
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
220
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
221
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
222
+ localVarRequestOptions.data = serializeDataIfNeeded(updateLeadRequestDto, localVarRequestOptions, configuration)
223
+
224
+ return {
225
+ url: toPathString(localVarUrlObj),
226
+ options: localVarRequestOptions,
227
+ };
228
+ },
229
+ }
230
+ };
231
+
232
+ /**
233
+ * LeadsApi - functional programming interface
234
+ * @export
235
+ */
236
+ export const LeadsApiFp = function(configuration?: Configuration) {
237
+ const localVarAxiosParamCreator = LeadsApiAxiosParamCreator(configuration)
238
+ return {
239
+ /**
240
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
241
+ * @summary Create the lead
242
+ * @param {CreateLeadRequestDto} createLeadRequestDto
243
+ * @param {string} [authorization] Bearer Token
244
+ * @param {*} [options] Override http request option.
245
+ * @throws {RequiredError}
246
+ */
247
+ async createLead(createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreateLeadResponseClass>> {
248
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createLead(createLeadRequestDto, authorization, options);
249
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
250
+ },
251
+ /**
252
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
253
+ * @summary Retrieve the lead
254
+ * @param {string} code Unique identifier for the object.
255
+ * @param {string} [authorization] Bearer Token
256
+ * @param {*} [options] Override http request option.
257
+ * @throws {RequiredError}
258
+ */
259
+ async getLead(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetLeadResponseClass>> {
260
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getLead(code, authorization, options);
261
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
262
+ },
263
+ /**
264
+ * This will initiate a lead code.
265
+ * @summary Initiate a lead code
266
+ * @param {string} [authorization] Bearer Token
267
+ * @param {*} [options] Override http request option.
268
+ * @throws {RequiredError}
269
+ */
270
+ async initiateLead(authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<InitiateLeadResponseClass>> {
271
+ const localVarAxiosArgs = await localVarAxiosParamCreator.initiateLead(authorization, options);
272
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
273
+ },
274
+ /**
275
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
276
+ * @summary Update the lead
277
+ * @param {string} code Unique identifier for the object.
278
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
279
+ * @param {string} [authorization] Bearer Token
280
+ * @param {*} [options] Override http request option.
281
+ * @throws {RequiredError}
282
+ */
283
+ async updateLead(code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UpdateLeadResponseClass>> {
284
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateLead(code, updateLeadRequestDto, authorization, options);
285
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
286
+ },
287
+ }
288
+ };
289
+
290
+ /**
291
+ * LeadsApi - factory interface
292
+ * @export
293
+ */
294
+ export const LeadsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
295
+ const localVarFp = LeadsApiFp(configuration)
296
+ return {
297
+ /**
298
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
299
+ * @summary Create the lead
300
+ * @param {CreateLeadRequestDto} createLeadRequestDto
301
+ * @param {string} [authorization] Bearer Token
302
+ * @param {*} [options] Override http request option.
303
+ * @throws {RequiredError}
304
+ */
305
+ createLead(createLeadRequestDto: CreateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<CreateLeadResponseClass> {
306
+ return localVarFp.createLead(createLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
307
+ },
308
+ /**
309
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
310
+ * @summary Retrieve the lead
311
+ * @param {string} code Unique identifier for the object.
312
+ * @param {string} [authorization] Bearer Token
313
+ * @param {*} [options] Override http request option.
314
+ * @throws {RequiredError}
315
+ */
316
+ getLead(code: string, authorization?: string, options?: any): AxiosPromise<GetLeadResponseClass> {
317
+ return localVarFp.getLead(code, authorization, options).then((request) => request(axios, basePath));
318
+ },
319
+ /**
320
+ * This will initiate a lead code.
321
+ * @summary Initiate a lead code
322
+ * @param {string} [authorization] Bearer Token
323
+ * @param {*} [options] Override http request option.
324
+ * @throws {RequiredError}
325
+ */
326
+ initiateLead(authorization?: string, options?: any): AxiosPromise<InitiateLeadResponseClass> {
327
+ return localVarFp.initiateLead(authorization, options).then((request) => request(axios, basePath));
328
+ },
329
+ /**
330
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
331
+ * @summary Update the lead
332
+ * @param {string} code Unique identifier for the object.
333
+ * @param {UpdateLeadRequestDto} updateLeadRequestDto
334
+ * @param {string} [authorization] Bearer Token
335
+ * @param {*} [options] Override http request option.
336
+ * @throws {RequiredError}
337
+ */
338
+ updateLead(code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<UpdateLeadResponseClass> {
339
+ return localVarFp.updateLead(code, updateLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
340
+ },
341
+ };
342
+ };
343
+
344
+ /**
345
+ * Request parameters for createLead operation in LeadsApi.
346
+ * @export
347
+ * @interface LeadsApiCreateLeadRequest
348
+ */
349
+ export interface LeadsApiCreateLeadRequest {
350
+ /**
351
+ *
352
+ * @type {CreateLeadRequestDto}
353
+ * @memberof LeadsApiCreateLead
354
+ */
355
+ readonly createLeadRequestDto: CreateLeadRequestDto
356
+
357
+ /**
358
+ * Bearer Token
359
+ * @type {string}
360
+ * @memberof LeadsApiCreateLead
361
+ */
362
+ readonly authorization?: string
363
+ }
364
+
365
+ /**
366
+ * Request parameters for getLead operation in LeadsApi.
367
+ * @export
368
+ * @interface LeadsApiGetLeadRequest
369
+ */
370
+ export interface LeadsApiGetLeadRequest {
371
+ /**
372
+ * Unique identifier for the object.
373
+ * @type {string}
374
+ * @memberof LeadsApiGetLead
375
+ */
376
+ readonly code: string
377
+
378
+ /**
379
+ * Bearer Token
380
+ * @type {string}
381
+ * @memberof LeadsApiGetLead
382
+ */
383
+ readonly authorization?: string
384
+ }
385
+
386
+ /**
387
+ * Request parameters for initiateLead operation in LeadsApi.
388
+ * @export
389
+ * @interface LeadsApiInitiateLeadRequest
390
+ */
391
+ export interface LeadsApiInitiateLeadRequest {
392
+ /**
393
+ * Bearer Token
394
+ * @type {string}
395
+ * @memberof LeadsApiInitiateLead
396
+ */
397
+ readonly authorization?: string
398
+ }
399
+
400
+ /**
401
+ * Request parameters for updateLead operation in LeadsApi.
402
+ * @export
403
+ * @interface LeadsApiUpdateLeadRequest
404
+ */
405
+ export interface LeadsApiUpdateLeadRequest {
406
+ /**
407
+ * Unique identifier for the object.
408
+ * @type {string}
409
+ * @memberof LeadsApiUpdateLead
410
+ */
411
+ readonly code: string
412
+
413
+ /**
414
+ *
415
+ * @type {UpdateLeadRequestDto}
416
+ * @memberof LeadsApiUpdateLead
417
+ */
418
+ readonly updateLeadRequestDto: UpdateLeadRequestDto
419
+
420
+ /**
421
+ * Bearer Token
422
+ * @type {string}
423
+ * @memberof LeadsApiUpdateLead
424
+ */
425
+ readonly authorization?: string
426
+ }
427
+
428
+ /**
429
+ * LeadsApi - object-oriented interface
430
+ * @export
431
+ * @class LeadsApi
432
+ * @extends {BaseAPI}
433
+ */
434
+ export class LeadsApi extends BaseAPI {
435
+ /**
436
+ * This will create a lead. Lead creation is the first step of a workflow responsible for the creation of an account, policy, banking information.
437
+ * @summary Create the lead
438
+ * @param {LeadsApiCreateLeadRequest} requestParameters Request parameters.
439
+ * @param {*} [options] Override http request option.
440
+ * @throws {RequiredError}
441
+ * @memberof LeadsApi
442
+ */
443
+ public createLead(requestParameters: LeadsApiCreateLeadRequest, options?: AxiosRequestConfig) {
444
+ return LeadsApiFp(this.configuration).createLead(requestParameters.createLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
445
+ }
446
+
447
+ /**
448
+ * Retrieves the details of the lead that was previously created. Supply the unique lead code that was returned when you created it and Emil Api will return the corresponding lead information.
449
+ * @summary Retrieve the lead
450
+ * @param {LeadsApiGetLeadRequest} requestParameters Request parameters.
451
+ * @param {*} [options] Override http request option.
452
+ * @throws {RequiredError}
453
+ * @memberof LeadsApi
454
+ */
455
+ public getLead(requestParameters: LeadsApiGetLeadRequest, options?: AxiosRequestConfig) {
456
+ return LeadsApiFp(this.configuration).getLead(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
457
+ }
458
+
459
+ /**
460
+ * This will initiate a lead code.
461
+ * @summary Initiate a lead code
462
+ * @param {LeadsApiInitiateLeadRequest} requestParameters Request parameters.
463
+ * @param {*} [options] Override http request option.
464
+ * @throws {RequiredError}
465
+ * @memberof LeadsApi
466
+ */
467
+ public initiateLead(requestParameters: LeadsApiInitiateLeadRequest = {}, options?: AxiosRequestConfig) {
468
+ return LeadsApiFp(this.configuration).initiateLead(requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
469
+ }
470
+
471
+ /**
472
+ * Updates the specified lead by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
473
+ * @summary Update the lead
474
+ * @param {LeadsApiUpdateLeadRequest} requestParameters Request parameters.
475
+ * @param {*} [options] Override http request option.
476
+ * @throws {RequiredError}
477
+ * @memberof LeadsApi
478
+ */
479
+ public updateLead(requestParameters: LeadsApiUpdateLeadRequest, options?: AxiosRequestConfig) {
480
+ return LeadsApiFp(this.configuration).updateLead(requestParameters.code, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
481
+ }
482
+ }
@@ -1,11 +1,11 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
3
  /**
4
- * EMIL PublicAPI
5
- * The EMIL Public API description
4
+ * Emil PublicAPI
5
+ * The Emil Public API description
6
6
  *
7
7
  * The version of the OpenAPI document: 1.0
8
- *
8
+ * Contact: kontakt@emil.de
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
11
  * https://openapi-generator.tech
@@ -22,6 +22,8 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
22
22
  import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
23
23
  // @ts-ignore
24
24
  import { SendNotificationRequestDto } from '../models';
25
+ // @ts-ignore
26
+ import { SendNotificationResponseClass } from '../models';
25
27
  // URLSearchParams not necessarily used
26
28
  // @ts-ignore
27
29
  import { URL, URLSearchParams } from 'url';
@@ -33,7 +35,8 @@ const FormData = require('form-data');
33
35
  export const NotificationsApiAxiosParamCreator = function (configuration?: Configuration) {
34
36
  return {
35
37
  /**
36
- *
38
+ * This will send an email to the specific recipient set to receive customers\' messages.
39
+ * @summary Send an email.
37
40
  * @param {SendNotificationRequestDto} sendNotificationRequestDto
38
41
  * @param {string} [authorization] Bearer Token
39
42
  * @param {*} [options] Override http request option.
@@ -89,13 +92,14 @@ export const NotificationsApiFp = function(configuration?: Configuration) {
89
92
  const localVarAxiosParamCreator = NotificationsApiAxiosParamCreator(configuration)
90
93
  return {
91
94
  /**
92
- *
95
+ * This will send an email to the specific recipient set to receive customers\' messages.
96
+ * @summary Send an email.
93
97
  * @param {SendNotificationRequestDto} sendNotificationRequestDto
94
98
  * @param {string} [authorization] Bearer Token
95
99
  * @param {*} [options] Override http request option.
96
100
  * @throws {RequiredError}
97
101
  */
98
- async sendNotification(sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
102
+ async sendNotification(sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SendNotificationResponseClass>> {
99
103
  const localVarAxiosArgs = await localVarAxiosParamCreator.sendNotification(sendNotificationRequestDto, authorization, options);
100
104
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
101
105
  },
@@ -110,13 +114,14 @@ export const NotificationsApiFactory = function (configuration?: Configuration,
110
114
  const localVarFp = NotificationsApiFp(configuration)
111
115
  return {
112
116
  /**
113
- *
117
+ * This will send an email to the specific recipient set to receive customers\' messages.
118
+ * @summary Send an email.
114
119
  * @param {SendNotificationRequestDto} sendNotificationRequestDto
115
120
  * @param {string} [authorization] Bearer Token
116
121
  * @param {*} [options] Override http request option.
117
122
  * @throws {RequiredError}
118
123
  */
119
- sendNotification(sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
124
+ sendNotification(sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options?: any): AxiosPromise<SendNotificationResponseClass> {
120
125
  return localVarFp.sendNotification(sendNotificationRequestDto, authorization, options).then((request) => request(axios, basePath));
121
126
  },
122
127
  };
@@ -151,7 +156,8 @@ export interface NotificationsApiSendNotificationRequest {
151
156
  */
152
157
  export class NotificationsApi extends BaseAPI {
153
158
  /**
154
- *
159
+ * This will send an email to the specific recipient set to receive customers\' messages.
160
+ * @summary Send an email.
155
161
  * @param {NotificationsApiSendNotificationRequest} requestParameters Request parameters.
156
162
  * @param {*} [options] Override http request option.
157
163
  * @throws {RequiredError}