@nodaro/shared 3.31.0 → 3.33.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 (378) hide show
  1. package/README.md +17 -0
  2. package/dist/chunk-23FJQTEA.js +1604 -0
  3. package/dist/chunk-23FJQTEA.js.map +1 -0
  4. package/dist/chunk-2NIQO2J3.cjs +54 -0
  5. package/dist/chunk-2NIQO2J3.cjs.map +1 -0
  6. package/dist/chunk-2NQLSLSN.cjs +19 -0
  7. package/dist/chunk-2NQLSLSN.cjs.map +1 -0
  8. package/dist/chunk-2OJIVO7R.cjs +32 -0
  9. package/dist/chunk-2OJIVO7R.cjs.map +1 -0
  10. package/dist/chunk-2RF4Z7KG.cjs +803 -0
  11. package/dist/chunk-2RF4Z7KG.cjs.map +1 -0
  12. package/dist/chunk-3RYKIUAE.js +86 -0
  13. package/dist/chunk-3RYKIUAE.js.map +1 -0
  14. package/dist/chunk-44I73CQS.cjs +194 -0
  15. package/dist/chunk-44I73CQS.cjs.map +1 -0
  16. package/dist/chunk-5PC6JBGJ.cjs +1419 -0
  17. package/dist/chunk-5PC6JBGJ.cjs.map +1 -0
  18. package/dist/chunk-5RU2HCW2.js +30 -0
  19. package/dist/chunk-5RU2HCW2.js.map +1 -0
  20. package/dist/chunk-5RYLK3MQ.js +267 -0
  21. package/dist/chunk-5RYLK3MQ.js.map +1 -0
  22. package/dist/chunk-5THUHJ3E.js +46 -0
  23. package/dist/chunk-5THUHJ3E.js.map +1 -0
  24. package/dist/chunk-6DAWSVX2.cjs +103 -0
  25. package/dist/chunk-6DAWSVX2.cjs.map +1 -0
  26. package/dist/chunk-6WZ2VN7V.js +920 -0
  27. package/dist/chunk-6WZ2VN7V.js.map +1 -0
  28. package/dist/chunk-7G7G42KS.js +86 -0
  29. package/dist/chunk-7G7G42KS.js.map +1 -0
  30. package/dist/chunk-7Z5LUTGU.js +1567 -0
  31. package/dist/chunk-7Z5LUTGU.js.map +1 -0
  32. package/dist/chunk-AINCI23X.js +2171 -0
  33. package/dist/chunk-AINCI23X.js.map +1 -0
  34. package/dist/chunk-BG5D5CZ6.js +1922 -0
  35. package/dist/chunk-BG5D5CZ6.js.map +1 -0
  36. package/dist/chunk-CK3GK34R.js +1381 -0
  37. package/dist/chunk-CK3GK34R.js.map +1 -0
  38. package/dist/chunk-CUH22J4D.js +17 -0
  39. package/dist/chunk-CUH22J4D.js.map +1 -0
  40. package/dist/chunk-D26ENTN2.cjs +1770 -0
  41. package/dist/chunk-D26ENTN2.cjs.map +1 -0
  42. package/dist/chunk-D6GNRSCV.cjs +2017 -0
  43. package/dist/chunk-D6GNRSCV.cjs.map +1 -0
  44. package/dist/chunk-FBV5DF6D.js +95 -0
  45. package/dist/chunk-FBV5DF6D.js.map +1 -0
  46. package/dist/chunk-FG4E7MTG.cjs +4 -0
  47. package/dist/chunk-FG4E7MTG.cjs.map +1 -0
  48. package/dist/chunk-FT5CF6IA.js +42 -0
  49. package/dist/chunk-FT5CF6IA.js.map +1 -0
  50. package/dist/chunk-G6IIVKMO.js +26 -0
  51. package/dist/chunk-G6IIVKMO.js.map +1 -0
  52. package/dist/chunk-HC7VKIV5.cjs +430 -0
  53. package/dist/chunk-HC7VKIV5.cjs.map +1 -0
  54. package/dist/chunk-HGC5JNVA.cjs +1503 -0
  55. package/dist/chunk-HGC5JNVA.cjs.map +1 -0
  56. package/dist/chunk-HKFMXNVQ.cjs +1273 -0
  57. package/dist/chunk-HKFMXNVQ.cjs.map +1 -0
  58. package/dist/chunk-HRXEZ3SX.cjs +526 -0
  59. package/dist/chunk-HRXEZ3SX.cjs.map +1 -0
  60. package/dist/chunk-HSHCCBIV.js +255 -0
  61. package/dist/chunk-HSHCCBIV.js.map +1 -0
  62. package/dist/chunk-HUR6ZJ7S.cjs +159 -0
  63. package/dist/chunk-HUR6ZJ7S.cjs.map +1 -0
  64. package/dist/chunk-J7BMO73N.cjs +114 -0
  65. package/dist/chunk-J7BMO73N.cjs.map +1 -0
  66. package/dist/chunk-JFS3NWZ5.cjs +1714 -0
  67. package/dist/chunk-JFS3NWZ5.cjs.map +1 -0
  68. package/dist/chunk-JL4C5VJ7.cjs +488 -0
  69. package/dist/chunk-JL4C5VJ7.cjs.map +1 -0
  70. package/dist/chunk-JSGIEF6Z.cjs +1087 -0
  71. package/dist/chunk-JSGIEF6Z.cjs.map +1 -0
  72. package/dist/chunk-JWA5SGCS.js +203 -0
  73. package/dist/chunk-JWA5SGCS.js.map +1 -0
  74. package/dist/chunk-K3LLGRK7.cjs +3545 -0
  75. package/dist/chunk-K3LLGRK7.cjs.map +1 -0
  76. package/dist/chunk-KU6S7IYV.cjs +210 -0
  77. package/dist/chunk-KU6S7IYV.cjs.map +1 -0
  78. package/dist/chunk-M36G6SRP.js +447 -0
  79. package/dist/chunk-M36G6SRP.js.map +1 -0
  80. package/dist/chunk-M7GQBRZU.cjs +1963 -0
  81. package/dist/chunk-M7GQBRZU.cjs.map +1 -0
  82. package/dist/chunk-MRXGWL42.cjs +4 -0
  83. package/dist/chunk-MRXGWL42.cjs.map +1 -0
  84. package/dist/chunk-NEJ2PV4C.cjs +211 -0
  85. package/dist/chunk-NEJ2PV4C.cjs.map +1 -0
  86. package/dist/chunk-OTATNBMD.js +141 -0
  87. package/dist/chunk-OTATNBMD.js.map +1 -0
  88. package/dist/chunk-OZSACQ2V.js +471 -0
  89. package/dist/chunk-OZSACQ2V.js.map +1 -0
  90. package/dist/chunk-PHZ23DP3.js +1782 -0
  91. package/dist/chunk-PHZ23DP3.js.map +1 -0
  92. package/dist/chunk-PQHS255G.js +1369 -0
  93. package/dist/chunk-PQHS255G.js.map +1 -0
  94. package/dist/chunk-PRYE7AZQ.cjs +1227 -0
  95. package/dist/chunk-PRYE7AZQ.cjs.map +1 -0
  96. package/dist/chunk-PVJBAPYJ.js +404 -0
  97. package/dist/chunk-PVJBAPYJ.js.map +1 -0
  98. package/dist/chunk-PXFQVLBX.js +776 -0
  99. package/dist/chunk-PXFQVLBX.js.map +1 -0
  100. package/dist/chunk-QA3MVQ32.js +21 -0
  101. package/dist/chunk-QA3MVQ32.js.map +1 -0
  102. package/dist/chunk-QJRP44ZO.js +769 -0
  103. package/dist/chunk-QJRP44ZO.js.map +1 -0
  104. package/dist/chunk-SAW5OK36.cjs +54 -0
  105. package/dist/chunk-SAW5OK36.cjs.map +1 -0
  106. package/dist/chunk-SES6GDBQ.cjs +624 -0
  107. package/dist/chunk-SES6GDBQ.cjs.map +1 -0
  108. package/dist/chunk-SFW3UB2P.js +31 -0
  109. package/dist/chunk-SFW3UB2P.js.map +1 -0
  110. package/dist/chunk-TNPDV7I4.cjs +2346 -0
  111. package/dist/chunk-TNPDV7I4.cjs.map +1 -0
  112. package/dist/chunk-TU33KYKW.cjs +25 -0
  113. package/dist/chunk-TU33KYKW.cjs.map +1 -0
  114. package/dist/chunk-TZBIY5C3.js +187 -0
  115. package/dist/chunk-TZBIY5C3.js.map +1 -0
  116. package/dist/chunk-TZE673G6.js +3 -0
  117. package/dist/chunk-TZE673G6.js.map +1 -0
  118. package/dist/chunk-UCFWI6D4.js +29 -0
  119. package/dist/chunk-UCFWI6D4.js.map +1 -0
  120. package/dist/chunk-UTQSSKSG.js +1164 -0
  121. package/dist/chunk-UTQSSKSG.js.map +1 -0
  122. package/dist/chunk-VA42637J.cjs +287 -0
  123. package/dist/chunk-VA42637J.cjs.map +1 -0
  124. package/dist/chunk-VNQRI2RO.cjs +1047 -0
  125. package/dist/chunk-VNQRI2RO.cjs.map +1 -0
  126. package/dist/chunk-VXPLKQWY.cjs +821 -0
  127. package/dist/chunk-VXPLKQWY.cjs.map +1 -0
  128. package/dist/chunk-WD6HJRBG.cjs +197 -0
  129. package/dist/chunk-WD6HJRBG.cjs.map +1 -0
  130. package/dist/chunk-WDIBOWAA.js +1054 -0
  131. package/dist/chunk-WDIBOWAA.js.map +1 -0
  132. package/dist/chunk-WKOIGLQX.cjs +38 -0
  133. package/dist/chunk-WKOIGLQX.cjs.map +1 -0
  134. package/dist/chunk-WNVQ3SMB.cjs +96 -0
  135. package/dist/chunk-WNVQ3SMB.cjs.map +1 -0
  136. package/dist/chunk-WRSWH7US.cjs +285 -0
  137. package/dist/chunk-WRSWH7US.cjs.map +1 -0
  138. package/dist/chunk-XGFTL5XY.js +181 -0
  139. package/dist/chunk-XGFTL5XY.js.map +1 -0
  140. package/dist/chunk-XNISPHTZ.js +1039 -0
  141. package/dist/chunk-XNISPHTZ.js.map +1 -0
  142. package/dist/chunk-Y2PM3FFL.js +3 -0
  143. package/dist/chunk-Y2PM3FFL.js.map +1 -0
  144. package/dist/chunk-YBPBK5KI.js +1030 -0
  145. package/dist/chunk-YBPBK5KI.js.map +1 -0
  146. package/dist/chunk-YWNYGYI7.cjs +31 -0
  147. package/dist/chunk-YWNYGYI7.cjs.map +1 -0
  148. package/dist/chunk-YYV35XOS.js +122 -0
  149. package/dist/chunk-YYV35XOS.js.map +1 -0
  150. package/dist/chunk-Z2OL5AJD.cjs +133 -0
  151. package/dist/chunk-Z2OL5AJD.cjs.map +1 -0
  152. package/dist/chunk-ZDFHA2EC.js +572 -0
  153. package/dist/chunk-ZDFHA2EC.js.map +1 -0
  154. package/dist/chunk-ZL7UM6PU.cjs +34 -0
  155. package/dist/chunk-ZL7UM6PU.cjs.map +1 -0
  156. package/dist/chunk-ZNZDQAXN.js +175 -0
  157. package/dist/chunk-ZNZDQAXN.js.map +1 -0
  158. package/dist/chunk-ZO5PBBFX.js +3497 -0
  159. package/dist/chunk-ZO5PBBFX.js.map +1 -0
  160. package/dist/chunk-ZRL2UFTH.cjs +1073 -0
  161. package/dist/chunk-ZRL2UFTH.cjs.map +1 -0
  162. package/dist/entries/apps.cjs +155 -0
  163. package/dist/entries/apps.cjs.map +1 -0
  164. package/dist/entries/apps.d.cts +292 -0
  165. package/dist/entries/apps.d.ts +292 -0
  166. package/dist/entries/apps.js +10 -0
  167. package/dist/entries/apps.js.map +1 -0
  168. package/dist/entries/captions.cjs +124 -0
  169. package/dist/entries/captions.cjs.map +1 -0
  170. package/dist/entries/captions.d.cts +354 -0
  171. package/dist/entries/captions.d.ts +354 -0
  172. package/dist/entries/captions.js +3 -0
  173. package/dist/entries/captions.js.map +1 -0
  174. package/dist/entries/catalogs.cjs +165 -0
  175. package/dist/entries/catalogs.cjs.map +1 -0
  176. package/dist/entries/catalogs.d.cts +385 -0
  177. package/dist/entries/catalogs.d.ts +385 -0
  178. package/dist/entries/catalogs.js +4 -0
  179. package/dist/entries/catalogs.js.map +1 -0
  180. package/dist/entries/credits.cjs +596 -0
  181. package/dist/entries/credits.cjs.map +1 -0
  182. package/dist/entries/credits.d.cts +1460 -0
  183. package/dist/entries/credits.d.ts +1460 -0
  184. package/dist/entries/credits.js +11 -0
  185. package/dist/entries/credits.js.map +1 -0
  186. package/dist/entries/edl.cjs +409 -0
  187. package/dist/entries/edl.cjs.map +1 -0
  188. package/dist/entries/edl.d.cts +1199 -0
  189. package/dist/entries/edl.d.ts +1199 -0
  190. package/dist/entries/edl.js +4 -0
  191. package/dist/entries/edl.js.map +1 -0
  192. package/dist/entries/entities.cjs +530 -0
  193. package/dist/entries/entities.cjs.map +1 -0
  194. package/dist/entries/entities.d.cts +1371 -0
  195. package/dist/entries/entities.d.ts +1371 -0
  196. package/dist/entries/entities.js +5 -0
  197. package/dist/entries/entities.js.map +1 -0
  198. package/dist/entries/i18n.cjs +48 -0
  199. package/dist/entries/i18n.cjs.map +1 -0
  200. package/dist/entries/i18n.d.cts +69 -0
  201. package/dist/entries/i18n.d.ts +69 -0
  202. package/dist/entries/i18n.js +3 -0
  203. package/dist/entries/i18n.js.map +1 -0
  204. package/dist/entries/llm-models.cjs +177 -0
  205. package/dist/entries/llm-models.cjs.map +1 -0
  206. package/dist/entries/llm-models.d.cts +435 -0
  207. package/dist/entries/llm-models.d.ts +435 -0
  208. package/dist/entries/llm-models.js +4 -0
  209. package/dist/entries/llm-models.js.map +1 -0
  210. package/dist/entries/media.cjs +335 -0
  211. package/dist/entries/media.cjs.map +1 -0
  212. package/dist/entries/media.d.cts +518 -0
  213. package/dist/entries/media.d.ts +518 -0
  214. package/dist/entries/media.js +6 -0
  215. package/dist/entries/media.js.map +1 -0
  216. package/dist/entries/model-catalog.cjs +259 -0
  217. package/dist/entries/model-catalog.cjs.map +1 -0
  218. package/dist/entries/model-catalog.d.cts +202 -0
  219. package/dist/entries/model-catalog.d.ts +202 -0
  220. package/dist/entries/model-catalog.js +6 -0
  221. package/dist/entries/model-catalog.js.map +1 -0
  222. package/dist/entries/models.cjs +833 -0
  223. package/dist/entries/models.cjs.map +1 -0
  224. package/dist/entries/models.d.cts +287 -0
  225. package/dist/entries/models.d.ts +287 -0
  226. package/dist/entries/models.js +8 -0
  227. package/dist/entries/models.js.map +1 -0
  228. package/dist/entries/nodes.cjs +789 -0
  229. package/dist/entries/nodes.cjs.map +1 -0
  230. package/dist/entries/nodes.d.cts +1600 -0
  231. package/dist/entries/nodes.d.ts +1600 -0
  232. package/dist/entries/nodes.js +16 -0
  233. package/dist/entries/nodes.js.map +1 -0
  234. package/dist/entries/organizations.cjs +80 -0
  235. package/dist/entries/organizations.cjs.map +1 -0
  236. package/dist/entries/organizations.d.cts +466 -0
  237. package/dist/entries/organizations.d.ts +466 -0
  238. package/dist/entries/organizations.js +3 -0
  239. package/dist/entries/organizations.js.map +1 -0
  240. package/dist/entries/pipeline.cjs +594 -0
  241. package/dist/entries/pipeline.cjs.map +1 -0
  242. package/dist/entries/pipeline.d.cts +2617 -0
  243. package/dist/entries/pipeline.d.ts +2617 -0
  244. package/dist/entries/pipeline.js +5 -0
  245. package/dist/entries/pipeline.js.map +1 -0
  246. package/dist/entries/scene3d.cjs +704 -0
  247. package/dist/entries/scene3d.cjs.map +1 -0
  248. package/dist/entries/scene3d.d.cts +4284 -0
  249. package/dist/entries/scene3d.d.ts +4284 -0
  250. package/dist/entries/scene3d.js +3 -0
  251. package/dist/entries/scene3d.js.map +1 -0
  252. package/dist/entries/social.cjs +714 -0
  253. package/dist/entries/social.cjs.map +1 -0
  254. package/dist/entries/social.d.cts +1366 -0
  255. package/dist/entries/social.d.ts +1366 -0
  256. package/dist/entries/social.js +5 -0
  257. package/dist/entries/social.js.map +1 -0
  258. package/dist/entries/types.cjs +13 -0
  259. package/dist/entries/types.cjs.map +1 -0
  260. package/dist/entries/types.d.cts +162 -0
  261. package/dist/entries/types.d.ts +162 -0
  262. package/dist/entries/types.js +4 -0
  263. package/dist/entries/types.js.map +1 -0
  264. package/dist/entries/ugc.cjs +279 -0
  265. package/dist/entries/ugc.cjs.map +1 -0
  266. package/dist/entries/ugc.d.cts +575 -0
  267. package/dist/entries/ugc.d.ts +575 -0
  268. package/dist/entries/ugc.js +6 -0
  269. package/dist/entries/ugc.js.map +1 -0
  270. package/dist/entries/video.cjs +549 -0
  271. package/dist/entries/video.cjs.map +1 -0
  272. package/dist/entries/video.d.cts +1791 -0
  273. package/dist/entries/video.d.ts +1791 -0
  274. package/dist/entries/video.js +8 -0
  275. package/dist/entries/video.js.map +1 -0
  276. package/dist/entries/workflow.cjs +574 -0
  277. package/dist/entries/workflow.cjs.map +1 -0
  278. package/dist/entries/workflow.d.cts +1743 -0
  279. package/dist/entries/workflow.d.ts +1743 -0
  280. package/dist/entries/workflow.js +5 -0
  281. package/dist/entries/workflow.js.map +1 -0
  282. package/dist/fan-out-meta-Bu6VyXcZ.d.cts +19 -0
  283. package/dist/fan-out-meta-Bu6VyXcZ.d.ts +19 -0
  284. package/dist/gemini-omni-voices-zeRXxSbZ.d.cts +174 -0
  285. package/dist/gemini-omni-voices-zeRXxSbZ.d.ts +174 -0
  286. package/dist/image-overlay-layers-CyBfRhxJ.d.cts +208 -0
  287. package/dist/image-overlay-layers-CyBfRhxJ.d.ts +208 -0
  288. package/dist/index.cjs +7747 -27084
  289. package/dist/index.cjs.map +1 -1
  290. package/dist/index.d.cts +32 -24198
  291. package/dist/index.d.ts +32 -24198
  292. package/dist/index.js +40 -25220
  293. package/dist/index.js.map +1 -1
  294. package/dist/model-catalog-V-ZNzRSd.d.cts +651 -0
  295. package/dist/model-catalog-V-ZNzRSd.d.ts +651 -0
  296. package/dist/presentation-types-0ENOCjoj.d.cts +61 -0
  297. package/dist/presentation-types-0ENOCjoj.d.ts +61 -0
  298. package/dist/presentation-utils-D0kxsWf9.d.cts +92 -0
  299. package/dist/presentation-utils-pZwlEAzo.d.ts +92 -0
  300. package/dist/scene-node-types-C3kl_zyK.d.cts +1949 -0
  301. package/dist/scene-node-types-C3kl_zyK.d.ts +1949 -0
  302. package/dist/supported-fonts-CRoF1gOy.d.cts +16 -0
  303. package/dist/supported-fonts-CRoF1gOy.d.ts +16 -0
  304. package/dist/types-BRlFPEru.d.cts +511 -0
  305. package/dist/types-BRlFPEru.d.ts +511 -0
  306. package/dist/types-DffyGSy5.d.cts +67 -0
  307. package/dist/types-DffyGSy5.d.ts +67 -0
  308. package/package.json +102 -1
  309. package/src/__tests__/add-captions-plan.test.ts +6 -2
  310. package/src/__tests__/caption-edge-dash.test.ts +23 -0
  311. package/src/__tests__/fixtures/root-exports.baseline.json +4625 -0
  312. package/src/__tests__/input-field-extra-keys.test.ts +1 -0
  313. package/src/__tests__/model-makers.test.ts +76 -0
  314. package/src/__tests__/no-internal-imports.test.ts +1 -1
  315. package/src/__tests__/node-aspect-ratio.test.ts +25 -0
  316. package/src/__tests__/node-runtime-keys.test.ts +9 -0
  317. package/src/__tests__/package-entries.test.ts +50 -0
  318. package/src/__tests__/pitch-tempo-pricing.test.ts +21 -0
  319. package/src/__tests__/presentation-utils.test.ts +15 -0
  320. package/src/__tests__/preview-gate-use-case.test.ts +151 -0
  321. package/src/__tests__/private-host.test.ts +53 -0
  322. package/src/__tests__/run-continuation.test.ts +7 -1
  323. package/src/__tests__/site-capture-node.test.ts +58 -0
  324. package/src/__tests__/ugc-lane-wires.test.ts +228 -0
  325. package/src/__tests__/ugc-node-wires.test.ts +9 -3
  326. package/src/__tests__/ugc-run-state.test.ts +5 -4
  327. package/src/__tests__/video-analysis-catalog-sync.test.ts +1 -1
  328. package/src/__tests__/video-analysis-pricing.test.ts +6 -6
  329. package/src/__tests__/voice-changer-pro-quote.test.ts +79 -0
  330. package/src/add-captions-plan.ts +9 -3
  331. package/src/caption-edge-dash.ts +33 -0
  332. package/src/component-types.ts +9 -0
  333. package/src/credit-estimators/index.ts +22 -1
  334. package/src/credit-estimators/pitch-tempo.ts +15 -1
  335. package/src/credit-estimators/speech.ts +72 -4
  336. package/src/credit-estimators/unit-quote.ts +52 -0
  337. package/src/credit-estimators/video-sfx.ts +15 -0
  338. package/src/credit-estimators/voice-changer-pro-quote.ts +138 -0
  339. package/src/credit-identifiers.ts +62 -17
  340. package/src/entity-image-handle.ts +2 -0
  341. package/src/entries/apps.ts +63 -0
  342. package/src/entries/captions.ts +34 -0
  343. package/src/entries/catalogs.ts +65 -0
  344. package/src/entries/credits.ts +105 -0
  345. package/src/entries/edl.ts +42 -0
  346. package/src/entries/entities.ts +144 -0
  347. package/src/entries/i18n.ts +31 -0
  348. package/src/entries/llm-models.ts +63 -0
  349. package/src/entries/media.ts +36 -0
  350. package/src/entries/model-catalog.ts +95 -0
  351. package/src/entries/models.ts +266 -0
  352. package/src/entries/nodes.ts +245 -0
  353. package/src/entries/organizations.ts +9 -0
  354. package/src/entries/pipeline.ts +43 -0
  355. package/src/entries/scene3d.ts +27 -0
  356. package/src/entries/social.ts +297 -0
  357. package/src/entries/types.ts +26 -0
  358. package/src/entries/ugc.ts +14 -0
  359. package/src/entries/video.ts +59 -0
  360. package/src/entries/workflow.ts +172 -0
  361. package/src/fan-out-rows.ts +2 -0
  362. package/src/index.ts +25 -1845
  363. package/src/json-kinds.ts +4 -0
  364. package/src/model-catalog.ts +243 -34
  365. package/src/node-mappable-fields.ts +1 -0
  366. package/src/node-run-routes.ts +2 -0
  367. package/src/node-runtime-keys.ts +8 -0
  368. package/src/normalize-node-params.ts +30 -0
  369. package/src/presentation-utils.ts +12 -0
  370. package/src/preview-gate.ts +92 -14
  371. package/src/private-host.ts +89 -59
  372. package/src/producer-types.ts +16 -2
  373. package/src/run-continuation.ts +21 -0
  374. package/src/site-capture-node.ts +82 -0
  375. package/src/ugc-lane-wires.ts +246 -0
  376. package/src/ugc-node-wires.ts +37 -7
  377. package/src/ugc-run-state.ts +5 -3
  378. package/src/video-analysis-pricing.ts +31 -29
@@ -0,0 +1,16 @@
1
+ export { AUTO_ASPECT_AT_RUN_NODE_TYPES, COLLECTIONS_PAGE_DEFAULT, COLLECTIONS_PAGE_MAX, COLLECTION_BULK_ACTIONS, COLLECTION_BULK_MAX, COLLECTION_DEDUPE_KEY_MAX, COLLECTION_DESCRIPTION_MAX, COLLECTION_DIGEST_SEPARATOR, COLLECTION_EVICT_MAX_PER_WRITE, COLLECTION_HEADLINE_MAX, COLLECTION_IDEMPOTENCY_KEY_MAX, COLLECTION_MEDIA_TYPES, COLLECTION_NAME_MAX, COLLECTION_READ_LIMIT_MAX, COLLECTION_READ_WINDOW_HOURS_MAX, COLLECTION_RECORDS_OFFSET_MAX, COLLECTION_RECORD_FIELDS_BYTES_MAX, COLLECTION_RECORD_FIELDS_MAX, COLLECTION_RECORD_MEDIA_MAX, COLLECTION_RECORD_STATUSES, COLLECTION_RECORD_TEXT_MAX, COLLECTION_RECORD_TITLE_MAX, COLLECTION_RECORD_URL_MAX, COLLECTION_TIER_CAPS, COLLECTION_USAGES, CONTINUATION_NOT_COMPLETED, CONTINUATION_NOT_FAILED, CONTINUATION_NOT_FOUND, CONTINUATION_SETTLING, CONTINUATION_SUBSET_REQUIRED, CONTINUATION_SUPERSEDED, CONTINUATION_VERSION_MISMATCH, CONTINUATION_WORKFLOW_MISMATCH, DYNAMIC_HANDLE_NODE_TYPES, LEGACY_SOURCE_HANDLE_ALIASES, LEGACY_TARGET_HANDLE_ALIASES, MODEL_PARAM_NODE_TYPES, NODE_MAPPABLE_FIELDS, NODE_PRESET_EXPORT_KIND, NODE_RUN_ROUTES, NODE_TYPES_WITHOUT_RUN_ROUTE, NO_SAVED_RENDER_STAMPS, PHOTO_AUTO_ASPECT_NODE_TYPES, PRESET_APPLY_CLEAR_KEYS, PRESET_EXCLUDED_KEYS, PRESET_LEVER_GROUPS, PREVIEW_RENDER_NESTED, PREVIEW_RENDER_NESTED_MIXED, PREVIEW_RENDER_NESTED_REVIEW_ON, PREVIEW_RENDER_NODE_TYPES, PREVIEW_REVIEW_REQUIRED, PREVIEW_REVIEW_REQUIRED_MIXED, PREVIEW_REVIEW_REQUIRED_REVIEW_ON, PROMPT_PREFIX_KEY, PROMPT_SUFFIX_KEY, RENDERED_OUTPUT_HANDLES, RENDER_FINAL_ALREADY_RENDERED, RENDER_FINAL_ALREADY_RENDERED_MESSAGE, RENDER_FINAL_CODES, RENDER_FINAL_NODE_NOT_FOUND, RENDER_FINAL_NOT_A_RENDER, REVIEW_HOLDING_USE_CASE_TYPES, RUN_CONTINUATION_CODES, RUN_ONLY_NODE_FIELDS, RUN_OVERRIDE_CLEARED_FIELDS, SAVED_RENDER_STAMPS, SCRIPT_SCENE_COUNT_DEFAULT, SCRIPT_SCENE_COUNT_RANGE, SCRIPT_STYLE_GUIDE_MAX_LENGTH, SCRIPT_TARGET_DURATION_DEFAULT, SCRIPT_TARGET_DURATION_RANGE, SCRIPT_TONE_MAX_LENGTH, SETTINGS_HINT_SOURCES, SETTINGS_INPUT_CONSUMERS, SETTINGS_INPUT_HANDLE, SETTINGS_SOURCE_FIELDS, SETTINGS_SOURCE_TYPES, SITE_CAPTURE_NODE_TYPE, SITE_CAPTURE_STILLS, SOURCE_IMAGE_NODE_TYPES, SUNO_FIELD_HANDLE_FIELDS, applySettingsInput, buildNodePresetExport, canonicalSourceHandle, canonicalTargetHandle, captionPlanPassThrough, clampChars, classifyLegacyTargetHandle, collectionCapsForTier, collectionReadSince, collectionRecordHeadline, collectionRecordsDigest, combineVideosPassThrough, connectedSettingsSources, declaredJsonOutput, declaredJsonOutputRows, describeNodeAdjustments, edlSpanKey, extractPresetData, fieldKeyFromHandle, findWordlessTranscriptFeeds, fitCollectionField, holdsPreviewRender, ingestRecordFromJson, isCollectionMedia, isCollectionUrl, isLoneMediaLinkSource, isPreviewHoldingType, isPreviewRefusalCode, isSettingsHintEdge, isSettingsHintSource, isSettingsSourceType, jsonInputKind, jsonKindMismatch, jsonKindMismatchMessage, jsonOutputKind, loneMediaUrlKind, nodeAspectRatio, nodeRunRoute, normalizeCollectionFields, normalizeCollectionMedia, normalizeDedupeKey, normalizeNodeModelParams, parseNodePresetExport, planClipKeyAt, presetApplyClearKeys, presetDataMatches, presetLeverClearKeys, previewGatedNodeIds, previewStops, readPromptAffixes, readScriptSettings, renderClipKey, renderPlanBasis, renderPlanClipKey, renderPlanNodeId, renderPlanPath, renderPlanRowClipKeys, renderPlanValue, renderReadBasis, renderResultStamp, renderRunQuality, renderSentRowStamps, renderSettingsBasis, renderedSourceHandle, rendersAsPreview, resolveWiredSettings, savedRenderBatch, savedRenderBatchUrls, savedRenderOutput, settingsInputAccepts, settingsInputFields, settingsProviderModels, settingsSourceForField, settingsSourceForType, siteCaptureMaxStills, siteCaptureNodeOutputs, siteCapturePageUrl, siteCaptureStillUrls, siteCaptureStills, snapToModelDuration, transcribeWordTimestampsRefusal, videoOverlayPassThrough, withRunOverrides, withWiredSettings } from '../chunk-23FJQTEA.js';
2
+ import '../chunk-XNISPHTZ.js';
3
+ import '../chunk-G6IIVKMO.js';
4
+ import '../chunk-UCFWI6D4.js';
5
+ export { AUDIO_PRODUCER_TYPES, DYNAMIC_PRODUCER_TYPES, FAN_IN_TARGETS, FAN_OUT_ALL_OR_NOTHING_TYPES, FAN_OUT_EACH_HANDLES, FAN_OUT_EACH_TYPES, IMAGE_PRODUCER_TYPES, OWNER_ONLY_LISTING_RENDER_TYPES, OWN_LIST_NODE_TYPES, RENDER_JSON_HANDLE, RENDER_NODE_TYPES, RENDER_NODE_TYPE_IDS, VIDEO_PRODUCER_TYPES, defaultEdgeOutputMode, isFanInEdge, isFanInNodeType, isRenderDataHandle, isRenderNodeType, listResultsServeHandle, ownsItsList, renderNodeOf, renderSavedJsonOutputs, renderTranscriptOutputOf, rendersLatestBatch, rendersTranscriptJson } from '../chunk-PXFQVLBX.js';
6
+ export { clipNotesFrom, fanOutItemMeta } from '../chunk-OZSACQ2V.js';
7
+ import '../chunk-TZBIY5C3.js';
8
+ import '../chunk-JWA5SGCS.js';
9
+ import '../chunk-5RYLK3MQ.js';
10
+ import '../chunk-QA3MVQ32.js';
11
+ import '../chunk-PHZ23DP3.js';
12
+ import '../chunk-ZO5PBBFX.js';
13
+ import '../chunk-PQHS255G.js';
14
+ import '../chunk-7G7G42KS.js';
15
+ //# sourceMappingURL=nodes.js.map
16
+ //# sourceMappingURL=nodes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"nodes.js"}
@@ -0,0 +1,80 @@
1
+ 'use strict';
2
+
3
+ var chunkJ7BMO73N_cjs = require('../chunk-J7BMO73N.cjs');
4
+
5
+
6
+
7
+ Object.defineProperty(exports, "ACCESS_LEVELS", {
8
+ enumerable: true,
9
+ get: function () { return chunkJ7BMO73N_cjs.ACCESS_LEVELS; }
10
+ });
11
+ Object.defineProperty(exports, "COLLABORATOR_ROLES", {
12
+ enumerable: true,
13
+ get: function () { return chunkJ7BMO73N_cjs.COLLABORATOR_ROLES; }
14
+ });
15
+ Object.defineProperty(exports, "GRANTED_ACCESS", {
16
+ enumerable: true,
17
+ get: function () { return chunkJ7BMO73N_cjs.GRANTED_ACCESS; }
18
+ });
19
+ Object.defineProperty(exports, "MEMBER_STATUSES", {
20
+ enumerable: true,
21
+ get: function () { return chunkJ7BMO73N_cjs.MEMBER_STATUSES; }
22
+ });
23
+ Object.defineProperty(exports, "ORG_ERROR_CODES", {
24
+ enumerable: true,
25
+ get: function () { return chunkJ7BMO73N_cjs.ORG_ERROR_CODES; }
26
+ });
27
+ Object.defineProperty(exports, "ORG_KINDS", {
28
+ enumerable: true,
29
+ get: function () { return chunkJ7BMO73N_cjs.ORG_KINDS; }
30
+ });
31
+ Object.defineProperty(exports, "ORG_ROLES", {
32
+ enumerable: true,
33
+ get: function () { return chunkJ7BMO73N_cjs.ORG_ROLES; }
34
+ });
35
+ Object.defineProperty(exports, "ORG_STATUSES", {
36
+ enumerable: true,
37
+ get: function () { return chunkJ7BMO73N_cjs.ORG_STATUSES; }
38
+ });
39
+ Object.defineProperty(exports, "OrgSettingsSchema", {
40
+ enumerable: true,
41
+ get: function () { return chunkJ7BMO73N_cjs.OrgSettingsSchema; }
42
+ });
43
+ Object.defineProperty(exports, "PRESET_SETTING_KEYS", {
44
+ enumerable: true,
45
+ get: function () { return chunkJ7BMO73N_cjs.PRESET_SETTING_KEYS; }
46
+ });
47
+ Object.defineProperty(exports, "PresetSettingsSchema", {
48
+ enumerable: true,
49
+ get: function () { return chunkJ7BMO73N_cjs.PresetSettingsSchema; }
50
+ });
51
+ Object.defineProperty(exports, "SUBMISSION_STATUSES", {
52
+ enumerable: true,
53
+ get: function () { return chunkJ7BMO73N_cjs.SUBMISSION_STATUSES; }
54
+ });
55
+ Object.defineProperty(exports, "USAGE_GROUP_BYS", {
56
+ enumerable: true,
57
+ get: function () { return chunkJ7BMO73N_cjs.USAGE_GROUP_BYS; }
58
+ });
59
+ Object.defineProperty(exports, "WORKFLOW_VISIBILITIES", {
60
+ enumerable: true,
61
+ get: function () { return chunkJ7BMO73N_cjs.WORKFLOW_VISIBILITIES; }
62
+ });
63
+ Object.defineProperty(exports, "WORKSPACE_HEADER", {
64
+ enumerable: true,
65
+ get: function () { return chunkJ7BMO73N_cjs.WORKSPACE_HEADER; }
66
+ });
67
+ Object.defineProperty(exports, "WORKSPACE_HEADER_LOWER", {
68
+ enumerable: true,
69
+ get: function () { return chunkJ7BMO73N_cjs.WORKSPACE_HEADER_LOWER; }
70
+ });
71
+ Object.defineProperty(exports, "WORKSPACE_ROLES", {
72
+ enumerable: true,
73
+ get: function () { return chunkJ7BMO73N_cjs.WORKSPACE_ROLES; }
74
+ });
75
+ Object.defineProperty(exports, "WorkspaceSettingsSchema", {
76
+ enumerable: true,
77
+ get: function () { return chunkJ7BMO73N_cjs.WorkspaceSettingsSchema; }
78
+ });
79
+ //# sourceMappingURL=organizations.cjs.map
80
+ //# sourceMappingURL=organizations.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"organizations.cjs"}
@@ -0,0 +1,466 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Organizations — wire contract for the second tenancy axis
5
+ * (Organization -> Workspace -> Member).
6
+ *
7
+ * Lives in @nodaro/shared because SDK/MCP consumers need these enums, the
8
+ * request schemas the API validates, and the error codes it returns. This
9
+ * package carries the CONTRACT ONLY — no resolution logic, no presets, no
10
+ * vocabulary, no access rule. Those are server-side.
11
+ */
12
+ /**
13
+ * Selects which workspace a request LISTS from and CREATES into. It never
14
+ * authorizes: reading, updating, deleting or running an identified object is
15
+ * decided by that object's own workspace, so a forgotten or forged header can
16
+ * neither widen access nor move a charge.
17
+ *
18
+ * Fastify lower-cases incoming header keys, hence the second constant — read
19
+ * `req.headers[WORKSPACE_HEADER_LOWER]`, send `WORKSPACE_HEADER`.
20
+ */
21
+ declare const WORKSPACE_HEADER = "X-Nodaro-Workspace";
22
+ declare const WORKSPACE_HEADER_LOWER = "x-nodaro-workspace";
23
+ declare const ORG_KINDS: readonly ["school", "team"];
24
+ type OrgKind = (typeof ORG_KINDS)[number];
25
+ declare const ORG_ROLES: readonly ["owner", "admin", "member"];
26
+ type OrgRole = (typeof ORG_ROLES)[number];
27
+ declare const WORKSPACE_ROLES: readonly ["admin", "member"];
28
+ type WorkspaceRole = (typeof WORKSPACE_ROLES)[number];
29
+ declare const MEMBER_STATUSES: readonly ["active", "suspended"];
30
+ type MemberStatus = (typeof MEMBER_STATUSES)[number];
31
+ /** `pending` = created, awaiting platform-admin approval. */
32
+ declare const ORG_STATUSES: readonly ["pending", "active", "suspended", "deleted"];
33
+ type OrgStatus = (typeof ORG_STATUSES)[number];
34
+ /** An explicit per-workflow grant (works for personal workflows too). */
35
+ declare const COLLABORATOR_ROLES: readonly ["editor", "viewer"];
36
+ type CollaboratorRole = (typeof COLLABORATOR_ROLES)[number];
37
+ declare const WORKFLOW_VISIBILITIES: readonly ["private", "workspace"];
38
+ type WorkflowVisibility = (typeof WORKFLOW_VISIBILITIES)[number];
39
+ /** What an identity may do with a workflow, strongest first. */
40
+ declare const ACCESS_LEVELS: readonly ["own", "edit", "view", "none"];
41
+ type AccessLevel = (typeof ACCESS_LEVELS)[number];
42
+ /** The access a setting may grant to a non-creator. */
43
+ declare const GRANTED_ACCESS: readonly ["view", "edit"];
44
+ type GrantedAccess = (typeof GRANTED_ACCESS)[number];
45
+ declare const SUBMISSION_STATUSES: readonly ["submitted", "in_review", "returned", "approved"];
46
+ type SubmissionStatus = (typeof SUBMISSION_STATUSES)[number];
47
+ /**
48
+ * How a usage report is bucketed. `workspace` is org-scope only; `none`
49
+ * = flat rows. A runtime list, like `ORG_ROLES`, so the plugin route's Zod is
50
+ * `z.enum(USAGE_GROUP_BYS)` and the migration guard asserts the SQL
51
+ * `NOT IN (...)` list equals this minus `none` — one vocabulary, never three
52
+ * hand-copies that drift.
53
+ */
54
+ declare const USAGE_GROUP_BYS: readonly ["workspace", "member", "model", "day", "none"];
55
+ type UsageGroupBy = (typeof USAGE_GROUP_BYS)[number];
56
+ /**
57
+ * Error codes the organization endpoints add to the standard envelope
58
+ * (`{ error: { code, message } }`). Clients dispatch on the code, never on
59
+ * the message text.
60
+ */
61
+ declare const ORG_ERROR_CODES: readonly ["not_a_member", "insufficient_role", "org_not_active", "member_suspended", "workspace_archived", "personal_space_disabled", "token_workspace_mismatch", "run_requires_authenticated_member", "budget_exceeded", "member_cap_exceeded", "model_not_allowed", "invitation_expired", "invitation_revoked", "email_mismatch", "join_code_invalid", "domain_not_allowed", "already_started", "collab_unavailable", "audit_unavailable", "terms_required", "not_org_member", "already_a_member", "owner_cannot_leave", "has_active_workspaces", "invitation_not_found", "invitation_accepted", "bulk_invite_cap_exceeded"];
62
+ type OrgErrorCode = (typeof ORG_ERROR_CODES)[number];
63
+ /**
64
+ * The settings every organization kind has a default for. `organizations.
65
+ * settings` and `workspaces.settings` store PARTIAL overrides of this shape;
66
+ * `resolveEffectiveSettings` (./settings.ts) produces the full one.
67
+ */
68
+ declare const PresetSettingsSchema: z.ZodObject<{
69
+ admin_access: z.ZodEnum<{
70
+ edit: "edit";
71
+ view: "view";
72
+ }>;
73
+ default_workflow_visibility: z.ZodEnum<{
74
+ private: "private";
75
+ workspace: "workspace";
76
+ }>;
77
+ member_access_to_shared: z.ZodEnum<{
78
+ edit: "edit";
79
+ view: "view";
80
+ }>;
81
+ members_can_create_projects: z.ZodBoolean;
82
+ member_caps_enabled: z.ZodBoolean;
83
+ personal_space_enabled: z.ZodBoolean;
84
+ workspace_admins_can_invite: z.ZodBoolean;
85
+ collaborators_can_invite: z.ZodBoolean;
86
+ policy_survives_suspension: z.ZodBoolean;
87
+ }, z.core.$strip>;
88
+ type PresetSettings = z.infer<typeof PresetSettingsSchema>;
89
+ type PresetSettingKey = keyof PresetSettings;
90
+ declare const PRESET_SETTING_KEYS: readonly ("admin_access" | "default_workflow_visibility" | "member_access_to_shared" | "members_can_create_projects" | "member_caps_enabled" | "personal_space_enabled" | "workspace_admins_can_invite" | "collaborators_can_invite" | "policy_survives_suspension")[];
91
+ /** `workspaces.settings` — per-workspace overrides only. */
92
+ declare const WorkspaceSettingsSchema: z.ZodObject<{
93
+ admin_access: z.ZodOptional<z.ZodEnum<{
94
+ edit: "edit";
95
+ view: "view";
96
+ }>>;
97
+ default_workflow_visibility: z.ZodOptional<z.ZodEnum<{
98
+ private: "private";
99
+ workspace: "workspace";
100
+ }>>;
101
+ member_access_to_shared: z.ZodOptional<z.ZodEnum<{
102
+ edit: "edit";
103
+ view: "view";
104
+ }>>;
105
+ members_can_create_projects: z.ZodOptional<z.ZodBoolean>;
106
+ member_caps_enabled: z.ZodOptional<z.ZodBoolean>;
107
+ personal_space_enabled: z.ZodOptional<z.ZodBoolean>;
108
+ workspace_admins_can_invite: z.ZodOptional<z.ZodBoolean>;
109
+ collaborators_can_invite: z.ZodOptional<z.ZodBoolean>;
110
+ policy_survives_suspension: z.ZodOptional<z.ZodBoolean>;
111
+ }, z.core.$strip>;
112
+ type WorkspaceSettings = z.infer<typeof WorkspaceSettingsSchema>;
113
+ /** `organizations.settings` — preset overrides plus org-only keys. */
114
+ declare const OrgSettingsSchema: z.ZodObject<{
115
+ admin_access: z.ZodOptional<z.ZodEnum<{
116
+ edit: "edit";
117
+ view: "view";
118
+ }>>;
119
+ default_workflow_visibility: z.ZodOptional<z.ZodEnum<{
120
+ private: "private";
121
+ workspace: "workspace";
122
+ }>>;
123
+ member_access_to_shared: z.ZodOptional<z.ZodEnum<{
124
+ edit: "edit";
125
+ view: "view";
126
+ }>>;
127
+ members_can_create_projects: z.ZodOptional<z.ZodBoolean>;
128
+ member_caps_enabled: z.ZodOptional<z.ZodBoolean>;
129
+ personal_space_enabled: z.ZodOptional<z.ZodBoolean>;
130
+ workspace_admins_can_invite: z.ZodOptional<z.ZodBoolean>;
131
+ collaborators_can_invite: z.ZodOptional<z.ZodBoolean>;
132
+ policy_survives_suspension: z.ZodOptional<z.ZodBoolean>;
133
+ allowed_email_domains: z.ZodOptional<z.ZodArray<z.ZodString>>;
134
+ vocabulary_overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
135
+ }, z.core.$strip>;
136
+ type OrgSettings = z.infer<typeof OrgSettingsSchema>;
137
+
138
+ /**
139
+ * What the organization endpoints RETURN.
140
+ *
141
+ * `types.ts` carries what a client must send and the codes it must dispatch
142
+ * on; this carries the other half of the same wire contract — the shapes that
143
+ * come back. It lives here for the same reason: the SDK, the CLI, the app and
144
+ * any third-party integration all read these, and a shape described in three
145
+ * places is a shape that drifts in two of them.
146
+ *
147
+ * CONTRACT ONLY, like its sibling. There is no resolution logic here, no
148
+ * access rule, no vocabulary — a view names fields, it does not decide who
149
+ * may see them. Fields the server omits for a caller without the standing to
150
+ * see them are OPTIONAL here rather than nullable: absent means "not for
151
+ * you", `null` means "genuinely unset", and a client that cannot tell those
152
+ * apart will render the wrong thing.
153
+ */
154
+ interface OrganizationView {
155
+ id: string;
156
+ slug: string;
157
+ name: string;
158
+ kind: OrgKind;
159
+ status: OrgStatus;
160
+ ownerUserId: string;
161
+ settings: OrgSettings;
162
+ termsAcceptedAt: string | null;
163
+ createdAt: string;
164
+ updatedAt: string;
165
+ /** The CALLER's role. Absent on a read that did not establish membership. */
166
+ role?: OrgRole;
167
+ memberStatus?: MemberStatus;
168
+ }
169
+ interface OrgMemberView {
170
+ userId: string;
171
+ role: OrgRole;
172
+ status: MemberStatus;
173
+ joinedAt: string;
174
+ email: string | null;
175
+ displayName: string | null;
176
+ avatarUrl: string | null;
177
+ }
178
+ interface WorkspaceView {
179
+ id: string;
180
+ orgId: string;
181
+ name: string;
182
+ slug: string;
183
+ description: string | null;
184
+ settings: WorkspaceSettings;
185
+ defaultProjectId: string | null;
186
+ archived: boolean;
187
+ archivedAt: string | null;
188
+ createdAt: string;
189
+ updatedAt: string;
190
+ /** The CALLER's role. Absent on a read that did not establish membership. */
191
+ role?: WorkspaceRole;
192
+ memberStatus?: MemberStatus;
193
+ }
194
+ interface WorkspaceMemberView {
195
+ userId: string;
196
+ role: WorkspaceRole;
197
+ displayName: string | null;
198
+ avatarUrl: string | null;
199
+ addedAt: string;
200
+ /** Workspace admins only — absent for a plain member's read. */
201
+ status?: MemberStatus;
202
+ creditCap?: number | null;
203
+ }
204
+ /** Where an invitation stands. `expired` is derived from `expiresAt`, not stored. */
205
+ type InvitationState = "open" | "accepted" | "revoked" | "expired";
206
+ interface InvitationView {
207
+ id: string;
208
+ orgId: string;
209
+ workspaceId: string | null;
210
+ email: string;
211
+ orgRole: OrgRole;
212
+ workspaceRole: WorkspaceRole | null;
213
+ invitedBy: string | null;
214
+ state: InvitationState;
215
+ expiresAt: string;
216
+ acceptedAt: string | null;
217
+ revokedAt: string | null;
218
+ createdAt: string;
219
+ }
220
+ /**
221
+ * One row per address a create/resend was asked for.
222
+ *
223
+ * `link` is present whenever the address was NOT emailed — an install with no
224
+ * mail provider, or a delivery that failed. A client MUST surface it: the
225
+ * invitation exists either way, and without the link nobody can reach it.
226
+ */
227
+ interface InvitationDelivery {
228
+ email: string;
229
+ status: "sent" | "link_only" | "failed";
230
+ link?: string;
231
+ }
232
+ /**
233
+ * What an invitee sees BEFORE signing in — the one organization read that
234
+ * needs no token. `email` comes back masked, so the invitee can recognise
235
+ * their own address without the link disclosing it to whoever holds it.
236
+ */
237
+ interface InvitationPreview {
238
+ orgName: string;
239
+ kind: OrgKind;
240
+ vocabulary: Record<string, string>;
241
+ inviterName: string | null;
242
+ workspaceName: string | null;
243
+ email: string;
244
+ expiresAt: string;
245
+ state: InvitationState;
246
+ }
247
+ interface JoinCodeView {
248
+ code: string;
249
+ enabled: boolean;
250
+ rotatedAt: string;
251
+ rotatedBy: string | null;
252
+ }
253
+ /**
254
+ * What `GET /v1/me` reports about the caller's memberships.
255
+ *
256
+ * Deliberately a SUMMARY, not the full views above: this is the payload every
257
+ * client loads on every session start, and it answers one question — what am
258
+ * I a member of, and what may I call each thing. Names, roles, and the
259
+ * resolved vocabulary are here because a switcher cannot render without them;
260
+ * descriptions, timestamps and default projects are not, because a switcher
261
+ * never shows them and `GET /v1/orgs/:id` exists.
262
+ *
263
+ * The settings block is narrowed to the three keys a CLIENT can act on. The
264
+ * rest of an organization's settings are enforced server-side, and shipping
265
+ * them here would invite a client to enforce them badly.
266
+ */
267
+ interface OrganizationSummary {
268
+ id: string;
269
+ slug: string;
270
+ name: string;
271
+ kind: OrgKind;
272
+ status: OrgStatus;
273
+ /** The caller's own role and standing — always present in this payload. */
274
+ role: OrgRole;
275
+ memberStatus: MemberStatus;
276
+ settings: {
277
+ personal_space_enabled: boolean;
278
+ allowed_email_domains: string[];
279
+ vocabulary_overrides: Record<string, string>;
280
+ };
281
+ /** Resolved labels, so no client hard-codes "Class" or "Team". */
282
+ vocabulary: Record<string, string>;
283
+ }
284
+ interface WorkspaceSummary {
285
+ id: string;
286
+ orgId: string;
287
+ name: string;
288
+ slug: string;
289
+ role: WorkspaceRole;
290
+ memberStatus: MemberStatus;
291
+ archived: boolean;
292
+ }
293
+ /**
294
+ * The organizations block on `GET /v1/me`.
295
+ *
296
+ * THREE distinct states, and a client that collapses them is wrong in a way
297
+ * users feel: the fields ABSENT means this install has no organizations at
298
+ * all; present and empty means the account belongs to none; and
299
+ * `organizationsUnavailable` means the lookup FAILED — in which case a
300
+ * client must KEEP whatever selection it already had, because telling someone
301
+ * their school vanished during a cache blip is worse than a stale switcher.
302
+ */
303
+ interface MeOrganizations {
304
+ organizations?: OrganizationSummary[];
305
+ workspaces?: WorkspaceSummary[];
306
+ lastWorkspaceId?: string | null;
307
+ organizationsUnavailable?: boolean;
308
+ }
309
+ /**
310
+ * One recorded action in an organization's audit log.
311
+ *
312
+ * `action` is an OPEN vocabulary and a client must not exhaust it: new
313
+ * actions are added as the product grows, and a switch that throws on an
314
+ * unknown one turns a new feature into a broken page. Render what you
315
+ * recognise, fall back to the raw string for the rest.
316
+ *
317
+ * `actor` is null for anything the system did on nobody's behalf.
318
+ */
319
+ interface OrgAuditEntry {
320
+ id: string;
321
+ workspaceId: string | null;
322
+ action: string;
323
+ targetType: string | null;
324
+ targetId: string | null;
325
+ details: Record<string, unknown>;
326
+ createdAt: string;
327
+ actor: {
328
+ userId: string;
329
+ displayName: string | null;
330
+ email: string | null;
331
+ } | null;
332
+ }
333
+ /** A cursor-paged read. The cursor is part of the answer, not a side channel. */
334
+ interface OrgPage<T> {
335
+ data: T[];
336
+ nextCursor: string | null;
337
+ }
338
+ /**
339
+ * Usage reporting. What `GET /v1/orgs/:id/usage` and
340
+ * `GET /v1/workspaces/:id/usage` return. No cost/USD field appears anywhere —
341
+ * a report shows CREDITS a class or team spent, never the platform's own rates
342
+ * (pricing-leak class, guarded by organizations-types.test.ts and the
343
+ * migration guard).
344
+ */
345
+ /** One bucket of a usage report. Exactly one of workspace/member/model/day is set. */
346
+ interface UsageReportRow {
347
+ key: string;
348
+ workspace: {
349
+ id: string;
350
+ name: string | null;
351
+ slug: string | null;
352
+ archived: boolean;
353
+ } | null;
354
+ member: {
355
+ userId: string;
356
+ displayName: string | null;
357
+ email: string | null;
358
+ } | null;
359
+ model: string | null;
360
+ /** `YYYY-MM-DD` in the report's `tz`. */
361
+ day: string | null;
362
+ runCount: number;
363
+ appRunCount: number;
364
+ /** Settled where known, the held reservation otherwise. = settledCredits + inFlightCredits. */
365
+ credits: number;
366
+ settledCredits: number;
367
+ inFlightCredits: number;
368
+ inFlightRuns: number;
369
+ }
370
+ /**
371
+ * A platform-absorbed line for one workspace, split by ORIGIN (never attributed
372
+ * to a member). Two ledgers share the `org_usage_variance` source: a
373
+ * `metered_overrun` (a metered run's overrun beyond the budget — it HAS a
374
+ * settled usage_logs counterpart) and an `app_markup` shortfall (an
375
+ * approved-app markup the budget could not cover — it has NO usage_logs row).
376
+ * `other` is a future/unrecognised origin.
377
+ */
378
+ interface UsageVarianceRow {
379
+ workspace: {
380
+ id: string;
381
+ name: string | null;
382
+ slug: string | null;
383
+ } | null;
384
+ kind: "metered_overrun" | "app_markup" | "other";
385
+ credits: number;
386
+ rowCount: number;
387
+ }
388
+ /**
389
+ * Totals over the WHOLE window — every usage_logs row in [from, to] after the
390
+ * scope / userId / workspaceId narrowing — never over the returned `rows`.
391
+ * Unaffected by `truncated`; equals a `groupBy=day` report's column-wise sum.
392
+ */
393
+ interface UsageReportTotals {
394
+ runCount: number;
395
+ credits: number;
396
+ settledCredits: number;
397
+ inFlightCredits: number;
398
+ /** Metered-overrun variance in the window — a run's overrun the platform absorbed. */
399
+ platformAbsorbedCredits: number;
400
+ /** Approved-app markup shortfall the platform absorbed. It has NO usage_logs run, so it is not in the figures above. */
401
+ appMarkupAbsorbedCredits: number;
402
+ /**
403
+ * settledCredits − platformAbsorbedCredits: the METERED settlement that
404
+ * reached the workspace budget(s). App markup charged to a budget (migration
405
+ * 352) is not a usage_logs row and is not included here; when a markup
406
+ * shortfall is absorbed this figure under-reports and may go negative — it is
407
+ * NOT `workspace_budgets.spent_credits`.
408
+ */
409
+ chargedToBudget: number;
410
+ }
411
+ interface UsageReport {
412
+ scope: "org" | "workspace";
413
+ scopeId: string;
414
+ from: string;
415
+ to: string;
416
+ tz: string;
417
+ groupBy: Exclude<UsageGroupBy, "none">;
418
+ /** Present when a member's self-view or an admin's `?userId=` narrowed the report. */
419
+ userId: string | null;
420
+ /** Present when an org report was narrowed to one workspace. */
421
+ workspaceId: string | null;
422
+ rows: UsageReportRow[];
423
+ variance: UsageVarianceRow[];
424
+ totals: UsageReportTotals;
425
+ /**
426
+ * True when more than 5000 buckets existed and the tail of `rows` was dropped
427
+ * — narrow the window. Only `rows` is incomplete; `totals` and `variance`
428
+ * cover the whole window regardless.
429
+ */
430
+ truncated: boolean;
431
+ }
432
+ /** One usage_logs row as an organization sees it. No cost fields, ever. */
433
+ interface UsageLogEntry {
434
+ id: string;
435
+ createdAt: string;
436
+ workspace: {
437
+ id: string;
438
+ name: string | null;
439
+ slug: string | null;
440
+ } | null;
441
+ member: {
442
+ userId: string;
443
+ displayName: string | null;
444
+ email: string | null;
445
+ } | null;
446
+ jobId: string | null;
447
+ model: string;
448
+ status: "reserved" | "committed";
449
+ creditsReserved: number;
450
+ creditsSettled: number | null;
451
+ credits: number;
452
+ isAppRun: boolean;
453
+ }
454
+ /** Query parameters shared by both usage routes (dates inclusive, IANA tz). */
455
+ interface UsageQuery {
456
+ from?: string;
457
+ to?: string;
458
+ tz?: string;
459
+ groupBy?: UsageGroupBy;
460
+ workspaceId?: string;
461
+ userId?: string;
462
+ cursor?: string;
463
+ limit?: number;
464
+ }
465
+
466
+ export { ACCESS_LEVELS, type AccessLevel, COLLABORATOR_ROLES, type CollaboratorRole, GRANTED_ACCESS, type GrantedAccess, type InvitationDelivery, type InvitationPreview, type InvitationState, type InvitationView, type JoinCodeView, MEMBER_STATUSES, type MeOrganizations, type MemberStatus, ORG_ERROR_CODES, ORG_KINDS, ORG_ROLES, ORG_STATUSES, type OrgAuditEntry, type OrgErrorCode, type OrgKind, type OrgMemberView, type OrgPage, type OrgRole, type OrgSettings, OrgSettingsSchema, type OrgStatus, type OrganizationSummary, type OrganizationView, PRESET_SETTING_KEYS, type PresetSettingKey, type PresetSettings, PresetSettingsSchema, SUBMISSION_STATUSES, type SubmissionStatus, USAGE_GROUP_BYS, type UsageGroupBy, type UsageLogEntry, type UsageQuery, type UsageReport, type UsageReportRow, type UsageReportTotals, type UsageVarianceRow, WORKFLOW_VISIBILITIES, WORKSPACE_HEADER, WORKSPACE_HEADER_LOWER, WORKSPACE_ROLES, type WorkflowVisibility, type WorkspaceMemberView, type WorkspaceRole, type WorkspaceSettings, WorkspaceSettingsSchema, type WorkspaceSummary, type WorkspaceView };