@supernova-studio/model 0.54.34 → 0.54.35

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
@@ -4903,64 +4903,76 @@ var UserSession = z154.object({
4903
4903
  user: User.nullable()
4904
4904
  });
4905
4905
 
4906
+ // src/emails/design-system-invite.ts
4907
+ import { z as z155 } from "zod";
4908
+ var DesignSystemInviteEmailRecipient = z155.object({
4909
+ email: z155.string(),
4910
+ role: WorkspaceRoleSchema
4911
+ });
4912
+ var DesignSystemInviteEmailData = z155.object({
4913
+ designSystem: DesignSystem,
4914
+ invitedBy: User,
4915
+ documentationDomain: z155.string().optional()
4916
+ });
4917
+
4906
4918
  // src/events/base.ts
4907
- import { z as z157 } from "zod";
4919
+ import { z as z158 } from "zod";
4908
4920
 
4909
4921
  // src/events/data-source-imported.ts
4910
- import { z as z155 } from "zod";
4911
- var EventDataSourceImported = z155.object({
4912
- type: z155.literal("DataSourceImported"),
4913
- workspaceId: z155.string(),
4914
- designSystemId: z155.string()
4922
+ import { z as z156 } from "zod";
4923
+ var EventDataSourceImported = z156.object({
4924
+ type: z156.literal("DataSourceImported"),
4925
+ workspaceId: z156.string(),
4926
+ designSystemId: z156.string()
4915
4927
  });
4916
4928
 
4917
4929
  // src/events/version-released.ts
4918
- import { z as z156 } from "zod";
4919
- var EventVersionReleased = z156.object({
4920
- type: z156.literal("DesignSystemVersionReleased"),
4921
- workspaceId: z156.string(),
4922
- designSystemId: z156.string(),
4923
- versionId: z156.string()
4930
+ import { z as z157 } from "zod";
4931
+ var EventVersionReleased = z157.object({
4932
+ type: z157.literal("DesignSystemVersionReleased"),
4933
+ workspaceId: z157.string(),
4934
+ designSystemId: z157.string(),
4935
+ versionId: z157.string()
4924
4936
  });
4925
4937
 
4926
4938
  // src/events/base.ts
4927
- var Event = z157.discriminatedUnion("type", [EventVersionReleased, EventDataSourceImported]);
4939
+ var Event = z158.discriminatedUnion("type", [EventVersionReleased, EventDataSourceImported]);
4928
4940
 
4929
4941
  // src/export/export-runner/export-context.ts
4930
- import { z as z158 } from "zod";
4931
- var ExportJobDocumentationContext = z158.object({
4932
- isSingleVersionDocs: z158.boolean(),
4933
- versionSlug: z158.string(),
4942
+ import { z as z159 } from "zod";
4943
+ var ExportJobDocumentationContext = z159.object({
4944
+ isSingleVersionDocs: z159.boolean(),
4945
+ versionSlug: z159.string(),
4934
4946
  environment: PublishedDocEnvironment
4935
4947
  });
4936
- var ExportJobContext = z158.object({
4937
- apiUrl: z158.string(),
4938
- accessToken: z158.string(),
4939
- designSystemId: z158.string(),
4940
- designSystemName: z158.string(),
4941
- exporterId: z158.string(),
4942
- versionId: z158.string(),
4943
- brandId: z158.string().optional(),
4944
- themeId: z158.string().optional(),
4945
- themePersistentIds: z158.string().array().optional(),
4946
- exporterName: z158.string(),
4947
- exporterPackageUrl: z158.string(),
4948
+ var ExportJobContext = z159.object({
4949
+ apiUrl: z159.string(),
4950
+ accessToken: z159.string(),
4951
+ designSystemId: z159.string(),
4952
+ designSystemName: z159.string(),
4953
+ exporterId: z159.string(),
4954
+ versionId: z159.string(),
4955
+ brandId: z159.string().optional(),
4956
+ themeId: z159.string().optional(),
4957
+ themePersistentIds: z159.string().array().optional(),
4958
+ exporterName: z159.string(),
4959
+ exporterPackageUrl: z159.string(),
4948
4960
  exporterPropertyValues: ExporterPropertyValue.array(),
4949
4961
  documentation: ExportJobDocumentationContext.optional()
4950
4962
  });
4951
4963
 
4952
4964
  // src/export/export-runner/exporter-payload.ts
4953
- import { z as z159 } from "zod";
4954
- var ExporterFunctionPayload = z159.object({
4955
- exportJobId: z159.string(),
4956
- exportContextId: z159.string(),
4957
- designSystemId: z159.string(),
4958
- workspaceId: z159.string()
4965
+ import { z as z160 } from "zod";
4966
+ var ExporterFunctionPayload = z160.object({
4967
+ exportJobId: z160.string(),
4968
+ exportContextId: z160.string(),
4969
+ designSystemId: z160.string(),
4970
+ workspaceId: z160.string()
4959
4971
  });
4960
4972
 
4961
4973
  // src/export/export-jobs.ts
4962
- import { z as z160 } from "zod";
4963
- var ExportJobDestinationType = z160.enum([
4974
+ import { z as z161 } from "zod";
4975
+ var ExportJobDestinationType = z161.enum([
4964
4976
  "s3",
4965
4977
  "webhookUrl",
4966
4978
  "github",
@@ -4969,30 +4981,30 @@ var ExportJobDestinationType = z160.enum([
4969
4981
  "gitlab",
4970
4982
  "bitbucket"
4971
4983
  ]);
4972
- var ExportJobStatus = z160.enum(["InProgress", "Success", "Failed", "Timeout"]);
4973
- var ExportJobLogEntryType = z160.enum(["success", "info", "warning", "error", "user"]);
4974
- var ExportJobLogEntry = z160.object({
4975
- id: z160.string().optional(),
4976
- time: z160.coerce.date(),
4984
+ var ExportJobStatus = z161.enum(["InProgress", "Success", "Failed", "Timeout"]);
4985
+ var ExportJobLogEntryType = z161.enum(["success", "info", "warning", "error", "user"]);
4986
+ var ExportJobLogEntry = z161.object({
4987
+ id: z161.string().optional(),
4988
+ time: z161.coerce.date(),
4977
4989
  type: ExportJobLogEntryType,
4978
- message: z160.string()
4990
+ message: z161.string()
4979
4991
  });
4980
- var ExportJobPullRequestDestinationResult = z160.object({
4981
- pullRequestUrl: z160.string()
4992
+ var ExportJobPullRequestDestinationResult = z161.object({
4993
+ pullRequestUrl: z161.string()
4982
4994
  });
4983
- var ExportJobS3DestinationResult = z160.object({
4984
- bucket: z160.string(),
4985
- urlPrefix: z160.string().optional(),
4986
- path: z160.string(),
4987
- files: z160.array(z160.string()),
4988
- url: nullishToOptional(z160.string()),
4989
- urls: nullishToOptional(z160.string().array())
4995
+ var ExportJobS3DestinationResult = z161.object({
4996
+ bucket: z161.string(),
4997
+ urlPrefix: z161.string().optional(),
4998
+ path: z161.string(),
4999
+ files: z161.array(z161.string()),
5000
+ url: nullishToOptional(z161.string()),
5001
+ urls: nullishToOptional(z161.string().array())
4990
5002
  });
4991
- var ExportJobDocsDestinationResult = z160.object({
4992
- url: z160.string()
5003
+ var ExportJobDocsDestinationResult = z161.object({
5004
+ url: z161.string()
4993
5005
  });
4994
- var ExportJobResult = z160.object({
4995
- error: z160.string().optional(),
5006
+ var ExportJobResult = z161.object({
5007
+ error: z161.string().optional(),
4996
5008
  s3: nullishToOptional(ExportJobS3DestinationResult),
4997
5009
  github: nullishToOptional(ExportJobPullRequestDestinationResult),
4998
5010
  azure: nullishToOptional(ExportJobPullRequestDestinationResult),
@@ -5001,22 +5013,22 @@ var ExportJobResult = z160.object({
5001
5013
  sndocs: nullishToOptional(ExportJobDocsDestinationResult),
5002
5014
  logs: nullishToOptional(ExportJobLogEntry.array())
5003
5015
  });
5004
- var ExportJob = z160.object({
5005
- id: z160.string(),
5006
- createdAt: z160.coerce.date(),
5007
- finishedAt: z160.coerce.date().optional(),
5008
- designSystemId: z160.string(),
5009
- designSystemVersionId: z160.string(),
5010
- workspaceId: z160.string(),
5011
- scheduleId: z160.string().nullish(),
5012
- exporterId: z160.string(),
5013
- brandId: z160.string().optional(),
5014
- themeId: z160.string().optional(),
5015
- themePersistentIds: z160.string().array().optional(),
5016
- estimatedExecutionTime: z160.number().optional(),
5016
+ var ExportJob = z161.object({
5017
+ id: z161.string(),
5018
+ createdAt: z161.coerce.date(),
5019
+ finishedAt: z161.coerce.date().optional(),
5020
+ designSystemId: z161.string(),
5021
+ designSystemVersionId: z161.string(),
5022
+ workspaceId: z161.string(),
5023
+ scheduleId: z161.string().nullish(),
5024
+ exporterId: z161.string(),
5025
+ brandId: z161.string().optional(),
5026
+ themeId: z161.string().optional(),
5027
+ themePersistentIds: z161.string().array().optional(),
5028
+ estimatedExecutionTime: z161.number().optional(),
5017
5029
  status: ExportJobStatus,
5018
5030
  result: ExportJobResult.optional(),
5019
- createdByUserId: z160.string().optional(),
5031
+ createdByUserId: z161.string().optional(),
5020
5032
  // Destinations
5021
5033
  ...ExportDestinationsMap.shape
5022
5034
  });
@@ -5030,40 +5042,40 @@ var ExportJobFindByFilter = ExportJob.pick({
5030
5042
  themeId: true,
5031
5043
  brandId: true
5032
5044
  }).extend({
5033
- destinations: z160.array(ExportJobDestinationType),
5045
+ destinations: z161.array(ExportJobDestinationType),
5034
5046
  docsEnvironment: PublishedDocEnvironment
5035
5047
  }).partial();
5036
5048
 
5037
5049
  // src/export/exporter-workspace-membership-role.ts
5038
- import { z as z161 } from "zod";
5039
- var ExporterWorkspaceMembershipRole = z161.enum(["Owner", "OwnerArchived", "User"]);
5050
+ import { z as z162 } from "zod";
5051
+ var ExporterWorkspaceMembershipRole = z162.enum(["Owner", "OwnerArchived", "User"]);
5040
5052
 
5041
5053
  // src/export/exporter-workspace-membership.ts
5042
- import { z as z162 } from "zod";
5043
- var ExporterWorkspaceMembership = z162.object({
5044
- id: z162.string(),
5045
- workspaceId: z162.string(),
5046
- exporterId: z162.string(),
5054
+ import { z as z163 } from "zod";
5055
+ var ExporterWorkspaceMembership = z163.object({
5056
+ id: z163.string(),
5057
+ workspaceId: z163.string(),
5058
+ exporterId: z163.string(),
5047
5059
  role: ExporterWorkspaceMembershipRole
5048
5060
  });
5049
5061
 
5050
5062
  // src/feature-flags/feature-flags.ts
5051
- import { z as z163 } from "zod";
5052
- var FlaggedFeature = z163.enum(["FigmaImporterV2", "ShadowOpacityOptional", "DisableImporter", "VariablesOrder"]);
5053
- var FeatureFlagMap = z163.record(FlaggedFeature, z163.boolean());
5054
- var FeatureFlag = z163.object({
5055
- id: z163.string(),
5063
+ import { z as z164 } from "zod";
5064
+ var FlaggedFeature = z164.enum(["FigmaImporterV2", "ShadowOpacityOptional", "DisableImporter", "VariablesOrder"]);
5065
+ var FeatureFlagMap = z164.record(FlaggedFeature, z164.boolean());
5066
+ var FeatureFlag = z164.object({
5067
+ id: z164.string(),
5056
5068
  feature: FlaggedFeature,
5057
- createdAt: z163.coerce.date(),
5058
- enabled: z163.boolean(),
5059
- designSystemId: z163.string().optional()
5069
+ createdAt: z164.coerce.date(),
5070
+ enabled: z164.boolean(),
5071
+ designSystemId: z164.string().optional()
5060
5072
  });
5061
5073
 
5062
5074
  // src/integrations/external-oauth-request.ts
5063
- import { z as z165 } from "zod";
5075
+ import { z as z166 } from "zod";
5064
5076
 
5065
5077
  // src/integrations/oauth-providers.ts
5066
- import { z as z164 } from "zod";
5078
+ import { z as z165 } from "zod";
5067
5079
  var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
5068
5080
  OAuthProviderNames2["Figma"] = "figma";
5069
5081
  OAuthProviderNames2["Azure"] = "azure";
@@ -5072,127 +5084,127 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
5072
5084
  OAuthProviderNames2["Bitbucket"] = "bitbucket";
5073
5085
  return OAuthProviderNames2;
5074
5086
  })(OAuthProviderNames || {});
5075
- var OAuthProviderSchema = z164.nativeEnum(OAuthProviderNames);
5087
+ var OAuthProviderSchema = z165.nativeEnum(OAuthProviderNames);
5076
5088
  var OAuthProvider = OAuthProviderSchema.enum;
5077
5089
 
5078
5090
  // src/integrations/external-oauth-request.ts
5079
- var ExternalOAuthRequest = z165.object({
5080
- id: z165.string(),
5091
+ var ExternalOAuthRequest = z166.object({
5092
+ id: z166.string(),
5081
5093
  provider: OAuthProviderSchema,
5082
- userId: z165.string(),
5083
- state: z165.string(),
5084
- createdAt: z165.coerce.date()
5094
+ userId: z166.string(),
5095
+ state: z166.string(),
5096
+ createdAt: z166.coerce.date()
5085
5097
  });
5086
5098
 
5087
5099
  // src/integrations/git.ts
5088
- import { z as z166 } from "zod";
5089
- var GitObjectsQuery = z166.object({
5090
- organization: z166.string().optional(),
5100
+ import { z as z167 } from "zod";
5101
+ var GitObjectsQuery = z167.object({
5102
+ organization: z167.string().optional(),
5091
5103
  // Azure Organization | Bitbucket Workspace slug | Gitlab Group | Github Account (User or Organization)
5092
- project: z166.string().optional(),
5104
+ project: z167.string().optional(),
5093
5105
  // Only for Bitbucket and Azure
5094
- repository: z166.string().optional(),
5106
+ repository: z167.string().optional(),
5095
5107
  // For all providers. For Gitlab, it's called "project".
5096
- branch: z166.string().optional(),
5108
+ branch: z167.string().optional(),
5097
5109
  // For all providers.
5098
- user: z166.string().optional()
5110
+ user: z167.string().optional()
5099
5111
  // Gitlab user
5100
5112
  });
5101
- var GitOrganization = z166.object({
5102
- id: z166.string(),
5103
- name: z166.string(),
5104
- url: z166.string(),
5105
- slug: z166.string()
5113
+ var GitOrganization = z167.object({
5114
+ id: z167.string(),
5115
+ name: z167.string(),
5116
+ url: z167.string(),
5117
+ slug: z167.string()
5106
5118
  });
5107
- var GitProject = z166.object({
5108
- id: z166.string(),
5109
- name: z166.string(),
5110
- url: z166.string(),
5111
- slug: z166.string()
5119
+ var GitProject = z167.object({
5120
+ id: z167.string(),
5121
+ name: z167.string(),
5122
+ url: z167.string(),
5123
+ slug: z167.string()
5112
5124
  });
5113
- var GitRepository = z166.object({
5114
- id: z166.string(),
5115
- name: z166.string(),
5116
- url: z166.string(),
5117
- slug: z166.string(),
5125
+ var GitRepository = z167.object({
5126
+ id: z167.string(),
5127
+ name: z167.string(),
5128
+ url: z167.string(),
5129
+ slug: z167.string(),
5118
5130
  /**
5119
5131
  * Can be undefined when:
5120
5132
  * - there are no branches in the repository yet
5121
5133
  * - Git provider doesn't expose this information on a repository via their API
5122
5134
  */
5123
- defaultBranch: z166.string().optional()
5135
+ defaultBranch: z167.string().optional()
5124
5136
  });
5125
- var GitBranch = z166.object({
5126
- name: z166.string(),
5127
- lastCommitId: z166.string()
5137
+ var GitBranch = z167.object({
5138
+ name: z167.string(),
5139
+ lastCommitId: z167.string()
5128
5140
  });
5129
5141
 
5130
5142
  // src/integrations/oauth-token.ts
5131
- import { z as z167 } from "zod";
5132
- var IntegrationTokenSchemaOld = z167.object({
5133
- id: z167.string(),
5143
+ import { z as z168 } from "zod";
5144
+ var IntegrationTokenSchemaOld = z168.object({
5145
+ id: z168.string(),
5134
5146
  provider: OAuthProviderSchema,
5135
- scope: z167.string(),
5136
- userId: z167.string(),
5137
- accessToken: z167.string(),
5138
- refreshToken: z167.string(),
5139
- expiresAt: z167.coerce.date(),
5140
- externalUserId: z167.string().nullish()
5147
+ scope: z168.string(),
5148
+ userId: z168.string(),
5149
+ accessToken: z168.string(),
5150
+ refreshToken: z168.string(),
5151
+ expiresAt: z168.coerce.date(),
5152
+ externalUserId: z168.string().nullish()
5141
5153
  });
5142
5154
 
5143
5155
  // src/integrations/workspace-oauth-requests.ts
5144
- import { z as z168 } from "zod";
5145
- var WorkspaceOAuthRequestSchema = z168.object({
5146
- id: z168.string(),
5147
- workspaceId: z168.string(),
5156
+ import { z as z169 } from "zod";
5157
+ var WorkspaceOAuthRequestSchema = z169.object({
5158
+ id: z169.string(),
5159
+ workspaceId: z169.string(),
5148
5160
  provider: OAuthProviderSchema,
5149
- userId: z168.string(),
5150
- createdAt: z168.coerce.date()
5161
+ userId: z169.string(),
5162
+ createdAt: z169.coerce.date()
5151
5163
  });
5152
5164
 
5153
5165
  // src/npm/npm-package.ts
5154
- import { z as z169 } from "zod";
5155
- var AnyRecord = z169.record(z169.any());
5166
+ import { z as z170 } from "zod";
5167
+ var AnyRecord = z170.record(z170.any());
5156
5168
  var NpmPackageVersionDist = AnyRecord.and(
5157
- z169.object({
5158
- tarball: z169.string()
5169
+ z170.object({
5170
+ tarball: z170.string()
5159
5171
  })
5160
5172
  );
5161
5173
  var NpmPackageVersion = AnyRecord.and(
5162
- z169.object({
5174
+ z170.object({
5163
5175
  dist: NpmPackageVersionDist
5164
5176
  })
5165
5177
  );
5166
5178
  var NpmPackage = AnyRecord.and(
5167
- z169.object({
5168
- _id: z169.string(),
5169
- name: z169.string(),
5179
+ z170.object({
5180
+ _id: z170.string(),
5181
+ name: z170.string(),
5170
5182
  // e.g. "latest": "1.2.3"
5171
- "dist-tags": z169.record(z169.string(), z169.string()),
5183
+ "dist-tags": z170.record(z170.string(), z170.string()),
5172
5184
  // "1.2.3": {...}
5173
- versions: z169.record(NpmPackageVersion)
5185
+ versions: z170.record(NpmPackageVersion)
5174
5186
  })
5175
5187
  );
5176
5188
 
5177
5189
  // src/npm/npm-proxy-token-payload.ts
5178
- import { z as z170 } from "zod";
5179
- var NpmProxyTokenPayload = z170.object({
5180
- npmProxyRegistryConfigId: z170.string()
5190
+ import { z as z171 } from "zod";
5191
+ var NpmProxyTokenPayload = z171.object({
5192
+ npmProxyRegistryConfigId: z171.string()
5181
5193
  });
5182
5194
 
5183
5195
  // src/tokens/personal-access-token.ts
5184
- import { z as z171 } from "zod";
5185
- var PersonalAccessToken = z171.object({
5186
- id: z171.string(),
5187
- userId: z171.string(),
5188
- workspaceId: z171.string().optional(),
5196
+ import { z as z172 } from "zod";
5197
+ var PersonalAccessToken = z172.object({
5198
+ id: z172.string(),
5199
+ userId: z172.string(),
5200
+ workspaceId: z172.string().optional(),
5189
5201
  workspaceRole: WorkspaceRoleSchema.optional(),
5190
- name: z171.string(),
5191
- hidden: z171.boolean(),
5192
- token: z171.string(),
5193
- scope: z171.string().optional(),
5194
- createdAt: z171.coerce.date(),
5195
- expireAt: z171.coerce.date().optional()
5202
+ name: z172.string(),
5203
+ hidden: z172.boolean(),
5204
+ token: z172.string(),
5205
+ scope: z172.string().optional(),
5206
+ createdAt: z172.coerce.date(),
5207
+ expireAt: z172.coerce.date().optional()
5196
5208
  });
5197
5209
  export {
5198
5210
  Address,
@@ -5278,6 +5290,8 @@ export {
5278
5290
  DesignSystemElementExportProps,
5279
5291
  DesignSystemInvitation,
5280
5292
  DesignSystemInvite,
5293
+ DesignSystemInviteEmailData,
5294
+ DesignSystemInviteEmailRecipient,
5281
5295
  DesignSystemMembers,
5282
5296
  DesignSystemMembership,
5283
5297
  DesignSystemMembershipUpdates,