@regulaforensics/idv-capture-web 3.4.316 → 3.5.317-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
@@ -190,6 +190,11 @@ declare type CurrentScreenConfig = {
190
190
  failedAssets?: FailedAssets;
191
191
  } & Record<string, any>;
192
192
 
193
+ declare type DataOrError<T extends object, E = BaseWorkflowError> = T | {
194
+ error?: E;
195
+ shouldRetry?: boolean;
196
+ };
197
+
193
198
  export declare enum DeinitializationError {
194
199
  INITIALIZATION_REQUIRED = 0,
195
200
  SCENARIO_IN_PROGRESS = 3
@@ -229,12 +234,6 @@ declare type GeoCoords = {
229
234
  lon: number;
230
235
  };
231
236
 
232
- declare type GetSessionStateNextStepConditionResult = {
233
- data?: SessionData;
234
- error?: BaseWorkflowError;
235
- shouldRetry?: boolean;
236
- };
237
-
238
237
  declare type IdvBusinessLogicControllerProps = {
239
238
  connectByUserPass: (config: ConnectionConfigCore) => Promise<{
240
239
  error?: BaseConnectionError;
@@ -253,21 +252,21 @@ declare type IdvBusinessLogicControllerProps = {
253
252
  loadModules: (modulesFromProps: any[]) => Promise<{
254
253
  error?: BaseInitializationError;
255
254
  }>;
256
- getProcessingTemplate: () => WorkflowStepClientGui | null;
255
+ getProcessingTemplate: () => WorkflowStepClient | null;
257
256
  isProcessing: boolean;
258
257
  setIsProcessing: (isProcessing: boolean) => void;
259
258
  _pushStep: (stepId: string, data: Record<string, any>, type?: PerformType) => Promise<{
260
259
  error?: BaseWorkflowError;
261
260
  }>;
262
261
  _waitingForNextStep: () => Promise<{
263
- sessionData: SessionData;
262
+ sessionData: SessionModel;
264
263
  error?: undefined;
265
264
  } | {
266
265
  error: BaseWorkflowError;
267
266
  sessionData?: undefined;
268
267
  }>;
269
268
  _stepSocketListenerWhenStepIsRunning: (isStepRunning: boolean) => void;
270
- _getSessionStateNextStepConditionResult: () => Promise<GetSessionStateNextStepConditionResult>;
269
+ _getSessionStateNextStepConditionResult: () => Promise<DataOrError<SessionModel>>;
271
270
  _findStepById: (stepId: string) => WorkflowStep | null;
272
271
  pushStepWaitNextStepAndSet: (data: Record<string, any>, type?: PerformType) => void;
273
272
  setNextStep: (props: {
@@ -405,14 +404,6 @@ declare type IdvIntegrationControllerProps = {
405
404
  _sessionIdFromUrl: null | string;
406
405
  _ttl: number;
407
406
  _continueSession: (locale: string, forceSessionId: string | null) => Promise<ContinueSessionResults>;
408
- _checkIsSessionDataValid: (sessionData: SessionData | {
409
- httpCode: number;
410
- method: string;
411
- url: string;
412
- what?: string;
413
- }) => SessionData | {
414
- error?: BaseWorkflowError;
415
- };
416
407
  _checkAndSetApiTokenToLs: (sessionId: string) => void;
417
408
  _runSocketConnection: (token: string) => Promise<{
418
409
  error?: BaseWorkflowError;
@@ -543,7 +534,7 @@ export declare class IdvWebComponent extends LitElement {
543
534
  static styles: CSSResult[];
544
535
  store: IdvStoreProps & IdvIntegrationControllerProps & IdvBusinessLogicControllerProps;
545
536
  currentScreenConfig: CurrentScreenConfig | null;
546
- processingScreenFromWorkflow: WorkflowStepClientGui | null;
537
+ processingScreenFromWorkflow: WorkflowStepClient | null;
547
538
  isProcessing: boolean;
548
539
  loadedModules: [] | LoadedModule[];
549
540
  modulesConfig: Record<string, any>;
@@ -609,6 +600,22 @@ export declare enum PrepareWorkflowError {
609
600
  SCENARIO_IN_PROGRESS = 4
610
601
  }
611
602
 
603
+ declare class PropertyModel implements SessionPropertiesItem {
604
+ id: string;
605
+ name: string;
606
+ createdAt?: string;
607
+ updatedAt?: string;
608
+ string: string;
609
+ createdBy?: unknown;
610
+ updatedBy?: unknown;
611
+ step: string | null;
612
+ action?: unknown;
613
+ path?: unknown;
614
+ integer?: unknown;
615
+ decimal?: unknown;
616
+ object?: unknown;
617
+ }
618
+
612
619
  declare type PushSessionLogsParams = {
613
620
  body: {
614
621
  log: string;
@@ -637,22 +644,40 @@ export declare enum SessionError {
637
644
  NOT_DATA_TYPE = 5
638
645
  }
639
646
 
647
+ declare class SessionModel implements SessionData {
648
+ id: string;
649
+ currentStep: string;
650
+ workflow: WorkflowModel;
651
+ properties: PropertyModel[];
652
+ isErrorFiles: boolean;
653
+ isProcessingFiles: boolean;
654
+ locale: string;
655
+ shortId: string;
656
+ deviceId?: string;
657
+ deviceMetadata?: object;
658
+ metadata?: object;
659
+ static isSessionModel(value: unknown): value is SessionModel;
660
+ static fromPlain: (input: SessionData) => SessionModel | {
661
+ validationErrorMessage: string;
662
+ };
663
+ }
664
+
640
665
  /** sync with gui module */
641
666
  declare type SessionPropertiesItem = {
642
667
  id: string;
643
- createdAt: string;
644
- updatedAt: string;
645
- createdBy: unknown;
646
- updatedBy: unknown;
647
- action: unknown;
648
- step: string;
668
+ createdAt?: string;
669
+ updatedAt?: string;
670
+ createdBy?: unknown;
671
+ updatedBy?: unknown;
672
+ action?: unknown;
673
+ step: string | null;
649
674
  name: string;
650
- path: unknown;
675
+ path?: unknown;
651
676
  string: string;
652
677
  array?: string[];
653
- integer: unknown;
654
- decimal: unknown;
655
- object: unknown;
678
+ integer?: unknown;
679
+ decimal?: unknown;
680
+ object?: unknown;
656
681
  };
657
682
 
658
683
  declare type StartConfig = {
@@ -692,13 +717,22 @@ declare enum TokenInitializeError {
692
717
  declare type Workflow = {
693
718
  id: string;
694
719
  steps: Array<WorkflowStep>;
695
- client: {
696
- layout: Record<string, any>;
697
- steps: Array<WorkflowStepClientGui>;
698
- };
720
+ client: WorkflowClient;
699
721
  trackLocation?: boolean;
722
+ error: string | null;
723
+ name: string;
700
724
  } & Record<string, any>;
701
725
 
726
+ declare type WorkflowClient = {
727
+ layout: Record<string, any>;
728
+ steps: Array<WorkflowStepClient>;
729
+ };
730
+
731
+ declare class WorkflowClientModel implements WorkflowClient {
732
+ layout: Record<string, any>;
733
+ steps: Array<WorkflowStepClientModel>;
734
+ }
735
+
702
736
  export declare type WorkflowCompletion = {
703
737
  results?: WorkflowResult;
704
738
  error?: BaseWorkflowError;
@@ -724,6 +758,23 @@ export declare type WorkflowListRequest = {
724
758
  skip: number;
725
759
  };
726
760
 
761
+ declare class WorkflowModel implements Workflow {
762
+ id: string;
763
+ name: string;
764
+ steps: WorkflowStepModel[];
765
+ client: WorkflowClientModel;
766
+ error: string | null;
767
+ defaultLocale?: string;
768
+ config?: Record<any, any>;
769
+ metadata?: Record<any, any>;
770
+ sessionUpdateTimeout?: number;
771
+ trackLocation?: boolean;
772
+ static isWorkflowModel(value: unknown): value is WorkflowModel;
773
+ static fromPlain: (input: Workflow) => WorkflowModel | {
774
+ validationErrorMessage: string;
775
+ };
776
+ }
777
+
727
778
  export declare enum WorkflowPlatformError {
728
779
  HTTP_ISSUE = 0,
729
780
  PROVIDER_ERROR = 1,
@@ -745,13 +796,28 @@ declare type WorkflowStep = {
745
796
  name: string;
746
797
  final: boolean;
747
798
  releaseClientApp: boolean;
748
- client?: Record<string, unknown> | WorkflowStepClientGui;
799
+ client?: Record<string, unknown> | WorkflowStepClient;
749
800
  dataSource: Record<string, unknown> | null;
750
801
  } & Record<string, any>;
751
802
 
752
- declare type WorkflowStepClientGui = {
803
+ declare type WorkflowStepClient = {
753
804
  templateId: string;
754
- templateLayout: Record<string, unknown>;
805
+ templateLayout?: Record<string, unknown>;
755
806
  };
756
807
 
808
+ declare class WorkflowStepClientModel implements WorkflowStepClient {
809
+ templateId: string;
810
+ templateLayout?: Record<string, unknown>;
811
+ }
812
+
813
+ declare class WorkflowStepModel implements WorkflowStep {
814
+ id: string;
815
+ name: string;
816
+ type: string;
817
+ final: boolean;
818
+ releaseClientApp: boolean;
819
+ dataSource: Record<string, unknown> | null;
820
+ client?: WorkflowStepClientModel;
821
+ }
822
+
757
823
  export { }