@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,388 @@
1
+ /**
2
+ * Configuration type definitions for ngdpbase
3
+ *
4
+ * This module defines types for wiki configuration used by ConfigurationManager
5
+ * and various components throughout the application.
6
+ */
7
+ /**
8
+ * Wiki configuration object
9
+ *
10
+ * Represents the complete wiki configuration loaded from JSON files.
11
+ * Configuration is hierarchical with app-default-config.json, app-custom-config.json,
12
+ * and environment-specific overrides.
13
+ */
14
+ export interface WikiConfig {
15
+ /** Application name */
16
+ 'ngdpbase.application-name': string;
17
+ /** Favicon path */
18
+ 'ngdpbase.favicon-path': string;
19
+ /** Application category */
20
+ 'ngdpbase.application.category': string;
21
+ /** Application version */
22
+ 'ngdpbase.version': string;
23
+ /** Base URL — public-facing URL of this wiki (used for template variables, magic-link emails, org @id fallback). */
24
+ 'ngdpbase.application.base-url': string;
25
+ /** Character encoding */
26
+ 'ngdpbase.encoding': string;
27
+ /** Front page name */
28
+ 'ngdpbase.front-page': string;
29
+ /**
30
+ * Self-registration toggle. When false, /register is unavailable,
31
+ * the header button shows "Request access" linking to the redirect
32
+ * page, and OIDC auto-provisioning of brand-new users is rejected.
33
+ * Login for existing users is unaffected. Default: true.
34
+ */
35
+ 'ngdpbase.application.registration': boolean;
36
+ /**
37
+ * Page slug to link to when registration is disabled. Operators control
38
+ * the page content via the system UI. Default: "request-access".
39
+ */
40
+ 'ngdpbase.application.registration.redirect-page': string;
41
+ /**
42
+ * Contact endpoint kill switch (#658). When false, /contact returns 404.
43
+ * Default: true.
44
+ */
45
+ 'ngdpbase.application.contact.enabled': boolean;
46
+ /**
47
+ * Optional override page slug for /contact (#658). When non-empty,
48
+ * /contact 302-redirects to /view/<slug> instead of rendering the
49
+ * built-in form. Cannot equal "contact" — redirect loop, rejected at
50
+ * startup. Default: "" (use built-in form).
51
+ */
52
+ 'ngdpbase.application.contact.page': string;
53
+ /**
54
+ * Optional explicit recipient address (or comma-separated list / alias)
55
+ * for /contact submissions (#658). When empty, recipient is resolved at
56
+ * request time to the email of the first user with the admin role whose
57
+ * email is not the install-default sentinel "admin@localhost". Email is
58
+ * never rendered to clients. Default: "".
59
+ */
60
+ 'ngdpbase.application.contact.recipient': string;
61
+ /**
62
+ * Render a footer link to /contact on every page when the contact feature
63
+ * is fully available (`contact.enabled` + `mail.enabled` + a recipient
64
+ * resolves). When false, /contact still works but is not advertised in
65
+ * the footer (#670 Phase A). Default: true.
66
+ */
67
+ 'ngdpbase.application.contact.footer.enabled': boolean;
68
+ /**
69
+ * Persist every legitimate POST /contact submission (#670 Phase C) as a
70
+ * JSONL audit log. Honeypot-triggered and rate-limited submissions are
71
+ * NOT persisted. When false, no file is written; the form still works.
72
+ * Default: true.
73
+ */
74
+ 'ngdpbase.application.contact.persist.enabled': boolean;
75
+ /**
76
+ * Override path for the JSONL audit log (#670 Phase C). When empty,
77
+ * defaults to `{instanceDataFolder}/contact-submissions.log`. Operators
78
+ * who want to send the log somewhere off the data volume (e.g., a
79
+ * mounted log directory) can set an absolute path here. Default: "".
80
+ */
81
+ 'ngdpbase.application.contact.persist.path': string;
82
+ /**
83
+ * Anti-spam: enable the honeypot field on mail-bearing public forms
84
+ * (#670 Phase E). Today only `/contact` uses this; future mail-bearing
85
+ * public forms (re-enabled `/register`, magic-link request, etc.) should
86
+ * read the same flag. When false, the hidden `_website` field is no
87
+ * longer silently rejected — bots that fill it succeed normally. Default:
88
+ * true.
89
+ */
90
+ 'ngdpbase.mail.honeypot.enabled': boolean;
91
+ /**
92
+ * Anti-spam: enable per-IP rate limiting on mail-bearing public forms
93
+ * (#670 Phase E). When false, no submissions are 429'd; the rate-limiter
94
+ * counter is not consumed. Default: true.
95
+ */
96
+ /**
97
+ * Login throttling (#1044): count failed password attempts per username AND
98
+ * per client IP, and lock the key out temporarily once the limit is reached.
99
+ * When false, nothing is counted and no attempt is ever refused.
100
+ * Default: true.
101
+ */
102
+ 'ngdpbase.auth.throttle.enabled': boolean;
103
+ /** Failures allowed within the window before a lockout. Default: 10. */
104
+ 'ngdpbase.auth.throttle.max-attempts': number;
105
+ /** How long failures are remembered, in minutes. Default: 15. */
106
+ 'ngdpbase.auth.throttle.window-minutes': number;
107
+ /**
108
+ * Lock duration for a first lockout, in minutes. Consecutive lockouts double
109
+ * it. Default: 1.
110
+ */
111
+ 'ngdpbase.auth.throttle.lock-minutes': number;
112
+ /**
113
+ * Ceiling for the doubling, in minutes. Locks always expire — a permanent
114
+ * lock on a known username would be a DoS vector against the operator.
115
+ * Default: 15.
116
+ */
117
+ 'ngdpbase.auth.throttle.max-lock-minutes': number;
118
+ 'ngdpbase.mail.rate-limit.enabled': boolean;
119
+ /**
120
+ * Anti-spam: max submissions per IP per `window-minutes` window before
121
+ * the 429 trips (#670 Phase E). Default: 5.
122
+ */
123
+ 'ngdpbase.mail.rate-limit.max-submissions': number;
124
+ /**
125
+ * Anti-spam: rate-limit window length in minutes (#670 Phase E).
126
+ * Default: 15.
127
+ */
128
+ 'ngdpbase.mail.rate-limit.window-minutes': number;
129
+ /** Server port */
130
+ 'ngdpbase.server.port': number;
131
+ /** Server host */
132
+ 'ngdpbase.server.host': string;
133
+ /** Session secret */
134
+ 'ngdpbase.session.secret': string;
135
+ /** Session max age (milliseconds) */
136
+ 'ngdpbase.session.max-age': number;
137
+ /** How long a session nobody signed in to lives after its last change (milliseconds; never longer than max-age) */
138
+ 'ngdpbase.session.anonymous-max-age': number;
139
+ /** Session secure flag (HTTPS only) */
140
+ 'ngdpbase.session.secure': boolean;
141
+ /** Session HTTP only flag */
142
+ 'ngdpbase.session.http-only': boolean;
143
+ /** Translator reader - match English plurals */
144
+ 'ngdpbase.translator-reader.match-english-plurals': boolean;
145
+ /** Translator reader - camel case links */
146
+ 'ngdpbase.translator-reader.camel-case-links': boolean;
147
+ /** Translator reader - allow HTML */
148
+ 'ngdpbase.translator-reader.allow-html': boolean;
149
+ /** Translator reader - plain URIs */
150
+ 'ngdpbase.translator-reader.plain-uris': boolean;
151
+ /** Page provider enabled */
152
+ 'ngdpbase.page.enabled': boolean;
153
+ /** Default page provider */
154
+ 'ngdpbase.page.provider.default': string;
155
+ /** Active page provider */
156
+ 'ngdpbase.page.provider': string;
157
+ /** Page storage directory */
158
+ 'ngdpbase.page.provider.filesystem.storagedir': string;
159
+ /** Required pages directory */
160
+ 'ngdpbase.page.provider.filesystem.requiredpagesdir': string;
161
+ /** Version snapshot folder name */
162
+ 'ngdpbase.page.provider.filesystem.versionsdir': string;
163
+ /** Soft-deleted page folder name */
164
+ 'ngdpbase.page.provider.filesystem.deleteddir': string;
165
+ /** Folder for a private store's non-page files: {store}/{attachmentsdir}/ */
166
+ 'ngdpbase.page.provider.filesystem.attachmentsdir': string;
167
+ /** User KEK envelope filename under the private user dir */
168
+ 'ngdpbase.page.provider.filesystem.private.files.userkeys': string;
169
+ /** Encrypted user page catalog filename */
170
+ 'ngdpbase.page.provider.filesystem.private.files.userindex': string;
171
+ /** Per-store metadata filename (encrypt flag / wrapped DEK) */
172
+ 'ngdpbase.page.provider.filesystem.private.files.storemeta': string;
173
+ /** File encoding for pages */
174
+ 'ngdpbase.page.provider.filesystem.encoding': string;
175
+ /** Auto-save enabled */
176
+ 'ngdpbase.page.provider.filesystem.autosave': boolean;
177
+ /** Attachment provider enabled */
178
+ 'ngdpbase.attachment.enabled': boolean;
179
+ /** Default attachment provider */
180
+ 'ngdpbase.attachment.provider.default': string;
181
+ /** Active attachment provider */
182
+ 'ngdpbase.attachment.provider': string;
183
+ /** Maximum attachment size (bytes) */
184
+ 'ngdpbase.attachment.maxsize': number;
185
+ /** Allowed attachment MIME types */
186
+ 'ngdpbase.attachment.allowedtypes': string;
187
+ /** Force download for attachments */
188
+ 'ngdpbase.attachment.forcedownload': boolean;
189
+ /** Attachment metadata file */
190
+ 'ngdpbase.attachment.metadatafile': string;
191
+ /**
192
+ * Pre-#1386 private-attachment folder name under the attachment storagedir.
193
+ * Migrate-FROM only. Live writes go to the page store.
194
+ */
195
+ 'ngdpbase.attachment.provider.basic.legacyprivateroot': string;
196
+ /** Search enabled */
197
+ 'ngdpbase.search.enabled': boolean;
198
+ /** Default search provider */
199
+ 'ngdpbase.search.provider.default': string;
200
+ /** Active search provider */
201
+ 'ngdpbase.search.provider': string;
202
+ /** Maximum search results */
203
+ 'ngdpbase.search.maxresults': number;
204
+ /** Autocomplete enabled */
205
+ 'ngdpbase.search.autocomplete.enabled': boolean;
206
+ /** Autocomplete minimum length */
207
+ 'ngdpbase.search.autocomplete.minlength': number;
208
+ /** Search suggestions enabled */
209
+ 'ngdpbase.search.suggestions.enabled': boolean;
210
+ /** Maximum suggestion items */
211
+ 'ngdpbase.search.suggestions.maxitems': number;
212
+ /** User provider */
213
+ 'ngdpbase.user.provider': string;
214
+ /** User provider default */
215
+ 'ngdpbase.user.provider.default': string;
216
+ /** User storage directory */
217
+ 'ngdpbase.user.provider.storagedir': string;
218
+ /**
219
+ * Recognised fenced code block language tags.
220
+ * Tags absent from this list are flagged as unknown on page save.
221
+ * 'wiki' is intentionally excluded — it has no special rendering meaning.
222
+ */
223
+ 'ngdpbase.markup.fenced-code-tags': string[] | Record<string, boolean>;
224
+ /** Active site theme — folder name under themes/ (e.g. "default") */
225
+ 'ngdpbase.theme.active': string;
226
+ /** Default light/dark mode for new users ("light" | "dark" | "system") */
227
+ 'ngdpbase.theme.defaults.mode': string;
228
+ /** Cache provider */
229
+ 'ngdpbase.cache.provider': string;
230
+ /** Cache provider default */
231
+ 'ngdpbase.cache.provider.default': string;
232
+ /** Audit provider */
233
+ 'ngdpbase.audit.provider': string;
234
+ /** Audit provider default */
235
+ 'ngdpbase.audit.provider.default': string;
236
+ /** Additional configuration properties */
237
+ [key: string]: unknown;
238
+ }
239
+ /**
240
+ * Versioning configuration
241
+ *
242
+ * Configuration specific to VersioningFileProvider.
243
+ */
244
+ export interface VersioningConfig {
245
+ /** Page index file location */
246
+ 'ngdpbase.page.provider.versioning.indexfile': string;
247
+ /** Maximum versions to keep per page */
248
+ 'ngdpbase.page.provider.versioning.maxversions': number;
249
+ /** Retention period in days */
250
+ 'ngdpbase.page.provider.versioning.retentiondays': number;
251
+ /** Compression method (none, gzip) */
252
+ 'ngdpbase.page.provider.versioning.compression': string;
253
+ /** Delta storage enabled */
254
+ 'ngdpbase.page.provider.versioning.deltastorage': boolean;
255
+ /** Checkpoint interval for full snapshots */
256
+ 'ngdpbase.page.provider.versioning.checkpointinterval': number;
257
+ /** Version cache size */
258
+ 'ngdpbase.page.provider.versioning.cachesize': number;
259
+ }
260
+ /**
261
+ * Search provider configuration
262
+ *
263
+ * Configuration for Lunr search provider.
264
+ */
265
+ export interface SearchProviderConfig {
266
+ /** Index directory */
267
+ 'ngdpbase.search.provider.lunr.indexdir': string;
268
+ /** Enable stemming */
269
+ 'ngdpbase.search.provider.lunr.stemming': boolean;
270
+ /** Title boost factor */
271
+ 'ngdpbase.search.provider.lunr.boost.title': number;
272
+ /** System category boost factor */
273
+ 'ngdpbase.search.provider.lunr.boost.systemcategory': number;
274
+ /** User keywords boost factor */
275
+ 'ngdpbase.search.provider.lunr.boost.userkeywords': number;
276
+ /** Tags boost factor */
277
+ 'ngdpbase.search.provider.lunr.boost.tags': number;
278
+ /** Keywords boost factor */
279
+ 'ngdpbase.search.provider.lunr.boost.keywords': number;
280
+ /** Maximum results */
281
+ 'ngdpbase.search.provider.lunr.maxresults': number;
282
+ /** Snippet length */
283
+ 'ngdpbase.search.provider.lunr.snippetlength': number;
284
+ }
285
+ /**
286
+ * Application organization / persons configuration (#617)
287
+ *
288
+ * Identifies WHERE the install's anchor Organization record lives. The org
289
+ * JSON-LD file at `<storagedir>/<file>` is the single source of truth for
290
+ * name, url, address, etc. — those fields live IN THE FILE, NOT in config.
291
+ * `OrganizationManager` reads the file directly.
292
+ */
293
+ export interface ApplicationOrganizationConfig {
294
+ /** Storage directory for organization JSON files (one file per org) */
295
+ 'ngdpbase.application.organization.storagedir': string;
296
+ /** Filename of the install anchor org file (e.g. "acme-corporation.json") */
297
+ 'ngdpbase.application.organization.file': string;
298
+ /** Default Organization provider class (lowercased) */
299
+ 'ngdpbase.application.organization.provider.default': string;
300
+ /** Active Organization provider class (lowercased; falls back to .default) */
301
+ 'ngdpbase.application.organization.provider': string;
302
+ /** Storage directory for person JSON files (one file per person) */
303
+ 'ngdpbase.application.persons.storagedir': string;
304
+ /** Default Person provider class (lowercased) */
305
+ 'ngdpbase.application.persons.provider.default': string;
306
+ /** Active Person provider class (lowercased; falls back to .default) */
307
+ 'ngdpbase.application.persons.provider': string;
308
+ /** Storage directory for OrganizationRole JSON files (one per (org, namedPosition) pair) */
309
+ 'ngdpbase.application.roles.storagedir': string;
310
+ /** Default Role provider class (lowercased) */
311
+ 'ngdpbase.application.roles.provider.default': string;
312
+ /** Active Role provider class (lowercased; falls back to .default) */
313
+ 'ngdpbase.application.roles.provider': string;
314
+ }
315
+ /**
316
+ * Configuration property descriptor
317
+ *
318
+ * Metadata about a configuration property (for validation and UI).
319
+ */
320
+ export interface ConfigPropertyDescriptor {
321
+ /** Property key */
322
+ key: string;
323
+ /** Default value */
324
+ defaultValue: unknown;
325
+ /** Value type */
326
+ type: 'string' | 'number' | 'boolean' | 'array' | 'object';
327
+ /** Human-readable description */
328
+ description: string;
329
+ /** Whether this is a required property */
330
+ required: boolean;
331
+ /** Whether this is a system property (not user-editable) */
332
+ system: boolean;
333
+ /** Validation rules */
334
+ validation?: {
335
+ /** Minimum value (for numbers) */
336
+ min?: number;
337
+ /** Maximum value (for numbers) */
338
+ max?: number;
339
+ /** Regex pattern (for strings) */
340
+ pattern?: string;
341
+ /** Allowed values (enum) */
342
+ enum?: unknown[];
343
+ };
344
+ /** Property category for grouping */
345
+ category?: string;
346
+ /** Whether property requires restart to take effect */
347
+ requiresRestart?: boolean;
348
+ }
349
+ /**
350
+ * Configuration change event
351
+ *
352
+ * Event emitted when configuration changes.
353
+ */
354
+ export interface ConfigChangeEvent {
355
+ /** Property key that changed */
356
+ key: string;
357
+ /** Old value */
358
+ oldValue: unknown;
359
+ /** New value */
360
+ newValue: unknown;
361
+ /** Timestamp of change */
362
+ timestamp: string;
363
+ /** User who made the change */
364
+ changedBy?: string;
365
+ /** Source of change (file, api, ui) */
366
+ source: string;
367
+ }
368
+ /**
369
+ * Configuration validation result
370
+ *
371
+ * Result of validating configuration.
372
+ */
373
+ export interface ConfigValidationResult {
374
+ /** Whether configuration is valid */
375
+ valid: boolean;
376
+ /** Validation errors */
377
+ errors: Array<{
378
+ key: string;
379
+ message: string;
380
+ value?: unknown;
381
+ }>;
382
+ /** Validation warnings */
383
+ warnings: Array<{
384
+ key: string;
385
+ message: string;
386
+ value?: unknown;
387
+ }>;
388
+ }
@@ -0,0 +1,78 @@
1
+ /**
2
+ * Schema.org Organization type (#617)
3
+ *
4
+ * Canonical core record for an organization. Stored as one JSON file per
5
+ * org under `ngdpbase.application.organization.storagedir`. The install's
6
+ * anchor org is identified by `ngdpbase.application.organization.file`.
7
+ *
8
+ * `@id` is the organization's canonical URL (e.g. https://example.com/),
9
+ * NOT a synthetic urn. Use the schema.org `identifier` field for any
10
+ * legacy slug compatibility.
11
+ *
12
+ * @see https://schema.org/Organization
13
+ */
14
+ /**
15
+ * Schema.org PostalAddress (subset used by Organization)
16
+ *
17
+ * @see https://schema.org/PostalAddress
18
+ */
19
+ export interface PostalAddress {
20
+ '@type': 'PostalAddress';
21
+ streetAddress?: string | null;
22
+ addressLocality?: string | null;
23
+ addressRegion?: string | null;
24
+ postalCode?: string | null;
25
+ addressCountry?: string | null;
26
+ }
27
+ /**
28
+ * Schema.org ContactPoint (subset used by Organization/Person)
29
+ *
30
+ * @see https://schema.org/ContactPoint
31
+ */
32
+ export interface ContactPoint {
33
+ '@type': 'ContactPoint';
34
+ contactType?: string;
35
+ email?: string;
36
+ telephone?: string;
37
+ url?: string;
38
+ availableLanguage?: string[];
39
+ }
40
+ /**
41
+ * Canonical Organization record.
42
+ *
43
+ * Required: `@context`, `@type`, `@id`, `name`.
44
+ * Optional fields mirror schema.org Organization.
45
+ */
46
+ export interface Organization {
47
+ '@context': 'https://schema.org';
48
+ '@type': 'Organization';
49
+ /** Canonical URL of the organization (the JSON-LD subject IRI) */
50
+ '@id': string;
51
+ /** Human-readable name */
52
+ name: string;
53
+ /** Legal/registered name if different from `name` */
54
+ legalName?: string;
55
+ /** Public web URL — usually the same as `@id` */
56
+ url?: string;
57
+ /** Logo URL */
58
+ logo?: string;
59
+ /** Short description */
60
+ description?: string;
61
+ /** Founding year/date as string (schema.org uses Date or DateTime) */
62
+ foundingDate?: string;
63
+ /** Postal address */
64
+ address?: PostalAddress;
65
+ /** Contact points (support, sales, etc.) */
66
+ contactPoint?: ContactPoint[];
67
+ /** Other URLs that identify this org (LinkedIn, Twitter, etc.) */
68
+ sameAs?: string[];
69
+ /** Optional legacy slug or external identifier */
70
+ identifier?: string;
71
+ /** Allow extension fields (additionalProperty, etc.) */
72
+ [key: string]: unknown;
73
+ }
74
+ /**
75
+ * Patch shape for update operations.
76
+ * `@context`/`@type` are immutable; `@id` cannot be changed via update.
77
+ */
78
+ export type OrganizationUpdate = Partial<Omit<Organization, '@context' | '@type' | '@id'>>;
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Storage seam for Organization records (#617)
3
+ *
4
+ * File system is the v1 default; future providers (S3, LDAP, external
5
+ * directory) implement the same interface and register without touching
6
+ * OrganizationManager.
7
+ */
8
+ import type { BaseProvider } from './Provider.js';
9
+ import type { Organization, OrganizationUpdate } from './Organization.js';
10
+ export interface OrganizationProvider extends BaseProvider {
11
+ /** Return all organizations the provider can see. */
12
+ list(): Promise<Organization[]>;
13
+ /** Look up an organization by its `@id` (canonical URL). */
14
+ getById(id: string): Promise<Organization | null>;
15
+ /**
16
+ * Look up an organization by its storage filename.
17
+ *
18
+ * Used by OrganizationManager.getInstallOrg() to resolve the value of
19
+ * `ngdpbase.application.organization.file` to the install's anchor org.
20
+ * Providers that don't store records as discrete files should treat this
21
+ * as an alias lookup or return null.
22
+ */
23
+ getByFile(filename: string): Promise<Organization | null>;
24
+ /**
25
+ * Create a new organization.
26
+ *
27
+ * @param org Full Organization record. The provider will write it under
28
+ * a filename derived from `filename` if supplied, or from a
29
+ * slug of `org.name` otherwise.
30
+ * @param filename Optional explicit filename (used by install seeding).
31
+ * @returns The stored organization.
32
+ */
33
+ create(org: Organization, filename?: string): Promise<Organization>;
34
+ /** Apply a partial update by `@id`. Returns the updated record, or null if not found. */
35
+ update(id: string, patch: OrganizationUpdate): Promise<Organization | null>;
36
+ /** Delete by `@id`. Returns true if a record was removed. */
37
+ delete(id: string): Promise<boolean>;
38
+ }