@supernova-studio/supernova-sdk-beta 2.0.19 → 2.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/build/sdk-typescript/src/core/areas/SDKAreaBulkOperations.d.ts +8 -0
  2. package/build/sdk-typescript/src/core/areas/SDKAreaDesignSystems.d.ts +33 -2
  3. package/build/sdk-typescript/src/core/areas/SDKAreaTokens.d.ts +1 -1
  4. package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +13 -3
  5. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +7 -4
  6. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +10 -5
  7. package/build/sdk-typescript/src/exports-pulsar.d.ts +2 -0
  8. package/build/sdk-typescript/src/exports.d.ts +3 -0
  9. package/build/sdk-typescript/src/model/assets/SDKAsset.d.ts +1 -1
  10. package/build/sdk-typescript/src/model/base/SDKBootstrapData.d.ts +23 -0
  11. package/build/sdk-typescript/src/model/base/SDKDesignSystem.d.ts +11 -19
  12. package/build/sdk-typescript/src/model/base/SDKDesignSystemMemberList.d.ts +15 -0
  13. package/build/sdk-typescript/src/model/components/SDKDesignComponent.d.ts +9 -31
  14. package/build/sdk-typescript/src/model/components/SDKDesignComponentBase.d.ts +15 -0
  15. package/build/sdk-typescript/src/model/components/SDKDesignComponentPropertyDefinition.d.ts +38 -0
  16. package/build/sdk-typescript/src/model/components/SDKDesignComponentVariant.d.ts +9 -0
  17. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockFigmaComponentProperty.d.ts +0 -4
  18. package/build/sdk-typescript/src/model/docs/blocks/properties/SDKDocsBlockTokenProperty.d.ts +13 -6
  19. package/build/sdk-typescript/src/model/enums/SDKUserRole.d.ts +3 -0
  20. package/build/sdk-typescript/src/model/exporters/SDKPipeline.d.ts +3 -0
  21. package/build/sdk-typescript/src/model/support/SDKDesignComponentOrigin.d.ts +2 -8
  22. package/build/sdk-typescript/src/model/themes/SDKTokenTheme.d.ts +2 -2
  23. package/build/sdk-typescript/src/model/themes/SDKTokenThemeOverride.d.ts +2 -2
  24. package/build/sdk-typescript/src/pulsar-interfaces.d.ts +5 -0
  25. package/build/supernova-sdk-typescript.js +1 -1
  26. package/build/supernova-sdk-typescript.js.map +1 -1
  27. package/package.json +3 -3
  28. /package/build/sdk-typescript/src/model/docs/blocks/definition/actual/{figma-component-propstable → figma-component-props-table}/SDKDocsBlockActualFigmaComponentPropsTable.d.ts +0 -0
@@ -1,3 +1,4 @@
1
+ import { BootstrapData } from "../../model/base/SDKBootstrapData";
1
2
  import { Component } from "../../model/components/SDKComponent";
2
3
  import { ElementProperty } from "../../model/elements/SDKElementProperty";
3
4
  import { TokenGroup } from "../../model/groups/SDKTokenGroup";
@@ -65,4 +66,11 @@ export declare class AreaBulkOperations {
65
66
  * @returns Nothing
66
67
  */
67
68
  updateComponentData(to: RemoteVersionIdentifier, data: ComponentUpdateTransactionData): Promise<void>;
69
+ /** Fetches a chain of workspace, design system, version and brand, available to the current user.
70
+ * @param preferredWorkspaceId - Preferred workspace ID to fetch
71
+ * @param preferredDesignSystemId - Preferred design system ID to fetch
72
+ * @param preferredVersionId - Preferred version ID to fetch
73
+ * @param preferredBrandId - Preferred brand ID to fetch
74
+ */
75
+ bootstrapData(preferredWorkspaceId?: string, preferredDesignSystemId?: string, preferredVersionId?: string, preferredBrandId?: string): Promise<BootstrapData>;
68
76
  }
@@ -1,5 +1,7 @@
1
1
  import { DTODocumentationLinkPreviewRequest, DTODocumentationPageApprovalStateChangeInput } from "@supernova-studio/client";
2
- import { DesignSystem, DesignSystemSwitcher } from "../../model/base/SDKDesignSystem";
2
+ import { DesignSystemInvite, DesignSystemPendingMemberInvite, DesignSystemUserInvitation } from "@supernova-studio/model";
3
+ import { DesignSystem, DesignSystemAccessMode, DesignSystemSwitcher } from "../../model/base/SDKDesignSystem";
4
+ import { DesignSystemMemberList } from "../../model/base/SDKDesignSystemMemberList";
3
5
  import { CustomDomain } from "../../model/support/SDKCustomDomain";
4
6
  import { DataCore } from "../data/SDKDataCore";
5
7
  export declare class AreaDesignSystems {
@@ -21,11 +23,22 @@ export declare class AreaDesignSystems {
21
23
  * @returns custom domain information
22
24
  */
23
25
  designSystemCustomDomain(designSystemId: string): Promise<CustomDomain>;
26
+ /** Fetches specific design system's memberships
27
+ * @param designSystemId - Design system's identifier
28
+ * @returns Design system's memberships
29
+ */
30
+ designSystemMemberList(designSystemId: string): Promise<DesignSystemMemberList>;
24
31
  /** Creates a new design system and retrieves the newly created DS object
32
+ * @param workspaceId - Workspace to create the design system in
25
33
  * @param name - Name of the design system
34
+ * @param description - Description of the design system
35
+ * @param accessMode - Defines who can access the design system
36
+ * @param usersToInvite - Existing users to invite
37
+ * @param invitesToInvite - Pending memberships to invite
38
+ * @param emailsToInvite - New emails to invite
26
39
  * @returns Newly created design system object
27
40
  */
28
- createDesignSystem(workspaceId: string, name: string, description?: string): Promise<DesignSystem>;
41
+ createDesignSystem(workspaceId: string, name: string, description?: string, accessMode?: DesignSystemAccessMode, usersToInvite?: Array<DesignSystemUserInvitation>, invitesToInvite?: Array<DesignSystemPendingMemberInvite>, emailsToInvite?: Array<DesignSystemInvite>): Promise<DesignSystem>;
29
42
  getBlockDefinitions(designSystemId: string, versionId: string): Promise<import("../..").DocsBlockDefinition[]>;
30
43
  getUrlPreview(designSystemId: string, versionId: string, request: DTODocumentationLinkPreviewRequest): Promise<{
31
44
  linkPreview: {
@@ -97,6 +110,24 @@ export declare class AreaDesignSystems {
97
110
  * @returns nothing
98
111
  */
99
112
  updateDesignSystemCustomDomain(designSystemId: string, newDomain: string): Promise<CustomDomain>;
113
+ /** Updates design system's access mode and, if switching to invite-only, also the member list
114
+ * @param designSystemId - ID of the design system
115
+ * @param accessMode - new access mode
116
+ * @param retainUserIds - which users to keep when switching to invite-only
117
+ * @param retainInviteIds - which invites to keep when switching to invite-only
118
+ * @returns nothing
119
+ */
120
+ updateDesignSystemAccessAndMemberList(designSystemId: string, accessMode: DesignSystemAccessMode, retainUserIds: Array<string>, retainInviteIds: Array<string>): Promise<void>;
121
+ /** Updates design system's member list
122
+ * @param designSystemId - ID of the design system
123
+ * @param usersToInvite - Existing users to invite
124
+ * @param invitesToInvite - Pending memberships to invite
125
+ * @param emailsToInvite - New emails to invite
126
+ * @param deleteInvitationIds - Pending memberships to delete
127
+ * @param removeUserIds - Existing users to remove
128
+ * @returns nothing
129
+ */
130
+ updateDesignSystemMemberList(designSystemId: string, usersToInvite?: Array<DesignSystemUserInvitation>, invitesToInvite?: Array<DesignSystemPendingMemberInvite>, emailsToInvite?: Array<DesignSystemInvite>, deleteInvitationIds?: Array<string>, removeUserIds?: Array<string>): Promise<void>;
100
131
  /** Deletes a design system. This action is irreversible, all data will be lost, and can only be performed by the admins of the workspace
101
132
  * @param designSystemId - ID of the design system
102
133
  * @returns Nothing. RIP design system.
@@ -213,7 +213,7 @@ export declare class AreaTokens {
213
213
  /** Warning: INTERNAL, DO NOT USE YET, NOT STABLE INTERFACE. Write theme in bulk */
214
214
  writeTheme(to: RemoteVersionIdentifier, theme: TokenTheme): Promise<void>;
215
215
  /** Resolves tokens by applying themes to them and retrieves new token set where values correctly correspond to that theme */
216
- computeTokensByApplyingThemes(tokens: Array<Token>, themes: Array<TokenTheme>): Promise<Array<Token>>;
216
+ computeTokensByApplyingThemes(allTokens: Array<Token>, tokens: Array<Token>, themes: Array<TokenTheme>): Array<Token>;
217
217
  /** Separates groups by types */
218
218
  computeGroupTrees(groups: Array<TokenGroup>): Promise<Map<TokenType, Array<TokenGroup>>>;
219
219
  /** Get determistic mocked token data. Must be used with mocked token groups */
@@ -1,11 +1,14 @@
1
1
  import { DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOCreateDocumentationTabInput, DTODeleteDocumentationGroupInput, DTODeleteDocumentationPageInputV2, DTODeleteDocumentationTabGroupInput, DTODesignElementsDataDiffResponse, DTODocumentationLinkPreviewRequest, DTODocumentationPageAnchor, DTODocumentationPageApprovalStateChangeInput, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTOFigmaNode, // TODO? DTODeleteDocumentationTabGroupInput,
2
2
  DTOFigmaNodeRenderInput, DTOMoveDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTOPublishDocumentationRequest, DTORestoreDocumentationGroupInput, DTORestoreDocumentationPageInput, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2 } from "@supernova-studio/client";
3
- import { DocsBlockDefinition, ExportBuildStatus, ResourceFont, TokenThemeOverrideTranserObject } from "../../exports";
3
+ import { DesignSystemInvite, DesignSystemPendingMemberInvite, DesignSystemUserInvitation } from "@supernova-studio/model";
4
+ import { DesignSystemAccessMode, DocsBlockDefinition, ExportBuildStatus, ResourceFont, TokenThemeOverrideTranserObject } from "../../exports";
4
5
  import { Acl } from "../../model/acl/SDKAcl";
5
6
  import { Asset } from "../../model/assets/SDKAsset";
6
7
  import { RenderedAsset } from "../../model/assets/SDKRenderedAsset";
8
+ import { BootstrapData } from "../../model/base/SDKBootstrapData";
7
9
  import { Brand, BrandUpdateModel } from "../../model/base/SDKBrand";
8
10
  import { DesignSystem, DesignSystemSwitcher } from "../../model/base/SDKDesignSystem";
11
+ import { DesignSystemMemberList } from "../../model/base/SDKDesignSystemMemberList";
9
12
  import { DesignSystemVersion, DesignSystemVersionCreate, DesignSystemVersionCreationJob, DesignSystemVersionUpdateModel } from "../../model/base/SDKDesignSystemVersion";
10
13
  import { DocumentationLegacy, DocumentationLegacyModel } from "../../model/base/SDKDocumentationLegacy";
11
14
  import { Component } from "../../model/components/SDKComponent";
@@ -84,6 +87,7 @@ export declare class DataCore {
84
87
  getBridgeInternal(): DataBridge;
85
88
  fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
86
89
  dataThroughCorsProxy(urlToRalay: string): Promise<ArrayBuffer | undefined>;
90
+ bootstrapData(preferredWorkspaceId?: string, preferredDesignSystemId?: string, preferredVersionId?: string, preferredBrandId?: string): Promise<BootstrapData>;
87
91
  /** Remote: Get single-use multiplayer token */
88
92
  multiplayerToken(room: string | undefined): Promise<{
89
93
  token: string;
@@ -185,6 +189,10 @@ export declare class DataCore {
185
189
  createDocumentationPage(designSystemId: string, versionId: string, payload: Omit<DTOCreateDocumentationPageInputV2, "persistentId">): Promise<string>;
186
190
  /** Update page approval state */
187
191
  updateApprovalState(designSystemId: string, versionId: string, payload: DTODocumentationPageApprovalStateChangeInput): Promise<string>;
192
+ /** Update design system's access mode and, if switching to invite-only, also the member list */
193
+ updateDesignSystemAccessModeAndMemberList(designSystemId: string, accessMode: DesignSystemAccessMode, retainUserIds: Array<string>, retainInviteIds: Array<string>): Promise<void>;
194
+ /** Update design system's member list */
195
+ updateDesignSystemMemberList(designSystemId: string, usersToInvite?: Array<DesignSystemUserInvitation>, invitesToInvite?: Array<DesignSystemPendingMemberInvite>, emailsToInvite?: Array<DesignSystemInvite>, deleteInvitationIds?: Array<string>, removeUserIds?: Array<string>): Promise<void>;
188
196
  /** Create a group within documentation */
189
197
  createDocumentationGroup(designSystemId: string, versionId: string, payload: Omit<DTOCreateDocumentationGroupInput, "persistentId">): Promise<string>;
190
198
  /** Create a tab group within documentation */
@@ -458,7 +466,7 @@ export declare class DataCore {
458
466
  /** Download information about design systems that user has access to under a single workspace and retrieve it resolved */
459
467
  designSystems(workspaceId: any): Promise<Array<DesignSystem>>;
460
468
  /** Creates a design system */
461
- createDesignSystem(workspaceId: string, name: string, description?: string): Promise<DesignSystem>;
469
+ createDesignSystem(workspaceId: string, name: string, description?: string, accessMode?: DesignSystemAccessMode, usersToInvite?: Array<DesignSystemUserInvitation>, invitesToInvite?: Array<DesignSystemPendingMemberInvite>, emailsToInvite?: Array<DesignSystemInvite>): Promise<DesignSystem>;
462
470
  getBlockDefinitions(designSystemId: string, versionId: string): Promise<Array<DocsBlockDefinition>>;
463
471
  getUrlPreview(designSystemId: string, versionId: string, request: DTODocumentationLinkPreviewRequest): Promise<{
464
472
  linkPreview: {
@@ -498,8 +506,10 @@ export declare class DataCore {
498
506
  designSystemCustomDomain(designSystemId: string): Promise<CustomDomain>;
499
507
  /** Download information about a desing system source within a design system design and retrieve it resolved */
500
508
  designSystemSource(designSystemId: string, sourceId: string): Promise<Source>;
501
- /** Download information about all desing system sources within a design system design and retrieve it resolved */
509
+ /** Download information about all design system sources within a design system design and retrieve it resolved */
502
510
  designSystemSources(designSystemId: string): Promise<Array<Source>>;
511
+ /** Download information about all design system members */
512
+ designSystemMemberList(designSystemId: string): Promise<DesignSystemMemberList>;
503
513
  getFigmaNodeStructures(designSystemId: string, versionId: string): Promise<Array<FigmaStructure>>;
504
514
  getFigmaNodeStructureDetail(designSystemId: string, versionId: string, figmaStructureId: string): Promise<FigmaStructureDetail>;
505
515
  deleteFigmaSource(designSystemId: string, sourceId: string): Promise<void>;
@@ -1,7 +1,7 @@
1
- import { DTODesignElementsDataDiffResponse, DTODocumentationLinkPreviewRequest, DTOFigmaNode, DTOGetDocumentationPageAnchorsResponse, DTOPipeline } from "@supernova-studio/client";
1
+ import { DTODesignElementsDataDiffResponse, DTODesignSystem, DTODesignSystemMemberListResponse, DTODocumentationLinkPreviewRequest, DTOFigmaNode, DTOGetDocumentationPageAnchorsResponse, DTOPipeline } from "@supernova-studio/client";
2
2
  import { AclRemoteModel } from "../../../model/acl/SDKAcl";
3
+ import { BootstrapDataRemoteModel } from "../../../model/base/SDKBootstrapData";
3
4
  import { BrandRemoteModel } from "../../../model/base/SDKBrand";
4
- import { DesignSystemRemoteModel } from "../../../model/base/SDKDesignSystem";
5
5
  import { DesignSystemVersionCreationJobRemoteModel, DesignSystemVersionRemoteModel } from "../../../model/base/SDKDesignSystemVersion";
6
6
  import { DocumentationLegacyModel } from "../../../model/base/SDKDocumentationLegacy";
7
7
  import { ComponentRemoteModel } from "../../../model/components/SDKComponent";
@@ -55,6 +55,7 @@ export declare class DataCoreReadRequests {
55
55
  private bridge;
56
56
  constructor(bridge: DataBridge);
57
57
  getDataThroughCorsProxy(url: string): Promise<ArrayBuffer | undefined>;
58
+ getRemoteBootstrapData(preferredWorkspaceId?: string, preferredDesignSystemId?: string, preferredVersionId?: string, preferredBrandId?: string): Promise<BootstrapDataRemoteModel>;
58
59
  /** Remote: Get information about currently logged in user */
59
60
  getRemoteMultiplayerToken(room: string | undefined): Promise<{
60
61
  token: string;
@@ -104,9 +105,9 @@ export declare class DataCoreReadRequests {
104
105
  getRemoteWorkspaceSubscription(workspaceId: string): Promise<WorkspaceSubscriptionRemoteModel>;
105
106
  getRemoteWorkspaceAvailableProducts(workspaceId: string): Promise<Array<WorkspaceProductRemoteModel>>;
106
107
  /** Remote: Get information about one specific design system */
107
- getRemoteDesignSystem(designSystemId: string): Promise<DesignSystemRemoteModel>;
108
+ getRemoteDesignSystem(designSystemId: string): Promise<DTODesignSystem>;
108
109
  /** Remote: Get information about all design systems under specific workspace */
109
- getRemoteDesignSystems(workspaceId: string): Promise<Array<DesignSystemRemoteModel>>;
110
+ getRemoteDesignSystems(workspaceId: string): Promise<Array<DTODesignSystem>>;
110
111
  /** Remote: Get custom domain */
111
112
  getRemoteCustomDomain(designSystemId: string): Promise<CustomDomainRemoteModel>;
112
113
  /** Remote: Get a single design source */
@@ -117,6 +118,8 @@ export declare class DataCoreReadRequests {
117
118
  getFigmaNodeStructures(designSystemId: string, versionId: string): Promise<Array<FigmaStructureModel>>;
118
119
  /** Remote: Get figma node detail */
119
120
  getFigmaNodeStructureDetail(designSystemId: string, versionId: string, figmaStructureId: string): Promise<FigmaStructureDetailModel>;
121
+ /** Remote: Get information about design system's members */
122
+ getRemoteDesignSystemMemberList(designSystemId: string): Promise<DTODesignSystemMemberListResponse>;
120
123
  /** Remote: Get design system documentation url */
121
124
  getRemoteDocumentationUrl(designSystemId: string, versionId: string): Promise<string | null>;
122
125
  /** Remote: Get documentation metadata */
@@ -1,7 +1,8 @@
1
- import { DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOCreateDocumentationTabInput, DTODeleteDocumentationGroupInput, DTODeleteDocumentationPageInputV2, DTODeleteDocumentationTabGroupInput, DTODocumentationPageApprovalStateChangeInput, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTOFigmaNode, DTOFigmaNodeRenderInput, DTOMoveDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTOPublishDocumentationRequest, DTORestoreDocumentationGroupInput, DTORestoreDocumentationPageInput, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2 } from "@supernova-studio/client";
2
- import { TokenThemeOverrideTranserObject } from "../../../exports";
1
+ import { DTOCreateDocumentationGroupInput, DTOCreateDocumentationPageInputV2, DTOCreateDocumentationTabInput, DTODeleteDocumentationGroupInput, DTODeleteDocumentationPageInputV2, DTODeleteDocumentationTabGroupInput, DTODesignSystem, DTODocumentationPageApprovalStateChangeInput, DTODuplicateDocumentationGroupInput, DTODuplicateDocumentationPageInputV2, DTOFigmaNode, DTOFigmaNodeRenderInput, DTOMoveDocumentationGroupInput, DTOMoveDocumentationPageInputV2, DTOPublishDocumentationRequest, DTORestoreDocumentationGroupInput, DTORestoreDocumentationPageInput, DTOUpdateDocumentationGroupInput, DTOUpdateDocumentationPageInputV2 } from "@supernova-studio/client";
2
+ import { DesignSystemInvite, DesignSystemPendingMemberInvite, DesignSystemUserInvitation } from "@supernova-studio/model";
3
+ import { DesignSystemAccessMode, TokenThemeOverrideTranserObject } from "../../../exports";
3
4
  import { Brand, BrandRemoteModel, BrandUpdateModel } from "../../../model/base/SDKBrand";
4
- import { DesignSystem, DesignSystemRemoteModel, DesignSystemSwitcher } from "../../../model/base/SDKDesignSystem";
5
+ import { DesignSystem, DesignSystemSwitcher } from "../../../model/base/SDKDesignSystem";
5
6
  import { DesignSystemVersionCreateRemoteModel, DesignSystemVersionUpdateModel } from "../../../model/base/SDKDesignSystemVersion";
6
7
  import { DocumentationLegacyModel } from "../../../model/base/SDKDocumentationLegacy";
7
8
  import { Component, ComponentRemoteModel, ComponentUpdateRemoteModel } from "../../../model/components/SDKComponent";
@@ -29,7 +30,7 @@ import { UserProfileUpdateModel } from "../../../model/users/SDKUserProfile";
29
30
  import { UserWorkspaceNotificationSettingsUpdateModel } from "../../../model/users/SDKUserWorkspaceNotificationSettings";
30
31
  import { WorkspaceRemoteModel } from "../../../model/workspaces/SDKWorkspace";
31
32
  import { WorkspaceIPWhitelistSettingsUpdateModel } from "../../../model/workspaces/SDKWorkspaceIPWhitelistSettings";
32
- import { WorkspaceIntegrationType, WorkspaceIntegrationsRemoteModel } from "../../../model/workspaces/SDKWorkspaceIntegration";
33
+ import { WorkspaceIntegrationsRemoteModel, WorkspaceIntegrationType } from "../../../model/workspaces/SDKWorkspaceIntegration";
33
34
  import { WorkspaceIntegrationAccessTokenPayload } from "../../../model/workspaces/SDKWorkspaceIntegrationAccessToken";
34
35
  import { WorkspaceInvitationUpdateModel } from "../../../model/workspaces/SDKWorkspaceInvitation";
35
36
  import { WorkspaceNPMRegistrySettingsUpdateModel } from "../../../model/workspaces/SDKWorkspaceNPMRegistrySettings";
@@ -116,7 +117,7 @@ export declare class DataCoreWriteRequests {
116
117
  /** Remote: Restore the cancelled subscription */
117
118
  restoreRemoteWorkspaceSubscription(workspaceId: string): Promise<void>;
118
119
  /** Remote: Creates a new design system */
119
- createRemoteDesignSystem(workspaceId: string, name: string, description?: string): Promise<DesignSystemRemoteModel>;
120
+ createRemoteDesignSystem(workspaceId: string, name: string, description?: string, accessMode?: DesignSystemAccessMode, usersToInvite?: Array<DesignSystemUserInvitation>, invitesToInvite?: Array<DesignSystemPendingMemberInvite>, emailsToInvite?: Array<DesignSystemInvite>): Promise<DTODesignSystem>;
120
121
  /** Remote: Updates a design system metadata */
121
122
  updateRemoteDesignSystemMetadata(designSystemId: string, name: string, description?: string): Promise<void>;
122
123
  /** Remote: Updates a design system multibrand capabilities */
@@ -134,6 +135,10 @@ export declare class DataCoreWriteRequests {
134
135
  updateRemoteDocumentationStructure(designSystemId: string, versionId: string, model: DocumentationLegacyModel): Promise<void>;
135
136
  /** Remote: Updates a design system documentation slug */
136
137
  updateRemoteDesignSystemDocumentationSlug(designSystem: DesignSystem, docUserSlug: string): Promise<void>;
138
+ /** Remote: Updates a design system's access mode and, if switching to invite-only, also the member list */
139
+ updateRemoteDesignSystemAccessModeAndMemberList(designSystemId: string, accessMode: DesignSystemAccessMode, retainUserIds: Array<string>, retainInviteIds: Array<string>): Promise<void>;
140
+ /** Remote: Updates a design system's member list */
141
+ updateRemoteDesignSystemMemberList(designSystemId: string, usersToInvite?: Array<DesignSystemUserInvitation>, invitesToInvite?: Array<DesignSystemPendingMemberInvite>, emailsToInvite?: Array<DesignSystemInvite>, deleteInvitationIds?: Array<string>, removeUserIds?: Array<string>): Promise<void>;
137
142
  /** Remote: Deletes a design system */
138
143
  deleteDesignSystem(designSystemId: string): Promise<void>;
139
144
  private elementAction;
@@ -37,6 +37,8 @@ export type { ElementPropertyOptionBadgeColor } from "./model/elements/SDKElemen
37
37
  export type { ElementDataView } from "./model/elements/SDKElementDataView";
38
38
  export type { ElementDataViewColumn } from "./model/elements/SDKElementDataViewColumn";
39
39
  export type { DesignComponent } from "./model/components/SDKDesignComponent";
40
+ export type { DesignComponentVariant } from "./model/components/SDKDesignComponentVariant";
41
+ export type { DesignComponentPropertyBoolean, DesignComponentPropertyDefinition, DesignComponentPropertyInstanceSwap, DesignComponentPropertyText, DesignComponentPropertyVariant, DesignComponentPropertyType, } from "./model/components/SDKDesignComponentPropertyDefinition";
40
42
  export type { DocsBlockBehavior } from "./model/docs/blocks/definition/SDKDocsBlockBehavior";
41
43
  export type { DocsBlockDefinition } from "./model/docs/blocks/definition/SDKDocsBlockDefinition";
42
44
  export type { DocsBlockItemDefinition } from "./model/docs/blocks/definition/SDKDocsBlockItemDefinition";
@@ -34,6 +34,7 @@ export type { FeaturePermissionResolution } from "./model/workspaces/SDKWorkspac
34
34
  export { Brand } from "./model/base/SDKBrand";
35
35
  export type { BrandUpdateModel } from "./model/base/SDKBrand";
36
36
  export { DesignSystem } from "./model/base/SDKDesignSystem";
37
+ export type { DesignSystemAccessMode } from "./model/base/SDKDesignSystem";
37
38
  export { DesignSystemVersion } from "./model/base/SDKDesignSystemVersion";
38
39
  export type { DesignSystemVersionCreate, DesignSystemVersionUpdateModel, DesignSystemVersionCreationJob, } from "./model/base/SDKDesignSystemVersion";
39
40
  export { Membership } from "./model/membership/SDKMembership";
@@ -55,6 +56,8 @@ export type { ElementPropertyOptionBadgeColor } from "./model/elements/SDKElemen
55
56
  export { ElementDataView } from "./model/elements/SDKElementDataView";
56
57
  export { ElementDataViewColumn, ElementDataViewColumnBasePropertyType, ElementDataViewColumnType, } from "./model/elements/SDKElementDataViewColumn";
57
58
  export { DesignComponent } from "./model/components/SDKDesignComponent";
59
+ export { DesignComponentVariant } from "./model/components/SDKDesignComponentVariant";
60
+ export { DesignComponentPropertyBoolean, DesignComponentPropertyDefinition, DesignComponentPropertyInstanceSwap, DesignComponentPropertyText, DesignComponentPropertyVariant, DesignComponentPropertyType, } from "./model/components/SDKDesignComponentPropertyDefinition";
58
61
  export { DocsBlockBehavior } from "./model/docs/blocks/definition/SDKDocsBlockBehavior";
59
62
  export { DocsBlockDefinition } from "./model/docs/blocks/definition/SDKDocsBlockDefinition";
60
63
  export { DocsBlockItemDefinition } from "./model/docs/blocks/definition/SDKDocsBlockItemDefinition";
@@ -7,7 +7,7 @@ export declare class Asset {
7
7
  thumbnailUrl: string | null;
8
8
  svgUrl: string | null;
9
9
  name: string;
10
- description: string;
10
+ description: string | null;
11
11
  componentId: string | null;
12
12
  previouslyDuplicatedNames: number;
13
13
  origin: DesignComponentOrigin | null;
@@ -0,0 +1,23 @@
1
+ import { DTODesignSystem } from "@supernova-studio/client";
2
+ import { Membership, MembershipRemoteModel } from "../membership/SDKMembership";
3
+ import { Brand, BrandRemoteModel } from "./SDKBrand";
4
+ import { DesignSystem } from "./SDKDesignSystem";
5
+ import { DesignSystemVersion, DesignSystemVersionRemoteModel } from "./SDKDesignSystemVersion";
6
+ export type BootstrapDataRemoteModel = {
7
+ id: string;
8
+ workspaceMembership: MembershipRemoteModel;
9
+ designSystem: DTODesignSystem;
10
+ version: DesignSystemVersionRemoteModel;
11
+ brand: BrandRemoteModel;
12
+ };
13
+ export declare class BootstrapData {
14
+ /** Workspace membership available to the current user */
15
+ workspaceMembership: Membership | null;
16
+ /** Design system available to the current user */
17
+ designSystem: DesignSystem | null;
18
+ /** Design system version available to the current user */
19
+ version: DesignSystemVersion | null;
20
+ /** Brand available to the current user */
21
+ brand: Brand | null;
22
+ constructor(model: BootstrapDataRemoteModel);
23
+ }
@@ -1,23 +1,10 @@
1
+ import { DTODesignSystem } from "@supernova-studio/client";
2
+ import { UserRole } from "../enums/SDKUserRole";
1
3
  export type DesignSystemSwitcher = {
2
4
  isEnabled: boolean;
3
5
  designSystemIds: Array<string>;
4
6
  };
5
- export type DesignSystemRemoteModel = {
6
- id: string;
7
- meta: {
8
- name: string;
9
- description: string;
10
- };
11
- workspaceId: string;
12
- isPublic: boolean;
13
- isMultibrand: boolean;
14
- isApprovalFeatureEnabled: boolean;
15
- approvalRequiredForPublishing: boolean;
16
- docSlug: string;
17
- docUserSlug?: string;
18
- docExporterId: string;
19
- designSystemSwitcher: DesignSystemSwitcher;
20
- };
7
+ export type DesignSystemAccessMode = "Open" | "InviteOnly";
21
8
  export type DesignSystemTransportModel = Pick<DesignSystem, "id" | "name" | "description" | "isPublic" | "isMultiBrand" | "documentationSlug" | "documentationUserSlug" | "documentationExporterId" | "designSystemSwitcher" | "workspaceId">;
22
9
  export declare class DesignSystem {
23
10
  /** Unique identifier of design system */
@@ -44,11 +31,16 @@ export declare class DesignSystem {
44
31
  documentationUserSlug: string | null;
45
32
  /** Binding multiple design systems together */
46
33
  designSystemSwitcher: DesignSystemSwitcher;
47
- constructor(model: DesignSystemRemoteModel);
48
- /** Constructs representation that can be used to write full object to remote */
49
- toRemote(): DesignSystemRemoteModel;
34
+ /** Access mode of the design system */
35
+ accessMode: DesignSystemAccessMode;
36
+ /** Effective role of the user in the design system.
37
+ * Is `null` when the user doesn't have access to the design system, but can know about its existence (e.g. Owners). */
38
+ effectiveRole: UserRole | null;
39
+ constructor(model: DTODesignSystem);
50
40
  /** Constructs representation that can be used to transport the instantiated object as JSON, for example for SSR <> Client use-cases. Reconstruct to class instance using `fromTransport` */
51
41
  toTransport(): DesignSystemTransportModel;
52
42
  /** Reconstructs class from the transport model */
53
43
  static fromTransport(model: DesignSystemTransportModel): DesignSystem;
44
+ /** Returns true if the design system is available to the current user */
45
+ get isAvailableToUser(): boolean;
54
46
  }
@@ -0,0 +1,15 @@
1
+ import { DTODesignSystemMemberListResponse } from "@supernova-studio/client";
2
+ export type DesignSystemUser = {
3
+ userId: string;
4
+ };
5
+ export type DesignSystemInvitation = {
6
+ id: string;
7
+ workspaceInvitationId: string;
8
+ };
9
+ export declare class DesignSystemMemberList {
10
+ /** List of existing users that belong to the design system */
11
+ users: Array<DesignSystemUser>;
12
+ /** List of invitations that belong to the design system */
13
+ invitations: Array<DesignSystemInvitation>;
14
+ constructor(model: DTODesignSystemMemberListResponse);
15
+ }
@@ -1,34 +1,12 @@
1
- import { DesignComponentOrigin, DesignComponentOriginModel } from "../support/SDKDesignComponentOrigin";
1
+ import { DTOFigmaComponent } from "@supernova-studio/client";
2
2
  import { Source } from "../support/SDKSource";
3
- export type DesignComponentRemoteModel = {
4
- id: string;
5
- persistentId: string;
6
- designSystemVersionId: string;
7
- brandId: string;
8
- thumbnailUrl?: string;
9
- svgUrl?: string;
10
- exportProperties: {
11
- isAsset: boolean;
12
- };
13
- meta: {
14
- name: string;
15
- description: string;
16
- };
17
- originComponent?: DesignComponentOriginModel;
18
- properties: Array<any>;
19
- rootNode?: any;
20
- createdAt?: string;
21
- updatedAt?: string;
22
- };
23
- export declare class DesignComponent {
24
- id: string;
25
- brandId: string;
26
- thumbnailUrl: string | null;
27
- svgUrl: string | null;
28
- name: string;
29
- description: string;
30
- origin: DesignComponentOrigin | null;
31
- createdAt: Date | null;
32
- updatedAt: Date | null;
3
+ import { DesignComponentBase } from "./SDKDesignComponentBase";
4
+ import { DesignComponentPropertyDefinition } from "./SDKDesignComponentPropertyDefinition";
5
+ import { DesignComponentVariant } from "./SDKDesignComponentVariant";
6
+ export type DesignComponentRemoteModel = DTOFigmaComponent;
7
+ export declare class DesignComponent extends DesignComponentBase {
8
+ componentPropertyDefinitions: DesignComponentPropertyDefinition[] | null;
9
+ childrenPersistentIds: Array<string> | null;
10
+ children: Array<DesignComponentVariant> | null;
33
11
  constructor(model: DesignComponentRemoteModel, sources: Array<Source>);
34
12
  }
@@ -0,0 +1,15 @@
1
+ import { DTOFigmaComponent } from "@supernova-studio/client";
2
+ import { DesignComponentOrigin } from "../support/SDKDesignComponentOrigin";
3
+ import { Source } from "../support/SDKSource";
4
+ export declare abstract class DesignComponentBase {
5
+ id: string;
6
+ brandId: string;
7
+ thumbnailUrl: string | null;
8
+ svgUrl: string | null;
9
+ name: string;
10
+ description: string | null;
11
+ origin: DesignComponentOrigin | null;
12
+ createdAt: Date | null;
13
+ updatedAt: Date | null;
14
+ constructor(model: DTOFigmaComponent, sources: Array<Source>);
15
+ }
@@ -0,0 +1,38 @@
1
+ import { DTOFigmaComponent, DTOFigmaComponentBooleanProperty, DTOFigmaComponentInstanceSwapProperty, DTOFigmaComponentTextProperty, DTOFigmaComponentVariantProperty } from "@supernova-studio/client";
2
+ export declare enum DesignComponentPropertyType {
3
+ Boolean = "Boolean",
4
+ InstanceSwap = "InstanceSwap",
5
+ Text = "Text",
6
+ Variant = "Variant"
7
+ }
8
+ type DesignComponentPropertyDefinitionRemoteType = NonNullable<DTOFigmaComponent["componentPropertyDefinitions"]>[string];
9
+ export declare abstract class DesignComponentPropertyDefinition {
10
+ id: string;
11
+ abstract type: DesignComponentPropertyType;
12
+ abstract defaultValue: string | boolean;
13
+ name: string;
14
+ constructor(model: DesignComponentPropertyDefinitionRemoteType);
15
+ }
16
+ export declare class DesignComponentPropertyBoolean extends DesignComponentPropertyDefinition {
17
+ type: DesignComponentPropertyType.Boolean;
18
+ defaultValue: boolean;
19
+ constructor(model: DTOFigmaComponentBooleanProperty);
20
+ }
21
+ export declare class DesignComponentPropertyText extends DesignComponentPropertyDefinition {
22
+ type: DesignComponentPropertyType.Text;
23
+ defaultValue: string;
24
+ constructor(model: DTOFigmaComponentTextProperty);
25
+ }
26
+ export declare class DesignComponentPropertyInstanceSwap extends DesignComponentPropertyDefinition {
27
+ type: DesignComponentPropertyType.InstanceSwap;
28
+ defaultValue: string;
29
+ constructor(model: DTOFigmaComponentInstanceSwapProperty);
30
+ }
31
+ export declare class DesignComponentPropertyVariant extends DesignComponentPropertyDefinition {
32
+ type: DesignComponentPropertyType.Variant;
33
+ defaultValue: string;
34
+ options: string[];
35
+ constructor(model: DTOFigmaComponentVariantProperty);
36
+ }
37
+ export declare function resolveComponentPropertyDefinition(model?: DTOFigmaComponent["componentPropertyDefinitions"]): DesignComponentPropertyDefinition[];
38
+ export {};
@@ -0,0 +1,9 @@
1
+ import { DTOFigmaComponent } from "@supernova-studio/client";
2
+ import { Source } from "../support/SDKSource";
3
+ import { DesignComponentBase } from "./SDKDesignComponentBase";
4
+ export type DesignComponentRemoteModel = DTOFigmaComponent;
5
+ export declare class DesignComponentVariant extends DesignComponentBase {
6
+ variantPropertyValues: Record<string, string> | null;
7
+ parentComponentPersistentId: string | null;
8
+ constructor(model: DesignComponentRemoteModel, sources: Array<Source>);
9
+ }
@@ -1,6 +1,5 @@
1
1
  import { DocsBlockContainerSize } from "../../../enums/SDKDocsBlockContainerSize";
2
2
  import { DocsBlockItemPropertyType } from "../../../enums/SDKDocsBlockItemPropertyType";
3
- import { DocsColorRef } from "../support/SDKDocsColorRef";
4
3
  import { DocsBlockPropertyData, DocsBlockPropertyDefinition, DocsBlockPropertyDefinitionModel } from "./SDKDocsBlockProperty";
5
4
  /** Figma Component property - Additional non-value options */
6
5
  export type DocsBlockFigmaComponentPropertyOptions = {
@@ -17,9 +16,6 @@ export type DocsBlockFigmaComponentPropertyData = DocsBlockPropertyData<Array<{
17
16
  entityId: string;
18
17
  entityType: "FigmaComponent";
19
18
  entityMeta?: {
20
- title?: string;
21
- description?: string;
22
- backgroundColor?: DocsColorRef | null;
23
19
  selectedComponentProperties?: Array<string>;
24
20
  };
25
21
  }>> & {
@@ -3,10 +3,6 @@ import { TokenType } from "../../../enums/SDKTokenType";
3
3
  import { DocsBlockPropertyData, DocsBlockPropertyDefinition, DocsBlockPropertyDefinitionModel } from "./SDKDocsBlockProperty";
4
4
  /** Token property - Additional non-value options */
5
5
  export type DocsBlockTokenPropertyOptions = {
6
- /** Default theme to be chosen */
7
- defaultTheme?: "none";
8
- /** Default value preview */
9
- defaultValuePreview?: "Split" | "Override";
10
6
  /** Token types that are allowed to be selected. All types allowed if nothing is provided */
11
7
  allowedTypes?: Array<TokenType>;
12
8
  /** How should the tokens be rendered in editor */
@@ -26,9 +22,20 @@ export type DocsBlockTokenPropertyData = DocsBlockPropertyData<Array<{
26
22
  }>> & {
27
23
  /** Selected token ids */
28
24
  selectedPropertyIds?: Array<string>;
29
- /** Selected theme ids */
25
+ /** Swatches with selected theme ids */
26
+ swatches?: Array<{
27
+ id: string;
28
+ selectedThemeIds: Array<string>;
29
+ }>;
30
+ /**
31
+ * Selected theme ids
32
+ * @deprecated Swatches will be used instead
33
+ */
30
34
  selectedThemeIds?: Array<string>;
31
- /** Display mode of themes associated with the token property */
35
+ /**
36
+ * Display mode of themes associated with the token property
37
+ * @deprecated Swatches will be used instead
38
+ */
32
39
  themeDisplayMode?: "Split" | "Override";
33
40
  };
34
41
  /** Token property - Definition model */
@@ -1,8 +1,11 @@
1
+ import { WorkspaceRole } from "@supernova-studio/model";
1
2
  export declare enum UserRole {
2
3
  owner = "Owner",
3
4
  admin = "Admin",
4
5
  creator = "Creator",
6
+ contributor = "Contributor",
5
7
  billing = "Billing",
6
8
  viewer = "Viewer"
7
9
  }
10
+ export declare const convertRemoteToUserRole: (remoteRole: WorkspaceRole) => UserRole;
8
11
  export type UserRoleWithoutOwner = Exclude<UserRole, UserRole.owner>;
@@ -35,6 +35,7 @@ export type GitObjectQuery = {
35
35
  export type NewPipelinePayloadDestination = "Github" | "Gitlab" | "Bitbucket" | "Azure" | "WebhookUrl" | "S3" | "Documentation";
36
36
  export type NewPipelinePayload = {
37
37
  brandPersistentId?: string;
38
+ themePersistentIds?: string[];
38
39
  themePersistentId?: string;
39
40
  designSystemId: string;
40
41
  destinations: {
@@ -97,6 +98,8 @@ export declare class Pipeline {
97
98
  };
98
99
  };
99
100
  brandPersistentId?: string;
101
+ themePersistentIds?: string[];
102
+ /** @deprecated Use themePersistentIds instead */
100
103
  themePersistentId?: string;
101
104
  latestJobs: Array<ExportBuild>;
102
105
  constructor(data: DTOPipeline);
@@ -1,13 +1,7 @@
1
+ import { DTOFigmaComponent } from "@supernova-studio/client";
1
2
  import { SourceType } from "../enums/SDKSourceType";
2
3
  import { Source } from "./SDKSource";
3
- export type DesignComponentOriginModel = {
4
- id: string;
5
- sourceId: string;
6
- nodeId: string;
7
- name?: string;
8
- width?: number;
9
- height?: number;
10
- };
4
+ export type DesignComponentOriginModel = NonNullable<DTOFigmaComponent["originComponent"]>;
11
5
  export declare class DesignComponentOrigin {
12
6
  sourceType: SourceType;
13
7
  sourceId: string | null;
@@ -47,9 +47,9 @@ export declare class TokenTheme {
47
47
  value: import("../tokens/remote/SDKRemoteTokenValue").AnyDimensionTokenRemoteValue;
48
48
  } | {
49
49
  aliasTo: string | undefined;
50
- value: import("../tokens/remote/SDKRemoteTokenValue").TypographyTokenRemoteValue;
50
+ value: string;
51
51
  } | {
52
52
  aliasTo: string | undefined;
53
- value: string;
53
+ value: import("../tokens/remote/SDKRemoteTokenValue").TypographyTokenRemoteValue;
54
54
  };
55
55
  }
@@ -38,9 +38,9 @@ export declare class TokenThemeOverride {
38
38
  value: import("../tokens/remote/SDKRemoteTokenValue").AnyDimensionTokenRemoteValue;
39
39
  } | {
40
40
  aliasTo: string | undefined;
41
- value: import("../tokens/remote/SDKRemoteTokenValue").TypographyTokenRemoteValue;
41
+ value: string;
42
42
  } | {
43
43
  aliasTo: string | undefined;
44
- value: string;
44
+ value: import("../tokens/remote/SDKRemoteTokenValue").TypographyTokenRemoteValue;
45
45
  };
46
46
  }
@@ -32,7 +32,12 @@ export type PulsarContext = {
32
32
  dsId: string;
33
33
  versionId: string;
34
34
  brandId: string | null;
35
+ /**
36
+ * @deprecated
37
+ * Use themeIds instead
38
+ */
35
39
  themeId: string | null;
40
+ themeIds: string[] | null;
36
41
  };
37
42
  export interface PulsarBridgingInterface {
38
43
  export(fn: (sdk: Supernova, context: PulsarContext) => Promise<Array<AnyOutputFile>>): any;