@supernova-studio/supernova-sdk-beta 2.0.31 → 2.0.36
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/build/sdk-typescript/src/core/SDKSupernova.d.ts +10 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaAI.d.ts +34 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaAssets.d.ts +7 -4
- package/build/sdk-typescript/src/core/areas/SDKAreaAutomation.d.ts +26 -7
- package/build/sdk-typescript/src/core/areas/SDKAreaDesignSystems.d.ts +19 -1
- package/build/sdk-typescript/src/core/areas/SDKAreaDocumentation.d.ts +11 -8
- package/build/sdk-typescript/src/core/areas/SDKAreaImport.d.ts +16 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaRawData.d.ts +84 -0
- package/build/sdk-typescript/src/core/areas/SDKAreaResources.d.ts +6 -1
- package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +52 -10
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreAIRequests.d.ts +15 -0
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +19 -2
- package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +416 -9
- package/build/sdk-typescript/src/core/resolvers/SDKDesignComponentGroupResolver.d.ts +5 -0
- package/build/sdk-typescript/src/core/resolvers/SDKDocsEntityItemResolver.d.ts +212 -0
- package/build/sdk-typescript/src/exports.d.ts +21 -2
- package/build/sdk-typescript/src/model/assets/SDKAsset.d.ts +24 -1
- package/build/sdk-typescript/src/model/base/SDKBrand.d.ts +1 -2
- package/build/sdk-typescript/src/model/base/SDKDesignSystemVersionStats.d.ts +11 -0
- package/build/sdk-typescript/src/model/components/SDKDesignComponent.d.ts +1 -0
- package/build/sdk-typescript/src/model/components/SDKDesignComponentVariant.d.ts +1 -0
- package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntity.d.ts +6 -5
- package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityApprovalState.d.ts +2 -2
- package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityGroup.d.ts +8 -16
- package/build/sdk-typescript/src/model/docs/entities/SDKDocsEntityPage.d.ts +10 -9
- package/build/sdk-typescript/src/model/elements/SDKElementProperty.d.ts +4 -0
- package/build/sdk-typescript/src/model/elements/SDKElementPropertyOption.d.ts +1 -1
- package/build/sdk-typescript/src/model/exporters/SDKExporter.d.ts +15 -0
- package/build/sdk-typescript/src/model/exporters/SDKExporterJobDestination.d.ts +36 -0
- package/build/sdk-typescript/src/model/exporters/SDKPipeline.d.ts +3 -54
- package/build/sdk-typescript/src/model/exporters/custom_properties/SDKExporterPropertyBase.d.ts +11 -0
- package/build/sdk-typescript/src/model/exporters/custom_properties/SDKExporterPropertyBoolean.d.ts +7 -0
- package/build/sdk-typescript/src/model/exporters/custom_properties/SDKExporterPropertyDefinition.d.ts +6 -0
- package/build/sdk-typescript/src/model/exporters/custom_properties/SDKExporterPropertyEnum.d.ts +14 -0
- package/build/sdk-typescript/src/model/exporters/custom_properties/SDKExporterPropertyNumber.d.ts +7 -0
- package/build/sdk-typescript/src/model/exporters/custom_properties/SDKExporterPropertyObject.d.ts +12 -0
- package/build/sdk-typescript/src/model/exporters/custom_properties/SDKExporterPropertyString.d.ts +7 -0
- package/build/sdk-typescript/src/model/exporters/exporter_builds/SDKExportBuildResults.d.ts +2 -2
- package/build/sdk-typescript/src/model/groups/SDKAssetGroup.d.ts +4 -0
- package/build/sdk-typescript/src/model/groups/SDKDesignComponentGroup.d.ts +7 -0
- package/build/sdk-typescript/src/model/support/SDKDesignComponentOrigin.d.ts +15 -1
- package/build/sdk-typescript/src/model/tokens/remote/SDKRemoteTokenModel.d.ts +1 -0
- package/build/sdk-typescript/src/model/users/SDKUser.d.ts +5 -1
- package/build/sdk-typescript/src/model/users/SDKUserProfile.d.ts +17 -0
- package/build/sdk-typescript/src/tests/helpers.d.ts +2 -5
- package/build/sdk-typescript/src/tests/validators.d.ts +24 -23
- package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewSegmentGenerator.d.ts +26 -1
- package/build/sdk-typescript/src/tools/token-preview/TokenUtilPreviewTypes.d.ts +2 -0
- package/build/sdk-typescript/src/tools/token-transform/SDKToolsTokenTransform.d.ts +2 -0
- package/build/sdk-typescript/src/utils/TokenUtils.d.ts +5 -0
- package/build/sdk-typescript/vitest.config-ci.d.ts +2 -0
- package/build/sdk-typescript/vitest.config-token-studio.d.ts +2 -0
- package/build/sdk-typescript/vitest.config.d.ts +2 -0
- package/build/supernova-sdk-typescript.js +1 -1
- package/build/supernova-sdk-typescript.js.map +1 -1
- package/package.json +3 -3
- package/build/sdk-typescript/src/core/resolvers/SDKDocsEntityMultiplayerItemResolver.d.ts +0 -7
- package/build/sdk-typescript/src/tests/Tooling/ReadTokens.spec.d.ts +0 -1
- package/build/sdk-typescript/src/tests/Tooling/TokensModel.spec.d.ts +0 -1
- package/build/sdk-typescript/src/tests/Tooling/ToolDocSearch.spec.d.ts +0 -1
- package/build/sdk-typescript/src/tests/Tooling/ToolMarkdownTransform.spec.d.ts +0 -1
- /package/build/sdk-typescript/src/tests/Areas/{AreaAssets.spec.d.ts → AreaImport.spec.d.ts} +0 -0
- /package/build/sdk-typescript/src/tests/Tooling/{PluginFigmaTokens.spec.d.ts → TokensModel.spec.token-studio.d.ts} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { AreaAI } from "./areas/SDKAreaAI";
|
|
1
2
|
import { AreaAssets } from "./areas/SDKAreaAssets";
|
|
2
3
|
import { AreaAutomation } from "./areas/SDKAreaAutomation";
|
|
3
4
|
import { AreaBrands } from "./areas/SDKAreaBrands";
|
|
@@ -6,10 +7,12 @@ import { AreaComponents } from "./areas/SDKAreaComponents";
|
|
|
6
7
|
import { AreaDataSources } from "./areas/SDKAreaDataSources";
|
|
7
8
|
import { AreaDesignSystems } from "./areas/SDKAreaDesignSystems";
|
|
8
9
|
import { AreaDocumentation } from "./areas/SDKAreaDocumentation";
|
|
10
|
+
import { AreaImport } from "./areas/SDKAreaImport";
|
|
9
11
|
import { AreaIntegrations } from "./areas/SDKAreaIntegrations";
|
|
10
12
|
import { AreaMe } from "./areas/SDKAreaMe";
|
|
11
13
|
import { AreaMultiplayer } from "./areas/SDKAreaMultiplayer";
|
|
12
14
|
import { AreaNetwork } from "./areas/SDKAreaNetwork";
|
|
15
|
+
import { AreaRawData } from "./areas/SDKAreaRawData";
|
|
13
16
|
import { AreaResources } from "./areas/SDKAreaResources";
|
|
14
17
|
import { AreaStorage } from "./areas/SDKAreaStorage";
|
|
15
18
|
import { AreaTokens } from "./areas/SDKAreaTokens";
|
|
@@ -57,12 +60,18 @@ export declare class Supernova {
|
|
|
57
60
|
dataSources: AreaDataSources;
|
|
58
61
|
/** Get, create, update, manipulate or delete data from Supernova en masse */
|
|
59
62
|
bulkOperations: AreaBulkOperations;
|
|
63
|
+
/** Import data to Supernova directly */
|
|
64
|
+
import: AreaImport;
|
|
60
65
|
/** Read and write data using Supernova key-value storage */
|
|
61
66
|
storage: AreaStorage;
|
|
62
67
|
/** Get access to network in exporter packages */
|
|
63
68
|
network: AreaNetwork;
|
|
64
69
|
/** Get access to multiplayer capabilities */
|
|
65
70
|
multiplayer: AreaMultiplayer;
|
|
71
|
+
/** Get access to AI capabilities */
|
|
72
|
+
ai: AreaAI;
|
|
73
|
+
/** Get access to raw data for local-only restoration of data */
|
|
74
|
+
raw: AreaRawData;
|
|
66
75
|
/**
|
|
67
76
|
* Create new Supernova.io SDK object.
|
|
68
77
|
* @param apiKey API key to use for authentication
|
|
@@ -77,4 +86,5 @@ export declare class Supernova {
|
|
|
77
86
|
bypassEnvFetch?: boolean;
|
|
78
87
|
proxyUrl?: string;
|
|
79
88
|
});
|
|
89
|
+
get apiKeySet(): boolean;
|
|
80
90
|
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { DataCore } from "../data/SDKDataCore";
|
|
2
|
+
import { RemoteVersionIdentifier, RemoteWorkspaceVersionIdentifier } from "./SDKRemoteIdentifiers";
|
|
3
|
+
export declare class AreaAI {
|
|
4
|
+
/** Internal: Engine */
|
|
5
|
+
private dataCore;
|
|
6
|
+
constructor(dataCore: DataCore);
|
|
7
|
+
/** Generates code for the associated design system components for provided user prompt
|
|
8
|
+
* @param from - Design system to use
|
|
9
|
+
* @param prompt - Prompt to generate code for
|
|
10
|
+
* @param components - Components to generate code for
|
|
11
|
+
* @returns Forged component code
|
|
12
|
+
*/
|
|
13
|
+
forgeCode(from: RemoteVersionIdentifier, prompt: string, components: Array<any>): Promise<string>;
|
|
14
|
+
/** Reforges code for the associated design system components for provided user prompt, taking into account existing code
|
|
15
|
+
* @param from - Design system to use
|
|
16
|
+
* @param prompt - Prompt to generate code for
|
|
17
|
+
* @param components - Components to generate code for
|
|
18
|
+
* @param existingCode - Existing code to reforge
|
|
19
|
+
* @returns Reforged component code
|
|
20
|
+
*/
|
|
21
|
+
reforgeCode(from: RemoteVersionIdentifier, prompt: string, components: Array<any>, existingCode: string): Promise<string>;
|
|
22
|
+
/** Reforges code for the associated design system components for provided user prompt, taking into account existing code
|
|
23
|
+
* @param from - Design system to use
|
|
24
|
+
* @param prompt - Prompt to generate code for
|
|
25
|
+
* @param components - Components to generate code for
|
|
26
|
+
* @param existingCode - Existing code to reforge
|
|
27
|
+
* @returns Reforged component code
|
|
28
|
+
*/
|
|
29
|
+
proposeTitle(from: RemoteVersionIdentifier, firstForgeQuery: string): Promise<string>;
|
|
30
|
+
/** Answers question based on the data of design system in natural language */
|
|
31
|
+
answerQuestion(from: RemoteWorkspaceVersionIdentifier, persona: "designer" | "developer" | "code", askQuery: string): Promise<string>;
|
|
32
|
+
/** Indexes a design system so it can be asked in natural language */
|
|
33
|
+
indexDS(from: RemoteWorkspaceVersionIdentifier): Promise<string>;
|
|
34
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DTOFigmaNode, DTOFigmaNodeRenderInput } from "@supernova-studio/client";
|
|
1
|
+
import { DTOFigmaNode, DTOFigmaNodeRenderIdInput, DTOFigmaNodeRenderInput, DTOFigmaNodeV2 } from "@supernova-studio/client";
|
|
2
2
|
import { Asset } from "../../model/assets/SDKAsset";
|
|
3
3
|
import { RenderedAsset } from "../../model/assets/SDKRenderedAsset";
|
|
4
4
|
import { AssetFormat } from "../../model/enums/SDKAssetFormat";
|
|
@@ -37,7 +37,10 @@ export declare class AreaAssets {
|
|
|
37
37
|
*
|
|
38
38
|
* @returns Rendered Figma frames
|
|
39
39
|
*/
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
|
|
40
|
+
getRenderedFigmaFramesAsync(from: RemoteVersionIdentifier, nodesToRender: Array<DTOFigmaNodeRenderInput>): Promise<Array<DTOFigmaNodeV2>>;
|
|
41
|
+
/** Renders figma frames based on the source and node id. The result is a URL to the hosted image of the Figma frame that is stable across updates.
|
|
42
|
+
*
|
|
43
|
+
* @returns Rendered Figma frames
|
|
44
|
+
*/
|
|
45
|
+
getRenderedFigmaFrames(from: RemoteVersionIdentifier, framesToRender: Array<DTOFigmaNodeRenderIdInput>): Promise<Array<DTOFigmaNode>>;
|
|
43
46
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { DTOExporterPropertyValueMap, DTOPipelineCreateBody, DTOPipelineUpdateBody } from "@supernova-studio/client";
|
|
1
2
|
import { Exporter, NewExporterPayload } from "../../model/exporters/SDKExporter";
|
|
2
|
-
import {
|
|
3
|
+
import { ExporterJobDestination } from "../../model/exporters/SDKExporterJobDestination";
|
|
4
|
+
import { Pipeline } from "../../model/exporters/SDKPipeline";
|
|
3
5
|
import { ExporterCustomBlockVariant } from "../../model/exporters/custom_blocks/SDKExporterCustomBlockVariant";
|
|
4
6
|
import { ExporterConfigurationProperty } from "../../model/exporters/custom_properties/SDKExporterConfigurationProperty";
|
|
5
7
|
import { ExportBuild } from "../../model/exporters/exporter_builds/SDKExportBuild";
|
|
@@ -18,6 +20,11 @@ export declare class AreaAutomation {
|
|
|
18
20
|
* @param versionId - Identifier of the version where the pipeline is installed
|
|
19
21
|
*/
|
|
20
22
|
getExportBuilds(workspaceId: string, versionId: string): Promise<Array<ExportBuild>>;
|
|
23
|
+
/** Fetches a single export build.
|
|
24
|
+
* @param workspaceId - Identifier of the workspace associated with the build.
|
|
25
|
+
* @param buildId - Identifier of the build.
|
|
26
|
+
*/
|
|
27
|
+
getExportBuild(workspaceId: string, buildId: string): Promise<ExportBuild>;
|
|
21
28
|
/** Fetches build logs of a specific build
|
|
22
29
|
* @param workspaceId - Identifier of the workspace where the pipeline is installed
|
|
23
30
|
* @param buildId - Identifier of the build to fetch logs for
|
|
@@ -77,28 +84,40 @@ export declare class AreaAutomation {
|
|
|
77
84
|
scheduleImportJobForFigmaSources(from: RemoteVersionIdentifier, sourceIds: Array<string>, dryRun?: boolean): Promise<ImportJob>;
|
|
78
85
|
/** Create pipeline
|
|
79
86
|
* @param workspaceId string
|
|
80
|
-
* @param
|
|
87
|
+
* @param payload
|
|
81
88
|
* @returns Pipeline
|
|
82
89
|
*/
|
|
83
|
-
createPipeline(workspaceId: string,
|
|
90
|
+
createPipeline(workspaceId: string, payload: DTOPipelineCreateBody): Promise<Pipeline>;
|
|
84
91
|
/** Update pipeline
|
|
85
|
-
* @param workspaceId string
|
|
86
|
-
* @param pipeline Pipeline
|
|
87
92
|
* @returns Pipeline
|
|
93
|
+
* @param designSystemId
|
|
94
|
+
* @param pipelineId
|
|
95
|
+
* @param payload
|
|
88
96
|
*/
|
|
89
|
-
updatePipeline(
|
|
97
|
+
updatePipeline(designSystemId: string, pipelineId: string, payload: DTOPipelineUpdateBody): Promise<Pipeline>;
|
|
90
98
|
/**
|
|
91
99
|
* Run pipeline
|
|
92
100
|
* @param workspaceId string
|
|
93
101
|
* @param designSystemVersionId string
|
|
94
102
|
* @param pipelineId string
|
|
95
103
|
*/
|
|
96
|
-
runPipeline(workspaceId: string, designSystemVersionId: string, pipelineId: string): Promise<
|
|
104
|
+
runPipeline(workspaceId: string, designSystemVersionId: string, pipelineId: string): Promise<ExportBuild>;
|
|
97
105
|
/** Create exporter
|
|
98
106
|
* @param workspaceId string
|
|
99
107
|
* @param payload NewExporterPayload
|
|
100
108
|
* @returns Exporter
|
|
101
109
|
*/
|
|
102
110
|
createExporter(workspaceId: string, payload: NewExporterPayload): Promise<Exporter>;
|
|
111
|
+
/** Create exporter build
|
|
112
|
+
* @param workspaceId string
|
|
113
|
+
* @param designSystemId string
|
|
114
|
+
* @param versionId string
|
|
115
|
+
* @param exporterId string
|
|
116
|
+
* @param destinations
|
|
117
|
+
* @param brandId
|
|
118
|
+
* @param themePersistentIds
|
|
119
|
+
* @param exporterConfigurationProperties
|
|
120
|
+
*/
|
|
121
|
+
createExporterBuild(workspaceId: string, designSystemId: string, versionId: string, exporterId: string, destinations: ExporterJobDestination, brandId: string | undefined, themePersistentIds: Array<string> | undefined, exporterConfigurationProperties: DTOExporterPropertyValueMap | undefined): Promise<ExportBuild>;
|
|
103
122
|
deletePipeline(workspaceId: string, pipelineId: string): Promise<void>;
|
|
104
123
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DTODocumentationLinkPreviewRequest, DTODocumentationPageApprovalStateChangeInput } from "@supernova-studio/client";
|
|
1
|
+
import { DTODocumentationLinkPreviewRequest, DTODocumentationPageApprovalStateChangeInput, DTOPageRedirectCreateBody, DTOPageRedirectUpdateBody } from "@supernova-studio/client";
|
|
2
2
|
import { DesignSystemInvite, DesignSystemInviteUpdate, DesignSystemMemberUpdate, DesignSystemPendingMemberInvite, DesignSystemUserInvitation } from "@supernova-studio/model";
|
|
3
3
|
import { DesignSystem, DesignSystemAccessMode, DesignSystemSwitcher } from "../../model/base/SDKDesignSystem";
|
|
4
4
|
import { DesignSystemContactList } from "../../model/base/SDKDesignSystemContactList";
|
|
@@ -24,6 +24,13 @@ export declare class AreaDesignSystems {
|
|
|
24
24
|
* @returns custom domain information
|
|
25
25
|
*/
|
|
26
26
|
designSystemCustomDomain(designSystemId: string): Promise<CustomDomain>;
|
|
27
|
+
/** Fetches design system stats
|
|
28
|
+
* @param dsId - Design system ID
|
|
29
|
+
* @param versionId - Version ID
|
|
30
|
+
* @param brandId - Brand ID to filter by
|
|
31
|
+
* @returns Design system stats
|
|
32
|
+
*/
|
|
33
|
+
designSystemStats(dsId: string, versionId: string, brandId?: string): Promise<import("../../model/base/SDKDesignSystemVersionStats").DesignSystemVersionStats>;
|
|
27
34
|
/** Fetches specific design system's memberships
|
|
28
35
|
* @param designSystemId - Design system's identifier
|
|
29
36
|
* @returns Design system's memberships
|
|
@@ -151,4 +158,15 @@ export declare class AreaDesignSystems {
|
|
|
151
158
|
* @returns nothing
|
|
152
159
|
*/
|
|
153
160
|
startSslGenerationForCustomDomain(designSystemId: string): Promise<void>;
|
|
161
|
+
getPageRedirects(designSystemId: string): Promise<{
|
|
162
|
+
path: string;
|
|
163
|
+
id: string;
|
|
164
|
+
createdAt: Date;
|
|
165
|
+
updatedAt: Date;
|
|
166
|
+
designSystemId: string;
|
|
167
|
+
pagePersistentId: string;
|
|
168
|
+
}[]>;
|
|
169
|
+
createPageRedirect(designSystemId: string, body: DTOPageRedirectCreateBody): Promise<void>;
|
|
170
|
+
updatePageRedirect(designSystemId: string, redirectId: string, body: DTOPageRedirectUpdateBody): Promise<void>;
|
|
171
|
+
deletePageRedirect(designSystemId: string, redirectId: string): Promise<void>;
|
|
154
172
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import { DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTODeleteDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTOMoveDocumentationGroupInput, DTOCreateDocumentationTabInput, DTODocumentationPageAnchor, DTODesignElementsDataDiffResponse, DTOPublishDocumentationRequest } from "@supernova-studio/client";
|
|
1
|
+
import { DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTODeleteDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTOMoveDocumentationGroupInput, DTOCreateDocumentationTabInput, DTODocumentationPageAnchor, DTODesignElementsDataDiffResponse, DTOPublishDocumentationRequest, DTOElementActionInput, DTOElementActionOutput } from "@supernova-studio/client";
|
|
2
2
|
import { DocumentationLegacy, DocumentationLegacyModel } from "../../model/base/SDKDocumentationLegacy";
|
|
3
3
|
import { DocsBlockDefinition } from "../../model/docs/blocks/definition/SDKDocsBlockDefinition";
|
|
4
|
-
import { DocsBlock } from "../../model/docs/blocks/usage/SDKDocsBlock";
|
|
5
|
-
import { DocsEntity } from "../../model/docs/entities/SDKDocsEntity";
|
|
6
4
|
import { DocsEntityGroupModel } from "../../model/docs/entities/SDKDocsEntityGroup";
|
|
7
5
|
import { DocsEntityPageModel } from "../../model/docs/entities/SDKDocsEntityPage";
|
|
8
|
-
import { DocsSection } from "../../model/docs/sections/SDKDocsSection";
|
|
9
6
|
import { DocumentationLegacyGroup } from "../../model/documentation/SDKDocumentationLegacyGroup";
|
|
7
|
+
import { DocumentationLegacyPage } from "../../model/documentation/SDKDocumentationLegacyPage";
|
|
10
8
|
import { DocsPublishStatus } from "../../model/enums/SDKDocsPublishStatus";
|
|
11
9
|
import { DocumentationEnvironment } from "../../model/enums/SDKDocumentationEnvironment";
|
|
12
10
|
import { ExportBuild, ExportBuildStatus } from "../../model/exporters/exporter_builds/SDKExportBuild";
|
|
@@ -67,6 +65,8 @@ export declare class AreaDocumentation {
|
|
|
67
65
|
* @returns Newly created documentation page
|
|
68
66
|
*/
|
|
69
67
|
createDocumentationPage(from: RemoteWorkspaceVersionIdentifier, payload: Omit<DTOCreateDocumentationPageInputV2, "persistentId">): Promise<string>;
|
|
68
|
+
/** General element action */
|
|
69
|
+
elementAction(from: RemoteWorkspaceVersionIdentifier, payload: DTOElementActionInput): Promise<DTOElementActionOutput>;
|
|
70
70
|
/** Creates a documentation group within documentation group
|
|
71
71
|
* @param from - Remote version to fetch from
|
|
72
72
|
* @param parentItemPersistentId - Peristent ID of the parent group
|
|
@@ -155,9 +155,9 @@ export declare class AreaDocumentation {
|
|
|
155
155
|
* @param from - Remote version to fetch from
|
|
156
156
|
* @param idInVersion - id of page or tab to be duplicated
|
|
157
157
|
* @param newPersistentId - suggested persistent id of a new group or tabbed page
|
|
158
|
-
* @returns
|
|
158
|
+
* @returns duplicated group persistent id
|
|
159
159
|
*/
|
|
160
|
-
duplicateDocumentationGroupOrTabbedPage(from: RemoteWorkspaceVersionIdentifier, payload: Omit<DTODuplicateDocumentationGroupInput, "persistentId">): Promise<
|
|
160
|
+
duplicateDocumentationGroupOrTabbedPage(from: RemoteWorkspaceVersionIdentifier, payload: Omit<DTODuplicateDocumentationGroupInput, "persistentId">): Promise<string>;
|
|
161
161
|
/** Ungroups a documentation group
|
|
162
162
|
* @param from - Remote version to fetch from
|
|
163
163
|
* @param idInVersion - id of a group
|
|
@@ -207,7 +207,10 @@ export declare class AreaDocumentation {
|
|
|
207
207
|
* */
|
|
208
208
|
publishDrafts(to: RemoteWorkspaceVersionIdentifier, environment: DocumentationEnvironment, changes: DTOPublishDocumentationRequest["changes"], isForcing?: boolean): Promise<ExportBuild>;
|
|
209
209
|
getDocumentationPageAnchors(from: RemoteWorkspaceVersionIdentifier, pageId: string): Promise<Array<DTODocumentationPageAnchor>>;
|
|
210
|
-
getDocumentationMockedStructure(): Array<DocsEntity>;
|
|
211
|
-
getDocumentationMockedPageContent(pageId: string): Array<DocsBlock | DocsSection>;
|
|
212
210
|
getDocumentationMockedEditorBlockDefinitions(): Array<DocsBlockDefinition>;
|
|
211
|
+
/** Fetches all documentation pages with content
|
|
212
|
+
* @param from - Remote version to fetch from
|
|
213
|
+
* @returns Array of documentation pages (legacy, non-multiplayer model)
|
|
214
|
+
*/
|
|
215
|
+
getDocumentationPagesWithContentLegacy(from: RemoteWorkspaceVersionIdentifier): Promise<Array<DocumentationLegacyPage>>;
|
|
213
216
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DTODocumentationPageUpdateDocumentActionInputV2 } from "@supernova-studio/client";
|
|
2
|
+
import { DataCore } from "../data/SDKDataCore";
|
|
3
|
+
import { RemoteWorkspaceVersionIdentifier } from "./SDKRemoteIdentifiers";
|
|
4
|
+
export type DocumentationPageContent = DTODocumentationPageUpdateDocumentActionInputV2["input"]["documentItems"];
|
|
5
|
+
export declare class AreaImport {
|
|
6
|
+
/** Internal: Engine */
|
|
7
|
+
private dataCore;
|
|
8
|
+
constructor(dataCore: DataCore);
|
|
9
|
+
/** Imports documentation page content
|
|
10
|
+
* @param from - Remote version to import to
|
|
11
|
+
* @param pageId - ID of the page to import content into
|
|
12
|
+
* @param content - Content to import
|
|
13
|
+
* @returns nothing
|
|
14
|
+
*/
|
|
15
|
+
importDocumentationPage(from: RemoteWorkspaceVersionIdentifier, pageId: string, content: DocumentationPageContent): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Asset } from "../../model/assets/SDKAsset";
|
|
2
|
+
import { Brand, BrandRemoteModel } from "../../model/base/SDKBrand";
|
|
3
|
+
import { DesignSystem, // @ts-expect-error TS(2305): Module '"../../model/base/SDKDesignSystem"' has no exported member named 'DesignSystemRemoteModel'.
|
|
4
|
+
DesignSystemRemoteModel } from "../../model/base/SDKDesignSystem";
|
|
5
|
+
import { DesignSystemVersion, DesignSystemVersionRemoteModel } from "../../model/base/SDKDesignSystemVersion";
|
|
6
|
+
import { Component, ComponentRemoteModel } from "../../model/components/SDKComponent";
|
|
7
|
+
import { DesignComponentRemoteModel } from "../../model/components/SDKDesignComponent";
|
|
8
|
+
import { ElementDataView, ElementDataViewRemoteModel } from "../../model/elements/SDKElementDataView";
|
|
9
|
+
import { ElementProperty, ElementPropertyRemoteModel } from "../../model/elements/SDKElementProperty";
|
|
10
|
+
import { ElementPropertyValue, ElementPropertyValueRemoteModel } from "../../model/elements/values/SDKElementPropertyValue";
|
|
11
|
+
import { AssetGroup } from "../../model/groups/SDKAssetGroup";
|
|
12
|
+
import { ComponentGroup, ComponentGroupRemoteModel } from "../../model/groups/SDKComponentGroup";
|
|
13
|
+
import { DesignComponentGroupRemoteModel } from "../../model/groups/SDKDesignComponentGroup";
|
|
14
|
+
import { TokenGroup, TokenGroupRemoteModel } from "../../model/groups/SDKTokenGroup";
|
|
15
|
+
import { Membership, MembershipRemoteModel } from "../../model/membership/SDKMembership";
|
|
16
|
+
import { Source, SourceRemoteModel } from "../../model/support/SDKSource";
|
|
17
|
+
import { Token } from "../../model/tokens/SDKToken";
|
|
18
|
+
import { TokenRemoteModel } from "../../model/tokens/remote/SDKRemoteTokenModel";
|
|
19
|
+
import { DataCore } from "../data/SDKDataCore";
|
|
20
|
+
export declare class AreaRawData {
|
|
21
|
+
/** Internal: Engine */
|
|
22
|
+
private dataCore;
|
|
23
|
+
constructor(dataCore: DataCore);
|
|
24
|
+
/** Fetches raw data necessary for construction of components */
|
|
25
|
+
getRawComponentModelData(designSystemId: string, versionId: string): Promise<Array<ComponentRemoteModel>>;
|
|
26
|
+
/** Fetches raw data necessary for component groups */
|
|
27
|
+
getRawComponentGroupModelData(designSystemId: string, versionId: string): Promise<Array<ComponentGroupRemoteModel>>;
|
|
28
|
+
/** Fetches raw data necessary for assets */
|
|
29
|
+
getRawAssetModelData(designSystemId: string, versionId: string): Promise<Array<DesignComponentRemoteModel>>;
|
|
30
|
+
/** Fetches raw data necessary for asset groups */
|
|
31
|
+
getRawAssetGroupModelData(designSystemId: string, versionId: string): Promise<Array<DesignComponentGroupRemoteModel>>;
|
|
32
|
+
/** Fetches raw data necessary for tokens */
|
|
33
|
+
getRawTokenModelData(designSystemId: string, versionId: string): Promise<Array<TokenRemoteModel>>;
|
|
34
|
+
/** Fetches raw data necessary for token groups */
|
|
35
|
+
getRawTokenGroupModelData(designSystemId: string, versionId: string): Promise<Array<TokenGroupRemoteModel>>;
|
|
36
|
+
/** Fetches raw data necessary for elements */
|
|
37
|
+
getRawElementModelData(designSystemId: string, versionId: string): Promise<{
|
|
38
|
+
propertyValues: Array<ElementPropertyValueRemoteModel>;
|
|
39
|
+
propertyViews: Array<ElementDataViewRemoteModel>;
|
|
40
|
+
propertyDefinitions: Array<ElementPropertyRemoteModel>;
|
|
41
|
+
}>;
|
|
42
|
+
/** Fetches raw source data */
|
|
43
|
+
getRawSourceModelData(designSystemId: string): Promise<Array<SourceRemoteModel>>;
|
|
44
|
+
/** Fetches raw membership */
|
|
45
|
+
getRawMembershipModelData(userId: string): Promise<Array<MembershipRemoteModel>>;
|
|
46
|
+
/** Fetches raw design systems */
|
|
47
|
+
getRawDesignSystemModelData(workspaceId: string): Promise<Array<DesignSystemRemoteModel>>;
|
|
48
|
+
/** Fetches raw versions */
|
|
49
|
+
getRawVersionModelData(designSystemId: string): Promise<Array<DesignSystemVersionRemoteModel>>;
|
|
50
|
+
/** Fetches raw brands */
|
|
51
|
+
getRawBrandModelData(designSystemId: string, versionId: string): Promise<Array<BrandRemoteModel>>;
|
|
52
|
+
/** Builds components from raw data */
|
|
53
|
+
buildComponentsFromRaw(rawData: Array<ComponentRemoteModel>, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>): Array<Component>;
|
|
54
|
+
/** Build component groups */
|
|
55
|
+
buildComponentGroupsFromRaw(rawData: Array<ComponentGroupRemoteModel>, components: Array<Component>): Array<ComponentGroup>;
|
|
56
|
+
/** Builds assets from raw data */
|
|
57
|
+
buildAssetsFromRaw(rawData: Array<DesignComponentRemoteModel>, sources: Array<Source>): Array<Asset>;
|
|
58
|
+
/** Build asset groups */
|
|
59
|
+
buildAssetGroupsFromRaw(rawData: Array<DesignComponentGroupRemoteModel>, assets: Array<Asset>): Array<AssetGroup>;
|
|
60
|
+
/** Builds tokens from raw data */
|
|
61
|
+
buildTokensFromRaw(rawData: Array<TokenRemoteModel>, properties: Array<ElementProperty>, propertyValues: Array<ElementPropertyValue>, propertyViews: Array<ElementDataView>, tokenGroups: Array<TokenGroup>, sources: Array<Source>, designSystemId: string, versionId: string): Array<Token>;
|
|
62
|
+
/** Build token groups */
|
|
63
|
+
buildTokenGroupsFromRaw(rawData: Array<TokenGroupRemoteModel>): Array<TokenGroup>;
|
|
64
|
+
/** Builds elements from raw data */
|
|
65
|
+
buildElementsFromRaw(rawData: {
|
|
66
|
+
propertyValues: Array<ElementPropertyValueRemoteModel>;
|
|
67
|
+
propertyViews: Array<ElementDataViewRemoteModel>;
|
|
68
|
+
propertyDefinitions: Array<ElementPropertyRemoteModel>;
|
|
69
|
+
}): {
|
|
70
|
+
propertyValues: Array<ElementPropertyValue>;
|
|
71
|
+
propertyViews: Array<ElementDataView>;
|
|
72
|
+
propertyDefinitions: Array<ElementProperty>;
|
|
73
|
+
};
|
|
74
|
+
/** Build sources */
|
|
75
|
+
buildSourcesFromRaw(rawData: Array<SourceRemoteModel>): Array<Source>;
|
|
76
|
+
/** Builds memberships */
|
|
77
|
+
buildMembershipsFromRaw(rawData: Array<MembershipRemoteModel>): Array<Membership>;
|
|
78
|
+
/** Builds design systems */
|
|
79
|
+
buildDesignSystemsFromRaw(rawData: Array<DesignSystemRemoteModel>): Array<DesignSystem>;
|
|
80
|
+
/** Builds versions */
|
|
81
|
+
buildVersionsFromRaw(rawData: Array<DesignSystemVersionRemoteModel>): Array<DesignSystemVersion>;
|
|
82
|
+
/** Builds brands */
|
|
83
|
+
buildBrandsFromRaw(rawData: Array<BrandRemoteModel>): Array<Brand>;
|
|
84
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DTOFigmaNode } from "@supernova-studio/client";
|
|
1
|
+
import { DTOFigmaNode, DTOFigmaNodeV2 } 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";
|
|
@@ -21,6 +21,11 @@ export declare class AreaResources {
|
|
|
21
21
|
* @returns All font resources in the specified version
|
|
22
22
|
*/
|
|
23
23
|
getFigmaFrames(from: RemoteVersionIdentifier): Promise<Array<DTOFigmaNode>>;
|
|
24
|
+
/** Fetches all Figma frames that were rendered font resources in the version (V2 of the API)
|
|
25
|
+
* @param from - Remote version to fetch from
|
|
26
|
+
* @returns All font resources in the specified version
|
|
27
|
+
*/
|
|
28
|
+
getFigmaFramesV2(from: RemoteVersionIdentifier): Promise<Array<DTOFigmaNodeV2>>;
|
|
24
29
|
/**
|
|
25
30
|
* @param from - Remote version to fetch from
|
|
26
31
|
* @param frameReferenceId - Unique stable identifier of the Figma frame (Supernova id, not Figma id)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOCreateDocumentationTabInput, DTODeleteDocumentationGroupInput, DTODeleteDocumentationPageInputV2, DTODeleteDocumentationTabGroupInput, DTODesignElementsDataDiffResponse, DTODocumentationLinkPreviewRequest, DTODocumentationPageAnchor, DTODocumentationPageApprovalStateChangeInput, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTOFigmaNode, DTOFigmaNodeRenderInput, DTOMoveDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTOPublishDocumentationRequest, DTORestoreDocumentationGroupInput, DTORestoreDocumentationPageInput, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2 } from "@supernova-studio/client";
|
|
1
|
+
import { DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOCreateDocumentationTabInput, DTODeleteDocumentationGroupInput, DTODeleteDocumentationPageInputV2, DTODeleteDocumentationTabGroupInput, DTODesignElementsDataDiffResponse, DTODocumentationLinkPreviewRequest, DTODocumentationPageAnchor, DTODocumentationPageApprovalStateChangeInput, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTOElementActionInput, DTOExporterPropertyValueMap, DTOFigmaNode, DTOFigmaNodeRenderIdInput, DTOFigmaNodeRenderInput, DTOFigmaNodeV2, DTOMoveDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTOPageRedirectCreateBody, DTOPageRedirectUpdateBody, DTOPipelineCreateBody, DTOPipelineUpdateBody, DTOPublishDocumentationRequest, DTORestoreDocumentationGroupInput, DTORestoreDocumentationPageInput, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2 } from "@supernova-studio/client";
|
|
2
2
|
import { DesignSystemInvite, DesignSystemInviteUpdate, DesignSystemMemberUpdate, DesignSystemPendingMemberInvite, DesignSystemUserInvitation } from "@supernova-studio/model";
|
|
3
|
-
import { DesignSystemAccessMode, DocsBlockDefinition, ExportBuildStatus, ResourceFont, TokenThemeOverrideTranserObject, UserRole } from "../../exports";
|
|
3
|
+
import { DesignSystemAccessMode, DocsBlockDefinition, DocumentationLegacyPage, ExportBuildStatus, ExporterJobDestination, RemoteWorkspaceVersionIdentifier, ResourceFont, TokenThemeOverrideTranserObject, UserRole } from "../../exports";
|
|
4
4
|
import { Acl } from "../../model/acl/SDKAcl";
|
|
5
5
|
import { Asset } from "../../model/assets/SDKAsset";
|
|
6
6
|
import { RenderedAsset } from "../../model/assets/SDKRenderedAsset";
|
|
@@ -11,6 +11,7 @@ import { DesignSystemCollection } from "../../model/base/SDKDesignSystemCollecti
|
|
|
11
11
|
import { DesignSystemContactList } from "../../model/base/SDKDesignSystemContactList";
|
|
12
12
|
import { DesignSystemMemberList } from "../../model/base/SDKDesignSystemMemberList";
|
|
13
13
|
import { DesignSystemVersion, DesignSystemVersionCreate, DesignSystemVersionCreationJob, DesignSystemVersionUpdateModel } from "../../model/base/SDKDesignSystemVersion";
|
|
14
|
+
import { DesignSystemVersionStats } from "../../model/base/SDKDesignSystemVersionStats";
|
|
14
15
|
import { DocumentationLegacy, DocumentationLegacyModel } from "../../model/base/SDKDocumentationLegacy";
|
|
15
16
|
import { Component } from "../../model/components/SDKComponent";
|
|
16
17
|
import { DesignComponent } from "../../model/components/SDKDesignComponent";
|
|
@@ -25,7 +26,7 @@ import { DocumentationEnvironment } from "../../model/enums/SDKDocumentationEnvi
|
|
|
25
26
|
import { TokenType } from "../../model/enums/SDKTokenType";
|
|
26
27
|
import { AzurePersonalAccessTokenConnectionPayload, PersonalAccessTokenConnectionPayload } from "../../model/exporters/SDKConnections";
|
|
27
28
|
import { Exporter, ExporterProvider, NewExporterPayload } from "../../model/exporters/SDKExporter";
|
|
28
|
-
import {
|
|
29
|
+
import { Pipeline } from "../../model/exporters/SDKPipeline";
|
|
29
30
|
import { ExporterCustomBlock } from "../../model/exporters/custom_blocks/SDKExporterCustomBlock";
|
|
30
31
|
import { ExporterCustomBlockVariant } from "../../model/exporters/custom_blocks/SDKExporterCustomBlockVariant";
|
|
31
32
|
import { ExporterConfigurationProperty } from "../../model/exporters/custom_properties/SDKExporterConfigurationProperty";
|
|
@@ -70,28 +71,41 @@ import { GitProvidersOrganizations } from "../../model/workspaces/integrations/G
|
|
|
70
71
|
import { GitProvidersProjects } from "../../model/workspaces/integrations/GitProvidersProjects";
|
|
71
72
|
import { GitProvidersRepositories } from "../../model/workspaces/integrations/GitProvidersRepositories";
|
|
72
73
|
import { ComponentUpdateTransactionData, TokenUpdateTransactionData } from "../areas/SDKAreaBulkOperations";
|
|
74
|
+
import { DocumentationPageContent } from "../areas/SDKAreaImport";
|
|
75
|
+
import { DataCoreReadRequests } from "./requests/SDKDataCoreReadRequests";
|
|
73
76
|
import { RenderedAssetRequestSettings } from "./requests/SDKDataCoreRenderRequests";
|
|
74
77
|
import { DataBridge } from "./SDKDataBridge";
|
|
75
78
|
import { RequestInfo, RequestInit, Response } from "node-fetch";
|
|
76
79
|
export declare class DataCore {
|
|
77
80
|
/** Read part of the network calls */
|
|
78
|
-
|
|
81
|
+
read: DataCoreReadRequests;
|
|
79
82
|
/** Write part of the network calls */
|
|
80
83
|
private write;
|
|
81
84
|
/** Asset generation part of the network calls */
|
|
82
85
|
private render;
|
|
86
|
+
/** AI */
|
|
87
|
+
private ai;
|
|
83
88
|
/** Bridge */
|
|
84
89
|
private bridge;
|
|
85
90
|
constructor(bridge: DataBridge);
|
|
86
91
|
/** Only for internal functionality */
|
|
87
92
|
getBridgeInternal(): DataBridge;
|
|
88
93
|
fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
|
|
89
|
-
dataThroughCorsProxy(urlToRalay: string): Promise<ArrayBuffer | undefined>;
|
|
90
94
|
bootstrapData(preferredWorkspaceId?: string, preferredDesignSystemId?: string, preferredVersionId?: string, preferredBrandId?: string): Promise<BootstrapData>;
|
|
91
95
|
/** Remote: Get single-use multiplayer token */
|
|
92
96
|
multiplayerToken(room: string | undefined): Promise<{
|
|
93
97
|
token: string;
|
|
94
98
|
}>;
|
|
99
|
+
/** Remote: Forges code based on user prompt */
|
|
100
|
+
forgeCode(designSystemId: string, versionId: string, prompt: string, components: Array<any>): Promise<string>;
|
|
101
|
+
/** Remote: Reforges code based on user prompt */
|
|
102
|
+
reforgeCode(designSystemId: string, versionId: string, prompt: string, components: Array<any>, existingCode: string): Promise<string>;
|
|
103
|
+
/** Remote: Proposes title for generated code */
|
|
104
|
+
proposeTitle(designSystemId: string, versionId: string, firstForgeQuery: string): Promise<string>;
|
|
105
|
+
/** Remote: Answers question based on the data of design system in natural language */
|
|
106
|
+
answerQuestion(workspaceId: string, designSystemId: string, versionId: string, persona: "designer" | "developer" | "code", askQuery: string): Promise<string>;
|
|
107
|
+
/** Remote: Index a design system so it can be asked in natural language */
|
|
108
|
+
indexDS(workspaceId: string, designSystemId: string, versionId: string): Promise<string>;
|
|
95
109
|
/** Remote: Get information about currently logged in user */
|
|
96
110
|
currentUser(): Promise<User>;
|
|
97
111
|
/** Remote: Get information about a specific user */
|
|
@@ -188,6 +202,8 @@ export declare class DataCore {
|
|
|
188
202
|
}>;
|
|
189
203
|
/** Create a page within documentation */
|
|
190
204
|
createDocumentationPage(designSystemId: string, versionId: string, payload: Omit<DTOCreateDocumentationPageInputV2, "persistentId">): Promise<string>;
|
|
205
|
+
/** General element action */
|
|
206
|
+
elementAction(designSystemId: string, versionId: string, data: DTOElementActionInput): Promise<any>;
|
|
191
207
|
/** Update page approval state */
|
|
192
208
|
updateApprovalState(designSystemId: string, versionId: string, payload: DTODocumentationPageApprovalStateChangeInput): Promise<string>;
|
|
193
209
|
/** Update design system's access mode and, if switching to invite-only, also the member list */
|
|
@@ -292,12 +308,19 @@ export declare class DataCore {
|
|
|
292
308
|
/** Render assets as PNG, SVG, PDF, or combinations of it */
|
|
293
309
|
renderedAssets(designSystemId: string, versionId: string, assets: Array<Asset>, groups: Array<AssetGroup>, settings: RenderedAssetRequestSettings): Promise<Array<RenderedAsset>>;
|
|
294
310
|
/** Render Figma frames */
|
|
295
|
-
renderedFigmaFrames(designSystemId: string, versionId: string, payload: Array<
|
|
311
|
+
renderedFigmaFrames(designSystemId: string, versionId: string, payload: Array<DTOFigmaNodeRenderIdInput>): Promise<Array<DTOFigmaNode>>;
|
|
312
|
+
/** Render Figma frames async */
|
|
313
|
+
renderedFigmaFramesAsync(designSystemId: string, versionId: string, payload: Array<DTOFigmaNodeRenderInput>): Promise<Array<DTOFigmaNodeV2>>;
|
|
296
314
|
/** Fetches all Figma frames that were rendered under specific version
|
|
297
315
|
* @param from - Remote version to fetch from
|
|
298
316
|
* @returns All Figma frames in the specified version (only rendered, for documentation etc.)
|
|
299
317
|
*/
|
|
300
318
|
figmaFrames(designSystemId: string, versionId: string): Promise<Array<DTOFigmaNode>>;
|
|
319
|
+
/** Fetches all Figma frames that were rendered under specific version (V2 of the API)
|
|
320
|
+
* @param from - Remote version to fetch from
|
|
321
|
+
* @returns All Figma frames in the specified version (only rendered, for documentation etc.)
|
|
322
|
+
*/
|
|
323
|
+
figmaFramesV2(designSystemId: string, versionId: string): Promise<Array<DTOFigmaNodeV2>>;
|
|
301
324
|
/** Retrieve the main documentation object through which all docs data can be accessed */
|
|
302
325
|
documentation(workspaceId: string, designSystemId: string, versionId: string): Promise<DocumentationLegacy>;
|
|
303
326
|
getDocumentationStructure(designSystemId: string, versionId: string): Promise<(DocsEntityPageModel | DocsEntityGroupModel)[]>;
|
|
@@ -331,9 +354,9 @@ export declare class DataCore {
|
|
|
331
354
|
/** Delete any multiple resources */
|
|
332
355
|
deleteResources(designSystemId: string, versionId: string, resourceIds: string[]): Promise<void>;
|
|
333
356
|
pipelines(workspaceId: string, designSystemId?: string): Promise<Array<Pipeline>>;
|
|
334
|
-
createPipeline(workspaceId: string,
|
|
335
|
-
updatePipeline(
|
|
336
|
-
runPipeline(workspaceId: string, designSystemVersionId: string, pipelineId: string): Promise<
|
|
357
|
+
createPipeline(workspaceId: string, payload: DTOPipelineCreateBody): Promise<Pipeline>;
|
|
358
|
+
updatePipeline(designSystemId: string, pipelineId: string, payload: DTOPipelineUpdateBody): Promise<Pipeline>;
|
|
359
|
+
runPipeline(workspaceId: string, designSystemVersionId: string, pipelineId: string): Promise<ExportBuild>;
|
|
337
360
|
deletePipeline(workspaceId: string, pipelineId: string): Promise<void>;
|
|
338
361
|
/** Download information about current exporter custom blocks and retrieve them resolved */
|
|
339
362
|
documentationExporterCustomBlocks(designSystemId: string, versionId: string): Promise<Array<ExporterCustomBlock>>;
|
|
@@ -365,10 +388,12 @@ export declare class DataCore {
|
|
|
365
388
|
/** Pull updates for exporter */
|
|
366
389
|
pullLatestExporter(workspaceId: string, exporterId: string): Promise<Exporter>;
|
|
367
390
|
exportBuilds(workspaceId: string, versionId: string): Promise<Array<ExportBuild>>;
|
|
368
|
-
|
|
391
|
+
exportBuild(workspaceId: string, buildId: string): Promise<ExportBuild>;
|
|
369
392
|
/** Download information about documentation builds and retrieve it resolved */
|
|
370
393
|
documentationBuilds(workspaceId: string, versionId: string, environment: DocumentationEnvironment, status?: ExportBuildStatus, createdByUserId?: string, limit?: number): Promise<Array<ExportBuild>>;
|
|
371
394
|
buildLogs(workspaceId: string, buildId: string): Promise<Array<ExportBuildResultLog>>;
|
|
395
|
+
/** Create a new exporter build */
|
|
396
|
+
createExporterBuild(workspaceId: string, designSystemId: string, versionId: string, exporterId: string, destinations: ExporterJobDestination, brandId: string | undefined, themePersistentIds: Array<string> | undefined, exporterConfigurationProperties: DTOExporterPropertyValueMap | undefined): Promise<ExportBuild>;
|
|
372
397
|
workspaceProductFeatures(workspaceId: string): Promise<SubscriptionProductFeatures>;
|
|
373
398
|
/** Download information about a single workspace and retrieve it resolved */
|
|
374
399
|
workspace(workspaceId: string): Promise<Workspace>;
|
|
@@ -503,6 +528,8 @@ export declare class DataCore {
|
|
|
503
528
|
deleteDesignSystem(designSystemId: string): Promise<void>;
|
|
504
529
|
/** Download information about a custom domain */
|
|
505
530
|
designSystemCustomDomain(designSystemId: string): Promise<CustomDomain>;
|
|
531
|
+
/** Get design system stats */
|
|
532
|
+
designSystemStats(dsId: string, versionId: string, brandId?: string): Promise<DesignSystemVersionStats>;
|
|
506
533
|
/** Download information about a desing system source within a design system design and retrieve it resolved */
|
|
507
534
|
designSystemSource(designSystemId: string, sourceId: string): Promise<Source>;
|
|
508
535
|
/** Download information about all design system sources within a design system design and retrieve it resolved */
|
|
@@ -558,4 +585,19 @@ export declare class DataCore {
|
|
|
558
585
|
readKeyValueStorageData(designSystemId: string, key: string): Promise<string | object | undefined>;
|
|
559
586
|
setKeyValueStorageData(designSystemId: string, key: string, value: string | object): Promise<void>;
|
|
560
587
|
unsetKeyValueStorageData(designSystemId: string, key: string): Promise<void>;
|
|
588
|
+
getPageRedirects(designSystemId: string): Promise<{
|
|
589
|
+
path: string;
|
|
590
|
+
id: string;
|
|
591
|
+
createdAt: Date;
|
|
592
|
+
updatedAt: Date;
|
|
593
|
+
designSystemId: string;
|
|
594
|
+
pagePersistentId: string;
|
|
595
|
+
}[]>;
|
|
596
|
+
createPageRedirect(designSystemId: string, body: DTOPageRedirectCreateBody): Promise<void>;
|
|
597
|
+
updatePageRedirect(designSystemId: string, redirectId: string, body: DTOPageRedirectUpdateBody): Promise<void>;
|
|
598
|
+
deletePageRedirect(designSystemId: string, redirectId: string): Promise<void>;
|
|
599
|
+
/** Import content into a documentation page */
|
|
600
|
+
importDocumentationPage(designSystemId: string, versionId: string, pageId: string, content: DocumentationPageContent): Promise<void>;
|
|
601
|
+
/** All pages created within documentation presented as flat structure. Each page contains all data neccessary to render it pre-fetched and resolved for convenience */
|
|
602
|
+
getDocumentationPagesWithContent(from: RemoteWorkspaceVersionIdentifier): Promise<Array<DocumentationLegacyPage>>;
|
|
561
603
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { DataBridge } from "../SDKDataBridge";
|
|
2
|
+
export declare class DataCoreAIRequests {
|
|
3
|
+
private bridge;
|
|
4
|
+
constructor(bridge: DataBridge);
|
|
5
|
+
/** Remote: Forges code based on user prompt */
|
|
6
|
+
forgeCode(designSystemId: string, versionId: string, prompt: string, components: Array<any>): Promise<string>;
|
|
7
|
+
/** Remote: Reforges code based on user prompt */
|
|
8
|
+
reforgeCode(designSystemId: string, versionId: string, prompt: string, components: Array<any>, existingCode: string): Promise<string>;
|
|
9
|
+
/** Remote: Proposes title for the forged code */
|
|
10
|
+
proposeTitle(designSystemId: string, versionId: string, firstForgeQuery: string): Promise<string>;
|
|
11
|
+
/** Remote: Answers question based on the data of design system in natural language */
|
|
12
|
+
answerQuestion(workspaceId: string, designSystemId: string, versionId: string, persona: "designer" | "developer" | "code", askQuery: string): Promise<string>;
|
|
13
|
+
/** Remote: Index a design system so it can be asked in natural language */
|
|
14
|
+
indexDS(workspaceId: string, designSystemId: string, versionId: string): Promise<string>;
|
|
15
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DTODesignElementsDataDiffResponse, DTODesignSystem, DTODesignSystemContactsResponse, DTODesignSystemMemberListResponse, DTODocumentationLinkPreviewRequest, DTOFigmaNode, DTOGetDocumentationPageAnchorsResponse, DTOPipeline, DTOTokenCollection } from "@supernova-studio/client";
|
|
1
|
+
import { DTODesignElementsDataDiffResponse, DTODesignSystem, DTODesignSystemContactsResponse, DTODesignSystemMemberListResponse, DTODesignSystemVersionStats, DTODocumentationLinkPreviewRequest, DTOFigmaNode, DTOFigmaNodeV2, DTOGetDocumentationPageAnchorsResponse, DTOPipeline, DTOTokenCollection } from "@supernova-studio/client";
|
|
2
|
+
import { DocumentationLegacyGroupModel } from "../../../exports";
|
|
2
3
|
import { AclRemoteModel } from "../../../model/acl/SDKAcl";
|
|
3
4
|
import { BootstrapDataRemoteModel } from "../../../model/base/SDKBootstrapData";
|
|
4
5
|
import { BrandRemoteModel } from "../../../model/base/SDKBrand";
|
|
@@ -50,11 +51,11 @@ import { WorkspaceProductRemoteModel } from "../../../model/workspaces/SDKWorksp
|
|
|
50
51
|
import { SubscriptionProductFeaturesRemoteModel } from "../../../model/workspaces/SDKWorkspaceProductFeatures";
|
|
51
52
|
import { WorkspaceSSOSettingsRemoteModel } from "../../../model/workspaces/SDKWorkspaceSSOSettings";
|
|
52
53
|
import { WorkspaceSubscriptionRemoteModel } from "../../../model/workspaces/SDKWorkspaceSubscription";
|
|
54
|
+
import { RemoteWorkspaceVersionIdentifier } from "../../areas/SDKRemoteIdentifiers";
|
|
53
55
|
import { DataBridge } from "../SDKDataBridge";
|
|
54
56
|
export declare class DataCoreReadRequests {
|
|
55
57
|
private bridge;
|
|
56
58
|
constructor(bridge: DataBridge);
|
|
57
|
-
getDataThroughCorsProxy(url: string): Promise<ArrayBuffer | undefined>;
|
|
58
59
|
getRemoteBootstrapData(preferredWorkspaceId?: string, preferredDesignSystemId?: string, preferredVersionId?: string, preferredBrandId?: string): Promise<BootstrapDataRemoteModel>;
|
|
59
60
|
/** Remote: Get information about currently logged in user */
|
|
60
61
|
getRemoteMultiplayerToken(room: string | undefined): Promise<{
|
|
@@ -108,6 +109,8 @@ export declare class DataCoreReadRequests {
|
|
|
108
109
|
getRemoteDesignSystems(workspaceId: string): Promise<Array<DTODesignSystem>>;
|
|
109
110
|
/** Remote: Get custom domain */
|
|
110
111
|
getRemoteCustomDomain(designSystemId: string): Promise<CustomDomainRemoteModel>;
|
|
112
|
+
/** Remote: Get design system stats */
|
|
113
|
+
getRemoteDesignSystemStats(dsId: string, versionId: string, brandId?: string): Promise<DTODesignSystemVersionStats>;
|
|
111
114
|
/** Remote: Get a single design source */
|
|
112
115
|
getRemoteSource(designSystemId: string, sourceId: string): Promise<SourceRemoteModel>;
|
|
113
116
|
/** Remote: Get all design sources of a single design system */
|
|
@@ -213,6 +216,7 @@ export declare class DataCoreReadRequests {
|
|
|
213
216
|
/** Remote: Get all property values that were set by the user for each elemen */
|
|
214
217
|
getRemoteElementPropertyValues(designSystemId: string, versionId: string): Promise<ElementPropertyValueRemoteModel[]>;
|
|
215
218
|
getRemoteFigmaFrames(designSystemId: string, versionId: string): Promise<Array<DTOFigmaNode>>;
|
|
219
|
+
getRemoteFigmaFramesV2(designSystemId: string, versionId: string): Promise<Array<DTOFigmaNodeV2>>;
|
|
216
220
|
getRemoteTokenCollections(designSystemId: string, versionId: string): Promise<Array<DTOTokenCollection>>;
|
|
217
221
|
getRemotePipelines(workspaceId: string, designSystemId?: string): Promise<DTOPipeline[]>;
|
|
218
222
|
getRemoteBuild(workspaceId: string, buildId: string): Promise<ExportBuildModel>;
|
|
@@ -230,4 +234,17 @@ export declare class DataCoreReadRequests {
|
|
|
230
234
|
getImportJob(designSystemId: string, versionId: string, jobId: string): Promise<ImportJobRemoteModel>;
|
|
231
235
|
getKeyValueStorageData(designSystemId: string, keys: Array<string>): Promise<Record<string, string>>;
|
|
232
236
|
getTokenStudioData(designSystemId: string, versionId: string): Promise<object>;
|
|
237
|
+
getPageRedirects(designSystemId: string): Promise<{
|
|
238
|
+
path: string;
|
|
239
|
+
id: string;
|
|
240
|
+
createdAt: Date;
|
|
241
|
+
updatedAt: Date;
|
|
242
|
+
designSystemId: string;
|
|
243
|
+
pagePersistentId: string;
|
|
244
|
+
}[]>;
|
|
245
|
+
/** All pages created within documentation presented as flat structure. Each page contains all data neccessary to render it pre-fetched and resolved for convenience */
|
|
246
|
+
getDocumentationPagesWithContent(from: RemoteWorkspaceVersionIdentifier): Promise<{
|
|
247
|
+
pageDetails: Array<DocumentationLegacyPageModel>;
|
|
248
|
+
groupDetails: Array<DocumentationLegacyGroupModel>;
|
|
249
|
+
}>;
|
|
233
250
|
}
|