@supernova-studio/supernova-sdk-beta 2.2.12 → 2.2.52

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 (28) hide show
  1. package/README.md +28 -11
  2. package/build/sdk-typescript/src/core/SDKSupernova.d.ts +7 -1
  3. package/build/sdk-typescript/src/core/areas/SDKAreaMCP.d.ts +24 -0
  4. package/build/sdk-typescript/src/core/areas/SDKAreaProjects.d.ts +30 -1
  5. package/build/sdk-typescript/src/core/areas/SDKAreaRawData.d.ts +30 -1
  6. package/build/sdk-typescript/src/core/areas/SDKAreaWorkspaces.d.ts +40 -5
  7. package/build/sdk-typescript/src/core/data/SDKDataBridge.d.ts +8 -4
  8. package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +74 -5
  9. package/build/sdk-typescript/src/core/data/SDKDataCoreCached.d.ts +50 -0
  10. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +40 -1
  11. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +52 -13
  12. package/build/sdk-typescript/src/exports.d.ts +3 -2
  13. package/build/sdk-typescript/src/model/base/SDKDesignSystem.d.ts +2 -0
  14. package/build/sdk-typescript/src/model/mcp/SDKMCPStream.d.ts +8 -0
  15. package/build/sdk-typescript/src/model/membership/SDKMembership.d.ts +2 -0
  16. package/build/sdk-typescript/src/model/messaging/SDKChatThreadMessage.d.ts +0 -3
  17. package/build/sdk-typescript/src/model/projects/SDKForgeProject.d.ts +4 -3
  18. package/build/sdk-typescript/src/model/projects/SDKForgeProjectContext.d.ts +6 -1
  19. package/build/sdk-typescript/src/model/projects/SDKForgeProjectContextOverride.d.ts +17 -0
  20. package/build/sdk-typescript/src/model/projects/SDKForgeProjectMembership.d.ts +1 -0
  21. package/build/sdk-typescript/src/model/users/SDKUserMembership.d.ts +1 -0
  22. package/build/sdk-typescript/src/model/workspaces/SDKWorkspace.d.ts +11 -1
  23. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceInvitation.d.ts +0 -2
  24. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceSubscription.d.ts +2 -8
  25. package/build/sdk-typescript/src/utils/RawUtils.d.ts +7 -1
  26. package/build/supernova-sdk-typescript.js +1 -1
  27. package/build/supernova-sdk-typescript.js.map +1 -1
  28. package/package.json +14 -7
package/README.md CHANGED
@@ -111,26 +111,43 @@ With cache disabled, every request will download all necessary information for e
111
111
 
112
112
  ### Release
113
113
 
114
- SDK should be released via CI by opening PR `develop -> publish-sdk` branch once we need to release it.
114
+ **Before releasing:**
115
115
 
116
- Please, in this PR:
116
+ - Bump version in `sdk-typescript/scripts/packages/**.json` files
117
+ - Ensure versions of `@supernova-studio/client` and `@supernova-studio/model` are:
118
+ - Up-to-date with main `package.json` in root folder of whole repository
119
+ - The same version is present in `package.json` and `sdk-typescript/scripts/packages/**.json` files
117
120
 
118
- - bump a version in `sdk-typescript/scripts/packages/**.json` files
119
- - check that versions of `@supernova-studio/client` and `@supernova-studio/model` are:
120
- - - up-to-date with main `package.json` in root folder of whole repository
121
- - - the same version is present in `package.json` and `sdk-typescript/scripts/packages/**.json` files.
121
+ SDK can be released via CI in two ways:
122
122
 
123
- Several packages are released:
123
+ #### 1. Manual Release (via GitHub Actions)
124
124
 
125
- - `@supernovaio/sdk` - main SDK used by customers, Pulsar etc
125
+ You can trigger the SDK publish workflow manually:
126
+
127
+ 1. Go to the [GitHub Actions page](https://github.com/Supernova-Studio/cloud-ji/actions)
128
+ 2. Select the "Publish SDK & SDK-Exporters to NPM" workflow
129
+ 3. Click "Run workflow"
130
+ 4. Select the branch (typically `develop`)
131
+ 5. Click "Run workflow" button
132
+
133
+ **Note:** Manual release does not run tests automatically.
134
+
135
+ #### 2. Standard Release (via Pull Request)
136
+
137
+ Open a PR from `develop` → `publish-sdk` branch when you need to release. This will automatically trigger the publish workflow when the PR is merged.
138
+
139
+ #### 3. **Emergency release (from CLI)**
140
+
141
+ Can be done manually via scripts like `npm run publish-package-sdk`, but CI is preferred.
142
+
143
+ **Packages released:**
144
+
145
+ - `@supernovaio/sdk` - Main SDK used by customers, Pulsar etc
126
146
  - `@supernovaio/sdk-exporters` - SDK used by exporters helpers
127
147
  - `@supernova-studio/supernova-sdk-beta` - SDK used by old BE during Token Studio import only
128
148
 
129
149
  Having separate version for old BE makes it simpler to release BE without necessity to update & release Pulsar, when we only need changes/fixes in SDK for Token Studio (which happens more often than changes we need for Pulsar).
130
150
 
131
- Emergency release could be done manually via scripts, like `npm run publish-package-sdk`.
132
- Please, avoid this and try using CI instead, and it helps you with ensuring tests are passed.
133
-
134
151
  ## What's next
135
152
 
136
153
  As this is still beta, we are working hard on improving it before the first official release. The following are areas we'd like to solve before general release:
@@ -9,6 +9,7 @@ import { AreaDesignSystems } from "./areas/SDKAreaDesignSystems";
9
9
  import { AreaDocsAnalytics } from "./areas/SDKAreaDocsAnalytics";
10
10
  import { AreaDocumentation } from "./areas/SDKAreaDocumentation";
11
11
  import { AreaIntegrations } from "./areas/SDKAreaIntegrations";
12
+ import { AreaMCP } from "./areas/SDKAreaMCP";
12
13
  import { AreaMe } from "./areas/SDKAreaMe";
13
14
  import { AreaMessaging } from "./areas/SDKAreaMessaging";
14
15
  import { AreaMultiplayer } from "./areas/SDKAreaMultiplayer";
@@ -24,7 +25,7 @@ import { AreaUsers } from "./areas/SDKAreaUsers";
24
25
  import { AreaVersions } from "./areas/SDKAreaVersions";
25
26
  import { AreaWorkspaceIntegrations } from "./areas/SDKAreaWorkspaceIntegrations";
26
27
  import { AreaWorkspaces } from "./areas/SDKAreaWorkspaces";
27
- import { DataBridgeRequestHook } from "./data/SDKDataBridge";
28
+ import { DataBridgeRequestHook, DebugRequestObserver, DebugResponseObserver } from "./data/SDKDataBridge";
28
29
  /** Main Supernova.io SDK object. Use this to connect to your data instance and retrieve workspace / design system / version from which you can access all neccessary data. */
29
30
  export declare class Supernova {
30
31
  private apiKey;
@@ -67,6 +68,8 @@ export declare class Supernova {
67
68
  me: AreaMe;
68
69
  /** Get, create, update, manipulate or delete integrations */
69
70
  integrations: AreaIntegrations;
71
+ /** Get access to Supernova MCP stream capabilities */
72
+ mcp: AreaMCP;
70
73
  /** Get, create, update, manipulate or delete workspace integrations */
71
74
  workspaceIntegrations: AreaWorkspaceIntegrations;
72
75
  /** Get, create, update, manipulate or delete data sources */
@@ -98,10 +101,13 @@ export declare class Supernova {
98
101
  apiUrl?: string;
99
102
  aiApiUrl?: string;
100
103
  requestHook?: DataBridgeRequestHook;
104
+ debugRequestObserver?: DebugRequestObserver | null;
105
+ debugResponseObserver?: DebugResponseObserver | null;
101
106
  customFetchLib?: any;
102
107
  customProxyLib?: any;
103
108
  isPreview?: boolean;
104
109
  jobId?: string;
110
+ useDataCoreCached?: boolean;
105
111
  });
106
112
  get apiKeySet(): boolean;
107
113
  }
@@ -0,0 +1,24 @@
1
+ import { DTOMCPStreamUpdateInput } from "@supernova-studio/client";
2
+ import { MCPStream } from "../../model/mcp/SDKMCPStream";
3
+ import { DataCore } from "../data/SDKDataCore";
4
+ export declare class AreaMCP {
5
+ private dataCore;
6
+ constructor(dataCore: DataCore);
7
+ /**
8
+ * Retrieves an MCP stream by ID. Users can only access MCP streams associated with themselves.
9
+ * @param streamId - The ID of the MCP stream to retrieve.
10
+ * @returns The MCPStream object.
11
+ */
12
+ getMCPStream(streamId: string): Promise<MCPStream>;
13
+ /**
14
+ * Retrieves the user's MCP stream. If no MCP stream exists for the user, an empty MCP stream is created automatically.
15
+ * @returns The user's MCPStream object.
16
+ */
17
+ getUserMCPStream(): Promise<MCPStream>;
18
+ /**
19
+ * Updates the user's MCP stream with the provided data.
20
+ * @param data - The update input containing optional projectFeatureId and projectDocumentId.
21
+ * @returns The updated MCPStream object.
22
+ */
23
+ updateUserMCPStream(data: DTOMCPStreamUpdateInput): Promise<MCPStream>;
24
+ }
@@ -1,6 +1,6 @@
1
1
  import { DTOForgeProjectCreate, DTOForgeProjectUpdate, DTOUpdateForgeProjectMember, DTORemoveForgeProjectMember, DTOForgeProjectFeatureCreateInput, DTOForgeProjectFeatureUpdateInput, DTOForgeProjectFeatureDeleteInput, DTOForgeProjectFeatureMoveInput, DTOForgeProjectArtifactCreateInput, DTOForgeProjectArtifactUpdateInput, DTOForgeProjectArtifactDeleteInput, DTOForgeProjectArtifactMoveInput, DTOForgeSectionCreateInput, DTOForgeSectionUpdateInput, DTOForgeSectionDeleteInput, DTOForgeSectionMoveInput, DTOForgeProjectAction, DTOFeatureMessageCreateInput, DTOFeatureMessageReactionCreateInput, DTOFeatureMessageReactionDeleteInput, DTOFeatureArtifactCreateInput, DTOFeatureArtifactDeleteInput, DTOAddMembersToForgeProject, DTOFeatureIterationCreateInput, DTOFeatureIterationUpdateArtifactsInput, DTOFeatureAgentWorkFinalizeInput, DTOFeatureIterationUpdateInput, DTOFeatureIterationPromoteInput, DTOFeatureIterationSetLatestInput, DTOFeatureIterationUpdateArtifactsByMessageInput, DTOFeatureUpdateThemeInput } from "@supernova-studio/client";
2
2
  import { ForgeProject } from "../../model/projects/SDKForgeProject";
3
- import { ForgeProjectContextCreateInput, ForgeProjectContextUpdateInput, ForgeProjectContext } from "../../model/projects/SDKForgeProjectContext";
3
+ import { ForgeProjectContextCreateInput, ForgeProjectContextUpdateInput, ForgeProjectContext, type ForgeProjectTheme } from "../../model/projects/SDKForgeProjectContext";
4
4
  import { ForgeProjectDocument } from "../../model/projects/SDKForgeProjectDocument";
5
5
  import { ForgeProjectFeature } from "../../model/projects/SDKForgeProjectFeature";
6
6
  import { ForgeProjectMembership } from "../../model/projects/SDKForgeProjectMembership";
@@ -1106,6 +1106,18 @@ export declare class AreaProjects {
1106
1106
  description?: string | undefined;
1107
1107
  designSystemId?: string | undefined;
1108
1108
  brandId?: string | undefined;
1109
+ thumbnail?: {
1110
+ id: string;
1111
+ url: string;
1112
+ name?: string | undefined;
1113
+ source?: {
1114
+ type: "UserUpload";
1115
+ userId: string;
1116
+ } | {
1117
+ type: "Figma";
1118
+ renderMode: "Image" | "HTML" | "JSON";
1119
+ } | undefined;
1120
+ } | undefined;
1109
1121
  defaultTokenThemeSetId?: string | undefined;
1110
1122
  productContext?: string | undefined;
1111
1123
  additionalContext?: string | undefined;
@@ -2082,6 +2094,18 @@ export declare class AreaProjects {
2082
2094
  description?: string | undefined;
2083
2095
  designSystemId?: string | undefined;
2084
2096
  brandId?: string | undefined;
2097
+ thumbnail?: {
2098
+ id: string;
2099
+ url: string;
2100
+ name?: string | undefined;
2101
+ source?: {
2102
+ type: "UserUpload";
2103
+ userId: string;
2104
+ } | {
2105
+ type: "Figma";
2106
+ renderMode: "Image" | "HTML" | "JSON";
2107
+ } | undefined;
2108
+ } | undefined;
2085
2109
  defaultTokenThemeSetId?: string | undefined;
2086
2110
  productContext?: string | undefined;
2087
2111
  additionalContext?: string | undefined;
@@ -2093,6 +2117,11 @@ export declare class AreaProjects {
2093
2117
  }[] | undefined;
2094
2118
  }>;
2095
2119
  deleteProjectContext(id: string): Promise<void>;
2120
+ updateProjectContextOverride(wsId: string, projectId: string, data: {
2121
+ theme: Partial<ForgeProjectTheme> | null;
2122
+ }, options?: {
2123
+ updateSharedContext?: boolean;
2124
+ }): Promise<import("../../model/projects/SDKForgeProjectContextOverride").ForgeProjectContextOverrideResponse>;
2096
2125
  getProjectTrailEvents(projectId: string): Promise<import("../..").TrailEvent[]>;
2097
2126
  constructor(dataCore: DataCore);
2098
2127
  }
@@ -1,4 +1,4 @@
1
- import type { DTODesignSystemContactsResponse, DTOFeatureArtifactListResponse, DTOFeatureIteration, DTOForgeAgent, DTOForgeChatExportResponse, DTOForgeProjectFeature, DTOForgeProjectMember, DTOThreadMessageListResponse, DTOTrailEventListResponse } from "@supernova-studio/client";
1
+ import type { DTODesignSystemContactsResponse, DTOFeatureArtifactListResponse, DTOFeatureIteration, DTOForgeAgent, DTOForgeChatExportResponse, DTOForgeProjectFeature, DTOForgeProjectMember, DTOThreadMessageListResponse, DTOTrailEventListResponse, DTOMCPStreamResponse } from "@supernova-studio/client";
2
2
  import { DTODesignSystem, DTOForgeChatMessageListResponse, DTOForgeChatThreadListResponse, DTOPortalSettings } from "@supernova-studio/client";
3
3
  import { ForgeProjectRemoteModel } from "../../exports";
4
4
  import { BrandRemoteModel } from "../../model/base/SDKBrand";
@@ -22,6 +22,7 @@ import { SourceRemoteModel } from "../../model/support/SDKSource";
22
22
  import { TokenRemoteModel } from "../../model/tokens/remote/SDKRemoteTokenModel";
23
23
  import { UserRemoteModel } from "../../model/users/SDKUser";
24
24
  import { UserMembershipRemoteModel } from "../../model/users/SDKUserMembership";
25
+ import { WorkspaceRemoteModel } from "../../model/workspaces/SDKWorkspace";
25
26
  import { WorkspaceIntegrationsRemoteModel } from "../../model/workspaces/SDKWorkspaceIntegration";
26
27
  import { SubscriptionProductFeaturesRemoteModel } from "../../model/workspaces/SDKWorkspaceProductFeatures";
27
28
  import { WorkspaceSubscriptionRemoteModel } from "../../model/workspaces/SDKWorkspaceSubscription";
@@ -1060,6 +1061,18 @@ export declare class AreaRawData {
1060
1061
  description?: string | undefined;
1061
1062
  designSystemId?: string | undefined;
1062
1063
  brandId?: string | undefined;
1064
+ thumbnail?: {
1065
+ id: string;
1066
+ url: string;
1067
+ name?: string | undefined;
1068
+ source?: {
1069
+ type: "UserUpload";
1070
+ userId: string;
1071
+ } | {
1072
+ type: "Figma";
1073
+ renderMode: "Image" | "HTML" | "JSON";
1074
+ } | undefined;
1075
+ } | undefined;
1063
1076
  defaultTokenThemeSetId?: string | undefined;
1064
1077
  productContext?: string | undefined;
1065
1078
  additionalContext?: string | undefined;
@@ -2040,6 +2053,18 @@ export declare class AreaRawData {
2040
2053
  description?: string | undefined;
2041
2054
  designSystemId?: string | undefined;
2042
2055
  brandId?: string | undefined;
2056
+ thumbnail?: {
2057
+ id: string;
2058
+ url: string;
2059
+ name?: string | undefined;
2060
+ source?: {
2061
+ type: "UserUpload";
2062
+ userId: string;
2063
+ } | {
2064
+ type: "Figma";
2065
+ renderMode: "Image" | "HTML" | "JSON";
2066
+ } | undefined;
2067
+ } | undefined;
2043
2068
  defaultTokenThemeSetId?: string | undefined;
2044
2069
  productContext?: string | undefined;
2045
2070
  additionalContext?: string | undefined;
@@ -2050,6 +2075,7 @@ export declare class AreaRawData {
2050
2075
  tokenThemeIds: string[];
2051
2076
  }[] | undefined;
2052
2077
  }[]>;
2078
+ getRawForgeProjectContextOverride(wsId: string, projectId: string): Promise<import("../../model/projects/SDKForgeProjectContextOverride").ForgeProjectContextOverrideResponse>;
2053
2079
  getRawForgeAgents(workspaceId: string, projectId: string): Promise<Array<DTOForgeAgent>>;
2054
2080
  getRawChatThreads(workspaceId: string, limit?: number, offset?: number): Promise<DTOForgeChatThreadListResponse>;
2055
2081
  getRawChatThreadMessages(workspaceId: string, threadId: string): Promise<DTOForgeChatMessageListResponse>;
@@ -2064,4 +2090,7 @@ export declare class AreaRawData {
2064
2090
  getRawForgeProjectFeatureIterations(workspaceId: string, projectId: string, featureId: string): Promise<Array<DTOFeatureIteration>>;
2065
2091
  getRawForgeProjectFeatureArtifacts(workspaceId: string, projectId: string, featureId: string): Promise<DTOFeatureArtifactListResponse>;
2066
2092
  getRawForgeProjectTrailEvents(projectId: string): Promise<DTOTrailEventListResponse>;
2093
+ getRawWorkspaceDetail(workspaceId: string): Promise<WorkspaceRemoteModel>;
2094
+ getRawMCPStream(streamId: string): Promise<DTOMCPStreamResponse>;
2095
+ getRawUserMCPStream(): Promise<DTOMCPStreamResponse>;
2067
2096
  }
@@ -1,4 +1,4 @@
1
- import { DTOPortalSettingsUpdatePayload } from "@supernova-studio/client";
1
+ import { DTOPortalSettingsUpdatePayload, DTOWorkspaceUntypedDataListResponse, DTOWorkspaceUntypedDataResponse } from "@supernova-studio/client";
2
2
  import { WorkspaceSeatType } from "@supernova-studio/model";
3
3
  import { UserRole } from "../../model/enums/SDKUserRole";
4
4
  import { WorkspaceSubscriptionPlanInterval } from "../../model/enums/SDKWorkspaceSubscriptionPlanInterval";
@@ -6,7 +6,7 @@ import { SubscriptionCheckoutProductCode } from "../../model/enums/SDKWorkspaceS
6
6
  import { Membership } from "../../model/membership/SDKMembership";
7
7
  import { UserMembership } from "../../model/users/SDKUserMembership";
8
8
  import { UserWorkspaceNotificationSettings, UserWorkspaceNotificationSettingsUpdateModel } from "../../model/users/SDKUserWorkspaceNotificationSettings";
9
- import { Workspace } from "../../model/workspaces/SDKWorkspace";
9
+ import { DefaultProjectAccessMode, DefaultProjectRole, Workspace } from "../../model/workspaces/SDKWorkspace";
10
10
  import { WorkspaceIPWhitelistSettings, WorkspaceIPWhitelistSettingsUpdateModel } from "../../model/workspaces/SDKWorkspaceIPWhitelistSettings";
11
11
  import { WorkspaceInvitation, WorkspaceInvitationUpdateModel } from "../../model/workspaces/SDKWorkspaceInvitation";
12
12
  import { WorkspaceInvoice } from "../../model/workspaces/SDKWorkspaceInvoice";
@@ -17,7 +17,7 @@ import { WorkspaceProduct } from "../../model/workspaces/SDKWorkspaceProduct";
17
17
  import { SubscriptionProductFeatures } from "../../model/workspaces/SDKWorkspaceProductFeatures";
18
18
  import { WorkspaceProfileUpdateModel } from "../../model/workspaces/SDKWorkspaceProfile";
19
19
  import { WorkspaceSSOSettings, WorkspaceSSOSettingsUpdateModel } from "../../model/workspaces/SDKWorkspaceSSOSettings";
20
- import { WorkspaceSubscription, WorkspaceSubscriptionUpdateModel, WorkspaceSubscriptionUpdateModelLegacy, WorkspaceSubscriptionUpdatePreviewModel } from "../../model/workspaces/SDKWorkspaceSubscription";
20
+ import { WorkspaceSubscription, WorkspaceSubscriptionUpdateModel, WorkspaceSubscriptionUpdatePreviewModel } from "../../model/workspaces/SDKWorkspaceSubscription";
21
21
  import { DataCore } from "../data/SDKDataCore";
22
22
  export declare class AreaWorkspaces {
23
23
  /** Internal: Engine */
@@ -133,6 +133,8 @@ export declare class AreaWorkspaces {
133
133
  projectsEnabled?: boolean;
134
134
  aiAskFeaturesEnabled?: boolean;
135
135
  aiCustomInstruction?: string;
136
+ defaultProjectRole?: DefaultProjectRole;
137
+ defaultProjectAccessMode?: DefaultProjectAccessMode;
136
138
  }): Promise<void>;
137
139
  /** tests accessibility of IP allowlist settings
138
140
  * @param workspaceId - ID of the workspace
@@ -230,11 +232,10 @@ export declare class AreaWorkspaces {
230
232
  /** Creates a new Stripe customer portal session.
231
233
  * @param workspaceId - ID of the workspace
232
234
  * @param returnUrl - URL to redirect to from the portal
233
- * @param update - describes the subscription updates to be applied
234
235
  * @param cancel - describes if the subscription must be cancelled
235
236
  * @returns string - URL to the Stripe customer portal
236
237
  */
237
- createPortalSession(workspaceId: string, returnUrl: string, update?: WorkspaceSubscriptionUpdateModelLegacy | null, cancel?: boolean | null): Promise<string>;
238
+ createPortalSession(workspaceId: string, returnUrl: string, cancel?: boolean | null): Promise<string>;
238
239
  /** Update an existing subscription.
239
240
  * @param workspaceId - ID of the workspace
240
241
  * @param update - describes the subscription updates to be applied
@@ -289,4 +290,38 @@ export declare class AreaWorkspaces {
289
290
  * @returns Nothing
290
291
  */
291
292
  deleteWorkspaceInvitation(workspaceId: string, invitationId: string): Promise<void>;
293
+ /**
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
+ */
298
+ listUntypedData(workspaceId: string): Promise<DTOWorkspaceUntypedDataListResponse>;
299
+ /**
300
+ * Creates new untyped data in the specified workspace.
301
+ * @param workspaceId - The ID of the workspace.
302
+ * @param data - The data to create. Must be a valid JSON object.
303
+ * @returns A promise that resolves to the created untyped data.
304
+ */
305
+ createUntypedData(workspaceId: string, data: any): Promise<DTOWorkspaceUntypedDataResponse>;
306
+ /**
307
+ * Deletes all untyped data in the specified workspace.
308
+ * @param workspaceId - The ID of the workspace.
309
+ * @returns A promise that resolves when the operation is complete.
310
+ */
311
+ deleteAllUntypedData(workspaceId: string): Promise<void>;
312
+ /**
313
+ * Updates specific untyped data in the specified workspace.
314
+ * @param workspaceId - The ID of the workspace.
315
+ * @param id - The ID of the untyped data to update.
316
+ * @param data - The updated data. Must be a valid JSON object.
317
+ * @returns A promise that resolves to the updated untyped data.
318
+ */
319
+ updateUntypedData(workspaceId: string, id: string, data: any): Promise<DTOWorkspaceUntypedDataResponse>;
320
+ /**
321
+ * Deletes specific untyped data in the specified workspace.
322
+ * @param workspaceId - The ID of the workspace.
323
+ * @param id - The ID of the untyped data to delete.
324
+ * @returns A promise that resolves when the operation is complete.
325
+ */
326
+ deleteUntypedData(workspaceId: string, id: string): Promise<void>;
292
327
  }
@@ -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;
@@ -42,10 +45,10 @@ export declare class DataBridge {
42
45
  debugResponseObserver: DebugResponseObserver | null;
43
46
  constructor(conf: DataBridgeConfiguration);
44
47
  delete(endpoint: string, payload?: any | null): Promise<any>;
45
- get(endpoint: string): 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;
@@ -1,4 +1,4 @@
1
- import { DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOCreateDocumentationTabInput, DTODataSourceStorybookCreatePayload, DTODeleteDocumentationGroupInput, DTODeleteDocumentationPageInputV2, DTODeleteDocumentationTabGroupInput, DTODesignElementsDataDiffResponse, DTODocumentationAnalyticsTimeFrame, DTODocumentationLinkPreviewRequest, DTODocumentationPageAnchor, DTODocumentationPageApprovalStateChangeInput, DTODocumentationPageDependenciesGetResponse, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTOElementActionInput, DTOElementPropertyValuesEditActionInput, DTOExporterPropertyValueMap, DTOFigmaNode, DTOFigmaNodeRenderIdInput, DTOFigmaNodeRenderInput, DTOFigmaNodeV2, DTOForgeChatMessageScoreInput, DTOForgeChatMessageTagInput, DTOMoveDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTOPageRedirectCreateBody, DTOPageRedirectUpdateBody, DTOPipelineCreateBody, DTOPipelineUpdateBody, DTOPortalSettingsUpdatePayload, DTOPublishDocumentationRequest, DTORestoreDocumentationGroupInput, DTORestoreDocumentationPageInput, DTOStorybookEntryReplaceAction, DTOStorybookImportPayload, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2, DTOUpdateForgeProjectMember, DTORemoveForgeProjectMember, DTOForgeProjectFeatureCreateInput, DTOForgeProjectFeatureUpdateInput, DTOForgeProjectFeatureDeleteInput, DTOForgeProjectFeatureMoveInput, DTOForgeProjectArtifactCreateInput, DTOForgeProjectArtifactUpdateInput, DTOForgeProjectArtifactDeleteInput, DTOForgeProjectArtifactMoveInput, DTOForgeSectionCreateInput, DTOForgeSectionUpdateInput, DTOForgeSectionDeleteInput, DTOForgeSectionMoveInput, DTOForgeProjectAction, DTOFeatureMessageCreateInput, DTOFeatureMessageReactionCreateInput, DTOFeatureMessageReactionDeleteInput, DTOFeatureArtifactCreateInput, DTOFeatureArtifactDeleteInput, DTOFileUploadPayload, DTOForgeProjectFileUploadPayload, DTOAddMembersToForgeProject, DTOFeatureIterationCreateInput, DTOFeatureIterationUpdateArtifactsInput, DTOFeatureAgentWorkFinalizeInput, DTOForgeProjectCreate, DTOForgeProjectUpdate, DTOFeatureIterationUpdateInput, DTOFeatureIterationPromoteInput, DTOFeatureIterationSetLatestInput, DTOThreadMessageCreateInput, DTOThreadReactionCreateInput, DTOThreadReactionDeleteInput, DTOThreadMessageFinalizeInput, DTOBillingCheckoutInput, DTOFileUploadBulkPayload, DTOFileFinalizeBulkPayload, DTOFeatureIterationUpdateArtifactsByMessageInput, DTOUserUpdatePayload, DTOFeatureUpdateThemeInput } from "@supernova-studio/client";
1
+ import { DTOAddMembersToForgeProject, DTOBillingCheckoutInput, DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOCreateDocumentationTabInput, DTODataSourceStorybookCreatePayload, DTODeleteDocumentationGroupInput, DTODeleteDocumentationPageInputV2, DTODeleteDocumentationTabGroupInput, DTODesignElementsDataDiffResponse, DTODocumentationAnalyticsTimeFrame, DTODocumentationLinkPreviewRequest, DTODocumentationPageAnchor, DTODocumentationPageApprovalStateChangeInput, DTODocumentationPageDependenciesGetResponse, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTOElementActionInput, DTOElementPropertyValuesEditActionInput, DTOExporterPropertyValueMap, DTOFeatureAgentWorkFinalizeInput, DTOFeatureArtifactCreateInput, DTOFeatureArtifactDeleteInput, DTOFeatureIterationCreateInput, DTOFeatureIterationPromoteInput, DTOFeatureIterationSetLatestInput, DTOFeatureIterationUpdateArtifactsByMessageInput, DTOFeatureIterationUpdateArtifactsInput, DTOFeatureIterationUpdateInput, DTOFeatureMessageCreateInput, DTOFeatureMessageReactionCreateInput, DTOFeatureMessageReactionDeleteInput, DTOFeatureUpdateThemeInput, DTOFigmaNode, DTOFigmaNodeRenderIdInput, DTOFigmaNodeRenderInput, DTOFigmaNodeV2, DTOFileFinalizeBulkPayload, DTOFileUploadBulkPayload, DTOFileUploadPayload, DTOForgeChatMessageScoreInput, DTOForgeChatMessageTagInput, DTOForgeProjectAction, DTOForgeProjectArtifactCreateInput, DTOForgeProjectArtifactDeleteInput, DTOForgeProjectArtifactMoveInput, DTOForgeProjectArtifactUpdateInput, DTOForgeProjectCreate, DTOForgeProjectFeatureCreateInput, DTOForgeProjectFeatureDeleteInput, DTOForgeProjectFeatureMoveInput, DTOForgeProjectFeatureUpdateInput, DTOForgeProjectFileUploadPayload, DTOForgeProjectUpdate, DTOForgeSectionCreateInput, DTOForgeSectionDeleteInput, DTOForgeSectionMoveInput, DTOForgeSectionUpdateInput, DTOMCPStreamUpdateInput, DTOMoveDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTOPageRedirectCreateBody, DTOPageRedirectUpdateBody, DTOPipelineCreateBody, DTOPipelineUpdateBody, DTOPortalSettingsUpdatePayload, DTOPublishDocumentationRequest, DTORemoveForgeProjectMember, DTORestoreDocumentationGroupInput, DTORestoreDocumentationPageInput, DTOStorybookEntryReplaceAction, DTOStorybookImportPayload, DTOThreadMessageCreateInput, DTOThreadMessageFinalizeInput, DTOThreadReactionCreateInput, DTOThreadReactionDeleteInput, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2, DTOUpdateForgeProjectMember, DTOUserUpdatePayload, DTOWorkspaceUntypedDataListResponse, DTOWorkspaceUntypedDataResponse } from "@supernova-studio/client";
2
2
  import { DesignSystemInvite, DesignSystemInviteUpdate, DesignSystemMemberUpdate, DesignSystemPendingMemberInvite, DesignSystemUserInvitation, WorkspaceSeatType } from "@supernova-studio/model";
3
3
  import { DesignSystemAccessMode, DocsBlockDefinition, DocumentationLegacyGroup, DocumentationLegacyPage, ExportBuildStatus, ExporterJobDestination, ForgeProjectFeatureIteration, ResourceFont, TokenThemeOverrideTranserObject, UserRole, WorkspaceSubscriptionUpdatePreviewModel } from "../../exports";
4
4
  import { Asset } from "../../model/assets/SDKAsset";
@@ -39,12 +39,13 @@ import { ComponentGroup } from "../../model/groups/SDKComponentGroup";
39
39
  import { DesignComponentGroup } from "../../model/groups/SDKDesignComponentGroup";
40
40
  import { TokenGroup } from "../../model/groups/SDKTokenGroup";
41
41
  import { ImportJob } from "../../model/jobs/SDKImportJob";
42
+ import { MCPStream } from "../../model/mcp/SDKMCPStream";
42
43
  import { Membership } from "../../model/membership/SDKMembership";
43
44
  import { ChatThread } from "../../model/messaging/SDKChatThread";
44
45
  import { ChatThreadMessage, ChatThreadMessageInput } from "../../model/messaging/SDKChatThreadMessage";
45
46
  import { ForgeAgent } from "../../model/projects/SDKForgeAgent";
46
47
  import { ForgeProject } from "../../model/projects/SDKForgeProject";
47
- import { ForgeProjectContext, ForgeProjectContextCreateInput, ForgeProjectContextUpdateInput } from "../../model/projects/SDKForgeProjectContext";
48
+ import { ForgeProjectContext, ForgeProjectContextCreateInput, ForgeProjectContextUpdateInput, type ForgeProjectTheme } from "../../model/projects/SDKForgeProjectContext";
48
49
  import { ForgeProjectDocument } from "../../model/projects/SDKForgeProjectDocument";
49
50
  import { ForgeProjectFeature } from "../../model/projects/SDKForgeProjectFeature";
50
51
  import { ForgeProjectFeatureArtifact } from "../../model/projects/SDKForgeProjectFeatureArtifact";
@@ -69,7 +70,7 @@ import { User } from "../../model/users/SDKUser";
69
70
  import { UserMembership } from "../../model/users/SDKUserMembership";
70
71
  import { UserProfileUpdateModel } from "../../model/users/SDKUserProfile";
71
72
  import { UserWorkspaceNotificationSettings, UserWorkspaceNotificationSettingsUpdateModel } from "../../model/users/SDKUserWorkspaceNotificationSettings";
72
- import { Workspace } from "../../model/workspaces/SDKWorkspace";
73
+ import { DefaultProjectAccessMode, DefaultProjectRole, Workspace } from "../../model/workspaces/SDKWorkspace";
73
74
  import { WorkspaceIPWhitelistSettings, WorkspaceIPWhitelistSettingsUpdateModel } from "../../model/workspaces/SDKWorkspaceIPWhitelistSettings";
74
75
  import { WorkspaceIntegrations, WorkspaceIntegrationsRemoteModel, WorkspaceIntegrationType } from "../../model/workspaces/SDKWorkspaceIntegration";
75
76
  import { WorkspaceIntegrationAccessTokenPayload } from "../../model/workspaces/SDKWorkspaceIntegrationAccessToken";
@@ -85,7 +86,7 @@ import { WorkspaceProduct } from "../../model/workspaces/SDKWorkspaceProduct";
85
86
  import { SubscriptionProductFeatures } from "../../model/workspaces/SDKWorkspaceProductFeatures";
86
87
  import { WorkspaceProfileUpdateModel } from "../../model/workspaces/SDKWorkspaceProfile";
87
88
  import { WorkspaceSSOSettings, WorkspaceSSOSettingsUpdateModel } from "../../model/workspaces/SDKWorkspaceSSOSettings";
88
- import { WorkspaceSubscription, WorkspaceSubscriptionUpdateModel, WorkspaceSubscriptionUpdateModelLegacy } from "../../model/workspaces/SDKWorkspaceSubscription";
89
+ import { WorkspaceSubscription, WorkspaceSubscriptionUpdateModel } from "../../model/workspaces/SDKWorkspaceSubscription";
89
90
  import { GitProvidersBranches } from "../../model/workspaces/integrations/GitProvidersBranches";
90
91
  import { GitProvidersOrganizations } from "../../model/workspaces/integrations/GitProvidersOrganizations";
91
92
  import { GitProvidersProjects } from "../../model/workspaces/integrations/GitProvidersProjects";
@@ -1650,6 +1651,18 @@ export declare class DataCore {
1650
1651
  description?: string | undefined;
1651
1652
  designSystemId?: string | undefined;
1652
1653
  brandId?: string | undefined;
1654
+ thumbnail?: {
1655
+ id: string;
1656
+ url: string;
1657
+ name?: string | undefined;
1658
+ source?: {
1659
+ type: "UserUpload";
1660
+ userId: string;
1661
+ } | {
1662
+ type: "Figma";
1663
+ renderMode: "Image" | "HTML" | "JSON";
1664
+ } | undefined;
1665
+ } | undefined;
1653
1666
  defaultTokenThemeSetId?: string | undefined;
1654
1667
  productContext?: string | undefined;
1655
1668
  additionalContext?: string | undefined;
@@ -2625,6 +2638,18 @@ export declare class DataCore {
2625
2638
  description?: string | undefined;
2626
2639
  designSystemId?: string | undefined;
2627
2640
  brandId?: string | undefined;
2641
+ thumbnail?: {
2642
+ id: string;
2643
+ url: string;
2644
+ name?: string | undefined;
2645
+ source?: {
2646
+ type: "UserUpload";
2647
+ userId: string;
2648
+ } | {
2649
+ type: "Figma";
2650
+ renderMode: "Image" | "HTML" | "JSON";
2651
+ } | undefined;
2652
+ } | undefined;
2628
2653
  defaultTokenThemeSetId?: string | undefined;
2629
2654
  productContext?: string | undefined;
2630
2655
  additionalContext?: string | undefined;
@@ -2640,6 +2665,11 @@ export declare class DataCore {
2640
2665
  workspaceId: string;
2641
2666
  }): Promise<ForgeProjectContext[]>;
2642
2667
  getForgeProjectContext(contextId: string): Promise<ForgeProjectContext>;
2668
+ updateForgeProjectContextOverride(wsId: string, projectId: string, data: {
2669
+ theme: Partial<ForgeProjectTheme> | null;
2670
+ }, options?: {
2671
+ updateSharedContext?: boolean;
2672
+ }): Promise<import("../../model/projects/SDKForgeProjectContextOverride").ForgeProjectContextOverrideResponse>;
2643
2673
  createForgeProjectSection(workspaceId: string, projectId: string, input: DTOForgeSectionCreateInput, tId?: string): Promise<void>;
2644
2674
  updateForgeProjectSection(workspaceId: string, projectId: string, input: DTOForgeSectionUpdateInput, tId?: string): Promise<void>;
2645
2675
  deleteForgeProjectSection(workspaceId: string, projectId: string, input: DTOForgeSectionDeleteInput, tId?: string): Promise<void>;
@@ -2730,6 +2760,8 @@ export declare class DataCore {
2730
2760
  projectsEnabled?: boolean;
2731
2761
  aiAskFeaturesEnabled?: boolean;
2732
2762
  aiCustomInstruction?: string;
2763
+ defaultProjectRole?: DefaultProjectRole;
2764
+ defaultProjectAccessMode?: DefaultProjectAccessMode;
2733
2765
  }): Promise<void>;
2734
2766
  testIpWhitelistSettings(workspaceId: string, ipWhitelistSettings: WorkspaceIPWhitelistSettingsUpdateModel): Promise<{
2735
2767
  accessible: boolean;
@@ -2750,7 +2782,7 @@ export declare class DataCore {
2750
2782
  deleteWorkspaceMember(workspaceId: string, userId: string): Promise<void>;
2751
2783
  deleteWorkspaceInvitation(workspaceId: string, invitationId: string): Promise<void>;
2752
2784
  createCheckoutSession(workspaceId: string, data: DTOBillingCheckoutInput): Promise<string>;
2753
- createPortalSession(workspaceId: string, returnUrl: string, update?: WorkspaceSubscriptionUpdateModelLegacy | null, cancel?: boolean | null): Promise<string>;
2785
+ createPortalSession(workspaceId: string, returnUrl: string, cancel?: boolean | null): Promise<string>;
2754
2786
  updateSubscription(workspaceId: string, update: WorkspaceSubscriptionUpdateModel): Promise<void>;
2755
2787
  previewSubscriptionUpdate(workspaceId: string, update: WorkspaceSubscriptionUpdateModel): Promise<WorkspaceSubscriptionUpdatePreviewModel>;
2756
2788
  resendWorkspaceInvitation(workspaceId: string, invitationId: string, designSystemId: string | undefined): Promise<void>;
@@ -2885,4 +2917,41 @@ export declare class DataCore {
2885
2917
  getWorkspaceCreditsAvailability(workspaceId: string): Promise<{
2886
2918
  canSpendCredits: boolean;
2887
2919
  }>;
2920
+ getMCPStream(streamId: string): Promise<MCPStream>;
2921
+ getUserMCPStream(): Promise<MCPStream>;
2922
+ updateUserMCPStream(input: DTOMCPStreamUpdateInput): Promise<MCPStream>;
2923
+ /**
2924
+ * Lists all untyped data for a given workspace.
2925
+ * @param workspaceId - The ID of the workspace.
2926
+ * @returns A promise that resolves to the list of untyped data.
2927
+ */
2928
+ listUntypedData(workspaceId: string): Promise<DTOWorkspaceUntypedDataListResponse>;
2929
+ /**
2930
+ * Creates new untyped data in the specified workspace.
2931
+ * @param workspaceId - The ID of the workspace.
2932
+ * @param data - The data to create.
2933
+ * @returns A promise that resolves to the created untyped data.
2934
+ */
2935
+ createUntypedData(workspaceId: string, data: any): Promise<DTOWorkspaceUntypedDataResponse>;
2936
+ /**
2937
+ * Deletes all untyped data in the specified workspace.
2938
+ * @param workspaceId - The ID of the workspace.
2939
+ * @returns A promise that resolves when the operation is complete.
2940
+ */
2941
+ deleteAllUntypedData(workspaceId: string): Promise<void>;
2942
+ /**
2943
+ * Updates specific untyped data in the specified workspace.
2944
+ * @param workspaceId - The ID of the workspace.
2945
+ * @param id - The ID of the untyped data to update.
2946
+ * @param data - The updated data.
2947
+ * @returns A promise that resolves to the updated untyped data.
2948
+ */
2949
+ updateUntypedData(workspaceId: string, id: string, data: any): Promise<DTOWorkspaceUntypedDataResponse>;
2950
+ /**
2951
+ * Deletes specific untyped data in the specified workspace.
2952
+ * @param workspaceId - The ID of the workspace.
2953
+ * @param id - The ID of the untyped data to delete.
2954
+ * @returns A promise that resolves when the operation is complete.
2955
+ */
2956
+ deleteUntypedData(workspaceId: string, id: string): Promise<void>;
2888
2957
  }
@@ -0,0 +1,50 @@
1
+ import { ElementDataView } from "../../model/elements/SDKElementDataView";
2
+ import { ElementProperty, ElementPropertyTargetElementType } from "../../model/elements/SDKElementProperty";
3
+ import { ElementPropertyValue } from "../../model/elements/values/SDKElementPropertyValue";
4
+ import { TokenType } from "../../model/enums/SDKTokenType";
5
+ import { TokenGroup } from "../../model/groups/SDKTokenGroup";
6
+ import { Component } from "../../model/components/SDKComponent";
7
+ import { ComponentGroup } from "../../model/groups/SDKComponentGroup";
8
+ import { DesignComponentGroup } from "../../model/groups/SDKDesignComponentGroup";
9
+ import { DesignComponent } from "../../model/components/SDKDesignComponent";
10
+ import { Source } from "../../model/support/SDKSource";
11
+ import { TokenTheme } from "../../model/themes/SDKTokenTheme";
12
+ import { Token } from "../../model/tokens/SDKToken";
13
+ import { DataCore } from "./SDKDataCore";
14
+ export declare class DataCoreCached extends DataCore {
15
+ private tokensCache;
16
+ private tokenGroupsCache;
17
+ private designSystemSourcesCache;
18
+ private themesCache;
19
+ private elementPropertyDefinitionsCache;
20
+ private elementPropertyValuesCache;
21
+ private elementViewsCache;
22
+ private componentsCache;
23
+ private componentGroupsCache;
24
+ private designComponentsCache;
25
+ private designComponentGroupsCache;
26
+ tokens(designSystemId: string, versionId: string, filter?: {
27
+ type?: TokenType;
28
+ brandId?: string;
29
+ }): Promise<Token[]>;
30
+ tokenGroups(designSystemId: string, versionId: string, filter?: {
31
+ type?: TokenType;
32
+ brandId?: string;
33
+ }): Promise<TokenGroup[]>;
34
+ designSystemSources(designSystemId: string): Promise<Source[]>;
35
+ themes(designSystemId: string, versionId: string): Promise<TokenTheme[]>;
36
+ elementPropertyDefinitions(designSystemId: string, versionId: string, type: ElementPropertyTargetElementType): Promise<ElementProperty[]>;
37
+ elementPropertyValues(designSystemId: string, versionId: string): Promise<ElementPropertyValue[]>;
38
+ elementViews(designSystemId: string, versionId: string, type: ElementPropertyTargetElementType): Promise<ElementDataView[]>;
39
+ components(designSystemId: string, versionId: string, filter?: {
40
+ brandId?: string;
41
+ }): Promise<Component[]>;
42
+ componentGroups(designSystemId: string, versionId: string): Promise<ComponentGroup[]>;
43
+ designComponents(designSystemId: string, versionId: string, filter?: {
44
+ brandId?: string;
45
+ }): Promise<DesignComponent[]>;
46
+ designComponentGroups(designSystemId: string, versionId: string, filter?: {
47
+ brandId?: string;
48
+ }): Promise<DesignComponentGroup[]>;
49
+ private cached;
50
+ }