@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,39 @@
|
|
|
1
|
+
import { serializeQuery } from "../../../utils/query";
|
|
2
|
+
import {
|
|
3
|
+
DTOFeatureArtifactListQuery,
|
|
4
|
+
DTOFeatureArtifactListResponse,
|
|
5
|
+
DTOFeatureArtifactResponse,
|
|
6
|
+
DTOFeatureIterationResponse,
|
|
7
|
+
} from "../../dto";
|
|
8
|
+
import { RequestExecutor } from "../../transport";
|
|
9
|
+
|
|
10
|
+
export class ForgeFeatureArtifactsEndpoint {
|
|
11
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
12
|
+
|
|
13
|
+
list(workspaceId: string, projectId: string, featureId: string, query?: DTOFeatureArtifactListQuery) {
|
|
14
|
+
return this.requestExecutor.json(
|
|
15
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/features/${featureId}/artifacts`,
|
|
16
|
+
DTOFeatureArtifactListResponse,
|
|
17
|
+
{
|
|
18
|
+
method: "GET",
|
|
19
|
+
query: query ? serializeQuery(query) : undefined,
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
getLatestIterationArtifacts(featureId: string) {
|
|
25
|
+
return this.requestExecutor.json(
|
|
26
|
+
`/forge/features/${featureId}/latest-iteration-artifacts`,
|
|
27
|
+
DTOFeatureArtifactListResponse.merge(DTOFeatureIterationResponse),
|
|
28
|
+
{
|
|
29
|
+
method: "GET",
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
getById(artifactId: string) {
|
|
35
|
+
return this.requestExecutor.json(`/forge/feature-artifacts/${artifactId}`, DTOFeatureArtifactResponse, {
|
|
36
|
+
method: "GET",
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DTOFeatureIterationListResponse,
|
|
3
|
+
DTOFeatureIterationResponse,
|
|
4
|
+
DTOFeatureIterationUpdateArtifactsInput,
|
|
5
|
+
DTOFeatureIterationValidateInput,
|
|
6
|
+
DTOFeatureIterationValidateResponse,
|
|
7
|
+
} from "../../dto";
|
|
8
|
+
import { RequestExecutor } from "../../transport";
|
|
9
|
+
|
|
10
|
+
export class ForgeFeatureIterationsEndpoint {
|
|
11
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
12
|
+
|
|
13
|
+
list(workspaceId: string, projectId: string, featureId: string) {
|
|
14
|
+
return this.requestExecutor.json(
|
|
15
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/features/${featureId}/iterations`,
|
|
16
|
+
DTOFeatureIterationListResponse,
|
|
17
|
+
{
|
|
18
|
+
method: "GET",
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
updateArtifacts(
|
|
24
|
+
workspaceId: string,
|
|
25
|
+
projectId: string,
|
|
26
|
+
featureId: string,
|
|
27
|
+
body: DTOFeatureIterationUpdateArtifactsInput
|
|
28
|
+
) {
|
|
29
|
+
return this.requestExecutor.json(
|
|
30
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/features/${featureId}/iterations/update-artifacts`,
|
|
31
|
+
DTOFeatureIterationResponse,
|
|
32
|
+
{
|
|
33
|
+
body,
|
|
34
|
+
method: "POST",
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
validateIteration(workspaceId: string, projectId: string, featureId: string, body: DTOFeatureIterationValidateInput) {
|
|
40
|
+
return this.requestExecutor.json(
|
|
41
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/features/${featureId}/iterations/validate-iteration`,
|
|
42
|
+
DTOFeatureIterationValidateResponse,
|
|
43
|
+
{
|
|
44
|
+
body,
|
|
45
|
+
method: "POST",
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DTOFeatureMessageCreateInput,
|
|
3
|
+
DTOFeatureMessageListResponse,
|
|
4
|
+
DTOFeatureMessageReactionCreateInput,
|
|
5
|
+
DTOFeatureMessageReactionDeleteInput,
|
|
6
|
+
DTOFeatureMessageReactionResponse,
|
|
7
|
+
DTOFeatureMessageResponse,
|
|
8
|
+
} from "../../dto";
|
|
9
|
+
import { RequestExecutor } from "../../transport";
|
|
10
|
+
|
|
11
|
+
export class ForgeFeatureMessagesEndpoint {
|
|
12
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
13
|
+
|
|
14
|
+
// Messages endpoints
|
|
15
|
+
list(workspaceId: string, projectId: string, featureId: string) {
|
|
16
|
+
return this.requestExecutor.json(
|
|
17
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/features/${featureId}/messages`,
|
|
18
|
+
DTOFeatureMessageListResponse,
|
|
19
|
+
{
|
|
20
|
+
method: "GET",
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
create(workspaceId: string, projectId: string, featureId: string, body: DTOFeatureMessageCreateInput) {
|
|
26
|
+
return this.requestExecutor.json(
|
|
27
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/features/${featureId}/messages`,
|
|
28
|
+
DTOFeatureMessageResponse,
|
|
29
|
+
{
|
|
30
|
+
method: "POST",
|
|
31
|
+
body,
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// Reactions endpoints
|
|
37
|
+
createReaction(
|
|
38
|
+
workspaceId: string,
|
|
39
|
+
projectId: string,
|
|
40
|
+
featureId: string,
|
|
41
|
+
body: DTOFeatureMessageReactionCreateInput
|
|
42
|
+
) {
|
|
43
|
+
return this.requestExecutor.json(
|
|
44
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/features/${featureId}/reactions`,
|
|
45
|
+
DTOFeatureMessageReactionResponse,
|
|
46
|
+
{
|
|
47
|
+
method: "POST",
|
|
48
|
+
body,
|
|
49
|
+
}
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
deleteReaction(
|
|
54
|
+
workspaceId: string,
|
|
55
|
+
projectId: string,
|
|
56
|
+
featureId: string,
|
|
57
|
+
body: DTOFeatureMessageReactionDeleteInput
|
|
58
|
+
) {
|
|
59
|
+
return this.requestExecutor.json(
|
|
60
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/features/${featureId}/reactions`,
|
|
61
|
+
DTOFeatureMessageReactionResponse,
|
|
62
|
+
{
|
|
63
|
+
method: "DELETE",
|
|
64
|
+
body,
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DTOFeatureAgentWorkFinalizeInput,
|
|
3
|
+
DTOFeatureIterationResponse,
|
|
4
|
+
DTOForgeProjectFeatureGetResponse,
|
|
5
|
+
DTOForgeProjectFeatureListResponse,
|
|
6
|
+
} from "../../dto";
|
|
7
|
+
import { RequestExecutor } from "../../transport";
|
|
8
|
+
import { ForgeFeatureArtifactsEndpoint } from "./feature-artifacts";
|
|
9
|
+
import { ForgeFeatureIterationsEndpoint } from "./feature-iterations";
|
|
10
|
+
import { ForgeFeatureMessagesEndpoint } from "./feature-messages";
|
|
11
|
+
import { ForgeFeatureIterationTagsEndpoint } from "./iteration-tags";
|
|
12
|
+
|
|
13
|
+
export class ForgeProjectFeaturesEndpoint {
|
|
14
|
+
readonly messages: ForgeFeatureMessagesEndpoint;
|
|
15
|
+
readonly iterations: ForgeFeatureIterationsEndpoint;
|
|
16
|
+
readonly artifacts: ForgeFeatureArtifactsEndpoint;
|
|
17
|
+
readonly iterationTags: ForgeFeatureIterationTagsEndpoint;
|
|
18
|
+
|
|
19
|
+
constructor(private readonly requestExecutor: RequestExecutor) {
|
|
20
|
+
this.messages = new ForgeFeatureMessagesEndpoint(requestExecutor);
|
|
21
|
+
this.iterations = new ForgeFeatureIterationsEndpoint(requestExecutor);
|
|
22
|
+
this.artifacts = new ForgeFeatureArtifactsEndpoint(requestExecutor);
|
|
23
|
+
this.iterationTags = new ForgeFeatureIterationTagsEndpoint(requestExecutor);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
list(workspaceId: string, projectId: string) {
|
|
27
|
+
return this.requestExecutor.json(
|
|
28
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/features`,
|
|
29
|
+
DTOForgeProjectFeatureListResponse,
|
|
30
|
+
{
|
|
31
|
+
method: "GET",
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
get(workspaceId: string, projectId: string, featureId: string) {
|
|
37
|
+
return this.requestExecutor.json(
|
|
38
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/features/${featureId}`,
|
|
39
|
+
DTOForgeProjectFeatureGetResponse,
|
|
40
|
+
{}
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
getById(featureId: string) {
|
|
45
|
+
return this.requestExecutor.json(`/forge/features/${featureId}`, DTOForgeProjectFeatureGetResponse, {});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
agentWorkFinalized(
|
|
49
|
+
workspaceId: string,
|
|
50
|
+
projectId: string,
|
|
51
|
+
featureId: string,
|
|
52
|
+
body: DTOFeatureAgentWorkFinalizeInput
|
|
53
|
+
) {
|
|
54
|
+
return this.requestExecutor.json(
|
|
55
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/features/${featureId}/agent-work-finalize`,
|
|
56
|
+
DTOFeatureIterationResponse,
|
|
57
|
+
{
|
|
58
|
+
method: "POST",
|
|
59
|
+
body,
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { RequestExecutor } from "../../transport";
|
|
2
|
+
import { ForgeArtifactsEndpoint } from "./artifacts";
|
|
3
|
+
import { ForgeDocumentsEndpoint } from "./documents";
|
|
4
|
+
import { ForgeProjectFeaturesEndpoint } from "./features";
|
|
5
|
+
import { ForgeMemoryEndpoint } from "./memory";
|
|
6
|
+
import { ForgeProjectContextsEndpoint } from "./project-contexts";
|
|
7
|
+
import { ForgeProjectFilesEndpoint } from "./project-files";
|
|
8
|
+
import { ForgeProjectInvitationsEndpoint } from "./project-invitations";
|
|
9
|
+
import { ForgeProjectMembersEndpoint } from "./project-members";
|
|
10
|
+
import { ForgeProjectsEndpoint } from "./projects";
|
|
11
|
+
|
|
12
|
+
export class ForgeEndpoint {
|
|
13
|
+
readonly projects: ForgeProjectsEndpoint;
|
|
14
|
+
readonly projectContexts: ForgeProjectContextsEndpoint;
|
|
15
|
+
readonly artifacts: ForgeArtifactsEndpoint;
|
|
16
|
+
readonly documents: ForgeDocumentsEndpoint;
|
|
17
|
+
readonly features: ForgeProjectFeaturesEndpoint;
|
|
18
|
+
readonly files: ForgeProjectFilesEndpoint;
|
|
19
|
+
readonly memory: ForgeMemoryEndpoint;
|
|
20
|
+
|
|
21
|
+
readonly projectMembers: ForgeProjectMembersEndpoint;
|
|
22
|
+
readonly projectInvitations: ForgeProjectInvitationsEndpoint;
|
|
23
|
+
|
|
24
|
+
constructor(requestExecutor: RequestExecutor) {
|
|
25
|
+
this.projects = new ForgeProjectsEndpoint(requestExecutor);
|
|
26
|
+
|
|
27
|
+
this.projectContexts = new ForgeProjectContextsEndpoint(requestExecutor);
|
|
28
|
+
this.artifacts = new ForgeArtifactsEndpoint(requestExecutor);
|
|
29
|
+
this.documents = new ForgeDocumentsEndpoint(requestExecutor);
|
|
30
|
+
this.features = new ForgeProjectFeaturesEndpoint(requestExecutor);
|
|
31
|
+
this.files = new ForgeProjectFilesEndpoint(requestExecutor);
|
|
32
|
+
|
|
33
|
+
this.projectMembers = new ForgeProjectMembersEndpoint(requestExecutor);
|
|
34
|
+
this.projectInvitations = new ForgeProjectInvitationsEndpoint(requestExecutor);
|
|
35
|
+
|
|
36
|
+
this.memory = new ForgeMemoryEndpoint(requestExecutor);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./agents";
|
|
2
|
+
export * from "./artifacts";
|
|
3
|
+
export * from "./documents";
|
|
4
|
+
export * from "./feature-artifacts";
|
|
5
|
+
export * from "./feature-iterations";
|
|
6
|
+
export * from "./feature-messages";
|
|
7
|
+
export * from "./features";
|
|
8
|
+
export * from "./forge";
|
|
9
|
+
export * from "./iteration-tags";
|
|
10
|
+
export * from "./memory";
|
|
11
|
+
export * from "./project-contexts";
|
|
12
|
+
export * from "./project-files";
|
|
13
|
+
export * from "./project-invitations";
|
|
14
|
+
export * from "./project-iterations";
|
|
15
|
+
export * from "./project-members";
|
|
16
|
+
export * from "./projects";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DTOFeatureIterationTagListResponse } from "../../dto";
|
|
2
|
+
import { RequestExecutor } from "../../transport";
|
|
3
|
+
|
|
4
|
+
export class ForgeFeatureIterationTagsEndpoint {
|
|
5
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
6
|
+
|
|
7
|
+
list(workspaceId: string, projectId: string, featureId: string) {
|
|
8
|
+
return this.requestExecutor.json(
|
|
9
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/features/${featureId}/iteration-tags`,
|
|
10
|
+
DTOFeatureIterationTagListResponse
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DTOForgeMemoryCreateInput,
|
|
3
|
+
DTOForgeMemoryEntryListQuery,
|
|
4
|
+
DTOForgeMemoryEntryListResponse,
|
|
5
|
+
DTOForgeMemoryEntryResponse,
|
|
6
|
+
DTOForgeMemoryUpdateInput,
|
|
7
|
+
DTOForgeMemoryDeleteInput,
|
|
8
|
+
} from "../../dto";
|
|
9
|
+
import { RequestExecutor } from "../../transport";
|
|
10
|
+
|
|
11
|
+
export class ForgeMemoryEndpoint {
|
|
12
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
13
|
+
|
|
14
|
+
list(query: DTOForgeMemoryEntryListQuery) {
|
|
15
|
+
const qs = new URLSearchParams({ projectId: query.projectId }).toString();
|
|
16
|
+
return this.requestExecutor.json(`/api/v2/forge/memory?${qs}`, DTOForgeMemoryEntryListResponse, {
|
|
17
|
+
method: "GET",
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
create(body: DTOForgeMemoryCreateInput) {
|
|
22
|
+
return this.requestExecutor.json(`/api/v2/forge/memory`, DTOForgeMemoryEntryResponse, {
|
|
23
|
+
method: "POST",
|
|
24
|
+
body,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
update(body: DTOForgeMemoryUpdateInput) {
|
|
29
|
+
return this.requestExecutor.json(`/api/v2/forge/memory`, DTOForgeMemoryEntryResponse, {
|
|
30
|
+
method: "PUT",
|
|
31
|
+
body,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
delete(body: DTOForgeMemoryDeleteInput) {
|
|
36
|
+
return this.requestExecutor.json(`/api/v2/forge/memory`, DTOForgeMemoryEntryResponse, {
|
|
37
|
+
method: "DELETE",
|
|
38
|
+
body,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DTOForgeProjectContextCreateV2,
|
|
3
|
+
DTOForgeProjectContextListResponseV2,
|
|
4
|
+
DTOForgeProjectContextResponseV2,
|
|
5
|
+
DTOUpdateForgeProjectContext,
|
|
6
|
+
} from "../../dto";
|
|
7
|
+
import { RequestExecutor } from "../../transport";
|
|
8
|
+
|
|
9
|
+
export class ForgeProjectContextsEndpoint {
|
|
10
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
11
|
+
|
|
12
|
+
list(workspaceId: string) {
|
|
13
|
+
return this.requestExecutor.json(
|
|
14
|
+
`/forge/project-contexts?workspaceId=${workspaceId}`,
|
|
15
|
+
DTOForgeProjectContextListResponseV2,
|
|
16
|
+
{
|
|
17
|
+
method: "GET",
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
getById(contextId: string) {
|
|
23
|
+
return this.requestExecutor.json(
|
|
24
|
+
`/forge/project-contexts/${contextId}`,
|
|
25
|
+
DTOForgeProjectContextResponseV2,
|
|
26
|
+
{
|
|
27
|
+
method: "GET",
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
create(body: DTOForgeProjectContextCreateV2) {
|
|
33
|
+
return this.requestExecutor.json(`/forge/project-contexts`, DTOForgeProjectContextResponseV2, {
|
|
34
|
+
method: "POST",
|
|
35
|
+
body,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
update(workspaceId: string, contextId: string, body: DTOUpdateForgeProjectContext) {
|
|
40
|
+
return this.requestExecutor.json(
|
|
41
|
+
`/workspaces/${workspaceId}/forge/project-contexts/${contextId}`,
|
|
42
|
+
DTOForgeProjectContextResponseV2,
|
|
43
|
+
{
|
|
44
|
+
method: "PUT",
|
|
45
|
+
body,
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DTOForgeProjectFileListResponse,
|
|
3
|
+
DTOForgeProjectFileUploadFinalizePayload,
|
|
4
|
+
DTOForgeProjectFileUploadFinalizeResponse,
|
|
5
|
+
DTOForgeProjectFileUploadPayload,
|
|
6
|
+
DTOForgeProjectFileUploadResponse,
|
|
7
|
+
} from "../../dto";
|
|
8
|
+
import { RequestExecutor } from "../../transport";
|
|
9
|
+
|
|
10
|
+
export class ForgeProjectFilesEndpoint {
|
|
11
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
12
|
+
|
|
13
|
+
upload(workspaceId: string, projectId: string, body: DTOForgeProjectFileUploadPayload) {
|
|
14
|
+
return this.requestExecutor.json(
|
|
15
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/files/upload`,
|
|
16
|
+
DTOForgeProjectFileUploadResponse,
|
|
17
|
+
{
|
|
18
|
+
method: "POST",
|
|
19
|
+
body,
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
finalize(workspaceId: string, projectId: string, body: DTOForgeProjectFileUploadFinalizePayload) {
|
|
25
|
+
return this.requestExecutor.json(
|
|
26
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/files/finalize`,
|
|
27
|
+
DTOForgeProjectFileUploadFinalizeResponse,
|
|
28
|
+
{
|
|
29
|
+
method: "POST",
|
|
30
|
+
body,
|
|
31
|
+
}
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
list(workspaceId: string, projectId: string) {
|
|
36
|
+
return this.requestExecutor.json(
|
|
37
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/files`,
|
|
38
|
+
DTOForgeProjectFileListResponse
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DTOCreateForgeProjectInvitation,
|
|
3
|
+
DTOForgeProjectInvitationCreateResponse,
|
|
4
|
+
DTOForgeProjectMemberRemoveResponse,
|
|
5
|
+
DTOForgeProjectMembersListResponse,
|
|
6
|
+
DTOUpdateForgeProjectInvitation,
|
|
7
|
+
} from "../../dto";
|
|
8
|
+
import { RequestExecutor } from "../../transport";
|
|
9
|
+
|
|
10
|
+
export class ForgeProjectInvitationsEndpoint {
|
|
11
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
12
|
+
|
|
13
|
+
list(projectId: string) {
|
|
14
|
+
return this.requestExecutor.json(`/forge/projects/${projectId}/members`, DTOForgeProjectMembersListResponse, {
|
|
15
|
+
method: "GET",
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
create(projectId: string, body: DTOCreateForgeProjectInvitation) {
|
|
20
|
+
return this.requestExecutor.json(`/forge/projects/${projectId}/members`, DTOForgeProjectMembersListResponse, {
|
|
21
|
+
method: "POST",
|
|
22
|
+
body,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
update(projectId: string, email: string, body: DTOUpdateForgeProjectInvitation) {
|
|
27
|
+
return this.requestExecutor.json(`/forge/projects/${projectId}/members`, DTOForgeProjectInvitationCreateResponse, {
|
|
28
|
+
method: "PUT",
|
|
29
|
+
body: { ...body, email },
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
delete(projectId: string, email: string) {
|
|
34
|
+
return this.requestExecutor.json(`/forge/projects/${projectId}/members`, DTOForgeProjectMemberRemoveResponse, {
|
|
35
|
+
method: "DELETE",
|
|
36
|
+
body: { email },
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DTOCreateForgeProjectIteration,
|
|
3
|
+
DTOCreateForgeProjectIterationResponse,
|
|
4
|
+
DTODeleteForgeProjectIterationResponse,
|
|
5
|
+
DTOUpdateForgeProjectIteration,
|
|
6
|
+
DTOUpdateForgeProjectIterationResponse,
|
|
7
|
+
} from "../../dto";
|
|
8
|
+
import { RequestExecutor } from "../../transport";
|
|
9
|
+
|
|
10
|
+
export class ForgeProjectIterationsEndpoint {
|
|
11
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
12
|
+
|
|
13
|
+
list(workspaceId: string, projectId: string) {
|
|
14
|
+
return this.requestExecutor.json(
|
|
15
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/iterations`,
|
|
16
|
+
DTOUpdateForgeProjectIterationResponse,
|
|
17
|
+
{
|
|
18
|
+
method: "GET",
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
create(workspaceId: string, projectId: string, body: DTOCreateForgeProjectIteration) {
|
|
24
|
+
return this.requestExecutor.json(
|
|
25
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/iterations`,
|
|
26
|
+
DTOCreateForgeProjectIterationResponse,
|
|
27
|
+
{
|
|
28
|
+
method: "POST",
|
|
29
|
+
body,
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
update(workspaceId: string, projectId: string, id: string, body: DTOUpdateForgeProjectIteration) {
|
|
35
|
+
return this.requestExecutor.json(
|
|
36
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/iterations/${id}`,
|
|
37
|
+
DTOCreateForgeProjectIterationResponse,
|
|
38
|
+
{
|
|
39
|
+
method: "PUT",
|
|
40
|
+
body,
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
merge(workspaceId: string, projectId: string, id: string) {
|
|
46
|
+
return this.requestExecutor.json(
|
|
47
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/iterations/${id}/merge`,
|
|
48
|
+
DTOCreateForgeProjectIterationResponse,
|
|
49
|
+
{
|
|
50
|
+
method: "POST",
|
|
51
|
+
body: {},
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
delete(workspaceId: string, projectId: string, id: string) {
|
|
57
|
+
return this.requestExecutor.json(
|
|
58
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/iterations/${id}`,
|
|
59
|
+
DTODeleteForgeProjectIterationResponse,
|
|
60
|
+
{
|
|
61
|
+
method: "DELETE",
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DTOAddMembersToForgeProject,
|
|
3
|
+
DTOForgeProjectMemberCreateResponse,
|
|
4
|
+
DTOForgeProjectMemberRemoveResponse,
|
|
5
|
+
DTOForgeProjectMembersListResponse,
|
|
6
|
+
DTOUpdateForgeProjectMember,
|
|
7
|
+
} from "../../dto";
|
|
8
|
+
import { RequestExecutor } from "../../transport";
|
|
9
|
+
|
|
10
|
+
export class ForgeProjectMembersEndpoint {
|
|
11
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
12
|
+
|
|
13
|
+
list(workspaceId: string, projectId: string) {
|
|
14
|
+
return this.requestExecutor.json(
|
|
15
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/members`,
|
|
16
|
+
DTOForgeProjectMembersListResponse,
|
|
17
|
+
{
|
|
18
|
+
method: "GET",
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
create(workspaceId: string, projectId: string, body: DTOAddMembersToForgeProject) {
|
|
24
|
+
return this.requestExecutor.json(
|
|
25
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/members`,
|
|
26
|
+
DTOForgeProjectMembersListResponse,
|
|
27
|
+
{
|
|
28
|
+
method: "POST",
|
|
29
|
+
body,
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
update(workspaceId: string, projectId: string, body: DTOUpdateForgeProjectMember) {
|
|
35
|
+
return this.requestExecutor.json(
|
|
36
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/members`,
|
|
37
|
+
DTOForgeProjectMemberCreateResponse,
|
|
38
|
+
{
|
|
39
|
+
method: "PUT",
|
|
40
|
+
body,
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
delete(workspaceId: string, projectId: string, userId: string) {
|
|
46
|
+
return this.requestExecutor.json(
|
|
47
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/members`,
|
|
48
|
+
DTOForgeProjectMemberRemoveResponse,
|
|
49
|
+
{
|
|
50
|
+
method: "DELETE",
|
|
51
|
+
body: { userId },
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import {
|
|
3
|
+
DTOForgeProjectAction,
|
|
4
|
+
DTOForgeProjectCreate,
|
|
5
|
+
DTOForgeProjectListResponse,
|
|
6
|
+
DTOForgeProjectResponse,
|
|
7
|
+
DTOForgeProjectUpdate,
|
|
8
|
+
} from "../../dto";
|
|
9
|
+
import { RequestExecutor } from "../../transport";
|
|
10
|
+
|
|
11
|
+
export class ForgeProjectsEndpoint {
|
|
12
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
13
|
+
|
|
14
|
+
list(workspaceId: string) {
|
|
15
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/forge/projects`, DTOForgeProjectListResponse);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
create(workspaceId: string, body: DTOForgeProjectCreate) {
|
|
19
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/forge/projects`, DTOForgeProjectResponse, {
|
|
20
|
+
method: "POST",
|
|
21
|
+
body,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
get(workspaceId: string, projectId: string) {
|
|
26
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/forge/projects/${projectId}`, DTOForgeProjectResponse);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
update(workspaceId: string, projectId: string, body: DTOForgeProjectUpdate) {
|
|
30
|
+
return this.requestExecutor.json(
|
|
31
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}`,
|
|
32
|
+
DTOForgeProjectResponse,
|
|
33
|
+
{
|
|
34
|
+
method: "PUT",
|
|
35
|
+
body,
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
delete(workspaceId: string, projectId: string) {
|
|
41
|
+
return this.requestExecutor.json(
|
|
42
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}`,
|
|
43
|
+
DTOForgeProjectResponse,
|
|
44
|
+
{
|
|
45
|
+
method: "DELETE",
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
action(workspaceId: string, projectId: string, body: DTOForgeProjectAction) {
|
|
51
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/forge/projects/${projectId}/action`, z.any(), {
|
|
52
|
+
body,
|
|
53
|
+
method: "POST",
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./codegen";
|
|
2
|
+
export * from "./design-system";
|
|
3
|
+
export * from "./forge";
|
|
4
|
+
export * from "./mcp";
|
|
5
|
+
export * from "./sandboxes";
|
|
6
|
+
export * from "./workspaces";
|
|
7
|
+
export * from "./auth-tokens";
|
|
8
|
+
export * from "./feedback";
|
|
9
|
+
export * from "./files";
|
|
10
|
+
export * from "./liveblocks";
|
|
11
|
+
export * from "./storybook-sites";
|
|
12
|
+
export * from "./threads";
|
|
13
|
+
export * from "./users";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DTOLiveblocksAuthResponse } from "../dto";
|
|
2
|
+
import { DTOLiveblocksAuthRequest } from "../payloads";
|
|
3
|
+
import { RequestExecutor } from "../transport/request-executor";
|
|
4
|
+
|
|
5
|
+
export class LiveblocksEndpoint {
|
|
6
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
7
|
+
|
|
8
|
+
auth(body: DTOLiveblocksAuthRequest) {
|
|
9
|
+
return this.requestExecutor.json("/liveblocks/auth", DTOLiveblocksAuthResponse, {
|
|
10
|
+
method: "POST",
|
|
11
|
+
body,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./streams";
|