@finverse/sdk-typescript 0.0.18 → 0.0.21
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/dist/api.d.ts +3925 -0
- package/dist/api.js +2349 -0
- package/dist/base.d.ts +55 -0
- package/dist/base.js +60 -0
- package/dist/common.d.ts +65 -0
- package/dist/common.js +141 -0
- package/dist/configuration.d.ts +83 -0
- package/dist/configuration.js +42 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +27 -0
- package/dist/test/accounts.spec.d.ts +1 -0
- package/dist/test/accounts.spec.js +38 -0
- package/dist/test/authenticate.spec.d.ts +1 -0
- package/dist/test/authenticate.spec.js +46 -0
- package/dist/test/config.d.ts +10 -0
- package/dist/test/config.js +15 -0
- package/dist/test/link.spec.d.ts +1 -0
- package/dist/test/link.spec.js +75 -0
- package/dist/test/loginIdentity.spec.d.ts +1 -0
- package/dist/test/loginIdentity.spec.js +69 -0
- package/dist/test/responses/account.d.ts +2 -0
- package/dist/test/responses/account.js +104 -0
- package/dist/test/responses/accountNumber.d.ts +2 -0
- package/dist/test/responses/accountNumber.js +19 -0
- package/dist/test/responses/balanceHistory.d.ts +2 -0
- package/dist/test/responses/balanceHistory.js +21 -0
- package/dist/test/responses/customerToken.d.ts +5 -0
- package/dist/test/responses/customerToken.js +8 -0
- package/dist/test/responses/identity.d.ts +2 -0
- package/dist/test/responses/identity.js +54 -0
- package/dist/test/responses/linkToken.d.ts +6 -0
- package/dist/test/responses/linkToken.js +9 -0
- package/dist/test/responses/loginIdentity.d.ts +2 -0
- package/dist/test/responses/loginIdentity.js +85 -0
- package/dist/test/responses/loginIdentityHistory.d.ts +2 -0
- package/dist/test/responses/loginIdentityHistory.js +37 -0
- package/dist/test/responses/loginIdentityToken.d.ts +7 -0
- package/dist/test/responses/loginIdentityToken.js +10 -0
- package/dist/test/responses/statement.d.ts +2 -0
- package/dist/test/responses/statement.js +20 -0
- package/dist/test/responses/statementLink.d.ts +2 -0
- package/dist/test/responses/statementLink.js +15 -0
- package/dist/test/responses/transaction.d.ts +2 -0
- package/dist/test/responses/transaction.js +280 -0
- package/dist/test/statements.spec.d.ts +1 -0
- package/dist/test/statements.spec.js +44 -0
- package/dist/test/transactions.spec.d.ts +1 -0
- package/dist/test/transactions.spec.js +38 -0
- package/package.json +4 -3
package/dist/api.js
ADDED
|
@@ -0,0 +1,2349 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Finverse Public
|
|
6
|
+
* Documentation of the early finverse services
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.0.1
|
|
9
|
+
* Contact: devs@finverse.com
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
16
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
17
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
18
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
19
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
20
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
21
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.PublicApi = exports.PublicApiFactory = exports.PublicApiFp = exports.PublicApiAxiosParamCreator = exports.PaymentApi = exports.PaymentApiFactory = exports.PaymentApiFp = exports.PaymentApiAxiosParamCreator = exports.LoginIdentityApi = exports.LoginIdentityApiFactory = exports.LoginIdentityApiFp = exports.LoginIdentityApiAxiosParamCreator = exports.LinkApi = exports.LinkApiFactory = exports.LinkApiFp = exports.LinkApiAxiosParamCreator = exports.CustomerApi = exports.CustomerApiFactory = exports.CustomerApiFp = exports.CustomerApiAxiosParamCreator = exports.PaymentInstructionTypeEnum = exports.LinkTokenRequestUiModeEnum = exports.CustomerPaymentInstructionTypeEnum = void 0;
|
|
26
|
+
const axios_1 = require("axios");
|
|
27
|
+
// Some imports not used depending on template conditions
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
const common_1 = require("./common");
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
const base_1 = require("./base");
|
|
32
|
+
exports.CustomerPaymentInstructionTypeEnum = {
|
|
33
|
+
DebitAuthorization: 'DEBIT_AUTHORIZATION',
|
|
34
|
+
};
|
|
35
|
+
exports.LinkTokenRequestUiModeEnum = {
|
|
36
|
+
Iframe: 'iframe',
|
|
37
|
+
Redirect: 'redirect',
|
|
38
|
+
AutoRedirect: 'auto_redirect',
|
|
39
|
+
};
|
|
40
|
+
exports.PaymentInstructionTypeEnum = {
|
|
41
|
+
DebitAuthorization: 'DEBIT_AUTHORIZATION',
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* CustomerApi - axios parameter creator
|
|
45
|
+
* @export
|
|
46
|
+
*/
|
|
47
|
+
exports.CustomerApiAxiosParamCreator = function (configuration) {
|
|
48
|
+
return {
|
|
49
|
+
/**
|
|
50
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
51
|
+
* @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
52
|
+
* @param {*} [options] Override http request option.
|
|
53
|
+
* @throws {RequiredError}
|
|
54
|
+
*/
|
|
55
|
+
createPaymentInstruction: (paymentInstruction, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
// verify required parameter 'paymentInstruction' is not null or undefined
|
|
57
|
+
common_1.assertParamExists('createPaymentInstruction', 'paymentInstruction', paymentInstruction);
|
|
58
|
+
const localVarPath = `/payments/instruction`;
|
|
59
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
60
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
61
|
+
let baseOptions;
|
|
62
|
+
if (configuration) {
|
|
63
|
+
baseOptions = configuration.baseOptions;
|
|
64
|
+
}
|
|
65
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
66
|
+
const localVarHeaderParameter = {};
|
|
67
|
+
const localVarQueryParameter = {};
|
|
68
|
+
// authentication Oauth2 required
|
|
69
|
+
// oauth required
|
|
70
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
71
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
72
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
73
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
74
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
75
|
+
localVarRequestOptions.data = common_1.serializeDataIfNeeded(paymentInstruction, localVarRequestOptions, configuration);
|
|
76
|
+
return {
|
|
77
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
78
|
+
options: localVarRequestOptions,
|
|
79
|
+
};
|
|
80
|
+
}),
|
|
81
|
+
/**
|
|
82
|
+
* generate a link token that can be used to create link
|
|
83
|
+
* @param {LinkTokenRequest} linkTokenRequest token request
|
|
84
|
+
* @param {*} [options] Override http request option.
|
|
85
|
+
* @throws {RequiredError}
|
|
86
|
+
*/
|
|
87
|
+
generateLinkToken: (linkTokenRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
// verify required parameter 'linkTokenRequest' is not null or undefined
|
|
89
|
+
common_1.assertParamExists('generateLinkToken', 'linkTokenRequest', linkTokenRequest);
|
|
90
|
+
const localVarPath = `/link/token`;
|
|
91
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
92
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
93
|
+
let baseOptions;
|
|
94
|
+
if (configuration) {
|
|
95
|
+
baseOptions = configuration.baseOptions;
|
|
96
|
+
}
|
|
97
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
98
|
+
const localVarHeaderParameter = {};
|
|
99
|
+
const localVarQueryParameter = {};
|
|
100
|
+
// authentication Oauth2 required
|
|
101
|
+
// oauth required
|
|
102
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
103
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
104
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
105
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
106
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
107
|
+
localVarRequestOptions.data = common_1.serializeDataIfNeeded(linkTokenRequest, localVarRequestOptions, configuration);
|
|
108
|
+
return {
|
|
109
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
110
|
+
options: localVarRequestOptions,
|
|
111
|
+
};
|
|
112
|
+
}),
|
|
113
|
+
/**
|
|
114
|
+
* Get a specific institution by institutionId
|
|
115
|
+
* @param {string} institutionId The institution id
|
|
116
|
+
* @param {*} [options] Override http request option.
|
|
117
|
+
* @throws {RequiredError}
|
|
118
|
+
*/
|
|
119
|
+
getInstitution: (institutionId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
// verify required parameter 'institutionId' is not null or undefined
|
|
121
|
+
common_1.assertParamExists('getInstitution', 'institutionId', institutionId);
|
|
122
|
+
const localVarPath = `/institutions/{institutionId}`.replace(`{${'institutionId'}}`, encodeURIComponent(String(institutionId)));
|
|
123
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
124
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
125
|
+
let baseOptions;
|
|
126
|
+
if (configuration) {
|
|
127
|
+
baseOptions = configuration.baseOptions;
|
|
128
|
+
}
|
|
129
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
130
|
+
const localVarHeaderParameter = {};
|
|
131
|
+
const localVarQueryParameter = {};
|
|
132
|
+
// authentication Oauth2 required
|
|
133
|
+
// oauth required
|
|
134
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', ['institution'], configuration);
|
|
135
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
136
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
137
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
138
|
+
return {
|
|
139
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
140
|
+
options: localVarRequestOptions,
|
|
141
|
+
};
|
|
142
|
+
}),
|
|
143
|
+
/**
|
|
144
|
+
* Get a specific loginIdentity
|
|
145
|
+
* @param {string} loginIdentityId The login identity id
|
|
146
|
+
* @param {*} [options] Override http request option.
|
|
147
|
+
* @throws {RequiredError}
|
|
148
|
+
*/
|
|
149
|
+
getLoginIdentityById: (loginIdentityId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
150
|
+
// verify required parameter 'loginIdentityId' is not null or undefined
|
|
151
|
+
common_1.assertParamExists('getLoginIdentityById', 'loginIdentityId', loginIdentityId);
|
|
152
|
+
const localVarPath = `/login_identity/{loginIdentityId}`.replace(`{${'loginIdentityId'}}`, encodeURIComponent(String(loginIdentityId)));
|
|
153
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
154
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
155
|
+
let baseOptions;
|
|
156
|
+
if (configuration) {
|
|
157
|
+
baseOptions = configuration.baseOptions;
|
|
158
|
+
}
|
|
159
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
160
|
+
const localVarHeaderParameter = {};
|
|
161
|
+
const localVarQueryParameter = {};
|
|
162
|
+
// authentication Oauth2 required
|
|
163
|
+
// oauth required
|
|
164
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
165
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
166
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
167
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
168
|
+
return {
|
|
169
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
170
|
+
options: localVarRequestOptions,
|
|
171
|
+
};
|
|
172
|
+
}),
|
|
173
|
+
/**
|
|
174
|
+
* Get a history of events for a specific loginIdentity
|
|
175
|
+
* @param {string} loginIdentityId The login identity id
|
|
176
|
+
* @param {*} [options] Override http request option.
|
|
177
|
+
* @throws {RequiredError}
|
|
178
|
+
*/
|
|
179
|
+
getLoginIdentityHistory: (loginIdentityId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
180
|
+
// verify required parameter 'loginIdentityId' is not null or undefined
|
|
181
|
+
common_1.assertParamExists('getLoginIdentityHistory', 'loginIdentityId', loginIdentityId);
|
|
182
|
+
const localVarPath = `/login_identity/{loginIdentityId}/history`.replace(`{${'loginIdentityId'}}`, encodeURIComponent(String(loginIdentityId)));
|
|
183
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
184
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
185
|
+
let baseOptions;
|
|
186
|
+
if (configuration) {
|
|
187
|
+
baseOptions = configuration.baseOptions;
|
|
188
|
+
}
|
|
189
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
190
|
+
const localVarHeaderParameter = {};
|
|
191
|
+
const localVarQueryParameter = {};
|
|
192
|
+
// authentication Oauth2 required
|
|
193
|
+
// oauth required
|
|
194
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
195
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
196
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
197
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
198
|
+
return {
|
|
199
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
200
|
+
options: localVarRequestOptions,
|
|
201
|
+
};
|
|
202
|
+
}),
|
|
203
|
+
/**
|
|
204
|
+
* Get payment instructions to be used when linking to perform debit authorization by id
|
|
205
|
+
* @param {string} paymentInstructionId The id of a payment instruction
|
|
206
|
+
* @param {*} [options] Override http request option.
|
|
207
|
+
* @throws {RequiredError}
|
|
208
|
+
*/
|
|
209
|
+
getPaymentInstruction: (paymentInstructionId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
210
|
+
// verify required parameter 'paymentInstructionId' is not null or undefined
|
|
211
|
+
common_1.assertParamExists('getPaymentInstruction', 'paymentInstructionId', paymentInstructionId);
|
|
212
|
+
const localVarPath = `/payments/instruction/{paymentInstructionId}`.replace(`{${'paymentInstructionId'}}`, encodeURIComponent(String(paymentInstructionId)));
|
|
213
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
214
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
215
|
+
let baseOptions;
|
|
216
|
+
if (configuration) {
|
|
217
|
+
baseOptions = configuration.baseOptions;
|
|
218
|
+
}
|
|
219
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
220
|
+
const localVarHeaderParameter = {};
|
|
221
|
+
const localVarQueryParameter = {};
|
|
222
|
+
// authentication Oauth2 required
|
|
223
|
+
// oauth required
|
|
224
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
225
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
226
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
227
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
228
|
+
return {
|
|
229
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
230
|
+
options: localVarRequestOptions,
|
|
231
|
+
};
|
|
232
|
+
}),
|
|
233
|
+
/**
|
|
234
|
+
* Get a list of institutions
|
|
235
|
+
* @param {string} [country] The country the institution belongs to
|
|
236
|
+
* @param {Array<string>} [countries] The countries the institution belongs to
|
|
237
|
+
* @param {string} [productsSupported] The products that this institution supports
|
|
238
|
+
* @param {string} [institutionType] The type of institution
|
|
239
|
+
* @param {*} [options] Override http request option.
|
|
240
|
+
* @throws {RequiredError}
|
|
241
|
+
*/
|
|
242
|
+
listInstitutions: (country, countries, productsSupported, institutionType, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
243
|
+
const localVarPath = `/institutions`;
|
|
244
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
245
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
246
|
+
let baseOptions;
|
|
247
|
+
if (configuration) {
|
|
248
|
+
baseOptions = configuration.baseOptions;
|
|
249
|
+
}
|
|
250
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
251
|
+
const localVarHeaderParameter = {};
|
|
252
|
+
const localVarQueryParameter = {};
|
|
253
|
+
// authentication Oauth2 required
|
|
254
|
+
// oauth required
|
|
255
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', ['institution'], configuration);
|
|
256
|
+
if (country !== undefined) {
|
|
257
|
+
localVarQueryParameter['country'] = country;
|
|
258
|
+
}
|
|
259
|
+
if (countries) {
|
|
260
|
+
localVarQueryParameter['countries'] = countries.join(base_1.COLLECTION_FORMATS.csv);
|
|
261
|
+
}
|
|
262
|
+
if (productsSupported !== undefined) {
|
|
263
|
+
localVarQueryParameter['products_supported'] = productsSupported;
|
|
264
|
+
}
|
|
265
|
+
if (institutionType !== undefined) {
|
|
266
|
+
localVarQueryParameter['institution_type'] = institutionType;
|
|
267
|
+
}
|
|
268
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
269
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
270
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
271
|
+
return {
|
|
272
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
273
|
+
options: localVarRequestOptions,
|
|
274
|
+
};
|
|
275
|
+
}),
|
|
276
|
+
/**
|
|
277
|
+
* Refresh an access token
|
|
278
|
+
* @param {RefreshRequest} refreshRequest The refresh token
|
|
279
|
+
* @param {*} [options] Override http request option.
|
|
280
|
+
* @throws {RequiredError}
|
|
281
|
+
*/
|
|
282
|
+
refreshToken: (refreshRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
283
|
+
// verify required parameter 'refreshRequest' is not null or undefined
|
|
284
|
+
common_1.assertParamExists('refreshToken', 'refreshRequest', refreshRequest);
|
|
285
|
+
const localVarPath = `/auth/token/refresh`;
|
|
286
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
287
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
288
|
+
let baseOptions;
|
|
289
|
+
if (configuration) {
|
|
290
|
+
baseOptions = configuration.baseOptions;
|
|
291
|
+
}
|
|
292
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
293
|
+
const localVarHeaderParameter = {};
|
|
294
|
+
const localVarQueryParameter = {};
|
|
295
|
+
// authentication Oauth2 required
|
|
296
|
+
// oauth required
|
|
297
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
298
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
299
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
300
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
301
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
302
|
+
localVarRequestOptions.data = common_1.serializeDataIfNeeded(refreshRequest, localVarRequestOptions, configuration);
|
|
303
|
+
return {
|
|
304
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
305
|
+
options: localVarRequestOptions,
|
|
306
|
+
};
|
|
307
|
+
}),
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
/**
|
|
311
|
+
* CustomerApi - functional programming interface
|
|
312
|
+
* @export
|
|
313
|
+
*/
|
|
314
|
+
exports.CustomerApiFp = function (configuration) {
|
|
315
|
+
const localVarAxiosParamCreator = exports.CustomerApiAxiosParamCreator(configuration);
|
|
316
|
+
return {
|
|
317
|
+
/**
|
|
318
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
319
|
+
* @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
320
|
+
* @param {*} [options] Override http request option.
|
|
321
|
+
* @throws {RequiredError}
|
|
322
|
+
*/
|
|
323
|
+
createPaymentInstruction(paymentInstruction, options) {
|
|
324
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
325
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createPaymentInstruction(paymentInstruction, options);
|
|
326
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
327
|
+
});
|
|
328
|
+
},
|
|
329
|
+
/**
|
|
330
|
+
* generate a link token that can be used to create link
|
|
331
|
+
* @param {LinkTokenRequest} linkTokenRequest token request
|
|
332
|
+
* @param {*} [options] Override http request option.
|
|
333
|
+
* @throws {RequiredError}
|
|
334
|
+
*/
|
|
335
|
+
generateLinkToken(linkTokenRequest, options) {
|
|
336
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
337
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.generateLinkToken(linkTokenRequest, options);
|
|
338
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
339
|
+
});
|
|
340
|
+
},
|
|
341
|
+
/**
|
|
342
|
+
* Get a specific institution by institutionId
|
|
343
|
+
* @param {string} institutionId The institution id
|
|
344
|
+
* @param {*} [options] Override http request option.
|
|
345
|
+
* @throws {RequiredError}
|
|
346
|
+
*/
|
|
347
|
+
getInstitution(institutionId, options) {
|
|
348
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
349
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getInstitution(institutionId, options);
|
|
350
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
351
|
+
});
|
|
352
|
+
},
|
|
353
|
+
/**
|
|
354
|
+
* Get a specific loginIdentity
|
|
355
|
+
* @param {string} loginIdentityId The login identity id
|
|
356
|
+
* @param {*} [options] Override http request option.
|
|
357
|
+
* @throws {RequiredError}
|
|
358
|
+
*/
|
|
359
|
+
getLoginIdentityById(loginIdentityId, options) {
|
|
360
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
361
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getLoginIdentityById(loginIdentityId, options);
|
|
362
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
363
|
+
});
|
|
364
|
+
},
|
|
365
|
+
/**
|
|
366
|
+
* Get a history of events for a specific loginIdentity
|
|
367
|
+
* @param {string} loginIdentityId The login identity id
|
|
368
|
+
* @param {*} [options] Override http request option.
|
|
369
|
+
* @throws {RequiredError}
|
|
370
|
+
*/
|
|
371
|
+
getLoginIdentityHistory(loginIdentityId, options) {
|
|
372
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
373
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getLoginIdentityHistory(loginIdentityId, options);
|
|
374
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
375
|
+
});
|
|
376
|
+
},
|
|
377
|
+
/**
|
|
378
|
+
* Get payment instructions to be used when linking to perform debit authorization by id
|
|
379
|
+
* @param {string} paymentInstructionId The id of a payment instruction
|
|
380
|
+
* @param {*} [options] Override http request option.
|
|
381
|
+
* @throws {RequiredError}
|
|
382
|
+
*/
|
|
383
|
+
getPaymentInstruction(paymentInstructionId, options) {
|
|
384
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
385
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPaymentInstruction(paymentInstructionId, options);
|
|
386
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
387
|
+
});
|
|
388
|
+
},
|
|
389
|
+
/**
|
|
390
|
+
* Get a list of institutions
|
|
391
|
+
* @param {string} [country] The country the institution belongs to
|
|
392
|
+
* @param {Array<string>} [countries] The countries the institution belongs to
|
|
393
|
+
* @param {string} [productsSupported] The products that this institution supports
|
|
394
|
+
* @param {string} [institutionType] The type of institution
|
|
395
|
+
* @param {*} [options] Override http request option.
|
|
396
|
+
* @throws {RequiredError}
|
|
397
|
+
*/
|
|
398
|
+
listInstitutions(country, countries, productsSupported, institutionType, options) {
|
|
399
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
400
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listInstitutions(country, countries, productsSupported, institutionType, options);
|
|
401
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
402
|
+
});
|
|
403
|
+
},
|
|
404
|
+
/**
|
|
405
|
+
* Refresh an access token
|
|
406
|
+
* @param {RefreshRequest} refreshRequest The refresh token
|
|
407
|
+
* @param {*} [options] Override http request option.
|
|
408
|
+
* @throws {RequiredError}
|
|
409
|
+
*/
|
|
410
|
+
refreshToken(refreshRequest, options) {
|
|
411
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
412
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.refreshToken(refreshRequest, options);
|
|
413
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
414
|
+
});
|
|
415
|
+
},
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
/**
|
|
419
|
+
* CustomerApi - factory interface
|
|
420
|
+
* @export
|
|
421
|
+
*/
|
|
422
|
+
exports.CustomerApiFactory = function (configuration, basePath, axios) {
|
|
423
|
+
const localVarFp = exports.CustomerApiFp(configuration);
|
|
424
|
+
return {
|
|
425
|
+
/**
|
|
426
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
427
|
+
* @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
428
|
+
* @param {*} [options] Override http request option.
|
|
429
|
+
* @throws {RequiredError}
|
|
430
|
+
*/
|
|
431
|
+
createPaymentInstruction(paymentInstruction, options) {
|
|
432
|
+
return localVarFp
|
|
433
|
+
.createPaymentInstruction(paymentInstruction, options)
|
|
434
|
+
.then((request) => request(axios, basePath));
|
|
435
|
+
},
|
|
436
|
+
/**
|
|
437
|
+
* generate a link token that can be used to create link
|
|
438
|
+
* @param {LinkTokenRequest} linkTokenRequest token request
|
|
439
|
+
* @param {*} [options] Override http request option.
|
|
440
|
+
* @throws {RequiredError}
|
|
441
|
+
*/
|
|
442
|
+
generateLinkToken(linkTokenRequest, options) {
|
|
443
|
+
return localVarFp.generateLinkToken(linkTokenRequest, options).then((request) => request(axios, basePath));
|
|
444
|
+
},
|
|
445
|
+
/**
|
|
446
|
+
* Get a specific institution by institutionId
|
|
447
|
+
* @param {string} institutionId The institution id
|
|
448
|
+
* @param {*} [options] Override http request option.
|
|
449
|
+
* @throws {RequiredError}
|
|
450
|
+
*/
|
|
451
|
+
getInstitution(institutionId, options) {
|
|
452
|
+
return localVarFp.getInstitution(institutionId, options).then((request) => request(axios, basePath));
|
|
453
|
+
},
|
|
454
|
+
/**
|
|
455
|
+
* Get a specific loginIdentity
|
|
456
|
+
* @param {string} loginIdentityId The login identity id
|
|
457
|
+
* @param {*} [options] Override http request option.
|
|
458
|
+
* @throws {RequiredError}
|
|
459
|
+
*/
|
|
460
|
+
getLoginIdentityById(loginIdentityId, options) {
|
|
461
|
+
return localVarFp.getLoginIdentityById(loginIdentityId, options).then((request) => request(axios, basePath));
|
|
462
|
+
},
|
|
463
|
+
/**
|
|
464
|
+
* Get a history of events for a specific loginIdentity
|
|
465
|
+
* @param {string} loginIdentityId The login identity id
|
|
466
|
+
* @param {*} [options] Override http request option.
|
|
467
|
+
* @throws {RequiredError}
|
|
468
|
+
*/
|
|
469
|
+
getLoginIdentityHistory(loginIdentityId, options) {
|
|
470
|
+
return localVarFp.getLoginIdentityHistory(loginIdentityId, options).then((request) => request(axios, basePath));
|
|
471
|
+
},
|
|
472
|
+
/**
|
|
473
|
+
* Get payment instructions to be used when linking to perform debit authorization by id
|
|
474
|
+
* @param {string} paymentInstructionId The id of a payment instruction
|
|
475
|
+
* @param {*} [options] Override http request option.
|
|
476
|
+
* @throws {RequiredError}
|
|
477
|
+
*/
|
|
478
|
+
getPaymentInstruction(paymentInstructionId, options) {
|
|
479
|
+
return localVarFp
|
|
480
|
+
.getPaymentInstruction(paymentInstructionId, options)
|
|
481
|
+
.then((request) => request(axios, basePath));
|
|
482
|
+
},
|
|
483
|
+
/**
|
|
484
|
+
* Get a list of institutions
|
|
485
|
+
* @param {string} [country] The country the institution belongs to
|
|
486
|
+
* @param {Array<string>} [countries] The countries the institution belongs to
|
|
487
|
+
* @param {string} [productsSupported] The products that this institution supports
|
|
488
|
+
* @param {string} [institutionType] The type of institution
|
|
489
|
+
* @param {*} [options] Override http request option.
|
|
490
|
+
* @throws {RequiredError}
|
|
491
|
+
*/
|
|
492
|
+
listInstitutions(country, countries, productsSupported, institutionType, options) {
|
|
493
|
+
return localVarFp
|
|
494
|
+
.listInstitutions(country, countries, productsSupported, institutionType, options)
|
|
495
|
+
.then((request) => request(axios, basePath));
|
|
496
|
+
},
|
|
497
|
+
/**
|
|
498
|
+
* Refresh an access token
|
|
499
|
+
* @param {RefreshRequest} refreshRequest The refresh token
|
|
500
|
+
* @param {*} [options] Override http request option.
|
|
501
|
+
* @throws {RequiredError}
|
|
502
|
+
*/
|
|
503
|
+
refreshToken(refreshRequest, options) {
|
|
504
|
+
return localVarFp.refreshToken(refreshRequest, options).then((request) => request(axios, basePath));
|
|
505
|
+
},
|
|
506
|
+
};
|
|
507
|
+
};
|
|
508
|
+
/**
|
|
509
|
+
* CustomerApi - object-oriented interface
|
|
510
|
+
* @export
|
|
511
|
+
* @class CustomerApi
|
|
512
|
+
* @extends {BaseAPI}
|
|
513
|
+
*/
|
|
514
|
+
class CustomerApi extends base_1.BaseAPI {
|
|
515
|
+
/**
|
|
516
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
517
|
+
* @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
518
|
+
* @param {*} [options] Override http request option.
|
|
519
|
+
* @throws {RequiredError}
|
|
520
|
+
* @memberof CustomerApi
|
|
521
|
+
*/
|
|
522
|
+
createPaymentInstruction(paymentInstruction, options) {
|
|
523
|
+
return exports.CustomerApiFp(this.configuration)
|
|
524
|
+
.createPaymentInstruction(paymentInstruction, options)
|
|
525
|
+
.then((request) => request(this.axios, this.basePath));
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* generate a link token that can be used to create link
|
|
529
|
+
* @param {LinkTokenRequest} linkTokenRequest token request
|
|
530
|
+
* @param {*} [options] Override http request option.
|
|
531
|
+
* @throws {RequiredError}
|
|
532
|
+
* @memberof CustomerApi
|
|
533
|
+
*/
|
|
534
|
+
generateLinkToken(linkTokenRequest, options) {
|
|
535
|
+
return exports.CustomerApiFp(this.configuration)
|
|
536
|
+
.generateLinkToken(linkTokenRequest, options)
|
|
537
|
+
.then((request) => request(this.axios, this.basePath));
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* Get a specific institution by institutionId
|
|
541
|
+
* @param {string} institutionId The institution id
|
|
542
|
+
* @param {*} [options] Override http request option.
|
|
543
|
+
* @throws {RequiredError}
|
|
544
|
+
* @memberof CustomerApi
|
|
545
|
+
*/
|
|
546
|
+
getInstitution(institutionId, options) {
|
|
547
|
+
return exports.CustomerApiFp(this.configuration)
|
|
548
|
+
.getInstitution(institutionId, options)
|
|
549
|
+
.then((request) => request(this.axios, this.basePath));
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* Get a specific loginIdentity
|
|
553
|
+
* @param {string} loginIdentityId The login identity id
|
|
554
|
+
* @param {*} [options] Override http request option.
|
|
555
|
+
* @throws {RequiredError}
|
|
556
|
+
* @memberof CustomerApi
|
|
557
|
+
*/
|
|
558
|
+
getLoginIdentityById(loginIdentityId, options) {
|
|
559
|
+
return exports.CustomerApiFp(this.configuration)
|
|
560
|
+
.getLoginIdentityById(loginIdentityId, options)
|
|
561
|
+
.then((request) => request(this.axios, this.basePath));
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* Get a history of events for a specific loginIdentity
|
|
565
|
+
* @param {string} loginIdentityId The login identity id
|
|
566
|
+
* @param {*} [options] Override http request option.
|
|
567
|
+
* @throws {RequiredError}
|
|
568
|
+
* @memberof CustomerApi
|
|
569
|
+
*/
|
|
570
|
+
getLoginIdentityHistory(loginIdentityId, options) {
|
|
571
|
+
return exports.CustomerApiFp(this.configuration)
|
|
572
|
+
.getLoginIdentityHistory(loginIdentityId, options)
|
|
573
|
+
.then((request) => request(this.axios, this.basePath));
|
|
574
|
+
}
|
|
575
|
+
/**
|
|
576
|
+
* Get payment instructions to be used when linking to perform debit authorization by id
|
|
577
|
+
* @param {string} paymentInstructionId The id of a payment instruction
|
|
578
|
+
* @param {*} [options] Override http request option.
|
|
579
|
+
* @throws {RequiredError}
|
|
580
|
+
* @memberof CustomerApi
|
|
581
|
+
*/
|
|
582
|
+
getPaymentInstruction(paymentInstructionId, options) {
|
|
583
|
+
return exports.CustomerApiFp(this.configuration)
|
|
584
|
+
.getPaymentInstruction(paymentInstructionId, options)
|
|
585
|
+
.then((request) => request(this.axios, this.basePath));
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Get a list of institutions
|
|
589
|
+
* @param {string} [country] The country the institution belongs to
|
|
590
|
+
* @param {Array<string>} [countries] The countries the institution belongs to
|
|
591
|
+
* @param {string} [productsSupported] The products that this institution supports
|
|
592
|
+
* @param {string} [institutionType] The type of institution
|
|
593
|
+
* @param {*} [options] Override http request option.
|
|
594
|
+
* @throws {RequiredError}
|
|
595
|
+
* @memberof CustomerApi
|
|
596
|
+
*/
|
|
597
|
+
listInstitutions(country, countries, productsSupported, institutionType, options) {
|
|
598
|
+
return exports.CustomerApiFp(this.configuration)
|
|
599
|
+
.listInstitutions(country, countries, productsSupported, institutionType, options)
|
|
600
|
+
.then((request) => request(this.axios, this.basePath));
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* Refresh an access token
|
|
604
|
+
* @param {RefreshRequest} refreshRequest The refresh token
|
|
605
|
+
* @param {*} [options] Override http request option.
|
|
606
|
+
* @throws {RequiredError}
|
|
607
|
+
* @memberof CustomerApi
|
|
608
|
+
*/
|
|
609
|
+
refreshToken(refreshRequest, options) {
|
|
610
|
+
return exports.CustomerApiFp(this.configuration)
|
|
611
|
+
.refreshToken(refreshRequest, options)
|
|
612
|
+
.then((request) => request(this.axios, this.basePath));
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
exports.CustomerApi = CustomerApi;
|
|
616
|
+
/**
|
|
617
|
+
* LinkApi - axios parameter creator
|
|
618
|
+
* @export
|
|
619
|
+
*/
|
|
620
|
+
exports.LinkApiAxiosParamCreator = function (configuration) {
|
|
621
|
+
return {
|
|
622
|
+
/**
|
|
623
|
+
* Creates a new link
|
|
624
|
+
* @param {LinkRequest} linkRequest Request body for starting a new Link
|
|
625
|
+
* @param {*} [options] Override http request option.
|
|
626
|
+
* @throws {RequiredError}
|
|
627
|
+
*/
|
|
628
|
+
createLink: (linkRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
629
|
+
// verify required parameter 'linkRequest' is not null or undefined
|
|
630
|
+
common_1.assertParamExists('createLink', 'linkRequest', linkRequest);
|
|
631
|
+
const localVarPath = `/link`;
|
|
632
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
633
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
634
|
+
let baseOptions;
|
|
635
|
+
if (configuration) {
|
|
636
|
+
baseOptions = configuration.baseOptions;
|
|
637
|
+
}
|
|
638
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
639
|
+
const localVarHeaderParameter = {};
|
|
640
|
+
const localVarQueryParameter = {};
|
|
641
|
+
// authentication Oauth2 required
|
|
642
|
+
// oauth required
|
|
643
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', ['link'], configuration);
|
|
644
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
645
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
646
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
647
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
648
|
+
localVarRequestOptions.data = common_1.serializeDataIfNeeded(linkRequest, localVarRequestOptions, configuration);
|
|
649
|
+
return {
|
|
650
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
651
|
+
options: localVarRequestOptions,
|
|
652
|
+
};
|
|
653
|
+
}),
|
|
654
|
+
/**
|
|
655
|
+
* Get the customization details
|
|
656
|
+
* @param {*} [options] Override http request option.
|
|
657
|
+
* @throws {RequiredError}
|
|
658
|
+
*/
|
|
659
|
+
getCustomization: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
660
|
+
const localVarPath = `/customer/customizations`;
|
|
661
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
662
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
663
|
+
let baseOptions;
|
|
664
|
+
if (configuration) {
|
|
665
|
+
baseOptions = configuration.baseOptions;
|
|
666
|
+
}
|
|
667
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
668
|
+
const localVarHeaderParameter = {};
|
|
669
|
+
const localVarQueryParameter = {};
|
|
670
|
+
// authentication Oauth2 required
|
|
671
|
+
// oauth required
|
|
672
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', ['link'], configuration);
|
|
673
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
674
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
675
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
676
|
+
return {
|
|
677
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
678
|
+
options: localVarRequestOptions,
|
|
679
|
+
};
|
|
680
|
+
}),
|
|
681
|
+
/**
|
|
682
|
+
* Get a list of institutions
|
|
683
|
+
* @param {string} [country] The country the institution belongs to
|
|
684
|
+
* @param {Array<string>} [countries] The countries the institution belongs to
|
|
685
|
+
* @param {string} [productsSupported] The products that this institution supports
|
|
686
|
+
* @param {string} [institutionType] The type of institution
|
|
687
|
+
* @param {*} [options] Override http request option.
|
|
688
|
+
* @throws {RequiredError}
|
|
689
|
+
*/
|
|
690
|
+
listInstitutions: (country, countries, productsSupported, institutionType, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
691
|
+
const localVarPath = `/institutions`;
|
|
692
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
693
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
694
|
+
let baseOptions;
|
|
695
|
+
if (configuration) {
|
|
696
|
+
baseOptions = configuration.baseOptions;
|
|
697
|
+
}
|
|
698
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
699
|
+
const localVarHeaderParameter = {};
|
|
700
|
+
const localVarQueryParameter = {};
|
|
701
|
+
// authentication Oauth2 required
|
|
702
|
+
// oauth required
|
|
703
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', ['institution'], configuration);
|
|
704
|
+
if (country !== undefined) {
|
|
705
|
+
localVarQueryParameter['country'] = country;
|
|
706
|
+
}
|
|
707
|
+
if (countries) {
|
|
708
|
+
localVarQueryParameter['countries'] = countries.join(base_1.COLLECTION_FORMATS.csv);
|
|
709
|
+
}
|
|
710
|
+
if (productsSupported !== undefined) {
|
|
711
|
+
localVarQueryParameter['products_supported'] = productsSupported;
|
|
712
|
+
}
|
|
713
|
+
if (institutionType !== undefined) {
|
|
714
|
+
localVarQueryParameter['institution_type'] = institutionType;
|
|
715
|
+
}
|
|
716
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
717
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
718
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
719
|
+
return {
|
|
720
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
721
|
+
options: localVarRequestOptions,
|
|
722
|
+
};
|
|
723
|
+
}),
|
|
724
|
+
/**
|
|
725
|
+
* Update an existing link
|
|
726
|
+
* @param {RelinkRequest} relinkRequest Request body for updating Link
|
|
727
|
+
* @param {*} [options] Override http request option.
|
|
728
|
+
* @throws {RequiredError}
|
|
729
|
+
*/
|
|
730
|
+
relink: (relinkRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
731
|
+
// verify required parameter 'relinkRequest' is not null or undefined
|
|
732
|
+
common_1.assertParamExists('relink', 'relinkRequest', relinkRequest);
|
|
733
|
+
const localVarPath = `/link/relink`;
|
|
734
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
735
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
736
|
+
let baseOptions;
|
|
737
|
+
if (configuration) {
|
|
738
|
+
baseOptions = configuration.baseOptions;
|
|
739
|
+
}
|
|
740
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
741
|
+
const localVarHeaderParameter = {};
|
|
742
|
+
const localVarQueryParameter = {};
|
|
743
|
+
// authentication Oauth2 required
|
|
744
|
+
// oauth required
|
|
745
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
746
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
747
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
748
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
749
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
750
|
+
localVarRequestOptions.data = common_1.serializeDataIfNeeded(relinkRequest, localVarRequestOptions, configuration);
|
|
751
|
+
return {
|
|
752
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
753
|
+
options: localVarRequestOptions,
|
|
754
|
+
};
|
|
755
|
+
}),
|
|
756
|
+
/**
|
|
757
|
+
* Exchange authorization code for token
|
|
758
|
+
* @param {string} grantType
|
|
759
|
+
* @param {string} code
|
|
760
|
+
* @param {string} clientId
|
|
761
|
+
* @param {string} redirectUri
|
|
762
|
+
* @param {*} [options] Override http request option.
|
|
763
|
+
* @throws {RequiredError}
|
|
764
|
+
*/
|
|
765
|
+
token: (grantType, code, clientId, redirectUri, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
766
|
+
// verify required parameter 'grantType' is not null or undefined
|
|
767
|
+
common_1.assertParamExists('token', 'grantType', grantType);
|
|
768
|
+
// verify required parameter 'code' is not null or undefined
|
|
769
|
+
common_1.assertParamExists('token', 'code', code);
|
|
770
|
+
// verify required parameter 'clientId' is not null or undefined
|
|
771
|
+
common_1.assertParamExists('token', 'clientId', clientId);
|
|
772
|
+
// verify required parameter 'redirectUri' is not null or undefined
|
|
773
|
+
common_1.assertParamExists('token', 'redirectUri', redirectUri);
|
|
774
|
+
const localVarPath = `/auth/token`;
|
|
775
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
776
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
777
|
+
let baseOptions;
|
|
778
|
+
if (configuration) {
|
|
779
|
+
baseOptions = configuration.baseOptions;
|
|
780
|
+
}
|
|
781
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
782
|
+
const localVarHeaderParameter = {};
|
|
783
|
+
const localVarQueryParameter = {};
|
|
784
|
+
const localVarFormParams = new URLSearchParams();
|
|
785
|
+
// authentication Oauth2 required
|
|
786
|
+
// oauth required
|
|
787
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
788
|
+
if (grantType !== undefined) {
|
|
789
|
+
localVarFormParams.set('grant_type', grantType);
|
|
790
|
+
}
|
|
791
|
+
if (code !== undefined) {
|
|
792
|
+
localVarFormParams.set('code', code);
|
|
793
|
+
}
|
|
794
|
+
if (clientId !== undefined) {
|
|
795
|
+
localVarFormParams.set('client_id', clientId);
|
|
796
|
+
}
|
|
797
|
+
if (redirectUri !== undefined) {
|
|
798
|
+
localVarFormParams.set('redirect_uri', redirectUri);
|
|
799
|
+
}
|
|
800
|
+
localVarHeaderParameter['Content-Type'] = 'application/x-www-form-urlencoded';
|
|
801
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
802
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
803
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
804
|
+
localVarRequestOptions.data = localVarFormParams.toString();
|
|
805
|
+
return {
|
|
806
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
807
|
+
options: localVarRequestOptions,
|
|
808
|
+
};
|
|
809
|
+
}),
|
|
810
|
+
};
|
|
811
|
+
};
|
|
812
|
+
/**
|
|
813
|
+
* LinkApi - functional programming interface
|
|
814
|
+
* @export
|
|
815
|
+
*/
|
|
816
|
+
exports.LinkApiFp = function (configuration) {
|
|
817
|
+
const localVarAxiosParamCreator = exports.LinkApiAxiosParamCreator(configuration);
|
|
818
|
+
return {
|
|
819
|
+
/**
|
|
820
|
+
* Creates a new link
|
|
821
|
+
* @param {LinkRequest} linkRequest Request body for starting a new Link
|
|
822
|
+
* @param {*} [options] Override http request option.
|
|
823
|
+
* @throws {RequiredError}
|
|
824
|
+
*/
|
|
825
|
+
createLink(linkRequest, options) {
|
|
826
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
827
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createLink(linkRequest, options);
|
|
828
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
829
|
+
});
|
|
830
|
+
},
|
|
831
|
+
/**
|
|
832
|
+
* Get the customization details
|
|
833
|
+
* @param {*} [options] Override http request option.
|
|
834
|
+
* @throws {RequiredError}
|
|
835
|
+
*/
|
|
836
|
+
getCustomization(options) {
|
|
837
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
838
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getCustomization(options);
|
|
839
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
840
|
+
});
|
|
841
|
+
},
|
|
842
|
+
/**
|
|
843
|
+
* Get a list of institutions
|
|
844
|
+
* @param {string} [country] The country the institution belongs to
|
|
845
|
+
* @param {Array<string>} [countries] The countries the institution belongs to
|
|
846
|
+
* @param {string} [productsSupported] The products that this institution supports
|
|
847
|
+
* @param {string} [institutionType] The type of institution
|
|
848
|
+
* @param {*} [options] Override http request option.
|
|
849
|
+
* @throws {RequiredError}
|
|
850
|
+
*/
|
|
851
|
+
listInstitutions(country, countries, productsSupported, institutionType, options) {
|
|
852
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
853
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listInstitutions(country, countries, productsSupported, institutionType, options);
|
|
854
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
855
|
+
});
|
|
856
|
+
},
|
|
857
|
+
/**
|
|
858
|
+
* Update an existing link
|
|
859
|
+
* @param {RelinkRequest} relinkRequest Request body for updating Link
|
|
860
|
+
* @param {*} [options] Override http request option.
|
|
861
|
+
* @throws {RequiredError}
|
|
862
|
+
*/
|
|
863
|
+
relink(relinkRequest, options) {
|
|
864
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
865
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.relink(relinkRequest, options);
|
|
866
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
867
|
+
});
|
|
868
|
+
},
|
|
869
|
+
/**
|
|
870
|
+
* Exchange authorization code for token
|
|
871
|
+
* @param {string} grantType
|
|
872
|
+
* @param {string} code
|
|
873
|
+
* @param {string} clientId
|
|
874
|
+
* @param {string} redirectUri
|
|
875
|
+
* @param {*} [options] Override http request option.
|
|
876
|
+
* @throws {RequiredError}
|
|
877
|
+
*/
|
|
878
|
+
token(grantType, code, clientId, redirectUri, options) {
|
|
879
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
880
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.token(grantType, code, clientId, redirectUri, options);
|
|
881
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
882
|
+
});
|
|
883
|
+
},
|
|
884
|
+
};
|
|
885
|
+
};
|
|
886
|
+
/**
|
|
887
|
+
* LinkApi - factory interface
|
|
888
|
+
* @export
|
|
889
|
+
*/
|
|
890
|
+
exports.LinkApiFactory = function (configuration, basePath, axios) {
|
|
891
|
+
const localVarFp = exports.LinkApiFp(configuration);
|
|
892
|
+
return {
|
|
893
|
+
/**
|
|
894
|
+
* Creates a new link
|
|
895
|
+
* @param {LinkRequest} linkRequest Request body for starting a new Link
|
|
896
|
+
* @param {*} [options] Override http request option.
|
|
897
|
+
* @throws {RequiredError}
|
|
898
|
+
*/
|
|
899
|
+
createLink(linkRequest, options) {
|
|
900
|
+
return localVarFp.createLink(linkRequest, options).then((request) => request(axios, basePath));
|
|
901
|
+
},
|
|
902
|
+
/**
|
|
903
|
+
* Get the customization details
|
|
904
|
+
* @param {*} [options] Override http request option.
|
|
905
|
+
* @throws {RequiredError}
|
|
906
|
+
*/
|
|
907
|
+
getCustomization(options) {
|
|
908
|
+
return localVarFp.getCustomization(options).then((request) => request(axios, basePath));
|
|
909
|
+
},
|
|
910
|
+
/**
|
|
911
|
+
* Get a list of institutions
|
|
912
|
+
* @param {string} [country] The country the institution belongs to
|
|
913
|
+
* @param {Array<string>} [countries] The countries the institution belongs to
|
|
914
|
+
* @param {string} [productsSupported] The products that this institution supports
|
|
915
|
+
* @param {string} [institutionType] The type of institution
|
|
916
|
+
* @param {*} [options] Override http request option.
|
|
917
|
+
* @throws {RequiredError}
|
|
918
|
+
*/
|
|
919
|
+
listInstitutions(country, countries, productsSupported, institutionType, options) {
|
|
920
|
+
return localVarFp
|
|
921
|
+
.listInstitutions(country, countries, productsSupported, institutionType, options)
|
|
922
|
+
.then((request) => request(axios, basePath));
|
|
923
|
+
},
|
|
924
|
+
/**
|
|
925
|
+
* Update an existing link
|
|
926
|
+
* @param {RelinkRequest} relinkRequest Request body for updating Link
|
|
927
|
+
* @param {*} [options] Override http request option.
|
|
928
|
+
* @throws {RequiredError}
|
|
929
|
+
*/
|
|
930
|
+
relink(relinkRequest, options) {
|
|
931
|
+
return localVarFp.relink(relinkRequest, options).then((request) => request(axios, basePath));
|
|
932
|
+
},
|
|
933
|
+
/**
|
|
934
|
+
* Exchange authorization code for token
|
|
935
|
+
* @param {string} grantType
|
|
936
|
+
* @param {string} code
|
|
937
|
+
* @param {string} clientId
|
|
938
|
+
* @param {string} redirectUri
|
|
939
|
+
* @param {*} [options] Override http request option.
|
|
940
|
+
* @throws {RequiredError}
|
|
941
|
+
*/
|
|
942
|
+
token(grantType, code, clientId, redirectUri, options) {
|
|
943
|
+
return localVarFp
|
|
944
|
+
.token(grantType, code, clientId, redirectUri, options)
|
|
945
|
+
.then((request) => request(axios, basePath));
|
|
946
|
+
},
|
|
947
|
+
};
|
|
948
|
+
};
|
|
949
|
+
/**
|
|
950
|
+
* LinkApi - object-oriented interface
|
|
951
|
+
* @export
|
|
952
|
+
* @class LinkApi
|
|
953
|
+
* @extends {BaseAPI}
|
|
954
|
+
*/
|
|
955
|
+
class LinkApi extends base_1.BaseAPI {
|
|
956
|
+
/**
|
|
957
|
+
* Creates a new link
|
|
958
|
+
* @param {LinkRequest} linkRequest Request body for starting a new Link
|
|
959
|
+
* @param {*} [options] Override http request option.
|
|
960
|
+
* @throws {RequiredError}
|
|
961
|
+
* @memberof LinkApi
|
|
962
|
+
*/
|
|
963
|
+
createLink(linkRequest, options) {
|
|
964
|
+
return exports.LinkApiFp(this.configuration)
|
|
965
|
+
.createLink(linkRequest, options)
|
|
966
|
+
.then((request) => request(this.axios, this.basePath));
|
|
967
|
+
}
|
|
968
|
+
/**
|
|
969
|
+
* Get the customization details
|
|
970
|
+
* @param {*} [options] Override http request option.
|
|
971
|
+
* @throws {RequiredError}
|
|
972
|
+
* @memberof LinkApi
|
|
973
|
+
*/
|
|
974
|
+
getCustomization(options) {
|
|
975
|
+
return exports.LinkApiFp(this.configuration)
|
|
976
|
+
.getCustomization(options)
|
|
977
|
+
.then((request) => request(this.axios, this.basePath));
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
* Get a list of institutions
|
|
981
|
+
* @param {string} [country] The country the institution belongs to
|
|
982
|
+
* @param {Array<string>} [countries] The countries the institution belongs to
|
|
983
|
+
* @param {string} [productsSupported] The products that this institution supports
|
|
984
|
+
* @param {string} [institutionType] The type of institution
|
|
985
|
+
* @param {*} [options] Override http request option.
|
|
986
|
+
* @throws {RequiredError}
|
|
987
|
+
* @memberof LinkApi
|
|
988
|
+
*/
|
|
989
|
+
listInstitutions(country, countries, productsSupported, institutionType, options) {
|
|
990
|
+
return exports.LinkApiFp(this.configuration)
|
|
991
|
+
.listInstitutions(country, countries, productsSupported, institutionType, options)
|
|
992
|
+
.then((request) => request(this.axios, this.basePath));
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* Update an existing link
|
|
996
|
+
* @param {RelinkRequest} relinkRequest Request body for updating Link
|
|
997
|
+
* @param {*} [options] Override http request option.
|
|
998
|
+
* @throws {RequiredError}
|
|
999
|
+
* @memberof LinkApi
|
|
1000
|
+
*/
|
|
1001
|
+
relink(relinkRequest, options) {
|
|
1002
|
+
return exports.LinkApiFp(this.configuration)
|
|
1003
|
+
.relink(relinkRequest, options)
|
|
1004
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
1007
|
+
* Exchange authorization code for token
|
|
1008
|
+
* @param {string} grantType
|
|
1009
|
+
* @param {string} code
|
|
1010
|
+
* @param {string} clientId
|
|
1011
|
+
* @param {string} redirectUri
|
|
1012
|
+
* @param {*} [options] Override http request option.
|
|
1013
|
+
* @throws {RequiredError}
|
|
1014
|
+
* @memberof LinkApi
|
|
1015
|
+
*/
|
|
1016
|
+
token(grantType, code, clientId, redirectUri, options) {
|
|
1017
|
+
return exports.LinkApiFp(this.configuration)
|
|
1018
|
+
.token(grantType, code, clientId, redirectUri, options)
|
|
1019
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
exports.LinkApi = LinkApi;
|
|
1023
|
+
/**
|
|
1024
|
+
* LoginIdentityApi - axios parameter creator
|
|
1025
|
+
* @export
|
|
1026
|
+
*/
|
|
1027
|
+
exports.LoginIdentityApiAxiosParamCreator = function (configuration) {
|
|
1028
|
+
return {
|
|
1029
|
+
/**
|
|
1030
|
+
* Delete a specific loginIdentity
|
|
1031
|
+
* @param {*} [options] Override http request option.
|
|
1032
|
+
* @throws {RequiredError}
|
|
1033
|
+
*/
|
|
1034
|
+
deleteLoginIdentity: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1035
|
+
const localVarPath = `/login_identity`;
|
|
1036
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1037
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1038
|
+
let baseOptions;
|
|
1039
|
+
if (configuration) {
|
|
1040
|
+
baseOptions = configuration.baseOptions;
|
|
1041
|
+
}
|
|
1042
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
1043
|
+
const localVarHeaderParameter = {};
|
|
1044
|
+
const localVarQueryParameter = {};
|
|
1045
|
+
// authentication Oauth2 required
|
|
1046
|
+
// oauth required
|
|
1047
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
1048
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1049
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1050
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1051
|
+
return {
|
|
1052
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
1053
|
+
options: localVarRequestOptions,
|
|
1054
|
+
};
|
|
1055
|
+
}),
|
|
1056
|
+
/**
|
|
1057
|
+
* generate a link token that can be used to create link
|
|
1058
|
+
* @param {LinkTokenRequest} linkTokenRequest token request
|
|
1059
|
+
* @param {*} [options] Override http request option.
|
|
1060
|
+
* @throws {RequiredError}
|
|
1061
|
+
*/
|
|
1062
|
+
generateLinkToken: (linkTokenRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1063
|
+
// verify required parameter 'linkTokenRequest' is not null or undefined
|
|
1064
|
+
common_1.assertParamExists('generateLinkToken', 'linkTokenRequest', linkTokenRequest);
|
|
1065
|
+
const localVarPath = `/link/token`;
|
|
1066
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1067
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1068
|
+
let baseOptions;
|
|
1069
|
+
if (configuration) {
|
|
1070
|
+
baseOptions = configuration.baseOptions;
|
|
1071
|
+
}
|
|
1072
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1073
|
+
const localVarHeaderParameter = {};
|
|
1074
|
+
const localVarQueryParameter = {};
|
|
1075
|
+
// authentication Oauth2 required
|
|
1076
|
+
// oauth required
|
|
1077
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
1078
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1079
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1080
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1081
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1082
|
+
localVarRequestOptions.data = common_1.serializeDataIfNeeded(linkTokenRequest, localVarRequestOptions, configuration);
|
|
1083
|
+
return {
|
|
1084
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
1085
|
+
options: localVarRequestOptions,
|
|
1086
|
+
};
|
|
1087
|
+
}),
|
|
1088
|
+
/**
|
|
1089
|
+
* Get a specific account\'s information
|
|
1090
|
+
* @param {string} accountId The account id
|
|
1091
|
+
* @param {*} [options] Override http request option.
|
|
1092
|
+
* @throws {RequiredError}
|
|
1093
|
+
*/
|
|
1094
|
+
getAccount: (accountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1095
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
1096
|
+
common_1.assertParamExists('getAccount', 'accountId', accountId);
|
|
1097
|
+
const localVarPath = `/accounts/{accountId}`.replace(`{${'accountId'}}`, encodeURIComponent(String(accountId)));
|
|
1098
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1099
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1100
|
+
let baseOptions;
|
|
1101
|
+
if (configuration) {
|
|
1102
|
+
baseOptions = configuration.baseOptions;
|
|
1103
|
+
}
|
|
1104
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1105
|
+
const localVarHeaderParameter = {};
|
|
1106
|
+
const localVarQueryParameter = {};
|
|
1107
|
+
// authentication Oauth2 required
|
|
1108
|
+
// oauth required
|
|
1109
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', ['account'], configuration);
|
|
1110
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1111
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1112
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1113
|
+
return {
|
|
1114
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
1115
|
+
options: localVarRequestOptions,
|
|
1116
|
+
};
|
|
1117
|
+
}),
|
|
1118
|
+
/**
|
|
1119
|
+
* Get the account number for a specific account
|
|
1120
|
+
* @param {string} accountId The account id
|
|
1121
|
+
* @param {*} [options] Override http request option.
|
|
1122
|
+
* @throws {RequiredError}
|
|
1123
|
+
*/
|
|
1124
|
+
getAccountNumber: (accountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1125
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
1126
|
+
common_1.assertParamExists('getAccountNumber', 'accountId', accountId);
|
|
1127
|
+
const localVarPath = `/account_numbers/{accountId}`.replace(`{${'accountId'}}`, encodeURIComponent(String(accountId)));
|
|
1128
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1129
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1130
|
+
let baseOptions;
|
|
1131
|
+
if (configuration) {
|
|
1132
|
+
baseOptions = configuration.baseOptions;
|
|
1133
|
+
}
|
|
1134
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1135
|
+
const localVarHeaderParameter = {};
|
|
1136
|
+
const localVarQueryParameter = {};
|
|
1137
|
+
// authentication Oauth2 required
|
|
1138
|
+
// oauth required
|
|
1139
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
1140
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1141
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1142
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1143
|
+
return {
|
|
1144
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
1145
|
+
options: localVarRequestOptions,
|
|
1146
|
+
};
|
|
1147
|
+
}),
|
|
1148
|
+
/**
|
|
1149
|
+
* Get the balance history for a specific account
|
|
1150
|
+
* @param {string} accountId The account id
|
|
1151
|
+
* @param {*} [options] Override http request option.
|
|
1152
|
+
* @throws {RequiredError}
|
|
1153
|
+
*/
|
|
1154
|
+
getBalanceHistory: (accountId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1155
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
1156
|
+
common_1.assertParamExists('getBalanceHistory', 'accountId', accountId);
|
|
1157
|
+
const localVarPath = `/balance_history/{accountId}`.replace(`{${'accountId'}}`, encodeURIComponent(String(accountId)));
|
|
1158
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1159
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1160
|
+
let baseOptions;
|
|
1161
|
+
if (configuration) {
|
|
1162
|
+
baseOptions = configuration.baseOptions;
|
|
1163
|
+
}
|
|
1164
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1165
|
+
const localVarHeaderParameter = {};
|
|
1166
|
+
const localVarQueryParameter = {};
|
|
1167
|
+
// authentication Oauth2 required
|
|
1168
|
+
// oauth required
|
|
1169
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
1170
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1171
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1172
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1173
|
+
return {
|
|
1174
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
1175
|
+
options: localVarRequestOptions,
|
|
1176
|
+
};
|
|
1177
|
+
}),
|
|
1178
|
+
/**
|
|
1179
|
+
* \\[BETA] Get a list of identity data for a given login identity
|
|
1180
|
+
* @param {*} [options] Override http request option.
|
|
1181
|
+
* @throws {RequiredError}
|
|
1182
|
+
*/
|
|
1183
|
+
getIdentity: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1184
|
+
const localVarPath = `/identity`;
|
|
1185
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1186
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1187
|
+
let baseOptions;
|
|
1188
|
+
if (configuration) {
|
|
1189
|
+
baseOptions = configuration.baseOptions;
|
|
1190
|
+
}
|
|
1191
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1192
|
+
const localVarHeaderParameter = {};
|
|
1193
|
+
const localVarQueryParameter = {};
|
|
1194
|
+
// authentication Oauth2 required
|
|
1195
|
+
// oauth required
|
|
1196
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
1197
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1198
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1199
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1200
|
+
return {
|
|
1201
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
1202
|
+
options: localVarRequestOptions,
|
|
1203
|
+
};
|
|
1204
|
+
}),
|
|
1205
|
+
/**
|
|
1206
|
+
* Get income figures for a login identity
|
|
1207
|
+
* @param {*} [options] Override http request option.
|
|
1208
|
+
* @throws {RequiredError}
|
|
1209
|
+
*/
|
|
1210
|
+
getIncomeEstimateByLoginIdentityId: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1211
|
+
const localVarPath = `/income`;
|
|
1212
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1213
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1214
|
+
let baseOptions;
|
|
1215
|
+
if (configuration) {
|
|
1216
|
+
baseOptions = configuration.baseOptions;
|
|
1217
|
+
}
|
|
1218
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1219
|
+
const localVarHeaderParameter = {};
|
|
1220
|
+
const localVarQueryParameter = {};
|
|
1221
|
+
// authentication Oauth2 required
|
|
1222
|
+
// oauth required
|
|
1223
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
1224
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1225
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1226
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1227
|
+
return {
|
|
1228
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
1229
|
+
options: localVarRequestOptions,
|
|
1230
|
+
};
|
|
1231
|
+
}),
|
|
1232
|
+
/**
|
|
1233
|
+
* Get a specific loginIdentity
|
|
1234
|
+
* @param {*} [options] Override http request option.
|
|
1235
|
+
* @throws {RequiredError}
|
|
1236
|
+
*/
|
|
1237
|
+
getLoginIdentity: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1238
|
+
const localVarPath = `/login_identity`;
|
|
1239
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1240
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1241
|
+
let baseOptions;
|
|
1242
|
+
if (configuration) {
|
|
1243
|
+
baseOptions = configuration.baseOptions;
|
|
1244
|
+
}
|
|
1245
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1246
|
+
const localVarHeaderParameter = {};
|
|
1247
|
+
const localVarQueryParameter = {};
|
|
1248
|
+
// authentication Oauth2 required
|
|
1249
|
+
// oauth required
|
|
1250
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
1251
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1252
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1253
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1254
|
+
return {
|
|
1255
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
1256
|
+
options: localVarRequestOptions,
|
|
1257
|
+
};
|
|
1258
|
+
}),
|
|
1259
|
+
/**
|
|
1260
|
+
* Download statement
|
|
1261
|
+
* @param {string} statementId The statement id
|
|
1262
|
+
* @param {*} [options] Override http request option.
|
|
1263
|
+
* @throws {RequiredError}
|
|
1264
|
+
*/
|
|
1265
|
+
getStatement: (statementId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1266
|
+
// verify required parameter 'statementId' is not null or undefined
|
|
1267
|
+
common_1.assertParamExists('getStatement', 'statementId', statementId);
|
|
1268
|
+
const localVarPath = `/statements/{statementId}`.replace(`{${'statementId'}}`, encodeURIComponent(String(statementId)));
|
|
1269
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1270
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1271
|
+
let baseOptions;
|
|
1272
|
+
if (configuration) {
|
|
1273
|
+
baseOptions = configuration.baseOptions;
|
|
1274
|
+
}
|
|
1275
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1276
|
+
const localVarHeaderParameter = {};
|
|
1277
|
+
const localVarQueryParameter = {};
|
|
1278
|
+
// authentication Oauth2 required
|
|
1279
|
+
// oauth required
|
|
1280
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
1281
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1282
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1283
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1284
|
+
return {
|
|
1285
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
1286
|
+
options: localVarRequestOptions,
|
|
1287
|
+
};
|
|
1288
|
+
}),
|
|
1289
|
+
/**
|
|
1290
|
+
* Get statement link for download
|
|
1291
|
+
* @param {string} statementId The statement id
|
|
1292
|
+
* @param {*} [options] Override http request option.
|
|
1293
|
+
* @throws {RequiredError}
|
|
1294
|
+
*/
|
|
1295
|
+
getStatementLink: (statementId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1296
|
+
// verify required parameter 'statementId' is not null or undefined
|
|
1297
|
+
common_1.assertParamExists('getStatementLink', 'statementId', statementId);
|
|
1298
|
+
const localVarPath = `/statement_links/{statementId}`.replace(`{${'statementId'}}`, encodeURIComponent(String(statementId)));
|
|
1299
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1300
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1301
|
+
let baseOptions;
|
|
1302
|
+
if (configuration) {
|
|
1303
|
+
baseOptions = configuration.baseOptions;
|
|
1304
|
+
}
|
|
1305
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1306
|
+
const localVarHeaderParameter = {};
|
|
1307
|
+
const localVarQueryParameter = {};
|
|
1308
|
+
// authentication Oauth2 required
|
|
1309
|
+
// oauth required
|
|
1310
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
1311
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1312
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1313
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1314
|
+
return {
|
|
1315
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
1316
|
+
options: localVarRequestOptions,
|
|
1317
|
+
};
|
|
1318
|
+
}),
|
|
1319
|
+
/**
|
|
1320
|
+
* Get list of available statements
|
|
1321
|
+
* @param {*} [options] Override http request option.
|
|
1322
|
+
* @throws {RequiredError}
|
|
1323
|
+
*/
|
|
1324
|
+
getStatements: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1325
|
+
const localVarPath = `/statements`;
|
|
1326
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1327
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1328
|
+
let baseOptions;
|
|
1329
|
+
if (configuration) {
|
|
1330
|
+
baseOptions = configuration.baseOptions;
|
|
1331
|
+
}
|
|
1332
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1333
|
+
const localVarHeaderParameter = {};
|
|
1334
|
+
const localVarQueryParameter = {};
|
|
1335
|
+
// authentication Oauth2 required
|
|
1336
|
+
// oauth required
|
|
1337
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
1338
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1339
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1340
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1341
|
+
return {
|
|
1342
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
1343
|
+
options: localVarRequestOptions,
|
|
1344
|
+
};
|
|
1345
|
+
}),
|
|
1346
|
+
/**
|
|
1347
|
+
* Get a list of accounts for a login identity
|
|
1348
|
+
* @param {*} [options] Override http request option.
|
|
1349
|
+
* @throws {RequiredError}
|
|
1350
|
+
*/
|
|
1351
|
+
listAccounts: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1352
|
+
const localVarPath = `/accounts`;
|
|
1353
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1354
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1355
|
+
let baseOptions;
|
|
1356
|
+
if (configuration) {
|
|
1357
|
+
baseOptions = configuration.baseOptions;
|
|
1358
|
+
}
|
|
1359
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1360
|
+
const localVarHeaderParameter = {};
|
|
1361
|
+
const localVarQueryParameter = {};
|
|
1362
|
+
// authentication Oauth2 required
|
|
1363
|
+
// oauth required
|
|
1364
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', ['account'], configuration);
|
|
1365
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1366
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1367
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1368
|
+
return {
|
|
1369
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
1370
|
+
options: localVarRequestOptions,
|
|
1371
|
+
};
|
|
1372
|
+
}),
|
|
1373
|
+
/**
|
|
1374
|
+
* Get a list of transactions for a particular account. The transactions are returned in sorted order, with the most recent one appearing first.
|
|
1375
|
+
* @param {string} accountId The account id (ULID, example - 01EP4A1MZDHKETZFRPF0K62S6S)
|
|
1376
|
+
* @param {number} [offset] default is 0
|
|
1377
|
+
* @param {number} [limit] default is 500, max is 1000
|
|
1378
|
+
* @param {*} [options] Override http request option.
|
|
1379
|
+
* @throws {RequiredError}
|
|
1380
|
+
*/
|
|
1381
|
+
listTransactionsByAccountId: (accountId, offset, limit, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1382
|
+
// verify required parameter 'accountId' is not null or undefined
|
|
1383
|
+
common_1.assertParamExists('listTransactionsByAccountId', 'accountId', accountId);
|
|
1384
|
+
const localVarPath = `/transactions/{accountId}`.replace(`{${'accountId'}}`, encodeURIComponent(String(accountId)));
|
|
1385
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1386
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1387
|
+
let baseOptions;
|
|
1388
|
+
if (configuration) {
|
|
1389
|
+
baseOptions = configuration.baseOptions;
|
|
1390
|
+
}
|
|
1391
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1392
|
+
const localVarHeaderParameter = {};
|
|
1393
|
+
const localVarQueryParameter = {};
|
|
1394
|
+
// authentication Oauth2 required
|
|
1395
|
+
// oauth required
|
|
1396
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', ['transaction'], configuration);
|
|
1397
|
+
if (offset !== undefined) {
|
|
1398
|
+
localVarQueryParameter['offset'] = offset;
|
|
1399
|
+
}
|
|
1400
|
+
if (limit !== undefined) {
|
|
1401
|
+
localVarQueryParameter['limit'] = limit;
|
|
1402
|
+
}
|
|
1403
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1404
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1405
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1406
|
+
return {
|
|
1407
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
1408
|
+
options: localVarRequestOptions,
|
|
1409
|
+
};
|
|
1410
|
+
}),
|
|
1411
|
+
/**
|
|
1412
|
+
* Get a list of transactions for a login identity. The transactions are returned in sorted order, with the most recent one appearing first.
|
|
1413
|
+
* @param {number} [offset] default is 0
|
|
1414
|
+
* @param {number} [limit] default is 500, max is 1000
|
|
1415
|
+
* @param {*} [options] Override http request option.
|
|
1416
|
+
* @throws {RequiredError}
|
|
1417
|
+
*/
|
|
1418
|
+
listTransactionsByLoginIdentityId: (offset, limit, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1419
|
+
const localVarPath = `/transactions`;
|
|
1420
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1421
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1422
|
+
let baseOptions;
|
|
1423
|
+
if (configuration) {
|
|
1424
|
+
baseOptions = configuration.baseOptions;
|
|
1425
|
+
}
|
|
1426
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
1427
|
+
const localVarHeaderParameter = {};
|
|
1428
|
+
const localVarQueryParameter = {};
|
|
1429
|
+
// authentication Oauth2 required
|
|
1430
|
+
// oauth required
|
|
1431
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', ['transaction'], configuration);
|
|
1432
|
+
if (offset !== undefined) {
|
|
1433
|
+
localVarQueryParameter['offset'] = offset;
|
|
1434
|
+
}
|
|
1435
|
+
if (limit !== undefined) {
|
|
1436
|
+
localVarQueryParameter['limit'] = limit;
|
|
1437
|
+
}
|
|
1438
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1439
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1440
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1441
|
+
return {
|
|
1442
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
1443
|
+
options: localVarRequestOptions,
|
|
1444
|
+
};
|
|
1445
|
+
}),
|
|
1446
|
+
/**
|
|
1447
|
+
* Create a refresh job for a login identity
|
|
1448
|
+
* @param {*} [options] Override http request option.
|
|
1449
|
+
* @throws {RequiredError}
|
|
1450
|
+
*/
|
|
1451
|
+
refreshLoginIdentity: (options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
1452
|
+
const localVarPath = `/login_identity/refresh`;
|
|
1453
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1454
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1455
|
+
let baseOptions;
|
|
1456
|
+
if (configuration) {
|
|
1457
|
+
baseOptions = configuration.baseOptions;
|
|
1458
|
+
}
|
|
1459
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
1460
|
+
const localVarHeaderParameter = {};
|
|
1461
|
+
const localVarQueryParameter = {};
|
|
1462
|
+
// authentication Oauth2 required
|
|
1463
|
+
// oauth required
|
|
1464
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
1465
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1466
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1467
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
1468
|
+
return {
|
|
1469
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
1470
|
+
options: localVarRequestOptions,
|
|
1471
|
+
};
|
|
1472
|
+
}),
|
|
1473
|
+
};
|
|
1474
|
+
};
|
|
1475
|
+
/**
|
|
1476
|
+
* LoginIdentityApi - functional programming interface
|
|
1477
|
+
* @export
|
|
1478
|
+
*/
|
|
1479
|
+
exports.LoginIdentityApiFp = function (configuration) {
|
|
1480
|
+
const localVarAxiosParamCreator = exports.LoginIdentityApiAxiosParamCreator(configuration);
|
|
1481
|
+
return {
|
|
1482
|
+
/**
|
|
1483
|
+
* Delete a specific loginIdentity
|
|
1484
|
+
* @param {*} [options] Override http request option.
|
|
1485
|
+
* @throws {RequiredError}
|
|
1486
|
+
*/
|
|
1487
|
+
deleteLoginIdentity(options) {
|
|
1488
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1489
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteLoginIdentity(options);
|
|
1490
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1491
|
+
});
|
|
1492
|
+
},
|
|
1493
|
+
/**
|
|
1494
|
+
* generate a link token that can be used to create link
|
|
1495
|
+
* @param {LinkTokenRequest} linkTokenRequest token request
|
|
1496
|
+
* @param {*} [options] Override http request option.
|
|
1497
|
+
* @throws {RequiredError}
|
|
1498
|
+
*/
|
|
1499
|
+
generateLinkToken(linkTokenRequest, options) {
|
|
1500
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1501
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.generateLinkToken(linkTokenRequest, options);
|
|
1502
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1503
|
+
});
|
|
1504
|
+
},
|
|
1505
|
+
/**
|
|
1506
|
+
* Get a specific account\'s information
|
|
1507
|
+
* @param {string} accountId The account id
|
|
1508
|
+
* @param {*} [options] Override http request option.
|
|
1509
|
+
* @throws {RequiredError}
|
|
1510
|
+
*/
|
|
1511
|
+
getAccount(accountId, options) {
|
|
1512
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1513
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccount(accountId, options);
|
|
1514
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1515
|
+
});
|
|
1516
|
+
},
|
|
1517
|
+
/**
|
|
1518
|
+
* Get the account number for a specific account
|
|
1519
|
+
* @param {string} accountId The account id
|
|
1520
|
+
* @param {*} [options] Override http request option.
|
|
1521
|
+
* @throws {RequiredError}
|
|
1522
|
+
*/
|
|
1523
|
+
getAccountNumber(accountId, options) {
|
|
1524
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1525
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getAccountNumber(accountId, options);
|
|
1526
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1527
|
+
});
|
|
1528
|
+
},
|
|
1529
|
+
/**
|
|
1530
|
+
* Get the balance history for a specific account
|
|
1531
|
+
* @param {string} accountId The account id
|
|
1532
|
+
* @param {*} [options] Override http request option.
|
|
1533
|
+
* @throws {RequiredError}
|
|
1534
|
+
*/
|
|
1535
|
+
getBalanceHistory(accountId, options) {
|
|
1536
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1537
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getBalanceHistory(accountId, options);
|
|
1538
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1539
|
+
});
|
|
1540
|
+
},
|
|
1541
|
+
/**
|
|
1542
|
+
* \\[BETA] Get a list of identity data for a given login identity
|
|
1543
|
+
* @param {*} [options] Override http request option.
|
|
1544
|
+
* @throws {RequiredError}
|
|
1545
|
+
*/
|
|
1546
|
+
getIdentity(options) {
|
|
1547
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1548
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getIdentity(options);
|
|
1549
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1550
|
+
});
|
|
1551
|
+
},
|
|
1552
|
+
/**
|
|
1553
|
+
* Get income figures for a login identity
|
|
1554
|
+
* @param {*} [options] Override http request option.
|
|
1555
|
+
* @throws {RequiredError}
|
|
1556
|
+
*/
|
|
1557
|
+
getIncomeEstimateByLoginIdentityId(options) {
|
|
1558
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1559
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getIncomeEstimateByLoginIdentityId(options);
|
|
1560
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1561
|
+
});
|
|
1562
|
+
},
|
|
1563
|
+
/**
|
|
1564
|
+
* Get a specific loginIdentity
|
|
1565
|
+
* @param {*} [options] Override http request option.
|
|
1566
|
+
* @throws {RequiredError}
|
|
1567
|
+
*/
|
|
1568
|
+
getLoginIdentity(options) {
|
|
1569
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1570
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getLoginIdentity(options);
|
|
1571
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1572
|
+
});
|
|
1573
|
+
},
|
|
1574
|
+
/**
|
|
1575
|
+
* Download statement
|
|
1576
|
+
* @param {string} statementId The statement id
|
|
1577
|
+
* @param {*} [options] Override http request option.
|
|
1578
|
+
* @throws {RequiredError}
|
|
1579
|
+
*/
|
|
1580
|
+
getStatement(statementId, options) {
|
|
1581
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1582
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getStatement(statementId, options);
|
|
1583
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1584
|
+
});
|
|
1585
|
+
},
|
|
1586
|
+
/**
|
|
1587
|
+
* Get statement link for download
|
|
1588
|
+
* @param {string} statementId The statement id
|
|
1589
|
+
* @param {*} [options] Override http request option.
|
|
1590
|
+
* @throws {RequiredError}
|
|
1591
|
+
*/
|
|
1592
|
+
getStatementLink(statementId, options) {
|
|
1593
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1594
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getStatementLink(statementId, options);
|
|
1595
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1596
|
+
});
|
|
1597
|
+
},
|
|
1598
|
+
/**
|
|
1599
|
+
* Get list of available statements
|
|
1600
|
+
* @param {*} [options] Override http request option.
|
|
1601
|
+
* @throws {RequiredError}
|
|
1602
|
+
*/
|
|
1603
|
+
getStatements(options) {
|
|
1604
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1605
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getStatements(options);
|
|
1606
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1607
|
+
});
|
|
1608
|
+
},
|
|
1609
|
+
/**
|
|
1610
|
+
* Get a list of accounts for a login identity
|
|
1611
|
+
* @param {*} [options] Override http request option.
|
|
1612
|
+
* @throws {RequiredError}
|
|
1613
|
+
*/
|
|
1614
|
+
listAccounts(options) {
|
|
1615
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1616
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listAccounts(options);
|
|
1617
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1618
|
+
});
|
|
1619
|
+
},
|
|
1620
|
+
/**
|
|
1621
|
+
* Get a list of transactions for a particular account. The transactions are returned in sorted order, with the most recent one appearing first.
|
|
1622
|
+
* @param {string} accountId The account id (ULID, example - 01EP4A1MZDHKETZFRPF0K62S6S)
|
|
1623
|
+
* @param {number} [offset] default is 0
|
|
1624
|
+
* @param {number} [limit] default is 500, max is 1000
|
|
1625
|
+
* @param {*} [options] Override http request option.
|
|
1626
|
+
* @throws {RequiredError}
|
|
1627
|
+
*/
|
|
1628
|
+
listTransactionsByAccountId(accountId, offset, limit, options) {
|
|
1629
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1630
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listTransactionsByAccountId(accountId, offset, limit, options);
|
|
1631
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1632
|
+
});
|
|
1633
|
+
},
|
|
1634
|
+
/**
|
|
1635
|
+
* Get a list of transactions for a login identity. The transactions are returned in sorted order, with the most recent one appearing first.
|
|
1636
|
+
* @param {number} [offset] default is 0
|
|
1637
|
+
* @param {number} [limit] default is 500, max is 1000
|
|
1638
|
+
* @param {*} [options] Override http request option.
|
|
1639
|
+
* @throws {RequiredError}
|
|
1640
|
+
*/
|
|
1641
|
+
listTransactionsByLoginIdentityId(offset, limit, options) {
|
|
1642
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1643
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.listTransactionsByLoginIdentityId(offset, limit, options);
|
|
1644
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1645
|
+
});
|
|
1646
|
+
},
|
|
1647
|
+
/**
|
|
1648
|
+
* Create a refresh job for a login identity
|
|
1649
|
+
* @param {*} [options] Override http request option.
|
|
1650
|
+
* @throws {RequiredError}
|
|
1651
|
+
*/
|
|
1652
|
+
refreshLoginIdentity(options) {
|
|
1653
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1654
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.refreshLoginIdentity(options);
|
|
1655
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1656
|
+
});
|
|
1657
|
+
},
|
|
1658
|
+
};
|
|
1659
|
+
};
|
|
1660
|
+
/**
|
|
1661
|
+
* LoginIdentityApi - factory interface
|
|
1662
|
+
* @export
|
|
1663
|
+
*/
|
|
1664
|
+
exports.LoginIdentityApiFactory = function (configuration, basePath, axios) {
|
|
1665
|
+
const localVarFp = exports.LoginIdentityApiFp(configuration);
|
|
1666
|
+
return {
|
|
1667
|
+
/**
|
|
1668
|
+
* Delete a specific loginIdentity
|
|
1669
|
+
* @param {*} [options] Override http request option.
|
|
1670
|
+
* @throws {RequiredError}
|
|
1671
|
+
*/
|
|
1672
|
+
deleteLoginIdentity(options) {
|
|
1673
|
+
return localVarFp.deleteLoginIdentity(options).then((request) => request(axios, basePath));
|
|
1674
|
+
},
|
|
1675
|
+
/**
|
|
1676
|
+
* generate a link token that can be used to create link
|
|
1677
|
+
* @param {LinkTokenRequest} linkTokenRequest token request
|
|
1678
|
+
* @param {*} [options] Override http request option.
|
|
1679
|
+
* @throws {RequiredError}
|
|
1680
|
+
*/
|
|
1681
|
+
generateLinkToken(linkTokenRequest, options) {
|
|
1682
|
+
return localVarFp.generateLinkToken(linkTokenRequest, options).then((request) => request(axios, basePath));
|
|
1683
|
+
},
|
|
1684
|
+
/**
|
|
1685
|
+
* Get a specific account\'s information
|
|
1686
|
+
* @param {string} accountId The account id
|
|
1687
|
+
* @param {*} [options] Override http request option.
|
|
1688
|
+
* @throws {RequiredError}
|
|
1689
|
+
*/
|
|
1690
|
+
getAccount(accountId, options) {
|
|
1691
|
+
return localVarFp.getAccount(accountId, options).then((request) => request(axios, basePath));
|
|
1692
|
+
},
|
|
1693
|
+
/**
|
|
1694
|
+
* Get the account number for a specific account
|
|
1695
|
+
* @param {string} accountId The account id
|
|
1696
|
+
* @param {*} [options] Override http request option.
|
|
1697
|
+
* @throws {RequiredError}
|
|
1698
|
+
*/
|
|
1699
|
+
getAccountNumber(accountId, options) {
|
|
1700
|
+
return localVarFp.getAccountNumber(accountId, options).then((request) => request(axios, basePath));
|
|
1701
|
+
},
|
|
1702
|
+
/**
|
|
1703
|
+
* Get the balance history for a specific account
|
|
1704
|
+
* @param {string} accountId The account id
|
|
1705
|
+
* @param {*} [options] Override http request option.
|
|
1706
|
+
* @throws {RequiredError}
|
|
1707
|
+
*/
|
|
1708
|
+
getBalanceHistory(accountId, options) {
|
|
1709
|
+
return localVarFp.getBalanceHistory(accountId, options).then((request) => request(axios, basePath));
|
|
1710
|
+
},
|
|
1711
|
+
/**
|
|
1712
|
+
* \\[BETA] Get a list of identity data for a given login identity
|
|
1713
|
+
* @param {*} [options] Override http request option.
|
|
1714
|
+
* @throws {RequiredError}
|
|
1715
|
+
*/
|
|
1716
|
+
getIdentity(options) {
|
|
1717
|
+
return localVarFp.getIdentity(options).then((request) => request(axios, basePath));
|
|
1718
|
+
},
|
|
1719
|
+
/**
|
|
1720
|
+
* Get income figures for a login identity
|
|
1721
|
+
* @param {*} [options] Override http request option.
|
|
1722
|
+
* @throws {RequiredError}
|
|
1723
|
+
*/
|
|
1724
|
+
getIncomeEstimateByLoginIdentityId(options) {
|
|
1725
|
+
return localVarFp.getIncomeEstimateByLoginIdentityId(options).then((request) => request(axios, basePath));
|
|
1726
|
+
},
|
|
1727
|
+
/**
|
|
1728
|
+
* Get a specific loginIdentity
|
|
1729
|
+
* @param {*} [options] Override http request option.
|
|
1730
|
+
* @throws {RequiredError}
|
|
1731
|
+
*/
|
|
1732
|
+
getLoginIdentity(options) {
|
|
1733
|
+
return localVarFp.getLoginIdentity(options).then((request) => request(axios, basePath));
|
|
1734
|
+
},
|
|
1735
|
+
/**
|
|
1736
|
+
* Download statement
|
|
1737
|
+
* @param {string} statementId The statement id
|
|
1738
|
+
* @param {*} [options] Override http request option.
|
|
1739
|
+
* @throws {RequiredError}
|
|
1740
|
+
*/
|
|
1741
|
+
getStatement(statementId, options) {
|
|
1742
|
+
return localVarFp.getStatement(statementId, options).then((request) => request(axios, basePath));
|
|
1743
|
+
},
|
|
1744
|
+
/**
|
|
1745
|
+
* Get statement link for download
|
|
1746
|
+
* @param {string} statementId The statement id
|
|
1747
|
+
* @param {*} [options] Override http request option.
|
|
1748
|
+
* @throws {RequiredError}
|
|
1749
|
+
*/
|
|
1750
|
+
getStatementLink(statementId, options) {
|
|
1751
|
+
return localVarFp.getStatementLink(statementId, options).then((request) => request(axios, basePath));
|
|
1752
|
+
},
|
|
1753
|
+
/**
|
|
1754
|
+
* Get list of available statements
|
|
1755
|
+
* @param {*} [options] Override http request option.
|
|
1756
|
+
* @throws {RequiredError}
|
|
1757
|
+
*/
|
|
1758
|
+
getStatements(options) {
|
|
1759
|
+
return localVarFp.getStatements(options).then((request) => request(axios, basePath));
|
|
1760
|
+
},
|
|
1761
|
+
/**
|
|
1762
|
+
* Get a list of accounts for a login identity
|
|
1763
|
+
* @param {*} [options] Override http request option.
|
|
1764
|
+
* @throws {RequiredError}
|
|
1765
|
+
*/
|
|
1766
|
+
listAccounts(options) {
|
|
1767
|
+
return localVarFp.listAccounts(options).then((request) => request(axios, basePath));
|
|
1768
|
+
},
|
|
1769
|
+
/**
|
|
1770
|
+
* Get a list of transactions for a particular account. The transactions are returned in sorted order, with the most recent one appearing first.
|
|
1771
|
+
* @param {string} accountId The account id (ULID, example - 01EP4A1MZDHKETZFRPF0K62S6S)
|
|
1772
|
+
* @param {number} [offset] default is 0
|
|
1773
|
+
* @param {number} [limit] default is 500, max is 1000
|
|
1774
|
+
* @param {*} [options] Override http request option.
|
|
1775
|
+
* @throws {RequiredError}
|
|
1776
|
+
*/
|
|
1777
|
+
listTransactionsByAccountId(accountId, offset, limit, options) {
|
|
1778
|
+
return localVarFp
|
|
1779
|
+
.listTransactionsByAccountId(accountId, offset, limit, options)
|
|
1780
|
+
.then((request) => request(axios, basePath));
|
|
1781
|
+
},
|
|
1782
|
+
/**
|
|
1783
|
+
* Get a list of transactions for a login identity. The transactions are returned in sorted order, with the most recent one appearing first.
|
|
1784
|
+
* @param {number} [offset] default is 0
|
|
1785
|
+
* @param {number} [limit] default is 500, max is 1000
|
|
1786
|
+
* @param {*} [options] Override http request option.
|
|
1787
|
+
* @throws {RequiredError}
|
|
1788
|
+
*/
|
|
1789
|
+
listTransactionsByLoginIdentityId(offset, limit, options) {
|
|
1790
|
+
return localVarFp
|
|
1791
|
+
.listTransactionsByLoginIdentityId(offset, limit, options)
|
|
1792
|
+
.then((request) => request(axios, basePath));
|
|
1793
|
+
},
|
|
1794
|
+
/**
|
|
1795
|
+
* Create a refresh job for a login identity
|
|
1796
|
+
* @param {*} [options] Override http request option.
|
|
1797
|
+
* @throws {RequiredError}
|
|
1798
|
+
*/
|
|
1799
|
+
refreshLoginIdentity(options) {
|
|
1800
|
+
return localVarFp.refreshLoginIdentity(options).then((request) => request(axios, basePath));
|
|
1801
|
+
},
|
|
1802
|
+
};
|
|
1803
|
+
};
|
|
1804
|
+
/**
|
|
1805
|
+
* LoginIdentityApi - object-oriented interface
|
|
1806
|
+
* @export
|
|
1807
|
+
* @class LoginIdentityApi
|
|
1808
|
+
* @extends {BaseAPI}
|
|
1809
|
+
*/
|
|
1810
|
+
class LoginIdentityApi extends base_1.BaseAPI {
|
|
1811
|
+
/**
|
|
1812
|
+
* Delete a specific loginIdentity
|
|
1813
|
+
* @param {*} [options] Override http request option.
|
|
1814
|
+
* @throws {RequiredError}
|
|
1815
|
+
* @memberof LoginIdentityApi
|
|
1816
|
+
*/
|
|
1817
|
+
deleteLoginIdentity(options) {
|
|
1818
|
+
return exports.LoginIdentityApiFp(this.configuration)
|
|
1819
|
+
.deleteLoginIdentity(options)
|
|
1820
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1821
|
+
}
|
|
1822
|
+
/**
|
|
1823
|
+
* generate a link token that can be used to create link
|
|
1824
|
+
* @param {LinkTokenRequest} linkTokenRequest token request
|
|
1825
|
+
* @param {*} [options] Override http request option.
|
|
1826
|
+
* @throws {RequiredError}
|
|
1827
|
+
* @memberof LoginIdentityApi
|
|
1828
|
+
*/
|
|
1829
|
+
generateLinkToken(linkTokenRequest, options) {
|
|
1830
|
+
return exports.LoginIdentityApiFp(this.configuration)
|
|
1831
|
+
.generateLinkToken(linkTokenRequest, options)
|
|
1832
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1833
|
+
}
|
|
1834
|
+
/**
|
|
1835
|
+
* Get a specific account\'s information
|
|
1836
|
+
* @param {string} accountId The account id
|
|
1837
|
+
* @param {*} [options] Override http request option.
|
|
1838
|
+
* @throws {RequiredError}
|
|
1839
|
+
* @memberof LoginIdentityApi
|
|
1840
|
+
*/
|
|
1841
|
+
getAccount(accountId, options) {
|
|
1842
|
+
return exports.LoginIdentityApiFp(this.configuration)
|
|
1843
|
+
.getAccount(accountId, options)
|
|
1844
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1845
|
+
}
|
|
1846
|
+
/**
|
|
1847
|
+
* Get the account number for a specific account
|
|
1848
|
+
* @param {string} accountId The account id
|
|
1849
|
+
* @param {*} [options] Override http request option.
|
|
1850
|
+
* @throws {RequiredError}
|
|
1851
|
+
* @memberof LoginIdentityApi
|
|
1852
|
+
*/
|
|
1853
|
+
getAccountNumber(accountId, options) {
|
|
1854
|
+
return exports.LoginIdentityApiFp(this.configuration)
|
|
1855
|
+
.getAccountNumber(accountId, options)
|
|
1856
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1857
|
+
}
|
|
1858
|
+
/**
|
|
1859
|
+
* Get the balance history for a specific account
|
|
1860
|
+
* @param {string} accountId The account id
|
|
1861
|
+
* @param {*} [options] Override http request option.
|
|
1862
|
+
* @throws {RequiredError}
|
|
1863
|
+
* @memberof LoginIdentityApi
|
|
1864
|
+
*/
|
|
1865
|
+
getBalanceHistory(accountId, options) {
|
|
1866
|
+
return exports.LoginIdentityApiFp(this.configuration)
|
|
1867
|
+
.getBalanceHistory(accountId, options)
|
|
1868
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1869
|
+
}
|
|
1870
|
+
/**
|
|
1871
|
+
* \\[BETA] Get a list of identity data for a given login identity
|
|
1872
|
+
* @param {*} [options] Override http request option.
|
|
1873
|
+
* @throws {RequiredError}
|
|
1874
|
+
* @memberof LoginIdentityApi
|
|
1875
|
+
*/
|
|
1876
|
+
getIdentity(options) {
|
|
1877
|
+
return exports.LoginIdentityApiFp(this.configuration)
|
|
1878
|
+
.getIdentity(options)
|
|
1879
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1880
|
+
}
|
|
1881
|
+
/**
|
|
1882
|
+
* Get income figures for a login identity
|
|
1883
|
+
* @param {*} [options] Override http request option.
|
|
1884
|
+
* @throws {RequiredError}
|
|
1885
|
+
* @memberof LoginIdentityApi
|
|
1886
|
+
*/
|
|
1887
|
+
getIncomeEstimateByLoginIdentityId(options) {
|
|
1888
|
+
return exports.LoginIdentityApiFp(this.configuration)
|
|
1889
|
+
.getIncomeEstimateByLoginIdentityId(options)
|
|
1890
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1891
|
+
}
|
|
1892
|
+
/**
|
|
1893
|
+
* Get a specific loginIdentity
|
|
1894
|
+
* @param {*} [options] Override http request option.
|
|
1895
|
+
* @throws {RequiredError}
|
|
1896
|
+
* @memberof LoginIdentityApi
|
|
1897
|
+
*/
|
|
1898
|
+
getLoginIdentity(options) {
|
|
1899
|
+
return exports.LoginIdentityApiFp(this.configuration)
|
|
1900
|
+
.getLoginIdentity(options)
|
|
1901
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1902
|
+
}
|
|
1903
|
+
/**
|
|
1904
|
+
* Download statement
|
|
1905
|
+
* @param {string} statementId The statement id
|
|
1906
|
+
* @param {*} [options] Override http request option.
|
|
1907
|
+
* @throws {RequiredError}
|
|
1908
|
+
* @memberof LoginIdentityApi
|
|
1909
|
+
*/
|
|
1910
|
+
getStatement(statementId, options) {
|
|
1911
|
+
return exports.LoginIdentityApiFp(this.configuration)
|
|
1912
|
+
.getStatement(statementId, options)
|
|
1913
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1914
|
+
}
|
|
1915
|
+
/**
|
|
1916
|
+
* Get statement link for download
|
|
1917
|
+
* @param {string} statementId The statement id
|
|
1918
|
+
* @param {*} [options] Override http request option.
|
|
1919
|
+
* @throws {RequiredError}
|
|
1920
|
+
* @memberof LoginIdentityApi
|
|
1921
|
+
*/
|
|
1922
|
+
getStatementLink(statementId, options) {
|
|
1923
|
+
return exports.LoginIdentityApiFp(this.configuration)
|
|
1924
|
+
.getStatementLink(statementId, options)
|
|
1925
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1926
|
+
}
|
|
1927
|
+
/**
|
|
1928
|
+
* Get list of available statements
|
|
1929
|
+
* @param {*} [options] Override http request option.
|
|
1930
|
+
* @throws {RequiredError}
|
|
1931
|
+
* @memberof LoginIdentityApi
|
|
1932
|
+
*/
|
|
1933
|
+
getStatements(options) {
|
|
1934
|
+
return exports.LoginIdentityApiFp(this.configuration)
|
|
1935
|
+
.getStatements(options)
|
|
1936
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1937
|
+
}
|
|
1938
|
+
/**
|
|
1939
|
+
* Get a list of accounts for a login identity
|
|
1940
|
+
* @param {*} [options] Override http request option.
|
|
1941
|
+
* @throws {RequiredError}
|
|
1942
|
+
* @memberof LoginIdentityApi
|
|
1943
|
+
*/
|
|
1944
|
+
listAccounts(options) {
|
|
1945
|
+
return exports.LoginIdentityApiFp(this.configuration)
|
|
1946
|
+
.listAccounts(options)
|
|
1947
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1948
|
+
}
|
|
1949
|
+
/**
|
|
1950
|
+
* Get a list of transactions for a particular account. The transactions are returned in sorted order, with the most recent one appearing first.
|
|
1951
|
+
* @param {string} accountId The account id (ULID, example - 01EP4A1MZDHKETZFRPF0K62S6S)
|
|
1952
|
+
* @param {number} [offset] default is 0
|
|
1953
|
+
* @param {number} [limit] default is 500, max is 1000
|
|
1954
|
+
* @param {*} [options] Override http request option.
|
|
1955
|
+
* @throws {RequiredError}
|
|
1956
|
+
* @memberof LoginIdentityApi
|
|
1957
|
+
*/
|
|
1958
|
+
listTransactionsByAccountId(accountId, offset, limit, options) {
|
|
1959
|
+
return exports.LoginIdentityApiFp(this.configuration)
|
|
1960
|
+
.listTransactionsByAccountId(accountId, offset, limit, options)
|
|
1961
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1962
|
+
}
|
|
1963
|
+
/**
|
|
1964
|
+
* Get a list of transactions for a login identity. The transactions are returned in sorted order, with the most recent one appearing first.
|
|
1965
|
+
* @param {number} [offset] default is 0
|
|
1966
|
+
* @param {number} [limit] default is 500, max is 1000
|
|
1967
|
+
* @param {*} [options] Override http request option.
|
|
1968
|
+
* @throws {RequiredError}
|
|
1969
|
+
* @memberof LoginIdentityApi
|
|
1970
|
+
*/
|
|
1971
|
+
listTransactionsByLoginIdentityId(offset, limit, options) {
|
|
1972
|
+
return exports.LoginIdentityApiFp(this.configuration)
|
|
1973
|
+
.listTransactionsByLoginIdentityId(offset, limit, options)
|
|
1974
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1975
|
+
}
|
|
1976
|
+
/**
|
|
1977
|
+
* Create a refresh job for a login identity
|
|
1978
|
+
* @param {*} [options] Override http request option.
|
|
1979
|
+
* @throws {RequiredError}
|
|
1980
|
+
* @memberof LoginIdentityApi
|
|
1981
|
+
*/
|
|
1982
|
+
refreshLoginIdentity(options) {
|
|
1983
|
+
return exports.LoginIdentityApiFp(this.configuration)
|
|
1984
|
+
.refreshLoginIdentity(options)
|
|
1985
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1988
|
+
exports.LoginIdentityApi = LoginIdentityApi;
|
|
1989
|
+
/**
|
|
1990
|
+
* PaymentApi - axios parameter creator
|
|
1991
|
+
* @export
|
|
1992
|
+
*/
|
|
1993
|
+
exports.PaymentApiAxiosParamCreator = function (configuration) {
|
|
1994
|
+
return {
|
|
1995
|
+
/**
|
|
1996
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
1997
|
+
* @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
1998
|
+
* @param {*} [options] Override http request option.
|
|
1999
|
+
* @throws {RequiredError}
|
|
2000
|
+
*/
|
|
2001
|
+
createPaymentInstruction: (paymentInstruction, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2002
|
+
// verify required parameter 'paymentInstruction' is not null or undefined
|
|
2003
|
+
common_1.assertParamExists('createPaymentInstruction', 'paymentInstruction', paymentInstruction);
|
|
2004
|
+
const localVarPath = `/payments/instruction`;
|
|
2005
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2006
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2007
|
+
let baseOptions;
|
|
2008
|
+
if (configuration) {
|
|
2009
|
+
baseOptions = configuration.baseOptions;
|
|
2010
|
+
}
|
|
2011
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2012
|
+
const localVarHeaderParameter = {};
|
|
2013
|
+
const localVarQueryParameter = {};
|
|
2014
|
+
// authentication Oauth2 required
|
|
2015
|
+
// oauth required
|
|
2016
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
2017
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2018
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2019
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2020
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2021
|
+
localVarRequestOptions.data = common_1.serializeDataIfNeeded(paymentInstruction, localVarRequestOptions, configuration);
|
|
2022
|
+
return {
|
|
2023
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
2024
|
+
options: localVarRequestOptions,
|
|
2025
|
+
};
|
|
2026
|
+
}),
|
|
2027
|
+
/**
|
|
2028
|
+
* Get payment instructions to be used when linking to perform debit authorization by id
|
|
2029
|
+
* @param {string} paymentInstructionId The id of a payment instruction
|
|
2030
|
+
* @param {*} [options] Override http request option.
|
|
2031
|
+
* @throws {RequiredError}
|
|
2032
|
+
*/
|
|
2033
|
+
getPaymentInstruction: (paymentInstructionId, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2034
|
+
// verify required parameter 'paymentInstructionId' is not null or undefined
|
|
2035
|
+
common_1.assertParamExists('getPaymentInstruction', 'paymentInstructionId', paymentInstructionId);
|
|
2036
|
+
const localVarPath = `/payments/instruction/{paymentInstructionId}`.replace(`{${'paymentInstructionId'}}`, encodeURIComponent(String(paymentInstructionId)));
|
|
2037
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2038
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2039
|
+
let baseOptions;
|
|
2040
|
+
if (configuration) {
|
|
2041
|
+
baseOptions = configuration.baseOptions;
|
|
2042
|
+
}
|
|
2043
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2044
|
+
const localVarHeaderParameter = {};
|
|
2045
|
+
const localVarQueryParameter = {};
|
|
2046
|
+
// authentication Oauth2 required
|
|
2047
|
+
// oauth required
|
|
2048
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
2049
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2050
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2051
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2052
|
+
return {
|
|
2053
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
2054
|
+
options: localVarRequestOptions,
|
|
2055
|
+
};
|
|
2056
|
+
}),
|
|
2057
|
+
};
|
|
2058
|
+
};
|
|
2059
|
+
/**
|
|
2060
|
+
* PaymentApi - functional programming interface
|
|
2061
|
+
* @export
|
|
2062
|
+
*/
|
|
2063
|
+
exports.PaymentApiFp = function (configuration) {
|
|
2064
|
+
const localVarAxiosParamCreator = exports.PaymentApiAxiosParamCreator(configuration);
|
|
2065
|
+
return {
|
|
2066
|
+
/**
|
|
2067
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
2068
|
+
* @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
2069
|
+
* @param {*} [options] Override http request option.
|
|
2070
|
+
* @throws {RequiredError}
|
|
2071
|
+
*/
|
|
2072
|
+
createPaymentInstruction(paymentInstruction, options) {
|
|
2073
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2074
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createPaymentInstruction(paymentInstruction, options);
|
|
2075
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2076
|
+
});
|
|
2077
|
+
},
|
|
2078
|
+
/**
|
|
2079
|
+
* Get payment instructions to be used when linking to perform debit authorization by id
|
|
2080
|
+
* @param {string} paymentInstructionId The id of a payment instruction
|
|
2081
|
+
* @param {*} [options] Override http request option.
|
|
2082
|
+
* @throws {RequiredError}
|
|
2083
|
+
*/
|
|
2084
|
+
getPaymentInstruction(paymentInstructionId, options) {
|
|
2085
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2086
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.getPaymentInstruction(paymentInstructionId, options);
|
|
2087
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2088
|
+
});
|
|
2089
|
+
},
|
|
2090
|
+
};
|
|
2091
|
+
};
|
|
2092
|
+
/**
|
|
2093
|
+
* PaymentApi - factory interface
|
|
2094
|
+
* @export
|
|
2095
|
+
*/
|
|
2096
|
+
exports.PaymentApiFactory = function (configuration, basePath, axios) {
|
|
2097
|
+
const localVarFp = exports.PaymentApiFp(configuration);
|
|
2098
|
+
return {
|
|
2099
|
+
/**
|
|
2100
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
2101
|
+
* @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
2102
|
+
* @param {*} [options] Override http request option.
|
|
2103
|
+
* @throws {RequiredError}
|
|
2104
|
+
*/
|
|
2105
|
+
createPaymentInstruction(paymentInstruction, options) {
|
|
2106
|
+
return localVarFp
|
|
2107
|
+
.createPaymentInstruction(paymentInstruction, options)
|
|
2108
|
+
.then((request) => request(axios, basePath));
|
|
2109
|
+
},
|
|
2110
|
+
/**
|
|
2111
|
+
* Get payment instructions to be used when linking to perform debit authorization by id
|
|
2112
|
+
* @param {string} paymentInstructionId The id of a payment instruction
|
|
2113
|
+
* @param {*} [options] Override http request option.
|
|
2114
|
+
* @throws {RequiredError}
|
|
2115
|
+
*/
|
|
2116
|
+
getPaymentInstruction(paymentInstructionId, options) {
|
|
2117
|
+
return localVarFp
|
|
2118
|
+
.getPaymentInstruction(paymentInstructionId, options)
|
|
2119
|
+
.then((request) => request(axios, basePath));
|
|
2120
|
+
},
|
|
2121
|
+
};
|
|
2122
|
+
};
|
|
2123
|
+
/**
|
|
2124
|
+
* PaymentApi - object-oriented interface
|
|
2125
|
+
* @export
|
|
2126
|
+
* @class PaymentApi
|
|
2127
|
+
* @extends {BaseAPI}
|
|
2128
|
+
*/
|
|
2129
|
+
class PaymentApi extends base_1.BaseAPI {
|
|
2130
|
+
/**
|
|
2131
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
2132
|
+
* @param {CustomerPaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
2133
|
+
* @param {*} [options] Override http request option.
|
|
2134
|
+
* @throws {RequiredError}
|
|
2135
|
+
* @memberof PaymentApi
|
|
2136
|
+
*/
|
|
2137
|
+
createPaymentInstruction(paymentInstruction, options) {
|
|
2138
|
+
return exports.PaymentApiFp(this.configuration)
|
|
2139
|
+
.createPaymentInstruction(paymentInstruction, options)
|
|
2140
|
+
.then((request) => request(this.axios, this.basePath));
|
|
2141
|
+
}
|
|
2142
|
+
/**
|
|
2143
|
+
* Get payment instructions to be used when linking to perform debit authorization by id
|
|
2144
|
+
* @param {string} paymentInstructionId The id of a payment instruction
|
|
2145
|
+
* @param {*} [options] Override http request option.
|
|
2146
|
+
* @throws {RequiredError}
|
|
2147
|
+
* @memberof PaymentApi
|
|
2148
|
+
*/
|
|
2149
|
+
getPaymentInstruction(paymentInstructionId, options) {
|
|
2150
|
+
return exports.PaymentApiFp(this.configuration)
|
|
2151
|
+
.getPaymentInstruction(paymentInstructionId, options)
|
|
2152
|
+
.then((request) => request(this.axios, this.basePath));
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
exports.PaymentApi = PaymentApi;
|
|
2156
|
+
/**
|
|
2157
|
+
* PublicApi - axios parameter creator
|
|
2158
|
+
* @export
|
|
2159
|
+
*/
|
|
2160
|
+
exports.PublicApiAxiosParamCreator = function (configuration) {
|
|
2161
|
+
return {
|
|
2162
|
+
/**
|
|
2163
|
+
* Callback url to get the oauth authorization token
|
|
2164
|
+
* @param {string} state The state of the client when oauth was initialized
|
|
2165
|
+
* @param {string} [code] The authorization code generated by the Oauth provider
|
|
2166
|
+
* @param {string} [error] error
|
|
2167
|
+
* @param {string} [errorDescription] error description
|
|
2168
|
+
* @param {string} [errorDetails] error details
|
|
2169
|
+
* @param {*} [options] Override http request option.
|
|
2170
|
+
* @throws {RequiredError}
|
|
2171
|
+
*/
|
|
2172
|
+
authCallback: (state, code, error, errorDescription, errorDetails, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2173
|
+
// verify required parameter 'state' is not null or undefined
|
|
2174
|
+
common_1.assertParamExists('authCallback', 'state', state);
|
|
2175
|
+
const localVarPath = `/auth/callback`;
|
|
2176
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2177
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2178
|
+
let baseOptions;
|
|
2179
|
+
if (configuration) {
|
|
2180
|
+
baseOptions = configuration.baseOptions;
|
|
2181
|
+
}
|
|
2182
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
2183
|
+
const localVarHeaderParameter = {};
|
|
2184
|
+
const localVarQueryParameter = {};
|
|
2185
|
+
// authentication Oauth2 required
|
|
2186
|
+
// oauth required
|
|
2187
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', ['test'], configuration);
|
|
2188
|
+
if (state !== undefined) {
|
|
2189
|
+
localVarQueryParameter['state'] = state;
|
|
2190
|
+
}
|
|
2191
|
+
if (code !== undefined) {
|
|
2192
|
+
localVarQueryParameter['code'] = code;
|
|
2193
|
+
}
|
|
2194
|
+
if (error !== undefined) {
|
|
2195
|
+
localVarQueryParameter['error'] = error;
|
|
2196
|
+
}
|
|
2197
|
+
if (errorDescription !== undefined) {
|
|
2198
|
+
localVarQueryParameter['error_description'] = errorDescription;
|
|
2199
|
+
}
|
|
2200
|
+
if (errorDetails !== undefined) {
|
|
2201
|
+
localVarQueryParameter['error_details'] = errorDetails;
|
|
2202
|
+
}
|
|
2203
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2204
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2205
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2206
|
+
return {
|
|
2207
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
2208
|
+
options: localVarRequestOptions,
|
|
2209
|
+
};
|
|
2210
|
+
}),
|
|
2211
|
+
/**
|
|
2212
|
+
* generate an access_token
|
|
2213
|
+
* @param {TokenRequest} [tokenRequest] token request
|
|
2214
|
+
* @param {*} [options] Override http request option.
|
|
2215
|
+
* @throws {RequiredError}
|
|
2216
|
+
*/
|
|
2217
|
+
generateCustomerAccessToken: (tokenRequest, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
2218
|
+
const localVarPath = `/auth/customer/token`;
|
|
2219
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
2220
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2221
|
+
let baseOptions;
|
|
2222
|
+
if (configuration) {
|
|
2223
|
+
baseOptions = configuration.baseOptions;
|
|
2224
|
+
}
|
|
2225
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
2226
|
+
const localVarHeaderParameter = {};
|
|
2227
|
+
const localVarQueryParameter = {};
|
|
2228
|
+
// authentication Oauth2 required
|
|
2229
|
+
// oauth required
|
|
2230
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', ['test'], configuration);
|
|
2231
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2232
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2233
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2234
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2235
|
+
localVarRequestOptions.data = common_1.serializeDataIfNeeded(tokenRequest, localVarRequestOptions, configuration);
|
|
2236
|
+
return {
|
|
2237
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
2238
|
+
options: localVarRequestOptions,
|
|
2239
|
+
};
|
|
2240
|
+
}),
|
|
2241
|
+
};
|
|
2242
|
+
};
|
|
2243
|
+
/**
|
|
2244
|
+
* PublicApi - functional programming interface
|
|
2245
|
+
* @export
|
|
2246
|
+
*/
|
|
2247
|
+
exports.PublicApiFp = function (configuration) {
|
|
2248
|
+
const localVarAxiosParamCreator = exports.PublicApiAxiosParamCreator(configuration);
|
|
2249
|
+
return {
|
|
2250
|
+
/**
|
|
2251
|
+
* Callback url to get the oauth authorization token
|
|
2252
|
+
* @param {string} state The state of the client when oauth was initialized
|
|
2253
|
+
* @param {string} [code] The authorization code generated by the Oauth provider
|
|
2254
|
+
* @param {string} [error] error
|
|
2255
|
+
* @param {string} [errorDescription] error description
|
|
2256
|
+
* @param {string} [errorDetails] error details
|
|
2257
|
+
* @param {*} [options] Override http request option.
|
|
2258
|
+
* @throws {RequiredError}
|
|
2259
|
+
*/
|
|
2260
|
+
authCallback(state, code, error, errorDescription, errorDetails, options) {
|
|
2261
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2262
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.authCallback(state, code, error, errorDescription, errorDetails, options);
|
|
2263
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2264
|
+
});
|
|
2265
|
+
},
|
|
2266
|
+
/**
|
|
2267
|
+
* generate an access_token
|
|
2268
|
+
* @param {TokenRequest} [tokenRequest] token request
|
|
2269
|
+
* @param {*} [options] Override http request option.
|
|
2270
|
+
* @throws {RequiredError}
|
|
2271
|
+
*/
|
|
2272
|
+
generateCustomerAccessToken(tokenRequest, options) {
|
|
2273
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2274
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.generateCustomerAccessToken(tokenRequest, options);
|
|
2275
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2276
|
+
});
|
|
2277
|
+
},
|
|
2278
|
+
};
|
|
2279
|
+
};
|
|
2280
|
+
/**
|
|
2281
|
+
* PublicApi - factory interface
|
|
2282
|
+
* @export
|
|
2283
|
+
*/
|
|
2284
|
+
exports.PublicApiFactory = function (configuration, basePath, axios) {
|
|
2285
|
+
const localVarFp = exports.PublicApiFp(configuration);
|
|
2286
|
+
return {
|
|
2287
|
+
/**
|
|
2288
|
+
* Callback url to get the oauth authorization token
|
|
2289
|
+
* @param {string} state The state of the client when oauth was initialized
|
|
2290
|
+
* @param {string} [code] The authorization code generated by the Oauth provider
|
|
2291
|
+
* @param {string} [error] error
|
|
2292
|
+
* @param {string} [errorDescription] error description
|
|
2293
|
+
* @param {string} [errorDetails] error details
|
|
2294
|
+
* @param {*} [options] Override http request option.
|
|
2295
|
+
* @throws {RequiredError}
|
|
2296
|
+
*/
|
|
2297
|
+
authCallback(state, code, error, errorDescription, errorDetails, options) {
|
|
2298
|
+
return localVarFp
|
|
2299
|
+
.authCallback(state, code, error, errorDescription, errorDetails, options)
|
|
2300
|
+
.then((request) => request(axios, basePath));
|
|
2301
|
+
},
|
|
2302
|
+
/**
|
|
2303
|
+
* generate an access_token
|
|
2304
|
+
* @param {TokenRequest} [tokenRequest] token request
|
|
2305
|
+
* @param {*} [options] Override http request option.
|
|
2306
|
+
* @throws {RequiredError}
|
|
2307
|
+
*/
|
|
2308
|
+
generateCustomerAccessToken(tokenRequest, options) {
|
|
2309
|
+
return localVarFp.generateCustomerAccessToken(tokenRequest, options).then((request) => request(axios, basePath));
|
|
2310
|
+
},
|
|
2311
|
+
};
|
|
2312
|
+
};
|
|
2313
|
+
/**
|
|
2314
|
+
* PublicApi - object-oriented interface
|
|
2315
|
+
* @export
|
|
2316
|
+
* @class PublicApi
|
|
2317
|
+
* @extends {BaseAPI}
|
|
2318
|
+
*/
|
|
2319
|
+
class PublicApi extends base_1.BaseAPI {
|
|
2320
|
+
/**
|
|
2321
|
+
* Callback url to get the oauth authorization token
|
|
2322
|
+
* @param {string} state The state of the client when oauth was initialized
|
|
2323
|
+
* @param {string} [code] The authorization code generated by the Oauth provider
|
|
2324
|
+
* @param {string} [error] error
|
|
2325
|
+
* @param {string} [errorDescription] error description
|
|
2326
|
+
* @param {string} [errorDetails] error details
|
|
2327
|
+
* @param {*} [options] Override http request option.
|
|
2328
|
+
* @throws {RequiredError}
|
|
2329
|
+
* @memberof PublicApi
|
|
2330
|
+
*/
|
|
2331
|
+
authCallback(state, code, error, errorDescription, errorDetails, options) {
|
|
2332
|
+
return exports.PublicApiFp(this.configuration)
|
|
2333
|
+
.authCallback(state, code, error, errorDescription, errorDetails, options)
|
|
2334
|
+
.then((request) => request(this.axios, this.basePath));
|
|
2335
|
+
}
|
|
2336
|
+
/**
|
|
2337
|
+
* generate an access_token
|
|
2338
|
+
* @param {TokenRequest} [tokenRequest] token request
|
|
2339
|
+
* @param {*} [options] Override http request option.
|
|
2340
|
+
* @throws {RequiredError}
|
|
2341
|
+
* @memberof PublicApi
|
|
2342
|
+
*/
|
|
2343
|
+
generateCustomerAccessToken(tokenRequest, options) {
|
|
2344
|
+
return exports.PublicApiFp(this.configuration)
|
|
2345
|
+
.generateCustomerAccessToken(tokenRequest, options)
|
|
2346
|
+
.then((request) => request(this.axios, this.basePath));
|
|
2347
|
+
}
|
|
2348
|
+
}
|
|
2349
|
+
exports.PublicApi = PublicApi;
|