@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
@@ -0,0 +1,61 @@
1
+ import { DataCore } from "../data/SDKDataCore";
2
+ import { RemoteWorkspaceVersionIdentifier } from "./SDKRemoteIdentifiers";
3
+ export declare enum AIGetRouteQueryTask {
4
+ amy = "amy",
5
+ agent = "agent"
6
+ }
7
+ export declare enum AIAgentPersona {
8
+ cody = "cody"
9
+ }
10
+ export declare enum RelaySummarizeStrategy {
11
+ noun = "noun",
12
+ verb = "verb"
13
+ }
14
+ export declare class AreaRelay {
15
+ /** Internal: Engine */
16
+ private dataCore;
17
+ constructor(dataCore: DataCore);
18
+ /** Answer questions and/or chat about product-development topics with full knowledge of your product development data.
19
+ * @param from - Version identifier
20
+ * @param prompt - Question to answer
21
+ * @param options - Answering options
22
+ * @returns Readable stream of amy's response
23
+ */
24
+ invokeAmy(prompt: string, chatId: string, context: RemoteWorkspaceVersionIdentifier & {
25
+ brandId?: string;
26
+ }, promptMetadata?: {
27
+ forceBehavior?: {
28
+ llm?: {
29
+ model: string;
30
+ provider: "Anthropic" | "OpenAI" | "xAI" | "Google";
31
+ };
32
+ prompt?: string;
33
+ };
34
+ [key: string]: any;
35
+ }): Promise<ReadableStreamDefaultReader<Uint8Array>>;
36
+ /** Execute specific agent on top of a already existing project.
37
+ * @param prompt - User instruction that tells agent what to do
38
+ * @param projectId - Project identifier (note the project must be already created)
39
+ * @param branchId - Optional branch identifier (if not provided, the default branch will be used)
40
+ * @returns Readable stream of the agent's response
41
+ */
42
+ invokeAgent(agent: AIAgentPersona, prompt: string, projectId: string, branchId?: string): Promise<ReadableStreamDefaultReader<Uint8Array>>;
43
+ /** Retrieves dynamic URL for all AI tasks. Use the URL to
44
+ * @param task - Which task to retrieve URL for
45
+ * @returns Url for the task
46
+ *
47
+ */
48
+ executableTaskUrl(task: AIGetRouteQueryTask): Promise<string>;
49
+ /** Summarize text into a heavily condensed form.
50
+ * @param text - Text to summarize
51
+ * @param options - Summarization options
52
+ * @returns Object containing the original and summarized text
53
+ */
54
+ summarizeText(text: string, options?: {
55
+ maxWords?: number;
56
+ strategy?: RelaySummarizeStrategy;
57
+ }): Promise<{
58
+ enteredText: string;
59
+ summarizedText: string;
60
+ }>;
61
+ }
@@ -1,4 +1,4 @@
1
- import { DTOFigmaNode, DTOFigmaNodeV2 } from "@supernova-studio/client";
1
+ import { DTOFigmaNode, DTOFigmaNodeV2, DTOFileFinalizeBulkPayload, DTOFileUploadBulkPayload, DTOFileUploadPayload, DTOForgeProjectFileUploadPayload } from "@supernova-studio/client";
2
2
  import { DocsImageRef, ResourceAsset, ResourceFont } from "../../exports";
3
3
  import { DataCore } from "../data/SDKDataCore";
4
4
  import { RemoteVersionIdentifier } from "./SDKRemoteIdentifiers";
@@ -38,12 +38,94 @@ export declare class AreaResources {
38
38
  * @returns URL of the hosted image resource, either uploaded file or Figma frame
39
39
  */
40
40
  getImageRefHostedUrl(from: RemoteVersionIdentifier, imageRef: DocsImageRef | undefined): string | undefined;
41
+ /** Fetches all files in the version or a subset of them based on the persistentIds
42
+ * @param from - Remote version to fetch from
43
+ * @param persistentIds - Optional array of persistentIds to filter the files by
44
+ * @returns All files in the specified version or a subset of them based on the persistentIds
45
+ */
46
+ getFiles(from: RemoteVersionIdentifier): Promise<import("../../exports").RemoteFile[]>;
47
+ getProjectFiles(workspaceId: string, projectId: string): Promise<import("../../exports").RemoteFile[]>;
41
48
  /** Uploads new asset resource */
42
49
  uploadAssetResource(from: RemoteVersionIdentifier, asset: File): Promise<ResourceAsset>;
43
50
  /** Uploads new font resource */
44
51
  uploadFontResource(from: RemoteVersionIdentifier, font: File): Promise<ResourceFont | null>;
45
52
  /** Uploads new font resources */
46
53
  uploadFontResources(from: RemoteVersionIdentifier, fonts: FileList): Promise<ResourceFont[]>;
54
+ initializeFileUpload(from: RemoteVersionIdentifier, fileUploadItems: DTOFileUploadPayload["files"]): Promise<{
55
+ files: {
56
+ name: string;
57
+ url: string;
58
+ fileId: string;
59
+ size: number;
60
+ checksum: string;
61
+ referencePersistentId: string;
62
+ pendingUpload?: boolean | undefined;
63
+ }[];
64
+ uploadUrls: {
65
+ fileId: string;
66
+ uploadUrl: string;
67
+ }[];
68
+ }>;
69
+ initializeProjectFileUpload(workspaceId: string, projectId: string, fileUploadItems: DTOForgeProjectFileUploadPayload["files"]): Promise<{
70
+ files: {
71
+ id: string;
72
+ name: string;
73
+ url: string;
74
+ size: number;
75
+ checksum: string;
76
+ pendingUpload?: boolean | undefined;
77
+ }[];
78
+ uploadUrls: {
79
+ fileId: string;
80
+ uploadUrl: string;
81
+ }[];
82
+ }>;
83
+ initializeBulkFileUpload(input: DTOFileUploadBulkPayload): Promise<{
84
+ files: {
85
+ id: string;
86
+ name: string;
87
+ url: string;
88
+ storagePath: string;
89
+ size: number;
90
+ deduplicationKey: string;
91
+ source?: {
92
+ type: "UserUpload";
93
+ userId: string;
94
+ } | {
95
+ type: "Figma";
96
+ renderMode: "Image" | "HTML" | "JSON";
97
+ } | undefined;
98
+ pendingUpload?: boolean | undefined;
99
+ }[];
100
+ uploadUrls: {
101
+ fileId: string;
102
+ uploadUrl: string;
103
+ }[];
104
+ }>;
105
+ finalizeFileUpload(from: RemoteVersionIdentifier, fileIds: Array<string>): Promise<any>;
106
+ finalizeProjectFileUpload(workspaceId: string, projectId: string, fileIds: Array<string>): Promise<any>;
107
+ finalizeBulkFileUpload(input: DTOFileFinalizeBulkPayload): Promise<{
108
+ files: {
109
+ id: string;
110
+ name: string;
111
+ url: string;
112
+ storagePath: string;
113
+ size: number;
114
+ deduplicationKey: string;
115
+ source?: {
116
+ type: "UserUpload";
117
+ userId: string;
118
+ } | {
119
+ type: "Figma";
120
+ renderMode: "Image" | "HTML" | "JSON";
121
+ } | undefined;
122
+ pendingUpload?: boolean | undefined;
123
+ }[];
124
+ uploadUrls: {
125
+ fileId: string;
126
+ uploadUrl: string;
127
+ }[];
128
+ }>;
47
129
  /** Deletes single resource of any type */
48
130
  deleteResource(from: RemoteVersionIdentifier, resourceId: string): Promise<void>;
49
131
  /** Deletes multiple resource of any type */
@@ -0,0 +1,81 @@
1
+ import { DTOThreadMessageCreateInput, DTOThreadMessageFinalizeInput, DTOThreadReactionCreateInput, DTOThreadReactionDeleteInput } from "@supernova-studio/client";
2
+ import { DataCore } from "../data/SDKDataCore";
3
+ export declare class AreaThreads {
4
+ /** Internal: Engine */
5
+ private dataCore;
6
+ constructor(dataCore: DataCore);
7
+ /**
8
+ * Gets the messages for a specific thread.
9
+ * @param threadId - The ID of the thread.
10
+ * @returns An array of ThreadMessage objects.
11
+ */
12
+ getMessages(threadId: string): Promise<import("../..").ThreadMessageList>;
13
+ /**
14
+ * Creates a new message in a specific thread.
15
+ * @param threadId - The ID of the thread.
16
+ * @param input - The input for the message.
17
+ * @returns A new ThreadMessage object.
18
+ */
19
+ createMessage(threadId: string, input: DTOThreadMessageCreateInput): Promise<import("../..").ThreadMessage>;
20
+ /**
21
+ * Creates a new message reaction in a specific thread.
22
+ * @param threadId - The ID of the thread.
23
+ * @param input - The input for the message reaction.
24
+ * @returns A new ThreadMessageReaction object.
25
+ */
26
+ createMessageReaction(threadId: string, input: DTOThreadReactionCreateInput): Promise<import("../..").ThreadMessageReaction>;
27
+ /**
28
+ * Removes a message reaction from a specific thread.
29
+ * @param threadId - The ID of the thread.
30
+ * @param input - The input for the message reaction.
31
+ * @returns A new ThreadMessageReaction object.
32
+ */
33
+ removeMessageReaction(threadId: string, input: DTOThreadReactionDeleteInput): Promise<void>;
34
+ /**
35
+ * Finalizes a message in a specific thread.
36
+ * @param threadId - The ID of the thread.
37
+ * @param input - The input for the thread.
38
+ * @returns Finalize input
39
+ */
40
+ finalizeMessage(threadId: string, input: DTOThreadMessageFinalizeInput): Promise<{
41
+ message: {
42
+ id: string;
43
+ createdAt: string;
44
+ sender: {
45
+ type: "User";
46
+ userId: string;
47
+ } | {
48
+ type: "Agent";
49
+ agentType: "Ask" | "Document" | "Prototype" | "ReleaseNotes";
50
+ } | {
51
+ type: "System";
52
+ onBehalfOfUserId: string;
53
+ };
54
+ body: string;
55
+ threadId: string;
56
+ updatedAt?: string | undefined;
57
+ isPrompt?: boolean | undefined;
58
+ startsNewThread?: boolean | undefined;
59
+ parentMessageId?: string | undefined;
60
+ agentResponseTrackerId?: string | null | undefined;
61
+ attachments?: {
62
+ files?: {
63
+ id: string;
64
+ url: string;
65
+ name?: string | undefined;
66
+ source?: {
67
+ type: "UserUpload";
68
+ userId: string;
69
+ } | {
70
+ type: "Figma";
71
+ renderMode: "Image" | "HTML" | "JSON";
72
+ } | undefined;
73
+ }[] | undefined;
74
+ iterationId?: string | undefined;
75
+ } | undefined;
76
+ replyToMessageId?: string | undefined;
77
+ isRetry?: boolean | undefined;
78
+ promptMetadata?: Record<string, any> | undefined;
79
+ };
80
+ }>;
81
+ }
@@ -54,7 +54,9 @@ export declare class AreaTokens {
54
54
  * @param from - Remote version to fetch from
55
55
  * @returns All themes in the specified version
56
56
  */
57
- getTokenThemes(from: RemoteVersionIdentifier): Promise<Array<TokenTheme>>;
57
+ getTokenThemes(from: RemoteVersionIdentifier, filter?: {
58
+ brandId?: string;
59
+ }): Promise<Array<TokenTheme>>;
58
60
  /** Retrieves all remote property definitions for tokens
59
61
  * @param from - Remote version to fetch from
60
62
  * @returns All property definitions in the specified version
@@ -1,10 +1,12 @@
1
- import { DTOWorkspaceUntypedDataListResponse, DTOWorkspaceUntypedDataResponse } from "@supernova-studio/client";
2
- import { Acl } from "../../model/acl/SDKAcl";
1
+ import { DTOPortalSettingsUpdatePayload, DTOWorkspaceUntypedDataListResponse, DTOWorkspaceUntypedDataResponse } from "@supernova-studio/client";
2
+ import { WorkspaceSeatType } from "@supernova-studio/model";
3
3
  import { UserRole } from "../../model/enums/SDKUserRole";
4
+ import { WorkspaceSubscriptionPlanInterval } from "../../model/enums/SDKWorkspaceSubscriptionPlanInterval";
5
+ import { SubscriptionCheckoutProductCode } from "../../model/enums/SDKWorkspaceSubscriptionProduct";
4
6
  import { Membership } from "../../model/membership/SDKMembership";
5
7
  import { UserMembership } from "../../model/users/SDKUserMembership";
6
8
  import { UserWorkspaceNotificationSettings, UserWorkspaceNotificationSettingsUpdateModel } from "../../model/users/SDKUserWorkspaceNotificationSettings";
7
- import { Workspace } from "../../model/workspaces/SDKWorkspace";
9
+ import { DefaultProjectAccessMode, DefaultProjectRole, Workspace } from "../../model/workspaces/SDKWorkspace";
8
10
  import { WorkspaceIPWhitelistSettings, WorkspaceIPWhitelistSettingsUpdateModel } from "../../model/workspaces/SDKWorkspaceIPWhitelistSettings";
9
11
  import { WorkspaceInvitation, WorkspaceInvitationUpdateModel } from "../../model/workspaces/SDKWorkspaceInvitation";
10
12
  import { WorkspaceInvoice } from "../../model/workspaces/SDKWorkspaceInvoice";
@@ -15,7 +17,7 @@ import { WorkspaceProduct } from "../../model/workspaces/SDKWorkspaceProduct";
15
17
  import { SubscriptionProductFeatures } from "../../model/workspaces/SDKWorkspaceProductFeatures";
16
18
  import { WorkspaceProfileUpdateModel } from "../../model/workspaces/SDKWorkspaceProfile";
17
19
  import { WorkspaceSSOSettings, WorkspaceSSOSettingsUpdateModel } from "../../model/workspaces/SDKWorkspaceSSOSettings";
18
- import { WorkspaceSubscription, WorkspaceSubscriptionUpdateModel } from "../../model/workspaces/SDKWorkspaceSubscription";
20
+ import { WorkspaceSubscription, WorkspaceSubscriptionUpdateModel, WorkspaceSubscriptionUpdatePreviewModel } from "../../model/workspaces/SDKWorkspaceSubscription";
19
21
  import { DataCore } from "../data/SDKDataCore";
20
22
  export declare class AreaWorkspaces {
21
23
  /** Internal: Engine */
@@ -52,7 +54,6 @@ export declare class AreaWorkspaces {
52
54
  * @returns Product features
53
55
  */
54
56
  workspaceProductFeatures(workspaceId: string): Promise<SubscriptionProductFeatures>;
55
- acls(): Promise<Acl>;
56
57
  /** Fetches workspace onboarding status
57
58
  * @param workspaceId - ID of the workspace
58
59
  * @returns Workspace onboarding status
@@ -98,6 +99,19 @@ export declare class AreaWorkspaces {
98
99
  * @returns All available products
99
100
  */
100
101
  workspaceAvailableProducts(workspaceId: string): Promise<Array<WorkspaceProduct>>;
102
+ /** Fetches workspace Portal settings
103
+ * @param workspaceId - ID of the workspace
104
+ * @returns Workspace portal settings
105
+ */
106
+ workspacePortalSettings(workspaceId: string): Promise<import("../..").PortalSettings>;
107
+ /**
108
+ * Checks whether the workspace has available credits
109
+ * @param workspaceId - ID of the workspace
110
+ * @returns boolean - true if the workspace has available credits, false otherwise
111
+ */
112
+ getWorkspaceCreditsAvailability(workspaceId: string): Promise<{
113
+ canSpendCredits: boolean;
114
+ }>;
101
115
  /** Creates new workspace and retrieves the newly created workspace object. The user who creates the workspace becomes its owner
102
116
  * @param name - Name of the workspace
103
117
  * @returns Newly created workspace object
@@ -109,6 +123,19 @@ export declare class AreaWorkspaces {
109
123
  * @returns Nothing
110
124
  */
111
125
  updateWorkspaceProfile(workspaceId: string, update: WorkspaceProfileUpdateModel): Promise<void>;
126
+ /** Updates workspace AI settings for a specific workspace
127
+ * @param workspaceId - ID of the workspace
128
+ * @param update - AI settings to update
129
+ * @returns Nothing
130
+ */
131
+ updateWorkspaceAiSettings(workspaceId: string, update: {
132
+ aiFeaturesEnabled?: boolean;
133
+ projectsEnabled?: boolean;
134
+ aiAskFeaturesEnabled?: boolean;
135
+ aiCustomInstruction?: string;
136
+ defaultProjectRole?: DefaultProjectRole;
137
+ defaultProjectAccessMode?: DefaultProjectAccessMode;
138
+ }): Promise<void>;
112
139
  /** tests accessibility of IP allowlist settings
113
140
  * @param workspaceId - ID of the workspace
114
141
  * @param ipWhitelistSettings - settings to test
@@ -164,39 +191,61 @@ export declare class AreaWorkspaces {
164
191
  * @param workspaceId - ID of the workspace
165
192
  * @param userId - ID of the user
166
193
  * @param newRole - New role of the user
194
+ * @param newSeatType - New seat type of the user
167
195
  * @returns Nothing
168
196
  */
169
- updateWorkspaceMemberRole(workspaceId: string, userId: string, newRole: UserRole): Promise<void>;
197
+ updateWorkspaceMemberRole(workspaceId: string, userId: string, newRole: UserRole, newSeatType?: WorkspaceSeatType): Promise<void>;
170
198
  /** Updates a role of an invitation.
171
199
  * @param workspaceId - ID of the workspace
172
200
  * @param invitationId - ID of the invitation
173
201
  * @param newRole - New role
202
+ * @param newSeatType - New seat type
174
203
  * @returns Nothing
175
204
  */
176
- updateWorkspaceInvitationRole(workspaceId: string, invitationId: string, newRole: UserRole): Promise<void>;
205
+ updateWorkspaceInvitationRole(workspaceId: string, invitationId: string, newRole: UserRole, newSeatType?: WorkspaceSeatType): Promise<void>;
177
206
  /** Invites new members to the workspace
178
207
  * @param workspaceId - ID of the workspace
179
208
  * @param invitations - array of invitations
180
209
  * @returns Nothing
181
210
  */
182
211
  addWorkspaceInvitations(workspaceId: string, invitations: Array<WorkspaceInvitationUpdateModel>, designSystemId: string | undefined): Promise<void>;
212
+ /** Creates a new Stripe checkout session to change current subscription.
213
+ * @param workspaceId - ID of the workspace
214
+ * @param successUrl - URL to redirect to after successful payment
215
+ * @param cancelUrl - URL to redirect to after failed payment
216
+ * @param plan - Plan to be selected in the checkout
217
+ * @param interval - Interval (monthly / yearly) of the plan
218
+ * @param fullSeats - Number of full seats the subscription will have
219
+ * @param builderSeats - Number of builder seats the subscription will have
220
+ * @param additionalCredits - Additional credits per month
221
+ * @returns string - URL to the Stripe checkout
222
+ */
223
+ createCheckoutSessionForSubscriptionChange(workspaceId: string, successUrl: string, cancelUrl: string, plan: SubscriptionCheckoutProductCode, interval: WorkspaceSubscriptionPlanInterval, fullSeats: number, builderSeats: number, additionalCredits: number): Promise<string>;
183
224
  /** Creates a new Stripe checkout session.
184
225
  * @param workspaceId - ID of the workspace
185
- * @param priceId - ID of the Stripe price to be applied to the workspace
186
226
  * @param successUrl - URL to redirect to after successful payment
187
227
  * @param cancelUrl - URL to redirect to after failed payment
188
- * @param quantity - number of seats to be pre-selected in the checkout
228
+ * @param centAmount - number of cents to be selected in the checkout
189
229
  * @returns string - URL to the Stripe checkout
190
230
  */
191
- createCheckoutSession(workspaceId: string, priceId: string, successUrl: string, cancelUrl: string, quantity?: number | null): Promise<string>;
231
+ createCheckoutSessionForTopUpCredits(workspaceId: string, successUrl: string, cancelUrl: string, centAmount: number): Promise<string>;
192
232
  /** Creates a new Stripe customer portal session.
193
233
  * @param workspaceId - ID of the workspace
194
234
  * @param returnUrl - URL to redirect to from the portal
195
- * @param update - describes the subscription updates to be applied
196
235
  * @param cancel - describes if the subscription must be cancelled
197
236
  * @returns string - URL to the Stripe customer portal
198
237
  */
199
- createPortalSession(workspaceId: string, returnUrl: string, update?: WorkspaceSubscriptionUpdateModel | null, cancel?: boolean | null): Promise<string>;
238
+ createPortalSession(workspaceId: string, returnUrl: string, cancel?: boolean | null): Promise<string>;
239
+ /** Update an existing subscription.
240
+ * @param workspaceId - ID of the workspace
241
+ * @param update - describes the subscription updates to be applied
242
+ */
243
+ updateSubscription(workspaceId: string, update: WorkspaceSubscriptionUpdateModel): Promise<void>;
244
+ /** Preview subscription changes.
245
+ * @param workspaceId - ID of the workspace
246
+ * @param update - describes the subscription updates to be applied
247
+ */
248
+ previewSubscriptionUpdate(workspaceId: string, update: WorkspaceSubscriptionUpdateModel): Promise<WorkspaceSubscriptionUpdatePreviewModel>;
200
249
  /** Resend an invitation to the workspace.
201
250
  * @param workspaceId - ID of the workspace
202
251
  * @param invitationId - ID of the invitation
@@ -208,6 +257,12 @@ export declare class AreaWorkspaces {
208
257
  * @returns Nothing
209
258
  */
210
259
  restoreWorkspaceSubscription(workspaceId: string): Promise<void>;
260
+ /** Updates portal settings
261
+ * @param workspaceId - ID of the workspace
262
+ * @param settings - updated settings
263
+ * @returns Nothing
264
+ */
265
+ updateWorkspacePortalSettings(workspaceId: string, settings: DTOPortalSettingsUpdatePayload): Promise<void>;
211
266
  /** Deletes a single workspace. This action is irreversible, all data will be lost, and can only be performed by the workspace owner
212
267
  * @param workspaceId - ID of the workspace
213
268
  * @returns Nothing
@@ -236,10 +291,10 @@ export declare class AreaWorkspaces {
236
291
  */
237
292
  deleteWorkspaceInvitation(workspaceId: string, invitationId: string): Promise<void>;
238
293
  /**
239
- * Lists all untyped data for a given workspace.
240
- * @param workspaceId - The ID of the workspace.
241
- * @returns A promise that resolves to the list of untyped data.
242
- */
294
+ * Lists all untyped data for a given workspace.
295
+ * @param workspaceId - The ID of the workspace.
296
+ * @returns A promise that resolves to the list of untyped data.
297
+ */
243
298
  listUntypedData(workspaceId: string): Promise<DTOWorkspaceUntypedDataListResponse>;
244
299
  /**
245
300
  * Creates new untyped data in the specified workspace.
@@ -2,16 +2,19 @@ import { GitProviderValues } from "../../model/workspaces/SDKWorkspaceIntegratio
2
2
  type DataBridgeRequestHookResult = {
3
3
  skipDefaultAuth?: boolean;
4
4
  };
5
+ export type FetchFunction = typeof fetch;
5
6
  export type DataBridgeRequestHook = (request: any) => void | DataBridgeRequestHookResult | Promise<void | DataBridgeRequestHookResult>;
6
7
  export type DebugResponseObserver = (info: {
7
8
  requestUrl: string;
8
- response: any;
9
+ response?: any;
9
10
  executionTime: number;
10
- error?: Error;
11
+ error?: any;
11
12
  }) => void;
12
13
  export type DebugRequestObserver = (info: {
13
14
  requestUrl: string;
14
15
  requestMethod: string;
16
+ asData?: boolean;
17
+ isStreamed?: boolean;
15
18
  }) => void;
16
19
  export type DataBridgeConfiguration = {
17
20
  apiUrl: string;
@@ -41,11 +44,11 @@ export declare class DataBridge {
41
44
  debugRequestObserver: DebugRequestObserver | null;
42
45
  debugResponseObserver: DebugResponseObserver | null;
43
46
  constructor(conf: DataBridgeConfiguration);
44
- delete(endpoint: string): Promise<any>;
45
- get(endpoint: string): Promise<any>;
47
+ delete(endpoint: string, payload?: any | null): Promise<any>;
48
+ get<T = any>(endpoint: string): Promise<T>;
46
49
  getStreamed(endpoint: string): Promise<ReadableStreamDefaultReader<Uint8Array>>;
47
50
  getAsData(endpoint: string): Promise<any>;
48
- put(endpoint: string, payload: any | null): Promise<any>;
51
+ put<T = any>(endpoint: string, payload: any | null): Promise<T>;
49
52
  post(endpoint: string, payload: any | null): Promise<any>;
50
53
  postStreamed(endpoint: string, payload: any | null): Promise<ReadableStreamDefaultReader<Uint8Array>>;
51
54
  upload(endpoint: string, formData: FormData, method?: "PUT" | "POST"): Promise<any>;
@@ -61,6 +64,7 @@ export declare class DataBridge {
61
64
  getBaseEndpoint(fragment: string | null): string;
62
65
  getPublicEndpoint(fragment: string): string;
63
66
  getAclEndpoint(resource?: string): string;
67
+ getMCPStreamEndpoint(fragment?: string): string;
64
68
  getUserEndpoint(userId: string, fragment: string | null): string;
65
69
  getUserWorkspaceEndpoint(userId: string, wsId: string, fragment: string | null): string;
66
70
  getWorkspaceEndpoint(wsId: string, fragment: string | null): string;