@supernova-studio/client 0.19.1 → 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 +657 -6065
- package/dist/index.d.ts +657 -6065
- package/dist/index.js +111 -77
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1079 -1045
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/conversion/documentation/documentation-group-to-dto.ts +6 -6
- package/src/api/conversion/documentation/documentation-page-v1-to-dto.ts +2 -2
- package/src/api/conversion/documentation/documentation-page-v2-to-dto.ts +2 -2
- package/src/api/dto/elements/documentation/group-action.ts +1 -1
- package/src/api/dto/elements/documentation/group.ts +8 -8
- package/src/api/dto/elements/documentation/page-v2.ts +3 -3
- package/src/yjs/design-system-content/documentation-hierarchy.ts +2 -2
- package/src/yjs/design-system-content/index.ts +1 -0
- package/src/yjs/design-system-content/item-configuration.ts +5 -5
package/dist/index.js
CHANGED
|
@@ -122,6 +122,9 @@ var _zod = require('zod');
|
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
125
128
|
|
|
126
129
|
|
|
127
130
|
|
|
@@ -135,7 +138,7 @@ var PluginOAuthRequestSchema = _zod.z.object({
|
|
|
135
138
|
readKeyConsumed: _zod.z.boolean(),
|
|
136
139
|
writeKeyConsumed: _zod.z.boolean(),
|
|
137
140
|
oAuthCode: _zod.z.string().optional(),
|
|
138
|
-
createdAt: _zod.z.date()
|
|
141
|
+
createdAt: _zod.z.coerce.date()
|
|
139
142
|
});
|
|
140
143
|
var CardSchema = _zod.z.object({
|
|
141
144
|
cardId: _zod.z.string().nullish(),
|
|
@@ -212,13 +215,13 @@ var InvoiceSchema = _zod.z.object({
|
|
|
212
215
|
id: _zod.z.string(),
|
|
213
216
|
number: _zod.z.string(),
|
|
214
217
|
amount_due: _zod.z.number(),
|
|
215
|
-
date: _zod.z.date(),
|
|
218
|
+
date: _zod.z.coerce.date(),
|
|
216
219
|
hostedUrl: _zod.z.string().url(),
|
|
217
220
|
card: CardSchema.nullish()
|
|
218
221
|
});
|
|
219
222
|
var PeriodSchema = _zod.z.object({
|
|
220
|
-
start: _zod.z.date(),
|
|
221
|
-
end: _zod.z.date()
|
|
223
|
+
start: _zod.z.coerce.date(),
|
|
224
|
+
end: _zod.z.coerce.date()
|
|
222
225
|
});
|
|
223
226
|
var InvoiceLineSchema = _zod.z.object({
|
|
224
227
|
amount: _zod.z.number(),
|
|
@@ -398,7 +401,7 @@ var DataSourceRemote = _zod.z.discriminatedUnion("type", [
|
|
|
398
401
|
]);
|
|
399
402
|
var DataSourceVersion = _zod.z.object({
|
|
400
403
|
id: _zod.z.string(),
|
|
401
|
-
createdAt: _zod.z.date(),
|
|
404
|
+
createdAt: _zod.z.coerce.date(),
|
|
402
405
|
label: _zod.z.string().nullish(),
|
|
403
406
|
description: _zod.z.string().nullish()
|
|
404
407
|
});
|
|
@@ -407,8 +410,8 @@ function zeroNumberByDefault() {
|
|
|
407
410
|
}
|
|
408
411
|
var Entity = _zod.z.object({
|
|
409
412
|
id: _zod.z.string(),
|
|
410
|
-
createdAt: _zod.z.date(),
|
|
411
|
-
updatedAt: _zod.z.date()
|
|
413
|
+
createdAt: _zod.z.coerce.date(),
|
|
414
|
+
updatedAt: _zod.z.coerce.date()
|
|
412
415
|
});
|
|
413
416
|
var ObjectMeta = _zod.z.object({
|
|
414
417
|
name: _zod.z.string(),
|
|
@@ -564,8 +567,8 @@ var DesignElement = ShallowDesignElement.extend({
|
|
|
564
567
|
meta: ObjectMeta,
|
|
565
568
|
slug: _zod.z.string().optional(),
|
|
566
569
|
userSlug: _zod.z.string().optional(),
|
|
567
|
-
createdAt: _zod.z.date(),
|
|
568
|
-
updatedAt: _zod.z.date(),
|
|
570
|
+
createdAt: _zod.z.coerce.date(),
|
|
571
|
+
updatedAt: _zod.z.coerce.date(),
|
|
569
572
|
exportProperties: DesignSystemElementExportProps.optional(),
|
|
570
573
|
data: _zod.z.record(_zod.z.any()),
|
|
571
574
|
origin: _zod.z.record(_zod.z.any()).optional()
|
|
@@ -886,6 +889,21 @@ var PageBlockImageAlignment = _zod.z.enum(["Left", "Center", "Stretch"]);
|
|
|
886
889
|
var PageBlockTableCellAlignment = _zod.z.enum(["Left", "Center", "Right"]);
|
|
887
890
|
var PageBlockPreviewContainerSize = _zod.z.enum(["Centered", "NaturalHeight"]);
|
|
888
891
|
var PageBlockThemeDisplayMode = _zod.z.enum(["Split", "Override"]);
|
|
892
|
+
var PageBlockImageReference = _zod.z.object({
|
|
893
|
+
type: PageBlockImageType,
|
|
894
|
+
url: _zod.z.string(),
|
|
895
|
+
assetId: _zod.z.string().optional(),
|
|
896
|
+
size: Size.optional(),
|
|
897
|
+
figmaFile: _zod.z.object({
|
|
898
|
+
sourceId: _zod.z.string(),
|
|
899
|
+
frameId: _zod.z.string(),
|
|
900
|
+
frameReferenceId: _zod.z.string(),
|
|
901
|
+
origin: _zod.z.object({
|
|
902
|
+
title: _zod.z.string().optional(),
|
|
903
|
+
sourceFileName: _zod.z.string().optional()
|
|
904
|
+
})
|
|
905
|
+
}).optional()
|
|
906
|
+
});
|
|
889
907
|
var PageBlockColorV2 = _zod.z.object({
|
|
890
908
|
value: _zod.z.string(),
|
|
891
909
|
referencedTokenId: _zod.z.string().optional()
|
|
@@ -916,21 +934,6 @@ var PageBlockDataV2 = _zod.z.object({
|
|
|
916
934
|
appearance: PageBlockAppearanceV2.optional(),
|
|
917
935
|
items: _zod.z.array(PageBlockItemV2)
|
|
918
936
|
});
|
|
919
|
-
var PageBlockItemImageReference = _zod.z.object({
|
|
920
|
-
type: PageBlockImageType,
|
|
921
|
-
url: _zod.z.string(),
|
|
922
|
-
assetId: _zod.z.string().optional(),
|
|
923
|
-
size: Size.optional(),
|
|
924
|
-
figmaFile: _zod.z.object({
|
|
925
|
-
sourceId: _zod.z.string(),
|
|
926
|
-
frameId: _zod.z.string(),
|
|
927
|
-
frameReferenceId: _zod.z.string(),
|
|
928
|
-
origin: _zod.z.object({
|
|
929
|
-
title: _zod.z.string().optional(),
|
|
930
|
-
sourceFileName: _zod.z.string().optional()
|
|
931
|
-
})
|
|
932
|
-
}).optional()
|
|
933
|
-
});
|
|
934
937
|
var PageBlockItemAssetValue = _zod.z.object({
|
|
935
938
|
selectedPropertyIds: _zod.z.array(_zod.z.string()).optional(),
|
|
936
939
|
showSearch: _zod.z.boolean().optional(),
|
|
@@ -1008,7 +1011,7 @@ var PageBlockItemImageValue = _zod.z.object({
|
|
|
1008
1011
|
alt: _zod.z.string().optional(),
|
|
1009
1012
|
caption: _zod.z.string().optional(),
|
|
1010
1013
|
alignment: PageBlockImageAlignment.optional(),
|
|
1011
|
-
value:
|
|
1014
|
+
value: PageBlockImageReference.optional()
|
|
1012
1015
|
});
|
|
1013
1016
|
var PageBlockItemMarkdownValue = _zod.z.object({
|
|
1014
1017
|
value: _zod.z.string()
|
|
@@ -1124,7 +1127,7 @@ var DocumentationItemHeaderAlignmentSchema = _zod.z.enum(["Left", "Center"]);
|
|
|
1124
1127
|
var DocumentationItemHeaderImageScaleTypeSchema = _zod.z.enum(["AspectFill", "AspectFit"]);
|
|
1125
1128
|
var DocumentationItemHeaderAlignment = DocumentationItemHeaderAlignmentSchema.enum;
|
|
1126
1129
|
var DocumentationItemHeaderImageScaleType = DocumentationItemHeaderImageScaleTypeSchema.enum;
|
|
1127
|
-
var
|
|
1130
|
+
var DocumentationItemHeaderV1 = _zod.z.object({
|
|
1128
1131
|
description: _zod.z.string(),
|
|
1129
1132
|
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1130
1133
|
foregroundColor: ColorTokenData.nullish(),
|
|
@@ -1135,29 +1138,53 @@ var DocumentationItemHeader = _zod.z.object({
|
|
|
1135
1138
|
showCoverText: _zod.z.boolean(),
|
|
1136
1139
|
minHeight: _zod.z.number().nullish()
|
|
1137
1140
|
});
|
|
1138
|
-
var
|
|
1141
|
+
var defaultDocumentationItemHeaderV1 = {
|
|
1139
1142
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
1140
1143
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleType.AspectFill,
|
|
1141
1144
|
description: "",
|
|
1142
1145
|
showBackgroundOverlay: false,
|
|
1143
1146
|
showCoverText: true
|
|
1144
1147
|
};
|
|
1145
|
-
var
|
|
1148
|
+
var DocumentationItemConfigurationV1 = _zod.z.object({
|
|
1146
1149
|
showSidebar: _zod.z.boolean(),
|
|
1147
|
-
header:
|
|
1150
|
+
header: DocumentationItemHeaderV1
|
|
1148
1151
|
});
|
|
1149
1152
|
var DocumentationPageDataV1 = _zod.z.object({
|
|
1150
1153
|
blocks: _zod.z.array(PageBlockV1),
|
|
1151
|
-
configuration: nullishToOptional(
|
|
1154
|
+
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1152
1155
|
});
|
|
1153
1156
|
var DocumentationPageElementDataV1 = _zod.z.object({
|
|
1157
|
+
dataVersion: _zod.z.literal(1).optional().default(1),
|
|
1154
1158
|
value: DocumentationPageDataV1
|
|
1155
1159
|
});
|
|
1160
|
+
var DocumentationItemHeaderV2 = _zod.z.object({
|
|
1161
|
+
description: _zod.z.string(),
|
|
1162
|
+
alignment: DocumentationItemHeaderAlignmentSchema,
|
|
1163
|
+
foregroundColor: PageBlockColorV2.nullish(),
|
|
1164
|
+
backgroundColor: PageBlockColorV2.nullish(),
|
|
1165
|
+
backgroundImageAsset: DocumentationPageAsset.nullish(),
|
|
1166
|
+
backgroundImageScaleType: DocumentationItemHeaderImageScaleTypeSchema,
|
|
1167
|
+
showBackgroundOverlay: _zod.z.boolean(),
|
|
1168
|
+
showCoverText: _zod.z.boolean(),
|
|
1169
|
+
minHeight: _zod.z.number().nullish()
|
|
1170
|
+
});
|
|
1171
|
+
var defaultDocumentationItemHeaderV2 = {
|
|
1172
|
+
alignment: DocumentationItemHeaderAlignment.Left,
|
|
1173
|
+
backgroundImageScaleType: DocumentationItemHeaderImageScaleType.AspectFill,
|
|
1174
|
+
description: "",
|
|
1175
|
+
showBackgroundOverlay: false,
|
|
1176
|
+
showCoverText: true
|
|
1177
|
+
};
|
|
1178
|
+
var DocumentationItemConfigurationV2 = _zod.z.object({
|
|
1179
|
+
showSidebar: _zod.z.boolean(),
|
|
1180
|
+
header: DocumentationItemHeaderV2
|
|
1181
|
+
});
|
|
1156
1182
|
var DocumentationPageDataV2 = _zod.z.object({
|
|
1157
|
-
configuration: nullishToOptional(
|
|
1183
|
+
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1158
1184
|
});
|
|
1159
1185
|
var DocumentationPageElementDataV2 = _zod.z.object({
|
|
1160
|
-
value:
|
|
1186
|
+
value: DocumentationPageDataV1,
|
|
1187
|
+
valueV2: DocumentationPageDataV2.optional()
|
|
1161
1188
|
});
|
|
1162
1189
|
var DurationUnit = _zod.z.enum(["Ms"]);
|
|
1163
1190
|
var DurationValue = _zod.z.object({
|
|
@@ -1228,12 +1255,17 @@ var GradientLayerData = tokenAliasOrValue(GradientLayerValue);
|
|
|
1228
1255
|
var GradientTokenValue = _zod.z.array(GradientLayerData);
|
|
1229
1256
|
var GradientTokenData = tokenAliasOrValue(GradientTokenValue);
|
|
1230
1257
|
var DocumentationGroupBehavior = _zod.z.enum(["Group", "Tabs"]);
|
|
1231
|
-
var
|
|
1258
|
+
var ElementGroupDataDeprecated = _zod.z.object({
|
|
1259
|
+
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1260
|
+
configuration: nullishToOptional(DocumentationItemConfigurationV1)
|
|
1261
|
+
});
|
|
1262
|
+
var ElementGroupDataV2 = _zod.z.object({
|
|
1232
1263
|
behavior: nullishToOptional(DocumentationGroupBehavior.optional()),
|
|
1233
|
-
configuration: nullishToOptional(
|
|
1264
|
+
configuration: nullishToOptional(DocumentationItemConfigurationV2)
|
|
1234
1265
|
});
|
|
1235
1266
|
var ElementGroupElementData = _zod.z.object({
|
|
1236
|
-
value:
|
|
1267
|
+
value: ElementGroupDataDeprecated.optional(),
|
|
1268
|
+
valueV2: ElementGroupDataV2.optional()
|
|
1237
1269
|
});
|
|
1238
1270
|
var LetterSpacingUnit = _zod.z.enum(["Pixels", "Rem", "Percent"]);
|
|
1239
1271
|
var LetterSpacingValue = _zod.z.object({
|
|
@@ -1324,8 +1356,8 @@ var DesignElementBase = _zod.z.object({
|
|
|
1324
1356
|
persistentId: _zod.z.string(),
|
|
1325
1357
|
meta: ObjectMeta,
|
|
1326
1358
|
designSystemVersionId: _zod.z.string(),
|
|
1327
|
-
createdAt: _zod.z.date(),
|
|
1328
|
-
updatedAt: _zod.z.date()
|
|
1359
|
+
createdAt: _zod.z.coerce.date(),
|
|
1360
|
+
updatedAt: _zod.z.coerce.date()
|
|
1329
1361
|
});
|
|
1330
1362
|
var DesignElementImportedBase = DesignElementBase.extend({
|
|
1331
1363
|
origin: DesignElementOrigin
|
|
@@ -1367,7 +1399,9 @@ var DocumentationPageV1 = DesignElementBase.extend(DesignElementGroupableRequire
|
|
|
1367
1399
|
});
|
|
1368
1400
|
var DocumentationPageV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend(DesignElementSlugPart.shape).extend({
|
|
1369
1401
|
shortPersistentId: _zod.z.string(),
|
|
1370
|
-
data: DocumentationPageDataV2
|
|
1402
|
+
data: DocumentationPageDataV2.extend({
|
|
1403
|
+
oldBlocks: _zod.z.array(PageBlockV1).optional()
|
|
1404
|
+
})
|
|
1371
1405
|
});
|
|
1372
1406
|
var FigmaFileStructureOrigin = _zod.z.object({
|
|
1373
1407
|
sourceId: _zod.z.string(),
|
|
@@ -1387,7 +1421,7 @@ var FigmaNodeReference = DesignElementBase.extend({
|
|
|
1387
1421
|
var ElementGroup = DesignElementBase.extend(DesignElementGroupablePart.shape).extend(DesignElementSlugPart.shape).extend(DesignElementBrandedPart.partial().shape).extend({
|
|
1388
1422
|
shortPersistentId: _zod.z.string().optional(),
|
|
1389
1423
|
childType: DesignElementType,
|
|
1390
|
-
data:
|
|
1424
|
+
data: ElementGroupDataV2.optional()
|
|
1391
1425
|
});
|
|
1392
1426
|
var BrandedElementGroup = ElementGroup.extend(DesignElementBrandedPart.shape);
|
|
1393
1427
|
var PageBlockV2 = DesignElementBase.extend(DesignElementGroupableRequiredPart.shape).extend({
|
|
@@ -2052,8 +2086,8 @@ var DocumentationPageGroup = _zod.z.object({
|
|
|
2052
2086
|
title: _zod.z.string(),
|
|
2053
2087
|
slug: _zod.z.string(),
|
|
2054
2088
|
userSlug: _zod.z.string().nullish(),
|
|
2055
|
-
createdAt: _zod.z.date(),
|
|
2056
|
-
updatedAt: _zod.z.date()
|
|
2089
|
+
createdAt: _zod.z.coerce.date(),
|
|
2090
|
+
updatedAt: _zod.z.coerce.date()
|
|
2057
2091
|
});
|
|
2058
2092
|
var DocumentationPage = _zod.z.object({
|
|
2059
2093
|
type: _zod.z.literal("DocumentationPage"),
|
|
@@ -2066,8 +2100,8 @@ var DocumentationPage = _zod.z.object({
|
|
|
2066
2100
|
title: _zod.z.string(),
|
|
2067
2101
|
slug: _zod.z.string(),
|
|
2068
2102
|
userSlug: _zod.z.string().nullish(),
|
|
2069
|
-
createdAt: _zod.z.date(),
|
|
2070
|
-
updatedAt: _zod.z.date()
|
|
2103
|
+
createdAt: _zod.z.coerce.date(),
|
|
2104
|
+
updatedAt: _zod.z.coerce.date()
|
|
2071
2105
|
});
|
|
2072
2106
|
var NpmRegistryAuthType = _zod.z.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
2073
2107
|
var registryTypesWithoutAzure = ["NPMJS", "GitHub", "Artifactory", "Custom"];
|
|
@@ -2179,8 +2213,8 @@ var CreateWorkspaceInput = _zod.z.object({
|
|
|
2179
2213
|
var WorkspaceInvitation = _zod.z.object({
|
|
2180
2214
|
id: _zod.z.string(),
|
|
2181
2215
|
email: _zod.z.string().email(),
|
|
2182
|
-
createdAt: _zod.z.date(),
|
|
2183
|
-
resentAt: _zod.z.date().nullish(),
|
|
2216
|
+
createdAt: _zod.z.coerce.date(),
|
|
2217
|
+
resentAt: _zod.z.coerce.date().nullish(),
|
|
2184
2218
|
role: _zod.z.nativeEnum(WorkspaceRole),
|
|
2185
2219
|
workspaceId: _zod.z.string(),
|
|
2186
2220
|
invitedBy: _zod.z.string()
|
|
@@ -2217,8 +2251,8 @@ var DesignSystem = _zod.z.object({
|
|
|
2217
2251
|
docViewUrl: nullishToOptional(_zod.z.string()),
|
|
2218
2252
|
basePrefixes: _zod.z.array(_zod.z.string()),
|
|
2219
2253
|
designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
|
|
2220
|
-
createdAt: _zod.z.date(),
|
|
2221
|
-
updatedAt: _zod.z.date()
|
|
2254
|
+
createdAt: _zod.z.coerce.date(),
|
|
2255
|
+
updatedAt: _zod.z.coerce.date()
|
|
2222
2256
|
});
|
|
2223
2257
|
var DesignSystemWithWorkspace = _zod.z.object({
|
|
2224
2258
|
designSystem: DesignSystem,
|
|
@@ -2266,9 +2300,9 @@ var PublishedDocRoutingVersion = _zod.z.enum(["1", "2"]);
|
|
|
2266
2300
|
var PublishedDoc = _zod.z.object({
|
|
2267
2301
|
id: _zod.z.string(),
|
|
2268
2302
|
designSystemVersionId: _zod.z.string(),
|
|
2269
|
-
createdAt: _zod.z.date(),
|
|
2270
|
-
updatedAt: _zod.z.date(),
|
|
2271
|
-
lastPublishedAt: _zod.z.date(),
|
|
2303
|
+
createdAt: _zod.z.coerce.date(),
|
|
2304
|
+
updatedAt: _zod.z.coerce.date(),
|
|
2305
|
+
lastPublishedAt: _zod.z.coerce.date(),
|
|
2272
2306
|
isDefault: _zod.z.boolean(),
|
|
2273
2307
|
isPublic: _zod.z.boolean(),
|
|
2274
2308
|
environment: PublishedDocEnvironment,
|
|
@@ -2543,11 +2577,11 @@ var User = _zod.z.object({
|
|
|
2543
2577
|
id: _zod.z.string(),
|
|
2544
2578
|
email: _zod.z.string(),
|
|
2545
2579
|
emailVerified: _zod.z.boolean(),
|
|
2546
|
-
createdAt: _zod.z.date(),
|
|
2547
|
-
trialExpiresAt: _zod.z.date().optional(),
|
|
2580
|
+
createdAt: _zod.z.coerce.date(),
|
|
2581
|
+
trialExpiresAt: _zod.z.coerce.date().optional(),
|
|
2548
2582
|
profile: UserProfile,
|
|
2549
2583
|
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
2550
|
-
loggedOutAt: _zod.z.date().optional(),
|
|
2584
|
+
loggedOutAt: _zod.z.coerce.date().optional(),
|
|
2551
2585
|
isProtected: _zod.z.boolean()
|
|
2552
2586
|
});
|
|
2553
2587
|
var NpmProxyToken = _zod.z.object({
|
|
@@ -2560,7 +2594,7 @@ var SessionData = _zod.z.object({
|
|
|
2560
2594
|
});
|
|
2561
2595
|
var Session = _zod.z.object({
|
|
2562
2596
|
id: _zod.z.string(),
|
|
2563
|
-
expiresAt: _zod.z.date(),
|
|
2597
|
+
expiresAt: _zod.z.coerce.date(),
|
|
2564
2598
|
userId: _zod.z.string().nullable(),
|
|
2565
2599
|
data: SessionData
|
|
2566
2600
|
});
|
|
@@ -2577,7 +2611,7 @@ var FeatureFlagMap = _zod.z.record(FlaggedFeature, _zod.z.boolean());
|
|
|
2577
2611
|
var FeatureFlag = _zod.z.object({
|
|
2578
2612
|
id: _zod.z.string(),
|
|
2579
2613
|
feature: FlaggedFeature,
|
|
2580
|
-
createdAt: _zod.z.date(),
|
|
2614
|
+
createdAt: _zod.z.coerce.date(),
|
|
2581
2615
|
enabled: _zod.z.boolean()
|
|
2582
2616
|
});
|
|
2583
2617
|
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
@@ -2595,7 +2629,7 @@ var ExternalOAuthRequest = _zod.z.object({
|
|
|
2595
2629
|
provider: OAuthProviderSchema,
|
|
2596
2630
|
userId: _zod.z.string(),
|
|
2597
2631
|
state: _zod.z.string(),
|
|
2598
|
-
createdAt: _zod.z.date()
|
|
2632
|
+
createdAt: _zod.z.coerce.date()
|
|
2599
2633
|
});
|
|
2600
2634
|
var IntegrationTokenSchema = _zod.z.object({
|
|
2601
2635
|
id: _zod.z.string(),
|
|
@@ -2604,7 +2638,7 @@ var IntegrationTokenSchema = _zod.z.object({
|
|
|
2604
2638
|
userId: _zod.z.string(),
|
|
2605
2639
|
accessToken: _zod.z.string(),
|
|
2606
2640
|
refreshToken: _zod.z.string(),
|
|
2607
|
-
expiresAt: _zod.z.date(),
|
|
2641
|
+
expiresAt: _zod.z.coerce.date(),
|
|
2608
2642
|
externalUserId: _zod.z.string().nullish()
|
|
2609
2643
|
});
|
|
2610
2644
|
var DesignSystemVersionRoom = Entity.extend({
|
|
@@ -2672,11 +2706,11 @@ var PersonalAccessToken = _zod.z.object({
|
|
|
2672
2706
|
userId: _zod.z.string(),
|
|
2673
2707
|
name: _zod.z.string(),
|
|
2674
2708
|
token: _zod.z.string(),
|
|
2675
|
-
createdAt: _zod.z.date(),
|
|
2709
|
+
createdAt: _zod.z.coerce.date(),
|
|
2676
2710
|
hidden: _zod.z.boolean(),
|
|
2677
2711
|
workspaceId: _zod.z.string().optional(),
|
|
2678
2712
|
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
2679
|
-
expireAt: _zod.z.date().optional(),
|
|
2713
|
+
expireAt: _zod.z.coerce.date().optional(),
|
|
2680
2714
|
scope: _zod.z.string().optional()
|
|
2681
2715
|
});
|
|
2682
2716
|
var SupernovaException = class _SupernovaException extends Error {
|
|
@@ -3449,7 +3483,7 @@ function documentationPagesToDTOV2(pages, groups) {
|
|
|
3449
3483
|
...documentationPageToStructureDTOV2(page, pathsMap),
|
|
3450
3484
|
configuration: _nullishCoalesce(page.data.configuration, () => ( {
|
|
3451
3485
|
showSidebar: true,
|
|
3452
|
-
header:
|
|
3486
|
+
header: defaultDocumentationItemHeaderV2
|
|
3453
3487
|
}))
|
|
3454
3488
|
};
|
|
3455
3489
|
});
|
|
@@ -3487,7 +3521,7 @@ function elementGroupsToDocumentationGroupDTO(groups, pages) {
|
|
|
3487
3521
|
...elementGroupToDocumentationGroupStructureDTO(group, childrenIdsMap),
|
|
3488
3522
|
configuration: _nullishCoalesce(_optionalChain([group, 'access', _4 => _4.data, 'optionalAccess', _5 => _5.configuration]), () => ( {
|
|
3489
3523
|
showSidebar: true,
|
|
3490
|
-
header:
|
|
3524
|
+
header: defaultDocumentationItemHeaderV2
|
|
3491
3525
|
}))
|
|
3492
3526
|
};
|
|
3493
3527
|
});
|
|
@@ -3556,7 +3590,7 @@ function documentationPagesToDTOV1(pages, groups) {
|
|
|
3556
3590
|
userSlug: page.userSlug,
|
|
3557
3591
|
configuration: _nullishCoalesce(page.data.configuration, () => ( {
|
|
3558
3592
|
showSidebar: true,
|
|
3559
|
-
header:
|
|
3593
|
+
header: defaultDocumentationItemHeaderV1
|
|
3560
3594
|
})),
|
|
3561
3595
|
createdAt: page.createdAt,
|
|
3562
3596
|
updatedAt: page.updatedAt,
|
|
@@ -3578,7 +3612,7 @@ var DTODesignSystem = DesignSystem.omit({
|
|
|
3578
3612
|
|
|
3579
3613
|
// src/api/dto/elements/documentation/group.ts
|
|
3580
3614
|
|
|
3581
|
-
var
|
|
3615
|
+
var DTODocumentationGroupStructureV2 = ElementGroup.omit({
|
|
3582
3616
|
sortOrder: true,
|
|
3583
3617
|
parentPersistentId: true,
|
|
3584
3618
|
brandPersistentId: true,
|
|
@@ -3594,15 +3628,15 @@ var DTODocumentationGroupStructure = ElementGroup.omit({
|
|
|
3594
3628
|
shortPersistentId: _zod.z.string(),
|
|
3595
3629
|
type: _zod.z.literal("Group")
|
|
3596
3630
|
});
|
|
3597
|
-
var
|
|
3598
|
-
configuration:
|
|
3631
|
+
var DTODocumentationGroupV2 = DTODocumentationGroupStructureV2.extend({
|
|
3632
|
+
configuration: DocumentationItemConfigurationV2
|
|
3599
3633
|
});
|
|
3600
3634
|
var DTOCreateDocumentationGroupInput = _zod.z.object({
|
|
3601
3635
|
// Identifier
|
|
3602
3636
|
persistentId: _zod.z.string().uuid(),
|
|
3603
3637
|
// Group properties
|
|
3604
3638
|
title: _zod.z.string(),
|
|
3605
|
-
configuration:
|
|
3639
|
+
configuration: DocumentationItemConfigurationV2.optional(),
|
|
3606
3640
|
groupBehavior: DocumentationGroupBehavior,
|
|
3607
3641
|
// Group placement properties
|
|
3608
3642
|
afterPersistentId: _zod.z.string().uuid().optional(),
|
|
@@ -3613,7 +3647,7 @@ var DTOUpdateDocumentationGroupInput = _zod.z.object({
|
|
|
3613
3647
|
id: _zod.z.string().uuid(),
|
|
3614
3648
|
// Group properties
|
|
3615
3649
|
title: _zod.z.string().optional(),
|
|
3616
|
-
configuration:
|
|
3650
|
+
configuration: DocumentationItemConfigurationV2.optional()
|
|
3617
3651
|
});
|
|
3618
3652
|
var DTOMoveDocumentationGroupInput = _zod.z.object({
|
|
3619
3653
|
// Identifier of the group to update
|
|
@@ -3710,18 +3744,18 @@ var DTODocumentationPageStructureV2 = DocumentationPageV2.omit({
|
|
|
3710
3744
|
type: _zod.z.literal("Page")
|
|
3711
3745
|
});
|
|
3712
3746
|
var DTODocumentationPageV2 = DTODocumentationPageStructureV2.extend({
|
|
3713
|
-
configuration:
|
|
3747
|
+
configuration: DocumentationItemConfigurationV2
|
|
3714
3748
|
});
|
|
3715
3749
|
var DTODocumentationHierarchyV2 = _zod.z.object({
|
|
3716
3750
|
pages: _zod.z.array(DTODocumentationPageStructureV2),
|
|
3717
|
-
groups: _zod.z.array(
|
|
3751
|
+
groups: _zod.z.array(DTODocumentationGroupStructureV2)
|
|
3718
3752
|
});
|
|
3719
3753
|
var DTOCreateDocumentationPageInputV2 = _zod.z.object({
|
|
3720
3754
|
// Identifier
|
|
3721
3755
|
persistentId: _zod.z.string().uuid(),
|
|
3722
3756
|
// Page properties
|
|
3723
3757
|
title: _zod.z.string(),
|
|
3724
|
-
configuration:
|
|
3758
|
+
configuration: DocumentationItemConfigurationV2.optional(),
|
|
3725
3759
|
// Page placement properties
|
|
3726
3760
|
parentPersistentId: _zod.z.string().uuid(),
|
|
3727
3761
|
afterPersistentId: _zod.z.string().uuid().optional()
|
|
@@ -3731,7 +3765,7 @@ var DTOUpdateDocumentationPageInputV2 = _zod.z.object({
|
|
|
3731
3765
|
id: _zod.z.string(),
|
|
3732
3766
|
// Page properties
|
|
3733
3767
|
title: _zod.z.string().optional(),
|
|
3734
|
-
configuration:
|
|
3768
|
+
configuration: DocumentationItemConfigurationV2.optional()
|
|
3735
3769
|
});
|
|
3736
3770
|
var DTOMoveDocumentationPageInputV2 = _zod.z.object({
|
|
3737
3771
|
// Identifier of the group to update
|
|
@@ -3866,7 +3900,7 @@ function documentationHierarchyToYjs(doc, transaction) {
|
|
|
3866
3900
|
...page,
|
|
3867
3901
|
data: {}
|
|
3868
3902
|
};
|
|
3869
|
-
pagesMap.set(page.id, sanitizedPage);
|
|
3903
|
+
pagesMap.set(page.id, JSON.parse(JSON.stringify(sanitizedPage)));
|
|
3870
3904
|
});
|
|
3871
3905
|
const groupsMap = getGroupsYMap(trx.doc);
|
|
3872
3906
|
transaction.groupIdsToDelete.forEach((id) => {
|
|
@@ -3877,7 +3911,7 @@ function documentationHierarchyToYjs(doc, transaction) {
|
|
|
3877
3911
|
...group,
|
|
3878
3912
|
data: {}
|
|
3879
3913
|
};
|
|
3880
|
-
groupsMap.set(group.id,
|
|
3914
|
+
groupsMap.set(group.id, JSON.parse(JSON.stringify(sanitizedGroup)));
|
|
3881
3915
|
});
|
|
3882
3916
|
});
|
|
3883
3917
|
return doc;
|
|
@@ -3907,11 +3941,11 @@ function getGroupsYMap(doc) {
|
|
|
3907
3941
|
|
|
3908
3942
|
var DTODocumentationPageRoomHeaderData = _zod.z.object({
|
|
3909
3943
|
title: _zod.z.string(),
|
|
3910
|
-
configuration:
|
|
3944
|
+
configuration: DocumentationItemConfigurationV2
|
|
3911
3945
|
});
|
|
3912
3946
|
var DTODocumentationPageRoomHeaderDataUpdate = _zod.z.object({
|
|
3913
3947
|
title: _zod.z.string().optional(),
|
|
3914
|
-
configuration:
|
|
3948
|
+
configuration: DocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
3915
3949
|
});
|
|
3916
3950
|
function itemConfigurationToYjs(yDoc, item) {
|
|
3917
3951
|
yDoc.transact((trx) => {
|
|
@@ -3960,7 +3994,7 @@ function yjsToItemConfiguration(yDoc) {
|
|
|
3960
3994
|
};
|
|
3961
3995
|
return {
|
|
3962
3996
|
title: _zod.z.string().parse(title),
|
|
3963
|
-
configuration:
|
|
3997
|
+
configuration: DocumentationItemConfigurationV2.parse(rawConfig)
|
|
3964
3998
|
};
|
|
3965
3999
|
}
|
|
3966
4000
|
|
|
@@ -8157,5 +8191,5 @@ function mapByUnique2(items, keyFn) {
|
|
|
8157
8191
|
|
|
8158
8192
|
|
|
8159
8193
|
|
|
8160
|
-
exports.BlockDefinitionUtils = BlockDefinitionUtils; exports.BlockParsingUtils = BlockParsingUtils; exports.DTOCreateDocumentationGroupInput = DTOCreateDocumentationGroupInput; exports.DTOCreateDocumentationPageInputV2 = DTOCreateDocumentationPageInputV2; exports.DTOCreateDocumentationTabGroupInput = DTOCreateDocumentationTabGroupInput; exports.DTODeleteDocumentationGroupInput = DTODeleteDocumentationGroupInput; exports.DTODeleteDocumentationPageInputV2 = DTODeleteDocumentationPageInputV2; exports.DTODeleteDocumentationTabGroupInput = DTODeleteDocumentationTabGroupInput; exports.DTODesignSystem = DTODesignSystem; exports.
|
|
8194
|
+
exports.BlockDefinitionUtils = BlockDefinitionUtils; exports.BlockParsingUtils = BlockParsingUtils; exports.DTOCreateDocumentationGroupInput = DTOCreateDocumentationGroupInput; exports.DTOCreateDocumentationPageInputV2 = DTOCreateDocumentationPageInputV2; exports.DTOCreateDocumentationTabGroupInput = DTOCreateDocumentationTabGroupInput; exports.DTODeleteDocumentationGroupInput = DTODeleteDocumentationGroupInput; exports.DTODeleteDocumentationPageInputV2 = DTODeleteDocumentationPageInputV2; exports.DTODeleteDocumentationTabGroupInput = DTODeleteDocumentationTabGroupInput; exports.DTODesignSystem = DTODesignSystem; exports.DTODocumentationGroupCreateActionInputV2 = DTODocumentationGroupCreateActionInputV2; exports.DTODocumentationGroupCreateActionOutputV2 = DTODocumentationGroupCreateActionOutputV2; exports.DTODocumentationGroupDeleteActionInputV2 = DTODocumentationGroupDeleteActionInputV2; exports.DTODocumentationGroupDeleteActionOutputV2 = DTODocumentationGroupDeleteActionOutputV2; exports.DTODocumentationGroupDuplicateActionInputV2 = DTODocumentationGroupDuplicateActionInputV2; exports.DTODocumentationGroupDuplicateActionOutputV2 = DTODocumentationGroupDuplicateActionOutputV2; exports.DTODocumentationGroupMoveActionInputV2 = DTODocumentationGroupMoveActionInputV2; exports.DTODocumentationGroupMoveActionOutputV2 = DTODocumentationGroupMoveActionOutputV2; exports.DTODocumentationGroupStructureV2 = DTODocumentationGroupStructureV2; exports.DTODocumentationGroupUpdateActionInputV2 = DTODocumentationGroupUpdateActionInputV2; exports.DTODocumentationGroupUpdateActionOutputV2 = DTODocumentationGroupUpdateActionOutputV2; exports.DTODocumentationGroupV2 = DTODocumentationGroupV2; exports.DTODocumentationHierarchyV2 = DTODocumentationHierarchyV2; exports.DTODocumentationPageCreateActionInputV2 = DTODocumentationPageCreateActionInputV2; exports.DTODocumentationPageCreateActionOutputV2 = DTODocumentationPageCreateActionOutputV2; exports.DTODocumentationPageDeleteActionInputV2 = DTODocumentationPageDeleteActionInputV2; exports.DTODocumentationPageDeleteActionOutputV2 = DTODocumentationPageDeleteActionOutputV2; exports.DTODocumentationPageDuplicateActionInputV2 = DTODocumentationPageDuplicateActionInputV2; exports.DTODocumentationPageDuplicateActionOutputV2 = DTODocumentationPageDuplicateActionOutputV2; exports.DTODocumentationPageMoveActionInputV2 = DTODocumentationPageMoveActionInputV2; exports.DTODocumentationPageMoveActionOutputV2 = DTODocumentationPageMoveActionOutputV2; exports.DTODocumentationPageRoomHeaderData = DTODocumentationPageRoomHeaderData; exports.DTODocumentationPageRoomHeaderDataUpdate = DTODocumentationPageRoomHeaderDataUpdate; exports.DTODocumentationPageStructureV2 = DTODocumentationPageStructureV2; exports.DTODocumentationPageUpdateActionInputV2 = DTODocumentationPageUpdateActionInputV2; exports.DTODocumentationPageUpdateActionOutputV2 = DTODocumentationPageUpdateActionOutputV2; exports.DTODocumentationPageV2 = DTODocumentationPageV2; exports.DTODuplicateDocumentationGroupInput = DTODuplicateDocumentationGroupInput; exports.DTODuplicateDocumentationPageInputV2 = DTODuplicateDocumentationPageInputV2; exports.DTOElementActionInput = DTOElementActionInput; exports.DTOElementActionOutput = DTOElementActionOutput; exports.DTOGetBlockDefinitionsOutput = DTOGetBlockDefinitionsOutput; exports.DTOLiveblocksAuthRequest = DTOLiveblocksAuthRequest; exports.DTOMoveDocumentationGroupInput = DTOMoveDocumentationGroupInput; exports.DTOMoveDocumentationPageInputV2 = DTOMoveDocumentationPageInputV2; exports.DTOUpdateDocumentationGroupInput = DTOUpdateDocumentationGroupInput; exports.DTOUpdateDocumentationPageInputV2 = DTOUpdateDocumentationPageInputV2; exports.DocumentationPageEditorModel = DocumentationPageEditorModel; exports.DocumentationPageV1DTO = DocumentationPageV1DTO; exports.PageBlockEditorModel = PageBlockEditorModel2; exports.blockDefinitionForBlock = blockDefinitionForBlock; exports.blockToProsemirrorNode = blockToProsemirrorNode; exports.buildDocPagePublishPaths = buildDocPagePublishPaths; exports.calculateElementParentChain = calculateElementParentChain; exports.documentationElementsToHierarchyDto = documentationElementsToHierarchyDto; exports.documentationHierarchyToYjs = documentationHierarchyToYjs; exports.documentationPagesToDTOV1 = documentationPagesToDTOV1; exports.documentationPagesToDTOV2 = documentationPagesToDTOV2; exports.documentationPagesToStructureDTOV2 = documentationPagesToStructureDTOV2; exports.elementGroupsToDocumentationGroupDTO = elementGroupsToDocumentationGroupDTO; exports.elementGroupsToDocumentationGroupStructureDTO = elementGroupsToDocumentationGroupStructureDTO; exports.getMockPageBlockDefinitions = getMockPageBlockDefinitions; exports.itemConfigurationToYjs = itemConfigurationToYjs; exports.pageToProsemirrorDoc = pageToProsemirrorDoc; exports.pageToYXmlFragment = pageToYXmlFragment; exports.pmSchema = pmSchema; exports.prosemirrorDocToPage = prosemirrorDocToPage; exports.prosemirrorNodeToBlock = prosemirrorNodeToBlock; exports.serializeAsCustomBlock = serializeAsCustomBlock; exports.yDocToPage = yDocToPage; exports.yXmlFragmentToPage = yXmlFragmentToPage; exports.yjsToDocumentationHierarchy = yjsToDocumentationHierarchy; exports.yjsToItemConfiguration = yjsToItemConfiguration;
|
|
8161
8195
|
//# sourceMappingURL=index.js.map
|