@supernova-studio/model 0.48.18 → 0.48.19

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova-studio/model",
3
- "version": "0.48.18",
3
+ "version": "0.48.19",
4
4
  "description": "Supernova Data Models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,7 @@
1
+ import { z } from "zod";
2
+ import { EventDataSourceImported } from "./data-source-imported";
3
+ import { EventVersionReleased } from "./version-released";
4
+
5
+ export const Event = z.discriminatedUnion("type", [EventVersionReleased, EventDataSourceImported]);
6
+
7
+ export type Event = z.infer<typeof Event>;
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ export const EventDataSourceImported = z.object({
4
+ type: z.literal("DataSourceImported"),
5
+ workspaceId: z.string(),
6
+ designSystemId: z.string(),
7
+ });
8
+
9
+ export type EventDataSourceImported = z.infer<typeof EventDataSourceImported>;
@@ -0,0 +1,3 @@
1
+ export * from "./base";
2
+ export * from "./data-source-imported";
3
+ export * from "./version-released";
@@ -0,0 +1,10 @@
1
+ import { z } from "zod";
2
+
3
+ export const EventVersionReleased = z.object({
4
+ type: z.literal("DesignSystemVersionReleased"),
5
+ workspaceId: z.string(),
6
+ designSystemId: z.string(),
7
+ versionId: z.string(),
8
+ });
9
+
10
+ export type EventVersionReleased = z.infer<typeof EventVersionReleased>;
package/src/index.ts CHANGED
@@ -6,6 +6,7 @@ export * from "./custom-domains";
6
6
  export * from "./data-dumps";
7
7
  export * from "./docs-server";
8
8
  export * from "./dsm";
9
+ export * from "./events";
9
10
  export * from "./export";
10
11
  export * from "./feature-flags";
11
12
  export * from "./helpers";