@finverse/sdk-typescript 0.0.44 → 0.0.47

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/README.md CHANGED
@@ -159,7 +159,8 @@ console.log("statements: " + statementsResp.statements)
159
159
  const statementId = statements.data.statements[0].id;
160
160
 
161
161
  // Can download statement from here
162
- const satementLink = await new LoginIdentityApi(configuration).getStatementLink(statementId);
162
+ const statementResp = await new LoginIdentityApi(configuration).getStatement(statementId, true, {responseType: "arraybuffer"});
163
+ writeFileSync("statement.pdf", Buffer.from(statementResp.data));
163
164
  ```
164
165
 
165
166
  ## Getting started (Payment flow)
package/dist/api.d.ts CHANGED
@@ -97,6 +97,12 @@ export interface Account {
97
97
  * @memberof Account
98
98
  */
99
99
  account_sub_type?: string;
100
+ /**
101
+ *
102
+ * @type {string}
103
+ * @memberof Account
104
+ */
105
+ account_number_masked?: string;
100
106
  /**
101
107
  *
102
108
  * @type {string}
@@ -851,6 +857,19 @@ export interface GetIdentityResponse {
851
857
  */
852
858
  institution?: InstitutionShort;
853
859
  }
860
+ /**
861
+ *
862
+ * @export
863
+ * @interface GetJWKSResponse
864
+ */
865
+ export interface GetJWKSResponse {
866
+ /**
867
+ *
868
+ * @type {Array<JWKSKey>}
869
+ * @memberof GetJWKSResponse
870
+ */
871
+ keys?: Array<JWKSKey>;
872
+ }
854
873
  /**
855
874
  *
856
875
  * @export
@@ -1643,6 +1662,49 @@ export interface InstitutionShort {
1643
1662
  */
1644
1663
  portal_name?: string;
1645
1664
  }
1665
+ /**
1666
+ *
1667
+ * @export
1668
+ * @interface JWKSKey
1669
+ */
1670
+ export interface JWKSKey {
1671
+ /**
1672
+ * The \"kty\" (key type) parameter identifies the cryptographic algorithm family used with the key, such as \"RSA\" or \"EC\".
1673
+ * @type {string}
1674
+ * @memberof JWKSKey
1675
+ */
1676
+ kty?: string;
1677
+ /**
1678
+ * The \"kid\" (key ID) parameter is used to match a specific key
1679
+ * @type {string}
1680
+ * @memberof JWKSKey
1681
+ */
1682
+ kid?: string;
1683
+ /**
1684
+ * The \"use\" (public key use) parameter identifies the intended use of the public key
1685
+ * @type {string}
1686
+ * @memberof JWKSKey
1687
+ */
1688
+ use?: string;
1689
+ /**
1690
+ * RSA key value \"e\"
1691
+ * @type {string}
1692
+ * @memberof JWKSKey
1693
+ */
1694
+ e?: string;
1695
+ /**
1696
+ * RSA key value \"n\"
1697
+ * @type {string}
1698
+ * @memberof JWKSKey
1699
+ */
1700
+ n?: string;
1701
+ /**
1702
+ * The \"x5c\" (X.509 certificate chain) parameter contains a chain of one or more PKIX certificates
1703
+ * @type {Array<string>}
1704
+ * @memberof JWKSKey
1705
+ */
1706
+ x5c?: Array<string>;
1707
+ }
1646
1708
  /**
1647
1709
  *
1648
1710
  * @export
@@ -3843,13 +3905,6 @@ export declare const LoginIdentityApiAxiosParamCreator: (configuration?: Configu
3843
3905
  * @throws {RequiredError}
3844
3906
  */
3845
3907
  getStatement: (statementId: string, redirect?: boolean, options?: AxiosRequestConfig) => Promise<RequestArgs>;
3846
- /**
3847
- * (Deprecated) Get statement link for download
3848
- * @param {string} statementId The statement id
3849
- * @param {*} [options] Override http request option.
3850
- * @throws {RequiredError}
3851
- */
3852
- getStatementLink: (statementId: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
3853
3908
  /**
3854
3909
  * Get list of available statements
3855
3910
  * @param {*} [options] Override http request option.
@@ -3958,13 +4013,6 @@ export declare const LoginIdentityApiFp: (configuration?: Configuration) => {
3958
4013
  * @throws {RequiredError}
3959
4014
  */
3960
4015
  getStatement(statementId: string, redirect?: boolean, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetStatementLinkResponse>>;
3961
- /**
3962
- * (Deprecated) Get statement link for download
3963
- * @param {string} statementId The statement id
3964
- * @param {*} [options] Override http request option.
3965
- * @throws {RequiredError}
3966
- */
3967
- getStatementLink(statementId: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetStatementLinkResponse>>;
3968
4016
  /**
3969
4017
  * Get list of available statements
3970
4018
  * @param {*} [options] Override http request option.
@@ -4073,13 +4121,6 @@ export declare const LoginIdentityApiFactory: (configuration?: Configuration, ba
4073
4121
  * @throws {RequiredError}
4074
4122
  */
4075
4123
  getStatement(statementId: string, redirect?: boolean, options?: any): AxiosPromise<GetStatementLinkResponse>;
4076
- /**
4077
- * (Deprecated) Get statement link for download
4078
- * @param {string} statementId The statement id
4079
- * @param {*} [options] Override http request option.
4080
- * @throws {RequiredError}
4081
- */
4082
- getStatementLink(statementId: string, options?: any): AxiosPromise<GetStatementLinkResponse>;
4083
4124
  /**
4084
4125
  * Get list of available statements
4085
4126
  * @param {*} [options] Override http request option.
@@ -4199,14 +4240,6 @@ export interface LoginIdentityApiInterface {
4199
4240
  * @memberof LoginIdentityApiInterface
4200
4241
  */
4201
4242
  getStatement(statementId: string, redirect?: boolean, options?: AxiosRequestConfig): AxiosPromise<GetStatementLinkResponse>;
4202
- /**
4203
- * (Deprecated) Get statement link for download
4204
- * @param {string} statementId The statement id
4205
- * @param {*} [options] Override http request option.
4206
- * @throws {RequiredError}
4207
- * @memberof LoginIdentityApiInterface
4208
- */
4209
- getStatementLink(statementId: string, options?: AxiosRequestConfig): AxiosPromise<GetStatementLinkResponse>;
4210
4243
  /**
4211
4244
  * Get list of available statements
4212
4245
  * @param {*} [options] Override http request option.
@@ -4332,14 +4365,6 @@ export declare class LoginIdentityApi extends BaseAPI implements LoginIdentityAp
4332
4365
  * @memberof LoginIdentityApi
4333
4366
  */
4334
4367
  getStatement(statementId: string, redirect?: boolean, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetStatementLinkResponse>>;
4335
- /**
4336
- * (Deprecated) Get statement link for download
4337
- * @param {string} statementId The statement id
4338
- * @param {*} [options] Override http request option.
4339
- * @throws {RequiredError}
4340
- * @memberof LoginIdentityApi
4341
- */
4342
- getStatementLink(statementId: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetStatementLinkResponse>>;
4343
4368
  /**
4344
4369
  * Get list of available statements
4345
4370
  * @param {*} [options] Override http request option.
@@ -4404,6 +4429,12 @@ export declare const PublicApiAxiosParamCreator: (configuration?: Configuration)
4404
4429
  * @throws {RequiredError}
4405
4430
  */
4406
4431
  generateCustomerAccessToken: (tokenRequest?: TokenRequest, options?: AxiosRequestConfig) => Promise<RequestArgs>;
4432
+ /**
4433
+ * get payment jwks
4434
+ * @param {*} [options] Override http request option.
4435
+ * @throws {RequiredError}
4436
+ */
4437
+ getPaymentsJwks: (options?: AxiosRequestConfig) => Promise<RequestArgs>;
4407
4438
  };
4408
4439
  /**
4409
4440
  * PublicApi - functional programming interface
@@ -4428,6 +4459,12 @@ export declare const PublicApiFp: (configuration?: Configuration) => {
4428
4459
  * @throws {RequiredError}
4429
4460
  */
4430
4461
  generateCustomerAccessToken(tokenRequest?: TokenRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<TokenResponse>>;
4462
+ /**
4463
+ * get payment jwks
4464
+ * @param {*} [options] Override http request option.
4465
+ * @throws {RequiredError}
4466
+ */
4467
+ getPaymentsJwks(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GetJWKSResponse>>;
4431
4468
  };
4432
4469
  /**
4433
4470
  * PublicApi - factory interface
@@ -4452,6 +4489,12 @@ export declare const PublicApiFactory: (configuration?: Configuration, basePath?
4452
4489
  * @throws {RequiredError}
4453
4490
  */
4454
4491
  generateCustomerAccessToken(tokenRequest?: TokenRequest, options?: any): AxiosPromise<TokenResponse>;
4492
+ /**
4493
+ * get payment jwks
4494
+ * @param {*} [options] Override http request option.
4495
+ * @throws {RequiredError}
4496
+ */
4497
+ getPaymentsJwks(options?: any): AxiosPromise<GetJWKSResponse>;
4455
4498
  };
4456
4499
  /**
4457
4500
  * PublicApi - interface
@@ -4479,6 +4522,13 @@ export interface PublicApiInterface {
4479
4522
  * @memberof PublicApiInterface
4480
4523
  */
4481
4524
  generateCustomerAccessToken(tokenRequest?: TokenRequest, options?: AxiosRequestConfig): AxiosPromise<TokenResponse>;
4525
+ /**
4526
+ * get payment jwks
4527
+ * @param {*} [options] Override http request option.
4528
+ * @throws {RequiredError}
4529
+ * @memberof PublicApiInterface
4530
+ */
4531
+ getPaymentsJwks(options?: AxiosRequestConfig): AxiosPromise<GetJWKSResponse>;
4482
4532
  }
4483
4533
  /**
4484
4534
  * PublicApi - object-oriented interface
@@ -4507,4 +4557,11 @@ export declare class PublicApi extends BaseAPI implements PublicApiInterface {
4507
4557
  * @memberof PublicApi
4508
4558
  */
4509
4559
  generateCustomerAccessToken(tokenRequest?: TokenRequest, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<TokenResponse>>;
4560
+ /**
4561
+ * get payment jwks
4562
+ * @param {*} [options] Override http request option.
4563
+ * @throws {RequiredError}
4564
+ * @memberof PublicApi
4565
+ */
4566
+ getPaymentsJwks(options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<GetJWKSResponse>>;
4510
4567
  }
package/dist/api.js CHANGED
@@ -1638,36 +1638,6 @@ exports.LoginIdentityApiAxiosParamCreator = function (configuration) {
1638
1638
  options: localVarRequestOptions,
1639
1639
  };
1640
1640
  }),
1641
- /**
1642
- * (Deprecated) Get statement link for download
1643
- * @param {string} statementId The statement id
1644
- * @param {*} [options] Override http request option.
1645
- * @throws {RequiredError}
1646
- */
1647
- getStatementLink: (statementId, options = {}) => __awaiter(this, void 0, void 0, function* () {
1648
- // verify required parameter 'statementId' is not null or undefined
1649
- common_1.assertParamExists('getStatementLink', 'statementId', statementId);
1650
- const localVarPath = `/statement_links/{statementId}`.replace(`{${'statementId'}}`, encodeURIComponent(String(statementId)));
1651
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1652
- const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
1653
- let baseOptions;
1654
- if (configuration) {
1655
- baseOptions = configuration.baseOptions;
1656
- }
1657
- const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
1658
- const localVarHeaderParameter = {};
1659
- const localVarQueryParameter = {};
1660
- // authentication Oauth2 required
1661
- // oauth required
1662
- yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', [], configuration);
1663
- common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
1664
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1665
- localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
1666
- return {
1667
- url: common_1.toPathString(localVarUrlObj),
1668
- options: localVarRequestOptions,
1669
- };
1670
- }),
1671
1641
  /**
1672
1642
  * Get list of available statements
1673
1643
  * @param {*} [options] Override http request option.
@@ -1948,18 +1918,6 @@ exports.LoginIdentityApiFp = function (configuration) {
1948
1918
  return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1949
1919
  });
1950
1920
  },
1951
- /**
1952
- * (Deprecated) Get statement link for download
1953
- * @param {string} statementId The statement id
1954
- * @param {*} [options] Override http request option.
1955
- * @throws {RequiredError}
1956
- */
1957
- getStatementLink(statementId, options) {
1958
- return __awaiter(this, void 0, void 0, function* () {
1959
- const localVarAxiosArgs = yield localVarAxiosParamCreator.getStatementLink(statementId, options);
1960
- return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
1961
- });
1962
- },
1963
1921
  /**
1964
1922
  * Get list of available statements
1965
1923
  * @param {*} [options] Override http request option.
@@ -2116,15 +2074,6 @@ exports.LoginIdentityApiFactory = function (configuration, basePath, axios) {
2116
2074
  getStatement(statementId, redirect, options) {
2117
2075
  return localVarFp.getStatement(statementId, redirect, options).then((request) => request(axios, basePath));
2118
2076
  },
2119
- /**
2120
- * (Deprecated) Get statement link for download
2121
- * @param {string} statementId The statement id
2122
- * @param {*} [options] Override http request option.
2123
- * @throws {RequiredError}
2124
- */
2125
- getStatementLink(statementId, options) {
2126
- return localVarFp.getStatementLink(statementId, options).then((request) => request(axios, basePath));
2127
- },
2128
2077
  /**
2129
2078
  * Get list of available statements
2130
2079
  * @param {*} [options] Override http request option.
@@ -2300,18 +2249,6 @@ class LoginIdentityApi extends base_1.BaseAPI {
2300
2249
  .getStatement(statementId, redirect, options)
2301
2250
  .then((request) => request(this.axios, this.basePath));
2302
2251
  }
2303
- /**
2304
- * (Deprecated) Get statement link for download
2305
- * @param {string} statementId The statement id
2306
- * @param {*} [options] Override http request option.
2307
- * @throws {RequiredError}
2308
- * @memberof LoginIdentityApi
2309
- */
2310
- getStatementLink(statementId, options) {
2311
- return exports.LoginIdentityApiFp(this.configuration)
2312
- .getStatementLink(statementId, options)
2313
- .then((request) => request(this.axios, this.basePath));
2314
- }
2315
2252
  /**
2316
2253
  * Get list of available statements
2317
2254
  * @param {*} [options] Override http request option.
@@ -2459,6 +2396,33 @@ exports.PublicApiAxiosParamCreator = function (configuration) {
2459
2396
  options: localVarRequestOptions,
2460
2397
  };
2461
2398
  }),
2399
+ /**
2400
+ * get payment jwks
2401
+ * @param {*} [options] Override http request option.
2402
+ * @throws {RequiredError}
2403
+ */
2404
+ getPaymentsJwks: (options = {}) => __awaiter(this, void 0, void 0, function* () {
2405
+ const localVarPath = `/payments/jwks`;
2406
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2407
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
2408
+ let baseOptions;
2409
+ if (configuration) {
2410
+ baseOptions = configuration.baseOptions;
2411
+ }
2412
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
2413
+ const localVarHeaderParameter = {};
2414
+ const localVarQueryParameter = {};
2415
+ // authentication Oauth2 required
2416
+ // oauth required
2417
+ yield common_1.setOAuthToObject(localVarHeaderParameter, 'Oauth2', ['test'], configuration);
2418
+ common_1.setSearchParams(localVarUrlObj, localVarQueryParameter);
2419
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2420
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
2421
+ return {
2422
+ url: common_1.toPathString(localVarUrlObj),
2423
+ options: localVarRequestOptions,
2424
+ };
2425
+ }),
2462
2426
  };
2463
2427
  };
2464
2428
  /**
@@ -2496,6 +2460,17 @@ exports.PublicApiFp = function (configuration) {
2496
2460
  return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
2497
2461
  });
2498
2462
  },
2463
+ /**
2464
+ * get payment jwks
2465
+ * @param {*} [options] Override http request option.
2466
+ * @throws {RequiredError}
2467
+ */
2468
+ getPaymentsJwks(options) {
2469
+ return __awaiter(this, void 0, void 0, function* () {
2470
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getPaymentsJwks(options);
2471
+ return common_1.createRequestFunction(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
2472
+ });
2473
+ },
2499
2474
  };
2500
2475
  };
2501
2476
  /**
@@ -2529,6 +2504,14 @@ exports.PublicApiFactory = function (configuration, basePath, axios) {
2529
2504
  generateCustomerAccessToken(tokenRequest, options) {
2530
2505
  return localVarFp.generateCustomerAccessToken(tokenRequest, options).then((request) => request(axios, basePath));
2531
2506
  },
2507
+ /**
2508
+ * get payment jwks
2509
+ * @param {*} [options] Override http request option.
2510
+ * @throws {RequiredError}
2511
+ */
2512
+ getPaymentsJwks(options) {
2513
+ return localVarFp.getPaymentsJwks(options).then((request) => request(axios, basePath));
2514
+ },
2532
2515
  };
2533
2516
  };
2534
2517
  /**
@@ -2566,5 +2549,16 @@ class PublicApi extends base_1.BaseAPI {
2566
2549
  .generateCustomerAccessToken(tokenRequest, options)
2567
2550
  .then((request) => request(this.axios, this.basePath));
2568
2551
  }
2552
+ /**
2553
+ * get payment jwks
2554
+ * @param {*} [options] Override http request option.
2555
+ * @throws {RequiredError}
2556
+ * @memberof PublicApi
2557
+ */
2558
+ getPaymentsJwks(options) {
2559
+ return exports.PublicApiFp(this.configuration)
2560
+ .getPaymentsJwks(options)
2561
+ .then((request) => request(this.axios, this.basePath));
2562
+ }
2569
2563
  }
2570
2564
  exports.PublicApi = PublicApi;
@@ -1,2 +1,3 @@
1
1
  import { GetStatementsResponse } from '../../api';
2
2
  export declare function getStatements(): GetStatementsResponse;
3
+ export declare function getStatementAsBuffer(): ArrayBuffer;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getStatements = void 0;
3
+ exports.getStatementAsBuffer = exports.getStatements = void 0;
4
4
  const account_1 = require("./account");
5
5
  function getStatements() {
6
6
  const accountData = account_1.getAccounts();
@@ -18,3 +18,7 @@ function getStatements() {
18
18
  };
19
19
  }
20
20
  exports.getStatements = getStatements;
21
+ function getStatementAsBuffer() {
22
+ return new TextEncoder().encode("this is statement");
23
+ }
24
+ exports.getStatementAsBuffer = getStatementAsBuffer;
@@ -16,7 +16,6 @@ const __1 = require("..");
16
16
  const api_1 = require("../api");
17
17
  const loginIdentityToken_1 = require("./responses/loginIdentityToken");
18
18
  const statement_1 = require("./responses/statement");
19
- const statementLink_1 = require("./responses/statementLink");
20
19
  const chai_1 = require("chai");
21
20
  describe('Statements', function () {
22
21
  let mock;
@@ -33,9 +32,9 @@ describe('Statements', function () {
33
32
  // Get link to statement
34
33
  // Assuming there is only one statement
35
34
  const statementId = gotStatements.data.statements[0].id;
36
- mock.onGet(`${config_1.config.apiHost}/statement_links/${statementId}`).reply(200, statementLink_1.getStatementLinkByStatementId());
37
- const gotStatementLink = yield new api_1.LoginIdentityApi(configuration).getStatementLink(statementId);
38
- chai_1.expect(gotStatementLink.data.statement_links).to.be.ok;
35
+ mock.onGet(`${config_1.config.apiHost}/statements/${statementId}`).reply(200, statement_1.getStatementAsBuffer());
36
+ const gotStatementLink = yield new api_1.LoginIdentityApi(configuration).getStatement(statementId);
37
+ chai_1.expect(gotStatementLink.data).to.be.ok;
39
38
  });
40
39
  });
41
40
  after(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finverse/sdk-typescript",
3
- "version": "0.0.44",
3
+ "version": "0.0.47",
4
4
  "description": "OpenAPI client for @finverse/sdk-typescript",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "keywords": [
@@ -27,7 +27,7 @@
27
27
  "axios-mock-adapter": "^1.21.1",
28
28
  "chai": "^4.3.6",
29
29
  "mocha": "^10.0.0",
30
- "ts-node": "^10.8.1",
30
+ "ts-node": "^10.9.1",
31
31
  "typescript": "^3.6.4"
32
32
  },
33
33
  "files": [
@@ -1,2 +0,0 @@
1
- import { GetStatementLinkResponse } from '../../api';
2
- export declare function getStatementLinkByStatementId(): GetStatementLinkResponse;
@@ -1,15 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getStatementLinkByStatementId = void 0;
4
- function getStatementLinkByStatementId() {
5
- return {
6
- statement_links: [
7
- {
8
- url: 'dummyUrl',
9
- statement_id: '01F11PRDNQQV3HE6K57BVPEH09',
10
- expiry: 'time',
11
- },
12
- ],
13
- };
14
- }
15
- exports.getStatementLinkByStatementId = getStatementLinkByStatementId;