Skip to content

Commit

Permalink
loading events added
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrew committed Oct 16, 2023
1 parent 82bca9c commit 55e6458
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/bundle.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ type ErrorCode =
| 'server_unavailable'
| FatalErrorCode

type FlowEvent = 'loadingComplete';
type FlowEventType = {
name: FlowEvent;
payload?: string | number | boolean;
}

interface MainPageSideConfig {
apiUrl: string,
containerId: string,
Expand All @@ -93,6 +99,7 @@ interface MainPageSideConfig {
onVerificationComplete?: OnVerificationComplete,
acceptableDocuments?: AcceptableDocuments,
onFatalError?: (code: FatalErrorCode) => void
onFlowEvent?: (event: FlowEventType) => void,
profile?: Array<ProfileForm | ProfileFormCustom>
locale?: string,
customerId?: string,
Expand Down Expand Up @@ -125,4 +132,4 @@ declare global {
}
}

export { GetIdWebSdkComponent, PageSideConfig, PoaParsedAddress, getLinkScriptResponse, init };
export { FlowEvent, FlowEventType, GetIdWebSdkComponent, PageSideConfig, PoaParsedAddress, getLinkScriptResponse, init };
7 changes: 7 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ type ErrorCode =
| 'server_unavailable'
| FatalErrorCode

export type FlowEvent = 'loadingComplete';
export type FlowEventType = {
name: FlowEvent;
payload?: string | number | boolean;
}

interface MainPageSideConfig {
apiUrl: string,
containerId: string,
Expand All @@ -93,6 +99,7 @@ interface MainPageSideConfig {
onVerificationComplete?: OnVerificationComplete,
acceptableDocuments?: AcceptableDocuments,
onFatalError?: (code: FatalErrorCode) => void
onFlowEvent?: (event: FlowEventType) => void,
profile?: Array<ProfileForm | ProfileFormCustom>
locale?: string,
customerId?: string,
Expand Down

0 comments on commit 55e6458

Please sign in to comment.