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

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 (125) hide show
  1. package/README.md +8 -12
  2. package/build/sdk-typescript/src/core/SDKSupernova.d.ts +12 -3
  3. package/build/sdk-typescript/src/core/areas/SDKAreaDataSources.d.ts +12 -14
  4. package/build/sdk-typescript/src/core/areas/SDKAreaDocumentation.d.ts +10 -9
  5. package/build/sdk-typescript/src/core/areas/SDKAreaMe.d.ts +3 -1
  6. package/build/sdk-typescript/src/core/areas/SDKAreaMessaging.d.ts +60 -0
  7. package/build/sdk-typescript/src/core/areas/SDKAreaProjects.d.ts +2098 -0
  8. package/build/sdk-typescript/src/core/areas/SDKAreaRawData.d.ts +2020 -7
  9. package/build/sdk-typescript/src/core/areas/SDKAreaRelay.d.ts +61 -0
  10. package/build/sdk-typescript/src/core/areas/SDKAreaResources.d.ts +83 -1
  11. package/build/sdk-typescript/src/core/areas/SDKAreaThreads.d.ts +81 -0
  12. package/build/sdk-typescript/src/core/areas/SDKAreaTokens.d.ts +3 -1
  13. package/build/sdk-typescript/src/core/areas/SDKAreaWorkspaces.d.ts +64 -9
  14. package/build/sdk-typescript/src/core/data/SDKDataBridge.d.ts +1 -1
  15. package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +2302 -52
  16. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreAIRequests.d.ts +19 -27
  17. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +1048 -31
  18. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +2162 -30
  19. package/build/sdk-typescript/src/core/resolvers/SDKDocsEntityItemResolver.d.ts +9 -9
  20. package/build/sdk-typescript/src/exports-pulsar.d.ts +0 -2
  21. package/build/sdk-typescript/src/exports.d.ts +37 -6
  22. package/build/sdk-typescript/src/model/base/SDKDesignSystemVersionStats.d.ts +1 -0
  23. package/build/sdk-typescript/src/model/components/SDKDesignComponentBase.d.ts +1 -0
  24. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/do-dont-guidelines/SDKDocsBlockActualDoDontGuidelines.d.ts +18 -0
  25. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/embed/SDKDocsBlockActualEmbed.d.ts +10 -0
  26. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/embed-figma/SDKDocsBlockActualEmbedFigma.d.ts +10 -0
  27. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/embed-youtube/SDKDocsBlockActualEmbedYoutube.d.ts +10 -0
  28. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/files/SDKDocsBlockActualFiles.d.ts +16 -0
  29. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/image/SDKDocsBlockActualImage.d.ts +10 -0
  30. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualDoDontGuidelines.d.ts +8 -0
  31. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualEmbed.d.ts +6 -0
  32. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualEmbedFigma.d.ts +6 -0
  33. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualEmbedYoutube.d.ts +6 -0
  34. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualFiles.d.ts +6 -0
  35. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualImage.d.ts +6 -0
  36. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualShortcutLinks.d.ts +8 -0
  37. package/build/sdk-typescript/src/model/docs/blocks/definition/actual/shortcut-links/SDKDocsBlockActualShortcutLinks.d.ts +10 -0
  38. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockCodeProperty.d.ts +3 -1
  39. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockEmbedUrlProperty.d.ts +2 -0
  40. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockFileProperty.d.ts +22 -0
  41. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockImageProperty.d.ts +3 -0
  42. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockTextProperty.d.ts +2 -0
  43. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockFigmaComponentPropsTable.d.ts +11 -0
  44. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockFigmaComponents.d.ts +11 -0
  45. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockFigmaComponentsConfig.d.ts +32 -0
  46. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockFiles.d.ts +22 -0
  47. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockGuideline.d.ts +25 -0
  48. package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockGuidelines.d.ts +6 -0
  49. package/build/sdk-typescript/src/model/documentation/builder/SDKDocumentationLegacyBlockBuilder.d.ts +1 -1
  50. package/build/sdk-typescript/src/model/enums/SDKDesignSystemRole.d.ts +2 -1
  51. package/build/sdk-typescript/src/model/enums/SDKDocsBlockBehaviorDataType.d.ts +3 -1
  52. package/build/sdk-typescript/src/model/enums/SDKDocsBlockItemPropertyType.d.ts +3 -1
  53. package/build/sdk-typescript/src/model/enums/SDKDocumentationLegacyCalloutType.d.ts +2 -1
  54. package/build/sdk-typescript/src/model/enums/SDKDocumentationLegacyHeadingType.d.ts +3 -1
  55. package/build/sdk-typescript/src/model/enums/SDKDocumentationLegacyPageBlockType.d.ts +6 -1
  56. package/build/sdk-typescript/src/model/enums/SDKFigmaComponentPreviewContainerSize.d.ts +4 -0
  57. package/build/sdk-typescript/src/model/enums/SDKTokenType.d.ts +3 -3
  58. package/build/sdk-typescript/src/model/enums/SDKUserRole.d.ts +1 -1
  59. package/build/sdk-typescript/src/model/enums/SDKWorkspaceSeatType.d.ts +3 -0
  60. package/build/sdk-typescript/src/model/enums/SDKWorkspaceSubscriptionProduct.d.ts +7 -0
  61. package/build/sdk-typescript/src/model/enums/SDKWorkspaceSubscriptionStatus.d.ts +3 -1
  62. package/build/sdk-typescript/src/model/exporters/SDKPipeline.d.ts +1 -1
  63. package/build/sdk-typescript/src/model/exporters/exporter_builds/SDKExportDestinations.d.ts +5 -0
  64. package/build/sdk-typescript/src/model/files/SDKFileUpload.d.ts +9 -0
  65. package/build/sdk-typescript/src/model/groups/SDKTokenGroup.d.ts +1 -0
  66. package/build/sdk-typescript/src/model/membership/SDKMembership.d.ts +8 -6
  67. package/build/sdk-typescript/src/model/messaging/SDKChatThread.d.ts +14 -0
  68. package/build/sdk-typescript/src/model/messaging/SDKChatThreadMessage.d.ts +51 -0
  69. package/build/sdk-typescript/src/model/projects/SDKForgeAgent.d.ts +8 -0
  70. package/build/sdk-typescript/src/model/projects/SDKForgeProject.d.ts +41 -0
  71. package/build/sdk-typescript/src/model/projects/SDKForgeProjectContext.d.ts +26 -0
  72. package/build/sdk-typescript/src/model/projects/SDKForgeProjectDocument.d.ts +19 -0
  73. package/build/sdk-typescript/src/model/projects/SDKForgeProjectDocumentPreview.d.ts +13 -0
  74. package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeature.d.ts +25 -0
  75. package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureArtifact.d.ts +13 -0
  76. package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureArtifactList.d.ts +7 -0
  77. package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureIteration.d.ts +13 -0
  78. package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureMessage.d.ts +26 -0
  79. package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureMessageList.d.ts +10 -0
  80. package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureMessageReaction.d.ts +9 -0
  81. package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeaturePreview.d.ts +13 -0
  82. package/build/sdk-typescript/src/model/projects/SDKForgeProjectInvitation.d.ts +12 -0
  83. package/build/sdk-typescript/src/model/projects/SDKForgeProjectMembership.d.ts +13 -0
  84. package/build/sdk-typescript/src/model/projects/SDKForgeProjectRelation.d.ts +13 -0
  85. package/build/sdk-typescript/src/model/projects/sections/SDKForgeProjectDocumentSection.d.ts +6 -0
  86. package/build/sdk-typescript/src/model/projects/sections/SDKForgeProjectFeatureSection.d.ts +6 -0
  87. package/build/sdk-typescript/src/model/projects/sections/SDKForgeProjectSection.d.ts +12 -0
  88. package/build/sdk-typescript/src/model/storybook/SDKStorybookUpdate.d.ts +17 -0
  89. package/build/sdk-typescript/src/model/support/SDKSource.d.ts +8 -1
  90. package/build/sdk-typescript/src/model/themes/SDKTokenTheme.d.ts +1 -1
  91. package/build/sdk-typescript/src/model/themes/SDKTokenThemeOverride.d.ts +1 -1
  92. package/build/sdk-typescript/src/model/threads/SDKThreadMessage.d.ts +36 -0
  93. package/build/sdk-typescript/src/model/threads/SDKThreadMessageList.d.ts +10 -0
  94. package/build/sdk-typescript/src/model/threads/SDKThreadMessageReaction.d.ts +9 -0
  95. package/build/sdk-typescript/src/model/tokens/SDKDimensionToken.d.ts +1 -1
  96. package/build/sdk-typescript/src/model/tokens/SDKStringToken.d.ts +1 -1
  97. package/build/sdk-typescript/src/model/tokens/SDKToken.d.ts +1 -0
  98. package/build/sdk-typescript/src/model/trail-events/SDKTrailEvent.d.ts +17 -0
  99. package/build/sdk-typescript/src/model/users/SDKUser.d.ts +7 -0
  100. package/build/sdk-typescript/src/model/users/SDKUserMembership.d.ts +12 -0
  101. package/build/sdk-typescript/src/model/workspaces/SDKWorkspace.d.ts +12 -9
  102. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceInvitation.d.ts +17 -9
  103. package/build/sdk-typescript/src/model/workspaces/SDKWorkspacePortalSettings.d.ts +12 -0
  104. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceProductFeatures.d.ts +2 -2
  105. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceProductPrice.d.ts +7 -0
  106. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceProfile.d.ts +8 -26
  107. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceSubscription.d.ts +75 -38
  108. package/build/sdk-typescript/src/tests/Areas/AreaRelay.spec.d.ts +1 -0
  109. package/build/sdk-typescript/src/tests/Areas/AreaThreads.spec.d.ts +1 -0
  110. package/build/sdk-typescript/src/tests/helpers.d.ts +1 -0
  111. package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTMapLoader.d.ts +1 -1
  112. package/build/sdk-typescript/src/tools/docs-block-builder/SDKDocsBlockBuilder.d.ts +13 -2
  113. package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownLinkResolver.d.ts +39 -0
  114. package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownTransform.d.ts +2 -2
  115. package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownTransformBlock.d.ts +33 -10
  116. package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownTransformUtil.d.ts +8 -3
  117. package/build/sdk-typescript/src/utils/RawUtils.d.ts +53 -3
  118. package/build/supernova-sdk-typescript.js +1 -2
  119. package/build/supernova-sdk-typescript.js.map +1 -1
  120. package/package.json +19 -29
  121. package/build/sdk-typescript/src/core/areas/SDKAreaAI.d.ts +0 -75
  122. package/build/sdk-typescript/src/model/acl/SDKAcl.d.ts +0 -51
  123. package/build/sdk-typescript/src/model/exporters/remote/SDKRemotePipelineModel.d.ts +0 -51
  124. package/build/supernova-sdk-typescript.js.LICENSE.txt +0 -8
  125. /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,5 +1,8 @@
1
- import { Acl } from "../../model/acl/SDKAcl";
1
+ import { DTOPortalSettingsUpdatePayload } from "@supernova-studio/client";
2
+ import { WorkspaceSeatType } from "@supernova-studio/model";
2
3
  import { UserRole } from "../../model/enums/SDKUserRole";
4
+ import { WorkspaceSubscriptionPlanInterval } from "../../model/enums/SDKWorkspaceSubscriptionPlanInterval";
5
+ import { SubscriptionCheckoutProductCode } from "../../model/enums/SDKWorkspaceSubscriptionProduct";
3
6
  import { Membership } from "../../model/membership/SDKMembership";
4
7
  import { UserMembership } from "../../model/users/SDKUserMembership";
5
8
  import { UserWorkspaceNotificationSettings, UserWorkspaceNotificationSettingsUpdateModel } from "../../model/users/SDKUserWorkspaceNotificationSettings";
@@ -14,7 +17,7 @@ import { WorkspaceProduct } from "../../model/workspaces/SDKWorkspaceProduct";
14
17
  import { SubscriptionProductFeatures } from "../../model/workspaces/SDKWorkspaceProductFeatures";
15
18
  import { WorkspaceProfileUpdateModel } from "../../model/workspaces/SDKWorkspaceProfile";
16
19
  import { WorkspaceSSOSettings, WorkspaceSSOSettingsUpdateModel } from "../../model/workspaces/SDKWorkspaceSSOSettings";
17
- import { WorkspaceSubscription, WorkspaceSubscriptionUpdateModel } from "../../model/workspaces/SDKWorkspaceSubscription";
20
+ import { WorkspaceSubscription, WorkspaceSubscriptionUpdateModel, WorkspaceSubscriptionUpdateModelLegacy, WorkspaceSubscriptionUpdatePreviewModel } from "../../model/workspaces/SDKWorkspaceSubscription";
18
21
  import { DataCore } from "../data/SDKDataCore";
19
22
  export declare class AreaWorkspaces {
20
23
  /** Internal: Engine */
@@ -51,7 +54,6 @@ export declare class AreaWorkspaces {
51
54
  * @returns Product features
52
55
  */
53
56
  workspaceProductFeatures(workspaceId: string): Promise<SubscriptionProductFeatures>;
54
- acls(): Promise<Acl>;
55
57
  /** Fetches workspace onboarding status
56
58
  * @param workspaceId - ID of the workspace
57
59
  * @returns Workspace onboarding status
@@ -97,6 +99,19 @@ export declare class AreaWorkspaces {
97
99
  * @returns All available products
98
100
  */
99
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
+ }>;
100
115
  /** Creates new workspace and retrieves the newly created workspace object. The user who creates the workspace becomes its owner
101
116
  * @param name - Name of the workspace
102
117
  * @returns Newly created workspace object
@@ -108,6 +123,17 @@ export declare class AreaWorkspaces {
108
123
  * @returns Nothing
109
124
  */
110
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
+ }): Promise<void>;
111
137
  /** tests accessibility of IP allowlist settings
112
138
  * @param workspaceId - ID of the workspace
113
139
  * @param ipWhitelistSettings - settings to test
@@ -163,31 +189,44 @@ export declare class AreaWorkspaces {
163
189
  * @param workspaceId - ID of the workspace
164
190
  * @param userId - ID of the user
165
191
  * @param newRole - New role of the user
192
+ * @param newSeatType - New seat type of the user
166
193
  * @returns Nothing
167
194
  */
168
- updateWorkspaceMemberRole(workspaceId: string, userId: string, newRole: UserRole): Promise<void>;
195
+ updateWorkspaceMemberRole(workspaceId: string, userId: string, newRole: UserRole, newSeatType?: WorkspaceSeatType): Promise<void>;
169
196
  /** Updates a role of an invitation.
170
197
  * @param workspaceId - ID of the workspace
171
198
  * @param invitationId - ID of the invitation
172
199
  * @param newRole - New role
200
+ * @param newSeatType - New seat type
173
201
  * @returns Nothing
174
202
  */
175
- updateWorkspaceInvitationRole(workspaceId: string, invitationId: string, newRole: UserRole): Promise<void>;
203
+ updateWorkspaceInvitationRole(workspaceId: string, invitationId: string, newRole: UserRole, newSeatType?: WorkspaceSeatType): Promise<void>;
176
204
  /** Invites new members to the workspace
177
205
  * @param workspaceId - ID of the workspace
178
206
  * @param invitations - array of invitations
179
207
  * @returns Nothing
180
208
  */
181
209
  addWorkspaceInvitations(workspaceId: string, invitations: Array<WorkspaceInvitationUpdateModel>, designSystemId: string | undefined): Promise<void>;
210
+ /** Creates a new Stripe checkout session to change current subscription.
211
+ * @param workspaceId - ID of the workspace
212
+ * @param successUrl - URL to redirect to after successful payment
213
+ * @param cancelUrl - URL to redirect to after failed payment
214
+ * @param plan - Plan to be selected in the checkout
215
+ * @param interval - Interval (monthly / yearly) of the plan
216
+ * @param fullSeats - Number of full seats the subscription will have
217
+ * @param builderSeats - Number of builder seats the subscription will have
218
+ * @param additionalCredits - Additional credits per month
219
+ * @returns string - URL to the Stripe checkout
220
+ */
221
+ createCheckoutSessionForSubscriptionChange(workspaceId: string, successUrl: string, cancelUrl: string, plan: SubscriptionCheckoutProductCode, interval: WorkspaceSubscriptionPlanInterval, fullSeats: number, builderSeats: number, additionalCredits: number): Promise<string>;
182
222
  /** Creates a new Stripe checkout session.
183
223
  * @param workspaceId - ID of the workspace
184
- * @param priceId - ID of the Stripe price to be applied to the workspace
185
224
  * @param successUrl - URL to redirect to after successful payment
186
225
  * @param cancelUrl - URL to redirect to after failed payment
187
- * @param quantity - number of seats to be pre-selected in the checkout
226
+ * @param centAmount - number of cents to be selected in the checkout
188
227
  * @returns string - URL to the Stripe checkout
189
228
  */
190
- createCheckoutSession(workspaceId: string, priceId: string, successUrl: string, cancelUrl: string, quantity?: number | null): Promise<string>;
229
+ createCheckoutSessionForTopUpCredits(workspaceId: string, successUrl: string, cancelUrl: string, centAmount: number): Promise<string>;
191
230
  /** Creates a new Stripe customer portal session.
192
231
  * @param workspaceId - ID of the workspace
193
232
  * @param returnUrl - URL to redirect to from the portal
@@ -195,7 +234,17 @@ export declare class AreaWorkspaces {
195
234
  * @param cancel - describes if the subscription must be cancelled
196
235
  * @returns string - URL to the Stripe customer portal
197
236
  */
198
- createPortalSession(workspaceId: string, returnUrl: string, update?: WorkspaceSubscriptionUpdateModel | null, cancel?: boolean | null): Promise<string>;
237
+ createPortalSession(workspaceId: string, returnUrl: string, update?: WorkspaceSubscriptionUpdateModelLegacy | null, cancel?: boolean | null): Promise<string>;
238
+ /** Update an existing subscription.
239
+ * @param workspaceId - ID of the workspace
240
+ * @param update - describes the subscription updates to be applied
241
+ */
242
+ updateSubscription(workspaceId: string, update: WorkspaceSubscriptionUpdateModel): Promise<void>;
243
+ /** Preview subscription changes.
244
+ * @param workspaceId - ID of the workspace
245
+ * @param update - describes the subscription updates to be applied
246
+ */
247
+ previewSubscriptionUpdate(workspaceId: string, update: WorkspaceSubscriptionUpdateModel): Promise<WorkspaceSubscriptionUpdatePreviewModel>;
199
248
  /** Resend an invitation to the workspace.
200
249
  * @param workspaceId - ID of the workspace
201
250
  * @param invitationId - ID of the invitation
@@ -207,6 +256,12 @@ export declare class AreaWorkspaces {
207
256
  * @returns Nothing
208
257
  */
209
258
  restoreWorkspaceSubscription(workspaceId: string): Promise<void>;
259
+ /** Updates portal settings
260
+ * @param workspaceId - ID of the workspace
261
+ * @param settings - updated settings
262
+ * @returns Nothing
263
+ */
264
+ updateWorkspacePortalSettings(workspaceId: string, settings: DTOPortalSettingsUpdatePayload): Promise<void>;
210
265
  /** Deletes a single workspace. This action is irreversible, all data will be lost, and can only be performed by the workspace owner
211
266
  * @param workspaceId - ID of the workspace
212
267
  * @returns Nothing
@@ -41,7 +41,7 @@ export declare class DataBridge {
41
41
  debugRequestObserver: DebugRequestObserver | null;
42
42
  debugResponseObserver: DebugResponseObserver | null;
43
43
  constructor(conf: DataBridgeConfiguration);
44
- delete(endpoint: string): Promise<any>;
44
+ delete(endpoint: string, payload?: any | null): Promise<any>;
45
45
  get(endpoint: string): Promise<any>;
46
46
  getStreamed(endpoint: string): Promise<ReadableStreamDefaultReader<Uint8Array>>;
47
47
  getAsData(endpoint: string): Promise<any>;