@supernova-studio/client 0.59.12 → 1.0.0-alpha.11
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 +1592 -1952
- package/dist/index.d.ts +1592 -1952
- package/dist/index.js +865 -392
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2569 -2096
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -3
- package/src/api/client.ts +0 -31
- package/src/api/conversion/documentation/documentation-group-v1-to-dto.ts +0 -114
- package/src/api/conversion/documentation/documentation-group-v2-to-dto.ts +0 -92
- package/src/api/conversion/documentation/documentation-item-configuration-v1-to-dto.ts +0 -52
- package/src/api/conversion/documentation/documentation-item-configuration-v2-to-dto.ts +0 -34
- package/src/api/conversion/documentation/documentation-page-to-dto-utils.ts +0 -131
- package/src/api/conversion/documentation/documentation-page-v1-to-dto.ts +0 -69
- package/src/api/conversion/documentation/documentation-page-v2-to-dto.ts +0 -78
- package/src/api/conversion/documentation/index.ts +0 -7
- package/src/api/conversion/export/index.ts +0 -1
- package/src/api/conversion/export/pipeline.ts +0 -26
- package/src/api/conversion/index.ts +0 -3
- package/src/api/conversion/integrations/git.ts +0 -37
- package/src/api/conversion/integrations/index.ts +0 -2
- package/src/api/conversion/integrations/integration.ts +0 -37
- package/src/api/dto/aux/color.ts +0 -7
- package/src/api/dto/aux/index.ts +0 -3
- package/src/api/dto/aux/meta.ts +0 -8
- package/src/api/dto/aux/pagination.ts +0 -8
- package/src/api/dto/bff/app-bootstrap-data.ts +0 -20
- package/src/api/dto/bff/index.ts +0 -1
- package/src/api/dto/collections/index.ts +0 -1
- package/src/api/dto/collections/token-collection.ts +0 -24
- package/src/api/dto/design-systems/brand.ts +0 -44
- package/src/api/dto/design-systems/component.ts +0 -40
- package/src/api/dto/design-systems/contact.ts +0 -11
- package/src/api/dto/design-systems/data-source.ts +0 -141
- package/src/api/dto/design-systems/design-system.ts +0 -68
- package/src/api/dto/design-systems/elements-diff.ts +0 -14
- package/src/api/dto/design-systems/figma-variables.ts +0 -108
- package/src/api/dto/design-systems/import-job.ts +0 -61
- package/src/api/dto/design-systems/index.ts +0 -15
- package/src/api/dto/design-systems/members.ts +0 -50
- package/src/api/dto/design-systems/redirects.ts +0 -33
- package/src/api/dto/design-systems/role.ts +0 -11
- package/src/api/dto/design-systems/stats.ts +0 -19
- package/src/api/dto/design-systems/version-room.ts +0 -12
- package/src/api/dto/design-systems/version.ts +0 -56
- package/src/api/dto/design-systems/view.ts +0 -45
- package/src/api/dto/design-tokens/design-token.ts +0 -78
- package/src/api/dto/design-tokens/index.ts +0 -1
- package/src/api/dto/documentation/anchor.ts +0 -15
- package/src/api/dto/documentation/approvals.ts +0 -15
- package/src/api/dto/documentation/block-definition.ts +0 -28
- package/src/api/dto/documentation/block.ts +0 -6
- package/src/api/dto/documentation/documentation-page-snapshot.ts +0 -18
- package/src/api/dto/documentation/index.ts +0 -8
- package/src/api/dto/documentation/link-preview.ts +0 -23
- package/src/api/dto/documentation/publish.ts +0 -23
- package/src/api/dto/documentation/room.ts +0 -12
- package/src/api/dto/elements/components/figma-component-group.ts +0 -19
- package/src/api/dto/elements/components/figma-component.ts +0 -56
- package/src/api/dto/elements/components/index.ts +0 -2
- package/src/api/dto/elements/documentation/draft-state.ts +0 -37
- package/src/api/dto/elements/documentation/group-action.ts +0 -108
- package/src/api/dto/elements/documentation/group-v1.ts +0 -35
- package/src/api/dto/elements/documentation/group-v2.ts +0 -117
- package/src/api/dto/elements/documentation/hierarchy.ts +0 -22
- package/src/api/dto/elements/documentation/index.ts +0 -13
- package/src/api/dto/elements/documentation/item-configuration-v1.ts +0 -24
- package/src/api/dto/elements/documentation/item-configuration-v2.ts +0 -14
- package/src/api/dto/elements/documentation/metadata.ts +0 -8
- package/src/api/dto/elements/documentation/page-actions-v2.ts +0 -121
- package/src/api/dto/elements/documentation/page-content.ts +0 -15
- package/src/api/dto/elements/documentation/page-v1.ts +0 -21
- package/src/api/dto/elements/documentation/page-v2.ts +0 -123
- package/src/api/dto/elements/documentation/structure.ts +0 -37
- package/src/api/dto/elements/elements-action-v2.ts +0 -117
- package/src/api/dto/elements/figma-nodes/figma-node-v1.ts +0 -32
- package/src/api/dto/elements/figma-nodes/figma-node-v2.ts +0 -32
- package/src/api/dto/elements/figma-nodes/figma-node.ts +0 -103
- package/src/api/dto/elements/figma-nodes/index.ts +0 -4
- package/src/api/dto/elements/figma-nodes/node-actions-v2.ts +0 -44
- package/src/api/dto/elements/frame-node-structures/frame-node-structure.ts +0 -17
- package/src/api/dto/elements/frame-node-structures/index.ts +0 -1
- package/src/api/dto/elements/get-elements-v2.ts +0 -27
- package/src/api/dto/elements/index.ts +0 -7
- package/src/api/dto/elements/properties/index.ts +0 -2
- package/src/api/dto/elements/properties/property-definitions.ts +0 -75
- package/src/api/dto/elements/properties/property-values.ts +0 -38
- package/src/api/dto/export/exporter-property.ts +0 -105
- package/src/api/dto/export/exporter.ts +0 -87
- package/src/api/dto/export/filter.ts +0 -6
- package/src/api/dto/export/index.ts +0 -5
- package/src/api/dto/export/job.ts +0 -96
- package/src/api/dto/export/pipeline.ts +0 -43
- package/src/api/dto/figma-components/assets/download.ts +0 -30
- package/src/api/dto/figma-components/assets/index.ts +0 -1
- package/src/api/dto/figma-components/index.ts +0 -1
- package/src/api/dto/index.ts +0 -13
- package/src/api/dto/liveblocks/auth-response.ts +0 -7
- package/src/api/dto/liveblocks/index.ts +0 -1
- package/src/api/dto/themes/index.ts +0 -2
- package/src/api/dto/themes/override.ts +0 -27
- package/src/api/dto/themes/theme.ts +0 -45
- package/src/api/dto/users/authenticated-user.ts +0 -46
- package/src/api/dto/users/index.ts +0 -3
- package/src/api/dto/users/update.ts +0 -8
- package/src/api/dto/users/user.ts +0 -31
- package/src/api/dto/workspaces/git.ts +0 -32
- package/src/api/dto/workspaces/index.ts +0 -6
- package/src/api/dto/workspaces/integrations.ts +0 -34
- package/src/api/dto/workspaces/invitations.ts +0 -30
- package/src/api/dto/workspaces/membership.ts +0 -41
- package/src/api/dto/workspaces/npm-registry.ts +0 -35
- package/src/api/dto/workspaces/workspace.ts +0 -34
- package/src/api/endpoints/codegen/codegen.ts +0 -16
- package/src/api/endpoints/codegen/exporters.ts +0 -25
- package/src/api/endpoints/codegen/index.ts +0 -4
- package/src/api/endpoints/codegen/jobs.ts +0 -15
- package/src/api/endpoints/codegen/pipelines.ts +0 -44
- package/src/api/endpoints/design-system/bff.ts +0 -13
- package/src/api/endpoints/design-system/contact.ts +0 -12
- package/src/api/endpoints/design-system/design-systems.ts +0 -55
- package/src/api/endpoints/design-system/index.ts +0 -6
- package/src/api/endpoints/design-system/members.ts +0 -24
- package/src/api/endpoints/design-system/sources.ts +0 -35
- package/src/api/endpoints/design-system/versions/brands.ts +0 -45
- package/src/api/endpoints/design-system/versions/documentation.ts +0 -27
- package/src/api/endpoints/design-system/versions/ds-components.ts +0 -28
- package/src/api/endpoints/design-system/versions/elements-action.ts +0 -63
- package/src/api/endpoints/design-system/versions/elements.ts +0 -27
- package/src/api/endpoints/design-system/versions/figma-component-groups.ts +0 -13
- package/src/api/endpoints/design-system/versions/figma-components.ts +0 -13
- package/src/api/endpoints/design-system/versions/figma-frame-structures.ts +0 -13
- package/src/api/endpoints/design-system/versions/import-jobs.ts +0 -13
- package/src/api/endpoints/design-system/versions/index.ts +0 -18
- package/src/api/endpoints/design-system/versions/overrides.ts +0 -17
- package/src/api/endpoints/design-system/versions/property-definitions.ts +0 -43
- package/src/api/endpoints/design-system/versions/property-values.ts +0 -25
- package/src/api/endpoints/design-system/versions/stats.ts +0 -12
- package/src/api/endpoints/design-system/versions/themes.ts +0 -35
- package/src/api/endpoints/design-system/versions/token-collections.ts +0 -13
- package/src/api/endpoints/design-system/versions/token-groups.ts +0 -28
- package/src/api/endpoints/design-system/versions/tokens.ts +0 -27
- package/src/api/endpoints/design-system/versions/versions.ts +0 -87
- package/src/api/endpoints/index.ts +0 -5
- package/src/api/endpoints/liveblocks.ts +0 -14
- package/src/api/endpoints/users.ts +0 -26
- package/src/api/endpoints/workspaces/index.ts +0 -3
- package/src/api/endpoints/workspaces/workspace-invites.ts +0 -34
- package/src/api/endpoints/workspaces/workspace-members.ts +0 -31
- package/src/api/endpoints/workspaces/workspaces.ts +0 -47
- package/src/api/index.ts +0 -6
- package/src/api/payloads/design-systems/index.ts +0 -2
- package/src/api/payloads/design-systems/update-design-system.ts +0 -29
- package/src/api/payloads/design-systems/version.ts +0 -29
- package/src/api/payloads/documentation/block-definitions.ts +0 -12
- package/src/api/payloads/documentation/design-data-doc-diff.ts +0 -7
- package/src/api/payloads/documentation/index.ts +0 -2
- package/src/api/payloads/export/index.ts +0 -1
- package/src/api/payloads/export/pipeline.ts +0 -74
- package/src/api/payloads/index.ts +0 -6
- package/src/api/payloads/liveblocks/auth.ts +0 -7
- package/src/api/payloads/liveblocks/index.ts +0 -1
- package/src/api/payloads/users/index.ts +0 -2
- package/src/api/payloads/users/notifications/index.ts +0 -1
- package/src/api/payloads/users/notifications/notification-settings.ts +0 -17
- package/src/api/payloads/users/profile/index.ts +0 -1
- package/src/api/payloads/users/profile/update.ts +0 -4
- package/src/api/payloads/workspaces/index.ts +0 -3
- package/src/api/payloads/workspaces/transfer-ownership.ts +0 -7
- package/src/api/payloads/workspaces/workspace-configuration.ts +0 -50
- package/src/api/payloads/workspaces/workspace-integrations.ts +0 -26
- package/src/api/transport/index.ts +0 -2
- package/src/api/transport/request-executor-error.ts +0 -66
- package/src/api/transport/request-executor.ts +0 -87
- package/src/events/design-system.ts +0 -21
- package/src/events/event.ts +0 -6
- package/src/events/index.ts +0 -2
- package/src/index.ts +0 -4
- package/src/utils/figma.ts +0 -72
- package/src/utils/hash.ts +0 -62
- package/src/utils/index.ts +0 -3
- package/src/utils/query.ts +0 -18
- package/src/yjs/design-system-content/documentation-hierarchy.ts +0 -35
- package/src/yjs/design-system-content/index.ts +0 -2
- package/src/yjs/design-system-content/item-configuration.ts +0 -93
- package/src/yjs/docs-editor/blocks-to-prosemirror.ts +0 -764
- package/src/yjs/docs-editor/index.ts +0 -7
- package/src/yjs/docs-editor/list-tree-builder.ts +0 -127
- package/src/yjs/docs-editor/mock.ts +0 -2142
- package/src/yjs/docs-editor/model/block.ts +0 -8
- package/src/yjs/docs-editor/model/index.ts +0 -2
- package/src/yjs/docs-editor/model/page.ts +0 -8
- package/src/yjs/docs-editor/prosemirror/index.ts +0 -3
- package/src/yjs/docs-editor/prosemirror/inner-editor-schema.ts +0 -145
- package/src/yjs/docs-editor/prosemirror/main-editor-schema.ts +0 -577
- package/src/yjs/docs-editor/prosemirror/types.ts +0 -19
- package/src/yjs/docs-editor/prosemirror-to-blocks.ts +0 -975
- package/src/yjs/docs-editor/utils.ts +0 -115
- package/src/yjs/index.ts +0 -3
- package/src/yjs/version-room/backend.ts +0 -83
- package/src/yjs/version-room/base.ts +0 -252
- package/src/yjs/version-room/frontend.ts +0 -463
- package/src/yjs/version-room/index.ts +0 -4
- package/src/yjs/version-room/utils.ts +0 -109
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Subscription, WorkspaceProfile } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { DTONpmRegistryConfig } from "./npm-registry";
|
|
4
|
-
|
|
5
|
-
//
|
|
6
|
-
// Read
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
export const DTOWorkspaceProfile = WorkspaceProfile;
|
|
10
|
-
|
|
11
|
-
export const DTOWorkspace = z.object({
|
|
12
|
-
id: z.string(),
|
|
13
|
-
profile: DTOWorkspaceProfile,
|
|
14
|
-
subscription: Subscription,
|
|
15
|
-
npmRegistry: DTONpmRegistryConfig.optional(),
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export type DTOWorkspaceProfile = z.infer<typeof DTOWorkspaceProfile>;
|
|
19
|
-
export type DTOWorkspace = z.infer<typeof DTOWorkspace>;
|
|
20
|
-
|
|
21
|
-
//
|
|
22
|
-
// Write
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
export const DTOWorkspaceCreateInput = z.object({
|
|
26
|
-
name: z.string(),
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export const DTOWorkspaceResponse = z.object({
|
|
30
|
-
workspace: DTOWorkspace,
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
export type DTOWorkspaceCreateInput = z.infer<typeof DTOWorkspaceCreateInput>;
|
|
34
|
-
export type DTOWorkspaceResponse = z.infer<typeof DTOWorkspaceResponse>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { RequestExecutor } from "../../transport";
|
|
2
|
-
import { ExportersEndpoint } from "./exporters";
|
|
3
|
-
import { ExporterJobsEndpoint } from "./jobs";
|
|
4
|
-
import { PipelinesEndpoint } from "./pipelines";
|
|
5
|
-
|
|
6
|
-
export class CodegenEndpoint {
|
|
7
|
-
readonly exporters: ExportersEndpoint;
|
|
8
|
-
readonly pipelines: PipelinesEndpoint;
|
|
9
|
-
readonly jobs: ExporterJobsEndpoint;
|
|
10
|
-
|
|
11
|
-
constructor(private readonly requestExecutor: RequestExecutor) {
|
|
12
|
-
this.pipelines = new PipelinesEndpoint(requestExecutor);
|
|
13
|
-
this.exporters = new ExportersEndpoint(requestExecutor);
|
|
14
|
-
this.jobs = new ExporterJobsEndpoint(requestExecutor);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { serializeQuery } from "../../../utils";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { DTOExporterCreateInput, DTOExporterResponse, DTOExporterListQuery, DTOExporterListResponse } from "../../dto";
|
|
4
|
-
import { RequestExecutor } from "../../transport";
|
|
5
|
-
|
|
6
|
-
export class ExportersEndpoint {
|
|
7
|
-
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
8
|
-
|
|
9
|
-
add(workspaceId: string, body: DTOExporterCreateInput) {
|
|
10
|
-
return this.requestExecutor.json(`/codegen/workspaces/${workspaceId}/exporters`, DTOExporterResponse, {
|
|
11
|
-
body,
|
|
12
|
-
method: "POST",
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
list(workspaceId: string, query: DTOExporterListQuery) {
|
|
17
|
-
return this.requestExecutor.json(`/codegen/workspaces/${workspaceId}/exporters`, DTOExporterListResponse, {
|
|
18
|
-
query: serializeQuery(query),
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
get(workspaceId: string, exporterId: string) {
|
|
23
|
-
return this.requestExecutor.json(`/codegen/workspaces/${workspaceId}/exporters/${exporterId}`, DTOExporterResponse);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { DTOExportJobResponseLegacy } from "../../dto";
|
|
3
|
-
import { RequestExecutor } from "../../transport";
|
|
4
|
-
|
|
5
|
-
export class ExporterJobsEndpoint {
|
|
6
|
-
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
7
|
-
|
|
8
|
-
list(workspaceId: string) {
|
|
9
|
-
return this.requestExecutor.json(`/codegen/workspaces/${workspaceId}/jobs`, z.any());
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
get(workspaceId: string, jobId: string) {
|
|
13
|
-
return this.requestExecutor.json(`/codegen/workspaces/${workspaceId}/jobs/${jobId}`, DTOExportJobResponseLegacy);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { DTOExportJobResponse, DTOPipelineListQuery, DTOPipelineListResponse, DTOPipelineResponse } from "../../dto";
|
|
2
|
-
import { DTOPipelineCreateBody, DTOPipelineTriggerBody, DTOPipelineUpdateBody } from "../../payloads";
|
|
3
|
-
import { RequestExecutor } from "../../transport";
|
|
4
|
-
|
|
5
|
-
export class PipelinesEndpoint {
|
|
6
|
-
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
7
|
-
|
|
8
|
-
list(workspaceId: string, query: DTOPipelineListQuery) {
|
|
9
|
-
const queryWithStrings = Object.fromEntries(
|
|
10
|
-
Object.entries(query)
|
|
11
|
-
.filter(e => !!e[1])
|
|
12
|
-
.map(([k, v]) => [k, v.toString()])
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
return this.requestExecutor.json(`/codegen/workspaces/${workspaceId}/pipelines`, DTOPipelineListResponse, {
|
|
16
|
-
query: new URLSearchParams(queryWithStrings),
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
create(workspaceId: string, payload: DTOPipelineCreateBody) {
|
|
21
|
-
return this.requestExecutor.json(`/codegen/workspaces/${workspaceId}/pipelines`, DTOPipelineResponse, {
|
|
22
|
-
body: payload,
|
|
23
|
-
method: "POST",
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
update(designSystemId: string, pipelineId: string, payload: DTOPipelineUpdateBody) {
|
|
28
|
-
return this.requestExecutor.json(`/design-systems/${designSystemId}/pipelines/${pipelineId}`, DTOPipelineResponse, {
|
|
29
|
-
body: payload,
|
|
30
|
-
method: "PUT",
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
trigger(workspaceId: string, pipelineId: string, payload: DTOPipelineTriggerBody) {
|
|
35
|
-
return this.requestExecutor.json(
|
|
36
|
-
`/codegen/workspaces/${workspaceId}/pipelines/${pipelineId}/trigger`,
|
|
37
|
-
DTOExportJobResponse,
|
|
38
|
-
{
|
|
39
|
-
body: payload,
|
|
40
|
-
method: "POST",
|
|
41
|
-
}
|
|
42
|
-
);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DTOBffImportRequestBody, DTOImportJobResponse } from "../../dto";
|
|
2
|
-
import { RequestExecutor } from "../../transport/request-executor";
|
|
3
|
-
|
|
4
|
-
export class DesignSystemBffEndpoint {
|
|
5
|
-
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
6
|
-
|
|
7
|
-
import(dsId: string, payload: DTOBffImportRequestBody) {
|
|
8
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/bff/import`, DTOImportJobResponse, {
|
|
9
|
-
method: "POST",
|
|
10
|
-
body: payload,
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DTODesignSystemContactsResponse } from "../../dto";
|
|
2
|
-
import { RequestExecutor } from "../../transport/request-executor";
|
|
3
|
-
|
|
4
|
-
export class DesignSystemContactsEndpoint {
|
|
5
|
-
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
6
|
-
|
|
7
|
-
list(dsId: string) {
|
|
8
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/contacts`, DTODesignSystemContactsResponse, {
|
|
9
|
-
method: "GET",
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { DTODesignSystemCreateInput, DTODesignSystemResponse, DTODesignSystemsListResponse } from "../../dto";
|
|
3
|
-
import { DTODesignSystemUpdateAccessModeInput, DTODesignSystemUpdateInput } from "../../payloads";
|
|
4
|
-
import { RequestExecutor } from "../../transport/request-executor";
|
|
5
|
-
import { DesignSystemBffEndpoint } from "./bff";
|
|
6
|
-
import { DesignSystemMembersEndpoint } from "./members";
|
|
7
|
-
import { DesignSystemSourcesEndpoint } from "./sources";
|
|
8
|
-
import { DesignSystemVersionsEndpoint } from "./versions/versions";
|
|
9
|
-
import { DesignSystemContactsEndpoint } from "./contact";
|
|
10
|
-
|
|
11
|
-
export class DesignSystemsEndpoint {
|
|
12
|
-
readonly members: DesignSystemMembersEndpoint;
|
|
13
|
-
readonly versions: DesignSystemVersionsEndpoint;
|
|
14
|
-
readonly bff: DesignSystemBffEndpoint;
|
|
15
|
-
readonly sources: DesignSystemSourcesEndpoint;
|
|
16
|
-
readonly contacts: DesignSystemContactsEndpoint;
|
|
17
|
-
|
|
18
|
-
constructor(private readonly requestExecutor: RequestExecutor) {
|
|
19
|
-
this.members = new DesignSystemMembersEndpoint(requestExecutor);
|
|
20
|
-
this.versions = new DesignSystemVersionsEndpoint(requestExecutor);
|
|
21
|
-
this.bff = new DesignSystemBffEndpoint(requestExecutor);
|
|
22
|
-
this.sources = new DesignSystemSourcesEndpoint(requestExecutor);
|
|
23
|
-
this.contacts = new DesignSystemContactsEndpoint(requestExecutor);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
create(body: DTODesignSystemCreateInput) {
|
|
27
|
-
return this.requestExecutor.json("/design-systems", DTODesignSystemResponse, { method: "POST", body });
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
list(wsId: string) {
|
|
31
|
-
return this.requestExecutor.json(`/workspaces/${wsId}/design-systems`, DTODesignSystemsListResponse);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
get(dsId: string) {
|
|
35
|
-
return this.requestExecutor.json(`/design-systems/${dsId}`, DTODesignSystemResponse);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
delete(dsId: string) {
|
|
39
|
-
return this.requestExecutor.json(`/design-systems/${dsId}`, z.any(), { method: "DELETE" });
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
update(dsId: string, body: DTODesignSystemUpdateInput) {
|
|
43
|
-
return this.requestExecutor.json(`/design-systems/${dsId}`, DTODesignSystemResponse, {
|
|
44
|
-
method: "PUT",
|
|
45
|
-
body,
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
updateAccessMode(dsId: string, body: DTODesignSystemUpdateAccessModeInput) {
|
|
50
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/access-mode`, DTODesignSystemResponse, {
|
|
51
|
-
method: "PUT",
|
|
52
|
-
body,
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DTODesignSystemMemberListResponse,
|
|
3
|
-
DTODesignSystemMembersUpdatePayload,
|
|
4
|
-
DTODesignSystemMembersUpdateResponse,
|
|
5
|
-
DTOUserGetResponse,
|
|
6
|
-
} from "../../dto";
|
|
7
|
-
import { RequestExecutor } from "../../transport/request-executor";
|
|
8
|
-
|
|
9
|
-
export class DesignSystemMembersEndpoint {
|
|
10
|
-
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
11
|
-
|
|
12
|
-
list(dsId: string) {
|
|
13
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/members`, DTODesignSystemMemberListResponse, {
|
|
14
|
-
method: "GET",
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
update(dsId: string, body: DTODesignSystemMembersUpdatePayload) {
|
|
19
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/members`, DTODesignSystemMembersUpdateResponse, {
|
|
20
|
-
method: "POST",
|
|
21
|
-
body,
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
DTODataSourceFigmaCreatePayload,
|
|
4
|
-
DTODataSourceFigmaImportPayload,
|
|
5
|
-
DTODataSourceResponse,
|
|
6
|
-
DTODataSourcesListResponse,
|
|
7
|
-
DTOImportJobResponse,
|
|
8
|
-
} from "../../dto";
|
|
9
|
-
import { RequestExecutor } from "../../transport/request-executor";
|
|
10
|
-
|
|
11
|
-
export class DesignSystemSourcesEndpoint {
|
|
12
|
-
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
13
|
-
|
|
14
|
-
create(dsId: string, payload: DTODataSourceFigmaCreatePayload) {
|
|
15
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/sources`, DTODataSourceResponse, {
|
|
16
|
-
method: "POST",
|
|
17
|
-
body: payload,
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
list(dsId: string) {
|
|
22
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/sources`, DTODataSourcesListResponse);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
delete(dsId: string, sourceId: string) {
|
|
26
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/sources/${sourceId}`, z.any(), { method: "DELETE" });
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
figmaImport(dsId: string, payload: DTODataSourceFigmaImportPayload) {
|
|
30
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/versions/head/cloud-import`, DTOImportJobResponse, {
|
|
31
|
-
method: "POST",
|
|
32
|
-
body: payload,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { DTOBrandCreatePayload, DTOBrandGetResponse, DTOBrandsListResponse, DTOBrandUpdatePayload } from "../../../dto";
|
|
3
|
-
import { RequestExecutor } from "../../../transport/request-executor";
|
|
4
|
-
|
|
5
|
-
export class BrandsEndpoint {
|
|
6
|
-
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
7
|
-
|
|
8
|
-
get(designSystemId: string, versionId: string, brandId: string) {
|
|
9
|
-
return this.requestExecutor.json(
|
|
10
|
-
`/design-systems/${designSystemId}/versions/${versionId}/brands/${brandId}`,
|
|
11
|
-
DTOBrandGetResponse
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
list(designSystemId: string, versionId: string) {
|
|
16
|
-
return this.requestExecutor.json(
|
|
17
|
-
`/design-systems/${designSystemId}/versions/${versionId}/brands`,
|
|
18
|
-
DTOBrandsListResponse
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
create(designSystemId: string, versionId: string, body: DTOBrandCreatePayload) {
|
|
23
|
-
return this.requestExecutor.json(
|
|
24
|
-
`/design-systems/${designSystemId}/versions/${versionId}/brands`,
|
|
25
|
-
DTOBrandGetResponse,
|
|
26
|
-
{
|
|
27
|
-
method: "POST",
|
|
28
|
-
body,
|
|
29
|
-
}
|
|
30
|
-
);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
update(dsId: string, vId: string, brandId: string, body: DTOBrandUpdatePayload) {
|
|
34
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${vId}/brands/${brandId}`, DTOBrandGetResponse, {
|
|
35
|
-
method: "PUT",
|
|
36
|
-
body,
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
delete(dsId: string, vId: string, brandId: string) {
|
|
41
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${vId}/brands/${brandId}`, z.any(), {
|
|
42
|
-
method: "DELETE",
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { DTODocumentationPageRoomResponse, DTODocumentationStructure } from "../../../dto";
|
|
2
|
-
import { RequestExecutor } from "../../../transport/request-executor";
|
|
3
|
-
|
|
4
|
-
export class DocumentationEndpoint {
|
|
5
|
-
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
6
|
-
|
|
7
|
-
async getStructure(designSystemId: string, versionId: string) {
|
|
8
|
-
return await this.requestExecutor.json(
|
|
9
|
-
`/design-systems/${designSystemId}/versions/${versionId}/documentation/structure`,
|
|
10
|
-
DTODocumentationStructure
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
async getDocStructure(dsId: string, vId: string) {
|
|
15
|
-
return await this.requestExecutor.json(
|
|
16
|
-
`/design-systems/${dsId}/versions/${vId}/documentation/structure`,
|
|
17
|
-
DTODocumentationStructure
|
|
18
|
-
);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async getPageRoom(dsId: string, vId: string, pageId: string) {
|
|
22
|
-
return await this.requestExecutor.json(
|
|
23
|
-
`/design-systems/${dsId}/versions/${vId}/documentation/pages/${pageId}/room`,
|
|
24
|
-
DTODocumentationPageRoomResponse
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
DTODesignSystemComponentCreateInput,
|
|
3
|
-
DTODesignSystemComponentListResponse,
|
|
4
|
-
DTODesignSystemComponentResponse,
|
|
5
|
-
} from "../../../dto/design-systems/component";
|
|
6
|
-
import { RequestExecutor } from "../../../transport/request-executor";
|
|
7
|
-
|
|
8
|
-
export class DesignSystemComponentEndpoint {
|
|
9
|
-
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
10
|
-
|
|
11
|
-
async list(dsId: string, vId: string) {
|
|
12
|
-
return this.requestExecutor.json(
|
|
13
|
-
`/design-systems/${dsId}/versions/${vId}/design-system-components`,
|
|
14
|
-
DTODesignSystemComponentListResponse
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
async create(dsId: string, vId: string, body: DTODesignSystemComponentCreateInput) {
|
|
19
|
-
return this.requestExecutor.json(
|
|
20
|
-
`/design-systems/${dsId}/versions/${vId}/design-system-components`,
|
|
21
|
-
DTODesignSystemComponentResponse,
|
|
22
|
-
{
|
|
23
|
-
body,
|
|
24
|
-
method: "POST",
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { randomUUID } from "node:crypto";
|
|
2
|
-
import {
|
|
3
|
-
DTOCreateDocumentationGroupInput,
|
|
4
|
-
DTOCreateDocumentationPageInputV2,
|
|
5
|
-
DTOCreateDocumentationTabInput,
|
|
6
|
-
DTOElementActionInput,
|
|
7
|
-
DTOElementActionOutput,
|
|
8
|
-
DTOFigmaNodeRenderIdInput,
|
|
9
|
-
DTOFigmaNodeRenderInput,
|
|
10
|
-
DTOMoveDocumentationGroupInput,
|
|
11
|
-
DTOUpdateDocumentationGroupInput,
|
|
12
|
-
DTOUpdateDocumentationPageInputV2,
|
|
13
|
-
} from "../../../dto";
|
|
14
|
-
import { RequestExecutor } from "../../../transport/request-executor";
|
|
15
|
-
|
|
16
|
-
export class ElementsActionEndpoint {
|
|
17
|
-
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
18
|
-
|
|
19
|
-
async createDocPage(dsId: string, vId: string, input: DTOCreateDocumentationPageInputV2) {
|
|
20
|
-
return this.action(dsId, vId, { type: "DocumentationPageCreate", input });
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
async createDocGroup(dsId: string, vId: string, input: DTOCreateDocumentationGroupInput) {
|
|
24
|
-
return this.action(dsId, vId, { type: "DocumentationGroupCreate", input });
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
async moveDocGroup(dsId: string, vId: string, input: DTOMoveDocumentationGroupInput) {
|
|
28
|
-
return this.action(dsId, vId, { type: "DocumentationGroupMove", input });
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
async updateDocPage(dsId: string, vId: string, input: DTOUpdateDocumentationPageInputV2) {
|
|
32
|
-
return this.action(dsId, vId, { type: "DocumentationPageUpdate", input });
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
async updateDocGroup(dsId: string, vId: string, input: DTOUpdateDocumentationGroupInput) {
|
|
36
|
-
return this.action(dsId, vId, { type: "DocumentationGroupUpdate", input });
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
async createDocTab(dsId: string, vId: string, input: DTOCreateDocumentationTabInput) {
|
|
40
|
-
return this.action(dsId, vId, { type: "DocumentationTabCreate", input });
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
async renderNodes(dsId: string, vId: string, input: DTOFigmaNodeRenderIdInput[]) {
|
|
44
|
-
return this.action(dsId, vId, { type: "FigmaNodeRender", input });
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
async renderNodesAsync(dsId: string, vId: string, nodes: DTOFigmaNodeRenderInput[]) {
|
|
48
|
-
return this.action(dsId, vId, { type: "FigmaNodeRenderAsync", nodes });
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
private async action(dsId: string, vId: string, input: DTOElementActionInput) {
|
|
52
|
-
if (!input.tId) input.tId = randomUUID();
|
|
53
|
-
|
|
54
|
-
return this.requestExecutor.json(
|
|
55
|
-
`/design-systems/${dsId}/versions/${vId}/elements-action`,
|
|
56
|
-
DTOElementActionOutput,
|
|
57
|
-
{
|
|
58
|
-
body: input,
|
|
59
|
-
method: "POST",
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { OmitStrict } from "@supernova-studio/model";
|
|
2
|
-
import { serializeQuery } from "../../../../utils";
|
|
3
|
-
import { DTOElementsGetOutput, DTOElementsGetOutputV2, DTOElementsGetQueryParsed } from "../../../dto";
|
|
4
|
-
import { RequestExecutor } from "../../../transport/request-executor";
|
|
5
|
-
|
|
6
|
-
type GetElementsQuery = OmitStrict<DTOElementsGetQueryParsed, "responseVersion">;
|
|
7
|
-
|
|
8
|
-
export class ElementsEndpoint {
|
|
9
|
-
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
10
|
-
|
|
11
|
-
getElementsV1(dsId: string, vId: string, query: GetElementsQuery) {
|
|
12
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${vId}/elements`, DTOElementsGetOutput, {
|
|
13
|
-
query: serializeQuery(query),
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
getElementsV2(dsId: string, vId: string, query: GetElementsQuery) {
|
|
18
|
-
const fullQuery: DTOElementsGetQueryParsed = {
|
|
19
|
-
...query,
|
|
20
|
-
responseVersion: 2,
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
return this.requestExecutor.json(`/design-systems/${dsId}/versions/${vId}/elements`, DTOElementsGetOutputV2, {
|
|
24
|
-
query: serializeQuery(fullQuery),
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { DTOFigmaComponentListResponse } from "../../../dto";
|
|
2
|
-
import { RequestExecutor } from "../../../transport/request-executor";
|
|
3
|
-
|
|
4
|
-
export class FigmaComponentsEndpoint {
|
|
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}/components`,
|
|
10
|
-
DTOFigmaComponentListResponse
|
|
11
|
-
);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
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 "./import-jobs";
|
|
10
|
-
export * from "./overrides";
|
|
11
|
-
export * from "./property-definitions";
|
|
12
|
-
export * from "./property-values";
|
|
13
|
-
export * from "./stats";
|
|
14
|
-
export * from "./themes";
|
|
15
|
-
export * from "./token-collections";
|
|
16
|
-
export * from "./token-groups";
|
|
17
|
-
export * from "./tokens";
|
|
18
|
-
export * from "./versions";
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
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
|
-
}
|