@supernova-studio/supernova-sdk-beta 2.2.2 → 2.2.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/build/sdk-typescript/src/core/SDKSupernova.d.ts +2 -5
- package/build/sdk-typescript/src/core/areas/SDKAreaAutomation.d.ts +2 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaDataSources.d.ts +13 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaDocsAnalytics.d.ts +8 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaRawData.d.ts +14 -49
- package/build/sdk-typescript/src/core/areas/SDKAreaWorkspaces.d.ts +0 -35
- package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +17 -40
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +85 -16
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +16 -12
- package/build/sdk-typescript/src/core/resolvers/SDKDesignComponentGroupResolver.d.ts +0 -1
- package/build/sdk-typescript/src/exports.d.ts +6 -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/properties/SDKDocsBlockStorybookProperty.d.ts +14 -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 +1 -1
- 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/SDKSourceType.d.ts +2 -1
- package/build/sdk-typescript/src/model/support/SDKSource.d.ts +20 -1
- package/build/sdk-typescript/src/model/support/SDKTokenOrigin.d.ts +2 -2
- package/build/sdk-typescript/src/tools/docs-block-builder/SDKDocsBlockBuilder.d.ts +1 -0
- package/build/sdk-typescript/src/utils/RawUtils.d.ts +58 -0
- package/build/supernova-sdk-typescript.js +1 -1
- package/build/supernova-sdk-typescript.js.map +1 -1
- package/package.json +3 -3
- package/build/sdk-typescript/src/core/areas/SDKAreaProjects.d.ts +0 -69
- package/build/sdk-typescript/src/core/areas/SDKAreaPublishedDocumentation.d.ts +0 -9
- package/build/sdk-typescript/src/model/docs_analytics/SDKDocsAnalyticsTimeFrameComparison.d.ts +0 -7
- package/build/sdk-typescript/src/model/docs_analytics/SDKDocsAnalyticsVisitsDifference.d.ts +0 -10
- package/build/sdk-typescript/src/model/docs_analytics/SDKPublishedDocPageVisitData.d.ts +0 -10
- package/build/sdk-typescript/src/model/projects/SDKProject.d.ts +0 -39
- package/build/sdk-typescript/src/model/projects/SDKProjectContext.d.ts +0 -47
|
@@ -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
|
+
}
|
|
@@ -5,7 +5,8 @@ declare enum SourceRemoteType {
|
|
|
5
5
|
figma = "Figma",
|
|
6
6
|
tokenStudio = "TokenStudio",
|
|
7
7
|
figmaVariablesPlugin = "FigmaVariablesPlugin",
|
|
8
|
-
upload = "Upload"
|
|
8
|
+
upload = "Upload",
|
|
9
|
+
storybook = "Storybook"
|
|
9
10
|
}
|
|
10
11
|
export type SourceRemoteModel = {
|
|
11
12
|
type: SourceRemoteType;
|
|
@@ -20,6 +21,7 @@ export type SourceRemoteModel = {
|
|
|
20
21
|
cloud?: SourceRemoteModelCloud;
|
|
21
22
|
tokenStudio?: SourceRemoteModelTokensStudio;
|
|
22
23
|
figmaVariablesPlugin?: SourceRemoteModelFigmaVariablesPlugin;
|
|
24
|
+
storybook?: SourceRemoteModelStorybook;
|
|
23
25
|
scope: SourceScope;
|
|
24
26
|
};
|
|
25
27
|
export type SourceScope = {
|
|
@@ -115,6 +117,17 @@ export type SourceRemoteModelFigmaVariablesPlugin = {
|
|
|
115
117
|
lastImportMetadata?: Record<string, any>;
|
|
116
118
|
isTokenTypeSplitEnabled: boolean;
|
|
117
119
|
};
|
|
120
|
+
export type SourceRemoteModelStorybook = {
|
|
121
|
+
userUrl: string;
|
|
122
|
+
indexUrl: string;
|
|
123
|
+
isFailed: boolean;
|
|
124
|
+
docsCount: number;
|
|
125
|
+
storiesCount: number;
|
|
126
|
+
lastImportedAt?: string;
|
|
127
|
+
lastImportedSuccessfully?: string;
|
|
128
|
+
description?: string;
|
|
129
|
+
isUsingVpn?: boolean;
|
|
130
|
+
};
|
|
118
131
|
export type SourceModelTokenStudio = Omit<SourceRemoteModelTokensStudio, "lastUpdatesCheckedAt" | "lastImportedAt"> & {
|
|
119
132
|
lastUpdatesCheckedAt?: Date;
|
|
120
133
|
lastImportedAt?: Date;
|
|
@@ -126,6 +139,11 @@ export type SourceModelCloud = Omit<SourceRemoteModelCloud, "lastUpdatesCheckedA
|
|
|
126
139
|
export type SourceModelFigmaVariablesPlugin = Omit<SourceRemoteModelFigmaVariablesPlugin, "lastImportedAt"> & {
|
|
127
140
|
lastImportedAt?: Date;
|
|
128
141
|
};
|
|
142
|
+
export type SourceModelStorybook = Omit<SourceRemoteModelStorybook, "lastImportedAt" | "lastImportedSuccessfully"> & {
|
|
143
|
+
lastImportedAt?: Date;
|
|
144
|
+
lastImportedSuccessfully?: Date;
|
|
145
|
+
displayName?: string;
|
|
146
|
+
};
|
|
129
147
|
export type SourceTransportModel = Pick<Source, "type" | "id" | "fileName" | "brandId" | "themeId" | "scope"> & {
|
|
130
148
|
cloud?: SourceRemoteModelCloud | null;
|
|
131
149
|
};
|
|
@@ -138,6 +156,7 @@ export declare class Source {
|
|
|
138
156
|
cloud: SourceModelCloud | null;
|
|
139
157
|
tokenStudio?: SourceModelTokenStudio | null;
|
|
140
158
|
figmaVariablesPlugin?: SourceModelFigmaVariablesPlugin | null;
|
|
159
|
+
storybook?: SourceModelStorybook | null;
|
|
141
160
|
scope: SourceScope;
|
|
142
161
|
get lastImportedAt(): Date | null;
|
|
143
162
|
get hasError(): boolean;
|
|
@@ -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
|
/**
|
|
@@ -76,6 +76,7 @@ export declare class DocsBlockBuilder {
|
|
|
76
76
|
/** Create and item variant to render the item with default layout (all properties will be stacked into a single column) */
|
|
77
77
|
defaultVariantUsingDefaultLayout(options: {
|
|
78
78
|
properties: Array<DocsBlockItemPropertyAnyDefinition>;
|
|
79
|
+
name?: string;
|
|
79
80
|
image?: string;
|
|
80
81
|
description?: string;
|
|
81
82
|
maxColumns?: number;
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { 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 { AssetGroup } from "../model/groups/SDKAssetGroup";
|
|
12
|
+
import { ComponentGroup, ComponentGroupRemoteModel } from "../model/groups/SDKComponentGroup";
|
|
13
|
+
import { DesignComponentGroupRemoteModel } from "../model/groups/SDKDesignComponentGroup";
|
|
14
|
+
import { TokenGroup, TokenGroupRemoteModel } from "../model/groups/SDKTokenGroup";
|
|
15
|
+
import { Membership, MembershipRemoteModel } from "../model/membership/SDKMembership";
|
|
16
|
+
import { ResourceFont, ResourceFontModel } from "../model/resources/SDKResourceFont";
|
|
17
|
+
import { Source, SourceRemoteModel } from "../model/support/SDKSource";
|
|
18
|
+
import { Token } from "../model/tokens/SDKToken";
|
|
19
|
+
import { TokenRemoteModel } from "../model/tokens/remote/SDKRemoteTokenModel";
|
|
20
|
+
import { User, UserRemoteModel } from "../model/users/SDKUser";
|
|
21
|
+
export declare class RawUtils {
|
|
22
|
+
/** Builds components from raw data */
|
|
23
|
+
static buildComponentsFromRaw(rawData: Array<ComponentRemoteModel>, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): Array<Component>;
|
|
24
|
+
/** Build component groups */
|
|
25
|
+
static buildComponentGroupsFromRaw(rawData: Array<ComponentGroupRemoteModel>, components: Array<Component>): Array<ComponentGroup>;
|
|
26
|
+
/** Builds assets from raw data */
|
|
27
|
+
static buildAssetsFromRaw(rawData: Array<DesignComponentRemoteModel>, sources: Array<Source>): Array<Asset>;
|
|
28
|
+
/** Build asset groups */
|
|
29
|
+
static buildAssetGroupsFromRaw(rawData: Array<DesignComponentGroupRemoteModel>, assets: Array<Asset>): Array<AssetGroup>;
|
|
30
|
+
/** Builds tokens from raw data */
|
|
31
|
+
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>;
|
|
32
|
+
/** Build token groups */
|
|
33
|
+
static buildTokenGroupsFromRaw(rawData: Array<TokenGroupRemoteModel>): Array<TokenGroup>;
|
|
34
|
+
/** Builds elements from raw data */
|
|
35
|
+
static buildElementsFromRaw(rawData: {
|
|
36
|
+
propertyValues: Array<ElementPropertyValueRemoteModel>;
|
|
37
|
+
propertyViews: Array<ElementDataViewRemoteModel>;
|
|
38
|
+
propertyDefinitions: Array<ElementPropertyRemoteModel>;
|
|
39
|
+
}): {
|
|
40
|
+
propertyValues: Array<ElementPropertyValue>;
|
|
41
|
+
propertyViews: Array<ElementDataView>;
|
|
42
|
+
propertyDefinitions: Array<ElementProperty>;
|
|
43
|
+
};
|
|
44
|
+
/** Build sources */
|
|
45
|
+
static buildSourcesFromRaw(rawData: Array<SourceRemoteModel>): Array<Source>;
|
|
46
|
+
/** Build font resources */
|
|
47
|
+
static buildFontResourcesFromRaw(rawData: Array<ResourceFontModel>): Array<ResourceFont>;
|
|
48
|
+
/** Builds memberships */
|
|
49
|
+
static buildMembershipsFromRaw(rawData: Array<MembershipRemoteModel>): Array<Membership>;
|
|
50
|
+
/** Builds design systems */
|
|
51
|
+
static buildDesignSystemsFromRaw(rawData: Array<DTODesignSystem>): Array<DesignSystem>;
|
|
52
|
+
/** Builds versions */
|
|
53
|
+
static buildVersionsFromRaw(rawData: Array<DesignSystemVersionRemoteModel>): Array<DesignSystemVersion>;
|
|
54
|
+
/** Builds brands */
|
|
55
|
+
static buildBrandsFromRaw(rawData: Array<BrandRemoteModel>): Array<Brand>;
|
|
56
|
+
/** Builds user */
|
|
57
|
+
static buildUserFromRaw(rawData: UserRemoteModel): User;
|
|
58
|
+
}
|