@supernova-studio/client 0.55.3 → 0.55.5
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 +107 -1
- package/dist/index.d.ts +107 -1
- package/dist/index.js +152 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +151 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/dto/users/user.ts +4 -0
- package/src/api/endpoints/users.ts +9 -1
- package/src/yjs/docs-editor/mock.ts +144 -0
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { UserProfileUpdate } from "@supernova-studio/model";
|
|
1
2
|
import { z } from "zod";
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -22,6 +23,9 @@ export const DTOUserGetResponse = z.object({
|
|
|
22
23
|
user: DTOUser,
|
|
23
24
|
});
|
|
24
25
|
|
|
26
|
+
export const DTOUserProfileUpdate = UserProfileUpdate;
|
|
27
|
+
|
|
25
28
|
export type DTOUserProfile = z.infer<typeof DTOUserProfile>;
|
|
26
29
|
export type DTOUser = z.infer<typeof DTOUser>;
|
|
27
30
|
export type DTOUserGetResponse = z.infer<typeof DTOUserGetResponse>;
|
|
31
|
+
export type DTOUserProfileUpdate = z.infer<typeof DTOUserProfileUpdate>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UserProfileUpdate } from "@supernova-studio/model";
|
|
2
|
+
import { DTOUserProfileUpdate, DTOUserWorkspaceMembershipsResponse } from "../dto";
|
|
2
3
|
import { DTOAuthenticatedUserResponse } from "../dto/users/authenticated-user";
|
|
3
4
|
import { RequestExecutor } from "../transport/request-executor";
|
|
4
5
|
|
|
@@ -16,4 +17,11 @@ export class UsersEndpoint {
|
|
|
16
17
|
delete(uid: string) {
|
|
17
18
|
return this.requestExecutor.json(`/users/${uid}`, DTOAuthenticatedUserResponse, { method: "DELETE" });
|
|
18
19
|
}
|
|
20
|
+
|
|
21
|
+
updateProfile(uid: string, body: DTOUserProfileUpdate) {
|
|
22
|
+
return this.requestExecutor.json(`/users/${uid}/profile`, DTOAuthenticatedUserResponse, {
|
|
23
|
+
method: "PUT",
|
|
24
|
+
body,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
19
27
|
}
|
|
@@ -1930,4 +1930,148 @@ const blocks: PageBlockDefinition[] = [
|
|
|
1930
1930
|
showBlockHeaderInEditor: false,
|
|
1931
1931
|
},
|
|
1932
1932
|
},
|
|
1933
|
+
{
|
|
1934
|
+
id: "io.supernova.block.figma-components",
|
|
1935
|
+
name: "Figma component",
|
|
1936
|
+
description: "Display Figma component variants or group of components.",
|
|
1937
|
+
category: "Components",
|
|
1938
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/component-checklist.svg",
|
|
1939
|
+
searchKeywords: ["variants", "properties"],
|
|
1940
|
+
item: {
|
|
1941
|
+
properties: [
|
|
1942
|
+
{
|
|
1943
|
+
id: "figmaComponent",
|
|
1944
|
+
name: "Figma component",
|
|
1945
|
+
type: "FigmaComponent",
|
|
1946
|
+
options: {
|
|
1947
|
+
renderLayoutAs: "Grid",
|
|
1948
|
+
},
|
|
1949
|
+
variantOptions: {
|
|
1950
|
+
canvas: {
|
|
1951
|
+
renderLayoutAs: "Canvas",
|
|
1952
|
+
},
|
|
1953
|
+
},
|
|
1954
|
+
},
|
|
1955
|
+
],
|
|
1956
|
+
appearance: {
|
|
1957
|
+
isBordered: true,
|
|
1958
|
+
hasBackground: false,
|
|
1959
|
+
},
|
|
1960
|
+
variants: [
|
|
1961
|
+
{
|
|
1962
|
+
id: "grid",
|
|
1963
|
+
name: "Grid",
|
|
1964
|
+
image: "tbd",
|
|
1965
|
+
description: "Components or variants will be rendered individually in a grid layout",
|
|
1966
|
+
layout: {
|
|
1967
|
+
type: "Column",
|
|
1968
|
+
children: ["figmaComponent"],
|
|
1969
|
+
columnAlign: "Start",
|
|
1970
|
+
columnResizing: "Fill",
|
|
1971
|
+
gap: "Medium",
|
|
1972
|
+
},
|
|
1973
|
+
maxColumns: 4,
|
|
1974
|
+
defaultColumns: 1,
|
|
1975
|
+
appearance: {},
|
|
1976
|
+
},
|
|
1977
|
+
{
|
|
1978
|
+
id: "canvas",
|
|
1979
|
+
name: "Canvas",
|
|
1980
|
+
image: "tbd",
|
|
1981
|
+
description: "Components or variants will be rendered on a single canvas",
|
|
1982
|
+
layout: {
|
|
1983
|
+
type: "Column",
|
|
1984
|
+
children: ["figmaComponent"],
|
|
1985
|
+
columnAlign: "Start",
|
|
1986
|
+
columnResizing: "Fill",
|
|
1987
|
+
gap: "Medium",
|
|
1988
|
+
},
|
|
1989
|
+
maxColumns: 4,
|
|
1990
|
+
defaultColumns: 1,
|
|
1991
|
+
appearance: {},
|
|
1992
|
+
},
|
|
1993
|
+
],
|
|
1994
|
+
defaultVariantKey: "grid",
|
|
1995
|
+
},
|
|
1996
|
+
behavior: {
|
|
1997
|
+
dataType: "FigmaComponent",
|
|
1998
|
+
entities: {
|
|
1999
|
+
selectionType: "Entity",
|
|
2000
|
+
maxSelected: 0,
|
|
2001
|
+
},
|
|
2002
|
+
},
|
|
2003
|
+
editorOptions: {
|
|
2004
|
+
onboarding: {
|
|
2005
|
+
helpText: "Display Figma component variants or group of components.",
|
|
2006
|
+
documentationLink:
|
|
2007
|
+
"https://learn.supernova.io/latest/documentation/types-of-blocks/token/tokens/general-84NRgxGl#section-token-group-09",
|
|
2008
|
+
},
|
|
2009
|
+
},
|
|
2010
|
+
appearance: {
|
|
2011
|
+
isBordered: true,
|
|
2012
|
+
hasBackground: false,
|
|
2013
|
+
isEditorPresentationDifferent: false,
|
|
2014
|
+
showBlockHeaderInEditor: false,
|
|
2015
|
+
},
|
|
2016
|
+
},
|
|
2017
|
+
{
|
|
2018
|
+
id: "io.supernova.block.figma-components-propstable",
|
|
2019
|
+
name: "Figma component properties",
|
|
2020
|
+
description: "Display properties based on Figma component data.",
|
|
2021
|
+
category: "Components",
|
|
2022
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/component-checklist.svg",
|
|
2023
|
+
searchKeywords: ["variants", "properties", "props", "table"],
|
|
2024
|
+
item: {
|
|
2025
|
+
properties: [
|
|
2026
|
+
{
|
|
2027
|
+
id: "figmaComponent",
|
|
2028
|
+
name: "Figma component",
|
|
2029
|
+
type: "FigmaComponent",
|
|
2030
|
+
options: {
|
|
2031
|
+
renderLayoutAs: "PropsTable",
|
|
2032
|
+
},
|
|
2033
|
+
},
|
|
2034
|
+
],
|
|
2035
|
+
appearance: {
|
|
2036
|
+
isBordered: true,
|
|
2037
|
+
hasBackground: false,
|
|
2038
|
+
},
|
|
2039
|
+
variants: [
|
|
2040
|
+
{
|
|
2041
|
+
id: "default",
|
|
2042
|
+
name: "Default",
|
|
2043
|
+
layout: {
|
|
2044
|
+
type: "Column",
|
|
2045
|
+
children: ["figmaComponent"],
|
|
2046
|
+
columnAlign: "Start",
|
|
2047
|
+
columnResizing: "Fill",
|
|
2048
|
+
gap: "Medium",
|
|
2049
|
+
},
|
|
2050
|
+
maxColumns: 1,
|
|
2051
|
+
defaultColumns: 1,
|
|
2052
|
+
appearance: {},
|
|
2053
|
+
},
|
|
2054
|
+
],
|
|
2055
|
+
defaultVariantKey: "default",
|
|
2056
|
+
},
|
|
2057
|
+
behavior: {
|
|
2058
|
+
dataType: "FigmaComponent",
|
|
2059
|
+
entities: {
|
|
2060
|
+
selectionType: "Entity",
|
|
2061
|
+
maxSelected: 1,
|
|
2062
|
+
},
|
|
2063
|
+
},
|
|
2064
|
+
editorOptions: {
|
|
2065
|
+
onboarding: {
|
|
2066
|
+
helpText: "Display properties based on Figma component data.",
|
|
2067
|
+
documentationLink: "",
|
|
2068
|
+
},
|
|
2069
|
+
},
|
|
2070
|
+
appearance: {
|
|
2071
|
+
isBordered: true,
|
|
2072
|
+
hasBackground: false,
|
|
2073
|
+
isEditorPresentationDifferent: false,
|
|
2074
|
+
showBlockHeaderInEditor: false,
|
|
2075
|
+
},
|
|
2076
|
+
},
|
|
1933
2077
|
];
|