@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,50 +0,0 @@
|
|
|
1
|
-
import { DesignSystemMembershipUpdates } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { DTODesignSystemRole } from "./role";
|
|
4
|
-
|
|
5
|
-
//
|
|
6
|
-
// Read
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
export const DTODesignSystemMember = z.object({
|
|
10
|
-
userId: z.string(),
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Role that the member has in the design system,
|
|
14
|
-
* undefined if set to inherit from workspace
|
|
15
|
-
*/
|
|
16
|
-
designSystemRole: DTODesignSystemRole.optional(),
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
export const DTODesignSystemInvitation = z.object({
|
|
20
|
-
id: z.string(),
|
|
21
|
-
workspaceInvitationId: z.string(),
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Role that the invitation has in the design system,
|
|
25
|
-
* undefined if set to inherit from workspace
|
|
26
|
-
*/
|
|
27
|
-
designSystemRole: DTODesignSystemRole.optional(),
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
export const DTODesignSystemMemberListResponse = z.object({
|
|
31
|
-
members: DTODesignSystemMember.array(),
|
|
32
|
-
invitations: DTODesignSystemInvitation.array(),
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
export const DTODesignSystemMembersUpdateResponse = z.object({
|
|
36
|
-
ok: z.literal(true),
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
export type DTODesignSystemMember = z.infer<typeof DTODesignSystemMember>;
|
|
40
|
-
export type DTODesignSystemInvitation = z.infer<typeof DTODesignSystemInvitation>;
|
|
41
|
-
export type DTODesignSystemMemberListResponse = z.infer<typeof DTODesignSystemMemberListResponse>;
|
|
42
|
-
export type DTODesignSystemMembersUpdateResponse = z.infer<typeof DTODesignSystemMembersUpdateResponse>;
|
|
43
|
-
|
|
44
|
-
//
|
|
45
|
-
// Write
|
|
46
|
-
//
|
|
47
|
-
|
|
48
|
-
export const DTODesignSystemMembersUpdatePayload = DesignSystemMembershipUpdates;
|
|
49
|
-
|
|
50
|
-
export type DTODesignSystemMembersUpdatePayload = z.infer<typeof DTODesignSystemMembersUpdatePayload>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
export const DTOPageRedirectCreateBody = z.object({
|
|
4
|
-
pagePersistentId: z.string(),
|
|
5
|
-
path: z.string(),
|
|
6
|
-
});
|
|
7
|
-
|
|
8
|
-
export const DTOPageRedirectUpdateBody = DTOPageRedirectCreateBody.partial();
|
|
9
|
-
|
|
10
|
-
export const DTOPageRedirect = z.object({
|
|
11
|
-
id: z.string(),
|
|
12
|
-
pagePersistentId: z.string(),
|
|
13
|
-
path: z.string(),
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
export const DTOPageRedirectListResponse = z.object({
|
|
17
|
-
redirects: DTOPageRedirect.array(),
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
export const DTOPageRedirectResponse = z.object({
|
|
21
|
-
redirect: DTOPageRedirect,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
export const DTOPageRedirectDeleteResponse = z.object({
|
|
25
|
-
success: z.boolean(),
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export type DTOPageRedirectCreateBody = z.infer<typeof DTOPageRedirectCreateBody>;
|
|
29
|
-
export type DTOPageRedirectUpdateBody = z.infer<typeof DTOPageRedirectUpdateBody>;
|
|
30
|
-
export type DTOPageRedirect = z.infer<typeof DTOPageRedirect>;
|
|
31
|
-
export type DTOPageRedirectListResponse = z.infer<typeof DTOPageRedirectListResponse>;
|
|
32
|
-
export type DTOPageRedirectResponse = z.infer<typeof DTOPageRedirectResponse>;
|
|
33
|
-
export type DTOPageRedirectDeleteResponse = z.infer<typeof DTOPageRedirectDeleteResponse>;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { WorkspaceRole } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
export const DTODesignSystemRole = z.enum([
|
|
5
|
-
WorkspaceRole.Admin,
|
|
6
|
-
WorkspaceRole.Contributor,
|
|
7
|
-
WorkspaceRole.Creator,
|
|
8
|
-
WorkspaceRole.Viewer,
|
|
9
|
-
]);
|
|
10
|
-
|
|
11
|
-
export type DTODesignSystemRole = z.infer<typeof DTODesignSystemRole>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
export const DTODesignSystemVersionStats = z.object({
|
|
4
|
-
tokens: z.number(),
|
|
5
|
-
designSystemComponents: z.number(),
|
|
6
|
-
assets: z.number(),
|
|
7
|
-
documentationPages: z.number(),
|
|
8
|
-
figmaComponents: z.number(),
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export const DTODesignSystemVersionStatsQuery = z.object({
|
|
12
|
-
/**
|
|
13
|
-
* Unique ID across versions (non-persistent ID)
|
|
14
|
-
*/
|
|
15
|
-
brandId: z.string().optional(),
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export type DTODesignSystemVersionStats = z.infer<typeof DTODesignSystemVersionStats>;
|
|
19
|
-
export type DTODesignSystemVersionStatsQuery = z.infer<typeof DTODesignSystemVersionStatsQuery>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
export const DTODesignSystemVersionRoom = z.object({
|
|
4
|
-
id: z.string(),
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
export const DTODesignSystemVersionRoomResponse = z.object({
|
|
8
|
-
room: DTODesignSystemVersionRoom,
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export type DTODesignSystemVersionRoom = z.infer<typeof DTODesignSystemVersionRoom>;
|
|
12
|
-
export type DTODesignSystemVersionRoomResponse = z.infer<typeof DTODesignSystemVersionRoomResponse>;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { ObjectMeta, VersionCreationJob } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { DTOCreateVersionInput } from "../../payloads";
|
|
4
|
-
|
|
5
|
-
export const DTODesignSystemVersion = z.object({
|
|
6
|
-
id: z.string(),
|
|
7
|
-
createdAt: z.coerce.date(),
|
|
8
|
-
meta: ObjectMeta,
|
|
9
|
-
version: z.string(),
|
|
10
|
-
isReadonly: z.boolean(),
|
|
11
|
-
changeLog: z.string(),
|
|
12
|
-
designSystemId: z.string(),
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export const DTODesignSystemVersionsListResponse = z.object({
|
|
16
|
-
designSystemVersions: z.array(DTODesignSystemVersion),
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
export const DTODesignSystemVersionGetResponse = z.object({
|
|
20
|
-
designSystemVersion: DTODesignSystemVersion,
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export const DTODesignSystemVersionCreationResponse = z.object({
|
|
24
|
-
meta: ObjectMeta,
|
|
25
|
-
version: z.string(),
|
|
26
|
-
changeLog: z.string(),
|
|
27
|
-
isReadOnly: z.boolean(),
|
|
28
|
-
designSystemId: z.string(),
|
|
29
|
-
jobId: z.string(),
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
export const VersionSQSPayload = z.object({
|
|
33
|
-
jobId: z.string(),
|
|
34
|
-
designSystemId: z.string(),
|
|
35
|
-
input: DTOCreateVersionInput,
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
export type VersionSQSPayload = z.infer<typeof VersionSQSPayload>;
|
|
39
|
-
|
|
40
|
-
export type DTODesignSystemVersionCreationResponse = z.infer<typeof DTODesignSystemVersionCreationResponse>;
|
|
41
|
-
export type DTODesignSystemVersion = z.infer<typeof DTODesignSystemVersion>;
|
|
42
|
-
export type DTODesignSystemVersionsListResponse = z.infer<typeof DTODesignSystemVersionsListResponse>;
|
|
43
|
-
export type DTODesignSystemVersionGetResponse = z.infer<typeof DTODesignSystemVersionGetResponse>;
|
|
44
|
-
|
|
45
|
-
export const DTODesignSystemVersionJobsResponse = z.object({
|
|
46
|
-
jobs: z.array(VersionCreationJob),
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
export type DTODesignSystemVersionJobsResponse = z.infer<typeof DTODesignSystemVersionJobsResponse>;
|
|
50
|
-
|
|
51
|
-
// Creation job status response
|
|
52
|
-
export const DTODesignSystemVersionJobStatusResponse = z.object({
|
|
53
|
-
job: VersionCreationJob,
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
export type DTODesignSystemVersionJobStatusResponse = z.infer<typeof DTODesignSystemVersionJobStatusResponse>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { ElementPropertyTargetType, ElementViewBaseColumnType, ObjectMeta } from "@supernova-studio/model";
|
|
3
|
-
|
|
4
|
-
export const DTOElementViewColumnSharedAttributes = z.object({
|
|
5
|
-
id: z.string(),
|
|
6
|
-
persistentId: z.string(),
|
|
7
|
-
width: z.number(),
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export const DTOElementViewBasePropertyColumn = DTOElementViewColumnSharedAttributes.extend({
|
|
11
|
-
type: z.literal("BaseProperty"),
|
|
12
|
-
basePropertyType: ElementViewBaseColumnType,
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export const DTOElementViewPropertyDefinitionColumn = DTOElementViewColumnSharedAttributes.extend({
|
|
16
|
-
type: z.literal("PropertyDefinition"),
|
|
17
|
-
propertyDefinitionId: z.string(),
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
export const DTOElementViewThemeColumn = DTOElementViewColumnSharedAttributes.extend({
|
|
21
|
-
type: z.literal("Theme"),
|
|
22
|
-
themeId: z.string(),
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
export const DTOElementViewColumn = z.discriminatedUnion("type", [
|
|
26
|
-
DTOElementViewBasePropertyColumn,
|
|
27
|
-
DTOElementViewPropertyDefinitionColumn,
|
|
28
|
-
DTOElementViewThemeColumn,
|
|
29
|
-
]);
|
|
30
|
-
|
|
31
|
-
export const DTOElementView = z.object({
|
|
32
|
-
meta: ObjectMeta,
|
|
33
|
-
persistentId: z.string(),
|
|
34
|
-
targetElementType: ElementPropertyTargetType,
|
|
35
|
-
id: z.string(),
|
|
36
|
-
isDefault: z.boolean(),
|
|
37
|
-
columns: z.array(DTOElementViewColumn),
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
export const DTOElementViewsListResponse = z.object({
|
|
41
|
-
elementDataViews: z.array(DTOElementView),
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
export type DTOElementView = z.infer<typeof DTOElementView>;
|
|
45
|
-
export type DTOElementViewsListResponse = z.infer<typeof DTOElementViewsListResponse>;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { DesignTokenOrigin, DesignTokenType, DesignTokenTypedData, ObjectMeta } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
// Read
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
export const DTODesignToken = DesignTokenTypedData.and(
|
|
9
|
-
z.object({
|
|
10
|
-
id: z.string(),
|
|
11
|
-
persistentId: z.string(),
|
|
12
|
-
designSystemVersionId: z.string(),
|
|
13
|
-
meta: ObjectMeta,
|
|
14
|
-
originStyle: DesignTokenOrigin.optional(),
|
|
15
|
-
brandId: z.string(),
|
|
16
|
-
collectionId: z.string().optional(),
|
|
17
|
-
updatedAt: z.coerce.date(),
|
|
18
|
-
})
|
|
19
|
-
);
|
|
20
|
-
|
|
21
|
-
export const DTODesignTokenListResponse = z.object({
|
|
22
|
-
tokens: DTODesignToken.array(),
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
export const DTODesignTokenResponse = z.object({
|
|
26
|
-
token: DTODesignToken,
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export const DTODesignTokenGroup = z.object({
|
|
30
|
-
id: z.string(),
|
|
31
|
-
tokenType: DesignTokenType,
|
|
32
|
-
persistentId: z.string(),
|
|
33
|
-
isRoot: z.boolean(),
|
|
34
|
-
brandId: z.string(),
|
|
35
|
-
meta: ObjectMeta,
|
|
36
|
-
childrenIds: z.string().array(),
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
export const DTODesignTokenGroupListResponse = z.object({
|
|
40
|
-
groups: DTODesignTokenGroup.array(),
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
export const DTODesignTokenGroupResponse = z.object({
|
|
44
|
-
group: DTODesignTokenGroup,
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
export type DTODesignToken = z.infer<typeof DTODesignToken>;
|
|
48
|
-
export type DTODesignTokenResponse = z.infer<typeof DTODesignTokenResponse>;
|
|
49
|
-
export type DTODesignTokenListResponse = z.infer<typeof DTODesignTokenListResponse>;
|
|
50
|
-
|
|
51
|
-
export type DTODesignTokenGroup = z.infer<typeof DTODesignTokenGroup>;
|
|
52
|
-
export type DTODesignTokenGroupListResponse = z.infer<typeof DTODesignTokenGroupListResponse>;
|
|
53
|
-
export type DTODesignTokenGroupResponse = z.infer<typeof DTODesignTokenGroupResponse>;
|
|
54
|
-
|
|
55
|
-
//
|
|
56
|
-
// Write
|
|
57
|
-
//
|
|
58
|
-
|
|
59
|
-
export const DTODesignTokenCreatePayload = DesignTokenTypedData.and(
|
|
60
|
-
z.object({
|
|
61
|
-
persistentId: z.string(),
|
|
62
|
-
meta: ObjectMeta,
|
|
63
|
-
brandId: z.string(),
|
|
64
|
-
groupPersistentId: z.string().optional(),
|
|
65
|
-
})
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
export const DTODesignTokenGroupCreatePayload = z.object({
|
|
69
|
-
persistentId: z.string(),
|
|
70
|
-
meta: ObjectMeta,
|
|
71
|
-
brandId: z.string(),
|
|
72
|
-
parentId: z.string().optional(),
|
|
73
|
-
tokenType: DesignTokenType,
|
|
74
|
-
childrenIds: z.string().array(),
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
export type DTODesignTokenCreatePayload = z.infer<typeof DTODesignTokenCreatePayload>;
|
|
78
|
-
export type DTODesignTokenGroupCreatePayload = z.infer<typeof DTODesignTokenGroupCreatePayload>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./design-token";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DocumentationPageAnchor } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
// Read
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
export const DTODocumentationPageAnchor = DocumentationPageAnchor;
|
|
9
|
-
|
|
10
|
-
export const DTOGetDocumentationPageAnchorsResponse = z.object({
|
|
11
|
-
anchors: z.array(DTODocumentationPageAnchor),
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
export type DTODocumentationPageAnchor = z.infer<typeof DTODocumentationPageAnchor>;
|
|
15
|
-
export type DTOGetDocumentationPageAnchorsResponse = z.infer<typeof DTOGetDocumentationPageAnchorsResponse>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { DocumentationPageApproval, DocumentationPageApprovalState } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
export const DTODocumentationPageApprovalState = DocumentationPageApproval;
|
|
5
|
-
|
|
6
|
-
export type DTODocumentationPageApprovalState = DocumentationPageApproval;
|
|
7
|
-
|
|
8
|
-
export const DTODocumentationGroupApprovalState = z.object({
|
|
9
|
-
persistentId: z.string(),
|
|
10
|
-
groupId: z.string(),
|
|
11
|
-
designSystemVersionId: z.string(),
|
|
12
|
-
approvalState: DocumentationPageApprovalState,
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export type DTODocumentationGroupApprovalState = z.infer<typeof DTODocumentationGroupApprovalState>;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
PageBlockColorV2,
|
|
3
|
-
PageBlockDefinition,
|
|
4
|
-
PageBlockDefinitionBehavior,
|
|
5
|
-
PageBlockDefinitionItem,
|
|
6
|
-
PageBlockDefinitionLayout,
|
|
7
|
-
PageBlockDefinitionProperty,
|
|
8
|
-
PageBlockDefinitionVariant,
|
|
9
|
-
} from "@supernova-studio/model";
|
|
10
|
-
import { z } from "zod";
|
|
11
|
-
|
|
12
|
-
export const DTOPageBlockDefinitionBehavior = PageBlockDefinitionBehavior;
|
|
13
|
-
export const DTOPageBlockDefinitionItem = PageBlockDefinitionItem;
|
|
14
|
-
export const DTOPageBlockDefinitionLayout = PageBlockDefinitionLayout;
|
|
15
|
-
export const DTOPageBlockDefinitionVariant = PageBlockDefinitionVariant;
|
|
16
|
-
export const DTOPageBlockDefinitionProperty = PageBlockDefinitionProperty;
|
|
17
|
-
export const DTOPageBlockColorV2 = PageBlockColorV2;
|
|
18
|
-
|
|
19
|
-
export const DTOPageBlockDefinition = PageBlockDefinition;
|
|
20
|
-
|
|
21
|
-
export type DTOPageBlockDefinitionBehavior = z.infer<typeof DTOPageBlockDefinitionBehavior>;
|
|
22
|
-
export type DTOPageBlockDefinitionItem = z.infer<typeof DTOPageBlockDefinitionItem>;
|
|
23
|
-
export type DTOPageBlockDefinitionLayout = z.infer<typeof DTOPageBlockDefinitionLayout>;
|
|
24
|
-
export type DTOPageBlockDefinitionVariant = z.infer<typeof DTOPageBlockDefinitionVariant>;
|
|
25
|
-
export type DTOPageBlockDefinitionProperty = z.infer<typeof DTOPageBlockDefinitionProperty>;
|
|
26
|
-
export type DTOPageBlockColorV2 = z.infer<typeof DTOPageBlockColorV2>;
|
|
27
|
-
|
|
28
|
-
export type DTOPageBlockDefinition = z.infer<typeof DTOPageBlockDefinition>;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DesignElementSnapshotReason } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { DTODocumentationPageV2 } from "../elements/documentation/page-v2";
|
|
4
|
-
|
|
5
|
-
export const DTODocumentationPageSnapshot = z.object({
|
|
6
|
-
id: z.string(),
|
|
7
|
-
designSystemVersionId: z.string(),
|
|
8
|
-
|
|
9
|
-
createdAt: z.string(),
|
|
10
|
-
updatedAt: z.string(),
|
|
11
|
-
|
|
12
|
-
documentationPage: DTODocumentationPageV2,
|
|
13
|
-
pageContentHash: z.string(),
|
|
14
|
-
|
|
15
|
-
reason: DesignElementSnapshotReason,
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export type DTODocumentationPageSnapshot = z.infer<typeof DTODocumentationPageSnapshot>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { DocumentationLinkPreview } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
// Read
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
export const DTODocumentationLinkPreviewResponse = z.object({
|
|
9
|
-
linkPreview: DocumentationLinkPreview,
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export type DTODocumentationLinkPreviewResponse = z.infer<typeof DTODocumentationLinkPreviewResponse>;
|
|
13
|
-
|
|
14
|
-
//
|
|
15
|
-
// Write
|
|
16
|
-
//
|
|
17
|
-
|
|
18
|
-
export const DTODocumentationLinkPreviewRequest = z.object({
|
|
19
|
-
url: z.string().optional(),
|
|
20
|
-
documentationItemPersistentId: z.string().optional(),
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export type DTODocumentationLinkPreviewRequest = z.infer<typeof DTODocumentationLinkPreviewRequest>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ExportJobDocumentationChanges, PublishedDocEnvironment } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { DTOExportJob } from "../export";
|
|
4
|
-
|
|
5
|
-
export const DTOPublishDocumentationChanges = ExportJobDocumentationChanges;
|
|
6
|
-
|
|
7
|
-
export const DTOPublishDocumentationRequest = z.object({
|
|
8
|
-
environment: PublishedDocEnvironment,
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* If defined, this allows narrowing down what is published to a set of specific pages and groups
|
|
12
|
-
* If undefined, everything will be published.
|
|
13
|
-
*/
|
|
14
|
-
changes: DTOPublishDocumentationChanges.optional(),
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
export const DTOPublishDocumentationResponse = z.object({
|
|
18
|
-
job: DTOExportJob,
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
export type DTOPublishDocumentationChanges = z.infer<typeof DTOPublishDocumentationChanges>;
|
|
22
|
-
export type DTOPublishDocumentationRequest = z.infer<typeof DTOPublishDocumentationRequest>;
|
|
23
|
-
export type DTOPublishDocumentationResponse = z.infer<typeof DTOPublishDocumentationResponse>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
export const DTODocumentationPageRoom = z.object({
|
|
4
|
-
id: z.string(),
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
export const DTODocumentationPageRoomResponse = z.object({
|
|
8
|
-
room: DTODocumentationPageRoom,
|
|
9
|
-
});
|
|
10
|
-
|
|
11
|
-
export type DTODocumentationPageRoom = z.infer<typeof DTODocumentationPageRoom>;
|
|
12
|
-
export type DTODocumentationPageRoomResponse = z.infer<typeof DTODocumentationPageRoomResponse>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import z from "zod";
|
|
2
|
-
import { DTOObjectMeta } from "../../aux/meta";
|
|
3
|
-
|
|
4
|
-
export const DTOFigmaComponentGroup = z.object({
|
|
5
|
-
id: z.string(),
|
|
6
|
-
designSystemVersionId: z.string(),
|
|
7
|
-
persistentId: z.string(),
|
|
8
|
-
isRoot: z.boolean(),
|
|
9
|
-
brandId: z.string(),
|
|
10
|
-
meta: DTOObjectMeta,
|
|
11
|
-
childrenIds: z.string().array(),
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
export const DTOFigmaComponentGroupListResponse = z.object({
|
|
15
|
-
groups: DTOFigmaComponentGroup.array(),
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export type DTOFigmaComponentGroup = z.infer<typeof DTOFigmaComponentGroup>;
|
|
19
|
-
export type DTOFigmaComponentGroupListResponse = z.infer<typeof DTOFigmaComponentGroupListResponse>;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FigmaComponentBooleanProperty,
|
|
3
|
-
FigmaComponentInstanceSwapProperty,
|
|
4
|
-
FigmaComponentOrigin,
|
|
5
|
-
FigmaComponentProperty,
|
|
6
|
-
FigmaComponentTextProperty,
|
|
7
|
-
FigmaComponentVariantProperty,
|
|
8
|
-
ObjectMeta,
|
|
9
|
-
} from "@supernova-studio/model";
|
|
10
|
-
import { z } from "zod";
|
|
11
|
-
|
|
12
|
-
const DTOFigmaComponentBooleanProperty = FigmaComponentBooleanProperty;
|
|
13
|
-
const DTOFigmaComponentInstanceSwapProperty = FigmaComponentInstanceSwapProperty;
|
|
14
|
-
const DTOFigmaComponentTextProperty = FigmaComponentTextProperty;
|
|
15
|
-
const DTOFigmaComponentVariantProperty = FigmaComponentVariantProperty;
|
|
16
|
-
const DTOFigmaComponentProperty = FigmaComponentProperty;
|
|
17
|
-
const DTOFigmaComponentPropertyMap = z.record(DTOFigmaComponentProperty);
|
|
18
|
-
|
|
19
|
-
export const DTOFigmaComponent = z.object({
|
|
20
|
-
id: z.string(),
|
|
21
|
-
persistentId: z.string(),
|
|
22
|
-
designSystemVersionId: z.string(),
|
|
23
|
-
brandId: z.string(),
|
|
24
|
-
thumbnailUrl: z.string().optional(),
|
|
25
|
-
svgUrl: z.string().optional(),
|
|
26
|
-
|
|
27
|
-
exportProperties: z.object({
|
|
28
|
-
isAsset: z.boolean(),
|
|
29
|
-
}),
|
|
30
|
-
|
|
31
|
-
createdAt: z.coerce.date(),
|
|
32
|
-
updatedAt: z.coerce.date(),
|
|
33
|
-
|
|
34
|
-
meta: ObjectMeta,
|
|
35
|
-
originComponent: FigmaComponentOrigin.optional(),
|
|
36
|
-
|
|
37
|
-
parentComponentPersistentId: z.string().optional(),
|
|
38
|
-
childrenPersistentIds: z.string().array().optional(),
|
|
39
|
-
|
|
40
|
-
componentPropertyDefinitions: DTOFigmaComponentPropertyMap.optional(),
|
|
41
|
-
variantPropertyValues: z.record(z.string()).optional(),
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
export const DTOFigmaComponentListResponse = z.object({
|
|
45
|
-
components: DTOFigmaComponent.array(),
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
export type DTOFigmaComponentBooleanProperty = z.infer<typeof DTOFigmaComponentBooleanProperty>;
|
|
49
|
-
export type DTOFigmaComponentInstanceSwapProperty = z.infer<typeof DTOFigmaComponentInstanceSwapProperty>;
|
|
50
|
-
export type DTOFigmaComponentTextProperty = z.infer<typeof DTOFigmaComponentTextProperty>;
|
|
51
|
-
export type DTOFigmaComponentVariantProperty = z.infer<typeof DTOFigmaComponentVariantProperty>;
|
|
52
|
-
export type DTOFigmaComponentProperty = z.infer<typeof DTOFigmaComponentProperty>;
|
|
53
|
-
export type DTOFigmaComponentPropertyMap = z.infer<typeof DTOFigmaComponentPropertyMap>;
|
|
54
|
-
|
|
55
|
-
export type DTOFigmaComponent = z.infer<typeof DTOFigmaComponent>;
|
|
56
|
-
export type DTOFigmaComponentListResponse = z.infer<typeof DTOFigmaComponentListResponse>;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { DTODocumentationItemConfigurationV2 } from "./item-configuration-v2";
|
|
3
|
-
|
|
4
|
-
export const DTODocumentationDraftChangeType = z.enum(["Created", "Updated", "Deleted"]);
|
|
5
|
-
|
|
6
|
-
export const DTODocumentationDraftStateCreated = z.object({
|
|
7
|
-
changeType: z.literal(DTODocumentationDraftChangeType.enum.Created),
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export const DTODocumentationDraftStateUpdated = z.object({
|
|
11
|
-
changeType: z.literal(DTODocumentationDraftChangeType.enum.Updated),
|
|
12
|
-
changes: z.object({
|
|
13
|
-
previousTitle: z.string().optional(),
|
|
14
|
-
previousConfiguration: DTODocumentationItemConfigurationV2.optional(),
|
|
15
|
-
previousContentHash: z.string().optional(),
|
|
16
|
-
}),
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
export const DTODocumentationDraftStateDeleted = z.object({
|
|
20
|
-
changeType: z.literal(DTODocumentationDraftChangeType.enum.Deleted),
|
|
21
|
-
deletedAt: z.coerce.date(),
|
|
22
|
-
deletedByUserId: z.string(),
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
export const DTODocumentationDraftState = z.discriminatedUnion("changeType", [
|
|
26
|
-
DTODocumentationDraftStateCreated,
|
|
27
|
-
DTODocumentationDraftStateUpdated,
|
|
28
|
-
DTODocumentationDraftStateDeleted,
|
|
29
|
-
]);
|
|
30
|
-
|
|
31
|
-
export type DTODocumentationDraftChangeType = z.infer<typeof DTODocumentationDraftChangeType>;
|
|
32
|
-
|
|
33
|
-
export type DTODocumentationDraftStateCreated = z.infer<typeof DTODocumentationDraftStateCreated>;
|
|
34
|
-
export type DTODocumentationDraftStateUpdated = z.infer<typeof DTODocumentationDraftStateUpdated>;
|
|
35
|
-
export type DTODocumentationDraftStateDeleted = z.infer<typeof DTODocumentationDraftStateDeleted>;
|
|
36
|
-
|
|
37
|
-
export type DTODocumentationDraftState = z.infer<typeof DTODocumentationDraftState>;
|