@supernova-studio/client 0.28.0 → 0.29.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 +444 -48
- package/dist/index.d.ts +444 -48
- package/dist/index.js +294 -141
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1439 -1286
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/conversion/documentation/documentation-page-to-dto-utils.ts +9 -4
- package/src/api/dto/documentation/index.ts +1 -0
- package/src/api/dto/documentation/link-preview.ts +23 -0
- package/src/api/dto/elements/elements-action-v2.ts +1 -1
- package/src/api/payloads/index.ts +1 -0
- package/src/api/payloads/workspaces/index.ts +1 -0
- package/src/api/payloads/workspaces/workspace-configuration.ts +50 -0
- package/src/yjs/docs-editor/blocks-to-prosemirror.ts +19 -10
- package/src/yjs/docs-editor/mock.ts +47 -2
- package/src/yjs/docs-editor/prosemirror/schema.ts +20 -42
- package/src/yjs/docs-editor/prosemirror-to-blocks.ts +29 -10
package/dist/index.mjs
CHANGED
|
@@ -16,38 +16,38 @@ import { z as z12 } from "zod";
|
|
|
16
16
|
import { z as z13 } from "zod";
|
|
17
17
|
import { z as z14 } from "zod";
|
|
18
18
|
import { z as z15 } from "zod";
|
|
19
|
-
import { z as z18 } from "zod";
|
|
20
19
|
import { z as z16 } from "zod";
|
|
20
|
+
import { z as z19 } from "zod";
|
|
21
21
|
import { z as z17 } from "zod";
|
|
22
|
+
import { z as z18 } from "zod";
|
|
22
23
|
import { z as z88 } from "zod";
|
|
23
|
-
import { z as z19 } from "zod";
|
|
24
|
-
import { z as z21 } from "zod";
|
|
25
24
|
import { z as z20 } from "zod";
|
|
26
25
|
import { z as z22 } from "zod";
|
|
26
|
+
import { z as z21 } from "zod";
|
|
27
27
|
import { z as z23 } from "zod";
|
|
28
|
-
import { z as z26 } from "zod";
|
|
29
|
-
import { z as z25 } from "zod";
|
|
30
28
|
import { z as z24 } from "zod";
|
|
31
29
|
import { z as z27 } from "zod";
|
|
32
|
-
import { z as
|
|
30
|
+
import { z as z26 } from "zod";
|
|
31
|
+
import { z as z25 } from "zod";
|
|
33
32
|
import { z as z28 } from "zod";
|
|
33
|
+
import { z as z34 } from "zod";
|
|
34
34
|
import { z as z29 } from "zod";
|
|
35
35
|
import { z as z30 } from "zod";
|
|
36
36
|
import { z as z31 } from "zod";
|
|
37
37
|
import { z as z32 } from "zod";
|
|
38
|
-
import { z as
|
|
39
|
-
import { z as
|
|
38
|
+
import { z as z33 } from "zod";
|
|
39
|
+
import { z as z35 } from "zod";
|
|
40
40
|
import { z as z39 } from "zod";
|
|
41
41
|
import { z as z38 } from "zod";
|
|
42
|
-
import { z as z36 } from "zod";
|
|
43
|
-
import { z as z35 } from "zod";
|
|
44
42
|
import { z as z37 } from "zod";
|
|
45
|
-
import { z as
|
|
43
|
+
import { z as z36 } from "zod";
|
|
46
44
|
import { z as z42 } from "zod";
|
|
47
45
|
import { z as z41 } from "zod";
|
|
48
|
-
import { z as
|
|
46
|
+
import { z as z40 } from "zod";
|
|
49
47
|
import { z as z45 } from "zod";
|
|
50
48
|
import { z as z44 } from "zod";
|
|
49
|
+
import { z as z43 } from "zod";
|
|
50
|
+
import { z as z46 } from "zod";
|
|
51
51
|
import { z as z47 } from "zod";
|
|
52
52
|
import { z as z48 } from "zod";
|
|
53
53
|
import { z as z49 } from "zod";
|
|
@@ -95,42 +95,46 @@ import { z as z91 } from "zod";
|
|
|
95
95
|
import { z as z90 } from "zod";
|
|
96
96
|
import { z as z93 } from "zod";
|
|
97
97
|
import { z as z94 } from "zod";
|
|
98
|
-
import { z as z104 } from "zod";
|
|
99
98
|
import { z as z95 } from "zod";
|
|
100
99
|
import { z as z96 } from "zod";
|
|
101
|
-
import { z as z98 } from "zod";
|
|
102
100
|
import { z as z97 } from "zod";
|
|
103
|
-
import { z as
|
|
101
|
+
import { z as z98 } from "zod";
|
|
104
102
|
import { z as z99 } from "zod";
|
|
103
|
+
import { z as z100 } from "zod";
|
|
104
|
+
import { z as z110 } from "zod";
|
|
105
105
|
import { z as z101 } from "zod";
|
|
106
106
|
import { z as z102 } from "zod";
|
|
107
|
+
import { z as z104 } from "zod";
|
|
107
108
|
import { z as z103 } from "zod";
|
|
108
|
-
import { z as z105 } from "zod";
|
|
109
109
|
import { z as z106 } from "zod";
|
|
110
|
+
import { z as z105 } from "zod";
|
|
111
|
+
import IPCIDR from "ip-cidr";
|
|
110
112
|
import { z as z107 } from "zod";
|
|
111
113
|
import { z as z108 } from "zod";
|
|
112
114
|
import { z as z109 } from "zod";
|
|
113
|
-
import { z as z110 } from "zod";
|
|
114
|
-
import { z as z113 } from "zod";
|
|
115
115
|
import { z as z111 } from "zod";
|
|
116
116
|
import { z as z112 } from "zod";
|
|
117
|
+
import { z as z113 } from "zod";
|
|
117
118
|
import { z as z114 } from "zod";
|
|
118
|
-
import { z as z119 } from "zod";
|
|
119
119
|
import { z as z115 } from "zod";
|
|
120
120
|
import { z as z116 } from "zod";
|
|
121
|
+
import { z as z119 } from "zod";
|
|
121
122
|
import { z as z117 } from "zod";
|
|
122
123
|
import { z as z118 } from "zod";
|
|
123
124
|
import { z as z120 } from "zod";
|
|
124
|
-
import { z as
|
|
125
|
+
import { z as z125 } from "zod";
|
|
125
126
|
import { z as z121 } from "zod";
|
|
127
|
+
import { z as z122 } from "zod";
|
|
126
128
|
import { z as z123 } from "zod";
|
|
127
129
|
import { z as z124 } from "zod";
|
|
128
|
-
import { z as z125 } from "zod";
|
|
129
130
|
import { z as z126 } from "zod";
|
|
130
|
-
import { z as z127 } from "zod";
|
|
131
131
|
import { z as z128 } from "zod";
|
|
132
|
+
import { z as z127 } from "zod";
|
|
132
133
|
import { z as z129 } from "zod";
|
|
133
134
|
import { z as z130 } from "zod";
|
|
135
|
+
import { z as z131 } from "zod";
|
|
136
|
+
import { z as z132 } from "zod";
|
|
137
|
+
import { z as z133 } from "zod";
|
|
134
138
|
import slugifyImplementation from "@sindresorhus/slugify";
|
|
135
139
|
var PluginOAuthRequestSchema = z.object({
|
|
136
140
|
id: z.string(),
|
|
@@ -334,193 +338,207 @@ var Subscription = z11.object({
|
|
|
334
338
|
billingType: BillingTypeSchema.optional(),
|
|
335
339
|
daysUntilDue: z11.number().optional()
|
|
336
340
|
});
|
|
337
|
-
var
|
|
341
|
+
var AssetDynamoRecord = z12.object({
|
|
342
|
+
path: z12.string(),
|
|
338
343
|
id: z12.string(),
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
var
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
344
|
+
designSystemId: z12.string(),
|
|
345
|
+
expiresAt: z12.number()
|
|
346
|
+
});
|
|
347
|
+
var AssetReference = z13.object({
|
|
348
|
+
id: z13.string(),
|
|
349
|
+
designSystemVersionId: z13.string(),
|
|
350
|
+
assetId: z13.string(),
|
|
351
|
+
persistentId: z13.string()
|
|
352
|
+
});
|
|
353
|
+
var AssetValue = z14.object({});
|
|
354
|
+
var AssetType = z15.enum(["Image", "Font"]);
|
|
355
|
+
var AssetScope = z15.enum(["DocumentationFrame", "ComponentThumbnail", "DesignSystem", "Documentation"]);
|
|
356
|
+
var AssetFontProperties = z15.object({
|
|
357
|
+
family: z15.string(),
|
|
358
|
+
subfamily: z15.string()
|
|
359
|
+
});
|
|
360
|
+
var AssetProperties = z15.union([
|
|
361
|
+
z15.object({
|
|
362
|
+
fontProperties: z15.array(AssetFontProperties)
|
|
363
|
+
}),
|
|
364
|
+
z15.object({
|
|
365
|
+
width: z15.number(),
|
|
366
|
+
height: z15.number()
|
|
367
|
+
})
|
|
368
|
+
]);
|
|
369
|
+
var AssetOrigin = z15.object({
|
|
370
|
+
originKey: z15.string()
|
|
371
|
+
});
|
|
372
|
+
var AssetProcessStatus = z15.enum(["Pending", "Uploaded", "Processed"]);
|
|
373
|
+
var Asset = z15.object({
|
|
374
|
+
id: z15.string(),
|
|
375
|
+
designSystemId: z15.string().nullish(),
|
|
359
376
|
type: AssetType,
|
|
360
|
-
originalFileName:
|
|
361
|
-
filePath:
|
|
377
|
+
originalFileName: z15.string().nullish(),
|
|
378
|
+
filePath: z15.string(),
|
|
362
379
|
scope: AssetScope,
|
|
363
380
|
properties: AssetProperties.nullish(),
|
|
381
|
+
state: AssetProcessStatus.optional(),
|
|
364
382
|
origin: AssetOrigin.optional(),
|
|
365
|
-
originKey:
|
|
383
|
+
originKey: z15.string().optional()
|
|
366
384
|
});
|
|
367
|
-
var DataSourceRemoteType =
|
|
368
|
-
var DataSourceUploadRemoteSource =
|
|
369
|
-
var DataSourceFigmaState =
|
|
370
|
-
var DataSourceAutoImportMode =
|
|
371
|
-
var DataSourceStats =
|
|
385
|
+
var DataSourceRemoteType = z16.enum(["Figma", "TokenStudio", "FigmaVariablesPlugin"]);
|
|
386
|
+
var DataSourceUploadRemoteSource = z16.enum(["TokenStudio", "FigmaVariablesPlugin", "Custom"]);
|
|
387
|
+
var DataSourceFigmaState = z16.enum(["Active", "MissingIntegration", "MissingFileAccess", "MissingFileOwner"]);
|
|
388
|
+
var DataSourceAutoImportMode = z16.enum(["Never", "Hourly"]);
|
|
389
|
+
var DataSourceStats = z16.object({
|
|
372
390
|
tokens: zeroNumberByDefault(),
|
|
373
391
|
components: zeroNumberByDefault(),
|
|
374
392
|
assets: zeroNumberByDefault(),
|
|
375
393
|
frames: zeroNumberByDefault()
|
|
376
394
|
});
|
|
377
|
-
var DataSourceFigmaFileData =
|
|
378
|
-
lastUpdatedAt:
|
|
395
|
+
var DataSourceFigmaFileData = z16.object({
|
|
396
|
+
lastUpdatedAt: z16.coerce.date()
|
|
379
397
|
});
|
|
380
|
-
var DataSourceFigmaFileVersionData =
|
|
381
|
-
id:
|
|
382
|
-
label:
|
|
383
|
-
description:
|
|
384
|
-
createdAt:
|
|
385
|
-
});
|
|
386
|
-
var DataSourceFigmaScope =
|
|
387
|
-
assets:
|
|
388
|
-
components:
|
|
389
|
-
documentationFrames:
|
|
390
|
-
tokens:
|
|
391
|
-
themePersistentId:
|
|
392
|
-
});
|
|
393
|
-
var DataSourceFigmaImportMetadata =
|
|
398
|
+
var DataSourceFigmaFileVersionData = z16.object({
|
|
399
|
+
id: z16.string(),
|
|
400
|
+
label: z16.string().optional(),
|
|
401
|
+
description: z16.string().optional(),
|
|
402
|
+
createdAt: z16.coerce.date()
|
|
403
|
+
});
|
|
404
|
+
var DataSourceFigmaScope = z16.object({
|
|
405
|
+
assets: z16.boolean(),
|
|
406
|
+
components: z16.boolean(),
|
|
407
|
+
documentationFrames: z16.boolean(),
|
|
408
|
+
tokens: z16.boolean(),
|
|
409
|
+
themePersistentId: z16.string().optional()
|
|
410
|
+
});
|
|
411
|
+
var DataSourceFigmaImportMetadata = z16.object({
|
|
394
412
|
fileData: DataSourceFigmaFileData.optional(),
|
|
395
413
|
importedPublishedVersion: DataSourceFigmaFileVersionData.optional()
|
|
396
414
|
});
|
|
397
|
-
var DataSourceFigmaRemote =
|
|
398
|
-
type:
|
|
399
|
-
fileId:
|
|
400
|
-
ownerId:
|
|
401
|
-
ownerName:
|
|
415
|
+
var DataSourceFigmaRemote = z16.object({
|
|
416
|
+
type: z16.literal(DataSourceRemoteType.Enum.Figma),
|
|
417
|
+
fileId: z16.string(),
|
|
418
|
+
ownerId: z16.string(),
|
|
419
|
+
ownerName: z16.string(),
|
|
402
420
|
scope: DataSourceFigmaScope,
|
|
403
421
|
state: DataSourceFigmaState,
|
|
404
|
-
requiresSync:
|
|
422
|
+
requiresSync: z16.boolean().optional().transform((v) => v ?? false),
|
|
405
423
|
lastImportMetadata: DataSourceFigmaImportMetadata.optional(),
|
|
406
|
-
downloadChunkSize:
|
|
407
|
-
figmaRenderChunkSize:
|
|
408
|
-
maxFileDepth:
|
|
424
|
+
downloadChunkSize: z16.number().optional(),
|
|
425
|
+
figmaRenderChunkSize: z16.number().optional(),
|
|
426
|
+
maxFileDepth: z16.number().optional()
|
|
409
427
|
});
|
|
410
|
-
var DataSourceTokenStudioRemote =
|
|
411
|
-
type:
|
|
428
|
+
var DataSourceTokenStudioRemote = z16.object({
|
|
429
|
+
type: z16.literal(DataSourceRemoteType.Enum.TokenStudio)
|
|
412
430
|
});
|
|
413
|
-
var DataSourceUploadImportMetadata =
|
|
414
|
-
var DataSourceUploadRemote =
|
|
415
|
-
type:
|
|
416
|
-
remoteId:
|
|
431
|
+
var DataSourceUploadImportMetadata = z16.record(z16.any());
|
|
432
|
+
var DataSourceUploadRemote = z16.object({
|
|
433
|
+
type: z16.literal(DataSourceRemoteType.Enum.FigmaVariablesPlugin),
|
|
434
|
+
remoteId: z16.string(),
|
|
417
435
|
remoteSourceType: DataSourceUploadRemoteSource,
|
|
418
436
|
lastImportMetadata: DataSourceUploadImportMetadata.optional()
|
|
419
437
|
});
|
|
420
|
-
var DataSourceRemote =
|
|
438
|
+
var DataSourceRemote = z16.discriminatedUnion("type", [
|
|
421
439
|
DataSourceFigmaRemote,
|
|
422
440
|
DataSourceUploadRemote,
|
|
423
441
|
DataSourceTokenStudioRemote
|
|
424
442
|
]);
|
|
425
|
-
var DataSourceVersion =
|
|
426
|
-
id:
|
|
427
|
-
createdAt:
|
|
428
|
-
label:
|
|
429
|
-
description:
|
|
443
|
+
var DataSourceVersion = z16.object({
|
|
444
|
+
id: z16.string(),
|
|
445
|
+
createdAt: z16.coerce.date(),
|
|
446
|
+
label: z16.string().nullish(),
|
|
447
|
+
description: z16.string().nullish()
|
|
430
448
|
});
|
|
431
449
|
function zeroNumberByDefault() {
|
|
432
|
-
return
|
|
450
|
+
return z16.number().nullish().transform((v) => v ?? 0);
|
|
433
451
|
}
|
|
434
|
-
var Entity =
|
|
435
|
-
id:
|
|
436
|
-
createdAt:
|
|
437
|
-
updatedAt:
|
|
452
|
+
var Entity = z17.object({
|
|
453
|
+
id: z17.string(),
|
|
454
|
+
createdAt: z17.coerce.date(),
|
|
455
|
+
updatedAt: z17.coerce.date()
|
|
438
456
|
});
|
|
439
|
-
var ObjectMeta =
|
|
440
|
-
name:
|
|
441
|
-
description:
|
|
457
|
+
var ObjectMeta = z18.object({
|
|
458
|
+
name: z18.string(),
|
|
459
|
+
description: z18.string().optional()
|
|
442
460
|
});
|
|
443
|
-
var ImportJobState =
|
|
444
|
-
var ImportJobOperation =
|
|
461
|
+
var ImportJobState = z19.enum(["PendingInput", "Queued", "InProgress", "Failed", "Success"]);
|
|
462
|
+
var ImportJobOperation = z19.enum(["Check", "Import"]);
|
|
445
463
|
var ImportJob = Entity.extend({
|
|
446
|
-
designSystemId:
|
|
447
|
-
designSystemVersionId:
|
|
448
|
-
sourceIds:
|
|
464
|
+
designSystemId: z19.string(),
|
|
465
|
+
designSystemVersionId: z19.string(),
|
|
466
|
+
sourceIds: z19.array(z19.string()),
|
|
449
467
|
state: ImportJobState,
|
|
450
|
-
createdByUserId:
|
|
451
|
-
importContextId:
|
|
452
|
-
error:
|
|
468
|
+
createdByUserId: z19.string().optional(),
|
|
469
|
+
importContextId: z19.string(),
|
|
470
|
+
error: z19.string().optional(),
|
|
453
471
|
sourceType: DataSourceRemoteType,
|
|
454
|
-
importContextCleanedUp:
|
|
472
|
+
importContextCleanedUp: z19.boolean()
|
|
455
473
|
});
|
|
456
|
-
var TokenDataAliasSchema =
|
|
457
|
-
aliasTo:
|
|
474
|
+
var TokenDataAliasSchema = z20.object({
|
|
475
|
+
aliasTo: z20.string().optional().nullable().transform((v) => v ?? void 0)
|
|
458
476
|
});
|
|
459
477
|
function tokenAliasOrValue(value) {
|
|
460
478
|
return TokenDataAliasSchema.extend({
|
|
461
479
|
value: value.optional().nullable().transform((v) => v ?? void 0)
|
|
462
480
|
});
|
|
463
481
|
}
|
|
464
|
-
var DimensionUnit =
|
|
465
|
-
var DimensionValue =
|
|
482
|
+
var DimensionUnit = z21.enum(["Pixels", "Percent", "Rem", "Ms", "Raw", "Points"]);
|
|
483
|
+
var DimensionValue = z21.object({
|
|
466
484
|
unit: DimensionUnit,
|
|
467
|
-
measure:
|
|
485
|
+
measure: z21.number()
|
|
468
486
|
});
|
|
469
487
|
var DimensionTokenData = tokenAliasOrValue(DimensionValue);
|
|
470
|
-
var BlurType =
|
|
471
|
-
var BlurValue =
|
|
488
|
+
var BlurType = z22.enum(["Layer", "Background"]);
|
|
489
|
+
var BlurValue = z22.object({
|
|
472
490
|
type: BlurType,
|
|
473
491
|
radius: DimensionTokenData
|
|
474
492
|
});
|
|
475
493
|
var BlurTokenData = tokenAliasOrValue(BlurValue);
|
|
476
|
-
var BorderRadiusUnit =
|
|
477
|
-
var BorderRadiusValue =
|
|
494
|
+
var BorderRadiusUnit = z23.enum(["Pixels", "Rem", "Percent"]);
|
|
495
|
+
var BorderRadiusValue = z23.object({
|
|
478
496
|
unit: BorderRadiusUnit,
|
|
479
|
-
measure:
|
|
497
|
+
measure: z23.number()
|
|
480
498
|
});
|
|
481
499
|
var BorderRadiusTokenData = tokenAliasOrValue(BorderRadiusValue);
|
|
482
|
-
var BorderWidthUnit =
|
|
483
|
-
var BorderWidthValue =
|
|
500
|
+
var BorderWidthUnit = z24.enum(["Pixels"]);
|
|
501
|
+
var BorderWidthValue = z24.object({
|
|
484
502
|
unit: BorderWidthUnit,
|
|
485
|
-
measure:
|
|
503
|
+
measure: z24.number()
|
|
486
504
|
});
|
|
487
505
|
var BorderWidthTokenData = tokenAliasOrValue(BorderWidthValue);
|
|
488
|
-
var OpacityValue =
|
|
489
|
-
unit:
|
|
490
|
-
measure:
|
|
506
|
+
var OpacityValue = z25.object({
|
|
507
|
+
unit: z25.enum(["Raw", "Pixels"]),
|
|
508
|
+
measure: z25.number()
|
|
491
509
|
});
|
|
492
510
|
var OpacityTokenData = tokenAliasOrValue(OpacityValue);
|
|
493
|
-
var ColorValue =
|
|
511
|
+
var ColorValue = z26.object({
|
|
494
512
|
opacity: OpacityTokenData,
|
|
495
|
-
color:
|
|
513
|
+
color: z26.string().or(TokenDataAliasSchema)
|
|
496
514
|
});
|
|
497
515
|
var ColorTokenData = tokenAliasOrValue(ColorValue);
|
|
498
|
-
var BorderPosition =
|
|
499
|
-
var BorderStyle =
|
|
500
|
-
var BorderValue =
|
|
516
|
+
var BorderPosition = z27.enum(["Inside", "Center", "Outside"]);
|
|
517
|
+
var BorderStyle = z27.enum(["Dashed", "Dotted", "Solid", "Groove"]);
|
|
518
|
+
var BorderValue = z27.object({
|
|
501
519
|
color: ColorTokenData,
|
|
502
520
|
width: BorderWidthTokenData,
|
|
503
521
|
position: BorderPosition,
|
|
504
522
|
style: BorderStyle.optional()
|
|
505
523
|
});
|
|
506
524
|
var BorderTokenData = tokenAliasOrValue(BorderValue);
|
|
507
|
-
var ComponentElementData =
|
|
508
|
-
value:
|
|
509
|
-
thumbnailImage:
|
|
510
|
-
value:
|
|
511
|
-
url:
|
|
512
|
-
assetId:
|
|
525
|
+
var ComponentElementData = z28.object({
|
|
526
|
+
value: z28.object({
|
|
527
|
+
thumbnailImage: z28.object({
|
|
528
|
+
value: z28.object({
|
|
529
|
+
url: z28.string(),
|
|
530
|
+
assetId: z28.string()
|
|
513
531
|
})
|
|
514
532
|
}),
|
|
515
|
-
svg:
|
|
516
|
-
value:
|
|
517
|
-
url:
|
|
518
|
-
assetId:
|
|
533
|
+
svg: z28.object({
|
|
534
|
+
value: z28.object({
|
|
535
|
+
url: z28.string(),
|
|
536
|
+
assetId: z28.string()
|
|
519
537
|
})
|
|
520
538
|
}).optional()
|
|
521
539
|
})
|
|
522
540
|
});
|
|
523
|
-
var DesignTokenType =
|
|
541
|
+
var DesignTokenType = z29.enum([
|
|
524
542
|
"Color",
|
|
525
543
|
"Border",
|
|
526
544
|
"Gradient",
|
|
@@ -552,7 +570,7 @@ var DesignTokenType = z28.enum([
|
|
|
552
570
|
]);
|
|
553
571
|
var tokenElementTypes = [...DesignTokenType.options.filter((v) => v !== "Font")];
|
|
554
572
|
var DesignElementType = DesignTokenType.or(
|
|
555
|
-
|
|
573
|
+
z29.enum([
|
|
556
574
|
"Component",
|
|
557
575
|
"Theme",
|
|
558
576
|
"Documentation",
|
|
@@ -564,7 +582,7 @@ var DesignElementType = DesignTokenType.or(
|
|
|
564
582
|
"PageBlock"
|
|
565
583
|
])
|
|
566
584
|
);
|
|
567
|
-
var DesignElementCategory =
|
|
585
|
+
var DesignElementCategory = z29.enum([
|
|
568
586
|
"Token",
|
|
569
587
|
"Component",
|
|
570
588
|
"DesignSystemComponent",
|
|
@@ -572,80 +590,80 @@ var DesignElementCategory = z28.enum([
|
|
|
572
590
|
"Theme",
|
|
573
591
|
"PageBlock"
|
|
574
592
|
]);
|
|
575
|
-
var DesignSystemElementExportProps =
|
|
576
|
-
isAsset:
|
|
577
|
-
codeName:
|
|
578
|
-
});
|
|
579
|
-
var ShallowDesignElement =
|
|
580
|
-
id:
|
|
581
|
-
persistentId:
|
|
582
|
-
designSystemVersionId:
|
|
593
|
+
var DesignSystemElementExportProps = z29.object({
|
|
594
|
+
isAsset: z29.boolean().nullish().transform((v) => v ?? false),
|
|
595
|
+
codeName: z29.string().nullish()
|
|
596
|
+
});
|
|
597
|
+
var ShallowDesignElement = z29.object({
|
|
598
|
+
id: z29.string(),
|
|
599
|
+
persistentId: z29.string(),
|
|
600
|
+
designSystemVersionId: z29.string(),
|
|
583
601
|
type: DesignElementType,
|
|
584
|
-
brandPersistentId:
|
|
585
|
-
parentPersistentId:
|
|
586
|
-
shortPersistentId:
|
|
602
|
+
brandPersistentId: z29.string().optional(),
|
|
603
|
+
parentPersistentId: z29.string().optional(),
|
|
604
|
+
shortPersistentId: z29.string().optional(),
|
|
587
605
|
childType: DesignElementType.optional(),
|
|
588
|
-
sortOrder:
|
|
589
|
-
origin:
|
|
606
|
+
sortOrder: z29.number(),
|
|
607
|
+
origin: z29.record(z29.any()).optional()
|
|
590
608
|
});
|
|
591
609
|
var DesignElement = ShallowDesignElement.extend({
|
|
592
610
|
meta: ObjectMeta,
|
|
593
|
-
slug:
|
|
594
|
-
userSlug:
|
|
595
|
-
createdAt:
|
|
596
|
-
updatedAt:
|
|
611
|
+
slug: z29.string().optional(),
|
|
612
|
+
userSlug: z29.string().optional(),
|
|
613
|
+
createdAt: z29.coerce.date(),
|
|
614
|
+
updatedAt: z29.coerce.date(),
|
|
597
615
|
exportProperties: DesignSystemElementExportProps.optional(),
|
|
598
|
-
data:
|
|
599
|
-
origin:
|
|
616
|
+
data: z29.record(z29.any()),
|
|
617
|
+
origin: z29.record(z29.any()).optional()
|
|
600
618
|
});
|
|
601
619
|
var HierarchicalElements = DesignTokenType.or(
|
|
602
|
-
|
|
620
|
+
z29.enum(["Component", "DesignSystemComponent", "DocumentationPage"])
|
|
603
621
|
);
|
|
604
|
-
var ElementPropertyType =
|
|
605
|
-
var ElementPropertyTargetType =
|
|
606
|
-
var ElementPropertyLinkType =
|
|
607
|
-
var ColorTokenInlineData =
|
|
608
|
-
value:
|
|
622
|
+
var ElementPropertyType = z30.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
|
|
623
|
+
var ElementPropertyTargetType = z30.enum(["Token", "Component", "DocumentationPage"]);
|
|
624
|
+
var ElementPropertyLinkType = z30.enum(["FigmaComponent", "DocumentationPage"]);
|
|
625
|
+
var ColorTokenInlineData = z30.object({
|
|
626
|
+
value: z30.string()
|
|
609
627
|
});
|
|
610
|
-
var ElementPropertyDefinitionOption =
|
|
611
|
-
id:
|
|
612
|
-
name:
|
|
628
|
+
var ElementPropertyDefinitionOption = z30.object({
|
|
629
|
+
id: z30.string(),
|
|
630
|
+
name: z30.string(),
|
|
613
631
|
backgroundColor: ColorTokenInlineData.optional()
|
|
614
632
|
});
|
|
615
|
-
var ElementPropertyDefinition =
|
|
616
|
-
id:
|
|
617
|
-
designSystemVersionId:
|
|
618
|
-
persistentId:
|
|
619
|
-
name:
|
|
620
|
-
codeName:
|
|
621
|
-
description:
|
|
633
|
+
var ElementPropertyDefinition = z30.object({
|
|
634
|
+
id: z30.string(),
|
|
635
|
+
designSystemVersionId: z30.string(),
|
|
636
|
+
persistentId: z30.string(),
|
|
637
|
+
name: z30.string(),
|
|
638
|
+
codeName: z30.string(),
|
|
639
|
+
description: z30.string(),
|
|
622
640
|
type: ElementPropertyType,
|
|
623
641
|
targetElementType: ElementPropertyTargetType,
|
|
624
|
-
options:
|
|
642
|
+
options: z30.array(ElementPropertyDefinitionOption).nullish(),
|
|
625
643
|
linkElementType: ElementPropertyLinkType.nullish()
|
|
626
644
|
});
|
|
627
|
-
var ElementPropertyValue =
|
|
628
|
-
id:
|
|
629
|
-
designSystemVersionId:
|
|
630
|
-
targetElementPersistentId:
|
|
631
|
-
definitionPersistentId:
|
|
632
|
-
stringValue:
|
|
633
|
-
numberValue:
|
|
634
|
-
booleanValue:
|
|
635
|
-
referenceValue:
|
|
636
|
-
referenceValuePreview:
|
|
637
|
-
});
|
|
638
|
-
var Point2D =
|
|
639
|
-
x:
|
|
640
|
-
y:
|
|
645
|
+
var ElementPropertyValue = z31.object({
|
|
646
|
+
id: z31.string(),
|
|
647
|
+
designSystemVersionId: z31.string(),
|
|
648
|
+
targetElementPersistentId: z31.string(),
|
|
649
|
+
definitionPersistentId: z31.string(),
|
|
650
|
+
stringValue: z31.string().nullish(),
|
|
651
|
+
numberValue: z31.number().nullish(),
|
|
652
|
+
booleanValue: z31.boolean().nullish(),
|
|
653
|
+
referenceValue: z31.string().nullish(),
|
|
654
|
+
referenceValuePreview: z31.string().nullish()
|
|
655
|
+
});
|
|
656
|
+
var Point2D = z32.object({
|
|
657
|
+
x: z32.number(),
|
|
658
|
+
y: z32.number()
|
|
641
659
|
});
|
|
642
660
|
var nullSize = { height: -1, width: -1 };
|
|
643
661
|
function isNullSize(size) {
|
|
644
662
|
return size.height === nullSize.height && size.width === nullSize.width;
|
|
645
663
|
}
|
|
646
|
-
var Size =
|
|
647
|
-
width:
|
|
648
|
-
height:
|
|
664
|
+
var Size = z33.object({
|
|
665
|
+
width: z33.number().nullish().transform((v) => v ?? nullSize.width),
|
|
666
|
+
height: z33.number().nullish().transform((v) => v ?? nullSize.height)
|
|
649
667
|
});
|
|
650
668
|
var SizeOrUndefined = Size.optional().transform((v) => {
|
|
651
669
|
if (!v)
|
|
@@ -654,8 +672,8 @@ var SizeOrUndefined = Size.optional().transform((v) => {
|
|
|
654
672
|
return void 0;
|
|
655
673
|
return v;
|
|
656
674
|
});
|
|
657
|
-
var PageBlockCalloutType =
|
|
658
|
-
var PageBlockTypeV1 =
|
|
675
|
+
var PageBlockCalloutType = z34.enum(["Info", "Primary", "Success", "Warning", "Error"]);
|
|
676
|
+
var PageBlockTypeV1 = z34.enum([
|
|
659
677
|
"Text",
|
|
660
678
|
"Heading",
|
|
661
679
|
"Code",
|
|
@@ -688,7 +706,7 @@ var PageBlockTypeV1 = z33.enum([
|
|
|
688
706
|
"TableRow",
|
|
689
707
|
"TableCell"
|
|
690
708
|
]);
|
|
691
|
-
var PageBlockCodeLanguage =
|
|
709
|
+
var PageBlockCodeLanguage = z34.enum([
|
|
692
710
|
"Angular",
|
|
693
711
|
"Bash",
|
|
694
712
|
"C",
|
|
@@ -722,68 +740,68 @@ var PageBlockCodeLanguage = z33.enum([
|
|
|
722
740
|
"XML",
|
|
723
741
|
"YAML"
|
|
724
742
|
]);
|
|
725
|
-
var PageBlockAlignment =
|
|
726
|
-
var PageBlockThemeType =
|
|
727
|
-
var PageBlockAssetType =
|
|
728
|
-
var PageBlockTilesAlignment =
|
|
729
|
-
var PageBlockTilesLayout =
|
|
730
|
-
var PageBlockTheme =
|
|
731
|
-
themeIds:
|
|
743
|
+
var PageBlockAlignment = z34.enum(["Left", "Center", "Stretch", "Right"]);
|
|
744
|
+
var PageBlockThemeType = z34.enum(["Override", "Comparison"]);
|
|
745
|
+
var PageBlockAssetType = z34.enum(["image", "figmaFrame"]);
|
|
746
|
+
var PageBlockTilesAlignment = z34.enum(["Center", "FrameHeight"]);
|
|
747
|
+
var PageBlockTilesLayout = z34.enum(["C8", "C7", "C6", "C5", "C4", "C3", "C2", "C1", "C1_75"]);
|
|
748
|
+
var PageBlockTheme = z34.object({
|
|
749
|
+
themeIds: z34.array(z34.string()),
|
|
732
750
|
type: PageBlockThemeType
|
|
733
751
|
});
|
|
734
|
-
var PageBlockUrlPreview =
|
|
735
|
-
title: nullishToOptional(
|
|
736
|
-
description: nullishToOptional(
|
|
737
|
-
thumbnailUrl: nullishToOptional(
|
|
738
|
-
});
|
|
739
|
-
var PageBlockFrameOrigin =
|
|
740
|
-
sourceFileName: nullishToOptional(
|
|
741
|
-
title: nullishToOptional(
|
|
742
|
-
previewUrl: nullishToOptional(
|
|
743
|
-
valid: nullishToOptional(
|
|
744
|
-
referenceId: nullishToOptional(
|
|
745
|
-
assetId: nullishToOptional(
|
|
746
|
-
assetScale: nullishToOptional(
|
|
747
|
-
width: nullishToOptional(
|
|
748
|
-
height: nullishToOptional(
|
|
749
|
-
});
|
|
750
|
-
var PageBlockFrame =
|
|
751
|
-
persistentId:
|
|
752
|
-
sourceId:
|
|
753
|
-
sourceFrameId:
|
|
754
|
-
title: nullishToOptional(
|
|
755
|
-
description: nullishToOptional(
|
|
752
|
+
var PageBlockUrlPreview = z34.object({
|
|
753
|
+
title: nullishToOptional(z34.string()),
|
|
754
|
+
description: nullishToOptional(z34.string()),
|
|
755
|
+
thumbnailUrl: nullishToOptional(z34.string())
|
|
756
|
+
});
|
|
757
|
+
var PageBlockFrameOrigin = z34.object({
|
|
758
|
+
sourceFileName: nullishToOptional(z34.string()),
|
|
759
|
+
title: nullishToOptional(z34.string()),
|
|
760
|
+
previewUrl: nullishToOptional(z34.string()),
|
|
761
|
+
valid: nullishToOptional(z34.boolean()),
|
|
762
|
+
referenceId: nullishToOptional(z34.string()),
|
|
763
|
+
assetId: nullishToOptional(z34.string()),
|
|
764
|
+
assetScale: nullishToOptional(z34.number()),
|
|
765
|
+
width: nullishToOptional(z34.number()),
|
|
766
|
+
height: nullishToOptional(z34.number())
|
|
767
|
+
});
|
|
768
|
+
var PageBlockFrame = z34.object({
|
|
769
|
+
persistentId: z34.string(),
|
|
770
|
+
sourceId: z34.string(),
|
|
771
|
+
sourceFrameId: z34.string(),
|
|
772
|
+
title: nullishToOptional(z34.string()),
|
|
773
|
+
description: nullishToOptional(z34.string()),
|
|
756
774
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
757
775
|
origin: nullishToOptional(PageBlockFrameOrigin)
|
|
758
776
|
});
|
|
759
|
-
var PageBlockAsset =
|
|
777
|
+
var PageBlockAsset = z34.object({
|
|
760
778
|
type: PageBlockAssetType,
|
|
761
|
-
id: nullishToOptional(
|
|
762
|
-
url: nullishToOptional(
|
|
779
|
+
id: nullishToOptional(z34.string()),
|
|
780
|
+
url: nullishToOptional(z34.string()),
|
|
763
781
|
figmaFrame: nullishToOptional(PageBlockFrame)
|
|
764
782
|
});
|
|
765
|
-
var PageBlockLinkPreview =
|
|
766
|
-
title: nullishToOptional(
|
|
767
|
-
valid: nullishToOptional(
|
|
783
|
+
var PageBlockLinkPreview = z34.object({
|
|
784
|
+
title: nullishToOptional(z34.string()),
|
|
785
|
+
valid: nullishToOptional(z34.boolean())
|
|
768
786
|
});
|
|
769
|
-
var PageBlockShortcut =
|
|
770
|
-
persistentId:
|
|
771
|
-
title: nullishToOptional(
|
|
772
|
-
description: nullishToOptional(
|
|
787
|
+
var PageBlockShortcut = z34.object({
|
|
788
|
+
persistentId: z34.string(),
|
|
789
|
+
title: nullishToOptional(z34.string()),
|
|
790
|
+
description: nullishToOptional(z34.string()),
|
|
773
791
|
asset: nullishToOptional(PageBlockAsset),
|
|
774
|
-
documentationItemId: nullishToOptional(
|
|
775
|
-
url: nullishToOptional(
|
|
792
|
+
documentationItemId: nullishToOptional(z34.string()),
|
|
793
|
+
url: nullishToOptional(z34.string()),
|
|
776
794
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
777
795
|
documentationItemPreview: nullishToOptional(PageBlockLinkPreview)
|
|
778
796
|
});
|
|
779
|
-
var PageBlockCustomBlockPropertyImageValue =
|
|
797
|
+
var PageBlockCustomBlockPropertyImageValue = z34.object({
|
|
780
798
|
asset: nullishToOptional(PageBlockAsset),
|
|
781
|
-
assetId: nullishToOptional(
|
|
782
|
-
assetUrl: nullishToOptional(
|
|
799
|
+
assetId: nullishToOptional(z34.string()),
|
|
800
|
+
assetUrl: nullishToOptional(z34.string())
|
|
783
801
|
});
|
|
784
|
-
var PageBlockCustomBlockPropertyValue =
|
|
785
|
-
key:
|
|
786
|
-
value:
|
|
802
|
+
var PageBlockCustomBlockPropertyValue = z34.object({
|
|
803
|
+
key: z34.string(),
|
|
804
|
+
value: z34.any()
|
|
787
805
|
// TODO Artem: for some reason there are cases when there's an array here in the DB
|
|
788
806
|
// e.g. element id 67451 in the dev db
|
|
789
807
|
// value: z
|
|
@@ -794,359 +812,335 @@ var PageBlockCustomBlockPropertyValue = z33.object({
|
|
|
794
812
|
// .or(TypographyTokenData)
|
|
795
813
|
// .or(PageBlockCustomBlockPropertyImageValue),
|
|
796
814
|
});
|
|
797
|
-
var PageBlockFigmaFrameProperties =
|
|
815
|
+
var PageBlockFigmaFrameProperties = z34.object({
|
|
798
816
|
color: nullishToOptional(
|
|
799
|
-
|
|
800
|
-
value:
|
|
817
|
+
z34.object({
|
|
818
|
+
value: z34.string()
|
|
801
819
|
})
|
|
802
820
|
),
|
|
803
821
|
alignment: PageBlockTilesAlignment,
|
|
804
822
|
layout: PageBlockTilesLayout,
|
|
805
823
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
806
|
-
showTitles:
|
|
824
|
+
showTitles: z34.boolean()
|
|
807
825
|
});
|
|
808
|
-
var PageBlockRenderCodeProperties =
|
|
809
|
-
showCode:
|
|
826
|
+
var PageBlockRenderCodeProperties = z34.object({
|
|
827
|
+
showCode: z34.boolean()
|
|
810
828
|
});
|
|
811
|
-
var PageBlockAssetComponent =
|
|
812
|
-
persistentId:
|
|
813
|
-
componentAssetId:
|
|
814
|
-
title: nullishToOptional(
|
|
815
|
-
description: nullishToOptional(
|
|
829
|
+
var PageBlockAssetComponent = z34.object({
|
|
830
|
+
persistentId: z34.string(),
|
|
831
|
+
componentAssetId: z34.string(),
|
|
832
|
+
title: nullishToOptional(z34.string()),
|
|
833
|
+
description: nullishToOptional(z34.string()),
|
|
816
834
|
backgroundColor: nullishToOptional(ColorTokenInlineData)
|
|
817
835
|
});
|
|
818
|
-
var PageBlockTableColumn =
|
|
819
|
-
id:
|
|
836
|
+
var PageBlockTableColumn = z34.object({
|
|
837
|
+
id: z34.string(),
|
|
820
838
|
width: DimensionTokenData
|
|
821
839
|
});
|
|
822
|
-
var PageBlockTableProperties =
|
|
823
|
-
showBorders:
|
|
824
|
-
showHeaderRow:
|
|
825
|
-
showHeaderColumn:
|
|
826
|
-
columns:
|
|
840
|
+
var PageBlockTableProperties = z34.object({
|
|
841
|
+
showBorders: z34.boolean(),
|
|
842
|
+
showHeaderRow: z34.boolean(),
|
|
843
|
+
showHeaderColumn: z34.boolean(),
|
|
844
|
+
columns: z34.array(PageBlockTableColumn)
|
|
827
845
|
});
|
|
828
|
-
var PageBlockTextSpanAttributeType =
|
|
829
|
-
var PageBlockTextSpanAttribute =
|
|
846
|
+
var PageBlockTextSpanAttributeType = z34.enum(["Bold", "Italic", "Link", "Strikethrough", "Code"]);
|
|
847
|
+
var PageBlockTextSpanAttribute = z34.object({
|
|
830
848
|
type: PageBlockTextSpanAttributeType,
|
|
831
|
-
link: nullishToOptional(
|
|
832
|
-
documentationItemId: nullishToOptional(
|
|
833
|
-
openInNewWindow: nullishToOptional(
|
|
849
|
+
link: nullishToOptional(z34.string()),
|
|
850
|
+
documentationItemId: nullishToOptional(z34.string()),
|
|
851
|
+
openInNewWindow: nullishToOptional(z34.boolean())
|
|
834
852
|
});
|
|
835
|
-
var PageBlockTextSpan =
|
|
836
|
-
text:
|
|
837
|
-
attributes:
|
|
853
|
+
var PageBlockTextSpan = z34.object({
|
|
854
|
+
text: z34.string(),
|
|
855
|
+
attributes: z34.array(PageBlockTextSpanAttribute)
|
|
838
856
|
});
|
|
839
|
-
var PageBlockText =
|
|
840
|
-
spans:
|
|
857
|
+
var PageBlockText = z34.object({
|
|
858
|
+
spans: z34.array(PageBlockTextSpan)
|
|
841
859
|
});
|
|
842
|
-
var PageBlockBaseV1 =
|
|
843
|
-
persistentId:
|
|
860
|
+
var PageBlockBaseV1 = z34.object({
|
|
861
|
+
persistentId: z34.string(),
|
|
844
862
|
type: PageBlockTypeV1,
|
|
845
863
|
// Element linking
|
|
846
|
-
designObjectId: nullishToOptional(
|
|
847
|
-
designObjectIds: nullishToOptional(
|
|
848
|
-
tokenType: nullishToOptional(DesignTokenType.or(
|
|
849
|
-
showNestedGroups: nullishToOptional(
|
|
850
|
-
brandId: nullishToOptional(
|
|
864
|
+
designObjectId: nullishToOptional(z34.string()),
|
|
865
|
+
designObjectIds: nullishToOptional(z34.array(z34.string())),
|
|
866
|
+
tokenType: nullishToOptional(DesignTokenType.or(z34.literal("Font"))),
|
|
867
|
+
showNestedGroups: nullishToOptional(z34.boolean()),
|
|
868
|
+
brandId: nullishToOptional(z34.string()),
|
|
851
869
|
// Rich text
|
|
852
870
|
text: nullishToOptional(PageBlockText),
|
|
853
|
-
caption: nullishToOptional(
|
|
854
|
-
headingType: nullishToOptional(
|
|
871
|
+
caption: nullishToOptional(z34.string()),
|
|
872
|
+
headingType: nullishToOptional(z34.number().min(1).max(3)),
|
|
855
873
|
codeLanguage: nullishToOptional(PageBlockCodeLanguage),
|
|
856
874
|
calloutType: nullishToOptional(PageBlockCalloutType),
|
|
857
|
-
urlInput: nullishToOptional(
|
|
858
|
-
url: nullishToOptional(
|
|
875
|
+
urlInput: nullishToOptional(z34.string()),
|
|
876
|
+
url: nullishToOptional(z34.string()),
|
|
859
877
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
860
878
|
// Image
|
|
861
879
|
asset: nullishToOptional(PageBlockAsset),
|
|
862
880
|
alignment: nullishToOptional(PageBlockAlignment),
|
|
863
881
|
// Shortcuts block
|
|
864
|
-
shortcuts: nullishToOptional(
|
|
882
|
+
shortcuts: nullishToOptional(z34.array(PageBlockShortcut)),
|
|
865
883
|
// Custom blocks
|
|
866
|
-
customBlockKey: nullishToOptional(
|
|
867
|
-
customBlockProperties: nullishToOptional(
|
|
868
|
-
variantKey: nullishToOptional(
|
|
884
|
+
customBlockKey: nullishToOptional(z34.string()),
|
|
885
|
+
customBlockProperties: nullishToOptional(z34.array(PageBlockCustomBlockPropertyValue)),
|
|
886
|
+
variantKey: nullishToOptional(z34.string()),
|
|
869
887
|
// Figma frames
|
|
870
888
|
figmaFrameProperties: nullishToOptional(PageBlockFigmaFrameProperties),
|
|
871
|
-
figmaFrames: nullishToOptional(
|
|
889
|
+
figmaFrames: nullishToOptional(z34.array(PageBlockFrame)),
|
|
872
890
|
// Generic
|
|
873
891
|
size: nullishToOptional(Size),
|
|
874
892
|
backgroundColor: nullishToOptional(ColorTokenInlineData),
|
|
875
893
|
// Render code
|
|
876
894
|
renderCodeProperties: nullishToOptional(PageBlockRenderCodeProperties),
|
|
877
895
|
// Component assets
|
|
878
|
-
componentAssets: nullishToOptional(
|
|
896
|
+
componentAssets: nullishToOptional(z34.array(PageBlockAssetComponent)),
|
|
879
897
|
// Tables
|
|
880
898
|
tableProperties: nullishToOptional(PageBlockTableProperties),
|
|
881
|
-
columnId: nullishToOptional(
|
|
899
|
+
columnId: nullishToOptional(z34.string()),
|
|
882
900
|
// Token spreadsheet
|
|
883
901
|
theme: nullishToOptional(PageBlockTheme),
|
|
884
|
-
blacklistedElementProperties: nullishToOptional(
|
|
902
|
+
blacklistedElementProperties: nullishToOptional(z34.array(z34.string())),
|
|
885
903
|
// Arbitrary
|
|
886
|
-
userMetadata: nullishToOptional(
|
|
904
|
+
userMetadata: nullishToOptional(z34.string())
|
|
887
905
|
});
|
|
888
906
|
var PageBlockV1 = PageBlockBaseV1.extend({
|
|
889
|
-
children:
|
|
907
|
+
children: z34.lazy(
|
|
890
908
|
() => PageBlockV1.array().nullish().transform((t) => t ?? [])
|
|
891
909
|
)
|
|
892
910
|
});
|
|
893
|
-
var PageBlockLinkType =
|
|
894
|
-
var PageBlockImageType =
|
|
895
|
-
var PageBlockImageAlignment =
|
|
896
|
-
var PageBlockTableCellAlignment =
|
|
897
|
-
var PageBlockPreviewContainerSize =
|
|
898
|
-
var PageBlockThemeDisplayMode =
|
|
899
|
-
var PageBlockImageReference =
|
|
911
|
+
var PageBlockLinkType = z35.enum(["DocumentationItem", "PageHeading", "Url"]);
|
|
912
|
+
var PageBlockImageType = z35.enum(["Resource", "FigmaNode"]);
|
|
913
|
+
var PageBlockImageAlignment = z35.enum(["Left", "Center", "Stretch"]);
|
|
914
|
+
var PageBlockTableCellAlignment = z35.enum(["Left", "Center", "Right"]);
|
|
915
|
+
var PageBlockPreviewContainerSize = z35.enum(["Centered", "NaturalHeight"]);
|
|
916
|
+
var PageBlockThemeDisplayMode = z35.enum(["Split", "Override"]);
|
|
917
|
+
var PageBlockImageReference = z35.object({
|
|
900
918
|
type: PageBlockImageType,
|
|
901
|
-
resource:
|
|
902
|
-
url:
|
|
903
|
-
resourceId:
|
|
919
|
+
resource: z35.object({
|
|
920
|
+
url: z35.string(),
|
|
921
|
+
resourceId: z35.string()
|
|
904
922
|
}).optional(),
|
|
905
|
-
figmaFile:
|
|
906
|
-
sourceId:
|
|
907
|
-
frameReferenceId:
|
|
923
|
+
figmaFile: z35.object({
|
|
924
|
+
sourceId: z35.string(),
|
|
925
|
+
frameReferenceId: z35.string()
|
|
908
926
|
}).optional()
|
|
909
927
|
});
|
|
910
|
-
var PageBlockColorV2 =
|
|
911
|
-
value:
|
|
912
|
-
referencedTokenId:
|
|
928
|
+
var PageBlockColorV2 = z35.object({
|
|
929
|
+
value: z35.string(),
|
|
930
|
+
referencedTokenId: z35.string().optional()
|
|
913
931
|
});
|
|
914
|
-
var PageBlockAssetEntityMeta =
|
|
915
|
-
title:
|
|
916
|
-
description:
|
|
932
|
+
var PageBlockAssetEntityMeta = z35.object({
|
|
933
|
+
title: z35.string().optional(),
|
|
934
|
+
description: z35.string().optional(),
|
|
917
935
|
backgroundColor: PageBlockColorV2.optional()
|
|
918
936
|
});
|
|
919
|
-
var PageBlockFigmaNodeEntityMeta =
|
|
920
|
-
title:
|
|
921
|
-
description:
|
|
937
|
+
var PageBlockFigmaNodeEntityMeta = z35.object({
|
|
938
|
+
title: z35.string().optional(),
|
|
939
|
+
description: z35.string().optional(),
|
|
922
940
|
backgroundColor: PageBlockColorV2.optional()
|
|
923
941
|
});
|
|
924
|
-
var PageBlockAppearanceV2 =
|
|
942
|
+
var PageBlockAppearanceV2 = z35.object({
|
|
925
943
|
itemBackgroundColor: PageBlockColorV2.optional(),
|
|
926
|
-
numberOfColumns:
|
|
944
|
+
numberOfColumns: z35.number().optional()
|
|
927
945
|
});
|
|
928
|
-
var PageBlockItemUntypedValue =
|
|
929
|
-
value:
|
|
930
|
-
}).and(
|
|
931
|
-
var PageBlockLinkV2 =
|
|
946
|
+
var PageBlockItemUntypedValue = z35.object({
|
|
947
|
+
value: z35.any()
|
|
948
|
+
}).and(z35.record(z35.any()));
|
|
949
|
+
var PageBlockLinkV2 = z35.object({
|
|
932
950
|
type: PageBlockLinkType,
|
|
933
|
-
documentationItemId:
|
|
934
|
-
pageHeadingId:
|
|
935
|
-
url:
|
|
936
|
-
openInNewTab:
|
|
951
|
+
documentationItemId: z35.string().optional(),
|
|
952
|
+
pageHeadingId: z35.string().optional(),
|
|
953
|
+
url: z35.string().optional(),
|
|
954
|
+
openInNewTab: z35.boolean().optional()
|
|
937
955
|
});
|
|
938
|
-
var PageBlockItemV2 =
|
|
939
|
-
id:
|
|
956
|
+
var PageBlockItemV2 = z35.object({
|
|
957
|
+
id: z35.string(),
|
|
940
958
|
linksTo: PageBlockLinkV2.optional(),
|
|
941
|
-
props:
|
|
959
|
+
props: z35.record(PageBlockItemUntypedValue)
|
|
942
960
|
});
|
|
943
|
-
var PageBlockDataV2 =
|
|
944
|
-
packageId:
|
|
945
|
-
variantId:
|
|
946
|
-
indentLevel:
|
|
961
|
+
var PageBlockDataV2 = z35.object({
|
|
962
|
+
packageId: z35.string(),
|
|
963
|
+
variantId: z35.string().optional(),
|
|
964
|
+
indentLevel: z35.number(),
|
|
947
965
|
appearance: PageBlockAppearanceV2.optional(),
|
|
948
|
-
items:
|
|
966
|
+
items: z35.array(PageBlockItemV2)
|
|
949
967
|
});
|
|
950
|
-
var PageBlockItemAssetValue =
|
|
951
|
-
selectedPropertyIds:
|
|
952
|
-
showSearch:
|
|
968
|
+
var PageBlockItemAssetValue = z35.object({
|
|
969
|
+
selectedPropertyIds: z35.array(z35.string()).optional(),
|
|
970
|
+
showSearch: z35.boolean().optional(),
|
|
953
971
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
954
972
|
backgroundColor: PageBlockColorV2.optional(),
|
|
955
|
-
value:
|
|
956
|
-
|
|
957
|
-
entityId:
|
|
958
|
-
entityType:
|
|
973
|
+
value: z35.array(
|
|
974
|
+
z35.object({
|
|
975
|
+
entityId: z35.string(),
|
|
976
|
+
entityType: z35.enum(["Asset", "AssetGroup"]),
|
|
959
977
|
entityMeta: PageBlockAssetEntityMeta.optional()
|
|
960
978
|
})
|
|
961
979
|
)
|
|
962
980
|
});
|
|
963
|
-
var PageBlockItemAssetPropertyValue =
|
|
964
|
-
value:
|
|
981
|
+
var PageBlockItemAssetPropertyValue = z35.object({
|
|
982
|
+
value: z35.array(z35.string())
|
|
965
983
|
});
|
|
966
|
-
var PageBlockItemBooleanValue =
|
|
967
|
-
value:
|
|
984
|
+
var PageBlockItemBooleanValue = z35.object({
|
|
985
|
+
value: z35.boolean()
|
|
968
986
|
});
|
|
969
|
-
var PageBlockItemCodeValue =
|
|
987
|
+
var PageBlockItemCodeValue = z35.object({
|
|
970
988
|
format: PageBlockCodeLanguage.optional(),
|
|
971
|
-
caption:
|
|
972
|
-
value:
|
|
973
|
-
});
|
|
974
|
-
var PageBlockItemSandboxValue =
|
|
975
|
-
showCode:
|
|
976
|
-
showControls:
|
|
977
|
-
backgroundColor:
|
|
978
|
-
alignPreview:
|
|
979
|
-
previewHeight:
|
|
980
|
-
value:
|
|
981
|
-
});
|
|
982
|
-
var PageBlockItemColorValue =
|
|
983
|
-
var PageBlockItemComponentValue =
|
|
984
|
-
selectedPropertyIds:
|
|
985
|
-
value:
|
|
986
|
-
|
|
987
|
-
entityId:
|
|
988
|
-
entityType:
|
|
989
|
+
caption: z35.string().optional(),
|
|
990
|
+
value: z35.string()
|
|
991
|
+
});
|
|
992
|
+
var PageBlockItemSandboxValue = z35.object({
|
|
993
|
+
showCode: z35.boolean().optional(),
|
|
994
|
+
showControls: z35.boolean().optional(),
|
|
995
|
+
backgroundColor: z35.string().optional(),
|
|
996
|
+
alignPreview: z35.enum(["Left", "Center"]).optional(),
|
|
997
|
+
previewHeight: z35.number().optional(),
|
|
998
|
+
value: z35.string()
|
|
999
|
+
});
|
|
1000
|
+
var PageBlockItemColorValue = z35.record(z35.any());
|
|
1001
|
+
var PageBlockItemComponentValue = z35.object({
|
|
1002
|
+
selectedPropertyIds: z35.array(z35.string()).optional(),
|
|
1003
|
+
value: z35.array(
|
|
1004
|
+
z35.object({
|
|
1005
|
+
entityId: z35.string(),
|
|
1006
|
+
entityType: z35.enum(["Component", "ComponentGroup"])
|
|
989
1007
|
})
|
|
990
1008
|
)
|
|
991
1009
|
});
|
|
992
|
-
var PageBlockItemComponentPropertyValue =
|
|
993
|
-
value:
|
|
994
|
-
});
|
|
995
|
-
var PageBlockItemDividerValue =
|
|
996
|
-
var PageBlockItemEmbedValue =
|
|
997
|
-
value:
|
|
998
|
-
caption:
|
|
999
|
-
height:
|
|
1000
|
-
openGraph:
|
|
1001
|
-
title:
|
|
1002
|
-
description:
|
|
1003
|
-
imageUrl:
|
|
1010
|
+
var PageBlockItemComponentPropertyValue = z35.object({
|
|
1011
|
+
value: z35.string()
|
|
1012
|
+
});
|
|
1013
|
+
var PageBlockItemDividerValue = z35.object({});
|
|
1014
|
+
var PageBlockItemEmbedValue = z35.object({
|
|
1015
|
+
value: z35.string().optional(),
|
|
1016
|
+
caption: z35.string().optional(),
|
|
1017
|
+
height: z35.number().optional(),
|
|
1018
|
+
openGraph: z35.object({
|
|
1019
|
+
title: z35.string().optional(),
|
|
1020
|
+
description: z35.string().optional(),
|
|
1021
|
+
imageUrl: z35.string().optional()
|
|
1004
1022
|
}).optional()
|
|
1005
1023
|
});
|
|
1006
|
-
var PageBlockItemFigmaNodeValue =
|
|
1007
|
-
selectedPropertyIds:
|
|
1008
|
-
showSearch:
|
|
1024
|
+
var PageBlockItemFigmaNodeValue = z35.object({
|
|
1025
|
+
selectedPropertyIds: z35.array(z35.string()).optional(),
|
|
1026
|
+
showSearch: z35.boolean().optional(),
|
|
1009
1027
|
previewContainerSize: PageBlockPreviewContainerSize.optional(),
|
|
1010
1028
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1011
|
-
value:
|
|
1012
|
-
|
|
1013
|
-
entityId:
|
|
1029
|
+
value: z35.array(
|
|
1030
|
+
z35.object({
|
|
1031
|
+
entityId: z35.string(),
|
|
1014
1032
|
entityMeta: PageBlockFigmaNodeEntityMeta.optional()
|
|
1015
1033
|
})
|
|
1016
1034
|
)
|
|
1017
1035
|
});
|
|
1018
|
-
var PageBlockItemImageValue =
|
|
1019
|
-
alt:
|
|
1020
|
-
caption:
|
|
1036
|
+
var PageBlockItemImageValue = z35.object({
|
|
1037
|
+
alt: z35.string().optional(),
|
|
1038
|
+
caption: z35.string().optional(),
|
|
1021
1039
|
alignment: PageBlockImageAlignment.optional(),
|
|
1022
1040
|
value: PageBlockImageReference.optional()
|
|
1023
1041
|
});
|
|
1024
|
-
var PageBlockItemMarkdownValue =
|
|
1025
|
-
value:
|
|
1042
|
+
var PageBlockItemMarkdownValue = z35.object({
|
|
1043
|
+
value: z35.string()
|
|
1026
1044
|
});
|
|
1027
|
-
var PageBlockItemMultiRichTextValue =
|
|
1045
|
+
var PageBlockItemMultiRichTextValue = z35.object({
|
|
1028
1046
|
value: PageBlockText.array()
|
|
1029
1047
|
});
|
|
1030
|
-
var PageBlockItemMultiSelectValue =
|
|
1031
|
-
value:
|
|
1048
|
+
var PageBlockItemMultiSelectValue = z35.object({
|
|
1049
|
+
value: z35.array(z35.string())
|
|
1032
1050
|
});
|
|
1033
|
-
var PageBlockItemNumberValue =
|
|
1034
|
-
value:
|
|
1051
|
+
var PageBlockItemNumberValue = z35.object({
|
|
1052
|
+
value: z35.number()
|
|
1035
1053
|
});
|
|
1036
|
-
var PageBlockItemRichTextValue =
|
|
1054
|
+
var PageBlockItemRichTextValue = z35.object({
|
|
1037
1055
|
value: PageBlockText,
|
|
1038
1056
|
calloutType: PageBlockCalloutType.optional()
|
|
1039
1057
|
});
|
|
1040
|
-
var PageBlockItemSingleSelectValue =
|
|
1041
|
-
value:
|
|
1058
|
+
var PageBlockItemSingleSelectValue = z35.object({
|
|
1059
|
+
value: z35.string()
|
|
1042
1060
|
});
|
|
1043
|
-
var PageBlockItemStorybookValue =
|
|
1044
|
-
caption:
|
|
1045
|
-
height:
|
|
1046
|
-
showAddons:
|
|
1047
|
-
value:
|
|
1061
|
+
var PageBlockItemStorybookValue = z35.object({
|
|
1062
|
+
caption: z35.string().optional(),
|
|
1063
|
+
height: z35.number().optional(),
|
|
1064
|
+
showAddons: z35.boolean().optional(),
|
|
1065
|
+
value: z35.string()
|
|
1048
1066
|
});
|
|
1049
|
-
var PageBlockItemTextValue =
|
|
1050
|
-
value:
|
|
1067
|
+
var PageBlockItemTextValue = z35.object({
|
|
1068
|
+
value: z35.string()
|
|
1051
1069
|
});
|
|
1052
|
-
var PageBlockItemTokenValue =
|
|
1053
|
-
selectedPropertyIds:
|
|
1054
|
-
selectedThemeIds:
|
|
1070
|
+
var PageBlockItemTokenValue = z35.object({
|
|
1071
|
+
selectedPropertyIds: z35.array(z35.string()).optional(),
|
|
1072
|
+
selectedThemeIds: z35.array(z35.string()).optional(),
|
|
1055
1073
|
themeDisplayMode: PageBlockThemeDisplayMode.optional(),
|
|
1056
|
-
value:
|
|
1057
|
-
|
|
1058
|
-
entityId:
|
|
1059
|
-
entityType:
|
|
1060
|
-
entityMeta:
|
|
1061
|
-
showNestedGroups:
|
|
1074
|
+
value: z35.array(
|
|
1075
|
+
z35.object({
|
|
1076
|
+
entityId: z35.string(),
|
|
1077
|
+
entityType: z35.enum(["Token", "TokenGroup"]),
|
|
1078
|
+
entityMeta: z35.object({
|
|
1079
|
+
showNestedGroups: z35.boolean().optional()
|
|
1062
1080
|
}).optional()
|
|
1063
1081
|
})
|
|
1064
1082
|
)
|
|
1065
1083
|
});
|
|
1066
|
-
var PageBlockItemTokenPropertyValue =
|
|
1067
|
-
selectedPropertyIds:
|
|
1068
|
-
selectedThemeIds:
|
|
1069
|
-
value:
|
|
1084
|
+
var PageBlockItemTokenPropertyValue = z35.object({
|
|
1085
|
+
selectedPropertyIds: z35.array(z35.string()).optional(),
|
|
1086
|
+
selectedThemeIds: z35.array(z35.string()).optional(),
|
|
1087
|
+
value: z35.array(z35.string())
|
|
1070
1088
|
});
|
|
1071
|
-
var PageBlockItemTokenTypeValue =
|
|
1072
|
-
value:
|
|
1089
|
+
var PageBlockItemTokenTypeValue = z35.object({
|
|
1090
|
+
value: z35.array(DesignTokenType)
|
|
1073
1091
|
});
|
|
1074
|
-
var PageBlockItemUrlValue =
|
|
1075
|
-
value:
|
|
1092
|
+
var PageBlockItemUrlValue = z35.object({
|
|
1093
|
+
value: z35.string()
|
|
1076
1094
|
});
|
|
1077
|
-
var PageBlockItemTableRichTextNode =
|
|
1078
|
-
type:
|
|
1079
|
-
id:
|
|
1095
|
+
var PageBlockItemTableRichTextNode = z35.object({
|
|
1096
|
+
type: z35.literal("RichText"),
|
|
1097
|
+
id: z35.string(),
|
|
1080
1098
|
value: PageBlockItemRichTextValue.shape.value
|
|
1081
1099
|
});
|
|
1082
|
-
var PageBlockItemTableMultiRichTextNode =
|
|
1083
|
-
type:
|
|
1100
|
+
var PageBlockItemTableMultiRichTextNode = z35.object({
|
|
1101
|
+
type: z35.literal("MultiRichText"),
|
|
1084
1102
|
value: PageBlockItemMultiRichTextValue.shape.value
|
|
1085
1103
|
});
|
|
1086
|
-
var PageBlockItemTableImageNode =
|
|
1087
|
-
type:
|
|
1088
|
-
id:
|
|
1104
|
+
var PageBlockItemTableImageNode = z35.object({
|
|
1105
|
+
type: z35.literal("Image"),
|
|
1106
|
+
id: z35.string(),
|
|
1089
1107
|
caption: PageBlockItemImageValue.shape.caption,
|
|
1090
1108
|
value: PageBlockItemImageValue.shape.value
|
|
1091
1109
|
});
|
|
1092
|
-
var PageBlockItemTableNode =
|
|
1110
|
+
var PageBlockItemTableNode = z35.discriminatedUnion("type", [
|
|
1093
1111
|
PageBlockItemTableRichTextNode,
|
|
1094
1112
|
// PageBlockItemTableMultiRichTextNode,
|
|
1095
1113
|
PageBlockItemTableImageNode
|
|
1096
1114
|
]);
|
|
1097
|
-
var PageBlockItemTableCell =
|
|
1098
|
-
id:
|
|
1099
|
-
nodes:
|
|
1100
|
-
columnWidth:
|
|
1115
|
+
var PageBlockItemTableCell = z35.object({
|
|
1116
|
+
id: z35.string(),
|
|
1117
|
+
nodes: z35.array(PageBlockItemTableNode),
|
|
1118
|
+
columnWidth: z35.number().optional(),
|
|
1101
1119
|
alignment: PageBlockTableCellAlignment
|
|
1102
1120
|
});
|
|
1103
|
-
var PageBlockItemTableRow =
|
|
1104
|
-
cells:
|
|
1121
|
+
var PageBlockItemTableRow = z35.object({
|
|
1122
|
+
cells: z35.array(PageBlockItemTableCell)
|
|
1105
1123
|
});
|
|
1106
|
-
var PageBlockItemTableValue =
|
|
1107
|
-
highlightHeaderColumn:
|
|
1108
|
-
highlightHeaderRow:
|
|
1109
|
-
showBorder:
|
|
1110
|
-
value:
|
|
1124
|
+
var PageBlockItemTableValue = z35.object({
|
|
1125
|
+
highlightHeaderColumn: z35.boolean().optional(),
|
|
1126
|
+
highlightHeaderRow: z35.boolean().optional(),
|
|
1127
|
+
showBorder: z35.boolean().optional(),
|
|
1128
|
+
value: z35.array(PageBlockItemTableRow)
|
|
1111
1129
|
});
|
|
1112
|
-
var
|
|
1113
|
-
var
|
|
1114
|
-
(value) => {
|
|
1115
|
-
return !value.startsWith(RESERVED_OBJECT_ID_PREFIX);
|
|
1116
|
-
},
|
|
1117
|
-
{
|
|
1118
|
-
message: `ID value can't start with ${RESERVED_OBJECT_ID_PREFIX}`
|
|
1119
|
-
}
|
|
1120
|
-
);
|
|
1121
|
-
var DocumentationPageAssetType = z36.enum(["image", "figmaFrame"]);
|
|
1122
|
-
var DocumentationPageImageAsset = z36.object({
|
|
1123
|
-
type: z36.literal(DocumentationPageAssetType.Enum.image),
|
|
1124
|
-
url: z36.string().optional(),
|
|
1125
|
-
id: SafeIdSchema
|
|
1126
|
-
});
|
|
1127
|
-
var DocumentationPageFrameAsset = z36.object({
|
|
1128
|
-
type: z36.literal(DocumentationPageAssetType.Enum.figmaFrame),
|
|
1129
|
-
url: z36.string().optional(),
|
|
1130
|
-
figmaFrame: PageBlockFrame
|
|
1131
|
-
});
|
|
1132
|
-
var DocumentationPageAsset = z36.discriminatedUnion("type", [
|
|
1133
|
-
DocumentationPageImageAsset,
|
|
1134
|
-
DocumentationPageFrameAsset
|
|
1135
|
-
]);
|
|
1136
|
-
var DocumentationItemHeaderAlignmentSchema = z37.enum(["Left", "Center"]);
|
|
1137
|
-
var DocumentationItemHeaderImageScaleTypeSchema = z37.enum(["AspectFill", "AspectFit"]);
|
|
1130
|
+
var DocumentationItemHeaderAlignmentSchema = z36.enum(["Left", "Center"]);
|
|
1131
|
+
var DocumentationItemHeaderImageScaleTypeSchema = z36.enum(["AspectFill", "AspectFit"]);
|
|
1138
1132
|
var DocumentationItemHeaderAlignment = DocumentationItemHeaderAlignmentSchema.enum;
|
|
1139
1133
|
var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTypeSchema.enum;
|
|
1140
|
-
var DocumentationItemHeaderV1 =
|
|
1141
|
-
description:
|
|
1134
|
+
var DocumentationItemHeaderV1 = z37.object({
|
|
1135
|
+
description: z37.string(),
|
|
1142
1136
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1143
1137
|
foregroundColor: ColorTokenData.nullish(),
|
|
1144
1138
|
backgroundColor: ColorTokenData.nullish(),
|
|
1145
|
-
backgroundImageAsset:
|
|
1139
|
+
backgroundImageAsset: PageBlockAsset.nullish(),
|
|
1146
1140
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1147
|
-
showBackgroundOverlay:
|
|
1148
|
-
showCoverText:
|
|
1149
|
-
minHeight:
|
|
1141
|
+
showBackgroundOverlay: z37.boolean(),
|
|
1142
|
+
showCoverText: z37.boolean(),
|
|
1143
|
+
minHeight: z37.number().nullish()
|
|
1150
1144
|
});
|
|
1151
1145
|
var defaultDocumentationItemHeaderV1 = {
|
|
1152
1146
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -1155,28 +1149,28 @@ var defaultDocumentationItemHeaderV1 = {
|
|
|
1155
1149
|
showBackgroundOverlay: false,
|
|
1156
1150
|
showCoverText: true
|
|
1157
1151
|
};
|
|
1158
|
-
var DocumentationItemConfigurationV1 =
|
|
1159
|
-
showSidebar:
|
|
1152
|
+
var DocumentationItemConfigurationV1 = z38.object({
|
|
1153
|
+
showSidebar: z38.boolean(),
|
|
1160
1154
|
header: DocumentationItemHeaderV1
|
|
1161
1155
|
});
|
|
1162
|
-
var DocumentationPageDataV1 =
|
|
1163
|
-
blocks:
|
|
1156
|
+
var DocumentationPageDataV1 = z39.object({
|
|
1157
|
+
blocks: z39.array(PageBlockV1),
|
|
1164
1158
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1165
1159
|
});
|
|
1166
|
-
var DocumentationPageElementDataV1 =
|
|
1167
|
-
dataVersion:
|
|
1160
|
+
var DocumentationPageElementDataV1 = z39.object({
|
|
1161
|
+
dataVersion: z39.literal(1).optional().default(1),
|
|
1168
1162
|
value: DocumentationPageDataV1
|
|
1169
1163
|
});
|
|
1170
|
-
var DocumentationItemHeaderV2 =
|
|
1171
|
-
description:
|
|
1164
|
+
var DocumentationItemHeaderV2 = z40.object({
|
|
1165
|
+
description: z40.string(),
|
|
1172
1166
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1173
1167
|
foregroundColor: PageBlockColorV2.nullish(),
|
|
1174
1168
|
backgroundColor: PageBlockColorV2.nullish(),
|
|
1175
1169
|
backgroundImageAsset: PageBlockImageReference.nullish(),
|
|
1176
1170
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1177
|
-
showBackgroundOverlay:
|
|
1178
|
-
showCoverText:
|
|
1179
|
-
minHeight:
|
|
1171
|
+
showBackgroundOverlay: z40.boolean(),
|
|
1172
|
+
showCoverText: z40.boolean(),
|
|
1173
|
+
minHeight: z40.number().nullish()
|
|
1180
1174
|
});
|
|
1181
1175
|
var defaultDocumentationItemHeaderV2 = {
|
|
1182
1176
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
@@ -1185,196 +1179,205 @@ var defaultDocumentationItemHeaderV2 = {
|
|
|
1185
1179
|
showBackgroundOverlay: false,
|
|
1186
1180
|
showCoverText: true
|
|
1187
1181
|
};
|
|
1188
|
-
var DocumentationItemConfigurationV2 =
|
|
1189
|
-
showSidebar:
|
|
1182
|
+
var DocumentationItemConfigurationV2 = z41.object({
|
|
1183
|
+
showSidebar: z41.boolean(),
|
|
1190
1184
|
header: DocumentationItemHeaderV2
|
|
1191
1185
|
});
|
|
1192
|
-
var DocumentationPageDataV2 =
|
|
1186
|
+
var DocumentationPageDataV2 = z42.object({
|
|
1193
1187
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1194
1188
|
});
|
|
1195
|
-
var DocumentationPageElementDataV2 =
|
|
1189
|
+
var DocumentationPageElementDataV2 = z42.object({
|
|
1196
1190
|
value: DocumentationPageDataV1,
|
|
1197
1191
|
valueV2: DocumentationPageDataV2.optional()
|
|
1198
1192
|
});
|
|
1199
|
-
var DesignElementOrigin =
|
|
1200
|
-
id:
|
|
1201
|
-
sourceId:
|
|
1202
|
-
name:
|
|
1193
|
+
var DesignElementOrigin = z43.object({
|
|
1194
|
+
id: z43.string(),
|
|
1195
|
+
sourceId: z43.string(),
|
|
1196
|
+
name: z43.string()
|
|
1203
1197
|
});
|
|
1204
|
-
var DesignElementBase =
|
|
1205
|
-
id:
|
|
1206
|
-
persistentId:
|
|
1198
|
+
var DesignElementBase = z43.object({
|
|
1199
|
+
id: z43.string(),
|
|
1200
|
+
persistentId: z43.string(),
|
|
1207
1201
|
meta: ObjectMeta,
|
|
1208
|
-
designSystemVersionId:
|
|
1209
|
-
createdAt:
|
|
1210
|
-
updatedAt:
|
|
1202
|
+
designSystemVersionId: z43.string(),
|
|
1203
|
+
createdAt: z43.coerce.date(),
|
|
1204
|
+
updatedAt: z43.coerce.date()
|
|
1211
1205
|
});
|
|
1212
1206
|
var DesignElementImportedBase = DesignElementBase.extend({
|
|
1213
1207
|
origin: DesignElementOrigin
|
|
1214
1208
|
});
|
|
1215
|
-
var DesignElementGroupablePart =
|
|
1216
|
-
parentPersistentId:
|
|
1217
|
-
sortOrder:
|
|
1209
|
+
var DesignElementGroupablePart = z43.object({
|
|
1210
|
+
parentPersistentId: z43.string().optional(),
|
|
1211
|
+
sortOrder: z43.number()
|
|
1218
1212
|
});
|
|
1219
1213
|
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
1220
1214
|
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
1221
|
-
parentPersistentId:
|
|
1215
|
+
parentPersistentId: z43.string()
|
|
1222
1216
|
});
|
|
1223
|
-
var DesignElementBrandedPart =
|
|
1224
|
-
brandPersistentId:
|
|
1217
|
+
var DesignElementBrandedPart = z43.object({
|
|
1218
|
+
brandPersistentId: z43.string()
|
|
1225
1219
|
});
|
|
1226
|
-
var DesignElementSlugPart =
|
|
1227
|
-
slug:
|
|
1228
|
-
userSlug:
|
|
1220
|
+
var DesignElementSlugPart = z43.object({
|
|
1221
|
+
slug: z43.string().optional(),
|
|
1222
|
+
userSlug: z43.string().optional()
|
|
1229
1223
|
});
|
|
1230
1224
|
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
1231
1225
|
data: PageBlockDataV2
|
|
1232
1226
|
});
|
|
1233
|
-
var PageBlockEditorModelV2 =
|
|
1234
|
-
id:
|
|
1235
|
-
type:
|
|
1227
|
+
var PageBlockEditorModelV2 = z44.object({
|
|
1228
|
+
id: z44.string(),
|
|
1229
|
+
type: z44.literal("Block"),
|
|
1236
1230
|
data: PageBlockDataV2
|
|
1237
1231
|
});
|
|
1238
|
-
var PageSectionTypeV2 =
|
|
1239
|
-
var PageSectionColumnV2 =
|
|
1240
|
-
id:
|
|
1241
|
-
blocks:
|
|
1242
|
-
});
|
|
1243
|
-
var PageSectionItemV2 =
|
|
1244
|
-
id:
|
|
1245
|
-
title:
|
|
1246
|
-
columns:
|
|
1247
|
-
});
|
|
1248
|
-
var PageSectionPaddingV2 =
|
|
1249
|
-
top:
|
|
1250
|
-
bottom:
|
|
1251
|
-
left:
|
|
1252
|
-
right:
|
|
1253
|
-
});
|
|
1254
|
-
var PageSectionAppearanceV2 =
|
|
1255
|
-
expandToEdges:
|
|
1256
|
-
contentExpandToEdges:
|
|
1232
|
+
var PageSectionTypeV2 = z45.enum(["Tabs"]);
|
|
1233
|
+
var PageSectionColumnV2 = z45.object({
|
|
1234
|
+
id: z45.string(),
|
|
1235
|
+
blocks: z45.array(PageBlockEditorModelV2)
|
|
1236
|
+
});
|
|
1237
|
+
var PageSectionItemV2 = z45.object({
|
|
1238
|
+
id: z45.string(),
|
|
1239
|
+
title: z45.string(),
|
|
1240
|
+
columns: z45.array(PageSectionColumnV2)
|
|
1241
|
+
});
|
|
1242
|
+
var PageSectionPaddingV2 = z45.object({
|
|
1243
|
+
top: z45.number().optional(),
|
|
1244
|
+
bottom: z45.number().optional(),
|
|
1245
|
+
left: z45.number().optional(),
|
|
1246
|
+
right: z45.number().optional()
|
|
1247
|
+
});
|
|
1248
|
+
var PageSectionAppearanceV2 = z45.object({
|
|
1249
|
+
expandToEdges: z45.boolean(),
|
|
1250
|
+
contentExpandToEdges: z45.boolean(),
|
|
1257
1251
|
backgroundColor: PageBlockColorV2.optional(),
|
|
1258
1252
|
foregroundColor: PageBlockColorV2.optional(),
|
|
1259
1253
|
padding: PageSectionPaddingV2.optional()
|
|
1260
1254
|
});
|
|
1261
|
-
var PageSectionEditorModelV2 =
|
|
1262
|
-
id:
|
|
1263
|
-
type:
|
|
1264
|
-
variantId:
|
|
1255
|
+
var PageSectionEditorModelV2 = z45.object({
|
|
1256
|
+
id: z45.string(),
|
|
1257
|
+
type: z45.literal("Section"),
|
|
1258
|
+
variantId: z45.string().optional(),
|
|
1265
1259
|
sectionType: PageSectionTypeV2,
|
|
1266
1260
|
appearance: PageSectionAppearanceV2,
|
|
1267
|
-
items:
|
|
1261
|
+
items: z45.array(PageSectionItemV2)
|
|
1268
1262
|
});
|
|
1269
|
-
var DurationUnit =
|
|
1270
|
-
var DurationValue =
|
|
1263
|
+
var DurationUnit = z46.enum(["Ms"]);
|
|
1264
|
+
var DurationValue = z46.object({
|
|
1271
1265
|
unit: DurationUnit,
|
|
1272
|
-
measure:
|
|
1266
|
+
measure: z46.number()
|
|
1273
1267
|
});
|
|
1274
1268
|
var DurationTokenData = tokenAliasOrValue(DurationValue);
|
|
1275
|
-
var FigmaFileStructureNodeType =
|
|
1276
|
-
var FigmaFileStructureNodeBase =
|
|
1277
|
-
id:
|
|
1278
|
-
name:
|
|
1269
|
+
var FigmaFileStructureNodeType = z47.enum(["DOCUMENT", "CANVAS", "FRAME", "COMPONENT", "COMPONENT_SET"]);
|
|
1270
|
+
var FigmaFileStructureNodeBase = z47.object({
|
|
1271
|
+
id: z47.string(),
|
|
1272
|
+
name: z47.string(),
|
|
1279
1273
|
type: FigmaFileStructureNodeType,
|
|
1280
1274
|
size: SizeOrUndefined,
|
|
1281
|
-
parentComponentSetId:
|
|
1275
|
+
parentComponentSetId: z47.string().optional()
|
|
1282
1276
|
});
|
|
1283
1277
|
var FigmaFileStructureNode = FigmaFileStructureNodeBase.extend({
|
|
1284
|
-
children:
|
|
1278
|
+
children: z47.lazy(() => FigmaFileStructureNode.array())
|
|
1285
1279
|
});
|
|
1286
|
-
var FigmaFileStructureStatistics =
|
|
1287
|
-
frames:
|
|
1288
|
-
components:
|
|
1289
|
-
componentSets:
|
|
1280
|
+
var FigmaFileStructureStatistics = z47.object({
|
|
1281
|
+
frames: z47.number().nullable().optional().transform((v) => v ?? 0),
|
|
1282
|
+
components: z47.number().nullable().optional().transform((v) => v ?? 0),
|
|
1283
|
+
componentSets: z47.number().nullable().optional().transform((v) => v ?? 0)
|
|
1290
1284
|
});
|
|
1291
|
-
var FigmaFileStructureElementData =
|
|
1292
|
-
value:
|
|
1285
|
+
var FigmaFileStructureElementData = z47.object({
|
|
1286
|
+
value: z47.object({
|
|
1293
1287
|
structure: FigmaFileStructureNode,
|
|
1294
1288
|
assetsInFile: FigmaFileStructureStatistics
|
|
1295
1289
|
})
|
|
1296
1290
|
});
|
|
1297
|
-
var FigmaNodeReferenceData =
|
|
1298
|
-
structureElementId:
|
|
1299
|
-
nodeId:
|
|
1300
|
-
fileId:
|
|
1301
|
-
valid:
|
|
1291
|
+
var FigmaNodeReferenceData = z48.object({
|
|
1292
|
+
structureElementId: z48.string(),
|
|
1293
|
+
nodeId: z48.string(),
|
|
1294
|
+
fileId: z48.string().optional(),
|
|
1295
|
+
valid: z48.boolean(),
|
|
1302
1296
|
// Asset data
|
|
1303
|
-
assetId:
|
|
1304
|
-
assetScale:
|
|
1305
|
-
assetWidth:
|
|
1306
|
-
assetHeight:
|
|
1307
|
-
assetUrl:
|
|
1308
|
-
assetOriginKey:
|
|
1309
|
-
});
|
|
1310
|
-
var FigmaNodeReferenceElementData =
|
|
1297
|
+
assetId: z48.string().optional(),
|
|
1298
|
+
assetScale: z48.number().optional(),
|
|
1299
|
+
assetWidth: z48.number().optional(),
|
|
1300
|
+
assetHeight: z48.number().optional(),
|
|
1301
|
+
assetUrl: z48.string().optional(),
|
|
1302
|
+
assetOriginKey: z48.string().optional()
|
|
1303
|
+
});
|
|
1304
|
+
var FigmaNodeReferenceElementData = z48.object({
|
|
1311
1305
|
value: FigmaNodeReferenceData
|
|
1312
1306
|
});
|
|
1313
|
-
var FontFamilyValue =
|
|
1307
|
+
var FontFamilyValue = z49.string();
|
|
1314
1308
|
var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
|
|
1315
|
-
var FontSizeUnit =
|
|
1316
|
-
var FontSizeValue =
|
|
1309
|
+
var FontSizeUnit = z50.enum(["Pixels", "Rem", "Percent"]);
|
|
1310
|
+
var FontSizeValue = z50.object({
|
|
1317
1311
|
unit: FontSizeUnit,
|
|
1318
|
-
measure:
|
|
1312
|
+
measure: z50.number()
|
|
1319
1313
|
});
|
|
1320
1314
|
var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
|
|
1321
|
-
var FontWeightValue =
|
|
1315
|
+
var FontWeightValue = z51.string();
|
|
1322
1316
|
var FontWeightTokenData = tokenAliasOrValue(FontWeightValue);
|
|
1323
|
-
var GradientType =
|
|
1324
|
-
var GradientStop =
|
|
1325
|
-
position:
|
|
1317
|
+
var GradientType = z52.enum(["Linear", "Radial", "Angular"]);
|
|
1318
|
+
var GradientStop = z52.object({
|
|
1319
|
+
position: z52.number(),
|
|
1326
1320
|
color: ColorTokenData
|
|
1327
1321
|
});
|
|
1328
|
-
var GradientLayerValue =
|
|
1322
|
+
var GradientLayerValue = z52.object({
|
|
1329
1323
|
from: Point2D,
|
|
1330
1324
|
to: Point2D,
|
|
1331
1325
|
type: GradientType,
|
|
1332
|
-
aspectRatio: nullishToOptional(
|
|
1326
|
+
aspectRatio: nullishToOptional(z52.number()),
|
|
1333
1327
|
// z.number(),
|
|
1334
|
-
stops:
|
|
1328
|
+
stops: z52.array(GradientStop).min(2)
|
|
1335
1329
|
});
|
|
1336
1330
|
var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
1337
|
-
var GradientTokenValue =
|
|
1331
|
+
var GradientTokenValue = z52.array(GradientLayerData);
|
|
1338
1332
|
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
1339
|
-
var DocumentationGroupBehavior =
|
|
1340
|
-
var ElementGroupDataDeprecated =
|
|
1333
|
+
var DocumentationGroupBehavior = z53.enum(["Group", "Tabs"]);
|
|
1334
|
+
var ElementGroupDataDeprecated = z53.object({
|
|
1341
1335
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1342
1336
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1343
1337
|
});
|
|
1344
|
-
var ElementGroupDataV2 =
|
|
1338
|
+
var ElementGroupDataV2 = z53.object({
|
|
1345
1339
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1346
1340
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1347
1341
|
});
|
|
1348
|
-
var ElementGroupElementData =
|
|
1342
|
+
var ElementGroupElementData = z53.object({
|
|
1349
1343
|
value: ElementGroupDataDeprecated.optional(),
|
|
1350
1344
|
valueV2: ElementGroupDataV2.optional()
|
|
1351
1345
|
});
|
|
1352
|
-
var LetterSpacingUnit =
|
|
1353
|
-
var LetterSpacingValue =
|
|
1346
|
+
var LetterSpacingUnit = z54.enum(["Pixels", "Rem", "Percent"]);
|
|
1347
|
+
var LetterSpacingValue = z54.object({
|
|
1354
1348
|
unit: LetterSpacingUnit,
|
|
1355
|
-
measure:
|
|
1349
|
+
measure: z54.number()
|
|
1356
1350
|
});
|
|
1357
1351
|
var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
|
|
1358
|
-
var LineHeightUnit =
|
|
1359
|
-
var LineHeightValue =
|
|
1352
|
+
var LineHeightUnit = z55.enum(["Pixels", "Rem", "Percent", "Raw"]);
|
|
1353
|
+
var LineHeightValue = z55.object({
|
|
1360
1354
|
unit: LineHeightUnit,
|
|
1361
|
-
measure:
|
|
1355
|
+
measure: z55.number()
|
|
1362
1356
|
});
|
|
1363
1357
|
var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
|
|
1364
|
-
var ParagraphIndentUnit =
|
|
1365
|
-
var ParagraphIndentValue =
|
|
1358
|
+
var ParagraphIndentUnit = z56.enum(["Pixels", "Rem", "Percent"]);
|
|
1359
|
+
var ParagraphIndentValue = z56.object({
|
|
1366
1360
|
unit: ParagraphIndentUnit,
|
|
1367
|
-
measure:
|
|
1361
|
+
measure: z56.number()
|
|
1368
1362
|
});
|
|
1369
1363
|
var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
|
|
1370
|
-
var ParagraphSpacingUnit =
|
|
1371
|
-
var ParagraphSpacingValue =
|
|
1364
|
+
var ParagraphSpacingUnit = z57.enum(["Pixels", "Rem", "Percent"]);
|
|
1365
|
+
var ParagraphSpacingValue = z57.object({
|
|
1372
1366
|
unit: ParagraphSpacingUnit,
|
|
1373
|
-
measure:
|
|
1367
|
+
measure: z57.number()
|
|
1374
1368
|
});
|
|
1375
1369
|
var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
|
|
1376
|
-
var ProductCopyValue =
|
|
1370
|
+
var ProductCopyValue = z58.string();
|
|
1377
1371
|
var ProductCopyTokenData = tokenAliasOrValue(ProductCopyValue);
|
|
1372
|
+
var RESERVED_OBJECT_ID_PREFIX = "x-sn-reserved-";
|
|
1373
|
+
var SafeIdSchema = z59.string().refine(
|
|
1374
|
+
(value) => {
|
|
1375
|
+
return !value.startsWith(RESERVED_OBJECT_ID_PREFIX);
|
|
1376
|
+
},
|
|
1377
|
+
{
|
|
1378
|
+
message: `ID value can't start with ${RESERVED_OBJECT_ID_PREFIX}`
|
|
1379
|
+
}
|
|
1380
|
+
);
|
|
1378
1381
|
var ShadowType = z60.enum(["Drop", "Inner"]);
|
|
1379
1382
|
var ShadowLayerValue = z60.object({
|
|
1380
1383
|
color: ColorTokenData,
|
|
@@ -2141,172 +2144,247 @@ var DocumentationPageGroup = z93.object({
|
|
|
2141
2144
|
createdAt: z93.coerce.date(),
|
|
2142
2145
|
updatedAt: z93.coerce.date()
|
|
2143
2146
|
});
|
|
2144
|
-
var
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
});
|
|
2158
|
-
var
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
});
|
|
2165
|
-
var
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2147
|
+
var DocumentationLinkPreview = z94.object({
|
|
2148
|
+
title: z94.string().optional(),
|
|
2149
|
+
description: z94.string().optional(),
|
|
2150
|
+
thumbnailUrl: z94.string().optional()
|
|
2151
|
+
});
|
|
2152
|
+
var DocumentationPageContentBackup = z95.object({
|
|
2153
|
+
id: z95.string(),
|
|
2154
|
+
designSystemVersionId: z95.string(),
|
|
2155
|
+
createdAt: z95.coerce.date(),
|
|
2156
|
+
updatedAt: z95.coerce.date(),
|
|
2157
|
+
documentationPageId: z95.string(),
|
|
2158
|
+
documentationPageName: z95.string(),
|
|
2159
|
+
storagePath: z95.string()
|
|
2160
|
+
});
|
|
2161
|
+
var DocumentationPageContentItem = z96.discriminatedUnion("type", [
|
|
2162
|
+
PageBlockEditorModelV2,
|
|
2163
|
+
PageSectionEditorModelV2
|
|
2164
|
+
]);
|
|
2165
|
+
var DocumentationPageContentData = z96.object({
|
|
2166
|
+
items: z96.array(DocumentationPageContentItem)
|
|
2167
|
+
});
|
|
2168
|
+
var DocumentationPageContent = z96.object({
|
|
2169
|
+
id: z96.string(),
|
|
2170
|
+
designSystemVersionId: z96.string(),
|
|
2171
|
+
createdAt: z96.coerce.date(),
|
|
2172
|
+
updatedAt: z96.coerce.date(),
|
|
2173
|
+
documentationPageId: z96.string(),
|
|
2174
|
+
data: DocumentationPageContentData,
|
|
2175
|
+
isDirty: z96.boolean()
|
|
2176
|
+
});
|
|
2177
|
+
var DocumentationPage = z97.object({
|
|
2178
|
+
type: z97.literal("DocumentationPage"),
|
|
2179
|
+
id: z97.string(),
|
|
2180
|
+
persistentId: z97.string(),
|
|
2181
|
+
shortPersistentId: z97.string(),
|
|
2182
|
+
designSystemVersionId: z97.string(),
|
|
2183
|
+
parentPersistentId: z97.string().nullish(),
|
|
2184
|
+
sortOrder: z97.number(),
|
|
2185
|
+
title: z97.string(),
|
|
2186
|
+
slug: z97.string(),
|
|
2187
|
+
userSlug: z97.string().nullish(),
|
|
2188
|
+
createdAt: z97.coerce.date(),
|
|
2189
|
+
updatedAt: z97.coerce.date()
|
|
2190
|
+
});
|
|
2191
|
+
var DesignSystemVersionRoom = Entity.extend({
|
|
2192
|
+
designSystemVersionId: z98.string(),
|
|
2193
|
+
liveblocksId: z98.string()
|
|
2194
|
+
});
|
|
2195
|
+
var DesignSystemVersionRoomInitialState = z98.object({
|
|
2196
|
+
pages: z98.array(DocumentationPageV2),
|
|
2197
|
+
groups: z98.array(ElementGroup)
|
|
2198
|
+
});
|
|
2199
|
+
var DesignSystemVersionRoomUpdate = DesignSystemVersionRoomInitialState.extend({
|
|
2200
|
+
deletedPageIds: z98.array(z98.string()),
|
|
2201
|
+
deletedGroupIds: z98.array(z98.string())
|
|
2202
|
+
});
|
|
2203
|
+
var DocumentationPageRoom = Entity.extend({
|
|
2204
|
+
designSystemVersionId: z99.string(),
|
|
2205
|
+
documentationPageId: z99.string(),
|
|
2206
|
+
liveblocksId: z99.string(),
|
|
2207
|
+
isDirty: z99.boolean()
|
|
2208
|
+
});
|
|
2209
|
+
var DocumentationPageRoomState = z99.object({
|
|
2210
|
+
pageItems: z99.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
2211
|
+
itemConfiguration: DocumentationItemConfigurationV2
|
|
2212
|
+
});
|
|
2213
|
+
var DocumentationPageRoomRoomUpdate = z99.object({
|
|
2214
|
+
page: DocumentationPageV2,
|
|
2215
|
+
pageParent: ElementGroup
|
|
2216
|
+
});
|
|
2217
|
+
var DocumentationPageRoomInitialStateUpdate = DocumentationPageRoomRoomUpdate.extend({
|
|
2218
|
+
pageItems: z99.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
2219
|
+
blockDefinitions: z99.array(PageBlockDefinition)
|
|
2220
|
+
});
|
|
2221
|
+
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
2222
|
+
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
2223
|
+
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
2224
|
+
return RoomTypeEnum2;
|
|
2225
|
+
})(RoomTypeEnum || {});
|
|
2226
|
+
var RoomTypeSchema = z100.nativeEnum(RoomTypeEnum);
|
|
2227
|
+
var RoomType = RoomTypeSchema.enum;
|
|
2228
|
+
var NpmRegistryAuthType = z101.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
2229
|
+
var NpmRegistryType = z101.enum(["NPMJS", "GitHub", "AzureDevOps", "Artifactory", "Custom"]);
|
|
2230
|
+
var NpmRegistryBasicAuthConfig = z101.object({
|
|
2231
|
+
authType: z101.literal(NpmRegistryAuthType.Enum.Basic),
|
|
2232
|
+
username: z101.string(),
|
|
2233
|
+
password: z101.string()
|
|
2234
|
+
});
|
|
2235
|
+
var NpmRegistryBearerAuthConfig = z101.object({
|
|
2236
|
+
authType: z101.literal(NpmRegistryAuthType.Enum.Bearer),
|
|
2237
|
+
accessToken: z101.string()
|
|
2238
|
+
});
|
|
2239
|
+
var NpmRegistryNoAuthConfig = z101.object({
|
|
2240
|
+
authType: z101.literal(NpmRegistryAuthType.Enum.None)
|
|
2241
|
+
});
|
|
2242
|
+
var NpmRegistrCustomAuthConfig = z101.object({
|
|
2243
|
+
authType: z101.literal(NpmRegistryAuthType.Enum.Custom),
|
|
2244
|
+
authHeaderName: z101.string(),
|
|
2245
|
+
authHeaderValue: z101.string()
|
|
2246
|
+
});
|
|
2247
|
+
var NpmRegistryAuthConfig = z101.discriminatedUnion("authType", [
|
|
2178
2248
|
NpmRegistryBasicAuthConfig,
|
|
2179
2249
|
NpmRegistryBearerAuthConfig,
|
|
2180
2250
|
NpmRegistryNoAuthConfig,
|
|
2181
2251
|
NpmRegistrCustomAuthConfig
|
|
2182
2252
|
]);
|
|
2183
|
-
var NpmRegistryConfigBase =
|
|
2253
|
+
var NpmRegistryConfigBase = z101.object({
|
|
2184
2254
|
registryType: NpmRegistryType,
|
|
2185
|
-
enabledScopes:
|
|
2186
|
-
customRegistryUrl:
|
|
2187
|
-
bypassProxy:
|
|
2188
|
-
npmProxyRegistryConfigId:
|
|
2189
|
-
npmProxyVersion:
|
|
2255
|
+
enabledScopes: z101.array(z101.string()),
|
|
2256
|
+
customRegistryUrl: z101.string().optional(),
|
|
2257
|
+
bypassProxy: z101.boolean().default(false),
|
|
2258
|
+
npmProxyRegistryConfigId: z101.string().optional(),
|
|
2259
|
+
npmProxyVersion: z101.number().optional()
|
|
2190
2260
|
});
|
|
2191
2261
|
var NpmRegistryConfig = NpmRegistryConfigBase.and(NpmRegistryAuthConfig);
|
|
2192
|
-
var SsoProvider =
|
|
2193
|
-
providerId:
|
|
2194
|
-
defaultAutoInviteValue:
|
|
2195
|
-
autoInviteDomains:
|
|
2196
|
-
skipDocsSupernovaLogin:
|
|
2197
|
-
areInvitesDisabled:
|
|
2198
|
-
isTestMode:
|
|
2199
|
-
emailDomains:
|
|
2200
|
-
metadataXml:
|
|
2201
|
-
});
|
|
2202
|
-
var WorkspaceRoleSchema =
|
|
2262
|
+
var SsoProvider = z102.object({
|
|
2263
|
+
providerId: z102.string(),
|
|
2264
|
+
defaultAutoInviteValue: z102.boolean(),
|
|
2265
|
+
autoInviteDomains: z102.record(z102.string(), z102.boolean()),
|
|
2266
|
+
skipDocsSupernovaLogin: z102.boolean(),
|
|
2267
|
+
areInvitesDisabled: z102.boolean(),
|
|
2268
|
+
isTestMode: z102.boolean(),
|
|
2269
|
+
emailDomains: z102.array(z102.string()),
|
|
2270
|
+
metadataXml: z102.string().nullish()
|
|
2271
|
+
});
|
|
2272
|
+
var WorkspaceRoleSchema = z103.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest"]);
|
|
2203
2273
|
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
2204
2274
|
var MAX_MEMBERS_COUNT = 100;
|
|
2205
|
-
var UserInvite =
|
|
2206
|
-
email:
|
|
2275
|
+
var UserInvite = z104.object({
|
|
2276
|
+
email: z104.string().email().trim().transform((value) => value.toLowerCase()),
|
|
2207
2277
|
role: WorkspaceRoleSchema
|
|
2208
2278
|
});
|
|
2209
|
-
var UserInvites =
|
|
2210
|
-
var
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
})
|
|
2220
|
-
var
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2279
|
+
var UserInvites = z104.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
2280
|
+
var isValidCIDR = (value) => {
|
|
2281
|
+
return IPCIDR.isValidAddress(value);
|
|
2282
|
+
};
|
|
2283
|
+
var WorkspaceIpWhitelistEntry = z105.object({
|
|
2284
|
+
isEnabled: z105.boolean(),
|
|
2285
|
+
name: z105.string(),
|
|
2286
|
+
range: z105.string().refine(isValidCIDR, {
|
|
2287
|
+
message: "Invalid IP CIDR"
|
|
2288
|
+
})
|
|
2289
|
+
});
|
|
2290
|
+
var WorkspaceIpSettings = z105.object({
|
|
2291
|
+
isEnabledForCloud: z105.boolean(),
|
|
2292
|
+
isEnabledForDocs: z105.boolean(),
|
|
2293
|
+
entries: z105.array(WorkspaceIpWhitelistEntry)
|
|
2294
|
+
});
|
|
2295
|
+
var WorkspaceProfile = z105.object({
|
|
2296
|
+
name: z105.string(),
|
|
2297
|
+
handle: z105.string(),
|
|
2298
|
+
color: z105.string(),
|
|
2299
|
+
avatar: nullishToOptional(z105.string()),
|
|
2225
2300
|
billingDetails: nullishToOptional(BillingDetails)
|
|
2226
2301
|
});
|
|
2227
|
-
var Workspace =
|
|
2228
|
-
id:
|
|
2302
|
+
var Workspace = z105.object({
|
|
2303
|
+
id: z105.string(),
|
|
2229
2304
|
profile: WorkspaceProfile,
|
|
2230
2305
|
subscription: Subscription,
|
|
2231
|
-
ipWhitelist: WorkspaceIpSettings,
|
|
2232
|
-
sso: SsoProvider
|
|
2233
|
-
npmRegistrySettings:
|
|
2234
|
-
designSystems:
|
|
2306
|
+
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
2307
|
+
sso: nullishToOptional(SsoProvider),
|
|
2308
|
+
npmRegistrySettings: nullishToOptional(NpmRegistryConfig),
|
|
2309
|
+
designSystems: z105.array(DesignSystem).nullish()
|
|
2235
2310
|
});
|
|
2236
|
-
var WorkspaceWithDesignSystems =
|
|
2311
|
+
var WorkspaceWithDesignSystems = z105.object({
|
|
2237
2312
|
workspace: Workspace,
|
|
2238
|
-
designSystems:
|
|
2313
|
+
designSystems: z105.array(DesignSystem)
|
|
2239
2314
|
});
|
|
2240
|
-
var WorkspaceContext =
|
|
2241
|
-
workspaceId:
|
|
2315
|
+
var WorkspaceContext = z106.object({
|
|
2316
|
+
workspaceId: z106.string(),
|
|
2242
2317
|
product: ProductCodeSchema,
|
|
2243
|
-
ipWhitelist: WorkspaceIpSettings,
|
|
2244
|
-
publicDesignSystem:
|
|
2318
|
+
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
2319
|
+
publicDesignSystem: z106.boolean().optional()
|
|
2245
2320
|
});
|
|
2246
2321
|
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
2247
2322
|
var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
2248
2323
|
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
2249
2324
|
var HANDLE_MIN_LENGTH = 2;
|
|
2250
2325
|
var HANDLE_MAX_LENGTH = 64;
|
|
2251
|
-
var CreateWorkspaceInput =
|
|
2252
|
-
name:
|
|
2326
|
+
var CreateWorkspaceInput = z107.object({
|
|
2327
|
+
name: z107.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
2253
2328
|
product: ProductCodeSchema,
|
|
2254
|
-
priceId:
|
|
2255
|
-
billingEmail:
|
|
2256
|
-
handle:
|
|
2329
|
+
priceId: z107.string(),
|
|
2330
|
+
billingEmail: z107.string().email().optional(),
|
|
2331
|
+
handle: z107.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => value?.length > 0).optional(),
|
|
2257
2332
|
invites: UserInvites.optional(),
|
|
2258
|
-
promoCode:
|
|
2333
|
+
promoCode: z107.string().optional(),
|
|
2259
2334
|
status: InternalStatusSchema.optional(),
|
|
2260
2335
|
planInterval: BillingIntervalSchema.optional(),
|
|
2261
|
-
seats:
|
|
2262
|
-
seatLimit:
|
|
2263
|
-
card: CardSchema.optional()
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2336
|
+
seats: z107.number().optional(),
|
|
2337
|
+
seatLimit: z107.number().optional(),
|
|
2338
|
+
card: CardSchema.optional(),
|
|
2339
|
+
sso: SsoProvider.optional(),
|
|
2340
|
+
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
2341
|
+
ipWhitelist: WorkspaceIpSettings.optional()
|
|
2342
|
+
});
|
|
2343
|
+
var WorkspaceInvitation = z108.object({
|
|
2344
|
+
id: z108.string(),
|
|
2345
|
+
email: z108.string().email(),
|
|
2346
|
+
createdAt: z108.coerce.date(),
|
|
2347
|
+
resentAt: z108.coerce.date().nullish(),
|
|
2348
|
+
role: z108.nativeEnum(WorkspaceRole),
|
|
2349
|
+
workspaceId: z108.string(),
|
|
2350
|
+
invitedBy: z108.string()
|
|
2351
|
+
});
|
|
2352
|
+
var WorkspaceMembership = z109.object({
|
|
2353
|
+
id: z109.string(),
|
|
2354
|
+
userId: z109.string(),
|
|
2355
|
+
workspaceId: z109.string(),
|
|
2356
|
+
workspaceRole: z109.nativeEnum(WorkspaceRole)
|
|
2357
|
+
});
|
|
2358
|
+
var UpdateMembershipRolesInput = z109.object({
|
|
2359
|
+
members: z109.array(
|
|
2360
|
+
z109.object({
|
|
2361
|
+
userId: z109.string(),
|
|
2362
|
+
role: z109.nativeEnum(WorkspaceRole)
|
|
2285
2363
|
})
|
|
2286
2364
|
)
|
|
2287
2365
|
});
|
|
2288
|
-
var DesignSystemSwitcher =
|
|
2289
|
-
isEnabled:
|
|
2290
|
-
designSystemIds:
|
|
2291
|
-
});
|
|
2292
|
-
var DesignSystem =
|
|
2293
|
-
id:
|
|
2294
|
-
workspaceId:
|
|
2295
|
-
name:
|
|
2296
|
-
description:
|
|
2297
|
-
docExporterId: nullishToOptional(
|
|
2298
|
-
docSlug:
|
|
2299
|
-
docUserSlug: nullishToOptional(
|
|
2300
|
-
docSlugDeprecated:
|
|
2301
|
-
isPublic:
|
|
2302
|
-
isMultibrand:
|
|
2303
|
-
docViewUrl: nullishToOptional(
|
|
2304
|
-
basePrefixes:
|
|
2366
|
+
var DesignSystemSwitcher = z110.object({
|
|
2367
|
+
isEnabled: z110.boolean(),
|
|
2368
|
+
designSystemIds: z110.array(z110.string())
|
|
2369
|
+
});
|
|
2370
|
+
var DesignSystem = z110.object({
|
|
2371
|
+
id: z110.string(),
|
|
2372
|
+
workspaceId: z110.string(),
|
|
2373
|
+
name: z110.string(),
|
|
2374
|
+
description: z110.string(),
|
|
2375
|
+
docExporterId: nullishToOptional(z110.string()),
|
|
2376
|
+
docSlug: z110.string(),
|
|
2377
|
+
docUserSlug: nullishToOptional(z110.string()),
|
|
2378
|
+
docSlugDeprecated: z110.string(),
|
|
2379
|
+
isPublic: z110.boolean(),
|
|
2380
|
+
isMultibrand: z110.boolean(),
|
|
2381
|
+
docViewUrl: nullishToOptional(z110.string()),
|
|
2382
|
+
basePrefixes: z110.array(z110.string()),
|
|
2305
2383
|
designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
|
|
2306
|
-
createdAt:
|
|
2307
|
-
updatedAt:
|
|
2384
|
+
createdAt: z110.coerce.date(),
|
|
2385
|
+
updatedAt: z110.coerce.date()
|
|
2308
2386
|
});
|
|
2309
|
-
var DesignSystemWithWorkspace =
|
|
2387
|
+
var DesignSystemWithWorkspace = z110.object({
|
|
2310
2388
|
designSystem: DesignSystem,
|
|
2311
2389
|
workspace: Workspace
|
|
2312
2390
|
});
|
|
@@ -2314,81 +2392,81 @@ var DS_NAME_MIN_LENGTH = 2;
|
|
|
2314
2392
|
var DS_NAME_MAX_LENGTH = 64;
|
|
2315
2393
|
var DS_DESC_MIN_LENGTH = 2;
|
|
2316
2394
|
var DS_DESC_MAX_LENGTH = 64;
|
|
2317
|
-
var DesignSystemCreateInputMetadata =
|
|
2318
|
-
name:
|
|
2319
|
-
description:
|
|
2395
|
+
var DesignSystemCreateInputMetadata = z111.object({
|
|
2396
|
+
name: z111.string().min(DS_NAME_MIN_LENGTH).max(DS_NAME_MAX_LENGTH).trim(),
|
|
2397
|
+
description: z111.string().min(DS_DESC_MIN_LENGTH).max(DS_DESC_MAX_LENGTH).trim()
|
|
2320
2398
|
});
|
|
2321
|
-
var DesignSystemCreateInput =
|
|
2399
|
+
var DesignSystemCreateInput = z111.object({
|
|
2322
2400
|
meta: DesignSystemCreateInputMetadata,
|
|
2323
|
-
workspaceId:
|
|
2324
|
-
isPublic:
|
|
2325
|
-
basePrefixes:
|
|
2326
|
-
docUserSlug:
|
|
2327
|
-
source:
|
|
2401
|
+
workspaceId: z111.string(),
|
|
2402
|
+
isPublic: z111.boolean().optional(),
|
|
2403
|
+
basePrefixes: z111.array(z111.string()).optional(),
|
|
2404
|
+
docUserSlug: z111.string().nullish().optional(),
|
|
2405
|
+
source: z111.array(z111.string()).optional()
|
|
2328
2406
|
});
|
|
2329
2407
|
var DS_NAME_MIN_LENGTH2 = 2;
|
|
2330
2408
|
var DS_NAME_MAX_LENGTH2 = 64;
|
|
2331
2409
|
var DS_DESC_MIN_LENGTH2 = 2;
|
|
2332
2410
|
var DS_DESC_MAX_LENGTH2 = 64;
|
|
2333
|
-
var DesignSystemUpdateInputMetadata =
|
|
2334
|
-
name:
|
|
2335
|
-
description:
|
|
2411
|
+
var DesignSystemUpdateInputMetadata = z112.object({
|
|
2412
|
+
name: z112.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2413
|
+
description: z112.string().min(DS_DESC_MIN_LENGTH2).max(DS_DESC_MAX_LENGTH2).trim().optional()
|
|
2336
2414
|
});
|
|
2337
|
-
var DesignSystemUpdateInput =
|
|
2415
|
+
var DesignSystemUpdateInput = z112.object({
|
|
2338
2416
|
meta: DesignSystemUpdateInputMetadata.optional(),
|
|
2339
|
-
workspaceId:
|
|
2340
|
-
isPublic:
|
|
2341
|
-
basePrefixes:
|
|
2342
|
-
docUserSlug:
|
|
2343
|
-
source:
|
|
2344
|
-
name:
|
|
2345
|
-
description:
|
|
2346
|
-
docExporterId:
|
|
2417
|
+
workspaceId: z112.string().optional(),
|
|
2418
|
+
isPublic: z112.boolean().optional(),
|
|
2419
|
+
basePrefixes: z112.array(z112.string()).optional(),
|
|
2420
|
+
docUserSlug: z112.string().nullish().optional(),
|
|
2421
|
+
source: z112.array(z112.string()).optional(),
|
|
2422
|
+
name: z112.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2423
|
+
description: z112.string().min(DS_DESC_MIN_LENGTH2).max(DS_DESC_MAX_LENGTH2).trim().optional(),
|
|
2424
|
+
docExporterId: z112.string().optional()
|
|
2347
2425
|
});
|
|
2348
2426
|
var publishedDocEnvironments = ["Live", "Preview"];
|
|
2349
|
-
var PublishedDocEnvironment =
|
|
2350
|
-
var PublishedDocsChecksums =
|
|
2351
|
-
var PublishedDocRoutingVersion =
|
|
2352
|
-
var PublishedDoc =
|
|
2353
|
-
id:
|
|
2354
|
-
designSystemVersionId:
|
|
2355
|
-
createdAt:
|
|
2356
|
-
updatedAt:
|
|
2357
|
-
lastPublishedAt:
|
|
2358
|
-
isDefault:
|
|
2359
|
-
isPublic:
|
|
2427
|
+
var PublishedDocEnvironment = z113.enum(publishedDocEnvironments);
|
|
2428
|
+
var PublishedDocsChecksums = z113.record(z113.string());
|
|
2429
|
+
var PublishedDocRoutingVersion = z113.enum(["1", "2"]);
|
|
2430
|
+
var PublishedDoc = z113.object({
|
|
2431
|
+
id: z113.string(),
|
|
2432
|
+
designSystemVersionId: z113.string(),
|
|
2433
|
+
createdAt: z113.coerce.date(),
|
|
2434
|
+
updatedAt: z113.coerce.date(),
|
|
2435
|
+
lastPublishedAt: z113.coerce.date(),
|
|
2436
|
+
isDefault: z113.boolean(),
|
|
2437
|
+
isPublic: z113.boolean(),
|
|
2360
2438
|
environment: PublishedDocEnvironment,
|
|
2361
2439
|
checksums: PublishedDocsChecksums,
|
|
2362
|
-
storagePath:
|
|
2363
|
-
wasMigrated:
|
|
2440
|
+
storagePath: z113.string(),
|
|
2441
|
+
wasMigrated: z113.boolean(),
|
|
2364
2442
|
routingVersion: PublishedDocRoutingVersion,
|
|
2365
|
-
usesLocalizations:
|
|
2366
|
-
wasPublishedWithLocalizations:
|
|
2367
|
-
});
|
|
2368
|
-
var ExporterJobDestination =
|
|
2369
|
-
var ExporterJobStatus =
|
|
2370
|
-
var ExporterJobLogEntryType =
|
|
2371
|
-
var ExporterJobLogEntry =
|
|
2372
|
-
id:
|
|
2373
|
-
time:
|
|
2443
|
+
usesLocalizations: z113.boolean(),
|
|
2444
|
+
wasPublishedWithLocalizations: z113.boolean()
|
|
2445
|
+
});
|
|
2446
|
+
var ExporterJobDestination = z114.enum(["s3", "webhookUrl", "github", "documentation", "azure", "gitlab"]);
|
|
2447
|
+
var ExporterJobStatus = z114.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
2448
|
+
var ExporterJobLogEntryType = z114.enum(["success", "info", "warning", "error", "user"]);
|
|
2449
|
+
var ExporterJobLogEntry = z114.object({
|
|
2450
|
+
id: z114.string().optional(),
|
|
2451
|
+
time: z114.coerce.date(),
|
|
2374
2452
|
type: ExporterJobLogEntryType,
|
|
2375
|
-
message:
|
|
2453
|
+
message: z114.string()
|
|
2376
2454
|
});
|
|
2377
|
-
var ExporterJobResultPullRequestDestination =
|
|
2378
|
-
pullRequestUrl:
|
|
2455
|
+
var ExporterJobResultPullRequestDestination = z114.object({
|
|
2456
|
+
pullRequestUrl: z114.string()
|
|
2379
2457
|
});
|
|
2380
|
-
var ExporterJobResultS3Destination =
|
|
2381
|
-
bucket:
|
|
2382
|
-
urlPrefix:
|
|
2383
|
-
path:
|
|
2384
|
-
files:
|
|
2458
|
+
var ExporterJobResultS3Destination = z114.object({
|
|
2459
|
+
bucket: z114.string(),
|
|
2460
|
+
urlPrefix: z114.string().optional(),
|
|
2461
|
+
path: z114.string(),
|
|
2462
|
+
files: z114.array(z114.string())
|
|
2385
2463
|
});
|
|
2386
|
-
var ExporterJobResultDocsDestination =
|
|
2387
|
-
url:
|
|
2464
|
+
var ExporterJobResultDocsDestination = z114.object({
|
|
2465
|
+
url: z114.string()
|
|
2388
2466
|
});
|
|
2389
|
-
var ExporterJobResult =
|
|
2390
|
-
error:
|
|
2391
|
-
logs:
|
|
2467
|
+
var ExporterJobResult = z114.object({
|
|
2468
|
+
error: z114.string().optional(),
|
|
2469
|
+
logs: z114.array(ExporterJobLogEntry).optional(),
|
|
2392
2470
|
s3: ExporterJobResultS3Destination.optional(),
|
|
2393
2471
|
github: ExporterJobResultPullRequestDestination.optional(),
|
|
2394
2472
|
azure: ExporterJobResultPullRequestDestination.optional(),
|
|
@@ -2396,68 +2474,68 @@ var ExporterJobResult = z108.object({
|
|
|
2396
2474
|
bitbucket: ExporterJobResultPullRequestDestination.optional(),
|
|
2397
2475
|
sndocs: ExporterJobResultDocsDestination.optional()
|
|
2398
2476
|
});
|
|
2399
|
-
var ExporterDestinationSnDocs =
|
|
2477
|
+
var ExporterDestinationSnDocs = z114.object({
|
|
2400
2478
|
environment: PublishedDocEnvironment
|
|
2401
2479
|
});
|
|
2402
|
-
var ExporterDestinationS3 =
|
|
2403
|
-
var ExporterDestinationGithub =
|
|
2404
|
-
connectionId:
|
|
2405
|
-
url:
|
|
2406
|
-
branch:
|
|
2407
|
-
relativePath:
|
|
2480
|
+
var ExporterDestinationS3 = z114.object({});
|
|
2481
|
+
var ExporterDestinationGithub = z114.object({
|
|
2482
|
+
connectionId: z114.string(),
|
|
2483
|
+
url: z114.string(),
|
|
2484
|
+
branch: z114.string(),
|
|
2485
|
+
relativePath: z114.string(),
|
|
2408
2486
|
// +
|
|
2409
|
-
userId:
|
|
2410
|
-
});
|
|
2411
|
-
var ExporterDestinationAzure =
|
|
2412
|
-
connectionId:
|
|
2413
|
-
organizationId:
|
|
2414
|
-
projectId:
|
|
2415
|
-
repositoryId:
|
|
2416
|
-
branch:
|
|
2417
|
-
relativePath:
|
|
2487
|
+
userId: z114.coerce.string()
|
|
2488
|
+
});
|
|
2489
|
+
var ExporterDestinationAzure = z114.object({
|
|
2490
|
+
connectionId: z114.string(),
|
|
2491
|
+
organizationId: z114.string(),
|
|
2492
|
+
projectId: z114.string(),
|
|
2493
|
+
repositoryId: z114.string(),
|
|
2494
|
+
branch: z114.string(),
|
|
2495
|
+
relativePath: z114.string(),
|
|
2418
2496
|
// +
|
|
2419
|
-
userId:
|
|
2420
|
-
url:
|
|
2421
|
-
});
|
|
2422
|
-
var ExporterDestinationGitlab =
|
|
2423
|
-
connectionId:
|
|
2424
|
-
projectId:
|
|
2425
|
-
branch:
|
|
2426
|
-
relativePath:
|
|
2497
|
+
userId: z114.coerce.string(),
|
|
2498
|
+
url: z114.string()
|
|
2499
|
+
});
|
|
2500
|
+
var ExporterDestinationGitlab = z114.object({
|
|
2501
|
+
connectionId: z114.string(),
|
|
2502
|
+
projectId: z114.string(),
|
|
2503
|
+
branch: z114.string(),
|
|
2504
|
+
relativePath: z114.string(),
|
|
2427
2505
|
// +
|
|
2428
|
-
userId:
|
|
2429
|
-
url:
|
|
2506
|
+
userId: z114.coerce.string(),
|
|
2507
|
+
url: z114.string()
|
|
2430
2508
|
});
|
|
2431
2509
|
var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
|
|
2432
2510
|
var BITBUCKET_MAX_LENGTH = 64;
|
|
2433
|
-
var ExporterDestinationBitbucket =
|
|
2434
|
-
connectionId:
|
|
2435
|
-
workspaceSlug:
|
|
2436
|
-
projectKey:
|
|
2437
|
-
repoSlug:
|
|
2438
|
-
branch:
|
|
2439
|
-
relativePath:
|
|
2511
|
+
var ExporterDestinationBitbucket = z114.object({
|
|
2512
|
+
connectionId: z114.string(),
|
|
2513
|
+
workspaceSlug: z114.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2514
|
+
projectKey: z114.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2515
|
+
repoSlug: z114.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2516
|
+
branch: z114.string(),
|
|
2517
|
+
relativePath: z114.string(),
|
|
2440
2518
|
// +
|
|
2441
|
-
userId:
|
|
2442
|
-
url:
|
|
2443
|
-
});
|
|
2444
|
-
var ExporterJob =
|
|
2445
|
-
id:
|
|
2446
|
-
createdAt:
|
|
2447
|
-
finishedAt:
|
|
2448
|
-
designSystemId:
|
|
2449
|
-
designSystemVersionId:
|
|
2450
|
-
workspaceId:
|
|
2451
|
-
scheduleId:
|
|
2452
|
-
exporterId:
|
|
2453
|
-
brandId:
|
|
2454
|
-
themeId:
|
|
2455
|
-
estimatedExecutionTime:
|
|
2519
|
+
userId: z114.coerce.string(),
|
|
2520
|
+
url: z114.string()
|
|
2521
|
+
});
|
|
2522
|
+
var ExporterJob = z114.object({
|
|
2523
|
+
id: z114.coerce.string(),
|
|
2524
|
+
createdAt: z114.coerce.date(),
|
|
2525
|
+
finishedAt: z114.coerce.date().optional(),
|
|
2526
|
+
designSystemId: z114.coerce.string(),
|
|
2527
|
+
designSystemVersionId: z114.coerce.string(),
|
|
2528
|
+
workspaceId: z114.coerce.string(),
|
|
2529
|
+
scheduleId: z114.coerce.string().nullish(),
|
|
2530
|
+
exporterId: z114.coerce.string(),
|
|
2531
|
+
brandId: z114.coerce.string().optional(),
|
|
2532
|
+
themeId: z114.coerce.string().optional(),
|
|
2533
|
+
estimatedExecutionTime: z114.number().optional(),
|
|
2456
2534
|
status: ExporterJobStatus,
|
|
2457
2535
|
result: ExporterJobResult.optional(),
|
|
2458
|
-
createdByUserId:
|
|
2536
|
+
createdByUserId: z114.string().optional(),
|
|
2459
2537
|
// CodegenDestinationsModel
|
|
2460
|
-
webhookUrl:
|
|
2538
|
+
webhookUrl: z114.string().optional(),
|
|
2461
2539
|
destinationSnDocs: ExporterDestinationSnDocs.optional(),
|
|
2462
2540
|
destinationS3: ExporterDestinationS3.optional(),
|
|
2463
2541
|
destinationGithub: ExporterDestinationGithub.optional(),
|
|
@@ -2476,14 +2554,14 @@ var ExporterJobFindByFilter = ExporterJob.pick({
|
|
|
2476
2554
|
themeId: true,
|
|
2477
2555
|
brandId: true
|
|
2478
2556
|
}).extend({
|
|
2479
|
-
destinations:
|
|
2557
|
+
destinations: z114.array(ExporterJobDestination),
|
|
2480
2558
|
docsEnvironment: PublishedDocEnvironment
|
|
2481
2559
|
}).partial();
|
|
2482
|
-
var ExporterWorkspaceMembershipRole =
|
|
2483
|
-
var ExporterWorkspaceMembership =
|
|
2484
|
-
id:
|
|
2485
|
-
workspaceId:
|
|
2486
|
-
exporterId:
|
|
2560
|
+
var ExporterWorkspaceMembershipRole = z115.enum(["Owner", "OwnerArchived", "User"]);
|
|
2561
|
+
var ExporterWorkspaceMembership = z116.object({
|
|
2562
|
+
id: z116.string(),
|
|
2563
|
+
workspaceId: z116.string(),
|
|
2564
|
+
exporterId: z116.string(),
|
|
2487
2565
|
role: ExporterWorkspaceMembershipRole
|
|
2488
2566
|
});
|
|
2489
2567
|
var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
@@ -2493,8 +2571,8 @@ var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
|
2493
2571
|
GitProviderNames2["Bitbucket"] = "bitbucket";
|
|
2494
2572
|
return GitProviderNames2;
|
|
2495
2573
|
})(GitProviderNames || {});
|
|
2496
|
-
var GitProvider =
|
|
2497
|
-
var PulsarPropertyType =
|
|
2574
|
+
var GitProvider = z117.nativeEnum(GitProviderNames);
|
|
2575
|
+
var PulsarPropertyType = z118.enum([
|
|
2498
2576
|
"string",
|
|
2499
2577
|
"number",
|
|
2500
2578
|
"boolean",
|
|
@@ -2507,164 +2585,164 @@ var PulsarPropertyType = z112.enum([
|
|
|
2507
2585
|
"tokenProperties",
|
|
2508
2586
|
"tokenType"
|
|
2509
2587
|
]);
|
|
2510
|
-
var PulsarBaseProperty =
|
|
2511
|
-
label:
|
|
2512
|
-
key:
|
|
2513
|
-
description:
|
|
2588
|
+
var PulsarBaseProperty = z118.object({
|
|
2589
|
+
label: z118.string(),
|
|
2590
|
+
key: z118.string(),
|
|
2591
|
+
description: z118.string().nullish(),
|
|
2514
2592
|
type: PulsarPropertyType,
|
|
2515
|
-
values:
|
|
2516
|
-
default:
|
|
2593
|
+
values: z118.array(z118.string()).nullish(),
|
|
2594
|
+
default: z118.union([z118.string(), z118.boolean(), z118.number()]).nullish(),
|
|
2517
2595
|
// PulsarPropertyValueType //is optional?
|
|
2518
|
-
inputType:
|
|
2596
|
+
inputType: z118.enum(["code", "plain"]).optional(),
|
|
2519
2597
|
//is optional?
|
|
2520
|
-
isMultiline:
|
|
2598
|
+
isMultiline: z118.boolean().nullish()
|
|
2521
2599
|
});
|
|
2522
2600
|
var PulsarContributionConfigurationProperty = PulsarBaseProperty.extend({
|
|
2523
|
-
category:
|
|
2524
|
-
});
|
|
2525
|
-
var PulsarContributionVariant =
|
|
2526
|
-
key:
|
|
2527
|
-
name:
|
|
2528
|
-
isDefault:
|
|
2529
|
-
description:
|
|
2530
|
-
thumbnailURL:
|
|
2531
|
-
});
|
|
2532
|
-
var PulsarCustomBlock =
|
|
2533
|
-
title:
|
|
2534
|
-
key:
|
|
2535
|
-
category:
|
|
2536
|
-
description: nullishToOptional(
|
|
2537
|
-
iconURL:
|
|
2538
|
-
mode:
|
|
2539
|
-
properties:
|
|
2540
|
-
});
|
|
2541
|
-
var ExporterType =
|
|
2542
|
-
var ExporterSource =
|
|
2543
|
-
var ExporterTag =
|
|
2544
|
-
var ExporterDetails =
|
|
2545
|
-
description:
|
|
2546
|
-
version:
|
|
2547
|
-
routingVersion: nullishToOptional(
|
|
2548
|
-
author: nullishToOptional(
|
|
2549
|
-
organization: nullishToOptional(
|
|
2550
|
-
homepage: nullishToOptional(
|
|
2551
|
-
readme: nullishToOptional(
|
|
2552
|
-
tags: nullishToOptional(
|
|
2553
|
-
packageId: nullishToOptional(
|
|
2554
|
-
iconURL: nullishToOptional(
|
|
2555
|
-
configurationProperties: nullishToOptional(
|
|
2556
|
-
customBlocks: nullishToOptional(
|
|
2557
|
-
blockVariants: nullishToOptional(
|
|
2558
|
-
usesBrands: nullishToOptional(
|
|
2559
|
-
usesThemes: nullishToOptional(
|
|
2601
|
+
category: z118.string()
|
|
2602
|
+
});
|
|
2603
|
+
var PulsarContributionVariant = z118.object({
|
|
2604
|
+
key: z118.string(),
|
|
2605
|
+
name: z118.string(),
|
|
2606
|
+
isDefault: nullishToOptional(z118.boolean()),
|
|
2607
|
+
description: nullishToOptional(z118.string()),
|
|
2608
|
+
thumbnailURL: nullishToOptional(z118.string())
|
|
2609
|
+
});
|
|
2610
|
+
var PulsarCustomBlock = z118.object({
|
|
2611
|
+
title: z118.string(),
|
|
2612
|
+
key: z118.string(),
|
|
2613
|
+
category: z118.string(),
|
|
2614
|
+
description: nullishToOptional(z118.string()),
|
|
2615
|
+
iconURL: z118.string(),
|
|
2616
|
+
mode: z118.enum(["array", "block"]),
|
|
2617
|
+
properties: z118.array(PulsarBaseProperty)
|
|
2618
|
+
});
|
|
2619
|
+
var ExporterType = z119.enum(["code", "documentation"]);
|
|
2620
|
+
var ExporterSource = z119.enum(["git", "upload"]);
|
|
2621
|
+
var ExporterTag = z119.string().regex(/^[0-9a-zA-Z]+(\s[0-9a-zA-Z]+)*$/);
|
|
2622
|
+
var ExporterDetails = z119.object({
|
|
2623
|
+
description: z119.string(),
|
|
2624
|
+
version: z119.string(),
|
|
2625
|
+
routingVersion: nullishToOptional(z119.string()),
|
|
2626
|
+
author: nullishToOptional(z119.string()),
|
|
2627
|
+
organization: nullishToOptional(z119.string()),
|
|
2628
|
+
homepage: nullishToOptional(z119.string()),
|
|
2629
|
+
readme: nullishToOptional(z119.string()),
|
|
2630
|
+
tags: nullishToOptional(z119.array(ExporterTag)).default([]),
|
|
2631
|
+
packageId: nullishToOptional(z119.string().max(255)),
|
|
2632
|
+
iconURL: nullishToOptional(z119.string()),
|
|
2633
|
+
configurationProperties: nullishToOptional(z119.array(PulsarContributionConfigurationProperty)).default([]),
|
|
2634
|
+
customBlocks: nullishToOptional(z119.array(PulsarCustomBlock)).default([]),
|
|
2635
|
+
blockVariants: nullishToOptional(z119.record(z119.string(), z119.array(PulsarContributionVariant))).default({}),
|
|
2636
|
+
usesBrands: nullishToOptional(z119.boolean()).default(false),
|
|
2637
|
+
usesThemes: nullishToOptional(z119.boolean()).default(false),
|
|
2560
2638
|
source: ExporterSource,
|
|
2561
2639
|
gitProvider: nullishToOptional(GitProvider),
|
|
2562
|
-
gitUrl: nullishToOptional(
|
|
2563
|
-
gitBranch: nullishToOptional(
|
|
2564
|
-
gitDirectory: nullishToOptional(
|
|
2640
|
+
gitUrl: nullishToOptional(z119.string()),
|
|
2641
|
+
gitBranch: nullishToOptional(z119.string()),
|
|
2642
|
+
gitDirectory: nullishToOptional(z119.string())
|
|
2565
2643
|
});
|
|
2566
|
-
var Exporter =
|
|
2567
|
-
id:
|
|
2568
|
-
createdAt:
|
|
2569
|
-
name:
|
|
2570
|
-
isPrivate:
|
|
2644
|
+
var Exporter = z119.object({
|
|
2645
|
+
id: z119.string(),
|
|
2646
|
+
createdAt: z119.coerce.date(),
|
|
2647
|
+
name: z119.string(),
|
|
2648
|
+
isPrivate: z119.boolean(),
|
|
2571
2649
|
details: ExporterDetails,
|
|
2572
2650
|
exporterType: nullishToOptional(ExporterType).default("code"),
|
|
2573
|
-
storagePath: nullishToOptional(
|
|
2574
|
-
});
|
|
2575
|
-
var CustomDomain =
|
|
2576
|
-
id:
|
|
2577
|
-
designSystemId:
|
|
2578
|
-
state:
|
|
2579
|
-
supernovaDomain:
|
|
2580
|
-
customerDomain:
|
|
2581
|
-
error:
|
|
2582
|
-
errorCode:
|
|
2583
|
-
});
|
|
2584
|
-
var IntegrationAuthType =
|
|
2585
|
-
var ExternalServiceType =
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2651
|
+
storagePath: nullishToOptional(z119.string()).default("")
|
|
2652
|
+
});
|
|
2653
|
+
var CustomDomain = z120.object({
|
|
2654
|
+
id: z120.string(),
|
|
2655
|
+
designSystemId: z120.string(),
|
|
2656
|
+
state: z120.string(),
|
|
2657
|
+
supernovaDomain: z120.string(),
|
|
2658
|
+
customerDomain: z120.string().nullish(),
|
|
2659
|
+
error: z120.string().nullish(),
|
|
2660
|
+
errorCode: z120.string().nullish()
|
|
2661
|
+
});
|
|
2662
|
+
var IntegrationAuthType = z121.union([z121.literal("OAuth2"), z121.literal("PAT")]);
|
|
2663
|
+
var ExternalServiceType = z121.union([
|
|
2664
|
+
z121.literal("figma"),
|
|
2665
|
+
z121.literal("github"),
|
|
2666
|
+
z121.literal("azure"),
|
|
2667
|
+
z121.literal("gitlab"),
|
|
2668
|
+
z121.literal("bitbucket")
|
|
2591
2669
|
]);
|
|
2592
|
-
var IntegrationUserInfo =
|
|
2593
|
-
id:
|
|
2594
|
-
handle:
|
|
2595
|
-
avatarUrl:
|
|
2596
|
-
email:
|
|
2670
|
+
var IntegrationUserInfo = z121.object({
|
|
2671
|
+
id: z121.string(),
|
|
2672
|
+
handle: z121.string().optional(),
|
|
2673
|
+
avatarUrl: z121.string().optional(),
|
|
2674
|
+
email: z121.string().optional(),
|
|
2597
2675
|
authType: IntegrationAuthType.optional(),
|
|
2598
|
-
customUrl:
|
|
2676
|
+
customUrl: z121.string().optional()
|
|
2599
2677
|
});
|
|
2600
|
-
var UserLinkedIntegrations =
|
|
2678
|
+
var UserLinkedIntegrations = z121.object({
|
|
2601
2679
|
figma: IntegrationUserInfo.optional(),
|
|
2602
2680
|
github: IntegrationUserInfo.array().optional(),
|
|
2603
2681
|
azure: IntegrationUserInfo.array().optional(),
|
|
2604
2682
|
gitlab: IntegrationUserInfo.array().optional(),
|
|
2605
2683
|
bitbucket: IntegrationUserInfo.array().optional()
|
|
2606
2684
|
});
|
|
2607
|
-
var UserIdentity =
|
|
2608
|
-
id:
|
|
2609
|
-
userId:
|
|
2610
|
-
});
|
|
2611
|
-
var UserOnboardingDepartment =
|
|
2612
|
-
var UserOnboardingJobLevel =
|
|
2613
|
-
var UserOnboarding =
|
|
2614
|
-
companyName:
|
|
2615
|
-
numberOfPeopleInOrg:
|
|
2616
|
-
numberOfPeopleInDesignTeam:
|
|
2685
|
+
var UserIdentity = z122.object({
|
|
2686
|
+
id: z122.string(),
|
|
2687
|
+
userId: z122.string()
|
|
2688
|
+
});
|
|
2689
|
+
var UserOnboardingDepartment = z123.enum(["Design", "Engineering", "Brand", "Other"]);
|
|
2690
|
+
var UserOnboardingJobLevel = z123.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
2691
|
+
var UserOnboarding = z123.object({
|
|
2692
|
+
companyName: z123.string().optional(),
|
|
2693
|
+
numberOfPeopleInOrg: z123.string().optional(),
|
|
2694
|
+
numberOfPeopleInDesignTeam: z123.string().optional(),
|
|
2617
2695
|
department: UserOnboardingDepartment.optional(),
|
|
2618
|
-
jobTitle:
|
|
2619
|
-
phase:
|
|
2696
|
+
jobTitle: z123.string().optional(),
|
|
2697
|
+
phase: z123.string().optional(),
|
|
2620
2698
|
jobLevel: UserOnboardingJobLevel.optional()
|
|
2621
2699
|
});
|
|
2622
|
-
var UserProfile =
|
|
2623
|
-
name:
|
|
2624
|
-
avatar:
|
|
2625
|
-
nickname:
|
|
2700
|
+
var UserProfile = z123.object({
|
|
2701
|
+
name: z123.string(),
|
|
2702
|
+
avatar: z123.string().optional(),
|
|
2703
|
+
nickname: z123.string().optional(),
|
|
2626
2704
|
onboarding: UserOnboarding.optional()
|
|
2627
2705
|
});
|
|
2628
|
-
var User =
|
|
2629
|
-
id:
|
|
2630
|
-
email:
|
|
2631
|
-
emailVerified:
|
|
2632
|
-
createdAt:
|
|
2633
|
-
trialExpiresAt:
|
|
2706
|
+
var User = z124.object({
|
|
2707
|
+
id: z124.string(),
|
|
2708
|
+
email: z124.string(),
|
|
2709
|
+
emailVerified: z124.boolean(),
|
|
2710
|
+
createdAt: z124.coerce.date(),
|
|
2711
|
+
trialExpiresAt: z124.coerce.date().optional(),
|
|
2634
2712
|
profile: UserProfile,
|
|
2635
2713
|
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
2636
|
-
loggedOutAt:
|
|
2637
|
-
isProtected:
|
|
2714
|
+
loggedOutAt: z124.coerce.date().optional(),
|
|
2715
|
+
isProtected: z124.boolean()
|
|
2638
2716
|
});
|
|
2639
|
-
var NpmProxyToken =
|
|
2640
|
-
access:
|
|
2641
|
-
expiresAt:
|
|
2717
|
+
var NpmProxyToken = z125.object({
|
|
2718
|
+
access: z125.string(),
|
|
2719
|
+
expiresAt: z125.number()
|
|
2642
2720
|
});
|
|
2643
|
-
var SessionData =
|
|
2644
|
-
returnToUrl:
|
|
2721
|
+
var SessionData = z125.object({
|
|
2722
|
+
returnToUrl: z125.string().optional(),
|
|
2645
2723
|
npmProxyToken: NpmProxyToken.optional()
|
|
2646
2724
|
});
|
|
2647
|
-
var Session =
|
|
2648
|
-
id:
|
|
2649
|
-
expiresAt:
|
|
2650
|
-
userId:
|
|
2725
|
+
var Session = z125.object({
|
|
2726
|
+
id: z125.string(),
|
|
2727
|
+
expiresAt: z125.coerce.date(),
|
|
2728
|
+
userId: z125.string().nullable(),
|
|
2651
2729
|
data: SessionData
|
|
2652
2730
|
});
|
|
2653
|
-
var AuthTokens =
|
|
2654
|
-
access:
|
|
2655
|
-
refresh:
|
|
2731
|
+
var AuthTokens = z125.object({
|
|
2732
|
+
access: z125.string(),
|
|
2733
|
+
refresh: z125.string()
|
|
2656
2734
|
});
|
|
2657
|
-
var UserSession =
|
|
2735
|
+
var UserSession = z125.object({
|
|
2658
2736
|
session: Session,
|
|
2659
2737
|
user: User.nullable()
|
|
2660
2738
|
});
|
|
2661
|
-
var FlaggedFeature =
|
|
2662
|
-
var FeatureFlagMap =
|
|
2663
|
-
var FeatureFlag =
|
|
2664
|
-
id:
|
|
2739
|
+
var FlaggedFeature = z126.enum(["FigmaImporterV2"]);
|
|
2740
|
+
var FeatureFlagMap = z126.record(FlaggedFeature, z126.boolean());
|
|
2741
|
+
var FeatureFlag = z126.object({
|
|
2742
|
+
id: z126.string(),
|
|
2665
2743
|
feature: FlaggedFeature,
|
|
2666
|
-
createdAt:
|
|
2667
|
-
enabled:
|
|
2744
|
+
createdAt: z126.coerce.date(),
|
|
2745
|
+
enabled: z126.boolean()
|
|
2668
2746
|
});
|
|
2669
2747
|
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
2670
2748
|
OAuthProviderNames2["Figma"] = "figma";
|
|
@@ -2674,92 +2752,60 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
|
2674
2752
|
OAuthProviderNames2["Bitbucket"] = "bitbucket";
|
|
2675
2753
|
return OAuthProviderNames2;
|
|
2676
2754
|
})(OAuthProviderNames || {});
|
|
2677
|
-
var OAuthProviderSchema =
|
|
2755
|
+
var OAuthProviderSchema = z127.nativeEnum(OAuthProviderNames);
|
|
2678
2756
|
var OAuthProvider = OAuthProviderSchema.enum;
|
|
2679
|
-
var ExternalOAuthRequest =
|
|
2680
|
-
id:
|
|
2757
|
+
var ExternalOAuthRequest = z128.object({
|
|
2758
|
+
id: z128.string(),
|
|
2681
2759
|
provider: OAuthProviderSchema,
|
|
2682
|
-
userId:
|
|
2683
|
-
state:
|
|
2684
|
-
createdAt:
|
|
2760
|
+
userId: z128.string(),
|
|
2761
|
+
state: z128.string(),
|
|
2762
|
+
createdAt: z128.coerce.date()
|
|
2685
2763
|
});
|
|
2686
|
-
var IntegrationTokenSchema =
|
|
2687
|
-
id:
|
|
2764
|
+
var IntegrationTokenSchema = z129.object({
|
|
2765
|
+
id: z129.string(),
|
|
2688
2766
|
provider: OAuthProviderSchema,
|
|
2689
|
-
scope:
|
|
2690
|
-
userId:
|
|
2691
|
-
accessToken:
|
|
2692
|
-
refreshToken:
|
|
2693
|
-
expiresAt:
|
|
2694
|
-
externalUserId:
|
|
2695
|
-
});
|
|
2696
|
-
var DesignSystemVersionRoom = Entity.extend({
|
|
2697
|
-
designSystemVersionId: z124.string(),
|
|
2698
|
-
liveblocksId: z124.string()
|
|
2699
|
-
});
|
|
2700
|
-
var DesignSystemVersionRoomInitialState = z124.object({
|
|
2701
|
-
pages: z124.array(DocumentationPageV2),
|
|
2702
|
-
groups: z124.array(ElementGroup)
|
|
2703
|
-
});
|
|
2704
|
-
var DesignSystemVersionRoomUpdate = DesignSystemVersionRoomInitialState.extend({
|
|
2705
|
-
deletedPageIds: z124.array(z124.string()),
|
|
2706
|
-
deletedGroupIds: z124.array(z124.string())
|
|
2707
|
-
});
|
|
2708
|
-
var DocumentationPageRoom = Entity.extend({
|
|
2709
|
-
designSystemVersionId: z125.string(),
|
|
2710
|
-
documentationPageId: z125.string(),
|
|
2711
|
-
liveblocksId: z125.string()
|
|
2712
|
-
});
|
|
2713
|
-
var DocumentationPageRoomRoomUpdate = z125.object({
|
|
2714
|
-
page: DocumentationPageV2,
|
|
2715
|
-
pageParent: ElementGroup
|
|
2716
|
-
});
|
|
2717
|
-
var DocumentationPageRoomInitialState = DocumentationPageRoomRoomUpdate.extend({
|
|
2718
|
-
pageBlocks: z125.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
2719
|
-
blockDefinitions: z125.array(PageBlockDefinition)
|
|
2767
|
+
scope: z129.string(),
|
|
2768
|
+
userId: z129.string(),
|
|
2769
|
+
accessToken: z129.string(),
|
|
2770
|
+
refreshToken: z129.string(),
|
|
2771
|
+
expiresAt: z129.coerce.date(),
|
|
2772
|
+
externalUserId: z129.string().nullish()
|
|
2720
2773
|
});
|
|
2721
|
-
var
|
|
2722
|
-
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
2723
|
-
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
2724
|
-
return RoomTypeEnum2;
|
|
2725
|
-
})(RoomTypeEnum || {});
|
|
2726
|
-
var RoomTypeSchema = z126.nativeEnum(RoomTypeEnum);
|
|
2727
|
-
var RoomType = RoomTypeSchema.enum;
|
|
2728
|
-
var AnyRecord = z127.record(z127.any());
|
|
2774
|
+
var AnyRecord = z130.record(z130.any());
|
|
2729
2775
|
var NpmPackageVersionDist = AnyRecord.and(
|
|
2730
|
-
|
|
2731
|
-
tarball:
|
|
2776
|
+
z130.object({
|
|
2777
|
+
tarball: z130.string()
|
|
2732
2778
|
})
|
|
2733
2779
|
);
|
|
2734
2780
|
var NpmPackageVersion = AnyRecord.and(
|
|
2735
|
-
|
|
2781
|
+
z130.object({
|
|
2736
2782
|
dist: NpmPackageVersionDist
|
|
2737
2783
|
})
|
|
2738
2784
|
);
|
|
2739
2785
|
var NpmPackage = AnyRecord.and(
|
|
2740
|
-
|
|
2741
|
-
_id:
|
|
2742
|
-
name:
|
|
2786
|
+
z130.object({
|
|
2787
|
+
_id: z130.string(),
|
|
2788
|
+
name: z130.string(),
|
|
2743
2789
|
// e.g. "latest": "1.2.3"
|
|
2744
|
-
"dist-tags":
|
|
2790
|
+
"dist-tags": z130.record(z130.string(), z130.string()),
|
|
2745
2791
|
// "1.2.3": {...}
|
|
2746
|
-
versions:
|
|
2792
|
+
versions: z130.record(NpmPackageVersion)
|
|
2747
2793
|
})
|
|
2748
2794
|
);
|
|
2749
|
-
var NpmProxyTokenPayload =
|
|
2750
|
-
npmProxyRegistryConfigId:
|
|
2751
|
-
});
|
|
2752
|
-
var PersonalAccessToken =
|
|
2753
|
-
id:
|
|
2754
|
-
userId:
|
|
2755
|
-
name:
|
|
2756
|
-
token:
|
|
2757
|
-
createdAt:
|
|
2758
|
-
hidden:
|
|
2759
|
-
workspaceId:
|
|
2795
|
+
var NpmProxyTokenPayload = z131.object({
|
|
2796
|
+
npmProxyRegistryConfigId: z131.string()
|
|
2797
|
+
});
|
|
2798
|
+
var PersonalAccessToken = z132.object({
|
|
2799
|
+
id: z132.string(),
|
|
2800
|
+
userId: z132.string(),
|
|
2801
|
+
name: z132.string(),
|
|
2802
|
+
token: z132.string(),
|
|
2803
|
+
createdAt: z132.coerce.date(),
|
|
2804
|
+
hidden: z132.boolean(),
|
|
2805
|
+
workspaceId: z132.string().optional(),
|
|
2760
2806
|
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
2761
|
-
expireAt:
|
|
2762
|
-
scope:
|
|
2807
|
+
expireAt: z132.coerce.date().optional(),
|
|
2808
|
+
scope: z132.string().optional()
|
|
2763
2809
|
});
|
|
2764
2810
|
var SupernovaException = class _SupernovaException extends Error {
|
|
2765
2811
|
//
|
|
@@ -2844,25 +2890,25 @@ function groupBy(items, keyFn) {
|
|
|
2844
2890
|
}
|
|
2845
2891
|
return result;
|
|
2846
2892
|
}
|
|
2847
|
-
var ContentLoadInstruction =
|
|
2848
|
-
from:
|
|
2849
|
-
to:
|
|
2850
|
-
authorizationHeaderKvsId:
|
|
2851
|
-
timeout:
|
|
2852
|
-
});
|
|
2853
|
-
var ContentLoaderPayload =
|
|
2854
|
-
type:
|
|
2893
|
+
var ContentLoadInstruction = z133.object({
|
|
2894
|
+
from: z133.string(),
|
|
2895
|
+
to: z133.string(),
|
|
2896
|
+
authorizationHeaderKvsId: z133.string().optional(),
|
|
2897
|
+
timeout: z133.number().optional()
|
|
2898
|
+
});
|
|
2899
|
+
var ContentLoaderPayload = z133.object({
|
|
2900
|
+
type: z133.literal("Single"),
|
|
2855
2901
|
instruction: ContentLoadInstruction
|
|
2856
2902
|
}).or(
|
|
2857
|
-
|
|
2858
|
-
type:
|
|
2859
|
-
loadingChunkSize:
|
|
2860
|
-
instructions:
|
|
2903
|
+
z133.object({
|
|
2904
|
+
type: z133.literal("Multiple"),
|
|
2905
|
+
loadingChunkSize: z133.number().optional(),
|
|
2906
|
+
instructions: z133.array(ContentLoadInstruction)
|
|
2861
2907
|
})
|
|
2862
2908
|
).or(
|
|
2863
|
-
|
|
2864
|
-
type:
|
|
2865
|
-
location:
|
|
2909
|
+
z133.object({
|
|
2910
|
+
type: z133.literal("S3"),
|
|
2911
|
+
location: z133.string()
|
|
2866
2912
|
})
|
|
2867
2913
|
);
|
|
2868
2914
|
function slugify(str, options) {
|
|
@@ -3658,11 +3704,21 @@ var DTODesignSystem = DesignSystem.omit({
|
|
|
3658
3704
|
meta: ObjectMeta
|
|
3659
3705
|
});
|
|
3660
3706
|
|
|
3707
|
+
// src/api/dto/documentation/link-preview.ts
|
|
3708
|
+
import { z as z134 } from "zod";
|
|
3709
|
+
var DTODocumentationLinkPreviewResponse = z134.object({
|
|
3710
|
+
linkPreview: DocumentationLinkPreview
|
|
3711
|
+
});
|
|
3712
|
+
var DTODocumentationLinkPreviewRequest = z134.object({
|
|
3713
|
+
url: z134.string().optional(),
|
|
3714
|
+
documentationItemPersistentId: z134.string().optional()
|
|
3715
|
+
});
|
|
3716
|
+
|
|
3661
3717
|
// src/api/dto/elements/documentation/group-action.ts
|
|
3662
|
-
import { z as
|
|
3718
|
+
import { z as z136 } from "zod";
|
|
3663
3719
|
|
|
3664
3720
|
// src/api/dto/elements/documentation/group.ts
|
|
3665
|
-
import { z as
|
|
3721
|
+
import { z as z135 } from "zod";
|
|
3666
3722
|
var DTODocumentationGroupStructureV2 = ElementGroup.omit({
|
|
3667
3723
|
sortOrder: true,
|
|
3668
3724
|
parentPersistentId: true,
|
|
@@ -3672,286 +3728,286 @@ var DTODocumentationGroupStructureV2 = ElementGroup.omit({
|
|
|
3672
3728
|
data: true,
|
|
3673
3729
|
shortPersistentId: true
|
|
3674
3730
|
}).extend({
|
|
3675
|
-
title:
|
|
3676
|
-
isRoot:
|
|
3677
|
-
childrenIds:
|
|
3731
|
+
title: z135.string(),
|
|
3732
|
+
isRoot: z135.boolean(),
|
|
3733
|
+
childrenIds: z135.array(z135.string()),
|
|
3678
3734
|
groupBehavior: DocumentationGroupBehavior,
|
|
3679
|
-
shortPersistentId:
|
|
3680
|
-
type:
|
|
3735
|
+
shortPersistentId: z135.string(),
|
|
3736
|
+
type: z135.literal("Group")
|
|
3681
3737
|
});
|
|
3682
3738
|
var DTODocumentationGroupV2 = DTODocumentationGroupStructureV2.extend({
|
|
3683
3739
|
configuration: DocumentationItemConfigurationV2
|
|
3684
3740
|
});
|
|
3685
|
-
var DTOCreateDocumentationGroupInput =
|
|
3741
|
+
var DTOCreateDocumentationGroupInput = z135.object({
|
|
3686
3742
|
// Identifier
|
|
3687
|
-
persistentId:
|
|
3743
|
+
persistentId: z135.string().uuid(),
|
|
3688
3744
|
// Group properties
|
|
3689
|
-
title:
|
|
3745
|
+
title: z135.string(),
|
|
3690
3746
|
configuration: DocumentationItemConfigurationV2.optional(),
|
|
3691
3747
|
// Group placement properties
|
|
3692
|
-
afterPersistentId:
|
|
3693
|
-
parentPersistentId:
|
|
3748
|
+
afterPersistentId: z135.string().uuid().optional(),
|
|
3749
|
+
parentPersistentId: z135.string().uuid()
|
|
3694
3750
|
});
|
|
3695
|
-
var DTOUpdateDocumentationGroupInput =
|
|
3751
|
+
var DTOUpdateDocumentationGroupInput = z135.object({
|
|
3696
3752
|
// Identifier of the group to update
|
|
3697
|
-
id:
|
|
3753
|
+
id: z135.string(),
|
|
3698
3754
|
// Group properties
|
|
3699
|
-
title:
|
|
3755
|
+
title: z135.string().optional(),
|
|
3700
3756
|
configuration: DocumentationItemConfigurationV2.optional()
|
|
3701
3757
|
});
|
|
3702
|
-
var DTOMoveDocumentationGroupInput =
|
|
3758
|
+
var DTOMoveDocumentationGroupInput = z135.object({
|
|
3703
3759
|
// Identifier of the group to update
|
|
3704
|
-
id:
|
|
3760
|
+
id: z135.string(),
|
|
3705
3761
|
// Group placement properties
|
|
3706
|
-
parentPersistentId:
|
|
3707
|
-
afterPersistentId:
|
|
3762
|
+
parentPersistentId: z135.string().uuid(),
|
|
3763
|
+
afterPersistentId: z135.string().uuid().optional()
|
|
3708
3764
|
});
|
|
3709
|
-
var DTODuplicateDocumentationGroupInput =
|
|
3765
|
+
var DTODuplicateDocumentationGroupInput = z135.object({
|
|
3710
3766
|
// Identifier of the group to duplicate from
|
|
3711
|
-
id:
|
|
3767
|
+
id: z135.string(),
|
|
3712
3768
|
// New group persistent id
|
|
3713
|
-
persistentId:
|
|
3769
|
+
persistentId: z135.string().uuid(),
|
|
3714
3770
|
// Group placement properties
|
|
3715
|
-
afterPersistentId:
|
|
3716
|
-
parentPersistentId:
|
|
3771
|
+
afterPersistentId: z135.string().uuid().optional(),
|
|
3772
|
+
parentPersistentId: z135.string().uuid()
|
|
3717
3773
|
});
|
|
3718
|
-
var DTOCreateDocumentationTabInput =
|
|
3774
|
+
var DTOCreateDocumentationTabInput = z135.object({
|
|
3719
3775
|
// New group persistent id
|
|
3720
|
-
persistentId:
|
|
3776
|
+
persistentId: z135.string().uuid(),
|
|
3721
3777
|
// Page that will become first tab of the tab group
|
|
3722
|
-
fromPagePersistentId:
|
|
3723
|
-
tabName:
|
|
3778
|
+
fromPagePersistentId: z135.string(),
|
|
3779
|
+
tabName: z135.string()
|
|
3724
3780
|
});
|
|
3725
|
-
var DTODeleteDocumentationTabGroupInput =
|
|
3781
|
+
var DTODeleteDocumentationTabGroupInput = z135.object({
|
|
3726
3782
|
// Deleted group id
|
|
3727
|
-
id:
|
|
3783
|
+
id: z135.string()
|
|
3728
3784
|
});
|
|
3729
|
-
var DTODeleteDocumentationGroupInput =
|
|
3785
|
+
var DTODeleteDocumentationGroupInput = z135.object({
|
|
3730
3786
|
// Identifier
|
|
3731
|
-
id:
|
|
3787
|
+
id: z135.string(),
|
|
3732
3788
|
// Deletion options
|
|
3733
|
-
deleteSubtree:
|
|
3789
|
+
deleteSubtree: z135.boolean().default(false)
|
|
3734
3790
|
});
|
|
3735
3791
|
|
|
3736
3792
|
// src/api/dto/elements/documentation/group-action.ts
|
|
3737
|
-
var SuccessPayload =
|
|
3738
|
-
success:
|
|
3793
|
+
var SuccessPayload = z136.object({
|
|
3794
|
+
success: z136.literal(true)
|
|
3739
3795
|
});
|
|
3740
|
-
var DTODocumentationGroupCreateActionOutputV2 =
|
|
3741
|
-
type:
|
|
3796
|
+
var DTODocumentationGroupCreateActionOutputV2 = z136.object({
|
|
3797
|
+
type: z136.literal("DocumentationGroupCreate"),
|
|
3742
3798
|
output: SuccessPayload
|
|
3743
3799
|
});
|
|
3744
|
-
var DTODocumentationTabCreateActionOutputV2 =
|
|
3745
|
-
type:
|
|
3800
|
+
var DTODocumentationTabCreateActionOutputV2 = z136.object({
|
|
3801
|
+
type: z136.literal("DocumentationTabCreate"),
|
|
3746
3802
|
output: SuccessPayload
|
|
3747
3803
|
});
|
|
3748
|
-
var DTODocumentationGroupUpdateActionOutputV2 =
|
|
3749
|
-
type:
|
|
3804
|
+
var DTODocumentationGroupUpdateActionOutputV2 = z136.object({
|
|
3805
|
+
type: z136.literal("DocumentationGroupUpdate"),
|
|
3750
3806
|
output: SuccessPayload
|
|
3751
3807
|
});
|
|
3752
|
-
var DTODocumentationGroupMoveActionOutputV2 =
|
|
3753
|
-
type:
|
|
3808
|
+
var DTODocumentationGroupMoveActionOutputV2 = z136.object({
|
|
3809
|
+
type: z136.literal("DocumentationGroupMove"),
|
|
3754
3810
|
output: SuccessPayload
|
|
3755
3811
|
});
|
|
3756
|
-
var DTODocumentationGroupDuplicateActionOutputV2 =
|
|
3757
|
-
type:
|
|
3812
|
+
var DTODocumentationGroupDuplicateActionOutputV2 = z136.object({
|
|
3813
|
+
type: z136.literal("DocumentationGroupDuplicate"),
|
|
3758
3814
|
output: SuccessPayload
|
|
3759
3815
|
});
|
|
3760
|
-
var DTODocumentationGroupDeleteActionOutputV2 =
|
|
3761
|
-
type:
|
|
3816
|
+
var DTODocumentationGroupDeleteActionOutputV2 = z136.object({
|
|
3817
|
+
type: z136.literal("DocumentationGroupDelete"),
|
|
3762
3818
|
output: SuccessPayload
|
|
3763
3819
|
});
|
|
3764
|
-
var DTODocumentationTabGroupDeleteActionOutputV2 =
|
|
3765
|
-
type:
|
|
3820
|
+
var DTODocumentationTabGroupDeleteActionOutputV2 = z136.object({
|
|
3821
|
+
type: z136.literal("DocumentationTabGroupDelete"),
|
|
3766
3822
|
output: SuccessPayload
|
|
3767
3823
|
});
|
|
3768
|
-
var DTODocumentationGroupCreateActionInputV2 =
|
|
3769
|
-
type:
|
|
3824
|
+
var DTODocumentationGroupCreateActionInputV2 = z136.object({
|
|
3825
|
+
type: z136.literal("DocumentationGroupCreate"),
|
|
3770
3826
|
input: DTOCreateDocumentationGroupInput
|
|
3771
3827
|
});
|
|
3772
|
-
var DTODocumentationTabCreateActionInputV2 =
|
|
3773
|
-
type:
|
|
3828
|
+
var DTODocumentationTabCreateActionInputV2 = z136.object({
|
|
3829
|
+
type: z136.literal("DocumentationTabCreate"),
|
|
3774
3830
|
input: DTOCreateDocumentationTabInput
|
|
3775
3831
|
});
|
|
3776
|
-
var DTODocumentationGroupUpdateActionInputV2 =
|
|
3777
|
-
type:
|
|
3832
|
+
var DTODocumentationGroupUpdateActionInputV2 = z136.object({
|
|
3833
|
+
type: z136.literal("DocumentationGroupUpdate"),
|
|
3778
3834
|
input: DTOUpdateDocumentationGroupInput
|
|
3779
3835
|
});
|
|
3780
|
-
var DTODocumentationGroupMoveActionInputV2 =
|
|
3781
|
-
type:
|
|
3836
|
+
var DTODocumentationGroupMoveActionInputV2 = z136.object({
|
|
3837
|
+
type: z136.literal("DocumentationGroupMove"),
|
|
3782
3838
|
input: DTOMoveDocumentationGroupInput
|
|
3783
3839
|
});
|
|
3784
|
-
var DTODocumentationGroupDuplicateActionInputV2 =
|
|
3785
|
-
type:
|
|
3840
|
+
var DTODocumentationGroupDuplicateActionInputV2 = z136.object({
|
|
3841
|
+
type: z136.literal("DocumentationGroupDuplicate"),
|
|
3786
3842
|
input: DTODuplicateDocumentationGroupInput
|
|
3787
3843
|
});
|
|
3788
|
-
var DTODocumentationGroupDeleteActionInputV2 =
|
|
3789
|
-
type:
|
|
3844
|
+
var DTODocumentationGroupDeleteActionInputV2 = z136.object({
|
|
3845
|
+
type: z136.literal("DocumentationGroupDelete"),
|
|
3790
3846
|
input: DTODeleteDocumentationGroupInput
|
|
3791
3847
|
});
|
|
3792
|
-
var DTODocumentationTabGroupDeleteActionInputV2 =
|
|
3793
|
-
type:
|
|
3848
|
+
var DTODocumentationTabGroupDeleteActionInputV2 = z136.object({
|
|
3849
|
+
type: z136.literal("DocumentationTabGroupDelete"),
|
|
3794
3850
|
input: DTODeleteDocumentationTabGroupInput
|
|
3795
3851
|
});
|
|
3796
3852
|
|
|
3797
3853
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
3798
|
-
import { z as
|
|
3854
|
+
import { z as z138 } from "zod";
|
|
3799
3855
|
|
|
3800
3856
|
// src/api/dto/elements/documentation/page-v2.ts
|
|
3801
|
-
import { z as
|
|
3857
|
+
import { z as z137 } from "zod";
|
|
3802
3858
|
var DTODocumentationPageStructureV2 = DocumentationPageV2.omit({
|
|
3803
3859
|
data: true,
|
|
3804
3860
|
meta: true,
|
|
3805
3861
|
parentPersistentId: true,
|
|
3806
3862
|
sortOrder: true
|
|
3807
3863
|
}).extend({
|
|
3808
|
-
title:
|
|
3809
|
-
path:
|
|
3810
|
-
type:
|
|
3864
|
+
title: z137.string(),
|
|
3865
|
+
path: z137.string(),
|
|
3866
|
+
type: z137.literal("Page")
|
|
3811
3867
|
});
|
|
3812
3868
|
var DTODocumentationPageV2 = DTODocumentationPageStructureV2.extend({
|
|
3813
3869
|
configuration: DocumentationItemConfigurationV2
|
|
3814
3870
|
});
|
|
3815
|
-
var DTODocumentationHierarchyV2 =
|
|
3816
|
-
pages:
|
|
3817
|
-
groups:
|
|
3871
|
+
var DTODocumentationHierarchyV2 = z137.object({
|
|
3872
|
+
pages: z137.array(DTODocumentationPageStructureV2),
|
|
3873
|
+
groups: z137.array(DTODocumentationGroupStructureV2)
|
|
3818
3874
|
});
|
|
3819
|
-
var DTOCreateDocumentationPageInputV2 =
|
|
3875
|
+
var DTOCreateDocumentationPageInputV2 = z137.object({
|
|
3820
3876
|
// Identifier
|
|
3821
|
-
persistentId:
|
|
3877
|
+
persistentId: z137.string().uuid(),
|
|
3822
3878
|
// Page properties
|
|
3823
|
-
title:
|
|
3879
|
+
title: z137.string(),
|
|
3824
3880
|
configuration: DocumentationItemConfigurationV2.optional(),
|
|
3825
3881
|
// Page placement properties
|
|
3826
|
-
parentPersistentId:
|
|
3827
|
-
afterPersistentId:
|
|
3882
|
+
parentPersistentId: z137.string().uuid(),
|
|
3883
|
+
afterPersistentId: z137.string().uuid().optional()
|
|
3828
3884
|
});
|
|
3829
|
-
var DTOUpdateDocumentationPageInputV2 =
|
|
3885
|
+
var DTOUpdateDocumentationPageInputV2 = z137.object({
|
|
3830
3886
|
// Identifier of the group to update
|
|
3831
|
-
id:
|
|
3887
|
+
id: z137.string(),
|
|
3832
3888
|
// Page properties
|
|
3833
|
-
title:
|
|
3889
|
+
title: z137.string().optional(),
|
|
3834
3890
|
configuration: DocumentationItemConfigurationV2.optional()
|
|
3835
3891
|
});
|
|
3836
|
-
var DTOMoveDocumentationPageInputV2 =
|
|
3892
|
+
var DTOMoveDocumentationPageInputV2 = z137.object({
|
|
3837
3893
|
// Identifier of the group to update
|
|
3838
|
-
id:
|
|
3894
|
+
id: z137.string(),
|
|
3839
3895
|
// Page placement properties
|
|
3840
|
-
parentPersistentId:
|
|
3841
|
-
afterPersistentId:
|
|
3896
|
+
parentPersistentId: z137.string().uuid(),
|
|
3897
|
+
afterPersistentId: z137.string().uuid().optional()
|
|
3842
3898
|
});
|
|
3843
|
-
var DTODuplicateDocumentationPageInputV2 =
|
|
3899
|
+
var DTODuplicateDocumentationPageInputV2 = z137.object({
|
|
3844
3900
|
// Identifier of the page to duplicate from
|
|
3845
|
-
id:
|
|
3901
|
+
id: z137.string(),
|
|
3846
3902
|
// New page persistent id
|
|
3847
|
-
persistentId:
|
|
3903
|
+
persistentId: z137.string().uuid(),
|
|
3848
3904
|
// Page placement properties
|
|
3849
|
-
parentPersistentId:
|
|
3850
|
-
afterPersistentId:
|
|
3905
|
+
parentPersistentId: z137.string().uuid(),
|
|
3906
|
+
afterPersistentId: z137.string().uuid().optional()
|
|
3851
3907
|
});
|
|
3852
|
-
var DTODeleteDocumentationPageInputV2 =
|
|
3908
|
+
var DTODeleteDocumentationPageInputV2 = z137.object({
|
|
3853
3909
|
// Identifier
|
|
3854
|
-
id:
|
|
3910
|
+
id: z137.string()
|
|
3855
3911
|
});
|
|
3856
3912
|
|
|
3857
3913
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
3858
|
-
var SuccessPayload2 =
|
|
3859
|
-
success:
|
|
3914
|
+
var SuccessPayload2 = z138.object({
|
|
3915
|
+
success: z138.literal(true)
|
|
3860
3916
|
});
|
|
3861
|
-
var DTODocumentationPageCreateActionOutputV2 =
|
|
3862
|
-
type:
|
|
3917
|
+
var DTODocumentationPageCreateActionOutputV2 = z138.object({
|
|
3918
|
+
type: z138.literal("DocumentationPageCreate"),
|
|
3863
3919
|
output: SuccessPayload2
|
|
3864
3920
|
});
|
|
3865
|
-
var DTODocumentationPageUpdateActionOutputV2 =
|
|
3866
|
-
type:
|
|
3921
|
+
var DTODocumentationPageUpdateActionOutputV2 = z138.object({
|
|
3922
|
+
type: z138.literal("DocumentationPageUpdate"),
|
|
3867
3923
|
output: SuccessPayload2
|
|
3868
3924
|
});
|
|
3869
|
-
var DTODocumentationPageMoveActionOutputV2 =
|
|
3870
|
-
type:
|
|
3925
|
+
var DTODocumentationPageMoveActionOutputV2 = z138.object({
|
|
3926
|
+
type: z138.literal("DocumentationPageMove"),
|
|
3871
3927
|
output: SuccessPayload2
|
|
3872
3928
|
});
|
|
3873
|
-
var DTODocumentationPageDuplicateActionOutputV2 =
|
|
3874
|
-
type:
|
|
3929
|
+
var DTODocumentationPageDuplicateActionOutputV2 = z138.object({
|
|
3930
|
+
type: z138.literal("DocumentationPageDuplicate"),
|
|
3875
3931
|
output: SuccessPayload2
|
|
3876
3932
|
});
|
|
3877
|
-
var DTODocumentationPageDeleteActionOutputV2 =
|
|
3878
|
-
type:
|
|
3933
|
+
var DTODocumentationPageDeleteActionOutputV2 = z138.object({
|
|
3934
|
+
type: z138.literal("DocumentationPageDelete"),
|
|
3879
3935
|
output: SuccessPayload2
|
|
3880
3936
|
});
|
|
3881
|
-
var DTODocumentationPageCreateActionInputV2 =
|
|
3882
|
-
type:
|
|
3937
|
+
var DTODocumentationPageCreateActionInputV2 = z138.object({
|
|
3938
|
+
type: z138.literal("DocumentationPageCreate"),
|
|
3883
3939
|
input: DTOCreateDocumentationPageInputV2
|
|
3884
3940
|
});
|
|
3885
|
-
var DTODocumentationPageUpdateActionInputV2 =
|
|
3886
|
-
type:
|
|
3941
|
+
var DTODocumentationPageUpdateActionInputV2 = z138.object({
|
|
3942
|
+
type: z138.literal("DocumentationPageUpdate"),
|
|
3887
3943
|
input: DTOUpdateDocumentationPageInputV2
|
|
3888
3944
|
});
|
|
3889
|
-
var DTODocumentationPageMoveActionInputV2 =
|
|
3890
|
-
type:
|
|
3945
|
+
var DTODocumentationPageMoveActionInputV2 = z138.object({
|
|
3946
|
+
type: z138.literal("DocumentationPageMove"),
|
|
3891
3947
|
input: DTOMoveDocumentationPageInputV2
|
|
3892
3948
|
});
|
|
3893
|
-
var DTODocumentationPageDuplicateActionInputV2 =
|
|
3894
|
-
type:
|
|
3949
|
+
var DTODocumentationPageDuplicateActionInputV2 = z138.object({
|
|
3950
|
+
type: z138.literal("DocumentationPageDuplicate"),
|
|
3895
3951
|
input: DTODuplicateDocumentationPageInputV2
|
|
3896
3952
|
});
|
|
3897
|
-
var DTODocumentationPageDeleteActionInputV2 =
|
|
3898
|
-
type:
|
|
3953
|
+
var DTODocumentationPageDeleteActionInputV2 = z138.object({
|
|
3954
|
+
type: z138.literal("DocumentationPageDelete"),
|
|
3899
3955
|
input: DTODeleteDocumentationPageInputV2
|
|
3900
3956
|
});
|
|
3901
3957
|
|
|
3902
3958
|
// src/api/dto/elements/documentation/page-v1.ts
|
|
3903
|
-
import { z as
|
|
3959
|
+
import { z as z139 } from "zod";
|
|
3904
3960
|
var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
3905
3961
|
data: true,
|
|
3906
3962
|
meta: true,
|
|
3907
3963
|
parentPersistentId: true,
|
|
3908
3964
|
sortOrder: true
|
|
3909
3965
|
}).extend(DocumentationPageV1.shape.data.shape).extend({
|
|
3910
|
-
title:
|
|
3911
|
-
path:
|
|
3966
|
+
title: z139.string(),
|
|
3967
|
+
path: z139.string()
|
|
3912
3968
|
});
|
|
3913
3969
|
|
|
3914
3970
|
// src/api/dto/elements/figma-nodes/figma-node.ts
|
|
3915
|
-
import { z as
|
|
3916
|
-
var DTOFigmaNodeData =
|
|
3971
|
+
import { z as z140 } from "zod";
|
|
3972
|
+
var DTOFigmaNodeData = z140.object({
|
|
3917
3973
|
// Id of the node in the Figma file
|
|
3918
|
-
figmaNodeId:
|
|
3974
|
+
figmaNodeId: z140.string(),
|
|
3919
3975
|
// Validity
|
|
3920
|
-
isValid:
|
|
3976
|
+
isValid: z140.boolean(),
|
|
3921
3977
|
// Asset data
|
|
3922
|
-
assetId:
|
|
3923
|
-
assetUrl:
|
|
3978
|
+
assetId: z140.string(),
|
|
3979
|
+
assetUrl: z140.string(),
|
|
3924
3980
|
// Asset metadata
|
|
3925
|
-
assetScale:
|
|
3926
|
-
assetWidth:
|
|
3927
|
-
assetHeight:
|
|
3981
|
+
assetScale: z140.number(),
|
|
3982
|
+
assetWidth: z140.number().optional(),
|
|
3983
|
+
assetHeight: z140.number().optional()
|
|
3928
3984
|
});
|
|
3929
3985
|
var DTOFigmaNode = FigmaFileStructure.omit({
|
|
3930
3986
|
data: true
|
|
3931
3987
|
}).extend({
|
|
3932
3988
|
data: DTOFigmaNodeData
|
|
3933
3989
|
});
|
|
3934
|
-
var DTOFigmaNodeRenderInput =
|
|
3990
|
+
var DTOFigmaNodeRenderInput = z140.object({
|
|
3935
3991
|
// Id of a design system's data source representing a linked Figma file
|
|
3936
|
-
sourceId:
|
|
3992
|
+
sourceId: z140.string(),
|
|
3937
3993
|
// Id of a node within the Figma file
|
|
3938
|
-
figmaFileNodeId:
|
|
3994
|
+
figmaFileNodeId: z140.string()
|
|
3939
3995
|
});
|
|
3940
3996
|
|
|
3941
3997
|
// src/api/dto/elements/figma-nodes/node-actions-v2.ts
|
|
3942
|
-
import { z as
|
|
3943
|
-
var DTOFigmaNodeRenderActionOutput =
|
|
3944
|
-
type:
|
|
3945
|
-
figmaNodes:
|
|
3998
|
+
import { z as z141 } from "zod";
|
|
3999
|
+
var DTOFigmaNodeRenderActionOutput = z141.object({
|
|
4000
|
+
type: z141.literal("FigmaNodeRender"),
|
|
4001
|
+
figmaNodes: z141.array(DTOFigmaNode)
|
|
3946
4002
|
});
|
|
3947
|
-
var DTOFigmaNodeRenderActionInput =
|
|
3948
|
-
type:
|
|
4003
|
+
var DTOFigmaNodeRenderActionInput = z141.object({
|
|
4004
|
+
type: z141.literal("FigmaNodeRender"),
|
|
3949
4005
|
input: DTOFigmaNodeRenderInput.array()
|
|
3950
4006
|
});
|
|
3951
4007
|
|
|
3952
4008
|
// src/api/dto/elements/elements-action-v2.ts
|
|
3953
|
-
import { z as
|
|
3954
|
-
var DTOElementActionOutput =
|
|
4009
|
+
import { z as z142 } from "zod";
|
|
4010
|
+
var DTOElementActionOutput = z142.discriminatedUnion("type", [
|
|
3955
4011
|
// Documentation pages
|
|
3956
4012
|
DTODocumentationPageCreateActionOutputV2,
|
|
3957
4013
|
DTODocumentationPageUpdateActionOutputV2,
|
|
@@ -3966,10 +4022,10 @@ var DTOElementActionOutput = z138.discriminatedUnion("type", [
|
|
|
3966
4022
|
DTODocumentationGroupDuplicateActionOutputV2,
|
|
3967
4023
|
DTODocumentationGroupDeleteActionOutputV2,
|
|
3968
4024
|
DTODocumentationTabGroupDeleteActionOutputV2,
|
|
3969
|
-
//
|
|
4025
|
+
// Figma frames
|
|
3970
4026
|
DTOFigmaNodeRenderActionOutput
|
|
3971
4027
|
]);
|
|
3972
|
-
var DTOElementActionInput =
|
|
4028
|
+
var DTOElementActionInput = z142.discriminatedUnion("type", [
|
|
3973
4029
|
// Documentation pages
|
|
3974
4030
|
DTODocumentationPageCreateActionInputV2,
|
|
3975
4031
|
DTODocumentationPageUpdateActionInputV2,
|
|
@@ -3989,53 +4045,53 @@ var DTOElementActionInput = z138.discriminatedUnion("type", [
|
|
|
3989
4045
|
]);
|
|
3990
4046
|
|
|
3991
4047
|
// src/api/dto/elements/get-elements-v2.ts
|
|
3992
|
-
import { z as
|
|
3993
|
-
var DTOElementsGetTypeFilter =
|
|
3994
|
-
var DTOElementsGetQuerySchema =
|
|
3995
|
-
types:
|
|
4048
|
+
import { z as z143 } from "zod";
|
|
4049
|
+
var DTOElementsGetTypeFilter = z143.enum(["FigmaNode"]);
|
|
4050
|
+
var DTOElementsGetQuerySchema = z143.object({
|
|
4051
|
+
types: z143.string().transform((val) => val.split(",").map((v) => DTOElementsGetTypeFilter.parse(v)))
|
|
3996
4052
|
});
|
|
3997
|
-
var DTOElementsGetOutput =
|
|
3998
|
-
figmaNodes:
|
|
4053
|
+
var DTOElementsGetOutput = z143.object({
|
|
4054
|
+
figmaNodes: z143.array(DTOFigmaNode).optional()
|
|
3999
4055
|
});
|
|
4000
4056
|
|
|
4001
4057
|
// src/api/dto/workspaces/membership.ts
|
|
4002
|
-
import { z as
|
|
4058
|
+
import { z as z146 } from "zod";
|
|
4003
4059
|
|
|
4004
4060
|
// src/api/dto/workspaces/workspace.ts
|
|
4005
|
-
import { z as
|
|
4061
|
+
import { z as z145 } from "zod";
|
|
4006
4062
|
|
|
4007
4063
|
// src/api/dto/workspaces/npm-registry.ts
|
|
4008
|
-
import { z as
|
|
4009
|
-
var DTONpmRegistryConfig =
|
|
4064
|
+
import { z as z144 } from "zod";
|
|
4065
|
+
var DTONpmRegistryConfig = z144.object({
|
|
4010
4066
|
// Registry basic configuration
|
|
4011
4067
|
registryType: NpmRegistryType,
|
|
4012
|
-
registryUrl:
|
|
4013
|
-
customRegistryUrl:
|
|
4068
|
+
registryUrl: z144.string(),
|
|
4069
|
+
customRegistryUrl: z144.string().optional(),
|
|
4014
4070
|
// URL of Supernova NPM packages proxy
|
|
4015
|
-
proxyUrl:
|
|
4071
|
+
proxyUrl: z144.string(),
|
|
4016
4072
|
// Auth configuration
|
|
4017
4073
|
authType: NpmRegistryAuthType,
|
|
4018
|
-
accessToken:
|
|
4019
|
-
username:
|
|
4020
|
-
password:
|
|
4074
|
+
accessToken: z144.literal("redacted").optional(),
|
|
4075
|
+
username: z144.string().optional(),
|
|
4076
|
+
password: z144.literal("redacted").optional(),
|
|
4021
4077
|
// NPM package scopes for whih the proxy should be enabled
|
|
4022
|
-
enabledScopes:
|
|
4078
|
+
enabledScopes: z144.array(z144.string()),
|
|
4023
4079
|
// True if client should bypass Supernova proxy and connect directly to the registry
|
|
4024
4080
|
// (e.g. when the NPM registry is behind a VPN or firewall which prevents Supernova from accessing it)
|
|
4025
|
-
bypassProxy:
|
|
4081
|
+
bypassProxy: z144.boolean()
|
|
4026
4082
|
});
|
|
4027
4083
|
|
|
4028
4084
|
// src/api/dto/workspaces/workspace.ts
|
|
4029
|
-
var DTOWorkspace =
|
|
4030
|
-
id:
|
|
4085
|
+
var DTOWorkspace = z145.object({
|
|
4086
|
+
id: z145.string(),
|
|
4031
4087
|
profile: WorkspaceProfile,
|
|
4032
4088
|
subscription: Subscription,
|
|
4033
4089
|
npmRegistry: DTONpmRegistryConfig.optional()
|
|
4034
4090
|
});
|
|
4035
4091
|
|
|
4036
4092
|
// src/api/dto/workspaces/membership.ts
|
|
4037
|
-
var DTOWorkspaceRole =
|
|
4038
|
-
var DTOUserWorkspaceMembership =
|
|
4093
|
+
var DTOWorkspaceRole = z146.enum(["Owner", "Admin", "Creator", "Viewer", "Billing"]);
|
|
4094
|
+
var DTOUserWorkspaceMembership = z146.object({
|
|
4039
4095
|
// Workspace the user is a member of
|
|
4040
4096
|
workspace: DTOWorkspace,
|
|
4041
4097
|
// Assigned role the user has in the workspace
|
|
@@ -4045,20 +4101,65 @@ var DTOUserWorkspaceMembership = z142.object({
|
|
|
4045
4101
|
// when a workspace's subscription is downgraded to free tier
|
|
4046
4102
|
effectiveRole: DTOWorkspaceRole
|
|
4047
4103
|
});
|
|
4048
|
-
var DTOUserWorkspaceMembershipsResponse =
|
|
4049
|
-
membership:
|
|
4104
|
+
var DTOUserWorkspaceMembershipsResponse = z146.object({
|
|
4105
|
+
membership: z146.array(DTOUserWorkspaceMembership)
|
|
4050
4106
|
});
|
|
4051
4107
|
|
|
4052
4108
|
// src/api/payloads/documentation/block-definitions.ts
|
|
4053
|
-
import { z as
|
|
4054
|
-
var DTOGetBlockDefinitionsOutput =
|
|
4055
|
-
definitions:
|
|
4109
|
+
import { z as z147 } from "zod";
|
|
4110
|
+
var DTOGetBlockDefinitionsOutput = z147.object({
|
|
4111
|
+
definitions: z147.array(PageBlockDefinition)
|
|
4056
4112
|
});
|
|
4057
4113
|
|
|
4058
4114
|
// src/api/payloads/liveblocks/auth.ts
|
|
4059
|
-
import { z as
|
|
4060
|
-
var DTOLiveblocksAuthRequest =
|
|
4061
|
-
room:
|
|
4115
|
+
import { z as z148 } from "zod";
|
|
4116
|
+
var DTOLiveblocksAuthRequest = z148.object({
|
|
4117
|
+
room: z148.string()
|
|
4118
|
+
});
|
|
4119
|
+
|
|
4120
|
+
// src/api/payloads/workspaces/workspace-configuration.ts
|
|
4121
|
+
import { z as z149 } from "zod";
|
|
4122
|
+
var prohibitedSsoKeys = ["providerId", "metadataXml", "emailDomains"];
|
|
4123
|
+
function validateSsoPayload(ssoPayload) {
|
|
4124
|
+
const keys = [];
|
|
4125
|
+
let valid = true;
|
|
4126
|
+
if (!ssoPayload) {
|
|
4127
|
+
valid = true;
|
|
4128
|
+
return {
|
|
4129
|
+
valid,
|
|
4130
|
+
keys: []
|
|
4131
|
+
};
|
|
4132
|
+
}
|
|
4133
|
+
for (const key of Object.keys(ssoPayload)) {
|
|
4134
|
+
if (prohibitedSsoKeys.includes(key)) {
|
|
4135
|
+
keys.push(key);
|
|
4136
|
+
valid = false;
|
|
4137
|
+
}
|
|
4138
|
+
}
|
|
4139
|
+
return {
|
|
4140
|
+
valid,
|
|
4141
|
+
keys
|
|
4142
|
+
};
|
|
4143
|
+
}
|
|
4144
|
+
var NpmRegistryInput = z149.object({
|
|
4145
|
+
enabledScopes: z149.array(z149.string()),
|
|
4146
|
+
customRegistryUrl: z149.string().optional(),
|
|
4147
|
+
bypassProxy: z149.boolean().optional(),
|
|
4148
|
+
npmProxyRegistryConfigId: z149.string().optional(),
|
|
4149
|
+
npmProxyVersion: z149.number().optional(),
|
|
4150
|
+
registryType: z149.string(),
|
|
4151
|
+
authType: z149.string(),
|
|
4152
|
+
authHeaderName: z149.string(),
|
|
4153
|
+
authHeaderValue: z149.string(),
|
|
4154
|
+
accessToken: z149.string(),
|
|
4155
|
+
username: z149.string(),
|
|
4156
|
+
password: z149.string()
|
|
4157
|
+
});
|
|
4158
|
+
var WorkspaceConfigurationPayload = z149.object({
|
|
4159
|
+
ipWhitelist: WorkspaceIpSettings.partial().optional(),
|
|
4160
|
+
sso: SsoProvider.partial().optional(),
|
|
4161
|
+
npmRegistrySettings: NpmRegistryInput.partial().optional(),
|
|
4162
|
+
profile: WorkspaceProfile.partial().optional()
|
|
4062
4163
|
});
|
|
4063
4164
|
|
|
4064
4165
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
@@ -4111,13 +4212,13 @@ function getGroupsYMap(doc) {
|
|
|
4111
4212
|
}
|
|
4112
4213
|
|
|
4113
4214
|
// src/yjs/design-system-content/item-configuration.ts
|
|
4114
|
-
import { z as
|
|
4115
|
-
var DTODocumentationPageRoomHeaderData =
|
|
4116
|
-
title:
|
|
4215
|
+
import { z as z150 } from "zod";
|
|
4216
|
+
var DTODocumentationPageRoomHeaderData = z150.object({
|
|
4217
|
+
title: z150.string(),
|
|
4117
4218
|
configuration: DocumentationItemConfigurationV2
|
|
4118
4219
|
});
|
|
4119
|
-
var DTODocumentationPageRoomHeaderDataUpdate =
|
|
4120
|
-
title:
|
|
4220
|
+
var DTODocumentationPageRoomHeaderDataUpdate = z150.object({
|
|
4221
|
+
title: z150.string().optional(),
|
|
4121
4222
|
configuration: DocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
4122
4223
|
});
|
|
4123
4224
|
function itemConfigurationToYjs(yDoc, item) {
|
|
@@ -4166,7 +4267,7 @@ function yjsToItemConfiguration(yDoc) {
|
|
|
4166
4267
|
header: rawHeader
|
|
4167
4268
|
};
|
|
4168
4269
|
return {
|
|
4169
|
-
title:
|
|
4270
|
+
title: z150.string().parse(title),
|
|
4170
4271
|
configuration: DocumentationItemConfigurationV2.parse(rawConfig)
|
|
4171
4272
|
};
|
|
4172
4273
|
}
|
|
@@ -4176,9 +4277,9 @@ var PageBlockEditorModel = PageBlockEditorModelV2;
|
|
|
4176
4277
|
var PageSectionEditorModel = PageSectionEditorModelV2;
|
|
4177
4278
|
|
|
4178
4279
|
// src/yjs/docs-editor/model/page.ts
|
|
4179
|
-
import { z as
|
|
4180
|
-
var DocumentationPageEditorModel =
|
|
4181
|
-
blocks:
|
|
4280
|
+
import { z as z151 } from "zod";
|
|
4281
|
+
var DocumentationPageEditorModel = z151.object({
|
|
4282
|
+
blocks: z151.array(PageBlockEditorModel.or(PageSectionEditorModel))
|
|
4182
4283
|
});
|
|
4183
4284
|
|
|
4184
4285
|
// src/yjs/docs-editor/prosemirror/schema.ts
|
|
@@ -4655,56 +4756,34 @@ var newSchema = {
|
|
|
4655
4756
|
}
|
|
4656
4757
|
},
|
|
4657
4758
|
image: {
|
|
4658
|
-
|
|
4659
|
-
|
|
4660
|
-
|
|
4661
|
-
inline: false,
|
|
4662
|
-
draggable: true,
|
|
4663
|
-
attrs: {
|
|
4664
|
-
src: {
|
|
4665
|
-
default: null
|
|
4666
|
-
},
|
|
4667
|
-
alt: {
|
|
4668
|
-
default: null
|
|
4669
|
-
},
|
|
4670
|
-
title: {
|
|
4671
|
-
default: null
|
|
4672
|
-
}
|
|
4673
|
-
},
|
|
4674
|
-
parseDOM: [
|
|
4675
|
-
{
|
|
4676
|
-
tag: 'img[src]:not([src^="data:"])'
|
|
4677
|
-
}
|
|
4678
|
-
]
|
|
4679
|
-
},
|
|
4680
|
-
markSet: [],
|
|
4681
|
-
groups: ["block"],
|
|
4759
|
+
group: "block",
|
|
4760
|
+
atom: true,
|
|
4761
|
+
draggable: true,
|
|
4682
4762
|
attrs: {
|
|
4683
|
-
|
|
4684
|
-
hasDefault: true,
|
|
4763
|
+
id: {
|
|
4685
4764
|
default: null
|
|
4686
4765
|
},
|
|
4687
|
-
|
|
4688
|
-
hasDefault: true,
|
|
4766
|
+
definitionId: {
|
|
4689
4767
|
default: null
|
|
4690
4768
|
},
|
|
4691
|
-
|
|
4692
|
-
hasDefault: true,
|
|
4769
|
+
variantId: {
|
|
4693
4770
|
default: null
|
|
4771
|
+
},
|
|
4772
|
+
appearance: {
|
|
4773
|
+
default: "{}"
|
|
4774
|
+
},
|
|
4775
|
+
columns: {
|
|
4776
|
+
default: 1
|
|
4777
|
+
},
|
|
4778
|
+
items: {
|
|
4779
|
+
default: "[]"
|
|
4694
4780
|
}
|
|
4695
4781
|
},
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
contentMatch: {
|
|
4702
|
-
validEnd: true,
|
|
4703
|
-
wrapCache: []
|
|
4704
|
-
},
|
|
4705
|
-
inlineContent: false,
|
|
4706
|
-
isBlock: true,
|
|
4707
|
-
isText: false
|
|
4782
|
+
parseDOM: [
|
|
4783
|
+
{
|
|
4784
|
+
tag: "block-node"
|
|
4785
|
+
}
|
|
4786
|
+
]
|
|
4708
4787
|
}
|
|
4709
4788
|
},
|
|
4710
4789
|
marks: {
|
|
@@ -5352,18 +5431,26 @@ function serializeTextSpanAttribute(spanAttribute) {
|
|
|
5352
5431
|
case "Code":
|
|
5353
5432
|
return { type: "code", attrs: {} };
|
|
5354
5433
|
case "Link":
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
class: null
|
|
5363
|
-
}
|
|
5364
|
-
};
|
|
5434
|
+
if (spanAttribute.link) {
|
|
5435
|
+
return serializeLinkMark(spanAttribute.link, spanAttribute.openInNewWindow ?? false);
|
|
5436
|
+
} else if (spanAttribute.documentationItemId) {
|
|
5437
|
+
return serializeLinkMark(`@page:${spanAttribute.documentationItemId}`, spanAttribute.openInNewWindow ?? false);
|
|
5438
|
+
} else {
|
|
5439
|
+
return serializeLinkMark("about:blank", spanAttribute.openInNewWindow ?? false);
|
|
5440
|
+
}
|
|
5365
5441
|
}
|
|
5366
5442
|
}
|
|
5443
|
+
function serializeLinkMark(href, openInNewWindow) {
|
|
5444
|
+
return {
|
|
5445
|
+
type: "link",
|
|
5446
|
+
attrs: {
|
|
5447
|
+
href,
|
|
5448
|
+
target: openInNewWindow ? "_blank" : "_self",
|
|
5449
|
+
rel: "noopener noreferrer nofollow",
|
|
5450
|
+
class: "tiptap-link"
|
|
5451
|
+
}
|
|
5452
|
+
};
|
|
5453
|
+
}
|
|
5367
5454
|
function serializeAsCustomBlock(block, definition) {
|
|
5368
5455
|
const items = block.data.items.map((i) => {
|
|
5369
5456
|
return {
|
|
@@ -5399,7 +5486,16 @@ function nonNullFilter(item) {
|
|
|
5399
5486
|
|
|
5400
5487
|
// src/yjs/docs-editor/mock.ts
|
|
5401
5488
|
function getMockPageBlockDefinitions() {
|
|
5402
|
-
return blocks
|
|
5489
|
+
return blocks.map((block) => {
|
|
5490
|
+
return {
|
|
5491
|
+
...block,
|
|
5492
|
+
item: {
|
|
5493
|
+
...block.item,
|
|
5494
|
+
// Make sure variatns array is copied
|
|
5495
|
+
variants: [...block.item.variants]
|
|
5496
|
+
}
|
|
5497
|
+
};
|
|
5498
|
+
});
|
|
5403
5499
|
}
|
|
5404
5500
|
var blocks = [
|
|
5405
5501
|
{
|
|
@@ -5407,6 +5503,7 @@ var blocks = [
|
|
|
5407
5503
|
name: "Text",
|
|
5408
5504
|
description: "Plain text",
|
|
5409
5505
|
category: "Text",
|
|
5506
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/text.svg",
|
|
5410
5507
|
searchKeywords: ["paragraph", "rich text"],
|
|
5411
5508
|
item: {
|
|
5412
5509
|
properties: [
|
|
@@ -5468,6 +5565,7 @@ var blocks = [
|
|
|
5468
5565
|
name: "Title 1",
|
|
5469
5566
|
description: "Main sections within the page",
|
|
5470
5567
|
category: "Text",
|
|
5568
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/title-1.svg",
|
|
5471
5569
|
searchKeywords: ["heading", "h1"],
|
|
5472
5570
|
item: {
|
|
5473
5571
|
properties: [
|
|
@@ -5530,6 +5628,7 @@ var blocks = [
|
|
|
5530
5628
|
name: "Title 2",
|
|
5531
5629
|
description: "Section subheadings",
|
|
5532
5630
|
category: "Text",
|
|
5631
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/title-2.svg",
|
|
5533
5632
|
searchKeywords: ["heading", "h2"],
|
|
5534
5633
|
item: {
|
|
5535
5634
|
properties: [
|
|
@@ -5592,6 +5691,7 @@ var blocks = [
|
|
|
5592
5691
|
name: "Title 3",
|
|
5593
5692
|
description: "Further subsections",
|
|
5594
5693
|
category: "Text",
|
|
5694
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/title-3.svg",
|
|
5595
5695
|
searchKeywords: ["heading", "h3"],
|
|
5596
5696
|
item: {
|
|
5597
5697
|
properties: [
|
|
@@ -5654,6 +5754,7 @@ var blocks = [
|
|
|
5654
5754
|
name: "Title 4",
|
|
5655
5755
|
description: "Details in subsections",
|
|
5656
5756
|
category: "Text",
|
|
5757
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/title-4.svg",
|
|
5657
5758
|
searchKeywords: ["heading", "h4"],
|
|
5658
5759
|
item: {
|
|
5659
5760
|
properties: [
|
|
@@ -5716,6 +5817,7 @@ var blocks = [
|
|
|
5716
5817
|
name: "Title 5",
|
|
5717
5818
|
description: "Nuanced details or sub-points",
|
|
5718
5819
|
category: "Text",
|
|
5820
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/title-5.svg",
|
|
5719
5821
|
searchKeywords: ["heading", "h5"],
|
|
5720
5822
|
item: {
|
|
5721
5823
|
properties: [
|
|
@@ -5778,6 +5880,7 @@ var blocks = [
|
|
|
5778
5880
|
name: "Ordered list",
|
|
5779
5881
|
description: "A list with numbers",
|
|
5780
5882
|
category: "Text",
|
|
5883
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/list-ordered.svg",
|
|
5781
5884
|
searchKeywords: ["ol"],
|
|
5782
5885
|
item: {
|
|
5783
5886
|
properties: [
|
|
@@ -5839,6 +5942,7 @@ var blocks = [
|
|
|
5839
5942
|
name: "Unordered list",
|
|
5840
5943
|
description: "A list with bullet points",
|
|
5841
5944
|
category: "Text",
|
|
5945
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/list-unordered.svg",
|
|
5842
5946
|
searchKeywords: ["ul", "bullet points"],
|
|
5843
5947
|
item: {
|
|
5844
5948
|
properties: [
|
|
@@ -5900,6 +6004,7 @@ var blocks = [
|
|
|
5900
6004
|
name: "Divider",
|
|
5901
6005
|
description: "A section divider",
|
|
5902
6006
|
category: "Layout",
|
|
6007
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/divider.svg",
|
|
5903
6008
|
searchKeywords: ["hr", "line", "rule", "separator"],
|
|
5904
6009
|
item: {
|
|
5905
6010
|
properties: [
|
|
@@ -5959,6 +6064,7 @@ var blocks = [
|
|
|
5959
6064
|
name: "Blockquote",
|
|
5960
6065
|
description: "Display a quotation",
|
|
5961
6066
|
category: "Text",
|
|
6067
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/blockquote.svg",
|
|
5962
6068
|
searchKeywords: ["cite"],
|
|
5963
6069
|
item: {
|
|
5964
6070
|
properties: [
|
|
@@ -6021,6 +6127,7 @@ var blocks = [
|
|
|
6021
6127
|
name: "Callout",
|
|
6022
6128
|
description: "Highlight a section of text",
|
|
6023
6129
|
category: "Text",
|
|
6130
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/callout.svg",
|
|
6024
6131
|
searchKeywords: ["banner", "alert", "note", "tip", "warning"],
|
|
6025
6132
|
item: {
|
|
6026
6133
|
properties: [
|
|
@@ -6083,6 +6190,7 @@ var blocks = [
|
|
|
6083
6190
|
name: "Image",
|
|
6084
6191
|
description: "Display an image or Figma frame",
|
|
6085
6192
|
category: "Media",
|
|
6193
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/image.svg",
|
|
6086
6194
|
searchKeywords: ["image", "figma", "frame", "picture", "photo"],
|
|
6087
6195
|
item: {
|
|
6088
6196
|
properties: [
|
|
@@ -6144,6 +6252,7 @@ var blocks = [
|
|
|
6144
6252
|
name: "Shortcut links",
|
|
6145
6253
|
description: "Link to a page or external URL",
|
|
6146
6254
|
category: "Media",
|
|
6255
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/shortcuts.svg",
|
|
6147
6256
|
searchKeywords: [],
|
|
6148
6257
|
item: {
|
|
6149
6258
|
properties: [
|
|
@@ -6160,6 +6269,9 @@ var blocks = [
|
|
|
6160
6269
|
width: "Icon",
|
|
6161
6270
|
aspectRatio: "Square"
|
|
6162
6271
|
},
|
|
6272
|
+
imageOnLeft: {
|
|
6273
|
+
width: "Medium"
|
|
6274
|
+
},
|
|
6163
6275
|
iconOnLeft: {
|
|
6164
6276
|
width: "Icon",
|
|
6165
6277
|
aspectRatio: "Square"
|
|
@@ -6323,6 +6435,7 @@ var blocks = [
|
|
|
6323
6435
|
name: "Accessibility Color Grid",
|
|
6324
6436
|
description: "Visualize accessibility of your color tokens.",
|
|
6325
6437
|
category: "Tokens",
|
|
6438
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/token-a11y-contrast-grid.svg",
|
|
6326
6439
|
searchKeywords: ["color", "accessibility", "grid", "contrast", "blind", "impairment"],
|
|
6327
6440
|
item: {
|
|
6328
6441
|
properties: [
|
|
@@ -6386,6 +6499,7 @@ var blocks = [
|
|
|
6386
6499
|
name: "Embed",
|
|
6387
6500
|
description: "Embed a generic URL",
|
|
6388
6501
|
category: "Media",
|
|
6502
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/embed.svg",
|
|
6389
6503
|
searchKeywords: ["embed", "url", "iframe", "site", "import"],
|
|
6390
6504
|
item: {
|
|
6391
6505
|
properties: [
|
|
@@ -6450,6 +6564,7 @@ var blocks = [
|
|
|
6450
6564
|
name: "YouTube",
|
|
6451
6565
|
description: "Embed a Youtube video",
|
|
6452
6566
|
category: "Media",
|
|
6567
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/embed-youtube.svg",
|
|
6453
6568
|
searchKeywords: ["embed", "video", "player", "upload"],
|
|
6454
6569
|
item: {
|
|
6455
6570
|
properties: [
|
|
@@ -6514,6 +6629,7 @@ var blocks = [
|
|
|
6514
6629
|
name: "Lottie animation",
|
|
6515
6630
|
description: "Preview a Lottie animation",
|
|
6516
6631
|
category: "Media",
|
|
6632
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/lottie.svg",
|
|
6517
6633
|
searchKeywords: ["embed", "lottie", "animation", "rive", "json"],
|
|
6518
6634
|
item: {
|
|
6519
6635
|
properties: [
|
|
@@ -6616,6 +6732,7 @@ var blocks = [
|
|
|
6616
6732
|
name: "Storybook",
|
|
6617
6733
|
description: "Embed Storybook canvas",
|
|
6618
6734
|
category: "Media",
|
|
6735
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/storybook.svg",
|
|
6619
6736
|
searchKeywords: ["storybook", "story", "stories", "example", "preview", "code", "react"],
|
|
6620
6737
|
item: {
|
|
6621
6738
|
properties: [
|
|
@@ -6679,6 +6796,7 @@ var blocks = [
|
|
|
6679
6796
|
name: "Figma embed",
|
|
6680
6797
|
description: "Embed a Figma canvas or prototype",
|
|
6681
6798
|
category: "Media",
|
|
6799
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/embed-figma.svg",
|
|
6682
6800
|
searchKeywords: ["embed", "figma", "design", "prototype", "canvas"],
|
|
6683
6801
|
item: {
|
|
6684
6802
|
properties: [
|
|
@@ -6743,6 +6861,7 @@ var blocks = [
|
|
|
6743
6861
|
name: "Markdown",
|
|
6744
6862
|
description: "Render Markdown URL",
|
|
6745
6863
|
category: "Other",
|
|
6864
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/markdown.svg",
|
|
6746
6865
|
searchKeywords: ["md", "embed", "api", "table", "mdx"],
|
|
6747
6866
|
item: {
|
|
6748
6867
|
properties: [
|
|
@@ -6843,6 +6962,7 @@ var blocks = [
|
|
|
6843
6962
|
name: "Table",
|
|
6844
6963
|
description: "Display a simple table",
|
|
6845
6964
|
category: "Layout",
|
|
6965
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/table.svg",
|
|
6846
6966
|
searchKeywords: ["grid", "data", "spreadsheet", "api"],
|
|
6847
6967
|
item: {
|
|
6848
6968
|
properties: [
|
|
@@ -6902,6 +7022,7 @@ var blocks = [
|
|
|
6902
7022
|
name: "Token detail",
|
|
6903
7023
|
description: "Show a single design tokens",
|
|
6904
7024
|
category: "Tokens",
|
|
7025
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/token-detail.svg",
|
|
6905
7026
|
searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme"],
|
|
6906
7027
|
item: {
|
|
6907
7028
|
properties: [
|
|
@@ -7004,6 +7125,7 @@ var blocks = [
|
|
|
7004
7125
|
name: "Token list",
|
|
7005
7126
|
description: "Show a list of design tokens",
|
|
7006
7127
|
category: "Tokens",
|
|
7128
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/token-list.svg",
|
|
7007
7129
|
searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme"],
|
|
7008
7130
|
item: {
|
|
7009
7131
|
properties: [
|
|
@@ -7111,6 +7233,7 @@ var blocks = [
|
|
|
7111
7233
|
name: "Token group",
|
|
7112
7234
|
description: "Show a group of design tokens",
|
|
7113
7235
|
category: "Tokens",
|
|
7236
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/token-list.svg",
|
|
7114
7237
|
searchKeywords: ["color", "typography", "spacing", "grid", "material", "theme"],
|
|
7115
7238
|
item: {
|
|
7116
7239
|
properties: [
|
|
@@ -7218,6 +7341,7 @@ var blocks = [
|
|
|
7218
7341
|
name: "Code",
|
|
7219
7342
|
description: "Code description",
|
|
7220
7343
|
category: "Code",
|
|
7344
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/code.svg",
|
|
7221
7345
|
searchKeywords: ["code"],
|
|
7222
7346
|
item: {
|
|
7223
7347
|
properties: [
|
|
@@ -7276,6 +7400,7 @@ var blocks = [
|
|
|
7276
7400
|
name: "React code",
|
|
7277
7401
|
description: "Render React code",
|
|
7278
7402
|
category: "Code",
|
|
7403
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/code-react.svg",
|
|
7279
7404
|
searchKeywords: ["code", "react", "snippet", "storybook", "editor", "example"],
|
|
7280
7405
|
item: {
|
|
7281
7406
|
properties: [
|
|
@@ -7410,6 +7535,7 @@ var blocks = [
|
|
|
7410
7535
|
name: "Link",
|
|
7411
7536
|
description: "Preview of a link",
|
|
7412
7537
|
category: "Media",
|
|
7538
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/shortcut-link.svg",
|
|
7413
7539
|
searchKeywords: [],
|
|
7414
7540
|
item: {
|
|
7415
7541
|
properties: [
|
|
@@ -7467,6 +7593,7 @@ var blocks = [
|
|
|
7467
7593
|
name: "Assets",
|
|
7468
7594
|
description: "Display icons or illustrations",
|
|
7469
7595
|
category: "Assets",
|
|
7596
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/assets.svg",
|
|
7470
7597
|
searchKeywords: ["icons", "illustrations", "grid", "svg", "logos", "theme"],
|
|
7471
7598
|
item: {
|
|
7472
7599
|
properties: [
|
|
@@ -7568,6 +7695,7 @@ var blocks = [
|
|
|
7568
7695
|
name: "Figma frames",
|
|
7569
7696
|
description: "Display Figma frames as images",
|
|
7570
7697
|
category: "Figma",
|
|
7698
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/figma-frames.svg",
|
|
7571
7699
|
searchKeywords: ["figma", "frames", "image"],
|
|
7572
7700
|
item: {
|
|
7573
7701
|
properties: [
|
|
@@ -7649,6 +7777,7 @@ var blocks = [
|
|
|
7649
7777
|
name: "Release notes",
|
|
7650
7778
|
description: "Show version release notes",
|
|
7651
7779
|
category: "Other",
|
|
7780
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/release-notes.svg",
|
|
7652
7781
|
searchKeywords: ["version", "changelog", "history"],
|
|
7653
7782
|
item: {
|
|
7654
7783
|
properties: [],
|
|
@@ -7701,6 +7830,7 @@ var blocks = [
|
|
|
7701
7830
|
name: "Component checklist",
|
|
7702
7831
|
description: "Highlight specific features of your components",
|
|
7703
7832
|
category: "Components",
|
|
7833
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/component-checklist.svg",
|
|
7704
7834
|
searchKeywords: ["components", "health", "properties", "overview", "status"],
|
|
7705
7835
|
item: {
|
|
7706
7836
|
properties: [
|
|
@@ -7779,6 +7909,7 @@ var blocks = [
|
|
|
7779
7909
|
name: "Component overview table",
|
|
7780
7910
|
description: "Show the overview of all your components",
|
|
7781
7911
|
category: "Components",
|
|
7912
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/component-overview-table.svg",
|
|
7782
7913
|
searchKeywords: ["components", "health", "properties", "overview", "status"],
|
|
7783
7914
|
item: {
|
|
7784
7915
|
properties: [
|
|
@@ -7849,6 +7980,7 @@ var blocks = [
|
|
|
7849
7980
|
name: "Component health",
|
|
7850
7981
|
description: "Show component health and additional attributes",
|
|
7851
7982
|
category: "Components",
|
|
7983
|
+
icon: "https://cdn-assets.supernova.io/blocks/icons/component-health.svg",
|
|
7852
7984
|
searchKeywords: ["components", "health", "properties", "overview", "status"],
|
|
7853
7985
|
item: {
|
|
7854
7986
|
properties: [
|
|
@@ -7910,7 +8042,7 @@ var blocks = [
|
|
|
7910
8042
|
|
|
7911
8043
|
// src/yjs/docs-editor/prosemirror-to-blocks.ts
|
|
7912
8044
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
7913
|
-
import { z as
|
|
8045
|
+
import { z as z152 } from "zod";
|
|
7914
8046
|
function yDocToPage(yDoc, definitions) {
|
|
7915
8047
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
7916
8048
|
}
|
|
@@ -7950,7 +8082,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
|
|
|
7950
8082
|
return null;
|
|
7951
8083
|
return {
|
|
7952
8084
|
id,
|
|
7953
|
-
title: getProsemirrorAttribute(prosemirrorNode, "title",
|
|
8085
|
+
title: getProsemirrorAttribute(prosemirrorNode, "title", z152.string()) ?? "",
|
|
7954
8086
|
columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter2)
|
|
7955
8087
|
};
|
|
7956
8088
|
}
|
|
@@ -7982,11 +8114,14 @@ function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap) {
|
|
|
7982
8114
|
}).filter(nonNullFilter2);
|
|
7983
8115
|
}
|
|
7984
8116
|
function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap) {
|
|
7985
|
-
|
|
8117
|
+
let definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z152.string());
|
|
7986
8118
|
if (!definitionId) {
|
|
7987
8119
|
console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
|
|
7988
8120
|
return null;
|
|
7989
8121
|
}
|
|
8122
|
+
if (definitionId === "io.supernova.block.token-detail") {
|
|
8123
|
+
definitionId = "io.supernova.block.token-list";
|
|
8124
|
+
}
|
|
7990
8125
|
const definition = definitionsMap.get(definitionId);
|
|
7991
8126
|
if (!definition) {
|
|
7992
8127
|
console.warn(
|
|
@@ -8020,7 +8155,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
8020
8155
|
if (!id)
|
|
8021
8156
|
return null;
|
|
8022
8157
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
8023
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
8158
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z152.string().optional()));
|
|
8024
8159
|
return {
|
|
8025
8160
|
// TODO Artem: indent
|
|
8026
8161
|
id,
|
|
@@ -8122,23 +8257,36 @@ function parseRichTextAttribute(mark) {
|
|
|
8122
8257
|
case "code":
|
|
8123
8258
|
return { type: "Code" };
|
|
8124
8259
|
case "link":
|
|
8125
|
-
|
|
8126
|
-
const href = getProsemirrorAttribute(mark, "href", z147.string().optional());
|
|
8127
|
-
return {
|
|
8128
|
-
type: "Link",
|
|
8129
|
-
openInNewWindow: mark.attrs?.target !== "_self",
|
|
8130
|
-
documentationItemId: itemId,
|
|
8131
|
-
link: href
|
|
8132
|
-
};
|
|
8260
|
+
return parseProsemirrorLink(mark);
|
|
8133
8261
|
}
|
|
8134
8262
|
return null;
|
|
8135
8263
|
}
|
|
8264
|
+
function parseProsemirrorLink(mark) {
|
|
8265
|
+
const href = getProsemirrorAttribute(mark, "href", z152.string().optional());
|
|
8266
|
+
if (!href)
|
|
8267
|
+
return null;
|
|
8268
|
+
const target = getProsemirrorAttribute(mark, "target", z152.string().optional());
|
|
8269
|
+
const openInNewWindow = target === "_blank";
|
|
8270
|
+
if (href.startsWith("@")) {
|
|
8271
|
+
return {
|
|
8272
|
+
type: "Link",
|
|
8273
|
+
openInNewWindow,
|
|
8274
|
+
documentationItemId: href.split(":")[1]
|
|
8275
|
+
};
|
|
8276
|
+
} else {
|
|
8277
|
+
return {
|
|
8278
|
+
type: "Link",
|
|
8279
|
+
openInNewWindow,
|
|
8280
|
+
link: href
|
|
8281
|
+
};
|
|
8282
|
+
}
|
|
8283
|
+
}
|
|
8136
8284
|
function parseAsTable(prosemirrorNode, definition, property) {
|
|
8137
8285
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
8138
8286
|
if (!id)
|
|
8139
8287
|
return null;
|
|
8140
8288
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
8141
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
8289
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z152.boolean().optional()) !== false;
|
|
8142
8290
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
8143
8291
|
if (!tableChild) {
|
|
8144
8292
|
return emptyTable(id, variantId, 0);
|
|
@@ -8185,9 +8333,9 @@ function parseAsTableCell(prosemirrorNode) {
|
|
|
8185
8333
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
8186
8334
|
if (!id)
|
|
8187
8335
|
return null;
|
|
8188
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
8336
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z152.string().optional());
|
|
8189
8337
|
let columnWidth;
|
|
8190
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
8338
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z152.array(z152.number()).optional());
|
|
8191
8339
|
if (columnWidthArray) {
|
|
8192
8340
|
columnWidth = columnWidthArray[0];
|
|
8193
8341
|
}
|
|
@@ -8225,7 +8373,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
8225
8373
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
8226
8374
|
};
|
|
8227
8375
|
case "image":
|
|
8228
|
-
const items = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
8376
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", z152.string());
|
|
8229
8377
|
if (!items)
|
|
8230
8378
|
return null;
|
|
8231
8379
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
@@ -8330,7 +8478,7 @@ function parseAsCustomBlock(prosemirrorNode, definition) {
|
|
|
8330
8478
|
};
|
|
8331
8479
|
}
|
|
8332
8480
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
8333
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
8481
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z152.string());
|
|
8334
8482
|
if (!itemsString)
|
|
8335
8483
|
return null;
|
|
8336
8484
|
const itemsJson = JSON.parse(itemsString);
|
|
@@ -8342,18 +8490,18 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
8342
8490
|
}
|
|
8343
8491
|
function parseAppearance(prosemirrorNode) {
|
|
8344
8492
|
let appearance = {};
|
|
8345
|
-
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance",
|
|
8493
|
+
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance", z152.string().optional());
|
|
8346
8494
|
if (rawAppearanceString) {
|
|
8347
8495
|
const parsedAppearance = PageBlockAppearanceV2.safeParse(JSON.parse(rawAppearanceString));
|
|
8348
8496
|
if (parsedAppearance.success) {
|
|
8349
8497
|
appearance = parsedAppearance.data;
|
|
8350
8498
|
}
|
|
8351
8499
|
}
|
|
8352
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
8500
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z152.number().optional());
|
|
8353
8501
|
if (columns) {
|
|
8354
8502
|
appearance.numberOfColumns = columns;
|
|
8355
8503
|
}
|
|
8356
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
8504
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z152.string().optional());
|
|
8357
8505
|
if (backgroundColor) {
|
|
8358
8506
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
8359
8507
|
if (parsedColor.success) {
|
|
@@ -8444,13 +8592,13 @@ function valueSchemaForPropertyType(type) {
|
|
|
8444
8592
|
}
|
|
8445
8593
|
}
|
|
8446
8594
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
8447
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
8595
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z152.string());
|
|
8448
8596
|
if (!id)
|
|
8449
8597
|
console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
8450
8598
|
return id;
|
|
8451
8599
|
}
|
|
8452
8600
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
8453
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
8601
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z152.string()));
|
|
8454
8602
|
}
|
|
8455
8603
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
8456
8604
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|
|
@@ -8495,6 +8643,8 @@ export {
|
|
|
8495
8643
|
DTODocumentationGroupUpdateActionOutputV2,
|
|
8496
8644
|
DTODocumentationGroupV2,
|
|
8497
8645
|
DTODocumentationHierarchyV2,
|
|
8646
|
+
DTODocumentationLinkPreviewRequest,
|
|
8647
|
+
DTODocumentationLinkPreviewResponse,
|
|
8498
8648
|
DTODocumentationPageCreateActionInputV2,
|
|
8499
8649
|
DTODocumentationPageCreateActionOutputV2,
|
|
8500
8650
|
DTODocumentationPageDeleteActionInputV2,
|
|
@@ -8538,8 +8688,10 @@ export {
|
|
|
8538
8688
|
DTOWorkspaceRole,
|
|
8539
8689
|
DocumentationPageEditorModel,
|
|
8540
8690
|
DocumentationPageV1DTO,
|
|
8691
|
+
NpmRegistryInput,
|
|
8541
8692
|
PageBlockEditorModel,
|
|
8542
8693
|
PageSectionEditorModel,
|
|
8694
|
+
WorkspaceConfigurationPayload,
|
|
8543
8695
|
blockDefinitionForBlock,
|
|
8544
8696
|
blockToProsemirrorNode,
|
|
8545
8697
|
buildDocPagePublishPaths,
|
|
@@ -8562,6 +8714,7 @@ export {
|
|
|
8562
8714
|
prosemirrorNodesToBlocks,
|
|
8563
8715
|
sectionToProsemirrorNode,
|
|
8564
8716
|
serializeAsCustomBlock,
|
|
8717
|
+
validateSsoPayload,
|
|
8565
8718
|
yDocToPage,
|
|
8566
8719
|
yXmlFragmentToPage,
|
|
8567
8720
|
yjsToDocumentationHierarchy,
|