Skip to content

Commit

Permalink
Merge pull request #11 from vvorld/t-mtxSviGz-5681-ryan-new-designs-w…
Browse files Browse the repository at this point in the history
…eb-add-event-when-content-of-id-scan-loads

loading events added
  • Loading branch information
pitrew authored Oct 16, 2023
2 parents 82bca9c + 55e6458 commit d5b56bf
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 d5b56bf

Please sign in to comment.