@supernova-studio/model 0.19.2 → 0.20.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 +18981 -12193
- package/dist/index.d.ts +18981 -12193
- package/dist/index.js +85 -36
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +993 -944
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/elements/data/documentation-block-v2.ts +20 -21
- package/src/dsm/elements/data/documentation-page-v1.ts +3 -2
- package/src/dsm/elements/data/documentation-page-v2.ts +5 -3
- package/src/dsm/elements/data/documentation-v1.ts +14 -0
- package/src/dsm/elements/data/documentation-v2.ts +14 -0
- package/src/dsm/elements/data/group.ts +12 -5
- package/src/dsm/elements/data/index.ts +4 -1
- package/src/dsm/elements/data/item-header-v1.ts +35 -0
- package/src/dsm/elements/data/item-header-v2.ts +35 -0
- package/src/dsm/elements/data/item-header.ts +2 -37
- package/src/dsm/elements/documentation-page-v2.ts +4 -1
- package/src/dsm/elements/group.ts +2 -2
- package/src/dsm/elements/data/documentation.ts +0 -14
package/dist/index.mjs
CHANGED
|
@@ -354,7 +354,7 @@ var ImportJob = Entity.extend({
|
|
|
354
354
|
});
|
|
355
355
|
|
|
356
356
|
// src/dsm/data-sources/import-summary.ts
|
|
357
|
-
import { z as
|
|
357
|
+
import { z as z86 } from "zod";
|
|
358
358
|
|
|
359
359
|
// src/dsm/elements/data/base.ts
|
|
360
360
|
import { z as z18 } from "zod";
|
|
@@ -887,6 +887,21 @@ var PageBlockImageAlignment = z34.enum(["Left", "Center", "Stretch"]);
|
|
|
887
887
|
var PageBlockTableCellAlignment = z34.enum(["Left", "Center", "Right"]);
|
|
888
888
|
var PageBlockPreviewContainerSize = z34.enum(["Centered", "NaturalHeight"]);
|
|
889
889
|
var PageBlockThemeDisplayMode = z34.enum(["Split", "Override"]);
|
|
890
|
+
var PageBlockImageReference = z34.object({
|
|
891
|
+
type: PageBlockImageType,
|
|
892
|
+
url: z34.string(),
|
|
893
|
+
assetId: z34.string().optional(),
|
|
894
|
+
size: Size.optional(),
|
|
895
|
+
figmaFile: z34.object({
|
|
896
|
+
sourceId: z34.string(),
|
|
897
|
+
frameId: z34.string(),
|
|
898
|
+
frameReferenceId: z34.string(),
|
|
899
|
+
origin: z34.object({
|
|
900
|
+
title: z34.string().optional(),
|
|
901
|
+
sourceFileName: z34.string().optional()
|
|
902
|
+
})
|
|
903
|
+
}).optional()
|
|
904
|
+
});
|
|
890
905
|
var PageBlockColorV2 = z34.object({
|
|
891
906
|
value: z34.string(),
|
|
892
907
|
referencedTokenId: z34.string().optional()
|
|
@@ -917,21 +932,6 @@ var PageBlockDataV2 = z34.object({
|
|
|
917
932
|
appearance: PageBlockAppearanceV2.optional(),
|
|
918
933
|
items: z34.array(PageBlockItemV2)
|
|
919
934
|
});
|
|
920
|
-
var PageBlockItemImageReference = z34.object({
|
|
921
|
-
type: PageBlockImageType,
|
|
922
|
-
url: z34.string(),
|
|
923
|
-
assetId: z34.string().optional(),
|
|
924
|
-
size: Size.optional(),
|
|
925
|
-
figmaFile: z34.object({
|
|
926
|
-
sourceId: z34.string(),
|
|
927
|
-
frameId: z34.string(),
|
|
928
|
-
frameReferenceId: z34.string(),
|
|
929
|
-
origin: z34.object({
|
|
930
|
-
title: z34.string().optional(),
|
|
931
|
-
sourceFileName: z34.string().optional()
|
|
932
|
-
})
|
|
933
|
-
}).optional()
|
|
934
|
-
});
|
|
935
935
|
var PageBlockItemAssetValue = z34.object({
|
|
936
936
|
selectedPropertyIds: z34.array(z34.string()).optional(),
|
|
937
937
|
showSearch: z34.boolean().optional(),
|
|
@@ -1009,7 +1009,7 @@ var PageBlockItemImageValue = z34.object({
|
|
|
1009
1009
|
alt: z34.string().optional(),
|
|
1010
1010
|
caption: z34.string().optional(),
|
|
1011
1011
|
alignment: PageBlockImageAlignment.optional(),
|
|
1012
|
-
value:
|
|
1012
|
+
value: PageBlockImageReference.optional()
|
|
1013
1013
|
});
|
|
1014
1014
|
var PageBlockItemMarkdownValue = z34.object({
|
|
1015
1015
|
value: z34.string()
|
|
@@ -1099,14 +1099,14 @@ var PageBlockItemTableValue = z34.object({
|
|
|
1099
1099
|
});
|
|
1100
1100
|
|
|
1101
1101
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
1102
|
+
import { z as z40 } from "zod";
|
|
1103
|
+
|
|
1104
|
+
// src/dsm/elements/data/documentation-v1.ts
|
|
1102
1105
|
import { z as z39 } from "zod";
|
|
1103
1106
|
|
|
1104
|
-
// src/dsm/elements/data/
|
|
1107
|
+
// src/dsm/elements/data/item-header-v1.ts
|
|
1105
1108
|
import { z as z38 } from "zod";
|
|
1106
1109
|
|
|
1107
|
-
// src/dsm/elements/data/item-header.ts
|
|
1108
|
-
import { z as z37 } from "zod";
|
|
1109
|
-
|
|
1110
1110
|
// src/dsm/elements/data/page-asset.ts
|
|
1111
1111
|
import { z as z36 } from "zod";
|
|
1112
1112
|
|
|
@@ -1140,24 +1140,25 @@ var DocumentationPageAsset = z36.discriminatedUnion("type", [
|
|
|
1140
1140
|
]);
|
|
1141
1141
|
|
|
1142
1142
|
// src/dsm/elements/data/item-header.ts
|
|
1143
|
-
|
|
1144
|
-
var colorValueFormatDescription = "Must match /^#[a-f0-9]{8}$/";
|
|
1143
|
+
import { z as z37 } from "zod";
|
|
1145
1144
|
var DocumentationItemHeaderAlignmentSchema = z37.enum(["Left", "Center"]);
|
|
1146
1145
|
var DocumentationItemHeaderImageScaleTypeSchema = z37.enum(["AspectFill", "AspectFit"]);
|
|
1147
1146
|
var DocumentationItemHeaderAlignment = DocumentationItemHeaderAlignmentSchema.enum;
|
|
1148
1147
|
var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTypeSchema.enum;
|
|
1149
|
-
|
|
1150
|
-
|
|
1148
|
+
|
|
1149
|
+
// src/dsm/elements/data/item-header-v1.ts
|
|
1150
|
+
var DocumentationItemHeaderV1 = z38.object({
|
|
1151
|
+
description: z38.string(),
|
|
1151
1152
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1152
1153
|
foregroundColor: ColorTokenData.nullish(),
|
|
1153
1154
|
backgroundColor: ColorTokenData.nullish(),
|
|
1154
1155
|
backgroundImageAsset: DocumentationPageAsset.nullish(),
|
|
1155
1156
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1156
|
-
showBackgroundOverlay:
|
|
1157
|
-
showCoverText:
|
|
1158
|
-
minHeight:
|
|
1157
|
+
showBackgroundOverlay: z38.boolean(),
|
|
1158
|
+
showCoverText: z38.boolean(),
|
|
1159
|
+
minHeight: z38.number().nullish()
|
|
1159
1160
|
});
|
|
1160
|
-
var
|
|
1161
|
+
var defaultDocumentationItemHeaderV1 = {
|
|
1161
1162
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
1162
1163
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleType.AspectFill,
|
|
1163
1164
|
description: "",
|
|
@@ -1165,63 +1166,101 @@ var defaultDocumentationItemHeader = {
|
|
|
1165
1166
|
showCoverText: true
|
|
1166
1167
|
};
|
|
1167
1168
|
|
|
1168
|
-
// src/dsm/elements/data/documentation.ts
|
|
1169
|
-
var
|
|
1170
|
-
showSidebar:
|
|
1171
|
-
header:
|
|
1169
|
+
// src/dsm/elements/data/documentation-v1.ts
|
|
1170
|
+
var DocumentationItemConfigurationV1 = z39.object({
|
|
1171
|
+
showSidebar: z39.boolean(),
|
|
1172
|
+
header: DocumentationItemHeaderV1
|
|
1172
1173
|
});
|
|
1173
|
-
var
|
|
1174
|
-
header:
|
|
1174
|
+
var defaultDocumentationItemConfigurationV1 = {
|
|
1175
|
+
header: defaultDocumentationItemHeaderV1,
|
|
1175
1176
|
showSidebar: true
|
|
1176
1177
|
};
|
|
1177
1178
|
|
|
1178
1179
|
// src/dsm/elements/data/documentation-page-v1.ts
|
|
1179
|
-
var DocumentationPageDataV1 =
|
|
1180
|
-
blocks:
|
|
1181
|
-
configuration: nullishToOptional(
|
|
1180
|
+
var DocumentationPageDataV1 = z40.object({
|
|
1181
|
+
blocks: z40.array(PageBlockV1),
|
|
1182
|
+
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1182
1183
|
});
|
|
1183
|
-
var DocumentationPageElementDataV1 =
|
|
1184
|
+
var DocumentationPageElementDataV1 = z40.object({
|
|
1185
|
+
dataVersion: z40.literal(1).optional().default(1),
|
|
1184
1186
|
value: DocumentationPageDataV1
|
|
1185
1187
|
});
|
|
1186
1188
|
|
|
1187
1189
|
// src/dsm/elements/data/documentation-page-v2.ts
|
|
1188
|
-
import { z as
|
|
1189
|
-
|
|
1190
|
-
|
|
1190
|
+
import { z as z43 } from "zod";
|
|
1191
|
+
|
|
1192
|
+
// src/dsm/elements/data/documentation-v2.ts
|
|
1193
|
+
import { z as z42 } from "zod";
|
|
1194
|
+
|
|
1195
|
+
// src/dsm/elements/data/item-header-v2.ts
|
|
1196
|
+
import { z as z41 } from "zod";
|
|
1197
|
+
var DocumentationItemHeaderV2 = z41.object({
|
|
1198
|
+
description: z41.string(),
|
|
1199
|
+
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1200
|
+
foregroundColor: PageBlockColorV2.nullish(),
|
|
1201
|
+
backgroundColor: PageBlockColorV2.nullish(),
|
|
1202
|
+
backgroundImageAsset: DocumentationPageAsset.nullish(),
|
|
1203
|
+
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1204
|
+
showBackgroundOverlay: z41.boolean(),
|
|
1205
|
+
showCoverText: z41.boolean(),
|
|
1206
|
+
minHeight: z41.number().nullish()
|
|
1207
|
+
});
|
|
1208
|
+
var defaultDocumentationItemHeaderV2 = {
|
|
1209
|
+
alignment: DocumentationItemHeaderAlignment.Left,
|
|
1210
|
+
backgroundImageScaleType: DocumentationItemHeaderImageScaleType.AspectFill,
|
|
1211
|
+
description: "",
|
|
1212
|
+
showBackgroundOverlay: false,
|
|
1213
|
+
showCoverText: true
|
|
1214
|
+
};
|
|
1215
|
+
|
|
1216
|
+
// src/dsm/elements/data/documentation-v2.ts
|
|
1217
|
+
var DocumentationItemConfigurationV2 = z42.object({
|
|
1218
|
+
showSidebar: z42.boolean(),
|
|
1219
|
+
header: DocumentationItemHeaderV2
|
|
1191
1220
|
});
|
|
1192
|
-
var
|
|
1193
|
-
|
|
1221
|
+
var defaultDocumentationItemConfigurationV2 = {
|
|
1222
|
+
header: defaultDocumentationItemHeaderV2,
|
|
1223
|
+
showSidebar: true
|
|
1224
|
+
};
|
|
1225
|
+
|
|
1226
|
+
// src/dsm/elements/data/documentation-page-v2.ts
|
|
1227
|
+
var DocumentationPageDataV2 = z43.object({
|
|
1228
|
+
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1229
|
+
});
|
|
1230
|
+
var DocumentationPageElementDataV2 = z43.object({
|
|
1231
|
+
value: DocumentationPageDataV1,
|
|
1232
|
+
valueV2: DocumentationPageDataV2.optional()
|
|
1194
1233
|
});
|
|
1195
1234
|
|
|
1196
1235
|
// src/dsm/elements/data/duration.ts
|
|
1197
|
-
import { z as
|
|
1198
|
-
var DurationUnit =
|
|
1199
|
-
var DurationValue =
|
|
1236
|
+
import { z as z44 } from "zod";
|
|
1237
|
+
var DurationUnit = z44.enum(["Ms"]);
|
|
1238
|
+
var DurationValue = z44.object({
|
|
1200
1239
|
unit: DurationUnit,
|
|
1201
|
-
measure:
|
|
1240
|
+
measure: z44.number()
|
|
1202
1241
|
});
|
|
1203
1242
|
var DurationTokenData = tokenAliasOrValue(DurationValue);
|
|
1204
1243
|
|
|
1205
1244
|
// src/dsm/elements/data/figma-file-structure.ts
|
|
1206
|
-
import { z as
|
|
1207
|
-
var FigmaFileStructureNodeType =
|
|
1208
|
-
var FigmaFileStructureNodeBase =
|
|
1209
|
-
id:
|
|
1210
|
-
name:
|
|
1245
|
+
import { z as z45 } from "zod";
|
|
1246
|
+
var FigmaFileStructureNodeType = z45.enum(["DOCUMENT", "CANVAS", "FRAME", "COMPONENT", "COMPONENT_SET"]);
|
|
1247
|
+
var FigmaFileStructureNodeBase = z45.object({
|
|
1248
|
+
id: z45.string(),
|
|
1249
|
+
name: z45.string(),
|
|
1211
1250
|
type: FigmaFileStructureNodeType,
|
|
1212
1251
|
size: SizeOrUndefined,
|
|
1213
|
-
parentComponentSetId:
|
|
1252
|
+
parentComponentSetId: z45.string().optional()
|
|
1214
1253
|
});
|
|
1215
1254
|
var FigmaFileStructureNode = FigmaFileStructureNodeBase.extend({
|
|
1216
|
-
children:
|
|
1255
|
+
children: z45.lazy(() => FigmaFileStructureNode.array())
|
|
1217
1256
|
});
|
|
1218
|
-
var FigmaFileStructureStatistics =
|
|
1219
|
-
frames:
|
|
1220
|
-
components:
|
|
1221
|
-
componentSets:
|
|
1257
|
+
var FigmaFileStructureStatistics = z45.object({
|
|
1258
|
+
frames: z45.number().nullable().optional().transform((v) => v ?? 0),
|
|
1259
|
+
components: z45.number().nullable().optional().transform((v) => v ?? 0),
|
|
1260
|
+
componentSets: z45.number().nullable().optional().transform((v) => v ?? 0)
|
|
1222
1261
|
});
|
|
1223
|
-
var FigmaFileStructureElementData =
|
|
1224
|
-
value:
|
|
1262
|
+
var FigmaFileStructureElementData = z45.object({
|
|
1263
|
+
value: z45.object({
|
|
1225
1264
|
structure: FigmaFileStructureNode,
|
|
1226
1265
|
assetsInFile: FigmaFileStructureStatistics
|
|
1227
1266
|
})
|
|
@@ -1238,165 +1277,170 @@ function recursiveFigmaFileStructureToMap(node, map) {
|
|
|
1238
1277
|
}
|
|
1239
1278
|
|
|
1240
1279
|
// src/dsm/elements/data/figma-node-reference.ts
|
|
1241
|
-
import { z as
|
|
1242
|
-
var FigmaNodeReferenceData =
|
|
1243
|
-
structureElementId:
|
|
1244
|
-
nodeId:
|
|
1245
|
-
fileId:
|
|
1246
|
-
valid:
|
|
1247
|
-
assetId:
|
|
1248
|
-
assetScale:
|
|
1249
|
-
assetWidth:
|
|
1250
|
-
assetHeight:
|
|
1251
|
-
assetUrl:
|
|
1252
|
-
});
|
|
1253
|
-
var FigmaNodeReferenceElementData =
|
|
1280
|
+
import { z as z46 } from "zod";
|
|
1281
|
+
var FigmaNodeReferenceData = z46.object({
|
|
1282
|
+
structureElementId: z46.string(),
|
|
1283
|
+
nodeId: z46.string(),
|
|
1284
|
+
fileId: z46.string().optional(),
|
|
1285
|
+
valid: z46.boolean(),
|
|
1286
|
+
assetId: z46.string().optional(),
|
|
1287
|
+
assetScale: z46.number().optional(),
|
|
1288
|
+
assetWidth: z46.number().optional(),
|
|
1289
|
+
assetHeight: z46.number().optional(),
|
|
1290
|
+
assetUrl: z46.string().optional()
|
|
1291
|
+
});
|
|
1292
|
+
var FigmaNodeReferenceElementData = z46.object({
|
|
1254
1293
|
value: FigmaNodeReferenceData
|
|
1255
1294
|
});
|
|
1256
1295
|
|
|
1257
1296
|
// src/dsm/elements/data/font-family.ts
|
|
1258
|
-
import { z as
|
|
1259
|
-
var FontFamilyValue =
|
|
1297
|
+
import { z as z47 } from "zod";
|
|
1298
|
+
var FontFamilyValue = z47.string();
|
|
1260
1299
|
var FontFamilyTokenData = tokenAliasOrValue(FontFamilyValue);
|
|
1261
1300
|
|
|
1262
1301
|
// src/dsm/elements/data/font-size.ts
|
|
1263
|
-
import { z as
|
|
1264
|
-
var FontSizeUnit =
|
|
1265
|
-
var FontSizeValue =
|
|
1302
|
+
import { z as z48 } from "zod";
|
|
1303
|
+
var FontSizeUnit = z48.enum(["Pixels", "Rem", "Percent"]);
|
|
1304
|
+
var FontSizeValue = z48.object({
|
|
1266
1305
|
unit: FontSizeUnit,
|
|
1267
|
-
measure:
|
|
1306
|
+
measure: z48.number()
|
|
1268
1307
|
});
|
|
1269
1308
|
var FontSizeTokenData = tokenAliasOrValue(FontSizeValue);
|
|
1270
1309
|
|
|
1271
1310
|
// src/dsm/elements/data/font-weight.ts
|
|
1272
|
-
import { z as
|
|
1273
|
-
var FontWeightValue =
|
|
1311
|
+
import { z as z49 } from "zod";
|
|
1312
|
+
var FontWeightValue = z49.string();
|
|
1274
1313
|
var FontWeightTokenData = tokenAliasOrValue(FontWeightValue);
|
|
1275
1314
|
|
|
1276
1315
|
// src/dsm/elements/data/gradient.ts
|
|
1277
|
-
import { z as
|
|
1278
|
-
var GradientType =
|
|
1279
|
-
var GradientStop =
|
|
1280
|
-
position:
|
|
1316
|
+
import { z as z50 } from "zod";
|
|
1317
|
+
var GradientType = z50.enum(["Linear", "Radial", "Angular"]);
|
|
1318
|
+
var GradientStop = z50.object({
|
|
1319
|
+
position: z50.number(),
|
|
1281
1320
|
color: ColorTokenData
|
|
1282
1321
|
});
|
|
1283
|
-
var GradientLayerValue =
|
|
1322
|
+
var GradientLayerValue = z50.object({
|
|
1284
1323
|
from: Point2D,
|
|
1285
1324
|
to: Point2D,
|
|
1286
1325
|
type: GradientType,
|
|
1287
|
-
aspectRatio: nullishToOptional(
|
|
1326
|
+
aspectRatio: nullishToOptional(z50.number()),
|
|
1288
1327
|
// z.number(),
|
|
1289
|
-
stops:
|
|
1328
|
+
stops: z50.array(GradientStop).min(2)
|
|
1290
1329
|
});
|
|
1291
1330
|
var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
1292
|
-
var GradientTokenValue =
|
|
1331
|
+
var GradientTokenValue = z50.array(GradientLayerData);
|
|
1293
1332
|
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
1294
1333
|
|
|
1295
1334
|
// src/dsm/elements/data/group.ts
|
|
1296
|
-
import { z as
|
|
1297
|
-
var DocumentationGroupBehavior =
|
|
1298
|
-
var
|
|
1335
|
+
import { z as z51 } from "zod";
|
|
1336
|
+
var DocumentationGroupBehavior = z51.enum(["Group", "Tabs"]);
|
|
1337
|
+
var ElementGroupDataDeprecated = z51.object({
|
|
1338
|
+
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1339
|
+
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1340
|
+
});
|
|
1341
|
+
var ElementGroupDataV2 = z51.object({
|
|
1299
1342
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1300
|
-
configuration: nullishToOptional(
|
|
1343
|
+
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1301
1344
|
});
|
|
1302
|
-
var ElementGroupElementData =
|
|
1303
|
-
value:
|
|
1345
|
+
var ElementGroupElementData = z51.object({
|
|
1346
|
+
value: ElementGroupDataDeprecated.optional(),
|
|
1347
|
+
valueV2: ElementGroupDataV2.optional()
|
|
1304
1348
|
});
|
|
1305
1349
|
|
|
1306
1350
|
// src/dsm/elements/data/letter-spacing.ts
|
|
1307
|
-
import { z as
|
|
1308
|
-
var LetterSpacingUnit =
|
|
1309
|
-
var LetterSpacingValue =
|
|
1351
|
+
import { z as z52 } from "zod";
|
|
1352
|
+
var LetterSpacingUnit = z52.enum(["Pixels", "Rem", "Percent"]);
|
|
1353
|
+
var LetterSpacingValue = z52.object({
|
|
1310
1354
|
unit: LetterSpacingUnit,
|
|
1311
|
-
measure:
|
|
1355
|
+
measure: z52.number()
|
|
1312
1356
|
});
|
|
1313
1357
|
var LetterSpacingTokenData = tokenAliasOrValue(LetterSpacingValue);
|
|
1314
1358
|
|
|
1315
1359
|
// src/dsm/elements/data/line-height.ts
|
|
1316
|
-
import { z as
|
|
1317
|
-
var LineHeightUnit =
|
|
1318
|
-
var LineHeightValue =
|
|
1360
|
+
import { z as z53 } from "zod";
|
|
1361
|
+
var LineHeightUnit = z53.enum(["Pixels", "Rem", "Percent", "Raw"]);
|
|
1362
|
+
var LineHeightValue = z53.object({
|
|
1319
1363
|
unit: LineHeightUnit,
|
|
1320
|
-
measure:
|
|
1364
|
+
measure: z53.number()
|
|
1321
1365
|
});
|
|
1322
1366
|
var LineHeightTokenData = tokenAliasOrValue(LineHeightValue);
|
|
1323
1367
|
|
|
1324
1368
|
// src/dsm/elements/data/paragraph-indent.ts
|
|
1325
|
-
import { z as
|
|
1326
|
-
var ParagraphIndentUnit =
|
|
1327
|
-
var ParagraphIndentValue =
|
|
1369
|
+
import { z as z54 } from "zod";
|
|
1370
|
+
var ParagraphIndentUnit = z54.enum(["Pixels", "Rem", "Percent"]);
|
|
1371
|
+
var ParagraphIndentValue = z54.object({
|
|
1328
1372
|
unit: ParagraphIndentUnit,
|
|
1329
|
-
measure:
|
|
1373
|
+
measure: z54.number()
|
|
1330
1374
|
});
|
|
1331
1375
|
var ParagraphIndentTokenData = tokenAliasOrValue(ParagraphIndentValue);
|
|
1332
1376
|
|
|
1333
1377
|
// src/dsm/elements/data/paragraph-spacing.ts
|
|
1334
|
-
import { z as
|
|
1335
|
-
var ParagraphSpacingUnit =
|
|
1336
|
-
var ParagraphSpacingValue =
|
|
1378
|
+
import { z as z55 } from "zod";
|
|
1379
|
+
var ParagraphSpacingUnit = z55.enum(["Pixels", "Rem", "Percent"]);
|
|
1380
|
+
var ParagraphSpacingValue = z55.object({
|
|
1337
1381
|
unit: ParagraphSpacingUnit,
|
|
1338
|
-
measure:
|
|
1382
|
+
measure: z55.number()
|
|
1339
1383
|
});
|
|
1340
1384
|
var ParagraphSpacingTokenData = tokenAliasOrValue(ParagraphSpacingValue);
|
|
1341
1385
|
|
|
1342
1386
|
// src/dsm/elements/data/product-copy.ts
|
|
1343
|
-
import { z as
|
|
1344
|
-
var ProductCopyValue =
|
|
1387
|
+
import { z as z56 } from "zod";
|
|
1388
|
+
var ProductCopyValue = z56.string();
|
|
1345
1389
|
var ProductCopyTokenData = tokenAliasOrValue(ProductCopyValue);
|
|
1346
1390
|
|
|
1347
1391
|
// src/dsm/elements/data/shadow.ts
|
|
1348
|
-
import { z as
|
|
1349
|
-
var ShadowType =
|
|
1350
|
-
var ShadowLayerValue =
|
|
1392
|
+
import { z as z57 } from "zod";
|
|
1393
|
+
var ShadowType = z57.enum(["Drop", "Inner"]);
|
|
1394
|
+
var ShadowLayerValue = z57.object({
|
|
1351
1395
|
color: ColorTokenData,
|
|
1352
|
-
x:
|
|
1353
|
-
y:
|
|
1354
|
-
radius:
|
|
1355
|
-
spread:
|
|
1396
|
+
x: z57.number(),
|
|
1397
|
+
y: z57.number(),
|
|
1398
|
+
radius: z57.number(),
|
|
1399
|
+
spread: z57.number(),
|
|
1356
1400
|
opacity: OpacityTokenData,
|
|
1357
1401
|
type: ShadowType
|
|
1358
1402
|
});
|
|
1359
1403
|
var ShadowTokenDataBase = tokenAliasOrValue(ShadowLayerValue);
|
|
1360
|
-
var ShadowTokenData = tokenAliasOrValue(
|
|
1404
|
+
var ShadowTokenData = tokenAliasOrValue(z57.array(ShadowTokenDataBase));
|
|
1361
1405
|
|
|
1362
1406
|
// src/dsm/elements/data/size.ts
|
|
1363
|
-
import { z as
|
|
1364
|
-
var SizeUnit =
|
|
1365
|
-
var SizeValue =
|
|
1407
|
+
import { z as z58 } from "zod";
|
|
1408
|
+
var SizeUnit = z58.enum(["Pixels", "Rem", "Percent"]);
|
|
1409
|
+
var SizeValue = z58.object({
|
|
1366
1410
|
unit: SizeUnit,
|
|
1367
|
-
measure:
|
|
1411
|
+
measure: z58.number()
|
|
1368
1412
|
});
|
|
1369
1413
|
var SizeTokenData = tokenAliasOrValue(SizeValue);
|
|
1370
1414
|
|
|
1371
1415
|
// src/dsm/elements/data/space.ts
|
|
1372
|
-
import { z as
|
|
1373
|
-
var SpaceUnit =
|
|
1374
|
-
var SpaceValue =
|
|
1416
|
+
import { z as z59 } from "zod";
|
|
1417
|
+
var SpaceUnit = z59.enum(["Pixels", "Rem", "Percent"]);
|
|
1418
|
+
var SpaceValue = z59.object({
|
|
1375
1419
|
unit: SpaceUnit,
|
|
1376
|
-
measure:
|
|
1420
|
+
measure: z59.number()
|
|
1377
1421
|
});
|
|
1378
1422
|
var SpaceTokenData = tokenAliasOrValue(SpaceValue);
|
|
1379
1423
|
|
|
1380
1424
|
// src/dsm/elements/data/string.ts
|
|
1381
|
-
import { z as
|
|
1382
|
-
var StringValue =
|
|
1425
|
+
import { z as z60 } from "zod";
|
|
1426
|
+
var StringValue = z60.string();
|
|
1383
1427
|
var StringTokenData = tokenAliasOrValue(StringValue);
|
|
1384
1428
|
|
|
1385
1429
|
// src/dsm/elements/data/text-case.ts
|
|
1386
|
-
import { z as
|
|
1387
|
-
var TextCase =
|
|
1430
|
+
import { z as z61 } from "zod";
|
|
1431
|
+
var TextCase = z61.enum(["Original", "Upper", "Lower", "Camel", "SmallCaps"]);
|
|
1388
1432
|
var TextCaseValue = TextCase;
|
|
1389
1433
|
var TextCaseTokenData = tokenAliasOrValue(TextCaseValue);
|
|
1390
1434
|
|
|
1391
1435
|
// src/dsm/elements/data/text-decoration.ts
|
|
1392
|
-
import { z as
|
|
1393
|
-
var TextDecoration =
|
|
1436
|
+
import { z as z62 } from "zod";
|
|
1437
|
+
var TextDecoration = z62.enum(["None", "Underline", "Strikethrough"]);
|
|
1394
1438
|
var TextDecorationValue = TextDecoration;
|
|
1395
1439
|
var TextDecorationTokenData = tokenAliasOrValue(TextDecorationValue);
|
|
1396
1440
|
|
|
1397
1441
|
// src/dsm/elements/data/typography.ts
|
|
1398
|
-
import { z as
|
|
1399
|
-
var TypographyValue =
|
|
1442
|
+
import { z as z63 } from "zod";
|
|
1443
|
+
var TypographyValue = z63.object({
|
|
1400
1444
|
fontSize: FontSizeTokenData,
|
|
1401
1445
|
fontFamily: FontFamilyTokenData,
|
|
1402
1446
|
fontWeight: FontWeightTokenData,
|
|
@@ -1410,97 +1454,99 @@ var TypographyValue = z60.object({
|
|
|
1410
1454
|
var TypographyTokenData = tokenAliasOrValue(TypographyValue);
|
|
1411
1455
|
|
|
1412
1456
|
// src/dsm/elements/data/visibility.ts
|
|
1413
|
-
import { z as
|
|
1414
|
-
var Visibility =
|
|
1457
|
+
import { z as z64 } from "zod";
|
|
1458
|
+
var Visibility = z64.enum(["Hidden", "Visible"]);
|
|
1415
1459
|
var VisibilityValue = Visibility;
|
|
1416
1460
|
var VisibilityTokenData = tokenAliasOrValue(VisibilityValue);
|
|
1417
1461
|
|
|
1418
1462
|
// src/dsm/elements/data/z-index.ts
|
|
1419
|
-
import { z as
|
|
1420
|
-
var ZIndexUnit =
|
|
1421
|
-
var ZIndexValue =
|
|
1463
|
+
import { z as z65 } from "zod";
|
|
1464
|
+
var ZIndexUnit = z65.enum(["Raw"]);
|
|
1465
|
+
var ZIndexValue = z65.object({
|
|
1422
1466
|
unit: ZIndexUnit,
|
|
1423
|
-
measure:
|
|
1467
|
+
measure: z65.number()
|
|
1424
1468
|
});
|
|
1425
1469
|
var ZIndexTokenData = tokenAliasOrValue(ZIndexValue);
|
|
1426
1470
|
|
|
1427
1471
|
// src/dsm/elements/base.ts
|
|
1428
|
-
import { z as
|
|
1429
|
-
var DesignElementOrigin =
|
|
1430
|
-
id:
|
|
1431
|
-
sourceId:
|
|
1432
|
-
name:
|
|
1433
|
-
});
|
|
1434
|
-
var DesignElementBase =
|
|
1435
|
-
id:
|
|
1436
|
-
persistentId:
|
|
1472
|
+
import { z as z66 } from "zod";
|
|
1473
|
+
var DesignElementOrigin = z66.object({
|
|
1474
|
+
id: z66.string(),
|
|
1475
|
+
sourceId: z66.string(),
|
|
1476
|
+
name: z66.string()
|
|
1477
|
+
});
|
|
1478
|
+
var DesignElementBase = z66.object({
|
|
1479
|
+
id: z66.string(),
|
|
1480
|
+
persistentId: z66.string(),
|
|
1437
1481
|
meta: ObjectMeta,
|
|
1438
|
-
designSystemVersionId:
|
|
1439
|
-
createdAt:
|
|
1440
|
-
updatedAt:
|
|
1482
|
+
designSystemVersionId: z66.string(),
|
|
1483
|
+
createdAt: z66.coerce.date(),
|
|
1484
|
+
updatedAt: z66.coerce.date()
|
|
1441
1485
|
});
|
|
1442
1486
|
var DesignElementImportedBase = DesignElementBase.extend({
|
|
1443
1487
|
origin: DesignElementOrigin
|
|
1444
1488
|
});
|
|
1445
|
-
var DesignElementGroupablePart =
|
|
1446
|
-
parentPersistentId:
|
|
1447
|
-
sortOrder:
|
|
1489
|
+
var DesignElementGroupablePart = z66.object({
|
|
1490
|
+
parentPersistentId: z66.string().optional(),
|
|
1491
|
+
sortOrder: z66.number()
|
|
1448
1492
|
});
|
|
1449
1493
|
var DesignElementGroupableBase = DesignElementBase.extend(DesignElementGroupablePart.shape);
|
|
1450
1494
|
var DesignElementGroupableRequiredPart = DesignElementGroupablePart.extend({
|
|
1451
|
-
parentPersistentId:
|
|
1495
|
+
parentPersistentId: z66.string()
|
|
1452
1496
|
});
|
|
1453
|
-
var DesignElementBrandedPart =
|
|
1454
|
-
brandPersistentId:
|
|
1497
|
+
var DesignElementBrandedPart = z66.object({
|
|
1498
|
+
brandPersistentId: z66.string()
|
|
1455
1499
|
});
|
|
1456
|
-
var DesignElementSlugPart =
|
|
1457
|
-
slug:
|
|
1458
|
-
userSlug:
|
|
1500
|
+
var DesignElementSlugPart = z66.object({
|
|
1501
|
+
slug: z66.string().optional(),
|
|
1502
|
+
userSlug: z66.string().optional()
|
|
1459
1503
|
});
|
|
1460
1504
|
|
|
1461
1505
|
// src/dsm/elements/component.ts
|
|
1462
|
-
import { z as
|
|
1463
|
-
var ComponentOriginPart =
|
|
1464
|
-
nodeId:
|
|
1465
|
-
width:
|
|
1466
|
-
height:
|
|
1506
|
+
import { z as z67 } from "zod";
|
|
1507
|
+
var ComponentOriginPart = z67.object({
|
|
1508
|
+
nodeId: z67.string().optional(),
|
|
1509
|
+
width: z67.number().optional(),
|
|
1510
|
+
height: z67.number().optional()
|
|
1467
1511
|
});
|
|
1468
|
-
var ComponentAsset =
|
|
1469
|
-
assetId:
|
|
1470
|
-
assetPath:
|
|
1512
|
+
var ComponentAsset = z67.object({
|
|
1513
|
+
assetId: z67.string(),
|
|
1514
|
+
assetPath: z67.string()
|
|
1471
1515
|
});
|
|
1472
1516
|
var ComponentOrigin = DesignElementOrigin.extend(ComponentOriginPart.shape);
|
|
1473
1517
|
var Component = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
1474
1518
|
origin: ComponentOrigin.optional(),
|
|
1475
1519
|
thumbnail: ComponentAsset,
|
|
1476
1520
|
svg: ComponentAsset.optional(),
|
|
1477
|
-
isAsset:
|
|
1521
|
+
isAsset: z67.boolean()
|
|
1478
1522
|
});
|
|
1479
1523
|
function isImportedComponent(component) {
|
|
1480
1524
|
return !!component.origin;
|
|
1481
1525
|
}
|
|
1482
1526
|
|
|
1483
1527
|
// src/dsm/elements/documentation-page-v1.ts
|
|
1484
|
-
import { z as
|
|
1528
|
+
import { z as z68 } from "zod";
|
|
1485
1529
|
var DocumentationPageV1 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1486
|
-
shortPersistentId:
|
|
1530
|
+
shortPersistentId: z68.string(),
|
|
1487
1531
|
data: DocumentationPageDataV1
|
|
1488
1532
|
});
|
|
1489
1533
|
|
|
1490
1534
|
// src/dsm/elements/documentation-page-v2.ts
|
|
1491
|
-
import { z as
|
|
1535
|
+
import { z as z69 } from "zod";
|
|
1492
1536
|
var DocumentationPageV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1493
|
-
shortPersistentId:
|
|
1494
|
-
data: DocumentationPageDataV2
|
|
1537
|
+
shortPersistentId: z69.string(),
|
|
1538
|
+
data: DocumentationPageDataV2.extend({
|
|
1539
|
+
oldBlocks: z69.array(PageBlockV1).optional()
|
|
1540
|
+
})
|
|
1495
1541
|
});
|
|
1496
1542
|
|
|
1497
1543
|
// src/dsm/elements/figma-file-structures.ts
|
|
1498
|
-
import { z as
|
|
1499
|
-
var FigmaFileStructureOrigin =
|
|
1500
|
-
sourceId:
|
|
1501
|
-
fileId:
|
|
1544
|
+
import { z as z70 } from "zod";
|
|
1545
|
+
var FigmaFileStructureOrigin = z70.object({
|
|
1546
|
+
sourceId: z70.string(),
|
|
1547
|
+
fileId: z70.string().optional()
|
|
1502
1548
|
});
|
|
1503
|
-
var FigmaFileStructureData =
|
|
1549
|
+
var FigmaFileStructureData = z70.object({
|
|
1504
1550
|
rootNode: FigmaFileStructureNode,
|
|
1505
1551
|
assetsInFile: FigmaFileStructureStatistics
|
|
1506
1552
|
});
|
|
@@ -1521,32 +1567,32 @@ var FigmaNodeReference = DesignElementBase.extend({
|
|
|
1521
1567
|
});
|
|
1522
1568
|
|
|
1523
1569
|
// src/dsm/elements/group.ts
|
|
1524
|
-
import { z as
|
|
1570
|
+
import { z as z71 } from "zod";
|
|
1525
1571
|
var ElementGroup = DesignElementBase.extend(DesignElementGroupablePart.shape).extend(DesignElementSlugPart.shape).extend(DesignElementBrandedPart.partial().shape).extend({
|
|
1526
|
-
shortPersistentId:
|
|
1572
|
+
shortPersistentId: z71.string().optional(),
|
|
1527
1573
|
childType: DesignElementType,
|
|
1528
|
-
data:
|
|
1574
|
+
data: ElementGroupDataV2.optional()
|
|
1529
1575
|
});
|
|
1530
1576
|
var BrandedElementGroup = ElementGroup.extend(DesignElementBrandedPart.shape);
|
|
1531
1577
|
|
|
1532
1578
|
// src/dsm/elements/page-block-v2.ts
|
|
1533
|
-
import { z as
|
|
1579
|
+
import { z as z72 } from "zod";
|
|
1534
1580
|
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
1535
1581
|
data: PageBlockDataV2
|
|
1536
1582
|
});
|
|
1537
|
-
var PageBlockEditorModelV2 =
|
|
1538
|
-
id:
|
|
1583
|
+
var PageBlockEditorModelV2 = z72.object({
|
|
1584
|
+
id: z72.string(),
|
|
1539
1585
|
data: PageBlockDataV2
|
|
1540
1586
|
});
|
|
1541
1587
|
|
|
1542
1588
|
// src/dsm/elements/theme.ts
|
|
1543
|
-
import { z as
|
|
1589
|
+
import { z as z74 } from "zod";
|
|
1544
1590
|
|
|
1545
1591
|
// src/dsm/elements/tokens.ts
|
|
1546
|
-
import { z as
|
|
1547
|
-
var DesignTokenOriginPart =
|
|
1548
|
-
referenceOriginId:
|
|
1549
|
-
referencePersistentId:
|
|
1592
|
+
import { z as z73 } from "zod";
|
|
1593
|
+
var DesignTokenOriginPart = z73.object({
|
|
1594
|
+
referenceOriginId: z73.string().optional(),
|
|
1595
|
+
referencePersistentId: z73.string().optional()
|
|
1550
1596
|
});
|
|
1551
1597
|
var DesignTokenOrigin = DesignElementOrigin.extend(DesignTokenOriginPart.shape);
|
|
1552
1598
|
var DesignTokenBase = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementBrandedPart.shape).extend({
|
|
@@ -1558,111 +1604,111 @@ var UpdateDesignTokenBase = DesignTokenBase.omit({
|
|
|
1558
1604
|
brandPersistentId: true,
|
|
1559
1605
|
designSystemVersionId: true
|
|
1560
1606
|
});
|
|
1561
|
-
var BlurTokenTypedData =
|
|
1562
|
-
type:
|
|
1607
|
+
var BlurTokenTypedData = z73.object({
|
|
1608
|
+
type: z73.literal("Blur"),
|
|
1563
1609
|
data: BlurTokenData
|
|
1564
1610
|
});
|
|
1565
|
-
var ColorTokenTypedData =
|
|
1566
|
-
type:
|
|
1611
|
+
var ColorTokenTypedData = z73.object({
|
|
1612
|
+
type: z73.literal("Color"),
|
|
1567
1613
|
data: ColorTokenData
|
|
1568
1614
|
});
|
|
1569
|
-
var GradientTokenTypedData =
|
|
1570
|
-
type:
|
|
1615
|
+
var GradientTokenTypedData = z73.object({
|
|
1616
|
+
type: z73.literal("Gradient"),
|
|
1571
1617
|
data: GradientTokenData
|
|
1572
1618
|
});
|
|
1573
|
-
var OpacityTokenTypedData =
|
|
1574
|
-
type:
|
|
1619
|
+
var OpacityTokenTypedData = z73.object({
|
|
1620
|
+
type: z73.literal("Opacity"),
|
|
1575
1621
|
data: OpacityTokenData
|
|
1576
1622
|
});
|
|
1577
|
-
var ShadowTokenTypedData =
|
|
1578
|
-
type:
|
|
1623
|
+
var ShadowTokenTypedData = z73.object({
|
|
1624
|
+
type: z73.literal("Shadow"),
|
|
1579
1625
|
data: ShadowTokenData
|
|
1580
1626
|
});
|
|
1581
|
-
var TypographyTokenTypedData =
|
|
1582
|
-
type:
|
|
1627
|
+
var TypographyTokenTypedData = z73.object({
|
|
1628
|
+
type: z73.literal("Typography"),
|
|
1583
1629
|
data: TypographyTokenData
|
|
1584
1630
|
});
|
|
1585
|
-
var StringTokenTypedData =
|
|
1586
|
-
type:
|
|
1631
|
+
var StringTokenTypedData = z73.object({
|
|
1632
|
+
type: z73.literal("String"),
|
|
1587
1633
|
data: StringTokenData
|
|
1588
1634
|
});
|
|
1589
|
-
var DimensionTokenTypedData =
|
|
1590
|
-
type:
|
|
1635
|
+
var DimensionTokenTypedData = z73.object({
|
|
1636
|
+
type: z73.literal("Dimension"),
|
|
1591
1637
|
data: DimensionTokenData
|
|
1592
1638
|
});
|
|
1593
|
-
var FontSizeTokenTypedData =
|
|
1594
|
-
type:
|
|
1639
|
+
var FontSizeTokenTypedData = z73.object({
|
|
1640
|
+
type: z73.literal("FontSize"),
|
|
1595
1641
|
data: FontSizeTokenData
|
|
1596
1642
|
});
|
|
1597
|
-
var FontFamilyTokenTypedData =
|
|
1598
|
-
type:
|
|
1643
|
+
var FontFamilyTokenTypedData = z73.object({
|
|
1644
|
+
type: z73.literal("FontFamily"),
|
|
1599
1645
|
data: FontFamilyTokenData
|
|
1600
1646
|
});
|
|
1601
|
-
var FontWeightTokenTypedData =
|
|
1602
|
-
type:
|
|
1647
|
+
var FontWeightTokenTypedData = z73.object({
|
|
1648
|
+
type: z73.literal("FontWeight"),
|
|
1603
1649
|
data: FontWeightTokenData
|
|
1604
1650
|
});
|
|
1605
|
-
var LetterSpacingTokenTypedData =
|
|
1606
|
-
type:
|
|
1651
|
+
var LetterSpacingTokenTypedData = z73.object({
|
|
1652
|
+
type: z73.literal("LetterSpacing"),
|
|
1607
1653
|
data: LetterSpacingTokenData
|
|
1608
1654
|
});
|
|
1609
|
-
var LineHeightTokenTypedData =
|
|
1610
|
-
type:
|
|
1655
|
+
var LineHeightTokenTypedData = z73.object({
|
|
1656
|
+
type: z73.literal("LineHeight"),
|
|
1611
1657
|
data: LineHeightTokenData
|
|
1612
1658
|
});
|
|
1613
|
-
var ParagraphSpacingTokenTypedData =
|
|
1614
|
-
type:
|
|
1659
|
+
var ParagraphSpacingTokenTypedData = z73.object({
|
|
1660
|
+
type: z73.literal("ParagraphSpacing"),
|
|
1615
1661
|
data: ParagraphSpacingTokenData
|
|
1616
1662
|
});
|
|
1617
|
-
var TextCaseTokenTypedData =
|
|
1618
|
-
type:
|
|
1663
|
+
var TextCaseTokenTypedData = z73.object({
|
|
1664
|
+
type: z73.literal("TextCase"),
|
|
1619
1665
|
data: TextCaseTokenData
|
|
1620
1666
|
});
|
|
1621
|
-
var TextDecorationTokenTypedData =
|
|
1622
|
-
type:
|
|
1667
|
+
var TextDecorationTokenTypedData = z73.object({
|
|
1668
|
+
type: z73.literal("TextDecoration"),
|
|
1623
1669
|
data: TextDecorationTokenData
|
|
1624
1670
|
});
|
|
1625
|
-
var BorderRadiusTokenTypedData =
|
|
1626
|
-
type:
|
|
1671
|
+
var BorderRadiusTokenTypedData = z73.object({
|
|
1672
|
+
type: z73.literal("BorderRadius"),
|
|
1627
1673
|
data: BorderRadiusTokenData
|
|
1628
1674
|
});
|
|
1629
|
-
var BorderWidthTokenTypedData =
|
|
1630
|
-
type:
|
|
1675
|
+
var BorderWidthTokenTypedData = z73.object({
|
|
1676
|
+
type: z73.literal("BorderWidth"),
|
|
1631
1677
|
data: BorderWidthTokenData
|
|
1632
1678
|
});
|
|
1633
|
-
var BorderTypedData =
|
|
1634
|
-
type:
|
|
1679
|
+
var BorderTypedData = z73.object({
|
|
1680
|
+
type: z73.literal("Border"),
|
|
1635
1681
|
data: BorderTokenData
|
|
1636
1682
|
});
|
|
1637
|
-
var ProductCopyTypedData =
|
|
1638
|
-
type:
|
|
1683
|
+
var ProductCopyTypedData = z73.object({
|
|
1684
|
+
type: z73.literal("ProductCopy"),
|
|
1639
1685
|
data: ProductCopyTokenData
|
|
1640
1686
|
});
|
|
1641
|
-
var SizeTypedData =
|
|
1642
|
-
type:
|
|
1687
|
+
var SizeTypedData = z73.object({
|
|
1688
|
+
type: z73.literal("Size"),
|
|
1643
1689
|
data: SizeTokenData
|
|
1644
1690
|
});
|
|
1645
|
-
var SpaceTypedData =
|
|
1646
|
-
type:
|
|
1691
|
+
var SpaceTypedData = z73.object({
|
|
1692
|
+
type: z73.literal("Space"),
|
|
1647
1693
|
data: SpaceTokenData
|
|
1648
1694
|
});
|
|
1649
|
-
var VisibilityTypedData =
|
|
1650
|
-
type:
|
|
1695
|
+
var VisibilityTypedData = z73.object({
|
|
1696
|
+
type: z73.literal("Visibility"),
|
|
1651
1697
|
data: VisibilityTokenData
|
|
1652
1698
|
});
|
|
1653
|
-
var ZIndexTypedData =
|
|
1654
|
-
type:
|
|
1699
|
+
var ZIndexTypedData = z73.object({
|
|
1700
|
+
type: z73.literal("ZIndex"),
|
|
1655
1701
|
data: ZIndexTokenData
|
|
1656
1702
|
});
|
|
1657
|
-
var DurationTypedData =
|
|
1658
|
-
type:
|
|
1703
|
+
var DurationTypedData = z73.object({
|
|
1704
|
+
type: z73.literal("Duration"),
|
|
1659
1705
|
data: DurationTokenData
|
|
1660
1706
|
});
|
|
1661
|
-
var FontTypedData =
|
|
1662
|
-
type:
|
|
1663
|
-
data:
|
|
1707
|
+
var FontTypedData = z73.object({
|
|
1708
|
+
type: z73.literal("Font"),
|
|
1709
|
+
data: z73.record(z73.any())
|
|
1664
1710
|
});
|
|
1665
|
-
var DesignTokenTypedData =
|
|
1711
|
+
var DesignTokenTypedData = z73.discriminatedUnion("type", [
|
|
1666
1712
|
BlurTokenTypedData,
|
|
1667
1713
|
BorderRadiusTokenTypedData,
|
|
1668
1714
|
BorderWidthTokenTypedData,
|
|
@@ -1712,72 +1758,72 @@ function designTokenTypeFilter(type) {
|
|
|
1712
1758
|
var ThemeOverrideOriginPart = DesignTokenOriginPart;
|
|
1713
1759
|
var ThemeOverrideOrigin = DesignTokenOrigin;
|
|
1714
1760
|
var ThemeOverride = DesignTokenTypedData.and(
|
|
1715
|
-
|
|
1716
|
-
tokenPersistentId:
|
|
1761
|
+
z74.object({
|
|
1762
|
+
tokenPersistentId: z74.string(),
|
|
1717
1763
|
origin: ThemeOverrideOrigin.optional().nullable().transform((v) => v ?? void 0)
|
|
1718
1764
|
})
|
|
1719
1765
|
);
|
|
1720
|
-
var ThemeElementData =
|
|
1721
|
-
value:
|
|
1722
|
-
overrides:
|
|
1766
|
+
var ThemeElementData = z74.object({
|
|
1767
|
+
value: z74.object({
|
|
1768
|
+
overrides: z74.array(ThemeOverride)
|
|
1723
1769
|
})
|
|
1724
1770
|
});
|
|
1725
|
-
var ThemeOriginPart =
|
|
1726
|
-
var ThemeOriginObject =
|
|
1727
|
-
id:
|
|
1728
|
-
name:
|
|
1771
|
+
var ThemeOriginPart = z74.object({});
|
|
1772
|
+
var ThemeOriginObject = z74.object({
|
|
1773
|
+
id: z74.string(),
|
|
1774
|
+
name: z74.string()
|
|
1729
1775
|
});
|
|
1730
|
-
var ThemeOriginSource =
|
|
1731
|
-
sourceId:
|
|
1732
|
-
sourceObjects:
|
|
1776
|
+
var ThemeOriginSource = z74.object({
|
|
1777
|
+
sourceId: z74.string(),
|
|
1778
|
+
sourceObjects: z74.array(ThemeOriginObject)
|
|
1733
1779
|
});
|
|
1734
|
-
var ThemeOrigin =
|
|
1735
|
-
sources:
|
|
1780
|
+
var ThemeOrigin = z74.object({
|
|
1781
|
+
sources: z74.array(ThemeOriginSource)
|
|
1736
1782
|
});
|
|
1737
1783
|
var Theme = DesignElementBase.extend(DesignElementBrandedPart.shape).extend({
|
|
1738
1784
|
origin: ThemeOrigin.optional(),
|
|
1739
|
-
overrides:
|
|
1785
|
+
overrides: z74.array(ThemeOverride)
|
|
1740
1786
|
});
|
|
1741
1787
|
|
|
1742
1788
|
// src/dsm/import/support/figma-files.ts
|
|
1743
|
-
import { z as
|
|
1744
|
-
var FigmaFileDownloadScope =
|
|
1745
|
-
styles:
|
|
1746
|
-
components:
|
|
1747
|
-
currentVersion:
|
|
1748
|
-
publishedVersion:
|
|
1749
|
-
downloadChunkSize:
|
|
1789
|
+
import { z as z75 } from "zod";
|
|
1790
|
+
var FigmaFileDownloadScope = z75.object({
|
|
1791
|
+
styles: z75.boolean(),
|
|
1792
|
+
components: z75.boolean(),
|
|
1793
|
+
currentVersion: z75.literal("__latest__").nullable(),
|
|
1794
|
+
publishedVersion: z75.string().nullable(),
|
|
1795
|
+
downloadChunkSize: z75.number().optional()
|
|
1750
1796
|
});
|
|
1751
|
-
var FigmaFileAccessData =
|
|
1752
|
-
accessToken:
|
|
1797
|
+
var FigmaFileAccessData = z75.object({
|
|
1798
|
+
accessToken: z75.string()
|
|
1753
1799
|
});
|
|
1754
1800
|
|
|
1755
1801
|
// src/dsm/import/support/import-context.ts
|
|
1756
|
-
import { z as
|
|
1757
|
-
var ImportFunctionInput =
|
|
1758
|
-
importJobId:
|
|
1759
|
-
importContextId:
|
|
1760
|
-
designSystemId:
|
|
1802
|
+
import { z as z76 } from "zod";
|
|
1803
|
+
var ImportFunctionInput = z76.object({
|
|
1804
|
+
importJobId: z76.string(),
|
|
1805
|
+
importContextId: z76.string(),
|
|
1806
|
+
designSystemId: z76.string().optional()
|
|
1761
1807
|
});
|
|
1762
|
-
var ImportedFigmaSourceData =
|
|
1763
|
-
sourceId:
|
|
1808
|
+
var ImportedFigmaSourceData = z76.object({
|
|
1809
|
+
sourceId: z76.string(),
|
|
1764
1810
|
figmaRemote: DataSourceFigmaRemote
|
|
1765
1811
|
});
|
|
1766
|
-
var FigmaImportBaseContext =
|
|
1767
|
-
designSystemId:
|
|
1812
|
+
var FigmaImportBaseContext = z76.object({
|
|
1813
|
+
designSystemId: z76.string(),
|
|
1768
1814
|
/**
|
|
1769
1815
|
* Data required for accessing Figma files. This should contain access data for all file ids
|
|
1770
1816
|
* mentioned in the `importedSourceDataBySourceId`
|
|
1771
1817
|
*
|
|
1772
1818
|
* fileId: file data
|
|
1773
1819
|
*/
|
|
1774
|
-
fileAccessByFileId:
|
|
1820
|
+
fileAccessByFileId: z76.record(FigmaFileAccessData),
|
|
1775
1821
|
/**
|
|
1776
1822
|
* Figma source data for which import was requested
|
|
1777
1823
|
*
|
|
1778
1824
|
* sourceId: source data
|
|
1779
1825
|
*/
|
|
1780
|
-
importedSourceDataBySourceId:
|
|
1826
|
+
importedSourceDataBySourceId: z76.record(ImportedFigmaSourceData)
|
|
1781
1827
|
});
|
|
1782
1828
|
var ChangedImportedFigmaSourceData = ImportedFigmaSourceData.extend({
|
|
1783
1829
|
importMetadata: DataSourceFigmaImportMetadata
|
|
@@ -1789,79 +1835,79 @@ var FigmaImportContextWithDownloadScopes = FigmaImportBaseContext.extend({
|
|
|
1789
1835
|
*
|
|
1790
1836
|
* File id -> file download scope
|
|
1791
1837
|
*/
|
|
1792
|
-
fileDownloadScopesByFileId:
|
|
1838
|
+
fileDownloadScopesByFileId: z76.record(FigmaFileDownloadScope),
|
|
1793
1839
|
/**
|
|
1794
1840
|
* Sources filtered down to the ones that have changed since last import and therefore need to be
|
|
1795
1841
|
* imported again.
|
|
1796
1842
|
*
|
|
1797
1843
|
* Source id -> import metadata
|
|
1798
1844
|
*/
|
|
1799
|
-
changedImportedSourceDataBySourceId:
|
|
1845
|
+
changedImportedSourceDataBySourceId: z76.record(ChangedImportedFigmaSourceData)
|
|
1800
1846
|
});
|
|
1801
1847
|
|
|
1802
1848
|
// src/dsm/import/support/import-model-collections.ts
|
|
1803
|
-
import { z as
|
|
1849
|
+
import { z as z84 } from "zod";
|
|
1804
1850
|
|
|
1805
1851
|
// src/dsm/import/image.ts
|
|
1806
|
-
import { z as
|
|
1807
|
-
var ImageImportModelType =
|
|
1808
|
-
var ImageImportModelBase =
|
|
1852
|
+
import { z as z77 } from "zod";
|
|
1853
|
+
var ImageImportModelType = z77.enum(["Url", "FigmaRender"]);
|
|
1854
|
+
var ImageImportModelBase = z77.object({
|
|
1809
1855
|
scope: AssetScope
|
|
1810
1856
|
});
|
|
1811
1857
|
var UrlImageImportModel = ImageImportModelBase.extend({
|
|
1812
|
-
type:
|
|
1813
|
-
url:
|
|
1814
|
-
originKey:
|
|
1815
|
-
extension:
|
|
1858
|
+
type: z77.literal(ImageImportModelType.enum.Url),
|
|
1859
|
+
url: z77.string(),
|
|
1860
|
+
originKey: z77.string(),
|
|
1861
|
+
extension: z77.enum(["png", "svg", "jpg"])
|
|
1816
1862
|
});
|
|
1817
|
-
var FigmaRenderFormat =
|
|
1863
|
+
var FigmaRenderFormat = z77.enum(["Svg", "Png"]);
|
|
1818
1864
|
var FigmaRenderBase = ImageImportModelBase.extend({
|
|
1819
|
-
type:
|
|
1820
|
-
fileId:
|
|
1821
|
-
fileVersionId:
|
|
1822
|
-
nodeId:
|
|
1823
|
-
originKey:
|
|
1865
|
+
type: z77.literal(ImageImportModelType.enum.FigmaRender),
|
|
1866
|
+
fileId: z77.string(),
|
|
1867
|
+
fileVersionId: z77.string().optional(),
|
|
1868
|
+
nodeId: z77.string(),
|
|
1869
|
+
originKey: z77.string()
|
|
1824
1870
|
});
|
|
1825
1871
|
var FigmaPngRenderImportModel = FigmaRenderBase.extend({
|
|
1826
|
-
format:
|
|
1827
|
-
scale:
|
|
1872
|
+
format: z77.literal(FigmaRenderFormat.enum.Png),
|
|
1873
|
+
scale: z77.number()
|
|
1828
1874
|
});
|
|
1829
1875
|
var FigmaSvgRenderImportModel = FigmaRenderBase.extend({
|
|
1830
|
-
format:
|
|
1876
|
+
format: z77.literal(FigmaRenderFormat.enum.Svg)
|
|
1831
1877
|
});
|
|
1832
|
-
var FigmaRenderImportModel =
|
|
1878
|
+
var FigmaRenderImportModel = z77.discriminatedUnion("format", [
|
|
1833
1879
|
FigmaPngRenderImportModel,
|
|
1834
1880
|
FigmaSvgRenderImportModel
|
|
1835
1881
|
]);
|
|
1836
|
-
var ImageImportModel =
|
|
1882
|
+
var ImageImportModel = z77.union([UrlImageImportModel, FigmaRenderImportModel]);
|
|
1837
1883
|
|
|
1838
1884
|
// src/dsm/import/component.ts
|
|
1839
|
-
import { z as
|
|
1885
|
+
import { z as z79 } from "zod";
|
|
1840
1886
|
|
|
1841
1887
|
// src/dsm/import/base.ts
|
|
1842
|
-
import { z as
|
|
1843
|
-
var ImportModelBase =
|
|
1844
|
-
id:
|
|
1888
|
+
import { z as z78 } from "zod";
|
|
1889
|
+
var ImportModelBase = z78.object({
|
|
1890
|
+
id: z78.string(),
|
|
1845
1891
|
meta: ObjectMeta,
|
|
1846
1892
|
origin: DesignElementOrigin,
|
|
1847
|
-
brandPersistentId:
|
|
1848
|
-
sortOrder:
|
|
1893
|
+
brandPersistentId: z78.string(),
|
|
1894
|
+
sortOrder: z78.number()
|
|
1849
1895
|
});
|
|
1850
1896
|
var ImportModelInputBase = ImportModelBase.omit({
|
|
1851
1897
|
brandPersistentId: true,
|
|
1852
1898
|
origin: true,
|
|
1853
1899
|
sortOrder: true
|
|
1854
1900
|
}).extend({
|
|
1855
|
-
originId:
|
|
1856
|
-
originMetadata:
|
|
1901
|
+
originId: z78.string(),
|
|
1902
|
+
originMetadata: z78.record(z78.any())
|
|
1857
1903
|
});
|
|
1858
1904
|
|
|
1859
1905
|
// src/dsm/import/component.ts
|
|
1860
|
-
var ComponentImportModelPart =
|
|
1906
|
+
var ComponentImportModelPart = z79.object({
|
|
1861
1907
|
thumbnail: ImageImportModel
|
|
1862
1908
|
});
|
|
1863
1909
|
var ComponentImportModel = ImportModelBase.extend(ComponentImportModelPart.shape).extend({
|
|
1864
|
-
isAsset:
|
|
1910
|
+
isAsset: z79.boolean(),
|
|
1865
1911
|
svg: FigmaSvgRenderImportModel.optional(),
|
|
1866
1912
|
origin: ComponentOrigin
|
|
1867
1913
|
});
|
|
@@ -1874,49 +1920,49 @@ var AssetImportModelInput = ImportModelInputBase.extend(ComponentImportModelPart
|
|
|
1874
1920
|
});
|
|
1875
1921
|
|
|
1876
1922
|
// src/dsm/import/theme.ts
|
|
1877
|
-
import { z as
|
|
1923
|
+
import { z as z80 } from "zod";
|
|
1878
1924
|
var ThemeOverrideImportModelBase = DesignTokenTypedData.and(
|
|
1879
|
-
|
|
1880
|
-
id:
|
|
1925
|
+
z80.object({
|
|
1926
|
+
id: z80.string(),
|
|
1881
1927
|
meta: ObjectMeta
|
|
1882
1928
|
})
|
|
1883
1929
|
);
|
|
1884
1930
|
var ThemeOverrideImportModel = ThemeOverrideImportModelBase.and(
|
|
1885
|
-
|
|
1931
|
+
z80.object({
|
|
1886
1932
|
origin: ThemeOverrideOrigin
|
|
1887
1933
|
})
|
|
1888
1934
|
);
|
|
1889
1935
|
var ThemeOverrideImportModelInput = ThemeOverrideImportModelBase.and(
|
|
1890
|
-
|
|
1891
|
-
originId:
|
|
1936
|
+
z80.object({
|
|
1937
|
+
originId: z80.string(),
|
|
1892
1938
|
originMetadata: ThemeOverrideOriginPart
|
|
1893
1939
|
})
|
|
1894
1940
|
);
|
|
1895
|
-
var ThemeImportModel =
|
|
1941
|
+
var ThemeImportModel = z80.object({
|
|
1896
1942
|
meta: ObjectMeta,
|
|
1897
|
-
brandPersistentId:
|
|
1943
|
+
brandPersistentId: z80.string(),
|
|
1898
1944
|
originSource: ThemeOriginSource,
|
|
1899
|
-
overrides:
|
|
1900
|
-
sortOrder:
|
|
1945
|
+
overrides: z80.array(ThemeOverrideImportModel),
|
|
1946
|
+
sortOrder: z80.number()
|
|
1901
1947
|
});
|
|
1902
|
-
var ThemeImportModelInput =
|
|
1948
|
+
var ThemeImportModelInput = z80.object({
|
|
1903
1949
|
meta: ObjectMeta,
|
|
1904
|
-
originObjects:
|
|
1905
|
-
overrides:
|
|
1950
|
+
originObjects: z80.array(ThemeOriginObject),
|
|
1951
|
+
overrides: z80.array(ThemeOverrideImportModelInput)
|
|
1906
1952
|
});
|
|
1907
|
-
var ThemeUpdateImportModel =
|
|
1908
|
-
themePersistentId:
|
|
1909
|
-
overrides:
|
|
1953
|
+
var ThemeUpdateImportModel = z80.object({
|
|
1954
|
+
themePersistentId: z80.string(),
|
|
1955
|
+
overrides: z80.array(ThemeOverrideImportModel)
|
|
1910
1956
|
});
|
|
1911
|
-
var ThemeUpdateImportModelInput =
|
|
1912
|
-
themePersistentId:
|
|
1913
|
-
overrides:
|
|
1957
|
+
var ThemeUpdateImportModelInput = z80.object({
|
|
1958
|
+
themePersistentId: z80.string(),
|
|
1959
|
+
overrides: z80.array(ThemeOverrideImportModelInput)
|
|
1914
1960
|
});
|
|
1915
1961
|
|
|
1916
1962
|
// src/dsm/import/tokens.ts
|
|
1917
|
-
import { z as
|
|
1918
|
-
var DesignTokenImportModelPart =
|
|
1919
|
-
collection:
|
|
1963
|
+
import { z as z81 } from "zod";
|
|
1964
|
+
var DesignTokenImportModelPart = z81.object({
|
|
1965
|
+
collection: z81.string().optional()
|
|
1920
1966
|
});
|
|
1921
1967
|
var DesignTokenImportModelBase = ImportModelBase.extend(DesignTokenImportModelPart.shape).extend({
|
|
1922
1968
|
origin: DesignTokenOrigin
|
|
@@ -1934,15 +1980,15 @@ function designTokenImportModelTypeFilter(type) {
|
|
|
1934
1980
|
}
|
|
1935
1981
|
|
|
1936
1982
|
// src/dsm/import/figma-frames.ts
|
|
1937
|
-
import { z as
|
|
1983
|
+
import { z as z82 } from "zod";
|
|
1938
1984
|
var FigmaFileStructureNodeImportModelBase = FigmaFileStructureNodeBase.extend({
|
|
1939
1985
|
image: FigmaPngRenderImportModel
|
|
1940
1986
|
});
|
|
1941
1987
|
var FigmaFileStructureNodeImportModel = FigmaFileStructureNodeImportModelBase.extend({
|
|
1942
|
-
children:
|
|
1988
|
+
children: z82.lazy(() => FigmaFileStructureNodeImportModel.array())
|
|
1943
1989
|
});
|
|
1944
|
-
var FigmaFileStructureImportModelPart =
|
|
1945
|
-
data:
|
|
1990
|
+
var FigmaFileStructureImportModelPart = z82.object({
|
|
1991
|
+
data: z82.object({
|
|
1946
1992
|
rootNode: FigmaFileStructureNodeImportModel,
|
|
1947
1993
|
assetsInFile: FigmaFileStructureStatistics
|
|
1948
1994
|
})
|
|
@@ -1953,7 +1999,7 @@ var FigmaFileStructureImportModel = ImportModelBase.extend(FigmaFileStructureImp
|
|
|
1953
1999
|
var FigmaFileStructureImportModelInput = ImportModelInputBase.extend(
|
|
1954
2000
|
FigmaFileStructureImportModelPart.shape
|
|
1955
2001
|
).extend({
|
|
1956
|
-
fileVersionId:
|
|
2002
|
+
fileVersionId: z82.string()
|
|
1957
2003
|
});
|
|
1958
2004
|
function figmaFileStructureImportModelToMap(root) {
|
|
1959
2005
|
const map = /* @__PURE__ */ new Map();
|
|
@@ -1967,30 +2013,30 @@ function recursiveFigmaFileStructureToMap2(node, map) {
|
|
|
1967
2013
|
}
|
|
1968
2014
|
|
|
1969
2015
|
// src/dsm/import/data-source.ts
|
|
1970
|
-
import { z as
|
|
1971
|
-
var DataSourceImportModel =
|
|
1972
|
-
id:
|
|
1973
|
-
fileName:
|
|
1974
|
-
thumbnailUrl:
|
|
2016
|
+
import { z as z83 } from "zod";
|
|
2017
|
+
var DataSourceImportModel = z83.object({
|
|
2018
|
+
id: z83.string(),
|
|
2019
|
+
fileName: z83.string().optional(),
|
|
2020
|
+
thumbnailUrl: z83.string().optional()
|
|
1975
2021
|
});
|
|
1976
2022
|
|
|
1977
2023
|
// src/dsm/import/support/import-model-collections.ts
|
|
1978
|
-
var ImportModelInputCollection =
|
|
2024
|
+
var ImportModelInputCollection = z84.object({
|
|
1979
2025
|
source: DataSourceImportModel,
|
|
1980
|
-
tokens:
|
|
1981
|
-
components:
|
|
1982
|
-
assets:
|
|
1983
|
-
themeUpdates:
|
|
1984
|
-
themes:
|
|
2026
|
+
tokens: z84.array(DesignTokenImportModelInput).default([]),
|
|
2027
|
+
components: z84.array(ComponentImportModelInput).default([]),
|
|
2028
|
+
assets: z84.array(AssetImportModelInput).default([]),
|
|
2029
|
+
themeUpdates: z84.array(ThemeUpdateImportModelInput).default([]),
|
|
2030
|
+
themes: z84.array(ThemeImportModelInput).default([]),
|
|
1985
2031
|
figmaFileStructure: FigmaFileStructureImportModelInput.optional()
|
|
1986
2032
|
});
|
|
1987
|
-
var ImportModelCollection =
|
|
1988
|
-
sources:
|
|
1989
|
-
tokens:
|
|
1990
|
-
components:
|
|
1991
|
-
themeUpdates:
|
|
1992
|
-
themes:
|
|
1993
|
-
figmaFileStructures:
|
|
2033
|
+
var ImportModelCollection = z84.object({
|
|
2034
|
+
sources: z84.array(DataSourceImportModel),
|
|
2035
|
+
tokens: z84.array(DesignTokenImportModel).default([]),
|
|
2036
|
+
components: z84.array(ComponentImportModel).default([]),
|
|
2037
|
+
themeUpdates: z84.array(ThemeUpdateImportModel).default([]),
|
|
2038
|
+
themes: z84.array(ThemeImportModel).default([]),
|
|
2039
|
+
figmaFileStructures: z84.array(FigmaFileStructureImportModel)
|
|
1994
2040
|
});
|
|
1995
2041
|
function addImportModelCollections(lhs, rhs) {
|
|
1996
2042
|
return {
|
|
@@ -2004,8 +2050,8 @@ function addImportModelCollections(lhs, rhs) {
|
|
|
2004
2050
|
}
|
|
2005
2051
|
|
|
2006
2052
|
// src/dsm/import/warning.ts
|
|
2007
|
-
import { z as
|
|
2008
|
-
var ImportWarningType =
|
|
2053
|
+
import { z as z85 } from "zod";
|
|
2054
|
+
var ImportWarningType = z85.enum([
|
|
2009
2055
|
"NoVersionFound",
|
|
2010
2056
|
"UnsupportedFill",
|
|
2011
2057
|
"UnsupportedStroke",
|
|
@@ -2019,27 +2065,27 @@ var ImportWarningType = z82.enum([
|
|
|
2019
2065
|
"DuplicateImportedStyleId",
|
|
2020
2066
|
"DuplicateImportedStylePath"
|
|
2021
2067
|
]);
|
|
2022
|
-
var ImportWarning =
|
|
2068
|
+
var ImportWarning = z85.object({
|
|
2023
2069
|
warningType: ImportWarningType,
|
|
2024
|
-
componentId:
|
|
2025
|
-
componentName:
|
|
2026
|
-
styleId:
|
|
2027
|
-
styleName:
|
|
2028
|
-
unsupportedStyleValueType:
|
|
2070
|
+
componentId: z85.string().optional(),
|
|
2071
|
+
componentName: z85.string().optional(),
|
|
2072
|
+
styleId: z85.string().optional(),
|
|
2073
|
+
styleName: z85.string().optional(),
|
|
2074
|
+
unsupportedStyleValueType: z85.string().optional()
|
|
2029
2075
|
});
|
|
2030
2076
|
|
|
2031
2077
|
// src/dsm/data-sources/import-summary.ts
|
|
2032
|
-
var FileStructureStats =
|
|
2078
|
+
var FileStructureStats = z86.object({
|
|
2033
2079
|
frames: zeroNumberByDefault2(),
|
|
2034
2080
|
components: zeroNumberByDefault2(),
|
|
2035
2081
|
componentSets: zeroNumberByDefault2()
|
|
2036
2082
|
});
|
|
2037
2083
|
var SourceImportSummaryByTokenTypeKey = DesignTokenType.or(
|
|
2038
2084
|
// Backward compatibility
|
|
2039
|
-
|
|
2085
|
+
z86.enum(["Measure", "Radius", "GenericToken", "Font", "Text"])
|
|
2040
2086
|
);
|
|
2041
|
-
var SourceImportSummaryByTokenType =
|
|
2042
|
-
var SourceImportTokenSummary =
|
|
2087
|
+
var SourceImportSummaryByTokenType = z86.record(SourceImportSummaryByTokenTypeKey, z86.number());
|
|
2088
|
+
var SourceImportTokenSummary = z86.object({
|
|
2043
2089
|
tokensCreated: zeroNumberByDefault2(),
|
|
2044
2090
|
tokensUpdated: zeroNumberByDefault2(),
|
|
2045
2091
|
tokensDeleted: zeroNumberByDefault2(),
|
|
@@ -2047,7 +2093,7 @@ var SourceImportTokenSummary = z83.object({
|
|
|
2047
2093
|
tokensUpdatedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {}),
|
|
2048
2094
|
tokensDeletedPerType: SourceImportSummaryByTokenType.nullish().transform((v) => v ?? {})
|
|
2049
2095
|
});
|
|
2050
|
-
var SourceImportComponentSummary =
|
|
2096
|
+
var SourceImportComponentSummary = z86.object({
|
|
2051
2097
|
componentsCreated: zeroNumberByDefault2(),
|
|
2052
2098
|
componentsUpdated: zeroNumberByDefault2(),
|
|
2053
2099
|
componentsDeleted: zeroNumberByDefault2(),
|
|
@@ -2055,68 +2101,68 @@ var SourceImportComponentSummary = z83.object({
|
|
|
2055
2101
|
componentAssetsUpdated: zeroNumberByDefault2(),
|
|
2056
2102
|
componentAssetsDeleted: zeroNumberByDefault2()
|
|
2057
2103
|
});
|
|
2058
|
-
var SourceImportFrameSummary =
|
|
2104
|
+
var SourceImportFrameSummary = z86.object({
|
|
2059
2105
|
assetsInFile: nullishToOptional(FileStructureStats.optional()),
|
|
2060
|
-
invalidReferencesCount: nullishToOptional(
|
|
2061
|
-
});
|
|
2062
|
-
var SourceImportSummary =
|
|
2063
|
-
sourceId: nullishToOptional(
|
|
2064
|
-
brandId: nullishToOptional(
|
|
2065
|
-
versionId: nullishToOptional(
|
|
2066
|
-
error: nullishToOptional(
|
|
2067
|
-
isFailed:
|
|
2068
|
-
warnings:
|
|
2106
|
+
invalidReferencesCount: nullishToOptional(z86.number().optional())
|
|
2107
|
+
});
|
|
2108
|
+
var SourceImportSummary = z86.object({
|
|
2109
|
+
sourceId: nullishToOptional(z86.string()),
|
|
2110
|
+
brandId: nullishToOptional(z86.string()),
|
|
2111
|
+
versionId: nullishToOptional(z86.string()),
|
|
2112
|
+
error: nullishToOptional(z86.any()),
|
|
2113
|
+
isFailed: z86.boolean(),
|
|
2114
|
+
warnings: z86.array(ImportWarning).nullish().transform((v) => v ?? []),
|
|
2069
2115
|
...SourceImportTokenSummary.shape,
|
|
2070
2116
|
...SourceImportComponentSummary.shape,
|
|
2071
2117
|
...FileStructureStats.shape
|
|
2072
2118
|
});
|
|
2073
2119
|
function zeroNumberByDefault2() {
|
|
2074
|
-
return
|
|
2120
|
+
return z86.number().nullish().transform((v) => v ?? 0);
|
|
2075
2121
|
}
|
|
2076
2122
|
|
|
2077
2123
|
// src/dsm/documentation/block-definitions/aux.ts
|
|
2078
|
-
import { z as
|
|
2079
|
-
var PageBlockDefinitionAppearance =
|
|
2080
|
-
isBordered:
|
|
2081
|
-
hasBackground:
|
|
2082
|
-
isEditorPresentationDifferent:
|
|
2124
|
+
import { z as z87 } from "zod";
|
|
2125
|
+
var PageBlockDefinitionAppearance = z87.object({
|
|
2126
|
+
isBordered: z87.boolean().optional(),
|
|
2127
|
+
hasBackground: z87.boolean().optional(),
|
|
2128
|
+
isEditorPresentationDifferent: z87.boolean().optional()
|
|
2083
2129
|
});
|
|
2084
2130
|
|
|
2085
2131
|
// src/dsm/documentation/block-definitions/definition.ts
|
|
2086
|
-
import { z as
|
|
2132
|
+
import { z as z90 } from "zod";
|
|
2087
2133
|
|
|
2088
2134
|
// src/dsm/documentation/block-definitions/item.ts
|
|
2089
|
-
import { z as
|
|
2135
|
+
import { z as z89 } from "zod";
|
|
2090
2136
|
|
|
2091
2137
|
// src/dsm/documentation/block-definitions/variant.ts
|
|
2092
|
-
import { z as
|
|
2093
|
-
var PageBlockDefinitionLayoutType =
|
|
2094
|
-
var PageBlockDefinitionLayoutGap =
|
|
2095
|
-
var PageBlockDefinitionLayoutAlign =
|
|
2096
|
-
var PageBlockDefinitionLayoutResizing =
|
|
2097
|
-
var PageBlockDefinitionLayoutBase =
|
|
2138
|
+
import { z as z88 } from "zod";
|
|
2139
|
+
var PageBlockDefinitionLayoutType = z88.enum(["Column", "Row"]);
|
|
2140
|
+
var PageBlockDefinitionLayoutGap = z88.enum(["Small", "Medium", "Large", "None"]);
|
|
2141
|
+
var PageBlockDefinitionLayoutAlign = z88.enum(["Start", "Center", "End"]);
|
|
2142
|
+
var PageBlockDefinitionLayoutResizing = z88.enum(["Fill", "Hug"]);
|
|
2143
|
+
var PageBlockDefinitionLayoutBase = z88.object({
|
|
2098
2144
|
type: PageBlockDefinitionLayoutType,
|
|
2099
2145
|
gap: PageBlockDefinitionLayoutGap.optional(),
|
|
2100
2146
|
columnAlign: PageBlockDefinitionLayoutAlign.optional(),
|
|
2101
2147
|
columnResizing: PageBlockDefinitionLayoutResizing.optional()
|
|
2102
2148
|
});
|
|
2103
2149
|
var PageBlockDefinitionLayout = PageBlockDefinitionLayoutBase.extend({
|
|
2104
|
-
children:
|
|
2105
|
-
});
|
|
2106
|
-
var PageBlockDefinitionVariant =
|
|
2107
|
-
id:
|
|
2108
|
-
name:
|
|
2109
|
-
image:
|
|
2110
|
-
description:
|
|
2111
|
-
documentationLink:
|
|
2150
|
+
children: z88.lazy(() => z88.array(PageBlockDefinitionLayout.or(z88.string())))
|
|
2151
|
+
});
|
|
2152
|
+
var PageBlockDefinitionVariant = z88.object({
|
|
2153
|
+
id: z88.string(),
|
|
2154
|
+
name: z88.string(),
|
|
2155
|
+
image: z88.string().optional(),
|
|
2156
|
+
description: z88.string().optional(),
|
|
2157
|
+
documentationLink: z88.string().optional(),
|
|
2112
2158
|
layout: PageBlockDefinitionLayout,
|
|
2113
|
-
maxColumns:
|
|
2114
|
-
defaultColumns:
|
|
2159
|
+
maxColumns: z88.number().optional(),
|
|
2160
|
+
defaultColumns: z88.number().optional(),
|
|
2115
2161
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2116
2162
|
});
|
|
2117
2163
|
|
|
2118
2164
|
// src/dsm/documentation/block-definitions/item.ts
|
|
2119
|
-
var PageBlockDefinitionPropertyType =
|
|
2165
|
+
var PageBlockDefinitionPropertyType = z89.enum([
|
|
2120
2166
|
"RichText",
|
|
2121
2167
|
"MultiRichText",
|
|
2122
2168
|
"Text",
|
|
@@ -2143,7 +2189,7 @@ var PageBlockDefinitionPropertyType = z86.enum([
|
|
|
2143
2189
|
"Storybook",
|
|
2144
2190
|
"Color"
|
|
2145
2191
|
]);
|
|
2146
|
-
var PageBlockDefinitionRichTextPropertyStyle =
|
|
2192
|
+
var PageBlockDefinitionRichTextPropertyStyle = z89.enum([
|
|
2147
2193
|
"Title1",
|
|
2148
2194
|
"Title2",
|
|
2149
2195
|
"Title3",
|
|
@@ -2153,8 +2199,8 @@ var PageBlockDefinitionRichTextPropertyStyle = z86.enum([
|
|
|
2153
2199
|
"Callout",
|
|
2154
2200
|
"Default"
|
|
2155
2201
|
]);
|
|
2156
|
-
var PageBlockDefinitionMultiRichTextPropertyStyle =
|
|
2157
|
-
var PageBlockDefinitionTextPropertyStyle =
|
|
2202
|
+
var PageBlockDefinitionMultiRichTextPropertyStyle = z89.enum(["OL", "UL", "Default"]);
|
|
2203
|
+
var PageBlockDefinitionTextPropertyStyle = z89.enum([
|
|
2158
2204
|
"Title1",
|
|
2159
2205
|
"Title2",
|
|
2160
2206
|
"Title3",
|
|
@@ -2167,79 +2213,79 @@ var PageBlockDefinitionTextPropertyStyle = z86.enum([
|
|
|
2167
2213
|
"SmallBold",
|
|
2168
2214
|
"SmallSemibold"
|
|
2169
2215
|
]);
|
|
2170
|
-
var PageBlockDefinitionTextPropertyColor =
|
|
2171
|
-
var PageBlockDefinitionBooleanPropertyStyle =
|
|
2172
|
-
var PageBlockDefinitionSingleSelectPropertyStyle =
|
|
2216
|
+
var PageBlockDefinitionTextPropertyColor = z89.enum(["Neutral", "NeutralFaded"]);
|
|
2217
|
+
var PageBlockDefinitionBooleanPropertyStyle = z89.enum(["SegmentedControl", "ToggleButton", "Checkbox"]);
|
|
2218
|
+
var PageBlockDefinitionSingleSelectPropertyStyle = z89.enum([
|
|
2173
2219
|
"SegmentedControl",
|
|
2174
2220
|
"ToggleButton",
|
|
2175
2221
|
"Select",
|
|
2176
2222
|
"Checkbox"
|
|
2177
2223
|
]);
|
|
2178
|
-
var PageBlockDefinitionMultiSelectPropertyStyle =
|
|
2179
|
-
var PageBlockDefinitionImageAspectRatio =
|
|
2180
|
-
var PageBlockDefinitionImageWidth =
|
|
2181
|
-
var PageBlockDefinitionSelectChoice =
|
|
2182
|
-
value:
|
|
2183
|
-
name:
|
|
2184
|
-
icon:
|
|
2185
|
-
});
|
|
2186
|
-
var PageBlockDefinitionUntypedPropertyOptions =
|
|
2187
|
-
var PageBlockDefinitionRichTextOptions =
|
|
2224
|
+
var PageBlockDefinitionMultiSelectPropertyStyle = z89.enum(["SegmentedControl", "Select", "Checkbox"]);
|
|
2225
|
+
var PageBlockDefinitionImageAspectRatio = z89.enum(["Auto", "Square", "Landscape", "Portrait", "Wide"]);
|
|
2226
|
+
var PageBlockDefinitionImageWidth = z89.enum(["Full", "Icon", "Small", "Medium", "Large", "Poster"]);
|
|
2227
|
+
var PageBlockDefinitionSelectChoice = z89.object({
|
|
2228
|
+
value: z89.string(),
|
|
2229
|
+
name: z89.string(),
|
|
2230
|
+
icon: z89.string().optional()
|
|
2231
|
+
});
|
|
2232
|
+
var PageBlockDefinitionUntypedPropertyOptions = z89.record(z89.any());
|
|
2233
|
+
var PageBlockDefinitionRichTextOptions = z89.object({
|
|
2188
2234
|
richTextStyle: PageBlockDefinitionRichTextPropertyStyle.optional()
|
|
2189
2235
|
});
|
|
2190
|
-
var PageBlockDefinitionMutiRichTextOptions =
|
|
2236
|
+
var PageBlockDefinitionMutiRichTextOptions = z89.object({
|
|
2191
2237
|
multiRichTextStyle: PageBlockDefinitionMultiRichTextPropertyStyle.optional()
|
|
2192
2238
|
});
|
|
2193
|
-
var PageBlockDefinitionTextOptions =
|
|
2194
|
-
placeholder:
|
|
2195
|
-
defaultValue:
|
|
2239
|
+
var PageBlockDefinitionTextOptions = z89.object({
|
|
2240
|
+
placeholder: z89.string().optional(),
|
|
2241
|
+
defaultValue: z89.string().optional(),
|
|
2196
2242
|
textStyle: PageBlockDefinitionTextPropertyStyle.optional(),
|
|
2197
2243
|
color: PageBlockDefinitionTextPropertyColor.optional()
|
|
2198
2244
|
});
|
|
2199
|
-
var PageBlockDefinitionSelectOptions =
|
|
2245
|
+
var PageBlockDefinitionSelectOptions = z89.object({
|
|
2200
2246
|
singleSelectStyle: PageBlockDefinitionSingleSelectPropertyStyle.optional(),
|
|
2201
|
-
defaultChoice:
|
|
2202
|
-
choices:
|
|
2247
|
+
defaultChoice: z89.string(),
|
|
2248
|
+
choices: z89.array(PageBlockDefinitionSelectChoice)
|
|
2203
2249
|
});
|
|
2204
|
-
var PageBlockDefinitionImageOptions =
|
|
2250
|
+
var PageBlockDefinitionImageOptions = z89.object({
|
|
2205
2251
|
width: PageBlockDefinitionImageWidth.optional(),
|
|
2206
2252
|
aspectRatio: PageBlockDefinitionImageAspectRatio.optional(),
|
|
2207
|
-
allowCaption:
|
|
2208
|
-
recommendation:
|
|
2253
|
+
allowCaption: z89.boolean().optional(),
|
|
2254
|
+
recommendation: z89.string().optional()
|
|
2209
2255
|
});
|
|
2210
|
-
var PageBlockDefinitionBooleanOptions =
|
|
2211
|
-
defaultvalue:
|
|
2256
|
+
var PageBlockDefinitionBooleanOptions = z89.object({
|
|
2257
|
+
defaultvalue: z89.boolean().optional(),
|
|
2212
2258
|
booleanStyle: PageBlockDefinitionBooleanPropertyStyle.optional()
|
|
2213
2259
|
});
|
|
2214
|
-
var PageBlockDefinitionNumberOptions =
|
|
2215
|
-
defaultValue:
|
|
2216
|
-
min:
|
|
2217
|
-
max:
|
|
2218
|
-
step:
|
|
2219
|
-
placeholder:
|
|
2260
|
+
var PageBlockDefinitionNumberOptions = z89.object({
|
|
2261
|
+
defaultValue: z89.number(),
|
|
2262
|
+
min: z89.number().optional(),
|
|
2263
|
+
max: z89.number().optional(),
|
|
2264
|
+
step: z89.number().optional(),
|
|
2265
|
+
placeholder: z89.string().optional()
|
|
2220
2266
|
});
|
|
2221
|
-
var PageBlockDefinitionComponentOptions =
|
|
2222
|
-
renderLayoutAs:
|
|
2223
|
-
allowPropertySelection:
|
|
2267
|
+
var PageBlockDefinitionComponentOptions = z89.object({
|
|
2268
|
+
renderLayoutAs: z89.enum(["List", "Table"]).optional(),
|
|
2269
|
+
allowPropertySelection: z89.boolean().optional()
|
|
2224
2270
|
});
|
|
2225
|
-
var PageBlockDefinitionProperty =
|
|
2226
|
-
id:
|
|
2227
|
-
name:
|
|
2271
|
+
var PageBlockDefinitionProperty = z89.object({
|
|
2272
|
+
id: z89.string(),
|
|
2273
|
+
name: z89.string(),
|
|
2228
2274
|
type: PageBlockDefinitionPropertyType,
|
|
2229
|
-
description:
|
|
2275
|
+
description: z89.string().optional(),
|
|
2230
2276
|
// TODO Docs
|
|
2231
2277
|
options: PageBlockDefinitionUntypedPropertyOptions.optional(),
|
|
2232
|
-
variantOptions:
|
|
2278
|
+
variantOptions: z89.record(PageBlockDefinitionUntypedPropertyOptions).optional()
|
|
2233
2279
|
});
|
|
2234
|
-
var PageBlockDefinitionItem =
|
|
2235
|
-
properties:
|
|
2280
|
+
var PageBlockDefinitionItem = z89.object({
|
|
2281
|
+
properties: z89.array(PageBlockDefinitionProperty),
|
|
2236
2282
|
appearance: PageBlockDefinitionAppearance.optional(),
|
|
2237
|
-
variants:
|
|
2238
|
-
defaultVariantKey:
|
|
2283
|
+
variants: z89.array(PageBlockDefinitionVariant),
|
|
2284
|
+
defaultVariantKey: z89.string()
|
|
2239
2285
|
});
|
|
2240
2286
|
|
|
2241
2287
|
// src/dsm/documentation/block-definitions/definition.ts
|
|
2242
|
-
var PageBlockCategory =
|
|
2288
|
+
var PageBlockCategory = z90.enum([
|
|
2243
2289
|
"Text",
|
|
2244
2290
|
"Layout",
|
|
2245
2291
|
"Media",
|
|
@@ -2253,194 +2299,194 @@ var PageBlockCategory = z87.enum([
|
|
|
2253
2299
|
"Data",
|
|
2254
2300
|
"Other"
|
|
2255
2301
|
]);
|
|
2256
|
-
var PageBlockBehaviorDataType =
|
|
2257
|
-
var PageBlockBehaviorSelectionType =
|
|
2258
|
-
var PageBlockDefinitionBehavior =
|
|
2302
|
+
var PageBlockBehaviorDataType = z90.enum(["Item", "Token", "Asset", "Component", "FigmaNode"]);
|
|
2303
|
+
var PageBlockBehaviorSelectionType = z90.enum(["Entity", "Group", "EntityAndGroup"]);
|
|
2304
|
+
var PageBlockDefinitionBehavior = z90.object({
|
|
2259
2305
|
dataType: PageBlockBehaviorDataType,
|
|
2260
|
-
items:
|
|
2261
|
-
numberOfItems:
|
|
2262
|
-
allowLinks:
|
|
2306
|
+
items: z90.object({
|
|
2307
|
+
numberOfItems: z90.number(),
|
|
2308
|
+
allowLinks: z90.boolean()
|
|
2263
2309
|
}).optional(),
|
|
2264
|
-
entities:
|
|
2310
|
+
entities: z90.object({
|
|
2265
2311
|
selectionType: PageBlockBehaviorSelectionType,
|
|
2266
|
-
maxSelected:
|
|
2312
|
+
maxSelected: z90.number()
|
|
2267
2313
|
}).optional()
|
|
2268
2314
|
});
|
|
2269
|
-
var PageBlockDefinitionOnboarding =
|
|
2270
|
-
helpText:
|
|
2271
|
-
documentationLink:
|
|
2315
|
+
var PageBlockDefinitionOnboarding = z90.object({
|
|
2316
|
+
helpText: z90.string(),
|
|
2317
|
+
documentationLink: z90.string().optional()
|
|
2272
2318
|
});
|
|
2273
|
-
var PageBlockDefinition =
|
|
2274
|
-
id:
|
|
2275
|
-
name:
|
|
2276
|
-
description:
|
|
2319
|
+
var PageBlockDefinition = z90.object({
|
|
2320
|
+
id: z90.string(),
|
|
2321
|
+
name: z90.string(),
|
|
2322
|
+
description: z90.string(),
|
|
2277
2323
|
category: PageBlockCategory,
|
|
2278
2324
|
icon: AssetValue.optional(),
|
|
2279
|
-
documentationLink:
|
|
2280
|
-
searchKeywords:
|
|
2325
|
+
documentationLink: z90.string().optional(),
|
|
2326
|
+
searchKeywords: z90.array(z90.string()).optional(),
|
|
2281
2327
|
item: PageBlockDefinitionItem,
|
|
2282
2328
|
behavior: PageBlockDefinitionBehavior,
|
|
2283
|
-
editorOptions:
|
|
2329
|
+
editorOptions: z90.object({
|
|
2284
2330
|
onboarding: PageBlockDefinitionOnboarding.optional()
|
|
2285
2331
|
}),
|
|
2286
2332
|
appearance: PageBlockDefinitionAppearance.optional()
|
|
2287
2333
|
});
|
|
2288
2334
|
|
|
2289
2335
|
// src/dsm/documentation/group.ts
|
|
2290
|
-
import { z as
|
|
2291
|
-
var DocumentationPageGroup =
|
|
2292
|
-
type:
|
|
2293
|
-
childType:
|
|
2294
|
-
id:
|
|
2295
|
-
persistentId:
|
|
2296
|
-
shortPersistentId:
|
|
2297
|
-
designSystemVersionId:
|
|
2298
|
-
parentPersistentId:
|
|
2299
|
-
sortOrder:
|
|
2300
|
-
title:
|
|
2301
|
-
slug:
|
|
2302
|
-
userSlug:
|
|
2303
|
-
createdAt:
|
|
2304
|
-
updatedAt:
|
|
2336
|
+
import { z as z91 } from "zod";
|
|
2337
|
+
var DocumentationPageGroup = z91.object({
|
|
2338
|
+
type: z91.literal("ElementGroup"),
|
|
2339
|
+
childType: z91.literal("DocumentationPage"),
|
|
2340
|
+
id: z91.string(),
|
|
2341
|
+
persistentId: z91.string(),
|
|
2342
|
+
shortPersistentId: z91.string(),
|
|
2343
|
+
designSystemVersionId: z91.string(),
|
|
2344
|
+
parentPersistentId: z91.string().nullish(),
|
|
2345
|
+
sortOrder: z91.number(),
|
|
2346
|
+
title: z91.string(),
|
|
2347
|
+
slug: z91.string(),
|
|
2348
|
+
userSlug: z91.string().nullish(),
|
|
2349
|
+
createdAt: z91.coerce.date(),
|
|
2350
|
+
updatedAt: z91.coerce.date()
|
|
2305
2351
|
});
|
|
2306
2352
|
|
|
2307
2353
|
// src/dsm/documentation/page.ts
|
|
2308
|
-
import { z as
|
|
2309
|
-
var DocumentationPage =
|
|
2310
|
-
type:
|
|
2311
|
-
id:
|
|
2312
|
-
persistentId:
|
|
2313
|
-
shortPersistentId:
|
|
2314
|
-
designSystemVersionId:
|
|
2315
|
-
parentPersistentId:
|
|
2316
|
-
sortOrder:
|
|
2317
|
-
title:
|
|
2318
|
-
slug:
|
|
2319
|
-
userSlug:
|
|
2320
|
-
createdAt:
|
|
2321
|
-
updatedAt:
|
|
2354
|
+
import { z as z92 } from "zod";
|
|
2355
|
+
var DocumentationPage = z92.object({
|
|
2356
|
+
type: z92.literal("DocumentationPage"),
|
|
2357
|
+
id: z92.string(),
|
|
2358
|
+
persistentId: z92.string(),
|
|
2359
|
+
shortPersistentId: z92.string(),
|
|
2360
|
+
designSystemVersionId: z92.string(),
|
|
2361
|
+
parentPersistentId: z92.string().nullish(),
|
|
2362
|
+
sortOrder: z92.number(),
|
|
2363
|
+
title: z92.string(),
|
|
2364
|
+
slug: z92.string(),
|
|
2365
|
+
userSlug: z92.string().nullish(),
|
|
2366
|
+
createdAt: z92.coerce.date(),
|
|
2367
|
+
updatedAt: z92.coerce.date()
|
|
2322
2368
|
});
|
|
2323
2369
|
|
|
2324
2370
|
// src/dsm/design-system.ts
|
|
2325
|
-
import { z as
|
|
2371
|
+
import { z as z102 } from "zod";
|
|
2326
2372
|
|
|
2327
2373
|
// src/workspace/npm-registry-settings.ts
|
|
2328
|
-
import { z as
|
|
2329
|
-
var NpmRegistryAuthType =
|
|
2374
|
+
import { z as z93 } from "zod";
|
|
2375
|
+
var NpmRegistryAuthType = z93.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
2330
2376
|
var registryTypesWithoutAzure = ["NPMJS", "GitHub", "Artifactory", "Custom"];
|
|
2331
|
-
var NpmRegistryType =
|
|
2332
|
-
var NpmRegistryTypeWithoutAzure =
|
|
2333
|
-
var NpmRegistryBasicAuthConfig =
|
|
2377
|
+
var NpmRegistryType = z93.enum([...registryTypesWithoutAzure, "AzureDevOps"]);
|
|
2378
|
+
var NpmRegistryTypeWithoutAzure = z93.enum(registryTypesWithoutAzure);
|
|
2379
|
+
var NpmRegistryBasicAuthConfig = z93.object({
|
|
2334
2380
|
registryType: NpmRegistryType,
|
|
2335
|
-
authType:
|
|
2336
|
-
username:
|
|
2337
|
-
password:
|
|
2381
|
+
authType: z93.literal(NpmRegistryAuthType.Enum.Basic),
|
|
2382
|
+
username: z93.string(),
|
|
2383
|
+
password: z93.string()
|
|
2338
2384
|
});
|
|
2339
|
-
var NpmRegistryBearerAuthConfig =
|
|
2385
|
+
var NpmRegistryBearerAuthConfig = z93.object({
|
|
2340
2386
|
registryType: NpmRegistryTypeWithoutAzure,
|
|
2341
|
-
authType:
|
|
2342
|
-
accessToken:
|
|
2387
|
+
authType: z93.literal(NpmRegistryAuthType.Enum.Bearer),
|
|
2388
|
+
accessToken: z93.string()
|
|
2343
2389
|
});
|
|
2344
|
-
var NpmRegistryNoAuthConfig =
|
|
2390
|
+
var NpmRegistryNoAuthConfig = z93.object({
|
|
2345
2391
|
registryType: NpmRegistryTypeWithoutAzure,
|
|
2346
|
-
authType:
|
|
2392
|
+
authType: z93.literal(NpmRegistryAuthType.Enum.None)
|
|
2347
2393
|
});
|
|
2348
|
-
var NpmRegistrCustomAuthConfig =
|
|
2394
|
+
var NpmRegistrCustomAuthConfig = z93.object({
|
|
2349
2395
|
registryType: NpmRegistryTypeWithoutAzure,
|
|
2350
|
-
authType:
|
|
2351
|
-
authHeaderName:
|
|
2352
|
-
authHeaderValue:
|
|
2396
|
+
authType: z93.literal(NpmRegistryAuthType.Enum.Custom),
|
|
2397
|
+
authHeaderName: z93.string(),
|
|
2398
|
+
authHeaderValue: z93.string()
|
|
2353
2399
|
});
|
|
2354
|
-
var NpmRegistryAuthConfig =
|
|
2400
|
+
var NpmRegistryAuthConfig = z93.discriminatedUnion("authType", [
|
|
2355
2401
|
NpmRegistryBasicAuthConfig,
|
|
2356
2402
|
NpmRegistryBearerAuthConfig,
|
|
2357
2403
|
NpmRegistryNoAuthConfig,
|
|
2358
2404
|
NpmRegistrCustomAuthConfig
|
|
2359
2405
|
]);
|
|
2360
|
-
var NpmRegistryConfigBase =
|
|
2361
|
-
enabledScopes:
|
|
2362
|
-
customRegistryUrl:
|
|
2363
|
-
bypassProxy:
|
|
2364
|
-
npmProxyRegistryConfigId:
|
|
2365
|
-
npmProxyVersion:
|
|
2406
|
+
var NpmRegistryConfigBase = z93.object({
|
|
2407
|
+
enabledScopes: z93.array(z93.string()),
|
|
2408
|
+
customRegistryUrl: z93.string().optional(),
|
|
2409
|
+
bypassProxy: z93.boolean().default(false),
|
|
2410
|
+
npmProxyRegistryConfigId: z93.string().optional(),
|
|
2411
|
+
npmProxyVersion: z93.number().optional()
|
|
2366
2412
|
});
|
|
2367
2413
|
var NpmRegistryConfig = NpmRegistryConfigBase.and(NpmRegistryAuthConfig);
|
|
2368
2414
|
|
|
2369
2415
|
// src/workspace/sso-provider.ts
|
|
2370
|
-
import { z as
|
|
2371
|
-
var SsoProvider =
|
|
2372
|
-
providerId:
|
|
2373
|
-
defaultAutoInviteValue:
|
|
2374
|
-
autoInviteDomains:
|
|
2375
|
-
skipDocsSupernovaLogin:
|
|
2376
|
-
areInvitesDisabled:
|
|
2377
|
-
isTestMode:
|
|
2378
|
-
emailDomains:
|
|
2379
|
-
metadataXml:
|
|
2416
|
+
import { z as z94 } from "zod";
|
|
2417
|
+
var SsoProvider = z94.object({
|
|
2418
|
+
providerId: z94.string(),
|
|
2419
|
+
defaultAutoInviteValue: z94.boolean(),
|
|
2420
|
+
autoInviteDomains: z94.record(z94.string(), z94.boolean()),
|
|
2421
|
+
skipDocsSupernovaLogin: z94.boolean(),
|
|
2422
|
+
areInvitesDisabled: z94.boolean(),
|
|
2423
|
+
isTestMode: z94.boolean(),
|
|
2424
|
+
emailDomains: z94.array(z94.string()),
|
|
2425
|
+
metadataXml: z94.string().nullish()
|
|
2380
2426
|
});
|
|
2381
2427
|
|
|
2382
2428
|
// src/workspace/user-invite.ts
|
|
2383
|
-
import { z as
|
|
2429
|
+
import { z as z96 } from "zod";
|
|
2384
2430
|
|
|
2385
2431
|
// src/workspace/workspace-role.ts
|
|
2386
|
-
import { z as
|
|
2387
|
-
var WorkspaceRoleSchema =
|
|
2432
|
+
import { z as z95 } from "zod";
|
|
2433
|
+
var WorkspaceRoleSchema = z95.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest"]);
|
|
2388
2434
|
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
2389
2435
|
|
|
2390
2436
|
// src/workspace/user-invite.ts
|
|
2391
2437
|
var MAX_MEMBERS_COUNT = 100;
|
|
2392
|
-
var UserInvite =
|
|
2393
|
-
email:
|
|
2438
|
+
var UserInvite = z96.object({
|
|
2439
|
+
email: z96.string().email().trim().transform((value) => value.toLowerCase()),
|
|
2394
2440
|
role: WorkspaceRoleSchema
|
|
2395
2441
|
});
|
|
2396
|
-
var UserInvites =
|
|
2442
|
+
var UserInvites = z96.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
2397
2443
|
|
|
2398
2444
|
// src/workspace/workspace-context.ts
|
|
2399
|
-
import { z as
|
|
2445
|
+
import { z as z98 } from "zod";
|
|
2400
2446
|
|
|
2401
2447
|
// src/workspace/workspace.ts
|
|
2402
|
-
import { z as
|
|
2403
|
-
var WorkspaceIpWhitelistEntry =
|
|
2404
|
-
isEnabled:
|
|
2405
|
-
name:
|
|
2406
|
-
range:
|
|
2407
|
-
});
|
|
2408
|
-
var WorkspaceIpSettings =
|
|
2409
|
-
isEnabledForCloud:
|
|
2410
|
-
isEnabledForDocs:
|
|
2411
|
-
entries:
|
|
2448
|
+
import { z as z97 } from "zod";
|
|
2449
|
+
var WorkspaceIpWhitelistEntry = z97.object({
|
|
2450
|
+
isEnabled: z97.boolean(),
|
|
2451
|
+
name: z97.string(),
|
|
2452
|
+
range: z97.string()
|
|
2453
|
+
});
|
|
2454
|
+
var WorkspaceIpSettings = z97.object({
|
|
2455
|
+
isEnabledForCloud: z97.boolean(),
|
|
2456
|
+
isEnabledForDocs: z97.boolean(),
|
|
2457
|
+
entries: z97.array(WorkspaceIpWhitelistEntry)
|
|
2412
2458
|
}).nullish();
|
|
2413
|
-
var WorkspaceProfile =
|
|
2414
|
-
name:
|
|
2415
|
-
handle:
|
|
2416
|
-
color:
|
|
2417
|
-
avatar:
|
|
2459
|
+
var WorkspaceProfile = z97.object({
|
|
2460
|
+
name: z97.string(),
|
|
2461
|
+
handle: z97.string(),
|
|
2462
|
+
color: z97.string(),
|
|
2463
|
+
avatar: z97.string().optional(),
|
|
2418
2464
|
billingDetails: BillingDetails.optional()
|
|
2419
2465
|
});
|
|
2420
|
-
var Workspace =
|
|
2421
|
-
id:
|
|
2466
|
+
var Workspace = z97.object({
|
|
2467
|
+
id: z97.string(),
|
|
2422
2468
|
profile: WorkspaceProfile,
|
|
2423
2469
|
subscription: Subscription,
|
|
2424
2470
|
ipWhitelist: WorkspaceIpSettings,
|
|
2425
2471
|
sso: SsoProvider.nullish(),
|
|
2426
|
-
npmRegistrySettings:
|
|
2427
|
-
designSystems:
|
|
2472
|
+
npmRegistrySettings: z97.unknown().optional(),
|
|
2473
|
+
designSystems: z97.array(DesignSystem).nullish()
|
|
2428
2474
|
});
|
|
2429
|
-
var WorkspaceWithDesignSystems =
|
|
2475
|
+
var WorkspaceWithDesignSystems = z97.object({
|
|
2430
2476
|
workspace: Workspace,
|
|
2431
|
-
designSystems:
|
|
2477
|
+
designSystems: z97.array(DesignSystem)
|
|
2432
2478
|
});
|
|
2433
2479
|
|
|
2434
2480
|
// src/workspace/workspace-context.ts
|
|
2435
|
-
var WorkspaceContext =
|
|
2436
|
-
workspaceId:
|
|
2481
|
+
var WorkspaceContext = z98.object({
|
|
2482
|
+
workspaceId: z98.string(),
|
|
2437
2483
|
product: ProductCodeSchema,
|
|
2438
2484
|
ipWhitelist: WorkspaceIpSettings,
|
|
2439
|
-
publicDesignSystem:
|
|
2485
|
+
publicDesignSystem: z98.boolean().optional()
|
|
2440
2486
|
});
|
|
2441
2487
|
|
|
2442
2488
|
// src/workspace/workspace-create.ts
|
|
2443
|
-
import { z as
|
|
2489
|
+
import { z as z99 } from "zod";
|
|
2444
2490
|
|
|
2445
2491
|
// src/utils/validation.ts
|
|
2446
2492
|
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
@@ -2450,111 +2496,111 @@ var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
|
2450
2496
|
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
2451
2497
|
var HANDLE_MIN_LENGTH = 2;
|
|
2452
2498
|
var HANDLE_MAX_LENGTH = 64;
|
|
2453
|
-
var CreateWorkspaceInput =
|
|
2454
|
-
name:
|
|
2499
|
+
var CreateWorkspaceInput = z99.object({
|
|
2500
|
+
name: z99.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
2455
2501
|
product: ProductCodeSchema,
|
|
2456
|
-
priceId:
|
|
2457
|
-
billingEmail:
|
|
2458
|
-
handle:
|
|
2502
|
+
priceId: z99.string(),
|
|
2503
|
+
billingEmail: z99.string().email().optional(),
|
|
2504
|
+
handle: z99.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => value?.length > 0).optional(),
|
|
2459
2505
|
invites: UserInvites.optional(),
|
|
2460
|
-
promoCode:
|
|
2506
|
+
promoCode: z99.string().optional()
|
|
2461
2507
|
});
|
|
2462
2508
|
|
|
2463
2509
|
// src/workspace/workspace-invitations.ts
|
|
2464
|
-
import { z as
|
|
2465
|
-
var WorkspaceInvitation =
|
|
2466
|
-
id:
|
|
2467
|
-
email:
|
|
2468
|
-
createdAt:
|
|
2469
|
-
resentAt:
|
|
2470
|
-
role:
|
|
2471
|
-
workspaceId:
|
|
2472
|
-
invitedBy:
|
|
2510
|
+
import { z as z100 } from "zod";
|
|
2511
|
+
var WorkspaceInvitation = z100.object({
|
|
2512
|
+
id: z100.string(),
|
|
2513
|
+
email: z100.string().email(),
|
|
2514
|
+
createdAt: z100.coerce.date(),
|
|
2515
|
+
resentAt: z100.coerce.date().nullish(),
|
|
2516
|
+
role: z100.nativeEnum(WorkspaceRole),
|
|
2517
|
+
workspaceId: z100.string(),
|
|
2518
|
+
invitedBy: z100.string()
|
|
2473
2519
|
});
|
|
2474
2520
|
|
|
2475
2521
|
// src/workspace/workspace-membership.ts
|
|
2476
|
-
import { z as
|
|
2477
|
-
var WorkspaceMembership =
|
|
2478
|
-
id:
|
|
2479
|
-
userId:
|
|
2480
|
-
workspaceId:
|
|
2481
|
-
workspaceRole:
|
|
2482
|
-
});
|
|
2483
|
-
var UpdateMembershipRolesInput =
|
|
2484
|
-
members:
|
|
2485
|
-
|
|
2486
|
-
userId:
|
|
2487
|
-
role:
|
|
2522
|
+
import { z as z101 } from "zod";
|
|
2523
|
+
var WorkspaceMembership = z101.object({
|
|
2524
|
+
id: z101.string(),
|
|
2525
|
+
userId: z101.string(),
|
|
2526
|
+
workspaceId: z101.string(),
|
|
2527
|
+
workspaceRole: z101.nativeEnum(WorkspaceRole)
|
|
2528
|
+
});
|
|
2529
|
+
var UpdateMembershipRolesInput = z101.object({
|
|
2530
|
+
members: z101.array(
|
|
2531
|
+
z101.object({
|
|
2532
|
+
userId: z101.string(),
|
|
2533
|
+
role: z101.nativeEnum(WorkspaceRole)
|
|
2488
2534
|
})
|
|
2489
2535
|
)
|
|
2490
2536
|
});
|
|
2491
2537
|
|
|
2492
2538
|
// src/dsm/design-system.ts
|
|
2493
|
-
var DesignSystemSwitcher =
|
|
2494
|
-
isEnabled:
|
|
2495
|
-
designSystemIds:
|
|
2496
|
-
});
|
|
2497
|
-
var DesignSystem =
|
|
2498
|
-
id:
|
|
2499
|
-
workspaceId:
|
|
2500
|
-
name:
|
|
2501
|
-
description:
|
|
2502
|
-
docExporterId: nullishToOptional(
|
|
2503
|
-
docSlug:
|
|
2504
|
-
docUserSlug: nullishToOptional(
|
|
2505
|
-
docSlugDeprecated:
|
|
2506
|
-
isPublic:
|
|
2507
|
-
isMultibrand:
|
|
2508
|
-
docViewUrl: nullishToOptional(
|
|
2509
|
-
basePrefixes:
|
|
2539
|
+
var DesignSystemSwitcher = z102.object({
|
|
2540
|
+
isEnabled: z102.boolean(),
|
|
2541
|
+
designSystemIds: z102.array(z102.string())
|
|
2542
|
+
});
|
|
2543
|
+
var DesignSystem = z102.object({
|
|
2544
|
+
id: z102.string(),
|
|
2545
|
+
workspaceId: z102.string(),
|
|
2546
|
+
name: z102.string(),
|
|
2547
|
+
description: z102.string(),
|
|
2548
|
+
docExporterId: nullishToOptional(z102.string()),
|
|
2549
|
+
docSlug: z102.string(),
|
|
2550
|
+
docUserSlug: nullishToOptional(z102.string()),
|
|
2551
|
+
docSlugDeprecated: z102.string(),
|
|
2552
|
+
isPublic: z102.boolean(),
|
|
2553
|
+
isMultibrand: z102.boolean(),
|
|
2554
|
+
docViewUrl: nullishToOptional(z102.string()),
|
|
2555
|
+
basePrefixes: z102.array(z102.string()),
|
|
2510
2556
|
designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
|
|
2511
|
-
createdAt:
|
|
2512
|
-
updatedAt:
|
|
2557
|
+
createdAt: z102.coerce.date(),
|
|
2558
|
+
updatedAt: z102.coerce.date()
|
|
2513
2559
|
});
|
|
2514
|
-
var DesignSystemWithWorkspace =
|
|
2560
|
+
var DesignSystemWithWorkspace = z102.object({
|
|
2515
2561
|
designSystem: DesignSystem,
|
|
2516
2562
|
workspace: Workspace
|
|
2517
2563
|
});
|
|
2518
2564
|
|
|
2519
2565
|
// src/dsm/desing-system-create.ts
|
|
2520
|
-
import { z as
|
|
2566
|
+
import { z as z103 } from "zod";
|
|
2521
2567
|
var DS_NAME_MIN_LENGTH = 2;
|
|
2522
2568
|
var DS_NAME_MAX_LENGTH = 64;
|
|
2523
2569
|
var DS_DESC_MIN_LENGTH = 2;
|
|
2524
2570
|
var DS_DESC_MAX_LENGTH = 64;
|
|
2525
|
-
var DesignSystemCreateInputMetadata =
|
|
2526
|
-
name:
|
|
2527
|
-
description:
|
|
2571
|
+
var DesignSystemCreateInputMetadata = z103.object({
|
|
2572
|
+
name: z103.string().min(DS_NAME_MIN_LENGTH).max(DS_NAME_MAX_LENGTH).trim(),
|
|
2573
|
+
description: z103.string().min(DS_DESC_MIN_LENGTH).max(DS_DESC_MAX_LENGTH).trim()
|
|
2528
2574
|
});
|
|
2529
|
-
var DesignSystemCreateInput =
|
|
2575
|
+
var DesignSystemCreateInput = z103.object({
|
|
2530
2576
|
meta: DesignSystemCreateInputMetadata,
|
|
2531
|
-
workspaceId:
|
|
2532
|
-
isPublic:
|
|
2533
|
-
basePrefixes:
|
|
2534
|
-
docUserSlug:
|
|
2535
|
-
source:
|
|
2577
|
+
workspaceId: z103.string(),
|
|
2578
|
+
isPublic: z103.boolean().optional(),
|
|
2579
|
+
basePrefixes: z103.array(z103.string()).optional(),
|
|
2580
|
+
docUserSlug: z103.string().nullish().optional(),
|
|
2581
|
+
source: z103.array(z103.string()).optional()
|
|
2536
2582
|
});
|
|
2537
2583
|
|
|
2538
2584
|
// src/dsm/desing-system-update.ts
|
|
2539
|
-
import { z as
|
|
2585
|
+
import { z as z104 } from "zod";
|
|
2540
2586
|
var DS_NAME_MIN_LENGTH2 = 2;
|
|
2541
2587
|
var DS_NAME_MAX_LENGTH2 = 64;
|
|
2542
2588
|
var DS_DESC_MIN_LENGTH2 = 2;
|
|
2543
2589
|
var DS_DESC_MAX_LENGTH2 = 64;
|
|
2544
|
-
var DesignSystemUpdateInputMetadata =
|
|
2545
|
-
name:
|
|
2546
|
-
description:
|
|
2590
|
+
var DesignSystemUpdateInputMetadata = z104.object({
|
|
2591
|
+
name: z104.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2592
|
+
description: z104.string().min(DS_DESC_MIN_LENGTH2).max(DS_DESC_MAX_LENGTH2).trim().optional()
|
|
2547
2593
|
});
|
|
2548
|
-
var DesignSystemUpdateInput =
|
|
2594
|
+
var DesignSystemUpdateInput = z104.object({
|
|
2549
2595
|
meta: DesignSystemUpdateInputMetadata.optional(),
|
|
2550
|
-
workspaceId:
|
|
2551
|
-
isPublic:
|
|
2552
|
-
basePrefixes:
|
|
2553
|
-
docUserSlug:
|
|
2554
|
-
source:
|
|
2555
|
-
name:
|
|
2556
|
-
description:
|
|
2557
|
-
docExporterId:
|
|
2596
|
+
workspaceId: z104.string().optional(),
|
|
2597
|
+
isPublic: z104.boolean().optional(),
|
|
2598
|
+
basePrefixes: z104.array(z104.string()).optional(),
|
|
2599
|
+
docUserSlug: z104.string().nullish().optional(),
|
|
2600
|
+
source: z104.array(z104.string()).optional(),
|
|
2601
|
+
name: z104.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2602
|
+
description: z104.string().min(DS_DESC_MIN_LENGTH2).max(DS_DESC_MAX_LENGTH2).trim().optional(),
|
|
2603
|
+
docExporterId: z104.string().optional()
|
|
2558
2604
|
});
|
|
2559
2605
|
|
|
2560
2606
|
// src/dsm/published-doc-page.ts
|
|
@@ -2566,54 +2612,54 @@ function tryParseShortPersistentId(url = "/") {
|
|
|
2566
2612
|
}
|
|
2567
2613
|
|
|
2568
2614
|
// src/dsm/published-doc.ts
|
|
2569
|
-
import { z as
|
|
2615
|
+
import { z as z105 } from "zod";
|
|
2570
2616
|
var publishedDocEnvironments = ["Live", "Preview"];
|
|
2571
|
-
var PublishedDocEnvironment =
|
|
2572
|
-
var PublishedDocsChecksums =
|
|
2573
|
-
var PublishedDocRoutingVersion =
|
|
2574
|
-
var PublishedDoc =
|
|
2575
|
-
id:
|
|
2576
|
-
designSystemVersionId:
|
|
2577
|
-
createdAt:
|
|
2578
|
-
updatedAt:
|
|
2579
|
-
lastPublishedAt:
|
|
2580
|
-
isDefault:
|
|
2581
|
-
isPublic:
|
|
2617
|
+
var PublishedDocEnvironment = z105.enum(publishedDocEnvironments);
|
|
2618
|
+
var PublishedDocsChecksums = z105.record(z105.string());
|
|
2619
|
+
var PublishedDocRoutingVersion = z105.enum(["1", "2"]);
|
|
2620
|
+
var PublishedDoc = z105.object({
|
|
2621
|
+
id: z105.string(),
|
|
2622
|
+
designSystemVersionId: z105.string(),
|
|
2623
|
+
createdAt: z105.coerce.date(),
|
|
2624
|
+
updatedAt: z105.coerce.date(),
|
|
2625
|
+
lastPublishedAt: z105.coerce.date(),
|
|
2626
|
+
isDefault: z105.boolean(),
|
|
2627
|
+
isPublic: z105.boolean(),
|
|
2582
2628
|
environment: PublishedDocEnvironment,
|
|
2583
2629
|
checksums: PublishedDocsChecksums,
|
|
2584
|
-
storagePath:
|
|
2585
|
-
wasMigrated:
|
|
2630
|
+
storagePath: z105.string(),
|
|
2631
|
+
wasMigrated: z105.boolean(),
|
|
2586
2632
|
routingVersion: PublishedDocRoutingVersion,
|
|
2587
|
-
usesLocalizations:
|
|
2588
|
-
wasPublishedWithLocalizations:
|
|
2633
|
+
usesLocalizations: z105.boolean(),
|
|
2634
|
+
wasPublishedWithLocalizations: z105.boolean()
|
|
2589
2635
|
});
|
|
2590
2636
|
|
|
2591
2637
|
// src/codegen/export-jobs.ts
|
|
2592
|
-
import { z as
|
|
2593
|
-
var ExporterJobDestination =
|
|
2594
|
-
var ExporterJobStatus =
|
|
2595
|
-
var ExporterJobLogEntryType =
|
|
2596
|
-
var ExporterJobLogEntry =
|
|
2597
|
-
id:
|
|
2598
|
-
time:
|
|
2638
|
+
import { z as z106 } from "zod";
|
|
2639
|
+
var ExporterJobDestination = z106.enum(["s3", "webhookUrl", "github", "documentation", "azure", "gitlab"]);
|
|
2640
|
+
var ExporterJobStatus = z106.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
2641
|
+
var ExporterJobLogEntryType = z106.enum(["success", "info", "warning", "error", "user"]);
|
|
2642
|
+
var ExporterJobLogEntry = z106.object({
|
|
2643
|
+
id: z106.string().optional(),
|
|
2644
|
+
time: z106.coerce.date(),
|
|
2599
2645
|
type: ExporterJobLogEntryType,
|
|
2600
|
-
message:
|
|
2646
|
+
message: z106.string()
|
|
2601
2647
|
});
|
|
2602
|
-
var ExporterJobResultPullRequestDestination =
|
|
2603
|
-
pullRequestUrl:
|
|
2648
|
+
var ExporterJobResultPullRequestDestination = z106.object({
|
|
2649
|
+
pullRequestUrl: z106.string()
|
|
2604
2650
|
});
|
|
2605
|
-
var ExporterJobResultS3Destination =
|
|
2606
|
-
bucket:
|
|
2607
|
-
urlPrefix:
|
|
2608
|
-
path:
|
|
2609
|
-
files:
|
|
2651
|
+
var ExporterJobResultS3Destination = z106.object({
|
|
2652
|
+
bucket: z106.string(),
|
|
2653
|
+
urlPrefix: z106.string().optional(),
|
|
2654
|
+
path: z106.string(),
|
|
2655
|
+
files: z106.array(z106.string())
|
|
2610
2656
|
});
|
|
2611
|
-
var ExporterJobResultDocsDestination =
|
|
2612
|
-
url:
|
|
2657
|
+
var ExporterJobResultDocsDestination = z106.object({
|
|
2658
|
+
url: z106.string()
|
|
2613
2659
|
});
|
|
2614
|
-
var ExporterJobResult =
|
|
2615
|
-
error:
|
|
2616
|
-
logs:
|
|
2660
|
+
var ExporterJobResult = z106.object({
|
|
2661
|
+
error: z106.string().optional(),
|
|
2662
|
+
logs: z106.array(ExporterJobLogEntry).optional(),
|
|
2617
2663
|
s3: ExporterJobResultS3Destination.optional(),
|
|
2618
2664
|
github: ExporterJobResultPullRequestDestination.optional(),
|
|
2619
2665
|
azure: ExporterJobResultPullRequestDestination.optional(),
|
|
@@ -2621,68 +2667,68 @@ var ExporterJobResult = z103.object({
|
|
|
2621
2667
|
bitbucket: ExporterJobResultPullRequestDestination.optional(),
|
|
2622
2668
|
sndocs: ExporterJobResultDocsDestination.optional()
|
|
2623
2669
|
});
|
|
2624
|
-
var ExporterDestinationSnDocs =
|
|
2670
|
+
var ExporterDestinationSnDocs = z106.object({
|
|
2625
2671
|
environment: PublishedDocEnvironment
|
|
2626
2672
|
});
|
|
2627
|
-
var ExporterDestinationS3 =
|
|
2628
|
-
var ExporterDestinationGithub =
|
|
2629
|
-
connectionId:
|
|
2630
|
-
url:
|
|
2631
|
-
branch:
|
|
2632
|
-
relativePath:
|
|
2673
|
+
var ExporterDestinationS3 = z106.object({});
|
|
2674
|
+
var ExporterDestinationGithub = z106.object({
|
|
2675
|
+
connectionId: z106.string(),
|
|
2676
|
+
url: z106.string(),
|
|
2677
|
+
branch: z106.string(),
|
|
2678
|
+
relativePath: z106.string(),
|
|
2633
2679
|
// +
|
|
2634
|
-
userId:
|
|
2635
|
-
});
|
|
2636
|
-
var ExporterDestinationAzure =
|
|
2637
|
-
connectionId:
|
|
2638
|
-
organizationId:
|
|
2639
|
-
projectId:
|
|
2640
|
-
repositoryId:
|
|
2641
|
-
branch:
|
|
2642
|
-
relativePath:
|
|
2680
|
+
userId: z106.coerce.string()
|
|
2681
|
+
});
|
|
2682
|
+
var ExporterDestinationAzure = z106.object({
|
|
2683
|
+
connectionId: z106.string(),
|
|
2684
|
+
organizationId: z106.string(),
|
|
2685
|
+
projectId: z106.string(),
|
|
2686
|
+
repositoryId: z106.string(),
|
|
2687
|
+
branch: z106.string(),
|
|
2688
|
+
relativePath: z106.string(),
|
|
2643
2689
|
// +
|
|
2644
|
-
userId:
|
|
2645
|
-
url:
|
|
2646
|
-
});
|
|
2647
|
-
var ExporterDestinationGitlab =
|
|
2648
|
-
connectionId:
|
|
2649
|
-
projectId:
|
|
2650
|
-
branch:
|
|
2651
|
-
relativePath:
|
|
2690
|
+
userId: z106.coerce.string(),
|
|
2691
|
+
url: z106.string()
|
|
2692
|
+
});
|
|
2693
|
+
var ExporterDestinationGitlab = z106.object({
|
|
2694
|
+
connectionId: z106.string(),
|
|
2695
|
+
projectId: z106.string(),
|
|
2696
|
+
branch: z106.string(),
|
|
2697
|
+
relativePath: z106.string(),
|
|
2652
2698
|
// +
|
|
2653
|
-
userId:
|
|
2654
|
-
url:
|
|
2699
|
+
userId: z106.coerce.string(),
|
|
2700
|
+
url: z106.string()
|
|
2655
2701
|
});
|
|
2656
2702
|
var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
|
|
2657
2703
|
var BITBUCKET_MAX_LENGTH = 64;
|
|
2658
|
-
var ExporterDestinationBitbucket =
|
|
2659
|
-
connectionId:
|
|
2660
|
-
workspaceSlug:
|
|
2661
|
-
projectKey:
|
|
2662
|
-
repoSlug:
|
|
2663
|
-
branch:
|
|
2664
|
-
relativePath:
|
|
2704
|
+
var ExporterDestinationBitbucket = z106.object({
|
|
2705
|
+
connectionId: z106.string(),
|
|
2706
|
+
workspaceSlug: z106.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2707
|
+
projectKey: z106.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2708
|
+
repoSlug: z106.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2709
|
+
branch: z106.string(),
|
|
2710
|
+
relativePath: z106.string(),
|
|
2665
2711
|
// +
|
|
2666
|
-
userId:
|
|
2667
|
-
url:
|
|
2668
|
-
});
|
|
2669
|
-
var ExporterJob =
|
|
2670
|
-
id:
|
|
2671
|
-
createdAt:
|
|
2672
|
-
finishedAt:
|
|
2673
|
-
designSystemId:
|
|
2674
|
-
designSystemVersionId:
|
|
2675
|
-
workspaceId:
|
|
2676
|
-
scheduleId:
|
|
2677
|
-
exporterId:
|
|
2678
|
-
brandId:
|
|
2679
|
-
themeId:
|
|
2680
|
-
estimatedExecutionTime:
|
|
2712
|
+
userId: z106.coerce.string(),
|
|
2713
|
+
url: z106.string()
|
|
2714
|
+
});
|
|
2715
|
+
var ExporterJob = z106.object({
|
|
2716
|
+
id: z106.coerce.string(),
|
|
2717
|
+
createdAt: z106.coerce.date(),
|
|
2718
|
+
finishedAt: z106.coerce.date().optional(),
|
|
2719
|
+
designSystemId: z106.coerce.string(),
|
|
2720
|
+
designSystemVersionId: z106.coerce.string(),
|
|
2721
|
+
workspaceId: z106.coerce.string(),
|
|
2722
|
+
scheduleId: z106.coerce.string().nullish(),
|
|
2723
|
+
exporterId: z106.coerce.string(),
|
|
2724
|
+
brandId: z106.coerce.string().optional(),
|
|
2725
|
+
themeId: z106.coerce.string().optional(),
|
|
2726
|
+
estimatedExecutionTime: z106.number().optional(),
|
|
2681
2727
|
status: ExporterJobStatus,
|
|
2682
2728
|
result: ExporterJobResult.optional(),
|
|
2683
|
-
createdByUserId:
|
|
2729
|
+
createdByUserId: z106.string().optional(),
|
|
2684
2730
|
// CodegenDestinationsModel
|
|
2685
|
-
webhookUrl:
|
|
2731
|
+
webhookUrl: z106.string().optional(),
|
|
2686
2732
|
destinationSnDocs: ExporterDestinationSnDocs.optional(),
|
|
2687
2733
|
destinationS3: ExporterDestinationS3.optional(),
|
|
2688
2734
|
destinationGithub: ExporterDestinationGithub.optional(),
|
|
@@ -2701,28 +2747,28 @@ var ExporterJobFindByFilter = ExporterJob.pick({
|
|
|
2701
2747
|
themeId: true,
|
|
2702
2748
|
brandId: true
|
|
2703
2749
|
}).extend({
|
|
2704
|
-
destinations:
|
|
2750
|
+
destinations: z106.array(ExporterJobDestination),
|
|
2705
2751
|
docsEnvironment: PublishedDocEnvironment
|
|
2706
2752
|
}).partial();
|
|
2707
2753
|
|
|
2708
2754
|
// src/codegen/exporter-workspace-membership-role.ts
|
|
2709
|
-
import { z as
|
|
2710
|
-
var ExporterWorkspaceMembershipRole =
|
|
2755
|
+
import { z as z107 } from "zod";
|
|
2756
|
+
var ExporterWorkspaceMembershipRole = z107.enum(["Owner", "OwnerArchived", "User"]);
|
|
2711
2757
|
|
|
2712
2758
|
// src/codegen/exporter-workspace-membership.ts
|
|
2713
|
-
import { z as
|
|
2714
|
-
var ExporterWorkspaceMembership =
|
|
2715
|
-
id:
|
|
2716
|
-
workspaceId:
|
|
2717
|
-
exporterId:
|
|
2759
|
+
import { z as z108 } from "zod";
|
|
2760
|
+
var ExporterWorkspaceMembership = z108.object({
|
|
2761
|
+
id: z108.string(),
|
|
2762
|
+
workspaceId: z108.string(),
|
|
2763
|
+
exporterId: z108.string(),
|
|
2718
2764
|
role: ExporterWorkspaceMembershipRole
|
|
2719
2765
|
});
|
|
2720
2766
|
|
|
2721
2767
|
// src/codegen/exporter.ts
|
|
2722
|
-
import { z as
|
|
2768
|
+
import { z as z111 } from "zod";
|
|
2723
2769
|
|
|
2724
2770
|
// src/codegen/git-providers.ts
|
|
2725
|
-
import { z as
|
|
2771
|
+
import { z as z109 } from "zod";
|
|
2726
2772
|
var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
2727
2773
|
GitProviderNames2["Azure"] = "azure";
|
|
2728
2774
|
GitProviderNames2["Github"] = "github";
|
|
@@ -2730,11 +2776,11 @@ var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
|
2730
2776
|
GitProviderNames2["Bitbucket"] = "bitbucket";
|
|
2731
2777
|
return GitProviderNames2;
|
|
2732
2778
|
})(GitProviderNames || {});
|
|
2733
|
-
var GitProvider =
|
|
2779
|
+
var GitProvider = z109.nativeEnum(GitProviderNames);
|
|
2734
2780
|
|
|
2735
2781
|
// src/codegen/pulsar.ts
|
|
2736
|
-
import { z as
|
|
2737
|
-
var PulsarPropertyType =
|
|
2782
|
+
import { z as z110 } from "zod";
|
|
2783
|
+
var PulsarPropertyType = z110.enum([
|
|
2738
2784
|
"string",
|
|
2739
2785
|
"number",
|
|
2740
2786
|
"boolean",
|
|
@@ -2747,108 +2793,108 @@ var PulsarPropertyType = z107.enum([
|
|
|
2747
2793
|
"tokenProperties",
|
|
2748
2794
|
"tokenType"
|
|
2749
2795
|
]);
|
|
2750
|
-
var PulsarBaseProperty =
|
|
2751
|
-
label:
|
|
2752
|
-
key:
|
|
2753
|
-
description:
|
|
2796
|
+
var PulsarBaseProperty = z110.object({
|
|
2797
|
+
label: z110.string(),
|
|
2798
|
+
key: z110.string(),
|
|
2799
|
+
description: z110.string().nullish(),
|
|
2754
2800
|
type: PulsarPropertyType,
|
|
2755
|
-
values:
|
|
2756
|
-
default:
|
|
2801
|
+
values: z110.array(z110.string()).nullish(),
|
|
2802
|
+
default: z110.union([z110.string(), z110.boolean(), z110.number()]).nullish(),
|
|
2757
2803
|
// PulsarPropertyValueType //is optional?
|
|
2758
|
-
inputType:
|
|
2804
|
+
inputType: z110.enum(["code", "plain"]).optional(),
|
|
2759
2805
|
//is optional?
|
|
2760
|
-
isMultiline:
|
|
2806
|
+
isMultiline: z110.boolean().nullish()
|
|
2761
2807
|
});
|
|
2762
2808
|
var PulsarContributionConfigurationProperty = PulsarBaseProperty.extend({
|
|
2763
|
-
category:
|
|
2809
|
+
category: z110.string()
|
|
2764
2810
|
});
|
|
2765
|
-
var PulsarContributionVariant =
|
|
2766
|
-
key:
|
|
2767
|
-
name:
|
|
2768
|
-
isDefault:
|
|
2769
|
-
description:
|
|
2770
|
-
thumbnailURL:
|
|
2811
|
+
var PulsarContributionVariant = z110.object({
|
|
2812
|
+
key: z110.string(),
|
|
2813
|
+
name: z110.string(),
|
|
2814
|
+
isDefault: z110.boolean().nullish(),
|
|
2815
|
+
description: z110.string().nullish(),
|
|
2816
|
+
thumbnailURL: z110.string().nullish()
|
|
2771
2817
|
});
|
|
2772
|
-
var PulsarCustomBlock =
|
|
2773
|
-
title:
|
|
2774
|
-
key:
|
|
2775
|
-
category:
|
|
2776
|
-
description: nullishToOptional(
|
|
2777
|
-
iconURL:
|
|
2778
|
-
mode:
|
|
2779
|
-
properties:
|
|
2818
|
+
var PulsarCustomBlock = z110.object({
|
|
2819
|
+
title: z110.string(),
|
|
2820
|
+
key: z110.string(),
|
|
2821
|
+
category: z110.string(),
|
|
2822
|
+
description: nullishToOptional(z110.string()),
|
|
2823
|
+
iconURL: z110.string(),
|
|
2824
|
+
mode: z110.enum(["array", "block"]),
|
|
2825
|
+
properties: z110.array(PulsarBaseProperty)
|
|
2780
2826
|
});
|
|
2781
2827
|
|
|
2782
2828
|
// src/codegen/exporter.ts
|
|
2783
|
-
var ExporterType =
|
|
2784
|
-
var ExporterSource =
|
|
2785
|
-
var ExporterTag =
|
|
2786
|
-
var ExporterDetails =
|
|
2787
|
-
description:
|
|
2788
|
-
version:
|
|
2789
|
-
routingVersion: nullishToOptional(
|
|
2790
|
-
author: nullishToOptional(
|
|
2791
|
-
organization: nullishToOptional(
|
|
2792
|
-
homepage: nullishToOptional(
|
|
2793
|
-
readme: nullishToOptional(
|
|
2794
|
-
tags: nullishToOptional(
|
|
2795
|
-
packageId: nullishToOptional(
|
|
2796
|
-
iconURL: nullishToOptional(
|
|
2797
|
-
configurationProperties: nullishToOptional(
|
|
2798
|
-
customBlocks: nullishToOptional(
|
|
2799
|
-
blockVariants: nullishToOptional(
|
|
2800
|
-
usesBrands: nullishToOptional(
|
|
2801
|
-
usesThemes: nullishToOptional(
|
|
2829
|
+
var ExporterType = z111.enum(["code", "documentation"]);
|
|
2830
|
+
var ExporterSource = z111.enum(["git", "upload"]);
|
|
2831
|
+
var ExporterTag = z111.string().regex(/^[0-9a-zA-Z]+(\s[0-9a-zA-Z]+)*$/);
|
|
2832
|
+
var ExporterDetails = z111.object({
|
|
2833
|
+
description: z111.string(),
|
|
2834
|
+
version: z111.string(),
|
|
2835
|
+
routingVersion: nullishToOptional(z111.string()),
|
|
2836
|
+
author: nullishToOptional(z111.string()),
|
|
2837
|
+
organization: nullishToOptional(z111.string()),
|
|
2838
|
+
homepage: nullishToOptional(z111.string()),
|
|
2839
|
+
readme: nullishToOptional(z111.string()),
|
|
2840
|
+
tags: nullishToOptional(z111.array(ExporterTag)).default([]),
|
|
2841
|
+
packageId: nullishToOptional(z111.string().max(255)),
|
|
2842
|
+
iconURL: nullishToOptional(z111.string()),
|
|
2843
|
+
configurationProperties: nullishToOptional(z111.array(PulsarContributionConfigurationProperty)).default([]),
|
|
2844
|
+
customBlocks: nullishToOptional(z111.array(PulsarCustomBlock)).default([]),
|
|
2845
|
+
blockVariants: nullishToOptional(z111.record(z111.string(), z111.array(PulsarContributionVariant))).default({}),
|
|
2846
|
+
usesBrands: nullishToOptional(z111.boolean()).default(false),
|
|
2847
|
+
usesThemes: nullishToOptional(z111.boolean()).default(false),
|
|
2802
2848
|
source: ExporterSource,
|
|
2803
2849
|
gitProvider: nullishToOptional(GitProvider),
|
|
2804
|
-
gitUrl: nullishToOptional(
|
|
2805
|
-
gitBranch: nullishToOptional(
|
|
2806
|
-
gitDirectory: nullishToOptional(
|
|
2850
|
+
gitUrl: nullishToOptional(z111.string()),
|
|
2851
|
+
gitBranch: nullishToOptional(z111.string()),
|
|
2852
|
+
gitDirectory: nullishToOptional(z111.string())
|
|
2807
2853
|
});
|
|
2808
|
-
var Exporter =
|
|
2809
|
-
id:
|
|
2810
|
-
createdAt:
|
|
2811
|
-
name:
|
|
2812
|
-
isPrivate:
|
|
2854
|
+
var Exporter = z111.object({
|
|
2855
|
+
id: z111.string(),
|
|
2856
|
+
createdAt: z111.coerce.date(),
|
|
2857
|
+
name: z111.string(),
|
|
2858
|
+
isPrivate: z111.boolean(),
|
|
2813
2859
|
details: ExporterDetails,
|
|
2814
2860
|
exporterType: nullishToOptional(ExporterType).default("code"),
|
|
2815
|
-
storagePath: nullishToOptional(
|
|
2861
|
+
storagePath: nullishToOptional(z111.string()).default("")
|
|
2816
2862
|
});
|
|
2817
2863
|
|
|
2818
2864
|
// src/custom-domains/custom-domains.ts
|
|
2819
|
-
import { z as
|
|
2820
|
-
var CustomDomain =
|
|
2821
|
-
id:
|
|
2822
|
-
designSystemId:
|
|
2823
|
-
state:
|
|
2824
|
-
supernovaDomain:
|
|
2825
|
-
customerDomain:
|
|
2826
|
-
error:
|
|
2827
|
-
errorCode:
|
|
2865
|
+
import { z as z112 } from "zod";
|
|
2866
|
+
var CustomDomain = z112.object({
|
|
2867
|
+
id: z112.string(),
|
|
2868
|
+
designSystemId: z112.string(),
|
|
2869
|
+
state: z112.string(),
|
|
2870
|
+
supernovaDomain: z112.string(),
|
|
2871
|
+
customerDomain: z112.string().nullish(),
|
|
2872
|
+
error: z112.string().nullish(),
|
|
2873
|
+
errorCode: z112.string().nullish()
|
|
2828
2874
|
});
|
|
2829
2875
|
|
|
2830
2876
|
// src/docs-server/session.ts
|
|
2831
|
-
import { z as
|
|
2877
|
+
import { z as z117 } from "zod";
|
|
2832
2878
|
|
|
2833
2879
|
// src/users/linked-integrations.ts
|
|
2834
|
-
import { z as
|
|
2835
|
-
var IntegrationAuthType =
|
|
2836
|
-
var ExternalServiceType =
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2880
|
+
import { z as z113 } from "zod";
|
|
2881
|
+
var IntegrationAuthType = z113.union([z113.literal("OAuth2"), z113.literal("PAT")]);
|
|
2882
|
+
var ExternalServiceType = z113.union([
|
|
2883
|
+
z113.literal("figma"),
|
|
2884
|
+
z113.literal("github"),
|
|
2885
|
+
z113.literal("azure"),
|
|
2886
|
+
z113.literal("gitlab"),
|
|
2887
|
+
z113.literal("bitbucket")
|
|
2842
2888
|
]);
|
|
2843
|
-
var IntegrationUserInfo =
|
|
2844
|
-
id:
|
|
2845
|
-
handle:
|
|
2846
|
-
avatarUrl:
|
|
2847
|
-
email:
|
|
2889
|
+
var IntegrationUserInfo = z113.object({
|
|
2890
|
+
id: z113.string(),
|
|
2891
|
+
handle: z113.string().optional(),
|
|
2892
|
+
avatarUrl: z113.string().optional(),
|
|
2893
|
+
email: z113.string().optional(),
|
|
2848
2894
|
authType: IntegrationAuthType.optional(),
|
|
2849
|
-
customUrl:
|
|
2895
|
+
customUrl: z113.string().optional()
|
|
2850
2896
|
});
|
|
2851
|
-
var UserLinkedIntegrations =
|
|
2897
|
+
var UserLinkedIntegrations = z113.object({
|
|
2852
2898
|
figma: IntegrationUserInfo.optional(),
|
|
2853
2899
|
github: IntegrationUserInfo.array().optional(),
|
|
2854
2900
|
azure: IntegrationUserInfo.array().optional(),
|
|
@@ -2857,86 +2903,86 @@ var UserLinkedIntegrations = z110.object({
|
|
|
2857
2903
|
});
|
|
2858
2904
|
|
|
2859
2905
|
// src/users/user-identity.ts
|
|
2860
|
-
import { z as
|
|
2861
|
-
var UserIdentity =
|
|
2862
|
-
id:
|
|
2863
|
-
userId:
|
|
2906
|
+
import { z as z114 } from "zod";
|
|
2907
|
+
var UserIdentity = z114.object({
|
|
2908
|
+
id: z114.string(),
|
|
2909
|
+
userId: z114.string()
|
|
2864
2910
|
});
|
|
2865
2911
|
|
|
2866
2912
|
// src/users/user-profile.ts
|
|
2867
|
-
import { z as
|
|
2868
|
-
var UserOnboardingDepartment =
|
|
2869
|
-
var UserOnboardingJobLevel =
|
|
2870
|
-
var UserOnboarding =
|
|
2871
|
-
companyName:
|
|
2872
|
-
numberOfPeopleInOrg:
|
|
2873
|
-
numberOfPeopleInDesignTeam:
|
|
2913
|
+
import { z as z115 } from "zod";
|
|
2914
|
+
var UserOnboardingDepartment = z115.enum(["Design", "Engineering", "Brand", "Other"]);
|
|
2915
|
+
var UserOnboardingJobLevel = z115.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
2916
|
+
var UserOnboarding = z115.object({
|
|
2917
|
+
companyName: z115.string().optional(),
|
|
2918
|
+
numberOfPeopleInOrg: z115.string().optional(),
|
|
2919
|
+
numberOfPeopleInDesignTeam: z115.string().optional(),
|
|
2874
2920
|
department: UserOnboardingDepartment.optional(),
|
|
2875
|
-
jobTitle:
|
|
2876
|
-
phase:
|
|
2921
|
+
jobTitle: z115.string().optional(),
|
|
2922
|
+
phase: z115.string().optional(),
|
|
2877
2923
|
jobLevel: UserOnboardingJobLevel.optional()
|
|
2878
2924
|
});
|
|
2879
|
-
var UserProfile =
|
|
2880
|
-
name:
|
|
2881
|
-
avatar:
|
|
2882
|
-
nickname:
|
|
2925
|
+
var UserProfile = z115.object({
|
|
2926
|
+
name: z115.string(),
|
|
2927
|
+
avatar: z115.string().optional(),
|
|
2928
|
+
nickname: z115.string().optional(),
|
|
2883
2929
|
onboarding: UserOnboarding.optional()
|
|
2884
2930
|
});
|
|
2885
2931
|
|
|
2886
2932
|
// src/users/user.ts
|
|
2887
|
-
import { z as
|
|
2888
|
-
var User =
|
|
2889
|
-
id:
|
|
2890
|
-
email:
|
|
2891
|
-
emailVerified:
|
|
2892
|
-
createdAt:
|
|
2893
|
-
trialExpiresAt:
|
|
2933
|
+
import { z as z116 } from "zod";
|
|
2934
|
+
var User = z116.object({
|
|
2935
|
+
id: z116.string(),
|
|
2936
|
+
email: z116.string(),
|
|
2937
|
+
emailVerified: z116.boolean(),
|
|
2938
|
+
createdAt: z116.coerce.date(),
|
|
2939
|
+
trialExpiresAt: z116.coerce.date().optional(),
|
|
2894
2940
|
profile: UserProfile,
|
|
2895
2941
|
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
2896
|
-
loggedOutAt:
|
|
2897
|
-
isProtected:
|
|
2942
|
+
loggedOutAt: z116.coerce.date().optional(),
|
|
2943
|
+
isProtected: z116.boolean()
|
|
2898
2944
|
});
|
|
2899
2945
|
|
|
2900
2946
|
// src/docs-server/session.ts
|
|
2901
|
-
var NpmProxyToken =
|
|
2902
|
-
access:
|
|
2903
|
-
expiresAt:
|
|
2947
|
+
var NpmProxyToken = z117.object({
|
|
2948
|
+
access: z117.string(),
|
|
2949
|
+
expiresAt: z117.number()
|
|
2904
2950
|
});
|
|
2905
|
-
var SessionData =
|
|
2906
|
-
returnToUrl:
|
|
2951
|
+
var SessionData = z117.object({
|
|
2952
|
+
returnToUrl: z117.string().optional(),
|
|
2907
2953
|
npmProxyToken: NpmProxyToken.optional()
|
|
2908
2954
|
});
|
|
2909
|
-
var Session =
|
|
2910
|
-
id:
|
|
2911
|
-
expiresAt:
|
|
2912
|
-
userId:
|
|
2955
|
+
var Session = z117.object({
|
|
2956
|
+
id: z117.string(),
|
|
2957
|
+
expiresAt: z117.coerce.date(),
|
|
2958
|
+
userId: z117.string().nullable(),
|
|
2913
2959
|
data: SessionData
|
|
2914
2960
|
});
|
|
2915
|
-
var AuthTokens =
|
|
2916
|
-
access:
|
|
2917
|
-
refresh:
|
|
2961
|
+
var AuthTokens = z117.object({
|
|
2962
|
+
access: z117.string(),
|
|
2963
|
+
refresh: z117.string()
|
|
2918
2964
|
});
|
|
2919
|
-
var UserSession =
|
|
2965
|
+
var UserSession = z117.object({
|
|
2920
2966
|
session: Session,
|
|
2921
2967
|
user: User.nullable()
|
|
2922
2968
|
});
|
|
2923
2969
|
|
|
2924
2970
|
// src/feature-flags/feature-flags.ts
|
|
2925
|
-
import { z as
|
|
2926
|
-
var FlaggedFeature =
|
|
2927
|
-
var FeatureFlagMap =
|
|
2928
|
-
var FeatureFlag =
|
|
2929
|
-
id:
|
|
2971
|
+
import { z as z118 } from "zod";
|
|
2972
|
+
var FlaggedFeature = z118.enum(["FigmaImporterV2"]);
|
|
2973
|
+
var FeatureFlagMap = z118.record(FlaggedFeature, z118.boolean());
|
|
2974
|
+
var FeatureFlag = z118.object({
|
|
2975
|
+
id: z118.string(),
|
|
2930
2976
|
feature: FlaggedFeature,
|
|
2931
|
-
createdAt:
|
|
2932
|
-
enabled:
|
|
2977
|
+
createdAt: z118.coerce.date(),
|
|
2978
|
+
enabled: z118.boolean()
|
|
2933
2979
|
});
|
|
2934
2980
|
|
|
2935
2981
|
// src/integrations/external-oauth-request.ts
|
|
2936
|
-
import { z as
|
|
2982
|
+
import { z as z120 } from "zod";
|
|
2937
2983
|
|
|
2938
2984
|
// src/integrations/oauth-providers.ts
|
|
2939
|
-
import { z as
|
|
2985
|
+
import { z as z119 } from "zod";
|
|
2940
2986
|
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
2941
2987
|
OAuthProviderNames2["Figma"] = "figma";
|
|
2942
2988
|
OAuthProviderNames2["Azure"] = "azure";
|
|
@@ -2945,119 +2991,119 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
|
2945
2991
|
OAuthProviderNames2["Bitbucket"] = "bitbucket";
|
|
2946
2992
|
return OAuthProviderNames2;
|
|
2947
2993
|
})(OAuthProviderNames || {});
|
|
2948
|
-
var OAuthProviderSchema =
|
|
2994
|
+
var OAuthProviderSchema = z119.nativeEnum(OAuthProviderNames);
|
|
2949
2995
|
var OAuthProvider = OAuthProviderSchema.enum;
|
|
2950
2996
|
|
|
2951
2997
|
// src/integrations/external-oauth-request.ts
|
|
2952
|
-
var ExternalOAuthRequest =
|
|
2953
|
-
id:
|
|
2998
|
+
var ExternalOAuthRequest = z120.object({
|
|
2999
|
+
id: z120.string(),
|
|
2954
3000
|
provider: OAuthProviderSchema,
|
|
2955
|
-
userId:
|
|
2956
|
-
state:
|
|
2957
|
-
createdAt:
|
|
3001
|
+
userId: z120.string(),
|
|
3002
|
+
state: z120.string(),
|
|
3003
|
+
createdAt: z120.coerce.date()
|
|
2958
3004
|
});
|
|
2959
3005
|
|
|
2960
3006
|
// src/integrations/oauth-token.ts
|
|
2961
|
-
import { z as
|
|
2962
|
-
var IntegrationTokenSchema =
|
|
2963
|
-
id:
|
|
3007
|
+
import { z as z121 } from "zod";
|
|
3008
|
+
var IntegrationTokenSchema = z121.object({
|
|
3009
|
+
id: z121.string(),
|
|
2964
3010
|
provider: OAuthProviderSchema,
|
|
2965
|
-
scope:
|
|
2966
|
-
userId:
|
|
2967
|
-
accessToken:
|
|
2968
|
-
refreshToken:
|
|
2969
|
-
expiresAt:
|
|
2970
|
-
externalUserId:
|
|
3011
|
+
scope: z121.string(),
|
|
3012
|
+
userId: z121.string(),
|
|
3013
|
+
accessToken: z121.string(),
|
|
3014
|
+
refreshToken: z121.string(),
|
|
3015
|
+
expiresAt: z121.coerce.date(),
|
|
3016
|
+
externalUserId: z121.string().nullish()
|
|
2971
3017
|
});
|
|
2972
3018
|
|
|
2973
3019
|
// src/multiplayer/design-system-version-room.ts
|
|
2974
|
-
import { z as
|
|
3020
|
+
import { z as z122 } from "zod";
|
|
2975
3021
|
var DesignSystemVersionRoom = Entity.extend({
|
|
2976
|
-
designSystemVersionId:
|
|
2977
|
-
liveblocksId:
|
|
3022
|
+
designSystemVersionId: z122.string(),
|
|
3023
|
+
liveblocksId: z122.string()
|
|
2978
3024
|
});
|
|
2979
|
-
var DesignSystemVersionRoomInitialState =
|
|
2980
|
-
pages:
|
|
2981
|
-
groups:
|
|
3025
|
+
var DesignSystemVersionRoomInitialState = z122.object({
|
|
3026
|
+
pages: z122.array(DocumentationPageV2),
|
|
3027
|
+
groups: z122.array(ElementGroup)
|
|
2982
3028
|
});
|
|
2983
3029
|
var DesignSystemVersionRoomUpdate = DesignSystemVersionRoomInitialState.extend({
|
|
2984
|
-
deletedPageIds:
|
|
2985
|
-
deletedGroupIds:
|
|
3030
|
+
deletedPageIds: z122.array(z122.string()),
|
|
3031
|
+
deletedGroupIds: z122.array(z122.string())
|
|
2986
3032
|
});
|
|
2987
3033
|
|
|
2988
3034
|
// src/multiplayer/documentation-page-room.ts
|
|
2989
|
-
import { z as
|
|
3035
|
+
import { z as z123 } from "zod";
|
|
2990
3036
|
var DocumentationPageRoom = Entity.extend({
|
|
2991
|
-
designSystemVersionId:
|
|
2992
|
-
documentationPageId:
|
|
2993
|
-
liveblocksId:
|
|
3037
|
+
designSystemVersionId: z123.string(),
|
|
3038
|
+
documentationPageId: z123.string(),
|
|
3039
|
+
liveblocksId: z123.string()
|
|
2994
3040
|
});
|
|
2995
|
-
var PageBlockEditorModel =
|
|
2996
|
-
id:
|
|
3041
|
+
var PageBlockEditorModel = z123.object({
|
|
3042
|
+
id: z123.string(),
|
|
2997
3043
|
data: PageBlockDataV2
|
|
2998
3044
|
});
|
|
2999
|
-
var DocumentationPageRoomRoomUpdate =
|
|
3045
|
+
var DocumentationPageRoomRoomUpdate = z123.object({
|
|
3000
3046
|
page: DocumentationPageV2,
|
|
3001
3047
|
pageParent: ElementGroup
|
|
3002
3048
|
});
|
|
3003
3049
|
var DocumentationPageRoomInitialState = DocumentationPageRoomRoomUpdate.extend({
|
|
3004
|
-
pageBlocks:
|
|
3005
|
-
blockDefinitions:
|
|
3050
|
+
pageBlocks: z123.array(PageBlockEditorModel),
|
|
3051
|
+
blockDefinitions: z123.array(PageBlockDefinition)
|
|
3006
3052
|
});
|
|
3007
3053
|
|
|
3008
3054
|
// src/multiplayer/room-type.ts
|
|
3009
|
-
import { z as
|
|
3055
|
+
import { z as z124 } from "zod";
|
|
3010
3056
|
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
3011
3057
|
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
3012
3058
|
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
3013
3059
|
return RoomTypeEnum2;
|
|
3014
3060
|
})(RoomTypeEnum || {});
|
|
3015
|
-
var RoomTypeSchema =
|
|
3061
|
+
var RoomTypeSchema = z124.nativeEnum(RoomTypeEnum);
|
|
3016
3062
|
var RoomType = RoomTypeSchema.enum;
|
|
3017
3063
|
|
|
3018
3064
|
// src/npm/npm-package.ts
|
|
3019
|
-
import { z as
|
|
3020
|
-
var AnyRecord =
|
|
3065
|
+
import { z as z125 } from "zod";
|
|
3066
|
+
var AnyRecord = z125.record(z125.any());
|
|
3021
3067
|
var NpmPackageVersionDist = AnyRecord.and(
|
|
3022
|
-
|
|
3023
|
-
tarball:
|
|
3068
|
+
z125.object({
|
|
3069
|
+
tarball: z125.string()
|
|
3024
3070
|
})
|
|
3025
3071
|
);
|
|
3026
3072
|
var NpmPackageVersion = AnyRecord.and(
|
|
3027
|
-
|
|
3073
|
+
z125.object({
|
|
3028
3074
|
dist: NpmPackageVersionDist
|
|
3029
3075
|
})
|
|
3030
3076
|
);
|
|
3031
3077
|
var NpmPackage = AnyRecord.and(
|
|
3032
|
-
|
|
3033
|
-
_id:
|
|
3034
|
-
name:
|
|
3078
|
+
z125.object({
|
|
3079
|
+
_id: z125.string(),
|
|
3080
|
+
name: z125.string(),
|
|
3035
3081
|
// e.g. "latest": "1.2.3"
|
|
3036
|
-
"dist-tags":
|
|
3082
|
+
"dist-tags": z125.record(z125.string(), z125.string()),
|
|
3037
3083
|
// "1.2.3": {...}
|
|
3038
|
-
versions:
|
|
3084
|
+
versions: z125.record(NpmPackageVersion)
|
|
3039
3085
|
})
|
|
3040
3086
|
);
|
|
3041
3087
|
|
|
3042
3088
|
// src/npm/npm-proxy-token-payload.ts
|
|
3043
|
-
import { z as
|
|
3044
|
-
var NpmProxyTokenPayload =
|
|
3045
|
-
npmProxyRegistryConfigId:
|
|
3089
|
+
import { z as z126 } from "zod";
|
|
3090
|
+
var NpmProxyTokenPayload = z126.object({
|
|
3091
|
+
npmProxyRegistryConfigId: z126.string()
|
|
3046
3092
|
});
|
|
3047
3093
|
|
|
3048
3094
|
// src/tokens/personal-access-token.ts
|
|
3049
|
-
import { z as
|
|
3050
|
-
var PersonalAccessToken =
|
|
3051
|
-
id:
|
|
3052
|
-
userId:
|
|
3053
|
-
name:
|
|
3054
|
-
token:
|
|
3055
|
-
createdAt:
|
|
3056
|
-
hidden:
|
|
3057
|
-
workspaceId:
|
|
3095
|
+
import { z as z127 } from "zod";
|
|
3096
|
+
var PersonalAccessToken = z127.object({
|
|
3097
|
+
id: z127.string(),
|
|
3098
|
+
userId: z127.string(),
|
|
3099
|
+
name: z127.string(),
|
|
3100
|
+
token: z127.string(),
|
|
3101
|
+
createdAt: z127.coerce.date(),
|
|
3102
|
+
hidden: z127.boolean(),
|
|
3103
|
+
workspaceId: z127.string().optional(),
|
|
3058
3104
|
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
3059
|
-
expireAt:
|
|
3060
|
-
scope:
|
|
3105
|
+
expireAt: z127.coerce.date().optional(),
|
|
3106
|
+
scope: z127.string().optional()
|
|
3061
3107
|
});
|
|
3062
3108
|
|
|
3063
3109
|
// src/utils/errors.ts
|
|
@@ -3186,26 +3232,26 @@ async function sleep(ms) {
|
|
|
3186
3232
|
}
|
|
3187
3233
|
|
|
3188
3234
|
// src/utils/content-loader-instruction.ts
|
|
3189
|
-
import { z as
|
|
3190
|
-
var ContentLoadInstruction =
|
|
3191
|
-
from:
|
|
3192
|
-
to:
|
|
3193
|
-
authorizationHeaderKvsId:
|
|
3194
|
-
timeout:
|
|
3195
|
-
});
|
|
3196
|
-
var ContentLoaderPayload =
|
|
3197
|
-
type:
|
|
3235
|
+
import { z as z128 } from "zod";
|
|
3236
|
+
var ContentLoadInstruction = z128.object({
|
|
3237
|
+
from: z128.string(),
|
|
3238
|
+
to: z128.string(),
|
|
3239
|
+
authorizationHeaderKvsId: z128.string().optional(),
|
|
3240
|
+
timeout: z128.number().optional()
|
|
3241
|
+
});
|
|
3242
|
+
var ContentLoaderPayload = z128.object({
|
|
3243
|
+
type: z128.literal("Single"),
|
|
3198
3244
|
instruction: ContentLoadInstruction
|
|
3199
3245
|
}).or(
|
|
3200
|
-
|
|
3201
|
-
type:
|
|
3202
|
-
loadingChunkSize:
|
|
3203
|
-
instructions:
|
|
3246
|
+
z128.object({
|
|
3247
|
+
type: z128.literal("Multiple"),
|
|
3248
|
+
loadingChunkSize: z128.number().optional(),
|
|
3249
|
+
instructions: z128.array(ContentLoadInstruction)
|
|
3204
3250
|
})
|
|
3205
3251
|
).or(
|
|
3206
|
-
|
|
3207
|
-
type:
|
|
3208
|
-
location:
|
|
3252
|
+
z128.object({
|
|
3253
|
+
type: z128.literal("S3"),
|
|
3254
|
+
location: z128.string()
|
|
3209
3255
|
})
|
|
3210
3256
|
);
|
|
3211
3257
|
|
|
@@ -3936,12 +3982,14 @@ export {
|
|
|
3936
3982
|
DimensionUnit,
|
|
3937
3983
|
DimensionValue,
|
|
3938
3984
|
DocumentationGroupBehavior,
|
|
3939
|
-
|
|
3940
|
-
|
|
3985
|
+
DocumentationItemConfigurationV1,
|
|
3986
|
+
DocumentationItemConfigurationV2,
|
|
3941
3987
|
DocumentationItemHeaderAlignment,
|
|
3942
3988
|
DocumentationItemHeaderAlignmentSchema,
|
|
3943
3989
|
DocumentationItemHeaderImageScaleType,
|
|
3944
3990
|
DocumentationItemHeaderImageScaleTypeSchema,
|
|
3991
|
+
DocumentationItemHeaderV1,
|
|
3992
|
+
DocumentationItemHeaderV2,
|
|
3945
3993
|
DocumentationPage,
|
|
3946
3994
|
DocumentationPageAsset,
|
|
3947
3995
|
DocumentationPageAssetType,
|
|
@@ -3961,7 +4009,8 @@ export {
|
|
|
3961
4009
|
DurationUnit,
|
|
3962
4010
|
DurationValue,
|
|
3963
4011
|
ElementGroup,
|
|
3964
|
-
|
|
4012
|
+
ElementGroupDataDeprecated,
|
|
4013
|
+
ElementGroupDataV2,
|
|
3965
4014
|
ElementGroupElementData,
|
|
3966
4015
|
ElementPropertyDefinition,
|
|
3967
4016
|
ElementPropertyDefinitionOption,
|
|
@@ -4139,6 +4188,7 @@ export {
|
|
|
4139
4188
|
PageBlockFrame,
|
|
4140
4189
|
PageBlockFrameOrigin,
|
|
4141
4190
|
PageBlockImageAlignment,
|
|
4191
|
+
PageBlockImageReference,
|
|
4142
4192
|
PageBlockImageType,
|
|
4143
4193
|
PageBlockItemAssetPropertyValue,
|
|
4144
4194
|
PageBlockItemAssetValue,
|
|
@@ -4150,7 +4200,6 @@ export {
|
|
|
4150
4200
|
PageBlockItemDividerValue,
|
|
4151
4201
|
PageBlockItemEmbedValue,
|
|
4152
4202
|
PageBlockItemFigmaNodeValue,
|
|
4153
|
-
PageBlockItemImageReference,
|
|
4154
4203
|
PageBlockItemImageValue,
|
|
4155
4204
|
PageBlockItemMarkdownValue,
|
|
4156
4205
|
PageBlockItemMultiRichTextValue,
|
|
@@ -4313,10 +4362,10 @@ export {
|
|
|
4313
4362
|
ZIndexValue,
|
|
4314
4363
|
addImportModelCollections,
|
|
4315
4364
|
buildConstantEnum,
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4365
|
+
defaultDocumentationItemConfigurationV1,
|
|
4366
|
+
defaultDocumentationItemConfigurationV2,
|
|
4367
|
+
defaultDocumentationItemHeaderV1,
|
|
4368
|
+
defaultDocumentationItemHeaderV2,
|
|
4320
4369
|
designTokenImportModelTypeFilter,
|
|
4321
4370
|
designTokenTypeFilter,
|
|
4322
4371
|
extractTokenTypedData,
|