@jwilleke/ngdpbase-types 0.0.0 → 5.18.0

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 (302) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +16 -2
  3. package/lib/packages/ngdpbase-types/index.d.ts +32 -0
  4. package/lib/packages/ngdpbase-types/testing.d.ts +43 -0
  5. package/lib/packages/ngdpbase-types/testing.js +53 -0
  6. package/lib/src/cache/CacheDependencies.d.ts +50 -0
  7. package/lib/src/cache/CacheDependencies.js +50 -0
  8. package/lib/src/cache/ICacheAdapter.d.ts +86 -0
  9. package/lib/src/cache/RegionCache.d.ts +171 -0
  10. package/lib/src/context/ActorContext.d.ts +48 -0
  11. package/lib/src/context/ActorContext.js +33 -0
  12. package/lib/src/context/ApiContext.d.ts +194 -0
  13. package/lib/src/context/ApiContext.js +273 -0
  14. package/lib/src/context/BaseContext.d.ts +110 -0
  15. package/lib/src/context/BaseContext.js +143 -0
  16. package/lib/src/context/JobContext.d.ts +153 -0
  17. package/lib/src/context/JobContext.js +144 -0
  18. package/lib/src/context/WikiContext.d.ts +404 -0
  19. package/lib/src/context/bootActions.d.ts +64 -0
  20. package/lib/src/context/bootActions.js +111 -0
  21. package/lib/src/converters/HtmlConverter.d.ts +70 -0
  22. package/lib/src/converters/IContentConverter.d.ts +94 -0
  23. package/lib/src/converters/JSPWikiConverter.d.ts +117 -0
  24. package/lib/src/converters/conversionWarning.d.ts +15 -0
  25. package/lib/src/converters/ncm/bridge.d.ts +22 -0
  26. package/lib/src/converters/ncm/existing.d.ts +23 -0
  27. package/lib/src/converters/ncm/fix/blocks.d.ts +89 -0
  28. package/lib/src/converters/ncm/fix/bulletMarkers.d.ts +21 -0
  29. package/lib/src/converters/ncm/fix/index.d.ts +36 -0
  30. package/lib/src/converters/ncm/fix/jspwikiBullets.d.ts +20 -0
  31. package/lib/src/converters/ncm/fix/jspwikiCodeMarkers.d.ts +38 -0
  32. package/lib/src/converters/ncm/fix/jspwikiHeadings.d.ts +25 -0
  33. package/lib/src/converters/ncm/fix/jspwikiIndent.d.ts +24 -0
  34. package/lib/src/converters/ncm/fix/jspwikiInsert.d.ts +21 -0
  35. package/lib/src/converters/ncm/fix/jspwikiItalic.d.ts +29 -0
  36. package/lib/src/converters/ncm/fix/jspwikiLinkLeftovers.d.ts +27 -0
  37. package/lib/src/converters/ncm/fix/moreInformationFooter.d.ts +25 -0
  38. package/lib/src/converters/ncm/fix/styleClosers.d.ts +25 -0
  39. package/lib/src/converters/ncm/fix/tightenLists.d.ts +30 -0
  40. package/lib/src/converters/ncm/fix/types.d.ts +33 -0
  41. package/lib/src/converters/ncm/footnotes.d.ts +39 -0
  42. package/lib/src/converters/ncm/images.d.ts +49 -0
  43. package/lib/src/converters/ncm/index.d.ts +20 -0
  44. package/lib/src/converters/ncm/links.d.ts +21 -0
  45. package/lib/src/converters/ncm/normalize.d.ts +39 -0
  46. package/lib/src/converters/ncm/placeholder.d.ts +25 -0
  47. package/lib/src/converters/ncm/tables.d.ts +36 -0
  48. package/lib/src/converters/ncm/types.d.ts +42 -0
  49. package/lib/src/http/egressPolicy.d.ts +52 -0
  50. package/lib/src/http/guardedFetch.d.ts +89 -0
  51. package/lib/src/http/guardedFetch.js +113 -0
  52. package/lib/src/http/guardedLookup.d.ts +48 -0
  53. package/lib/src/http/guardedLookup.js +73 -0
  54. package/lib/src/http/ssrf.d.ts +83 -0
  55. package/lib/src/http/ssrf.js +311 -0
  56. package/lib/src/mail/MailProvider.d.ts +36 -0
  57. package/lib/src/mail/NodemailerMailProvider.d.ts +26 -0
  58. package/lib/src/managers/AddonsManager.d.ts +691 -0
  59. package/lib/src/managers/AgentTokenManager.d.ts +269 -0
  60. package/lib/src/managers/AssetManager.d.ts +116 -0
  61. package/lib/src/managers/AttachmentManager.d.ts +1032 -0
  62. package/lib/src/managers/AuthManager.d.ts +1257 -0
  63. package/lib/src/managers/BackgroundJobManager.d.ts +434 -0
  64. package/lib/src/managers/BaseManager.d.ts +391 -0
  65. package/lib/src/managers/BaseManager.js +415 -0
  66. package/lib/src/managers/CacheManager.d.ts +159 -0
  67. package/lib/src/managers/CatalogManager.d.ts +235 -0
  68. package/lib/src/managers/CommentManager.d.ts +75 -0
  69. package/lib/src/managers/ConfigurationManager.d.ts +747 -0
  70. package/lib/src/managers/DatabaseManager.d.ts +89 -0
  71. package/lib/src/managers/DatabaseManager.js +236 -0
  72. package/lib/src/managers/EmailManager.d.ts +47 -0
  73. package/lib/src/managers/ExportManager.d.ts +129 -0
  74. package/lib/src/managers/ExportManager.js +420 -0
  75. package/lib/src/managers/FootnoteManager.d.ts +118 -0
  76. package/lib/src/managers/MediaManager.d.ts +279 -0
  77. package/lib/src/managers/MetricsManager.d.ts +89 -0
  78. package/lib/src/managers/NotificationManager.d.ts +165 -0
  79. package/lib/src/managers/OidcManager.d.ts +210 -0
  80. package/lib/src/managers/OrganizationManager.d.ts +107 -0
  81. package/lib/src/managers/PageManager.d.ts +1645 -0
  82. package/lib/src/managers/PersonManager.d.ts +48 -0
  83. package/lib/src/managers/PluginManager.d.ts +179 -0
  84. package/lib/src/managers/PluginManager.js +393 -0
  85. package/lib/src/managers/PolicyEvaluator.d.ts +213 -0
  86. package/lib/src/managers/RenderingManager.d.ts +358 -0
  87. package/lib/src/managers/RoleManager.d.ts +134 -0
  88. package/lib/src/managers/SearchManager.d.ts +402 -0
  89. package/lib/src/managers/ShareManager.d.ts +251 -0
  90. package/lib/src/managers/TemplateManager.d.ts +176 -0
  91. package/lib/src/managers/ThemeManager.d.ts +56 -0
  92. package/lib/src/managers/UserManager.d.ts +480 -0
  93. package/lib/src/managers/ValidationManager.d.ts +426 -0
  94. package/lib/src/managers/VariableManager.d.ts +145 -0
  95. package/lib/src/middleware/csrf.d.ts +3 -0
  96. package/lib/src/parsers/LinkParser.d.ts +457 -0
  97. package/lib/src/parsers/MarkupParser.d.ts +769 -0
  98. package/lib/src/parsers/context/ParseContext.d.ts +314 -0
  99. package/lib/src/parsers/data/emoji-map.d.ts +18 -0
  100. package/lib/src/parsers/dom/DOMBuilder.d.ts +210 -0
  101. package/lib/src/parsers/dom/DOMParser.d.ts +252 -0
  102. package/lib/src/parsers/dom/Tokenizer.d.ts +358 -0
  103. package/lib/src/parsers/dom/WikiDocument.d.ts +272 -0
  104. package/lib/src/parsers/dom/handlers/DOMLinkHandler.d.ts +260 -0
  105. package/lib/src/parsers/dom/handlers/DOMPluginHandler.d.ts +212 -0
  106. package/lib/src/parsers/dom/handlers/DOMVariableHandler.d.ts +171 -0
  107. package/lib/src/parsers/filters/BaseFilter.d.ts +269 -0
  108. package/lib/src/parsers/filters/FilterChain.d.ts +320 -0
  109. package/lib/src/parsers/handlers/BaseSyntaxHandler.d.ts +331 -0
  110. package/lib/src/parsers/handlers/HandlerRegistry.d.ts +225 -0
  111. package/lib/src/parsers/handlers/JSPWikiPreprocessor.d.ts +89 -0
  112. package/lib/src/parsers/handlers/LinkParserHandler.d.ts +80 -0
  113. package/lib/src/parsers/handlers/PluginSyntaxHandler.d.ts +78 -0
  114. package/lib/src/parsers/handlers/WikiFormHandler.d.ts +149 -0
  115. package/lib/src/parsers/handlers/WikiTagHandler.d.ts +125 -0
  116. package/lib/src/parsers/jspwikiTableRow.d.ts +39 -0
  117. package/lib/src/parsers/styleBlockSyntax.d.ts +14 -0
  118. package/lib/src/plugins/types.d.ts +79 -0
  119. package/lib/src/providers/AgentTokenAuthProvider.d.ts +40 -0
  120. package/lib/src/providers/AuthentikBearerAuthProvider.d.ts +75 -0
  121. package/lib/src/providers/BaseAttachmentProvider.d.ts +197 -0
  122. package/lib/src/providers/BaseAuthProvider.d.ts +220 -0
  123. package/lib/src/providers/BaseCacheProvider.d.ts +140 -0
  124. package/lib/src/providers/BaseCredentialsProvider.d.ts +84 -0
  125. package/lib/src/providers/BaseDatabaseProvider.d.ts +22 -0
  126. package/lib/src/providers/BaseDatabaseProvider.js +12 -0
  127. package/lib/src/providers/BaseLoggingProvider.d.ts +68 -0
  128. package/lib/src/providers/BaseLoggingProvider.js +37 -0
  129. package/lib/src/providers/BaseMediaProvider.d.ts +308 -0
  130. package/lib/src/providers/BasePageProvider.d.ts +337 -0
  131. package/lib/src/providers/BaseProvider.d.ts +98 -0
  132. package/lib/src/providers/BaseProvider.js +74 -0
  133. package/lib/src/providers/BaseSearchProvider.d.ts +362 -0
  134. package/lib/src/providers/BasicAttachmentProvider.d.ts +599 -0
  135. package/lib/src/providers/CloudflareAccessAuthProvider.d.ts +72 -0
  136. package/lib/src/providers/FileCredentialsProvider.d.ts +33 -0
  137. package/lib/src/providers/FileJobStateProvider.d.ts +58 -0
  138. package/lib/src/providers/FileLoggingProvider.d.ts +43 -0
  139. package/lib/src/providers/FileLoggingProvider.js +120 -0
  140. package/lib/src/providers/FileOidcAdapter.d.ts +25 -0
  141. package/lib/src/providers/FileSystemMediaProvider.d.ts +403 -0
  142. package/lib/src/providers/LunrSearchProvider.d.ts +280 -0
  143. package/lib/src/providers/MagicLinkAuthProvider.d.ts +125 -0
  144. package/lib/src/providers/NullCacheProvider.d.ts +72 -0
  145. package/lib/src/providers/OidcAuthProvider.d.ts +180 -0
  146. package/lib/src/providers/OidcBearerAuthProvider.d.ts +30 -0
  147. package/lib/src/providers/PasskeyAuthProvider.d.ts +58 -0
  148. package/lib/src/providers/PasswordAuthProvider.d.ts +20 -0
  149. package/lib/src/providers/SqliteDatabaseProvider.d.ts +55 -0
  150. package/lib/src/providers/SqliteDatabaseProvider.js +90 -0
  151. package/lib/src/providers/SqliteJobStateProvider.d.ts +41 -0
  152. package/lib/src/providers/databaseMigrations.d.ts +8 -0
  153. package/lib/src/providers/databaseMigrations.js +47 -0
  154. package/lib/src/providers/jobState.d.ts +99 -0
  155. package/lib/src/providers/lunrQueryToMiniSearch.d.ts +32 -0
  156. package/lib/src/providers/mediaFilenameDate.d.ts +22 -0
  157. package/lib/src/providers/sqliteLocation.d.ts +17 -0
  158. package/lib/src/providers/sqliteLocation.js +55 -0
  159. package/lib/src/providers/sqliteMigrations.d.ts +48 -0
  160. package/lib/src/providers/sqliteMigrations.js +72 -0
  161. package/lib/src/rendering/githubAlerts.d.ts +22 -0
  162. package/lib/src/rendering/htmlPolicy.d.ts +76 -0
  163. package/lib/src/rendering/markdownConverter.d.ts +73 -0
  164. package/lib/src/security/PolicyDecisionPoint.d.ts +245 -0
  165. package/lib/src/security/PolicyInformationPoint.d.ts +448 -0
  166. package/lib/src/security/pageActions.d.ts +40 -0
  167. package/lib/src/security/permissions.generated.d.ts +78 -0
  168. package/lib/src/types/Asset.d.ts +414 -0
  169. package/lib/src/types/Catalog.d.ts +61 -0
  170. package/lib/src/types/Comment.d.ts +11 -0
  171. package/lib/src/types/Config.d.ts +388 -0
  172. package/lib/src/types/Organization.d.ts +78 -0
  173. package/lib/src/types/OrganizationProvider.d.ts +38 -0
  174. package/lib/src/types/Page.d.ts +220 -0
  175. package/lib/src/types/Person.d.ts +56 -0
  176. package/lib/src/types/PersonProvider.d.ts +25 -0
  177. package/lib/src/types/Policy.d.ts +139 -0
  178. package/lib/src/types/Policy.js +17 -0
  179. package/lib/src/types/Provider.d.ts +810 -0
  180. package/lib/src/types/Role.d.ts +84 -0
  181. package/lib/src/types/RoleProvider.d.ts +35 -0
  182. package/lib/src/types/Schema.d.ts +425 -0
  183. package/lib/src/types/Share.d.ts +172 -0
  184. package/lib/src/types/Share.js +81 -0
  185. package/lib/src/types/User.d.ts +304 -0
  186. package/lib/src/types/Version.d.ts +189 -0
  187. package/lib/src/types/WikiEngine.d.ts +128 -0
  188. package/lib/src/types/express.d.ts +120 -0
  189. package/lib/src/types/express.js +1 -0
  190. package/lib/src/types/guards.d.ts +78 -0
  191. package/lib/src/types/heic-decode.d.ts +16 -0
  192. package/lib/src/types/index.d.ts +19 -0
  193. package/lib/src/types/linkedom.d.ts +77 -0
  194. package/lib/src/types/markdown-it-plugins.d.ts +21 -0
  195. package/lib/src/utils/DeltaStorage.d.ts +118 -0
  196. package/lib/src/utils/LocaleUtils.d.ts +105 -0
  197. package/lib/src/utils/LocaleUtils.js +294 -0
  198. package/lib/src/utils/PageNameMatcher.d.ts +98 -0
  199. package/lib/src/utils/PathPreflight.d.ts +38 -0
  200. package/lib/src/utils/PathPreflight.js +50 -0
  201. package/lib/src/utils/SectionUtils.d.ts +40 -0
  202. package/lib/src/utils/addonConfigLayer.d.ts +144 -0
  203. package/lib/src/utils/addonConfigLayer.js +382 -0
  204. package/lib/src/utils/addonDatabaseRules.d.ts +25 -0
  205. package/lib/src/utils/addonDatabaseRules.js +57 -0
  206. package/lib/src/utils/addonHost.d.ts +51 -0
  207. package/lib/src/utils/addonHost.js +72 -0
  208. package/lib/src/utils/addonInstaller.d.ts +109 -0
  209. package/lib/src/utils/addonLock.d.ts +37 -0
  210. package/lib/src/utils/addonLock.js +48 -0
  211. package/lib/src/utils/addonPageSync.d.ts +45 -0
  212. package/lib/src/utils/addonProvenance.d.ts +48 -0
  213. package/lib/src/utils/addonTarball.d.ts +41 -0
  214. package/lib/src/utils/addonsPathResolver.d.ts +76 -0
  215. package/lib/src/utils/addonsPathResolver.js +129 -0
  216. package/lib/src/utils/assetMetadataTags.d.ts +66 -0
  217. package/lib/src/utils/atomicWrite.d.ts +28 -0
  218. package/lib/src/utils/auditConfigChange.d.ts +57 -0
  219. package/lib/src/utils/auditEventNames.d.ts +50 -0
  220. package/lib/src/utils/auditEventNames.generated.d.ts +163 -0
  221. package/lib/src/utils/auditEventNames.generated.js +168 -0
  222. package/lib/src/utils/auditEventNames.js +49 -0
  223. package/lib/src/utils/auditEvents.d.ts +265 -0
  224. package/lib/src/utils/auditEvents.js +309 -0
  225. package/lib/src/utils/auditRegistry.d.ts +102 -0
  226. package/lib/src/utils/auditRegistry.js +168 -0
  227. package/lib/src/utils/bip39English.d.ts +2 -0
  228. package/lib/src/utils/configEnvKeys.d.ts +68 -0
  229. package/lib/src/utils/configFiles.d.ts +74 -0
  230. package/lib/src/utils/configFiles.js +150 -0
  231. package/lib/src/utils/delegation.d.ts +48 -0
  232. package/lib/src/utils/deriveUsername.d.ts +21 -0
  233. package/lib/src/utils/explainMediaPath.d.ts +123 -0
  234. package/lib/src/utils/formerTitles.d.ts +69 -0
  235. package/lib/src/utils/frontmatterAccess.d.ts +54 -0
  236. package/lib/src/utils/headlessAdminPassword.d.ts +55 -0
  237. package/lib/src/utils/imageTransform.d.ts +52 -0
  238. package/lib/src/utils/instanceEnvSecret.d.ts +51 -0
  239. package/lib/src/utils/jobSlots.d.ts +43 -0
  240. package/lib/src/utils/keywordNormalizer.d.ts +127 -0
  241. package/lib/src/utils/logger.d.ts +70 -0
  242. package/lib/src/utils/logger.js +106 -0
  243. package/lib/src/utils/magicLinkDeviceState.d.ts +95 -0
  244. package/lib/src/utils/managerUtils.d.ts +40 -0
  245. package/lib/src/utils/migrateLegacyPrivateAttachments.d.ts +15 -0
  246. package/lib/src/utils/orgFilename.d.ts +22 -0
  247. package/lib/src/utils/pageFeature.d.ts +27 -0
  248. package/lib/src/utils/pageFrontmatter.d.ts +21 -0
  249. package/lib/src/utils/pageNotes.d.ts +150 -0
  250. package/lib/src/utils/pageTitleRule.d.ts +37 -0
  251. package/lib/src/utils/pageToArticle.d.ts +59 -0
  252. package/lib/src/utils/pageUrl.d.ts +18 -0
  253. package/lib/src/utils/passwordChange.d.ts +12 -0
  254. package/lib/src/utils/passwordHash.d.ts +60 -0
  255. package/lib/src/utils/permissionCatalog.d.ts +52 -0
  256. package/lib/src/utils/pluginFormatters.d.ts +452 -0
  257. package/lib/src/utils/pluginFormatters.js +714 -0
  258. package/lib/src/utils/privateLinkRewrite.d.ts +42 -0
  259. package/lib/src/utils/privateStoreAccess.d.ts +57 -0
  260. package/lib/src/utils/privateStoreAccess.js +65 -0
  261. package/lib/src/utils/privateStoreCatalogs.d.ts +40 -0
  262. package/lib/src/utils/privateStoreCrypto.d.ts +127 -0
  263. package/lib/src/utils/privateStoreDoor.d.ts +181 -0
  264. package/lib/src/utils/privateStoreExport.d.ts +72 -0
  265. package/lib/src/utils/privateStoreFiles.d.ts +120 -0
  266. package/lib/src/utils/privateStoreMeta.d.ts +64 -0
  267. package/lib/src/utils/privateStoreMigrations.d.ts +37 -0
  268. package/lib/src/utils/privateStorePath.d.ts +259 -0
  269. package/lib/src/utils/privateStorePath.js +436 -0
  270. package/lib/src/utils/privateStoreTakeout.d.ts +76 -0
  271. package/lib/src/utils/privateStoreUnlock.d.ts +175 -0
  272. package/lib/src/utils/proxyClaim.d.ts +59 -0
  273. package/lib/src/utils/proxyClaim.js +30 -0
  274. package/lib/src/utils/redactPrivateNames.d.ts +21 -0
  275. package/lib/src/utils/redactPrivateNames.js +89 -0
  276. package/lib/src/utils/redactSecrets.d.ts +58 -0
  277. package/lib/src/utils/redactSecrets.js +171 -0
  278. package/lib/src/utils/renameLinkRewrite.d.ts +112 -0
  279. package/lib/src/utils/roleGrants.d.ts +35 -0
  280. package/lib/src/utils/safeRedirect.d.ts +32 -0
  281. package/lib/src/utils/schedule.d.ts +54 -0
  282. package/lib/src/utils/secretFileMode.d.ts +17 -0
  283. package/lib/src/utils/seededShippedPages.d.ts +45 -0
  284. package/lib/src/utils/sensitiveValues.d.ts +59 -0
  285. package/lib/src/utils/sensitiveValues.js +106 -0
  286. package/lib/src/utils/sessionEnd.d.ts +12 -0
  287. package/lib/src/utils/sessionGeneration.d.ts +24 -0
  288. package/lib/src/utils/sessionIdle.d.ts +41 -0
  289. package/lib/src/utils/sessionLimits.d.ts +68 -0
  290. package/lib/src/utils/shareLockbox.d.ts +64 -0
  291. package/lib/src/utils/sigstoreTrustedRoot.d.ts +33 -0
  292. package/lib/src/utils/sniffMime.d.ts +21 -0
  293. package/lib/src/utils/storeSearchIndex.d.ts +75 -0
  294. package/lib/src/utils/subjectMayDo.d.ts +21 -0
  295. package/lib/src/utils/systemCategoryRules.d.ts +30 -0
  296. package/lib/src/utils/systemCategoryRules.js +41 -0
  297. package/lib/src/utils/userCreateError.d.ts +62 -0
  298. package/lib/src/utils/username.d.ts +53 -0
  299. package/lib/src/utils/vaultUrlRewrite.d.ts +27 -0
  300. package/lib/src/utils/version.d.ts +84 -0
  301. package/lib/src/utils/videoFrame.d.ts +21 -0
  302. package/package.json +54 -3
@@ -0,0 +1,189 @@
1
+ /**
2
+ * Version type definitions for ngdpbase
3
+ *
4
+ * This module defines types for page versioning, including version metadata,
5
+ * manifests, and version history structures used by VersioningFileProvider.
6
+ */
7
+ import { DiffTuple } from '../utils/DeltaStorage.js';
8
+ /**
9
+ * Version metadata
10
+ *
11
+ * Metadata for a single page version. Stored in manifest.json as the single
12
+ * source of truth for all version information.
13
+ */
14
+ export interface VersionMetadata {
15
+ /** Version number (1-based) */
16
+ version: number;
17
+ /** Author user ID or 'system' */
18
+ author: string;
19
+ /** Timestamp (ISO 8601 format) */
20
+ timestamp: string;
21
+ /** Change type */
22
+ changeType: 'create' | 'update' | 'minor' | 'major';
23
+ /** Change description/commit message */
24
+ message?: string;
25
+ /** SHA-256 hash of content for integrity verification */
26
+ contentHash: string;
27
+ /** Content size in bytes */
28
+ contentSize: number;
29
+ /** Whether content is compressed (.gz) */
30
+ compressed: boolean;
31
+ /** Whether stored as diff (true) or full content (false) */
32
+ isDelta: boolean;
33
+ /** If delta, the base version number */
34
+ baseVersion?: number;
35
+ /** Compression ratio (0-100) if compressed */
36
+ compressionRatio?: number;
37
+ }
38
+ /**
39
+ * Version manifest
40
+ *
41
+ * Single source of truth for all versions of a page. Stored as manifest.json
42
+ * in the page's version directory.
43
+ */
44
+ export interface VersionManifest {
45
+ /** Page UUID */
46
+ pageUuid: string;
47
+ /** Page title (for reference) */
48
+ pageTitle: string;
49
+ /** Total number of versions */
50
+ totalVersions: number;
51
+ /** Current version number */
52
+ currentVersion: number;
53
+ /** Array of version metadata (sorted by version number) */
54
+ versions: VersionMetadata[];
55
+ /** Manifest creation timestamp */
56
+ createdAt: string;
57
+ /** Last manifest update timestamp */
58
+ updatedAt: string;
59
+ /** Versioning configuration at time of creation */
60
+ config?: {
61
+ deltaStorageEnabled: boolean;
62
+ compressionEnabled: boolean;
63
+ checkpointInterval: number;
64
+ };
65
+ }
66
+ /**
67
+ * Version content
68
+ *
69
+ * Full content for a specific version, reconstructed from deltas if necessary.
70
+ */
71
+ export interface VersionContent {
72
+ /** Version number */
73
+ version: number;
74
+ /** Full page content (markdown) */
75
+ content: string;
76
+ /** Version metadata */
77
+ metadata: VersionMetadata;
78
+ }
79
+ /**
80
+ * Version diff result
81
+ *
82
+ * Result of comparing two versions.
83
+ */
84
+ export interface VersionDiff {
85
+ /** Old version number */
86
+ fromVersion: number;
87
+ /** New version number */
88
+ toVersion: number;
89
+ /** Diff operations (from fast-diff) */
90
+ diff: DiffTuple[];
91
+ /** Diff statistics */
92
+ stats: {
93
+ additions: number;
94
+ deletions: number;
95
+ unchanged: number;
96
+ };
97
+ /** Old version metadata */
98
+ fromMetadata: VersionMetadata;
99
+ /** New version metadata */
100
+ toMetadata: VersionMetadata;
101
+ }
102
+ /**
103
+ * Version history entry
104
+ *
105
+ * Simplified version info for history listings.
106
+ */
107
+ export interface VersionHistoryEntry {
108
+ /** Version number */
109
+ version: number;
110
+ /** Author user ID or 'system' */
111
+ author: string;
112
+ /** Timestamp (ISO 8601 format) */
113
+ timestamp: string;
114
+ /** Change type */
115
+ changeType: 'create' | 'update' | 'minor' | 'major';
116
+ /** Change description */
117
+ message?: string;
118
+ /** Content size in bytes */
119
+ contentSize: number;
120
+ /** Whether compressed */
121
+ compressed: boolean;
122
+ }
123
+ /**
124
+ * Version storage info
125
+ *
126
+ * Information about version storage and disk usage.
127
+ */
128
+ export interface VersionStorageInfo {
129
+ /** Page UUID */
130
+ pageUuid: string;
131
+ /** Total number of versions */
132
+ totalVersions: number;
133
+ /** Total storage size in bytes (all versions) */
134
+ totalSize: number;
135
+ /** Storage size with compression/deltas in bytes */
136
+ storageSize: number;
137
+ /** Space saved (0-100) */
138
+ spaceSavings: number;
139
+ /** Average version size */
140
+ avgVersionSize: number;
141
+ /** Number of compressed versions */
142
+ compressedVersions: number;
143
+ /** Number of delta versions */
144
+ deltaVersions: number;
145
+ /** Oldest version timestamp */
146
+ oldestVersion: string;
147
+ /** Newest version timestamp */
148
+ newestVersion: string;
149
+ }
150
+ /**
151
+ * Version retention policy
152
+ *
153
+ * Configuration for version retention and cleanup.
154
+ */
155
+ export interface VersionRetentionPolicy {
156
+ /** Maximum number of versions to keep (0 = unlimited) */
157
+ maxVersions: number;
158
+ /** Number of days to retain versions (0 = unlimited) */
159
+ retentionDays: number;
160
+ /** Always keep version 1 (baseline) */
161
+ keepBaseline: boolean;
162
+ /** Always keep current version */
163
+ keepCurrent: boolean;
164
+ /** Checkpoint interval for full snapshots */
165
+ checkpointInterval: number;
166
+ /** Keep all checkpoint versions */
167
+ keepCheckpoints: boolean;
168
+ }
169
+ /**
170
+ * Version cleanup result
171
+ *
172
+ * Result of running version cleanup/maintenance.
173
+ */
174
+ export interface VersionCleanupResult {
175
+ /** Page UUID */
176
+ pageUuid: string;
177
+ /** Number of versions before cleanup */
178
+ versionsBefore: number;
179
+ /** Number of versions after cleanup */
180
+ versionsAfter: number;
181
+ /** Number of versions deleted */
182
+ versionsDeleted: number;
183
+ /** Space freed in bytes */
184
+ spaceFreed: number;
185
+ /** Deleted version numbers */
186
+ deletedVersions: number[];
187
+ /** Errors encountered */
188
+ errors?: string[];
189
+ }
@@ -0,0 +1,128 @@
1
+ /**
2
+ * WikiEngine type definitions
3
+ *
4
+ * Defines the core WikiEngine interface and manager registry types.
5
+ * WikiEngine is the central orchestrator that manages all subsystems.
6
+ */
7
+ import { WikiConfig } from './Config.js';
8
+ import type { Logger } from 'winston';
9
+ import type { Application, Request, RequestHandler, Router, RouterOptions } from 'express';
10
+ import type express from 'express';
11
+ /**
12
+ * All known manager names as a union type
13
+ * Use with getManager() for type-safe access when combined with explicit type parameter
14
+ */
15
+ export type ManagerName = 'ConfigurationManager' | 'PageManager' | 'UserManager' | 'PolicyInformationPoint' | 'PluginManager' | 'RenderingManager' | 'SearchManager' | 'VariableManager' | 'ValidationManager' | 'SchemaManager' | 'PolicyManager' | 'PolicyValidator' | 'PolicyEvaluator' | 'ExportManager' | 'ImportManager' | 'TemplateManager' | 'AttachmentManager' | 'BackupManager' | 'CacheManager' | 'AuditManager' | 'NotificationManager' | 'CatalogManager';
16
+ /**
17
+ * Manager registry - maps manager names to manager instances
18
+ * Note: Uses 'any' for backwards compatibility with existing code
19
+ */
20
+ export interface ManagerRegistry {
21
+ [managerName: string]: unknown;
22
+ }
23
+ /**
24
+ * WikiEngine interface
25
+ *
26
+ * The core engine that orchestrates all wiki functionality.
27
+ * Manages initialization, configuration, and provides access to all managers.
28
+ */
29
+ export interface WikiEngine {
30
+ /** Wiki configuration */
31
+ config?: WikiConfig;
32
+ /** Logger instance (winston Logger) */
33
+ logger?: Logger;
34
+ /** Engine start time */
35
+ startTime?: number;
36
+ /**
37
+ * Express application instance — available for add-ons to mount routes and
38
+ * middleware via engine.app.use(). Set by app.js before AddonsManager
39
+ * initialises (#359).
40
+ */
41
+ app?: Application;
42
+ /**
43
+ * The data every page view gets — the header, the left menu, the CSRF token,
44
+ * the signed-in user — exactly as core's own views get it
45
+ * (WikiRoutes.getCommonTemplateData). An add-on route that renders a view
46
+ * spreads it first: `res.render(view, { ...(await engine.templateData?.(req)), ... })`.
47
+ * One path (#1749): no add-on builds its own. Set by app.ts once the routes
48
+ * exist; add-ons call it per request.
49
+ */
50
+ templateData?: (req: Request) => Promise<Record<string, unknown>>;
51
+ /**
52
+ * An Express `Router` from core's own Express (#1861). Add-ons build routers
53
+ * here and mount them with `engine.app.use(...)`; they never value-import
54
+ * `express` (an installed add-on has none to resolve). `lint:addons` enforces it.
55
+ */
56
+ createRouter(options?: RouterOptions): Router;
57
+ /**
58
+ * `express.static` from core's own Express, for an add-on's `public/`
59
+ * folder (#1861): `engine.app?.use('/addons/x', engine.serveStatic(dir))`.
60
+ */
61
+ serveStatic(root: string, options?: Parameters<typeof express.static>[1]): RequestHandler;
62
+ /**
63
+ * Initialize the wiki engine
64
+ * @param config - Wiki configuration
65
+ * @returns The initialized engine or void
66
+ */
67
+ initialize(config?: WikiConfig): Promise<void>;
68
+ /**
69
+ * Initialize AddonsManager — call from app.ts after session/userContext middleware.
70
+ */
71
+ initializeAddons(): Promise<void>;
72
+ /**
73
+ * Get a manager by name
74
+ * @param managerName - Name of the manager
75
+ * @returns Manager instance or undefined
76
+ *
77
+ * @example
78
+ * // Type-safe usage with explicit type parameter:
79
+ * const pageManager = engine.getManager<PageManager>('PageManager');
80
+ */
81
+ getManager<T = unknown>(managerName: string): T | undefined;
82
+ /**
83
+ * Register a manager
84
+ * @param managerName - Name of the manager
85
+ * @param manager - Manager instance
86
+ */
87
+ registerManager(managerName: string, manager: unknown): void;
88
+ /**
89
+ * Get wiki configuration
90
+ * @returns Wiki configuration object
91
+ */
92
+ getConfig(): WikiConfig;
93
+ /**
94
+ * Shutdown the wiki engine
95
+ */
96
+ shutdown(): Promise<void>;
97
+ /**
98
+ * Record a configuration value that cannot be used (#1152).
99
+ *
100
+ * Recorded rather than thrown so `initialize()` finishes and the admin
101
+ * screens exist — the instance then serves maintenance mode with a route to
102
+ * the repair, instead of exiting and leaving the filesystem as the only way
103
+ * back. Only for values an administrator can fix through the admin UI; a
104
+ * failure of the machinery needed to serve that UI is fatal and still throws.
105
+ */
106
+ blockConfiguration(reason: string): void;
107
+ /** Configuration values that could not be used, in the order found (#1152). */
108
+ getBlockingConditions(): readonly string[];
109
+ /**
110
+ * Get all registered manager names
111
+ * @returns Array of manager names
112
+ */
113
+ getRegisteredManagers(): string[];
114
+ /**
115
+ * Return the optional-capability map set during initialization.
116
+ * Used by templates to conditionally show/hide panels for disabled features.
117
+ * @returns Record mapping capability ID → boolean (e.g. { media: false })
118
+ */
119
+ getCapabilities(): Record<string, boolean>;
120
+ /**
121
+ * Record whether an optional capability is active.
122
+ * @param id - Capability identifier (e.g. 'media', 'audit')
123
+ * @param enabled - Whether the capability is active
124
+ */
125
+ setCapability(id: string, enabled: boolean): void;
126
+ /** Allow additional properties for extensibility */
127
+ [key: string]: any;
128
+ }
@@ -0,0 +1,120 @@
1
+ /// <reference types="express" preserve="true" />
2
+ /// <reference types="express-session" preserve="true" />
3
+ /// <reference types="multer" preserve="true" />
4
+ /**
5
+ * Express type extensions for ngdpbase: `req.userContext`, `req.session`'s
6
+ * fields, uploads.
7
+ *
8
+ * A module, not a hand-written `.d.ts` (#1665): tsc emits
9
+ * `dist/src/types/express.d.ts` from it, and `src/context/ApiContext.ts`
10
+ * imports it, so an add-on that typechecks against `dist/` — bundled or
11
+ * external — sees these properties through the types it already imports, with
12
+ * no tsconfig entry. A hand-written `.d.ts` was never emitted, so external
13
+ * add-ons could not see it at all.
14
+ *
15
+ * Being a module also ends the restated copies the `.d.ts` needed: the share
16
+ * and sign-in shapes are imported, not transcribed.
17
+ */
18
+ import type { ShareGrant } from './Share.js';
19
+ import type { ProxyClaim } from '../managers/UserManager.js';
20
+ import type { SignInRecord, PendingConnection } from '../managers/AuthManager.js';
21
+ declare module 'express-session' {
22
+ interface SessionData {
23
+ csrfToken?: string;
24
+ username?: string;
25
+ userId?: string;
26
+ user?: unknown;
27
+ isAuthenticated?: boolean;
28
+ roles?: string[];
29
+ /** Opaque handle to this session's private-store key bag (#1382). Random, never the session id; never key bytes. */
30
+ privateStoreHandle?: string;
31
+ /** The account's password-change generation when this session signed in (#1482). */
32
+ sessionGeneration?: number;
33
+ /** How this session signed in: provider, factors with their times, amr / aal / acr (#1523). */
34
+ signIn?: SignInRecord;
35
+ /** A pending WebAuthn challenge (#448): single-use, tied to its purpose, short-lived. */
36
+ passkeyChallenge?: {
37
+ value: string;
38
+ purpose: 'register' | 'authenticate' | 'reauth';
39
+ expires: number;
40
+ };
41
+ /** A sign-in waiting for its second factor: the handle, and where to go after (#1523). No identity yet. */
42
+ pendingSignIn?: string;
43
+ pendingRedirect?: string;
44
+ /** A verified outside identity no account has connected, waiting for the person to sign in another way (#1743). */
45
+ pendingConnection?: PendingConnection;
46
+ /** When this session last made a request, epoch ms — kept only while an idle timeout is set (#1546). */
47
+ lastActivity?: number;
48
+ /** When this session signed in, epoch ms: the start of `ngdpbase.session.max-age` (#1767). A re-authentication never moves it. */
49
+ signedInAt?: number;
50
+ /**
51
+ * The proxy grant this session acts under (#1762 slice 4), chosen at
52
+ * `/account/acting-for`; absent while the person acts as themselves. Only
53
+ * a name: the grant is re-read live on every request
54
+ * (`AuthManager.subjectActingFor`), and a dead one clears it.
55
+ */
56
+ actingFor?: string;
57
+ [key: string]: unknown;
58
+ }
59
+ }
60
+ declare global {
61
+ namespace Express {
62
+ interface Request {
63
+ /**
64
+ * The identity this request carries, written by the session and bearer
65
+ * middleware in `app.ts`.
66
+ *
67
+ * __`viaToken` is declared here deliberately (#1164, #1173).__ It was
68
+ * absent while `app.ts` wrote it and every route read it, so the type
69
+ * described a user with no delegation. `ApiContext.from()` copied "the
70
+ * fields" — the fields the TYPE named — and the token was gone before
71
+ * any permission check ran. Reaching it required a cast, and a cast is
72
+ * what a wrong type feels like from the inside.
73
+ *
74
+ * A token is a __delegation from this user__, not a separate actor: it
75
+ * carries the permissions they delegated, and authority is still the
76
+ * user's, resolved live. So it belongs on the identity, beside them.
77
+ *
78
+ * The `[key: string]: unknown` index signature below is why none of this
79
+ * was a compile error — it permits any field, so omitting one is always
80
+ * legal. Removing it is what would make a dropped field fail the build;
81
+ * that is a larger change and is not made here.
82
+ *
83
+ * __Required, not optional (#1418).__ The session middleware in `app.ts`
84
+ * writes it on every request before any route is registered — the
85
+ * signed-in user, the anonymous subject, or (bearer middleware) the
86
+ * token's subject — and nothing registered ahead of it reads it. Typed
87
+ * optional, every route had to invent something for the case that
88
+ * cannot happen, and the thing invented was a default actor (P1). A
89
+ * handler forwards `req.userContext`; it never supplies one.
90
+ */
91
+ userContext: {
92
+ /** #1212: the three authorisation fields are required — the session and bearer middleware always write them. */
93
+ username: string;
94
+ email?: string;
95
+ displayName?: string;
96
+ roles: string[];
97
+ isAuthenticated: boolean;
98
+ authenticated?: boolean;
99
+ isSystem?: boolean;
100
+ permissions?: string[];
101
+ /** The agent token this request arrived with, when it did. */
102
+ viaToken?: {
103
+ id: string;
104
+ name: string;
105
+ scopes: string[];
106
+ };
107
+ /** The share this request presented, when it did (#1222). Forwarded like `viaToken`. */
108
+ viaShare?: ShareGrant;
109
+ /** The proxy grant someone is acting for this person under (#1762). Forwarded like `viaToken`. */
110
+ viaProxy?: ProxyClaim;
111
+ [key: string]: unknown;
112
+ };
113
+ file?: Multer.File;
114
+ files?: Multer.File[] | {
115
+ [fieldname: string]: Multer.File[];
116
+ };
117
+ }
118
+ }
119
+ }
120
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Type guards for runtime type checking
3
+ *
4
+ * This module provides type guard functions that can be used to validate
5
+ * data structures at runtime and provide TypeScript type narrowing.
6
+ */
7
+ import { WikiPage, PageFrontmatter, PageInfo } from './Page.js';
8
+ import { VersionMetadata, VersionManifest } from './Version.js';
9
+ import { User, UserSession } from './User.js';
10
+ import { AttachmentMetadata, AuditEvent } from './Provider.js';
11
+ /**
12
+ * Check if value is a valid PageFrontmatter object
13
+ */
14
+ export declare function isPageFrontmatter(value: unknown): value is PageFrontmatter;
15
+ /**
16
+ * Check if value is a valid WikiPage object
17
+ */
18
+ export declare function isWikiPage(value: unknown): value is WikiPage;
19
+ /**
20
+ * Check if value is a valid PageInfo object
21
+ */
22
+ export declare function isPageInfo(value: unknown): value is PageInfo;
23
+ /**
24
+ * Check if value is a valid VersionMetadata object
25
+ */
26
+ export declare function isVersionMetadata(value: unknown): value is VersionMetadata;
27
+ /**
28
+ * Check if value is a valid VersionManifest object
29
+ */
30
+ export declare function isVersionManifest(value: unknown): value is VersionManifest;
31
+ /**
32
+ * Check if value is a valid User object
33
+ */
34
+ export declare function isUser(value: unknown): value is User;
35
+ /**
36
+ * Check if value is a valid UserSession object
37
+ */
38
+ export declare function isUserSession(value: unknown): value is UserSession;
39
+ /**
40
+ * Check if value is a valid AttachmentMetadata object
41
+ */
42
+ export declare function isAttachmentMetadata(value: unknown): value is AttachmentMetadata;
43
+ /**
44
+ * Check if value is a valid AuditEvent object
45
+ */
46
+ export declare function isAuditEvent(value: unknown): value is AuditEvent;
47
+ /**
48
+ * Check if value is a valid UUID (v4 format)
49
+ */
50
+ export declare function isUuid(value: unknown): value is string;
51
+ /**
52
+ * Check if value is a valid ISO 8601 timestamp
53
+ */
54
+ export declare function isIsoTimestamp(value: unknown): value is string;
55
+ /**
56
+ * Check if value is a valid email address
57
+ */
58
+ export declare function isEmail(value: unknown): value is string;
59
+ /**
60
+ * Validate and assert PageFrontmatter
61
+ * @throws {TypeError} if validation fails
62
+ */
63
+ export declare function assertPageFrontmatter(value: unknown): asserts value is PageFrontmatter;
64
+ /**
65
+ * Validate and assert WikiPage
66
+ * @throws {TypeError} if validation fails
67
+ */
68
+ export declare function assertWikiPage(value: unknown): asserts value is WikiPage;
69
+ /**
70
+ * Validate and assert VersionMetadata
71
+ * @throws {TypeError} if validation fails
72
+ */
73
+ export declare function assertVersionMetadata(value: unknown): asserts value is VersionMetadata;
74
+ /**
75
+ * Validate and assert User
76
+ * @throws {TypeError} if validation fails
77
+ */
78
+ export declare function assertUser(value: unknown): asserts value is User;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Ambient declaration for `heic-decode` (no published types).
3
+ *
4
+ * The module's default export decodes the primary image of a HEIC/HEIF buffer
5
+ * via WASM libheif. Used only by the imageTransform fallback (#1076).
6
+ */
7
+ declare module 'heic-decode' {
8
+ interface DecodedImage {
9
+ width: number;
10
+ height: number;
11
+ /** RGBA pixel data, width × height × 4 bytes. */
12
+ data: ArrayBuffer;
13
+ }
14
+ function decode(options: { buffer: Buffer | Uint8Array }): Promise<DecodedImage>;
15
+ export default decode;
16
+ }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * ngdpbase Type Definitions
3
+ *
4
+ * Central export point for all TypeScript type definitions used throughout
5
+ * the ngdpbase application. Import types from this module to ensure consistency.
6
+ *
7
+ * @example
8
+ * import { WikiPage, PageFrontmatter, User } from '../types/index.js';
9
+ *
10
+ * @module types
11
+ */
12
+ export { PageFrontmatter, WikiPage, PageInfo, PageSaveOptions, PageSearchResult, PageListOptions } from './Page.js';
13
+ export { VersionMetadata, VersionManifest, VersionContent, VersionDiff, VersionHistoryEntry, VersionStorageInfo, VersionRetentionPolicy, VersionCleanupResult } from './Version.js';
14
+ export { User, UserPreferences, UserCreateData, UserUpdateData, UserSession, AuthResult, Role, Permission, UserProfile } from './User.js';
15
+ export { WikiConfig, VersioningConfig, SearchProviderConfig, ApplicationOrganizationConfig, ConfigPropertyDescriptor, ConfigChangeEvent, ConfigValidationResult } from './Config.js';
16
+ export { BaseProvider, PageProvider, VersioningPageProvider, UserProvider, AttachmentProvider, AttachmentMetadata, SearchProvider, CacheProvider, AuditProvider, AuditEvent } from './Provider.js';
17
+ export { WikiEngine, ManagerRegistry } from './WikiEngine.js';
18
+ export { ProviderCapability, AssetGPS, AssetCamera, AssetMetadata, AssetDimensions, AssetUsageRights, AssetUsageStats, AssetRecord, AssetQuery, AssetPage, AssetInput, AssetProvider } from './Asset.js';
19
+ export { isPageFrontmatter, isWikiPage, isPageInfo, isVersionMetadata, isVersionManifest, isUser, isUserSession, isAttachmentMetadata, isAuditEvent, isUuid, isIsoTimestamp, isEmail, assertPageFrontmatter, assertWikiPage, assertVersionMetadata, assertUser } from './guards.js';
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Minimal type declaration for linkedom.
3
+ * linkedom has no official @types package; this covers the APIs used in this project.
4
+ */
5
+ declare module 'linkedom' {
6
+ interface LinkedomText {
7
+ textContent: string | null;
8
+ nodeType: number;
9
+ nodeName: string;
10
+ }
11
+
12
+ interface LinkedomComment {
13
+ textContent: string | null;
14
+ nodeType: number;
15
+ nodeName: string;
16
+ }
17
+
18
+ interface LinkedomNodeList extends ArrayLike<LinkedomNode> {
19
+ length: number;
20
+ }
21
+
22
+ interface LinkedomHTMLCollection extends ArrayLike<LinkedomElement> {
23
+ length: number;
24
+ }
25
+
26
+ type LinkedomNode = LinkedomElement | LinkedomText | LinkedomComment;
27
+
28
+ interface LinkedomElement {
29
+ innerHTML: string;
30
+ outerHTML: string;
31
+ textContent: string | null;
32
+ className: string;
33
+ nodeType: number;
34
+ nodeName: string;
35
+ tagName: string;
36
+ childNodes: LinkedomNodeList;
37
+ firstChild: LinkedomNode | null;
38
+ lastChild: LinkedomNode | null;
39
+ setAttribute(name: string, value: string): void;
40
+ getAttribute(name: string): string | null;
41
+ removeAttribute(name: string): void;
42
+ appendChild(node: LinkedomNode): LinkedomNode;
43
+ insertBefore(newNode: LinkedomNode, referenceNode: LinkedomNode | null): LinkedomNode;
44
+ removeChild(node: LinkedomNode): LinkedomNode;
45
+ replaceChild(newNode: LinkedomNode, oldNode: LinkedomNode): LinkedomNode;
46
+ replaceWith(node: LinkedomNode): void;
47
+ remove(): void;
48
+ querySelector(selector: string): LinkedomElement | null;
49
+ querySelectorAll(selector: string): LinkedomElement[];
50
+ getElementsByClassName(className: string): LinkedomHTMLCollection;
51
+ getElementsByTagName(tagName: string): LinkedomHTMLCollection;
52
+ }
53
+
54
+ interface LinkedomDocument {
55
+ body: LinkedomElement;
56
+ documentElement?: LinkedomElement;
57
+ createElement(tag: string): LinkedomElement;
58
+ createTextNode(text: string): LinkedomText;
59
+ createComment(text: string): LinkedomComment;
60
+ getElementById(id: string): LinkedomElement | null;
61
+ querySelector(selector: string): LinkedomElement | null;
62
+ querySelectorAll(selector: string): LinkedomElement[];
63
+ }
64
+
65
+ function parseHTML(html: string): { document: LinkedomDocument };
66
+
67
+ export {
68
+ parseHTML,
69
+ LinkedomDocument,
70
+ LinkedomElement,
71
+ LinkedomText,
72
+ LinkedomComment,
73
+ LinkedomNode,
74
+ LinkedomNodeList,
75
+ LinkedomHTMLCollection
76
+ };
77
+ }
@@ -0,0 +1,21 @@
1
+ /**
2
+ * markdown-it plugins that ship without type declarations (#1273).
3
+ * markdown-it-anchor ships its own.
4
+ */
5
+ declare module 'markdown-it-sub' {
6
+ import type { PluginSimple } from 'markdown-it';
7
+ const plugin: PluginSimple;
8
+ export default plugin;
9
+ }
10
+
11
+ declare module 'markdown-it-sup' {
12
+ import type { PluginSimple } from 'markdown-it';
13
+ const plugin: PluginSimple;
14
+ export default plugin;
15
+ }
16
+
17
+ declare module 'markdown-it-task-lists' {
18
+ import type { PluginWithOptions } from 'markdown-it';
19
+ const plugin: PluginWithOptions<{ enabled?: boolean; label?: boolean; labelAfter?: boolean }>;
20
+ export default plugin;
21
+ }