@supernova-studio/supernova-sdk-beta 2.2.0 → 2.2.2

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 (23) hide show
  1. package/build/sdk-typescript/src/core/SDKSupernova.d.ts +6 -0
  2. package/build/sdk-typescript/src/core/areas/SDKAreaAI.d.ts +22 -5
  3. package/build/sdk-typescript/src/core/areas/SDKAreaProjects.d.ts +69 -0
  4. package/build/sdk-typescript/src/core/areas/SDKAreaPublishedDocumentation.d.ts +9 -0
  5. package/build/sdk-typescript/src/core/areas/SDKAreaWorkspaces.d.ts +35 -0
  6. package/build/sdk-typescript/src/core/data/SDKDataBridge.d.ts +5 -0
  7. package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +51 -6
  8. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreAIRequests.d.ts +14 -4
  9. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +16 -1
  10. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +7 -3
  11. package/build/sdk-typescript/src/core/resolvers/SDKDocsEntityItemResolver.d.ts +8 -8
  12. package/build/sdk-typescript/src/exports.d.ts +7 -3
  13. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockStorybookProperty.d.ts +5 -0
  14. package/build/sdk-typescript/src/model/docs_analytics/SDKDocsAnalyticsTimeFrame.d.ts +6 -0
  15. package/build/sdk-typescript/src/model/docs_analytics/SDKDocsAnalyticsTimeFrameComparison.d.ts +7 -0
  16. package/build/sdk-typescript/src/model/docs_analytics/SDKDocsAnalyticsVisitsDifference.d.ts +10 -0
  17. package/build/sdk-typescript/src/model/docs_analytics/SDKPublishedDocPageVisitData.d.ts +10 -0
  18. package/build/sdk-typescript/src/model/projects/SDKProject.d.ts +39 -0
  19. package/build/sdk-typescript/src/model/projects/SDKProjectContext.d.ts +47 -0
  20. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceProductFeatures.d.ts +1 -1
  21. package/build/supernova-sdk-typescript.js +1 -1
  22. package/build/supernova-sdk-typescript.js.map +1 -1
  23. package/package.json +18 -31
@@ -12,6 +12,8 @@ import { AreaIntegrations } from "./areas/SDKAreaIntegrations";
12
12
  import { AreaMe } from "./areas/SDKAreaMe";
13
13
  import { AreaMultiplayer } from "./areas/SDKAreaMultiplayer";
14
14
  import { AreaNetwork } from "./areas/SDKAreaNetwork";
15
+ import { AreaProjects } from "./areas/SDKAreaProjects";
16
+ import { AreaPublishedDocumentation } from "./areas/SDKAreaPublishedDocumentation";
15
17
  import { AreaRawData } from "./areas/SDKAreaRawData";
16
18
  import { AreaResources } from "./areas/SDKAreaResources";
17
19
  import { AreaStorage } from "./areas/SDKAreaStorage";
@@ -49,6 +51,8 @@ export declare class Supernova {
49
51
  resources: AreaResources;
50
52
  /** Get, create, update, manipulate or delete documentation items */
51
53
  documentation: AreaDocumentation;
54
+ /** Get published documentation items */
55
+ publishedDocumentation: AreaPublishedDocumentation;
52
56
  /** Get, create, update, manipulate or delete pipelines and automation jobs */
53
57
  automation: AreaAutomation;
54
58
  /** Get, create, update, manipulate or delete users */
@@ -71,6 +75,8 @@ export declare class Supernova {
71
75
  multiplayer: AreaMultiplayer;
72
76
  /** Get access to AI capabilities */
73
77
  ai: AreaAI;
78
+ /** Get access to projects */
79
+ projects: AreaProjects;
74
80
  /** Get access to raw data for local-only restoration of data */
75
81
  raw: AreaRawData;
76
82
  /**
@@ -1,5 +1,12 @@
1
1
  import { DataCore } from "../data/SDKDataCore";
2
2
  import { RemoteWorkspaceVersionIdentifier } from "./SDKRemoteIdentifiers";
3
+ export declare enum AIGetRouteQueryTask {
4
+ answer = "answer",
5
+ answerWithStream = "answerWithStream",
6
+ autocomplete = "autocomplete",
7
+ reindex = "reindex",
8
+ summarize = "summarize"
9
+ }
3
10
  export declare class AreaAI {
4
11
  /** Internal: Engine */
5
12
  private dataCore;
@@ -17,14 +24,19 @@ export declare class AreaAI {
17
24
  }): Promise<string>;
18
25
  /** Autocompletes a prompt into a full text. Response is not streamed.
19
26
  * @param from - Version identifier
20
- * @param text - Text to autocomplete
27
+ * @param textToComplete - Text to autocomplete
21
28
  * @param options - Autocomplete options
22
29
  * @returns Autocompleted text
23
30
  * @disclaimer This method will throw if the user is not authorized to use AI features (if you are reading this, you are not authorized).
24
31
  */
25
- autocompleteText(from: RemoteWorkspaceVersionIdentifier, text: string, options?: {
32
+ autocompleteText(from: RemoteWorkspaceVersionIdentifier, textToComplete: string, options?: {
26
33
  maximumLength: number;
27
- }): Promise<string>;
34
+ previousText?: string;
35
+ afterText?: string;
36
+ }): Promise<{
37
+ completion: string;
38
+ fullText: string;
39
+ }>;
28
40
  /** Answers question based on the data of design system in natural language. This method is non-streaming.
29
41
  * @param from - Version identifier
30
42
  * @param prompt - Question to answer
@@ -48,11 +60,16 @@ export declare class AreaAI {
48
60
  persona: "designer" | "developer";
49
61
  scope: "all" | "tokens" | "components" | "assets" | "docs";
50
62
  density: "compact" | "full";
51
- }): Promise<ReadableStream<Uint8Array>>;
63
+ }): Promise<ReadableStreamDefaultReader<Uint8Array>>;
52
64
  /** Indexes or reindexes a design system to prepare it for QA engine
53
65
  * @param from - Version identifier
54
66
  * @returns Indexing status
55
67
  * @disclaimer This method will throw if the user is not authorized to use AI features (if you are reading this, you are not authorized).
56
68
  */
57
- rebuildAnswerIndex(from: RemoteWorkspaceVersionIdentifier): Promise<string>;
69
+ rebuildAnswerIndex(from: RemoteWorkspaceVersionIdentifier): Promise<void>;
70
+ /** Temp: Retrieves dynamic URL for all AI tasks
71
+ * @param task - Which task to retrieve URL for
72
+ * @returns Url for the task
73
+ */
74
+ executableTaskUrl(task: AIGetRouteQueryTask): Promise<string>;
58
75
  }
@@ -0,0 +1,69 @@
1
+ import { SDKProject } from "../../model/projects/SDKProject";
2
+ import { SDKProjectContext, SDKProjectContextCreationModel } from "../../model/projects/SDKProjectContext";
3
+ import { DataCore } from "../data/SDKDataCore";
4
+ /**
5
+ * Manages project-related operations within a workspace using untyped data storage.
6
+ */
7
+ export declare class AreaProjects {
8
+ /** Internal reference to DataCore for data operations */
9
+ private dataCore;
10
+ /** Key under which all projects are stored */
11
+ private readonly PROJECTS_KEY;
12
+ /** Key under which all project contexts are stored */
13
+ private readonly PROJECT_CONTEXTS_KEY;
14
+ constructor(dataCore: DataCore);
15
+ /**
16
+ * Fetches all projects for a given workspace.
17
+ * @param workspaceId - The ID of the workspace.
18
+ * @returns A promise resolving to an array of SDKProject instances.
19
+ */
20
+ getAllProjects(workspaceId: string): Promise<SDKProject[]>;
21
+ /**
22
+ * Creates a new project in the specified workspace.
23
+ * @param workspaceId - The ID of the workspace.
24
+ * @param name - The name of the new project.
25
+ * @returns A promise resolving to the created SDKProject instance.
26
+ */
27
+ createProject(workspaceId: string, name: string, contextId: string): Promise<SDKProject>;
28
+ /**
29
+ * Updates an existing project in the specified workspace.
30
+ * @param workspaceId - The ID of the workspace.
31
+ * @param updatedProject - The updated SDKProject instance.
32
+ * @returns A promise that resolves when the update is complete.
33
+ * @throws Error if the project is not found.
34
+ */
35
+ updateProject(workspaceId: string, updatedProject: SDKProject): Promise<void>;
36
+ /**
37
+ * Deletes a project from the specified workspace.
38
+ * @param workspaceId - The ID of the workspace.
39
+ * @param projectId - The ID of the project to delete.
40
+ * @returns A promise that resolves when the deletion is complete.
41
+ */
42
+ deleteProject(workspaceId: string, projectId: string): Promise<void>;
43
+ /**
44
+ * Retrieves all project contexts in a workspace.
45
+ * @param workspaceId - The ID of the workspace.
46
+ * @returns An array of SDKProjectContext instances.
47
+ */
48
+ getAllProjectContexts(workspaceId: string): Promise<SDKProjectContext[]>;
49
+ /**
50
+ * Creates a new project context.
51
+ * @param workspaceId - The ID of the workspace.
52
+ * @param creationModel - The properties for the new context.
53
+ * @returns The created SDKProjectContext instance.
54
+ */
55
+ createProjectContext(workspaceId: string, creationModel: SDKProjectContextCreationModel): Promise<SDKProjectContext>;
56
+ /**
57
+ * Updates an existing project context.
58
+ * @param workspaceId - The ID of the workspace.
59
+ * @param updatedContext - The updated context instance.
60
+ * @throws Error if the context is not found.
61
+ */
62
+ updateProjectContext(workspaceId: string, updatedContext: SDKProjectContext): Promise<void>;
63
+ /**
64
+ * Deletes a project context.
65
+ * @param workspaceId - The ID of the workspace.
66
+ * @param contextId - The ID of the context to delete.
67
+ */
68
+ deleteProjectContext(workspaceId: string, contextId: string): Promise<void>;
69
+ }
@@ -0,0 +1,9 @@
1
+ import { DTODocumentationAnalyticsDiffPayload } from "@supernova-studio/client";
2
+ import { DataCore } from "../data/SDKDataCore";
3
+ export declare class AreaPublishedDocumentation {
4
+ /** Internal: Engine */
5
+ private dataCore;
6
+ constructor(dataCore: DataCore);
7
+ getDocPageVisits(designSystemId: string, versionId: string, startDate: Date): Promise<import("../..").PublishedDocPageVisitData[]>;
8
+ getDocsAnalyticsVisitsDifferences(designSystemId: string, versionId: string, payload: DTODocumentationAnalyticsDiffPayload): Promise<import("../..").DocsAnalyticsVisitsDifference[]>;
9
+ }
@@ -1,3 +1,4 @@
1
+ import { DTOWorkspaceUntypedDataListResponse, DTOWorkspaceUntypedDataResponse } from "@supernova-studio/client";
1
2
  import { Acl } from "../../model/acl/SDKAcl";
2
3
  import { UserRole } from "../../model/enums/SDKUserRole";
3
4
  import { Membership } from "../../model/membership/SDKMembership";
@@ -234,4 +235,38 @@ export declare class AreaWorkspaces {
234
235
  * @returns Nothing
235
236
  */
236
237
  deleteWorkspaceInvitation(workspaceId: string, invitationId: string): Promise<void>;
238
+ /**
239
+ * Lists all untyped data for a given workspace.
240
+ * @param workspaceId - The ID of the workspace.
241
+ * @returns A promise that resolves to the list of untyped data.
242
+ */
243
+ listUntypedData(workspaceId: string): Promise<DTOWorkspaceUntypedDataListResponse>;
244
+ /**
245
+ * Creates new untyped data in the specified workspace.
246
+ * @param workspaceId - The ID of the workspace.
247
+ * @param data - The data to create. Must be a valid JSON object.
248
+ * @returns A promise that resolves to the created untyped data.
249
+ */
250
+ createUntypedData(workspaceId: string, data: any): Promise<DTOWorkspaceUntypedDataResponse>;
251
+ /**
252
+ * Deletes all untyped data in the specified workspace.
253
+ * @param workspaceId - The ID of the workspace.
254
+ * @returns A promise that resolves when the operation is complete.
255
+ */
256
+ deleteAllUntypedData(workspaceId: string): Promise<void>;
257
+ /**
258
+ * Updates specific untyped data in the specified workspace.
259
+ * @param workspaceId - The ID of the workspace.
260
+ * @param id - The ID of the untyped data to update.
261
+ * @param data - The updated data. Must be a valid JSON object.
262
+ * @returns A promise that resolves to the updated untyped data.
263
+ */
264
+ updateUntypedData(workspaceId: string, id: string, data: any): Promise<DTOWorkspaceUntypedDataResponse>;
265
+ /**
266
+ * Deletes specific untyped data in the specified workspace.
267
+ * @param workspaceId - The ID of the workspace.
268
+ * @param id - The ID of the untyped data to delete.
269
+ * @returns A promise that resolves when the operation is complete.
270
+ */
271
+ deleteUntypedData(workspaceId: string, id: string): Promise<void>;
237
272
  }
@@ -43,15 +43,20 @@ export declare class DataBridge {
43
43
  constructor(conf: DataBridgeConfiguration);
44
44
  delete(endpoint: string): Promise<any>;
45
45
  get(endpoint: string): Promise<any>;
46
+ getStreamed(endpoint: string): Promise<ReadableStreamDefaultReader<Uint8Array>>;
46
47
  getAsData(endpoint: string): Promise<any>;
47
48
  put(endpoint: string, payload: any | null): Promise<any>;
48
49
  post(endpoint: string, payload: any | null): Promise<any>;
50
+ postStreamed(endpoint: string, payload: any | null): Promise<ReadableStreamDefaultReader<Uint8Array>>;
49
51
  upload(endpoint: string, formData: FormData, method?: "PUT" | "POST"): Promise<any>;
50
52
  private request;
53
+ private streamedRequest;
51
54
  private handleResponse;
55
+ private handleStreamedResponse;
52
56
  private buildRequestConfig;
53
57
  private getProxyAgent;
54
58
  getFetchInvoker(): any;
59
+ getAIEndpoint(fragment: string | null): string;
55
60
  getApiEndpoint(fragment: string | null): string;
56
61
  getBaseEndpoint(fragment: string | null): string;
57
62
  getPublicEndpoint(fragment: string): string;
@@ -1,6 +1,6 @@
1
- import { DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOCreateDocumentationTabInput, DTODeleteDocumentationGroupInput, DTODeleteDocumentationPageInputV2, DTODeleteDocumentationTabGroupInput, DTODesignElementsDataDiffResponse, DTODocumentationLinkPreviewRequest, DTODocumentationPageAnchor, DTODocumentationPageApprovalStateChangeInput, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTOElementActionInput, DTOElementPropertyValuesEditActionInput, DTOExporterPropertyValueMap, DTOFigmaNode, DTOFigmaNodeRenderIdInput, DTOFigmaNodeRenderInput, DTOFigmaNodeV2, DTOMoveDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTOPageRedirectCreateBody, DTOPageRedirectUpdateBody, DTOPipelineCreateBody, DTOPipelineUpdateBody, DTOPublishDocumentationRequest, DTORestoreDocumentationGroupInput, DTORestoreDocumentationPageInput, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2 } from "@supernova-studio/client";
1
+ import { DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOCreateDocumentationTabInput, DTODeleteDocumentationGroupInput, DTODeleteDocumentationPageInputV2, DTODeleteDocumentationTabGroupInput, DTODesignElementsDataDiffResponse, DTODocumentationAnalyticsDiffPayload, DTODocumentationLinkPreviewRequest, DTODocumentationPageAnchor, DTODocumentationPageApprovalStateChangeInput, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTOElementActionInput, DTOElementPropertyValuesEditActionInput, DTOExporterPropertyValueMap, DTOFigmaNode, DTOFigmaNodeRenderIdInput, DTOFigmaNodeRenderInput, DTOFigmaNodeV2, DTOMoveDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTOPageRedirectCreateBody, DTOPageRedirectUpdateBody, DTOPipelineCreateBody, DTOPipelineUpdateBody, DTOPublishDocumentationRequest, DTORestoreDocumentationGroupInput, DTORestoreDocumentationPageInput, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2, DTOWorkspaceUntypedDataListResponse, DTOWorkspaceUntypedDataResponse } from "@supernova-studio/client";
2
2
  import { DesignSystemInvite, DesignSystemInviteUpdate, DesignSystemMemberUpdate, DesignSystemPendingMemberInvite, DesignSystemUserInvitation } from "@supernova-studio/model";
3
- import { DesignSystemAccessMode, DocsBlockDefinition, ExportBuildStatus, ExporterJobDestination, ResourceFont, TokenThemeOverrideTranserObject, UserRole } from "../../exports";
3
+ import { DesignSystemAccessMode, DocsAnalyticsVisitsDifference, DocsBlockDefinition, ExportBuildStatus, ExporterJobDestination, 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";
@@ -18,6 +18,7 @@ import { Component } from "../../model/components/SDKComponent";
18
18
  import { DesignComponent } from "../../model/components/SDKDesignComponent";
19
19
  import { DocsEntityGroupModel } from "../../model/docs/entities/SDKDocsEntityGroup";
20
20
  import { DocsEntityPageModel } from "../../model/docs/entities/SDKDocsEntityPage";
21
+ import { PublishedDocPageVisitData } from "../../model/docs_analytics/SDKPublishedDocPageVisitData";
21
22
  import { ElementDataView } from "../../model/elements/SDKElementDataView";
22
23
  import { ElementDataViewColumn } from "../../model/elements/SDKElementDataViewColumn";
23
24
  import { ElementProperty, ElementPropertyCreationModel, ElementPropertyTargetElementType, ElementPropertyUpdateModel } from "../../model/elements/SDKElementProperty";
@@ -71,6 +72,7 @@ import { GitProvidersBranches } from "../../model/workspaces/integrations/GitPro
71
72
  import { GitProvidersOrganizations } from "../../model/workspaces/integrations/GitProvidersOrganizations";
72
73
  import { GitProvidersProjects } from "../../model/workspaces/integrations/GitProvidersProjects";
73
74
  import { GitProvidersRepositories } from "../../model/workspaces/integrations/GitProvidersRepositories";
75
+ import { AIGetRouteQueryTask } from "../areas/SDKAreaAI";
74
76
  import { ComponentUpdateTransactionData, TokenUpdateTransactionData } from "../areas/SDKAreaBulkOperations";
75
77
  import { DataCoreReadRequests } from "./requests/SDKDataCoreReadRequests";
76
78
  import { RenderedAssetRequestSettings } from "./requests/SDKDataCoreRenderRequests";
@@ -101,9 +103,14 @@ export declare class DataCore {
101
103
  strategy: "noun" | "verb";
102
104
  }): Promise<string>;
103
105
  /** Remote: Autocompletes a prompt into a full text. Response is not streamed. */
104
- aiAutocompleteText(workspaceId: string, designSystemId: string, versionId: string, text: string, options: {
106
+ aiAutocompleteText(workspaceId: string, designSystemId: string, versionId: string, textToComplete: string, options?: {
105
107
  maximumLength: number;
106
- }): Promise<string>;
108
+ previousText?: string;
109
+ afterText?: string;
110
+ }): Promise<{
111
+ completion: string;
112
+ fullText: string;
113
+ }>;
107
114
  /** Remote: Answers question based on the data of design system in natural language. This method is non-streaming. */
108
115
  aiAnswer(workspaceId: string, designSystemId: string, versionId: string, prompt: string, options: {
109
116
  persona: "designer" | "developer";
@@ -115,9 +122,11 @@ export declare class DataCore {
115
122
  persona: "designer" | "developer";
116
123
  scope: "all" | "tokens" | "components" | "assets" | "docs";
117
124
  density: "compact" | "full";
118
- }): Promise<ReadableStream<Uint8Array>>;
125
+ }): Promise<ReadableStreamDefaultReader<Uint8Array>>;
119
126
  /** Indexes or reindexes a design system to prepare it for QA engine */
120
- aiRebuildAnswerIndex(workspaceId: string, designSystemId: string, versionId: string): Promise<string>;
127
+ aiRebuildAnswerIndex(workspaceId: string, designSystemId: string, versionId: string): Promise<void>;
128
+ /** Remote: Retrieves executable url for various AI tasks */
129
+ executableTaskUrl(task: AIGetRouteQueryTask): Promise<string>;
121
130
  /** Remote: Get information about currently logged in user */
122
131
  currentUser(): Promise<User>;
123
132
  /** Remote: Get information about a specific user */
@@ -355,6 +364,8 @@ export declare class DataCore {
355
364
  /** Publish the documentation drafts */
356
365
  documentationPublishDrafts(designSystemId: string, versionId: string, environment: DocumentationEnvironment, changes: DTOPublishDocumentationRequest["changes"]): Promise<ExportBuild>;
357
366
  getDocumentationPageAnchors(designSystemId: string, versionId: string, pageId: string): Promise<Array<DTODocumentationPageAnchor>>;
367
+ publishedDocumentationPageVisitData(designSystemId: string, versionId: string, startDate: Date): Promise<Array<PublishedDocPageVisitData>>;
368
+ docsAnalyticsVisitsDifferences(designSystemId: string, versionId: string, payload: DTODocumentationAnalyticsDiffPayload): Promise<Array<DocsAnalyticsVisitsDifference>>;
358
369
  /** Retrieve all asset resources */
359
370
  assetResources(designSystemId: string, versionId: string): Promise<Array<ResourceAsset>>;
360
371
  /** Retrieve all font resources */
@@ -601,6 +612,40 @@ export declare class DataCore {
601
612
  readKeyValueStorageData(designSystemId: string, key: string): Promise<string | object | undefined>;
602
613
  setKeyValueStorageData(designSystemId: string, key: string, value: string | object): Promise<void>;
603
614
  unsetKeyValueStorageData(designSystemId: string, key: string): Promise<void>;
615
+ /**
616
+ * Lists all untyped data for a given workspace.
617
+ * @param workspaceId - The ID of the workspace.
618
+ * @returns A promise that resolves to the list of untyped data.
619
+ */
620
+ listUntypedData(workspaceId: string): Promise<DTOWorkspaceUntypedDataListResponse>;
621
+ /**
622
+ * Creates new untyped data in the specified workspace.
623
+ * @param workspaceId - The ID of the workspace.
624
+ * @param data - The data to create.
625
+ * @returns A promise that resolves to the created untyped data.
626
+ */
627
+ createUntypedData(workspaceId: string, data: any): Promise<DTOWorkspaceUntypedDataResponse>;
628
+ /**
629
+ * Deletes all untyped data in the specified workspace.
630
+ * @param workspaceId - The ID of the workspace.
631
+ * @returns A promise that resolves when the operation is complete.
632
+ */
633
+ deleteAllUntypedData(workspaceId: string): Promise<void>;
634
+ /**
635
+ * Updates specific untyped data in the specified workspace.
636
+ * @param workspaceId - The ID of the workspace.
637
+ * @param id - The ID of the untyped data to update.
638
+ * @param data - The updated data.
639
+ * @returns A promise that resolves to the updated untyped data.
640
+ */
641
+ updateUntypedData(workspaceId: string, id: string, data: any): Promise<DTOWorkspaceUntypedDataResponse>;
642
+ /**
643
+ * Deletes specific untyped data in the specified workspace.
644
+ * @param workspaceId - The ID of the workspace.
645
+ * @param id - The ID of the untyped data to delete.
646
+ * @returns A promise that resolves when the operation is complete.
647
+ */
648
+ deleteUntypedData(workspaceId: string, id: string): Promise<void>;
604
649
  getPageRedirects(designSystemId: string): Promise<{
605
650
  path: string;
606
651
  id: string;
@@ -1,3 +1,4 @@
1
+ import { AIGetRouteQueryTask } from "../../areas/SDKAreaAI";
1
2
  import { DataBridge } from "../SDKDataBridge";
2
3
  export declare class DataCoreAIRequests {
3
4
  private bridge;
@@ -8,9 +9,14 @@ export declare class DataCoreAIRequests {
8
9
  strategy: "noun" | "verb";
9
10
  }): Promise<string>;
10
11
  /** Remote: Autocompletes a prompt into a full text. Response is not streamed. */
11
- autocompleteText(workspaceId: string, designSystemId: string, versionId: string, text: string, options: {
12
+ autocompleteText(workspaceId: string, designSystemId: string, versionId: string, textToComplete: string, options?: {
12
13
  maximumLength: number;
13
- }): Promise<string>;
14
+ previousText?: string;
15
+ afterText?: string;
16
+ }): Promise<{
17
+ completion: string;
18
+ fullText: string;
19
+ }>;
14
20
  /** Remote: Answers question based on the data of design system in natural language. This method is non-streaming. */
15
21
  answer(workspaceId: string, designSystemId: string, versionId: string, question: string, options: {
16
22
  persona: "designer" | "developer";
@@ -22,7 +28,11 @@ export declare class DataCoreAIRequests {
22
28
  persona: "designer" | "developer";
23
29
  scope: "all" | "tokens" | "components" | "assets" | "docs";
24
30
  density: "compact" | "full";
25
- }): Promise<ReadableStream<Uint8Array>>;
31
+ }): Promise<ReadableStreamDefaultReader<Uint8Array>>;
26
32
  /** Indexes or reindexes a design system to prepare it for QA engine */
27
- rebuildAnswerIndex(workspaceId: string, designSystemId: string, versionId: string): Promise<string>;
33
+ rebuildAnswerIndex(workspaceId: string, designSystemId: string, versionId: string): Promise<void>;
34
+ /** Retrieves executable url for various AI tasks */
35
+ executableTaskUrl(task: AIGetRouteQueryTask): Promise<string>;
36
+ cachedEndpoints: Map<AIGetRouteQueryTask, string>;
37
+ private getCachedAIEndpoint;
28
38
  }
@@ -1,4 +1,4 @@
1
- import { DTODesignElementsDataDiffResponse, DTODesignSystem, DTODesignSystemContactsResponse, DTODesignSystemMemberListResponse, DTODesignSystemVersionStats, DTODocumentationLinkPreviewRequest, DTOFigmaNode, DTOFigmaNodeV2, DTOGetDocumentationPageAnchorsResponse, DTOPipeline, DTOTokenCollection } from "@supernova-studio/client";
1
+ import { DTODesignElementsDataDiffResponse, DTODesignSystem, DTODesignSystemContactsResponse, DTODesignSystemMemberListResponse, DTODesignSystemVersionStats, DTODocumentationAnalyticsDiffPayload, DTODocumentationLinkPreviewRequest, DTOFigmaNode, DTOFigmaNodeV2, DTOGetDocumentationPageAnchorsResponse, DTOPipeline, DTOPublishedDocPageVisitData, DTOTokenCollection, DTOWorkspaceUntypedDataListResponse } from "@supernova-studio/client";
2
2
  import { AclRemoteModel } from "../../../model/acl/SDKAcl";
3
3
  import { BootstrapDataRemoteModel } from "../../../model/base/SDKBootstrapData";
4
4
  import { BrandRemoteModel } from "../../../model/base/SDKBrand";
@@ -158,6 +158,15 @@ export declare class DataCoreReadRequests {
158
158
  /** Remote: Get id of the room for a specific workspace. */
159
159
  getRemoteDocumentationWorkspaceRoomId(workspaceId: string): Promise<string>;
160
160
  getRemoteDocumentationPageAnchors(designSystemId: string, versionId: string, pageId: string): Promise<DTOGetDocumentationPageAnchorsResponse>;
161
+ getRemotePublishedDocumentationPageVisitData(designSystemId: string, versionId: string, startDate: Date): Promise<Array<DTOPublishedDocPageVisitData>>;
162
+ getRemoteDocsAnalyticsVisitsDifferences(designSystemId: string, versionId: string, payload: DTODocumentationAnalyticsDiffPayload): Promise<{
163
+ startDate: Date;
164
+ endDate: Date;
165
+ currentVisitCount: number;
166
+ currentSessionCount: number;
167
+ priorVisitCount: number;
168
+ priorSessionCount: number;
169
+ }[]>;
161
170
  /** Remote: Get custom blocks for currently installed documentation exporter under specific ds */
162
171
  getRemoteExporterCustomBlocks(designSystemId: string, versionId: string): Promise<Array<ExporterCustomBlockModel>>;
163
172
  /** Remote: Get user configuration of specific installed exporter */
@@ -265,4 +274,10 @@ export declare class DataCoreReadRequests {
265
274
  designSystemId: string;
266
275
  pagePersistentId: string;
267
276
  }[]>;
277
+ /**
278
+ * Fetches all untyped data for a given workspace.
279
+ * @param workspaceId - The ID of the workspace.
280
+ * @returns A promise that resolves to the list of untyped data.
281
+ */
282
+ getRemoteUntypedDataList(workspaceId: string): Promise<DTOWorkspaceUntypedDataListResponse>;
268
283
  }
@@ -1,4 +1,4 @@
1
- import { DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOCreateDocumentationTabInput, DTODeleteDocumentationGroupInput, DTODeleteDocumentationPageInputV2, DTODeleteDocumentationTabGroupInput, DTODesignSystem, DTODocumentationPageApprovalStateChangeInput, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTOElementActionInput, DTOElementPropertyValuesEditActionInput, DTOExporterPropertyValueMap, DTOFigmaNode, DTOFigmaNodeRenderIdInput, DTOFigmaNodeRenderInput, DTOFigmaNodeV2, DTOMoveDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTOPageRedirectCreateBody, DTOPageRedirectUpdateBody, DTOPipelineCreateBody, DTOPipelineUpdateBody, DTOPublishDocumentationRequest, DTORestoreDocumentationGroupInput, DTORestoreDocumentationPageInput, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2 } from "@supernova-studio/client";
1
+ import { DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOCreateDocumentationTabInput, DTODeleteDocumentationGroupInput, DTODeleteDocumentationPageInputV2, DTODeleteDocumentationTabGroupInput, DTODesignSystem, DTODocumentationPageApprovalStateChangeInput, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTOElementActionInput, DTOElementPropertyValuesEditActionInput, DTOExporterPropertyValueMap, DTOFigmaNode, DTOFigmaNodeRenderIdInput, DTOFigmaNodeRenderInput, DTOFigmaNodeV2, DTOMoveDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTOPageRedirectCreateBody, DTOPageRedirectUpdateBody, DTOPipelineCreateBody, DTOPipelineUpdateBody, DTOPublishDocumentationRequest, DTORestoreDocumentationGroupInput, DTORestoreDocumentationPageInput, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2, DTOWorkspaceUntypedDataResponse } from "@supernova-studio/client";
2
2
  import { DesignSystemInvite, DesignSystemInviteUpdate, DesignSystemMemberUpdate, DesignSystemPendingMemberInvite, DesignSystemUserInvitation } from "@supernova-studio/model";
3
3
  import { DesignSystemAccessMode, ExporterJobDestination, TokenThemeOverrideTranserObject, UserRole } from "../../../exports";
4
4
  import { Brand, BrandRemoteModel, BrandUpdateModel } from "../../../model/base/SDKBrand";
@@ -234,8 +234,8 @@ export declare class DataCoreWriteRequests {
234
234
  deleteRemoteWorkspaceIntegration(workspaceId: string, integrationId: string): Promise<WorkspaceIntegrationType>;
235
235
  /** Remote: Create pipeline */
236
236
  createRemotePipeline(workspaceId: string, payload: DTOPipelineCreateBody): Promise<{
237
- id: string;
238
237
  name: string;
238
+ id: string;
239
239
  workspaceId: string;
240
240
  designSystemId: string;
241
241
  exporterId: string;
@@ -461,8 +461,8 @@ export declare class DataCoreWriteRequests {
461
461
  }>;
462
462
  /** Remote: Update pipeline */
463
463
  updateRemotePipeline(designSystemId: string, pipelineId: string, payload: DTOPipelineUpdateBody): Promise<{
464
- id: string;
465
464
  name: string;
465
+ id: string;
466
466
  workspaceId: string;
467
467
  designSystemId: string;
468
468
  exporterId: string;
@@ -714,4 +714,8 @@ export declare class DataCoreWriteRequests {
714
714
  createPageRedirect(designSystemId: string, body: DTOPageRedirectCreateBody): Promise<void>;
715
715
  updatePageRedirect(designSystemId: string, redirectId: string, body: DTOPageRedirectUpdateBody): Promise<void>;
716
716
  deletePageRedirect(designSystemId: string, redirectId: string): Promise<void>;
717
+ createRemoteUntypedData(workspaceId: string, data: any): Promise<DTOWorkspaceUntypedDataResponse>;
718
+ deleteRemoteAllUntypedData(workspaceId: string): Promise<void>;
719
+ updateRemoteUntypedData(workspaceId: string, id: string, data: any): Promise<DTOWorkspaceUntypedDataResponse>;
720
+ deleteRemoteUntypedData(workspaceId: string, id: string): Promise<void>;
717
721
  }
@@ -5,15 +5,13 @@ export declare class DocsEntityItemResolver {
5
5
  hashedItems: Map<string, {
6
6
  type: "Group";
7
7
  id: string;
8
- persistentId: string;
9
8
  designSystemVersionId: string;
9
+ persistentId: string;
10
10
  createdAt: Date;
11
11
  updatedAt: Date;
12
- shortPersistentId: string;
13
12
  title: string;
14
13
  isRoot: boolean;
15
14
  childrenIds: string[];
16
- groupBehavior: "Group" | "Tabs";
17
15
  configuration: {
18
16
  showSidebar: boolean;
19
17
  isPrivate: boolean;
@@ -46,14 +44,16 @@ export declare class DocsEntityItemResolver {
46
44
  minHeight?: number | null | undefined;
47
45
  };
48
46
  };
47
+ shortPersistentId: string;
48
+ groupBehavior: "Group" | "Tabs";
49
49
  slug?: string | undefined;
50
- userSlug?: string | undefined;
51
50
  approvalState?: {
52
- persistentId: string;
53
51
  designSystemVersionId: string;
52
+ persistentId: string;
54
53
  groupPersistentId: string;
55
54
  approvalState: "ReadyForReview" | "ChangesRequested" | "Approved";
56
55
  } | undefined;
56
+ userSlug?: string | undefined;
57
57
  draftState?: {
58
58
  changeType: "Created";
59
59
  } | {
@@ -107,11 +107,10 @@ export declare class DocsEntityItemResolver {
107
107
  path: string;
108
108
  type: "Page";
109
109
  id: string;
110
- persistentId: string;
111
110
  designSystemVersionId: string;
111
+ persistentId: string;
112
112
  createdAt: Date;
113
113
  updatedAt: Date;
114
- shortPersistentId: string;
115
114
  title: string;
116
115
  configuration: {
117
116
  showSidebar: boolean;
@@ -145,8 +144,8 @@ export declare class DocsEntityItemResolver {
145
144
  minHeight?: number | null | undefined;
146
145
  };
147
146
  };
147
+ shortPersistentId: string;
148
148
  slug?: string | undefined;
149
- userSlug?: string | undefined;
150
149
  approvalState?: {
151
150
  designSystemVersionId: string;
152
151
  createdAt: Date;
@@ -155,6 +154,7 @@ export declare class DocsEntityItemResolver {
155
154
  approvalState: "ReadyForReview" | "ChangesRequested" | "Approved";
156
155
  updatedByUserId: string;
157
156
  } | undefined;
157
+ userSlug?: string | undefined;
158
158
  draftState?: {
159
159
  changeType: "Created";
160
160
  } | {
@@ -68,9 +68,13 @@ export { ElementDataViewColumn, ElementDataViewColumnBasePropertyType, ElementDa
68
68
  export { DesignComponent } from "./model/components/SDKDesignComponent";
69
69
  export { DesignComponentVariant } from "./model/components/SDKDesignComponentVariant";
70
70
  export { DesignComponentPropertyBoolean, DesignComponentPropertyDefinition, DesignComponentPropertyInstanceSwap, DesignComponentPropertyText, DesignComponentPropertyVariant, DesignComponentPropertyType, } from "./model/components/SDKDesignComponentPropertyDefinition";
71
- export { CodeComponent } from './model/code-components/SDKCodeComponent';
72
- export { CodeComponentPropertyControlType, CodeComponentPropertyControlDefinition } from './model/code-components/SDKCodeComponentPropertyControlDefinition';
73
- export { CodeComponentPropertyDefinition } from './model/code-components/SDKCodeComponentPropertyDefinition';
71
+ export { CodeComponent } from "./model/code-components/SDKCodeComponent";
72
+ export { CodeComponentPropertyControlType, CodeComponentPropertyControlDefinition, } from "./model/code-components/SDKCodeComponentPropertyControlDefinition";
73
+ export { CodeComponentPropertyDefinition } from "./model/code-components/SDKCodeComponentPropertyDefinition";
74
+ export { PublishedDocPageVisitData } from "./model/docs_analytics/SDKPublishedDocPageVisitData";
75
+ export { DocsAnalyticsVisitsDifference } from "./model/docs_analytics/SDKDocsAnalyticsVisitsDifference";
76
+ export { DocsAnalyticsTimeFrame } from "./model/docs_analytics/SDKDocsAnalyticsTimeFrame";
77
+ export { DocsAnalyticsTimeFrameComparison } from "./model/docs_analytics/SDKDocsAnalyticsTimeFrameComparison";
74
78
  export { DocsBlockBehavior } from "./model/docs/blocks/definition/SDKDocsBlockBehavior";
75
79
  export { DocsBlockDefinition } from "./model/docs/blocks/definition/SDKDocsBlockDefinition";
76
80
  export { DocsBlockItemDefinition } from "./model/docs/blocks/definition/SDKDocsBlockItemDefinition";
@@ -18,6 +18,11 @@ export type DocsBlockStorybookPropertyData = DocsBlockPropertyData<string | unde
18
18
  caption?: string;
19
19
  height?: number;
20
20
  embedUrl?: string;
21
+ showCode?: boolean;
22
+ showFooter?: boolean;
23
+ showProperties?: boolean;
24
+ showDescription?: boolean;
25
+ showDefaults?: boolean;
21
26
  };
22
27
  /** Storybook property - Definition model */
23
28
  export type DocsBlockStorybookPropertyDefinitionModel = DocsBlockPropertyDefinitionModel & DocsBlockStorybookPropertyOptions;
@@ -0,0 +1,6 @@
1
+ import { DTODocumentationAnalyticsTimeFrame } from "@supernova-studio/client";
2
+ export declare class DocsAnalyticsTimeFrame {
3
+ start: Date;
4
+ end: Date;
5
+ constructor(model: DTODocumentationAnalyticsTimeFrame);
6
+ }
@@ -0,0 +1,7 @@
1
+ import { DTODocumentationAnalyticsTimeFrameComparison } from "@supernova-studio/client";
2
+ import { DocsAnalyticsTimeFrame } from "./SDKDocsAnalyticsTimeFrame";
3
+ export declare class DocsAnalyticsTimeFrameComparison {
4
+ referencePeriod: DocsAnalyticsTimeFrame;
5
+ baselinePeriod: DocsAnalyticsTimeFrame;
6
+ constructor(model: DTODocumentationAnalyticsTimeFrameComparison);
7
+ }
@@ -0,0 +1,10 @@
1
+ import { DTODocumentationPageAnalyticsDifference } from "@supernova-studio/client";
2
+ export declare class DocsAnalyticsVisitsDifference {
3
+ startDate: Date;
4
+ endDate: Date;
5
+ currentVisitCount: number;
6
+ priorVisitCount: number;
7
+ currentSessionCount: number;
8
+ priorSessionCount: number;
9
+ constructor(model: DTODocumentationPageAnalyticsDifference);
10
+ }
@@ -0,0 +1,10 @@
1
+ import { DTOPublishedDocPageVisitData } from "@supernova-studio/client";
2
+ export declare class PublishedDocPageVisitData {
3
+ versionId: string;
4
+ pagePersistentId: string;
5
+ locale: string | null;
6
+ timestamp: Date;
7
+ visits: number;
8
+ sessions: number;
9
+ constructor(model: DTOPublishedDocPageVisitData);
10
+ }
@@ -0,0 +1,39 @@
1
+ export type SDKProjectRemoteModel = {
2
+ id: string;
3
+ name: string;
4
+ createdAt: string;
5
+ contextId: string;
6
+ };
7
+ export type SDKProjectTransportModel = {
8
+ id: string;
9
+ name: string;
10
+ createdAt: string;
11
+ contextId: string;
12
+ };
13
+ export declare class SDKProject {
14
+ /** Unique identifier of the project */
15
+ id: string;
16
+ /** Name of the project */
17
+ name: string;
18
+ /** Date and time when the project was created */
19
+ createdAt: Date;
20
+ /** Unique identifier of the project context */
21
+ contextId: string;
22
+ constructor(model: SDKProjectRemoteModel);
23
+ /**
24
+ * Constructs a representation suitable for remote storage.
25
+ * @returns The remote model of the project.
26
+ */
27
+ toRemote(): SDKProjectRemoteModel;
28
+ /**
29
+ * Constructs a representation that can be serialized to JSON for transport.
30
+ * @returns The transport model of the project.
31
+ */
32
+ toTransport(): SDKProjectTransportModel;
33
+ /**
34
+ * Reconstructs an SDKProject instance from a transport model.
35
+ * @param model - The transport model to deserialize.
36
+ * @returns A new SDKProject instance.
37
+ */
38
+ static fromTransport(model: SDKProjectTransportModel): SDKProject;
39
+ }