@vpdev2/metakyc 1.0.0
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/README.md +114 -0
- package/dist/client/config.d.ts +143 -0
- package/dist/client/config.d.ts.map +1 -0
- package/dist/client/endpoint-builder.d.ts +21 -0
- package/dist/client/endpoint-builder.d.ts.map +1 -0
- package/dist/client/error-handler.d.ts +36 -0
- package/dist/client/error-handler.d.ts.map +1 -0
- package/dist/client/http-client.d.ts +43 -0
- package/dist/client/http-client.d.ts.map +1 -0
- package/dist/client/index.d.ts +5 -0
- package/dist/client/index.d.ts.map +1 -0
- package/dist/components/CreateApplicantForm.d.ts +10 -0
- package/dist/components/CreateApplicantForm.d.ts.map +1 -0
- package/dist/components/CreateCompanyApplicantForm.d.ts +10 -0
- package/dist/components/CreateCompanyApplicantForm.d.ts.map +1 -0
- package/dist/components/Header.d.ts +16 -0
- package/dist/components/Header.d.ts.map +1 -0
- package/dist/components/KycWorkflow.d.ts +17 -0
- package/dist/components/KycWorkflow.d.ts.map +1 -0
- package/dist/components/Logo.d.ts +13 -0
- package/dist/components/Logo.d.ts.map +1 -0
- package/dist/components/core/Badge.d.ts +11 -0
- package/dist/components/core/Badge.d.ts.map +1 -0
- package/dist/components/core/Button.d.ts +12 -0
- package/dist/components/core/Button.d.ts.map +1 -0
- package/dist/components/core/Card.d.ts +22 -0
- package/dist/components/core/Card.d.ts.map +1 -0
- package/dist/components/core/FileUpload.d.ts +16 -0
- package/dist/components/core/FileUpload.d.ts.map +1 -0
- package/dist/components/core/Input.d.ts +14 -0
- package/dist/components/core/Input.d.ts.map +1 -0
- package/dist/components/core/MultiSelect.d.ts +18 -0
- package/dist/components/core/MultiSelect.d.ts.map +1 -0
- package/dist/components/core/PhoneInput.d.ts +11 -0
- package/dist/components/core/PhoneInput.d.ts.map +1 -0
- package/dist/components/core/SearchableSelect.d.ts +27 -0
- package/dist/components/core/SearchableSelect.d.ts.map +1 -0
- package/dist/components/core/Select.d.ts +19 -0
- package/dist/components/core/Select.d.ts.map +1 -0
- package/dist/components/core/Spinner.d.ts +10 -0
- package/dist/components/core/Spinner.d.ts.map +1 -0
- package/dist/components/core/index.d.ts +11 -0
- package/dist/components/core/index.d.ts.map +1 -0
- package/dist/components/identity/IdentityVerificationStep.d.ts +13 -0
- package/dist/components/identity/IdentityVerificationStep.d.ts.map +1 -0
- package/dist/components/identity/index.d.ts +2 -0
- package/dist/components/identity/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/status/KycStatusDisplay.d.ts +17 -0
- package/dist/components/status/KycStatusDisplay.d.ts.map +1 -0
- package/dist/components/status/index.d.ts +2 -0
- package/dist/components/status/index.d.ts.map +1 -0
- package/dist/components/steps/AppropriatenessTestStep.d.ts +9 -0
- package/dist/components/steps/AppropriatenessTestStep.d.ts.map +1 -0
- package/dist/components/steps/InvestorCategorizationStep.d.ts +13 -0
- package/dist/components/steps/InvestorCategorizationStep.d.ts.map +1 -0
- package/dist/components/steps/OverviewStep.d.ts +12 -0
- package/dist/components/steps/OverviewStep.d.ts.map +1 -0
- package/dist/components/steps/QuestionnaireStep.d.ts +9 -0
- package/dist/components/steps/QuestionnaireStep.d.ts.map +1 -0
- package/dist/components/steps/RiskScoringStep.d.ts +9 -0
- package/dist/components/steps/RiskScoringStep.d.ts.map +1 -0
- package/dist/components/steps/UploadDocumentStep.d.ts +9 -0
- package/dist/components/steps/UploadDocumentStep.d.ts.map +1 -0
- package/dist/components/steps/index.d.ts +7 -0
- package/dist/components/steps/index.d.ts.map +1 -0
- package/dist/context/MetaKYCContext.d.ts +32 -0
- package/dist/context/MetaKYCContext.d.ts.map +1 -0
- package/dist/context/MetaKYCProvider.d.ts +16 -0
- package/dist/context/MetaKYCProvider.d.ts.map +1 -0
- package/dist/context/index.d.ts +4 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/useMetaKYC.d.ts +8 -0
- package/dist/context/useMetaKYC.d.ts.map +1 -0
- package/dist/hooks/index.d.ts +9 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/useApplicant.d.ts +14 -0
- package/dist/hooks/useApplicant.d.ts.map +1 -0
- package/dist/hooks/useAppropriatenessTest.d.ts +15 -0
- package/dist/hooks/useAppropriatenessTest.d.ts.map +1 -0
- package/dist/hooks/useIdentityVerification.d.ts +16 -0
- package/dist/hooks/useIdentityVerification.d.ts.map +1 -0
- package/dist/hooks/useKycWorkflow.d.ts +27 -0
- package/dist/hooks/useKycWorkflow.d.ts.map +1 -0
- package/dist/hooks/useOverview.d.ts +14 -0
- package/dist/hooks/useOverview.d.ts.map +1 -0
- package/dist/hooks/useQuestionnaire.d.ts +17 -0
- package/dist/hooks/useQuestionnaire.d.ts.map +1 -0
- package/dist/hooks/useRiskScoring.d.ts +18 -0
- package/dist/hooks/useRiskScoring.d.ts.map +1 -0
- package/dist/hooks/useUploadDocument.d.ts +15 -0
- package/dist/hooks/useUploadDocument.d.ts.map +1 -0
- package/dist/identity/index.d.ts +6 -0
- package/dist/identity/index.d.ts.map +1 -0
- package/dist/identity/load-script.d.ts +13 -0
- package/dist/identity/load-script.d.ts.map +1 -0
- package/dist/identity/provider-manager.d.ts +20 -0
- package/dist/identity/provider-manager.d.ts.map +1 -0
- package/dist/identity/providers/onfido.d.ts +28 -0
- package/dist/identity/providers/onfido.d.ts.map +1 -0
- package/dist/identity/providers/sardin-ai.d.ts +56 -0
- package/dist/identity/providers/sardin-ai.d.ts.map +1 -0
- package/dist/identity/providers/sumsub.d.ts +31 -0
- package/dist/identity/providers/sumsub.d.ts.map +1 -0
- package/dist/index.cjs +103 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8166 -0
- package/dist/index.js.map +1 -0
- package/dist/services/applicant.service.d.ts +64 -0
- package/dist/services/applicant.service.d.ts.map +1 -0
- package/dist/services/appropriateness-test.service.d.ts +20 -0
- package/dist/services/appropriateness-test.service.d.ts.map +1 -0
- package/dist/services/base-information.service.d.ts +27 -0
- package/dist/services/base-information.service.d.ts.map +1 -0
- package/dist/services/identity.service.d.ts +35 -0
- package/dist/services/identity.service.d.ts.map +1 -0
- package/dist/services/index.d.ts +11 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/investor-categorization.service.d.ts +20 -0
- package/dist/services/investor-categorization.service.d.ts.map +1 -0
- package/dist/services/overview.service.d.ts +20 -0
- package/dist/services/overview.service.d.ts.map +1 -0
- package/dist/services/questionnaire.service.d.ts +20 -0
- package/dist/services/questionnaire.service.d.ts.map +1 -0
- package/dist/services/risk-scoring.service.d.ts +25 -0
- package/dist/services/risk-scoring.service.d.ts.map +1 -0
- package/dist/services/theme.service.d.ts +31 -0
- package/dist/services/theme.service.d.ts.map +1 -0
- package/dist/services/upload-document.service.d.ts +24 -0
- package/dist/services/upload-document.service.d.ts.map +1 -0
- package/dist/state/event-emitter.d.ts +27 -0
- package/dist/state/event-emitter.d.ts.map +1 -0
- package/dist/state/index.d.ts +5 -0
- package/dist/state/index.d.ts.map +1 -0
- package/dist/state/step-router.d.ts +45 -0
- package/dist/state/step-router.d.ts.map +1 -0
- package/dist/state/workflow-orchestrator.d.ts +58 -0
- package/dist/state/workflow-orchestrator.d.ts.map +1 -0
- package/dist/state/workflow-state.d.ts +108 -0
- package/dist/state/workflow-state.d.ts.map +1 -0
- package/dist/styles.css +1 -0
- package/dist/test/setup.d.ts +2 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/presets.d.ts +35 -0
- package/dist/theme/presets.d.ts.map +1 -0
- package/dist/theme/theme-manager.d.ts +63 -0
- package/dist/theme/theme-manager.d.ts.map +1 -0
- package/dist/types/applicant.d.ts +167 -0
- package/dist/types/applicant.d.ts.map +1 -0
- package/dist/types/appropriateness-test.d.ts +71 -0
- package/dist/types/appropriateness-test.d.ts.map +1 -0
- package/dist/types/common.d.ts +78 -0
- package/dist/types/common.d.ts.map +1 -0
- package/dist/types/enums.d.ts +118 -0
- package/dist/types/enums.d.ts.map +1 -0
- package/dist/types/form-config.d.ts +113 -0
- package/dist/types/form-config.d.ts.map +1 -0
- package/dist/types/identity.d.ts +72 -0
- package/dist/types/identity.d.ts.map +1 -0
- package/dist/types/index.d.ts +14 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/investor-categorization.d.ts +34 -0
- package/dist/types/investor-categorization.d.ts.map +1 -0
- package/dist/types/overview.d.ts +26 -0
- package/dist/types/overview.d.ts.map +1 -0
- package/dist/types/questionnaire.d.ts +83 -0
- package/dist/types/questionnaire.d.ts.map +1 -0
- package/dist/types/risk-scoring.d.ts +107 -0
- package/dist/types/risk-scoring.d.ts.map +1 -0
- package/dist/types/theme.d.ts +158 -0
- package/dist/types/theme.d.ts.map +1 -0
- package/dist/types/upload-document.d.ts +78 -0
- package/dist/types/upload-document.d.ts.map +1 -0
- package/dist/types/workflow.d.ts +71 -0
- package/dist/types/workflow.d.ts.map +1 -0
- package/dist/utils/cn.d.ts +6 -0
- package/dist/utils/cn.d.ts.map +1 -0
- package/dist/utils/file.d.ts +21 -0
- package/dist/utils/file.d.ts.map +1 -0
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/storage.d.ts +43 -0
- package/dist/utils/storage.d.ts.map +1 -0
- package/dist/validation/appropriateness-schema.d.ts +13 -0
- package/dist/validation/appropriateness-schema.d.ts.map +1 -0
- package/dist/validation/index.d.ts +5 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/questionnaire-schema.d.ts +17 -0
- package/dist/validation/questionnaire-schema.d.ts.map +1 -0
- package/dist/validation/risk-scoring-schema.d.ts +12 -0
- package/dist/validation/risk-scoring-schema.d.ts.map +1 -0
- package/dist/validation/upload-document-schema.d.ts +12 -0
- package/dist/validation/upload-document-schema.d.ts.map +1 -0
- package/package.json +88 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File type enum
|
|
3
|
+
*/
|
|
4
|
+
export declare enum FileType {
|
|
5
|
+
Image = 0,
|
|
6
|
+
Video = 1,
|
|
7
|
+
PDF = 2,
|
|
8
|
+
OfficePDF = 3,
|
|
9
|
+
Custom = 4
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Document review status
|
|
13
|
+
*/
|
|
14
|
+
export declare enum DocumentReviewStatus {
|
|
15
|
+
Pending = 0,
|
|
16
|
+
Approved = 1,
|
|
17
|
+
Rejected = 2,
|
|
18
|
+
RequiresRevision = 3
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Upload document file DTO
|
|
22
|
+
*/
|
|
23
|
+
export interface UploadDocumentFileDto {
|
|
24
|
+
id: number;
|
|
25
|
+
name: string;
|
|
26
|
+
displayName: string;
|
|
27
|
+
subtitle?: string;
|
|
28
|
+
fileType: FileType;
|
|
29
|
+
maxEachFileSizeByte: number;
|
|
30
|
+
allowedTypes?: string;
|
|
31
|
+
multipleFile: boolean;
|
|
32
|
+
isRequired: boolean;
|
|
33
|
+
order: number;
|
|
34
|
+
pageNumber: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Upload document output DTO
|
|
38
|
+
*/
|
|
39
|
+
export interface UploadDocumentOutputDto {
|
|
40
|
+
id: number;
|
|
41
|
+
name: string;
|
|
42
|
+
displayName: string;
|
|
43
|
+
subtitle: string;
|
|
44
|
+
description: string;
|
|
45
|
+
uploadDocumentFiles: UploadDocumentFileDto[];
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Upload document file result
|
|
49
|
+
*/
|
|
50
|
+
export interface UploadDocumentFileResult {
|
|
51
|
+
fileName: string;
|
|
52
|
+
fileData: string;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Upload document result
|
|
56
|
+
*/
|
|
57
|
+
export interface UploadDocumentResult {
|
|
58
|
+
uploadDocumentFileId: number;
|
|
59
|
+
valueList: UploadDocumentFileResult[];
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Fill upload document input
|
|
63
|
+
*/
|
|
64
|
+
export interface FillUploadDocumentInput {
|
|
65
|
+
applicantId: number;
|
|
66
|
+
uploadDocumentId: number;
|
|
67
|
+
uploadDocumentResults: UploadDocumentResult[];
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Review upload document DTO
|
|
71
|
+
*/
|
|
72
|
+
export interface ReviewUploadDocumentDto {
|
|
73
|
+
applicantId: number;
|
|
74
|
+
uploadDocumentResultId: number;
|
|
75
|
+
status: DocumentReviewStatus;
|
|
76
|
+
reviewNotes?: string;
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=upload-document.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-document.d.ts","sourceRoot":"","sources":["../../src/types/upload-document.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,QAAQ;IAClB,KAAK,IAAI;IACT,KAAK,IAAI;IACT,GAAG,IAAI;IACP,SAAS,IAAI;IACb,MAAM,IAAI;CACX;AAED;;GAEG;AACH,oBAAY,oBAAoB;IAC9B,OAAO,IAAI;IACX,QAAQ,IAAI;IACZ,QAAQ,IAAI;IACZ,gBAAgB,IAAI;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,QAAQ,CAAC;IACnB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,mBAAmB,EAAE,qBAAqB,EAAE,CAAC;CAC9C;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,SAAS,EAAE,wBAAwB,EAAE,CAAC;CACvC;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,qBAAqB,EAAE,oBAAoB,EAAE,CAAC;CAC/C;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,MAAM,EAAE,oBAAoB,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { WorkflowStepAction, WorkflowResultType, ApplicantProgressStatus, RiskLevel, KycStatus, ReviewStatus } from './enums';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Information about a specific workflow step
|
|
5
|
+
*/
|
|
6
|
+
export interface FlowStep {
|
|
7
|
+
order: number;
|
|
8
|
+
action: WorkflowStepAction;
|
|
9
|
+
name: string;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Detailed information about a workflow step
|
|
15
|
+
*/
|
|
16
|
+
export interface StepInfo {
|
|
17
|
+
action: WorkflowStepAction;
|
|
18
|
+
order: number;
|
|
19
|
+
name: string;
|
|
20
|
+
displayName: string;
|
|
21
|
+
subtitle: string;
|
|
22
|
+
description: string;
|
|
23
|
+
visibility?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Complete applicant progress result
|
|
27
|
+
* Contains all information about the current state of an applicant's workflow
|
|
28
|
+
*/
|
|
29
|
+
export interface ProgressApplicantResult {
|
|
30
|
+
applicantId: number;
|
|
31
|
+
workFlowKey: string;
|
|
32
|
+
workflowResult: WorkflowResultType | null;
|
|
33
|
+
riskLevel: RiskLevel | null;
|
|
34
|
+
kycStatus: KycStatus | null;
|
|
35
|
+
reviewStatus: ReviewStatus;
|
|
36
|
+
nextWorkflowKey: string;
|
|
37
|
+
nextWorkflowName: string;
|
|
38
|
+
status: ApplicantProgressStatus;
|
|
39
|
+
customMessage: string;
|
|
40
|
+
customMessageDE: string;
|
|
41
|
+
currentStep: FlowStep | null;
|
|
42
|
+
flowSteps: FlowStep[];
|
|
43
|
+
stepInfoList: StepInfo[];
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Simplified applicant progress status result
|
|
47
|
+
*/
|
|
48
|
+
export interface ProgressApplicantStatusResult {
|
|
49
|
+
applicantId: number;
|
|
50
|
+
workFlowKey: string;
|
|
51
|
+
workflowResult: WorkflowResultType | null;
|
|
52
|
+
riskLevel: RiskLevel | null;
|
|
53
|
+
kycStatus: KycStatus | null;
|
|
54
|
+
reviewStatus: ReviewStatus;
|
|
55
|
+
nextWorkflowKey: string;
|
|
56
|
+
nextWorkflowName: string;
|
|
57
|
+
status: ApplicantProgressStatus;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Workflow history entry
|
|
61
|
+
*/
|
|
62
|
+
export interface ApplicantProgressHistory {
|
|
63
|
+
id: number;
|
|
64
|
+
applicantProgressId: number;
|
|
65
|
+
workflowStepId: number | null;
|
|
66
|
+
title: string;
|
|
67
|
+
result: string;
|
|
68
|
+
additionalData: string;
|
|
69
|
+
creationTime: string;
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=workflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/types/workflow.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,SAAS,EACT,SAAS,EACT,YAAY,EACb,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,kBAAkB,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC1C,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,uBAAuB,CAAC;IAChC,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,YAAY,EAAE,QAAQ,EAAE,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,6BAA6B;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC1C,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,uBAAuB,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB,EAAE,MAAM,CAAC;IAC5B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../../src/utils/cn.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,IAAI,CAAC,EAAE,GAAG,MAAM,CAE9E"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert file to base64 string
|
|
3
|
+
*/
|
|
4
|
+
export declare function fileToBase64(file: File): Promise<string>;
|
|
5
|
+
/**
|
|
6
|
+
* Validate file size
|
|
7
|
+
*/
|
|
8
|
+
export declare function validateFileSize(file: File, maxSizeBytes: number): boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Validate file type
|
|
11
|
+
*/
|
|
12
|
+
export declare function validateFileType(file: File, allowedTypes: string): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Format file size for display
|
|
15
|
+
*/
|
|
16
|
+
export declare function formatFileSize(bytes: number): string;
|
|
17
|
+
/**
|
|
18
|
+
* Get accept attribute string for file input
|
|
19
|
+
*/
|
|
20
|
+
export declare function getAcceptString(allowedTypes: string): string;
|
|
21
|
+
//# sourceMappingURL=file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../../src/utils/file.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAY9D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAE1E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAU1E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQpD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAE5D"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,MAAM,CAAC;AACrB,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local storage utilities for persisting workflow state
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Save applicant ID to local storage
|
|
6
|
+
*/
|
|
7
|
+
export declare function saveApplicantId(applicantId: number): void;
|
|
8
|
+
/**
|
|
9
|
+
* Get applicant ID from local storage
|
|
10
|
+
*/
|
|
11
|
+
export declare function getApplicantId(): number | null;
|
|
12
|
+
/**
|
|
13
|
+
* Clear applicant ID from local storage
|
|
14
|
+
*/
|
|
15
|
+
export declare function clearApplicantId(): void;
|
|
16
|
+
/**
|
|
17
|
+
* Persisted workflow state interface
|
|
18
|
+
*/
|
|
19
|
+
export interface PersistedWorkflowState {
|
|
20
|
+
applicantId: number;
|
|
21
|
+
currentStepOrder?: number;
|
|
22
|
+
status: number;
|
|
23
|
+
lastUpdated: string;
|
|
24
|
+
workflowKey?: string;
|
|
25
|
+
nextWorkflowKey?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Save workflow state to local storage
|
|
29
|
+
*/
|
|
30
|
+
export declare function saveWorkflowState(state: PersistedWorkflowState): void;
|
|
31
|
+
/**
|
|
32
|
+
* Get workflow state from local storage
|
|
33
|
+
*/
|
|
34
|
+
export declare function getWorkflowState(): PersistedWorkflowState | null;
|
|
35
|
+
/**
|
|
36
|
+
* Clear workflow state from local storage
|
|
37
|
+
*/
|
|
38
|
+
export declare function clearWorkflowState(): void;
|
|
39
|
+
/**
|
|
40
|
+
* Clear all MetaKYC data from local storage
|
|
41
|
+
*/
|
|
42
|
+
export declare function clearAllStorage(): void;
|
|
43
|
+
//# sourceMappingURL=storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/utils/storage.ts"],"names":[],"mappings":"AAAA;;GAEG;AAOH;;GAEG;AACH,wBAAgB,eAAe,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAMzD;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,GAAG,IAAI,CAQ9C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAMvC;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,IAAI,CAMrE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,sBAAsB,GAAG,IAAI,CAQhE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAMzC;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAGtC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { AppropriatenessTestOutputDto } from '../types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Generate zod schema from appropriateness test
|
|
6
|
+
*/
|
|
7
|
+
export declare function generateAppropriatenessSchema(test: AppropriatenessTestOutputDto): z.ZodObject<Record<string, z.ZodTypeAny>, "strip", z.ZodTypeAny, {
|
|
8
|
+
[x: string]: any;
|
|
9
|
+
}, {
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const appropriatenessTestSchema: z.ZodAny;
|
|
13
|
+
//# sourceMappingURL=appropriateness-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"appropriateness-schema.d.ts","sourceRoot":"","sources":["../../src/validation/appropriateness-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,4BAA4B,EAAoC,MAAM,UAAU,CAAC;AAU1F;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE,4BAA4B;;;;GAS/E;AAGD,eAAO,MAAM,yBAAyB,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validation/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { QuestionnaireOutput } from '../types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Generate zod schema for question values (reserved for future use)
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Generate zod schema from questionnaire with grouped questions support
|
|
9
|
+
*/
|
|
10
|
+
export declare function generateQuestionnaireSchema(_questionnaire: QuestionnaireOutput): z.ZodObject<{
|
|
11
|
+
questionResults: z.ZodAny;
|
|
12
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
13
|
+
questionResults: z.ZodAny;
|
|
14
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
15
|
+
questionResults: z.ZodAny;
|
|
16
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
17
|
+
//# sourceMappingURL=questionnaire-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"questionnaire-schema.d.ts","sourceRoot":"","sources":["../../src/validation/questionnaire-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE/C;;GAEG;AAyCH;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,cAAc,EAAE,mBAAmB;;;;;;iCAM9E"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { RiskCriteriaDto } from '../types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Generate zod schema for a single risk criterion (reserved for future use)
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Generate zod schema from risk criteria
|
|
9
|
+
* Only validates user inputs (values), not metadata (riskCriteriaId)
|
|
10
|
+
*/
|
|
11
|
+
export declare function generateRiskScoringSchema(_criteria: RiskCriteriaDto[]): z.ZodAny;
|
|
12
|
+
//# sourceMappingURL=risk-scoring-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"risk-scoring-schema.d.ts","sourceRoot":"","sources":["../../src/validation/risk-scoring-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C;;GAEG;AA2DH;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,eAAe,EAAE,YAIrE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { UploadDocumentOutputDto } from '../types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Generate zod schema from upload document
|
|
6
|
+
*/
|
|
7
|
+
export declare function generateUploadDocumentSchema(uploadDocument: UploadDocumentOutputDto): z.ZodObject<Record<string, z.ZodTypeAny>, "strip", z.ZodTypeAny, {
|
|
8
|
+
[x: string]: any;
|
|
9
|
+
}, {
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
}>;
|
|
12
|
+
//# sourceMappingURL=upload-document-schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upload-document-schema.d.ts","sourceRoot":"","sources":["../../src/validation/upload-document-schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,uBAAuB,EAAyB,MAAM,UAAU,CAAC;AAwD1E;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,cAAc,EAAE,uBAAuB;;;;GASnF"}
|
package/package.json
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@vpdev2/metakyc",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"access": "public"
|
|
7
|
+
},
|
|
8
|
+
"description": "React SDK for MetaKYC due diligence workflows with configurable API endpoints and comprehensive step coverage",
|
|
9
|
+
"type": "module",
|
|
10
|
+
"main": "./dist/index.cjs",
|
|
11
|
+
"module": "./dist/index.js",
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"exports": {
|
|
14
|
+
".": {
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"require": "./dist/index.cjs",
|
|
17
|
+
"types": "./dist/index.d.ts"
|
|
18
|
+
},
|
|
19
|
+
"./styles": "./dist/styles.css"
|
|
20
|
+
},
|
|
21
|
+
"files": [
|
|
22
|
+
"dist",
|
|
23
|
+
"README.md"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"dev": "vite",
|
|
27
|
+
"build": "tsc && vite build",
|
|
28
|
+
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
|
29
|
+
"format": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
30
|
+
"test": "vitest",
|
|
31
|
+
"test:ui": "vitest --ui",
|
|
32
|
+
"test:coverage": "vitest --coverage"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@hookform/resolvers": "^5.2.2",
|
|
36
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
37
|
+
"@testing-library/react": "^16.3.2",
|
|
38
|
+
"axios": "^1.6.7",
|
|
39
|
+
"lucide-react": "^0.574.0"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"react": "^18.0.0 || ^19.0.0",
|
|
43
|
+
"react-dom": "^18.0.0 || ^19.0.0",
|
|
44
|
+
"react-hook-form": "^7.50.0",
|
|
45
|
+
"zod": "^3.22.0"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@headlessui/react": "^1.7.18",
|
|
49
|
+
"@types/node": "^20.11.19",
|
|
50
|
+
"@types/react": "^18.2.56",
|
|
51
|
+
"@types/react-dom": "^18.2.19",
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "^7.0.2",
|
|
53
|
+
"@typescript-eslint/parser": "^7.0.2",
|
|
54
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
55
|
+
"@vitest/ui": "^1.3.1",
|
|
56
|
+
"autoprefixer": "^10.4.17",
|
|
57
|
+
"eslint": "^8.56.0",
|
|
58
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
59
|
+
"eslint-plugin-react-refresh": "^0.4.5",
|
|
60
|
+
"postcss": "^8.4.35",
|
|
61
|
+
"prettier": "^3.2.5",
|
|
62
|
+
"react": "^18.2.0",
|
|
63
|
+
"react-dom": "^18.2.0",
|
|
64
|
+
"react-hook-form": "^7.50.1",
|
|
65
|
+
"tailwindcss": "^3.4.1",
|
|
66
|
+
"typescript": "^5.3.3",
|
|
67
|
+
"vite": "^5.1.3",
|
|
68
|
+
"vite-plugin-dts": "^3.7.3",
|
|
69
|
+
"vitest": "^1.3.1",
|
|
70
|
+
"zod": "^3.22.4"
|
|
71
|
+
},
|
|
72
|
+
"keywords": [
|
|
73
|
+
"kyc",
|
|
74
|
+
"due-diligence",
|
|
75
|
+
"workflow",
|
|
76
|
+
"react",
|
|
77
|
+
"sdk",
|
|
78
|
+
"metakyc",
|
|
79
|
+
"identity-verification",
|
|
80
|
+
"compliance"
|
|
81
|
+
],
|
|
82
|
+
"author": "MetaKYC",
|
|
83
|
+
"license": "MIT",
|
|
84
|
+
"repository": {
|
|
85
|
+
"type": "git",
|
|
86
|
+
"url": "https://github.com/metakyc/sdk"
|
|
87
|
+
}
|
|
88
|
+
}
|