@emilgroup/public-api-sdk-node 1.8.0 → 1.10.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 (45) hide show
  1. package/.openapi-generator/FILES +9 -0
  2. package/README.md +2 -2
  3. package/api/address-completions-validations-api.ts +352 -0
  4. package/api/documents-api.ts +189 -14
  5. package/api.ts +2 -0
  6. package/dist/api/address-completions-validations-api.d.ts +197 -0
  7. package/dist/api/address-completions-validations-api.js +361 -0
  8. package/dist/api/documents-api.d.ts +111 -10
  9. package/dist/api/documents-api.js +131 -8
  10. package/dist/api.d.ts +1 -0
  11. package/dist/api.js +1 -0
  12. package/dist/models/address-completion-item-class.d.ts +49 -0
  13. package/dist/models/address-completion-item-class.js +15 -0
  14. package/dist/models/address-completion-response-class.d.ts +25 -0
  15. package/dist/models/address-completion-response-class.js +15 -0
  16. package/dist/models/address-field-score-class.d.ts +48 -0
  17. package/dist/models/address-field-score-class.js +15 -0
  18. package/dist/models/create-lead-request-dto.d.ts +12 -12
  19. package/dist/models/index.d.ts +8 -0
  20. package/dist/models/index.js +8 -0
  21. package/dist/models/insured-object-class.d.ts +7 -7
  22. package/dist/models/lead-class.d.ts +6 -0
  23. package/dist/models/list-product-documents-response-class.d.ts +31 -0
  24. package/dist/models/list-product-documents-response-class.js +15 -0
  25. package/dist/models/product-document-class.d.ts +91 -0
  26. package/dist/models/product-document-class.js +28 -0
  27. package/dist/models/structured-address-class.d.ts +54 -0
  28. package/dist/models/structured-address-class.js +15 -0
  29. package/dist/models/suggested-address-details-class.d.ts +90 -0
  30. package/dist/models/suggested-address-details-class.js +15 -0
  31. package/dist/models/validate-address-response-class.d.ts +50 -0
  32. package/dist/models/validate-address-response-class.js +15 -0
  33. package/models/address-completion-item-class.ts +55 -0
  34. package/models/address-completion-response-class.ts +31 -0
  35. package/models/address-field-score-class.ts +54 -0
  36. package/models/create-lead-request-dto.ts +12 -12
  37. package/models/index.ts +8 -0
  38. package/models/insured-object-class.ts +7 -7
  39. package/models/lead-class.ts +6 -0
  40. package/models/list-product-documents-response-class.ts +37 -0
  41. package/models/product-document-class.ts +100 -0
  42. package/models/structured-address-class.ts +60 -0
  43. package/models/suggested-address-details-class.ts +96 -0
  44. package/models/validate-address-response-class.ts +56 -0
  45. package/package.json +1 -1
@@ -3,6 +3,7 @@
3
3
  .openapi-generator-ignore
4
4
  README.md
5
5
  api.ts
6
+ api/address-completions-validations-api.ts
6
7
  api/documents-api.ts
7
8
  api/leads-api.ts
8
9
  api/notifications-api.ts
@@ -13,6 +14,9 @@ common.ts
13
14
  configuration.ts
14
15
  git_push.sh
15
16
  index.ts
17
+ models/address-completion-item-class.ts
18
+ models/address-completion-response-class.ts
19
+ models/address-field-score-class.ts
16
20
  models/complete-braintree-payment-setup-request-dto.ts
17
21
  models/complete-payment-setup-request-dto.ts
18
22
  models/complete-payment-setup-response-class.ts
@@ -49,19 +53,24 @@ models/lead-class.ts
49
53
  models/lead-policy-class.ts
50
54
  models/lead-policy-object-class.ts
51
55
  models/list-documents-response-class.ts
56
+ models/list-product-documents-response-class.ts
52
57
  models/list-products-response-class.ts
53
58
  models/payment-method-class.ts
54
59
  models/policy-object-request-dto.ts
55
60
  models/premium-override-dto.ts
56
61
  models/premium-override-request-dto.ts
57
62
  models/product-class.ts
63
+ models/product-document-class.ts
58
64
  models/product-factor-class.ts
59
65
  models/product-field-class.ts
60
66
  models/product-version-class.ts
61
67
  models/send-notification-request-dto.ts
62
68
  models/send-notification-response-class.ts
69
+ models/structured-address-class.ts
70
+ models/suggested-address-details-class.ts
63
71
  models/update-lead-request-dto.ts
64
72
  models/update-lead-response-class.ts
65
73
  models/uploaded-document-dto.ts
74
+ models/validate-address-response-class.ts
66
75
  package.json
67
76
  tsconfig.json
package/README.md CHANGED
@@ -17,11 +17,11 @@ Although this package can be used in both TypeScript and JavaScript, it is inten
17
17
  Navigate to the folder of your consuming project and run one of the following commands:
18
18
 
19
19
  ```
20
- npm install @emilgroup/public-api-sdk-node@1.8.0 --save
20
+ npm install @emilgroup/public-api-sdk-node@1.10.0 --save
21
21
  ```
22
22
  or
23
23
  ```
24
- yarn add @emilgroup/public-api-sdk-node@1.8.0
24
+ yarn add @emilgroup/public-api-sdk-node@1.10.0
25
25
  ```
26
26
 
27
27
  And then you can import `PublicApi`.
@@ -0,0 +1,352 @@
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 { AddressCompletionResponseClass } from '../models';
25
+ // @ts-ignore
26
+ import { ValidateAddressResponseClass } from '../models';
27
+ // URLSearchParams not necessarily used
28
+ // @ts-ignore
29
+ import { URL, URLSearchParams } from 'url';
30
+ const FormData = require('form-data');
31
+ /**
32
+ * AddressCompletionsValidationsApi - axios parameter creator
33
+ * @export
34
+ */
35
+ export const AddressCompletionsValidationsApiAxiosParamCreator = function (configuration?: Configuration) {
36
+ return {
37
+ /**
38
+ * This will return a list of address completions based on the provided partial address.
39
+ * @summary Retrieve the address
40
+ * @param {string} partialAddress
41
+ * @param {string} [authorization] Bearer Token
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ listAddressCompletions: async (partialAddress: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
46
+ // verify required parameter 'partialAddress' is not null or undefined
47
+ assertParamExists('listAddressCompletions', 'partialAddress', partialAddress)
48
+ const localVarPath = `/publicapi/v1/addresses/completions`;
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: 'GET', ...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 (partialAddress !== undefined) {
67
+ localVarQueryParameter['partialAddress'] = partialAddress;
68
+ }
69
+
70
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
71
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
72
+ }
73
+
74
+
75
+
76
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
77
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
78
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
79
+
80
+ return {
81
+ url: toPathString(localVarUrlObj),
82
+ options: localVarRequestOptions,
83
+ };
84
+ },
85
+ /**
86
+ * This will return a response whether the provided address is valid or not.
87
+ * @summary Retrieve the Address validation
88
+ * @param {string} city The city of the address
89
+ * @param {string} country The country of the address
90
+ * @param {string} postalCode The postal code of the address. Must be a number and between 4 and 10 characters long
91
+ * @param {string} street The street of the address
92
+ * @param {string} houseNumber The house number of the address
93
+ * @param {string} [authorization] Bearer Token
94
+ * @param {string} [completeAddress] The complete address to validate
95
+ * @param {*} [options] Override http request option.
96
+ * @throws {RequiredError}
97
+ */
98
+ validateAddress: async (city: string, country: string, postalCode: string, street: string, houseNumber: string, authorization?: string, completeAddress?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
99
+ // verify required parameter 'city' is not null or undefined
100
+ assertParamExists('validateAddress', 'city', city)
101
+ // verify required parameter 'country' is not null or undefined
102
+ assertParamExists('validateAddress', 'country', country)
103
+ // verify required parameter 'postalCode' is not null or undefined
104
+ assertParamExists('validateAddress', 'postalCode', postalCode)
105
+ // verify required parameter 'street' is not null or undefined
106
+ assertParamExists('validateAddress', 'street', street)
107
+ // verify required parameter 'houseNumber' is not null or undefined
108
+ assertParamExists('validateAddress', 'houseNumber', houseNumber)
109
+ const localVarPath = `/publicapi/v1/addresses/validation`;
110
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
111
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
112
+ let baseOptions;
113
+ let baseAccessToken;
114
+ if (configuration) {
115
+ baseOptions = configuration.baseOptions;
116
+ baseAccessToken = configuration.accessToken;
117
+ }
118
+
119
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
120
+ const localVarHeaderParameter = {} as any;
121
+ const localVarQueryParameter = {} as any;
122
+
123
+ // authentication bearer required
124
+ // http bearer authentication required
125
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
126
+
127
+ if (completeAddress !== undefined) {
128
+ localVarQueryParameter['completeAddress'] = completeAddress;
129
+ }
130
+
131
+ if (city !== undefined) {
132
+ localVarQueryParameter['city'] = city;
133
+ }
134
+
135
+ if (country !== undefined) {
136
+ localVarQueryParameter['country'] = country;
137
+ }
138
+
139
+ if (postalCode !== undefined) {
140
+ localVarQueryParameter['postalCode'] = postalCode;
141
+ }
142
+
143
+ if (street !== undefined) {
144
+ localVarQueryParameter['street'] = street;
145
+ }
146
+
147
+ if (houseNumber !== undefined) {
148
+ localVarQueryParameter['houseNumber'] = houseNumber;
149
+ }
150
+
151
+ if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
152
+ localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
153
+ }
154
+
155
+
156
+
157
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
158
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
159
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
160
+
161
+ return {
162
+ url: toPathString(localVarUrlObj),
163
+ options: localVarRequestOptions,
164
+ };
165
+ },
166
+ }
167
+ };
168
+
169
+ /**
170
+ * AddressCompletionsValidationsApi - functional programming interface
171
+ * @export
172
+ */
173
+ export const AddressCompletionsValidationsApiFp = function(configuration?: Configuration) {
174
+ const localVarAxiosParamCreator = AddressCompletionsValidationsApiAxiosParamCreator(configuration)
175
+ return {
176
+ /**
177
+ * This will return a list of address completions based on the provided partial address.
178
+ * @summary Retrieve the address
179
+ * @param {string} partialAddress
180
+ * @param {string} [authorization] Bearer Token
181
+ * @param {*} [options] Override http request option.
182
+ * @throws {RequiredError}
183
+ */
184
+ async listAddressCompletions(partialAddress: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AddressCompletionResponseClass>> {
185
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listAddressCompletions(partialAddress, authorization, options);
186
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
187
+ },
188
+ /**
189
+ * This will return a response whether the provided address is valid or not.
190
+ * @summary Retrieve the Address validation
191
+ * @param {string} city The city of the address
192
+ * @param {string} country The country of the address
193
+ * @param {string} postalCode The postal code of the address. Must be a number and between 4 and 10 characters long
194
+ * @param {string} street The street of the address
195
+ * @param {string} houseNumber The house number of the address
196
+ * @param {string} [authorization] Bearer Token
197
+ * @param {string} [completeAddress] The complete address to validate
198
+ * @param {*} [options] Override http request option.
199
+ * @throws {RequiredError}
200
+ */
201
+ async validateAddress(city: string, country: string, postalCode: string, street: string, houseNumber: string, authorization?: string, completeAddress?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<ValidateAddressResponseClass>> {
202
+ const localVarAxiosArgs = await localVarAxiosParamCreator.validateAddress(city, country, postalCode, street, houseNumber, authorization, completeAddress, options);
203
+ return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
204
+ },
205
+ }
206
+ };
207
+
208
+ /**
209
+ * AddressCompletionsValidationsApi - factory interface
210
+ * @export
211
+ */
212
+ export const AddressCompletionsValidationsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
213
+ const localVarFp = AddressCompletionsValidationsApiFp(configuration)
214
+ return {
215
+ /**
216
+ * This will return a list of address completions based on the provided partial address.
217
+ * @summary Retrieve the address
218
+ * @param {string} partialAddress
219
+ * @param {string} [authorization] Bearer Token
220
+ * @param {*} [options] Override http request option.
221
+ * @throws {RequiredError}
222
+ */
223
+ listAddressCompletions(partialAddress: string, authorization?: string, options?: any): AxiosPromise<AddressCompletionResponseClass> {
224
+ return localVarFp.listAddressCompletions(partialAddress, authorization, options).then((request) => request(axios, basePath));
225
+ },
226
+ /**
227
+ * This will return a response whether the provided address is valid or not.
228
+ * @summary Retrieve the Address validation
229
+ * @param {string} city The city of the address
230
+ * @param {string} country The country of the address
231
+ * @param {string} postalCode The postal code of the address. Must be a number and between 4 and 10 characters long
232
+ * @param {string} street The street of the address
233
+ * @param {string} houseNumber The house number of the address
234
+ * @param {string} [authorization] Bearer Token
235
+ * @param {string} [completeAddress] The complete address to validate
236
+ * @param {*} [options] Override http request option.
237
+ * @throws {RequiredError}
238
+ */
239
+ validateAddress(city: string, country: string, postalCode: string, street: string, houseNumber: string, authorization?: string, completeAddress?: string, options?: any): AxiosPromise<ValidateAddressResponseClass> {
240
+ return localVarFp.validateAddress(city, country, postalCode, street, houseNumber, authorization, completeAddress, options).then((request) => request(axios, basePath));
241
+ },
242
+ };
243
+ };
244
+
245
+ /**
246
+ * Request parameters for listAddressCompletions operation in AddressCompletionsValidationsApi.
247
+ * @export
248
+ * @interface AddressCompletionsValidationsApiListAddressCompletionsRequest
249
+ */
250
+ export interface AddressCompletionsValidationsApiListAddressCompletionsRequest {
251
+ /**
252
+ *
253
+ * @type {string}
254
+ * @memberof AddressCompletionsValidationsApiListAddressCompletions
255
+ */
256
+ readonly partialAddress: string
257
+
258
+ /**
259
+ * Bearer Token
260
+ * @type {string}
261
+ * @memberof AddressCompletionsValidationsApiListAddressCompletions
262
+ */
263
+ readonly authorization?: string
264
+ }
265
+
266
+ /**
267
+ * Request parameters for validateAddress operation in AddressCompletionsValidationsApi.
268
+ * @export
269
+ * @interface AddressCompletionsValidationsApiValidateAddressRequest
270
+ */
271
+ export interface AddressCompletionsValidationsApiValidateAddressRequest {
272
+ /**
273
+ * The city of the address
274
+ * @type {string}
275
+ * @memberof AddressCompletionsValidationsApiValidateAddress
276
+ */
277
+ readonly city: string
278
+
279
+ /**
280
+ * The country of the address
281
+ * @type {string}
282
+ * @memberof AddressCompletionsValidationsApiValidateAddress
283
+ */
284
+ readonly country: string
285
+
286
+ /**
287
+ * The postal code of the address. Must be a number and between 4 and 10 characters long
288
+ * @type {string}
289
+ * @memberof AddressCompletionsValidationsApiValidateAddress
290
+ */
291
+ readonly postalCode: string
292
+
293
+ /**
294
+ * The street of the address
295
+ * @type {string}
296
+ * @memberof AddressCompletionsValidationsApiValidateAddress
297
+ */
298
+ readonly street: string
299
+
300
+ /**
301
+ * The house number of the address
302
+ * @type {string}
303
+ * @memberof AddressCompletionsValidationsApiValidateAddress
304
+ */
305
+ readonly houseNumber: string
306
+
307
+ /**
308
+ * Bearer Token
309
+ * @type {string}
310
+ * @memberof AddressCompletionsValidationsApiValidateAddress
311
+ */
312
+ readonly authorization?: string
313
+
314
+ /**
315
+ * The complete address to validate
316
+ * @type {string}
317
+ * @memberof AddressCompletionsValidationsApiValidateAddress
318
+ */
319
+ readonly completeAddress?: string
320
+ }
321
+
322
+ /**
323
+ * AddressCompletionsValidationsApi - object-oriented interface
324
+ * @export
325
+ * @class AddressCompletionsValidationsApi
326
+ * @extends {BaseAPI}
327
+ */
328
+ export class AddressCompletionsValidationsApi extends BaseAPI {
329
+ /**
330
+ * This will return a list of address completions based on the provided partial address.
331
+ * @summary Retrieve the address
332
+ * @param {AddressCompletionsValidationsApiListAddressCompletionsRequest} requestParameters Request parameters.
333
+ * @param {*} [options] Override http request option.
334
+ * @throws {RequiredError}
335
+ * @memberof AddressCompletionsValidationsApi
336
+ */
337
+ public listAddressCompletions(requestParameters: AddressCompletionsValidationsApiListAddressCompletionsRequest, options?: AxiosRequestConfig) {
338
+ return AddressCompletionsValidationsApiFp(this.configuration).listAddressCompletions(requestParameters.partialAddress, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
339
+ }
340
+
341
+ /**
342
+ * This will return a response whether the provided address is valid or not.
343
+ * @summary Retrieve the Address validation
344
+ * @param {AddressCompletionsValidationsApiValidateAddressRequest} requestParameters Request parameters.
345
+ * @param {*} [options] Override http request option.
346
+ * @throws {RequiredError}
347
+ * @memberof AddressCompletionsValidationsApi
348
+ */
349
+ public validateAddress(requestParameters: AddressCompletionsValidationsApiValidateAddressRequest, options?: AxiosRequestConfig) {
350
+ return AddressCompletionsValidationsApiFp(this.configuration).validateAddress(requestParameters.city, requestParameters.country, requestParameters.postalCode, requestParameters.street, requestParameters.houseNumber, requestParameters.authorization, requestParameters.completeAddress, options).then((request) => request(this.axios, this.basePath));
351
+ }
352
+ }