UNPKG

equal-angular-pfm-sdk

Version:

Equal PFM Angular SDK

38 lines (34 loc) 984 B
/** * Callback data structure for SDK events */ export interface SDKCallbackData { /** Type of event ('PFM_SDK_CALLBACK', 'EQUAL_SDK_CALLBACK', etc.) */ eventType: string; /** Status of the event ('ON_CLOSE', 'ERROR', etc.) */ status: string; /** Status code for error events */ statusCode?: string; /** Message associated with the event */ message: string; } /** * Callback function type for SDK events */ export type SDKCallback = (data: SDKCallbackData) => void; /** * Personal Finance Management SDK */ export default class PFMSDK { /** * Creates a new instance of the PFMSDK * @param token - Authentication token * @param env - Environment ('uat' or 'production') */ constructor(token: string, env: string); /** * Opens the PFM interface * @param onErrorEvent - Callback for error events * @param onCloseEvent - Callback for close events */ openPFM(onErrorEvent: SDKCallback, onCloseEvent: SDKCallback): Promise<void>; }