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