@supernova-studio/client 0.55.28 → 0.55.30
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 +27 -12
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- 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 +10 -10
package/package.json
CHANGED
|
@@ -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: [
|
|
@@ -1987,7 +1987,7 @@ const blocks: PageBlockDefinition[] = [
|
|
|
1987
1987
|
{
|
|
1988
1988
|
id: "grid",
|
|
1989
1989
|
name: "Grid",
|
|
1990
|
-
image: "
|
|
1990
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/figma-component-grid.svg",
|
|
1991
1991
|
description: "Components or variants will be rendered individually in a grid layout",
|
|
1992
1992
|
layout: {
|
|
1993
1993
|
type: "Column",
|
|
@@ -2003,7 +2003,7 @@ const blocks: PageBlockDefinition[] = [
|
|
|
2003
2003
|
{
|
|
2004
2004
|
id: "canvas",
|
|
2005
2005
|
name: "Canvas",
|
|
2006
|
-
image: "
|
|
2006
|
+
image: "https://cdn-assets.supernova.io/blocks/variants/figma-component-canvas.svg",
|
|
2007
2007
|
description: "Components or variants will be rendered on a single canvas",
|
|
2008
2008
|
layout: {
|
|
2009
2009
|
type: "Column",
|
|
@@ -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: [
|