@emilgroup/public-api-sdk-node 1.31.0 → 1.33.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.
- package/.openapi-generator/FILES +6 -0
- package/README.md +2 -2
- package/api/named-ranges-api.ts +20 -6
- package/api/product-versions-api.ts +284 -0
- package/api.ts +2 -0
- package/base.ts +7 -15
- package/dist/api/named-ranges-api.d.ts +12 -3
- package/dist/api/named-ranges-api.js +12 -6
- package/dist/api/product-versions-api.d.ts +161 -0
- package/dist/api/product-versions-api.js +327 -0
- package/dist/api.d.ts +1 -0
- package/dist/api.js +1 -0
- package/dist/base.d.ts +1 -3
- package/dist/base.js +20 -26
- package/dist/models/booking-funnel-class.d.ts +6 -0
- package/dist/models/card-details-dto.d.ts +42 -0
- package/dist/models/card-details-dto.js +15 -0
- package/dist/models/complete-adyen-payment-setup-request-dto.d.ts +80 -0
- package/dist/models/complete-adyen-payment-setup-request-dto.js +15 -0
- package/dist/models/complete-payment-setup-request-dto.d.ts +7 -0
- package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +19 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/dist/models/initiate-adyen-payment-setup-request-dto.d.ts +30 -0
- package/dist/models/initiate-adyen-payment-setup-request-dto.js +15 -0
- package/dist/models/initiate-adyen-payment-setup-response-class.d.ts +42 -0
- package/dist/models/initiate-adyen-payment-setup-response-class.js +15 -0
- package/dist/models/initiate-payment-setup-request-dto.d.ts +7 -0
- package/dist/models/initiate-payment-setup-response-class.d.ts +7 -0
- package/dist/models/link-lead-partner-request-dto.d.ts +16 -4
- package/dist/models/partner-role-class.d.ts +6 -0
- package/dist/models/payment-method-class.d.ts +30 -0
- package/dist/models/sepa-direct-dto.d.ts +24 -0
- package/dist/models/sepa-direct-dto.js +15 -0
- package/dist/models/update-lead-request-dto.d.ts +1 -1
- package/models/booking-funnel-class.ts +6 -0
- package/models/card-details-dto.ts +48 -0
- package/models/complete-adyen-payment-setup-request-dto.ts +86 -0
- package/models/complete-payment-setup-request-dto.ts +7 -0
- package/models/complete-stripe-payment-setup-request-dto.ts +19 -0
- package/models/index.ts +5 -0
- package/models/initiate-adyen-payment-setup-request-dto.ts +36 -0
- package/models/initiate-adyen-payment-setup-response-class.ts +48 -0
- package/models/initiate-payment-setup-request-dto.ts +7 -0
- package/models/initiate-payment-setup-response-class.ts +7 -0
- package/models/link-lead-partner-request-dto.ts +16 -4
- package/models/partner-role-class.ts +6 -0
- package/models/payment-method-class.ts +30 -0
- package/models/sepa-direct-dto.ts +30 -0
- package/models/update-lead-request-dto.ts +1 -1
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -11,6 +11,7 @@ api/leads-api.ts
|
|
|
11
11
|
api/named-ranges-api.ts
|
|
12
12
|
api/notifications-api.ts
|
|
13
13
|
api/payments-setup-api.ts
|
|
14
|
+
api/product-versions-api.ts
|
|
14
15
|
api/products-api.ts
|
|
15
16
|
base.ts
|
|
16
17
|
common.ts
|
|
@@ -23,6 +24,8 @@ models/address-field-score-class.ts
|
|
|
23
24
|
models/booking-funnel-class.ts
|
|
24
25
|
models/calculate-product-fields-request-dto.ts
|
|
25
26
|
models/calculate-product-fields-response-class.ts
|
|
27
|
+
models/card-details-dto.ts
|
|
28
|
+
models/complete-adyen-payment-setup-request-dto.ts
|
|
26
29
|
models/complete-braintree-payment-setup-request-dto.ts
|
|
27
30
|
models/complete-email-verification-dto.ts
|
|
28
31
|
models/complete-email-verification-response-class.ts
|
|
@@ -50,6 +53,8 @@ models/get-lead-response-class.ts
|
|
|
50
53
|
models/get-product-document-download-url-response-class.ts
|
|
51
54
|
models/get-public-psp-settings-response-class.ts
|
|
52
55
|
models/index.ts
|
|
56
|
+
models/initiate-adyen-payment-setup-request-dto.ts
|
|
57
|
+
models/initiate-adyen-payment-setup-response-class.ts
|
|
53
58
|
models/initiate-braintree-payment-setup-request-dto.ts
|
|
54
59
|
models/initiate-braintree-payment-setup-response-class.ts
|
|
55
60
|
models/initiate-email-verification-dto.ts
|
|
@@ -91,6 +96,7 @@ models/product-field-class.ts
|
|
|
91
96
|
models/product-version-class.ts
|
|
92
97
|
models/send-notification-request-dto.ts
|
|
93
98
|
models/send-notification-response-class.ts
|
|
99
|
+
models/sepa-direct-dto.ts
|
|
94
100
|
models/sepa-dto.ts
|
|
95
101
|
models/structured-address-class.ts
|
|
96
102
|
models/suggested-address-details-class.ts
|
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.
|
|
20
|
+
npm install @emilgroup/public-api-sdk-node@1.33.0 --save
|
|
21
21
|
```
|
|
22
22
|
or
|
|
23
23
|
```
|
|
24
|
-
yarn add @emilgroup/public-api-sdk-node@1.
|
|
24
|
+
yarn add @emilgroup/public-api-sdk-node@1.33.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
And then you can import `PublicApi`.
|
package/api/named-ranges-api.ts
CHANGED
|
@@ -38,6 +38,7 @@ export const NamedRangesApiAxiosParamCreator = function (configuration?: Configu
|
|
|
38
38
|
* @param {string} productSlug A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
39
39
|
* @param {string} name Name of Named Range.
|
|
40
40
|
* @param {string} [authorization] Bearer Token
|
|
41
|
+
* @param {number} [productVersionId] The product version id of the product version to be used for the lead. The product version id will be validated if the \'validate\' flag is set to true.
|
|
41
42
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
42
43
|
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
43
44
|
* @param {string} [filters] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
@@ -46,7 +47,7 @@ export const NamedRangesApiAxiosParamCreator = function (configuration?: Configu
|
|
|
46
47
|
* @param {*} [options] Override http request option.
|
|
47
48
|
* @throws {RequiredError}
|
|
48
49
|
*/
|
|
49
|
-
filterNamedRange: async (productSlug: string, name: string, authorization?: string, pageSize?: number, pageToken?: string, filters?: string, search?: string, order?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
50
|
+
filterNamedRange: async (productSlug: string, name: string, authorization?: string, productVersionId?: number, pageSize?: number, pageToken?: string, filters?: string, search?: string, order?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
50
51
|
// verify required parameter 'productSlug' is not null or undefined
|
|
51
52
|
assertParamExists('filterNamedRange', 'productSlug', productSlug)
|
|
52
53
|
// verify required parameter 'name' is not null or undefined
|
|
@@ -73,6 +74,10 @@ export const NamedRangesApiAxiosParamCreator = function (configuration?: Configu
|
|
|
73
74
|
localVarQueryParameter['productSlug'] = productSlug;
|
|
74
75
|
}
|
|
75
76
|
|
|
77
|
+
if (productVersionId !== undefined) {
|
|
78
|
+
localVarQueryParameter['productVersionId'] = productVersionId;
|
|
79
|
+
}
|
|
80
|
+
|
|
76
81
|
if (name !== undefined) {
|
|
77
82
|
localVarQueryParameter['name'] = name;
|
|
78
83
|
}
|
|
@@ -128,6 +133,7 @@ export const NamedRangesApiFp = function(configuration?: Configuration) {
|
|
|
128
133
|
* @param {string} productSlug A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
129
134
|
* @param {string} name Name of Named Range.
|
|
130
135
|
* @param {string} [authorization] Bearer Token
|
|
136
|
+
* @param {number} [productVersionId] The product version id of the product version to be used for the lead. The product version id will be validated if the \'validate\' flag is set to true.
|
|
131
137
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
132
138
|
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
133
139
|
* @param {string} [filters] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
@@ -136,8 +142,8 @@ export const NamedRangesApiFp = function(configuration?: Configuration) {
|
|
|
136
142
|
* @param {*} [options] Override http request option.
|
|
137
143
|
* @throws {RequiredError}
|
|
138
144
|
*/
|
|
139
|
-
async filterNamedRange(productSlug: string, name: string, authorization?: string, pageSize?: number, pageToken?: string, filters?: string, search?: string, order?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FilterNamedRangeResponseClass>> {
|
|
140
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.filterNamedRange(productSlug, name, authorization, pageSize, pageToken, filters, search, order, options);
|
|
145
|
+
async filterNamedRange(productSlug: string, name: string, authorization?: string, productVersionId?: number, pageSize?: number, pageToken?: string, filters?: string, search?: string, order?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FilterNamedRangeResponseClass>> {
|
|
146
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.filterNamedRange(productSlug, name, authorization, productVersionId, pageSize, pageToken, filters, search, order, options);
|
|
141
147
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
142
148
|
},
|
|
143
149
|
}
|
|
@@ -156,6 +162,7 @@ export const NamedRangesApiFactory = function (configuration?: Configuration, ba
|
|
|
156
162
|
* @param {string} productSlug A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
157
163
|
* @param {string} name Name of Named Range.
|
|
158
164
|
* @param {string} [authorization] Bearer Token
|
|
165
|
+
* @param {number} [productVersionId] The product version id of the product version to be used for the lead. The product version id will be validated if the \'validate\' flag is set to true.
|
|
159
166
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
160
167
|
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
161
168
|
* @param {string} [filters] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
@@ -164,8 +171,8 @@ export const NamedRangesApiFactory = function (configuration?: Configuration, ba
|
|
|
164
171
|
* @param {*} [options] Override http request option.
|
|
165
172
|
* @throws {RequiredError}
|
|
166
173
|
*/
|
|
167
|
-
filterNamedRange(productSlug: string, name: string, authorization?: string, pageSize?: number, pageToken?: string, filters?: string, search?: string, order?: string, options?: any): AxiosPromise<FilterNamedRangeResponseClass> {
|
|
168
|
-
return localVarFp.filterNamedRange(productSlug, name, authorization, pageSize, pageToken, filters, search, order, options).then((request) => request(axios, basePath));
|
|
174
|
+
filterNamedRange(productSlug: string, name: string, authorization?: string, productVersionId?: number, pageSize?: number, pageToken?: string, filters?: string, search?: string, order?: string, options?: any): AxiosPromise<FilterNamedRangeResponseClass> {
|
|
175
|
+
return localVarFp.filterNamedRange(productSlug, name, authorization, productVersionId, pageSize, pageToken, filters, search, order, options).then((request) => request(axios, basePath));
|
|
169
176
|
},
|
|
170
177
|
};
|
|
171
178
|
};
|
|
@@ -197,6 +204,13 @@ export interface NamedRangesApiFilterNamedRangeRequest {
|
|
|
197
204
|
*/
|
|
198
205
|
readonly authorization?: string
|
|
199
206
|
|
|
207
|
+
/**
|
|
208
|
+
* The product version id of the product version to be used for the lead. The product version id will be validated if the \'validate\' flag is set to true.
|
|
209
|
+
* @type {number}
|
|
210
|
+
* @memberof NamedRangesApiFilterNamedRange
|
|
211
|
+
*/
|
|
212
|
+
readonly productVersionId?: number
|
|
213
|
+
|
|
200
214
|
/**
|
|
201
215
|
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
202
216
|
* @type {number}
|
|
@@ -249,6 +263,6 @@ export class NamedRangesApi extends BaseAPI {
|
|
|
249
263
|
* @memberof NamedRangesApi
|
|
250
264
|
*/
|
|
251
265
|
public filterNamedRange(requestParameters: NamedRangesApiFilterNamedRangeRequest, options?: AxiosRequestConfig) {
|
|
252
|
-
return NamedRangesApiFp(this.configuration).filterNamedRange(requestParameters.productSlug, requestParameters.name, requestParameters.authorization, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filters, requestParameters.search, requestParameters.order, options).then((request) => request(this.axios, this.basePath));
|
|
266
|
+
return NamedRangesApiFp(this.configuration).filterNamedRange(requestParameters.productSlug, requestParameters.name, requestParameters.authorization, requestParameters.productVersionId, requestParameters.pageSize, requestParameters.pageToken, requestParameters.filters, requestParameters.search, requestParameters.order, options).then((request) => request(this.axios, this.basePath));
|
|
253
267
|
}
|
|
254
268
|
}
|
|
@@ -0,0 +1,284 @@
|
|
|
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 { InsuredObjectClass } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { ProductFactorForVersionClass } from '../models';
|
|
27
|
+
// URLSearchParams not necessarily used
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
import { URL, URLSearchParams } from 'url';
|
|
30
|
+
const FormData = require('form-data');
|
|
31
|
+
/**
|
|
32
|
+
* ProductVersionsApi - axios parameter creator
|
|
33
|
+
* @export
|
|
34
|
+
*/
|
|
35
|
+
export const ProductVersionsApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
36
|
+
return {
|
|
37
|
+
/**
|
|
38
|
+
* Returns a list of insured objects you have previously created. The insured objects are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
39
|
+
* @summary List insured objects
|
|
40
|
+
* @param {number} productVersionId
|
|
41
|
+
* @param {string} [authorization] Bearer Token
|
|
42
|
+
* @param {*} [options] Override http request option.
|
|
43
|
+
* @throws {RequiredError}
|
|
44
|
+
*/
|
|
45
|
+
getInsuredObjectsPerVersion: async (productVersionId: number, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
46
|
+
// verify required parameter 'productVersionId' is not null or undefined
|
|
47
|
+
assertParamExists('getInsuredObjectsPerVersion', 'productVersionId', productVersionId)
|
|
48
|
+
const localVarPath = `/publicapi/v1/product_versions/{product_version_id}/insured-objects`
|
|
49
|
+
.replace(`{${"product_version_id"}}`, encodeURIComponent(String(productVersionId)));
|
|
50
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
51
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
52
|
+
let baseOptions;
|
|
53
|
+
let baseAccessToken;
|
|
54
|
+
if (configuration) {
|
|
55
|
+
baseOptions = configuration.baseOptions;
|
|
56
|
+
baseAccessToken = configuration.accessToken;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
60
|
+
const localVarHeaderParameter = {} as any;
|
|
61
|
+
const localVarQueryParameter = {} as any;
|
|
62
|
+
|
|
63
|
+
// authentication bearer required
|
|
64
|
+
// http bearer authentication required
|
|
65
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
66
|
+
|
|
67
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
68
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
74
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
75
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
url: toPathString(localVarUrlObj),
|
|
79
|
+
options: localVarRequestOptions,
|
|
80
|
+
};
|
|
81
|
+
},
|
|
82
|
+
/**
|
|
83
|
+
* Returns a list of product factors you have previously created. The product factors are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
84
|
+
* @summary List product factors
|
|
85
|
+
* @param {number} productVersionId
|
|
86
|
+
* @param {string} allValues
|
|
87
|
+
* @param {string} [authorization] Bearer Token
|
|
88
|
+
* @param {*} [options] Override http request option.
|
|
89
|
+
* @throws {RequiredError}
|
|
90
|
+
*/
|
|
91
|
+
getProductFactorsPerVersion: async (productVersionId: number, allValues: string, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
92
|
+
// verify required parameter 'productVersionId' is not null or undefined
|
|
93
|
+
assertParamExists('getProductFactorsPerVersion', 'productVersionId', productVersionId)
|
|
94
|
+
// verify required parameter 'allValues' is not null or undefined
|
|
95
|
+
assertParamExists('getProductFactorsPerVersion', 'allValues', allValues)
|
|
96
|
+
const localVarPath = `/publicapi/v1/product_versions/{product_version_id}/product-factors`
|
|
97
|
+
.replace(`{${"product_version_id"}}`, encodeURIComponent(String(productVersionId)));
|
|
98
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
99
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
100
|
+
let baseOptions;
|
|
101
|
+
let baseAccessToken;
|
|
102
|
+
if (configuration) {
|
|
103
|
+
baseOptions = configuration.baseOptions;
|
|
104
|
+
baseAccessToken = configuration.accessToken;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
108
|
+
const localVarHeaderParameter = {} as any;
|
|
109
|
+
const localVarQueryParameter = {} as any;
|
|
110
|
+
|
|
111
|
+
// authentication bearer required
|
|
112
|
+
// http bearer authentication required
|
|
113
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
114
|
+
|
|
115
|
+
if (allValues !== undefined) {
|
|
116
|
+
localVarQueryParameter['all_values'] = allValues;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
120
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
126
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
127
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
128
|
+
|
|
129
|
+
return {
|
|
130
|
+
url: toPathString(localVarUrlObj),
|
|
131
|
+
options: localVarRequestOptions,
|
|
132
|
+
};
|
|
133
|
+
},
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* ProductVersionsApi - functional programming interface
|
|
139
|
+
* @export
|
|
140
|
+
*/
|
|
141
|
+
export const ProductVersionsApiFp = function(configuration?: Configuration) {
|
|
142
|
+
const localVarAxiosParamCreator = ProductVersionsApiAxiosParamCreator(configuration)
|
|
143
|
+
return {
|
|
144
|
+
/**
|
|
145
|
+
* Returns a list of insured objects you have previously created. The insured objects are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
146
|
+
* @summary List insured objects
|
|
147
|
+
* @param {number} productVersionId
|
|
148
|
+
* @param {string} [authorization] Bearer Token
|
|
149
|
+
* @param {*} [options] Override http request option.
|
|
150
|
+
* @throws {RequiredError}
|
|
151
|
+
*/
|
|
152
|
+
async getInsuredObjectsPerVersion(productVersionId: number, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<InsuredObjectClass>>> {
|
|
153
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getInsuredObjectsPerVersion(productVersionId, authorization, options);
|
|
154
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
155
|
+
},
|
|
156
|
+
/**
|
|
157
|
+
* Returns a list of product factors you have previously created. The product factors are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
158
|
+
* @summary List product factors
|
|
159
|
+
* @param {number} productVersionId
|
|
160
|
+
* @param {string} allValues
|
|
161
|
+
* @param {string} [authorization] Bearer Token
|
|
162
|
+
* @param {*} [options] Override http request option.
|
|
163
|
+
* @throws {RequiredError}
|
|
164
|
+
*/
|
|
165
|
+
async getProductFactorsPerVersion(productVersionId: number, allValues: string, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<ProductFactorForVersionClass>>> {
|
|
166
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getProductFactorsPerVersion(productVersionId, allValues, authorization, options);
|
|
167
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
168
|
+
},
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* ProductVersionsApi - factory interface
|
|
174
|
+
* @export
|
|
175
|
+
*/
|
|
176
|
+
export const ProductVersionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
177
|
+
const localVarFp = ProductVersionsApiFp(configuration)
|
|
178
|
+
return {
|
|
179
|
+
/**
|
|
180
|
+
* Returns a list of insured objects you have previously created. The insured objects are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
181
|
+
* @summary List insured objects
|
|
182
|
+
* @param {number} productVersionId
|
|
183
|
+
* @param {string} [authorization] Bearer Token
|
|
184
|
+
* @param {*} [options] Override http request option.
|
|
185
|
+
* @throws {RequiredError}
|
|
186
|
+
*/
|
|
187
|
+
getInsuredObjectsPerVersion(productVersionId: number, authorization?: string, options?: any): AxiosPromise<Array<InsuredObjectClass>> {
|
|
188
|
+
return localVarFp.getInsuredObjectsPerVersion(productVersionId, authorization, options).then((request) => request(axios, basePath));
|
|
189
|
+
},
|
|
190
|
+
/**
|
|
191
|
+
* Returns a list of product factors you have previously created. The product factors are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
192
|
+
* @summary List product factors
|
|
193
|
+
* @param {number} productVersionId
|
|
194
|
+
* @param {string} allValues
|
|
195
|
+
* @param {string} [authorization] Bearer Token
|
|
196
|
+
* @param {*} [options] Override http request option.
|
|
197
|
+
* @throws {RequiredError}
|
|
198
|
+
*/
|
|
199
|
+
getProductFactorsPerVersion(productVersionId: number, allValues: string, authorization?: string, options?: any): AxiosPromise<Array<ProductFactorForVersionClass>> {
|
|
200
|
+
return localVarFp.getProductFactorsPerVersion(productVersionId, allValues, authorization, options).then((request) => request(axios, basePath));
|
|
201
|
+
},
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Request parameters for getInsuredObjectsPerVersion operation in ProductVersionsApi.
|
|
207
|
+
* @export
|
|
208
|
+
* @interface ProductVersionsApiGetInsuredObjectsPerVersionRequest
|
|
209
|
+
*/
|
|
210
|
+
export interface ProductVersionsApiGetInsuredObjectsPerVersionRequest {
|
|
211
|
+
/**
|
|
212
|
+
*
|
|
213
|
+
* @type {number}
|
|
214
|
+
* @memberof ProductVersionsApiGetInsuredObjectsPerVersion
|
|
215
|
+
*/
|
|
216
|
+
readonly productVersionId: number
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Bearer Token
|
|
220
|
+
* @type {string}
|
|
221
|
+
* @memberof ProductVersionsApiGetInsuredObjectsPerVersion
|
|
222
|
+
*/
|
|
223
|
+
readonly authorization?: string
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Request parameters for getProductFactorsPerVersion operation in ProductVersionsApi.
|
|
228
|
+
* @export
|
|
229
|
+
* @interface ProductVersionsApiGetProductFactorsPerVersionRequest
|
|
230
|
+
*/
|
|
231
|
+
export interface ProductVersionsApiGetProductFactorsPerVersionRequest {
|
|
232
|
+
/**
|
|
233
|
+
*
|
|
234
|
+
* @type {number}
|
|
235
|
+
* @memberof ProductVersionsApiGetProductFactorsPerVersion
|
|
236
|
+
*/
|
|
237
|
+
readonly productVersionId: number
|
|
238
|
+
|
|
239
|
+
/**
|
|
240
|
+
*
|
|
241
|
+
* @type {string}
|
|
242
|
+
* @memberof ProductVersionsApiGetProductFactorsPerVersion
|
|
243
|
+
*/
|
|
244
|
+
readonly allValues: string
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Bearer Token
|
|
248
|
+
* @type {string}
|
|
249
|
+
* @memberof ProductVersionsApiGetProductFactorsPerVersion
|
|
250
|
+
*/
|
|
251
|
+
readonly authorization?: string
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* ProductVersionsApi - object-oriented interface
|
|
256
|
+
* @export
|
|
257
|
+
* @class ProductVersionsApi
|
|
258
|
+
* @extends {BaseAPI}
|
|
259
|
+
*/
|
|
260
|
+
export class ProductVersionsApi extends BaseAPI {
|
|
261
|
+
/**
|
|
262
|
+
* Returns a list of insured objects you have previously created. The insured objects are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
263
|
+
* @summary List insured objects
|
|
264
|
+
* @param {ProductVersionsApiGetInsuredObjectsPerVersionRequest} requestParameters Request parameters.
|
|
265
|
+
* @param {*} [options] Override http request option.
|
|
266
|
+
* @throws {RequiredError}
|
|
267
|
+
* @memberof ProductVersionsApi
|
|
268
|
+
*/
|
|
269
|
+
public getInsuredObjectsPerVersion(requestParameters: ProductVersionsApiGetInsuredObjectsPerVersionRequest, options?: AxiosRequestConfig) {
|
|
270
|
+
return ProductVersionsApiFp(this.configuration).getInsuredObjectsPerVersion(requestParameters.productVersionId, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Returns a list of product factors you have previously created. The product factors are returned in sorted order, with the oldest one appearing first. For more information about pagination, read the Pagination documentation.
|
|
275
|
+
* @summary List product factors
|
|
276
|
+
* @param {ProductVersionsApiGetProductFactorsPerVersionRequest} requestParameters Request parameters.
|
|
277
|
+
* @param {*} [options] Override http request option.
|
|
278
|
+
* @throws {RequiredError}
|
|
279
|
+
* @memberof ProductVersionsApi
|
|
280
|
+
*/
|
|
281
|
+
public getProductFactorsPerVersion(requestParameters: ProductVersionsApiGetProductFactorsPerVersionRequest, options?: AxiosRequestConfig) {
|
|
282
|
+
return ProductVersionsApiFp(this.configuration).getProductFactorsPerVersion(requestParameters.productVersionId, requestParameters.allValues, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
283
|
+
}
|
|
284
|
+
}
|
package/api.ts
CHANGED
|
@@ -32,6 +32,7 @@ import { LeadsApi } from './api';
|
|
|
32
32
|
import { NamedRangesApi } from './api';
|
|
33
33
|
import { NotificationsApi } from './api';
|
|
34
34
|
import { PaymentsSetupApi } from './api';
|
|
35
|
+
import { ProductVersionsApi } from './api';
|
|
35
36
|
import { ProductsApi } from './api';
|
|
36
37
|
|
|
37
38
|
|
|
@@ -43,5 +44,6 @@ export * from './api/leads-api';
|
|
|
43
44
|
export * from './api/named-ranges-api';
|
|
44
45
|
export * from './api/notifications-api';
|
|
45
46
|
export * from './api/payments-setup-api';
|
|
47
|
+
export * from './api/product-versions-api';
|
|
46
48
|
export * from './api/products-api';
|
|
47
49
|
|
package/base.ts
CHANGED
|
@@ -79,7 +79,6 @@ export class BaseAPI {
|
|
|
79
79
|
protected configuration: Configuration;
|
|
80
80
|
private username?: string;
|
|
81
81
|
private password?: string;
|
|
82
|
-
private permissions?: string;
|
|
83
82
|
|
|
84
83
|
constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
|
|
85
84
|
if (configuration) {
|
|
@@ -150,10 +149,6 @@ export class BaseAPI {
|
|
|
150
149
|
this.configuration.basePath = env;
|
|
151
150
|
}
|
|
152
151
|
|
|
153
|
-
getPermissions(): Array<string> {
|
|
154
|
-
return this.permissions.split(',');
|
|
155
|
-
}
|
|
156
|
-
|
|
157
152
|
async authorize(username: string, password: string): Promise<void> {
|
|
158
153
|
const options: AxiosRequestConfig = {
|
|
159
154
|
method: 'POST',
|
|
@@ -168,21 +163,20 @@ export class BaseAPI {
|
|
|
168
163
|
|
|
169
164
|
const response = await globalAxios.request<LoginClass>(options);
|
|
170
165
|
|
|
171
|
-
const { data: { accessToken
|
|
166
|
+
const { data: { accessToken } } = response;
|
|
172
167
|
this.configuration.username = username;
|
|
173
168
|
this.configuration.accessToken = `Bearer ${accessToken}`;
|
|
174
|
-
this.permissions = permissions;
|
|
175
169
|
|
|
176
170
|
const refreshToken = this.extractRefreshToken(response)
|
|
177
171
|
this.configuration.refreshToken = refreshToken;
|
|
178
172
|
}
|
|
179
173
|
|
|
180
|
-
async refreshTokenInternal(): Promise<
|
|
174
|
+
async refreshTokenInternal(): Promise<string> {
|
|
181
175
|
const { username, refreshToken } = this.configuration;
|
|
182
176
|
|
|
183
177
|
|
|
184
178
|
if (!username || !refreshToken) {
|
|
185
|
-
|
|
179
|
+
return '';
|
|
186
180
|
}
|
|
187
181
|
|
|
188
182
|
const options: AxiosRequestConfig = {
|
|
@@ -196,9 +190,9 @@ export class BaseAPI {
|
|
|
196
190
|
withCredentials: true,
|
|
197
191
|
};
|
|
198
192
|
|
|
199
|
-
const
|
|
193
|
+
const { data: { accessToken } } = await globalAxios.request<LoginClass>(options);
|
|
200
194
|
|
|
201
|
-
return
|
|
195
|
+
return accessToken;
|
|
202
196
|
}
|
|
203
197
|
|
|
204
198
|
private extractRefreshToken(response: AxiosResponse): string {
|
|
@@ -227,9 +221,8 @@ export class BaseAPI {
|
|
|
227
221
|
if (err.response.status === 401 && !originalConfig._retry) {
|
|
228
222
|
originalConfig._retry = true;
|
|
229
223
|
try {
|
|
230
|
-
const
|
|
224
|
+
const tokenString = await this.refreshTokenInternal();
|
|
231
225
|
const accessToken = `Bearer ${tokenString}`;
|
|
232
|
-
this.permissions = permissions;
|
|
233
226
|
|
|
234
227
|
originalConfig.headers['Authorization'] = `Bearer ${accessToken}`
|
|
235
228
|
|
|
@@ -253,9 +246,8 @@ export class BaseAPI {
|
|
|
253
246
|
){
|
|
254
247
|
_retry_count++;
|
|
255
248
|
try {
|
|
256
|
-
const
|
|
249
|
+
const tokenString = await this.refreshTokenInternal();
|
|
257
250
|
const accessToken = `Bearer ${tokenString}`;
|
|
258
|
-
this.permissions = permissions;
|
|
259
251
|
|
|
260
252
|
_retry = true;
|
|
261
253
|
originalConfig.headers['Authorization'] = accessToken;
|
|
@@ -24,6 +24,7 @@ export declare const NamedRangesApiAxiosParamCreator: (configuration?: Configura
|
|
|
24
24
|
* @param {string} productSlug A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
25
25
|
* @param {string} name Name of Named Range.
|
|
26
26
|
* @param {string} [authorization] Bearer Token
|
|
27
|
+
* @param {number} [productVersionId] The product version id of the product version to be used for the lead. The product version id will be validated if the \'validate\' flag is set to true.
|
|
27
28
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
28
29
|
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
29
30
|
* @param {string} [filters] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
@@ -32,7 +33,7 @@ export declare const NamedRangesApiAxiosParamCreator: (configuration?: Configura
|
|
|
32
33
|
* @param {*} [options] Override http request option.
|
|
33
34
|
* @throws {RequiredError}
|
|
34
35
|
*/
|
|
35
|
-
filterNamedRange: (productSlug: string, name: string, authorization?: string, pageSize?: number, pageToken?: string, filters?: string, search?: string, order?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
36
|
+
filterNamedRange: (productSlug: string, name: string, authorization?: string, productVersionId?: number, pageSize?: number, pageToken?: string, filters?: string, search?: string, order?: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
36
37
|
};
|
|
37
38
|
/**
|
|
38
39
|
* NamedRangesApi - functional programming interface
|
|
@@ -45,6 +46,7 @@ export declare const NamedRangesApiFp: (configuration?: Configuration) => {
|
|
|
45
46
|
* @param {string} productSlug A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
46
47
|
* @param {string} name Name of Named Range.
|
|
47
48
|
* @param {string} [authorization] Bearer Token
|
|
49
|
+
* @param {number} [productVersionId] The product version id of the product version to be used for the lead. The product version id will be validated if the \'validate\' flag is set to true.
|
|
48
50
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
49
51
|
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
50
52
|
* @param {string} [filters] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
@@ -53,7 +55,7 @@ export declare const NamedRangesApiFp: (configuration?: Configuration) => {
|
|
|
53
55
|
* @param {*} [options] Override http request option.
|
|
54
56
|
* @throws {RequiredError}
|
|
55
57
|
*/
|
|
56
|
-
filterNamedRange(productSlug: string, name: string, authorization?: string, pageSize?: number, pageToken?: string, filters?: string, search?: string, order?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FilterNamedRangeResponseClass>>;
|
|
58
|
+
filterNamedRange(productSlug: string, name: string, authorization?: string, productVersionId?: number, pageSize?: number, pageToken?: string, filters?: string, search?: string, order?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<FilterNamedRangeResponseClass>>;
|
|
57
59
|
};
|
|
58
60
|
/**
|
|
59
61
|
* NamedRangesApi - factory interface
|
|
@@ -66,6 +68,7 @@ export declare const NamedRangesApiFactory: (configuration?: Configuration, base
|
|
|
66
68
|
* @param {string} productSlug A slug is a human-readable, unique identifier, used to identify a resource instead of a less human-readable identifier like an id.
|
|
67
69
|
* @param {string} name Name of Named Range.
|
|
68
70
|
* @param {string} [authorization] Bearer Token
|
|
71
|
+
* @param {number} [productVersionId] The product version id of the product version to be used for the lead. The product version id will be validated if the \'validate\' flag is set to true.
|
|
69
72
|
* @param {number} [pageSize] A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
70
73
|
* @param {string} [pageToken] A cursor for use in pagination. pageToken is an ID that defines your place in the list. For instance, if you make a list request and receive 100 objects and pageToken=1, your subsequent call can include pageToken=2 in order to fetch the next page of the list.
|
|
71
74
|
* @param {string} [filters] Filter the response by one or multiple fields. In general, fetching filtered responses will conserve bandwidth and reduce response time.
|
|
@@ -74,7 +77,7 @@ export declare const NamedRangesApiFactory: (configuration?: Configuration, base
|
|
|
74
77
|
* @param {*} [options] Override http request option.
|
|
75
78
|
* @throws {RequiredError}
|
|
76
79
|
*/
|
|
77
|
-
filterNamedRange(productSlug: string, name: string, authorization?: string, pageSize?: number, pageToken?: string, filters?: string, search?: string, order?: string, options?: any): AxiosPromise<FilterNamedRangeResponseClass>;
|
|
80
|
+
filterNamedRange(productSlug: string, name: string, authorization?: string, productVersionId?: number, pageSize?: number, pageToken?: string, filters?: string, search?: string, order?: string, options?: any): AxiosPromise<FilterNamedRangeResponseClass>;
|
|
78
81
|
};
|
|
79
82
|
/**
|
|
80
83
|
* Request parameters for filterNamedRange operation in NamedRangesApi.
|
|
@@ -100,6 +103,12 @@ export interface NamedRangesApiFilterNamedRangeRequest {
|
|
|
100
103
|
* @memberof NamedRangesApiFilterNamedRange
|
|
101
104
|
*/
|
|
102
105
|
readonly authorization?: string;
|
|
106
|
+
/**
|
|
107
|
+
* The product version id of the product version to be used for the lead. The product version id will be validated if the \'validate\' flag is set to true.
|
|
108
|
+
* @type {number}
|
|
109
|
+
* @memberof NamedRangesApiFilterNamedRange
|
|
110
|
+
*/
|
|
111
|
+
readonly productVersionId?: number;
|
|
103
112
|
/**
|
|
104
113
|
* A limit on the number of objects to be returned. Limit ranges between 1 and 50. Default: 10.
|
|
105
114
|
* @type {number}
|