@supernova-studio/supernova-sdk-beta 2.4.6 → 2.4.11

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 (99) hide show
  1. package/build/supernova-sdk-typescript.js +1 -1
  2. package/build/supernova-sdk-typescript.js.map +1 -1
  3. package/build/types/core/SDKSupernova.d.ts +9 -0
  4. package/build/types/core/areas/SDKAreaActivityEvents.d.ts +7 -0
  5. package/build/types/core/areas/SDKAreaAgentChats.d.ts +12 -0
  6. package/build/types/core/areas/SDKAreaBulkOperations.d.ts +76 -74
  7. package/build/types/core/areas/SDKAreaDataSources.d.ts +1 -1
  8. package/build/types/core/areas/SDKAreaDesignSystems.d.ts +13 -13
  9. package/build/types/core/areas/SDKAreaDocumentation.d.ts +304 -289
  10. package/build/types/core/areas/SDKAreaImport.d.ts +35 -0
  11. package/build/types/core/areas/SDKAreaMCP.d.ts +26 -1
  12. package/build/types/core/areas/SDKAreaProjects.d.ts +1084 -1100
  13. package/build/types/core/areas/SDKAreaRawData.d.ts +1040 -1039
  14. package/build/types/core/areas/SDKAreaResources.d.ts +90 -90
  15. package/build/types/core/areas/SDKAreaSanboxes.d.ts +9 -9
  16. package/build/types/core/areas/SDKAreaThreads.d.ts +67 -67
  17. package/build/types/core/areas/SDKAreaTokens.d.ts +17 -12
  18. package/build/types/core/areas/SDKAreaWorkspaces.d.ts +1 -1
  19. package/build/types/core/data/SDKDataCore.d.ts +1771 -1746
  20. package/build/types/core/data/SDKDataCoreCached.d.ts +2 -2
  21. package/build/types/core/data/requests/SDKDataCoreReadRequests.d.ts +647 -593
  22. package/build/types/core/data/requests/SDKDataCoreWriteRequests.d.ts +2515 -2489
  23. package/build/types/core/resolvers/SDKDocsEntityItemResolver.d.ts +121 -121
  24. package/build/types/core/resolvers/SDKSnapshotTokenBuilder.d.ts +28 -0
  25. package/build/types/core/resolvers/SDKTokenResolver.d.ts +11 -9
  26. package/build/types/exports.d.ts +19 -11
  27. package/build/types/model/activity-events/SDKActivityEvent.d.ts +49 -0
  28. package/build/types/model/agent-chats/SDKAgentChat.d.ts +31 -0
  29. package/build/types/model/base/SDKDesignSystem.d.ts +3 -1
  30. package/build/types/model/datasets/SDKDataset.d.ts +15 -5
  31. package/build/types/model/docs/blocks/definition/SDKDocsBlockBehavior.d.ts +4 -1
  32. package/build/types/model/docs/blocks/definition/actual/context-mcp/SDKDocsBlockActualContextMcp.d.ts +2 -0
  33. package/build/types/model/docs/blocks/properties/SDKDocsBlockAssetProperty.d.ts +7 -24
  34. package/build/types/model/docs/blocks/properties/SDKDocsBlockAssetPropertyProperty.d.ts +3 -2
  35. package/build/types/model/docs/blocks/properties/SDKDocsBlockBooleanProperty.d.ts +3 -2
  36. package/build/types/model/docs/blocks/properties/SDKDocsBlockCodeProperty.d.ts +3 -6
  37. package/build/types/model/docs/blocks/properties/SDKDocsBlockCodeSandboxProperty.d.ts +3 -8
  38. package/build/types/model/docs/blocks/properties/SDKDocsBlockColorProperty.d.ts +3 -3
  39. package/build/types/model/docs/blocks/properties/SDKDocsBlockComponentProperty.d.ts +7 -10
  40. package/build/types/model/docs/blocks/properties/SDKDocsBlockComponentPropertyProperty.d.ts +3 -2
  41. package/build/types/model/docs/blocks/properties/SDKDocsBlockContextProperty.d.ts +16 -0
  42. package/build/types/model/docs/blocks/properties/SDKDocsBlockDividerProperty.d.ts +3 -2
  43. package/build/types/model/docs/blocks/properties/SDKDocsBlockEmbedUrlProperty.d.ts +3 -6
  44. package/build/types/model/docs/blocks/properties/SDKDocsBlockFigmaComponentProperty.d.ts +7 -26
  45. package/build/types/model/docs/blocks/properties/SDKDocsBlockFigmaNodeProperty.d.ts +7 -22
  46. package/build/types/model/docs/blocks/properties/SDKDocsBlockFileProperty.d.ts +4 -9
  47. package/build/types/model/docs/blocks/properties/SDKDocsBlockImageProperty.d.ts +3 -10
  48. package/build/types/model/docs/blocks/properties/SDKDocsBlockMarkdownProperty.d.ts +3 -2
  49. package/build/types/model/docs/blocks/properties/SDKDocsBlockMultiRichTextProperty.d.ts +3 -3
  50. package/build/types/model/docs/blocks/properties/SDKDocsBlockMultiSelectProperty.d.ts +3 -2
  51. package/build/types/model/docs/blocks/properties/SDKDocsBlockNumberProperty.d.ts +3 -2
  52. package/build/types/model/docs/blocks/properties/SDKDocsBlockProperty.d.ts +3 -3
  53. package/build/types/model/docs/blocks/properties/SDKDocsBlockRichTextEditorProperty.d.ts +3 -3
  54. package/build/types/model/docs/blocks/properties/SDKDocsBlockRichTextProperty.d.ts +3 -7
  55. package/build/types/model/docs/blocks/properties/SDKDocsBlockSingleSelectProperty.d.ts +3 -2
  56. package/build/types/model/docs/blocks/properties/SDKDocsBlockStorybookProperty.d.ts +4 -22
  57. package/build/types/model/docs/blocks/properties/SDKDocsBlockTableProperty.d.ts +12 -28
  58. package/build/types/model/docs/blocks/properties/SDKDocsBlockTextProperty.d.ts +3 -2
  59. package/build/types/model/docs/blocks/properties/SDKDocsBlockTokenProperty.d.ts +7 -31
  60. package/build/types/model/docs/blocks/properties/SDKDocsBlockTokenPropertyProperty.d.ts +3 -2
  61. package/build/types/model/docs/blocks/properties/SDKDocsBlockTokenTypeProperty.d.ts +3 -3
  62. package/build/types/model/docs/blocks/properties/SDKDocsBlockUrlProperty.d.ts +3 -2
  63. package/build/types/model/docs/sections/SDKDocsSection.d.ts +0 -31
  64. package/build/types/model/documentation/SDKPageHistoryVersion.d.ts +20 -0
  65. package/build/types/model/documentation/blocks/SDKDocumentationLegacyPageBlockContextMcp.d.ts +11 -0
  66. package/build/types/model/elements/SDKElementPropertyOption.d.ts +1 -2
  67. package/build/types/model/enums/SDKCodeLanguage.d.ts +1 -1
  68. package/build/types/model/enums/SDKDesignSystemRole.d.ts +1 -2
  69. package/build/types/model/enums/SDKDocsBlockBehaviorSelectionType.d.ts +4 -2
  70. package/build/types/model/enums/SDKDocsBlockContainerSize.d.ts +6 -4
  71. package/build/types/model/enums/SDKDocsBlockItemPropertyType.d.ts +3 -1
  72. package/build/types/model/enums/SDKDocumentationLegacyPageBlockType.d.ts +1 -0
  73. package/build/types/model/enums/SDKTokenType.d.ts +2 -0
  74. package/build/types/model/enums/SDKWorkspaceSeatType.d.ts +14 -3
  75. package/build/types/model/exporters/SDKExporter.d.ts +2 -2
  76. package/build/types/model/exporters/SDKPipeline.d.ts +1 -1
  77. package/build/types/model/membership/SDKMembership.d.ts +1 -1
  78. package/build/types/model/support/SDKSource.d.ts +4 -3
  79. package/build/types/model/themes/SDKTokenThemeOverride.d.ts +1 -0
  80. package/build/types/model/tokens/remote/SDKRemoteTokenModel.d.ts +34 -1
  81. package/build/types/model/tokens/remote/SDKRemoteTokenValue.d.ts +1 -1
  82. package/build/types/model/workspaces/SDKWorkspaceProductPrice.d.ts +6 -3
  83. package/build/types/model/workspaces/SDKWorkspaceSubscription.d.ts +2 -6
  84. package/build/types/tools/design-tokens/SDKToolsDesignTokensPlugin.d.ts +6 -3
  85. package/build/types/tools/design-tokens/utilities/SDKDTJSONConverter.d.ts +29 -3
  86. package/build/types/tools/design-tokens/utilities/SDKDTJSONLoader.d.ts +2 -0
  87. package/build/types/tools/design-tokens/utilities/SDKDTMapLoader.d.ts +31 -0
  88. package/build/types/tools/design-tokens/utilities/SDKDTTokenReferenceResolver.d.ts +2 -0
  89. package/build/types/tools/design-tokens/utilities/unresolvable-modes/index.d.ts +4 -0
  90. package/build/types/tools/design-tokens/utilities/unresolvable-modes/lenient-resolve.d.ts +2 -0
  91. package/build/types/tools/design-tokens/utilities/unresolvable-modes/placeholder.d.ts +2 -0
  92. package/build/types/tools/design-tokens/utilities/unresolvable-modes/preserve.d.ts +2 -0
  93. package/build/types/tools/design-tokens/utilities/unresolvable-modes/strict.d.ts +2 -0
  94. package/build/types/tools/design-tokens/utilities/unresolvable-modes/types.d.ts +33 -0
  95. package/build/types/tools/docs-block-builder/SDKDocsBlockBuilder.d.ts +9 -0
  96. package/build/types/tools/json-builder/elements-transformers/SDKToolsJSONElementTransformer.d.ts +1 -1
  97. package/build/types/utils/TokenUtils.d.ts +1 -1
  98. package/package.json +17 -21
  99. package/build/types/model/enums/SDKDocsBlockTokenNameFormat.d.ts +0 -10
@@ -61,139 +61,139 @@ export declare class AreaResources {
61
61
  /** Uploads new font resources */
62
62
  uploadFontResources(from: RemoteVersionIdentifier, fonts: FileList): Promise<ResourceFont[]>;
63
63
  initializeFileUpload(from: RemoteVersionIdentifier, fileUploadItems: DTOFileUploadPayload["files"]): Promise<{
64
- files?: {
65
- name?: string;
64
+ files: {
65
+ fileId: string;
66
+ referencePersistentId: string;
67
+ name: string;
68
+ checksum: string;
69
+ url: string;
70
+ size: number;
66
71
  pendingUpload?: boolean;
67
- url?: string;
68
- size?: number;
69
- fileId?: string;
70
- referencePersistentId?: string;
71
- checksum?: string;
72
72
  }[];
73
- uploadUrls?: {
74
- fileId?: string;
75
- uploadUrl?: string;
73
+ uploadUrls: {
74
+ fileId: string;
75
+ uploadUrl: string;
76
76
  }[];
77
77
  }>;
78
78
  initializeProjectFileUpload(workspaceId: string, projectId: string, fileUploadItems: DTOForgeProjectFileUploadPayload["files"]): Promise<{
79
- files?: {
80
- id?: string;
81
- name?: string;
79
+ files: {
80
+ id: string;
81
+ name: string;
82
+ checksum: string;
83
+ url: string;
84
+ size: number;
82
85
  pendingUpload?: boolean;
83
- url?: string;
84
- size?: number;
85
- checksum?: string;
86
86
  }[];
87
- uploadUrls?: {
88
- fileId?: string;
89
- uploadUrl?: string;
87
+ uploadUrls: {
88
+ fileId: string;
89
+ uploadUrl: string;
90
90
  }[];
91
91
  }>;
92
92
  initializeBulkFileUpload(input: DTOFileUploadBulkPayload): Promise<{
93
- files?: {
94
- id?: string;
95
- name?: string;
93
+ files: {
94
+ id: string;
95
+ name: string;
96
+ deduplicationKey: string;
97
+ storagePath: string;
98
+ url: string;
99
+ size: number;
100
+ pendingUpload?: boolean;
96
101
  source?: {
97
- type?: "UserUpload";
98
- userId?: string;
102
+ type: "UserUpload";
103
+ userId: string;
99
104
  } | {
100
- type?: "Figma";
101
- renderMode?: "Image" | "HTML" | "JSON";
105
+ type: "Figma";
106
+ renderMode: "Image" | "HTML" | "JSON";
102
107
  };
103
- deduplicationKey?: string;
104
- pendingUpload?: boolean;
105
- storagePath?: string;
106
- url?: string;
107
- size?: number;
108
108
  }[];
109
- uploadUrls?: {
110
- fileId?: string;
111
- uploadUrl?: string;
109
+ uploadUrls: {
110
+ fileId: string;
111
+ uploadUrl: string;
112
112
  }[];
113
113
  }>;
114
114
  finalizeFileUpload(from: RemoteVersionIdentifier, fileIds: Array<string>): Promise<{
115
- ok?: true;
115
+ ok: true;
116
116
  }>;
117
117
  finalizeProjectFileUpload(workspaceId: string, projectId: string, fileIds: Array<string>): Promise<{
118
- ok?: true;
118
+ ok: true;
119
119
  }>;
120
120
  finalizeBulkFileUpload(input: DTOFileFinalizeBulkPayload): Promise<{
121
- files?: {
122
- id?: string;
123
- name?: string;
121
+ files: {
122
+ id: string;
123
+ name: string;
124
+ deduplicationKey: string;
125
+ storagePath: string;
126
+ url: string;
127
+ size: number;
128
+ pendingUpload?: boolean;
124
129
  source?: {
125
- type?: "UserUpload";
126
- userId?: string;
130
+ type: "UserUpload";
131
+ userId: string;
127
132
  } | {
128
- type?: "Figma";
129
- renderMode?: "Image" | "HTML" | "JSON";
133
+ type: "Figma";
134
+ renderMode: "Image" | "HTML" | "JSON";
130
135
  };
131
- deduplicationKey?: string;
132
- pendingUpload?: boolean;
133
- storagePath?: string;
134
- url?: string;
135
- size?: number;
136
136
  }[];
137
137
  }>;
138
138
  validateFigmaNodeAccess(input: DTOForgeFigmaNodeCreateRequest): Promise<boolean>;
139
139
  exportFigmaNode(input: DTOForgeFigmaNodeCreateRequest): Promise<{
140
- figmaNode?: {
141
- id?: string;
142
- code?: {
143
- id?: string;
144
- name?: string;
140
+ figmaNode: {
141
+ id: string;
142
+ state: "Success" | "Failed" | "Optimizing";
143
+ origin: {
144
+ fileId: string;
145
+ fileName: string;
146
+ fileLastEditedAt: string;
147
+ nodeId: string;
148
+ nodeName: string;
149
+ };
150
+ thumbnail: {
151
+ id: string;
152
+ url: string;
145
153
  source?: {
146
- type?: "UserUpload";
147
- userId?: string;
154
+ type: "UserUpload";
155
+ userId: string;
148
156
  } | {
149
- type?: "Figma";
150
- renderMode?: "Image" | "HTML" | "JSON";
157
+ type: "Figma";
158
+ renderMode: "Image" | "HTML" | "JSON";
151
159
  };
152
- url?: string;
153
- };
154
- state?: "Success" | "Failed" | "Optimizing";
155
- origin?: {
156
- nodeId?: string;
157
- fileId?: string;
158
- fileName?: string;
159
- fileLastEditedAt?: string;
160
- nodeName?: string;
161
- };
162
- thumbnail?: {
163
- id?: string;
164
160
  name?: string;
161
+ };
162
+ json: {
163
+ id: string;
164
+ url: string;
165
165
  source?: {
166
- type?: "UserUpload";
167
- userId?: string;
166
+ type: "UserUpload";
167
+ userId: string;
168
168
  } | {
169
- type?: "Figma";
170
- renderMode?: "Image" | "HTML" | "JSON";
169
+ type: "Figma";
170
+ renderMode: "Image" | "HTML" | "JSON";
171
171
  };
172
- url?: string;
173
- };
174
- json?: {
175
- id?: string;
176
172
  name?: string;
173
+ };
174
+ html: {
175
+ id: string;
176
+ url: string;
177
177
  source?: {
178
- type?: "UserUpload";
179
- userId?: string;
178
+ type: "UserUpload";
179
+ userId: string;
180
180
  } | {
181
- type?: "Figma";
182
- renderMode?: "Image" | "HTML" | "JSON";
181
+ type: "Figma";
182
+ renderMode: "Image" | "HTML" | "JSON";
183
183
  };
184
- url?: string;
185
- };
186
- html?: {
187
- id?: string;
188
184
  name?: string;
185
+ };
186
+ code?: {
187
+ id: string;
188
+ url: string;
189
189
  source?: {
190
- type?: "UserUpload";
191
- userId?: string;
190
+ type: "UserUpload";
191
+ userId: string;
192
192
  } | {
193
- type?: "Figma";
194
- renderMode?: "Image" | "HTML" | "JSON";
193
+ type: "Figma";
194
+ renderMode: "Image" | "HTML" | "JSON";
195
195
  };
196
- url?: string;
196
+ name?: string;
197
197
  };
198
198
  };
199
199
  }>;
@@ -8,18 +8,18 @@ export declare class AreaSandboxes {
8
8
  designSystemId?: string;
9
9
  }): Promise<SandboxTemplate[]>;
10
10
  sandboxKeepAlive(workspaceId: string, projectId: string, featureId: string, sandboxId: string): Promise<{
11
- id?: string;
12
- url?: string;
11
+ id: string;
12
+ url: string;
13
+ currentIterationId: string;
14
+ featureId: string;
15
+ expiresAt: string;
16
+ parentMessageId?: string;
13
17
  error?: {
14
- stage?: "PackageInstall" | "HealthCheck" | "Build" | "Unknown";
15
- errorDescription?: string;
18
+ stage: "PackageInstall" | "HealthCheck" | "Build" | "Unknown";
19
+ errorDescription: string;
16
20
  };
17
- parentMessageId?: string;
18
- currentIterationId?: string;
19
- featureId?: string;
20
- expiresAt?: string;
21
21
  }>;
22
22
  provisionSandbox(workspaceId: string, projectId: string, featureId: string, parentMessageId?: string): Promise<{
23
- ok?: boolean;
23
+ ok: boolean;
24
24
  }>;
25
25
  }
@@ -45,111 +45,111 @@ export declare class AreaThreads {
45
45
  * @returns Finalize input
46
46
  */
47
47
  finalizeMessage(threadId: string, input: DTOThreadMessageFinalizeInput): Promise<{
48
- message?: {
49
- id?: string;
50
- createdAt?: string;
51
- updatedAt?: string;
52
- parentMessageId?: string;
53
- threadId?: string;
48
+ message: {
49
+ id: string;
50
+ threadId: string;
51
+ body: string;
52
+ createdAt: string;
54
53
  sender?: {
55
- type?: "User";
56
- userId?: string;
54
+ type: "User";
55
+ userId: string;
57
56
  } | {
58
- type?: "Agent";
59
- agentType?: "Ask" | "Document" | "Prototype" | "ReleaseNotes";
57
+ type: "Agent";
58
+ agentType: "Ask" | "Document" | "Prototype" | "ReleaseNotes";
60
59
  } | {
61
- type?: "System";
62
- onBehalfOfUserId?: string;
60
+ type: "System";
61
+ onBehalfOfUserId: string;
63
62
  };
64
- body?: string;
65
63
  isPrompt?: boolean;
66
64
  isRetry?: boolean;
67
65
  startsNewThread?: boolean;
66
+ parentMessageId?: string;
68
67
  agentResponseTrackerId?: string;
69
68
  attachments?: {
69
+ iterationId?: string;
70
70
  files?: {
71
- id?: string;
72
- name?: string;
71
+ id: string;
72
+ url: string;
73
73
  source?: {
74
- type?: "UserUpload";
75
- userId?: string;
74
+ type: "UserUpload";
75
+ userId: string;
76
76
  } | {
77
- type?: "Figma";
78
- renderMode?: "Image" | "HTML" | "JSON";
77
+ type: "Figma";
78
+ renderMode: "Image" | "HTML" | "JSON";
79
79
  };
80
- url?: string;
80
+ name?: string;
81
81
  }[];
82
+ templateId?: string;
82
83
  figmaNodes?: {
83
- id?: string;
84
- code?: {
85
- id?: string;
86
- name?: string;
84
+ id: string;
85
+ state: "Success" | "Failed" | "Optimizing";
86
+ origin: {
87
+ fileId: string;
88
+ fileName: string;
89
+ fileLastEditedAt: string;
90
+ nodeId: string;
91
+ nodeName: string;
92
+ };
93
+ thumbnail: {
94
+ id: string;
95
+ url: string;
87
96
  source?: {
88
- type?: "UserUpload";
89
- userId?: string;
97
+ type: "UserUpload";
98
+ userId: string;
90
99
  } | {
91
- type?: "Figma";
92
- renderMode?: "Image" | "HTML" | "JSON";
100
+ type: "Figma";
101
+ renderMode: "Image" | "HTML" | "JSON";
93
102
  };
94
- url?: string;
95
- };
96
- state?: "Success" | "Failed" | "Optimizing";
97
- origin?: {
98
- nodeId?: string;
99
- fileId?: string;
100
- fileName?: string;
101
- fileLastEditedAt?: string;
102
- nodeName?: string;
103
- };
104
- thumbnail?: {
105
- id?: string;
106
103
  name?: string;
104
+ };
105
+ json: {
106
+ id: string;
107
+ url: string;
107
108
  source?: {
108
- type?: "UserUpload";
109
- userId?: string;
109
+ type: "UserUpload";
110
+ userId: string;
110
111
  } | {
111
- type?: "Figma";
112
- renderMode?: "Image" | "HTML" | "JSON";
112
+ type: "Figma";
113
+ renderMode: "Image" | "HTML" | "JSON";
113
114
  };
114
- url?: string;
115
- };
116
- json?: {
117
- id?: string;
118
115
  name?: string;
116
+ };
117
+ html: {
118
+ id: string;
119
+ url: string;
119
120
  source?: {
120
- type?: "UserUpload";
121
- userId?: string;
121
+ type: "UserUpload";
122
+ userId: string;
122
123
  } | {
123
- type?: "Figma";
124
- renderMode?: "Image" | "HTML" | "JSON";
124
+ type: "Figma";
125
+ renderMode: "Image" | "HTML" | "JSON";
125
126
  };
126
- url?: string;
127
- };
128
- html?: {
129
- id?: string;
130
127
  name?: string;
128
+ };
129
+ code?: {
130
+ id: string;
131
+ url: string;
131
132
  source?: {
132
- type?: "UserUpload";
133
- userId?: string;
133
+ type: "UserUpload";
134
+ userId: string;
134
135
  } | {
135
- type?: "Figma";
136
- renderMode?: "Image" | "HTML" | "JSON";
136
+ type: "Figma";
137
+ renderMode: "Image" | "HTML" | "JSON";
137
138
  };
138
- url?: string;
139
+ name?: string;
139
140
  };
140
141
  }[];
141
- iterationId?: string;
142
- templateId?: string;
143
142
  };
144
143
  annotations?: {
145
- prompt?: string;
146
- elements?: {
147
- xpath?: string;
148
- line?: string;
144
+ prompt: string;
145
+ elements: {
146
+ xpath: string;
147
+ line: string;
149
148
  }[];
150
149
  }[];
151
150
  replyToMessageId?: string;
152
151
  promptMetadata?: Record<string, any>;
152
+ updatedAt?: string;
153
153
  };
154
154
  }>;
155
155
  }
@@ -4,6 +4,7 @@ import { ElementDataView } from "../../model/elements/SDKElementDataView";
4
4
  import { ElementDataViewColumn } from "../../model/elements/SDKElementDataViewColumn";
5
5
  import { ElementProperty, ElementPropertyCreationModel, ElementPropertyUpdateModel } from "../../model/elements/SDKElementProperty";
6
6
  import { ElementPropertyValue } from "../../model/elements/values/SDKElementPropertyValue";
7
+ import { ActivityEventOptions } from "../data/requests/SDKDataCoreWriteRequests";
7
8
  import { TokenType } from "../../model/enums/SDKTokenType";
8
9
  import { TokenGroup } from "../../model/groups/SDKTokenGroup";
9
10
  import { TokenTheme } from "../../model/themes/SDKTokenTheme";
@@ -28,7 +29,7 @@ export declare class AreaTokens {
28
29
  getTokens(from: RemoteVersionIdentifier, filter?: {
29
30
  type?: TokenType;
30
31
  brandId?: string;
31
- }): Promise<Array<Token>>;
32
+ }): Promise<Array<AnyToken>>;
32
33
  /** Retrieves all occurances of the specified token in the version - its usages in other tokens, components and documentation pages
33
34
  * @param from - Remote version to fetch from
34
35
  * @param idInVersion - Token to check for references
@@ -77,7 +78,11 @@ export declare class AreaTokens {
77
78
  * @returns All token collections in the specified version
78
79
  */
79
80
  getTokenCollections(from: RemoteVersionIdentifier): Promise<Array<DesignSystemCollection>>;
80
- /** Creates remote token. This method can only be used once per token and will assign persistent id to the token. Calling this version on token that already has id assigned will result in error
81
+ /** Creates remote token. The token's own persistent id is sent to the server, so this method can only be used once per token. Calling it for a token that already exists remotely will result in error
82
+ *
83
+ * Both `id` and `idInVersion` are written back onto the passed token from the server response.
84
+ *
85
+ * Only the token itself is written. To create it together with theme overrides or property values, use `bulkOperations.updateTokenData` with `tokenMode: "create"`.
81
86
  * @param to - Remote version to write to
82
87
  * @param token - Token to create
83
88
  * @param parentId - Id of the group to add the token to. This is id of the group, not the versioned id
@@ -92,7 +97,7 @@ export declare class AreaTokens {
92
97
  * @returns New token of the specified type, filled with default values
93
98
  */
94
99
  createLocalToken<T extends TokenType>(tokenType: T, versionId: string, brandId: string, properties: Array<ElementProperty>): TokenTypeMapToken[T];
95
- /** Creates local token override. This theme override doesn't have id associated with it on remote, and must be created once with `createThemeOverride` to be stored in design system
100
+ /** Creates local token override. This theme override doesn't have id associated with it on remote — convert it with `TokenTheme.toWriteOverrideObject` and pass the result to `bulkOperations.updateTokenData` as a theme value to store it in design system
96
101
  * @param tokenType - Type of token to create
97
102
  * @returns New token of the specified type, filled with default values
98
103
  */
@@ -217,20 +222,20 @@ export declare class AreaTokens {
217
222
  */
218
223
  deleteTokenTheme(to: RemoteVersionIdentifier, idInVersion: string): Promise<void>;
219
224
  /** Warning: INTERNAL, DO NOT USE YET, NOT STABLE INTERFACE. Write tokens in bulk */
220
- writeTokens(to: RemoteVersionIdentifier, tokens: Array<Token>, groups: Array<TokenGroup>, deleteTokens: Array<Token>, deleteTokenGroups: Array<TokenGroup>): Promise<void>;
225
+ writeTokens(to: RemoteVersionIdentifier, tokens: Array<Token>, groups: Array<TokenGroup>, deleteTokens: Array<Token>, deleteTokenGroups: Array<TokenGroup>, activityEventOptions?: ActivityEventOptions): Promise<void>;
221
226
  /** Warning: INTERNAL, DO NOT USE YET, NOT STABLE INTERFACE. Write theme in bulk */
222
- writeTheme(to: RemoteVersionIdentifier, theme: TokenTheme): Promise<void>;
227
+ writeTheme(to: RemoteVersionIdentifier, theme: TokenTheme, activityEventOptions?: ActivityEventOptions): Promise<void>;
223
228
  /** Resolves tokens by applying themes to them and retrieves new token set where values correctly correspond to that theme */
224
- computeTokensByApplyingThemes(allTokens: Array<Token>, tokens: Array<Token>, themes: Array<TokenTheme>): Array<Token>;
225
- computeInnerReferencesByApplyingThemesEfficient(tokensIndex: Map<string, Token>, themeOverridesIndex: Record<string, Map<string, Token>>, tokens: Array<Token>, themes: Array<TokenTheme>): Array<Token>;
229
+ computeTokensByApplyingThemes(allTokens: Array<Token>, tokens: Array<Token>, themes: Array<TokenTheme>): Array<AnyToken>;
230
+ computeInnerReferencesByApplyingThemesEfficient(tokensIndex: Map<string, Token>, themeOverridesIndex: Record<string, Map<string, Token>>, tokens: Array<Token>, themes: Array<TokenTheme>): Array<AnyToken>;
226
231
  private computeSingleTokenValueFromReferenceByApplyingThemes;
227
- computeTokensByApplyingThemesEfficient(tokensIndex: Map<string, Token>, themeOverridesIndex: Record<string, Map<string, Token>>, tokens: Array<Token>, themes: Array<TokenTheme>): Array<Token>;
232
+ computeTokensByApplyingThemesEfficient(tokensIndex: Map<string, Token>, themeOverridesIndex: Record<string, Map<string, Token>>, tokens: Array<Token>, themes: Array<TokenTheme>): Array<AnyToken>;
228
233
  /** Separates groups by types */
229
- computeGroupTrees(groups: Array<TokenGroup>): Promise<Map<TokenType, Array<TokenGroup>>>;
234
+ computeGroupTrees(groups: Array<TokenGroup>): Map<TokenType, Array<TokenGroup>>;
230
235
  /** Get determistic mocked token data. Must be used with mocked token groups */
231
- getMockedTokens(from: RemoteBrandIdentifier): Promise<Array<Token>>;
236
+ getMockedTokens(from: RemoteBrandIdentifier): Array<AnyToken>;
232
237
  /** Get determistic mocked token group data. Must be used with mocked tokens */
233
- getMockedTokenGroups(from: RemoteBrandIdentifier): Promise<Array<TokenGroup>>;
238
+ getMockedTokenGroups(from: RemoteBrandIdentifier): Array<TokenGroup>;
234
239
  /** Get determistic mocked token data views. Must be used with mocked tokens */
235
- getMockedTokenDataViews(from: RemoteVersionIdentifier): Promise<Array<ElementDataView>>;
240
+ getMockedTokenDataViews(_from: RemoteVersionIdentifier): Array<ElementDataView>;
236
241
  }
@@ -132,7 +132,7 @@ export declare class AreaWorkspaces {
132
132
  * @returns boolean - true if the workspace has available credits, false otherwise
133
133
  */
134
134
  getWorkspaceCreditsAvailability(workspaceId: string): Promise<{
135
- canSpendCredits?: boolean;
135
+ canSpendCredits: boolean;
136
136
  }>;
137
137
  /** Creates new workspace and retrieves the newly created workspace object. The user who creates the workspace becomes its owner
138
138
  * @param name - Name of the workspace