@hasna/connectors 1.3.34 → 1.3.35

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 (35) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +14 -5
  3. package/bin/index.js +34108 -10301
  4. package/bin/mcp.js +33942 -28682
  5. package/bin/serve.js +40690 -13314
  6. package/dashboard/dist/assets/index-DJjxFlTl.css +1 -0
  7. package/dashboard/dist/assets/index-DNPZ58_i.js +284 -0
  8. package/dashboard/dist/index.html +2 -2
  9. package/dist/cli/components/App.d.ts +2 -1
  10. package/dist/cli/components/CategorySelect.d.ts +2 -1
  11. package/dist/cli/components/ConnectorSelect.d.ts +2 -1
  12. package/dist/cli/components/Header.d.ts +2 -1
  13. package/dist/cli/components/InstallProgress.d.ts +2 -1
  14. package/dist/cli/components/SearchView.d.ts +2 -1
  15. package/dist/db/database.d.ts +3 -16
  16. package/dist/db/pg-migrations.d.ts +1 -1
  17. package/dist/index.js +9654 -129
  18. package/dist/lib/runner.d.ts +5 -3
  19. package/dist/mcp/http.d.ts +14 -0
  20. package/dist/mcp/http.test.d.ts +1 -0
  21. package/dist/mcp/index.d.ts +1 -1
  22. package/dist/mcp/server.d.ts +3 -0
  23. package/package.json +3 -3
  24. package/connectors/cloudflare/bun.lock +0 -32
  25. package/connectors/connect-googleads/.secrets/developer-token.json +0 -1
  26. package/connectors/gmail/bin/index.js +0 -7027
  27. package/connectors/googledrive/bin/index.js +0 -5958
  28. package/connectors/imessage/bin/.gitkeep +0 -2
  29. package/connectors/imessage/bin/index.js +0 -3016
  30. package/connectors/imessage/bun.lock +0 -32
  31. package/dashboard/dist/assets/index-ClBXkNbL.css +0 -1
  32. package/dashboard/dist/assets/index-DvfmyAO4.js +0 -284
  33. package/dist/lib/cloud-sync.d.ts +0 -28
  34. package/dist/lib/remote-storage.d.ts +0 -15
  35. package/dist/lib/storage-sync.d.ts +0 -26
@@ -1,28 +0,0 @@
1
- import { PgAdapterAsync } from "./remote-storage.js";
2
- import { type SyncProgress, type SyncResult } from "./storage-sync.js";
3
- export declare const CLOUD_TABLES: readonly ["agents", "resource_locks", "connector_rate_usage", "connector_jobs", "connector_job_runs", "connector_workflows", "connector_usage", "connector_promotions", "feedback"];
4
- export interface SyncMeta {
5
- table_name: string;
6
- last_synced_at: string | null;
7
- direction: "push" | "pull";
8
- }
9
- export declare function getCloudDatabaseUrl(): string | null;
10
- export declare function getCloudPg(): Promise<PgAdapterAsync>;
11
- export declare function runCloudMigrations(remote: PgAdapterAsync): Promise<void>;
12
- export declare function cloudPush(opts?: {
13
- tables?: string[];
14
- onProgress?: (progress: SyncProgress) => void;
15
- }): Promise<SyncResult[]>;
16
- export declare function cloudPull(opts?: {
17
- tables?: string[];
18
- onProgress?: (progress: SyncProgress) => void;
19
- }): Promise<SyncResult[]>;
20
- export declare function cloudSync(opts?: {
21
- tables?: string[];
22
- onProgress?: (progress: SyncProgress) => void;
23
- }): Promise<{
24
- push: SyncResult[];
25
- pull: SyncResult[];
26
- }>;
27
- export declare function getSyncMetaAll(): SyncMeta[];
28
- export declare function resolveTables(tables?: string[]): string[];
@@ -1,15 +0,0 @@
1
- import type { Pool, PoolClient } from "pg";
2
- export declare class PgAdapterAsync {
3
- private readonly pool;
4
- constructor(connectionString: string);
5
- constructor(pool: Pool);
6
- run(sql: string, ...params: unknown[]): Promise<{
7
- changes: number;
8
- }>;
9
- get(sql: string, ...params: unknown[]): Promise<unknown>;
10
- all(sql: string, ...params: unknown[]): Promise<unknown[]>;
11
- exec(sql: string): Promise<void>;
12
- close(): Promise<void>;
13
- transaction<T>(fn: (client: PoolClient) => Promise<T>): Promise<T>;
14
- get raw(): Pool;
15
- }
@@ -1,26 +0,0 @@
1
- import type { Database } from "../db/database.js";
2
- import { PgAdapterAsync } from "./remote-storage.js";
3
- export interface SyncProgress {
4
- table: string;
5
- phase: "reading" | "writing" | "done";
6
- rowsRead: number;
7
- rowsWritten: number;
8
- totalTables: number;
9
- currentTableIndex: number;
10
- }
11
- export interface SyncOptions {
12
- tables: string[];
13
- onProgress?: (progress: SyncProgress) => void;
14
- batchSize?: number;
15
- conflictColumn?: string;
16
- primaryKey?: string | string[];
17
- }
18
- export interface SyncResult {
19
- table: string;
20
- rowsRead: number;
21
- rowsWritten: number;
22
- rowsSkipped: number;
23
- errors: string[];
24
- }
25
- export declare function syncPush(local: Database, remote: PgAdapterAsync, options: SyncOptions): Promise<SyncResult[]>;
26
- export declare function syncPull(remote: PgAdapterAsync, local: Database, options: SyncOptions): Promise<SyncResult[]>;