@supernova-studio/model 0.48.8 → 0.48.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova-studio/model",
3
- "version": "0.48.8",
3
+ "version": "0.48.10",
4
4
  "description": "Supernova Data Models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -0,0 +1,27 @@
1
+ import { z } from "zod";
2
+ import { DesignSystem } from "./design-system";
3
+
4
+ const DS_NAME_MIN_LENGTH: number = 2;
5
+ const DS_NAME_MAX_LENGTH: number = 64;
6
+ const DS_DESC_MAX_LENGTH: number = 64;
7
+
8
+ const DesignSystemUpdateInputMetadata = z.object({
9
+ name: z.string().min(DS_NAME_MIN_LENGTH).max(DS_NAME_MAX_LENGTH).trim().optional(),
10
+ description: z.string().max(DS_DESC_MAX_LENGTH).trim().optional(),
11
+ });
12
+
13
+ export const DesignSystemUpdateInput = DesignSystem.partial()
14
+ .omit({
15
+ id: true,
16
+ createdAt: true,
17
+ updatedAt: true,
18
+ docSlug: true,
19
+ docViewUrl: true,
20
+ designSystemSwitcher: true,
21
+ })
22
+ .extend({
23
+ meta: DesignSystemUpdateInputMetadata.optional(),
24
+ });
25
+
26
+ export type DesignSystemUpdateInput = z.infer<typeof DesignSystemUpdateInput>;
27
+ export type DesignSystemUpdateInputMetadata = z.infer<typeof DesignSystemUpdateInputMetadata>;
package/src/dsm/index.ts CHANGED
@@ -8,9 +8,9 @@ export * from "./import";
8
8
  export * from "./properties";
9
9
  export * from "./views";
10
10
  export * from "./brand";
11
+ export * from "./design-system-update";
11
12
  export * from "./design-system";
12
13
  export * from "./desing-system-create";
13
- export * from "./desing-system-update";
14
14
  export * from "./exporter-property-values-collection";
15
15
  export * from "./published-doc-page";
16
16
  export * from "./published-doc";
@@ -1,24 +0,0 @@
1
- import { z } from "zod";
2
-
3
- const DS_NAME_MIN_LENGTH: number = 2;
4
- const DS_NAME_MAX_LENGTH: number = 64;
5
- const DS_DESC_MAX_LENGTH: number = 64;
6
-
7
- const DesignSystemUpdateInputMetadata = z.object({
8
- name: z.string().min(DS_NAME_MIN_LENGTH).max(DS_NAME_MAX_LENGTH).trim().optional(),
9
- description: z.string().max(DS_DESC_MAX_LENGTH).trim().optional(),
10
- });
11
-
12
- export const DesignSystemUpdateInput = z.object({
13
- meta: DesignSystemUpdateInputMetadata.optional(),
14
- workspaceId: z.string().optional(),
15
- isPublic: z.boolean().optional(),
16
- basePrefixes: z.array(z.string()).optional(),
17
- docUserSlug: z.string().nullish().optional(),
18
- source: z.array(z.string()).optional(),
19
- name: z.string().min(DS_NAME_MIN_LENGTH).max(DS_NAME_MAX_LENGTH).trim().optional(),
20
- description: z.string().max(DS_DESC_MAX_LENGTH).trim().optional(),
21
- docExporterId: z.string().optional(),
22
- });
23
-
24
- export type DesignSystemUpdateInput = z.infer<typeof DesignSystemUpdateInput>;