@emilgroup/billing-sdk-node 1.4.0 → 1.4.1

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 (250) hide show
  1. package/.openapi-generator/FILES +26 -52
  2. package/README.md +2 -2
  3. package/api/correction-invoices-api.ts +183 -0
  4. package/api/estimated-invoices-api.ts +276 -0
  5. package/api/initial-invoices-api.ts +183 -0
  6. package/api/invoices-api.ts +410 -0
  7. package/api/recurring-invoices-api.ts +183 -0
  8. package/api.ts +12 -12
  9. package/base.ts +2 -2
  10. package/common.ts +4 -4
  11. package/configuration.ts +2 -2
  12. package/dist/api/correction-invoices-api.d.ts +106 -0
  13. package/dist/api/correction-invoices-api.js +234 -0
  14. package/dist/api/estimated-invoices-api.d.ts +154 -0
  15. package/dist/api/estimated-invoices-api.js +321 -0
  16. package/dist/api/initial-invoices-api.d.ts +106 -0
  17. package/dist/api/initial-invoices-api.js +234 -0
  18. package/dist/api/invoices-api.d.ts +242 -0
  19. package/dist/api/{documents-api.js → invoices-api.js} +105 -167
  20. package/dist/api/recurring-invoices-api.d.ts +106 -0
  21. package/dist/api/{notifications-api.js → recurring-invoices-api.js} +51 -45
  22. package/dist/api.d.ts +7 -7
  23. package/dist/api.js +7 -7
  24. package/dist/base.d.ts +2 -2
  25. package/dist/base.js +2 -2
  26. package/dist/common.d.ts +4 -4
  27. package/dist/common.js +2 -2
  28. package/dist/configuration.d.ts +2 -2
  29. package/dist/configuration.js +2 -2
  30. package/dist/index.d.ts +2 -2
  31. package/dist/index.js +2 -2
  32. package/dist/models/create-correction-invoices-response-class.d.ts +25 -0
  33. package/dist/models/{complete-braintree-payment-setup-request-dto.js → create-correction-invoices-response-class.js} +2 -2
  34. package/dist/models/create-custom-estimated-invoice-request-dto.d.ts +35 -0
  35. package/dist/models/{create-custom-application-request-dto.js → create-custom-estimated-invoice-request-dto.js} +4 -4
  36. package/dist/models/create-custom-estimated-invoice-response-class.d.ts +24 -0
  37. package/dist/models/{complete-payment-setup-request-dto.js → create-custom-estimated-invoice-response-class.js} +2 -2
  38. package/dist/models/create-estimated-invoice-request-dto.d.ts +8 -32
  39. package/dist/models/create-estimated-invoice-request-dto.js +2 -7
  40. package/dist/models/create-estimated-invoice-response-class.d.ts +6 -6
  41. package/dist/models/create-estimated-invoice-response-class.js +2 -2
  42. package/dist/models/create-invoice-request-dto.d.ts +77 -0
  43. package/dist/models/{premium-override-dto.js → create-invoice-request-dto.js} +12 -12
  44. package/dist/models/create-invoice-response-class.d.ts +25 -0
  45. package/dist/models/{complete-stripe-payment-setup-request-dto.js → create-invoice-response-class.js} +2 -2
  46. package/dist/models/create-invoice-status-request-dto.d.ts +35 -0
  47. package/dist/models/create-invoice-status-request-dto.js +20 -0
  48. package/dist/models/create-termination-invoice-request-dto.d.ts +48 -0
  49. package/dist/models/{complete-payment-setup-response-class.js → create-termination-invoice-request-dto.js} +2 -2
  50. package/dist/models/currency-class.d.ts +48 -0
  51. package/dist/models/currency-class.js +15 -0
  52. package/dist/models/index.d.ts +21 -47
  53. package/dist/models/index.js +21 -47
  54. package/dist/models/invoice-class.d.ts +38 -15
  55. package/dist/models/invoice-class.js +17 -2
  56. package/dist/models/invoice-item-class.d.ts +18 -9
  57. package/dist/models/invoice-item-class.js +11 -2
  58. package/dist/models/invoice-status-class.d.ts +9 -4
  59. package/dist/models/invoice-status-class.js +7 -2
  60. package/dist/models/list-invoices-response-class.d.ts +31 -0
  61. package/dist/models/list-invoices-response-class.js +15 -0
  62. package/dist/models/list-policies-billing-dates-response-class.d.ts +31 -0
  63. package/dist/models/list-policies-billing-dates-response-class.js +15 -0
  64. package/dist/models/list-request-dto.d.ts +54 -0
  65. package/dist/models/list-request-dto.js +15 -0
  66. package/dist/models/omit-type-class.d.ts +144 -0
  67. package/dist/models/omit-type-class.js +30 -0
  68. package/dist/models/policy-billing-date-class.d.ts +42 -0
  69. package/dist/models/policy-billing-date-class.js +15 -0
  70. package/dist/models/policy-dto.d.ts +122 -0
  71. package/dist/models/{lead-account-class.js → policy-dto.js} +8 -8
  72. package/dist/models/{lead-policy-object-class.d.ts → policy-object-dto.d.ts} +18 -6
  73. package/dist/models/policy-object-dto.js +15 -0
  74. package/dist/models/policy-premium-dto.d.ts +43 -0
  75. package/dist/models/policy-premium-dto.js +15 -0
  76. package/dist/models/policy-premium-item-dto.d.ts +55 -0
  77. package/dist/models/policy-premium-item-dto.js +15 -0
  78. package/dist/models/policy-version-dto.d.ts +55 -0
  79. package/dist/models/policy-version-dto.js +15 -0
  80. package/dist/models/{premium-formula-class.d.ts → premium-formula-dto.d.ts} +17 -17
  81. package/dist/models/premium-formula-dto.js +15 -0
  82. package/dist/models/{send-notification-response-class.d.ts → revert-invoice-request-dto.d.ts} +6 -6
  83. package/dist/models/revert-invoice-request-dto.js +15 -0
  84. package/dist/models/{product-factor-class.d.ts → timeslice-dto.d.ts} +23 -21
  85. package/dist/models/timeslice-dto.js +15 -0
  86. package/index.ts +2 -2
  87. package/models/create-correction-invoices-response-class.ts +31 -0
  88. package/models/create-custom-estimated-invoice-request-dto.ts +44 -0
  89. package/models/{create-custom-application-response-class.ts → create-custom-estimated-invoice-response-class.ts} +7 -7
  90. package/models/create-estimated-invoice-request-dto.ts +8 -35
  91. package/models/create-estimated-invoice-response-class.ts +6 -6
  92. package/models/create-invoice-request-dto.ts +86 -0
  93. package/models/{get-lead-response-class.ts → create-invoice-response-class.ts} +9 -9
  94. package/models/create-invoice-status-request-dto.ts +44 -0
  95. package/models/create-termination-invoice-request-dto.ts +54 -0
  96. package/models/currency-class.ts +54 -0
  97. package/models/index.ts +21 -47
  98. package/models/invoice-class.ts +42 -15
  99. package/models/invoice-item-class.ts +21 -9
  100. package/models/invoice-status-class.ts +12 -4
  101. package/models/{list-products-response-class.ts → list-invoices-response-class.ts} +10 -10
  102. package/models/list-policies-billing-dates-response-class.ts +37 -0
  103. package/models/list-request-dto.ts +60 -0
  104. package/models/omit-type-class.ts +154 -0
  105. package/models/policy-billing-date-class.ts +48 -0
  106. package/models/policy-dto.ts +131 -0
  107. package/models/{lead-policy-object-class.ts → policy-object-dto.ts} +18 -6
  108. package/models/policy-premium-dto.ts +49 -0
  109. package/models/policy-premium-item-dto.ts +61 -0
  110. package/models/policy-version-dto.ts +61 -0
  111. package/models/{premium-formula-class.ts → premium-formula-dto.ts} +17 -17
  112. package/models/{send-notification-response-class.ts → revert-invoice-request-dto.ts} +6 -6
  113. package/models/{product-factor-class.ts → timeslice-dto.ts} +23 -21
  114. package/package.json +1 -1
  115. package/api/documents-api.ts +0 -442
  116. package/api/leads-api.ts +0 -482
  117. package/api/notifications-api.ts +0 -169
  118. package/api/payments-setup-api.ts +0 -408
  119. package/api/products-api.ts +0 -891
  120. package/dist/api/documents-api.d.ts +0 -252
  121. package/dist/api/leads-api.d.ts +0 -266
  122. package/dist/api/leads-api.js +0 -506
  123. package/dist/api/notifications-api.d.ts +0 -97
  124. package/dist/api/payments-setup-api.d.ts +0 -228
  125. package/dist/api/payments-setup-api.js +0 -426
  126. package/dist/api/products-api.d.ts +0 -497
  127. package/dist/api/products-api.js +0 -827
  128. package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +0 -48
  129. package/dist/models/complete-payment-setup-request-dto.d.ts +0 -32
  130. package/dist/models/complete-payment-setup-response-class.d.ts +0 -25
  131. package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +0 -60
  132. package/dist/models/create-account-request-dto.d.ts +0 -132
  133. package/dist/models/create-account-request-dto.js +0 -31
  134. package/dist/models/create-bank-account-request-dto.d.ts +0 -30
  135. package/dist/models/create-bank-account-request-dto.js +0 -15
  136. package/dist/models/create-custom-application-request-dto.d.ts +0 -35
  137. package/dist/models/create-custom-application-response-class.d.ts +0 -24
  138. package/dist/models/create-custom-application-response-class.js +0 -15
  139. package/dist/models/create-document-request-dto.d.ts +0 -101
  140. package/dist/models/create-document-request-dto.js +0 -31
  141. package/dist/models/create-lead-request-dto.d.ts +0 -83
  142. package/dist/models/create-lead-request-dto.js +0 -15
  143. package/dist/models/create-lead-response-class.d.ts +0 -25
  144. package/dist/models/create-lead-response-class.js +0 -15
  145. package/dist/models/document-class.d.ts +0 -130
  146. package/dist/models/document-class.js +0 -41
  147. package/dist/models/get-custom-css-response-class.d.ts +0 -24
  148. package/dist/models/get-custom-css-response-class.js +0 -15
  149. package/dist/models/get-lead-response-class.d.ts +0 -25
  150. package/dist/models/get-lead-response-class.js +0 -15
  151. package/dist/models/get-public-psp-settings-response-class.d.ts +0 -30
  152. package/dist/models/get-public-psp-settings-response-class.js +0 -15
  153. package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +0 -30
  154. package/dist/models/initiate-braintree-payment-setup-request-dto.js +0 -15
  155. package/dist/models/initiate-braintree-payment-setup-response-class.d.ts +0 -24
  156. package/dist/models/initiate-braintree-payment-setup-response-class.js +0 -15
  157. package/dist/models/initiate-lead-response-class.d.ts +0 -24
  158. package/dist/models/initiate-lead-response-class.js +0 -15
  159. package/dist/models/initiate-payment-setup-request-dto.d.ts +0 -32
  160. package/dist/models/initiate-payment-setup-request-dto.js +0 -15
  161. package/dist/models/initiate-payment-setup-response-class.d.ts +0 -32
  162. package/dist/models/initiate-payment-setup-response-class.js +0 -15
  163. package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +0 -30
  164. package/dist/models/initiate-stripe-payment-setup-request-dto.js +0 -15
  165. package/dist/models/initiate-stripe-payment-setup-response-class.d.ts +0 -30
  166. package/dist/models/initiate-stripe-payment-setup-response-class.js +0 -15
  167. package/dist/models/insured-object-class.d.ts +0 -67
  168. package/dist/models/insured-object-class.js +0 -15
  169. package/dist/models/insured-object-type-class.d.ts +0 -48
  170. package/dist/models/insured-object-type-class.js +0 -15
  171. package/dist/models/lead-account-class.d.ts +0 -109
  172. package/dist/models/lead-bank-account-class.d.ts +0 -30
  173. package/dist/models/lead-bank-account-class.js +0 -15
  174. package/dist/models/lead-class.d.ts +0 -96
  175. package/dist/models/lead-class.js +0 -15
  176. package/dist/models/lead-policy-class.d.ts +0 -43
  177. package/dist/models/lead-policy-class.js +0 -15
  178. package/dist/models/lead-policy-object-class.js +0 -15
  179. package/dist/models/list-documents-response-class.d.ts +0 -31
  180. package/dist/models/list-documents-response-class.js +0 -15
  181. package/dist/models/list-products-response-class.d.ts +0 -31
  182. package/dist/models/list-products-response-class.js +0 -15
  183. package/dist/models/payment-method-class.d.ts +0 -60
  184. package/dist/models/payment-method-class.js +0 -15
  185. package/dist/models/policy-object-request-dto.d.ts +0 -30
  186. package/dist/models/policy-object-request-dto.js +0 -15
  187. package/dist/models/policy-premium-class.d.ts +0 -55
  188. package/dist/models/policy-premium-class.js +0 -15
  189. package/dist/models/policy-premium-item-class.d.ts +0 -73
  190. package/dist/models/policy-premium-item-class.js +0 -15
  191. package/dist/models/premium-formula-class.js +0 -15
  192. package/dist/models/premium-override-dto.d.ts +0 -54
  193. package/dist/models/premium-override-request-dto.d.ts +0 -25
  194. package/dist/models/premium-override-request-dto.js +0 -15
  195. package/dist/models/product-class.d.ts +0 -74
  196. package/dist/models/product-class.js +0 -15
  197. package/dist/models/product-factor-class.js +0 -15
  198. package/dist/models/product-field-class.d.ts +0 -132
  199. package/dist/models/product-field-class.js +0 -15
  200. package/dist/models/product-version-class.d.ts +0 -61
  201. package/dist/models/product-version-class.js +0 -22
  202. package/dist/models/send-notification-request-dto.d.ts +0 -36
  203. package/dist/models/send-notification-request-dto.js +0 -15
  204. package/dist/models/send-notification-response-class.js +0 -15
  205. package/dist/models/update-lead-request-dto.d.ts +0 -83
  206. package/dist/models/update-lead-request-dto.js +0 -15
  207. package/dist/models/update-lead-response-class.d.ts +0 -25
  208. package/dist/models/update-lead-response-class.js +0 -15
  209. package/dist/models/uploaded-document-dto.d.ts +0 -24
  210. package/dist/models/uploaded-document-dto.js +0 -15
  211. package/models/complete-braintree-payment-setup-request-dto.ts +0 -54
  212. package/models/complete-payment-setup-request-dto.ts +0 -38
  213. package/models/complete-payment-setup-response-class.ts +0 -31
  214. package/models/complete-stripe-payment-setup-request-dto.ts +0 -66
  215. package/models/create-account-request-dto.ts +0 -143
  216. package/models/create-bank-account-request-dto.ts +0 -36
  217. package/models/create-custom-application-request-dto.ts +0 -44
  218. package/models/create-document-request-dto.ts +0 -111
  219. package/models/create-lead-request-dto.ts +0 -89
  220. package/models/create-lead-response-class.ts +0 -31
  221. package/models/document-class.ts +0 -141
  222. package/models/get-custom-css-response-class.ts +0 -30
  223. package/models/get-public-psp-settings-response-class.ts +0 -36
  224. package/models/initiate-braintree-payment-setup-request-dto.ts +0 -36
  225. package/models/initiate-braintree-payment-setup-response-class.ts +0 -30
  226. package/models/initiate-lead-response-class.ts +0 -30
  227. package/models/initiate-payment-setup-request-dto.ts +0 -38
  228. package/models/initiate-payment-setup-response-class.ts +0 -38
  229. package/models/initiate-stripe-payment-setup-request-dto.ts +0 -36
  230. package/models/initiate-stripe-payment-setup-response-class.ts +0 -36
  231. package/models/insured-object-class.ts +0 -73
  232. package/models/insured-object-type-class.ts +0 -54
  233. package/models/lead-account-class.ts +0 -118
  234. package/models/lead-bank-account-class.ts +0 -36
  235. package/models/lead-class.ts +0 -102
  236. package/models/lead-policy-class.ts +0 -49
  237. package/models/list-documents-response-class.ts +0 -37
  238. package/models/payment-method-class.ts +0 -66
  239. package/models/policy-object-request-dto.ts +0 -36
  240. package/models/policy-premium-class.ts +0 -61
  241. package/models/policy-premium-item-class.ts +0 -79
  242. package/models/premium-override-dto.ts +0 -64
  243. package/models/premium-override-request-dto.ts +0 -31
  244. package/models/product-class.ts +0 -80
  245. package/models/product-field-class.ts +0 -138
  246. package/models/product-version-class.ts +0 -70
  247. package/models/send-notification-request-dto.ts +0 -42
  248. package/models/update-lead-request-dto.ts +0 -89
  249. package/models/update-lead-response-class.ts +0 -31
  250. package/models/uploaded-document-dto.ts +0 -30
package/api/leads-api.ts DELETED
@@ -1,482 +0,0 @@
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,169 +0,0 @@
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
- // URLSearchParams not necessarily used
28
- // @ts-ignore
29
- import { URL, URLSearchParams } from 'url';
30
- const FormData = require('form-data');
31
- /**
32
- * NotificationsApi - axios parameter creator
33
- * @export
34
- */
35
- export const NotificationsApiAxiosParamCreator = function (configuration?: Configuration) {
36
- return {
37
- /**
38
- * This will send an email to the specific recipient set to receive customers\' messages.
39
- * @summary Send an email.
40
- * @param {SendNotificationRequestDto} sendNotificationRequestDto
41
- * @param {string} [authorization] Bearer Token
42
- * @param {*} [options] Override http request option.
43
- * @throws {RequiredError}
44
- */
45
- sendNotification: async (sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
46
- // verify required parameter 'sendNotificationRequestDto' is not null or undefined
47
- assertParamExists('sendNotification', 'sendNotificationRequestDto', sendNotificationRequestDto)
48
- const localVarPath = `/publicapi/v1/emails/send`;
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(sendNotificationRequestDto, localVarRequestOptions, configuration)
78
-
79
- return {
80
- url: toPathString(localVarUrlObj),
81
- options: localVarRequestOptions,
82
- };
83
- },
84
- }
85
- };
86
-
87
- /**
88
- * NotificationsApi - functional programming interface
89
- * @export
90
- */
91
- export const NotificationsApiFp = function(configuration?: Configuration) {
92
- const localVarAxiosParamCreator = NotificationsApiAxiosParamCreator(configuration)
93
- return {
94
- /**
95
- * This will send an email to the specific recipient set to receive customers\' messages.
96
- * @summary Send an email.
97
- * @param {SendNotificationRequestDto} sendNotificationRequestDto
98
- * @param {string} [authorization] Bearer Token
99
- * @param {*} [options] Override http request option.
100
- * @throws {RequiredError}
101
- */
102
- async sendNotification(sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SendNotificationResponseClass>> {
103
- const localVarAxiosArgs = await localVarAxiosParamCreator.sendNotification(sendNotificationRequestDto, authorization, options);
104
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
105
- },
106
- }
107
- };
108
-
109
- /**
110
- * NotificationsApi - factory interface
111
- * @export
112
- */
113
- export const NotificationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
114
- const localVarFp = NotificationsApiFp(configuration)
115
- return {
116
- /**
117
- * This will send an email to the specific recipient set to receive customers\' messages.
118
- * @summary Send an email.
119
- * @param {SendNotificationRequestDto} sendNotificationRequestDto
120
- * @param {string} [authorization] Bearer Token
121
- * @param {*} [options] Override http request option.
122
- * @throws {RequiredError}
123
- */
124
- sendNotification(sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options?: any): AxiosPromise<SendNotificationResponseClass> {
125
- return localVarFp.sendNotification(sendNotificationRequestDto, authorization, options).then((request) => request(axios, basePath));
126
- },
127
- };
128
- };
129
-
130
- /**
131
- * Request parameters for sendNotification operation in NotificationsApi.
132
- * @export
133
- * @interface NotificationsApiSendNotificationRequest
134
- */
135
- export interface NotificationsApiSendNotificationRequest {
136
- /**
137
- *
138
- * @type {SendNotificationRequestDto}
139
- * @memberof NotificationsApiSendNotification
140
- */
141
- readonly sendNotificationRequestDto: SendNotificationRequestDto
142
-
143
- /**
144
- * Bearer Token
145
- * @type {string}
146
- * @memberof NotificationsApiSendNotification
147
- */
148
- readonly authorization?: string
149
- }
150
-
151
- /**
152
- * NotificationsApi - object-oriented interface
153
- * @export
154
- * @class NotificationsApi
155
- * @extends {BaseAPI}
156
- */
157
- export class NotificationsApi extends BaseAPI {
158
- /**
159
- * This will send an email to the specific recipient set to receive customers\' messages.
160
- * @summary Send an email.
161
- * @param {NotificationsApiSendNotificationRequest} requestParameters Request parameters.
162
- * @param {*} [options] Override http request option.
163
- * @throws {RequiredError}
164
- * @memberof NotificationsApi
165
- */
166
- public sendNotification(requestParameters: NotificationsApiSendNotificationRequest, options?: AxiosRequestConfig) {
167
- return NotificationsApiFp(this.configuration).sendNotification(requestParameters.sendNotificationRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
168
- }
169
- }