@interactive-inc/docs-client 1.0.13 → 1.0.15
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 +105 -103
- package/build/index.js +44 -23
- package/build/models.d.ts +10 -11
- package/build/models.js +1 -5
- package/package.json +1 -1
package/build/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { zDocFileMd, zDocFileUnknown, zDocClientConfig, zDocFilePath, zDocFileIndexSchemaField, zDocSchemaFieldText, zDocSchemaFieldNumber, zDocSchemaFieldBoolean, zDocSchemaFieldRelation, zDocSchemaFieldSelectText, zDocSchemaFieldSelectNumber, zDocSchemaFieldMultiText, zDocSchemaFieldMultiNumber, zDocSchemaFieldMultiRelation, zDocSchemaFieldMultiSelectText, zDocSchemaFieldMultiSelectNumber, zDocRelation, zDocRelationFile, zDocMetaFieldRelation, zDocMetaFieldMultiRelation, zDocMetaFieldText, zDocMetaFieldNumber, zDocMetaFieldBoolean, zDocMetaFieldMultiText, zDocMetaFieldMultiNumber,
|
|
2
|
+
import { zDocFileMd, zDocFileUnknown, zDocClientConfig, zDocFilePath, zDocFileIndexSchemaField, zDocSchemaFieldText, zDocSchemaFieldNumber, zDocSchemaFieldBoolean, zDocSchemaFieldRelation, zDocSchemaFieldSelectText, zDocSchemaFieldSelectNumber, zDocSchemaFieldMultiText, zDocSchemaFieldMultiNumber, zDocSchemaFieldMultiRelation, zDocSchemaFieldMultiSelectText, zDocSchemaFieldMultiSelectNumber, zDocFileIndex, zDocRelation, zDocRelationFile, zDocMetaFieldRelation, zDocMetaFieldMultiRelation, zDocMetaFieldText, zDocMetaFieldNumber, zDocMetaFieldBoolean, zDocMetaFieldMultiText, zDocMetaFieldMultiNumber, zDocRelationField, zDocMetaField, zDocMetaFieldSelectText, zDocMetaFieldSelectNumber, zDocMetaFieldMultiSelectText, zDocMetaFieldMultiSelectNumber, zDocMetaFieldTypeText, zDocMetaFieldTypeNumber, zDocMetaFieldTypeBoolean, zDocMetaFieldTypeSelectText, zDocMetaFieldTypeSelectNumber, zDocMetaFieldTypeRelation, zDocMetaFieldType } from './models.js';
|
|
3
3
|
export { zDocCustomSchema, zDocCustomSchemaField, zDocCustomSchemaFieldBoolean, zDocCustomSchemaFieldMultiNumber, zDocCustomSchemaFieldMultiRelation, zDocCustomSchemaFieldMultiSelectNumber, zDocCustomSchemaFieldMultiSelectText, zDocCustomSchemaFieldMultiText, zDocCustomSchemaFieldNumber, zDocCustomSchemaFieldRelation, zDocCustomSchemaFieldSelectNumber, zDocCustomSchemaFieldSelectText, zDocCustomSchemaFieldText, zDocFile, zDocFileDirectory, zDocFileIndexContent, zDocFileIndexMeta, zDocFileIndexMetaInput, zDocFileIndexSchema, zDocFileIndexSchemaInput, zDocFileMdContent, zDocFileMdContentInput, zDocFileMdInput, zDocFileMdMeta, zDocFileMdMetaInput, zDocMetaFieldTypeMultiNumber, zDocMetaFieldTypeMultiRelation, zDocMetaFieldTypeMultiSelectNumber, zDocMetaFieldTypeMultiSelectText, zDocMetaFieldTypeMultiText, zDocTreeDirectoryNode, zDocTreeFileNode, zDocTreeNode } from './models.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -142,7 +142,7 @@ declare class DocFileSystem {
|
|
|
142
142
|
/**
|
|
143
143
|
* Meta
|
|
144
144
|
*/
|
|
145
|
-
declare class DocFileMdMetaValue<T extends
|
|
145
|
+
declare class DocFileMdMetaValue<T extends DocCustomSchema> {
|
|
146
146
|
readonly value: SchemaToValueType<T>;
|
|
147
147
|
readonly customSchema: T;
|
|
148
148
|
constructor(value: SchemaToValueType<T>, customSchema: T);
|
|
@@ -160,7 +160,6 @@ declare class DocFileMdMetaValue<T extends DocCustomSchemaGenerics> {
|
|
|
160
160
|
boolean(key: keyof T): DocMetaFieldBoolean;
|
|
161
161
|
multiText(key: keyof T): DocMetaFieldMultiText;
|
|
162
162
|
multiNumber(key: keyof T): DocMetaFieldMultiNumber;
|
|
163
|
-
multiBoolean(key: keyof T): DocMetaFieldMultiBoolean;
|
|
164
163
|
hasKey(key: keyof T): boolean;
|
|
165
164
|
toJson(): SchemaToValueType<T>;
|
|
166
165
|
toYaml(): string;
|
|
@@ -169,17 +168,17 @@ declare class DocFileMdMetaValue<T extends DocCustomSchemaGenerics> {
|
|
|
169
168
|
/**
|
|
170
169
|
* Generate from Markdown text
|
|
171
170
|
*/
|
|
172
|
-
static fromYamlText<T extends
|
|
173
|
-
static empty<T extends
|
|
171
|
+
static fromYamlText<T extends DocCustomSchema>(yamlText: string, customSchema: T): DocFileMdMetaValue<T>;
|
|
172
|
+
static empty<T extends DocCustomSchema>(customSchema: T): DocFileMdMetaValue<T>;
|
|
174
173
|
}
|
|
175
174
|
|
|
176
175
|
/**
|
|
177
176
|
* File: Markdown > Content
|
|
178
177
|
*/
|
|
179
|
-
declare class DocFileMdContentValue<T extends
|
|
180
|
-
readonly value:
|
|
178
|
+
declare class DocFileMdContentValue<T extends DocCustomSchema> {
|
|
179
|
+
readonly value: DocFileMdContent<T>;
|
|
181
180
|
private readonly customSchema;
|
|
182
|
-
constructor(value:
|
|
181
|
+
constructor(value: DocFileMdContent<T>, customSchema: T);
|
|
183
182
|
/**
|
|
184
183
|
* Content body (does not include frontMatter)
|
|
185
184
|
*/
|
|
@@ -211,7 +210,7 @@ declare class DocFileMdContentValue<T extends DocCustomSchemaGenerics> {
|
|
|
211
210
|
/**
|
|
212
211
|
* Update FrontMatter
|
|
213
212
|
*/
|
|
214
|
-
withMeta<U extends
|
|
213
|
+
withMeta<U extends DocCustomSchema>(meta: DocFileMdMetaValue<U>): DocFileMdContentValue<U>;
|
|
215
214
|
/**
|
|
216
215
|
* Update specific property of FrontMatter
|
|
217
216
|
*/
|
|
@@ -219,7 +218,7 @@ declare class DocFileMdContentValue<T extends DocCustomSchemaGenerics> {
|
|
|
219
218
|
/**
|
|
220
219
|
* Generate from Markdown text
|
|
221
220
|
*/
|
|
222
|
-
static fromMarkdown<T extends
|
|
221
|
+
static fromMarkdown<T extends DocCustomSchema>(markdown: string, customSchema: T): DocFileMdContentValue<T>;
|
|
223
222
|
/**
|
|
224
223
|
* Generate complete Markdown text
|
|
225
224
|
*/
|
|
@@ -231,20 +230,20 @@ declare class DocFileMdContentValue<T extends DocCustomSchemaGenerics> {
|
|
|
231
230
|
/**
|
|
232
231
|
* Generate empty content
|
|
233
232
|
*/
|
|
234
|
-
static empty<T extends
|
|
233
|
+
static empty<T extends DocCustomSchema = DocCustomSchema>(title: string, customSchema: T): DocFileMdContentValue<T>;
|
|
235
234
|
/**
|
|
236
235
|
* Output in JSON format
|
|
237
236
|
*/
|
|
238
|
-
toJson():
|
|
237
|
+
toJson(): DocFileMdContent<T>;
|
|
239
238
|
}
|
|
240
239
|
|
|
241
240
|
/**
|
|
242
241
|
* Markdown file entity
|
|
243
242
|
*/
|
|
244
|
-
declare class DocFileMdEntity<T extends
|
|
245
|
-
readonly value:
|
|
243
|
+
declare class DocFileMdEntity<T extends DocCustomSchema> {
|
|
244
|
+
readonly value: DocFileMd<T>;
|
|
246
245
|
private readonly customSchema;
|
|
247
|
-
constructor(value:
|
|
246
|
+
constructor(value: DocFileMd<T>, customSchema: T);
|
|
248
247
|
/**
|
|
249
248
|
* Content
|
|
250
249
|
*/
|
|
@@ -270,7 +269,7 @@ declare class DocFileMdEntity<T extends DocCustomSchemaGenerics> {
|
|
|
270
269
|
toJson(): z.infer<typeof zDocFileMd>;
|
|
271
270
|
}
|
|
272
271
|
|
|
273
|
-
type Props$8<T extends
|
|
272
|
+
type Props$8<T extends DocCustomSchema> = {
|
|
274
273
|
path: string;
|
|
275
274
|
fileSystem: DocFileSystem;
|
|
276
275
|
pathSystem: DocPathSystem;
|
|
@@ -280,7 +279,7 @@ type Props$8<T extends DocCustomSchemaGenerics> = {
|
|
|
280
279
|
/**
|
|
281
280
|
* File reference
|
|
282
281
|
*/
|
|
283
|
-
declare class DocFileMdReference<T extends
|
|
282
|
+
declare class DocFileMdReference<T extends DocCustomSchema> {
|
|
284
283
|
private readonly props;
|
|
285
284
|
private readonly pathSystem;
|
|
286
285
|
private readonly customSchema;
|
|
@@ -348,7 +347,7 @@ declare class DocFileMdReference<T extends DocCustomSchemaGenerics> {
|
|
|
348
347
|
/**
|
|
349
348
|
* Get relation based on schema
|
|
350
349
|
*/
|
|
351
|
-
relation<U extends
|
|
350
|
+
relation<U extends DocCustomSchema = DocCustomSchema>(key: RelationKeys<T>, targetSchema?: U): Promise<DocFileMdReference<U> | Error | null>;
|
|
352
351
|
/**
|
|
353
352
|
* Get index.md in the same directory
|
|
354
353
|
*/
|
|
@@ -356,7 +355,7 @@ declare class DocFileMdReference<T extends DocCustomSchemaGenerics> {
|
|
|
356
355
|
/**
|
|
357
356
|
* Get multiple relations based on schema
|
|
358
357
|
*/
|
|
359
|
-
relations<U extends
|
|
358
|
+
relations<U extends DocCustomSchema = DocCustomSchema>(key: MultiRelationKeys<T>, customSchema?: U): Promise<DocFileMdReference<U>[]>;
|
|
360
359
|
/**
|
|
361
360
|
* File: Markdown > FrontMatter
|
|
362
361
|
*/
|
|
@@ -392,27 +391,27 @@ declare class DocFileUnknownEntity {
|
|
|
392
391
|
toJson(): z.infer<typeof zDocFileUnknown>;
|
|
393
392
|
}
|
|
394
393
|
|
|
395
|
-
type Props$7 = {
|
|
394
|
+
type Props$7<T extends DocCustomSchema> = {
|
|
396
395
|
path: string;
|
|
397
396
|
fileSystem: DocFileSystem;
|
|
398
397
|
pathSystem: DocPathSystem;
|
|
398
|
+
customSchema: T;
|
|
399
399
|
config: DocClientConfig;
|
|
400
400
|
};
|
|
401
401
|
/**
|
|
402
402
|
* File reference
|
|
403
403
|
*/
|
|
404
|
-
declare class DocFileUnknownReference {
|
|
404
|
+
declare class DocFileUnknownReference<T extends DocCustomSchema> {
|
|
405
405
|
private readonly props;
|
|
406
406
|
private readonly pathSystem;
|
|
407
|
-
|
|
407
|
+
private readonly customSchema;
|
|
408
|
+
constructor(props: Props$7<T>);
|
|
408
409
|
get fileSystem(): DocFileSystem;
|
|
409
410
|
get basePath(): string;
|
|
410
411
|
get path(): string;
|
|
411
412
|
get directoryPath(): string;
|
|
412
413
|
get fileFullPath(): string;
|
|
413
|
-
|
|
414
|
-
directory<T extends DocCustomSchemaGenerics>(customSchema: T): DocDirectoryReference<T>;
|
|
415
|
-
directory(): DocDirectoryReference<DocCustomSchemaGenerics>;
|
|
414
|
+
directory(): DocDirectoryReference<T>;
|
|
416
415
|
read(): Promise<Error | DocFileUnknownEntity>;
|
|
417
416
|
/**
|
|
418
417
|
* Read file content
|
|
@@ -465,11 +464,11 @@ declare class DocFileUnknownReference {
|
|
|
465
464
|
/**
|
|
466
465
|
* Move file to archive and return new reference
|
|
467
466
|
*/
|
|
468
|
-
archive(archiveDirectoryName?: string): Promise<DocFileUnknownReference
|
|
467
|
+
archive(archiveDirectoryName?: string): Promise<DocFileUnknownReference<T>>;
|
|
469
468
|
/**
|
|
470
469
|
* Restore file from archive and return new reference
|
|
471
470
|
*/
|
|
472
|
-
restore(archiveDirectoryName?: string): Promise<DocFileUnknownReference
|
|
471
|
+
restore(archiveDirectoryName?: string): Promise<DocFileUnknownReference<T>>;
|
|
473
472
|
}
|
|
474
473
|
|
|
475
474
|
/**
|
|
@@ -525,11 +524,11 @@ type DocMetaFieldSelectNumber = z.infer<typeof zDocMetaFieldSelectNumber>;
|
|
|
525
524
|
type DocMetaFieldRelation = z.infer<typeof zDocMetaFieldRelation>;
|
|
526
525
|
type DocMetaFieldMultiText = z.infer<typeof zDocMetaFieldMultiText>;
|
|
527
526
|
type DocMetaFieldMultiNumber = z.infer<typeof zDocMetaFieldMultiNumber>;
|
|
528
|
-
type DocMetaFieldMultiBoolean = z.infer<typeof zDocMetaFieldMultiBoolean>;
|
|
529
527
|
type DocMetaFieldMultiSelectText = z.infer<typeof zDocMetaFieldMultiSelectText>;
|
|
530
528
|
type DocMetaFieldMultiSelectNumber = z.infer<typeof zDocMetaFieldMultiSelectNumber>;
|
|
531
529
|
type DocMetaFieldMultiRelation = z.infer<typeof zDocMetaFieldMultiRelation>;
|
|
532
530
|
type DocFileMdMeta<T extends RecordKey> = Record<T, DocMetaField>;
|
|
531
|
+
type DocFileMdMetaAny = DocFileMdMeta<RecordKey>;
|
|
533
532
|
type DocMetaFieldTypeText = z.infer<typeof zDocMetaFieldTypeText>;
|
|
534
533
|
type DocMetaFieldTypeNumber = z.infer<typeof zDocMetaFieldTypeNumber>;
|
|
535
534
|
type DocMetaFieldTypeBoolean = z.infer<typeof zDocMetaFieldTypeBoolean>;
|
|
@@ -591,7 +590,7 @@ type DocFileIndexSchemaField = z.infer<typeof zDocFileIndexSchemaField>;
|
|
|
591
590
|
/**
|
|
592
591
|
* Schema definition type
|
|
593
592
|
*/
|
|
594
|
-
type
|
|
593
|
+
type DocFileIndexSchema<T extends RecordKey = string> = Record<T, DocFileIndexSchemaField>;
|
|
595
594
|
/**
|
|
596
595
|
* Schema field to override
|
|
597
596
|
* ex: { xxx: { type: "text", required: true } }
|
|
@@ -604,7 +603,7 @@ type DocFieldTypeLiteral = "text" | "number" | "boolean" | "relation" | "multi-t
|
|
|
604
603
|
/**
|
|
605
604
|
* Minimal schema definition type
|
|
606
605
|
*/
|
|
607
|
-
type
|
|
606
|
+
type DocCustomSchema<T extends RecordKey = string> = Record<T, DocCustomSchemaField>;
|
|
608
607
|
/**
|
|
609
608
|
* Union type for relation fields
|
|
610
609
|
*/
|
|
@@ -637,11 +636,11 @@ type DocTreeNode = DocTreeFileNode | DocTreeDirectoryNode;
|
|
|
637
636
|
/**
|
|
638
637
|
* Index file type
|
|
639
638
|
*/
|
|
640
|
-
type
|
|
639
|
+
type DocFileIndex<T extends DocCustomSchema = DocCustomSchema> = {
|
|
641
640
|
type: "index";
|
|
642
641
|
path: DocFilePath;
|
|
643
642
|
isArchived: boolean;
|
|
644
|
-
content:
|
|
643
|
+
content: DocFileIndexContent<T>;
|
|
645
644
|
};
|
|
646
645
|
/**
|
|
647
646
|
* Type to check if two types are equal
|
|
@@ -650,23 +649,23 @@ type Equals<T, U> = (<G>() => G extends T ? 1 : 2) extends <G>() => G extends U
|
|
|
650
649
|
/**
|
|
651
650
|
* Extract relation field keys from schema
|
|
652
651
|
*/
|
|
653
|
-
type RelationKeys<T extends
|
|
652
|
+
type RelationKeys<T extends DocCustomSchema> = {
|
|
654
653
|
[K in keyof T]: T[K]["type"] extends "relation" ? K : never;
|
|
655
654
|
}[keyof T];
|
|
656
655
|
/**
|
|
657
656
|
* Extract multi-relation field keys from schema
|
|
658
657
|
*/
|
|
659
|
-
type MultiRelationKeys<T extends
|
|
658
|
+
type MultiRelationKeys<T extends DocCustomSchema> = {
|
|
660
659
|
[K in keyof T]: T[K]["type"] extends "multi-relation" ? K : never;
|
|
661
660
|
}[keyof T];
|
|
662
661
|
/**
|
|
663
662
|
* Markdown file type (excluding index.md)
|
|
664
663
|
*/
|
|
665
|
-
type
|
|
664
|
+
type DocFileMd<T extends DocCustomSchema> = {
|
|
666
665
|
type: "markdown";
|
|
667
666
|
path: DocFilePath;
|
|
668
667
|
isArchived: boolean;
|
|
669
|
-
content:
|
|
668
|
+
content: DocFileMdContent<T>;
|
|
670
669
|
};
|
|
671
670
|
/**
|
|
672
671
|
* Other file type (non-markdown)
|
|
@@ -675,18 +674,21 @@ type DocFileUnknown = z.infer<typeof zDocFileUnknown>;
|
|
|
675
674
|
/**
|
|
676
675
|
* File union type (index.md, regular md, other)
|
|
677
676
|
*/
|
|
678
|
-
type
|
|
679
|
-
type
|
|
680
|
-
type
|
|
681
|
-
type
|
|
682
|
-
|
|
677
|
+
type DocFile<T extends DocCustomSchema = DocCustomSchema> = DocFileIndex<T> | DocFileMd<T> | DocFileUnknown;
|
|
678
|
+
type DocDirectoryFile<T extends DocCustomSchema = DocCustomSchema> = DocFileMd<T> | DocFileUnknown;
|
|
679
|
+
type DocFileIndexAny = z.infer<typeof zDocFileIndex>;
|
|
680
|
+
type DocFileMdAny = z.infer<typeof zDocFileMd>;
|
|
681
|
+
/**
|
|
682
|
+
* DocFile<DocCustomSchema<RecordKey>>
|
|
683
|
+
*/
|
|
684
|
+
type DocFileAny = DocFileIndexAny | DocFileMdAny | DocFileUnknown;
|
|
683
685
|
/**
|
|
684
686
|
* Directory FrontMatter type
|
|
685
687
|
*/
|
|
686
|
-
type
|
|
688
|
+
type DocFileIndexMeta<T extends DocCustomSchema = DocCustomSchema> = {
|
|
687
689
|
type: "index-meta";
|
|
688
690
|
icon: string | null;
|
|
689
|
-
schema:
|
|
691
|
+
schema: DocFileIndexSchema<keyof T>;
|
|
690
692
|
};
|
|
691
693
|
/**
|
|
692
694
|
* Relation options type
|
|
@@ -722,11 +724,11 @@ type DetectFileType<T extends string> = IsIndexMd<T> extends true ? "index" : En
|
|
|
722
724
|
/**
|
|
723
725
|
* Map file type to reference class
|
|
724
726
|
*/
|
|
725
|
-
type
|
|
727
|
+
type FileTypeToReference<FileType extends string, Schema extends DocCustomSchema> = FileType extends "index" ? DocFileIndexReference<Schema> : FileType extends "markdown" ? DocFileMdReference<Schema> : DocFileUnknownReference<Schema>;
|
|
726
728
|
/**
|
|
727
729
|
* Infer reference type from path
|
|
728
730
|
*/
|
|
729
|
-
type InferReference<Path extends string, Schema extends
|
|
731
|
+
type InferReference<Path extends string, Schema extends DocCustomSchema> = FileTypeToReference<DetectFileType<Path>, Schema>;
|
|
730
732
|
/**
|
|
731
733
|
* File path information type
|
|
732
734
|
*/
|
|
@@ -734,7 +736,7 @@ type DocFilePath = z.infer<typeof zDocFilePath>;
|
|
|
734
736
|
/**
|
|
735
737
|
* Markdown content information type
|
|
736
738
|
*/
|
|
737
|
-
type
|
|
739
|
+
type DocFileMdContent<T extends DocCustomSchema = DocCustomSchema> = {
|
|
738
740
|
type: "markdown-content";
|
|
739
741
|
body: string;
|
|
740
742
|
title: string;
|
|
@@ -744,20 +746,20 @@ type DocFileMdContentGenerics<T extends DocCustomSchemaGenerics = DocCustomSchem
|
|
|
744
746
|
/**
|
|
745
747
|
* Index file content information type
|
|
746
748
|
*/
|
|
747
|
-
type
|
|
749
|
+
type DocFileIndexContent<T extends DocCustomSchema = DocCustomSchema> = {
|
|
748
750
|
type: "markdown-index";
|
|
749
751
|
body: string;
|
|
750
752
|
title: string;
|
|
751
753
|
description: string;
|
|
752
|
-
meta:
|
|
754
|
+
meta: DocFileIndexMeta<T>;
|
|
753
755
|
};
|
|
754
756
|
/**
|
|
755
757
|
* Directory response type (re-export from server package)
|
|
756
758
|
*/
|
|
757
|
-
type
|
|
759
|
+
type DocDirectory<T extends DocCustomSchema> = {
|
|
758
760
|
cwd: string;
|
|
759
|
-
indexFile:
|
|
760
|
-
files:
|
|
761
|
+
indexFile: DocFileIndex<T>;
|
|
762
|
+
files: DocFile<T>[];
|
|
761
763
|
relations: DocRelation[];
|
|
762
764
|
};
|
|
763
765
|
type RecordKey = PropertyKey;
|
|
@@ -779,7 +781,7 @@ type FieldValueType<Type, Required> = Required extends true ? BaseFieldValueType
|
|
|
779
781
|
/**
|
|
780
782
|
* Extract required field keys
|
|
781
783
|
*/
|
|
782
|
-
type RequiredKeys<T extends
|
|
784
|
+
type RequiredKeys<T extends DocCustomSchema> = {
|
|
783
785
|
[K in keyof T]: T[K] extends {
|
|
784
786
|
required: true;
|
|
785
787
|
} ? K : never;
|
|
@@ -787,7 +789,7 @@ type RequiredKeys<T extends DocCustomSchemaGenerics> = {
|
|
|
787
789
|
/**
|
|
788
790
|
* Extract optional field keys
|
|
789
791
|
*/
|
|
790
|
-
type OptionalKeys<T extends
|
|
792
|
+
type OptionalKeys<T extends DocCustomSchema> = {
|
|
791
793
|
[K in keyof T]: T[K] extends {
|
|
792
794
|
required: true;
|
|
793
795
|
} ? never : K;
|
|
@@ -795,20 +797,20 @@ type OptionalKeys<T extends DocCustomSchemaGenerics> = {
|
|
|
795
797
|
/**
|
|
796
798
|
* Generate expected value type from schema (considering required)
|
|
797
799
|
*/
|
|
798
|
-
type SchemaToValueType<T extends
|
|
800
|
+
type SchemaToValueType<T extends DocCustomSchema> = {
|
|
799
801
|
[K in RequiredKeys<T>]: BaseFieldValueType<ExtractFieldType<T[K]>>;
|
|
800
802
|
} & {
|
|
801
|
-
[K in OptionalKeys<T>]
|
|
803
|
+
[K in OptionalKeys<T>]: BaseFieldValueType<ExtractFieldType<T[K]>> | null;
|
|
802
804
|
};
|
|
803
805
|
/**
|
|
804
806
|
* Helper type for type-safe property access
|
|
805
807
|
*/
|
|
806
|
-
type GetValueType<T extends
|
|
807
|
-
type GetIndexFieldType<Schema extends
|
|
808
|
+
type GetValueType<T extends DocCustomSchema, K extends keyof T> = K extends RequiredKeys<T> ? BaseFieldValueType<ExtractFieldType<T[K]>> : BaseFieldValueType<ExtractFieldType<T[K]>> | undefined | null;
|
|
809
|
+
type GetIndexFieldType<Schema extends DocFileIndexSchema<RecordKey>, K extends keyof Schema> = Schema[K] extends DocFileIndexSchemaField ? Schema[K] : never;
|
|
808
810
|
/**
|
|
809
811
|
* Infers DocFileMd type from the result of defineSchema
|
|
810
812
|
*/
|
|
811
|
-
type InferDocFileMd<T> = T extends
|
|
813
|
+
type InferDocFileMd<T> = T extends DocCustomSchema ? DocFileMd<T> : never;
|
|
812
814
|
|
|
813
815
|
/**
|
|
814
816
|
* Relation file
|
|
@@ -1200,10 +1202,10 @@ declare class DocSchemaFieldMultiNumberValue<T extends RecordKey> {
|
|
|
1200
1202
|
/**
|
|
1201
1203
|
* Type-safe schema value object
|
|
1202
1204
|
*/
|
|
1203
|
-
declare class DocFileIndexSchemaValue<T extends
|
|
1204
|
-
readonly value:
|
|
1205
|
+
declare class DocFileIndexSchemaValue<T extends DocCustomSchema> {
|
|
1206
|
+
readonly value: DocFileIndexSchema<keyof T>;
|
|
1205
1207
|
readonly customSchema: T;
|
|
1206
|
-
constructor(value:
|
|
1208
|
+
constructor(value: DocFileIndexSchema<keyof T>, customSchema: T);
|
|
1207
1209
|
/**
|
|
1208
1210
|
* Get list of field names
|
|
1209
1211
|
* Automatically type-safe when using Zod schema
|
|
@@ -1216,7 +1218,7 @@ declare class DocFileIndexSchemaValue<T extends DocCustomSchemaGenerics> {
|
|
|
1216
1218
|
field<K extends keyof T>(key: K): T[K]["type"] extends infer Type ? Type extends "text" ? DocSchemaFieldTextValue<K> : Type extends "number" ? DocSchemaFieldNumberValue<K> : Type extends "boolean" ? DocSchemaFieldBooleanValue<K> : Type extends "relation" ? DocSchemaFieldRelationValue<K> : Type extends "select-text" ? DocSchemaFieldSelectTextValue<K> : Type extends "select-number" ? DocSchemaFieldSelectNumberValue<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;
|
|
1217
1219
|
relation<K extends keyof T>(key: K): DocSchemaFieldRelationValue<K>;
|
|
1218
1220
|
multiRelation<K extends keyof T>(key: K): DocSchemaFieldMultiRelationValue<K>;
|
|
1219
|
-
toJson():
|
|
1221
|
+
toJson(): DocFileIndexSchema<keyof T>;
|
|
1220
1222
|
/**
|
|
1221
1223
|
* Create empty schema entity
|
|
1222
1224
|
* biome-ignore lint/complexity/noBannedTypes: {} as DocCustomSchema
|
|
@@ -1227,12 +1229,12 @@ declare class DocFileIndexSchemaValue<T extends DocCustomSchemaGenerics> {
|
|
|
1227
1229
|
/**
|
|
1228
1230
|
* File: index.md > content > FrontMatter
|
|
1229
1231
|
*/
|
|
1230
|
-
declare class DocFileIndexMetaValue<T extends
|
|
1231
|
-
readonly value:
|
|
1232
|
+
declare class DocFileIndexMetaValue<T extends DocCustomSchema> {
|
|
1233
|
+
readonly value: DocFileIndexMeta<T>;
|
|
1232
1234
|
readonly customSchema: T;
|
|
1233
1235
|
private readonly config;
|
|
1234
1236
|
private readonly additionalProperties;
|
|
1235
|
-
constructor(value:
|
|
1237
|
+
constructor(value: DocFileIndexMeta<T>, customSchema: T, config: DocClientConfig, additionalProperties?: Record<string, unknown>);
|
|
1236
1238
|
/**
|
|
1237
1239
|
* Get icon
|
|
1238
1240
|
*/
|
|
@@ -1252,16 +1254,16 @@ declare class DocFileIndexMetaValue<T extends DocCustomSchemaGenerics> {
|
|
|
1252
1254
|
/**
|
|
1253
1255
|
* Update schema field
|
|
1254
1256
|
*/
|
|
1255
|
-
withSchema(value:
|
|
1257
|
+
withSchema(value: DocFileIndexSchema<keyof T>): DocFileIndexMetaValue<T>;
|
|
1256
1258
|
/**
|
|
1257
1259
|
* Return a new instance with an unknown schema
|
|
1258
1260
|
* Allows accepting Record<string, unknown> schemas from external sources
|
|
1259
1261
|
*/
|
|
1260
|
-
withUnknownSchema(draft: Record<string, unknown>): DocFileIndexMetaValue<
|
|
1262
|
+
withUnknownSchema(draft: Record<string, unknown>): DocFileIndexMetaValue<DocCustomSchema>;
|
|
1261
1263
|
/**
|
|
1262
1264
|
* Output in JSON format
|
|
1263
1265
|
*/
|
|
1264
|
-
toJson():
|
|
1266
|
+
toJson(): DocFileIndexMeta<T>;
|
|
1265
1267
|
/**
|
|
1266
1268
|
* Output in YAML format
|
|
1267
1269
|
*/
|
|
@@ -1269,15 +1271,15 @@ declare class DocFileIndexMetaValue<T extends DocCustomSchemaGenerics> {
|
|
|
1269
1271
|
/**
|
|
1270
1272
|
* Generate from Markdown text (can process incomplete data)
|
|
1271
1273
|
*/
|
|
1272
|
-
static from<T extends
|
|
1274
|
+
static from<T extends DocCustomSchema>(markdownText: string, customSchema: T, config: DocClientConfig): DocFileIndexMetaValue<T>;
|
|
1273
1275
|
/**
|
|
1274
1276
|
* Generate directly from data (can process incomplete data)
|
|
1275
1277
|
*/
|
|
1276
|
-
static fromRecord<T extends
|
|
1278
|
+
static fromRecord<T extends DocCustomSchema>(record: Record<string, unknown>, customSchema: T, config: DocClientConfig): DocFileIndexMetaValue<T>;
|
|
1277
1279
|
/**
|
|
1278
1280
|
* Generate empty FrontMatter
|
|
1279
1281
|
*/
|
|
1280
|
-
static empty<T extends
|
|
1282
|
+
static empty<T extends DocCustomSchema>(customSchema: T, config: DocClientConfig): DocFileIndexMetaValue<T>;
|
|
1281
1283
|
/**
|
|
1282
1284
|
* Extract icon
|
|
1283
1285
|
*/
|
|
@@ -1290,17 +1292,17 @@ declare class DocFileIndexMetaValue<T extends DocCustomSchemaGenerics> {
|
|
|
1290
1292
|
* Normalize entire schema
|
|
1291
1293
|
*/
|
|
1292
1294
|
private static normalizeSchema;
|
|
1293
|
-
static emptySchema<T extends
|
|
1295
|
+
static emptySchema<T extends DocCustomSchema>(customSchema: T): DocFileIndexSchema<keyof T>;
|
|
1294
1296
|
}
|
|
1295
1297
|
|
|
1296
1298
|
/**
|
|
1297
1299
|
* File: index.md > content
|
|
1298
1300
|
*/
|
|
1299
|
-
declare class DocFileIndexContentValue<T extends
|
|
1300
|
-
readonly value:
|
|
1301
|
+
declare class DocFileIndexContentValue<T extends DocCustomSchema> {
|
|
1302
|
+
readonly value: DocFileIndexContent<T>;
|
|
1301
1303
|
private readonly customSchema;
|
|
1302
1304
|
private readonly config;
|
|
1303
|
-
constructor(value:
|
|
1305
|
+
constructor(value: DocFileIndexContent<T>, customSchema: T, config: DocClientConfig);
|
|
1304
1306
|
/**
|
|
1305
1307
|
* Content body (does not include frontMatter)
|
|
1306
1308
|
*/
|
|
@@ -1328,7 +1330,7 @@ declare class DocFileIndexContentValue<T extends DocCustomSchemaGenerics> {
|
|
|
1328
1330
|
/**
|
|
1329
1331
|
* Generate from Markdown text
|
|
1330
1332
|
*/
|
|
1331
|
-
static fromMarkdown<T extends
|
|
1333
|
+
static fromMarkdown<T extends DocCustomSchema>(markdown: string, customSchema: T, config: DocClientConfig): DocFileIndexContentValue<T>;
|
|
1332
1334
|
/**
|
|
1333
1335
|
* Generate complete Markdown text
|
|
1334
1336
|
*/
|
|
@@ -1340,11 +1342,11 @@ declare class DocFileIndexContentValue<T extends DocCustomSchemaGenerics> {
|
|
|
1340
1342
|
/**
|
|
1341
1343
|
* Update FrontMatter
|
|
1342
1344
|
*/
|
|
1343
|
-
withMeta(meta:
|
|
1345
|
+
withMeta(meta: DocFileIndexMeta<T>): DocFileIndexContentValue<T>;
|
|
1344
1346
|
/**
|
|
1345
1347
|
* Generate default index.md content
|
|
1346
1348
|
*/
|
|
1347
|
-
static empty<T extends
|
|
1349
|
+
static empty<T extends DocCustomSchema = DocCustomSchema>(directoryName: string, customSchema: T, config: DocClientConfig): DocFileIndexContentValue<T>;
|
|
1348
1350
|
/**
|
|
1349
1351
|
* Generate complete text combining FrontMatter and body
|
|
1350
1352
|
*/
|
|
@@ -1352,17 +1354,17 @@ declare class DocFileIndexContentValue<T extends DocCustomSchemaGenerics> {
|
|
|
1352
1354
|
/**
|
|
1353
1355
|
* Output in JSON format
|
|
1354
1356
|
*/
|
|
1355
|
-
toJson():
|
|
1357
|
+
toJson(): DocFileIndexContent<T>;
|
|
1356
1358
|
}
|
|
1357
1359
|
|
|
1358
1360
|
/**
|
|
1359
1361
|
* Document directory entity
|
|
1360
1362
|
*/
|
|
1361
|
-
declare class DocFileIndexEntity<T extends
|
|
1362
|
-
readonly value:
|
|
1363
|
+
declare class DocFileIndexEntity<T extends DocCustomSchema> {
|
|
1364
|
+
readonly value: DocFileIndex<T>;
|
|
1363
1365
|
private readonly customSchema;
|
|
1364
1366
|
private readonly config;
|
|
1365
|
-
constructor(value:
|
|
1367
|
+
constructor(value: DocFileIndex<T>, customSchema: T, config?: DocClientConfig);
|
|
1366
1368
|
/**
|
|
1367
1369
|
* Content
|
|
1368
1370
|
*/
|
|
@@ -1382,10 +1384,10 @@ declare class DocFileIndexEntity<T extends DocCustomSchemaGenerics> {
|
|
|
1382
1384
|
/**
|
|
1383
1385
|
* z.infer<typeof zDocFileIndex>
|
|
1384
1386
|
*/
|
|
1385
|
-
toJson():
|
|
1387
|
+
toJson(): DocFileIndexAny;
|
|
1386
1388
|
}
|
|
1387
1389
|
|
|
1388
|
-
type Props$5<T extends
|
|
1390
|
+
type Props$5<T extends DocCustomSchema> = {
|
|
1389
1391
|
customSchema: T;
|
|
1390
1392
|
path: string;
|
|
1391
1393
|
fileSystem: DocFileSystem;
|
|
@@ -1395,7 +1397,7 @@ type Props$5<T extends DocCustomSchemaGenerics> = {
|
|
|
1395
1397
|
/**
|
|
1396
1398
|
* File reference class
|
|
1397
1399
|
*/
|
|
1398
|
-
declare class DocFileIndexReference<T extends
|
|
1400
|
+
declare class DocFileIndexReference<T extends DocCustomSchema> {
|
|
1399
1401
|
private readonly props;
|
|
1400
1402
|
private readonly pathSystem;
|
|
1401
1403
|
private readonly customSchema;
|
|
@@ -1406,7 +1408,7 @@ declare class DocFileIndexReference<T extends DocCustomSchemaGenerics> {
|
|
|
1406
1408
|
get fileFullPath(): string;
|
|
1407
1409
|
get durectoryPath(): string;
|
|
1408
1410
|
read(): Promise<DocFileIndexEntity<T> | Error>;
|
|
1409
|
-
readSchemaValue(): Promise<
|
|
1411
|
+
readSchemaValue(): Promise<DocFileIndexSchema<RecordKey>>;
|
|
1410
1412
|
/**
|
|
1411
1413
|
* Read file content
|
|
1412
1414
|
*/
|
|
@@ -1459,12 +1461,12 @@ declare class DocFileIndexReference<T extends DocCustomSchemaGenerics> {
|
|
|
1459
1461
|
restore(archiveDirectoryName?: string): Promise<DocFileIndexReference<T>>;
|
|
1460
1462
|
}
|
|
1461
1463
|
|
|
1462
|
-
type DocFileDirectoryReference<T extends
|
|
1464
|
+
type DocFileDirectoryReference<T extends DocCustomSchema> = DocFileMdReference<T> | DocFileUnknownReference<T>;
|
|
1463
1465
|
|
|
1464
|
-
type DocFileEntity<T extends
|
|
1465
|
-
type DocFileDirectoryEntity<T extends
|
|
1466
|
+
type DocFileEntity<T extends DocCustomSchema> = DocFileMdEntity<T> | DocFileIndexEntity<T> | DocFileUnknownEntity;
|
|
1467
|
+
type DocFileDirectoryEntity<T extends DocCustomSchema> = DocFileMdEntity<T> | DocFileUnknownEntity;
|
|
1466
1468
|
|
|
1467
|
-
type Props$4<T extends
|
|
1469
|
+
type Props$4<T extends DocCustomSchema> = {
|
|
1468
1470
|
customSchema: T;
|
|
1469
1471
|
path: string;
|
|
1470
1472
|
indexFileName: string;
|
|
@@ -1476,7 +1478,7 @@ type Props$4<T extends DocCustomSchemaGenerics> = {
|
|
|
1476
1478
|
/**
|
|
1477
1479
|
* Directory reference
|
|
1478
1480
|
*/
|
|
1479
|
-
declare class DocDirectoryReference<T extends
|
|
1481
|
+
declare class DocDirectoryReference<T extends DocCustomSchema> {
|
|
1480
1482
|
private readonly props;
|
|
1481
1483
|
private readonly pathSystem;
|
|
1482
1484
|
private readonly customSchema;
|
|
@@ -1512,7 +1514,7 @@ declare class DocDirectoryReference<T extends DocCustomSchemaGenerics> {
|
|
|
1512
1514
|
* Get single subdirectory reference
|
|
1513
1515
|
*/
|
|
1514
1516
|
directory(directoryName: string): DocDirectoryReference<T>;
|
|
1515
|
-
directory<S extends
|
|
1517
|
+
directory<S extends DocCustomSchema>(directoryName: string, customSchema: S): DocDirectoryReference<S>;
|
|
1516
1518
|
indexFile(): DocFileIndexReference<T>;
|
|
1517
1519
|
readIndexFile(): Promise<DocFileIndexEntity<T> | Error>;
|
|
1518
1520
|
writeFile(entity: DocFileIndexEntity<T> | DocFileMdEntity<T> | DocFileUnknownEntity): Promise<Error | null>;
|
|
@@ -1701,14 +1703,14 @@ declare class DocClient {
|
|
|
1701
1703
|
readonly config: DocClientConfig;
|
|
1702
1704
|
constructor(props: Props);
|
|
1703
1705
|
basePath(): string;
|
|
1704
|
-
file<Path extends string>(relativePath: Path): InferReference<Path,
|
|
1705
|
-
file<Path extends string, T extends
|
|
1706
|
-
mdFile(relativePath: string): DocFileMdReference<
|
|
1707
|
-
mdFile<T extends
|
|
1708
|
-
indexFile(relativePath: string): DocFileIndexReference<
|
|
1709
|
-
indexFile<T extends
|
|
1710
|
-
directory(relativePath: string): DocDirectoryReference<
|
|
1711
|
-
directory<T extends
|
|
1706
|
+
file<Path extends string>(relativePath: Path): InferReference<Path, DocCustomSchema>;
|
|
1707
|
+
file<Path extends string, T extends DocCustomSchema>(relativePath: Path, customSchema: T): InferReference<Path, T>;
|
|
1708
|
+
mdFile(relativePath: string): DocFileMdReference<DocCustomSchema>;
|
|
1709
|
+
mdFile<T extends DocCustomSchema>(relativePath: string, customSchema: T): DocFileMdReference<T>;
|
|
1710
|
+
indexFile(relativePath: string): DocFileIndexReference<DocCustomSchema>;
|
|
1711
|
+
indexFile<T extends DocCustomSchema>(relativePath: string, customSchema: T): DocFileIndexReference<T>;
|
|
1712
|
+
directory(relativePath: string): DocDirectoryReference<DocCustomSchema>;
|
|
1713
|
+
directory<T extends DocCustomSchema>(relativePath: string, customSchema: T): DocDirectoryReference<T>;
|
|
1712
1714
|
fileTree(directoryPath?: string): Promise<DocTreeNode[]>;
|
|
1713
1715
|
directoryTree(directoryPath?: string): Promise<DocTreeDirectoryNode[]>;
|
|
1714
1716
|
}
|
|
@@ -1834,7 +1836,7 @@ declare class DocPathSystemMock extends DocPathSystem {
|
|
|
1834
1836
|
* .selectText("priority", false)
|
|
1835
1837
|
* .build()
|
|
1836
1838
|
*/
|
|
1837
|
-
declare class DocSchemaBuilder<T extends
|
|
1839
|
+
declare class DocSchemaBuilder<T extends DocCustomSchema> {
|
|
1838
1840
|
private schema;
|
|
1839
1841
|
constructor(schema?: T);
|
|
1840
1842
|
text<K extends string>(key: K, required: boolean): DocSchemaBuilder<T & Record<K, {
|
|
@@ -1917,7 +1919,7 @@ declare const defaultTestConfig: {
|
|
|
1917
1919
|
*
|
|
1918
1920
|
* type MyDoc = InferDocFileMd<typeof mySchema>
|
|
1919
1921
|
*/
|
|
1920
|
-
declare function defineSchema<T extends
|
|
1922
|
+
declare function defineSchema<T extends DocCustomSchema>(schema: T): T;
|
|
1921
1923
|
/**
|
|
1922
1924
|
* Helper functions for field definitions
|
|
1923
1925
|
* Use when finer control is needed
|
|
@@ -2162,4 +2164,4 @@ declare class DocRelationFieldValue {
|
|
|
2162
2164
|
}): DocRelationFieldValue;
|
|
2163
2165
|
}
|
|
2164
2166
|
|
|
2165
|
-
export { type BaseFieldValueType, type DetectFileType, DocClient, type DocClientConfig, type DocCustomSchemaField, type DocCustomSchemaFieldBoolean, type DocCustomSchemaFieldMultiNumber, type DocCustomSchemaFieldMultiRelation, type DocCustomSchemaFieldMultiSelectNumber, type DocCustomSchemaFieldMultiSelectText, type DocCustomSchemaFieldMultiText, type DocCustomSchemaFieldNumber, type DocCustomSchemaFieldRelation, type DocCustomSchemaFieldSelectNumber, type DocCustomSchemaFieldSelectText, type DocCustomSchemaFieldText, DocCustomSchemaFieldValue, type
|
|
2167
|
+
export { type BaseFieldValueType, type DetectFileType, DocClient, type DocClientConfig, 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, DocCustomSchemaFieldValue, type DocDirectory, type DocDirectoryFile, DocDirectoryPathValue, DocDirectoryReference, type DocFieldTypeLiteral, type DocFile, type DocFileAny, type DocFileEntity, type DocFileIndex, type DocFileIndexAny, type DocFileIndexContent, DocFileIndexContentValue, DocFileIndexEntity, type DocFileIndexMeta, DocFileIndexMetaValue, DocFileIndexReference, type DocFileIndexSchema, type DocFileIndexSchemaField, DocFileIndexSchemaValue, type DocFileMd, type DocFileMdAny, type DocFileMdContent, DocFileMdContentValue, DocFileMdEntity, type DocFileMdMeta, type DocFileMdMetaAny, DocFileMdMetaValue, DocFileMdReference, type DocFilePath, DocFilePathValue, DocFileRelationReference, DocFileSystem, DocFileSystemMock, DocFileTreeSystem, type DocFileUnknown, DocFileUnknownEntity, DocFileUnknownReference, DocMarkdownSystem, type DocMetaField, type DocMetaFieldBoolean, 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, DocPathSystemMock, type DocRelation, type DocRelationField, DocRelationFieldValue, type DocRelationFile, DocRelationFileValue, DocRelationValue, DocSchemaBuilder, type DocSchemaFieldBoolean, type DocSchemaFieldMultiNumber, type DocSchemaFieldMultiRelation, type DocSchemaFieldMultiSelectNumber, type DocSchemaFieldMultiSelectText, type DocSchemaFieldMultiText, type DocSchemaFieldNumber, type DocSchemaFieldRelation, type DocSchemaFieldSelectNumber, type DocSchemaFieldSelectText, type DocSchemaFieldText, type DocSchemaRelationFieldUnion, type DocTreeDirectoryNode, DocTreeDirectoryNodeValue, type DocTreeFileNode, DocTreeFileNodeValue, type DocTreeNode, type DocTreeNodeValue, type Equals, type ExtractFieldType, type ExtractRequired, type FieldValueType, type GetIndexFieldType, type GetValueType, type InferDocFileMd, type InferReference, type MultiRelationKeys, type OptionalKeys, type RecordKey, type RelationKeys, type RequiredKeys, type SchemaToValueType, assertType, defaultTestConfig, defineSchema, docCustomSchemaField, expectType, zDocClientConfig, zDocFileIndex, zDocFileIndexSchemaField, zDocFileMd, zDocFilePath, zDocFileUnknown, zDocMetaField, zDocMetaFieldBoolean, 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 };
|
package/build/index.js
CHANGED
|
@@ -136,7 +136,6 @@ var zDocMetaFieldSelectNumber = z.number().nullable();
|
|
|
136
136
|
var zDocMetaFieldRelation = z.string().nullable();
|
|
137
137
|
var zDocMetaFieldMultiText = z.string().array();
|
|
138
138
|
var zDocMetaFieldMultiNumber = z.number().array();
|
|
139
|
-
var zDocMetaFieldMultiBoolean = z.boolean().array();
|
|
140
139
|
var zDocMetaFieldMultiSelectText = z.string().array();
|
|
141
140
|
var zDocMetaFieldMultiSelectNumber = z.number().array();
|
|
142
141
|
var zDocMetaFieldMultiRelation = z.string().array();
|
|
@@ -149,11 +148,9 @@ var zDocMetaField = z.union([
|
|
|
149
148
|
zDocMetaFieldRelation,
|
|
150
149
|
zDocMetaFieldMultiText,
|
|
151
150
|
zDocMetaFieldMultiNumber,
|
|
152
|
-
zDocMetaFieldMultiBoolean,
|
|
153
151
|
zDocMetaFieldMultiSelectText,
|
|
154
152
|
zDocMetaFieldMultiSelectNumber,
|
|
155
|
-
zDocMetaFieldMultiRelation
|
|
156
|
-
z.null()
|
|
153
|
+
zDocMetaFieldMultiRelation
|
|
157
154
|
]);
|
|
158
155
|
var zDocFileMdMeta = z.record(z.string(), zDocMetaField);
|
|
159
156
|
var zDocFileMdMetaInput = z.record(
|
|
@@ -1315,12 +1312,6 @@ var DocFileMdMetaValue = class _DocFileMdMetaValue {
|
|
|
1315
1312
|
}
|
|
1316
1313
|
return zDocMetaFieldMultiNumber.parse(this.value[key]);
|
|
1317
1314
|
}
|
|
1318
|
-
multiBoolean(key) {
|
|
1319
|
-
if (this.hasKey(key) === false) {
|
|
1320
|
-
return [];
|
|
1321
|
-
}
|
|
1322
|
-
return zDocMetaFieldMultiBoolean.parse(this.value[key]);
|
|
1323
|
-
}
|
|
1324
1315
|
hasKey(key) {
|
|
1325
1316
|
const schemaField = this.schemaField(key);
|
|
1326
1317
|
const hasKey = key in this.value;
|
|
@@ -3260,7 +3251,7 @@ var DocFileIndexEntity = class _DocFileIndexEntity {
|
|
|
3260
3251
|
* z.infer<typeof zDocFileIndex>
|
|
3261
3252
|
*/
|
|
3262
3253
|
toJson() {
|
|
3263
|
-
return
|
|
3254
|
+
return this.value;
|
|
3264
3255
|
}
|
|
3265
3256
|
};
|
|
3266
3257
|
|
|
@@ -3781,6 +3772,19 @@ var DocFileMdReference = class _DocFileMdReference {
|
|
|
3781
3772
|
return this.fileSystem.getFileCreatedTime(this.path);
|
|
3782
3773
|
}
|
|
3783
3774
|
directory() {
|
|
3775
|
+
const paths = this.directoryPath.split(this.pathSystem.separator);
|
|
3776
|
+
if (paths[paths.length - 1] === this.props.config.archiveDirectoryName) {
|
|
3777
|
+
const path = paths.slice(0, -1).join(this.pathSystem.separator);
|
|
3778
|
+
return new DocDirectoryReference({
|
|
3779
|
+
archiveDirectoryName: this.props.config.archiveDirectoryName,
|
|
3780
|
+
indexFileName: this.props.config.indexFileName,
|
|
3781
|
+
fileSystem: this.fileSystem,
|
|
3782
|
+
path,
|
|
3783
|
+
pathSystem: this.pathSystem,
|
|
3784
|
+
customSchema: this.customSchema,
|
|
3785
|
+
config: this.props.config
|
|
3786
|
+
});
|
|
3787
|
+
}
|
|
3784
3788
|
return new DocDirectoryReference({
|
|
3785
3789
|
archiveDirectoryName: this.props.config.archiveDirectoryName,
|
|
3786
3790
|
indexFileName: this.props.config.indexFileName,
|
|
@@ -3982,9 +3986,11 @@ var DocFileUnknownReference = class _DocFileUnknownReference {
|
|
|
3982
3986
|
constructor(props) {
|
|
3983
3987
|
this.props = props;
|
|
3984
3988
|
this.pathSystem = props.pathSystem;
|
|
3989
|
+
this.customSchema = props.customSchema;
|
|
3985
3990
|
Object.freeze(this);
|
|
3986
3991
|
}
|
|
3987
3992
|
pathSystem;
|
|
3993
|
+
customSchema;
|
|
3988
3994
|
get fileSystem() {
|
|
3989
3995
|
return this.props.fileSystem;
|
|
3990
3996
|
}
|
|
@@ -4000,17 +4006,27 @@ var DocFileUnknownReference = class _DocFileUnknownReference {
|
|
|
4000
4006
|
get fileFullPath() {
|
|
4001
4007
|
return this.pathSystem.join(this.basePath, this.path);
|
|
4002
4008
|
}
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4009
|
+
directory() {
|
|
4010
|
+
const paths = this.directoryPath.split(this.pathSystem.separator);
|
|
4011
|
+
if (paths[paths.length - 1] === this.props.config.archiveDirectoryName) {
|
|
4012
|
+
const path = paths.slice(0, -1).join(this.pathSystem.separator);
|
|
4013
|
+
return new DocDirectoryReference({
|
|
4014
|
+
archiveDirectoryName: this.props.config.archiveDirectoryName,
|
|
4015
|
+
indexFileName: this.props.config.indexFileName,
|
|
4016
|
+
fileSystem: this.fileSystem,
|
|
4017
|
+
path,
|
|
4018
|
+
pathSystem: this.pathSystem,
|
|
4019
|
+
customSchema: this.customSchema,
|
|
4020
|
+
config: this.props.config
|
|
4021
|
+
});
|
|
4022
|
+
}
|
|
4007
4023
|
return new DocDirectoryReference({
|
|
4008
4024
|
archiveDirectoryName: this.props.config.archiveDirectoryName,
|
|
4009
4025
|
indexFileName: this.props.config.indexFileName,
|
|
4010
4026
|
fileSystem: this.fileSystem,
|
|
4011
4027
|
path: this.directoryPath,
|
|
4012
4028
|
pathSystem: this.pathSystem,
|
|
4013
|
-
customSchema: customSchema
|
|
4029
|
+
customSchema: this.customSchema,
|
|
4014
4030
|
config: this.props.config
|
|
4015
4031
|
});
|
|
4016
4032
|
}
|
|
@@ -4147,7 +4163,8 @@ var DocFileUnknownReference = class _DocFileUnknownReference {
|
|
|
4147
4163
|
path: archivePath,
|
|
4148
4164
|
fileSystem: this.fileSystem,
|
|
4149
4165
|
pathSystem: this.pathSystem,
|
|
4150
|
-
config: this.props.config
|
|
4166
|
+
config: this.props.config,
|
|
4167
|
+
customSchema: this.customSchema
|
|
4151
4168
|
});
|
|
4152
4169
|
}
|
|
4153
4170
|
/**
|
|
@@ -4172,7 +4189,8 @@ var DocFileUnknownReference = class _DocFileUnknownReference {
|
|
|
4172
4189
|
path: restorePath,
|
|
4173
4190
|
fileSystem: this.fileSystem,
|
|
4174
4191
|
pathSystem: this.pathSystem,
|
|
4175
|
-
config: this.props.config
|
|
4192
|
+
config: this.props.config,
|
|
4193
|
+
customSchema: this.customSchema
|
|
4176
4194
|
});
|
|
4177
4195
|
}
|
|
4178
4196
|
};
|
|
@@ -4254,7 +4272,8 @@ var DocDirectoryReference = class _DocDirectoryReference {
|
|
|
4254
4272
|
path: this.pathSystem.join(this.relativePath, fileName),
|
|
4255
4273
|
fileSystem: this.fileSystem,
|
|
4256
4274
|
pathSystem: this.pathSystem,
|
|
4257
|
-
config: this.props.config
|
|
4275
|
+
config: this.props.config,
|
|
4276
|
+
customSchema: this.customSchema
|
|
4258
4277
|
});
|
|
4259
4278
|
}
|
|
4260
4279
|
const archivedFileNames = await this.archivedFileNames();
|
|
@@ -4283,7 +4302,8 @@ var DocDirectoryReference = class _DocDirectoryReference {
|
|
|
4283
4302
|
),
|
|
4284
4303
|
fileSystem: this.fileSystem,
|
|
4285
4304
|
pathSystem: this.pathSystem,
|
|
4286
|
-
config: this.props.config
|
|
4305
|
+
config: this.props.config,
|
|
4306
|
+
customSchema: this.customSchema
|
|
4287
4307
|
});
|
|
4288
4308
|
}
|
|
4289
4309
|
}
|
|
@@ -4330,7 +4350,8 @@ var DocDirectoryReference = class _DocDirectoryReference {
|
|
|
4330
4350
|
path: filePath,
|
|
4331
4351
|
fileSystem: this.fileSystem,
|
|
4332
4352
|
pathSystem: this.pathSystem,
|
|
4333
|
-
config: this.props.config
|
|
4353
|
+
config: this.props.config,
|
|
4354
|
+
customSchema: this.customSchema
|
|
4334
4355
|
});
|
|
4335
4356
|
}
|
|
4336
4357
|
mdFile(fileName) {
|
|
@@ -4972,7 +4993,8 @@ var DocClient = class {
|
|
|
4972
4993
|
path: relativePath,
|
|
4973
4994
|
fileSystem: this.fileSystem,
|
|
4974
4995
|
pathSystem: this.pathSystem,
|
|
4975
|
-
config: this.config
|
|
4996
|
+
config: this.config,
|
|
4997
|
+
customSchema: {}
|
|
4976
4998
|
});
|
|
4977
4999
|
}
|
|
4978
5000
|
/**
|
|
@@ -6363,7 +6385,6 @@ export {
|
|
|
6363
6385
|
zDocFileUnknown,
|
|
6364
6386
|
zDocMetaField,
|
|
6365
6387
|
zDocMetaFieldBoolean,
|
|
6366
|
-
zDocMetaFieldMultiBoolean,
|
|
6367
6388
|
zDocMetaFieldMultiNumber,
|
|
6368
6389
|
zDocMetaFieldMultiRelation,
|
|
6369
6390
|
zDocMetaFieldMultiSelectNumber,
|
package/build/models.d.ts
CHANGED
|
@@ -224,20 +224,19 @@ declare const zDocMetaFieldSelectNumber: z.ZodNullable<z.ZodNumber>;
|
|
|
224
224
|
declare const zDocMetaFieldRelation: z.ZodNullable<z.ZodString>;
|
|
225
225
|
declare const zDocMetaFieldMultiText: z.ZodArray<z.ZodString>;
|
|
226
226
|
declare const zDocMetaFieldMultiNumber: z.ZodArray<z.ZodNumber>;
|
|
227
|
-
declare const zDocMetaFieldMultiBoolean: z.ZodArray<z.ZodBoolean>;
|
|
228
227
|
declare const zDocMetaFieldMultiSelectText: z.ZodArray<z.ZodString>;
|
|
229
228
|
declare const zDocMetaFieldMultiSelectNumber: z.ZodArray<z.ZodNumber>;
|
|
230
229
|
declare const zDocMetaFieldMultiRelation: z.ZodArray<z.ZodString>;
|
|
231
|
-
declare const zDocMetaField: z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.
|
|
230
|
+
declare const zDocMetaField: z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>]>;
|
|
232
231
|
/**
|
|
233
232
|
* FrontMatter schema (internal use - only nullable)
|
|
234
233
|
*/
|
|
235
|
-
declare const zDocFileMdMeta: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.
|
|
234
|
+
declare const zDocFileMdMeta: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>]>>;
|
|
236
235
|
/**
|
|
237
236
|
* FrontMatter input schema (allows undefined for external APIs)
|
|
238
237
|
* Transforms undefined to null for internal consistency
|
|
239
238
|
*/
|
|
240
|
-
declare const zDocFileMdMetaInput: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.
|
|
239
|
+
declare const zDocFileMdMetaInput: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>]>, z.ZodUndefined]>>;
|
|
241
240
|
/**
|
|
242
241
|
* Schema definition
|
|
243
242
|
* Mapping of field names to schema fields
|
|
@@ -708,7 +707,7 @@ declare const zDocFileMdContent: z.ZodObject<{
|
|
|
708
707
|
body: z.ZodString;
|
|
709
708
|
title: z.ZodString;
|
|
710
709
|
description: z.ZodString;
|
|
711
|
-
meta: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.
|
|
710
|
+
meta: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>]>>;
|
|
712
711
|
}, z.core.$strip>;
|
|
713
712
|
/**
|
|
714
713
|
* Markdown content input (allows undefined in meta) - for external APIs
|
|
@@ -718,7 +717,7 @@ declare const zDocFileMdContentInput: z.ZodObject<{
|
|
|
718
717
|
body: z.ZodString;
|
|
719
718
|
title: z.ZodString;
|
|
720
719
|
description: z.ZodString;
|
|
721
|
-
meta: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.
|
|
720
|
+
meta: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>]>, z.ZodUndefined]>>;
|
|
722
721
|
}, z.core.$strip>;
|
|
723
722
|
/**
|
|
724
723
|
* Markdown content information (for index files)
|
|
@@ -933,7 +932,7 @@ declare const zDocFileMd: z.ZodObject<{
|
|
|
933
932
|
body: z.ZodString;
|
|
934
933
|
title: z.ZodString;
|
|
935
934
|
description: z.ZodString;
|
|
936
|
-
meta: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.
|
|
935
|
+
meta: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>]>>;
|
|
937
936
|
}, z.core.$strip>;
|
|
938
937
|
isArchived: z.ZodBoolean;
|
|
939
938
|
}, z.core.$strip>;
|
|
@@ -953,7 +952,7 @@ declare const zDocFileMdInput: z.ZodObject<{
|
|
|
953
952
|
body: z.ZodString;
|
|
954
953
|
title: z.ZodString;
|
|
955
954
|
description: z.ZodString;
|
|
956
|
-
meta: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.
|
|
955
|
+
meta: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>]>, z.ZodUndefined]>>;
|
|
957
956
|
}, z.core.$strip>;
|
|
958
957
|
isArchived: z.ZodBoolean;
|
|
959
958
|
}, z.core.$strip>;
|
|
@@ -1065,7 +1064,7 @@ declare const zDocFile: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1065
1064
|
body: z.ZodString;
|
|
1066
1065
|
title: z.ZodString;
|
|
1067
1066
|
description: z.ZodString;
|
|
1068
|
-
meta: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.
|
|
1067
|
+
meta: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>]>>;
|
|
1069
1068
|
}, z.core.$strip>;
|
|
1070
1069
|
isArchived: z.ZodBoolean;
|
|
1071
1070
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1093,7 +1092,7 @@ declare const zDocFileDirectory: z.ZodUnion<readonly [z.ZodObject<{
|
|
|
1093
1092
|
body: z.ZodString;
|
|
1094
1093
|
title: z.ZodString;
|
|
1095
1094
|
description: z.ZodString;
|
|
1096
|
-
meta: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.
|
|
1095
|
+
meta: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodBoolean>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodNullable<z.ZodNumber>, z.ZodNullable<z.ZodString>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>, z.ZodArray<z.ZodNumber>, z.ZodArray<z.ZodString>]>>;
|
|
1097
1096
|
}, z.core.$strip>;
|
|
1098
1097
|
isArchived: z.ZodBoolean;
|
|
1099
1098
|
}, z.core.$strip>, z.ZodObject<{
|
|
@@ -1144,4 +1143,4 @@ declare const zDocClientConfig: z.ZodObject<{
|
|
|
1144
1143
|
directoryExcludes: z.ZodArray<z.ZodString>;
|
|
1145
1144
|
}, z.core.$strip>;
|
|
1146
1145
|
|
|
1147
|
-
export { zDocClientConfig, zDocCustomSchema, zDocCustomSchemaField, zDocCustomSchemaFieldBoolean, zDocCustomSchemaFieldMultiNumber, zDocCustomSchemaFieldMultiRelation, zDocCustomSchemaFieldMultiSelectNumber, zDocCustomSchemaFieldMultiSelectText, zDocCustomSchemaFieldMultiText, zDocCustomSchemaFieldNumber, zDocCustomSchemaFieldRelation, zDocCustomSchemaFieldSelectNumber, zDocCustomSchemaFieldSelectText, zDocCustomSchemaFieldText, zDocFile, zDocFileDirectory, zDocFileIndex, zDocFileIndexContent, zDocFileIndexMeta, zDocFileIndexMetaInput, zDocFileIndexSchema, zDocFileIndexSchemaField, zDocFileIndexSchemaInput, zDocFileMd, zDocFileMdContent, zDocFileMdContentInput, zDocFileMdInput, zDocFileMdMeta, zDocFileMdMetaInput, zDocFilePath, zDocFileUnknown, zDocMetaField, zDocMetaFieldBoolean,
|
|
1146
|
+
export { zDocClientConfig, zDocCustomSchema, zDocCustomSchemaField, zDocCustomSchemaFieldBoolean, zDocCustomSchemaFieldMultiNumber, zDocCustomSchemaFieldMultiRelation, zDocCustomSchemaFieldMultiSelectNumber, zDocCustomSchemaFieldMultiSelectText, zDocCustomSchemaFieldMultiText, zDocCustomSchemaFieldNumber, zDocCustomSchemaFieldRelation, zDocCustomSchemaFieldSelectNumber, zDocCustomSchemaFieldSelectText, zDocCustomSchemaFieldText, zDocFile, zDocFileDirectory, zDocFileIndex, zDocFileIndexContent, zDocFileIndexMeta, zDocFileIndexMetaInput, zDocFileIndexSchema, zDocFileIndexSchemaField, zDocFileIndexSchemaInput, zDocFileMd, zDocFileMdContent, zDocFileMdContentInput, zDocFileMdInput, zDocFileMdMeta, zDocFileMdMetaInput, zDocFilePath, zDocFileUnknown, zDocMetaField, zDocMetaFieldBoolean, zDocMetaFieldMultiNumber, zDocMetaFieldMultiRelation, zDocMetaFieldMultiSelectNumber, zDocMetaFieldMultiSelectText, zDocMetaFieldMultiText, zDocMetaFieldNumber, zDocMetaFieldRelation, zDocMetaFieldSelectNumber, zDocMetaFieldSelectText, zDocMetaFieldText, zDocMetaFieldType, zDocMetaFieldTypeBoolean, zDocMetaFieldTypeMultiNumber, zDocMetaFieldTypeMultiRelation, zDocMetaFieldTypeMultiSelectNumber, zDocMetaFieldTypeMultiSelectText, zDocMetaFieldTypeMultiText, zDocMetaFieldTypeNumber, zDocMetaFieldTypeRelation, zDocMetaFieldTypeSelectNumber, zDocMetaFieldTypeSelectText, zDocMetaFieldTypeText, zDocRelation, zDocRelationField, zDocRelationFile, zDocSchemaFieldBoolean, zDocSchemaFieldMultiNumber, zDocSchemaFieldMultiRelation, zDocSchemaFieldMultiSelectNumber, zDocSchemaFieldMultiSelectText, zDocSchemaFieldMultiText, zDocSchemaFieldNumber, zDocSchemaFieldRelation, zDocSchemaFieldSelectNumber, zDocSchemaFieldSelectText, zDocSchemaFieldText, zDocTreeDirectoryNode, zDocTreeFileNode, zDocTreeNode };
|
package/build/models.js
CHANGED
|
@@ -136,7 +136,6 @@ var zDocMetaFieldSelectNumber = z.number().nullable();
|
|
|
136
136
|
var zDocMetaFieldRelation = z.string().nullable();
|
|
137
137
|
var zDocMetaFieldMultiText = z.string().array();
|
|
138
138
|
var zDocMetaFieldMultiNumber = z.number().array();
|
|
139
|
-
var zDocMetaFieldMultiBoolean = z.boolean().array();
|
|
140
139
|
var zDocMetaFieldMultiSelectText = z.string().array();
|
|
141
140
|
var zDocMetaFieldMultiSelectNumber = z.number().array();
|
|
142
141
|
var zDocMetaFieldMultiRelation = z.string().array();
|
|
@@ -149,11 +148,9 @@ var zDocMetaField = z.union([
|
|
|
149
148
|
zDocMetaFieldRelation,
|
|
150
149
|
zDocMetaFieldMultiText,
|
|
151
150
|
zDocMetaFieldMultiNumber,
|
|
152
|
-
zDocMetaFieldMultiBoolean,
|
|
153
151
|
zDocMetaFieldMultiSelectText,
|
|
154
152
|
zDocMetaFieldMultiSelectNumber,
|
|
155
|
-
zDocMetaFieldMultiRelation
|
|
156
|
-
z.null()
|
|
153
|
+
zDocMetaFieldMultiRelation
|
|
157
154
|
]);
|
|
158
155
|
var zDocFileMdMeta = z.record(z.string(), zDocMetaField);
|
|
159
156
|
var zDocFileMdMetaInput = z.record(
|
|
@@ -359,7 +356,6 @@ export {
|
|
|
359
356
|
zDocFileUnknown,
|
|
360
357
|
zDocMetaField,
|
|
361
358
|
zDocMetaFieldBoolean,
|
|
362
|
-
zDocMetaFieldMultiBoolean,
|
|
363
359
|
zDocMetaFieldMultiNumber,
|
|
364
360
|
zDocMetaFieldMultiRelation,
|
|
365
361
|
zDocMetaFieldMultiSelectNumber,
|