@supernova-studio/supernova-sdk-beta 2.4.6 → 2.4.9
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/supernova-sdk-typescript.js +1 -1
- package/build/supernova-sdk-typescript.js.map +1 -1
- package/build/types/core/SDKSupernova.d.ts +9 -0
- package/build/types/core/areas/SDKAreaActivityEvents.d.ts +7 -0
- package/build/types/core/areas/SDKAreaAgentChats.d.ts +12 -0
- package/build/types/core/areas/SDKAreaBulkOperations.d.ts +7 -5
- package/build/types/core/areas/SDKAreaDataSources.d.ts +1 -1
- package/build/types/core/areas/SDKAreaDocumentation.d.ts +28 -13
- package/build/types/core/areas/SDKAreaImport.d.ts +35 -0
- package/build/types/core/areas/SDKAreaMCP.d.ts +19 -1
- package/build/types/core/areas/SDKAreaProjects.d.ts +137 -153
- package/build/types/core/areas/SDKAreaRawData.d.ts +132 -131
- package/build/types/core/areas/SDKAreaTokens.d.ts +17 -12
- package/build/types/core/data/SDKDataCore.d.ts +208 -186
- package/build/types/core/data/SDKDataCoreCached.d.ts +2 -2
- package/build/types/core/data/requests/SDKDataCoreReadRequests.d.ts +94 -67
- package/build/types/core/data/requests/SDKDataCoreWriteRequests.d.ts +217 -190
- package/build/types/core/resolvers/SDKDocsEntityItemResolver.d.ts +2 -2
- package/build/types/core/resolvers/SDKSnapshotTokenBuilder.d.ts +28 -0
- package/build/types/core/resolvers/SDKTokenResolver.d.ts +11 -9
- package/build/types/exports.d.ts +18 -11
- package/build/types/model/activity-events/SDKActivityEvent.d.ts +46 -0
- package/build/types/model/agent-chats/SDKAgentChat.d.ts +28 -0
- package/build/types/model/datasets/SDKDataset.d.ts +15 -5
- package/build/types/model/docs/blocks/definition/SDKDocsBlockBehavior.d.ts +4 -1
- package/build/types/model/docs/blocks/definition/actual/context-mcp/SDKDocsBlockActualContextMcp.d.ts +2 -0
- package/build/types/model/docs/blocks/properties/SDKDocsBlockAssetProperty.d.ts +7 -24
- package/build/types/model/docs/blocks/properties/SDKDocsBlockAssetPropertyProperty.d.ts +3 -2
- package/build/types/model/docs/blocks/properties/SDKDocsBlockBooleanProperty.d.ts +3 -2
- package/build/types/model/docs/blocks/properties/SDKDocsBlockCodeProperty.d.ts +3 -6
- package/build/types/model/docs/blocks/properties/SDKDocsBlockCodeSandboxProperty.d.ts +3 -8
- package/build/types/model/docs/blocks/properties/SDKDocsBlockColorProperty.d.ts +3 -3
- package/build/types/model/docs/blocks/properties/SDKDocsBlockComponentProperty.d.ts +7 -10
- package/build/types/model/docs/blocks/properties/SDKDocsBlockComponentPropertyProperty.d.ts +3 -2
- package/build/types/model/docs/blocks/properties/SDKDocsBlockContextProperty.d.ts +16 -0
- package/build/types/model/docs/blocks/properties/SDKDocsBlockDividerProperty.d.ts +3 -2
- package/build/types/model/docs/blocks/properties/SDKDocsBlockEmbedUrlProperty.d.ts +3 -6
- package/build/types/model/docs/blocks/properties/SDKDocsBlockFigmaComponentProperty.d.ts +7 -26
- package/build/types/model/docs/blocks/properties/SDKDocsBlockFigmaNodeProperty.d.ts +7 -22
- package/build/types/model/docs/blocks/properties/SDKDocsBlockFileProperty.d.ts +4 -9
- package/build/types/model/docs/blocks/properties/SDKDocsBlockImageProperty.d.ts +3 -10
- package/build/types/model/docs/blocks/properties/SDKDocsBlockMarkdownProperty.d.ts +3 -2
- package/build/types/model/docs/blocks/properties/SDKDocsBlockMultiRichTextProperty.d.ts +3 -3
- package/build/types/model/docs/blocks/properties/SDKDocsBlockMultiSelectProperty.d.ts +3 -2
- package/build/types/model/docs/blocks/properties/SDKDocsBlockNumberProperty.d.ts +3 -2
- package/build/types/model/docs/blocks/properties/SDKDocsBlockProperty.d.ts +3 -3
- package/build/types/model/docs/blocks/properties/SDKDocsBlockRichTextEditorProperty.d.ts +3 -3
- package/build/types/model/docs/blocks/properties/SDKDocsBlockRichTextProperty.d.ts +3 -7
- package/build/types/model/docs/blocks/properties/SDKDocsBlockSingleSelectProperty.d.ts +3 -2
- package/build/types/model/docs/blocks/properties/SDKDocsBlockStorybookProperty.d.ts +4 -22
- package/build/types/model/docs/blocks/properties/SDKDocsBlockTableProperty.d.ts +12 -28
- package/build/types/model/docs/blocks/properties/SDKDocsBlockTextProperty.d.ts +3 -2
- package/build/types/model/docs/blocks/properties/SDKDocsBlockTokenProperty.d.ts +7 -31
- package/build/types/model/docs/blocks/properties/SDKDocsBlockTokenPropertyProperty.d.ts +3 -2
- package/build/types/model/docs/blocks/properties/SDKDocsBlockTokenTypeProperty.d.ts +3 -3
- package/build/types/model/docs/blocks/properties/SDKDocsBlockUrlProperty.d.ts +3 -2
- package/build/types/model/docs/sections/SDKDocsSection.d.ts +0 -31
- package/build/types/model/documentation/SDKPageHistoryVersion.d.ts +20 -0
- package/build/types/model/documentation/blocks/SDKDocumentationLegacyPageBlockContextMcp.d.ts +11 -0
- package/build/types/model/elements/SDKElementPropertyOption.d.ts +1 -2
- package/build/types/model/enums/SDKCodeLanguage.d.ts +1 -1
- package/build/types/model/enums/SDKDesignSystemRole.d.ts +1 -2
- package/build/types/model/enums/SDKDocsBlockBehaviorSelectionType.d.ts +4 -2
- package/build/types/model/enums/SDKDocsBlockContainerSize.d.ts +6 -4
- package/build/types/model/enums/SDKDocsBlockItemPropertyType.d.ts +3 -1
- package/build/types/model/enums/SDKDocumentationLegacyPageBlockType.d.ts +1 -0
- package/build/types/model/enums/SDKTokenType.d.ts +2 -0
- package/build/types/model/enums/SDKWorkspaceSeatType.d.ts +14 -3
- package/build/types/model/exporters/SDKExporter.d.ts +2 -2
- package/build/types/model/membership/SDKMembership.d.ts +1 -1
- package/build/types/model/support/SDKSource.d.ts +4 -3
- package/build/types/model/themes/SDKTokenThemeOverride.d.ts +1 -0
- package/build/types/model/tokens/remote/SDKRemoteTokenModel.d.ts +34 -1
- package/build/types/model/tokens/remote/SDKRemoteTokenValue.d.ts +1 -1
- package/build/types/model/workspaces/SDKWorkspaceProductPrice.d.ts +6 -3
- package/build/types/model/workspaces/SDKWorkspaceSubscription.d.ts +2 -6
- package/build/types/tools/design-tokens/SDKToolsDesignTokensPlugin.d.ts +6 -3
- package/build/types/tools/docs-block-builder/SDKDocsBlockBuilder.d.ts +9 -0
- package/build/types/tools/json-builder/elements-transformers/SDKToolsJSONElementTransformer.d.ts +1 -1
- package/build/types/utils/TokenUtils.d.ts +1 -1
- package/package.json +17 -21
- package/build/types/model/enums/SDKDocsBlockTokenNameFormat.d.ts +0 -10
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DTODesignSystemRole } from "@supernova-studio/client";
|
|
2
2
|
import { UserRole } from "./SDKUserRole";
|
|
3
|
-
import { WorkspaceSeatType } from "./SDKWorkspaceSeatType";
|
|
4
3
|
export type DesignSystemRole = Exclude<UserRole, UserRole.owner | UserRole.billing>;
|
|
5
4
|
export declare const convertRemoteToDesignSystemRole: (remoteRole: DTODesignSystemRole) => DesignSystemRole;
|
|
6
|
-
export declare const
|
|
5
|
+
export declare const resolveDesignSystemRoleFromWorkspaceRole: (wsRole: UserRole) => DesignSystemRole;
|
|
@@ -3,6 +3,8 @@ export declare enum DocsBlockBehaviorSelectionType {
|
|
|
3
3
|
entity = "Entity",
|
|
4
4
|
/** Allows selection of groups only */
|
|
5
5
|
group = "Group",
|
|
6
|
-
/** Allows
|
|
7
|
-
entityAndGroup = "EntityAndGroup"
|
|
6
|
+
/** Allows selection of either data entities or groups, never both at once */
|
|
7
|
+
entityAndGroup = "EntityAndGroup",
|
|
8
|
+
/** Allows no selection at all: the block derives its own content */
|
|
9
|
+
none = "None"
|
|
8
10
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import type { PageBlockPreviewContainerSize } from "@supernova-studio/model";
|
|
2
|
+
export declare const DocsBlockContainerSize: {
|
|
2
3
|
/** Default. Image is centered within a container */
|
|
3
|
-
centered
|
|
4
|
+
readonly centered: "Centered";
|
|
4
5
|
/** The container has the height of the asset within */
|
|
5
|
-
naturalHeight
|
|
6
|
-
}
|
|
6
|
+
readonly naturalHeight: "NaturalHeight";
|
|
7
|
+
};
|
|
8
|
+
export type DocsBlockContainerSize = PageBlockPreviewContainerSize;
|
|
@@ -57,5 +57,7 @@ export declare enum DocsBlockItemPropertyType {
|
|
|
57
57
|
/** Figma component property (Figma components, variants, properties, etc.) */
|
|
58
58
|
figmaComponent = "FigmaComponent",
|
|
59
59
|
/** File property allows user to add file to download */
|
|
60
|
-
file = "File"
|
|
60
|
+
file = "File",
|
|
61
|
+
/** Context property allows user to select a workspace or design-system context */
|
|
62
|
+
context = "Context"
|
|
61
63
|
}
|
|
@@ -16,6 +16,7 @@ export declare enum DocumentationLegacyPageBlockType {
|
|
|
16
16
|
figmaEmbed = "FigmaEmbed",
|
|
17
17
|
youtubeEmbed = "YoutubeEmbed",
|
|
18
18
|
storybookEmbed = "StorybookEmbed",
|
|
19
|
+
contextMcp = "ContextMcp",
|
|
19
20
|
genericEmbed = "Embed",
|
|
20
21
|
figmaFrames = "FigmaFrames",
|
|
21
22
|
custom = "Custom",
|
|
@@ -34,6 +34,8 @@ export type DimensionTokenType = (typeof DIMENSION_TOKEN_TYPES)[number];
|
|
|
34
34
|
export declare const RAW_DIMENSION_TOKEN_TYPES: readonly [TokenType.opacity, TokenType.zIndex];
|
|
35
35
|
export declare const MS_DIMENSION_TOKEN_TYPES: readonly [TokenType.duration];
|
|
36
36
|
export declare const ALL_TOKEN_TYPES: readonly [TokenType.dimension, TokenType.size, TokenType.space, TokenType.opacity, TokenType.fontSize, TokenType.lineHeight, TokenType.letterSpacing, TokenType.paragraphSpacing, TokenType.borderWidth, TokenType.radius, TokenType.duration, TokenType.zIndex, TokenType.string, TokenType.productCopy, TokenType.fontFamily, TokenType.fontWeight, TokenType.textCase, TokenType.textDecoration, TokenType.visibility, TokenType.color, TokenType.gradient, TokenType.border, TokenType.radius, TokenType.shadow, TokenType.typography, TokenType.blur];
|
|
37
|
+
/** Undefined for a token type the SDK has no case for, such as Image and Font */
|
|
38
|
+
export declare const tokenTypeFromString: (type: string | undefined) => TokenType | undefined;
|
|
37
39
|
export declare const PURE_TOKEN_TYPES: readonly [TokenType.dimension, TokenType.size, TokenType.space, TokenType.opacity, TokenType.fontSize, TokenType.lineHeight, TokenType.letterSpacing, TokenType.paragraphSpacing, TokenType.borderWidth, TokenType.radius, TokenType.duration, TokenType.zIndex, TokenType.string, TokenType.productCopy, TokenType.fontFamily, TokenType.fontWeight, TokenType.textCase, TokenType.textDecoration, TokenType.visibility];
|
|
38
40
|
export type PureTokenType = (typeof PURE_TOKEN_TYPES)[number];
|
|
39
41
|
export type NonPureTokenType = Exclude<TokenType, PureTokenType>;
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
-
import { DTOWorkspaceSeatType } from "@supernova-studio/client";
|
|
2
|
-
|
|
3
|
-
export
|
|
1
|
+
import { DTOWorkspaceBilledSeatType, DTOWorkspaceSeatType } from "@supernova-studio/client";
|
|
2
|
+
/** The seat a workspace member holds. Builder seats have been migrated away */
|
|
3
|
+
export type WorkspaceSeatType = Exclude<DTOWorkspaceSeatType, "Builder">;
|
|
4
|
+
/**
|
|
5
|
+
* The seat a product price is sold against.
|
|
6
|
+
* Still includes Builder, because legacy Builder prices remain in the catalogue.
|
|
7
|
+
*/
|
|
8
|
+
export type WorkspaceBilledSeatType = DTOWorkspaceBilledSeatType;
|
|
9
|
+
export declare const allWorkspaceSeatTypes: ["Full", "None"];
|
|
10
|
+
/**
|
|
11
|
+
* Converts a seat type coming off the wire.
|
|
12
|
+
* The API schema still permits Builder even though no member holds one any more.
|
|
13
|
+
*/
|
|
14
|
+
export declare const remoteToWorkspaceSeatType: (remoteSeatType: DTOWorkspaceSeatType) => WorkspaceSeatType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DTOExporterPropertyDefinition } from "@supernova-studio/client";
|
|
2
2
|
import { ExporterCustomBlock, ExporterCustomBlockModel } from "./custom_blocks/SDKExporterCustomBlock";
|
|
3
|
-
import { ExporterCustomBlockVariant } from "./custom_blocks/SDKExporterCustomBlockVariant";
|
|
3
|
+
import { ExporterCustomBlockVariant, ExporterCustomBlockVariantModel } from "./custom_blocks/SDKExporterCustomBlockVariant";
|
|
4
4
|
import { ExporterConfigurationProperty, ExporterConfigurationPropertyModel } from "./custom_properties/SDKExporterConfigurationProperty";
|
|
5
5
|
import { ExporterPropertyDefinition } from "./custom_properties/SDKExporterPropertyDefinition";
|
|
6
6
|
export type ExporterProvider = "github" | "gitlab" | "bitbucket" | "azure";
|
|
@@ -26,7 +26,7 @@ export type ExporterModel = {
|
|
|
26
26
|
gitUrl: string;
|
|
27
27
|
gitBranch: string;
|
|
28
28
|
gitDirectory: string;
|
|
29
|
-
blockVariants?:
|
|
29
|
+
blockVariants?: Record<string, Array<ExporterCustomBlockVariantModel>>;
|
|
30
30
|
properties?: Array<DTOExporterPropertyDefinition>;
|
|
31
31
|
configurationProperties?: Array<ExporterConfigurationPropertyModel>;
|
|
32
32
|
customBlocks?: Array<ExporterCustomBlockModel>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DTOUserWorkspaceMembership } from "@supernova-studio/client";
|
|
2
|
-
import { WorkspaceSeatType } from "@supernova-studio/model";
|
|
3
2
|
import { UserRole } from "../enums/SDKUserRole";
|
|
3
|
+
import { WorkspaceSeatType } from "../enums/SDKWorkspaceSeatType";
|
|
4
4
|
import { Workspace } from "../workspaces/SDKWorkspace";
|
|
5
5
|
export type MembershipRemoteModel = DTOUserWorkspaceMembership;
|
|
6
6
|
export declare class Membership {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DataSourceUploadImportMetadata } from "@supernova-studio/model";
|
|
1
2
|
import { DTPluginPreciseCopyStrategy, DTPluginThemeOverrideStrategy } from "../../tools/design-tokens/utilities/SDKDTMapLoader";
|
|
2
3
|
import { ImportWarningType } from "../enums/SDKCloudWarningType";
|
|
3
4
|
import { SourceType } from "../enums/SDKSourceType";
|
|
@@ -13,7 +14,7 @@ export type SourceRemoteModel = {
|
|
|
13
14
|
type: SourceRemoteType;
|
|
14
15
|
id: string;
|
|
15
16
|
fileName?: string;
|
|
16
|
-
brandId
|
|
17
|
+
brandId: string;
|
|
17
18
|
themeId?: string;
|
|
18
19
|
plugin?: {
|
|
19
20
|
fileId: string;
|
|
@@ -130,7 +131,7 @@ export type SourceRemoteModelTokensStudio = {
|
|
|
130
131
|
export type SourceRemoteModelFigmaVariablesPlugin = {
|
|
131
132
|
fileId: string;
|
|
132
133
|
lastImportedAt?: string;
|
|
133
|
-
lastImportMetadata?:
|
|
134
|
+
lastImportMetadata?: DataSourceUploadImportMetadata;
|
|
134
135
|
isTokenTypeSplitEnabled: boolean;
|
|
135
136
|
};
|
|
136
137
|
export type SourceRemoteModelUpload = {
|
|
@@ -175,7 +176,7 @@ export declare class Source {
|
|
|
175
176
|
type: SourceType;
|
|
176
177
|
id: string;
|
|
177
178
|
fileName: string | null;
|
|
178
|
-
brandId: string
|
|
179
|
+
brandId: string;
|
|
179
180
|
themeId: string | null;
|
|
180
181
|
cloud: SourceModelCloud | null;
|
|
181
182
|
tokenStudio?: SourceModelTokenStudio | null;
|
|
@@ -12,6 +12,7 @@ export type TokenThemeOverrideRemoteModel = {
|
|
|
12
12
|
};
|
|
13
13
|
export type TokenThemeOverrideTranserObject = {
|
|
14
14
|
data: ColorTokenRemoteData | AnyStringTokenRemoteData | TypographyTokenRemoteData | ShadowTokenRemoteData | AnyDimensionTokenRemoteData | BorderTokenRemoteData | GradientTokenRemoteData | BlurTokenRemoteData | AnyOptionTokenRemoteData;
|
|
15
|
+
/** @deprecated Ignored — the override targets the token passed to `updateTokenData` */
|
|
15
16
|
tokenPersistentId?: string;
|
|
16
17
|
type?: TokenType;
|
|
17
18
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DTOTokenPropertyValueUpsertPayload } from "@supernova-studio/client";
|
|
2
2
|
import { JSONValue } from "../../../utils/SDKJSONValue";
|
|
3
|
+
import { TokenType } from "../../enums/SDKTokenType";
|
|
4
|
+
import { TokenThemeOverrideTranserObject } from "../../themes/SDKTokenThemeOverride";
|
|
3
5
|
import { AnyDimensionTokenRemoteData, BlurTokenRemoteData, BorderTokenRemoteData, ColorTokenRemoteData, GradientTokenRemoteData, ShadowTokenRemoteData, StringTokenRemoteData, TextCaseTokenRemoteData, TextDecorationTokenRemoteData, TypographyTokenRemoteData, VisibilityTokenRemoteData } from "./SDKRemoteTokenData";
|
|
4
6
|
export type TokenRemoteModel = {
|
|
5
7
|
id: string;
|
|
@@ -69,3 +71,34 @@ export type GradientTokenRemoteModel = TokenRemoteModel & {
|
|
|
69
71
|
export type BlurTokenRemoteModel = TokenRemoteModel & {
|
|
70
72
|
data: BlurTokenRemoteData;
|
|
71
73
|
};
|
|
74
|
+
/** Theme overrides and property values that ride along with an aggregated token write */
|
|
75
|
+
type TokenBatchRelations = {
|
|
76
|
+
themeOverridesToUpsert?: Array<{
|
|
77
|
+
themePersistentId: string;
|
|
78
|
+
type: TokenType;
|
|
79
|
+
data: TokenThemeOverrideTranserObject["data"];
|
|
80
|
+
}>;
|
|
81
|
+
themeOverridesToDelete?: Array<{
|
|
82
|
+
themePersistentId: string;
|
|
83
|
+
}>;
|
|
84
|
+
propertyValuesToUpsert?: Array<DTOTokenPropertyValueUpsertPayload>;
|
|
85
|
+
/** Ids of the property values themselves, not of their definitions */
|
|
86
|
+
propertyValuesToDelete?: Array<string>;
|
|
87
|
+
};
|
|
88
|
+
/** Aggregated token update. Token fields are left out when they shouldn't change */
|
|
89
|
+
export type TokenBatchUpdatePayload = TokenBatchRelations & {
|
|
90
|
+
meta?: TokenRemoteModel["meta"];
|
|
91
|
+
data?: Pick<TokenRemoteModel, "data" | "type">;
|
|
92
|
+
originStyle?: TokenRemoteModel["originStyle"];
|
|
93
|
+
groupPersistentId?: string;
|
|
94
|
+
};
|
|
95
|
+
/** Aggregated token create. The endpoint assigns the version id and has no deletes to apply */
|
|
96
|
+
export type TokenBatchCreatePayload = Omit<TokenBatchRelations, "themeOverridesToDelete" | "propertyValuesToDelete"> & {
|
|
97
|
+
persistentId: string;
|
|
98
|
+
brandId: string;
|
|
99
|
+
meta: TokenRemoteModel["meta"];
|
|
100
|
+
data: Pick<TokenRemoteModel, "data" | "type">;
|
|
101
|
+
originStyle?: TokenRemoteModel["originStyle"];
|
|
102
|
+
groupPersistentId?: string;
|
|
103
|
+
};
|
|
104
|
+
export {};
|
|
@@ -20,7 +20,7 @@ export type TypographyTokenRemoteValue = {
|
|
|
20
20
|
textDecoration: TextDecorationTokenRemoteData;
|
|
21
21
|
textCase: TextCaseTokenRemoteData;
|
|
22
22
|
letterSpacing: LetterSpacingTokenRemoteData;
|
|
23
|
-
lineHeight: LineHeightTokenRemoteData |
|
|
23
|
+
lineHeight: LineHeightTokenRemoteData | undefined;
|
|
24
24
|
paragraphSpacing: ParagraphSpacingTokenRemoteData;
|
|
25
25
|
paragraphIndent: ParagraphSpacingTokenRemoteData;
|
|
26
26
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WorkspaceBilledSeatType } from "../enums/SDKWorkspaceSeatType";
|
|
2
2
|
import { WorkspaceSubscriptionPlanInterval } from "../enums/SDKWorkspaceSubscriptionPlanInterval";
|
|
3
3
|
export type WorkspaceProductPriceRemoteModel = {
|
|
4
4
|
stripePriceId: string;
|
|
@@ -8,11 +8,12 @@ export type WorkspaceProductPriceRemoteModel = {
|
|
|
8
8
|
stripeProductAdditionalFeatures: Array<string>;
|
|
9
9
|
active: boolean;
|
|
10
10
|
amount: number;
|
|
11
|
-
seatType?:
|
|
11
|
+
seatType?: WorkspaceBilledSeatType;
|
|
12
12
|
interval: WorkspaceSubscriptionPlanInterval;
|
|
13
13
|
isPricePerCreator: boolean;
|
|
14
14
|
legacyVersion?: string;
|
|
15
15
|
monthlyCreditGrant?: number;
|
|
16
|
+
mcpConsumers?: number;
|
|
16
17
|
};
|
|
17
18
|
export type WorkspaceProductPriceTransportModel = WorkspaceProductPriceRemoteModel;
|
|
18
19
|
export declare class WorkspaceProductPrice {
|
|
@@ -31,7 +32,7 @@ export declare class WorkspaceProductPrice {
|
|
|
31
32
|
/** The amount to be charged for the product, in the smallest currency unit (e.g., cents) */
|
|
32
33
|
amount: number;
|
|
33
34
|
/** The matching seat (builder or full). Omitted for free plans */
|
|
34
|
-
seatType?:
|
|
35
|
+
seatType?: WorkspaceBilledSeatType;
|
|
35
36
|
/** The billing interval (e.g., monthly, yearly) */
|
|
36
37
|
interval: WorkspaceSubscriptionPlanInterval;
|
|
37
38
|
/** Indicates whether the price is per creator (self-serve) or not */
|
|
@@ -40,6 +41,8 @@ export declare class WorkspaceProductPrice {
|
|
|
40
41
|
legacyVersion?: string | null;
|
|
41
42
|
/** The number of credits to be granted per month by this price */
|
|
42
43
|
monthlyCreditGrant: number | null;
|
|
44
|
+
/** The number of MCP consumers included in this price */
|
|
45
|
+
mcpConsumers: number | null;
|
|
43
46
|
constructor(model: WorkspaceProductPriceRemoteModel);
|
|
44
47
|
toRemote(): WorkspaceProductPriceRemoteModel;
|
|
45
48
|
toTransport(): WorkspaceProductPriceTransportModel;
|
|
@@ -19,6 +19,8 @@ export declare class WorkspaceSubscription {
|
|
|
19
19
|
fullSeatLimit: number;
|
|
20
20
|
/** Current number of DSM (Full) seats the workspace uses */
|
|
21
21
|
fullSeats: number;
|
|
22
|
+
/** Maximum number of MCP consumers */
|
|
23
|
+
mcpConsumerLimit: number | undefined;
|
|
22
24
|
/** Subscription tier */
|
|
23
25
|
product: WorkspaceSubscriptionProductCode;
|
|
24
26
|
/** Subscription cycle interval */
|
|
@@ -82,12 +84,6 @@ export declare class WorkspaceSubscription {
|
|
|
82
84
|
balance: number;
|
|
83
85
|
resetAt: Date | null;
|
|
84
86
|
};
|
|
85
|
-
spendingLimit: {
|
|
86
|
-
total: number;
|
|
87
|
-
used: number;
|
|
88
|
-
balance: number;
|
|
89
|
-
resetAt: Date | null;
|
|
90
|
-
};
|
|
91
87
|
} | null;
|
|
92
88
|
/** Paid top-up credits balance */
|
|
93
89
|
paidTopUp: {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Supernova } from "../../core/SDKSupernova";
|
|
2
|
+
import { ActivityEventOptions } from "../../core/data/requests/SDKDataCoreWriteRequests";
|
|
2
3
|
import { Brand } from "../../model/base/SDKBrand";
|
|
3
4
|
import { TokenGroup } from "../../model/groups/SDKTokenGroup";
|
|
4
5
|
import { Logger } from "../../model/support/SDKLogger";
|
|
@@ -28,7 +29,9 @@ export declare class SupernovaToolsDesignTokensPlugin {
|
|
|
28
29
|
private logger;
|
|
29
30
|
constructor(designSystemId: string, versionId: string, instance: Supernova, logger?: Logger);
|
|
30
31
|
synchronizeTokensFromData(data: object, mapping: DTPluginToSupernovaMapPack, settings: DTPluginToSupernovaSettings): Promise<object>;
|
|
31
|
-
synchronizeTokensFromDataWithResults(data: object, mapping: DTPluginToSupernovaMapPack, settings: DTPluginToSupernovaSettings
|
|
32
|
+
synchronizeTokensFromDataWithResults(data: object, mapping: DTPluginToSupernovaMapPack, settings: DTPluginToSupernovaSettings, options?: {
|
|
33
|
+
activityEventOptions?: ActivityEventOptions;
|
|
34
|
+
}): Promise<{
|
|
32
35
|
results: SupernovaToolsDesignTokensResult[];
|
|
33
36
|
logs: string[];
|
|
34
37
|
}>;
|
|
@@ -40,13 +43,13 @@ export declare class SupernovaToolsDesignTokensPlugin {
|
|
|
40
43
|
groups: Array<TokenGroup>;
|
|
41
44
|
};
|
|
42
45
|
/** Loads remote source connected to this tool, then merges tokens and groups with it, creating union. Can optionally write to the source as well */
|
|
43
|
-
mergeWithRemoteSource(processedNodes: Array<DTProcessedTokenNode>, brand: Brand, write: boolean, verbose: boolean, preciseCopy: DTPluginPreciseCopyStrategy): Promise<{
|
|
46
|
+
mergeWithRemoteSource(processedNodes: Array<DTProcessedTokenNode>, brand: Brand, write: boolean, verbose: boolean, preciseCopy: DTPluginPreciseCopyStrategy, activityEventOptions?: ActivityEventOptions): Promise<{
|
|
44
47
|
tokens: Array<Token>;
|
|
45
48
|
groups: Array<TokenGroup>;
|
|
46
49
|
diff: DTTokenMergeDiff;
|
|
47
50
|
}>;
|
|
48
51
|
/** Loads remote source connected to this tool, then creates the diff from the base tree and updates the associated theme. Can optionally write to the source as well */
|
|
49
|
-
mergeThemeWithRemoteSource(processedNodes: Array<DTProcessedTokenNode>, brand: Brand, theme: TokenTheme, write: boolean, verbose: boolean, preciseCopy?: DTPluginPreciseCopyStrategy, themeOverridesStrategy?: DTPluginThemeOverrideStrategy): Promise<{
|
|
52
|
+
mergeThemeWithRemoteSource(processedNodes: Array<DTProcessedTokenNode>, brand: Brand, theme: TokenTheme, write: boolean, verbose: boolean, preciseCopy?: DTPluginPreciseCopyStrategy, themeOverridesStrategy?: DTPluginThemeOverrideStrategy, activityEventOptions?: ActivityEventOptions): Promise<{
|
|
50
53
|
theme: TokenTheme;
|
|
51
54
|
tokens: Array<Token>;
|
|
52
55
|
}>;
|
|
@@ -10,6 +10,7 @@ import { DocsBlockCodePropertyDefinition, DocsBlockCodePropertyOptions } from ".
|
|
|
10
10
|
import { DocsBlockCodeSandboxPropertyDefinition, DocsBlockCodeSandboxPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockCodeSandboxProperty";
|
|
11
11
|
import { DocsBlockComponentPropertyDefinition, DocsBlockComponentPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockComponentProperty";
|
|
12
12
|
import { DocsBlockComponentPropertyPropertyDefinition, DocsBlockComponentPropertyPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockComponentPropertyProperty";
|
|
13
|
+
import { DocsBlockContextPropertyDefinition, DocsBlockContextPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockContextProperty";
|
|
13
14
|
import { DocsBlockDividerPropertyDefinition, DocsBlockDividerPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockDividerProperty";
|
|
14
15
|
import { DocsBlockEmbedUrlPropertyDefinition, DocsBlockEmbedUrlPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockEmbedUrlProperty";
|
|
15
16
|
import { DocsBlockFigmaComponentPropertyDefinition, DocsBlockFigmaComponentPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockFigmaComponentProperty";
|
|
@@ -392,4 +393,12 @@ export declare class DocsBlockBuilder {
|
|
|
392
393
|
options: DocsBlockFilePropertyOptions;
|
|
393
394
|
variants?: Record<string, DocsBlockFilePropertyOptions>;
|
|
394
395
|
}): DocsBlockFilePropertyDefinition;
|
|
396
|
+
/** Create a block property with type .context and its specific options */
|
|
397
|
+
contextProperty(configuration: {
|
|
398
|
+
id: string;
|
|
399
|
+
name: string;
|
|
400
|
+
description?: string;
|
|
401
|
+
options?: DocsBlockContextPropertyOptions;
|
|
402
|
+
variants?: Record<string, DocsBlockContextPropertyOptions>;
|
|
403
|
+
}): DocsBlockContextPropertyDefinition;
|
|
395
404
|
}
|
package/build/types/tools/json-builder/elements-transformers/SDKToolsJSONElementTransformer.d.ts
CHANGED
|
@@ -63,7 +63,7 @@ export declare class TokenJSONElementTransformer {
|
|
|
63
63
|
safeGroupName(group: TokenGroup): string;
|
|
64
64
|
processedName(name: string, naming: JSONBuilderNamingOption): string;
|
|
65
65
|
/** Retrieve human-readable token type in unified fashion, used both as token type and as token master group */
|
|
66
|
-
typeLabel(type: TokenType): "border" | "color" | "gradient" | "measure" | "shadow" | "text" | "textCase" | "textDecoration" | "
|
|
66
|
+
typeLabel(type: TokenType): "visibility" | "border" | "color" | "gradient" | "measure" | "shadow" | "text" | "textCase" | "textDecoration" | "typography";
|
|
67
67
|
/** Retrieve chain of groups up to a specified group, ordered from parent to children */
|
|
68
68
|
referenceGroupChain(containingGroup: TokenGroup, allGroups: Array<TokenGroup>): Array<TokenGroup>;
|
|
69
69
|
}
|
|
@@ -305,7 +305,7 @@ export declare class TokenUtils {
|
|
|
305
305
|
static buildFallbackKeyBack(node: Pick<DTProcessedTokenNode, "path" | "token">): string;
|
|
306
306
|
static buildFallbackKey2(node: Pick<DTProcessedTokenNode, "path" | "token">): string;
|
|
307
307
|
static getTokenByKeyOrFallbackKeys<T extends DTProcessedTokenNode | Token>(node: Pick<DTProcessedTokenNode, "path" | "token">, map: Map<string, T>): T | undefined;
|
|
308
|
-
static getKeysByKeyOrFallbackKeys
|
|
308
|
+
static getKeysByKeyOrFallbackKeys(node: Pick<DTProcessedTokenNode, "path" | "token">): string[];
|
|
309
309
|
static getTokenByKeyOrBackwardKey(node: Pick<DTProcessedTokenNode, "path" | "token">, map: Map<string, DTProcessedTokenNode>): DTProcessedTokenNode | undefined;
|
|
310
310
|
static getTextCaseTokenValue(value: TextCase): "Uppercase" | "Lowercase" | "Capitalize" | "Small caps" | "Original";
|
|
311
311
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supernova-studio/supernova-sdk-beta",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.9",
|
|
4
4
|
"description": "Supernova.io SDK",
|
|
5
5
|
"main": "./build/supernova-sdk-typescript.js",
|
|
6
6
|
"types": "./build/types/index.d.ts",
|
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
"scripts-info": {
|
|
25
25
|
"info": "Display information about the package scripts",
|
|
26
26
|
"build": "Clean and rebuild the project",
|
|
27
|
-
"fix": "Try to automatically fix any linting problems",
|
|
28
27
|
"test": "Lint and unit test the project",
|
|
29
28
|
"watch": "Watch and rebuild the project on save, then rerun relevant tests",
|
|
30
29
|
"cov": "Rebuild, run tests, then create and open the coverage report",
|
|
@@ -36,43 +35,41 @@
|
|
|
36
35
|
"publish-packages": "Publish both SDK and Pulsar package to NPM"
|
|
37
36
|
},
|
|
38
37
|
"engines": {
|
|
39
|
-
"node": ">=
|
|
38
|
+
"node": ">=18"
|
|
40
39
|
},
|
|
41
40
|
"dependencies": {
|
|
42
|
-
"abab": "2.0.6",
|
|
43
41
|
"async-mutex": "0.3.2",
|
|
44
42
|
"color-string": "1.9.1",
|
|
45
|
-
"color2k": "2.0.
|
|
43
|
+
"color2k": "2.0.4",
|
|
46
44
|
"fuse.js": "6.6.2",
|
|
47
|
-
"lodash": "4.
|
|
45
|
+
"lodash": "4.18.1",
|
|
48
46
|
"parse-color": "1.0.0",
|
|
49
47
|
"tinycolor2": "1.6.0",
|
|
50
48
|
"uuid": "14.0.0",
|
|
51
|
-
"@supernova-studio/client": "1.96.
|
|
52
|
-
"@supernova-studio/model": "1.96.
|
|
49
|
+
"@supernova-studio/client": "1.96.10",
|
|
50
|
+
"@supernova-studio/model": "1.96.10"
|
|
53
51
|
},
|
|
54
52
|
"devDependencies": {
|
|
55
53
|
"@istanbuljs/nyc-config-typescript": "0.1.3",
|
|
56
|
-
"@types/lodash": "4.17.
|
|
57
|
-
"@types/
|
|
54
|
+
"@types/lodash": "4.17.24",
|
|
55
|
+
"@types/parse-color": "1.0.3",
|
|
56
|
+
"@types/tinycolor2": "1.4.6",
|
|
58
57
|
"dotenv": "16.0.3",
|
|
59
58
|
"esm": "3.2.25",
|
|
60
|
-
"npm-run-all": "4.1.5",
|
|
61
59
|
"nyc": "17.1.0",
|
|
62
60
|
"readable-stream": "4.7.0",
|
|
63
61
|
"trash-cli": "5.0.0",
|
|
64
|
-
"ts-loader": "9.
|
|
62
|
+
"ts-loader": "9.6.2",
|
|
65
63
|
"tsconfig-paths-webpack-plugin": "4.2.0",
|
|
66
|
-
"tsx": "4.
|
|
67
|
-
"vitest": "4.
|
|
64
|
+
"tsx": "4.19.3",
|
|
65
|
+
"vitest": "4.1.4",
|
|
66
|
+
"webpack": "5.108.4",
|
|
68
67
|
"webpack-cli": "6.0.1",
|
|
69
68
|
"webpack-node-externals": "3.0.0",
|
|
70
|
-
"@supernovaio/typescript-with-config": "1.3.28"
|
|
69
|
+
"@supernovaio/typescript-with-config": "1.3.28",
|
|
70
|
+
"eslint-config-supernova": "0.0.0"
|
|
71
71
|
},
|
|
72
72
|
"config": {},
|
|
73
|
-
"overrides": {
|
|
74
|
-
"js-yaml": "3.14.2"
|
|
75
|
-
},
|
|
76
73
|
"nyc": {
|
|
77
74
|
"extends": "@istanbuljs/nyc-config-typescript",
|
|
78
75
|
"exclude": [
|
|
@@ -80,17 +77,16 @@
|
|
|
80
77
|
]
|
|
81
78
|
},
|
|
82
79
|
"optionalDependencies": {
|
|
83
|
-
"@rollup/rollup-darwin-x64": "4.
|
|
80
|
+
"@rollup/rollup-darwin-x64": "4.59.0"
|
|
84
81
|
},
|
|
85
82
|
"scripts": {
|
|
86
83
|
"build:production": "pnpm clean && webpack --mode production --config ./webpack.config.sdk.js && pnpm build:types",
|
|
87
84
|
"build:types": "tsc --noCheck --declaration --emitDeclarationOnly --declarationMap false --skipLibCheck --module CommonJS --target ES2020 --moduleResolution node --esModuleInterop --outDir build/types src/index.ts",
|
|
88
85
|
"build-sdk": "pnpm build:production",
|
|
89
86
|
"clean": "trash build test",
|
|
90
|
-
"fix": "run-s fix:*",
|
|
91
87
|
"lint": "eslint 'src/**/*.ts*'",
|
|
92
88
|
"lint:fix": "eslint 'src/**/*.ts*' --fix",
|
|
93
|
-
"test": "
|
|
89
|
+
"test": "pnpm test:unit",
|
|
94
90
|
"test:unit": "vitest run --config vitest.config.ts --reporter verbose",
|
|
95
91
|
"test:watch": "vitest --config vitest.config.ts --watch",
|
|
96
92
|
"test-ci": "vitest run --config vitest.config-ci.ts",
|