fintecture-client
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -12,2 +12,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FintectureClient = void 0; | ||
const Ais_1 = require("./src/Ais"); | ||
@@ -14,0 +15,0 @@ const Authentication_1 = require("./src/Authentication"); |
{ | ||
"name": "fintecture-client", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "Fintecture Open Banking API Gateway enabling secure bank connections and payments", | ||
"main": "lib/fintecture-client.js", | ||
"types": "lib/fintecture-client.d.ts", | ||
"homepage": "https://www.fintecture.com", | ||
"repository": { | ||
@@ -11,2 +12,4 @@ "type": "git", | ||
}, | ||
"author": "Fintecture", | ||
"license": "MIT", | ||
"keywords": [ | ||
@@ -37,29 +40,31 @@ "Fintecture", | ||
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"", | ||
"lint": "tslint -p tsconfig.json" | ||
"lint": "eslint -c .eslintrc.json --ext .ts src" | ||
}, | ||
"author": "Fintecture.com", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@types/uuid": "^3.4.6", | ||
"axios": "^0.25.0", | ||
"dotenv": "^8.2.0", | ||
"qs": "^6.9.0", | ||
"uuid": "^3.3.3" | ||
"@types/uuid": "^9.0.8", | ||
"axios": "^1.6.7", | ||
"dotenv": "^16.4.1", | ||
"qs": "^6.11.2", | ||
"uuid": "^9.0.1" | ||
}, | ||
"devDependencies": { | ||
"@istanbuljs/nyc-config-typescript": "^0.1.3", | ||
"@types/jasmine": "^3.4.6", | ||
"@types/node": "^12.12.11", | ||
"jasmine": "^3.5.0", | ||
"@istanbuljs/nyc-config-typescript": "^1.0.2", | ||
"@types/jasmine": "^5.1.4", | ||
"@types/node": "^20.11.16", | ||
"@typescript-eslint/eslint-plugin": "^6.20.0", | ||
"@typescript-eslint/parser": "^6.20.0", | ||
"eslint": "^8.56.0", | ||
"eslint-config-google": "^0.14.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"jasmine": "^5.1.0", | ||
"jasmine-ts-console-reporter": "^3.1.1", | ||
"nock": "^11.6.0", | ||
"nock": "^13.5.1", | ||
"nyc": "^15.1.0", | ||
"prettier": "^1.19.1", | ||
"request": "^2.88.0", | ||
"source-map-support": "^0.5.16", | ||
"ts-node": "^8.5.2", | ||
"tslint": "^5.20.1", | ||
"tslint-config-prettier": "^1.18.0", | ||
"typescript": "^3.7.2" | ||
"prettier": "^3.2.4", | ||
"request": "^2.88.2", | ||
"source-map-support": "^0.5.21", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.3.3" | ||
} | ||
} |
@@ -31,3 +31,3 @@ "use strict"; | ||
const providerAuth = yield client.getRedirectAuthUrl(null, providerId, redirectUri); | ||
request_1.default({ | ||
(0, request_1.default)({ | ||
url: providerAuth.url, | ||
@@ -38,3 +38,3 @@ method: 'GET', | ||
const redirectUrl = response.headers["location"]; | ||
request_1.default({ | ||
(0, request_1.default)({ | ||
url: redirectUrl, | ||
@@ -41,0 +41,0 @@ method: 'GET', |
@@ -36,3 +36,3 @@ "use strict"; | ||
const providerAuth = yield clientOBanking.getRedirectAuthUrl(null, AISproviderIdTest.split(',')[0], redirectUri); | ||
request_1.default({ | ||
(0, request_1.default)({ | ||
url: providerAuth.url, | ||
@@ -43,3 +43,3 @@ method: 'GET', | ||
const redirectUrl = response.headers["location"]; | ||
request_1.default({ | ||
(0, request_1.default)({ | ||
url: redirectUrl, | ||
@@ -46,0 +46,0 @@ method: 'GET', |
@@ -8,2 +8,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.TestConfig = void 0; | ||
class TestConfig { | ||
@@ -10,0 +11,0 @@ } |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
@@ -8,0 +24,0 @@ }; |
@@ -1,2 +0,1 @@ | ||
// tslint:disable-next-line:no-var-requires | ||
const TSConsoleReporter = require("jasmine-ts-console-reporter"); | ||
@@ -3,0 +2,0 @@ jasmine.getEnv().clearReporters(); // Clear default console reporter |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,9 +34,2 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -20,0 +36,0 @@ const fintecture_client_1 = require("../fintecture-client"); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -14,10 +37,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AIS = void 0; | ||
const qs_1 = __importDefault(require("qs")); | ||
@@ -99,3 +116,3 @@ const Endpoints_1 = require("./utils/URLBuilders/Endpoints"); | ||
const headers = apiService.getHeaders('get', url, accessToken, this.config, null, headerParameters); | ||
return yield this.axiosInstance.get(url, { headers }).then(response => { | ||
return yield this.axiosInstance.get(url, { headers }).then((response) => { | ||
return response.data; | ||
@@ -123,3 +140,3 @@ }); | ||
const headers = apiService.getHeaders('get', url, accessToken, this.config, null, headerParameters); | ||
return yield this.axiosInstance.get(url, { headers }).then(response => { | ||
return yield this.axiosInstance.get(url, { headers }).then((response) => { | ||
return response.data; | ||
@@ -142,3 +159,3 @@ }); | ||
const headers = apiService.getHeaders('get', url, accessToken, this.config, null, headerParameters); | ||
return yield this.axiosInstance.get(url, { headers }).then(response => { | ||
return yield this.axiosInstance.get(url, { headers }).then((response) => { | ||
return response.data; | ||
@@ -159,3 +176,3 @@ }); | ||
const headers = apiService.getHeaders('delete', url, accessToken, this.config); | ||
return yield this.axiosInstance.delete(url, { headers }).then(response => response.data); | ||
return yield this.axiosInstance.delete(url, { headers }).then((response) => response.data); | ||
}); | ||
@@ -162,0 +179,0 @@ } |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -14,10 +37,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Authentication = void 0; | ||
const qs_1 = __importDefault(require("qs")); | ||
@@ -24,0 +41,0 @@ const Endpoints_1 = require("./utils/URLBuilders/Endpoints"); |
@@ -6,3 +6,3 @@ import { IPisSetup } from './interfaces/connect/ConnectInterface'; | ||
pis: PIS; | ||
axiosInstance: any; | ||
private axiosInstance; | ||
config: IFintectureConfig; | ||
@@ -9,0 +9,0 @@ connectConfig: IPisSetup; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -14,10 +37,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Connect = void 0; | ||
const qs_1 = __importDefault(require("qs")); | ||
@@ -24,0 +41,0 @@ const Endpoints_1 = require("./utils/URLBuilders/Endpoints"); |
@@ -67,3 +67,3 @@ import { ISessionPayload } from '../pis/PisInterface'; | ||
export interface IAttributes { | ||
amount: number; | ||
amount: string; | ||
currency: string; | ||
@@ -70,0 +70,0 @@ communication: string; |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -14,10 +37,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.PIS = void 0; | ||
const qs_1 = __importDefault(require("qs")); | ||
@@ -24,0 +41,0 @@ const Endpoints_1 = require("./utils/URLBuilders/Endpoints"); |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
@@ -11,10 +34,4 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
}; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Resources = void 0; | ||
const ResourcesURLBuilder_1 = require("./utils/URLBuilders/ResourcesURLBuilder"); | ||
@@ -21,0 +38,0 @@ const apiService = __importStar(require("./services/ApiService")); |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getHeaders = exports.getInstance = void 0; | ||
const axios_1 = __importDefault(require("axios")); | ||
@@ -18,3 +35,3 @@ const URL = __importStar(require("url")); | ||
const Crypto = __importStar(require("../utils/Crypto")); | ||
exports.getInstance = (config) => { | ||
const getInstance = (config) => { | ||
return axios_1.default.create({ | ||
@@ -29,3 +46,4 @@ headers: { | ||
}; | ||
exports.getHeaders = (method, url, accessToken, config, body, extraHeaders) => { | ||
exports.getInstance = getInstance; | ||
const getHeaders = (method, url, accessToken, config, body, extraHeaders) => { | ||
const headers = { | ||
@@ -67,2 +85,3 @@ Accept: 'application/json', | ||
}; | ||
exports.getHeaders = getHeaders; | ||
//# sourceMappingURL=ApiService.js.map |
@@ -6,6 +6,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getInstance = void 0; | ||
const axios_1 = __importDefault(require("axios")); | ||
const Constants_1 = require("../utils/Constants"); | ||
const BaseUrls_1 = require("../utils/URLBuilders/BaseUrls"); | ||
exports.getInstance = (config) => { | ||
const getInstance = (config) => { | ||
return axios_1.default.create({ | ||
@@ -18,6 +19,9 @@ headers: { | ||
}, | ||
baseURL: config.env === Constants_1.Constants.SANDBOXENVIRONMENT ? BaseUrls_1.BaseUrls.FINTECTUREOAUTHURL_SBX : BaseUrls_1.BaseUrls.FINTECTUREOAUTHURL_PRD, | ||
baseURL: config.env === Constants_1.Constants.SANDBOXENVIRONMENT | ||
? BaseUrls_1.BaseUrls.FINTECTUREOAUTHURL_SBX | ||
: BaseUrls_1.BaseUrls.FINTECTUREOAUTHURL_PRD, | ||
timeout: config.timeout || 0, | ||
}); | ||
}; | ||
exports.getInstance = getInstance; | ||
//# sourceMappingURL=AuthenticationService.js.map |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Constants = exports.environment = void 0; | ||
const pjson = __importStar(require("../../package.json")); | ||
@@ -18,3 +35,3 @@ /** | ||
environment["production"] = "production"; | ||
})(environment = exports.environment || (exports.environment = {})); | ||
})(environment || (exports.environment = environment = {})); | ||
/** | ||
@@ -21,0 +38,0 @@ * Project wide constants |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.hashBase64 = exports.signPayload = exports.buildHeaderString = exports.buildSigningString = exports.createSignatureHeader = exports.generateUUIDv4 = exports.generateUUID = void 0; | ||
const uuid_1 = require("uuid"); | ||
const crypto_1 = require("crypto"); | ||
function generateUUID() { | ||
return uuid_1.v4().replace(/-/g, ''); | ||
return (0, uuid_1.v4)().replace(/-/g, ''); | ||
} | ||
exports.generateUUID = generateUUID; | ||
function generateUUIDv4() { | ||
return uuid_1.v4(); | ||
return (0, uuid_1.v4)(); | ||
} | ||
@@ -17,3 +18,9 @@ exports.generateUUIDv4 = generateUUIDv4; | ||
const signature = signPayload(signingString, config.private_key); | ||
return ('keyId="' + config.app_id + '",algorithm="rsa-sha256",headers="' + headerString + '",signature="' + signature + '"'); | ||
return ('keyId="' + | ||
config.app_id + | ||
'",algorithm="rsa-sha256",headers="' + | ||
headerString + | ||
'",signature="' + | ||
signature + | ||
'"'); | ||
} | ||
@@ -23,3 +30,3 @@ exports.createSignatureHeader = createSignatureHeader; | ||
let signingString = ''; | ||
signedHeaders.forEach(param => { | ||
signedHeaders.forEach((param) => { | ||
if (headers[param]) { | ||
@@ -36,3 +43,3 @@ const p = param.toLowerCase(); | ||
let headerString = ''; | ||
signedHeaders.forEach(param => { | ||
signedHeaders.forEach((param) => { | ||
if (headers[param]) { | ||
@@ -52,3 +59,3 @@ const p = param.toLowerCase(); | ||
try { | ||
const signature = crypto_1.createSign('RSA-SHA256'); | ||
const signature = (0, crypto_1.createSign)('RSA-SHA256'); | ||
signature.update(payload); | ||
@@ -66,7 +73,5 @@ signature.end(); | ||
function hashBase64(plainText) { | ||
return crypto_1.createHash('sha256') | ||
.update(plainText) | ||
.digest('base64'); | ||
return (0, crypto_1.createHash)('sha256').update(plainText).digest('base64'); | ||
} | ||
exports.hashBase64 = hashBase64; | ||
//# sourceMappingURL=Crypto.js.map |
@@ -7,10 +7,27 @@ "use strict"; | ||
*/ | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.BaseUrls = void 0; | ||
const dotenv = __importStar(require("dotenv")); | ||
@@ -17,0 +34,0 @@ const path = __importStar(require("path")); |
@@ -8,2 +8,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Endpoints = void 0; | ||
class Endpoints { | ||
@@ -10,0 +11,0 @@ } |
@@ -6,2 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.ResourcesURLBuilder = void 0; | ||
const Endpoints_1 = require("./Endpoints"); | ||
@@ -8,0 +9,0 @@ const qs_1 = __importDefault(require("qs")); |
@@ -6,2 +6,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Validation = void 0; | ||
const crypto_1 = __importDefault(require("crypto")); | ||
@@ -15,7 +16,3 @@ const qs_1 = __importDefault(require("qs")); | ||
const rawBody = typeof body === 'string' ? body : qs_1.default.stringify(body); | ||
const expectedDigest = 'SHA-256=' + | ||
crypto_1.default | ||
.createHash('sha256') | ||
.update(rawBody) | ||
.digest('base64'); | ||
const expectedDigest = 'SHA-256=' + crypto_1.default.createHash('sha256').update(rawBody).digest('base64'); | ||
// Validate the digest | ||
@@ -38,3 +35,3 @@ if (headers.digest !== expectedDigest) { | ||
.split(' ') | ||
.map(header => `${header}: ${headers[header]}`) | ||
.map((header) => `${header}: ${headers[header]}`) | ||
.join('\n'); | ||
@@ -54,3 +51,2 @@ const expectedPayload = crypto_1.default | ||
let result = null; | ||
// tslint:disable-next-line | ||
while ((result = pattern.exec(signature)) !== null) { | ||
@@ -57,0 +53,0 @@ signatureComponents.set(result[1], result[2]); |
{ | ||
"name": "fintecture-client", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"description": "Fintecture Open Banking API Gateway enabling secure bank connections and payments", | ||
"main": "lib/fintecture-client.js", | ||
"types": "lib/fintecture-client.d.ts", | ||
"homepage": "https://www.fintecture.com", | ||
"repository": { | ||
@@ -11,2 +12,4 @@ "type": "git", | ||
}, | ||
"author": "Fintecture", | ||
"license": "MIT", | ||
"keywords": [ | ||
@@ -37,29 +40,31 @@ "Fintecture", | ||
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"", | ||
"lint": "tslint -p tsconfig.json" | ||
"lint": "eslint -c .eslintrc.json --ext .ts src" | ||
}, | ||
"author": "Fintecture.com", | ||
"license": "MIT", | ||
"dependencies": { | ||
"@types/uuid": "^3.4.6", | ||
"axios": "^0.25.0", | ||
"dotenv": "^8.2.0", | ||
"qs": "^6.9.0", | ||
"uuid": "^3.3.3" | ||
"@types/uuid": "^9.0.8", | ||
"axios": "^1.6.7", | ||
"dotenv": "^16.4.1", | ||
"qs": "^6.11.2", | ||
"uuid": "^9.0.1" | ||
}, | ||
"devDependencies": { | ||
"@istanbuljs/nyc-config-typescript": "^0.1.3", | ||
"@types/jasmine": "^3.4.6", | ||
"@types/node": "^12.12.11", | ||
"jasmine": "^3.5.0", | ||
"@istanbuljs/nyc-config-typescript": "^1.0.2", | ||
"@types/jasmine": "^5.1.4", | ||
"@types/node": "^20.11.16", | ||
"@typescript-eslint/eslint-plugin": "^6.20.0", | ||
"@typescript-eslint/parser": "^6.20.0", | ||
"eslint": "^8.56.0", | ||
"eslint-config-google": "^0.14.0", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"jasmine": "^5.1.0", | ||
"jasmine-ts-console-reporter": "^3.1.1", | ||
"nock": "^11.6.0", | ||
"nock": "^13.5.1", | ||
"nyc": "^15.1.0", | ||
"prettier": "^1.19.1", | ||
"request": "^2.88.0", | ||
"source-map-support": "^0.5.16", | ||
"ts-node": "^8.5.2", | ||
"tslint": "^5.20.1", | ||
"tslint-config-prettier": "^1.18.0", | ||
"typescript": "^3.7.2" | ||
"prettier": "^3.2.4", | ||
"request": "^2.88.2", | ||
"source-map-support": "^0.5.21", | ||
"ts-node": "^10.9.2", | ||
"typescript": "^5.3.3" | ||
} | ||
} |
@@ -72,3 +72,3 @@ # Fintecture | ||
```javascript | ||
let tokens = await client.getAccessToken(code); | ||
let token = await client.getAccessToken(code); | ||
``` | ||
@@ -122,3 +122,3 @@ | ||
```javascript | ||
let tokens = await client.getAccessToken(code); | ||
let token = await client.getAccessToken(code); | ||
``` | ||
@@ -161,4 +161,4 @@ | ||
// get the Fintecture access token to request the AIS APIs | ||
const tokens = await client.getAccessToken(code); | ||
const accounts = await client.getAccounts(tokens.access_token, customerId); | ||
const token = await client.getAccessToken(code); | ||
const accounts = await client.getAccounts(token.access_token, customerId); | ||
``` | ||
@@ -190,3 +190,3 @@ | ||
attributes: { | ||
amount: 1, | ||
amount: "1", | ||
currency: "EUR", | ||
@@ -215,3 +215,3 @@ communication: "Thanks Mom!", | ||
let connectConfig = { | ||
amount: 125, | ||
amount: "125", | ||
currency: 'EUR', | ||
@@ -225,8 +225,8 @@ communication: 'Thanks mom!', | ||
let tokens = await client.getAccessToken(); | ||
let connect = await client.getPisConnect(tokens.access_token, connectConfig); | ||
let token = await client.getAccessToken(); | ||
let connect = await client.getPisConnect(token.access_token, connectConfig); | ||
window.href.location = connect.url; | ||
// and at any time (ex: to validate a payment on callback) | ||
let payment = await client.getPayments(tokens.access_token, connect.session_id); | ||
let payment = await client.getPayments(token.access_token, connect.session_id); | ||
console.log("PAYMENT STATUS:", payment.meta.status); | ||
@@ -233,0 +233,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
187004
90
2775
0
18
+ Added@types/uuid@9.0.8(transitive)
+ Addedasynckit@0.4.0(transitive)
+ Addedaxios@1.7.9(transitive)
+ Addedcombined-stream@1.0.8(transitive)
+ Addeddelayed-stream@1.0.0(transitive)
+ Addeddotenv@16.4.7(transitive)
+ Addedform-data@4.0.1(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedproxy-from-env@1.1.0(transitive)
+ Addeduuid@9.0.1(transitive)
- Removed@types/uuid@3.4.13(transitive)
- Removedaxios@0.25.0(transitive)
- Removeddotenv@8.6.0(transitive)
- Removeduuid@3.4.0(transitive)
Updated@types/uuid@^9.0.8
Updatedaxios@^1.6.7
Updateddotenv@^16.4.1
Updatedqs@^6.11.2
Updateduuid@^9.0.1