@supernova-studio/model 0.45.0 → 0.45.1

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
@@ -781,6 +781,7 @@ var PageBlockShortcut = z34.object({
781
781
  description: nullishToOptional(z34.string()),
782
782
  asset: nullishToOptional(PageBlockAsset),
783
783
  documentationItemId: nullishToOptional(z34.string()),
784
+ pageHeadingId: nullishToOptional(z34.string()),
784
785
  url: nullishToOptional(z34.string()),
785
786
  openInNewTab: nullishToOptional(z34.boolean()),
786
787
  urlPreview: nullishToOptional(PageBlockUrlPreview),
@@ -1217,8 +1218,8 @@ var defaultDocumentationItemHeaderV2 = {
1217
1218
  // src/dsm/elements/data/documentation-v2.ts
1218
1219
  var DocumentationItemConfigurationV2 = z41.object({
1219
1220
  showSidebar: z41.boolean(),
1220
- isPrivate: z41.boolean(),
1221
- isHidden: z41.boolean(),
1221
+ isPrivate: z41.boolean().optional(),
1222
+ isHidden: z41.boolean().optional(),
1222
1223
  header: DocumentationItemHeaderV2
1223
1224
  });
1224
1225
  var defaultDocumentationItemConfigurationV2 = {
@@ -3368,13 +3369,13 @@ var ExternalOAuthRequest = z137.object({
3368
3369
 
3369
3370
  // src/integrations/integration.ts
3370
3371
  import { z as z138 } from "zod";
3371
- var IntegrationCredentialsType = z138.enum(["OAuth2", "PAT"]);
3372
+ var IntegrationCredentialsType = z138.enum(["OAuth2", "PAT", "GithubApp"]);
3372
3373
  var IntegrationCredentialsProfile = z138.object({
3373
3374
  id: z138.string(),
3374
3375
  username: z138.string().optional(),
3375
3376
  avatarUrl: z138.string().optional()
3376
3377
  });
3377
- var IntegrationCredentialsSchema = z138.object({
3378
+ var IntegrationCredentials = z138.object({
3378
3379
  id: z138.string(),
3379
3380
  type: IntegrationCredentialsType,
3380
3381
  integrationId: z138.string(),
@@ -3382,7 +3383,8 @@ var IntegrationCredentialsSchema = z138.object({
3382
3383
  userId: z138.string(),
3383
3384
  createdAt: z138.coerce.date(),
3384
3385
  refreshToken: z138.string().optional(),
3385
- profile: IntegrationCredentialsProfile.optional()
3386
+ profile: IntegrationCredentialsProfile.optional(),
3387
+ customUrl: z138.string().optional()
3386
3388
  });
3387
3389
  var IntegrationType = z138.enum(["Figma", "Github", "Gitlab", "Bitbucket", "Azure"]);
3388
3390
  var Integration = z138.object({
@@ -3390,7 +3392,29 @@ var Integration = z138.object({
3390
3392
  workspaceId: z138.string(),
3391
3393
  type: IntegrationType,
3392
3394
  createdAt: z138.coerce.date(),
3393
- integrationCredentials: z138.array(IntegrationCredentialsSchema).optional()
3395
+ integrationCredentials: z138.array(IntegrationCredentials).optional()
3396
+ });
3397
+ var forbiddenCustomUrldomainList = ["github.com", "gitlab.com", "bitbucket.org", "figma.com", "dev.azure.com"];
3398
+ var IntegrationTokenResponse = z138.object({
3399
+ access_token: z138.string(),
3400
+ refresh_token: z138.string().optional(),
3401
+ expires_in: z138.number().optional(),
3402
+ token_type: z138.string().optional(),
3403
+ custom_url: z138.string().optional().refine((value) => {
3404
+ if (!value)
3405
+ return true;
3406
+ if (forbiddenCustomUrldomainList.some((domain) => value.includes(domain)))
3407
+ return false;
3408
+ return true;
3409
+ }, "Custom URL validation failed")
3410
+ }).transform((data) => {
3411
+ return {
3412
+ accessToken: data.access_token,
3413
+ refreshToken: data.refresh_token,
3414
+ expiresIn: data.expires_in,
3415
+ tokenType: data.token_type,
3416
+ customUrl: data.custom_url
3417
+ };
3394
3418
  });
3395
3419
 
3396
3420
  // src/integrations/oauth-token.ts
@@ -4486,9 +4510,10 @@ export {
4486
4510
  ImportedFigmaSourceData,
4487
4511
  Integration,
4488
4512
  IntegrationAuthType,
4513
+ IntegrationCredentials,
4489
4514
  IntegrationCredentialsProfile,
4490
- IntegrationCredentialsSchema,
4491
4515
  IntegrationCredentialsType,
4516
+ IntegrationTokenResponse,
4492
4517
  IntegrationTokenSchema,
4493
4518
  IntegrationType,
4494
4519
  IntegrationUserInfo,