@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.
- package/dist/index.d.mts +101428 -143199
- package/dist/index.d.ts +101428 -143199
- package/dist/index.js +489 -99
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5607 -5217
- package/dist/index.mjs.map +1 -1
- package/package.json +20 -9
- package/src/api/client.ts +62 -0
- package/src/api/conversion/analytics/index.ts +3 -0
- package/src/api/conversion/analytics/page-visits-to-comparison-dto.ts +65 -0
- package/src/api/conversion/analytics/page-visits-to-dto.ts +68 -0
- package/src/api/conversion/analytics/page-visits-to-heatmap-dto.ts +49 -0
- package/src/api/conversion/documentation/documentation-group-v1-to-dto.ts +114 -0
- package/src/api/conversion/documentation/documentation-group-v2-to-dto.ts +91 -0
- package/src/api/conversion/documentation/documentation-item-configuration-v1-to-dto.ts +52 -0
- package/src/api/conversion/documentation/documentation-item-configuration-v2-to-dto.ts +34 -0
- package/src/api/conversion/documentation/documentation-page-to-dto-utils.ts +134 -0
- package/src/api/conversion/documentation/documentation-page-v1-to-dto.ts +69 -0
- package/src/api/conversion/documentation/documentation-page-v2-to-dto.ts +84 -0
- package/src/api/conversion/documentation/documentation-settings-to-dto.ts +14 -0
- package/src/api/conversion/documentation/index.ts +8 -0
- package/src/api/conversion/export/index.ts +1 -0
- package/src/api/conversion/export/pipeline.ts +27 -0
- package/src/api/conversion/index.ts +4 -0
- package/src/api/conversion/integrations/git.ts +37 -0
- package/src/api/conversion/integrations/index.ts +2 -0
- package/src/api/conversion/integrations/integration.ts +37 -0
- package/src/api/dto/access-tokens/access-token.ts +45 -0
- package/src/api/dto/access-tokens/index.ts +1 -0
- package/src/api/dto/aux/color.ts +7 -0
- package/src/api/dto/aux/index.ts +4 -0
- package/src/api/dto/aux/meta.ts +8 -0
- package/src/api/dto/aux/object-metadata.ts +29 -0
- package/src/api/dto/aux/pagination.ts +8 -0
- package/src/api/dto/bff/app-bootstrap-data.ts +20 -0
- package/src/api/dto/bff/index.ts +1 -0
- package/src/api/dto/collections/index.ts +1 -0
- package/src/api/dto/collections/token-collection.ts +32 -0
- package/src/api/dto/design-systems/brand.ts +44 -0
- package/src/api/dto/design-systems/code-component-usage.ts +52 -0
- package/src/api/dto/design-systems/code-component.ts +101 -0
- package/src/api/dto/design-systems/code-history.ts +43 -0
- package/src/api/dto/design-systems/code-scan.ts +29 -0
- package/src/api/dto/design-systems/code-snapshots.ts +46 -0
- package/src/api/dto/design-systems/component.ts +40 -0
- package/src/api/dto/design-systems/contact.ts +11 -0
- package/src/api/dto/design-systems/data-source.ts +216 -0
- package/src/api/dto/design-systems/design-system.ts +75 -0
- package/src/api/dto/design-systems/documentation-search.ts +31 -0
- package/src/api/dto/design-systems/elements-diff.ts +14 -0
- package/src/api/dto/design-systems/figma-variables.ts +122 -0
- package/src/api/dto/design-systems/file.ts +71 -0
- package/src/api/dto/design-systems/import-job.ts +62 -0
- package/src/api/dto/design-systems/index.ts +24 -0
- package/src/api/dto/design-systems/members.ts +52 -0
- package/src/api/dto/design-systems/redirects.ts +33 -0
- package/src/api/dto/design-systems/role.ts +11 -0
- package/src/api/dto/design-systems/stats.ts +20 -0
- package/src/api/dto/design-systems/storybook.ts +45 -0
- package/src/api/dto/design-systems/user-design-systems.ts +10 -0
- package/src/api/dto/design-systems/version-room.ts +12 -0
- package/src/api/dto/design-systems/version.ts +56 -0
- package/src/api/dto/design-systems/view.ts +45 -0
- package/src/api/dto/design-tokens/design-token.ts +78 -0
- package/src/api/dto/design-tokens/index.ts +1 -0
- package/src/api/dto/documentation/analytics-v2.ts +80 -0
- package/src/api/dto/documentation/analytics.ts +32 -0
- package/src/api/dto/documentation/anchor.ts +15 -0
- package/src/api/dto/documentation/approvals.ts +21 -0
- package/src/api/dto/documentation/block-definition.ts +28 -0
- package/src/api/dto/documentation/block.ts +6 -0
- package/src/api/dto/documentation/documentation-page-snapshot.ts +18 -0
- package/src/api/dto/documentation/documentation.ts +34 -0
- package/src/api/dto/documentation/index.ts +11 -0
- package/src/api/dto/documentation/link-preview.ts +23 -0
- package/src/api/dto/documentation/publish.ts +23 -0
- package/src/api/dto/documentation/room.ts +12 -0
- package/src/api/dto/elements/components/figma-component-group.ts +19 -0
- package/src/api/dto/elements/components/figma-component.ts +56 -0
- package/src/api/dto/elements/components/index.ts +2 -0
- package/src/api/dto/elements/documentation/configuration.ts +20 -0
- package/src/api/dto/elements/documentation/draft-state.ts +37 -0
- package/src/api/dto/elements/documentation/group-action.ts +108 -0
- package/src/api/dto/elements/documentation/group-v1.ts +35 -0
- package/src/api/dto/elements/documentation/group-v2.ts +117 -0
- package/src/api/dto/elements/documentation/hierarchy.ts +25 -0
- package/src/api/dto/elements/documentation/index.ts +16 -0
- package/src/api/dto/elements/documentation/item-configuration-v1.ts +24 -0
- package/src/api/dto/elements/documentation/item-configuration-v2.ts +14 -0
- package/src/api/dto/elements/documentation/metadata.ts +8 -0
- package/src/api/dto/elements/documentation/page-actions-v2.ts +138 -0
- package/src/api/dto/elements/documentation/page-content.ts +15 -0
- package/src/api/dto/elements/documentation/page-dependencies.ts +30 -0
- package/src/api/dto/elements/documentation/page-v1.ts +21 -0
- package/src/api/dto/elements/documentation/page-v2.ts +132 -0
- package/src/api/dto/elements/documentation/settings.ts +9 -0
- package/src/api/dto/elements/documentation/structure.ts +37 -0
- package/src/api/dto/elements/elements-action-v2.ts +125 -0
- package/src/api/dto/elements/figma-nodes/figma-node-structure.ts +27 -0
- package/src/api/dto/elements/figma-nodes/figma-node-v1.ts +32 -0
- package/src/api/dto/elements/figma-nodes/figma-node-v2.ts +32 -0
- package/src/api/dto/elements/figma-nodes/figma-node.ts +103 -0
- package/src/api/dto/elements/figma-nodes/index.ts +5 -0
- package/src/api/dto/elements/figma-nodes/node-actions-v2.ts +25 -0
- package/src/api/dto/elements/frame-node-structures/frame-node-structure.ts +17 -0
- package/src/api/dto/elements/frame-node-structures/index.ts +1 -0
- package/src/api/dto/elements/get-elements-v2.ts +27 -0
- package/src/api/dto/elements/index.ts +7 -0
- package/src/api/dto/elements/properties/index.ts +2 -0
- package/src/api/dto/elements/properties/property-definitions.ts +75 -0
- package/src/api/dto/elements/properties/property-values.ts +50 -0
- package/src/api/dto/events/forge-project.ts +51 -0
- package/src/api/dto/events/index.ts +2 -0
- package/src/api/dto/events/workspace.ts +81 -0
- package/src/api/dto/export/exporter-property.ts +114 -0
- package/src/api/dto/export/exporter.ts +115 -0
- package/src/api/dto/export/filter.ts +20 -0
- package/src/api/dto/export/index.ts +5 -0
- package/src/api/dto/export/job.ts +114 -0
- package/src/api/dto/export/pipeline.ts +60 -0
- package/src/api/dto/figma-components/assets/download.ts +30 -0
- package/src/api/dto/figma-components/assets/index.ts +1 -0
- package/src/api/dto/figma-components/index.ts +1 -0
- package/src/api/dto/figma-exporter/figma-node.ts +11 -0
- package/src/api/dto/figma-exporter/index.ts +1 -0
- package/src/api/dto/files/files.ts +94 -0
- package/src/api/dto/files/index.ts +1 -0
- package/src/api/dto/forge/agent.ts +38 -0
- package/src/api/dto/forge/artifact.ts +94 -0
- package/src/api/dto/forge/feature-messages.ts +551 -0
- package/src/api/dto/forge/feature-room.ts +12 -0
- package/src/api/dto/forge/figma-node.ts +117 -0
- package/src/api/dto/forge/index.ts +28 -0
- package/src/api/dto/forge/iteration-message-old.ts +43 -0
- package/src/api/dto/forge/knowledge-item.ts +67 -0
- package/src/api/dto/forge/memory.ts +67 -0
- package/src/api/dto/forge/participant.ts +44 -0
- package/src/api/dto/forge/project-action.ts +123 -0
- package/src/api/dto/forge/project-artifact-room.ts +12 -0
- package/src/api/dto/forge/project-artifact.ts +85 -0
- package/src/api/dto/forge/project-context-feedback.ts +141 -0
- package/src/api/dto/forge/project-context-override.ts +41 -0
- package/src/api/dto/forge/project-context-scope.ts +23 -0
- package/src/api/dto/forge/project-context-v2.ts +228 -0
- package/src/api/dto/forge/project-context.ts +72 -0
- package/src/api/dto/forge/project-feature.ts +86 -0
- package/src/api/dto/forge/project-figma-node.ts +9 -0
- package/src/api/dto/forge/project-file.ts +48 -0
- package/src/api/dto/forge/project-invitation.ts +46 -0
- package/src/api/dto/forge/project-iteration-old.ts +54 -0
- package/src/api/dto/forge/project-member.ts +67 -0
- package/src/api/dto/forge/project-room.ts +12 -0
- package/src/api/dto/forge/project-section.ts +37 -0
- package/src/api/dto/forge/project.ts +105 -0
- package/src/api/dto/forge/relation.ts +34 -0
- package/src/api/dto/forge/threads.ts +153 -0
- package/src/api/dto/index.ts +25 -0
- package/src/api/dto/liveblocks/auth-response.ts +7 -0
- package/src/api/dto/liveblocks/index.ts +1 -0
- package/src/api/dto/mcp/index.ts +1 -0
- package/src/api/dto/mcp/stream.ts +17 -0
- package/src/api/dto/notifications/index.ts +2 -0
- package/src/api/dto/notifications/notifications.ts +65 -0
- package/src/api/dto/notifications/settings.ts +10 -0
- package/src/api/dto/portal/index.ts +1 -0
- package/src/api/dto/portal/portal-settings.ts +45 -0
- package/src/api/dto/sandboxes/index.ts +1 -0
- package/src/api/dto/sandboxes/template.ts +143 -0
- package/src/api/dto/storybook-sites/index.ts +1 -0
- package/src/api/dto/storybook-sites/storybook-sites.ts +60 -0
- package/src/api/dto/themes/index.ts +2 -0
- package/src/api/dto/themes/override.ts +27 -0
- package/src/api/dto/themes/theme.ts +53 -0
- package/src/api/dto/threads/index.ts +1 -0
- package/src/api/dto/threads/threads.ts +280 -0
- package/src/api/dto/trail-events/index.ts +1 -0
- package/src/api/dto/trail-events/trail-events.ts +172 -0
- package/src/api/dto/users/authenticated-user.ts +92 -0
- package/src/api/dto/users/index.ts +2 -0
- package/src/api/dto/users/user.ts +27 -0
- package/src/api/dto/workspaces/billing.ts +156 -0
- package/src/api/dto/workspaces/enums.ts +13 -0
- package/src/api/dto/workspaces/git.ts +32 -0
- package/src/api/dto/workspaces/index.ts +15 -0
- package/src/api/dto/workspaces/integrations.ts +34 -0
- package/src/api/dto/workspaces/invitations.ts +47 -0
- package/src/api/dto/workspaces/ip-whitelist.ts +33 -0
- package/src/api/dto/workspaces/knowledge-items-search.ts +37 -0
- package/src/api/dto/workspaces/login-screen.ts +42 -0
- package/src/api/dto/workspaces/membership.ts +55 -0
- package/src/api/dto/workspaces/npm-registry.ts +62 -0
- package/src/api/dto/workspaces/products.ts +45 -0
- package/src/api/dto/workspaces/subscription.ts +170 -0
- package/src/api/dto/workspaces/transfer-ownership.ts +7 -0
- package/src/api/dto/workspaces/untyped-data.ts +35 -0
- package/src/api/dto/workspaces/workspace.ts +49 -0
- package/src/api/endpoints/auth-tokens.ts +28 -0
- package/src/api/endpoints/codegen/codegen.ts +16 -0
- package/src/api/endpoints/codegen/ds-pipelines.ts +37 -0
- package/src/api/endpoints/codegen/exporters.ts +54 -0
- package/src/api/endpoints/codegen/index.ts +5 -0
- package/src/api/endpoints/codegen/jobs.ts +15 -0
- package/src/api/endpoints/codegen/pipelines.ts +55 -0
- package/src/api/endpoints/design-system/analytics.ts +14 -0
- package/src/api/endpoints/design-system/bff.ts +13 -0
- package/src/api/endpoints/design-system/code-snapshots.ts +47 -0
- package/src/api/endpoints/design-system/contact.ts +12 -0
- package/src/api/endpoints/design-system/design-systems.ts +90 -0
- package/src/api/endpoints/design-system/figma-node-structures.ts +20 -0
- package/src/api/endpoints/design-system/index.ts +11 -0
- package/src/api/endpoints/design-system/members.ts +24 -0
- package/src/api/endpoints/design-system/redirects.ts +46 -0
- package/src/api/endpoints/design-system/sources.ts +80 -0
- package/src/api/endpoints/design-system/storybook.ts +28 -0
- package/src/api/endpoints/design-system/versions/brands.ts +45 -0
- package/src/api/endpoints/design-system/versions/documentation.ts +107 -0
- package/src/api/endpoints/design-system/versions/ds-components.ts +30 -0
- package/src/api/endpoints/design-system/versions/elements-action.ts +65 -0
- package/src/api/endpoints/design-system/versions/elements.ts +27 -0
- package/src/api/endpoints/design-system/versions/figma-component-groups.ts +13 -0
- package/src/api/endpoints/design-system/versions/figma-components.ts +15 -0
- package/src/api/endpoints/design-system/versions/figma-frame-structures.ts +13 -0
- package/src/api/endpoints/design-system/versions/files.ts +43 -0
- package/src/api/endpoints/design-system/versions/import-jobs.ts +13 -0
- package/src/api/endpoints/design-system/versions/index.ts +19 -0
- package/src/api/endpoints/design-system/versions/overrides.ts +17 -0
- package/src/api/endpoints/design-system/versions/property-definitions.ts +43 -0
- package/src/api/endpoints/design-system/versions/property-values.ts +25 -0
- package/src/api/endpoints/design-system/versions/stats.ts +12 -0
- package/src/api/endpoints/design-system/versions/themes.ts +35 -0
- package/src/api/endpoints/design-system/versions/token-collections.ts +13 -0
- package/src/api/endpoints/design-system/versions/token-groups.ts +30 -0
- package/src/api/endpoints/design-system/versions/tokens.ts +29 -0
- package/src/api/endpoints/design-system/versions/versions.ts +90 -0
- package/src/api/endpoints/feedback.ts +60 -0
- package/src/api/endpoints/files.ts +25 -0
- package/src/api/endpoints/forge/agents.ts +54 -0
- package/src/api/endpoints/forge/artifacts.ts +54 -0
- package/src/api/endpoints/forge/documents.ts +18 -0
- package/src/api/endpoints/forge/feature-artifacts.ts +39 -0
- package/src/api/endpoints/forge/feature-iterations.ts +49 -0
- package/src/api/endpoints/forge/feature-messages.ts +68 -0
- package/src/api/endpoints/forge/features.ts +63 -0
- package/src/api/endpoints/forge/forge.ts +38 -0
- package/src/api/endpoints/forge/index.ts +16 -0
- package/src/api/endpoints/forge/iteration-tags.ts +13 -0
- package/src/api/endpoints/forge/memory.ts +41 -0
- package/src/api/endpoints/forge/project-contexts.ts +49 -0
- package/src/api/endpoints/forge/project-files.ts +41 -0
- package/src/api/endpoints/forge/project-invitations.ts +39 -0
- package/src/api/endpoints/forge/project-iterations.ts +65 -0
- package/src/api/endpoints/forge/project-members.ts +55 -0
- package/src/api/endpoints/forge/projects.ts +56 -0
- package/src/api/endpoints/index.ts +13 -0
- package/src/api/endpoints/liveblocks.ts +14 -0
- package/src/api/endpoints/mcp/index.ts +1 -0
- package/src/api/endpoints/mcp/streams.ts +21 -0
- package/src/api/endpoints/sandboxes/builds.ts +30 -0
- package/src/api/endpoints/sandboxes/index.ts +3 -0
- package/src/api/endpoints/sandboxes/sandboxes.ts +13 -0
- package/src/api/endpoints/sandboxes/templates.ts +16 -0
- package/src/api/endpoints/storybook-sites.ts +42 -0
- package/src/api/endpoints/threads.ts +38 -0
- package/src/api/endpoints/users.ts +26 -0
- package/src/api/endpoints/workspaces/billing.ts +24 -0
- package/src/api/endpoints/workspaces/chat-threads.ts +95 -0
- package/src/api/endpoints/workspaces/index.ts +9 -0
- package/src/api/endpoints/workspaces/integrations.ts +15 -0
- package/src/api/endpoints/workspaces/invites.ts +34 -0
- package/src/api/endpoints/workspaces/knowledge-items.ts +59 -0
- package/src/api/endpoints/workspaces/members.ts +31 -0
- package/src/api/endpoints/workspaces/npm-register.ts +20 -0
- package/src/api/endpoints/workspaces/subscription.ts +31 -0
- package/src/api/endpoints/workspaces/workspaces.ts +84 -0
- package/src/api/index.ts +6 -0
- package/src/api/payloads/design-systems/code-snapshots.ts +27 -0
- package/src/api/payloads/design-systems/index.ts +3 -0
- package/src/api/payloads/design-systems/update-design-system.ts +42 -0
- package/src/api/payloads/design-systems/version.ts +29 -0
- package/src/api/payloads/documentation/analytics.ts +36 -0
- package/src/api/payloads/documentation/block-definitions.ts +18 -0
- package/src/api/payloads/documentation/design-data-doc-diff.ts +7 -0
- package/src/api/payloads/documentation/index.ts +3 -0
- package/src/api/payloads/export/index.ts +1 -0
- package/src/api/payloads/export/pipeline.ts +111 -0
- package/src/api/payloads/index.ts +6 -0
- package/src/api/payloads/liveblocks/auth.ts +7 -0
- package/src/api/payloads/liveblocks/index.ts +1 -0
- package/src/api/payloads/users/index.ts +1 -0
- package/src/api/payloads/users/notifications/index.ts +1 -0
- package/src/api/payloads/users/notifications/notification-settings.ts +17 -0
- package/src/api/payloads/workspaces/index.ts +2 -0
- package/src/api/payloads/workspaces/workspace-configuration.ts +62 -0
- package/src/api/payloads/workspaces/workspace-integrations.ts +35 -0
- package/src/api/transport/index.ts +2 -0
- package/src/api/transport/request-executor-error.ts +60 -0
- package/src/api/transport/request-executor.ts +94 -0
- package/src/events/design-system.ts +21 -0
- package/src/events/event.ts +6 -0
- package/src/events/index.ts +2 -0
- package/src/index.ts +5 -0
- package/src/sync/docs-local-action-executor.ts +412 -0
- package/src/sync/docs-structure-repo.ts +283 -0
- package/src/sync/index.ts +5 -0
- package/src/sync/project-content-repo.ts +215 -0
- package/src/sync/project-local-action-executor.ts +415 -0
- package/src/sync/types.ts +37 -0
- package/src/utils/figma.ts +72 -0
- package/src/utils/hash.ts +62 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/query.ts +41 -0
- package/src/utils/redirect-validation.ts +76 -0
- package/src/yjs/design-system-content/documentation-hierarchy.ts +35 -0
- package/src/yjs/design-system-content/index.ts +2 -0
- package/src/yjs/design-system-content/item-configuration.ts +62 -0
- package/src/yjs/docs-editor/blocks-to-prosemirror.ts +764 -0
- package/src/yjs/docs-editor/index.ts +7 -0
- package/src/yjs/docs-editor/list-tree-builder.ts +127 -0
- package/src/yjs/docs-editor/mock.ts +2271 -0
- package/src/yjs/docs-editor/model/block.ts +8 -0
- package/src/yjs/docs-editor/model/index.ts +2 -0
- package/src/yjs/docs-editor/model/page.ts +8 -0
- package/src/yjs/docs-editor/prosemirror/index.ts +3 -0
- package/src/yjs/docs-editor/prosemirror/inner-editor-schema.ts +145 -0
- package/src/yjs/docs-editor/prosemirror/main-editor-schema.ts +577 -0
- package/src/yjs/docs-editor/prosemirror/types.ts +19 -0
- package/src/yjs/docs-editor/prosemirror-to-blocks.ts +986 -0
- package/src/yjs/docs-editor/utils.ts +115 -0
- package/src/yjs/feature-room/backend.ts +36 -0
- package/src/yjs/feature-room/base.ts +109 -0
- package/src/yjs/feature-room/frontend.ts +53 -0
- package/src/yjs/feature-room/index.ts +3 -0
- package/src/yjs/forge-project-room/backend.ts +59 -0
- package/src/yjs/forge-project-room/base.ts +190 -0
- package/src/yjs/forge-project-room/index.ts +2 -0
- package/src/yjs/index.ts +7 -0
- package/src/yjs/thread-room/backend.ts +32 -0
- package/src/yjs/thread-room/base.ts +71 -0
- package/src/yjs/thread-room/frontend.ts +39 -0
- package/src/yjs/thread-room/index.ts +3 -0
- package/src/yjs/utils/index.ts +1 -0
- package/src/yjs/utils/key-value-storage.ts +57 -0
- package/src/yjs/version-room/backend.ts +101 -0
- package/src/yjs/version-room/base.ts +323 -0
- package/src/yjs/version-room/compute-dto.ts +387 -0
- package/src/yjs/version-room/frontend.ts +76 -0
- package/src/yjs/version-room/index.ts +6 -0
- package/src/yjs/version-room/types.ts +31 -0
- package/src/yjs/version-room/utils.ts +109 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { ForgeProjectInvitation } from "@supernova-studio/model";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
// Updated DTOs to match the database model
|
|
5
|
+
export const DTOForgeProjectInvitation = ForgeProjectInvitation;
|
|
6
|
+
|
|
7
|
+
export const DTOCreateForgeProjectInvitation = DTOForgeProjectInvitation.pick({
|
|
8
|
+
email: true,
|
|
9
|
+
role: true,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
export const DTOUpdateForgeProjectInvitation = DTOCreateForgeProjectInvitation;
|
|
13
|
+
|
|
14
|
+
export const DTORemoveForgeProjectInvitation = DTOCreateForgeProjectInvitation.pick({
|
|
15
|
+
email: true,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const DTOForgeProjectInvitationsListResponse = z.object({
|
|
19
|
+
invitations: z.array(DTOForgeProjectInvitation),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export const DTOForgeProjectInvitationGetResponse = z.object({
|
|
23
|
+
invitation: DTOForgeProjectInvitation,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export const DTOForgeProjectInvitationCreateResponse = z.object({
|
|
27
|
+
invitation: DTOForgeProjectInvitation,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export const DTOForgeProjectInvitationUpdateResponse = z.object({
|
|
31
|
+
invitation: DTOForgeProjectInvitation.nullable(),
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export const DTOForgeProjectInvitationRemoveResponse = z.object({
|
|
35
|
+
ok: z.literal(true),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export type DTOForgeProjectInvitation = z.infer<typeof DTOForgeProjectInvitation>;
|
|
39
|
+
export type DTOCreateForgeProjectInvitation = z.infer<typeof DTOCreateForgeProjectInvitation>;
|
|
40
|
+
export type DTOUpdateForgeProjectInvitation = z.infer<typeof DTOUpdateForgeProjectInvitation>;
|
|
41
|
+
export type DTORemoveForgeProjectInvitation = z.infer<typeof DTORemoveForgeProjectInvitation>;
|
|
42
|
+
export type DTOForgeProjectInvitationsListResponse = z.infer<typeof DTOForgeProjectInvitationsListResponse>;
|
|
43
|
+
export type DTOForgeProjectInvitationGetResponse = z.infer<typeof DTOForgeProjectInvitationGetResponse>;
|
|
44
|
+
export type DTOForgeProjectInvitationCreateResponse = z.infer<typeof DTOForgeProjectInvitationCreateResponse>;
|
|
45
|
+
export type DTOForgeProjectInvitationUpdateResponse = z.infer<typeof DTOForgeProjectInvitationUpdateResponse>;
|
|
46
|
+
export type DTOForgeProjectInvitationRemoveResponse = z.infer<typeof DTOForgeProjectInvitationRemoveResponse>;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ForgeProjectIteration, ForgeProjectIterationMergeMeta } from "@supernova-studio/model";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { DTOForgeArtifact } from "./artifact";
|
|
4
|
+
import { DTOForgeIterationMessage } from "./iteration-message-old";
|
|
5
|
+
|
|
6
|
+
export const DTOForgeProjectIterationMergeMeta = ForgeProjectIterationMergeMeta;
|
|
7
|
+
|
|
8
|
+
export const DTOForgeProjectIteration = ForgeProjectIteration.omit({
|
|
9
|
+
artifacts: true,
|
|
10
|
+
messages: true,
|
|
11
|
+
mergeMeta: true,
|
|
12
|
+
}).extend({
|
|
13
|
+
artifacts: DTOForgeArtifact.array(),
|
|
14
|
+
messages: DTOForgeIterationMessage.array(),
|
|
15
|
+
mergeMeta: DTOForgeProjectIterationMergeMeta.optional(),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
export const DTOGetForgeProjectIterationResponse = z.object({
|
|
19
|
+
iteration: DTOForgeProjectIteration.nullable(),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export const DTOCreateForgeProjectIteration = DTOForgeProjectIteration.omit({
|
|
23
|
+
forgeProjectId: true,
|
|
24
|
+
artifacts: true,
|
|
25
|
+
messages: true,
|
|
26
|
+
mergeMeta: true,
|
|
27
|
+
createdAt: true,
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export const DTOUpdateForgeProjectIteration = DTOCreateForgeProjectIteration.extend({ id: z.string() });
|
|
31
|
+
|
|
32
|
+
export const DTOCreateForgeProjectIterationResponse = z.object({
|
|
33
|
+
iteration: DTOForgeProjectIteration,
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export const DTOUpdateForgeProjectIterationResponse = z.object({
|
|
37
|
+
iteration: DTOForgeProjectIteration.nullable(),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export const DTODeleteForgeProjectIterationResponse = z.object({
|
|
41
|
+
ok: z.literal(true),
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export const DTOForgeProjectIterationListResponse = z.object({ iterations: z.array(DTOForgeProjectIteration) });
|
|
45
|
+
|
|
46
|
+
export type DTOForgeProjectIterationMergeMeta = z.infer<typeof DTOForgeProjectIterationMergeMeta>;
|
|
47
|
+
export type DTOForgeProjectIteration = z.infer<typeof DTOForgeProjectIteration>;
|
|
48
|
+
export type DTOForgeProjectIterationListResponse = z.infer<typeof DTOForgeProjectIterationListResponse>;
|
|
49
|
+
export type DTOGetForgeProjectIterationResponse = z.infer<typeof DTOGetForgeProjectIterationResponse>;
|
|
50
|
+
export type DTOCreateForgeProjectIteration = z.infer<typeof DTOCreateForgeProjectIteration>;
|
|
51
|
+
export type DTOUpdateForgeProjectIteration = z.infer<typeof DTOUpdateForgeProjectIteration>;
|
|
52
|
+
export type DTOCreateForgeProjectIterationResponse = z.infer<typeof DTOCreateForgeProjectIterationResponse>;
|
|
53
|
+
export type DTOUpdateForgeProjectIterationResponse = z.infer<typeof DTOUpdateForgeProjectIterationResponse>;
|
|
54
|
+
export type DTODeleteForgeProjectIterationResponse = z.infer<typeof DTODeleteForgeProjectIterationResponse>;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { ForgeProjectMembership, ForgeProjectRole } from "@supernova-studio/model";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { zodQueryBoolean } from "../../../utils";
|
|
4
|
+
import { DTOUser } from "../users";
|
|
5
|
+
import { DTOCreateForgeProjectInvitation, DTOForgeProjectInvitation } from "./project-invitation";
|
|
6
|
+
|
|
7
|
+
export const DTOForgeProjectMemberRole = ForgeProjectRole;
|
|
8
|
+
|
|
9
|
+
export const DTOForgeProjectMember = ForgeProjectMembership.extend({
|
|
10
|
+
user: DTOUser,
|
|
11
|
+
effectiveRole: DTOForgeProjectMemberRole,
|
|
12
|
+
isDeactivated: z.boolean(),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const DTOCreateForgeProjectMember = DTOForgeProjectMember.pick({
|
|
16
|
+
userId: true,
|
|
17
|
+
role: true,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const DTOUpdateForgeProjectMember = DTOCreateForgeProjectMember;
|
|
21
|
+
|
|
22
|
+
export const DTORemoveForgeProjectMember = DTOForgeProjectMember.pick({
|
|
23
|
+
userId: true,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export const DTOForgeProjectMemberListQuery = z.object({
|
|
27
|
+
includeImplicitMembers: zodQueryBoolean().optional(),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export const DTOForgeProjectMembersListResponse = z.object({
|
|
31
|
+
members: z.array(DTOForgeProjectMember),
|
|
32
|
+
invitations: z.array(DTOForgeProjectInvitation),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export const DTOForgeProjectMemberGetResponse = z.object({
|
|
36
|
+
member: DTOForgeProjectMember,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export const DTOForgeProjectMemberCreateResponse = z.object({
|
|
40
|
+
member: DTOForgeProjectMember,
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
export const DTOForgeProjectMemberUpdateResponse = z.object({
|
|
44
|
+
member: DTOForgeProjectMember.nullable(),
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export const DTOForgeProjectMemberRemoveResponse = z.object({
|
|
48
|
+
ok: z.literal(true),
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
export const DTOAddMembersToForgeProject = z.object({
|
|
52
|
+
membersToInvite: DTOCreateForgeProjectInvitation.array().min(1),
|
|
53
|
+
featureId: z.string().optional(),
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
export type DTOForgeProjectMemberRole = z.infer<typeof DTOForgeProjectMemberRole>;
|
|
57
|
+
export type DTOForgeProjectMember = z.infer<typeof DTOForgeProjectMember>;
|
|
58
|
+
export type DTOCreateForgeProjectMember = z.infer<typeof DTOCreateForgeProjectMember>;
|
|
59
|
+
export type DTOUpdateForgeProjectMember = z.infer<typeof DTOUpdateForgeProjectMember>;
|
|
60
|
+
export type DTORemoveForgeProjectMember = z.infer<typeof DTORemoveForgeProjectMember>;
|
|
61
|
+
export type DTOForgeProjectMemberListQuery = z.infer<typeof DTOForgeProjectMemberListQuery>;
|
|
62
|
+
export type DTOForgeProjectMembersListResponse = z.infer<typeof DTOForgeProjectMembersListResponse>;
|
|
63
|
+
export type DTOForgeProjectMemberGetResponse = z.infer<typeof DTOForgeProjectMemberGetResponse>;
|
|
64
|
+
export type DTOForgeProjectMemberCreateResponse = z.infer<typeof DTOForgeProjectMemberCreateResponse>;
|
|
65
|
+
export type DTOForgeProjectMemberUpdateResponse = z.infer<typeof DTOForgeProjectMemberUpdateResponse>;
|
|
66
|
+
export type DTOForgeProjectMemberRemoveResponse = z.infer<typeof DTOForgeProjectMemberRemoveResponse>;
|
|
67
|
+
export type DTOAddMembersToForgeProject = z.infer<typeof DTOAddMembersToForgeProject>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
export const DTOForgeProjectRoom = z.object({
|
|
4
|
+
id: z.string(),
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
export const DTOForgeProjectRoomResponse = z.object({
|
|
8
|
+
room: DTOForgeProjectRoom,
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
export type DTOForgeProjectRoom = z.infer<typeof DTOForgeProjectRoom>;
|
|
12
|
+
export type DTOForgeProjectRoomResponse = z.infer<typeof DTOForgeProjectRoomResponse>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ForgeSection, Id } from "@supernova-studio/model";
|
|
2
|
+
import z from "zod";
|
|
3
|
+
|
|
4
|
+
const AfterSectionId = z.string().uuid().nullish().optional();
|
|
5
|
+
|
|
6
|
+
export const DTOForgeSection = ForgeSection;
|
|
7
|
+
|
|
8
|
+
export const DTOForgeSectionCreateInput = DTOForgeSection.pick({
|
|
9
|
+
id: true,
|
|
10
|
+
name: true,
|
|
11
|
+
childType: true,
|
|
12
|
+
}).extend({
|
|
13
|
+
afterSectionId: AfterSectionId,
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const DTOForgeSectionUpdateInput = DTOForgeSection.pick({ id: true, name: true });
|
|
17
|
+
|
|
18
|
+
export const DTOForgeSectionDeleteInput = DTOForgeSection.pick({ id: true }).extend({
|
|
19
|
+
deleteChildren: z.boolean().default(false),
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
export const DTOForgeSectionMoveInput = DTOForgeSection.pick({ id: true }).extend({
|
|
23
|
+
afterSectionId: AfterSectionId,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
export const DTOForgeSectionItemMoveInput = z.object({
|
|
27
|
+
id: Id,
|
|
28
|
+
sectionId: Id.nullish().optional(), // undefined=stay, null=no section, string=move to section
|
|
29
|
+
afterId: Id.nullish().optional(), // undefined=end, null=beginning, string=after artifact
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
export type DTOForgeSection = z.infer<typeof DTOForgeSection>;
|
|
33
|
+
export type DTOForgeSectionCreateInput = z.infer<typeof DTOForgeSectionCreateInput>;
|
|
34
|
+
export type DTOForgeSectionUpdateInput = z.infer<typeof DTOForgeSectionUpdateInput>;
|
|
35
|
+
export type DTOForgeSectionDeleteInput = z.infer<typeof DTOForgeSectionDeleteInput>;
|
|
36
|
+
export type DTOForgeSectionMoveInput = z.infer<typeof DTOForgeSectionMoveInput>;
|
|
37
|
+
export type DTOForgeSectionItemMoveInput = z.infer<typeof DTOForgeSectionItemMoveInput>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { ForgeDefaultProjectRole, ForgeProjectAccessMode, ForgeProjectRole } from "@supernova-studio/model";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
import { DTOFileReference } from "../files";
|
|
4
|
+
import { DTOForgeProjectArtifactCreateInput } from "./project-artifact";
|
|
5
|
+
import { DTOForgeProjectFeatureCreateInput } from "./project-feature";
|
|
6
|
+
import { DTOCreateForgeProjectInvitation } from "./project-invitation";
|
|
7
|
+
|
|
8
|
+
export const DTOForgeProjectRole = ForgeProjectRole;
|
|
9
|
+
export const DTOForgeProjectAccessMode = ForgeProjectAccessMode;
|
|
10
|
+
export const DTOForgeProjectDefaultRole = ForgeDefaultProjectRole;
|
|
11
|
+
|
|
12
|
+
export const DTOForgeProjectDocumentPreview = z.object({
|
|
13
|
+
id: z.string(),
|
|
14
|
+
title: z.string(),
|
|
15
|
+
thumbnail: DTOFileReference.optional(),
|
|
16
|
+
createdAt: z.string(),
|
|
17
|
+
updatedAt: z.string(),
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
export const DTOForgeProjectFeaturePreview = z.object({
|
|
21
|
+
id: z.string(),
|
|
22
|
+
name: z.string(),
|
|
23
|
+
thumbnail: DTOFileReference.optional(),
|
|
24
|
+
isPublished: z.boolean().optional(),
|
|
25
|
+
isArchived: z.boolean().optional(),
|
|
26
|
+
createdAt: z.string(),
|
|
27
|
+
updatedAt: z.string(),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export const DTOForgeProject = z.object({
|
|
31
|
+
id: z.string(),
|
|
32
|
+
|
|
33
|
+
workspaceId: z.string(),
|
|
34
|
+
projectContextId: z.string(),
|
|
35
|
+
|
|
36
|
+
name: z.string(),
|
|
37
|
+
description: z.string().optional(),
|
|
38
|
+
instruction: z.string().nullable(),
|
|
39
|
+
tags: z.array(z.string()).default([]),
|
|
40
|
+
|
|
41
|
+
accessMode: DTOForgeProjectAccessMode,
|
|
42
|
+
defaultRole: DTOForgeProjectDefaultRole,
|
|
43
|
+
|
|
44
|
+
isArchived: z.boolean(),
|
|
45
|
+
emoji: z.string().optional(),
|
|
46
|
+
tokenThemeSetId: z.string().optional(),
|
|
47
|
+
|
|
48
|
+
createdAt: z.coerce.date(),
|
|
49
|
+
createdByUserId: z.string().optional(),
|
|
50
|
+
lastUserActivityAt: z.coerce.date().optional(),
|
|
51
|
+
updatedAt: z.coerce.date(),
|
|
52
|
+
|
|
53
|
+
documents: DTOForgeProjectDocumentPreview.array(),
|
|
54
|
+
features: DTOForgeProjectFeaturePreview.array(),
|
|
55
|
+
|
|
56
|
+
liveblocksRoomId: z.string().optional(),
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export const DTOForgeProjectCreate = DTOForgeProject.pick({
|
|
60
|
+
name: true,
|
|
61
|
+
description: true,
|
|
62
|
+
instruction: true,
|
|
63
|
+
tags: true,
|
|
64
|
+
emoji: true,
|
|
65
|
+
tokenThemeSetId: true,
|
|
66
|
+
}).extend({
|
|
67
|
+
projectContextId: z.string().optional(),
|
|
68
|
+
|
|
69
|
+
membersToInvite: DTOCreateForgeProjectInvitation.array().min(1).optional(),
|
|
70
|
+
initialFeature: DTOForgeProjectFeatureCreateInput.optional(),
|
|
71
|
+
initialArtifact: DTOForgeProjectArtifactCreateInput.optional(),
|
|
72
|
+
|
|
73
|
+
accessMode: DTOForgeProjectAccessMode.optional(),
|
|
74
|
+
defaultRole: DTOForgeProjectDefaultRole.optional(),
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
export const DTOForgeProjectUpdate = DTOForgeProjectCreate.omit({ membersToInvite: true }).partial().extend({
|
|
78
|
+
id: z.string(),
|
|
79
|
+
isArchived: z.boolean().optional(),
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export const DTOForgeProjectListResponse = z.object({
|
|
83
|
+
projects: z.array(
|
|
84
|
+
DTOForgeProject.extend({
|
|
85
|
+
effectiveRole: DTOForgeProjectRole,
|
|
86
|
+
})
|
|
87
|
+
),
|
|
88
|
+
});
|
|
89
|
+
export const DTOForgeProjectResponse = z.object({
|
|
90
|
+
project: DTOForgeProject.extend({
|
|
91
|
+
effectiveRole: DTOForgeProjectRole,
|
|
92
|
+
}),
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
export type DTOForgeProjectRole = z.infer<typeof DTOForgeProjectRole>;
|
|
96
|
+
export type DTOForgeProjectAccessMode = z.infer<typeof DTOForgeProjectAccessMode>;
|
|
97
|
+
export type DTOForgeProjectDefaultRole = z.infer<typeof DTOForgeProjectDefaultRole>;
|
|
98
|
+
|
|
99
|
+
export type DTOForgeProjectDocumentPreview = z.infer<typeof DTOForgeProjectDocumentPreview>;
|
|
100
|
+
export type DTOForgeProjectFeaturePreview = z.infer<typeof DTOForgeProjectFeaturePreview>;
|
|
101
|
+
export type DTOForgeProject = z.infer<typeof DTOForgeProject>;
|
|
102
|
+
export type DTOForgeProjectCreate = z.infer<typeof DTOForgeProjectCreate>;
|
|
103
|
+
export type DTOForgeProjectUpdate = z.infer<typeof DTOForgeProjectUpdate>;
|
|
104
|
+
export type DTOForgeProjectResponse = z.infer<typeof DTOForgeProjectResponse>;
|
|
105
|
+
export type DTOForgeProjectListResponse = z.infer<typeof DTOForgeProjectListResponse>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ForgeRelation, ForgeRelationType } from "@supernova-studio/model";
|
|
2
|
+
import z from "zod";
|
|
3
|
+
|
|
4
|
+
export const DTOForgeRelationType = ForgeRelationType;
|
|
5
|
+
|
|
6
|
+
export const DTOForgeRelation = ForgeRelation;
|
|
7
|
+
|
|
8
|
+
export const DTOForgeRelationCreate = DTOForgeRelation.omit({ id: true, createdAt: true });
|
|
9
|
+
|
|
10
|
+
export const DTOForgeRelationDelete = z.object({
|
|
11
|
+
sourceItemId: z.string().uuid(),
|
|
12
|
+
targetItemId: z.string().uuid(),
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export const DTOForgeRelationListInput = z.object({
|
|
16
|
+
projectId: z.string(),
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
export const DTOForgeRelationListResponse = z.object({
|
|
20
|
+
relations: z.array(DTOForgeRelation),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
export const DTOForgeEntity = z.object({
|
|
24
|
+
id: z.string().uuid(),
|
|
25
|
+
type: DTOForgeRelationType,
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export type DTOForgeRelationType = z.infer<typeof DTOForgeRelationType>;
|
|
29
|
+
export type DTOForgeRelation = z.infer<typeof DTOForgeRelation>;
|
|
30
|
+
export type DTOForgeRelationCreate = z.infer<typeof DTOForgeRelationCreate>;
|
|
31
|
+
export type DTOForgeRelationDelete = z.infer<typeof DTOForgeRelationDelete>;
|
|
32
|
+
export type DTOForgeRelationListInput = z.infer<typeof DTOForgeRelationListInput>;
|
|
33
|
+
export type DTOForgeRelationListResponse = z.infer<typeof DTOForgeRelationListResponse>;
|
|
34
|
+
export type DTOForgeEntity = z.infer<typeof DTOForgeEntity>;
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ForgeChatMessage,
|
|
3
|
+
ForgeChatMessageSender,
|
|
4
|
+
ForgeChatMessageSenderType,
|
|
5
|
+
ForgeChatThread,
|
|
6
|
+
} from "@supernova-studio/model";
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
|
|
9
|
+
export const DTOForgeChatMessage = ForgeChatMessage;
|
|
10
|
+
export type DTOForgeChatMessage = z.infer<typeof DTOForgeChatMessage>;
|
|
11
|
+
|
|
12
|
+
export const DTOForgeChatThread = ForgeChatThread;
|
|
13
|
+
export type DTOForgeChatThread = z.infer<typeof DTOForgeChatThread>;
|
|
14
|
+
|
|
15
|
+
export const DTOForgeChatMessageSenderType = ForgeChatMessageSenderType;
|
|
16
|
+
export type DTOForgeChatMessageSenderType = z.infer<typeof DTOForgeChatMessageSenderType>;
|
|
17
|
+
|
|
18
|
+
export const DTOForgeChatMessageSender = ForgeChatMessageSender;
|
|
19
|
+
export type DTOForgeChatMessageSender = z.infer<typeof DTOForgeChatMessageSender>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* POST /api/v1/workspaces/{wsId}/forge/chat-threads
|
|
23
|
+
*/
|
|
24
|
+
export const DTOForgeChatThreadCreateInput = z.object({
|
|
25
|
+
title: z.string().optional(),
|
|
26
|
+
});
|
|
27
|
+
export type DTOForgeChatThreadCreateInput = z.infer<typeof DTOForgeChatThreadCreateInput>;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* POST /api/v1/workspaces/{wsId}/forge/threads
|
|
31
|
+
*/
|
|
32
|
+
export const DTOForgeChatThreadCreateResponse = z.object({
|
|
33
|
+
thread: DTOForgeChatThread,
|
|
34
|
+
});
|
|
35
|
+
export type DTOForgeChatThreadCreateResponse = z.infer<typeof DTOForgeChatThreadCreateResponse>;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* PUT /api/v1/workspaces/{wsId}/forge/threads/{threadId}
|
|
39
|
+
*/
|
|
40
|
+
export const DTOForgeChatThreadUpdateInput = z.object({
|
|
41
|
+
title: z.string(),
|
|
42
|
+
});
|
|
43
|
+
export type DTOForgeChatThreadUpdateInput = z.infer<typeof DTOForgeChatThreadUpdateInput>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* PUT /api/v1/workspaces/{wsId}/forge/threads/{threadId}
|
|
47
|
+
*/
|
|
48
|
+
export const DTOForgeChatThreadUpdateResponse = z.object({
|
|
49
|
+
thread: DTOForgeChatThread,
|
|
50
|
+
});
|
|
51
|
+
export type DTOForgeChatThreadUpdateResponse = z.infer<typeof DTOForgeChatThreadUpdateResponse>;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* DELETE /api/v1/workspaces/{wsId}/forge/threads/{threadId}
|
|
55
|
+
*/
|
|
56
|
+
export const DTOForgeChatThreadDeleteResponse = z.object({
|
|
57
|
+
success: z.boolean(),
|
|
58
|
+
});
|
|
59
|
+
export type DTOForgeChatThreadDeleteResponse = z.infer<typeof DTOForgeChatThreadDeleteResponse>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* GET /api/v1/workspaces/{wsId}/forge/threads
|
|
63
|
+
*/
|
|
64
|
+
export const DTOForgeChatThreadListQuery = z.object({
|
|
65
|
+
limit: z.number().optional(),
|
|
66
|
+
offset: z.number().optional(),
|
|
67
|
+
});
|
|
68
|
+
export type DTOForgeChatThreadListQuery = z.infer<typeof DTOForgeChatThreadListQuery>;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* GET /api/v1/workspaces/{wsId}/forge/threads
|
|
72
|
+
*/
|
|
73
|
+
export const DTOForgeChatThreadListResponse = z.object({
|
|
74
|
+
threads: z.array(DTOForgeChatThread),
|
|
75
|
+
pagination: z.object({
|
|
76
|
+
offset: z.number(),
|
|
77
|
+
limit: z.number(),
|
|
78
|
+
total: z.number(),
|
|
79
|
+
}),
|
|
80
|
+
});
|
|
81
|
+
export type DTOForgeChatThreadListResponse = z.infer<typeof DTOForgeChatThreadListResponse>;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* POST /api/v1/workspaces/{wsId}/forge/threads/{threadId}/messages
|
|
85
|
+
*/
|
|
86
|
+
export const DTOForgeChatMessageCreateInput = z.object({
|
|
87
|
+
payload: z.string(),
|
|
88
|
+
sender: DTOForgeChatMessageSender.optional(),
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
export type DTOForgeChatMessageCreateInput = z.infer<typeof DTOForgeChatMessageCreateInput>;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* POST /api/v1/workspaces/{wsId}/forge/threads/{threadId}/messages
|
|
95
|
+
*/
|
|
96
|
+
export const DTOForgeChatMessageCreateResponse = z.object({
|
|
97
|
+
message: DTOForgeChatMessage,
|
|
98
|
+
});
|
|
99
|
+
export type DTOForgeChatMessageCreateResponse = z.infer<typeof DTOForgeChatMessageCreateResponse>;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* GET /api/v1/workspaces/{wsId}/forge/threads/{threadId}/messages
|
|
103
|
+
*/
|
|
104
|
+
export const DTOForgeChatMessageListQuery = z.object({
|
|
105
|
+
limit: z
|
|
106
|
+
.string()
|
|
107
|
+
.optional()
|
|
108
|
+
.transform(val => (val ? parseInt(val, 10) : undefined)),
|
|
109
|
+
offset: z
|
|
110
|
+
.string()
|
|
111
|
+
.optional()
|
|
112
|
+
.transform(val => (val ? parseInt(val, 10) : undefined)),
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
export type DTOForgeChatMessageListQuery = z.infer<typeof DTOForgeChatMessageListQuery>;
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* GET /api/v1/workspaces/{wsId}/forge/threads/{threadId}/messages
|
|
119
|
+
*/
|
|
120
|
+
export const DTOForgeChatMessageListResponse = z.object({
|
|
121
|
+
messages: z.array(DTOForgeChatMessage),
|
|
122
|
+
totalCount: z.number(),
|
|
123
|
+
hasMore: z.boolean(),
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
export type DTOForgeChatMessageListResponse = z.infer<typeof DTOForgeChatMessageListResponse>;
|
|
127
|
+
|
|
128
|
+
export const DTOForgeChatExportResponse = z.object({
|
|
129
|
+
csvDownloadUrl: z.string().nullable(),
|
|
130
|
+
});
|
|
131
|
+
export type DTOForgeChatExportResponse = z.infer<typeof DTOForgeChatExportResponse>;
|
|
132
|
+
|
|
133
|
+
export const DTOForgeChatMessageScoreInput = z.object({
|
|
134
|
+
messageId: z.string(),
|
|
135
|
+
name: z.string(),
|
|
136
|
+
value: z.number(),
|
|
137
|
+
categoryName: z.string().optional(),
|
|
138
|
+
reason: z.string().optional(),
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
export const DTOForgeChatMessageTagInput = z.object({
|
|
142
|
+
messageId: z.string(),
|
|
143
|
+
tags: z.array(z.string()),
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
export const DTOForgeChatMessageScoreRequest = z.object({
|
|
147
|
+
scores: DTOForgeChatMessageScoreInput.array(),
|
|
148
|
+
tags: DTOForgeChatMessageTagInput.array().optional().default([]),
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
export type DTOForgeChatMessageScoreInput = z.infer<typeof DTOForgeChatMessageScoreInput>;
|
|
152
|
+
export type DTOForgeChatMessageTagInput = z.infer<typeof DTOForgeChatMessageTagInput>;
|
|
153
|
+
export type DTOForgeChatMessageScoreRequest = z.infer<typeof DTOForgeChatMessageScoreRequest>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export * from "./access-tokens";
|
|
2
|
+
export * from "./aux";
|
|
3
|
+
export * from "./bff";
|
|
4
|
+
export * from "./collections";
|
|
5
|
+
export * from "./design-systems";
|
|
6
|
+
export * from "./design-tokens";
|
|
7
|
+
export * from "./documentation";
|
|
8
|
+
export * from "./elements";
|
|
9
|
+
export * from "./events";
|
|
10
|
+
export * from "./export";
|
|
11
|
+
export * from "./figma-components";
|
|
12
|
+
export * from "./figma-exporter";
|
|
13
|
+
export * from "./files";
|
|
14
|
+
export * from "./forge";
|
|
15
|
+
export * from "./liveblocks";
|
|
16
|
+
export * from "./mcp";
|
|
17
|
+
export * from "./notifications";
|
|
18
|
+
export * from "./portal";
|
|
19
|
+
export * from "./sandboxes";
|
|
20
|
+
export * from "./storybook-sites";
|
|
21
|
+
export * from "./themes";
|
|
22
|
+
export * from "./threads";
|
|
23
|
+
export * from "./trail-events";
|
|
24
|
+
export * from "./users";
|
|
25
|
+
export * from "./workspaces";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./auth-response";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./stream";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
|
|
3
|
+
export const DTOMCPStream = z.object({
|
|
4
|
+
id: z.string().uuid(),
|
|
5
|
+
projectFeatureId: z.string().uuid().optional(),
|
|
6
|
+
projectDocumentId: z.string().uuid().optional(),
|
|
7
|
+
});
|
|
8
|
+
|
|
9
|
+
export const DTOMCPStreamUpdateInput = DTOMCPStream.omit({ id: true });
|
|
10
|
+
|
|
11
|
+
export const DTOMCPStreamResponse = z.object({
|
|
12
|
+
stream: DTOMCPStream,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type DTOMCPStream = z.infer<typeof DTOMCPStream>;
|
|
16
|
+
export type DTOMCPStreamUpdateInput = z.infer<typeof DTOMCPStreamUpdateInput>;
|
|
17
|
+
export type DTOMCPStreamResponse = z.infer<typeof DTOMCPStreamResponse>;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { DTONotificationType } from "./settings";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
export const DTONotificationChatMentionPayload = z.object({
|
|
5
|
+
messageAuthorId: z.string(),
|
|
6
|
+
messageText: z.string(),
|
|
7
|
+
messageId: z.string(),
|
|
8
|
+
parentMessageId: z.string().optional(),
|
|
9
|
+
workspaceId: z.string(),
|
|
10
|
+
projectId: z.string(),
|
|
11
|
+
subjectType: z.string(),
|
|
12
|
+
threadSubjectId: z.string(),
|
|
13
|
+
subjectName: z.string(),
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
export const DTONotificationProjectInvitationPayload = z.object({
|
|
17
|
+
workspaceId: z.string(),
|
|
18
|
+
projectId: z.string(),
|
|
19
|
+
projectTitle: z.string(),
|
|
20
|
+
invitedByUserId: z.string(),
|
|
21
|
+
invitationRole: z.string(),
|
|
22
|
+
featureId: z.string().optional(),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export const DTONotificationProjectDocumentCommentPayload = z.object({
|
|
26
|
+
documentId: z.string(),
|
|
27
|
+
entityTitle: z.string(),
|
|
28
|
+
projectId: z.string(),
|
|
29
|
+
workspaceId: z.string(),
|
|
30
|
+
threadId: z.string(),
|
|
31
|
+
commentId: z.string(),
|
|
32
|
+
commentCreatedAt: z.string(),
|
|
33
|
+
commentAuthorId: z.string(),
|
|
34
|
+
commentBody: z.string(),
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
export const DTONotificationBase = z.object({
|
|
38
|
+
userId: z.string(),
|
|
39
|
+
subjectId: z.string(),
|
|
40
|
+
roomId: z.string().optional(),
|
|
41
|
+
workspaceId: z.string(),
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
export const DTONotificationCreateInput = z
|
|
45
|
+
.discriminatedUnion("type", [
|
|
46
|
+
z.object({
|
|
47
|
+
type: z.literal(DTONotificationType.enum.ChatMention),
|
|
48
|
+
activityData: DTONotificationChatMentionPayload,
|
|
49
|
+
}),
|
|
50
|
+
z.object({
|
|
51
|
+
type: z.literal(DTONotificationType.enum.ProjectInvitation),
|
|
52
|
+
activityData: DTONotificationProjectInvitationPayload,
|
|
53
|
+
}),
|
|
54
|
+
z.object({
|
|
55
|
+
type: z.literal(DTONotificationType.enum.ProjectDocumentComment),
|
|
56
|
+
activityData: DTONotificationProjectDocumentCommentPayload,
|
|
57
|
+
}),
|
|
58
|
+
])
|
|
59
|
+
.and(DTONotificationBase);
|
|
60
|
+
|
|
61
|
+
export type DTONotificationCreateInput = z.infer<typeof DTONotificationCreateInput>;
|
|
62
|
+
export type DTONotificationChatMentionPayload = z.infer<typeof DTONotificationChatMentionPayload>;
|
|
63
|
+
export type DTONotificationProjectInvitationPayload = z.infer<typeof DTONotificationProjectInvitationPayload>;
|
|
64
|
+
export type DTONotificationProjectDocumentCommentPayload = z.infer<typeof DTONotificationProjectDocumentCommentPayload>;
|
|
65
|
+
export type DTONotificationBase = z.infer<typeof DTONotificationBase>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UserNotificationSettings, NotificationType, NotificationChannel } from "@supernova-studio/model";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
|
|
4
|
+
export const DTOUserNotificationSettings = UserNotificationSettings;
|
|
5
|
+
export const DTONotificationType = NotificationType;
|
|
6
|
+
export const DTONotificationChannel = NotificationChannel;
|
|
7
|
+
|
|
8
|
+
export type DTOUserNotificationSettings = z.infer<typeof DTOUserNotificationSettings>;
|
|
9
|
+
export type DTONotificationType = z.infer<typeof DTONotificationType>;
|
|
10
|
+
export type DTONotificationChannel = z.infer<typeof DTONotificationChannel>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./portal-settings";
|