@vpdev2/metakyc-sdk 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 +104 -0
- package/dist/client/config.d.ts +84 -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 +16 -0
- package/dist/components/CreateApplicantForm.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 +17 -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/PhoneInput.d.ts +11 -0
- package/dist/components/core/PhoneInput.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 +9 -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 +8 -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 +13 -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 +12 -0
- package/dist/components/steps/QuestionnaireStep.d.ts.map +1 -0
- package/dist/components/steps/RiskScoringStep.d.ts +13 -0
- package/dist/components/steps/RiskScoringStep.d.ts.map +1 -0
- package/dist/components/steps/UploadDocumentStep.d.ts +12 -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 +30 -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 +14 -0
- package/dist/hooks/useQuestionnaire.d.ts.map +1 -0
- package/dist/hooks/useRiskScoring.d.ts +15 -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 +36 -0
- package/dist/identity/providers/sumsub.d.ts.map +1 -0
- package/dist/index.cjs +19 -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 +4882 -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 +30 -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 +57 -0
- package/dist/theme/theme-manager.d.ts.map +1 -0
- package/dist/types/applicant.d.ts +135 -0
- package/dist/types/applicant.d.ts.map +1 -0
- package/dist/types/appropriateness-test.d.ts +70 -0
- package/dist/types/appropriateness-test.d.ts.map +1 -0
- package/dist/types/common.d.ts +76 -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 +18 -0
- package/dist/types/form-config.d.ts.map +1 -0
- package/dist/types/identity.d.ts +63 -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 +104 -0
- package/dist/types/risk-scoring.d.ts.map +1 -0
- package/dist/types/theme.d.ts +110 -0
- package/dist/types/theme.d.ts.map +1 -0
- package/dist/types/upload-document.d.ts +77 -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 +87 -0
package/README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
# MetaKYC SDK
|
|
2
|
+
|
|
3
|
+
A comprehensive React SDK for MetaKYC due diligence workflows with configurable API endpoints, dynamic form generation, and complete workflow step coverage.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- ✅ **Configurable API Endpoints** - Support for both Host Controller and Application Service patterns
|
|
8
|
+
- ✅ **Complete Workflow Coverage** - All 9 workflow step types supported
|
|
9
|
+
- ✅ **Dynamic Applicant Form** - 23 configurable form fields for applicant creation
|
|
10
|
+
- 🎨 **Backend-Driven Theming** - Multi-tenant theme customization with 6 presets, custom logo, colors, and CSS (NEW v1.2.0)
|
|
11
|
+
- ✅ **React Hooks** - Clean API with hooks for each workflow step
|
|
12
|
+
- ✅ **Pre-built Components** - Ready-to-use UI components with Tailwind CSS
|
|
13
|
+
- ✅ **Dynamic Form Validation** - Automatic zod schema generation from API rules
|
|
14
|
+
- ✅ **Identity Provider Integration** - Sumsub, Onfido, and SardinAI support
|
|
15
|
+
- ✅ **TypeScript** - Full type safety with types generated from C# DTOs
|
|
16
|
+
- ✅ **Dark Mode** - Built-in dark mode support
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm install @metakyc/sdk
|
|
22
|
+
# or
|
|
23
|
+
yarn add @metakyc/sdk
|
|
24
|
+
# or
|
|
25
|
+
pnpm add @metakyc/sdk
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Quick Start
|
|
29
|
+
|
|
30
|
+
### 1. Wrap your app with MetaKYCProvider
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import { MetaKYCProvider } from '@metakyc/sdk';
|
|
34
|
+
import '@metakyc/sdk/styles';
|
|
35
|
+
|
|
36
|
+
function App() {
|
|
37
|
+
return (
|
|
38
|
+
<MetaKYCProvider
|
|
39
|
+
config={{
|
|
40
|
+
apiKey: process.env.METAKYC_API_KEY,
|
|
41
|
+
tenantId: parseInt(process.env.TENANT_ID),
|
|
42
|
+
baseUrl: process.env.METAKYC_BASE_URL,
|
|
43
|
+
endpoints: { pattern: 'host-controller' },
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
<YourApp />
|
|
47
|
+
</MetaKYCProvider>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 2. Use the complete workflow component
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
import { KycWorkflow } from '@metakyc/sdk';
|
|
56
|
+
|
|
57
|
+
function KYCPage() {
|
|
58
|
+
return (
|
|
59
|
+
<KycWorkflow
|
|
60
|
+
applicantId={applicantId}
|
|
61
|
+
onComplete={(result) => console.log('Complete:', result)}
|
|
62
|
+
onError={(error) => console.error('Error:', error)}
|
|
63
|
+
/>
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### 3. Or build custom UI with hooks
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
import { useKycWorkflow, useQuestionnaire } from '@metakyc/sdk';
|
|
72
|
+
|
|
73
|
+
function CustomKYC() {
|
|
74
|
+
const { progress, currentStep, moveToNext } = useKycWorkflow(applicantId);
|
|
75
|
+
const questionnaire = useQuestionnaire(applicantId);
|
|
76
|
+
|
|
77
|
+
// Build your custom UI...
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Documentation
|
|
82
|
+
|
|
83
|
+
### Core Features
|
|
84
|
+
- 🎨 **[Theming System](./THEMING_SYSTEM.md)** - Multi-tenant theme customization (NEW v1.2.0)
|
|
85
|
+
- **[Dynamic Form Configuration](./DYNAMIC_FORM_CONFIG.md)** - Configure visible fields in applicant creation form
|
|
86
|
+
- **[Workflow Key Management](./WORKFLOW_KEY_MANAGEMENT.md)** - Configure and handle workflow keys and transitions
|
|
87
|
+
- **[External Reference ID](./EXTERNAL_REF_ID.md)** - Required field for system integration
|
|
88
|
+
- [Step Visibility](./STEP_VISIBILITY.md) - Configure which workflow steps appear in the UI
|
|
89
|
+
- [Appropriateness Test](./APPROPRIATENESS_TEST.md) - Quiz system with timer and retry logic
|
|
90
|
+
- [Identity Expiration Handling](./IDENTITY_EXPIRATION_HANDLING.md) - Managing expired identity verification sessions
|
|
91
|
+
- [KYC Status Display](./KYC_STATUS_DISPLAY.md) - Rich status UI for completed/rejected/pending states
|
|
92
|
+
- [SardinAI Integration](./SARDINAI_INTEGRATION.md) - Automatic sessionKey generation for SardinAI Risk SDK
|
|
93
|
+
|
|
94
|
+
### Backend Integration
|
|
95
|
+
- 🔧 **[Backend Theme Integration](./BACKEND_THEME_INTEGRATION.md)** - Database schema, API endpoints, DTOs (NEW v1.2.0)
|
|
96
|
+
- 🎨 **[Panel Theme UI](./PANEL_THEME_UI.md)** - Complete Panel UI implementation guide (NEW v1.2.0)
|
|
97
|
+
|
|
98
|
+
### Migration & Changes
|
|
99
|
+
- [Migration Guide](./MIGRATION_GUIDE.md) - Migrate from custom form to dynamic configuration (v1.0.0 → v1.1.0)
|
|
100
|
+
- [Changelog](./CHANGELOG.md) - Version history and changes
|
|
101
|
+
|
|
102
|
+
## License
|
|
103
|
+
|
|
104
|
+
MIT
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Endpoint pattern types
|
|
3
|
+
* - host-controller: /api/[Controller]/[Action]
|
|
4
|
+
* - application-service: /services/app/[Service]/[Method]
|
|
5
|
+
*/
|
|
6
|
+
export type EndpointPattern = 'host-controller' | 'application-service' | 'custom';
|
|
7
|
+
/**
|
|
8
|
+
* Custom endpoint paths configuration
|
|
9
|
+
*/
|
|
10
|
+
export interface CustomEndpointPaths {
|
|
11
|
+
[key: string]: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Endpoint configuration
|
|
15
|
+
*/
|
|
16
|
+
export interface EndpointConfig {
|
|
17
|
+
pattern: EndpointPattern;
|
|
18
|
+
customPaths?: CustomEndpointPaths;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* SardinAI provider configuration
|
|
22
|
+
*/
|
|
23
|
+
export interface SardinAIProviderConfig {
|
|
24
|
+
clientId: string;
|
|
25
|
+
clientSecret?: string;
|
|
26
|
+
environment: 'sandbox' | 'production';
|
|
27
|
+
region?: 'us' | 'eu' | 'ca' | 'au';
|
|
28
|
+
enableBiometrics?: boolean;
|
|
29
|
+
enablePortScanning?: boolean;
|
|
30
|
+
flow?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Identity provider configurations
|
|
34
|
+
*/
|
|
35
|
+
export interface IdentityProviderConfigs {
|
|
36
|
+
sardinai?: SardinAIProviderConfig;
|
|
37
|
+
sumsub?: Record<string, any>;
|
|
38
|
+
onfido?: Record<string, any>;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Applicant form field name type
|
|
42
|
+
*/
|
|
43
|
+
export type ApplicantFormField = 'firstName' | 'lastName' | 'title' | 'email' | 'dateOfBirth' | 'phonenumber' | 'mobileCountryCode' | 'street' | 'streetNumber' | 'zip' | 'city' | 'country' | 'nationality' | 'otherNationality' | 'defaultLanguage' | 'taxCountry' | 'placeOfBirth' | 'countryOfBirth' | 'salutation' | 'educationLevel' | 'occupation' | 'taxNumber' | 'externalRefId';
|
|
44
|
+
/**
|
|
45
|
+
* Applicant form configuration
|
|
46
|
+
*/
|
|
47
|
+
export interface ApplicantFormConfig {
|
|
48
|
+
/** List of fields to show in the form. If not specified, shows default fields */
|
|
49
|
+
visibleFields?: ApplicantFormField[];
|
|
50
|
+
/** Default workflow key for applicant creation. Can be overridden per component instance */
|
|
51
|
+
workflowKey?: string;
|
|
52
|
+
/** Default external reference ID. Required if not shown in visible fields. */
|
|
53
|
+
externalRefId?: string;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* MetaKYC client configuration
|
|
57
|
+
*/
|
|
58
|
+
export interface MetaKYCClientConfig {
|
|
59
|
+
/** API key for authentication */
|
|
60
|
+
apiKey: string;
|
|
61
|
+
/** Tenant ID */
|
|
62
|
+
tenantId: number;
|
|
63
|
+
/** Base URL of the MetaKYC API */
|
|
64
|
+
baseUrl: string;
|
|
65
|
+
/** Endpoint configuration */
|
|
66
|
+
endpoints?: EndpointConfig;
|
|
67
|
+
/** Request timeout in milliseconds (default: 30000) */
|
|
68
|
+
timeout?: number;
|
|
69
|
+
/** Number of retry attempts for failed requests (default: 3) */
|
|
70
|
+
retries?: number;
|
|
71
|
+
/** Locale/language code (default: 'en') */
|
|
72
|
+
locale?: string;
|
|
73
|
+
/** Identity provider configurations */
|
|
74
|
+
identityProviders?: IdentityProviderConfigs;
|
|
75
|
+
/** Applicant form configuration */
|
|
76
|
+
applicantForm?: ApplicantFormConfig;
|
|
77
|
+
/** Theme configuration (optional - will fetch from backend if not provided) */
|
|
78
|
+
theme?: any;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Default configuration values
|
|
82
|
+
*/
|
|
83
|
+
export declare const defaultConfig: Partial<MetaKYCClientConfig>;
|
|
84
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/client/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,iBAAiB,GAAG,qBAAqB,GAAG,QAAQ,CAAC;AAEnF;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,eAAe,CAAC;IACzB,WAAW,CAAC,EAAE,mBAAmB,CAAC;CACnC;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,SAAS,GAAG,YAAY,CAAC;IACtC,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,WAAW,GACX,UAAU,GACV,OAAO,GACP,OAAO,GACP,aAAa,GACb,aAAa,GACb,mBAAmB,GACnB,QAAQ,GACR,cAAc,GACd,KAAK,GACL,MAAM,GACN,SAAS,GACT,aAAa,GACb,kBAAkB,GAClB,iBAAiB,GACjB,YAAY,GACZ,cAAc,GACd,gBAAgB,GAChB,YAAY,GACZ,gBAAgB,GAChB,YAAY,GACZ,WAAW,GACX,eAAe,CAAC;AAEpB;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,iFAAiF;IACjF,aAAa,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAErC,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IAEf,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAC;IAEjB,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAEhB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,cAAc,CAAC;IAE3B,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB,2CAA2C;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,uCAAuC;IACvC,iBAAiB,CAAC,EAAE,uBAAuB,CAAC;IAE5C,mCAAmC;IACnC,aAAa,CAAC,EAAE,mBAAmB,CAAC;IAEpC,+EAA+E;IAC/E,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,OAAO,CAAC,mBAAmB,CAOtD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EndpointConfig } from './config';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Builds API endpoint URLs based on the configured pattern
|
|
5
|
+
*/
|
|
6
|
+
export declare class EndpointBuilder {
|
|
7
|
+
private config;
|
|
8
|
+
constructor(config: EndpointConfig);
|
|
9
|
+
/**
|
|
10
|
+
* Build an endpoint URL
|
|
11
|
+
* @param controller - Controller name (e.g., 'Applicant')
|
|
12
|
+
* @param action - Action/method name (e.g., 'GetApplicantProgress')
|
|
13
|
+
* @returns The full endpoint path
|
|
14
|
+
*/
|
|
15
|
+
build(controller: string, action: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Convert controller name to service name for application-service pattern
|
|
18
|
+
*/
|
|
19
|
+
private getServiceName;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=endpoint-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoint-builder.d.ts","sourceRoot":"","sources":["../../src/client/endpoint-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C;;GAEG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,MAAM;gBAAN,MAAM,EAAE,cAAc;IAE1C;;;;;OAKG;IACH,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IA2BjD;;OAEG;IACH,OAAO,CAAC,cAAc;CAYvB"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { ApiError } from '../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Custom error class for MetaKYC API errors
|
|
5
|
+
*/
|
|
6
|
+
export declare class MetaKYCError extends Error {
|
|
7
|
+
code?: number | undefined;
|
|
8
|
+
details?: string | undefined;
|
|
9
|
+
validationErrors?: Array<{
|
|
10
|
+
message: string;
|
|
11
|
+
members: string[];
|
|
12
|
+
}> | undefined;
|
|
13
|
+
response?: any;
|
|
14
|
+
constructor(message: string, code?: number | undefined, details?: string | undefined, validationErrors?: Array<{
|
|
15
|
+
message: string;
|
|
16
|
+
members: string[];
|
|
17
|
+
}> | undefined, response?: any);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Handles API errors and converts them to MetaKYCError
|
|
21
|
+
*/
|
|
22
|
+
export declare class ErrorHandler {
|
|
23
|
+
/**
|
|
24
|
+
* Process an error from the API response
|
|
25
|
+
*/
|
|
26
|
+
static handleApiError(error: ApiError): MetaKYCError;
|
|
27
|
+
/**
|
|
28
|
+
* Process an Axios error
|
|
29
|
+
*/
|
|
30
|
+
static handleAxiosError(error: any): MetaKYCError;
|
|
31
|
+
/**
|
|
32
|
+
* Check if an error is a MetaKYCError
|
|
33
|
+
*/
|
|
34
|
+
static isMetaKYCError(error: any): error is MetaKYCError;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=error-handler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-handler.d.ts","sourceRoot":"","sources":["../../src/client/error-handler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC;;GAEG;AACH,qBAAa,YAAa,SAAQ,KAAK;IAK5B,IAAI,CAAC,EAAE,MAAM;IACb,OAAO,CAAC,EAAE,MAAM;IAChB,gBAAgB,CAAC,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IANlE,QAAQ,CAAC,EAAE,GAAG,CAAC;gBAGpB,OAAO,EAAE,MAAM,EACR,IAAI,CAAC,EAAE,MAAM,YAAA,EACb,OAAO,CAAC,EAAE,MAAM,YAAA,EAChB,gBAAgB,CAAC,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,YAAA,EACvE,QAAQ,CAAC,EAAE,GAAG;CAOjB;AAED;;GAEG;AACH,qBAAa,YAAY;IACvB;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,QAAQ,GAAG,YAAY;IASpD;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,GAAG,GAAG,YAAY;IA8CjD;;OAEG;IACH,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,GAAG,GAAG,KAAK,IAAI,YAAY;CAGzD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
import { MetaKYCClientConfig } from './config';
|
|
3
|
+
import { ApiResponse } from '../types';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* HTTP client for MetaKYC API
|
|
7
|
+
* Handles all HTTP communication with configurable endpoints
|
|
8
|
+
*/
|
|
9
|
+
export declare class HttpClient {
|
|
10
|
+
private axiosInstance;
|
|
11
|
+
private endpointBuilder;
|
|
12
|
+
private config;
|
|
13
|
+
constructor(config: MetaKYCClientConfig);
|
|
14
|
+
/**
|
|
15
|
+
* Build endpoint URL
|
|
16
|
+
*/
|
|
17
|
+
buildEndpoint(controller: string, action: string): string;
|
|
18
|
+
/**
|
|
19
|
+
* Make a GET request
|
|
20
|
+
*/
|
|
21
|
+
get<T>(controller: string, action: string, params?: any): Promise<ApiResponse<T>>;
|
|
22
|
+
/**
|
|
23
|
+
* Make a POST request
|
|
24
|
+
*/
|
|
25
|
+
post<T>(controller: string, action: string, data?: any): Promise<ApiResponse<T>>;
|
|
26
|
+
/**
|
|
27
|
+
* Make a PUT request
|
|
28
|
+
*/
|
|
29
|
+
put<T>(controller: string, action: string, data?: any): Promise<ApiResponse<T>>;
|
|
30
|
+
/**
|
|
31
|
+
* Make a DELETE request
|
|
32
|
+
*/
|
|
33
|
+
delete<T>(controller: string, action: string, params?: any): Promise<ApiResponse<T>>;
|
|
34
|
+
/**
|
|
35
|
+
* Handle API response
|
|
36
|
+
*/
|
|
37
|
+
private handleResponse;
|
|
38
|
+
/**
|
|
39
|
+
* Get the underlying axios instance for advanced usage
|
|
40
|
+
*/
|
|
41
|
+
getAxiosInstance(): AxiosInstance;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=http-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-client.d.ts","sourceRoot":"","sources":["../../src/client/http-client.ts"],"names":[],"mappings":"AAAA,OAAc,EAAE,aAAa,EAAiB,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAiB,MAAM,UAAU,CAAC;AAG9D,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC;;;GAGG;AACH,qBAAa,UAAU;IACrB,OAAO,CAAC,aAAa,CAAgB;IACrC,OAAO,CAAC,eAAe,CAAkB;IACzC,OAAO,CAAC,MAAM,CAAsB;gBAExB,MAAM,EAAE,mBAAmB;IA4DvC;;OAEG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IAIzD;;OAEG;IACG,GAAG,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAYvF;;OAEG;IACG,IAAI,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAUtF;;OAEG;IACG,GAAG,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAUrF;;OAEG;IACG,MAAM,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IAY1F;;OAEG;IACH,OAAO,CAAC,cAAc;IAWtB;;OAEG;IACH,gBAAgB,IAAI,aAAa;CAGlC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CreateApplicantFormProps {
|
|
4
|
+
/** Workflow key for this applicant. If not provided, uses config.applicantForm.workflowKey */
|
|
5
|
+
workflowKey?: string;
|
|
6
|
+
/** External reference ID. If not provided, uses config.applicantForm.externalRefId */
|
|
7
|
+
externalRefId?: string;
|
|
8
|
+
onSuccess: (applicantId: number) => void;
|
|
9
|
+
onCancel?: () => void;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Dynamic Create Applicant Form Component
|
|
13
|
+
* Renders only the fields specified in config.applicantForm.visibleFields
|
|
14
|
+
*/
|
|
15
|
+
export declare const CreateApplicantForm: React.FC<CreateApplicantFormProps>;
|
|
16
|
+
//# sourceMappingURL=CreateApplicantForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateApplicantForm.d.ts","sourceRoot":"","sources":["../../src/components/CreateApplicantForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAQnD,MAAM,WAAW,wBAAwB;IACvC,8FAA8F;IAC9F,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,sFAAsF;IACtF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAgTlE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { WorkflowResultType } from '../types';
|
|
3
|
+
|
|
4
|
+
export interface KycWorkflowProps {
|
|
5
|
+
applicantId: number;
|
|
6
|
+
onComplete?: (result: WorkflowResultType) => void;
|
|
7
|
+
onError?: (error: Error) => void;
|
|
8
|
+
theme?: 'light' | 'dark';
|
|
9
|
+
locale?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Main KYC workflow component
|
|
14
|
+
* Automatically renders the current step and handles progression
|
|
15
|
+
*/
|
|
16
|
+
export declare const KycWorkflow: React.FC<KycWorkflowProps>;
|
|
17
|
+
//# sourceMappingURL=KycWorkflow.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KycWorkflow.d.ts","sourceRoot":"","sources":["../../src/components/KycWorkflow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAsB,kBAAkB,EAA2B,MAAM,UAAU,CAAC;AAM3F,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAClD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAmUlD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LogoConfig } from '../types/theme';
|
|
3
|
+
|
|
4
|
+
export interface LogoProps {
|
|
5
|
+
config?: LogoConfig;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Logo Component
|
|
10
|
+
* Displays the configured logo in the top-left position
|
|
11
|
+
*/
|
|
12
|
+
export declare const Logo: React.FC<LogoProps>;
|
|
13
|
+
//# sourceMappingURL=Logo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../src/components/Logo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,WAAW,SAAS;IACxB,MAAM,CAAC,EAAE,UAAU,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAyBpC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
variant?: 'default' | 'success' | 'danger' | 'warning' | 'info';
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Badge component
|
|
9
|
+
*/
|
|
10
|
+
export declare const Badge: React.FC<BadgeProps>;
|
|
11
|
+
//# sourceMappingURL=Badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/core/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IACvE,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;IAChE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAqBtC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'outline' | 'danger' | 'ghost';
|
|
5
|
+
size?: 'sm' | 'md' | 'lg';
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Button component
|
|
10
|
+
*/
|
|
11
|
+
export declare const Button: React.FC<ButtonProps>;
|
|
12
|
+
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/core/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAChF,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAC;IACnE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA0DxC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Card component
|
|
8
|
+
*/
|
|
9
|
+
export declare const Card: React.FC<CardProps>;
|
|
10
|
+
/**
|
|
11
|
+
* Card header component
|
|
12
|
+
*/
|
|
13
|
+
export declare const CardHeader: React.FC<CardProps>;
|
|
14
|
+
/**
|
|
15
|
+
* Card content component
|
|
16
|
+
*/
|
|
17
|
+
export declare const CardContent: React.FC<CardProps>;
|
|
18
|
+
/**
|
|
19
|
+
* Card footer component
|
|
20
|
+
*/
|
|
21
|
+
export declare const CardFooter: React.FC<CardProps>;
|
|
22
|
+
//# sourceMappingURL=Card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../../src/components/core/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACrE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;GAEG;AACH,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAYpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAM1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAM3C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAM1C,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface FileUploadProps {
|
|
4
|
+
label?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
accept?: string;
|
|
7
|
+
multiple?: boolean;
|
|
8
|
+
maxSize?: number;
|
|
9
|
+
onChange?: (files: File[]) => void;
|
|
10
|
+
value?: File[];
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* File upload component with drag and drop
|
|
15
|
+
*/
|
|
16
|
+
export declare const FileUpload: React.FC<FileUploadProps>;
|
|
17
|
+
//# sourceMappingURL=FileUpload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../../../src/components/core/FileUpload.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAGhD,MAAM,WAAW,eAAe;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA6JhD,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
label?: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
helperText?: string;
|
|
7
|
+
leftIcon?: React.ReactNode;
|
|
8
|
+
rightIcon?: React.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Input component
|
|
12
|
+
*/
|
|
13
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
14
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/core/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC;IAC7E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED;;GAEG;AACH,eAAO,MAAM,KAAK,qFA+CjB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InputProps } from './Input';
|
|
2
|
+
|
|
3
|
+
export interface PhoneInputProps extends Omit<InputProps, 'type' | 'leftIcon'> {
|
|
4
|
+
countryCode?: string;
|
|
5
|
+
onCountryCodeChange?: (code: string) => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Phone input component with country code
|
|
9
|
+
*/
|
|
10
|
+
export declare const PhoneInput: import('react').ForwardRefExoticComponent<PhoneInputProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
11
|
+
//# sourceMappingURL=PhoneInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PhoneInput.d.ts","sourceRoot":"","sources":["../../../src/components/core/PhoneInput.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,UAAU,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,UAAU,CAAC;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED;;GAEG;AACH,eAAO,MAAM,UAAU,8GAoCtB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SelectOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface SelectProps extends React.SelectHTMLAttributes<HTMLSelectElement> {
|
|
9
|
+
label?: string;
|
|
10
|
+
error?: string;
|
|
11
|
+
helperText?: string;
|
|
12
|
+
options: SelectOption[];
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Select component
|
|
17
|
+
*/
|
|
18
|
+
export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
19
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/components/core/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAG1C,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,MAAM,uFA8ClB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface SpinnerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
size?: 'sm' | 'md' | 'lg';
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Spinner component
|
|
8
|
+
*/
|
|
9
|
+
export declare const Spinner: React.FC<SpinnerProps>;
|
|
10
|
+
//# sourceMappingURL=Spinner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Spinner.d.ts","sourceRoot":"","sources":["../../../src/components/core/Spinner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,YAAa,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACxE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B;AAED;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA+B1C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './Button';
|
|
2
|
+
export * from './Input';
|
|
3
|
+
export * from './Card';
|
|
4
|
+
export * from './Badge';
|
|
5
|
+
export * from './Spinner';
|
|
6
|
+
export * from './Select';
|
|
7
|
+
export * from './FileUpload';
|
|
8
|
+
export * from './PhoneInput';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/core/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface IdentityVerificationStepProps {
|
|
4
|
+
applicantId: number;
|
|
5
|
+
onComplete?: () => void;
|
|
6
|
+
onBack?: () => void;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Identity verification step component
|
|
10
|
+
* Shows review/confirm form BEFORE calling identity request
|
|
11
|
+
*/
|
|
12
|
+
export declare const IdentityVerificationStep: React.FC<IdentityVerificationStepProps>;
|
|
13
|
+
//# sourceMappingURL=IdentityVerificationStep.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdentityVerificationStep.d.ts","sourceRoot":"","sources":["../../../src/components/identity/IdentityVerificationStep.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAQnD,MAAM,WAAW,6BAA6B;IAC5C,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;GAGG;AACH,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAsoB5E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/identity/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { KycStatus, ReviewStatus, WorkflowResultType } from '../../types';
|
|
3
|
+
|
|
4
|
+
export interface KycStatusDisplayProps {
|
|
5
|
+
kycStatus: KycStatus | null;
|
|
6
|
+
reviewStatus: ReviewStatus;
|
|
7
|
+
workflowResult: WorkflowResultType | null;
|
|
8
|
+
customMessage?: string;
|
|
9
|
+
onContinue?: () => void;
|
|
10
|
+
onContactSupport?: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* KYC Status Display Component
|
|
14
|
+
* Shows appropriate UI based on KYC verification status
|
|
15
|
+
*/
|
|
16
|
+
export declare const KycStatusDisplay: React.FC<KycStatusDisplayProps>;
|
|
17
|
+
//# sourceMappingURL=KycStatusDisplay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KycStatusDisplay.d.ts","sourceRoot":"","sources":["../../../src/components/status/KycStatusDisplay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAE1E,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,YAAY,EAAE,YAAY,CAAC;IAC3B,cAAc,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAqQ5D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/status/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|