open-banking-pfm-sdk
Version:
The Open Banking PFM SDK uses Client classes and with **Promises** to get responses from the Open Banking PFM API in an easier way and structured as data models.
28 lines (27 loc) • 1.46 kB
TypeScript
import { IAggSubRequest, IBanksClient, ISetup } from '../interfaces';
import { Bank, BankAggStatus, ConsentCreateResponse, ConsumeConsentResponse, ResourceDetailResponse, BankAggregated } from '../models';
import Client from './Client';
export default class BanksClient extends Client implements IBanksClient {
private _isRunningPolling;
private _timer;
private _path;
constructor({ apiKey, serverUrl, assetsUrl }: ISetup);
private aggStatusBankSubscribe;
getAvailables(userId: number | string): Promise<Bank[]>;
/**
* @deprecated Please use consent client instead
*/
getAggregates(userId: number | string): Promise<BankAggregated[]>;
createConsent(bankId: string, userId: number | string, time: number | string): Promise<ConsentCreateResponse>;
/**
* @deprecated Please use authorize consent method instead
*/
consumeConsent(authCode: string, token: string, state: string): Promise<ConsumeConsentResponse>;
getResources(bankId: string, userId: number | string): Promise<ResourceDetailResponse>;
synchronize(bankId: string, userId: number | string): Promise<boolean>;
getAggregationStatus(bankId: string, userId: number | string): Promise<BankAggStatus>;
authorize(code: string, id_token: string, state: string): Promise<boolean>;
aggregationStatusSubscribe(aggSubRequest: IAggSubRequest): void;
aggregationStatusUnsubscribe(): void;
get isRunningPolling(): boolean;
}