bankson-js-mb
Version:
Bankson.fi Node client, Mad Booster fork
56 lines • 1.94 kB
TypeScript
import ApiKeys from './ext/apikeys.js';
import BankAccountStatements from './ext/bank-account-statements.js';
import BankAccounts from './ext/bank-accounts.js';
import Certificates from './ext/bank-certificates.js';
import Calls from './ext/calls.js';
import InboundPayments from './ext/inbound-payments.js';
import Payments from './ext/outbound-payments.js';
import Webhooks from './ext/webhooks.js';
interface Opts {
beforeRequest?: () => Promise<{
bearerToken?: string;
test?: boolean;
}>;
bearerToken?: string;
baseUrl?: string;
test?: boolean;
privateKey?: string;
apiKey?: string;
}
interface GetOptions {
headers?: {
Accept?: string;
};
responseType?: string;
}
export default class Client {
private beforeRequest;
private bearerToken;
private baseUrl;
private testMode;
private privateKey;
private apiKey;
webhooks: Webhooks;
certificates: Certificates;
calls: Calls;
bankAccounts: BankAccounts;
bankAccountStatements: BankAccountStatements;
outboundPayments: Payments;
apikeys: ApiKeys;
inboundPayments: InboundPayments;
constructor(opts?: Opts);
me(): Promise<unknown>;
meV2(): Promise<unknown>;
authorizationHeader(bearerToken: string | boolean): string;
headers(additionalHeaders?: {
Accept?: string;
}): Promise<import("undici-types").Headers>;
get<TResponse>(path: string, options?: GetOptions): Promise<TResponse>;
post<TData, TResponse>(path: string, data: TData): Promise<TResponse>;
put<TData, TResponse>(path: string, data: TData): Promise<TResponse>;
request<TData, TResponse>(method: 'GET' | 'POST' | 'PUT' | 'DELETE', path: string, data: TData): Promise<TResponse>;
delete(path: string): Promise<void>;
handleResponse<TResponse>(resp: Response, options?: GetOptions): Promise<TResponse>;
}
export {};
//# sourceMappingURL=client.d.ts.map