@interactive-inc/docs-client 1.0.19 → 1.0.20

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 CHANGED
@@ -1,6 +1,7 @@
1
1
  import { z } from 'zod';
2
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
+ import { Octokit } from '@octokit/rest';
4
5
 
5
6
  /**
6
7
  * Path operations system
@@ -41,104 +42,6 @@ declare class DocPathSystem {
41
42
  isAbsolute(path: string): boolean;
42
43
  }
43
44
 
44
- type Props$9 = {
45
- basePath: string;
46
- pathSystem?: DocPathSystem;
47
- };
48
- /**
49
- * File system wrapper
50
- */
51
- declare class DocFileSystem {
52
- private readonly basePath;
53
- private readonly pathSystem;
54
- constructor(props: Props$9);
55
- /**
56
- * Read file content at the specified path
57
- */
58
- readFile(relativePath: string): Promise<string | null | Error>;
59
- /**
60
- * Write content to file at the specified path (creates directory if needed)
61
- */
62
- writeFile(relativePath: string, content: string): Promise<Error | null>;
63
- /**
64
- * Delete file at the specified path
65
- */
66
- deleteFile(relativePath: string): Promise<Error | null>;
67
- /**
68
- * Get file name from path
69
- */
70
- readFileName(relativePath: string): string;
71
- /**
72
- * Get file extension from path
73
- */
74
- readFileExtension(relativePath: string): string;
75
- /**
76
- * Get directory path where the file exists
77
- */
78
- readFileDirectory(relativePath: string): string;
79
- /**
80
- * Get list of entries in directory
81
- */
82
- readDirectoryFileNames(relativePath?: string): Promise<string[] | Error>;
83
- readDirectoryFilePaths(relativePath: string): Promise<string[] | Error>;
84
- /**
85
- * Check if path is a directory
86
- */
87
- isDirectory(relativePath: string): Promise<boolean>;
88
- /**
89
- * Check if path is a file
90
- */
91
- isFile(relativePath: string): Promise<boolean>;
92
- /**
93
- * Check if file or directory exists
94
- */
95
- exists(relativePath: string): Promise<boolean>;
96
- /**
97
- * Check if directory exists
98
- */
99
- directoryExists(relativePath: string): Promise<boolean>;
100
- /**
101
- * Check if file exists
102
- */
103
- fileExists(relativePath: string): Promise<boolean>;
104
- /**
105
- * Get base path
106
- */
107
- getBasePath(): string;
108
- /**
109
- * Convert relative path to absolute path
110
- */
111
- resolve(relativePath: string): string;
112
- /**
113
- * Create directory
114
- */
115
- createDirectory(relativePath: string): Promise<Error | null>;
116
- /**
117
- * Get file size in bytes
118
- */
119
- getFileSize(relativePath: string): Promise<number | Error>;
120
- /**
121
- * Create directory if it doesn't exist
122
- */
123
- ensureDirectoryExists(relativePath: string): Promise<Error | null>;
124
- /**
125
- * Copy file
126
- */
127
- copyFile(sourcePath: string, destinationPath: string): Promise<Error | null>;
128
- /**
129
- * Move file
130
- */
131
- moveFile(sourcePath: string, destinationPath: string): Promise<Error | null>;
132
- /**
133
- * Get file last modified time
134
- */
135
- getFileModifiedTime(relativePath: string): Promise<Date | Error>;
136
- /**
137
- * Get file creation time
138
- */
139
- getFileCreatedTime(relativePath: string): Promise<Date | Error>;
140
- }
141
-
142
45
  /**
143
46
  * Meta
144
47
  */
@@ -273,7 +176,7 @@ declare class DocFileMdEntity<T extends DocCustomSchema> {
273
176
  toJson(): z.infer<typeof zDocFileMd>;
274
177
  }
275
178
 
276
- type Props$8<T extends DocCustomSchema> = {
179
+ type Props$f<T extends DocCustomSchema> = {
277
180
  path: string;
278
181
  fileSystem: DocFileSystem;
279
182
  pathSystem: DocPathSystem;
@@ -287,7 +190,7 @@ declare class DocFileMdReference<T extends DocCustomSchema> {
287
190
  private readonly props;
288
191
  private readonly pathSystem;
289
192
  private readonly customSchema;
290
- constructor(props: Props$8<T>);
193
+ constructor(props: Props$f<T>);
291
194
  get fileSystem(): DocFileSystem;
292
195
  get basePath(): string;
293
196
  get path(): string;
@@ -396,7 +299,7 @@ declare class DocFileUnknownEntity {
396
299
  toJson(): z.infer<typeof zDocFileUnknown>;
397
300
  }
398
301
 
399
- type Props$7<T extends DocCustomSchema> = {
302
+ type Props$e<T extends DocCustomSchema> = {
400
303
  path: string;
401
304
  fileSystem: DocFileSystem;
402
305
  pathSystem: DocPathSystem;
@@ -410,7 +313,7 @@ declare class DocFileUnknownReference<T extends DocCustomSchema> {
410
313
  private readonly props;
411
314
  private readonly pathSystem;
412
315
  private readonly customSchema;
413
- constructor(props: Props$7<T>);
316
+ constructor(props: Props$e<T>);
414
317
  get fileSystem(): DocFileSystem;
415
318
  get basePath(): string;
416
319
  get path(): string;
@@ -820,129 +723,329 @@ type GetIndexFieldType<Schema extends DocFileIndexSchema<RecordKey>, K extends k
820
723
  * Infers DocFileMd type from the result of defineSchema
821
724
  */
822
725
  type InferDocFileMd<T> = T extends DocCustomSchema ? DocFileMd<T> : never;
823
-
824
726
  /**
825
- * Relation file
727
+ * Read-only file system interface for document operations
826
728
  */
827
- declare class DocRelationFileValue {
828
- private readonly value;
829
- constructor(value: DocRelationFile);
729
+ type DocFileSystemReadType = {
830
730
  /**
831
- * File path
731
+ * Read file content at the specified path
832
732
  */
833
- get id(): string;
733
+ readFile(relativePath: string): Promise<string | null | Error>;
834
734
  /**
835
- * Slug
735
+ * Get file name from path
836
736
  */
837
- get slug(): string;
737
+ readFileName(relativePath: string): string;
838
738
  /**
839
- * Display label
739
+ * Get file extension from path
840
740
  */
841
- get label(): string;
741
+ readFileExtension(relativePath: string): string;
842
742
  /**
843
- * Convert to JSON format
743
+ * Get directory path where the file exists
844
744
  */
845
- toJson(): DocRelationFile;
745
+ readFileDirectory(relativePath: string): string;
846
746
  /**
847
- * Extract file name from file path (without extension)
747
+ * Get list of entries in directory
848
748
  */
849
- private static extractFileName;
749
+ readDirectoryFileNames(relativePath?: string): Promise<string[] | Error>;
850
750
  /**
851
- * Create from file path and title
751
+ * Get list of file paths in directory
852
752
  */
853
- static from(filePath: string, title: string | null): DocRelationFileValue;
854
- }
855
-
753
+ readDirectoryFilePaths(relativePath: string): Promise<string[] | Error>;
754
+ /**
755
+ * Check if path is a directory
756
+ */
757
+ isDirectory(relativePath: string): Promise<boolean>;
758
+ /**
759
+ * Check if path is a file
760
+ */
761
+ isFile(relativePath: string): Promise<boolean>;
762
+ /**
763
+ * Check if file or directory exists
764
+ */
765
+ exists(relativePath: string): Promise<boolean>;
766
+ /**
767
+ * Check if directory exists
768
+ */
769
+ directoryExists(relativePath: string): Promise<boolean>;
770
+ /**
771
+ * Check if file exists
772
+ */
773
+ fileExists(relativePath: string): Promise<boolean>;
774
+ /**
775
+ * Get base path
776
+ */
777
+ getBasePath(): string;
778
+ /**
779
+ * Convert relative path to absolute path
780
+ */
781
+ resolve(relativePath: string): string;
782
+ /**
783
+ * Get file size in bytes
784
+ */
785
+ getFileSize(relativePath: string): Promise<number | Error>;
786
+ /**
787
+ * Get file last modified time
788
+ */
789
+ getFileModifiedTime(relativePath: string): Promise<Date | Error>;
790
+ /**
791
+ * Get file creation time
792
+ */
793
+ getFileCreatedTime(relativePath: string): Promise<Date | Error>;
794
+ };
856
795
  /**
857
- * Manages relation information
796
+ * Write-only file system interface for document operations
858
797
  */
859
- declare class DocRelationValue {
860
- readonly value: DocRelation;
861
- constructor(value: DocRelation);
798
+ type DocFileSystemWriteType = {
862
799
  /**
863
- * Relation path
800
+ * Write content to file at the specified path (creates directory if needed)
864
801
  */
865
- get path(): string;
802
+ writeFile(relativePath: string, content: string): Promise<Error | null>;
866
803
  /**
867
- * Get file count
804
+ * Delete file at the specified path
868
805
  */
869
- get fileCount(): number;
806
+ deleteFile(relativePath: string): Promise<Error | null>;
870
807
  /**
871
- * Whether it's empty
808
+ * Create directory
872
809
  */
873
- get isEmpty(): boolean;
810
+ createDirectory(relativePath: string): Promise<Error | null>;
874
811
  /**
875
- * List of related files (value objects)
812
+ * Create directory if it doesn't exist
876
813
  */
877
- files(): DocRelationFileValue[];
814
+ ensureDirectoryExists(relativePath: string): Promise<Error | null>;
878
815
  /**
879
- * Export as JSON format
816
+ * Copy file
880
817
  */
881
- toJson(): DocRelation;
818
+ copyFile(sourcePath: string, destinationPath: string): Promise<Error | null>;
882
819
  /**
883
- * Create empty relation entity
820
+ * Move file
884
821
  */
885
- static empty(path: string): DocRelationValue;
886
- }
822
+ moveFile(sourcePath: string, destinationPath: string): Promise<Error | null>;
823
+ };
887
824
 
888
- type Props$6 = {
889
- filePath: string;
890
- fileSystem: DocFileSystem;
891
- pathSystem: DocPathSystem;
825
+ type Props$d = {
826
+ basePath: string;
827
+ pathSystem?: DocPathSystem;
828
+ reader?: DocFileSystemReadType;
829
+ writer?: DocFileSystemWriteType;
892
830
  };
893
831
  /**
894
- * Relation file reference
832
+ * File system wrapper with optional dependency injection for read/write operations
895
833
  */
896
- declare class DocFileRelationReference {
897
- private readonly props;
898
- private readonly pathSystem;
899
- constructor(props: Props$6);
900
- get fileSystem(): DocFileSystem;
901
- get basePath(): string;
834
+ declare class DocFileSystem {
835
+ protected readonly reader: DocFileSystemReadType;
836
+ protected readonly writer: DocFileSystemWriteType;
837
+ protected readonly basePath: string;
838
+ protected readonly pathSystem: DocPathSystem;
839
+ constructor(props: Props$d);
902
840
  /**
903
- * Relation path
841
+ * Read file content at the specified path
904
842
  */
905
- get path(): string;
843
+ readFile(relativePath: string): Promise<string | null | Error>;
906
844
  /**
907
- * Full path
845
+ * Write content to file at the specified path (creates directory if needed)
908
846
  */
909
- get fullPath(): string;
910
- read(): Promise<DocRelationValue | Error | null>;
847
+ writeFile(relativePath: string, content: string): Promise<Error | null>;
911
848
  /**
912
- * Read list of relation files
849
+ * Delete file at the specified path
913
850
  */
914
- readFiles(): Promise<DocRelationFileValue[] | Error>;
851
+ deleteFile(relativePath: string): Promise<Error | null>;
915
852
  /**
916
- * Read single relation file
853
+ * Get file name from path
917
854
  */
918
- readFile(filePath: string): Promise<DocRelationFileValue | Error | null>;
855
+ readFileName(relativePath: string): string;
919
856
  /**
920
- * Check if file exists
857
+ * Get file extension from path
921
858
  */
922
- exists(slug: string): Promise<boolean>;
859
+ readFileExtension(relativePath: string): string;
923
860
  /**
924
- * Get list of file names (without extension)
861
+ * Get directory path where the file exists
925
862
  */
926
- readSlugs(): Promise<string[] | Error>;
863
+ readFileDirectory(relativePath: string): string;
927
864
  /**
928
- * Get file count
865
+ * Get list of entries in directory
929
866
  */
930
- count(): Promise<number | Error>;
867
+ readDirectoryFileNames(relativePath?: string): Promise<string[] | Error>;
868
+ readDirectoryFilePaths(relativePath: string): Promise<string[] | Error>;
931
869
  /**
932
- * Check if empty
870
+ * Check if path is a directory
933
871
  */
934
- isEmpty(): Promise<boolean | Error>;
935
- }
936
-
937
- /**
938
- * Single boolean type schema field
939
- */
940
- declare class DocSchemaFieldBooleanValue<T extends RecordKey> {
941
- readonly key: T;
942
- readonly value: DocSchemaFieldBoolean;
943
- constructor(key: T, value: DocSchemaFieldBoolean);
944
- get type(): "boolean";
945
- get required(): boolean;
872
+ isDirectory(relativePath: string): Promise<boolean>;
873
+ /**
874
+ * Check if path is a file
875
+ */
876
+ isFile(relativePath: string): Promise<boolean>;
877
+ /**
878
+ * Check if file or directory exists
879
+ */
880
+ exists(relativePath: string): Promise<boolean>;
881
+ /**
882
+ * Check if directory exists
883
+ */
884
+ directoryExists(relativePath: string): Promise<boolean>;
885
+ /**
886
+ * Check if file exists
887
+ */
888
+ fileExists(relativePath: string): Promise<boolean>;
889
+ /**
890
+ * Get base path
891
+ */
892
+ getBasePath(): string;
893
+ /**
894
+ * Convert relative path to absolute path
895
+ */
896
+ resolve(relativePath: string): string;
897
+ /**
898
+ * Create directory
899
+ */
900
+ createDirectory(relativePath: string): Promise<Error | null>;
901
+ /**
902
+ * Get file size in bytes
903
+ */
904
+ getFileSize(relativePath: string): Promise<number | Error>;
905
+ /**
906
+ * Create directory if it doesn't exist
907
+ */
908
+ ensureDirectoryExists(relativePath: string): Promise<Error | null>;
909
+ /**
910
+ * Copy file
911
+ */
912
+ copyFile(sourcePath: string, destinationPath: string): Promise<Error | null>;
913
+ /**
914
+ * Move file
915
+ */
916
+ moveFile(sourcePath: string, destinationPath: string): Promise<Error | null>;
917
+ /**
918
+ * Get file last modified time
919
+ */
920
+ getFileModifiedTime(relativePath: string): Promise<Date | Error>;
921
+ /**
922
+ * Get file creation time
923
+ */
924
+ getFileCreatedTime(relativePath: string): Promise<Date | Error>;
925
+ }
926
+
927
+ /**
928
+ * Relation file
929
+ */
930
+ declare class DocRelationFileValue {
931
+ private readonly value;
932
+ constructor(value: DocRelationFile);
933
+ /**
934
+ * File path
935
+ */
936
+ get id(): string;
937
+ /**
938
+ * Slug
939
+ */
940
+ get slug(): string;
941
+ /**
942
+ * Display label
943
+ */
944
+ get label(): string;
945
+ /**
946
+ * Convert to JSON format
947
+ */
948
+ toJson(): DocRelationFile;
949
+ /**
950
+ * Extract file name from file path (without extension)
951
+ */
952
+ private static extractFileName;
953
+ /**
954
+ * Create from file path and title
955
+ */
956
+ static from(filePath: string, title: string | null): DocRelationFileValue;
957
+ }
958
+
959
+ /**
960
+ * Manages relation information
961
+ */
962
+ declare class DocRelationValue {
963
+ readonly value: DocRelation;
964
+ constructor(value: DocRelation);
965
+ /**
966
+ * Relation path
967
+ */
968
+ get path(): string;
969
+ /**
970
+ * Get file count
971
+ */
972
+ get fileCount(): number;
973
+ /**
974
+ * Whether it's empty
975
+ */
976
+ get isEmpty(): boolean;
977
+ /**
978
+ * List of related files (value objects)
979
+ */
980
+ files(): DocRelationFileValue[];
981
+ /**
982
+ * Export as JSON format
983
+ */
984
+ toJson(): DocRelation;
985
+ /**
986
+ * Create empty relation entity
987
+ */
988
+ static empty(path: string): DocRelationValue;
989
+ }
990
+
991
+ type Props$c = {
992
+ filePath: string;
993
+ fileSystem: DocFileSystem;
994
+ pathSystem: DocPathSystem;
995
+ };
996
+ /**
997
+ * Relation file reference
998
+ */
999
+ declare class DocFileRelationReference {
1000
+ private readonly props;
1001
+ private readonly pathSystem;
1002
+ constructor(props: Props$c);
1003
+ get fileSystem(): DocFileSystem;
1004
+ get basePath(): string;
1005
+ /**
1006
+ * Relation path
1007
+ */
1008
+ get path(): string;
1009
+ /**
1010
+ * Full path
1011
+ */
1012
+ get fullPath(): string;
1013
+ read(): Promise<DocRelationValue | Error | null>;
1014
+ /**
1015
+ * Read list of relation files
1016
+ */
1017
+ readFiles(): Promise<DocRelationFileValue[] | Error>;
1018
+ /**
1019
+ * Read single relation file
1020
+ */
1021
+ readFile(filePath: string): Promise<DocRelationFileValue | Error | null>;
1022
+ /**
1023
+ * Check if file exists
1024
+ */
1025
+ exists(slug: string): Promise<boolean>;
1026
+ /**
1027
+ * Get list of file names (without extension)
1028
+ */
1029
+ readSlugs(): Promise<string[] | Error>;
1030
+ /**
1031
+ * Get file count
1032
+ */
1033
+ count(): Promise<number | Error>;
1034
+ /**
1035
+ * Check if empty
1036
+ */
1037
+ isEmpty(): Promise<boolean | Error>;
1038
+ }
1039
+
1040
+ /**
1041
+ * Single boolean type schema field
1042
+ */
1043
+ declare class DocSchemaFieldBooleanValue<T extends RecordKey> {
1044
+ readonly key: T;
1045
+ readonly value: DocSchemaFieldBoolean;
1046
+ constructor(key: T, value: DocSchemaFieldBoolean);
1047
+ get type(): "boolean";
1048
+ get required(): boolean;
946
1049
  get title(): string;
947
1050
  get description(): string;
948
1051
  get default(): boolean | null;
@@ -1398,7 +1501,7 @@ declare class DocFileIndexEntity<T extends DocCustomSchema> {
1398
1501
  toJson(): DocFileIndexAny;
1399
1502
  }
1400
1503
 
1401
- type Props$5<T extends DocCustomSchema> = {
1504
+ type Props$b<T extends DocCustomSchema> = {
1402
1505
  customSchema: T;
1403
1506
  path: string;
1404
1507
  fileSystem: DocFileSystem;
@@ -1412,7 +1515,7 @@ declare class DocFileIndexReference<T extends DocCustomSchema> {
1412
1515
  private readonly props;
1413
1516
  private readonly pathSystem;
1414
1517
  private readonly customSchema;
1415
- constructor(props: Props$5<T>);
1518
+ constructor(props: Props$b<T>);
1416
1519
  get fileSystem(): DocFileSystem;
1417
1520
  get basePath(): string;
1418
1521
  get filePath(): string;
@@ -1477,7 +1580,7 @@ type DocFileDirectoryReference<T extends DocCustomSchema> = DocFileMdReference<T
1477
1580
  type DocFileEntity<T extends DocCustomSchema> = DocFileMdEntity<T> | DocFileIndexEntity<T> | DocFileUnknownEntity;
1478
1581
  type DocFileDirectoryEntity<T extends DocCustomSchema> = DocFileMdEntity<T> | DocFileUnknownEntity;
1479
1582
 
1480
- type Props$4<T extends DocCustomSchema> = {
1583
+ type Props$a<T extends DocCustomSchema> = {
1481
1584
  customSchema: T;
1482
1585
  path: string;
1483
1586
  indexFileName: string;
@@ -1493,7 +1596,7 @@ declare class DocDirectoryReference<T extends DocCustomSchema> {
1493
1596
  private readonly props;
1494
1597
  private readonly pathSystem;
1495
1598
  private readonly customSchema;
1496
- constructor(props: Props$4<T>);
1599
+ constructor(props: Props$a<T>);
1497
1600
  get fileSystem(): DocFileSystem;
1498
1601
  get basePath(): string;
1499
1602
  get config(): DocClientConfig;
@@ -1551,7 +1654,7 @@ declare class DocDirectoryReference<T extends DocCustomSchema> {
1551
1654
 
1552
1655
  declare const DOC_NODE_TYPE_DIRECTORY: "directory";
1553
1656
 
1554
- type Props$3 = {
1657
+ type Props$9 = {
1555
1658
  name: string;
1556
1659
  path: string;
1557
1660
  icon: string;
@@ -1562,7 +1665,7 @@ type Props$3 = {
1562
1665
  */
1563
1666
  declare class DocTreeFileNodeValue {
1564
1667
  private readonly props;
1565
- constructor(props: Props$3);
1668
+ constructor(props: Props$9);
1566
1669
  get name(): string;
1567
1670
  get path(): string;
1568
1671
  get icon(): string;
@@ -1575,7 +1678,7 @@ declare class DocTreeFileNodeValue {
1575
1678
  /**
1576
1679
  * Create from properties
1577
1680
  */
1578
- static from(props: Props$3): DocTreeFileNodeValue;
1681
+ static from(props: Props$9): DocTreeFileNodeValue;
1579
1682
  /**
1580
1683
  * Create from JSON object
1581
1684
  */
@@ -1584,7 +1687,7 @@ declare class DocTreeFileNodeValue {
1584
1687
 
1585
1688
  type DocTreeNodeValue = DocTreeFileNodeValue | DocTreeDirectoryNodeValue;
1586
1689
 
1587
- type Props$2 = {
1690
+ type Props$8 = {
1588
1691
  name: string;
1589
1692
  path: string;
1590
1693
  icon: string;
@@ -1596,7 +1699,7 @@ type Props$2 = {
1596
1699
  */
1597
1700
  declare class DocTreeDirectoryNodeValue {
1598
1701
  private readonly props;
1599
- constructor(props: Props$2);
1702
+ constructor(props: Props$8);
1600
1703
  get name(): string;
1601
1704
  get path(): string;
1602
1705
  get icon(): string;
@@ -1610,14 +1713,14 @@ declare class DocTreeDirectoryNodeValue {
1610
1713
  /**
1611
1714
  * Create from properties
1612
1715
  */
1613
- static from(props: Props$2): DocTreeDirectoryNodeValue;
1716
+ static from(props: Props$8): DocTreeDirectoryNodeValue;
1614
1717
  /**
1615
1718
  * Create from JSON object
1616
1719
  */
1617
1720
  static fromJson(json: unknown): DocTreeDirectoryNodeValue;
1618
1721
  }
1619
1722
 
1620
- type Props$1 = {
1723
+ type Props$7 = {
1621
1724
  fileSystem: DocFileSystem;
1622
1725
  pathSystem: DocPathSystem;
1623
1726
  indexFileName: string;
@@ -1630,7 +1733,7 @@ type Props$1 = {
1630
1733
  declare class DocFileTreeSystem {
1631
1734
  private readonly props;
1632
1735
  private readonly config;
1633
- constructor(props: Props$1);
1736
+ constructor(props: Props$7);
1634
1737
  /**
1635
1738
  * Build file tree recursively
1636
1739
  */
@@ -1705,7 +1808,7 @@ declare class DocMarkdownSystem {
1705
1808
  static from(title: string, description: string, body: string): string;
1706
1809
  }
1707
1810
 
1708
- type Props = {
1811
+ type Props$6 = {
1709
1812
  fileSystem: DocFileSystem;
1710
1813
  pathSystem?: DocPathSystem;
1711
1814
  markdownSystem?: DocMarkdownSystem;
@@ -1721,7 +1824,7 @@ declare class DocClient {
1721
1824
  readonly markdownSystem: DocMarkdownSystem;
1722
1825
  readonly fileTreeSystem: DocFileTreeSystem;
1723
1826
  readonly config: DocClientConfig;
1724
- constructor(props: Props);
1827
+ constructor(props: Props$6);
1725
1828
  basePath(): string;
1726
1829
  file<Path extends string>(relativePath: Path): InferReference<Path, DocCustomSchema>;
1727
1830
  file<Path extends string, T extends DocCustomSchema>(relativePath: Path, customSchema: T): InferReference<Path, T>;
@@ -1735,81 +1838,300 @@ declare class DocClient {
1735
1838
  directoryTree(directoryPath?: string): Promise<DocTreeDirectoryNode[]>;
1736
1839
  }
1737
1840
 
1841
+ declare const zJsonDocumentData$2: z.ZodRecord<z.ZodString, z.ZodString>;
1842
+ type JsonDocumentData$2 = z.infer<typeof zJsonDocumentData$2>;
1843
+ type JsonProps = {
1844
+ data?: JsonDocumentData$2 | unknown;
1845
+ basePath?: string;
1846
+ pathSystem?: DocPathSystem;
1847
+ onDataChange?: (data: JsonDocumentData$2) => void;
1848
+ };
1738
1849
  /**
1739
- * In-memory file system for testing
1850
+ * JSON-based file system with separate read/write components
1740
1851
  */
1741
- declare class DocFileSystemMock extends DocFileSystem {
1742
- private files;
1743
- private readonly _pathSystem;
1744
- private readonly _basePath;
1745
- constructor(props: {
1746
- basePath: string;
1747
- pathSystem: DocPathSystem;
1748
- skipDefaultFiles?: boolean;
1749
- });
1852
+ declare class DocFileSystemJson extends DocFileSystem {
1853
+ private readonly jsonReader;
1854
+ private readonly jsonWriter;
1855
+ constructor(props?: JsonProps);
1750
1856
  /**
1751
- * PathSystem accessor (for testing)
1857
+ * Get the current JSON data
1752
1858
  */
1753
- getPathSystem(): DocPathSystem;
1859
+ getData(): JsonDocumentData$2;
1754
1860
  /**
1755
- * Normalize path using basePath
1861
+ * Update the entire JSON data
1756
1862
  */
1757
- private normalizePath;
1863
+ setData(data: JsonDocumentData$2 | unknown): Error | null;
1758
1864
  /**
1759
- * Create instance (mock data is automatically loaded)
1865
+ * Clear all data
1760
1866
  */
1761
- static create(basePath?: string): DocFileSystemMock;
1867
+ clear(): void;
1762
1868
  /**
1763
- * Factory method for testing
1869
+ * Get all file paths in the JSON data
1764
1870
  */
1765
- static createWithFiles(props: {
1766
- basePath?: string;
1767
- fileContents?: Record<string, string>;
1768
- }): DocFileSystemMock;
1769
- readFile(filePath: string): Promise<string | null | Error>;
1770
- writeFile(filePath: string, content: string): Promise<Error | null>;
1771
- deleteFile(filePath: string): Promise<Error | null>;
1772
- exists(filePath: string): Promise<boolean>;
1773
- copyFile(source: string, destination: string): Promise<Error | null>;
1774
- moveFile(source: string, destination: string): Promise<Error | null>;
1775
- readDirectory(directoryPath: string): Promise<string[]>;
1776
- readDirectoryRecursive(directoryPath: string): Promise<string[]>;
1777
- readDirectoryFilePaths(directoryPath: string): Promise<string[] | Error>;
1778
- createDirectory(_directoryPath: string): Promise<Error | null>;
1779
- deleteDirectory(directoryPath: string): Promise<void>;
1780
- getFileSize(filePath: string): Promise<number | Error>;
1781
- getFileModifiedTime(filePath: string): Promise<Date | Error>;
1782
- getFileCreatedTime(filePath: string): Promise<Date | Error>;
1783
- isDirectory(relativePath: string): Promise<boolean>;
1784
- isFile(relativePath: string): Promise<boolean>;
1871
+ getAllFilePaths(): string[];
1785
1872
  /**
1786
- * Get list of entries in directory
1873
+ * Get the raw JSON data (read-only copy)
1787
1874
  */
1788
- readDirectoryFileNames(directoryPath?: string): Promise<string[] | Error>;
1875
+ getRawData(): JsonDocumentData$2;
1789
1876
  /**
1790
- * Check if directory exists
1877
+ * Create from docs-to-json format
1791
1878
  */
1792
- directoryExists(relativePath: string): Promise<boolean>;
1879
+ static fromDocsToJson(data: Record<string, string> | unknown, options?: Omit<JsonProps, "data">): DocFileSystemJson;
1793
1880
  /**
1794
- * Check if file exists
1881
+ * Export to docs-to-json format
1795
1882
  */
1796
- fileExists(relativePath: string): Promise<boolean>;
1883
+ toDocsToJson(): Record<string, string>;
1884
+ }
1885
+
1886
+ declare const zJsonDocumentData$1: z.ZodRecord<z.ZodString, z.ZodString>;
1887
+ type JsonDocumentData$1 = z.infer<typeof zJsonDocumentData$1>;
1888
+ type Props$5 = {
1889
+ data: JsonDocumentData$1 | unknown;
1890
+ basePath?: string;
1891
+ pathSystem?: DocPathSystem;
1892
+ };
1893
+ /**
1894
+ * JSON-based read-only file system implementation
1895
+ */
1896
+ declare class DocFileSystemJsonRead implements DocFileSystemReadType {
1897
+ private readonly data;
1898
+ private readonly basePath;
1899
+ private readonly pathSystem;
1900
+ constructor(props: Props$5);
1797
1901
  /**
1798
- * Create directory if it doesn't exist
1902
+ * Read file content from JSON data
1799
1903
  */
1800
- ensureDirectoryExists(_relativePath: string): Promise<Error | null>;
1904
+ readFile(relativePath: string): Promise<string | null | Error>;
1801
1905
  /**
1802
- * Clear all files
1906
+ * Get file name from path
1803
1907
  */
1804
- clear(): void;
1908
+ readFileName(relativePath: string): string;
1805
1909
  /**
1806
- * Check file existence (for testing)
1910
+ * Get file extension from path
1807
1911
  */
1808
- hasFile(filePath: string): boolean;
1912
+ readFileExtension(relativePath: string): string;
1809
1913
  /**
1810
- * Get file content (sync version, for testing)
1914
+ * Get directory path where the file exists
1811
1915
  */
1812
- getFileContent(filePath: string): string | undefined;
1916
+ readFileDirectory(relativePath: string): string;
1917
+ /**
1918
+ * Get list of file names in directory
1919
+ */
1920
+ readDirectoryFileNames(relativePath?: string): Promise<string[] | Error>;
1921
+ /**
1922
+ * Get list of file paths in directory
1923
+ */
1924
+ readDirectoryFilePaths(relativePath: string): Promise<string[] | Error>;
1925
+ /**
1926
+ * Check if path is a directory
1927
+ */
1928
+ isDirectory(relativePath: string): Promise<boolean>;
1929
+ /**
1930
+ * Check if path is a file
1931
+ */
1932
+ isFile(relativePath: string): Promise<boolean>;
1933
+ /**
1934
+ * Check if file or directory exists
1935
+ */
1936
+ exists(relativePath: string): Promise<boolean>;
1937
+ /**
1938
+ * Check if directory exists
1939
+ */
1940
+ directoryExists(relativePath: string): Promise<boolean>;
1941
+ /**
1942
+ * Check if file exists
1943
+ */
1944
+ fileExists(relativePath: string): Promise<boolean>;
1945
+ /**
1946
+ * Get base path
1947
+ */
1948
+ getBasePath(): string;
1949
+ /**
1950
+ * Convert relative path to absolute path
1951
+ */
1952
+ resolve(relativePath: string): string;
1953
+ /**
1954
+ * Get file size in bytes
1955
+ */
1956
+ getFileSize(relativePath: string): Promise<number | Error>;
1957
+ /**
1958
+ * Get file last modified time (not available for JSON data)
1959
+ */
1960
+ getFileModifiedTime(_relativePath: string): Promise<Date | Error>;
1961
+ /**
1962
+ * Get file creation time (not available for JSON data)
1963
+ */
1964
+ getFileCreatedTime(_relativePath: string): Promise<Date | Error>;
1965
+ /**
1966
+ * Get all file paths in the JSON data
1967
+ */
1968
+ getAllFilePaths(): string[];
1969
+ /**
1970
+ * Get the raw JSON data
1971
+ */
1972
+ getRawData(): JsonDocumentData$1;
1973
+ /**
1974
+ * Normalize path by removing leading/trailing slashes
1975
+ */
1976
+ private normalizePath;
1977
+ /**
1978
+ * Check if a file path is within a directory
1979
+ */
1980
+ private isFileInDirectory;
1981
+ /**
1982
+ * Get the relative part of a file path from a directory
1983
+ */
1984
+ private getRelativePartFromDirectory;
1985
+ }
1986
+
1987
+ declare const zJsonDocumentData: z.ZodRecord<z.ZodString, z.ZodString>;
1988
+ type JsonDocumentData = z.infer<typeof zJsonDocumentData>;
1989
+ type Props$4 = {
1990
+ data?: JsonDocumentData | unknown;
1991
+ basePath?: string;
1992
+ pathSystem?: DocPathSystem;
1993
+ reader?: DocFileSystemReadType;
1994
+ onDataChange?: (data: JsonDocumentData) => void;
1995
+ };
1996
+ /**
1997
+ * JSON-based write-only file system implementation
1998
+ */
1999
+ declare class DocFileSystemJsonWrite implements DocFileSystemWriteType {
2000
+ private data;
2001
+ private readonly basePath;
2002
+ private readonly pathSystem;
2003
+ private readonly reader?;
2004
+ private readonly onDataChange?;
2005
+ constructor(props?: Props$4);
2006
+ /**
2007
+ * Write content to JSON data
2008
+ */
2009
+ writeFile(relativePath: string, content: string): Promise<Error | null>;
2010
+ /**
2011
+ * Delete file from JSON data
2012
+ */
2013
+ deleteFile(relativePath: string): Promise<Error | null>;
2014
+ /**
2015
+ * Create directory (creates a placeholder entry)
2016
+ */
2017
+ createDirectory(relativePath: string): Promise<Error | null>;
2018
+ /**
2019
+ * Create directory if it doesn't exist
2020
+ */
2021
+ ensureDirectoryExists(relativePath: string): Promise<Error | null>;
2022
+ /**
2023
+ * Copy file within JSON data
2024
+ */
2025
+ copyFile(sourcePath: string, destinationPath: string): Promise<Error | null>;
2026
+ /**
2027
+ * Move file within JSON data
2028
+ */
2029
+ moveFile(sourcePath: string, destinationPath: string): Promise<Error | null>;
2030
+ /**
2031
+ * Get the current JSON data
2032
+ */
2033
+ getData(): JsonDocumentData;
2034
+ /**
2035
+ * Update the entire JSON data
2036
+ */
2037
+ setData(data: JsonDocumentData | unknown): Error | null;
2038
+ /**
2039
+ * Clear all data
2040
+ */
2041
+ clear(): void;
2042
+ /**
2043
+ * Get all file paths in the JSON data
2044
+ */
2045
+ getAllFilePaths(): string[];
2046
+ /**
2047
+ * Normalize path by removing leading/trailing slashes
2048
+ */
2049
+ private normalizePath;
2050
+ /**
2051
+ * Check if directory exists in data
2052
+ */
2053
+ private directoryExistsInData;
2054
+ /**
2055
+ * Notify data change callback
2056
+ */
2057
+ private notifyDataChange;
2058
+ }
2059
+
2060
+ /**
2061
+ * In-memory file system for testing
2062
+ */
2063
+ declare class DocFileSystemMock extends DocFileSystem {
2064
+ private files;
2065
+ private readonly _pathSystem;
2066
+ private readonly _basePath;
2067
+ constructor(props: {
2068
+ basePath: string;
2069
+ pathSystem: DocPathSystem;
2070
+ skipDefaultFiles?: boolean;
2071
+ });
2072
+ /**
2073
+ * PathSystem accessor (for testing)
2074
+ */
2075
+ getPathSystem(): DocPathSystem;
2076
+ /**
2077
+ * Normalize path using basePath
2078
+ */
2079
+ private normalizePath;
2080
+ /**
2081
+ * Create instance (mock data is automatically loaded)
2082
+ */
2083
+ static create(basePath?: string): DocFileSystemMock;
2084
+ /**
2085
+ * Factory method for testing
2086
+ */
2087
+ static createWithFiles(props: {
2088
+ basePath?: string;
2089
+ fileContents?: Record<string, string>;
2090
+ }): DocFileSystemMock;
2091
+ readFile(filePath: string): Promise<string | null | Error>;
2092
+ writeFile(filePath: string, content: string): Promise<Error | null>;
2093
+ deleteFile(filePath: string): Promise<Error | null>;
2094
+ exists(filePath: string): Promise<boolean>;
2095
+ copyFile(source: string, destination: string): Promise<Error | null>;
2096
+ moveFile(source: string, destination: string): Promise<Error | null>;
2097
+ readDirectory(directoryPath: string): Promise<string[]>;
2098
+ readDirectoryRecursive(directoryPath: string): Promise<string[]>;
2099
+ readDirectoryFilePaths(directoryPath: string): Promise<string[] | Error>;
2100
+ createDirectory(_directoryPath: string): Promise<Error | null>;
2101
+ deleteDirectory(directoryPath: string): Promise<void>;
2102
+ getFileSize(filePath: string): Promise<number | Error>;
2103
+ getFileModifiedTime(filePath: string): Promise<Date | Error>;
2104
+ getFileCreatedTime(filePath: string): Promise<Date | Error>;
2105
+ isDirectory(relativePath: string): Promise<boolean>;
2106
+ isFile(relativePath: string): Promise<boolean>;
2107
+ /**
2108
+ * Get list of entries in directory
2109
+ */
2110
+ readDirectoryFileNames(directoryPath?: string): Promise<string[] | Error>;
2111
+ /**
2112
+ * Check if directory exists
2113
+ */
2114
+ directoryExists(relativePath: string): Promise<boolean>;
2115
+ /**
2116
+ * Check if file exists
2117
+ */
2118
+ fileExists(relativePath: string): Promise<boolean>;
2119
+ /**
2120
+ * Create directory if it doesn't exist
2121
+ */
2122
+ ensureDirectoryExists(_relativePath: string): Promise<Error | null>;
2123
+ /**
2124
+ * Clear all files
2125
+ */
2126
+ clear(): void;
2127
+ /**
2128
+ * Check file existence (for testing)
2129
+ */
2130
+ hasFile(filePath: string): boolean;
2131
+ /**
2132
+ * Get file content (sync version, for testing)
2133
+ */
2134
+ getFileContent(filePath: string): string | undefined;
1813
2135
  /**
1814
2136
  * Get all file paths (for testing)
1815
2137
  */
@@ -1824,6 +2146,288 @@ declare class DocFileSystemMock extends DocFileSystem {
1824
2146
  setupTestFiles(files: Record<string, string>): void;
1825
2147
  }
1826
2148
 
2149
+ type GitHubProps = {
2150
+ owner: string;
2151
+ repo: string;
2152
+ basePath: string;
2153
+ branch?: string;
2154
+ token: string;
2155
+ pathSystem?: DocPathSystem;
2156
+ };
2157
+ /**
2158
+ * GitHub repository file system using Octokit with separate read/write components
2159
+ */
2160
+ declare class DocFileSystemOctokit extends DocFileSystem {
2161
+ private readonly owner;
2162
+ private readonly repo;
2163
+ private readonly branch;
2164
+ constructor(props: GitHubProps);
2165
+ /**
2166
+ * Get repository information
2167
+ */
2168
+ getRepositoryInfo(): {
2169
+ owner: string;
2170
+ repo: string;
2171
+ branch: string;
2172
+ };
2173
+ }
2174
+
2175
+ type Props$3 = {
2176
+ owner: string;
2177
+ repo: string;
2178
+ basePath: string;
2179
+ branch?: string;
2180
+ token: string;
2181
+ pathSystem?: DocPathSystem;
2182
+ };
2183
+ type FileCache = {
2184
+ sha: string;
2185
+ content: string;
2186
+ size: number;
2187
+ modifiedTime?: string;
2188
+ };
2189
+ /**
2190
+ * GitHub repository read-only file system using Octokit
2191
+ */
2192
+ declare class DocFileSystemOctokitRead implements DocFileSystemReadType {
2193
+ protected readonly octokit: Octokit;
2194
+ protected readonly owner: string;
2195
+ protected readonly repo: string;
2196
+ protected readonly branch: string;
2197
+ protected readonly pathSystem: DocPathSystem;
2198
+ protected readonly basePath: string;
2199
+ protected fileCache: Map<string, FileCache>;
2200
+ constructor(props: Props$3);
2201
+ /**
2202
+ * Read file content from GitHub repository
2203
+ */
2204
+ readFile(relativePath: string): Promise<string | null | Error>;
2205
+ /**
2206
+ * Get file name from path
2207
+ */
2208
+ readFileName(relativePath: string): string;
2209
+ /**
2210
+ * Get file extension from path
2211
+ */
2212
+ readFileExtension(relativePath: string): string;
2213
+ /**
2214
+ * Get directory path where the file exists
2215
+ */
2216
+ readFileDirectory(relativePath: string): string;
2217
+ /**
2218
+ * Get list of file names in directory
2219
+ */
2220
+ readDirectoryFileNames(relativePath?: string): Promise<string[] | Error>;
2221
+ /**
2222
+ * Get list of file paths in directory
2223
+ */
2224
+ readDirectoryFilePaths(relativePath: string): Promise<string[] | Error>;
2225
+ /**
2226
+ * Check if path is a directory
2227
+ */
2228
+ isDirectory(relativePath: string): Promise<boolean>;
2229
+ /**
2230
+ * Check if path is a file
2231
+ */
2232
+ isFile(relativePath: string): Promise<boolean>;
2233
+ /**
2234
+ * Check if file or directory exists
2235
+ */
2236
+ exists(relativePath: string): Promise<boolean>;
2237
+ /**
2238
+ * Check if directory exists
2239
+ */
2240
+ directoryExists(relativePath: string): Promise<boolean>;
2241
+ /**
2242
+ * Check if file exists
2243
+ */
2244
+ fileExists(relativePath: string): Promise<boolean>;
2245
+ /**
2246
+ * Get base path
2247
+ */
2248
+ getBasePath(): string;
2249
+ /**
2250
+ * Convert relative path to absolute path
2251
+ */
2252
+ resolve(relativePath: string): string;
2253
+ /**
2254
+ * Get file size in bytes
2255
+ */
2256
+ getFileSize(relativePath: string): Promise<number | Error>;
2257
+ /**
2258
+ * Get file last modified time
2259
+ */
2260
+ getFileModifiedTime(relativePath: string): Promise<Date | Error>;
2261
+ /**
2262
+ * Get file creation time (first commit)
2263
+ */
2264
+ getFileCreatedTime(relativePath: string): Promise<Date | Error>;
2265
+ /**
2266
+ * Get cached SHA for a file
2267
+ */
2268
+ getCachedSha(relativePath: string): string | undefined;
2269
+ }
2270
+
2271
+ type Props$2 = {
2272
+ owner: string;
2273
+ repo: string;
2274
+ basePath: string;
2275
+ branch?: string;
2276
+ token: string;
2277
+ pathSystem?: DocPathSystem;
2278
+ reader?: DocFileSystemReadType;
2279
+ };
2280
+ /**
2281
+ * GitHub repository write-only file system using Octokit
2282
+ */
2283
+ declare class DocFileSystemOctokitWrite implements DocFileSystemWriteType {
2284
+ private readonly octokit;
2285
+ private readonly owner;
2286
+ private readonly repo;
2287
+ private readonly basePath;
2288
+ private readonly branch;
2289
+ private readonly pathSystem;
2290
+ private readonly reader?;
2291
+ constructor(props: Props$2);
2292
+ /**
2293
+ * Write content to file in GitHub repository
2294
+ */
2295
+ writeFile(relativePath: string, content: string): Promise<Error | null>;
2296
+ /**
2297
+ * Delete file from GitHub repository
2298
+ */
2299
+ deleteFile(relativePath: string): Promise<Error | null>;
2300
+ /**
2301
+ * Create directory by creating a .gitkeep file
2302
+ */
2303
+ createDirectory(relativePath: string): Promise<Error | null>;
2304
+ /**
2305
+ * Create directory if it doesn't exist
2306
+ */
2307
+ ensureDirectoryExists(relativePath: string): Promise<Error | null>;
2308
+ /**
2309
+ * Copy file to new location
2310
+ */
2311
+ copyFile(sourcePath: string, destinationPath: string): Promise<Error | null>;
2312
+ /**
2313
+ * Move file to new location
2314
+ */
2315
+ moveFile(sourcePath: string, destinationPath: string): Promise<Error | null>;
2316
+ }
2317
+
2318
+ type Props$1 = {
2319
+ basePath: string;
2320
+ pathSystem?: DocPathSystem;
2321
+ };
2322
+ /**
2323
+ * Read-only file system implementation
2324
+ */
2325
+ declare class DocFileSystemRead implements DocFileSystemReadType {
2326
+ protected readonly basePath: string;
2327
+ protected readonly pathSystem: DocPathSystem;
2328
+ constructor(props: Props$1);
2329
+ /**
2330
+ * Read file content at the specified path
2331
+ */
2332
+ readFile(relativePath: string): Promise<string | null | Error>;
2333
+ /**
2334
+ * Get file name from path
2335
+ */
2336
+ readFileName(relativePath: string): string;
2337
+ /**
2338
+ * Get file extension from path
2339
+ */
2340
+ readFileExtension(relativePath: string): string;
2341
+ /**
2342
+ * Get directory path where the file exists
2343
+ */
2344
+ readFileDirectory(relativePath: string): string;
2345
+ /**
2346
+ * Get list of entries in directory
2347
+ */
2348
+ readDirectoryFileNames(relativePath?: string): Promise<string[] | Error>;
2349
+ readDirectoryFilePaths(relativePath: string): Promise<string[] | Error>;
2350
+ /**
2351
+ * Check if path is a directory
2352
+ */
2353
+ isDirectory(relativePath: string): Promise<boolean>;
2354
+ /**
2355
+ * Check if path is a file
2356
+ */
2357
+ isFile(relativePath: string): Promise<boolean>;
2358
+ /**
2359
+ * Check if file or directory exists
2360
+ */
2361
+ exists(relativePath: string): Promise<boolean>;
2362
+ /**
2363
+ * Check if directory exists
2364
+ */
2365
+ directoryExists(relativePath: string): Promise<boolean>;
2366
+ /**
2367
+ * Check if file exists
2368
+ */
2369
+ fileExists(relativePath: string): Promise<boolean>;
2370
+ /**
2371
+ * Get base path
2372
+ */
2373
+ getBasePath(): string;
2374
+ /**
2375
+ * Convert relative path to absolute path
2376
+ */
2377
+ resolve(relativePath: string): string;
2378
+ /**
2379
+ * Get file size in bytes
2380
+ */
2381
+ getFileSize(relativePath: string): Promise<number | Error>;
2382
+ /**
2383
+ * Get file last modified time
2384
+ */
2385
+ getFileModifiedTime(relativePath: string): Promise<Date | Error>;
2386
+ /**
2387
+ * Get file creation time
2388
+ */
2389
+ getFileCreatedTime(relativePath: string): Promise<Date | Error>;
2390
+ }
2391
+
2392
+ type Props = {
2393
+ basePath: string;
2394
+ pathSystem?: DocPathSystem;
2395
+ reader?: DocFileSystemReadType;
2396
+ };
2397
+ /**
2398
+ * Write-only file system implementation
2399
+ */
2400
+ declare class DocFileSystemWrite implements DocFileSystemWriteType {
2401
+ protected readonly basePath: string;
2402
+ protected readonly pathSystem: DocPathSystem;
2403
+ private readonly reader?;
2404
+ constructor(props: Props);
2405
+ /**
2406
+ * Write content to file at the specified path (creates directory if needed)
2407
+ */
2408
+ writeFile(relativePath: string, content: string): Promise<Error | null>;
2409
+ /**
2410
+ * Delete file at the specified path
2411
+ */
2412
+ deleteFile(relativePath: string): Promise<Error | null>;
2413
+ /**
2414
+ * Create directory
2415
+ */
2416
+ createDirectory(relativePath: string): Promise<Error | null>;
2417
+ /**
2418
+ * Create directory if it doesn't exist
2419
+ */
2420
+ ensureDirectoryExists(relativePath: string): Promise<Error | null>;
2421
+ /**
2422
+ * Copy file
2423
+ */
2424
+ copyFile(sourcePath: string, destinationPath: string): Promise<Error | null>;
2425
+ /**
2426
+ * Move file
2427
+ */
2428
+ moveFile(sourcePath: string, destinationPath: string): Promise<Error | null>;
2429
+ }
2430
+
1827
2431
  /**
1828
2432
  * Mock path system for testing
1829
2433
  */
@@ -2184,4 +2788,4 @@ declare class DocRelationFieldValue {
2184
2788
  }): DocRelationFieldValue;
2185
2789
  }
2186
2790
 
2187
- 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, type UpdateFunction, 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 };
2791
+ 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, DocFileSystemJson, DocFileSystemJsonRead, DocFileSystemJsonWrite, DocFileSystemMock, DocFileSystemOctokit, DocFileSystemOctokitRead, DocFileSystemOctokitWrite, DocFileSystemRead, type DocFileSystemReadType, DocFileSystemWrite, type DocFileSystemWriteType, 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, type UpdateFunction, 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 };