@forumone/throughline 0.0.0 → 1.0.0-next.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 (918) hide show
  1. package/CHANGELOG.md +584 -0
  2. package/LICENSE +21 -0
  3. package/README.md +352 -0
  4. package/bin/payload-cli.mjs +443 -0
  5. package/bin/throughline-payload.mjs +6 -0
  6. package/dist/access/coreCollections.d.ts +18 -0
  7. package/dist/access/coreCollections.d.ts.map +1 -0
  8. package/dist/access/coreCollections.js +56 -0
  9. package/dist/access/coreCollections.js.map +1 -0
  10. package/dist/approvals/collection.d.ts +21 -0
  11. package/dist/approvals/collection.d.ts.map +1 -0
  12. package/dist/approvals/collection.js +99 -0
  13. package/dist/approvals/collection.js.map +1 -0
  14. package/dist/approvals/endpoints/action.d.ts +31 -0
  15. package/dist/approvals/endpoints/action.d.ts.map +1 -0
  16. package/dist/approvals/endpoints/action.js +205 -0
  17. package/dist/approvals/endpoints/action.js.map +1 -0
  18. package/dist/approvals/index.d.ts +19 -0
  19. package/dist/approvals/index.d.ts.map +1 -0
  20. package/dist/approvals/index.js +13 -0
  21. package/dist/approvals/index.js.map +1 -0
  22. package/dist/approvals/jobs/expire-stale-approvals.d.ts +14 -0
  23. package/dist/approvals/jobs/expire-stale-approvals.d.ts.map +1 -0
  24. package/dist/approvals/jobs/expire-stale-approvals.js +101 -0
  25. package/dist/approvals/jobs/expire-stale-approvals.js.map +1 -0
  26. package/dist/approvals/options.d.ts +76 -0
  27. package/dist/approvals/options.d.ts.map +1 -0
  28. package/dist/approvals/options.js +47 -0
  29. package/dist/approvals/options.js.map +1 -0
  30. package/dist/approvals/plugin.d.ts +4 -0
  31. package/dist/approvals/plugin.d.ts.map +1 -0
  32. package/dist/approvals/plugin.js +92 -0
  33. package/dist/approvals/plugin.js.map +1 -0
  34. package/dist/approvals/resolver.d.ts +18 -0
  35. package/dist/approvals/resolver.d.ts.map +1 -0
  36. package/dist/approvals/resolver.js +57 -0
  37. package/dist/approvals/resolver.js.map +1 -0
  38. package/dist/approvals/symbol.d.ts +12 -0
  39. package/dist/approvals/symbol.d.ts.map +1 -0
  40. package/dist/approvals/symbol.js +12 -0
  41. package/dist/approvals/symbol.js.map +1 -0
  42. package/dist/approvals/tokens.d.ts +48 -0
  43. package/dist/approvals/tokens.d.ts.map +1 -0
  44. package/dist/approvals/tokens.js +123 -0
  45. package/dist/approvals/tokens.js.map +1 -0
  46. package/dist/approvals/tools/descriptors.d.ts +26 -0
  47. package/dist/approvals/tools/descriptors.d.ts.map +1 -0
  48. package/dist/approvals/tools/descriptors.js +35 -0
  49. package/dist/approvals/tools/descriptors.js.map +1 -0
  50. package/dist/approvals/tools/get-approval-status.d.ts +11 -0
  51. package/dist/approvals/tools/get-approval-status.d.ts.map +1 -0
  52. package/dist/approvals/tools/get-approval-status.js +94 -0
  53. package/dist/approvals/tools/get-approval-status.js.map +1 -0
  54. package/dist/approvals/tools/index.d.ts +7 -0
  55. package/dist/approvals/tools/index.d.ts.map +1 -0
  56. package/dist/approvals/tools/index.js +7 -0
  57. package/dist/approvals/tools/index.js.map +1 -0
  58. package/dist/approvals/tools/list-my-requests.d.ts +11 -0
  59. package/dist/approvals/tools/list-my-requests.d.ts.map +1 -0
  60. package/dist/approvals/tools/list-my-requests.js +55 -0
  61. package/dist/approvals/tools/list-my-requests.js.map +1 -0
  62. package/dist/approvals/tools/list-pending-approvals.d.ts +11 -0
  63. package/dist/approvals/tools/list-pending-approvals.d.ts.map +1 -0
  64. package/dist/approvals/tools/list-pending-approvals.js +53 -0
  65. package/dist/approvals/tools/list-pending-approvals.js.map +1 -0
  66. package/dist/approvals/tools/request-approval.d.ts +13 -0
  67. package/dist/approvals/tools/request-approval.d.ts.map +1 -0
  68. package/dist/approvals/tools/request-approval.js +123 -0
  69. package/dist/approvals/tools/request-approval.js.map +1 -0
  70. package/dist/approvals/tools/respond-to-approval.d.ts +13 -0
  71. package/dist/approvals/tools/respond-to-approval.d.ts.map +1 -0
  72. package/dist/approvals/tools/respond-to-approval.js +98 -0
  73. package/dist/approvals/tools/respond-to-approval.js.map +1 -0
  74. package/dist/audit/collection.d.ts +22 -0
  75. package/dist/audit/collection.d.ts.map +1 -0
  76. package/dist/audit/collection.js +109 -0
  77. package/dist/audit/collection.js.map +1 -0
  78. package/dist/audit/index.d.ts +16 -0
  79. package/dist/audit/index.d.ts.map +1 -0
  80. package/dist/audit/index.js +11 -0
  81. package/dist/audit/index.js.map +1 -0
  82. package/dist/audit/jobs/audit-event-echo.d.ts +14 -0
  83. package/dist/audit/jobs/audit-event-echo.d.ts.map +1 -0
  84. package/dist/audit/jobs/audit-event-echo.js +61 -0
  85. package/dist/audit/jobs/audit-event-echo.js.map +1 -0
  86. package/dist/audit/plugin.d.ts +20 -0
  87. package/dist/audit/plugin.d.ts.map +1 -0
  88. package/dist/audit/plugin.js +55 -0
  89. package/dist/audit/plugin.js.map +1 -0
  90. package/dist/audit/query/formatting/index.d.ts +40 -0
  91. package/dist/audit/query/formatting/index.d.ts.map +1 -0
  92. package/dist/audit/query/formatting/index.js +73 -0
  93. package/dist/audit/query/formatting/index.js.map +1 -0
  94. package/dist/audit/query/options.d.ts +34 -0
  95. package/dist/audit/query/options.d.ts.map +1 -0
  96. package/dist/audit/query/options.js +8 -0
  97. package/dist/audit/query/options.js.map +1 -0
  98. package/dist/audit/query/plugin.d.ts +11 -0
  99. package/dist/audit/query/plugin.d.ts.map +1 -0
  100. package/dist/audit/query/plugin.js +68 -0
  101. package/dist/audit/query/plugin.js.map +1 -0
  102. package/dist/audit/query/tools/access.d.ts +9 -0
  103. package/dist/audit/query/tools/access.d.ts.map +1 -0
  104. package/dist/audit/query/tools/access.js +14 -0
  105. package/dist/audit/query/tools/access.js.map +1 -0
  106. package/dist/audit/query/tools/descriptors.d.ts +26 -0
  107. package/dist/audit/query/tools/descriptors.d.ts.map +1 -0
  108. package/dist/audit/query/tools/descriptors.js +35 -0
  109. package/dist/audit/query/tools/descriptors.js.map +1 -0
  110. package/dist/audit/query/tools/get-change-history.d.ts +23 -0
  111. package/dist/audit/query/tools/get-change-history.d.ts.map +1 -0
  112. package/dist/audit/query/tools/get-change-history.js +44 -0
  113. package/dist/audit/query/tools/get-change-history.js.map +1 -0
  114. package/dist/audit/query/tools/get-recent-failures.d.ts +23 -0
  115. package/dist/audit/query/tools/get-recent-failures.d.ts.map +1 -0
  116. package/dist/audit/query/tools/get-recent-failures.js +56 -0
  117. package/dist/audit/query/tools/get-recent-failures.js.map +1 -0
  118. package/dist/audit/query/tools/index.d.ts +13 -0
  119. package/dist/audit/query/tools/index.d.ts.map +1 -0
  120. package/dist/audit/query/tools/index.js +8 -0
  121. package/dist/audit/query/tools/index.js.map +1 -0
  122. package/dist/audit/query/tools/query-audit.d.ts +53 -0
  123. package/dist/audit/query/tools/query-audit.d.ts.map +1 -0
  124. package/dist/audit/query/tools/query-audit.js +78 -0
  125. package/dist/audit/query/tools/query-audit.js.map +1 -0
  126. package/dist/audit/query/tools/what-changed-in-range.d.ts +23 -0
  127. package/dist/audit/query/tools/what-changed-in-range.d.ts.map +1 -0
  128. package/dist/audit/query/tools/what-changed-in-range.js +86 -0
  129. package/dist/audit/query/tools/what-changed-in-range.js.map +1 -0
  130. package/dist/audit/query/tools/who-changed-what.d.ts +38 -0
  131. package/dist/audit/query/tools/who-changed-what.d.ts.map +1 -0
  132. package/dist/audit/query/tools/who-changed-what.js +66 -0
  133. package/dist/audit/query/tools/who-changed-what.js.map +1 -0
  134. package/dist/audit/types.d.ts +11 -0
  135. package/dist/audit/types.d.ts.map +1 -0
  136. package/dist/audit/types.js +45 -0
  137. package/dist/audit/types.js.map +1 -0
  138. package/dist/audit/writer.d.ts +50 -0
  139. package/dist/audit/writer.d.ts.map +1 -0
  140. package/dist/audit/writer.js +101 -0
  141. package/dist/audit/writer.js.map +1 -0
  142. package/dist/cache-tags.d.ts +31 -0
  143. package/dist/cache-tags.d.ts.map +1 -0
  144. package/dist/cache-tags.js +53 -0
  145. package/dist/cache-tags.js.map +1 -0
  146. package/dist/components/index.d.ts +8 -0
  147. package/dist/components/index.d.ts.map +1 -0
  148. package/dist/components/index.js +7 -0
  149. package/dist/components/index.js.map +1 -0
  150. package/dist/components/manifest-source.d.ts +17 -0
  151. package/dist/components/manifest-source.d.ts.map +1 -0
  152. package/dist/components/manifest-source.js +60 -0
  153. package/dist/components/manifest-source.js.map +1 -0
  154. package/dist/components/matching/index.d.ts +3 -0
  155. package/dist/components/matching/index.d.ts.map +1 -0
  156. package/dist/components/matching/index.js +2 -0
  157. package/dist/components/matching/index.js.map +1 -0
  158. package/dist/components/matching/tfidf.d.ts +13 -0
  159. package/dist/components/matching/tfidf.d.ts.map +1 -0
  160. package/dist/components/matching/tfidf.js +118 -0
  161. package/dist/components/matching/tfidf.js.map +1 -0
  162. package/dist/components/matching/types.d.ts +22 -0
  163. package/dist/components/matching/types.d.ts.map +1 -0
  164. package/dist/components/matching/types.js +2 -0
  165. package/dist/components/matching/types.js.map +1 -0
  166. package/dist/components/options.d.ts +136 -0
  167. package/dist/components/options.d.ts.map +1 -0
  168. package/dist/components/options.js +40 -0
  169. package/dist/components/options.js.map +1 -0
  170. package/dist/components/plugin.d.ts +4 -0
  171. package/dist/components/plugin.d.ts.map +1 -0
  172. package/dist/components/plugin.js +95 -0
  173. package/dist/components/plugin.js.map +1 -0
  174. package/dist/components/tools/descriptors.d.ts +34 -0
  175. package/dist/components/tools/descriptors.d.ts.map +1 -0
  176. package/dist/components/tools/descriptors.js +43 -0
  177. package/dist/components/tools/descriptors.js.map +1 -0
  178. package/dist/components/tools/find-anti-pattern.d.ts +9 -0
  179. package/dist/components/tools/find-anti-pattern.d.ts.map +1 -0
  180. package/dist/components/tools/find-anti-pattern.js +31 -0
  181. package/dist/components/tools/find-anti-pattern.js.map +1 -0
  182. package/dist/components/tools/get-contract.d.ts +4 -0
  183. package/dist/components/tools/get-contract.d.ts.map +1 -0
  184. package/dist/components/tools/get-contract.js +19 -0
  185. package/dist/components/tools/get-contract.js.map +1 -0
  186. package/dist/components/tools/get-tokens.d.ts +4 -0
  187. package/dist/components/tools/get-tokens.d.ts.map +1 -0
  188. package/dist/components/tools/get-tokens.js +19 -0
  189. package/dist/components/tools/get-tokens.js.map +1 -0
  190. package/dist/components/tools/get-variants.d.ts +4 -0
  191. package/dist/components/tools/get-variants.d.ts.map +1 -0
  192. package/dist/components/tools/get-variants.js +19 -0
  193. package/dist/components/tools/get-variants.js.map +1 -0
  194. package/dist/components/tools/index.d.ts +9 -0
  195. package/dist/components/tools/index.d.ts.map +1 -0
  196. package/dist/components/tools/index.js +9 -0
  197. package/dist/components/tools/index.js.map +1 -0
  198. package/dist/components/tools/list-components.d.ts +4 -0
  199. package/dist/components/tools/list-components.d.ts.map +1 -0
  200. package/dist/components/tools/list-components.js +25 -0
  201. package/dist/components/tools/list-components.js.map +1 -0
  202. package/dist/components/tools/suggest-for-intent.d.ts +12 -0
  203. package/dist/components/tools/suggest-for-intent.d.ts.map +1 -0
  204. package/dist/components/tools/suggest-for-intent.js +83 -0
  205. package/dist/components/tools/suggest-for-intent.js.map +1 -0
  206. package/dist/components/tools/validate-composition.d.ts +9 -0
  207. package/dist/components/tools/validate-composition.d.ts.map +1 -0
  208. package/dist/components/tools/validate-composition.js +31 -0
  209. package/dist/components/tools/validate-composition.js.map +1 -0
  210. package/dist/components/validation/composition.d.ts +38 -0
  211. package/dist/components/validation/composition.d.ts.map +1 -0
  212. package/dist/components/validation/composition.js +135 -0
  213. package/dist/components/validation/composition.js.map +1 -0
  214. package/dist/editorial/calendar/ContentCalendarReport.d.ts +9 -0
  215. package/dist/editorial/calendar/ContentCalendarReport.d.ts.map +1 -0
  216. package/dist/editorial/calendar/ContentCalendarReport.js +47 -0
  217. package/dist/editorial/calendar/ContentCalendarReport.js.map +1 -0
  218. package/dist/editorial/calendar/ContentCalendarView.d.ts +3 -0
  219. package/dist/editorial/calendar/ContentCalendarView.d.ts.map +1 -0
  220. package/dist/editorial/calendar/ContentCalendarView.js +36 -0
  221. package/dist/editorial/calendar/ContentCalendarView.js.map +1 -0
  222. package/dist/editorial/calendar/calendar.d.ts +30 -0
  223. package/dist/editorial/calendar/calendar.d.ts.map +1 -0
  224. package/dist/editorial/calendar/calendar.js +23 -0
  225. package/dist/editorial/calendar/calendar.js.map +1 -0
  226. package/dist/editorial/calendar/find.d.ts +41 -0
  227. package/dist/editorial/calendar/find.d.ts.map +1 -0
  228. package/dist/editorial/calendar/find.js +108 -0
  229. package/dist/editorial/calendar/find.js.map +1 -0
  230. package/dist/editorial/calendar/month.d.ts +45 -0
  231. package/dist/editorial/calendar/month.d.ts.map +1 -0
  232. package/dist/editorial/calendar/month.js +120 -0
  233. package/dist/editorial/calendar/month.js.map +1 -0
  234. package/dist/editorial/calendar/tool.d.ts +50 -0
  235. package/dist/editorial/calendar/tool.d.ts.map +1 -0
  236. package/dist/editorial/calendar/tool.js +68 -0
  237. package/dist/editorial/calendar/tool.js.map +1 -0
  238. package/dist/editorial/config.d.ts +25 -0
  239. package/dist/editorial/config.d.ts.map +1 -0
  240. package/dist/editorial/config.js +12 -0
  241. package/dist/editorial/config.js.map +1 -0
  242. package/dist/editorial/health/ContentHealthReport.d.ts +7 -0
  243. package/dist/editorial/health/ContentHealthReport.d.ts.map +1 -0
  244. package/dist/editorial/health/ContentHealthReport.js +29 -0
  245. package/dist/editorial/health/ContentHealthReport.js.map +1 -0
  246. package/dist/editorial/health/ContentHealthView.d.ts +3 -0
  247. package/dist/editorial/health/ContentHealthView.d.ts.map +1 -0
  248. package/dist/editorial/health/ContentHealthView.js +29 -0
  249. package/dist/editorial/health/ContentHealthView.js.map +1 -0
  250. package/dist/editorial/health/HealthSummary.d.ts +6 -0
  251. package/dist/editorial/health/HealthSummary.d.ts.map +1 -0
  252. package/dist/editorial/health/HealthSummary.js +39 -0
  253. package/dist/editorial/health/HealthSummary.js.map +1 -0
  254. package/dist/editorial/health/checks.d.ts +104 -0
  255. package/dist/editorial/health/checks.d.ts.map +1 -0
  256. package/dist/editorial/health/checks.js +188 -0
  257. package/dist/editorial/health/checks.js.map +1 -0
  258. package/dist/editorial/health/find.d.ts +43 -0
  259. package/dist/editorial/health/find.d.ts.map +1 -0
  260. package/dist/editorial/health/find.js +97 -0
  261. package/dist/editorial/health/find.js.map +1 -0
  262. package/dist/editorial/health/tool.d.ts +53 -0
  263. package/dist/editorial/health/tool.d.ts.map +1 -0
  264. package/dist/editorial/health/tool.js +80 -0
  265. package/dist/editorial/health/tool.js.map +1 -0
  266. package/dist/editorial/index.d.ts +25 -0
  267. package/dist/editorial/index.d.ts.map +1 -0
  268. package/dist/editorial/index.js +15 -0
  269. package/dist/editorial/index.js.map +1 -0
  270. package/dist/editorial/palette/CommandPalette.d.ts +15 -0
  271. package/dist/editorial/palette/CommandPalette.d.ts.map +1 -0
  272. package/dist/editorial/palette/CommandPalette.js +319 -0
  273. package/dist/editorial/palette/CommandPalette.js.map +1 -0
  274. package/dist/editorial/palette/ReportsNav.d.ts +5 -0
  275. package/dist/editorial/palette/ReportsNav.d.ts.map +1 -0
  276. package/dist/editorial/palette/ReportsNav.js +31 -0
  277. package/dist/editorial/palette/ReportsNav.js.map +1 -0
  278. package/dist/editorial/palette/search.d.ts +18 -0
  279. package/dist/editorial/palette/search.d.ts.map +1 -0
  280. package/dist/editorial/palette/search.js +41 -0
  281. package/dist/editorial/palette/search.js.map +1 -0
  282. package/dist/editorial/palette/sources.d.ts +64 -0
  283. package/dist/editorial/palette/sources.d.ts.map +1 -0
  284. package/dist/editorial/palette/sources.js +103 -0
  285. package/dist/editorial/palette/sources.js.map +1 -0
  286. package/dist/editorial/palette/styles.d.ts +2 -0
  287. package/dist/editorial/palette/styles.d.ts.map +1 -0
  288. package/dist/editorial/palette/styles.js +76 -0
  289. package/dist/editorial/palette/styles.js.map +1 -0
  290. package/dist/editorial/palette/tool.d.ts +31 -0
  291. package/dist/editorial/palette/tool.d.ts.map +1 -0
  292. package/dist/editorial/palette/tool.js +63 -0
  293. package/dist/editorial/palette/tool.js.map +1 -0
  294. package/dist/editorial/plugin.d.ts +76 -0
  295. package/dist/editorial/plugin.d.ts.map +1 -0
  296. package/dist/editorial/plugin.js +186 -0
  297. package/dist/editorial/plugin.js.map +1 -0
  298. package/dist/editorial/relativeTime.d.ts +3 -0
  299. package/dist/editorial/relativeTime.d.ts.map +1 -0
  300. package/dist/editorial/relativeTime.js +27 -0
  301. package/dist/editorial/relativeTime.js.map +1 -0
  302. package/dist/editorial/styles.d.ts +2 -0
  303. package/dist/editorial/styles.d.ts.map +1 -0
  304. package/dist/editorial/styles.js +191 -0
  305. package/dist/editorial/styles.js.map +1 -0
  306. package/dist/editorial/work/YourWork.d.ts +13 -0
  307. package/dist/editorial/work/YourWork.d.ts.map +1 -0
  308. package/dist/editorial/work/YourWork.js +40 -0
  309. package/dist/editorial/work/YourWork.js.map +1 -0
  310. package/dist/editorial/work/tool.d.ts +45 -0
  311. package/dist/editorial/work/tool.d.ts.map +1 -0
  312. package/dist/editorial/work/tool.js +54 -0
  313. package/dist/editorial/work/tool.js.map +1 -0
  314. package/dist/editorial/work/work.d.ts +31 -0
  315. package/dist/editorial/work/work.d.ts.map +1 -0
  316. package/dist/editorial/work/work.js +68 -0
  317. package/dist/editorial/work/work.js.map +1 -0
  318. package/dist/email/client.d.ts +78 -0
  319. package/dist/email/client.d.ts.map +1 -0
  320. package/dist/email/client.js +63 -0
  321. package/dist/email/client.js.map +1 -0
  322. package/dist/email/functions/_shared.d.ts +17 -0
  323. package/dist/email/functions/_shared.d.ts.map +1 -0
  324. package/dist/email/functions/_shared.js +40 -0
  325. package/dist/email/functions/_shared.js.map +1 -0
  326. package/dist/email/functions/index.d.ts +7 -0
  327. package/dist/email/functions/index.d.ts.map +1 -0
  328. package/dist/email/functions/index.js +4 -0
  329. package/dist/email/functions/index.js.map +1 -0
  330. package/dist/email/functions/notify-approval-decision.d.ts +34 -0
  331. package/dist/email/functions/notify-approval-decision.d.ts.map +1 -0
  332. package/dist/email/functions/notify-approval-decision.js +77 -0
  333. package/dist/email/functions/notify-approval-decision.js.map +1 -0
  334. package/dist/email/functions/notify-approval-expired.d.ts +32 -0
  335. package/dist/email/functions/notify-approval-expired.d.ts.map +1 -0
  336. package/dist/email/functions/notify-approval-expired.js +54 -0
  337. package/dist/email/functions/notify-approval-expired.js.map +1 -0
  338. package/dist/email/functions/notify-approval-request.d.ts +35 -0
  339. package/dist/email/functions/notify-approval-request.d.ts.map +1 -0
  340. package/dist/email/functions/notify-approval-request.js +89 -0
  341. package/dist/email/functions/notify-approval-request.js.map +1 -0
  342. package/dist/email/index.d.ts +17 -0
  343. package/dist/email/index.d.ts.map +1 -0
  344. package/dist/email/index.js +12 -0
  345. package/dist/email/index.js.map +1 -0
  346. package/dist/email/options.d.ts +100 -0
  347. package/dist/email/options.d.ts.map +1 -0
  348. package/dist/email/options.js +55 -0
  349. package/dist/email/options.js.map +1 -0
  350. package/dist/email/plugin.d.ts +28 -0
  351. package/dist/email/plugin.d.ts.map +1 -0
  352. package/dist/email/plugin.js +113 -0
  353. package/dist/email/plugin.js.map +1 -0
  354. package/dist/email/templates/ApprovalDecision.d.ts +15 -0
  355. package/dist/email/templates/ApprovalDecision.d.ts.map +1 -0
  356. package/dist/email/templates/ApprovalDecision.js +56 -0
  357. package/dist/email/templates/ApprovalDecision.js.map +1 -0
  358. package/dist/email/templates/ApprovalExpired.d.ts +10 -0
  359. package/dist/email/templates/ApprovalExpired.d.ts.map +1 -0
  360. package/dist/email/templates/ApprovalExpired.js +8 -0
  361. package/dist/email/templates/ApprovalExpired.js.map +1 -0
  362. package/dist/email/templates/ApprovalRequest.d.ts +24 -0
  363. package/dist/email/templates/ApprovalRequest.d.ts.map +1 -0
  364. package/dist/email/templates/ApprovalRequest.js +58 -0
  365. package/dist/email/templates/ApprovalRequest.js.map +1 -0
  366. package/dist/email/templates/_layout.d.ts +17 -0
  367. package/dist/email/templates/_layout.d.ts.map +1 -0
  368. package/dist/email/templates/_layout.js +39 -0
  369. package/dist/email/templates/_layout.js.map +1 -0
  370. package/dist/email/templates/index.d.ts +9 -0
  371. package/dist/email/templates/index.d.ts.map +1 -0
  372. package/dist/email/templates/index.js +5 -0
  373. package/dist/email/templates/index.js.map +1 -0
  374. package/dist/email/tokens.d.ts +39 -0
  375. package/dist/email/tokens.d.ts.map +1 -0
  376. package/dist/email/tokens.js +17 -0
  377. package/dist/email/tokens.js.map +1 -0
  378. package/dist/env/index.d.ts +54 -0
  379. package/dist/env/index.d.ts.map +1 -0
  380. package/dist/env/index.js +113 -0
  381. package/dist/env/index.js.map +1 -0
  382. package/dist/events/inngest.d.ts +24 -0
  383. package/dist/events/inngest.d.ts.map +1 -0
  384. package/dist/events/inngest.js +24 -0
  385. package/dist/events/inngest.js.map +1 -0
  386. package/dist/events/taxonomy.d.ts +84 -0
  387. package/dist/events/taxonomy.d.ts.map +1 -0
  388. package/dist/events/taxonomy.js +10 -0
  389. package/dist/events/taxonomy.js.map +1 -0
  390. package/dist/events/vercel.d.ts +47 -0
  391. package/dist/events/vercel.d.ts.map +1 -0
  392. package/dist/events/vercel.js +69 -0
  393. package/dist/events/vercel.js.map +1 -0
  394. package/dist/exports/client.d.ts +24 -0
  395. package/dist/exports/client.d.ts.map +1 -0
  396. package/dist/exports/client.js +21 -0
  397. package/dist/exports/client.js.map +1 -0
  398. package/dist/exports/rsc.d.ts +17 -0
  399. package/dist/exports/rsc.d.ts.map +1 -0
  400. package/dist/exports/rsc.js +19 -0
  401. package/dist/exports/rsc.js.map +1 -0
  402. package/dist/fields/CharacterCountField.d.ts +4 -0
  403. package/dist/fields/CharacterCountField.d.ts.map +1 -0
  404. package/dist/fields/CharacterCountField.js +94 -0
  405. package/dist/fields/CharacterCountField.js.map +1 -0
  406. package/dist/fields/characterCount.d.ts +15 -0
  407. package/dist/fields/characterCount.d.ts.map +1 -0
  408. package/dist/fields/characterCount.js +92 -0
  409. package/dist/fields/characterCount.js.map +1 -0
  410. package/dist/fields/checkSlug.d.ts +62 -0
  411. package/dist/fields/checkSlug.d.ts.map +1 -0
  412. package/dist/fields/checkSlug.js +119 -0
  413. package/dist/fields/checkSlug.js.map +1 -0
  414. package/dist/fields/index.d.ts +9 -0
  415. package/dist/fields/index.d.ts.map +1 -0
  416. package/dist/fields/index.js +9 -0
  417. package/dist/fields/index.js.map +1 -0
  418. package/dist/fields/mapFields.d.ts +13 -0
  419. package/dist/fields/mapFields.d.ts.map +1 -0
  420. package/dist/fields/mapFields.js +32 -0
  421. package/dist/fields/mapFields.js.map +1 -0
  422. package/dist/fields/publishing.d.ts +33 -0
  423. package/dist/fields/publishing.d.ts.map +1 -0
  424. package/dist/fields/publishing.js +81 -0
  425. package/dist/fields/publishing.js.map +1 -0
  426. package/dist/fields/revisedAt.d.ts +15 -0
  427. package/dist/fields/revisedAt.d.ts.map +1 -0
  428. package/dist/fields/revisedAt.js +79 -0
  429. package/dist/fields/revisedAt.js.map +1 -0
  430. package/dist/fields/slug.d.ts +21 -0
  431. package/dist/fields/slug.d.ts.map +1 -0
  432. package/dist/fields/slug.js +102 -0
  433. package/dist/fields/slug.js.map +1 -0
  434. package/dist/fields/unlisted.d.ts +13 -0
  435. package/dist/fields/unlisted.d.ts.map +1 -0
  436. package/dist/fields/unlisted.js +35 -0
  437. package/dist/fields/unlisted.js.map +1 -0
  438. package/dist/fields/usedBy.d.ts +12 -0
  439. package/dist/fields/usedBy.d.ts.map +1 -0
  440. package/dist/fields/usedBy.js +36 -0
  441. package/dist/fields/usedBy.js.map +1 -0
  442. package/dist/index.d.ts +21 -0
  443. package/dist/index.d.ts.map +1 -0
  444. package/dist/index.js +18 -0
  445. package/dist/index.js.map +1 -0
  446. package/dist/integrations/admin/SyncButton.d.ts +27 -0
  447. package/dist/integrations/admin/SyncButton.d.ts.map +1 -0
  448. package/dist/integrations/admin/SyncButton.js +134 -0
  449. package/dist/integrations/admin/SyncButton.js.map +1 -0
  450. package/dist/integrations/admin/sync-client.d.ts +83 -0
  451. package/dist/integrations/admin/sync-client.d.ts.map +1 -0
  452. package/dist/integrations/admin/sync-client.js +121 -0
  453. package/dist/integrations/admin/sync-client.js.map +1 -0
  454. package/dist/integrations/collection.d.ts +26 -0
  455. package/dist/integrations/collection.d.ts.map +1 -0
  456. package/dist/integrations/collection.js +193 -0
  457. package/dist/integrations/collection.js.map +1 -0
  458. package/dist/integrations/endpoints/sync.d.ts +27 -0
  459. package/dist/integrations/endpoints/sync.d.ts.map +1 -0
  460. package/dist/integrations/endpoints/sync.js +90 -0
  461. package/dist/integrations/endpoints/sync.js.map +1 -0
  462. package/dist/integrations/index.d.ts +22 -0
  463. package/dist/integrations/index.d.ts.map +1 -0
  464. package/dist/integrations/index.js +15 -0
  465. package/dist/integrations/index.js.map +1 -0
  466. package/dist/integrations/integrations/index.d.ts +3 -0
  467. package/dist/integrations/integrations/index.d.ts.map +1 -0
  468. package/dist/integrations/integrations/index.js +2 -0
  469. package/dist/integrations/integrations/index.js.map +1 -0
  470. package/dist/integrations/integrations/webhook/config-fields.d.ts +33 -0
  471. package/dist/integrations/integrations/webhook/config-fields.d.ts.map +1 -0
  472. package/dist/integrations/integrations/webhook/config-fields.js +54 -0
  473. package/dist/integrations/integrations/webhook/config-fields.js.map +1 -0
  474. package/dist/integrations/integrations/webhook/functions.d.ts +24 -0
  475. package/dist/integrations/integrations/webhook/functions.d.ts.map +1 -0
  476. package/dist/integrations/integrations/webhook/functions.js +139 -0
  477. package/dist/integrations/integrations/webhook/functions.js.map +1 -0
  478. package/dist/integrations/integrations/webhook/healthcheck.d.ts +10 -0
  479. package/dist/integrations/integrations/webhook/healthcheck.d.ts.map +1 -0
  480. package/dist/integrations/integrations/webhook/healthcheck.js +26 -0
  481. package/dist/integrations/integrations/webhook/healthcheck.js.map +1 -0
  482. package/dist/integrations/integrations/webhook/hmac.d.ts +11 -0
  483. package/dist/integrations/integrations/webhook/hmac.d.ts.map +1 -0
  484. package/dist/integrations/integrations/webhook/hmac.js +25 -0
  485. package/dist/integrations/integrations/webhook/hmac.js.map +1 -0
  486. package/dist/integrations/integrations/webhook/index.d.ts +6 -0
  487. package/dist/integrations/integrations/webhook/index.d.ts.map +1 -0
  488. package/dist/integrations/integrations/webhook/index.js +47 -0
  489. package/dist/integrations/integrations/webhook/index.js.map +1 -0
  490. package/dist/integrations/integrations/webhook/payload.d.ts +9 -0
  491. package/dist/integrations/integrations/webhook/payload.d.ts.map +1 -0
  492. package/dist/integrations/integrations/webhook/payload.js +19 -0
  493. package/dist/integrations/integrations/webhook/payload.js.map +1 -0
  494. package/dist/integrations/jobs/healthcheck.d.ts +24 -0
  495. package/dist/integrations/jobs/healthcheck.d.ts.map +1 -0
  496. package/dist/integrations/jobs/healthcheck.js +133 -0
  497. package/dist/integrations/jobs/healthcheck.js.map +1 -0
  498. package/dist/integrations/options.d.ts +54 -0
  499. package/dist/integrations/options.d.ts.map +1 -0
  500. package/dist/integrations/options.js +8 -0
  501. package/dist/integrations/options.js.map +1 -0
  502. package/dist/integrations/plugin.d.ts +51 -0
  503. package/dist/integrations/plugin.d.ts.map +1 -0
  504. package/dist/integrations/plugin.js +215 -0
  505. package/dist/integrations/plugin.js.map +1 -0
  506. package/dist/integrations/registry.d.ts +27 -0
  507. package/dist/integrations/registry.d.ts.map +1 -0
  508. package/dist/integrations/registry.js +39 -0
  509. package/dist/integrations/registry.js.map +1 -0
  510. package/dist/integrations/sync/manual-sync.d.ts +70 -0
  511. package/dist/integrations/sync/manual-sync.d.ts.map +1 -0
  512. package/dist/integrations/sync/manual-sync.js +91 -0
  513. package/dist/integrations/sync/manual-sync.js.map +1 -0
  514. package/dist/integrations/sync/problems.d.ts +31 -0
  515. package/dist/integrations/sync/problems.d.ts.map +1 -0
  516. package/dist/integrations/sync/problems.js +40 -0
  517. package/dist/integrations/sync/problems.js.map +1 -0
  518. package/dist/integrations/sync/status.d.ts +15 -0
  519. package/dist/integrations/sync/status.d.ts.map +1 -0
  520. package/dist/integrations/sync/status.js +31 -0
  521. package/dist/integrations/sync/status.js.map +1 -0
  522. package/dist/integrations/tools/access.d.ts +5 -0
  523. package/dist/integrations/tools/access.d.ts.map +1 -0
  524. package/dist/integrations/tools/access.js +14 -0
  525. package/dist/integrations/tools/access.js.map +1 -0
  526. package/dist/integrations/tools/descriptors.d.ts +26 -0
  527. package/dist/integrations/tools/descriptors.d.ts.map +1 -0
  528. package/dist/integrations/tools/descriptors.js +35 -0
  529. package/dist/integrations/tools/descriptors.js.map +1 -0
  530. package/dist/integrations/tools/get-integration-status.d.ts +17 -0
  531. package/dist/integrations/tools/get-integration-status.d.ts.map +1 -0
  532. package/dist/integrations/tools/get-integration-status.js +41 -0
  533. package/dist/integrations/tools/get-integration-status.js.map +1 -0
  534. package/dist/integrations/tools/index.d.ts +13 -0
  535. package/dist/integrations/tools/index.d.ts.map +1 -0
  536. package/dist/integrations/tools/index.js +8 -0
  537. package/dist/integrations/tools/index.js.map +1 -0
  538. package/dist/integrations/tools/list-integration-types.d.ts +10 -0
  539. package/dist/integrations/tools/list-integration-types.d.ts.map +1 -0
  540. package/dist/integrations/tools/list-integration-types.js +22 -0
  541. package/dist/integrations/tools/list-integration-types.js.map +1 -0
  542. package/dist/integrations/tools/list-integrations.d.ts +20 -0
  543. package/dist/integrations/tools/list-integrations.d.ts.map +1 -0
  544. package/dist/integrations/tools/list-integrations.js +49 -0
  545. package/dist/integrations/tools/list-integrations.js.map +1 -0
  546. package/dist/integrations/tools/test-integration.d.ts +19 -0
  547. package/dist/integrations/tools/test-integration.d.ts.map +1 -0
  548. package/dist/integrations/tools/test-integration.js +51 -0
  549. package/dist/integrations/tools/test-integration.js.map +1 -0
  550. package/dist/integrations/tools/trigger-sync.d.ts +26 -0
  551. package/dist/integrations/tools/trigger-sync.d.ts.map +1 -0
  552. package/dist/integrations/tools/trigger-sync.js +44 -0
  553. package/dist/integrations/tools/trigger-sync.js.map +1 -0
  554. package/dist/integrations/types.d.ts +183 -0
  555. package/dist/integrations/types.d.ts.map +1 -0
  556. package/dist/integrations/types.js +2 -0
  557. package/dist/integrations/types.js.map +1 -0
  558. package/dist/jobs/define.d.ts +17 -0
  559. package/dist/jobs/define.d.ts.map +1 -0
  560. package/dist/jobs/define.js +39 -0
  561. package/dist/jobs/define.js.map +1 -0
  562. package/dist/jobs/failure-handler.d.ts +39 -0
  563. package/dist/jobs/failure-handler.d.ts.map +1 -0
  564. package/dist/jobs/failure-handler.js +62 -0
  565. package/dist/jobs/failure-handler.js.map +1 -0
  566. package/dist/jobs/index.d.ts +28 -0
  567. package/dist/jobs/index.d.ts.map +1 -0
  568. package/dist/jobs/index.js +7 -0
  569. package/dist/jobs/index.js.map +1 -0
  570. package/dist/jobs/inngest/adapter.d.ts +39 -0
  571. package/dist/jobs/inngest/adapter.d.ts.map +1 -0
  572. package/dist/jobs/inngest/adapter.js +81 -0
  573. package/dist/jobs/inngest/adapter.js.map +1 -0
  574. package/dist/jobs/inngest/index.d.ts +15 -0
  575. package/dist/jobs/inngest/index.d.ts.map +1 -0
  576. package/dist/jobs/inngest/index.js +13 -0
  577. package/dist/jobs/inngest/index.js.map +1 -0
  578. package/dist/jobs/options.d.ts +18 -0
  579. package/dist/jobs/options.d.ts.map +1 -0
  580. package/dist/jobs/options.js +12 -0
  581. package/dist/jobs/options.js.map +1 -0
  582. package/dist/jobs/payload/adapter.d.ts +33 -0
  583. package/dist/jobs/payload/adapter.d.ts.map +1 -0
  584. package/dist/jobs/payload/adapter.js +257 -0
  585. package/dist/jobs/payload/adapter.js.map +1 -0
  586. package/dist/jobs/payload/index.d.ts +8 -0
  587. package/dist/jobs/payload/index.d.ts.map +1 -0
  588. package/dist/jobs/payload/index.js +7 -0
  589. package/dist/jobs/payload/index.js.map +1 -0
  590. package/dist/jobs/sender.d.ts +4 -0
  591. package/dist/jobs/sender.d.ts.map +1 -0
  592. package/dist/jobs/sender.js +19 -0
  593. package/dist/jobs/sender.js.map +1 -0
  594. package/dist/jobs/types.d.ts +105 -0
  595. package/dist/jobs/types.d.ts.map +1 -0
  596. package/dist/jobs/types.js +2 -0
  597. package/dist/jobs/types.js.map +1 -0
  598. package/dist/jobs/workflow-types.d.ts +280 -0
  599. package/dist/jobs/workflow-types.d.ts.map +1 -0
  600. package/dist/jobs/workflow-types.js +22 -0
  601. package/dist/jobs/workflow-types.js.map +1 -0
  602. package/dist/logger/index.d.ts +9 -0
  603. package/dist/logger/index.d.ts.map +1 -0
  604. package/dist/logger/index.js +41 -0
  605. package/dist/logger/index.js.map +1 -0
  606. package/dist/mcp/api-key-access.d.ts +50 -0
  607. package/dist/mcp/api-key-access.d.ts.map +1 -0
  608. package/dist/mcp/api-key-access.js +94 -0
  609. package/dist/mcp/api-key-access.js.map +1 -0
  610. package/dist/mcp/audit-context.d.ts +39 -0
  611. package/dist/mcp/audit-context.d.ts.map +1 -0
  612. package/dist/mcp/audit-context.js +36 -0
  613. package/dist/mcp/audit-context.js.map +1 -0
  614. package/dist/mcp/audit-server.d.ts +13 -0
  615. package/dist/mcp/audit-server.d.ts.map +1 -0
  616. package/dist/mcp/audit-server.js +68 -0
  617. package/dist/mcp/audit-server.js.map +1 -0
  618. package/dist/mcp/collector.d.ts +51 -0
  619. package/dist/mcp/collector.d.ts.map +1 -0
  620. package/dist/mcp/collector.js +96 -0
  621. package/dist/mcp/collector.js.map +1 -0
  622. package/dist/mcp/envelope.d.ts +22 -0
  623. package/dist/mcp/envelope.d.ts.map +1 -0
  624. package/dist/mcp/envelope.js +22 -0
  625. package/dist/mcp/envelope.js.map +1 -0
  626. package/dist/mcp/index.d.ts +12 -0
  627. package/dist/mcp/index.d.ts.map +1 -0
  628. package/dist/mcp/index.js +8 -0
  629. package/dist/mcp/index.js.map +1 -0
  630. package/dist/mcp/meta.d.ts +74 -0
  631. package/dist/mcp/meta.d.ts.map +1 -0
  632. package/dist/mcp/meta.js +27 -0
  633. package/dist/mcp/meta.js.map +1 -0
  634. package/dist/mcp/payload-mcp.d.ts +68 -0
  635. package/dist/mcp/payload-mcp.d.ts.map +1 -0
  636. package/dist/mcp/payload-mcp.js +175 -0
  637. package/dist/mcp/payload-mcp.js.map +1 -0
  638. package/dist/media/hooks.d.ts +70 -0
  639. package/dist/media/hooks.d.ts.map +1 -0
  640. package/dist/media/hooks.js +200 -0
  641. package/dist/media/hooks.js.map +1 -0
  642. package/dist/media/index.d.ts +8 -0
  643. package/dist/media/index.d.ts.map +1 -0
  644. package/dist/media/index.js +7 -0
  645. package/dist/media/index.js.map +1 -0
  646. package/dist/media/svg.d.ts +17 -0
  647. package/dist/media/svg.d.ts.map +1 -0
  648. package/dist/media/svg.js +241 -0
  649. package/dist/media/svg.js.map +1 -0
  650. package/dist/media/uploadKey.d.ts +25 -0
  651. package/dist/media/uploadKey.d.ts.map +1 -0
  652. package/dist/media/uploadKey.js +70 -0
  653. package/dist/media/uploadKey.js.map +1 -0
  654. package/dist/observability/collection.d.ts +13 -0
  655. package/dist/observability/collection.d.ts.map +1 -0
  656. package/dist/observability/collection.js +76 -0
  657. package/dist/observability/collection.js.map +1 -0
  658. package/dist/observability/index.d.ts +10 -0
  659. package/dist/observability/index.d.ts.map +1 -0
  660. package/dist/observability/index.js +6 -0
  661. package/dist/observability/index.js.map +1 -0
  662. package/dist/observability/plugin.d.ts +24 -0
  663. package/dist/observability/plugin.d.ts.map +1 -0
  664. package/dist/observability/plugin.js +59 -0
  665. package/dist/observability/plugin.js.map +1 -0
  666. package/dist/observability/report.d.ts +175 -0
  667. package/dist/observability/report.d.ts.map +1 -0
  668. package/dist/observability/report.js +274 -0
  669. package/dist/observability/report.js.map +1 -0
  670. package/dist/observability/tool.d.ts +33 -0
  671. package/dist/observability/tool.d.ts.map +1 -0
  672. package/dist/observability/tool.js +75 -0
  673. package/dist/observability/tool.js.map +1 -0
  674. package/dist/observability/writer.d.ts +24 -0
  675. package/dist/observability/writer.d.ts.map +1 -0
  676. package/dist/observability/writer.js +72 -0
  677. package/dist/observability/writer.js.map +1 -0
  678. package/dist/plugin-contract/admin.d.ts +45 -0
  679. package/dist/plugin-contract/admin.d.ts.map +1 -0
  680. package/dist/plugin-contract/admin.js +12 -0
  681. package/dist/plugin-contract/admin.js.map +1 -0
  682. package/dist/plugin-contract/env.d.ts +29 -0
  683. package/dist/plugin-contract/env.d.ts.map +1 -0
  684. package/dist/plugin-contract/env.js +2 -0
  685. package/dist/plugin-contract/env.js.map +1 -0
  686. package/dist/plugin-contract/index.d.ts +39 -0
  687. package/dist/plugin-contract/index.d.ts.map +1 -0
  688. package/dist/plugin-contract/index.js +5 -0
  689. package/dist/plugin-contract/index.js.map +1 -0
  690. package/dist/plugin-contract/mcp.d.ts +51 -0
  691. package/dist/plugin-contract/mcp.d.ts.map +1 -0
  692. package/dist/plugin-contract/mcp.js +2 -0
  693. package/dist/plugin-contract/mcp.js.map +1 -0
  694. package/dist/plugin-contract/registry.d.ts +23 -0
  695. package/dist/plugin-contract/registry.d.ts.map +1 -0
  696. package/dist/plugin-contract/registry.js +51 -0
  697. package/dist/plugin-contract/registry.js.map +1 -0
  698. package/dist/publishing/admin/PublishButton.d.ts +22 -0
  699. package/dist/publishing/admin/PublishButton.d.ts.map +1 -0
  700. package/dist/publishing/admin/PublishButton.js +164 -0
  701. package/dist/publishing/admin/PublishButton.js.map +1 -0
  702. package/dist/publishing/admin/SchedulePublishField.d.ts +24 -0
  703. package/dist/publishing/admin/SchedulePublishField.d.ts.map +1 -0
  704. package/dist/publishing/admin/SchedulePublishField.js +160 -0
  705. package/dist/publishing/admin/SchedulePublishField.js.map +1 -0
  706. package/dist/publishing/admin/UnpublishButton.d.ts +15 -0
  707. package/dist/publishing/admin/UnpublishButton.d.ts.map +1 -0
  708. package/dist/publishing/admin/UnpublishButton.js +90 -0
  709. package/dist/publishing/admin/UnpublishButton.js.map +1 -0
  710. package/dist/publishing/admin/publishing-client.d.ts +105 -0
  711. package/dist/publishing/admin/publishing-client.d.ts.map +1 -0
  712. package/dist/publishing/admin/publishing-client.js +139 -0
  713. package/dist/publishing/admin/publishing-client.js.map +1 -0
  714. package/dist/publishing/admin/schedule-state.d.ts +30 -0
  715. package/dist/publishing/admin/schedule-state.d.ts.map +1 -0
  716. package/dist/publishing/admin/schedule-state.js +39 -0
  717. package/dist/publishing/admin/schedule-state.js.map +1 -0
  718. package/dist/publishing/checks/alt-text.d.ts +17 -0
  719. package/dist/publishing/checks/alt-text.d.ts.map +1 -0
  720. package/dist/publishing/checks/alt-text.js +63 -0
  721. package/dist/publishing/checks/alt-text.js.map +1 -0
  722. package/dist/publishing/checks/heading-hierarchy.d.ts +11 -0
  723. package/dist/publishing/checks/heading-hierarchy.d.ts.map +1 -0
  724. package/dist/publishing/checks/heading-hierarchy.js +32 -0
  725. package/dist/publishing/checks/heading-hierarchy.js.map +1 -0
  726. package/dist/publishing/checks/index.d.ts +6 -0
  727. package/dist/publishing/checks/index.d.ts.map +1 -0
  728. package/dist/publishing/checks/index.js +13 -0
  729. package/dist/publishing/checks/index.js.map +1 -0
  730. package/dist/publishing/checks/link-labels.d.ts +9 -0
  731. package/dist/publishing/checks/link-labels.d.ts.map +1 -0
  732. package/dist/publishing/checks/link-labels.js +44 -0
  733. package/dist/publishing/checks/link-labels.js.map +1 -0
  734. package/dist/publishing/endpoints/admin.d.ts +19 -0
  735. package/dist/publishing/endpoints/admin.d.ts.map +1 -0
  736. package/dist/publishing/endpoints/admin.js +112 -0
  737. package/dist/publishing/endpoints/admin.js.map +1 -0
  738. package/dist/publishing/events.d.ts +16 -0
  739. package/dist/publishing/events.d.ts.map +1 -0
  740. package/dist/publishing/events.js +30 -0
  741. package/dist/publishing/events.js.map +1 -0
  742. package/dist/publishing/hooks/block-status-writes.d.ts +52 -0
  743. package/dist/publishing/hooks/block-status-writes.d.ts.map +1 -0
  744. package/dist/publishing/hooks/block-status-writes.js +242 -0
  745. package/dist/publishing/hooks/block-status-writes.js.map +1 -0
  746. package/dist/publishing/hooks/draft-writes.d.ts +32 -0
  747. package/dist/publishing/hooks/draft-writes.d.ts.map +1 -0
  748. package/dist/publishing/hooks/draft-writes.js +76 -0
  749. package/dist/publishing/hooks/draft-writes.js.map +1 -0
  750. package/dist/publishing/hooks/schedule-events.d.ts +26 -0
  751. package/dist/publishing/hooks/schedule-events.d.ts.map +1 -0
  752. package/dist/publishing/hooks/schedule-events.js +54 -0
  753. package/dist/publishing/hooks/schedule-events.js.map +1 -0
  754. package/dist/publishing/index.d.ts +35 -0
  755. package/dist/publishing/index.d.ts.map +1 -0
  756. package/dist/publishing/index.js +32 -0
  757. package/dist/publishing/index.js.map +1 -0
  758. package/dist/publishing/jobs/execute-scheduled-publishes.d.ts +24 -0
  759. package/dist/publishing/jobs/execute-scheduled-publishes.d.ts.map +1 -0
  760. package/dist/publishing/jobs/execute-scheduled-publishes.js +114 -0
  761. package/dist/publishing/jobs/execute-scheduled-publishes.js.map +1 -0
  762. package/dist/publishing/jobs/next-revalidate.d.ts +43 -0
  763. package/dist/publishing/jobs/next-revalidate.d.ts.map +1 -0
  764. package/dist/publishing/jobs/next-revalidate.js +42 -0
  765. package/dist/publishing/jobs/next-revalidate.js.map +1 -0
  766. package/dist/publishing/jobs/publish-at-scheduled-time.d.ts +24 -0
  767. package/dist/publishing/jobs/publish-at-scheduled-time.d.ts.map +1 -0
  768. package/dist/publishing/jobs/publish-at-scheduled-time.js +136 -0
  769. package/dist/publishing/jobs/publish-at-scheduled-time.js.map +1 -0
  770. package/dist/publishing/jobs/revalidate-on-publish.d.ts +24 -0
  771. package/dist/publishing/jobs/revalidate-on-publish.d.ts.map +1 -0
  772. package/dist/publishing/jobs/revalidate-on-publish.js +78 -0
  773. package/dist/publishing/jobs/revalidate-on-publish.js.map +1 -0
  774. package/dist/publishing/jobs/revalidate-tag-hooks.d.ts +80 -0
  775. package/dist/publishing/jobs/revalidate-tag-hooks.d.ts.map +1 -0
  776. package/dist/publishing/jobs/revalidate-tag-hooks.js +116 -0
  777. package/dist/publishing/jobs/revalidate-tag-hooks.js.map +1 -0
  778. package/dist/publishing/options.d.ts +100 -0
  779. package/dist/publishing/options.d.ts.map +1 -0
  780. package/dist/publishing/options.js +56 -0
  781. package/dist/publishing/options.js.map +1 -0
  782. package/dist/publishing/pipeline/index.d.ts +20 -0
  783. package/dist/publishing/pipeline/index.d.ts.map +1 -0
  784. package/dist/publishing/pipeline/index.js +88 -0
  785. package/dist/publishing/pipeline/index.js.map +1 -0
  786. package/dist/publishing/pipeline/steps/accessibility.d.ts +13 -0
  787. package/dist/publishing/pipeline/steps/accessibility.d.ts.map +1 -0
  788. package/dist/publishing/pipeline/steps/accessibility.js +37 -0
  789. package/dist/publishing/pipeline/steps/accessibility.js.map +1 -0
  790. package/dist/publishing/pipeline/steps/approval.d.ts +14 -0
  791. package/dist/publishing/pipeline/steps/approval.d.ts.map +1 -0
  792. package/dist/publishing/pipeline/steps/approval.js +54 -0
  793. package/dist/publishing/pipeline/steps/approval.js.map +1 -0
  794. package/dist/publishing/pipeline/steps/composition.d.ts +14 -0
  795. package/dist/publishing/pipeline/steps/composition.d.ts.map +1 -0
  796. package/dist/publishing/pipeline/steps/composition.js +63 -0
  797. package/dist/publishing/pipeline/steps/composition.js.map +1 -0
  798. package/dist/publishing/pipeline/steps/embargo.d.ts +12 -0
  799. package/dist/publishing/pipeline/steps/embargo.d.ts.map +1 -0
  800. package/dist/publishing/pipeline/steps/embargo.js +41 -0
  801. package/dist/publishing/pipeline/steps/embargo.js.map +1 -0
  802. package/dist/publishing/pipeline/steps/execute.d.ts +52 -0
  803. package/dist/publishing/pipeline/steps/execute.d.ts.map +1 -0
  804. package/dist/publishing/pipeline/steps/execute.js +161 -0
  805. package/dist/publishing/pipeline/steps/execute.js.map +1 -0
  806. package/dist/publishing/pipeline/steps/exist.d.ts +9 -0
  807. package/dist/publishing/pipeline/steps/exist.d.ts.map +1 -0
  808. package/dist/publishing/pipeline/steps/exist.js +31 -0
  809. package/dist/publishing/pipeline/steps/exist.js.map +1 -0
  810. package/dist/publishing/pipeline/steps/required-fields.d.ts +9 -0
  811. package/dist/publishing/pipeline/steps/required-fields.d.ts.map +1 -0
  812. package/dist/publishing/pipeline/steps/required-fields.js +63 -0
  813. package/dist/publishing/pipeline/steps/required-fields.js.map +1 -0
  814. package/dist/publishing/pipeline/types.d.ts +72 -0
  815. package/dist/publishing/pipeline/types.d.ts.map +1 -0
  816. package/dist/publishing/pipeline/types.js +2 -0
  817. package/dist/publishing/pipeline/types.js.map +1 -0
  818. package/dist/publishing/plugin.d.ts +4 -0
  819. package/dist/publishing/plugin.d.ts.map +1 -0
  820. package/dist/publishing/plugin.js +196 -0
  821. package/dist/publishing/plugin.js.map +1 -0
  822. package/dist/publishing/service.d.ts +149 -0
  823. package/dist/publishing/service.d.ts.map +1 -0
  824. package/dist/publishing/service.js +474 -0
  825. package/dist/publishing/service.js.map +1 -0
  826. package/dist/publishing/tools/actor.d.ts +32 -0
  827. package/dist/publishing/tools/actor.d.ts.map +1 -0
  828. package/dist/publishing/tools/actor.js +40 -0
  829. package/dist/publishing/tools/actor.js.map +1 -0
  830. package/dist/publishing/tools/descriptors.d.ts +26 -0
  831. package/dist/publishing/tools/descriptors.d.ts.map +1 -0
  832. package/dist/publishing/tools/descriptors.js +38 -0
  833. package/dist/publishing/tools/descriptors.js.map +1 -0
  834. package/dist/publishing/tools/get-publish-status.d.ts +12 -0
  835. package/dist/publishing/tools/get-publish-status.d.ts.map +1 -0
  836. package/dist/publishing/tools/get-publish-status.js +45 -0
  837. package/dist/publishing/tools/get-publish-status.js.map +1 -0
  838. package/dist/publishing/tools/index.d.ts +7 -0
  839. package/dist/publishing/tools/index.d.ts.map +1 -0
  840. package/dist/publishing/tools/index.js +7 -0
  841. package/dist/publishing/tools/index.js.map +1 -0
  842. package/dist/publishing/tools/publish.d.ts +14 -0
  843. package/dist/publishing/tools/publish.d.ts.map +1 -0
  844. package/dist/publishing/tools/publish.js +35 -0
  845. package/dist/publishing/tools/publish.js.map +1 -0
  846. package/dist/publishing/tools/rollback.d.ts +11 -0
  847. package/dist/publishing/tools/rollback.d.ts.map +1 -0
  848. package/dist/publishing/tools/rollback.js +98 -0
  849. package/dist/publishing/tools/rollback.js.map +1 -0
  850. package/dist/publishing/tools/schedule-publish.d.ts +20 -0
  851. package/dist/publishing/tools/schedule-publish.d.ts.map +1 -0
  852. package/dist/publishing/tools/schedule-publish.js +49 -0
  853. package/dist/publishing/tools/schedule-publish.js.map +1 -0
  854. package/dist/publishing/tools/unpublish.d.ts +14 -0
  855. package/dist/publishing/tools/unpublish.d.ts.map +1 -0
  856. package/dist/publishing/tools/unpublish.js +29 -0
  857. package/dist/publishing/tools/unpublish.js.map +1 -0
  858. package/dist/references/UsedOnPanel.d.ts +3 -0
  859. package/dist/references/UsedOnPanel.d.ts.map +1 -0
  860. package/dist/references/UsedOnPanel.js +47 -0
  861. package/dist/references/UsedOnPanel.js.map +1 -0
  862. package/dist/references/find.d.ts +46 -0
  863. package/dist/references/find.d.ts.map +1 -0
  864. package/dist/references/find.js +142 -0
  865. package/dist/references/find.js.map +1 -0
  866. package/dist/references/guards.d.ts +32 -0
  867. package/dist/references/guards.d.ts.map +1 -0
  868. package/dist/references/guards.js +76 -0
  869. package/dist/references/guards.js.map +1 -0
  870. package/dist/references/index.d.ts +11 -0
  871. package/dist/references/index.d.ts.map +1 -0
  872. package/dist/references/index.js +6 -0
  873. package/dist/references/index.js.map +1 -0
  874. package/dist/references/plugin.d.ts +51 -0
  875. package/dist/references/plugin.d.ts.map +1 -0
  876. package/dist/references/plugin.js +111 -0
  877. package/dist/references/plugin.js.map +1 -0
  878. package/dist/references/tools.d.ts +54 -0
  879. package/dist/references/tools.d.ts.map +1 -0
  880. package/dist/references/tools.js +124 -0
  881. package/dist/references/tools.js.map +1 -0
  882. package/dist/references/walk.d.ts +43 -0
  883. package/dist/references/walk.d.ts.map +1 -0
  884. package/dist/references/walk.js +214 -0
  885. package/dist/references/walk.js.map +1 -0
  886. package/dist/testing/anonymousAccess.d.ts +111 -0
  887. package/dist/testing/anonymousAccess.d.ts.map +1 -0
  888. package/dist/testing/anonymousAccess.js +185 -0
  889. package/dist/testing/anonymousAccess.js.map +1 -0
  890. package/dist/testing/describeAnonymousAccess.d.ts +26 -0
  891. package/dist/testing/describeAnonymousAccess.d.ts.map +1 -0
  892. package/dist/testing/describeAnonymousAccess.js +76 -0
  893. package/dist/testing/describeAnonymousAccess.js.map +1 -0
  894. package/dist/testing/index.d.ts +11 -0
  895. package/dist/testing/index.d.ts.map +1 -0
  896. package/dist/testing/index.js +9 -0
  897. package/dist/testing/index.js.map +1 -0
  898. package/dist/utils/content-hash.d.ts +31 -0
  899. package/dist/utils/content-hash.d.ts.map +1 -0
  900. package/dist/utils/content-hash.js +94 -0
  901. package/dist/utils/content-hash.js.map +1 -0
  902. package/dist/utils/index.d.ts +6 -0
  903. package/dist/utils/index.d.ts.map +1 -0
  904. package/dist/utils/index.js +5 -0
  905. package/dist/utils/index.js.map +1 -0
  906. package/dist/utils/relationships.d.ts +17 -0
  907. package/dist/utils/relationships.d.ts.map +1 -0
  908. package/dist/utils/relationships.js +26 -0
  909. package/dist/utils/relationships.js.map +1 -0
  910. package/dist/utils/sha256.d.ts +10 -0
  911. package/dist/utils/sha256.d.ts.map +1 -0
  912. package/dist/utils/sha256.js +16 -0
  913. package/dist/utils/sha256.js.map +1 -0
  914. package/dist/utils/zod-issues.d.ts +19 -0
  915. package/dist/utils/zod-issues.d.ts.map +1 -0
  916. package/dist/utils/zod-issues.js +22 -0
  917. package/dist/utils/zod-issues.js.map +1 -0
  918. package/package.json +183 -1
@@ -0,0 +1,83 @@
1
+ /**
2
+ * Client-side helpers behind the admin's Sync now button. No JSX here, so the
3
+ * request handling and the message formatting can be unit tested without a
4
+ * form, a document or a browser.
5
+ */
6
+ export type SyncStatusValue = 'never-run' | 'success' | 'partial' | 'failed';
7
+ export interface TriggerSyncBody {
8
+ ok?: boolean;
9
+ triggered?: {
10
+ instanceId: string;
11
+ instanceName: string;
12
+ type: string;
13
+ };
14
+ /** The instance's `lastSyncAt` *before* the run. The baseline to poll against. */
15
+ lastSyncAt?: string | null;
16
+ message?: string;
17
+ error?: string;
18
+ code?: string;
19
+ }
20
+ export interface TriggerSyncArgs {
21
+ serverURL: string;
22
+ apiRoute: string;
23
+ collectionSlug: string;
24
+ id: number | string;
25
+ reason?: string;
26
+ }
27
+ export type TriggerSyncResult = {
28
+ ok: true;
29
+ body: TriggerSyncBody;
30
+ } | {
31
+ ok: false;
32
+ message: string;
33
+ };
34
+ /**
35
+ * POSTs to the collection's sync endpoint using the browser's session cookie.
36
+ *
37
+ * Every refusal — not found, disabled, Inngest unreachable — comes back as a
38
+ * non-2xx with a message, so all of them land in `ok: false` and get shown.
39
+ * A button that appears to work when nothing was queued is the failure this
40
+ * exists to avoid.
41
+ */
42
+ export declare function triggerSync(args: TriggerSyncArgs): Promise<TriggerSyncResult>;
43
+ export interface SyncStatus {
44
+ lastSyncAt: string | null;
45
+ lastSyncStatus: SyncStatusValue | null;
46
+ lastError: string | null;
47
+ }
48
+ export interface FetchSyncStatusArgs {
49
+ serverURL: string;
50
+ apiRoute: string;
51
+ collectionSlug: string;
52
+ id: number | string;
53
+ signal?: AbortSignal;
54
+ }
55
+ /**
56
+ * Reads the three status fields off the instance. Returns null on any failure,
57
+ * because this is called on a timer and a single missed poll is not something
58
+ * to tell anyone about — the caller keeps waiting.
59
+ */
60
+ export declare function fetchSyncStatus(args: FetchSyncStatusArgs): Promise<null | SyncStatus>;
61
+ /**
62
+ * True once the instance has recorded a run that started after the trigger.
63
+ *
64
+ * Compared against the `lastSyncAt` the endpoint returned rather than against
65
+ * whatever the page last rendered: the sidebar can be minutes stale, and a
66
+ * document opened during a cron run would otherwise report that run's result
67
+ * as this one's.
68
+ */
69
+ export declare function syncHasFinished(baseline: null | string, current: null | SyncStatus): boolean;
70
+ export interface SyncOutcome {
71
+ severity: 'error' | 'success' | 'warning';
72
+ title: string;
73
+ description?: string;
74
+ }
75
+ /**
76
+ * How a finished run reads. `partial` is deliberately a warning rather than a
77
+ * success: some of what was asked for did not happen, and the whole reason
78
+ * somebody pressed this button is to find out whether their change landed.
79
+ */
80
+ export declare function describeSyncOutcome(status: SyncStatus, instanceName?: string): SyncOutcome;
81
+ /** `2026-08-29T14:03:00.000Z` as something an operator reads at a glance. */
82
+ export declare function formatSyncTime(value: null | string): string;
83
+ //# sourceMappingURL=sync-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-client.d.ts","sourceRoot":"","sources":["../../../src/integrations/admin/sync-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAA;AAE5E,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,OAAO,CAAA;IACZ,SAAS,CAAC,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;IACtE,kFAAkF;IAClF,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,MAAM,iBAAiB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,IAAI,EAAE,eAAe,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAEpG;;;;;;;GAOG;AACH,wBAAsB,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,CA2BnF;AAED,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,cAAc,EAAE,eAAe,GAAG,IAAI,CAAA;IACtC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,cAAc,EAAE,MAAM,CAAA;IACtB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;AAED;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,GAAG,UAAU,CAAC,CAkB3F;AAMD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,IAAI,GAAG,MAAM,EAAE,OAAO,EAAE,IAAI,GAAG,UAAU,GAAG,OAAO,CAI5F;AAED,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;IACzC,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,UAAU,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,WAAW,CAwB1F;AAED,6EAA6E;AAC7E,wBAAgB,cAAc,CAAC,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAK3D"}
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Client-side helpers behind the admin's Sync now button. No JSX here, so the
3
+ * request handling and the message formatting can be unit tested without a
4
+ * form, a document or a browser.
5
+ */
6
+ /**
7
+ * POSTs to the collection's sync endpoint using the browser's session cookie.
8
+ *
9
+ * Every refusal — not found, disabled, Inngest unreachable — comes back as a
10
+ * non-2xx with a message, so all of them land in `ok: false` and get shown.
11
+ * A button that appears to work when nothing was queued is the failure this
12
+ * exists to avoid.
13
+ */
14
+ export async function triggerSync(args) {
15
+ const url = `${args.serverURL}${args.apiRoute}/${args.collectionSlug}/${args.id}/sync`;
16
+ let response;
17
+ try {
18
+ response = await fetch(url, {
19
+ method: 'POST',
20
+ credentials: 'include',
21
+ headers: { 'content-type': 'application/json' },
22
+ body: JSON.stringify(args.reason ? { reason: args.reason } : {}),
23
+ });
24
+ }
25
+ catch {
26
+ return { ok: false, message: 'Could not reach the server to queue the sync.' };
27
+ }
28
+ let body;
29
+ try {
30
+ body = (await response.json());
31
+ }
32
+ catch {
33
+ return { ok: false, message: `The server returned ${response.status}.` };
34
+ }
35
+ if (!response.ok) {
36
+ return { ok: false, message: body.error ?? `The server returned ${response.status}.` };
37
+ }
38
+ return { ok: true, body };
39
+ }
40
+ /**
41
+ * Reads the three status fields off the instance. Returns null on any failure,
42
+ * because this is called on a timer and a single missed poll is not something
43
+ * to tell anyone about — the caller keeps waiting.
44
+ */
45
+ export async function fetchSyncStatus(args) {
46
+ const url = `${args.serverURL}${args.apiRoute}/${args.collectionSlug}/${args.id}?depth=0`;
47
+ try {
48
+ const response = await fetch(url, {
49
+ credentials: 'include',
50
+ ...(args.signal ? { signal: args.signal } : {}),
51
+ });
52
+ if (!response.ok)
53
+ return null;
54
+ const doc = (await response.json());
55
+ return {
56
+ lastSyncAt: typeof doc['lastSyncAt'] === 'string' ? doc['lastSyncAt'] : null,
57
+ lastSyncStatus: isSyncStatusValue(doc['lastSyncStatus']) ? doc['lastSyncStatus'] : null,
58
+ lastError: typeof doc['lastError'] === 'string' ? doc['lastError'] : null,
59
+ };
60
+ }
61
+ catch {
62
+ return null;
63
+ }
64
+ }
65
+ function isSyncStatusValue(value) {
66
+ return value === 'never-run' || value === 'success' || value === 'partial' || value === 'failed';
67
+ }
68
+ /**
69
+ * True once the instance has recorded a run that started after the trigger.
70
+ *
71
+ * Compared against the `lastSyncAt` the endpoint returned rather than against
72
+ * whatever the page last rendered: the sidebar can be minutes stale, and a
73
+ * document opened during a cron run would otherwise report that run's result
74
+ * as this one's.
75
+ */
76
+ export function syncHasFinished(baseline, current) {
77
+ if (!current)
78
+ return false;
79
+ if (current.lastSyncAt === null)
80
+ return false;
81
+ return current.lastSyncAt !== baseline;
82
+ }
83
+ /**
84
+ * How a finished run reads. `partial` is deliberately a warning rather than a
85
+ * success: some of what was asked for did not happen, and the whole reason
86
+ * somebody pressed this button is to find out whether their change landed.
87
+ */
88
+ export function describeSyncOutcome(status, instanceName) {
89
+ const subject = instanceName ? `"${instanceName}"` : 'The integration';
90
+ const description = status.lastError ?? undefined;
91
+ switch (status.lastSyncStatus) {
92
+ case 'success':
93
+ return { severity: 'success', title: `${subject} synced.` };
94
+ case 'partial':
95
+ return {
96
+ severity: 'warning',
97
+ title: `${subject} synced, with problems.`,
98
+ ...(description ? { description } : {}),
99
+ };
100
+ case 'failed':
101
+ return {
102
+ severity: 'error',
103
+ title: `${subject} failed to sync.`,
104
+ ...(description ? { description } : {}),
105
+ };
106
+ default:
107
+ // A run finished — `lastSyncAt` moved — without leaving a status. Nothing
108
+ // to celebrate and nothing to blame; say what is known.
109
+ return { severity: 'warning', title: `${subject} ran, but reported no status.` };
110
+ }
111
+ }
112
+ /** `2026-08-29T14:03:00.000Z` as something an operator reads at a glance. */
113
+ export function formatSyncTime(value) {
114
+ if (!value)
115
+ return 'Never';
116
+ const date = new Date(value);
117
+ if (Number.isNaN(date.getTime()))
118
+ return 'Unknown';
119
+ return date.toLocaleString();
120
+ }
121
+ //# sourceMappingURL=sync-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync-client.js","sourceRoot":"","sources":["../../../src/integrations/admin/sync-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAwBH;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,IAAqB;IACrD,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,cAAc,IAAI,IAAI,CAAC,EAAE,OAAO,CAAA;IAEtF,IAAI,QAAkB,CAAA;IACtB,IAA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
+ import { type PluginAdminOptions } from '../plugin-contract/admin.js';
3
+ import type { IntegrationRegistry } from './registry.js';
4
+ export interface CreateIntegrationsCollectionOptions {
5
+ slug?: string;
6
+ registry: IntegrationRegistry;
7
+ /** Collection endpoints to mount, e.g. the manual-sync trigger. */
8
+ endpoints?: Endpoint[];
9
+ /** Sidebar placement. Default: the `'Throughline'` group; `group: false` leaves it ungrouped. */
10
+ admin?: PluginAdminOptions;
11
+ }
12
+ /**
13
+ * Collection that persists per-instance integration configuration. Configuration
14
+ * is admin-only by design: prompt injection that gave Claude write access here
15
+ * would let an attacker re-target webhook URLs or rotate signing secrets.
16
+ *
17
+ * Editors can read instance status (used by the listing/status MCP tools);
18
+ * write operations are reserved for admins editing in the Payload UI. *Status*
19
+ * is the operative word: `config` carries its own admin-only field access, so
20
+ * an editor's read returns the row without the credentials in it.
21
+ *
22
+ * The one control on the document that is not a field is the sidebar's Sync
23
+ * now button, which POSTs to the `:id/sync` endpoint passed in `endpoints`.
24
+ */
25
+ export declare function createIntegrationsCollection(options: CreateIntegrationsCollectionOptions): CollectionConfig;
26
+ //# sourceMappingURL=collection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collection.d.ts","sourceRoot":"","sources":["../../src/integrations/collection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,gBAAgB,EAAE,QAAQ,EAAe,MAAM,SAAS,CAAA;AAC9E,OAAO,EAAE,KAAK,kBAAkB,EAAqB,MAAM,6BAA6B,CAAA;AACxF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AASxD,MAAM,WAAW,mCAAmC;IAClD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,mBAAmB,CAAA;IAC7B,mEAAmE;IACnE,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAA;IACtB,iGAAiG;IACjG,KAAK,CAAC,EAAE,kBAAkB,CAAA;CAC3B;AAsBD;;;;;;;;;;;;GAYG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,mCAAmC,GAC3C,gBAAgB,CAkKlB"}
@@ -0,0 +1,193 @@
1
+ import { resolveAdminGroup } from '../plugin-contract/admin.js';
2
+ import { DEFAULT_INTEGRATIONS_SLUG } from './options.js';
3
+ /**
4
+ * Where Payload resolves the admin controls from. A package specifier, not a
5
+ * path, so the host's import map picks it up without any host-side file.
6
+ */
7
+ const CLIENT_ENTRY = '@forumone/throughline/client';
8
+ const adminOrEditor = ({ req }) => {
9
+ const roles = req.user?.['roles'] ?? [];
10
+ return roles.includes('admin') || roles.includes('editor');
11
+ };
12
+ const adminOnly = ({ req }) => {
13
+ const roles = req.user?.['roles'] ?? [];
14
+ return roles.includes('admin');
15
+ };
16
+ /**
17
+ * The same rule, at the field. `FieldAccess` is a different signature from
18
+ * `Access` — it may only answer a boolean, never a `where` query — so it cannot
19
+ * be the same function.
20
+ */
21
+ const adminOnlyField = ({ req }) => {
22
+ const roles = req.user?.['roles'] ?? [];
23
+ return roles.includes('admin');
24
+ };
25
+ /**
26
+ * Collection that persists per-instance integration configuration. Configuration
27
+ * is admin-only by design: prompt injection that gave Claude write access here
28
+ * would let an attacker re-target webhook URLs or rotate signing secrets.
29
+ *
30
+ * Editors can read instance status (used by the listing/status MCP tools);
31
+ * write operations are reserved for admins editing in the Payload UI. *Status*
32
+ * is the operative word: `config` carries its own admin-only field access, so
33
+ * an editor's read returns the row without the credentials in it.
34
+ *
35
+ * The one control on the document that is not a field is the sidebar's Sync
36
+ * now button, which POSTs to the `:id/sync` endpoint passed in `endpoints`.
37
+ */
38
+ export function createIntegrationsCollection(options) {
39
+ const slug = options.slug ?? DEFAULT_INTEGRATIONS_SLUG;
40
+ const { registry } = options;
41
+ return {
42
+ slug,
43
+ admin: {
44
+ ...resolveAdminGroup(options.admin),
45
+ useAsTitle: 'name',
46
+ defaultColumns: ['name', 'integrationType', 'enabled', 'lastSyncAt', 'lastSyncStatus'],
47
+ description: 'External-system connections. Edit only in the admin — Claude can trigger and observe but cannot configure.',
48
+ },
49
+ access: {
50
+ read: adminOrEditor,
51
+ create: adminOnly,
52
+ update: adminOnly,
53
+ delete: adminOnly,
54
+ },
55
+ fields: [
56
+ {
57
+ name: 'name',
58
+ type: 'text',
59
+ required: true,
60
+ admin: { description: 'Display name for this instance (e.g. "Mailchimp - Newsletter").' },
61
+ },
62
+ {
63
+ name: 'integrationType',
64
+ type: 'select',
65
+ required: true,
66
+ options: registry
67
+ .list()
68
+ .map((integration) => ({ label: integration.name, value: integration.id })),
69
+ admin: { description: 'The integration plugin this instance uses.' },
70
+ },
71
+ {
72
+ name: 'enabled',
73
+ type: 'checkbox',
74
+ defaultValue: false,
75
+ admin: {
76
+ description: 'Disabled integrations receive no events and are hidden from Claude by default.',
77
+ },
78
+ },
79
+ {
80
+ name: 'config',
81
+ type: 'json',
82
+ /*
83
+ Admin-only at the field, because this is where the credentials are.
84
+
85
+ Document read is admin *or* editor, and deliberately so — the reason an
86
+ editor opens this collection is to see whether last night's sync ran.
87
+ But a document read hands over the whole document, and `config` is one
88
+ JSON column holding whatever an integration needs to authenticate: a
89
+ HubSpot private app token, a signing secret, a webhook URL. The
90
+ docblock above has always said editors read instance *status*; without
91
+ this, that was a description of the intent rather than of the code.
92
+
93
+ Nothing that needs the value loses it. Every reader of `config` goes
94
+ through the Local API — `loadInstances` here, and the host's sync and
95
+ form endpoints — which overrides access. The MCP tools project a fixed
96
+ field list that never included `config`. What changes is `GET /api/<slug>`
97
+ and the admin screen for a non-admin, which now show status and no
98
+ secrets.
99
+
100
+ `create` and `update` as well, so the credential cannot be replaced by
101
+ somebody who could not read it. Redundant today, since the collection's
102
+ own create and update are already admin-only, and cheap insurance
103
+ against the day document write is widened for status edits.
104
+ */
105
+ access: {
106
+ read: adminOnlyField,
107
+ create: adminOnlyField,
108
+ update: adminOnlyField,
109
+ },
110
+ admin: {
111
+ description: 'Integration-specific settings, including credentials. Admin-only.',
112
+ },
113
+ },
114
+ {
115
+ /*
116
+ The only admin component this plugin ships. In the sidebar rather than
117
+ `beforeDocumentControls` because it belongs with the three fields it
118
+ moves — an operator watching for a sync to land is already reading
119
+ `lastSyncAt` — and because `beforeDocumentControls` also renders on the
120
+ create view, where there is no instance to sync.
121
+
122
+ A `ui` field: no column, no value, nothing to save.
123
+ */
124
+ name: 'triggerSync',
125
+ type: 'ui',
126
+ label: 'Manual sync',
127
+ admin: {
128
+ position: 'sidebar',
129
+ components: {
130
+ Field: {
131
+ path: CLIENT_ENTRY,
132
+ exportName: 'SyncButton',
133
+ clientProps: { collectionSlug: slug },
134
+ },
135
+ },
136
+ },
137
+ },
138
+ {
139
+ name: 'lastSyncAt',
140
+ type: 'date',
141
+ admin: { readOnly: true, position: 'sidebar' },
142
+ },
143
+ {
144
+ name: 'lastSyncStatus',
145
+ type: 'select',
146
+ admin: { readOnly: true, position: 'sidebar' },
147
+ options: [
148
+ { label: 'Never run', value: 'never-run' },
149
+ { label: 'Success', value: 'success' },
150
+ { label: 'Partial', value: 'partial' },
151
+ { label: 'Failed', value: 'failed' },
152
+ ],
153
+ defaultValue: 'never-run',
154
+ },
155
+ {
156
+ name: 'lastError',
157
+ type: 'textarea',
158
+ admin: { readOnly: true },
159
+ },
160
+ ],
161
+ endpoints: options.endpoints ?? [],
162
+ indexes: [
163
+ { fields: ['integrationType', 'enabled'] },
164
+ { fields: ['lastSyncStatus'] },
165
+ ],
166
+ hooks: {
167
+ beforeChange: [
168
+ async ({ data, operation }) => {
169
+ if (operation !== 'create' && operation !== 'update')
170
+ return data;
171
+ const incoming = data;
172
+ const integrationType = incoming['integrationType'];
173
+ if (typeof integrationType !== 'string')
174
+ return data;
175
+ const integration = registry.get(integrationType);
176
+ if (!integration) {
177
+ throw new Error(`Unknown integration type "${integrationType}". Known types: ${registry
178
+ .list()
179
+ .map((i) => i.id)
180
+ .join(', ') || '(none registered)'}.`);
181
+ }
182
+ const config = (incoming['config'] ?? {});
183
+ const validation = await integration.validateConfig(config);
184
+ if (!validation.ok) {
185
+ throw new Error(`Invalid config for ${integration.name}: ${validation.reason ?? 'no reason given'}`);
186
+ }
187
+ return data;
188
+ },
189
+ ],
190
+ },
191
+ };
192
+ }
193
+ //# sourceMappingURL=collection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collection.js","sourceRoot":"","sources":["../../src/integrations/collection.ts"],"names":[],"mappings":"AACA,OAAO,EAA2B,iBAAiB,EAAE,MAAM,6BAA6B,CAAA;AAExF,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAExD;;;GAGG;AACH,MAAM,YAAY,GAAG,8BAA8B,CAAA;AAWnD,MAAM,aAAa,GAAW,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;IACxC,MAAM,KAAK,GAAI,GAAG,CAAC,IAAI,EAAE,CAAC,OAAO,CAA0B,IAAI,EAAE,CAAA;IACjE,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;AAC5D,CAAC,CAAA;AAED,MAAM,SAAS,GAAW,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;IACpC,MAAM,KAAK,GAAI,GAAG,CAAC,IAAI,EAAE,CAAC,OAAO,CAA0B,IAAI,EAAE,CAAA;IACjE,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;AAChC,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,cAAc,GAAgB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE;IAC9C,MAAM,KAAK,GAAI,GAAG,CAAC,IAAI,EAAE,CAAC,OAAO,CAA0B,IAAI,EAAE,CAAA;IACjE,OAAO,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;AAChC,CAAC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,4BAA4B,CAC1C,OAA4C;IAE5C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,IAAI,yBAAyB,CAAA;IACtD,MAAM,E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,YAAY,EAAE;gBACZ,KAAK,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,EAAE;oBAC5B,IAAI,SAAS,KAAK,QAAQ,IAAI,SAAS,KAAK,QAAQ;wBAAE,OAAO,IAAI,CAAA;oBACjE,MAAM,QAAQ,GAAG,IAA+B,CAAA;oBAChD,MAAM,eAAe,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAA;oBACnD,IAAI,OAAO,eAAe,KAAK,QAAQ;wBAAE,OAAO,IAAI,CAAA;oBAEpD,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,CAAC,eAAe,CAAC,CAAA;oBACjD,IAAI,CAAC,WAAW,EAAE,CAAC;wBACjB,MAAM,IAAI,KAAK,CACb,6BAA6B,eAAe,mBAAmB,QAAQ;6BACpE,IAAI,EAAE;6BACN,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;6BAChB,IAAI,CAAC,IAAI,CAAC,IAAI,mBAAmB,GAAG,CACxC,CAAA;oBACH,CAAC;oBAED,MAAM,MAAM,GAAG,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,CAA4B,CAAA;oBACpE,MAAM,UAAU,GAAG,MAAM,WAAW,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA;oBAC3D,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,CAAC;wBACnB,MAAM,IAAI,KAAK,CACb,sBAAsB,WAAW,CAAC,IAAI,KAAK,UAAU,CAAC,MAAM,IAAI,iBAAiB,EAAE,CACpF,CAAA;oBACH,CAAC;oBACD,OAAO,IAAI,CAAA;gBACb,CAAC;aACF;SACF;KACF,CAAA;AACH,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { Endpoint } from 'payload';
2
+ import type { Inngest } from 'inngest';
3
+ export interface CreateSyncEndpointDeps {
4
+ collectionSlug: string;
5
+ inngest?: Inngest;
6
+ emit?: (event: {
7
+ name: string;
8
+ data: unknown;
9
+ }) => Promise<void>;
10
+ }
11
+ /** Default recorded on the event when the caller supplies no reason of its own. */
12
+ export declare const ADMIN_TRIGGER_REASON = "Triggered from the admin.";
13
+ /**
14
+ * `POST /api/<integrations>/:id/sync` — the admin's path to the same event
15
+ * `trigger_sync` fires.
16
+ *
17
+ * Authenticates off the Payload session cookie, so the person clicking the
18
+ * button needs no API key and the event records them rather than a service
19
+ * principal. The rules are `requestManualSync`'s, not this file's; all that
20
+ * lives here is the admin check and the mapping from a refusal to a status
21
+ * code.
22
+ *
23
+ * Admin-only, matching the MCP tool and the collection's own write access:
24
+ * triggering an integration makes it POST to an external system.
25
+ */
26
+ export declare function createSyncEndpoint(deps: CreateSyncEndpointDeps): Endpoint;
27
+ //# sourceMappingURL=sync.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../../src/integrations/endpoints/sync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAkB,MAAM,SAAS,CAAA;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAGtC,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;CACjE;AAED,mFAAmF;AACnF,eAAO,MAAM,oBAAoB,8BAA8B,CAAA;AAY/D;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,sBAAsB,GAAG,QAAQ,CAsEzE"}
@@ -0,0 +1,90 @@
1
+ import { requestManualSync } from '../sync/manual-sync.js';
2
+ /** Default recorded on the event when the caller supplies no reason of its own. */
3
+ export const ADMIN_TRIGGER_REASON = 'Triggered from the admin.';
4
+ /** What each refusal means over HTTP. */
5
+ const STATUS = {
6
+ 'not-found': 404,
7
+ disabled: 409,
8
+ // The instance is fine; the queue is not. 502 rather than 500 says the
9
+ // failure is downstream, which is the difference between "retry" and
10
+ // "something here is broken".
11
+ 'send-failed': 502,
12
+ };
13
+ /**
14
+ * `POST /api/<integrations>/:id/sync` — the admin's path to the same event
15
+ * `trigger_sync` fires.
16
+ *
17
+ * Authenticates off the Payload session cookie, so the person clicking the
18
+ * button needs no API key and the event records them rather than a service
19
+ * principal. The rules are `requestManualSync`'s, not this file's; all that
20
+ * lives here is the admin check and the mapping from a refusal to a status
21
+ * code.
22
+ *
23
+ * Admin-only, matching the MCP tool and the collection's own write access:
24
+ * triggering an integration makes it POST to an external system.
25
+ */
26
+ export function createSyncEndpoint(deps) {
27
+ return {
28
+ path: '/:id/sync',
29
+ method: 'post',
30
+ handler: async (req) => {
31
+ if (!req.user) {
32
+ return json({ error: 'You must be logged in to trigger a sync.' }, 401);
33
+ }
34
+ const roles = req.user['roles'] ?? [];
35
+ if (!roles.includes('admin')) {
36
+ return json({ error: 'Only admins can manually trigger integrations.' }, 403);
37
+ }
38
+ const id = req.routeParams?.['id'];
39
+ if (typeof id !== 'string' && typeof id !== 'number') {
40
+ return json({ error: 'Expected an integration instance id in the path.' }, 400);
41
+ }
42
+ // The button sends no body at all, so an absent or unparseable one is
43
+ // not an error — only a body that is present and wrong.
44
+ let reason = null;
45
+ try {
46
+ const raw = (await req.json?.());
47
+ if (raw && typeof raw === 'object' && typeof raw.reason === 'string') {
48
+ reason = raw.reason.trim() || null;
49
+ }
50
+ }
51
+ catch {
52
+ reason = null;
53
+ }
54
+ const result = await requestManualSync({
55
+ payload: req.payload,
56
+ collectionSlug: deps.collectionSlug,
57
+ ...(deps.inngest ? { inngest: deps.inngest } : {}),
58
+ ...(deps.emit ? { emit: deps.emit } : {}),
59
+ }, {
60
+ instanceId: String(id),
61
+ triggeredBy: req.user.id ?? null,
62
+ reason: reason ?? `${ADMIN_TRIGGER_REASON} (${req.user['email'] ?? req.user.id})`,
63
+ });
64
+ if (!result.ok) {
65
+ if (result.code === 'send-failed') {
66
+ req.payload.logger.error(`[integrations] could not queue a manual sync for ${String(id)}: ${result.message}`);
67
+ }
68
+ return json({ error: result.message, code: result.code }, STATUS[result.code]);
69
+ }
70
+ return json({
71
+ ok: true,
72
+ triggered: {
73
+ instanceId: result.instanceId,
74
+ instanceName: result.instanceName,
75
+ type: result.integrationType,
76
+ },
77
+ // What the caller polls against. The sync has not run yet.
78
+ lastSyncAt: result.lastSyncAt,
79
+ message: `Queued a sync for "${result.instanceName}". The status fields update when the run finishes.`,
80
+ }, 202);
81
+ },
82
+ };
83
+ }
84
+ function json(body, status) {
85
+ return new Response(JSON.stringify(body), {
86
+ status,
87
+ headers: { 'content-type': 'application/json' },
88
+ });
89
+ }
90
+ //# sourceMappingURL=sync.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sync.js","sourceRoot":"","sources":["../../../src/integrations/endpoints/sync.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAA0B,MAAM,wBAAwB,CAAA;AAQlF,mFAAmF;AACnF,MAAM,CAAC,MAAM,oBAAoB,GAAG,2BAA2B,CAAA;AAE/D,yCAAyC;AACzC,MAAM,MAAM,GAAsC;IAChD,WAAW,EAAE,GAAG;IAChB,QAAQ,EAAE,GAAG;IACb,uEAAuE;IACvE,qEAAqE;IACrE,8BAA8B;IAC9B,aAAa,EAAE,GAAG;CACnB,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAA4B;IAC7D,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,KAAK,EAAE,GAAmB,EAAqB,EAAE;YACxD,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;gBACd,OAAO,IAAI,CAAC,EAAE,KAAK,EAAE,0CAA0C,EAAE,EAAE,GAAG,CAAC,CAAA;YACzE,CAAC;YAED,MAA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,kBAAkB,EAAE;KAChD,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * `@forumone/throughline/integrations`: the integrations plugin and registry,
3
+ * the webhook integration, manual sync, their MCP tools, and the healthcheck
4
+ * job. Was `@forumone/throughline-integrations` in 0.x.
5
+ */
6
+ export { createManifestReachableCheck, createPayloadReachableCheck, healthcheckJob, } from './jobs/healthcheck.js';
7
+ export type { HealthcheckDefinition, HealthcheckOptions, HealthcheckResult, } from '../jobs/workflow-types.js';
8
+ export { integrationsJobs, integrationsPlugin, getIntegrationRegistry, getIntegrationContext, } from './plugin.js';
9
+ export { IntegrationRegistry } from './registry.js';
10
+ export { DEFAULT_INTEGRATIONS_SLUG } from './options.js';
11
+ export type { IntegrationsPluginOptions } from './options.js';
12
+ export { webhookIntegration, WEBHOOK_INTEGRATION_ID } from './integrations/index.js';
13
+ export type { WebhookConfig } from './integrations/index.js';
14
+ export type { Integration, IntegrationCategory, IntegrationContext, IntegrationAuditEvent, IntegrationConfigValidation, IntegrationHealth, IntegrationInstance, IntegrationInstanceLoaded, IntegrationStatusUpdate, IntegrationSyncStatus, } from './types.js';
15
+ export { problemReport, statusFromProblems, DEFAULT_PROBLEM_REPORT_LENGTH, } from './sync/problems.js';
16
+ export type { ProblemReportOptions } from './sync/problems.js';
17
+ export { requestManualSync, MANUAL_SYNC_EVENT } from './sync/manual-sync.js';
18
+ export type { ManualSyncRefusal, RequestManualSyncArgs, RequestManualSyncDeps, RequestManualSyncResult, } from './sync/manual-sync.js';
19
+ export { createSyncEndpoint, ADMIN_TRIGGER_REASON } from './endpoints/sync.js';
20
+ export type { CreateSyncEndpointDeps } from './endpoints/sync.js';
21
+ export { createListIntegrationsTool, createGetIntegrationStatusTool, createTriggerSyncTool, createTestIntegrationTool, createListIntegrationTypesTool, } from './tools/index.js';
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/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yB,EACzB,8BAA8B,GAC/B,MAAM,kBAAkB,CAAA"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * `@forumone/throughline/integrations`: the integrations plugin and registry,
3
+ * the webhook integration, manual sync, their MCP tools, and the healthcheck
4
+ * job. Was `@forumone/throughline-integrations` in 0.x.
5
+ */
6
+ export { createManifestReachableCheck, createPayloadReachableCheck, healthcheckJob, } from './jobs/healthcheck.js';
7
+ export { integrationsJobs, integrationsPlugin, getIntegrationRegistry, getIntegrationContext, } from './plugin.js';
8
+ export { IntegrationRegistry } from './registry.js';
9
+ export { DEFAULT_INTEGRATIONS_SLUG } from './options.js';
10
+ export { webhookIntegration, WEBHOOK_INTEGRATION_ID } from './integrations/index.js';
11
+ export { problemReport, statusFromProblems, DEFAULT_PROBLEM_REPORT_LENGTH, } from './sync/problems.js';
12
+ export { requestManualSync, MANUAL_SYNC_EVENT } from './sync/manual-sync.js';
13
+ export { createSyncEndpoint, ADMIN_TRIGGER_REASON } from './endpoints/sync.js';
14
+ export { createListIntegrationsTool, createGetIntegrationStatusTool, createTriggerSyncTool, createTestIntegrationTool, createListIntegrationTypesTool, } from './tools/index.js';
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/integrations/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,EAC3B,cAAc,GACf,MAAM,uBAAuB,CAAA;AAO9B,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAA;AAGxD,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,yBAAyB,CAAA;AAgBpF,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,6BAA6B,GAC9B,MAAM,oBAAoB,CAAA;AAG3B,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAQ5E,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAA;AAG9E,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,EAC9B,qBAAqB,EACrB,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,kBAAkB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { webhookIntegration, WEBHOOK_INTEGRATION_ID } from './webhook/index.js';
2
+ export type { WebhookConfig } from './webhook/index.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAC/E,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { webhookIntegration, WEBHOOK_INTEGRATION_ID } from './webhook/index.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integrations/integrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA"}