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