@supernova-studio/client 0.23.0 → 0.24.0
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 +12 -12
- package/dist/index.d.ts +12 -12
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/dto/elements/elements-action-v2.ts +3 -3
- package/src/api/dto/elements/figma-nodes/figma-node.ts +2 -2
- package/src/api/dto/elements/figma-nodes/node-actions-v2.ts +6 -6
- package/src/api/dto/elements/get-elements-v2.ts +6 -6
package/package.json
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
DTODocumentationTabGroupDeleteActionInputV2,
|
|
28
28
|
DTODocumentationTabGroupDeleteActionOutputV2,
|
|
29
29
|
} from "./documentation/group-action";
|
|
30
|
-
import {
|
|
30
|
+
import { DTOFigmaNodeRenderActionInput, DTOFigmaNodeRenderActionOutput } from "./figma-nodes/node-actions-v2";
|
|
31
31
|
|
|
32
32
|
//
|
|
33
33
|
// Read
|
|
@@ -51,7 +51,7 @@ export const DTOElementActionOutput = z.discriminatedUnion("type", [
|
|
|
51
51
|
DTODocumentationTabGroupDeleteActionOutputV2,
|
|
52
52
|
|
|
53
53
|
// // Figma frames
|
|
54
|
-
|
|
54
|
+
DTOFigmaNodeRenderActionOutput,
|
|
55
55
|
]);
|
|
56
56
|
|
|
57
57
|
export type DTOElementActionOutput = z.infer<typeof DTOElementActionOutput>;
|
|
@@ -78,7 +78,7 @@ export const DTOElementActionInput = z.discriminatedUnion("type", [
|
|
|
78
78
|
DTODocumentationTabGroupDeleteActionInputV2,
|
|
79
79
|
|
|
80
80
|
// Figma frames
|
|
81
|
-
|
|
81
|
+
DTOFigmaNodeRenderActionInput,
|
|
82
82
|
]);
|
|
83
83
|
|
|
84
84
|
export type DTOElementActionInput = z.infer<typeof DTOElementActionInput>;
|
|
@@ -35,7 +35,7 @@ export type DTOFigmaNode = z.infer<typeof DTOFigmaNode>;
|
|
|
35
35
|
// Write
|
|
36
36
|
//
|
|
37
37
|
|
|
38
|
-
export const
|
|
38
|
+
export const DTOFigmaNodeRenderInput = z.object({
|
|
39
39
|
// Id of a design system's data source representing a linked Figma file
|
|
40
40
|
sourceId: z.string(),
|
|
41
41
|
|
|
@@ -43,4 +43,4 @@ export const DTOFigmaNodeCreateInput = z.object({
|
|
|
43
43
|
figmaFileNodeId: z.string(),
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
export type
|
|
46
|
+
export type DTOFigmaNodeRenderInput = z.infer<typeof DTOFigmaNodeRenderInput>;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { DTOFigmaNode,
|
|
2
|
+
import { DTOFigmaNode, DTOFigmaNodeRenderInput } from "./figma-node";
|
|
3
3
|
|
|
4
4
|
//
|
|
5
5
|
// Read
|
|
6
6
|
//
|
|
7
7
|
|
|
8
|
-
export const
|
|
8
|
+
export const DTOFigmaNodeRenderActionOutput = z.object({
|
|
9
9
|
type: z.literal("FigmaNodeRender"),
|
|
10
10
|
figmaNodes: z.array(DTOFigmaNode),
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
export type
|
|
13
|
+
export type DTOFigmaNodeRenderActionOutput = z.infer<typeof DTOFigmaNodeRenderActionOutput>;
|
|
14
14
|
|
|
15
15
|
//
|
|
16
16
|
// Read
|
|
17
17
|
//
|
|
18
18
|
|
|
19
|
-
export const
|
|
19
|
+
export const DTOFigmaNodeRenderActionInput = z.object({
|
|
20
20
|
type: z.literal("FigmaNodeRender"),
|
|
21
|
-
input:
|
|
21
|
+
input: DTOFigmaNodeRenderInput.array(),
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
export type
|
|
24
|
+
export type DTOFigmaNodeRenderActionInput = z.infer<typeof DTOFigmaNodeRenderActionInput>;
|
|
@@ -5,10 +5,10 @@ import { DTOFigmaNode } from "./figma-nodes";
|
|
|
5
5
|
// Read
|
|
6
6
|
//
|
|
7
7
|
|
|
8
|
-
export const
|
|
8
|
+
export const DTOElementsGetTypeFilter = z.enum(["FigmaNode"]);
|
|
9
9
|
|
|
10
|
-
export const
|
|
11
|
-
types: z.string().transform(val => val.split(",").map(v =>
|
|
10
|
+
export const DTOElementsGetQuerySchema = z.object({
|
|
11
|
+
types: z.string().transform(val => val.split(",").map(v => DTOElementsGetTypeFilter.parse(v))),
|
|
12
12
|
});
|
|
13
13
|
|
|
14
14
|
export const DTOElementsGetOutput = z.object({
|
|
@@ -16,6 +16,6 @@ export const DTOElementsGetOutput = z.object({
|
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
export type DTOElementsGetOutput = z.infer<typeof DTOElementsGetOutput>;
|
|
19
|
-
export type
|
|
20
|
-
export type
|
|
21
|
-
export type
|
|
19
|
+
export type DTOElementsGetQueryRaw = z.input<typeof DTOElementsGetQuerySchema>;
|
|
20
|
+
export type DTOElementsGetQueryParsed = z.output<typeof DTOElementsGetQuerySchema>;
|
|
21
|
+
export type DTOElementsGetTypeFilter = z.infer<typeof DTOElementsGetTypeFilter>;
|