@supernova-studio/model 0.41.0 → 0.44.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 +670 -25
- package/dist/index.d.ts +670 -25
- package/dist/index.js +49 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +359 -319
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/billing/features.ts +1 -0
- package/src/dsm/elements/data/documentation-v1.ts +2 -0
- package/src/dsm/elements/data/documentation-v2.ts +4 -0
- package/src/dsm/published-doc-page.ts +18 -11
- package/src/integrations/integration.ts +12 -11
- package/src/users/index.ts +2 -0
- package/src/users/user-create.ts +9 -0
- package/src/users/user-test.ts +8 -0
package/package.json
CHANGED
package/src/billing/features.ts
CHANGED
|
@@ -35,6 +35,7 @@ export const FeaturesSummary = z.object({
|
|
|
35
35
|
workspacePaidSeats: featureLimitedSchema,
|
|
36
36
|
workspaceViewers: featureLimitedSchema,
|
|
37
37
|
customDocumentationExporter: featureToggleSchema,
|
|
38
|
+
protectedPages: featureToggleSchema,
|
|
38
39
|
});
|
|
39
40
|
|
|
40
41
|
export type FeatureLimitedDetails = z.infer<typeof featureLimitedSchema>;
|
|
@@ -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(),
|
|
7
|
+
isHidden: z.boolean(),
|
|
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
|
|
14
|
-
id: string
|
|
15
|
-
publishedDocId: string
|
|
16
|
-
pageShortPersistentId: string
|
|
17
|
-
pathV1: string
|
|
18
|
-
pathV2: string
|
|
19
|
-
storagePath: string
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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">>;
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
|
|
3
|
-
export const IntegrationType = z.enum(["Figma", "Github", "Gitlab", "Bitbucket", "Azure"]);
|
|
4
|
-
export type IntegrationType = z.infer<typeof IntegrationType>;
|
|
5
|
-
|
|
6
|
-
export const Integration = z.object({
|
|
7
|
-
id: z.string(),
|
|
8
|
-
workspaceId: z.string(),
|
|
9
|
-
type: IntegrationType,
|
|
10
|
-
createdAt: z.coerce.date(),
|
|
11
|
-
});
|
|
12
|
-
export type Integration = z.infer<typeof Integration>;
|
|
13
|
-
|
|
14
3
|
export const IntegrationCredentialsType = z.enum(["OAuth2", "PAT"]);
|
|
15
4
|
export type IntegrationCredentialsType = z.infer<typeof IntegrationCredentialsType>;
|
|
16
5
|
|
|
@@ -34,3 +23,15 @@ export const IntegrationCredentialsSchema = z.object({
|
|
|
34
23
|
});
|
|
35
24
|
|
|
36
25
|
export type IntegrationCredentials = z.infer<typeof IntegrationCredentialsSchema>;
|
|
26
|
+
|
|
27
|
+
export const IntegrationType = z.enum(["Figma", "Github", "Gitlab", "Bitbucket", "Azure"]);
|
|
28
|
+
export type IntegrationType = z.infer<typeof IntegrationType>;
|
|
29
|
+
|
|
30
|
+
export const Integration = z.object({
|
|
31
|
+
id: z.string(),
|
|
32
|
+
workspaceId: z.string(),
|
|
33
|
+
type: IntegrationType,
|
|
34
|
+
createdAt: z.coerce.date(),
|
|
35
|
+
integrationCredentials: z.array(IntegrationCredentialsSchema).optional(),
|
|
36
|
+
});
|
|
37
|
+
export type Integration = z.infer<typeof Integration>;
|
package/src/users/index.ts
CHANGED