@supernova-studio/supernova-sdk-beta 2.2.7 → 2.2.50

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.
Files changed (131) hide show
  1. package/README.md +8 -12
  2. package/build/sdk-typescript/src/core/SDKSupernova.d.ts +18 -6
  3. package/build/sdk-typescript/src/core/areas/SDKAreaDataSources.d.ts +12 -14
  4. package/build/sdk-typescript/src/core/areas/SDKAreaDocumentation.d.ts +3 -1
  5. package/build/sdk-typescript/src/core/areas/SDKAreaMCP.d.ts +24 -0
  6. package/build/sdk-typescript/src/core/areas/SDKAreaMe.d.ts +3 -1
  7. package/build/sdk-typescript/src/core/areas/SDKAreaMessaging.d.ts +60 -0
  8. package/build/sdk-typescript/src/core/areas/SDKAreaProjects.d.ts +2120 -64
  9. package/build/sdk-typescript/src/core/areas/SDKAreaRawData.d.ts +2049 -7
  10. package/build/sdk-typescript/src/core/areas/SDKAreaRelay.d.ts +61 -0
  11. package/build/sdk-typescript/src/core/areas/SDKAreaResources.d.ts +83 -1
  12. package/build/sdk-typescript/src/core/areas/SDKAreaThreads.d.ts +81 -0
  13. package/build/sdk-typescript/src/core/areas/SDKAreaTokens.d.ts +3 -1
  14. package/build/sdk-typescript/src/core/areas/SDKAreaWorkspaces.d.ts +71 -16
  15. package/build/sdk-typescript/src/core/data/SDKDataBridge.d.ts +9 -5
  16. package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +2350 -73
  17. package/build/sdk-typescript/src/core/data/SDKDataCoreCached.d.ts +50 -0
  18. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreAIRequests.d.ts +19 -27
  19. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +1080 -36
  20. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +2201 -37
  21. package/build/sdk-typescript/src/core/resolvers/SDKDocsEntityItemResolver.d.ts +9 -9
  22. package/build/sdk-typescript/src/exports-pulsar.d.ts +0 -2
  23. package/build/sdk-typescript/src/exports.d.ts +38 -6
  24. package/build/sdk-typescript/src/model/base/SDKDesignSystemVersionStats.d.ts +1 -0
  25. package/build/sdk-typescript/src/model/components/SDKDesignComponentBase.d.ts +1 -0
  26. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/do-dont-guidelines/SDKDocsBlockActualDoDontGuidelines.d.ts +18 -0
  27. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/embed/SDKDocsBlockActualEmbed.d.ts +10 -0
  28. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/embed-figma/SDKDocsBlockActualEmbedFigma.d.ts +10 -0
  29. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/embed-youtube/SDKDocsBlockActualEmbedYoutube.d.ts +10 -0
  30. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/files/SDKDocsBlockActualFiles.d.ts +16 -0
  31. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/image/SDKDocsBlockActualImage.d.ts +10 -0
  32. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualDoDontGuidelines.d.ts +8 -0
  33. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualEmbed.d.ts +6 -0
  34. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualEmbedFigma.d.ts +6 -0
  35. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualEmbedYoutube.d.ts +6 -0
  36. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualFiles.d.ts +6 -0
  37. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualImage.d.ts +6 -0
  38. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualShortcutLinks.d.ts +8 -0
  39. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/shortcut-links/SDKDocsBlockActualShortcutLinks.d.ts +10 -0
  40. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockCodeProperty.d.ts +3 -1
  41. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockEmbedUrlProperty.d.ts +2 -0
  42. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockFileProperty.d.ts +22 -0
  43. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockImageProperty.d.ts +3 -0
  44. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockTextProperty.d.ts +2 -0
  45. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockFigmaComponentPropsTable.d.ts +11 -0
  46. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockFigmaComponents.d.ts +11 -0
  47. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockFigmaComponentsConfig.d.ts +32 -0
  48. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockFiles.d.ts +22 -0
  49. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockGuideline.d.ts +25 -0
  50. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockGuidelines.d.ts +6 -0
  51. package/build/sdk-typescript/src/model/documentation/builder/SDKDocumentationLegacyBlockBuilder.d.ts +1 -1
  52. package/build/sdk-typescript/src/model/enums/SDKDesignSystemRole.d.ts +2 -1
  53. package/build/sdk-typescript/src/model/enums/SDKDocsBlockBehaviorDataType.d.ts +3 -1
  54. package/build/sdk-typescript/src/model/enums/SDKDocsBlockItemPropertyType.d.ts +3 -1
  55. package/build/sdk-typescript/src/model/enums/SDKDocumentationLegacyCalloutType.d.ts +2 -1
  56. package/build/sdk-typescript/src/model/enums/SDKDocumentationLegacyHeadingType.d.ts +3 -1
  57. package/build/sdk-typescript/src/model/enums/SDKDocumentationLegacyPageBlockType.d.ts +6 -1
  58. package/build/sdk-typescript/src/model/enums/SDKFigmaComponentPreviewContainerSize.d.ts +4 -0
  59. package/build/sdk-typescript/src/model/enums/SDKTokenType.d.ts +3 -3
  60. package/build/sdk-typescript/src/model/enums/SDKUserRole.d.ts +1 -1
  61. package/build/sdk-typescript/src/model/enums/SDKWorkspaceSeatType.d.ts +3 -0
  62. package/build/sdk-typescript/src/model/enums/SDKWorkspaceSubscriptionProduct.d.ts +7 -0
  63. package/build/sdk-typescript/src/model/enums/SDKWorkspaceSubscriptionStatus.d.ts +3 -1
  64. package/build/sdk-typescript/src/model/exporters/SDKPipeline.d.ts +1 -1
  65. package/build/sdk-typescript/src/model/exporters/exporter_builds/SDKExportDestinations.d.ts +5 -0
  66. package/build/sdk-typescript/src/model/files/SDKFileUpload.d.ts +9 -0
  67. package/build/sdk-typescript/src/model/groups/SDKTokenGroup.d.ts +1 -0
  68. package/build/sdk-typescript/src/model/mcp/SDKMCPStream.d.ts +8 -0
  69. package/build/sdk-typescript/src/model/membership/SDKMembership.d.ts +10 -6
  70. package/build/sdk-typescript/src/model/messaging/SDKChatThread.d.ts +14 -0
  71. package/build/sdk-typescript/src/model/messaging/SDKChatThreadMessage.d.ts +48 -0
  72. package/build/sdk-typescript/src/model/projects/SDKForgeAgent.d.ts +8 -0
  73. package/build/sdk-typescript/src/model/projects/SDKForgeProject.d.ts +42 -0
  74. package/build/sdk-typescript/src/model/projects/SDKForgeProjectContext.d.ts +31 -0
  75. package/build/sdk-typescript/src/model/projects/SDKForgeProjectContextOverride.d.ts +20 -0
  76. package/build/sdk-typescript/src/model/projects/SDKForgeProjectDocument.d.ts +19 -0
  77. package/build/sdk-typescript/src/model/projects/SDKForgeProjectDocumentPreview.d.ts +13 -0
  78. package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeature.d.ts +25 -0
  79. package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureArtifact.d.ts +13 -0
  80. package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureArtifactList.d.ts +7 -0
  81. package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureIteration.d.ts +13 -0
  82. package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureMessage.d.ts +26 -0
  83. package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureMessageList.d.ts +10 -0
  84. package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureMessageReaction.d.ts +9 -0
  85. package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeaturePreview.d.ts +13 -0
  86. package/build/sdk-typescript/src/model/projects/SDKForgeProjectInvitation.d.ts +12 -0
  87. package/build/sdk-typescript/src/model/projects/SDKForgeProjectMembership.d.ts +14 -0
  88. package/build/sdk-typescript/src/model/projects/SDKForgeProjectRelation.d.ts +13 -0
  89. package/build/sdk-typescript/src/model/projects/sections/SDKForgeProjectDocumentSection.d.ts +6 -0
  90. package/build/sdk-typescript/src/model/projects/sections/SDKForgeProjectFeatureSection.d.ts +6 -0
  91. package/build/sdk-typescript/src/model/projects/sections/SDKForgeProjectSection.d.ts +12 -0
  92. package/build/sdk-typescript/src/model/storybook/SDKStorybookUpdate.d.ts +17 -0
  93. package/build/sdk-typescript/src/model/support/SDKSource.d.ts +8 -1
  94. package/build/sdk-typescript/src/model/themes/SDKTokenTheme.d.ts +1 -1
  95. package/build/sdk-typescript/src/model/themes/SDKTokenThemeOverride.d.ts +1 -1
  96. package/build/sdk-typescript/src/model/threads/SDKThreadMessage.d.ts +36 -0
  97. package/build/sdk-typescript/src/model/threads/SDKThreadMessageList.d.ts +10 -0
  98. package/build/sdk-typescript/src/model/threads/SDKThreadMessageReaction.d.ts +9 -0
  99. package/build/sdk-typescript/src/model/tokens/SDKDimensionToken.d.ts +1 -1
  100. package/build/sdk-typescript/src/model/tokens/SDKStringToken.d.ts +1 -1
  101. package/build/sdk-typescript/src/model/tokens/SDKToken.d.ts +1 -0
  102. package/build/sdk-typescript/src/model/trail-events/SDKTrailEvent.d.ts +17 -0
  103. package/build/sdk-typescript/src/model/users/SDKUser.d.ts +7 -0
  104. package/build/sdk-typescript/src/model/users/SDKUserMembership.d.ts +13 -0
  105. package/build/sdk-typescript/src/model/workspaces/SDKWorkspace.d.ts +22 -9
  106. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceInvitation.d.ts +15 -9
  107. package/build/sdk-typescript/src/model/workspaces/SDKWorkspacePortalSettings.d.ts +12 -0
  108. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceProductFeatures.d.ts +2 -2
  109. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceProductPrice.d.ts +7 -0
  110. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceProfile.d.ts +8 -26
  111. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceSubscription.d.ts +72 -41
  112. package/build/sdk-typescript/src/tests/Areas/AreaRelay.spec.d.ts +1 -0
  113. package/build/sdk-typescript/src/tests/Areas/AreaThreads.spec.d.ts +1 -0
  114. package/build/sdk-typescript/src/tests/helpers.d.ts +1 -0
  115. package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTMapLoader.d.ts +1 -1
  116. package/build/sdk-typescript/src/tools/docs-block-builder/SDKDocsBlockBuilder.d.ts +13 -2
  117. package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownLinkResolver.d.ts +39 -0
  118. package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownTransform.d.ts +2 -2
  119. package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownTransformBlock.d.ts +33 -10
  120. package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownTransformUtil.d.ts +8 -3
  121. package/build/sdk-typescript/src/utils/RawUtils.d.ts +59 -3
  122. package/build/supernova-sdk-typescript.js +1 -2
  123. package/build/supernova-sdk-typescript.js.map +1 -1
  124. package/package.json +19 -29
  125. package/build/sdk-typescript/src/core/areas/SDKAreaAI.d.ts +0 -75
  126. package/build/sdk-typescript/src/model/acl/SDKAcl.d.ts +0 -51
  127. package/build/sdk-typescript/src/model/exporters/remote/SDKRemotePipelineModel.d.ts +0 -51
  128. package/build/sdk-typescript/src/model/projects/SDKProject.d.ts +0 -39
  129. package/build/sdk-typescript/src/model/projects/SDKProjectContext.d.ts +0 -47
  130. package/build/supernova-sdk-typescript.js.LICENSE.txt +0 -8
  131. /package/build/sdk-typescript/src/tests/Areas/{AreaAI.spec.d.ts → AreaMessaging.spec.d.ts} +0 -0
@@ -38,7 +38,7 @@ export declare class TokenThemeOverride {
38
38
  value: import("../tokens/remote/SDKRemoteTokenValue").AnyDimensionTokenRemoteValue;
39
39
  } | {
40
40
  aliasTo: string | undefined;
41
- value: string;
41
+ value: import("../tokens/remote/SDKRemoteTokenValue").StringTokenRemoteValue;
42
42
  } | {
43
43
  aliasTo: string | undefined;
44
44
  value: import("../tokens/remote/SDKRemoteTokenValue").TypographyTokenRemoteValue;
@@ -0,0 +1,36 @@
1
+ import { DTOThreadMessage } from "@supernova-studio/client";
2
+ export declare class ThreadMessage {
3
+ id: string;
4
+ sender: {
5
+ type: "User";
6
+ userId: string;
7
+ } | {
8
+ type: "Agent";
9
+ agentType: "Ask" | "Document" | "Prototype" | "ReleaseNotes";
10
+ } | {
11
+ type: "System";
12
+ onBehalfOfUserId: string;
13
+ };
14
+ body: string;
15
+ isPrompt: boolean;
16
+ startsNewThread: boolean;
17
+ parentMessageId?: string;
18
+ replyToMessageId?: string;
19
+ attachments?: DTOThreadMessage["attachments"];
20
+ createdAt: Date;
21
+ updatedAt: Date | undefined;
22
+ agentResponseTrackerId?: string | null;
23
+ threadId: string;
24
+ promptMetadata?: {
25
+ forceBehavior?: {
26
+ llm?: {
27
+ model: string;
28
+ provider: "Anthropic" | "OpenAI" | "xAI" | "Google";
29
+ };
30
+ prompt?: string;
31
+ };
32
+ [key: string]: any;
33
+ };
34
+ constructor(model: DTOThreadMessage);
35
+ toRemote(): DTOThreadMessage;
36
+ }
@@ -0,0 +1,10 @@
1
+ import { DTOThreadMessageListResponse } from "@supernova-studio/client";
2
+ import { ThreadMessage } from "./SDKThreadMessage";
3
+ import { ThreadMessageReaction } from "./SDKThreadMessageReaction";
4
+ export declare class ThreadMessageList {
5
+ messages: Array<ThreadMessage>;
6
+ reactions: Array<ThreadMessageReaction>;
7
+ lastSeenMessageId?: string;
8
+ constructor(model: DTOThreadMessageListResponse);
9
+ toRemote(): DTOThreadMessageListResponse;
10
+ }
@@ -0,0 +1,9 @@
1
+ import { DTOThreadReaction } from "@supernova-studio/client";
2
+ export declare class ThreadMessageReaction {
3
+ messageId: string;
4
+ userId: string;
5
+ emoji: string;
6
+ createdAt: Date;
7
+ constructor(model: DTOThreadReaction);
8
+ toRemote(): DTOThreadReaction;
9
+ }
@@ -75,4 +75,4 @@ export declare class ZIndexToken extends DimensionCategoryToken<ZIndexTokenValue
75
75
  tokenType: TokenType.zIndex;
76
76
  }
77
77
  export type AnyDimensionToken = DimensionToken | SizeToken | SpaceToken | OpacityToken | FontSizeToken | LineHeightToken | LetterSpacingToken | ParagraphSpacingToken | BorderWidthToken | RadiusToken | DurationToken | ZIndexToken;
78
- export declare const resolveDimension: <TK extends TokenType.radius | TokenType.borderWidth | TokenType.duration | TokenType.fontSize | TokenType.dimension | TokenType.letterSpacing | TokenType.lineHeight | TokenType.opacity | TokenType.paragraphSpacing | TokenType.size | TokenType.space | TokenType.zIndex>(type: TK) => TokenClassTypeMapToken[TK];
78
+ export declare const resolveDimension: <TK extends DimensionTokenType>(type: TK) => TokenClassTypeMapToken[TK];
@@ -32,4 +32,4 @@ export declare class FontWeightToken extends StringCategoryToken<FontWeightToken
32
32
  tokenType: TokenType.fontWeight;
33
33
  }
34
34
  export type AnyStringToken = StringToken | ProductCopyToken | FontFamilyToken | FontWeightToken;
35
- export declare const resolveString: <TK extends TokenType.fontFamily | TokenType.fontWeight | TokenType.string | TokenType.productCopy>(type: TK) => TokenClassTypeMapToken[TK];
35
+ export declare const resolveString: <TK extends StringTokenType>(type: TK) => TokenClassTypeMapToken[TK];
@@ -33,4 +33,5 @@ export declare class Token implements TokenValue {
33
33
  setSortOrder(order: number): void;
34
34
  toBaseWriteObject(): TokenRemoteModel;
35
35
  toWriteObject(): TokenRemoteModel;
36
+ copyWith<K extends "parentGroupId">(key: K, value: this[K]): this;
36
37
  }
@@ -0,0 +1,17 @@
1
+ import type { DTOTrailEvent, DTOTrailEventCreate, DTOTrailEventListInput, DTOTrailEventListResponse, DTOTrailEventType } from "@supernova-studio/client";
2
+ export type TrailEventRemoteModel = DTOTrailEvent;
3
+ export type TrailEventCreateInput = DTOTrailEventCreate;
4
+ export type TrailEventListInput = DTOTrailEventListInput;
5
+ export type TrailEventListResponse = DTOTrailEventListResponse;
6
+ export type TrailEventType = DTOTrailEventType;
7
+ export declare class TrailEvent {
8
+ id: string;
9
+ projectId: string;
10
+ type: TrailEventType;
11
+ createdAt: Date;
12
+ updatedAt: Date | undefined;
13
+ userId: string;
14
+ payload: DTOTrailEvent["payload"];
15
+ constructor(model: DTOTrailEvent);
16
+ toRemote(): DTOTrailEvent;
17
+ }
@@ -1,5 +1,7 @@
1
+ import { DTOUserEmailSettings, DTOUserUpdatePayload } from "@supernova-studio/client";
1
2
  import { UserProfile, UserProfileRemoteModel, UserProfileTransportModel, UserThemeRemoteModel } from "./SDKUserProfile";
2
3
  type UserSource = "SignUp" | "Invite" | "SSO";
4
+ export type UserUpdateModel = DTOUserUpdatePayload;
3
5
  export type UserRemoteModel = {
4
6
  id: string;
5
7
  email: string;
@@ -8,6 +10,7 @@ export type UserRemoteModel = {
8
10
  profile: UserProfileRemoteModel;
9
11
  theme?: UserThemeRemoteModel;
10
12
  linkedIntegrations?: LinkedIntegrations;
13
+ emailSettings?: UserEmailSettingsRemoteModel;
11
14
  };
12
15
  export type LinkedIntegrations = {
13
16
  figma?: UserLinkedIntegration;
@@ -24,10 +27,12 @@ type UserLinkedIntegration = {
24
27
  avatarUrl?: string;
25
28
  customUrl?: string;
26
29
  };
30
+ export type UserEmailSettingsRemoteModel = DTOUserEmailSettings;
27
31
  export type UserTransportModel = Pick<User, "id" | "email" | "source"> & {
28
32
  createdAt: string;
29
33
  profile: UserProfileTransportModel;
30
34
  linkedIntegrations?: LinkedIntegrations;
35
+ emailSettings?: UserEmailSettingsRemoteModel;
31
36
  };
32
37
  export type UserAvatarUpdateModel = {
33
38
  avatar?: string;
@@ -45,6 +50,8 @@ export declare class User {
45
50
  source: UserSource | null;
46
51
  /** Linked integrations */
47
52
  linkedIntegrations: LinkedIntegrations | null;
53
+ /** Email settings */
54
+ emailSettings: UserEmailSettingsRemoteModel | null;
48
55
  constructor(model: UserRemoteModel);
49
56
  /** Constructs representation that can be used to write full object to remote */
50
57
  toRemote(): UserRemoteModel;
@@ -1,9 +1,13 @@
1
1
  import { UserRole } from "../enums/SDKUserRole";
2
+ import { WorkspaceSeatType } from "../enums/SDKWorkspaceSeatType";
2
3
  import { User, UserRemoteModel } from "./SDKUser";
3
4
  export type UserMembershipRemoteModel = {
4
5
  user: UserRemoteModel;
5
6
  role: UserRole;
6
7
  effectiveRole: UserRole;
8
+ seatType: WorkspaceSeatType;
9
+ effectiveSeatType: WorkspaceSeatType;
10
+ isDeactivated: boolean;
7
11
  };
8
12
  export declare class UserMembership {
9
13
  /** Full user object */
@@ -15,6 +19,15 @@ export declare class UserMembership {
15
19
  * when the workspace is suspended etc.
16
20
  */
17
21
  effectiveRole: UserRole;
22
+ /** Seat of the user in the workspace. */
23
+ seatType: WorkspaceSeatType;
24
+ /**
25
+ * Effective seat of the user in the workspace, which can be different from the regular seat
26
+ * when the workspace is suspended etc.
27
+ */
28
+ effectiveSeatType: WorkspaceSeatType;
29
+ /** Whether the user is deactivated and can no longer access the workspace. */
30
+ isDeactivated: boolean;
18
31
  constructor(model: UserMembershipRemoteModel);
19
32
  /** Constructs representation that can be used to write full object to remote */
20
33
  toRemote(): UserMembershipRemoteModel;
@@ -1,17 +1,30 @@
1
- import { WorkspaceProfile, WorkspaceProfileRemoteModel, WorkspaceProfileTransportModel } from "./SDKWorkspaceProfile";
2
- export type WorkspaceRemoteModel = {
3
- id: string;
4
- profile: WorkspaceProfileRemoteModel;
5
- };
6
- export type WorkspaceTransportModel = {
7
- id: string;
8
- profile: WorkspaceProfileTransportModel;
9
- };
1
+ import { DTOWorkspace } from "@supernova-studio/client";
2
+ import { WorkspaceProfile } from "./SDKWorkspaceProfile";
3
+ export type WorkspaceRemoteModel = Pick<DTOWorkspace, "id" | "profile" | "aiFeaturesEnabled" | "aiAskFeaturesEnabled" | "aiCustomInstruction" | "projectsEnabled" | "defaultProjectRole" | "defaultProjectAccessMode">;
4
+ export type WorkspaceTransportModel = WorkspaceRemoteModel;
5
+ export type DefaultProjectRole = "Viewer" | "Builder";
6
+ export type DefaultProjectAccessMode = "Open" | "InviteOnly" | "Unlisted";
10
7
  export declare class Workspace {
11
8
  /** Unique identifier of the workspace */
12
9
  id: string;
13
10
  /** Workspace profile with all information about billing, workspace, avatars etc. */
14
11
  profile: WorkspaceProfile;
12
+ /** Whether AI features are enabled for the workspace */
13
+ aiFeaturesEnabled: boolean;
14
+ /** Whether AI Ask features (Portal) are enabled for the workspace */
15
+ aiAskFeaturesEnabled: boolean;
16
+ /** Whether AI Projects features (Portal) are enabled for the workspace */
17
+ projectsEnabled: boolean;
18
+ /** Custom instructions for AI */
19
+ aiCustomInstruction: string | null;
20
+ /**
21
+ * Default role for new projects in the workspace.
22
+ */
23
+ defaultProjectRole: DefaultProjectRole;
24
+ /**
25
+ * Default access mode for new projects in the workspace.
26
+ */
27
+ defaultProjectAccessMode: DefaultProjectAccessMode;
15
28
  constructor(model: WorkspaceRemoteModel);
16
29
  /** Constructs representation that can be used to write full object to remote */
17
30
  toRemote(): WorkspaceRemoteModel;
@@ -1,13 +1,7 @@
1
+ import { DTOWorkspaceInvitation } from "@supernova-studio/client";
1
2
  import { UserRole } from "../enums/SDKUserRole";
2
- export type WorkspaceInvitationRemoteModel = {
3
- id: string;
4
- email: string;
5
- createdAt: string;
6
- resentAt?: string;
7
- role: UserRole;
8
- workspaceId: string;
9
- invitedBy: string;
10
- };
3
+ import { WorkspaceSeatType } from "../enums/SDKWorkspaceSeatType";
4
+ export type WorkspaceInvitationRemoteModel = DTOWorkspaceInvitation;
11
5
  export type WorkspaceInvitationTransportModel = WorkspaceInvitationRemoteModel;
12
6
  export type WorkspaceInvitationUpdateModel = {
13
7
  email: string;
@@ -24,6 +18,18 @@ export declare class WorkspaceInvitation {
24
18
  resentAt: Date | null;
25
19
  /** Role assigned to the user being invited */
26
20
  role: UserRole;
21
+ /**
22
+ * Effective role of the user in the workspace, which can be different from the regular role
23
+ * e.g., when the workspace is suspended.
24
+ */
25
+ effectiveRole: UserRole;
26
+ /** Seat assigned to the user being invited */
27
+ seatType: WorkspaceSeatType;
28
+ /**
29
+ * Effective seat type of the invitation in the workspace, which can be different from the regular role,
30
+ * e.g., when the workspace is suspended.
31
+ */
32
+ effectiveSeatType: WorkspaceSeatType;
27
33
  /** ID of the workspace associated with the invitation */
28
34
  workspaceId: string;
29
35
  /** User who sent the invitation */
@@ -0,0 +1,12 @@
1
+ import { DTOPortalSettings, DTOPortalSettingsTheme, DTOPortalSettingsSidebar, DTOPortalSettingsUpdatePayload } from "@supernova-studio/client";
2
+ export type PortalSettingsRemoteModel = DTOPortalSettings;
3
+ export type PortalSettingsUpdateRemoteModel = DTOPortalSettingsUpdatePayload;
4
+ export declare class PortalSettings {
5
+ id: string;
6
+ workspaceId: string;
7
+ enabledDesignSystemIds: Array<string>;
8
+ enabledBrandPersistentIds: Array<string>;
9
+ theme?: DTOPortalSettingsTheme;
10
+ sidebar?: DTOPortalSettingsSidebar;
11
+ constructor(model: DTOPortalSettings);
12
+ }
@@ -9,8 +9,8 @@ export type ProductFeature = {
9
9
  export type SubscriptionProductFeaturesRemoteModel = {
10
10
  free: ProductFeature;
11
11
  team: ProductFeature;
12
- team_test: ProductFeature;
13
12
  company: ProductFeature;
13
+ pro: ProductFeature;
14
14
  enterprise: ProductFeature;
15
15
  };
16
16
  export type FeaturePermissionResolution = {
@@ -25,8 +25,8 @@ export type FeaturePermissionResolution = {
25
25
  export declare class SubscriptionProductFeatures {
26
26
  free: ProductFeature;
27
27
  team: ProductFeature;
28
- team_test: ProductFeature;
29
28
  company: ProductFeature;
29
+ pro: ProductFeature;
30
30
  enterprise: ProductFeature;
31
31
  constructor(model: SubscriptionProductFeaturesRemoteModel);
32
32
  }
@@ -1,3 +1,4 @@
1
+ import { WorkspaceSeatType } from "../enums/SDKWorkspaceSeatType";
1
2
  import { WorkspaceSubscriptionPlanInterval } from "../enums/SDKWorkspaceSubscriptionPlanInterval";
2
3
  export type WorkspaceProductPriceRemoteModel = {
3
4
  stripePriceId: string;
@@ -7,9 +8,11 @@ export type WorkspaceProductPriceRemoteModel = {
7
8
  stripeProductAdditionalFeatures: Array<string>;
8
9
  active: boolean;
9
10
  amount: number;
11
+ seatType?: WorkspaceSeatType;
10
12
  interval: WorkspaceSubscriptionPlanInterval;
11
13
  isPricePerCreator: boolean;
12
14
  legacyVersion?: string;
15
+ monthlyCreditGrant?: number;
13
16
  };
14
17
  export type WorkspaceProductPriceTransportModel = WorkspaceProductPriceRemoteModel;
15
18
  export declare class WorkspaceProductPrice {
@@ -27,12 +30,16 @@ export declare class WorkspaceProductPrice {
27
30
  active: boolean;
28
31
  /** The amount to be charged for the product, in the smallest currency unit (e.g., cents) */
29
32
  amount: number;
33
+ /** The matching seat (builder or full). Omitted for free plans */
34
+ seatType?: WorkspaceSeatType;
30
35
  /** The billing interval (e.g., monthly, yearly) */
31
36
  interval: WorkspaceSubscriptionPlanInterval;
32
37
  /** Indicates whether the price is per creator (self-serve) or not */
33
38
  isPricePerCreator: boolean;
34
39
  /** An optional legacy version identifier, if applicable */
35
40
  legacyVersion?: string | null;
41
+ /** The number of credits to be granted per month by this price */
42
+ monthlyCreditGrant: number | null;
36
43
  constructor(model: WorkspaceProductPriceRemoteModel);
37
44
  toRemote(): WorkspaceProductPriceRemoteModel;
38
45
  toTransport(): WorkspaceProductPriceTransportModel;
@@ -1,27 +1,5 @@
1
- export type WorkspaceProfileRemoteModel = {
2
- name: string;
3
- color: string;
4
- billingDetails?: WorkspaceProfileBillingDetailsRemoteModel;
5
- avatar?: string;
6
- };
7
- export type WorkspaceProfileBillingDetailsRemoteModel = {
8
- firstName?: string;
9
- lastName?: string;
10
- email?: string;
11
- companyName?: string;
12
- companyId?: string;
13
- notes?: string;
14
- vat?: string;
15
- address?: WorkspaceProfileAddressRemoteModel;
16
- };
17
- export type WorkspaceProfileAddressRemoteModel = {
18
- postal?: string;
19
- street1?: string;
20
- street2?: string;
21
- city?: string;
22
- country?: string;
23
- state?: string;
24
- };
1
+ import type { DTOWorkspaceProfile } from "@supernova-studio/client";
2
+ export type WorkspaceProfileRemoteModel = DTOWorkspaceProfile;
25
3
  export type WorkspaceProfileTransportModel = WorkspaceProfileRemoteModel;
26
4
  export type WorkspaceProfileUpdateModel = {
27
5
  name: string;
@@ -34,10 +12,13 @@ export declare class WorkspaceProfile {
34
12
  color: string;
35
13
  /** Workspace avatar URL */
36
14
  avatar: string | null;
15
+ /**
16
+ * @deprecated
17
+ * Not used anymore, will be removed in the future.
18
+ * */
19
+ handle: string;
37
20
  /** Workspace billing details object */
38
21
  billingDetails: {
39
- firstName: string | null;
40
- lastName: string | null;
41
22
  address: {
42
23
  postal: string | null;
43
24
  street1: string | null;
@@ -51,6 +32,7 @@ export declare class WorkspaceProfile {
51
32
  companyId: string | null;
52
33
  notes: string | null;
53
34
  vat: string | null;
35
+ poNumber: string | null;
54
36
  } | null;
55
37
  constructor(model: WorkspaceProfileRemoteModel);
56
38
  /** Constructs directly manipulable update object for workspace profile */
@@ -1,56 +1,47 @@
1
+ import { DTOSubscriptionResponse, DTOSubscriptionUpdateInput, DTOSubscriptionUpdatePreview } from "@supernova-studio/client";
1
2
  import { WorkspaceSubscriptionPlanInterval } from "../enums/SDKWorkspaceSubscriptionPlanInterval";
2
3
  import { WorkspaceSubscriptionProductCode } from "../enums/SDKWorkspaceSubscriptionProduct";
3
4
  import { WorkspaceSubscriptionStatus } from "../enums/SDKWorkspaceSubscriptionStatus";
4
5
  import { ProductFeature } from "./SDKWorkspaceProductFeatures";
5
- export type WorkspaceSubscriptionRemoteModel = {
6
- status: WorkspaceSubscriptionStatus;
7
- seatLimit: number;
8
- seats: number;
9
- product: WorkspaceSubscriptionProductCode;
10
- planInterval: WorkspaceSubscriptionPlanInterval;
11
- planPriceId: string;
12
- stripeCustomerId?: string;
13
- stripeSubscriptionId?: string;
14
- card?: WorkspaceSubscriptionCardRemoteModel;
15
- currentPeriodStart?: string;
16
- currentPeriodEnd?: string;
17
- amount: number;
18
- stripeProductDescription: string;
19
- subscriptionStatusUpdatedAt?: string;
20
- legacyVersion?: number;
21
- isPricePerCreator: boolean;
22
- stripeProductFeatures: Array<string>;
23
- stripeProductAdditionalFeatures: Array<string>;
24
- featuresSummary: ProductFeature;
25
- };
26
- export type WorkspaceSubscriptionCardRemoteModel = {
27
- last4?: string;
28
- expiryMonth?: string;
29
- expiryYear?: string;
30
- brand?: string;
31
- };
6
+ export type WorkspaceSubscriptionRemoteModel = DTOSubscriptionResponse;
32
7
  export type WorkspaceSubscriptionTransportModel = WorkspaceSubscriptionRemoteModel;
33
- export type WorkspaceSubscriptionUpdateModel = {
34
- priceId: string;
35
- numberOfSeats: number;
36
- };
8
+ export type WorkspaceSubscriptionUpdateModel = DTOSubscriptionUpdateInput;
9
+ export type WorkspaceSubscriptionUpdatePreviewModel = DTOSubscriptionUpdatePreview;
37
10
  export declare class WorkspaceSubscription {
38
11
  /** Main status of the workspace subscription */
39
12
  status: WorkspaceSubscriptionStatus;
40
- /** Maximum seats workspace can have assigned. This limits number of editors+ only, visitors are always unlimited */
41
- seatLimit: number;
42
- /** Current amount of seats workspace uses */
43
- seats: number;
13
+ /** Maximum number of Builders seats */
14
+ builderSeatLimit: number;
15
+ /** Current number of Builder seats the workspace uses */
16
+ builderSeats: number;
17
+ /** Maximum number of DSM (Full) seats */
18
+ fullSeatLimit: number;
19
+ /** Current number of DSM (Full) seats the workspace uses */
20
+ fullSeats: number;
44
21
  /** Subscription tier */
45
22
  product: WorkspaceSubscriptionProductCode;
46
23
  /** Subscription cycle interval */
47
24
  planInterval: WorkspaceSubscriptionPlanInterval;
48
- /** Subscription price id */
49
- planPriceId: string;
25
+ /** Trial, mostly used for Enterprise plans */
26
+ isTrial: boolean;
27
+ /**
28
+ * Stripe price id for a Full seat.
29
+ */
30
+ fullSeatPriceId: string;
31
+ /**
32
+ * Stripe price id for a Builder seat.
33
+ * Can be optional if no Builder subscription was created on Stripe (e.g., on legacy plans).
34
+ */
35
+ builderSeatPriceId: string | null;
50
36
  /** Starting date of the current billing cycle */
51
37
  currentPeriodStart: Date | null;
52
38
  /** Ending date of the current billing cycle */
53
39
  currentPeriodEnd: Date | null;
40
+ /**
41
+ * Only available if the subscription is still active but scheduled to be canceled.
42
+ * Also used to check for this particular status, as we are still getting `status: active` in that case.
43
+ */
44
+ cancelAt: Date | null;
54
45
  /** Stripe customer ID. Note: visible only for Owner and Admin role */
55
46
  stripeCustomerId: string | null;
56
47
  /** Stripe subscription ID. Note: visible only for Owner and Admin role */
@@ -65,11 +56,11 @@ export declare class WorkspaceSubscription {
65
56
  /** Price of the subscription, in the smallest currency unit (e.g., cents) */
66
57
  amount: number;
67
58
  /** Product description */
68
- stripeProductDescription: string;
59
+ stripeProductDescription: string | null;
69
60
  /** Date when subscription status was updated */
70
61
  subscriptionStatusUpdatedAt: Date | null;
71
62
  /** Product version when it is legacy */
72
- legacyVersion: number | null;
63
+ legacyVersion: string | null;
73
64
  /** Indicates whether the price is per creator (self-serve) or not */
74
65
  isPricePerCreator: boolean;
75
66
  /** List of features available to this product price */
@@ -78,8 +69,48 @@ export declare class WorkspaceSubscription {
78
69
  stripeProductAdditionalFeatures: Array<string>;
79
70
  /** List of features defined in a machine-readable way */
80
71
  featuresSummary: ProductFeature;
72
+ creditsPrices: {
73
+ creditsToCentsConversionRate: number;
74
+ purchaseTopUpCreditsToCentsConversionRate: number;
75
+ };
76
+ creditBalance: {
77
+ free: {
78
+ credits: {
79
+ total: number;
80
+ used: number;
81
+ balance: number;
82
+ resetAt: Date | null;
83
+ };
84
+ spendingLimit: {
85
+ total: number;
86
+ used: number;
87
+ balance: number;
88
+ resetAt: Date | null;
89
+ };
90
+ } | null;
91
+ /** Paid top-up credits balance */
92
+ paidTopUp: {
93
+ total: number;
94
+ used: number;
95
+ balance: number;
96
+ } | null;
97
+ /** Paid recurring credits balance */
98
+ paidRecurring: {
99
+ total: number;
100
+ used: number;
101
+ balance: number;
102
+ resetAt: Date | null;
103
+ } | null;
104
+ } | null;
105
+ /**
106
+ * Description of what the subscription will change to in the next billing cycle.
107
+ */
108
+ subscriptionUpcomingChange: {
109
+ effectiveAt: Date;
110
+ fullSeatLimit: number | null;
111
+ builderSeatLimit: number | null;
112
+ additionalCredits: number | null;
113
+ } | null;
81
114
  constructor(model: WorkspaceSubscriptionRemoteModel);
82
- toRemote(): WorkspaceSubscriptionRemoteModel;
83
- toTransport(): WorkspaceSubscriptionTransportModel;
84
115
  static fromTransport(model: WorkspaceSubscriptionTransportModel): WorkspaceSubscription;
85
116
  }
@@ -4,6 +4,7 @@ import { TestContext, TestFunction } from "vitest";
4
4
  export declare const testInstance: Supernova;
5
5
  export declare const testVersionIdentifier: RemoteVersionIdentifier;
6
6
  export declare const testWorkspaceVersionIdentifier: RemoteWorkspaceVersionIdentifier;
7
+ export declare const testAIWorkspaceVersionIdentifier: RemoteWorkspaceVersionIdentifier;
7
8
  export declare const randomAlphabeticalOnlyIdentifier: (length: number) => string;
8
9
  export declare const randomNumberInRange: (min: number, max: number) => number;
9
10
  export declare const testRetryBefore: (beforeFn?: (ctx: any) => Promise<any>) => (name: string, assertFn: TestFunction<TestContext & object>) => void;
@@ -15,7 +15,7 @@ export declare enum DTPluginPreciseCopyStrategy {
15
15
  deleteAll = "deleteAll",// preciseCopy = true
16
16
  keepManualTokens = "keepManualTokens"
17
17
  }
18
- export declare const isPreciseCopyEnabled: (preciseCopy: DTPluginPreciseCopyStrategy) => boolean;
18
+ export declare const isPreciseCopyEnabled: (preciseCopy: DTPluginPreciseCopyStrategy) => preciseCopy is DTPluginPreciseCopyStrategy.deleteAll | DTPluginPreciseCopyStrategy.keepManualTokens;
19
19
  export declare const toPreciseCopyStrategy: (preciseCopy?: boolean | DTPluginPreciseCopyStrategy) => DTPluginPreciseCopyStrategy;
20
20
  export type DTPluginToSupernovaMap = {
21
21
  type: DTPluginToSupernovaMapType;
@@ -14,9 +14,10 @@ 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
- import { DocsBlockMultiRichTextPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockMultiRichTextProperty";
20
+ import { DocsBlockMultiRichTextPropertyDefinition, DocsBlockMultiRichTextPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockMultiRichTextProperty";
20
21
  import { DocsBlockMultiSelectPropertyDefinition, DocsBlockMultiSelectPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockMultiSelectProperty";
21
22
  import { DocsBlockNumberPropertyDefinition, DocsBlockNumberPropertyOptions } from "../../model/docs/blocks/properties/SDKDocsBlockNumberProperty";
22
23
  import { DocsBlockItemPropertyAnyDefinition } from "../../model/docs/blocks/properties/SDKDocsBlockProperty";
@@ -204,7 +205,7 @@ export declare class DocsBlockBuilder {
204
205
  variants?: {
205
206
  [key: string]: DocsBlockMultiRichTextPropertyOptions;
206
207
  };
207
- }): DocsBlockRichTextPropertyDefinition;
208
+ }): DocsBlockMultiRichTextPropertyDefinition;
208
209
  /** Create a block property with type .multiRichText and its specific options */
209
210
  richTextEditorProperty(configuration: {
210
211
  id: string;
@@ -435,4 +436,14 @@ export declare class DocsBlockBuilder {
435
436
  [key: string]: DocsBlockDividerPropertyOptions;
436
437
  };
437
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;
438
449
  }
@@ -0,0 +1,39 @@
1
+ import { Supernova } from "../../core/SDKSupernova";
2
+ import { DocumentationLegacyGroup } from "../../model/documentation/SDKDocumentationLegacyGroup";
3
+ import { DocumentationLegacyPage } from "../../model/documentation/SDKDocumentationLegacyPage";
4
+ import { MarkdownTransformBlockConfig } from "./SDKToolsMarkdownTransformBlock";
5
+ /** Utility class for resolving links in markdown transformation */
6
+ export declare class MarkdownLinkResolver {
7
+ private documentationData;
8
+ private config;
9
+ private sdkInstance;
10
+ private designSystemId;
11
+ private versionId;
12
+ private cachedDocumentationBaseUrl;
13
+ constructor(documentationData: {
14
+ rootGroup: DocumentationLegacyGroup;
15
+ allPages: Array<DocumentationLegacyPage>;
16
+ allGroups: Array<DocumentationLegacyGroup>;
17
+ }, config: MarkdownTransformBlockConfig, sdkInstance: Supernova, designSystemId: string, versionId: string);
18
+ /**
19
+ * Resolves a link based on external URL or internal documentation item ID
20
+ * @param externalUrl - Direct external URL if available
21
+ * @param documentationItemId - Internal documentation item ID if available
22
+ * @param pageContext - Current page context for relative path resolution
23
+ * @returns Promise<string> - Resolved URL
24
+ */
25
+ resolveLink(externalUrl: string | null, documentationItemId: string | null, pageContext: DocumentationLegacyPage): Promise<string>;
26
+ /**
27
+ * Generates relative path from current page to target page
28
+ * @param targetPage - Page to link to
29
+ * @param currentPage - Current page context
30
+ * @returns string - Relative path
31
+ */
32
+ private relativePathToPage;
33
+ /**
34
+ * Retrieves the base documentation URL for deployed documentation
35
+ * Uses caching to avoid repeated API calls
36
+ * @returns string | null - Base documentation URL or null if not available
37
+ */
38
+ private getDocumentationBaseUrl;
39
+ }
@@ -1,7 +1,7 @@
1
1
  import { Supernova } from "../../core/SDKSupernova";
2
2
  import { DocumentationLegacyPage } from "../../model/documentation/SDKDocumentationLegacyPage";
3
3
  import { DocumentationLegacyPageBlockType } from "../../model/enums/SDKDocumentationLegacyPageBlockType";
4
- import { MarkdownTransformBlock } from "./SDKToolsMarkdownTransformBlock";
4
+ import { MarkdownTransformBlock, MarkdownTransformBlockConfig } from "./SDKToolsMarkdownTransformBlock";
5
5
  /** Output markdown mode. Commonmark and GitHub is currently supported */
6
6
  export declare enum MarkdownTransformType {
7
7
  commonmark = "commonmark",
@@ -11,7 +11,7 @@ export declare enum MarkdownTransformType {
11
11
  export declare class MarkdownTransform {
12
12
  conversionType: MarkdownTransformType;
13
13
  blockTransformer: MarkdownTransformBlock;
14
- constructor(type: MarkdownTransformType, instance: Supernova, designSystemId: string, workspaceId: string, versionId: string);
14
+ constructor(type: MarkdownTransformType, instance: Supernova, designSystemId: string, workspaceId: string, versionId: string, config?: MarkdownTransformBlockConfig);
15
15
  /** Converts entire definition of the page, including its metadata like title and description, to markdown */
16
16
  convertPageToMarkdown(page: DocumentationLegacyPage): Promise<string>;
17
17
  /** Creates flattened structure of the blocks, even from the contained blocks, so it is easier to iterate through them */