@finverse/sdk-typescript 0.0.3 → 0.0.6
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 +151 -0
- package/dist/api.js +71 -1
- package/package.json +2 -2
package/dist/api.d.ts
CHANGED
|
@@ -381,6 +381,19 @@ export interface CreateCustomerResponse {
|
|
|
381
381
|
*/
|
|
382
382
|
webhook_uris?: Array<string>;
|
|
383
383
|
}
|
|
384
|
+
/**
|
|
385
|
+
*
|
|
386
|
+
* @export
|
|
387
|
+
* @interface CreatePaymentInstructionResponse
|
|
388
|
+
*/
|
|
389
|
+
export interface CreatePaymentInstructionResponse {
|
|
390
|
+
/**
|
|
391
|
+
*
|
|
392
|
+
* @type {string}
|
|
393
|
+
* @memberof CreatePaymentInstructionResponse
|
|
394
|
+
*/
|
|
395
|
+
payment_instruction_id?: string;
|
|
396
|
+
}
|
|
384
397
|
/**
|
|
385
398
|
*
|
|
386
399
|
* @export
|
|
@@ -1182,6 +1195,18 @@ export interface LinkRequest {
|
|
|
1182
1195
|
* @memberof LinkRequest
|
|
1183
1196
|
*/
|
|
1184
1197
|
store_credential: boolean;
|
|
1198
|
+
/**
|
|
1199
|
+
* products that is requested
|
|
1200
|
+
* @type {Array<string>}
|
|
1201
|
+
* @memberof LinkRequest
|
|
1202
|
+
*/
|
|
1203
|
+
products_requested?: Array<string>;
|
|
1204
|
+
/**
|
|
1205
|
+
* The identifier returned after creating payment instruction
|
|
1206
|
+
* @type {string}
|
|
1207
|
+
* @memberof LinkRequest
|
|
1208
|
+
*/
|
|
1209
|
+
payment_instruction_id?: string;
|
|
1185
1210
|
}
|
|
1186
1211
|
/**
|
|
1187
1212
|
*
|
|
@@ -1316,6 +1341,18 @@ export interface LinkTokenRequest {
|
|
|
1316
1341
|
* @memberof LinkTokenRequest
|
|
1317
1342
|
*/
|
|
1318
1343
|
products_supported?: Array<string>;
|
|
1344
|
+
/**
|
|
1345
|
+
* products that is requested
|
|
1346
|
+
* @type {Array<string>}
|
|
1347
|
+
* @memberof LinkTokenRequest
|
|
1348
|
+
*/
|
|
1349
|
+
products_requested?: Array<string>;
|
|
1350
|
+
/**
|
|
1351
|
+
* The identifier returned after creating payment instruction
|
|
1352
|
+
* @type {string}
|
|
1353
|
+
* @memberof LinkTokenRequest
|
|
1354
|
+
*/
|
|
1355
|
+
payment_instruction_id?: string;
|
|
1319
1356
|
}
|
|
1320
1357
|
export declare const LinkTokenRequestUiModeEnum: {
|
|
1321
1358
|
readonly Iframe: "iframe";
|
|
@@ -1774,6 +1811,83 @@ export interface PaymentDetails {
|
|
|
1774
1811
|
*/
|
|
1775
1812
|
other_info?: OtherInfo;
|
|
1776
1813
|
}
|
|
1814
|
+
/**
|
|
1815
|
+
*
|
|
1816
|
+
* @export
|
|
1817
|
+
* @interface PaymentInstruction
|
|
1818
|
+
*/
|
|
1819
|
+
export interface PaymentInstruction {
|
|
1820
|
+
/**
|
|
1821
|
+
* What type of payment is being created
|
|
1822
|
+
* @type {string}
|
|
1823
|
+
* @memberof PaymentInstruction
|
|
1824
|
+
*/
|
|
1825
|
+
payment_type: PaymentInstructionPaymentTypeEnum;
|
|
1826
|
+
/**
|
|
1827
|
+
* The recipient name
|
|
1828
|
+
* @type {string}
|
|
1829
|
+
* @memberof PaymentInstruction
|
|
1830
|
+
*/
|
|
1831
|
+
recipient_name?: string;
|
|
1832
|
+
/**
|
|
1833
|
+
* The sender name
|
|
1834
|
+
* @type {string}
|
|
1835
|
+
* @memberof PaymentInstruction
|
|
1836
|
+
*/
|
|
1837
|
+
sender_name?: string;
|
|
1838
|
+
/**
|
|
1839
|
+
* The sender account Id
|
|
1840
|
+
* @type {string}
|
|
1841
|
+
* @memberof PaymentInstruction
|
|
1842
|
+
*/
|
|
1843
|
+
sender_account_id?: string;
|
|
1844
|
+
/**
|
|
1845
|
+
* When the payment should start
|
|
1846
|
+
* @type {string}
|
|
1847
|
+
* @memberof PaymentInstruction
|
|
1848
|
+
*/
|
|
1849
|
+
start_date?: string | null;
|
|
1850
|
+
/**
|
|
1851
|
+
* When the payment should stop
|
|
1852
|
+
* @type {string}
|
|
1853
|
+
* @memberof PaymentInstruction
|
|
1854
|
+
*/
|
|
1855
|
+
end_date?: string | null;
|
|
1856
|
+
/**
|
|
1857
|
+
* The currency for the payment
|
|
1858
|
+
* @type {string}
|
|
1859
|
+
* @memberof PaymentInstruction
|
|
1860
|
+
*/
|
|
1861
|
+
currency?: string;
|
|
1862
|
+
/**
|
|
1863
|
+
* The payment amount
|
|
1864
|
+
* @type {number}
|
|
1865
|
+
* @memberof PaymentInstruction
|
|
1866
|
+
*/
|
|
1867
|
+
amount?: number;
|
|
1868
|
+
/**
|
|
1869
|
+
* How often the payment is executed
|
|
1870
|
+
* @type {string}
|
|
1871
|
+
* @memberof PaymentInstruction
|
|
1872
|
+
*/
|
|
1873
|
+
frequency?: string;
|
|
1874
|
+
/**
|
|
1875
|
+
* Related remarks
|
|
1876
|
+
* @type {string}
|
|
1877
|
+
* @memberof PaymentInstruction
|
|
1878
|
+
*/
|
|
1879
|
+
remarks?: string;
|
|
1880
|
+
/**
|
|
1881
|
+
* A customer provided key to ensure ideompotency
|
|
1882
|
+
* @type {string}
|
|
1883
|
+
* @memberof PaymentInstruction
|
|
1884
|
+
*/
|
|
1885
|
+
idempotence_key?: string;
|
|
1886
|
+
}
|
|
1887
|
+
export declare const PaymentInstructionPaymentTypeEnum: {
|
|
1888
|
+
readonly DebitAuthorization: "DEBIT_AUTHORIZATION";
|
|
1889
|
+
};
|
|
1890
|
+
export declare type PaymentInstructionPaymentTypeEnum = typeof PaymentInstructionPaymentTypeEnum[keyof typeof PaymentInstructionPaymentTypeEnum];
|
|
1777
1891
|
/**
|
|
1778
1892
|
*
|
|
1779
1893
|
* @export
|
|
@@ -2125,6 +2239,13 @@ export interface Transaction {
|
|
|
2125
2239
|
* @export
|
|
2126
2240
|
*/
|
|
2127
2241
|
export declare const CustomerApiAxiosParamCreator: (configuration?: Configuration) => {
|
|
2242
|
+
/**
|
|
2243
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
2244
|
+
* @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
2245
|
+
* @param {*} [options] Override http request option.
|
|
2246
|
+
* @throws {RequiredError}
|
|
2247
|
+
*/
|
|
2248
|
+
createPaymentInstruction: (paymentInstruction: PaymentInstruction, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
2128
2249
|
/**
|
|
2129
2250
|
* generate a link token that can be used to create link
|
|
2130
2251
|
* @param {LinkTokenRequest} linkTokenRequest token request
|
|
@@ -2176,6 +2297,13 @@ export declare const CustomerApiAxiosParamCreator: (configuration?: Configuratio
|
|
|
2176
2297
|
* @export
|
|
2177
2298
|
*/
|
|
2178
2299
|
export declare const CustomerApiFp: (configuration?: Configuration) => {
|
|
2300
|
+
/**
|
|
2301
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
2302
|
+
* @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
2303
|
+
* @param {*} [options] Override http request option.
|
|
2304
|
+
* @throws {RequiredError}
|
|
2305
|
+
*/
|
|
2306
|
+
createPaymentInstruction(paymentInstruction: PaymentInstruction, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CreatePaymentInstructionResponse>>;
|
|
2179
2307
|
/**
|
|
2180
2308
|
* generate a link token that can be used to create link
|
|
2181
2309
|
* @param {LinkTokenRequest} linkTokenRequest token request
|
|
@@ -2227,6 +2355,13 @@ export declare const CustomerApiFp: (configuration?: Configuration) => {
|
|
|
2227
2355
|
* @export
|
|
2228
2356
|
*/
|
|
2229
2357
|
export declare const CustomerApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
|
|
2358
|
+
/**
|
|
2359
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
2360
|
+
* @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
2361
|
+
* @param {*} [options] Override http request option.
|
|
2362
|
+
* @throws {RequiredError}
|
|
2363
|
+
*/
|
|
2364
|
+
createPaymentInstruction(paymentInstruction: PaymentInstruction, options?: any): AxiosPromise<CreatePaymentInstructionResponse>;
|
|
2230
2365
|
/**
|
|
2231
2366
|
* generate a link token that can be used to create link
|
|
2232
2367
|
* @param {LinkTokenRequest} linkTokenRequest token request
|
|
@@ -2279,6 +2414,14 @@ export declare const CustomerApiFactory: (configuration?: Configuration, basePat
|
|
|
2279
2414
|
* @interface CustomerApi
|
|
2280
2415
|
*/
|
|
2281
2416
|
export interface CustomerApiInterface {
|
|
2417
|
+
/**
|
|
2418
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
2419
|
+
* @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
2420
|
+
* @param {*} [options] Override http request option.
|
|
2421
|
+
* @throws {RequiredError}
|
|
2422
|
+
* @memberof CustomerApiInterface
|
|
2423
|
+
*/
|
|
2424
|
+
createPaymentInstruction(paymentInstruction: PaymentInstruction, options?: AxiosRequestConfig): AxiosPromise<CreatePaymentInstructionResponse>;
|
|
2282
2425
|
/**
|
|
2283
2426
|
* generate a link token that can be used to create link
|
|
2284
2427
|
* @param {LinkTokenRequest} linkTokenRequest token request
|
|
@@ -2338,6 +2481,14 @@ export interface CustomerApiInterface {
|
|
|
2338
2481
|
* @extends {BaseAPI}
|
|
2339
2482
|
*/
|
|
2340
2483
|
export declare class CustomerApi extends BaseAPI implements CustomerApiInterface {
|
|
2484
|
+
/**
|
|
2485
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
2486
|
+
* @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
2487
|
+
* @param {*} [options] Override http request option.
|
|
2488
|
+
* @throws {RequiredError}
|
|
2489
|
+
* @memberof CustomerApi
|
|
2490
|
+
*/
|
|
2491
|
+
createPaymentInstruction(paymentInstruction: PaymentInstruction, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<CreatePaymentInstructionResponse>>;
|
|
2341
2492
|
/**
|
|
2342
2493
|
* generate a link token that can be used to create link
|
|
2343
2494
|
* @param {LinkTokenRequest} linkTokenRequest token request
|
package/dist/api.js
CHANGED
|
@@ -22,7 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.PublicApi = exports.PublicApiFactory = exports.PublicApiFp = exports.PublicApiAxiosParamCreator = 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.LinkTokenRequestUiModeEnum = void 0;
|
|
25
|
+
exports.PublicApi = exports.PublicApiFactory = exports.PublicApiFp = exports.PublicApiAxiosParamCreator = 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.PaymentInstructionPaymentTypeEnum = exports.LinkTokenRequestUiModeEnum = void 0;
|
|
26
26
|
const axios_1 = require("axios");
|
|
27
27
|
// Some imports not used depending on template conditions
|
|
28
28
|
// @ts-ignore
|
|
@@ -34,12 +34,47 @@ exports.LinkTokenRequestUiModeEnum = {
|
|
|
34
34
|
Redirect: 'redirect',
|
|
35
35
|
AutoRedirect: 'auto_redirect',
|
|
36
36
|
};
|
|
37
|
+
exports.PaymentInstructionPaymentTypeEnum = {
|
|
38
|
+
DebitAuthorization: 'DEBIT_AUTHORIZATION',
|
|
39
|
+
};
|
|
37
40
|
/**
|
|
38
41
|
* CustomerApi - axios parameter creator
|
|
39
42
|
* @export
|
|
40
43
|
*/
|
|
41
44
|
exports.CustomerApiAxiosParamCreator = function (configuration) {
|
|
42
45
|
return {
|
|
46
|
+
/**
|
|
47
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
48
|
+
* @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
49
|
+
* @param {*} [options] Override http request option.
|
|
50
|
+
* @throws {RequiredError}
|
|
51
|
+
*/
|
|
52
|
+
createPaymentInstruction: (paymentInstruction, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
53
|
+
// verify required parameter 'paymentInstruction' is not null or undefined
|
|
54
|
+
common_1.assertParamExists('createPaymentInstruction', 'paymentInstruction', paymentInstruction);
|
|
55
|
+
const localVarPath = `/payments/instruction`;
|
|
56
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
57
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
58
|
+
let baseOptions;
|
|
59
|
+
if (configuration) {
|
|
60
|
+
baseOptions = configuration.baseOptions;
|
|
61
|
+
}
|
|
62
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
|
|
63
|
+
const localVarHeaderParameter = {};
|
|
64
|
+
const localVarQueryParameter = {};
|
|
65
|
+
// authentication Oauth2 required
|
|
66
|
+
// oauth required
|
|
67
|
+
yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
|
|
68
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
69
|
+
common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
70
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
71
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
72
|
+
localVarRequestOptions.data = common_1.serializeDataIfNeeded(paymentInstruction, localVarRequestOptions, configuration);
|
|
73
|
+
return {
|
|
74
|
+
url: common_1.toPathString(localVarUrlObj),
|
|
75
|
+
options: localVarRequestOptions,
|
|
76
|
+
};
|
|
77
|
+
}),
|
|
43
78
|
/**
|
|
44
79
|
* generate a link token that can be used to create link
|
|
45
80
|
* @param {LinkTokenRequest} linkTokenRequest token request
|
|
@@ -246,6 +281,18 @@ exports.CustomerApiAxiosParamCreator = function (configuration) {
|
|
|
246
281
|
exports.CustomerApiFp = function (configuration) {
|
|
247
282
|
const localVarAxiosParamCreator = exports.CustomerApiAxiosParamCreator(configuration);
|
|
248
283
|
return {
|
|
284
|
+
/**
|
|
285
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
286
|
+
* @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
287
|
+
* @param {*} [options] Override http request option.
|
|
288
|
+
* @throws {RequiredError}
|
|
289
|
+
*/
|
|
290
|
+
createPaymentInstruction(paymentInstruction, options) {
|
|
291
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
292
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.createPaymentInstruction(paymentInstruction, options);
|
|
293
|
+
return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
294
|
+
});
|
|
295
|
+
},
|
|
249
296
|
/**
|
|
250
297
|
* generate a link token that can be used to create link
|
|
251
298
|
* @param {LinkTokenRequest} linkTokenRequest token request
|
|
@@ -330,6 +377,17 @@ exports.CustomerApiFp = function (configuration) {
|
|
|
330
377
|
exports.CustomerApiFactory = function (configuration, basePath, axios) {
|
|
331
378
|
const localVarFp = exports.CustomerApiFp(configuration);
|
|
332
379
|
return {
|
|
380
|
+
/**
|
|
381
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
382
|
+
* @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
383
|
+
* @param {*} [options] Override http request option.
|
|
384
|
+
* @throws {RequiredError}
|
|
385
|
+
*/
|
|
386
|
+
createPaymentInstruction(paymentInstruction, options) {
|
|
387
|
+
return localVarFp
|
|
388
|
+
.createPaymentInstruction(paymentInstruction, options)
|
|
389
|
+
.then((request) => request(axios, basePath));
|
|
390
|
+
},
|
|
333
391
|
/**
|
|
334
392
|
* generate a link token that can be used to create link
|
|
335
393
|
* @param {LinkTokenRequest} linkTokenRequest token request
|
|
@@ -398,6 +456,18 @@ exports.CustomerApiFactory = function (configuration, basePath, axios) {
|
|
|
398
456
|
* @extends {BaseAPI}
|
|
399
457
|
*/
|
|
400
458
|
class CustomerApi extends base_1.BaseAPI {
|
|
459
|
+
/**
|
|
460
|
+
* Create a new payment instruction to be used when linking to perform debit authorization
|
|
461
|
+
* @param {PaymentInstruction} paymentInstruction Request body for starting a new Link
|
|
462
|
+
* @param {*} [options] Override http request option.
|
|
463
|
+
* @throws {RequiredError}
|
|
464
|
+
* @memberof CustomerApi
|
|
465
|
+
*/
|
|
466
|
+
createPaymentInstruction(paymentInstruction, options) {
|
|
467
|
+
return exports.CustomerApiFp(this.configuration)
|
|
468
|
+
.createPaymentInstruction(paymentInstruction, options)
|
|
469
|
+
.then((request) => request(this.axios, this.basePath));
|
|
470
|
+
}
|
|
401
471
|
/**
|
|
402
472
|
* generate a link token that can be used to create link
|
|
403
473
|
* @param {LinkTokenRequest} linkTokenRequest token request
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finverse/sdk-typescript",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "OpenAPI client for @finverse/sdk-typescript",
|
|
5
5
|
"author": "OpenAPI-Generator Contributors",
|
|
6
6
|
"keywords": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@types/node": "^12.11.5",
|
|
27
27
|
"axios-mock-adapter": "^1.20.0",
|
|
28
28
|
"chai": "^4.3.6",
|
|
29
|
-
"mocha": "^9.2.
|
|
29
|
+
"mocha": "^9.2.2",
|
|
30
30
|
"ts-node": "^10.7.0",
|
|
31
31
|
"typescript": "^3.6.4"
|
|
32
32
|
},
|