@supernova-studio/model 0.45.1 → 0.46.1
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 +34 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +14 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/elements/figma-node-reference.ts +3 -2
- package/src/dsm/version.ts +19 -1
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { DesignElementBase } from "./base";
|
|
3
|
-
import { FigmaNodeReferenceData } from "./data/figma-node-reference";
|
|
4
2
|
import { DbCreateInputOmit, DbUpdate } from "../../helpers";
|
|
5
3
|
import { OmitStrict } from "../../utils";
|
|
4
|
+
import { DesignElementBase } from "./base";
|
|
5
|
+
import { FigmaNodeReferenceData } from "./data/figma-node-reference";
|
|
6
6
|
|
|
7
7
|
export const FigmaNodeReferenceOrigin = z.object({
|
|
8
8
|
sourceId: z.string(),
|
|
9
|
+
parentName: z.string().optional(),
|
|
9
10
|
});
|
|
10
11
|
|
|
11
12
|
export const FigmaNodeReference = DesignElementBase.extend({
|
package/src/dsm/version.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { OmitStrict } from "../utils";
|
|
3
|
-
import { DbCreateInputOmit, DbUpdate } from "../helpers";
|
|
3
|
+
import { DbCreateInputOmit, DbUpdate, nullishToOptional } from "../helpers";
|
|
4
4
|
|
|
5
5
|
export const DesignSystemVersion = z.object({
|
|
6
6
|
id: z.string(),
|
|
@@ -22,3 +22,21 @@ export type UpdateDesignSystemVersion = OmitStrict<
|
|
|
22
22
|
DbUpdate<DesignSystemVersion>,
|
|
23
23
|
"designSystemId" | "isReadonly" | "version" | "parentId"
|
|
24
24
|
>;
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
// Jobs
|
|
28
|
+
export const VersionCreationJobStatus = z.enum(["Success", "InProgress", "Error"]);
|
|
29
|
+
|
|
30
|
+
export type VersionCreationJobStatus = z.infer<typeof VersionCreationJobStatus>;
|
|
31
|
+
|
|
32
|
+
export const VersionCreationJob = z.object({
|
|
33
|
+
_id: z.string().optional(),
|
|
34
|
+
version: z.string(),
|
|
35
|
+
designSystemId: z.string(),
|
|
36
|
+
designSystemVersionId: nullishToOptional(z.string()),
|
|
37
|
+
status: VersionCreationJobStatus,
|
|
38
|
+
errorMessage: nullishToOptional(z.string()),
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
export type VersionCreationJob = z.infer<typeof VersionCreationJob>;
|
|
42
|
+
|