@hasna/contacts 0.5.2 → 0.6.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.
@@ -0,0 +1,8 @@
1
+ export interface DocumentScanResult {
2
+ fields: Record<string, string>;
3
+ raw_text: string;
4
+ document_type: string;
5
+ confidence: number;
6
+ }
7
+ export declare function scanDocument(imageSource: string, docType?: string): Promise<DocumentScanResult>;
8
+ //# sourceMappingURL=document-scanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-scanner.d.ts","sourceRoot":"","sources":["../../src/lib/document-scanner.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAsB,YAAY,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAoGrG"}
@@ -0,0 +1,30 @@
1
+ export declare function getImagesDir(): string;
2
+ /**
3
+ * Save an image for a contact or company.
4
+ * Accepts a file path (copies it) or base64 data (writes it).
5
+ * Returns the stored filename (e.g. "abc123.jpg")
6
+ */
7
+ export declare function saveImage(entityId: string, source: string, options?: {
8
+ format?: string;
9
+ }): string;
10
+ /**
11
+ * Get the image path for an entity. Returns null if no image exists.
12
+ */
13
+ export declare function getImagePath(entityId: string): string | null;
14
+ /**
15
+ * Get image as base64 data URI for embedding in responses.
16
+ */
17
+ export declare function getImageAsBase64(entityId: string): string | null;
18
+ /**
19
+ * Delete an entity's image.
20
+ */
21
+ export declare function deleteImage(entityId: string): boolean;
22
+ /**
23
+ * List all stored images.
24
+ */
25
+ export declare function listImages(): Array<{
26
+ entity_id: string;
27
+ filename: string;
28
+ path: string;
29
+ }>;
30
+ //# sourceMappingURL=images.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"images.d.ts","sourceRoot":"","sources":["../../src/lib/images.ts"],"names":[],"mappings":"AAaA,wBAAgB,YAAY,IAAI,MAAM,CAGrC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,GAC5B,MAAM,CAuCR;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK5D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOhE;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAWrD;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,KAAK,CAAC;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAQzF"}
@@ -0,0 +1,15 @@
1
+ export declare function initVault(passphrase: string): void;
2
+ export declare function isVaultInitialized(): boolean;
3
+ export declare function unlockVault(passphrase: string): boolean;
4
+ export declare function lockVault(): void;
5
+ export declare function isVaultUnlocked(): boolean;
6
+ export declare function requireVault(): Buffer;
7
+ export declare function encrypt(plaintext: string): {
8
+ ciphertext: string;
9
+ iv: string;
10
+ };
11
+ export declare function decrypt(ciphertext: string, iv: string): string;
12
+ export declare function encryptFile(sourcePath: string, entityId: string): string;
13
+ export declare function decryptFile(encPath: string): Buffer;
14
+ export declare function getDocumentsDir(): string;
15
+ //# sourceMappingURL=vault.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../src/lib/vault.ts"],"names":[],"mappings":"AAoBA,wBAAgB,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CASlD;AAED,wBAAgB,kBAAkB,IAAI,OAAO,CAE5C;AAED,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CASvD;AAED,wBAAgB,SAAS,IAAI,IAAI,CAEhC;AAED,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,wBAAgB,YAAY,IAAI,MAAM,CAGrC;AAED,wBAAgB,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,CAQ7E;AAED,wBAAgB,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAS9D;AAED,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAaxE;AAED,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CASnD;AAED,wBAAgB,eAAe,IAAI,MAAM,CAGxC"}