@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,87 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
nullishToOptional,
|
|
3
|
-
PulsarContributionConfigurationProperty,
|
|
4
|
-
PulsarContributionVariant,
|
|
5
|
-
PulsarCustomBlock,
|
|
6
|
-
} from "@supernova-studio/model";
|
|
7
|
-
import { z } from "zod";
|
|
8
|
-
import { DTOExporterPropertyDefinition } from "./exporter-property";
|
|
9
|
-
|
|
10
|
-
//
|
|
11
|
-
// Read
|
|
12
|
-
//
|
|
13
|
-
|
|
14
|
-
export const DTOExporterType = z.enum(["documentation", "code"]);
|
|
15
|
-
export const DTOExporterSource = z.enum(["git", "upload"]);
|
|
16
|
-
export const DTOExporterMembershipRole = z.enum(["Owner", "OwnerArchived", "User"]);
|
|
17
|
-
|
|
18
|
-
export const DTOExporterListQuery = z.object({
|
|
19
|
-
limit: z.coerce.number().optional(),
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
export const DTOExporter = z.object({
|
|
23
|
-
id: z.string(),
|
|
24
|
-
name: z.string(),
|
|
25
|
-
isPrivate: z.boolean(),
|
|
26
|
-
exporterType: DTOExporterType,
|
|
27
|
-
isDefaultDocumentationExporter: z.boolean(),
|
|
28
|
-
|
|
29
|
-
iconURL: z.string().optional(),
|
|
30
|
-
configurationProperties: PulsarContributionConfigurationProperty.array(),
|
|
31
|
-
properties: DTOExporterPropertyDefinition.array().optional(),
|
|
32
|
-
customBlocks: PulsarCustomBlock.array(),
|
|
33
|
-
blockVariants: z.record(z.string(), PulsarContributionVariant.array()),
|
|
34
|
-
|
|
35
|
-
usesBrands: z.boolean(),
|
|
36
|
-
usesThemes: z.boolean(),
|
|
37
|
-
|
|
38
|
-
source: DTOExporterSource,
|
|
39
|
-
|
|
40
|
-
gitUrl: nullishToOptional(z.string()),
|
|
41
|
-
gitBranch: nullishToOptional(z.string()),
|
|
42
|
-
gitDirectory: nullishToOptional(z.string()),
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
export const DTOExporterMembership = z.object({
|
|
46
|
-
workspaceId: z.string(),
|
|
47
|
-
exporterId: z.string(),
|
|
48
|
-
role: DTOExporterMembershipRole,
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
export const DTOExporterResponse = z.object({
|
|
52
|
-
exporter: DTOExporter,
|
|
53
|
-
membership: DTOExporterMembership,
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
export const DTOExporterListResponse = z.object({
|
|
57
|
-
exporters: DTOExporter.array(),
|
|
58
|
-
membership: DTOExporterMembership.array(),
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
export type DTOExporterListQuery = z.infer<typeof DTOExporterListQuery>;
|
|
62
|
-
export type DTOExporterType = z.infer<typeof DTOExporterType>;
|
|
63
|
-
export type DTOExporterSource = z.infer<typeof DTOExporterSource>;
|
|
64
|
-
export type DTOExporterMembershipRole = z.infer<typeof DTOExporterMembershipRole>;
|
|
65
|
-
export type DTOExporter = z.infer<typeof DTOExporter>;
|
|
66
|
-
export type DTOExporterMembership = z.infer<typeof DTOExporterMembership>;
|
|
67
|
-
export type DTOExporterResponse = z.infer<typeof DTOExporterResponse>;
|
|
68
|
-
export type DTOExporterListResponse = z.infer<typeof DTOExporterListResponse>;
|
|
69
|
-
|
|
70
|
-
//
|
|
71
|
-
// Write
|
|
72
|
-
//
|
|
73
|
-
|
|
74
|
-
export const DTOExporterGitProviderEnum = z.enum(["github", "gitlab", "bitbucket", "azure"]);
|
|
75
|
-
|
|
76
|
-
export const DTOExporterCreateInput = z.object({
|
|
77
|
-
url: z.string(),
|
|
78
|
-
provider: DTOExporterGitProviderEnum,
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
export const DTOExporterUpdateInput = z.object({
|
|
82
|
-
url: z.string().optional(),
|
|
83
|
-
});
|
|
84
|
-
|
|
85
|
-
export type DTOExporterGitProviderEnum = z.infer<typeof DTOExporterGitProviderEnum>;
|
|
86
|
-
export type DTOExporterCreateInput = z.infer<typeof DTOExporterCreateInput>;
|
|
87
|
-
export type DTOExporterUpdateInput = z.infer<typeof DTOExporterUpdateInput>;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ExportJobDocsDestinationResult,
|
|
3
|
-
ExportJobResult,
|
|
4
|
-
ExportJobStatus,
|
|
5
|
-
ExporterDestinationAzure,
|
|
6
|
-
ExporterDestinationBitbucket,
|
|
7
|
-
ExporterDestinationDocs,
|
|
8
|
-
ExporterDestinationGithub,
|
|
9
|
-
ExporterDestinationGitlab,
|
|
10
|
-
ExporterDestinationS3,
|
|
11
|
-
ObjectMeta,
|
|
12
|
-
} from "@supernova-studio/model";
|
|
13
|
-
import { z } from "zod";
|
|
14
|
-
import { DTOExporterPropertyDefinitionValueMap } from "./exporter-property";
|
|
15
|
-
|
|
16
|
-
export const DTOExportJobCreatedBy = z.object({
|
|
17
|
-
userId: z.string(),
|
|
18
|
-
userName: z.string(),
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
export const DTOExportJobDesignSystemPreview = z.object({
|
|
22
|
-
id: z.string(),
|
|
23
|
-
meta: ObjectMeta,
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export const DTOExportJobDesignSystemVersionPreview = z.object({
|
|
27
|
-
id: z.string(),
|
|
28
|
-
meta: ObjectMeta,
|
|
29
|
-
version: z.string(),
|
|
30
|
-
isReadonly: z.boolean(),
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
export const DTOExportJobDestinations = z.object({
|
|
34
|
-
s3: ExporterDestinationS3.optional(),
|
|
35
|
-
azure: ExporterDestinationAzure.optional(),
|
|
36
|
-
bitbucket: ExporterDestinationBitbucket.optional(),
|
|
37
|
-
github: ExporterDestinationGithub.optional(),
|
|
38
|
-
gitlab: ExporterDestinationGitlab.optional(),
|
|
39
|
-
documentation: ExporterDestinationDocs.optional(),
|
|
40
|
-
webhookUrl: z.string().optional(),
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
export const DTOExportJobResult = ExportJobResult.omit({
|
|
44
|
-
sndocs: true,
|
|
45
|
-
}).extend({
|
|
46
|
-
documentation: ExportJobDocsDestinationResult.optional(),
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
export const DTOExportJob = z.object({
|
|
50
|
-
id: z.string(),
|
|
51
|
-
|
|
52
|
-
createdAt: z.coerce.date(),
|
|
53
|
-
finishedAt: z.coerce.date().optional(),
|
|
54
|
-
|
|
55
|
-
index: z.number().optional(),
|
|
56
|
-
status: ExportJobStatus,
|
|
57
|
-
estimatedExecutionTime: z.number().optional(),
|
|
58
|
-
|
|
59
|
-
createdBy: DTOExportJobCreatedBy.optional(),
|
|
60
|
-
designSystem: DTOExportJobDesignSystemPreview,
|
|
61
|
-
designSystemVersion: DTOExportJobDesignSystemVersionPreview,
|
|
62
|
-
|
|
63
|
-
destinations: DTOExportJobDestinations,
|
|
64
|
-
|
|
65
|
-
exporterId: z.string(),
|
|
66
|
-
scheduleId: z.string().optional(),
|
|
67
|
-
|
|
68
|
-
result: DTOExportJobResult.optional(),
|
|
69
|
-
|
|
70
|
-
brandPersistentId: z.string().optional(),
|
|
71
|
-
themePersistentId: z.string().optional(),
|
|
72
|
-
themePersistentIds: z.string().array().optional(),
|
|
73
|
-
|
|
74
|
-
exporterConfigurationProperties: DTOExporterPropertyDefinitionValueMap.optional(),
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
export const DTOExportJobResponse = z.object({
|
|
78
|
-
job: DTOExportJob,
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
// Deprecated: Use only for test purposes and extend if only necessary. This defines the BE response for an export job.
|
|
82
|
-
export const DTOExportJobResponseLegacy = z.object({
|
|
83
|
-
job: z.object({
|
|
84
|
-
id: z.string(),
|
|
85
|
-
status: ExportJobStatus,
|
|
86
|
-
}),
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
export type DTOExportJobResponseLegacy = z.infer<typeof DTOExportJobResponseLegacy>;
|
|
90
|
-
export type DTOExportJobCreatedBy = z.infer<typeof DTOExportJobCreatedBy>;
|
|
91
|
-
export type DTOExportJobDesignSystemPreview = z.infer<typeof DTOExportJobDesignSystemPreview>;
|
|
92
|
-
export type DTOExportJobDesignSystemVersionPreview = z.infer<typeof DTOExportJobDesignSystemVersionPreview>;
|
|
93
|
-
export type DTOExportJobDestinations = z.infer<typeof DTOExportJobDestinations>;
|
|
94
|
-
export type DTOExportJobResult = z.infer<typeof DTOExportJobResult>;
|
|
95
|
-
export type DTOExportJob = z.infer<typeof DTOExportJob>;
|
|
96
|
-
export type DTOExportJobResponse = z.infer<typeof DTOExportJobResponse>;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { ExportDestinationsMap, PipelineEventType } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { DTOExporterPropertyDefinitionValueMap } from "./exporter-property";
|
|
4
|
-
import { DTOExportJob } from "./job";
|
|
5
|
-
|
|
6
|
-
export const DTOPipelineListQuery = z.object({
|
|
7
|
-
designSystemId: z.string().optional(),
|
|
8
|
-
exporterId: z.string().optional(),
|
|
9
|
-
latestJobsLimit: z.coerce.number().optional(),
|
|
10
|
-
});
|
|
11
|
-
|
|
12
|
-
export const DTOPipeline = z.object({
|
|
13
|
-
id: z.string(),
|
|
14
|
-
name: z.string(),
|
|
15
|
-
eventType: PipelineEventType,
|
|
16
|
-
isEnabled: z.boolean(),
|
|
17
|
-
workspaceId: z.string(),
|
|
18
|
-
designSystemId: z.string(),
|
|
19
|
-
exporterId: z.string(),
|
|
20
|
-
brandPersistentId: z.string().optional(),
|
|
21
|
-
|
|
22
|
-
themePersistentId: z.string().optional(),
|
|
23
|
-
themePersistentIds: z.string().array().optional(),
|
|
24
|
-
|
|
25
|
-
exporterConfigurationProperties: DTOExporterPropertyDefinitionValueMap.optional(),
|
|
26
|
-
|
|
27
|
-
...ExportDestinationsMap.shape,
|
|
28
|
-
|
|
29
|
-
latestJobs: DTOExportJob.array(),
|
|
30
|
-
});
|
|
31
|
-
|
|
32
|
-
export const DTOPipelineListResponse = z.object({
|
|
33
|
-
pipelines: DTOPipeline.array(),
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
export const DTOPipelineResponse = z.object({
|
|
37
|
-
pipeline: DTOPipeline,
|
|
38
|
-
});
|
|
39
|
-
|
|
40
|
-
export type DTOPipelineListQuery = z.infer<typeof DTOPipelineListQuery>;
|
|
41
|
-
export type DTOPipeline = z.infer<typeof DTOPipeline>;
|
|
42
|
-
export type DTOPipelineResponse = z.infer<typeof DTOPipelineResponse>;
|
|
43
|
-
export type DTOPipelineListResponse = z.infer<typeof DTOPipelineListResponse>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
export const DTOAssetRenderConfiguration = z.object({
|
|
4
|
-
prefix: z.string().optional(),
|
|
5
|
-
suffix: z.string().optional(),
|
|
6
|
-
scale: z.enum(["x1", "x2", "x3", "x4"]),
|
|
7
|
-
format: z.enum(["png", "pdf", "svg"]),
|
|
8
|
-
});
|
|
9
|
-
|
|
10
|
-
export const DTORenderedAssetFile = z.object({
|
|
11
|
-
assetId: z.string(),
|
|
12
|
-
fileName: z.string(),
|
|
13
|
-
sourceUrl: z.string(),
|
|
14
|
-
settings: DTOAssetRenderConfiguration,
|
|
15
|
-
originalName: z.string(),
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export const DTODownloadAssetsRequest = z.object({
|
|
19
|
-
persistentIds: z.array(z.string().uuid()).optional(),
|
|
20
|
-
settings: DTOAssetRenderConfiguration.array(),
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export const DTODownloadAssetsResponse = z.object({
|
|
24
|
-
items: DTORenderedAssetFile.array(),
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
export type DTOAssetRenderConfiguration = z.infer<typeof DTOAssetRenderConfiguration>;
|
|
28
|
-
export type DTORenderedAssetFile = z.infer<typeof DTORenderedAssetFile>;
|
|
29
|
-
export type DTODownloadAssetsRequest = z.infer<typeof DTODownloadAssetsRequest>;
|
|
30
|
-
export type DTODownloadAssetsResponse = z.infer<typeof DTODownloadAssetsResponse>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./download";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./assets";
|
package/src/api/dto/index.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export * from "./aux";
|
|
2
|
-
export * from "./bff";
|
|
3
|
-
export * from "./collections";
|
|
4
|
-
export * from "./design-systems";
|
|
5
|
-
export * from "./design-tokens";
|
|
6
|
-
export * from "./documentation";
|
|
7
|
-
export * from "./elements";
|
|
8
|
-
export * from "./export";
|
|
9
|
-
export * from "./figma-components";
|
|
10
|
-
export * from "./liveblocks";
|
|
11
|
-
export * from "./themes";
|
|
12
|
-
export * from "./users";
|
|
13
|
-
export * from "./workspaces";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./auth-response";
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { DesignTokenTypedData, ThemeOverrideOrigin } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
// Read
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
export const DTOThemeOverride = DesignTokenTypedData.and(
|
|
9
|
-
z.object({
|
|
10
|
-
tokenPersistentId: z.string(),
|
|
11
|
-
origin: ThemeOverrideOrigin.optional(),
|
|
12
|
-
})
|
|
13
|
-
);
|
|
14
|
-
|
|
15
|
-
export type DTOThemeOverride = z.infer<typeof DTOThemeOverride>;
|
|
16
|
-
|
|
17
|
-
//
|
|
18
|
-
// Write
|
|
19
|
-
//
|
|
20
|
-
|
|
21
|
-
export const DTOThemeOverrideCreatePayload = DesignTokenTypedData.and(
|
|
22
|
-
z.object({
|
|
23
|
-
tokenPersistentId: z.string(),
|
|
24
|
-
})
|
|
25
|
-
);
|
|
26
|
-
|
|
27
|
-
export type DTOThemeOverrideCreatePayload = z.infer<typeof DTOThemeOverrideCreatePayload>;
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { ObjectMeta } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { DTOThemeOverride } from "./override";
|
|
4
|
-
|
|
5
|
-
//
|
|
6
|
-
// Read
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
export const DTOTheme = z.object({
|
|
10
|
-
id: z.string(),
|
|
11
|
-
persistentId: z.string(),
|
|
12
|
-
designSystemVersionId: z.string(),
|
|
13
|
-
brandId: z.string(),
|
|
14
|
-
|
|
15
|
-
meta: ObjectMeta,
|
|
16
|
-
codeName: z.string(),
|
|
17
|
-
|
|
18
|
-
overrides: DTOThemeOverride.array(),
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
export const DTOThemeResponse = z.object({
|
|
22
|
-
theme: DTOTheme,
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
export const DTOThemeListResponse = z.object({
|
|
26
|
-
themes: DTOTheme.array(),
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export type DTOTheme = z.infer<typeof DTOTheme>;
|
|
30
|
-
export type DTOThemeResponse = z.infer<typeof DTOThemeResponse>;
|
|
31
|
-
export type DTOThemeListResponse = z.infer<typeof DTOThemeListResponse>;
|
|
32
|
-
|
|
33
|
-
//
|
|
34
|
-
// Write
|
|
35
|
-
//
|
|
36
|
-
|
|
37
|
-
export const DTOThemeCreatePayload = z.object({
|
|
38
|
-
meta: ObjectMeta,
|
|
39
|
-
persistentId: z.string(),
|
|
40
|
-
brandId: z.string(),
|
|
41
|
-
codeName: z.string(),
|
|
42
|
-
overrides: DTOThemeOverride.array(),
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
export type DTOThemeCreatePayload = z.infer<typeof DTOThemeCreatePayload>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { UserOnboardingDepartment, UserOnboardingJobLevel, UserSource, UserTheme } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
import { DTOUser, DTOUserProfile } from "./user";
|
|
4
|
-
|
|
5
|
-
export const DTOUserOnboardingDepartment = UserOnboardingDepartment;
|
|
6
|
-
export const DTOUserOnboardingJobLevel = UserOnboardingJobLevel;
|
|
7
|
-
export const DTOUserSource = UserSource;
|
|
8
|
-
export const DTOUserTheme = UserTheme;
|
|
9
|
-
|
|
10
|
-
export const DTOUserOnboarding = z.object({
|
|
11
|
-
companyName: z.string().optional(),
|
|
12
|
-
numberOfPeopleInOrg: z.string().optional(),
|
|
13
|
-
numberOfPeopleInDesignTeam: z.string().optional(),
|
|
14
|
-
department: DTOUserOnboardingDepartment.optional(),
|
|
15
|
-
jobTitle: z.string().optional(),
|
|
16
|
-
phase: z.string().optional(),
|
|
17
|
-
jobLevel: DTOUserOnboardingJobLevel.optional(),
|
|
18
|
-
designSystemName: z.string().optional(),
|
|
19
|
-
defaultDestination: z.string().optional(),
|
|
20
|
-
isPageDraftOnboardingFinished: z.boolean().optional(),
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
export const DTOAuthenticatedUserProfile = DTOUserProfile.extend({
|
|
24
|
-
onboarding: DTOUserOnboarding.optional(),
|
|
25
|
-
theme: DTOUserTheme.optional(),
|
|
26
|
-
});
|
|
27
|
-
|
|
28
|
-
export const DTOAuthenticatedUser = DTOUser.extend({
|
|
29
|
-
profile: DTOAuthenticatedUserProfile,
|
|
30
|
-
createdAt: z.coerce.date(),
|
|
31
|
-
loggedOutAt: z.coerce.date().optional(),
|
|
32
|
-
source: DTOUserSource.optional(),
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
export const DTOAuthenticatedUserResponse = z.object({
|
|
36
|
-
user: DTOAuthenticatedUser,
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
export type DTOUserOnboardingDepartment = z.infer<typeof DTOUserOnboardingDepartment>;
|
|
40
|
-
export type DTOUserOnboardingJobLevel = z.infer<typeof DTOUserOnboardingJobLevel>;
|
|
41
|
-
export type DTOUserSource = z.infer<typeof DTOUserSource>;
|
|
42
|
-
export type DTOUserTheme = z.infer<typeof DTOUserTheme>;
|
|
43
|
-
export type DTOUserOnboarding = z.infer<typeof DTOUserOnboarding>;
|
|
44
|
-
export type DTOAuthenticatedUserProfile = z.infer<typeof DTOAuthenticatedUserProfile>;
|
|
45
|
-
export type DTOAuthenticatedUser = z.infer<typeof DTOAuthenticatedUser>;
|
|
46
|
-
export type DTOAuthenticatedUserResponse = z.infer<typeof DTOAuthenticatedUserResponse>;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { UserProfileUpdate } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Definition of a user profile as inspectable by other users (i.e. reduced version)
|
|
6
|
-
*/
|
|
7
|
-
export const DTOUserProfile = z.object({
|
|
8
|
-
name: z.string(),
|
|
9
|
-
nickname: z.string().optional(),
|
|
10
|
-
avatar: z.string().optional(),
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* Definition of a user as inspectable by other users (i.e. reduced version)
|
|
15
|
-
*/
|
|
16
|
-
export const DTOUser = z.object({
|
|
17
|
-
id: z.string(),
|
|
18
|
-
email: z.string(),
|
|
19
|
-
profile: DTOUserProfile,
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
export const DTOUserGetResponse = z.object({
|
|
23
|
-
user: DTOUser,
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export const DTOUserProfileUpdate = UserProfileUpdate;
|
|
27
|
-
|
|
28
|
-
export type DTOUserProfile = z.infer<typeof DTOUserProfile>;
|
|
29
|
-
export type DTOUser = z.infer<typeof DTOUser>;
|
|
30
|
-
export type DTOUserGetResponse = z.infer<typeof DTOUserGetResponse>;
|
|
31
|
-
export type DTOUserProfileUpdate = z.infer<typeof DTOUserProfileUpdate>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
|
|
3
|
-
export const DTOGitOrganization = z.object({
|
|
4
|
-
id: z.string(),
|
|
5
|
-
name: z.string(),
|
|
6
|
-
url: z.string(),
|
|
7
|
-
slug: z.string(),
|
|
8
|
-
});
|
|
9
|
-
export type DTOGitOrganization = z.infer<typeof DTOGitOrganization>;
|
|
10
|
-
|
|
11
|
-
export const DTOGitProject = z.object({
|
|
12
|
-
id: z.string(),
|
|
13
|
-
name: z.string(),
|
|
14
|
-
url: z.string(),
|
|
15
|
-
slug: z.string(),
|
|
16
|
-
});
|
|
17
|
-
export type DTOGitProject = z.infer<typeof DTOGitProject>;
|
|
18
|
-
|
|
19
|
-
export const DTOGitRepository = z.object({
|
|
20
|
-
id: z.string(),
|
|
21
|
-
name: z.string(),
|
|
22
|
-
url: z.string(),
|
|
23
|
-
slug: z.string(),
|
|
24
|
-
defaultBranch: z.string().optional(),
|
|
25
|
-
});
|
|
26
|
-
export type DTOGitRepository = z.infer<typeof DTOGitRepository>;
|
|
27
|
-
|
|
28
|
-
export const DTOGitBranch = z.object({
|
|
29
|
-
name: z.string(),
|
|
30
|
-
lastCommitId: z.string(),
|
|
31
|
-
});
|
|
32
|
-
export type DTOGitBranch = z.infer<typeof DTOGitBranch>;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { ExtendedIntegrationType, IntegrationCredentials, IntegrationDesignSystem } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
export const DTOIntegrationCredentials = IntegrationCredentials.omit({
|
|
5
|
-
accessToken: true,
|
|
6
|
-
refreshToken: true,
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export const DTOIntegration = z.object({
|
|
10
|
-
id: z.string(),
|
|
11
|
-
workspaceId: z.string(),
|
|
12
|
-
type: ExtendedIntegrationType,
|
|
13
|
-
createdAt: z.coerce.date(),
|
|
14
|
-
integrationCredentials: z.array(DTOIntegrationCredentials).optional(),
|
|
15
|
-
integrationDesignSystems: z.array(IntegrationDesignSystem).optional(),
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export const DTOIntegrationOAuthGetResponse = z.object({
|
|
19
|
-
url: z.string(),
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
export const DTOIntegrationPostResponse = z.object({
|
|
23
|
-
integration: DTOIntegration,
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export const DTOIntegrationsGetListResponse = z.object({
|
|
27
|
-
integrations: DTOIntegration.array(),
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
export type DTOIntegration = z.infer<typeof DTOIntegration>;
|
|
31
|
-
export type DTOIntegrationCredentials = z.infer<typeof DTOIntegrationCredentials>;
|
|
32
|
-
export type DTOIntegrationOAuthGetResponse = z.infer<typeof DTOIntegrationOAuthGetResponse>;
|
|
33
|
-
export type DTOIntegrationPostResponse = z.infer<typeof DTOIntegrationPostResponse>;
|
|
34
|
-
export type DTOIntegrationsGetListResponse = z.infer<typeof DTOIntegrationsGetListResponse>;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { WorkspaceInvitation, WorkspaceRoleSchema } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
export const DTOWorkspaceInvitationInput = z.object({
|
|
5
|
-
email: z.string().email(),
|
|
6
|
-
role: WorkspaceRoleSchema,
|
|
7
|
-
});
|
|
8
|
-
|
|
9
|
-
export const DTOWorkspaceInvitationsListInput = z.object({
|
|
10
|
-
invites: DTOWorkspaceInvitationInput.array().max(100),
|
|
11
|
-
designSystemId: z.string().optional(),
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
export const DTOWorkspaceInvitationsResponse = z.object({
|
|
15
|
-
invitations: WorkspaceInvitation.array(),
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
export const DTOWorkspaceInviteUpdate = z.object({
|
|
19
|
-
role: WorkspaceRoleSchema,
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
export const DTOWorkspaceInvitationUpdateResponse = z.object({
|
|
23
|
-
invitation: WorkspaceInvitation,
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
export type DTOWorkspaceInvitationInput = z.infer<typeof DTOWorkspaceInvitationInput>;
|
|
27
|
-
export type DTOWorkspaceInvitationsListInput = z.infer<typeof DTOWorkspaceInvitationsListInput>;
|
|
28
|
-
export type DTOWorkspaceInvitationsResponse = z.infer<typeof DTOWorkspaceInvitationsResponse>;
|
|
29
|
-
export type DTOWorkspaceInviteUpdate = z.infer<typeof DTOWorkspaceInviteUpdate>;
|
|
30
|
-
export type DTOWorkspaceInvitationUpdateResponse = z.infer<typeof DTOWorkspaceInvitationUpdateResponse>;
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { DTOWorkspace } from "./workspace";
|
|
3
|
-
import { User, WorkspaceRoleSchema } from "@supernova-studio/model";
|
|
4
|
-
|
|
5
|
-
//
|
|
6
|
-
// Read
|
|
7
|
-
//
|
|
8
|
-
|
|
9
|
-
export const DTOWorkspaceRole = z.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Contributor"]);
|
|
10
|
-
|
|
11
|
-
export const DTOUserWorkspaceMembership = z.object({
|
|
12
|
-
// Workspace the user is a member of
|
|
13
|
-
workspace: DTOWorkspace,
|
|
14
|
-
|
|
15
|
-
// Assigned role the user has in the workspace
|
|
16
|
-
role: DTOWorkspaceRole,
|
|
17
|
-
|
|
18
|
-
// Role that determines actual permissions the user has in the workspace
|
|
19
|
-
// E.g. this is different from the default role when editors are downgraded to viewers
|
|
20
|
-
// when a workspace's subscription is downgraded to free tier
|
|
21
|
-
effectiveRole: DTOWorkspaceRole,
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
export const DTOWorkspaceMember = z.object({
|
|
25
|
-
user: User,
|
|
26
|
-
role: WorkspaceRoleSchema,
|
|
27
|
-
effectiveRole: WorkspaceRoleSchema,
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
export const DTOUserWorkspaceMembershipsResponse = z.object({
|
|
31
|
-
membership: z.array(DTOUserWorkspaceMembership),
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
export const DTOWorkspaceMembersListResponse = z.object({
|
|
35
|
-
members: z.array(DTOWorkspaceMember),
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
export type DTOWorkspaceRole = z.infer<typeof DTOWorkspaceRole>;
|
|
39
|
-
export type DTOUserWorkspaceMembership = z.infer<typeof DTOUserWorkspaceMembership>;
|
|
40
|
-
export type DTOUserWorkspaceMembershipsResponse = z.infer<typeof DTOUserWorkspaceMembershipsResponse>;
|
|
41
|
-
export type DTOWorkspaceMembersListResponse = z.infer<typeof DTOWorkspaceMembersListResponse>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { NpmRegistryAuthType, NpmRegistryType } from "@supernova-studio/model";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
// Read
|
|
6
|
-
//
|
|
7
|
-
|
|
8
|
-
export const DTONpmRegistryConfigConstants = {
|
|
9
|
-
passwordPlaceholder: "redacted",
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export const DTONpmRegistryConfig = z.object({
|
|
13
|
-
// Registry basic configuration
|
|
14
|
-
registryType: NpmRegistryType,
|
|
15
|
-
registryUrl: z.string(),
|
|
16
|
-
customRegistryUrl: z.string().optional(),
|
|
17
|
-
|
|
18
|
-
// URL of Supernova NPM packages proxy
|
|
19
|
-
proxyUrl: z.string(),
|
|
20
|
-
|
|
21
|
-
// Auth configuration
|
|
22
|
-
authType: NpmRegistryAuthType,
|
|
23
|
-
accessToken: z.literal(DTONpmRegistryConfigConstants.passwordPlaceholder).optional(),
|
|
24
|
-
username: z.string().optional(),
|
|
25
|
-
password: z.literal(DTONpmRegistryConfigConstants.passwordPlaceholder).optional(),
|
|
26
|
-
|
|
27
|
-
// NPM package scopes for whih the proxy should be enabled
|
|
28
|
-
enabledScopes: z.array(z.string()),
|
|
29
|
-
|
|
30
|
-
// True if client should bypass Supernova proxy and connect directly to the registry
|
|
31
|
-
// (e.g. when the NPM registry is behind a VPN or firewall which prevents Supernova from accessing it)
|
|
32
|
-
bypassProxy: z.boolean(),
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
export type DTONpmRegistryConfig = z.infer<typeof DTONpmRegistryConfig>;
|