@supernova-studio/client 0.55.28 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supernova-studio/client",
3
- "version": "0.55.28",
3
+ "version": "0.55.29",
4
4
  "description": "Supernova Data Models",
5
5
  "source": "src/index.ts",
6
6
  "main": "dist/index.js",
@@ -1,5 +1,6 @@
1
1
  import { z } from "zod";
2
- import { DTOWorkspace, DTOWorkspaceResponse } from "./workspace";
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 { DTOUserWorkspaceMembershipsResponse, DTOWorkspaceInvitationsListInput, DTOWorkspaceResponse } from "../../dto";
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`, DTOUserWorkspaceMembershipsResponse, {
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/v2/component-checklist-all.svg",
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 Figma component variants or group of components.",
1963
- category: "Components",
1964
- icon: "https://cdn-assets.supernova.io/blocks/icons/component-checklist.svg",
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 properties based on Figma component data.",
2047
- category: "Components",
2048
- icon: "https://cdn-assets.supernova.io/blocks/icons/component-checklist.svg",
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: [