UNPKG

@paydock/client-sdk

Version:

Paydock client sdk

25 lines 1.15 kB
import type { ApiInternal } from '../../api/api-internal'; import type { EventEmitter } from '../../helper/event-emitter'; import type { Checkout } from '../checkout'; export type Instruction = new (selector: string, api: ApiInternal, checkoutWidget: Checkout, formSelector?: string) => InstructionHandler & InstructionDestroyable & InstructionDecorated; export interface InstructionHandleable { handle(payload: object, eventEmitter: EventEmitter): void; } export interface InstructionDecorated { instruction: string; } export interface InstructionDestroyable { destroy(): void; } export declare abstract class InstructionHandler implements InstructionHandleable, InstructionDestroyable, InstructionDecorated { selector: string; api: ApiInternal; protected checkoutWidget?: Checkout; formSelector?: string; constructor(selector: string, api: ApiInternal, checkoutWidget?: Checkout, formSelector?: string); instruction: string; abstract handle(context: object, eventEmitter?: any): void; destroy(): void; getEnv(instruction_token: string): string; } //# sourceMappingURL=instruction-handler.d.ts.map