@hasna/contacts 0.6.33 → 0.6.34

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 (206) hide show
  1. package/dist/cli/index.js +45 -11
  2. package/dist/index.js +3 -0
  3. package/dist/server/cloud-index.js +45 -11
  4. package/dist/server/index.js +45 -11
  5. package/migrations/0013_remote_delete_tombstones.sql +15 -0
  6. package/migrations/0014_contact_tag_filter_index.sql +9 -0
  7. package/package.json +1 -1
  8. package/dashboard/dist/assets/index-0l6aQb1t.css +0 -1
  9. package/dashboard/dist/assets/index-opnZdkVD.js +0 -229
  10. package/dashboard/dist/index.html +0 -13
  11. package/dist/cli/commands/advanced.d.ts +0 -3
  12. package/dist/cli/commands/advanced.d.ts.map +0 -1
  13. package/dist/cli/commands/audience.d.ts +0 -18
  14. package/dist/cli/commands/audience.d.ts.map +0 -1
  15. package/dist/cli/commands/core.d.ts +0 -3
  16. package/dist/cli/commands/core.d.ts.map +0 -1
  17. package/dist/cli/commands/crm.d.ts +0 -3
  18. package/dist/cli/commands/crm.d.ts.map +0 -1
  19. package/dist/cli/index.d.ts +0 -3
  20. package/dist/cli/index.d.ts.map +0 -1
  21. package/dist/cli/storage.d.ts +0 -3
  22. package/dist/cli/storage.d.ts.map +0 -1
  23. package/dist/cli/utils.d.ts +0 -10
  24. package/dist/cli/utils.d.ts.map +0 -1
  25. package/dist/cloud/http-storage.d.ts +0 -88
  26. package/dist/cloud/http-storage.d.ts.map +0 -1
  27. package/dist/db/activity.d.ts +0 -15
  28. package/dist/db/activity.d.ts.map +0 -1
  29. package/dist/db/applications.d.ts +0 -10
  30. package/dist/db/applications.d.ts.map +0 -1
  31. package/dist/db/audiences.d.ts +0 -51
  32. package/dist/db/audiences.d.ts.map +0 -1
  33. package/dist/db/companies.d.ts +0 -19
  34. package/dist/db/companies.d.ts.map +0 -1
  35. package/dist/db/contact-tasks.d.ts +0 -19
  36. package/dist/db/contact-tasks.d.ts.map +0 -1
  37. package/dist/db/contacts.d.ts +0 -30
  38. package/dist/db/contacts.d.ts.map +0 -1
  39. package/dist/db/coordination.d.ts +0 -30
  40. package/dist/db/coordination.d.ts.map +0 -1
  41. package/dist/db/database.d.ts +0 -8
  42. package/dist/db/database.d.ts.map +0 -1
  43. package/dist/db/deals.d.ts +0 -14
  44. package/dist/db/deals.d.ts.map +0 -1
  45. package/dist/db/documents.d.ts +0 -38
  46. package/dist/db/documents.d.ts.map +0 -1
  47. package/dist/db/events.d.ts +0 -14
  48. package/dist/db/events.d.ts.map +0 -1
  49. package/dist/db/field-history.d.ts +0 -17
  50. package/dist/db/field-history.d.ts.map +0 -1
  51. package/dist/db/freshness.d.ts +0 -24
  52. package/dist/db/freshness.d.ts.map +0 -1
  53. package/dist/db/graph.d.ts +0 -21
  54. package/dist/db/graph.d.ts.map +0 -1
  55. package/dist/db/groups.d.ts +0 -22
  56. package/dist/db/groups.d.ts.map +0 -1
  57. package/dist/db/health.d.ts +0 -40
  58. package/dist/db/health.d.ts.map +0 -1
  59. package/dist/db/identity.d.ts +0 -32
  60. package/dist/db/identity.d.ts.map +0 -1
  61. package/dist/db/job-history.d.ts +0 -29
  62. package/dist/db/job-history.d.ts.map +0 -1
  63. package/dist/db/learnings.d.ts +0 -43
  64. package/dist/db/learnings.d.ts.map +0 -1
  65. package/dist/db/notes.d.ts +0 -8
  66. package/dist/db/notes.d.ts.map +0 -1
  67. package/dist/db/org-chart.d.ts +0 -37
  68. package/dist/db/org-chart.d.ts.map +0 -1
  69. package/dist/db/org-members.d.ts +0 -9
  70. package/dist/db/org-members.d.ts.map +0 -1
  71. package/dist/db/paths.d.ts +0 -3
  72. package/dist/db/paths.d.ts.map +0 -1
  73. package/dist/db/pg-migrations.d.ts +0 -8
  74. package/dist/db/pg-migrations.d.ts.map +0 -1
  75. package/dist/db/relationships.d.ts +0 -30
  76. package/dist/db/relationships.d.ts.map +0 -1
  77. package/dist/db/signals.d.ts +0 -18
  78. package/dist/db/signals.d.ts.map +0 -1
  79. package/dist/db/sqlite-adapter.d.ts +0 -15
  80. package/dist/db/sqlite-adapter.d.ts.map +0 -1
  81. package/dist/db/storage.d.ts +0 -15
  82. package/dist/db/storage.d.ts.map +0 -1
  83. package/dist/db/tags.d.ts +0 -14
  84. package/dist/db/tags.d.ts.map +0 -1
  85. package/dist/db/tombstones.d.ts +0 -19
  86. package/dist/db/tombstones.d.ts.map +0 -1
  87. package/dist/db/vendor-comms.d.ts +0 -15
  88. package/dist/db/vendor-comms.d.ts.map +0 -1
  89. package/dist/generated/storage-kit/health.d.ts +0 -20
  90. package/dist/generated/storage-kit/health.d.ts.map +0 -1
  91. package/dist/generated/storage-kit/index.d.ts +0 -8
  92. package/dist/generated/storage-kit/index.d.ts.map +0 -1
  93. package/dist/generated/storage-kit/migrations.d.ts +0 -48
  94. package/dist/generated/storage-kit/migrations.d.ts.map +0 -1
  95. package/dist/generated/storage-kit/mode.d.ts +0 -48
  96. package/dist/generated/storage-kit/mode.d.ts.map +0 -1
  97. package/dist/generated/storage-kit/pool.d.ts +0 -34
  98. package/dist/generated/storage-kit/pool.d.ts.map +0 -1
  99. package/dist/generated/storage-kit/query.d.ts +0 -36
  100. package/dist/generated/storage-kit/query.d.ts.map +0 -1
  101. package/dist/generated/storage-kit/tls.d.ts +0 -26
  102. package/dist/generated/storage-kit/tls.d.ts.map +0 -1
  103. package/dist/index.d.ts +0 -7
  104. package/dist/index.d.ts.map +0 -1
  105. package/dist/lib/apple-contacts.d.ts +0 -3
  106. package/dist/lib/apple-contacts.d.ts.map +0 -1
  107. package/dist/lib/audience-contract.d.ts +0 -215
  108. package/dist/lib/audience-contract.d.ts.map +0 -1
  109. package/dist/lib/audit.d.ts +0 -12
  110. package/dist/lib/audit.d.ts.map +0 -1
  111. package/dist/lib/brief.d.ts +0 -3
  112. package/dist/lib/brief.d.ts.map +0 -1
  113. package/dist/lib/config.d.ts +0 -7
  114. package/dist/lib/config.d.ts.map +0 -1
  115. package/dist/lib/connector.d.ts +0 -44
  116. package/dist/lib/connector.d.ts.map +0 -1
  117. package/dist/lib/context.d.ts +0 -5
  118. package/dist/lib/context.d.ts.map +0 -1
  119. package/dist/lib/dedup.d.ts +0 -10
  120. package/dist/lib/dedup.d.ts.map +0 -1
  121. package/dist/lib/document-scanner.d.ts +0 -8
  122. package/dist/lib/document-scanner.d.ts.map +0 -1
  123. package/dist/lib/embeddings.d.ts +0 -9
  124. package/dist/lib/embeddings.d.ts.map +0 -1
  125. package/dist/lib/export.d.ts +0 -8
  126. package/dist/lib/export.d.ts.map +0 -1
  127. package/dist/lib/freshness.d.ts +0 -19
  128. package/dist/lib/freshness.d.ts.map +0 -1
  129. package/dist/lib/gmail-import.d.ts +0 -51
  130. package/dist/lib/gmail-import.d.ts.map +0 -1
  131. package/dist/lib/google-contacts.d.ts +0 -115
  132. package/dist/lib/google-contacts.d.ts.map +0 -1
  133. package/dist/lib/images.d.ts +0 -30
  134. package/dist/lib/images.d.ts.map +0 -1
  135. package/dist/lib/import.d.ts +0 -10
  136. package/dist/lib/import.d.ts.map +0 -1
  137. package/dist/lib/learning-maintenance.d.ts +0 -8
  138. package/dist/lib/learning-maintenance.d.ts.map +0 -1
  139. package/dist/lib/mailery-sync.d.ts +0 -46
  140. package/dist/lib/mailery-sync.d.ts.map +0 -1
  141. package/dist/lib/meeting-capture.d.ts +0 -15
  142. package/dist/lib/meeting-capture.d.ts.map +0 -1
  143. package/dist/lib/package-version.d.ts +0 -6
  144. package/dist/lib/package-version.d.ts.map +0 -1
  145. package/dist/lib/signals.d.ts +0 -9
  146. package/dist/lib/signals.d.ts.map +0 -1
  147. package/dist/lib/signature-parser.d.ts +0 -36
  148. package/dist/lib/signature-parser.d.ts.map +0 -1
  149. package/dist/lib/stats.d.ts +0 -24
  150. package/dist/lib/stats.d.ts.map +0 -1
  151. package/dist/lib/timeline.d.ts +0 -11
  152. package/dist/lib/timeline.d.ts.map +0 -1
  153. package/dist/lib/upcoming.d.ts +0 -14
  154. package/dist/lib/upcoming.d.ts.map +0 -1
  155. package/dist/lib/vault.d.ts +0 -24
  156. package/dist/lib/vault.d.ts.map +0 -1
  157. package/dist/mcp/handlers/advanced.d.ts +0 -14
  158. package/dist/mcp/handlers/advanced.d.ts.map +0 -1
  159. package/dist/mcp/handlers/audience.d.ts +0 -9
  160. package/dist/mcp/handlers/audience.d.ts.map +0 -1
  161. package/dist/mcp/handlers/core.d.ts +0 -10
  162. package/dist/mcp/handlers/core.d.ts.map +0 -1
  163. package/dist/mcp/handlers/crm.d.ts +0 -14
  164. package/dist/mcp/handlers/crm.d.ts.map +0 -1
  165. package/dist/mcp/handlers/index.d.ts +0 -4
  166. package/dist/mcp/handlers/index.d.ts.map +0 -1
  167. package/dist/mcp/handlers/types.d.ts +0 -10
  168. package/dist/mcp/handlers/types.d.ts.map +0 -1
  169. package/dist/mcp/http.d.ts +0 -17
  170. package/dist/mcp/http.d.ts.map +0 -1
  171. package/dist/mcp/index.d.ts +0 -5
  172. package/dist/mcp/index.d.ts.map +0 -1
  173. package/dist/mcp/register-tools.d.ts +0 -3
  174. package/dist/mcp/register-tools.d.ts.map +0 -1
  175. package/dist/mcp/schema.d.ts +0 -3
  176. package/dist/mcp/schema.d.ts.map +0 -1
  177. package/dist/mcp/storage-tools.d.ts +0 -3
  178. package/dist/mcp/storage-tools.d.ts.map +0 -1
  179. package/dist/mcp/tools.d.ts +0 -3799
  180. package/dist/mcp/tools.d.ts.map +0 -1
  181. package/dist/sdk/index.d.ts +0 -16
  182. package/dist/sdk/index.d.ts.map +0 -1
  183. package/dist/sdk/v1.generated.d.ts +0 -203
  184. package/dist/sdk/v1.generated.d.ts.map +0 -1
  185. package/dist/server/cloud-index.d.ts +0 -3
  186. package/dist/server/cloud-index.d.ts.map +0 -1
  187. package/dist/server/cloud-serve.d.ts +0 -3
  188. package/dist/server/cloud-serve.d.ts.map +0 -1
  189. package/dist/server/cloud.d.ts +0 -53
  190. package/dist/server/cloud.d.ts.map +0 -1
  191. package/dist/server/index.d.ts +0 -3
  192. package/dist/server/index.d.ts.map +0 -1
  193. package/dist/server/openapi.d.ts +0 -765
  194. package/dist/server/openapi.d.ts.map +0 -1
  195. package/dist/server/pg-store.d.ts +0 -861
  196. package/dist/server/pg-store.d.ts.map +0 -1
  197. package/dist/server/security.d.ts +0 -24
  198. package/dist/server/security.d.ts.map +0 -1
  199. package/dist/server/serve.d.ts +0 -9
  200. package/dist/server/serve.d.ts.map +0 -1
  201. package/dist/server/v1.d.ts +0 -6
  202. package/dist/server/v1.d.ts.map +0 -1
  203. package/dist/store/index.d.ts +0 -383
  204. package/dist/store/index.d.ts.map +0 -1
  205. package/dist/types/index.d.ts +0 -856
  206. package/dist/types/index.d.ts.map +0 -1
@@ -1,34 +0,0 @@
1
- import type { Pool } from "pg";
2
- import { type TlsResolveOptions } from "./tls.js";
3
- import { type PoolQueryClient } from "./query.js";
4
- export interface CreatePgPoolOptions extends TlsResolveOptions {
5
- connectionString: string;
6
- /** Max clients in the pool. Defaults to pg's default (10). */
7
- max?: number;
8
- /** Idle client timeout (ms). */
9
- idleTimeoutMillis?: number;
10
- /** Connection acquisition timeout (ms). */
11
- connectionTimeoutMillis?: number;
12
- /** Application name reported to Postgres (shows in pg_stat_activity). */
13
- applicationName?: string;
14
- }
15
- /** Build a `pg.Pool` with fleet-standard TLS handling. */
16
- export declare function createPgPool(options: CreatePgPoolOptions): Pool;
17
- export interface CreateCloudPoolFromEnvOptions extends TlsResolveOptions {
18
- max?: number;
19
- idleTimeoutMillis?: number;
20
- connectionTimeoutMillis?: number;
21
- applicationName?: string;
22
- }
23
- export interface CloudPoolFromEnv {
24
- client: PoolQueryClient;
25
- connectionSource: string;
26
- }
27
- /**
28
- * Resolve mode + database URL from the environment and build a cloud pool.
29
- *
30
- * Throws when the resolved mode is not `cloud` (PURE REMOTE has no Postgres in
31
- * `local` mode) or when the database URL is missing. Never logs the URL.
32
- */
33
- export declare function createCloudPoolFromEnv(appName: string, options?: CreateCloudPoolFromEnvOptions): CloudPoolFromEnv;
34
- //# sourceMappingURL=pool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pool.d.ts","sourceRoot":"","sources":["../../../src/generated/storage-kit/pool.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,IAAI,EAAc,MAAM,IAAI,CAAC;AAE3C,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACpE,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAErE,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,gBAAgB,EAAE,MAAM,CAAC;IACzB,8DAA8D;IAC9D,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,2CAA2C;IAC3C,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,yEAAyE;IACzE,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,0DAA0D;AAC1D,wBAAgB,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAe/D;AAED,MAAM,WAAW,6BAA8B,SAAQ,iBAAiB;IACtE,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,eAAe,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,6BAAkC,GAC1C,gBAAgB,CAgClB"}
@@ -1,36 +0,0 @@
1
- import type { Pool, QueryResultRow } from "pg";
2
- export interface QueryResult<T extends QueryResultRow> {
3
- rows: T[];
4
- rowCount: number;
5
- }
6
- /**
7
- * Minimal executor contract. `pg.Pool` and `pg.PoolClient` both satisfy the
8
- * `query` method; the wrapper builds the rest on top so tests can substitute a
9
- * lightweight shim without pulling in a live Postgres.
10
- */
11
- export interface PgExecutor {
12
- query<T extends QueryResultRow>(sql: string, params?: readonly unknown[]): Promise<{
13
- rows: T[];
14
- rowCount: number | null;
15
- }>;
16
- }
17
- export interface TypedQueryClient {
18
- query<T extends QueryResultRow>(sql: string, params?: readonly unknown[]): Promise<QueryResult<T>>;
19
- many<T extends QueryResultRow>(sql: string, params?: readonly unknown[]): Promise<T[]>;
20
- /** First row or `null`. Restored here after open-knowledge dropped it. */
21
- get<T extends QueryResultRow>(sql: string, params?: readonly unknown[]): Promise<T | null>;
22
- /** Exactly one row; throws if zero or more than one row is returned. */
23
- one<T extends QueryResultRow>(sql: string, params?: readonly unknown[]): Promise<T>;
24
- execute(sql: string, params?: readonly unknown[]): Promise<void>;
25
- }
26
- /** Wrap any `PgExecutor` (a Pool, a PoolClient, or a test shim) with the typed vocabulary. */
27
- export declare function wrapExecutor(executor: PgExecutor): TypedQueryClient;
28
- export interface PoolQueryClient extends TypedQueryClient {
29
- readonly pool: Pool;
30
- /** Run a callback inside a `BEGIN`/`COMMIT` transaction on a dedicated client. */
31
- transaction<T>(fn: (client: TypedQueryClient) => Promise<T>): Promise<T>;
32
- close(): Promise<void>;
33
- }
34
- /** Build a `PoolQueryClient` around a live `pg.Pool`. */
35
- export declare function createQueryClient(pool: Pool): PoolQueryClient;
36
- //# sourceMappingURL=query.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../../src/generated/storage-kit/query.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,IAAI,EAAc,cAAc,EAAE,MAAM,IAAI,CAAC;AAE3D,MAAM,WAAW,WAAW,CAAC,CAAC,SAAS,cAAc;IACnD,IAAI,EAAE,CAAC,EAAE,CAAC;IACV,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,CAAC,SAAS,cAAc,EAC5B,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,GAC1B,OAAO,CAAC;QAAE,IAAI,EAAE,CAAC,EAAE,CAAC;QAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,CAAC,SAAS,cAAc,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;IACnG,IAAI,CAAC,CAAC,SAAS,cAAc,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IACvF,0EAA0E;IAC1E,GAAG,CAAC,CAAC,SAAS,cAAc,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC3F,wEAAwE;IACxE,GAAG,CAAC,CAAC,SAAS,cAAc,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACpF,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAClE;AAED,8FAA8F;AAC9F,wBAAgB,YAAY,CAAC,QAAQ,EAAE,UAAU,GAAG,gBAAgB,CAyBnE;AAED,MAAM,WAAW,eAAgB,SAAQ,gBAAgB;IACvD,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,kFAAkF;IAClF,WAAW,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACzE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,yDAAyD;AACzD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,IAAI,GAAG,eAAe,CA2B7D"}
@@ -1,26 +0,0 @@
1
- /** The `ssl` field shape accepted by `pg.Pool` / `pg.Client`. */
2
- export type PgSslConfig = boolean | {
3
- rejectUnauthorized: boolean;
4
- ca?: string;
5
- };
6
- export interface TlsResolveOptions {
7
- /** Inline CA bundle (PEM). Wins over every other CA source. */
8
- ca?: string;
9
- /** Path to a CA bundle PEM file, e.g. the Amazon RDS global bundle. */
10
- caCertPath?: string;
11
- /** Environment used to discover PGSSLROOTCERT / NODE_EXTRA_CA_CERTS. */
12
- env?: Record<string, string | undefined>;
13
- }
14
- export type SslMode = "disable" | "prefer" | "require" | "verify-ca" | "verify-full";
15
- /**
16
- * Extract the effective `sslmode` from a Postgres connection string. Honors the
17
- * `sslmode` query param and the legacy `ssl=true` boolean. Returns `disable`
18
- * when TLS is not requested.
19
- */
20
- export declare function sslModeFromConnectionString(connectionString: string): SslMode;
21
- /**
22
- * Resolve the `pg` ssl config for a connection string. See the module header
23
- * for the full mode table. Returns `undefined` when TLS should be off.
24
- */
25
- export declare function resolveTlsConfig(connectionString: string, options?: TlsResolveOptions): PgSslConfig | undefined;
26
- //# sourceMappingURL=tls.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"tls.d.ts","sourceRoot":"","sources":["../../../src/generated/storage-kit/tls.ts"],"names":[],"mappings":"AAkCA,iEAAiE;AACjE,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG;IAAE,kBAAkB,EAAE,OAAO,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjF,MAAM,WAAW,iBAAiB;IAChC,+DAA+D;IAC/D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,wEAAwE;IACxE,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CAC1C;AAED,MAAM,MAAM,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,aAAa,CAAC;AAErF;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAwB7E;AAUD;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,gBAAgB,EAAE,MAAM,EACxB,OAAO,GAAE,iBAAsB,GAC9B,WAAW,GAAG,SAAS,CA2BzB"}
package/dist/index.d.ts DELETED
@@ -1,7 +0,0 @@
1
- export { getStore, resetStoreCache, ApiUnavailableError, type Store, type ContactsStats, type ContactsStorageStatus, type StorageTableStatus, } from "./store/index.js";
2
- export type { EmailType, PhoneType, AddressType, SocialPlatform, RelationshipType, ContactSource, PreferredContactMethod, ContactStatus, Sensitivity, EntityType, CompanyRelationshipType, VendorCommType, VendorCommDirection, VendorCommStatus, ApplicationType, ApplicationStatus, ApplicationMethod, DealStage, EventType, Email, Phone, Address, SocialProfile, Tag, Contact, ContactWithDetails, Company, CompanyWithDetails, ContactRelationship, CompanyRelationship, ActivityLog, Webhook, Group, CreateGroupInput, UpdateGroupInput, ContactNote, OrgMember, VendorCommunication, EscalationRule, ContactTask, Application, Deal, ContactEvent, CreateEmailInput, CreatePhoneInput, CreateAddressInput, CreateSocialProfileInput, CreateTagInput, UpdateTagInput, CreateContactInput, UpdateContactInput, ContactListOptions, CreateCompanyInput, UpdateCompanyInput, CompanyListOptions, CreateRelationshipInput, CreateCompanyRelationshipInput, CreateActivityInput, CreateWebhookInput, UpdateWebhookInput, DuplicateByEmail, DuplicateByName, CreateOrgMemberInput, UpdateOrgMemberInput, CreateVendorCommunicationInput, UpdateVendorCommunicationInput, CreateContactTaskInput, UpdateContactTaskInput, CreateApplicationInput, UpdateApplicationInput, ListApplicationsOptions, CreateDealInput, UpdateDealInput, CreateEventInput, AudienceChannel, ConsentStatus, ConsentPolicy, AudienceMatch, AudiencePredicateKind, AudiencePredicateOp, AudiencePredicateValue, AudiencePredicate, Audience, AudienceRow, CreateAudienceInput, UpdateAudienceInput, ContactConsent, ContactSuppression, AudienceRecipient, AudienceExclusion, AudienceResolution, ContactRow, CompanyRow, EmailRow, PhoneRow, AddressRow, SocialProfileRow, TagRow, RelationshipRow, ActivityRow, WebhookRow, } from "./types/index.js";
3
- export { ContactNotFoundError, CompanyNotFoundError, TagNotFoundError, DuplicateTagNameError, AudienceNotFoundError, DuplicateAudienceIdError, InvalidAudienceDefinitionError, AUDIENCE_CHANNELS, CONSENT_STATUSES, CONSENT_POLICIES, } from "./types/index.js";
4
- export { ContactsV1Client, ContactsV1ApiError, } from "./sdk/index.js";
5
- export type { ContactsV1ClientOptions, ContactsV1Contact, ContactsV1Company, ContactsV1Tag, ContactsV1CreateContactInput, ContactsV1UpdateContactInput, ContactsV1CreateCompanyInput, ContactsV1UpdateCompanyInput, ContactsV1CreateTagInput, ContactsV1UpdateTagInput, } from "./sdk/index.js";
6
- export { buildV1OpenApiDocument } from "./server/openapi.js";
7
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAiBA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,mBAAmB,EACnB,KAAK,KAAK,EACV,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,GACxB,MAAM,kBAAkB,CAAC;AAG1B,YAAY,EAEV,SAAS,EACT,SAAS,EACT,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,sBAAsB,EACtB,aAAa,EACb,WAAW,EACX,UAAU,EACV,uBAAuB,EACvB,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EACjB,SAAS,EACT,SAAS,EAET,KAAK,EACL,KAAK,EACL,OAAO,EACP,aAAa,EAEb,GAAG,EACH,OAAO,EACP,kBAAkB,EAClB,OAAO,EACP,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,WAAW,EACX,OAAO,EACP,KAAK,EACL,gBAAgB,EAChB,gBAAgB,EAChB,WAAW,EACX,SAAS,EACT,mBAAmB,EACnB,cAAc,EACd,WAAW,EACX,WAAW,EACX,IAAI,EACJ,YAAY,EAEZ,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,wBAAwB,EACxB,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,8BAA8B,EAC9B,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,8BAA8B,EAC9B,8BAA8B,EAC9B,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,eAAe,EACf,eAAe,EACf,gBAAgB,EAEhB,eAAe,EACf,aAAa,EACb,aAAa,EACb,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAElB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,MAAM,EACN,eAAe,EACf,WAAW,EACX,UAAU,GACX,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAEL,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,qBAAqB,EACrB,qBAAqB,EACrB,wBAAwB,EACxB,8BAA8B,EAE9B,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC5B,4BAA4B,EAC5B,wBAAwB,EACxB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,3 +0,0 @@
1
- export declare function exportFromApple(): Promise<string>;
2
- export declare function importToApple(vcfData: string): Promise<void>;
3
- //# sourceMappingURL=apple-contacts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"apple-contacts.d.ts","sourceRoot":"","sources":["../../src/lib/apple-contacts.ts"],"names":[],"mappings":"AAAA,wBAAsB,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAQvD;AAED,wBAAsB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMlE"}
@@ -1,215 +0,0 @@
1
- /**
2
- * Vendored minimal mirror of the `hasna.audience.v1` contract from
3
- * @hasna/contracts (branch feat/distribution-schemas). The upstream package is
4
- * not published yet, so this file mirrors the schema shape 1:1 (strict object,
5
- * contract base fields, predicate refinement rules). Once @hasna/contracts
6
- * ships, this mirror can be replaced with:
7
- *
8
- * import { AudienceSchema, parseContract, SCHEMA_IDS } from "@hasna/contracts/schemas";
9
- * parseContract(SCHEMA_IDS.audience, value);
10
- */
11
- import { z } from "zod";
12
- import type { Audience } from "../types/index.js";
13
- export declare const AUDIENCE_CONTRACT_SCHEMA_ID: "hasna.audience.v1";
14
- export declare const AudiencePredicateContractSchema: z.ZodEffects<z.ZodObject<{
15
- kind: z.ZodEnum<["tag", "attribute", "group"]>;
16
- key: z.ZodOptional<z.ZodString>;
17
- op: z.ZodDefault<z.ZodEnum<["eq", "neq", "in", "not_in", "exists", "not_exists"]>>;
18
- value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
19
- values: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">>;
20
- }, "strict", z.ZodTypeAny, {
21
- values: (string | number | boolean)[];
22
- kind: "tag" | "attribute" | "group";
23
- op: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists";
24
- key?: string | undefined;
25
- value?: string | number | boolean | undefined;
26
- }, {
27
- kind: "tag" | "attribute" | "group";
28
- values?: (string | number | boolean)[] | undefined;
29
- key?: string | undefined;
30
- value?: string | number | boolean | undefined;
31
- op?: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists" | undefined;
32
- }>, {
33
- values: (string | number | boolean)[];
34
- kind: "tag" | "attribute" | "group";
35
- op: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists";
36
- key?: string | undefined;
37
- value?: string | number | boolean | undefined;
38
- }, {
39
- kind: "tag" | "attribute" | "group";
40
- values?: (string | number | boolean)[] | undefined;
41
- key?: string | undefined;
42
- value?: string | number | boolean | undefined;
43
- op?: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists" | undefined;
44
- }>;
45
- export declare const AudienceDefinitionContractSchema: z.ZodObject<{
46
- match: z.ZodDefault<z.ZodEnum<["all", "any"]>>;
47
- predicates: z.ZodArray<z.ZodEffects<z.ZodObject<{
48
- kind: z.ZodEnum<["tag", "attribute", "group"]>;
49
- key: z.ZodOptional<z.ZodString>;
50
- op: z.ZodDefault<z.ZodEnum<["eq", "neq", "in", "not_in", "exists", "not_exists"]>>;
51
- value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
52
- values: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">>;
53
- }, "strict", z.ZodTypeAny, {
54
- values: (string | number | boolean)[];
55
- kind: "tag" | "attribute" | "group";
56
- op: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists";
57
- key?: string | undefined;
58
- value?: string | number | boolean | undefined;
59
- }, {
60
- kind: "tag" | "attribute" | "group";
61
- values?: (string | number | boolean)[] | undefined;
62
- key?: string | undefined;
63
- value?: string | number | boolean | undefined;
64
- op?: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists" | undefined;
65
- }>, {
66
- values: (string | number | boolean)[];
67
- kind: "tag" | "attribute" | "group";
68
- op: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists";
69
- key?: string | undefined;
70
- value?: string | number | boolean | undefined;
71
- }, {
72
- kind: "tag" | "attribute" | "group";
73
- values?: (string | number | boolean)[] | undefined;
74
- key?: string | undefined;
75
- value?: string | number | boolean | undefined;
76
- op?: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists" | undefined;
77
- }>, "many">;
78
- }, "strict", z.ZodTypeAny, {
79
- match: "all" | "any";
80
- predicates: {
81
- values: (string | number | boolean)[];
82
- kind: "tag" | "attribute" | "group";
83
- op: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists";
84
- key?: string | undefined;
85
- value?: string | number | boolean | undefined;
86
- }[];
87
- }, {
88
- predicates: {
89
- kind: "tag" | "attribute" | "group";
90
- values?: (string | number | boolean)[] | undefined;
91
- key?: string | undefined;
92
- value?: string | number | boolean | undefined;
93
- op?: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists" | undefined;
94
- }[];
95
- match?: "all" | "any" | undefined;
96
- }>;
97
- export declare const ConsentPolicyContractSchema: z.ZodEnum<["opt_in", "opt_out", "transactional", "none"]>;
98
- export declare const AudienceContractSchema: z.ZodObject<{
99
- schema: z.ZodLiteral<"hasna.audience.v1">;
100
- id: z.ZodString;
101
- createdAt: z.ZodString;
102
- updatedAt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
103
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
104
- audienceId: z.ZodString;
105
- name: z.ZodString;
106
- definition: z.ZodObject<{
107
- match: z.ZodDefault<z.ZodEnum<["all", "any"]>>;
108
- predicates: z.ZodArray<z.ZodEffects<z.ZodObject<{
109
- kind: z.ZodEnum<["tag", "attribute", "group"]>;
110
- key: z.ZodOptional<z.ZodString>;
111
- op: z.ZodDefault<z.ZodEnum<["eq", "neq", "in", "not_in", "exists", "not_exists"]>>;
112
- value: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>>;
113
- values: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>, "many">>;
114
- }, "strict", z.ZodTypeAny, {
115
- values: (string | number | boolean)[];
116
- kind: "tag" | "attribute" | "group";
117
- op: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists";
118
- key?: string | undefined;
119
- value?: string | number | boolean | undefined;
120
- }, {
121
- kind: "tag" | "attribute" | "group";
122
- values?: (string | number | boolean)[] | undefined;
123
- key?: string | undefined;
124
- value?: string | number | boolean | undefined;
125
- op?: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists" | undefined;
126
- }>, {
127
- values: (string | number | boolean)[];
128
- kind: "tag" | "attribute" | "group";
129
- op: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists";
130
- key?: string | undefined;
131
- value?: string | number | boolean | undefined;
132
- }, {
133
- kind: "tag" | "attribute" | "group";
134
- values?: (string | number | boolean)[] | undefined;
135
- key?: string | undefined;
136
- value?: string | number | boolean | undefined;
137
- op?: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists" | undefined;
138
- }>, "many">;
139
- }, "strict", z.ZodTypeAny, {
140
- match: "all" | "any";
141
- predicates: {
142
- values: (string | number | boolean)[];
143
- kind: "tag" | "attribute" | "group";
144
- op: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists";
145
- key?: string | undefined;
146
- value?: string | number | boolean | undefined;
147
- }[];
148
- }, {
149
- predicates: {
150
- kind: "tag" | "attribute" | "group";
151
- values?: (string | number | boolean)[] | undefined;
152
- key?: string | undefined;
153
- value?: string | number | boolean | undefined;
154
- op?: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists" | undefined;
155
- }[];
156
- match?: "all" | "any" | undefined;
157
- }>;
158
- consentPolicy: z.ZodEnum<["opt_in", "opt_out", "transactional", "none"]>;
159
- suppressionSyncedAt: z.ZodOptional<z.ZodString>;
160
- }, "strict", z.ZodTypeAny, {
161
- name: string;
162
- id: string;
163
- schema: "hasna.audience.v1";
164
- createdAt: string;
165
- audienceId: string;
166
- definition: {
167
- match: "all" | "any";
168
- predicates: {
169
- values: (string | number | boolean)[];
170
- kind: "tag" | "attribute" | "group";
171
- op: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists";
172
- key?: string | undefined;
173
- value?: string | number | boolean | undefined;
174
- }[];
175
- };
176
- consentPolicy: "opt_in" | "opt_out" | "transactional" | "none";
177
- metadata?: Record<string, unknown> | undefined;
178
- updatedAt?: string | null | undefined;
179
- suppressionSyncedAt?: string | undefined;
180
- }, {
181
- name: string;
182
- id: string;
183
- schema: "hasna.audience.v1";
184
- createdAt: string;
185
- audienceId: string;
186
- definition: {
187
- predicates: {
188
- kind: "tag" | "attribute" | "group";
189
- values?: (string | number | boolean)[] | undefined;
190
- key?: string | undefined;
191
- value?: string | number | boolean | undefined;
192
- op?: "eq" | "neq" | "in" | "not_in" | "exists" | "not_exists" | undefined;
193
- }[];
194
- match?: "all" | "any" | undefined;
195
- };
196
- consentPolicy: "opt_in" | "opt_out" | "transactional" | "none";
197
- metadata?: Record<string, unknown> | undefined;
198
- updatedAt?: string | null | undefined;
199
- suppressionSyncedAt?: string | undefined;
200
- }>;
201
- export type AudienceContract = z.infer<typeof AudienceContractSchema>;
202
- /** Map a stored audience row to a hasna.audience.v1 contract document. */
203
- export declare function toAudienceContract(audience: Audience): AudienceContract;
204
- /** Validate an arbitrary value against the vendored hasna.audience.v1 mirror. */
205
- export declare function validateAudienceContract(value: unknown): {
206
- ok: true;
207
- value: AudienceContract;
208
- } | {
209
- ok: false;
210
- issues: {
211
- path: string;
212
- message: string;
213
- }[];
214
- };
215
- //# sourceMappingURL=audience-contract.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"audience-contract.d.ts","sourceRoot":"","sources":["../../src/lib/audience-contract.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,eAAO,MAAM,2BAA2B,EAAG,mBAA4B,CAAC;AAUxE,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmBxC,CAAC;AAEL,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKlC,CAAC;AAEZ,eAAO,MAAM,2BAA2B,2DAAyD,CAAC;AAElG,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaxB,CAAC;AAEZ,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,QAAQ,GAAG,gBAAgB,CAwBvE;AAED,iFAAiF;AACjF,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,gBAAgB,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,CAO3J"}
@@ -1,12 +0,0 @@
1
- import type { ContactsDatabase } from "../db/database.js";
2
- import type { ContactWithDetails } from "../types/index.js";
3
- export interface AuditResult {
4
- contact_id: string;
5
- display_name: string;
6
- score: number;
7
- missing: string[];
8
- suggestions: string[];
9
- }
10
- export declare function auditContact(contact: ContactWithDetails): AuditResult;
11
- export declare function listContactAudit(db?: ContactsDatabase): Promise<AuditResult[]>;
12
- //# sourceMappingURL=audit.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/lib/audit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAG5D,MAAM,WAAW,WAAW;IAC1B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,kBAAkB,GAAG,WAAW,CA2BrE;AAED,wBAAsB,gBAAgB,CAAC,EAAE,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC,CAMpF"}
@@ -1,3 +0,0 @@
1
- import type { ContactsDatabase } from "../db/database.js";
2
- export declare function generateBrief(contactId: string, db?: ContactsDatabase): string;
3
- //# sourceMappingURL=brief.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"brief.d.ts","sourceRoot":"","sources":["../../src/lib/brief.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAQ1D,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,gBAAgB,GAAG,MAAM,CA0D9E"}
@@ -1,7 +0,0 @@
1
- interface ContactsConfig {
2
- db_path?: string;
3
- }
4
- export declare function readConfig(): ContactsConfig;
5
- export declare function writeConfig(config: ContactsConfig): void;
6
- export {};
7
- //# sourceMappingURL=config.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAOA,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,UAAU,IAAI,cAAc,CAG3C;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI,CAGxD"}
@@ -1,44 +0,0 @@
1
- /**
2
- * Generic connector runner — the scalable foundation for all external service
3
- * integrations. Any connector (Gmail, Google Contacts, HubSpot, Salesforce…)
4
- * uses this same interface; only the `name` and `args` differ.
5
- *
6
- * Prerequisites: the target connector must be globally installed and authed:
7
- * bun install -g @hasnaxyz/connect-{name}
8
- * connect-{name} auth login
9
- */
10
- export interface ConnectorRunOptions {
11
- /** Connector profile to use (default: "default") */
12
- profile?: string;
13
- /** Timeout in ms (default: 30_000) */
14
- timeout?: number;
15
- }
16
- export declare class ConnectorNotInstalledError extends Error {
17
- readonly connectorName: string;
18
- constructor(connectorName: string);
19
- }
20
- export declare class ConnectorAuthError extends Error {
21
- readonly connectorName: string;
22
- constructor(connectorName: string, detail?: string);
23
- }
24
- /**
25
- * Execute any connector operation and return the parsed JSON output.
26
- *
27
- * Usage:
28
- * const messages = await runConnector("gmail", ["messages", "list", "-q", "from:acme.com"]);
29
- * const contacts = await runConnector("googlecontacts", ["contacts", "list"]);
30
- */
31
- export declare function runConnector(name: string, args: string[], opts?: ConnectorRunOptions): Promise<unknown>;
32
- /**
33
- * Returns the path to a connector's token file.
34
- * Useful for implementations that need direct API access with refreshed tokens.
35
- * Checks canonical path first, then legacy fallback.
36
- */
37
- export declare function getConnectorTokenPath(name: string, profile?: string): string | null;
38
- /**
39
- * Read and parse connector tokens from disk.
40
- * Useful when a library needs a raw access token (e.g. for batched REST calls
41
- * that would be too slow to do one-at-a-time through the CLI).
42
- */
43
- export declare function readConnectorTokens(name: string, profile?: string): Record<string, unknown>;
44
- //# sourceMappingURL=connector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"connector.d.ts","sourceRoot":"","sources":["../../src/lib/connector.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,MAAM,WAAW,mBAAmB;IAClC,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,sCAAsC;IACtC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,0BAA2B,SAAQ,KAAK;aACvB,aAAa,EAAE,MAAM;gBAArB,aAAa,EAAE,MAAM;CAOlD;AAED,qBAAa,kBAAmB,SAAQ,KAAK;aACf,aAAa,EAAE,MAAM;gBAArB,aAAa,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM;CAQnE;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EAAE,EACd,IAAI,GAAE,mBAAwB,GAC7B,OAAO,CAAC,OAAO,CAAC,CAyDlB;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,SAAY,GAAG,MAAM,GAAG,IAAI,CAUtF;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,SAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQ9F"}
@@ -1,5 +0,0 @@
1
- import type { ContactsDatabase } from "../db/database.js";
2
- export declare function getContactCard(contactId: string, db?: ContactsDatabase): object;
3
- export declare function getContactBrief(contactId: string, taskContext?: string, db?: ContactsDatabase): object;
4
- export declare function assembleContext(contactIds: string[], format?: 'meeting_prep' | 'deal_review' | 'outreach' | 'research', db?: ContactsDatabase): Promise<object>;
5
- //# sourceMappingURL=context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/lib/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAK1D,wBAAgB,cAAc,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,gBAAgB,GAAG,MAAM,CAc/E;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,gBAAgB,GAAG,MAAM,CAkCtG;AAED,wBAAsB,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,MAAM,GAAE,cAAc,GAAG,aAAa,GAAG,UAAU,GAAG,UAA2B,EAAE,EAAE,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAOrL"}
@@ -1,10 +0,0 @@
1
- import type { ContactsDatabase } from "../db/database.js";
2
- export declare function findEmailDuplicates(db: ContactsDatabase): Array<{
3
- email: string;
4
- contact_ids: string[];
5
- }>;
6
- export declare function findNameDuplicates(db: ContactsDatabase): Array<{
7
- contact_ids: [string, string];
8
- similarity: number;
9
- }>;
10
- //# sourceMappingURL=dedup.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dedup.d.ts","sourceRoot":"","sources":["../../src/lib/dedup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,gBAAgB,GAAG,KAAK,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CASzG;AAeD,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,gBAAgB,GAAG,KAAK,CAAC;IAAE,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAYrH"}
@@ -1,8 +0,0 @@
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
@@ -1 +0,0 @@
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"}
@@ -1,9 +0,0 @@
1
- import type { ContactsDatabase } from "../db/database.js";
2
- export declare function buildContactEmbeddingText(contact: Record<string, unknown>): string;
3
- export declare function embedContact(contactId: string, db?: ContactsDatabase): Promise<void>;
4
- export declare function embedAllContacts(db?: ContactsDatabase): Promise<number>;
5
- export declare function semanticSearch(query: string, limit?: number, db?: ContactsDatabase): Array<{
6
- contact_id: string;
7
- score: number;
8
- }>;
9
- //# sourceMappingURL=embeddings.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"embeddings.d.ts","sourceRoot":"","sources":["../../src/lib/embeddings.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAuB1D,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAclF;AAED,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAW1F;AAED,wBAAsB,gBAAgB,CAAC,EAAE,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAO7E;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAK,EAAE,EAAE,CAAC,EAAE,gBAAgB,GAAG,KAAK,CAAC;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAgB7H"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Export contacts to CSV, vCard (.vcf), or JSON formats.
3
- * Accepts ContactWithDetails from src/types/index.ts.
4
- */
5
- import type { ContactWithDetails } from "../types/index.js";
6
- export type ExportContact = ContactWithDetails;
7
- export declare function exportContacts(format: "json" | "csv" | "vcf", contacts: ExportContact[]): Promise<string>;
8
- //# sourceMappingURL=export.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/lib/export.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC;AAqK/C,wBAAsB,cAAc,CAClC,MAAM,EAAE,MAAM,GAAG,KAAK,GAAG,KAAK,EAC9B,QAAQ,EAAE,aAAa,EAAE,GACxB,OAAO,CAAC,MAAM,CAAC,CAWjB"}
@@ -1,19 +0,0 @@
1
- import type { ContactsDatabase } from "../db/database.js";
2
- export interface FreshnessResult {
3
- contact_id: string;
4
- score: number;
5
- breakdown: Record<string, {
6
- confidence: string;
7
- last_verified?: string;
8
- days_ago?: number;
9
- }>;
10
- needs_enrichment: boolean;
11
- }
12
- export declare function getFreshnessScore(contactId: string, db?: ContactsDatabase): FreshnessResult;
13
- export declare function getStaleContacts(_threshold?: number, db?: ContactsDatabase): Array<{
14
- id: string;
15
- display_name: string;
16
- score: number;
17
- }>;
18
- export declare function markFieldVerified(contactId: string, fieldName: string, source: string, db?: ContactsDatabase): void;
19
- //# sourceMappingURL=freshness.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"freshness.d.ts","sourceRoot":"","sources":["../../src/lib/freshness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAG1D,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,aAAa,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7F,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,gBAAgB,GAAG,eAAe,CAoD3F;AAED,wBAAgB,gBAAgB,CAC9B,UAAU,SAAK,EACf,EAAE,CAAC,EAAE,gBAAgB,GACpB,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAW5D;AAED,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,EAAE,CAAC,EAAE,gBAAgB,GACpB,IAAI,CAON"}
@@ -1,51 +0,0 @@
1
- /**
2
- * Gmail contact import — fetches messages matching a query via the connect-gmail
3
- * connector, extracts unique senders/recipients, and returns them as
4
- * CreateContactInput objects ready to upsert into the local DB.
5
- *
6
- * Auth: connect-gmail auth login (run once per profile)
7
- * Install: bun install -g @hasnaxyz/connect-gmail
8
- */
9
- import type { CreateContactInput } from "../types/index.js";
10
- /**
11
- * Parse a single RFC 5322 address header value into { name, email } pairs.
12
- * Handles: "Name <email>", "<email>", "email", and comma-separated lists.
13
- */
14
- export declare function parseAddressHeader(header: string): Array<{
15
- name: string;
16
- email: string;
17
- }>;
18
- /**
19
- * Infer a company name from an email domain.
20
- * Returns null for personal/generic domains (gmail, yahoo, hotmail, etc.).
21
- */
22
- export declare function domainToCompany(email: string): string | null;
23
- /**
24
- * Parse display name into first/last name.
25
- */
26
- export declare function parseName(displayName: string): {
27
- first_name?: string;
28
- last_name?: string;
29
- };
30
- export interface GmailImportOptions {
31
- query: string;
32
- /** Max messages to scan (default 200, max 500) */
33
- max_messages?: number;
34
- /** Gmail profile to use (default: "default") */
35
- gmail_profile?: string;
36
- tag_ids?: string[];
37
- group_id?: string;
38
- }
39
- export interface ExtractedContact {
40
- email: string;
41
- name: string;
42
- company_hint: string | null;
43
- contact_input: CreateContactInput;
44
- }
45
- /**
46
- * Fetch messages matching `query` from Gmail and extract unique contacts.
47
- * Uses connect-gmail's stored tokens for auth — no API keys needed in code.
48
- * Does NOT write to the database — returns prepared CreateContactInput objects.
49
- */
50
- export declare function extractContactsFromGmail(opts: GmailImportOptions): Promise<ExtractedContact[]>;
51
- //# sourceMappingURL=gmail-import.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gmail-import.d.ts","sourceRoot":"","sources":["../../src/lib/gmail-import.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAK5D;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC,CAmBzF;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAgB5D;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG;IAAE,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAO1F;AAID,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,gDAAgD;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,aAAa,EAAE,kBAAkB,CAAC;CACnC;AAQD;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAsF7B"}