@supernova-studio/supernova-sdk-beta 1.6.18 → 1.6.19

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 (20) hide show
  1. package/build/sdk-typescript/src/core/SDKSupernova.d.ts +5 -5
  2. package/build/sdk-typescript/src/core/areas/{SDKAreaPipelines.d.ts → SDKAreaAutomation.d.ts} +10 -2
  3. package/build/sdk-typescript/src/core/areas/SDKAreaDataSources.d.ts +23 -1
  4. package/build/sdk-typescript/src/core/areas/SDKAreaDesignSystems.d.ts +23 -0
  5. package/build/sdk-typescript/src/core/areas/SDKAreaIntegrations.d.ts +25 -0
  6. package/build/sdk-typescript/src/core/areas/SDKAreaWorkspaces.d.ts +7 -1
  7. package/build/sdk-typescript/src/core/data/SDKDataCore.d.ts +40 -4
  8. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreReadRequests.d.ts +8 -3
  9. package/build/sdk-typescript/src/core/data/requests/SDKDataCoreWriteRequests.d.ts +23 -4
  10. package/build/sdk-typescript/src/model/enums/SDKImportJobOperation.d.ts +4 -0
  11. package/build/sdk-typescript/src/model/enums/SDKImportJobState.d.ts +6 -0
  12. package/build/sdk-typescript/src/model/jobs/SDKImportJob.d.ts +35 -0
  13. package/build/sdk-typescript/src/model/membership/SDKMembership.d.ts +1 -1
  14. package/build/sdk-typescript/src/model/users/SDKUserMembership.d.ts +18 -0
  15. package/build/sdk-typescript/src/model/workspaces/SDKWorkspaceSSOSettings.d.ts +2 -2
  16. package/build/sdk-typescript/src/tools/json-builder/elements-transformers/SDKToolsJSONElementTransformer.d.ts +1 -1
  17. package/build/supernova-sdk-typescript.js +586 -148
  18. package/build/supernova-sdk-typescript.js.map +1 -1
  19. package/package.json +1 -1
  20. /package/build/sdk-typescript/src/tests/{Enterprise/PluginFigmaTokens.spec.d.ts → Areas/AreaDesignSystems.spec.d.ts} +0 -0
@@ -1,4 +1,5 @@
1
1
  import { AreaAssets } from "./areas/SDKAreaAssets";
2
+ import { AreaAutomation } from "./areas/SDKAreaAutomation";
2
3
  import { AreaBrands } from "./areas/SDKAreaBrands";
3
4
  import { AreaBulkOperations } from "./areas/SDKAreaBulkOperations";
4
5
  import { AreaComponents } from "./areas/SDKAreaComponents";
@@ -7,7 +8,6 @@ import { AreaDesignSystems } from "./areas/SDKAreaDesignSystems";
7
8
  import { AreaDocumentation } from "./areas/SDKAreaDocumentation";
8
9
  import { AreaIntegrations } from "./areas/SDKAreaIntegrations";
9
10
  import { AreaMe } from "./areas/SDKAreaMe";
10
- import { AreaPipelines } from "./areas/SDKAreaPipelines";
11
11
  import { AreaTokens } from "./areas/SDKAreaTokens";
12
12
  import { AreaUsers } from "./areas/SDKAreaUsers";
13
13
  import { AreaVersions } from "./areas/SDKAreaVersions";
@@ -36,14 +36,14 @@ export declare class Supernova {
36
36
  assets: AreaAssets;
37
37
  /** Get, create, update, manipulate or delete documentation items */
38
38
  documentation: AreaDocumentation;
39
- /** Get, create, update, manipulate or delete integrations */
40
- integrations: AreaIntegrations;
39
+ /** Get, create, update, manipulate or delete pipelines and automation jobs */
40
+ automation: AreaAutomation;
41
41
  /** Get, create, update, manipulate or delete users */
42
42
  users: AreaUsers;
43
43
  /** Get, create, update, manipulate or delete current user */
44
44
  me: AreaMe;
45
- /** Get, create, update, manipulate or delete pipelines */
46
- pipelines: AreaPipelines;
45
+ /** Get, create, update, manipulate or delete integrations */
46
+ integrations: AreaIntegrations;
47
47
  /** Get, create, update, manipulate or delete data sources */
48
48
  dataSources: AreaDataSources;
49
49
  /** Get, create, update, manipulate or delete data from Supernova en masse */
@@ -2,9 +2,10 @@ import { DocumentationEnvironment } from "../../model/enums/SDKDocumentationEnvi
2
2
  import { ExporterCustomBlockVariant } from "../../model/exporters/custom_blocks/SDKExporterCustomBlockVariant";
3
3
  import { ExporterConfigurationProperty } from "../../model/exporters/custom_properties/SDKExporterConfigurationProperty";
4
4
  import { Exporter } from "../../model/exporters/SDKExporter";
5
+ import { ImportJob } from "../../model/jobs/SDKImportJob";
5
6
  import { DataCore } from "../data/SDKDataCore";
6
- import { RemoteWorkspaceVersionIdentifier } from "./SDKRemoteIdentifiers";
7
- export declare class AreaPipelines {
7
+ import { RemoteVersionIdentifier, RemoteWorkspaceVersionIdentifier } from "./SDKRemoteIdentifiers";
8
+ export declare class AreaAutomation {
8
9
  /** Internal: Engine */
9
10
  private dataCore;
10
11
  constructor(dataCore: DataCore);
@@ -34,4 +35,11 @@ export declare class AreaPipelines {
34
35
  jobId: string | null;
35
36
  exporterId: string | null;
36
37
  }>;
38
+ /** Gets all import jobs that are currently in progress.
39
+ * @param userId - User id to delete integration for. Can only be invoked on user id that is currently authenticated.
40
+ * @returns Nothing
41
+ */
42
+ getImportJobs(from: RemoteVersionIdentifier): Promise<Array<ImportJob>>;
43
+ getImportJob(from: RemoteVersionIdentifier, jobId: string): Promise<ImportJob>;
44
+ scheduleImportJobForFigmaSources(from: RemoteVersionIdentifier, sourceIds: Array<string>, dryRun?: boolean): Promise<ImportJob>;
37
45
  }
@@ -1,6 +1,6 @@
1
1
  import { Source } from "../../model/support/SDKSource";
2
2
  import { DataCore } from "../data/SDKDataCore";
3
- import { RemoteVersionIdentifier } from "./SDKRemoteIdentifiers";
3
+ import { RemoteBrandIdentifier, RemoteVersionIdentifier } from "./SDKRemoteIdentifiers";
4
4
  export declare class AreaDataSources {
5
5
  /** Internal: Engine */
6
6
  private dataCore;
@@ -15,4 +15,26 @@ export declare class AreaDataSources {
15
15
  * @returns All data sources in the specified version
16
16
  */
17
17
  getDataSources(from: RemoteVersionIdentifier): Promise<Array<Source>>;
18
+ linkFigmaSource(from: RemoteBrandIdentifier, url: string, options: {
19
+ scopes: {
20
+ tokens: boolean;
21
+ components: boolean;
22
+ assets: boolean;
23
+ documentationFrames: boolean;
24
+ };
25
+ autoImport: boolean;
26
+ themeId: string | null;
27
+ }): Promise<Source>;
28
+ updateFigmaSource(from: RemoteVersionIdentifier, sourceId: string, options: {
29
+ scopes?: {
30
+ tokens: boolean;
31
+ components: boolean;
32
+ assets: boolean;
33
+ documentationFrames: boolean;
34
+ };
35
+ autoImport?: boolean;
36
+ themeId?: string | null;
37
+ }): Promise<Source>;
38
+ updateFigmaSourceClaimOwnership(from: RemoteVersionIdentifier, sourceId: string): Promise<Source>;
39
+ deleteFigmaSource(from: RemoteVersionIdentifier, sourceId: string): Promise<void>;
18
40
  }
@@ -14,4 +14,27 @@ export declare class AreaDesignSystems {
14
14
  * @returns Design system with the specified id
15
15
  */
16
16
  designSystem(designSystemId: string): Promise<DesignSystem | null>;
17
+ /** Creates a new design system and retrieves the newly created DS object
18
+ * @param name - Name of the design system
19
+ * @returns Newly created design system object
20
+ */
21
+ createDesignSystem(workspaceId: string, name: string, description?: string): Promise<DesignSystem>;
22
+ /** Updates design system metadata for a specific design system
23
+ * @param designSystemId - ID of the design system
24
+ * @param name - New DS name
25
+ * @param description - New DS description
26
+ * @returns Nothing
27
+ */
28
+ updateDesignSystemMetadata(designSystemId: string, name: string, description?: string): Promise<void>;
29
+ /** Enabled or disables multibrand functionality for a specific design system
30
+ * @param designSystemId - ID of the design system
31
+ * @param isMultibrand - Multibrand functionality enabled or disabled
32
+ * @returns Nothing
33
+ */
34
+ updateDesignSystemIsMultibrand(designSystem: DesignSystem, isMultibrand: boolean): Promise<void>;
35
+ /** Deletes a design system. This action is irreversible, all data will be lost, and can only be performed by the admins of the workspace
36
+ * @param designSystemId - ID of the design system
37
+ * @returns Nothing. RIP design system.
38
+ */
39
+ deleteDesignSystem(designSystemId: string): Promise<void>;
17
40
  }
@@ -23,4 +23,29 @@ export declare class AreaIntegrations {
23
23
  * @returns Azure OAuth URL
24
24
  */
25
25
  getAzureOAuthURL(): Promise<string>;
26
+ /** Deletes user Figma OAuth integration.
27
+ * @param userId - User id to delete integration for. Can only be invoked on user id that is currently authenticated.
28
+ * @returns Nothing
29
+ */
30
+ deleteFigmaOAuthIntegration(userId: string): Promise<void>;
31
+ /** Deletes user GitHub OAuth integration.
32
+ * @param userId - User id to delete integration for. Can only be invoked on user id that is currently authenticated.
33
+ * @returns Nothing
34
+ */
35
+ deleteGitHubOAuthIntegration(userId: string): Promise<void>;
36
+ /** Deletes user GitLab OAuth integration.
37
+ * @param userId - User id to delete integration for. Can only be invoked on user id that is currently authenticated.
38
+ * @returns Nothing
39
+ */
40
+ deleteGitLabOAuthIntegration(userId: string): Promise<void>;
41
+ /** Deletes user Bitbucket OAuth integration.
42
+ * @param userId - User id to delete integration for. Can only be invoked on user id that is currently authenticated.
43
+ * @returns Nothing
44
+ */
45
+ deleteBitbucketOAuthIntegration(userId: string): Promise<void>;
46
+ /** Deletes user Azure OAuth integration.
47
+ * @param userId - User id to delete integration for. Can only be invoked on user id that is currently authenticated.
48
+ * @returns Nothing
49
+ */
50
+ deleteAzureOAuthIntegration(userId: string): Promise<void>;
26
51
  }
@@ -1,5 +1,6 @@
1
1
  import { Acl } from "../../model/acl/SDKAcl";
2
2
  import { Membership } from "../../model/membership/SDKMembership";
3
+ import { UserMembership } from "../../model/users/SDKUserMembership";
3
4
  import { Workspace } from "../../model/workspaces/SDKWorkspace";
4
5
  import { WorkspaceIPWhitelistSettings, WorkspaceIPWhitelistSettingsUpdateModel } from "../../model/workspaces/SDKWorkspaceIPWhitelistSettings";
5
6
  import { WorkspaceNPMRegistrySettings, WorkspaceNPMRegistrySettingsUpdateModel } from "../../model/workspaces/SDKWorkspaceNPMRegistrySettings";
@@ -27,6 +28,11 @@ export declare class AreaWorkspaces {
27
28
  * @returns All workspaces user is part of
28
29
  */
29
30
  memberships(userId: string): Promise<Array<Membership>>;
31
+ /** Fetches all users that are part of the workspace. Each user contains user role as well.
32
+ * @param workspaceId - ID of the workspace
33
+ * @returns All users that are members of the provided workspace
34
+ */
35
+ userMemberships(workspaceId: string): Promise<Array<UserMembership>>;
30
36
  subscriptionProductFeatures(): Promise<SubscriptionProductFeatures>;
31
37
  acls(): Promise<Acl>;
32
38
  /** Validates if the handle is available for use
@@ -59,7 +65,7 @@ export declare class AreaWorkspaces {
59
65
  * @param handle - Handle of the workspace to create. Use `validateIsWorkspaceHandleAvailable` to check if the handle is available
60
66
  * @returns Newly created workspace object
61
67
  */
62
- createWorkspace(name: string, handle: string): Promise<Workspace>;
68
+ createWorkspace(name: string, handle?: string): Promise<Workspace>;
63
69
  /** Updates workspace profile for a specific workspace
64
70
  * @param workspaceId - ID of the workspace
65
71
  * @param update - New profile data
@@ -1,4 +1,3 @@
1
- import { DocumentationEnvironment } from "../../model/enums/SDKDocumentationEnvironment";
2
1
  import { Acl } from "../../model/acl/SDKAcl";
3
2
  import { Asset } from "../../model/assets/SDKAsset";
4
3
  import { RenderedAsset } from "../../model/assets/SDKRenderedAsset";
@@ -13,6 +12,7 @@ import { ElementDataView } from "../../model/elements/SDKElementDataView";
13
12
  import { ElementDataViewColumn } from "../../model/elements/SDKElementDataViewColumn";
14
13
  import { ElementProperty, ElementPropertyCreationModel, ElementPropertyTargetElementType, ElementPropertyUpdateModel } from "../../model/elements/SDKElementProperty";
15
14
  import { ElementPropertyValue } from "../../model/elements/values/SDKElementPropertyValue";
15
+ import { DocumentationEnvironment } from "../../model/enums/SDKDocumentationEnvironment";
16
16
  import { TokenType } from "../../model/enums/SDKTokenType";
17
17
  import { ExporterCustomBlock } from "../../model/exporters/custom_blocks/SDKExporterCustomBlock";
18
18
  import { ExporterCustomBlockVariant } from "../../model/exporters/custom_blocks/SDKExporterCustomBlockVariant";
@@ -22,11 +22,13 @@ import { AssetGroup } from "../../model/groups/SDKAssetGroup";
22
22
  import { ComponentGroup } from "../../model/groups/SDKComponentGroup";
23
23
  import { DesignComponentGroup } from "../../model/groups/SDKDesignComponentGroup";
24
24
  import { TokenGroup } from "../../model/groups/SDKTokenGroup";
25
+ import { ImportJob } from "../../model/jobs/SDKImportJob";
25
26
  import { Membership } from "../../model/membership/SDKMembership";
26
27
  import { Source } from "../../model/support/SDKSource";
27
28
  import { TokenTheme } from "../../model/themes/SDKTokenTheme";
28
29
  import { Token } from "../../model/tokens/SDKToken";
29
30
  import { User } from "../../model/users/SDKUser";
31
+ import { UserMembership } from "../../model/users/SDKUserMembership";
30
32
  import { UserProfileUpdateModel } from "../../model/users/SDKUserProfile";
31
33
  import { Workspace } from "../../model/workspaces/SDKWorkspace";
32
34
  import { WorkspaceIPWhitelistSettings, WorkspaceIPWhitelistSettingsUpdateModel } from "../../model/workspaces/SDKWorkspaceIPWhitelistSettings";
@@ -52,6 +54,8 @@ export declare class DataCore {
52
54
  user(userId: string): Promise<User>;
53
55
  /** Remote: Get information about all workspaces user has access to, including which role they play */
54
56
  memberships(userId: string): Promise<Array<Membership>>;
57
+ /** Remote: Get information about all workspaces user has access to, including which role they play */
58
+ userMemberships(workspaceId: string): Promise<Array<UserMembership>>;
55
59
  subscriptionProductFeatures(): Promise<SubscriptionProductFeatures>;
56
60
  acls(): Promise<Acl>;
57
61
  /** Deletes the user by id. Can only really delete its own user */
@@ -226,7 +230,7 @@ export declare class DataCore {
226
230
  }>>;
227
231
  /** Download information about a single workspace and retrieve it resolved */
228
232
  workspace(workspaceId: string): Promise<Workspace>;
229
- createWorkspace(name: string, handle: string): Promise<Workspace>;
233
+ createWorkspace(name: string, handle?: string): Promise<Workspace>;
230
234
  /** Validate that workspace handle is available */
231
235
  validateIsWorkspaceHandleAvailable(handle: string): Promise<boolean>;
232
236
  workspaceOnboarding(workspaceId: string): Promise<WorkspaceOnboarding>;
@@ -246,17 +250,49 @@ export declare class DataCore {
246
250
  designSystem(designSystemId: string): Promise<DesignSystem>;
247
251
  /** Download information about design systems that user has access to under a single workspace and retrieve it resolved */
248
252
  designSystems(workspaceId: any): Promise<Array<DesignSystem>>;
253
+ /** Creates a design system */
254
+ createDesignSystem(workspaceId: string, name: string, description?: string): Promise<DesignSystem>;
255
+ /** Updates a design system metadata */
256
+ updateDesignSystemMetadata(designSystemId: string, name: string, description?: string): Promise<void>;
257
+ /** Updates a design system multibrand option */
258
+ updateDesignSystemIsMultibrand(designSystem: DesignSystem, isMultibrand: boolean): Promise<void>;
259
+ /** Delete a design system */
260
+ deleteDesignSystem(designSystemId: string): Promise<void>;
249
261
  /** Download information about a desing system source within a design system design and retrieve it resolved */
250
262
  designSystemSource(designSystemId: string, sourceId: string): Promise<Source>;
251
263
  /** Download information about all desing system sources within a design system design and retrieve it resolved */
252
264
  designSystemSources(designSystemId: string): Promise<Array<Source>>;
265
+ deleteFigmaSource(designSystemId: string, sourceId: string): Promise<void>;
266
+ linkFigmaSource(designSystemId: string, brandId: string, url: string, options: {
267
+ scopes: {
268
+ tokens: boolean;
269
+ components: boolean;
270
+ assets: boolean;
271
+ documentationFrames: boolean;
272
+ };
273
+ autoImport: boolean;
274
+ themeId: string | null;
275
+ }): Promise<Source>;
276
+ updateFigmaSource(designSystemId: string, sourceId: string, options: {
277
+ scopes?: {
278
+ tokens: boolean;
279
+ components: boolean;
280
+ assets: boolean;
281
+ documentationFrames: boolean;
282
+ };
283
+ autoImport?: boolean;
284
+ themeId?: string | null;
285
+ }): Promise<Source>;
286
+ updateFigmaSourceClaimOwnership(designSystemId: string, sourceId: string): Promise<Source>;
253
287
  versions(designSystemId: string): Promise<Array<DesignSystemVersion>>;
254
288
  version(designSystemId: string, versionId: string): Promise<DesignSystemVersion>;
255
289
  getBrands(designSystemId: string, versionId: string): Promise<Array<Brand>>;
256
290
  getBrand(designSystemId: string, versionId: string, brandId: string): Promise<Brand>;
257
291
  getOAuthURL(service: "figma" | "bitbucket" | "github" | "gitlab" | "azure"): Promise<string>;
292
+ deleteOAuthIntegration(userId: string, service: "figma" | "bitbucket" | "github" | "gitlab" | "azure"): Promise<void>;
258
293
  bulkUpdateTokenData(designSystemId: string, versionId: string, data: TokenUpdateTransactionData): Promise<any>;
259
294
  bulkUpdateComponentData(designSystemId: string, versionId: string, data: ComponentUpdateTransactionData): Promise<any>;
260
- getTokenStudioData(designSystemId: string, versionId: string): Promise<object>;
261
- writeTokenStudioData(designSystemId: string, versionId: string, data: object): Promise<boolean>;
295
+ getImportJob(designSystemId: string, versionId: string, jobId: string): Promise<ImportJob>;
296
+ getImportJobs(designSystemId: string, versionId: string): Promise<Array<ImportJob>>;
297
+ scheduleImportJobForFigmaSources(designSystemId: string, versionId: string, sourceIds: Array<string>, dryRun: boolean): Promise<ImportJob>;
262
298
  }
@@ -1,4 +1,3 @@
1
- import { DocumentationEnvironment } from "../../../model/enums/SDKDocumentationEnvironment";
2
1
  import { AclRemoteModel } from "../../../model/acl/SDKAcl";
3
2
  import { BrandRemoteModel } from "../../../model/base/SDKBrand";
4
3
  import { DesignSystemRemoteModel } from "../../../model/base/SDKDesignSystem";
@@ -11,17 +10,20 @@ import { DocumentationPageModel } from "../../../model/documentation/SDKDocument
11
10
  import { ElementDataViewRemoteModel } from "../../../model/elements/SDKElementDataView";
12
11
  import { ElementPropertyRemoteModel } from "../../../model/elements/SDKElementProperty";
13
12
  import { ElementPropertyValueRemoteModel } from "../../../model/elements/values/SDKElementPropertyValue";
13
+ import { DocumentationEnvironment } from "../../../model/enums/SDKDocumentationEnvironment";
14
14
  import { TokenType } from "../../../model/enums/SDKTokenType";
15
15
  import { ExporterCustomBlockModel } from "../../../model/exporters/custom_blocks/SDKExporterCustomBlock";
16
16
  import { ExporterModel } from "../../../model/exporters/SDKExporter";
17
17
  import { ComponentGroupRemoteModel } from "../../../model/groups/SDKComponentGroup";
18
18
  import { DesignComponentGroupRemoteModel } from "../../../model/groups/SDKDesignComponentGroup";
19
19
  import { TokenGroupRemoteModel } from "../../../model/groups/SDKTokenGroup";
20
+ import { ImportJobRemoteModel } from "../../../model/jobs/SDKImportJob";
20
21
  import { MembershipRemoteModel } from "../../../model/membership/SDKMembership";
21
22
  import { SourceRemoteModel } from "../../../model/support/SDKSource";
22
23
  import { TokenThemeRemoteModel } from "../../../model/themes/SDKTokenTheme";
23
24
  import { TokenRemoteModel } from "../../../model/tokens/remote/SDKRemoteTokenModel";
24
25
  import { UserRemoteModel } from "../../../model/users/SDKUser";
26
+ import { UserMembershipRemoteModel } from "../../../model/users/SDKUserMembership";
25
27
  import { WorkspaceRemoteModel } from "../../../model/workspaces/SDKWorkspace";
26
28
  import { WorkspaceIPWhitelistSettingsRemoteModel } from "../../../model/workspaces/SDKWorkspaceIPWhitelistSettings";
27
29
  import { WorkspaceNPMRegistrySettingsRemoteModel } from "../../../model/workspaces/SDKWorkspaceNPMRegistrySettings";
@@ -36,7 +38,7 @@ export declare class DataCoreReadRequests {
36
38
  getRemoteCurrentUser(): Promise<UserRemoteModel>;
37
39
  /** Remote: Get information about a specific user */
38
40
  getRemoteUser(userId: any): Promise<UserRemoteModel>;
39
- /** Remote: Get information about all workspaces user has access to */
41
+ /** Remote: Get information about all workspaces user can access */
40
42
  getRemoteMemberships(userId: string): Promise<Array<MembershipRemoteModel>>;
41
43
  getRemoteSubscriptionProductFeatures(): Promise<SubscriptionProductFeaturesRemoteModel>;
42
44
  getRemoteAcls(): Promise<AclRemoteModel>;
@@ -44,6 +46,8 @@ export declare class DataCoreReadRequests {
44
46
  getRemoteWorkspaceDetail(workspaceId: string): Promise<WorkspaceRemoteModel>;
45
47
  /** Remote: Validate can use workspace handle */
46
48
  getRemoteIsWorkspaceHandleAvailable(handle: string): Promise<boolean>;
49
+ /** Remote: Get all users memberships */
50
+ getRemoteUserMemberships(workspaceId: string): Promise<Array<UserMembershipRemoteModel>>;
47
51
  /** Remote: Get information about the state of workspace onboarding, what was completed and what not */
48
52
  getRemoteWorkspaceOnboarding(workspaceId: string): Promise<WorkspaceOnboardingRemoteModel | null>;
49
53
  /** Remote: Get information about the workspace IP whitelisting configuration */
@@ -122,5 +126,6 @@ export declare class DataCoreReadRequests {
122
126
  getOAuthURL(service: "figma" | "bitbucket" | "github" | "gitlab" | "azure"): Promise<string>;
123
127
  getVersion(designSystemId: string, versionId: string): Promise<DesignSystemVersionRemoteModel>;
124
128
  getVersions(designSystemId: string): Promise<Array<DesignSystemVersionRemoteModel>>;
125
- getTokenStudioData(designSystemId: string, versionId: string): Promise<object>;
129
+ getImportJobs(designSystemId: string, versionId: string): Promise<Array<ImportJobRemoteModel>>;
130
+ getImportJob(designSystemId: string, versionId: string, jobId: string): Promise<ImportJobRemoteModel>;
126
131
  }
@@ -1,9 +1,12 @@
1
- import { DocumentationEnvironment } from "../../../model/enums/SDKDocumentationEnvironment";
2
1
  import { ElementDataViewColumnType } from "../../../exports";
2
+ import { DesignSystem, DesignSystemRemoteModel } from "../../../model/base/SDKDesignSystem";
3
3
  import { Component, ComponentRemoteModel, ComponentUpdateRemoteModel } from "../../../model/components/SDKComponent";
4
4
  import { ElementPropertyRemoteModel } from "../../../model/elements/SDKElementProperty";
5
+ import { DocumentationEnvironment } from "../../../model/enums/SDKDocumentationEnvironment";
5
6
  import { ComponentGroup, ComponentGroupRemoteModel } from "../../../model/groups/SDKComponentGroup";
6
7
  import { TokenGroup, TokenGroupRemoteModel } from "../../../model/groups/SDKTokenGroup";
8
+ import { ImportJobRemoteModel } from "../../../model/jobs/SDKImportJob";
9
+ import { SourceRemoteModel } from "../../../model/support/SDKSource";
7
10
  import { TokenThemeRemoteModel } from "../../../model/themes/SDKTokenTheme";
8
11
  import { TokenRemoteModel } from "../../../model/tokens/remote/SDKRemoteTokenModel";
9
12
  import { Token } from "../../../model/tokens/SDKToken";
@@ -22,7 +25,7 @@ export declare class DataCoreWriteRequests {
22
25
  deleteRemoteUser(userId: string): Promise<void>;
23
26
  /** Remote: Checks whether user can be deleted or not. Can only really check its own user */
24
27
  canDeleteRemoteUser(userId: string): Promise<boolean>;
25
- /** Remote: Updates the user profile of specified user. Can only really update its own user */
28
+ /** Remote: Updates the user profile of specified user. This call can only be used on the user who is authenticated with the token */
26
29
  updateRemoteUserProfile(profile: UserProfileUpdateModel, userId: string): Promise<void>;
27
30
  /** Remote: Updates the avatar of the current user */
28
31
  updateRemoteUserAvatar(userId: string, avatar: File): Promise<void>;
@@ -31,7 +34,7 @@ export declare class DataCoreWriteRequests {
31
34
  /** Remote: Logs out user. Can only really logout its own user */
32
35
  logoutRemoteCurrentUser(): Promise<void>;
33
36
  /** Remote: Creates a new workspace */
34
- createRemoteWorkspace(name: string, handle: string): Promise<WorkspaceRemoteModel>;
37
+ createRemoteWorkspace(name: string, handle?: string): Promise<WorkspaceRemoteModel>;
35
38
  /** Remote: Updates a workspace profile */
36
39
  updateRemoteWorkspaceProfile(workspaceId: string, profile: WorkspaceProfileUpdateModel): Promise<void>;
37
40
  /** Remote: Updates a workspace avatar */
@@ -50,6 +53,14 @@ export declare class DataCoreWriteRequests {
50
53
  deleteRemoteWorkspaceAvatar(workspaceId: string): Promise<void>;
51
54
  /** Remote: Deletes a workspace NPM settings */
52
55
  deleteRemoteWorkspaceNPMRegistrySettings(workspaceId: string): Promise<void>;
56
+ /** Remote: Creates a new design system */
57
+ createRemoteDesignSystem(workspaceId: string, name: string, description?: string): Promise<DesignSystemRemoteModel>;
58
+ /** Remote: Updates a design system metadata */
59
+ updateRemoteDesignSystemMetadata(designSystemId: string, name: string, description?: string): Promise<void>;
60
+ /** Remote: Updates a design system multibrand capabilities */
61
+ updateRemoteDesignSystemIsMultibrand(designSystem: DesignSystem, isMultibrand: boolean): Promise<void>;
62
+ /** Remote: Deletes a design system */
63
+ deleteDesignSystem(designSystemId: string): Promise<void>;
53
64
  publishDocumentation(workspaceId: string, designSystemId: string, versionId: string, environment: DocumentationEnvironment): Promise<{
54
65
  status: "Queued" | "InProgress" | "Failure";
55
66
  jobId: string;
@@ -87,5 +98,13 @@ export declare class DataCoreWriteRequests {
87
98
  deleteComponentProperty(designSystemId: string, versionId: string, propertyId: string): Promise<void>;
88
99
  updateReorderComponentColumn(designSystemId: string, versionId: string, viewId: string, columnId: string, newIndex: number): Promise<void>;
89
100
  updateResizeComponentColumn(designSystemId: string, versionId: string, viewId: string, columnType: ElementDataViewColumnType, columnId: string, columnThemeId: string | undefined, columnBasePropertyType: string | undefined, columnPropertyDefinitionId: string | undefined, newWidth: number): Promise<void>;
90
- writeTokenStudioJSONData(designSystemId: string, versionId: string, data: object): Promise<boolean>;
101
+ /** Remote: Deletes a OAuth integration */
102
+ deleteOAuthIntegration(userId: string, service: "figma" | "bitbucket" | "github" | "gitlab" | "azure"): Promise<void>;
103
+ /** Remote: Schedules import job */
104
+ scheduleImportJobForFigmaSources(designSystemId: string, versionId: string, sourceIds: Array<string>, dryRun: boolean): Promise<ImportJobRemoteModel>;
105
+ /** Remote: Deletes a remote data source */
106
+ deleteRemoteSource(designSystemId: string, sourceId: string): Promise<void>;
107
+ linkFigmaSource(designSystemId: string, data: object): Promise<SourceRemoteModel>;
108
+ updateFigmaSource(designSystemId: string, sourceId: string, data: object): Promise<SourceRemoteModel>;
109
+ updateFigmaSourceClaimOwnership(designSystemId: string, sourceId: string): Promise<SourceRemoteModel>;
91
110
  }
@@ -0,0 +1,4 @@
1
+ export declare enum ImportJobOperation {
2
+ check = "Check",
3
+ import = "Import"
4
+ }
@@ -0,0 +1,6 @@
1
+ export declare enum ImportJobState {
2
+ queued = "Queued",
3
+ inProgress = "InProgress",
4
+ success = "Success",
5
+ failed = "Failed"
6
+ }
@@ -0,0 +1,35 @@
1
+ import { ImportJobOperation } from "../enums/SDKImportJobOperation";
2
+ import { ImportJobState } from "../enums/SDKImportJobState";
3
+ import { Source, SourceRemoteModel } from "../support/SDKSource";
4
+ export type ImportJobRemoteModel = {
5
+ id: string;
6
+ designSystemId: string;
7
+ designSystemVersionId: string;
8
+ createdAt?: string;
9
+ stateChangedAt?: string;
10
+ state: ImportJobState;
11
+ error?: string;
12
+ operation: ImportJobOperation;
13
+ sources: Array<SourceRemoteModel>;
14
+ };
15
+ export declare class ImportJob {
16
+ /** Unique identifier of the job */
17
+ id: string;
18
+ /** Unique identifier of the design system this job lives in */
19
+ designSystemId: string;
20
+ /** Unique identifier of the design system version this job lives in */
21
+ designSystemVersionId: string;
22
+ /** Job creation date */
23
+ createdAt: Date | null;
24
+ /** Date of the last change of the job status */
25
+ stateChangedAt: Date | null;
26
+ /** Job state - Queued, InProgress, Failed or Success */
27
+ state: ImportJobState;
28
+ /** Reason for failure of this import job. Will only be present if `state === failed` */
29
+ error: string | null;
30
+ /** Job operation - Check or Import */
31
+ operation: ImportJobOperation;
32
+ /** All sources participating in this import job */
33
+ sources: Array<Source>;
34
+ constructor(model: ImportJobRemoteModel);
35
+ }
@@ -1,5 +1,5 @@
1
- import { Workspace, WorkspaceRemoteModel } from "../workspaces/SDKWorkspace";
2
1
  import { UserRole } from "../enums/SDKUserRole";
2
+ import { Workspace, WorkspaceRemoteModel } from "../workspaces/SDKWorkspace";
3
3
  export type MembershipRemoteModel = {
4
4
  workspace: WorkspaceRemoteModel;
5
5
  role: UserRole;
@@ -0,0 +1,18 @@
1
+ import { UserRole } from "../enums/SDKUserRole";
2
+ import { User, UserRemoteModel } from "./SDKUser";
3
+ export type UserMembershipRemoteModel = {
4
+ user: UserRemoteModel;
5
+ role: UserRole;
6
+ effectiveRole: UserRole;
7
+ };
8
+ export declare class UserMembership {
9
+ /** Full user object */
10
+ user: User;
11
+ /** Role of the user in the workspace */
12
+ role: UserRole;
13
+ /** Role of the user in the workspace */
14
+ effectiveRole: UserRole;
15
+ constructor(model: UserMembershipRemoteModel);
16
+ /** Constructs representation that can be used to write full object to remote */
17
+ toRemote(): UserMembershipRemoteModel;
18
+ }
@@ -1,14 +1,14 @@
1
1
  export type WorkspaceSSOSettingsRemoteModel = {
2
2
  providerId: string;
3
3
  defaultAutoInviteValue: boolean;
4
- autoInviteDomains: string[];
4
+ autoInviteDomains: Record<string, boolean>;
5
5
  };
6
6
  export type WorkspaceSSOSettingsUpdateModel = WorkspaceSSOSettingsRemoteModel;
7
7
  export type WorkspaceSSOSettingsTransportModel = WorkspaceSSOSettingsRemoteModel;
8
8
  export declare class WorkspaceSSOSettings {
9
9
  providerId: string;
10
10
  defaultAutoInviteValue: boolean;
11
- autoInviteDomains: string[];
11
+ autoInviteDomains: Record<string, boolean>;
12
12
  constructor(model: WorkspaceSSOSettingsRemoteModel);
13
13
  toUpdateObject(): WorkspaceSSOSettingsUpdateModel;
14
14
  toRemote(): WorkspaceSSOSettingsTransportModel;
@@ -62,7 +62,7 @@ export declare class TokenJSONElementTransformer {
62
62
  safeGroupName(group: TokenGroup): string;
63
63
  processedName(name: string, naming: JSONBuilderNamingOption): string;
64
64
  /** Retrieve human-readable token type in unified fashion, used both as token type and as token master group */
65
- typeLabel(type: TokenType): "color" | "gradient" | "typography" | "border" | "textCase" | "textDecoration" | "shadow" | "visibility" | "text" | "measure";
65
+ typeLabel(type: TokenType): "color" | "gradient" | "typography" | "border" | "textCase" | "textDecoration" | "shadow" | "visibility" | "measure" | "text";
66
66
  /** Retrieve chain of groups up to a specified group, ordered from parent to children */
67
67
  referenceGroupChain(containingGroup: TokenGroup, allGroups: Array<TokenGroup>): Array<TokenGroup>;
68
68
  }