@supernova-studio/client 0.59.8 → 0.59.10
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 +335 -40
- package/dist/index.d.ts +335 -40
- package/dist/index.js +120 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1855 -1755
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/dto/design-systems/index.ts +1 -0
- package/src/api/dto/design-systems/redirects.ts +33 -0
- package/src/api/endpoints/codegen/pipelines.ts +8 -1
- package/src/api/payloads/export/pipeline.ts +26 -2
- package/src/yjs/docs-editor/mock.ts +54 -16
package/package.json
CHANGED
|
@@ -0,0 +1,33 @@
|
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import { DTOExportJobResponse, DTOPipelineListQuery, DTOPipelineListResponse, DTOPipelineResponse } from "../../dto";
|
|
2
|
-
import { DTOPipelineCreateBody, DTOPipelineTriggerBody } from "../../payloads";
|
|
2
|
+
import { DTOPipelineCreateBody, DTOPipelineTriggerBody, DTOPipelineUpdateBody } from "../../payloads";
|
|
3
3
|
import { RequestExecutor } from "../../transport";
|
|
4
4
|
|
|
5
5
|
export class PipelinesEndpoint {
|
|
@@ -24,6 +24,13 @@ export class PipelinesEndpoint {
|
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
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
|
+
|
|
27
34
|
trigger(workspaceId: string, pipelineId: string, payload: DTOPipelineTriggerBody) {
|
|
28
35
|
return this.requestExecutor.json(
|
|
29
36
|
`/codegen/workspaces/${workspaceId}/pipelines/${pipelineId}/trigger`,
|
|
@@ -37,8 +37,32 @@ export const DTOPipelineCreateBody = z.object({
|
|
|
37
37
|
}),
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
-
export const DTOPipelineUpdateBody =
|
|
41
|
-
|
|
40
|
+
export const DTOPipelineUpdateBody = z.object({
|
|
41
|
+
exporterId: z.string().optional(),
|
|
42
|
+
name: z.string().optional(),
|
|
43
|
+
isEnabled: z.boolean().optional(),
|
|
44
|
+
eventType: PipelineEventType.optional(),
|
|
45
|
+
|
|
46
|
+
brandPersistentId: z.string().optional(),
|
|
47
|
+
themePersistentId: z.string().optional(),
|
|
48
|
+
themePersistentIds: z.string().array().optional(),
|
|
49
|
+
|
|
50
|
+
exporterConfigurationProperties: DTOExporterPropertyDefinitionValueMap.optional(),
|
|
51
|
+
|
|
52
|
+
destination: PipelineDestinationType.optional(),
|
|
53
|
+
gitQuery: GitObjectsQuery.optional(),
|
|
54
|
+
|
|
55
|
+
destinations: z
|
|
56
|
+
.object({
|
|
57
|
+
s3: ExporterDestinationS3.nullish(),
|
|
58
|
+
azure: ExporterDestinationAzure.nullish(),
|
|
59
|
+
bitbucket: ExporterDestinationBitbucket.nullish(),
|
|
60
|
+
github: ExporterDestinationGithub.nullish(),
|
|
61
|
+
gitlab: ExporterDestinationGitlab.nullish(),
|
|
62
|
+
documentation: ExporterDestinationDocs.nullish(),
|
|
63
|
+
webhookUrl: z.string().nullish(),
|
|
64
|
+
})
|
|
65
|
+
.optional(),
|
|
42
66
|
});
|
|
43
67
|
|
|
44
68
|
export const DTOPipelineTriggerBody = z.object({
|
|
@@ -1623,49 +1623,87 @@ const blocks: PageBlockDefinition[] = [
|
|
|
1623
1623
|
},
|
|
1624
1624
|
{
|
|
1625
1625
|
id: "io.supernova.block.assets",
|
|
1626
|
-
name: "
|
|
1626
|
+
name: "Vector assets",
|
|
1627
1627
|
description: "Display icons or illustrations",
|
|
1628
1628
|
category: "Assets",
|
|
1629
1629
|
icon: "https://cdn-assets.supernova.io/blocks/icons/v2/assets.svg",
|
|
1630
|
-
searchKeywords: ["icons", "illustrations", "grid", "svg", "logos"],
|
|
1630
|
+
searchKeywords: ["icons", "illustrations", "grid", "svg", "logos", "vectors"],
|
|
1631
1631
|
item: {
|
|
1632
|
-
properties: [
|
|
1633
|
-
|
|
1632
|
+
properties: [
|
|
1633
|
+
{
|
|
1634
|
+
id: "assets",
|
|
1635
|
+
name: "Assets",
|
|
1636
|
+
type: "Asset",
|
|
1637
|
+
options: {},
|
|
1638
|
+
},
|
|
1639
|
+
],
|
|
1640
|
+
appearance: {
|
|
1641
|
+
isBordered: true,
|
|
1642
|
+
hasBackground: false,
|
|
1643
|
+
},
|
|
1634
1644
|
variants: [
|
|
1635
1645
|
{
|
|
1636
1646
|
id: "default",
|
|
1637
1647
|
name: "Simple grid",
|
|
1638
1648
|
image: "https://cdn-assets.supernova.io/blocks/variants/assets-simple-grid.svg",
|
|
1639
|
-
description: "A simple grid
|
|
1640
|
-
layout: {
|
|
1649
|
+
description: "A simple grid. Both the title and description are displayed below the preview.",
|
|
1650
|
+
layout: {
|
|
1651
|
+
type: "Column",
|
|
1652
|
+
children: ["assets"],
|
|
1653
|
+
columnAlign: "Start",
|
|
1654
|
+
columnResizing: "Fill",
|
|
1655
|
+
gap: "Medium",
|
|
1656
|
+
},
|
|
1641
1657
|
maxColumns: 8,
|
|
1642
|
-
defaultColumns:
|
|
1658
|
+
defaultColumns: 4,
|
|
1643
1659
|
appearance: {},
|
|
1644
1660
|
},
|
|
1645
1661
|
{
|
|
1646
1662
|
id: "square-grid",
|
|
1647
1663
|
name: "Square grid",
|
|
1648
1664
|
image: "https://cdn-assets.supernova.io/blocks/variants/assets-square-grid.svg",
|
|
1649
|
-
description: "Bordered square grid tailored for displaying icon assets.
|
|
1650
|
-
layout: {
|
|
1665
|
+
description: "Bordered square grid tailored for displaying icon assets.",
|
|
1666
|
+
layout: {
|
|
1667
|
+
type: "Column",
|
|
1668
|
+
children: ["assets"],
|
|
1669
|
+
columnAlign: "Start",
|
|
1670
|
+
columnResizing: "Fill",
|
|
1671
|
+
gap: "Medium",
|
|
1672
|
+
},
|
|
1651
1673
|
maxColumns: 8,
|
|
1652
|
-
defaultColumns:
|
|
1653
|
-
appearance: {
|
|
1674
|
+
defaultColumns: 4,
|
|
1675
|
+
appearance: {
|
|
1676
|
+
isEditorPresentationDifferent: true,
|
|
1677
|
+
},
|
|
1654
1678
|
},
|
|
1655
1679
|
{
|
|
1656
1680
|
id: "borderless-grid",
|
|
1657
1681
|
name: "Borderless grid",
|
|
1658
1682
|
image: "https://cdn-assets.supernova.io/blocks/variants/assets-borderless-grid.svg",
|
|
1659
|
-
description: "Borderless grid, perfect for displaying assets of the same height.
|
|
1660
|
-
layout: {
|
|
1683
|
+
description: "Borderless grid, perfect for displaying vector assets of the same height.",
|
|
1684
|
+
layout: {
|
|
1685
|
+
type: "Column",
|
|
1686
|
+
children: ["assets"],
|
|
1687
|
+
columnAlign: "Start",
|
|
1688
|
+
columnResizing: "Fill",
|
|
1689
|
+
gap: "Medium",
|
|
1690
|
+
},
|
|
1661
1691
|
maxColumns: 8,
|
|
1662
|
-
defaultColumns:
|
|
1663
|
-
appearance: {
|
|
1692
|
+
defaultColumns: 4,
|
|
1693
|
+
appearance: {
|
|
1694
|
+
isEditorPresentationDifferent: true,
|
|
1695
|
+
},
|
|
1664
1696
|
},
|
|
1665
1697
|
],
|
|
1666
1698
|
defaultVariantKey: "default",
|
|
1667
1699
|
},
|
|
1668
|
-
behavior: {
|
|
1700
|
+
behavior: {
|
|
1701
|
+
dataType: "Asset",
|
|
1702
|
+
entities: {
|
|
1703
|
+
selectionType: "EntityAndGroup",
|
|
1704
|
+
maxSelected: 0,
|
|
1705
|
+
},
|
|
1706
|
+
},
|
|
1669
1707
|
editorOptions: {
|
|
1670
1708
|
onboarding: {
|
|
1671
1709
|
helpText: "Display a grid of icons or illustrations.",
|