@regulaforensics/idv-capture-web 4.0.684-nightly → 4.0.686-nightly

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -234,11 +234,6 @@ declare type CurrentScreenConfig = {
234
234
  preloadAssetsRequired?: boolean;
235
235
  } & Record<string, any>;
236
236
 
237
- declare type DataOrError<T extends object, E = BaseWorkflowError> = T | {
238
- error?: E;
239
- shouldRetry?: boolean;
240
- };
241
-
242
237
  export declare enum DeinitializationError {
243
238
  INITIALIZATION_REQUIRED = 0,
244
239
  SCENARIO_IN_PROGRESS = 3
@@ -288,6 +283,7 @@ declare const IDV_MODULE_NAME = "IDV";
288
283
  declare type IdvBusinessLogicControllerProps = {
289
284
  connectByUserPass: (config: ConnectionConfigCore) => Promise<{
290
285
  error?: BaseConnectionError;
286
+ workflows?: string[];
291
287
  }>;
292
288
  connectByApiKey: (config: ConnectionByApiKeyConfigCore) => Promise<{
293
289
  error?: BaseTokenInitializationError;
@@ -336,7 +332,12 @@ declare type IdvBusinessLogicControllerProps = {
336
332
  cancel: () => void;
337
333
  };
338
334
  _stepSocketListenerWhenStepIsRunning: (isStepRunning: boolean) => void;
339
- _getSessionStateNextStepConditionResult: () => Promise<DataOrError<SessionModel>>;
335
+ _getSessionStateNextStepConditionResult: () => Promise<{
336
+ session: SessionModel;
337
+ } | {
338
+ error: BaseWorkflowError;
339
+ shouldRetry: boolean;
340
+ }>;
340
341
  _findStepById: (stepId: string) => WorkflowStep | null;
341
342
  pushStepWaitNextStepAndSet: (data: Record<string, any>, type?: PerformType) => void;
342
343
  setNextStep: (props: {
@@ -359,8 +360,7 @@ declare type IdvBusinessLogicControllerProps = {
359
360
  _redirectAndStopProcess: (step: WorkflowStep) => Promise<void>;
360
361
  resetSession: () => void;
361
362
  resetFetchService: () => void;
362
- _decodeMessageFromWebSocket: (eventData: MessageEvent['data']) => WebSocketDecodedSessionMessage | null;
363
- _validateSession: (session?: SessionData) => SessionModel | {
363
+ _validateSession: (session: unknown) => SessionModel | {
364
364
  validationErrorMessage: string;
365
365
  };
366
366
  };
@@ -412,23 +412,23 @@ declare class IdvFetchService {
412
412
  locale: string;
413
413
  metadata?: Record<string, unknown>;
414
414
  location?: GeoCoords | null;
415
- }): Promise<FetchResult<SessionData>>;
416
- continueSession({ sessionId, locale, }: {
415
+ }): Promise<FetchResult<unknown>>;
416
+ continueSession({ sessionId, locale }: {
417
417
  sessionId: string;
418
418
  locale: string;
419
- }): Promise<FetchResult<SessionData>>;
419
+ }): Promise<FetchResult<unknown>>;
420
420
  listWorkflows(params?: {
421
421
  limit: number;
422
422
  skip: number;
423
423
  }): Promise<FetchResult<WorkflowsData>>;
424
- getWorkflow(workflowId: string, sessionIdFromUrl?: string | null, locale?: string): Promise<FetchResult<Workflow>>;
424
+ getWorkflow(workflowId: string, sessionIdFromUrl?: string | null, locale?: string): Promise<FetchResult<unknown>>;
425
425
  pushData({ sessionId, stepId, data, type, }: {
426
426
  sessionId: string;
427
427
  stepId: string;
428
428
  data: any;
429
429
  type?: PerformType;
430
430
  }): Promise<FetchResult<Record<string, unknown>>>;
431
- getSessionState(sessionId: string, locale?: string): Promise<FetchResult<SessionData>>;
431
+ getSessionState(sessionId: string, locale?: string): Promise<FetchResult<unknown>>;
432
432
  pushLogs(sessionId: string, pushLogsParams: PushLogsParams): Promise<FetchResult<Record<string, unknown>>>;
433
433
  startIamAuth({ applicationId, baseUrl, metadata, locale, httpTimeoutMs, }: {
434
434
  applicationId: string;
@@ -728,6 +728,7 @@ declare type SessionData = {
728
728
  properties: SessionPropertiesItem[];
729
729
  isProcessingFiles: boolean;
730
730
  locale?: string;
731
+ connectionQualityAssessment?: unknown;
731
732
  };
732
733
 
733
734
  export declare enum SessionError {
@@ -746,13 +747,13 @@ declare class SessionModel implements SessionData {
746
747
  properties: PropertyModel[];
747
748
  isProcessingFiles: boolean;
748
749
  locale?: string;
750
+ connectionQualityAssessment?: unknown;
749
751
  isErrorFiles?: boolean;
750
752
  shortId?: string;
751
753
  deviceId?: string;
752
754
  deviceMetadata?: Record<string, unknown>;
753
755
  metadata?: Record<string, unknown>;
754
- static isSessionModel(value: unknown): value is SessionModel;
755
- static fromPlain: (input?: SessionData) => SessionModel | {
756
+ static fromPlain: (input: unknown) => SessionModel | {
756
757
  validationErrorMessage: string;
757
758
  };
758
759
  }
@@ -823,17 +824,6 @@ declare enum TokenInitializeError {
823
824
  WORKFLOW_ISSUE = 1
824
825
  }
825
826
 
826
- declare type WebSocketDecodedSessionMessage = {
827
- eventType: string;
828
- options?: {
829
- session?: SessionData;
830
- };
831
- error?: {
832
- code: number;
833
- message: string;
834
- };
835
- };
836
-
837
827
  declare type Workflow = {
838
828
  id: string;
839
829
  logging?: WorkflowLogging | null;
@@ -902,8 +892,7 @@ declare class WorkflowModel implements Workflow {
902
892
  metadata?: Record<any, any>;
903
893
  sessionUpdateTimeout?: number;
904
894
  trackLocation?: boolean;
905
- static isWorkflowModel(value: unknown): value is WorkflowModel;
906
- static fromPlain: (input: Workflow) => WorkflowModel | {
895
+ static fromPlain: (input: unknown) => WorkflowModel | {
907
896
  validationErrorMessage: string;
908
897
  };
909
898
  }