datakeen-session-react 1.1.12 → 1.1.21

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.
Files changed (98) hide show
  1. package/.gitlab-ci.yml +65 -0
  2. package/README.md +156 -55
  3. package/dist/index.d.ts +19 -2
  4. package/dist/index.js +61 -0
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.mjs +33 -17723
  7. package/dist/index.mjs.map +1 -1
  8. package/docs/environment.md +27 -0
  9. package/docs/sdk_integration_guide.md +58 -0
  10. package/eslint.config.js +13 -0
  11. package/package.json +35 -41
  12. package/postcss.config.js +6 -0
  13. package/rollup.dev.config.js +55 -0
  14. package/tailwind.config.js +9 -0
  15. package/dist/assets/index.d.ts +0 -6
  16. package/dist/components/DatakeenSession.d.ts +0 -21
  17. package/dist/components/icons/PoweredByIcon.d.ts +0 -5
  18. package/dist/components/icons/StartIcon.d.ts +0 -5
  19. package/dist/components/id-check/BeforePhoto.d.ts +0 -5
  20. package/dist/components/id-check/BeforeVersoPhoto.d.ts +0 -5
  21. package/dist/components/id-check/CameraError.d.ts +0 -7
  22. package/dist/components/id-check/CameraMask.d.ts +0 -9
  23. package/dist/components/id-check/OrientationToggle.d.ts +0 -6
  24. package/dist/components/id-check/Photo.d.ts +0 -5
  25. package/dist/components/id-check/PhotoConfirmation.d.ts +0 -13
  26. package/dist/components/id-check/PhotoProcessingLoader.d.ts +0 -11
  27. package/dist/components/jdi/JDIDocumentSelection.d.ts +0 -8
  28. package/dist/components/jdi/JDIDocumentUpload.d.ts +0 -9
  29. package/dist/components/jdi/JDIError.d.ts +0 -7
  30. package/dist/components/jdi/JDIIntroduction.d.ts +0 -8
  31. package/dist/components/jdi/JDIPreIntroduction.d.ts +0 -7
  32. package/dist/components/jdi/JDIProcessing.d.ts +0 -9
  33. package/dist/components/jdi/JDISuccess.d.ts +0 -6
  34. package/dist/components/selfie/SelfieConfirmation.d.ts +0 -8
  35. package/dist/components/selfie/Video.d.ts +0 -8
  36. package/dist/components/selfie/VideoResetStyles.d.ts +0 -6
  37. package/dist/components/selfie/hooks/useVideoRecorderStyles.d.ts +0 -6
  38. package/dist/components/selfie/selfie-flow/InstructionsSelfie.d.ts +0 -6
  39. package/dist/components/selfie/selfie-flow/SelfieFlow.d.ts +0 -6
  40. package/dist/components/selfie/selfie-flow/SelfiePreIntroduction.d.ts +0 -6
  41. package/dist/components/selfie/selfie-flow/SelfieRecorder.d.ts +0 -7
  42. package/dist/components/selfie/utils/videoElementStyles.d.ts +0 -14
  43. package/dist/components/session/ChooseCountryJDI.d.ts +0 -48
  44. package/dist/components/session/ContactInfoForm.d.ts +0 -3
  45. package/dist/components/session/DocumentCheck.d.ts +0 -13
  46. package/dist/components/session/EndFlow.d.ts +0 -21
  47. package/dist/components/session/IDCheck.d.ts +0 -8
  48. package/dist/components/session/JDICheck.d.ts +0 -9
  49. package/dist/components/session/MobileRedirect.d.ts +0 -8
  50. package/dist/components/session/OTPVerification.d.ts +0 -12
  51. package/dist/components/session/Selfie.d.ts +0 -9
  52. package/dist/components/session/SessionExpired.d.ts +0 -11
  53. package/dist/components/session/StartSession.d.ts +0 -5
  54. package/dist/components/session/UserInputForm.d.ts +0 -3
  55. package/dist/components/start-flow/CGU.d.ts +0 -4
  56. package/dist/components/start-flow/Start.d.ts +0 -4
  57. package/dist/components/ui/Body.d.ts +0 -5
  58. package/dist/components/ui/Button.d.ts +0 -21
  59. package/dist/components/ui/ButtonDesktop.d.ts +0 -9
  60. package/dist/components/ui/Camera.d.ts +0 -0
  61. package/dist/components/ui/Card.d.ts +0 -9
  62. package/dist/components/ui/OTPInput.d.ts +0 -11
  63. package/dist/components/ui/Paper.d.ts +0 -7
  64. package/dist/components/ui/PoweredBy.d.ts +0 -5
  65. package/dist/components/ui/QRCodeDisplay.d.ts +0 -10
  66. package/dist/components/ui/Select.d.ts +0 -3
  67. package/dist/components/ui/SelectComponent.d.ts +0 -16
  68. package/dist/components/ui/SelectDrawer.d.ts +0 -12
  69. package/dist/components/ui/Subtitle.d.ts +0 -5
  70. package/dist/components/ui/Title.d.ts +0 -5
  71. package/dist/config/env.d.ts +0 -5
  72. package/dist/context/DocumentContext.d.ts +0 -13
  73. package/dist/hooks/useIsMobile.d.ts +0 -2
  74. package/dist/hooks/useSession.d.ts +0 -9
  75. package/dist/main.css +0 -1
  76. package/dist/services/analysis.d.ts +0 -2
  77. package/dist/services/api.d.ts +0 -38
  78. package/dist/services/cameraService.d.ts +0 -17
  79. package/dist/services/documentDetectionService.d.ts +0 -14
  80. package/dist/services/documentService.d.ts +0 -0
  81. package/dist/services/sessionService.d.ts +0 -254
  82. package/dist/services/utils.d.ts +0 -3
  83. package/dist/style.css +0 -1
  84. package/dist/types/camera.d.ts +0 -16
  85. package/dist/types/contactInfo.d.ts +0 -12
  86. package/dist/types/selfie.d.ts +0 -4
  87. package/dist/types/session.d.ts +0 -21
  88. package/dist/types/ui/select.d.ts +0 -11
  89. package/dist/types/uploadFiles.d.ts +0 -4
  90. package/dist/types/userInput.d.ts +0 -26
  91. package/dist/utils/chooseDocuments/frenchDocumentTypes.d.ts +0 -9
  92. package/dist/utils/chooseDocuments/spanishDocumentTypes.d.ts +0 -9
  93. package/dist/utils/jdiCountry.d.ts +0 -10
  94. package/dist/utils/languages.d.ts +0 -4
  95. package/dist/utils/mimeTypes.d.ts +0 -1
  96. package/dist/utils/stepsAnalysis.d.ts +0 -18
  97. package/dist/utils/utils.d.ts +0 -5
  98. /package/{dist/components/session/EndSession.d.ts → assets/logo.svg} +0 -0
@@ -1,21 +0,0 @@
1
- import { default as React } from 'react';
2
- import { stepObject } from '../../types/session';
3
- interface EndFlowProps {
4
- stepObject: stepObject;
5
- sessionId: string;
6
- sessionStatus?: string;
7
- }
8
- /**
9
- * EndFlow Component
10
- *
11
- * Composant affiché à la fin du flux de vérification lorsque toutes les étapes ont été complétées.
12
- * Affiche un message de confirmation avec une icône de succès.
13
- *
14
- * @param {EndFlowProps} props - Propriétés du composant
15
- * @param {stepObject} props.stepObject - Objet contenant l'état actuel et les fonctions de changement d'étape
16
- * @param {string} props.sessionId - L'identifiant de la session
17
- * @param {string} props.sessionStatus - Le statut actuel de la session
18
- * @returns {JSX.Element} Le composant EndFlow
19
- */
20
- declare const EndFlow: React.FC<EndFlowProps>;
21
- export default EndFlow;
@@ -1,8 +0,0 @@
1
- import { stepObject } from '../../types/session';
2
- interface IDCheckProps {
3
- stepObject: stepObject;
4
- documentTypeId?: string | null;
5
- sessionId?: string;
6
- }
7
- declare const IDCheck: ({ stepObject, documentTypeId, sessionId, }: IDCheckProps) => import("react/jsx-runtime").JSX.Element;
8
- export default IDCheck;
@@ -1,9 +0,0 @@
1
- import { stepObject } from '../../types/session';
2
- interface JDICheckProps {
3
- stepObject: stepObject;
4
- sessionId: string;
5
- onContinueOnPC?: () => void;
6
- documentTypeId?: string;
7
- }
8
- declare const JDICheck: ({ stepObject, sessionId, onContinueOnPC, documentTypeId, }: JDICheckProps) => import("react/jsx-runtime").JSX.Element | null;
9
- export default JDICheck;
@@ -1,8 +0,0 @@
1
- interface MobileRedirectProps {
2
- sessionId: string;
3
- children?: React.ReactNode;
4
- onBack?: () => void;
5
- onContinueOnPC?: () => void;
6
- }
7
- declare const MobileRedirect: ({ sessionId, children, onBack, onContinueOnPC, }: MobileRedirectProps) => import("react/jsx-runtime").JSX.Element;
8
- export default MobileRedirect;
@@ -1,12 +0,0 @@
1
- interface OTPVerificationProps {
2
- stepObject: {
3
- setStep: (step: number) => void;
4
- step: number;
5
- };
6
- contactInfo?: {
7
- email: string;
8
- phoneNumber: string;
9
- };
10
- }
11
- declare const OTPVerification: ({ stepObject, contactInfo }: OTPVerificationProps) => import("react/jsx-runtime").JSX.Element;
12
- export default OTPVerification;
@@ -1,9 +0,0 @@
1
- import { stepObject } from '../../types/session';
2
- /**
3
- * Composant de gestion du flux selfie.
4
- * Gère les étapes internes de capture et confirmation du selfie.
5
- */
6
- declare const Selfie: ({ stepObject }: {
7
- stepObject: stepObject;
8
- }) => import("react/jsx-runtime").JSX.Element;
9
- export default Selfie;
@@ -1,11 +0,0 @@
1
- import { default as React } from 'react';
2
- interface SessionExpiredProps {
3
- onRetry?: () => void;
4
- }
5
- /**
6
- * SessionExpired Component
7
- *
8
- * Displays a session expired message with a retry button
9
- */
10
- declare const SessionExpired: React.FC<SessionExpiredProps>;
11
- export default SessionExpired;
@@ -1,5 +0,0 @@
1
- import { stepObject } from '../../types/session';
2
- declare const StartSession: ({ stepObject }: {
3
- stepObject: stepObject;
4
- }) => import("react/jsx-runtime").JSX.Element;
5
- export default StartSession;
@@ -1,3 +0,0 @@
1
- import { UserInputFormProps } from '../../types/userInput';
2
- declare const UserInputForm: ({ stepObject, setUserInput, initialUserInput, }: UserInputFormProps) => import("react/jsx-runtime").JSX.Element;
3
- export default UserInputForm;
@@ -1,4 +0,0 @@
1
- declare const CGU: ({ setStep }: {
2
- setStep: (nubr: number) => void;
3
- }) => import("react/jsx-runtime").JSX.Element;
4
- export default CGU;
@@ -1,4 +0,0 @@
1
- declare const Start: ({ setStep }: {
2
- setStep: (nubr: number) => void;
3
- }) => import("react/jsx-runtime").JSX.Element;
4
- export default Start;
@@ -1,5 +0,0 @@
1
- declare const Body: ({ children, className, }: {
2
- children: React.ReactNode;
3
- className?: string;
4
- }) => import("react/jsx-runtime").JSX.Element;
5
- export default Body;
@@ -1,21 +0,0 @@
1
- /**
2
- * Button component
3
- *
4
- * A customizable button component with consistent styling.
5
- * Features a teal background, rounded corners, and hover/active states.
6
- *
7
- * @param {Object} props - Component props
8
- * @param {React.ReactNode} props.children - Content to be rendered inside the button
9
- * @param {string} [props.className] - Optional additional CSS classes to apply
10
- * @param {() => void} [props.onClick] - Optional click handler function
11
- * @param {boolean} [props.disabled=false] - Whether the button is disabled (defaults to false)
12
- * @returns {JSX.Element} Styled button element containing the children
13
- */
14
- interface ButtonProps {
15
- children: React.ReactNode;
16
- className?: string;
17
- onClick?: () => void;
18
- disabled?: boolean;
19
- }
20
- declare const Button: ({ children, className, onClick, disabled, }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
21
- export default Button;
@@ -1,9 +0,0 @@
1
- interface ButtonDesktopProps {
2
- children: React.ReactNode;
3
- className?: string;
4
- onClick?: () => void;
5
- disabled?: boolean;
6
- type: "continue" | "back";
7
- }
8
- declare const ButtonDesktop: ({ children, className, onClick, disabled, type, }: ButtonDesktopProps) => import("react/jsx-runtime").JSX.Element;
9
- export default ButtonDesktop;
File without changes
@@ -1,9 +0,0 @@
1
- import * as React from "react";
2
- declare function Card({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
3
- declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
4
- declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
5
- declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
6
- declare function CardAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
7
- declare function CardContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
- declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
9
- export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
@@ -1,11 +0,0 @@
1
- import { default as React } from 'react';
2
- interface OTPInputProps {
3
- length?: number;
4
- value: string;
5
- onChange: (value: string) => void;
6
- disabled?: boolean;
7
- className?: string;
8
- error?: boolean;
9
- }
10
- export declare const OTPInput: React.FC<OTPInputProps>;
11
- export {};
@@ -1,7 +0,0 @@
1
- import { ReactNode } from 'react';
2
- interface PaperProps {
3
- children: ReactNode;
4
- className?: string;
5
- }
6
- declare const Paper: ({ children, className }: PaperProps) => import("react/jsx-runtime").JSX.Element;
7
- export default Paper;
@@ -1,5 +0,0 @@
1
- interface PoweredByProps {
2
- className?: string;
3
- }
4
- declare const PoweredBy: ({ className }: PoweredByProps) => import("react/jsx-runtime").JSX.Element;
5
- export default PoweredBy;
@@ -1,10 +0,0 @@
1
- interface QRCodeDisplayProps {
2
- url: string;
3
- title?: string;
4
- subtitle?: string;
5
- onBack?: () => void;
6
- onContinueOnPC?: () => void;
7
- showButtons?: boolean;
8
- }
9
- declare const QRCodeDisplay: ({ url, title, subtitle, onBack, onContinueOnPC, showButtons, }: QRCodeDisplayProps) => import("react/jsx-runtime").JSX.Element;
10
- export default QRCodeDisplay;
@@ -1,3 +0,0 @@
1
- import { SelectProps } from '../../types/ui/select';
2
- declare const Select: ({ items, title, selectedItem, onChange, className, }: SelectProps) => import("react/jsx-runtime").JSX.Element;
3
- export default Select;
@@ -1,16 +0,0 @@
1
- import { default as React } from 'react';
2
- interface SelectOption {
3
- value: string;
4
- label: string;
5
- }
6
- interface SelectProps {
7
- options: SelectOption[];
8
- value: string;
9
- onValueChange: (value: string) => void;
10
- placeholder?: string;
11
- className?: string;
12
- disabled?: boolean;
13
- error?: boolean;
14
- }
15
- export declare const Select: React.FC<SelectProps>;
16
- export {};
@@ -1,12 +0,0 @@
1
- import { default as React } from 'react';
2
- import { DrawerItem } from '../../utils/jdiCountry';
3
- type Props = {
4
- title: string;
5
- items: DrawerItem[];
6
- selectedItem: DrawerItem | null;
7
- onChange: (item: DrawerItem | null) => void;
8
- className?: string;
9
- errorMessage?: string;
10
- };
11
- export declare const SelectDrawer: React.FC<Props>;
12
- export {};
@@ -1,5 +0,0 @@
1
- declare const Subtitle: ({ children, className, }: {
2
- children: React.ReactNode;
3
- className?: string;
4
- }) => import("react/jsx-runtime").JSX.Element;
5
- export default Subtitle;
@@ -1,5 +0,0 @@
1
- declare const Title: ({ children, className, }: {
2
- children: React.ReactNode;
3
- className?: string;
4
- }) => import("react/jsx-runtime").JSX.Element;
5
- export default Title;
@@ -1,5 +0,0 @@
1
- /**
2
- * Environment configuration
3
- * This file exposes environment variables to use across the application
4
- */
5
- export declare const API_BASE_URL: string;
@@ -1,13 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { DrawerItem } from '../utils/jdiCountry';
3
- type DocumentContextType = {
4
- selectedDocumentType: DrawerItem | null;
5
- setSelectedDocumentType: (documentType: DrawerItem | null) => void;
6
- };
7
- export declare const DocumentContext: import('react').Context<DocumentContextType>;
8
- interface DocumentProviderProps {
9
- children: ReactNode;
10
- }
11
- export declare const DocumentProvider: ({ children }: DocumentProviderProps) => import("react/jsx-runtime").JSX.Element;
12
- export declare const useDocumentContext: () => DocumentContextType;
13
- export {};
@@ -1,2 +0,0 @@
1
- declare const useIsMobile: (breakpoint?: number) => boolean;
2
- export default useIsMobile;
@@ -1,9 +0,0 @@
1
- import { UseSessionReturn, SessionConfig } from '../types/session';
2
- /**
3
- * Custom hook to manage the session component.
4
- * @param {string} sessionId - The ID of the session.
5
- * @param {SessionConfig} sessionConfig - Configuration for the session (optional).
6
- * @returns {UseSessionReturn} - An object containing the session component. The session component is a React element that can be rendered in your application.
7
- */
8
- declare const useSession: (sessionId: string, sessionConfig?: SessionConfig) => UseSessionReturn;
9
- export default useSession;
package/dist/main.css DELETED
@@ -1 +0,0 @@
1
- .force-style-selfie button.btn{color:#3c3c40!important}.force-style-selfie h1{font-family:sans-serif;font-size:20px!important;color:#3c3c40!important}.force-style-selfie{font-family:sans-serif;font-size:10px!important}.force-style-selfie.btn{color:#000!important}.selfie{--uni-primary-color: #11e5c5;--uni-secondary-color: #0a9983;--uni-primary-color-lighter: #37a998;--uni-secondary-color-lighter: #1cbeaa;--uni-alt-color: #086e5f;--uni-alt-color-lighter: #0d9485;--uni-light-color-variant-1: #d0f7f2;--uni-light-color-variant-2: #b2ece5;--uni-light-color: #fff;--uni-dark-color: #202020;--uni-error-color: #f44336;--uni-btn-padding: 10px 15px;--uni-btn-border: solid 0px;--uni-btn-border-radius: 12px;--uni-btn-font-size: 16px;--uni-btn-text-transform: normal;--uni-btn-border-outlined: solid 1px;--uni-btn-label-margin: 10px 0px;--uni-btn-disabled-bg-color: #eee;--uni-card-bg-color: rgba(51, 51, 51, .05)}body.recording-selfie{overflow:hidden;position:fixed;width:100%;height:100%;touch-action:none}.selfie uni-video-recorder{display:block;margin:0 auto;width:100%;height:100%;max-height:100%;object-fit:cover}.selfie .video-container{display:flex;justify-content:center;align-items:center;width:100%;height:100%;overflow:hidden;position:relative;flex:1 1 auto}.selfie uni-video-recorder,.selfie uni-video-recorder *{max-height:100vh;overflow:hidden!important}html.selfie-active,body.selfie-active{overflow:hidden;height:100%;position:fixed;width:100%}.selfie uni-video-recorder::part(root),.selfie uni-video-recorder::shadow-dom(root){max-height:100vh;overflow:hidden!important}html,body{overscroll-behavior-y:contain}.selfie-guide-frame{transition:box-shadow .3s ease;border:2px solid #11e5c5;border-radius:50%}@keyframes pulse-border{0%{box-shadow:0 0 #11e5c5b3}70%{box-shadow:0 0 0 10px #11e5c500}to{box-shadow:0 0 #11e5c500}}.selfie-record-btn{animation:pulse-border 2s infinite}.selfie-instructions{background-color:#fff;border-radius:8px;padding:16px;margin:16px;box-shadow:0 2px 10px #0000001a}.recording-indicator{position:absolute;top:16px;right:16px;display:flex;align-items:center;background-color:#00000080;padding:4px 8px;border-radius:16px}.recording-dot{width:10px;height:10px;border-radius:50%;background-color:#ff3b30;margin-right:8px;animation:pulse 1.5s infinite}@keyframes pulse{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.selfie-confirmation-enter{opacity:0;transform:scale(.95)}.selfie-confirmation-enter-active{opacity:1;transform:scale(1);transition:opacity .3s,transform .3s}.selfie-preview{position:relative;border-radius:12px;overflow:hidden;box-shadow:0 4px 12px #0000001a;border:2px solid #11e5c5;transition:transform .2s ease-in-out}.selfie-preview:hover{transform:scale(1.02)}.selfie-preview:after{content:"";position:absolute;top:0;left:0;right:0;bottom:0;background:linear-gradient(to bottom,#0000 80%,#0003);pointer-events:none}.selfie button .loading-dots span{background-color:#fff!important}.loading-dots span{animation:loadingDots 1.4s infinite ease-in-out both}.loading-dots span:nth-child(1){animation-delay:-.32s}.loading-dots span:nth-child(2){animation-delay:-.16s}@keyframes loadingDots{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}.alt-button{padding:10px 16px;border-radius:8px;font-size:14px;transition:all .2s ease;border:1px solid #e2e8f0}.alt-button:hover{background-color:#f8fafc}.alt-button:active{transform:translateY(1px)}uni-video-recorder::part(video-container),uni-video-recorder::shadow-dom(video-container){width:100%!important;height:100%!important;max-height:none!important;object-fit:cover!important}.selfie uni-video-recorder video,.selfie uni-video-recorder canvas{width:100%!important;height:100%!important;object-fit:cover!important;max-height:none!important}.video-fullscreen-container{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;justify-content:center;align-items:center;overflow:hidden}.selfie-recorder-container{position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999;display:flex;flex-direction:column}.selfie-fullscreen,.selfie-fullscreen body{height:100%;overflow:hidden}.selfie-fullscreen #root,.selfie-fullscreen [data-reactroot]{height:100%}.selfie .video-container uni-video-recorder{position:absolute!important;top:0!important;left:0!important;width:100%!important;height:100%!important}.selfie *{box-sizing:border-box}.selfie-parent{height:100%;display:flex;flex-direction:column}@media (max-height: 600px){.selfie-guide-frame{height:250px!important;max-width:250px!important}}@media (max-height: 500px){.selfie-guide-frame{height:200px!important;max-width:200px!important}}.selfie uni-video-recorder,uni-video-recorder::part(root),uni-video-recorder::shadow-dom(root),uni-video-recorder video,uni-video-recorder canvas{border-radius:0!important;overflow:hidden!important}uni-video-recorder::part(video-container),uni-video-recorder::shadow-dom(video-container),uni-video-recorder::part(video),uni-video-recorder::shadow-dom(video){border-radius:0!important}.video-container>div,.video-container>div>*,.selfie uni-video-recorder>*{border-radius:0!important}.video-recorder-no-radius,.video-recorder-no-radius::part(video),.video-recorder-no-radius::shadow-dom(video),.video-recorder-no-radius video,.video-recorder-no-radius canvas,.video-recorder-no-radius *{border-radius:0!important;-webkit-border-radius:0!important;-moz-border-radius:0!important;overflow:hidden!important}.selfie video,.selfie canvas,.selfie uni-video-recorder,.selfie uni-video-recorder *,.video-container *,uni-video-recorder,uni-video-recorder *,uni-video-recorder *:before,uni-video-recorder *:after,uni-video-recorder div,uni-video-recorder video,uni-video-recorder canvas{border-radius:0!important;-webkit-border-radius:0!important;-moz-border-radius:0!important;overflow:hidden!important;background:transparent!important}:host,:host(*),::part(*),::shadow-dom(*){border-radius:0!important;-webkit-border-radius:0!important;-moz-border-radius:0!important}.video-container uni-video-recorder{border-radius:0!important;transform:translateZ(0)}:root{--uni-video-recorder-border-radius: 0 !important;--uni-border-radius: 0 !important}.selfie .video-container uni-video-recorder{--border-radius: 0 !important;border-radius:0!important;overflow:hidden!important}.selfie button{background-color:var(--uni-primary-color, #11e5c5)!important;color:#3c3c40!important;border-radius:12px!important}.selfie button:hover{background-color:#7dffeb!important}.selfie button:active{background-color:#11e5c57c!important}.selfie button:disabled{background-color:#e2e8f0!important;opacity:.6!important;cursor:not-allowed!important}.video-js,.video-js *,.vjs-default-skin,.vjs-big-play-button,.vjs-control-bar,uni-video-recorder::shadow-dom(video-js),uni-video-recorder::part(video-js){border-radius:0!important;background-color:transparent!important;overflow:hidden!important}.video-js{width:100%!important;height:100%!important}.video-js video{object-fit:cover!important;width:100%!important;height:100%!important;border-radius:0!important}.vjs-control-bar,.vjs-big-play-button,.vjs-menu-button,.vjs-menu-content,.vjs-modal-dialog,.vjs-volume-control,.vjs-progress-control{border-radius:0!important}.video-container:before,.video-container:after,.selfie:before,.selfie:after,uni-video-recorder:before,uni-video-recorder:after{display:none!important}::part(video),::shadow-dom(video),::part(canvas),::shadow-dom(canvas){border-radius:0!important;background:transparent!important}@supports (-webkit-appearance: none){.selfie video,.selfie canvas,uni-video-recorder video,uni-video-recorder canvas{border-radius:0!important;-webkit-border-radius:0!important;mask-image:none!important;-webkit-mask-image:none!important;transform:translateZ(0);-webkit-transform:translateZ(0)}}@-moz-document url-prefix(){.selfie video,.selfie canvas,uni-video-recorder video,uni-video-recorder canvas{border-radius:0!important}}.selfie button,button.selfie-button,.selfie-container button,.selfie .sticky button{background-color:#11e5c5!important;border-radius:12px!important;color:#3c3c40!important;overflow:visible!important}.selfie button:disabled,button.selfie-button:disabled,.selfie-container button:disabled,.selfie .sticky button:disabled{background-color:#e2e8f0!important}.selfie-button{background-color:#11e5c5!important;color:#3c3c40!important;border-radius:12px!important;cursor:pointer!important}.selfie-button:hover{background-color:#7dffeb!important}.selfie-button:active{background-color:#11e5c57c!important}.selfie-button:disabled{background-color:#e2e8f0!important;opacity:.6!important;cursor:not-allowed!important}.selfie-button .loading-dots span{background-color:#fff!important}
@@ -1,2 +0,0 @@
1
- import { onUploadFiles } from '../types/uploadFiles';
2
- export declare function analyzeFiles(sessionId: string, files: onUploadFiles, documentTypeId: string, personPhoto?: string | null, save?: boolean, incrementAnalysis?: boolean, forceUpload?: boolean): Promise<any>;
@@ -1,38 +0,0 @@
1
- import { AxiosInstance, AxiosRequestConfig } from 'axios';
2
- export interface ApiConfig {
3
- baseURL: string;
4
- timeout?: number;
5
- retryAttempts?: number;
6
- retryDelay?: number;
7
- headers?: Record<string, string>;
8
- }
9
- export interface ApiResponse<T = any> {
10
- data: T;
11
- message?: string;
12
- success: boolean;
13
- status: number;
14
- }
15
- export interface ApiError {
16
- message: string;
17
- status?: number;
18
- code?: string;
19
- details?: any;
20
- }
21
- export declare class ApiService {
22
- private client;
23
- private config;
24
- constructor(config: ApiConfig);
25
- private setupInterceptors;
26
- private handleError;
27
- get<T = any>(url: string, config?: AxiosRequestConfig): Promise<ApiResponse<T>>;
28
- post<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<ApiResponse<T>>;
29
- put<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<ApiResponse<T>>;
30
- patch<T = any>(url: string, data?: any, config?: AxiosRequestConfig): Promise<ApiResponse<T>>;
31
- delete<T = any>(url: string, config?: AxiosRequestConfig): Promise<ApiResponse<T>>;
32
- setDefaultHeader(key: string, value: string): void;
33
- removeDefaultHeader(key: string): void;
34
- createInstance(config: Partial<ApiConfig>): ApiService;
35
- getRawClient(): AxiosInstance;
36
- }
37
- export declare const createApiService: (config: ApiConfig) => ApiService;
38
- export declare const apiService: ApiService;
@@ -1,17 +0,0 @@
1
- import { CameraFacingMode } from '../types/camera';
2
- export declare class CameraService {
3
- private stream;
4
- private devMode;
5
- private mockImagePath;
6
- private startMockCamera;
7
- startCamera(videoElement: HTMLVideoElement | null, orientation: boolean, facingMode?: CameraFacingMode): Promise<{
8
- success: boolean;
9
- error?: string;
10
- }>;
11
- captureFrame(videoElement: HTMLVideoElement | null, canvasElement: HTMLCanvasElement | null): string | null;
12
- stopCamera(): void;
13
- setDevMode(enabled: boolean): void;
14
- setMockImage(imagePath: string): void;
15
- isDevModeEnabled(): boolean;
16
- }
17
- export declare const cameraService: CameraService;
@@ -1,14 +0,0 @@
1
- export declare class DocumentDetectionService {
2
- private animationFrameId;
3
- private detectionTimeoutId;
4
- private model;
5
- private isDetecting;
6
- private readonly DETECTION_INTERVAL_MS;
7
- loadModel(): Promise<void>;
8
- startDocumentDetection(videoElement: HTMLVideoElement | null, canvasElement: HTMLCanvasElement | null, onDocumentDetected: (imageDataUrl: string) => void): Promise<{
9
- stop: () => void;
10
- }>;
11
- private scheduleNextDetection;
12
- stopDocumentDetection(): void;
13
- }
14
- export declare const documentDetectionService: DocumentDetectionService;
File without changes
@@ -1,254 +0,0 @@
1
- /**
2
- * Session Service
3
- *
4
- * Service for interacting with the Datakeen Session API.
5
- * Handles fetching session data by ID.
6
- */
7
- /**
8
- * Interface for session template node
9
- */
10
- interface SessionTemplateNode {
11
- id: string;
12
- type: string;
13
- title: string;
14
- description: string;
15
- position: {
16
- x: number;
17
- y: number;
18
- };
19
- options: unknown[];
20
- selectedOptions: string[];
21
- requiredDocumentType?: string;
22
- isRequired: boolean;
23
- order: number;
24
- }
25
- /**
26
- * Interface for session template edge
27
- */
28
- interface SessionTemplateEdge {
29
- id: string;
30
- source: string;
31
- target: string;
32
- }
33
- /**
34
- * Interface for session template
35
- */
36
- interface SessionTemplate {
37
- id: string;
38
- name: string;
39
- description: string;
40
- nodes: SessionTemplateNode[];
41
- edges: SessionTemplateEdge[];
42
- groupId: string;
43
- userId: string | null;
44
- created_at: string;
45
- updated_at: string;
46
- }
47
- /**
48
- * Interface for session data
49
- */
50
- export interface SessionData {
51
- id: string;
52
- userId: string | null;
53
- token: string;
54
- templateId: string;
55
- templateKey: string;
56
- expireTime: number;
57
- status: string;
58
- result: Record<string, unknown>;
59
- landingPage: unknown;
60
- withSelfie: boolean | null;
61
- groupId: string | null;
62
- userInput: Record<string, unknown>;
63
- contactInfo?: {
64
- email: string;
65
- phoneNumber: string;
66
- };
67
- callbackURL: string;
68
- webhookURL: string;
69
- analysisTemplateId: string | null;
70
- userAgent: unknown[];
71
- mobile: boolean;
72
- analysisId: string | null;
73
- createdAt: string;
74
- updatedAt: string;
75
- auditTrail: unknown[];
76
- user: unknown | null;
77
- analysis: unknown[];
78
- template: SessionTemplate;
79
- }
80
- /**
81
- * Fetches session data by ID from the Datakeen backend
82
- *
83
- * @param sessionId - The unique identifier of the session
84
- * @returns The session data
85
- */
86
- export declare const fetchSessionById: (sessionId: string) => Promise<SessionData>;
87
- /**
88
- * Determines if the session template has a specific type of node
89
- *
90
- * @param template - The session template
91
- * @param nodeType - The type of node to check for
92
- * @returns true if the template has a node of the specified type, false otherwise
93
- */
94
- export declare const hasNodeType: (template: SessionTemplate, nodeType: string) => boolean;
95
- /**
96
- * Determines if the session template has a node with a specific requiredDocumentType
97
- *
98
- * @param template - The session template
99
- * @param requiredDocumentType - The requiredDocumentType to check for
100
- * @returns true if the template has a node with the specified requiredDocumentType, false otherwise
101
- */
102
- export declare const hasDocumentTypeNode: (template: SessionTemplate, requiredDocumentType: string) => boolean;
103
- /**
104
- * Gets all nodes of a specific type
105
- *
106
- * @param template - The session template
107
- * @param nodeType - The type of node to get
108
- * @returns Array of nodes matching the type
109
- */
110
- export declare const getNodesByType: (template: SessionTemplate, nodeType: string) => SessionTemplateNode[];
111
- /**
112
- * Gets all nodes with a specific requiredDocumentType
113
- *
114
- * @param template - The session template
115
- * @param requiredDocumentType - The requiredDocumentType to get
116
- * @returns Array of nodes matching the requiredDocumentType
117
- */
118
- export declare const getNodesByDocumentType: (template: SessionTemplate, requiredDocumentType: string) => SessionTemplateNode[];
119
- /**
120
- * Get document options for a specific document type
121
- *
122
- * @param template - The session template
123
- * @param requiredDocumentType - The document type to get options for
124
- * @returns Array of document options (empty if none found)
125
- */
126
- export declare const getDocumentOptions: (template: SessionTemplate, requiredDocumentType: string) => string[];
127
- /**
128
- * Determines if the session template has a selfie step
129
- *
130
- * @param template - The session template
131
- * @returns true if the template has a selfie step, false otherwise
132
- */
133
- export declare const hasSelfieCaptureStep: (template: SessionTemplate) => boolean;
134
- /**
135
- * Determines if the session template has an ID document step
136
- *
137
- * @param template - The session template
138
- * @returns true if the template has an ID document step, false otherwise
139
- */
140
- export declare const hasDocumentStep: (template: SessionTemplate) => boolean;
141
- /**
142
- * Determines if the session template has a JDD (proof of address) step
143
- *
144
- * @param template - The session template
145
- * @returns true if the template has a JDD step, false otherwise
146
- */
147
- export declare const hasJDDStep: (template: SessionTemplate) => boolean;
148
- /**
149
- * Determines if the session template has a proof of funds step
150
- *
151
- * @param template - The session template
152
- * @returns true if the template has a proof of funds step, false otherwise
153
- */
154
- export declare const hasProofOfFundsStep: (template: SessionTemplate) => boolean;
155
- /**
156
- * Gets all node types in the template
157
- *
158
- * @param template - The session template
159
- * @returns Array of node types in the template
160
- */
161
- export declare const getNodeTypes: (template: SessionTemplate) => string[];
162
- /**
163
- * Gets all document types required in the template
164
- *
165
- * @param template - The session template
166
- * @returns Array of document types required in the template
167
- */
168
- export declare const getRequiredDocumentTypes: (template: SessionTemplate) => string[];
169
- /**
170
- * Converts template document type to internal document type
171
- * This helps standardize document types between the template and the application
172
- *
173
- * @param templateDocType - The document type as defined in the template
174
- * @returns The internal document type used by the application
175
- */
176
- export declare const convertTemplateDocTypeToInternal: (templateDocType: string) => string;
177
- /**
178
- * Converts internal document type to template document type
179
- *
180
- * @param internalDocType - The document type used internally by the application
181
- * @returns The document type as expected in the template
182
- */
183
- export declare const convertInternalDocTypeToTemplate: (internalDocType: string) => string;
184
- /**
185
- * Updates session data with user input information
186
- *
187
- * @param sessionId - The unique identifier of the session
188
- * @param userInput - The user input data (firstName, lastName, birthDate)
189
- * @returns The updated session data
190
- */
191
- export declare const updateSessionUserInput: (sessionId: string, userInput: {
192
- firstName?: string;
193
- lastName?: string;
194
- birthDate?: string;
195
- [key: string]: unknown;
196
- }) => Promise<SessionData>;
197
- /**
198
- * Updates session data with contact information
199
- *
200
- * @param sessionId - The unique identifier of the session
201
- * @param contactInfo - The contact information data (email, phoneNumber)
202
- * @returns The updated session data
203
- */
204
- export declare const updateSessionContactInfo: (sessionId: string, contactInfo: {
205
- email: string;
206
- phoneNumber: string;
207
- [key: string]: unknown;
208
- }) => Promise<SessionData>;
209
- /**
210
- * Updates session status
211
- *
212
- * @param sessionId - The unique identifier of the session
213
- * @param status - The new status for the session
214
- * @returns The updated session data
215
- */
216
- export declare const updateSessionStatus: (sessionId: string, status: string) => Promise<SessionData>;
217
- /**
218
- * Gets the workflow steps from the template in order
219
- *
220
- * @param template - The session template
221
- * @returns Array of ordered steps
222
- */
223
- export declare const getOrderedWorkflowSteps: (template: SessionTemplate) => SessionTemplateNode[];
224
- /**
225
- * Maps a template node type to a step component type
226
- *
227
- * @param node - The session template node
228
- * @returns The step component type
229
- */
230
- export declare const getStepComponentType: (node: SessionTemplateNode) => string;
231
- /**
232
- * Checks if a session has expired
233
- *
234
- * @param session - The session data to check
235
- * @returns true if the session has expired, false otherwise
236
- */
237
- export declare const isSessionExpired: (session: SessionData) => boolean;
238
- /**
239
- * Stores document options in localStorage for a specific document type
240
- *
241
- * @param sessionId - The session ID
242
- * @param documentTypeId - The document type ID (e.g., 'jdd', 'income-proof')
243
- * @param options - The options to store
244
- */
245
- export declare const storeDocumentOptions: (sessionId: string, documentTypeId: string, options: string[]) => void;
246
- /**
247
- * Retrieves document options from localStorage for a specific document type
248
- *
249
- * @param sessionId - The session ID
250
- * @param documentTypeId - The document type ID (e.g., 'jdd', 'income-proof')
251
- * @returns Array of options or default options if none found
252
- */
253
- export declare const retrieveDocumentOptions: (sessionId: string, documentTypeId: string) => string[];
254
- export {};
@@ -1,3 +0,0 @@
1
- export declare function dataURLtoFile(dataurl: string, filename: string): File;
2
- export declare function getMimeTypeFromDataURL(dataurl: string): string | null;
3
- export declare const codeToStep: (code: string) => number;