@emilgroup/public-api-sdk-node 1.0.0 → 1.0.2
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.
- package/.openapi-generator/FILES +5 -1
- package/README.md +22 -5
- package/api/documents-api.ts +4 -0
- package/api/notifications-api.ts +163 -0
- package/api/payment-setup-api.ts +4 -0
- package/api/products-api.ts +139 -20
- package/api.ts +6 -0
- package/base.ts +93 -57
- package/common.ts +1 -0
- package/configuration.ts +8 -0
- package/dist/api/documents-api.js +7 -3
- package/dist/api/notifications-api.d.ts +92 -0
- package/dist/api/notifications-api.js +224 -0
- package/dist/api/payment-setup-api.js +6 -2
- package/dist/api/products-api.d.ts +72 -11
- package/dist/api/products-api.js +127 -27
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/base.d.ts +9 -5
- package/dist/base.js +136 -37
- package/dist/common.d.ts +1 -0
- package/dist/common.js +2 -1
- package/dist/configuration.d.ts +7 -0
- package/dist/models/create-account-request-dto.d.ts +12 -0
- package/dist/models/create-custom-application-request-dto.d.ts +1 -0
- package/dist/models/create-custom-application-request-dto.js +2 -1
- package/dist/models/create-estimated-invoice-request-dto.d.ts +14 -6
- package/dist/models/create-estimated-invoice-request-dto.js +2 -1
- package/dist/models/create-lead-request-dto.d.ts +7 -0
- package/dist/models/index.d.ts +4 -0
- package/dist/models/index.js +4 -0
- package/dist/models/premium-override-dto.d.ts +53 -0
- package/dist/models/premium-override-dto.js +25 -0
- package/dist/models/premium-override-request-dto.d.ts +25 -0
- package/dist/models/premium-override-request-dto.js +15 -0
- package/dist/models/send-notification-request-dto.d.ts +36 -0
- package/dist/models/send-notification-request-dto.js +15 -0
- package/dist/models/update-lead-request-dto.d.ts +84 -0
- package/dist/models/update-lead-request-dto.js +22 -0
- package/models/create-account-request-dto.ts +12 -0
- package/models/create-custom-application-request-dto.ts +2 -1
- package/models/create-estimated-invoice-request-dto.ts +15 -7
- package/models/create-lead-request-dto.ts +7 -0
- package/models/index.ts +4 -0
- package/models/premium-override-dto.ts +63 -0
- package/models/premium-override-request-dto.ts +31 -0
- package/models/send-notification-request-dto.ts +42 -0
- package/models/update-lead-request-dto.ts +93 -0
- package/package.json +5 -3
package/.openapi-generator/FILES
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
.gitignore
|
|
2
2
|
.npmignore
|
|
3
|
-
.openapi-generator-ignore
|
|
4
3
|
README.md
|
|
5
4
|
api.ts
|
|
6
5
|
api/documents-api.ts
|
|
6
|
+
api/notifications-api.ts
|
|
7
7
|
api/payment-setup-api.ts
|
|
8
8
|
api/products-api.ts
|
|
9
9
|
base.ts
|
|
@@ -25,6 +25,10 @@ models/initiate-braintree-payment-setup-request-dto.ts
|
|
|
25
25
|
models/initiate-payment-setup-request-dto.ts
|
|
26
26
|
models/initiate-stripe-payment-setup-request-dto.ts
|
|
27
27
|
models/policy-object-request-dto.ts
|
|
28
|
+
models/premium-override-dto.ts
|
|
29
|
+
models/premium-override-request-dto.ts
|
|
30
|
+
models/send-notification-request-dto.ts
|
|
31
|
+
models/update-lead-request-dto.ts
|
|
28
32
|
models/uploaded-document-dto.ts
|
|
29
33
|
package.json
|
|
30
34
|
tsconfig.json
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Emil Public Api SDK for Nodejs
|
|
2
2
|
|
|
3
|
-
This TypeScript/JavaScript client utilizes [axios](https://github.com/axios/axios). The generated module can be used with
|
|
3
|
+
This TypeScript/JavaScript client utilizes [axios](https://github.com/axios/axios). The generated Node module can be used with Nodejs based applications.
|
|
4
4
|
|
|
5
5
|
Language level
|
|
6
6
|
* ES5 - you must have a Promises/A+ library installed
|
|
@@ -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.0.
|
|
20
|
+
npm install @emilgroup/public-api-sdk-node@1.0.1 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/public-api-sdk-node@1.0.
|
|
24
|
+
yarn add @emilgroup/public-api-sdk-node@1.0.1
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `PublicApi`.
|
|
@@ -31,15 +31,32 @@ import { PublicApi } from '@emilgroup/public-api-sdk-node'
|
|
|
31
31
|
|
|
32
32
|
const publicApi = new PublicApi();
|
|
33
33
|
```
|
|
34
|
+
## Credentials
|
|
34
35
|
|
|
35
|
-
To use authentication protected endpoints, you have to first authorize. To do so,
|
|
36
|
+
To use authentication protected endpoints, you have to first authorize. To do so, the easiest way is to provide a configuration file under `~/.emil/credentials` with the following content:
|
|
37
|
+
|
|
38
|
+
```shell
|
|
39
|
+
emil_username=XXXXX@XXXX.XXX
|
|
40
|
+
emil_password=XXXXXXXXXXXXXX
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
It is also possible to provide environment variables instead:
|
|
44
|
+
|
|
45
|
+
```shell
|
|
46
|
+
export EMIL_USERNAME=XXXXX@XXXX.XXX
|
|
47
|
+
export EMIL_PASSWORD=XXXXXXXXXXXXXX
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Example
|
|
51
|
+
|
|
52
|
+
Here is a basic functionning example:
|
|
36
53
|
|
|
37
54
|
```ts
|
|
38
55
|
async function listDocuments(): Promise<Void> {
|
|
39
56
|
try {
|
|
40
57
|
const publicApi = new PublicApi();
|
|
41
58
|
|
|
42
|
-
await publicApi.
|
|
59
|
+
await publicApi.initialize(); // should be called only once per Api.
|
|
43
60
|
|
|
44
61
|
const { data: { items } } = await publicApi.listDocuments();
|
|
45
62
|
|
package/api/documents-api.ts
CHANGED
|
@@ -22,6 +22,10 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
|
|
|
22
22
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
|
|
23
23
|
// @ts-ignore
|
|
24
24
|
import { CreateDocumentRequestDto } from '../models';
|
|
25
|
+
// URLSearchParams not necessarily used
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import { URL, URLSearchParams } from 'url';
|
|
28
|
+
const FormData = require('form-data');
|
|
25
29
|
/**
|
|
26
30
|
* DocumentsApi - axios parameter creator
|
|
27
31
|
* @export
|
|
@@ -0,0 +1,163 @@
|
|
|
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
|
+
*
|
|
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
|
+
// URLSearchParams not necessarily used
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
import { URL, URLSearchParams } from 'url';
|
|
28
|
+
const FormData = require('form-data');
|
|
29
|
+
/**
|
|
30
|
+
* NotificationsApi - axios parameter creator
|
|
31
|
+
* @export
|
|
32
|
+
*/
|
|
33
|
+
export const NotificationsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
34
|
+
return {
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @param {SendNotificationRequestDto} sendNotificationRequestDto
|
|
38
|
+
* @param {string} [authorization] Bearer Token
|
|
39
|
+
* @param {*} [options] Override http request option.
|
|
40
|
+
* @throws {RequiredError}
|
|
41
|
+
*/
|
|
42
|
+
sendNotification: async (sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
43
|
+
// verify required parameter 'sendNotificationRequestDto' is not null or undefined
|
|
44
|
+
assertParamExists('sendNotification', 'sendNotificationRequestDto', sendNotificationRequestDto)
|
|
45
|
+
const localVarPath = `/publicapi/v1/emails/send`;
|
|
46
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
47
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
48
|
+
let baseOptions;
|
|
49
|
+
let baseAccessToken;
|
|
50
|
+
if (configuration) {
|
|
51
|
+
baseOptions = configuration.baseOptions;
|
|
52
|
+
baseAccessToken = configuration.accessToken;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
56
|
+
const localVarHeaderParameter = {} as any;
|
|
57
|
+
const localVarQueryParameter = {} as any;
|
|
58
|
+
|
|
59
|
+
// authentication bearer required
|
|
60
|
+
// http bearer authentication required
|
|
61
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
62
|
+
|
|
63
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
64
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
70
|
+
|
|
71
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
72
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
73
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
74
|
+
localVarRequestOptions.data = serializeDataIfNeeded(sendNotificationRequestDto, localVarRequestOptions, configuration)
|
|
75
|
+
|
|
76
|
+
return {
|
|
77
|
+
url: toPathString(localVarUrlObj),
|
|
78
|
+
options: localVarRequestOptions,
|
|
79
|
+
};
|
|
80
|
+
},
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* NotificationsApi - functional programming interface
|
|
86
|
+
* @export
|
|
87
|
+
*/
|
|
88
|
+
export const NotificationsApiFp = function(configuration?: Configuration) {
|
|
89
|
+
const localVarAxiosParamCreator = NotificationsApiAxiosParamCreator(configuration)
|
|
90
|
+
return {
|
|
91
|
+
/**
|
|
92
|
+
*
|
|
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<void>> {
|
|
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
|
+
*
|
|
114
|
+
* @param {SendNotificationRequestDto} sendNotificationRequestDto
|
|
115
|
+
* @param {string} [authorization] Bearer Token
|
|
116
|
+
* @param {*} [options] Override http request option.
|
|
117
|
+
* @throws {RequiredError}
|
|
118
|
+
*/
|
|
119
|
+
sendNotification(sendNotificationRequestDto: SendNotificationRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
|
|
120
|
+
return localVarFp.sendNotification(sendNotificationRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Request parameters for sendNotification operation in NotificationsApi.
|
|
127
|
+
* @export
|
|
128
|
+
* @interface NotificationsApiSendNotificationRequest
|
|
129
|
+
*/
|
|
130
|
+
export interface NotificationsApiSendNotificationRequest {
|
|
131
|
+
/**
|
|
132
|
+
*
|
|
133
|
+
* @type {SendNotificationRequestDto}
|
|
134
|
+
* @memberof NotificationsApiSendNotification
|
|
135
|
+
*/
|
|
136
|
+
readonly sendNotificationRequestDto: SendNotificationRequestDto
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Bearer Token
|
|
140
|
+
* @type {string}
|
|
141
|
+
* @memberof NotificationsApiSendNotification
|
|
142
|
+
*/
|
|
143
|
+
readonly authorization?: string
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* NotificationsApi - object-oriented interface
|
|
148
|
+
* @export
|
|
149
|
+
* @class NotificationsApi
|
|
150
|
+
* @extends {BaseAPI}
|
|
151
|
+
*/
|
|
152
|
+
export class NotificationsApi extends BaseAPI {
|
|
153
|
+
/**
|
|
154
|
+
*
|
|
155
|
+
* @param {NotificationsApiSendNotificationRequest} requestParameters Request parameters.
|
|
156
|
+
* @param {*} [options] Override http request option.
|
|
157
|
+
* @throws {RequiredError}
|
|
158
|
+
* @memberof NotificationsApi
|
|
159
|
+
*/
|
|
160
|
+
public sendNotification(requestParameters: NotificationsApiSendNotificationRequest, options?: AxiosRequestConfig) {
|
|
161
|
+
return NotificationsApiFp(this.configuration).sendNotification(requestParameters.sendNotificationRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
162
|
+
}
|
|
163
|
+
}
|
package/api/payment-setup-api.ts
CHANGED
|
@@ -24,6 +24,10 @@ import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } fr
|
|
|
24
24
|
import { CompletePaymentSetupRequestDto } from '../models';
|
|
25
25
|
// @ts-ignore
|
|
26
26
|
import { InitiatePaymentSetupRequestDto } from '../models';
|
|
27
|
+
// URLSearchParams not necessarily used
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
import { URL, URLSearchParams } from 'url';
|
|
30
|
+
const FormData = require('form-data');
|
|
27
31
|
/**
|
|
28
32
|
* PaymentSetupApi - axios parameter creator
|
|
29
33
|
* @export
|
package/api/products-api.ts
CHANGED
|
@@ -26,6 +26,12 @@ import { CreateCustomApplicationRequestDto } from '../models';
|
|
|
26
26
|
import { CreateEstimatedInvoiceRequestDto } from '../models';
|
|
27
27
|
// @ts-ignore
|
|
28
28
|
import { CreateLeadRequestDto } from '../models';
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
import { UpdateLeadRequestDto } from '../models';
|
|
31
|
+
// URLSearchParams not necessarily used
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
import { URL, URLSearchParams } from 'url';
|
|
34
|
+
const FormData = require('form-data');
|
|
29
35
|
/**
|
|
30
36
|
* ProductsApi - axios parameter creator
|
|
31
37
|
* @export
|
|
@@ -253,6 +259,50 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
253
259
|
|
|
254
260
|
|
|
255
261
|
|
|
262
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
263
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
264
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
265
|
+
|
|
266
|
+
return {
|
|
267
|
+
url: toPathString(localVarUrlObj),
|
|
268
|
+
options: localVarRequestOptions,
|
|
269
|
+
};
|
|
270
|
+
},
|
|
271
|
+
/**
|
|
272
|
+
*
|
|
273
|
+
* @param {string} code
|
|
274
|
+
* @param {string} [authorization] Bearer Token
|
|
275
|
+
* @param {*} [options] Override http request option.
|
|
276
|
+
* @throws {RequiredError}
|
|
277
|
+
*/
|
|
278
|
+
getLead: async (code: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
279
|
+
// verify required parameter 'code' is not null or undefined
|
|
280
|
+
assertParamExists('getLead', 'code', code)
|
|
281
|
+
const localVarPath = `/publicapi/v1/leads/{code}`
|
|
282
|
+
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
283
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
284
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
285
|
+
let baseOptions;
|
|
286
|
+
let baseAccessToken;
|
|
287
|
+
if (configuration) {
|
|
288
|
+
baseOptions = configuration.baseOptions;
|
|
289
|
+
baseAccessToken = configuration.accessToken;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
293
|
+
const localVarHeaderParameter = {} as any;
|
|
294
|
+
const localVarQueryParameter = {} as any;
|
|
295
|
+
|
|
296
|
+
// authentication bearer required
|
|
297
|
+
// http bearer authentication required
|
|
298
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
299
|
+
|
|
300
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
301
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
|
|
256
306
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
257
307
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
258
308
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
@@ -309,13 +359,16 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
309
359
|
/**
|
|
310
360
|
*
|
|
311
361
|
* @param {string} productCode
|
|
362
|
+
* @param {string} allValues
|
|
312
363
|
* @param {string} [authorization] Bearer Token
|
|
313
364
|
* @param {*} [options] Override http request option.
|
|
314
365
|
* @throws {RequiredError}
|
|
315
366
|
*/
|
|
316
|
-
getProductFactors: async (productCode: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
367
|
+
getProductFactors: async (productCode: string, allValues: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
317
368
|
// verify required parameter 'productCode' is not null or undefined
|
|
318
369
|
assertParamExists('getProductFactors', 'productCode', productCode)
|
|
370
|
+
// verify required parameter 'allValues' is not null or undefined
|
|
371
|
+
assertParamExists('getProductFactors', 'allValues', allValues)
|
|
319
372
|
const localVarPath = `/publicapi/v1/products/{product_code}/product-factors`
|
|
320
373
|
.replace(`{${"product_code"}}`, encodeURIComponent(String(productCode)));
|
|
321
374
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -335,6 +388,10 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
335
388
|
// http bearer authentication required
|
|
336
389
|
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
337
390
|
|
|
391
|
+
if (allValues !== undefined) {
|
|
392
|
+
localVarQueryParameter['all_values'] = allValues;
|
|
393
|
+
}
|
|
394
|
+
|
|
338
395
|
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
339
396
|
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
340
397
|
}
|
|
@@ -393,16 +450,16 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
393
450
|
/**
|
|
394
451
|
*
|
|
395
452
|
* @param {string} code
|
|
396
|
-
* @param {
|
|
453
|
+
* @param {UpdateLeadRequestDto} updateLeadRequestDto
|
|
397
454
|
* @param {string} [authorization] Bearer Token
|
|
398
455
|
* @param {*} [options] Override http request option.
|
|
399
456
|
* @throws {RequiredError}
|
|
400
457
|
*/
|
|
401
|
-
updateLead: async (code: string,
|
|
458
|
+
updateLead: async (code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
402
459
|
// verify required parameter 'code' is not null or undefined
|
|
403
460
|
assertParamExists('updateLead', 'code', code)
|
|
404
|
-
// verify required parameter '
|
|
405
|
-
assertParamExists('updateLead', '
|
|
461
|
+
// verify required parameter 'updateLeadRequestDto' is not null or undefined
|
|
462
|
+
assertParamExists('updateLead', 'updateLeadRequestDto', updateLeadRequestDto)
|
|
406
463
|
const localVarPath = `/publicapi/v1/leads/{code}`
|
|
407
464
|
.replace(`{${"code"}}`, encodeURIComponent(String(code)));
|
|
408
465
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -433,7 +490,7 @@ export const ProductsApiAxiosParamCreator = function (configuration?: Configurat
|
|
|
433
490
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
434
491
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
435
492
|
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
436
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
493
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateLeadRequestDto, localVarRequestOptions, configuration)
|
|
437
494
|
|
|
438
495
|
return {
|
|
439
496
|
url: toPathString(localVarUrlObj),
|
|
@@ -506,6 +563,17 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
506
563
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getInsuredObjects(productCode, authorization, options);
|
|
507
564
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
508
565
|
},
|
|
566
|
+
/**
|
|
567
|
+
*
|
|
568
|
+
* @param {string} code
|
|
569
|
+
* @param {string} [authorization] Bearer Token
|
|
570
|
+
* @param {*} [options] Override http request option.
|
|
571
|
+
* @throws {RequiredError}
|
|
572
|
+
*/
|
|
573
|
+
async getLead(code: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
574
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getLead(code, authorization, options);
|
|
575
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
576
|
+
},
|
|
509
577
|
/**
|
|
510
578
|
*
|
|
511
579
|
* @param {string} productCode
|
|
@@ -520,12 +588,13 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
520
588
|
/**
|
|
521
589
|
*
|
|
522
590
|
* @param {string} productCode
|
|
591
|
+
* @param {string} allValues
|
|
523
592
|
* @param {string} [authorization] Bearer Token
|
|
524
593
|
* @param {*} [options] Override http request option.
|
|
525
594
|
* @throws {RequiredError}
|
|
526
595
|
*/
|
|
527
|
-
async getProductFactors(productCode: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
528
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductFactors(productCode, authorization, options);
|
|
596
|
+
async getProductFactors(productCode: string, allValues: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
597
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductFactors(productCode, allValues, authorization, options);
|
|
529
598
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
530
599
|
},
|
|
531
600
|
/**
|
|
@@ -541,13 +610,13 @@ export const ProductsApiFp = function(configuration?: Configuration) {
|
|
|
541
610
|
/**
|
|
542
611
|
*
|
|
543
612
|
* @param {string} code
|
|
544
|
-
* @param {
|
|
613
|
+
* @param {UpdateLeadRequestDto} updateLeadRequestDto
|
|
545
614
|
* @param {string} [authorization] Bearer Token
|
|
546
615
|
* @param {*} [options] Override http request option.
|
|
547
616
|
* @throws {RequiredError}
|
|
548
617
|
*/
|
|
549
|
-
async updateLead(code: string,
|
|
550
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.updateLead(code,
|
|
618
|
+
async updateLead(code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
619
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateLead(code, updateLeadRequestDto, authorization, options);
|
|
551
620
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
552
621
|
},
|
|
553
622
|
}
|
|
@@ -611,6 +680,16 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
611
680
|
getInsuredObjects(productCode: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
612
681
|
return localVarFp.getInsuredObjects(productCode, authorization, options).then((request) => request(axios, basePath));
|
|
613
682
|
},
|
|
683
|
+
/**
|
|
684
|
+
*
|
|
685
|
+
* @param {string} code
|
|
686
|
+
* @param {string} [authorization] Bearer Token
|
|
687
|
+
* @param {*} [options] Override http request option.
|
|
688
|
+
* @throws {RequiredError}
|
|
689
|
+
*/
|
|
690
|
+
getLead(code: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
691
|
+
return localVarFp.getLead(code, authorization, options).then((request) => request(axios, basePath));
|
|
692
|
+
},
|
|
614
693
|
/**
|
|
615
694
|
*
|
|
616
695
|
* @param {string} productCode
|
|
@@ -624,12 +703,13 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
624
703
|
/**
|
|
625
704
|
*
|
|
626
705
|
* @param {string} productCode
|
|
706
|
+
* @param {string} allValues
|
|
627
707
|
* @param {string} [authorization] Bearer Token
|
|
628
708
|
* @param {*} [options] Override http request option.
|
|
629
709
|
* @throws {RequiredError}
|
|
630
710
|
*/
|
|
631
|
-
getProductFactors(productCode: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
632
|
-
return localVarFp.getProductFactors(productCode, authorization, options).then((request) => request(axios, basePath));
|
|
711
|
+
getProductFactors(productCode: string, allValues: string, authorization?: string, options?: any): AxiosPromise<void> {
|
|
712
|
+
return localVarFp.getProductFactors(productCode, allValues, authorization, options).then((request) => request(axios, basePath));
|
|
633
713
|
},
|
|
634
714
|
/**
|
|
635
715
|
*
|
|
@@ -643,13 +723,13 @@ export const ProductsApiFactory = function (configuration?: Configuration, baseP
|
|
|
643
723
|
/**
|
|
644
724
|
*
|
|
645
725
|
* @param {string} code
|
|
646
|
-
* @param {
|
|
726
|
+
* @param {UpdateLeadRequestDto} updateLeadRequestDto
|
|
647
727
|
* @param {string} [authorization] Bearer Token
|
|
648
728
|
* @param {*} [options] Override http request option.
|
|
649
729
|
* @throws {RequiredError}
|
|
650
730
|
*/
|
|
651
|
-
updateLead(code: string,
|
|
652
|
-
return localVarFp.updateLead(code,
|
|
731
|
+
updateLead(code: string, updateLeadRequestDto: UpdateLeadRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
|
|
732
|
+
return localVarFp.updateLead(code, updateLeadRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
653
733
|
},
|
|
654
734
|
};
|
|
655
735
|
};
|
|
@@ -766,6 +846,27 @@ export interface ProductsApiGetInsuredObjectsRequest {
|
|
|
766
846
|
readonly authorization?: string
|
|
767
847
|
}
|
|
768
848
|
|
|
849
|
+
/**
|
|
850
|
+
* Request parameters for getLead operation in ProductsApi.
|
|
851
|
+
* @export
|
|
852
|
+
* @interface ProductsApiGetLeadRequest
|
|
853
|
+
*/
|
|
854
|
+
export interface ProductsApiGetLeadRequest {
|
|
855
|
+
/**
|
|
856
|
+
*
|
|
857
|
+
* @type {string}
|
|
858
|
+
* @memberof ProductsApiGetLead
|
|
859
|
+
*/
|
|
860
|
+
readonly code: string
|
|
861
|
+
|
|
862
|
+
/**
|
|
863
|
+
* Bearer Token
|
|
864
|
+
* @type {string}
|
|
865
|
+
* @memberof ProductsApiGetLead
|
|
866
|
+
*/
|
|
867
|
+
readonly authorization?: string
|
|
868
|
+
}
|
|
869
|
+
|
|
769
870
|
/**
|
|
770
871
|
* Request parameters for getProductCustomCss operation in ProductsApi.
|
|
771
872
|
* @export
|
|
@@ -800,6 +901,13 @@ export interface ProductsApiGetProductFactorsRequest {
|
|
|
800
901
|
*/
|
|
801
902
|
readonly productCode: string
|
|
802
903
|
|
|
904
|
+
/**
|
|
905
|
+
*
|
|
906
|
+
* @type {string}
|
|
907
|
+
* @memberof ProductsApiGetProductFactors
|
|
908
|
+
*/
|
|
909
|
+
readonly allValues: string
|
|
910
|
+
|
|
803
911
|
/**
|
|
804
912
|
* Bearer Token
|
|
805
913
|
* @type {string}
|
|
@@ -837,10 +945,10 @@ export interface ProductsApiUpdateLeadRequest {
|
|
|
837
945
|
|
|
838
946
|
/**
|
|
839
947
|
*
|
|
840
|
-
* @type {
|
|
948
|
+
* @type {UpdateLeadRequestDto}
|
|
841
949
|
* @memberof ProductsApiUpdateLead
|
|
842
950
|
*/
|
|
843
|
-
readonly
|
|
951
|
+
readonly updateLeadRequestDto: UpdateLeadRequestDto
|
|
844
952
|
|
|
845
953
|
/**
|
|
846
954
|
* Bearer Token
|
|
@@ -912,6 +1020,17 @@ export class ProductsApi extends BaseAPI {
|
|
|
912
1020
|
return ProductsApiFp(this.configuration).getInsuredObjects(requestParameters.productCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
913
1021
|
}
|
|
914
1022
|
|
|
1023
|
+
/**
|
|
1024
|
+
*
|
|
1025
|
+
* @param {ProductsApiGetLeadRequest} requestParameters Request parameters.
|
|
1026
|
+
* @param {*} [options] Override http request option.
|
|
1027
|
+
* @throws {RequiredError}
|
|
1028
|
+
* @memberof ProductsApi
|
|
1029
|
+
*/
|
|
1030
|
+
public getLead(requestParameters: ProductsApiGetLeadRequest, options?: AxiosRequestConfig) {
|
|
1031
|
+
return ProductsApiFp(this.configuration).getLead(requestParameters.code, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1032
|
+
}
|
|
1033
|
+
|
|
915
1034
|
/**
|
|
916
1035
|
*
|
|
917
1036
|
* @param {ProductsApiGetProductCustomCssRequest} requestParameters Request parameters.
|
|
@@ -931,7 +1050,7 @@ export class ProductsApi extends BaseAPI {
|
|
|
931
1050
|
* @memberof ProductsApi
|
|
932
1051
|
*/
|
|
933
1052
|
public getProductFactors(requestParameters: ProductsApiGetProductFactorsRequest, options?: AxiosRequestConfig) {
|
|
934
|
-
return ProductsApiFp(this.configuration).getProductFactors(requestParameters.productCode, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
1053
|
+
return ProductsApiFp(this.configuration).getProductFactors(requestParameters.productCode, requestParameters.allValues, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
935
1054
|
}
|
|
936
1055
|
|
|
937
1056
|
/**
|
|
@@ -953,6 +1072,6 @@ export class ProductsApi extends BaseAPI {
|
|
|
953
1072
|
* @memberof ProductsApi
|
|
954
1073
|
*/
|
|
955
1074
|
public updateLead(requestParameters: ProductsApiUpdateLeadRequest, options?: AxiosRequestConfig) {
|
|
956
|
-
return ProductsApiFp(this.configuration).updateLead(requestParameters.code, requestParameters.
|
|
1075
|
+
return ProductsApiFp(this.configuration).updateLead(requestParameters.code, requestParameters.updateLeadRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
957
1076
|
}
|
|
958
1077
|
}
|
package/api.ts
CHANGED
|
@@ -15,17 +15,23 @@
|
|
|
15
15
|
|
|
16
16
|
import { Configuration } from './configuration';
|
|
17
17
|
import globalAxios, { AxiosPromise, AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
18
|
+
// URLSearchParams not necessarily used
|
|
19
|
+
// @ts-ignore
|
|
20
|
+
import { URL, URLSearchParams } from 'url';
|
|
21
|
+
import FormData from 'form-data'
|
|
18
22
|
// Some imports not used depending on template conditions
|
|
19
23
|
// @ts-ignore
|
|
20
24
|
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from './common';
|
|
21
25
|
// @ts-ignore
|
|
22
26
|
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
|
|
23
27
|
import { DocumentsApi } from './api';
|
|
28
|
+
import { NotificationsApi } from './api';
|
|
24
29
|
import { PaymentSetupApi } from './api';
|
|
25
30
|
import { ProductsApi } from './api';
|
|
26
31
|
|
|
27
32
|
|
|
28
33
|
export * from './api/documents-api';
|
|
34
|
+
export * from './api/notifications-api';
|
|
29
35
|
export * from './api/payment-setup-api';
|
|
30
36
|
export * from './api/products-api';
|
|
31
37
|
|