@supernova-studio/supernova-sdk-beta 2.1.2 → 2.1.12
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/build/sdk-typescript/src/core/SDKSupernova.d.ts +10 -2
- package/build/sdk-typescript/src/core/areas/SDKAreaAI.d.ts +37 -5
- package/build/sdk-typescript/src/core/areas/SDKAreaAutomation.d.ts +2 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaDataSources.d.ts +6 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaDocsAnalytics.d.ts +8 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaDocumentation.d.ts +9 -9
- package/build/sdk-typescript/src/core/areas/SDKAreaNetwork.d.ts +1 -2
- package/build/sdk-typescript/src/core/areas/SDKAreaProjects.d.ts +69 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaRawData.d.ts +33 -49
- package/build/sdk-typescript/src/core/areas/SDKAreaResources.d.ts +9 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaWorkspaces.d.ts +35 -0
- package/build/sdk-typescript/src/core/data/SDKDataBridge.d.ts +10 -3
- package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +73 -8
- package/build/sdk-typescript/src/core/data/SDKDataCoreCached.d.ts +50 -0
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreAIRequests.d.ts +19 -4
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +70 -1
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +25 -14
- package/build/sdk-typescript/src/core/resolvers/SDKDesignComponentGroupResolver.d.ts +0 -1
- package/build/sdk-typescript/src/core/resolvers/SDKDocsEntityItemResolver.d.ts +13 -13
- package/build/sdk-typescript/src/exports.d.ts +13 -3
- package/build/sdk-typescript/src/model/code-components/SDKCodeComponentPropertyControlDefinition.d.ts +1 -4
- package/build/sdk-typescript/src/model/code-components/SDKCodeComponentPropertyDefinition.d.ts +0 -2
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/files/SDKDocsBlockActualFiles.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockFileProperty.d.ts +19 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockStorybookProperty.d.ts +19 -5
- package/build/sdk-typescript/src/model/docs_analytics/SDKDocsAnalyticsComparisonData.d.ts +10 -0
- package/build/sdk-typescript/src/model/docs_analytics/SDKDocsAnalyticsData.d.ts +14 -0
- package/build/sdk-typescript/src/model/docs_analytics/SDKDocsAnalyticsPageComparisonData.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs_analytics/SDKDocsAnalyticsPageVisitData.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs_analytics/SDKDocsAnalyticsTimeFrame.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs_analytics/SDKDocsAnalyticsVisitData.d.ts +9 -0
- package/build/sdk-typescript/src/model/docs_analytics/SDKDocsAnalyticsVisitHeatMapWeek.d.ts +14 -0
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockBehaviorDataType.d.ts +3 -1
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockItemPropertyType.d.ts +3 -1
- package/build/sdk-typescript/src/model/enums/SDKSourceType.d.ts +2 -1
- package/build/sdk-typescript/src/model/enums/SDKUserRole.d.ts +0 -2
- package/build/sdk-typescript/src/model/exporters/SDKPipeline.d.ts +1 -1
- package/build/sdk-typescript/src/model/files/SDKFileUpload.d.ts +28 -0
- package/build/sdk-typescript/src/model/groups/SDKTokenGroup.d.ts +1 -0
- package/build/sdk-typescript/src/model/projects/SDKProject.d.ts +39 -0
- package/build/sdk-typescript/src/model/projects/SDKProjectContext.d.ts +47 -0
- package/build/sdk-typescript/src/model/storybook/SDKStorybookEntry.d.ts +23 -0
- package/build/sdk-typescript/src/model/storybook/SDKStorybookUpdate.d.ts +17 -0
- package/build/sdk-typescript/src/model/support/SDKSource.d.ts +27 -1
- package/build/sdk-typescript/src/model/support/SDKTokenOrigin.d.ts +2 -2
- package/build/sdk-typescript/src/model/tokens/SDKToken.d.ts +1 -0
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceProductFeatures.d.ts +1 -1
- package/build/sdk-typescript/src/tools/docs-block-builder/SDKDocsBlockBuilder.d.ts +12 -0
- package/build/sdk-typescript/src/utils/RawUtils.d.ts +69 -0
- package/build/supernova-sdk-typescript.js +1 -2
- package/build/supernova-sdk-typescript.js.map +1 -1
- package/package.json +33 -51
- package/build/sdk-typescript/src/model/exporters/remote/SDKRemotePipelineModel.d.ts +0 -51
- package/build/supernova-sdk-typescript.js.LICENSE.txt +0 -8
|
@@ -68,9 +68,15 @@ export { ElementDataViewColumn, ElementDataViewColumnBasePropertyType, ElementDa
|
|
|
68
68
|
export { DesignComponent } from "./model/components/SDKDesignComponent";
|
|
69
69
|
export { DesignComponentVariant } from "./model/components/SDKDesignComponentVariant";
|
|
70
70
|
export { DesignComponentPropertyBoolean, DesignComponentPropertyDefinition, DesignComponentPropertyInstanceSwap, DesignComponentPropertyText, DesignComponentPropertyVariant, DesignComponentPropertyType, } from "./model/components/SDKDesignComponentPropertyDefinition";
|
|
71
|
-
export { CodeComponent } from
|
|
72
|
-
export { CodeComponentPropertyControlType, CodeComponentPropertyControlDefinition } from
|
|
73
|
-
export { CodeComponentPropertyDefinition } from
|
|
71
|
+
export { CodeComponent } from "./model/code-components/SDKCodeComponent";
|
|
72
|
+
export { CodeComponentPropertyControlType, CodeComponentPropertyControlDefinition, } from "./model/code-components/SDKCodeComponentPropertyControlDefinition";
|
|
73
|
+
export { CodeComponentPropertyDefinition } from "./model/code-components/SDKCodeComponentPropertyDefinition";
|
|
74
|
+
export { DocsAnalyticsVisitData } from "./model/docs_analytics/SDKDocsAnalyticsVisitData";
|
|
75
|
+
export { DocsAnalyticsPageVisitData } from "./model/docs_analytics/SDKDocsAnalyticsPageVisitData";
|
|
76
|
+
export { DocsAnalyticsTimeFrame } from "./model/docs_analytics/SDKDocsAnalyticsTimeFrame";
|
|
77
|
+
export { DocsAnalyticsComparisonData } from "./model/docs_analytics/SDKDocsAnalyticsComparisonData";
|
|
78
|
+
export { DocsAnalyticsPageComparisonData } from "./model/docs_analytics/SDKDocsAnalyticsPageComparisonData";
|
|
79
|
+
export { DocsAnalyticsVisitHeatMapWeek } from "./model/docs_analytics/SDKDocsAnalyticsVisitHeatMapWeek";
|
|
74
80
|
export { DocsBlockBehavior } from "./model/docs/blocks/definition/SDKDocsBlockBehavior";
|
|
75
81
|
export { DocsBlockDefinition } from "./model/docs/blocks/definition/SDKDocsBlockDefinition";
|
|
76
82
|
export { DocsBlockItemDefinition } from "./model/docs/blocks/definition/SDKDocsBlockItemDefinition";
|
|
@@ -325,3 +331,7 @@ export type { DesignComponentGroupRemoteModel } from "./model/groups/SDKDesignCo
|
|
|
325
331
|
export type { ElementPropertyRemoteModel } from "./model/elements/SDKElementProperty";
|
|
326
332
|
export type { ElementPropertyValueRemoteModel } from "./model/elements/values/SDKElementPropertyValue";
|
|
327
333
|
export type { ElementDataViewRemoteModel } from "./model/elements/SDKElementDataView";
|
|
334
|
+
export { RawUtils } from "./utils/RawUtils";
|
|
335
|
+
export { StorybookEntry } from "./model/storybook/SDKStorybookEntry";
|
|
336
|
+
export type { RemoteStorybookEntry } from "./model/storybook/SDKStorybookEntry";
|
|
337
|
+
export type { RemoteFile } from "./model/files/SDKFileUpload";
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DTOCodeComponentProperty } from "@supernova-studio/client";
|
|
2
1
|
export declare enum CodeComponentPropertyControlType {
|
|
3
2
|
Boolean = "Boolean",
|
|
4
3
|
Function = "Function",
|
|
@@ -8,10 +7,8 @@ export declare enum CodeComponentPropertyControlType {
|
|
|
8
7
|
String = "String",
|
|
9
8
|
Unknown = "Unknown"
|
|
10
9
|
}
|
|
11
|
-
type CodeComponentPropertyControlDefinitionRemoteType =
|
|
10
|
+
type CodeComponentPropertyControlDefinitionRemoteType = string;
|
|
12
11
|
export declare class CodeComponentPropertyControlDefinition {
|
|
13
|
-
isArray: boolean;
|
|
14
|
-
type: CodeComponentPropertyControlType;
|
|
15
12
|
constructor(model: CodeComponentPropertyControlDefinitionRemoteType);
|
|
16
13
|
}
|
|
17
14
|
export {};
|
package/build/sdk-typescript/src/model/code-components/SDKCodeComponentPropertyDefinition.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { DTOCodeComponentProperty } from "@supernova-studio/client";
|
|
2
|
-
import { CodeComponentPropertyControlDefinition } from "./SDKCodeComponentPropertyControlDefinition";
|
|
3
2
|
type CodeComponentPropertyDefinitionRemoteType = DTOCodeComponentProperty;
|
|
4
3
|
export declare class CodeComponentPropertyDefinition {
|
|
5
|
-
control: CodeComponentPropertyControlDefinition;
|
|
6
4
|
defaultValue: string | null;
|
|
7
5
|
name: string;
|
|
8
6
|
required: boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DocsBlockPropertyData, DocsBlockPropertyDefinition, DocsBlockPropertyDefinitionModel } from "./SDKDocsBlockProperty";
|
|
2
|
+
/** File property - Additional non-value options */
|
|
3
|
+
export type DocsBlockFilePropertyOptions = {
|
|
4
|
+
renderLayoutAs: "iconOnTop" | "iconOnLeft";
|
|
5
|
+
};
|
|
6
|
+
/** File property - Data */
|
|
7
|
+
export type DocsBlockFilePropertyValue = Array<{
|
|
8
|
+
entityId: string;
|
|
9
|
+
entityMeta?: {
|
|
10
|
+
title?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
};
|
|
13
|
+
}>;
|
|
14
|
+
export type DocsBlockFilePropertyData = DocsBlockPropertyData<DocsBlockFilePropertyValue>;
|
|
15
|
+
/** File property - Definition model */
|
|
16
|
+
export type DocsBlockFilePropertyDefinitionModel = DocsBlockPropertyDefinitionModel & DocsBlockFilePropertyOptions;
|
|
17
|
+
/** File property - Definition */
|
|
18
|
+
export declare class DocsBlockFilePropertyDefinition extends DocsBlockPropertyDefinition<DocsBlockFilePropertyOptions, DocsBlockFilePropertyData> {
|
|
19
|
+
}
|
package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockStorybookProperty.d.ts
CHANGED
|
@@ -12,12 +12,26 @@ export type DocsBlockStorybookPropertyOptions = {
|
|
|
12
12
|
/** Defines how the storybook should be rendered in the editor */
|
|
13
13
|
renderLayoutAs?: "Playground" | "Iframe";
|
|
14
14
|
};
|
|
15
|
+
export type DocsBlockStorybookValue = Array<{
|
|
16
|
+
entityId?: string;
|
|
17
|
+
embed?: {
|
|
18
|
+
inputUrl: string;
|
|
19
|
+
embedUrl: string;
|
|
20
|
+
};
|
|
21
|
+
entityMeta?: {
|
|
22
|
+
caption?: string;
|
|
23
|
+
height?: number;
|
|
24
|
+
hiddenProps?: Array<string>;
|
|
25
|
+
propValues?: Record<string, unknown>;
|
|
26
|
+
};
|
|
27
|
+
}> | undefined;
|
|
15
28
|
/** Storybook property - Data */
|
|
16
|
-
export type DocsBlockStorybookPropertyData = DocsBlockPropertyData<
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
29
|
+
export type DocsBlockStorybookPropertyData = DocsBlockPropertyData<DocsBlockStorybookValue> & {
|
|
30
|
+
showCode?: boolean;
|
|
31
|
+
showFooter?: boolean;
|
|
32
|
+
showProperties?: boolean;
|
|
33
|
+
showDescription?: boolean;
|
|
34
|
+
showDefaults?: boolean;
|
|
21
35
|
};
|
|
22
36
|
/** Storybook property - Definition model */
|
|
23
37
|
export type DocsBlockStorybookPropertyDefinitionModel = DocsBlockPropertyDefinitionModel & DocsBlockStorybookPropertyOptions;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DTOPublishedDocAnalyticsComparisonData } from "@supernova-studio/client";
|
|
2
|
+
import { DocsAnalyticsTimeFrame } from "./SDKDocsAnalyticsTimeFrame";
|
|
3
|
+
export declare class DocsAnalyticsComparisonData {
|
|
4
|
+
timeFrame: DocsAnalyticsTimeFrame;
|
|
5
|
+
currentVisitCount: number;
|
|
6
|
+
priorVisitCount: number;
|
|
7
|
+
currentSessionCount: number;
|
|
8
|
+
priorSessionCount: number;
|
|
9
|
+
constructor(model: DTOPublishedDocAnalyticsComparisonData);
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DTODocumentationPageAnalyticsResponse } from "@supernova-studio/client";
|
|
2
|
+
import { DocsAnalyticsComparisonData } from "./SDKDocsAnalyticsComparisonData";
|
|
3
|
+
import { DocsAnalyticsPageComparisonData } from "./SDKDocsAnalyticsPageComparisonData";
|
|
4
|
+
import { DocsAnalyticsPageVisitData } from "./SDKDocsAnalyticsPageVisitData";
|
|
5
|
+
import { DocsAnalyticsVisitData } from "./SDKDocsAnalyticsVisitData";
|
|
6
|
+
import { DocsAnalyticsVisitHeatMapWeek } from "./SDKDocsAnalyticsVisitHeatMapWeek";
|
|
7
|
+
export declare class DocsAnalyticsData {
|
|
8
|
+
globalAnalytics: DocsAnalyticsVisitData[];
|
|
9
|
+
pageAnalytics: DocsAnalyticsPageVisitData[];
|
|
10
|
+
heatMapData: DocsAnalyticsVisitHeatMapWeek[];
|
|
11
|
+
comparisonData: DocsAnalyticsComparisonData[];
|
|
12
|
+
pageComparisonData: DocsAnalyticsPageComparisonData[];
|
|
13
|
+
constructor(model: DTODocumentationPageAnalyticsResponse);
|
|
14
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DTOPublishedDocPageAnalyticsComparisonData } from "@supernova-studio/client";
|
|
2
|
+
import { DocsAnalyticsComparisonData } from "./SDKDocsAnalyticsComparisonData";
|
|
3
|
+
export declare class DocsAnalyticsPageComparisonData extends DocsAnalyticsComparisonData {
|
|
4
|
+
pagePersistentId: string;
|
|
5
|
+
constructor(model: DTOPublishedDocPageAnalyticsComparisonData);
|
|
6
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { DTOPublishedDocPageVisitData } from "@supernova-studio/client";
|
|
2
|
+
import { DocsAnalyticsVisitData } from "./SDKDocsAnalyticsVisitData";
|
|
3
|
+
export declare class DocsAnalyticsPageVisitData extends DocsAnalyticsVisitData {
|
|
4
|
+
pagePersistentId: string;
|
|
5
|
+
constructor(model: DTOPublishedDocPageVisitData);
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DTOPublishedDocVisitData } from "@supernova-studio/client";
|
|
2
|
+
export declare class DocsAnalyticsVisitData {
|
|
3
|
+
versionId: string;
|
|
4
|
+
locale: string | null;
|
|
5
|
+
timestamp: Date;
|
|
6
|
+
visits: number;
|
|
7
|
+
sessions: number;
|
|
8
|
+
constructor(model: DTOPublishedDocVisitData);
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DTOPublishedDocVisitHeatMapWeek } from "@supernova-studio/client";
|
|
2
|
+
import { DocsAnalyticsTimeFrame } from "./SDKDocsAnalyticsTimeFrame";
|
|
3
|
+
export declare class DocsAnalyticsVisitHeatMapWeek {
|
|
4
|
+
timeFrame: DocsAnalyticsTimeFrame;
|
|
5
|
+
/** Visits per 2 hour intervals, starting at 0 (eg. 0, 2, 4, ...) */
|
|
6
|
+
mon: number[];
|
|
7
|
+
tue: number[];
|
|
8
|
+
wed: number[];
|
|
9
|
+
thu: number[];
|
|
10
|
+
fri: number[];
|
|
11
|
+
sat: number[];
|
|
12
|
+
sun: number[];
|
|
13
|
+
constructor(model: DTOPublishedDocVisitHeatMapWeek);
|
|
14
|
+
}
|
|
@@ -10,5 +10,7 @@ export declare enum DocsBlockBehaviorDataType {
|
|
|
10
10
|
/** Figma frame type allows selection of any frame coming from Figma * */
|
|
11
11
|
figmaNode = "FigmaNode",
|
|
12
12
|
/** Figma Component type allows selection of any component coming from Figma * */
|
|
13
|
-
figmaComponent = "FigmaComponent"
|
|
13
|
+
figmaComponent = "FigmaComponent",
|
|
14
|
+
/** File type allows selection of files * */
|
|
15
|
+
file = "File"
|
|
14
16
|
}
|
|
@@ -55,5 +55,7 @@ export declare enum DocsBlockItemPropertyType {
|
|
|
55
55
|
/** Figma node property (frames, sections, etc.) */
|
|
56
56
|
figmaNode = "FigmaNode",
|
|
57
57
|
/** Figma component property (Figma components, variants, properties, etc.) */
|
|
58
|
-
figmaComponent = "FigmaComponent"
|
|
58
|
+
figmaComponent = "FigmaComponent",
|
|
59
|
+
/** File property allows user to add file to download */
|
|
60
|
+
file = "File"
|
|
59
61
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { DTOWorkspaceRole } from "@supernova-studio/client";
|
|
2
1
|
/**
|
|
3
2
|
* Workspace role
|
|
4
3
|
* */
|
|
@@ -10,4 +9,3 @@ export declare enum UserRole {
|
|
|
10
9
|
billing = "Billing",
|
|
11
10
|
viewer = "Viewer"
|
|
12
11
|
}
|
|
13
|
-
export declare const convertRemoteToUserRole: (remoteRole: DTOWorkspaceRole) => UserRole;
|
|
@@ -9,7 +9,7 @@ export declare class Pipeline {
|
|
|
9
9
|
name: string;
|
|
10
10
|
isEnabled: boolean;
|
|
11
11
|
exporterConfigurationProperties?: ExporterConfigurationProperties;
|
|
12
|
-
eventType: "OnVersionReleased" | "OnHeadChanged" | "OnSourceUpdated" | "None";
|
|
12
|
+
eventType: "OnVersionReleased" | "OnHeadChanged" | "OnSourceUpdated" | "OnDocumentationPublished" | "None";
|
|
13
13
|
exporterId: string;
|
|
14
14
|
destinations: {
|
|
15
15
|
webhookUrl?: string;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type FileUploadItem = {
|
|
2
|
+
size: number;
|
|
3
|
+
name: string;
|
|
4
|
+
checksum: string;
|
|
5
|
+
};
|
|
6
|
+
export type FileUploadResult = {
|
|
7
|
+
files: Array<{
|
|
8
|
+
fileId: string;
|
|
9
|
+
name: string;
|
|
10
|
+
checksum: string;
|
|
11
|
+
referencePersistentId: string;
|
|
12
|
+
size: number;
|
|
13
|
+
pendingUpload: boolean;
|
|
14
|
+
url: string;
|
|
15
|
+
}>;
|
|
16
|
+
uploadUrls: Array<{
|
|
17
|
+
fileId: string;
|
|
18
|
+
uploadUrl: string;
|
|
19
|
+
}>;
|
|
20
|
+
};
|
|
21
|
+
export type RemoteFile = {
|
|
22
|
+
fileId: string;
|
|
23
|
+
referencePersistentId: string;
|
|
24
|
+
name: string;
|
|
25
|
+
checksum: string;
|
|
26
|
+
url: string;
|
|
27
|
+
size: number;
|
|
28
|
+
};
|
|
@@ -40,4 +40,5 @@ export declare class TokenGroup {
|
|
|
40
40
|
setSortOrder(order: number): void;
|
|
41
41
|
toWriteObject(): TokenGroupRemoteModel;
|
|
42
42
|
toMutatedObject(childrenIds: Array<string>): TokenGroup;
|
|
43
|
+
copyWith<K extends "parentGroupId" | "childrenIds" | "subgroupIds">(key: K, value: this[K]): this;
|
|
43
44
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type SDKProjectRemoteModel = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
createdAt: string;
|
|
5
|
+
contextId: string;
|
|
6
|
+
};
|
|
7
|
+
export type SDKProjectTransportModel = {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
contextId: string;
|
|
12
|
+
};
|
|
13
|
+
export declare class SDKProject {
|
|
14
|
+
/** Unique identifier of the project */
|
|
15
|
+
id: string;
|
|
16
|
+
/** Name of the project */
|
|
17
|
+
name: string;
|
|
18
|
+
/** Date and time when the project was created */
|
|
19
|
+
createdAt: Date;
|
|
20
|
+
/** Unique identifier of the project context */
|
|
21
|
+
contextId: string;
|
|
22
|
+
constructor(model: SDKProjectRemoteModel);
|
|
23
|
+
/**
|
|
24
|
+
* Constructs a representation suitable for remote storage.
|
|
25
|
+
* @returns The remote model of the project.
|
|
26
|
+
*/
|
|
27
|
+
toRemote(): SDKProjectRemoteModel;
|
|
28
|
+
/**
|
|
29
|
+
* Constructs a representation that can be serialized to JSON for transport.
|
|
30
|
+
* @returns The transport model of the project.
|
|
31
|
+
*/
|
|
32
|
+
toTransport(): SDKProjectTransportModel;
|
|
33
|
+
/**
|
|
34
|
+
* Reconstructs an SDKProject instance from a transport model.
|
|
35
|
+
* @param model - The transport model to deserialize.
|
|
36
|
+
* @returns A new SDKProject instance.
|
|
37
|
+
*/
|
|
38
|
+
static fromTransport(model: SDKProjectTransportModel): SDKProject;
|
|
39
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export type SDKProjectContextRemoteModel = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
designSystemId: string;
|
|
6
|
+
dependencies: Array<string>;
|
|
7
|
+
npmProxyRegistry?: object;
|
|
8
|
+
};
|
|
9
|
+
export type SDKProjectContextTransportModel = {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
designSystemId: string;
|
|
14
|
+
dependencies: Array<string>;
|
|
15
|
+
npmProxyRegistry?: object;
|
|
16
|
+
};
|
|
17
|
+
export interface SDKProjectContextCreationModel {
|
|
18
|
+
name: string;
|
|
19
|
+
description?: string;
|
|
20
|
+
designSystemId: string;
|
|
21
|
+
dependencies: Array<string>;
|
|
22
|
+
npmProxyRegistry?: object;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Represents a project context containing repository and technology information.
|
|
26
|
+
*/
|
|
27
|
+
export declare class SDKProjectContext {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
description: string | undefined;
|
|
31
|
+
designSystemId: string;
|
|
32
|
+
dependencies: Array<string>;
|
|
33
|
+
npmProxyRegistry: object | undefined;
|
|
34
|
+
constructor(model: SDKProjectContextRemoteModel);
|
|
35
|
+
/**
|
|
36
|
+
* Converts the context to a remote model for storage.
|
|
37
|
+
*/
|
|
38
|
+
toRemote(): SDKProjectContextRemoteModel;
|
|
39
|
+
/**
|
|
40
|
+
* Converts the context to a transport model for serialization.
|
|
41
|
+
*/
|
|
42
|
+
toTransport(): SDKProjectContextTransportModel;
|
|
43
|
+
/**
|
|
44
|
+
* Creates an instance from a transport model.
|
|
45
|
+
*/
|
|
46
|
+
static fromTransport(model: SDKProjectContextTransportModel): SDKProjectContext;
|
|
47
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DTOStorybookEntry } from "@supernova-studio/client";
|
|
2
|
+
export type RemoteStorybookEntry = Omit<DTOStorybookEntry, "createdAt" | "updatedAt"> & {
|
|
3
|
+
createdAt: string;
|
|
4
|
+
updatedAt: string;
|
|
5
|
+
};
|
|
6
|
+
export declare class StorybookEntry {
|
|
7
|
+
id: string;
|
|
8
|
+
url: string;
|
|
9
|
+
createdAt: Date;
|
|
10
|
+
updatedAt: Date;
|
|
11
|
+
sourceId: string;
|
|
12
|
+
designSystemId: string;
|
|
13
|
+
storyId: string;
|
|
14
|
+
origin: {
|
|
15
|
+
type: "story" | "docs";
|
|
16
|
+
name: string;
|
|
17
|
+
id: string;
|
|
18
|
+
title: string;
|
|
19
|
+
};
|
|
20
|
+
aliases: string[] | null;
|
|
21
|
+
isDeleted: boolean | null;
|
|
22
|
+
constructor(entry: RemoteStorybookEntry);
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type RemoteStorybookUpdate = {
|
|
2
|
+
isFailed: boolean;
|
|
3
|
+
docsCount: number;
|
|
4
|
+
storiesCount: number;
|
|
5
|
+
created: string[];
|
|
6
|
+
updated: string[];
|
|
7
|
+
deleted: string[];
|
|
8
|
+
};
|
|
9
|
+
export declare class StorybookUpdate {
|
|
10
|
+
isFailed: boolean;
|
|
11
|
+
docsCount: number;
|
|
12
|
+
storiesCount: number;
|
|
13
|
+
created: string[];
|
|
14
|
+
updated: string[];
|
|
15
|
+
deleted: string[];
|
|
16
|
+
constructor(update: RemoteStorybookUpdate);
|
|
17
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { DTPluginPreciseCopyStrategy, DTPluginThemeOverrideStrategy } from "../../tools/design-tokens/utilities/SDKDTMapLoader";
|
|
2
2
|
import { ImportWarningType } from "../enums/SDKCloudWarningType";
|
|
3
3
|
import { SourceType } from "../enums/SDKSourceType";
|
|
4
|
+
import { StorybookUpdate } from "../storybook/SDKStorybookUpdate";
|
|
4
5
|
declare enum SourceRemoteType {
|
|
5
6
|
figma = "Figma",
|
|
6
7
|
tokenStudio = "TokenStudio",
|
|
7
8
|
figmaVariablesPlugin = "FigmaVariablesPlugin",
|
|
8
|
-
upload = "Upload"
|
|
9
|
+
upload = "Upload",
|
|
10
|
+
storybook = "Storybook"
|
|
9
11
|
}
|
|
10
12
|
export type SourceRemoteModel = {
|
|
11
13
|
type: SourceRemoteType;
|
|
@@ -20,6 +22,7 @@ export type SourceRemoteModel = {
|
|
|
20
22
|
cloud?: SourceRemoteModelCloud;
|
|
21
23
|
tokenStudio?: SourceRemoteModelTokensStudio;
|
|
22
24
|
figmaVariablesPlugin?: SourceRemoteModelFigmaVariablesPlugin;
|
|
25
|
+
storybook?: SourceRemoteModelStorybook;
|
|
23
26
|
scope: SourceScope;
|
|
24
27
|
};
|
|
25
28
|
export type SourceScope = {
|
|
@@ -115,6 +118,22 @@ export type SourceRemoteModelFigmaVariablesPlugin = {
|
|
|
115
118
|
lastImportMetadata?: Record<string, any>;
|
|
116
119
|
isTokenTypeSplitEnabled: boolean;
|
|
117
120
|
};
|
|
121
|
+
export type SourceRemoteModelStorybook = {
|
|
122
|
+
userUrl: string;
|
|
123
|
+
indexUrl: string;
|
|
124
|
+
isFailed: boolean;
|
|
125
|
+
docsCount: number;
|
|
126
|
+
storiesCount: number;
|
|
127
|
+
lastImportedAt?: string;
|
|
128
|
+
lastImportedSuccessfully?: string;
|
|
129
|
+
description?: string;
|
|
130
|
+
isUsingVpn?: boolean;
|
|
131
|
+
lastImportedResult?: {
|
|
132
|
+
created: number;
|
|
133
|
+
updated: number;
|
|
134
|
+
deleted: number;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
118
137
|
export type SourceModelTokenStudio = Omit<SourceRemoteModelTokensStudio, "lastUpdatesCheckedAt" | "lastImportedAt"> & {
|
|
119
138
|
lastUpdatesCheckedAt?: Date;
|
|
120
139
|
lastImportedAt?: Date;
|
|
@@ -126,6 +145,11 @@ export type SourceModelCloud = Omit<SourceRemoteModelCloud, "lastUpdatesCheckedA
|
|
|
126
145
|
export type SourceModelFigmaVariablesPlugin = Omit<SourceRemoteModelFigmaVariablesPlugin, "lastImportedAt"> & {
|
|
127
146
|
lastImportedAt?: Date;
|
|
128
147
|
};
|
|
148
|
+
export type SourceModelStorybook = Omit<SourceRemoteModelStorybook, "lastImportedAt" | "lastImportedSuccessfully"> & {
|
|
149
|
+
lastImportedAt?: Date;
|
|
150
|
+
lastImportedSuccessfully?: Date;
|
|
151
|
+
isCLI: boolean;
|
|
152
|
+
};
|
|
129
153
|
export type SourceTransportModel = Pick<Source, "type" | "id" | "fileName" | "brandId" | "themeId" | "scope"> & {
|
|
130
154
|
cloud?: SourceRemoteModelCloud | null;
|
|
131
155
|
};
|
|
@@ -138,6 +162,7 @@ export declare class Source {
|
|
|
138
162
|
cloud: SourceModelCloud | null;
|
|
139
163
|
tokenStudio?: SourceModelTokenStudio | null;
|
|
140
164
|
figmaVariablesPlugin?: SourceModelFigmaVariablesPlugin | null;
|
|
165
|
+
storybook?: SourceModelStorybook | null;
|
|
141
166
|
scope: SourceScope;
|
|
142
167
|
get lastImportedAt(): Date | null;
|
|
143
168
|
get hasError(): boolean;
|
|
@@ -145,6 +170,7 @@ export declare class Source {
|
|
|
145
170
|
get isCloudAvailable(): boolean;
|
|
146
171
|
get isTokensStudioAvailable(): boolean;
|
|
147
172
|
get tokensStudioHasError(): boolean;
|
|
173
|
+
updateStorybookImportResult(update: StorybookUpdate): void;
|
|
148
174
|
constructor(model: SourceRemoteModel);
|
|
149
175
|
/** Constructs representation that can be used to write full object to remote */
|
|
150
176
|
toRemote(): SourceRemoteModel;
|
|
@@ -3,7 +3,7 @@ export type TokenOriginModel = {
|
|
|
3
3
|
id?: string;
|
|
4
4
|
name?: string;
|
|
5
5
|
sourceId?: string;
|
|
6
|
-
sourceType?: SourceType
|
|
6
|
+
sourceType?: Exclude<SourceType, "Storybook">;
|
|
7
7
|
referenceOriginId?: string;
|
|
8
8
|
referencePersistentId?: string;
|
|
9
9
|
referenceResolutionFailed?: boolean;
|
|
@@ -15,7 +15,7 @@ export declare class TokenOrigin {
|
|
|
15
15
|
id: string | null;
|
|
16
16
|
name: string | null;
|
|
17
17
|
sourceId: string | null;
|
|
18
|
-
sourceType?: SourceType | null;
|
|
18
|
+
sourceType?: Exclude<SourceType, "Storybook"> | null;
|
|
19
19
|
referenceOriginId?: string | null;
|
|
20
20
|
referencePersistentId?: string | null;
|
|
21
21
|
/**
|
|
@@ -14,6 +14,7 @@ import { DocsBlockDividerPropertyDefinition, DocsBlockDividerPropertyOptions } f
|
|
|
14
14
|
import { DocsBlockEmbedUrlPropertyDefinition, DocsBlockEmbedUrlPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockEmbedUrlProperty";
|
|
15
15
|
import { DocsBlockFigmaComponentPropertyDefinition, DocsBlockFigmaComponentPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockFigmaComponentProperty";
|
|
16
16
|
import { DocsBlockFigmaNodePropertyDefinition, DocsBlockFigmaNodePropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockFigmaNodeProperty";
|
|
17
|
+
import { DocsBlockFilePropertyDefinition, DocsBlockFilePropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockFileProperty";
|
|
17
18
|
import { DocsBlockImagePropertyDefinition, DocsBlockImagePropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockImageProperty";
|
|
18
19
|
import { DocsBlockMarkdownPropertyDefinition, DocsBlockMarkdownPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockMarkdownProperty";
|
|
19
20
|
import { DocsBlockMultiRichTextPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockMultiRichTextProperty";
|
|
@@ -76,6 +77,7 @@ export declare class DocsBlockBuilder {
|
|
|
76
77
|
/** Create and item variant to render the item with default layout (all properties will be stacked into a single column) */
|
|
77
78
|
defaultVariantUsingDefaultLayout(options: {
|
|
78
79
|
properties: Array<DocsBlockItemPropertyAnyDefinition>;
|
|
80
|
+
name?: string;
|
|
79
81
|
image?: string;
|
|
80
82
|
description?: string;
|
|
81
83
|
maxColumns?: number;
|
|
@@ -434,4 +436,14 @@ export declare class DocsBlockBuilder {
|
|
|
434
436
|
[key: string]: DocsBlockDividerPropertyOptions;
|
|
435
437
|
};
|
|
436
438
|
}): DocsBlockDividerPropertyDefinition;
|
|
439
|
+
/** Create a block property with type .file and its specific options */
|
|
440
|
+
fileProperty(configuration: {
|
|
441
|
+
id: string;
|
|
442
|
+
name: string;
|
|
443
|
+
description?: string;
|
|
444
|
+
options: DocsBlockFilePropertyOptions;
|
|
445
|
+
variants?: {
|
|
446
|
+
[key: string]: DocsBlockFilePropertyOptions;
|
|
447
|
+
};
|
|
448
|
+
}): DocsBlockFilePropertyDefinition;
|
|
437
449
|
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { DTODesignSystem } from "@supernova-studio/client";
|
|
2
|
+
import { Asset } from "../model/assets/SDKAsset";
|
|
3
|
+
import { Brand, BrandRemoteModel } from "../model/base/SDKBrand";
|
|
4
|
+
import { DesignSystem } from "../model/base/SDKDesignSystem";
|
|
5
|
+
import { DesignSystemVersion, DesignSystemVersionRemoteModel } from "../model/base/SDKDesignSystemVersion";
|
|
6
|
+
import { Component, ComponentRemoteModel } from "../model/components/SDKComponent";
|
|
7
|
+
import { DesignComponent, DesignComponentRemoteModel } from "../model/components/SDKDesignComponent";
|
|
8
|
+
import { ElementDataView, ElementDataViewRemoteModel } from "../model/elements/SDKElementDataView";
|
|
9
|
+
import { ElementProperty, ElementPropertyRemoteModel } from "../model/elements/SDKElementProperty";
|
|
10
|
+
import { ElementPropertyValue, ElementPropertyValueRemoteModel } from "../model/elements/values/SDKElementPropertyValue";
|
|
11
|
+
import { ExportBuildModel, ExportBuild } from "../model/exporters/exporter_builds/SDKExportBuild";
|
|
12
|
+
import { AssetGroup } from "../model/groups/SDKAssetGroup";
|
|
13
|
+
import { ComponentGroup, ComponentGroupRemoteModel } from "../model/groups/SDKComponentGroup";
|
|
14
|
+
import { DesignComponentGroup, DesignComponentGroupRemoteModel } from "../model/groups/SDKDesignComponentGroup";
|
|
15
|
+
import { TokenGroup, TokenGroupRemoteModel } from "../model/groups/SDKTokenGroup";
|
|
16
|
+
import { Membership, MembershipRemoteModel } from "../model/membership/SDKMembership";
|
|
17
|
+
import { ResourceFont, ResourceFontModel } from "../model/resources/SDKResourceFont";
|
|
18
|
+
import { RemoteStorybookEntry, StorybookEntry } from "../model/storybook/SDKStorybookEntry";
|
|
19
|
+
import { Source, SourceRemoteModel } from "../model/support/SDKSource";
|
|
20
|
+
import { Token } from "../model/tokens/SDKToken";
|
|
21
|
+
import { TokenRemoteModel } from "../model/tokens/remote/SDKRemoteTokenModel";
|
|
22
|
+
import { User, UserRemoteModel } from "../model/users/SDKUser";
|
|
23
|
+
import { UserMembershipRemoteModel, UserMembership } from "../model/users/SDKUserMembership";
|
|
24
|
+
export declare class RawUtils {
|
|
25
|
+
/** Builds components from raw data */
|
|
26
|
+
static buildComponentsFromRaw(rawData: Array<ComponentRemoteModel>, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): Array<Component>;
|
|
27
|
+
/** Build component groups */
|
|
28
|
+
static buildComponentGroupsFromRaw(rawData: Array<ComponentGroupRemoteModel>, components: Array<Component>): Array<ComponentGroup>;
|
|
29
|
+
/** Builds assets from raw data */
|
|
30
|
+
static buildAssetsFromRaw(rawData: Array<DesignComponentRemoteModel>, sources: Array<Source>): Array<Asset>;
|
|
31
|
+
/** Build asset groups */
|
|
32
|
+
static buildAssetGroupsFromRaw(rawData: Array<DesignComponentGroupRemoteModel>, assets: Array<Asset>): Array<AssetGroup>;
|
|
33
|
+
/** Builds tokens from raw data */
|
|
34
|
+
static buildTokensFromRaw(rawData: Array<TokenRemoteModel>, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>, propertyViews: Array<ElementDataView>, tokenGroups: Array<TokenGroup>, sources: Array<Source>, designSystemId: string, versionId: string): Array<Token>;
|
|
35
|
+
/** Build token groups */
|
|
36
|
+
static buildTokenGroupsFromRaw(rawData: Array<TokenGroupRemoteModel>): Array<TokenGroup>;
|
|
37
|
+
/** Builds elements from raw data */
|
|
38
|
+
static buildElementsFromRaw(rawData: {
|
|
39
|
+
propertyValues: Array<ElementPropertyValueRemoteModel>;
|
|
40
|
+
propertyViews: Array<ElementDataViewRemoteModel>;
|
|
41
|
+
propertyDefinitions: Array<ElementPropertyRemoteModel>;
|
|
42
|
+
}): {
|
|
43
|
+
propertyValues: Array<ElementPropertyValue>;
|
|
44
|
+
propertyViews: Array<ElementDataView>;
|
|
45
|
+
propertyDefinitions: Array<ElementProperty>;
|
|
46
|
+
};
|
|
47
|
+
/** Build sources */
|
|
48
|
+
static buildSourcesFromRaw(rawData: Array<SourceRemoteModel>): Array<Source>;
|
|
49
|
+
/** Build font resources */
|
|
50
|
+
static buildFontResourcesFromRaw(rawData: Array<ResourceFontModel>): Array<ResourceFont>;
|
|
51
|
+
/** Builds memberships */
|
|
52
|
+
static buildMembershipsFromRaw(rawData: Array<MembershipRemoteModel>): Array<Membership>;
|
|
53
|
+
/** Builds workspace memebers */
|
|
54
|
+
static buildWorkspaceMembersFromRaw(rawData: Array<UserMembershipRemoteModel>): Array<UserMembership>;
|
|
55
|
+
/** Builds design systems */
|
|
56
|
+
static buildDesignSystemsFromRaw(rawData: Array<DTODesignSystem>): Array<DesignSystem>;
|
|
57
|
+
/** Builds versions */
|
|
58
|
+
static buildVersionsFromRaw(rawData: Array<DesignSystemVersionRemoteModel>): Array<DesignSystemVersion>;
|
|
59
|
+
/** Builds brands */
|
|
60
|
+
static buildBrandsFromRaw(rawData: Array<BrandRemoteModel>): Array<Brand>;
|
|
61
|
+
/** Builds user */
|
|
62
|
+
static buildUserFromRaw(rawData: UserRemoteModel): User;
|
|
63
|
+
/** Builds design components */
|
|
64
|
+
static buildDesignComponentsFromRaw(rawData: Array<DesignComponentRemoteModel>, sources: Array<Source>): Array<DesignComponent>;
|
|
65
|
+
/** Builds design component groups */
|
|
66
|
+
static buildDesignComponentGroupsFromRaw(rawData: Array<DesignComponentGroupRemoteModel>, designComponents: Array<DesignComponent>): Array<DesignComponentGroup>;
|
|
67
|
+
static buildStorybookEntriesFromRaw(rawData: Array<RemoteStorybookEntry>): Array<StorybookEntry>;
|
|
68
|
+
static buildDocumentationBuildsFromRaw(rawData: Array<ExportBuildModel>): Array<ExportBuild>;
|
|
69
|
+
}
|