@securecall/client-component
Version:
SecureCall Core Web Component
82 lines (81 loc) • 3.99 kB
TypeScript
import { EventEmitter } from '../../stencil-public-runtime';
import { CURRENT_STATE_T } from '../../types/current_state';
import { ITelephonyEventData, ITelephonyUpdate } from '../../interfaces/telephony';
import { IConfigurationEvent, IConfigurationUpdate } from '../../interfaces/configuration';
import { ITransactionData, ITransactionValues } from '../../interfaces/transaction';
import { IAuthenticationFailure } from "../../interfaces/authentication";
export declare class SecurecallClient {
apiLocation: string;
awaitActiveCall: boolean;
theme: 'dark' | 'light';
displayTransactionResult: boolean;
switchHint: string;
hideSecureButton: boolean;
currentState: CURRENT_STATE_T;
errorMessage: string | undefined;
transactionToggle: boolean;
authenticationSuccess: EventEmitter<string>;
authenticationFailure: EventEmitter<IAuthenticationFailure>;
configurationChanged: EventEmitter<IConfigurationUpdate>;
callSecured: EventEmitter<boolean>;
callEnded: EventEmitter<string>;
transactionSubmitted: EventEmitter<ITransactionValues>;
transactionSubmitting: EventEmitter<ITransactionData>;
transactionSuccess: EventEmitter<ITransactionData>;
transactionFailure: EventEmitter<ITransactionData>;
loggedOut: EventEmitter<boolean>;
telephonyHold: EventEmitter<ITelephonyEventData>;
telephonyRecover: EventEmitter<ITelephonyEventData>;
telephonyLegA: EventEmitter<ITelephonyEventData>;
telephonyLegB: EventEmitter<ITelephonyEventData>;
telephonyValidate: EventEmitter<ITelephonyEventData>;
private readonly _requestFields;
private _responseFields;
private client_api;
private timeoutId;
private readonly instanceId;
private authenticationCount;
private secureData;
private currentSession;
transactionElement: HTMLSecurecallTransactionElement | null;
private readonly log;
private readonly boundProcessAuthenticationEvent;
private readonly boundProcessStatusEvent;
private readonly boundProcessConfigurationEvent;
private readonly boundProcessTelephonyEvent;
private readonly boundVisibilityEvent;
connectedCallback(): void;
disconnectedCallback(): void;
componentWillLoad(): void;
processVisibilityEvent(): void;
handleSecureFieldResetEvent(evt: CustomEvent<string>): void;
handleSubmitTransactionEvent(evt: CustomEvent<ITransactionValues>): void;
handleResponseButtonEvent(evt: CustomEvent<string>): void;
messageHandler(event: MessageEvent): void;
currentStateWatcher(newValue: CURRENT_STATE_T, oldValue: CURRENT_STATE_T): void;
watchAwaitActiveCall(newValue: boolean, oldValue: boolean): void;
triggerAnotherTransaction(resetTransactionDetails?: boolean, resetCardFields?: string[]): Promise<void>;
submitAnotherTransaction(data: ITransactionValues): Promise<boolean>;
authenticate(username?: string, password?: string, useCookie?: boolean): Promise<void>;
logout(): Promise<void>;
secure(): Promise<void>;
release(): Promise<void>;
updateTelephony(data: ITelephonyUpdate): Promise<void>;
updateRequestFields(updates: (arg0: any) => void): Promise<void>;
updateSessionRequestFields(updates: (arg0: any) => void): Promise<void>;
updateTransactionRequestFields(updates: (arg0: any) => void): Promise<void>;
updateResponseFields(updates: (arg0: any) => void): Promise<void>;
processAuthenticationEvent(evt: any): void;
processConfigurationEvent(evt: CustomEvent<IConfigurationEvent>): void;
generateConfigurationChangedEvent(): void;
processStatusEvent(j: any): void;
processTelephonyEvent(j: any): void;
handleAuthenticationFailure(status: string, code: number): void;
submitTransaction(eventData: ITransactionValues): void;
startTimeout(milliseconds: number, message: string): void;
cancelTimeout(): void;
private renderResponseFields;
currentStateRender(): any;
renderErrorMessage(): any;
render(): any;
}