@finverse/sdk-typescript 0.0.288 → 0.0.289

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/base.d.ts CHANGED
@@ -9,8 +9,8 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { Configuration } from './configuration';
13
- import { AxiosInstance, AxiosRequestConfig } from 'axios';
12
+ import type { Configuration } from './configuration';
13
+ import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
14
  export declare const BASE_PATH: string;
15
15
  /**
16
16
  *
@@ -29,7 +29,7 @@ export declare const COLLECTION_FORMATS: {
29
29
  */
30
30
  export interface RequestArgs {
31
31
  url: string;
32
- options: AxiosRequestConfig;
32
+ options: RawAxiosRequestConfig;
33
33
  }
34
34
  /**
35
35
  *
@@ -50,6 +50,17 @@ export declare class BaseAPI {
50
50
  */
51
51
  export declare class RequiredError extends Error {
52
52
  field: string;
53
- name: 'RequiredError';
54
53
  constructor(field: string, msg?: string);
55
54
  }
55
+ interface ServerMap {
56
+ [key: string]: {
57
+ url: string;
58
+ description: string;
59
+ }[];
60
+ }
61
+ /**
62
+ *
63
+ * @export
64
+ */
65
+ export declare const operationServerMap: ServerMap;
66
+ export {};
package/dist/base.js CHANGED
@@ -13,9 +13,7 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
17
- // Some imports not used depending on template conditions
18
- // @ts-ignore
16
+ exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
19
17
  const axios_1 = require("axios");
20
18
  exports.BASE_PATH = 'https://api.sandbox.finverse.net'.replace(/\/+$/, '');
21
19
  /**
@@ -35,11 +33,12 @@ exports.COLLECTION_FORMATS = {
35
33
  */
36
34
  class BaseAPI {
37
35
  constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
36
+ var _a;
38
37
  this.basePath = basePath;
39
38
  this.axios = axios;
40
39
  if (configuration) {
41
40
  this.configuration = configuration;
42
- this.basePath = configuration.basePath || this.basePath;
41
+ this.basePath = (_a = configuration.basePath) !== null && _a !== void 0 ? _a : basePath;
43
42
  }
44
43
  }
45
44
  }
@@ -58,3 +57,8 @@ class RequiredError extends Error {
58
57
  }
59
58
  }
60
59
  exports.RequiredError = RequiredError;
60
+ /**
61
+ *
62
+ * @export
63
+ */
64
+ exports.operationServerMap = {};
package/dist/common.d.ts CHANGED
@@ -9,9 +9,9 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { Configuration } from './configuration';
13
- import { RequestArgs } from './base';
14
- import { AxiosInstance, AxiosResponse } from 'axios';
12
+ import type { Configuration } from './configuration';
13
+ import type { RequestArgs } from './base';
14
+ import type { AxiosInstance, AxiosResponse } from 'axios';
15
15
  /**
16
16
  *
17
17
  * @export
package/dist/common.js CHANGED
@@ -34,16 +34,17 @@ exports.DUMMY_BASE_URL = 'https://example.com';
34
34
  * @throws {RequiredError}
35
35
  * @export
36
36
  */
37
- exports.assertParamExists = function (functionName, paramName, paramValue) {
37
+ const assertParamExists = function (functionName, paramName, paramValue) {
38
38
  if (paramValue === null || paramValue === undefined) {
39
39
  throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
40
40
  }
41
41
  };
42
+ exports.assertParamExists = assertParamExists;
42
43
  /**
43
44
  *
44
45
  * @export
45
46
  */
46
- exports.setApiKeyToObject = function (object, keyParamName, configuration) {
47
+ const setApiKeyToObject = function (object, keyParamName, configuration) {
47
48
  return __awaiter(this, void 0, void 0, function* () {
48
49
  if (configuration && configuration.apiKey) {
49
50
  const localVarApiKeyValue = typeof configuration.apiKey === 'function'
@@ -53,20 +54,22 @@ exports.setApiKeyToObject = function (object, keyParamName, configuration) {
53
54
  }
54
55
  });
55
56
  };
57
+ exports.setApiKeyToObject = setApiKeyToObject;
56
58
  /**
57
59
  *
58
60
  * @export
59
61
  */
60
- exports.setBasicAuthToObject = function (object, configuration) {
62
+ const setBasicAuthToObject = function (object, configuration) {
61
63
  if (configuration && (configuration.username || configuration.password)) {
62
64
  object['auth'] = { username: configuration.username, password: configuration.password };
63
65
  }
64
66
  };
67
+ exports.setBasicAuthToObject = setBasicAuthToObject;
65
68
  /**
66
69
  *
67
70
  * @export
68
71
  */
69
- exports.setBearerAuthToObject = function (object, configuration) {
72
+ const setBearerAuthToObject = function (object, configuration) {
70
73
  return __awaiter(this, void 0, void 0, function* () {
71
74
  if (configuration && configuration.accessToken) {
72
75
  const accessToken = typeof configuration.accessToken === 'function'
@@ -76,11 +79,12 @@ exports.setBearerAuthToObject = function (object, configuration) {
76
79
  }
77
80
  });
78
81
  };
82
+ exports.setBearerAuthToObject = setBearerAuthToObject;
79
83
  /**
80
84
  *
81
85
  * @export
82
86
  */
83
- exports.setOAuthToObject = function (object, name, scopes, configuration) {
87
+ const setOAuthToObject = function (object, name, scopes, configuration) {
84
88
  return __awaiter(this, void 0, void 0, function* () {
85
89
  if (configuration && configuration.accessToken) {
86
90
  const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
@@ -90,52 +94,66 @@ exports.setOAuthToObject = function (object, name, scopes, configuration) {
90
94
  }
91
95
  });
92
96
  };
97
+ exports.setOAuthToObject = setOAuthToObject;
98
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = '') {
99
+ if (parameter == null)
100
+ return;
101
+ if (typeof parameter === 'object') {
102
+ if (Array.isArray(parameter)) {
103
+ parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
104
+ }
105
+ else {
106
+ Object.keys(parameter).forEach((currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
107
+ }
108
+ }
109
+ else {
110
+ if (urlSearchParams.has(key)) {
111
+ urlSearchParams.append(key, parameter);
112
+ }
113
+ else {
114
+ urlSearchParams.set(key, parameter);
115
+ }
116
+ }
117
+ }
93
118
  /**
94
119
  *
95
120
  * @export
96
121
  */
97
- exports.setSearchParams = function (url, ...objects) {
122
+ const setSearchParams = function (url, ...objects) {
98
123
  const searchParams = new URLSearchParams(url.search);
99
- for (const object of objects) {
100
- for (const key in object) {
101
- if (Array.isArray(object[key])) {
102
- searchParams.delete(key);
103
- for (const item of object[key]) {
104
- searchParams.append(key, item);
105
- }
106
- }
107
- else {
108
- searchParams.set(key, object[key]);
109
- }
110
- }
111
- }
124
+ setFlattenedQueryParams(searchParams, objects);
112
125
  url.search = searchParams.toString();
113
126
  };
127
+ exports.setSearchParams = setSearchParams;
114
128
  /**
115
129
  *
116
130
  * @export
117
131
  */
118
- exports.serializeDataIfNeeded = function (value, requestOptions, configuration) {
132
+ const serializeDataIfNeeded = function (value, requestOptions, configuration) {
119
133
  const nonString = typeof value !== 'string';
120
134
  const needsSerialization = nonString && configuration && configuration.isJsonMime
121
135
  ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
122
136
  : nonString;
123
137
  return needsSerialization ? JSON.stringify(value !== undefined ? value : {}) : value || '';
124
138
  };
139
+ exports.serializeDataIfNeeded = serializeDataIfNeeded;
125
140
  /**
126
141
  *
127
142
  * @export
128
143
  */
129
- exports.toPathString = function (url) {
144
+ const toPathString = function (url) {
130
145
  return url.pathname + url.search + url.hash;
131
146
  };
147
+ exports.toPathString = toPathString;
132
148
  /**
133
149
  *
134
150
  * @export
135
151
  */
136
- exports.createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
152
+ const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
137
153
  return (axios = globalAxios, basePath = BASE_PATH) => {
138
- const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: ((configuration === null || configuration === void 0 ? void 0 : configuration.basePath) || basePath) + axiosArgs.url });
154
+ var _a;
155
+ const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: (axios.defaults.baseURL ? '' : ((_a = configuration === null || configuration === void 0 ? void 0 : configuration.basePath) !== null && _a !== void 0 ? _a : basePath)) + axiosArgs.url });
139
156
  return axios.request(axiosRequestArgs);
140
157
  };
141
158
  };
159
+ exports.createRequestFunction = createRequestFunction;
@@ -15,6 +15,7 @@ export interface ConfigurationParameters {
15
15
  password?: string;
16
16
  accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
17
17
  basePath?: string;
18
+ serverIndex?: number;
18
19
  baseOptions?: any;
19
20
  formDataCtor?: new () => any;
20
21
  }
@@ -53,6 +54,13 @@ export declare class Configuration {
53
54
  * @memberof Configuration
54
55
  */
55
56
  basePath?: string;
57
+ /**
58
+ * override server index
59
+ *
60
+ * @type {number}
61
+ * @memberof Configuration
62
+ */
63
+ serverIndex?: number;
56
64
  /**
57
65
  * base options for axios calls
58
66
  *
@@ -16,12 +16,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.Configuration = void 0;
17
17
  class Configuration {
18
18
  constructor(param = {}) {
19
+ var _a;
19
20
  this.apiKey = param.apiKey;
20
21
  this.username = param.username;
21
22
  this.password = param.password;
22
23
  this.accessToken = param.accessToken;
23
24
  this.basePath = param.basePath;
24
- this.baseOptions = param.baseOptions;
25
+ this.serverIndex = param.serverIndex;
26
+ this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
25
27
  this.formDataCtor = param.formDataCtor;
26
28
  }
27
29
  /**
package/dist/index.js CHANGED
@@ -14,13 +14,17 @@
14
14
  */
15
15
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
16
  if (k2 === undefined) k2 = k;
17
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
18
22
  }) : (function(o, m, k, k2) {
19
23
  if (k2 === undefined) k2 = k;
20
24
  o[k2] = m[k];
21
25
  }));
22
26
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
23
- for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);
27
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
24
28
  };
25
29
  Object.defineProperty(exports, "__esModule", { value: true });
26
30
  __exportStar(require("./api"), exports);
@@ -21,7 +21,7 @@ describe('Accounts', function () {
21
21
  let mock;
22
22
  before(() => {
23
23
  mock = new axios_mock_adapter_1.default(axios_1.default);
24
- mock.onGet(`${config_1.config.apiHost}/accounts`).reply(200, account_1.getAccounts());
24
+ mock.onGet(`${config_1.config.apiHost}/accounts`).reply(200, (0, account_1.getAccounts)());
25
25
  });
26
26
  it('Get accounts', function () {
27
27
  return __awaiter(this, void 0, void 0, function* () {
@@ -29,7 +29,7 @@ describe('Accounts', function () {
29
29
  const configuration = new __1.Configuration({ basePath: config_1.config.apiHost, accessToken: loginIdentityToken_1.loginIdentityToken.access_token });
30
30
  const got = yield new api_1.LoginIdentityApi(configuration).listAccounts();
31
31
  // Expect
32
- chai_1.expect(got.data.accounts).to.be.ok;
32
+ (0, chai_1.expect)(got.data.accounts).to.be.ok;
33
33
  });
34
34
  });
35
35
  after(() => {
@@ -37,7 +37,7 @@ describe('Authenticate', function () {
37
37
  grant_type: config_1.grantType.CLIENT_CREDENTIALS,
38
38
  });
39
39
  // Expect
40
- chai_1.expect(got.data.access_token).to.equal(customerToken_1.customerToken.access_token);
40
+ (0, chai_1.expect)(got.data.access_token).to.equal(customerToken_1.customerToken.access_token);
41
41
  });
42
42
  });
43
43
  after(() => {
@@ -30,9 +30,9 @@ describe('Link', function () {
30
30
  const requestBody = {
31
31
  client_id: config_1.config.clientId,
32
32
  grant_type: config_1.grantType.CLIENT_CREDENTIALS,
33
- user_id: 'userId',
33
+ user_id: 'userId', // Reference back to your system userId, finverse does not use this
34
34
  redirect_uri: config_1.config.redirectURI,
35
- state: 'state',
35
+ state: 'state', // This will be sent in the redirectUri callback, can be used to identify the state
36
36
  response_mode: 'form_post',
37
37
  response_type: 'code',
38
38
  link_mode: 'iframe',
@@ -45,7 +45,7 @@ describe('Link', function () {
45
45
  // Expect
46
46
  // The link url is used to initialize Finverse Link, when linking is finished, a cose is sent to the redirectUri
47
47
  // This is used to exchange for loginIdentity Token
48
- chai_1.expect(got.data.link_url).to.equal(linkToken_1.linkToken.link_url);
48
+ (0, chai_1.expect)(got.data.link_url).to.equal(linkToken_1.linkToken.link_url);
49
49
  });
50
50
  });
51
51
  it('Obtain login identity token', function () {
@@ -63,10 +63,10 @@ describe('Link', function () {
63
63
  mock.onPost(url, requestBody.toString()).reply(200, loginIdentityToken_1.loginIdentityToken);
64
64
  // Make Request
65
65
  const configuration = new __1.Configuration({ basePath: config_1.config.apiHost, accessToken: customerToken_1.customerToken.access_token });
66
- const got = yield new api_1.LinkApi(configuration).token(config_1.grantType.AUTHORIZATION_CODE, 'obtainAfterLink', config_1.config.clientId, config_1.config.redirectURI);
66
+ const got = yield new api_1.LinkApi(configuration).token(api_1.TokenGrantTypeEnum.AuthorizationCode, 'obtainAfterLink', config_1.config.clientId, config_1.config.redirectURI);
67
67
  // Expect
68
68
  // The loginIdentityToken can be used to retrieve data
69
- chai_1.expect(got.data.access_token).to.equal(loginIdentityToken_1.loginIdentityToken.access_token);
69
+ (0, chai_1.expect)(got.data.access_token).to.equal(loginIdentityToken_1.loginIdentityToken.access_token);
70
70
  });
71
71
  });
72
72
  afterEach(() => {
@@ -27,7 +27,7 @@ describe('Login Identity', function () {
27
27
  let mock;
28
28
  beforeEach(() => {
29
29
  mock = new axios_mock_adapter_1.default(axios_1.default);
30
- mock.onGet(`${config_1.config.apiHost}/login_identity`).reply(200, loginIdentity_1.getLoginIdentity());
30
+ mock.onGet(`${config_1.config.apiHost}/login_identity`).reply(200, (0, loginIdentity_1.getLoginIdentity)());
31
31
  });
32
32
  it('Obtain login identity', function () {
33
33
  return __awaiter(this, void 0, void 0, function* () {
@@ -36,9 +36,9 @@ describe('Login Identity', function () {
36
36
  const got = yield new api_1.LoginIdentityApi(configuration).getLoginIdentity();
37
37
  // Expect
38
38
  // This is the institution information
39
- chai_1.expect(got.data.institution).to.be.ok;
39
+ (0, chai_1.expect)(got.data.institution).to.be.ok;
40
40
  // This is the login identity events
41
- chai_1.expect(got.data.login_identity).to.be.ok;
41
+ (0, chai_1.expect)(got.data.login_identity).to.be.ok;
42
42
  });
43
43
  });
44
44
  it('Poll login identity until ready', function () {
@@ -58,9 +58,9 @@ describe('Login Identity', function () {
58
58
  }
59
59
  // Expect
60
60
  // This is the institution information
61
- chai_1.expect(got.data.institution).to.be.ok;
61
+ (0, chai_1.expect)(got.data.institution).to.be.ok;
62
62
  // This is the login identity events
63
- chai_1.expect(got.data.login_identity).to.be.ok;
63
+ (0, chai_1.expect)(got.data.login_identity).to.be.ok;
64
64
  });
65
65
  });
66
66
  afterEach(() => {
@@ -24,7 +24,7 @@ describe('PaymentInstruction', function () {
24
24
  });
25
25
  it('Create paymentInstruction', function () {
26
26
  return __awaiter(this, void 0, void 0, function* () {
27
- mock.onPost(`${config_1.config.apiHost}/payments/instruction`).reply(200, paymentInstruction_1.createPaymentInstruction());
27
+ mock.onPost(`${config_1.config.apiHost}/payments/instruction`).reply(200, (0, paymentInstruction_1.createPaymentInstruction)());
28
28
  const configuration = new __1.Configuration({ basePath: config_1.config.apiHost, accessToken: customerToken_1.customerToken.access_token });
29
29
  const paymentInstruction = {
30
30
  type: "DEBIT_AUTHORIZATION",
@@ -41,15 +41,15 @@ describe('PaymentInstruction', function () {
41
41
  remarks: "HOME CREDIT REPAYMENT"
42
42
  };
43
43
  const createPaymentInstructionResponse = yield new api_1.CustomerApi(configuration).createPaymentInstruction(paymentInstruction);
44
- chai_1.expect(createPaymentInstructionResponse.data.payment_instruction_id).to.be.ok;
44
+ (0, chai_1.expect)(createPaymentInstructionResponse.data.payment_instruction_id).to.be.ok;
45
45
  });
46
46
  });
47
47
  it('Get paymentInstruction', function () {
48
48
  return __awaiter(this, void 0, void 0, function* () {
49
- mock.onGet(`${config_1.config.apiHost}/payments/instruction/stub_payment_instruction_id`).reply(200, paymentInstruction_1.getPaymentInstruction());
49
+ mock.onGet(`${config_1.config.apiHost}/payments/instruction/stub_payment_instruction_id`).reply(200, (0, paymentInstruction_1.getPaymentInstruction)());
50
50
  const configuration = new __1.Configuration({ basePath: config_1.config.apiHost, accessToken: customerToken_1.customerToken.access_token });
51
51
  const getPaymentInstructionResponse = yield new api_1.CustomerApi(configuration).getPaymentInstruction("stub_payment_instruction_id");
52
- chai_1.expect(getPaymentInstructionResponse.data.payment_instruction).to.be.ok;
52
+ (0, chai_1.expect)(getPaymentInstructionResponse.data.payment_instruction).to.be.ok;
53
53
  });
54
54
  });
55
55
  after(() => {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAccounts = void 0;
3
+ exports.getAccounts = getAccounts;
4
4
  function getAccounts() {
5
5
  return {
6
6
  accounts: [
@@ -105,4 +105,3 @@ function getAccounts() {
105
105
  },
106
106
  };
107
107
  }
108
- exports.getAccounts = getAccounts;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getAccountNumber = void 0;
3
+ exports.getAccountNumber = getAccountNumber;
4
4
  const account_1 = require("./account");
5
5
  function getAccountNumber() {
6
6
  var _a;
7
- const accountData = account_1.getAccounts();
7
+ const accountData = (0, account_1.getAccounts)();
8
8
  return {
9
9
  account: (_a = accountData === null || accountData === void 0 ? void 0 : accountData.accounts) === null || _a === void 0 ? void 0 : _a[0],
10
10
  account_number: {
@@ -16,4 +16,3 @@ function getAccountNumber() {
16
16
  login_identity: accountData.login_identity,
17
17
  };
18
18
  }
19
- exports.getAccountNumber = getAccountNumber;
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getBalanceHistory = void 0;
3
+ exports.getBalanceHistory = getBalanceHistory;
4
4
  const account_1 = require("./account");
5
5
  function getBalanceHistory() {
6
6
  var _a;
7
- const accountData = account_1.getAccounts();
7
+ const accountData = (0, account_1.getAccounts)();
8
8
  return {
9
9
  account: (_a = accountData === null || accountData === void 0 ? void 0 : accountData.accounts) === null || _a === void 0 ? void 0 : _a[0],
10
10
  balance_history: [
@@ -18,4 +18,3 @@ function getBalanceHistory() {
18
18
  login_identity: accountData.login_identity,
19
19
  };
20
20
  }
21
- exports.getBalanceHistory = getBalanceHistory;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getIdentity = void 0;
3
+ exports.getIdentity = getIdentity;
4
4
  const account_1 = require("./account");
5
5
  function getIdentity() {
6
- const accountData = account_1.getAccounts();
6
+ const accountData = (0, account_1.getAccounts)();
7
7
  return {
8
8
  identity: {
9
9
  addresses: [
@@ -51,4 +51,3 @@ function getIdentity() {
51
51
  login_identity: accountData.login_identity,
52
52
  };
53
53
  }
54
- exports.getIdentity = getIdentity;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getLoginIdentity = void 0;
3
+ exports.getLoginIdentity = getLoginIdentity;
4
4
  function getLoginIdentity() {
5
5
  return {
6
6
  institution: {
@@ -82,4 +82,3 @@ function getLoginIdentity() {
82
82
  },
83
83
  };
84
84
  }
85
- exports.getLoginIdentity = getLoginIdentity;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getLoginIdentityHistory = void 0;
3
+ exports.getLoginIdentityHistory = getLoginIdentityHistory;
4
4
  function getLoginIdentityHistory() {
5
5
  return {
6
6
  login_identity: {
@@ -34,4 +34,3 @@ function getLoginIdentityHistory() {
34
34
  ],
35
35
  };
36
36
  }
37
- exports.getLoginIdentityHistory = getLoginIdentityHistory;
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getPaymentInstruction = exports.createPaymentInstruction = void 0;
3
+ exports.createPaymentInstruction = createPaymentInstruction;
4
+ exports.getPaymentInstruction = getPaymentInstruction;
4
5
  function createPaymentInstruction() {
5
6
  return {
6
7
  payment_instruction_id: "01FYRK0Q1DVFTJRG50J5QT424Y",
7
8
  };
8
9
  }
9
- exports.createPaymentInstruction = createPaymentInstruction;
10
10
  function getPaymentInstruction() {
11
11
  return {
12
12
  payment_instruction: {
@@ -27,4 +27,3 @@ function getPaymentInstruction() {
27
27
  }
28
28
  };
29
29
  }
30
- exports.getPaymentInstruction = getPaymentInstruction;
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getStatementAsBuffer = exports.getStatements = void 0;
3
+ exports.getStatements = getStatements;
4
+ exports.getStatementAsBuffer = getStatementAsBuffer;
4
5
  const account_1 = require("./account");
5
6
  function getStatements() {
6
- const accountData = account_1.getAccounts();
7
+ const accountData = (0, account_1.getAccounts)();
7
8
  return {
8
9
  statements: [
9
10
  {
@@ -17,8 +18,6 @@ function getStatements() {
17
18
  login_identity: accountData.login_identity,
18
19
  };
19
20
  }
20
- exports.getStatements = getStatements;
21
21
  function getStatementAsBuffer() {
22
22
  return new TextEncoder().encode("this is statement");
23
23
  }
24
- exports.getStatementAsBuffer = getStatementAsBuffer;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTransactions = void 0;
3
+ exports.getTransactions = getTransactions;
4
4
  const account_1 = require("./account");
5
5
  function getTransactions() {
6
- const accountData = account_1.getAccounts();
6
+ const accountData = (0, account_1.getAccounts)();
7
7
  return Object.assign(Object.assign({}, accountData), { total_transactions: 18, transactions: [
8
8
  {
9
9
  account_id: '01FRSAGG1AZ1Z48EQSJ1D16M5V',
@@ -259,4 +259,3 @@ function getTransactions() {
259
259
  },
260
260
  ] });
261
261
  }
262
- exports.getTransactions = getTransactions;
@@ -25,16 +25,16 @@ describe('Statements', function () {
25
25
  it('Get statements', function () {
26
26
  return __awaiter(this, void 0, void 0, function* () {
27
27
  // Get all statements
28
- mock.onGet(`${config_1.config.apiHost}/statements`).reply(200, statement_1.getStatements());
28
+ mock.onGet(`${config_1.config.apiHost}/statements`).reply(200, (0, statement_1.getStatements)());
29
29
  const configuration = new __1.Configuration({ basePath: config_1.config.apiHost, accessToken: loginIdentityToken_1.loginIdentityToken.access_token });
30
30
  const gotStatements = yield new api_1.LoginIdentityApi(configuration).getStatements();
31
- chai_1.expect(gotStatements.data.statements).to.be.ok;
31
+ (0, chai_1.expect)(gotStatements.data.statements).to.be.ok;
32
32
  // Get link to statement
33
33
  // Assuming there is only one statement
34
34
  const statementId = gotStatements.data.statements[0].id;
35
- mock.onGet(`${config_1.config.apiHost}/statements/${statementId}`).reply(200, statement_1.getStatementAsBuffer());
35
+ mock.onGet(`${config_1.config.apiHost}/statements/${statementId}`).reply(200, (0, statement_1.getStatementAsBuffer)());
36
36
  const gotStatementLink = yield new api_1.LoginIdentityApi(configuration).getStatement(statementId);
37
- chai_1.expect(gotStatementLink.data).to.be.ok;
37
+ (0, chai_1.expect)(gotStatementLink.data).to.be.ok;
38
38
  });
39
39
  });
40
40
  after(() => {
@@ -21,7 +21,7 @@ describe('Transactions', function () {
21
21
  let mock;
22
22
  before(() => {
23
23
  mock = new axios_mock_adapter_1.default(axios_1.default);
24
- mock.onGet(`${config_1.config.apiHost}/transactions`).reply(200, transaction_1.getTransactions());
24
+ mock.onGet(`${config_1.config.apiHost}/transactions`).reply(200, (0, transaction_1.getTransactions)());
25
25
  });
26
26
  it('Get transactions', function () {
27
27
  return __awaiter(this, void 0, void 0, function* () {
@@ -29,7 +29,7 @@ describe('Transactions', function () {
29
29
  const configuration = new __1.Configuration({ basePath: config_1.config.apiHost, accessToken: loginIdentityToken_1.loginIdentityToken.access_token });
30
30
  const got = yield new api_1.LoginIdentityApi(configuration).listTransactionsByLoginIdentityId();
31
31
  // Expect
32
- chai_1.expect(got.data.total_transactions).to.be.ok;
32
+ (0, chai_1.expect)(got.data.total_transactions).to.be.ok;
33
33
  });
34
34
  });
35
35
  after(() => {