@supernova-studio/client 0.25.0 → 0.26.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 +1296 -83
- package/dist/index.d.ts +1296 -83
- package/dist/index.js +236 -86
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1224 -1074
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/dto/elements/documentation/group-action.ts +8 -8
- package/src/api/dto/elements/documentation/group.ts +3 -3
- package/src/api/dto/elements/elements-action-v2.ts +4 -4
- package/src/yjs/docs-editor/blocks-to-prosemirror.ts +106 -4
- package/src/yjs/docs-editor/model/block.ts +5 -2
- package/src/yjs/docs-editor/model/page.ts +2 -2
- package/src/yjs/docs-editor/prosemirror-to-blocks.ts +111 -23
package/dist/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ import { z as z15 } from "zod";
|
|
|
19
19
|
import { z as z18 } from "zod";
|
|
20
20
|
import { z as z16 } from "zod";
|
|
21
21
|
import { z as z17 } from "zod";
|
|
22
|
-
import { z as
|
|
22
|
+
import { z as z88 } from "zod";
|
|
23
23
|
import { z as z19 } from "zod";
|
|
24
24
|
import { z as z21 } from "zod";
|
|
25
25
|
import { z as z20 } from "zod";
|
|
@@ -45,9 +45,9 @@ import { z as z37 } from "zod";
|
|
|
45
45
|
import { z as z43 } from "zod";
|
|
46
46
|
import { z as z42 } from "zod";
|
|
47
47
|
import { z as z41 } from "zod";
|
|
48
|
-
import { z as z44 } from "zod";
|
|
49
|
-
import { z as z45 } from "zod";
|
|
50
48
|
import { z as z46 } from "zod";
|
|
49
|
+
import { z as z45 } from "zod";
|
|
50
|
+
import { z as z44 } 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";
|
|
@@ -75,54 +75,54 @@ import { z as z70 } from "zod";
|
|
|
75
75
|
import { z as z71 } from "zod";
|
|
76
76
|
import { z as z72 } from "zod";
|
|
77
77
|
import { z as z73 } from "zod";
|
|
78
|
-
import { z as z75 } from "zod";
|
|
79
78
|
import { z as z74 } from "zod";
|
|
80
79
|
import { z as z76 } from "zod";
|
|
80
|
+
import { z as z75 } from "zod";
|
|
81
81
|
import { z as z77 } from "zod";
|
|
82
|
-
import { z as z85 } from "zod";
|
|
83
82
|
import { z as z78 } from "zod";
|
|
84
|
-
import { z as
|
|
83
|
+
import { z as z86 } from "zod";
|
|
85
84
|
import { z as z79 } from "zod";
|
|
86
85
|
import { z as z81 } from "zod";
|
|
86
|
+
import { z as z80 } from "zod";
|
|
87
87
|
import { z as z82 } from "zod";
|
|
88
88
|
import { z as z83 } from "zod";
|
|
89
89
|
import { z as z84 } from "zod";
|
|
90
|
-
import { z as
|
|
91
|
-
import { z as
|
|
92
|
-
import { z as z91 } from "zod";
|
|
93
|
-
import { z as z90 } from "zod";
|
|
90
|
+
import { z as z85 } from "zod";
|
|
91
|
+
import { z as z87 } from "zod";
|
|
94
92
|
import { z as z89 } from "zod";
|
|
95
93
|
import { z as z92 } from "zod";
|
|
94
|
+
import { z as z91 } from "zod";
|
|
95
|
+
import { z as z90 } from "zod";
|
|
96
96
|
import { z as z93 } from "zod";
|
|
97
|
-
import { z as z103 } from "zod";
|
|
98
97
|
import { z as z94 } from "zod";
|
|
98
|
+
import { z as z104 } from "zod";
|
|
99
99
|
import { z as z95 } from "zod";
|
|
100
|
-
import { z as z97 } from "zod";
|
|
101
100
|
import { z as z96 } from "zod";
|
|
102
|
-
import { z as z99 } from "zod";
|
|
103
101
|
import { z as z98 } from "zod";
|
|
102
|
+
import { z as z97 } from "zod";
|
|
104
103
|
import { z as z100 } from "zod";
|
|
104
|
+
import { z as z99 } from "zod";
|
|
105
105
|
import { z as z101 } from "zod";
|
|
106
106
|
import { z as z102 } from "zod";
|
|
107
|
-
import { z as
|
|
107
|
+
import { z as z103 } from "zod";
|
|
108
108
|
import { z as z105 } from "zod";
|
|
109
109
|
import { z as z106 } from "zod";
|
|
110
110
|
import { z as z107 } from "zod";
|
|
111
111
|
import { z as z108 } from "zod";
|
|
112
112
|
import { z as z109 } from "zod";
|
|
113
|
-
import { z as z112 } from "zod";
|
|
114
113
|
import { z as z110 } from "zod";
|
|
115
|
-
import { z as z111 } from "zod";
|
|
116
114
|
import { z as z113 } from "zod";
|
|
117
|
-
import { z as
|
|
115
|
+
import { z as z111 } from "zod";
|
|
116
|
+
import { z as z112 } from "zod";
|
|
118
117
|
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
121
|
import { z as z117 } from "zod";
|
|
122
|
-
import { z as
|
|
123
|
-
import { z as z121 } from "zod";
|
|
122
|
+
import { z as z118 } from "zod";
|
|
124
123
|
import { z as z120 } from "zod";
|
|
125
124
|
import { z as z122 } from "zod";
|
|
125
|
+
import { z as z121 } from "zod";
|
|
126
126
|
import { z as z123 } from "zod";
|
|
127
127
|
import { z as z124 } from "zod";
|
|
128
128
|
import { z as z125 } from "zod";
|
|
@@ -130,6 +130,7 @@ import { z as z126 } from "zod";
|
|
|
130
130
|
import { z as z127 } from "zod";
|
|
131
131
|
import { z as z128 } from "zod";
|
|
132
132
|
import { z as z129 } from "zod";
|
|
133
|
+
import { z as z130 } from "zod";
|
|
133
134
|
import slugifyImplementation from "@sindresorhus/slugify";
|
|
134
135
|
var PluginOAuthRequestSchema = z.object({
|
|
135
136
|
id: z.string(),
|
|
@@ -400,9 +401,11 @@ var DataSourceFigmaRemote = z15.object({
|
|
|
400
401
|
ownerName: z15.string(),
|
|
401
402
|
scope: DataSourceFigmaScope,
|
|
402
403
|
state: DataSourceFigmaState,
|
|
404
|
+
requiresSync: z15.boolean().optional().transform((v) => v ?? false),
|
|
403
405
|
lastImportMetadata: DataSourceFigmaImportMetadata.optional(),
|
|
404
406
|
downloadChunkSize: z15.number().optional(),
|
|
405
|
-
figmaRenderChunkSize: z15.number().optional()
|
|
407
|
+
figmaRenderChunkSize: z15.number().optional(),
|
|
408
|
+
maxFileDepth: z15.number().optional()
|
|
406
409
|
});
|
|
407
410
|
var DataSourceTokenStudioRemote = z15.object({
|
|
408
411
|
type: z15.literal(DataSourceRemoteType.Enum.TokenStudio)
|
|
@@ -1193,148 +1196,218 @@ var DocumentationPageElementDataV2 = z43.object({
|
|
|
1193
1196
|
value: DocumentationPageDataV1,
|
|
1194
1197
|
valueV2: DocumentationPageDataV2.optional()
|
|
1195
1198
|
});
|
|
1196
|
-
var
|
|
1197
|
-
|
|
1199
|
+
var DesignElementOrigin = z44.object({
|
|
1200
|
+
id: z44.string(),
|
|
1201
|
+
sourceId: z44.string(),
|
|
1202
|
+
name: z44.string()
|
|
1203
|
+
});
|
|
1204
|
+
var DesignElementBase = z44.object({
|
|
1205
|
+
id: z44.string(),
|
|
1206
|
+
persistentId: z44.string(),
|
|
1207
|
+
meta: ObjectMeta,
|
|
1208
|
+
designSystemVersionId: z44.string(),
|
|
1209
|
+
createdAt: z44.coerce.date(),
|
|
1210
|
+
updatedAt: z44.coerce.date()
|
|
1211
|
+
});
|
|
1212
|
+
var DesignElementImportedBase = DesignElementBase.extend({
|
|
1213
|
+
origin: DesignElementOrigin
|
|
1214
|
+
});
|
|
1215
|
+
var DesignElementGroupablePart = z44.object({
|
|
1216
|
+
parentPersistentId: z44.string().optional(),
|
|
1217
|
+
sortOrder: z44.number()
|
|
1218
|
+
});
|
|
1219
|
+
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
1220
|
+
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
1221
|
+
parentPersistentId: z44.string()
|
|
1222
|
+
});
|
|
1223
|
+
var DesignElementBrandedPart = z44.object({
|
|
1224
|
+
brandPersistentId: z44.string()
|
|
1225
|
+
});
|
|
1226
|
+
var DesignElementSlugPart = z44.object({
|
|
1227
|
+
slug: z44.string().optional(),
|
|
1228
|
+
userSlug: z44.string().optional()
|
|
1229
|
+
});
|
|
1230
|
+
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
1231
|
+
data: PageBlockDataV2
|
|
1232
|
+
});
|
|
1233
|
+
var PageBlockEditorModelV2 = z45.object({
|
|
1234
|
+
id: z45.string(),
|
|
1235
|
+
type: z45.literal("Block"),
|
|
1236
|
+
data: PageBlockDataV2
|
|
1237
|
+
});
|
|
1238
|
+
var PageSectionTypeV2 = z46.enum(["Tabs"]);
|
|
1239
|
+
var PageSectionColumnV2 = z46.object({
|
|
1240
|
+
id: z46.string(),
|
|
1241
|
+
blocks: z46.array(PageBlockEditorModelV2)
|
|
1242
|
+
});
|
|
1243
|
+
var PageSectionItemV2 = z46.object({
|
|
1244
|
+
id: z46.string(),
|
|
1245
|
+
title: z46.string(),
|
|
1246
|
+
columns: z46.array(PageSectionColumnV2)
|
|
1247
|
+
});
|
|
1248
|
+
var PageSectionPaddingV2 = z46.object({
|
|
1249
|
+
top: z46.number().optional(),
|
|
1250
|
+
bottom: z46.number().optional(),
|
|
1251
|
+
left: z46.number().optional(),
|
|
1252
|
+
right: z46.number().optional()
|
|
1253
|
+
});
|
|
1254
|
+
var PageSectionAppearanceV2 = z46.object({
|
|
1255
|
+
expandToEdges: z46.boolean(),
|
|
1256
|
+
contentExpandToEdges: z46.boolean(),
|
|
1257
|
+
backgroundColor: PageBlockColorV2.optional(),
|
|
1258
|
+
foregroundColor: PageBlockColorV2.optional(),
|
|
1259
|
+
padding: PageSectionPaddingV2.optional()
|
|
1260
|
+
});
|
|
1261
|
+
var PageSectionEditorModelV2 = z46.object({
|
|
1262
|
+
id: z46.string(),
|
|
1263
|
+
type: z46.literal("Section"),
|
|
1264
|
+
variantId: z46.string().optional(),
|
|
1265
|
+
sectionType: PageSectionTypeV2,
|
|
1266
|
+
appearance: PageSectionAppearanceV2,
|
|
1267
|
+
items: z46.array(PageSectionItemV2)
|
|
1268
|
+
});
|
|
1269
|
+
var DurationUnit = z47.enum(["Ms"]);
|
|
1270
|
+
var DurationValue = z47.object({
|
|
1198
1271
|
unit: DurationUnit,
|
|
1199
|
-
measure:
|
|
1272
|
+
measure: z47.number()
|
|
1200
1273
|
});
|
|
1201
1274
|
var DurationTokenData = tokenAliasOrValue(DurationValue);
|
|
1202
|
-
var FigmaFileStructureNodeType =
|
|
1203
|
-
var FigmaFileStructureNodeBase =
|
|
1204
|
-
id:
|
|
1205
|
-
name:
|
|
1275
|
+
var FigmaFileStructureNodeType = z48.enum(["DOCUMENT", "CANVAS", "FRAME", "COMPONENT", "COMPONENT_SET"]);
|
|
1276
|
+
var FigmaFileStructureNodeBase = z48.object({
|
|
1277
|
+
id: z48.string(),
|
|
1278
|
+
name: z48.string(),
|
|
1206
1279
|
type: FigmaFileStructureNodeType,
|
|
1207
1280
|
size: SizeOrUndefined,
|
|
1208
|
-
parentComponentSetId:
|
|
1281
|
+
parentComponentSetId: z48.string().optional()
|
|
1209
1282
|
});
|
|
1210
1283
|
var FigmaFileStructureNode = FigmaFileStructureNodeBase.extend({
|
|
1211
|
-
children:
|
|
1284
|
+
children: z48.lazy(() => FigmaFileStructureNode.array())
|
|
1212
1285
|
});
|
|
1213
|
-
var FigmaFileStructureStatistics =
|
|
1214
|
-
frames:
|
|
1215
|
-
components:
|
|
1216
|
-
componentSets:
|
|
1286
|
+
var FigmaFileStructureStatistics = z48.object({
|
|
1287
|
+
frames: z48.number().nullable().optional().transform((v) => v ?? 0),
|
|
1288
|
+
components: z48.number().nullable().optional().transform((v) => v ?? 0),
|
|
1289
|
+
componentSets: z48.number().nullable().optional().transform((v) => v ?? 0)
|
|
1217
1290
|
});
|
|
1218
|
-
var FigmaFileStructureElementData =
|
|
1219
|
-
value:
|
|
1291
|
+
var FigmaFileStructureElementData = z48.object({
|
|
1292
|
+
value: z48.object({
|
|
1220
1293
|
structure: FigmaFileStructureNode,
|
|
1221
1294
|
assetsInFile: FigmaFileStructureStatistics
|
|
1222
1295
|
})
|
|
1223
1296
|
});
|
|
1224
|
-
var FigmaNodeReferenceData =
|
|
1225
|
-
structureElementId:
|
|
1226
|
-
nodeId:
|
|
1227
|
-
fileId:
|
|
1228
|
-
valid:
|
|
1297
|
+
var FigmaNodeReferenceData = z49.object({
|
|
1298
|
+
structureElementId: z49.string(),
|
|
1299
|
+
nodeId: z49.string(),
|
|
1300
|
+
fileId: z49.string().optional(),
|
|
1301
|
+
valid: z49.boolean(),
|
|
1229
1302
|
// Asset data
|
|
1230
|
-
assetId:
|
|
1231
|
-
assetScale:
|
|
1232
|
-
assetWidth:
|
|
1233
|
-
assetHeight:
|
|
1234
|
-
assetUrl:
|
|
1235
|
-
assetOriginKey:
|
|
1236
|
-
});
|
|
1237
|
-
var FigmaNodeReferenceElementData =
|
|
1303
|
+
assetId: z49.string().optional(),
|
|
1304
|
+
assetScale: z49.number().optional(),
|
|
1305
|
+
assetWidth: z49.number().optional(),
|
|
1306
|
+
assetHeight: z49.number().optional(),
|
|
1307
|
+
assetUrl: z49.string().optional(),
|
|
1308
|
+
assetOriginKey: z49.string().optional()
|
|
1309
|
+
});
|
|
1310
|
+
var FigmaNodeReferenceElementData = z49.object({
|
|
1238
1311
|
value: FigmaNodeReferenceData
|
|
1239
1312
|
});
|
|
1240
|
-
var FontFamilyValue =
|
|
1313
|
+
var FontFamilyValue = z50.string();
|
|
1241
1314
|
var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
|
|
1242
|
-
var FontSizeUnit =
|
|
1243
|
-
var FontSizeValue =
|
|
1315
|
+
var FontSizeUnit = z51.enum(["Pixels", "Rem", "Percent"]);
|
|
1316
|
+
var FontSizeValue = z51.object({
|
|
1244
1317
|
unit: FontSizeUnit,
|
|
1245
|
-
measure:
|
|
1318
|
+
measure: z51.number()
|
|
1246
1319
|
});
|
|
1247
1320
|
var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
|
|
1248
|
-
var FontWeightValue =
|
|
1321
|
+
var FontWeightValue = z52.string();
|
|
1249
1322
|
var FontWeightTokenData = tokenAliasOrValue(FontWeightValue);
|
|
1250
|
-
var GradientType =
|
|
1251
|
-
var GradientStop =
|
|
1252
|
-
position:
|
|
1323
|
+
var GradientType = z53.enum(["Linear", "Radial", "Angular"]);
|
|
1324
|
+
var GradientStop = z53.object({
|
|
1325
|
+
position: z53.number(),
|
|
1253
1326
|
color: ColorTokenData
|
|
1254
1327
|
});
|
|
1255
|
-
var GradientLayerValue =
|
|
1328
|
+
var GradientLayerValue = z53.object({
|
|
1256
1329
|
from: Point2D,
|
|
1257
1330
|
to: Point2D,
|
|
1258
1331
|
type: GradientType,
|
|
1259
|
-
aspectRatio: nullishToOptional(
|
|
1332
|
+
aspectRatio: nullishToOptional(z53.number()),
|
|
1260
1333
|
// z.number(),
|
|
1261
|
-
stops:
|
|
1334
|
+
stops: z53.array(GradientStop).min(2)
|
|
1262
1335
|
});
|
|
1263
1336
|
var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
1264
|
-
var GradientTokenValue =
|
|
1337
|
+
var GradientTokenValue = z53.array(GradientLayerData);
|
|
1265
1338
|
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
1266
|
-
var DocumentationGroupBehavior =
|
|
1267
|
-
var ElementGroupDataDeprecated =
|
|
1339
|
+
var DocumentationGroupBehavior = z54.enum(["Group", "Tabs"]);
|
|
1340
|
+
var ElementGroupDataDeprecated = z54.object({
|
|
1268
1341
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1269
1342
|
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1270
1343
|
});
|
|
1271
|
-
var ElementGroupDataV2 =
|
|
1344
|
+
var ElementGroupDataV2 = z54.object({
|
|
1272
1345
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1273
1346
|
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1274
1347
|
});
|
|
1275
|
-
var ElementGroupElementData =
|
|
1348
|
+
var ElementGroupElementData = z54.object({
|
|
1276
1349
|
value: ElementGroupDataDeprecated.optional(),
|
|
1277
1350
|
valueV2: ElementGroupDataV2.optional()
|
|
1278
1351
|
});
|
|
1279
|
-
var LetterSpacingUnit =
|
|
1280
|
-
var LetterSpacingValue =
|
|
1352
|
+
var LetterSpacingUnit = z55.enum(["Pixels", "Rem", "Percent"]);
|
|
1353
|
+
var LetterSpacingValue = z55.object({
|
|
1281
1354
|
unit: LetterSpacingUnit,
|
|
1282
|
-
measure:
|
|
1355
|
+
measure: z55.number()
|
|
1283
1356
|
});
|
|
1284
1357
|
var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
|
|
1285
|
-
var LineHeightUnit =
|
|
1286
|
-
var LineHeightValue =
|
|
1358
|
+
var LineHeightUnit = z56.enum(["Pixels", "Rem", "Percent", "Raw"]);
|
|
1359
|
+
var LineHeightValue = z56.object({
|
|
1287
1360
|
unit: LineHeightUnit,
|
|
1288
|
-
measure:
|
|
1361
|
+
measure: z56.number()
|
|
1289
1362
|
});
|
|
1290
1363
|
var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
|
|
1291
|
-
var ParagraphIndentUnit =
|
|
1292
|
-
var ParagraphIndentValue =
|
|
1364
|
+
var ParagraphIndentUnit = z57.enum(["Pixels", "Rem", "Percent"]);
|
|
1365
|
+
var ParagraphIndentValue = z57.object({
|
|
1293
1366
|
unit: ParagraphIndentUnit,
|
|
1294
|
-
measure:
|
|
1367
|
+
measure: z57.number()
|
|
1295
1368
|
});
|
|
1296
1369
|
var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
|
|
1297
|
-
var ParagraphSpacingUnit =
|
|
1298
|
-
var ParagraphSpacingValue =
|
|
1370
|
+
var ParagraphSpacingUnit = z58.enum(["Pixels", "Rem", "Percent"]);
|
|
1371
|
+
var ParagraphSpacingValue = z58.object({
|
|
1299
1372
|
unit: ParagraphSpacingUnit,
|
|
1300
|
-
measure:
|
|
1373
|
+
measure: z58.number()
|
|
1301
1374
|
});
|
|
1302
1375
|
var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
|
|
1303
|
-
var ProductCopyValue =
|
|
1376
|
+
var ProductCopyValue = z59.string();
|
|
1304
1377
|
var ProductCopyTokenData = tokenAliasOrValue(ProductCopyValue);
|
|
1305
|
-
var ShadowType =
|
|
1306
|
-
var ShadowLayerValue =
|
|
1378
|
+
var ShadowType = z60.enum(["Drop", "Inner"]);
|
|
1379
|
+
var ShadowLayerValue = z60.object({
|
|
1307
1380
|
color: ColorTokenData,
|
|
1308
|
-
x:
|
|
1309
|
-
y:
|
|
1310
|
-
radius:
|
|
1311
|
-
spread:
|
|
1381
|
+
x: z60.number(),
|
|
1382
|
+
y: z60.number(),
|
|
1383
|
+
radius: z60.number(),
|
|
1384
|
+
spread: z60.number(),
|
|
1312
1385
|
opacity: OpacityTokenData,
|
|
1313
1386
|
type: ShadowType
|
|
1314
1387
|
});
|
|
1315
1388
|
var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
1316
|
-
var ShadowTokenData = tokenAliasOrValue(
|
|
1317
|
-
var SizeUnit =
|
|
1318
|
-
var SizeValue =
|
|
1389
|
+
var ShadowTokenData = tokenAliasOrValue(z60.array(ShadowTokenDataBase));
|
|
1390
|
+
var SizeUnit = z61.enum(["Pixels", "Rem", "Percent"]);
|
|
1391
|
+
var SizeValue = z61.object({
|
|
1319
1392
|
unit: SizeUnit,
|
|
1320
|
-
measure:
|
|
1393
|
+
measure: z61.number()
|
|
1321
1394
|
});
|
|
1322
1395
|
var SizeTokenData = tokenAliasOrValue(SizeValue);
|
|
1323
|
-
var SpaceUnit =
|
|
1324
|
-
var SpaceValue =
|
|
1396
|
+
var SpaceUnit = z62.enum(["Pixels", "Rem", "Percent"]);
|
|
1397
|
+
var SpaceValue = z62.object({
|
|
1325
1398
|
unit: SpaceUnit,
|
|
1326
|
-
measure:
|
|
1399
|
+
measure: z62.number()
|
|
1327
1400
|
});
|
|
1328
1401
|
var SpaceTokenData = tokenAliasOrValue(SpaceValue);
|
|
1329
|
-
var StringValue =
|
|
1402
|
+
var StringValue = z63.string();
|
|
1330
1403
|
var StringTokenData = tokenAliasOrValue(StringValue);
|
|
1331
|
-
var TextCase =
|
|
1404
|
+
var TextCase = z64.enum(["Original", "Upper", "Lower", "Camel", "SmallCaps"]);
|
|
1332
1405
|
var TextCaseValue = TextCase;
|
|
1333
1406
|
var TextCaseTokenData = tokenAliasOrValue(TextCaseValue);
|
|
1334
|
-
var TextDecoration =
|
|
1407
|
+
var TextDecoration = z65.enum(["None", "Underline", "Strikethrough"]);
|
|
1335
1408
|
var TextDecorationValue = TextDecoration;
|
|
1336
1409
|
var TextDecorationTokenData = tokenAliasOrValue(TextDecorationValue);
|
|
1337
|
-
var TypographyValue =
|
|
1410
|
+
var TypographyValue = z66.object({
|
|
1338
1411
|
fontSize: FontSizeTokenData,
|
|
1339
1412
|
fontFamily: FontFamilyTokenData,
|
|
1340
1413
|
fontWeight: FontWeightTokenData,
|
|
@@ -1346,77 +1419,46 @@ var TypographyValue = z63.object({
|
|
|
1346
1419
|
paragraphSpacing: ParagraphSpacingTokenData.optional()
|
|
1347
1420
|
});
|
|
1348
1421
|
var TypographyTokenData = tokenAliasOrValue(TypographyValue);
|
|
1349
|
-
var Visibility =
|
|
1422
|
+
var Visibility = z67.enum(["Hidden", "Visible"]);
|
|
1350
1423
|
var VisibilityValue = Visibility;
|
|
1351
1424
|
var VisibilityTokenData = tokenAliasOrValue(VisibilityValue);
|
|
1352
|
-
var ZIndexUnit =
|
|
1353
|
-
var ZIndexValue =
|
|
1425
|
+
var ZIndexUnit = z68.enum(["Raw"]);
|
|
1426
|
+
var ZIndexValue = z68.object({
|
|
1354
1427
|
unit: ZIndexUnit,
|
|
1355
|
-
measure:
|
|
1428
|
+
measure: z68.number()
|
|
1356
1429
|
});
|
|
1357
1430
|
var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
|
|
1358
|
-
var
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
});
|
|
1363
|
-
var DesignElementBase = z66.object({
|
|
1364
|
-
id: z66.string(),
|
|
1365
|
-
persistentId: z66.string(),
|
|
1366
|
-
meta: ObjectMeta,
|
|
1367
|
-
designSystemVersionId: z66.string(),
|
|
1368
|
-
createdAt: z66.coerce.date(),
|
|
1369
|
-
updatedAt: z66.coerce.date()
|
|
1431
|
+
var ComponentOriginPart = z69.object({
|
|
1432
|
+
nodeId: z69.string().optional(),
|
|
1433
|
+
width: z69.number().optional(),
|
|
1434
|
+
height: z69.number().optional()
|
|
1370
1435
|
});
|
|
1371
|
-
var
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
var DesignElementGroupablePart = z66.object({
|
|
1375
|
-
parentPersistentId: z66.string().optional(),
|
|
1376
|
-
sortOrder: z66.number()
|
|
1377
|
-
});
|
|
1378
|
-
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
1379
|
-
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
1380
|
-
parentPersistentId: z66.string()
|
|
1381
|
-
});
|
|
1382
|
-
var DesignElementBrandedPart = z66.object({
|
|
1383
|
-
brandPersistentId: z66.string()
|
|
1384
|
-
});
|
|
1385
|
-
var DesignElementSlugPart = z66.object({
|
|
1386
|
-
slug: z66.string().optional(),
|
|
1387
|
-
userSlug: z66.string().optional()
|
|
1388
|
-
});
|
|
1389
|
-
var ComponentOriginPart = z67.object({
|
|
1390
|
-
nodeId: z67.string().optional(),
|
|
1391
|
-
width: z67.number().optional(),
|
|
1392
|
-
height: z67.number().optional()
|
|
1393
|
-
});
|
|
1394
|
-
var ComponentAsset = z67.object({
|
|
1395
|
-
assetId: z67.string(),
|
|
1396
|
-
assetPath: z67.string()
|
|
1436
|
+
var ComponentAsset = z69.object({
|
|
1437
|
+
assetId: z69.string(),
|
|
1438
|
+
assetPath: z69.string()
|
|
1397
1439
|
});
|
|
1398
1440
|
var ComponentOrigin = DesignElementOrigin.extend(ComponentOriginPart.shape);
|
|
1399
1441
|
var Component = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
1400
1442
|
origin: ComponentOrigin.optional(),
|
|
1401
1443
|
thumbnail: ComponentAsset,
|
|
1402
1444
|
svg: ComponentAsset.optional(),
|
|
1403
|
-
isAsset:
|
|
1445
|
+
isAsset: z69.boolean()
|
|
1404
1446
|
});
|
|
1405
1447
|
var DocumentationPageV1 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1406
|
-
shortPersistentId:
|
|
1448
|
+
shortPersistentId: z70.string(),
|
|
1407
1449
|
data: DocumentationPageDataV1
|
|
1408
1450
|
});
|
|
1409
1451
|
var DocumentationPageV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1410
|
-
shortPersistentId:
|
|
1452
|
+
shortPersistentId: z71.string(),
|
|
1411
1453
|
data: DocumentationPageDataV2.extend({
|
|
1412
|
-
oldBlocks:
|
|
1454
|
+
oldBlocks: z71.array(PageBlockV1).optional()
|
|
1413
1455
|
})
|
|
1414
1456
|
});
|
|
1415
|
-
var FigmaFileStructureOrigin =
|
|
1416
|
-
sourceId:
|
|
1417
|
-
fileId:
|
|
1457
|
+
var FigmaFileStructureOrigin = z72.object({
|
|
1458
|
+
sourceId: z72.string(),
|
|
1459
|
+
fileId: z72.string().optional()
|
|
1418
1460
|
});
|
|
1419
|
-
var FigmaFileStructureData =
|
|
1461
|
+
var FigmaFileStructureData = z72.object({
|
|
1420
1462
|
rootNode: FigmaFileStructureNode,
|
|
1421
1463
|
assetsInFile: FigmaFileStructureStatistics
|
|
1422
1464
|
});
|
|
@@ -1424,29 +1466,22 @@ var FigmaFileStructure = DesignElementBase.extend({
|
|
|
1424
1466
|
origin: FigmaFileStructureOrigin,
|
|
1425
1467
|
data: FigmaFileStructureData
|
|
1426
1468
|
});
|
|
1427
|
-
var FigmaNodeReferenceOrigin =
|
|
1428
|
-
sourceId:
|
|
1469
|
+
var FigmaNodeReferenceOrigin = z73.object({
|
|
1470
|
+
sourceId: z73.string()
|
|
1429
1471
|
});
|
|
1430
1472
|
var FigmaNodeReference = DesignElementBase.extend({
|
|
1431
1473
|
data: FigmaNodeReferenceData,
|
|
1432
1474
|
origin: FigmaNodeReferenceOrigin
|
|
1433
1475
|
});
|
|
1434
1476
|
var ElementGroup = DesignElementBase.extend(DesignElementGroupablePart.shape).extend(DesignElementSlugPart.shape).extend(DesignElementBrandedPart.partial().shape).extend({
|
|
1435
|
-
shortPersistentId:
|
|
1477
|
+
shortPersistentId: z74.string().optional(),
|
|
1436
1478
|
childType: DesignElementType,
|
|
1437
1479
|
data: ElementGroupDataV2.optional()
|
|
1438
1480
|
});
|
|
1439
1481
|
var BrandedElementGroup = ElementGroup.extend(DesignElementBrandedPart.shape);
|
|
1440
|
-
var
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
var PageBlockEditorModelV2 = z73.object({
|
|
1444
|
-
id: z73.string(),
|
|
1445
|
-
data: PageBlockDataV2
|
|
1446
|
-
});
|
|
1447
|
-
var DesignTokenOriginPart = z74.object({
|
|
1448
|
-
referenceOriginId: z74.string().optional(),
|
|
1449
|
-
referencePersistentId: z74.string().optional()
|
|
1482
|
+
var DesignTokenOriginPart = z75.object({
|
|
1483
|
+
referenceOriginId: z75.string().optional(),
|
|
1484
|
+
referencePersistentId: z75.string().optional()
|
|
1450
1485
|
});
|
|
1451
1486
|
var DesignTokenOrigin = DesignElementOrigin.extend(DesignTokenOriginPart.shape);
|
|
1452
1487
|
var DesignTokenBase = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
@@ -1458,111 +1493,111 @@ var UpdateDesignTokenBase = DesignTokenBase.omit({
|
|
|
1458
1493
|
brandPersistentId: true,
|
|
1459
1494
|
designSystemVersionId: true
|
|
1460
1495
|
});
|
|
1461
|
-
var BlurTokenTypedData =
|
|
1462
|
-
type:
|
|
1496
|
+
var BlurTokenTypedData = z75.object({
|
|
1497
|
+
type: z75.literal("Blur"),
|
|
1463
1498
|
data: BlurTokenData
|
|
1464
1499
|
});
|
|
1465
|
-
var ColorTokenTypedData =
|
|
1466
|
-
type:
|
|
1500
|
+
var ColorTokenTypedData = z75.object({
|
|
1501
|
+
type: z75.literal("Color"),
|
|
1467
1502
|
data: ColorTokenData
|
|
1468
1503
|
});
|
|
1469
|
-
var GradientTokenTypedData =
|
|
1470
|
-
type:
|
|
1504
|
+
var GradientTokenTypedData = z75.object({
|
|
1505
|
+
type: z75.literal("Gradient"),
|
|
1471
1506
|
data: GradientTokenData
|
|
1472
1507
|
});
|
|
1473
|
-
var OpacityTokenTypedData =
|
|
1474
|
-
type:
|
|
1508
|
+
var OpacityTokenTypedData = z75.object({
|
|
1509
|
+
type: z75.literal("Opacity"),
|
|
1475
1510
|
data: OpacityTokenData
|
|
1476
1511
|
});
|
|
1477
|
-
var ShadowTokenTypedData =
|
|
1478
|
-
type:
|
|
1512
|
+
var ShadowTokenTypedData = z75.object({
|
|
1513
|
+
type: z75.literal("Shadow"),
|
|
1479
1514
|
data: ShadowTokenData
|
|
1480
1515
|
});
|
|
1481
|
-
var TypographyTokenTypedData =
|
|
1482
|
-
type:
|
|
1516
|
+
var TypographyTokenTypedData = z75.object({
|
|
1517
|
+
type: z75.literal("Typography"),
|
|
1483
1518
|
data: TypographyTokenData
|
|
1484
1519
|
});
|
|
1485
|
-
var StringTokenTypedData =
|
|
1486
|
-
type:
|
|
1520
|
+
var StringTokenTypedData = z75.object({
|
|
1521
|
+
type: z75.literal("String"),
|
|
1487
1522
|
data: StringTokenData
|
|
1488
1523
|
});
|
|
1489
|
-
var DimensionTokenTypedData =
|
|
1490
|
-
type:
|
|
1524
|
+
var DimensionTokenTypedData = z75.object({
|
|
1525
|
+
type: z75.literal("Dimension"),
|
|
1491
1526
|
data: DimensionTokenData
|
|
1492
1527
|
});
|
|
1493
|
-
var FontSizeTokenTypedData =
|
|
1494
|
-
type:
|
|
1528
|
+
var FontSizeTokenTypedData = z75.object({
|
|
1529
|
+
type: z75.literal("FontSize"),
|
|
1495
1530
|
data: FontSizeTokenData
|
|
1496
1531
|
});
|
|
1497
|
-
var FontFamilyTokenTypedData =
|
|
1498
|
-
type:
|
|
1532
|
+
var FontFamilyTokenTypedData = z75.object({
|
|
1533
|
+
type: z75.literal("FontFamily"),
|
|
1499
1534
|
data: FontFamilyTokenData
|
|
1500
1535
|
});
|
|
1501
|
-
var FontWeightTokenTypedData =
|
|
1502
|
-
type:
|
|
1536
|
+
var FontWeightTokenTypedData = z75.object({
|
|
1537
|
+
type: z75.literal("FontWeight"),
|
|
1503
1538
|
data: FontWeightTokenData
|
|
1504
1539
|
});
|
|
1505
|
-
var LetterSpacingTokenTypedData =
|
|
1506
|
-
type:
|
|
1540
|
+
var LetterSpacingTokenTypedData = z75.object({
|
|
1541
|
+
type: z75.literal("LetterSpacing"),
|
|
1507
1542
|
data: LetterSpacingTokenData
|
|
1508
1543
|
});
|
|
1509
|
-
var LineHeightTokenTypedData =
|
|
1510
|
-
type:
|
|
1544
|
+
var LineHeightTokenTypedData = z75.object({
|
|
1545
|
+
type: z75.literal("LineHeight"),
|
|
1511
1546
|
data: LineHeightTokenData
|
|
1512
1547
|
});
|
|
1513
|
-
var ParagraphSpacingTokenTypedData =
|
|
1514
|
-
type:
|
|
1548
|
+
var ParagraphSpacingTokenTypedData = z75.object({
|
|
1549
|
+
type: z75.literal("ParagraphSpacing"),
|
|
1515
1550
|
data: ParagraphSpacingTokenData
|
|
1516
1551
|
});
|
|
1517
|
-
var TextCaseTokenTypedData =
|
|
1518
|
-
type:
|
|
1552
|
+
var TextCaseTokenTypedData = z75.object({
|
|
1553
|
+
type: z75.literal("TextCase"),
|
|
1519
1554
|
data: TextCaseTokenData
|
|
1520
1555
|
});
|
|
1521
|
-
var TextDecorationTokenTypedData =
|
|
1522
|
-
type:
|
|
1556
|
+
var TextDecorationTokenTypedData = z75.object({
|
|
1557
|
+
type: z75.literal("TextDecoration"),
|
|
1523
1558
|
data: TextDecorationTokenData
|
|
1524
1559
|
});
|
|
1525
|
-
var BorderRadiusTokenTypedData =
|
|
1526
|
-
type:
|
|
1560
|
+
var BorderRadiusTokenTypedData = z75.object({
|
|
1561
|
+
type: z75.literal("BorderRadius"),
|
|
1527
1562
|
data: BorderRadiusTokenData
|
|
1528
1563
|
});
|
|
1529
|
-
var BorderWidthTokenTypedData =
|
|
1530
|
-
type:
|
|
1564
|
+
var BorderWidthTokenTypedData = z75.object({
|
|
1565
|
+
type: z75.literal("BorderWidth"),
|
|
1531
1566
|
data: BorderWidthTokenData
|
|
1532
1567
|
});
|
|
1533
|
-
var BorderTypedData =
|
|
1534
|
-
type:
|
|
1568
|
+
var BorderTypedData = z75.object({
|
|
1569
|
+
type: z75.literal("Border"),
|
|
1535
1570
|
data: BorderTokenData
|
|
1536
1571
|
});
|
|
1537
|
-
var ProductCopyTypedData =
|
|
1538
|
-
type:
|
|
1572
|
+
var ProductCopyTypedData = z75.object({
|
|
1573
|
+
type: z75.literal("ProductCopy"),
|
|
1539
1574
|
data: ProductCopyTokenData
|
|
1540
1575
|
});
|
|
1541
|
-
var SizeTypedData =
|
|
1542
|
-
type:
|
|
1576
|
+
var SizeTypedData = z75.object({
|
|
1577
|
+
type: z75.literal("Size"),
|
|
1543
1578
|
data: SizeTokenData
|
|
1544
1579
|
});
|
|
1545
|
-
var SpaceTypedData =
|
|
1546
|
-
type:
|
|
1580
|
+
var SpaceTypedData = z75.object({
|
|
1581
|
+
type: z75.literal("Space"),
|
|
1547
1582
|
data: SpaceTokenData
|
|
1548
1583
|
});
|
|
1549
|
-
var VisibilityTypedData =
|
|
1550
|
-
type:
|
|
1584
|
+
var VisibilityTypedData = z75.object({
|
|
1585
|
+
type: z75.literal("Visibility"),
|
|
1551
1586
|
data: VisibilityTokenData
|
|
1552
1587
|
});
|
|
1553
|
-
var ZIndexTypedData =
|
|
1554
|
-
type:
|
|
1588
|
+
var ZIndexTypedData = z75.object({
|
|
1589
|
+
type: z75.literal("ZIndex"),
|
|
1555
1590
|
data: ZIndexTokenData
|
|
1556
1591
|
});
|
|
1557
|
-
var DurationTypedData =
|
|
1558
|
-
type:
|
|
1592
|
+
var DurationTypedData = z75.object({
|
|
1593
|
+
type: z75.literal("Duration"),
|
|
1559
1594
|
data: DurationTokenData
|
|
1560
1595
|
});
|
|
1561
|
-
var FontTypedData =
|
|
1562
|
-
type:
|
|
1563
|
-
data:
|
|
1596
|
+
var FontTypedData = z75.object({
|
|
1597
|
+
type: z75.literal("Font"),
|
|
1598
|
+
data: z75.record(z75.any())
|
|
1564
1599
|
});
|
|
1565
|
-
var DesignTokenTypedData =
|
|
1600
|
+
var DesignTokenTypedData = z75.discriminatedUnion("type", [
|
|
1566
1601
|
BlurTokenTypedData,
|
|
1567
1602
|
BorderRadiusTokenTypedData,
|
|
1568
1603
|
BorderWidthTokenTypedData,
|
|
@@ -1595,136 +1630,140 @@ var CreateDesignToken = DesignTokenTypedData.and(CreateDesignTokenBase);
|
|
|
1595
1630
|
var ThemeOverrideOriginPart = DesignTokenOriginPart;
|
|
1596
1631
|
var ThemeOverrideOrigin = DesignTokenOrigin;
|
|
1597
1632
|
var ThemeOverride = DesignTokenTypedData.and(
|
|
1598
|
-
|
|
1599
|
-
tokenPersistentId:
|
|
1633
|
+
z76.object({
|
|
1634
|
+
tokenPersistentId: z76.string(),
|
|
1600
1635
|
origin: ThemeOverrideOrigin.optional().nullable().transform((v) => v ?? void 0)
|
|
1601
1636
|
})
|
|
1602
1637
|
);
|
|
1603
|
-
var ThemeElementData =
|
|
1604
|
-
value:
|
|
1605
|
-
overrides:
|
|
1638
|
+
var ThemeElementData = z76.object({
|
|
1639
|
+
value: z76.object({
|
|
1640
|
+
overrides: z76.array(ThemeOverride)
|
|
1606
1641
|
})
|
|
1607
1642
|
});
|
|
1608
|
-
var ThemeOriginPart =
|
|
1609
|
-
var ThemeOriginObject =
|
|
1610
|
-
id:
|
|
1611
|
-
name:
|
|
1643
|
+
var ThemeOriginPart = z76.object({});
|
|
1644
|
+
var ThemeOriginObject = z76.object({
|
|
1645
|
+
id: z76.string(),
|
|
1646
|
+
name: z76.string()
|
|
1612
1647
|
});
|
|
1613
|
-
var ThemeOriginSource =
|
|
1614
|
-
sourceId:
|
|
1615
|
-
sourceObjects:
|
|
1648
|
+
var ThemeOriginSource = z76.object({
|
|
1649
|
+
sourceId: z76.string(),
|
|
1650
|
+
sourceObjects: z76.array(ThemeOriginObject)
|
|
1616
1651
|
});
|
|
1617
|
-
var ThemeOrigin =
|
|
1618
|
-
sources:
|
|
1652
|
+
var ThemeOrigin = z76.object({
|
|
1653
|
+
sources: z76.array(ThemeOriginSource)
|
|
1619
1654
|
});
|
|
1620
1655
|
var Theme = DesignElementBase.extend(DesignElementBrandedPart.shape).extend({
|
|
1621
1656
|
origin: ThemeOrigin.optional(),
|
|
1622
|
-
overrides:
|
|
1623
|
-
});
|
|
1624
|
-
var FigmaFileDownloadScope =
|
|
1625
|
-
styles:
|
|
1626
|
-
components:
|
|
1627
|
-
currentVersion:
|
|
1628
|
-
publishedVersion:
|
|
1629
|
-
downloadChunkSize:
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1657
|
+
overrides: z76.array(ThemeOverride)
|
|
1658
|
+
});
|
|
1659
|
+
var FigmaFileDownloadScope = z77.object({
|
|
1660
|
+
styles: z77.boolean(),
|
|
1661
|
+
components: z77.boolean(),
|
|
1662
|
+
currentVersion: z77.literal("__latest__").nullable(),
|
|
1663
|
+
publishedVersion: z77.string().nullable(),
|
|
1664
|
+
downloadChunkSize: z77.number().optional(),
|
|
1665
|
+
maxFileDepth: z77.number().optional()
|
|
1666
|
+
});
|
|
1667
|
+
var FigmaFileAccessData = z77.object({
|
|
1668
|
+
accessToken: z77.string()
|
|
1669
|
+
});
|
|
1670
|
+
var ImportFunctionInput = z78.object({
|
|
1671
|
+
importJobId: z78.string(),
|
|
1672
|
+
importContextId: z78.string(),
|
|
1673
|
+
designSystemId: z78.string().optional()
|
|
1674
|
+
});
|
|
1675
|
+
var ImportedFigmaSourceData = z78.object({
|
|
1676
|
+
sourceId: z78.string(),
|
|
1641
1677
|
figmaRemote: DataSourceFigmaRemote
|
|
1642
1678
|
});
|
|
1643
|
-
var FigmaImportBaseContext =
|
|
1644
|
-
designSystemId:
|
|
1679
|
+
var FigmaImportBaseContext = z78.object({
|
|
1680
|
+
designSystemId: z78.string(),
|
|
1645
1681
|
/**
|
|
1646
1682
|
* Data required for accessing Figma files. This should contain access data for all file ids
|
|
1647
1683
|
* mentioned in the `importedSourceDataBySourceId`
|
|
1648
1684
|
*
|
|
1649
1685
|
* fileId: file data
|
|
1650
1686
|
*/
|
|
1651
|
-
fileAccessByFileId:
|
|
1687
|
+
fileAccessByFileId: z78.record(FigmaFileAccessData),
|
|
1652
1688
|
/**
|
|
1653
1689
|
* Figma source data for which import was requested
|
|
1654
1690
|
*
|
|
1655
1691
|
* sourceId: source data
|
|
1656
1692
|
*/
|
|
1657
|
-
importedSourceDataBySourceId:
|
|
1693
|
+
importedSourceDataBySourceId: z78.record(ImportedFigmaSourceData)
|
|
1694
|
+
});
|
|
1695
|
+
var FigmaImportContextWithSourcesState = FigmaImportBaseContext.extend({
|
|
1696
|
+
sourcesWithMissingAccess: z78.array(z78.string()).default([])
|
|
1658
1697
|
});
|
|
1659
1698
|
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
1660
1699
|
importMetadata: DataSourceFigmaImportMetadata
|
|
1661
1700
|
});
|
|
1662
|
-
var FigmaImportContextWithDownloadScopes =
|
|
1701
|
+
var FigmaImportContextWithDownloadScopes = FigmaImportContextWithSourcesState.extend({
|
|
1663
1702
|
/**
|
|
1664
1703
|
* Describes what to download from each file, this should contain all file id mentioned in
|
|
1665
1704
|
* importMetadataBySourceId.
|
|
1666
1705
|
*
|
|
1667
1706
|
* File id -> file download scope
|
|
1668
1707
|
*/
|
|
1669
|
-
fileDownloadScopesByFileId:
|
|
1708
|
+
fileDownloadScopesByFileId: z78.record(FigmaFileDownloadScope),
|
|
1670
1709
|
/**
|
|
1671
1710
|
* Sources filtered down to the ones that have changed since last import and therefore need to be
|
|
1672
1711
|
* imported again.
|
|
1673
1712
|
*
|
|
1674
1713
|
* Source id -> import metadata
|
|
1675
1714
|
*/
|
|
1676
|
-
changedImportedSourceDataBySourceId:
|
|
1715
|
+
changedImportedSourceDataBySourceId: z78.record(ChangedImportedFigmaSourceData)
|
|
1677
1716
|
});
|
|
1678
|
-
var ImageImportModelType =
|
|
1679
|
-
var ImageImportModelBase =
|
|
1717
|
+
var ImageImportModelType = z79.enum(["Url", "FigmaRender"]);
|
|
1718
|
+
var ImageImportModelBase = z79.object({
|
|
1680
1719
|
scope: AssetScope
|
|
1681
1720
|
});
|
|
1682
1721
|
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
1683
|
-
type:
|
|
1684
|
-
url:
|
|
1685
|
-
originKey:
|
|
1686
|
-
extension:
|
|
1722
|
+
type: z79.literal(ImageImportModelType.enum.Url),
|
|
1723
|
+
url: z79.string(),
|
|
1724
|
+
originKey: z79.string(),
|
|
1725
|
+
extension: z79.string()
|
|
1687
1726
|
});
|
|
1688
|
-
var FigmaRenderFormat =
|
|
1727
|
+
var FigmaRenderFormat = z79.enum(["Svg", "Png"]);
|
|
1689
1728
|
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
1690
|
-
type:
|
|
1691
|
-
fileId:
|
|
1692
|
-
fileVersionId:
|
|
1693
|
-
nodeId:
|
|
1694
|
-
originKey:
|
|
1729
|
+
type: z79.literal(ImageImportModelType.enum.FigmaRender),
|
|
1730
|
+
fileId: z79.string(),
|
|
1731
|
+
fileVersionId: z79.string().optional(),
|
|
1732
|
+
nodeId: z79.string(),
|
|
1733
|
+
originKey: z79.string()
|
|
1695
1734
|
});
|
|
1696
1735
|
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
1697
|
-
format:
|
|
1698
|
-
scale:
|
|
1736
|
+
format: z79.literal(FigmaRenderFormat.enum.Png),
|
|
1737
|
+
scale: z79.number()
|
|
1699
1738
|
});
|
|
1700
1739
|
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
1701
|
-
format:
|
|
1740
|
+
format: z79.literal(FigmaRenderFormat.enum.Svg)
|
|
1702
1741
|
});
|
|
1703
|
-
var FigmaRenderImportModel =
|
|
1742
|
+
var FigmaRenderImportModel = z79.discriminatedUnion("format", [
|
|
1704
1743
|
FigmaPngRenderImportModel,
|
|
1705
1744
|
FigmaSvgRenderImportModel
|
|
1706
1745
|
]);
|
|
1707
|
-
var ImageImportModel =
|
|
1708
|
-
var ImportModelBase =
|
|
1709
|
-
id:
|
|
1746
|
+
var ImageImportModel = z79.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
1747
|
+
var ImportModelBase = z80.object({
|
|
1748
|
+
id: z80.string(),
|
|
1710
1749
|
meta: ObjectMeta,
|
|
1711
1750
|
origin: DesignElementOrigin,
|
|
1712
|
-
brandPersistentId:
|
|
1713
|
-
sortOrder:
|
|
1751
|
+
brandPersistentId: z80.string(),
|
|
1752
|
+
sortOrder: z80.number()
|
|
1714
1753
|
});
|
|
1715
1754
|
var ImportModelInputBase = ImportModelBase.omit({
|
|
1716
1755
|
brandPersistentId: true,
|
|
1717
1756
|
origin: true,
|
|
1718
1757
|
sortOrder: true
|
|
1719
1758
|
}).extend({
|
|
1720
|
-
originId:
|
|
1721
|
-
originMetadata:
|
|
1759
|
+
originId: z80.string(),
|
|
1760
|
+
originMetadata: z80.record(z80.any())
|
|
1722
1761
|
});
|
|
1723
|
-
var ComponentImportModelPart =
|
|
1762
|
+
var ComponentImportModelPart = z81.object({
|
|
1724
1763
|
thumbnail: ImageImportModel
|
|
1725
1764
|
});
|
|
1726
1765
|
var ComponentImportModel = ImportModelBase.extend(ComponentImportModelPart.shape).extend({
|
|
1727
|
-
isAsset:
|
|
1766
|
+
isAsset: z81.boolean(),
|
|
1728
1767
|
svg: FigmaSvgRenderImportModel.optional(),
|
|
1729
1768
|
origin: ComponentOrigin
|
|
1730
1769
|
});
|
|
@@ -1736,44 +1775,44 @@ var AssetImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart
|
|
|
1736
1775
|
originMetadata: ComponentOriginPart
|
|
1737
1776
|
});
|
|
1738
1777
|
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
1739
|
-
|
|
1740
|
-
id:
|
|
1778
|
+
z82.object({
|
|
1779
|
+
id: z82.string(),
|
|
1741
1780
|
meta: ObjectMeta
|
|
1742
1781
|
})
|
|
1743
1782
|
);
|
|
1744
1783
|
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
1745
|
-
|
|
1784
|
+
z82.object({
|
|
1746
1785
|
origin: ThemeOverrideOrigin
|
|
1747
1786
|
})
|
|
1748
1787
|
);
|
|
1749
1788
|
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
1750
|
-
|
|
1751
|
-
originId:
|
|
1789
|
+
z82.object({
|
|
1790
|
+
originId: z82.string(),
|
|
1752
1791
|
originMetadata: ThemeOverrideOriginPart
|
|
1753
1792
|
})
|
|
1754
1793
|
);
|
|
1755
|
-
var ThemeImportModel =
|
|
1794
|
+
var ThemeImportModel = z82.object({
|
|
1756
1795
|
meta: ObjectMeta,
|
|
1757
|
-
brandPersistentId:
|
|
1796
|
+
brandPersistentId: z82.string(),
|
|
1758
1797
|
originSource: ThemeOriginSource,
|
|
1759
|
-
overrides:
|
|
1760
|
-
sortOrder:
|
|
1798
|
+
overrides: z82.array(ThemeOverrideImportModel),
|
|
1799
|
+
sortOrder: z82.number()
|
|
1761
1800
|
});
|
|
1762
|
-
var ThemeImportModelInput =
|
|
1801
|
+
var ThemeImportModelInput = z82.object({
|
|
1763
1802
|
meta: ObjectMeta,
|
|
1764
|
-
originObjects:
|
|
1765
|
-
overrides:
|
|
1803
|
+
originObjects: z82.array(ThemeOriginObject),
|
|
1804
|
+
overrides: z82.array(ThemeOverrideImportModelInput)
|
|
1766
1805
|
});
|
|
1767
|
-
var ThemeUpdateImportModel =
|
|
1768
|
-
themePersistentId:
|
|
1769
|
-
overrides:
|
|
1806
|
+
var ThemeUpdateImportModel = z82.object({
|
|
1807
|
+
themePersistentId: z82.string(),
|
|
1808
|
+
overrides: z82.array(ThemeOverrideImportModel)
|
|
1770
1809
|
});
|
|
1771
|
-
var ThemeUpdateImportModelInput =
|
|
1772
|
-
themePersistentId:
|
|
1773
|
-
overrides:
|
|
1810
|
+
var ThemeUpdateImportModelInput = z82.object({
|
|
1811
|
+
themePersistentId: z82.string(),
|
|
1812
|
+
overrides: z82.array(ThemeOverrideImportModelInput)
|
|
1774
1813
|
});
|
|
1775
|
-
var DesignTokenImportModelPart =
|
|
1776
|
-
collection:
|
|
1814
|
+
var DesignTokenImportModelPart = z83.object({
|
|
1815
|
+
collection: z83.string().optional()
|
|
1777
1816
|
});
|
|
1778
1817
|
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
1779
1818
|
origin: DesignTokenOrigin
|
|
@@ -1787,10 +1826,10 @@ var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
|
1787
1826
|
image: FigmaPngRenderImportModel
|
|
1788
1827
|
});
|
|
1789
1828
|
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
1790
|
-
children:
|
|
1829
|
+
children: z84.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
1791
1830
|
});
|
|
1792
|
-
var FigmaFileStructureImportModelPart =
|
|
1793
|
-
data:
|
|
1831
|
+
var FigmaFileStructureImportModelPart = z84.object({
|
|
1832
|
+
data: z84.object({
|
|
1794
1833
|
rootNode: FigmaFileStructureNodeImportModel,
|
|
1795
1834
|
assetsInFile: FigmaFileStructureStatistics
|
|
1796
1835
|
})
|
|
@@ -1801,31 +1840,31 @@ var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImp
|
|
|
1801
1840
|
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
1802
1841
|
FigmaFileStructureImportModelPart.shape
|
|
1803
1842
|
).extend({
|
|
1804
|
-
fileVersionId:
|
|
1843
|
+
fileVersionId: z84.string()
|
|
1805
1844
|
});
|
|
1806
|
-
var DataSourceImportModel =
|
|
1807
|
-
id:
|
|
1808
|
-
fileName:
|
|
1809
|
-
thumbnailUrl:
|
|
1845
|
+
var DataSourceImportModel = z85.object({
|
|
1846
|
+
id: z85.string(),
|
|
1847
|
+
fileName: z85.string().optional(),
|
|
1848
|
+
thumbnailUrl: z85.string().optional()
|
|
1810
1849
|
});
|
|
1811
|
-
var ImportModelInputCollection =
|
|
1850
|
+
var ImportModelInputCollection = z86.object({
|
|
1812
1851
|
source: DataSourceImportModel,
|
|
1813
|
-
tokens:
|
|
1814
|
-
components:
|
|
1815
|
-
assets:
|
|
1816
|
-
themeUpdates:
|
|
1817
|
-
themes:
|
|
1852
|
+
tokens: z86.array(DesignTokenImportModelInput).default([]),
|
|
1853
|
+
components: z86.array(ComponentImportModelInput).default([]),
|
|
1854
|
+
assets: z86.array(AssetImportModelInput).default([]),
|
|
1855
|
+
themeUpdates: z86.array(ThemeUpdateImportModelInput).default([]),
|
|
1856
|
+
themes: z86.array(ThemeImportModelInput).default([]),
|
|
1818
1857
|
figmaFileStructure: FigmaFileStructureImportModelInput.optional()
|
|
1819
1858
|
});
|
|
1820
|
-
var ImportModelCollection =
|
|
1821
|
-
sources:
|
|
1822
|
-
tokens:
|
|
1823
|
-
components:
|
|
1824
|
-
themeUpdates:
|
|
1825
|
-
themes:
|
|
1826
|
-
figmaFileStructures:
|
|
1859
|
+
var ImportModelCollection = z86.object({
|
|
1860
|
+
sources: z86.array(DataSourceImportModel),
|
|
1861
|
+
tokens: z86.array(DesignTokenImportModel).default([]),
|
|
1862
|
+
components: z86.array(ComponentImportModel).default([]),
|
|
1863
|
+
themeUpdates: z86.array(ThemeUpdateImportModel).default([]),
|
|
1864
|
+
themes: z86.array(ThemeImportModel).default([]),
|
|
1865
|
+
figmaFileStructures: z86.array(FigmaFileStructureImportModel)
|
|
1827
1866
|
});
|
|
1828
|
-
var ImportWarningType =
|
|
1867
|
+
var ImportWarningType = z87.enum([
|
|
1829
1868
|
"NoVersionFound",
|
|
1830
1869
|
"UnsupportedFill",
|
|
1831
1870
|
"UnsupportedStroke",
|
|
@@ -1839,25 +1878,25 @@ var ImportWarningType = z86.enum([
|
|
|
1839
1878
|
"DuplicateImportedStyleId",
|
|
1840
1879
|
"DuplicateImportedStylePath"
|
|
1841
1880
|
]);
|
|
1842
|
-
var ImportWarning =
|
|
1881
|
+
var ImportWarning = z87.object({
|
|
1843
1882
|
warningType: ImportWarningType,
|
|
1844
|
-
componentId:
|
|
1845
|
-
componentName:
|
|
1846
|
-
styleId:
|
|
1847
|
-
styleName:
|
|
1848
|
-
unsupportedStyleValueType:
|
|
1883
|
+
componentId: z87.string().optional(),
|
|
1884
|
+
componentName: z87.string().optional(),
|
|
1885
|
+
styleId: z87.string().optional(),
|
|
1886
|
+
styleName: z87.string().optional(),
|
|
1887
|
+
unsupportedStyleValueType: z87.string().optional()
|
|
1849
1888
|
});
|
|
1850
|
-
var FileStructureStats =
|
|
1889
|
+
var FileStructureStats = z88.object({
|
|
1851
1890
|
frames: zeroNumberByDefault2(),
|
|
1852
1891
|
components: zeroNumberByDefault2(),
|
|
1853
1892
|
componentSets: zeroNumberByDefault2()
|
|
1854
1893
|
});
|
|
1855
1894
|
var SourceImportSummaryByTokenTypeKey = DesignTokenType.or(
|
|
1856
1895
|
// Backward compatibility
|
|
1857
|
-
|
|
1896
|
+
z88.enum(["Measure", "Radius", "GenericToken", "Font", "Text"])
|
|
1858
1897
|
);
|
|
1859
|
-
var SourceImportSummaryByTokenType =
|
|
1860
|
-
var SourceImportTokenSummary =
|
|
1898
|
+
var SourceImportSummaryByTokenType = z88.record(SourceImportSummaryByTokenTypeKey, z88.number());
|
|
1899
|
+
var SourceImportTokenSummary = z88.object({
|
|
1861
1900
|
tokensCreated: zeroNumberByDefault2(),
|
|
1862
1901
|
tokensUpdated: zeroNumberByDefault2(),
|
|
1863
1902
|
tokensDeleted: zeroNumberByDefault2(),
|
|
@@ -1865,7 +1904,7 @@ var SourceImportTokenSummary = z87.object({
|
|
|
1865
1904
|
tokensUpdatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {}),
|
|
1866
1905
|
tokensDeletedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {})
|
|
1867
1906
|
});
|
|
1868
|
-
var SourceImportComponentSummary =
|
|
1907
|
+
var SourceImportComponentSummary = z88.object({
|
|
1869
1908
|
componentsCreated: zeroNumberByDefault2(),
|
|
1870
1909
|
componentsUpdated: zeroNumberByDefault2(),
|
|
1871
1910
|
componentsDeleted: zeroNumberByDefault2(),
|
|
@@ -1873,54 +1912,54 @@ var SourceImportComponentSummary = z87.object({
|
|
|
1873
1912
|
componentAssetsUpdated: zeroNumberByDefault2(),
|
|
1874
1913
|
componentAssetsDeleted: zeroNumberByDefault2()
|
|
1875
1914
|
});
|
|
1876
|
-
var SourceImportFrameSummary =
|
|
1915
|
+
var SourceImportFrameSummary = z88.object({
|
|
1877
1916
|
assetsInFile: nullishToOptional(FileStructureStats.optional()),
|
|
1878
|
-
invalidReferencesCount: nullishToOptional(
|
|
1879
|
-
});
|
|
1880
|
-
var SourceImportSummary =
|
|
1881
|
-
sourceId: nullishToOptional(
|
|
1882
|
-
brandId: nullishToOptional(
|
|
1883
|
-
versionId: nullishToOptional(
|
|
1884
|
-
error: nullishToOptional(
|
|
1885
|
-
isFailed:
|
|
1886
|
-
warnings:
|
|
1917
|
+
invalidReferencesCount: nullishToOptional(z88.number().optional())
|
|
1918
|
+
});
|
|
1919
|
+
var SourceImportSummary = z88.object({
|
|
1920
|
+
sourceId: nullishToOptional(z88.string()),
|
|
1921
|
+
brandId: nullishToOptional(z88.string()),
|
|
1922
|
+
versionId: nullishToOptional(z88.string()),
|
|
1923
|
+
error: nullishToOptional(z88.any()),
|
|
1924
|
+
isFailed: z88.boolean(),
|
|
1925
|
+
warnings: z88.array(ImportWarning).nullish().transform((v) => v ?? []),
|
|
1887
1926
|
...SourceImportTokenSummary.shape,
|
|
1888
1927
|
...SourceImportComponentSummary.shape,
|
|
1889
1928
|
...FileStructureStats.shape
|
|
1890
1929
|
});
|
|
1891
1930
|
function zeroNumberByDefault2() {
|
|
1892
|
-
return
|
|
1931
|
+
return z88.number().nullish().transform((v) => v ?? 0);
|
|
1893
1932
|
}
|
|
1894
|
-
var PageBlockDefinitionAppearance =
|
|
1895
|
-
isBordered:
|
|
1896
|
-
hasBackground:
|
|
1897
|
-
isEditorPresentationDifferent:
|
|
1898
|
-
});
|
|
1899
|
-
var PageBlockDefinitionLayoutType =
|
|
1900
|
-
var PageBlockDefinitionLayoutGap =
|
|
1901
|
-
var PageBlockDefinitionLayoutAlign =
|
|
1902
|
-
var PageBlockDefinitionLayoutResizing =
|
|
1903
|
-
var PageBlockDefinitionLayoutBase =
|
|
1933
|
+
var PageBlockDefinitionAppearance = z89.object({
|
|
1934
|
+
isBordered: z89.boolean().optional(),
|
|
1935
|
+
hasBackground: z89.boolean().optional(),
|
|
1936
|
+
isEditorPresentationDifferent: z89.boolean().optional()
|
|
1937
|
+
});
|
|
1938
|
+
var PageBlockDefinitionLayoutType = z90.enum(["Column", "Row"]);
|
|
1939
|
+
var PageBlockDefinitionLayoutGap = z90.enum(["Small", "Medium", "Large", "None"]);
|
|
1940
|
+
var PageBlockDefinitionLayoutAlign = z90.enum(["Start", "Center", "End"]);
|
|
1941
|
+
var PageBlockDefinitionLayoutResizing = z90.enum(["Fill", "Hug"]);
|
|
1942
|
+
var PageBlockDefinitionLayoutBase = z90.object({
|
|
1904
1943
|
type: PageBlockDefinitionLayoutType,
|
|
1905
1944
|
gap: PageBlockDefinitionLayoutGap.optional(),
|
|
1906
1945
|
columnAlign: PageBlockDefinitionLayoutAlign.optional(),
|
|
1907
1946
|
columnResizing: PageBlockDefinitionLayoutResizing.optional()
|
|
1908
1947
|
});
|
|
1909
1948
|
var PageBlockDefinitionLayout = PageBlockDefinitionLayoutBase.extend({
|
|
1910
|
-
children:
|
|
1911
|
-
});
|
|
1912
|
-
var PageBlockDefinitionVariant =
|
|
1913
|
-
id:
|
|
1914
|
-
name:
|
|
1915
|
-
image:
|
|
1916
|
-
description:
|
|
1917
|
-
documentationLink:
|
|
1949
|
+
children: z90.lazy(() => z90.array(PageBlockDefinitionLayout.or(z90.string())))
|
|
1950
|
+
});
|
|
1951
|
+
var PageBlockDefinitionVariant = z90.object({
|
|
1952
|
+
id: z90.string(),
|
|
1953
|
+
name: z90.string(),
|
|
1954
|
+
image: z90.string().optional(),
|
|
1955
|
+
description: z90.string().optional(),
|
|
1956
|
+
documentationLink: z90.string().optional(),
|
|
1918
1957
|
layout: PageBlockDefinitionLayout,
|
|
1919
|
-
maxColumns:
|
|
1920
|
-
defaultColumns:
|
|
1958
|
+
maxColumns: z90.number().optional(),
|
|
1959
|
+
defaultColumns: z90.number().optional(),
|
|
1921
1960
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
1922
1961
|
});
|
|
1923
|
-
var PageBlockDefinitionPropertyType =
|
|
1962
|
+
var PageBlockDefinitionPropertyType = z91.enum([
|
|
1924
1963
|
"RichText",
|
|
1925
1964
|
"MultiRichText",
|
|
1926
1965
|
"Text",
|
|
@@ -1947,7 +1986,7 @@ var PageBlockDefinitionPropertyType = z90.enum([
|
|
|
1947
1986
|
"Storybook",
|
|
1948
1987
|
"Color"
|
|
1949
1988
|
]);
|
|
1950
|
-
var PageBlockDefinitionRichTextPropertyStyle =
|
|
1989
|
+
var PageBlockDefinitionRichTextPropertyStyle = z91.enum([
|
|
1951
1990
|
"Title1",
|
|
1952
1991
|
"Title2",
|
|
1953
1992
|
"Title3",
|
|
@@ -1957,8 +1996,8 @@ var PageBlockDefinitionRichTextPropertyStyle = z90.enum([
|
|
|
1957
1996
|
"Callout",
|
|
1958
1997
|
"Default"
|
|
1959
1998
|
]);
|
|
1960
|
-
var PageBlockDefinitionMultiRichTextPropertyStyle =
|
|
1961
|
-
var PageBlockDefinitionTextPropertyStyle =
|
|
1999
|
+
var PageBlockDefinitionMultiRichTextPropertyStyle = z91.enum(["OL", "UL", "Default"]);
|
|
2000
|
+
var PageBlockDefinitionTextPropertyStyle = z91.enum([
|
|
1962
2001
|
"Title1",
|
|
1963
2002
|
"Title2",
|
|
1964
2003
|
"Title3",
|
|
@@ -1971,77 +2010,77 @@ var PageBlockDefinitionTextPropertyStyle = z90.enum([
|
|
|
1971
2010
|
"SmallBold",
|
|
1972
2011
|
"SmallSemibold"
|
|
1973
2012
|
]);
|
|
1974
|
-
var PageBlockDefinitionTextPropertyColor =
|
|
1975
|
-
var PageBlockDefinitionBooleanPropertyStyle =
|
|
1976
|
-
var PageBlockDefinitionSingleSelectPropertyStyle =
|
|
2013
|
+
var PageBlockDefinitionTextPropertyColor = z91.enum(["Neutral", "NeutralFaded"]);
|
|
2014
|
+
var PageBlockDefinitionBooleanPropertyStyle = z91.enum(["SegmentedControl", "ToggleButton", "Checkbox"]);
|
|
2015
|
+
var PageBlockDefinitionSingleSelectPropertyStyle = z91.enum([
|
|
1977
2016
|
"SegmentedControl",
|
|
1978
2017
|
"ToggleButton",
|
|
1979
2018
|
"Select",
|
|
1980
2019
|
"Checkbox"
|
|
1981
2020
|
]);
|
|
1982
|
-
var PageBlockDefinitionMultiSelectPropertyStyle =
|
|
1983
|
-
var PageBlockDefinitionImageAspectRatio =
|
|
1984
|
-
var PageBlockDefinitionImageWidth =
|
|
1985
|
-
var PageBlockDefinitionSelectChoice =
|
|
1986
|
-
value:
|
|
1987
|
-
name:
|
|
1988
|
-
icon:
|
|
2021
|
+
var PageBlockDefinitionMultiSelectPropertyStyle = z91.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
2022
|
+
var PageBlockDefinitionImageAspectRatio = z91.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
2023
|
+
var PageBlockDefinitionImageWidth = z91.enum(["Full", "Icon", "Small", "Medium", "Large", "Poster"]);
|
|
2024
|
+
var PageBlockDefinitionSelectChoice = z91.object({
|
|
2025
|
+
value: z91.string(),
|
|
2026
|
+
name: z91.string(),
|
|
2027
|
+
icon: z91.string().optional()
|
|
1989
2028
|
});
|
|
1990
|
-
var PageBlockDefinitionUntypedPropertyOptions =
|
|
1991
|
-
var PageBlockDefinitionRichTextOptions =
|
|
2029
|
+
var PageBlockDefinitionUntypedPropertyOptions = z91.record(z91.any());
|
|
2030
|
+
var PageBlockDefinitionRichTextOptions = z91.object({
|
|
1992
2031
|
richTextStyle: PageBlockDefinitionRichTextPropertyStyle.optional()
|
|
1993
2032
|
});
|
|
1994
|
-
var PageBlockDefinitionMutiRichTextOptions =
|
|
2033
|
+
var PageBlockDefinitionMutiRichTextOptions = z91.object({
|
|
1995
2034
|
multiRichTextStyle: PageBlockDefinitionMultiRichTextPropertyStyle.optional()
|
|
1996
2035
|
});
|
|
1997
|
-
var PageBlockDefinitionTextOptions =
|
|
1998
|
-
placeholder:
|
|
1999
|
-
defaultValue:
|
|
2036
|
+
var PageBlockDefinitionTextOptions = z91.object({
|
|
2037
|
+
placeholder: z91.string().optional(),
|
|
2038
|
+
defaultValue: z91.string().optional(),
|
|
2000
2039
|
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
2001
2040
|
color: PageBlockDefinitionTextPropertyColor.optional()
|
|
2002
2041
|
});
|
|
2003
|
-
var PageBlockDefinitionSelectOptions =
|
|
2042
|
+
var PageBlockDefinitionSelectOptions = z91.object({
|
|
2004
2043
|
singleSelectStyle: PageBlockDefinitionSingleSelectPropertyStyle.optional(),
|
|
2005
|
-
defaultChoice:
|
|
2006
|
-
choices:
|
|
2044
|
+
defaultChoice: z91.string(),
|
|
2045
|
+
choices: z91.array(PageBlockDefinitionSelectChoice)
|
|
2007
2046
|
});
|
|
2008
|
-
var PageBlockDefinitionImageOptions =
|
|
2047
|
+
var PageBlockDefinitionImageOptions = z91.object({
|
|
2009
2048
|
width: PageBlockDefinitionImageWidth.optional(),
|
|
2010
2049
|
aspectRatio: PageBlockDefinitionImageAspectRatio.optional(),
|
|
2011
|
-
allowCaption:
|
|
2012
|
-
recommendation:
|
|
2050
|
+
allowCaption: z91.boolean().optional(),
|
|
2051
|
+
recommendation: z91.string().optional()
|
|
2013
2052
|
});
|
|
2014
|
-
var PageBlockDefinitionBooleanOptions =
|
|
2015
|
-
defaultvalue:
|
|
2053
|
+
var PageBlockDefinitionBooleanOptions = z91.object({
|
|
2054
|
+
defaultvalue: z91.boolean().optional(),
|
|
2016
2055
|
booleanStyle: PageBlockDefinitionBooleanPropertyStyle.optional()
|
|
2017
2056
|
});
|
|
2018
|
-
var PageBlockDefinitionNumberOptions =
|
|
2019
|
-
defaultValue:
|
|
2020
|
-
min:
|
|
2021
|
-
max:
|
|
2022
|
-
step:
|
|
2023
|
-
placeholder:
|
|
2057
|
+
var PageBlockDefinitionNumberOptions = z91.object({
|
|
2058
|
+
defaultValue: z91.number(),
|
|
2059
|
+
min: z91.number().optional(),
|
|
2060
|
+
max: z91.number().optional(),
|
|
2061
|
+
step: z91.number().optional(),
|
|
2062
|
+
placeholder: z91.string().optional()
|
|
2024
2063
|
});
|
|
2025
|
-
var PageBlockDefinitionComponentOptions =
|
|
2026
|
-
renderLayoutAs:
|
|
2027
|
-
allowPropertySelection:
|
|
2064
|
+
var PageBlockDefinitionComponentOptions = z91.object({
|
|
2065
|
+
renderLayoutAs: z91.enum(["List", "Table"]).optional(),
|
|
2066
|
+
allowPropertySelection: z91.boolean().optional()
|
|
2028
2067
|
});
|
|
2029
|
-
var PageBlockDefinitionProperty =
|
|
2030
|
-
id:
|
|
2031
|
-
name:
|
|
2068
|
+
var PageBlockDefinitionProperty = z91.object({
|
|
2069
|
+
id: z91.string(),
|
|
2070
|
+
name: z91.string(),
|
|
2032
2071
|
type: PageBlockDefinitionPropertyType,
|
|
2033
|
-
description:
|
|
2072
|
+
description: z91.string().optional(),
|
|
2034
2073
|
// TODO Docs
|
|
2035
2074
|
options: PageBlockDefinitionUntypedPropertyOptions.optional(),
|
|
2036
|
-
variantOptions:
|
|
2075
|
+
variantOptions: z91.record(PageBlockDefinitionUntypedPropertyOptions).optional()
|
|
2037
2076
|
});
|
|
2038
|
-
var PageBlockDefinitionItem =
|
|
2039
|
-
properties:
|
|
2077
|
+
var PageBlockDefinitionItem = z91.object({
|
|
2078
|
+
properties: z91.array(PageBlockDefinitionProperty),
|
|
2040
2079
|
appearance: PageBlockDefinitionAppearance.optional(),
|
|
2041
|
-
variants:
|
|
2042
|
-
defaultVariantKey:
|
|
2080
|
+
variants: z91.array(PageBlockDefinitionVariant),
|
|
2081
|
+
defaultVariantKey: z91.string()
|
|
2043
2082
|
});
|
|
2044
|
-
var PageBlockCategory =
|
|
2083
|
+
var PageBlockCategory = z92.enum([
|
|
2045
2084
|
"Text",
|
|
2046
2085
|
"Layout",
|
|
2047
2086
|
"Media",
|
|
@@ -2055,55 +2094,41 @@ var PageBlockCategory = z91.enum([
|
|
|
2055
2094
|
"Data",
|
|
2056
2095
|
"Other"
|
|
2057
2096
|
]);
|
|
2058
|
-
var PageBlockBehaviorDataType =
|
|
2059
|
-
var PageBlockBehaviorSelectionType =
|
|
2060
|
-
var PageBlockDefinitionBehavior =
|
|
2097
|
+
var PageBlockBehaviorDataType = z92.enum(["Item", "Token", "Asset", "Component", "FigmaNode"]);
|
|
2098
|
+
var PageBlockBehaviorSelectionType = z92.enum(["Entity", "Group", "EntityAndGroup"]);
|
|
2099
|
+
var PageBlockDefinitionBehavior = z92.object({
|
|
2061
2100
|
dataType: PageBlockBehaviorDataType,
|
|
2062
|
-
items:
|
|
2063
|
-
numberOfItems:
|
|
2064
|
-
allowLinks:
|
|
2101
|
+
items: z92.object({
|
|
2102
|
+
numberOfItems: z92.number(),
|
|
2103
|
+
allowLinks: z92.boolean()
|
|
2065
2104
|
}).optional(),
|
|
2066
|
-
entities:
|
|
2105
|
+
entities: z92.object({
|
|
2067
2106
|
selectionType: PageBlockBehaviorSelectionType,
|
|
2068
|
-
maxSelected:
|
|
2107
|
+
maxSelected: z92.number()
|
|
2069
2108
|
}).optional()
|
|
2070
2109
|
});
|
|
2071
|
-
var PageBlockDefinitionOnboarding =
|
|
2072
|
-
helpText:
|
|
2073
|
-
documentationLink:
|
|
2110
|
+
var PageBlockDefinitionOnboarding = z92.object({
|
|
2111
|
+
helpText: z92.string(),
|
|
2112
|
+
documentationLink: z92.string().optional()
|
|
2074
2113
|
});
|
|
2075
|
-
var PageBlockDefinition =
|
|
2076
|
-
id:
|
|
2077
|
-
name:
|
|
2078
|
-
description:
|
|
2114
|
+
var PageBlockDefinition = z92.object({
|
|
2115
|
+
id: z92.string(),
|
|
2116
|
+
name: z92.string(),
|
|
2117
|
+
description: z92.string(),
|
|
2079
2118
|
category: PageBlockCategory,
|
|
2080
2119
|
icon: AssetValue.optional(),
|
|
2081
|
-
documentationLink:
|
|
2082
|
-
searchKeywords:
|
|
2120
|
+
documentationLink: z92.string().optional(),
|
|
2121
|
+
searchKeywords: z92.array(z92.string()).optional(),
|
|
2083
2122
|
item: PageBlockDefinitionItem,
|
|
2084
2123
|
behavior: PageBlockDefinitionBehavior,
|
|
2085
|
-
editorOptions:
|
|
2124
|
+
editorOptions: z92.object({
|
|
2086
2125
|
onboarding: PageBlockDefinitionOnboarding.optional()
|
|
2087
2126
|
}),
|
|
2088
2127
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2089
2128
|
});
|
|
2090
|
-
var DocumentationPageGroup =
|
|
2091
|
-
type:
|
|
2092
|
-
childType:
|
|
2093
|
-
id: z92.string(),
|
|
2094
|
-
persistentId: z92.string(),
|
|
2095
|
-
shortPersistentId: z92.string(),
|
|
2096
|
-
designSystemVersionId: z92.string(),
|
|
2097
|
-
parentPersistentId: z92.string().nullish(),
|
|
2098
|
-
sortOrder: z92.number(),
|
|
2099
|
-
title: z92.string(),
|
|
2100
|
-
slug: z92.string(),
|
|
2101
|
-
userSlug: z92.string().nullish(),
|
|
2102
|
-
createdAt: z92.coerce.date(),
|
|
2103
|
-
updatedAt: z92.coerce.date()
|
|
2104
|
-
});
|
|
2105
|
-
var DocumentationPage = z93.object({
|
|
2106
|
-
type: z93.literal("DocumentationPage"),
|
|
2129
|
+
var DocumentationPageGroup = z93.object({
|
|
2130
|
+
type: z93.literal("ElementGroup"),
|
|
2131
|
+
childType: z93.literal("DocumentationPage"),
|
|
2107
2132
|
id: z93.string(),
|
|
2108
2133
|
persistentId: z93.string(),
|
|
2109
2134
|
shortPersistentId: z93.string(),
|
|
@@ -2116,163 +2141,172 @@ var DocumentationPage = z93.object({
|
|
|
2116
2141
|
createdAt: z93.coerce.date(),
|
|
2117
2142
|
updatedAt: z93.coerce.date()
|
|
2118
2143
|
});
|
|
2119
|
-
var
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
var
|
|
2135
|
-
|
|
2136
|
-
authType:
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
});
|
|
2144
|
-
var
|
|
2144
|
+
var DocumentationPage = z94.object({
|
|
2145
|
+
type: z94.literal("DocumentationPage"),
|
|
2146
|
+
id: z94.string(),
|
|
2147
|
+
persistentId: z94.string(),
|
|
2148
|
+
shortPersistentId: z94.string(),
|
|
2149
|
+
designSystemVersionId: z94.string(),
|
|
2150
|
+
parentPersistentId: z94.string().nullish(),
|
|
2151
|
+
sortOrder: z94.number(),
|
|
2152
|
+
title: z94.string(),
|
|
2153
|
+
slug: z94.string(),
|
|
2154
|
+
userSlug: z94.string().nullish(),
|
|
2155
|
+
createdAt: z94.coerce.date(),
|
|
2156
|
+
updatedAt: z94.coerce.date()
|
|
2157
|
+
});
|
|
2158
|
+
var NpmRegistryAuthType = z95.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
2159
|
+
var NpmRegistryType = z95.enum(["NPMJS", "GitHub", "AzureDevOps", "Artifactory", "Custom"]);
|
|
2160
|
+
var NpmRegistryBasicAuthConfig = z95.object({
|
|
2161
|
+
authType: z95.literal(NpmRegistryAuthType.Enum.Basic),
|
|
2162
|
+
username: z95.string(),
|
|
2163
|
+
password: z95.string()
|
|
2164
|
+
});
|
|
2165
|
+
var NpmRegistryBearerAuthConfig = z95.object({
|
|
2166
|
+
authType: z95.literal(NpmRegistryAuthType.Enum.Bearer),
|
|
2167
|
+
accessToken: z95.string()
|
|
2168
|
+
});
|
|
2169
|
+
var NpmRegistryNoAuthConfig = z95.object({
|
|
2170
|
+
authType: z95.literal(NpmRegistryAuthType.Enum.None)
|
|
2171
|
+
});
|
|
2172
|
+
var NpmRegistrCustomAuthConfig = z95.object({
|
|
2173
|
+
authType: z95.literal(NpmRegistryAuthType.Enum.Custom),
|
|
2174
|
+
authHeaderName: z95.string(),
|
|
2175
|
+
authHeaderValue: z95.string()
|
|
2176
|
+
});
|
|
2177
|
+
var NpmRegistryAuthConfig = z95.discriminatedUnion("authType", [
|
|
2145
2178
|
NpmRegistryBasicAuthConfig,
|
|
2146
2179
|
NpmRegistryBearerAuthConfig,
|
|
2147
2180
|
NpmRegistryNoAuthConfig,
|
|
2148
2181
|
NpmRegistrCustomAuthConfig
|
|
2149
2182
|
]);
|
|
2150
|
-
var NpmRegistryConfigBase =
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2183
|
+
var NpmRegistryConfigBase = z95.object({
|
|
2184
|
+
registryType: NpmRegistryType,
|
|
2185
|
+
enabledScopes: z95.array(z95.string()),
|
|
2186
|
+
customRegistryUrl: z95.string().optional(),
|
|
2187
|
+
bypassProxy: z95.boolean().default(false),
|
|
2188
|
+
npmProxyRegistryConfigId: z95.string().optional(),
|
|
2189
|
+
npmProxyVersion: z95.number().optional()
|
|
2156
2190
|
});
|
|
2157
2191
|
var NpmRegistryConfig = NpmRegistryConfigBase.and(NpmRegistryAuthConfig);
|
|
2158
|
-
var SsoProvider =
|
|
2159
|
-
providerId:
|
|
2160
|
-
defaultAutoInviteValue:
|
|
2161
|
-
autoInviteDomains:
|
|
2162
|
-
skipDocsSupernovaLogin:
|
|
2163
|
-
areInvitesDisabled:
|
|
2164
|
-
isTestMode:
|
|
2165
|
-
emailDomains:
|
|
2166
|
-
metadataXml:
|
|
2167
|
-
});
|
|
2168
|
-
var WorkspaceRoleSchema =
|
|
2192
|
+
var SsoProvider = z96.object({
|
|
2193
|
+
providerId: z96.string(),
|
|
2194
|
+
defaultAutoInviteValue: z96.boolean(),
|
|
2195
|
+
autoInviteDomains: z96.record(z96.string(), z96.boolean()),
|
|
2196
|
+
skipDocsSupernovaLogin: z96.boolean(),
|
|
2197
|
+
areInvitesDisabled: z96.boolean(),
|
|
2198
|
+
isTestMode: z96.boolean(),
|
|
2199
|
+
emailDomains: z96.array(z96.string()),
|
|
2200
|
+
metadataXml: z96.string().nullish()
|
|
2201
|
+
});
|
|
2202
|
+
var WorkspaceRoleSchema = z97.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest"]);
|
|
2169
2203
|
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
2170
2204
|
var MAX_MEMBERS_COUNT = 100;
|
|
2171
|
-
var UserInvite =
|
|
2172
|
-
email:
|
|
2205
|
+
var UserInvite = z98.object({
|
|
2206
|
+
email: z98.string().email().trim().transform((value) => value.toLowerCase()),
|
|
2173
2207
|
role: WorkspaceRoleSchema
|
|
2174
2208
|
});
|
|
2175
|
-
var UserInvites =
|
|
2176
|
-
var WorkspaceIpWhitelistEntry =
|
|
2177
|
-
isEnabled:
|
|
2178
|
-
name:
|
|
2179
|
-
range:
|
|
2209
|
+
var UserInvites = z98.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
2210
|
+
var WorkspaceIpWhitelistEntry = z99.object({
|
|
2211
|
+
isEnabled: z99.boolean(),
|
|
2212
|
+
name: z99.string(),
|
|
2213
|
+
range: z99.string()
|
|
2180
2214
|
});
|
|
2181
|
-
var WorkspaceIpSettings =
|
|
2182
|
-
isEnabledForCloud:
|
|
2183
|
-
isEnabledForDocs:
|
|
2184
|
-
entries:
|
|
2215
|
+
var WorkspaceIpSettings = z99.object({
|
|
2216
|
+
isEnabledForCloud: z99.boolean(),
|
|
2217
|
+
isEnabledForDocs: z99.boolean(),
|
|
2218
|
+
entries: z99.array(WorkspaceIpWhitelistEntry)
|
|
2185
2219
|
}).nullish();
|
|
2186
|
-
var WorkspaceProfile =
|
|
2187
|
-
name:
|
|
2188
|
-
handle:
|
|
2189
|
-
color:
|
|
2190
|
-
avatar: nullishToOptional(
|
|
2220
|
+
var WorkspaceProfile = z99.object({
|
|
2221
|
+
name: z99.string(),
|
|
2222
|
+
handle: z99.string(),
|
|
2223
|
+
color: z99.string(),
|
|
2224
|
+
avatar: nullishToOptional(z99.string()),
|
|
2191
2225
|
billingDetails: nullishToOptional(BillingDetails)
|
|
2192
2226
|
});
|
|
2193
|
-
var Workspace =
|
|
2194
|
-
id:
|
|
2227
|
+
var Workspace = z99.object({
|
|
2228
|
+
id: z99.string(),
|
|
2195
2229
|
profile: WorkspaceProfile,
|
|
2196
2230
|
subscription: Subscription,
|
|
2197
2231
|
ipWhitelist: WorkspaceIpSettings,
|
|
2198
2232
|
sso: SsoProvider.nullish(),
|
|
2199
|
-
npmRegistrySettings:
|
|
2200
|
-
designSystems:
|
|
2233
|
+
npmRegistrySettings: z99.unknown().optional(),
|
|
2234
|
+
designSystems: z99.array(DesignSystem).nullish()
|
|
2201
2235
|
});
|
|
2202
|
-
var WorkspaceWithDesignSystems =
|
|
2236
|
+
var WorkspaceWithDesignSystems = z99.object({
|
|
2203
2237
|
workspace: Workspace,
|
|
2204
|
-
designSystems:
|
|
2238
|
+
designSystems: z99.array(DesignSystem)
|
|
2205
2239
|
});
|
|
2206
|
-
var WorkspaceContext =
|
|
2207
|
-
workspaceId:
|
|
2240
|
+
var WorkspaceContext = z100.object({
|
|
2241
|
+
workspaceId: z100.string(),
|
|
2208
2242
|
product: ProductCodeSchema,
|
|
2209
2243
|
ipWhitelist: WorkspaceIpSettings,
|
|
2210
|
-
publicDesignSystem:
|
|
2244
|
+
publicDesignSystem: z100.boolean().optional()
|
|
2211
2245
|
});
|
|
2212
2246
|
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
2213
2247
|
var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
2214
2248
|
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
2215
2249
|
var HANDLE_MIN_LENGTH = 2;
|
|
2216
2250
|
var HANDLE_MAX_LENGTH = 64;
|
|
2217
|
-
var CreateWorkspaceInput =
|
|
2218
|
-
name:
|
|
2251
|
+
var CreateWorkspaceInput = z101.object({
|
|
2252
|
+
name: z101.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
2219
2253
|
product: ProductCodeSchema,
|
|
2220
|
-
priceId:
|
|
2221
|
-
billingEmail:
|
|
2222
|
-
handle:
|
|
2254
|
+
priceId: z101.string(),
|
|
2255
|
+
billingEmail: z101.string().email().optional(),
|
|
2256
|
+
handle: z101.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => value?.length > 0).optional(),
|
|
2223
2257
|
invites: UserInvites.optional(),
|
|
2224
|
-
promoCode:
|
|
2258
|
+
promoCode: z101.string().optional(),
|
|
2225
2259
|
status: InternalStatusSchema.optional(),
|
|
2226
2260
|
planInterval: BillingIntervalSchema.optional(),
|
|
2227
|
-
seats:
|
|
2228
|
-
seatLimit:
|
|
2261
|
+
seats: z101.number().optional(),
|
|
2262
|
+
seatLimit: z101.number().optional(),
|
|
2229
2263
|
card: CardSchema.optional()
|
|
2230
2264
|
});
|
|
2231
|
-
var WorkspaceInvitation =
|
|
2232
|
-
id: z101.string(),
|
|
2233
|
-
email: z101.string().email(),
|
|
2234
|
-
createdAt: z101.coerce.date(),
|
|
2235
|
-
resentAt: z101.coerce.date().nullish(),
|
|
2236
|
-
role: z101.nativeEnum(WorkspaceRole),
|
|
2237
|
-
workspaceId: z101.string(),
|
|
2238
|
-
invitedBy: z101.string()
|
|
2239
|
-
});
|
|
2240
|
-
var WorkspaceMembership = z102.object({
|
|
2265
|
+
var WorkspaceInvitation = z102.object({
|
|
2241
2266
|
id: z102.string(),
|
|
2242
|
-
|
|
2267
|
+
email: z102.string().email(),
|
|
2268
|
+
createdAt: z102.coerce.date(),
|
|
2269
|
+
resentAt: z102.coerce.date().nullish(),
|
|
2270
|
+
role: z102.nativeEnum(WorkspaceRole),
|
|
2243
2271
|
workspaceId: z102.string(),
|
|
2244
|
-
|
|
2272
|
+
invitedBy: z102.string()
|
|
2273
|
+
});
|
|
2274
|
+
var WorkspaceMembership = z103.object({
|
|
2275
|
+
id: z103.string(),
|
|
2276
|
+
userId: z103.string(),
|
|
2277
|
+
workspaceId: z103.string(),
|
|
2278
|
+
workspaceRole: z103.nativeEnum(WorkspaceRole)
|
|
2245
2279
|
});
|
|
2246
|
-
var UpdateMembershipRolesInput =
|
|
2247
|
-
members:
|
|
2248
|
-
|
|
2249
|
-
userId:
|
|
2250
|
-
role:
|
|
2280
|
+
var UpdateMembershipRolesInput = z103.object({
|
|
2281
|
+
members: z103.array(
|
|
2282
|
+
z103.object({
|
|
2283
|
+
userId: z103.string(),
|
|
2284
|
+
role: z103.nativeEnum(WorkspaceRole)
|
|
2251
2285
|
})
|
|
2252
2286
|
)
|
|
2253
2287
|
});
|
|
2254
|
-
var DesignSystemSwitcher =
|
|
2255
|
-
isEnabled:
|
|
2256
|
-
designSystemIds:
|
|
2288
|
+
var DesignSystemSwitcher = z104.object({
|
|
2289
|
+
isEnabled: z104.boolean(),
|
|
2290
|
+
designSystemIds: z104.array(z104.string())
|
|
2257
2291
|
});
|
|
2258
|
-
var DesignSystem =
|
|
2259
|
-
id:
|
|
2260
|
-
workspaceId:
|
|
2261
|
-
name:
|
|
2262
|
-
description:
|
|
2263
|
-
docExporterId: nullishToOptional(
|
|
2264
|
-
docSlug:
|
|
2265
|
-
docUserSlug: nullishToOptional(
|
|
2266
|
-
docSlugDeprecated:
|
|
2267
|
-
isPublic:
|
|
2268
|
-
isMultibrand:
|
|
2269
|
-
docViewUrl: nullishToOptional(
|
|
2270
|
-
basePrefixes:
|
|
2292
|
+
var DesignSystem = z104.object({
|
|
2293
|
+
id: z104.string(),
|
|
2294
|
+
workspaceId: z104.string(),
|
|
2295
|
+
name: z104.string(),
|
|
2296
|
+
description: z104.string(),
|
|
2297
|
+
docExporterId: nullishToOptional(z104.string()),
|
|
2298
|
+
docSlug: z104.string(),
|
|
2299
|
+
docUserSlug: nullishToOptional(z104.string()),
|
|
2300
|
+
docSlugDeprecated: z104.string(),
|
|
2301
|
+
isPublic: z104.boolean(),
|
|
2302
|
+
isMultibrand: z104.boolean(),
|
|
2303
|
+
docViewUrl: nullishToOptional(z104.string()),
|
|
2304
|
+
basePrefixes: z104.array(z104.string()),
|
|
2271
2305
|
designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
|
|
2272
|
-
createdAt:
|
|
2273
|
-
updatedAt:
|
|
2306
|
+
createdAt: z104.coerce.date(),
|
|
2307
|
+
updatedAt: z104.coerce.date()
|
|
2274
2308
|
});
|
|
2275
|
-
var DesignSystemWithWorkspace =
|
|
2309
|
+
var DesignSystemWithWorkspace = z104.object({
|
|
2276
2310
|
designSystem: DesignSystem,
|
|
2277
2311
|
workspace: Workspace
|
|
2278
2312
|
});
|
|
@@ -2280,81 +2314,81 @@ var DS_NAME_MIN_LENGTH = 2;
|
|
|
2280
2314
|
var DS_NAME_MAX_LENGTH = 64;
|
|
2281
2315
|
var DS_DESC_MIN_LENGTH = 2;
|
|
2282
2316
|
var DS_DESC_MAX_LENGTH = 64;
|
|
2283
|
-
var DesignSystemCreateInputMetadata =
|
|
2284
|
-
name:
|
|
2285
|
-
description:
|
|
2317
|
+
var DesignSystemCreateInputMetadata = z105.object({
|
|
2318
|
+
name: z105.string().min(DS_NAME_MIN_LENGTH).max(DS_NAME_MAX_LENGTH).trim(),
|
|
2319
|
+
description: z105.string().min(DS_DESC_MIN_LENGTH).max(DS_DESC_MAX_LENGTH).trim()
|
|
2286
2320
|
});
|
|
2287
|
-
var DesignSystemCreateInput =
|
|
2321
|
+
var DesignSystemCreateInput = z105.object({
|
|
2288
2322
|
meta: DesignSystemCreateInputMetadata,
|
|
2289
|
-
workspaceId:
|
|
2290
|
-
isPublic:
|
|
2291
|
-
basePrefixes:
|
|
2292
|
-
docUserSlug:
|
|
2293
|
-
source:
|
|
2323
|
+
workspaceId: z105.string(),
|
|
2324
|
+
isPublic: z105.boolean().optional(),
|
|
2325
|
+
basePrefixes: z105.array(z105.string()).optional(),
|
|
2326
|
+
docUserSlug: z105.string().nullish().optional(),
|
|
2327
|
+
source: z105.array(z105.string()).optional()
|
|
2294
2328
|
});
|
|
2295
2329
|
var DS_NAME_MIN_LENGTH2 = 2;
|
|
2296
2330
|
var DS_NAME_MAX_LENGTH2 = 64;
|
|
2297
2331
|
var DS_DESC_MIN_LENGTH2 = 2;
|
|
2298
2332
|
var DS_DESC_MAX_LENGTH2 = 64;
|
|
2299
|
-
var DesignSystemUpdateInputMetadata =
|
|
2300
|
-
name:
|
|
2301
|
-
description:
|
|
2333
|
+
var DesignSystemUpdateInputMetadata = z106.object({
|
|
2334
|
+
name: z106.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2335
|
+
description: z106.string().min(DS_DESC_MIN_LENGTH2).max(DS_DESC_MAX_LENGTH2).trim().optional()
|
|
2302
2336
|
});
|
|
2303
|
-
var DesignSystemUpdateInput =
|
|
2337
|
+
var DesignSystemUpdateInput = z106.object({
|
|
2304
2338
|
meta: DesignSystemUpdateInputMetadata.optional(),
|
|
2305
|
-
workspaceId:
|
|
2306
|
-
isPublic:
|
|
2307
|
-
basePrefixes:
|
|
2308
|
-
docUserSlug:
|
|
2309
|
-
source:
|
|
2310
|
-
name:
|
|
2311
|
-
description:
|
|
2312
|
-
docExporterId:
|
|
2339
|
+
workspaceId: z106.string().optional(),
|
|
2340
|
+
isPublic: z106.boolean().optional(),
|
|
2341
|
+
basePrefixes: z106.array(z106.string()).optional(),
|
|
2342
|
+
docUserSlug: z106.string().nullish().optional(),
|
|
2343
|
+
source: z106.array(z106.string()).optional(),
|
|
2344
|
+
name: z106.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2345
|
+
description: z106.string().min(DS_DESC_MIN_LENGTH2).max(DS_DESC_MAX_LENGTH2).trim().optional(),
|
|
2346
|
+
docExporterId: z106.string().optional()
|
|
2313
2347
|
});
|
|
2314
2348
|
var publishedDocEnvironments = ["Live", "Preview"];
|
|
2315
|
-
var PublishedDocEnvironment =
|
|
2316
|
-
var PublishedDocsChecksums =
|
|
2317
|
-
var PublishedDocRoutingVersion =
|
|
2318
|
-
var PublishedDoc =
|
|
2319
|
-
id:
|
|
2320
|
-
designSystemVersionId:
|
|
2321
|
-
createdAt:
|
|
2322
|
-
updatedAt:
|
|
2323
|
-
lastPublishedAt:
|
|
2324
|
-
isDefault:
|
|
2325
|
-
isPublic:
|
|
2349
|
+
var PublishedDocEnvironment = z107.enum(publishedDocEnvironments);
|
|
2350
|
+
var PublishedDocsChecksums = z107.record(z107.string());
|
|
2351
|
+
var PublishedDocRoutingVersion = z107.enum(["1", "2"]);
|
|
2352
|
+
var PublishedDoc = z107.object({
|
|
2353
|
+
id: z107.string(),
|
|
2354
|
+
designSystemVersionId: z107.string(),
|
|
2355
|
+
createdAt: z107.coerce.date(),
|
|
2356
|
+
updatedAt: z107.coerce.date(),
|
|
2357
|
+
lastPublishedAt: z107.coerce.date(),
|
|
2358
|
+
isDefault: z107.boolean(),
|
|
2359
|
+
isPublic: z107.boolean(),
|
|
2326
2360
|
environment: PublishedDocEnvironment,
|
|
2327
2361
|
checksums: PublishedDocsChecksums,
|
|
2328
|
-
storagePath:
|
|
2329
|
-
wasMigrated:
|
|
2362
|
+
storagePath: z107.string(),
|
|
2363
|
+
wasMigrated: z107.boolean(),
|
|
2330
2364
|
routingVersion: PublishedDocRoutingVersion,
|
|
2331
|
-
usesLocalizations:
|
|
2332
|
-
wasPublishedWithLocalizations:
|
|
2333
|
-
});
|
|
2334
|
-
var ExporterJobDestination =
|
|
2335
|
-
var ExporterJobStatus =
|
|
2336
|
-
var ExporterJobLogEntryType =
|
|
2337
|
-
var ExporterJobLogEntry =
|
|
2338
|
-
id:
|
|
2339
|
-
time:
|
|
2365
|
+
usesLocalizations: z107.boolean(),
|
|
2366
|
+
wasPublishedWithLocalizations: z107.boolean()
|
|
2367
|
+
});
|
|
2368
|
+
var ExporterJobDestination = z108.enum(["s3", "webhookUrl", "github", "documentation", "azure", "gitlab"]);
|
|
2369
|
+
var ExporterJobStatus = z108.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
2370
|
+
var ExporterJobLogEntryType = z108.enum(["success", "info", "warning", "error", "user"]);
|
|
2371
|
+
var ExporterJobLogEntry = z108.object({
|
|
2372
|
+
id: z108.string().optional(),
|
|
2373
|
+
time: z108.coerce.date(),
|
|
2340
2374
|
type: ExporterJobLogEntryType,
|
|
2341
|
-
message:
|
|
2375
|
+
message: z108.string()
|
|
2342
2376
|
});
|
|
2343
|
-
var ExporterJobResultPullRequestDestination =
|
|
2344
|
-
pullRequestUrl:
|
|
2377
|
+
var ExporterJobResultPullRequestDestination = z108.object({
|
|
2378
|
+
pullRequestUrl: z108.string()
|
|
2345
2379
|
});
|
|
2346
|
-
var ExporterJobResultS3Destination =
|
|
2347
|
-
bucket:
|
|
2348
|
-
urlPrefix:
|
|
2349
|
-
path:
|
|
2350
|
-
files:
|
|
2380
|
+
var ExporterJobResultS3Destination = z108.object({
|
|
2381
|
+
bucket: z108.string(),
|
|
2382
|
+
urlPrefix: z108.string().optional(),
|
|
2383
|
+
path: z108.string(),
|
|
2384
|
+
files: z108.array(z108.string())
|
|
2351
2385
|
});
|
|
2352
|
-
var ExporterJobResultDocsDestination =
|
|
2353
|
-
url:
|
|
2386
|
+
var ExporterJobResultDocsDestination = z108.object({
|
|
2387
|
+
url: z108.string()
|
|
2354
2388
|
});
|
|
2355
|
-
var ExporterJobResult =
|
|
2356
|
-
error:
|
|
2357
|
-
logs:
|
|
2389
|
+
var ExporterJobResult = z108.object({
|
|
2390
|
+
error: z108.string().optional(),
|
|
2391
|
+
logs: z108.array(ExporterJobLogEntry).optional(),
|
|
2358
2392
|
s3: ExporterJobResultS3Destination.optional(),
|
|
2359
2393
|
github: ExporterJobResultPullRequestDestination.optional(),
|
|
2360
2394
|
azure: ExporterJobResultPullRequestDestination.optional(),
|
|
@@ -2362,68 +2396,68 @@ var ExporterJobResult = z107.object({
|
|
|
2362
2396
|
bitbucket: ExporterJobResultPullRequestDestination.optional(),
|
|
2363
2397
|
sndocs: ExporterJobResultDocsDestination.optional()
|
|
2364
2398
|
});
|
|
2365
|
-
var ExporterDestinationSnDocs =
|
|
2399
|
+
var ExporterDestinationSnDocs = z108.object({
|
|
2366
2400
|
environment: PublishedDocEnvironment
|
|
2367
2401
|
});
|
|
2368
|
-
var ExporterDestinationS3 =
|
|
2369
|
-
var ExporterDestinationGithub =
|
|
2370
|
-
connectionId:
|
|
2371
|
-
url:
|
|
2372
|
-
branch:
|
|
2373
|
-
relativePath:
|
|
2402
|
+
var ExporterDestinationS3 = z108.object({});
|
|
2403
|
+
var ExporterDestinationGithub = z108.object({
|
|
2404
|
+
connectionId: z108.string(),
|
|
2405
|
+
url: z108.string(),
|
|
2406
|
+
branch: z108.string(),
|
|
2407
|
+
relativePath: z108.string(),
|
|
2374
2408
|
// +
|
|
2375
|
-
userId:
|
|
2376
|
-
});
|
|
2377
|
-
var ExporterDestinationAzure =
|
|
2378
|
-
connectionId:
|
|
2379
|
-
organizationId:
|
|
2380
|
-
projectId:
|
|
2381
|
-
repositoryId:
|
|
2382
|
-
branch:
|
|
2383
|
-
relativePath:
|
|
2409
|
+
userId: z108.coerce.string()
|
|
2410
|
+
});
|
|
2411
|
+
var ExporterDestinationAzure = z108.object({
|
|
2412
|
+
connectionId: z108.string(),
|
|
2413
|
+
organizationId: z108.string(),
|
|
2414
|
+
projectId: z108.string(),
|
|
2415
|
+
repositoryId: z108.string(),
|
|
2416
|
+
branch: z108.string(),
|
|
2417
|
+
relativePath: z108.string(),
|
|
2384
2418
|
// +
|
|
2385
|
-
userId:
|
|
2386
|
-
url:
|
|
2387
|
-
});
|
|
2388
|
-
var ExporterDestinationGitlab =
|
|
2389
|
-
connectionId:
|
|
2390
|
-
projectId:
|
|
2391
|
-
branch:
|
|
2392
|
-
relativePath:
|
|
2419
|
+
userId: z108.coerce.string(),
|
|
2420
|
+
url: z108.string()
|
|
2421
|
+
});
|
|
2422
|
+
var ExporterDestinationGitlab = z108.object({
|
|
2423
|
+
connectionId: z108.string(),
|
|
2424
|
+
projectId: z108.string(),
|
|
2425
|
+
branch: z108.string(),
|
|
2426
|
+
relativePath: z108.string(),
|
|
2393
2427
|
// +
|
|
2394
|
-
userId:
|
|
2395
|
-
url:
|
|
2428
|
+
userId: z108.coerce.string(),
|
|
2429
|
+
url: z108.string()
|
|
2396
2430
|
});
|
|
2397
2431
|
var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
|
|
2398
2432
|
var BITBUCKET_MAX_LENGTH = 64;
|
|
2399
|
-
var ExporterDestinationBitbucket =
|
|
2400
|
-
connectionId:
|
|
2401
|
-
workspaceSlug:
|
|
2402
|
-
projectKey:
|
|
2403
|
-
repoSlug:
|
|
2404
|
-
branch:
|
|
2405
|
-
relativePath:
|
|
2433
|
+
var ExporterDestinationBitbucket = z108.object({
|
|
2434
|
+
connectionId: z108.string(),
|
|
2435
|
+
workspaceSlug: z108.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2436
|
+
projectKey: z108.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2437
|
+
repoSlug: z108.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2438
|
+
branch: z108.string(),
|
|
2439
|
+
relativePath: z108.string(),
|
|
2406
2440
|
// +
|
|
2407
|
-
userId:
|
|
2408
|
-
url:
|
|
2409
|
-
});
|
|
2410
|
-
var ExporterJob =
|
|
2411
|
-
id:
|
|
2412
|
-
createdAt:
|
|
2413
|
-
finishedAt:
|
|
2414
|
-
designSystemId:
|
|
2415
|
-
designSystemVersionId:
|
|
2416
|
-
workspaceId:
|
|
2417
|
-
scheduleId:
|
|
2418
|
-
exporterId:
|
|
2419
|
-
brandId:
|
|
2420
|
-
themeId:
|
|
2421
|
-
estimatedExecutionTime:
|
|
2441
|
+
userId: z108.coerce.string(),
|
|
2442
|
+
url: z108.string()
|
|
2443
|
+
});
|
|
2444
|
+
var ExporterJob = z108.object({
|
|
2445
|
+
id: z108.coerce.string(),
|
|
2446
|
+
createdAt: z108.coerce.date(),
|
|
2447
|
+
finishedAt: z108.coerce.date().optional(),
|
|
2448
|
+
designSystemId: z108.coerce.string(),
|
|
2449
|
+
designSystemVersionId: z108.coerce.string(),
|
|
2450
|
+
workspaceId: z108.coerce.string(),
|
|
2451
|
+
scheduleId: z108.coerce.string().nullish(),
|
|
2452
|
+
exporterId: z108.coerce.string(),
|
|
2453
|
+
brandId: z108.coerce.string().optional(),
|
|
2454
|
+
themeId: z108.coerce.string().optional(),
|
|
2455
|
+
estimatedExecutionTime: z108.number().optional(),
|
|
2422
2456
|
status: ExporterJobStatus,
|
|
2423
2457
|
result: ExporterJobResult.optional(),
|
|
2424
|
-
createdByUserId:
|
|
2458
|
+
createdByUserId: z108.string().optional(),
|
|
2425
2459
|
// CodegenDestinationsModel
|
|
2426
|
-
webhookUrl:
|
|
2460
|
+
webhookUrl: z108.string().optional(),
|
|
2427
2461
|
destinationSnDocs: ExporterDestinationSnDocs.optional(),
|
|
2428
2462
|
destinationS3: ExporterDestinationS3.optional(),
|
|
2429
2463
|
destinationGithub: ExporterDestinationGithub.optional(),
|
|
@@ -2442,14 +2476,14 @@ var ExporterJobFindByFilter = ExporterJob.pick({
|
|
|
2442
2476
|
themeId: true,
|
|
2443
2477
|
brandId: true
|
|
2444
2478
|
}).extend({
|
|
2445
|
-
destinations:
|
|
2479
|
+
destinations: z108.array(ExporterJobDestination),
|
|
2446
2480
|
docsEnvironment: PublishedDocEnvironment
|
|
2447
2481
|
}).partial();
|
|
2448
|
-
var ExporterWorkspaceMembershipRole =
|
|
2449
|
-
var ExporterWorkspaceMembership =
|
|
2450
|
-
id:
|
|
2451
|
-
workspaceId:
|
|
2452
|
-
exporterId:
|
|
2482
|
+
var ExporterWorkspaceMembershipRole = z109.enum(["Owner", "OwnerArchived", "User"]);
|
|
2483
|
+
var ExporterWorkspaceMembership = z110.object({
|
|
2484
|
+
id: z110.string(),
|
|
2485
|
+
workspaceId: z110.string(),
|
|
2486
|
+
exporterId: z110.string(),
|
|
2453
2487
|
role: ExporterWorkspaceMembershipRole
|
|
2454
2488
|
});
|
|
2455
2489
|
var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
@@ -2459,8 +2493,8 @@ var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
|
2459
2493
|
GitProviderNames2["Bitbucket"] = "bitbucket";
|
|
2460
2494
|
return GitProviderNames2;
|
|
2461
2495
|
})(GitProviderNames || {});
|
|
2462
|
-
var GitProvider =
|
|
2463
|
-
var PulsarPropertyType =
|
|
2496
|
+
var GitProvider = z111.nativeEnum(GitProviderNames);
|
|
2497
|
+
var PulsarPropertyType = z112.enum([
|
|
2464
2498
|
"string",
|
|
2465
2499
|
"number",
|
|
2466
2500
|
"boolean",
|
|
@@ -2473,164 +2507,164 @@ var PulsarPropertyType = z111.enum([
|
|
|
2473
2507
|
"tokenProperties",
|
|
2474
2508
|
"tokenType"
|
|
2475
2509
|
]);
|
|
2476
|
-
var PulsarBaseProperty =
|
|
2477
|
-
label:
|
|
2478
|
-
key:
|
|
2479
|
-
description:
|
|
2510
|
+
var PulsarBaseProperty = z112.object({
|
|
2511
|
+
label: z112.string(),
|
|
2512
|
+
key: z112.string(),
|
|
2513
|
+
description: z112.string().nullish(),
|
|
2480
2514
|
type: PulsarPropertyType,
|
|
2481
|
-
values:
|
|
2482
|
-
default:
|
|
2515
|
+
values: z112.array(z112.string()).nullish(),
|
|
2516
|
+
default: z112.union([z112.string(), z112.boolean(), z112.number()]).nullish(),
|
|
2483
2517
|
// PulsarPropertyValueType //is optional?
|
|
2484
|
-
inputType:
|
|
2518
|
+
inputType: z112.enum(["code", "plain"]).optional(),
|
|
2485
2519
|
//is optional?
|
|
2486
|
-
isMultiline:
|
|
2520
|
+
isMultiline: z112.boolean().nullish()
|
|
2487
2521
|
});
|
|
2488
2522
|
var PulsarContributionConfigurationProperty = PulsarBaseProperty.extend({
|
|
2489
|
-
category:
|
|
2490
|
-
});
|
|
2491
|
-
var PulsarContributionVariant =
|
|
2492
|
-
key:
|
|
2493
|
-
name:
|
|
2494
|
-
isDefault:
|
|
2495
|
-
description:
|
|
2496
|
-
thumbnailURL:
|
|
2497
|
-
});
|
|
2498
|
-
var PulsarCustomBlock =
|
|
2499
|
-
title:
|
|
2500
|
-
key:
|
|
2501
|
-
category:
|
|
2502
|
-
description: nullishToOptional(
|
|
2503
|
-
iconURL:
|
|
2504
|
-
mode:
|
|
2505
|
-
properties:
|
|
2506
|
-
});
|
|
2507
|
-
var ExporterType =
|
|
2508
|
-
var ExporterSource =
|
|
2509
|
-
var ExporterTag =
|
|
2510
|
-
var ExporterDetails =
|
|
2511
|
-
description:
|
|
2512
|
-
version:
|
|
2513
|
-
routingVersion: nullishToOptional(
|
|
2514
|
-
author: nullishToOptional(
|
|
2515
|
-
organization: nullishToOptional(
|
|
2516
|
-
homepage: nullishToOptional(
|
|
2517
|
-
readme: nullishToOptional(
|
|
2518
|
-
tags: nullishToOptional(
|
|
2519
|
-
packageId: nullishToOptional(
|
|
2520
|
-
iconURL: nullishToOptional(
|
|
2521
|
-
configurationProperties: nullishToOptional(
|
|
2522
|
-
customBlocks: nullishToOptional(
|
|
2523
|
-
blockVariants: nullishToOptional(
|
|
2524
|
-
usesBrands: nullishToOptional(
|
|
2525
|
-
usesThemes: nullishToOptional(
|
|
2523
|
+
category: z112.string()
|
|
2524
|
+
});
|
|
2525
|
+
var PulsarContributionVariant = z112.object({
|
|
2526
|
+
key: z112.string(),
|
|
2527
|
+
name: z112.string(),
|
|
2528
|
+
isDefault: z112.boolean().nullish(),
|
|
2529
|
+
description: z112.string().nullish(),
|
|
2530
|
+
thumbnailURL: z112.string().nullish()
|
|
2531
|
+
});
|
|
2532
|
+
var PulsarCustomBlock = z112.object({
|
|
2533
|
+
title: z112.string(),
|
|
2534
|
+
key: z112.string(),
|
|
2535
|
+
category: z112.string(),
|
|
2536
|
+
description: nullishToOptional(z112.string()),
|
|
2537
|
+
iconURL: z112.string(),
|
|
2538
|
+
mode: z112.enum(["array", "block"]),
|
|
2539
|
+
properties: z112.array(PulsarBaseProperty)
|
|
2540
|
+
});
|
|
2541
|
+
var ExporterType = z113.enum(["code", "documentation"]);
|
|
2542
|
+
var ExporterSource = z113.enum(["git", "upload"]);
|
|
2543
|
+
var ExporterTag = z113.string().regex(/^[0-9a-zA-Z]+(\s[0-9a-zA-Z]+)*$/);
|
|
2544
|
+
var ExporterDetails = z113.object({
|
|
2545
|
+
description: z113.string(),
|
|
2546
|
+
version: z113.string(),
|
|
2547
|
+
routingVersion: nullishToOptional(z113.string()),
|
|
2548
|
+
author: nullishToOptional(z113.string()),
|
|
2549
|
+
organization: nullishToOptional(z113.string()),
|
|
2550
|
+
homepage: nullishToOptional(z113.string()),
|
|
2551
|
+
readme: nullishToOptional(z113.string()),
|
|
2552
|
+
tags: nullishToOptional(z113.array(ExporterTag)).default([]),
|
|
2553
|
+
packageId: nullishToOptional(z113.string().max(255)),
|
|
2554
|
+
iconURL: nullishToOptional(z113.string()),
|
|
2555
|
+
configurationProperties: nullishToOptional(z113.array(PulsarContributionConfigurationProperty)).default([]),
|
|
2556
|
+
customBlocks: nullishToOptional(z113.array(PulsarCustomBlock)).default([]),
|
|
2557
|
+
blockVariants: nullishToOptional(z113.record(z113.string(), z113.array(PulsarContributionVariant))).default({}),
|
|
2558
|
+
usesBrands: nullishToOptional(z113.boolean()).default(false),
|
|
2559
|
+
usesThemes: nullishToOptional(z113.boolean()).default(false),
|
|
2526
2560
|
source: ExporterSource,
|
|
2527
2561
|
gitProvider: nullishToOptional(GitProvider),
|
|
2528
|
-
gitUrl: nullishToOptional(
|
|
2529
|
-
gitBranch: nullishToOptional(
|
|
2530
|
-
gitDirectory: nullishToOptional(
|
|
2562
|
+
gitUrl: nullishToOptional(z113.string()),
|
|
2563
|
+
gitBranch: nullishToOptional(z113.string()),
|
|
2564
|
+
gitDirectory: nullishToOptional(z113.string())
|
|
2531
2565
|
});
|
|
2532
|
-
var Exporter =
|
|
2533
|
-
id:
|
|
2534
|
-
createdAt:
|
|
2535
|
-
name:
|
|
2536
|
-
isPrivate:
|
|
2566
|
+
var Exporter = z113.object({
|
|
2567
|
+
id: z113.string(),
|
|
2568
|
+
createdAt: z113.coerce.date(),
|
|
2569
|
+
name: z113.string(),
|
|
2570
|
+
isPrivate: z113.boolean(),
|
|
2537
2571
|
details: ExporterDetails,
|
|
2538
2572
|
exporterType: nullishToOptional(ExporterType).default("code"),
|
|
2539
|
-
storagePath: nullishToOptional(
|
|
2573
|
+
storagePath: nullishToOptional(z113.string()).default("")
|
|
2540
2574
|
});
|
|
2541
|
-
var CustomDomain =
|
|
2542
|
-
id: z113.string(),
|
|
2543
|
-
designSystemId: z113.string(),
|
|
2544
|
-
state: z113.string(),
|
|
2545
|
-
supernovaDomain: z113.string(),
|
|
2546
|
-
customerDomain: z113.string().nullish(),
|
|
2547
|
-
error: z113.string().nullish(),
|
|
2548
|
-
errorCode: z113.string().nullish()
|
|
2549
|
-
});
|
|
2550
|
-
var IntegrationAuthType = z114.union([z114.literal("OAuth2"), z114.literal("PAT")]);
|
|
2551
|
-
var ExternalServiceType = z114.union([
|
|
2552
|
-
z114.literal("figma"),
|
|
2553
|
-
z114.literal("github"),
|
|
2554
|
-
z114.literal("azure"),
|
|
2555
|
-
z114.literal("gitlab"),
|
|
2556
|
-
z114.literal("bitbucket")
|
|
2557
|
-
]);
|
|
2558
|
-
var IntegrationUserInfo = z114.object({
|
|
2575
|
+
var CustomDomain = z114.object({
|
|
2559
2576
|
id: z114.string(),
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2577
|
+
designSystemId: z114.string(),
|
|
2578
|
+
state: z114.string(),
|
|
2579
|
+
supernovaDomain: z114.string(),
|
|
2580
|
+
customerDomain: z114.string().nullish(),
|
|
2581
|
+
error: z114.string().nullish(),
|
|
2582
|
+
errorCode: z114.string().nullish()
|
|
2583
|
+
});
|
|
2584
|
+
var IntegrationAuthType = z115.union([z115.literal("OAuth2"), z115.literal("PAT")]);
|
|
2585
|
+
var ExternalServiceType = z115.union([
|
|
2586
|
+
z115.literal("figma"),
|
|
2587
|
+
z115.literal("github"),
|
|
2588
|
+
z115.literal("azure"),
|
|
2589
|
+
z115.literal("gitlab"),
|
|
2590
|
+
z115.literal("bitbucket")
|
|
2591
|
+
]);
|
|
2592
|
+
var IntegrationUserInfo = z115.object({
|
|
2593
|
+
id: z115.string(),
|
|
2594
|
+
handle: z115.string().optional(),
|
|
2595
|
+
avatarUrl: z115.string().optional(),
|
|
2596
|
+
email: z115.string().optional(),
|
|
2563
2597
|
authType: IntegrationAuthType.optional(),
|
|
2564
|
-
customUrl:
|
|
2598
|
+
customUrl: z115.string().optional()
|
|
2565
2599
|
});
|
|
2566
|
-
var UserLinkedIntegrations =
|
|
2600
|
+
var UserLinkedIntegrations = z115.object({
|
|
2567
2601
|
figma: IntegrationUserInfo.optional(),
|
|
2568
2602
|
github: IntegrationUserInfo.array().optional(),
|
|
2569
2603
|
azure: IntegrationUserInfo.array().optional(),
|
|
2570
2604
|
gitlab: IntegrationUserInfo.array().optional(),
|
|
2571
2605
|
bitbucket: IntegrationUserInfo.array().optional()
|
|
2572
2606
|
});
|
|
2573
|
-
var UserIdentity =
|
|
2574
|
-
id:
|
|
2575
|
-
userId:
|
|
2576
|
-
});
|
|
2577
|
-
var UserOnboardingDepartment =
|
|
2578
|
-
var UserOnboardingJobLevel =
|
|
2579
|
-
var UserOnboarding =
|
|
2580
|
-
companyName:
|
|
2581
|
-
numberOfPeopleInOrg:
|
|
2582
|
-
numberOfPeopleInDesignTeam:
|
|
2607
|
+
var UserIdentity = z116.object({
|
|
2608
|
+
id: z116.string(),
|
|
2609
|
+
userId: z116.string()
|
|
2610
|
+
});
|
|
2611
|
+
var UserOnboardingDepartment = z117.enum(["Design", "Engineering", "Brand", "Other"]);
|
|
2612
|
+
var UserOnboardingJobLevel = z117.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
2613
|
+
var UserOnboarding = z117.object({
|
|
2614
|
+
companyName: z117.string().optional(),
|
|
2615
|
+
numberOfPeopleInOrg: z117.string().optional(),
|
|
2616
|
+
numberOfPeopleInDesignTeam: z117.string().optional(),
|
|
2583
2617
|
department: UserOnboardingDepartment.optional(),
|
|
2584
|
-
jobTitle:
|
|
2585
|
-
phase:
|
|
2618
|
+
jobTitle: z117.string().optional(),
|
|
2619
|
+
phase: z117.string().optional(),
|
|
2586
2620
|
jobLevel: UserOnboardingJobLevel.optional()
|
|
2587
2621
|
});
|
|
2588
|
-
var UserProfile =
|
|
2589
|
-
name:
|
|
2590
|
-
avatar:
|
|
2591
|
-
nickname:
|
|
2622
|
+
var UserProfile = z117.object({
|
|
2623
|
+
name: z117.string(),
|
|
2624
|
+
avatar: z117.string().optional(),
|
|
2625
|
+
nickname: z117.string().optional(),
|
|
2592
2626
|
onboarding: UserOnboarding.optional()
|
|
2593
2627
|
});
|
|
2594
|
-
var User =
|
|
2595
|
-
id:
|
|
2596
|
-
email:
|
|
2597
|
-
emailVerified:
|
|
2598
|
-
createdAt:
|
|
2599
|
-
trialExpiresAt:
|
|
2628
|
+
var User = z118.object({
|
|
2629
|
+
id: z118.string(),
|
|
2630
|
+
email: z118.string(),
|
|
2631
|
+
emailVerified: z118.boolean(),
|
|
2632
|
+
createdAt: z118.coerce.date(),
|
|
2633
|
+
trialExpiresAt: z118.coerce.date().optional(),
|
|
2600
2634
|
profile: UserProfile,
|
|
2601
2635
|
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
2602
|
-
loggedOutAt:
|
|
2603
|
-
isProtected:
|
|
2636
|
+
loggedOutAt: z118.coerce.date().optional(),
|
|
2637
|
+
isProtected: z118.boolean()
|
|
2604
2638
|
});
|
|
2605
|
-
var NpmProxyToken =
|
|
2606
|
-
access:
|
|
2607
|
-
expiresAt:
|
|
2639
|
+
var NpmProxyToken = z119.object({
|
|
2640
|
+
access: z119.string(),
|
|
2641
|
+
expiresAt: z119.number()
|
|
2608
2642
|
});
|
|
2609
|
-
var SessionData =
|
|
2610
|
-
returnToUrl:
|
|
2643
|
+
var SessionData = z119.object({
|
|
2644
|
+
returnToUrl: z119.string().optional(),
|
|
2611
2645
|
npmProxyToken: NpmProxyToken.optional()
|
|
2612
2646
|
});
|
|
2613
|
-
var Session =
|
|
2614
|
-
id:
|
|
2615
|
-
expiresAt:
|
|
2616
|
-
userId:
|
|
2647
|
+
var Session = z119.object({
|
|
2648
|
+
id: z119.string(),
|
|
2649
|
+
expiresAt: z119.coerce.date(),
|
|
2650
|
+
userId: z119.string().nullable(),
|
|
2617
2651
|
data: SessionData
|
|
2618
2652
|
});
|
|
2619
|
-
var AuthTokens =
|
|
2620
|
-
access:
|
|
2621
|
-
refresh:
|
|
2653
|
+
var AuthTokens = z119.object({
|
|
2654
|
+
access: z119.string(),
|
|
2655
|
+
refresh: z119.string()
|
|
2622
2656
|
});
|
|
2623
|
-
var UserSession =
|
|
2657
|
+
var UserSession = z119.object({
|
|
2624
2658
|
session: Session,
|
|
2625
2659
|
user: User.nullable()
|
|
2626
2660
|
});
|
|
2627
|
-
var FlaggedFeature =
|
|
2628
|
-
var FeatureFlagMap =
|
|
2629
|
-
var FeatureFlag =
|
|
2630
|
-
id:
|
|
2661
|
+
var FlaggedFeature = z120.enum(["FigmaImporterV2"]);
|
|
2662
|
+
var FeatureFlagMap = z120.record(FlaggedFeature, z120.boolean());
|
|
2663
|
+
var FeatureFlag = z120.object({
|
|
2664
|
+
id: z120.string(),
|
|
2631
2665
|
feature: FlaggedFeature,
|
|
2632
|
-
createdAt:
|
|
2633
|
-
enabled:
|
|
2666
|
+
createdAt: z120.coerce.date(),
|
|
2667
|
+
enabled: z120.boolean()
|
|
2634
2668
|
});
|
|
2635
2669
|
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
2636
2670
|
OAuthProviderNames2["Figma"] = "figma";
|
|
@@ -2640,96 +2674,92 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
|
2640
2674
|
OAuthProviderNames2["Bitbucket"] = "bitbucket";
|
|
2641
2675
|
return OAuthProviderNames2;
|
|
2642
2676
|
})(OAuthProviderNames || {});
|
|
2643
|
-
var OAuthProviderSchema =
|
|
2677
|
+
var OAuthProviderSchema = z121.nativeEnum(OAuthProviderNames);
|
|
2644
2678
|
var OAuthProvider = OAuthProviderSchema.enum;
|
|
2645
|
-
var ExternalOAuthRequest =
|
|
2646
|
-
id: z121.string(),
|
|
2647
|
-
provider: OAuthProviderSchema,
|
|
2648
|
-
userId: z121.string(),
|
|
2649
|
-
state: z121.string(),
|
|
2650
|
-
createdAt: z121.coerce.date()
|
|
2651
|
-
});
|
|
2652
|
-
var IntegrationTokenSchema = z122.object({
|
|
2679
|
+
var ExternalOAuthRequest = z122.object({
|
|
2653
2680
|
id: z122.string(),
|
|
2654
2681
|
provider: OAuthProviderSchema,
|
|
2655
|
-
scope: z122.string(),
|
|
2656
2682
|
userId: z122.string(),
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2683
|
+
state: z122.string(),
|
|
2684
|
+
createdAt: z122.coerce.date()
|
|
2685
|
+
});
|
|
2686
|
+
var IntegrationTokenSchema = z123.object({
|
|
2687
|
+
id: z123.string(),
|
|
2688
|
+
provider: OAuthProviderSchema,
|
|
2689
|
+
scope: z123.string(),
|
|
2690
|
+
userId: z123.string(),
|
|
2691
|
+
accessToken: z123.string(),
|
|
2692
|
+
refreshToken: z123.string(),
|
|
2693
|
+
expiresAt: z123.coerce.date(),
|
|
2694
|
+
externalUserId: z123.string().nullish()
|
|
2661
2695
|
});
|
|
2662
2696
|
var DesignSystemVersionRoom = Entity.extend({
|
|
2663
|
-
designSystemVersionId:
|
|
2664
|
-
liveblocksId:
|
|
2697
|
+
designSystemVersionId: z124.string(),
|
|
2698
|
+
liveblocksId: z124.string()
|
|
2665
2699
|
});
|
|
2666
|
-
var DesignSystemVersionRoomInitialState =
|
|
2667
|
-
pages:
|
|
2668
|
-
groups:
|
|
2700
|
+
var DesignSystemVersionRoomInitialState = z124.object({
|
|
2701
|
+
pages: z124.array(DocumentationPageV2),
|
|
2702
|
+
groups: z124.array(ElementGroup)
|
|
2669
2703
|
});
|
|
2670
2704
|
var DesignSystemVersionRoomUpdate = DesignSystemVersionRoomInitialState.extend({
|
|
2671
|
-
deletedPageIds:
|
|
2672
|
-
deletedGroupIds:
|
|
2705
|
+
deletedPageIds: z124.array(z124.string()),
|
|
2706
|
+
deletedGroupIds: z124.array(z124.string())
|
|
2673
2707
|
});
|
|
2674
2708
|
var DocumentationPageRoom = Entity.extend({
|
|
2675
|
-
designSystemVersionId:
|
|
2676
|
-
documentationPageId:
|
|
2677
|
-
liveblocksId:
|
|
2678
|
-
});
|
|
2679
|
-
var PageBlockEditorModel = z124.object({
|
|
2680
|
-
id: z124.string(),
|
|
2681
|
-
data: PageBlockDataV2
|
|
2709
|
+
designSystemVersionId: z125.string(),
|
|
2710
|
+
documentationPageId: z125.string(),
|
|
2711
|
+
liveblocksId: z125.string()
|
|
2682
2712
|
});
|
|
2683
|
-
var DocumentationPageRoomRoomUpdate =
|
|
2713
|
+
var DocumentationPageRoomRoomUpdate = z125.object({
|
|
2684
2714
|
page: DocumentationPageV2,
|
|
2685
2715
|
pageParent: ElementGroup
|
|
2686
2716
|
});
|
|
2687
2717
|
var DocumentationPageRoomInitialState = DocumentationPageRoomRoomUpdate.extend({
|
|
2688
|
-
pageBlocks:
|
|
2689
|
-
blockDefinitions:
|
|
2718
|
+
pageBlocks: z125.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
2719
|
+
blockDefinitions: z125.array(PageBlockDefinition)
|
|
2690
2720
|
});
|
|
2691
2721
|
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
2692
2722
|
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
2693
2723
|
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
2694
2724
|
return RoomTypeEnum2;
|
|
2695
2725
|
})(RoomTypeEnum || {});
|
|
2696
|
-
var RoomTypeSchema =
|
|
2726
|
+
var RoomTypeSchema = z126.nativeEnum(RoomTypeEnum);
|
|
2697
2727
|
var RoomType = RoomTypeSchema.enum;
|
|
2698
|
-
var AnyRecord =
|
|
2728
|
+
var AnyRecord = z127.record(z127.any());
|
|
2699
2729
|
var NpmPackageVersionDist = AnyRecord.and(
|
|
2700
|
-
|
|
2701
|
-
tarball:
|
|
2730
|
+
z127.object({
|
|
2731
|
+
tarball: z127.string()
|
|
2702
2732
|
})
|
|
2703
2733
|
);
|
|
2704
2734
|
var NpmPackageVersion = AnyRecord.and(
|
|
2705
|
-
|
|
2735
|
+
z127.object({
|
|
2706
2736
|
dist: NpmPackageVersionDist
|
|
2707
2737
|
})
|
|
2708
2738
|
);
|
|
2709
2739
|
var NpmPackage = AnyRecord.and(
|
|
2710
|
-
|
|
2711
|
-
_id:
|
|
2712
|
-
name:
|
|
2740
|
+
z127.object({
|
|
2741
|
+
_id: z127.string(),
|
|
2742
|
+
name: z127.string(),
|
|
2713
2743
|
// e.g. "latest": "1.2.3"
|
|
2714
|
-
"dist-tags":
|
|
2744
|
+
"dist-tags": z127.record(z127.string(), z127.string()),
|
|
2715
2745
|
// "1.2.3": {...}
|
|
2716
|
-
versions:
|
|
2746
|
+
versions: z127.record(NpmPackageVersion)
|
|
2717
2747
|
})
|
|
2718
2748
|
);
|
|
2719
|
-
var NpmProxyTokenPayload =
|
|
2720
|
-
npmProxyRegistryConfigId:
|
|
2721
|
-
});
|
|
2722
|
-
var PersonalAccessToken =
|
|
2723
|
-
id:
|
|
2724
|
-
userId:
|
|
2725
|
-
name:
|
|
2726
|
-
token:
|
|
2727
|
-
createdAt:
|
|
2728
|
-
hidden:
|
|
2729
|
-
workspaceId:
|
|
2749
|
+
var NpmProxyTokenPayload = z128.object({
|
|
2750
|
+
npmProxyRegistryConfigId: z128.string()
|
|
2751
|
+
});
|
|
2752
|
+
var PersonalAccessToken = z129.object({
|
|
2753
|
+
id: z129.string(),
|
|
2754
|
+
userId: z129.string(),
|
|
2755
|
+
name: z129.string(),
|
|
2756
|
+
token: z129.string(),
|
|
2757
|
+
createdAt: z129.coerce.date(),
|
|
2758
|
+
hidden: z129.boolean(),
|
|
2759
|
+
workspaceId: z129.string().optional(),
|
|
2730
2760
|
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
2731
|
-
expireAt:
|
|
2732
|
-
scope:
|
|
2761
|
+
expireAt: z129.coerce.date().optional(),
|
|
2762
|
+
scope: z129.string().optional()
|
|
2733
2763
|
});
|
|
2734
2764
|
var SupernovaException = class _SupernovaException extends Error {
|
|
2735
2765
|
//
|
|
@@ -2814,25 +2844,25 @@ function groupBy(items, keyFn) {
|
|
|
2814
2844
|
}
|
|
2815
2845
|
return result;
|
|
2816
2846
|
}
|
|
2817
|
-
var ContentLoadInstruction =
|
|
2818
|
-
from:
|
|
2819
|
-
to:
|
|
2820
|
-
authorizationHeaderKvsId:
|
|
2821
|
-
timeout:
|
|
2822
|
-
});
|
|
2823
|
-
var ContentLoaderPayload =
|
|
2824
|
-
type:
|
|
2847
|
+
var ContentLoadInstruction = z130.object({
|
|
2848
|
+
from: z130.string(),
|
|
2849
|
+
to: z130.string(),
|
|
2850
|
+
authorizationHeaderKvsId: z130.string().optional(),
|
|
2851
|
+
timeout: z130.number().optional()
|
|
2852
|
+
});
|
|
2853
|
+
var ContentLoaderPayload = z130.object({
|
|
2854
|
+
type: z130.literal("Single"),
|
|
2825
2855
|
instruction: ContentLoadInstruction
|
|
2826
2856
|
}).or(
|
|
2827
|
-
|
|
2828
|
-
type:
|
|
2829
|
-
loadingChunkSize:
|
|
2830
|
-
instructions:
|
|
2857
|
+
z130.object({
|
|
2858
|
+
type: z130.literal("Multiple"),
|
|
2859
|
+
loadingChunkSize: z130.number().optional(),
|
|
2860
|
+
instructions: z130.array(ContentLoadInstruction)
|
|
2831
2861
|
})
|
|
2832
2862
|
).or(
|
|
2833
|
-
|
|
2834
|
-
type:
|
|
2835
|
-
location:
|
|
2863
|
+
z130.object({
|
|
2864
|
+
type: z130.literal("S3"),
|
|
2865
|
+
location: z130.string()
|
|
2836
2866
|
})
|
|
2837
2867
|
);
|
|
2838
2868
|
function slugify(str, options) {
|
|
@@ -3629,10 +3659,10 @@ var DTODesignSystem = DesignSystem.omit({
|
|
|
3629
3659
|
});
|
|
3630
3660
|
|
|
3631
3661
|
// src/api/dto/elements/documentation/group-action.ts
|
|
3632
|
-
import { z as
|
|
3662
|
+
import { z as z132 } from "zod";
|
|
3633
3663
|
|
|
3634
3664
|
// src/api/dto/elements/documentation/group.ts
|
|
3635
|
-
import { z as
|
|
3665
|
+
import { z as z131 } from "zod";
|
|
3636
3666
|
var DTODocumentationGroupStructureV2 = ElementGroup.omit({
|
|
3637
3667
|
sortOrder: true,
|
|
3638
3668
|
parentPersistentId: true,
|
|
@@ -3642,286 +3672,286 @@ var DTODocumentationGroupStructureV2 = ElementGroup.omit({
|
|
|
3642
3672
|
data: true,
|
|
3643
3673
|
shortPersistentId: true
|
|
3644
3674
|
}).extend({
|
|
3645
|
-
title:
|
|
3646
|
-
isRoot:
|
|
3647
|
-
childrenIds:
|
|
3675
|
+
title: z131.string(),
|
|
3676
|
+
isRoot: z131.boolean(),
|
|
3677
|
+
childrenIds: z131.array(z131.string()),
|
|
3648
3678
|
groupBehavior: DocumentationGroupBehavior,
|
|
3649
|
-
shortPersistentId:
|
|
3650
|
-
type:
|
|
3679
|
+
shortPersistentId: z131.string(),
|
|
3680
|
+
type: z131.literal("Group")
|
|
3651
3681
|
});
|
|
3652
3682
|
var DTODocumentationGroupV2 = DTODocumentationGroupStructureV2.extend({
|
|
3653
3683
|
configuration: DocumentationItemConfigurationV2
|
|
3654
3684
|
});
|
|
3655
|
-
var DTOCreateDocumentationGroupInput =
|
|
3685
|
+
var DTOCreateDocumentationGroupInput = z131.object({
|
|
3656
3686
|
// Identifier
|
|
3657
|
-
persistentId:
|
|
3687
|
+
persistentId: z131.string().uuid(),
|
|
3658
3688
|
// Group properties
|
|
3659
|
-
title:
|
|
3689
|
+
title: z131.string(),
|
|
3660
3690
|
configuration: DocumentationItemConfigurationV2.optional(),
|
|
3661
3691
|
// Group placement properties
|
|
3662
|
-
afterPersistentId:
|
|
3663
|
-
parentPersistentId:
|
|
3692
|
+
afterPersistentId: z131.string().uuid().optional(),
|
|
3693
|
+
parentPersistentId: z131.string().uuid()
|
|
3664
3694
|
});
|
|
3665
|
-
var DTOUpdateDocumentationGroupInput =
|
|
3695
|
+
var DTOUpdateDocumentationGroupInput = z131.object({
|
|
3666
3696
|
// Identifier of the group to update
|
|
3667
|
-
id:
|
|
3697
|
+
id: z131.string(),
|
|
3668
3698
|
// Group properties
|
|
3669
|
-
title:
|
|
3699
|
+
title: z131.string().optional(),
|
|
3670
3700
|
configuration: DocumentationItemConfigurationV2.optional()
|
|
3671
3701
|
});
|
|
3672
|
-
var DTOMoveDocumentationGroupInput =
|
|
3702
|
+
var DTOMoveDocumentationGroupInput = z131.object({
|
|
3673
3703
|
// Identifier of the group to update
|
|
3674
|
-
id:
|
|
3704
|
+
id: z131.string(),
|
|
3675
3705
|
// Group placement properties
|
|
3676
|
-
parentPersistentId:
|
|
3677
|
-
afterPersistentId:
|
|
3706
|
+
parentPersistentId: z131.string().uuid(),
|
|
3707
|
+
afterPersistentId: z131.string().uuid().optional()
|
|
3678
3708
|
});
|
|
3679
|
-
var DTODuplicateDocumentationGroupInput =
|
|
3709
|
+
var DTODuplicateDocumentationGroupInput = z131.object({
|
|
3680
3710
|
// Identifier of the group to duplicate from
|
|
3681
|
-
id:
|
|
3711
|
+
id: z131.string(),
|
|
3682
3712
|
// New group persistent id
|
|
3683
|
-
persistentId:
|
|
3713
|
+
persistentId: z131.string().uuid(),
|
|
3684
3714
|
// Group placement properties
|
|
3685
|
-
afterPersistentId:
|
|
3686
|
-
parentPersistentId:
|
|
3715
|
+
afterPersistentId: z131.string().uuid().optional(),
|
|
3716
|
+
parentPersistentId: z131.string().uuid()
|
|
3687
3717
|
});
|
|
3688
|
-
var
|
|
3718
|
+
var DTOCreateDocumentationTabInput = z131.object({
|
|
3689
3719
|
// New group persistent id
|
|
3690
|
-
persistentId:
|
|
3720
|
+
persistentId: z131.string().uuid(),
|
|
3691
3721
|
// Page that will become first tab of the tab group
|
|
3692
|
-
|
|
3693
|
-
tabName:
|
|
3722
|
+
fromPagePersistentId: z131.string(),
|
|
3723
|
+
tabName: z131.string()
|
|
3694
3724
|
});
|
|
3695
|
-
var DTODeleteDocumentationTabGroupInput =
|
|
3725
|
+
var DTODeleteDocumentationTabGroupInput = z131.object({
|
|
3696
3726
|
// Deleted group id
|
|
3697
|
-
id:
|
|
3727
|
+
id: z131.string()
|
|
3698
3728
|
});
|
|
3699
|
-
var DTODeleteDocumentationGroupInput =
|
|
3729
|
+
var DTODeleteDocumentationGroupInput = z131.object({
|
|
3700
3730
|
// Identifier
|
|
3701
|
-
id:
|
|
3731
|
+
id: z131.string(),
|
|
3702
3732
|
// Deletion options
|
|
3703
|
-
deleteSubtree:
|
|
3733
|
+
deleteSubtree: z131.boolean().default(false)
|
|
3704
3734
|
});
|
|
3705
3735
|
|
|
3706
3736
|
// src/api/dto/elements/documentation/group-action.ts
|
|
3707
|
-
var SuccessPayload =
|
|
3708
|
-
success:
|
|
3737
|
+
var SuccessPayload = z132.object({
|
|
3738
|
+
success: z132.literal(true)
|
|
3709
3739
|
});
|
|
3710
|
-
var DTODocumentationGroupCreateActionOutputV2 =
|
|
3711
|
-
type:
|
|
3740
|
+
var DTODocumentationGroupCreateActionOutputV2 = z132.object({
|
|
3741
|
+
type: z132.literal("DocumentationGroupCreate"),
|
|
3712
3742
|
output: SuccessPayload
|
|
3713
3743
|
});
|
|
3714
|
-
var
|
|
3715
|
-
type:
|
|
3744
|
+
var DTODocumentationTabCreateActionOutputV2 = z132.object({
|
|
3745
|
+
type: z132.literal("DocumentationTabCreate"),
|
|
3716
3746
|
output: SuccessPayload
|
|
3717
3747
|
});
|
|
3718
|
-
var DTODocumentationGroupUpdateActionOutputV2 =
|
|
3719
|
-
type:
|
|
3748
|
+
var DTODocumentationGroupUpdateActionOutputV2 = z132.object({
|
|
3749
|
+
type: z132.literal("DocumentationGroupUpdate"),
|
|
3720
3750
|
output: SuccessPayload
|
|
3721
3751
|
});
|
|
3722
|
-
var DTODocumentationGroupMoveActionOutputV2 =
|
|
3723
|
-
type:
|
|
3752
|
+
var DTODocumentationGroupMoveActionOutputV2 = z132.object({
|
|
3753
|
+
type: z132.literal("DocumentationGroupMove"),
|
|
3724
3754
|
output: SuccessPayload
|
|
3725
3755
|
});
|
|
3726
|
-
var DTODocumentationGroupDuplicateActionOutputV2 =
|
|
3727
|
-
type:
|
|
3756
|
+
var DTODocumentationGroupDuplicateActionOutputV2 = z132.object({
|
|
3757
|
+
type: z132.literal("DocumentationGroupDuplicate"),
|
|
3728
3758
|
output: SuccessPayload
|
|
3729
3759
|
});
|
|
3730
|
-
var DTODocumentationGroupDeleteActionOutputV2 =
|
|
3731
|
-
type:
|
|
3760
|
+
var DTODocumentationGroupDeleteActionOutputV2 = z132.object({
|
|
3761
|
+
type: z132.literal("DocumentationGroupDelete"),
|
|
3732
3762
|
output: SuccessPayload
|
|
3733
3763
|
});
|
|
3734
|
-
var DTODocumentationTabGroupDeleteActionOutputV2 =
|
|
3735
|
-
type:
|
|
3764
|
+
var DTODocumentationTabGroupDeleteActionOutputV2 = z132.object({
|
|
3765
|
+
type: z132.literal("DocumentationTabGroupDelete"),
|
|
3736
3766
|
output: SuccessPayload
|
|
3737
3767
|
});
|
|
3738
|
-
var DTODocumentationGroupCreateActionInputV2 =
|
|
3739
|
-
type:
|
|
3768
|
+
var DTODocumentationGroupCreateActionInputV2 = z132.object({
|
|
3769
|
+
type: z132.literal("DocumentationGroupCreate"),
|
|
3740
3770
|
input: DTOCreateDocumentationGroupInput
|
|
3741
3771
|
});
|
|
3742
|
-
var
|
|
3743
|
-
type:
|
|
3744
|
-
input:
|
|
3772
|
+
var DTODocumentationTabCreateActionInputV2 = z132.object({
|
|
3773
|
+
type: z132.literal("DocumentationTabCreate"),
|
|
3774
|
+
input: DTOCreateDocumentationTabInput
|
|
3745
3775
|
});
|
|
3746
|
-
var DTODocumentationGroupUpdateActionInputV2 =
|
|
3747
|
-
type:
|
|
3776
|
+
var DTODocumentationGroupUpdateActionInputV2 = z132.object({
|
|
3777
|
+
type: z132.literal("DocumentationGroupUpdate"),
|
|
3748
3778
|
input: DTOUpdateDocumentationGroupInput
|
|
3749
3779
|
});
|
|
3750
|
-
var DTODocumentationGroupMoveActionInputV2 =
|
|
3751
|
-
type:
|
|
3780
|
+
var DTODocumentationGroupMoveActionInputV2 = z132.object({
|
|
3781
|
+
type: z132.literal("DocumentationGroupMove"),
|
|
3752
3782
|
input: DTOMoveDocumentationGroupInput
|
|
3753
3783
|
});
|
|
3754
|
-
var DTODocumentationGroupDuplicateActionInputV2 =
|
|
3755
|
-
type:
|
|
3784
|
+
var DTODocumentationGroupDuplicateActionInputV2 = z132.object({
|
|
3785
|
+
type: z132.literal("DocumentationGroupDuplicate"),
|
|
3756
3786
|
input: DTODuplicateDocumentationGroupInput
|
|
3757
3787
|
});
|
|
3758
|
-
var DTODocumentationGroupDeleteActionInputV2 =
|
|
3759
|
-
type:
|
|
3788
|
+
var DTODocumentationGroupDeleteActionInputV2 = z132.object({
|
|
3789
|
+
type: z132.literal("DocumentationGroupDelete"),
|
|
3760
3790
|
input: DTODeleteDocumentationGroupInput
|
|
3761
3791
|
});
|
|
3762
|
-
var DTODocumentationTabGroupDeleteActionInputV2 =
|
|
3763
|
-
type:
|
|
3792
|
+
var DTODocumentationTabGroupDeleteActionInputV2 = z132.object({
|
|
3793
|
+
type: z132.literal("DocumentationTabGroupDelete"),
|
|
3764
3794
|
input: DTODeleteDocumentationTabGroupInput
|
|
3765
3795
|
});
|
|
3766
3796
|
|
|
3767
3797
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
3768
|
-
import { z as
|
|
3798
|
+
import { z as z134 } from "zod";
|
|
3769
3799
|
|
|
3770
3800
|
// src/api/dto/elements/documentation/page-v2.ts
|
|
3771
|
-
import { z as
|
|
3801
|
+
import { z as z133 } from "zod";
|
|
3772
3802
|
var DTODocumentationPageStructureV2 = DocumentationPageV2.omit({
|
|
3773
3803
|
data: true,
|
|
3774
3804
|
meta: true,
|
|
3775
3805
|
parentPersistentId: true,
|
|
3776
3806
|
sortOrder: true
|
|
3777
3807
|
}).extend({
|
|
3778
|
-
title:
|
|
3779
|
-
path:
|
|
3780
|
-
type:
|
|
3808
|
+
title: z133.string(),
|
|
3809
|
+
path: z133.string(),
|
|
3810
|
+
type: z133.literal("Page")
|
|
3781
3811
|
});
|
|
3782
3812
|
var DTODocumentationPageV2 = DTODocumentationPageStructureV2.extend({
|
|
3783
3813
|
configuration: DocumentationItemConfigurationV2
|
|
3784
3814
|
});
|
|
3785
|
-
var DTODocumentationHierarchyV2 =
|
|
3786
|
-
pages:
|
|
3787
|
-
groups:
|
|
3815
|
+
var DTODocumentationHierarchyV2 = z133.object({
|
|
3816
|
+
pages: z133.array(DTODocumentationPageStructureV2),
|
|
3817
|
+
groups: z133.array(DTODocumentationGroupStructureV2)
|
|
3788
3818
|
});
|
|
3789
|
-
var DTOCreateDocumentationPageInputV2 =
|
|
3819
|
+
var DTOCreateDocumentationPageInputV2 = z133.object({
|
|
3790
3820
|
// Identifier
|
|
3791
|
-
persistentId:
|
|
3821
|
+
persistentId: z133.string().uuid(),
|
|
3792
3822
|
// Page properties
|
|
3793
|
-
title:
|
|
3823
|
+
title: z133.string(),
|
|
3794
3824
|
configuration: DocumentationItemConfigurationV2.optional(),
|
|
3795
3825
|
// Page placement properties
|
|
3796
|
-
parentPersistentId:
|
|
3797
|
-
afterPersistentId:
|
|
3826
|
+
parentPersistentId: z133.string().uuid(),
|
|
3827
|
+
afterPersistentId: z133.string().uuid().optional()
|
|
3798
3828
|
});
|
|
3799
|
-
var DTOUpdateDocumentationPageInputV2 =
|
|
3829
|
+
var DTOUpdateDocumentationPageInputV2 = z133.object({
|
|
3800
3830
|
// Identifier of the group to update
|
|
3801
|
-
id:
|
|
3831
|
+
id: z133.string(),
|
|
3802
3832
|
// Page properties
|
|
3803
|
-
title:
|
|
3833
|
+
title: z133.string().optional(),
|
|
3804
3834
|
configuration: DocumentationItemConfigurationV2.optional()
|
|
3805
3835
|
});
|
|
3806
|
-
var DTOMoveDocumentationPageInputV2 =
|
|
3836
|
+
var DTOMoveDocumentationPageInputV2 = z133.object({
|
|
3807
3837
|
// Identifier of the group to update
|
|
3808
|
-
id:
|
|
3838
|
+
id: z133.string(),
|
|
3809
3839
|
// Page placement properties
|
|
3810
|
-
parentPersistentId:
|
|
3811
|
-
afterPersistentId:
|
|
3840
|
+
parentPersistentId: z133.string().uuid(),
|
|
3841
|
+
afterPersistentId: z133.string().uuid().optional()
|
|
3812
3842
|
});
|
|
3813
|
-
var DTODuplicateDocumentationPageInputV2 =
|
|
3843
|
+
var DTODuplicateDocumentationPageInputV2 = z133.object({
|
|
3814
3844
|
// Identifier of the page to duplicate from
|
|
3815
|
-
id:
|
|
3845
|
+
id: z133.string(),
|
|
3816
3846
|
// New page persistent id
|
|
3817
|
-
persistentId:
|
|
3847
|
+
persistentId: z133.string().uuid(),
|
|
3818
3848
|
// Page placement properties
|
|
3819
|
-
parentPersistentId:
|
|
3820
|
-
afterPersistentId:
|
|
3849
|
+
parentPersistentId: z133.string().uuid(),
|
|
3850
|
+
afterPersistentId: z133.string().uuid().optional()
|
|
3821
3851
|
});
|
|
3822
|
-
var DTODeleteDocumentationPageInputV2 =
|
|
3852
|
+
var DTODeleteDocumentationPageInputV2 = z133.object({
|
|
3823
3853
|
// Identifier
|
|
3824
|
-
id:
|
|
3854
|
+
id: z133.string()
|
|
3825
3855
|
});
|
|
3826
3856
|
|
|
3827
3857
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
3828
|
-
var SuccessPayload2 =
|
|
3829
|
-
success:
|
|
3858
|
+
var SuccessPayload2 = z134.object({
|
|
3859
|
+
success: z134.literal(true)
|
|
3830
3860
|
});
|
|
3831
|
-
var DTODocumentationPageCreateActionOutputV2 =
|
|
3832
|
-
type:
|
|
3861
|
+
var DTODocumentationPageCreateActionOutputV2 = z134.object({
|
|
3862
|
+
type: z134.literal("DocumentationPageCreate"),
|
|
3833
3863
|
output: SuccessPayload2
|
|
3834
3864
|
});
|
|
3835
|
-
var DTODocumentationPageUpdateActionOutputV2 =
|
|
3836
|
-
type:
|
|
3865
|
+
var DTODocumentationPageUpdateActionOutputV2 = z134.object({
|
|
3866
|
+
type: z134.literal("DocumentationPageUpdate"),
|
|
3837
3867
|
output: SuccessPayload2
|
|
3838
3868
|
});
|
|
3839
|
-
var DTODocumentationPageMoveActionOutputV2 =
|
|
3840
|
-
type:
|
|
3869
|
+
var DTODocumentationPageMoveActionOutputV2 = z134.object({
|
|
3870
|
+
type: z134.literal("DocumentationPageMove"),
|
|
3841
3871
|
output: SuccessPayload2
|
|
3842
3872
|
});
|
|
3843
|
-
var DTODocumentationPageDuplicateActionOutputV2 =
|
|
3844
|
-
type:
|
|
3873
|
+
var DTODocumentationPageDuplicateActionOutputV2 = z134.object({
|
|
3874
|
+
type: z134.literal("DocumentationPageDuplicate"),
|
|
3845
3875
|
output: SuccessPayload2
|
|
3846
3876
|
});
|
|
3847
|
-
var DTODocumentationPageDeleteActionOutputV2 =
|
|
3848
|
-
type:
|
|
3877
|
+
var DTODocumentationPageDeleteActionOutputV2 = z134.object({
|
|
3878
|
+
type: z134.literal("DocumentationPageDelete"),
|
|
3849
3879
|
output: SuccessPayload2
|
|
3850
3880
|
});
|
|
3851
|
-
var DTODocumentationPageCreateActionInputV2 =
|
|
3852
|
-
type:
|
|
3881
|
+
var DTODocumentationPageCreateActionInputV2 = z134.object({
|
|
3882
|
+
type: z134.literal("DocumentationPageCreate"),
|
|
3853
3883
|
input: DTOCreateDocumentationPageInputV2
|
|
3854
3884
|
});
|
|
3855
|
-
var DTODocumentationPageUpdateActionInputV2 =
|
|
3856
|
-
type:
|
|
3885
|
+
var DTODocumentationPageUpdateActionInputV2 = z134.object({
|
|
3886
|
+
type: z134.literal("DocumentationPageUpdate"),
|
|
3857
3887
|
input: DTOUpdateDocumentationPageInputV2
|
|
3858
3888
|
});
|
|
3859
|
-
var DTODocumentationPageMoveActionInputV2 =
|
|
3860
|
-
type:
|
|
3889
|
+
var DTODocumentationPageMoveActionInputV2 = z134.object({
|
|
3890
|
+
type: z134.literal("DocumentationPageMove"),
|
|
3861
3891
|
input: DTOMoveDocumentationPageInputV2
|
|
3862
3892
|
});
|
|
3863
|
-
var DTODocumentationPageDuplicateActionInputV2 =
|
|
3864
|
-
type:
|
|
3893
|
+
var DTODocumentationPageDuplicateActionInputV2 = z134.object({
|
|
3894
|
+
type: z134.literal("DocumentationPageDuplicate"),
|
|
3865
3895
|
input: DTODuplicateDocumentationPageInputV2
|
|
3866
3896
|
});
|
|
3867
|
-
var DTODocumentationPageDeleteActionInputV2 =
|
|
3868
|
-
type:
|
|
3897
|
+
var DTODocumentationPageDeleteActionInputV2 = z134.object({
|
|
3898
|
+
type: z134.literal("DocumentationPageDelete"),
|
|
3869
3899
|
input: DTODeleteDocumentationPageInputV2
|
|
3870
3900
|
});
|
|
3871
3901
|
|
|
3872
3902
|
// src/api/dto/elements/documentation/page-v1.ts
|
|
3873
|
-
import { z as
|
|
3903
|
+
import { z as z135 } from "zod";
|
|
3874
3904
|
var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
3875
3905
|
data: true,
|
|
3876
3906
|
meta: true,
|
|
3877
3907
|
parentPersistentId: true,
|
|
3878
3908
|
sortOrder: true
|
|
3879
3909
|
}).extend(DocumentationPageV1.shape.data.shape).extend({
|
|
3880
|
-
title:
|
|
3881
|
-
path:
|
|
3910
|
+
title: z135.string(),
|
|
3911
|
+
path: z135.string()
|
|
3882
3912
|
});
|
|
3883
3913
|
|
|
3884
3914
|
// src/api/dto/elements/figma-nodes/figma-node.ts
|
|
3885
|
-
import { z as
|
|
3886
|
-
var DTOFigmaNodeData =
|
|
3915
|
+
import { z as z136 } from "zod";
|
|
3916
|
+
var DTOFigmaNodeData = z136.object({
|
|
3887
3917
|
// Id of the node in the Figma file
|
|
3888
|
-
figmaNodeId:
|
|
3918
|
+
figmaNodeId: z136.string(),
|
|
3889
3919
|
// Validity
|
|
3890
|
-
isValid:
|
|
3920
|
+
isValid: z136.boolean(),
|
|
3891
3921
|
// Asset data
|
|
3892
|
-
assetId:
|
|
3893
|
-
assetUrl:
|
|
3922
|
+
assetId: z136.string(),
|
|
3923
|
+
assetUrl: z136.string(),
|
|
3894
3924
|
// Asset metadata
|
|
3895
|
-
assetScale:
|
|
3896
|
-
assetWidth:
|
|
3897
|
-
assetHeight:
|
|
3925
|
+
assetScale: z136.number(),
|
|
3926
|
+
assetWidth: z136.number().optional(),
|
|
3927
|
+
assetHeight: z136.number().optional()
|
|
3898
3928
|
});
|
|
3899
3929
|
var DTOFigmaNode = FigmaFileStructure.omit({
|
|
3900
3930
|
data: true
|
|
3901
3931
|
}).extend({
|
|
3902
3932
|
data: DTOFigmaNodeData
|
|
3903
3933
|
});
|
|
3904
|
-
var DTOFigmaNodeRenderInput =
|
|
3934
|
+
var DTOFigmaNodeRenderInput = z136.object({
|
|
3905
3935
|
// Id of a design system's data source representing a linked Figma file
|
|
3906
|
-
sourceId:
|
|
3936
|
+
sourceId: z136.string(),
|
|
3907
3937
|
// Id of a node within the Figma file
|
|
3908
|
-
figmaFileNodeId:
|
|
3938
|
+
figmaFileNodeId: z136.string()
|
|
3909
3939
|
});
|
|
3910
3940
|
|
|
3911
3941
|
// src/api/dto/elements/figma-nodes/node-actions-v2.ts
|
|
3912
|
-
import { z as
|
|
3913
|
-
var DTOFigmaNodeRenderActionOutput =
|
|
3914
|
-
type:
|
|
3915
|
-
figmaNodes:
|
|
3942
|
+
import { z as z137 } from "zod";
|
|
3943
|
+
var DTOFigmaNodeRenderActionOutput = z137.object({
|
|
3944
|
+
type: z137.literal("FigmaNodeRender"),
|
|
3945
|
+
figmaNodes: z137.array(DTOFigmaNode)
|
|
3916
3946
|
});
|
|
3917
|
-
var DTOFigmaNodeRenderActionInput =
|
|
3918
|
-
type:
|
|
3947
|
+
var DTOFigmaNodeRenderActionInput = z137.object({
|
|
3948
|
+
type: z137.literal("FigmaNodeRender"),
|
|
3919
3949
|
input: DTOFigmaNodeRenderInput.array()
|
|
3920
3950
|
});
|
|
3921
3951
|
|
|
3922
3952
|
// src/api/dto/elements/elements-action-v2.ts
|
|
3923
|
-
import { z as
|
|
3924
|
-
var DTOElementActionOutput =
|
|
3953
|
+
import { z as z138 } from "zod";
|
|
3954
|
+
var DTOElementActionOutput = z138.discriminatedUnion("type", [
|
|
3925
3955
|
// Documentation pages
|
|
3926
3956
|
DTODocumentationPageCreateActionOutputV2,
|
|
3927
3957
|
DTODocumentationPageUpdateActionOutputV2,
|
|
@@ -3930,7 +3960,7 @@ var DTOElementActionOutput = z137.discriminatedUnion("type", [
|
|
|
3930
3960
|
DTODocumentationPageDeleteActionOutputV2,
|
|
3931
3961
|
// Documentation groups
|
|
3932
3962
|
DTODocumentationGroupCreateActionOutputV2,
|
|
3933
|
-
|
|
3963
|
+
DTODocumentationTabCreateActionOutputV2,
|
|
3934
3964
|
DTODocumentationGroupUpdateActionOutputV2,
|
|
3935
3965
|
DTODocumentationGroupMoveActionOutputV2,
|
|
3936
3966
|
DTODocumentationGroupDuplicateActionOutputV2,
|
|
@@ -3939,7 +3969,7 @@ var DTOElementActionOutput = z137.discriminatedUnion("type", [
|
|
|
3939
3969
|
// // Figma frames
|
|
3940
3970
|
DTOFigmaNodeRenderActionOutput
|
|
3941
3971
|
]);
|
|
3942
|
-
var DTOElementActionInput =
|
|
3972
|
+
var DTOElementActionInput = z138.discriminatedUnion("type", [
|
|
3943
3973
|
// Documentation pages
|
|
3944
3974
|
DTODocumentationPageCreateActionInputV2,
|
|
3945
3975
|
DTODocumentationPageUpdateActionInputV2,
|
|
@@ -3948,7 +3978,7 @@ var DTOElementActionInput = z137.discriminatedUnion("type", [
|
|
|
3948
3978
|
DTODocumentationPageDeleteActionInputV2,
|
|
3949
3979
|
// Documentation groups
|
|
3950
3980
|
DTODocumentationGroupCreateActionInputV2,
|
|
3951
|
-
|
|
3981
|
+
DTODocumentationTabCreateActionInputV2,
|
|
3952
3982
|
DTODocumentationGroupUpdateActionInputV2,
|
|
3953
3983
|
DTODocumentationGroupMoveActionInputV2,
|
|
3954
3984
|
DTODocumentationGroupDuplicateActionInputV2,
|
|
@@ -3959,53 +3989,53 @@ var DTOElementActionInput = z137.discriminatedUnion("type", [
|
|
|
3959
3989
|
]);
|
|
3960
3990
|
|
|
3961
3991
|
// src/api/dto/elements/get-elements-v2.ts
|
|
3962
|
-
import { z as
|
|
3963
|
-
var DTOElementsGetTypeFilter =
|
|
3964
|
-
var DTOElementsGetQuerySchema =
|
|
3965
|
-
types:
|
|
3992
|
+
import { z as z139 } from "zod";
|
|
3993
|
+
var DTOElementsGetTypeFilter = z139.enum(["FigmaNode"]);
|
|
3994
|
+
var DTOElementsGetQuerySchema = z139.object({
|
|
3995
|
+
types: z139.string().transform((val) => val.split(",").map((v) => DTOElementsGetTypeFilter.parse(v)))
|
|
3966
3996
|
});
|
|
3967
|
-
var DTOElementsGetOutput =
|
|
3968
|
-
figmaNodes:
|
|
3997
|
+
var DTOElementsGetOutput = z139.object({
|
|
3998
|
+
figmaNodes: z139.array(DTOFigmaNode).optional()
|
|
3969
3999
|
});
|
|
3970
4000
|
|
|
3971
4001
|
// src/api/dto/workspaces/membership.ts
|
|
3972
|
-
import { z as
|
|
4002
|
+
import { z as z142 } from "zod";
|
|
3973
4003
|
|
|
3974
4004
|
// src/api/dto/workspaces/workspace.ts
|
|
3975
|
-
import { z as
|
|
4005
|
+
import { z as z141 } from "zod";
|
|
3976
4006
|
|
|
3977
4007
|
// src/api/dto/workspaces/npm-registry.ts
|
|
3978
|
-
import { z as
|
|
3979
|
-
var DTONpmRegistryConfig =
|
|
4008
|
+
import { z as z140 } from "zod";
|
|
4009
|
+
var DTONpmRegistryConfig = z140.object({
|
|
3980
4010
|
// Registry basic configuration
|
|
3981
4011
|
registryType: NpmRegistryType,
|
|
3982
|
-
registryUrl:
|
|
3983
|
-
customRegistryUrl:
|
|
4012
|
+
registryUrl: z140.string(),
|
|
4013
|
+
customRegistryUrl: z140.string().optional(),
|
|
3984
4014
|
// URL of Supernova NPM packages proxy
|
|
3985
|
-
proxyUrl:
|
|
4015
|
+
proxyUrl: z140.string(),
|
|
3986
4016
|
// Auth configuration
|
|
3987
4017
|
authType: NpmRegistryAuthType,
|
|
3988
|
-
accessToken:
|
|
3989
|
-
username:
|
|
3990
|
-
password:
|
|
4018
|
+
accessToken: z140.literal("redacted").optional(),
|
|
4019
|
+
username: z140.string().optional(),
|
|
4020
|
+
password: z140.literal("redacted").optional(),
|
|
3991
4021
|
// NPM package scopes for whih the proxy should be enabled
|
|
3992
|
-
enabledScopes:
|
|
4022
|
+
enabledScopes: z140.array(z140.string()),
|
|
3993
4023
|
// True if client should bypass Supernova proxy and connect directly to the registry
|
|
3994
4024
|
// (e.g. when the NPM registry is behind a VPN or firewall which prevents Supernova from accessing it)
|
|
3995
|
-
bypassProxy:
|
|
4025
|
+
bypassProxy: z140.boolean()
|
|
3996
4026
|
});
|
|
3997
4027
|
|
|
3998
4028
|
// src/api/dto/workspaces/workspace.ts
|
|
3999
|
-
var DTOWorkspace =
|
|
4000
|
-
id:
|
|
4029
|
+
var DTOWorkspace = z141.object({
|
|
4030
|
+
id: z141.string(),
|
|
4001
4031
|
profile: WorkspaceProfile,
|
|
4002
4032
|
subscription: Subscription,
|
|
4003
4033
|
npmRegistry: DTONpmRegistryConfig.optional()
|
|
4004
4034
|
});
|
|
4005
4035
|
|
|
4006
4036
|
// src/api/dto/workspaces/membership.ts
|
|
4007
|
-
var DTOWorkspaceRole =
|
|
4008
|
-
var DTOUserWorkspaceMembership =
|
|
4037
|
+
var DTOWorkspaceRole = z142.enum(["Owner", "Admin", "Creator", "Viewer", "Billing"]);
|
|
4038
|
+
var DTOUserWorkspaceMembership = z142.object({
|
|
4009
4039
|
// Workspace the user is a member of
|
|
4010
4040
|
workspace: DTOWorkspace,
|
|
4011
4041
|
// Assigned role the user has in the workspace
|
|
@@ -4015,20 +4045,20 @@ var DTOUserWorkspaceMembership = z141.object({
|
|
|
4015
4045
|
// when a workspace's subscription is downgraded to free tier
|
|
4016
4046
|
effectiveRole: DTOWorkspaceRole
|
|
4017
4047
|
});
|
|
4018
|
-
var DTOUserWorkspaceMembershipsResponse =
|
|
4019
|
-
membership:
|
|
4048
|
+
var DTOUserWorkspaceMembershipsResponse = z142.object({
|
|
4049
|
+
membership: z142.array(DTOUserWorkspaceMembership)
|
|
4020
4050
|
});
|
|
4021
4051
|
|
|
4022
4052
|
// src/api/payloads/documentation/block-definitions.ts
|
|
4023
|
-
import { z as
|
|
4024
|
-
var DTOGetBlockDefinitionsOutput =
|
|
4025
|
-
definitions:
|
|
4053
|
+
import { z as z143 } from "zod";
|
|
4054
|
+
var DTOGetBlockDefinitionsOutput = z143.object({
|
|
4055
|
+
definitions: z143.array(PageBlockDefinition)
|
|
4026
4056
|
});
|
|
4027
4057
|
|
|
4028
4058
|
// src/api/payloads/liveblocks/auth.ts
|
|
4029
|
-
import { z as
|
|
4030
|
-
var DTOLiveblocksAuthRequest =
|
|
4031
|
-
room:
|
|
4059
|
+
import { z as z144 } from "zod";
|
|
4060
|
+
var DTOLiveblocksAuthRequest = z144.object({
|
|
4061
|
+
room: z144.string()
|
|
4032
4062
|
});
|
|
4033
4063
|
|
|
4034
4064
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
@@ -4081,13 +4111,13 @@ function getGroupsYMap(doc) {
|
|
|
4081
4111
|
}
|
|
4082
4112
|
|
|
4083
4113
|
// src/yjs/design-system-content/item-configuration.ts
|
|
4084
|
-
import { z as
|
|
4085
|
-
var DTODocumentationPageRoomHeaderData =
|
|
4086
|
-
title:
|
|
4114
|
+
import { z as z145 } from "zod";
|
|
4115
|
+
var DTODocumentationPageRoomHeaderData = z145.object({
|
|
4116
|
+
title: z145.string(),
|
|
4087
4117
|
configuration: DocumentationItemConfigurationV2
|
|
4088
4118
|
});
|
|
4089
|
-
var DTODocumentationPageRoomHeaderDataUpdate =
|
|
4090
|
-
title:
|
|
4119
|
+
var DTODocumentationPageRoomHeaderDataUpdate = z145.object({
|
|
4120
|
+
title: z145.string().optional(),
|
|
4091
4121
|
configuration: DocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
4092
4122
|
});
|
|
4093
4123
|
function itemConfigurationToYjs(yDoc, item) {
|
|
@@ -4136,18 +4166,19 @@ function yjsToItemConfiguration(yDoc) {
|
|
|
4136
4166
|
header: rawHeader
|
|
4137
4167
|
};
|
|
4138
4168
|
return {
|
|
4139
|
-
title:
|
|
4169
|
+
title: z145.string().parse(title),
|
|
4140
4170
|
configuration: DocumentationItemConfigurationV2.parse(rawConfig)
|
|
4141
4171
|
};
|
|
4142
4172
|
}
|
|
4143
4173
|
|
|
4144
4174
|
// src/yjs/docs-editor/model/block.ts
|
|
4145
|
-
var
|
|
4175
|
+
var PageBlockEditorModel = PageBlockEditorModelV2;
|
|
4176
|
+
var PageSectionEditorModel = PageSectionEditorModelV2;
|
|
4146
4177
|
|
|
4147
4178
|
// src/yjs/docs-editor/model/page.ts
|
|
4148
|
-
import { z as
|
|
4149
|
-
var DocumentationPageEditorModel =
|
|
4150
|
-
blocks:
|
|
4179
|
+
import { z as z146 } from "zod";
|
|
4180
|
+
var DocumentationPageEditorModel = z146.object({
|
|
4181
|
+
blocks: z146.array(PageBlockEditorModel.or(PageSectionEditorModel))
|
|
4151
4182
|
});
|
|
4152
4183
|
|
|
4153
4184
|
// src/yjs/docs-editor/prosemirror/schema.ts
|
|
@@ -4918,11 +4949,16 @@ function pageToYXmlFragment(page, definitions, fragment) {
|
|
|
4918
4949
|
return prosemirrorJSONToYXmlFragment(pmSchema, doc, fragment);
|
|
4919
4950
|
}
|
|
4920
4951
|
function pageToProsemirrorDoc(page, definitions) {
|
|
4952
|
+
const definitionsMap = mapByUnique(definitions, (d) => d.id);
|
|
4921
4953
|
return {
|
|
4922
4954
|
type: "doc",
|
|
4923
4955
|
content: page.blocks.map((b) => {
|
|
4924
|
-
|
|
4925
|
-
|
|
4956
|
+
switch (b.type) {
|
|
4957
|
+
case "Block":
|
|
4958
|
+
return blockToProsemirrorNode(b, blockDefinitionForBlock(b, definitions));
|
|
4959
|
+
case "Section":
|
|
4960
|
+
return internalSectionToProsemirrorNode(b, definitionsMap);
|
|
4961
|
+
}
|
|
4926
4962
|
}).filter(nonNullFilter)
|
|
4927
4963
|
};
|
|
4928
4964
|
}
|
|
@@ -4933,6 +4969,58 @@ function blockDefinitionForBlock(block, definitions) {
|
|
|
4933
4969
|
}
|
|
4934
4970
|
return definition;
|
|
4935
4971
|
}
|
|
4972
|
+
function sectionToProsemirrorNode(section, definitions) {
|
|
4973
|
+
const definitionsMap = mapByUnique(definitions, (d) => d.id);
|
|
4974
|
+
return internalSectionToProsemirrorNode(section, definitionsMap);
|
|
4975
|
+
}
|
|
4976
|
+
function internalSectionToProsemirrorNode(section, definitionsMap) {
|
|
4977
|
+
return {
|
|
4978
|
+
type: "tabsSection",
|
|
4979
|
+
attrs: {
|
|
4980
|
+
id: section.id,
|
|
4981
|
+
...section.variantId && { variantId: section.variantId }
|
|
4982
|
+
},
|
|
4983
|
+
content: section.items.map((item) => sectionItemToProsemirrorNode(item, definitionsMap))
|
|
4984
|
+
};
|
|
4985
|
+
}
|
|
4986
|
+
function sectionItemToProsemirrorNode(sectionItem, definitionsMap) {
|
|
4987
|
+
return {
|
|
4988
|
+
type: "sectionItem",
|
|
4989
|
+
attrs: {
|
|
4990
|
+
id: sectionItem.id,
|
|
4991
|
+
title: sectionItem.title
|
|
4992
|
+
},
|
|
4993
|
+
content: sectionItem.columns.map((column) => sectionColumnToProsemirrorNode(column, definitionsMap))
|
|
4994
|
+
};
|
|
4995
|
+
}
|
|
4996
|
+
function sectionColumnToProsemirrorNode(sectionColumn, definitionsMap) {
|
|
4997
|
+
const blocks2 = sectionColumn.blocks.map((block) => {
|
|
4998
|
+
return internalBlockToProsemirrorNode(block, definitionsMap);
|
|
4999
|
+
}).filter(nonNullFilter);
|
|
5000
|
+
if (!blocks2.length) {
|
|
5001
|
+
blocks2.push({
|
|
5002
|
+
type: "paragraph",
|
|
5003
|
+
attrs: {
|
|
5004
|
+
id: "id",
|
|
5005
|
+
definitionId: "io.supernova.block.rich-text"
|
|
5006
|
+
}
|
|
5007
|
+
});
|
|
5008
|
+
}
|
|
5009
|
+
return {
|
|
5010
|
+
type: "sectionItemColumn",
|
|
5011
|
+
attrs: {
|
|
5012
|
+
id: sectionColumn.id
|
|
5013
|
+
},
|
|
5014
|
+
content: blocks2
|
|
5015
|
+
};
|
|
5016
|
+
}
|
|
5017
|
+
function internalBlockToProsemirrorNode(block, definitionsMap) {
|
|
5018
|
+
const definition = definitionsMap.get(block.data.packageId);
|
|
5019
|
+
if (!definition) {
|
|
5020
|
+
throw SupernovaException.shouldNotHappen(`Could not find definition for ${block.id} (${block.data.packageId})`);
|
|
5021
|
+
}
|
|
5022
|
+
return blockToProsemirrorNode(block, definition);
|
|
5023
|
+
}
|
|
4936
5024
|
function blockToProsemirrorNode(block, definition) {
|
|
4937
5025
|
const richTextProperty = BlockDefinitionUtils.firstRichTextProperty(definition);
|
|
4938
5026
|
if (richTextProperty) {
|
|
@@ -5286,7 +5374,7 @@ function serializeAsCustomBlock(block, definition) {
|
|
|
5286
5374
|
});
|
|
5287
5375
|
const columns = block.data.appearance?.numberOfColumns;
|
|
5288
5376
|
return {
|
|
5289
|
-
type:
|
|
5377
|
+
type: serializeCustomBlockNodeType(block, definition),
|
|
5290
5378
|
attrs: {
|
|
5291
5379
|
id: block.id,
|
|
5292
5380
|
definitionId: block.data.packageId,
|
|
@@ -5296,6 +5384,14 @@ function serializeAsCustomBlock(block, definition) {
|
|
|
5296
5384
|
}
|
|
5297
5385
|
};
|
|
5298
5386
|
}
|
|
5387
|
+
function serializeCustomBlockNodeType(block, definition) {
|
|
5388
|
+
switch (block.data.packageId) {
|
|
5389
|
+
case "io.supernova.block.image":
|
|
5390
|
+
return "image";
|
|
5391
|
+
default:
|
|
5392
|
+
return "blockNode";
|
|
5393
|
+
}
|
|
5394
|
+
}
|
|
5299
5395
|
function nonNullFilter(item) {
|
|
5300
5396
|
return !!item;
|
|
5301
5397
|
}
|
|
@@ -7813,7 +7909,7 @@ var blocks = [
|
|
|
7813
7909
|
|
|
7814
7910
|
// src/yjs/docs-editor/prosemirror-to-blocks.ts
|
|
7815
7911
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
7816
|
-
import { z as
|
|
7912
|
+
import { z as z147 } from "zod";
|
|
7817
7913
|
function yDocToPage(yDoc, definitions) {
|
|
7818
7914
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
7819
7915
|
}
|
|
@@ -7824,26 +7920,70 @@ function yXmlFragmentToPage(fragment, definitions) {
|
|
|
7824
7920
|
function prosemirrorDocToPage(prosemirrorDoc, definitions) {
|
|
7825
7921
|
const definitionsById = mapByUnique2(definitions, (d) => d.id);
|
|
7826
7922
|
return {
|
|
7827
|
-
blocks: (prosemirrorDoc.content ?? [])
|
|
7828
|
-
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z146.string());
|
|
7829
|
-
if (!definitionId) {
|
|
7830
|
-
console.warn(
|
|
7831
|
-
`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`
|
|
7832
|
-
);
|
|
7833
|
-
return null;
|
|
7834
|
-
}
|
|
7835
|
-
const definition = definitionsById.get(definitionId);
|
|
7836
|
-
if (!definition) {
|
|
7837
|
-
console.warn(
|
|
7838
|
-
`Block definitionId "${definitionId}" (prosemirror node ${prosemirrorNode.type}) is not among available definitions`
|
|
7839
|
-
);
|
|
7840
|
-
console.warn(prosemirrorNode);
|
|
7841
|
-
return null;
|
|
7842
|
-
}
|
|
7843
|
-
return prosemirrorNodeToBlock(prosemirrorNode, definition);
|
|
7844
|
-
}).filter(nonNullFilter2)
|
|
7923
|
+
blocks: internalProsemirrorNodesToBlocks(prosemirrorDoc.content ?? [], definitionsById)
|
|
7845
7924
|
};
|
|
7846
7925
|
}
|
|
7926
|
+
function prosemirrorNodeToSection(prosemirrorNode, definitions) {
|
|
7927
|
+
const definitionsById = mapByUnique2(definitions, (d) => d.id);
|
|
7928
|
+
return internalProsemirrorNodeToSection(prosemirrorNode, definitionsById);
|
|
7929
|
+
}
|
|
7930
|
+
function internalProsemirrorNodeToSection(prosemirrorNode, definitionsMap) {
|
|
7931
|
+
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
7932
|
+
if (!id)
|
|
7933
|
+
return null;
|
|
7934
|
+
return {
|
|
7935
|
+
id,
|
|
7936
|
+
type: "Section",
|
|
7937
|
+
variantId: getProsemirrorBlockVariantId(prosemirrorNode),
|
|
7938
|
+
sectionType: "Tabs",
|
|
7939
|
+
appearance: {
|
|
7940
|
+
contentExpandToEdges: true,
|
|
7941
|
+
expandToEdges: true
|
|
7942
|
+
},
|
|
7943
|
+
items: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItem").map((c) => prosemirrorNodeToSectionItem(c, definitionsMap)).filter(nonNullFilter2)
|
|
7944
|
+
};
|
|
7945
|
+
}
|
|
7946
|
+
function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
|
|
7947
|
+
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
7948
|
+
if (!id)
|
|
7949
|
+
return null;
|
|
7950
|
+
return {
|
|
7951
|
+
id,
|
|
7952
|
+
title: getProsemirrorAttribute(prosemirrorNode, "title", z147.string()) ?? "",
|
|
7953
|
+
columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter2)
|
|
7954
|
+
};
|
|
7955
|
+
}
|
|
7956
|
+
function prosemirrorNodeToSectionColumns(prosemirrorNode, definitionsMap) {
|
|
7957
|
+
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
7958
|
+
if (!id)
|
|
7959
|
+
return null;
|
|
7960
|
+
return {
|
|
7961
|
+
id,
|
|
7962
|
+
blocks: internalProsemirrorNodesToBlocks(prosemirrorNode.content ?? [], definitionsMap)
|
|
7963
|
+
};
|
|
7964
|
+
}
|
|
7965
|
+
function prosemirrorNodesToBlocks(prosemirrorNodes, definitions) {
|
|
7966
|
+
const definitionsById = mapByUnique2(definitions, (d) => d.id);
|
|
7967
|
+
return internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsById);
|
|
7968
|
+
}
|
|
7969
|
+
function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap) {
|
|
7970
|
+
return prosemirrorNodes.map((prosemirrorNode) => {
|
|
7971
|
+
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z147.string());
|
|
7972
|
+
if (!definitionId) {
|
|
7973
|
+
console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
|
|
7974
|
+
return null;
|
|
7975
|
+
}
|
|
7976
|
+
const definition = definitionsMap.get(definitionId);
|
|
7977
|
+
if (!definition) {
|
|
7978
|
+
console.warn(
|
|
7979
|
+
`Block definitionId "${definitionId}" (prosemirror node ${prosemirrorNode.type}) is not among available definitions`
|
|
7980
|
+
);
|
|
7981
|
+
console.warn(prosemirrorNode);
|
|
7982
|
+
return null;
|
|
7983
|
+
}
|
|
7984
|
+
return prosemirrorNodeToBlock(prosemirrorNode, definition);
|
|
7985
|
+
}).filter(nonNullFilter2);
|
|
7986
|
+
}
|
|
7847
7987
|
function prosemirrorNodeToBlock(prosemirrorNode, definition) {
|
|
7848
7988
|
const richTextProperty = BlockDefinitionUtils.firstRichTextProperty(definition);
|
|
7849
7989
|
if (richTextProperty) {
|
|
@@ -7867,10 +8007,11 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
7867
8007
|
if (!id)
|
|
7868
8008
|
return null;
|
|
7869
8009
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
7870
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
8010
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z147.string().optional()));
|
|
7871
8011
|
return {
|
|
7872
8012
|
// TODO Artem: indent
|
|
7873
8013
|
id,
|
|
8014
|
+
type: "Block",
|
|
7874
8015
|
...variantId && { variantId },
|
|
7875
8016
|
data: {
|
|
7876
8017
|
packageId: definition.id,
|
|
@@ -7915,6 +8056,7 @@ function parseAsMultiRichText(prosemirrorNode, definition, property) {
|
|
|
7915
8056
|
return {
|
|
7916
8057
|
// TODO Artem: indent
|
|
7917
8058
|
id,
|
|
8059
|
+
type: "Block",
|
|
7918
8060
|
data: {
|
|
7919
8061
|
packageId: definition.id,
|
|
7920
8062
|
indentLevel: 0,
|
|
@@ -7967,8 +8109,8 @@ function parseRichTextAttribute(mark) {
|
|
|
7967
8109
|
case "code":
|
|
7968
8110
|
return { type: "Code" };
|
|
7969
8111
|
case "link":
|
|
7970
|
-
const itemId = getProsemirrorAttribute(mark, "itemId",
|
|
7971
|
-
const href = getProsemirrorAttribute(mark, "href",
|
|
8112
|
+
const itemId = getProsemirrorAttribute(mark, "itemId", z147.string().optional());
|
|
8113
|
+
const href = getProsemirrorAttribute(mark, "href", z147.string().optional());
|
|
7972
8114
|
return {
|
|
7973
8115
|
type: "Link",
|
|
7974
8116
|
openInNewWindow: mark.attrs?.target !== "_self",
|
|
@@ -7983,7 +8125,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
7983
8125
|
if (!id)
|
|
7984
8126
|
return null;
|
|
7985
8127
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
7986
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
8128
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z147.boolean().optional()) !== false;
|
|
7987
8129
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
7988
8130
|
if (!tableChild) {
|
|
7989
8131
|
return emptyTable(id, variantId, 0);
|
|
@@ -8009,6 +8151,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
8009
8151
|
});
|
|
8010
8152
|
return {
|
|
8011
8153
|
id,
|
|
8154
|
+
type: "Block",
|
|
8012
8155
|
data: {
|
|
8013
8156
|
packageId: "io.supernova.block.table",
|
|
8014
8157
|
indentLevel: 0,
|
|
@@ -8029,9 +8172,9 @@ function parseAsTableCell(prosemirrorNode) {
|
|
|
8029
8172
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
8030
8173
|
if (!id)
|
|
8031
8174
|
return null;
|
|
8032
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
8175
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z147.string().optional());
|
|
8033
8176
|
let columnWidth;
|
|
8034
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
8177
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z147.array(z147.number()).optional());
|
|
8035
8178
|
if (columnWidthArray) {
|
|
8036
8179
|
columnWidth = columnWidthArray[0];
|
|
8037
8180
|
}
|
|
@@ -8069,7 +8212,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
8069
8212
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
8070
8213
|
};
|
|
8071
8214
|
case "image":
|
|
8072
|
-
const items = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
8215
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", z147.string());
|
|
8073
8216
|
if (!items)
|
|
8074
8217
|
return null;
|
|
8075
8218
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
@@ -8111,6 +8254,7 @@ function emptyTable(id, variantId, indentLevel) {
|
|
|
8111
8254
|
}
|
|
8112
8255
|
return {
|
|
8113
8256
|
id,
|
|
8257
|
+
type: "Block",
|
|
8114
8258
|
data: {
|
|
8115
8259
|
packageId: "io.supernova.block.table",
|
|
8116
8260
|
indentLevel: indentLevel ?? 0,
|
|
@@ -8142,6 +8286,7 @@ function parseAsDivider(prosemirrorNode, definition) {
|
|
|
8142
8286
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
8143
8287
|
return {
|
|
8144
8288
|
id,
|
|
8289
|
+
type: "Block",
|
|
8145
8290
|
data: {
|
|
8146
8291
|
packageId: definition.id,
|
|
8147
8292
|
indentLevel: 0,
|
|
@@ -8161,6 +8306,7 @@ function parseAsCustomBlock(prosemirrorNode, definition) {
|
|
|
8161
8306
|
return null;
|
|
8162
8307
|
return {
|
|
8163
8308
|
id,
|
|
8309
|
+
type: "Block",
|
|
8164
8310
|
data: {
|
|
8165
8311
|
packageId: definition.id,
|
|
8166
8312
|
indentLevel: 0,
|
|
@@ -8171,7 +8317,7 @@ function parseAsCustomBlock(prosemirrorNode, definition) {
|
|
|
8171
8317
|
};
|
|
8172
8318
|
}
|
|
8173
8319
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
8174
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
8320
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z147.string());
|
|
8175
8321
|
if (!itemsString)
|
|
8176
8322
|
return null;
|
|
8177
8323
|
const itemsJson = JSON.parse(itemsString);
|
|
@@ -8183,11 +8329,11 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
8183
8329
|
}
|
|
8184
8330
|
function parseAppearance(prosemirrorNode) {
|
|
8185
8331
|
const appearance = {};
|
|
8186
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
8332
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z147.number().optional());
|
|
8187
8333
|
if (columns) {
|
|
8188
8334
|
appearance.numberOfColumns = columns;
|
|
8189
8335
|
}
|
|
8190
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
8336
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z147.string().optional());
|
|
8191
8337
|
if (backgroundColor) {
|
|
8192
8338
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
8193
8339
|
if (parsedColor.success) {
|
|
@@ -8278,13 +8424,13 @@ function valueSchemaForPropertyType(type) {
|
|
|
8278
8424
|
}
|
|
8279
8425
|
}
|
|
8280
8426
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
8281
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
8427
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z147.string());
|
|
8282
8428
|
if (!id)
|
|
8283
8429
|
console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
8284
8430
|
return id;
|
|
8285
8431
|
}
|
|
8286
8432
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
8287
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
8433
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z147.string()));
|
|
8288
8434
|
}
|
|
8289
8435
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
8290
8436
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|
|
@@ -8311,7 +8457,7 @@ export {
|
|
|
8311
8457
|
BlockParsingUtils,
|
|
8312
8458
|
DTOCreateDocumentationGroupInput,
|
|
8313
8459
|
DTOCreateDocumentationPageInputV2,
|
|
8314
|
-
|
|
8460
|
+
DTOCreateDocumentationTabInput,
|
|
8315
8461
|
DTODeleteDocumentationGroupInput,
|
|
8316
8462
|
DTODeleteDocumentationPageInputV2,
|
|
8317
8463
|
DTODeleteDocumentationTabGroupInput,
|
|
@@ -8343,8 +8489,8 @@ export {
|
|
|
8343
8489
|
DTODocumentationPageUpdateActionInputV2,
|
|
8344
8490
|
DTODocumentationPageUpdateActionOutputV2,
|
|
8345
8491
|
DTODocumentationPageV2,
|
|
8346
|
-
|
|
8347
|
-
|
|
8492
|
+
DTODocumentationTabCreateActionInputV2,
|
|
8493
|
+
DTODocumentationTabCreateActionOutputV2,
|
|
8348
8494
|
DTODocumentationTabGroupDeleteActionInputV2,
|
|
8349
8495
|
DTODocumentationTabGroupDeleteActionOutputV2,
|
|
8350
8496
|
DTODuplicateDocumentationGroupInput,
|
|
@@ -8372,7 +8518,8 @@ export {
|
|
|
8372
8518
|
DTOWorkspaceRole,
|
|
8373
8519
|
DocumentationPageEditorModel,
|
|
8374
8520
|
DocumentationPageV1DTO,
|
|
8375
|
-
|
|
8521
|
+
PageBlockEditorModel,
|
|
8522
|
+
PageSectionEditorModel,
|
|
8376
8523
|
blockDefinitionForBlock,
|
|
8377
8524
|
blockToProsemirrorNode,
|
|
8378
8525
|
buildDocPagePublishPaths,
|
|
@@ -8391,6 +8538,9 @@ export {
|
|
|
8391
8538
|
pmSchema,
|
|
8392
8539
|
prosemirrorDocToPage,
|
|
8393
8540
|
prosemirrorNodeToBlock,
|
|
8541
|
+
prosemirrorNodeToSection,
|
|
8542
|
+
prosemirrorNodesToBlocks,
|
|
8543
|
+
sectionToProsemirrorNode,
|
|
8394
8544
|
serializeAsCustomBlock,
|
|
8395
8545
|
yDocToPage,
|
|
8396
8546
|
yXmlFragmentToPage,
|