@supernova-studio/client 0.59.18 → 0.59.20
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 +5721 -2117
- package/dist/index.d.ts +5721 -2117
- package/dist/index.js +48 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +49 -21
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/conversion/export/pipeline.ts +1 -1
- package/src/api/dto/elements/documentation/page-actions-v2.ts +17 -0
- package/src/api/dto/elements/documentation/page-v2.ts +11 -2
- package/src/api/dto/elements/elements-action-v2.ts +4 -0
- package/src/api/dto/export/exporter-property.ts +4 -4
- package/src/api/dto/export/job.ts +19 -2
- package/src/api/dto/export/pipeline.ts +2 -2
- package/src/api/payloads/export/pipeline.ts +3 -3
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@ export function pipelineToDto(pipeline: Pipeline): DTOPipeline {
|
|
|
19
19
|
destinationGithub: pipeline.destinationGithub,
|
|
20
20
|
destinationGitlab: pipeline.destinationGitlab,
|
|
21
21
|
destinationS3: pipeline.destinationS3,
|
|
22
|
-
|
|
22
|
+
exporterPropertyValues: pipeline.exporterPropertyValues,
|
|
23
23
|
webhookUrl: pipeline.webhookUrl,
|
|
24
24
|
latestJobs: [],
|
|
25
25
|
};
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
DTOMoveDocumentationPageInputV2,
|
|
8
8
|
DTORestoreDocumentationGroupInput,
|
|
9
9
|
DTORestoreDocumentationPageInput,
|
|
10
|
+
DTOUpdateDocumentationPageDocumentInputV2,
|
|
10
11
|
DTOUpdateDocumentationPageInputV2,
|
|
11
12
|
} from "./page-v2";
|
|
12
13
|
|
|
@@ -28,6 +29,11 @@ export const DTODocumentationPageUpdateActionOutputV2 = z.object({
|
|
|
28
29
|
output: SuccessPayload,
|
|
29
30
|
});
|
|
30
31
|
|
|
32
|
+
export const DTODocumentationPageUpdateDocumentActionOutputV2 = z.object({
|
|
33
|
+
type: z.literal("DocumentationPageUpdateDocument"),
|
|
34
|
+
output: SuccessPayload,
|
|
35
|
+
});
|
|
36
|
+
|
|
31
37
|
export const DTODocumentationPageMoveActionOutputV2 = z.object({
|
|
32
38
|
type: z.literal("DocumentationPageMove"),
|
|
33
39
|
output: SuccessPayload,
|
|
@@ -60,6 +66,9 @@ export const DTODocumentationPageApprovalStateChangeActionOutput = z.object({
|
|
|
60
66
|
|
|
61
67
|
export type DTODocumentationPageCreateActionOutputV2 = z.infer<typeof DTODocumentationPageCreateActionOutputV2>;
|
|
62
68
|
export type DTODocumentationPageUpdateActionOutputV2 = z.infer<typeof DTODocumentationPageUpdateActionOutputV2>;
|
|
69
|
+
export type DTODocumentationPageUpdateDocumentActionOutputV2 = z.infer<
|
|
70
|
+
typeof DTODocumentationPageUpdateDocumentActionOutputV2
|
|
71
|
+
>;
|
|
63
72
|
export type DTODocumentationPageMoveActionOutputV2 = z.infer<typeof DTODocumentationPageMoveActionOutputV2>;
|
|
64
73
|
export type DTODocumentationPageDuplicateActionOutputV2 = z.infer<typeof DTODocumentationPageDuplicateActionOutputV2>;
|
|
65
74
|
export type DTODocumentationPageDeleteActionOutputV2 = z.infer<typeof DTODocumentationPageDeleteActionOutputV2>;
|
|
@@ -82,6 +91,11 @@ export const DTODocumentationPageUpdateActionInputV2 = z.object({
|
|
|
82
91
|
input: DTOUpdateDocumentationPageInputV2,
|
|
83
92
|
});
|
|
84
93
|
|
|
94
|
+
export const DTODocumentationPageUpdateDocumentActionInputV2 = z.object({
|
|
95
|
+
type: z.literal("DocumentationPageUpdateDocument"),
|
|
96
|
+
input: DTOUpdateDocumentationPageDocumentInputV2,
|
|
97
|
+
});
|
|
98
|
+
|
|
85
99
|
export const DTODocumentationPageMoveActionInputV2 = z.object({
|
|
86
100
|
type: z.literal("DocumentationPageMove"),
|
|
87
101
|
input: DTOMoveDocumentationPageInputV2,
|
|
@@ -114,6 +128,9 @@ export const DTODocumentationPageApprovalStateChangeActionInput = z.object({
|
|
|
114
128
|
|
|
115
129
|
export type DTODocumentationPageCreateActionInputV2 = z.infer<typeof DTODocumentationPageCreateActionInputV2>;
|
|
116
130
|
export type DTODocumentationPageUpdateActionInputV2 = z.infer<typeof DTODocumentationPageUpdateActionInputV2>;
|
|
131
|
+
export type DTODocumentationPageUpdateDocumentActionInputV2 = z.infer<
|
|
132
|
+
typeof DTODocumentationPageUpdateDocumentActionInputV2
|
|
133
|
+
>;
|
|
117
134
|
export type DTODocumentationPageMoveActionInputV2 = z.infer<typeof DTODocumentationPageMoveActionInputV2>;
|
|
118
135
|
export type DTODocumentationPageDuplicateActionInputV2 = z.infer<typeof DTODocumentationPageDuplicateActionInputV2>;
|
|
119
136
|
export type DTODocumentationPageDeleteActionInputV2 = z.infer<typeof DTODocumentationPageDeleteActionInputV2>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DocumentationPageApprovalState } from "@supernova-studio/model";
|
|
1
|
+
import { DocumentationPageApprovalState, DocumentationPageContentItem } from "@supernova-studio/model";
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { DTODocumentationPageApprovalState } from "../../documentation";
|
|
4
4
|
import { DTODocumentationDraftState } from "./draft-state";
|
|
@@ -64,7 +64,7 @@ export const DTOCreateDocumentationPageInputV2 = z.object({
|
|
|
64
64
|
});
|
|
65
65
|
|
|
66
66
|
export const DTOUpdateDocumentationPageInputV2 = z.object({
|
|
67
|
-
// Identifier of the
|
|
67
|
+
// Identifier of the page to update
|
|
68
68
|
id: z.string(),
|
|
69
69
|
|
|
70
70
|
// Page properties
|
|
@@ -72,6 +72,14 @@ export const DTOUpdateDocumentationPageInputV2 = z.object({
|
|
|
72
72
|
configuration: DTODocumentationItemConfigurationV2.partial().optional(),
|
|
73
73
|
});
|
|
74
74
|
|
|
75
|
+
export const DTOUpdateDocumentationPageDocumentInputV2 = z.object({
|
|
76
|
+
// Identifier of the page to update
|
|
77
|
+
id: z.string(),
|
|
78
|
+
|
|
79
|
+
// Page properties
|
|
80
|
+
documentItems: z.array(DocumentationPageContentItem),
|
|
81
|
+
});
|
|
82
|
+
|
|
75
83
|
export const DTOMoveDocumentationPageInputV2 = z.object({
|
|
76
84
|
// Identifier of the group to update
|
|
77
85
|
id: z.string(),
|
|
@@ -115,6 +123,7 @@ export const DTODocumentationPageApprovalStateChangeInput = z.object({
|
|
|
115
123
|
|
|
116
124
|
export type DTOCreateDocumentationPageInputV2 = z.infer<typeof DTOCreateDocumentationPageInputV2>;
|
|
117
125
|
export type DTOUpdateDocumentationPageInputV2 = z.infer<typeof DTOUpdateDocumentationPageInputV2>;
|
|
126
|
+
export type DTOUpdateDocumentationPageDocumentInputV2 = z.infer<typeof DTOUpdateDocumentationPageDocumentInputV2>;
|
|
118
127
|
export type DTOMoveDocumentationPageInputV2 = z.infer<typeof DTOMoveDocumentationPageInputV2>;
|
|
119
128
|
export type DTODuplicateDocumentationPageInputV2 = z.infer<typeof DTODuplicateDocumentationPageInputV2>;
|
|
120
129
|
export type DTODeleteDocumentationPageInputV2 = z.infer<typeof DTODeleteDocumentationPageInputV2>;
|
|
@@ -32,6 +32,8 @@ import {
|
|
|
32
32
|
DTODocumentationPageRestoreActionOutput,
|
|
33
33
|
DTODocumentationPageUpdateActionInputV2,
|
|
34
34
|
DTODocumentationPageUpdateActionOutputV2,
|
|
35
|
+
DTODocumentationPageUpdateDocumentActionInputV2,
|
|
36
|
+
DTODocumentationPageUpdateDocumentActionOutputV2,
|
|
35
37
|
} from "./documentation/page-actions-v2";
|
|
36
38
|
import {
|
|
37
39
|
DTOFigmaNodeRenderActionInput,
|
|
@@ -48,6 +50,7 @@ export const DTOElementActionOutput = z.discriminatedUnion("type", [
|
|
|
48
50
|
// Documentation pages
|
|
49
51
|
DTODocumentationPageCreateActionOutputV2,
|
|
50
52
|
DTODocumentationPageUpdateActionOutputV2,
|
|
53
|
+
DTODocumentationPageUpdateDocumentActionOutputV2,
|
|
51
54
|
DTODocumentationPageMoveActionOutputV2,
|
|
52
55
|
DTODocumentationPageDuplicateActionOutputV2,
|
|
53
56
|
DTODocumentationPageDeleteActionOutputV2,
|
|
@@ -84,6 +87,7 @@ export const DTOElementActionInput = z
|
|
|
84
87
|
// Documentation pages
|
|
85
88
|
DTODocumentationPageCreateActionInputV2,
|
|
86
89
|
DTODocumentationPageUpdateActionInputV2,
|
|
90
|
+
DTODocumentationPageUpdateDocumentActionInputV2,
|
|
87
91
|
DTODocumentationPageMoveActionInputV2,
|
|
88
92
|
DTODocumentationPageDuplicateActionInputV2,
|
|
89
93
|
DTODocumentationPageDeleteActionInputV2,
|
|
@@ -8,10 +8,10 @@ const PrimitiveValue = z.number().or(z.boolean()).or(z.string());
|
|
|
8
8
|
const ArrayValue = z.array(z.string());
|
|
9
9
|
const ObjectValue = z.record(z.string());
|
|
10
10
|
|
|
11
|
-
export const
|
|
11
|
+
export const DTOExporterPropertyValue = PrimitiveValue.or(ArrayValue).or(ObjectValue);
|
|
12
12
|
export const DTOExporterPropertyType = z.enum(["Enum", "Boolean", "String", "Number", "Array", "Object"]);
|
|
13
13
|
|
|
14
|
-
export type DTOExporterPropertyDefinitionValue = z.infer<typeof
|
|
14
|
+
export type DTOExporterPropertyDefinitionValue = z.infer<typeof DTOExporterPropertyValue>;
|
|
15
15
|
export type DTOExporterPropertyType = z.infer<typeof DTOExporterPropertyType>;
|
|
16
16
|
|
|
17
17
|
//
|
|
@@ -101,5 +101,5 @@ export type DTOExporterPropertyDefinitionsResponse = z.infer<typeof DTOExporterP
|
|
|
101
101
|
// Value
|
|
102
102
|
//
|
|
103
103
|
|
|
104
|
-
export const
|
|
105
|
-
export type
|
|
104
|
+
export const DTOExporterPropertyValueMap = z.record(DTOExporterPropertyValue);
|
|
105
|
+
export type DTOExporterPropertyValueMap = z.infer<typeof DTOExporterPropertyValueMap>;
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
ObjectMeta,
|
|
12
12
|
} from "@supernova-studio/model";
|
|
13
13
|
import { z } from "zod";
|
|
14
|
-
import {
|
|
14
|
+
import { DTOExporterPropertyValueMap } from "./exporter-property";
|
|
15
15
|
|
|
16
16
|
export const DTOExportJobCreatedBy = z.object({
|
|
17
17
|
userId: z.string(),
|
|
@@ -71,7 +71,7 @@ export const DTOExportJob = z.object({
|
|
|
71
71
|
themePersistentId: z.string().optional(),
|
|
72
72
|
themePersistentIds: z.string().array().optional(),
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
exporterPropertyValues: DTOExporterPropertyValueMap.optional(),
|
|
75
75
|
});
|
|
76
76
|
|
|
77
77
|
export const DTOExportJobResponse = z.object({
|
|
@@ -94,3 +94,20 @@ export type DTOExportJobDestinations = z.infer<typeof DTOExportJobDestinations>;
|
|
|
94
94
|
export type DTOExportJobResult = z.infer<typeof DTOExportJobResult>;
|
|
95
95
|
export type DTOExportJob = z.infer<typeof DTOExportJob>;
|
|
96
96
|
export type DTOExportJobResponse = z.infer<typeof DTOExportJobResponse>;
|
|
97
|
+
|
|
98
|
+
//
|
|
99
|
+
// Write
|
|
100
|
+
//
|
|
101
|
+
|
|
102
|
+
export const DTOExportJobCreateInput = z.object({
|
|
103
|
+
designSystemId: z.string(),
|
|
104
|
+
designSystemVersionId: z.string(),
|
|
105
|
+
exporterId: z.string(),
|
|
106
|
+
brandId: z.string().optional(),
|
|
107
|
+
themeId: z.string().optional(),
|
|
108
|
+
themePersistentIds: z.string().array().optional(),
|
|
109
|
+
destinations: DTOExportJobDestinations,
|
|
110
|
+
exporterPropertyValues: DTOExporterPropertyValueMap.optional(),
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
export type DTOExportJobCreateInput = z.infer<typeof DTOExportJobCreateInput>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExportDestinationsMap, PipelineEventType } from "@supernova-studio/model";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import {
|
|
3
|
+
import { DTOExporterPropertyValueMap } from "./exporter-property";
|
|
4
4
|
import { DTOExportJob } from "./job";
|
|
5
5
|
|
|
6
6
|
export const DTOPipelineListQuery = z.object({
|
|
@@ -22,7 +22,7 @@ export const DTOPipeline = z.object({
|
|
|
22
22
|
themePersistentId: z.string().optional(),
|
|
23
23
|
themePersistentIds: z.string().array().optional(),
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
exporterPropertyValues: DTOExporterPropertyValueMap.optional(),
|
|
26
26
|
|
|
27
27
|
...ExportDestinationsMap.shape,
|
|
28
28
|
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
PipelineEventType,
|
|
11
11
|
} from "@supernova-studio/model";
|
|
12
12
|
import { z } from "zod";
|
|
13
|
-
import {
|
|
13
|
+
import { DTOExporterPropertyValueMap } from "../../dto/export/exporter-property";
|
|
14
14
|
|
|
15
15
|
export const DTOPipelineCreateBody = z.object({
|
|
16
16
|
name: z.string(),
|
|
@@ -22,7 +22,7 @@ export const DTOPipelineCreateBody = z.object({
|
|
|
22
22
|
themePersistentId: z.string().optional(),
|
|
23
23
|
themePersistentIds: z.string().array().optional(),
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
exporterPropertyValues: DTOExporterPropertyValueMap.optional(),
|
|
26
26
|
|
|
27
27
|
destination: PipelineDestinationType.optional(),
|
|
28
28
|
gitQuery: GitObjectsQuery,
|
|
@@ -47,7 +47,7 @@ export const DTOPipelineUpdateBody = z.object({
|
|
|
47
47
|
themePersistentId: z.string().optional(),
|
|
48
48
|
themePersistentIds: z.string().array().optional(),
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
exporterPropertyValues: DTOExporterPropertyValueMap.optional(),
|
|
51
51
|
|
|
52
52
|
destination: PipelineDestinationType.optional(),
|
|
53
53
|
gitQuery: GitObjectsQuery.optional(),
|