@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.
- package/README.md +8 -12
- package/build/sdk-typescript/src/core/SDKSupernova.d.ts +12 -3
- package/build/sdk-typescript/src/core/areas/SDKAreaDataSources.d.ts +12 -14
- package/build/sdk-typescript/src/core/areas/SDKAreaDocumentation.d.ts +10 -9
- package/build/sdk-typescript/src/core/areas/SDKAreaMe.d.ts +3 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaMessaging.d.ts +60 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaProjects.d.ts +2098 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaRawData.d.ts +2020 -7
- package/build/sdk-typescript/src/core/areas/SDKAreaRelay.d.ts +61 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaResources.d.ts +83 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaThreads.d.ts +81 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaTokens.d.ts +3 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaWorkspaces.d.ts +64 -9
- package/build/sdk-typescript/src/core/data/SDKDataBridge.d.ts +1 -1
- package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +2302 -52
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreAIRequests.d.ts +19 -27
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +1048 -31
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +2162 -30
- package/build/sdk-typescript/src/core/resolvers/SDKDocsEntityItemResolver.d.ts +9 -9
- package/build/sdk-typescript/src/exports-pulsar.d.ts +0 -2
- package/build/sdk-typescript/src/exports.d.ts +37 -6
- package/build/sdk-typescript/src/model/base/SDKDesignSystemVersionStats.d.ts +1 -0
- package/build/sdk-typescript/src/model/components/SDKDesignComponentBase.d.ts +1 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/do-dont-guidelines/SDKDocsBlockActualDoDontGuidelines.d.ts +18 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/embed/SDKDocsBlockActualEmbed.d.ts +10 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/embed-figma/SDKDocsBlockActualEmbedFigma.d.ts +10 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/embed-youtube/SDKDocsBlockActualEmbedYoutube.d.ts +10 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/files/SDKDocsBlockActualFiles.d.ts +16 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/image/SDKDocsBlockActualImage.d.ts +10 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualDoDontGuidelines.d.ts +8 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualEmbed.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualEmbedFigma.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualEmbedYoutube.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualFiles.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualImage.d.ts +6 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/portal/SDKDocsBlockActualShortcutLinks.d.ts +8 -0
- package/build/sdk-typescript/src/model/docs/blocks/definition/actual/shortcut-links/SDKDocsBlockActualShortcutLinks.d.ts +10 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockCodeProperty.d.ts +3 -1
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockEmbedUrlProperty.d.ts +2 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockFileProperty.d.ts +22 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockImageProperty.d.ts +3 -0
- package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockTextProperty.d.ts +2 -0
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockFigmaComponentPropsTable.d.ts +11 -0
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockFigmaComponents.d.ts +11 -0
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockFigmaComponentsConfig.d.ts +32 -0
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockFiles.d.ts +22 -0
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockGuideline.d.ts +25 -0
- package/build/sdk-typescript/src/model/documentation/blocks/SDKDocumentationLegacyPageBlockGuidelines.d.ts +6 -0
- package/build/sdk-typescript/src/model/documentation/builder/SDKDocumentationLegacyBlockBuilder.d.ts +1 -1
- package/build/sdk-typescript/src/model/enums/SDKDesignSystemRole.d.ts +2 -1
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockBehaviorDataType.d.ts +3 -1
- package/build/sdk-typescript/src/model/enums/SDKDocsBlockItemPropertyType.d.ts +3 -1
- package/build/sdk-typescript/src/model/enums/SDKDocumentationLegacyCalloutType.d.ts +2 -1
- package/build/sdk-typescript/src/model/enums/SDKDocumentationLegacyHeadingType.d.ts +3 -1
- package/build/sdk-typescript/src/model/enums/SDKDocumentationLegacyPageBlockType.d.ts +6 -1
- package/build/sdk-typescript/src/model/enums/SDKFigmaComponentPreviewContainerSize.d.ts +4 -0
- package/build/sdk-typescript/src/model/enums/SDKTokenType.d.ts +3 -3
- package/build/sdk-typescript/src/model/enums/SDKUserRole.d.ts +1 -1
- package/build/sdk-typescript/src/model/enums/SDKWorkspaceSeatType.d.ts +3 -0
- package/build/sdk-typescript/src/model/enums/SDKWorkspaceSubscriptionProduct.d.ts +7 -0
- package/build/sdk-typescript/src/model/enums/SDKWorkspaceSubscriptionStatus.d.ts +3 -1
- package/build/sdk-typescript/src/model/exporters/SDKPipeline.d.ts +1 -1
- package/build/sdk-typescript/src/model/exporters/exporter_builds/SDKExportDestinations.d.ts +5 -0
- package/build/sdk-typescript/src/model/files/SDKFileUpload.d.ts +9 -0
- package/build/sdk-typescript/src/model/groups/SDKTokenGroup.d.ts +1 -0
- package/build/sdk-typescript/src/model/membership/SDKMembership.d.ts +8 -6
- package/build/sdk-typescript/src/model/messaging/SDKChatThread.d.ts +14 -0
- package/build/sdk-typescript/src/model/messaging/SDKChatThreadMessage.d.ts +51 -0
- package/build/sdk-typescript/src/model/projects/SDKForgeAgent.d.ts +8 -0
- package/build/sdk-typescript/src/model/projects/SDKForgeProject.d.ts +41 -0
- package/build/sdk-typescript/src/model/projects/SDKForgeProjectContext.d.ts +26 -0
- package/build/sdk-typescript/src/model/projects/SDKForgeProjectDocument.d.ts +19 -0
- package/build/sdk-typescript/src/model/projects/SDKForgeProjectDocumentPreview.d.ts +13 -0
- package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeature.d.ts +25 -0
- package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureArtifact.d.ts +13 -0
- package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureArtifactList.d.ts +7 -0
- package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureIteration.d.ts +13 -0
- package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureMessage.d.ts +26 -0
- package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureMessageList.d.ts +10 -0
- package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeatureMessageReaction.d.ts +9 -0
- package/build/sdk-typescript/src/model/projects/SDKForgeProjectFeaturePreview.d.ts +13 -0
- package/build/sdk-typescript/src/model/projects/SDKForgeProjectInvitation.d.ts +12 -0
- package/build/sdk-typescript/src/model/projects/SDKForgeProjectMembership.d.ts +13 -0
- package/build/sdk-typescript/src/model/projects/SDKForgeProjectRelation.d.ts +13 -0
- package/build/sdk-typescript/src/model/projects/sections/SDKForgeProjectDocumentSection.d.ts +6 -0
- package/build/sdk-typescript/src/model/projects/sections/SDKForgeProjectFeatureSection.d.ts +6 -0
- package/build/sdk-typescript/src/model/projects/sections/SDKForgeProjectSection.d.ts +12 -0
- package/build/sdk-typescript/src/model/storybook/SDKStorybookUpdate.d.ts +17 -0
- package/build/sdk-typescript/src/model/support/SDKSource.d.ts +8 -1
- package/build/sdk-typescript/src/model/themes/SDKTokenTheme.d.ts +1 -1
- package/build/sdk-typescript/src/model/themes/SDKTokenThemeOverride.d.ts +1 -1
- package/build/sdk-typescript/src/model/threads/SDKThreadMessage.d.ts +36 -0
- package/build/sdk-typescript/src/model/threads/SDKThreadMessageList.d.ts +10 -0
- package/build/sdk-typescript/src/model/threads/SDKThreadMessageReaction.d.ts +9 -0
- package/build/sdk-typescript/src/model/tokens/SDKDimensionToken.d.ts +1 -1
- package/build/sdk-typescript/src/model/tokens/SDKStringToken.d.ts +1 -1
- package/build/sdk-typescript/src/model/tokens/SDKToken.d.ts +1 -0
- package/build/sdk-typescript/src/model/trail-events/SDKTrailEvent.d.ts +17 -0
- package/build/sdk-typescript/src/model/users/SDKUser.d.ts +7 -0
- package/build/sdk-typescript/src/model/users/SDKUserMembership.d.ts +12 -0
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspace.d.ts +12 -9
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceInvitation.d.ts +17 -9
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspacePortalSettings.d.ts +12 -0
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceProductFeatures.d.ts +2 -2
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceProductPrice.d.ts +7 -0
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceProfile.d.ts +8 -26
- package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceSubscription.d.ts +75 -38
- package/build/sdk-typescript/src/tests/Areas/AreaRelay.spec.d.ts +1 -0
- package/build/sdk-typescript/src/tests/Areas/AreaThreads.spec.d.ts +1 -0
- package/build/sdk-typescript/src/tests/helpers.d.ts +1 -0
- package/build/sdk-typescript/src/tools/design-tokens/utilities/SDKDTMapLoader.d.ts +1 -1
- package/build/sdk-typescript/src/tools/docs-block-builder/SDKDocsBlockBuilder.d.ts +13 -2
- package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownLinkResolver.d.ts +39 -0
- package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownTransform.d.ts +2 -2
- package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownTransformBlock.d.ts +33 -10
- package/build/sdk-typescript/src/tools/markdown-transform/SDKToolsMarkdownTransformUtil.d.ts +8 -3
- package/build/sdk-typescript/src/utils/RawUtils.d.ts +53 -3
- package/build/supernova-sdk-typescript.js +1 -2
- package/build/supernova-sdk-typescript.js.map +1 -1
- package/package.json +19 -29
- package/build/sdk-typescript/src/core/areas/SDKAreaAI.d.ts +0 -75
- package/build/sdk-typescript/src/model/acl/SDKAcl.d.ts +0 -51
- package/build/sdk-typescript/src/model/exporters/remote/SDKRemotePipelineModel.d.ts +0 -51
- package/build/supernova-sdk-typescript.js.LICENSE.txt +0 -8
- /package/build/sdk-typescript/src/tests/Areas/{AreaAI.spec.d.ts → AreaMessaging.spec.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -39,17 +39,14 @@ npm install @supernovaio/sdk
|
|
|
39
39
|
|
|
40
40
|
Supernova SDK is made to run in both local (like Node.js) and remote environments (like browsers) so you can use it to develop your React sites or any kind of tool you would like to run as client-side app.
|
|
41
41
|
|
|
42
|
-
|
|
43
42
|
## Obtaining API Key
|
|
44
43
|
|
|
45
44
|
Before you can use the SDK, you must obtain your personal access key from your [Supernova.io](https://supernova.io) profile. To do this, sign-in to [Supernova Cloud](https://cloud.supernova.io/), click on your profile picture > profile settings > authentication and generate a new key. [See more information](https://developers.supernova.io/getting-started#obtain-your-developer-key) if you need additional help.
|
|
46
45
|
|
|
47
|
-
|
|
48
46
|
## Access Rights
|
|
49
47
|
|
|
50
48
|
Usage of the SDK adheres to the [general access rights](https://learn.supernova.io/workspace/team-management/roles.html) that the account which generated the access key has. For example, if you are a viewer in a specific workspace, then you will not be able to do any change to that workspace through the SDK and error will be thrown instead. For vast majority of use-cases, being editor-level is enough however.
|
|
51
49
|
|
|
52
|
-
|
|
53
50
|
## Quick-start
|
|
54
51
|
|
|
55
52
|
It is time to put this SDK to good use! To start, import the main Supernova SDK object:
|
|
@@ -83,8 +80,8 @@ Workspace 1
|
|
|
83
80
|
|
|
84
81
|
- `Workspace` is what you are a member of and is object that encapsulates everything, from your team to all design systems that were created under it. You can be a member of an unlimited number of workspaces, but in the majority of cases users are members of just a single one. You can have different roles and access rights under each of the workspaces you belong to.
|
|
85
82
|
- Every `Design System` belongs to one `Workspace` and contains things like design system configuration, integration settings and admin-related tools.
|
|
86
|
-
- Each `Design System` contains at minimum one active `Version` called `Shared Draft` - this version is where you write your data and is the only one which is allowed to be written to as well.
|
|
87
|
-
- `Version` is data container for all design system information - like `Tokens`, `Assets`, `DesignComponents` and `Documentation`.
|
|
83
|
+
- Each `Design System` contains at minimum one active `Version` called `Shared Draft` - this version is where you write your data and is the only one which is allowed to be written to as well.
|
|
84
|
+
- `Version` is data container for all design system information - like `Tokens`, `Assets`, `DesignComponents` and `Documentation`.
|
|
88
85
|
- `Version` object has all methods you need to access every piece of data you have in Supernova design system.
|
|
89
86
|
- Each `Version` additionally contains `Brands`. As Supernova supports multi-branded design systems, `Brands` further separate data into data packs that only represent data belonging to one specific brand (for example, set of core tokens shared across all brands, but then subset of tokens specific only to that brand).
|
|
90
87
|
- There is always at least one `Brand` in each `Version`, even if multi-branded functionality is disabled.
|
|
@@ -96,14 +93,12 @@ To access the data, you first need to select which `Workspace`, `Design System`
|
|
|
96
93
|
|
|
97
94
|
You can find full list of [what is possible, and how, here](https://github.com/Supernova-Studio/sdk-typescript/tree/main/docs).
|
|
98
95
|
|
|
99
|
-
|
|
100
96
|
## Resolution Caching
|
|
101
97
|
|
|
102
|
-
Supernova SDK works little bit differently than you would probably expect by default. Because of how complex the design system data is (as an example, a token can contain references to other tokens and can also be made of different types of tokens which can then be used in designComponents...) the SDK does all necessary resolution for you beforehand.
|
|
98
|
+
Supernova SDK works little bit differently than you would probably expect by default. Because of how complex the design system data is (as an example, a token can contain references to other tokens and can also be made of different types of tokens which can then be used in designComponents...) the SDK does all necessary resolution for you beforehand.
|
|
103
99
|
|
|
104
100
|
To allow reuse of the data, the resolved results are cached and used in follow-up resolutions (for example, if you would first access your design tokens and then access documentation that uses the tokens, tokens would be reused). In many situations, this is what you want. However, there are some cases where this behavior is not what you want, like longer-running sessions:
|
|
105
101
|
|
|
106
|
-
|
|
107
102
|
### Longer-running sessions
|
|
108
103
|
|
|
109
104
|
If you are building a client-side app, your users might stay there for a long time without refreshing their session (like reloading a browser). This means the data will always come from the time of the first request as you are always using the same Supernova instance. To prevent this, you can disable cache layer completely:
|
|
@@ -121,7 +116,9 @@ SDK should be released via CI by opening PR `develop -> publish-sdk` branch once
|
|
|
121
116
|
Please, in this PR:
|
|
122
117
|
|
|
123
118
|
- bump a version in `sdk-typescript/scripts/packages/**.json` files
|
|
124
|
-
- check that versions of `@supernova-studio/client` and `@supernova-studio/model` are
|
|
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.
|
|
125
122
|
|
|
126
123
|
Several packages are released:
|
|
127
124
|
|
|
@@ -144,11 +141,10 @@ As this is still beta, we are working hard on improving it before the first offi
|
|
|
144
141
|
- [ ] Automation triggers
|
|
145
142
|
- [ ] More examples
|
|
146
143
|
|
|
147
|
-
|
|
148
144
|
## Contributions
|
|
149
145
|
|
|
150
|
-
If you have additional ideas about how to make this project better, let us know by opening an issue! You can also open pull requests if you've worked on improving something yourself and would like to contribute back to the community.
|
|
146
|
+
If you have additional ideas about how to make this project better, let us know by opening an issue! You can also open pull requests if you've worked on improving something yourself and would like to contribute back to the community.
|
|
151
147
|
|
|
152
148
|
We will be reviewing feature-pull-requests on case-by-case basis, but in general, we are super open to your new ideas and we welcome them! And finally, thank you for your support! You are an amazing community.
|
|
153
149
|
|
|
154
|
-
Supernova Engineering Team
|
|
150
|
+
Supernova Engineering Team
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { AreaAI } from "./areas/SDKAreaAI";
|
|
2
1
|
import { AreaAssets } from "./areas/SDKAreaAssets";
|
|
3
2
|
import { AreaAutomation } from "./areas/SDKAreaAutomation";
|
|
4
3
|
import { AreaBrands } from "./areas/SDKAreaBrands";
|
|
@@ -11,11 +10,15 @@ import { AreaDocsAnalytics } from "./areas/SDKAreaDocsAnalytics";
|
|
|
11
10
|
import { AreaDocumentation } from "./areas/SDKAreaDocumentation";
|
|
12
11
|
import { AreaIntegrations } from "./areas/SDKAreaIntegrations";
|
|
13
12
|
import { AreaMe } from "./areas/SDKAreaMe";
|
|
13
|
+
import { AreaMessaging } from "./areas/SDKAreaMessaging";
|
|
14
14
|
import { AreaMultiplayer } from "./areas/SDKAreaMultiplayer";
|
|
15
15
|
import { AreaNetwork } from "./areas/SDKAreaNetwork";
|
|
16
|
+
import { AreaProjects } from "./areas/SDKAreaProjects";
|
|
16
17
|
import { AreaRawData } from "./areas/SDKAreaRawData";
|
|
18
|
+
import { AreaRelay } from "./areas/SDKAreaRelay";
|
|
17
19
|
import { AreaResources } from "./areas/SDKAreaResources";
|
|
18
20
|
import { AreaStorage } from "./areas/SDKAreaStorage";
|
|
21
|
+
import { AreaThreads } from "./areas/SDKAreaThreads";
|
|
19
22
|
import { AreaTokens } from "./areas/SDKAreaTokens";
|
|
20
23
|
import { AreaUsers } from "./areas/SDKAreaUsers";
|
|
21
24
|
import { AreaVersions } from "./areas/SDKAreaVersions";
|
|
@@ -38,6 +41,10 @@ export declare class Supernova {
|
|
|
38
41
|
versions: AreaVersions;
|
|
39
42
|
/** Get, create, update, manipulate or delete brands */
|
|
40
43
|
brands: AreaBrands;
|
|
44
|
+
/** Get, create, update, manipulate or delete projects */
|
|
45
|
+
projects: AreaProjects;
|
|
46
|
+
/** Get, create, update, manipulate or delete threads */
|
|
47
|
+
threads: AreaThreads;
|
|
41
48
|
/** Get, create, update, manipulate or delete tokens */
|
|
42
49
|
tokens: AreaTokens;
|
|
43
50
|
/** Get, create, update, manipulate or delete components */
|
|
@@ -72,8 +79,10 @@ export declare class Supernova {
|
|
|
72
79
|
network: AreaNetwork;
|
|
73
80
|
/** Get access to multiplayer capabilities */
|
|
74
81
|
multiplayer: AreaMultiplayer;
|
|
75
|
-
/** Get access to
|
|
76
|
-
|
|
82
|
+
/** Get access to Supernova Relay capabilities */
|
|
83
|
+
relay: AreaRelay;
|
|
84
|
+
/** Get access to Supernova messaging capabilities */
|
|
85
|
+
messaging: AreaMessaging;
|
|
77
86
|
/** Get access to raw data for local-only restoration of data */
|
|
78
87
|
raw: AreaRawData;
|
|
79
88
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DTODataSourceStorybookCreatePayload, DTOStorybookImportPayload } from "@supernova-studio/client";
|
|
1
|
+
import { DTODataSourceStorybookCreatePayload, DTOStorybookEntryReplaceAction, DTOStorybookImportPayload } from "@supernova-studio/client";
|
|
2
2
|
import { StorybookEntry } from "../../model/storybook/SDKStorybookEntry";
|
|
3
3
|
import { FigmaStructure } from "../../model/support/SDKFigmaStructure";
|
|
4
4
|
import { FigmaStructureDetail } from "../../model/support/SDKFigmaStructureDetail";
|
|
@@ -15,10 +15,16 @@ export declare class AreaDataSources {
|
|
|
15
15
|
*/
|
|
16
16
|
getDataSourceById(from: RemoteVersionIdentifier, sourceId: string): Promise<Source>;
|
|
17
17
|
/** Retrieves all sources associated with specified design system
|
|
18
|
-
* @param from - Remote version
|
|
19
|
-
* @returns All data sources
|
|
18
|
+
* @param from - Remote version or design system identifier
|
|
19
|
+
* @returns All data sources for the specified design system
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated versionId is not required; prefer using the `designSystemId` only.
|
|
20
23
|
*/
|
|
21
24
|
getDataSources(from: RemoteVersionIdentifier): Promise<Array<Source>>;
|
|
25
|
+
getDataSources(from: {
|
|
26
|
+
designSystemId: string;
|
|
27
|
+
}): Promise<Array<Source>>;
|
|
22
28
|
/** Retrieves all figma frames structures
|
|
23
29
|
* @param from - Remote version to fetch from
|
|
24
30
|
* @returns All data sources in the specified version
|
|
@@ -54,16 +60,8 @@ export declare class AreaDataSources {
|
|
|
54
60
|
autoImport?: SourceRemoteModelCloud["autoImportMode"];
|
|
55
61
|
themeId?: string | null;
|
|
56
62
|
}): Promise<Source>;
|
|
57
|
-
linkStorybookSource(from: RemoteVersionIdentifier, payload: DTODataSourceStorybookCreatePayload
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
updateStorybookSource(from: RemoteVersionIdentifier, payload: DTOStorybookImportPayload): Promise<{
|
|
61
|
-
isFailed: boolean;
|
|
62
|
-
docsCount: number;
|
|
63
|
-
storiesCount: number;
|
|
64
|
-
created: string[];
|
|
65
|
-
updated: string[];
|
|
66
|
-
deleted: string[];
|
|
67
|
-
}>;
|
|
63
|
+
linkStorybookSource(from: RemoteVersionIdentifier, payload: DTODataSourceStorybookCreatePayload): Promise<Source>;
|
|
64
|
+
updateStorybookSource(from: RemoteVersionIdentifier, payload: DTOStorybookImportPayload): Promise<import("../../model/storybook/SDKStorybookUpdate").StorybookUpdate>;
|
|
65
|
+
replaceStorybookStory(from: RemoteVersionIdentifier, storyId: string, payload: DTOStorybookEntryReplaceAction): Promise<any>;
|
|
68
66
|
deleteFigmaSource(from: RemoteVersionIdentifier, sourceId: string): Promise<void>;
|
|
69
67
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTODeleteDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTOMoveDocumentationGroupInput, DTOCreateDocumentationTabInput, DTODocumentationPageAnchor, DTODesignElementsDataDiffResponse, DTOPublishDocumentationRequest, DTOElementActionInput, DTOElementActionOutput } from "@supernova-studio/client";
|
|
1
|
+
import { DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTODeleteDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTOMoveDocumentationGroupInput, DTOCreateDocumentationTabInput, DTODocumentationPageAnchor, DTODesignElementsDataDiffResponse, DTOPublishDocumentationRequest, DTOElementActionInput, DTOElementActionOutput, DTODocumentationPageDependenciesGetResponse } from "@supernova-studio/client";
|
|
2
2
|
import { DocumentationLegacy, DocumentationLegacyModel } from "../../model/base/SDKDocumentationLegacy";
|
|
3
3
|
import { DocsBlockDefinition } from "../../model/docs/blocks/definition/SDKDocsBlockDefinition";
|
|
4
4
|
import { DocsBlock } from "../../model/docs/blocks/usage/SDKDocsBlock";
|
|
@@ -7,6 +7,7 @@ import { DocsEntityGroupModel } from "../../model/docs/entities/SDKDocsEntityGro
|
|
|
7
7
|
import { DocsEntityPageModel } from "../../model/docs/entities/SDKDocsEntityPage";
|
|
8
8
|
import { DocsSection } from "../../model/docs/sections/SDKDocsSection";
|
|
9
9
|
import { DocumentationLegacyGroup } from "../../model/documentation/SDKDocumentationLegacyGroup";
|
|
10
|
+
import { DocumentationLegacyPage } from "../../model/documentation/SDKDocumentationLegacyPage";
|
|
10
11
|
import { DocsPublishStatus } from "../../model/enums/SDKDocsPublishStatus";
|
|
11
12
|
import { DocumentationEnvironment } from "../../model/enums/SDKDocumentationEnvironment";
|
|
12
13
|
import { ExportBuild, ExportBuildStatus } from "../../model/exporters/exporter_builds/SDKExportBuild";
|
|
@@ -166,17 +167,15 @@ export declare class AreaDocumentation {
|
|
|
166
167
|
* @returns nothing
|
|
167
168
|
*/
|
|
168
169
|
ungroupDocumentationGroup(from: RemoteWorkspaceVersionIdentifier, payload: DTODeleteDocumentationGroupInput): Promise<void>;
|
|
169
|
-
/** Fetches
|
|
170
|
-
* Not implemented for now
|
|
171
|
-
* @param from - Remote version to fetch from
|
|
172
|
-
* @returnsDocumentationLegacy object
|
|
173
|
-
*/
|
|
174
|
-
getDocumentationStructureFromRoot(from: RemoteWorkspaceVersionIdentifier): Promise<DocumentationLegacyGroup>;
|
|
175
|
-
/** Fetches entire documentation documentation structure, including all pages and groups and their payloads
|
|
170
|
+
/** Fetches entire documentation including content in the legacy format
|
|
176
171
|
* @param from - Remote version to fetch from
|
|
177
172
|
* @returns All documentation items
|
|
178
173
|
*/
|
|
179
|
-
|
|
174
|
+
getFullDocumentationLegacyRepresentation(from: RemoteWorkspaceVersionIdentifier): Promise<{
|
|
175
|
+
rootGroup: DocumentationLegacyGroup;
|
|
176
|
+
allPages: Array<DocumentationLegacyPage>;
|
|
177
|
+
allGroups: Array<DocumentationLegacyGroup>;
|
|
178
|
+
}>;
|
|
180
179
|
/** Get ID of the multiplayer room for a given documentation page
|
|
181
180
|
* @param from - Remote version to fetch from
|
|
182
181
|
* @param pageId - ID of the documentation page
|
|
@@ -209,7 +208,9 @@ export declare class AreaDocumentation {
|
|
|
209
208
|
* */
|
|
210
209
|
publishDrafts(to: RemoteWorkspaceVersionIdentifier, environment: DocumentationEnvironment, changes: DTOPublishDocumentationRequest["changes"], isForcing?: boolean): Promise<ExportBuild>;
|
|
211
210
|
getDocumentationPageAnchors(from: RemoteWorkspaceVersionIdentifier, pageId: string): Promise<Array<DTODocumentationPageAnchor>>;
|
|
211
|
+
getDocumentationDependencies(from: RemoteVersionIdentifier): Promise<DTODocumentationPageDependenciesGetResponse["dependencies"]>;
|
|
212
212
|
getDocumentationMockedStructure(): Array<DocsEntity>;
|
|
213
213
|
getDocumentationMockedPageContent(pageId: string): Array<DocsBlock | DocsSection>;
|
|
214
214
|
getDocumentationMockedEditorBlockDefinitions(): Array<DocsBlockDefinition>;
|
|
215
|
+
getPortalMockedEditorBlockDefinitions(): Array<DocsBlockDefinition>;
|
|
215
216
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { User } from "../../model/users/SDKUser";
|
|
1
|
+
import { User, UserUpdateModel } from "../../model/users/SDKUser";
|
|
2
2
|
import { UserProfileUpdateModel } from "../../model/users/SDKUserProfile";
|
|
3
3
|
import { DataCore } from "../data/SDKDataCore";
|
|
4
4
|
export declare class AreaMe {
|
|
@@ -9,6 +9,8 @@ export declare class AreaMe {
|
|
|
9
9
|
me(): Promise<User>;
|
|
10
10
|
/** Invalidates all session keys for the current user, effectively logging out from all decises. */
|
|
11
11
|
logout(): Promise<void>;
|
|
12
|
+
/** Updates the current user. */
|
|
13
|
+
updateMe(userId: string, payload: UserUpdateModel): Promise<void>;
|
|
12
14
|
/** Updates the current user based on the API key provided to Supernova instance. */
|
|
13
15
|
updateProfile(userId: string, profile: UserProfileUpdateModel): Promise<void>;
|
|
14
16
|
/** Updates the avatar of the current user */
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { DTOForgeChatMessageScoreInput, DTOForgeChatMessageTagInput } from "@supernova-studio/client";
|
|
2
|
+
import { ChatThread } from "../../model/messaging/SDKChatThread";
|
|
3
|
+
import { ChatThreadMessage, ChatThreadMessageInput } from "../../model/messaging/SDKChatThreadMessage";
|
|
4
|
+
import { DataCore } from "../data/SDKDataCore";
|
|
5
|
+
export declare class AreaMessaging {
|
|
6
|
+
private dataCore;
|
|
7
|
+
constructor(dataCore: DataCore);
|
|
8
|
+
/**
|
|
9
|
+
* Lists chat threads in the specified workspace for the current user based on the session.
|
|
10
|
+
* @param workspaceId - The ID of the workspace.
|
|
11
|
+
* @param limit - Optional limit on the number of threads to return.
|
|
12
|
+
* @param offset - Optional offset for pagination.
|
|
13
|
+
* @returns An array of ChatThread objects.
|
|
14
|
+
*/
|
|
15
|
+
listChatThreads(workspaceId: string, limit?: number, offset?: number): Promise<Array<ChatThread>>;
|
|
16
|
+
/**
|
|
17
|
+
* Fetches a specific chat thread by its ID. This method retrieves the thread details including its messages and is the only way to get thread content.
|
|
18
|
+
* @param workspaceId - The ID of the workspace.
|
|
19
|
+
* @param thread - The thread object to update.
|
|
20
|
+
* @returns A new copy of the The ChatThread object with filled-in messages.
|
|
21
|
+
*/
|
|
22
|
+
getChatThreadMessages(workspaceId: string, thread: ChatThread): Promise<ChatThread>;
|
|
23
|
+
/**
|
|
24
|
+
* Fetches a specific chat thread by its ID. This method retrieves the thread details including its messages and is the only way to get thread content.
|
|
25
|
+
* @param workspaceId - The ID of the workspace.
|
|
26
|
+
* @param threadId - The ID of the thread.
|
|
27
|
+
* @returns A new copy of the The ChatThread object with filled-in messages.
|
|
28
|
+
*/
|
|
29
|
+
getChatThreadMessagesByThreadId(workspaceId: string, threadId: string): Promise<Array<ChatThreadMessage>>;
|
|
30
|
+
/**
|
|
31
|
+
* Creates a new chat thread in the specified workspace associated with the current user based on the session.
|
|
32
|
+
* @param workspaceId - The ID of the workspace.
|
|
33
|
+
* @param title - Optional title for the thread (defaults to "Untitled").
|
|
34
|
+
* @returns The created ChatThread.
|
|
35
|
+
*/
|
|
36
|
+
createChatThread(workspaceId: string, title?: string): Promise<ChatThread>;
|
|
37
|
+
/**
|
|
38
|
+
* Updates the title of a specific chat thread.
|
|
39
|
+
* @param workspaceId - The ID of the workspace.
|
|
40
|
+
* @param threadId - The ID of the thread to update.
|
|
41
|
+
* @param newTitle - The new title for the thread.
|
|
42
|
+
* @returns The updated ChatThread.
|
|
43
|
+
*/
|
|
44
|
+
updateChatThreadTitle(workspaceId: string, threadId: string, newTitle: string): Promise<ChatThread>;
|
|
45
|
+
/**
|
|
46
|
+
* Creates a new message in the specific chat thread.
|
|
47
|
+
* @param workspaceId - The ID of the workspace.
|
|
48
|
+
* @param threadId - The ID of the thread.
|
|
49
|
+
* @param messageInput - The message details including payload, senderType, and optional persona.
|
|
50
|
+
* @returns The created ChatThreadMessage.
|
|
51
|
+
*/
|
|
52
|
+
createChatThreadMessage(workspaceId: string, threadId: string, messageInput: ChatThreadMessageInput): Promise<ChatThreadMessage>;
|
|
53
|
+
scoreChatThreadMessage(workspaceId: string, threadId: string, scores: Array<DTOForgeChatMessageScoreInput>, tags?: Array<DTOForgeChatMessageTagInput>): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Deletes a specific chat thread and all its messages.
|
|
56
|
+
* @param workspaceId - The ID of the workspace.
|
|
57
|
+
* @param threadId - The ID of the thread to delete.
|
|
58
|
+
*/
|
|
59
|
+
deleteChatThread(workspaceId: string, threadId: string): Promise<void>;
|
|
60
|
+
}
|