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

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 (82) 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 +7 -5
  7. package/build/types/core/areas/SDKAreaDataSources.d.ts +1 -1
  8. package/build/types/core/areas/SDKAreaDocumentation.d.ts +28 -13
  9. package/build/types/core/areas/SDKAreaImport.d.ts +35 -0
  10. package/build/types/core/areas/SDKAreaMCP.d.ts +19 -1
  11. package/build/types/core/areas/SDKAreaProjects.d.ts +137 -153
  12. package/build/types/core/areas/SDKAreaRawData.d.ts +132 -131
  13. package/build/types/core/areas/SDKAreaTokens.d.ts +17 -12
  14. package/build/types/core/data/SDKDataCore.d.ts +208 -186
  15. package/build/types/core/data/SDKDataCoreCached.d.ts +2 -2
  16. package/build/types/core/data/requests/SDKDataCoreReadRequests.d.ts +94 -67
  17. package/build/types/core/data/requests/SDKDataCoreWriteRequests.d.ts +217 -190
  18. package/build/types/core/resolvers/SDKDocsEntityItemResolver.d.ts +2 -2
  19. package/build/types/core/resolvers/SDKSnapshotTokenBuilder.d.ts +28 -0
  20. package/build/types/core/resolvers/SDKTokenResolver.d.ts +11 -9
  21. package/build/types/exports.d.ts +18 -11
  22. package/build/types/model/activity-events/SDKActivityEvent.d.ts +46 -0
  23. package/build/types/model/agent-chats/SDKAgentChat.d.ts +28 -0
  24. package/build/types/model/datasets/SDKDataset.d.ts +15 -5
  25. package/build/types/model/docs/blocks/definition/SDKDocsBlockBehavior.d.ts +4 -1
  26. package/build/types/model/docs/blocks/definition/actual/context-mcp/SDKDocsBlockActualContextMcp.d.ts +2 -0
  27. package/build/types/model/docs/blocks/properties/SDKDocsBlockAssetProperty.d.ts +7 -24
  28. package/build/types/model/docs/blocks/properties/SDKDocsBlockAssetPropertyProperty.d.ts +3 -2
  29. package/build/types/model/docs/blocks/properties/SDKDocsBlockBooleanProperty.d.ts +3 -2
  30. package/build/types/model/docs/blocks/properties/SDKDocsBlockCodeProperty.d.ts +3 -6
  31. package/build/types/model/docs/blocks/properties/SDKDocsBlockCodeSandboxProperty.d.ts +3 -8
  32. package/build/types/model/docs/blocks/properties/SDKDocsBlockColorProperty.d.ts +3 -3
  33. package/build/types/model/docs/blocks/properties/SDKDocsBlockComponentProperty.d.ts +7 -10
  34. package/build/types/model/docs/blocks/properties/SDKDocsBlockComponentPropertyProperty.d.ts +3 -2
  35. package/build/types/model/docs/blocks/properties/SDKDocsBlockContextProperty.d.ts +16 -0
  36. package/build/types/model/docs/blocks/properties/SDKDocsBlockDividerProperty.d.ts +3 -2
  37. package/build/types/model/docs/blocks/properties/SDKDocsBlockEmbedUrlProperty.d.ts +3 -6
  38. package/build/types/model/docs/blocks/properties/SDKDocsBlockFigmaComponentProperty.d.ts +7 -26
  39. package/build/types/model/docs/blocks/properties/SDKDocsBlockFigmaNodeProperty.d.ts +7 -22
  40. package/build/types/model/docs/blocks/properties/SDKDocsBlockFileProperty.d.ts +4 -9
  41. package/build/types/model/docs/blocks/properties/SDKDocsBlockImageProperty.d.ts +3 -10
  42. package/build/types/model/docs/blocks/properties/SDKDocsBlockMarkdownProperty.d.ts +3 -2
  43. package/build/types/model/docs/blocks/properties/SDKDocsBlockMultiRichTextProperty.d.ts +3 -3
  44. package/build/types/model/docs/blocks/properties/SDKDocsBlockMultiSelectProperty.d.ts +3 -2
  45. package/build/types/model/docs/blocks/properties/SDKDocsBlockNumberProperty.d.ts +3 -2
  46. package/build/types/model/docs/blocks/properties/SDKDocsBlockProperty.d.ts +3 -3
  47. package/build/types/model/docs/blocks/properties/SDKDocsBlockRichTextEditorProperty.d.ts +3 -3
  48. package/build/types/model/docs/blocks/properties/SDKDocsBlockRichTextProperty.d.ts +3 -7
  49. package/build/types/model/docs/blocks/properties/SDKDocsBlockSingleSelectProperty.d.ts +3 -2
  50. package/build/types/model/docs/blocks/properties/SDKDocsBlockStorybookProperty.d.ts +4 -22
  51. package/build/types/model/docs/blocks/properties/SDKDocsBlockTableProperty.d.ts +12 -28
  52. package/build/types/model/docs/blocks/properties/SDKDocsBlockTextProperty.d.ts +3 -2
  53. package/build/types/model/docs/blocks/properties/SDKDocsBlockTokenProperty.d.ts +7 -31
  54. package/build/types/model/docs/blocks/properties/SDKDocsBlockTokenPropertyProperty.d.ts +3 -2
  55. package/build/types/model/docs/blocks/properties/SDKDocsBlockTokenTypeProperty.d.ts +3 -3
  56. package/build/types/model/docs/blocks/properties/SDKDocsBlockUrlProperty.d.ts +3 -2
  57. package/build/types/model/docs/sections/SDKDocsSection.d.ts +0 -31
  58. package/build/types/model/documentation/SDKPageHistoryVersion.d.ts +20 -0
  59. package/build/types/model/documentation/blocks/SDKDocumentationLegacyPageBlockContextMcp.d.ts +11 -0
  60. package/build/types/model/elements/SDKElementPropertyOption.d.ts +1 -2
  61. package/build/types/model/enums/SDKCodeLanguage.d.ts +1 -1
  62. package/build/types/model/enums/SDKDesignSystemRole.d.ts +1 -2
  63. package/build/types/model/enums/SDKDocsBlockBehaviorSelectionType.d.ts +4 -2
  64. package/build/types/model/enums/SDKDocsBlockContainerSize.d.ts +6 -4
  65. package/build/types/model/enums/SDKDocsBlockItemPropertyType.d.ts +3 -1
  66. package/build/types/model/enums/SDKDocumentationLegacyPageBlockType.d.ts +1 -0
  67. package/build/types/model/enums/SDKTokenType.d.ts +2 -0
  68. package/build/types/model/enums/SDKWorkspaceSeatType.d.ts +14 -3
  69. package/build/types/model/exporters/SDKExporter.d.ts +2 -2
  70. package/build/types/model/membership/SDKMembership.d.ts +1 -1
  71. package/build/types/model/support/SDKSource.d.ts +4 -3
  72. package/build/types/model/themes/SDKTokenThemeOverride.d.ts +1 -0
  73. package/build/types/model/tokens/remote/SDKRemoteTokenModel.d.ts +34 -1
  74. package/build/types/model/tokens/remote/SDKRemoteTokenValue.d.ts +1 -1
  75. package/build/types/model/workspaces/SDKWorkspaceProductPrice.d.ts +6 -3
  76. package/build/types/model/workspaces/SDKWorkspaceSubscription.d.ts +2 -6
  77. package/build/types/tools/design-tokens/SDKToolsDesignTokensPlugin.d.ts +6 -3
  78. package/build/types/tools/docs-block-builder/SDKDocsBlockBuilder.d.ts +9 -0
  79. package/build/types/tools/json-builder/elements-transformers/SDKToolsJSONElementTransformer.d.ts +1 -1
  80. package/build/types/utils/TokenUtils.d.ts +1 -1
  81. package/package.json +17 -21
  82. package/build/types/model/enums/SDKDocsBlockTokenNameFormat.d.ts +0 -10
@@ -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
  }