@frankieone/one-sdk 1.7.0 → 1.7.1-rc
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/commit.txt +1 -1
- package/dist/esm/modules/business/actions/emitEvents.d.ts +11 -0
- package/dist/esm/modules/business/actions/emitEvents.d.ts.map +1 -0
- package/dist/esm/modules/business/actions/emitEvents.js +10 -0
- package/dist/esm/modules/business/actions/emitEvents.js.map +1 -0
- package/dist/esm/modules/business/actions/search.d.ts +12 -0
- package/dist/esm/modules/business/actions/search.d.ts.map +1 -0
- package/dist/esm/modules/business/actions/search.js +45 -0
- package/dist/esm/modules/business/actions/search.js.map +1 -0
- package/dist/esm/modules/business/actions/upload.d.ts +12 -0
- package/dist/esm/modules/business/actions/upload.d.ts.map +1 -0
- package/dist/esm/modules/business/actions/upload.js +43 -0
- package/dist/esm/modules/business/actions/upload.js.map +1 -0
- package/dist/esm/modules/business/definition.d.ts +34 -0
- package/dist/esm/modules/business/definition.d.ts.map +1 -0
- package/dist/esm/modules/business/definition.js +2 -0
- package/dist/esm/modules/business/definition.js.map +1 -0
- package/dist/esm/modules/business/events.d.ts +13 -0
- package/dist/esm/modules/business/events.d.ts.map +1 -0
- package/dist/esm/modules/business/events.js +2 -0
- package/dist/esm/modules/business/events.js.map +1 -0
- package/dist/esm/modules/business/index.d.ts +6 -0
- package/dist/esm/modules/business/index.d.ts.map +1 -0
- package/dist/esm/modules/business/index.js +67 -0
- package/dist/esm/modules/business/index.js.map +1 -0
- package/dist/esm/modules/common/shared/models/DeviceCheck.d.ts +9 -0
- package/dist/esm/modules/common/shared/models/DeviceCheck.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/DeviceCheck.js +2 -0
- package/dist/esm/modules/common/shared/models/DeviceCheck.js.map +1 -0
- package/dist/esm/modules/common/shared/models/IChangeStamp.d.ts +1 -0
- package/dist/esm/modules/common/shared/models/IChangeStamp.d.ts.map +1 -1
- package/dist/esm/modules/common/shared/models/IChangeStamp.js +1 -0
- package/dist/esm/modules/common/shared/models/IChangeStamp.js.map +1 -1
- package/dist/esm/modules/common/shared/models/internal/index.d.ts +81 -0
- package/dist/esm/modules/common/shared/models/internal/index.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/index.js +16 -0
- package/dist/esm/modules/common/shared/models/internal/index.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/ABR_Information.d.ts +20 -0
- package/dist/esm/modules/common/shared/models/internal/models/ABR_Information.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/ABR_Information.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/ABR_Information.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Address.d.ts +99 -0
- package/dist/esm/modules/common/shared/models/internal/models/Address.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Address.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Address.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Attribute.d.ts +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Attribute.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Attribute.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Attribute.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Base_Individual.d.ts +27 -0
- package/dist/esm/modules/common/shared/models/internal/models/Base_Individual.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Base_Individual.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Base_Individual.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Blocking_Entity.d.ts +21 -0
- package/dist/esm/modules/common/shared/models/internal/models/Blocking_Entity.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Blocking_Entity.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Blocking_Entity.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Blocking_Reason.d.ts +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Blocking_Reason.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Blocking_Reason.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Blocking_Reason.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Code_Description.d.ts +11 -0
- package/dist/esm/modules/common/shared/models/internal/models/Code_Description.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Code_Description.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Code_Description.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Custom_Attributes.d.ts +3 -0
- package/dist/esm/modules/common/shared/models/internal/models/Custom_Attributes.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Custom_Attributes.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Custom_Attributes.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Data_URI_Base64.d.ts +15 -0
- package/dist/esm/modules/common/shared/models/internal/models/Data_URI_Base64.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Data_URI_Base64.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Data_URI_Base64.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Date.d.ts +45 -0
- package/dist/esm/modules/common/shared/models/internal/models/Date.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Date.js +23 -0
- package/dist/esm/modules/common/shared/models/internal/models/Date.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Date_Of_Birth.d.ts +13 -0
- package/dist/esm/modules/common/shared/models/internal/models/Date_Of_Birth.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Date_Of_Birth.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Date_Of_Birth.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_Attachment.d.ts +108 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_Attachment.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_Attachment.js +43 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_Attachment.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_Class.d.ts +10 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_Class.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_Class.js +14 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_Class.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_ID.d.ts +6 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_ID.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_ID.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_ID.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_Information.d.ts +130 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_Information.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_Information.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_Information.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_Supplementary_Data.d.ts +7 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_Supplementary_Data.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_Supplementary_Data.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Document_Supplementary_Data.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Email.d.ts +44 -0
- package/dist/esm/modules/common/shared/models/internal/models/Email.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Email.js +17 -0
- package/dist/esm/modules/common/shared/models/internal/models/Email.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Entity.d.ts +40 -0
- package/dist/esm/modules/common/shared/models/internal/models/Entity.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Entity.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Entity.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Entity_Documents.d.ts +8 -0
- package/dist/esm/modules/common/shared/models/internal/models/Entity_Documents.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Entity_Documents.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Entity_Documents.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Entity_ID.d.ts +6 -0
- package/dist/esm/modules/common/shared/models/internal/models/Entity_ID.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Entity_ID.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Entity_ID.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Entity_Type.d.ts +9 -0
- package/dist/esm/modules/common/shared/models/internal/models/Entity_Type.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Entity_Type.js +13 -0
- package/dist/esm/modules/common/shared/models/internal/models/Entity_Type.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Error.d.ts +6 -0
- package/dist/esm/modules/common/shared/models/internal/models/Error.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Error.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Error.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Error_Base.d.ts +7 -0
- package/dist/esm/modules/common/shared/models/internal/models/Error_Base.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Error_Base.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Error_Base.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/External_Reference.d.ts +24 -0
- package/dist/esm/modules/common/shared/models/internal/models/External_Reference.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/External_Reference.js +13 -0
- package/dist/esm/modules/common/shared/models/internal/models/External_Reference.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/External_Reference_Information.d.ts +18 -0
- package/dist/esm/modules/common/shared/models/internal/models/External_Reference_Information.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/External_Reference_Information.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/External_Reference_Information.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Flag.d.ts +11 -0
- package/dist/esm/modules/common/shared/models/internal/models/Flag.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Flag.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Flag.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Gender.d.ts +27 -0
- package/dist/esm/modules/common/shared/models/internal/models/Gender.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Gender.js +17 -0
- package/dist/esm/modules/common/shared/models/internal/models/Gender.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Individual_Name.d.ts +58 -0
- package/dist/esm/modules/common/shared/models/internal/models/Individual_Name.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Individual_Name.js +17 -0
- package/dist/esm/modules/common/shared/models/internal/models/Individual_Name.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Industry_Declaration.d.ts +8 -0
- package/dist/esm/modules/common/shared/models/internal/models/Industry_Declaration.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Industry_Declaration.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Industry_Declaration.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Information_Source.d.ts +56 -0
- package/dist/esm/modules/common/shared/models/internal/models/Information_Source.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Information_Source.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Information_Source.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Issue.d.ts +6 -0
- package/dist/esm/modules/common/shared/models/internal/models/Issue.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Issue.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Issue.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Acnc.d.ts +7 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Acnc.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Acnc.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Acnc.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Annual_Account.d.ts +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Annual_Account.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Annual_Account.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Annual_Account.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Dgr.d.ts +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Dgr.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Dgr.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Dgr.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Information.d.ts +44 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Information.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Information.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Information.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Legal_Form_Details.d.ts +11 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Legal_Form_Details.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Legal_Form_Details.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Legal_Form_Details.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Registry_Information.d.ts +36 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Registry_Information.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Registry_Information.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Registry_Information.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Superannuation.d.ts +7 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Superannuation.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Superannuation.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Jurisdictional_Superannuation.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Official_Organization.d.ts +7 -0
- package/dist/esm/modules/common/shared/models/internal/models/Official_Organization.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Official_Organization.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Official_Organization.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Details.d.ts +41 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Details.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Details.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Details.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Jurisdiction.d.ts +7 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Jurisdiction.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Jurisdiction.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Jurisdiction.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Linked_Individual.d.ts +3 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Linked_Individual.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Linked_Individual.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Linked_Individual.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Lookup_Match.d.ts +43 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Lookup_Match.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Lookup_Match.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Lookup_Match.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Name.d.ts +24 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Name.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Name.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Name.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Number.d.ts +12 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Number.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Number.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Number.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Official.d.ts +43 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Official.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Official.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Official.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Official_Directorship.d.ts +26 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Official_Directorship.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Official_Directorship.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Official_Directorship.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Official_Identification.d.ts +12 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Official_Identification.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Official_Identification.js +11 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Official_Identification.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_PSC.d.ts +31 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_PSC.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_PSC.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_PSC.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Profile.d.ts +41 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Profile.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Profile.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Profile.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Region.d.ts +16 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Region.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Region.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Region.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Registration.d.ts +7 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Registration.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Registration.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Registration.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Registration_Details.d.ts +67 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Registration_Details.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Registration_Details.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Registration_Details.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Registry.d.ts +11 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Registry.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Registry.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Registry.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Request.d.ts +63 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Request.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Request.js +27 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Request.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Share_Capital.d.ts +15 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Share_Capital.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Share_Capital.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Share_Capital.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Share_Interest.d.ts +24 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Share_Interest.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Share_Interest.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Share_Interest.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Share_Interest_Member.d.ts +10 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Share_Interest_Member.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Share_Interest_Member.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Share_Interest_Member.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Share_Structure.d.ts +56 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Share_Structure.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Share_Structure.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Share_Structure.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Shareholder.d.ts +24 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Shareholder.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Shareholder.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Shareholder.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Shareholder_Shareholding.d.ts +19 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Shareholder_Shareholding.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Shareholder_Shareholding.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Shareholder_Shareholding.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Status.d.ts +12 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Status.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Status.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Status.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Summary.d.ts +36 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Summary.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Summary.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Summary.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Token.d.ts +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Token.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Token.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Organization_Token.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Other_Owner.d.ts +16 -0
- package/dist/esm/modules/common/shared/models/internal/models/Other_Owner.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Other_Owner.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Other_Owner.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Percentage_Owned.d.ts +9 -0
- package/dist/esm/modules/common/shared/models/internal/models/Percentage_Owned.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Percentage_Owned.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Percentage_Owned.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Phone_Number.d.ts +48 -0
- package/dist/esm/modules/common/shared/models/internal/models/Phone_Number.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Phone_Number.js +19 -0
- package/dist/esm/modules/common/shared/models/internal/models/Phone_Number.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Report_Type.d.ts +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Report_Type.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Report_Type.js +9 -0
- package/dist/esm/modules/common/shared/models/internal/models/Report_Type.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Request_ID.d.ts +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Request_ID.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Request_ID.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Request_ID.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/UBO.d.ts +21 -0
- package/dist/esm/modules/common/shared/models/internal/models/UBO.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/UBO.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/UBO.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/USA_Agent.d.ts +12 -0
- package/dist/esm/modules/common/shared/models/internal/models/USA_Agent.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/USA_Agent.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/USA_Agent.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/USA_Officer.d.ts +20 -0
- package/dist/esm/modules/common/shared/models/internal/models/USA_Officer.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/USA_Officer.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/USA_Officer.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Unknown_Entity.d.ts +22 -0
- package/dist/esm/modules/common/shared/models/internal/models/Unknown_Entity.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Unknown_Entity.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Unknown_Entity.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Website_URL.d.ts +4 -0
- package/dist/esm/modules/common/shared/models/internal/models/Website_URL.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/Website_URL.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/Website_URL.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_entity_response.d.ts +7 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_entity_response.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_entity_response.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_entity_response.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_lookup_request.d.ts +14 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_lookup_request.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_lookup_request.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_lookup_request.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_lookup_response.d.ts +12 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_lookup_response.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_lookup_response.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_lookup_response.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_ownership_response.d.ts +7 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_ownership_response.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_ownership_response.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_ownership_response.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_reports_response.d.ts +10 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_reports_response.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_reports_response.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_reports_response.js.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_request_status_response.d.ts +9 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_request_status_response.d.ts.map +1 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_request_status_response.js +5 -0
- package/dist/esm/modules/common/shared/models/internal/models/organizations_request_status_response.js.map +1 -0
- package/dist/esm/modules/config/modules.d.ts +3 -1
- package/dist/esm/modules/config/modules.d.ts.map +1 -1
- package/dist/esm/modules/config/modules.js +2 -0
- package/dist/esm/modules/config/modules.js.map +1 -1
- package/dist/esm/modules/device/definition.d.ts +9 -8
- package/dist/esm/modules/device/definition.d.ts.map +1 -1
- package/dist/esm/modules/device/vendors/Sardine.d.ts +1 -1
- package/dist/esm/modules/device/vendors/Sardine.d.ts.map +1 -1
- package/dist/esm/modules/device/vendors/Sardine.js +32 -21
- package/dist/esm/modules/device/vendors/Sardine.js.map +1 -1
- package/dist/esm/modules/form/definition.d.ts +3 -2
- package/dist/esm/modules/form/definition.d.ts.map +1 -1
- package/dist/esm/modules/form/events.d.ts +10 -0
- package/dist/esm/modules/form/events.d.ts.map +1 -1
- package/dist/esm/modules/form/events.js +17 -0
- package/dist/esm/modules/form/events.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/appConfig.type.d.ts +43 -4
- package/dist/esm/modules/form/vendors/react/appConfig.type.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/appConfig.type.js +2 -0
- package/dist/esm/modules/form/vendors/react/appConfig.type.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/components/base/FrankieTextArea/FrankieTextArea.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/components/base/FrankieTextArea/FrankieTextArea.js +5 -9
- package/dist/esm/modules/form/vendors/react/components/base/FrankieTextArea/FrankieTextArea.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/components/base/SharedInput/Input.js +1 -1
- package/dist/esm/modules/form/vendors/react/components/base/SharedInput/Input.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/components/base/StandardDate/StandardDate.d.ts +1 -1
- package/dist/esm/modules/form/vendors/react/components/base/StandardDate/StandardDate.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/components/base/StandardDate/StandardDate.js +29 -18
- package/dist/esm/modules/form/vendors/react/components/base/StandardDate/StandardDate.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/components/view/FrankieAddress/FrankieAddress.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/components/view/FrankieAddress/FrankieAddress.js +1 -3
- package/dist/esm/modules/form/vendors/react/components/view/FrankieAddress/FrankieAddress.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/components/view/FrankieFormMapper/FrankieFormMapper.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/components/view/FrankieFormMapper/FrankieFormMapper.js +2 -6
- package/dist/esm/modules/form/vendors/react/components/view/FrankieFormMapper/FrankieFormMapper.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/components/view/FrankiePhoneField/FrankiePhoneField.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/components/view/FrankiePhoneField/FrankiePhoneField.js +7 -1
- package/dist/esm/modules/form/vendors/react/components/view/FrankiePhoneField/FrankiePhoneField.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/components/view/ManualAddress/ManualAddress.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/components/view/ManualAddress/ManualAddress.js +1 -3
- package/dist/esm/modules/form/vendors/react/components/view/ManualAddress/ManualAddress.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/components/view/Progress/Progress.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/components/view/Progress/Progress.js +3 -3
- package/dist/esm/modules/form/vendors/react/components/view/Progress/Progress.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/constants/icons.d.ts +4 -0
- package/dist/esm/modules/form/vendors/react/constants/icons.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/constants/icons.js +5 -1
- package/dist/esm/modules/form/vendors/react/constants/icons.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/constants/layoutMapper.const.d.ts +4 -0
- package/dist/esm/modules/form/vendors/react/constants/layoutMapper.const.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/constants/layoutMapper.const.js +7 -1
- package/dist/esm/modules/form/vendors/react/constants/layoutMapper.const.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/constants/staticScreenMapper.const.d.ts +3 -0
- package/dist/esm/modules/form/vendors/react/constants/staticScreenMapper.const.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/Consent/Consent.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/Consent/Consent.js +17 -12
- package/dist/esm/modules/form/vendors/react/features/Consent/Consent.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/Consent/consent.config.d.ts +1 -0
- package/dist/esm/modules/form/vendors/react/features/Consent/consent.config.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/Consent/consent.config.js +1 -0
- package/dist/esm/modules/form/vendors/react/features/Consent/consent.config.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/Consent/hostedBusinessConsent.config.d.ts +25 -0
- package/dist/esm/modules/form/vendors/react/features/Consent/hostedBusinessConsent.config.d.ts.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/Consent/hostedBusinessConsent.config.js +30 -0
- package/dist/esm/modules/form/vendors/react/features/Consent/hostedBusinessConsent.config.js.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/Consent/manualConsent.config.d.ts +1 -0
- package/dist/esm/modules/form/vendors/react/features/Consent/manualConsent.config.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/Consent/manualConsent.config.js +1 -0
- package/dist/esm/modules/form/vendors/react/features/Consent/manualConsent.config.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/DocUpload/DocUpload.d.ts +3 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/DocUpload.d.ts.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/DocUpload.js +202 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/DocUpload.js.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Fail.d.ts +4 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Fail.d.ts.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Fail.js +24 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Fail.js.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Main.d.ts +7 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Main.d.ts.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Main.js +118 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Main.js.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Preview.d.ts +5 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Preview.d.ts.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Preview.js +19 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Preview.js.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Progress.d.ts +6 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Progress.d.ts.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Progress.js +63 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Progress.js.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Review.d.ts +6 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Review.d.ts.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Review.js +63 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Review.js.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Success.d.ts +2 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Success.d.ts.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Success.js +18 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/Success.js.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/index.d.ts +30 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/index.d.ts.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/index.js +16 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/FileUploader/index.js.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/docUpload.config.d.ts +3 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/docUpload.config.d.ts.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/docUpload.config.js +8 -0
- package/dist/esm/modules/form/vendors/react/features/DocUpload/docUpload.config.js.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/IdPreps/driversLicense.config.d.ts +1 -0
- package/dist/esm/modules/form/vendors/react/features/IdPreps/driversLicense.config.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/IdPreps/driversLicense.config.js +1 -0
- package/dist/esm/modules/form/vendors/react/features/IdPreps/driversLicense.config.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/IdPreps/mediCare.config.d.ts +1 -0
- package/dist/esm/modules/form/vendors/react/features/IdPreps/mediCare.config.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/IdPreps/mediCare.config.js +1 -0
- package/dist/esm/modules/form/vendors/react/features/IdPreps/mediCare.config.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/IdPreps/passport.config.d.ts +1 -0
- package/dist/esm/modules/form/vendors/react/features/IdPreps/passport.config.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/IdPreps/passport.config.js +1 -0
- package/dist/esm/modules/form/vendors/react/features/IdPreps/passport.config.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/IdSelection/idSelection.config.d.ts +1 -0
- package/dist/esm/modules/form/vendors/react/features/IdSelection/idSelection.config.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/IdSelection/idSelection.config.js +1 -0
- package/dist/esm/modules/form/vendors/react/features/IdSelection/idSelection.config.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/IdSelection/idSelection.const.d.ts +0 -4
- package/dist/esm/modules/form/vendors/react/features/IdSelection/idSelection.const.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/IdSelection/idSelection.const.js +0 -1
- package/dist/esm/modules/form/vendors/react/features/IdSelection/idSelection.const.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/IdSelection/manualIdSelection.config.d.ts +51 -23
- package/dist/esm/modules/form/vendors/react/features/IdSelection/manualIdSelection.config.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/IdSelection/manualIdSelection.config.js +29 -10
- package/dist/esm/modules/form/vendors/react/features/IdSelection/manualIdSelection.config.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/PersonalDetails/personalDetails.config.d.ts +202 -202
- package/dist/esm/modules/form/vendors/react/features/PersonalDetails/personalDetails.config.js +1 -1
- package/dist/esm/modules/form/vendors/react/features/PersonalDetails/personalDetails.config.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/Result/Result.d.ts +2 -0
- package/dist/esm/modules/form/vendors/react/features/Result/Result.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/Result/Result.js +4 -0
- package/dist/esm/modules/form/vendors/react/features/Result/Result.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/Result/result.config.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/Result/result.config.js +2 -0
- package/dist/esm/modules/form/vendors/react/features/Result/result.config.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/Welcome/Welcome.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/Welcome/Welcome.js +1 -1
- package/dist/esm/modules/form/vendors/react/features/Welcome/Welcome.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/Welcome/hostedBusinessWelcome.config.d.ts +31 -0
- package/dist/esm/modules/form/vendors/react/features/Welcome/hostedBusinessWelcome.config.d.ts.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/Welcome/hostedBusinessWelcome.config.js +44 -0
- package/dist/esm/modules/form/vendors/react/features/Welcome/hostedBusinessWelcome.config.js.map +1 -0
- package/dist/esm/modules/form/vendors/react/features/Welcome/manualWelcome.config.d.ts +4 -0
- package/dist/esm/modules/form/vendors/react/features/Welcome/manualWelcome.config.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/Welcome/manualWelcome.config.js +3 -0
- package/dist/esm/modules/form/vendors/react/features/Welcome/manualWelcome.config.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/Welcome/welcome.config.d.ts +1 -0
- package/dist/esm/modules/form/vendors/react/features/Welcome/welcome.config.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/Welcome/welcome.config.js +1 -0
- package/dist/esm/modules/form/vendors/react/features/Welcome/welcome.config.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/index.d.ts +3 -1
- package/dist/esm/modules/form/vendors/react/features/index.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/features/index.js +3 -1
- package/dist/esm/modules/form/vendors/react/features/index.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/hooks/useConfigFactory.hooks.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/hooks/useConfigFactory.hooks.js +46 -10
- package/dist/esm/modules/form/vendors/react/hooks/useConfigFactory.hooks.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/hooks/useEventContext.d.ts +1 -0
- package/dist/esm/modules/form/vendors/react/hooks/useEventContext.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/hooks/useEventContext.js +2 -1
- package/dist/esm/modules/form/vendors/react/hooks/useEventContext.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/hooks/useFormMapper.hook.d.ts +100 -100
- package/dist/esm/modules/form/vendors/react/hooks/useManualConfigFactory.hook.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/hooks/useManualConfigFactory.hook.js +4 -0
- package/dist/esm/modules/form/vendors/react/hooks/useManualConfigFactory.hook.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/hooks/useManualWrapperFactory.hook.d.ts +426 -0
- package/dist/esm/modules/form/vendors/react/hooks/useManualWrapperFactory.hook.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/hooks/usePersonalDetailsUpdateFactory.hook.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/hooks/usePersonalDetailsUpdateFactory.hook.js +4 -0
- package/dist/esm/modules/form/vendors/react/hooks/usePersonalDetailsUpdateFactory.hook.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/hooks/useReviewUpdateFactory.hook.d.ts +2 -4
- package/dist/esm/modules/form/vendors/react/hooks/useReviewUpdateFactory.hook.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/hooks/useReviewUpdateFactory.hook.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/index.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/index.js +4 -0
- package/dist/esm/modules/form/vendors/react/index.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/model/review.model.d.ts +1 -0
- package/dist/esm/modules/form/vendors/react/model/review.model.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/model/review.model.js +6 -0
- package/dist/esm/modules/form/vendors/react/model/review.model.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/types/pages.type.d.ts +4 -3
- package/dist/esm/modules/form/vendors/react/types/pages.type.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/types/pages.type.js +1 -0
- package/dist/esm/modules/form/vendors/react/types/pages.type.js.map +1 -1
- package/dist/esm/modules/form/vendors/react/utils/object.util.d.ts +16 -1
- package/dist/esm/modules/form/vendors/react/utils/object.util.d.ts.map +1 -1
- package/dist/esm/modules/form/vendors/react/utils/object.util.js +28 -0
- package/dist/esm/modules/form/vendors/react/utils/object.util.js.map +1 -1
- package/dist/esm/modules/frankie-client/clients/ApplicantClient.d.ts +8 -5
- package/dist/esm/modules/frankie-client/clients/ApplicantClient.d.ts.map +1 -1
- package/dist/esm/modules/frankie-client/clients/ApplicantClient.js +19 -15
- package/dist/esm/modules/frankie-client/clients/ApplicantClient.js.map +1 -1
- package/dist/esm/modules/frankie-client/clients/BusinessClient.d.ts +9 -0
- package/dist/esm/modules/frankie-client/clients/BusinessClient.d.ts.map +1 -0
- package/dist/esm/modules/frankie-client/clients/BusinessClient.js +25 -0
- package/dist/esm/modules/frankie-client/clients/BusinessClient.js.map +1 -0
- package/dist/esm/modules/frankie-client/clients/SupportingDocumentsClient.d.ts +14 -0
- package/dist/esm/modules/frankie-client/clients/SupportingDocumentsClient.d.ts.map +1 -0
- package/dist/esm/modules/frankie-client/clients/SupportingDocumentsClient.js +44 -0
- package/dist/esm/modules/frankie-client/clients/SupportingDocumentsClient.js.map +1 -0
- package/dist/esm/modules/individual/actions/email.d.ts +13 -0
- package/dist/esm/modules/individual/actions/email.d.ts.map +1 -0
- package/dist/esm/modules/individual/actions/email.js +19 -0
- package/dist/esm/modules/individual/actions/email.js.map +1 -0
- package/dist/esm/modules/individual/actions/phoneNumber.d.ts +13 -0
- package/dist/esm/modules/individual/actions/phoneNumber.d.ts.map +1 -0
- package/dist/esm/modules/individual/actions/phoneNumber.js +19 -0
- package/dist/esm/modules/individual/actions/phoneNumber.js.map +1 -0
- package/dist/esm/modules/individual/actions/search.d.ts.map +1 -1
- package/dist/esm/modules/individual/actions/search.js +1 -0
- package/dist/esm/modules/individual/actions/search.js.map +1 -1
- package/dist/esm/modules/individual/actions/submit.d.ts.map +1 -1
- package/dist/esm/modules/individual/actions/submit.js +13 -4
- package/dist/esm/modules/individual/actions/submit.js.map +1 -1
- package/dist/esm/modules/individual/definition.d.ts +9 -0
- package/dist/esm/modules/individual/definition.d.ts.map +1 -1
- package/dist/esm/modules/individual/index.d.ts.map +1 -1
- package/dist/esm/modules/individual/index.js +32 -0
- package/dist/esm/modules/individual/index.js.map +1 -1
- package/dist/esm/modules/meta.json +1 -1
- package/dist/esm/modules/ocr/index.d.ts +1 -1
- package/dist/esm/modules/sdk/index.d.ts.map +1 -1
- package/dist/esm/modules/sdk/index.js +9 -5
- package/dist/esm/modules/sdk/index.js.map +1 -1
- package/dist/esm/modules/sdk/types/oneSDK.d.ts +10 -8
- package/dist/esm/modules/sdk/types/oneSDK.d.ts.map +1 -1
- package/dist/esm/modules/session/SessionContext.d.ts +3 -0
- package/dist/esm/modules/session/SessionContext.d.ts.map +1 -1
- package/dist/esm/modules/session/SessionContext.js +7 -0
- package/dist/esm/modules/session/SessionContext.js.map +1 -1
- package/dist/esm/modules/session/SessionFacade.d.ts +7 -1
- package/dist/esm/modules/session/SessionFacade.d.ts.map +1 -1
- package/dist/esm/modules/session/SessionFacade.js +7 -0
- package/dist/esm/modules/session/SessionFacade.js.map +1 -1
- package/dist/esm/modules/types.d.ts +6 -4
- package/dist/esm/modules/types.d.ts.map +1 -1
- package/dist/esm/modules/types.js +1 -1
- package/dist/esm/modules/types.js.map +1 -1
- package/dist/esm/styles/f1-style.css +1 -1
- package/dist/esm/styles/images/CloudUploadOutline.d.ts +5 -0
- package/dist/esm/styles/images/CloudUploadOutline.d.ts.map +1 -0
- package/dist/esm/styles/images/CloudUploadOutline.js +6 -0
- package/dist/esm/styles/images/CloudUploadOutline.js.map +1 -0
- package/dist/esm/styles/images/CloudUploadOutline.tsx +16 -0
- package/dist/esm/styles/images/PencilOutline.d.ts +5 -0
- package/dist/esm/styles/images/PencilOutline.d.ts.map +1 -0
- package/dist/esm/styles/images/PencilOutline.js +6 -0
- package/dist/esm/styles/images/PencilOutline.js.map +1 -0
- package/dist/esm/styles/images/PencilOutline.tsx +16 -0
- package/dist/esm/styles/images/fileDocumentAlertOutline.svg +4 -0
- package/dist/esm/styles/images/fileDocumentCheckOutline.svg +4 -0
- package/dist/esm/styles/images/index.d.ts +5 -1
- package/dist/esm/styles/images/index.d.ts.map +1 -1
- package/dist/esm/styles/images/index.js +5 -1
- package/dist/esm/styles/images/index.js.map +1 -1
- package/dist/esm/styles/images/index.ts +8 -0
- package/dist/umd/67cbc8178ea76ef0d8b4.svg +4 -0
- package/dist/umd/8053f51266aa9d864691.svg +4 -0
- package/dist/umd/biometrics-incode.js +1 -1
- package/dist/umd/device-sardine.js +1 -1
- package/dist/umd/device-sardine.js.map +1 -1
- package/dist/umd/form-legacy.js +1 -1
- package/dist/umd/form-react.js +1 -1
- package/dist/umd/form-react.js.map +1 -1
- package/dist/umd/idv-ocrlabs.js +1 -1
- package/dist/umd/ocr-dummy.js +1 -1
- package/dist/umd/ocr-incode.js +1 -1
- package/dist/umd/ocr-onfido.js +1 -1
- package/dist/umd/ocr-onfido.js.map +1 -1
- package/dist/umd/oneSdk.umd.js +1 -1
- package/dist/umd/oneSdk.umd.js.map +1 -1
- package/dist/version.txt +1 -1
- package/package.json +4 -3
package/dist/umd/idv-ocrlabs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkOneSdk=self.webpackChunkOneSdk||[]).push([[205],{6269:(e,t,n)=>{n.r(t),n.d(t,{initialise:()=>y});var i=n(5473),o=n(1114);class r extends o.V{retrieveAndDelete(e){return t=this,n=void 0,o=function*(){const t=`/data/v1/key-value/${e}`;return this.frankie.get(t,{params:{delete:!0}}).then((e=>e.data))},new((i=void 0)||(i=Promise))((function(e,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(a,s)}c((o=o.apply(t,n||[])).next())}));var t,n,i,o}}var a=n(9188),s=n(1144),c=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};function l(e){return`sessionId:${e}:idv_action_details`}var d=n(
|
|
1
|
+
"use strict";(self.webpackChunkOneSdk=self.webpackChunkOneSdk||[]).push([[205],{6269:(e,t,n)=>{n.r(t),n.d(t,{initialise:()=>y});var i=n(5473),o=n(1114);class r extends o.V{retrieveAndDelete(e){return t=this,n=void 0,o=function*(){const t=`/data/v1/key-value/${e}`;return this.frankie.get(t,{params:{delete:!0}}).then((e=>e.data))},new((i=void 0)||(i=Promise))((function(e,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(a,s)}c((o=o.apply(t,n||[])).next())}));var t,n,i,o}}var a=n(9188),s=n(1144),c=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};function l(e){return`sessionId:${e}:idv_action_details`}var d=n(5635),u=n(9221),f=n(7117),m=n(5353),v=n(4334);function h(...e){return t=this,n=void 0,o=function*(){const[t]=e,{mode:n,session:i,localEventHub:o}=t,r=t.recipe.idv.provider,a=null==r?void 0:r.redirect_uri;try{const{vendorParameters:o}=yield(0,u.N)({frankieClient:t.frankieClient,localEventHub:t.localEventHub,relayState:JSON.stringify({redirect_uri:null!=a?a:window.location.href,sessionId:i.sessionId})});n.is(d.O_.DUMMY)?function(...e){const[t,n]=e,{mountElement:i}=n,{session:o,localEventHub:r}=t,{iframe:a,iframeListener:s}=(0,m.h)(t,{dummyModeOptions:{title:"OCRLabs",errorPayload:{type:"error"},successPayload:{type:"success"},loadedPayload:{type:"loaded"}},iframeMessagingOptions:{emitOnLoad:!1,mapMessageToEvent:({message:e,targetEventHub:t})=>{const{data:n}=e,{type:i}=n;t.emit(i)}},vendorParameters:{tokenURL:"https://not-used.com"}}),c=new f.D,d=l(o.sessionId),u=t.recipe.idv.provider,v=null==u?void 0:u.redirect_uri,h=()=>{v?location.href=v:location.reload()};s.on("success",(()=>{c.store(d,{workflow:"IDV_SUCCESS"}),(0,m.t)({iframe:a,internalEventHub:s}),h()})),s.on("error",(()=>{c.store(d,{workflow:"IDV_ERROR"}),(0,m.t)({iframe:a,internalEventHub:s}),h()})),s.on("loaded",(()=>{r.emit("ready",{domElement:a})})),i.appendChild(a)}(...e):t.frankieClient.redirect(new URL(o.tokenURL))}catch(e){o.emit("error",new v.OneSDKError("Failed initialising a new idv flow",e))}},new((i=void 0)||(i=Promise))((function(e,r){function a(e){try{c(o.next(e))}catch(e){r(e)}}function s(e){try{c(o.throw(e))}catch(e){r(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(a,s)}c((o=o.apply(t,n||[])).next())}));var t,n,i,o}var p=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};const y=(0,i.f)("ocrlabs",((e,t)=>p(void 0,void 0,void 0,(function*(){const n=yield function(e){return p(this,void 0,void 0,(function*(){var t;const{frankieClient:n,session:i}=e,o=new r(n),a=l(i.sessionId);try{const e=yield o.retrieveAndDelete(a),n=null===(t=null==e?void 0:e.value)||void 0===t?void 0:t.workflow;if("IDV_ERROR"===n)return"fail";if("IDV_SUCCESS"===n)return"success";throw new Error("Invalid action")}catch(e){return"new"}}))}(e),{localEventHub:i,session:o}=e;i.on("results",(()=>o.unpersist())),i.on("processing",(()=>o.unpersist())),i.on("error",(()=>o.unpersist())),"success"===n?yield function(e){return c(this,void 0,void 0,(function*(){const{localEventHub:t,frankieClient:n}=e;t.emit("detection_complete");const i=new a.Ns(n),o=yield i.initProcess({isSynchronous:!0});try{const t=e.oneSdkInstance.individual();yield t.search()}catch(e){const n="Error updating data for the individual. Check error events from module 'individual' for more details.This isn't related to IDV capture.";t.emit("warning",{message:n,payload:e})}const r=n.entityId;(0,s.N)({eventHub:t,results:o,entityId:r})}))}(e):"fail"===n?yield function(e){return c(this,void 0,void 0,(function*(){const{localEventHub:t}=e;t.emit("detection_failed",{message:"User flow was unsuccessful"})}))}(e):yield h(e,t)}))))},1144:(e,t,n)=>{n.d(t,{N:()=>r});var i=n(4334),o=n(9188);function r(e){const{eventHub:t,results:n,entityId:r}=e;switch(n.checkStatus){case o.Yt.COMPLETE:t.emit("results",{checkStatus:n.checkStatus,document:n.ocrDocument,entityId:r});break;case o.Yt.FAILED:t.emit("results",{checkStatus:n.checkStatus,document:null,entityId:r});break;case o.Yt.INTERRUPTED:case o.Yt.INCOMPLETE:case o.Yt.DOCUMENTS_INVALID:case o.Yt.WAITING_DOC_UPLOAD:case o.Yt.WAITING_SELFIE_UPLOAD:t.emit("input_required",{entityId:r},n.checkStatus);break;case o.Yt.PROVIDER_OFFLINE:case o.Yt.AWAITING_CONSENT:{const e=n.checkStatus===o.Yt.PROVIDER_OFFLINE?`Provider is offline. Either switch providers and restart or skip IDV temporarily. Status ${o.Yt.PROVIDER_OFFLINE}`:"Consent was not provided to the IDV Api. We can't continue.";t.emit("error",new i.OneSDKError(e,{errorStatus:n.checkStatus}))}break;case o.Yt.CHECK_PROCESSING:t.emit("processing",{checkStatus:n.checkStatus,entityId:r});break;default:{const e=`Unexpected IDV status: ${n.checkStatus}`;t.emit("warning",{message:e,payload:n})}}}},5353:(e,t,n)=>{n.d(t,{t:()=>a,h:()=>r});var i=n(1031),o=n(4334);function r(e,t){const n=document.createElement("iframe"),r=function(e,t){const n=(0,o.mkEventHub)();return t.emitOnLoad&&(e.onload=()=>n.emit("loaded")),window.addEventListener("message",(i=>{i.source===e.contentWindow&&t.mapMessageToEvent({targetEventHub:n,message:i,iframeElement:e,vendorParameters:t.vendorParameters})}),!1),(0,o.mkEventListener)(n)}(n,t.iframeMessagingOptions);return Object.assign(n.style,{position:"absolute",top:0,left:0,right:0,bottom:0,border:0,margin:0,padding:0,width:"100%",height:"100%",fontSize:"100%",font:"inherit",verticalAlign:"baseline"}),n.allow="camera;fullscreen;accelerometer;gyroscope;magnetometer;geolocation;microphone;",e.mode.is(i.t.DUMMY)?n.srcdoc=function(e){const t=(e={})=>`window.parent.postMessage(${JSON.stringify(e)}, "*")`,n=e.loadedPayload?`setTimeout(() => ${t(e.loadedPayload)}, DUMMY_LOAD_DELAY)`:"",i=t(e.successPayload);return`<body style="background-color: white">\n <script>\n const DUMMY_LOAD_DELAY = 500;\n ${n};\n function cancelClicked() {\n ${t(e.errorPayload)};\n }\n function completeClicked() {\n ${i};\n }\n <\/script>\n <h1>${e.title}</h1>\n <p>This is a mocked replacement for the actual screen the IDV vendor will provide.</p>\n <p>\n By clicking the buttons below we will mimick the two possible outcomes for IDV vendor screens\n <ol>\n <li>\n A successful capture of the ID Document and Facial scan\n <ol>\n <li>Will emit a "detection_complete" event</li>\n <li>Will trigger api calls, which will then emit the "results" event</li>\n <li>Will unmount this iframe</li>\n </ol>\n </li>\n <li>\n An error or a use drop out\n <ol>\n <li>Will emit a "detection_failed" event</li>\n <li>Will unmount this iframe</li>\n </ol>\n </li>\n </ol>\n </p>\n <div id="actions-container">\n <button onclick="completeClicked()">Simulate Completion</button>\n <button onclick="cancelClicked()">Simulate Exit/Error</button>\n </div>\n <style>\n #actions-container {\n max-width: 400px;\n }\n button {\n display: block;\n width: 100%;\n height: 40px;\n margin: 10px 0;\n }\n </style>\n </body>`}(t.dummyModeOptions):n.src=t.vendorParameters.tokenURL,{iframe:n,iframeListener:r}}function a(e){e.iframe.srcdoc="",e.internalEventHub.off(),e.iframe.remove()}},9221:(e,t,n)=>{n.d(t,{N:()=>r});var i=n(9188),o=function(e,t,n,i){return new(n||(n=Promise))((function(o,r){function a(e){try{c(i.next(e))}catch(e){r(e)}}function s(e){try{c(i.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((i=i.apply(e,t||[])).next())}))};function r(e){return o(this,void 0,void 0,(function*(){const{localEventHub:t,frankieClient:n}=e;try{const o=new i.Ns(n),{vendorParameters:r,entityId:a}=yield o.getToken({relayState:e.relayState});return t.emit("session_data_generated",{session:Object.assign(Object.assign({},r),{entityId:a})}),{vendorParameters:r,idvClient:o,entityId:a}}catch(e){throw t.emit("session_data_failed_loading"),e}}))}}}]);
|
|
2
2
|
//# sourceMappingURL=idv-ocrlabs.js.map
|
package/dist/umd/ocr-dummy.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkOneSdk=self.webpackChunkOneSdk||[]).push([[834],{4090:(e,t,n)=>{n.d(t,{a:()=>i,g:()=>r});var o=n(4334);const i=e=>{return t=void 0,n=[e],r=function*({sdkVersion:e="12"}){yield(0,o.loadAsyncAsset)(`https://sdk.onfido.com/v${e}`),Number(e)<14&&(yield(0,o.loadAsyncAsset)(`https://sdk.onfido.com/v${e}/style.css`,"style"))},new((i=void 0)||(i=Promise))((function(e,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function d(e){try{c(r.throw(e))}catch(e){o(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(s,d)}c((r=r.apply(t,n||[])).next())}));var t,n,i,r},r=(e,t)=>{const n=document.querySelector("body");new MutationObserver(((n,o)=>{var i;for(const r of n){const n=null===(i=r.addedNodes)||void 0===i?void 0:i[0];(null==n?void 0:n.classList.contains(e))&&(t.emit("ready",{domElement:n}),o.disconnect())}})).observe(n,{childList:!0,subtree:!0})}},9255:(e,t,n)=>{n.d(t,{p:()=>r});var o=n(
|
|
1
|
+
"use strict";(self.webpackChunkOneSdk=self.webpackChunkOneSdk||[]).push([[834],{4090:(e,t,n)=>{n.d(t,{a:()=>i,g:()=>r});var o=n(4334);const i=e=>{return t=void 0,n=[e],r=function*({sdkVersion:e="12"}){yield(0,o.loadAsyncAsset)(`https://sdk.onfido.com/v${e}`),Number(e)<14&&(yield(0,o.loadAsyncAsset)(`https://sdk.onfido.com/v${e}/style.css`,"style"))},new((i=void 0)||(i=Promise))((function(e,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function d(e){try{c(r.throw(e))}catch(e){o(e)}}function c(t){var n;t.done?e(t.value):(n=t.value,n instanceof i?n:new i((function(e){e(n)}))).then(s,d)}c((r=r.apply(t,n||[])).next())}));var t,n,i,r},r=(e,t)=>{const n=document.querySelector("body");new MutationObserver(((n,o)=>{var i;for(const r of n){const n=null===(i=r.addedNodes)||void 0===i?void 0:i[0];(null==n?void 0:n.classList.contains(e))&&(t.emit("ready",{domElement:n}),o.disconnect())}})).observe(n,{childList:!0,subtree:!0})}},9255:(e,t,n)=>{n.d(t,{p:()=>r});var o=n(5635),i=n(4334);const r={[o.By.COMPLETE]:({ocrDocument:e,ocrClient:t,eventHub:n})=>n.emit("results",{document:e,entityId:t.entityId}),[o.By.WAITING_OCR_RUN]:({eventHub:e})=>{e.emit("error",new i.OneSDKError(`Two attempts to get OCR results failed with an unresolved "${o.By.WAITING_OCR_RUN}". This is a system failure.`,{payload:null}))},[o.By.PROVIDER_OFFLINE]:({eventHub:e})=>e.emit("error",new i.OneSDKError(`Provider is offline. Either switch providers and restart or skip OCR temporarily. Status ${o.By.PROVIDER_OFFLINE}`,{payload:null})),default:({documentStatus:e,eventHub:t})=>t.emit("input_required",{documentType:null,side:"front"},e,(()=>({})))}},9687:(e,t,n)=>{n.r(t),n.d(t,{initialise:()=>u});var o=n(4334),i=n(5473),r=n(4090),s=n(9188),d=n(325),c=n(9255),a=function(e,t,n,o){return new(n||(n=Promise))((function(i,r){function s(e){try{c(o.next(e))}catch(e){r(e)}}function d(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,d)}c((o=o.apply(e,t||[])).next())}))};const u=(0,i.f)("dummy-ocr",((e,t)=>a(void 0,void 0,void 0,(function*(){const{frankieClient:n}=e,{mountElement:o,eventHub:i}=t,c=new s.Ns(n),u=new d.UZ(n);try{const{entityId:t,token:n,vendorParameters:s}=yield c.getToken();i.emit("session_data_generated",{session:{entityId:t,token:n,vendorParameters:s}}),(0,r.g)("dummy-ocr-modal",i);const y=document.createElement("div");Object.assign(y.style,{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",justifyContent:"center",alignItems:"center"}),y.className="dummy-ocr-modal",o.appendChild(y);const v=document.createElement("div");v.style.backgroundColor="#fff",v.style.padding="200px",v.style.borderRadius="5px",y.appendChild(v);const f=document.createElement("button");f.id="run-ocr-button",f.textContent="Run OCR",f.addEventListener("click",(()=>a(void 0,void 0,void 0,(function*(){const{oneSdkInstance:t}=e;yield l(u,i,t),m(y,i)})))),v.appendChild(f);const p=document.createElement("button");p.id="close-button",p.textContent="Close",p.addEventListener("click",(()=>{i.emit("input_required",{documentType:null,side:"front"},d.By.INTERRUPTED,(()=>({}))),m(y,i)})),v.appendChild(p)}catch(e){const{code:t=null,message:n=""}=e;i.emit("session_data_failed_loading",{code:t,message:n})}return{}})))),l=(e,t,n)=>a(void 0,void 0,void 0,(function*(){var i;try{let o=yield e.attachNewOCRDocument();o.documentStatus===d.By.WAITING_OCR_RUN&&(o=yield e.rerun(o.ocrDocument.documentId));const{ocrDocument:r,documentStatus:s}=o;(null!==(i=c.p[s])&&void 0!==i?i:c.p.default)({ocrDocument:r,documentStatus:s,ocrClient:e,eventHub:t}),yield n.individual().search()}catch(e){const{message:n=""}=e;t.emit("error",new o.OneSDKError("Error from OCR documents submission",{message:n}))}})),m=(e,t)=>{try{e.remove(),t.emit("session_closed")}catch(e){const{type:n=null,message:i=""}=e;t.emit("error",new o.OneSDKError("Error from vendor SDK 'Onfido'",{type:n,message:i}))}}}}]);
|
|
2
2
|
//# sourceMappingURL=ocr-dummy.js.map
|
package/dist/umd/ocr-incode.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkOneSdk=self.webpackChunkOneSdk||[]).push([[192],{1272:(e,n,t)=>{t.d(n,{g6:()=>c,ai:()=>l,Yv:()=>d});var o=t(4334),r=t(
|
|
1
|
+
"use strict";(self.webpackChunkOneSdk=self.webpackChunkOneSdk||[]).push([[192],{1272:(e,n,t)=>{t.d(n,{g6:()=>c,ai:()=>l,Yv:()=>d});var o=t(4334),r=t(5635),i=t(4527);const c=(e,{eventHub:n,entityId:t})=>{let c=!1;const s=["InternalServerError","skip","OSVersionNotSupported","browserNotSupported"];return{biometrics:{onLog:({type:e})=>{"noAttemps"===e&&(c=!0)},onError:({type:e,payload:i})=>{c?n.emit("detection_failed",{message:null==i?void 0:i.message}):"permissionDenied"===e?n.emit("input_required",{entityId:t},r.Yt.INTERRUPTED):s.includes(e)&&n.emit("error",new o.OneSDKError("Error from vendor SDK 'Incode'",{type:e,payload:i}))}},ocr:{onLog:({type:e,payload:t})=>{["IDNotDetected","nothingHappened","manualCaptureOn","successCapture","attemptFailed","success"].includes(e)?n.emit("info",{message:null==t?void 0:t.message,payload:{type:e}}):"noAttemps"===e&&(c=!0)},onError:({type:e,payload:t})=>{c?n.emit("detection_failed",{message:null==t?void 0:t.message}):"permissionDenied"===e?n.emit("input_required",{documentType:null,side:"front"},i.By.INTERRUPTED,(()=>({}))):s.includes(e)&&n.emit("error",new o.OneSDKError("Error from vendor SDK 'Incode'",{type:e,payload:t}))}}}[e]};var s=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function c(e){try{d(o.next(e))}catch(e){i(e)}}function s(e){try{d(o.throw(e))}catch(e){i(e)}}function d(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(c,s)}d((o=o.apply(e,n||[])).next())}))};const d=(e,n)=>s(void 0,void 0,void 0,(function*(){if("ocr"===e)return yield a("front",Object.assign(Object.assign({},n),{onSuccess:e=>s(void 0,[e],void 0,(function*({skipBackIdCapture:e,typeOfId:t,countryCode:o}){var r,i;(null===(r=null==n?void 0:n.validate)||void 0===r?void 0:r.call(n,{typeOfId:t,countryCode:o}))&&(e?null===(i=null==n?void 0:n.onSuccess)||void 0===i||i.call(n,{}):yield a("back",n))}))}));if("biometrics"===e)return yield a("selfie",n);throw new o.OneSDKError("Unknown purpose",{purpose:e})})),a=(e,n)=>s(void 0,void 0,void 0,(function*(){const{incode:t,token:r,eventHub:i,mountElement:c,onSuccess:d=(()=>({})),onError:a,onLog:u}=n;return new Promise(((n,l)=>{try{t.renderCamera(e,c,{onSuccess:e=>s(void 0,void 0,void 0,(function*(){return d(e),n({})})),onError:e=>(a(e),l(e)),onLog:e=>{u(e)},token:r,numberOfTries:3})}catch(e){const{message:n=""}=e;return i.emit("error",new o.OneSDKError("Error from vendor SDK 'Incode'",{message:n})),l(e)}}))}));var u=function(e,n,t,o){return new(t||(t=Promise))((function(r,i){function c(e){try{d(o.next(e))}catch(e){i(e)}}function s(e){try{d(o.throw(e))}catch(e){i(e)}}function d(e){var n;e.done?r(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(c,s)}d((o=o.apply(e,n||[])).next())}))};const l=e=>u(void 0,[e],void 0,(function*({apiURL:e,sdkVersion:n="1.69.1"}){return yield(0,o.loadAsyncAsset)(`https://sdk.incode.com/sdk/onBoarding-${n}.js`),{incode:yield v({apiURL:`${e}/0/`})}})),v=e=>u(void 0,[e],void 0,(function*({apiURL:e}){const n=window.OnBoarding.create({apiURL:e});return yield n.warmup(),n}))},6164:(e,n,t)=>{t.r(n),t.d(n,{initialise:()=>l});var o=t(591),r=t(5635),i=t(4334),c=t(5473),s=t(1272),d=t(9188),a=t(6151),u=t(4576);const l=(0,c.f)("incode",((e,n)=>{return t=void 0,c=void 0,m=function*(){const{frankieClient:t,recipe:{ocr:{documents:c,provider:l}},localEventHub:m}=e,{mountElement:p,eventHub:y}=n,f=new d.Ns(t),g=yield(0,a.j)(f,y);if(!g)return void m.emit("loading",!1,{message:"Failed while loading session for vendor 'Incode'"});const{vendorParameters:w}=g;try{const{apiURL:t,token:i,interviewId:d}=w,{incode:a}=yield(0,s.ai)({apiURL:t,sdkVersion:"incode"===l.name&&l.sdkVersion}),{onLog:m,onError:f}=(0,s.g6)("ocr",{eventHub:y}),g={incode:a,token:{token:i,interviewId:d},eventHub:y,mountElement:p,onError:f,onLog:m},E=(0,s.Yv)("ocr",Object.assign(Object.assign({},g),{validate:({typeOfId:e,countryCode:n})=>{var t;y.emit("info",{message:"onSuccess",payload:{typeOfId:e,countryCode:n}});const o=e=>{y.emit("input_required",{documentType:e,side:"front"},r.By.DOCUMENTS_INVALID,(()=>({})))};if(!c)return!0;const i=c.find((({type:n})=>n===(v[e]||e)));return i?!(null==i?void 0:i.countries)||!!(null===(t=null==i?void 0:i.countries)||void 0===t?void 0:t.includes(n))||(o(i.type),!1):(o(c[0].type),!1)},onSuccess:()=>{y.emit("session_closed"),(0,u.K)(e,Object.assign(Object.assign({},n),{attachReviewScreen:!(0,o.T)("modules.ocr.containsReviewScreen.incode")}))}}));y.emit("ready",{domElement:p}),y.emit("loading",!1,{message:"Vendor 'Incode' screen has loaded"}),yield E}catch(e){const{type:n=null,message:t=""}=e;y.emit("error",new i.OneSDKError("Error from vendor SDK 'Incode'",{type:n,message:t})),y.emit("loading",!1,{message:"Failed while executing vendor 'Incode'"})}return{}},new((l=void 0)||(l=Promise))((function(e,n){function o(e){try{i(m.next(e))}catch(e){n(e)}}function r(e){try{i(m.throw(e))}catch(e){n(e)}}function i(n){var t;n.done?e(n.value):(t=n.value,t instanceof l?t:new l((function(e){e(t)}))).then(o,r)}i((m=m.apply(t,c||[])).next())}));var t,c,l,m})),v={Passport:"PASSPORT",DriversLicense:"DRIVERS_LICENCE",MedicalCard:"NATIONAL_HEALTH_ID"}},6151:(e,n,t)=>{t.d(n,{j:()=>o});const o=(e,n)=>{return t=void 0,o=void 0,i=function*(){try{const{entityId:t,token:o,vendorParameters:r}=yield e.getToken();return n.emit("session_data_generated",{session:{entityId:t,token:o,vendorParameters:r}}),{entityId:t,token:o,vendorParameters:r}}catch(e){const{code:t=null,message:o=""}=e;return n.emit("session_data_failed_loading",{code:t,message:o}),null}},new((r=void 0)||(r=Promise))((function(e,n){function c(e){try{d(i.next(e))}catch(e){n(e)}}function s(e){try{d(i.throw(e))}catch(e){n(e)}}function d(n){var t;n.done?e(n.value):(t=n.value,t instanceof r?t:new r((function(e){e(t)}))).then(c,s)}d((i=i.apply(t,o||[])).next())}));var t,o,r,i}},4576:(e,n,t)=>{t.d(n,{K:()=>a});var o=t(591),r=t(4334),i=t(846),c=t(325),s=t(9255),d=t(4527);const a=(e,n)=>{return t=void 0,a=void 0,l=function*(){var t,a;const{frankieClient:u,oneSdkInstance:l,localEventHub:v}=e;try{const m=new c.UZ(u);v.emit("loading",!0,{message:"Retrieving IDV results"});let p=yield m.attachNewOCRDocument();p.documentStatus===d.By.WAITING_OCR_RUN&&(p=yield m.rerun(p.ocrDocument.documentId)),yield l.individual().search();const{ocrDocument:y,documentStatus:f}=p,g=null!==(t=s.p[f])&&void 0!==t?t:s.p.default,w=(0,r.mkEventHub)(),E=n.mountElement,I=null!==(a=e.recipe.ocr.provideReviewScreen)&&void 0!==a?a:(0,o.T)("recipeDefaults.ocr.provideReviewScreen");w.on("results",(0,i.n)({localEventHub:v,mountElement:E,oneSdkInstance:l,attachForm:I&&n.attachReviewScreen})),w.map(["input_required","error"],v),g({ocrDocument:y,documentStatus:f,ocrClient:m,eventHub:w})}catch(e){v.emit("error",new r.OneSDKError("Failed submitting and retrieving OCR results",e)),v.emit("loading",!1,{message:"Failed retrieving OCR results"})}},new((u=void 0)||(u=Promise))((function(e,n){function o(e){try{i(l.next(e))}catch(e){n(e)}}function r(e){try{i(l.throw(e))}catch(e){n(e)}}function i(n){var t;n.done?e(n.value):(t=n.value,t instanceof u?t:new u((function(e){e(t)}))).then(o,r)}i((l=l.apply(t,a||[])).next())}));var t,a,u,l}},9255:(e,n,t)=>{t.d(n,{p:()=>i});var o=t(5635),r=t(4334);const i={[o.By.COMPLETE]:({ocrDocument:e,ocrClient:n,eventHub:t})=>t.emit("results",{document:e,entityId:n.entityId}),[o.By.WAITING_OCR_RUN]:({eventHub:e})=>{e.emit("error",new r.OneSDKError(`Two attempts to get OCR results failed with an unresolved "${o.By.WAITING_OCR_RUN}". This is a system failure.`,{payload:null}))},[o.By.PROVIDER_OFFLINE]:({eventHub:e})=>e.emit("error",new r.OneSDKError(`Provider is offline. Either switch providers and restart or skip OCR temporarily. Status ${o.By.PROVIDER_OFFLINE}`,{payload:null})),default:({documentStatus:e,eventHub:n})=>n.emit("input_required",{documentType:null,side:"front"},e,(()=>({})))}}}]);
|
|
2
2
|
//# sourceMappingURL=ocr-incode.js.map
|
package/dist/umd/ocr-onfido.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkOneSdk=self.webpackChunkOneSdk||[]).push([[849],{4090:(e,n,t)=>{t.d(n,{a:()=>i,g:()=>r});var o=t(4334);const i=e=>{return n=void 0,t=[e],r=function*({sdkVersion:e="12"}){yield(0,o.loadAsyncAsset)(`https://sdk.onfido.com/v${e}`),Number(e)<14&&(yield(0,o.loadAsyncAsset)(`https://sdk.onfido.com/v${e}/style.css`,"style"))},new((i=void 0)||(i=Promise))((function(e,o){function
|
|
1
|
+
"use strict";(self.webpackChunkOneSdk=self.webpackChunkOneSdk||[]).push([[849],{4090:(e,n,t)=>{t.d(n,{a:()=>i,g:()=>r});var o=t(4334);const i=e=>{return n=void 0,t=[e],r=function*({sdkVersion:e="12"}){yield(0,o.loadAsyncAsset)(`https://sdk.onfido.com/v${e}`),Number(e)<14&&(yield(0,o.loadAsyncAsset)(`https://sdk.onfido.com/v${e}/style.css`,"style"))},new((i=void 0)||(i=Promise))((function(e,o){function s(e){try{c(r.next(e))}catch(e){o(e)}}function d(e){try{c(r.throw(e))}catch(e){o(e)}}function c(n){var t;n.done?e(n.value):(t=n.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,d)}c((r=r.apply(n,t||[])).next())}));var n,t,i,r},r=(e,n)=>{const t=document.querySelector("body");new MutationObserver(((t,o)=>{var i;for(const r of t){const t=null===(i=r.addedNodes)||void 0===i?void 0:i[0];(null==t?void 0:t.classList.contains(e))&&(n.emit("ready",{domElement:t}),o.disconnect())}})).observe(t,{childList:!0,subtree:!0})}},87:(e,n,t)=>{t.r(n),t.d(n,{initialise:()=>p});var o=t(591),i=t(4334),r=t(5473),s=t(1057),d=t(4090),c=t(9188),a=t(325),u=t(6151),l=t(4576),v=function(e,n,t,o){return new(t||(t=Promise))((function(i,r){function s(e){try{c(o.next(e))}catch(e){r(e)}}function d(e){try{c(o.throw(e))}catch(e){r(e)}}function c(e){var n;e.done?i(e.value):(n=e.value,n instanceof t?n:new t((function(e){e(n)}))).then(s,d)}c((o=o.apply(e,n||[])).next())}))};const m="passport",f="driving_licence",y="national_identity_card",p=(0,r.f)("onfido",((e,n)=>v(void 0,void 0,void 0,(function*(){const{frankieClient:t,recipe:r}=e,{ocr:{provider:p,documents:g}}=r,{mountElement:E,eventHub:w}=n,O=new c.Ns(t),I=yield(0,u.j)(O,w);if(!I)return void w.emit("loading",!1,{message:"Failed while loading session for vendor 'Onfido'"});(0,d.g)("onfido-sdk-ui-Theme-portal",w),w.on("ready",(()=>w.emit("loading",!1,{message:"Vendor 'Onfido' screen has loaded"}))),yield(0,d.a)({sdkVersion:"onfido"===p.name&&p.sdkVersion});const R=function(e){const n={type:"document",options:{documentTypes:{}}};return e?(e.forEach((({type:e,countries:t})=>{e!==s.KG.NATIONAL_HEALTH_ID&&e!==s.KG.NATIONAL_ID||(n.options.documentTypes[y]="ALL"===t[0]||{country:t[0]}),e===s.KG.PASSPORT&&(n.options.documentTypes[m]="ALL"===t[0]||{country:t[0]}),e===s.KG.DRIVERS_LICENCE&&(n.options.documentTypes[f]="ALL"===t[0]||{country:t[0]})})),n):(n.options.documentTypes={[m]:!0,[y]:!0,[f]:!0},n)}(g),{token:b}=I,T=window.Onfido.init(Object.assign(Object.assign({steps:[R]},((e,n)=>({token:e,containerEl:n,useModal:!0,isModalOpen:!0,disableAnalytics:!0,disableAnalyticsCookies:!0}))(b,E)),{customUI:"onfido"===p.name&&p.customUI,onComplete:()=>v(void 0,void 0,void 0,(function*(){yield h(T,{eventHub:w}),(0,l.K)(e,Object.assign(Object.assign({},n),{attachReviewScreen:!(0,o.T)("modules.ocr.containsReviewScreen.onfido")}))})),onError:e=>((e,n)=>v(void 0,void 0,void 0,(function*(){const{type:t=null,message:o=""}=n;w.emit("error",new i.OneSDKError("Error from vendor SDK 'Onfido'",{type:t,message:o})),yield h(e,{eventHub:w,loadingEvent:"Failed while executing vendor 'Onfido'"})})))(T,e),onUserExit:()=>v(void 0,void 0,void 0,(function*(){return(e=>v(void 0,void 0,void 0,(function*(){w.emit("input_required",{documentType:null,side:"front"},a.By.INTERRUPTED,(()=>({}))),yield h(e,{eventHub:w,loadingEvent:"User exited"})})))(T)})),onModalRequestClose:()=>v(void 0,void 0,void 0,(function*(){return(e=>v(void 0,void 0,void 0,(function*(){w.emit("input_required",{documentType:null,side:"front"},a.By.INTERRUPTED,(()=>({}))),yield h(e,{eventHub:w,loadingEvent:"User exited"})})))(T)}))}));return{}})))),h=(e,n)=>v(void 0,void 0,void 0,(function*(){const{eventHub:t,loadingEvent:o}=n;try{yield e.safeTearDown(),t.emit("session_closed")}catch(e){const{type:n=null,message:o=""}=e;t.emit("error",new i.OneSDKError("Error from vendor SDK 'Onfido'",{type:n,message:o}))}finally{o&&t.emit("loading",!1,{message:o})}}))},6151:(e,n,t)=>{t.d(n,{j:()=>o});const o=(e,n)=>{return t=void 0,o=void 0,r=function*(){try{const{entityId:t,token:o,vendorParameters:i}=yield e.getToken();return n.emit("session_data_generated",{session:{entityId:t,token:o,vendorParameters:i}}),{entityId:t,token:o,vendorParameters:i}}catch(e){const{code:t=null,message:o=""}=e;return n.emit("session_data_failed_loading",{code:t,message:o}),null}},new((i=void 0)||(i=Promise))((function(e,n){function s(e){try{c(r.next(e))}catch(e){n(e)}}function d(e){try{c(r.throw(e))}catch(e){n(e)}}function c(n){var t;n.done?e(n.value):(t=n.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,d)}c((r=r.apply(t,o||[])).next())}));var t,o,i,r}},4576:(e,n,t)=>{t.d(n,{K:()=>a});var o=t(591),i=t(4334),r=t(846),s=t(325),d=t(9255),c=t(4527);const a=(e,n)=>{return t=void 0,a=void 0,l=function*(){var t,a;const{frankieClient:u,oneSdkInstance:l,localEventHub:v}=e;try{const m=new s.UZ(u);v.emit("loading",!0,{message:"Retrieving IDV results"});let f=yield m.attachNewOCRDocument();f.documentStatus===c.By.WAITING_OCR_RUN&&(f=yield m.rerun(f.ocrDocument.documentId)),yield l.individual().search();const{ocrDocument:y,documentStatus:p}=f,h=null!==(t=d.p[p])&&void 0!==t?t:d.p.default,g=(0,i.mkEventHub)(),E=n.mountElement,w=null!==(a=e.recipe.ocr.provideReviewScreen)&&void 0!==a?a:(0,o.T)("recipeDefaults.ocr.provideReviewScreen");g.on("results",(0,r.n)({localEventHub:v,mountElement:E,oneSdkInstance:l,attachForm:w&&n.attachReviewScreen})),g.map(["input_required","error"],v),h({ocrDocument:y,documentStatus:p,ocrClient:m,eventHub:g})}catch(e){v.emit("error",new i.OneSDKError("Failed submitting and retrieving OCR results",e)),v.emit("loading",!1,{message:"Failed retrieving OCR results"})}},new((u=void 0)||(u=Promise))((function(e,n){function o(e){try{r(l.next(e))}catch(e){n(e)}}function i(e){try{r(l.throw(e))}catch(e){n(e)}}function r(n){var t;n.done?e(n.value):(t=n.value,t instanceof u?t:new u((function(e){e(t)}))).then(o,i)}r((l=l.apply(t,a||[])).next())}));var t,a,u,l}},9255:(e,n,t)=>{t.d(n,{p:()=>r});var o=t(5635),i=t(4334);const r={[o.By.COMPLETE]:({ocrDocument:e,ocrClient:n,eventHub:t})=>t.emit("results",{document:e,entityId:n.entityId}),[o.By.WAITING_OCR_RUN]:({eventHub:e})=>{e.emit("error",new i.OneSDKError(`Two attempts to get OCR results failed with an unresolved "${o.By.WAITING_OCR_RUN}". This is a system failure.`,{payload:null}))},[o.By.PROVIDER_OFFLINE]:({eventHub:e})=>e.emit("error",new i.OneSDKError(`Provider is offline. Either switch providers and restart or skip OCR temporarily. Status ${o.By.PROVIDER_OFFLINE}`,{payload:null})),default:({documentStatus:e,eventHub:n})=>n.emit("input_required",{documentType:null,side:"front"},e,(()=>({})))}}}]);
|
|
2
2
|
//# sourceMappingURL=ocr-onfido.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ocr-onfido.js","mappings":"sIAIO,MAAMA,EAAU,IAAgD,O,OAAD,E,EAAA,I,EAAA,WAAxC,WAAEC,EAAa,aAErC,IAAAC,gBAAe,2BAA2BD,KAE5CE,OAAOF,GAAc,WACjB,IAAAC,gBAAe,2BAA2BD,cAAwB,SAE5E,E,YAPsE,K,6QAOrE,EAEYG,EAAe,CAC1BC,EACAC,KAGA,MAAMC,EAAaC,SAASC,cAAc,QAEzB,IAAIC,kBAAiB,CACpCC,EACAC,K,MAEA,IAAK,MAAMC,KAAYF,EAAW,CAChC,MAAMG,EAAqC,QAAnB,EAAAD,EAASE,kBAAU,eAAG,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4FAA4F,KAAUuC,mBACtG,CAAED,QAAS,QAGjBV,QAAS,EAAGR,iBAAgBvF,cAC1BA,EAASY,KAAK,iBAAkB,CAAE0D,aAAc,KAAMC,KAAM,SAAWgB,GAAgB,KAAM,CAAG,K","sources":["webpack://OneSdk/./modules/common/vendors/onfido/index.ts","webpack://OneSdk/./modules/common/shared/models/SupportingDocument.ts","webpack://OneSdk/./modules/ocr/vendors/Onfido/index.ts","webpack://OneSdk/./modules/ocr/vendors/common/createSession.ts","webpack://OneSdk/./modules/ocr/vendors/common/initProcess.ts","webpack://OneSdk/./modules/ocr/vendors/common/statusEvaluators.ts"],"sourcesContent":["import type { Events as BiometricsEvents } from '@module/biometrics';\nimport { type EventHub, loadAsyncAsset } from '@module/common';\nimport type { Events as OcrEvents } from '@module/ocr';\n\nexport const install = async ({ sdkVersion = '12' }): Promise<void> => {\n // install Onfido script from CDN\n await loadAsyncAsset(`https://sdk.onfido.com/v${sdkVersion}`);\n // note that from version 14 onwards, a separate stylesheet is no longer required as it will be included with the default library.\n if (Number(sdkVersion) < 14 && process.env.NODE_ENV !== 'test') {\n await loadAsyncAsset(`https://sdk.onfido.com/v${sdkVersion}/style.css`, 'style');\n }\n};\n\nexport const observeReady = (\n mutationClass: string,\n eventHub: EventHub<BiometricsEvents | OcrEvents>,\n): void => {\n // Select the target node\n const targetNode = document.querySelector('body');\n // Create an observer instance\n const observer = new MutationObserver((\n mutations: MutationRecord[],\n observer: MutationObserver,\n ) => {\n for (const mutation of mutations) {\n const mutationElement = mutation.addedNodes?.[0] as HTMLElement;\n if (mutationElement?.classList.contains(mutationClass)) {\n eventHub.emit('ready', { domElement: mutationElement });\n // stop observing\n observer.disconnect();\n }\n }\n });\n // Options for the observer (which mutations to observe)\n const config = { childList: true, subtree: true };\n // Start observing the target node for specified mutations\n observer.observe(targetNode, config);\n};\n","import { Scan, TScan } from \"./Document\";\nimport { ICloneable, Nullable } from \"./general\";\nimport { IChangeStamp } from \"./IChangeStamp\";\n\n// TODO Values to be decided\nexport enum DocumentType {\n DRIVERS_LICENCE = \"DRIVERS_LICENCE\",\n PASSPORT = \"PASSPORT\",\n VISA = \"VISA\",\n IMMIGRATION = \"IMMIGRATION\",\n NATIONAL_ID = \"NATIONAL_ID\",\n NATIONAL_HEALTH_ID = \"NATIONAL_HEALTH_ID\",\n CONCESSION = \"CONCESSION\",\n HEALTH_CONCESSION = \"HEALTH_CONCESSION\",\n PENSION = \"PENSION\",\n MILITARY_ID = \"MILITARY_ID\",\n BIRTH_CERT = \"BIRTH_CERT\",\n CITIZENSHIP = \"CITIZENSHIP\",\n MARRIAGE_CERT = \"MARRIAGE_CERT\",\n DEATH_CERT = \"DEATH_CERT\",\n NAME_CHANGE = \"NAME_CHANGE\",\n UTILITY_BILL = \"UTILITY_BILL\",\n BANK_STATEMENT = \"BANK_STATEMENT\",\n BANK_ACCOUNT = \"BANK_ACCOUNT\",\n INTENT_PROOF = \"INTENT_PROOF\",\n SELF_IMAGE = \"SELF_IMAGE\",\n EMAIL_ADDRESS = \"EMAIL_ADDRESS\",\n MSISDN = \"MSISDN\",\n DEVICE = \"DEVICE\",\n VEHICLE_REGISTRATION = \"VEHICLE_REGISTRATION\",\n PROOF_OF_ADDRESS = \"PROOF_OF_ADDRESS\",\n EXTERNAL_ADMIN = \"EXTERNAL_ADMIN\",\n CHARGES = \"CHARGES\",\n PRE_ASIC = \"PRE_ASIC\",\n ANNUAL_RETURN = \"ANNUAL_RETURN\",\n REPORT = \"REPORT\",\n TRUST_DEED = \"TRUST_DEED\",\n PARTNERSHIP_AGREEMENT = \"PARTNERSHIP_AGREEMENT\",\n ADMIN_CHANGE = \"ADMIN_CHANGE\",\n COMPANY_REPORT = \"COMPANY_REPORT\",\n CHECK_RESULTS = \"CHECK_RESULTS\",\n OTHER = \"OTHER\",\n RENTAL_AGREEMENT = \"RENTAL_AGREEMENT\",\n TAX_STATEMENT = \"TAX_STATEMENT\",\n HOUSE_REGISTRATION = \"HOUSE_REGISTRATION\",\n YELLOW_HOUSE_REGISTRATION = \"YELLOW_HOUSE_REGISTRATION\",\n WORK_PERMIT = \"WORK_PERMIT\",\n EMPLOYMENT_CERTIFICATE = \"EMPLOYMENT_CERTIFICATE\",\n NOTARY_PUBLIC_ID = \"NOTARY_PUBLIC_ID\",\n}\n\nexport enum DocumentStatus {\n APPROVED = \"APPROVED\",\n DECLINED = \"DECLINED\",\n NEEDS_REVIEW = \"NEEDS_REVIEW\",\n}\n\nexport type SupportingDocumentReference = {\n uuid: string;\n type: string;\n};\n\nexport const ALLOWED_MIME_TYPES = [\n \"image/jpeg\",\n \"image/png\",\n \"image/gif\",\n \"image/webp\",\n \"image/tiff\",\n \"image/bmp\",\n \"application/pdf\",\n];\n\nexport const ALLOWED_MIME_TYPES_STRING = ALLOWED_MIME_TYPES.join(\", \");\n\nexport interface ISupportingDocument {\n id?: Nullable<string>;\n type: DocumentType;\n label: string;\n file: Nullable<Scan>;\n status?: Nullable<DocumentStatus>;\n modified?: Nullable<IChangeStamp>;\n reviewed?: Nullable<IChangeStamp>;\n refer?: Nullable<SupportingDocumentReference>;\n smartUiDocOrder?: Nullable<number>;\n}\nexport interface ISupportingDocumentPayload {\n id?: Nullable<string>;\n type: DocumentType;\n label: string;\n file: Nullable<TScan>;\n status?: Nullable<DocumentStatus>;\n modified?: Nullable<IChangeStamp>;\n reviewed?: Nullable<IChangeStamp>;\n refer?: Nullable<SupportingDocumentReference>;\n smartUiDocOrder?: Nullable<number>;\n}\n\nexport class SupportingDocument implements ISupportingDocument, ICloneable<SupportingDocument> {\n id: Nullable<string>;\n type: DocumentType = DocumentType.OTHER;\n label: string;\n file: Nullable<Scan>;\n status: Nullable<DocumentStatus>;\n modified: Nullable<IChangeStamp>;\n reviewed: Nullable<IChangeStamp>;\n refer: Nullable<SupportingDocumentReference>;\n smartUiDocOrder: Nullable<number>;\n\n constructor(payload: ISupportingDocument) {\n this.id = payload.id ?? null;\n this.type = payload.type;\n this.label = payload.label;\n this.file = payload.file ?? null;\n this.status = payload.status ?? null;\n this.modified = payload.modified ?? null;\n this.reviewed = payload.reviewed ?? null;\n this.refer = payload.refer ?? null;\n this.smartUiDocOrder = payload.smartUiDocOrder ?? null;\n }\n clone(): SupportingDocument {\n return SupportingDocument.fromJSON(this.toJSON());\n }\n\n toJSON(): ISupportingDocument {\n const file = this.file ? this.file.toJSON() : null;\n return {\n ...this,\n file,\n };\n }\n\n static fromJSON(payload: ISupportingDocumentPayload): SupportingDocument {\n const file = payload.file ? Scan.fromJSON(payload.file) : null;\n return new SupportingDocument({\n ...payload,\n file,\n });\n }\n}\n","import { feat } from '@feature-flags';\nimport type { EventHub } from '@module/common';\nimport { OneSDKError } from '@module/common';\nimport { defineWrapper } from '@module/common/modules/defineModule';\nimport { DocumentType } from '@module/common/shared/models/SupportingDocument';\nimport { install, observeReady } from '@module/common/vendors/onfido';\nimport type {\n SdkError,\n SdkHandle,\n SdkOptions,\n StepDefinition,\n} from '@module/common/vendors/onfido/onfido.types';\nimport { IDVClient } from '@module/frankie-client/clients/IDVClient';\nimport { OCRStatus } from '@module/frankie-client/clients/OCRClient';\nimport type { Events, OCRModule, OCRRecipeOptions } from '@module/ocr';\nimport { createSession } from '@module/ocr/vendors/common/createSession';\nimport { initProcessAndEvaluateResults } from '@module/ocr/vendors/common/initProcess';\n\nconst ONFIDO_ACCEPTABLE_DOCUMENTS = {\n Passport: 'passport',\n DriversLicense: 'driving_licence',\n Medicare: 'national_identity_card',\n};\n\nexport const initialise = defineWrapper<OCRModule>(\n 'onfido',\n async (shared, options) => {\n const { frankieClient, recipe } = shared;\n const {\n ocr: { provider, documents },\n } = recipe;\n const { mountElement, eventHub } = options;\n const idvClient = new IDVClient(frankieClient);\n\n // generate onfido sdk token from backend\n const idvSession = await createSession(idvClient, eventHub);\n // terminate initialise if session failed\n if (!idvSession) {\n eventHub.emit('loading', false, {\n message: `Failed while loading session for vendor 'Onfido'`,\n });\n return;\n }\n\n observeReady('onfido-sdk-ui-Theme-portal', eventHub);\n eventHub.on('ready', () =>\n eventHub.emit('loading', false, {\n message: `Vendor 'Onfido' screen has loaded`,\n }),\n );\n await install({\n sdkVersion: provider.name === 'onfido' && provider.sdkVersion,\n });\n\n const steps: StepDefinition = declaringSteps(documents);\n\n // initialise onfido instance\n const { token } = idvSession;\n const Onfido = window.Onfido;\n\n const ONFIDO_OPTIONS_PROPS = (\n token: string,\n mountElement: HTMLElement,\n ): Partial<SdkOptions> => {\n return {\n token,\n containerEl: mountElement,\n useModal: true,\n isModalOpen: true,\n disableAnalytics: true,\n disableAnalyticsCookies: true,\n };\n };\n\n const onError = async (instance: SdkHandle, error: SdkError) => {\n const { type = null, message = '' } = error;\n eventHub.emit(\n 'error',\n new OneSDKError(`Error from vendor SDK 'Onfido'`, {\n type,\n message,\n }),\n );\n await removeVendorSdk(instance, {\n eventHub,\n loadingEvent: `Failed while executing vendor 'Onfido'`,\n });\n };\n\n const onUserExit = async (instance: SdkHandle) => {\n // When user has not completed the process and exited it, we emit input_required event\n // This will trigger Onfido init modal again (see event listener for input_required at mount method)\n eventHub.emit(\n 'input_required',\n {\n documentType: null,\n side: 'front',\n },\n OCRStatus.INTERRUPTED,\n () => ({}),\n );\n await removeVendorSdk(instance, {\n eventHub,\n loadingEvent: 'User exited',\n });\n };\n\n const onModalRequestClose = async (instance: SdkHandle) => {\n // When user has not completed the process and exited it, we emit input_required event\n // This will trigger Onfido init modal again (see event listener for input_required at mount method)\n eventHub.emit(\n 'input_required',\n {\n documentType: null,\n side: 'front',\n },\n OCRStatus.INTERRUPTED,\n () => ({}),\n );\n await removeVendorSdk(instance, {\n eventHub,\n loadingEvent: 'User exited',\n });\n };\n\n const instance: SdkHandle = Onfido.init({\n steps: [steps],\n ...ONFIDO_OPTIONS_PROPS(token, mountElement),\n customUI: provider.name === 'onfido' && provider.customUI,\n onComplete: async (): Promise<void> => {\n await removeVendorSdk(instance, { eventHub });\n\n initProcessAndEvaluateResults(shared, {\n ...options,\n attachReviewScreen: !feat('modules.ocr.containsReviewScreen.onfido'),\n });\n },\n onError: (error: SdkError) => onError(instance, error),\n onUserExit: async (): Promise<void> => onUserExit(instance),\n onModalRequestClose: async (): Promise<void> =>\n onModalRequestClose(instance),\n });\n\n return {};\n },\n);\n\n// destroy onfido instance\nconst removeVendorSdk = async (\n instance: SdkHandle,\n opts: { eventHub: EventHub<Events>; loadingEvent?: string },\n): Promise<void> => {\n const { eventHub, loadingEvent } = opts;\n try {\n await instance.safeTearDown();\n eventHub.emit('session_closed');\n } catch (error) {\n const { type = null, message = '' } = error;\n eventHub.emit(\n 'error',\n new OneSDKError(`Error from vendor SDK 'Onfido'`, {\n type,\n message,\n }),\n );\n } finally {\n if (loadingEvent)\n eventHub.emit('loading', false, { message: loadingEvent });\n }\n};\n\nfunction declaringSteps(\n documents: OCRRecipeOptions['documents'],\n): StepDefinition {\n const steps: StepDefinition = {\n type: 'document',\n options: {\n documentTypes: {},\n },\n };\n\n if (!documents) {\n steps.options.documentTypes = {\n [ONFIDO_ACCEPTABLE_DOCUMENTS.Passport]: true,\n [ONFIDO_ACCEPTABLE_DOCUMENTS.Medicare]: true,\n [ONFIDO_ACCEPTABLE_DOCUMENTS.DriversLicense]: true,\n };\n return steps;\n }\n\n documents.forEach(({ type, countries }) => {\n if (\n type === DocumentType.NATIONAL_HEALTH_ID ||\n type === DocumentType.NATIONAL_ID\n ) {\n steps.options.documentTypes[ONFIDO_ACCEPTABLE_DOCUMENTS.Medicare] =\n countries[0] === 'ALL'\n ? true\n : {\n country: countries[0],\n };\n }\n if (type === DocumentType.PASSPORT) {\n steps.options.documentTypes[ONFIDO_ACCEPTABLE_DOCUMENTS.Passport] =\n countries[0] === 'ALL'\n ? true\n : {\n country: countries[0],\n };\n }\n if (type === DocumentType.DRIVERS_LICENCE) {\n steps.options.documentTypes[ONFIDO_ACCEPTABLE_DOCUMENTS.DriversLicense] =\n countries[0] === 'ALL'\n ? true\n : {\n country: countries[0],\n };\n }\n });\n\n return steps;\n}\n","import type { EventHub } from '@module/common';\nimport type { IDVClient } from '@module/frankie-client/clients/IDVClient';\nimport type { Events } from '@module/ocr/events';\nimport type { _DictionaryWrite } from '@types';\n\n/**\n * Creates a session by obtaining an entity ID, token, and vendor parameters from an IDVClient.\n * It will also emit 'session_data_generated' event to the provided event hub.\n * This function won't throw errors. Instead, it will emit 'session_data_failed_loading' and return null.\n *\n * @param idvClient - The IDVClient instance used to obtain the session data.\n * @param eventHub - The EventHub instance for emitting session-related events.\n * @returns A Promise that resolves with an object containing entityId, token, and vendorParameters upon success, or null if a session couldn't be created\n */\nexport const createSession = async <T extends _DictionaryWrite<unknown>>(\n idvClient: IDVClient,\n eventHub: EventHub<Events>,\n): Promise<{ entityId: string; token: string; vendorParameters: T } | null> => {\n try {\n const { entityId, token, vendorParameters } = await idvClient.getToken<T>();\n eventHub.emit('session_data_generated', {\n session: { entityId, token, vendorParameters },\n });\n return { entityId, token, vendorParameters };\n } catch (error) {\n const { code = null, message = '' } = error;\n eventHub.emit('session_data_failed_loading', { code, message });\n return null;\n }\n};\n","import { feat } from '@feature-flags';\nimport { OneSDKError, mkEventHub } from '@module/common';\nimport type { WrapperParameters } from '@module/common/modules/defineModule';\nimport {\n useFormToReviewResults,\n} from '@module/common/vendors/form/useForm';\nimport type { OCRResults } from '@module/frankie-client/clients/OCRClient';\nimport { OCRClient } from '@module/frankie-client/clients/OCRClient';\nimport type { Events, OCRModule } from '@module/ocr';\nimport type {\n StatusEvaluators,\n} from '@module/ocr/vendors/common/statusEvaluators';\nimport { statusEvaluators } from '@module/ocr/vendors/common/statusEvaluators';\nimport { OCRStatus } from '@module/types';\n\ntype Shared = WrapperParameters<OCRModule>[0];\ntype Options = WrapperParameters<OCRModule>[1] & {\n /** Each vendor wrapper needs to flag if their underlying vendor UI already contains a review screen.\n * If it doesn't provide one, we ALWAYS flag that in 'attachReviewScreen' as true.\n * This value can be manually overriden by recipe configuration (ocr.provideReviewScreen) */\n attachReviewScreen: boolean;\n};\n/**\n * This function will\n * 1) Trigger the OCR processing\n * 2) Fetch the updated individual details\n * 3) Evaluate the OCR status to trigger the appropriate event\n * 4) Initialise the Form for manual review, if required\n *\n * It will also emit loading events at the start and end of the process, as well as between long lasting steps\n * @throws This function doesn't throw exceptions, only error events\n * @param shared\n * @param options\n */\nexport const initProcessAndEvaluateResults = async (\n shared: Shared,\n options: Options,\n): Promise<void> => {\n const { frankieClient, oneSdkInstance, localEventHub } = shared;\n try {\n const ocrClient = new OCRClient(frankieClient);\n\n localEventHub.emit('loading', true, { message: 'Retrieving IDV results' });\n let response: OCRResults = await ocrClient.attachNewOCRDocument();\n // If waiting_ocr_run is returned, try to rerun\n if (response.documentStatus === OCRStatus.WAITING_OCR_RUN) {\n response = await ocrClient.rerun(response.ocrDocument.documentId);\n }\n // Update global state with the latest ocr check outcome\n await oneSdkInstance.individual().search();\n const { ocrDocument, documentStatus } = response;\n const evaluateStatus = statusEvaluators[documentStatus] ?? statusEvaluators.default;\n\n // When receiving results event, initialise Form for user manual review\n const privateEventHub = mkEventHub<Events>();\n const mountElement = options.mountElement;\n const recipeProvideReviewScreen =\n shared.recipe.ocr.provideReviewScreen ?? feat('recipeDefaults.ocr.provideReviewScreen');\n\n privateEventHub.on(\n 'results',\n useFormToReviewResults({\n localEventHub,\n mountElement,\n oneSdkInstance,\n // Based on recipe configuration and if the vendor options determine\n // if Form should be attached\n attachForm: recipeProvideReviewScreen && options.attachReviewScreen,\n }),\n );\n privateEventHub.map(['input_required', 'error'], localEventHub);\n\n evaluateStatus({\n ocrDocument,\n documentStatus,\n ocrClient,\n eventHub: privateEventHub,\n } as StatusEvaluators);\n } catch (e) {\n localEventHub.emit('error', new OneSDKError('Failed submitting and retrieving OCR results', e));\n localEventHub.emit('loading', false, { message: 'Failed retrieving OCR results' });\n }\n};\n","import { OCRStatus } from '@frankieone/one-sdk';\nimport type { EventHub} from '@module/common';\nimport { OneSDKError } from '@module/common';\nimport type { Document } from '@module/common/shared/models/Document';\nimport type { OCRClient } from '@module/frankie-client/clients/OCRClient';\nimport type { Events } from '@module/ocr';\n\nexport interface StatusEvaluators {\n ocrDocument?: Document;\n documentStatus?: OCRStatus;\n ocrClient?: OCRClient;\n eventHub: EventHub<Events>;\n}\n\nexport const statusEvaluators = {\n [OCRStatus.COMPLETE]: ({ ocrDocument, ocrClient, eventHub }: StatusEvaluators) =>\n eventHub.emit('results', { document: ocrDocument, entityId: ocrClient.entityId }),\n [OCRStatus.WAITING_OCR_RUN]: ({ eventHub }: StatusEvaluators) => {\n eventHub.emit(\n 'error',\n new OneSDKError(\n `Two attempts to get OCR results failed with an unresolved \"${OCRStatus.WAITING_OCR_RUN}\". This is a system failure.`,\n { payload: null },\n ),\n );\n },\n [OCRStatus.PROVIDER_OFFLINE]: ({ eventHub }: StatusEvaluators) =>\n eventHub.emit(\n 'error',\n new OneSDKError(\n `Provider is offline. Either switch providers and restart or skip OCR temporarily. Status ${OCRStatus.PROVIDER_OFFLINE}`,\n { payload: null },\n ),\n ),\n default: ({ documentStatus, eventHub }: StatusEvaluators) =>\n eventHub.emit('input_required', { documentType: null, side: 'front' }, documentStatus, () => ({})),\n} as const;\n"],"names":["install","sdkVersion","loadAsyncAsset","Number","observeReady","mutationClass","eventHub","targetNode","document","querySelector","MutationObserver","mutations","observer","mutation","mutationElement","addedNodes","classList","contains","emit","domElement","disconnect","observe","childList","subtree","DocumentType","DocumentStatus","join","ONFIDO_ACCEPTABLE_DOCUMENTS","initialise","shared","options","frankieClient","recipe","ocr","provider","documents","mountElement","idvClient","IDVClient","idvSession","createSession","message","on","name","steps","type","documentTypes","forEach","countries","NATIONAL_HEALTH_ID","NATIONAL_ID","country","PASSPORT","DRIVERS_LICENCE","declaringSteps","token","instance","window","Onfido","init","containerEl","useModal","isModalOpen","disableAnalytics","disableAnalyticsCookies","ONFIDO_OPTIONS_PROPS","customUI","onComplete","removeVendorSdk","initProcess","attachReviewScreen","onError","error","OneSDKError","loadingEvent","onUserExit","documentType","side","INTERRUPTED","onModalRequestClose","opts","safeTearDown","entityId","vendorParameters","getToken","session","code","initProcessAndEvaluateResults","oneSdkInstance","localEventHub","ocrClient","response","attachNewOCRDocument","documentStatus","WAITING_OCR_RUN","rerun","ocrDocument","documentId","individual","search","evaluateStatus","default","privateEventHub","mkEventHub","recipeProvideReviewScreen","provideReviewScreen","attachForm","map","e","statusEvaluators","COMPLETE","payload","PROVIDER_OFFLINE"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"ocr-onfido.js","mappings":"sIAIO,MAAMA,EAAU,IAAgD,O,OAAD,E,EAAA,I,EAAA,WAAxC,WAAEC,EAAa,aAErC,IAAAC,gBAAe,2BAA2BD,KAE5CE,OAAOF,GAAc,WACjB,IAAAC,gBAAe,2BAA2BD,cAAwB,SAE5E,E,YAPsE,K,6QAOrE,EAEYG,EAAe,CAC1BC,EACAC,KAGA,MAAMC,EAAaC,SAASC,cAAc,QAEzB,IAAIC,kBAAiB,CACpCC,EACAC,K,MAEA,IAAK,MAAMC,KAAYF,EAAW,CAChC,MAAMG,EAAqC,QAAnB,EAAAD,EAASE,kBAAU,eAAG,IAC1CD,aAAe,EAAfA,EAAiBE,UAAUC,SAASZ,MACtCC,EAASY,KAAK,QAAS,CAAEC,WAAYL,IAErCF,EAASQ,aAEb,KAKOC,QAAQd,EAFF,CAAEe,WAAW,EAAMC,SAAS,GAEP,C,kbClBtC,MAAMC,EACM,WADNA,EAEY,kBAFZA,EAGM,yBAGCC,GAAa,OACxB,UACA,CAAOC,EAAQC,IAAY,OAAD,6BACxB,MAAM,cAAEC,EAAa,OAAEC,GAAWH,GAEhCI,KAAK,SAAEC,EAAQ,UAAEC,IACfH,GACE,aAAEI,EAAY,SAAE3B,GAAaqB,EAC7BO,EAAY,IAAI,KAAUN,GAG1BO,QAAmB,OAAcD,EAAW5B,GAElD,IAAK6B,EAIH,YAHA7B,EAASY,KAAK,WAAW,EAAO,CAC9BkB,QAAS,sDAKb,OAAa,6BAA8B9B,GAC3CA,EAAS+B,GAAG,SAAS,IACnB/B,EAASY,K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9BA,EAASY,KACP,QACA,IAAI,EAAAiD,YACF,8DAA8D,KAAUsB,8CACxE,CAAEiB,QAAS,OAEd,EAEH,CAAC,KAAUC,kBAAmB,EAAGrG,cAC/BA,EAASY,KACP,QACA,IAAI,EAAAiD,YACF,4FAA4F,KAAUwC,mBACtG,CAAED,QAAS,QAGjBV,QAAS,EAAGR,iBAAgBlF,cAC1BA,EAASY,KAAK,iBAAkB,CAAEoD,aAAc,KAAMC,KAAM,SAAWiB,GAAgB,KAAM,CAAG,K","sources":["webpack://OneSdk/./modules/common/vendors/onfido/index.ts","webpack://OneSdk/./modules/ocr/vendors/Onfido/index.ts","webpack://OneSdk/./modules/ocr/vendors/common/createSession.ts","webpack://OneSdk/./modules/ocr/vendors/common/initProcess.ts","webpack://OneSdk/./modules/ocr/vendors/common/statusEvaluators.ts"],"sourcesContent":["import type { Events as BiometricsEvents } from '@module/biometrics';\nimport { type EventHub, loadAsyncAsset } from '@module/common';\nimport type { Events as OcrEvents } from '@module/ocr';\n\nexport const install = async ({ sdkVersion = '12' }): Promise<void> => {\n // install Onfido script from CDN\n await loadAsyncAsset(`https://sdk.onfido.com/v${sdkVersion}`);\n // note that from version 14 onwards, a separate stylesheet is no longer required as it will be included with the default library.\n if (Number(sdkVersion) < 14 && process.env.NODE_ENV !== 'test') {\n await loadAsyncAsset(`https://sdk.onfido.com/v${sdkVersion}/style.css`, 'style');\n }\n};\n\nexport const observeReady = (\n mutationClass: string,\n eventHub: EventHub<BiometricsEvents | OcrEvents>,\n): void => {\n // Select the target node\n const targetNode = document.querySelector('body');\n // Create an observer instance\n const observer = new MutationObserver((\n mutations: MutationRecord[],\n observer: MutationObserver,\n ) => {\n for (const mutation of mutations) {\n const mutationElement = mutation.addedNodes?.[0] as HTMLElement;\n if (mutationElement?.classList.contains(mutationClass)) {\n eventHub.emit('ready', { domElement: mutationElement });\n // stop observing\n observer.disconnect();\n }\n }\n });\n // Options for the observer (which mutations to observe)\n const config = { childList: true, subtree: true };\n // Start observing the target node for specified mutations\n observer.observe(targetNode, config);\n};\n","import { feat } from '@feature-flags';\nimport type { EventHub } from '@module/common';\nimport { OneSDKError } from '@module/common';\nimport { defineWrapper } from '@module/common/modules/defineModule';\nimport { DocumentType } from '@module/common/shared/models/SupportingDocument';\nimport { install, observeReady } from '@module/common/vendors/onfido';\nimport type {\n SdkError,\n SdkHandle,\n SdkOptions,\n StepDefinition,\n} from '@module/common/vendors/onfido/onfido.types';\nimport { IDVClient } from '@module/frankie-client/clients/IDVClient';\nimport { OCRStatus } from '@module/frankie-client/clients/OCRClient';\nimport type { Events, OCRModule, OCRRecipeOptions } from '@module/ocr';\nimport { createSession } from '@module/ocr/vendors/common/createSession';\nimport { initProcessAndEvaluateResults } from '@module/ocr/vendors/common/initProcess';\n\nconst ONFIDO_ACCEPTABLE_DOCUMENTS = {\n Passport: 'passport',\n DriversLicense: 'driving_licence',\n Medicare: 'national_identity_card',\n};\n\nexport const initialise = defineWrapper<OCRModule>(\n 'onfido',\n async (shared, options) => {\n const { frankieClient, recipe } = shared;\n const {\n ocr: { provider, documents },\n } = recipe;\n const { mountElement, eventHub } = options;\n const idvClient = new IDVClient(frankieClient);\n\n // generate onfido sdk token from backend\n const idvSession = await createSession(idvClient, eventHub);\n // terminate initialise if session failed\n if (!idvSession) {\n eventHub.emit('loading', false, {\n message: `Failed while loading session for vendor 'Onfido'`,\n });\n return;\n }\n\n observeReady('onfido-sdk-ui-Theme-portal', eventHub);\n eventHub.on('ready', () =>\n eventHub.emit('loading', false, {\n message: `Vendor 'Onfido' screen has loaded`,\n }),\n );\n await install({\n sdkVersion: provider.name === 'onfido' && provider.sdkVersion,\n });\n\n const steps: StepDefinition = declaringSteps(documents);\n\n // initialise onfido instance\n const { token } = idvSession;\n const Onfido = window.Onfido;\n\n const ONFIDO_OPTIONS_PROPS = (\n token: string,\n mountElement: HTMLElement,\n ): Partial<SdkOptions> => {\n return {\n token,\n containerEl: mountElement,\n useModal: true,\n isModalOpen: true,\n disableAnalytics: true,\n disableAnalyticsCookies: true,\n };\n };\n\n const onError = async (instance: SdkHandle, error: SdkError) => {\n const { type = null, message = '' } = error;\n eventHub.emit(\n 'error',\n new OneSDKError(`Error from vendor SDK 'Onfido'`, {\n type,\n message,\n }),\n );\n await removeVendorSdk(instance, {\n eventHub,\n loadingEvent: `Failed while executing vendor 'Onfido'`,\n });\n };\n\n const onUserExit = async (instance: SdkHandle) => {\n // When user has not completed the process and exited it, we emit input_required event\n // This will trigger Onfido init modal again (see event listener for input_required at mount method)\n eventHub.emit(\n 'input_required',\n {\n documentType: null,\n side: 'front',\n },\n OCRStatus.INTERRUPTED,\n () => ({}),\n );\n await removeVendorSdk(instance, {\n eventHub,\n loadingEvent: 'User exited',\n });\n };\n\n const onModalRequestClose = async (instance: SdkHandle) => {\n // When user has not completed the process and exited it, we emit input_required event\n // This will trigger Onfido init modal again (see event listener for input_required at mount method)\n eventHub.emit(\n 'input_required',\n {\n documentType: null,\n side: 'front',\n },\n OCRStatus.INTERRUPTED,\n () => ({}),\n );\n await removeVendorSdk(instance, {\n eventHub,\n loadingEvent: 'User exited',\n });\n };\n\n const instance: SdkHandle = Onfido.init({\n steps: [steps],\n ...ONFIDO_OPTIONS_PROPS(token, mountElement),\n customUI: provider.name === 'onfido' && provider.customUI,\n onComplete: async (): Promise<void> => {\n await removeVendorSdk(instance, { eventHub });\n\n initProcessAndEvaluateResults(shared, {\n ...options,\n attachReviewScreen: !feat('modules.ocr.containsReviewScreen.onfido'),\n });\n },\n onError: (error: SdkError) => onError(instance, error),\n onUserExit: async (): Promise<void> => onUserExit(instance),\n onModalRequestClose: async (): Promise<void> =>\n onModalRequestClose(instance),\n });\n\n return {};\n },\n);\n\n// destroy onfido instance\nconst removeVendorSdk = async (\n instance: SdkHandle,\n opts: { eventHub: EventHub<Events>; loadingEvent?: string },\n): Promise<void> => {\n const { eventHub, loadingEvent } = opts;\n try {\n await instance.safeTearDown();\n eventHub.emit('session_closed');\n } catch (error) {\n const { type = null, message = '' } = error;\n eventHub.emit(\n 'error',\n new OneSDKError(`Error from vendor SDK 'Onfido'`, {\n type,\n message,\n }),\n );\n } finally {\n if (loadingEvent)\n eventHub.emit('loading', false, { message: loadingEvent });\n }\n};\n\nfunction declaringSteps(\n documents: OCRRecipeOptions['documents'],\n): StepDefinition {\n const steps: StepDefinition = {\n type: 'document',\n options: {\n documentTypes: {},\n },\n };\n\n if (!documents) {\n steps.options.documentTypes = {\n [ONFIDO_ACCEPTABLE_DOCUMENTS.Passport]: true,\n [ONFIDO_ACCEPTABLE_DOCUMENTS.Medicare]: true,\n [ONFIDO_ACCEPTABLE_DOCUMENTS.DriversLicense]: true,\n };\n return steps;\n }\n\n documents.forEach(({ type, countries }) => {\n if (\n type === DocumentType.NATIONAL_HEALTH_ID ||\n type === DocumentType.NATIONAL_ID\n ) {\n steps.options.documentTypes[ONFIDO_ACCEPTABLE_DOCUMENTS.Medicare] =\n countries[0] === 'ALL'\n ? true\n : {\n country: countries[0],\n };\n }\n if (type === DocumentType.PASSPORT) {\n steps.options.documentTypes[ONFIDO_ACCEPTABLE_DOCUMENTS.Passport] =\n countries[0] === 'ALL'\n ? true\n : {\n country: countries[0],\n };\n }\n if (type === DocumentType.DRIVERS_LICENCE) {\n steps.options.documentTypes[ONFIDO_ACCEPTABLE_DOCUMENTS.DriversLicense] =\n countries[0] === 'ALL'\n ? true\n : {\n country: countries[0],\n };\n }\n });\n\n return steps;\n}\n","import type { EventHub } from '@module/common';\nimport type { IDVClient } from '@module/frankie-client/clients/IDVClient';\nimport type { Events } from '@module/ocr/events';\nimport type { _DictionaryWrite } from '@types';\n\n/**\n * Creates a session by obtaining an entity ID, token, and vendor parameters from an IDVClient.\n * It will also emit 'session_data_generated' event to the provided event hub.\n * This function won't throw errors. Instead, it will emit 'session_data_failed_loading' and return null.\n *\n * @param idvClient - The IDVClient instance used to obtain the session data.\n * @param eventHub - The EventHub instance for emitting session-related events.\n * @returns A Promise that resolves with an object containing entityId, token, and vendorParameters upon success, or null if a session couldn't be created\n */\nexport const createSession = async <T extends _DictionaryWrite<unknown>>(\n idvClient: IDVClient,\n eventHub: EventHub<Events>,\n): Promise<{ entityId: string; token: string; vendorParameters: T } | null> => {\n try {\n const { entityId, token, vendorParameters } = await idvClient.getToken<T>();\n eventHub.emit('session_data_generated', {\n session: { entityId, token, vendorParameters },\n });\n return { entityId, token, vendorParameters };\n } catch (error) {\n const { code = null, message = '' } = error;\n eventHub.emit('session_data_failed_loading', { code, message });\n return null;\n }\n};\n","import { feat } from '@feature-flags';\nimport { OneSDKError, mkEventHub } from '@module/common';\nimport type { WrapperParameters } from '@module/common/modules/defineModule';\nimport {\n useFormToReviewResults,\n} from '@module/common/vendors/form/useForm';\nimport type { OCRResults } from '@module/frankie-client/clients/OCRClient';\nimport { OCRClient } from '@module/frankie-client/clients/OCRClient';\nimport type { Events, OCRModule } from '@module/ocr';\nimport type {\n StatusEvaluators,\n} from '@module/ocr/vendors/common/statusEvaluators';\nimport { statusEvaluators } from '@module/ocr/vendors/common/statusEvaluators';\nimport { OCRStatus } from '@module/types';\n\ntype Shared = WrapperParameters<OCRModule>[0];\ntype Options = WrapperParameters<OCRModule>[1] & {\n /** Each vendor wrapper needs to flag if their underlying vendor UI already contains a review screen.\n * If it doesn't provide one, we ALWAYS flag that in 'attachReviewScreen' as true.\n * This value can be manually overriden by recipe configuration (ocr.provideReviewScreen) */\n attachReviewScreen: boolean;\n};\n/**\n * This function will\n * 1) Trigger the OCR processing\n * 2) Fetch the updated individual details\n * 3) Evaluate the OCR status to trigger the appropriate event\n * 4) Initialise the Form for manual review, if required\n *\n * It will also emit loading events at the start and end of the process, as well as between long lasting steps\n * @throws This function doesn't throw exceptions, only error events\n * @param shared\n * @param options\n */\nexport const initProcessAndEvaluateResults = async (\n shared: Shared,\n options: Options,\n): Promise<void> => {\n const { frankieClient, oneSdkInstance, localEventHub } = shared;\n try {\n const ocrClient = new OCRClient(frankieClient);\n\n localEventHub.emit('loading', true, { message: 'Retrieving IDV results' });\n let response: OCRResults = await ocrClient.attachNewOCRDocument();\n // If waiting_ocr_run is returned, try to rerun\n if (response.documentStatus === OCRStatus.WAITING_OCR_RUN) {\n response = await ocrClient.rerun(response.ocrDocument.documentId);\n }\n // Update global state with the latest ocr check outcome\n await oneSdkInstance.individual().search();\n const { ocrDocument, documentStatus } = response;\n const evaluateStatus = statusEvaluators[documentStatus] ?? statusEvaluators.default;\n\n // When receiving results event, initialise Form for user manual review\n const privateEventHub = mkEventHub<Events>();\n const mountElement = options.mountElement;\n const recipeProvideReviewScreen =\n shared.recipe.ocr.provideReviewScreen ?? feat('recipeDefaults.ocr.provideReviewScreen');\n\n privateEventHub.on(\n 'results',\n useFormToReviewResults({\n localEventHub,\n mountElement,\n oneSdkInstance,\n // Based on recipe configuration and if the vendor options determine\n // if Form should be attached\n attachForm: recipeProvideReviewScreen && options.attachReviewScreen,\n }),\n );\n privateEventHub.map(['input_required', 'error'], localEventHub);\n\n evaluateStatus({\n ocrDocument,\n documentStatus,\n ocrClient,\n eventHub: privateEventHub,\n } as StatusEvaluators);\n } catch (e) {\n localEventHub.emit('error', new OneSDKError('Failed submitting and retrieving OCR results', e));\n localEventHub.emit('loading', false, { message: 'Failed retrieving OCR results' });\n }\n};\n","import { OCRStatus } from '@frankieone/one-sdk';\nimport type { EventHub} from '@module/common';\nimport { OneSDKError } from '@module/common';\nimport type { Document } from '@module/common/shared/models/Document';\nimport type { OCRClient } from '@module/frankie-client/clients/OCRClient';\nimport type { Events } from '@module/ocr';\n\nexport interface StatusEvaluators {\n ocrDocument?: Document;\n documentStatus?: OCRStatus;\n ocrClient?: OCRClient;\n eventHub: EventHub<Events>;\n}\n\nexport const statusEvaluators = {\n [OCRStatus.COMPLETE]: ({ ocrDocument, ocrClient, eventHub }: StatusEvaluators) =>\n eventHub.emit('results', { document: ocrDocument, entityId: ocrClient.entityId }),\n [OCRStatus.WAITING_OCR_RUN]: ({ eventHub }: StatusEvaluators) => {\n eventHub.emit(\n 'error',\n new OneSDKError(\n `Two attempts to get OCR results failed with an unresolved \"${OCRStatus.WAITING_OCR_RUN}\". This is a system failure.`,\n { payload: null },\n ),\n );\n },\n [OCRStatus.PROVIDER_OFFLINE]: ({ eventHub }: StatusEvaluators) =>\n eventHub.emit(\n 'error',\n new OneSDKError(\n `Provider is offline. Either switch providers and restart or skip OCR temporarily. Status ${OCRStatus.PROVIDER_OFFLINE}`,\n { payload: null },\n ),\n ),\n default: ({ documentStatus, eventHub }: StatusEvaluators) =>\n eventHub.emit('input_required', { documentType: null, side: 'front' }, documentStatus, () => ({})),\n} as const;\n"],"names":["install","sdkVersion","loadAsyncAsset","Number","observeReady","mutationClass","eventHub","targetNode","document","querySelector","MutationObserver","mutations","observer","mutation","mutationElement","addedNodes","classList","contains","emit","domElement","disconnect","observe","childList","subtree","ONFIDO_ACCEPTABLE_DOCUMENTS","initialise","shared","options","frankieClient","recipe","ocr","provider","documents","mountElement","idvClient","idvSession","message","on","name","steps","type","documentTypes","forEach","countries","NATIONAL_HEALTH_ID","NATIONAL_ID","country","PASSPORT","DRIVERS_LICENCE","declaringSteps","token","instance","window","Onfido","init","containerEl","useModal","isModalOpen","disableAnalytics","disableAnalyticsCookies","ONFIDO_OPTIONS_PROPS","customUI","onComplete","removeVendorSdk","attachReviewScreen","onError","error","OneSDKError","loadingEvent","onUserExit","documentType","side","INTERRUPTED","onModalRequestClose","opts","safeTearDown","createSession","entityId","vendorParameters","getToken","session","code","initProcessAndEvaluateResults","oneSdkInstance","localEventHub","ocrClient","response","attachNewOCRDocument","documentStatus","WAITING_OCR_RUN","rerun","ocrDocument","documentId","individual","search","evaluateStatus","default","privateEventHub","mkEventHub","recipeProvideReviewScreen","provideReviewScreen","attachForm","map","e","statusEvaluators","COMPLETE","payload","PROVIDER_OFFLINE"],"sourceRoot":""}
|