@supernova-studio/model 0.41.0 → 0.42.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova-studio/model",
3
- "version": "0.41.0",
3
+ "version": "0.42.0",
4
4
  "description": "Supernova Data Models",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -3,6 +3,8 @@ import { DocumentationItemHeaderV1, defaultDocumentationItemHeaderV1 } from "./i
3
3
 
4
4
  export const DocumentationItemConfigurationV1 = z.object({
5
5
  showSidebar: z.boolean(),
6
+ isPrivate: z.boolean().optional(),
7
+ isHidden: z.boolean().optional(),
6
8
  header: DocumentationItemHeaderV1,
7
9
  });
8
10
 
@@ -3,6 +3,8 @@ import { DocumentationItemHeaderV2, defaultDocumentationItemHeaderV2 } from "./i
3
3
 
4
4
  export const DocumentationItemConfigurationV2 = z.object({
5
5
  showSidebar: z.boolean(),
6
+ isPrivate: z.boolean().optional(),
7
+ isHidden: z.boolean().optional(),
6
8
  header: DocumentationItemHeaderV2,
7
9
  });
8
10
 
@@ -10,5 +12,7 @@ export type DocumentationItemConfigurationV2 = z.infer<typeof DocumentationItemC
10
12
 
11
13
  export const defaultDocumentationItemConfigurationV2: DocumentationItemConfigurationV2 = {
12
14
  header: defaultDocumentationItemHeaderV2,
15
+ isHidden: false,
16
+ isPrivate: false,
13
17
  showSidebar: true,
14
18
  };
@@ -1,3 +1,4 @@
1
+ import { z } from "zod";
1
2
  import { DbCreateInputOmit, DbUpdate } from "../helpers";
2
3
  import { OmitStrict } from "../utils";
3
4
 
@@ -10,17 +11,23 @@ export function tryParseShortPersistentId(url = "/") {
10
11
  return shortPersistentId?.length === SHORT_PERSISTENT_ID_LENGTH ? shortPersistentId : null;
11
12
  }
12
13
 
13
- export type PublishedDocPage = {
14
- id: string;
15
- publishedDocId: string;
16
- pageShortPersistentId: string;
17
- pathV1: string;
18
- pathV2: string;
19
- storagePath: string;
20
- createdAt: Date;
21
- updatedAt: Date;
22
- locale: string | undefined;
23
- };
14
+ export const PublishedDocPage = z.object({
15
+ id: z.string(),
16
+ publishedDocId: z.string(),
17
+ pageShortPersistentId: z.string(),
18
+ pathV1: z.string(),
19
+ pathV2: z.string(),
20
+ storagePath: z.string(),
21
+ locale: z.string().optional(),
22
+
23
+ isPrivate: z.boolean(),
24
+ isHidden: z.boolean(),
25
+
26
+ createdAt: z.coerce.date(),
27
+ updatedAt: z.coerce.date(),
28
+ });
29
+
30
+ export type PublishedDocPage = z.infer<typeof PublishedDocPage>;
24
31
 
25
32
  export type CreatePublishedDocPage = DbCreateInputOmit<PublishedDocPage>;
26
33
  export type UpdatePublishedDocPage = DbUpdate<OmitStrict<PublishedDocPage, "pageShortPersistentId" | "publishedDocId">>;