@emilgroup/public-api-sdk-node 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +30 -0
- package/.openapi-generator/VERSION +1 -0
- package/.openapi-generator-ignore +23 -0
- package/README.md +51 -0
- package/api/documents-api.ts +424 -0
- package/api/payment-setup-api.ts +260 -0
- package/api/products-api.ts +958 -0
- package/api.ts +36 -0
- package/base.ts +247 -0
- package/common.ts +198 -0
- package/configuration.ts +101 -0
- package/dist/api/documents-api.d.ts +239 -0
- package/dist/api/documents-api.js +427 -0
- package/dist/api/payment-setup-api.d.ts +144 -0
- package/dist/api/payment-setup-api.js +309 -0
- package/dist/api/products-api.d.ts +511 -0
- package/dist/api/products-api.js +935 -0
- package/dist/api.d.ts +18 -0
- package/dist/api.js +38 -0
- package/dist/base.d.ts +72 -0
- package/dist/base.js +293 -0
- package/dist/common.d.ts +91 -0
- package/dist/common.js +276 -0
- package/dist/configuration.d.ts +83 -0
- package/dist/configuration.js +44 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +35 -0
- package/dist/models/complete-braintree-payment-setup-request-dto.d.ts +48 -0
- package/dist/models/complete-braintree-payment-setup-request-dto.js +15 -0
- package/dist/models/complete-payment-setup-request-dto.d.ts +32 -0
- package/dist/models/complete-payment-setup-request-dto.js +15 -0
- package/dist/models/complete-stripe-payment-setup-request-dto.d.ts +54 -0
- package/dist/models/complete-stripe-payment-setup-request-dto.js +15 -0
- package/dist/models/create-account-request-dto.d.ts +90 -0
- package/dist/models/create-account-request-dto.js +21 -0
- package/dist/models/create-bank-account-request-dto.d.ts +30 -0
- package/dist/models/create-bank-account-request-dto.js +15 -0
- package/dist/models/create-custom-application-request-dto.d.ts +34 -0
- package/dist/models/create-custom-application-request-dto.js +19 -0
- package/dist/models/create-document-request-dto.d.ts +95 -0
- package/dist/models/create-document-request-dto.js +31 -0
- package/dist/models/create-estimated-invoice-request-dto.d.ts +41 -0
- package/dist/models/create-estimated-invoice-request-dto.js +19 -0
- package/dist/models/create-lead-request-dto.d.ts +77 -0
- package/dist/models/create-lead-request-dto.js +22 -0
- package/dist/models/index.d.ts +14 -0
- package/dist/models/index.js +30 -0
- package/dist/models/initiate-braintree-payment-setup-request-dto.d.ts +24 -0
- package/dist/models/initiate-braintree-payment-setup-request-dto.js +15 -0
- package/dist/models/initiate-payment-setup-request-dto.d.ts +32 -0
- package/dist/models/initiate-payment-setup-request-dto.js +15 -0
- package/dist/models/initiate-stripe-payment-setup-request-dto.d.ts +24 -0
- package/dist/models/initiate-stripe-payment-setup-request-dto.js +15 -0
- package/dist/models/policy-object-request-dto.d.ts +30 -0
- package/dist/models/policy-object-request-dto.js +15 -0
- package/dist/models/uploaded-document-dto.d.ts +24 -0
- package/dist/models/uploaded-document-dto.js +15 -0
- package/git_push.sh +57 -0
- package/index.ts +19 -0
- package/models/complete-braintree-payment-setup-request-dto.ts +54 -0
- package/models/complete-payment-setup-request-dto.ts +38 -0
- package/models/complete-stripe-payment-setup-request-dto.ts +60 -0
- package/models/create-account-request-dto.ts +99 -0
- package/models/create-bank-account-request-dto.ts +36 -0
- package/models/create-custom-application-request-dto.ts +43 -0
- package/models/create-document-request-dto.ts +105 -0
- package/models/create-estimated-invoice-request-dto.ts +50 -0
- package/models/create-lead-request-dto.ts +86 -0
- package/models/index.ts +14 -0
- package/models/initiate-braintree-payment-setup-request-dto.ts +30 -0
- package/models/initiate-payment-setup-request-dto.ts +38 -0
- package/models/initiate-stripe-payment-setup-request-dto.ts +30 -0
- package/models/policy-object-request-dto.ts +36 -0
- package/models/uploaded-document-dto.ts +30 -0
- package/package.json +27 -0
- package/tsconfig.json +22 -0
|
@@ -0,0 +1,260 @@
|
|
|
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 { CompletePaymentSetupRequestDto } from '../models';
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
import { InitiatePaymentSetupRequestDto } from '../models';
|
|
27
|
+
/**
|
|
28
|
+
* PaymentSetupApi - axios parameter creator
|
|
29
|
+
* @export
|
|
30
|
+
*/
|
|
31
|
+
export const PaymentSetupApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
32
|
+
return {
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @param {CompletePaymentSetupRequestDto} completePaymentSetupRequestDto
|
|
36
|
+
* @param {string} [authorization] Bearer Token
|
|
37
|
+
* @param {*} [options] Override http request option.
|
|
38
|
+
* @throws {RequiredError}
|
|
39
|
+
*/
|
|
40
|
+
completePaymentSetup: async (completePaymentSetupRequestDto: CompletePaymentSetupRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
41
|
+
// verify required parameter 'completePaymentSetupRequestDto' is not null or undefined
|
|
42
|
+
assertParamExists('completePaymentSetup', 'completePaymentSetupRequestDto', completePaymentSetupRequestDto)
|
|
43
|
+
const localVarPath = `/publicapi/v1/payment-setup/complete`;
|
|
44
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
45
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
46
|
+
let baseOptions;
|
|
47
|
+
let baseAccessToken;
|
|
48
|
+
if (configuration) {
|
|
49
|
+
baseOptions = configuration.baseOptions;
|
|
50
|
+
baseAccessToken = configuration.accessToken;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
54
|
+
const localVarHeaderParameter = {} as any;
|
|
55
|
+
const localVarQueryParameter = {} as any;
|
|
56
|
+
|
|
57
|
+
// authentication bearer required
|
|
58
|
+
// http bearer authentication required
|
|
59
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
60
|
+
|
|
61
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
62
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
68
|
+
|
|
69
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
70
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
71
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
72
|
+
localVarRequestOptions.data = serializeDataIfNeeded(completePaymentSetupRequestDto, localVarRequestOptions, configuration)
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
url: toPathString(localVarUrlObj),
|
|
76
|
+
options: localVarRequestOptions,
|
|
77
|
+
};
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @param {InitiatePaymentSetupRequestDto} initiatePaymentSetupRequestDto
|
|
82
|
+
* @param {string} [authorization] Bearer Token
|
|
83
|
+
* @param {*} [options] Override http request option.
|
|
84
|
+
* @throws {RequiredError}
|
|
85
|
+
*/
|
|
86
|
+
initiatePaymentSetup: async (initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto, authorization?: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
87
|
+
// verify required parameter 'initiatePaymentSetupRequestDto' is not null or undefined
|
|
88
|
+
assertParamExists('initiatePaymentSetup', 'initiatePaymentSetupRequestDto', initiatePaymentSetupRequestDto)
|
|
89
|
+
const localVarPath = `/publicapi/v1/payment-setup/initiate`;
|
|
90
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
91
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
92
|
+
let baseOptions;
|
|
93
|
+
let baseAccessToken;
|
|
94
|
+
if (configuration) {
|
|
95
|
+
baseOptions = configuration.baseOptions;
|
|
96
|
+
baseAccessToken = configuration.accessToken;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
100
|
+
const localVarHeaderParameter = {} as any;
|
|
101
|
+
const localVarQueryParameter = {} as any;
|
|
102
|
+
|
|
103
|
+
// authentication bearer required
|
|
104
|
+
// http bearer authentication required
|
|
105
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
106
|
+
|
|
107
|
+
if (authorization !== undefined && authorization !== null || baseAccessToken !== undefined && baseAccessToken !== null) {
|
|
108
|
+
localVarHeaderParameter['Authorization'] = String(authorization ? authorization : baseAccessToken);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
114
|
+
|
|
115
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
116
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
117
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
118
|
+
localVarRequestOptions.data = serializeDataIfNeeded(initiatePaymentSetupRequestDto, localVarRequestOptions, configuration)
|
|
119
|
+
|
|
120
|
+
return {
|
|
121
|
+
url: toPathString(localVarUrlObj),
|
|
122
|
+
options: localVarRequestOptions,
|
|
123
|
+
};
|
|
124
|
+
},
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* PaymentSetupApi - functional programming interface
|
|
130
|
+
* @export
|
|
131
|
+
*/
|
|
132
|
+
export const PaymentSetupApiFp = function(configuration?: Configuration) {
|
|
133
|
+
const localVarAxiosParamCreator = PaymentSetupApiAxiosParamCreator(configuration)
|
|
134
|
+
return {
|
|
135
|
+
/**
|
|
136
|
+
*
|
|
137
|
+
* @param {CompletePaymentSetupRequestDto} completePaymentSetupRequestDto
|
|
138
|
+
* @param {string} [authorization] Bearer Token
|
|
139
|
+
* @param {*} [options] Override http request option.
|
|
140
|
+
* @throws {RequiredError}
|
|
141
|
+
*/
|
|
142
|
+
async completePaymentSetup(completePaymentSetupRequestDto: CompletePaymentSetupRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
143
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.completePaymentSetup(completePaymentSetupRequestDto, authorization, options);
|
|
144
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
145
|
+
},
|
|
146
|
+
/**
|
|
147
|
+
*
|
|
148
|
+
* @param {InitiatePaymentSetupRequestDto} initiatePaymentSetupRequestDto
|
|
149
|
+
* @param {string} [authorization] Bearer Token
|
|
150
|
+
* @param {*} [options] Override http request option.
|
|
151
|
+
* @throws {RequiredError}
|
|
152
|
+
*/
|
|
153
|
+
async initiatePaymentSetup(initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto, authorization?: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
|
|
154
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.initiatePaymentSetup(initiatePaymentSetupRequestDto, authorization, options);
|
|
155
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
156
|
+
},
|
|
157
|
+
}
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* PaymentSetupApi - factory interface
|
|
162
|
+
* @export
|
|
163
|
+
*/
|
|
164
|
+
export const PaymentSetupApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
165
|
+
const localVarFp = PaymentSetupApiFp(configuration)
|
|
166
|
+
return {
|
|
167
|
+
/**
|
|
168
|
+
*
|
|
169
|
+
* @param {CompletePaymentSetupRequestDto} completePaymentSetupRequestDto
|
|
170
|
+
* @param {string} [authorization] Bearer Token
|
|
171
|
+
* @param {*} [options] Override http request option.
|
|
172
|
+
* @throws {RequiredError}
|
|
173
|
+
*/
|
|
174
|
+
completePaymentSetup(completePaymentSetupRequestDto: CompletePaymentSetupRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
|
|
175
|
+
return localVarFp.completePaymentSetup(completePaymentSetupRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
176
|
+
},
|
|
177
|
+
/**
|
|
178
|
+
*
|
|
179
|
+
* @param {InitiatePaymentSetupRequestDto} initiatePaymentSetupRequestDto
|
|
180
|
+
* @param {string} [authorization] Bearer Token
|
|
181
|
+
* @param {*} [options] Override http request option.
|
|
182
|
+
* @throws {RequiredError}
|
|
183
|
+
*/
|
|
184
|
+
initiatePaymentSetup(initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto, authorization?: string, options?: any): AxiosPromise<void> {
|
|
185
|
+
return localVarFp.initiatePaymentSetup(initiatePaymentSetupRequestDto, authorization, options).then((request) => request(axios, basePath));
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Request parameters for completePaymentSetup operation in PaymentSetupApi.
|
|
192
|
+
* @export
|
|
193
|
+
* @interface PaymentSetupApiCompletePaymentSetupRequest
|
|
194
|
+
*/
|
|
195
|
+
export interface PaymentSetupApiCompletePaymentSetupRequest {
|
|
196
|
+
/**
|
|
197
|
+
*
|
|
198
|
+
* @type {CompletePaymentSetupRequestDto}
|
|
199
|
+
* @memberof PaymentSetupApiCompletePaymentSetup
|
|
200
|
+
*/
|
|
201
|
+
readonly completePaymentSetupRequestDto: CompletePaymentSetupRequestDto
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Bearer Token
|
|
205
|
+
* @type {string}
|
|
206
|
+
* @memberof PaymentSetupApiCompletePaymentSetup
|
|
207
|
+
*/
|
|
208
|
+
readonly authorization?: string
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Request parameters for initiatePaymentSetup operation in PaymentSetupApi.
|
|
213
|
+
* @export
|
|
214
|
+
* @interface PaymentSetupApiInitiatePaymentSetupRequest
|
|
215
|
+
*/
|
|
216
|
+
export interface PaymentSetupApiInitiatePaymentSetupRequest {
|
|
217
|
+
/**
|
|
218
|
+
*
|
|
219
|
+
* @type {InitiatePaymentSetupRequestDto}
|
|
220
|
+
* @memberof PaymentSetupApiInitiatePaymentSetup
|
|
221
|
+
*/
|
|
222
|
+
readonly initiatePaymentSetupRequestDto: InitiatePaymentSetupRequestDto
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Bearer Token
|
|
226
|
+
* @type {string}
|
|
227
|
+
* @memberof PaymentSetupApiInitiatePaymentSetup
|
|
228
|
+
*/
|
|
229
|
+
readonly authorization?: string
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* PaymentSetupApi - object-oriented interface
|
|
234
|
+
* @export
|
|
235
|
+
* @class PaymentSetupApi
|
|
236
|
+
* @extends {BaseAPI}
|
|
237
|
+
*/
|
|
238
|
+
export class PaymentSetupApi extends BaseAPI {
|
|
239
|
+
/**
|
|
240
|
+
*
|
|
241
|
+
* @param {PaymentSetupApiCompletePaymentSetupRequest} requestParameters Request parameters.
|
|
242
|
+
* @param {*} [options] Override http request option.
|
|
243
|
+
* @throws {RequiredError}
|
|
244
|
+
* @memberof PaymentSetupApi
|
|
245
|
+
*/
|
|
246
|
+
public completePaymentSetup(requestParameters: PaymentSetupApiCompletePaymentSetupRequest, options?: AxiosRequestConfig) {
|
|
247
|
+
return PaymentSetupApiFp(this.configuration).completePaymentSetup(requestParameters.completePaymentSetupRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
*
|
|
252
|
+
* @param {PaymentSetupApiInitiatePaymentSetupRequest} requestParameters Request parameters.
|
|
253
|
+
* @param {*} [options] Override http request option.
|
|
254
|
+
* @throws {RequiredError}
|
|
255
|
+
* @memberof PaymentSetupApi
|
|
256
|
+
*/
|
|
257
|
+
public initiatePaymentSetup(requestParameters: PaymentSetupApiInitiatePaymentSetupRequest, options?: AxiosRequestConfig) {
|
|
258
|
+
return PaymentSetupApiFp(this.configuration).initiatePaymentSetup(requestParameters.initiatePaymentSetupRequestDto, requestParameters.authorization, options).then((request) => request(this.axios, this.basePath));
|
|
259
|
+
}
|
|
260
|
+
}
|