@supernova-studio/model 1.6.6 → 1.6.8

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
@@ -4380,7 +4380,7 @@ var DocumentationPageDependencies = z114.object({
4380
4380
  propertyPersistentIds: z114.set(z114.string()),
4381
4381
  themePersistentIds: z114.set(z114.string()),
4382
4382
  documentationPagePersistentIds: z114.set(z114.string()),
4383
- storybookEntriesStoryIds: z114.set(z114.string())
4383
+ storybookEntriesStoryIds: z114.array(z114.string())
4384
4384
  });
4385
4385
 
4386
4386
  // src/dsm/documentation/page.ts
@@ -5118,8 +5118,9 @@ var StorybookEntryOrigin = z154.object({
5118
5118
  id: z154.string(),
5119
5119
  type: z154.enum(["story", "docs"]),
5120
5120
  name: z154.string(),
5121
- title: z154.string()
5121
+ title: z154.string(),
5122
5122
  // Same as 'kind' for v3
5123
+ index: z154.number().optional()
5123
5124
  });
5124
5125
  var StorybookEntry = z154.object({
5125
5126
  id: z154.string(),
@@ -5252,7 +5253,13 @@ var ExportDestinationsMapUpdate = z157.object({
5252
5253
  });
5253
5254
 
5254
5255
  // src/export/pipeline.ts
5255
- var PipelineEventType = z158.enum(["OnVersionReleased", "OnHeadChanged", "OnSourceUpdated", "None"]);
5256
+ var PipelineEventType = z158.enum([
5257
+ "OnVersionReleased",
5258
+ "OnHeadChanged",
5259
+ "OnSourceUpdated",
5260
+ "OnDocumentationPublished",
5261
+ "None"
5262
+ ]);
5256
5263
  var PipelineDestinationGitType = z158.enum(["Github", "Gitlab", "Bitbucket", "Azure"]);
5257
5264
  var PipelineDestinationExtraType = z158.enum(["WebhookUrl", "S3", "Documentation"]);
5258
5265
  var PipelineDestinationType = z158.union([PipelineDestinationGitType, PipelineDestinationExtraType]);
@@ -5595,7 +5602,7 @@ var WorkspaceInviteEmailData = z172.object({
5595
5602
  });
5596
5603
 
5597
5604
  // src/events/base.ts
5598
- import { z as z175 } from "zod";
5605
+ import { z as z176 } from "zod";
5599
5606
 
5600
5607
  // src/events/data-source-imported.ts
5601
5608
  import { z as z173 } from "zod";
@@ -5614,48 +5621,61 @@ var EventVersionReleased = z174.object({
5614
5621
  versionId: z174.string()
5615
5622
  });
5616
5623
 
5624
+ // src/events/documentation-published.ts
5625
+ import { z as z175 } from "zod";
5626
+ var EventDocumentationPublished = z175.object({
5627
+ type: z175.literal("DocumentationPublished"),
5628
+ workspaceId: z175.string(),
5629
+ designSystemId: z175.string(),
5630
+ versionId: z175.string()
5631
+ });
5632
+
5617
5633
  // src/events/base.ts
5618
- var Event = z175.discriminatedUnion("type", [EventVersionReleased, EventDataSourceImported]);
5634
+ var Event = z176.discriminatedUnion("type", [
5635
+ EventVersionReleased,
5636
+ EventDataSourceImported,
5637
+ EventDocumentationPublished
5638
+ ]);
5619
5639
 
5620
5640
  // src/export/export-runner/export-context.ts
5621
- import { z as z176 } from "zod";
5622
- var ExportJobDocumentationContext = z176.object({
5623
- isSingleVersionDocs: z176.boolean(),
5624
- versionSlug: z176.string(),
5641
+ import { z as z177 } from "zod";
5642
+ var ExportJobDocumentationContext = z177.object({
5643
+ isSingleVersionDocs: z177.boolean(),
5644
+ versionSlug: z177.string(),
5625
5645
  environment: PublishedDocEnvironment
5626
5646
  });
5627
- var ExportJobContext = z176.object({
5628
- apiUrl: z176.string(),
5629
- accessToken: z176.string(),
5630
- designSystemId: z176.string(),
5631
- designSystemName: z176.string(),
5632
- exporterId: z176.string(),
5633
- versionId: z176.string(),
5634
- brandId: z176.string().optional(),
5635
- themeId: z176.string().optional(),
5636
- themePersistentIds: z176.string().array().optional(),
5637
- previewMode: z176.boolean().optional(),
5638
- exporterName: z176.string(),
5647
+ var ExportJobContext = z177.object({
5648
+ apiUrl: z177.string(),
5649
+ accessToken: z177.string(),
5650
+ designSystemId: z177.string(),
5651
+ designSystemName: z177.string(),
5652
+ exporterId: z177.string(),
5653
+ versionId: z177.string(),
5654
+ brandId: z177.string().optional(),
5655
+ themeId: z177.string().optional(),
5656
+ themePersistentIds: z177.string().array().optional(),
5657
+ previewMode: z177.boolean().optional(),
5658
+ exporterName: z177.string(),
5639
5659
  documentation: ExportJobDocumentationContext.optional()
5640
5660
  });
5641
- var ExportJobExporterConfiguration = z176.object({
5642
- exporterPackageUrl: z176.string(),
5661
+ var ExportJobExporterConfiguration = z177.object({
5662
+ exporterPackageUrl: z177.string(),
5643
5663
  exporterPropertyValues: ExporterConfigurationPropertyValue.array(),
5644
5664
  exporterPropertyValuesV2: ExporterPropertyValueMap.optional()
5645
5665
  });
5646
5666
 
5647
5667
  // src/export/export-runner/exporter-payload.ts
5648
- import { z as z177 } from "zod";
5649
- var ExporterFunctionPayload = z177.object({
5650
- exportJobId: z177.string(),
5651
- exportContextId: z177.string(),
5652
- designSystemId: z177.string(),
5653
- workspaceId: z177.string()
5668
+ import { z as z178 } from "zod";
5669
+ var ExporterFunctionPayload = z178.object({
5670
+ exportJobId: z178.string(),
5671
+ exportContextId: z178.string(),
5672
+ designSystemId: z178.string(),
5673
+ workspaceId: z178.string()
5654
5674
  });
5655
5675
 
5656
5676
  // src/export/export-jobs.ts
5657
- import { z as z178 } from "zod";
5658
- var ExportJobDestinationType = z178.enum([
5677
+ import { z as z179 } from "zod";
5678
+ var ExportJobDestinationType = z179.enum([
5659
5679
  "s3",
5660
5680
  "webhookUrl",
5661
5681
  "github",
@@ -5664,30 +5684,30 @@ var ExportJobDestinationType = z178.enum([
5664
5684
  "gitlab",
5665
5685
  "bitbucket"
5666
5686
  ]);
5667
- var ExportJobStatus = z178.enum(["InProgress", "Success", "Failed", "Timeout"]);
5668
- var ExportJobLogEntryType = z178.enum(["success", "info", "warning", "error", "user"]);
5669
- var ExportJobLogEntry = z178.object({
5670
- id: z178.string().optional(),
5671
- time: z178.coerce.date(),
5687
+ var ExportJobStatus = z179.enum(["InProgress", "Success", "Failed", "Timeout"]);
5688
+ var ExportJobLogEntryType = z179.enum(["success", "info", "warning", "error", "user"]);
5689
+ var ExportJobLogEntry = z179.object({
5690
+ id: z179.string().optional(),
5691
+ time: z179.coerce.date(),
5672
5692
  type: ExportJobLogEntryType,
5673
- message: z178.string()
5693
+ message: z179.string()
5674
5694
  });
5675
- var ExportJobPullRequestDestinationResult = z178.object({
5676
- pullRequestUrl: z178.string()
5695
+ var ExportJobPullRequestDestinationResult = z179.object({
5696
+ pullRequestUrl: z179.string()
5677
5697
  });
5678
- var ExportJobS3DestinationResult = z178.object({
5679
- bucket: z178.string(),
5680
- urlPrefix: z178.string().optional(),
5681
- path: z178.string(),
5682
- files: z178.array(z178.string()),
5683
- url: nullishToOptional(z178.string()),
5684
- urls: nullishToOptional(z178.string().array())
5698
+ var ExportJobS3DestinationResult = z179.object({
5699
+ bucket: z179.string(),
5700
+ urlPrefix: z179.string().optional(),
5701
+ path: z179.string(),
5702
+ files: z179.array(z179.string()),
5703
+ url: nullishToOptional(z179.string()),
5704
+ urls: nullishToOptional(z179.string().array())
5685
5705
  });
5686
- var ExportJobDocsDestinationResult = z178.object({
5687
- url: z178.string()
5706
+ var ExportJobDocsDestinationResult = z179.object({
5707
+ url: z179.string()
5688
5708
  });
5689
- var ExportJobResult = z178.object({
5690
- error: z178.string().optional(),
5709
+ var ExportJobResult = z179.object({
5710
+ error: z179.string().optional(),
5691
5711
  s3: nullishToOptional(ExportJobS3DestinationResult),
5692
5712
  github: nullishToOptional(ExportJobPullRequestDestinationResult),
5693
5713
  azure: nullishToOptional(ExportJobPullRequestDestinationResult),
@@ -5696,24 +5716,24 @@ var ExportJobResult = z178.object({
5696
5716
  sndocs: nullishToOptional(ExportJobDocsDestinationResult),
5697
5717
  logs: nullishToOptional(ExportJobLogEntry.array())
5698
5718
  });
5699
- var ExportJob = z178.object({
5700
- id: z178.string(),
5701
- createdAt: z178.coerce.date(),
5702
- finishedAt: z178.coerce.date().optional(),
5703
- designSystemId: z178.string(),
5704
- designSystemVersionId: z178.string(),
5705
- workspaceId: z178.string(),
5706
- scheduleId: z178.string().nullish(),
5707
- exporterId: z178.string(),
5708
- brandId: z178.string().optional(),
5709
- themeId: z178.string().optional(),
5710
- themePersistentIds: z178.string().array().optional(),
5711
- estimatedExecutionTime: z178.number().optional(),
5719
+ var ExportJob = z179.object({
5720
+ id: z179.string(),
5721
+ createdAt: z179.coerce.date(),
5722
+ finishedAt: z179.coerce.date().optional(),
5723
+ designSystemId: z179.string(),
5724
+ designSystemVersionId: z179.string(),
5725
+ workspaceId: z179.string(),
5726
+ scheduleId: z179.string().nullish(),
5727
+ exporterId: z179.string(),
5728
+ brandId: z179.string().optional(),
5729
+ themeId: z179.string().optional(),
5730
+ themePersistentIds: z179.string().array().optional(),
5731
+ estimatedExecutionTime: z179.number().optional(),
5712
5732
  status: ExportJobStatus,
5713
5733
  result: ExportJobResult.optional(),
5714
- createdByUserId: z178.string().optional(),
5734
+ createdByUserId: z179.string().optional(),
5715
5735
  exporterPropertyValues: ExporterPropertyValueMap.optional(),
5716
- previewMode: z178.boolean().optional(),
5736
+ previewMode: z179.boolean().optional(),
5717
5737
  // Destinations
5718
5738
  ...ExportDestinationsMap.shape
5719
5739
  });
@@ -5727,36 +5747,36 @@ var ExportJobFindByFilter = ExportJob.pick({
5727
5747
  themeId: true,
5728
5748
  brandId: true
5729
5749
  }).extend({
5730
- destinations: z178.array(ExportJobDestinationType),
5750
+ destinations: z179.array(ExportJobDestinationType),
5731
5751
  docsEnvironment: PublishedDocEnvironment
5732
5752
  }).partial();
5733
5753
 
5734
5754
  // src/export/exporter-list-query.ts
5735
- import { z as z179 } from "zod";
5736
- var ExporterType2 = z179.enum(["documentation", "code"]);
5737
- var ListExporterQuery = z179.object({
5738
- limit: z179.number().optional(),
5739
- offset: z179.number().optional(),
5755
+ import { z as z180 } from "zod";
5756
+ var ExporterType2 = z180.enum(["documentation", "code"]);
5757
+ var ListExporterQuery = z180.object({
5758
+ limit: z180.number().optional(),
5759
+ offset: z180.number().optional(),
5740
5760
  type: ExporterType2.optional(),
5741
- search: z179.string().optional()
5761
+ search: z180.string().optional()
5742
5762
  });
5743
5763
 
5744
5764
  // src/export/exporter-workspace-membership-role.ts
5745
- import { z as z180 } from "zod";
5746
- var ExporterWorkspaceMembershipRole = z180.enum(["Owner", "OwnerArchived", "User"]);
5765
+ import { z as z181 } from "zod";
5766
+ var ExporterWorkspaceMembershipRole = z181.enum(["Owner", "OwnerArchived", "User"]);
5747
5767
 
5748
5768
  // src/export/exporter-workspace-membership.ts
5749
- import { z as z181 } from "zod";
5750
- var ExporterWorkspaceMembership = z181.object({
5751
- id: z181.string(),
5752
- workspaceId: z181.string(),
5753
- exporterId: z181.string(),
5769
+ import { z as z182 } from "zod";
5770
+ var ExporterWorkspaceMembership = z182.object({
5771
+ id: z182.string(),
5772
+ workspaceId: z182.string(),
5773
+ exporterId: z182.string(),
5754
5774
  role: ExporterWorkspaceMembershipRole
5755
5775
  });
5756
5776
 
5757
5777
  // src/feature-flags/feature-flags.ts
5758
- import { z as z182 } from "zod";
5759
- var FlaggedFeature = z182.enum([
5778
+ import { z as z183 } from "zod";
5779
+ var FlaggedFeature = z183.enum([
5760
5780
  "FigmaImporterV2",
5761
5781
  "DisableImporter",
5762
5782
  "VariablesOrder",
@@ -5767,20 +5787,20 @@ var FlaggedFeature = z182.enum([
5767
5787
  "TypographyUseFontStyle",
5768
5788
  "FigmaImporterV3"
5769
5789
  ]);
5770
- var FeatureFlagMap = z182.record(FlaggedFeature, z182.boolean());
5771
- var FeatureFlag = z182.object({
5772
- id: z182.string(),
5790
+ var FeatureFlagMap = z183.record(FlaggedFeature, z183.boolean());
5791
+ var FeatureFlag = z183.object({
5792
+ id: z183.string(),
5773
5793
  feature: FlaggedFeature,
5774
- createdAt: z182.coerce.date(),
5775
- enabled: z182.boolean(),
5776
- designSystemId: z182.string().optional()
5794
+ createdAt: z183.coerce.date(),
5795
+ enabled: z183.boolean(),
5796
+ designSystemId: z183.string().optional()
5777
5797
  });
5778
5798
 
5779
5799
  // src/integrations/external-oauth-request.ts
5780
- import { z as z184 } from "zod";
5800
+ import { z as z185 } from "zod";
5781
5801
 
5782
5802
  // src/integrations/oauth-providers.ts
5783
- import { z as z183 } from "zod";
5803
+ import { z as z184 } from "zod";
5784
5804
  var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
5785
5805
  OAuthProviderNames2["Figma"] = "figma";
5786
5806
  OAuthProviderNames2["Azure"] = "azure";
@@ -5789,128 +5809,128 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
5789
5809
  OAuthProviderNames2["Bitbucket"] = "bitbucket";
5790
5810
  return OAuthProviderNames2;
5791
5811
  })(OAuthProviderNames || {});
5792
- var OAuthProviderSchema = z183.nativeEnum(OAuthProviderNames);
5812
+ var OAuthProviderSchema = z184.nativeEnum(OAuthProviderNames);
5793
5813
  var OAuthProvider = OAuthProviderSchema.enum;
5794
5814
 
5795
5815
  // src/integrations/external-oauth-request.ts
5796
- var ExternalOAuthRequest = z184.object({
5797
- id: z184.string(),
5816
+ var ExternalOAuthRequest = z185.object({
5817
+ id: z185.string(),
5798
5818
  provider: OAuthProviderSchema,
5799
- userId: z184.string(),
5800
- state: z184.string(),
5801
- createdAt: z184.coerce.date()
5819
+ userId: z185.string(),
5820
+ state: z185.string(),
5821
+ createdAt: z185.coerce.date()
5802
5822
  });
5803
5823
 
5804
5824
  // src/integrations/git.ts
5805
- import { z as z185 } from "zod";
5806
- var GitObjectsQuery = z185.object({
5807
- organization: z185.string().optional(),
5825
+ import { z as z186 } from "zod";
5826
+ var GitObjectsQuery = z186.object({
5827
+ organization: z186.string().optional(),
5808
5828
  // Azure Organization | Bitbucket Workspace slug | Gitlab Group | Github Account (User or Organization)
5809
- project: z185.string().optional(),
5829
+ project: z186.string().optional(),
5810
5830
  // Only for Bitbucket and Azure
5811
- repository: z185.string().optional(),
5831
+ repository: z186.string().optional(),
5812
5832
  // For all providers. For Gitlab, it's called "project".
5813
- branch: z185.string().optional(),
5833
+ branch: z186.string().optional(),
5814
5834
  // For all providers.
5815
- user: z185.string().optional()
5835
+ user: z186.string().optional()
5816
5836
  // Gitlab user
5817
5837
  });
5818
- var GitOrganization = z185.object({
5819
- id: z185.string(),
5820
- name: z185.string(),
5821
- url: z185.string(),
5822
- slug: z185.string()
5838
+ var GitOrganization = z186.object({
5839
+ id: z186.string(),
5840
+ name: z186.string(),
5841
+ url: z186.string(),
5842
+ slug: z186.string()
5823
5843
  });
5824
- var GitProject = z185.object({
5825
- id: z185.string(),
5826
- name: z185.string(),
5827
- url: z185.string(),
5828
- slug: z185.string()
5844
+ var GitProject = z186.object({
5845
+ id: z186.string(),
5846
+ name: z186.string(),
5847
+ url: z186.string(),
5848
+ slug: z186.string()
5829
5849
  });
5830
- var GitRepository = z185.object({
5831
- id: z185.string(),
5832
- name: z185.string(),
5833
- url: z185.string(),
5834
- slug: z185.string(),
5850
+ var GitRepository = z186.object({
5851
+ id: z186.string(),
5852
+ name: z186.string(),
5853
+ url: z186.string(),
5854
+ slug: z186.string(),
5835
5855
  /**
5836
5856
  * Can be undefined when:
5837
5857
  * - there are no branches in the repository yet
5838
5858
  * - Git provider doesn't expose this information on a repository via their API
5839
5859
  */
5840
- defaultBranch: z185.string().optional()
5860
+ defaultBranch: z186.string().optional()
5841
5861
  });
5842
- var GitBranch = z185.object({
5843
- name: z185.string(),
5844
- lastCommitId: z185.string()
5862
+ var GitBranch = z186.object({
5863
+ name: z186.string(),
5864
+ lastCommitId: z186.string()
5845
5865
  });
5846
5866
 
5847
5867
  // src/integrations/oauth-token.ts
5848
- import { z as z186 } from "zod";
5849
- var IntegrationTokenSchemaOld = z186.object({
5850
- id: z186.string(),
5868
+ import { z as z187 } from "zod";
5869
+ var IntegrationTokenSchemaOld = z187.object({
5870
+ id: z187.string(),
5851
5871
  provider: OAuthProviderSchema,
5852
- scope: z186.string(),
5853
- userId: z186.string(),
5854
- accessToken: z186.string(),
5855
- refreshToken: z186.string(),
5856
- expiresAt: z186.coerce.date(),
5857
- externalUserId: z186.string().nullish()
5872
+ scope: z187.string(),
5873
+ userId: z187.string(),
5874
+ accessToken: z187.string(),
5875
+ refreshToken: z187.string(),
5876
+ expiresAt: z187.coerce.date(),
5877
+ externalUserId: z187.string().nullish()
5858
5878
  });
5859
5879
 
5860
5880
  // src/integrations/workspace-oauth-requests.ts
5861
- import { z as z187 } from "zod";
5862
- var WorkspaceOAuthRequestSchema = z187.object({
5863
- id: z187.string(),
5864
- workspaceId: z187.string(),
5881
+ import { z as z188 } from "zod";
5882
+ var WorkspaceOAuthRequestSchema = z188.object({
5883
+ id: z188.string(),
5884
+ workspaceId: z188.string(),
5865
5885
  provider: OAuthProviderSchema,
5866
- userId: z187.string(),
5867
- createdAt: z187.coerce.date()
5886
+ userId: z188.string(),
5887
+ createdAt: z188.coerce.date()
5868
5888
  });
5869
5889
 
5870
5890
  // src/npm/npm-package.ts
5871
- import { z as z188 } from "zod";
5872
- var AnyRecord = z188.record(z188.any());
5891
+ import { z as z189 } from "zod";
5892
+ var AnyRecord = z189.record(z189.any());
5873
5893
  var NpmPackageVersionDist = AnyRecord.and(
5874
- z188.object({
5875
- tarball: z188.string()
5894
+ z189.object({
5895
+ tarball: z189.string()
5876
5896
  })
5877
5897
  );
5878
5898
  var NpmPackageVersion = AnyRecord.and(
5879
- z188.object({
5899
+ z189.object({
5880
5900
  dist: NpmPackageVersionDist
5881
5901
  })
5882
5902
  );
5883
5903
  var NpmPackage = AnyRecord.and(
5884
- z188.object({
5885
- _id: z188.string(),
5886
- name: z188.string(),
5904
+ z189.object({
5905
+ _id: z189.string(),
5906
+ name: z189.string(),
5887
5907
  // e.g. "latest": "1.2.3"
5888
- "dist-tags": z188.record(z188.string(), z188.string()),
5908
+ "dist-tags": z189.record(z189.string(), z189.string()),
5889
5909
  // "1.2.3": {...}
5890
- versions: z188.record(NpmPackageVersion)
5910
+ versions: z189.record(NpmPackageVersion)
5891
5911
  })
5892
5912
  );
5893
5913
 
5894
5914
  // src/npm/npm-proxy-token-payload.ts
5895
- import { z as z189 } from "zod";
5896
- var NpmProxyTokenPayload = z189.object({
5897
- npmProxyRegistryConfigId: z189.string()
5915
+ import { z as z190 } from "zod";
5916
+ var NpmProxyTokenPayload = z190.object({
5917
+ npmProxyRegistryConfigId: z190.string()
5898
5918
  });
5899
5919
 
5900
5920
  // src/tokens/personal-access-token.ts
5901
- import { z as z190 } from "zod";
5902
- var PersonalAccessToken = z190.object({
5903
- id: z190.string(),
5904
- userId: z190.string(),
5905
- workspaceId: z190.string().optional(),
5906
- designSystemId: z190.string().optional(),
5921
+ import { z as z191 } from "zod";
5922
+ var PersonalAccessToken = z191.object({
5923
+ id: z191.string(),
5924
+ userId: z191.string(),
5925
+ workspaceId: z191.string().optional(),
5926
+ designSystemId: z191.string().optional(),
5907
5927
  workspaceRole: WorkspaceRoleSchema.optional(),
5908
- name: z190.string(),
5909
- hidden: z190.boolean(),
5910
- token: z190.string(),
5911
- scope: z190.string().optional(),
5912
- createdAt: z190.coerce.date(),
5913
- expireAt: z190.coerce.date().optional()
5928
+ name: z191.string(),
5929
+ hidden: z191.boolean(),
5930
+ token: z191.string(),
5931
+ scope: z191.string().optional(),
5932
+ createdAt: z191.coerce.date(),
5933
+ expireAt: z191.coerce.date().optional()
5914
5934
  });
5915
5935
  export {
5916
5936
  Address,
@@ -6099,6 +6119,7 @@ export {
6099
6119
  Entity,
6100
6120
  Event,
6101
6121
  EventDataSourceImported,
6122
+ EventDocumentationPublished,
6102
6123
  EventVersionReleased,
6103
6124
  ExportDestinationsMap,
6104
6125
  ExportDestinationsMapUpdate,