@supernova-studio/client 1.96.5 → 1.96.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (349) hide show
  1. package/dist/index.d.mts +101428 -143199
  2. package/dist/index.d.ts +101428 -143199
  3. package/dist/index.js +489 -99
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.mjs +5607 -5217
  6. package/dist/index.mjs.map +1 -1
  7. package/package.json +20 -9
  8. package/src/api/client.ts +62 -0
  9. package/src/api/conversion/analytics/index.ts +3 -0
  10. package/src/api/conversion/analytics/page-visits-to-comparison-dto.ts +65 -0
  11. package/src/api/conversion/analytics/page-visits-to-dto.ts +68 -0
  12. package/src/api/conversion/analytics/page-visits-to-heatmap-dto.ts +49 -0
  13. package/src/api/conversion/documentation/documentation-group-v1-to-dto.ts +114 -0
  14. package/src/api/conversion/documentation/documentation-group-v2-to-dto.ts +91 -0
  15. package/src/api/conversion/documentation/documentation-item-configuration-v1-to-dto.ts +52 -0
  16. package/src/api/conversion/documentation/documentation-item-configuration-v2-to-dto.ts +34 -0
  17. package/src/api/conversion/documentation/documentation-page-to-dto-utils.ts +134 -0
  18. package/src/api/conversion/documentation/documentation-page-v1-to-dto.ts +69 -0
  19. package/src/api/conversion/documentation/documentation-page-v2-to-dto.ts +84 -0
  20. package/src/api/conversion/documentation/documentation-settings-to-dto.ts +14 -0
  21. package/src/api/conversion/documentation/index.ts +8 -0
  22. package/src/api/conversion/export/index.ts +1 -0
  23. package/src/api/conversion/export/pipeline.ts +27 -0
  24. package/src/api/conversion/index.ts +4 -0
  25. package/src/api/conversion/integrations/git.ts +37 -0
  26. package/src/api/conversion/integrations/index.ts +2 -0
  27. package/src/api/conversion/integrations/integration.ts +37 -0
  28. package/src/api/dto/access-tokens/access-token.ts +45 -0
  29. package/src/api/dto/access-tokens/index.ts +1 -0
  30. package/src/api/dto/aux/color.ts +7 -0
  31. package/src/api/dto/aux/index.ts +4 -0
  32. package/src/api/dto/aux/meta.ts +8 -0
  33. package/src/api/dto/aux/object-metadata.ts +29 -0
  34. package/src/api/dto/aux/pagination.ts +8 -0
  35. package/src/api/dto/bff/app-bootstrap-data.ts +20 -0
  36. package/src/api/dto/bff/index.ts +1 -0
  37. package/src/api/dto/collections/index.ts +1 -0
  38. package/src/api/dto/collections/token-collection.ts +32 -0
  39. package/src/api/dto/design-systems/brand.ts +44 -0
  40. package/src/api/dto/design-systems/code-component-usage.ts +52 -0
  41. package/src/api/dto/design-systems/code-component.ts +101 -0
  42. package/src/api/dto/design-systems/code-history.ts +43 -0
  43. package/src/api/dto/design-systems/code-scan.ts +29 -0
  44. package/src/api/dto/design-systems/code-snapshots.ts +46 -0
  45. package/src/api/dto/design-systems/component.ts +40 -0
  46. package/src/api/dto/design-systems/contact.ts +11 -0
  47. package/src/api/dto/design-systems/data-source.ts +216 -0
  48. package/src/api/dto/design-systems/design-system.ts +75 -0
  49. package/src/api/dto/design-systems/documentation-search.ts +31 -0
  50. package/src/api/dto/design-systems/elements-diff.ts +14 -0
  51. package/src/api/dto/design-systems/figma-variables.ts +122 -0
  52. package/src/api/dto/design-systems/file.ts +71 -0
  53. package/src/api/dto/design-systems/import-job.ts +62 -0
  54. package/src/api/dto/design-systems/index.ts +24 -0
  55. package/src/api/dto/design-systems/members.ts +52 -0
  56. package/src/api/dto/design-systems/redirects.ts +33 -0
  57. package/src/api/dto/design-systems/role.ts +11 -0
  58. package/src/api/dto/design-systems/stats.ts +20 -0
  59. package/src/api/dto/design-systems/storybook.ts +45 -0
  60. package/src/api/dto/design-systems/user-design-systems.ts +10 -0
  61. package/src/api/dto/design-systems/version-room.ts +12 -0
  62. package/src/api/dto/design-systems/version.ts +56 -0
  63. package/src/api/dto/design-systems/view.ts +45 -0
  64. package/src/api/dto/design-tokens/design-token.ts +78 -0
  65. package/src/api/dto/design-tokens/index.ts +1 -0
  66. package/src/api/dto/documentation/analytics-v2.ts +80 -0
  67. package/src/api/dto/documentation/analytics.ts +32 -0
  68. package/src/api/dto/documentation/anchor.ts +15 -0
  69. package/src/api/dto/documentation/approvals.ts +21 -0
  70. package/src/api/dto/documentation/block-definition.ts +28 -0
  71. package/src/api/dto/documentation/block.ts +6 -0
  72. package/src/api/dto/documentation/documentation-page-snapshot.ts +18 -0
  73. package/src/api/dto/documentation/documentation.ts +34 -0
  74. package/src/api/dto/documentation/index.ts +11 -0
  75. package/src/api/dto/documentation/link-preview.ts +23 -0
  76. package/src/api/dto/documentation/publish.ts +23 -0
  77. package/src/api/dto/documentation/room.ts +12 -0
  78. package/src/api/dto/elements/components/figma-component-group.ts +19 -0
  79. package/src/api/dto/elements/components/figma-component.ts +56 -0
  80. package/src/api/dto/elements/components/index.ts +2 -0
  81. package/src/api/dto/elements/documentation/configuration.ts +20 -0
  82. package/src/api/dto/elements/documentation/draft-state.ts +37 -0
  83. package/src/api/dto/elements/documentation/group-action.ts +108 -0
  84. package/src/api/dto/elements/documentation/group-v1.ts +35 -0
  85. package/src/api/dto/elements/documentation/group-v2.ts +117 -0
  86. package/src/api/dto/elements/documentation/hierarchy.ts +25 -0
  87. package/src/api/dto/elements/documentation/index.ts +16 -0
  88. package/src/api/dto/elements/documentation/item-configuration-v1.ts +24 -0
  89. package/src/api/dto/elements/documentation/item-configuration-v2.ts +14 -0
  90. package/src/api/dto/elements/documentation/metadata.ts +8 -0
  91. package/src/api/dto/elements/documentation/page-actions-v2.ts +138 -0
  92. package/src/api/dto/elements/documentation/page-content.ts +15 -0
  93. package/src/api/dto/elements/documentation/page-dependencies.ts +30 -0
  94. package/src/api/dto/elements/documentation/page-v1.ts +21 -0
  95. package/src/api/dto/elements/documentation/page-v2.ts +132 -0
  96. package/src/api/dto/elements/documentation/settings.ts +9 -0
  97. package/src/api/dto/elements/documentation/structure.ts +37 -0
  98. package/src/api/dto/elements/elements-action-v2.ts +125 -0
  99. package/src/api/dto/elements/figma-nodes/figma-node-structure.ts +27 -0
  100. package/src/api/dto/elements/figma-nodes/figma-node-v1.ts +32 -0
  101. package/src/api/dto/elements/figma-nodes/figma-node-v2.ts +32 -0
  102. package/src/api/dto/elements/figma-nodes/figma-node.ts +103 -0
  103. package/src/api/dto/elements/figma-nodes/index.ts +5 -0
  104. package/src/api/dto/elements/figma-nodes/node-actions-v2.ts +25 -0
  105. package/src/api/dto/elements/frame-node-structures/frame-node-structure.ts +17 -0
  106. package/src/api/dto/elements/frame-node-structures/index.ts +1 -0
  107. package/src/api/dto/elements/get-elements-v2.ts +27 -0
  108. package/src/api/dto/elements/index.ts +7 -0
  109. package/src/api/dto/elements/properties/index.ts +2 -0
  110. package/src/api/dto/elements/properties/property-definitions.ts +75 -0
  111. package/src/api/dto/elements/properties/property-values.ts +50 -0
  112. package/src/api/dto/events/forge-project.ts +51 -0
  113. package/src/api/dto/events/index.ts +2 -0
  114. package/src/api/dto/events/workspace.ts +81 -0
  115. package/src/api/dto/export/exporter-property.ts +114 -0
  116. package/src/api/dto/export/exporter.ts +115 -0
  117. package/src/api/dto/export/filter.ts +20 -0
  118. package/src/api/dto/export/index.ts +5 -0
  119. package/src/api/dto/export/job.ts +114 -0
  120. package/src/api/dto/export/pipeline.ts +60 -0
  121. package/src/api/dto/figma-components/assets/download.ts +30 -0
  122. package/src/api/dto/figma-components/assets/index.ts +1 -0
  123. package/src/api/dto/figma-components/index.ts +1 -0
  124. package/src/api/dto/figma-exporter/figma-node.ts +11 -0
  125. package/src/api/dto/figma-exporter/index.ts +1 -0
  126. package/src/api/dto/files/files.ts +94 -0
  127. package/src/api/dto/files/index.ts +1 -0
  128. package/src/api/dto/forge/agent.ts +38 -0
  129. package/src/api/dto/forge/artifact.ts +94 -0
  130. package/src/api/dto/forge/feature-messages.ts +551 -0
  131. package/src/api/dto/forge/feature-room.ts +12 -0
  132. package/src/api/dto/forge/figma-node.ts +117 -0
  133. package/src/api/dto/forge/index.ts +28 -0
  134. package/src/api/dto/forge/iteration-message-old.ts +43 -0
  135. package/src/api/dto/forge/knowledge-item.ts +67 -0
  136. package/src/api/dto/forge/memory.ts +67 -0
  137. package/src/api/dto/forge/participant.ts +44 -0
  138. package/src/api/dto/forge/project-action.ts +123 -0
  139. package/src/api/dto/forge/project-artifact-room.ts +12 -0
  140. package/src/api/dto/forge/project-artifact.ts +85 -0
  141. package/src/api/dto/forge/project-context-feedback.ts +141 -0
  142. package/src/api/dto/forge/project-context-override.ts +41 -0
  143. package/src/api/dto/forge/project-context-scope.ts +23 -0
  144. package/src/api/dto/forge/project-context-v2.ts +228 -0
  145. package/src/api/dto/forge/project-context.ts +72 -0
  146. package/src/api/dto/forge/project-feature.ts +86 -0
  147. package/src/api/dto/forge/project-figma-node.ts +9 -0
  148. package/src/api/dto/forge/project-file.ts +48 -0
  149. package/src/api/dto/forge/project-invitation.ts +46 -0
  150. package/src/api/dto/forge/project-iteration-old.ts +54 -0
  151. package/src/api/dto/forge/project-member.ts +67 -0
  152. package/src/api/dto/forge/project-room.ts +12 -0
  153. package/src/api/dto/forge/project-section.ts +37 -0
  154. package/src/api/dto/forge/project.ts +105 -0
  155. package/src/api/dto/forge/relation.ts +34 -0
  156. package/src/api/dto/forge/threads.ts +153 -0
  157. package/src/api/dto/index.ts +25 -0
  158. package/src/api/dto/liveblocks/auth-response.ts +7 -0
  159. package/src/api/dto/liveblocks/index.ts +1 -0
  160. package/src/api/dto/mcp/index.ts +1 -0
  161. package/src/api/dto/mcp/stream.ts +17 -0
  162. package/src/api/dto/notifications/index.ts +2 -0
  163. package/src/api/dto/notifications/notifications.ts +65 -0
  164. package/src/api/dto/notifications/settings.ts +10 -0
  165. package/src/api/dto/portal/index.ts +1 -0
  166. package/src/api/dto/portal/portal-settings.ts +45 -0
  167. package/src/api/dto/sandboxes/index.ts +1 -0
  168. package/src/api/dto/sandboxes/template.ts +143 -0
  169. package/src/api/dto/storybook-sites/index.ts +1 -0
  170. package/src/api/dto/storybook-sites/storybook-sites.ts +60 -0
  171. package/src/api/dto/themes/index.ts +2 -0
  172. package/src/api/dto/themes/override.ts +27 -0
  173. package/src/api/dto/themes/theme.ts +53 -0
  174. package/src/api/dto/threads/index.ts +1 -0
  175. package/src/api/dto/threads/threads.ts +280 -0
  176. package/src/api/dto/trail-events/index.ts +1 -0
  177. package/src/api/dto/trail-events/trail-events.ts +172 -0
  178. package/src/api/dto/users/authenticated-user.ts +92 -0
  179. package/src/api/dto/users/index.ts +2 -0
  180. package/src/api/dto/users/user.ts +27 -0
  181. package/src/api/dto/workspaces/billing.ts +156 -0
  182. package/src/api/dto/workspaces/enums.ts +13 -0
  183. package/src/api/dto/workspaces/git.ts +32 -0
  184. package/src/api/dto/workspaces/index.ts +15 -0
  185. package/src/api/dto/workspaces/integrations.ts +34 -0
  186. package/src/api/dto/workspaces/invitations.ts +47 -0
  187. package/src/api/dto/workspaces/ip-whitelist.ts +33 -0
  188. package/src/api/dto/workspaces/knowledge-items-search.ts +37 -0
  189. package/src/api/dto/workspaces/login-screen.ts +42 -0
  190. package/src/api/dto/workspaces/membership.ts +55 -0
  191. package/src/api/dto/workspaces/npm-registry.ts +62 -0
  192. package/src/api/dto/workspaces/products.ts +45 -0
  193. package/src/api/dto/workspaces/subscription.ts +170 -0
  194. package/src/api/dto/workspaces/transfer-ownership.ts +7 -0
  195. package/src/api/dto/workspaces/untyped-data.ts +35 -0
  196. package/src/api/dto/workspaces/workspace.ts +49 -0
  197. package/src/api/endpoints/auth-tokens.ts +28 -0
  198. package/src/api/endpoints/codegen/codegen.ts +16 -0
  199. package/src/api/endpoints/codegen/ds-pipelines.ts +37 -0
  200. package/src/api/endpoints/codegen/exporters.ts +54 -0
  201. package/src/api/endpoints/codegen/index.ts +5 -0
  202. package/src/api/endpoints/codegen/jobs.ts +15 -0
  203. package/src/api/endpoints/codegen/pipelines.ts +55 -0
  204. package/src/api/endpoints/design-system/analytics.ts +14 -0
  205. package/src/api/endpoints/design-system/bff.ts +13 -0
  206. package/src/api/endpoints/design-system/code-snapshots.ts +47 -0
  207. package/src/api/endpoints/design-system/contact.ts +12 -0
  208. package/src/api/endpoints/design-system/design-systems.ts +90 -0
  209. package/src/api/endpoints/design-system/figma-node-structures.ts +20 -0
  210. package/src/api/endpoints/design-system/index.ts +11 -0
  211. package/src/api/endpoints/design-system/members.ts +24 -0
  212. package/src/api/endpoints/design-system/redirects.ts +46 -0
  213. package/src/api/endpoints/design-system/sources.ts +80 -0
  214. package/src/api/endpoints/design-system/storybook.ts +28 -0
  215. package/src/api/endpoints/design-system/versions/brands.ts +45 -0
  216. package/src/api/endpoints/design-system/versions/documentation.ts +107 -0
  217. package/src/api/endpoints/design-system/versions/ds-components.ts +30 -0
  218. package/src/api/endpoints/design-system/versions/elements-action.ts +65 -0
  219. package/src/api/endpoints/design-system/versions/elements.ts +27 -0
  220. package/src/api/endpoints/design-system/versions/figma-component-groups.ts +13 -0
  221. package/src/api/endpoints/design-system/versions/figma-components.ts +15 -0
  222. package/src/api/endpoints/design-system/versions/figma-frame-structures.ts +13 -0
  223. package/src/api/endpoints/design-system/versions/files.ts +43 -0
  224. package/src/api/endpoints/design-system/versions/import-jobs.ts +13 -0
  225. package/src/api/endpoints/design-system/versions/index.ts +19 -0
  226. package/src/api/endpoints/design-system/versions/overrides.ts +17 -0
  227. package/src/api/endpoints/design-system/versions/property-definitions.ts +43 -0
  228. package/src/api/endpoints/design-system/versions/property-values.ts +25 -0
  229. package/src/api/endpoints/design-system/versions/stats.ts +12 -0
  230. package/src/api/endpoints/design-system/versions/themes.ts +35 -0
  231. package/src/api/endpoints/design-system/versions/token-collections.ts +13 -0
  232. package/src/api/endpoints/design-system/versions/token-groups.ts +30 -0
  233. package/src/api/endpoints/design-system/versions/tokens.ts +29 -0
  234. package/src/api/endpoints/design-system/versions/versions.ts +90 -0
  235. package/src/api/endpoints/feedback.ts +60 -0
  236. package/src/api/endpoints/files.ts +25 -0
  237. package/src/api/endpoints/forge/agents.ts +54 -0
  238. package/src/api/endpoints/forge/artifacts.ts +54 -0
  239. package/src/api/endpoints/forge/documents.ts +18 -0
  240. package/src/api/endpoints/forge/feature-artifacts.ts +39 -0
  241. package/src/api/endpoints/forge/feature-iterations.ts +49 -0
  242. package/src/api/endpoints/forge/feature-messages.ts +68 -0
  243. package/src/api/endpoints/forge/features.ts +63 -0
  244. package/src/api/endpoints/forge/forge.ts +38 -0
  245. package/src/api/endpoints/forge/index.ts +16 -0
  246. package/src/api/endpoints/forge/iteration-tags.ts +13 -0
  247. package/src/api/endpoints/forge/memory.ts +41 -0
  248. package/src/api/endpoints/forge/project-contexts.ts +49 -0
  249. package/src/api/endpoints/forge/project-files.ts +41 -0
  250. package/src/api/endpoints/forge/project-invitations.ts +39 -0
  251. package/src/api/endpoints/forge/project-iterations.ts +65 -0
  252. package/src/api/endpoints/forge/project-members.ts +55 -0
  253. package/src/api/endpoints/forge/projects.ts +56 -0
  254. package/src/api/endpoints/index.ts +13 -0
  255. package/src/api/endpoints/liveblocks.ts +14 -0
  256. package/src/api/endpoints/mcp/index.ts +1 -0
  257. package/src/api/endpoints/mcp/streams.ts +21 -0
  258. package/src/api/endpoints/sandboxes/builds.ts +30 -0
  259. package/src/api/endpoints/sandboxes/index.ts +3 -0
  260. package/src/api/endpoints/sandboxes/sandboxes.ts +13 -0
  261. package/src/api/endpoints/sandboxes/templates.ts +16 -0
  262. package/src/api/endpoints/storybook-sites.ts +42 -0
  263. package/src/api/endpoints/threads.ts +38 -0
  264. package/src/api/endpoints/users.ts +26 -0
  265. package/src/api/endpoints/workspaces/billing.ts +24 -0
  266. package/src/api/endpoints/workspaces/chat-threads.ts +95 -0
  267. package/src/api/endpoints/workspaces/index.ts +9 -0
  268. package/src/api/endpoints/workspaces/integrations.ts +15 -0
  269. package/src/api/endpoints/workspaces/invites.ts +34 -0
  270. package/src/api/endpoints/workspaces/knowledge-items.ts +59 -0
  271. package/src/api/endpoints/workspaces/members.ts +31 -0
  272. package/src/api/endpoints/workspaces/npm-register.ts +20 -0
  273. package/src/api/endpoints/workspaces/subscription.ts +31 -0
  274. package/src/api/endpoints/workspaces/workspaces.ts +84 -0
  275. package/src/api/index.ts +6 -0
  276. package/src/api/payloads/design-systems/code-snapshots.ts +27 -0
  277. package/src/api/payloads/design-systems/index.ts +3 -0
  278. package/src/api/payloads/design-systems/update-design-system.ts +42 -0
  279. package/src/api/payloads/design-systems/version.ts +29 -0
  280. package/src/api/payloads/documentation/analytics.ts +36 -0
  281. package/src/api/payloads/documentation/block-definitions.ts +18 -0
  282. package/src/api/payloads/documentation/design-data-doc-diff.ts +7 -0
  283. package/src/api/payloads/documentation/index.ts +3 -0
  284. package/src/api/payloads/export/index.ts +1 -0
  285. package/src/api/payloads/export/pipeline.ts +111 -0
  286. package/src/api/payloads/index.ts +6 -0
  287. package/src/api/payloads/liveblocks/auth.ts +7 -0
  288. package/src/api/payloads/liveblocks/index.ts +1 -0
  289. package/src/api/payloads/users/index.ts +1 -0
  290. package/src/api/payloads/users/notifications/index.ts +1 -0
  291. package/src/api/payloads/users/notifications/notification-settings.ts +17 -0
  292. package/src/api/payloads/workspaces/index.ts +2 -0
  293. package/src/api/payloads/workspaces/workspace-configuration.ts +62 -0
  294. package/src/api/payloads/workspaces/workspace-integrations.ts +35 -0
  295. package/src/api/transport/index.ts +2 -0
  296. package/src/api/transport/request-executor-error.ts +60 -0
  297. package/src/api/transport/request-executor.ts +94 -0
  298. package/src/events/design-system.ts +21 -0
  299. package/src/events/event.ts +6 -0
  300. package/src/events/index.ts +2 -0
  301. package/src/index.ts +5 -0
  302. package/src/sync/docs-local-action-executor.ts +412 -0
  303. package/src/sync/docs-structure-repo.ts +283 -0
  304. package/src/sync/index.ts +5 -0
  305. package/src/sync/project-content-repo.ts +215 -0
  306. package/src/sync/project-local-action-executor.ts +415 -0
  307. package/src/sync/types.ts +37 -0
  308. package/src/utils/figma.ts +72 -0
  309. package/src/utils/hash.ts +62 -0
  310. package/src/utils/index.ts +4 -0
  311. package/src/utils/query.ts +41 -0
  312. package/src/utils/redirect-validation.ts +76 -0
  313. package/src/yjs/design-system-content/documentation-hierarchy.ts +35 -0
  314. package/src/yjs/design-system-content/index.ts +2 -0
  315. package/src/yjs/design-system-content/item-configuration.ts +62 -0
  316. package/src/yjs/docs-editor/blocks-to-prosemirror.ts +764 -0
  317. package/src/yjs/docs-editor/index.ts +7 -0
  318. package/src/yjs/docs-editor/list-tree-builder.ts +127 -0
  319. package/src/yjs/docs-editor/mock.ts +2271 -0
  320. package/src/yjs/docs-editor/model/block.ts +8 -0
  321. package/src/yjs/docs-editor/model/index.ts +2 -0
  322. package/src/yjs/docs-editor/model/page.ts +8 -0
  323. package/src/yjs/docs-editor/prosemirror/index.ts +3 -0
  324. package/src/yjs/docs-editor/prosemirror/inner-editor-schema.ts +145 -0
  325. package/src/yjs/docs-editor/prosemirror/main-editor-schema.ts +577 -0
  326. package/src/yjs/docs-editor/prosemirror/types.ts +19 -0
  327. package/src/yjs/docs-editor/prosemirror-to-blocks.ts +986 -0
  328. package/src/yjs/docs-editor/utils.ts +115 -0
  329. package/src/yjs/feature-room/backend.ts +36 -0
  330. package/src/yjs/feature-room/base.ts +109 -0
  331. package/src/yjs/feature-room/frontend.ts +53 -0
  332. package/src/yjs/feature-room/index.ts +3 -0
  333. package/src/yjs/forge-project-room/backend.ts +59 -0
  334. package/src/yjs/forge-project-room/base.ts +190 -0
  335. package/src/yjs/forge-project-room/index.ts +2 -0
  336. package/src/yjs/index.ts +7 -0
  337. package/src/yjs/thread-room/backend.ts +32 -0
  338. package/src/yjs/thread-room/base.ts +71 -0
  339. package/src/yjs/thread-room/frontend.ts +39 -0
  340. package/src/yjs/thread-room/index.ts +3 -0
  341. package/src/yjs/utils/index.ts +1 -0
  342. package/src/yjs/utils/key-value-storage.ts +57 -0
  343. package/src/yjs/version-room/backend.ts +101 -0
  344. package/src/yjs/version-room/base.ts +323 -0
  345. package/src/yjs/version-room/compute-dto.ts +387 -0
  346. package/src/yjs/version-room/frontend.ts +76 -0
  347. package/src/yjs/version-room/index.ts +6 -0
  348. package/src/yjs/version-room/types.ts +31 -0
  349. package/src/yjs/version-room/utils.ts +109 -0
@@ -0,0 +1,141 @@
1
+ import { DTOObjectMetadata } from "../aux"
2
+
3
+ import { z } from "zod"
4
+
5
+ export const DTOForgeProjectContextFeedbackSentiment = z.enum([
6
+ "Positive",
7
+ "Neutral",
8
+ "Negative",
9
+ "Aggressive",
10
+ ])
11
+ export const DTOForgeProjectContextFeedbackState = z.enum([
12
+ "Resolved",
13
+ "Unresolved",
14
+ ])
15
+ export const DTOForgeProjectContextFeedbackCategory = z.enum([
16
+ "MissingInformation",
17
+ "Incorrect",
18
+ "Output",
19
+ "WrongSource",
20
+ ])
21
+
22
+ export const DTOForgeProjectContextFeedback = z.object({
23
+ id: z.string().uuid(),
24
+ workspaceId: z.string(),
25
+ contextId: z.string(),
26
+ createdByUserId: z.string().optional(),
27
+ createdAt: z.coerce.date(),
28
+ message: z
29
+ .string()
30
+ .describe(
31
+ "A concise human-readable summary of the feedback being collected."
32
+ ),
33
+ description: z
34
+ .string()
35
+ .optional()
36
+ .describe(
37
+ "Optional additional details that expand on the feedback summary."
38
+ ),
39
+ conversation: z
40
+ .array(z.string())
41
+ .describe(
42
+ "Ordered conversation excerpts that provide context for the feedback. Each item should be one message."
43
+ ),
44
+ sentiment: DTOForgeProjectContextFeedbackSentiment.describe(
45
+ "Overall sentiment of the feedback. Use Positive, Neutral, Negative, or Aggressive."
46
+ ),
47
+ state: DTOForgeProjectContextFeedbackState,
48
+ category: DTOForgeProjectContextFeedbackCategory,
49
+ llm: z
50
+ .object({
51
+ model: z
52
+ .string()
53
+ .describe(
54
+ "The LLM model name that generated or participated in the conversation."
55
+ ),
56
+ provider: z.string().describe("The LLM provider name."),
57
+ })
58
+ .describe("Information about the LLM associated with this feedback."),
59
+ metadata: DTOObjectMetadata.optional(),
60
+ })
61
+
62
+ export const DTOForgeProjectContextFeedbackCreatePayload =
63
+ DTOForgeProjectContextFeedback.pick({
64
+ contextId: true,
65
+ message: true,
66
+ description: true,
67
+ conversation: true,
68
+ sentiment: true,
69
+ category: true,
70
+ metadata: true,
71
+ llm: true,
72
+ })
73
+
74
+ export const DTOForgeProjectContextFeedbackListQuery = z
75
+ .object({
76
+ contextId: z.string().optional(),
77
+ workspaceId: z.string().optional(),
78
+ designSystemId: z.string().optional(),
79
+ })
80
+ .refine(
81
+ (query) =>
82
+ Boolean(query.contextId) ||
83
+ Boolean(query.workspaceId) ||
84
+ Boolean(query.designSystemId),
85
+ "At least one of contextId, workspaceId, or designSystemId is required."
86
+ )
87
+
88
+ export const DTOForgeProjectContextFeedbackDeletePayload = z.object({
89
+ id: z.union([z.string(), z.array(z.string())]),
90
+ })
91
+
92
+ export const DTOForgeProjectContextFeedbackUpdatePayload = z.object({
93
+ id: z.string(),
94
+ state: DTOForgeProjectContextFeedbackState,
95
+ })
96
+
97
+ export const DTOForgeProjectContextFeedbackResponse = z.object({
98
+ feedback: DTOForgeProjectContextFeedback,
99
+ })
100
+
101
+ export const DTOForgeProjectContextFeedbackListResponse = z.object({
102
+ feedback: z.array(DTOForgeProjectContextFeedback),
103
+ })
104
+
105
+ export const DTOForgeProjectContextFeedbackDeleteResponse = z.object({
106
+ ok: z.literal(true),
107
+ })
108
+
109
+ export type DTOForgeProjectContextFeedbackSentiment = z.infer<
110
+ typeof DTOForgeProjectContextFeedbackSentiment
111
+ >
112
+ export type DTOForgeProjectContextFeedbackState = z.infer<
113
+ typeof DTOForgeProjectContextFeedbackState
114
+ >
115
+ export type DTOForgeProjectContextFeedbackCategory = z.infer<
116
+ typeof DTOForgeProjectContextFeedbackCategory
117
+ >
118
+ export type DTOForgeProjectContextFeedback = z.infer<
119
+ typeof DTOForgeProjectContextFeedback
120
+ >
121
+ export type DTOForgeProjectContextFeedbackCreatePayload = z.infer<
122
+ typeof DTOForgeProjectContextFeedbackCreatePayload
123
+ >
124
+ export type DTOForgeProjectContextFeedbackListQuery = z.infer<
125
+ typeof DTOForgeProjectContextFeedbackListQuery
126
+ >
127
+ export type DTOForgeProjectContextFeedbackDeletePayload = z.infer<
128
+ typeof DTOForgeProjectContextFeedbackDeletePayload
129
+ >
130
+ export type DTOForgeProjectContextFeedbackUpdatePayload = z.infer<
131
+ typeof DTOForgeProjectContextFeedbackUpdatePayload
132
+ >
133
+ export type DTOForgeProjectContextFeedbackResponse = z.infer<
134
+ typeof DTOForgeProjectContextFeedbackResponse
135
+ >
136
+ export type DTOForgeProjectContextFeedbackListResponse = z.infer<
137
+ typeof DTOForgeProjectContextFeedbackListResponse
138
+ >
139
+ export type DTOForgeProjectContextFeedbackDeleteResponse = z.infer<
140
+ typeof DTOForgeProjectContextFeedbackDeleteResponse
141
+ >
@@ -0,0 +1,41 @@
1
+ import z from "zod";
2
+ import { DTOForgeProjectContextV2, DTOForgeProjectTheme } from "./project-context-v2";
3
+
4
+ export const DTOProjectContextOverride = z.object({
5
+ projectId: z.string(),
6
+ theme: DTOForgeProjectTheme.partial(),
7
+ themePreset: z.string().optional(),
8
+ });
9
+
10
+ export const DTOProjectContextOverrideInput = z.object({
11
+ updateSharedContext: z.boolean().optional(),
12
+ theme: DTOForgeProjectTheme.partial(),
13
+ themePreset: z.string().optional(),
14
+ });
15
+
16
+ // TS7056 workaround. DTOForgeProjectContextV2 embeds the recursive scope tree
17
+ // and appears twice here, so a whole-composite `z.infer<...>` would expand both
18
+ // copies inline and overflow the .d.ts emit limit. The cast keeps `.parse()`
19
+ // typed via the manual alias below — runtime validation is unchanged.
20
+ //
21
+ // Alternatives ruled out:
22
+ // - `z.ZodType<X>` annotation → `.nullish()` input/output variance error
23
+ // - `z.lazy(() => DTOForgeProjectContextV2)` → same variance error
24
+ // - `z.ZodTypeAny` annotation → consumers lose `.parse()` typing
25
+ export const DTOProjectContextOverrideResponse = z.object({
26
+ override: DTOProjectContextOverride,
27
+ originalContext: DTOForgeProjectContextV2,
28
+ resolvedContext: DTOForgeProjectContextV2,
29
+ }) as unknown as z.ZodType<DTOProjectContextOverrideResponse>;
30
+
31
+ export type DTOProjectContextOverride = z.infer<typeof DTOProjectContextOverride>;
32
+ export type DTOProjectContextOverrideInput = z.infer<typeof DTOProjectContextOverrideInput>;
33
+ // Manual definition (not `z.infer<typeof DTOProjectContextOverrideResponse>`)
34
+ // for the same TS7056 reason — see comment on the schema above. Field-level
35
+ // `z.infer<typeof DTOForgeProjectContextV2>` is fine because TS emits it as a
36
+ // name reference, not an inline expansion.
37
+ export type DTOProjectContextOverrideResponse = {
38
+ override: DTOProjectContextOverride;
39
+ originalContext: z.infer<typeof DTOForgeProjectContextV2>;
40
+ resolvedContext: z.infer<typeof DTOForgeProjectContextV2>;
41
+ };
@@ -0,0 +1,23 @@
1
+ import {
2
+ ForgeProjectContextMcpUrlSlug,
3
+ ForgeProjectContextScope,
4
+ } from "@supernova-studio/model";
5
+ import { z } from "zod";
6
+
7
+ const MAX_SCOPE_BYTES = 1024 * 1024;
8
+
9
+ // Adds a 1MB wire-format cap on top of the model schema.
10
+ export const DTOForgeProjectContextScope = ForgeProjectContextScope.superRefine((scope, ctx) => {
11
+ const size = new TextEncoder().encode(JSON.stringify(scope)).length;
12
+ if (size > MAX_SCOPE_BYTES) {
13
+ ctx.addIssue({
14
+ code: z.ZodIssueCode.custom,
15
+ message: "Project context scope must be 1MB or smaller.",
16
+ });
17
+ }
18
+ });
19
+
20
+ export type DTOForgeProjectContextScope = ForgeProjectContextScope;
21
+
22
+ export const DTOForgeMcpUrlSlug = ForgeProjectContextMcpUrlSlug;
23
+ export type DTOForgeMcpUrlSlug = ForgeProjectContextMcpUrlSlug;
@@ -0,0 +1,228 @@
1
+ import {
2
+ BorderRadiusTokenData,
3
+ ColorTokenData,
4
+ FontFamilyTokenData,
5
+ FontSizeTokenData,
6
+ FontWeightTokenData,
7
+ LineHeightTokenData,
8
+ ShadowTokenData,
9
+ SpaceTokenData,
10
+ } from "@supernova-studio/model";
11
+ import { z } from "zod";
12
+ import { zodQueryBoolean } from "../../../utils/query";
13
+ import { DTOObjectMetadata } from "../aux";
14
+ import { DTOFileReference } from "../files/files";
15
+ import { DTOForgeMcpUrlSlug, DTOForgeProjectContextScope } from "./project-context-scope";
16
+
17
+ export const DTOForgeComponentSetTypeV2 = z.enum(["Shadcn"]);
18
+ export const DTOForgeComponentSet = z.object({
19
+ type: DTOForgeComponentSetTypeV2,
20
+ });
21
+
22
+ export const DTOForgeIconSetTypeV2 = z.enum(["Phosphor", "Lucide", "Tabler"]);
23
+ export const DTOForgeThemeKnownPreset = z.enum(["Default", "Airbnb", "Spotify", "Windows98"]);
24
+
25
+ export const DTOForgeIconSet = z.object({
26
+ type: DTOForgeIconSetTypeV2,
27
+ variant: z.string().optional(),
28
+ });
29
+
30
+ export const DTOForgeTokenThemeSet = z.object({
31
+ id: z.string(),
32
+ name: z.string(),
33
+ tokenThemeIds: z.array(z.string()),
34
+ });
35
+
36
+ export const DTOForgeProjectTheme = z.object({
37
+ // Colors
38
+ background: ColorTokenData,
39
+ foreground: ColorTokenData,
40
+ card: ColorTokenData,
41
+ cardForeground: ColorTokenData,
42
+ popover: ColorTokenData,
43
+ popoverForeground: ColorTokenData,
44
+ primary: ColorTokenData,
45
+ primaryForeground: ColorTokenData,
46
+ secondary: ColorTokenData,
47
+ secondaryForeground: ColorTokenData,
48
+ muted: ColorTokenData,
49
+ mutedForeground: ColorTokenData,
50
+ accent: ColorTokenData,
51
+ accentForeground: ColorTokenData,
52
+ destructive: ColorTokenData,
53
+ border: ColorTokenData,
54
+ input: ColorTokenData,
55
+ ring: ColorTokenData,
56
+ chart1: ColorTokenData,
57
+ chart2: ColorTokenData,
58
+ chart3: ColorTokenData,
59
+ chart4: ColorTokenData,
60
+ chart5: ColorTokenData,
61
+ sidebar: ColorTokenData,
62
+ sidebarForeground: ColorTokenData,
63
+ sidebarPrimary: ColorTokenData,
64
+ sidebarPrimaryForeground: ColorTokenData,
65
+ sidebarAccent: ColorTokenData,
66
+ sidebarAccentForeground: ColorTokenData,
67
+ sidebarBorder: ColorTokenData,
68
+ sidebarRing: ColorTokenData,
69
+
70
+ // Font family
71
+ fontFamily: FontFamilyTokenData,
72
+
73
+ // Font sizes
74
+ textXs: FontSizeTokenData,
75
+ textSm: FontSizeTokenData,
76
+ textBase: FontSizeTokenData,
77
+ textLg: FontSizeTokenData,
78
+ textXl: FontSizeTokenData,
79
+ text2xl: FontSizeTokenData,
80
+ text3xl: FontSizeTokenData,
81
+ text4xl: FontSizeTokenData,
82
+ text5xl: FontSizeTokenData,
83
+ text6xl: FontSizeTokenData,
84
+ text7xl: FontSizeTokenData,
85
+ text8xl: FontSizeTokenData,
86
+ text9xl: FontSizeTokenData,
87
+
88
+ // Line heights
89
+ textXsLineHeight: LineHeightTokenData,
90
+ textSmLineHeight: LineHeightTokenData,
91
+ textBaseLineHeight: LineHeightTokenData,
92
+ textLgLineHeight: LineHeightTokenData,
93
+ textXlLineHeight: LineHeightTokenData,
94
+ text2xlLineHeight: LineHeightTokenData,
95
+ text3xlLineHeight: LineHeightTokenData,
96
+ text4xlLineHeight: LineHeightTokenData,
97
+ text5xlLineHeight: LineHeightTokenData,
98
+ text6xlLineHeight: LineHeightTokenData,
99
+ text7xlLineHeight: LineHeightTokenData,
100
+ text8xlLineHeight: LineHeightTokenData,
101
+ text9xlLineHeight: LineHeightTokenData,
102
+
103
+ // Font weights
104
+ fontWeightThin: FontWeightTokenData,
105
+ fontWeightExtralight: FontWeightTokenData,
106
+ fontWeightLight: FontWeightTokenData,
107
+ fontWeightNormal: FontWeightTokenData,
108
+ fontWeightMedium: FontWeightTokenData,
109
+ fontWeightSemibold: FontWeightTokenData,
110
+ fontWeightBold: FontWeightTokenData,
111
+ fontWeightExtrabold: FontWeightTokenData,
112
+ fontWeightBlack: FontWeightTokenData,
113
+
114
+ // Other dimensions
115
+ radius: BorderRadiusTokenData,
116
+ spacing: SpaceTokenData,
117
+
118
+ // Shadows
119
+ shadow2xs: ShadowTokenData,
120
+ shadowXs: ShadowTokenData,
121
+ shadowSm: ShadowTokenData,
122
+ shadowMd: ShadowTokenData,
123
+ shadowLg: ShadowTokenData,
124
+ shadowXl: ShadowTokenData,
125
+ shadow2xl: ShadowTokenData,
126
+ });
127
+
128
+ export const DTOForgeProjectContextV2 = z.object({
129
+ id: z.string(),
130
+ name: z.string(),
131
+ workspaceId: z.string(),
132
+ designSystemId: z.string().optional(),
133
+ brandId: z.string().optional(),
134
+ defaultTokenThemeSetId: z.string().optional(),
135
+ description: z.string().optional(),
136
+ productContext: z.string().optional(),
137
+ additionalContext: z.string().optional(),
138
+ isArchived: z.boolean(),
139
+ isAllowedInPortal: z.boolean(),
140
+ isLibraryDismissed: z.boolean().optional(),
141
+ themePreset: z.string().optional(),
142
+ tokenThemeSets: z.array(DTOForgeTokenThemeSet).optional(),
143
+ scope: DTOForgeProjectContextScope.nullish(),
144
+ mcpUrlSlug: DTOForgeMcpUrlSlug.nullish(),
145
+ metadata: DTOObjectMetadata.optional(),
146
+ componentSet: DTOForgeComponentSet,
147
+ iconSet: DTOForgeIconSet,
148
+ theme: DTOForgeProjectTheme,
149
+ createdAt: z.coerce.date(),
150
+ updatedAt: z.coerce.date(),
151
+ thumbnail: DTOFileReference.optional(),
152
+
153
+ sandboxTemplate: z
154
+ .object({
155
+ id: z.string(),
156
+ version: z.string(),
157
+ })
158
+ .optional(),
159
+ });
160
+
161
+ export const DTOForgeProjectContextCreateV2 = DTOForgeProjectContextV2.omit({
162
+ id: true,
163
+ createdAt: true,
164
+ updatedAt: true,
165
+ isArchived: true,
166
+ thumbnail: true,
167
+ })
168
+ .extend({
169
+ // Optional on create: FE may pass an explicit value, otherwise the server
170
+ // derives it (true when a sandbox template or component library is provided, else false).
171
+ isAllowedInPortal: z.boolean().optional(),
172
+ thumbnailFileId: z.string().optional(),
173
+ theme: DTOForgeProjectTheme.optional(),
174
+ iconSet: DTOForgeIconSet.optional(),
175
+ componentSet: DTOForgeComponentSet.optional(),
176
+ })
177
+ .superRefine((input, ctx) => {
178
+ // If FE sets isAllowedInPortal to false => we don't care about templates/component lib
179
+ if (input.isAllowedInPortal === false) return;
180
+
181
+ const hasDefaultTemplateFields = input.theme && input.iconSet && input.componentSet;
182
+ const hasCustomTemplateFields = input.sandboxTemplate;
183
+
184
+ if (hasDefaultTemplateFields || hasCustomTemplateFields) return;
185
+
186
+ ctx.addIssue({
187
+ code: z.ZodIssueCode.custom,
188
+ message:
189
+ "Either the setup fields for default template (theme, iconSet, componentSet) or a sandbox template field (sandboxTemplate) must be provided.",
190
+ path: ["theme", "iconSet", "componentSet", "sandboxTemplate"],
191
+ });
192
+ });
193
+
194
+ export const DTOForgeProjectContextUpdateV2 = DTOForgeProjectContextV2.omit({
195
+ id: true,
196
+ workspaceId: true,
197
+ // designSystemId + brandId are immutable after create. Changing them on an
198
+ // existing context would orphan stored scope (token/page ids reference the
199
+ // original DS/brand). To re-target, create a new context.
200
+ designSystemId: true,
201
+ brandId: true,
202
+ createdAt: true,
203
+ updatedAt: true,
204
+ thumbnail: true,
205
+ })
206
+ .partial()
207
+ .extend({
208
+ thumbnailFileId: z.string().nullish(),
209
+ });
210
+
211
+ export const DTOForgeProjectContextResponseV2 = z.object({ context: DTOForgeProjectContextV2 });
212
+ export const DTOForgeProjectContextListQueryV2 = z.object({
213
+ workspaceId: z.string(),
214
+ isArchived: zodQueryBoolean(),
215
+ });
216
+ export const DTOForgeProjectContextListResponseV2 = z.object({ contexts: z.array(DTOForgeProjectContextV2) });
217
+
218
+ export type DTOForgeTokenThemeSet = z.infer<typeof DTOForgeTokenThemeSet>;
219
+ export type DTOForgeProjectContextV2 = z.infer<typeof DTOForgeProjectContextV2>;
220
+ export type DTOForgeThemeKnownPreset = z.infer<typeof DTOForgeThemeKnownPreset>;
221
+ export type DTOForgeProjectContextCreateV2 = z.infer<typeof DTOForgeProjectContextCreateV2>;
222
+ export type DTOForgeProjectContextUpdateV2 = z.infer<typeof DTOForgeProjectContextUpdateV2>;
223
+ export type DTOForgeIconSetTypeV2 = z.infer<typeof DTOForgeIconSetTypeV2>;
224
+ export type DTOForgeComponentSetTypeV2 = z.infer<typeof DTOForgeComponentSetTypeV2>;
225
+ export type DTOForgeProjectContextResponseV2 = z.infer<typeof DTOForgeProjectContextResponseV2>;
226
+ export type DTOForgeProjectContextListQueryV2 = z.infer<typeof DTOForgeProjectContextListQueryV2>;
227
+ export type DTOForgeProjectContextListResponseV2 = z.infer<typeof DTOForgeProjectContextListResponseV2>;
228
+ export type DTOForgeProjectTheme = z.infer<typeof DTOForgeProjectTheme>;
@@ -0,0 +1,72 @@
1
+ import { NpmRegistryConfig } from "@supernova-studio/model";
2
+ import { z } from "zod";
3
+ import { DTONpmRegistryConfig } from "../workspaces";
4
+
5
+ /**
6
+ * @deprecated
7
+ */
8
+ export const DTOForgeProjectContext = z.object({
9
+ definition: z.string(),
10
+ dependencies: z.array(
11
+ z.object({
12
+ packageName: z.string(),
13
+ type: z.literal("npm"),
14
+ version: z.string().default("latest"),
15
+ })
16
+ ),
17
+ designSystemId: z.string(),
18
+ id: z.string(),
19
+ meta: z.object({
20
+ name: z.string(),
21
+ description: z.string().optional(),
22
+ }),
23
+ name: z.string(),
24
+ npmProxySettings: DTONpmRegistryConfig.optional(),
25
+ platform: z.enum(["React", "Vue", "Angular"]),
26
+ styling: z.enum(["CSS", "Tailwind"]),
27
+
28
+ tailwindConfig: z
29
+ .object({
30
+ content: z.string(),
31
+ version: z.string(),
32
+ })
33
+ .optional(),
34
+
35
+ createdAt: z.coerce.date(),
36
+ updatedAt: z.coerce.date(),
37
+ workspaceId: z.string(),
38
+ });
39
+
40
+ export const DTOCreateForgeProjectContext = DTOForgeProjectContext.pick({
41
+ definition: true,
42
+ name: true,
43
+ meta: true,
44
+ designSystemId: true,
45
+ platform: true,
46
+ dependencies: true,
47
+ tailwindConfig: true,
48
+ styling: true,
49
+ }).extend({ npmProxySettings: DTONpmRegistryConfig });
50
+
51
+ export const DTOUpdateForgeProjectContext = DTOCreateForgeProjectContext.partial().extend({ id: z.string() });
52
+
53
+ export const DTOForgeProjectContextGetResponse = z.object({ context: DTOForgeProjectContext });
54
+
55
+ export const DTOForgeProjectContextListResponse = z.object({ contexts: z.array(DTOForgeProjectContext) });
56
+
57
+ export const DTOForgeProjectContextCreateResponse = z.object({ context: DTOForgeProjectContext });
58
+
59
+ export const DTOForgeProjectContextUpdateResponse = z.object({ context: DTOForgeProjectContext });
60
+
61
+ export const DTOForgeProjectContextRemoveResponse = z.object({
62
+ ok: z.literal(true),
63
+ });
64
+
65
+ export type DTOForgeProjectContext = z.infer<typeof DTOForgeProjectContext>;
66
+ export type DTOCreateForgeProjectContext = z.infer<typeof DTOCreateForgeProjectContext>;
67
+ export type DTOUpdateForgeProjectContext = z.infer<typeof DTOUpdateForgeProjectContext>;
68
+ export type DTOForgeProjectContextGetResponse = z.infer<typeof DTOForgeProjectContextGetResponse>;
69
+ export type DTOForgeProjectContextListResponse = z.infer<typeof DTOForgeProjectContextListResponse>;
70
+ export type DTOForgeProjectContextCreateResponse = z.infer<typeof DTOForgeProjectContextCreateResponse>;
71
+ export type DTOForgeProjectContextUpdateResponse = z.infer<typeof DTOForgeProjectContextUpdateResponse>;
72
+ export type DTOForgeProjectContextRemoveResponse = z.infer<typeof DTOForgeProjectContextRemoveResponse>;
@@ -0,0 +1,86 @@
1
+ import { FeaturePublishedState, Id, ProjectFeature, ProjectFeatureStatus } from "@supernova-studio/model";
2
+ import z from "zod";
3
+ import { DTOThreadMessageCreateInput } from "../threads";
4
+ import { DTOForgeSectionItemMoveInput } from "./project-section";
5
+
6
+ export const DTOFeaturePublishedStateUpdateInput = FeaturePublishedState.pick({
7
+ iterationId: true,
8
+ hideSupernovaUI: true,
9
+ visibility: true,
10
+ });
11
+ export const DTOForgeProjectFeature = ProjectFeature;
12
+
13
+ export const DTOForgeProjectPublishedFeature = z.object({
14
+ featureName: z.string(),
15
+ iterationName: z.string(),
16
+ hideSupernovaUI: z.boolean(),
17
+ thumbnailUrl: z.string().optional(),
18
+ staticPreviewUrl: z.string().optional(),
19
+
20
+ // These are only included when authenticated user has access to the project (for both public & private published features)
21
+ projectId: z.string().optional(),
22
+ projectName: z.string().optional(),
23
+ workspaceId: z.string().optional(),
24
+ });
25
+
26
+ export const DTOForgeProjectPublishedFeatureGetResponse = z.object({
27
+ publishedFeature: DTOForgeProjectPublishedFeature,
28
+ });
29
+
30
+ export const DTOForgeProjectFeatureListResponse = z.object({
31
+ features: DTOForgeProjectFeature.array(),
32
+ });
33
+
34
+ export const DTOForgeProjectFeatureGetResponse = z.object({
35
+ feature: DTOForgeProjectFeature,
36
+ });
37
+
38
+ export const DTOForgeProjectFeatureCreateInput = z.object({
39
+ id: Id,
40
+ name: z.string().optional(),
41
+ description: z.string(),
42
+ sectionId: Id.optional(),
43
+ afterFeatureId: Id.nullable().optional(),
44
+ initialMessage: DTOThreadMessageCreateInput,
45
+ });
46
+
47
+ export const DTOForgeProjectFeatureUpdateInput = z.object({
48
+ id: Id,
49
+ name: z.string().optional(),
50
+ description: z.string().optional(),
51
+ isArchived: z.boolean().optional(),
52
+ status: ProjectFeatureStatus.optional(),
53
+
54
+ /**
55
+ * Sending null will result in feature unpublish
56
+ */
57
+ publishedState: DTOFeaturePublishedStateUpdateInput.nullish(),
58
+ });
59
+
60
+ export const DTOForgeProjectFeatureDeleteInput = z.object({
61
+ id: Id,
62
+ });
63
+
64
+ export const DTOForgeProjectFeatureGetByIdParam = z.object({
65
+ id: Id,
66
+ });
67
+
68
+ export const DTOFeatureArtifactListQuery = z.object({
69
+ messageId: z.string().optional(),
70
+ iterationId: z.string().optional(),
71
+ });
72
+
73
+ export const DTOForgeProjectFeatureMoveInput = DTOForgeSectionItemMoveInput;
74
+
75
+ export type DTOForgeProjectFeature = z.infer<typeof DTOForgeProjectFeature>;
76
+ export type DTOForgeProjectFeatureListResponse = z.infer<typeof DTOForgeProjectFeatureListResponse>;
77
+ export type DTOForgeProjectFeatureCreateInput = z.infer<typeof DTOForgeProjectFeatureCreateInput>;
78
+ export type DTOForgeProjectFeatureUpdateInput = z.infer<typeof DTOForgeProjectFeatureUpdateInput>;
79
+ export type DTOForgeProjectFeatureDeleteInput = z.infer<typeof DTOForgeProjectFeatureDeleteInput>;
80
+ export type DTOForgeProjectFeatureGetByIdParam = z.infer<typeof DTOForgeProjectFeatureGetByIdParam>;
81
+ export type DTOForgeProjectFeatureMoveInput = z.infer<typeof DTOForgeProjectFeatureMoveInput>;
82
+ export type DTOForgeProjectFeatureGetResponse = z.infer<typeof DTOForgeProjectFeatureGetResponse>;
83
+ export type DTOForgeProjectPublishedFeature = z.infer<typeof DTOForgeProjectPublishedFeature>;
84
+ export type DTOForgeProjectPublishedFeatureGetResponse = z.infer<typeof DTOForgeProjectPublishedFeatureGetResponse>;
85
+ export type DTOFeaturePublishedStateUpdateInput = z.infer<typeof DTOFeaturePublishedStateUpdateInput>;
86
+ export type DTOFeatureArtifactListQuery = z.infer<typeof DTOFeatureArtifactListQuery>;
@@ -0,0 +1,9 @@
1
+ import { ForgeProjectFigmaNode, ForgeProjectFigmaNodeRenderInput } from "@supernova-studio/model";
2
+ import { z } from "zod";
3
+
4
+ export const DTOForgeProjectFigmaNode = ForgeProjectFigmaNode;
5
+
6
+ export const DTOForgeProjectFigmaNodeRenderInput = ForgeProjectFigmaNodeRenderInput;
7
+
8
+ export type DTOForgeProjectFigmaNode = z.infer<typeof DTOForgeProjectFigmaNode>;
9
+ export type DTOForgeProjectFigmaNodeRenderInput = z.infer<typeof DTOForgeProjectFigmaNodeRenderInput>;
@@ -0,0 +1,48 @@
1
+ import { z } from "zod";
2
+
3
+ export const DTOForgeProjectFile = z.object({
4
+ id: z.string(),
5
+ name: z.string(),
6
+ checksum: z.string(),
7
+ pendingUpload: z.boolean().optional(),
8
+ url: z.string(),
9
+ size: z.number(),
10
+ });
11
+
12
+ export const DTOForgeProjectFileListResponse = z.object({
13
+ files: z.array(DTOForgeProjectFile),
14
+ });
15
+
16
+ export const DTOForgeProjectFileUploadPayloadItem = z.object({
17
+ size: z.number(),
18
+ name: z.string(),
19
+ checksum: z.string(),
20
+ });
21
+
22
+ export const DTOForgeProjectFileUploadPayload = z.object({
23
+ files: z.array(DTOForgeProjectFileUploadPayloadItem),
24
+ });
25
+
26
+ export const DTOForgeProjectFileUploadResponse = z.object({
27
+ files: z.array(DTOForgeProjectFile),
28
+ uploadUrls: z.array(
29
+ z.object({
30
+ fileId: z.string(),
31
+ uploadUrl: z.string(),
32
+ })
33
+ ),
34
+ });
35
+
36
+ export const DTOForgeProjectFileUploadFinalizePayload = z.object({
37
+ fileIds: z.array(z.string()),
38
+ });
39
+
40
+ export const DTOForgeProjectFileUploadFinalizeResponse = z.object({ ok: z.literal(true) });
41
+
42
+ export type DTOForgeProjectFile = z.infer<typeof DTOForgeProjectFile>;
43
+ export type DTOForgeProjectFileListResponse = z.infer<typeof DTOForgeProjectFileListResponse>;
44
+ export type DTOForgeProjectFileUploadPayloadItem = z.infer<typeof DTOForgeProjectFileUploadPayloadItem>;
45
+ export type DTOForgeProjectFileUploadPayload = z.infer<typeof DTOForgeProjectFileUploadPayload>;
46
+ export type DTOForgeProjectFileUploadResponse = z.infer<typeof DTOForgeProjectFileUploadResponse>;
47
+ export type DTOForgeProjectFileUploadFinalizePayload = z.infer<typeof DTOForgeProjectFileUploadFinalizePayload>;
48
+ export type DTOForgeProjectFileUploadFinalizeResponse = z.infer<typeof DTOForgeProjectFileUploadFinalizeResponse>;