@techlabi/kycrazy-ui-kit 0.17.0 → 0.19.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.
@@ -1,33 +1,28 @@
1
1
  import { default as React } from 'react';
2
2
  import { z } from 'zod';
3
+ import { KYBBusinessAddress } from '../../../types';
3
4
  declare const businessAddressSchema: z.ZodObject<{
4
5
  street: z.ZodString;
5
6
  number: z.ZodString;
6
- postalCode: z.ZodString;
7
+ postal_code: z.ZodString;
7
8
  city: z.ZodString;
8
- addressCountry: z.ZodString;
9
+ address_country: z.ZodString;
9
10
  }, "strip", z.ZodTypeAny, {
10
11
  number?: string;
11
12
  street?: string;
12
- postalCode?: string;
13
+ postal_code?: string;
13
14
  city?: string;
14
- addressCountry?: string;
15
+ address_country?: string;
15
16
  }, {
16
17
  number?: string;
17
18
  street?: string;
18
- postalCode?: string;
19
+ postal_code?: string;
19
20
  city?: string;
20
- addressCountry?: string;
21
+ address_country?: string;
21
22
  }>;
22
23
  type BusinessAddressFormData = z.infer<typeof businessAddressSchema>;
23
24
  interface BusinessAddressStepProps {
24
- data: {
25
- street: string;
26
- number: string;
27
- postalCode: string;
28
- city: string;
29
- addressCountry: string;
30
- };
25
+ data: KYBBusinessAddress;
31
26
  onDataChange: (data: Partial<BusinessAddressFormData>) => void;
32
27
  onContinue: () => void;
33
28
  onBack: () => void;
@@ -1,37 +1,31 @@
1
1
  import { default as React } from 'react';
2
2
  import { z } from 'zod';
3
+ import { KYBBusinessInformation } from '../../../types';
3
4
  declare const businessInformationSchema: z.ZodObject<{
4
- registrationNumber: z.ZodString;
5
+ registration_number: z.ZodString;
5
6
  country: z.ZodString;
6
- companyName: z.ZodString;
7
- taxIdentityNumber: z.ZodString;
8
- corporateType: z.ZodString;
9
- dateOfEstablishment: z.ZodDate;
7
+ company_name: z.ZodString;
8
+ tax_identity_number: z.ZodString;
9
+ corporate_type: z.ZodString;
10
+ date_of_establishment: z.ZodDate;
10
11
  }, "strip", z.ZodTypeAny, {
11
12
  country?: string;
12
- registrationNumber?: string;
13
- companyName?: string;
14
- taxIdentityNumber?: string;
15
- corporateType?: string;
16
- dateOfEstablishment?: Date;
13
+ registration_number?: string;
14
+ company_name?: string;
15
+ tax_identity_number?: string;
16
+ corporate_type?: string;
17
+ date_of_establishment?: Date;
17
18
  }, {
18
19
  country?: string;
19
- registrationNumber?: string;
20
- companyName?: string;
21
- taxIdentityNumber?: string;
22
- corporateType?: string;
23
- dateOfEstablishment?: Date;
20
+ registration_number?: string;
21
+ company_name?: string;
22
+ tax_identity_number?: string;
23
+ corporate_type?: string;
24
+ date_of_establishment?: Date;
24
25
  }>;
25
26
  type BusinessInformationFormData = z.infer<typeof businessInformationSchema>;
26
27
  interface BusinessInformationStepProps {
27
- data: {
28
- registrationNumber: string;
29
- country: string;
30
- companyName: string;
31
- taxIdentityNumber: string;
32
- corporateType: string;
33
- dateOfEstablishment: Date | null;
34
- };
28
+ data: KYBBusinessInformation;
35
29
  onDataChange: (data: Partial<BusinessInformationFormData>) => void;
36
30
  onContinue: () => void;
37
31
  onBack: () => void;
@@ -1,29 +1,25 @@
1
1
  import { default as React } from 'react';
2
2
  import { z } from 'zod';
3
+ import { KYBCompanyActivity } from '../../../types';
3
4
  declare const companyActivitySchema: z.ZodObject<{
4
5
  industry: z.ZodString;
5
- businessModel: z.ZodString;
6
- annualSalesVolume: z.ZodString;
7
- websiteUrl: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
6
+ business_model: z.ZodString;
7
+ annual_sales_volume: z.ZodString;
8
+ website_url: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodLiteral<"">]>;
8
9
  }, "strip", z.ZodTypeAny, {
9
10
  industry?: string;
10
- businessModel?: string;
11
- annualSalesVolume?: string;
12
- websiteUrl?: string;
11
+ business_model?: string;
12
+ annual_sales_volume?: string;
13
+ website_url?: string;
13
14
  }, {
14
15
  industry?: string;
15
- businessModel?: string;
16
- annualSalesVolume?: string;
17
- websiteUrl?: string;
16
+ business_model?: string;
17
+ annual_sales_volume?: string;
18
+ website_url?: string;
18
19
  }>;
19
20
  type CompanyActivityFormData = z.infer<typeof companyActivitySchema>;
20
21
  interface CompanyActivityStepProps {
21
- data: {
22
- industry: string;
23
- businessModel: string;
24
- annualSalesVolume: string;
25
- websiteUrl: string;
26
- };
22
+ data: KYBCompanyActivity;
27
23
  onDataChange: (data: Partial<CompanyActivityFormData>) => void;
28
24
  onContinue: () => void;
29
25
  onBack: () => void;
@@ -1,25 +1,22 @@
1
1
  import { default as React } from 'react';
2
2
  import { z } from 'zod';
3
+ import { KYBCompanyDocuments } from '../../../types';
3
4
  declare const companyDocumentsSchema: z.ZodObject<{
4
- bankStatement: z.ZodEffects<z.ZodOptional<z.ZodType<File, z.ZodTypeDef, File>>, File, File>;
5
- companyStructure: z.ZodEffects<z.ZodOptional<z.ZodType<File, z.ZodTypeDef, File>>, File, File>;
6
- certificateOfRegistration: z.ZodEffects<z.ZodOptional<z.ZodType<File, z.ZodTypeDef, File>>, File, File>;
5
+ bank_statement: z.ZodEffects<z.ZodOptional<z.ZodType<File, z.ZodTypeDef, File>>, File, File>;
6
+ company_structure: z.ZodEffects<z.ZodOptional<z.ZodType<File, z.ZodTypeDef, File>>, File, File>;
7
+ certificate_of_registration: z.ZodEffects<z.ZodOptional<z.ZodType<File, z.ZodTypeDef, File>>, File, File>;
7
8
  }, "strip", z.ZodTypeAny, {
8
- bankStatement?: File;
9
- companyStructure?: File;
10
- certificateOfRegistration?: File;
9
+ bank_statement?: File;
10
+ company_structure?: File;
11
+ certificate_of_registration?: File;
11
12
  }, {
12
- bankStatement?: File;
13
- companyStructure?: File;
14
- certificateOfRegistration?: File;
13
+ bank_statement?: File;
14
+ company_structure?: File;
15
+ certificate_of_registration?: File;
15
16
  }>;
16
17
  type CompanyDocumentsFormData = z.infer<typeof companyDocumentsSchema>;
17
18
  interface CompanyDocumentsStepProps {
18
- data: {
19
- bankStatement: File | null;
20
- companyStructure: File | null;
21
- certificateOfRegistration: File | null;
22
- };
19
+ data: KYBCompanyDocuments;
23
20
  onDataChange: (data: Partial<CompanyDocumentsFormData>) => void;
24
21
  onContinue: () => void;
25
22
  onBack: () => void;
@@ -1,29 +1,25 @@
1
1
  import { default as React } from 'react';
2
2
  import { z } from 'zod';
3
+ import { KYBPersonalDetails } from '../../../types';
3
4
  declare const personalDetailsSchema: z.ZodObject<{
4
- fullName: z.ZodString;
5
+ full_name: z.ZodString;
5
6
  title: z.ZodString;
6
7
  birth: z.ZodDate;
7
- phoneNumber: z.ZodString;
8
+ phone_number: z.ZodString;
8
9
  }, "strip", z.ZodTypeAny, {
9
10
  title?: string;
10
- fullName?: string;
11
+ full_name?: string;
11
12
  birth?: Date;
12
- phoneNumber?: string;
13
+ phone_number?: string;
13
14
  }, {
14
15
  title?: string;
15
- fullName?: string;
16
+ full_name?: string;
16
17
  birth?: Date;
17
- phoneNumber?: string;
18
+ phone_number?: string;
18
19
  }>;
19
20
  type PersonalDetailsFormData = z.infer<typeof personalDetailsSchema>;
20
21
  interface PersonalDetailsStepProps {
21
- data: {
22
- fullName: string;
23
- title: string;
24
- birth: Date | null;
25
- phoneNumber: string;
26
- };
22
+ data: KYBPersonalDetails;
27
23
  onDataChange: (data: Partial<PersonalDetailsFormData>) => void;
28
24
  onContinue: () => void;
29
25
  onBack: () => void;
@@ -1,2 +1,2 @@
1
1
  export { default } from './App';
2
- export { type KYCrazyProps } from './types';
2
+ export { type KYCrazyProps, type KYCRequestData, type KYBRequestData } from './types';
@@ -4,45 +4,45 @@ export interface KYCrazyProps {
4
4
  apiEndpoint: string;
5
5
  apiKey: string;
6
6
  isKYB?: boolean;
7
- onComplete?: (data: KYCRequestData, next: (data: KYCRequestData) => void) => void;
7
+ onComplete: (token: string, data: KYCRequestData | KYBRequestData) => void;
8
8
  }
9
9
  export type KYCRequestData = {
10
- fullName: string;
10
+ full_name: string;
11
11
  selfiePhoto: File;
12
12
  idCardFront: File;
13
13
  idCardBack: File;
14
14
  };
15
15
  export type KYBPersonalDetails = {
16
- fullName: string;
16
+ full_name: string;
17
17
  title: string;
18
18
  birth: Date;
19
- phoneNumber: string;
19
+ phone_number: string;
20
20
  };
21
21
  export type KYBBusinessInformation = {
22
- registrationNumber: string;
22
+ registration_number: string;
23
23
  country: string;
24
- companyName: string;
25
- taxIdentityNumber: string;
26
- corporateType: string;
27
- dateOfEstablishment: Date;
24
+ company_name: string;
25
+ tax_identity_number: string;
26
+ corporate_type: string;
27
+ date_of_establishment: Date;
28
28
  };
29
29
  export type KYBBusinessAddress = {
30
30
  street: string;
31
31
  number: string;
32
- postalCode: string;
32
+ postal_code: string;
33
33
  city: string;
34
- addressCountry: string;
34
+ address_country: string;
35
35
  };
36
36
  export type KYBCompanyActivity = {
37
37
  industry: string;
38
- businessModel: string;
39
- annualSalesVolume: string;
40
- websiteUrl: string;
38
+ business_model: string;
39
+ annual_sales_volume: string;
40
+ website_url: string;
41
41
  };
42
42
  export type KYBCompanyDocuments = {
43
- bankStatement: File;
44
- companyStructure: File;
45
- certificateOfRegistration: File;
43
+ bank_statement: File;
44
+ company_structure: File;
45
+ certificate_of_registration: File;
46
46
  };
47
47
  export type KYBRequestData = {
48
48
  personal_details: KYBPersonalDetails;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "private": false,
4
4
  "description": "A modern React component library for KYC",
5
5
  "author": "TechLabi",
6
- "version": "0.17.0",
6
+ "version": "0.19.0",
7
7
  "type": "module",
8
8
  "types": "dist/types/index.d.ts",
9
9
  "style": "dist/style.css",
@@ -18,6 +18,13 @@
18
18
  },
19
19
  "./style.css": "./dist/style.css"
20
20
  },
21
+ "keywords": [
22
+ "kyc",
23
+ "kyb",
24
+ "identity",
25
+ "risk",
26
+ "verification"
27
+ ],
21
28
  "scripts": {
22
29
  "dev": "vite",
23
30
  "build": "vite build",