@hasna/contacts 0.6.36 → 0.8.1

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 (69) hide show
  1. package/README.md +123 -69
  2. package/dist/cli/commands/advanced.d.ts.map +1 -1
  3. package/dist/cli/commands/core.d.ts +1 -1
  4. package/dist/cli/commands/core.d.ts.map +1 -1
  5. package/dist/cli/commands/crm.d.ts.map +1 -1
  6. package/dist/cli/index.js +9206 -39957
  7. package/dist/cli/legacy.d.ts +18 -0
  8. package/dist/cli/legacy.d.ts.map +1 -0
  9. package/dist/cli/status-domain.preload.d.ts +2 -0
  10. package/dist/cli/status-domain.preload.d.ts.map +1 -0
  11. package/dist/cli/storage.d.ts.map +1 -1
  12. package/dist/cloud/client-config.d.ts +6 -0
  13. package/dist/cloud/client-config.d.ts.map +1 -0
  14. package/dist/cloud/http-storage.d.ts +49 -70
  15. package/dist/cloud/http-storage.d.ts.map +1 -1
  16. package/dist/cloud/resolver-inputs.d.ts +51 -0
  17. package/dist/cloud/resolver-inputs.d.ts.map +1 -0
  18. package/dist/db/paths.d.ts +13 -7
  19. package/dist/db/paths.d.ts.map +1 -1
  20. package/dist/generated/storage-kit/backend.d.ts +19 -0
  21. package/dist/generated/storage-kit/backend.d.ts.map +1 -0
  22. package/dist/generated/storage-kit/index.d.ts +2 -2
  23. package/dist/generated/storage-kit/index.d.ts.map +1 -1
  24. package/dist/generated/storage-kit/migrations.d.ts +21 -0
  25. package/dist/generated/storage-kit/migrations.d.ts.map +1 -1
  26. package/dist/generated/storage-kit/own.d.ts +11 -0
  27. package/dist/generated/storage-kit/own.d.ts.map +1 -0
  28. package/dist/generated/storage-kit/pool.d.ts +5 -7
  29. package/dist/generated/storage-kit/pool.d.ts.map +1 -1
  30. package/dist/generated/storage-kit/query.d.ts +1 -1
  31. package/dist/generated/storage-kit/query.d.ts.map +1 -1
  32. package/dist/generated/storage-kit/tls.d.ts +30 -3
  33. package/dist/generated/storage-kit/tls.d.ts.map +1 -1
  34. package/dist/index.d.ts +2 -2
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +454 -5713
  37. package/dist/lib/images.d.ts.map +1 -1
  38. package/dist/mcp/handlers/advanced.d.ts.map +1 -1
  39. package/dist/mcp/handlers/core.d.ts +1 -1
  40. package/dist/mcp/index.d.ts +9 -0
  41. package/dist/mcp/index.d.ts.map +1 -1
  42. package/dist/mcp/index.js +549 -5895
  43. package/dist/mcp/startup-gate.d.ts +48 -0
  44. package/dist/mcp/startup-gate.d.ts.map +1 -0
  45. package/dist/mcp/storage-tools.d.ts.map +1 -1
  46. package/dist/sdk/index.d.ts +80 -11
  47. package/dist/sdk/index.d.ts.map +1 -1
  48. package/dist/sdk/index.js +1028 -2
  49. package/dist/server/cloud.d.ts +6 -7
  50. package/dist/server/cloud.d.ts.map +1 -1
  51. package/dist/server/index.d.ts +2 -1
  52. package/dist/server/index.d.ts.map +1 -1
  53. package/dist/server/index.js +3892 -35295
  54. package/dist/server/security.d.ts +1 -1
  55. package/dist/server/security.d.ts.map +1 -1
  56. package/dist/server/serve.d.ts.map +1 -1
  57. package/dist/store/index.d.ts +66 -93
  58. package/dist/store/index.d.ts.map +1 -1
  59. package/dist/types/store-dto.d.ts +273 -0
  60. package/dist/types/store-dto.d.ts.map +1 -0
  61. package/hasna.contract.json +77 -10
  62. package/package.json +22 -13
  63. package/dashboard/dist/assets/index-0l6aQb1t.css +0 -1
  64. package/dashboard/dist/assets/index-opnZdkVD.js +0 -229
  65. package/dashboard/dist/index.html +0 -13
  66. package/dist/generated/storage-kit/mode.d.ts +0 -48
  67. package/dist/generated/storage-kit/mode.d.ts.map +0 -1
  68. package/dist/lib/config.d.ts +0 -7
  69. package/dist/lib/config.d.ts.map +0 -1
@@ -0,0 +1,18 @@
1
+ import type { Command } from "commander";
2
+ interface LegacyCandidate {
3
+ path: string;
4
+ exists: boolean;
5
+ size: number | null;
6
+ modified_at: string | null;
7
+ wal_present: boolean;
8
+ source: "xdg" | "legacy-hasna" | "ancient";
9
+ }
10
+ export declare function legacyDatabaseCandidates(env?: NodeJS.ProcessEnv): LegacyCandidate[];
11
+ export declare function preserveLegacyDatabase(sourceArg: string | undefined, outputArg: string): {
12
+ source: string;
13
+ output: string;
14
+ bytes: number;
15
+ };
16
+ export declare function registerLegacyCommands(program: Command): void;
17
+ export {};
18
+ //# sourceMappingURL=legacy.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legacy.d.ts","sourceRoot":"","sources":["../../src/cli/legacy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAQzC,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;IACrB,MAAM,EAAE,KAAK,GAAG,cAAc,GAAG,SAAS,CAAC;CAC5C;AAMD,wBAAgB,wBAAwB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,eAAe,EAAE,CAmBhG;AAqCD,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,EAAE,SAAS,EAAE,MAAM,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAqF1I;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqC7D"}
@@ -0,0 +1,2 @@
1
+ declare const originalFetch: typeof fetch;
2
+ //# sourceMappingURL=status-domain.preload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status-domain.preload.d.ts","sourceRoot":"","sources":["../../src/cli/status-domain.preload.ts"],"names":[],"mappings":"AAKA,QAAA,MAAM,aAAa,cAAmB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/cli/storage.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA2DzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAqD9D"}
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/cli/storage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBzC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmB9D"}
@@ -0,0 +1,6 @@
1
+ type Env = Record<string, string | undefined>;
2
+ /** A private change detector spanning every source the shared resolver may consult. */
3
+ export declare function clientConfigurationStamp(env: Env): string;
4
+ export declare function assertConfigurationUnchanged(env: Env, expected: string): void;
5
+ export {};
6
+ //# sourceMappingURL=client-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client-config.d.ts","sourceRoot":"","sources":["../../src/cloud/client-config.ts"],"names":[],"mappings":"AAKA,KAAK,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAwC9C,uFAAuF;AACvF,wBAAgB,wBAAwB,CAAC,GAAG,EAAE,GAAG,GAAG,MAAM,CA2BzD;AAED,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAE7E"}
@@ -1,88 +1,67 @@
1
- export type Env = Record<string, string | undefined>;
2
- /** Normalize a base URL to `<origin>/v1`. */
3
- export declare function toV1BaseUrl(apiUrl: string): string;
4
- export type ClientTransportKind = "local" | "cloud-http";
1
+ /**
2
+ * Canonical contacts client transport.
3
+ *
4
+ * Public clients have exactly one data path: an authenticated HTTPS `/v1`
5
+ * authority, resolved by `@hasna/contracts/client` — the ONE fleet resolver.
6
+ * The authority defaults to the fleet gateway `https://api.hasna.com/contacts`
7
+ * once any credential tier resolves, and `HASNA_CONTACTS_API_URL`, the
8
+ * Keychain `api-url` item, or the credentials file override it. API-key
9
+ * resolution and per-request rotation are owned by the shared resolver, so
10
+ * key material is never exposed by status objects or cached in this package.
11
+ *
12
+ * SQLite, PostgreSQL DSNs, and storage/deployment modes are not client
13
+ * transports. A stale selector is a configuration error, not a reason to read
14
+ * a different data set.
15
+ */
16
+ import { type CredentialChainOptions, type CredentialTier, type HasnaHttpTransport, type HasnaRequestOptions, type QueryParams } from "@hasna/contracts/client";
17
+ import type { Env } from "./resolver-inputs.js";
18
+ export type { Env, QueryParams };
19
+ export declare const RETIRED_CLIENT_SELECTOR_KEYS: readonly ["HASNA_CONTACTS_STORAGE_MODE", "CONTACTS_STORAGE_MODE", "HASNA_CONTACTS_MODE", "CONTACTS_MODE", "HASNA_CONTACTS_DB_PATH", "CONTACTS_DB_PATH", "HASNA_CONTACTS_DATABASE_URL", "CONTACTS_DATABASE_URL"];
20
+ export declare class ContactsClientConfigurationError extends Error {
21
+ readonly code: string;
22
+ constructor(code: string, message: string);
23
+ }
5
24
  export interface ClientTransportResolution {
6
- transport: ClientTransportKind;
7
- mode: "local" | "cloud";
8
- modeSource: string;
25
+ transport: "https" | "unconfigured";
9
26
  baseUrl: string | null;
27
+ apiUrlSource: string | null;
10
28
  apiKeyPresent: boolean;
11
29
  apiKeySource: string | null;
30
+ apiKeyTier: CredentialTier | null;
31
+ configured: boolean;
12
32
  misconfigured: boolean;
33
+ issue: string | null;
13
34
  warning: string | null;
14
35
  }
15
36
  /**
16
- * Decide whether this client should read/write from the cloud API or locally.
17
- * Cloud-http IFF the resolved mode is cloud/self_hosted AND an API key is set.
18
- * If cloud is requested but the key is missing/invalid, returns local with
19
- * `misconfigured: true` so callers can hard-fail instead of drifting.
37
+ * Resolve value-free connection diagnostics.
38
+ *
39
+ * @hasna/contracts 1.0.2 THROWS `ClientTransportConfigurationError` for every
40
+ * incomplete or invalid configuration nothing resolves to a local or
41
+ * partial transport any more. A refusal of that class is reported here as
42
+ * `unconfigured` (never as a usable transport); the shared resolver's own
43
+ * hard refusals — a blank declared variable, a conflict, an unreadable
44
+ * credential file — stay hard errors, exactly as the resolver throws them.
20
45
  */
21
- export declare function resolveClientTransport(name: string, env?: Env): ClientTransportResolution;
22
- /** Thrown when a cloud HTTP request returns a non-2xx status. */
23
- export declare class HasnaHttpError extends Error {
24
- readonly status: number;
25
- readonly method: string;
26
- readonly path: string;
27
- readonly body: unknown;
28
- constructor(method: string, path: string, status: number, body: unknown);
29
- }
30
- type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;
31
- export type QueryParams = Record<string, string | number | boolean | null | undefined>;
32
- export interface RequestOptions {
33
- query?: QueryParams;
34
- idempotencyKey?: string;
35
- timeoutMs?: number;
36
- headers?: Record<string, string>;
37
- signal?: AbortSignal;
38
- retries?: number;
39
- }
40
- export interface HttpTransport {
41
- readonly baseUrl: string;
42
- request<T = unknown>(method: string, path: string, body?: unknown, opts?: RequestOptions): Promise<T>;
43
- get<T = unknown>(path: string, opts?: RequestOptions): Promise<T>;
44
- post<T = unknown>(path: string, body?: unknown, opts?: RequestOptions): Promise<T>;
45
- put<T = unknown>(path: string, body?: unknown, opts?: RequestOptions): Promise<T>;
46
- patch<T = unknown>(path: string, body?: unknown, opts?: RequestOptions): Promise<T>;
47
- del<T = unknown>(path: string, body?: unknown, opts?: RequestOptions): Promise<T>;
48
- }
49
- interface TransportOptions {
50
- name: string;
51
- baseUrl: string;
52
- apiKey: string;
53
- fetchImpl?: FetchLike;
54
- timeoutMs?: number;
55
- retries?: number;
56
- }
57
- export declare function createHttpTransport(options: TransportOptions): HttpTransport;
46
+ export declare function resolveContactsClientTransport(name: string, env?: Env, credentials?: CredentialChainOptions): ClientTransportResolution;
58
47
  export interface StorageClient {
59
48
  readonly name: string;
60
49
  readonly baseUrl: string;
61
- readonly transport: HttpTransport;
62
- list<T = unknown>(resource: string, opts?: RequestOptions): Promise<T>;
63
- get<T = unknown>(resource: string, id: string, opts?: RequestOptions): Promise<T | null>;
64
- create<T = unknown>(resource: string, body: unknown, opts?: RequestOptions): Promise<T>;
65
- update<T = unknown>(resource: string, id: string, patch: unknown, opts?: RequestOptions & {
50
+ readonly transport: HasnaHttpTransport;
51
+ list<T = unknown>(resource: string, opts?: HasnaRequestOptions): Promise<T>;
52
+ get<T = unknown>(resource: string, id: string, opts?: HasnaRequestOptions): Promise<T | null>;
53
+ create<T = unknown>(resource: string, body: unknown, opts?: HasnaRequestOptions): Promise<T>;
54
+ update<T = unknown>(resource: string, id: string, patch: unknown, opts?: HasnaRequestOptions & {
66
55
  method?: "PATCH" | "PUT";
67
56
  }): Promise<T>;
68
- delete<T = unknown>(resource: string, id: string, opts?: RequestOptions): Promise<T>;
57
+ delete<T = unknown>(resource: string, id: string, opts?: HasnaRequestOptions): Promise<T | undefined>;
69
58
  }
70
- export declare function createStorageClient(name: string, transport: HttpTransport): StorageClient;
71
- export type ResolveStorageClientResult = {
72
- transport: "local";
73
- client: null;
74
- resolution: ClientTransportResolution;
75
- } | {
76
- transport: "cloud-http";
59
+ export declare function createStorageClient(name: string, transport: HasnaHttpTransport): StorageClient;
60
+ export interface ResolveStorageClientResult {
61
+ transport: "https";
77
62
  client: StorageClient;
78
63
  resolution: ClientTransportResolution;
79
- };
80
- /**
81
- * The one call the app's storage resolver makes. Reads the client-flip env for
82
- * `name`; returns a ready cloud client when self_hosted + API key are set, else
83
- * `{ transport: 'local', client: null }`. Throws if cloud was requested but is
84
- * misconfigured (so callers never silently read the wrong dataset).
85
- */
86
- export declare function resolveStorageClient(name: string, env?: Env): ResolveStorageClientResult;
87
- export {};
64
+ }
65
+ /** Build the sole contacts client. Any incomplete configuration is terminal. */
66
+ export declare function resolveContactsStorageClient(name: string, env?: Env, credentials?: CredentialChainOptions): ResolveStorageClientResult;
88
67
  //# sourceMappingURL=http-storage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"http-storage.d.ts","sourceRoot":"","s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AE,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IACzI,MAAM,CAAC,CAAC,GAAG,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;CACvG;AAqBD,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,kBAAkB,GAAG,aAAa,CAgC9F;AAED,MAAM,WAAW,0BAA0B;IACzC,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,EAAE,yBAAyB,CAAC;CACvC;AAED,gFAAgF;AAChF,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE,GAAiB,EACtB,WAAW,GAAE,sBAA2B,GACvC,0BAA0B,CAkD5B"}
@@ -0,0 +1,51 @@
1
+ /**
2
+ * The credential-chain seam between @hasna/contracts 1.0.2 and this package.
3
+ *
4
+ * Contacts never builds its own credential or authority chain: the CLI, the
5
+ * MCP server and the store all funnel through
6
+ * `resolveContactsClientTransport`, which hands @hasna/contracts the
7
+ * environment unchanged, per request, fresh. The one thing this module owns
8
+ * is the ambient gate for the resolver's Keychain tier (#1788).
9
+ *
10
+ * The Keychain belongs to the MACHINE, so the resolver consults it only when
11
+ * it is handed the live process environment (or a snapshot the resolver
12
+ * itself marked ambient) — a caller-built env object is the hermetic seam and
13
+ * must never drag a machine identity into a test. A copy made on the way in
14
+ * silently loses that gate, and the per-request re-resolution in
15
+ * `resolveContactsStorageClient` does make a copy: a snapshot of the env so a
16
+ * concurrent mutation cannot tear one resolution. A copy that drops the
17
+ * Keychain gate would, on a Mac station whose only credential is the Keychain
18
+ * item, turn every request into a fresh failure — or, with a credential on
19
+ * disk, into a DIFFERENT principal with no notice.
20
+ *
21
+ * So the ambient answer is decided HERE, on the ORIGINAL env, before any copy
22
+ * exists, and carried across as the documented `keychain.enabled` control.
23
+ * A caller's explicit `keychain` options always win; the injected `run`
24
+ * runner (which @hasna/contracts already treats as "enabled") is left alone.
25
+ */
26
+ import { type CredentialChainOptions } from "@hasna/contracts/client";
27
+ export type Env = Record<string, string | undefined>;
28
+ /**
29
+ * Is this the environment the machine's ambient credential stores belong to?
30
+ *
31
+ * The same test @hasna/contracts performs, run on the env BEFORE any copy
32
+ * exists — which is the whole point of asking here.
33
+ */
34
+ export declare function isAmbientContactsEnv(env: Env): boolean;
35
+ /** Every env name the resolver may consult for the contacts authority or
36
+ * credential — canonical names, the legacy aliases, the deliberate pointers,
37
+ * and the profile selector. */
38
+ export declare function contactsAuthorityEnvKeys(): string[];
39
+ /**
40
+ * The credential chain options a contacts surface hands the resolver.
41
+ *
42
+ * On the identity path (`env === process.env`, or a snapshot @hasna/contracts
43
+ * itself marked ambient) this passes through untouched and the resolver runs
44
+ * its own ambient test. On a CALLER-BUILT env — every hermetic test env, and
45
+ * the per-request snapshot in `resolveContactsStorageClient` — the Keychain
46
+ * tier would silently switch off the moment a copy is made; the caller's
47
+ * explicit controls still win, and otherwise the tier is pinned to what the
48
+ * ORIGINAL env was: ambient in, enabled; hermetic in, disabled.
49
+ */
50
+ export declare function contactsResolverCredentials(env: Env, credentials?: CredentialChainOptions): CredentialChainOptions;
51
+ //# sourceMappingURL=resolver-inputs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resolver-inputs.d.ts","sourceRoot":"","sources":["../../src/cloud/resolver-inputs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,OAAO,EAKL,KAAK,sBAAsB,EAE5B,MAAM,yBAAyB,CAAC;AAEjC,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAMrD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAGtD;AAED;;+BAE+B;AAC/B,wBAAgB,wBAAwB,IAAI,MAAM,EAAE,CASnD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACzC,GAAG,EAAE,GAAG,EACR,WAAW,GAAE,sBAA2B,GACvC,sBAAsB,CAMxB"}
@@ -1,14 +1,20 @@
1
+ export type PathKind = "data" | "state";
2
+ export interface PathsResolverOptions {
3
+ app: string;
4
+ internal?: boolean;
5
+ platform?: string;
6
+ home?: string;
7
+ env?: Record<string, string | undefined>;
8
+ }
9
+ export declare function dataDir(options: PathsResolverOptions): string;
10
+ export declare function stateDir(options: PathsResolverOptions): string;
1
11
  /**
2
- * The XDG data root for contacts (~/.local/share/hasna/contacts, or
3
- * $HASNA_DATA_HOME/contacts). Creates it on first use; adopts the legacy
4
- * `~/.hasna/contacts` (and the older `~/.contacts`) store into it once.
12
+ * The data root for retained server/legacy utilities. It creates only the
13
+ * requested target directory and never scans or adopts older homes.
5
14
  */
6
15
  export declare function getDataDir(): string;
7
16
  /**
8
- * The XDG state root for contacts (~/.local/state/hasna/contacts, or
9
- * $HASNA_STATE_HOME/contacts) — the home of the vault session state file.
10
- * Adopts a legacy `~/.hasna/contacts/.vault-session` once, gated on the state
11
- * target holding no session yet.
17
+ * The state root for retained server/legacy utilities.
12
18
  */
13
19
  export declare function getStateDir(): string;
14
20
  export declare function getDbPath(): string;
@@ -1 +1 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/db/paths.ts"],"names":[],"mappings":"AA8FA;;;;GAIG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAanC;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAiBpC;AAED,wBAAgB,SAAS,IAAI,MAAM,CAIlC"}
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/db/paths.ts"],"names":[],"mappings":"AA6BA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAOxC,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CAC1C;AAmDD,wBAAgB,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CAE7D;AACD,wBAAgB,QAAQ,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CAE9D;AAWD;;;GAGG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAKnC;AAED;;GAEG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAKpC;AAED,wBAAgB,SAAS,IAAI,MAAM,CAIlC"}
@@ -0,0 +1,19 @@
1
+ export declare const SERVER_DATA_BACKENDS: readonly ["postgresql"];
2
+ export type ServerDataBackend = (typeof SERVER_DATA_BACKENDS)[number];
3
+ export type Env = Record<string, string | undefined>;
4
+ /** Upper-snake env token for an app name, e.g. `todos` -> `TODOS`. */
5
+ export declare function envToken(name: string): string;
6
+ export interface ServerDataBackendEnvKeys {
7
+ databaseUrlKeys: string[];
8
+ }
9
+ export declare function serverDataBackendEnvKeys(name: string): ServerDataBackendEnvKeys;
10
+ export interface ServerDataBackendResolution {
11
+ backend: ServerDataBackend;
12
+ source: string;
13
+ databaseUrlPresent: boolean;
14
+ databaseUrlSource: string;
15
+ }
16
+ export declare function resolveServerDataBackend(name: string, env?: Env): ServerDataBackendResolution;
17
+ /** Resolve the required PostgreSQL URL without logging it. */
18
+ export declare function resolveDatabaseUrl(name: string, env?: Env): string;
19
+ //# sourceMappingURL=backend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../../src/generated/storage-kit/backend.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,oBAAoB,yBAA0B,CAAC;AAC5D,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtE,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAErD,sEAAsE;AACtE,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE7C;AAED,MAAM,WAAW,wBAAwB;IACvC,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,GAAG,wBAAwB,CAK/E;AA8CD,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,iBAAiB,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB,EAAE,OAAO,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE,GAAiB,GACrB,2BAA2B,CAS7B;AAED,8DAA8D;AAC9D,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,GAAE,GAAiB,GAAG,MAAM,CAG/E"}
@@ -1,5 +1,5 @@
1
- export declare const KIT_VERSION = "0.4.2";
2
- export * from "./mode.js";
1
+ export declare const KIT_VERSION = "1.0.2";
2
+ export * from "./backend.js";
3
3
  export * from "./tls.js";
4
4
  export * from "./query.js";
5
5
  export * from "./pool.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/storage-kit/index.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/generated/storage-kit/index.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,WAAW,UAAU,CAAC;AAEnC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
@@ -27,11 +27,32 @@ export declare function checksumSql(sql: string): string;
27
27
  export declare function defineMigration(id: string, sql: string): Migration;
28
28
  export interface MigrationRunnerOptions {
29
29
  ledgerTable?: string;
30
+ /**
31
+ * Applied-ledger rows whose ids the build ACKNOWLEDGES as non-reproducible
32
+ * history: a migration that was applied to the ledger by an out-of-band
33
+ * operation or by a build whose id scheme no longer exists, so no current
34
+ * source can reproduce its id or its SQL.
35
+ *
36
+ * An acknowledged id:
37
+ * - passes the downgrade guard (it IS recognized — as history),
38
+ * - is never checksum-compared (its SQL is gone, so no checksum can be
39
+ * computed for it; storing an arbitrary placeholder in `checksum` is
40
+ * what the prod ledger already holds for such rows),
41
+ * - is never re-applied and never re-inserted (it is already in the
42
+ * ledger; the plan covers declared migrations only).
43
+ *
44
+ * The list is EXPLICIT and OPT-IN: an acknowledged id may not also be a
45
+ * declared migration (enforced at construction), and any OTHER applied row
46
+ * unknown to the build still fails the downgrade guard. Every declared
47
+ * migration keeps its checksum bind unchanged.
48
+ */
49
+ acknowledgedLegacyIds?: readonly string[];
30
50
  }
31
51
  export declare class MigrationLedger {
32
52
  private readonly client;
33
53
  private readonly migrations;
34
54
  private readonly ledgerTable;
55
+ private readonly acknowledgedLegacyIds;
35
56
  constructor(client: TypedQueryClient, migrations: readonly Migration[], options?: MigrationRunnerOptions);
36
57
  ensureLedger(): Promise<void>;
37
58
  listApplied(): Promise<AppliedMigration[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"migrations.d.ts","sourceRoot":"","sources":["../../../src/generated/storage-kit/migrations.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAA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B,EAAE,CAAC;IACrC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,EAAE,CAAC;CACpC;AAED,yDAAyD;AACzD,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG/C;AAED,0EAA0E;AAC1E,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,CAElE;AAQD,MAAM,WAAW,sBAAsB;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;;;;;;;;OAkBG;IACH,qBAAqB,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3C;AAED,qBAAa,eAAe;IAKxB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAL7B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAsB;gBAGzC,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,SAAS,SAAS,EAAE,EACjD,OAAO,GAAE,sBAA2B;IA2BhC,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAU7B,WAAW,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;YAKlC,WAAW;IAWzB,oEAAoE;IACpE,OAAO,CAAC,SAAS;IA0BjB,yEAAyE;IACnE,OAAO,CAAC,IAAI,GAAE;QAAE,MAAM,CAAC,EAAE,OAAO,CAAA;KAAO,GAAG,OAAO,CAAC,eAAe,CAAC;CAqBzE;AAED,kEAAkE;AAClE,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,SAAS,SAAS,EAAE,EAChC,OAAO,GAAE,sBAA2B,GACnC,eAAe,CAEjB"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Read `key` from `source` only when `source` OWNS it.
3
+ *
4
+ * Returns `undefined` for an inherited property and for a null/undefined or
5
+ * non-object source, so a guarded read is a drop-in for `source?.[key]` that
6
+ * cannot be answered by the prototype chain.
7
+ */
8
+ export declare function ownProp<T>(source: unknown, key: string): T | undefined;
9
+ /** `ownProp` narrowed to a string, so a polluted non-string cannot slip through. */
10
+ export declare function ownString(source: unknown, key: string): string | undefined;
11
+ //# sourceMappingURL=own.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"own.d.ts","sourceRoot":"","sources":["../../../src/generated/storage-kit/own.ts"],"names":[],"mappings":"AAyCA;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAMtE;AAED,oFAAoF;AACpF,wBAAgB,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAG1E"}
@@ -14,21 +14,19 @@ export interface CreatePgPoolOptions extends TlsResolveOptions {
14
14
  }
15
15
  /** Build a `pg.Pool` with fleet-standard TLS handling. */
16
16
  export declare function createPgPool(options: CreatePgPoolOptions): Pool;
17
- export interface CreateCloudPoolFromEnvOptions extends TlsResolveOptions {
17
+ export interface CreateServerPoolFromEnvOptions extends TlsResolveOptions {
18
18
  max?: number;
19
19
  idleTimeoutMillis?: number;
20
20
  connectionTimeoutMillis?: number;
21
21
  applicationName?: string;
22
22
  }
23
- export interface CloudPoolFromEnv {
23
+ export interface ServerPoolFromEnv {
24
24
  client: PoolQueryClient;
25
25
  connectionSource: string;
26
26
  }
27
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.
28
+ * Resolve the required database URL and build the server's PostgreSQL pool.
29
+ * Missing or invalid configuration throws without logging the URL.
32
30
  */
33
- export declare function createCloudPoolFromEnv(appName: string, options?: CreateCloudPoolFromEnvOptions): CloudPoolFromEnv;
31
+ export declare function createServerPoolFromEnv(appName: string, options?: CreateServerPoolFromEnvOptions): ServerPoolFromEnv;
34
32
  //# sourceMappingURL=pool.d.ts.map
@@ -1 +1 @@
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
+ {"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,EAIL,KAAK,iBAAiB,EACvB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAqB,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAgDrE,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,CAmC/D;AAED,MAAM,WAAW,8BAA+B,SAAQ,iBAAiB;IACvE,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,iBAAiB;IAChC,MAAM,EAAE,eAAe,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,MAAM,EACf,OAAO,GAAE,8BAAmC,GAC3C,iBAAiB,CAcnB"}
@@ -17,7 +17,7 @@ export interface PgExecutor {
17
17
  export interface TypedQueryClient {
18
18
  query<T extends QueryResultRow>(sql: string, params?: readonly unknown[]): Promise<QueryResult<T>>;
19
19
  many<T extends QueryResultRow>(sql: string, params?: readonly unknown[]): Promise<T[]>;
20
- /** First row or `null`. Restored here after open-knowledge dropped it. */
20
+ /** First row or `null`. Restored here after knowledge dropped it. */
21
21
  get<T extends QueryResultRow>(sql: string, params?: readonly unknown[]): Promise<T | null>;
22
22
  /** Exactly one row; throws if zero or more than one row is returned. */
23
23
  one<T extends QueryResultRow>(sql: string, params?: readonly unknown[]): Promise<T>;
@@ -1 +1 @@
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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 passphrase?: string;
5
8
  };
6
9
  export interface TlsResolveOptions {
7
10
  /** Inline CA bundle (PEM). Wins over every other CA source. */
@@ -12,15 +15,39 @@ export interface TlsResolveOptions {
12
15
  env?: Record<string, string | undefined>;
13
16
  }
14
17
  export type SslMode = "disable" | "prefer" | "require" | "verify-ca" | "verify-full";
18
+ /**
19
+ * Remove the TLS query parameters once this module has resolved them into an
20
+ * explicit `ssl` option. pg re-parses `connectionString` AFTER merging pool
21
+ * options and lets the parse win, so leaving `sslmode` (or `ssl`, `sslcert`,
22
+ * `sslkey`, `sslrootcert`, `sslnegotiation`) in the URL replaces the resolved
23
+ * SSL object with pg's own — discarding the CA bundle with it.
24
+ *
25
+ * Non-TLS parameters and any fragment are preserved exactly.
26
+ */
27
+ export declare function connectionStringWithoutTlsParameters(connectionString: string): string;
28
+ /**
29
+ * Preserve pg's transport negotiation choice outside the stripped URL, so
30
+ * `sslnegotiation=direct` survives as an explicit pool option instead of being
31
+ * silently dropped.
32
+ */
33
+ export declare function sslNegotiationFromConnectionString(connectionString: string): "postgres" | "direct" | undefined;
15
34
  /**
16
35
  * 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.
36
+ * `sslmode` query param, the legacy `ssl=true` boolean, and pg's rule that
37
+ * `sslnegotiation=direct` implies TLS when no explicit SSL setting is present.
38
+ * Returns `disable` when TLS is not requested.
19
39
  */
20
40
  export declare function sslModeFromConnectionString(connectionString: string): SslMode;
21
41
  /**
22
42
  * 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.
43
+ * for the full mode table.
44
+ *
45
+ * Returns `false` when TLS was explicitly switched off, and `undefined` when the
46
+ * DSN expressed no TLS policy at all — those are different answers, and pg
47
+ * treats them differently: only `undefined` lets `PGSSLMODE` decide.
48
+ *
49
+ * The caller MUST hand pg `connectionStringWithoutTlsParameters(connectionString)`
50
+ * rather than the original DSN, or pg discards everything resolved here.
24
51
  */
25
52
  export declare function resolveTlsConfig(connectionString: string, options?: TlsResolveOptions): PgSslConfig | undefined;
26
53
  //# sourceMappingURL=tls.d.ts.map
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"tls.d.ts","sourceRoot":"","sources":["../../../src/generated/storage-kit/tls.ts"],"names":[],"mappings":"AAwNA,iEAAiE;AACjE,MAAM,MAAM,WAAW,GACnB,OAAO,GACP;IACE,kBAAkB,EAAE,OAAO,CAAC;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEN,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;AA+BrF;;;;;;;;GAQG;AACH,wBAAgB,oCAAoC,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAOrF;AAgBD;;;;GAIG;AACH,wBAAgB,kCAAkC,CAChD,gBAAgB,EAAE,MAAM,GACvB,UAAU,GAAG,QAAQ,GAAG,SAAS,CAKnC;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAmD7E;AA6CD;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,gBAAgB,EAAE,MAAM,EACxB,OAAO,GAAE,iBAAsB,GAC9B,WAAW,GAAG,SAAS,CAgEzB"}
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export type { ContactProjectMembershipListResult, ContactProjectMembershipMutati
3
3
  export { ContactProjectMembershipConflictError } from "./types/project-memberships.js";
4
4
  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";
5
5
  export { ContactNotFoundError, CompanyNotFoundError, TagNotFoundError, DuplicateTagNameError, AudienceNotFoundError, DuplicateAudienceIdError, InvalidAudienceDefinitionError, AUDIENCE_CHANNELS, CONSENT_STATUSES, CONSENT_POLICIES, } from "./types/index.js";
6
- export { ContactsV1Client, ContactsV1ApiError, } from "./sdk/index.js";
7
- export type { ContactsV1ClientOptions, ContactsV1Contact, ContactsV1Company, ContactsV1Tag, ContactsV1CreateContactInput, ContactsV1UpdateContactInput, ContactsV1CreateCompanyInput, ContactsV1UpdateCompanyInput, ContactsV1CreateTagInput, ContactsV1UpdateTagInput, ContactsV1ProjectMembershipSnapshot, ContactsV1ProjectMembershipMutationInput, ContactsV1ProjectMembershipMutationResult, ContactsV1ProjectMembershipListResult, } from "./sdk/index.js";
6
+ export { ContactsV1Client, ContactsV1ApiError, createContactsClient, contactsSdkAuthorityPinMessage, } from "./sdk/index.js";
7
+ export type { ContactsV1ClientOptions, CreateContactsClientOptions, ContactsV1Contact, ContactsV1Company, ContactsV1Tag, ContactsV1CreateContactInput, ContactsV1UpdateContactInput, ContactsV1CreateCompanyInput, ContactsV1UpdateCompanyInput, ContactsV1CreateTagInput, ContactsV1UpdateTagInput, ContactsV1ProjectMembershipSnapshot, ContactsV1ProjectMembershipMutationInput, ContactsV1ProjectMembershipMutationResult, ContactsV1ProjectMembershipListResult, } from "./sdk/index.js";
8
8
  export { buildV1OpenApiDocument } from "./server/openapi.js";
9
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
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;AAC1B,YAAY,EACV,kCAAkC,EAClC,yCAAyC,EACzC,qCAAqC,EACrC,sCAAsC,EACtC,gCAAgC,GACjC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,qCAAqC,EAAE,MAAM,gCAAgC,CAAC;AAGvF,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,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C,yCAAyC,EACzC,qCAAqC,GACtC,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAQA,OAAO,EACL,QAAQ,EACR,eAAe,EACf,mBAAmB,EACnB,KAAK,KAAK,EACV,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,GACxB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,kCAAkC,EAClC,yCAAyC,EACzC,qCAAqC,EACrC,sCAAsC,EACtC,gCAAgC,GACjC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,qCAAqC,EAAE,MAAM,gCAAgC,CAAC;AAGvF,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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