@workglow/dataset 0.0.110 → 0.0.114
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.
- package/README.md +504 -968
- package/dist/browser.js +376 -490
- package/dist/browser.js.map +13 -13
- package/dist/bun.js +376 -490
- package/dist/bun.js.map +13 -13
- package/dist/chunk/ChunkSchema.d.ts +206 -0
- package/dist/chunk/ChunkSchema.d.ts.map +1 -0
- package/dist/chunk/ChunkVectorStorageSchema.d.ts +64 -0
- package/dist/chunk/ChunkVectorStorageSchema.d.ts.map +1 -0
- package/dist/common.d.ts +5 -5
- package/dist/common.d.ts.map +1 -1
- package/dist/document/Document.d.ts +7 -6
- package/dist/document/Document.d.ts.map +1 -1
- package/dist/document/DocumentSchema.d.ts +0 -465
- package/dist/document/DocumentSchema.d.ts.map +1 -1
- package/dist/knowledge-base/KnowledgeBase.d.ts +122 -0
- package/dist/knowledge-base/KnowledgeBase.d.ts.map +1 -0
- package/dist/knowledge-base/KnowledgeBaseRegistry.d.ts +24 -0
- package/dist/knowledge-base/KnowledgeBaseRegistry.d.ts.map +1 -0
- package/dist/knowledge-base/createKnowledgeBase.d.ts +28 -0
- package/dist/knowledge-base/createKnowledgeBase.d.ts.map +1 -0
- package/dist/node.js +376 -490
- package/dist/node.js.map +13 -13
- package/dist/util/DatasetSchema.d.ts +9 -49
- package/dist/util/DatasetSchema.d.ts.map +1 -1
- package/package.json +5 -5
- package/dist/document/DocumentDataset.d.ts +0 -79
- package/dist/document/DocumentDataset.d.ts.map +0 -1
- package/dist/document/DocumentDatasetRegistry.d.ts +0 -29
- package/dist/document/DocumentDatasetRegistry.d.ts.map +0 -1
- package/dist/document-chunk/DocumentChunkDataset.d.ts +0 -79
- package/dist/document-chunk/DocumentChunkDataset.d.ts.map +0 -1
- package/dist/document-chunk/DocumentChunkDatasetRegistry.d.ts +0 -29
- package/dist/document-chunk/DocumentChunkDatasetRegistry.d.ts.map +0 -1
- package/dist/document-chunk/DocumentChunkSchema.d.ts +0 -56
- package/dist/document-chunk/DocumentChunkSchema.d.ts.map +0 -1
- package/src/document-chunk/README.md +0 -362
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { FromSchema } from "@workglow/util";
|
|
7
|
+
/**
|
|
8
|
+
* Schema for a unified chunk record.
|
|
9
|
+
* Replaces ChunkNode, ChunkMetadata, and EnrichedChunkMetadata with a single flat type.
|
|
10
|
+
*/
|
|
11
|
+
export declare const ChunkRecordSchema: () => {
|
|
12
|
+
readonly type: "object";
|
|
13
|
+
readonly properties: {
|
|
14
|
+
readonly chunkId: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
readonly title: "Chunk ID";
|
|
17
|
+
readonly description: "Unique identifier for this chunk";
|
|
18
|
+
};
|
|
19
|
+
readonly doc_id: {
|
|
20
|
+
readonly type: "string";
|
|
21
|
+
readonly title: "Document ID";
|
|
22
|
+
readonly description: "ID of the parent document";
|
|
23
|
+
};
|
|
24
|
+
readonly text: {
|
|
25
|
+
readonly type: "string";
|
|
26
|
+
readonly title: "Text";
|
|
27
|
+
readonly description: "Text content of the chunk";
|
|
28
|
+
};
|
|
29
|
+
readonly nodePath: {
|
|
30
|
+
readonly type: "array";
|
|
31
|
+
readonly items: {
|
|
32
|
+
readonly type: "string";
|
|
33
|
+
};
|
|
34
|
+
readonly title: "Node Path";
|
|
35
|
+
readonly description: "Node IDs from root to leaf";
|
|
36
|
+
};
|
|
37
|
+
readonly depth: {
|
|
38
|
+
readonly type: "integer";
|
|
39
|
+
readonly title: "Depth";
|
|
40
|
+
readonly description: "Depth in the document tree";
|
|
41
|
+
};
|
|
42
|
+
readonly leafNodeId: {
|
|
43
|
+
readonly type: "string";
|
|
44
|
+
readonly title: "Leaf Node ID";
|
|
45
|
+
readonly description: "ID of the leaf node this chunk belongs to";
|
|
46
|
+
};
|
|
47
|
+
readonly summary: {
|
|
48
|
+
readonly type: "string";
|
|
49
|
+
readonly title: "Summary";
|
|
50
|
+
readonly description: "Summary of the chunk content";
|
|
51
|
+
};
|
|
52
|
+
readonly entities: {
|
|
53
|
+
readonly type: "array";
|
|
54
|
+
readonly items: {
|
|
55
|
+
readonly type: "object";
|
|
56
|
+
readonly properties: {
|
|
57
|
+
readonly text: {
|
|
58
|
+
readonly type: "string";
|
|
59
|
+
readonly title: "Text";
|
|
60
|
+
readonly description: "Entity text";
|
|
61
|
+
};
|
|
62
|
+
readonly type: {
|
|
63
|
+
readonly type: "string";
|
|
64
|
+
readonly title: "Type";
|
|
65
|
+
readonly description: "Entity type (e.g., PERSON, ORG, LOC)";
|
|
66
|
+
};
|
|
67
|
+
readonly score: {
|
|
68
|
+
readonly type: "number";
|
|
69
|
+
readonly title: "Score";
|
|
70
|
+
readonly description: "Confidence score";
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
readonly required: readonly ["text", "type", "score"];
|
|
74
|
+
readonly additionalProperties: false;
|
|
75
|
+
};
|
|
76
|
+
readonly title: "Entities";
|
|
77
|
+
readonly description: "Named entities extracted from the chunk";
|
|
78
|
+
};
|
|
79
|
+
readonly parentSummaries: {
|
|
80
|
+
readonly type: "array";
|
|
81
|
+
readonly items: {
|
|
82
|
+
readonly type: "string";
|
|
83
|
+
};
|
|
84
|
+
readonly title: "Parent Summaries";
|
|
85
|
+
readonly description: "Summaries from ancestor nodes";
|
|
86
|
+
};
|
|
87
|
+
readonly sectionTitles: {
|
|
88
|
+
readonly type: "array";
|
|
89
|
+
readonly items: {
|
|
90
|
+
readonly type: "string";
|
|
91
|
+
};
|
|
92
|
+
readonly title: "Section Titles";
|
|
93
|
+
readonly description: "Titles of ancestor section nodes";
|
|
94
|
+
};
|
|
95
|
+
readonly doc_title: {
|
|
96
|
+
readonly type: "string";
|
|
97
|
+
readonly title: "Document Title";
|
|
98
|
+
readonly description: "Title of the parent document";
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
readonly required: readonly ["chunkId", "doc_id", "text", "nodePath", "depth"];
|
|
102
|
+
readonly additionalProperties: true;
|
|
103
|
+
};
|
|
104
|
+
export type ChunkRecord = FromSchema<ReturnType<typeof ChunkRecordSchema>>;
|
|
105
|
+
/**
|
|
106
|
+
* Schema for chunk record array (for use in task schemas)
|
|
107
|
+
*/
|
|
108
|
+
export declare const ChunkRecordArraySchema: {
|
|
109
|
+
readonly type: "array";
|
|
110
|
+
readonly items: {
|
|
111
|
+
readonly type: "object";
|
|
112
|
+
readonly properties: {
|
|
113
|
+
readonly chunkId: {
|
|
114
|
+
readonly type: "string";
|
|
115
|
+
readonly title: "Chunk ID";
|
|
116
|
+
readonly description: "Unique identifier for this chunk";
|
|
117
|
+
};
|
|
118
|
+
readonly doc_id: {
|
|
119
|
+
readonly type: "string";
|
|
120
|
+
readonly title: "Document ID";
|
|
121
|
+
readonly description: "ID of the parent document";
|
|
122
|
+
};
|
|
123
|
+
readonly text: {
|
|
124
|
+
readonly type: "string";
|
|
125
|
+
readonly title: "Text";
|
|
126
|
+
readonly description: "Text content of the chunk";
|
|
127
|
+
};
|
|
128
|
+
readonly nodePath: {
|
|
129
|
+
readonly type: "array";
|
|
130
|
+
readonly items: {
|
|
131
|
+
readonly type: "string";
|
|
132
|
+
};
|
|
133
|
+
readonly title: "Node Path";
|
|
134
|
+
readonly description: "Node IDs from root to leaf";
|
|
135
|
+
};
|
|
136
|
+
readonly depth: {
|
|
137
|
+
readonly type: "integer";
|
|
138
|
+
readonly title: "Depth";
|
|
139
|
+
readonly description: "Depth in the document tree";
|
|
140
|
+
};
|
|
141
|
+
readonly leafNodeId: {
|
|
142
|
+
readonly type: "string";
|
|
143
|
+
readonly title: "Leaf Node ID";
|
|
144
|
+
readonly description: "ID of the leaf node this chunk belongs to";
|
|
145
|
+
};
|
|
146
|
+
readonly summary: {
|
|
147
|
+
readonly type: "string";
|
|
148
|
+
readonly title: "Summary";
|
|
149
|
+
readonly description: "Summary of the chunk content";
|
|
150
|
+
};
|
|
151
|
+
readonly entities: {
|
|
152
|
+
readonly type: "array";
|
|
153
|
+
readonly items: {
|
|
154
|
+
readonly type: "object";
|
|
155
|
+
readonly properties: {
|
|
156
|
+
readonly text: {
|
|
157
|
+
readonly type: "string";
|
|
158
|
+
readonly title: "Text";
|
|
159
|
+
readonly description: "Entity text";
|
|
160
|
+
};
|
|
161
|
+
readonly type: {
|
|
162
|
+
readonly type: "string";
|
|
163
|
+
readonly title: "Type";
|
|
164
|
+
readonly description: "Entity type (e.g., PERSON, ORG, LOC)";
|
|
165
|
+
};
|
|
166
|
+
readonly score: {
|
|
167
|
+
readonly type: "number";
|
|
168
|
+
readonly title: "Score";
|
|
169
|
+
readonly description: "Confidence score";
|
|
170
|
+
};
|
|
171
|
+
};
|
|
172
|
+
readonly required: readonly ["text", "type", "score"];
|
|
173
|
+
readonly additionalProperties: false;
|
|
174
|
+
};
|
|
175
|
+
readonly title: "Entities";
|
|
176
|
+
readonly description: "Named entities extracted from the chunk";
|
|
177
|
+
};
|
|
178
|
+
readonly parentSummaries: {
|
|
179
|
+
readonly type: "array";
|
|
180
|
+
readonly items: {
|
|
181
|
+
readonly type: "string";
|
|
182
|
+
};
|
|
183
|
+
readonly title: "Parent Summaries";
|
|
184
|
+
readonly description: "Summaries from ancestor nodes";
|
|
185
|
+
};
|
|
186
|
+
readonly sectionTitles: {
|
|
187
|
+
readonly type: "array";
|
|
188
|
+
readonly items: {
|
|
189
|
+
readonly type: "string";
|
|
190
|
+
};
|
|
191
|
+
readonly title: "Section Titles";
|
|
192
|
+
readonly description: "Titles of ancestor section nodes";
|
|
193
|
+
};
|
|
194
|
+
readonly doc_title: {
|
|
195
|
+
readonly type: "string";
|
|
196
|
+
readonly title: "Document Title";
|
|
197
|
+
readonly description: "Title of the parent document";
|
|
198
|
+
};
|
|
199
|
+
};
|
|
200
|
+
readonly required: readonly ["chunkId", "doc_id", "text", "nodePath", "depth"];
|
|
201
|
+
readonly additionalProperties: true;
|
|
202
|
+
};
|
|
203
|
+
readonly title: "Chunk Records";
|
|
204
|
+
readonly description: "Array of chunk records";
|
|
205
|
+
};
|
|
206
|
+
//# sourceMappingURL=ChunkSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChunkSchema.d.ts","sourceRoot":"","sources":["../../src/chunk/ChunkSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAkB,UAAU,EAAc,MAAM,gBAAgB,CAAC;AAG7E;;;GAGG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkEQ,CAAC;AAEvC,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKJ,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { IVectorStorage } from "@workglow/storage";
|
|
7
|
+
import { type TypedArray } from "@workglow/util";
|
|
8
|
+
import type { ChunkRecord } from "./ChunkSchema";
|
|
9
|
+
/**
|
|
10
|
+
* Schema for chunk vector storage with typed metadata.
|
|
11
|
+
* Replaces DocumentChunkSchema with ChunkRecord as the metadata type.
|
|
12
|
+
*/
|
|
13
|
+
export declare const ChunkVectorStorageSchema: {
|
|
14
|
+
readonly type: "object";
|
|
15
|
+
readonly properties: {
|
|
16
|
+
readonly chunk_id: {
|
|
17
|
+
readonly type: "string";
|
|
18
|
+
readonly "x-auto-generated": true;
|
|
19
|
+
};
|
|
20
|
+
readonly doc_id: {
|
|
21
|
+
readonly type: "string";
|
|
22
|
+
};
|
|
23
|
+
readonly vector: {
|
|
24
|
+
readonly type: "array";
|
|
25
|
+
readonly format: "TypedArray";
|
|
26
|
+
readonly title: "Typed Array";
|
|
27
|
+
readonly description: "A typed array (Float32Array, Int8Array, etc.)";
|
|
28
|
+
};
|
|
29
|
+
readonly metadata: {
|
|
30
|
+
readonly type: "object";
|
|
31
|
+
readonly format: "metadata";
|
|
32
|
+
readonly additionalProperties: true;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
readonly required: readonly ["chunk_id", "doc_id", "vector", "metadata"];
|
|
36
|
+
readonly additionalProperties: false;
|
|
37
|
+
};
|
|
38
|
+
export type ChunkVectorStorageSchema = typeof ChunkVectorStorageSchema;
|
|
39
|
+
export declare const ChunkVectorPrimaryKey: readonly ["chunk_id"];
|
|
40
|
+
export type ChunkVectorPrimaryKey = typeof ChunkVectorPrimaryKey;
|
|
41
|
+
export interface ChunkVectorEntity<Metadata extends ChunkRecord = ChunkRecord, Vector extends TypedArray = TypedArray> {
|
|
42
|
+
chunk_id: string;
|
|
43
|
+
doc_id: string;
|
|
44
|
+
vector: Vector;
|
|
45
|
+
metadata: Metadata;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Type for inserting chunk vectors - chunk_id is optional (auto-generated)
|
|
49
|
+
*/
|
|
50
|
+
export type InsertChunkVectorEntity<Metadata extends ChunkRecord = ChunkRecord, Vector extends TypedArray = TypedArray> = Omit<ChunkVectorEntity<Metadata, Vector>, "chunk_id"> & Partial<Pick<ChunkVectorEntity<Metadata, Vector>, "chunk_id">>;
|
|
51
|
+
/**
|
|
52
|
+
* Type for the primary key of chunk vectors
|
|
53
|
+
*/
|
|
54
|
+
export type ChunkVectorKey = {
|
|
55
|
+
chunk_id: string;
|
|
56
|
+
};
|
|
57
|
+
export type ChunkVectorStorage = IVectorStorage<ChunkRecord, typeof ChunkVectorStorageSchema, ChunkVectorEntity, ChunkVectorPrimaryKey>;
|
|
58
|
+
/**
|
|
59
|
+
* Search result with score
|
|
60
|
+
*/
|
|
61
|
+
export type ChunkSearchResult = ChunkVectorEntity & {
|
|
62
|
+
score: number;
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=ChunkVectorStorageSchema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChunkVectorStorageSchema.d.ts","sourceRoot":"","sources":["../../src/chunk/ChunkVectorStorageSchema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAA+C,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;CAUI,CAAC;AAC1C,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAC;AAEvE,eAAO,MAAM,qBAAqB,uBAAwB,CAAC;AAC3D,MAAM,MAAM,qBAAqB,GAAG,OAAO,qBAAqB,CAAC;AAEjE,MAAM,WAAW,iBAAiB,CAChC,QAAQ,SAAS,WAAW,GAAG,WAAW,EAC1C,MAAM,SAAS,UAAU,GAAG,UAAU;IAEtC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,uBAAuB,CACjC,QAAQ,SAAS,WAAW,GAAG,WAAW,EAC1C,MAAM,SAAS,UAAU,GAAG,UAAU,IACpC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,UAAU,CAAC,GACvD,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,MAAM,CAAC,EAAE,UAAU,CAAC,CAAC,CAAC;AAEjE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAElD,MAAM,MAAM,kBAAkB,GAAG,cAAc,CAC7C,WAAW,EACX,OAAO,wBAAwB,EAC/B,iBAAiB,EACjB,qBAAqB,CACtB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC"}
|
package/dist/common.d.ts
CHANGED
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
export * from "./chunk/ChunkSchema";
|
|
7
|
+
export * from "./chunk/ChunkVectorStorageSchema";
|
|
8
|
+
export * from "./knowledge-base/KnowledgeBase";
|
|
9
|
+
export * from "./knowledge-base/KnowledgeBaseRegistry";
|
|
10
|
+
export * from "./knowledge-base/createKnowledgeBase";
|
|
6
11
|
export * from "./util/DatasetSchema";
|
|
7
12
|
export * from "./document/Document";
|
|
8
|
-
export * from "./document/DocumentDataset";
|
|
9
|
-
export * from "./document/DocumentDatasetRegistry";
|
|
10
13
|
export * from "./document/DocumentNode";
|
|
11
14
|
export * from "./document/DocumentSchema";
|
|
12
15
|
export * from "./document/DocumentStorageSchema";
|
|
13
16
|
export * from "./document/StructuralParser";
|
|
14
|
-
export * from "./document-chunk/DocumentChunkDataset";
|
|
15
|
-
export * from "./document-chunk/DocumentChunkDatasetRegistry";
|
|
16
|
-
export * from "./document-chunk/DocumentChunkSchema";
|
|
17
17
|
//# sourceMappingURL=common.d.ts.map
|
package/dist/common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,cAAc,qBAAqB,CAAC;AACpC,cAAc,kCAAkC,CAAC;AACjD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wCAAwC,CAAC;AACvD,cAAc,sCAAsC,CAAC;AAGrD,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,kCAAkC,CAAC;AACjD,cAAc,6BAA6B,CAAC"}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import type {
|
|
6
|
+
import type { ChunkRecord } from "../chunk/ChunkSchema";
|
|
7
|
+
import type { DocumentMetadata, DocumentNode } from "./DocumentSchema";
|
|
7
8
|
/**
|
|
8
9
|
* Document represents a hierarchical document with chunks
|
|
9
10
|
*
|
|
@@ -17,15 +18,15 @@ export declare class Document {
|
|
|
17
18
|
readonly metadata: DocumentMetadata;
|
|
18
19
|
readonly root: DocumentNode;
|
|
19
20
|
private chunks;
|
|
20
|
-
constructor(root: DocumentNode, metadata: DocumentMetadata, chunks?:
|
|
21
|
+
constructor(root: DocumentNode, metadata: DocumentMetadata, chunks?: ChunkRecord[], doc_id?: string);
|
|
21
22
|
/**
|
|
22
23
|
* Set chunks for the document
|
|
23
24
|
*/
|
|
24
|
-
setChunks(chunks:
|
|
25
|
+
setChunks(chunks: ChunkRecord[]): void;
|
|
25
26
|
/**
|
|
26
27
|
* Get all chunks
|
|
27
28
|
*/
|
|
28
|
-
getChunks():
|
|
29
|
+
getChunks(): ChunkRecord[];
|
|
29
30
|
/**
|
|
30
31
|
* Set the document ID
|
|
31
32
|
*/
|
|
@@ -33,14 +34,14 @@ export declare class Document {
|
|
|
33
34
|
/**
|
|
34
35
|
* Find chunks by nodeId
|
|
35
36
|
*/
|
|
36
|
-
findChunksByNodeId(nodeId: string):
|
|
37
|
+
findChunksByNodeId(nodeId: string): ChunkRecord[];
|
|
37
38
|
/**
|
|
38
39
|
* Serialize to JSON
|
|
39
40
|
*/
|
|
40
41
|
toJSON(): {
|
|
41
42
|
metadata: DocumentMetadata;
|
|
42
43
|
root: DocumentNode;
|
|
43
|
-
chunks:
|
|
44
|
+
chunks: ChunkRecord[];
|
|
44
45
|
};
|
|
45
46
|
/**
|
|
46
47
|
* Deserialize from JSON
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Document.d.ts","sourceRoot":"","sources":["../../src/document/Document.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"Document.d.ts","sourceRoot":"","sources":["../../src/document/Document.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEvE;;;;;;;GAOG;AACH,qBAAa,QAAQ;IACZ,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,SAAgB,QAAQ,EAAE,gBAAgB,CAAC;IAC3C,SAAgB,IAAI,EAAE,YAAY,CAAC;IACnC,OAAO,CAAC,MAAM,CAAgB;gBAG5B,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,gBAAgB,EAC1B,MAAM,GAAE,WAAW,EAAO,EAC1B,MAAM,CAAC,EAAE,MAAM;IAQjB;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI;IAItC;;OAEG;IACH,SAAS,IAAI,WAAW,EAAE;IAI1B;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAI9B;;OAEG;IACH,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,EAAE;IAIjD;;OAEG;IACH,MAAM,IAAI;QACR,QAAQ,EAAE,gBAAgB,CAAC;QAC3B,IAAI,EAAE,YAAY,CAAC;QACnB,MAAM,EAAE,WAAW,EAAE,CAAC;KACvB;IAQD;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ;CAIzD"}
|