tina4-nodejs 3.13.110 → 3.13.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Engine-neutral graph shapes — the mirror of the relational DatabaseResult.
3
+ *
4
+ * GraphNode / GraphEdge are the portable node/edge core the unified surface
5
+ * returns; GraphResult is the raw-query result (records + columns), the same
6
+ * shape as `DatabaseResult`, so a graph read feels exactly like a SQL read.
7
+ * See tina4-documentation/plan/v3/decisions/ADR-0059.md and features/139.
8
+ */
9
+ /** Engine-neutral vertex: id, labels, properties. */
10
+ export declare class GraphNode {
11
+ readonly id: string;
12
+ readonly labels: string[];
13
+ readonly properties: Record<string, unknown>;
14
+ constructor(id: string, labels?: string[] | null | undefined, properties?: Record<string, unknown> | null | undefined);
15
+ toDict(): Record<string, unknown>;
16
+ }
17
+ /** Engine-neutral edge: id, type, from/to node ids, properties. */
18
+ export declare class GraphEdge {
19
+ readonly id: string;
20
+ readonly type: string;
21
+ readonly from: string;
22
+ readonly to: string;
23
+ readonly properties: Record<string, unknown>;
24
+ constructor(id: string, type: string, from: string, to: string, properties?: Record<string, unknown> | null | undefined);
25
+ toDict(): Record<string, unknown>;
26
+ }
27
+ /** A raw-query result — records + columns, same shape as DatabaseResult. */
28
+ export declare class GraphResult implements Iterable<Record<string, unknown>> {
29
+ readonly records: Record<string, unknown>[];
30
+ readonly columns: string[];
31
+ constructor(records?: Record<string, unknown>[] | null | undefined, columns?: string[] | null | undefined);
32
+ toArray(): Record<string, unknown>[];
33
+ /** The first value of the first record, or null. */
34
+ scalar(): unknown;
35
+ [Symbol.iterator](): Iterator<Record<string, unknown>>;
36
+ get length(): number;
37
+ }
@@ -42,4 +42,12 @@ export { MongodbAdapter } from "./adapters/mongodb.js";
42
42
  export type { MongoConfig } from "./adapters/mongodb.js";
43
43
  export { OdbcAdapter } from "./adapters/odbc.js";
44
44
  export type { OdbcConfig } from "./adapters/odbc.js";
45
+ export { GraphDatabase } from "./graph/graphDatabase.js";
46
+ export type { GraphCredentials } from "./graph/graphDatabase.js";
47
+ export { GraphUrl } from "./graph/graphUrl.js";
48
+ export type { GraphEngine } from "./graph/graphUrl.js";
49
+ export { GraphNode, GraphEdge, GraphResult } from "./graph/shapes.js";
50
+ export { GraphError, GraphConnectTimeout } from "./graph/errors.js";
51
+ export type { GraphAdapter, GraphDirection, NeighborOptions, TraverseOptions, } from "./graph/graphAdapter.js";
52
+ export { resolveGraphConnectTimeout, GRAPH_CONNECT_TIMEOUT_VARIABLE, DEFAULT_GRAPH_CONNECT_TIMEOUT_SECONDS, } from "./graph/connectTimeout.js";
45
53
  export { realtime, iceServers, type RealtimeOptions, LocalStorage, S3Storage, selectStorage, storageKey, type StorageBackend, Workspace as RealtimeWorkspace, Channel as RealtimeChannel, ChannelMember as RealtimeChannelMember, Message as RealtimeMessage, Attachment as RealtimeAttachment, } from "./realtime/index.js";