@interactive-inc/docs-client 0.0.9 → 0.0.11
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/build/index.d.ts +915 -1041
- package/build/index.js +2843 -2189
- package/build/models.d.ts +222 -100
- package/build/models.js +195 -76
- package/debug/debug.ts +40 -0
- package/package.json +2 -2
package/build/index.d.ts
CHANGED
|
@@ -1,532 +1,300 @@
|
|
|
1
|
-
import { z } from 'zod
|
|
2
|
-
import {
|
|
3
|
-
export { zDocTreeDirectoryNode, zDocTreeFileNode, zDocTreeNode } from './models.js';
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { zDocClientConfig, zDocCustomSchemaField, zDocFilePath, zDocMetaFieldRelation, zDocMetaFieldMultiRelation, zDocMetaFieldText, zDocMetaFieldNumber, zDocMetaFieldBoolean, zDocMetaFieldMultiText, zDocMetaFieldMultiNumber, zDocMetaFieldMultiBoolean, zDocFileUnknown, zDocFileIndexSchemaField, zDocSchemaFieldText, zDocSchemaFieldNumber, zDocSchemaFieldBoolean, zDocSchemaFieldRelation, zDocSchemaFieldSelectText, zDocSchemaFieldSelectNumber, zDocSchemaFieldMultiText, zDocSchemaFieldMultiNumber, zDocSchemaFieldMultiRelation, zDocSchemaFieldMultiSelectText, zDocSchemaFieldMultiSelectNumber, zDocRelation, zDocRelationFile, zDocMetaField, zDocMetaFieldSelectText, zDocMetaFieldSelectNumber, zDocMetaFieldMultiSelectText, zDocMetaFieldMultiSelectNumber, zDocMetaFieldTypeText, zDocMetaFieldTypeNumber, zDocMetaFieldTypeBoolean, zDocMetaFieldTypeSelectText, zDocMetaFieldTypeSelectNumber, zDocMetaFieldTypeRelation, zDocMetaFieldType, zDocCustomSchemaFieldText, zDocCustomSchemaFieldNumber, zDocCustomSchemaFieldBoolean, zDocCustomSchemaFieldRelation, zDocCustomSchemaFieldSelectText, zDocCustomSchemaFieldSelectNumber, zDocCustomSchemaFieldMultiText, zDocCustomSchemaFieldMultiNumber, zDocCustomSchemaFieldMultiRelation, zDocCustomSchemaFieldMultiSelectText, zDocCustomSchemaFieldMultiSelectNumber, zDocRelationField } from './models.js';
|
|
3
|
+
export { zDocCustomSchema, zDocFile, zDocFileIndex, zDocFileIndexContent, zDocFileIndexMeta, zDocFileIndexSchema, zDocFileMd, zDocFileMdContent, zDocFileMdMeta, zDocMetaFieldTypeMultiNumber, zDocMetaFieldTypeMultiRelation, zDocMetaFieldTypeMultiSelectNumber, zDocMetaFieldTypeMultiSelectText, zDocMetaFieldTypeMultiText, zDocTreeDirectoryNode, zDocTreeFileNode, zDocTreeNode } from './models.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Path operations system
|
|
7
7
|
*/
|
|
8
8
|
declare class DocPathSystem {
|
|
9
|
-
|
|
9
|
+
readonly separator = "/";
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Join paths
|
|
12
12
|
*/
|
|
13
13
|
join(...paths: string[]): string;
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Get filename with extension
|
|
16
16
|
*/
|
|
17
17
|
basename(path: string, ext?: string): string;
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Get directory name
|
|
20
20
|
*/
|
|
21
21
|
dirname(path: string): string;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Get extension
|
|
24
24
|
*/
|
|
25
25
|
extname(path: string): string;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Calculate relative path
|
|
28
28
|
*/
|
|
29
29
|
relative(from: string, to: string): string;
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Convert to absolute path
|
|
32
32
|
*/
|
|
33
33
|
resolve(...paths: string[]): string;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Normalize path
|
|
36
36
|
*/
|
|
37
37
|
normalize(path: string): string;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* Check if path is absolute
|
|
40
40
|
*/
|
|
41
41
|
isAbsolute(path: string): boolean;
|
|
42
|
-
/**
|
|
43
|
-
* パスのセパレータ
|
|
44
|
-
*/
|
|
45
|
-
get sep(): string;
|
|
46
42
|
}
|
|
47
43
|
|
|
48
44
|
type Props$9 = {
|
|
49
45
|
basePath: string;
|
|
50
|
-
pathSystem
|
|
46
|
+
pathSystem?: DocPathSystem;
|
|
51
47
|
};
|
|
52
48
|
/**
|
|
53
|
-
*
|
|
49
|
+
* File system wrapper
|
|
54
50
|
*/
|
|
55
51
|
declare class DocFileSystem {
|
|
56
52
|
private readonly basePath;
|
|
57
53
|
private readonly pathSystem;
|
|
58
54
|
constructor(props: Props$9);
|
|
59
55
|
/**
|
|
60
|
-
*
|
|
56
|
+
* Read file content at the specified path
|
|
61
57
|
*/
|
|
62
58
|
readFile(relativePath: string): Promise<string | null>;
|
|
63
59
|
/**
|
|
64
|
-
*
|
|
60
|
+
* Write content to file at the specified path (creates directory if needed)
|
|
65
61
|
*/
|
|
66
62
|
writeFile(relativePath: string, content: string): Promise<void>;
|
|
67
63
|
/**
|
|
68
|
-
*
|
|
64
|
+
* Delete file at the specified path
|
|
69
65
|
*/
|
|
70
66
|
deleteFile(relativePath: string): Promise<Error | null>;
|
|
71
67
|
/**
|
|
72
|
-
*
|
|
68
|
+
* Get file name from path
|
|
73
69
|
*/
|
|
74
70
|
readFileName(relativePath: string): string;
|
|
75
71
|
/**
|
|
76
|
-
*
|
|
72
|
+
* Get file extension from path
|
|
77
73
|
*/
|
|
78
74
|
readFileExtension(relativePath: string): string;
|
|
79
75
|
/**
|
|
80
|
-
*
|
|
76
|
+
* Get directory path where the file exists
|
|
81
77
|
*/
|
|
82
78
|
readFileDirectory(relativePath: string): string;
|
|
83
79
|
/**
|
|
84
|
-
*
|
|
80
|
+
* Get list of entries in directory
|
|
85
81
|
*/
|
|
86
82
|
readDirectoryFileNames(relativePath?: string): Promise<string[]>;
|
|
87
83
|
readDirectoryFilePaths(relativePath: string): Promise<string[]>;
|
|
88
84
|
/**
|
|
89
|
-
*
|
|
85
|
+
* Check if path is a directory
|
|
90
86
|
*/
|
|
91
87
|
isDirectory(relativePath: string): Promise<boolean>;
|
|
92
88
|
/**
|
|
93
|
-
*
|
|
89
|
+
* Check if path is a file
|
|
94
90
|
*/
|
|
95
91
|
isFile(relativePath: string): Promise<boolean>;
|
|
96
92
|
/**
|
|
97
|
-
*
|
|
93
|
+
* Check if file or directory exists
|
|
98
94
|
*/
|
|
99
95
|
exists(relativePath: string): Promise<boolean>;
|
|
100
96
|
/**
|
|
101
|
-
*
|
|
97
|
+
* Check if directory exists
|
|
102
98
|
*/
|
|
103
99
|
directoryExists(relativePath: string): Promise<boolean>;
|
|
104
100
|
/**
|
|
105
|
-
*
|
|
101
|
+
* Check if file exists
|
|
106
102
|
*/
|
|
107
103
|
fileExists(relativePath: string): Promise<boolean>;
|
|
108
104
|
/**
|
|
109
|
-
*
|
|
105
|
+
* Get base path
|
|
110
106
|
*/
|
|
111
107
|
getBasePath(): string;
|
|
112
108
|
/**
|
|
113
|
-
*
|
|
109
|
+
* Convert relative path to absolute path
|
|
114
110
|
*/
|
|
115
111
|
resolve(relativePath: string): string;
|
|
116
112
|
/**
|
|
117
|
-
*
|
|
113
|
+
* Create directory
|
|
118
114
|
*/
|
|
119
115
|
createDirectory(relativePath: string): Promise<void>;
|
|
120
116
|
/**
|
|
121
|
-
*
|
|
117
|
+
* Get file size in bytes
|
|
122
118
|
*/
|
|
123
119
|
getFileSize(relativePath: string): Promise<number>;
|
|
124
120
|
/**
|
|
125
|
-
*
|
|
121
|
+
* Create directory if it doesn't exist
|
|
126
122
|
*/
|
|
127
123
|
ensureDirectoryExists(relativePath: string): Promise<void>;
|
|
128
124
|
/**
|
|
129
|
-
*
|
|
125
|
+
* Copy file
|
|
130
126
|
*/
|
|
131
127
|
copyFile(sourcePath: string, destinationPath: string): Promise<void>;
|
|
132
128
|
/**
|
|
133
|
-
*
|
|
129
|
+
* Move file
|
|
134
130
|
*/
|
|
135
131
|
moveFile(sourcePath: string, destinationPath: string): Promise<void>;
|
|
136
132
|
/**
|
|
137
|
-
*
|
|
133
|
+
* Get file last modified time
|
|
138
134
|
*/
|
|
139
135
|
getFileModifiedTime(relativePath: string): Promise<Date>;
|
|
140
136
|
/**
|
|
141
|
-
*
|
|
137
|
+
* Get file creation time
|
|
142
138
|
*/
|
|
143
139
|
getFileCreatedTime(relativePath: string): Promise<Date>;
|
|
144
140
|
}
|
|
145
141
|
|
|
146
142
|
/**
|
|
147
|
-
*
|
|
148
|
-
*/
|
|
149
|
-
type FieldType = "text" | "number" | "boolean" | "multi-text" | "multi-number" | "multi-boolean" | "relation" | "multi-relation" | "select-text" | "select-number" | "multi-select-text" | "multi-select-number";
|
|
150
|
-
/**
|
|
151
|
-
* 文字列フィールドの型
|
|
152
|
-
*/
|
|
153
|
-
type DocSchemaFieldText = z.infer<typeof zDocSchemaFieldText>;
|
|
154
|
-
/**
|
|
155
|
-
* 数値フィールドの型
|
|
156
|
-
*/
|
|
157
|
-
type DocSchemaFieldNumber = z.infer<typeof zDocSchemaFieldNumber>;
|
|
158
|
-
/**
|
|
159
|
-
* ブールフィールドの型
|
|
160
|
-
*/
|
|
161
|
-
type DocSchemaFieldBoolean = z.infer<typeof zDocSchemaFieldBoolean>;
|
|
162
|
-
/**
|
|
163
|
-
* マルチテキストフィールドの型
|
|
164
|
-
*/
|
|
165
|
-
type DocFieldMultiText = z.infer<typeof zDocSchemaFieldMultiText>;
|
|
166
|
-
/**
|
|
167
|
-
* マルチ数値フィールドの型
|
|
168
|
-
*/
|
|
169
|
-
type DocFieldMultiNumber = z.infer<typeof zDocSchemaFieldMultiNumber>;
|
|
170
|
-
/**
|
|
171
|
-
* マルチブールフィールドの型
|
|
172
|
-
*/
|
|
173
|
-
type DocFieldMultiBoolean = z.infer<typeof zDocSchemaFieldMultiBoolean>;
|
|
174
|
-
/**
|
|
175
|
-
* リレーションフィールドの型
|
|
176
|
-
*/
|
|
177
|
-
type DocSchemaFieldRelation = z.infer<typeof zDocSchemaFieldRelation>;
|
|
178
|
-
/**
|
|
179
|
-
* マルチリレーションフィールドの型
|
|
180
|
-
*/
|
|
181
|
-
type DocFieldMultiRelation = z.infer<typeof zDocSchemaFieldMultiRelation>;
|
|
182
|
-
/**
|
|
183
|
-
* 選択テキストフィールドの型
|
|
184
|
-
*/
|
|
185
|
-
type DocSchemaFieldSelectText = z.infer<typeof zDocSchemaFieldSelectText>;
|
|
186
|
-
/**
|
|
187
|
-
* 選択数値フィールドの型
|
|
188
|
-
*/
|
|
189
|
-
type DocSchemaFieldSelectNumber = z.infer<typeof zDocSchemaFieldSelectNumber>;
|
|
190
|
-
/**
|
|
191
|
-
* マルチ選択テキストフィールドの型
|
|
192
|
-
*/
|
|
193
|
-
type DocSchemaFieldMultiSelectText = z.infer<typeof zDocSchemaFieldMultiSelectText>;
|
|
194
|
-
/**
|
|
195
|
-
* マルチ選択数値フィールドの型
|
|
196
|
-
*/
|
|
197
|
-
type DocSchemaFieldMultiSelectNumber = z.infer<typeof zDocSchemaFieldMultiSelectNumber>;
|
|
198
|
-
type DocFileMdFrontMatter = z.infer<typeof zDocFileMdFrontMatter>;
|
|
199
|
-
/**
|
|
200
|
-
* スキーマフィールドタイプの型
|
|
201
|
-
*/
|
|
202
|
-
type DocSchemaFieldType = z.infer<typeof zDocSchemaFieldType>;
|
|
203
|
-
/**
|
|
204
|
-
* スキーマフィールドの型
|
|
205
|
-
*/
|
|
206
|
-
type DocSchemaField = z.infer<typeof zDocSchemaField>;
|
|
207
|
-
/**
|
|
208
|
-
* スキーマ定義の型
|
|
209
|
-
*/
|
|
210
|
-
type DocSchemaRecord = z.infer<typeof zDocSchema>;
|
|
211
|
-
/**
|
|
212
|
-
* リレーション型フィールドのUnion型
|
|
213
|
-
*/
|
|
214
|
-
type RelationFieldTypes = DocSchemaFieldRelation | DocFieldMultiRelation;
|
|
215
|
-
/**
|
|
216
|
-
* ファイルノードの型(ファイル専用)
|
|
217
|
-
*/
|
|
218
|
-
type DocTreeFileNode = {
|
|
219
|
-
type: "file";
|
|
220
|
-
name: string;
|
|
221
|
-
path: string;
|
|
222
|
-
icon: string;
|
|
223
|
-
title: string;
|
|
224
|
-
};
|
|
225
|
-
/**
|
|
226
|
-
* ディレクトリノードの型(ディレクトリ専用)
|
|
227
|
-
*/
|
|
228
|
-
type DocTreeDirectoryNode = {
|
|
229
|
-
type: "directory";
|
|
230
|
-
name: string;
|
|
231
|
-
path: string;
|
|
232
|
-
icon: string;
|
|
233
|
-
title: string;
|
|
234
|
-
children: DocTreeNode[];
|
|
235
|
-
};
|
|
236
|
-
/**
|
|
237
|
-
* ツリーノードの統合型
|
|
238
|
-
*/
|
|
239
|
-
type DocTreeNode = DocTreeFileNode | DocTreeDirectoryNode;
|
|
240
|
-
/**
|
|
241
|
-
* 後方互換性のためのエイリアス
|
|
242
|
-
*/
|
|
243
|
-
type DocFileNode = DocTreeNode;
|
|
244
|
-
/**
|
|
245
|
-
* インデックスファイルの型
|
|
246
|
-
*/
|
|
247
|
-
type DocFileIndex = z.infer<typeof zDocFileIndex>;
|
|
248
|
-
/**
|
|
249
|
-
* マークダウンファイル(index.md以外)の型
|
|
250
|
-
*/
|
|
251
|
-
type DocFileMd = z.infer<typeof zDocFileMd>;
|
|
252
|
-
/**
|
|
253
|
-
* その他のファイル(非マークダウン)の型
|
|
254
|
-
*/
|
|
255
|
-
type DocFileUnknown = z.infer<typeof zDocFileUnknown>;
|
|
256
|
-
/**
|
|
257
|
-
* ファイルのunion型(index.md、通常のmd、その他)
|
|
258
|
-
*/
|
|
259
|
-
type DocFile = z.infer<typeof zDocFile>;
|
|
260
|
-
/**
|
|
261
|
-
* ディレクトリFrontMatterの型
|
|
262
|
-
*/
|
|
263
|
-
type DocFileIndexFrontMatter = z.infer<typeof zDocFileIndexFrontMatter>;
|
|
264
|
-
/**
|
|
265
|
-
* リレーションオプションの型
|
|
266
|
-
*/
|
|
267
|
-
type DocRelationFile = z.infer<typeof zDocRelationFile>;
|
|
268
|
-
/**
|
|
269
|
-
* リレーション情報の型
|
|
270
|
-
*/
|
|
271
|
-
type DocRelation = z.infer<typeof zDocRelation>;
|
|
272
|
-
/**
|
|
273
|
-
* リレーションフィールドの型
|
|
274
|
-
*/
|
|
275
|
-
type DocRelationField = z.infer<typeof zDocRelationField>;
|
|
276
|
-
/**
|
|
277
|
-
* ファイルパス情報の型
|
|
278
|
-
*/
|
|
279
|
-
type DocFilePath = z.infer<typeof zDocFilePath>;
|
|
280
|
-
/**
|
|
281
|
-
* Markdownコンテンツ情報の型
|
|
282
|
-
*/
|
|
283
|
-
type DocFileContentMd = z.infer<typeof zDocFileContentMd>;
|
|
284
|
-
/**
|
|
285
|
-
* Indexファイルコンテンツ情報の型
|
|
143
|
+
* Single boolean type schema field
|
|
286
144
|
*/
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
type
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
*/
|
|
301
|
-
declare class DocRelationFileValue {
|
|
302
|
-
private readonly value;
|
|
303
|
-
constructor(value: DocRelationFile);
|
|
304
|
-
/**
|
|
305
|
-
* ファイルパス
|
|
306
|
-
*/
|
|
307
|
-
get id(): string;
|
|
308
|
-
/**
|
|
309
|
-
* スラッグ
|
|
310
|
-
*/
|
|
311
|
-
get slug(): string;
|
|
312
|
-
/**
|
|
313
|
-
* 表示用ラベル
|
|
314
|
-
*/
|
|
315
|
-
get label(): string;
|
|
316
|
-
/**
|
|
317
|
-
* ファイルパスとタイトルから生成
|
|
318
|
-
*/
|
|
319
|
-
static from(filePath: string, title: string | null): DocRelationFileValue;
|
|
320
|
-
/**
|
|
321
|
-
* ファイルパスからファイル名を抽出(拡張子なし)
|
|
322
|
-
*/
|
|
323
|
-
private static extractFileName;
|
|
324
|
-
/**
|
|
325
|
-
* JSON形式に変換
|
|
326
|
-
*/
|
|
327
|
-
toJson(): DocRelationFile;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
/**
|
|
331
|
-
* リレーション情報を管理する
|
|
332
|
-
*/
|
|
333
|
-
declare class DocRelationValue {
|
|
334
|
-
readonly value: DocRelation;
|
|
335
|
-
constructor(value: DocRelation);
|
|
336
|
-
/**
|
|
337
|
-
* リレーションパス
|
|
338
|
-
*/
|
|
339
|
-
get path(): string;
|
|
340
|
-
/**
|
|
341
|
-
* リレーション対象ファイル一覧(値オブジェクト)
|
|
342
|
-
*/
|
|
343
|
-
get files(): DocRelationFileValue[];
|
|
344
|
-
/**
|
|
345
|
-
* ファイル数を取得
|
|
346
|
-
*/
|
|
347
|
-
get fileCount(): number;
|
|
348
|
-
/**
|
|
349
|
-
* 空かどうか
|
|
350
|
-
*/
|
|
351
|
-
get isEmpty(): boolean;
|
|
352
|
-
/**
|
|
353
|
-
* 空のリレーションエンティティを作成
|
|
354
|
-
*/
|
|
355
|
-
static empty(path: string): DocRelationValue;
|
|
356
|
-
/**
|
|
357
|
-
* JSON形式で出力
|
|
358
|
-
*/
|
|
359
|
-
toJson(): DocRelation;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
type Props$8 = {
|
|
363
|
-
filePath: string;
|
|
364
|
-
fileSystem: DocFileSystem;
|
|
365
|
-
pathSystem: DocPathSystem;
|
|
366
|
-
};
|
|
367
|
-
/**
|
|
368
|
-
* リレーションファイルの参照
|
|
369
|
-
*/
|
|
370
|
-
declare class DocFileRelationReference {
|
|
371
|
-
private readonly props;
|
|
372
|
-
private readonly pathSystem;
|
|
373
|
-
constructor(props: Props$8);
|
|
374
|
-
get fileSystem(): DocFileSystem;
|
|
375
|
-
get basePath(): string;
|
|
376
|
-
/**
|
|
377
|
-
* リレーションパス
|
|
378
|
-
*/
|
|
379
|
-
get path(): string;
|
|
380
|
-
/**
|
|
381
|
-
* フルパス
|
|
382
|
-
*/
|
|
383
|
-
get fullPath(): string;
|
|
384
|
-
read(): Promise<DocRelationValue | null>;
|
|
385
|
-
/**
|
|
386
|
-
* リレーションファイルの一覧を読み込む
|
|
387
|
-
*/
|
|
388
|
-
readFiles(): Promise<DocRelationFileValue[]>;
|
|
389
|
-
/**
|
|
390
|
-
* 単一のリレーションファイルを読み込む
|
|
391
|
-
*/
|
|
392
|
-
readFile(filePath: string): Promise<DocRelationFileValue | null>;
|
|
393
|
-
/**
|
|
394
|
-
* ファイルの存在確認
|
|
395
|
-
*/
|
|
396
|
-
exists(slug: string): Promise<boolean>;
|
|
397
|
-
/**
|
|
398
|
-
* ファイル名の一覧を取得(拡張子なし)
|
|
399
|
-
*/
|
|
400
|
-
readSlugs(): Promise<string[]>;
|
|
401
|
-
/**
|
|
402
|
-
* ファイル数を取得
|
|
403
|
-
*/
|
|
404
|
-
count(): Promise<number>;
|
|
145
|
+
declare class DocSchemaFieldBooleanSingleValue<T extends RecordKey> {
|
|
146
|
+
readonly key: T;
|
|
147
|
+
readonly value: DocSchemaFieldBoolean;
|
|
148
|
+
constructor(key: T, value: DocSchemaFieldBoolean);
|
|
149
|
+
get type(): "boolean";
|
|
150
|
+
get required(): boolean;
|
|
151
|
+
get title(): string;
|
|
152
|
+
get description(): string;
|
|
153
|
+
get default(): boolean | null;
|
|
154
|
+
readonly isArray = false;
|
|
155
|
+
readonly isSingle = true;
|
|
156
|
+
readonly isBoolean = true;
|
|
157
|
+
toJson(): DocFileIndexSchemaField;
|
|
405
158
|
/**
|
|
406
|
-
*
|
|
159
|
+
* Validate value type
|
|
407
160
|
*/
|
|
408
|
-
|
|
161
|
+
validate(value: unknown): boolean;
|
|
162
|
+
static empty(key: RecordKey): DocSchemaFieldBooleanSingleValue<RecordKey>;
|
|
163
|
+
static normalize(key: RecordKey, record: Record<RecordKey, unknown>): DocSchemaFieldBooleanSingleValue<RecordKey>;
|
|
409
164
|
}
|
|
410
165
|
|
|
411
166
|
/**
|
|
412
|
-
*
|
|
167
|
+
* Multiple number type schema field
|
|
413
168
|
*/
|
|
414
|
-
declare class
|
|
415
|
-
readonly key:
|
|
416
|
-
readonly value:
|
|
417
|
-
constructor(key:
|
|
418
|
-
get type(): "multi-
|
|
169
|
+
declare class DocSchemaFieldMultiNumberValue<T extends RecordKey> {
|
|
170
|
+
readonly key: T;
|
|
171
|
+
readonly value: DocFieldMultiNumber;
|
|
172
|
+
constructor(key: T, value: DocFieldMultiNumber);
|
|
173
|
+
get type(): "multi-number";
|
|
419
174
|
get required(): boolean;
|
|
420
175
|
get title(): string;
|
|
421
176
|
get description(): string;
|
|
422
|
-
get default():
|
|
423
|
-
get path(): string;
|
|
177
|
+
get default(): number[] | null;
|
|
424
178
|
readonly isArray = true;
|
|
425
179
|
readonly isSingle = false;
|
|
426
|
-
readonly
|
|
180
|
+
readonly isNumber = true;
|
|
427
181
|
/**
|
|
428
|
-
*
|
|
182
|
+
* Validate value
|
|
429
183
|
*/
|
|
430
184
|
validate(value: unknown): boolean;
|
|
431
|
-
toJson():
|
|
185
|
+
toJson(): DocFileIndexSchemaField;
|
|
186
|
+
static empty<T extends RecordKey>(key: T): DocSchemaFieldMultiNumberValue<T>;
|
|
187
|
+
static normalize(key: RecordKey, record: Record<RecordKey, unknown>): DocSchemaFieldMultiNumberValue<RecordKey>;
|
|
432
188
|
}
|
|
433
189
|
|
|
434
190
|
/**
|
|
435
|
-
*
|
|
191
|
+
* Multiple relation type schema field
|
|
436
192
|
*/
|
|
437
|
-
declare class
|
|
438
|
-
readonly key:
|
|
439
|
-
readonly value:
|
|
440
|
-
constructor(key:
|
|
441
|
-
get type(): "relation";
|
|
193
|
+
declare class DocSchemaFieldMultiRelationValue<T extends RecordKey> {
|
|
194
|
+
readonly key: T;
|
|
195
|
+
readonly value: DocFieldMultiRelation;
|
|
196
|
+
constructor(key: T, value: DocFieldMultiRelation);
|
|
197
|
+
get type(): "multi-relation";
|
|
442
198
|
get required(): boolean;
|
|
443
199
|
get title(): string;
|
|
444
200
|
get description(): string;
|
|
445
|
-
get default(): string | null;
|
|
201
|
+
get default(): string[] | null;
|
|
446
202
|
get path(): string;
|
|
447
|
-
readonly isArray =
|
|
448
|
-
readonly isSingle =
|
|
203
|
+
readonly isArray = true;
|
|
204
|
+
readonly isSingle = false;
|
|
449
205
|
readonly isRelation = true;
|
|
450
|
-
toJson(): DocSchemaField;
|
|
451
206
|
/**
|
|
452
|
-
*
|
|
207
|
+
* Validate value
|
|
453
208
|
*/
|
|
454
209
|
validate(value: unknown): boolean;
|
|
210
|
+
toJson(): DocFileIndexSchemaField;
|
|
211
|
+
static empty<T extends RecordKey>(key: T): DocSchemaFieldMultiRelationValue<T>;
|
|
212
|
+
static normalize(key: RecordKey, record: Record<RecordKey, unknown>): DocSchemaFieldMultiRelationValue<RecordKey>;
|
|
455
213
|
}
|
|
456
214
|
|
|
457
215
|
/**
|
|
458
|
-
*
|
|
216
|
+
* Multiple select number type schema field
|
|
459
217
|
*/
|
|
460
|
-
declare class
|
|
461
|
-
readonly key:
|
|
462
|
-
readonly value:
|
|
463
|
-
constructor(key:
|
|
464
|
-
get type(): "multi-
|
|
218
|
+
declare class DocSchemaFieldMultiSelectNumberValue<T extends RecordKey> {
|
|
219
|
+
readonly key: T;
|
|
220
|
+
readonly value: DocSchemaFieldMultiSelectNumber;
|
|
221
|
+
constructor(key: T, value: DocSchemaFieldMultiSelectNumber);
|
|
222
|
+
get type(): "multi-select-number";
|
|
465
223
|
get required(): boolean;
|
|
466
224
|
get title(): string;
|
|
467
225
|
get description(): string;
|
|
468
|
-
get default():
|
|
226
|
+
get default(): number[] | null;
|
|
227
|
+
get options(): number[];
|
|
469
228
|
readonly isArray = true;
|
|
470
229
|
readonly isSingle = false;
|
|
471
|
-
readonly
|
|
230
|
+
readonly isSelect = true;
|
|
231
|
+
readonly isNumberSelect = true;
|
|
472
232
|
/**
|
|
473
|
-
*
|
|
233
|
+
* Validate value
|
|
474
234
|
*/
|
|
475
235
|
validate(value: unknown): boolean;
|
|
476
|
-
toJson():
|
|
236
|
+
toJson(): DocFileIndexSchemaField;
|
|
237
|
+
static empty<T extends RecordKey>(key: T): DocSchemaFieldMultiSelectNumberValue<T>;
|
|
238
|
+
static normalize(key: RecordKey, record: Record<RecordKey, unknown>): DocSchemaFieldMultiSelectNumberValue<RecordKey>;
|
|
477
239
|
}
|
|
478
240
|
|
|
479
241
|
/**
|
|
480
|
-
*
|
|
242
|
+
* Multiple select text type schema field
|
|
481
243
|
*/
|
|
482
|
-
declare class
|
|
483
|
-
readonly key:
|
|
484
|
-
readonly value:
|
|
485
|
-
constructor(key:
|
|
486
|
-
get type(): "
|
|
244
|
+
declare class DocSchemaFieldMultiSelectTextValue<T extends RecordKey> {
|
|
245
|
+
readonly key: T;
|
|
246
|
+
readonly value: DocSchemaFieldMultiSelectText;
|
|
247
|
+
constructor(key: T, value: DocSchemaFieldMultiSelectText);
|
|
248
|
+
get type(): "multi-select-text";
|
|
487
249
|
get required(): boolean;
|
|
488
250
|
get title(): string;
|
|
489
251
|
get description(): string;
|
|
490
|
-
get default():
|
|
491
|
-
|
|
492
|
-
readonly
|
|
493
|
-
readonly
|
|
494
|
-
|
|
252
|
+
get default(): string[] | null;
|
|
253
|
+
get options(): string[];
|
|
254
|
+
readonly isArray = true;
|
|
255
|
+
readonly isSingle = false;
|
|
256
|
+
readonly isSelect = true;
|
|
257
|
+
readonly isTextSelect = true;
|
|
495
258
|
/**
|
|
496
|
-
*
|
|
259
|
+
* Validate value
|
|
497
260
|
*/
|
|
498
261
|
validate(value: unknown): boolean;
|
|
262
|
+
toJson(): DocFileIndexSchemaField;
|
|
263
|
+
static empty<T extends RecordKey>(key: T): DocSchemaFieldMultiSelectTextValue<T>;
|
|
264
|
+
static normalize(key: RecordKey, record: Record<RecordKey, unknown>): DocSchemaFieldMultiSelectTextValue<RecordKey>;
|
|
499
265
|
}
|
|
500
266
|
|
|
501
267
|
/**
|
|
502
|
-
*
|
|
268
|
+
* Multiple text type schema field
|
|
503
269
|
*/
|
|
504
|
-
declare class
|
|
505
|
-
readonly key:
|
|
506
|
-
readonly value:
|
|
507
|
-
constructor(key:
|
|
508
|
-
get type(): "multi-
|
|
270
|
+
declare class DocSchemaFieldMultiTextValue<T extends RecordKey> {
|
|
271
|
+
readonly key: T;
|
|
272
|
+
readonly value: DocFieldMultiText;
|
|
273
|
+
constructor(key: T, value: DocFieldMultiText);
|
|
274
|
+
get type(): "multi-text";
|
|
509
275
|
get required(): boolean;
|
|
510
276
|
get title(): string;
|
|
511
277
|
get description(): string;
|
|
512
|
-
get default():
|
|
278
|
+
get default(): string[] | null;
|
|
513
279
|
readonly isArray = true;
|
|
514
280
|
readonly isSingle = false;
|
|
515
|
-
readonly
|
|
281
|
+
readonly isText = true;
|
|
282
|
+
toJson(): DocFileIndexSchemaField;
|
|
516
283
|
/**
|
|
517
|
-
*
|
|
284
|
+
* Validate value type
|
|
518
285
|
*/
|
|
519
286
|
validate(value: unknown): boolean;
|
|
520
|
-
|
|
287
|
+
static empty<T extends RecordKey>(key: T): DocSchemaFieldMultiTextValue<T>;
|
|
288
|
+
static normalize(key: RecordKey, record: Record<RecordKey, unknown>): DocSchemaFieldMultiTextValue<RecordKey>;
|
|
521
289
|
}
|
|
522
290
|
|
|
523
291
|
/**
|
|
524
|
-
*
|
|
292
|
+
* Single number type schema field
|
|
525
293
|
*/
|
|
526
|
-
declare class DocSchemaFieldNumberSingleValue {
|
|
527
|
-
readonly key:
|
|
294
|
+
declare class DocSchemaFieldNumberSingleValue<T extends RecordKey> {
|
|
295
|
+
readonly key: T;
|
|
528
296
|
readonly value: DocSchemaFieldNumber;
|
|
529
|
-
constructor(key:
|
|
297
|
+
constructor(key: T, value: DocSchemaFieldNumber);
|
|
530
298
|
get type(): "number";
|
|
531
299
|
get required(): boolean;
|
|
532
300
|
get title(): string;
|
|
@@ -535,44 +303,47 @@ declare class DocSchemaFieldNumberSingleValue {
|
|
|
535
303
|
readonly isArray = false;
|
|
536
304
|
readonly isSingle = true;
|
|
537
305
|
readonly isNumber = true;
|
|
538
|
-
toJson():
|
|
306
|
+
toJson(): DocFileIndexSchemaField;
|
|
539
307
|
/**
|
|
540
|
-
*
|
|
308
|
+
* Validate value type
|
|
541
309
|
*/
|
|
542
310
|
validate(value: unknown): boolean;
|
|
311
|
+
static empty(key: RecordKey): DocSchemaFieldNumberSingleValue<RecordKey>;
|
|
312
|
+
static normalize(key: RecordKey, record: Record<RecordKey, unknown>): DocSchemaFieldNumberSingleValue<RecordKey>;
|
|
543
313
|
}
|
|
544
314
|
|
|
545
315
|
/**
|
|
546
|
-
*
|
|
316
|
+
* Single relation type schema field
|
|
547
317
|
*/
|
|
548
|
-
declare class
|
|
549
|
-
readonly key:
|
|
550
|
-
readonly value:
|
|
551
|
-
constructor(key:
|
|
552
|
-
get type(): "
|
|
318
|
+
declare class DocSchemaFieldRelationSingleValue<T extends RecordKey> {
|
|
319
|
+
readonly key: T;
|
|
320
|
+
readonly value: DocSchemaFieldRelation;
|
|
321
|
+
constructor(key: T, value: DocSchemaFieldRelation);
|
|
322
|
+
get type(): "relation";
|
|
553
323
|
get required(): boolean;
|
|
554
324
|
get title(): string;
|
|
555
325
|
get description(): string;
|
|
556
|
-
get default():
|
|
557
|
-
get
|
|
558
|
-
readonly isArray =
|
|
559
|
-
readonly isSingle =
|
|
560
|
-
readonly
|
|
561
|
-
|
|
326
|
+
get default(): string | null;
|
|
327
|
+
get path(): string;
|
|
328
|
+
readonly isArray = false;
|
|
329
|
+
readonly isSingle = true;
|
|
330
|
+
readonly isRelation = true;
|
|
331
|
+
toJson(): DocFileIndexSchemaField;
|
|
562
332
|
/**
|
|
563
|
-
*
|
|
333
|
+
* Validate value type
|
|
564
334
|
*/
|
|
565
335
|
validate(value: unknown): boolean;
|
|
566
|
-
|
|
336
|
+
static empty(key: RecordKey): DocSchemaFieldRelationSingleValue<RecordKey>;
|
|
337
|
+
static normalize(key: RecordKey, record: Record<RecordKey, unknown>): DocSchemaFieldRelationSingleValue<RecordKey>;
|
|
567
338
|
}
|
|
568
339
|
|
|
569
340
|
/**
|
|
570
|
-
*
|
|
341
|
+
* Single select number type schema field
|
|
571
342
|
*/
|
|
572
|
-
declare class DocSchemaFieldSelectNumberSingleValue {
|
|
573
|
-
readonly key:
|
|
343
|
+
declare class DocSchemaFieldSelectNumberSingleValue<T extends RecordKey> {
|
|
344
|
+
readonly key: T;
|
|
574
345
|
readonly value: DocSchemaFieldSelectNumber;
|
|
575
|
-
constructor(key:
|
|
346
|
+
constructor(key: T, value: DocSchemaFieldSelectNumber);
|
|
576
347
|
get type(): "select-number";
|
|
577
348
|
get required(): boolean;
|
|
578
349
|
get title(): string;
|
|
@@ -584,624 +355,881 @@ declare class DocSchemaFieldSelectNumberSingleValue {
|
|
|
584
355
|
readonly isSelect = true;
|
|
585
356
|
readonly isNumberSelect = true;
|
|
586
357
|
/**
|
|
587
|
-
*
|
|
358
|
+
* Validate value
|
|
588
359
|
*/
|
|
589
360
|
validate(value: unknown): boolean;
|
|
590
|
-
toJson():
|
|
361
|
+
toJson(): DocFileIndexSchemaField;
|
|
362
|
+
static empty<T extends RecordKey>(key: T): DocSchemaFieldSelectNumberSingleValue<T>;
|
|
363
|
+
static normalize(key: RecordKey, record: Record<RecordKey, unknown>): DocSchemaFieldSelectNumberSingleValue<RecordKey>;
|
|
591
364
|
}
|
|
592
365
|
|
|
593
366
|
/**
|
|
594
|
-
*
|
|
367
|
+
* Single select text type schema field
|
|
595
368
|
*/
|
|
596
|
-
declare class
|
|
597
|
-
readonly key:
|
|
598
|
-
readonly value:
|
|
599
|
-
constructor(key:
|
|
600
|
-
get type(): "
|
|
369
|
+
declare class DocSchemaFieldSelectTextSingleValue<T extends RecordKey> {
|
|
370
|
+
readonly key: T;
|
|
371
|
+
readonly value: DocSchemaFieldSelectText;
|
|
372
|
+
constructor(key: T, value: DocSchemaFieldSelectText);
|
|
373
|
+
get type(): "select-text";
|
|
601
374
|
get required(): boolean;
|
|
602
375
|
get title(): string;
|
|
603
376
|
get description(): string;
|
|
604
|
-
get default(): string
|
|
377
|
+
get default(): string | null;
|
|
605
378
|
get options(): string[];
|
|
606
|
-
readonly isArray =
|
|
607
|
-
readonly isSingle =
|
|
379
|
+
readonly isArray = false;
|
|
380
|
+
readonly isSingle = true;
|
|
608
381
|
readonly isSelect = true;
|
|
609
382
|
readonly isTextSelect = true;
|
|
383
|
+
toJson(): DocFileIndexSchemaField;
|
|
384
|
+
/**
|
|
385
|
+
* Validate value type
|
|
386
|
+
*/
|
|
387
|
+
validate(value: unknown): boolean;
|
|
388
|
+
static empty<T extends RecordKey>(key: T): DocSchemaFieldSelectTextSingleValue<T>;
|
|
389
|
+
static normalize(key: RecordKey, record: Record<RecordKey, unknown>): DocSchemaFieldSelectTextSingleValue<RecordKey>;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Single text type schema field
|
|
394
|
+
*/
|
|
395
|
+
declare class DocSchemaFieldTextSingleValue<T extends RecordKey> {
|
|
396
|
+
readonly key: T;
|
|
397
|
+
readonly value: DocSchemaFieldText;
|
|
398
|
+
constructor(key: T, value: DocSchemaFieldText);
|
|
399
|
+
get type(): "text";
|
|
400
|
+
get required(): boolean;
|
|
401
|
+
get title(): string;
|
|
402
|
+
get description(): string;
|
|
403
|
+
get default(): string | null;
|
|
404
|
+
readonly isArray = false;
|
|
405
|
+
readonly isSingle = true;
|
|
406
|
+
readonly isText = true;
|
|
407
|
+
toJson(): DocFileIndexSchemaField;
|
|
610
408
|
/**
|
|
611
|
-
*
|
|
409
|
+
* Validate value type
|
|
612
410
|
*/
|
|
613
411
|
validate(value: unknown): boolean;
|
|
614
|
-
|
|
412
|
+
static empty(key: RecordKey): DocSchemaFieldTextSingleValue<RecordKey>;
|
|
413
|
+
static normalize(key: RecordKey, record: Record<RecordKey, unknown>): DocSchemaFieldTextSingleValue<RecordKey>;
|
|
615
414
|
}
|
|
616
415
|
|
|
617
416
|
/**
|
|
618
|
-
*
|
|
417
|
+
* Text field type
|
|
418
|
+
*/
|
|
419
|
+
type DocSchemaFieldText = z.infer<typeof zDocSchemaFieldText>;
|
|
420
|
+
/**
|
|
421
|
+
* Number field type
|
|
422
|
+
*/
|
|
423
|
+
type DocSchemaFieldNumber = z.infer<typeof zDocSchemaFieldNumber>;
|
|
424
|
+
/**
|
|
425
|
+
* Boolean field type
|
|
426
|
+
*/
|
|
427
|
+
type DocSchemaFieldBoolean = z.infer<typeof zDocSchemaFieldBoolean>;
|
|
428
|
+
/**
|
|
429
|
+
* Multi-text field type
|
|
430
|
+
*/
|
|
431
|
+
type DocFieldMultiText = z.infer<typeof zDocSchemaFieldMultiText>;
|
|
432
|
+
/**
|
|
433
|
+
* Multi-number field type
|
|
434
|
+
*/
|
|
435
|
+
type DocFieldMultiNumber = z.infer<typeof zDocSchemaFieldMultiNumber>;
|
|
436
|
+
/**
|
|
437
|
+
* Relation field type
|
|
438
|
+
*/
|
|
439
|
+
type DocSchemaFieldRelation = z.infer<typeof zDocSchemaFieldRelation>;
|
|
440
|
+
/**
|
|
441
|
+
* Multi-relation field type
|
|
442
|
+
*/
|
|
443
|
+
type DocFieldMultiRelation = z.infer<typeof zDocSchemaFieldMultiRelation>;
|
|
444
|
+
/**
|
|
445
|
+
* Select text field type
|
|
446
|
+
*/
|
|
447
|
+
type DocSchemaFieldSelectText = z.infer<typeof zDocSchemaFieldSelectText>;
|
|
448
|
+
/**
|
|
449
|
+
* Select number field type
|
|
450
|
+
*/
|
|
451
|
+
type DocSchemaFieldSelectNumber = z.infer<typeof zDocSchemaFieldSelectNumber>;
|
|
452
|
+
/**
|
|
453
|
+
* Multi-select text field type
|
|
454
|
+
*/
|
|
455
|
+
type DocSchemaFieldMultiSelectText = z.infer<typeof zDocSchemaFieldMultiSelectText>;
|
|
456
|
+
/**
|
|
457
|
+
* Multi-select number field type
|
|
458
|
+
*/
|
|
459
|
+
type DocSchemaFieldMultiSelectNumber = z.infer<typeof zDocSchemaFieldMultiSelectNumber>;
|
|
460
|
+
type DocMetaField = z.infer<typeof zDocMetaField>;
|
|
461
|
+
type DocMetaFieldText = z.infer<typeof zDocMetaFieldText>;
|
|
462
|
+
type DocMetaFieldNumber = z.infer<typeof zDocMetaFieldNumber>;
|
|
463
|
+
type DocMetaFieldBoolean = z.infer<typeof zDocMetaFieldBoolean>;
|
|
464
|
+
type DocMetaFieldSelectText = z.infer<typeof zDocMetaFieldSelectText>;
|
|
465
|
+
type DocMetaFieldSelectNumber = z.infer<typeof zDocMetaFieldSelectNumber>;
|
|
466
|
+
type DocMetaFieldRelation = z.infer<typeof zDocMetaFieldRelation>;
|
|
467
|
+
type DocMetaFieldMultiText = z.infer<typeof zDocMetaFieldMultiText>;
|
|
468
|
+
type DocMetaFieldMultiNumber = z.infer<typeof zDocMetaFieldMultiNumber>;
|
|
469
|
+
type DocMetaFieldMultiBoolean = z.infer<typeof zDocMetaFieldMultiBoolean>;
|
|
470
|
+
type DocMetaFieldMultiSelectText = z.infer<typeof zDocMetaFieldMultiSelectText>;
|
|
471
|
+
type DocMetaFieldMultiSelectNumber = z.infer<typeof zDocMetaFieldMultiSelectNumber>;
|
|
472
|
+
type DocMetaFieldMultiRelation = z.infer<typeof zDocMetaFieldMultiRelation>;
|
|
473
|
+
type DocFileMdMeta<T extends RecordKey> = Record<T, DocMetaField>;
|
|
474
|
+
type DocMetaFieldTypeText = z.infer<typeof zDocMetaFieldTypeText>;
|
|
475
|
+
type DocMetaFieldTypeNumber = z.infer<typeof zDocMetaFieldTypeNumber>;
|
|
476
|
+
type DocMetaFieldTypeBoolean = z.infer<typeof zDocMetaFieldTypeBoolean>;
|
|
477
|
+
type DocMetaFieldTypeSelectText = z.infer<typeof zDocMetaFieldTypeSelectText>;
|
|
478
|
+
type DocMetaFieldTypeSelectNumber = z.infer<typeof zDocMetaFieldTypeSelectNumber>;
|
|
479
|
+
type DocMetaFieldTypeRelation = z.infer<typeof zDocMetaFieldTypeRelation>;
|
|
480
|
+
/**
|
|
481
|
+
* Schema field type
|
|
482
|
+
*/
|
|
483
|
+
type DocMetaFieldType = z.infer<typeof zDocMetaFieldType>;
|
|
484
|
+
type DocCustomSchemaFieldText = z.infer<typeof zDocCustomSchemaFieldText>;
|
|
485
|
+
type DocCustomSchemaFieldNumber = z.infer<typeof zDocCustomSchemaFieldNumber>;
|
|
486
|
+
type DocCustomSchemaFieldBoolean = z.infer<typeof zDocCustomSchemaFieldBoolean>;
|
|
487
|
+
type DocCustomSchemaFieldRelation = z.infer<typeof zDocCustomSchemaFieldRelation>;
|
|
488
|
+
type DocCustomSchemaFieldSelectText = z.infer<typeof zDocCustomSchemaFieldSelectText>;
|
|
489
|
+
type DocCustomSchemaFieldSelectNumber = z.infer<typeof zDocCustomSchemaFieldSelectNumber>;
|
|
490
|
+
type DocCustomSchemaFieldMultiText = z.infer<typeof zDocCustomSchemaFieldMultiText>;
|
|
491
|
+
type DocCustomSchemaFieldMultiNumber = z.infer<typeof zDocCustomSchemaFieldMultiNumber>;
|
|
492
|
+
type DocCustomSchemaFieldMultiRelation = z.infer<typeof zDocCustomSchemaFieldMultiRelation>;
|
|
493
|
+
type DocCustomSchemaFieldMultiSelectText = z.infer<typeof zDocCustomSchemaFieldMultiSelectText>;
|
|
494
|
+
type DocCustomSchemaFieldMultiSelectNumber = z.infer<typeof zDocCustomSchemaFieldMultiSelectNumber>;
|
|
495
|
+
/**
|
|
496
|
+
* Schema field type
|
|
497
|
+
*/
|
|
498
|
+
type DocFileIndexSchemaField = z.infer<typeof zDocFileIndexSchemaField>;
|
|
499
|
+
/**
|
|
500
|
+
* Schema definition type
|
|
501
|
+
*/
|
|
502
|
+
type DocFileIndexSchema<T extends RecordKey> = Record<T, DocFileIndexSchemaField>;
|
|
503
|
+
/**
|
|
504
|
+
* Schema field to override
|
|
505
|
+
* ex: { xxx: { type: "text", required: true } }
|
|
506
|
+
*/
|
|
507
|
+
type DocCustomSchemaField = z.infer<typeof zDocCustomSchemaField>;
|
|
508
|
+
/**
|
|
509
|
+
* Minimal schema definition type
|
|
510
|
+
*/
|
|
511
|
+
type DocCustomSchema<T extends RecordKey = RecordKey> = Record<T, DocCustomSchemaField>;
|
|
512
|
+
/**
|
|
513
|
+
* Union type for relation fields
|
|
514
|
+
*/
|
|
515
|
+
type DocSchemaRelationFieldUnion = DocSchemaFieldRelation | DocFieldMultiRelation;
|
|
516
|
+
/**
|
|
517
|
+
* File node type (for files only)
|
|
518
|
+
*/
|
|
519
|
+
type DocTreeFileNode = {
|
|
520
|
+
type: "file";
|
|
521
|
+
name: string;
|
|
522
|
+
path: string;
|
|
523
|
+
icon: string;
|
|
524
|
+
title: string;
|
|
525
|
+
};
|
|
526
|
+
/**
|
|
527
|
+
* Directory node type (for directories only)
|
|
528
|
+
*/
|
|
529
|
+
type DocTreeDirectoryNode = {
|
|
530
|
+
type: "directory";
|
|
531
|
+
name: string;
|
|
532
|
+
path: string;
|
|
533
|
+
icon: string;
|
|
534
|
+
title: string;
|
|
535
|
+
children: DocTreeNode[];
|
|
536
|
+
};
|
|
537
|
+
/**
|
|
538
|
+
* Unified tree node type
|
|
539
|
+
*/
|
|
540
|
+
type DocTreeNode = DocTreeFileNode | DocTreeDirectoryNode;
|
|
541
|
+
/**
|
|
542
|
+
* Alias for backward compatibility
|
|
543
|
+
*/
|
|
544
|
+
type DocFileNode = DocTreeNode;
|
|
545
|
+
/**
|
|
546
|
+
* Index file type
|
|
547
|
+
*/
|
|
548
|
+
type DocFileIndex<T extends DocCustomSchema> = {
|
|
549
|
+
type: "index";
|
|
550
|
+
path: DocFilePath;
|
|
551
|
+
isArchived: boolean;
|
|
552
|
+
content: DocFileIndexContent<T>;
|
|
553
|
+
};
|
|
554
|
+
/**
|
|
555
|
+
* Test helper types
|
|
556
|
+
*/
|
|
557
|
+
/**
|
|
558
|
+
* Type to check if two types are equal
|
|
559
|
+
*/
|
|
560
|
+
type Equals<T, U> = (<G>() => G extends T ? 1 : 2) extends <G>() => G extends U ? 1 : 2 ? true : false;
|
|
561
|
+
/**
|
|
562
|
+
* Extract relation field keys from schema
|
|
563
|
+
*/
|
|
564
|
+
type RelationKeys<T extends DocCustomSchema> = {
|
|
565
|
+
[K in keyof T]: T[K]["type"] extends "relation" ? K : never;
|
|
566
|
+
}[keyof T];
|
|
567
|
+
/**
|
|
568
|
+
* Extract multi-relation field keys from schema
|
|
569
|
+
*/
|
|
570
|
+
type MultiRelationKeys<T extends DocCustomSchema> = {
|
|
571
|
+
[K in keyof T]: T[K]["type"] extends "multi-relation" ? K : never;
|
|
572
|
+
}[keyof T];
|
|
573
|
+
/**
|
|
574
|
+
* Markdown file type (excluding index.md)
|
|
575
|
+
*/
|
|
576
|
+
type DocFileMd<T extends DocCustomSchema> = {
|
|
577
|
+
type: "markdown";
|
|
578
|
+
path: DocFilePath;
|
|
579
|
+
isArchived: boolean;
|
|
580
|
+
content: DocFileMdContent<T>;
|
|
581
|
+
};
|
|
582
|
+
/**
|
|
583
|
+
* Other file type (non-markdown)
|
|
584
|
+
*/
|
|
585
|
+
type DocFileUnknown = z.infer<typeof zDocFileUnknown>;
|
|
586
|
+
/**
|
|
587
|
+
* File union type (index.md, regular md, other)
|
|
588
|
+
*/
|
|
589
|
+
type DocFile<T extends DocCustomSchema> = DocFileIndex<T> | DocFileMd<T> | DocFileUnknown;
|
|
590
|
+
/**
|
|
591
|
+
* Directory FrontMatter type
|
|
592
|
+
*/
|
|
593
|
+
type DocFileIndexMeta<T extends DocCustomSchema> = {
|
|
594
|
+
type: "index-meta";
|
|
595
|
+
icon: string | null;
|
|
596
|
+
schema: DocFileIndexSchema<keyof T>;
|
|
597
|
+
};
|
|
598
|
+
/**
|
|
599
|
+
* Relation options type
|
|
600
|
+
*/
|
|
601
|
+
type DocRelationFile = z.infer<typeof zDocRelationFile>;
|
|
602
|
+
/**
|
|
603
|
+
* Relation information type
|
|
604
|
+
*/
|
|
605
|
+
type DocRelation = z.infer<typeof zDocRelation>;
|
|
606
|
+
/**
|
|
607
|
+
* Relation field type
|
|
608
|
+
*/
|
|
609
|
+
type DocRelationField = z.infer<typeof zDocRelationField>;
|
|
610
|
+
/**
|
|
611
|
+
* File path information type
|
|
612
|
+
*/
|
|
613
|
+
type DocFilePath = z.infer<typeof zDocFilePath>;
|
|
614
|
+
type DocSchemaFieldTypeText = z.infer<typeof zDocSchemaFieldText>;
|
|
615
|
+
type DocSchemaFieldTypeNumber = z.infer<typeof zDocSchemaFieldNumber>;
|
|
616
|
+
type DocSchemaFieldTypeBoolean = z.infer<typeof zDocSchemaFieldBoolean>;
|
|
617
|
+
type DocSchemaFieldTypeMultiText = z.infer<typeof zDocSchemaFieldMultiText>;
|
|
618
|
+
type DocSchemaFieldTypeMultiNumber = z.infer<typeof zDocSchemaFieldMultiNumber>;
|
|
619
|
+
type DocSchemaFieldTypeRelation = z.infer<typeof zDocSchemaFieldRelation>;
|
|
620
|
+
type DocSchemaFieldTypeMultiRelation = z.infer<typeof zDocSchemaFieldMultiRelation>;
|
|
621
|
+
type DocSchemaFieldTypeSelectText = z.infer<typeof zDocSchemaFieldSelectText>;
|
|
622
|
+
type DocSchemaFieldTypeSelectNumber = z.infer<typeof zDocSchemaFieldSelectNumber>;
|
|
623
|
+
type DocSchemaFieldTypeMultiSelectText = z.infer<typeof zDocSchemaFieldMultiSelectText>;
|
|
624
|
+
type DocSchemaFieldTypeMultiSelectNumber = z.infer<typeof zDocSchemaFieldMultiSelectNumber>;
|
|
625
|
+
/**
|
|
626
|
+
* Markdown content information type
|
|
627
|
+
*/
|
|
628
|
+
type DocFileMdContent<T extends DocCustomSchema> = {
|
|
629
|
+
type: "markdown-content";
|
|
630
|
+
body: string;
|
|
631
|
+
title: string;
|
|
632
|
+
description: string;
|
|
633
|
+
meta: SchemaToValueType<T>;
|
|
634
|
+
};
|
|
635
|
+
/**
|
|
636
|
+
* Index file content information type
|
|
619
637
|
*/
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
get description(): string;
|
|
628
|
-
get default(): string | null;
|
|
629
|
-
get options(): string[];
|
|
630
|
-
readonly isArray = false;
|
|
631
|
-
readonly isSingle = true;
|
|
632
|
-
readonly isSelect = true;
|
|
633
|
-
readonly isTextSelect = true;
|
|
634
|
-
toJson(): DocSchemaField;
|
|
635
|
-
/**
|
|
636
|
-
* 値の型を検証する
|
|
637
|
-
*/
|
|
638
|
-
validate(value: unknown): boolean;
|
|
639
|
-
}
|
|
640
|
-
|
|
638
|
+
type DocFileIndexContent<T extends DocCustomSchema> = {
|
|
639
|
+
type: "markdown-index";
|
|
640
|
+
body: string;
|
|
641
|
+
title: string;
|
|
642
|
+
description: string;
|
|
643
|
+
meta: DocFileIndexMeta<T>;
|
|
644
|
+
};
|
|
641
645
|
/**
|
|
642
|
-
*
|
|
646
|
+
* Directory response type (re-export from server package)
|
|
643
647
|
*/
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
get description(): string;
|
|
652
|
-
get default(): string[] | null;
|
|
653
|
-
readonly isArray = true;
|
|
654
|
-
readonly isSingle = false;
|
|
655
|
-
readonly isText = true;
|
|
656
|
-
toJson(): DocSchemaField;
|
|
657
|
-
/**
|
|
658
|
-
* 値の型を検証する
|
|
659
|
-
*/
|
|
660
|
-
validate(value: unknown): boolean;
|
|
661
|
-
}
|
|
662
|
-
|
|
648
|
+
type DocDirectory<T extends DocCustomSchema> = {
|
|
649
|
+
cwd: string;
|
|
650
|
+
indexFile: DocFileIndex<T>;
|
|
651
|
+
files: DocFile<T>[];
|
|
652
|
+
relations: DocRelation[];
|
|
653
|
+
};
|
|
654
|
+
type RecordKey = string | number | symbol;
|
|
663
655
|
/**
|
|
664
|
-
*
|
|
656
|
+
* DocClient configuration
|
|
665
657
|
*/
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
get required(): boolean;
|
|
672
|
-
get title(): string;
|
|
673
|
-
get description(): string;
|
|
674
|
-
get default(): string | null;
|
|
675
|
-
readonly isArray = false;
|
|
676
|
-
readonly isSingle = true;
|
|
677
|
-
readonly isText = true;
|
|
678
|
-
toJson(): DocSchemaField;
|
|
679
|
-
/**
|
|
680
|
-
* 値の型を検証する
|
|
681
|
-
*/
|
|
682
|
-
validate(value: unknown): boolean;
|
|
683
|
-
}
|
|
684
|
-
|
|
658
|
+
type DocClientConfig = z.infer<typeof zDocClientConfig>;
|
|
659
|
+
/**
|
|
660
|
+
* DocClient configuration input (all properties optional)
|
|
661
|
+
*/
|
|
662
|
+
type DocClientConfigInput = z.input<typeof zDocClientConfig>;
|
|
685
663
|
/**
|
|
686
|
-
*
|
|
664
|
+
* Type definitions for DocFileMdMetaValue
|
|
687
665
|
*/
|
|
688
|
-
type
|
|
666
|
+
type ExtractFieldType<T> = T extends {
|
|
667
|
+
type: infer Type;
|
|
668
|
+
} ? Type : never;
|
|
669
|
+
type ExtractRequired<T> = T extends {
|
|
670
|
+
required: infer Required;
|
|
671
|
+
} ? Required : false;
|
|
672
|
+
type BaseFieldValueType<Type> = Type extends "text" ? string : Type extends "number" ? number : Type extends "boolean" ? boolean : Type extends "multi-text" ? string[] : Type extends "multi-number" ? number[] : Type extends "multi-boolean" ? boolean[] : Type extends "relation" ? string : Type extends "multi-relation" ? string[] : Type extends "select-text" ? string : Type extends "select-number" ? number : Type extends "multi-select-text" ? string[] : Type extends "multi-select-number" ? number[] : never;
|
|
673
|
+
type FieldValueType<Type, Required> = Required extends true ? BaseFieldValueType<Type> : BaseFieldValueType<Type> | null;
|
|
689
674
|
/**
|
|
690
|
-
*
|
|
675
|
+
* Extract required field keys
|
|
691
676
|
*/
|
|
692
|
-
type
|
|
677
|
+
type RequiredKeys<T extends DocCustomSchema> = {
|
|
678
|
+
[K in keyof T]: T[K] extends {
|
|
679
|
+
required: true;
|
|
680
|
+
} ? K : never;
|
|
681
|
+
}[keyof T];
|
|
693
682
|
/**
|
|
694
|
-
*
|
|
683
|
+
* Extract optional field keys
|
|
695
684
|
*/
|
|
696
|
-
type
|
|
685
|
+
type OptionalKeys<T extends DocCustomSchema> = {
|
|
686
|
+
[K in keyof T]: T[K] extends {
|
|
687
|
+
required: true;
|
|
688
|
+
} ? never : K;
|
|
689
|
+
}[keyof T];
|
|
697
690
|
/**
|
|
698
|
-
*
|
|
691
|
+
* Generate expected value type from schema (considering required)
|
|
699
692
|
*/
|
|
700
|
-
type
|
|
693
|
+
type SchemaToValueType<T extends DocCustomSchema> = {
|
|
694
|
+
[K in RequiredKeys<T>]: BaseFieldValueType<ExtractFieldType<T[K]>>;
|
|
695
|
+
} & {
|
|
696
|
+
[K in OptionalKeys<T>]?: BaseFieldValueType<ExtractFieldType<T[K]>>;
|
|
697
|
+
};
|
|
701
698
|
/**
|
|
702
|
-
*
|
|
699
|
+
* Helper type for type-safe property access
|
|
703
700
|
*/
|
|
704
|
-
type
|
|
701
|
+
type GetValueType<T extends DocCustomSchema, K extends keyof T> = K extends RequiredKeys<T> ? BaseFieldValueType<ExtractFieldType<T[K]>> : BaseFieldValueType<ExtractFieldType<T[K]>> | undefined;
|
|
705
702
|
/**
|
|
706
|
-
*
|
|
703
|
+
* Type definitions for DocFileIndexSchema
|
|
707
704
|
*/
|
|
708
|
-
type
|
|
705
|
+
type ExtractIndexFieldType<T> = T extends {
|
|
706
|
+
type: infer Type;
|
|
707
|
+
} ? Type : never;
|
|
708
|
+
type GetIndexFieldType<Schema extends DocFileIndexSchema<RecordKey>, K extends keyof Schema> = Schema[K] extends DocFileIndexSchemaField ? Schema[K] : never;
|
|
709
|
+
type GetIndexFieldValueType<Schema extends DocFileIndexSchema<RecordKey>, K extends keyof Schema> = Schema[K] extends {
|
|
710
|
+
type: infer Type;
|
|
711
|
+
} ? Type extends "text" ? DocSchemaFieldTextSingleValue<K> : Type extends "number" ? DocSchemaFieldNumberSingleValue<K> : Type extends "boolean" ? DocSchemaFieldBooleanSingleValue<K> : Type extends "relation" ? DocSchemaFieldRelationSingleValue<K> : Type extends "select-text" ? DocSchemaFieldSelectTextSingleValue<K> : Type extends "select-number" ? DocSchemaFieldSelectNumberSingleValue<K> : Type extends "multi-text" ? DocSchemaFieldMultiTextValue<K> : Type extends "multi-number" ? DocSchemaFieldMultiNumberValue<K> : Type extends "multi-relation" ? DocSchemaFieldMultiRelationValue<K> : Type extends "multi-select-text" ? DocSchemaFieldMultiSelectTextValue<K> : Type extends "multi-select-number" ? DocSchemaFieldMultiSelectNumberValue<K> : never : never;
|
|
709
712
|
|
|
710
713
|
/**
|
|
711
|
-
*
|
|
714
|
+
* Relation file
|
|
712
715
|
*/
|
|
713
|
-
declare class
|
|
714
|
-
readonly value
|
|
715
|
-
constructor(value:
|
|
716
|
+
declare class DocRelationFileValue {
|
|
717
|
+
private readonly value;
|
|
718
|
+
constructor(value: DocRelationFile);
|
|
719
|
+
/**
|
|
720
|
+
* File path
|
|
721
|
+
*/
|
|
722
|
+
get id(): string;
|
|
716
723
|
/**
|
|
717
|
-
*
|
|
724
|
+
* Slug
|
|
718
725
|
*/
|
|
719
|
-
get
|
|
726
|
+
get slug(): string;
|
|
727
|
+
/**
|
|
728
|
+
* Display label
|
|
729
|
+
*/
|
|
730
|
+
get label(): string;
|
|
720
731
|
/**
|
|
721
|
-
*
|
|
732
|
+
* Create from file path and title
|
|
722
733
|
*/
|
|
723
|
-
|
|
724
|
-
get fields(): DocSchemaFieldValue[];
|
|
725
|
-
get relationFields(): (DocSchemaFieldRelationSingleValue | DocSchemaFieldRelationMultipleValue)[];
|
|
734
|
+
static from(filePath: string, title: string | null): DocRelationFileValue;
|
|
726
735
|
/**
|
|
727
|
-
*
|
|
736
|
+
* Extract file name from file path (without extension)
|
|
728
737
|
*/
|
|
729
|
-
static
|
|
738
|
+
private static extractFileName;
|
|
730
739
|
/**
|
|
731
|
-
*
|
|
740
|
+
* Convert to JSON format
|
|
732
741
|
*/
|
|
733
|
-
|
|
742
|
+
toJson(): DocRelationFile;
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
/**
|
|
746
|
+
* Manages relation information
|
|
747
|
+
*/
|
|
748
|
+
declare class DocRelationValue {
|
|
749
|
+
readonly value: DocRelation;
|
|
750
|
+
constructor(value: DocRelation);
|
|
734
751
|
/**
|
|
735
|
-
*
|
|
752
|
+
* Relation path
|
|
736
753
|
*/
|
|
737
|
-
|
|
754
|
+
get path(): string;
|
|
738
755
|
/**
|
|
739
|
-
*
|
|
756
|
+
* List of related files (value objects)
|
|
740
757
|
*/
|
|
741
|
-
|
|
758
|
+
get files(): DocRelationFileValue[];
|
|
742
759
|
/**
|
|
743
|
-
*
|
|
760
|
+
* Get file count
|
|
744
761
|
*/
|
|
745
|
-
|
|
762
|
+
get fileCount(): number;
|
|
746
763
|
/**
|
|
747
|
-
*
|
|
764
|
+
* Whether it's empty
|
|
748
765
|
*/
|
|
749
|
-
|
|
766
|
+
get isEmpty(): boolean;
|
|
750
767
|
/**
|
|
751
|
-
*
|
|
768
|
+
* Create empty relation entity
|
|
752
769
|
*/
|
|
753
|
-
|
|
770
|
+
static empty(path: string): DocRelationValue;
|
|
754
771
|
/**
|
|
755
|
-
*
|
|
772
|
+
* Export as JSON format
|
|
756
773
|
*/
|
|
757
|
-
|
|
774
|
+
toJson(): DocRelation;
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
type Props$8 = {
|
|
778
|
+
filePath: string;
|
|
779
|
+
fileSystem: DocFileSystem;
|
|
780
|
+
pathSystem: DocPathSystem;
|
|
781
|
+
};
|
|
782
|
+
/**
|
|
783
|
+
* Relation file reference
|
|
784
|
+
*/
|
|
785
|
+
declare class DocFileRelationReference {
|
|
786
|
+
private readonly props;
|
|
787
|
+
private readonly pathSystem;
|
|
788
|
+
constructor(props: Props$8);
|
|
789
|
+
get fileSystem(): DocFileSystem;
|
|
790
|
+
get basePath(): string;
|
|
758
791
|
/**
|
|
759
|
-
*
|
|
792
|
+
* Relation path
|
|
760
793
|
*/
|
|
761
|
-
|
|
794
|
+
get path(): string;
|
|
762
795
|
/**
|
|
763
|
-
*
|
|
796
|
+
* Full path
|
|
764
797
|
*/
|
|
765
|
-
|
|
798
|
+
get fullPath(): string;
|
|
799
|
+
read(): Promise<DocRelationValue | null>;
|
|
766
800
|
/**
|
|
767
|
-
*
|
|
801
|
+
* Read list of relation files
|
|
768
802
|
*/
|
|
769
|
-
|
|
803
|
+
readFiles(): Promise<DocRelationFileValue[]>;
|
|
770
804
|
/**
|
|
771
|
-
*
|
|
805
|
+
* Read single relation file
|
|
772
806
|
*/
|
|
773
|
-
|
|
807
|
+
readFile(filePath: string): Promise<DocRelationFileValue | null>;
|
|
774
808
|
/**
|
|
775
|
-
*
|
|
809
|
+
* Check if file exists
|
|
776
810
|
*/
|
|
777
|
-
|
|
811
|
+
exists(slug: string): Promise<boolean>;
|
|
778
812
|
/**
|
|
779
|
-
*
|
|
813
|
+
* Get list of file names (without extension)
|
|
780
814
|
*/
|
|
781
|
-
|
|
815
|
+
readSlugs(): Promise<string[]>;
|
|
782
816
|
/**
|
|
783
|
-
*
|
|
817
|
+
* Get file count
|
|
784
818
|
*/
|
|
785
|
-
|
|
819
|
+
count(): Promise<number>;
|
|
786
820
|
/**
|
|
787
|
-
*
|
|
821
|
+
* Check if empty
|
|
788
822
|
*/
|
|
789
|
-
|
|
823
|
+
isEmpty(): Promise<boolean>;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Type-safe schema value object
|
|
828
|
+
*/
|
|
829
|
+
declare class DocFileIndexSchemaValue<T extends DocCustomSchema> {
|
|
830
|
+
readonly value: DocFileIndexSchema<keyof T>;
|
|
831
|
+
readonly customSchema: T;
|
|
832
|
+
constructor(value: DocFileIndexSchema<keyof T>, customSchema: T);
|
|
790
833
|
/**
|
|
791
|
-
*
|
|
834
|
+
* Get list of field names
|
|
835
|
+
* Automatically type-safe when using Zod schema
|
|
792
836
|
*/
|
|
793
|
-
|
|
837
|
+
get fieldNames(): Array<keyof T>;
|
|
794
838
|
/**
|
|
795
|
-
*
|
|
839
|
+
* Get field with specified field name
|
|
840
|
+
* Returns type-safe specific field Value object
|
|
796
841
|
*/
|
|
797
|
-
|
|
842
|
+
field<K extends keyof T>(key: K): T[K]["type"] extends infer Type ? Type extends "text" ? DocSchemaFieldTextSingleValue<K> : Type extends "number" ? DocSchemaFieldNumberSingleValue<K> : Type extends "boolean" ? DocSchemaFieldBooleanSingleValue<K> : Type extends "relation" ? DocSchemaFieldRelationSingleValue<K> : Type extends "select-text" ? DocSchemaFieldSelectTextSingleValue<K> : Type extends "select-number" ? DocSchemaFieldSelectNumberSingleValue<K> : Type extends "multi-text" ? DocSchemaFieldMultiTextValue<K> : Type extends "multi-number" ? DocSchemaFieldMultiNumberValue<K> : Type extends "multi-relation" ? DocSchemaFieldMultiRelationValue<K> : Type extends "multi-select-text" ? DocSchemaFieldMultiSelectTextValue<K> : Type extends "multi-select-number" ? DocSchemaFieldMultiSelectNumberValue<K> : never : never;
|
|
843
|
+
relation<K extends keyof T>(key: K): DocSchemaFieldRelationSingleValue<K>;
|
|
844
|
+
multiRelation<K extends keyof T>(key: K): DocSchemaFieldMultiRelationValue<K>;
|
|
798
845
|
/**
|
|
799
|
-
*
|
|
846
|
+
* Get all fields
|
|
847
|
+
* Note: For type safety, it's recommended to use field() method individually
|
|
800
848
|
*/
|
|
801
|
-
|
|
802
|
-
|
|
849
|
+
get fields(): DocFileIndexSchema<keyof T>[keyof T][];
|
|
850
|
+
get relationFields(): (DocSchemaFieldRelationSingleValue<string> | DocSchemaFieldMultiRelationValue<string>)[];
|
|
851
|
+
toJson(): DocFileIndexSchema<keyof T>;
|
|
803
852
|
/**
|
|
804
|
-
*
|
|
853
|
+
* Create empty schema entity
|
|
854
|
+
* biome-ignore lint/complexity/noBannedTypes: {} as DocCustomSchema
|
|
805
855
|
*/
|
|
806
|
-
|
|
856
|
+
static empty(): DocFileIndexSchemaValue<{}>;
|
|
807
857
|
}
|
|
808
858
|
|
|
809
859
|
/**
|
|
810
|
-
* FrontMatter
|
|
860
|
+
* File: index.md > content > FrontMatter
|
|
811
861
|
*/
|
|
812
|
-
declare class
|
|
813
|
-
readonly value:
|
|
814
|
-
|
|
862
|
+
declare class DocFileIndexMetaValue<T extends DocCustomSchema> {
|
|
863
|
+
readonly value: DocFileIndexMeta<T>;
|
|
864
|
+
readonly customSchema: T;
|
|
865
|
+
private readonly config;
|
|
815
866
|
/**
|
|
816
|
-
*
|
|
867
|
+
* Additional properties to include in the meta data
|
|
817
868
|
*/
|
|
818
|
-
|
|
869
|
+
private readonly additionalProperties;
|
|
870
|
+
constructor(value: DocFileIndexMeta<T>, customSchema: T, config: DocClientConfig, additionalProperties?: Record<string, unknown>);
|
|
819
871
|
/**
|
|
820
|
-
*
|
|
872
|
+
* Get icon
|
|
821
873
|
*/
|
|
822
|
-
get
|
|
874
|
+
get icon(): string | null;
|
|
823
875
|
/**
|
|
824
|
-
*
|
|
876
|
+
* Get schema
|
|
825
877
|
*/
|
|
826
|
-
|
|
878
|
+
schema(): DocFileIndexSchemaValue<T>;
|
|
827
879
|
/**
|
|
828
|
-
* schema
|
|
880
|
+
* Check if schema is defined
|
|
829
881
|
*/
|
|
830
|
-
|
|
882
|
+
get hasSchema(): boolean;
|
|
831
883
|
/**
|
|
832
|
-
*
|
|
884
|
+
* Update icon field
|
|
833
885
|
*/
|
|
834
|
-
|
|
886
|
+
withIcon(value: string | null): DocFileIndexMetaValue<T>;
|
|
835
887
|
/**
|
|
836
|
-
*
|
|
888
|
+
* Update schema field
|
|
837
889
|
*/
|
|
838
|
-
|
|
890
|
+
withSchema(value: DocFileIndexSchema<keyof T>): DocFileIndexMetaValue<T>;
|
|
839
891
|
/**
|
|
840
|
-
*
|
|
892
|
+
* Output in JSON format
|
|
841
893
|
*/
|
|
842
|
-
|
|
894
|
+
toJson(): DocFileIndexMeta<T>;
|
|
843
895
|
/**
|
|
844
|
-
*
|
|
896
|
+
* Output in YAML format
|
|
845
897
|
*/
|
|
846
|
-
|
|
898
|
+
toYaml(): string;
|
|
847
899
|
/**
|
|
848
|
-
* Markdown
|
|
900
|
+
* Generate from Markdown text (can process incomplete data)
|
|
849
901
|
*/
|
|
850
|
-
static from(markdownText: string):
|
|
902
|
+
static from<T extends DocCustomSchema>(markdownText: string, customSchema: T, config: DocClientConfig): DocFileIndexMetaValue<T>;
|
|
851
903
|
/**
|
|
852
|
-
*
|
|
904
|
+
* Generate directly from data (can process incomplete data)
|
|
853
905
|
*/
|
|
854
|
-
static fromRecord(record: Record<string, unknown
|
|
906
|
+
static fromRecord<T extends DocCustomSchema>(record: Record<string, unknown>, customSchema: T, config: DocClientConfig): DocFileIndexMetaValue<T>;
|
|
855
907
|
/**
|
|
856
|
-
*
|
|
908
|
+
* Generate empty FrontMatter
|
|
857
909
|
*/
|
|
858
|
-
static empty():
|
|
910
|
+
static empty<T extends DocCustomSchema>(customSchema: T, config: DocClientConfig): DocFileIndexMetaValue<T>;
|
|
859
911
|
/**
|
|
860
|
-
*
|
|
912
|
+
* Extract icon
|
|
861
913
|
*/
|
|
862
914
|
private static extractIcon;
|
|
863
915
|
/**
|
|
864
|
-
*
|
|
916
|
+
* Extract schema part
|
|
865
917
|
*/
|
|
866
918
|
private static extractSchema;
|
|
867
919
|
/**
|
|
868
|
-
*
|
|
920
|
+
* Normalize entire schema
|
|
869
921
|
*/
|
|
870
|
-
private static
|
|
922
|
+
private static normalizeSchema;
|
|
923
|
+
static emptySchema<T extends DocCustomSchema>(customSchema: T): DocFileIndexSchema<keyof T>;
|
|
871
924
|
}
|
|
872
925
|
|
|
873
926
|
/**
|
|
874
|
-
*
|
|
927
|
+
* File: index.md > content
|
|
875
928
|
*/
|
|
876
|
-
declare class
|
|
877
|
-
readonly value:
|
|
878
|
-
|
|
929
|
+
declare class DocFileIndexContentValue<T extends DocCustomSchema> {
|
|
930
|
+
readonly value: DocFileIndexContent<T>;
|
|
931
|
+
private readonly customSchema;
|
|
932
|
+
private readonly config;
|
|
933
|
+
constructor(value: DocFileIndexContent<T>, customSchema: T, config: DocClientConfig);
|
|
879
934
|
/**
|
|
880
|
-
*
|
|
935
|
+
* Content body (does not include frontMatter)
|
|
881
936
|
*/
|
|
882
937
|
get body(): string;
|
|
883
938
|
/**
|
|
884
|
-
*
|
|
939
|
+
* Title
|
|
885
940
|
*/
|
|
886
941
|
get title(): string;
|
|
887
942
|
/**
|
|
888
|
-
*
|
|
943
|
+
* Description
|
|
889
944
|
*/
|
|
890
945
|
get description(): string;
|
|
891
946
|
/**
|
|
892
947
|
* FrontMatter
|
|
893
948
|
*/
|
|
894
|
-
|
|
949
|
+
meta(): DocFileIndexMetaValue<T>;
|
|
895
950
|
/**
|
|
896
|
-
*
|
|
951
|
+
* Update title
|
|
897
952
|
*/
|
|
898
|
-
withTitle(title: string):
|
|
953
|
+
withTitle(title: string): DocFileIndexContentValue<T>;
|
|
899
954
|
/**
|
|
900
|
-
*
|
|
955
|
+
* Update description
|
|
901
956
|
*/
|
|
902
|
-
withDescription(description: string, defaultTitle?: string):
|
|
957
|
+
withDescription(description: string, defaultTitle?: string): DocFileIndexContentValue<T>;
|
|
903
958
|
/**
|
|
904
|
-
* Markdown
|
|
959
|
+
* Generate from Markdown text
|
|
905
960
|
*/
|
|
906
|
-
static fromMarkdown(markdown: string):
|
|
961
|
+
static fromMarkdown<T extends DocCustomSchema>(markdown: string, customSchema: T, config: DocClientConfig): DocFileIndexContentValue<T>;
|
|
907
962
|
/**
|
|
908
|
-
*
|
|
963
|
+
* Generate complete Markdown text
|
|
909
964
|
*/
|
|
910
965
|
toMarkdownText(): string;
|
|
911
966
|
/**
|
|
912
|
-
*
|
|
967
|
+
* Update content
|
|
913
968
|
*/
|
|
914
|
-
withContent(content: string):
|
|
969
|
+
withContent(content: string): DocFileIndexContentValue<T>;
|
|
915
970
|
/**
|
|
916
|
-
* FrontMatter
|
|
971
|
+
* Update FrontMatter
|
|
917
972
|
*/
|
|
918
|
-
|
|
973
|
+
withMeta(meta: DocFileIndexMeta<T>): DocFileIndexContentValue<T>;
|
|
919
974
|
/**
|
|
920
|
-
*
|
|
975
|
+
* Generate default index.md content
|
|
921
976
|
*/
|
|
922
|
-
static empty(directoryName: string):
|
|
977
|
+
static empty<T extends DocCustomSchema = DocCustomSchema>(directoryName: string, customSchema: T, config: DocClientConfig): DocFileIndexContentValue<T>;
|
|
923
978
|
/**
|
|
924
|
-
* FrontMatter
|
|
979
|
+
* Generate complete text combining FrontMatter and body
|
|
925
980
|
*/
|
|
926
981
|
toText(): string;
|
|
927
982
|
/**
|
|
928
|
-
* JSON
|
|
983
|
+
* Output in JSON format
|
|
929
984
|
*/
|
|
930
|
-
toJson():
|
|
985
|
+
toJson(): DocFileIndexContent<T>;
|
|
931
986
|
}
|
|
932
987
|
|
|
933
988
|
/**
|
|
934
|
-
*
|
|
989
|
+
* Document directory entity
|
|
935
990
|
*/
|
|
936
|
-
declare class DocFileIndexEntity {
|
|
937
|
-
readonly value: DocFileIndex
|
|
938
|
-
|
|
991
|
+
declare class DocFileIndexEntity<T extends DocCustomSchema> {
|
|
992
|
+
readonly value: DocFileIndex<T>;
|
|
993
|
+
private readonly customSchema;
|
|
994
|
+
private readonly config;
|
|
995
|
+
constructor(value: DocFileIndex<T>, customSchema: T, config?: DocClientConfig);
|
|
939
996
|
/**
|
|
940
|
-
*
|
|
997
|
+
* Content
|
|
941
998
|
*/
|
|
942
|
-
get content():
|
|
999
|
+
get content(): DocFileIndexContentValue<T>;
|
|
943
1000
|
/**
|
|
944
|
-
*
|
|
1001
|
+
* Path information
|
|
945
1002
|
*/
|
|
946
1003
|
get path(): DocFilePath;
|
|
947
1004
|
/**
|
|
948
|
-
*
|
|
1005
|
+
* Update content
|
|
949
1006
|
*/
|
|
950
|
-
withContent(content:
|
|
1007
|
+
withContent(content: DocFileIndexContentValue<T>): DocFileIndexEntity<T>;
|
|
951
1008
|
/**
|
|
952
|
-
*
|
|
1009
|
+
* Update path
|
|
953
1010
|
*/
|
|
954
|
-
withPath(path: DocFilePath): DocFileIndexEntity
|
|
1011
|
+
withPath(path: DocFilePath): DocFileIndexEntity<T>;
|
|
955
1012
|
/**
|
|
956
|
-
*
|
|
1013
|
+
* Convert to index file schema format
|
|
957
1014
|
*/
|
|
958
|
-
toJson(): DocFileIndex
|
|
1015
|
+
toJson(): DocFileIndex<T>;
|
|
959
1016
|
}
|
|
960
1017
|
|
|
961
|
-
type Props$7 = {
|
|
1018
|
+
type Props$7<T extends DocCustomSchema> = {
|
|
1019
|
+
customSchema: T;
|
|
962
1020
|
path: string;
|
|
963
1021
|
fileSystem: DocFileSystem;
|
|
964
1022
|
pathSystem: DocPathSystem;
|
|
1023
|
+
config: DocClientConfig;
|
|
965
1024
|
};
|
|
966
1025
|
/**
|
|
967
|
-
*
|
|
1026
|
+
* File reference class
|
|
968
1027
|
*/
|
|
969
|
-
declare class DocFileIndexReference {
|
|
1028
|
+
declare class DocFileIndexReference<T extends DocCustomSchema> {
|
|
970
1029
|
private readonly props;
|
|
971
1030
|
private readonly pathSystem;
|
|
972
|
-
|
|
1031
|
+
private readonly customSchema;
|
|
1032
|
+
constructor(props: Props$7<T>);
|
|
973
1033
|
get fileSystem(): DocFileSystem;
|
|
974
1034
|
get basePath(): string;
|
|
975
1035
|
get filePath(): string;
|
|
976
1036
|
get fileFullPath(): string;
|
|
977
1037
|
get durectoryPath(): string;
|
|
978
|
-
read(): Promise<DocFileIndexEntity
|
|
1038
|
+
read(): Promise<DocFileIndexEntity<T>>;
|
|
979
1039
|
/**
|
|
980
|
-
*
|
|
1040
|
+
* Read file content
|
|
981
1041
|
*/
|
|
982
1042
|
readContent(): Promise<Error | string>;
|
|
983
1043
|
/**
|
|
984
|
-
*
|
|
1044
|
+
* Write content to file
|
|
985
1045
|
*/
|
|
986
1046
|
writeContent(content: string): Promise<void>;
|
|
987
1047
|
/**
|
|
988
|
-
*
|
|
1048
|
+
* Write entity
|
|
989
1049
|
*/
|
|
990
|
-
write(entity: DocFileIndexEntity): Promise<void>;
|
|
1050
|
+
write(entity: DocFileIndexEntity<T>): Promise<void>;
|
|
991
1051
|
/**
|
|
992
|
-
*
|
|
1052
|
+
* Create new file with default content
|
|
993
1053
|
*/
|
|
994
|
-
writeDefault(): Promise<
|
|
1054
|
+
writeDefault(): Promise<null>;
|
|
995
1055
|
/**
|
|
996
|
-
*
|
|
1056
|
+
* Delete file
|
|
997
1057
|
*/
|
|
998
1058
|
delete(): Promise<Error | null>;
|
|
999
1059
|
/**
|
|
1000
|
-
*
|
|
1060
|
+
* Check if file exists
|
|
1001
1061
|
*/
|
|
1002
1062
|
exists(): Promise<boolean>;
|
|
1003
1063
|
relations(): Promise<DocFileRelationReference[]>;
|
|
1004
1064
|
readRelations(): Promise<DocRelationValue[]>;
|
|
1005
1065
|
/**
|
|
1006
|
-
*
|
|
1066
|
+
* Get file size in bytes
|
|
1007
1067
|
*/
|
|
1008
1068
|
size(): Promise<number>;
|
|
1009
1069
|
/**
|
|
1010
|
-
*
|
|
1070
|
+
* Get last modified date
|
|
1011
1071
|
*/
|
|
1012
1072
|
lastModified(): Promise<Date>;
|
|
1013
1073
|
/**
|
|
1014
|
-
*
|
|
1074
|
+
* Get file creation date
|
|
1015
1075
|
*/
|
|
1016
1076
|
createdAt(): Promise<Date>;
|
|
1017
1077
|
/**
|
|
1018
|
-
*
|
|
1078
|
+
* Move file to archive and return new reference
|
|
1019
1079
|
*/
|
|
1020
|
-
archive(archiveDirectoryName?: string): Promise<DocFileIndexReference
|
|
1080
|
+
archive(archiveDirectoryName?: string): Promise<DocFileIndexReference<T>>;
|
|
1021
1081
|
/**
|
|
1022
|
-
*
|
|
1082
|
+
* Restore file from archive and return new reference
|
|
1023
1083
|
*/
|
|
1024
|
-
restore(archiveDirectoryName?: string): Promise<DocFileIndexReference
|
|
1084
|
+
restore(archiveDirectoryName?: string): Promise<DocFileIndexReference<T>>;
|
|
1025
1085
|
}
|
|
1026
1086
|
|
|
1027
1087
|
/**
|
|
1028
|
-
*
|
|
1029
|
-
*/
|
|
1030
|
-
declare class
|
|
1031
|
-
readonly value:
|
|
1032
|
-
|
|
1033
|
-
|
|
1088
|
+
* Meta
|
|
1089
|
+
*/
|
|
1090
|
+
declare class DocFileMdMetaValue<T extends DocCustomSchema> {
|
|
1091
|
+
readonly value: SchemaToValueType<T>;
|
|
1092
|
+
readonly customSchema: T;
|
|
1093
|
+
constructor(value: SchemaToValueType<T>, customSchema: T);
|
|
1094
|
+
private validateValue;
|
|
1095
|
+
private getValueField;
|
|
1096
|
+
get keys(): Array<keyof T>;
|
|
1097
|
+
/**
|
|
1098
|
+
* Return a new instance with a single property updated
|
|
1099
|
+
*/
|
|
1100
|
+
withProperty<K extends keyof T>(key: K, value: BaseFieldValueType<ExtractFieldType<T[K]>>): DocFileMdMetaValue<T>;
|
|
1101
|
+
schemaField<K extends keyof T>(key: K): T[K];
|
|
1102
|
+
field<K extends keyof T>(key: K): FieldValueType<ExtractFieldType<T[K]>, ExtractRequired<T[K]>>;
|
|
1103
|
+
relation(key: keyof T): DocMetaFieldRelation;
|
|
1104
|
+
multiRelation(key: keyof T): DocMetaFieldMultiRelation;
|
|
1105
|
+
text(key: keyof T): DocMetaFieldText;
|
|
1106
|
+
number(key: keyof T): DocMetaFieldNumber;
|
|
1107
|
+
boolean(key: keyof T): DocMetaFieldBoolean;
|
|
1108
|
+
multiText(key: keyof T): DocMetaFieldMultiText;
|
|
1109
|
+
multiNumber(key: keyof T): DocMetaFieldMultiNumber;
|
|
1110
|
+
multiBoolean(key: keyof T): DocMetaFieldMultiBoolean;
|
|
1111
|
+
hasKey(key: keyof T): boolean;
|
|
1112
|
+
/**
|
|
1113
|
+
* Generate from Markdown text
|
|
1114
|
+
*/
|
|
1115
|
+
static fromYamlText<T extends DocCustomSchema>(yamlText: string, customSchema: T): DocFileMdMetaValue<T>;
|
|
1116
|
+
static empty<T extends DocCustomSchema>(customSchema: T): DocFileMdMetaValue<T>;
|
|
1117
|
+
toJson(): SchemaToValueType<T>;
|
|
1034
1118
|
toYaml(): string;
|
|
1035
|
-
/**
|
|
1036
|
-
* Markdownテキストから生成
|
|
1037
|
-
*/
|
|
1038
|
-
static from(markdownText: string): DocFrontMatterMdValue;
|
|
1039
|
-
/**
|
|
1040
|
-
* 空のFrontMatterを生成
|
|
1041
|
-
*/
|
|
1042
|
-
static empty(): DocFrontMatterMdValue;
|
|
1043
|
-
/**
|
|
1044
|
-
* データから直接生成
|
|
1045
|
-
*/
|
|
1046
|
-
static fromData(data: unknown): DocFrontMatterMdValue;
|
|
1047
|
-
/**
|
|
1048
|
-
* スキーマフィールドに基づいてデフォルト値を生成する
|
|
1049
|
-
*/
|
|
1050
|
-
static generateDefaultValueFromSchemaField(fieldDef: {
|
|
1051
|
-
type: string;
|
|
1052
|
-
default?: unknown;
|
|
1053
|
-
}): unknown;
|
|
1054
|
-
/**
|
|
1055
|
-
* 単一のプロパティを更新した新しいインスタンスを返す
|
|
1056
|
-
* スキーマに基づいて型を検証し、スキーマのフィールドのみを含む新しいインスタンスを生成
|
|
1057
|
-
*/
|
|
1058
|
-
withProperty(key: string, value: unknown, schema: DocSchemaValue): DocFrontMatterMdValue;
|
|
1059
|
-
/**
|
|
1060
|
-
* フィールド値の検証
|
|
1061
|
-
*/
|
|
1062
|
-
private validateFieldValue;
|
|
1063
|
-
/**
|
|
1064
|
-
* テキスト型のプロパティを取得
|
|
1065
|
-
*/
|
|
1066
|
-
text(key: string): string | null;
|
|
1067
|
-
/**
|
|
1068
|
-
* 数値型のプロパティを取得
|
|
1069
|
-
*/
|
|
1070
|
-
number(key: string): number | null;
|
|
1071
|
-
/**
|
|
1072
|
-
* 真偽値型のプロパティを取得
|
|
1073
|
-
*/
|
|
1074
|
-
boolean(key: string): boolean | null;
|
|
1075
|
-
/**
|
|
1076
|
-
* 単一リレーション型のプロパティを取得
|
|
1077
|
-
*/
|
|
1078
|
-
relation(key: string): string | null;
|
|
1079
|
-
/**
|
|
1080
|
-
* 複数リレーション型のプロパティを取得
|
|
1081
|
-
*/
|
|
1082
|
-
multiRelation(key: string): string[];
|
|
1083
|
-
/**
|
|
1084
|
-
* 複数テキスト型のプロパティを取得
|
|
1085
|
-
*/
|
|
1086
|
-
multiText(key: string): string[];
|
|
1087
|
-
/**
|
|
1088
|
-
* 複数数値型のプロパティを取得
|
|
1089
|
-
*/
|
|
1090
|
-
multiNumber(key: string): number[];
|
|
1091
|
-
/**
|
|
1092
|
-
* 複数真偽値型のプロパティを取得
|
|
1093
|
-
*/
|
|
1094
|
-
multiBoolean(key: string): boolean[];
|
|
1095
|
-
/**
|
|
1096
|
-
* プロパティが存在するかチェック
|
|
1097
|
-
*/
|
|
1098
|
-
has(key: string): boolean;
|
|
1099
|
-
/**
|
|
1100
|
-
* すべてのキーを取得
|
|
1101
|
-
*/
|
|
1102
|
-
get keys(): string[];
|
|
1103
1119
|
}
|
|
1104
1120
|
|
|
1105
1121
|
/**
|
|
1106
|
-
* Markdown
|
|
1122
|
+
* File: Markdown > Content
|
|
1107
1123
|
*/
|
|
1108
|
-
declare class
|
|
1109
|
-
readonly value:
|
|
1110
|
-
|
|
1124
|
+
declare class DocFileMdContentValue<T extends DocCustomSchema> {
|
|
1125
|
+
readonly value: DocFileMdContent<T>;
|
|
1126
|
+
private readonly customSchema;
|
|
1127
|
+
constructor(value: DocFileMdContent<T>, customSchema: T);
|
|
1111
1128
|
/**
|
|
1112
|
-
*
|
|
1129
|
+
* Content body (does not include frontMatter)
|
|
1113
1130
|
*/
|
|
1114
1131
|
get body(): string;
|
|
1115
1132
|
/**
|
|
1116
|
-
*
|
|
1133
|
+
* Title
|
|
1117
1134
|
*/
|
|
1118
1135
|
get title(): string;
|
|
1119
1136
|
/**
|
|
1120
|
-
*
|
|
1137
|
+
* Description
|
|
1121
1138
|
*/
|
|
1122
1139
|
get description(): string;
|
|
1123
1140
|
/**
|
|
1124
|
-
* FrontMatter
|
|
1141
|
+
* FrontMatter (uses constructor's Zod schema or argument schema)
|
|
1142
|
+
*/
|
|
1143
|
+
meta(): DocFileMdMetaValue<T>;
|
|
1144
|
+
/**
|
|
1145
|
+
* Update title
|
|
1125
1146
|
*/
|
|
1126
|
-
|
|
1147
|
+
withTitle(title: string): DocFileMdContentValue<T>;
|
|
1127
1148
|
/**
|
|
1128
|
-
*
|
|
1149
|
+
* Update description
|
|
1129
1150
|
*/
|
|
1130
|
-
|
|
1151
|
+
withDescription(description: string, defaultTitle?: string): DocFileMdContentValue<T>;
|
|
1131
1152
|
/**
|
|
1132
|
-
*
|
|
1153
|
+
* Update content
|
|
1133
1154
|
*/
|
|
1134
|
-
|
|
1155
|
+
withContent(content: string): DocFileMdContentValue<T>;
|
|
1135
1156
|
/**
|
|
1136
|
-
*
|
|
1157
|
+
* Update FrontMatter
|
|
1137
1158
|
*/
|
|
1138
|
-
|
|
1159
|
+
withMeta<U extends DocCustomSchema>(meta: DocFileMdMetaValue<U>): DocFileMdContentValue<U>;
|
|
1139
1160
|
/**
|
|
1140
|
-
* FrontMatter
|
|
1161
|
+
* Update specific property of FrontMatter
|
|
1141
1162
|
*/
|
|
1142
|
-
|
|
1163
|
+
withMetaProperty<K extends keyof T>(key: K, value: BaseFieldValueType<ExtractFieldType<T[K]>>): DocFileMdContentValue<T>;
|
|
1143
1164
|
/**
|
|
1144
|
-
* Markdown
|
|
1165
|
+
* Generate from Markdown text
|
|
1145
1166
|
*/
|
|
1146
|
-
static fromMarkdown(markdown: string):
|
|
1167
|
+
static fromMarkdown<T extends DocCustomSchema>(markdown: string, customSchema: T): DocFileMdContentValue<T>;
|
|
1147
1168
|
/**
|
|
1148
|
-
*
|
|
1169
|
+
* Generate complete Markdown text
|
|
1149
1170
|
*/
|
|
1150
1171
|
toMarkdownText(): string;
|
|
1151
1172
|
/**
|
|
1152
|
-
* FrontMatter
|
|
1173
|
+
* Generate complete text combining FrontMatter and body
|
|
1153
1174
|
*/
|
|
1154
1175
|
toText(): string;
|
|
1155
1176
|
/**
|
|
1156
|
-
*
|
|
1177
|
+
* Generate empty content
|
|
1157
1178
|
*/
|
|
1158
|
-
static empty(title: string):
|
|
1179
|
+
static empty<T extends DocCustomSchema = DocCustomSchema>(title: string, customSchema: T): DocFileMdContentValue<T>;
|
|
1159
1180
|
/**
|
|
1160
|
-
* JSON
|
|
1181
|
+
* Output in JSON format
|
|
1161
1182
|
*/
|
|
1162
|
-
toJson():
|
|
1183
|
+
toJson(): DocFileMdContent<T>;
|
|
1163
1184
|
}
|
|
1164
1185
|
|
|
1165
1186
|
/**
|
|
1166
|
-
*
|
|
1187
|
+
* Markdown file entity
|
|
1167
1188
|
*/
|
|
1168
|
-
declare class DocFileMdEntity {
|
|
1169
|
-
readonly value: DocFileMd
|
|
1170
|
-
|
|
1189
|
+
declare class DocFileMdEntity<T extends DocCustomSchema> {
|
|
1190
|
+
readonly value: DocFileMd<T>;
|
|
1191
|
+
private readonly customSchema;
|
|
1192
|
+
constructor(value: DocFileMd<T>, customSchema: T);
|
|
1171
1193
|
/**
|
|
1172
|
-
*
|
|
1194
|
+
* Content
|
|
1173
1195
|
*/
|
|
1174
|
-
get content():
|
|
1196
|
+
get content(): DocFileMdContentValue<T>;
|
|
1175
1197
|
/**
|
|
1176
|
-
*
|
|
1198
|
+
* Path information
|
|
1177
1199
|
*/
|
|
1178
1200
|
get path(): DocFilePath;
|
|
1179
1201
|
/**
|
|
1180
|
-
*
|
|
1202
|
+
* Update content
|
|
1181
1203
|
*/
|
|
1182
|
-
withContent(content:
|
|
1204
|
+
withContent(content: DocFileMdContentValue<T>): DocFileMdEntity<T>;
|
|
1183
1205
|
/**
|
|
1184
|
-
*
|
|
1206
|
+
* Update path
|
|
1185
1207
|
*/
|
|
1186
|
-
withPath(path: DocFilePath): DocFileMdEntity
|
|
1208
|
+
withPath(path: DocFilePath): DocFileMdEntity<T>;
|
|
1209
|
+
withMeta(meta: DocFileMdMetaValue<T>): DocFileMdEntity<T>;
|
|
1210
|
+
withTitle(title: string): DocFileMdEntity<T>;
|
|
1211
|
+
withDescription(description: string, defaultTitle?: string): DocFileMdEntity<T>;
|
|
1187
1212
|
/**
|
|
1188
|
-
* JSON
|
|
1213
|
+
* Convert to JSON format
|
|
1189
1214
|
*/
|
|
1190
|
-
toJson(): DocFileMd
|
|
1215
|
+
toJson(): DocFileMd<T>;
|
|
1191
1216
|
}
|
|
1192
1217
|
|
|
1193
|
-
type Props$6 = {
|
|
1218
|
+
type Props$6<T extends DocCustomSchema> = {
|
|
1194
1219
|
path: string;
|
|
1195
1220
|
fileSystem: DocFileSystem;
|
|
1196
1221
|
pathSystem: DocPathSystem;
|
|
1222
|
+
customSchema: T;
|
|
1223
|
+
config: DocClientConfig;
|
|
1197
1224
|
};
|
|
1198
1225
|
/**
|
|
1199
|
-
*
|
|
1226
|
+
* File reference
|
|
1200
1227
|
*/
|
|
1201
|
-
declare class DocFileMdReference {
|
|
1228
|
+
declare class DocFileMdReference<T extends DocCustomSchema> {
|
|
1202
1229
|
private readonly props;
|
|
1203
1230
|
private readonly pathSystem;
|
|
1204
|
-
|
|
1231
|
+
private readonly customSchema;
|
|
1232
|
+
constructor(props: Props$6<T>);
|
|
1205
1233
|
get fileSystem(): DocFileSystem;
|
|
1206
1234
|
get basePath(): string;
|
|
1207
1235
|
get path(): string;
|
|
@@ -1210,98 +1238,96 @@ declare class DocFileMdReference {
|
|
|
1210
1238
|
get archivedPath(): string;
|
|
1211
1239
|
get name(): string;
|
|
1212
1240
|
get nameWithExtension(): string;
|
|
1213
|
-
|
|
1214
|
-
read(): Promise<
|
|
1215
|
-
/**
|
|
1216
|
-
* ファイルの内容を読み込む
|
|
1217
|
-
*/
|
|
1218
|
-
readContent(): Promise<Error | string>;
|
|
1241
|
+
exists(): Promise<boolean>;
|
|
1242
|
+
read(): Promise<DocFileMdEntity<T> | Error>;
|
|
1219
1243
|
/**
|
|
1220
|
-
*
|
|
1244
|
+
* Read file content
|
|
1221
1245
|
*/
|
|
1222
|
-
|
|
1246
|
+
readText(): Promise<Error | string>;
|
|
1223
1247
|
/**
|
|
1224
|
-
*
|
|
1248
|
+
* Write entity
|
|
1225
1249
|
*/
|
|
1226
|
-
write(entity: DocFileMdEntity): Promise<
|
|
1250
|
+
write(entity: DocFileMdEntity<T>): Promise<null>;
|
|
1251
|
+
writeText(text: string): Promise<void>;
|
|
1227
1252
|
/**
|
|
1228
|
-
*
|
|
1253
|
+
* Create new file with default content
|
|
1229
1254
|
*/
|
|
1230
1255
|
writeDefault(): Promise<void>;
|
|
1231
1256
|
/**
|
|
1232
|
-
*
|
|
1257
|
+
* Delete file
|
|
1233
1258
|
*/
|
|
1234
1259
|
delete(): Promise<Error | null>;
|
|
1235
1260
|
/**
|
|
1236
|
-
*
|
|
1237
|
-
*/
|
|
1238
|
-
exists(): Promise<boolean>;
|
|
1239
|
-
/**
|
|
1240
|
-
* ファイルをコピー
|
|
1261
|
+
* Copy file
|
|
1241
1262
|
*/
|
|
1242
1263
|
copyTo(destinationPath: string): Promise<void>;
|
|
1243
1264
|
/**
|
|
1244
|
-
*
|
|
1265
|
+
* Move file
|
|
1245
1266
|
*/
|
|
1246
1267
|
moveTo(destinationPath: string): Promise<void>;
|
|
1247
1268
|
/**
|
|
1248
|
-
*
|
|
1269
|
+
* Move file to archive and return new reference
|
|
1270
|
+
*/
|
|
1271
|
+
archive(archiveDirectoryName?: string): Promise<DocFileMdReference<T>>;
|
|
1272
|
+
/**
|
|
1273
|
+
* Restore file from archive and return new reference
|
|
1274
|
+
*/
|
|
1275
|
+
restore(archiveDirectoryName?: string): Promise<DocFileMdReference<T>>;
|
|
1276
|
+
/**
|
|
1277
|
+
* Get file size in bytes
|
|
1249
1278
|
*/
|
|
1250
1279
|
size(): Promise<number>;
|
|
1251
1280
|
/**
|
|
1252
|
-
*
|
|
1281
|
+
* Get file last modified time
|
|
1253
1282
|
*/
|
|
1254
1283
|
lastModified(): Promise<Date>;
|
|
1255
1284
|
/**
|
|
1256
|
-
*
|
|
1285
|
+
* Get file creation time
|
|
1257
1286
|
*/
|
|
1258
1287
|
createdAt(): Promise<Date>;
|
|
1288
|
+
directory(): DocDirectoryReference<T>;
|
|
1259
1289
|
/**
|
|
1260
|
-
*
|
|
1261
|
-
*/
|
|
1262
|
-
archive(archiveDirectoryName?: string): Promise<DocFileMdReference>;
|
|
1263
|
-
/**
|
|
1264
|
-
* ファイルをアーカイブから復元し、新しい参照を返す
|
|
1290
|
+
* Get relation based on schema
|
|
1265
1291
|
*/
|
|
1266
|
-
|
|
1292
|
+
relation<U extends DocCustomSchema = DocCustomSchema>(key: RelationKeys<T>, targetSchema?: U): Promise<DocFileMdReference<U> | Error | null>;
|
|
1267
1293
|
/**
|
|
1268
|
-
*
|
|
1294
|
+
* Get index.md in the same directory
|
|
1269
1295
|
*/
|
|
1270
|
-
|
|
1296
|
+
directoryIndex(): Promise<DocFileIndexReference<T> | null>;
|
|
1271
1297
|
/**
|
|
1272
|
-
*
|
|
1298
|
+
* Get multiple relations based on schema
|
|
1273
1299
|
*/
|
|
1274
|
-
|
|
1300
|
+
relations<U extends DocCustomSchema = DocCustomSchema>(key: MultiRelationKeys<T>, customSchema?: U): Promise<DocFileMdReference<U>[]>;
|
|
1275
1301
|
/**
|
|
1276
|
-
*
|
|
1302
|
+
* File: Markdown > FrontMatter
|
|
1277
1303
|
*/
|
|
1278
|
-
|
|
1304
|
+
readFrontMatter(): Promise<DocFileMdMetaValue<T> | Error>;
|
|
1279
1305
|
/**
|
|
1280
|
-
*
|
|
1306
|
+
* File: Markdown > FrontMatter
|
|
1281
1307
|
*/
|
|
1282
|
-
|
|
1308
|
+
updateFrontMatter<K extends keyof T>(key: K, value: BaseFieldValueType<ExtractFieldType<T[K]>>): Promise<this | Error>;
|
|
1283
1309
|
}
|
|
1284
1310
|
|
|
1285
1311
|
/**
|
|
1286
|
-
*
|
|
1312
|
+
* Unknown file entity
|
|
1287
1313
|
*/
|
|
1288
1314
|
declare class DocFileUnknownEntity {
|
|
1289
1315
|
readonly value: DocFileUnknown;
|
|
1290
1316
|
constructor(value: DocFileUnknown);
|
|
1291
1317
|
/**
|
|
1292
|
-
*
|
|
1318
|
+
* Content
|
|
1293
1319
|
*/
|
|
1294
1320
|
get content(): string;
|
|
1295
1321
|
/**
|
|
1296
|
-
*
|
|
1322
|
+
* Path information
|
|
1297
1323
|
*/
|
|
1298
1324
|
get path(): DocFilePath;
|
|
1299
1325
|
/**
|
|
1300
|
-
*
|
|
1326
|
+
* Update content
|
|
1301
1327
|
*/
|
|
1302
1328
|
withContent(content: string): DocFileUnknownEntity;
|
|
1303
1329
|
/**
|
|
1304
|
-
*
|
|
1330
|
+
* Update path
|
|
1305
1331
|
*/
|
|
1306
1332
|
withPath(path: DocFilePath): DocFileUnknownEntity;
|
|
1307
1333
|
toJson(): DocFileUnknown;
|
|
@@ -1311,9 +1337,10 @@ type Props$5 = {
|
|
|
1311
1337
|
path: string;
|
|
1312
1338
|
fileSystem: DocFileSystem;
|
|
1313
1339
|
pathSystem: DocPathSystem;
|
|
1340
|
+
config: DocClientConfig;
|
|
1314
1341
|
};
|
|
1315
1342
|
/**
|
|
1316
|
-
*
|
|
1343
|
+
* File reference
|
|
1317
1344
|
*/
|
|
1318
1345
|
declare class DocFileUnknownReference {
|
|
1319
1346
|
private readonly props;
|
|
@@ -1325,78 +1352,83 @@ declare class DocFileUnknownReference {
|
|
|
1325
1352
|
get directoryPath(): string;
|
|
1326
1353
|
get fileFullPath(): string;
|
|
1327
1354
|
get durectoryPath(): string;
|
|
1328
|
-
directory(): DocDirectoryReference
|
|
1329
|
-
|
|
1355
|
+
directory<T extends DocCustomSchema>(customSchema: T): DocDirectoryReference<T>;
|
|
1356
|
+
directory(): DocDirectoryReference<DocCustomSchema>;
|
|
1357
|
+
read(): Promise<Error | DocFileUnknownEntity>;
|
|
1330
1358
|
/**
|
|
1331
|
-
*
|
|
1359
|
+
* Read file content
|
|
1332
1360
|
*/
|
|
1333
1361
|
readContent(): Promise<Error | string>;
|
|
1334
1362
|
/**
|
|
1335
|
-
*
|
|
1363
|
+
* Write content to file
|
|
1336
1364
|
*/
|
|
1337
1365
|
writeContent(content: string): Promise<void>;
|
|
1338
1366
|
/**
|
|
1339
|
-
*
|
|
1367
|
+
* Write entity
|
|
1340
1368
|
*/
|
|
1341
1369
|
write(entity: DocFileUnknownEntity): Promise<void>;
|
|
1342
1370
|
/**
|
|
1343
|
-
*
|
|
1371
|
+
* Write raw content
|
|
1344
1372
|
*/
|
|
1345
1373
|
writeRaw(content: string): Promise<void>;
|
|
1346
1374
|
/**
|
|
1347
|
-
*
|
|
1375
|
+
* Delete file
|
|
1348
1376
|
*/
|
|
1349
1377
|
delete(): Promise<Error | null>;
|
|
1350
1378
|
/**
|
|
1351
|
-
*
|
|
1379
|
+
* Check if file exists
|
|
1352
1380
|
*/
|
|
1353
1381
|
exists(): Promise<boolean>;
|
|
1354
1382
|
/**
|
|
1355
|
-
*
|
|
1383
|
+
* Copy file
|
|
1356
1384
|
*/
|
|
1357
1385
|
copyTo(destinationPath: string): Promise<void>;
|
|
1358
1386
|
/**
|
|
1359
|
-
*
|
|
1387
|
+
* Move file
|
|
1360
1388
|
*/
|
|
1361
1389
|
moveTo(destinationPath: string): Promise<void>;
|
|
1362
1390
|
/**
|
|
1363
|
-
*
|
|
1391
|
+
* Get file size in bytes
|
|
1364
1392
|
*/
|
|
1365
1393
|
size(): Promise<number>;
|
|
1366
1394
|
/**
|
|
1367
|
-
*
|
|
1395
|
+
* Get file last modified time
|
|
1368
1396
|
*/
|
|
1369
1397
|
lastModified(): Promise<Date>;
|
|
1370
1398
|
/**
|
|
1371
|
-
*
|
|
1399
|
+
* Get file creation time
|
|
1372
1400
|
*/
|
|
1373
1401
|
createdAt(): Promise<Date>;
|
|
1374
1402
|
/**
|
|
1375
|
-
*
|
|
1403
|
+
* Move file to archive and return new reference
|
|
1376
1404
|
*/
|
|
1377
1405
|
archive(archiveDirectoryName?: string): Promise<DocFileUnknownReference>;
|
|
1378
1406
|
/**
|
|
1379
|
-
*
|
|
1407
|
+
* Restore file from archive and return new reference
|
|
1380
1408
|
*/
|
|
1381
1409
|
restore(archiveDirectoryName?: string): Promise<DocFileUnknownReference>;
|
|
1382
1410
|
}
|
|
1383
1411
|
|
|
1384
|
-
type Props$4 = {
|
|
1412
|
+
type Props$4<T extends DocCustomSchema> = {
|
|
1413
|
+
customSchema: T;
|
|
1385
1414
|
path: string;
|
|
1386
1415
|
indexFileName: string;
|
|
1387
1416
|
archiveDirectoryName: string;
|
|
1388
1417
|
fileSystem: DocFileSystem;
|
|
1389
1418
|
pathSystem: DocPathSystem;
|
|
1419
|
+
config: DocClientConfig;
|
|
1390
1420
|
};
|
|
1391
1421
|
/**
|
|
1392
|
-
*
|
|
1422
|
+
* Directory reference
|
|
1393
1423
|
*/
|
|
1394
|
-
declare class DocDirectoryReference {
|
|
1424
|
+
declare class DocDirectoryReference<T extends DocCustomSchema> {
|
|
1395
1425
|
private readonly props;
|
|
1396
1426
|
private readonly pathSystem;
|
|
1397
|
-
|
|
1427
|
+
private readonly customSchema;
|
|
1428
|
+
constructor(props: Props$4<T>);
|
|
1398
1429
|
get fileSystem(): DocFileSystem;
|
|
1399
1430
|
get basePath(): string;
|
|
1431
|
+
get config(): DocClientConfig;
|
|
1400
1432
|
get relativePath(): string;
|
|
1401
1433
|
get absolutePath(): string;
|
|
1402
1434
|
get indexFileName(): string;
|
|
@@ -1404,43 +1436,39 @@ declare class DocDirectoryReference {
|
|
|
1404
1436
|
get archiveDirectoryName(): string;
|
|
1405
1437
|
fileNames(): Promise<string[]>;
|
|
1406
1438
|
archivedFileNames(): Promise<string[]>;
|
|
1407
|
-
filesGenerator(): AsyncGenerator<DocFileMdReference | DocFileUnknownReference, void, unknown>;
|
|
1408
|
-
mdFilesGenerator(): AsyncGenerator<DocFileMdReference
|
|
1409
|
-
files(): Promise<(DocFileMdReference | DocFileUnknownReference)[]>;
|
|
1410
|
-
mdFiles(): Promise<DocFileMdReference[]>;
|
|
1411
|
-
file(fileName: string): DocFileMdReference | DocFileUnknownReference
|
|
1412
|
-
mdFile(fileName: string): DocFileMdReference
|
|
1413
|
-
readFiles(): Promise<(DocFileMdEntity | DocFileUnknownEntity)[]>;
|
|
1414
|
-
readMdFiles(): Promise<DocFileMdEntity[]>;
|
|
1439
|
+
filesGenerator(): AsyncGenerator<DocFileMdReference<T> | DocFileUnknownReference, void, unknown>;
|
|
1440
|
+
mdFilesGenerator(): AsyncGenerator<DocFileMdReference<T>, void, unknown>;
|
|
1441
|
+
files(): Promise<(DocFileMdReference<T> | DocFileUnknownReference)[]>;
|
|
1442
|
+
mdFiles(): Promise<DocFileMdReference<T>[]>;
|
|
1443
|
+
file(fileName: string): Promise<DocFileMdReference<T> | DocFileUnknownReference>;
|
|
1444
|
+
mdFile(fileName: string): Promise<DocFileMdReference<T>>;
|
|
1445
|
+
readFiles(): Promise<(DocFileMdEntity<T> | DocFileUnknownEntity)[]>;
|
|
1446
|
+
readMdFiles(): Promise<DocFileMdEntity<T>[]>;
|
|
1415
1447
|
readUnknownFiles(): Promise<DocFileUnknownEntity[]>;
|
|
1416
1448
|
/**
|
|
1417
|
-
*
|
|
1449
|
+
* Get list of subdirectory names
|
|
1418
1450
|
*/
|
|
1419
1451
|
directoryNames(): Promise<string[]>;
|
|
1420
1452
|
/**
|
|
1421
|
-
*
|
|
1453
|
+
* Get subdirectory references
|
|
1422
1454
|
*/
|
|
1423
|
-
directories(): Promise<DocDirectoryReference[]>;
|
|
1455
|
+
directories(): Promise<DocDirectoryReference<never>[]>;
|
|
1424
1456
|
/**
|
|
1425
|
-
*
|
|
1457
|
+
* Get single subdirectory reference
|
|
1426
1458
|
*/
|
|
1427
|
-
directory(directoryName: string): DocDirectoryReference
|
|
1428
|
-
indexFile(): DocFileIndexReference
|
|
1429
|
-
readIndexFile(): Promise<DocFileIndexEntity
|
|
1430
|
-
writeFile(entity: DocFileIndexEntity |
|
|
1459
|
+
directory(directoryName: string): DocDirectoryReference<T>;
|
|
1460
|
+
indexFile(): DocFileIndexReference<T>;
|
|
1461
|
+
readIndexFile(): Promise<DocFileIndexEntity<T>>;
|
|
1462
|
+
writeFile(entity: DocFileIndexEntity<T> | DocFileMdEntity<T> | DocFileUnknownEntity): Promise<Error | null>;
|
|
1431
1463
|
exists(): Promise<boolean>;
|
|
1432
1464
|
/**
|
|
1433
|
-
*
|
|
1434
|
-
*/
|
|
1435
|
-
private generateUniqueFileName;
|
|
1436
|
-
/**
|
|
1437
|
-
* 指定されたファイル名のファイルが存在するかチェック
|
|
1465
|
+
* Generate unique filename
|
|
1438
1466
|
*/
|
|
1439
|
-
private
|
|
1467
|
+
private uniqueFileName;
|
|
1440
1468
|
/**
|
|
1441
|
-
*
|
|
1469
|
+
* Create new Markdown file
|
|
1442
1470
|
*/
|
|
1443
|
-
createMdFile(fileName?: string): Promise<DocFileMdReference
|
|
1471
|
+
createMdFile(fileName?: string): Promise<DocFileMdReference<T>>;
|
|
1444
1472
|
}
|
|
1445
1473
|
|
|
1446
1474
|
type Props$3 = {
|
|
@@ -1450,7 +1478,7 @@ type Props$3 = {
|
|
|
1450
1478
|
title: string;
|
|
1451
1479
|
};
|
|
1452
1480
|
/**
|
|
1453
|
-
*
|
|
1481
|
+
* Tree file node value object
|
|
1454
1482
|
*/
|
|
1455
1483
|
declare class DocTreeFileNodeValue {
|
|
1456
1484
|
private readonly props;
|
|
@@ -1461,28 +1489,30 @@ declare class DocTreeFileNodeValue {
|
|
|
1461
1489
|
get title(): string;
|
|
1462
1490
|
get type(): "file";
|
|
1463
1491
|
/**
|
|
1464
|
-
*
|
|
1492
|
+
* Convert to plain object
|
|
1465
1493
|
*/
|
|
1466
1494
|
toJson(): DocTreeFileNode;
|
|
1467
1495
|
/**
|
|
1468
|
-
*
|
|
1496
|
+
* Create from properties
|
|
1469
1497
|
*/
|
|
1470
1498
|
static from(props: Props$3): DocTreeFileNodeValue;
|
|
1471
1499
|
/**
|
|
1472
|
-
* JSON
|
|
1500
|
+
* Create from JSON object
|
|
1473
1501
|
*/
|
|
1474
1502
|
static fromJson(json: unknown): DocTreeFileNodeValue;
|
|
1475
1503
|
}
|
|
1476
1504
|
|
|
1505
|
+
type DocTreeNodeValue = DocTreeFileNodeValue | DocTreeDirectoryNodeValue;
|
|
1506
|
+
|
|
1477
1507
|
type Props$2 = {
|
|
1478
1508
|
name: string;
|
|
1479
1509
|
path: string;
|
|
1480
1510
|
icon: string;
|
|
1481
1511
|
title: string;
|
|
1482
|
-
children:
|
|
1512
|
+
children: DocTreeNodeValue[];
|
|
1483
1513
|
};
|
|
1484
1514
|
/**
|
|
1485
|
-
*
|
|
1515
|
+
* Tree directory node value object
|
|
1486
1516
|
*/
|
|
1487
1517
|
declare class DocTreeDirectoryNodeValue {
|
|
1488
1518
|
private readonly props;
|
|
@@ -1491,18 +1521,18 @@ declare class DocTreeDirectoryNodeValue {
|
|
|
1491
1521
|
get path(): string;
|
|
1492
1522
|
get icon(): string;
|
|
1493
1523
|
get title(): string;
|
|
1494
|
-
get children():
|
|
1524
|
+
get children(): DocTreeNodeValue[];
|
|
1495
1525
|
get type(): "directory";
|
|
1496
1526
|
/**
|
|
1497
|
-
*
|
|
1527
|
+
* Convert to plain object
|
|
1498
1528
|
*/
|
|
1499
1529
|
toJson(): DocTreeDirectoryNode;
|
|
1500
1530
|
/**
|
|
1501
|
-
*
|
|
1531
|
+
* Create from properties
|
|
1502
1532
|
*/
|
|
1503
1533
|
static from(props: Props$2): DocTreeDirectoryNodeValue;
|
|
1504
1534
|
/**
|
|
1505
|
-
* JSON
|
|
1535
|
+
* Create from JSON object
|
|
1506
1536
|
*/
|
|
1507
1537
|
static fromJson(json: unknown): DocTreeDirectoryNodeValue;
|
|
1508
1538
|
}
|
|
@@ -1512,83 +1542,85 @@ type Props$1 = {
|
|
|
1512
1542
|
pathSystem: DocPathSystem;
|
|
1513
1543
|
indexFileName: string;
|
|
1514
1544
|
archiveDirectoryName: string;
|
|
1545
|
+
config: DocClientConfig;
|
|
1515
1546
|
};
|
|
1516
1547
|
/**
|
|
1517
|
-
*
|
|
1548
|
+
* File tree building system
|
|
1518
1549
|
*/
|
|
1519
1550
|
declare class DocFileTreeSystem {
|
|
1520
1551
|
private readonly props;
|
|
1552
|
+
private readonly config;
|
|
1521
1553
|
constructor(props: Props$1);
|
|
1522
1554
|
/**
|
|
1523
|
-
*
|
|
1555
|
+
* Build file tree recursively
|
|
1524
1556
|
*/
|
|
1525
|
-
buildFileTree(directoryPath?: string): Promise<
|
|
1557
|
+
buildFileTree(directoryPath?: string): Promise<DocTreeNodeValue[]>;
|
|
1526
1558
|
/**
|
|
1527
|
-
*
|
|
1559
|
+
* Create file node
|
|
1528
1560
|
*/
|
|
1529
1561
|
private createFileNode;
|
|
1530
1562
|
/**
|
|
1531
|
-
*
|
|
1563
|
+
* Create directory node
|
|
1532
1564
|
*/
|
|
1533
1565
|
private createDirectoryNode;
|
|
1534
1566
|
/**
|
|
1535
|
-
*
|
|
1567
|
+
* Create index file reference
|
|
1536
1568
|
*/
|
|
1537
1569
|
private createIndexFileReference;
|
|
1538
1570
|
/**
|
|
1539
|
-
* MD
|
|
1571
|
+
* Create MD file reference
|
|
1540
1572
|
*/
|
|
1541
1573
|
private createMdFileReference;
|
|
1542
1574
|
/**
|
|
1543
|
-
*
|
|
1575
|
+
* Build directory tree recursively (directories only)
|
|
1544
1576
|
*/
|
|
1545
1577
|
buildDirectoryTree(directoryPath?: string): Promise<DocTreeDirectoryNodeValue[]>;
|
|
1546
1578
|
/**
|
|
1547
|
-
*
|
|
1579
|
+
* Create directory node for directory tree
|
|
1548
1580
|
*/
|
|
1549
1581
|
private createDirectoryNodeForTree;
|
|
1550
1582
|
}
|
|
1551
1583
|
|
|
1552
1584
|
/**
|
|
1553
|
-
* Markdown
|
|
1585
|
+
* Markdown parsing and processing system
|
|
1554
1586
|
*/
|
|
1555
1587
|
declare class DocMarkdownSystem {
|
|
1556
1588
|
private readonly frontMatterSeparator;
|
|
1557
1589
|
constructor();
|
|
1558
1590
|
/**
|
|
1559
|
-
* FrontMatter
|
|
1591
|
+
* Detect FrontMatter separator line
|
|
1560
1592
|
*/
|
|
1561
1593
|
private detectFrontMatterSeparator;
|
|
1562
1594
|
/**
|
|
1563
|
-
* FrontMatter
|
|
1595
|
+
* Extract FrontMatter
|
|
1564
1596
|
*/
|
|
1565
1597
|
extractFrontMatter(text: string): string | null;
|
|
1566
1598
|
/**
|
|
1567
|
-
* FrontMatter
|
|
1599
|
+
* Extract body without FrontMatter (includes title and description)
|
|
1568
1600
|
*/
|
|
1569
1601
|
extractBody(text: string): string;
|
|
1570
1602
|
/**
|
|
1571
|
-
*
|
|
1603
|
+
* Extract title
|
|
1572
1604
|
*/
|
|
1573
1605
|
extractTitle(text: string): string | null;
|
|
1574
1606
|
/**
|
|
1575
|
-
*
|
|
1607
|
+
* Extract description (first paragraph after title)
|
|
1576
1608
|
*/
|
|
1577
1609
|
extractDescription(text: string): string | null;
|
|
1578
1610
|
/**
|
|
1579
|
-
* body
|
|
1611
|
+
* Update title in body
|
|
1580
1612
|
*/
|
|
1581
1613
|
updateTitle(text: string, newTitle: string): string;
|
|
1582
1614
|
/**
|
|
1583
|
-
* body
|
|
1615
|
+
* Update description in body
|
|
1584
1616
|
*/
|
|
1585
1617
|
updateDescription(text: string, newDescription: string, defaultTitle: string): string;
|
|
1586
1618
|
/**
|
|
1587
|
-
*
|
|
1619
|
+
* Skip empty lines
|
|
1588
1620
|
*/
|
|
1589
1621
|
private skipEmptyLines;
|
|
1590
1622
|
/**
|
|
1591
|
-
* Markdown
|
|
1623
|
+
* Generate Markdown text (title + description + body)
|
|
1592
1624
|
*/
|
|
1593
1625
|
static from(title: string, description: string, body: string): string;
|
|
1594
1626
|
}
|
|
@@ -1599,327 +1631,169 @@ type Props = {
|
|
|
1599
1631
|
markdownSystem?: DocMarkdownSystem;
|
|
1600
1632
|
fileTreeSystem?: DocFileTreeSystem;
|
|
1601
1633
|
/**
|
|
1602
|
-
*
|
|
1634
|
+
* Configuration
|
|
1603
1635
|
*/
|
|
1604
|
-
|
|
1605
|
-
/**
|
|
1606
|
-
* default: "_"
|
|
1607
|
-
*/
|
|
1608
|
-
archiveDirectoryName?: string;
|
|
1636
|
+
config?: DocClientConfig;
|
|
1609
1637
|
};
|
|
1610
1638
|
declare class DocClient {
|
|
1611
1639
|
readonly fileSystem: DocFileSystem;
|
|
1612
1640
|
readonly pathSystem: DocPathSystem;
|
|
1613
1641
|
readonly markdownSystem: DocMarkdownSystem;
|
|
1614
1642
|
readonly fileTreeSystem: DocFileTreeSystem;
|
|
1615
|
-
readonly
|
|
1616
|
-
readonly archiveDirectoryName: string;
|
|
1643
|
+
readonly config: DocClientConfig;
|
|
1617
1644
|
constructor(props: Props);
|
|
1618
1645
|
basePath(): string;
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
* インデックスファイル参照を取得
|
|
1629
|
-
*/
|
|
1630
|
-
indexFile(directoryPath: string): DocFileIndexReference;
|
|
1631
|
-
/**
|
|
1632
|
-
* ディレクトリ参照を取得
|
|
1633
|
-
*/
|
|
1634
|
-
directory(relativePath: string): DocDirectoryReference;
|
|
1635
|
-
/**
|
|
1636
|
-
* ファイルツリーを取得
|
|
1637
|
-
*/
|
|
1638
|
-
fileTree(directoryPath?: string): Promise<(DocTreeFileNode | DocTreeDirectoryNode)[]>;
|
|
1639
|
-
/**
|
|
1640
|
-
* ディレクトリツリーを取得(ディレクトリのみ)
|
|
1641
|
-
*/
|
|
1646
|
+
file(relativePath: string): DocFileMdReference<DocCustomSchema> | DocFileUnknownReference;
|
|
1647
|
+
file<T extends DocCustomSchema>(relativePath: string, customSchema: T): DocFileMdReference<T> | DocFileUnknownReference;
|
|
1648
|
+
mdFile(relativePath: string): DocFileMdReference<DocCustomSchema>;
|
|
1649
|
+
mdFile<T extends DocCustomSchema>(relativePath: string, customSchema: T): DocFileMdReference<T>;
|
|
1650
|
+
indexFile(relativePath: string): DocFileIndexReference<DocCustomSchema>;
|
|
1651
|
+
indexFile<T extends DocCustomSchema>(relativePath: string, customSchema: T): DocFileIndexReference<T>;
|
|
1652
|
+
directory(relativePath: string): DocDirectoryReference<DocCustomSchema>;
|
|
1653
|
+
directory<T extends DocCustomSchema>(relativePath: string, customSchema: T): DocDirectoryReference<T>;
|
|
1654
|
+
fileTree(directoryPath?: string): Promise<DocTreeNode[]>;
|
|
1642
1655
|
directoryTree(directoryPath?: string): Promise<DocTreeDirectoryNode[]>;
|
|
1643
1656
|
}
|
|
1644
1657
|
|
|
1645
1658
|
/**
|
|
1646
|
-
*
|
|
1647
|
-
*/
|
|
1648
|
-
declare class DocContentMdFrontMatterValue {
|
|
1649
|
-
readonly data: Record<string, unknown> | null;
|
|
1650
|
-
readonly yamlText: string;
|
|
1651
|
-
constructor(data: Record<string, unknown> | null, yamlText?: string);
|
|
1652
|
-
/**
|
|
1653
|
-
* YAMLテキストからフロントマターインスタンスを作成
|
|
1654
|
-
*/
|
|
1655
|
-
static fromYamlText(yamlText: string): DocContentMdFrontMatterValue;
|
|
1656
|
-
/**
|
|
1657
|
-
* Markdownテキストからフロントマターインスタンスを作成
|
|
1658
|
-
*/
|
|
1659
|
-
static fromMarkdown(markdownText: string): DocContentMdFrontMatterValue;
|
|
1660
|
-
/**
|
|
1661
|
-
* 空のフロントマターインスタンスを作成
|
|
1662
|
-
*/
|
|
1663
|
-
static empty(): DocContentMdFrontMatterValue;
|
|
1664
|
-
/**
|
|
1665
|
-
* フロントマターデータからインスタンスを作成
|
|
1666
|
-
*/
|
|
1667
|
-
static fromFrontMatter(data: Record<string, unknown>): DocContentMdFrontMatterValue;
|
|
1668
|
-
/**
|
|
1669
|
-
* フロントマターをYAMLテキストに変換
|
|
1670
|
-
*/
|
|
1671
|
-
frontMatterText(): string;
|
|
1672
|
-
/**
|
|
1673
|
-
* フロントマターを更新した新しいインスタンスを作成
|
|
1674
|
-
*/
|
|
1675
|
-
update(draft: Record<string, unknown>): DocContentMdFrontMatterValue;
|
|
1676
|
-
/**
|
|
1677
|
-
* フロントマターが空かどうか
|
|
1678
|
-
*/
|
|
1679
|
-
isEmpty(): boolean;
|
|
1680
|
-
/**
|
|
1681
|
-
* 指定したキーの値を取得
|
|
1682
|
-
*/
|
|
1683
|
-
get(key: string): unknown;
|
|
1684
|
-
/**
|
|
1685
|
-
* 指定したキーが存在するか
|
|
1686
|
-
*/
|
|
1687
|
-
has(key: string): boolean;
|
|
1688
|
-
/**
|
|
1689
|
-
* フロントマターのキー一覧を取得
|
|
1690
|
-
*/
|
|
1691
|
-
keys(): string[];
|
|
1692
|
-
}
|
|
1693
|
-
|
|
1694
|
-
/**
|
|
1695
|
-
* Markdownの解析と生成
|
|
1696
|
-
*/
|
|
1697
|
-
declare class DocContentMdValue {
|
|
1698
|
-
readonly text: string;
|
|
1699
|
-
constructor(text: string);
|
|
1700
|
-
/**
|
|
1701
|
-
* Front Matter
|
|
1702
|
-
*/
|
|
1703
|
-
get frontMatter(): DocContentMdFrontMatterValue;
|
|
1704
|
-
/**
|
|
1705
|
-
* body
|
|
1706
|
-
*/
|
|
1707
|
-
get content(): string;
|
|
1708
|
-
/**
|
|
1709
|
-
* title
|
|
1710
|
-
*/
|
|
1711
|
-
get title(): string;
|
|
1712
|
-
/**
|
|
1713
|
-
* H1の次の段落、またはH1がない場合は最初の段落をdescriptionとして取得する
|
|
1714
|
-
*/
|
|
1715
|
-
get description(): string | null;
|
|
1716
|
-
/**
|
|
1717
|
-
* 新しいフロントマターとコンテンツでMarkdownインスタンスを作成
|
|
1718
|
-
*/
|
|
1719
|
-
static fromProps(props: {
|
|
1720
|
-
frontMatter: Record<string, unknown>;
|
|
1721
|
-
content: string;
|
|
1722
|
-
}): DocContentMdValue;
|
|
1723
|
-
/**
|
|
1724
|
-
* 現在のフロントマターをYAMLテキストに変換する
|
|
1725
|
-
*/
|
|
1726
|
-
frontMatterToText(): string;
|
|
1727
|
-
/**
|
|
1728
|
-
* 現在のフロントマターを更新して新しいMarkdownテキストを生成
|
|
1729
|
-
*/
|
|
1730
|
-
updateFrontMatter(draft: Record<string, unknown>): string;
|
|
1731
|
-
/**
|
|
1732
|
-
* 新しいフロントマターでOpenMarkdownインスタンスを作成
|
|
1733
|
-
*/
|
|
1734
|
-
withFrontMatter(frontMatter: Record<string, unknown>): DocContentMdValue;
|
|
1735
|
-
/**
|
|
1736
|
-
* フロントマターを更新した新しいOpenMarkdownインスタンスを作成
|
|
1737
|
-
*/
|
|
1738
|
-
withUpdatedFrontMatter(draft: Record<string, unknown>): DocContentMdValue;
|
|
1739
|
-
/**
|
|
1740
|
-
* マークダウンをtitle、description、本文の3つの部分に分離する
|
|
1741
|
-
*/
|
|
1742
|
-
private parseContentParts;
|
|
1743
|
-
/**
|
|
1744
|
-
* title、description、本文からマークダウンを構築する
|
|
1745
|
-
*/
|
|
1746
|
-
private buildContent;
|
|
1747
|
-
/**
|
|
1748
|
-
* H1タイトルを更新した新しいOpenMarkdownインスタンスを作成
|
|
1749
|
-
*/
|
|
1750
|
-
withTitle(newTitle: string): DocContentMdValue;
|
|
1751
|
-
/**
|
|
1752
|
-
* H1の次のdescription段落を更新した新しいOpenMarkdownインスタンスを作成
|
|
1753
|
-
* @param newDescription 新しいdescription
|
|
1754
|
-
* @param defaultTitle H1がない場合に使用するデフォルトタイトル
|
|
1755
|
-
*/
|
|
1756
|
-
withDescription(newDescription: string, defaultTitle?: string): DocContentMdValue;
|
|
1757
|
-
}
|
|
1758
|
-
|
|
1759
|
-
/**
|
|
1760
|
-
* ファイルパス情報の値オブジェクト
|
|
1659
|
+
* Value object for file path information
|
|
1761
1660
|
*/
|
|
1762
1661
|
declare class DocFilePathValue {
|
|
1763
1662
|
readonly value: DocFilePath;
|
|
1764
1663
|
private readonly pathSystem;
|
|
1765
1664
|
constructor(value: DocFilePath, pathSystem: DocPathSystem);
|
|
1766
1665
|
/**
|
|
1767
|
-
*
|
|
1666
|
+
* File name without extension
|
|
1768
1667
|
*/
|
|
1769
1668
|
get name(): string;
|
|
1770
1669
|
/**
|
|
1771
|
-
*
|
|
1670
|
+
* File path (relative path)
|
|
1772
1671
|
*/
|
|
1773
1672
|
get path(): string;
|
|
1774
1673
|
/**
|
|
1775
|
-
*
|
|
1674
|
+
* File name with extension
|
|
1776
1675
|
*/
|
|
1777
1676
|
get nameWithExtension(): string;
|
|
1778
1677
|
/**
|
|
1779
|
-
*
|
|
1678
|
+
* Full path (absolute path)
|
|
1780
1679
|
*/
|
|
1781
1680
|
get fullPath(): string;
|
|
1782
1681
|
/**
|
|
1783
|
-
*
|
|
1682
|
+
* Directory path
|
|
1784
1683
|
*/
|
|
1785
1684
|
get directoryPath(): string;
|
|
1786
1685
|
/**
|
|
1787
|
-
*
|
|
1686
|
+
* Extension
|
|
1788
1687
|
*/
|
|
1789
1688
|
get extension(): string;
|
|
1790
1689
|
/**
|
|
1791
|
-
*
|
|
1690
|
+
* Whether the file is archived
|
|
1792
1691
|
*/
|
|
1793
1692
|
get isArchived(): boolean;
|
|
1794
1693
|
/**
|
|
1795
|
-
*
|
|
1694
|
+
* Create instance from relative path (DI support)
|
|
1796
1695
|
*/
|
|
1797
1696
|
static fromPathWithSystem(filePath: string, pathSystem: DocPathSystem, basePath?: string): DocFilePathValue;
|
|
1798
1697
|
/**
|
|
1799
|
-
* JSON
|
|
1698
|
+
* Export as JSON format
|
|
1800
1699
|
*/
|
|
1801
1700
|
toJson(): DocFilePath;
|
|
1802
1701
|
}
|
|
1803
1702
|
|
|
1804
|
-
type
|
|
1703
|
+
type Value = {
|
|
1805
1704
|
path: string;
|
|
1806
1705
|
name: string;
|
|
1807
1706
|
fullPath: string;
|
|
1808
1707
|
};
|
|
1809
1708
|
/**
|
|
1810
|
-
*
|
|
1709
|
+
* Value object representing a directory path
|
|
1811
1710
|
*/
|
|
1812
1711
|
declare class DocDirectoryPathValue {
|
|
1813
1712
|
private readonly value;
|
|
1814
1713
|
private readonly pathSystem;
|
|
1815
|
-
constructor(value:
|
|
1714
|
+
constructor(value: Value, pathSystem: DocPathSystem);
|
|
1816
1715
|
/**
|
|
1817
|
-
*
|
|
1716
|
+
* Relative directory path
|
|
1818
1717
|
*/
|
|
1819
1718
|
get path(): string;
|
|
1820
1719
|
/**
|
|
1821
|
-
*
|
|
1720
|
+
* Directory name
|
|
1822
1721
|
*/
|
|
1823
1722
|
get name(): string;
|
|
1824
1723
|
/**
|
|
1825
|
-
*
|
|
1724
|
+
* Get parent directory path
|
|
1826
1725
|
*/
|
|
1827
1726
|
get parent(): DocDirectoryPathValue | null;
|
|
1828
1727
|
/**
|
|
1829
|
-
*
|
|
1728
|
+
* Parent directory path
|
|
1830
1729
|
*/
|
|
1831
1730
|
get parentPath(): string;
|
|
1832
1731
|
/**
|
|
1833
|
-
*
|
|
1732
|
+
* Depth (number of directory levels)
|
|
1834
1733
|
*/
|
|
1835
1734
|
get depth(): number;
|
|
1836
1735
|
/**
|
|
1837
|
-
*
|
|
1736
|
+
* Path segments (array of directories)
|
|
1838
1737
|
*/
|
|
1839
1738
|
get segments(): string[];
|
|
1840
1739
|
/**
|
|
1841
|
-
*
|
|
1740
|
+
* Relative path from root (without leading slash)
|
|
1842
1741
|
*/
|
|
1843
1742
|
get normalizedPath(): string;
|
|
1844
1743
|
/**
|
|
1845
|
-
*
|
|
1744
|
+
* Whether this is an archive directory (directory name is "_")
|
|
1846
1745
|
*/
|
|
1847
1746
|
get isArchived(): boolean;
|
|
1848
1747
|
/**
|
|
1849
|
-
*
|
|
1748
|
+
* Whether this is a hidden directory
|
|
1850
1749
|
*/
|
|
1851
1750
|
get isHidden(): boolean;
|
|
1852
1751
|
/**
|
|
1853
|
-
*
|
|
1752
|
+
* Whether this is the root directory
|
|
1854
1753
|
*/
|
|
1855
1754
|
get isRoot(): boolean;
|
|
1856
1755
|
/**
|
|
1857
|
-
*
|
|
1756
|
+
* Absolute path
|
|
1858
1757
|
*/
|
|
1859
1758
|
get fullPath(): string;
|
|
1860
1759
|
/**
|
|
1861
|
-
*
|
|
1760
|
+
* Get index file path
|
|
1862
1761
|
*/
|
|
1863
1762
|
get indexFile(): DocFilePathValue;
|
|
1864
1763
|
/**
|
|
1865
|
-
*
|
|
1764
|
+
* Create file path
|
|
1866
1765
|
*/
|
|
1867
1766
|
file(fileName: string): DocFilePathValue;
|
|
1868
1767
|
/**
|
|
1869
|
-
*
|
|
1768
|
+
* Create subdirectory path
|
|
1870
1769
|
*/
|
|
1871
1770
|
subdirectory(dirName: string): DocDirectoryPathValue;
|
|
1872
1771
|
/**
|
|
1873
|
-
*
|
|
1772
|
+
* Create instance from relative path (DI support)
|
|
1874
1773
|
*/
|
|
1875
1774
|
static fromPathWithSystem(dirPath: string, basePath: string, pathSystem: DocPathSystem): DocDirectoryPathValue;
|
|
1876
1775
|
/**
|
|
1877
|
-
* JSON
|
|
1776
|
+
* Export as JSON format
|
|
1878
1777
|
*/
|
|
1879
|
-
toJson():
|
|
1778
|
+
toJson(): Value;
|
|
1880
1779
|
/**
|
|
1881
|
-
*
|
|
1780
|
+
* Check if paths are equal
|
|
1882
1781
|
*/
|
|
1883
1782
|
equals(other: DocDirectoryPathValue): boolean;
|
|
1884
1783
|
/**
|
|
1885
|
-
*
|
|
1784
|
+
* Check if specified directory is a descendant of this directory
|
|
1886
1785
|
*/
|
|
1887
1786
|
contains(other: DocDirectoryPathValue): boolean;
|
|
1888
1787
|
}
|
|
1889
1788
|
|
|
1890
1789
|
/**
|
|
1891
|
-
*
|
|
1790
|
+
* Multiple value type fields (multi-* types)
|
|
1892
1791
|
*/
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
|
|
1899
|
-
/**
|
|
1900
|
-
* 未検証のデータから正規化して生成
|
|
1901
|
-
*/
|
|
1902
|
-
fromUnknown(key: string, data: unknown): DocSchemaFieldValue;
|
|
1903
|
-
/**
|
|
1904
|
-
* フィールド定義を正規化
|
|
1905
|
-
*/
|
|
1906
|
-
private normalizeField;
|
|
1907
|
-
/**
|
|
1908
|
-
* デフォルトのテキストフィールドを作成
|
|
1909
|
-
*/
|
|
1910
|
-
private createDefaultTextField;
|
|
1911
|
-
/**
|
|
1912
|
-
* 型名を正規化
|
|
1913
|
-
*/
|
|
1914
|
-
private normalizeType;
|
|
1915
|
-
/**
|
|
1916
|
-
* オブジェクトからプロパティを安全に取得
|
|
1917
|
-
*/
|
|
1918
|
-
private getFieldProperty;
|
|
1919
|
-
/**
|
|
1920
|
-
* 型固有のデフォルト値を取得(イミュータブル)
|
|
1921
|
-
*/
|
|
1922
|
-
private getTypeSpecificDefaults;
|
|
1923
|
-
}
|
|
1792
|
+
type DocSchemaFieldMultipleTypes<T extends RecordKey> = DocSchemaFieldMultiTextValue<T> | DocSchemaFieldMultiNumberValue<T> | DocSchemaFieldMultiSelectTextValue<T> | DocSchemaFieldMultiSelectNumberValue<T> | DocSchemaFieldMultiRelationValue<T>;
|
|
1793
|
+
/**
|
|
1794
|
+
* Single value type fields
|
|
1795
|
+
*/
|
|
1796
|
+
type DocSchemaFieldSingleTypes<T extends RecordKey> = DocSchemaFieldTextSingleValue<T> | DocSchemaFieldNumberSingleValue<T> | DocSchemaFieldBooleanSingleValue<T> | DocSchemaFieldSelectTextSingleValue<T> | DocSchemaFieldSelectNumberSingleValue<T> | DocSchemaFieldRelationSingleValue<T>;
|
|
1797
|
+
type DocSchemaFieldValue<T extends RecordKey> = DocSchemaFieldSingleTypes<T> | DocSchemaFieldMultipleTypes<T>;
|
|
1924
1798
|
|
|
1925
|
-
export { DocClient,
|
|
1799
|
+
export { type BaseFieldValueType, DocClient, type DocClientConfig, type DocClientConfigInput, type DocCustomSchema, type DocCustomSchemaField, type DocCustomSchemaFieldBoolean, type DocCustomSchemaFieldMultiNumber, type DocCustomSchemaFieldMultiRelation, type DocCustomSchemaFieldMultiSelectNumber, type DocCustomSchemaFieldMultiSelectText, type DocCustomSchemaFieldMultiText, type DocCustomSchemaFieldNumber, type DocCustomSchemaFieldRelation, type DocCustomSchemaFieldSelectNumber, type DocCustomSchemaFieldSelectText, type DocCustomSchemaFieldText, type DocDirectory, DocDirectoryPathValue, DocDirectoryReference, type DocFieldMultiNumber, type DocFieldMultiRelation, type DocFieldMultiText, type DocFile, type DocFileIndex, type DocFileIndexContent, DocFileIndexContentValue, DocFileIndexEntity, type DocFileIndexMeta, DocFileIndexMetaValue, DocFileIndexReference, type DocFileIndexSchema, type DocFileIndexSchemaField, DocFileIndexSchemaValue, type DocFileMd, type DocFileMdContent, DocFileMdContentValue, DocFileMdEntity, type DocFileMdMeta, DocFileMdMetaValue, DocFileMdReference, type DocFileNode, type DocFilePath, DocFilePathValue, DocFileRelationReference, DocFileSystem, type DocFileUnknown, DocFileUnknownEntity, DocFileUnknownReference, DocMarkdownSystem, type DocMetaField, type DocMetaFieldBoolean, type DocMetaFieldMultiBoolean, type DocMetaFieldMultiNumber, type DocMetaFieldMultiRelation, type DocMetaFieldMultiSelectNumber, type DocMetaFieldMultiSelectText, type DocMetaFieldMultiText, type DocMetaFieldNumber, type DocMetaFieldRelation, type DocMetaFieldSelectNumber, type DocMetaFieldSelectText, type DocMetaFieldText, type DocMetaFieldType, type DocMetaFieldTypeBoolean, type DocMetaFieldTypeNumber, type DocMetaFieldTypeRelation, type DocMetaFieldTypeSelectNumber, type DocMetaFieldTypeSelectText, type DocMetaFieldTypeText, DocPathSystem, type DocRelation, type DocRelationField, type DocRelationFile, DocRelationFileValue, DocRelationValue, type DocSchemaFieldBoolean, DocSchemaFieldBooleanSingleValue, type DocSchemaFieldMultiSelectNumber, type DocSchemaFieldMultiSelectText, type DocSchemaFieldNumber, DocSchemaFieldMultiNumberValue as DocSchemaFieldNumberMultipleValue, DocSchemaFieldNumberSingleValue, type DocSchemaFieldRelation, DocSchemaFieldMultiRelationValue as DocSchemaFieldRelationMultipleValue, DocSchemaFieldRelationSingleValue, type DocSchemaFieldSelectNumber, DocSchemaFieldMultiSelectNumberValue as DocSchemaFieldSelectNumberMultipleValue, DocSchemaFieldSelectNumberSingleValue, type DocSchemaFieldSelectText, DocSchemaFieldMultiSelectTextValue as DocSchemaFieldSelectTextMultipleValue, DocSchemaFieldSelectTextSingleValue, type DocSchemaFieldText, DocSchemaFieldMultiTextValue as DocSchemaFieldTextMultipleValue, DocSchemaFieldTextSingleValue, type DocSchemaFieldTypeBoolean, type DocSchemaFieldTypeMultiNumber, type DocSchemaFieldTypeMultiRelation, type DocSchemaFieldTypeMultiSelectNumber, type DocSchemaFieldTypeMultiSelectText, type DocSchemaFieldTypeMultiText, type DocSchemaFieldTypeNumber, type DocSchemaFieldTypeRelation, type DocSchemaFieldTypeSelectNumber, type DocSchemaFieldTypeSelectText, type DocSchemaFieldTypeText, type DocSchemaFieldValue, type DocSchemaRelationFieldUnion, type DocTreeDirectoryNode, DocTreeDirectoryNodeValue, type DocTreeFileNode, DocTreeFileNodeValue, type DocTreeNode, type Equals, type ExtractFieldType, type ExtractIndexFieldType, type ExtractRequired, type FieldValueType, DocFileTreeSystem as FileTreeSystem, type GetIndexFieldType, type GetIndexFieldValueType, type GetValueType, type MultiRelationKeys, type OptionalKeys, type RecordKey, type RelationKeys, type RequiredKeys, type SchemaToValueType, zDocClientConfig, zDocCustomSchemaField, zDocCustomSchemaFieldBoolean, zDocCustomSchemaFieldMultiNumber, zDocCustomSchemaFieldMultiRelation, zDocCustomSchemaFieldMultiSelectNumber, zDocCustomSchemaFieldMultiSelectText, zDocCustomSchemaFieldMultiText, zDocCustomSchemaFieldNumber, zDocCustomSchemaFieldRelation, zDocCustomSchemaFieldSelectNumber, zDocCustomSchemaFieldSelectText, zDocCustomSchemaFieldText, zDocFileIndexSchemaField, zDocFilePath, zDocFileUnknown, zDocMetaField, zDocMetaFieldBoolean, zDocMetaFieldMultiBoolean, zDocMetaFieldMultiNumber, zDocMetaFieldMultiRelation, zDocMetaFieldMultiSelectNumber, zDocMetaFieldMultiSelectText, zDocMetaFieldMultiText, zDocMetaFieldNumber, zDocMetaFieldRelation, zDocMetaFieldSelectNumber, zDocMetaFieldSelectText, zDocMetaFieldText, zDocMetaFieldType, zDocMetaFieldTypeBoolean, zDocMetaFieldTypeNumber, zDocMetaFieldTypeRelation, zDocMetaFieldTypeSelectNumber, zDocMetaFieldTypeSelectText, zDocMetaFieldTypeText, zDocRelation, zDocRelationField, zDocRelationFile, zDocSchemaFieldBoolean, zDocSchemaFieldMultiNumber, zDocSchemaFieldMultiRelation, zDocSchemaFieldMultiSelectNumber, zDocSchemaFieldMultiSelectText, zDocSchemaFieldMultiText, zDocSchemaFieldNumber, zDocSchemaFieldRelation, zDocSchemaFieldSelectNumber, zDocSchemaFieldSelectText, zDocSchemaFieldText };
|