@interactive-inc/docs-client 0.0.5 → 0.0.7

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