Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

account-pay

Package Overview
Dependencies
Maintainers
0
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

account-pay - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

dist/transaction.d.ts

15

dist/index.d.ts

@@ -11,3 +11,18 @@ declare const _default: {

listNewTransaction: (day: number) => Promise<import("./types").PushData[]>;
transaction: {
BankOfList: () => Promise<{
bankClearingCode: string;
bankName: string;
"network.cmCode": string;
}[]>;
retrieve: (accountId: string, bankCode: string) => Promise<{
fullName: string | null;
iban: string | null;
account: string | null;
alias: null;
msgId: string | null;
name: string | null;
}>;
};
};
export default _default;

3

dist/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const service_1 = require("./service");
exports.default = { Auth: service_1.Auth, listTransaction: service_1.listTransaction, listNewTransaction: service_1.listNewTransaction };
const transaction_1 = require("./transaction");
exports.default = { Auth: service_1.Auth, listTransaction: service_1.listTransaction, listNewTransaction: service_1.listNewTransaction, transaction: transaction_1.default };
import { Transaction, PushData } from "./types";
export declare let accessToken: string;
export declare const Auth: (data: {

@@ -9,3 +10,4 @@ DEVICE_ID: string;

}) => Promise<string>;
export declare const createToken: () => Promise<string>;
export declare const listTransaction: (day: number) => Promise<Transaction[]>;
export declare const listNewTransaction: (day: number) => Promise<PushData[]>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.listNewTransaction = exports.listTransaction = exports.Auth = void 0;
exports.listNewTransaction = exports.listTransaction = exports.createToken = exports.Auth = exports.accessToken = void 0;
const date_and_time_1 = require("date-and-time");

@@ -11,3 +11,3 @@ const axios_master_1 = require("axios-master");

let KHAANBANK_USERNAME = "";
let accessToken = "";
exports.accessToken = "";
async function createId(date, accountId) {

@@ -23,3 +23,3 @@ return new Date(date).getTime() + "" + parseInt(accountId);

try {
await createToken();
await (0, exports.createToken)();
return "Success Login khaanbank";

@@ -67,3 +67,3 @@ }

});
accessToken = result.access_token;
exports.accessToken = result.access_token;
return Promise.resolve(result.access_token);

@@ -75,2 +75,3 @@ }

};
exports.createToken = createToken;
const listTransaction = async (day) => {

@@ -88,3 +89,3 @@ const edate = (0, date_and_time_1.format)(new Date(), "YYYY-MM-DD");

"Content-Type": "application/json",
Authorization: "Bearer " + accessToken,
Authorization: "Bearer " + exports.accessToken,
},

@@ -96,3 +97,3 @@ }, {

shouldRetryStatus: [401, 400],
retryFunction: createToken,
retryFunction: exports.createToken,
});

@@ -99,0 +100,0 @@ return Promise.resolve(result);

{
"name": "account-pay",
"version": "0.1.2",
"version": "0.1.3",
"description": "e.khaanbank api",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc