@supernova-studio/client 1.47.6 → 1.48.0

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.
package/dist/index.mjs CHANGED
@@ -4470,6 +4470,7 @@ var Workspace = z133.object({
4470
4470
  sso: nullishToOptional(SsoProvider),
4471
4471
  npmRegistrySettings: nullishToOptional(NpmRegistryConfig),
4472
4472
  aiFeaturesEnabled: z133.boolean().default(false),
4473
+ projectsEnabled: z133.boolean().default(false),
4473
4474
  aiAskFeaturesEnabled: z133.boolean().default(false),
4474
4475
  aiCustomInstruction: z133.string().optional(),
4475
4476
  hasOpenMeterSubject: z133.boolean()
@@ -4485,6 +4486,7 @@ var WorkspaceConfigurationUpdate = z134.object({
4485
4486
  npmRegistrySettings: NpmRegistryConfig.optional(),
4486
4487
  profile: WorkspaceProfileUpdate.optional(),
4487
4488
  aiFeaturesEnabled: z134.boolean().optional(),
4489
+ projectsEnabled: z134.boolean().optional(),
4488
4490
  aiAskFeaturesEnabled: z134.boolean().optional(),
4489
4491
  aiCustomInstruction: z134.string().optional()
4490
4492
  });
@@ -7395,6 +7397,7 @@ var DTOWorkspace = z246.object({
7395
7397
  subscription: Subscription,
7396
7398
  npmRegistry: DTONpmRegistryConfig.optional(),
7397
7399
  aiFeaturesEnabled: z246.boolean().default(false),
7400
+ projectsEnabled: z246.boolean().default(false),
7398
7401
  aiAskFeaturesEnabled: z246.boolean().default(false),
7399
7402
  aiCustomInstruction: z246.string().optional()
7400
7403
  });
@@ -7901,6 +7904,7 @@ var WorkspaceConfigurationPayload = z263.object({
7901
7904
  npmRegistrySettings: NpmRegistryInput.partial().optional(),
7902
7905
  profile: WorkspaceProfile.partial().optional(),
7903
7906
  aiFeaturesEnabled: z263.boolean().optional(),
7907
+ projectsEnabled: z263.boolean().optional(),
7904
7908
  aiAskFeaturesEnabled: z263.boolean().optional(),
7905
7909
  aiCustomInstruction: z263.string().optional()
7906
7910
  });
@@ -9542,6 +9546,10 @@ var DTOFeatureIteration = z314.object({
9542
9546
  * To be used for "fix with AI"
9543
9547
  */
9544
9548
  errorDescription: z314.string().nullish(),
9549
+ /**
9550
+ * The cost in credits to generate this iteration
9551
+ */
9552
+ creditsCost: z314.number().optional(),
9545
9553
  /**
9546
9554
  * URL of a static preview of the feature
9547
9555
  */
@@ -9900,7 +9908,8 @@ var DTOThreadMessageCreateInput = DTOThreadMessage.pick({
9900
9908
  var DTOThreadMessageFinalizeInput = z318.object({
9901
9909
  messageId: Id,
9902
9910
  agentMessageBody: z318.string().optional(),
9903
- promptState: DTOThreadPromptState.optional()
9911
+ promptState: DTOThreadPromptState.optional(),
9912
+ creditsSpend: DTOBillingCreditsSpendInput.optional()
9904
9913
  });
9905
9914
  var DTOThreadMessageRetryInput = z318.object({
9906
9915
  agentMessageId: Id
@@ -10651,74 +10660,89 @@ var DTOLiveblocksAuthResponse = z334.object({
10651
10660
  token: z334.string()
10652
10661
  });
10653
10662
 
10663
+ // src/api/dto/mcp/stream.ts
10664
+ import z335 from "zod";
10665
+ var DTOMCPStream = z335.object({
10666
+ id: z335.string().uuid(),
10667
+ projectFeatureId: z335.string().optional(),
10668
+ projectDocumentId: z335.string().optional()
10669
+ });
10670
+ var DTOMCPStreamUpdateInput = z335.object({
10671
+ projectFeatureId: z335.string().optional(),
10672
+ projectDocumentId: z335.string().optional()
10673
+ });
10674
+ var DTOMCPStreamResponse = z335.object({
10675
+ stream: DTOMCPStream
10676
+ });
10677
+
10654
10678
  // src/api/dto/portal/portal-settings.ts
10655
- import { z as z335 } from "zod";
10679
+ import { z as z336 } from "zod";
10656
10680
  var DTOPortalSettingsTheme = PortalSettingsTheme;
10657
10681
  var DTOPortalSettingsSidebarLink = PortalSettingsSidebarLink;
10658
10682
  var DTOPortalSettingsSidebarSection = PortalSettingsSidebarSection;
10659
10683
  var DTOPortalSettingsSidebar = PortalSettingsSidebar;
10660
- var DTOPortalSettings = z335.object({
10661
- id: z335.string(),
10662
- workspaceId: z335.string(),
10663
- enabledDesignSystemIds: z335.array(z335.string()),
10664
- enabledBrandPersistentIds: z335.array(z335.string()),
10684
+ var DTOPortalSettings = z336.object({
10685
+ id: z336.string(),
10686
+ workspaceId: z336.string(),
10687
+ enabledDesignSystemIds: z336.array(z336.string()),
10688
+ enabledBrandPersistentIds: z336.array(z336.string()),
10665
10689
  theme: DTOPortalSettingsTheme.nullish(),
10666
10690
  sidebar: DTOPortalSettingsSidebar.nullish(),
10667
- createdAt: z335.coerce.date(),
10668
- updatedAt: z335.coerce.date()
10691
+ createdAt: z336.coerce.date(),
10692
+ updatedAt: z336.coerce.date()
10669
10693
  });
10670
- var DTOPortalSettingsGetResponse = z335.object({
10694
+ var DTOPortalSettingsGetResponse = z336.object({
10671
10695
  portalSettings: DTOPortalSettings
10672
10696
  });
10673
- var DTOPortalSettingsUpdatePayload = z335.object({
10674
- enabledDesignSystemIds: z335.array(z335.string()).optional(),
10675
- enabledBrandPersistentIds: z335.array(z335.string()).optional(),
10697
+ var DTOPortalSettingsUpdatePayload = z336.object({
10698
+ enabledDesignSystemIds: z336.array(z336.string()).optional(),
10699
+ enabledBrandPersistentIds: z336.array(z336.string()).optional(),
10676
10700
  theme: DTOPortalSettingsTheme.nullish(),
10677
10701
  sidebar: DTOPortalSettingsSidebar.nullish()
10678
10702
  });
10679
10703
 
10680
10704
  // src/api/dto/themes/override.ts
10681
- import { z as z336 } from "zod";
10705
+ import { z as z337 } from "zod";
10682
10706
  var DTOThemeOverride = DesignTokenTypedData.and(
10683
- z336.object({
10684
- tokenPersistentId: z336.string(),
10707
+ z337.object({
10708
+ tokenPersistentId: z337.string(),
10685
10709
  origin: ThemeOverrideOrigin.optional()
10686
10710
  })
10687
10711
  );
10688
10712
  var DTOThemeOverrideCreatePayload = DesignTokenTypedData.and(
10689
- z336.object({
10690
- tokenPersistentId: z336.string()
10713
+ z337.object({
10714
+ tokenPersistentId: z337.string()
10691
10715
  })
10692
10716
  );
10693
10717
 
10694
10718
  // src/api/dto/themes/theme.ts
10695
- import { z as z337 } from "zod";
10696
- var DTOTheme = z337.object({
10697
- id: z337.string(),
10698
- persistentId: z337.string(),
10699
- designSystemVersionId: z337.string(),
10700
- brandId: z337.string(),
10719
+ import { z as z338 } from "zod";
10720
+ var DTOTheme = z338.object({
10721
+ id: z338.string(),
10722
+ persistentId: z338.string(),
10723
+ designSystemVersionId: z338.string(),
10724
+ brandId: z338.string(),
10701
10725
  meta: ObjectMeta,
10702
- codeName: z337.string(),
10726
+ codeName: z338.string(),
10703
10727
  overrides: DTOThemeOverride.array()
10704
10728
  });
10705
- var DTOThemeResponse = z337.object({
10729
+ var DTOThemeResponse = z338.object({
10706
10730
  theme: DTOTheme
10707
10731
  });
10708
- var DTOThemeListResponse = z337.object({
10732
+ var DTOThemeListResponse = z338.object({
10709
10733
  themes: DTOTheme.array()
10710
10734
  });
10711
- var DTOThemeCreatePayload = z337.object({
10735
+ var DTOThemeCreatePayload = z338.object({
10712
10736
  meta: ObjectMeta,
10713
- persistentId: z337.string(),
10714
- brandId: z337.string(),
10715
- codeName: z337.string(),
10737
+ persistentId: z338.string(),
10738
+ brandId: z338.string(),
10739
+ codeName: z338.string(),
10716
10740
  overrides: DTOThemeOverride.array()
10717
10741
  });
10718
10742
 
10719
10743
  // src/api/dto/trail-events/trail-events.ts
10720
- import { z as z338 } from "zod";
10721
- var DTOTrailEventType = z338.enum([
10744
+ import { z as z339 } from "zod";
10745
+ var DTOTrailEventType = z339.enum([
10722
10746
  "IterationCreated",
10723
10747
  "IterationBookmarked",
10724
10748
  "FeatureCreated",
@@ -10734,127 +10758,112 @@ var DTOTrailEventType = z338.enum([
10734
10758
  "ProjectContextCreated",
10735
10759
  "ProjectContextArchived"
10736
10760
  ]);
10737
- var DTOTrailEventBase = z338.object({
10738
- id: z338.string(),
10739
- projectId: z338.string(),
10740
- userId: z338.string(),
10741
- createdAt: z338.coerce.date(),
10742
- updatedAt: z338.coerce.date()
10743
- });
10744
- var DTOTrailEventIterationCreatedPayload = z338.object({
10745
- iterationName: z338.string(),
10746
- iterationId: z338.string().uuid(),
10747
- featureId: z338.string().uuid()
10748
- });
10749
- var DTOTrailEventIterationBookmarkedPayload = z338.object({
10750
- iterationId: z338.string().uuid(),
10751
- featureId: z338.string().uuid(),
10752
- iterationName: z338.string()
10753
- });
10754
- var DTOTrailEventIterationPromotedPayload = z338.object({
10755
- iterationId: z338.string().uuid(),
10756
- featureId: z338.string().uuid(),
10757
- iterationName: z338.string()
10758
- });
10759
- var DTOTrailEventFeatureCreatedPayload = z338.object({
10760
- featureId: z338.string().uuid(),
10761
- name: z338.string(),
10762
- description: z338.string().optional()
10763
- });
10764
- var DTOTrailEventFeatureDeletedPayload = z338.object({
10765
- featureId: z338.string().uuid(),
10766
- name: z338.string()
10767
- });
10768
- var DTOTrailEventFeatureArchivedPayload = z338.object({
10769
- featureId: z338.string().uuid(),
10770
- name: z338.string()
10771
- });
10772
- var DTOTrailEventDocumentCreatedPayload = z338.object({
10773
- documentId: z338.string().uuid(),
10774
- title: z338.string(),
10775
- sectionId: z338.string().uuid().optional()
10776
- });
10777
- var DTOTrailEventDocumentDeletedPayload = z338.object({
10778
- documentId: z338.string().uuid(),
10779
- title: z338.string()
10780
- });
10781
- var DTOTrailEventDocumentUpdatedPayload = z338.object({
10782
- documentId: z338.string().uuid(),
10783
- title: z338.string(),
10784
- sectionId: z338.string().uuid().optional()
10785
- });
10786
- var DTOTrailEventDocumentCommentSentPayload = z338.object({
10787
- documentId: z338.string().uuid(),
10788
- title: z338.string(),
10789
- sectionId: z338.string().uuid().optional()
10790
- });
10791
- var DTOTrailEventProjectCreatedPayload = z338.object({
10792
- name: z338.string(),
10793
- description: z338.string().optional()
10794
- });
10795
- var DTOTrailEventProjectArchivedPayload = z338.object({
10796
- name: z338.string()
10797
- });
10798
- var DTOTrailEventProjectContextCreatedPayload = z338.object({
10799
- contextId: z338.number(),
10800
- name: z338.string(),
10801
- description: z338.string().optional()
10802
- });
10803
- var DTOTrailEventProjectContextArchivedPayload = z338.object({
10804
- contextId: z338.number()
10805
- });
10806
- var DTOTrailEventPayload = z338.discriminatedUnion("type", [
10807
- z338.object({ type: z338.literal("IterationCreated"), payload: DTOTrailEventIterationCreatedPayload }),
10808
- z338.object({ type: z338.literal("IterationBookmarked"), payload: DTOTrailEventIterationBookmarkedPayload }),
10809
- z338.object({ type: z338.literal("FeatureCreated"), payload: DTOTrailEventFeatureCreatedPayload }),
10810
- z338.object({ type: z338.literal("FeatureDeleted"), payload: DTOTrailEventFeatureDeletedPayload }),
10811
- z338.object({ type: z338.literal("FeatureArchived"), payload: DTOTrailEventFeatureArchivedPayload }),
10812
- z338.object({ type: z338.literal("DocumentCreated"), payload: DTOTrailEventDocumentCreatedPayload }),
10813
- z338.object({ type: z338.literal("DocumentDeleted"), payload: DTOTrailEventDocumentDeletedPayload }),
10814
- z338.object({ type: z338.literal("DocumentUpdated"), payload: DTOTrailEventDocumentUpdatedPayload }),
10815
- z338.object({ type: z338.literal("DocumentCommentSent"), payload: DTOTrailEventDocumentCommentSentPayload }),
10816
- z338.object({ type: z338.literal("ProjectCreated"), payload: DTOTrailEventProjectCreatedPayload }),
10817
- z338.object({ type: z338.literal("ProjectArchived"), payload: DTOTrailEventProjectArchivedPayload }),
10818
- z338.object({ type: z338.literal("IterationPromoted"), payload: DTOTrailEventIterationPromotedPayload }),
10819
- z338.object({ type: z338.literal("ProjectContextCreated"), payload: DTOTrailEventProjectContextCreatedPayload }),
10820
- z338.object({ type: z338.literal("ProjectContextArchived"), payload: DTOTrailEventProjectContextArchivedPayload })
10761
+ var DTOTrailEventBase = z339.object({
10762
+ id: z339.string(),
10763
+ projectId: z339.string(),
10764
+ userId: z339.string(),
10765
+ createdAt: z339.coerce.date(),
10766
+ updatedAt: z339.coerce.date()
10767
+ });
10768
+ var DTOTrailEventIterationCreatedPayload = z339.object({
10769
+ iterationName: z339.string(),
10770
+ iterationId: z339.string().uuid(),
10771
+ featureId: z339.string().uuid()
10772
+ });
10773
+ var DTOTrailEventIterationBookmarkedPayload = z339.object({
10774
+ iterationId: z339.string().uuid(),
10775
+ featureId: z339.string().uuid(),
10776
+ iterationName: z339.string()
10777
+ });
10778
+ var DTOTrailEventIterationPromotedPayload = z339.object({
10779
+ iterationId: z339.string().uuid(),
10780
+ featureId: z339.string().uuid(),
10781
+ iterationName: z339.string()
10782
+ });
10783
+ var DTOTrailEventFeatureCreatedPayload = z339.object({
10784
+ featureId: z339.string().uuid(),
10785
+ name: z339.string(),
10786
+ description: z339.string().optional()
10787
+ });
10788
+ var DTOTrailEventFeatureDeletedPayload = z339.object({
10789
+ featureId: z339.string().uuid(),
10790
+ name: z339.string()
10791
+ });
10792
+ var DTOTrailEventFeatureArchivedPayload = z339.object({
10793
+ featureId: z339.string().uuid(),
10794
+ name: z339.string()
10795
+ });
10796
+ var DTOTrailEventDocumentCreatedPayload = z339.object({
10797
+ documentId: z339.string().uuid(),
10798
+ title: z339.string(),
10799
+ sectionId: z339.string().uuid().optional()
10800
+ });
10801
+ var DTOTrailEventDocumentDeletedPayload = z339.object({
10802
+ documentId: z339.string().uuid(),
10803
+ title: z339.string()
10804
+ });
10805
+ var DTOTrailEventDocumentUpdatedPayload = z339.object({
10806
+ documentId: z339.string().uuid(),
10807
+ title: z339.string(),
10808
+ sectionId: z339.string().uuid().optional()
10809
+ });
10810
+ var DTOTrailEventDocumentCommentSentPayload = z339.object({
10811
+ documentId: z339.string().uuid(),
10812
+ title: z339.string(),
10813
+ sectionId: z339.string().uuid().optional()
10814
+ });
10815
+ var DTOTrailEventProjectCreatedPayload = z339.object({
10816
+ name: z339.string(),
10817
+ description: z339.string().optional()
10818
+ });
10819
+ var DTOTrailEventProjectArchivedPayload = z339.object({
10820
+ name: z339.string()
10821
+ });
10822
+ var DTOTrailEventProjectContextCreatedPayload = z339.object({
10823
+ contextId: z339.number(),
10824
+ name: z339.string(),
10825
+ description: z339.string().optional()
10826
+ });
10827
+ var DTOTrailEventProjectContextArchivedPayload = z339.object({
10828
+ contextId: z339.number()
10829
+ });
10830
+ var DTOTrailEventPayload = z339.discriminatedUnion("type", [
10831
+ z339.object({ type: z339.literal("IterationCreated"), payload: DTOTrailEventIterationCreatedPayload }),
10832
+ z339.object({ type: z339.literal("IterationBookmarked"), payload: DTOTrailEventIterationBookmarkedPayload }),
10833
+ z339.object({ type: z339.literal("FeatureCreated"), payload: DTOTrailEventFeatureCreatedPayload }),
10834
+ z339.object({ type: z339.literal("FeatureDeleted"), payload: DTOTrailEventFeatureDeletedPayload }),
10835
+ z339.object({ type: z339.literal("FeatureArchived"), payload: DTOTrailEventFeatureArchivedPayload }),
10836
+ z339.object({ type: z339.literal("DocumentCreated"), payload: DTOTrailEventDocumentCreatedPayload }),
10837
+ z339.object({ type: z339.literal("DocumentDeleted"), payload: DTOTrailEventDocumentDeletedPayload }),
10838
+ z339.object({ type: z339.literal("DocumentUpdated"), payload: DTOTrailEventDocumentUpdatedPayload }),
10839
+ z339.object({ type: z339.literal("DocumentCommentSent"), payload: DTOTrailEventDocumentCommentSentPayload }),
10840
+ z339.object({ type: z339.literal("ProjectCreated"), payload: DTOTrailEventProjectCreatedPayload }),
10841
+ z339.object({ type: z339.literal("ProjectArchived"), payload: DTOTrailEventProjectArchivedPayload }),
10842
+ z339.object({ type: z339.literal("IterationPromoted"), payload: DTOTrailEventIterationPromotedPayload }),
10843
+ z339.object({ type: z339.literal("ProjectContextCreated"), payload: DTOTrailEventProjectContextCreatedPayload }),
10844
+ z339.object({ type: z339.literal("ProjectContextArchived"), payload: DTOTrailEventProjectContextArchivedPayload })
10821
10845
  ]);
10822
10846
  var DTOTrailEvent = DTOTrailEventPayload.and(DTOTrailEventBase);
10823
10847
  var DTOTrailEventWithDetails = DTOTrailEvent.and(
10824
- z338.object({
10825
- projectName: z338.string().optional(),
10826
- userName: z338.string().optional()
10848
+ z339.object({
10849
+ projectName: z339.string().optional(),
10850
+ userName: z339.string().optional()
10827
10851
  })
10828
10852
  );
10829
- var DTOTrailEventListInput = z338.object({
10830
- projectId: z338.string()
10853
+ var DTOTrailEventListInput = z339.object({
10854
+ projectId: z339.string()
10831
10855
  });
10832
- var DTOTrailEventListResponse = z338.object({
10833
- events: z338.array(DTOTrailEventWithDetails)
10856
+ var DTOTrailEventListResponse = z339.object({
10857
+ events: z339.array(DTOTrailEventWithDetails)
10834
10858
  });
10835
10859
  var DTOTrailEventCreate = DTOTrailEventPayload.and(
10836
10860
  DTOTrailEventBase.omit({ id: true, createdAt: true, updatedAt: true })
10837
10861
  );
10838
- var DTOTrailEventClientCreate = z338.discriminatedUnion("type", [
10839
- z338.object({ type: z338.literal("DocumentUpdated"), payload: DTOTrailEventDocumentUpdatedPayload }),
10840
- z338.object({ type: z338.literal("DocumentCommentSent"), payload: DTOTrailEventDocumentCommentSentPayload })
10862
+ var DTOTrailEventClientCreate = z339.discriminatedUnion("type", [
10863
+ z339.object({ type: z339.literal("DocumentUpdated"), payload: DTOTrailEventDocumentUpdatedPayload }),
10864
+ z339.object({ type: z339.literal("DocumentCommentSent"), payload: DTOTrailEventDocumentCommentSentPayload })
10841
10865
  ]).and(DTOTrailEventBase.omit({ id: true, createdAt: true, updatedAt: true }));
10842
10866
 
10843
- // src/api/dto/mcp/stream.ts
10844
- import z339 from "zod";
10845
- var DTOMCPStream = z339.object({
10846
- id: z339.string().uuid(),
10847
- projectFeatureId: z339.string().optional(),
10848
- projectDocumentId: z339.string().optional()
10849
- });
10850
- var DTOMCPStreamUpdateInput = z339.object({
10851
- projectFeatureId: z339.string().optional(),
10852
- projectDocumentId: z339.string().optional()
10853
- });
10854
- var DTOMCPStreamResponse = z339.object({
10855
- stream: DTOMCPStream
10856
- });
10857
-
10858
10867
  // src/utils/figma.ts
10859
10868
  var figmaFileIdRegex = /^[0-9a-zA-Z]{22,128}$/;
10860
10869
  var nodeIdRegex = /^\d+-\d+$/;
@@ -12448,6 +12457,25 @@ var ForgeProjectIterationsEndpoint = class {
12448
12457
  }
12449
12458
  };
12450
12459
 
12460
+ // src/api/endpoints/mcp/streams.ts
12461
+ var MCPStreamsEndpoint = class {
12462
+ constructor(requestExecutor) {
12463
+ this.requestExecutor = requestExecutor;
12464
+ }
12465
+ getById(streamId) {
12466
+ return this.requestExecutor.json(`/mcp/streams/${streamId}`, DTOMCPStreamResponse);
12467
+ }
12468
+ getForUser() {
12469
+ return this.requestExecutor.json(`/mcp/streams/user`, DTOMCPStreamResponse);
12470
+ }
12471
+ updateForUser(body) {
12472
+ return this.requestExecutor.json(`/mcp/streams/user`, DTOMCPStreamResponse, {
12473
+ method: "PUT",
12474
+ body
12475
+ });
12476
+ }
12477
+ };
12478
+
12451
12479
  // src/api/endpoints/workspaces/chat-threads.ts
12452
12480
  import { z as z351 } from "zod";
12453
12481
  var WorkspaceChatThreadsEndpoint = class {
@@ -12774,25 +12802,6 @@ var UsersEndpoint = class {
12774
12802
  }
12775
12803
  };
12776
12804
 
12777
- // src/api/endpoints/mcp/streams.ts
12778
- var MCPStreamsEndpoint = class {
12779
- constructor(requestExecutor) {
12780
- this.requestExecutor = requestExecutor;
12781
- }
12782
- getById(streamId) {
12783
- return this.requestExecutor.json(`/mcp/streams/${streamId}`, DTOMCPStreamResponse);
12784
- }
12785
- getForUser() {
12786
- return this.requestExecutor.json(`/mcp/streams/user`, DTOMCPStreamResponse);
12787
- }
12788
- updateForUser(body) {
12789
- return this.requestExecutor.json(`/mcp/streams/user`, DTOMCPStreamResponse, {
12790
- method: "PUT",
12791
- body
12792
- });
12793
- }
12794
- };
12795
-
12796
12805
  // src/api/transport/request-executor-error.ts
12797
12806
  var RequestExecutorError = class _RequestExecutorError extends Error {
12798
12807
  constructor(type, message, errorCode, serverErrorType, cause) {