@supernova-studio/client 0.55.27 → 0.55.29
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 +2258 -858
- package/dist/index.d.ts +2258 -858
- package/dist/index.js +46 -29
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -28
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/dto/elements/documentation/group-v2.ts +9 -9
- package/src/api/dto/elements/documentation/page-v2.ts +8 -8
- package/src/api/dto/workspaces/membership.ts +13 -1
- package/src/api/endpoints/workspaces/workspace-members.ts +2 -2
- package/src/api/endpoints/workspaces/workspaces.ts +4 -0
- package/src/yjs/docs-editor/mock.ts +8 -8
package/package.json
CHANGED
|
@@ -44,15 +44,15 @@ export type DTODocumentationGroupV2 = z.infer<typeof DTODocumentationGroupV2>;
|
|
|
44
44
|
|
|
45
45
|
export const DTOCreateDocumentationGroupInput = z.object({
|
|
46
46
|
// Identifier
|
|
47
|
-
persistentId: z.string()
|
|
47
|
+
persistentId: z.string(),
|
|
48
48
|
|
|
49
49
|
// Group properties
|
|
50
50
|
title: z.string(),
|
|
51
51
|
configuration: DTODocumentationItemConfigurationV2.partial().optional(),
|
|
52
52
|
|
|
53
53
|
// Group placement properties
|
|
54
|
-
afterPersistentId: z.string().
|
|
55
|
-
parentPersistentId: z.string()
|
|
54
|
+
afterPersistentId: z.string().nullish(),
|
|
55
|
+
parentPersistentId: z.string(),
|
|
56
56
|
});
|
|
57
57
|
|
|
58
58
|
export const DTOUpdateDocumentationGroupInput = z.object({
|
|
@@ -69,8 +69,8 @@ export const DTOMoveDocumentationGroupInput = z.object({
|
|
|
69
69
|
id: z.string(),
|
|
70
70
|
|
|
71
71
|
// Group placement properties
|
|
72
|
-
parentPersistentId: z.string()
|
|
73
|
-
afterPersistentId: z.string().
|
|
72
|
+
parentPersistentId: z.string(),
|
|
73
|
+
afterPersistentId: z.string().nullish(),
|
|
74
74
|
});
|
|
75
75
|
|
|
76
76
|
export const DTODuplicateDocumentationGroupInput = z.object({
|
|
@@ -78,16 +78,16 @@ export const DTODuplicateDocumentationGroupInput = z.object({
|
|
|
78
78
|
id: z.string(),
|
|
79
79
|
|
|
80
80
|
// New group persistent id
|
|
81
|
-
persistentId: z.string()
|
|
81
|
+
persistentId: z.string(),
|
|
82
82
|
|
|
83
83
|
// Group placement properties
|
|
84
|
-
afterPersistentId: z.string().
|
|
85
|
-
parentPersistentId: z.string()
|
|
84
|
+
afterPersistentId: z.string().nullish(),
|
|
85
|
+
parentPersistentId: z.string(),
|
|
86
86
|
});
|
|
87
87
|
|
|
88
88
|
export const DTOCreateDocumentationTabInput = z.object({
|
|
89
89
|
// New group persistent id
|
|
90
|
-
persistentId: z.string()
|
|
90
|
+
persistentId: z.string(),
|
|
91
91
|
|
|
92
92
|
// If this is page, we will attempt to convert it to tab
|
|
93
93
|
// If this is tab group, we will add a new tab to it
|
|
@@ -49,15 +49,15 @@ export type DTODocumentationPageV2 = z.infer<typeof DTODocumentationPageV2>;
|
|
|
49
49
|
|
|
50
50
|
export const DTOCreateDocumentationPageInputV2 = z.object({
|
|
51
51
|
// Identifier
|
|
52
|
-
persistentId: z.string()
|
|
52
|
+
persistentId: z.string(),
|
|
53
53
|
|
|
54
54
|
// Page properties
|
|
55
55
|
title: z.string(),
|
|
56
56
|
configuration: DTODocumentationItemConfigurationV2.partial().optional(),
|
|
57
57
|
|
|
58
58
|
// Page placement properties
|
|
59
|
-
parentPersistentId: z.string()
|
|
60
|
-
afterPersistentId: z.string().
|
|
59
|
+
parentPersistentId: z.string(),
|
|
60
|
+
afterPersistentId: z.string().nullish(),
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
export const DTOUpdateDocumentationPageInputV2 = z.object({
|
|
@@ -74,8 +74,8 @@ export const DTOMoveDocumentationPageInputV2 = z.object({
|
|
|
74
74
|
id: z.string(),
|
|
75
75
|
|
|
76
76
|
// Page placement properties
|
|
77
|
-
parentPersistentId: z.string()
|
|
78
|
-
afterPersistentId: z.string().
|
|
77
|
+
parentPersistentId: z.string(),
|
|
78
|
+
afterPersistentId: z.string().nullish(),
|
|
79
79
|
});
|
|
80
80
|
|
|
81
81
|
export const DTODuplicateDocumentationPageInputV2 = z.object({
|
|
@@ -83,11 +83,11 @@ export const DTODuplicateDocumentationPageInputV2 = z.object({
|
|
|
83
83
|
id: z.string(),
|
|
84
84
|
|
|
85
85
|
// New page persistent id
|
|
86
|
-
persistentId: z.string()
|
|
86
|
+
persistentId: z.string(),
|
|
87
87
|
|
|
88
88
|
// Page placement properties
|
|
89
|
-
parentPersistentId: z.string()
|
|
90
|
-
afterPersistentId: z.string().
|
|
89
|
+
parentPersistentId: z.string(),
|
|
90
|
+
afterPersistentId: z.string().nullish(),
|
|
91
91
|
});
|
|
92
92
|
|
|
93
93
|
export const DTODeleteDocumentationPageInputV2 = z.object({
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { DTOWorkspace
|
|
2
|
+
import { DTOWorkspace } from "./workspace";
|
|
3
|
+
import { User, WorkspaceRoleSchema } from "@supernova-studio/model";
|
|
3
4
|
|
|
4
5
|
//
|
|
5
6
|
// Read
|
|
@@ -20,10 +21,21 @@ export const DTOUserWorkspaceMembership = z.object({
|
|
|
20
21
|
effectiveRole: DTOWorkspaceRole,
|
|
21
22
|
});
|
|
22
23
|
|
|
24
|
+
export const DTOWorkspaceMember = z.object({
|
|
25
|
+
user: User,
|
|
26
|
+
role: WorkspaceRoleSchema,
|
|
27
|
+
effectiveRole: WorkspaceRoleSchema,
|
|
28
|
+
});
|
|
29
|
+
|
|
23
30
|
export const DTOUserWorkspaceMembershipsResponse = z.object({
|
|
24
31
|
membership: z.array(DTOUserWorkspaceMembership),
|
|
25
32
|
});
|
|
26
33
|
|
|
34
|
+
export const DTOWorkspaceMembersListResponse = z.object({
|
|
35
|
+
members: z.array(DTOWorkspaceMember),
|
|
36
|
+
});
|
|
37
|
+
|
|
27
38
|
export type DTOWorkspaceRole = z.infer<typeof DTOWorkspaceRole>;
|
|
28
39
|
export type DTOUserWorkspaceMembership = z.infer<typeof DTOUserWorkspaceMembership>;
|
|
29
40
|
export type DTOUserWorkspaceMembershipsResponse = z.infer<typeof DTOUserWorkspaceMembershipsResponse>;
|
|
41
|
+
export type DTOWorkspaceMembersListResponse = z.infer<typeof DTOWorkspaceMembersListResponse>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { UpdateMembershipRolesInput } from "@supernova-studio/model";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import {
|
|
3
|
+
import { DTOWorkspaceInvitationsListInput, DTOWorkspaceMembersListResponse, DTOWorkspaceResponse } from "../../dto";
|
|
4
4
|
import { RequestExecutor } from "../../transport";
|
|
5
5
|
|
|
6
6
|
export class WorkspaceMembersEndpoint {
|
|
7
7
|
constructor(private readonly requestExecutor: RequestExecutor) {}
|
|
8
8
|
|
|
9
9
|
list(workspaceId: string) {
|
|
10
|
-
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`,
|
|
10
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}/members`, DTOWorkspaceMembersListResponse, {
|
|
11
11
|
method: "GET",
|
|
12
12
|
});
|
|
13
13
|
}
|
|
@@ -25,6 +25,10 @@ export class WorkspacesEndpoint {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
get(workspaceId: string) {
|
|
29
|
+
return this.requestExecutor.json(`/workspaces/${workspaceId}`, DTOWorkspaceResponse, { method: "GET" });
|
|
30
|
+
}
|
|
31
|
+
|
|
28
32
|
delete(workspaceId: string) {
|
|
29
33
|
return this.requestExecutor.json(`/workspaces/${workspaceId}`, z.any(), { method: "DELETE" });
|
|
30
34
|
}
|
|
@@ -1790,7 +1790,7 @@ const blocks: PageBlockDefinition[] = [
|
|
|
1790
1790
|
name: "Component checklist",
|
|
1791
1791
|
description: "Highlight specific component properties",
|
|
1792
1792
|
category: "Components",
|
|
1793
|
-
icon: "https://cdn-assets.supernova.io/blocks/icons/component-checklist.svg",
|
|
1793
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/v2/component-checklist.svg",
|
|
1794
1794
|
searchKeywords: ["components", "health", "properties", "overview", "status"],
|
|
1795
1795
|
item: {
|
|
1796
1796
|
properties: [
|
|
@@ -1853,7 +1853,7 @@ const blocks: PageBlockDefinition[] = [
|
|
|
1853
1853
|
name: "Component overview table",
|
|
1854
1854
|
description: "Show an overview of all components",
|
|
1855
1855
|
category: "Components",
|
|
1856
|
-
icon: "https://cdn-assets.supernova.io/blocks/icons/
|
|
1856
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/component-overview-table.svg",
|
|
1857
1857
|
searchKeywords: ["components", "health", "overview", "status"],
|
|
1858
1858
|
item: {
|
|
1859
1859
|
properties: [
|
|
@@ -1959,9 +1959,9 @@ const blocks: PageBlockDefinition[] = [
|
|
|
1959
1959
|
{
|
|
1960
1960
|
id: "io.supernova.block.figma-components",
|
|
1961
1961
|
name: "Figma component",
|
|
1962
|
-
description: "Display
|
|
1963
|
-
category: "
|
|
1964
|
-
icon: "https://cdn-assets.supernova.io/blocks/icons/component
|
|
1962
|
+
description: "Display components and variants from Figma",
|
|
1963
|
+
category: "Figma",
|
|
1964
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/figma-component.svg",
|
|
1965
1965
|
searchKeywords: ["variants", "properties"],
|
|
1966
1966
|
item: {
|
|
1967
1967
|
properties: [
|
|
@@ -2043,9 +2043,9 @@ const blocks: PageBlockDefinition[] = [
|
|
|
2043
2043
|
{
|
|
2044
2044
|
id: "io.supernova.block.figma-components-propstable",
|
|
2045
2045
|
name: "Figma component properties",
|
|
2046
|
-
description: "Display
|
|
2047
|
-
category: "
|
|
2048
|
-
icon: "https://cdn-assets.supernova.io/blocks/icons/component-
|
|
2046
|
+
description: "Display list of Figma component properties",
|
|
2047
|
+
category: "Figma",
|
|
2048
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/figma-component-properties.svg",
|
|
2049
2049
|
searchKeywords: ["variants", "properties", "props", "table"],
|
|
2050
2050
|
item: {
|
|
2051
2051
|
properties: [
|