@supernova-studio/model 0.46.13 → 0.47.0
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.d.mts +1064 -1009
- package/dist/index.d.ts +1064 -1009
- package/dist/index.js +59 -43
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1591 -1575
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/users/index.ts +1 -0
- package/src/users/user-notification-settings.ts +18 -0
- package/src/workspace/workspace-membership.ts +2 -0
package/dist/index.mjs
CHANGED
|
@@ -275,7 +275,7 @@ var CustomDomain = z14.object({
|
|
|
275
275
|
});
|
|
276
276
|
|
|
277
277
|
// src/docs-server/session.ts
|
|
278
|
-
import { z as
|
|
278
|
+
import { z as z23 } from "zod";
|
|
279
279
|
|
|
280
280
|
// src/users/linked-integrations.ts
|
|
281
281
|
import { z as z15 } from "zod";
|
|
@@ -327,224 +327,238 @@ var UserMinified = z18.object({
|
|
|
327
327
|
avatar: z18.string().optional()
|
|
328
328
|
});
|
|
329
329
|
|
|
330
|
-
// src/users/user-
|
|
330
|
+
// src/users/user-notification-settings.ts
|
|
331
331
|
import { z as z19 } from "zod";
|
|
332
|
-
var
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
332
|
+
var LiveblocksNotificationSettings = z19.object({
|
|
333
|
+
sendCommentNotificationEmails: z19.boolean()
|
|
334
|
+
});
|
|
335
|
+
var UserNotificationSettings = z19.object({
|
|
336
|
+
liveblocksNotificationSettings: LiveblocksNotificationSettings
|
|
337
|
+
});
|
|
338
|
+
var defaultNotificationSettings = {
|
|
339
|
+
liveblocksNotificationSettings: {
|
|
340
|
+
sendCommentNotificationEmails: true
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
// src/users/user-profile.ts
|
|
345
|
+
import { z as z20 } from "zod";
|
|
346
|
+
var UserOnboardingDepartment = z20.enum(["Design", "Engineering", "Product", "Brand", "Other"]);
|
|
347
|
+
var UserOnboardingJobLevel = z20.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
348
|
+
var UserOnboarding = z20.object({
|
|
349
|
+
companyName: z20.string().optional(),
|
|
350
|
+
numberOfPeopleInOrg: z20.string().optional(),
|
|
351
|
+
numberOfPeopleInDesignTeam: z20.string().optional(),
|
|
338
352
|
department: UserOnboardingDepartment.optional(),
|
|
339
|
-
jobTitle:
|
|
340
|
-
phase:
|
|
353
|
+
jobTitle: z20.string().optional(),
|
|
354
|
+
phase: z20.string().optional(),
|
|
341
355
|
jobLevel: UserOnboardingJobLevel.optional()
|
|
342
356
|
});
|
|
343
|
-
var UserProfile =
|
|
344
|
-
name:
|
|
345
|
-
avatar:
|
|
346
|
-
nickname:
|
|
357
|
+
var UserProfile = z20.object({
|
|
358
|
+
name: z20.string(),
|
|
359
|
+
avatar: z20.string().optional(),
|
|
360
|
+
nickname: z20.string().optional(),
|
|
347
361
|
onboarding: UserOnboarding.optional()
|
|
348
362
|
});
|
|
349
363
|
|
|
350
364
|
// src/users/user-test.ts
|
|
351
|
-
import { z as
|
|
352
|
-
var UserTest =
|
|
353
|
-
id:
|
|
354
|
-
email:
|
|
365
|
+
import { z as z21 } from "zod";
|
|
366
|
+
var UserTest = z21.object({
|
|
367
|
+
id: z21.string(),
|
|
368
|
+
email: z21.string()
|
|
355
369
|
});
|
|
356
370
|
|
|
357
371
|
// src/users/user.ts
|
|
358
|
-
import { z as
|
|
359
|
-
var User =
|
|
360
|
-
id:
|
|
361
|
-
email:
|
|
362
|
-
emailVerified:
|
|
363
|
-
createdAt:
|
|
364
|
-
trialExpiresAt:
|
|
372
|
+
import { z as z22 } from "zod";
|
|
373
|
+
var User = z22.object({
|
|
374
|
+
id: z22.string(),
|
|
375
|
+
email: z22.string(),
|
|
376
|
+
emailVerified: z22.boolean(),
|
|
377
|
+
createdAt: z22.coerce.date(),
|
|
378
|
+
trialExpiresAt: z22.coerce.date().optional(),
|
|
365
379
|
profile: UserProfile,
|
|
366
380
|
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
367
|
-
loggedOutAt:
|
|
368
|
-
isProtected:
|
|
381
|
+
loggedOutAt: z22.coerce.date().optional(),
|
|
382
|
+
isProtected: z22.boolean()
|
|
369
383
|
});
|
|
370
384
|
|
|
371
385
|
// src/docs-server/session.ts
|
|
372
|
-
var NpmProxyToken =
|
|
373
|
-
access:
|
|
374
|
-
expiresAt:
|
|
386
|
+
var NpmProxyToken = z23.object({
|
|
387
|
+
access: z23.string(),
|
|
388
|
+
expiresAt: z23.number()
|
|
375
389
|
});
|
|
376
|
-
var SessionData =
|
|
377
|
-
returnToUrl:
|
|
390
|
+
var SessionData = z23.object({
|
|
391
|
+
returnToUrl: z23.string().optional(),
|
|
378
392
|
npmProxyToken: NpmProxyToken.optional()
|
|
379
393
|
});
|
|
380
|
-
var Session =
|
|
381
|
-
id:
|
|
382
|
-
expiresAt:
|
|
383
|
-
userId:
|
|
394
|
+
var Session = z23.object({
|
|
395
|
+
id: z23.string(),
|
|
396
|
+
expiresAt: z23.coerce.date(),
|
|
397
|
+
userId: z23.string().nullable(),
|
|
384
398
|
data: SessionData
|
|
385
399
|
});
|
|
386
|
-
var AuthTokens =
|
|
387
|
-
access:
|
|
388
|
-
refresh:
|
|
400
|
+
var AuthTokens = z23.object({
|
|
401
|
+
access: z23.string(),
|
|
402
|
+
refresh: z23.string()
|
|
389
403
|
});
|
|
390
|
-
var UserSession =
|
|
404
|
+
var UserSession = z23.object({
|
|
391
405
|
session: Session,
|
|
392
406
|
user: User.nullable()
|
|
393
407
|
});
|
|
394
408
|
|
|
395
409
|
// src/dsm/assets/asset-dynamo-record.ts
|
|
396
|
-
import { z as
|
|
397
|
-
var AssetDynamoRecord =
|
|
398
|
-
path:
|
|
399
|
-
id:
|
|
400
|
-
designSystemId:
|
|
401
|
-
expiresAt:
|
|
410
|
+
import { z as z24 } from "zod";
|
|
411
|
+
var AssetDynamoRecord = z24.object({
|
|
412
|
+
path: z24.string(),
|
|
413
|
+
id: z24.string(),
|
|
414
|
+
designSystemId: z24.string(),
|
|
415
|
+
expiresAt: z24.number()
|
|
402
416
|
});
|
|
403
417
|
|
|
404
418
|
// src/dsm/assets/asset-reference.ts
|
|
405
|
-
import { z as
|
|
406
|
-
var AssetReference =
|
|
407
|
-
id:
|
|
408
|
-
designSystemVersionId:
|
|
409
|
-
assetId:
|
|
410
|
-
persistentId:
|
|
419
|
+
import { z as z25 } from "zod";
|
|
420
|
+
var AssetReference = z25.object({
|
|
421
|
+
id: z25.string(),
|
|
422
|
+
designSystemVersionId: z25.string(),
|
|
423
|
+
assetId: z25.string(),
|
|
424
|
+
persistentId: z25.string()
|
|
411
425
|
});
|
|
412
426
|
|
|
413
427
|
// src/dsm/assets/asset-value.ts
|
|
414
|
-
import { z as
|
|
415
|
-
var AssetValue =
|
|
428
|
+
import { z as z26 } from "zod";
|
|
429
|
+
var AssetValue = z26.object({});
|
|
416
430
|
|
|
417
431
|
// src/dsm/assets/asset.ts
|
|
418
|
-
import { z as
|
|
419
|
-
var AssetType =
|
|
420
|
-
var AssetScope =
|
|
421
|
-
var AssetFontProperties =
|
|
422
|
-
family:
|
|
423
|
-
subfamily:
|
|
424
|
-
});
|
|
425
|
-
var AssetProperties =
|
|
426
|
-
|
|
427
|
-
fontProperties:
|
|
432
|
+
import { z as z27 } from "zod";
|
|
433
|
+
var AssetType = z27.enum(["Image", "Font"]);
|
|
434
|
+
var AssetScope = z27.enum(["DocumentationFrame", "ComponentThumbnail", "DesignSystem", "Documentation"]);
|
|
435
|
+
var AssetFontProperties = z27.object({
|
|
436
|
+
family: z27.string(),
|
|
437
|
+
subfamily: z27.string()
|
|
438
|
+
});
|
|
439
|
+
var AssetProperties = z27.union([
|
|
440
|
+
z27.object({
|
|
441
|
+
fontProperties: z27.array(AssetFontProperties)
|
|
428
442
|
}),
|
|
429
|
-
|
|
430
|
-
width:
|
|
431
|
-
height:
|
|
443
|
+
z27.object({
|
|
444
|
+
width: z27.number(),
|
|
445
|
+
height: z27.number()
|
|
432
446
|
})
|
|
433
447
|
]);
|
|
434
|
-
var AssetOrigin =
|
|
435
|
-
originKey:
|
|
448
|
+
var AssetOrigin = z27.object({
|
|
449
|
+
originKey: z27.string()
|
|
436
450
|
});
|
|
437
|
-
var AssetProcessStatus =
|
|
438
|
-
var Asset =
|
|
439
|
-
id:
|
|
440
|
-
designSystemId:
|
|
451
|
+
var AssetProcessStatus = z27.enum(["Pending", "Uploaded", "Processed"]);
|
|
452
|
+
var Asset = z27.object({
|
|
453
|
+
id: z27.string(),
|
|
454
|
+
designSystemId: z27.string().nullish(),
|
|
441
455
|
type: AssetType,
|
|
442
|
-
originalFileName:
|
|
443
|
-
filePath:
|
|
456
|
+
originalFileName: z27.string().nullish(),
|
|
457
|
+
filePath: z27.string(),
|
|
444
458
|
scope: AssetScope,
|
|
445
459
|
properties: AssetProperties.nullish(),
|
|
446
460
|
state: AssetProcessStatus.optional(),
|
|
447
461
|
origin: AssetOrigin.optional(),
|
|
448
|
-
originKey:
|
|
462
|
+
originKey: z27.string().optional()
|
|
449
463
|
});
|
|
450
464
|
function isImportedAsset(asset) {
|
|
451
465
|
return !!asset.originKey;
|
|
452
466
|
}
|
|
453
467
|
|
|
454
468
|
// src/dsm/data-sources/data-source.ts
|
|
455
|
-
import { z as
|
|
456
|
-
var DataSourceRemoteType =
|
|
457
|
-
var DataSourceUploadRemoteSource =
|
|
458
|
-
var DataSourceFigmaState =
|
|
459
|
-
var DataSourceAutoImportMode =
|
|
460
|
-
var DataSourceStats =
|
|
469
|
+
import { z as z28 } from "zod";
|
|
470
|
+
var DataSourceRemoteType = z28.enum(["Figma", "TokenStudio", "FigmaVariablesPlugin"]);
|
|
471
|
+
var DataSourceUploadRemoteSource = z28.enum(["TokenStudio", "FigmaVariablesPlugin", "Custom"]);
|
|
472
|
+
var DataSourceFigmaState = z28.enum(["Active", "MissingIntegration", "MissingFileAccess", "MissingFileOwner"]);
|
|
473
|
+
var DataSourceAutoImportMode = z28.enum(["Never", "Hourly"]);
|
|
474
|
+
var DataSourceStats = z28.object({
|
|
461
475
|
tokens: zeroNumberByDefault(),
|
|
462
476
|
components: zeroNumberByDefault(),
|
|
463
477
|
assets: zeroNumberByDefault(),
|
|
464
478
|
frames: zeroNumberByDefault()
|
|
465
479
|
});
|
|
466
|
-
var DataSourceFigmaFileData =
|
|
467
|
-
lastUpdatedAt:
|
|
480
|
+
var DataSourceFigmaFileData = z28.object({
|
|
481
|
+
lastUpdatedAt: z28.coerce.date()
|
|
468
482
|
});
|
|
469
|
-
var DataSourceFigmaFileVersionData =
|
|
470
|
-
id:
|
|
471
|
-
label:
|
|
472
|
-
description:
|
|
473
|
-
createdAt:
|
|
474
|
-
});
|
|
475
|
-
var DataSourceFigmaScope =
|
|
476
|
-
assets:
|
|
477
|
-
components:
|
|
478
|
-
documentationFrames:
|
|
479
|
-
tokens:
|
|
480
|
-
themePersistentId:
|
|
481
|
-
isUnpublishedImportFallbackEnabled:
|
|
482
|
-
});
|
|
483
|
-
var DataSourceFigmaImportMetadata =
|
|
483
|
+
var DataSourceFigmaFileVersionData = z28.object({
|
|
484
|
+
id: z28.string(),
|
|
485
|
+
label: z28.string().optional(),
|
|
486
|
+
description: z28.string().optional(),
|
|
487
|
+
createdAt: z28.coerce.date()
|
|
488
|
+
});
|
|
489
|
+
var DataSourceFigmaScope = z28.object({
|
|
490
|
+
assets: z28.boolean(),
|
|
491
|
+
components: z28.boolean(),
|
|
492
|
+
documentationFrames: z28.boolean(),
|
|
493
|
+
tokens: z28.boolean(),
|
|
494
|
+
themePersistentId: z28.string().optional(),
|
|
495
|
+
isUnpublishedImportFallbackEnabled: z28.boolean()
|
|
496
|
+
});
|
|
497
|
+
var DataSourceFigmaImportMetadata = z28.object({
|
|
484
498
|
fileData: DataSourceFigmaFileData.optional(),
|
|
485
499
|
importedPublishedVersion: DataSourceFigmaFileVersionData.optional()
|
|
486
500
|
});
|
|
487
|
-
var DataSourceFigmaRemote =
|
|
488
|
-
type:
|
|
489
|
-
fileId:
|
|
490
|
-
ownerId:
|
|
491
|
-
ownerName:
|
|
501
|
+
var DataSourceFigmaRemote = z28.object({
|
|
502
|
+
type: z28.literal(DataSourceRemoteType.Enum.Figma),
|
|
503
|
+
fileId: z28.string(),
|
|
504
|
+
ownerId: z28.string(),
|
|
505
|
+
ownerName: z28.string(),
|
|
492
506
|
scope: DataSourceFigmaScope,
|
|
493
507
|
state: DataSourceFigmaState,
|
|
494
|
-
requiresSync:
|
|
508
|
+
requiresSync: z28.boolean().optional().transform((v) => v ?? false),
|
|
495
509
|
lastImportMetadata: DataSourceFigmaImportMetadata.optional(),
|
|
496
|
-
downloadChunkSize:
|
|
497
|
-
figmaRenderChunkSize:
|
|
498
|
-
maxFileDepth:
|
|
510
|
+
downloadChunkSize: z28.number().optional(),
|
|
511
|
+
figmaRenderChunkSize: z28.number().optional(),
|
|
512
|
+
maxFileDepth: z28.number().optional()
|
|
499
513
|
});
|
|
500
|
-
var DataSourceTokenStudioRemote =
|
|
501
|
-
type:
|
|
514
|
+
var DataSourceTokenStudioRemote = z28.object({
|
|
515
|
+
type: z28.literal(DataSourceRemoteType.Enum.TokenStudio)
|
|
502
516
|
});
|
|
503
|
-
var DataSourceUploadImportMetadata =
|
|
504
|
-
var DataSourceUploadRemote =
|
|
505
|
-
type:
|
|
506
|
-
remoteId:
|
|
517
|
+
var DataSourceUploadImportMetadata = z28.record(z28.any());
|
|
518
|
+
var DataSourceUploadRemote = z28.object({
|
|
519
|
+
type: z28.literal(DataSourceRemoteType.Enum.FigmaVariablesPlugin),
|
|
520
|
+
remoteId: z28.string(),
|
|
507
521
|
remoteSourceType: DataSourceUploadRemoteSource,
|
|
508
522
|
lastImportMetadata: DataSourceUploadImportMetadata.optional()
|
|
509
523
|
});
|
|
510
|
-
var DataSourceRemote =
|
|
524
|
+
var DataSourceRemote = z28.discriminatedUnion("type", [
|
|
511
525
|
DataSourceFigmaRemote,
|
|
512
526
|
DataSourceUploadRemote,
|
|
513
527
|
DataSourceTokenStudioRemote
|
|
514
528
|
]);
|
|
515
|
-
var DataSourceVersion =
|
|
516
|
-
id:
|
|
517
|
-
createdAt:
|
|
518
|
-
label:
|
|
519
|
-
description:
|
|
529
|
+
var DataSourceVersion = z28.object({
|
|
530
|
+
id: z28.string(),
|
|
531
|
+
createdAt: z28.coerce.date(),
|
|
532
|
+
label: z28.string().nullish(),
|
|
533
|
+
description: z28.string().nullish()
|
|
520
534
|
});
|
|
521
535
|
function zeroNumberByDefault() {
|
|
522
|
-
return
|
|
536
|
+
return z28.number().nullish().transform((v) => v ?? 0);
|
|
523
537
|
}
|
|
524
538
|
|
|
525
539
|
// src/dsm/data-sources/import-job.ts
|
|
526
|
-
import { z as
|
|
527
|
-
var ImportJobState =
|
|
528
|
-
var ImportJobOperation =
|
|
540
|
+
import { z as z29 } from "zod";
|
|
541
|
+
var ImportJobState = z29.enum(["PendingInput", "Queued", "InProgress", "Failed", "Success"]);
|
|
542
|
+
var ImportJobOperation = z29.enum(["Check", "Import"]);
|
|
529
543
|
var ImportJob = Entity.extend({
|
|
530
|
-
designSystemId:
|
|
531
|
-
designSystemVersionId:
|
|
532
|
-
sourceIds:
|
|
544
|
+
designSystemId: z29.string(),
|
|
545
|
+
designSystemVersionId: z29.string(),
|
|
546
|
+
sourceIds: z29.array(z29.string()),
|
|
533
547
|
state: ImportJobState,
|
|
534
|
-
createdByUserId:
|
|
535
|
-
importContextId:
|
|
536
|
-
error:
|
|
548
|
+
createdByUserId: z29.string().optional(),
|
|
549
|
+
importContextId: z29.string(),
|
|
550
|
+
error: z29.string().optional(),
|
|
537
551
|
sourceType: DataSourceRemoteType,
|
|
538
|
-
importContextCleanedUp:
|
|
552
|
+
importContextCleanedUp: z29.boolean()
|
|
539
553
|
});
|
|
540
554
|
|
|
541
555
|
// src/dsm/data-sources/import-summary.ts
|
|
542
|
-
import { z as
|
|
556
|
+
import { z as z98 } from "zod";
|
|
543
557
|
|
|
544
558
|
// src/dsm/elements/data/base.ts
|
|
545
|
-
import { z as
|
|
546
|
-
var TokenDataAliasSchema =
|
|
547
|
-
aliasTo:
|
|
559
|
+
import { z as z30 } from "zod";
|
|
560
|
+
var TokenDataAliasSchema = z30.object({
|
|
561
|
+
aliasTo: z30.string().optional().nullable().transform((v) => v ?? void 0)
|
|
548
562
|
});
|
|
549
563
|
function tokenAliasOrValue(value) {
|
|
550
564
|
return TokenDataAliasSchema.extend({
|
|
@@ -553,68 +567,68 @@ function tokenAliasOrValue(value) {
|
|
|
553
567
|
}
|
|
554
568
|
|
|
555
569
|
// src/dsm/elements/data/blur.ts
|
|
556
|
-
import { z as
|
|
570
|
+
import { z as z32 } from "zod";
|
|
557
571
|
|
|
558
572
|
// src/dsm/elements/data/dimension.ts
|
|
559
|
-
import { z as
|
|
560
|
-
var DimensionUnit =
|
|
561
|
-
var DimensionValue =
|
|
573
|
+
import { z as z31 } from "zod";
|
|
574
|
+
var DimensionUnit = z31.enum(["Pixels", "Percent", "Rem", "Ms", "Raw", "Points"]);
|
|
575
|
+
var DimensionValue = z31.object({
|
|
562
576
|
unit: DimensionUnit,
|
|
563
|
-
measure:
|
|
577
|
+
measure: z31.number()
|
|
564
578
|
});
|
|
565
579
|
var DimensionTokenData = tokenAliasOrValue(DimensionValue);
|
|
566
580
|
|
|
567
581
|
// src/dsm/elements/data/blur.ts
|
|
568
|
-
var BlurType =
|
|
569
|
-
var BlurValue =
|
|
582
|
+
var BlurType = z32.enum(["Layer", "Background"]);
|
|
583
|
+
var BlurValue = z32.object({
|
|
570
584
|
type: BlurType,
|
|
571
585
|
radius: DimensionTokenData
|
|
572
586
|
});
|
|
573
587
|
var BlurTokenData = tokenAliasOrValue(BlurValue);
|
|
574
588
|
|
|
575
589
|
// src/dsm/elements/data/border-radius.ts
|
|
576
|
-
import { z as
|
|
577
|
-
var BorderRadiusUnit =
|
|
578
|
-
var BorderRadiusValue =
|
|
590
|
+
import { z as z33 } from "zod";
|
|
591
|
+
var BorderRadiusUnit = z33.enum(["Pixels", "Rem", "Percent"]);
|
|
592
|
+
var BorderRadiusValue = z33.object({
|
|
579
593
|
unit: BorderRadiusUnit,
|
|
580
|
-
measure:
|
|
594
|
+
measure: z33.number()
|
|
581
595
|
});
|
|
582
596
|
var BorderRadiusTokenData = tokenAliasOrValue(BorderRadiusValue);
|
|
583
597
|
|
|
584
598
|
// src/dsm/elements/data/border-width.ts
|
|
585
|
-
import { z as
|
|
586
|
-
var BorderWidthUnit =
|
|
587
|
-
var BorderWidthValue =
|
|
599
|
+
import { z as z34 } from "zod";
|
|
600
|
+
var BorderWidthUnit = z34.enum(["Pixels"]);
|
|
601
|
+
var BorderWidthValue = z34.object({
|
|
588
602
|
unit: BorderWidthUnit,
|
|
589
|
-
measure:
|
|
603
|
+
measure: z34.number()
|
|
590
604
|
});
|
|
591
605
|
var BorderWidthTokenData = tokenAliasOrValue(BorderWidthValue);
|
|
592
606
|
|
|
593
607
|
// src/dsm/elements/data/border.ts
|
|
594
|
-
import { z as
|
|
608
|
+
import { z as z37 } from "zod";
|
|
595
609
|
|
|
596
610
|
// src/dsm/elements/data/color.ts
|
|
597
|
-
import { z as
|
|
611
|
+
import { z as z36 } from "zod";
|
|
598
612
|
|
|
599
613
|
// src/dsm/elements/data/opacity.ts
|
|
600
|
-
import { z as
|
|
601
|
-
var OpacityValue =
|
|
602
|
-
unit:
|
|
603
|
-
measure:
|
|
614
|
+
import { z as z35 } from "zod";
|
|
615
|
+
var OpacityValue = z35.object({
|
|
616
|
+
unit: z35.enum(["Raw", "Pixels"]),
|
|
617
|
+
measure: z35.number()
|
|
604
618
|
});
|
|
605
619
|
var OpacityTokenData = tokenAliasOrValue(OpacityValue);
|
|
606
620
|
|
|
607
621
|
// src/dsm/elements/data/color.ts
|
|
608
|
-
var ColorValue =
|
|
622
|
+
var ColorValue = z36.object({
|
|
609
623
|
opacity: OpacityTokenData,
|
|
610
|
-
color:
|
|
624
|
+
color: z36.string().or(TokenDataAliasSchema)
|
|
611
625
|
});
|
|
612
626
|
var ColorTokenData = tokenAliasOrValue(ColorValue);
|
|
613
627
|
|
|
614
628
|
// src/dsm/elements/data/border.ts
|
|
615
|
-
var BorderPosition =
|
|
616
|
-
var BorderStyle =
|
|
617
|
-
var BorderValue =
|
|
629
|
+
var BorderPosition = z37.enum(["Inside", "Center", "Outside"]);
|
|
630
|
+
var BorderStyle = z37.enum(["Dashed", "Dotted", "Solid", "Groove"]);
|
|
631
|
+
var BorderValue = z37.object({
|
|
618
632
|
color: ColorTokenData,
|
|
619
633
|
width: BorderWidthTokenData,
|
|
620
634
|
position: BorderPosition,
|
|
@@ -623,30 +637,30 @@ var BorderValue = z36.object({
|
|
|
623
637
|
var BorderTokenData = tokenAliasOrValue(BorderValue);
|
|
624
638
|
|
|
625
639
|
// src/dsm/elements/data/component.ts
|
|
626
|
-
import { z as
|
|
627
|
-
var ComponentElementData =
|
|
628
|
-
value:
|
|
629
|
-
thumbnailImage:
|
|
630
|
-
value:
|
|
631
|
-
url:
|
|
632
|
-
assetId:
|
|
640
|
+
import { z as z38 } from "zod";
|
|
641
|
+
var ComponentElementData = z38.object({
|
|
642
|
+
value: z38.object({
|
|
643
|
+
thumbnailImage: z38.object({
|
|
644
|
+
value: z38.object({
|
|
645
|
+
url: z38.string(),
|
|
646
|
+
assetId: z38.string()
|
|
633
647
|
})
|
|
634
648
|
}),
|
|
635
|
-
svg:
|
|
636
|
-
value:
|
|
637
|
-
url:
|
|
638
|
-
assetId:
|
|
649
|
+
svg: z38.object({
|
|
650
|
+
value: z38.object({
|
|
651
|
+
url: z38.string(),
|
|
652
|
+
assetId: z38.string()
|
|
639
653
|
})
|
|
640
654
|
}).optional()
|
|
641
655
|
})
|
|
642
656
|
});
|
|
643
657
|
|
|
644
658
|
// src/dsm/elements/data/documentation-block-v1.ts
|
|
645
|
-
import { z as
|
|
659
|
+
import { z as z44 } from "zod";
|
|
646
660
|
|
|
647
661
|
// src/dsm/elements/raw-element.ts
|
|
648
|
-
import { z as
|
|
649
|
-
var DesignTokenType =
|
|
662
|
+
import { z as z39 } from "zod";
|
|
663
|
+
var DesignTokenType = z39.enum([
|
|
650
664
|
"Color",
|
|
651
665
|
"Border",
|
|
652
666
|
"Gradient",
|
|
@@ -678,7 +692,7 @@ var DesignTokenType = z38.enum([
|
|
|
678
692
|
]);
|
|
679
693
|
var tokenElementTypes = [...DesignTokenType.options.filter((v) => v !== "Font")];
|
|
680
694
|
var DesignElementType = DesignTokenType.or(
|
|
681
|
-
|
|
695
|
+
z39.enum([
|
|
682
696
|
"Component",
|
|
683
697
|
"Theme",
|
|
684
698
|
"Documentation",
|
|
@@ -693,7 +707,7 @@ var DesignElementType = DesignTokenType.or(
|
|
|
693
707
|
function isTokenType(type) {
|
|
694
708
|
return DesignTokenType.safeParse(type).success;
|
|
695
709
|
}
|
|
696
|
-
var DesignElementCategory =
|
|
710
|
+
var DesignElementCategory = z39.enum([
|
|
697
711
|
"Token",
|
|
698
712
|
"Component",
|
|
699
713
|
"DesignSystemComponent",
|
|
@@ -701,94 +715,94 @@ var DesignElementCategory = z38.enum([
|
|
|
701
715
|
"Theme",
|
|
702
716
|
"PageBlock"
|
|
703
717
|
]);
|
|
704
|
-
var DesignSystemElementExportProps =
|
|
705
|
-
isAsset:
|
|
706
|
-
codeName:
|
|
707
|
-
});
|
|
708
|
-
var ShallowDesignElement =
|
|
709
|
-
id:
|
|
710
|
-
persistentId:
|
|
711
|
-
designSystemVersionId:
|
|
718
|
+
var DesignSystemElementExportProps = z39.object({
|
|
719
|
+
isAsset: z39.boolean().nullish().transform((v) => v ?? false),
|
|
720
|
+
codeName: z39.string().nullish()
|
|
721
|
+
});
|
|
722
|
+
var ShallowDesignElement = z39.object({
|
|
723
|
+
id: z39.string(),
|
|
724
|
+
persistentId: z39.string(),
|
|
725
|
+
designSystemVersionId: z39.string(),
|
|
712
726
|
type: DesignElementType,
|
|
713
|
-
brandPersistentId:
|
|
714
|
-
parentPersistentId:
|
|
715
|
-
shortPersistentId:
|
|
727
|
+
brandPersistentId: z39.string().optional(),
|
|
728
|
+
parentPersistentId: z39.string().optional(),
|
|
729
|
+
shortPersistentId: z39.string().optional(),
|
|
716
730
|
childType: DesignElementType.optional(),
|
|
717
|
-
sortOrder:
|
|
718
|
-
origin:
|
|
731
|
+
sortOrder: z39.number(),
|
|
732
|
+
origin: z39.record(z39.any()).optional()
|
|
719
733
|
});
|
|
720
734
|
var DesignElement = ShallowDesignElement.extend({
|
|
721
735
|
meta: ObjectMeta,
|
|
722
|
-
slug:
|
|
723
|
-
userSlug:
|
|
724
|
-
createdAt:
|
|
725
|
-
updatedAt:
|
|
736
|
+
slug: z39.string().optional(),
|
|
737
|
+
userSlug: z39.string().optional(),
|
|
738
|
+
createdAt: z39.coerce.date(),
|
|
739
|
+
updatedAt: z39.coerce.date(),
|
|
726
740
|
exportProperties: DesignSystemElementExportProps.optional(),
|
|
727
|
-
data:
|
|
728
|
-
origin:
|
|
741
|
+
data: z39.record(z39.any()),
|
|
742
|
+
origin: z39.record(z39.any()).optional()
|
|
729
743
|
});
|
|
730
744
|
var HierarchicalElements = DesignTokenType.or(
|
|
731
|
-
|
|
745
|
+
z39.enum(["Component", "DesignSystemComponent", "DocumentationPage"])
|
|
732
746
|
);
|
|
733
747
|
|
|
734
748
|
// src/dsm/properties/property-definition.ts
|
|
735
|
-
import { z as
|
|
736
|
-
var ElementPropertyTypeSchema =
|
|
737
|
-
var ElementPropertyTargetType =
|
|
738
|
-
var ElementPropertyLinkType =
|
|
749
|
+
import { z as z40 } from "zod";
|
|
750
|
+
var ElementPropertyTypeSchema = z40.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
|
|
751
|
+
var ElementPropertyTargetType = z40.enum(["Token", "Component", "DocumentationPage"]);
|
|
752
|
+
var ElementPropertyLinkType = z40.enum(["FigmaComponent", "DocumentationPage"]);
|
|
739
753
|
var CODE_NAME_REGEX = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
740
|
-
var ColorTokenInlineData =
|
|
741
|
-
value:
|
|
754
|
+
var ColorTokenInlineData = z40.object({
|
|
755
|
+
value: z40.string()
|
|
742
756
|
});
|
|
743
|
-
var ElementPropertyDefinitionOption =
|
|
744
|
-
id:
|
|
745
|
-
name:
|
|
757
|
+
var ElementPropertyDefinitionOption = z40.object({
|
|
758
|
+
id: z40.string(),
|
|
759
|
+
name: z40.string(),
|
|
746
760
|
backgroundColor: ColorTokenInlineData.optional()
|
|
747
761
|
});
|
|
748
|
-
var ElementPropertyDefinition =
|
|
749
|
-
id:
|
|
750
|
-
designSystemVersionId:
|
|
751
|
-
persistentId:
|
|
752
|
-
name:
|
|
753
|
-
codeName:
|
|
754
|
-
description:
|
|
762
|
+
var ElementPropertyDefinition = z40.object({
|
|
763
|
+
id: z40.string(),
|
|
764
|
+
designSystemVersionId: z40.string(),
|
|
765
|
+
persistentId: z40.string(),
|
|
766
|
+
name: z40.string(),
|
|
767
|
+
codeName: z40.string().regex(CODE_NAME_REGEX),
|
|
768
|
+
description: z40.string(),
|
|
755
769
|
type: ElementPropertyTypeSchema,
|
|
756
770
|
targetElementType: ElementPropertyTargetType,
|
|
757
|
-
options:
|
|
771
|
+
options: z40.array(ElementPropertyDefinitionOption).optional(),
|
|
758
772
|
linkElementType: ElementPropertyLinkType.optional()
|
|
759
773
|
});
|
|
760
774
|
var ElementPropertyType = ElementPropertyTypeSchema.enum;
|
|
761
775
|
|
|
762
776
|
// src/dsm/properties/property-value.ts
|
|
763
|
-
import { z as
|
|
764
|
-
var ElementPropertyValue =
|
|
765
|
-
id:
|
|
766
|
-
designSystemVersionId:
|
|
767
|
-
targetElementPersistentId:
|
|
768
|
-
definitionPersistentId:
|
|
769
|
-
stringValue:
|
|
770
|
-
numberValue:
|
|
771
|
-
booleanValue:
|
|
772
|
-
referenceValue:
|
|
773
|
-
referenceValuePreview:
|
|
777
|
+
import { z as z41 } from "zod";
|
|
778
|
+
var ElementPropertyValue = z41.object({
|
|
779
|
+
id: z41.string(),
|
|
780
|
+
designSystemVersionId: z41.string(),
|
|
781
|
+
targetElementPersistentId: z41.string(),
|
|
782
|
+
definitionPersistentId: z41.string(),
|
|
783
|
+
stringValue: z41.string().nullish(),
|
|
784
|
+
numberValue: z41.number().nullish(),
|
|
785
|
+
booleanValue: z41.boolean().nullish(),
|
|
786
|
+
referenceValue: z41.string().nullish(),
|
|
787
|
+
referenceValuePreview: z41.string().optional()
|
|
774
788
|
});
|
|
775
789
|
|
|
776
790
|
// src/dsm/elements/primitives/point.ts
|
|
777
|
-
import { z as
|
|
778
|
-
var Point2D =
|
|
779
|
-
x:
|
|
780
|
-
y:
|
|
791
|
+
import { z as z42 } from "zod";
|
|
792
|
+
var Point2D = z42.object({
|
|
793
|
+
x: z42.number(),
|
|
794
|
+
y: z42.number()
|
|
781
795
|
});
|
|
782
796
|
|
|
783
797
|
// src/dsm/elements/primitives/size.ts
|
|
784
|
-
import { z as
|
|
798
|
+
import { z as z43 } from "zod";
|
|
785
799
|
var nullSize = { height: -1, width: -1 };
|
|
786
800
|
function isNullSize(size) {
|
|
787
801
|
return size.height === nullSize.height && size.width === nullSize.width;
|
|
788
802
|
}
|
|
789
|
-
var Size =
|
|
790
|
-
width:
|
|
791
|
-
height:
|
|
803
|
+
var Size = z43.object({
|
|
804
|
+
width: z43.number().nullish().transform((v) => v ?? nullSize.width),
|
|
805
|
+
height: z43.number().nullish().transform((v) => v ?? nullSize.height)
|
|
792
806
|
});
|
|
793
807
|
var SizeOrUndefined = Size.optional().transform((v) => {
|
|
794
808
|
if (!v)
|
|
@@ -799,8 +813,8 @@ var SizeOrUndefined = Size.optional().transform((v) => {
|
|
|
799
813
|
});
|
|
800
814
|
|
|
801
815
|
// src/dsm/elements/data/documentation-block-v1.ts
|
|
802
|
-
var PageBlockCalloutType =
|
|
803
|
-
var PageBlockTypeV1 =
|
|
816
|
+
var PageBlockCalloutType = z44.enum(["Info", "Primary", "Success", "Warning", "Error"]);
|
|
817
|
+
var PageBlockTypeV1 = z44.enum([
|
|
804
818
|
"Text",
|
|
805
819
|
"Heading",
|
|
806
820
|
"Code",
|
|
@@ -833,7 +847,7 @@ var PageBlockTypeV1 = z43.enum([
|
|
|
833
847
|
"TableRow",
|
|
834
848
|
"TableCell"
|
|
835
849
|
]);
|
|
836
|
-
var PageBlockCodeLanguage =
|
|
850
|
+
var PageBlockCodeLanguage = z44.enum([
|
|
837
851
|
"Angular",
|
|
838
852
|
"Bash",
|
|
839
853
|
"C",
|
|
@@ -867,70 +881,70 @@ var PageBlockCodeLanguage = z43.enum([
|
|
|
867
881
|
"XML",
|
|
868
882
|
"YAML"
|
|
869
883
|
]);
|
|
870
|
-
var PageBlockAlignment =
|
|
871
|
-
var PageBlockThemeType =
|
|
872
|
-
var PageBlockAssetType =
|
|
873
|
-
var PageBlockTilesAlignment =
|
|
874
|
-
var PageBlockTilesLayout =
|
|
875
|
-
var PageBlockTheme =
|
|
876
|
-
themeIds:
|
|
884
|
+
var PageBlockAlignment = z44.enum(["Left", "Center", "Stretch", "Right"]);
|
|
885
|
+
var PageBlockThemeType = z44.enum(["Override", "Comparison"]);
|
|
886
|
+
var PageBlockAssetType = z44.enum(["image", "figmaFrame"]);
|
|
887
|
+
var PageBlockTilesAlignment = z44.enum(["Center", "FrameHeight"]);
|
|
888
|
+
var PageBlockTilesLayout = z44.enum(["C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C1_75"]);
|
|
889
|
+
var PageBlockTheme = z44.object({
|
|
890
|
+
themeIds: z44.array(z44.string()),
|
|
877
891
|
type: PageBlockThemeType
|
|
878
892
|
});
|
|
879
|
-
var PageBlockUrlPreview =
|
|
880
|
-
title: nullishToOptional(
|
|
881
|
-
description: nullishToOptional(
|
|
882
|
-
thumbnailUrl: nullishToOptional(
|
|
883
|
-
});
|
|
884
|
-
var PageBlockFrameOrigin =
|
|
885
|
-
sourceFileName: nullishToOptional(
|
|
886
|
-
title: nullishToOptional(
|
|
887
|
-
previewUrl: nullishToOptional(
|
|
888
|
-
valid: nullishToOptional(
|
|
889
|
-
referenceId: nullishToOptional(
|
|
890
|
-
assetId: nullishToOptional(
|
|
891
|
-
assetScale: nullishToOptional(
|
|
892
|
-
width: nullishToOptional(
|
|
893
|
-
height: nullishToOptional(
|
|
894
|
-
});
|
|
895
|
-
var PageBlockFrame =
|
|
896
|
-
persistentId:
|
|
897
|
-
sourceId:
|
|
898
|
-
sourceFrameId:
|
|
899
|
-
title: nullishToOptional(
|
|
900
|
-
description: nullishToOptional(
|
|
893
|
+
var PageBlockUrlPreview = z44.object({
|
|
894
|
+
title: nullishToOptional(z44.string()),
|
|
895
|
+
description: nullishToOptional(z44.string()),
|
|
896
|
+
thumbnailUrl: nullishToOptional(z44.string())
|
|
897
|
+
});
|
|
898
|
+
var PageBlockFrameOrigin = z44.object({
|
|
899
|
+
sourceFileName: nullishToOptional(z44.string()),
|
|
900
|
+
title: nullishToOptional(z44.string()),
|
|
901
|
+
previewUrl: nullishToOptional(z44.string()),
|
|
902
|
+
valid: nullishToOptional(z44.boolean()),
|
|
903
|
+
referenceId: nullishToOptional(z44.string()),
|
|
904
|
+
assetId: nullishToOptional(z44.string()),
|
|
905
|
+
assetScale: nullishToOptional(z44.number()),
|
|
906
|
+
width: nullishToOptional(z44.number()),
|
|
907
|
+
height: nullishToOptional(z44.number())
|
|
908
|
+
});
|
|
909
|
+
var PageBlockFrame = z44.object({
|
|
910
|
+
persistentId: z44.string(),
|
|
911
|
+
sourceId: z44.string(),
|
|
912
|
+
sourceFrameId: z44.string(),
|
|
913
|
+
title: nullishToOptional(z44.string()),
|
|
914
|
+
description: nullishToOptional(z44.string()),
|
|
901
915
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
902
916
|
origin: nullishToOptional(PageBlockFrameOrigin)
|
|
903
917
|
});
|
|
904
|
-
var PageBlockAsset =
|
|
918
|
+
var PageBlockAsset = z44.object({
|
|
905
919
|
type: PageBlockAssetType,
|
|
906
|
-
id: nullishToOptional(
|
|
907
|
-
url: nullishToOptional(
|
|
920
|
+
id: nullishToOptional(z44.string()),
|
|
921
|
+
url: nullishToOptional(z44.string()),
|
|
908
922
|
figmaFrame: nullishToOptional(PageBlockFrame)
|
|
909
923
|
});
|
|
910
|
-
var PageBlockLinkPreview =
|
|
911
|
-
title: nullishToOptional(
|
|
912
|
-
valid: nullishToOptional(
|
|
924
|
+
var PageBlockLinkPreview = z44.object({
|
|
925
|
+
title: nullishToOptional(z44.string()),
|
|
926
|
+
valid: nullishToOptional(z44.boolean())
|
|
913
927
|
});
|
|
914
|
-
var PageBlockShortcut =
|
|
915
|
-
persistentId:
|
|
916
|
-
title: nullishToOptional(
|
|
917
|
-
description: nullishToOptional(
|
|
928
|
+
var PageBlockShortcut = z44.object({
|
|
929
|
+
persistentId: z44.string(),
|
|
930
|
+
title: nullishToOptional(z44.string()),
|
|
931
|
+
description: nullishToOptional(z44.string()),
|
|
918
932
|
asset: nullishToOptional(PageBlockAsset),
|
|
919
|
-
documentationItemId: nullishToOptional(
|
|
920
|
-
pageHeadingId: nullishToOptional(
|
|
921
|
-
url: nullishToOptional(
|
|
922
|
-
openInNewTab: nullishToOptional(
|
|
933
|
+
documentationItemId: nullishToOptional(z44.string()),
|
|
934
|
+
pageHeadingId: nullishToOptional(z44.string()),
|
|
935
|
+
url: nullishToOptional(z44.string()),
|
|
936
|
+
openInNewTab: nullishToOptional(z44.boolean()),
|
|
923
937
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
924
938
|
documentationItemPreview: nullishToOptional(PageBlockLinkPreview)
|
|
925
939
|
});
|
|
926
|
-
var PageBlockCustomBlockPropertyImageValue =
|
|
940
|
+
var PageBlockCustomBlockPropertyImageValue = z44.object({
|
|
927
941
|
asset: nullishToOptional(PageBlockAsset),
|
|
928
|
-
assetId: nullishToOptional(
|
|
929
|
-
assetUrl: nullishToOptional(
|
|
942
|
+
assetId: nullishToOptional(z44.string()),
|
|
943
|
+
assetUrl: nullishToOptional(z44.string())
|
|
930
944
|
});
|
|
931
|
-
var PageBlockCustomBlockPropertyValue =
|
|
932
|
-
key:
|
|
933
|
-
value:
|
|
945
|
+
var PageBlockCustomBlockPropertyValue = z44.object({
|
|
946
|
+
key: z44.string(),
|
|
947
|
+
value: z44.any()
|
|
934
948
|
// TODO Artem: for some reason there are cases when there's an array here in the DB
|
|
935
949
|
// e.g. element id 67451 in the dev db
|
|
936
950
|
// value: z
|
|
@@ -941,101 +955,101 @@ var PageBlockCustomBlockPropertyValue = z43.object({
|
|
|
941
955
|
// .or(TypographyTokenData)
|
|
942
956
|
// .or(PageBlockCustomBlockPropertyImageValue),
|
|
943
957
|
});
|
|
944
|
-
var PageBlockFigmaFrameProperties =
|
|
958
|
+
var PageBlockFigmaFrameProperties = z44.object({
|
|
945
959
|
color: nullishToOptional(
|
|
946
|
-
|
|
947
|
-
value:
|
|
960
|
+
z44.object({
|
|
961
|
+
value: z44.string()
|
|
948
962
|
})
|
|
949
963
|
),
|
|
950
964
|
alignment: PageBlockTilesAlignment,
|
|
951
965
|
layout: PageBlockTilesLayout,
|
|
952
966
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
953
|
-
showTitles:
|
|
967
|
+
showTitles: z44.boolean()
|
|
954
968
|
});
|
|
955
|
-
var PageBlockRenderCodeProperties =
|
|
956
|
-
showCode:
|
|
969
|
+
var PageBlockRenderCodeProperties = z44.object({
|
|
970
|
+
showCode: z44.boolean()
|
|
957
971
|
});
|
|
958
|
-
var PageBlockAssetComponent =
|
|
959
|
-
persistentId:
|
|
960
|
-
componentAssetId:
|
|
961
|
-
title: nullishToOptional(
|
|
962
|
-
description: nullishToOptional(
|
|
972
|
+
var PageBlockAssetComponent = z44.object({
|
|
973
|
+
persistentId: z44.string(),
|
|
974
|
+
componentAssetId: z44.string(),
|
|
975
|
+
title: nullishToOptional(z44.string()),
|
|
976
|
+
description: nullishToOptional(z44.string()),
|
|
963
977
|
backgroundColor: nullishToOptional(ColorTokenInlineData)
|
|
964
978
|
});
|
|
965
|
-
var PageBlockTableColumn =
|
|
966
|
-
id:
|
|
979
|
+
var PageBlockTableColumn = z44.object({
|
|
980
|
+
id: z44.string(),
|
|
967
981
|
width: DimensionTokenData
|
|
968
982
|
});
|
|
969
|
-
var PageBlockTableProperties =
|
|
970
|
-
showBorders:
|
|
971
|
-
showHeaderRow:
|
|
972
|
-
showHeaderColumn:
|
|
973
|
-
columns:
|
|
983
|
+
var PageBlockTableProperties = z44.object({
|
|
984
|
+
showBorders: z44.boolean(),
|
|
985
|
+
showHeaderRow: z44.boolean(),
|
|
986
|
+
showHeaderColumn: z44.boolean(),
|
|
987
|
+
columns: z44.array(PageBlockTableColumn)
|
|
974
988
|
});
|
|
975
|
-
var PageBlockTextSpanAttributeType =
|
|
976
|
-
var PageBlockTextSpanAttribute =
|
|
989
|
+
var PageBlockTextSpanAttributeType = z44.enum(["Bold", "Italic", "Link", "Strikethrough", "Code"]);
|
|
990
|
+
var PageBlockTextSpanAttribute = z44.object({
|
|
977
991
|
type: PageBlockTextSpanAttributeType,
|
|
978
|
-
link: nullishToOptional(
|
|
979
|
-
documentationItemId: nullishToOptional(
|
|
980
|
-
openInNewWindow: nullishToOptional(
|
|
992
|
+
link: nullishToOptional(z44.string()),
|
|
993
|
+
documentationItemId: nullishToOptional(z44.string()),
|
|
994
|
+
openInNewWindow: nullishToOptional(z44.boolean()),
|
|
981
995
|
// deprecated. use openInNewTab
|
|
982
|
-
openInNewTab: nullishToOptional(
|
|
996
|
+
openInNewTab: nullishToOptional(z44.boolean())
|
|
983
997
|
});
|
|
984
|
-
var PageBlockTextSpan =
|
|
985
|
-
text:
|
|
986
|
-
attributes:
|
|
998
|
+
var PageBlockTextSpan = z44.object({
|
|
999
|
+
text: z44.string(),
|
|
1000
|
+
attributes: z44.array(PageBlockTextSpanAttribute)
|
|
987
1001
|
});
|
|
988
|
-
var PageBlockText =
|
|
989
|
-
spans:
|
|
1002
|
+
var PageBlockText = z44.object({
|
|
1003
|
+
spans: z44.array(PageBlockTextSpan)
|
|
990
1004
|
});
|
|
991
|
-
var PageBlockBaseV1 =
|
|
992
|
-
persistentId:
|
|
1005
|
+
var PageBlockBaseV1 = z44.object({
|
|
1006
|
+
persistentId: z44.string(),
|
|
993
1007
|
type: PageBlockTypeV1,
|
|
994
1008
|
// Element linking
|
|
995
|
-
designObjectId: nullishToOptional(
|
|
996
|
-
designObjectIds: nullishToOptional(
|
|
997
|
-
tokenType: nullishToOptional(DesignTokenType.or(
|
|
998
|
-
showNestedGroups: nullishToOptional(
|
|
999
|
-
brandId: nullishToOptional(
|
|
1009
|
+
designObjectId: nullishToOptional(z44.string()),
|
|
1010
|
+
designObjectIds: nullishToOptional(z44.array(z44.string())),
|
|
1011
|
+
tokenType: nullishToOptional(DesignTokenType.or(z44.literal("Font"))),
|
|
1012
|
+
showNestedGroups: nullishToOptional(z44.boolean()),
|
|
1013
|
+
brandId: nullishToOptional(z44.string()),
|
|
1000
1014
|
// Rich text
|
|
1001
1015
|
text: nullishToOptional(PageBlockText),
|
|
1002
|
-
caption: nullishToOptional(
|
|
1003
|
-
headingType: nullishToOptional(
|
|
1016
|
+
caption: nullishToOptional(z44.string()),
|
|
1017
|
+
headingType: nullishToOptional(z44.number().min(1).max(3)),
|
|
1004
1018
|
codeLanguage: nullishToOptional(PageBlockCodeLanguage),
|
|
1005
1019
|
calloutType: nullishToOptional(PageBlockCalloutType),
|
|
1006
|
-
urlInput: nullishToOptional(
|
|
1007
|
-
url: nullishToOptional(
|
|
1020
|
+
urlInput: nullishToOptional(z44.string()),
|
|
1021
|
+
url: nullishToOptional(z44.string()),
|
|
1008
1022
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
1009
1023
|
// Image
|
|
1010
1024
|
asset: nullishToOptional(PageBlockAsset),
|
|
1011
1025
|
alignment: nullishToOptional(PageBlockAlignment),
|
|
1012
1026
|
// Shortcuts block
|
|
1013
|
-
shortcuts: nullishToOptional(
|
|
1027
|
+
shortcuts: nullishToOptional(z44.array(PageBlockShortcut)),
|
|
1014
1028
|
// Custom blocks
|
|
1015
|
-
customBlockKey: nullishToOptional(
|
|
1016
|
-
customBlockProperties: nullishToOptional(
|
|
1017
|
-
variantKey: nullishToOptional(
|
|
1029
|
+
customBlockKey: nullishToOptional(z44.string()),
|
|
1030
|
+
customBlockProperties: nullishToOptional(z44.array(PageBlockCustomBlockPropertyValue)),
|
|
1031
|
+
variantKey: nullishToOptional(z44.string()),
|
|
1018
1032
|
// Figma frames
|
|
1019
1033
|
figmaFrameProperties: nullishToOptional(PageBlockFigmaFrameProperties),
|
|
1020
|
-
figmaFrames: nullishToOptional(
|
|
1034
|
+
figmaFrames: nullishToOptional(z44.array(PageBlockFrame)),
|
|
1021
1035
|
// Generic
|
|
1022
1036
|
size: nullishToOptional(Size),
|
|
1023
1037
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
1024
1038
|
// Render code
|
|
1025
1039
|
renderCodeProperties: nullishToOptional(PageBlockRenderCodeProperties),
|
|
1026
1040
|
// Component assets
|
|
1027
|
-
componentAssets: nullishToOptional(
|
|
1041
|
+
componentAssets: nullishToOptional(z44.array(PageBlockAssetComponent)),
|
|
1028
1042
|
// Tables
|
|
1029
1043
|
tableProperties: nullishToOptional(PageBlockTableProperties),
|
|
1030
|
-
columnId: nullishToOptional(
|
|
1044
|
+
columnId: nullishToOptional(z44.string()),
|
|
1031
1045
|
// Token spreadsheet
|
|
1032
1046
|
theme: nullishToOptional(PageBlockTheme),
|
|
1033
|
-
blacklistedElementProperties: nullishToOptional(
|
|
1047
|
+
blacklistedElementProperties: nullishToOptional(z44.array(z44.string())),
|
|
1034
1048
|
// Arbitrary
|
|
1035
|
-
userMetadata: nullishToOptional(
|
|
1049
|
+
userMetadata: nullishToOptional(z44.string())
|
|
1036
1050
|
});
|
|
1037
1051
|
var PageBlockV1 = PageBlockBaseV1.extend({
|
|
1038
|
-
children:
|
|
1052
|
+
children: z44.lazy(
|
|
1039
1053
|
() => PageBlockV1.array().nullish().transform((t) => t ?? [])
|
|
1040
1054
|
)
|
|
1041
1055
|
});
|
|
@@ -1047,256 +1061,256 @@ function traversePageBlocksV1(blocks, action) {
|
|
|
1047
1061
|
}
|
|
1048
1062
|
|
|
1049
1063
|
// src/dsm/elements/data/documentation-block-v2.ts
|
|
1050
|
-
import { z as
|
|
1051
|
-
var PageBlockLinkType =
|
|
1052
|
-
var PageBlockImageType =
|
|
1053
|
-
var PageBlockImageAlignment =
|
|
1054
|
-
var PageBlockTableCellAlignment =
|
|
1055
|
-
var PageBlockPreviewContainerSize =
|
|
1056
|
-
var PageBlockThemeDisplayMode =
|
|
1057
|
-
var PageBlockImageResourceReference =
|
|
1058
|
-
resourceId:
|
|
1059
|
-
url:
|
|
1060
|
-
});
|
|
1061
|
-
var PageBlockResourceFrameNodeReference =
|
|
1062
|
-
sourceId:
|
|
1063
|
-
frameReferenceId:
|
|
1064
|
-
});
|
|
1065
|
-
var PageBlockImageReference =
|
|
1064
|
+
import { z as z45 } from "zod";
|
|
1065
|
+
var PageBlockLinkType = z45.enum(["DocumentationItem", "PageHeading", "Url"]);
|
|
1066
|
+
var PageBlockImageType = z45.enum(["Resource", "FigmaNode"]);
|
|
1067
|
+
var PageBlockImageAlignment = z45.enum(["Left", "Center", "Stretch"]);
|
|
1068
|
+
var PageBlockTableCellAlignment = z45.enum(["Left", "Center", "Right"]);
|
|
1069
|
+
var PageBlockPreviewContainerSize = z45.enum(["Centered", "NaturalHeight"]);
|
|
1070
|
+
var PageBlockThemeDisplayMode = z45.enum(["Split", "Override"]);
|
|
1071
|
+
var PageBlockImageResourceReference = z45.object({
|
|
1072
|
+
resourceId: z45.string(),
|
|
1073
|
+
url: z45.string()
|
|
1074
|
+
});
|
|
1075
|
+
var PageBlockResourceFrameNodeReference = z45.object({
|
|
1076
|
+
sourceId: z45.string(),
|
|
1077
|
+
frameReferenceId: z45.string()
|
|
1078
|
+
});
|
|
1079
|
+
var PageBlockImageReference = z45.object({
|
|
1066
1080
|
type: PageBlockImageType,
|
|
1067
1081
|
resource: PageBlockImageResourceReference.optional(),
|
|
1068
1082
|
figmaNode: PageBlockResourceFrameNodeReference.optional()
|
|
1069
1083
|
});
|
|
1070
|
-
var PageBlockColorV2 =
|
|
1071
|
-
value:
|
|
1072
|
-
referencedTokenId:
|
|
1084
|
+
var PageBlockColorV2 = z45.object({
|
|
1085
|
+
value: z45.string(),
|
|
1086
|
+
referencedTokenId: z45.string().optional()
|
|
1073
1087
|
});
|
|
1074
|
-
var PageBlockAssetEntityMeta =
|
|
1075
|
-
title:
|
|
1076
|
-
description:
|
|
1088
|
+
var PageBlockAssetEntityMeta = z45.object({
|
|
1089
|
+
title: z45.string().optional(),
|
|
1090
|
+
description: z45.string().optional(),
|
|
1077
1091
|
backgroundColor: PageBlockColorV2.optional()
|
|
1078
1092
|
});
|
|
1079
|
-
var PageBlockFigmaNodeEntityMeta =
|
|
1080
|
-
title:
|
|
1081
|
-
description:
|
|
1093
|
+
var PageBlockFigmaNodeEntityMeta = z45.object({
|
|
1094
|
+
title: z45.string().optional(),
|
|
1095
|
+
description: z45.string().optional(),
|
|
1082
1096
|
backgroundColor: PageBlockColorV2.optional()
|
|
1083
1097
|
});
|
|
1084
|
-
var PageBlockAppearanceV2 =
|
|
1098
|
+
var PageBlockAppearanceV2 = z45.object({
|
|
1085
1099
|
itemBackgroundColor: PageBlockColorV2.optional(),
|
|
1086
|
-
numberOfColumns:
|
|
1100
|
+
numberOfColumns: z45.number().optional()
|
|
1087
1101
|
});
|
|
1088
|
-
var PageBlockItemUntypedValue =
|
|
1089
|
-
value:
|
|
1090
|
-
}).and(
|
|
1091
|
-
var PageBlockLinkV2 =
|
|
1102
|
+
var PageBlockItemUntypedValue = z45.object({
|
|
1103
|
+
value: z45.any()
|
|
1104
|
+
}).and(z45.record(z45.any()));
|
|
1105
|
+
var PageBlockLinkV2 = z45.object({
|
|
1092
1106
|
type: PageBlockLinkType,
|
|
1093
|
-
documentationItemId:
|
|
1094
|
-
pageHeadingId:
|
|
1095
|
-
url:
|
|
1096
|
-
openInNewTab:
|
|
1107
|
+
documentationItemId: z45.string().optional(),
|
|
1108
|
+
pageHeadingId: z45.string().optional(),
|
|
1109
|
+
url: z45.string().optional(),
|
|
1110
|
+
openInNewTab: z45.boolean().optional()
|
|
1097
1111
|
});
|
|
1098
|
-
var PageBlockItemV2 =
|
|
1099
|
-
id:
|
|
1112
|
+
var PageBlockItemV2 = z45.object({
|
|
1113
|
+
id: z45.string(),
|
|
1100
1114
|
linksTo: PageBlockLinkV2.optional(),
|
|
1101
|
-
props:
|
|
1115
|
+
props: z45.record(PageBlockItemUntypedValue)
|
|
1102
1116
|
});
|
|
1103
|
-
var PageBlockDataV2 =
|
|
1104
|
-
packageId:
|
|
1105
|
-
variantId:
|
|
1106
|
-
indentLevel:
|
|
1117
|
+
var PageBlockDataV2 = z45.object({
|
|
1118
|
+
packageId: z45.string(),
|
|
1119
|
+
variantId: z45.string().optional(),
|
|
1120
|
+
indentLevel: z45.number(),
|
|
1107
1121
|
appearance: PageBlockAppearanceV2.optional(),
|
|
1108
|
-
items:
|
|
1122
|
+
items: z45.array(PageBlockItemV2)
|
|
1109
1123
|
});
|
|
1110
|
-
var PageBlockItemAssetValue =
|
|
1111
|
-
selectedPropertyIds:
|
|
1112
|
-
showSearch:
|
|
1124
|
+
var PageBlockItemAssetValue = z45.object({
|
|
1125
|
+
selectedPropertyIds: z45.array(z45.string()).optional(),
|
|
1126
|
+
showSearch: z45.boolean().optional(),
|
|
1113
1127
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1114
1128
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1115
|
-
value:
|
|
1116
|
-
|
|
1117
|
-
entityId:
|
|
1118
|
-
entityType:
|
|
1129
|
+
value: z45.array(
|
|
1130
|
+
z45.object({
|
|
1131
|
+
entityId: z45.string(),
|
|
1132
|
+
entityType: z45.enum(["Asset", "AssetGroup"]),
|
|
1119
1133
|
entityMeta: PageBlockAssetEntityMeta.optional()
|
|
1120
1134
|
})
|
|
1121
1135
|
).default([])
|
|
1122
1136
|
});
|
|
1123
|
-
var PageBlockItemAssetPropertyValue =
|
|
1124
|
-
value:
|
|
1137
|
+
var PageBlockItemAssetPropertyValue = z45.object({
|
|
1138
|
+
value: z45.array(z45.string()).default([])
|
|
1125
1139
|
});
|
|
1126
|
-
var PageBlockItemBooleanValue =
|
|
1127
|
-
value:
|
|
1140
|
+
var PageBlockItemBooleanValue = z45.object({
|
|
1141
|
+
value: z45.boolean()
|
|
1128
1142
|
});
|
|
1129
|
-
var PageBlockItemCodeValue =
|
|
1143
|
+
var PageBlockItemCodeValue = z45.object({
|
|
1130
1144
|
format: PageBlockCodeLanguage.optional(),
|
|
1131
|
-
caption:
|
|
1132
|
-
value:
|
|
1133
|
-
});
|
|
1134
|
-
var PageBlockItemSandboxValue =
|
|
1135
|
-
showCode:
|
|
1136
|
-
showControls:
|
|
1137
|
-
backgroundColor:
|
|
1138
|
-
alignPreview:
|
|
1139
|
-
previewHeight:
|
|
1140
|
-
value:
|
|
1141
|
-
});
|
|
1142
|
-
var PageBlockItemColorValue =
|
|
1143
|
-
var PageBlockItemComponentValue =
|
|
1144
|
-
selectedPropertyIds:
|
|
1145
|
-
value:
|
|
1146
|
-
|
|
1147
|
-
entityId:
|
|
1148
|
-
entityType:
|
|
1145
|
+
caption: z45.string().optional(),
|
|
1146
|
+
value: z45.string()
|
|
1147
|
+
});
|
|
1148
|
+
var PageBlockItemSandboxValue = z45.object({
|
|
1149
|
+
showCode: z45.boolean().optional(),
|
|
1150
|
+
showControls: z45.boolean().optional(),
|
|
1151
|
+
backgroundColor: z45.string().optional(),
|
|
1152
|
+
alignPreview: z45.enum(["Left", "Center"]).optional(),
|
|
1153
|
+
previewHeight: z45.number().optional(),
|
|
1154
|
+
value: z45.string()
|
|
1155
|
+
});
|
|
1156
|
+
var PageBlockItemColorValue = z45.record(z45.any());
|
|
1157
|
+
var PageBlockItemComponentValue = z45.object({
|
|
1158
|
+
selectedPropertyIds: z45.array(z45.string()).optional(),
|
|
1159
|
+
value: z45.array(
|
|
1160
|
+
z45.object({
|
|
1161
|
+
entityId: z45.string(),
|
|
1162
|
+
entityType: z45.enum(["Component", "ComponentGroup"])
|
|
1149
1163
|
})
|
|
1150
1164
|
).default([])
|
|
1151
1165
|
});
|
|
1152
|
-
var PageBlockItemComponentPropertyValue =
|
|
1153
|
-
value:
|
|
1154
|
-
});
|
|
1155
|
-
var PageBlockItemDividerValue =
|
|
1156
|
-
var PageBlockItemEmbedValue =
|
|
1157
|
-
value:
|
|
1158
|
-
caption:
|
|
1159
|
-
height:
|
|
1160
|
-
openGraph:
|
|
1161
|
-
title:
|
|
1162
|
-
description:
|
|
1163
|
-
imageUrl:
|
|
1166
|
+
var PageBlockItemComponentPropertyValue = z45.object({
|
|
1167
|
+
value: z45.string()
|
|
1168
|
+
});
|
|
1169
|
+
var PageBlockItemDividerValue = z45.object({});
|
|
1170
|
+
var PageBlockItemEmbedValue = z45.object({
|
|
1171
|
+
value: z45.string().optional(),
|
|
1172
|
+
caption: z45.string().optional(),
|
|
1173
|
+
height: z45.number().optional(),
|
|
1174
|
+
openGraph: z45.object({
|
|
1175
|
+
title: z45.string().optional(),
|
|
1176
|
+
description: z45.string().optional(),
|
|
1177
|
+
imageUrl: z45.string().optional()
|
|
1164
1178
|
}).optional()
|
|
1165
1179
|
});
|
|
1166
|
-
var PageBlockItemFigmaNodeValue =
|
|
1167
|
-
showSearch:
|
|
1180
|
+
var PageBlockItemFigmaNodeValue = z45.object({
|
|
1181
|
+
showSearch: z45.boolean().optional(),
|
|
1168
1182
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1169
1183
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1170
|
-
showFrameDetails:
|
|
1171
|
-
value:
|
|
1172
|
-
|
|
1173
|
-
entityId:
|
|
1184
|
+
showFrameDetails: z45.boolean().optional(),
|
|
1185
|
+
value: z45.array(
|
|
1186
|
+
z45.object({
|
|
1187
|
+
entityId: z45.string(),
|
|
1174
1188
|
entityMeta: PageBlockFigmaNodeEntityMeta.optional()
|
|
1175
1189
|
})
|
|
1176
1190
|
).default([])
|
|
1177
1191
|
});
|
|
1178
|
-
var PageBlockItemImageValue =
|
|
1179
|
-
alt:
|
|
1180
|
-
caption:
|
|
1192
|
+
var PageBlockItemImageValue = z45.object({
|
|
1193
|
+
alt: z45.string().optional(),
|
|
1194
|
+
caption: z45.string().optional(),
|
|
1181
1195
|
alignment: PageBlockImageAlignment.optional(),
|
|
1182
1196
|
value: PageBlockImageReference.optional()
|
|
1183
1197
|
});
|
|
1184
|
-
var PageBlockItemMarkdownValue =
|
|
1185
|
-
value:
|
|
1198
|
+
var PageBlockItemMarkdownValue = z45.object({
|
|
1199
|
+
value: z45.string()
|
|
1186
1200
|
});
|
|
1187
|
-
var PageBlockItemMultiRichTextValue =
|
|
1201
|
+
var PageBlockItemMultiRichTextValue = z45.object({
|
|
1188
1202
|
value: PageBlockText.array()
|
|
1189
1203
|
});
|
|
1190
|
-
var PageBlockItemMultiSelectValue =
|
|
1191
|
-
value:
|
|
1204
|
+
var PageBlockItemMultiSelectValue = z45.object({
|
|
1205
|
+
value: z45.array(z45.string()).default([])
|
|
1192
1206
|
});
|
|
1193
|
-
var PageBlockItemNumberValue =
|
|
1194
|
-
value:
|
|
1207
|
+
var PageBlockItemNumberValue = z45.object({
|
|
1208
|
+
value: z45.number()
|
|
1195
1209
|
});
|
|
1196
|
-
var PageBlockItemRichTextValue =
|
|
1210
|
+
var PageBlockItemRichTextValue = z45.object({
|
|
1197
1211
|
value: PageBlockText,
|
|
1198
1212
|
calloutType: PageBlockCalloutType.optional()
|
|
1199
1213
|
});
|
|
1200
|
-
var PageBlockItemSingleSelectValue =
|
|
1201
|
-
value:
|
|
1214
|
+
var PageBlockItemSingleSelectValue = z45.object({
|
|
1215
|
+
value: z45.string()
|
|
1202
1216
|
});
|
|
1203
|
-
var PageBlockItemStorybookValue =
|
|
1204
|
-
caption:
|
|
1205
|
-
height:
|
|
1206
|
-
embedUrl:
|
|
1207
|
-
value:
|
|
1217
|
+
var PageBlockItemStorybookValue = z45.object({
|
|
1218
|
+
caption: z45.string().optional(),
|
|
1219
|
+
height: z45.number().optional(),
|
|
1220
|
+
embedUrl: z45.string().optional(),
|
|
1221
|
+
value: z45.string().optional()
|
|
1208
1222
|
});
|
|
1209
|
-
var PageBlockItemTextValue =
|
|
1210
|
-
value:
|
|
1223
|
+
var PageBlockItemTextValue = z45.object({
|
|
1224
|
+
value: z45.string()
|
|
1211
1225
|
});
|
|
1212
|
-
var PageBlockItemTokenValue =
|
|
1213
|
-
selectedPropertyIds:
|
|
1214
|
-
selectedThemeIds:
|
|
1226
|
+
var PageBlockItemTokenValue = z45.object({
|
|
1227
|
+
selectedPropertyIds: z45.array(z45.string()).optional(),
|
|
1228
|
+
selectedThemeIds: z45.array(z45.string()).optional(),
|
|
1215
1229
|
themeDisplayMode: PageBlockThemeDisplayMode.optional(),
|
|
1216
|
-
value:
|
|
1217
|
-
|
|
1218
|
-
entityId:
|
|
1219
|
-
entityType:
|
|
1220
|
-
entityMeta:
|
|
1221
|
-
showNestedGroups:
|
|
1230
|
+
value: z45.array(
|
|
1231
|
+
z45.object({
|
|
1232
|
+
entityId: z45.string(),
|
|
1233
|
+
entityType: z45.enum(["Token", "TokenGroup"]),
|
|
1234
|
+
entityMeta: z45.object({
|
|
1235
|
+
showNestedGroups: z45.boolean().optional()
|
|
1222
1236
|
}).optional()
|
|
1223
1237
|
})
|
|
1224
1238
|
).default([])
|
|
1225
1239
|
});
|
|
1226
|
-
var PageBlockItemTokenPropertyValue =
|
|
1227
|
-
selectedPropertyIds:
|
|
1228
|
-
selectedThemeIds:
|
|
1229
|
-
value:
|
|
1240
|
+
var PageBlockItemTokenPropertyValue = z45.object({
|
|
1241
|
+
selectedPropertyIds: z45.array(z45.string()).optional(),
|
|
1242
|
+
selectedThemeIds: z45.array(z45.string()).optional(),
|
|
1243
|
+
value: z45.array(z45.string()).default([])
|
|
1230
1244
|
});
|
|
1231
|
-
var PageBlockItemTokenTypeValue =
|
|
1232
|
-
value:
|
|
1245
|
+
var PageBlockItemTokenTypeValue = z45.object({
|
|
1246
|
+
value: z45.array(DesignTokenType).default([])
|
|
1233
1247
|
});
|
|
1234
|
-
var PageBlockItemUrlValue =
|
|
1235
|
-
value:
|
|
1248
|
+
var PageBlockItemUrlValue = z45.object({
|
|
1249
|
+
value: z45.string()
|
|
1236
1250
|
});
|
|
1237
|
-
var PageBlockItemTableRichTextNode =
|
|
1238
|
-
type:
|
|
1239
|
-
id:
|
|
1251
|
+
var PageBlockItemTableRichTextNode = z45.object({
|
|
1252
|
+
type: z45.literal("RichText"),
|
|
1253
|
+
id: z45.string(),
|
|
1240
1254
|
value: PageBlockItemRichTextValue.shape.value
|
|
1241
1255
|
});
|
|
1242
|
-
var PageBlockItemTableMultiRichTextNode =
|
|
1243
|
-
type:
|
|
1256
|
+
var PageBlockItemTableMultiRichTextNode = z45.object({
|
|
1257
|
+
type: z45.literal("MultiRichText"),
|
|
1244
1258
|
value: PageBlockItemMultiRichTextValue.shape.value
|
|
1245
1259
|
});
|
|
1246
|
-
var PageBlockItemTableImageNode =
|
|
1247
|
-
type:
|
|
1248
|
-
id:
|
|
1260
|
+
var PageBlockItemTableImageNode = z45.object({
|
|
1261
|
+
type: z45.literal("Image"),
|
|
1262
|
+
id: z45.string(),
|
|
1249
1263
|
caption: PageBlockItemImageValue.shape.caption,
|
|
1250
1264
|
value: PageBlockItemImageValue.shape.value
|
|
1251
1265
|
});
|
|
1252
|
-
var PageBlockItemTableNode =
|
|
1266
|
+
var PageBlockItemTableNode = z45.discriminatedUnion("type", [
|
|
1253
1267
|
PageBlockItemTableRichTextNode,
|
|
1254
1268
|
// PageBlockItemTableMultiRichTextNode,
|
|
1255
1269
|
PageBlockItemTableImageNode
|
|
1256
1270
|
]);
|
|
1257
|
-
var PageBlockItemTableCell =
|
|
1258
|
-
id:
|
|
1259
|
-
nodes:
|
|
1260
|
-
columnWidth:
|
|
1271
|
+
var PageBlockItemTableCell = z45.object({
|
|
1272
|
+
id: z45.string(),
|
|
1273
|
+
nodes: z45.array(PageBlockItemTableNode),
|
|
1274
|
+
columnWidth: z45.number().optional(),
|
|
1261
1275
|
alignment: PageBlockTableCellAlignment
|
|
1262
1276
|
});
|
|
1263
|
-
var PageBlockItemTableRow =
|
|
1264
|
-
cells:
|
|
1277
|
+
var PageBlockItemTableRow = z45.object({
|
|
1278
|
+
cells: z45.array(PageBlockItemTableCell)
|
|
1265
1279
|
});
|
|
1266
|
-
var PageBlockItemTableValue =
|
|
1267
|
-
highlightHeaderColumn:
|
|
1268
|
-
highlightHeaderRow:
|
|
1269
|
-
showBorder:
|
|
1270
|
-
value:
|
|
1280
|
+
var PageBlockItemTableValue = z45.object({
|
|
1281
|
+
highlightHeaderColumn: z45.boolean().optional(),
|
|
1282
|
+
highlightHeaderRow: z45.boolean().optional(),
|
|
1283
|
+
showBorder: z45.boolean().optional(),
|
|
1284
|
+
value: z45.array(PageBlockItemTableRow).default([])
|
|
1271
1285
|
});
|
|
1272
1286
|
|
|
1273
1287
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
1274
|
-
import { z as
|
|
1288
|
+
import { z as z49 } from "zod";
|
|
1275
1289
|
|
|
1276
1290
|
// src/dsm/elements/data/documentation-v1.ts
|
|
1277
|
-
import { z as
|
|
1291
|
+
import { z as z48 } from "zod";
|
|
1278
1292
|
|
|
1279
1293
|
// src/dsm/elements/data/item-header-v1.ts
|
|
1280
|
-
import { z as
|
|
1294
|
+
import { z as z47 } from "zod";
|
|
1281
1295
|
|
|
1282
1296
|
// src/dsm/elements/data/item-header.ts
|
|
1283
|
-
import { z as
|
|
1284
|
-
var DocumentationItemHeaderAlignmentSchema =
|
|
1285
|
-
var DocumentationItemHeaderImageScaleTypeSchema =
|
|
1297
|
+
import { z as z46 } from "zod";
|
|
1298
|
+
var DocumentationItemHeaderAlignmentSchema = z46.enum(["Left", "Center"]);
|
|
1299
|
+
var DocumentationItemHeaderImageScaleTypeSchema = z46.enum(["AspectFill", "AspectFit"]);
|
|
1286
1300
|
var DocumentationItemHeaderAlignment = DocumentationItemHeaderAlignmentSchema.enum;
|
|
1287
1301
|
var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTypeSchema.enum;
|
|
1288
1302
|
|
|
1289
1303
|
// src/dsm/elements/data/item-header-v1.ts
|
|
1290
|
-
var DocumentationItemHeaderV1 =
|
|
1291
|
-
description:
|
|
1304
|
+
var DocumentationItemHeaderV1 = z47.object({
|
|
1305
|
+
description: z47.string(),
|
|
1292
1306
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1293
1307
|
foregroundColor: ColorTokenData.nullish(),
|
|
1294
1308
|
backgroundColor: ColorTokenData.nullish(),
|
|
1295
1309
|
backgroundImageAsset: PageBlockAsset.nullish(),
|
|
1296
1310
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1297
|
-
showBackgroundOverlay:
|
|
1298
|
-
showCoverText:
|
|
1299
|
-
minHeight:
|
|
1311
|
+
showBackgroundOverlay: z47.boolean(),
|
|
1312
|
+
showCoverText: z47.boolean(),
|
|
1313
|
+
minHeight: z47.number().nullish()
|
|
1300
1314
|
});
|
|
1301
1315
|
var defaultDocumentationItemHeaderV1 = {
|
|
1302
1316
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -1307,10 +1321,10 @@ var defaultDocumentationItemHeaderV1 = {
|
|
|
1307
1321
|
};
|
|
1308
1322
|
|
|
1309
1323
|
// src/dsm/elements/data/documentation-v1.ts
|
|
1310
|
-
var DocumentationItemConfigurationV1 =
|
|
1311
|
-
showSidebar:
|
|
1312
|
-
isPrivate:
|
|
1313
|
-
isHidden:
|
|
1324
|
+
var DocumentationItemConfigurationV1 = z48.object({
|
|
1325
|
+
showSidebar: z48.boolean(),
|
|
1326
|
+
isPrivate: z48.boolean().optional(),
|
|
1327
|
+
isHidden: z48.boolean().optional(),
|
|
1314
1328
|
header: DocumentationItemHeaderV1
|
|
1315
1329
|
});
|
|
1316
1330
|
var defaultDocumentationItemConfigurationV1 = {
|
|
@@ -1319,29 +1333,29 @@ var defaultDocumentationItemConfigurationV1 = {
|
|
|
1319
1333
|
};
|
|
1320
1334
|
|
|
1321
1335
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
1322
|
-
var DocumentationPageDataV1 =
|
|
1323
|
-
blocks:
|
|
1336
|
+
var DocumentationPageDataV1 = z49.object({
|
|
1337
|
+
blocks: z49.array(PageBlockV1),
|
|
1324
1338
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1325
1339
|
});
|
|
1326
1340
|
|
|
1327
1341
|
// src/dsm/elements/data/documentation-page-v2.ts
|
|
1328
|
-
import { z as
|
|
1342
|
+
import { z as z52 } from "zod";
|
|
1329
1343
|
|
|
1330
1344
|
// src/dsm/elements/data/documentation-v2.ts
|
|
1331
|
-
import { z as
|
|
1345
|
+
import { z as z51 } from "zod";
|
|
1332
1346
|
|
|
1333
1347
|
// src/dsm/elements/data/item-header-v2.ts
|
|
1334
|
-
import { z as
|
|
1335
|
-
var DocumentationItemHeaderV2 =
|
|
1336
|
-
description:
|
|
1348
|
+
import { z as z50 } from "zod";
|
|
1349
|
+
var DocumentationItemHeaderV2 = z50.object({
|
|
1350
|
+
description: z50.string(),
|
|
1337
1351
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1338
1352
|
foregroundColor: PageBlockColorV2.nullish(),
|
|
1339
1353
|
backgroundColor: PageBlockColorV2.nullish(),
|
|
1340
1354
|
backgroundImageAsset: PageBlockImageReference.nullish(),
|
|
1341
1355
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1342
|
-
showBackgroundOverlay:
|
|
1343
|
-
showCoverText:
|
|
1344
|
-
minHeight:
|
|
1356
|
+
showBackgroundOverlay: z50.boolean(),
|
|
1357
|
+
showCoverText: z50.boolean(),
|
|
1358
|
+
minHeight: z50.number().nullish()
|
|
1345
1359
|
});
|
|
1346
1360
|
var defaultDocumentationItemHeaderV2 = {
|
|
1347
1361
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -1352,10 +1366,10 @@ var defaultDocumentationItemHeaderV2 = {
|
|
|
1352
1366
|
};
|
|
1353
1367
|
|
|
1354
1368
|
// src/dsm/elements/data/documentation-v2.ts
|
|
1355
|
-
var DocumentationItemConfigurationV2 =
|
|
1356
|
-
showSidebar:
|
|
1357
|
-
isPrivate:
|
|
1358
|
-
isHidden:
|
|
1369
|
+
var DocumentationItemConfigurationV2 = z51.object({
|
|
1370
|
+
showSidebar: z51.boolean(),
|
|
1371
|
+
isPrivate: z51.boolean().optional(),
|
|
1372
|
+
isHidden: z51.boolean().optional(),
|
|
1359
1373
|
header: DocumentationItemHeaderV2
|
|
1360
1374
|
});
|
|
1361
1375
|
var defaultDocumentationItemConfigurationV2 = {
|
|
@@ -1366,122 +1380,122 @@ var defaultDocumentationItemConfigurationV2 = {
|
|
|
1366
1380
|
};
|
|
1367
1381
|
|
|
1368
1382
|
// src/dsm/elements/data/documentation-page-v2.ts
|
|
1369
|
-
var DocumentationPageDataV2 =
|
|
1383
|
+
var DocumentationPageDataV2 = z52.object({
|
|
1370
1384
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1371
1385
|
});
|
|
1372
1386
|
|
|
1373
1387
|
// src/dsm/elements/data/documentation-section-v2.ts
|
|
1374
|
-
import { z as
|
|
1388
|
+
import { z as z55 } from "zod";
|
|
1375
1389
|
|
|
1376
1390
|
// src/dsm/elements/page-block-v2.ts
|
|
1377
|
-
import { z as
|
|
1391
|
+
import { z as z54 } from "zod";
|
|
1378
1392
|
|
|
1379
1393
|
// src/dsm/elements/base.ts
|
|
1380
|
-
import { z as
|
|
1381
|
-
var DesignElementOrigin =
|
|
1382
|
-
id:
|
|
1383
|
-
sourceId:
|
|
1384
|
-
name:
|
|
1385
|
-
});
|
|
1386
|
-
var DesignElementBase =
|
|
1387
|
-
id:
|
|
1388
|
-
persistentId:
|
|
1394
|
+
import { z as z53 } from "zod";
|
|
1395
|
+
var DesignElementOrigin = z53.object({
|
|
1396
|
+
id: z53.string(),
|
|
1397
|
+
sourceId: z53.string(),
|
|
1398
|
+
name: z53.string()
|
|
1399
|
+
});
|
|
1400
|
+
var DesignElementBase = z53.object({
|
|
1401
|
+
id: z53.string(),
|
|
1402
|
+
persistentId: z53.string(),
|
|
1389
1403
|
meta: ObjectMeta,
|
|
1390
|
-
designSystemVersionId:
|
|
1391
|
-
createdAt:
|
|
1392
|
-
updatedAt:
|
|
1404
|
+
designSystemVersionId: z53.string(),
|
|
1405
|
+
createdAt: z53.coerce.date(),
|
|
1406
|
+
updatedAt: z53.coerce.date()
|
|
1393
1407
|
});
|
|
1394
1408
|
var DesignElementImportedBase = DesignElementBase.extend({
|
|
1395
1409
|
origin: DesignElementOrigin
|
|
1396
1410
|
});
|
|
1397
|
-
var DesignElementGroupablePart =
|
|
1398
|
-
parentPersistentId:
|
|
1399
|
-
sortOrder:
|
|
1411
|
+
var DesignElementGroupablePart = z53.object({
|
|
1412
|
+
parentPersistentId: z53.string().optional(),
|
|
1413
|
+
sortOrder: z53.number()
|
|
1400
1414
|
});
|
|
1401
1415
|
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
1402
1416
|
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
1403
|
-
parentPersistentId:
|
|
1417
|
+
parentPersistentId: z53.string()
|
|
1404
1418
|
});
|
|
1405
|
-
var DesignElementBrandedPart =
|
|
1406
|
-
brandPersistentId:
|
|
1419
|
+
var DesignElementBrandedPart = z53.object({
|
|
1420
|
+
brandPersistentId: z53.string()
|
|
1407
1421
|
});
|
|
1408
|
-
var DesignElementSlugPart =
|
|
1409
|
-
slug:
|
|
1410
|
-
userSlug:
|
|
1422
|
+
var DesignElementSlugPart = z53.object({
|
|
1423
|
+
slug: z53.string().optional(),
|
|
1424
|
+
userSlug: z53.string().optional()
|
|
1411
1425
|
});
|
|
1412
1426
|
|
|
1413
1427
|
// src/dsm/elements/page-block-v2.ts
|
|
1414
1428
|
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
1415
1429
|
data: PageBlockDataV2
|
|
1416
1430
|
});
|
|
1417
|
-
var PageBlockEditorModelV2 =
|
|
1418
|
-
id:
|
|
1419
|
-
type:
|
|
1431
|
+
var PageBlockEditorModelV2 = z54.object({
|
|
1432
|
+
id: z54.string(),
|
|
1433
|
+
type: z54.literal("Block"),
|
|
1420
1434
|
data: PageBlockDataV2
|
|
1421
1435
|
});
|
|
1422
1436
|
|
|
1423
1437
|
// src/dsm/elements/data/documentation-section-v2.ts
|
|
1424
|
-
var PageSectionTypeV2 =
|
|
1425
|
-
var PageSectionColumnV2 =
|
|
1426
|
-
id:
|
|
1427
|
-
blocks:
|
|
1428
|
-
});
|
|
1429
|
-
var PageSectionItemV2 =
|
|
1430
|
-
id:
|
|
1431
|
-
title:
|
|
1432
|
-
columns:
|
|
1433
|
-
});
|
|
1434
|
-
var PageSectionPaddingV2 =
|
|
1435
|
-
top:
|
|
1436
|
-
bottom:
|
|
1437
|
-
left:
|
|
1438
|
-
right:
|
|
1439
|
-
});
|
|
1440
|
-
var PageSectionAppearanceV2 =
|
|
1441
|
-
expandToEdges:
|
|
1442
|
-
contentExpandToEdges:
|
|
1438
|
+
var PageSectionTypeV2 = z55.enum(["Tabs"]);
|
|
1439
|
+
var PageSectionColumnV2 = z55.object({
|
|
1440
|
+
id: z55.string(),
|
|
1441
|
+
blocks: z55.array(PageBlockEditorModelV2)
|
|
1442
|
+
});
|
|
1443
|
+
var PageSectionItemV2 = z55.object({
|
|
1444
|
+
id: z55.string(),
|
|
1445
|
+
title: z55.string(),
|
|
1446
|
+
columns: z55.array(PageSectionColumnV2)
|
|
1447
|
+
});
|
|
1448
|
+
var PageSectionPaddingV2 = z55.object({
|
|
1449
|
+
top: z55.number().optional(),
|
|
1450
|
+
bottom: z55.number().optional(),
|
|
1451
|
+
left: z55.number().optional(),
|
|
1452
|
+
right: z55.number().optional()
|
|
1453
|
+
});
|
|
1454
|
+
var PageSectionAppearanceV2 = z55.object({
|
|
1455
|
+
expandToEdges: z55.boolean(),
|
|
1456
|
+
contentExpandToEdges: z55.boolean(),
|
|
1443
1457
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1444
1458
|
foregroundColor: PageBlockColorV2.optional(),
|
|
1445
1459
|
padding: PageSectionPaddingV2.optional()
|
|
1446
1460
|
});
|
|
1447
|
-
var PageSectionEditorModelV2 =
|
|
1448
|
-
id:
|
|
1449
|
-
type:
|
|
1450
|
-
variantId:
|
|
1461
|
+
var PageSectionEditorModelV2 = z55.object({
|
|
1462
|
+
id: z55.string(),
|
|
1463
|
+
type: z55.literal("Section"),
|
|
1464
|
+
variantId: z55.string().optional(),
|
|
1451
1465
|
sectionType: PageSectionTypeV2,
|
|
1452
1466
|
appearance: PageSectionAppearanceV2,
|
|
1453
|
-
items:
|
|
1467
|
+
items: z55.array(PageSectionItemV2)
|
|
1454
1468
|
});
|
|
1455
1469
|
|
|
1456
1470
|
// src/dsm/elements/data/duration.ts
|
|
1457
|
-
import { z as
|
|
1458
|
-
var DurationUnit =
|
|
1459
|
-
var DurationValue =
|
|
1471
|
+
import { z as z56 } from "zod";
|
|
1472
|
+
var DurationUnit = z56.enum(["Ms"]);
|
|
1473
|
+
var DurationValue = z56.object({
|
|
1460
1474
|
unit: DurationUnit,
|
|
1461
|
-
measure:
|
|
1475
|
+
measure: z56.number()
|
|
1462
1476
|
});
|
|
1463
1477
|
var DurationTokenData = tokenAliasOrValue(DurationValue);
|
|
1464
1478
|
|
|
1465
1479
|
// src/dsm/elements/data/figma-file-structure.ts
|
|
1466
|
-
import { z as
|
|
1467
|
-
var FigmaFileStructureNodeType =
|
|
1468
|
-
var FigmaFileStructureNodeBase =
|
|
1469
|
-
id:
|
|
1470
|
-
name:
|
|
1480
|
+
import { z as z57 } from "zod";
|
|
1481
|
+
var FigmaFileStructureNodeType = z57.enum(["DOCUMENT", "CANVAS", "FRAME", "COMPONENT", "COMPONENT_SET"]);
|
|
1482
|
+
var FigmaFileStructureNodeBase = z57.object({
|
|
1483
|
+
id: z57.string(),
|
|
1484
|
+
name: z57.string(),
|
|
1471
1485
|
type: FigmaFileStructureNodeType,
|
|
1472
1486
|
size: SizeOrUndefined,
|
|
1473
|
-
parentComponentSetId:
|
|
1487
|
+
parentComponentSetId: z57.string().optional()
|
|
1474
1488
|
});
|
|
1475
1489
|
var FigmaFileStructureNode = FigmaFileStructureNodeBase.extend({
|
|
1476
|
-
children:
|
|
1490
|
+
children: z57.lazy(() => FigmaFileStructureNode.array())
|
|
1477
1491
|
});
|
|
1478
|
-
var FigmaFileStructureStatistics =
|
|
1479
|
-
frames:
|
|
1480
|
-
components:
|
|
1481
|
-
componentSets:
|
|
1492
|
+
var FigmaFileStructureStatistics = z57.object({
|
|
1493
|
+
frames: z57.number().nullable().optional().transform((v) => v ?? 0),
|
|
1494
|
+
components: z57.number().nullable().optional().transform((v) => v ?? 0),
|
|
1495
|
+
componentSets: z57.number().nullable().optional().transform((v) => v ?? 0)
|
|
1482
1496
|
});
|
|
1483
|
-
var FigmaFileStructureElementData =
|
|
1484
|
-
value:
|
|
1497
|
+
var FigmaFileStructureElementData = z57.object({
|
|
1498
|
+
value: z57.object({
|
|
1485
1499
|
structure: FigmaFileStructureNode,
|
|
1486
1500
|
assetsInFile: FigmaFileStructureStatistics
|
|
1487
1501
|
})
|
|
@@ -1498,119 +1512,119 @@ function recursiveFigmaFileStructureToMap(node, map) {
|
|
|
1498
1512
|
}
|
|
1499
1513
|
|
|
1500
1514
|
// src/dsm/elements/data/figma-node-reference.ts
|
|
1501
|
-
import { z as
|
|
1502
|
-
var FigmaNodeReferenceData =
|
|
1503
|
-
structureElementId:
|
|
1504
|
-
nodeId:
|
|
1505
|
-
fileId:
|
|
1506
|
-
valid:
|
|
1515
|
+
import { z as z58 } from "zod";
|
|
1516
|
+
var FigmaNodeReferenceData = z58.object({
|
|
1517
|
+
structureElementId: z58.string(),
|
|
1518
|
+
nodeId: z58.string(),
|
|
1519
|
+
fileId: z58.string().optional(),
|
|
1520
|
+
valid: z58.boolean(),
|
|
1507
1521
|
// Asset data
|
|
1508
|
-
assetId:
|
|
1509
|
-
assetScale:
|
|
1510
|
-
assetWidth:
|
|
1511
|
-
assetHeight:
|
|
1512
|
-
assetUrl:
|
|
1513
|
-
assetOriginKey:
|
|
1514
|
-
});
|
|
1515
|
-
var FigmaNodeReferenceElementData =
|
|
1522
|
+
assetId: z58.string().optional(),
|
|
1523
|
+
assetScale: z58.number().optional(),
|
|
1524
|
+
assetWidth: z58.number().optional(),
|
|
1525
|
+
assetHeight: z58.number().optional(),
|
|
1526
|
+
assetUrl: z58.string().optional(),
|
|
1527
|
+
assetOriginKey: z58.string().optional()
|
|
1528
|
+
});
|
|
1529
|
+
var FigmaNodeReferenceElementData = z58.object({
|
|
1516
1530
|
value: FigmaNodeReferenceData
|
|
1517
1531
|
});
|
|
1518
1532
|
|
|
1519
1533
|
// src/dsm/elements/data/font-family.ts
|
|
1520
|
-
import { z as
|
|
1521
|
-
var FontFamilyValue =
|
|
1534
|
+
import { z as z59 } from "zod";
|
|
1535
|
+
var FontFamilyValue = z59.string();
|
|
1522
1536
|
var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
|
|
1523
1537
|
|
|
1524
1538
|
// src/dsm/elements/data/font-size.ts
|
|
1525
|
-
import { z as
|
|
1526
|
-
var FontSizeUnit =
|
|
1527
|
-
var FontSizeValue =
|
|
1539
|
+
import { z as z60 } from "zod";
|
|
1540
|
+
var FontSizeUnit = z60.enum(["Pixels", "Rem", "Percent"]);
|
|
1541
|
+
var FontSizeValue = z60.object({
|
|
1528
1542
|
unit: FontSizeUnit,
|
|
1529
|
-
measure:
|
|
1543
|
+
measure: z60.number()
|
|
1530
1544
|
});
|
|
1531
1545
|
var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
|
|
1532
1546
|
|
|
1533
1547
|
// src/dsm/elements/data/font-weight.ts
|
|
1534
|
-
import { z as
|
|
1535
|
-
var FontWeightValue =
|
|
1548
|
+
import { z as z61 } from "zod";
|
|
1549
|
+
var FontWeightValue = z61.string();
|
|
1536
1550
|
var FontWeightTokenData = tokenAliasOrValue(FontWeightValue);
|
|
1537
1551
|
|
|
1538
1552
|
// src/dsm/elements/data/gradient.ts
|
|
1539
|
-
import { z as
|
|
1540
|
-
var GradientType =
|
|
1541
|
-
var GradientStop =
|
|
1542
|
-
position:
|
|
1553
|
+
import { z as z62 } from "zod";
|
|
1554
|
+
var GradientType = z62.enum(["Linear", "Radial", "Angular"]);
|
|
1555
|
+
var GradientStop = z62.object({
|
|
1556
|
+
position: z62.number(),
|
|
1543
1557
|
color: ColorTokenData
|
|
1544
1558
|
});
|
|
1545
|
-
var GradientLayerValue =
|
|
1559
|
+
var GradientLayerValue = z62.object({
|
|
1546
1560
|
from: Point2D,
|
|
1547
1561
|
to: Point2D,
|
|
1548
1562
|
type: GradientType,
|
|
1549
|
-
aspectRatio: nullishToOptional(
|
|
1563
|
+
aspectRatio: nullishToOptional(z62.number()),
|
|
1550
1564
|
// z.number(),
|
|
1551
|
-
stops:
|
|
1565
|
+
stops: z62.array(GradientStop).min(2)
|
|
1552
1566
|
});
|
|
1553
1567
|
var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
1554
|
-
var GradientTokenValue =
|
|
1568
|
+
var GradientTokenValue = z62.array(GradientLayerData);
|
|
1555
1569
|
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
1556
1570
|
|
|
1557
1571
|
// src/dsm/elements/data/group.ts
|
|
1558
|
-
import { z as
|
|
1559
|
-
var DocumentationGroupBehavior =
|
|
1560
|
-
var ElementGroupDataV1 =
|
|
1572
|
+
import { z as z63 } from "zod";
|
|
1573
|
+
var DocumentationGroupBehavior = z63.enum(["Group", "Tabs"]);
|
|
1574
|
+
var ElementGroupDataV1 = z63.object({
|
|
1561
1575
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1562
1576
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1563
1577
|
});
|
|
1564
|
-
var ElementGroupDataV2 =
|
|
1578
|
+
var ElementGroupDataV2 = z63.object({
|
|
1565
1579
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1566
1580
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1567
1581
|
});
|
|
1568
1582
|
|
|
1569
1583
|
// src/dsm/elements/data/letter-spacing.ts
|
|
1570
|
-
import { z as
|
|
1571
|
-
var LetterSpacingUnit =
|
|
1572
|
-
var LetterSpacingValue =
|
|
1584
|
+
import { z as z64 } from "zod";
|
|
1585
|
+
var LetterSpacingUnit = z64.enum(["Pixels", "Rem", "Percent"]);
|
|
1586
|
+
var LetterSpacingValue = z64.object({
|
|
1573
1587
|
unit: LetterSpacingUnit,
|
|
1574
|
-
measure:
|
|
1588
|
+
measure: z64.number()
|
|
1575
1589
|
});
|
|
1576
1590
|
var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
|
|
1577
1591
|
|
|
1578
1592
|
// src/dsm/elements/data/line-height.ts
|
|
1579
|
-
import { z as
|
|
1580
|
-
var LineHeightUnit =
|
|
1581
|
-
var LineHeightValue =
|
|
1593
|
+
import { z as z65 } from "zod";
|
|
1594
|
+
var LineHeightUnit = z65.enum(["Pixels", "Rem", "Percent", "Raw"]);
|
|
1595
|
+
var LineHeightValue = z65.object({
|
|
1582
1596
|
unit: LineHeightUnit,
|
|
1583
|
-
measure:
|
|
1597
|
+
measure: z65.number()
|
|
1584
1598
|
});
|
|
1585
1599
|
var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
|
|
1586
1600
|
|
|
1587
1601
|
// src/dsm/elements/data/paragraph-indent.ts
|
|
1588
|
-
import { z as
|
|
1589
|
-
var ParagraphIndentUnit =
|
|
1590
|
-
var ParagraphIndentValue =
|
|
1602
|
+
import { z as z66 } from "zod";
|
|
1603
|
+
var ParagraphIndentUnit = z66.enum(["Pixels", "Rem", "Percent"]);
|
|
1604
|
+
var ParagraphIndentValue = z66.object({
|
|
1591
1605
|
unit: ParagraphIndentUnit,
|
|
1592
|
-
measure:
|
|
1606
|
+
measure: z66.number()
|
|
1593
1607
|
});
|
|
1594
1608
|
var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
|
|
1595
1609
|
|
|
1596
1610
|
// src/dsm/elements/data/paragraph-spacing.ts
|
|
1597
|
-
import { z as
|
|
1598
|
-
var ParagraphSpacingUnit =
|
|
1599
|
-
var ParagraphSpacingValue =
|
|
1611
|
+
import { z as z67 } from "zod";
|
|
1612
|
+
var ParagraphSpacingUnit = z67.enum(["Pixels", "Rem", "Percent"]);
|
|
1613
|
+
var ParagraphSpacingValue = z67.object({
|
|
1600
1614
|
unit: ParagraphSpacingUnit,
|
|
1601
|
-
measure:
|
|
1615
|
+
measure: z67.number()
|
|
1602
1616
|
});
|
|
1603
1617
|
var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
|
|
1604
1618
|
|
|
1605
1619
|
// src/dsm/elements/data/product-copy.ts
|
|
1606
|
-
import { z as
|
|
1607
|
-
var ProductCopyValue =
|
|
1620
|
+
import { z as z68 } from "zod";
|
|
1621
|
+
var ProductCopyValue = z68.string();
|
|
1608
1622
|
var ProductCopyTokenData = tokenAliasOrValue(ProductCopyValue);
|
|
1609
1623
|
|
|
1610
1624
|
// src/dsm/elements/data/safe-id.ts
|
|
1611
|
-
import { z as
|
|
1625
|
+
import { z as z69 } from "zod";
|
|
1612
1626
|
var RESERVED_OBJECT_ID_PREFIX = "x-sn-reserved-";
|
|
1613
|
-
var SafeIdSchema =
|
|
1627
|
+
var SafeIdSchema = z69.string().refine(
|
|
1614
1628
|
(value) => {
|
|
1615
1629
|
return !value.startsWith(RESERVED_OBJECT_ID_PREFIX);
|
|
1616
1630
|
},
|
|
@@ -1620,58 +1634,58 @@ var SafeIdSchema = z68.string().refine(
|
|
|
1620
1634
|
);
|
|
1621
1635
|
|
|
1622
1636
|
// src/dsm/elements/data/shadow.ts
|
|
1623
|
-
import { z as
|
|
1624
|
-
var ShadowType =
|
|
1625
|
-
var ShadowLayerValue =
|
|
1637
|
+
import { z as z70 } from "zod";
|
|
1638
|
+
var ShadowType = z70.enum(["Drop", "Inner"]);
|
|
1639
|
+
var ShadowLayerValue = z70.object({
|
|
1626
1640
|
color: ColorTokenData,
|
|
1627
|
-
x:
|
|
1628
|
-
y:
|
|
1629
|
-
radius:
|
|
1630
|
-
spread:
|
|
1641
|
+
x: z70.number(),
|
|
1642
|
+
y: z70.number(),
|
|
1643
|
+
radius: z70.number(),
|
|
1644
|
+
spread: z70.number(),
|
|
1631
1645
|
opacity: OpacityTokenData.optional(),
|
|
1632
1646
|
type: ShadowType
|
|
1633
1647
|
});
|
|
1634
1648
|
var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
1635
|
-
var ShadowTokenData = tokenAliasOrValue(
|
|
1649
|
+
var ShadowTokenData = tokenAliasOrValue(z70.array(ShadowTokenDataBase));
|
|
1636
1650
|
|
|
1637
1651
|
// src/dsm/elements/data/size.ts
|
|
1638
|
-
import { z as
|
|
1639
|
-
var SizeUnit =
|
|
1640
|
-
var SizeValue =
|
|
1652
|
+
import { z as z71 } from "zod";
|
|
1653
|
+
var SizeUnit = z71.enum(["Pixels", "Rem", "Percent"]);
|
|
1654
|
+
var SizeValue = z71.object({
|
|
1641
1655
|
unit: SizeUnit,
|
|
1642
|
-
measure:
|
|
1656
|
+
measure: z71.number()
|
|
1643
1657
|
});
|
|
1644
1658
|
var SizeTokenData = tokenAliasOrValue(SizeValue);
|
|
1645
1659
|
|
|
1646
1660
|
// src/dsm/elements/data/space.ts
|
|
1647
|
-
import { z as
|
|
1648
|
-
var SpaceUnit =
|
|
1649
|
-
var SpaceValue =
|
|
1661
|
+
import { z as z72 } from "zod";
|
|
1662
|
+
var SpaceUnit = z72.enum(["Pixels", "Rem", "Percent"]);
|
|
1663
|
+
var SpaceValue = z72.object({
|
|
1650
1664
|
unit: SpaceUnit,
|
|
1651
|
-
measure:
|
|
1665
|
+
measure: z72.number()
|
|
1652
1666
|
});
|
|
1653
1667
|
var SpaceTokenData = tokenAliasOrValue(SpaceValue);
|
|
1654
1668
|
|
|
1655
1669
|
// src/dsm/elements/data/string.ts
|
|
1656
|
-
import { z as
|
|
1657
|
-
var StringValue =
|
|
1670
|
+
import { z as z73 } from "zod";
|
|
1671
|
+
var StringValue = z73.string();
|
|
1658
1672
|
var StringTokenData = tokenAliasOrValue(StringValue);
|
|
1659
1673
|
|
|
1660
1674
|
// src/dsm/elements/data/text-case.ts
|
|
1661
|
-
import { z as
|
|
1662
|
-
var TextCase =
|
|
1675
|
+
import { z as z74 } from "zod";
|
|
1676
|
+
var TextCase = z74.enum(["Original", "Upper", "Lower", "Camel", "SmallCaps"]);
|
|
1663
1677
|
var TextCaseValue = TextCase;
|
|
1664
1678
|
var TextCaseTokenData = tokenAliasOrValue(TextCaseValue);
|
|
1665
1679
|
|
|
1666
1680
|
// src/dsm/elements/data/text-decoration.ts
|
|
1667
|
-
import { z as
|
|
1668
|
-
var TextDecoration =
|
|
1681
|
+
import { z as z75 } from "zod";
|
|
1682
|
+
var TextDecoration = z75.enum(["None", "Underline", "Strikethrough"]);
|
|
1669
1683
|
var TextDecorationValue = TextDecoration;
|
|
1670
1684
|
var TextDecorationTokenData = tokenAliasOrValue(TextDecorationValue);
|
|
1671
1685
|
|
|
1672
1686
|
// src/dsm/elements/data/typography.ts
|
|
1673
|
-
import { z as
|
|
1674
|
-
var TypographyValue =
|
|
1687
|
+
import { z as z76 } from "zod";
|
|
1688
|
+
var TypographyValue = z76.object({
|
|
1675
1689
|
fontSize: FontSizeTokenData,
|
|
1676
1690
|
fontFamily: FontFamilyTokenData,
|
|
1677
1691
|
fontWeight: FontWeightTokenData,
|
|
@@ -1685,49 +1699,49 @@ var TypographyValue = z75.object({
|
|
|
1685
1699
|
var TypographyTokenData = tokenAliasOrValue(TypographyValue);
|
|
1686
1700
|
|
|
1687
1701
|
// src/dsm/elements/data/visibility.ts
|
|
1688
|
-
import { z as
|
|
1689
|
-
var Visibility =
|
|
1702
|
+
import { z as z77 } from "zod";
|
|
1703
|
+
var Visibility = z77.enum(["Hidden", "Visible"]);
|
|
1690
1704
|
var VisibilityValue = Visibility;
|
|
1691
1705
|
var VisibilityTokenData = tokenAliasOrValue(VisibilityValue);
|
|
1692
1706
|
|
|
1693
1707
|
// src/dsm/elements/data/z-index.ts
|
|
1694
|
-
import { z as
|
|
1695
|
-
var ZIndexUnit =
|
|
1696
|
-
var ZIndexValue =
|
|
1708
|
+
import { z as z78 } from "zod";
|
|
1709
|
+
var ZIndexUnit = z78.enum(["Raw"]);
|
|
1710
|
+
var ZIndexValue = z78.object({
|
|
1697
1711
|
unit: ZIndexUnit,
|
|
1698
|
-
measure:
|
|
1712
|
+
measure: z78.number()
|
|
1699
1713
|
});
|
|
1700
1714
|
var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
|
|
1701
1715
|
|
|
1702
1716
|
// src/dsm/elements/component.ts
|
|
1703
|
-
import { z as
|
|
1704
|
-
var ComponentOriginPart =
|
|
1705
|
-
nodeId:
|
|
1706
|
-
width:
|
|
1707
|
-
height:
|
|
1717
|
+
import { z as z79 } from "zod";
|
|
1718
|
+
var ComponentOriginPart = z79.object({
|
|
1719
|
+
nodeId: z79.string().optional(),
|
|
1720
|
+
width: z79.number().optional(),
|
|
1721
|
+
height: z79.number().optional()
|
|
1708
1722
|
});
|
|
1709
|
-
var ComponentAsset =
|
|
1710
|
-
assetId:
|
|
1711
|
-
assetPath:
|
|
1723
|
+
var ComponentAsset = z79.object({
|
|
1724
|
+
assetId: z79.string(),
|
|
1725
|
+
assetPath: z79.string()
|
|
1712
1726
|
});
|
|
1713
1727
|
var ComponentOrigin = DesignElementOrigin.extend(ComponentOriginPart.shape);
|
|
1714
1728
|
var Component = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
1715
1729
|
origin: ComponentOrigin.optional(),
|
|
1716
1730
|
thumbnail: ComponentAsset,
|
|
1717
1731
|
svg: ComponentAsset.optional(),
|
|
1718
|
-
isAsset:
|
|
1732
|
+
isAsset: z79.boolean()
|
|
1719
1733
|
});
|
|
1720
1734
|
function isImportedComponent(component) {
|
|
1721
1735
|
return !!component.origin;
|
|
1722
1736
|
}
|
|
1723
1737
|
|
|
1724
1738
|
// src/dsm/elements/documentation-page-v1.ts
|
|
1725
|
-
import { z as
|
|
1739
|
+
import { z as z81 } from "zod";
|
|
1726
1740
|
|
|
1727
1741
|
// src/dsm/elements/group.ts
|
|
1728
|
-
import { z as
|
|
1742
|
+
import { z as z80 } from "zod";
|
|
1729
1743
|
var ElementGroup = DesignElementBase.extend(DesignElementGroupablePart.shape).extend(DesignElementSlugPart.shape).extend(DesignElementBrandedPart.partial().shape).extend({
|
|
1730
|
-
shortPersistentId:
|
|
1744
|
+
shortPersistentId: z80.string().optional(),
|
|
1731
1745
|
childType: DesignElementType,
|
|
1732
1746
|
data: ElementGroupDataV2.optional()
|
|
1733
1747
|
});
|
|
@@ -1735,7 +1749,7 @@ var BrandedElementGroup = ElementGroup.extend(DesignElementBrandedPart.shape);
|
|
|
1735
1749
|
|
|
1736
1750
|
// src/dsm/elements/documentation-page-v1.ts
|
|
1737
1751
|
var DocumentationPageV1 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1738
|
-
shortPersistentId:
|
|
1752
|
+
shortPersistentId: z81.string(),
|
|
1739
1753
|
data: DocumentationPageDataV1
|
|
1740
1754
|
});
|
|
1741
1755
|
var DocumentationGroupV1 = ElementGroup.omit({
|
|
@@ -1745,21 +1759,21 @@ var DocumentationGroupV1 = ElementGroup.omit({
|
|
|
1745
1759
|
});
|
|
1746
1760
|
|
|
1747
1761
|
// src/dsm/elements/documentation-page-v2.ts
|
|
1748
|
-
import { z as
|
|
1762
|
+
import { z as z82 } from "zod";
|
|
1749
1763
|
var DocumentationPageV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1750
|
-
shortPersistentId:
|
|
1764
|
+
shortPersistentId: z82.string(),
|
|
1751
1765
|
data: DocumentationPageDataV2.extend({
|
|
1752
|
-
oldBlocks:
|
|
1766
|
+
oldBlocks: z82.array(PageBlockV1).optional()
|
|
1753
1767
|
})
|
|
1754
1768
|
});
|
|
1755
1769
|
|
|
1756
1770
|
// src/dsm/elements/figma-file-structures.ts
|
|
1757
|
-
import { z as
|
|
1758
|
-
var FigmaFileStructureOrigin =
|
|
1759
|
-
sourceId:
|
|
1760
|
-
fileId:
|
|
1771
|
+
import { z as z83 } from "zod";
|
|
1772
|
+
var FigmaFileStructureOrigin = z83.object({
|
|
1773
|
+
sourceId: z83.string(),
|
|
1774
|
+
fileId: z83.string().optional()
|
|
1761
1775
|
});
|
|
1762
|
-
var FigmaFileStructureData =
|
|
1776
|
+
var FigmaFileStructureData = z83.object({
|
|
1763
1777
|
rootNode: FigmaFileStructureNode,
|
|
1764
1778
|
assetsInFile: FigmaFileStructureStatistics
|
|
1765
1779
|
});
|
|
@@ -1775,10 +1789,10 @@ function traverseStructure(node, action) {
|
|
|
1775
1789
|
}
|
|
1776
1790
|
|
|
1777
1791
|
// src/dsm/elements/figma-node-reference.ts
|
|
1778
|
-
import { z as
|
|
1779
|
-
var FigmaNodeReferenceOrigin =
|
|
1780
|
-
sourceId:
|
|
1781
|
-
parentName:
|
|
1792
|
+
import { z as z84 } from "zod";
|
|
1793
|
+
var FigmaNodeReferenceOrigin = z84.object({
|
|
1794
|
+
sourceId: z84.string(),
|
|
1795
|
+
parentName: z84.string().optional()
|
|
1782
1796
|
});
|
|
1783
1797
|
var FigmaNodeReference = DesignElementBase.extend({
|
|
1784
1798
|
data: FigmaNodeReferenceData,
|
|
@@ -1786,13 +1800,13 @@ var FigmaNodeReference = DesignElementBase.extend({
|
|
|
1786
1800
|
});
|
|
1787
1801
|
|
|
1788
1802
|
// src/dsm/elements/theme.ts
|
|
1789
|
-
import { z as
|
|
1803
|
+
import { z as z86 } from "zod";
|
|
1790
1804
|
|
|
1791
1805
|
// src/dsm/elements/tokens.ts
|
|
1792
|
-
import { z as
|
|
1793
|
-
var DesignTokenOriginPart =
|
|
1794
|
-
referenceOriginId:
|
|
1795
|
-
referencePersistentId:
|
|
1806
|
+
import { z as z85 } from "zod";
|
|
1807
|
+
var DesignTokenOriginPart = z85.object({
|
|
1808
|
+
referenceOriginId: z85.string().optional(),
|
|
1809
|
+
referencePersistentId: z85.string().optional()
|
|
1796
1810
|
});
|
|
1797
1811
|
var DesignTokenOrigin = DesignElementOrigin.extend(DesignTokenOriginPart.shape);
|
|
1798
1812
|
var DesignTokenBase = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
@@ -1804,111 +1818,111 @@ var UpdateDesignTokenBase = DesignTokenBase.omit({
|
|
|
1804
1818
|
brandPersistentId: true,
|
|
1805
1819
|
designSystemVersionId: true
|
|
1806
1820
|
});
|
|
1807
|
-
var BlurTokenTypedData =
|
|
1808
|
-
type:
|
|
1821
|
+
var BlurTokenTypedData = z85.object({
|
|
1822
|
+
type: z85.literal("Blur"),
|
|
1809
1823
|
data: BlurTokenData
|
|
1810
1824
|
});
|
|
1811
|
-
var ColorTokenTypedData =
|
|
1812
|
-
type:
|
|
1825
|
+
var ColorTokenTypedData = z85.object({
|
|
1826
|
+
type: z85.literal("Color"),
|
|
1813
1827
|
data: ColorTokenData
|
|
1814
1828
|
});
|
|
1815
|
-
var GradientTokenTypedData =
|
|
1816
|
-
type:
|
|
1829
|
+
var GradientTokenTypedData = z85.object({
|
|
1830
|
+
type: z85.literal("Gradient"),
|
|
1817
1831
|
data: GradientTokenData
|
|
1818
1832
|
});
|
|
1819
|
-
var OpacityTokenTypedData =
|
|
1820
|
-
type:
|
|
1833
|
+
var OpacityTokenTypedData = z85.object({
|
|
1834
|
+
type: z85.literal("Opacity"),
|
|
1821
1835
|
data: OpacityTokenData
|
|
1822
1836
|
});
|
|
1823
|
-
var ShadowTokenTypedData =
|
|
1824
|
-
type:
|
|
1837
|
+
var ShadowTokenTypedData = z85.object({
|
|
1838
|
+
type: z85.literal("Shadow"),
|
|
1825
1839
|
data: ShadowTokenData
|
|
1826
1840
|
});
|
|
1827
|
-
var TypographyTokenTypedData =
|
|
1828
|
-
type:
|
|
1841
|
+
var TypographyTokenTypedData = z85.object({
|
|
1842
|
+
type: z85.literal("Typography"),
|
|
1829
1843
|
data: TypographyTokenData
|
|
1830
1844
|
});
|
|
1831
|
-
var StringTokenTypedData =
|
|
1832
|
-
type:
|
|
1845
|
+
var StringTokenTypedData = z85.object({
|
|
1846
|
+
type: z85.literal("String"),
|
|
1833
1847
|
data: StringTokenData
|
|
1834
1848
|
});
|
|
1835
|
-
var DimensionTokenTypedData =
|
|
1836
|
-
type:
|
|
1849
|
+
var DimensionTokenTypedData = z85.object({
|
|
1850
|
+
type: z85.literal("Dimension"),
|
|
1837
1851
|
data: DimensionTokenData
|
|
1838
1852
|
});
|
|
1839
|
-
var FontSizeTokenTypedData =
|
|
1840
|
-
type:
|
|
1853
|
+
var FontSizeTokenTypedData = z85.object({
|
|
1854
|
+
type: z85.literal("FontSize"),
|
|
1841
1855
|
data: FontSizeTokenData
|
|
1842
1856
|
});
|
|
1843
|
-
var FontFamilyTokenTypedData =
|
|
1844
|
-
type:
|
|
1857
|
+
var FontFamilyTokenTypedData = z85.object({
|
|
1858
|
+
type: z85.literal("FontFamily"),
|
|
1845
1859
|
data: FontFamilyTokenData
|
|
1846
1860
|
});
|
|
1847
|
-
var FontWeightTokenTypedData =
|
|
1848
|
-
type:
|
|
1861
|
+
var FontWeightTokenTypedData = z85.object({
|
|
1862
|
+
type: z85.literal("FontWeight"),
|
|
1849
1863
|
data: FontWeightTokenData
|
|
1850
1864
|
});
|
|
1851
|
-
var LetterSpacingTokenTypedData =
|
|
1852
|
-
type:
|
|
1865
|
+
var LetterSpacingTokenTypedData = z85.object({
|
|
1866
|
+
type: z85.literal("LetterSpacing"),
|
|
1853
1867
|
data: LetterSpacingTokenData
|
|
1854
1868
|
});
|
|
1855
|
-
var LineHeightTokenTypedData =
|
|
1856
|
-
type:
|
|
1869
|
+
var LineHeightTokenTypedData = z85.object({
|
|
1870
|
+
type: z85.literal("LineHeight"),
|
|
1857
1871
|
data: LineHeightTokenData
|
|
1858
1872
|
});
|
|
1859
|
-
var ParagraphSpacingTokenTypedData =
|
|
1860
|
-
type:
|
|
1873
|
+
var ParagraphSpacingTokenTypedData = z85.object({
|
|
1874
|
+
type: z85.literal("ParagraphSpacing"),
|
|
1861
1875
|
data: ParagraphSpacingTokenData
|
|
1862
1876
|
});
|
|
1863
|
-
var TextCaseTokenTypedData =
|
|
1864
|
-
type:
|
|
1877
|
+
var TextCaseTokenTypedData = z85.object({
|
|
1878
|
+
type: z85.literal("TextCase"),
|
|
1865
1879
|
data: TextCaseTokenData
|
|
1866
1880
|
});
|
|
1867
|
-
var TextDecorationTokenTypedData =
|
|
1868
|
-
type:
|
|
1881
|
+
var TextDecorationTokenTypedData = z85.object({
|
|
1882
|
+
type: z85.literal("TextDecoration"),
|
|
1869
1883
|
data: TextDecorationTokenData
|
|
1870
1884
|
});
|
|
1871
|
-
var BorderRadiusTokenTypedData =
|
|
1872
|
-
type:
|
|
1885
|
+
var BorderRadiusTokenTypedData = z85.object({
|
|
1886
|
+
type: z85.literal("BorderRadius"),
|
|
1873
1887
|
data: BorderRadiusTokenData
|
|
1874
1888
|
});
|
|
1875
|
-
var BorderWidthTokenTypedData =
|
|
1876
|
-
type:
|
|
1889
|
+
var BorderWidthTokenTypedData = z85.object({
|
|
1890
|
+
type: z85.literal("BorderWidth"),
|
|
1877
1891
|
data: BorderWidthTokenData
|
|
1878
1892
|
});
|
|
1879
|
-
var BorderTypedData =
|
|
1880
|
-
type:
|
|
1893
|
+
var BorderTypedData = z85.object({
|
|
1894
|
+
type: z85.literal("Border"),
|
|
1881
1895
|
data: BorderTokenData
|
|
1882
1896
|
});
|
|
1883
|
-
var ProductCopyTypedData =
|
|
1884
|
-
type:
|
|
1897
|
+
var ProductCopyTypedData = z85.object({
|
|
1898
|
+
type: z85.literal("ProductCopy"),
|
|
1885
1899
|
data: ProductCopyTokenData
|
|
1886
1900
|
});
|
|
1887
|
-
var SizeTypedData =
|
|
1888
|
-
type:
|
|
1901
|
+
var SizeTypedData = z85.object({
|
|
1902
|
+
type: z85.literal("Size"),
|
|
1889
1903
|
data: SizeTokenData
|
|
1890
1904
|
});
|
|
1891
|
-
var SpaceTypedData =
|
|
1892
|
-
type:
|
|
1905
|
+
var SpaceTypedData = z85.object({
|
|
1906
|
+
type: z85.literal("Space"),
|
|
1893
1907
|
data: SpaceTokenData
|
|
1894
1908
|
});
|
|
1895
|
-
var VisibilityTypedData =
|
|
1896
|
-
type:
|
|
1909
|
+
var VisibilityTypedData = z85.object({
|
|
1910
|
+
type: z85.literal("Visibility"),
|
|
1897
1911
|
data: VisibilityTokenData
|
|
1898
1912
|
});
|
|
1899
|
-
var ZIndexTypedData =
|
|
1900
|
-
type:
|
|
1913
|
+
var ZIndexTypedData = z85.object({
|
|
1914
|
+
type: z85.literal("ZIndex"),
|
|
1901
1915
|
data: ZIndexTokenData
|
|
1902
1916
|
});
|
|
1903
|
-
var DurationTypedData =
|
|
1904
|
-
type:
|
|
1917
|
+
var DurationTypedData = z85.object({
|
|
1918
|
+
type: z85.literal("Duration"),
|
|
1905
1919
|
data: DurationTokenData
|
|
1906
1920
|
});
|
|
1907
|
-
var FontTypedData =
|
|
1908
|
-
type:
|
|
1909
|
-
data:
|
|
1921
|
+
var FontTypedData = z85.object({
|
|
1922
|
+
type: z85.literal("Font"),
|
|
1923
|
+
data: z85.record(z85.any())
|
|
1910
1924
|
});
|
|
1911
|
-
var DesignTokenTypedData =
|
|
1925
|
+
var DesignTokenTypedData = z85.discriminatedUnion("type", [
|
|
1912
1926
|
BlurTokenTypedData,
|
|
1913
1927
|
BorderRadiusTokenTypedData,
|
|
1914
1928
|
BorderWidthTokenTypedData,
|
|
@@ -1958,32 +1972,32 @@ function designTokenTypeFilter(type) {
|
|
|
1958
1972
|
var ThemeOverrideOriginPart = DesignTokenOriginPart;
|
|
1959
1973
|
var ThemeOverrideOrigin = DesignTokenOrigin;
|
|
1960
1974
|
var ThemeOverride = DesignTokenTypedData.and(
|
|
1961
|
-
|
|
1962
|
-
tokenPersistentId:
|
|
1975
|
+
z86.object({
|
|
1976
|
+
tokenPersistentId: z86.string(),
|
|
1963
1977
|
origin: ThemeOverrideOrigin.optional().nullable().transform((v) => v ?? void 0)
|
|
1964
1978
|
})
|
|
1965
1979
|
);
|
|
1966
|
-
var ThemeElementData =
|
|
1967
|
-
value:
|
|
1968
|
-
overrides:
|
|
1980
|
+
var ThemeElementData = z86.object({
|
|
1981
|
+
value: z86.object({
|
|
1982
|
+
overrides: z86.array(ThemeOverride)
|
|
1969
1983
|
})
|
|
1970
1984
|
});
|
|
1971
|
-
var ThemeOriginPart =
|
|
1972
|
-
var ThemeOriginObject =
|
|
1973
|
-
id:
|
|
1974
|
-
name:
|
|
1985
|
+
var ThemeOriginPart = z86.object({});
|
|
1986
|
+
var ThemeOriginObject = z86.object({
|
|
1987
|
+
id: z86.string(),
|
|
1988
|
+
name: z86.string()
|
|
1975
1989
|
});
|
|
1976
|
-
var ThemeOriginSource =
|
|
1977
|
-
sourceId:
|
|
1978
|
-
sourceObjects:
|
|
1990
|
+
var ThemeOriginSource = z86.object({
|
|
1991
|
+
sourceId: z86.string(),
|
|
1992
|
+
sourceObjects: z86.array(ThemeOriginObject)
|
|
1979
1993
|
});
|
|
1980
|
-
var ThemeOrigin =
|
|
1981
|
-
sources:
|
|
1994
|
+
var ThemeOrigin = z86.object({
|
|
1995
|
+
sources: z86.array(ThemeOriginSource)
|
|
1982
1996
|
});
|
|
1983
1997
|
var Theme = DesignElementBase.extend(DesignElementBrandedPart.shape).extend({
|
|
1984
1998
|
origin: ThemeOrigin.optional(),
|
|
1985
|
-
overrides:
|
|
1986
|
-
codeName:
|
|
1999
|
+
overrides: z86.array(ThemeOverride),
|
|
2000
|
+
codeName: z86.string()
|
|
1987
2001
|
});
|
|
1988
2002
|
|
|
1989
2003
|
// src/dsm/elements/utils.ts
|
|
@@ -2053,25 +2067,25 @@ var PageBlockDefinitionsMap = class {
|
|
|
2053
2067
|
};
|
|
2054
2068
|
|
|
2055
2069
|
// src/dsm/import/support/figma-files.ts
|
|
2056
|
-
import { z as
|
|
2057
|
-
var FigmaFileDownloadScope =
|
|
2058
|
-
styles:
|
|
2059
|
-
components:
|
|
2060
|
-
currentVersion:
|
|
2061
|
-
publishedVersion:
|
|
2062
|
-
downloadChunkSize:
|
|
2063
|
-
maxFileDepth:
|
|
2070
|
+
import { z as z87 } from "zod";
|
|
2071
|
+
var FigmaFileDownloadScope = z87.object({
|
|
2072
|
+
styles: z87.boolean(),
|
|
2073
|
+
components: z87.boolean(),
|
|
2074
|
+
currentVersion: z87.literal("__latest__").nullable(),
|
|
2075
|
+
publishedVersion: z87.string().nullable(),
|
|
2076
|
+
downloadChunkSize: z87.number().optional(),
|
|
2077
|
+
maxFileDepth: z87.number().optional()
|
|
2064
2078
|
});
|
|
2065
|
-
var FigmaFileAccessData =
|
|
2066
|
-
accessToken:
|
|
2079
|
+
var FigmaFileAccessData = z87.object({
|
|
2080
|
+
accessToken: z87.string()
|
|
2067
2081
|
});
|
|
2068
2082
|
|
|
2069
2083
|
// src/dsm/import/support/import-context.ts
|
|
2070
|
-
import { z as
|
|
2084
|
+
import { z as z89 } from "zod";
|
|
2071
2085
|
|
|
2072
2086
|
// src/dsm/import/warning.ts
|
|
2073
|
-
import { z as
|
|
2074
|
-
var ImportWarningType =
|
|
2087
|
+
import { z as z88 } from "zod";
|
|
2088
|
+
var ImportWarningType = z88.enum([
|
|
2075
2089
|
"NoVersionFound",
|
|
2076
2090
|
"UnsupportedFill",
|
|
2077
2091
|
"UnsupportedStroke",
|
|
@@ -2086,49 +2100,49 @@ var ImportWarningType = z87.enum([
|
|
|
2086
2100
|
"DuplicateImportedStylePath",
|
|
2087
2101
|
"NoUnpublishedStyles"
|
|
2088
2102
|
]);
|
|
2089
|
-
var ImportWarning =
|
|
2103
|
+
var ImportWarning = z88.object({
|
|
2090
2104
|
warningType: ImportWarningType,
|
|
2091
|
-
componentId:
|
|
2092
|
-
componentName:
|
|
2093
|
-
styleId:
|
|
2094
|
-
styleName:
|
|
2095
|
-
unsupportedStyleValueType:
|
|
2105
|
+
componentId: z88.string().optional(),
|
|
2106
|
+
componentName: z88.string().optional(),
|
|
2107
|
+
styleId: z88.string().optional(),
|
|
2108
|
+
styleName: z88.string().optional(),
|
|
2109
|
+
unsupportedStyleValueType: z88.string().optional()
|
|
2096
2110
|
});
|
|
2097
2111
|
|
|
2098
2112
|
// src/dsm/import/support/import-context.ts
|
|
2099
|
-
var ImportFunctionInput =
|
|
2100
|
-
importJobId:
|
|
2101
|
-
importContextId:
|
|
2102
|
-
designSystemId:
|
|
2113
|
+
var ImportFunctionInput = z89.object({
|
|
2114
|
+
importJobId: z89.string(),
|
|
2115
|
+
importContextId: z89.string(),
|
|
2116
|
+
designSystemId: z89.string().optional()
|
|
2103
2117
|
});
|
|
2104
|
-
var ImportedFigmaSourceData =
|
|
2105
|
-
sourceId:
|
|
2118
|
+
var ImportedFigmaSourceData = z89.object({
|
|
2119
|
+
sourceId: z89.string(),
|
|
2106
2120
|
figmaRemote: DataSourceFigmaRemote
|
|
2107
2121
|
});
|
|
2108
|
-
var FigmaImportBaseContext =
|
|
2109
|
-
designSystemId:
|
|
2122
|
+
var FigmaImportBaseContext = z89.object({
|
|
2123
|
+
designSystemId: z89.string(),
|
|
2110
2124
|
/**
|
|
2111
2125
|
* Data required for accessing Figma files. This should contain access data for all file ids
|
|
2112
2126
|
* mentioned in the `importedSourceDataBySourceId`
|
|
2113
2127
|
*
|
|
2114
2128
|
* fileId: file data
|
|
2115
2129
|
*/
|
|
2116
|
-
fileAccessByFileId:
|
|
2130
|
+
fileAccessByFileId: z89.record(FigmaFileAccessData),
|
|
2117
2131
|
/**
|
|
2118
2132
|
* Figma source data for which import was requested
|
|
2119
2133
|
*
|
|
2120
2134
|
* sourceId: source data
|
|
2121
2135
|
*/
|
|
2122
|
-
importedSourceDataBySourceId:
|
|
2136
|
+
importedSourceDataBySourceId: z89.record(ImportedFigmaSourceData),
|
|
2123
2137
|
/**
|
|
2124
2138
|
* Array of warnings that will be written into the import result summary at the end
|
|
2125
2139
|
* of import job execution and displayed by the client.
|
|
2126
2140
|
*/
|
|
2127
|
-
importWarnings:
|
|
2141
|
+
importWarnings: z89.record(ImportWarning.array()).default({})
|
|
2128
2142
|
});
|
|
2129
2143
|
var FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
|
|
2130
|
-
sourcesWithMissingAccess:
|
|
2131
|
-
shadowOpacityOptional:
|
|
2144
|
+
sourcesWithMissingAccess: z89.array(z89.string()).default([]),
|
|
2145
|
+
shadowOpacityOptional: z89.boolean().default(false)
|
|
2132
2146
|
});
|
|
2133
2147
|
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
2134
2148
|
importMetadata: DataSourceFigmaImportMetadata
|
|
@@ -2140,79 +2154,79 @@ var FigmaImportContextWithDownloadScopes = FigmaImportContextWithSourcesState.ex
|
|
|
2140
2154
|
*
|
|
2141
2155
|
* File id -> file download scope
|
|
2142
2156
|
*/
|
|
2143
|
-
fileDownloadScopesByFileId:
|
|
2157
|
+
fileDownloadScopesByFileId: z89.record(FigmaFileDownloadScope),
|
|
2144
2158
|
/**
|
|
2145
2159
|
* Sources filtered down to the ones that have changed since last import and therefore need to be
|
|
2146
2160
|
* imported again.
|
|
2147
2161
|
*
|
|
2148
2162
|
* Source id -> import metadata
|
|
2149
2163
|
*/
|
|
2150
|
-
changedImportedSourceDataBySourceId:
|
|
2164
|
+
changedImportedSourceDataBySourceId: z89.record(ChangedImportedFigmaSourceData)
|
|
2151
2165
|
});
|
|
2152
2166
|
|
|
2153
2167
|
// src/dsm/import/support/import-model-collections.ts
|
|
2154
|
-
import { z as
|
|
2168
|
+
import { z as z97 } from "zod";
|
|
2155
2169
|
|
|
2156
2170
|
// src/dsm/import/image.ts
|
|
2157
|
-
import { z as
|
|
2158
|
-
var ImageImportModelType =
|
|
2159
|
-
var ImageImportModelBase =
|
|
2171
|
+
import { z as z90 } from "zod";
|
|
2172
|
+
var ImageImportModelType = z90.enum(["Url", "FigmaRender"]);
|
|
2173
|
+
var ImageImportModelBase = z90.object({
|
|
2160
2174
|
scope: AssetScope
|
|
2161
2175
|
});
|
|
2162
2176
|
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
2163
|
-
type:
|
|
2164
|
-
url:
|
|
2165
|
-
originKey:
|
|
2166
|
-
extension:
|
|
2177
|
+
type: z90.literal(ImageImportModelType.enum.Url),
|
|
2178
|
+
url: z90.string(),
|
|
2179
|
+
originKey: z90.string(),
|
|
2180
|
+
extension: z90.string()
|
|
2167
2181
|
});
|
|
2168
|
-
var FigmaRenderFormat =
|
|
2182
|
+
var FigmaRenderFormat = z90.enum(["Svg", "Png"]);
|
|
2169
2183
|
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
2170
|
-
type:
|
|
2171
|
-
fileId:
|
|
2172
|
-
fileVersionId:
|
|
2173
|
-
nodeId:
|
|
2174
|
-
originKey:
|
|
2184
|
+
type: z90.literal(ImageImportModelType.enum.FigmaRender),
|
|
2185
|
+
fileId: z90.string(),
|
|
2186
|
+
fileVersionId: z90.string().optional(),
|
|
2187
|
+
nodeId: z90.string(),
|
|
2188
|
+
originKey: z90.string()
|
|
2175
2189
|
});
|
|
2176
2190
|
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
2177
|
-
format:
|
|
2178
|
-
scale:
|
|
2191
|
+
format: z90.literal(FigmaRenderFormat.enum.Png),
|
|
2192
|
+
scale: z90.number()
|
|
2179
2193
|
});
|
|
2180
2194
|
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
2181
|
-
format:
|
|
2195
|
+
format: z90.literal(FigmaRenderFormat.enum.Svg)
|
|
2182
2196
|
});
|
|
2183
|
-
var FigmaRenderImportModel =
|
|
2197
|
+
var FigmaRenderImportModel = z90.discriminatedUnion("format", [
|
|
2184
2198
|
FigmaPngRenderImportModel,
|
|
2185
2199
|
FigmaSvgRenderImportModel
|
|
2186
2200
|
]);
|
|
2187
|
-
var ImageImportModel =
|
|
2201
|
+
var ImageImportModel = z90.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
2188
2202
|
|
|
2189
2203
|
// src/dsm/import/component.ts
|
|
2190
|
-
import { z as
|
|
2204
|
+
import { z as z92 } from "zod";
|
|
2191
2205
|
|
|
2192
2206
|
// src/dsm/import/base.ts
|
|
2193
|
-
import { z as
|
|
2194
|
-
var ImportModelBase =
|
|
2195
|
-
id:
|
|
2207
|
+
import { z as z91 } from "zod";
|
|
2208
|
+
var ImportModelBase = z91.object({
|
|
2209
|
+
id: z91.string(),
|
|
2196
2210
|
meta: ObjectMeta,
|
|
2197
2211
|
origin: DesignElementOrigin,
|
|
2198
|
-
brandPersistentId:
|
|
2199
|
-
sortOrder:
|
|
2212
|
+
brandPersistentId: z91.string(),
|
|
2213
|
+
sortOrder: z91.number()
|
|
2200
2214
|
});
|
|
2201
2215
|
var ImportModelInputBase = ImportModelBase.omit({
|
|
2202
2216
|
brandPersistentId: true,
|
|
2203
2217
|
origin: true,
|
|
2204
2218
|
sortOrder: true
|
|
2205
2219
|
}).extend({
|
|
2206
|
-
originId:
|
|
2207
|
-
originMetadata:
|
|
2220
|
+
originId: z91.string(),
|
|
2221
|
+
originMetadata: z91.record(z91.any())
|
|
2208
2222
|
});
|
|
2209
2223
|
|
|
2210
2224
|
// src/dsm/import/component.ts
|
|
2211
|
-
var ComponentImportModelPart =
|
|
2225
|
+
var ComponentImportModelPart = z92.object({
|
|
2212
2226
|
thumbnail: ImageImportModel
|
|
2213
2227
|
});
|
|
2214
2228
|
var ComponentImportModel = ImportModelBase.extend(ComponentImportModelPart.shape).extend({
|
|
2215
|
-
isAsset:
|
|
2229
|
+
isAsset: z92.boolean(),
|
|
2216
2230
|
svg: FigmaSvgRenderImportModel.optional(),
|
|
2217
2231
|
origin: ComponentOrigin
|
|
2218
2232
|
});
|
|
@@ -2225,49 +2239,49 @@ var AssetImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart
|
|
|
2225
2239
|
});
|
|
2226
2240
|
|
|
2227
2241
|
// src/dsm/import/theme.ts
|
|
2228
|
-
import { z as
|
|
2242
|
+
import { z as z93 } from "zod";
|
|
2229
2243
|
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
2230
|
-
|
|
2231
|
-
id:
|
|
2244
|
+
z93.object({
|
|
2245
|
+
id: z93.string(),
|
|
2232
2246
|
meta: ObjectMeta
|
|
2233
2247
|
})
|
|
2234
2248
|
);
|
|
2235
2249
|
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
2236
|
-
|
|
2250
|
+
z93.object({
|
|
2237
2251
|
origin: ThemeOverrideOrigin
|
|
2238
2252
|
})
|
|
2239
2253
|
);
|
|
2240
2254
|
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
2241
|
-
|
|
2242
|
-
originId:
|
|
2255
|
+
z93.object({
|
|
2256
|
+
originId: z93.string(),
|
|
2243
2257
|
originMetadata: ThemeOverrideOriginPart
|
|
2244
2258
|
})
|
|
2245
2259
|
);
|
|
2246
|
-
var ThemeImportModel =
|
|
2260
|
+
var ThemeImportModel = z93.object({
|
|
2247
2261
|
meta: ObjectMeta,
|
|
2248
|
-
brandPersistentId:
|
|
2262
|
+
brandPersistentId: z93.string(),
|
|
2249
2263
|
originSource: ThemeOriginSource,
|
|
2250
|
-
overrides:
|
|
2251
|
-
sortOrder:
|
|
2264
|
+
overrides: z93.array(ThemeOverrideImportModel),
|
|
2265
|
+
sortOrder: z93.number()
|
|
2252
2266
|
});
|
|
2253
|
-
var ThemeImportModelInput =
|
|
2267
|
+
var ThemeImportModelInput = z93.object({
|
|
2254
2268
|
meta: ObjectMeta,
|
|
2255
|
-
originObjects:
|
|
2256
|
-
overrides:
|
|
2269
|
+
originObjects: z93.array(ThemeOriginObject),
|
|
2270
|
+
overrides: z93.array(ThemeOverrideImportModelInput)
|
|
2257
2271
|
});
|
|
2258
|
-
var ThemeUpdateImportModel =
|
|
2259
|
-
themePersistentId:
|
|
2260
|
-
overrides:
|
|
2272
|
+
var ThemeUpdateImportModel = z93.object({
|
|
2273
|
+
themePersistentId: z93.string(),
|
|
2274
|
+
overrides: z93.array(ThemeOverrideImportModel)
|
|
2261
2275
|
});
|
|
2262
|
-
var ThemeUpdateImportModelInput =
|
|
2263
|
-
themePersistentId:
|
|
2264
|
-
overrides:
|
|
2276
|
+
var ThemeUpdateImportModelInput = z93.object({
|
|
2277
|
+
themePersistentId: z93.string(),
|
|
2278
|
+
overrides: z93.array(ThemeOverrideImportModelInput)
|
|
2265
2279
|
});
|
|
2266
2280
|
|
|
2267
2281
|
// src/dsm/import/tokens.ts
|
|
2268
|
-
import { z as
|
|
2269
|
-
var DesignTokenImportModelPart =
|
|
2270
|
-
collection:
|
|
2282
|
+
import { z as z94 } from "zod";
|
|
2283
|
+
var DesignTokenImportModelPart = z94.object({
|
|
2284
|
+
collection: z94.string().optional()
|
|
2271
2285
|
});
|
|
2272
2286
|
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
2273
2287
|
origin: DesignTokenOrigin
|
|
@@ -2285,15 +2299,15 @@ function designTokenImportModelTypeFilter(type) {
|
|
|
2285
2299
|
}
|
|
2286
2300
|
|
|
2287
2301
|
// src/dsm/import/figma-frames.ts
|
|
2288
|
-
import { z as
|
|
2302
|
+
import { z as z95 } from "zod";
|
|
2289
2303
|
var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
2290
2304
|
image: FigmaPngRenderImportModel
|
|
2291
2305
|
});
|
|
2292
2306
|
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
2293
|
-
children:
|
|
2307
|
+
children: z95.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
2294
2308
|
});
|
|
2295
|
-
var FigmaFileStructureImportModelPart =
|
|
2296
|
-
data:
|
|
2309
|
+
var FigmaFileStructureImportModelPart = z95.object({
|
|
2310
|
+
data: z95.object({
|
|
2297
2311
|
rootNode: FigmaFileStructureNodeImportModel,
|
|
2298
2312
|
assetsInFile: FigmaFileStructureStatistics
|
|
2299
2313
|
})
|
|
@@ -2304,7 +2318,7 @@ var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImp
|
|
|
2304
2318
|
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
2305
2319
|
FigmaFileStructureImportModelPart.shape
|
|
2306
2320
|
).extend({
|
|
2307
|
-
fileVersionId:
|
|
2321
|
+
fileVersionId: z95.string()
|
|
2308
2322
|
});
|
|
2309
2323
|
function figmaFileStructureImportModelToMap(root) {
|
|
2310
2324
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -2318,30 +2332,30 @@ function recursiveFigmaFileStructureToMap2(node, map) {
|
|
|
2318
2332
|
}
|
|
2319
2333
|
|
|
2320
2334
|
// src/dsm/import/data-source.ts
|
|
2321
|
-
import { z as
|
|
2322
|
-
var DataSourceImportModel =
|
|
2323
|
-
id:
|
|
2324
|
-
fileName:
|
|
2325
|
-
thumbnailUrl:
|
|
2335
|
+
import { z as z96 } from "zod";
|
|
2336
|
+
var DataSourceImportModel = z96.object({
|
|
2337
|
+
id: z96.string(),
|
|
2338
|
+
fileName: z96.string().optional(),
|
|
2339
|
+
thumbnailUrl: z96.string().optional()
|
|
2326
2340
|
});
|
|
2327
2341
|
|
|
2328
2342
|
// src/dsm/import/support/import-model-collections.ts
|
|
2329
|
-
var ImportModelInputCollection =
|
|
2343
|
+
var ImportModelInputCollection = z97.object({
|
|
2330
2344
|
source: DataSourceImportModel,
|
|
2331
|
-
tokens:
|
|
2332
|
-
components:
|
|
2333
|
-
assets:
|
|
2334
|
-
themeUpdates:
|
|
2335
|
-
themes:
|
|
2345
|
+
tokens: z97.array(DesignTokenImportModelInput).default([]),
|
|
2346
|
+
components: z97.array(ComponentImportModelInput).default([]),
|
|
2347
|
+
assets: z97.array(AssetImportModelInput).default([]),
|
|
2348
|
+
themeUpdates: z97.array(ThemeUpdateImportModelInput).default([]),
|
|
2349
|
+
themes: z97.array(ThemeImportModelInput).default([]),
|
|
2336
2350
|
figmaFileStructure: FigmaFileStructureImportModelInput.optional()
|
|
2337
2351
|
});
|
|
2338
|
-
var ImportModelCollection =
|
|
2339
|
-
sources:
|
|
2340
|
-
tokens:
|
|
2341
|
-
components:
|
|
2342
|
-
themeUpdates:
|
|
2343
|
-
themes:
|
|
2344
|
-
figmaFileStructures:
|
|
2352
|
+
var ImportModelCollection = z97.object({
|
|
2353
|
+
sources: z97.array(DataSourceImportModel),
|
|
2354
|
+
tokens: z97.array(DesignTokenImportModel).default([]),
|
|
2355
|
+
components: z97.array(ComponentImportModel).default([]),
|
|
2356
|
+
themeUpdates: z97.array(ThemeUpdateImportModel).default([]),
|
|
2357
|
+
themes: z97.array(ThemeImportModel).default([]),
|
|
2358
|
+
figmaFileStructures: z97.array(FigmaFileStructureImportModel)
|
|
2345
2359
|
});
|
|
2346
2360
|
function addImportModelCollections(lhs, rhs) {
|
|
2347
2361
|
return {
|
|
@@ -2355,17 +2369,17 @@ function addImportModelCollections(lhs, rhs) {
|
|
|
2355
2369
|
}
|
|
2356
2370
|
|
|
2357
2371
|
// src/dsm/data-sources/import-summary.ts
|
|
2358
|
-
var FileStructureStats =
|
|
2372
|
+
var FileStructureStats = z98.object({
|
|
2359
2373
|
frames: zeroNumberByDefault2(),
|
|
2360
2374
|
components: zeroNumberByDefault2(),
|
|
2361
2375
|
componentSets: zeroNumberByDefault2()
|
|
2362
2376
|
});
|
|
2363
2377
|
var SourceImportSummaryByTokenTypeKey = DesignTokenType.or(
|
|
2364
2378
|
// Backward compatibility
|
|
2365
|
-
|
|
2379
|
+
z98.enum(["Measure", "Radius", "GenericToken", "Font", "Text"])
|
|
2366
2380
|
);
|
|
2367
|
-
var SourceImportSummaryByTokenType =
|
|
2368
|
-
var SourceImportTokenSummary =
|
|
2381
|
+
var SourceImportSummaryByTokenType = z98.record(SourceImportSummaryByTokenTypeKey, z98.number());
|
|
2382
|
+
var SourceImportTokenSummary = z98.object({
|
|
2369
2383
|
tokensCreated: zeroNumberByDefault2(),
|
|
2370
2384
|
tokensUpdated: zeroNumberByDefault2(),
|
|
2371
2385
|
tokensDeleted: zeroNumberByDefault2(),
|
|
@@ -2373,7 +2387,7 @@ var SourceImportTokenSummary = z97.object({
|
|
|
2373
2387
|
tokensUpdatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {}),
|
|
2374
2388
|
tokensDeletedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {})
|
|
2375
2389
|
});
|
|
2376
|
-
var SourceImportComponentSummary =
|
|
2390
|
+
var SourceImportComponentSummary = z98.object({
|
|
2377
2391
|
componentsCreated: zeroNumberByDefault2(),
|
|
2378
2392
|
componentsUpdated: zeroNumberByDefault2(),
|
|
2379
2393
|
componentsDeleted: zeroNumberByDefault2(),
|
|
@@ -2381,69 +2395,69 @@ var SourceImportComponentSummary = z97.object({
|
|
|
2381
2395
|
componentAssetsUpdated: zeroNumberByDefault2(),
|
|
2382
2396
|
componentAssetsDeleted: zeroNumberByDefault2()
|
|
2383
2397
|
});
|
|
2384
|
-
var SourceImportFrameSummary =
|
|
2398
|
+
var SourceImportFrameSummary = z98.object({
|
|
2385
2399
|
assetsInFile: nullishToOptional(FileStructureStats.optional()),
|
|
2386
|
-
invalidReferencesCount: nullishToOptional(
|
|
2387
|
-
});
|
|
2388
|
-
var SourceImportSummary =
|
|
2389
|
-
sourceId: nullishToOptional(
|
|
2390
|
-
brandId: nullishToOptional(
|
|
2391
|
-
versionId: nullishToOptional(
|
|
2392
|
-
error: nullishToOptional(
|
|
2393
|
-
isFailed:
|
|
2394
|
-
warnings:
|
|
2400
|
+
invalidReferencesCount: nullishToOptional(z98.number().optional())
|
|
2401
|
+
});
|
|
2402
|
+
var SourceImportSummary = z98.object({
|
|
2403
|
+
sourceId: nullishToOptional(z98.string()),
|
|
2404
|
+
brandId: nullishToOptional(z98.string()),
|
|
2405
|
+
versionId: nullishToOptional(z98.string()),
|
|
2406
|
+
error: nullishToOptional(z98.any()),
|
|
2407
|
+
isFailed: z98.boolean(),
|
|
2408
|
+
warnings: z98.array(ImportWarning).nullish().transform((v) => v ?? []),
|
|
2395
2409
|
...SourceImportTokenSummary.shape,
|
|
2396
2410
|
...SourceImportComponentSummary.shape,
|
|
2397
2411
|
...FileStructureStats.shape
|
|
2398
2412
|
});
|
|
2399
2413
|
function zeroNumberByDefault2() {
|
|
2400
|
-
return
|
|
2414
|
+
return z98.number().nullish().transform((v) => v ?? 0);
|
|
2401
2415
|
}
|
|
2402
2416
|
|
|
2403
2417
|
// src/dsm/documentation/block-definitions/aux.ts
|
|
2404
|
-
import { z as
|
|
2405
|
-
var PageBlockDefinitionAppearance =
|
|
2406
|
-
isBordered:
|
|
2407
|
-
hasBackground:
|
|
2408
|
-
isEditorPresentationDifferent:
|
|
2409
|
-
showBlockHeaderInEditor:
|
|
2418
|
+
import { z as z99 } from "zod";
|
|
2419
|
+
var PageBlockDefinitionAppearance = z99.object({
|
|
2420
|
+
isBordered: z99.boolean().optional(),
|
|
2421
|
+
hasBackground: z99.boolean().optional(),
|
|
2422
|
+
isEditorPresentationDifferent: z99.boolean().optional(),
|
|
2423
|
+
showBlockHeaderInEditor: z99.boolean().optional()
|
|
2410
2424
|
});
|
|
2411
2425
|
|
|
2412
2426
|
// src/dsm/documentation/block-definitions/definition.ts
|
|
2413
|
-
import { z as
|
|
2427
|
+
import { z as z102 } from "zod";
|
|
2414
2428
|
|
|
2415
2429
|
// src/dsm/documentation/block-definitions/item.ts
|
|
2416
|
-
import { z as
|
|
2430
|
+
import { z as z101 } from "zod";
|
|
2417
2431
|
|
|
2418
2432
|
// src/dsm/documentation/block-definitions/variant.ts
|
|
2419
|
-
import { z as
|
|
2420
|
-
var PageBlockDefinitionLayoutType =
|
|
2421
|
-
var PageBlockDefinitionLayoutGap =
|
|
2422
|
-
var PageBlockDefinitionLayoutAlign =
|
|
2423
|
-
var PageBlockDefinitionLayoutResizing =
|
|
2424
|
-
var PageBlockDefinitionLayoutBase =
|
|
2433
|
+
import { z as z100 } from "zod";
|
|
2434
|
+
var PageBlockDefinitionLayoutType = z100.enum(["Column", "Row"]);
|
|
2435
|
+
var PageBlockDefinitionLayoutGap = z100.enum(["Small", "Medium", "Large", "None"]);
|
|
2436
|
+
var PageBlockDefinitionLayoutAlign = z100.enum(["Start", "Center", "End"]);
|
|
2437
|
+
var PageBlockDefinitionLayoutResizing = z100.enum(["Fill", "Hug"]);
|
|
2438
|
+
var PageBlockDefinitionLayoutBase = z100.object({
|
|
2425
2439
|
type: PageBlockDefinitionLayoutType,
|
|
2426
2440
|
gap: PageBlockDefinitionLayoutGap.optional(),
|
|
2427
2441
|
columnAlign: PageBlockDefinitionLayoutAlign.optional(),
|
|
2428
2442
|
columnResizing: PageBlockDefinitionLayoutResizing.optional()
|
|
2429
2443
|
});
|
|
2430
2444
|
var PageBlockDefinitionLayout = PageBlockDefinitionLayoutBase.extend({
|
|
2431
|
-
children:
|
|
2432
|
-
});
|
|
2433
|
-
var PageBlockDefinitionVariant =
|
|
2434
|
-
id:
|
|
2435
|
-
name:
|
|
2436
|
-
image:
|
|
2437
|
-
description:
|
|
2438
|
-
documentationLink:
|
|
2445
|
+
children: z100.lazy(() => z100.array(PageBlockDefinitionLayout.or(z100.string())))
|
|
2446
|
+
});
|
|
2447
|
+
var PageBlockDefinitionVariant = z100.object({
|
|
2448
|
+
id: z100.string(),
|
|
2449
|
+
name: z100.string(),
|
|
2450
|
+
image: z100.string().optional(),
|
|
2451
|
+
description: z100.string().optional(),
|
|
2452
|
+
documentationLink: z100.string().optional(),
|
|
2439
2453
|
layout: PageBlockDefinitionLayout,
|
|
2440
|
-
maxColumns:
|
|
2441
|
-
defaultColumns:
|
|
2454
|
+
maxColumns: z100.number().optional(),
|
|
2455
|
+
defaultColumns: z100.number().optional(),
|
|
2442
2456
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2443
2457
|
});
|
|
2444
2458
|
|
|
2445
2459
|
// src/dsm/documentation/block-definitions/item.ts
|
|
2446
|
-
var PageBlockDefinitionPropertyType =
|
|
2460
|
+
var PageBlockDefinitionPropertyType = z101.enum([
|
|
2447
2461
|
"RichText",
|
|
2448
2462
|
"MultiRichText",
|
|
2449
2463
|
"Text",
|
|
@@ -2470,7 +2484,7 @@ var PageBlockDefinitionPropertyType = z100.enum([
|
|
|
2470
2484
|
"Storybook",
|
|
2471
2485
|
"Color"
|
|
2472
2486
|
]);
|
|
2473
|
-
var PageBlockDefinitionRichTextPropertyStyle =
|
|
2487
|
+
var PageBlockDefinitionRichTextPropertyStyle = z101.enum([
|
|
2474
2488
|
"Title1",
|
|
2475
2489
|
"Title2",
|
|
2476
2490
|
"Title3",
|
|
@@ -2480,8 +2494,8 @@ var PageBlockDefinitionRichTextPropertyStyle = z100.enum([
|
|
|
2480
2494
|
"Callout",
|
|
2481
2495
|
"Default"
|
|
2482
2496
|
]);
|
|
2483
|
-
var PageBlockDefinitionMultiRichTextPropertyStyle =
|
|
2484
|
-
var PageBlockDefinitionTextPropertyStyle =
|
|
2497
|
+
var PageBlockDefinitionMultiRichTextPropertyStyle = z101.enum(["OL", "UL", "Default"]);
|
|
2498
|
+
var PageBlockDefinitionTextPropertyStyle = z101.enum([
|
|
2485
2499
|
"Title1",
|
|
2486
2500
|
"Title2",
|
|
2487
2501
|
"Title3",
|
|
@@ -2495,78 +2509,78 @@ var PageBlockDefinitionTextPropertyStyle = z100.enum([
|
|
|
2495
2509
|
"SmallSemibold",
|
|
2496
2510
|
"Custom"
|
|
2497
2511
|
]);
|
|
2498
|
-
var PageBlockDefinitionTextPropertyColor =
|
|
2499
|
-
var PageBlockDefinitionBooleanPropertyStyle =
|
|
2500
|
-
var PageBlockDefinitionSingleSelectPropertyStyle =
|
|
2512
|
+
var PageBlockDefinitionTextPropertyColor = z101.enum(["Neutral", "NeutralFaded"]);
|
|
2513
|
+
var PageBlockDefinitionBooleanPropertyStyle = z101.enum(["SegmentedControl", "ToggleButton", "Checkbox"]);
|
|
2514
|
+
var PageBlockDefinitionSingleSelectPropertyStyle = z101.enum([
|
|
2501
2515
|
"SegmentedControl",
|
|
2502
2516
|
"ToggleButton",
|
|
2503
2517
|
"Select",
|
|
2504
2518
|
"Checkbox"
|
|
2505
2519
|
]);
|
|
2506
|
-
var PageBlockDefinitionMultiSelectPropertyStyle =
|
|
2507
|
-
var PageBlockDefinitionImageAspectRatio =
|
|
2508
|
-
var PageBlockDefinitionImageWidth =
|
|
2509
|
-
var PageBlockDefinitionSelectChoice =
|
|
2510
|
-
value:
|
|
2511
|
-
name:
|
|
2512
|
-
icon:
|
|
2520
|
+
var PageBlockDefinitionMultiSelectPropertyStyle = z101.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
2521
|
+
var PageBlockDefinitionImageAspectRatio = z101.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
2522
|
+
var PageBlockDefinitionImageWidth = z101.enum(["Full", "Icon", "Small", "Medium", "Large", "Poster"]);
|
|
2523
|
+
var PageBlockDefinitionSelectChoice = z101.object({
|
|
2524
|
+
value: z101.string(),
|
|
2525
|
+
name: z101.string(),
|
|
2526
|
+
icon: z101.string().optional()
|
|
2513
2527
|
});
|
|
2514
|
-
var PageBlockDefinitionUntypedPropertyOptions =
|
|
2515
|
-
var PageBlockDefinitionRichTextOptions =
|
|
2528
|
+
var PageBlockDefinitionUntypedPropertyOptions = z101.record(z101.any());
|
|
2529
|
+
var PageBlockDefinitionRichTextOptions = z101.object({
|
|
2516
2530
|
richTextStyle: PageBlockDefinitionRichTextPropertyStyle.optional()
|
|
2517
2531
|
});
|
|
2518
|
-
var PageBlockDefinitionMutiRichTextOptions =
|
|
2532
|
+
var PageBlockDefinitionMutiRichTextOptions = z101.object({
|
|
2519
2533
|
multiRichTextStyle: PageBlockDefinitionMultiRichTextPropertyStyle.optional()
|
|
2520
2534
|
});
|
|
2521
|
-
var PageBlockDefinitionTextOptions =
|
|
2522
|
-
placeholder:
|
|
2523
|
-
defaultValue:
|
|
2535
|
+
var PageBlockDefinitionTextOptions = z101.object({
|
|
2536
|
+
placeholder: z101.string().optional(),
|
|
2537
|
+
defaultValue: z101.string().optional(),
|
|
2524
2538
|
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
2525
2539
|
color: PageBlockDefinitionTextPropertyColor.optional()
|
|
2526
2540
|
});
|
|
2527
|
-
var PageBlockDefinitionSelectOptions =
|
|
2541
|
+
var PageBlockDefinitionSelectOptions = z101.object({
|
|
2528
2542
|
singleSelectStyle: PageBlockDefinitionSingleSelectPropertyStyle.optional(),
|
|
2529
|
-
defaultChoice:
|
|
2530
|
-
choices:
|
|
2543
|
+
defaultChoice: z101.string(),
|
|
2544
|
+
choices: z101.array(PageBlockDefinitionSelectChoice)
|
|
2531
2545
|
});
|
|
2532
|
-
var PageBlockDefinitionImageOptions =
|
|
2546
|
+
var PageBlockDefinitionImageOptions = z101.object({
|
|
2533
2547
|
width: PageBlockDefinitionImageWidth.optional(),
|
|
2534
2548
|
aspectRatio: PageBlockDefinitionImageAspectRatio.optional(),
|
|
2535
|
-
allowCaption:
|
|
2536
|
-
recommendation:
|
|
2549
|
+
allowCaption: z101.boolean().optional(),
|
|
2550
|
+
recommendation: z101.string().optional()
|
|
2537
2551
|
});
|
|
2538
|
-
var PageBlockDefinitionBooleanOptions =
|
|
2539
|
-
defaultvalue:
|
|
2552
|
+
var PageBlockDefinitionBooleanOptions = z101.object({
|
|
2553
|
+
defaultvalue: z101.boolean().optional(),
|
|
2540
2554
|
booleanStyle: PageBlockDefinitionBooleanPropertyStyle.optional()
|
|
2541
2555
|
});
|
|
2542
|
-
var PageBlockDefinitionNumberOptions =
|
|
2543
|
-
defaultValue:
|
|
2544
|
-
min:
|
|
2545
|
-
max:
|
|
2546
|
-
step:
|
|
2547
|
-
placeholder:
|
|
2556
|
+
var PageBlockDefinitionNumberOptions = z101.object({
|
|
2557
|
+
defaultValue: z101.number(),
|
|
2558
|
+
min: z101.number().optional(),
|
|
2559
|
+
max: z101.number().optional(),
|
|
2560
|
+
step: z101.number().optional(),
|
|
2561
|
+
placeholder: z101.string().optional()
|
|
2548
2562
|
});
|
|
2549
|
-
var PageBlockDefinitionComponentOptions =
|
|
2550
|
-
renderLayoutAs:
|
|
2551
|
-
allowPropertySelection:
|
|
2563
|
+
var PageBlockDefinitionComponentOptions = z101.object({
|
|
2564
|
+
renderLayoutAs: z101.enum(["List", "Table"]).optional(),
|
|
2565
|
+
allowPropertySelection: z101.boolean().optional()
|
|
2552
2566
|
});
|
|
2553
|
-
var PageBlockDefinitionProperty =
|
|
2554
|
-
id:
|
|
2555
|
-
name:
|
|
2567
|
+
var PageBlockDefinitionProperty = z101.object({
|
|
2568
|
+
id: z101.string(),
|
|
2569
|
+
name: z101.string(),
|
|
2556
2570
|
type: PageBlockDefinitionPropertyType,
|
|
2557
|
-
description:
|
|
2571
|
+
description: z101.string().optional(),
|
|
2558
2572
|
options: PageBlockDefinitionUntypedPropertyOptions.optional(),
|
|
2559
|
-
variantOptions:
|
|
2573
|
+
variantOptions: z101.record(PageBlockDefinitionUntypedPropertyOptions).optional()
|
|
2560
2574
|
});
|
|
2561
|
-
var PageBlockDefinitionItem =
|
|
2562
|
-
properties:
|
|
2575
|
+
var PageBlockDefinitionItem = z101.object({
|
|
2576
|
+
properties: z101.array(PageBlockDefinitionProperty),
|
|
2563
2577
|
appearance: PageBlockDefinitionAppearance.optional(),
|
|
2564
|
-
variants:
|
|
2565
|
-
defaultVariantKey:
|
|
2578
|
+
variants: z101.array(PageBlockDefinitionVariant),
|
|
2579
|
+
defaultVariantKey: z101.string()
|
|
2566
2580
|
});
|
|
2567
2581
|
|
|
2568
2582
|
// src/dsm/documentation/block-definitions/definition.ts
|
|
2569
|
-
var PageBlockCategory =
|
|
2583
|
+
var PageBlockCategory = z102.enum([
|
|
2570
2584
|
"Text",
|
|
2571
2585
|
"Layout",
|
|
2572
2586
|
"Media",
|
|
@@ -2580,296 +2594,296 @@ var PageBlockCategory = z101.enum([
|
|
|
2580
2594
|
"Data",
|
|
2581
2595
|
"Other"
|
|
2582
2596
|
]);
|
|
2583
|
-
var PageBlockBehaviorDataType =
|
|
2584
|
-
var PageBlockBehaviorSelectionType =
|
|
2585
|
-
var PageBlockDefinitionBehavior =
|
|
2597
|
+
var PageBlockBehaviorDataType = z102.enum(["Item", "Token", "Asset", "Component", "FigmaNode"]);
|
|
2598
|
+
var PageBlockBehaviorSelectionType = z102.enum(["Entity", "Group", "EntityAndGroup"]);
|
|
2599
|
+
var PageBlockDefinitionBehavior = z102.object({
|
|
2586
2600
|
dataType: PageBlockBehaviorDataType,
|
|
2587
|
-
items:
|
|
2588
|
-
numberOfItems:
|
|
2589
|
-
allowLinks:
|
|
2601
|
+
items: z102.object({
|
|
2602
|
+
numberOfItems: z102.number(),
|
|
2603
|
+
allowLinks: z102.boolean()
|
|
2590
2604
|
}).optional(),
|
|
2591
|
-
entities:
|
|
2605
|
+
entities: z102.object({
|
|
2592
2606
|
selectionType: PageBlockBehaviorSelectionType,
|
|
2593
|
-
maxSelected:
|
|
2607
|
+
maxSelected: z102.number()
|
|
2594
2608
|
}).optional()
|
|
2595
2609
|
});
|
|
2596
|
-
var PageBlockDefinitionOnboarding =
|
|
2597
|
-
helpText:
|
|
2598
|
-
documentationLink:
|
|
2610
|
+
var PageBlockDefinitionOnboarding = z102.object({
|
|
2611
|
+
helpText: z102.string(),
|
|
2612
|
+
documentationLink: z102.string().optional()
|
|
2599
2613
|
});
|
|
2600
|
-
var PageBlockDefinition =
|
|
2601
|
-
id:
|
|
2602
|
-
name:
|
|
2603
|
-
description:
|
|
2614
|
+
var PageBlockDefinition = z102.object({
|
|
2615
|
+
id: z102.string(),
|
|
2616
|
+
name: z102.string(),
|
|
2617
|
+
description: z102.string(),
|
|
2604
2618
|
category: PageBlockCategory,
|
|
2605
|
-
icon:
|
|
2606
|
-
documentationLink:
|
|
2607
|
-
searchKeywords:
|
|
2619
|
+
icon: z102.string().optional(),
|
|
2620
|
+
documentationLink: z102.string().optional(),
|
|
2621
|
+
searchKeywords: z102.array(z102.string()).optional(),
|
|
2608
2622
|
item: PageBlockDefinitionItem,
|
|
2609
2623
|
behavior: PageBlockDefinitionBehavior,
|
|
2610
|
-
editorOptions:
|
|
2624
|
+
editorOptions: z102.object({
|
|
2611
2625
|
onboarding: PageBlockDefinitionOnboarding.optional()
|
|
2612
2626
|
}),
|
|
2613
2627
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2614
2628
|
});
|
|
2615
2629
|
|
|
2616
2630
|
// src/dsm/documentation/group.ts
|
|
2617
|
-
import { z as
|
|
2618
|
-
var DocumentationPageGroup =
|
|
2619
|
-
type:
|
|
2620
|
-
childType:
|
|
2621
|
-
id:
|
|
2622
|
-
persistentId:
|
|
2623
|
-
shortPersistentId:
|
|
2624
|
-
designSystemVersionId:
|
|
2625
|
-
parentPersistentId:
|
|
2626
|
-
sortOrder:
|
|
2627
|
-
title:
|
|
2628
|
-
slug:
|
|
2629
|
-
userSlug:
|
|
2630
|
-
createdAt:
|
|
2631
|
-
updatedAt:
|
|
2631
|
+
import { z as z103 } from "zod";
|
|
2632
|
+
var DocumentationPageGroup = z103.object({
|
|
2633
|
+
type: z103.literal("ElementGroup"),
|
|
2634
|
+
childType: z103.literal("DocumentationPage"),
|
|
2635
|
+
id: z103.string(),
|
|
2636
|
+
persistentId: z103.string(),
|
|
2637
|
+
shortPersistentId: z103.string(),
|
|
2638
|
+
designSystemVersionId: z103.string(),
|
|
2639
|
+
parentPersistentId: z103.string().nullish(),
|
|
2640
|
+
sortOrder: z103.number(),
|
|
2641
|
+
title: z103.string(),
|
|
2642
|
+
slug: z103.string(),
|
|
2643
|
+
userSlug: z103.string().nullish(),
|
|
2644
|
+
createdAt: z103.coerce.date(),
|
|
2645
|
+
updatedAt: z103.coerce.date()
|
|
2632
2646
|
});
|
|
2633
2647
|
|
|
2634
2648
|
// src/dsm/documentation/link-preview.ts
|
|
2635
|
-
import { z as
|
|
2636
|
-
var DocumentationLinkPreview =
|
|
2637
|
-
title:
|
|
2638
|
-
description:
|
|
2649
|
+
import { z as z104 } from "zod";
|
|
2650
|
+
var DocumentationLinkPreview = z104.object({
|
|
2651
|
+
title: z104.string().optional(),
|
|
2652
|
+
description: z104.string().optional(),
|
|
2639
2653
|
thumbnail: PageBlockImageReference.optional()
|
|
2640
2654
|
});
|
|
2641
2655
|
|
|
2642
2656
|
// src/dsm/documentation/page-anchor.ts
|
|
2643
|
-
import { z as z104 } from "zod";
|
|
2644
|
-
var DocumentationPageAnchor = z104.object({
|
|
2645
|
-
blockId: z104.string(),
|
|
2646
|
-
level: z104.number(),
|
|
2647
|
-
text: z104.string()
|
|
2648
|
-
});
|
|
2649
|
-
|
|
2650
|
-
// src/dsm/documentation/page-content-backup.ts
|
|
2651
2657
|
import { z as z105 } from "zod";
|
|
2652
|
-
var
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
updatedAt: z105.coerce.date(),
|
|
2657
|
-
documentationPageId: z105.string(),
|
|
2658
|
-
documentationPageName: z105.string(),
|
|
2659
|
-
storagePath: z105.string()
|
|
2658
|
+
var DocumentationPageAnchor = z105.object({
|
|
2659
|
+
blockId: z105.string(),
|
|
2660
|
+
level: z105.number(),
|
|
2661
|
+
text: z105.string()
|
|
2660
2662
|
});
|
|
2661
2663
|
|
|
2662
|
-
// src/dsm/documentation/page-content.ts
|
|
2664
|
+
// src/dsm/documentation/page-content-backup.ts
|
|
2663
2665
|
import { z as z106 } from "zod";
|
|
2664
|
-
var
|
|
2665
|
-
PageBlockEditorModelV2,
|
|
2666
|
-
PageSectionEditorModelV2
|
|
2667
|
-
]);
|
|
2668
|
-
var DocumentationPageContentData = z106.object({
|
|
2669
|
-
items: z106.array(DocumentationPageContentItem)
|
|
2670
|
-
});
|
|
2671
|
-
var DocumentationPageContent = z106.object({
|
|
2666
|
+
var DocumentationPageContentBackup = z106.object({
|
|
2672
2667
|
id: z106.string(),
|
|
2673
2668
|
designSystemVersionId: z106.string(),
|
|
2674
2669
|
createdAt: z106.coerce.date(),
|
|
2675
2670
|
updatedAt: z106.coerce.date(),
|
|
2676
2671
|
documentationPageId: z106.string(),
|
|
2677
|
-
|
|
2672
|
+
documentationPageName: z106.string(),
|
|
2673
|
+
storagePath: z106.string()
|
|
2678
2674
|
});
|
|
2679
2675
|
|
|
2680
|
-
// src/dsm/documentation/page.ts
|
|
2676
|
+
// src/dsm/documentation/page-content.ts
|
|
2681
2677
|
import { z as z107 } from "zod";
|
|
2682
|
-
var
|
|
2683
|
-
|
|
2678
|
+
var DocumentationPageContentItem = z107.discriminatedUnion("type", [
|
|
2679
|
+
PageBlockEditorModelV2,
|
|
2680
|
+
PageSectionEditorModelV2
|
|
2681
|
+
]);
|
|
2682
|
+
var DocumentationPageContentData = z107.object({
|
|
2683
|
+
items: z107.array(DocumentationPageContentItem)
|
|
2684
|
+
});
|
|
2685
|
+
var DocumentationPageContent = z107.object({
|
|
2684
2686
|
id: z107.string(),
|
|
2685
|
-
persistentId: z107.string(),
|
|
2686
|
-
shortPersistentId: z107.string(),
|
|
2687
2687
|
designSystemVersionId: z107.string(),
|
|
2688
|
-
parentPersistentId: z107.string().nullish(),
|
|
2689
|
-
sortOrder: z107.number(),
|
|
2690
|
-
title: z107.string(),
|
|
2691
|
-
slug: z107.string(),
|
|
2692
|
-
userSlug: z107.string().nullish(),
|
|
2693
2688
|
createdAt: z107.coerce.date(),
|
|
2694
|
-
updatedAt: z107.coerce.date()
|
|
2689
|
+
updatedAt: z107.coerce.date(),
|
|
2690
|
+
documentationPageId: z107.string(),
|
|
2691
|
+
data: DocumentationPageContentData
|
|
2695
2692
|
});
|
|
2696
2693
|
|
|
2697
|
-
// src/dsm/
|
|
2694
|
+
// src/dsm/documentation/page.ts
|
|
2698
2695
|
import { z as z108 } from "zod";
|
|
2699
|
-
var
|
|
2700
|
-
|
|
2701
|
-
z108.literal("BaseProperty"),
|
|
2702
|
-
z108.literal("PropertyDefinition"),
|
|
2703
|
-
z108.literal("Theme")
|
|
2704
|
-
]);
|
|
2705
|
-
var ElementViewColumnSharedAttributes = z108.object({
|
|
2696
|
+
var DocumentationPage = z108.object({
|
|
2697
|
+
type: z108.literal("DocumentationPage"),
|
|
2706
2698
|
id: z108.string(),
|
|
2707
2699
|
persistentId: z108.string(),
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2700
|
+
shortPersistentId: z108.string(),
|
|
2701
|
+
designSystemVersionId: z108.string(),
|
|
2702
|
+
parentPersistentId: z108.string().nullish(),
|
|
2703
|
+
sortOrder: z108.number(),
|
|
2704
|
+
title: z108.string(),
|
|
2705
|
+
slug: z108.string(),
|
|
2706
|
+
userSlug: z108.string().nullish(),
|
|
2707
|
+
createdAt: z108.coerce.date(),
|
|
2708
|
+
updatedAt: z108.coerce.date()
|
|
2709
|
+
});
|
|
2710
|
+
|
|
2711
|
+
// src/dsm/views/column.ts
|
|
2712
|
+
import { z as z109 } from "zod";
|
|
2713
|
+
var ElementViewBaseColumnType = z109.enum(["Name", "Description", "Value", "UpdatedAt"]);
|
|
2714
|
+
var ElementViewColumnType = z109.union([
|
|
2715
|
+
z109.literal("BaseProperty"),
|
|
2716
|
+
z109.literal("PropertyDefinition"),
|
|
2717
|
+
z109.literal("Theme")
|
|
2718
|
+
]);
|
|
2719
|
+
var ElementViewColumnSharedAttributes = z109.object({
|
|
2720
|
+
id: z109.string(),
|
|
2721
|
+
persistentId: z109.string(),
|
|
2722
|
+
elementDataViewId: z109.string(),
|
|
2723
|
+
sortPosition: z109.number(),
|
|
2724
|
+
width: z109.number()
|
|
2711
2725
|
});
|
|
2712
2726
|
var ElementViewBasePropertyColumn = ElementViewColumnSharedAttributes.extend({
|
|
2713
|
-
type:
|
|
2727
|
+
type: z109.literal("BaseProperty"),
|
|
2714
2728
|
basePropertyType: ElementViewBaseColumnType
|
|
2715
2729
|
});
|
|
2716
2730
|
var ElementViewPropertyDefinitionColumn = ElementViewColumnSharedAttributes.extend({
|
|
2717
|
-
type:
|
|
2718
|
-
propertyDefinitionId:
|
|
2731
|
+
type: z109.literal("PropertyDefinition"),
|
|
2732
|
+
propertyDefinitionId: z109.string()
|
|
2719
2733
|
});
|
|
2720
2734
|
var ElementViewThemeColumn = ElementViewColumnSharedAttributes.extend({
|
|
2721
|
-
type:
|
|
2722
|
-
themeId:
|
|
2735
|
+
type: z109.literal("Theme"),
|
|
2736
|
+
themeId: z109.string()
|
|
2723
2737
|
});
|
|
2724
|
-
var ElementViewColumn =
|
|
2738
|
+
var ElementViewColumn = z109.discriminatedUnion("type", [
|
|
2725
2739
|
ElementViewBasePropertyColumn,
|
|
2726
2740
|
ElementViewPropertyDefinitionColumn,
|
|
2727
2741
|
ElementViewThemeColumn
|
|
2728
2742
|
]);
|
|
2729
2743
|
|
|
2730
2744
|
// src/dsm/views/view.ts
|
|
2731
|
-
import { z as z109 } from "zod";
|
|
2732
|
-
var ElementView = z109.object({
|
|
2733
|
-
id: z109.string(),
|
|
2734
|
-
persistentId: z109.string(),
|
|
2735
|
-
designSystemVersionId: z109.string(),
|
|
2736
|
-
name: z109.string(),
|
|
2737
|
-
description: z109.string(),
|
|
2738
|
-
targetElementType: ElementPropertyTargetType,
|
|
2739
|
-
isDefault: z109.boolean()
|
|
2740
|
-
});
|
|
2741
|
-
|
|
2742
|
-
// src/dsm/brand.ts
|
|
2743
2745
|
import { z as z110 } from "zod";
|
|
2744
|
-
var
|
|
2746
|
+
var ElementView = z110.object({
|
|
2745
2747
|
id: z110.string(),
|
|
2746
|
-
designSystemVersionId: z110.string(),
|
|
2747
2748
|
persistentId: z110.string(),
|
|
2749
|
+
designSystemVersionId: z110.string(),
|
|
2748
2750
|
name: z110.string(),
|
|
2749
|
-
description: z110.string()
|
|
2751
|
+
description: z110.string(),
|
|
2752
|
+
targetElementType: ElementPropertyTargetType,
|
|
2753
|
+
isDefault: z110.boolean()
|
|
2754
|
+
});
|
|
2755
|
+
|
|
2756
|
+
// src/dsm/brand.ts
|
|
2757
|
+
import { z as z111 } from "zod";
|
|
2758
|
+
var Brand = z111.object({
|
|
2759
|
+
id: z111.string(),
|
|
2760
|
+
designSystemVersionId: z111.string(),
|
|
2761
|
+
persistentId: z111.string(),
|
|
2762
|
+
name: z111.string(),
|
|
2763
|
+
description: z111.string()
|
|
2750
2764
|
});
|
|
2751
2765
|
|
|
2752
2766
|
// src/dsm/design-system.ts
|
|
2753
|
-
import { z as
|
|
2767
|
+
import { z as z121 } from "zod";
|
|
2754
2768
|
|
|
2755
2769
|
// src/workspace/npm-registry-settings.ts
|
|
2756
|
-
import { z as
|
|
2757
|
-
var NpmRegistryAuthType =
|
|
2758
|
-
var NpmRegistryType =
|
|
2759
|
-
var NpmRegistryBasicAuthConfig =
|
|
2760
|
-
authType:
|
|
2761
|
-
username:
|
|
2762
|
-
password:
|
|
2763
|
-
});
|
|
2764
|
-
var NpmRegistryBearerAuthConfig =
|
|
2765
|
-
authType:
|
|
2766
|
-
accessToken:
|
|
2767
|
-
});
|
|
2768
|
-
var NpmRegistryNoAuthConfig =
|
|
2769
|
-
authType:
|
|
2770
|
-
});
|
|
2771
|
-
var NpmRegistrCustomAuthConfig =
|
|
2772
|
-
authType:
|
|
2773
|
-
authHeaderName:
|
|
2774
|
-
authHeaderValue:
|
|
2775
|
-
});
|
|
2776
|
-
var NpmRegistryAuthConfig =
|
|
2770
|
+
import { z as z112 } from "zod";
|
|
2771
|
+
var NpmRegistryAuthType = z112.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
2772
|
+
var NpmRegistryType = z112.enum(["NPMJS", "GitHub", "AzureDevOps", "Artifactory", "Custom"]);
|
|
2773
|
+
var NpmRegistryBasicAuthConfig = z112.object({
|
|
2774
|
+
authType: z112.literal(NpmRegistryAuthType.Enum.Basic),
|
|
2775
|
+
username: z112.string(),
|
|
2776
|
+
password: z112.string()
|
|
2777
|
+
});
|
|
2778
|
+
var NpmRegistryBearerAuthConfig = z112.object({
|
|
2779
|
+
authType: z112.literal(NpmRegistryAuthType.Enum.Bearer),
|
|
2780
|
+
accessToken: z112.string()
|
|
2781
|
+
});
|
|
2782
|
+
var NpmRegistryNoAuthConfig = z112.object({
|
|
2783
|
+
authType: z112.literal(NpmRegistryAuthType.Enum.None)
|
|
2784
|
+
});
|
|
2785
|
+
var NpmRegistrCustomAuthConfig = z112.object({
|
|
2786
|
+
authType: z112.literal(NpmRegistryAuthType.Enum.Custom),
|
|
2787
|
+
authHeaderName: z112.string(),
|
|
2788
|
+
authHeaderValue: z112.string()
|
|
2789
|
+
});
|
|
2790
|
+
var NpmRegistryAuthConfig = z112.discriminatedUnion("authType", [
|
|
2777
2791
|
NpmRegistryBasicAuthConfig,
|
|
2778
2792
|
NpmRegistryBearerAuthConfig,
|
|
2779
2793
|
NpmRegistryNoAuthConfig,
|
|
2780
2794
|
NpmRegistrCustomAuthConfig
|
|
2781
2795
|
]);
|
|
2782
|
-
var NpmRegistryConfigBase =
|
|
2796
|
+
var NpmRegistryConfigBase = z112.object({
|
|
2783
2797
|
registryType: NpmRegistryType,
|
|
2784
|
-
enabledScopes:
|
|
2785
|
-
customRegistryUrl:
|
|
2786
|
-
bypassProxy:
|
|
2787
|
-
npmProxyRegistryConfigId:
|
|
2788
|
-
npmProxyVersion:
|
|
2798
|
+
enabledScopes: z112.array(z112.string()),
|
|
2799
|
+
customRegistryUrl: z112.string().optional(),
|
|
2800
|
+
bypassProxy: z112.boolean().default(false),
|
|
2801
|
+
npmProxyRegistryConfigId: z112.string().optional(),
|
|
2802
|
+
npmProxyVersion: z112.number().optional()
|
|
2789
2803
|
});
|
|
2790
2804
|
var NpmRegistryConfig = NpmRegistryConfigBase.and(NpmRegistryAuthConfig);
|
|
2791
2805
|
|
|
2792
2806
|
// src/workspace/sso-provider.ts
|
|
2793
|
-
import { z as
|
|
2794
|
-
var SsoProvider =
|
|
2795
|
-
providerId:
|
|
2796
|
-
defaultAutoInviteValue:
|
|
2797
|
-
autoInviteDomains:
|
|
2798
|
-
skipDocsSupernovaLogin:
|
|
2799
|
-
areInvitesDisabled:
|
|
2800
|
-
isTestMode:
|
|
2801
|
-
emailDomains:
|
|
2802
|
-
metadataXml:
|
|
2807
|
+
import { z as z113 } from "zod";
|
|
2808
|
+
var SsoProvider = z113.object({
|
|
2809
|
+
providerId: z113.string(),
|
|
2810
|
+
defaultAutoInviteValue: z113.boolean(),
|
|
2811
|
+
autoInviteDomains: z113.record(z113.string(), z113.boolean()),
|
|
2812
|
+
skipDocsSupernovaLogin: z113.boolean(),
|
|
2813
|
+
areInvitesDisabled: z113.boolean(),
|
|
2814
|
+
isTestMode: z113.boolean(),
|
|
2815
|
+
emailDomains: z113.array(z113.string()),
|
|
2816
|
+
metadataXml: z113.string().nullish()
|
|
2803
2817
|
});
|
|
2804
2818
|
|
|
2805
2819
|
// src/workspace/user-invite.ts
|
|
2806
|
-
import { z as
|
|
2820
|
+
import { z as z115 } from "zod";
|
|
2807
2821
|
|
|
2808
2822
|
// src/workspace/workspace-role.ts
|
|
2809
|
-
import { z as
|
|
2810
|
-
var WorkspaceRoleSchema =
|
|
2823
|
+
import { z as z114 } from "zod";
|
|
2824
|
+
var WorkspaceRoleSchema = z114.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest"]);
|
|
2811
2825
|
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
2812
2826
|
|
|
2813
2827
|
// src/workspace/user-invite.ts
|
|
2814
2828
|
var MAX_MEMBERS_COUNT = 100;
|
|
2815
|
-
var UserInvite =
|
|
2816
|
-
email:
|
|
2829
|
+
var UserInvite = z115.object({
|
|
2830
|
+
email: z115.string().email().trim().transform((value) => value.toLowerCase()),
|
|
2817
2831
|
role: WorkspaceRoleSchema
|
|
2818
2832
|
});
|
|
2819
|
-
var UserInvites =
|
|
2833
|
+
var UserInvites = z115.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
2820
2834
|
|
|
2821
2835
|
// src/workspace/workspace-context.ts
|
|
2822
|
-
import { z as
|
|
2836
|
+
import { z as z117 } from "zod";
|
|
2823
2837
|
|
|
2824
2838
|
// src/workspace/workspace.ts
|
|
2825
|
-
import { z as
|
|
2839
|
+
import { z as z116 } from "zod";
|
|
2826
2840
|
import IPCIDR from "ip-cidr";
|
|
2827
2841
|
var isValidCIDR = (value) => {
|
|
2828
2842
|
return IPCIDR.isValidAddress(value);
|
|
2829
2843
|
};
|
|
2830
|
-
var WorkspaceIpWhitelistEntry =
|
|
2831
|
-
isEnabled:
|
|
2832
|
-
name:
|
|
2833
|
-
range:
|
|
2844
|
+
var WorkspaceIpWhitelistEntry = z116.object({
|
|
2845
|
+
isEnabled: z116.boolean(),
|
|
2846
|
+
name: z116.string(),
|
|
2847
|
+
range: z116.string().refine(isValidCIDR, {
|
|
2834
2848
|
message: "Invalid IP CIDR"
|
|
2835
2849
|
})
|
|
2836
2850
|
});
|
|
2837
|
-
var WorkspaceIpSettings =
|
|
2838
|
-
isEnabledForCloud:
|
|
2839
|
-
isEnabledForDocs:
|
|
2840
|
-
entries:
|
|
2851
|
+
var WorkspaceIpSettings = z116.object({
|
|
2852
|
+
isEnabledForCloud: z116.boolean(),
|
|
2853
|
+
isEnabledForDocs: z116.boolean(),
|
|
2854
|
+
entries: z116.array(WorkspaceIpWhitelistEntry)
|
|
2841
2855
|
});
|
|
2842
|
-
var WorkspaceProfile =
|
|
2843
|
-
name:
|
|
2844
|
-
handle:
|
|
2845
|
-
color:
|
|
2846
|
-
avatar: nullishToOptional(
|
|
2856
|
+
var WorkspaceProfile = z116.object({
|
|
2857
|
+
name: z116.string(),
|
|
2858
|
+
handle: z116.string(),
|
|
2859
|
+
color: z116.string(),
|
|
2860
|
+
avatar: nullishToOptional(z116.string()),
|
|
2847
2861
|
billingDetails: nullishToOptional(BillingDetails)
|
|
2848
2862
|
});
|
|
2849
|
-
var Workspace =
|
|
2850
|
-
id:
|
|
2863
|
+
var Workspace = z116.object({
|
|
2864
|
+
id: z116.string(),
|
|
2851
2865
|
profile: WorkspaceProfile,
|
|
2852
2866
|
subscription: Subscription,
|
|
2853
2867
|
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
2854
2868
|
sso: nullishToOptional(SsoProvider),
|
|
2855
2869
|
npmRegistrySettings: nullishToOptional(NpmRegistryConfig),
|
|
2856
|
-
designSystems:
|
|
2870
|
+
designSystems: z116.array(DesignSystem).nullish()
|
|
2857
2871
|
});
|
|
2858
|
-
var WorkspaceWithDesignSystems =
|
|
2872
|
+
var WorkspaceWithDesignSystems = z116.object({
|
|
2859
2873
|
workspace: Workspace,
|
|
2860
|
-
designSystems:
|
|
2874
|
+
designSystems: z116.array(DesignSystem)
|
|
2861
2875
|
});
|
|
2862
2876
|
|
|
2863
2877
|
// src/workspace/workspace-context.ts
|
|
2864
|
-
var WorkspaceContext =
|
|
2865
|
-
workspaceId:
|
|
2878
|
+
var WorkspaceContext = z117.object({
|
|
2879
|
+
workspaceId: z117.string(),
|
|
2866
2880
|
product: ProductCodeSchema,
|
|
2867
2881
|
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
2868
|
-
publicDesignSystem:
|
|
2882
|
+
publicDesignSystem: z117.boolean().optional()
|
|
2869
2883
|
});
|
|
2870
2884
|
|
|
2871
2885
|
// src/workspace/workspace-create.ts
|
|
2872
|
-
import { z as
|
|
2886
|
+
import { z as z118 } from "zod";
|
|
2873
2887
|
|
|
2874
2888
|
// src/utils/validation.ts
|
|
2875
2889
|
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
@@ -2879,18 +2893,18 @@ var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
|
2879
2893
|
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
2880
2894
|
var HANDLE_MIN_LENGTH = 2;
|
|
2881
2895
|
var HANDLE_MAX_LENGTH = 64;
|
|
2882
|
-
var CreateWorkspaceInput =
|
|
2883
|
-
name:
|
|
2896
|
+
var CreateWorkspaceInput = z118.object({
|
|
2897
|
+
name: z118.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
2884
2898
|
product: ProductCodeSchema,
|
|
2885
|
-
priceId:
|
|
2886
|
-
billingEmail:
|
|
2887
|
-
handle:
|
|
2899
|
+
priceId: z118.string(),
|
|
2900
|
+
billingEmail: z118.string().email().optional(),
|
|
2901
|
+
handle: z118.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => value?.length > 0).optional(),
|
|
2888
2902
|
invites: UserInvites.optional(),
|
|
2889
|
-
promoCode:
|
|
2903
|
+
promoCode: z118.string().optional(),
|
|
2890
2904
|
status: InternalStatusSchema.optional(),
|
|
2891
2905
|
planInterval: BillingIntervalSchema.optional(),
|
|
2892
|
-
seats:
|
|
2893
|
-
seatLimit:
|
|
2906
|
+
seats: z118.number().optional(),
|
|
2907
|
+
seatLimit: z118.number().optional(),
|
|
2894
2908
|
card: CardSchema.optional(),
|
|
2895
2909
|
sso: SsoProvider.optional(),
|
|
2896
2910
|
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
@@ -2898,241 +2912,268 @@ var CreateWorkspaceInput = z117.object({
|
|
|
2898
2912
|
});
|
|
2899
2913
|
|
|
2900
2914
|
// src/workspace/workspace-invitations.ts
|
|
2901
|
-
import { z as z118 } from "zod";
|
|
2902
|
-
var WorkspaceInvitation = z118.object({
|
|
2903
|
-
id: z118.string(),
|
|
2904
|
-
email: z118.string().email(),
|
|
2905
|
-
createdAt: z118.coerce.date(),
|
|
2906
|
-
resentAt: z118.coerce.date().nullish(),
|
|
2907
|
-
role: z118.nativeEnum(WorkspaceRole),
|
|
2908
|
-
workspaceId: z118.string(),
|
|
2909
|
-
invitedBy: z118.string()
|
|
2910
|
-
});
|
|
2911
|
-
|
|
2912
|
-
// src/workspace/workspace-membership.ts
|
|
2913
2915
|
import { z as z119 } from "zod";
|
|
2914
|
-
var
|
|
2916
|
+
var WorkspaceInvitation = z119.object({
|
|
2915
2917
|
id: z119.string(),
|
|
2916
|
-
|
|
2918
|
+
email: z119.string().email(),
|
|
2919
|
+
createdAt: z119.coerce.date(),
|
|
2920
|
+
resentAt: z119.coerce.date().nullish(),
|
|
2921
|
+
role: z119.nativeEnum(WorkspaceRole),
|
|
2917
2922
|
workspaceId: z119.string(),
|
|
2918
|
-
|
|
2923
|
+
invitedBy: z119.string()
|
|
2919
2924
|
});
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
+
|
|
2926
|
+
// src/workspace/workspace-membership.ts
|
|
2927
|
+
import { z as z120 } from "zod";
|
|
2928
|
+
var WorkspaceMembership = z120.object({
|
|
2929
|
+
id: z120.string(),
|
|
2930
|
+
userId: z120.string(),
|
|
2931
|
+
workspaceId: z120.string(),
|
|
2932
|
+
workspaceRole: z120.nativeEnum(WorkspaceRole),
|
|
2933
|
+
notificationSettings: UserNotificationSettings
|
|
2934
|
+
});
|
|
2935
|
+
var UpdateMembershipRolesInput = z120.object({
|
|
2936
|
+
members: z120.array(
|
|
2937
|
+
z120.object({
|
|
2938
|
+
userId: z120.string(),
|
|
2939
|
+
role: z120.nativeEnum(WorkspaceRole)
|
|
2925
2940
|
})
|
|
2926
2941
|
)
|
|
2927
2942
|
});
|
|
2928
2943
|
|
|
2929
2944
|
// src/dsm/design-system.ts
|
|
2930
|
-
var DesignSystemSwitcher =
|
|
2931
|
-
isEnabled:
|
|
2932
|
-
designSystemIds:
|
|
2945
|
+
var DesignSystemSwitcher = z121.object({
|
|
2946
|
+
isEnabled: z121.boolean(),
|
|
2947
|
+
designSystemIds: z121.array(z121.string())
|
|
2933
2948
|
});
|
|
2934
|
-
var DesignSystem =
|
|
2935
|
-
id:
|
|
2936
|
-
workspaceId:
|
|
2937
|
-
name:
|
|
2938
|
-
description:
|
|
2939
|
-
docExporterId: nullishToOptional(
|
|
2940
|
-
docSlug:
|
|
2941
|
-
docUserSlug: nullishToOptional(
|
|
2942
|
-
docSlugDeprecated:
|
|
2943
|
-
isPublic:
|
|
2944
|
-
isMultibrand:
|
|
2945
|
-
docViewUrl: nullishToOptional(
|
|
2946
|
-
basePrefixes:
|
|
2949
|
+
var DesignSystem = z121.object({
|
|
2950
|
+
id: z121.string(),
|
|
2951
|
+
workspaceId: z121.string(),
|
|
2952
|
+
name: z121.string(),
|
|
2953
|
+
description: z121.string(),
|
|
2954
|
+
docExporterId: nullishToOptional(z121.string()),
|
|
2955
|
+
docSlug: z121.string(),
|
|
2956
|
+
docUserSlug: nullishToOptional(z121.string()),
|
|
2957
|
+
docSlugDeprecated: z121.string(),
|
|
2958
|
+
isPublic: z121.boolean(),
|
|
2959
|
+
isMultibrand: z121.boolean(),
|
|
2960
|
+
docViewUrl: nullishToOptional(z121.string()),
|
|
2961
|
+
basePrefixes: z121.array(z121.string()),
|
|
2947
2962
|
designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
|
|
2948
|
-
createdAt:
|
|
2949
|
-
updatedAt:
|
|
2963
|
+
createdAt: z121.coerce.date(),
|
|
2964
|
+
updatedAt: z121.coerce.date()
|
|
2950
2965
|
});
|
|
2951
|
-
var DesignSystemWithWorkspace =
|
|
2966
|
+
var DesignSystemWithWorkspace = z121.object({
|
|
2952
2967
|
designSystem: DesignSystem,
|
|
2953
2968
|
workspace: Workspace
|
|
2954
2969
|
});
|
|
2955
2970
|
|
|
2956
2971
|
// src/dsm/desing-system-create.ts
|
|
2957
|
-
import { z as
|
|
2972
|
+
import { z as z122 } from "zod";
|
|
2958
2973
|
var DS_NAME_MIN_LENGTH = 2;
|
|
2959
2974
|
var DS_NAME_MAX_LENGTH = 64;
|
|
2960
2975
|
var DS_DESC_MAX_LENGTH = 64;
|
|
2961
|
-
var DesignSystemCreateInputMetadata =
|
|
2962
|
-
name:
|
|
2963
|
-
description:
|
|
2976
|
+
var DesignSystemCreateInputMetadata = z122.object({
|
|
2977
|
+
name: z122.string().min(DS_NAME_MIN_LENGTH).max(DS_NAME_MAX_LENGTH).trim(),
|
|
2978
|
+
description: z122.string().max(DS_DESC_MAX_LENGTH).trim()
|
|
2964
2979
|
});
|
|
2965
|
-
var DesignSystemCreateInput =
|
|
2980
|
+
var DesignSystemCreateInput = z122.object({
|
|
2966
2981
|
meta: DesignSystemCreateInputMetadata,
|
|
2967
|
-
workspaceId:
|
|
2968
|
-
isPublic:
|
|
2969
|
-
basePrefixes:
|
|
2970
|
-
docUserSlug:
|
|
2971
|
-
source:
|
|
2982
|
+
workspaceId: z122.string(),
|
|
2983
|
+
isPublic: z122.boolean().optional(),
|
|
2984
|
+
basePrefixes: z122.array(z122.string()).optional(),
|
|
2985
|
+
docUserSlug: z122.string().nullish().optional(),
|
|
2986
|
+
source: z122.array(z122.string()).optional()
|
|
2972
2987
|
});
|
|
2973
2988
|
|
|
2974
2989
|
// src/dsm/desing-system-update.ts
|
|
2975
|
-
import { z as
|
|
2990
|
+
import { z as z123 } from "zod";
|
|
2976
2991
|
var DS_NAME_MIN_LENGTH2 = 2;
|
|
2977
2992
|
var DS_NAME_MAX_LENGTH2 = 64;
|
|
2978
2993
|
var DS_DESC_MAX_LENGTH2 = 64;
|
|
2979
|
-
var DesignSystemUpdateInputMetadata =
|
|
2980
|
-
name:
|
|
2981
|
-
description:
|
|
2994
|
+
var DesignSystemUpdateInputMetadata = z123.object({
|
|
2995
|
+
name: z123.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2996
|
+
description: z123.string().max(DS_DESC_MAX_LENGTH2).trim().optional()
|
|
2982
2997
|
});
|
|
2983
|
-
var DesignSystemUpdateInput =
|
|
2998
|
+
var DesignSystemUpdateInput = z123.object({
|
|
2984
2999
|
meta: DesignSystemUpdateInputMetadata.optional(),
|
|
2985
|
-
workspaceId:
|
|
2986
|
-
isPublic:
|
|
2987
|
-
basePrefixes:
|
|
2988
|
-
docUserSlug:
|
|
2989
|
-
source:
|
|
2990
|
-
name:
|
|
2991
|
-
description:
|
|
2992
|
-
docExporterId:
|
|
3000
|
+
workspaceId: z123.string().optional(),
|
|
3001
|
+
isPublic: z123.boolean().optional(),
|
|
3002
|
+
basePrefixes: z123.array(z123.string()).optional(),
|
|
3003
|
+
docUserSlug: z123.string().nullish().optional(),
|
|
3004
|
+
source: z123.array(z123.string()).optional(),
|
|
3005
|
+
name: z123.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
3006
|
+
description: z123.string().max(DS_DESC_MAX_LENGTH2).trim().optional(),
|
|
3007
|
+
docExporterId: z123.string().optional()
|
|
2993
3008
|
});
|
|
2994
3009
|
|
|
2995
3010
|
// src/dsm/exporter-property-values-collection.ts
|
|
2996
|
-
import { z as
|
|
2997
|
-
var ExporterPropertyImageValue =
|
|
3011
|
+
import { z as z124 } from "zod";
|
|
3012
|
+
var ExporterPropertyImageValue = z124.object({
|
|
2998
3013
|
asset: PageBlockAsset.optional(),
|
|
2999
|
-
assetId:
|
|
3000
|
-
assetUrl:
|
|
3001
|
-
});
|
|
3002
|
-
var ExporterPropertyValue =
|
|
3003
|
-
key:
|
|
3004
|
-
value:
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3014
|
+
assetId: z124.string().optional(),
|
|
3015
|
+
assetUrl: z124.string().optional()
|
|
3016
|
+
});
|
|
3017
|
+
var ExporterPropertyValue = z124.object({
|
|
3018
|
+
key: z124.string(),
|
|
3019
|
+
value: z124.union([
|
|
3020
|
+
z124.number(),
|
|
3021
|
+
z124.string(),
|
|
3022
|
+
z124.boolean(),
|
|
3008
3023
|
ExporterPropertyImageValue,
|
|
3009
3024
|
ColorTokenData,
|
|
3010
3025
|
TypographyTokenData
|
|
3011
3026
|
])
|
|
3012
3027
|
});
|
|
3013
|
-
var ExporterPropertyValuesCollection =
|
|
3014
|
-
id:
|
|
3015
|
-
designSystemId:
|
|
3016
|
-
exporterId:
|
|
3017
|
-
values:
|
|
3028
|
+
var ExporterPropertyValuesCollection = z124.object({
|
|
3029
|
+
id: z124.string(),
|
|
3030
|
+
designSystemId: z124.string(),
|
|
3031
|
+
exporterId: z124.string(),
|
|
3032
|
+
values: z124.array(ExporterPropertyValue)
|
|
3018
3033
|
});
|
|
3019
3034
|
|
|
3020
3035
|
// src/dsm/published-doc-page.ts
|
|
3021
|
-
import { z as
|
|
3036
|
+
import { z as z125 } from "zod";
|
|
3022
3037
|
var SHORT_PERSISTENT_ID_LENGTH = 8;
|
|
3023
3038
|
function tryParseShortPersistentId(url = "/") {
|
|
3024
3039
|
const lastUrlPart = url.split("/").pop() || "";
|
|
3025
3040
|
const shortPersistentId = lastUrlPart.split("-").pop()?.replaceAll(".html", "") || null;
|
|
3026
3041
|
return shortPersistentId?.length === SHORT_PERSISTENT_ID_LENGTH ? shortPersistentId : null;
|
|
3027
3042
|
}
|
|
3028
|
-
var PublishedDocPage =
|
|
3029
|
-
id:
|
|
3030
|
-
publishedDocId:
|
|
3031
|
-
pageShortPersistentId:
|
|
3032
|
-
pathV1:
|
|
3033
|
-
pathV2:
|
|
3034
|
-
storagePath:
|
|
3035
|
-
locale:
|
|
3036
|
-
isPrivate:
|
|
3037
|
-
isHidden:
|
|
3038
|
-
createdAt:
|
|
3039
|
-
updatedAt:
|
|
3043
|
+
var PublishedDocPage = z125.object({
|
|
3044
|
+
id: z125.string(),
|
|
3045
|
+
publishedDocId: z125.string(),
|
|
3046
|
+
pageShortPersistentId: z125.string(),
|
|
3047
|
+
pathV1: z125.string(),
|
|
3048
|
+
pathV2: z125.string(),
|
|
3049
|
+
storagePath: z125.string(),
|
|
3050
|
+
locale: z125.string().optional(),
|
|
3051
|
+
isPrivate: z125.boolean(),
|
|
3052
|
+
isHidden: z125.boolean(),
|
|
3053
|
+
createdAt: z125.coerce.date(),
|
|
3054
|
+
updatedAt: z125.coerce.date()
|
|
3040
3055
|
});
|
|
3041
3056
|
|
|
3042
3057
|
// src/dsm/published-doc.ts
|
|
3043
|
-
import { z as
|
|
3058
|
+
import { z as z126 } from "zod";
|
|
3044
3059
|
var publishedDocEnvironments = ["Live", "Preview"];
|
|
3045
|
-
var PublishedDocEnvironment =
|
|
3046
|
-
var PublishedDocsChecksums =
|
|
3047
|
-
var PublishedDocRoutingVersion =
|
|
3048
|
-
var PublishedDoc =
|
|
3049
|
-
id:
|
|
3050
|
-
designSystemVersionId:
|
|
3051
|
-
createdAt:
|
|
3052
|
-
updatedAt:
|
|
3053
|
-
lastPublishedAt:
|
|
3054
|
-
isDefault:
|
|
3055
|
-
isPublic:
|
|
3060
|
+
var PublishedDocEnvironment = z126.enum(publishedDocEnvironments);
|
|
3061
|
+
var PublishedDocsChecksums = z126.record(z126.string());
|
|
3062
|
+
var PublishedDocRoutingVersion = z126.enum(["1", "2"]);
|
|
3063
|
+
var PublishedDoc = z126.object({
|
|
3064
|
+
id: z126.string(),
|
|
3065
|
+
designSystemVersionId: z126.string(),
|
|
3066
|
+
createdAt: z126.coerce.date(),
|
|
3067
|
+
updatedAt: z126.coerce.date(),
|
|
3068
|
+
lastPublishedAt: z126.coerce.date(),
|
|
3069
|
+
isDefault: z126.boolean(),
|
|
3070
|
+
isPublic: z126.boolean(),
|
|
3056
3071
|
environment: PublishedDocEnvironment,
|
|
3057
3072
|
checksums: PublishedDocsChecksums,
|
|
3058
|
-
storagePath:
|
|
3059
|
-
wasMigrated:
|
|
3073
|
+
storagePath: z126.string(),
|
|
3074
|
+
wasMigrated: z126.boolean(),
|
|
3060
3075
|
routingVersion: PublishedDocRoutingVersion,
|
|
3061
|
-
usesLocalizations:
|
|
3062
|
-
wasPublishedWithLocalizations:
|
|
3076
|
+
usesLocalizations: z126.boolean(),
|
|
3077
|
+
wasPublishedWithLocalizations: z126.boolean()
|
|
3063
3078
|
});
|
|
3064
3079
|
|
|
3065
3080
|
// src/dsm/version.ts
|
|
3066
|
-
import { z as
|
|
3067
|
-
var DesignSystemVersion =
|
|
3068
|
-
id:
|
|
3069
|
-
version:
|
|
3070
|
-
createdAt:
|
|
3071
|
-
designSystemId:
|
|
3072
|
-
name:
|
|
3073
|
-
comment:
|
|
3074
|
-
isReadonly:
|
|
3075
|
-
changeLog:
|
|
3076
|
-
parentId:
|
|
3077
|
-
});
|
|
3078
|
-
var VersionCreationJobStatus =
|
|
3079
|
-
var VersionCreationJob =
|
|
3080
|
-
id:
|
|
3081
|
-
version:
|
|
3082
|
-
designSystemId:
|
|
3083
|
-
designSystemVersionId: nullishToOptional(
|
|
3081
|
+
import { z as z127 } from "zod";
|
|
3082
|
+
var DesignSystemVersion = z127.object({
|
|
3083
|
+
id: z127.string(),
|
|
3084
|
+
version: z127.string(),
|
|
3085
|
+
createdAt: z127.date(),
|
|
3086
|
+
designSystemId: z127.string(),
|
|
3087
|
+
name: z127.string(),
|
|
3088
|
+
comment: z127.string(),
|
|
3089
|
+
isReadonly: z127.boolean(),
|
|
3090
|
+
changeLog: z127.string(),
|
|
3091
|
+
parentId: z127.string().optional()
|
|
3092
|
+
});
|
|
3093
|
+
var VersionCreationJobStatus = z127.enum(["Success", "InProgress", "Error"]);
|
|
3094
|
+
var VersionCreationJob = z127.object({
|
|
3095
|
+
id: z127.string(),
|
|
3096
|
+
version: z127.string(),
|
|
3097
|
+
designSystemId: z127.string(),
|
|
3098
|
+
designSystemVersionId: nullishToOptional(z127.string()),
|
|
3084
3099
|
status: VersionCreationJobStatus,
|
|
3085
|
-
errorMessage: nullishToOptional(
|
|
3100
|
+
errorMessage: nullishToOptional(z127.string())
|
|
3101
|
+
});
|
|
3102
|
+
|
|
3103
|
+
// src/export/export-runner/export-context.ts
|
|
3104
|
+
import { z as z128 } from "zod";
|
|
3105
|
+
var ExportJobDocumentationContext = z128.object({
|
|
3106
|
+
isSingleVersionDocs: z128.boolean(),
|
|
3107
|
+
versionSlug: z128.string(),
|
|
3108
|
+
environment: PublishedDocEnvironment
|
|
3109
|
+
});
|
|
3110
|
+
var ExportJobContext = z128.object({
|
|
3111
|
+
apiUrl: z128.string(),
|
|
3112
|
+
accessToken: z128.string(),
|
|
3113
|
+
designSystemId: z128.string(),
|
|
3114
|
+
designSystemVersionId: z128.string(),
|
|
3115
|
+
brandId: z128.string().optional(),
|
|
3116
|
+
exporterPackageUrl: z128.string(),
|
|
3117
|
+
exporterPropertyValues: ExporterPropertyValue.array(),
|
|
3118
|
+
documentation: ExportJobDocumentationContext.optional()
|
|
3119
|
+
});
|
|
3120
|
+
|
|
3121
|
+
// src/export/export-runner/exporter-payload.ts
|
|
3122
|
+
import { z as z129 } from "zod";
|
|
3123
|
+
var ExporterFunctionPayload = z129.object({
|
|
3124
|
+
exportJobId: z129.string(),
|
|
3125
|
+
exportContextId: z129.string(),
|
|
3126
|
+
designSystemId: z129.string()
|
|
3086
3127
|
});
|
|
3087
3128
|
|
|
3088
3129
|
// src/export/export-destinations.ts
|
|
3089
|
-
import { z as
|
|
3130
|
+
import { z as z130 } from "zod";
|
|
3090
3131
|
var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
|
|
3091
3132
|
var BITBUCKET_MAX_LENGTH = 64;
|
|
3092
|
-
var ExporterDestinationDocs =
|
|
3133
|
+
var ExporterDestinationDocs = z130.object({
|
|
3093
3134
|
environment: PublishedDocEnvironment
|
|
3094
3135
|
});
|
|
3095
|
-
var ExporterDestinationS3 =
|
|
3096
|
-
var ExporterDestinationGithub =
|
|
3097
|
-
connectionId:
|
|
3098
|
-
branch:
|
|
3099
|
-
relativePath:
|
|
3136
|
+
var ExporterDestinationS3 = z130.object({});
|
|
3137
|
+
var ExporterDestinationGithub = z130.object({
|
|
3138
|
+
connectionId: z130.string(),
|
|
3139
|
+
branch: z130.string(),
|
|
3140
|
+
relativePath: z130.string()
|
|
3100
3141
|
// // +
|
|
3101
3142
|
// userId: z.coerce.string(),
|
|
3102
3143
|
});
|
|
3103
|
-
var ExporterDestinationAzure =
|
|
3104
|
-
connectionId:
|
|
3105
|
-
organizationId:
|
|
3106
|
-
projectId:
|
|
3107
|
-
repositoryId:
|
|
3108
|
-
branch:
|
|
3109
|
-
relativePath:
|
|
3144
|
+
var ExporterDestinationAzure = z130.object({
|
|
3145
|
+
connectionId: z130.string(),
|
|
3146
|
+
organizationId: z130.string(),
|
|
3147
|
+
projectId: z130.string(),
|
|
3148
|
+
repositoryId: z130.string(),
|
|
3149
|
+
branch: z130.string(),
|
|
3150
|
+
relativePath: z130.string()
|
|
3110
3151
|
// // +
|
|
3111
3152
|
// userId: z.coerce.string(),
|
|
3112
3153
|
// url: z.string(),
|
|
3113
3154
|
});
|
|
3114
|
-
var ExporterDestinationGitlab =
|
|
3115
|
-
connectionId:
|
|
3116
|
-
projectId:
|
|
3117
|
-
branch:
|
|
3118
|
-
relativePath:
|
|
3155
|
+
var ExporterDestinationGitlab = z130.object({
|
|
3156
|
+
connectionId: z130.string(),
|
|
3157
|
+
projectId: z130.string(),
|
|
3158
|
+
branch: z130.string(),
|
|
3159
|
+
relativePath: z130.string()
|
|
3119
3160
|
// // +
|
|
3120
3161
|
// userId: z.coerce.string(),
|
|
3121
3162
|
// url: z.string(),
|
|
3122
3163
|
});
|
|
3123
|
-
var ExporterDestinationBitbucket =
|
|
3124
|
-
connectionId:
|
|
3125
|
-
workspaceSlug:
|
|
3126
|
-
projectKey:
|
|
3127
|
-
repoSlug:
|
|
3128
|
-
branch:
|
|
3129
|
-
relativePath:
|
|
3164
|
+
var ExporterDestinationBitbucket = z130.object({
|
|
3165
|
+
connectionId: z130.string(),
|
|
3166
|
+
workspaceSlug: z130.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3167
|
+
projectKey: z130.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3168
|
+
repoSlug: z130.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3169
|
+
branch: z130.string(),
|
|
3170
|
+
relativePath: z130.string()
|
|
3130
3171
|
// // +
|
|
3131
3172
|
// userId: z.string(),
|
|
3132
3173
|
// url: z.string(),
|
|
3133
3174
|
});
|
|
3134
|
-
var ExportDestinationsMap =
|
|
3135
|
-
webhookUrl:
|
|
3175
|
+
var ExportDestinationsMap = z130.object({
|
|
3176
|
+
webhookUrl: z130.string().optional(),
|
|
3136
3177
|
destinationSnDocs: ExporterDestinationDocs.optional(),
|
|
3137
3178
|
destinationS3: ExporterDestinationS3.optional(),
|
|
3138
3179
|
destinationGithub: ExporterDestinationGithub.optional(),
|
|
@@ -3142,30 +3183,30 @@ var ExportDestinationsMap = z127.object({
|
|
|
3142
3183
|
});
|
|
3143
3184
|
|
|
3144
3185
|
// src/export/export-jobs.ts
|
|
3145
|
-
import { z as
|
|
3146
|
-
var ExportJobDestinationType =
|
|
3147
|
-
var ExportJobStatus =
|
|
3148
|
-
var ExportJobLogEntryType =
|
|
3149
|
-
var ExportJobLogEntry =
|
|
3150
|
-
id:
|
|
3151
|
-
time:
|
|
3186
|
+
import { z as z131 } from "zod";
|
|
3187
|
+
var ExportJobDestinationType = z131.enum(["s3", "webhookUrl", "github", "documentation", "azure", "gitlab"]);
|
|
3188
|
+
var ExportJobStatus = z131.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
3189
|
+
var ExportJobLogEntryType = z131.enum(["success", "info", "warning", "error", "user"]);
|
|
3190
|
+
var ExportJobLogEntry = z131.object({
|
|
3191
|
+
id: z131.string().optional(),
|
|
3192
|
+
time: z131.coerce.date(),
|
|
3152
3193
|
type: ExportJobLogEntryType,
|
|
3153
|
-
message:
|
|
3194
|
+
message: z131.string()
|
|
3154
3195
|
});
|
|
3155
|
-
var ExportJobPullRequestDestinationResult =
|
|
3156
|
-
pullRequestUrl:
|
|
3196
|
+
var ExportJobPullRequestDestinationResult = z131.object({
|
|
3197
|
+
pullRequestUrl: z131.string()
|
|
3157
3198
|
});
|
|
3158
|
-
var ExportJobS3DestinationResult =
|
|
3159
|
-
bucket:
|
|
3160
|
-
urlPrefix:
|
|
3161
|
-
path:
|
|
3162
|
-
files:
|
|
3199
|
+
var ExportJobS3DestinationResult = z131.object({
|
|
3200
|
+
bucket: z131.string(),
|
|
3201
|
+
urlPrefix: z131.string().optional(),
|
|
3202
|
+
path: z131.string(),
|
|
3203
|
+
files: z131.array(z131.string())
|
|
3163
3204
|
});
|
|
3164
|
-
var ExportJobDocsDestinationResult =
|
|
3165
|
-
url:
|
|
3205
|
+
var ExportJobDocsDestinationResult = z131.object({
|
|
3206
|
+
url: z131.string()
|
|
3166
3207
|
});
|
|
3167
|
-
var ExportJobResult =
|
|
3168
|
-
error:
|
|
3208
|
+
var ExportJobResult = z131.object({
|
|
3209
|
+
error: z131.string().optional(),
|
|
3169
3210
|
s3: ExportJobS3DestinationResult.optional(),
|
|
3170
3211
|
github: ExportJobPullRequestDestinationResult.optional(),
|
|
3171
3212
|
azure: ExportJobPullRequestDestinationResult.optional(),
|
|
@@ -3173,21 +3214,21 @@ var ExportJobResult = z128.object({
|
|
|
3173
3214
|
bitbucket: ExportJobPullRequestDestinationResult.optional(),
|
|
3174
3215
|
sndocs: ExportJobDocsDestinationResult.optional()
|
|
3175
3216
|
});
|
|
3176
|
-
var ExportJob =
|
|
3177
|
-
id:
|
|
3178
|
-
createdAt:
|
|
3179
|
-
finishedAt:
|
|
3180
|
-
designSystemId:
|
|
3181
|
-
designSystemVersionId:
|
|
3182
|
-
workspaceId:
|
|
3183
|
-
scheduleId:
|
|
3184
|
-
exporterId:
|
|
3185
|
-
brandId:
|
|
3186
|
-
themeId:
|
|
3187
|
-
estimatedExecutionTime:
|
|
3217
|
+
var ExportJob = z131.object({
|
|
3218
|
+
id: z131.string(),
|
|
3219
|
+
createdAt: z131.date(),
|
|
3220
|
+
finishedAt: z131.date().optional(),
|
|
3221
|
+
designSystemId: z131.string(),
|
|
3222
|
+
designSystemVersionId: z131.string(),
|
|
3223
|
+
workspaceId: z131.string(),
|
|
3224
|
+
scheduleId: z131.string().nullish(),
|
|
3225
|
+
exporterId: z131.string(),
|
|
3226
|
+
brandId: z131.string().optional(),
|
|
3227
|
+
themeId: z131.string().optional(),
|
|
3228
|
+
estimatedExecutionTime: z131.number().optional(),
|
|
3188
3229
|
status: ExportJobStatus,
|
|
3189
3230
|
result: ExportJobResult.optional(),
|
|
3190
|
-
createdByUserId:
|
|
3231
|
+
createdByUserId: z131.string().optional(),
|
|
3191
3232
|
// Destinations
|
|
3192
3233
|
...ExportDestinationsMap.shape
|
|
3193
3234
|
});
|
|
@@ -3202,58 +3243,45 @@ var ExportJobFindByFilter = ExportJob.pick({
|
|
|
3202
3243
|
themeId: true,
|
|
3203
3244
|
brandId: true
|
|
3204
3245
|
}).extend({
|
|
3205
|
-
destinations:
|
|
3246
|
+
destinations: z131.array(ExportJobDestinationType),
|
|
3206
3247
|
docsEnvironment: PublishedDocEnvironment
|
|
3207
3248
|
}).partial();
|
|
3208
3249
|
|
|
3209
|
-
// src/export/export-runner/export-context.ts
|
|
3210
|
-
import { z as z129 } from "zod";
|
|
3211
|
-
var ExportJobDocumentationContext = z129.object({
|
|
3212
|
-
isSingleVersionDocs: z129.boolean(),
|
|
3213
|
-
versionSlug: z129.string(),
|
|
3214
|
-
environment: PublishedDocEnvironment
|
|
3215
|
-
});
|
|
3216
|
-
var ExportJobContext = z129.object({
|
|
3217
|
-
apiUrl: z129.string(),
|
|
3218
|
-
accessToken: z129.string(),
|
|
3219
|
-
designSystemId: z129.string(),
|
|
3220
|
-
designSystemVersionId: z129.string(),
|
|
3221
|
-
brandId: z129.string().optional(),
|
|
3222
|
-
exporterPackageUrl: z129.string(),
|
|
3223
|
-
exporterPropertyValues: ExporterPropertyValue.array(),
|
|
3224
|
-
documentation: ExportJobDocumentationContext.optional()
|
|
3225
|
-
});
|
|
3226
|
-
|
|
3227
|
-
// src/export/export-runner/exporter-payload.ts
|
|
3228
|
-
import { z as z130 } from "zod";
|
|
3229
|
-
var ExporterFunctionPayload = z130.object({
|
|
3230
|
-
exportJobId: z130.string(),
|
|
3231
|
-
exportContextId: z130.string(),
|
|
3232
|
-
designSystemId: z130.string()
|
|
3233
|
-
});
|
|
3234
|
-
|
|
3235
3250
|
// src/export/export-schedule.ts
|
|
3236
|
-
import { z as
|
|
3237
|
-
var ExporterScheduleEventType =
|
|
3238
|
-
var ExporterSchedule =
|
|
3239
|
-
id:
|
|
3240
|
-
name:
|
|
3251
|
+
import { z as z132 } from "zod";
|
|
3252
|
+
var ExporterScheduleEventType = z132.enum(["OnVersionReleased", "OnHeadChanged", "OnSourceUpdated", "None"]);
|
|
3253
|
+
var ExporterSchedule = z132.object({
|
|
3254
|
+
id: z132.string(),
|
|
3255
|
+
name: z132.string(),
|
|
3241
3256
|
eventType: ExporterScheduleEventType,
|
|
3242
|
-
isEnabled:
|
|
3243
|
-
workspaceId:
|
|
3244
|
-
designSystemId:
|
|
3245
|
-
exporterId:
|
|
3246
|
-
brandId:
|
|
3247
|
-
themeId:
|
|
3257
|
+
isEnabled: z132.boolean(),
|
|
3258
|
+
workspaceId: z132.string(),
|
|
3259
|
+
designSystemId: z132.string(),
|
|
3260
|
+
exporterId: z132.string(),
|
|
3261
|
+
brandId: z132.string().optional(),
|
|
3262
|
+
themeId: z132.string().optional(),
|
|
3248
3263
|
// Destinations
|
|
3249
3264
|
...ExportDestinationsMap.shape
|
|
3250
3265
|
});
|
|
3251
3266
|
|
|
3252
|
-
// src/export/exporter.ts
|
|
3267
|
+
// src/export/exporter-workspace-membership-role.ts
|
|
3268
|
+
import { z as z133 } from "zod";
|
|
3269
|
+
var ExporterWorkspaceMembershipRole = z133.enum(["Owner", "OwnerArchived", "User"]);
|
|
3270
|
+
|
|
3271
|
+
// src/export/exporter-workspace-membership.ts
|
|
3253
3272
|
import { z as z134 } from "zod";
|
|
3273
|
+
var ExporterWorkspaceMembership = z134.object({
|
|
3274
|
+
id: z134.string(),
|
|
3275
|
+
workspaceId: z134.string(),
|
|
3276
|
+
exporterId: z134.string(),
|
|
3277
|
+
role: ExporterWorkspaceMembershipRole
|
|
3278
|
+
});
|
|
3279
|
+
|
|
3280
|
+
// src/export/exporter.ts
|
|
3281
|
+
import { z as z137 } from "zod";
|
|
3254
3282
|
|
|
3255
3283
|
// src/export/git-providers.ts
|
|
3256
|
-
import { z as
|
|
3284
|
+
import { z as z135 } from "zod";
|
|
3257
3285
|
var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
3258
3286
|
GitProviderNames2["Azure"] = "azure";
|
|
3259
3287
|
GitProviderNames2["Github"] = "github";
|
|
@@ -3261,11 +3289,11 @@ var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
|
3261
3289
|
GitProviderNames2["Bitbucket"] = "bitbucket";
|
|
3262
3290
|
return GitProviderNames2;
|
|
3263
3291
|
})(GitProviderNames || {});
|
|
3264
|
-
var GitProvider =
|
|
3292
|
+
var GitProvider = z135.nativeEnum(GitProviderNames);
|
|
3265
3293
|
|
|
3266
3294
|
// src/export/pulsar.ts
|
|
3267
|
-
import { z as
|
|
3268
|
-
var PulsarPropertyType =
|
|
3295
|
+
import { z as z136 } from "zod";
|
|
3296
|
+
var PulsarPropertyType = z136.enum([
|
|
3269
3297
|
"string",
|
|
3270
3298
|
"number",
|
|
3271
3299
|
"boolean",
|
|
@@ -3278,106 +3306,91 @@ var PulsarPropertyType = z133.enum([
|
|
|
3278
3306
|
"tokenProperties",
|
|
3279
3307
|
"tokenType"
|
|
3280
3308
|
]);
|
|
3281
|
-
var PulsarBaseProperty =
|
|
3282
|
-
label:
|
|
3283
|
-
key:
|
|
3284
|
-
description:
|
|
3309
|
+
var PulsarBaseProperty = z136.object({
|
|
3310
|
+
label: z136.string(),
|
|
3311
|
+
key: z136.string(),
|
|
3312
|
+
description: z136.string().nullish(),
|
|
3285
3313
|
type: PulsarPropertyType,
|
|
3286
|
-
values:
|
|
3287
|
-
default:
|
|
3314
|
+
values: z136.array(z136.string()).nullish(),
|
|
3315
|
+
default: z136.union([z136.string(), z136.boolean(), z136.number()]).nullish(),
|
|
3288
3316
|
// PulsarPropertyValueType //is optional?
|
|
3289
|
-
inputType:
|
|
3317
|
+
inputType: z136.enum(["code", "plain"]).optional(),
|
|
3290
3318
|
//is optional?
|
|
3291
|
-
isMultiline:
|
|
3319
|
+
isMultiline: z136.boolean().nullish()
|
|
3292
3320
|
});
|
|
3293
3321
|
var PulsarContributionConfigurationProperty = PulsarBaseProperty.extend({
|
|
3294
|
-
category:
|
|
3322
|
+
category: z136.string()
|
|
3295
3323
|
});
|
|
3296
|
-
var PulsarContributionVariant =
|
|
3297
|
-
key:
|
|
3298
|
-
name:
|
|
3299
|
-
isDefault: nullishToOptional(
|
|
3300
|
-
description: nullishToOptional(
|
|
3301
|
-
thumbnailURL: nullishToOptional(
|
|
3324
|
+
var PulsarContributionVariant = z136.object({
|
|
3325
|
+
key: z136.string(),
|
|
3326
|
+
name: z136.string(),
|
|
3327
|
+
isDefault: nullishToOptional(z136.boolean()),
|
|
3328
|
+
description: nullishToOptional(z136.string()),
|
|
3329
|
+
thumbnailURL: nullishToOptional(z136.string())
|
|
3302
3330
|
});
|
|
3303
|
-
var PulsarCustomBlock =
|
|
3304
|
-
title: nullishToOptional(
|
|
3305
|
-
key:
|
|
3306
|
-
category: nullishToOptional(
|
|
3307
|
-
description: nullishToOptional(
|
|
3308
|
-
iconURL: nullishToOptional(
|
|
3309
|
-
mode: nullishToOptional(
|
|
3310
|
-
properties: nullishToOptional(
|
|
3331
|
+
var PulsarCustomBlock = z136.object({
|
|
3332
|
+
title: nullishToOptional(z136.string()),
|
|
3333
|
+
key: z136.string(),
|
|
3334
|
+
category: nullishToOptional(z136.string()),
|
|
3335
|
+
description: nullishToOptional(z136.string()),
|
|
3336
|
+
iconURL: nullishToOptional(z136.string()),
|
|
3337
|
+
mode: nullishToOptional(z136.enum(["array", "block"])),
|
|
3338
|
+
properties: nullishToOptional(z136.array(PulsarBaseProperty)).transform((v) => v ?? [])
|
|
3311
3339
|
});
|
|
3312
3340
|
|
|
3313
3341
|
// src/export/exporter.ts
|
|
3314
|
-
var ExporterType =
|
|
3315
|
-
var ExporterSource =
|
|
3316
|
-
var ExporterTag =
|
|
3317
|
-
var ExporterDetails =
|
|
3318
|
-
description:
|
|
3319
|
-
version:
|
|
3320
|
-
routingVersion: nullishToOptional(
|
|
3321
|
-
author: nullishToOptional(
|
|
3322
|
-
organization: nullishToOptional(
|
|
3323
|
-
homepage: nullishToOptional(
|
|
3324
|
-
readme: nullishToOptional(
|
|
3325
|
-
tags: nullishToOptional(
|
|
3326
|
-
packageId: nullishToOptional(
|
|
3327
|
-
iconURL: nullishToOptional(
|
|
3328
|
-
configurationProperties: nullishToOptional(
|
|
3329
|
-
customBlocks: nullishToOptional(
|
|
3330
|
-
blockVariants: nullishToOptional(
|
|
3331
|
-
usesBrands: nullishToOptional(
|
|
3332
|
-
usesThemes: nullishToOptional(
|
|
3342
|
+
var ExporterType = z137.enum(["code", "documentation"]);
|
|
3343
|
+
var ExporterSource = z137.enum(["git", "upload"]);
|
|
3344
|
+
var ExporterTag = z137.string().regex(/^[0-9a-zA-Z]+(\s[0-9a-zA-Z]+)*$/);
|
|
3345
|
+
var ExporterDetails = z137.object({
|
|
3346
|
+
description: z137.string(),
|
|
3347
|
+
version: z137.string(),
|
|
3348
|
+
routingVersion: nullishToOptional(z137.string()),
|
|
3349
|
+
author: nullishToOptional(z137.string()),
|
|
3350
|
+
organization: nullishToOptional(z137.string()),
|
|
3351
|
+
homepage: nullishToOptional(z137.string()),
|
|
3352
|
+
readme: nullishToOptional(z137.string()),
|
|
3353
|
+
tags: nullishToOptional(z137.array(ExporterTag)).default([]),
|
|
3354
|
+
packageId: nullishToOptional(z137.string().max(255)),
|
|
3355
|
+
iconURL: nullishToOptional(z137.string()),
|
|
3356
|
+
configurationProperties: nullishToOptional(z137.array(PulsarContributionConfigurationProperty)).default([]),
|
|
3357
|
+
customBlocks: nullishToOptional(z137.array(PulsarCustomBlock)).default([]),
|
|
3358
|
+
blockVariants: nullishToOptional(z137.record(z137.string(), z137.array(PulsarContributionVariant))).default({}),
|
|
3359
|
+
usesBrands: nullishToOptional(z137.boolean()).default(false),
|
|
3360
|
+
usesThemes: nullishToOptional(z137.boolean()).default(false),
|
|
3333
3361
|
source: ExporterSource,
|
|
3334
3362
|
gitProvider: nullishToOptional(GitProvider),
|
|
3335
|
-
gitUrl: nullishToOptional(
|
|
3336
|
-
gitBranch: nullishToOptional(
|
|
3337
|
-
gitDirectory: nullishToOptional(
|
|
3363
|
+
gitUrl: nullishToOptional(z137.string()),
|
|
3364
|
+
gitBranch: nullishToOptional(z137.string()),
|
|
3365
|
+
gitDirectory: nullishToOptional(z137.string())
|
|
3338
3366
|
});
|
|
3339
|
-
var Exporter =
|
|
3340
|
-
id:
|
|
3341
|
-
createdAt:
|
|
3342
|
-
name:
|
|
3343
|
-
isPrivate:
|
|
3367
|
+
var Exporter = z137.object({
|
|
3368
|
+
id: z137.string(),
|
|
3369
|
+
createdAt: z137.coerce.date(),
|
|
3370
|
+
name: z137.string(),
|
|
3371
|
+
isPrivate: z137.boolean(),
|
|
3344
3372
|
details: ExporterDetails,
|
|
3345
3373
|
exporterType: nullishToOptional(ExporterType).default("code"),
|
|
3346
|
-
storagePath: nullishToOptional(
|
|
3347
|
-
});
|
|
3348
|
-
|
|
3349
|
-
// src/export/exporter-workspace-membership.ts
|
|
3350
|
-
import { z as z136 } from "zod";
|
|
3351
|
-
|
|
3352
|
-
// src/export/exporter-workspace-membership-role.ts
|
|
3353
|
-
import { z as z135 } from "zod";
|
|
3354
|
-
var ExporterWorkspaceMembershipRole = z135.enum(["Owner", "OwnerArchived", "User"]);
|
|
3355
|
-
|
|
3356
|
-
// src/export/exporter-workspace-membership.ts
|
|
3357
|
-
var ExporterWorkspaceMembership = z136.object({
|
|
3358
|
-
id: z136.string(),
|
|
3359
|
-
workspaceId: z136.string(),
|
|
3360
|
-
exporterId: z136.string(),
|
|
3361
|
-
role: ExporterWorkspaceMembershipRole
|
|
3374
|
+
storagePath: nullishToOptional(z137.string()).default("")
|
|
3362
3375
|
});
|
|
3363
3376
|
|
|
3364
3377
|
// src/feature-flags/feature-flags.ts
|
|
3365
|
-
import { z as
|
|
3366
|
-
var FlaggedFeature =
|
|
3367
|
-
var FeatureFlagMap =
|
|
3368
|
-
var FeatureFlag =
|
|
3369
|
-
id:
|
|
3378
|
+
import { z as z138 } from "zod";
|
|
3379
|
+
var FlaggedFeature = z138.enum(["FigmaImporterV2", "ShadowOpacityOptional", "DisableImporter"]);
|
|
3380
|
+
var FeatureFlagMap = z138.record(FlaggedFeature, z138.boolean());
|
|
3381
|
+
var FeatureFlag = z138.object({
|
|
3382
|
+
id: z138.string(),
|
|
3370
3383
|
feature: FlaggedFeature,
|
|
3371
|
-
createdAt:
|
|
3372
|
-
enabled:
|
|
3373
|
-
designSystemId:
|
|
3384
|
+
createdAt: z138.coerce.date(),
|
|
3385
|
+
enabled: z138.boolean(),
|
|
3386
|
+
designSystemId: z138.string().optional()
|
|
3374
3387
|
});
|
|
3375
3388
|
|
|
3376
3389
|
// src/integrations/external-oauth-request.ts
|
|
3377
|
-
import { z as
|
|
3390
|
+
import { z as z140 } from "zod";
|
|
3378
3391
|
|
|
3379
3392
|
// src/integrations/oauth-providers.ts
|
|
3380
|
-
import { z as
|
|
3393
|
+
import { z as z139 } from "zod";
|
|
3381
3394
|
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
3382
3395
|
OAuthProviderNames2["Figma"] = "figma";
|
|
3383
3396
|
OAuthProviderNames2["Azure"] = "azure";
|
|
@@ -3386,49 +3399,49 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
|
3386
3399
|
OAuthProviderNames2["Bitbucket"] = "bitbucket";
|
|
3387
3400
|
return OAuthProviderNames2;
|
|
3388
3401
|
})(OAuthProviderNames || {});
|
|
3389
|
-
var OAuthProviderSchema =
|
|
3402
|
+
var OAuthProviderSchema = z139.nativeEnum(OAuthProviderNames);
|
|
3390
3403
|
var OAuthProvider = OAuthProviderSchema.enum;
|
|
3391
3404
|
|
|
3392
3405
|
// src/integrations/external-oauth-request.ts
|
|
3393
|
-
var ExternalOAuthRequest =
|
|
3394
|
-
id:
|
|
3406
|
+
var ExternalOAuthRequest = z140.object({
|
|
3407
|
+
id: z140.string(),
|
|
3395
3408
|
provider: OAuthProviderSchema,
|
|
3396
|
-
userId:
|
|
3397
|
-
state:
|
|
3398
|
-
createdAt:
|
|
3409
|
+
userId: z140.string(),
|
|
3410
|
+
state: z140.string(),
|
|
3411
|
+
createdAt: z140.coerce.date()
|
|
3399
3412
|
});
|
|
3400
3413
|
|
|
3401
3414
|
// src/integrations/integration.ts
|
|
3402
|
-
import { z as
|
|
3403
|
-
var IntegrationDesignSystem =
|
|
3404
|
-
designSystemId:
|
|
3405
|
-
brandId:
|
|
3406
|
-
title:
|
|
3407
|
-
userId:
|
|
3408
|
-
date:
|
|
3409
|
-
});
|
|
3410
|
-
var IntegrationCredentialsType =
|
|
3411
|
-
var IntegrationCredentialsProfile =
|
|
3412
|
-
id:
|
|
3413
|
-
email:
|
|
3414
|
-
handle:
|
|
3415
|
-
avatarUrl:
|
|
3415
|
+
import { z as z141 } from "zod";
|
|
3416
|
+
var IntegrationDesignSystem = z141.object({
|
|
3417
|
+
designSystemId: z141.string(),
|
|
3418
|
+
brandId: z141.string(),
|
|
3419
|
+
title: z141.string().optional(),
|
|
3420
|
+
userId: z141.string().optional(),
|
|
3421
|
+
date: z141.coerce.date().optional()
|
|
3422
|
+
});
|
|
3423
|
+
var IntegrationCredentialsType = z141.enum(["OAuth2", "PAT", "GithubApp"]);
|
|
3424
|
+
var IntegrationCredentialsProfile = z141.object({
|
|
3425
|
+
id: z141.string(),
|
|
3426
|
+
email: z141.string().optional(),
|
|
3427
|
+
handle: z141.string().optional(),
|
|
3428
|
+
avatarUrl: z141.string().optional()
|
|
3416
3429
|
});
|
|
3417
|
-
var IntegrationCredentials =
|
|
3418
|
-
id:
|
|
3430
|
+
var IntegrationCredentials = z141.object({
|
|
3431
|
+
id: z141.string(),
|
|
3419
3432
|
type: IntegrationCredentialsType,
|
|
3420
|
-
integrationId:
|
|
3421
|
-
accessToken:
|
|
3422
|
-
userId:
|
|
3423
|
-
createdAt:
|
|
3424
|
-
refreshToken:
|
|
3425
|
-
tokenName:
|
|
3426
|
-
expiresAt:
|
|
3433
|
+
integrationId: z141.string(),
|
|
3434
|
+
accessToken: z141.string(),
|
|
3435
|
+
userId: z141.string(),
|
|
3436
|
+
createdAt: z141.coerce.date(),
|
|
3437
|
+
refreshToken: z141.string().optional(),
|
|
3438
|
+
tokenName: z141.string().optional(),
|
|
3439
|
+
expiresAt: z141.coerce.date().optional(),
|
|
3427
3440
|
profile: IntegrationCredentialsProfile.optional(),
|
|
3428
|
-
customUrl:
|
|
3441
|
+
customUrl: z141.string().optional(),
|
|
3429
3442
|
user: UserMinified.optional()
|
|
3430
3443
|
});
|
|
3431
|
-
var ExtendedIntegrationType =
|
|
3444
|
+
var ExtendedIntegrationType = z141.enum([
|
|
3432
3445
|
"Figma",
|
|
3433
3446
|
"Github",
|
|
3434
3447
|
"Gitlab",
|
|
@@ -3438,25 +3451,25 @@ var ExtendedIntegrationType = z140.enum([
|
|
|
3438
3451
|
"FigmaVariablesPlugin"
|
|
3439
3452
|
]);
|
|
3440
3453
|
var IntegrationType = ExtendedIntegrationType.exclude(["TokenStudio", "FigmaVariablesPlugin"]);
|
|
3441
|
-
var Integration =
|
|
3442
|
-
id:
|
|
3443
|
-
workspaceId:
|
|
3454
|
+
var Integration = z141.object({
|
|
3455
|
+
id: z141.string(),
|
|
3456
|
+
workspaceId: z141.string(),
|
|
3444
3457
|
type: IntegrationType,
|
|
3445
|
-
createdAt:
|
|
3446
|
-
integrationCredentials:
|
|
3458
|
+
createdAt: z141.coerce.date(),
|
|
3459
|
+
integrationCredentials: z141.array(IntegrationCredentials).optional()
|
|
3447
3460
|
});
|
|
3448
3461
|
var forbiddenCustomUrldomainList = ["github.com", "gitlab.com", "bitbucket.org", "figma.com", "dev.azure.com"];
|
|
3449
|
-
var IntegrationToken =
|
|
3450
|
-
access_token:
|
|
3451
|
-
refresh_token:
|
|
3452
|
-
expires_in:
|
|
3453
|
-
token_type:
|
|
3454
|
-
token_name:
|
|
3455
|
-
token_azure_organization_name:
|
|
3462
|
+
var IntegrationToken = z141.object({
|
|
3463
|
+
access_token: z141.string(),
|
|
3464
|
+
refresh_token: z141.string().optional(),
|
|
3465
|
+
expires_in: z141.union([z141.number().optional(), z141.string().optional()]),
|
|
3466
|
+
token_type: z141.string().optional(),
|
|
3467
|
+
token_name: z141.string().optional(),
|
|
3468
|
+
token_azure_organization_name: z141.string().optional(),
|
|
3456
3469
|
// Azure only
|
|
3457
|
-
token_bitbucket_username:
|
|
3470
|
+
token_bitbucket_username: z141.string().optional(),
|
|
3458
3471
|
// Bitbucket only
|
|
3459
|
-
custom_url:
|
|
3472
|
+
custom_url: z141.string().optional().refine((value) => {
|
|
3460
3473
|
if (!value)
|
|
3461
3474
|
return true;
|
|
3462
3475
|
if (forbiddenCustomUrldomainList.some((domain) => value.includes(domain)))
|
|
@@ -3482,131 +3495,131 @@ var IntegrationToken = z140.object({
|
|
|
3482
3495
|
});
|
|
3483
3496
|
|
|
3484
3497
|
// src/integrations/oauth-token.ts
|
|
3485
|
-
import { z as
|
|
3486
|
-
var IntegrationTokenSchemaOld =
|
|
3487
|
-
id:
|
|
3498
|
+
import { z as z142 } from "zod";
|
|
3499
|
+
var IntegrationTokenSchemaOld = z142.object({
|
|
3500
|
+
id: z142.string(),
|
|
3488
3501
|
provider: OAuthProviderSchema,
|
|
3489
|
-
scope:
|
|
3490
|
-
userId:
|
|
3491
|
-
accessToken:
|
|
3492
|
-
refreshToken:
|
|
3493
|
-
expiresAt:
|
|
3494
|
-
externalUserId:
|
|
3502
|
+
scope: z142.string(),
|
|
3503
|
+
userId: z142.string(),
|
|
3504
|
+
accessToken: z142.string(),
|
|
3505
|
+
refreshToken: z142.string(),
|
|
3506
|
+
expiresAt: z142.coerce.date(),
|
|
3507
|
+
externalUserId: z142.string().nullish()
|
|
3495
3508
|
});
|
|
3496
3509
|
|
|
3497
3510
|
// src/integrations/workspace-oauth-requests.ts
|
|
3498
|
-
import { z as
|
|
3499
|
-
var WorkspaceOAuthRequestSchema =
|
|
3500
|
-
id:
|
|
3501
|
-
workspaceId:
|
|
3511
|
+
import { z as z143 } from "zod";
|
|
3512
|
+
var WorkspaceOAuthRequestSchema = z143.object({
|
|
3513
|
+
id: z143.string(),
|
|
3514
|
+
workspaceId: z143.string(),
|
|
3502
3515
|
provider: OAuthProviderSchema,
|
|
3503
|
-
userId:
|
|
3504
|
-
createdAt:
|
|
3516
|
+
userId: z143.string(),
|
|
3517
|
+
createdAt: z143.coerce.date()
|
|
3505
3518
|
});
|
|
3506
3519
|
|
|
3507
3520
|
// src/liveblocks/rooms/design-system-version-room.ts
|
|
3508
|
-
import { z as
|
|
3521
|
+
import { z as z144 } from "zod";
|
|
3509
3522
|
var DesignSystemVersionRoom = Entity.extend({
|
|
3510
|
-
designSystemVersionId:
|
|
3511
|
-
liveblocksId:
|
|
3523
|
+
designSystemVersionId: z144.string(),
|
|
3524
|
+
liveblocksId: z144.string()
|
|
3512
3525
|
});
|
|
3513
|
-
var DesignSystemVersionRoomInternalSettings =
|
|
3514
|
-
routingVersion:
|
|
3526
|
+
var DesignSystemVersionRoomInternalSettings = z144.object({
|
|
3527
|
+
routingVersion: z144.string()
|
|
3515
3528
|
});
|
|
3516
|
-
var DesignSystemVersionRoomInitialState =
|
|
3517
|
-
pages:
|
|
3518
|
-
groups:
|
|
3529
|
+
var DesignSystemVersionRoomInitialState = z144.object({
|
|
3530
|
+
pages: z144.array(DocumentationPageV2),
|
|
3531
|
+
groups: z144.array(ElementGroup),
|
|
3519
3532
|
internalSettings: DesignSystemVersionRoomInternalSettings
|
|
3520
3533
|
});
|
|
3521
|
-
var DesignSystemVersionRoomUpdate =
|
|
3522
|
-
pages:
|
|
3523
|
-
groups:
|
|
3524
|
-
deletedPageIds:
|
|
3525
|
-
deletedGroupIds:
|
|
3534
|
+
var DesignSystemVersionRoomUpdate = z144.object({
|
|
3535
|
+
pages: z144.array(DocumentationPageV2),
|
|
3536
|
+
groups: z144.array(ElementGroup),
|
|
3537
|
+
deletedPageIds: z144.array(z144.string()),
|
|
3538
|
+
deletedGroupIds: z144.array(z144.string())
|
|
3526
3539
|
});
|
|
3527
3540
|
|
|
3528
3541
|
// src/liveblocks/rooms/documentation-page-room.ts
|
|
3529
|
-
import { z as
|
|
3542
|
+
import { z as z145 } from "zod";
|
|
3530
3543
|
var DocumentationPageRoom = Entity.extend({
|
|
3531
|
-
designSystemVersionId:
|
|
3532
|
-
documentationPageId:
|
|
3533
|
-
liveblocksId:
|
|
3534
|
-
isDirty:
|
|
3544
|
+
designSystemVersionId: z145.string(),
|
|
3545
|
+
documentationPageId: z145.string(),
|
|
3546
|
+
liveblocksId: z145.string(),
|
|
3547
|
+
isDirty: z145.boolean()
|
|
3535
3548
|
});
|
|
3536
|
-
var DocumentationPageRoomState =
|
|
3537
|
-
pageItems:
|
|
3549
|
+
var DocumentationPageRoomState = z145.object({
|
|
3550
|
+
pageItems: z145.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
3538
3551
|
itemConfiguration: DocumentationItemConfigurationV2
|
|
3539
3552
|
});
|
|
3540
|
-
var DocumentationPageRoomRoomUpdate =
|
|
3553
|
+
var DocumentationPageRoomRoomUpdate = z145.object({
|
|
3541
3554
|
page: DocumentationPageV2,
|
|
3542
3555
|
pageParent: ElementGroup
|
|
3543
3556
|
});
|
|
3544
3557
|
var DocumentationPageRoomInitialStateUpdate = DocumentationPageRoomRoomUpdate.extend({
|
|
3545
|
-
pageItems:
|
|
3546
|
-
blockDefinitions:
|
|
3558
|
+
pageItems: z145.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
3559
|
+
blockDefinitions: z145.array(PageBlockDefinition)
|
|
3547
3560
|
});
|
|
3548
3561
|
|
|
3549
3562
|
// src/liveblocks/rooms/room-type.ts
|
|
3550
|
-
import { z as
|
|
3563
|
+
import { z as z146 } from "zod";
|
|
3551
3564
|
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
3552
3565
|
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
3553
3566
|
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
3554
3567
|
RoomTypeEnum2["Workspace"] = "workspace";
|
|
3555
3568
|
return RoomTypeEnum2;
|
|
3556
3569
|
})(RoomTypeEnum || {});
|
|
3557
|
-
var RoomTypeSchema =
|
|
3570
|
+
var RoomTypeSchema = z146.nativeEnum(RoomTypeEnum);
|
|
3558
3571
|
var RoomType = RoomTypeSchema.enum;
|
|
3559
3572
|
|
|
3560
3573
|
// src/liveblocks/rooms/workspace-room.ts
|
|
3561
|
-
import { z as
|
|
3574
|
+
import { z as z147 } from "zod";
|
|
3562
3575
|
var WorkspaceRoom = Entity.extend({
|
|
3563
|
-
workspaceId:
|
|
3564
|
-
liveblocksId:
|
|
3576
|
+
workspaceId: z147.string(),
|
|
3577
|
+
liveblocksId: z147.string()
|
|
3565
3578
|
});
|
|
3566
3579
|
|
|
3567
3580
|
// src/npm/npm-package.ts
|
|
3568
|
-
import { z as
|
|
3569
|
-
var AnyRecord =
|
|
3581
|
+
import { z as z148 } from "zod";
|
|
3582
|
+
var AnyRecord = z148.record(z148.any());
|
|
3570
3583
|
var NpmPackageVersionDist = AnyRecord.and(
|
|
3571
|
-
|
|
3572
|
-
tarball:
|
|
3584
|
+
z148.object({
|
|
3585
|
+
tarball: z148.string()
|
|
3573
3586
|
})
|
|
3574
3587
|
);
|
|
3575
3588
|
var NpmPackageVersion = AnyRecord.and(
|
|
3576
|
-
|
|
3589
|
+
z148.object({
|
|
3577
3590
|
dist: NpmPackageVersionDist
|
|
3578
3591
|
})
|
|
3579
3592
|
);
|
|
3580
3593
|
var NpmPackage = AnyRecord.and(
|
|
3581
|
-
|
|
3582
|
-
_id:
|
|
3583
|
-
name:
|
|
3594
|
+
z148.object({
|
|
3595
|
+
_id: z148.string(),
|
|
3596
|
+
name: z148.string(),
|
|
3584
3597
|
// e.g. "latest": "1.2.3"
|
|
3585
|
-
"dist-tags":
|
|
3598
|
+
"dist-tags": z148.record(z148.string(), z148.string()),
|
|
3586
3599
|
// "1.2.3": {...}
|
|
3587
|
-
versions:
|
|
3600
|
+
versions: z148.record(NpmPackageVersion)
|
|
3588
3601
|
})
|
|
3589
3602
|
);
|
|
3590
3603
|
|
|
3591
3604
|
// src/npm/npm-proxy-token-payload.ts
|
|
3592
|
-
import { z as
|
|
3593
|
-
var NpmProxyTokenPayload =
|
|
3594
|
-
npmProxyRegistryConfigId:
|
|
3605
|
+
import { z as z149 } from "zod";
|
|
3606
|
+
var NpmProxyTokenPayload = z149.object({
|
|
3607
|
+
npmProxyRegistryConfigId: z149.string()
|
|
3595
3608
|
});
|
|
3596
3609
|
|
|
3597
3610
|
// src/tokens/personal-access-token.ts
|
|
3598
|
-
import { z as
|
|
3599
|
-
var PersonalAccessToken =
|
|
3600
|
-
id:
|
|
3601
|
-
userId:
|
|
3602
|
-
workspaceId:
|
|
3611
|
+
import { z as z150 } from "zod";
|
|
3612
|
+
var PersonalAccessToken = z150.object({
|
|
3613
|
+
id: z150.string(),
|
|
3614
|
+
userId: z150.string(),
|
|
3615
|
+
workspaceId: z150.string().optional(),
|
|
3603
3616
|
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
3604
|
-
name:
|
|
3605
|
-
hidden:
|
|
3606
|
-
token:
|
|
3607
|
-
scope:
|
|
3608
|
-
createdAt:
|
|
3609
|
-
expireAt:
|
|
3617
|
+
name: z150.string(),
|
|
3618
|
+
hidden: z150.boolean(),
|
|
3619
|
+
token: z150.string(),
|
|
3620
|
+
scope: z150.string().optional(),
|
|
3621
|
+
createdAt: z150.coerce.date(),
|
|
3622
|
+
expireAt: z150.coerce.date().optional()
|
|
3610
3623
|
});
|
|
3611
3624
|
|
|
3612
3625
|
// src/utils/errors.ts
|
|
@@ -3741,26 +3754,26 @@ async function sleep(ms) {
|
|
|
3741
3754
|
}
|
|
3742
3755
|
|
|
3743
3756
|
// src/utils/content-loader-instruction.ts
|
|
3744
|
-
import { z as
|
|
3745
|
-
var ContentLoadInstruction =
|
|
3746
|
-
from:
|
|
3747
|
-
to:
|
|
3748
|
-
authorizationHeaderKvsId:
|
|
3749
|
-
timeout:
|
|
3750
|
-
});
|
|
3751
|
-
var ContentLoaderPayload =
|
|
3752
|
-
type:
|
|
3757
|
+
import { z as z151 } from "zod";
|
|
3758
|
+
var ContentLoadInstruction = z151.object({
|
|
3759
|
+
from: z151.string(),
|
|
3760
|
+
to: z151.string(),
|
|
3761
|
+
authorizationHeaderKvsId: z151.string().optional(),
|
|
3762
|
+
timeout: z151.number().optional()
|
|
3763
|
+
});
|
|
3764
|
+
var ContentLoaderPayload = z151.object({
|
|
3765
|
+
type: z151.literal("Single"),
|
|
3753
3766
|
instruction: ContentLoadInstruction
|
|
3754
3767
|
}).or(
|
|
3755
|
-
|
|
3756
|
-
type:
|
|
3757
|
-
loadingChunkSize:
|
|
3758
|
-
instructions:
|
|
3768
|
+
z151.object({
|
|
3769
|
+
type: z151.literal("Multiple"),
|
|
3770
|
+
loadingChunkSize: z151.number().optional(),
|
|
3771
|
+
instructions: z151.array(ContentLoadInstruction)
|
|
3759
3772
|
})
|
|
3760
3773
|
).or(
|
|
3761
|
-
|
|
3762
|
-
type:
|
|
3763
|
-
location:
|
|
3774
|
+
z151.object({
|
|
3775
|
+
type: z151.literal("S3"),
|
|
3776
|
+
location: z151.string()
|
|
3764
3777
|
})
|
|
3765
3778
|
);
|
|
3766
3779
|
|
|
@@ -4720,6 +4733,7 @@ export {
|
|
|
4720
4733
|
LineHeightTokenData,
|
|
4721
4734
|
LineHeightUnit,
|
|
4722
4735
|
LineHeightValue,
|
|
4736
|
+
LiveblocksNotificationSettings,
|
|
4723
4737
|
MAX_MEMBERS_COUNT,
|
|
4724
4738
|
NpmPackage,
|
|
4725
4739
|
NpmProxyToken,
|
|
@@ -4955,6 +4969,7 @@ export {
|
|
|
4955
4969
|
UserInvites,
|
|
4956
4970
|
UserLinkedIntegrations,
|
|
4957
4971
|
UserMinified,
|
|
4972
|
+
UserNotificationSettings,
|
|
4958
4973
|
UserOnboarding,
|
|
4959
4974
|
UserOnboardingDepartment,
|
|
4960
4975
|
UserOnboardingJobLevel,
|
|
@@ -4987,6 +5002,7 @@ export {
|
|
|
4987
5002
|
defaultDocumentationItemConfigurationV2,
|
|
4988
5003
|
defaultDocumentationItemHeaderV1,
|
|
4989
5004
|
defaultDocumentationItemHeaderV2,
|
|
5005
|
+
defaultNotificationSettings,
|
|
4990
5006
|
designTokenImportModelTypeFilter,
|
|
4991
5007
|
designTokenTypeFilter,
|
|
4992
5008
|
extractTokenTypedData,
|