@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,13 @@
|
|
|
1
|
+
import { DTOFigmaComponentGroupListResponse } from "../../../dto";
|
|
2
|
+
import { RequestExecutor } from "../../../transport/request-executor";
|
|
3
|
+
|
|
4
|
+
export class FigmaComponentGroupsEndpoint {
|
|
5
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
6
|
+
|
|
7
|
+
async list(dsId: string, vId: string) {
|
|
8
|
+
return this.requestExecutor.json(
|
|
9
|
+
`/design-systems/${dsId}/versions/${vId}/component-groups`,
|
|
10
|
+
DTOFigmaComponentGroupListResponse
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { pickDefined } from "@supernova-studio/model";
|
|
2
|
+
import { DTOFigmaComponentListResponse } from "../../../dto";
|
|
3
|
+
import { RequestExecutor } from "../../../transport/request-executor";
|
|
4
|
+
|
|
5
|
+
export class FigmaComponentsEndpoint {
|
|
6
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
7
|
+
|
|
8
|
+
async list(dsId: string, vId: string, brandId?: string) {
|
|
9
|
+
return this.requestExecutor.json(
|
|
10
|
+
`/design-systems/${dsId}/versions/${vId}/components`,
|
|
11
|
+
DTOFigmaComponentListResponse,
|
|
12
|
+
{ query: new URLSearchParams(pickDefined({ brandId })) }
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DTOFrameNodeStructureListResponse } from "../../../dto";
|
|
2
|
+
import { RequestExecutor } from "../../../transport/request-executor";
|
|
3
|
+
|
|
4
|
+
export class FigmaFrameStructuresEndpoint {
|
|
5
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
6
|
+
|
|
7
|
+
list(dsId: string, vId: string) {
|
|
8
|
+
return this.requestExecutor.json(
|
|
9
|
+
`/design-systems/${dsId}/versions/${vId}/figma-frames/node-structures`,
|
|
10
|
+
DTOFrameNodeStructureListResponse
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DTOFilesGetQuery,
|
|
3
|
+
DTOFilesResponse,
|
|
4
|
+
DTOFileUploadFinalizePayload,
|
|
5
|
+
DTOFileUploadFinalizeResponse,
|
|
6
|
+
DTOFileUploadPayload,
|
|
7
|
+
DTOFileUploadResponse,
|
|
8
|
+
} from "../../../dto";
|
|
9
|
+
import { RequestExecutor } from "../../../transport";
|
|
10
|
+
|
|
11
|
+
export class DesignSystemFilesEndpoint {
|
|
12
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
13
|
+
|
|
14
|
+
upload(designSystemId: string, versionId: string, body: DTOFileUploadPayload) {
|
|
15
|
+
return this.requestExecutor.json(
|
|
16
|
+
`/design-systems/${designSystemId}/versions/${versionId}/files/upload`,
|
|
17
|
+
DTOFileUploadResponse,
|
|
18
|
+
{
|
|
19
|
+
method: "POST",
|
|
20
|
+
body,
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
finalize(designSystemId: string, versionId: string, body: DTOFileUploadFinalizePayload) {
|
|
26
|
+
return this.requestExecutor.json(
|
|
27
|
+
`/design-systems/${designSystemId}/versions/${versionId}/files/finalize`,
|
|
28
|
+
DTOFileUploadFinalizeResponse,
|
|
29
|
+
{
|
|
30
|
+
method: "POST",
|
|
31
|
+
body,
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
get(designSystemId: string, versionId: string, query?: DTOFilesGetQuery) {
|
|
37
|
+
return this.requestExecutor.json(
|
|
38
|
+
`/design-systems/${designSystemId}/versions/${versionId}/files`,
|
|
39
|
+
DTOFilesResponse,
|
|
40
|
+
{ query: query ? new URLSearchParams(query) : undefined }
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DTOImportJobResponse } from "../../../dto";
|
|
2
|
+
import { RequestExecutor } from "../../../transport/request-executor";
|
|
3
|
+
|
|
4
|
+
export class ImportJobsEndpoint {
|
|
5
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
6
|
+
|
|
7
|
+
get(designSystemId: string, versionId: string, jobId: string) {
|
|
8
|
+
return this.requestExecutor.json(
|
|
9
|
+
`/design-systems/${designSystemId}/versions/${versionId}/import-jobs/${jobId}`,
|
|
10
|
+
DTOImportJobResponse
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export * from "./brands";
|
|
2
|
+
export * from "./documentation";
|
|
3
|
+
export * from "./ds-components";
|
|
4
|
+
export * from "./elements-action";
|
|
5
|
+
export * from "./elements";
|
|
6
|
+
export * from "./figma-component-groups";
|
|
7
|
+
export * from "./figma-components";
|
|
8
|
+
export * from "./figma-frame-structures";
|
|
9
|
+
export * from "./files";
|
|
10
|
+
export * from "./import-jobs";
|
|
11
|
+
export * from "./overrides";
|
|
12
|
+
export * from "./property-definitions";
|
|
13
|
+
export * from "./property-values";
|
|
14
|
+
export * from "./stats";
|
|
15
|
+
export * from "./themes";
|
|
16
|
+
export * from "./token-collections";
|
|
17
|
+
export * from "./token-groups";
|
|
18
|
+
export * from "./tokens";
|
|
19
|
+
export * from "./versions";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { RequestExecutor } from "../../../transport/request-executor";
|
|
3
|
+
|
|
4
|
+
export class OverridesEndpoint {
|
|
5
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
6
|
+
|
|
7
|
+
create(dsId: string, versionId: string, themeId: string, body: any) {
|
|
8
|
+
return this.requestExecutor.json(
|
|
9
|
+
`/design-systems/${dsId}/versions/${versionId}/themes/${themeId}/overrides`,
|
|
10
|
+
z.any(),
|
|
11
|
+
{
|
|
12
|
+
method: "POST",
|
|
13
|
+
body,
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import {
|
|
3
|
+
DTOElementPropertyDefinitionCreatePayload,
|
|
4
|
+
DTOElementPropertyDefinitionListResponse,
|
|
5
|
+
DTOElementPropertyDefinitionResponse,
|
|
6
|
+
DTOElementPropertyDefinitionUpdatePayload,
|
|
7
|
+
} from "../../../dto";
|
|
8
|
+
import { RequestExecutor } from "../../../transport/request-executor";
|
|
9
|
+
|
|
10
|
+
export class ElementPropertyDefinitionsEndpoint {
|
|
11
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
12
|
+
|
|
13
|
+
list(designSystemId: string, versionId: string) {
|
|
14
|
+
return this.requestExecutor.json(
|
|
15
|
+
`/design-systems/${designSystemId}/versions/${versionId}/element-properties/definitions`,
|
|
16
|
+
DTOElementPropertyDefinitionListResponse
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
create(designSystemId: string, versionId: string, body: DTOElementPropertyDefinitionCreatePayload) {
|
|
21
|
+
return this.requestExecutor.json(
|
|
22
|
+
`/design-systems/${designSystemId}/versions/${versionId}/element-properties/definitions`,
|
|
23
|
+
DTOElementPropertyDefinitionResponse,
|
|
24
|
+
{ method: "POST", body }
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
update(designSystemId: string, versionId: string, defId: string, body: DTOElementPropertyDefinitionUpdatePayload) {
|
|
29
|
+
return this.requestExecutor.json(
|
|
30
|
+
`/design-systems/${designSystemId}/versions/${versionId}/element-properties/definitions/${defId}`,
|
|
31
|
+
DTOElementPropertyDefinitionResponse,
|
|
32
|
+
{ method: "PUT", body }
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
delete(designSystemId: string, versionId: string, defId: string) {
|
|
37
|
+
return this.requestExecutor.json(
|
|
38
|
+
`/design-systems/${designSystemId}/versions/${versionId}/element-properties/definitions/${defId}`,
|
|
39
|
+
z.any(),
|
|
40
|
+
{ method: "DELETE" }
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DTOElementPropertyValueListResponse,
|
|
3
|
+
DTOElementPropertyValueResponse,
|
|
4
|
+
DTOElementPropertyValueUpsertPaylod,
|
|
5
|
+
} from "../../../dto";
|
|
6
|
+
import { RequestExecutor } from "../../../transport/request-executor";
|
|
7
|
+
|
|
8
|
+
export class ElementPropertyValuesEndpoint {
|
|
9
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
10
|
+
|
|
11
|
+
list(designSystemId: string, versionId: string) {
|
|
12
|
+
return this.requestExecutor.json(
|
|
13
|
+
`/design-systems/${designSystemId}/versions/${versionId}/element-properties/values`,
|
|
14
|
+
DTOElementPropertyValueListResponse
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
upsert(designSystemId: string, versionId: string, body: DTOElementPropertyValueUpsertPaylod) {
|
|
19
|
+
return this.requestExecutor.json(
|
|
20
|
+
`/design-systems/${designSystemId}/versions/${versionId}/element-properties/values`,
|
|
21
|
+
DTOElementPropertyValueResponse,
|
|
22
|
+
{ method: "POST", body }
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DTODesignSystemVersionStats, DTODesignSystemVersionStatsQuery } from "../../../dto/design-systems/stats";
|
|
2
|
+
import { RequestExecutor } from "../../../transport/request-executor";
|
|
3
|
+
|
|
4
|
+
export class VersionStatsEndpoint {
|
|
5
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
6
|
+
|
|
7
|
+
get(dsId: string, vId: string, query: DTODesignSystemVersionStatsQuery = {}) {
|
|
8
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${vId}/stats`, DTODesignSystemVersionStats, {
|
|
9
|
+
query: new URLSearchParams(query),
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { DTOThemeCreatePayload, DTOThemeListResponse, DTOThemeResponse } from "../../../dto";
|
|
3
|
+
import { RequestExecutor } from "../../../transport/request-executor";
|
|
4
|
+
import { OverridesEndpoint } from "./overrides";
|
|
5
|
+
|
|
6
|
+
export class ThemesEndpoint {
|
|
7
|
+
readonly overrides: OverridesEndpoint;
|
|
8
|
+
constructor(private readonly requestExecutor: RequestExecutor) {
|
|
9
|
+
this.overrides = new OverridesEndpoint(requestExecutor);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
list(dsId: string, versionId: string) {
|
|
13
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${versionId}/themes`, DTOThemeListResponse);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
get(dsId: string, versionId: string, themeId: string) {
|
|
17
|
+
return this.requestExecutor.json(
|
|
18
|
+
`/design-systems/${dsId}/versions/${versionId}/themes/${themeId}`,
|
|
19
|
+
DTOThemeResponse
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
create(dsId: string, versionId: string, body: DTOThemeCreatePayload) {
|
|
24
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${versionId}/themes`, DTOThemeResponse, {
|
|
25
|
+
method: "POST",
|
|
26
|
+
body,
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
delete(dsId: string, versionId: string, themeId: string) {
|
|
31
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${versionId}/themes/${themeId}`, z.any(), {
|
|
32
|
+
method: "DELETE",
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { DTOTokenCollectionsListReponse } from "../../../dto";
|
|
2
|
+
import { RequestExecutor } from "../../../transport/request-executor";
|
|
3
|
+
|
|
4
|
+
export class TokenCollectionsEndpoint {
|
|
5
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
6
|
+
|
|
7
|
+
list(designSystemId: string, versionId: string) {
|
|
8
|
+
return this.requestExecutor.json(
|
|
9
|
+
`/design-systems/${designSystemId}/versions/${versionId}/token-collections`,
|
|
10
|
+
DTOTokenCollectionsListReponse
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { pickDefined } from "@supernova-studio/model";
|
|
2
|
+
import {
|
|
3
|
+
DTODesignTokenGroupCreatePayload,
|
|
4
|
+
DTODesignTokenGroupListResponse,
|
|
5
|
+
DTODesignTokenGroupResponse,
|
|
6
|
+
} from "../../../dto";
|
|
7
|
+
import { RequestExecutor } from "../../../transport/request-executor";
|
|
8
|
+
|
|
9
|
+
export class TokenGroupsEndpoint {
|
|
10
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
11
|
+
|
|
12
|
+
create(dsId: string, versionId: string, body: DTODesignTokenGroupCreatePayload) {
|
|
13
|
+
return this.requestExecutor.json(
|
|
14
|
+
`/design-systems/${dsId}/versions/${versionId}/token-groups`,
|
|
15
|
+
DTODesignTokenGroupResponse,
|
|
16
|
+
{
|
|
17
|
+
method: "POST",
|
|
18
|
+
body,
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
list(dsId: string, versionId: string, brandId?: string): Promise<DTODesignTokenGroupListResponse> {
|
|
24
|
+
return this.requestExecutor.json(
|
|
25
|
+
`/design-systems/${dsId}/versions/${versionId}/token-groups`,
|
|
26
|
+
DTODesignTokenGroupListResponse,
|
|
27
|
+
{ query: new URLSearchParams(pickDefined({ brandId })) }
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { pickDefined } from "@supernova-studio/model";
|
|
2
|
+
import { DTODesignTokenCreatePayload, DTODesignTokenListResponse, DTODesignTokenResponse } from "../../../dto";
|
|
3
|
+
import { RequestExecutor } from "../../../transport/request-executor";
|
|
4
|
+
|
|
5
|
+
export class TokensEndpoint {
|
|
6
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
7
|
+
|
|
8
|
+
create(dsId: string, versionId: string, body: DTODesignTokenCreatePayload) {
|
|
9
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${versionId}/tokens`, DTODesignTokenResponse, {
|
|
10
|
+
method: "POST",
|
|
11
|
+
body,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
list(dsId: string, versionId: string, brandId?: string): Promise<DTODesignTokenListResponse> {
|
|
16
|
+
return this.requestExecutor.json(
|
|
17
|
+
`/design-systems/${dsId}/versions/${versionId}/tokens`,
|
|
18
|
+
DTODesignTokenListResponse,
|
|
19
|
+
{ query: new URLSearchParams(pickDefined({ brandId })) }
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
get(dsId: string, versionId: string, tokenId: string): Promise<DTODesignTokenListResponse> {
|
|
24
|
+
return this.requestExecutor.json(
|
|
25
|
+
`/design-systems/${dsId}/versions/${versionId}/tokens/${tokenId}`,
|
|
26
|
+
DTODesignTokenListResponse
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DTODesignSystemVersionCreationResponse,
|
|
3
|
+
DTODesignSystemVersionJobStatusResponse,
|
|
4
|
+
DTODesignSystemVersionRoomResponse,
|
|
5
|
+
DTODesignSystemVersionsListResponse,
|
|
6
|
+
} from "../../../dto";
|
|
7
|
+
import { DTOCreateVersionInput } from "../../../payloads";
|
|
8
|
+
import { RequestExecutor } from "../../../transport/request-executor";
|
|
9
|
+
import { BrandsEndpoint } from "./brands";
|
|
10
|
+
import { DocumentationEndpoint } from "./documentation";
|
|
11
|
+
import { DesignSystemComponentEndpoint } from "./ds-components";
|
|
12
|
+
import { ElementsEndpoint } from "./elements";
|
|
13
|
+
import { ElementsActionEndpoint } from "./elements-action";
|
|
14
|
+
import { FigmaComponentGroupsEndpoint } from "./figma-component-groups";
|
|
15
|
+
import { FigmaComponentsEndpoint } from "./figma-components";
|
|
16
|
+
import { FigmaFrameStructuresEndpoint } from "./figma-frame-structures";
|
|
17
|
+
import { DesignSystemFilesEndpoint } from "./files";
|
|
18
|
+
import { ImportJobsEndpoint } from "./import-jobs";
|
|
19
|
+
import { ElementPropertyDefinitionsEndpoint } from "./property-definitions";
|
|
20
|
+
import { ElementPropertyValuesEndpoint } from "./property-values";
|
|
21
|
+
import { VersionStatsEndpoint } from "./stats";
|
|
22
|
+
import { ThemesEndpoint } from "./themes";
|
|
23
|
+
import { TokenCollectionsEndpoint } from "./token-collections";
|
|
24
|
+
import { TokenGroupsEndpoint } from "./token-groups";
|
|
25
|
+
import { TokensEndpoint } from "./tokens";
|
|
26
|
+
|
|
27
|
+
export class DesignSystemVersionsEndpoint {
|
|
28
|
+
readonly themes: ThemesEndpoint;
|
|
29
|
+
readonly brands: BrandsEndpoint;
|
|
30
|
+
readonly tokenCollections: TokenCollectionsEndpoint;
|
|
31
|
+
readonly importJobs: ImportJobsEndpoint;
|
|
32
|
+
readonly tokens: TokensEndpoint;
|
|
33
|
+
readonly tokenGroups: TokenGroupsEndpoint;
|
|
34
|
+
readonly figmaComponents: FigmaComponentsEndpoint;
|
|
35
|
+
readonly figmaComponentGroups: FigmaComponentGroupsEndpoint;
|
|
36
|
+
readonly figmaFrameStructures: FigmaFrameStructuresEndpoint;
|
|
37
|
+
readonly stats: VersionStatsEndpoint;
|
|
38
|
+
readonly elementPropertyDefinitions: ElementPropertyDefinitionsEndpoint;
|
|
39
|
+
readonly elementPropertyValues: ElementPropertyValuesEndpoint;
|
|
40
|
+
readonly elementsAction: ElementsActionEndpoint;
|
|
41
|
+
readonly elements: ElementsEndpoint;
|
|
42
|
+
readonly designSystemComponents: DesignSystemComponentEndpoint;
|
|
43
|
+
readonly documentation: DocumentationEndpoint;
|
|
44
|
+
readonly files: DesignSystemFilesEndpoint;
|
|
45
|
+
|
|
46
|
+
constructor(private readonly requestExecutor: RequestExecutor) {
|
|
47
|
+
this.themes = new ThemesEndpoint(requestExecutor);
|
|
48
|
+
this.brands = new BrandsEndpoint(requestExecutor);
|
|
49
|
+
this.tokenCollections = new TokenCollectionsEndpoint(requestExecutor);
|
|
50
|
+
this.importJobs = new ImportJobsEndpoint(requestExecutor);
|
|
51
|
+
this.tokens = new TokensEndpoint(requestExecutor);
|
|
52
|
+
this.tokenGroups = new TokenGroupsEndpoint(requestExecutor);
|
|
53
|
+
this.figmaComponents = new FigmaComponentsEndpoint(requestExecutor);
|
|
54
|
+
this.figmaComponentGroups = new FigmaComponentGroupsEndpoint(requestExecutor);
|
|
55
|
+
this.figmaFrameStructures = new FigmaFrameStructuresEndpoint(requestExecutor);
|
|
56
|
+
this.stats = new VersionStatsEndpoint(requestExecutor);
|
|
57
|
+
this.elementPropertyDefinitions = new ElementPropertyDefinitionsEndpoint(requestExecutor);
|
|
58
|
+
this.elementPropertyValues = new ElementPropertyValuesEndpoint(requestExecutor);
|
|
59
|
+
this.elementsAction = new ElementsActionEndpoint(requestExecutor);
|
|
60
|
+
this.elements = new ElementsEndpoint(requestExecutor);
|
|
61
|
+
this.designSystemComponents = new DesignSystemComponentEndpoint(requestExecutor);
|
|
62
|
+
this.documentation = new DocumentationEndpoint(requestExecutor);
|
|
63
|
+
this.files = new DesignSystemFilesEndpoint(requestExecutor);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
list(dsId: string) {
|
|
67
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/versions`, DTODesignSystemVersionsListResponse);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
commit(dsId: string, body: DTOCreateVersionInput) {
|
|
71
|
+
return this.requestExecutor.json(`/design-systems/${dsId}/head/commit`, DTODesignSystemVersionCreationResponse, {
|
|
72
|
+
method: "POST",
|
|
73
|
+
body,
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
job(dsId: string, jobId: string) {
|
|
78
|
+
return this.requestExecutor.json(
|
|
79
|
+
`/design-systems/${dsId}/versions/jobs/${jobId}`,
|
|
80
|
+
DTODesignSystemVersionJobStatusResponse
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
room(dsId: string, vId: string) {
|
|
85
|
+
return this.requestExecutor.json(
|
|
86
|
+
`/design-systems/${dsId}/versions/${vId}/room`,
|
|
87
|
+
DTODesignSystemVersionRoomResponse
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { pickDefined } from "@supernova-studio/model"
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
DTOForgeProjectContextFeedbackCreatePayload,
|
|
5
|
+
DTOForgeProjectContextFeedbackDeletePayload,
|
|
6
|
+
DTOForgeProjectContextFeedbackDeleteResponse,
|
|
7
|
+
DTOForgeProjectContextFeedbackListQuery,
|
|
8
|
+
DTOForgeProjectContextFeedbackListResponse,
|
|
9
|
+
DTOForgeProjectContextFeedbackResponse,
|
|
10
|
+
DTOForgeProjectContextFeedbackUpdatePayload,
|
|
11
|
+
} from "../dto"
|
|
12
|
+
import { RequestExecutor } from "../transport"
|
|
13
|
+
|
|
14
|
+
export class FeedbackEndpoint {
|
|
15
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
16
|
+
|
|
17
|
+
list(query: DTOForgeProjectContextFeedbackListQuery) {
|
|
18
|
+
return this.requestExecutor.json(
|
|
19
|
+
"/feedback",
|
|
20
|
+
DTOForgeProjectContextFeedbackListResponse,
|
|
21
|
+
{
|
|
22
|
+
method: "GET",
|
|
23
|
+
query: new URLSearchParams(pickDefined(query)),
|
|
24
|
+
}
|
|
25
|
+
)
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
create(body: DTOForgeProjectContextFeedbackCreatePayload) {
|
|
29
|
+
return this.requestExecutor.json(
|
|
30
|
+
"/feedback",
|
|
31
|
+
DTOForgeProjectContextFeedbackResponse,
|
|
32
|
+
{
|
|
33
|
+
method: "POST",
|
|
34
|
+
body,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
update(body: DTOForgeProjectContextFeedbackUpdatePayload) {
|
|
40
|
+
return this.requestExecutor.json(
|
|
41
|
+
"/feedback",
|
|
42
|
+
DTOForgeProjectContextFeedbackResponse,
|
|
43
|
+
{
|
|
44
|
+
method: "PUT",
|
|
45
|
+
body,
|
|
46
|
+
}
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
delete(body: DTOForgeProjectContextFeedbackDeletePayload) {
|
|
51
|
+
return this.requestExecutor.json(
|
|
52
|
+
"/feedback",
|
|
53
|
+
DTOForgeProjectContextFeedbackDeleteResponse,
|
|
54
|
+
{
|
|
55
|
+
method: "DELETE",
|
|
56
|
+
body,
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DTOFileFinalizeBulkPayload,
|
|
3
|
+
DTOFileFinalizeBulkResponse,
|
|
4
|
+
DTOFileUploadBulkPayload,
|
|
5
|
+
DTOFileUploadBulkResponse,
|
|
6
|
+
} from "../dto";
|
|
7
|
+
import { RequestExecutor } from "../transport";
|
|
8
|
+
|
|
9
|
+
export class FilesEndpoint {
|
|
10
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
11
|
+
|
|
12
|
+
upload(body: DTOFileUploadBulkPayload) {
|
|
13
|
+
return this.requestExecutor.json(`/files/upload`, DTOFileUploadBulkResponse, {
|
|
14
|
+
method: "POST",
|
|
15
|
+
body,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
finalizeUpload(body: DTOFileFinalizeBulkPayload) {
|
|
20
|
+
return this.requestExecutor.json(`/files/upload/finalize`, DTOFileFinalizeBulkResponse, {
|
|
21
|
+
method: "POST",
|
|
22
|
+
body,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DTOCreateForgeAgent,
|
|
3
|
+
DTOCreateForgeAgentResponse,
|
|
4
|
+
DTODeleteForgeAgentResponse,
|
|
5
|
+
DTOUpdateForgeAgent,
|
|
6
|
+
DTOUpdateForgeAgentResponse,
|
|
7
|
+
} from "../../dto";
|
|
8
|
+
import { RequestExecutor } from "../../transport";
|
|
9
|
+
|
|
10
|
+
export class ForgeAgentsEndpoint {
|
|
11
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
12
|
+
|
|
13
|
+
list(workspaceId: string, projectId: string) {
|
|
14
|
+
return this.requestExecutor.json(
|
|
15
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/agents`,
|
|
16
|
+
DTOUpdateForgeAgentResponse,
|
|
17
|
+
{
|
|
18
|
+
method: "GET",
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
create(workspaceId: string, projectId: string, body: DTOCreateForgeAgent) {
|
|
24
|
+
return this.requestExecutor.json(
|
|
25
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/agents`,
|
|
26
|
+
DTOCreateForgeAgentResponse,
|
|
27
|
+
{
|
|
28
|
+
method: "POST",
|
|
29
|
+
body,
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
update(workspaceId: string, projectId: string, id: string, body: DTOUpdateForgeAgent) {
|
|
35
|
+
return this.requestExecutor.json(
|
|
36
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/agents/${id}`,
|
|
37
|
+
DTOCreateForgeAgentResponse,
|
|
38
|
+
{
|
|
39
|
+
method: "PUT",
|
|
40
|
+
body,
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
delete(workspaceId: string, projectId: string, id: string) {
|
|
46
|
+
return this.requestExecutor.json(
|
|
47
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/agents/${id}`,
|
|
48
|
+
DTODeleteForgeAgentResponse,
|
|
49
|
+
{
|
|
50
|
+
method: "DELETE",
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DTOCreateForgeArtifact,
|
|
3
|
+
DTOCreateForgeArtifactResponse,
|
|
4
|
+
DTODeleteForgeArtifactResponse,
|
|
5
|
+
DTOUpdateForgeArtifact,
|
|
6
|
+
DTOUpdateForgeArtifactResponse,
|
|
7
|
+
} from "../../dto";
|
|
8
|
+
import { RequestExecutor } from "../../transport";
|
|
9
|
+
|
|
10
|
+
export class ForgeArtifactsEndpoint {
|
|
11
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
12
|
+
|
|
13
|
+
list(workspaceId: string, projectId: string, iterationId: string) {
|
|
14
|
+
return this.requestExecutor.json(
|
|
15
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/iterations/${iterationId}/artifacts`,
|
|
16
|
+
DTOUpdateForgeArtifactResponse,
|
|
17
|
+
{
|
|
18
|
+
method: "GET",
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
create(workspaceId: string, projectId: string, iterationId: string, body: DTOCreateForgeArtifact) {
|
|
24
|
+
return this.requestExecutor.json(
|
|
25
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/iterations/${iterationId}/artifacts`,
|
|
26
|
+
DTOCreateForgeArtifactResponse,
|
|
27
|
+
{
|
|
28
|
+
method: "POST",
|
|
29
|
+
body,
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
update(workspaceId: string, projectId: string, iterationId: string, id: string, body: DTOUpdateForgeArtifact) {
|
|
35
|
+
return this.requestExecutor.json(
|
|
36
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/iterations/${iterationId}/artifacts/${id}`,
|
|
37
|
+
DTOCreateForgeArtifactResponse,
|
|
38
|
+
{
|
|
39
|
+
method: "PUT",
|
|
40
|
+
body,
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
delete(workspaceId: string, projectId: string, iterationId: string, id: string) {
|
|
46
|
+
return this.requestExecutor.json(
|
|
47
|
+
`/workspaces/${workspaceId}/forge/projects/${projectId}/iterations/${iterationId}/artifacts/${id}`,
|
|
48
|
+
DTODeleteForgeArtifactResponse,
|
|
49
|
+
{
|
|
50
|
+
method: "DELETE",
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { DTOForgeDocumentGetResponse, DTOForgeProjectArtifactContentResponse } from "../../dto";
|
|
2
|
+
import { RequestExecutor } from "../../transport";
|
|
3
|
+
|
|
4
|
+
export class ForgeDocumentsEndpoint {
|
|
5
|
+
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
6
|
+
|
|
7
|
+
getById(documentId: string) {
|
|
8
|
+
return this.requestExecutor.json(`/forge/documents/${documentId}`, DTOForgeDocumentGetResponse, {});
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
getContentById(documentId: string) {
|
|
12
|
+
return this.requestExecutor.json(
|
|
13
|
+
`/forge/documents/${documentId}/content`,
|
|
14
|
+
DTOForgeProjectArtifactContentResponse,
|
|
15
|
+
{}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
}
|