@supernova-studio/supernova-sdk-beta 2.4.12 → 2.5.2
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/areas/SDKAreaAgentChats.d.ts +4 -1
- package/build/types/core/areas/SDKAreaBulkOperations.d.ts +2 -2
- package/build/types/core/areas/SDKAreaComponents.d.ts +7 -31
- package/build/types/core/areas/SDKAreaDataSources.d.ts +5 -0
- package/build/types/core/areas/SDKAreaDocumentation.d.ts +14 -16
- package/build/types/core/areas/SDKAreaMCP.d.ts +4 -3
- package/build/types/core/areas/SDKAreaMe.d.ts +0 -2
- package/build/types/core/areas/SDKAreaProjects.d.ts +77 -922
- package/build/types/core/areas/SDKAreaRawData.d.ts +78 -917
- package/build/types/core/areas/SDKAreaResources.d.ts +4 -2
- package/build/types/core/areas/SDKAreaThreads.d.ts +1 -115
- package/build/types/core/areas/SDKAreaTokenValues.d.ts +15 -2
- package/build/types/core/areas/SDKAreaTokens.d.ts +3 -4
- package/build/types/core/areas/SDKAreaVersions.d.ts +3 -3
- package/build/types/core/areas/SDKAreaWorkspaces.d.ts +3 -4
- package/build/types/core/data/SDKDataBridge.d.ts +0 -1
- package/build/types/core/data/SDKDataCore.d.ts +133 -1085
- package/build/types/core/data/SDKDataCoreCached.d.ts +0 -3
- package/build/types/core/data/requests/SDKDataCoreReadRequests.d.ts +55 -470
- package/build/types/core/data/requests/SDKDataCoreWriteRequests.d.ts +142 -990
- package/build/types/core/resolvers/SDKDocsEntityItemResolver.d.ts +2 -2
- package/build/types/exports.d.ts +2 -1
- package/build/types/model/activity-events/SDKActivityEvent.d.ts +42 -3
- package/build/types/model/agent-chats/SDKAgentChat.d.ts +12 -1
- package/build/types/model/base/SDKDesignSystemVersionStats.d.ts +6 -1
- package/build/types/model/docs/blocks/support/SDKDocsImageRef.d.ts +1 -1
- package/build/types/model/documentation/SDKPublishedDocsSite.d.ts +20 -0
- package/build/types/model/enums/SDKUnit.d.ts +2 -0
- package/build/types/model/support/SDKSource.d.ts +1 -1
- package/build/types/model/tokens/SDKColorToken.d.ts +4 -0
- package/build/types/model/tokens/SDKDimensionToken.d.ts +6 -1
- package/build/types/model/users/SDKUserWorkspaceNotificationSettings.d.ts +4 -0
- package/build/types/model/workspaces/SDKWorkspaceProduct.d.ts +0 -4
- package/build/types/model/workspaces/SDKWorkspaceProductPrice.d.ts +18 -9
- package/build/types/model/workspaces/SDKWorkspaceSubscription.d.ts +18 -19
- package/build/types/tools/design-tokens/SDKToolsDesignTokensPlugin.d.ts +3 -6
- package/build/types/utils/TokenUtils.d.ts +11 -3
- package/package.json +6 -24
|
@@ -5,13 +5,13 @@ export declare class DocsEntityItemResolver {
|
|
|
5
5
|
hashedItems: Map<string, {
|
|
6
6
|
id: string;
|
|
7
7
|
designSystemVersionId: string;
|
|
8
|
+
persistentId: string;
|
|
8
9
|
createdAt: Date;
|
|
9
10
|
updatedAt: Date;
|
|
10
|
-
persistentId: string;
|
|
11
11
|
title: string;
|
|
12
12
|
isRoot: boolean;
|
|
13
13
|
childrenIds: string[];
|
|
14
|
-
groupBehavior: "
|
|
14
|
+
groupBehavior: "Tabs" | "Group";
|
|
15
15
|
shortPersistentId: string;
|
|
16
16
|
configuration: {
|
|
17
17
|
showSidebar: boolean;
|
package/build/types/exports.d.ts
CHANGED
|
@@ -96,6 +96,7 @@ export { DocsAnalyticsPageComparisonData } from "./model/docs_analytics/SDKDocsA
|
|
|
96
96
|
export { DocsAnalyticsVisitHeatMapWeek } from "./model/docs_analytics/SDKDocsAnalyticsVisitHeatMapWeek";
|
|
97
97
|
export { PageHistoryVersion, PageHistoryVersionContent, } from "./model/documentation/SDKPageHistoryVersion";
|
|
98
98
|
export type { PageHistoryVersionJSONContent } from "./model/documentation/SDKPageHistoryVersion";
|
|
99
|
+
export { PublishedDocsSite } from "./model/documentation/SDKPublishedDocsSite";
|
|
99
100
|
export { DocsBlockBehavior } from "./model/docs/blocks/definition/SDKDocsBlockBehavior";
|
|
100
101
|
export { DocsBlockDefinition } from "./model/docs/blocks/definition/SDKDocsBlockDefinition";
|
|
101
102
|
export { DocsBlockItemDefinition } from "./model/docs/blocks/definition/SDKDocsBlockItemDefinition";
|
|
@@ -372,7 +373,7 @@ export { PublishedFeature, type PublishedFeatureRemoteModel, } from "./model/pro
|
|
|
372
373
|
export { TrailEvent, type TrailEventRemoteModel, type TrailEventType, type TrailEventCreateInput, type TrailEventListInput, type TrailEventListResponse, } from "./model/trail-events/SDKTrailEvent";
|
|
373
374
|
export { ActivityEvent, type ActivityEventChange, type ActivityEventEntitySnapshot, type ActivityEventListFilter, } from "./model/activity-events/SDKActivityEvent";
|
|
374
375
|
export { SnapshotTokenBuilder, type BuiltTokenSnapshot, type TokenSnapshot, } from "./core/resolvers/SDKSnapshotTokenBuilder";
|
|
375
|
-
export { AgentChat, type AgentChatChangedEntitiesResponse, type AgentChatChangedEntity, type AgentChatCreateInput, type AgentChatDeleteResponse, type AgentChatListFilter, type AgentChatListResponse, type AgentChatRemoteModel, type AgentChatResponse, type AgentChatUpdateInput, } from "./model/agent-chats/SDKAgentChat";
|
|
376
|
+
export { AGENT_CHAT_NAME_SOURCE_MAX_LENGTH, AgentChat, type AgentChatChangedEntitiesResponse, type AgentChatChangedEntity, type AgentChatCreateInput, type AgentChatDeleteResponse, type AgentChatListFilter, type AgentChatListResponse, type AgentChatRemoteModel, type AgentChatResponse, type AgentChatUpdateInput, type AgentTurnRating, type AgentTurnRatingInput, type AgentTurnRatingTag, type AgentTurnRatingType, } from "./model/agent-chats/SDKAgentChat";
|
|
376
377
|
export { ForgeProjectMembership } from "./model/projects/memberships/SDKForgeProjectMembership";
|
|
377
378
|
export type { ForgeProjectMembershipRole } from "./model/projects/memberships/SDKForgeProjectMembership";
|
|
378
379
|
export { ForgeProjectMembersList } from "./model/projects/memberships/SDKForgeProjectMembersList";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { DTOActivityEventChange, DTOActivityEventEntitySnapshot, DTOActivityEventWithDetails } from "@supernova-studio/client";
|
|
2
|
+
import type { DTOActivityEventAction, DTOActivityEventActorSource, DTOActivityEventListInput, DTOActivityEventListResponse, DTOActivityEventTargetType, DTOActivityEventType } from "@supernova-studio/client";
|
|
2
3
|
export type ActivityEventRemoteModel = DTOActivityEventWithDetails;
|
|
3
4
|
export type ActivityEventListResponse = DTOActivityEventListResponse;
|
|
4
5
|
export type ActivityEventActorSource = DTOActivityEventActorSource;
|
|
@@ -26,6 +27,7 @@ export declare class ActivityEvent {
|
|
|
26
27
|
parentId: string | undefined;
|
|
27
28
|
changes: ActivityEventChange[];
|
|
28
29
|
entitySnapshots: ActivityEventEntitySnapshot[];
|
|
30
|
+
metadata: ActivityEventRemoteModel["metadata"];
|
|
29
31
|
constructor(model: ActivityEventRemoteModel);
|
|
30
32
|
toRemote(): ActivityEventRemoteModel;
|
|
31
33
|
}
|
|
@@ -37,13 +39,50 @@ export type ActivityEventListResult = {
|
|
|
37
39
|
export type ActivityEventListFilter = {
|
|
38
40
|
designSystemId: string;
|
|
39
41
|
versionId: string;
|
|
40
|
-
/**
|
|
41
|
-
|
|
42
|
+
/** Reads these events by id, whatever their target or parent */
|
|
43
|
+
eventIds?: string[];
|
|
44
|
+
/** Reads only these entities' history; leave it out to read the whole version */
|
|
45
|
+
targetIds?: string[];
|
|
46
|
+
/** Target types a feed shows; omitted reads every type in the version */
|
|
47
|
+
targetTypes?: ActivityEventTargetType[];
|
|
48
|
+
/** Roles a feed shows, such as reading component sets without their variants */
|
|
49
|
+
targetSubtypes?: string[];
|
|
50
|
+
/** Reads only asset-backed rows, or only the rest; omitted reads both */
|
|
51
|
+
isAsset?: boolean;
|
|
42
52
|
/** Brand persistent ids; the "null" sentinel adds workspace-level rows */
|
|
43
53
|
brandIds?: string[];
|
|
44
54
|
/** "null" reads root events only, an id reads that parent's children */
|
|
45
55
|
parentId?: DTOActivityEventListInput["parentId"];
|
|
56
|
+
actorUserId?: string;
|
|
57
|
+
actorSource?: ActivityEventActorSource;
|
|
58
|
+
/** Inclusive */
|
|
59
|
+
createdAfter?: Date;
|
|
60
|
+
/** Exclusive */
|
|
61
|
+
createdBefore?: Date;
|
|
46
62
|
/** Keyset cursor from the previous page; omitted reads the newest page */
|
|
47
63
|
cursor?: string;
|
|
48
64
|
limit?: number;
|
|
49
65
|
};
|
|
66
|
+
/**
|
|
67
|
+
* Event row as the SDK reads it. A change, snapshot or subtype this published SDK predates
|
|
68
|
+
* drops itself, so the event still renders instead of taking its page down with it.
|
|
69
|
+
*/
|
|
70
|
+
/**
|
|
71
|
+
* Describes the schema without naming zod, so the published declarations stay readable by
|
|
72
|
+
* consumers on older TypeScript. zod 4 types need TypeScript 5 or newer to parse.
|
|
73
|
+
*/
|
|
74
|
+
type ActivityEventParseResult = {
|
|
75
|
+
success: true;
|
|
76
|
+
data: ActivityEventRemoteModel;
|
|
77
|
+
error?: undefined;
|
|
78
|
+
} | {
|
|
79
|
+
success: false;
|
|
80
|
+
data?: undefined;
|
|
81
|
+
error: {
|
|
82
|
+
issues: Array<unknown>;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
export declare const ActivityEventRemoteSchema: {
|
|
86
|
+
safeParse: (value: unknown) => ActivityEventParseResult;
|
|
87
|
+
};
|
|
88
|
+
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { DTOAgentChat, DTOAgentChatChangedEntitiesResponse, DTOAgentChatChangedEntity, DTOAgentChatCreatePayload, DTOAgentChatDeleteResponse, DTOAgentChatListResponse, DTOAgentChatResponse, DTOAgentChatUpdatePayload } from "@supernova-studio/client";
|
|
1
|
+
import type { DTOAgentChat, DTOAgentChatChangedEntitiesResponse, DTOAgentChatChangedEntity, DTOAgentChatCreatePayload, DTOAgentChatDeleteResponse, DTOAgentChatListResponse, DTOAgentChatResponse, DTOAgentChatUpdatePayload, DTOAgentTurnRating, DTOAgentTurnRatingListResponse, DTOAgentTurnRatingResponse, DTOAgentTurnRatingTag, DTOAgentTurnRatingType, DTOAgentTurnRatingUpsertPayload } from "@supernova-studio/client";
|
|
2
|
+
export { AGENT_CHAT_NAME_SOURCE_MAX_LENGTH } from "@supernova-studio/client";
|
|
2
3
|
export type AgentChatChangedEntitiesResponse = DTOAgentChatChangedEntitiesResponse;
|
|
3
4
|
export type AgentChatChangedEntity = DTOAgentChatChangedEntity;
|
|
4
5
|
export type AgentChatCreateInput = DTOAgentChatCreatePayload;
|
|
@@ -7,6 +8,12 @@ export type AgentChatListResponse = DTOAgentChatListResponse;
|
|
|
7
8
|
export type AgentChatRemoteModel = DTOAgentChat;
|
|
8
9
|
export type AgentChatResponse = DTOAgentChatResponse;
|
|
9
10
|
export type AgentChatUpdateInput = DTOAgentChatUpdatePayload;
|
|
11
|
+
export type AgentTurnRating = DTOAgentTurnRating;
|
|
12
|
+
export type AgentTurnRatingInput = DTOAgentTurnRatingUpsertPayload;
|
|
13
|
+
export type AgentTurnRatingListResponse = DTOAgentTurnRatingListResponse;
|
|
14
|
+
export type AgentTurnRatingResponse = DTOAgentTurnRatingResponse;
|
|
15
|
+
export type AgentTurnRatingTag = DTOAgentTurnRatingTag;
|
|
16
|
+
export type AgentTurnRatingType = DTOAgentTurnRatingType;
|
|
10
17
|
export type AgentChatListFilter = {
|
|
11
18
|
workspaceId: string;
|
|
12
19
|
designSystemId?: string;
|
|
@@ -15,6 +22,10 @@ export type AgentChatListFilter = {
|
|
|
15
22
|
export declare class AgentChat {
|
|
16
23
|
id: string;
|
|
17
24
|
workspaceId: string;
|
|
25
|
+
/**
|
|
26
|
+
* @deprecated Chats belong to a workspace and are never created with a design
|
|
27
|
+
* system any more. Older chats may still carry one; nothing reads it
|
|
28
|
+
*/
|
|
18
29
|
designSystemId: string | undefined;
|
|
19
30
|
userId: string;
|
|
20
31
|
threadId: string;
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
-
import { DTODesignSystemVersionStats } from "@supernova-studio/client";
|
|
1
|
+
import { DTODesignSystemVersionStats, DTODesignSystemVersionTokenCollectionStats } from "@supernova-studio/client";
|
|
2
2
|
export declare class DesignSystemVersionStats {
|
|
3
3
|
tokens: number;
|
|
4
|
+
tokensByType: Record<string, number>;
|
|
5
|
+
/** Tokens not linked to any data source, i.e. authored in Supernova */
|
|
6
|
+
authoredTokens: number;
|
|
7
|
+
tokenCollections: Array<DTODesignSystemVersionTokenCollectionStats>;
|
|
4
8
|
designSystemComponents: number;
|
|
5
9
|
assets: number;
|
|
6
10
|
documentationPages: number;
|
|
11
|
+
publishedDocumentationPages: number;
|
|
7
12
|
figmaComponents: number;
|
|
8
13
|
stories: number;
|
|
9
14
|
constructor(model: DTODesignSystemVersionStats);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { DTOFileReference, DTOPublishedDocsSite } from "@supernova-studio/client";
|
|
2
|
+
import { DocumentationEnvironment } from "../enums/SDKDocumentationEnvironment";
|
|
3
|
+
export declare class PublishedDocsSite {
|
|
4
|
+
id: string;
|
|
5
|
+
designSystemVersionId: string;
|
|
6
|
+
createdAt: Date;
|
|
7
|
+
updatedAt: Date;
|
|
8
|
+
lastPublishedAt: Date;
|
|
9
|
+
environment: DocumentationEnvironment;
|
|
10
|
+
isDefault: boolean;
|
|
11
|
+
isPublic: boolean;
|
|
12
|
+
routingVersion: DTOPublishedDocsSite["routingVersion"];
|
|
13
|
+
usesLocalizations: boolean;
|
|
14
|
+
wasPublishedWithLocalizations: boolean;
|
|
15
|
+
tokenCount: number;
|
|
16
|
+
assetCount: number;
|
|
17
|
+
thumbnail?: DTOFileReference;
|
|
18
|
+
thumbnailUpdatedAt?: Date;
|
|
19
|
+
constructor(model: DTOPublishedDocsSite);
|
|
20
|
+
}
|
|
@@ -7,6 +7,8 @@ export declare enum Unit {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const SIZE_UNITS: readonly [Unit.pixels, Unit.percent, Unit.rem];
|
|
9
9
|
export type SizeUnit = (typeof SIZE_UNITS)[number];
|
|
10
|
+
export declare const OPACITY_UNITS: readonly [Unit.pixels, Unit.percent, Unit.raw];
|
|
11
|
+
export type OpacityUnit = (typeof OPACITY_UNITS)[number];
|
|
10
12
|
export declare const LINE_HEIGHT_UNITS: readonly [Unit.pixels, Unit.percent, Unit.rem, Unit.raw];
|
|
11
13
|
export type LineHeightUnit = (typeof LINE_HEIGHT_UNITS)[number];
|
|
12
14
|
export declare const RAW_UNITS: readonly [Unit.raw];
|
|
@@ -12,6 +12,10 @@ export declare class ColorToken extends Token {
|
|
|
12
12
|
constructor(versionId: string, baseToken: TokenRemoteModel, value: ColorTokenValue, alias: ColorToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
13
13
|
static create(versionId: string, brandId: string, name: string, description: string, value: string, alias: ColorToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): ColorToken;
|
|
14
14
|
static colorValueFromDefinition(definition: string): ColorTokenValue;
|
|
15
|
+
/**
|
|
16
|
+
* Rewrite rgb()/hsl() forms into hex, including shapes tinycolor2 cannot read on its own.
|
|
17
|
+
* Keep color2k here: the catch below only fires because it throws, where tinycolor2 returns an invalid color.
|
|
18
|
+
*/
|
|
15
19
|
static normalizeColor(color: string): string | null;
|
|
16
20
|
static normalizeOpacity(value: string): number;
|
|
17
21
|
static normalizedHex(value: string | null): string | null;
|
|
@@ -27,8 +27,13 @@ export declare class DimensionCategoryToken<T extends AnyDimensionTokenValue> ex
|
|
|
27
27
|
value: T;
|
|
28
28
|
constructor(versionId: string, baseToken: TokenRemoteModel, value: AnyDimensionTokenValue, alias: DimensionCategoryToken<AnyDimensionTokenValue> | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>);
|
|
29
29
|
static create<TToken extends DimensionCategoryToken<AnyDimensionTokenValue>>(this: new (versionId: string, baseToken: TokenRemoteModel, value: AnyDimensionTokenValue, alias: DimensionCategoryToken<AnyDimensionTokenValue> | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>) => TToken, type: DimensionTokenType, versionId: string, brandId: string, name: string, description: string, value: string | number, alias: TToken | null, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): TToken;
|
|
30
|
-
static getCompatibleUnit(unit: Unit, type: DimensionTokenType): Unit;
|
|
30
|
+
static getCompatibleUnit(unit: Unit, type: DimensionTokenType, referenceCheckOnly?: boolean): Unit;
|
|
31
31
|
static getCompatibleMeasure(unit: Unit, type: DimensionTokenType, measure: number): number;
|
|
32
|
+
/**
|
|
33
|
+
* Reads a px or % value aliased by an opacity as a fraction, so 50px becomes 0.5.
|
|
34
|
+
* Values outside 0–100 keep their unit so the out-of-range warning still shows.
|
|
35
|
+
*/
|
|
36
|
+
static toOpacityValue<T extends AnyDimensionTokenValue>(value: T): T;
|
|
32
37
|
static getDefaultUnit(type: DimensionTokenType, parsedDefinition?: number): Unit.pixels | Unit.ms | Unit.raw;
|
|
33
38
|
static dimensionValueFromDefinition<T extends DimensionTokenType>(definition: string | number, type: T): DimensionValueForType<T>;
|
|
34
39
|
static parseDimension(definition: string, type: DimensionTokenType): {
|
|
@@ -6,6 +6,9 @@ type GeneralNotificationSetting = {
|
|
|
6
6
|
type DocsCommentsSetting = {
|
|
7
7
|
email: boolean;
|
|
8
8
|
};
|
|
9
|
+
type AgentSoundSetting = {
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
};
|
|
9
12
|
export type NotificationSettingsRemoteModel = DTOUserNotificationSettings;
|
|
10
13
|
export type NotificationSettingsUpdateModel = Omit<NotificationSettingsRemoteModel, "liveblocksNotificationSettings">;
|
|
11
14
|
export declare class UserWorkspaceNotificationSettings {
|
|
@@ -13,6 +16,7 @@ export declare class UserWorkspaceNotificationSettings {
|
|
|
13
16
|
projectChatMention: GeneralNotificationSetting;
|
|
14
17
|
projectDocumentComments: GeneralNotificationSetting;
|
|
15
18
|
projectInvitation: GeneralNotificationSetting;
|
|
19
|
+
agentSound: AgentSoundSetting;
|
|
16
20
|
constructor(model: NotificationSettingsRemoteModel);
|
|
17
21
|
toRemote(): NotificationSettingsRemoteModel;
|
|
18
22
|
}
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
import { UserRole } from "../enums/SDKUserRole";
|
|
2
1
|
import { WorkspaceSubscriptionProductCode } from "../enums/SDKWorkspaceSubscriptionProduct";
|
|
3
2
|
import { WorkspaceProductPrice, WorkspaceProductPriceRemoteModel } from "./SDKWorkspaceProductPrice";
|
|
4
3
|
export type WorkspaceProductRemoteModel = {
|
|
5
4
|
code: WorkspaceSubscriptionProductCode;
|
|
6
|
-
allowedInviteRoles: Array<UserRole>;
|
|
7
5
|
prices: Array<WorkspaceProductPriceRemoteModel>;
|
|
8
6
|
};
|
|
9
7
|
export type WorkspaceProductTransportModel = WorkspaceProductRemoteModel;
|
|
10
8
|
export declare class WorkspaceProduct {
|
|
11
9
|
/** The code corresponding to this product */
|
|
12
10
|
code: WorkspaceSubscriptionProductCode;
|
|
13
|
-
/** The roles that are allowed to be invited to the workspace under this product */
|
|
14
|
-
allowedInviteRoles: Array<UserRole>;
|
|
15
11
|
/** The list of prices associated with the product */
|
|
16
12
|
prices: Array<WorkspaceProductPrice>;
|
|
17
13
|
constructor(model: WorkspaceProductTransportModel);
|
|
@@ -3,17 +3,17 @@ import { WorkspaceSubscriptionPlanInterval } from "../enums/SDKWorkspaceSubscrip
|
|
|
3
3
|
export type WorkspaceProductPriceRemoteModel = {
|
|
4
4
|
stripePriceId: string;
|
|
5
5
|
stripeProductId: string;
|
|
6
|
-
stripeProductDescription: string;
|
|
7
6
|
stripeProductFeatures: Array<string>;
|
|
8
7
|
stripeProductAdditionalFeatures: Array<string>;
|
|
9
8
|
active: boolean;
|
|
10
9
|
amount: number;
|
|
11
10
|
seatType?: WorkspaceBilledSeatType;
|
|
12
11
|
interval: WorkspaceSubscriptionPlanInterval;
|
|
13
|
-
isPricePerCreator: boolean;
|
|
14
12
|
legacyVersion?: string;
|
|
15
13
|
monthlyCreditGrant?: number;
|
|
16
14
|
mcpConsumers?: number;
|
|
15
|
+
isFixed?: boolean;
|
|
16
|
+
isSelfServe: boolean;
|
|
17
17
|
};
|
|
18
18
|
export type WorkspaceProductPriceTransportModel = WorkspaceProductPriceRemoteModel;
|
|
19
19
|
export declare class WorkspaceProductPrice {
|
|
@@ -21,28 +21,37 @@ export declare class WorkspaceProductPrice {
|
|
|
21
21
|
stripePriceId: string;
|
|
22
22
|
/** The unique identifier for the Stripe product associated with the price */
|
|
23
23
|
stripeProductId: string;
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
/**
|
|
25
|
+
* List of features available to this product price
|
|
26
|
+
* @deprecated Plan copy is hardcoded on the frontend now
|
|
27
|
+
*/
|
|
27
28
|
stripeProductFeatures: Array<string>;
|
|
28
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* List of additional features available to this product price
|
|
31
|
+
* @deprecated Plan copy is hardcoded on the frontend now
|
|
32
|
+
*/
|
|
29
33
|
stripeProductAdditionalFeatures: Array<string>;
|
|
30
34
|
/** Indicates whether the price is currently active */
|
|
31
35
|
active: boolean;
|
|
32
36
|
/** The amount to be charged for the product, in the smallest currency unit (e.g., cents) */
|
|
33
37
|
amount: number;
|
|
34
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* The matching seat (builder or full). Omitted for free plans
|
|
40
|
+
* @deprecated Flat plans have no seat type
|
|
41
|
+
*/
|
|
35
42
|
seatType?: WorkspaceBilledSeatType;
|
|
36
43
|
/** The billing interval (e.g., monthly, yearly) */
|
|
37
44
|
interval: WorkspaceSubscriptionPlanInterval;
|
|
38
|
-
/** Indicates whether the price is per creator (self-serve) or not */
|
|
39
|
-
isPricePerCreator: boolean;
|
|
40
45
|
/** An optional legacy version identifier, if applicable */
|
|
41
46
|
legacyVersion?: string | null;
|
|
42
47
|
/** The number of credits to be granted per month by this price */
|
|
43
48
|
monthlyCreditGrant: number | null;
|
|
44
49
|
/** The number of MCP consumers included in this price */
|
|
45
50
|
mcpConsumers: number | null;
|
|
51
|
+
/** Whether the plan is charged as a flat fee instead of per seat */
|
|
52
|
+
isFixed: boolean;
|
|
53
|
+
/** Whether the plan can be bought without contacting sales */
|
|
54
|
+
isSelfServe: boolean;
|
|
46
55
|
constructor(model: WorkspaceProductPriceRemoteModel);
|
|
47
56
|
toRemote(): WorkspaceProductPriceRemoteModel;
|
|
48
57
|
toTransport(): WorkspaceProductPriceTransportModel;
|
|
@@ -11,16 +11,13 @@ export type WorkspaceSubscriptionUpdatePreviewModel = DTOSubscriptionUpdatePrevi
|
|
|
11
11
|
export declare class WorkspaceSubscription {
|
|
12
12
|
/** Main status of the workspace subscription */
|
|
13
13
|
status: WorkspaceSubscriptionStatus;
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
/** Maximum number of DSM (Full) seats */
|
|
14
|
+
/**
|
|
15
|
+
* Number of DSM (Full) seats the workspace bought. Zero when the backend does not send it
|
|
16
|
+
* @deprecated Only seat-priced plans use it. Flat plans buy no seats
|
|
17
|
+
*/
|
|
19
18
|
fullSeatLimit: number;
|
|
20
19
|
/** Current number of DSM (Full) seats the workspace uses */
|
|
21
20
|
fullSeats: number;
|
|
22
|
-
/** Maximum number of MCP consumers */
|
|
23
|
-
mcpConsumerLimit: number | undefined;
|
|
24
21
|
/** Subscription tier */
|
|
25
22
|
product: WorkspaceSubscriptionProductCode;
|
|
26
23
|
/** Subscription cycle interval */
|
|
@@ -31,11 +28,6 @@ export declare class WorkspaceSubscription {
|
|
|
31
28
|
* Stripe price id for a Full seat.
|
|
32
29
|
*/
|
|
33
30
|
fullSeatPriceId: string;
|
|
34
|
-
/**
|
|
35
|
-
* Stripe price id for a Builder seat.
|
|
36
|
-
* Can be optional if no Builder subscription was created on Stripe (e.g., on legacy plans).
|
|
37
|
-
*/
|
|
38
|
-
builderSeatPriceId: string | null;
|
|
39
31
|
/** Starting date of the current billing cycle */
|
|
40
32
|
currentPeriodStart: Date | null;
|
|
41
33
|
/** Ending date of the current billing cycle */
|
|
@@ -58,20 +50,28 @@ export declare class WorkspaceSubscription {
|
|
|
58
50
|
} | null;
|
|
59
51
|
/** Price of the subscription, in the smallest currency unit (e.g., cents) */
|
|
60
52
|
amount: number;
|
|
61
|
-
/** Product description */
|
|
62
|
-
stripeProductDescription: string | null;
|
|
63
53
|
/** Date when subscription status was updated */
|
|
64
54
|
subscriptionStatusUpdatedAt: Date | null;
|
|
65
55
|
/** Product version when it is legacy */
|
|
66
56
|
legacyVersion: string | null;
|
|
67
|
-
/**
|
|
68
|
-
|
|
69
|
-
/**
|
|
57
|
+
/** Whether the plan can be changed without contacting sales */
|
|
58
|
+
isPriceSelfServe: boolean;
|
|
59
|
+
/** Whether the plan is charged as a flat fee instead of per seat */
|
|
60
|
+
isPriceFixed: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* List of features available to this product price
|
|
63
|
+
* @deprecated Plan copy is hardcoded on the frontend now
|
|
64
|
+
*/
|
|
70
65
|
stripeProductFeatures: Array<string>;
|
|
71
|
-
/**
|
|
66
|
+
/**
|
|
67
|
+
* List of additional features available to this product price
|
|
68
|
+
* @deprecated Plan copy is hardcoded on the frontend now
|
|
69
|
+
*/
|
|
72
70
|
stripeProductAdditionalFeatures: Array<string>;
|
|
73
71
|
/** List of features defined in a machine-readable way */
|
|
74
72
|
featuresSummary: ProductFeature;
|
|
73
|
+
/** Monthly credits bought as add-ons on top of the plan */
|
|
74
|
+
additionalCredits: number;
|
|
75
75
|
creditsPrices: {
|
|
76
76
|
creditsToCentsConversionRate: number;
|
|
77
77
|
purchaseTopUpCreditsToCentsConversionRate: number;
|
|
@@ -105,7 +105,6 @@ export declare class WorkspaceSubscription {
|
|
|
105
105
|
subscriptionUpcomingChange: {
|
|
106
106
|
effectiveAt: Date;
|
|
107
107
|
fullSeatLimit: number | null;
|
|
108
|
-
builderSeatLimit: number | null;
|
|
109
108
|
additionalCredits: number | null;
|
|
110
109
|
} | null;
|
|
111
110
|
/** List of roles allowed to be invited to the workspace under this product */
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Supernova } from "../../core/SDKSupernova";
|
|
2
|
-
import { ActivityEventOptions } from "../../core/data/requests/SDKDataCoreWriteRequests";
|
|
3
2
|
import { Brand } from "../../model/base/SDKBrand";
|
|
4
3
|
import { TokenGroup } from "../../model/groups/SDKTokenGroup";
|
|
5
4
|
import { Logger } from "../../model/support/SDKLogger";
|
|
@@ -29,9 +28,7 @@ export declare class SupernovaToolsDesignTokensPlugin {
|
|
|
29
28
|
private logger;
|
|
30
29
|
constructor(designSystemId: string, versionId: string, instance: Supernova, logger?: Logger);
|
|
31
30
|
synchronizeTokensFromData(data: object, mapping: DTPluginToSupernovaMapPack, settings: DTPluginToSupernovaSettings): Promise<object>;
|
|
32
|
-
synchronizeTokensFromDataWithResults(data: object, mapping: DTPluginToSupernovaMapPack, settings: DTPluginToSupernovaSettings
|
|
33
|
-
activityEventOptions?: ActivityEventOptions;
|
|
34
|
-
}): Promise<{
|
|
31
|
+
synchronizeTokensFromDataWithResults(data: object, mapping: DTPluginToSupernovaMapPack, settings: DTPluginToSupernovaSettings): Promise<{
|
|
35
32
|
results: SupernovaToolsDesignTokensResult[];
|
|
36
33
|
logs: string[];
|
|
37
34
|
}>;
|
|
@@ -43,13 +40,13 @@ export declare class SupernovaToolsDesignTokensPlugin {
|
|
|
43
40
|
groups: Array<TokenGroup>;
|
|
44
41
|
};
|
|
45
42
|
/** Loads remote source connected to this tool, then merges tokens and groups with it, creating union. Can optionally write to the source as well */
|
|
46
|
-
mergeWithRemoteSource(processedNodes: Array<DTProcessedTokenNode>, brand: Brand, write: boolean, verbose: boolean, preciseCopy: DTPluginPreciseCopyStrategy
|
|
43
|
+
mergeWithRemoteSource(processedNodes: Array<DTProcessedTokenNode>, brand: Brand, write: boolean, verbose: boolean, preciseCopy: DTPluginPreciseCopyStrategy): Promise<{
|
|
47
44
|
tokens: Array<Token>;
|
|
48
45
|
groups: Array<TokenGroup>;
|
|
49
46
|
diff: DTTokenMergeDiff;
|
|
50
47
|
}>;
|
|
51
48
|
/** 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 */
|
|
52
|
-
mergeThemeWithRemoteSource(processedNodes: Array<DTProcessedTokenNode>, brand: Brand, theme: TokenTheme, write: boolean, verbose: boolean, preciseCopy?: DTPluginPreciseCopyStrategy, themeOverridesStrategy?: DTPluginThemeOverrideStrategy
|
|
49
|
+
mergeThemeWithRemoteSource(processedNodes: Array<DTProcessedTokenNode>, brand: Brand, theme: TokenTheme, write: boolean, verbose: boolean, preciseCopy?: DTPluginPreciseCopyStrategy, themeOverridesStrategy?: DTPluginThemeOverrideStrategy): Promise<{
|
|
53
50
|
theme: TokenTheme;
|
|
54
51
|
tokens: Array<Token>;
|
|
55
52
|
}>;
|
|
@@ -1,19 +1,27 @@
|
|
|
1
|
-
import { AnyToken, AnyDimensionToken, BlurType, BorderPosition, BorderStyle, DTProcessedTokenNode, GradientType, ShadowType, TextCase, TokenGroup, TokenTheme } from "../exports";
|
|
2
1
|
import { ElementProperty } from "../model/elements/SDKElementProperty";
|
|
2
|
+
import { BlurType } from "../model/enums/SDKBlurType";
|
|
3
|
+
import { BorderPosition } from "../model/enums/SDKBorderPosition";
|
|
4
|
+
import { BorderStyle } from "../model/enums/SDKBorderStyle";
|
|
5
|
+
import { GradientType } from "../model/enums/SDKGradientType";
|
|
6
|
+
import { ShadowType } from "../model/enums/SDKShadowType";
|
|
7
|
+
import { TextCase } from "../model/enums/SDKTextCase";
|
|
3
8
|
import { TokenType } from "../model/enums/SDKTokenType";
|
|
9
|
+
import { TokenGroup } from "../model/groups/SDKTokenGroup";
|
|
10
|
+
import { TokenTheme } from "../model/themes/SDKTokenTheme";
|
|
4
11
|
import { BlurToken } from "../model/tokens/SDKBlurToken";
|
|
5
12
|
import { BorderToken } from "../model/tokens/SDKBorderToken";
|
|
6
13
|
import { ColorToken } from "../model/tokens/SDKColorToken";
|
|
7
|
-
import { BorderWidthToken, DimensionToken, DurationToken, FontSizeToken, LetterSpacingToken, LineHeightToken, OpacityToken, ParagraphSpacingToken, RadiusToken, SizeToken, SpaceToken, ZIndexToken } from "../model/tokens/SDKDimensionToken";
|
|
14
|
+
import { AnyDimensionToken, BorderWidthToken, DimensionToken, DurationToken, FontSizeToken, LetterSpacingToken, LineHeightToken, OpacityToken, ParagraphSpacingToken, RadiusToken, SizeToken, SpaceToken, ZIndexToken } from "../model/tokens/SDKDimensionToken";
|
|
8
15
|
import { GradientToken } from "../model/tokens/SDKGradientToken";
|
|
9
16
|
import { ShadowToken } from "../model/tokens/SDKShadowToken";
|
|
10
17
|
import { FontFamilyToken, FontWeightToken, ProductCopyToken, StringCategoryToken, StringToken } from "../model/tokens/SDKStringToken";
|
|
11
18
|
import { TextCaseToken } from "../model/tokens/SDKTextCaseToken";
|
|
12
19
|
import { TextDecorationToken } from "../model/tokens/SDKTextDecorationToken";
|
|
13
20
|
import { Token } from "../model/tokens/SDKToken";
|
|
14
|
-
import { AnyMultiLayerToken, AnySingleLayerToken, AnyStringTokenValue, AnyTokenValue, BorderWidthTokenValue, ColorTokenValue, ColorValue, DimensionTokenValue, DurationTokenValue, FontFamilyTokenValue, FontSizeTokenValue, FontWeightTokenValue, LetterSpacingTokenValue, LineHeightTokenValue, OpacityTokenValue, ParagraphSpacingTokenValue, ProductCopyTokenValue, RadiusTokenValue, RawValue, SizeTokenValue, SpaceTokenValue, StringTokenValue, TextCaseTokenValue, TextDecorationTokenValue, VisibilityTokenValue, ZIndexTokenValue } from "../model/tokens/SDKTokenValue";
|
|
21
|
+
import { AnyToken, AnyMultiLayerToken, AnySingleLayerToken, AnyStringTokenValue, AnyTokenValue, BorderWidthTokenValue, ColorTokenValue, ColorValue, DimensionTokenValue, DurationTokenValue, FontFamilyTokenValue, FontSizeTokenValue, FontWeightTokenValue, LetterSpacingTokenValue, LineHeightTokenValue, OpacityTokenValue, ParagraphSpacingTokenValue, ProductCopyTokenValue, RadiusTokenValue, RawValue, SizeTokenValue, SpaceTokenValue, StringTokenValue, TextCaseTokenValue, TextDecorationTokenValue, VisibilityTokenValue, ZIndexTokenValue } from "../model/tokens/SDKTokenValue";
|
|
15
22
|
import { TypographyToken } from "../model/tokens/SDKTypographyToken";
|
|
16
23
|
import { VisibilityToken } from "../model/tokens/SDKVisibilityToken";
|
|
24
|
+
import { DTProcessedTokenNode } from "../tools/design-tokens/utilities/SDKDTJSONConverter";
|
|
17
25
|
type TokenMapCompletenessTypeCheck<T extends Record<TokenType, AnyToken>> = T;
|
|
18
26
|
type ActualTypeToTokenMap = {
|
|
19
27
|
[TokenType.color]: ColorToken;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supernova-studio/supernova-sdk-beta",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.2",
|
|
4
4
|
"description": "Supernova.io SDK",
|
|
5
5
|
"main": "./build/supernova-sdk-typescript.js",
|
|
6
6
|
"types": "./build/types/index.d.ts",
|
|
@@ -26,7 +26,6 @@
|
|
|
26
26
|
"build": "Clean and rebuild the project",
|
|
27
27
|
"test": "Lint and unit test the project",
|
|
28
28
|
"watch": "Watch and rebuild the project on save, then rerun relevant tests",
|
|
29
|
-
"cov": "Rebuild, run tests, then create and open the coverage report",
|
|
30
29
|
"doc": "Generate HTML API documentation and open it in a browser",
|
|
31
30
|
"doc:json": "Generate API documentation in typedoc JSON format",
|
|
32
31
|
"version": "Bump package.json version, update CHANGELOG.md, tag release",
|
|
@@ -38,54 +37,37 @@
|
|
|
38
37
|
"node": ">=18"
|
|
39
38
|
},
|
|
40
39
|
"dependencies": {
|
|
41
|
-
"async-mutex": "0.3.2",
|
|
42
|
-
"color-string": "1.9.1",
|
|
43
40
|
"color2k": "2.0.4",
|
|
44
41
|
"fuse.js": "6.6.2",
|
|
45
42
|
"lodash": "4.18.1",
|
|
46
|
-
"parse-color": "1.0.0",
|
|
47
43
|
"tinycolor2": "1.6.0",
|
|
48
44
|
"uuid": "14.0.0",
|
|
45
|
+
"zod": "4.4.3",
|
|
49
46
|
"@supernova-studio/client": "1.96.10",
|
|
50
47
|
"@supernova-studio/model": "1.96.10"
|
|
51
48
|
},
|
|
52
49
|
"devDependencies": {
|
|
53
|
-
"@istanbuljs/nyc-config-typescript": "0.1.3",
|
|
54
50
|
"@types/lodash": "4.17.24",
|
|
55
|
-
"@types/parse-color": "1.0.3",
|
|
56
51
|
"@types/tinycolor2": "1.4.6",
|
|
57
52
|
"dotenv": "16.0.3",
|
|
58
|
-
"esm": "3.2.25",
|
|
59
|
-
"nyc": "17.1.0",
|
|
60
53
|
"readable-stream": "4.7.0",
|
|
61
|
-
"trash-cli": "5.0.0",
|
|
62
54
|
"ts-loader": "9.6.2",
|
|
63
55
|
"tsconfig-paths-webpack-plugin": "4.2.0",
|
|
64
|
-
"tsx": "4.19.3",
|
|
65
56
|
"vitest": "4.1.4",
|
|
66
57
|
"webpack": "5.108.4",
|
|
67
58
|
"webpack-cli": "6.0.1",
|
|
68
59
|
"webpack-node-externals": "3.0.0",
|
|
69
|
-
"@supernovaio/
|
|
70
|
-
"
|
|
71
|
-
},
|
|
72
|
-
"config": {},
|
|
73
|
-
"nyc": {
|
|
74
|
-
"extends": "@istanbuljs/nyc-config-typescript",
|
|
75
|
-
"exclude": [
|
|
76
|
-
"**/*.spec.js"
|
|
77
|
-
]
|
|
60
|
+
"@supernovaio/lint-rules": "0.0.0",
|
|
61
|
+
"@supernovaio/typescript-with-config": "1.3.28"
|
|
78
62
|
},
|
|
79
63
|
"optionalDependencies": {
|
|
80
64
|
"@rollup/rollup-darwin-x64": "4.59.0"
|
|
81
65
|
},
|
|
82
66
|
"scripts": {
|
|
83
67
|
"build:production": "pnpm clean && webpack --mode production --config ./webpack.config.sdk.js && pnpm build:types",
|
|
84
|
-
"build:types": "tsc --noCheck --declaration --emitDeclarationOnly --declarationMap false --skipLibCheck --module CommonJS --target ES2020 --moduleResolution
|
|
68
|
+
"build:types": "tsc --ignoreConfig --strict false --noCheck --declaration --emitDeclarationOnly --declarationMap false --skipLibCheck --module CommonJS --target ES2020 --moduleResolution bundler --esModuleInterop --outDir build/types src/index.ts",
|
|
85
69
|
"build-sdk": "pnpm build:production",
|
|
86
|
-
"clean": "
|
|
87
|
-
"lint": "eslint 'src/**/*.ts*'",
|
|
88
|
-
"lint:fix": "eslint 'src/**/*.ts*' --fix",
|
|
70
|
+
"clean": "rm -rf build",
|
|
89
71
|
"test": "pnpm test:unit",
|
|
90
72
|
"test:unit": "vitest run --config vitest.config.ts --reporter verbose",
|
|
91
73
|
"test:watch": "vitest --config vitest.config.ts --watch",
|