@supernova-studio/model 1.6.5 → 1.6.7

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