@supernova-studio/client 0.40.0 → 0.42.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 +6672 -2394
- package/dist/index.d.ts +6672 -2394
- package/dist/index.js +349 -70
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1091 -812
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/api/conversion/design-systems/elements/properties/property-definition.ts +1 -1
- package/src/api/conversion/design-systems/elements/properties/property-value.ts +1 -1
- package/src/api/conversion/documentation/documentation-group-v2-to-dto.ts +3 -11
- package/src/api/conversion/documentation/documentation-item-configuration-v1-to-dto.ts +4 -0
- package/src/api/conversion/documentation/documentation-item-configuration-v2-to-dto.ts +32 -0
- package/src/api/conversion/documentation/documentation-page-v2-to-dto.ts +3 -5
- package/src/api/conversion/documentation/index.ts +1 -0
- package/src/api/dto/design-systems/brand.ts +5 -0
- package/src/api/dto/design-systems/design-system.ts +2 -0
- package/src/api/dto/design-systems/exporter-property.ts +8 -0
- package/src/api/dto/design-systems/index.ts +1 -0
- package/src/api/dto/documentation/anchor.ts +15 -0
- package/src/api/dto/documentation/index.ts +1 -0
- package/src/api/dto/elements/documentation/group-v2.ts +8 -7
- package/src/api/dto/elements/documentation/index.ts +2 -0
- package/src/api/dto/elements/documentation/item-configuration-v1.ts +2 -0
- package/src/api/dto/elements/documentation/item-configuration-v2.ts +14 -0
- package/src/api/dto/elements/documentation/page-content.ts +15 -0
- package/src/api/dto/elements/documentation/page-v2.ts +8 -7
- package/src/api/dto/elements/elements-action-v2.ts +30 -12
- package/src/api/dto/elements/properties/index.ts +1 -0
- package/src/api/dto/elements/properties/property-definitions-actions-v2.ts +53 -0
- package/src/api/dto/elements/properties/property-definitions.ts +38 -3
- package/src/api/dto/workspaces/index.ts +1 -0
- package/src/api/dto/workspaces/integrations.ts +16 -0
- package/src/api/payloads/design-systems/brand.ts +11 -0
- package/src/api/payloads/design-systems/index.ts +2 -0
- package/src/api/payloads/design-systems/version.ts +18 -0
- package/src/api/payloads/index.ts +1 -0
- package/src/api/payloads/workspaces/index.ts +1 -0
- package/src/api/payloads/workspaces/workspace-integrations.ts +8 -0
- package/src/yjs/design-system-content/item-configuration.ts +14 -9
- package/src/yjs/docs-editor/blocks-to-prosemirror.ts +11 -5
- package/src/yjs/docs-editor/prosemirror-to-blocks.ts +9 -3
package/dist/index.mjs
CHANGED
|
@@ -193,41 +193,46 @@ import { z as z100 } from "zod";
|
|
|
193
193
|
import { z as z101 } from "zod";
|
|
194
194
|
import { z as z102 } from "zod";
|
|
195
195
|
import { z as z103 } from "zod";
|
|
196
|
-
import { z as z113 } from "zod";
|
|
197
196
|
import { z as z104 } from "zod";
|
|
197
|
+
import { z as z114 } from "zod";
|
|
198
198
|
import { z as z105 } from "zod";
|
|
199
|
-
import { z as z107 } from "zod";
|
|
200
199
|
import { z as z106 } from "zod";
|
|
201
|
-
import { z as z109 } from "zod";
|
|
202
200
|
import { z as z108 } from "zod";
|
|
203
|
-
import
|
|
201
|
+
import { z as z107 } from "zod";
|
|
204
202
|
import { z as z110 } from "zod";
|
|
203
|
+
import { z as z109 } from "zod";
|
|
204
|
+
import IPCIDR from "ip-cidr";
|
|
205
205
|
import { z as z111 } from "zod";
|
|
206
206
|
import { z as z112 } from "zod";
|
|
207
|
-
import { z as
|
|
207
|
+
import { z as z113 } from "zod";
|
|
208
208
|
import { z as z115 } from "zod";
|
|
209
209
|
import { z as z116 } from "zod";
|
|
210
210
|
import { z as z117 } from "zod";
|
|
211
211
|
import { z as z118 } from "zod";
|
|
212
212
|
import { z as z119 } from "zod";
|
|
213
213
|
import { z as z120 } from "zod";
|
|
214
|
-
import { z as z123 } from "zod";
|
|
215
214
|
import { z as z121 } from "zod";
|
|
216
215
|
import { z as z122 } from "zod";
|
|
216
|
+
import { z as z123 } from "zod";
|
|
217
|
+
import { z as z126 } from "zod";
|
|
217
218
|
import { z as z124 } from "zod";
|
|
218
|
-
import { z as z129 } from "zod";
|
|
219
219
|
import { z as z125 } from "zod";
|
|
220
|
-
import { z as z126 } from "zod";
|
|
221
220
|
import { z as z127 } from "zod";
|
|
221
|
+
import { z as z132 } from "zod";
|
|
222
222
|
import { z as z128 } from "zod";
|
|
223
|
+
import { z as z129 } from "zod";
|
|
223
224
|
import { z as z130 } from "zod";
|
|
224
|
-
import { z as z132 } from "zod";
|
|
225
225
|
import { z as z131 } from "zod";
|
|
226
226
|
import { z as z133 } from "zod";
|
|
227
|
-
import { z as z134 } from "zod";
|
|
228
227
|
import { z as z135 } from "zod";
|
|
228
|
+
import { z as z134 } from "zod";
|
|
229
229
|
import { z as z136 } from "zod";
|
|
230
230
|
import { z as z137 } from "zod";
|
|
231
|
+
import { z as z138 } from "zod";
|
|
232
|
+
import { z as z139 } from "zod";
|
|
233
|
+
import { z as z140 } from "zod";
|
|
234
|
+
import { z as z141 } from "zod";
|
|
235
|
+
import { z as z142 } from "zod";
|
|
231
236
|
import slugifyImplementation from "@sindresorhus/slugify";
|
|
232
237
|
var PluginOAuthRequestSchema = z.object({
|
|
233
238
|
id: z.string(),
|
|
@@ -715,6 +720,7 @@ var HierarchicalElements = DesignTokenType.or(
|
|
|
715
720
|
var ElementPropertyTypeSchema = z30.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
|
|
716
721
|
var ElementPropertyTargetType = z30.enum(["Token", "Component", "DocumentationPage"]);
|
|
717
722
|
var ElementPropertyLinkType = z30.enum(["FigmaComponent", "DocumentationPage"]);
|
|
723
|
+
var CODE_NAME_REGEX = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
718
724
|
var ColorTokenInlineData = z30.object({
|
|
719
725
|
value: z30.string()
|
|
720
726
|
});
|
|
@@ -728,7 +734,7 @@ var ElementPropertyDefinition = z30.object({
|
|
|
728
734
|
designSystemVersionId: z30.string(),
|
|
729
735
|
persistentId: z30.string(),
|
|
730
736
|
name: z30.string(),
|
|
731
|
-
codeName: z30.string(),
|
|
737
|
+
codeName: z30.string().regex(CODE_NAME_REGEX),
|
|
732
738
|
description: z30.string(),
|
|
733
739
|
type: ElementPropertyTypeSchema,
|
|
734
740
|
targetElementType: ElementPropertyTargetType,
|
|
@@ -885,6 +891,7 @@ var PageBlockShortcut = z34.object({
|
|
|
885
891
|
asset: nullishToOptional(PageBlockAsset),
|
|
886
892
|
documentationItemId: nullishToOptional(z34.string()),
|
|
887
893
|
url: nullishToOptional(z34.string()),
|
|
894
|
+
openInNewTab: nullishToOptional(z34.boolean()),
|
|
888
895
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
889
896
|
documentationItemPreview: nullishToOptional(PageBlockLinkPreview)
|
|
890
897
|
});
|
|
@@ -942,7 +949,9 @@ var PageBlockTextSpanAttribute = z34.object({
|
|
|
942
949
|
type: PageBlockTextSpanAttributeType,
|
|
943
950
|
link: nullishToOptional(z34.string()),
|
|
944
951
|
documentationItemId: nullishToOptional(z34.string()),
|
|
945
|
-
openInNewWindow: nullishToOptional(z34.boolean())
|
|
952
|
+
openInNewWindow: nullishToOptional(z34.boolean()),
|
|
953
|
+
// deprecated. use openInNewTab
|
|
954
|
+
openInNewTab: nullishToOptional(z34.boolean())
|
|
946
955
|
});
|
|
947
956
|
var PageBlockTextSpan = z34.object({
|
|
948
957
|
text: z34.string(),
|
|
@@ -1247,6 +1256,8 @@ var defaultDocumentationItemHeaderV1 = {
|
|
|
1247
1256
|
};
|
|
1248
1257
|
var DocumentationItemConfigurationV1 = z38.object({
|
|
1249
1258
|
showSidebar: z38.boolean(),
|
|
1259
|
+
isPrivate: z38.boolean().optional(),
|
|
1260
|
+
isHidden: z38.boolean().optional(),
|
|
1250
1261
|
header: DocumentationItemHeaderV1
|
|
1251
1262
|
});
|
|
1252
1263
|
var DocumentationPageDataV1 = z39.object({
|
|
@@ -1273,6 +1284,8 @@ var defaultDocumentationItemHeaderV2 = {
|
|
|
1273
1284
|
};
|
|
1274
1285
|
var DocumentationItemConfigurationV2 = z41.object({
|
|
1275
1286
|
showSidebar: z41.boolean(),
|
|
1287
|
+
isPrivate: z41.boolean().optional(),
|
|
1288
|
+
isHidden: z41.boolean().optional(),
|
|
1276
1289
|
header: DocumentationItemHeaderV2
|
|
1277
1290
|
});
|
|
1278
1291
|
var DocumentationPageDataV2 = z42.object({
|
|
@@ -2240,387 +2253,424 @@ var DocumentationLinkPreview = z94.object({
|
|
|
2240
2253
|
description: z94.string().optional(),
|
|
2241
2254
|
thumbnail: PageBlockImageReference.optional()
|
|
2242
2255
|
});
|
|
2243
|
-
var
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
updatedAt: z95.coerce.date(),
|
|
2248
|
-
documentationPageId: z95.string(),
|
|
2249
|
-
documentationPageName: z95.string(),
|
|
2250
|
-
storagePath: z95.string()
|
|
2256
|
+
var DocumentationPageAnchor = z95.object({
|
|
2257
|
+
blockId: z95.string(),
|
|
2258
|
+
level: z95.number(),
|
|
2259
|
+
text: z95.string()
|
|
2251
2260
|
});
|
|
2252
|
-
var
|
|
2253
|
-
PageBlockEditorModelV2,
|
|
2254
|
-
PageSectionEditorModelV2
|
|
2255
|
-
]);
|
|
2256
|
-
var DocumentationPageContentData = z96.object({
|
|
2257
|
-
items: z96.array(DocumentationPageContentItem)
|
|
2258
|
-
});
|
|
2259
|
-
var DocumentationPageContent = z96.object({
|
|
2261
|
+
var DocumentationPageContentBackup = z96.object({
|
|
2260
2262
|
id: z96.string(),
|
|
2261
2263
|
designSystemVersionId: z96.string(),
|
|
2262
2264
|
createdAt: z96.coerce.date(),
|
|
2263
2265
|
updatedAt: z96.coerce.date(),
|
|
2264
2266
|
documentationPageId: z96.string(),
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
+
documentationPageName: z96.string(),
|
|
2268
|
+
storagePath: z96.string()
|
|
2267
2269
|
});
|
|
2268
|
-
var
|
|
2269
|
-
|
|
2270
|
+
var DocumentationPageContentItem = z97.discriminatedUnion("type", [
|
|
2271
|
+
PageBlockEditorModelV2,
|
|
2272
|
+
PageSectionEditorModelV2
|
|
2273
|
+
]);
|
|
2274
|
+
var DocumentationPageContentData = z97.object({
|
|
2275
|
+
items: z97.array(DocumentationPageContentItem)
|
|
2276
|
+
});
|
|
2277
|
+
var DocumentationPageContent = z97.object({
|
|
2270
2278
|
id: z97.string(),
|
|
2271
|
-
persistentId: z97.string(),
|
|
2272
|
-
shortPersistentId: z97.string(),
|
|
2273
2279
|
designSystemVersionId: z97.string(),
|
|
2274
|
-
parentPersistentId: z97.string().nullish(),
|
|
2275
|
-
sortOrder: z97.number(),
|
|
2276
|
-
title: z97.string(),
|
|
2277
|
-
slug: z97.string(),
|
|
2278
|
-
userSlug: z97.string().nullish(),
|
|
2279
2280
|
createdAt: z97.coerce.date(),
|
|
2280
|
-
updatedAt: z97.coerce.date()
|
|
2281
|
+
updatedAt: z97.coerce.date(),
|
|
2282
|
+
documentationPageId: z97.string(),
|
|
2283
|
+
data: DocumentationPageContentData
|
|
2284
|
+
});
|
|
2285
|
+
var DocumentationPage = z98.object({
|
|
2286
|
+
type: z98.literal("DocumentationPage"),
|
|
2287
|
+
id: z98.string(),
|
|
2288
|
+
persistentId: z98.string(),
|
|
2289
|
+
shortPersistentId: z98.string(),
|
|
2290
|
+
designSystemVersionId: z98.string(),
|
|
2291
|
+
parentPersistentId: z98.string().nullish(),
|
|
2292
|
+
sortOrder: z98.number(),
|
|
2293
|
+
title: z98.string(),
|
|
2294
|
+
slug: z98.string(),
|
|
2295
|
+
userSlug: z98.string().nullish(),
|
|
2296
|
+
createdAt: z98.coerce.date(),
|
|
2297
|
+
updatedAt: z98.coerce.date()
|
|
2281
2298
|
});
|
|
2282
2299
|
var DesignSystemVersionRoom = Entity.extend({
|
|
2283
|
-
designSystemVersionId:
|
|
2284
|
-
liveblocksId:
|
|
2300
|
+
designSystemVersionId: z99.string(),
|
|
2301
|
+
liveblocksId: z99.string()
|
|
2285
2302
|
});
|
|
2286
|
-
var DesignSystemVersionRoomInternalSettings =
|
|
2287
|
-
routingVersion:
|
|
2303
|
+
var DesignSystemVersionRoomInternalSettings = z99.object({
|
|
2304
|
+
routingVersion: z99.string()
|
|
2288
2305
|
});
|
|
2289
|
-
var DesignSystemVersionRoomInitialState =
|
|
2290
|
-
pages:
|
|
2291
|
-
groups:
|
|
2306
|
+
var DesignSystemVersionRoomInitialState = z99.object({
|
|
2307
|
+
pages: z99.array(DocumentationPageV2),
|
|
2308
|
+
groups: z99.array(ElementGroup),
|
|
2292
2309
|
internalSettings: DesignSystemVersionRoomInternalSettings
|
|
2293
2310
|
});
|
|
2294
|
-
var DesignSystemVersionRoomUpdate =
|
|
2295
|
-
pages:
|
|
2296
|
-
groups:
|
|
2297
|
-
deletedPageIds:
|
|
2298
|
-
deletedGroupIds:
|
|
2311
|
+
var DesignSystemVersionRoomUpdate = z99.object({
|
|
2312
|
+
pages: z99.array(DocumentationPageV2),
|
|
2313
|
+
groups: z99.array(ElementGroup),
|
|
2314
|
+
deletedPageIds: z99.array(z99.string()),
|
|
2315
|
+
deletedGroupIds: z99.array(z99.string())
|
|
2299
2316
|
});
|
|
2300
2317
|
var DocumentationPageRoom = Entity.extend({
|
|
2301
|
-
designSystemVersionId:
|
|
2302
|
-
documentationPageId:
|
|
2303
|
-
liveblocksId:
|
|
2304
|
-
isDirty:
|
|
2318
|
+
designSystemVersionId: z100.string(),
|
|
2319
|
+
documentationPageId: z100.string(),
|
|
2320
|
+
liveblocksId: z100.string(),
|
|
2321
|
+
isDirty: z100.boolean()
|
|
2305
2322
|
});
|
|
2306
|
-
var DocumentationPageRoomState =
|
|
2307
|
-
pageItems:
|
|
2323
|
+
var DocumentationPageRoomState = z100.object({
|
|
2324
|
+
pageItems: z100.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
2308
2325
|
itemConfiguration: DocumentationItemConfigurationV2
|
|
2309
2326
|
});
|
|
2310
|
-
var DocumentationPageRoomRoomUpdate =
|
|
2327
|
+
var DocumentationPageRoomRoomUpdate = z100.object({
|
|
2311
2328
|
page: DocumentationPageV2,
|
|
2312
2329
|
pageParent: ElementGroup
|
|
2313
2330
|
});
|
|
2314
2331
|
var DocumentationPageRoomInitialStateUpdate = DocumentationPageRoomRoomUpdate.extend({
|
|
2315
|
-
pageItems:
|
|
2316
|
-
blockDefinitions:
|
|
2332
|
+
pageItems: z100.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
2333
|
+
blockDefinitions: z100.array(PageBlockDefinition)
|
|
2317
2334
|
});
|
|
2318
2335
|
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
2319
2336
|
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
2320
2337
|
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
2321
2338
|
return RoomTypeEnum2;
|
|
2322
2339
|
})(RoomTypeEnum || {});
|
|
2323
|
-
var RoomTypeSchema =
|
|
2340
|
+
var RoomTypeSchema = z101.nativeEnum(RoomTypeEnum);
|
|
2324
2341
|
var RoomType = RoomTypeSchema.enum;
|
|
2325
|
-
var ElementViewBaseColumnType =
|
|
2326
|
-
var ElementViewColumnType =
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2342
|
+
var ElementViewBaseColumnType = z102.enum(["Name", "Description", "Value", "UpdatedAt"]);
|
|
2343
|
+
var ElementViewColumnType = z102.union([
|
|
2344
|
+
z102.literal("BaseProperty"),
|
|
2345
|
+
z102.literal("PropertyDefinition"),
|
|
2346
|
+
z102.literal("Theme")
|
|
2330
2347
|
]);
|
|
2331
|
-
var ElementViewColumnSharedAttributes =
|
|
2332
|
-
id:
|
|
2333
|
-
persistentId:
|
|
2334
|
-
elementDataViewId:
|
|
2335
|
-
sortPosition:
|
|
2336
|
-
width:
|
|
2348
|
+
var ElementViewColumnSharedAttributes = z102.object({
|
|
2349
|
+
id: z102.string(),
|
|
2350
|
+
persistentId: z102.string(),
|
|
2351
|
+
elementDataViewId: z102.string(),
|
|
2352
|
+
sortPosition: z102.number(),
|
|
2353
|
+
width: z102.number()
|
|
2337
2354
|
});
|
|
2338
2355
|
var ElementViewBasePropertyColumn = ElementViewColumnSharedAttributes.extend({
|
|
2339
|
-
type:
|
|
2356
|
+
type: z102.literal("BaseProperty"),
|
|
2340
2357
|
basePropertyType: ElementViewBaseColumnType
|
|
2341
2358
|
});
|
|
2342
2359
|
var ElementViewPropertyDefinitionColumn = ElementViewColumnSharedAttributes.extend({
|
|
2343
|
-
type:
|
|
2344
|
-
propertyDefinitionId:
|
|
2360
|
+
type: z102.literal("PropertyDefinition"),
|
|
2361
|
+
propertyDefinitionId: z102.string()
|
|
2345
2362
|
});
|
|
2346
2363
|
var ElementViewThemeColumn = ElementViewColumnSharedAttributes.extend({
|
|
2347
|
-
type:
|
|
2348
|
-
themeId:
|
|
2364
|
+
type: z102.literal("Theme"),
|
|
2365
|
+
themeId: z102.string()
|
|
2349
2366
|
});
|
|
2350
|
-
var ElementViewColumn =
|
|
2367
|
+
var ElementViewColumn = z102.discriminatedUnion("type", [
|
|
2351
2368
|
ElementViewBasePropertyColumn,
|
|
2352
2369
|
ElementViewPropertyDefinitionColumn,
|
|
2353
2370
|
ElementViewThemeColumn
|
|
2354
2371
|
]);
|
|
2355
|
-
var ElementView =
|
|
2356
|
-
id: z102.string(),
|
|
2357
|
-
persistentId: z102.string(),
|
|
2358
|
-
designSystemVersionId: z102.string(),
|
|
2359
|
-
name: z102.string(),
|
|
2360
|
-
description: z102.string(),
|
|
2361
|
-
targetElementType: ElementPropertyTargetType,
|
|
2362
|
-
isDefault: z102.boolean()
|
|
2363
|
-
});
|
|
2364
|
-
var Brand = z103.object({
|
|
2372
|
+
var ElementView = z103.object({
|
|
2365
2373
|
id: z103.string(),
|
|
2366
|
-
designSystemVersionId: z103.string(),
|
|
2367
2374
|
persistentId: z103.string(),
|
|
2375
|
+
designSystemVersionId: z103.string(),
|
|
2368
2376
|
name: z103.string(),
|
|
2369
|
-
description: z103.string()
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
var
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
var
|
|
2383
|
-
authType:
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2377
|
+
description: z103.string(),
|
|
2378
|
+
targetElementType: ElementPropertyTargetType,
|
|
2379
|
+
isDefault: z103.boolean()
|
|
2380
|
+
});
|
|
2381
|
+
var Brand = z104.object({
|
|
2382
|
+
id: z104.string(),
|
|
2383
|
+
designSystemVersionId: z104.string(),
|
|
2384
|
+
persistentId: z104.string(),
|
|
2385
|
+
name: z104.string(),
|
|
2386
|
+
description: z104.string()
|
|
2387
|
+
});
|
|
2388
|
+
var NpmRegistryAuthType = z105.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
2389
|
+
var NpmRegistryType = z105.enum(["NPMJS", "GitHub", "AzureDevOps", "Artifactory", "Custom"]);
|
|
2390
|
+
var NpmRegistryBasicAuthConfig = z105.object({
|
|
2391
|
+
authType: z105.literal(NpmRegistryAuthType.Enum.Basic),
|
|
2392
|
+
username: z105.string(),
|
|
2393
|
+
password: z105.string()
|
|
2394
|
+
});
|
|
2395
|
+
var NpmRegistryBearerAuthConfig = z105.object({
|
|
2396
|
+
authType: z105.literal(NpmRegistryAuthType.Enum.Bearer),
|
|
2397
|
+
accessToken: z105.string()
|
|
2398
|
+
});
|
|
2399
|
+
var NpmRegistryNoAuthConfig = z105.object({
|
|
2400
|
+
authType: z105.literal(NpmRegistryAuthType.Enum.None)
|
|
2401
|
+
});
|
|
2402
|
+
var NpmRegistrCustomAuthConfig = z105.object({
|
|
2403
|
+
authType: z105.literal(NpmRegistryAuthType.Enum.Custom),
|
|
2404
|
+
authHeaderName: z105.string(),
|
|
2405
|
+
authHeaderValue: z105.string()
|
|
2406
|
+
});
|
|
2407
|
+
var NpmRegistryAuthConfig = z105.discriminatedUnion("authType", [
|
|
2391
2408
|
NpmRegistryBasicAuthConfig,
|
|
2392
2409
|
NpmRegistryBearerAuthConfig,
|
|
2393
2410
|
NpmRegistryNoAuthConfig,
|
|
2394
2411
|
NpmRegistrCustomAuthConfig
|
|
2395
2412
|
]);
|
|
2396
|
-
var NpmRegistryConfigBase =
|
|
2413
|
+
var NpmRegistryConfigBase = z105.object({
|
|
2397
2414
|
registryType: NpmRegistryType,
|
|
2398
|
-
enabledScopes:
|
|
2399
|
-
customRegistryUrl:
|
|
2400
|
-
bypassProxy:
|
|
2401
|
-
npmProxyRegistryConfigId:
|
|
2402
|
-
npmProxyVersion:
|
|
2415
|
+
enabledScopes: z105.array(z105.string()),
|
|
2416
|
+
customRegistryUrl: z105.string().optional(),
|
|
2417
|
+
bypassProxy: z105.boolean().default(false),
|
|
2418
|
+
npmProxyRegistryConfigId: z105.string().optional(),
|
|
2419
|
+
npmProxyVersion: z105.number().optional()
|
|
2403
2420
|
});
|
|
2404
2421
|
var NpmRegistryConfig = NpmRegistryConfigBase.and(NpmRegistryAuthConfig);
|
|
2405
|
-
var SsoProvider =
|
|
2406
|
-
providerId:
|
|
2407
|
-
defaultAutoInviteValue:
|
|
2408
|
-
autoInviteDomains:
|
|
2409
|
-
skipDocsSupernovaLogin:
|
|
2410
|
-
areInvitesDisabled:
|
|
2411
|
-
isTestMode:
|
|
2412
|
-
emailDomains:
|
|
2413
|
-
metadataXml:
|
|
2414
|
-
});
|
|
2415
|
-
var WorkspaceRoleSchema =
|
|
2422
|
+
var SsoProvider = z106.object({
|
|
2423
|
+
providerId: z106.string(),
|
|
2424
|
+
defaultAutoInviteValue: z106.boolean(),
|
|
2425
|
+
autoInviteDomains: z106.record(z106.string(), z106.boolean()),
|
|
2426
|
+
skipDocsSupernovaLogin: z106.boolean(),
|
|
2427
|
+
areInvitesDisabled: z106.boolean(),
|
|
2428
|
+
isTestMode: z106.boolean(),
|
|
2429
|
+
emailDomains: z106.array(z106.string()),
|
|
2430
|
+
metadataXml: z106.string().nullish()
|
|
2431
|
+
});
|
|
2432
|
+
var WorkspaceRoleSchema = z107.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest"]);
|
|
2416
2433
|
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
2417
2434
|
var MAX_MEMBERS_COUNT = 100;
|
|
2418
|
-
var UserInvite =
|
|
2419
|
-
email:
|
|
2435
|
+
var UserInvite = z108.object({
|
|
2436
|
+
email: z108.string().email().trim().transform((value) => value.toLowerCase()),
|
|
2420
2437
|
role: WorkspaceRoleSchema
|
|
2421
2438
|
});
|
|
2422
|
-
var UserInvites =
|
|
2439
|
+
var UserInvites = z108.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
2423
2440
|
var isValidCIDR = (value) => {
|
|
2424
2441
|
return IPCIDR.isValidAddress(value);
|
|
2425
2442
|
};
|
|
2426
|
-
var WorkspaceIpWhitelistEntry =
|
|
2427
|
-
isEnabled:
|
|
2428
|
-
name:
|
|
2429
|
-
range:
|
|
2443
|
+
var WorkspaceIpWhitelistEntry = z109.object({
|
|
2444
|
+
isEnabled: z109.boolean(),
|
|
2445
|
+
name: z109.string(),
|
|
2446
|
+
range: z109.string().refine(isValidCIDR, {
|
|
2430
2447
|
message: "Invalid IP CIDR"
|
|
2431
2448
|
})
|
|
2432
2449
|
});
|
|
2433
|
-
var WorkspaceIpSettings =
|
|
2434
|
-
isEnabledForCloud:
|
|
2435
|
-
isEnabledForDocs:
|
|
2436
|
-
entries:
|
|
2450
|
+
var WorkspaceIpSettings = z109.object({
|
|
2451
|
+
isEnabledForCloud: z109.boolean(),
|
|
2452
|
+
isEnabledForDocs: z109.boolean(),
|
|
2453
|
+
entries: z109.array(WorkspaceIpWhitelistEntry)
|
|
2437
2454
|
});
|
|
2438
|
-
var WorkspaceProfile =
|
|
2439
|
-
name:
|
|
2440
|
-
handle:
|
|
2441
|
-
color:
|
|
2442
|
-
avatar: nullishToOptional(
|
|
2455
|
+
var WorkspaceProfile = z109.object({
|
|
2456
|
+
name: z109.string(),
|
|
2457
|
+
handle: z109.string(),
|
|
2458
|
+
color: z109.string(),
|
|
2459
|
+
avatar: nullishToOptional(z109.string()),
|
|
2443
2460
|
billingDetails: nullishToOptional(BillingDetails)
|
|
2444
2461
|
});
|
|
2445
|
-
var Workspace =
|
|
2446
|
-
id:
|
|
2462
|
+
var Workspace = z109.object({
|
|
2463
|
+
id: z109.string(),
|
|
2447
2464
|
profile: WorkspaceProfile,
|
|
2448
2465
|
subscription: Subscription,
|
|
2449
2466
|
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
2450
2467
|
sso: nullishToOptional(SsoProvider),
|
|
2451
2468
|
npmRegistrySettings: nullishToOptional(NpmRegistryConfig),
|
|
2452
|
-
designSystems:
|
|
2469
|
+
designSystems: z109.array(DesignSystem).nullish()
|
|
2453
2470
|
});
|
|
2454
|
-
var WorkspaceWithDesignSystems =
|
|
2471
|
+
var WorkspaceWithDesignSystems = z109.object({
|
|
2455
2472
|
workspace: Workspace,
|
|
2456
|
-
designSystems:
|
|
2473
|
+
designSystems: z109.array(DesignSystem)
|
|
2457
2474
|
});
|
|
2458
|
-
var WorkspaceContext =
|
|
2459
|
-
workspaceId:
|
|
2475
|
+
var WorkspaceContext = z110.object({
|
|
2476
|
+
workspaceId: z110.string(),
|
|
2460
2477
|
product: ProductCodeSchema,
|
|
2461
2478
|
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
2462
|
-
publicDesignSystem:
|
|
2479
|
+
publicDesignSystem: z110.boolean().optional()
|
|
2463
2480
|
});
|
|
2464
2481
|
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
2465
2482
|
var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
2466
2483
|
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
2467
2484
|
var HANDLE_MIN_LENGTH = 2;
|
|
2468
2485
|
var HANDLE_MAX_LENGTH = 64;
|
|
2469
|
-
var CreateWorkspaceInput =
|
|
2470
|
-
name:
|
|
2486
|
+
var CreateWorkspaceInput = z111.object({
|
|
2487
|
+
name: z111.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
2471
2488
|
product: ProductCodeSchema,
|
|
2472
|
-
priceId:
|
|
2473
|
-
billingEmail:
|
|
2474
|
-
handle:
|
|
2489
|
+
priceId: z111.string(),
|
|
2490
|
+
billingEmail: z111.string().email().optional(),
|
|
2491
|
+
handle: z111.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => value?.length > 0).optional(),
|
|
2475
2492
|
invites: UserInvites.optional(),
|
|
2476
|
-
promoCode:
|
|
2493
|
+
promoCode: z111.string().optional(),
|
|
2477
2494
|
status: InternalStatusSchema.optional(),
|
|
2478
2495
|
planInterval: BillingIntervalSchema.optional(),
|
|
2479
|
-
seats:
|
|
2480
|
-
seatLimit:
|
|
2496
|
+
seats: z111.number().optional(),
|
|
2497
|
+
seatLimit: z111.number().optional(),
|
|
2481
2498
|
card: CardSchema.optional(),
|
|
2482
2499
|
sso: SsoProvider.optional(),
|
|
2483
2500
|
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
2484
2501
|
ipWhitelist: WorkspaceIpSettings.optional()
|
|
2485
2502
|
});
|
|
2486
|
-
var WorkspaceInvitation =
|
|
2487
|
-
id: z111.string(),
|
|
2488
|
-
email: z111.string().email(),
|
|
2489
|
-
createdAt: z111.coerce.date(),
|
|
2490
|
-
resentAt: z111.coerce.date().nullish(),
|
|
2491
|
-
role: z111.nativeEnum(WorkspaceRole),
|
|
2492
|
-
workspaceId: z111.string(),
|
|
2493
|
-
invitedBy: z111.string()
|
|
2494
|
-
});
|
|
2495
|
-
var WorkspaceMembership = z112.object({
|
|
2503
|
+
var WorkspaceInvitation = z112.object({
|
|
2496
2504
|
id: z112.string(),
|
|
2497
|
-
|
|
2505
|
+
email: z112.string().email(),
|
|
2506
|
+
createdAt: z112.coerce.date(),
|
|
2507
|
+
resentAt: z112.coerce.date().nullish(),
|
|
2508
|
+
role: z112.nativeEnum(WorkspaceRole),
|
|
2498
2509
|
workspaceId: z112.string(),
|
|
2499
|
-
|
|
2510
|
+
invitedBy: z112.string()
|
|
2511
|
+
});
|
|
2512
|
+
var WorkspaceMembership = z113.object({
|
|
2513
|
+
id: z113.string(),
|
|
2514
|
+
userId: z113.string(),
|
|
2515
|
+
workspaceId: z113.string(),
|
|
2516
|
+
workspaceRole: z113.nativeEnum(WorkspaceRole)
|
|
2500
2517
|
});
|
|
2501
|
-
var UpdateMembershipRolesInput =
|
|
2502
|
-
members:
|
|
2503
|
-
|
|
2504
|
-
userId:
|
|
2505
|
-
role:
|
|
2518
|
+
var UpdateMembershipRolesInput = z113.object({
|
|
2519
|
+
members: z113.array(
|
|
2520
|
+
z113.object({
|
|
2521
|
+
userId: z113.string(),
|
|
2522
|
+
role: z113.nativeEnum(WorkspaceRole)
|
|
2506
2523
|
})
|
|
2507
2524
|
)
|
|
2508
2525
|
});
|
|
2509
|
-
var DesignSystemSwitcher =
|
|
2510
|
-
isEnabled:
|
|
2511
|
-
designSystemIds:
|
|
2526
|
+
var DesignSystemSwitcher = z114.object({
|
|
2527
|
+
isEnabled: z114.boolean(),
|
|
2528
|
+
designSystemIds: z114.array(z114.string())
|
|
2512
2529
|
});
|
|
2513
|
-
var DesignSystem =
|
|
2514
|
-
id:
|
|
2515
|
-
workspaceId:
|
|
2516
|
-
name:
|
|
2517
|
-
description:
|
|
2518
|
-
docExporterId: nullishToOptional(
|
|
2519
|
-
docSlug:
|
|
2520
|
-
docUserSlug: nullishToOptional(
|
|
2521
|
-
docSlugDeprecated:
|
|
2522
|
-
isPublic:
|
|
2523
|
-
isMultibrand:
|
|
2524
|
-
docViewUrl: nullishToOptional(
|
|
2525
|
-
basePrefixes:
|
|
2530
|
+
var DesignSystem = z114.object({
|
|
2531
|
+
id: z114.string(),
|
|
2532
|
+
workspaceId: z114.string(),
|
|
2533
|
+
name: z114.string(),
|
|
2534
|
+
description: z114.string(),
|
|
2535
|
+
docExporterId: nullishToOptional(z114.string()),
|
|
2536
|
+
docSlug: z114.string(),
|
|
2537
|
+
docUserSlug: nullishToOptional(z114.string()),
|
|
2538
|
+
docSlugDeprecated: z114.string(),
|
|
2539
|
+
isPublic: z114.boolean(),
|
|
2540
|
+
isMultibrand: z114.boolean(),
|
|
2541
|
+
docViewUrl: nullishToOptional(z114.string()),
|
|
2542
|
+
basePrefixes: z114.array(z114.string()),
|
|
2526
2543
|
designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
|
|
2527
|
-
createdAt:
|
|
2528
|
-
updatedAt:
|
|
2544
|
+
createdAt: z114.coerce.date(),
|
|
2545
|
+
updatedAt: z114.coerce.date()
|
|
2529
2546
|
});
|
|
2530
|
-
var DesignSystemWithWorkspace =
|
|
2547
|
+
var DesignSystemWithWorkspace = z114.object({
|
|
2531
2548
|
designSystem: DesignSystem,
|
|
2532
2549
|
workspace: Workspace
|
|
2533
2550
|
});
|
|
2534
2551
|
var DS_NAME_MIN_LENGTH = 2;
|
|
2535
2552
|
var DS_NAME_MAX_LENGTH = 64;
|
|
2536
|
-
var DS_DESC_MIN_LENGTH = 2;
|
|
2537
2553
|
var DS_DESC_MAX_LENGTH = 64;
|
|
2538
|
-
var DesignSystemCreateInputMetadata =
|
|
2539
|
-
name:
|
|
2540
|
-
description:
|
|
2554
|
+
var DesignSystemCreateInputMetadata = z115.object({
|
|
2555
|
+
name: z115.string().min(DS_NAME_MIN_LENGTH).max(DS_NAME_MAX_LENGTH).trim(),
|
|
2556
|
+
description: z115.string().max(DS_DESC_MAX_LENGTH).trim()
|
|
2541
2557
|
});
|
|
2542
|
-
var DesignSystemCreateInput =
|
|
2558
|
+
var DesignSystemCreateInput = z115.object({
|
|
2543
2559
|
meta: DesignSystemCreateInputMetadata,
|
|
2544
|
-
workspaceId:
|
|
2545
|
-
isPublic:
|
|
2546
|
-
basePrefixes:
|
|
2547
|
-
docUserSlug:
|
|
2548
|
-
source:
|
|
2560
|
+
workspaceId: z115.string(),
|
|
2561
|
+
isPublic: z115.boolean().optional(),
|
|
2562
|
+
basePrefixes: z115.array(z115.string()).optional(),
|
|
2563
|
+
docUserSlug: z115.string().nullish().optional(),
|
|
2564
|
+
source: z115.array(z115.string()).optional()
|
|
2549
2565
|
});
|
|
2550
2566
|
var DS_NAME_MIN_LENGTH2 = 2;
|
|
2551
2567
|
var DS_NAME_MAX_LENGTH2 = 64;
|
|
2552
|
-
var DS_DESC_MIN_LENGTH2 = 2;
|
|
2553
2568
|
var DS_DESC_MAX_LENGTH2 = 64;
|
|
2554
|
-
var DesignSystemUpdateInputMetadata =
|
|
2555
|
-
name:
|
|
2556
|
-
description:
|
|
2569
|
+
var DesignSystemUpdateInputMetadata = z116.object({
|
|
2570
|
+
name: z116.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2571
|
+
description: z116.string().max(DS_DESC_MAX_LENGTH2).trim().optional()
|
|
2557
2572
|
});
|
|
2558
|
-
var DesignSystemUpdateInput =
|
|
2573
|
+
var DesignSystemUpdateInput = z116.object({
|
|
2559
2574
|
meta: DesignSystemUpdateInputMetadata.optional(),
|
|
2560
|
-
workspaceId:
|
|
2561
|
-
isPublic:
|
|
2562
|
-
basePrefixes:
|
|
2563
|
-
docUserSlug:
|
|
2564
|
-
source:
|
|
2565
|
-
name:
|
|
2566
|
-
description:
|
|
2567
|
-
docExporterId:
|
|
2575
|
+
workspaceId: z116.string().optional(),
|
|
2576
|
+
isPublic: z116.boolean().optional(),
|
|
2577
|
+
basePrefixes: z116.array(z116.string()).optional(),
|
|
2578
|
+
docUserSlug: z116.string().nullish().optional(),
|
|
2579
|
+
source: z116.array(z116.string()).optional(),
|
|
2580
|
+
name: z116.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2581
|
+
description: z116.string().max(DS_DESC_MAX_LENGTH2).trim().optional(),
|
|
2582
|
+
docExporterId: z116.string().optional()
|
|
2583
|
+
});
|
|
2584
|
+
var ExporterPropertyImageValue = z117.object({
|
|
2585
|
+
asset: PageBlockAsset.optional(),
|
|
2586
|
+
assetId: z117.string().optional(),
|
|
2587
|
+
assetUrl: z117.string().optional()
|
|
2588
|
+
});
|
|
2589
|
+
var ExporterPropertyValue = z117.object({
|
|
2590
|
+
key: z117.string(),
|
|
2591
|
+
value: z117.union([
|
|
2592
|
+
z117.number(),
|
|
2593
|
+
z117.string(),
|
|
2594
|
+
z117.boolean(),
|
|
2595
|
+
ExporterPropertyImageValue,
|
|
2596
|
+
ColorTokenData,
|
|
2597
|
+
TypographyTokenData
|
|
2598
|
+
])
|
|
2599
|
+
});
|
|
2600
|
+
var ExporterPropertyValuesCollection = z117.object({
|
|
2601
|
+
id: z117.string(),
|
|
2602
|
+
designSystemId: z117.string(),
|
|
2603
|
+
exporterId: z117.string(),
|
|
2604
|
+
values: z117.array(ExporterPropertyValue)
|
|
2605
|
+
});
|
|
2606
|
+
var PublishedDocPage = z118.object({
|
|
2607
|
+
id: z118.string(),
|
|
2608
|
+
publishedDocId: z118.string(),
|
|
2609
|
+
pageShortPersistentId: z118.string(),
|
|
2610
|
+
pathV1: z118.string(),
|
|
2611
|
+
pathV2: z118.string(),
|
|
2612
|
+
storagePath: z118.string(),
|
|
2613
|
+
locale: z118.string().optional(),
|
|
2614
|
+
isPrivate: z118.boolean(),
|
|
2615
|
+
isHidden: z118.boolean(),
|
|
2616
|
+
createdAt: z118.coerce.date(),
|
|
2617
|
+
updatedAt: z118.coerce.date()
|
|
2568
2618
|
});
|
|
2569
2619
|
var publishedDocEnvironments = ["Live", "Preview"];
|
|
2570
|
-
var PublishedDocEnvironment =
|
|
2571
|
-
var PublishedDocsChecksums =
|
|
2572
|
-
var PublishedDocRoutingVersion =
|
|
2573
|
-
var PublishedDoc =
|
|
2574
|
-
id:
|
|
2575
|
-
designSystemVersionId:
|
|
2576
|
-
createdAt:
|
|
2577
|
-
updatedAt:
|
|
2578
|
-
lastPublishedAt:
|
|
2579
|
-
isDefault:
|
|
2580
|
-
isPublic:
|
|
2620
|
+
var PublishedDocEnvironment = z119.enum(publishedDocEnvironments);
|
|
2621
|
+
var PublishedDocsChecksums = z119.record(z119.string());
|
|
2622
|
+
var PublishedDocRoutingVersion = z119.enum(["1", "2"]);
|
|
2623
|
+
var PublishedDoc = z119.object({
|
|
2624
|
+
id: z119.string(),
|
|
2625
|
+
designSystemVersionId: z119.string(),
|
|
2626
|
+
createdAt: z119.coerce.date(),
|
|
2627
|
+
updatedAt: z119.coerce.date(),
|
|
2628
|
+
lastPublishedAt: z119.coerce.date(),
|
|
2629
|
+
isDefault: z119.boolean(),
|
|
2630
|
+
isPublic: z119.boolean(),
|
|
2581
2631
|
environment: PublishedDocEnvironment,
|
|
2582
2632
|
checksums: PublishedDocsChecksums,
|
|
2583
|
-
storagePath:
|
|
2584
|
-
wasMigrated:
|
|
2633
|
+
storagePath: z119.string(),
|
|
2634
|
+
wasMigrated: z119.boolean(),
|
|
2585
2635
|
routingVersion: PublishedDocRoutingVersion,
|
|
2586
|
-
usesLocalizations:
|
|
2587
|
-
wasPublishedWithLocalizations:
|
|
2636
|
+
usesLocalizations: z119.boolean(),
|
|
2637
|
+
wasPublishedWithLocalizations: z119.boolean()
|
|
2588
2638
|
});
|
|
2589
|
-
var DesignSystemVersion =
|
|
2590
|
-
id:
|
|
2591
|
-
version:
|
|
2592
|
-
createdAt:
|
|
2593
|
-
designSystemId:
|
|
2594
|
-
name:
|
|
2595
|
-
comment:
|
|
2596
|
-
isReadonly:
|
|
2597
|
-
changeLog:
|
|
2598
|
-
parentId:
|
|
2599
|
-
});
|
|
2600
|
-
var ExporterJobDestination =
|
|
2601
|
-
var ExporterJobStatus =
|
|
2602
|
-
var ExporterJobLogEntryType =
|
|
2603
|
-
var ExporterJobLogEntry =
|
|
2604
|
-
id:
|
|
2605
|
-
time:
|
|
2639
|
+
var DesignSystemVersion = z120.object({
|
|
2640
|
+
id: z120.string(),
|
|
2641
|
+
version: z120.string(),
|
|
2642
|
+
createdAt: z120.date(),
|
|
2643
|
+
designSystemId: z120.string(),
|
|
2644
|
+
name: z120.string(),
|
|
2645
|
+
comment: z120.string(),
|
|
2646
|
+
isReadonly: z120.boolean(),
|
|
2647
|
+
changeLog: z120.string(),
|
|
2648
|
+
parentId: z120.string().optional()
|
|
2649
|
+
});
|
|
2650
|
+
var ExporterJobDestination = z121.enum(["s3", "webhookUrl", "github", "documentation", "azure", "gitlab"]);
|
|
2651
|
+
var ExporterJobStatus = z121.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
2652
|
+
var ExporterJobLogEntryType = z121.enum(["success", "info", "warning", "error", "user"]);
|
|
2653
|
+
var ExporterJobLogEntry = z121.object({
|
|
2654
|
+
id: z121.string().optional(),
|
|
2655
|
+
time: z121.coerce.date(),
|
|
2606
2656
|
type: ExporterJobLogEntryType,
|
|
2607
|
-
message:
|
|
2657
|
+
message: z121.string()
|
|
2608
2658
|
});
|
|
2609
|
-
var ExporterJobResultPullRequestDestination =
|
|
2610
|
-
pullRequestUrl:
|
|
2659
|
+
var ExporterJobResultPullRequestDestination = z121.object({
|
|
2660
|
+
pullRequestUrl: z121.string()
|
|
2611
2661
|
});
|
|
2612
|
-
var ExporterJobResultS3Destination =
|
|
2613
|
-
bucket:
|
|
2614
|
-
urlPrefix:
|
|
2615
|
-
path:
|
|
2616
|
-
files:
|
|
2662
|
+
var ExporterJobResultS3Destination = z121.object({
|
|
2663
|
+
bucket: z121.string(),
|
|
2664
|
+
urlPrefix: z121.string().optional(),
|
|
2665
|
+
path: z121.string(),
|
|
2666
|
+
files: z121.array(z121.string())
|
|
2617
2667
|
});
|
|
2618
|
-
var ExporterJobResultDocsDestination =
|
|
2619
|
-
url:
|
|
2668
|
+
var ExporterJobResultDocsDestination = z121.object({
|
|
2669
|
+
url: z121.string()
|
|
2620
2670
|
});
|
|
2621
|
-
var ExporterJobResult =
|
|
2622
|
-
error:
|
|
2623
|
-
logs:
|
|
2671
|
+
var ExporterJobResult = z121.object({
|
|
2672
|
+
error: z121.string().optional(),
|
|
2673
|
+
logs: z121.array(ExporterJobLogEntry).optional(),
|
|
2624
2674
|
s3: ExporterJobResultS3Destination.optional(),
|
|
2625
2675
|
github: ExporterJobResultPullRequestDestination.optional(),
|
|
2626
2676
|
azure: ExporterJobResultPullRequestDestination.optional(),
|
|
@@ -2628,68 +2678,68 @@ var ExporterJobResult = z118.object({
|
|
|
2628
2678
|
bitbucket: ExporterJobResultPullRequestDestination.optional(),
|
|
2629
2679
|
sndocs: ExporterJobResultDocsDestination.optional()
|
|
2630
2680
|
});
|
|
2631
|
-
var ExporterDestinationSnDocs =
|
|
2681
|
+
var ExporterDestinationSnDocs = z121.object({
|
|
2632
2682
|
environment: PublishedDocEnvironment
|
|
2633
2683
|
});
|
|
2634
|
-
var ExporterDestinationS3 =
|
|
2635
|
-
var ExporterDestinationGithub =
|
|
2636
|
-
connectionId:
|
|
2637
|
-
url:
|
|
2638
|
-
branch:
|
|
2639
|
-
relativePath:
|
|
2684
|
+
var ExporterDestinationS3 = z121.object({});
|
|
2685
|
+
var ExporterDestinationGithub = z121.object({
|
|
2686
|
+
connectionId: z121.string(),
|
|
2687
|
+
url: z121.string(),
|
|
2688
|
+
branch: z121.string(),
|
|
2689
|
+
relativePath: z121.string(),
|
|
2640
2690
|
// +
|
|
2641
|
-
userId:
|
|
2642
|
-
});
|
|
2643
|
-
var ExporterDestinationAzure =
|
|
2644
|
-
connectionId:
|
|
2645
|
-
organizationId:
|
|
2646
|
-
projectId:
|
|
2647
|
-
repositoryId:
|
|
2648
|
-
branch:
|
|
2649
|
-
relativePath:
|
|
2691
|
+
userId: z121.coerce.string()
|
|
2692
|
+
});
|
|
2693
|
+
var ExporterDestinationAzure = z121.object({
|
|
2694
|
+
connectionId: z121.string(),
|
|
2695
|
+
organizationId: z121.string(),
|
|
2696
|
+
projectId: z121.string(),
|
|
2697
|
+
repositoryId: z121.string(),
|
|
2698
|
+
branch: z121.string(),
|
|
2699
|
+
relativePath: z121.string(),
|
|
2650
2700
|
// +
|
|
2651
|
-
userId:
|
|
2652
|
-
url:
|
|
2653
|
-
});
|
|
2654
|
-
var ExporterDestinationGitlab =
|
|
2655
|
-
connectionId:
|
|
2656
|
-
projectId:
|
|
2657
|
-
branch:
|
|
2658
|
-
relativePath:
|
|
2701
|
+
userId: z121.coerce.string(),
|
|
2702
|
+
url: z121.string()
|
|
2703
|
+
});
|
|
2704
|
+
var ExporterDestinationGitlab = z121.object({
|
|
2705
|
+
connectionId: z121.string(),
|
|
2706
|
+
projectId: z121.string(),
|
|
2707
|
+
branch: z121.string(),
|
|
2708
|
+
relativePath: z121.string(),
|
|
2659
2709
|
// +
|
|
2660
|
-
userId:
|
|
2661
|
-
url:
|
|
2710
|
+
userId: z121.coerce.string(),
|
|
2711
|
+
url: z121.string()
|
|
2662
2712
|
});
|
|
2663
2713
|
var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
|
|
2664
2714
|
var BITBUCKET_MAX_LENGTH = 64;
|
|
2665
|
-
var ExporterDestinationBitbucket =
|
|
2666
|
-
connectionId:
|
|
2667
|
-
workspaceSlug:
|
|
2668
|
-
projectKey:
|
|
2669
|
-
repoSlug:
|
|
2670
|
-
branch:
|
|
2671
|
-
relativePath:
|
|
2715
|
+
var ExporterDestinationBitbucket = z121.object({
|
|
2716
|
+
connectionId: z121.string(),
|
|
2717
|
+
workspaceSlug: z121.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2718
|
+
projectKey: z121.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2719
|
+
repoSlug: z121.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2720
|
+
branch: z121.string(),
|
|
2721
|
+
relativePath: z121.string(),
|
|
2672
2722
|
// +
|
|
2673
|
-
userId:
|
|
2674
|
-
url:
|
|
2675
|
-
});
|
|
2676
|
-
var ExporterJob =
|
|
2677
|
-
id:
|
|
2678
|
-
createdAt:
|
|
2679
|
-
finishedAt:
|
|
2680
|
-
designSystemId:
|
|
2681
|
-
designSystemVersionId:
|
|
2682
|
-
workspaceId:
|
|
2683
|
-
scheduleId:
|
|
2684
|
-
exporterId:
|
|
2685
|
-
brandId:
|
|
2686
|
-
themeId:
|
|
2687
|
-
estimatedExecutionTime:
|
|
2723
|
+
userId: z121.coerce.string(),
|
|
2724
|
+
url: z121.string()
|
|
2725
|
+
});
|
|
2726
|
+
var ExporterJob = z121.object({
|
|
2727
|
+
id: z121.coerce.string(),
|
|
2728
|
+
createdAt: z121.coerce.date(),
|
|
2729
|
+
finishedAt: z121.coerce.date().optional(),
|
|
2730
|
+
designSystemId: z121.coerce.string(),
|
|
2731
|
+
designSystemVersionId: z121.coerce.string(),
|
|
2732
|
+
workspaceId: z121.coerce.string(),
|
|
2733
|
+
scheduleId: z121.coerce.string().nullish(),
|
|
2734
|
+
exporterId: z121.coerce.string(),
|
|
2735
|
+
brandId: z121.coerce.string().optional(),
|
|
2736
|
+
themeId: z121.coerce.string().optional(),
|
|
2737
|
+
estimatedExecutionTime: z121.number().optional(),
|
|
2688
2738
|
status: ExporterJobStatus,
|
|
2689
2739
|
result: ExporterJobResult.optional(),
|
|
2690
|
-
createdByUserId:
|
|
2740
|
+
createdByUserId: z121.string().optional(),
|
|
2691
2741
|
// CodegenDestinationsModel
|
|
2692
|
-
webhookUrl:
|
|
2742
|
+
webhookUrl: z121.string().optional(),
|
|
2693
2743
|
destinationSnDocs: ExporterDestinationSnDocs.optional(),
|
|
2694
2744
|
destinationS3: ExporterDestinationS3.optional(),
|
|
2695
2745
|
destinationGithub: ExporterDestinationGithub.optional(),
|
|
@@ -2708,14 +2758,14 @@ var ExporterJobFindByFilter = ExporterJob.pick({
|
|
|
2708
2758
|
themeId: true,
|
|
2709
2759
|
brandId: true
|
|
2710
2760
|
}).extend({
|
|
2711
|
-
destinations:
|
|
2761
|
+
destinations: z121.array(ExporterJobDestination),
|
|
2712
2762
|
docsEnvironment: PublishedDocEnvironment
|
|
2713
2763
|
}).partial();
|
|
2714
|
-
var ExporterWorkspaceMembershipRole =
|
|
2715
|
-
var ExporterWorkspaceMembership =
|
|
2716
|
-
id:
|
|
2717
|
-
workspaceId:
|
|
2718
|
-
exporterId:
|
|
2764
|
+
var ExporterWorkspaceMembershipRole = z122.enum(["Owner", "OwnerArchived", "User"]);
|
|
2765
|
+
var ExporterWorkspaceMembership = z123.object({
|
|
2766
|
+
id: z123.string(),
|
|
2767
|
+
workspaceId: z123.string(),
|
|
2768
|
+
exporterId: z123.string(),
|
|
2719
2769
|
role: ExporterWorkspaceMembershipRole
|
|
2720
2770
|
});
|
|
2721
2771
|
var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
@@ -2725,8 +2775,8 @@ var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
|
2725
2775
|
GitProviderNames2["Bitbucket"] = "bitbucket";
|
|
2726
2776
|
return GitProviderNames2;
|
|
2727
2777
|
})(GitProviderNames || {});
|
|
2728
|
-
var GitProvider =
|
|
2729
|
-
var PulsarPropertyType =
|
|
2778
|
+
var GitProvider = z124.nativeEnum(GitProviderNames);
|
|
2779
|
+
var PulsarPropertyType = z125.enum([
|
|
2730
2780
|
"string",
|
|
2731
2781
|
"number",
|
|
2732
2782
|
"boolean",
|
|
@@ -2739,165 +2789,165 @@ var PulsarPropertyType = z122.enum([
|
|
|
2739
2789
|
"tokenProperties",
|
|
2740
2790
|
"tokenType"
|
|
2741
2791
|
]);
|
|
2742
|
-
var PulsarBaseProperty =
|
|
2743
|
-
label:
|
|
2744
|
-
key:
|
|
2745
|
-
description:
|
|
2792
|
+
var PulsarBaseProperty = z125.object({
|
|
2793
|
+
label: z125.string(),
|
|
2794
|
+
key: z125.string(),
|
|
2795
|
+
description: z125.string().nullish(),
|
|
2746
2796
|
type: PulsarPropertyType,
|
|
2747
|
-
values:
|
|
2748
|
-
default:
|
|
2797
|
+
values: z125.array(z125.string()).nullish(),
|
|
2798
|
+
default: z125.union([z125.string(), z125.boolean(), z125.number()]).nullish(),
|
|
2749
2799
|
// PulsarPropertyValueType //is optional?
|
|
2750
|
-
inputType:
|
|
2800
|
+
inputType: z125.enum(["code", "plain"]).optional(),
|
|
2751
2801
|
//is optional?
|
|
2752
|
-
isMultiline:
|
|
2802
|
+
isMultiline: z125.boolean().nullish()
|
|
2753
2803
|
});
|
|
2754
2804
|
var PulsarContributionConfigurationProperty = PulsarBaseProperty.extend({
|
|
2755
|
-
category:
|
|
2756
|
-
});
|
|
2757
|
-
var PulsarContributionVariant =
|
|
2758
|
-
key:
|
|
2759
|
-
name:
|
|
2760
|
-
isDefault: nullishToOptional(
|
|
2761
|
-
description: nullishToOptional(
|
|
2762
|
-
thumbnailURL: nullishToOptional(
|
|
2763
|
-
});
|
|
2764
|
-
var PulsarCustomBlock =
|
|
2765
|
-
title: nullishToOptional(
|
|
2766
|
-
key:
|
|
2767
|
-
category: nullishToOptional(
|
|
2768
|
-
description: nullishToOptional(
|
|
2769
|
-
iconURL: nullishToOptional(
|
|
2770
|
-
mode: nullishToOptional(
|
|
2771
|
-
properties: nullishToOptional(
|
|
2772
|
-
});
|
|
2773
|
-
var ExporterType =
|
|
2774
|
-
var ExporterSource =
|
|
2775
|
-
var ExporterTag =
|
|
2776
|
-
var ExporterDetails =
|
|
2777
|
-
description:
|
|
2778
|
-
version:
|
|
2779
|
-
routingVersion: nullishToOptional(
|
|
2780
|
-
author: nullishToOptional(
|
|
2781
|
-
organization: nullishToOptional(
|
|
2782
|
-
homepage: nullishToOptional(
|
|
2783
|
-
readme: nullishToOptional(
|
|
2784
|
-
tags: nullishToOptional(
|
|
2785
|
-
packageId: nullishToOptional(
|
|
2786
|
-
iconURL: nullishToOptional(
|
|
2787
|
-
configurationProperties: nullishToOptional(
|
|
2788
|
-
customBlocks: nullishToOptional(
|
|
2789
|
-
blockVariants: nullishToOptional(
|
|
2790
|
-
usesBrands: nullishToOptional(
|
|
2791
|
-
usesThemes: nullishToOptional(
|
|
2805
|
+
category: z125.string()
|
|
2806
|
+
});
|
|
2807
|
+
var PulsarContributionVariant = z125.object({
|
|
2808
|
+
key: z125.string(),
|
|
2809
|
+
name: z125.string(),
|
|
2810
|
+
isDefault: nullishToOptional(z125.boolean()),
|
|
2811
|
+
description: nullishToOptional(z125.string()),
|
|
2812
|
+
thumbnailURL: nullishToOptional(z125.string())
|
|
2813
|
+
});
|
|
2814
|
+
var PulsarCustomBlock = z125.object({
|
|
2815
|
+
title: nullishToOptional(z125.string()),
|
|
2816
|
+
key: z125.string(),
|
|
2817
|
+
category: nullishToOptional(z125.string()),
|
|
2818
|
+
description: nullishToOptional(z125.string()),
|
|
2819
|
+
iconURL: nullishToOptional(z125.string()),
|
|
2820
|
+
mode: nullishToOptional(z125.enum(["array", "block"])),
|
|
2821
|
+
properties: nullishToOptional(z125.array(PulsarBaseProperty)).transform((v) => v ?? [])
|
|
2822
|
+
});
|
|
2823
|
+
var ExporterType = z126.enum(["code", "documentation"]);
|
|
2824
|
+
var ExporterSource = z126.enum(["git", "upload"]);
|
|
2825
|
+
var ExporterTag = z126.string().regex(/^[0-9a-zA-Z]+(\s[0-9a-zA-Z]+)*$/);
|
|
2826
|
+
var ExporterDetails = z126.object({
|
|
2827
|
+
description: z126.string(),
|
|
2828
|
+
version: z126.string(),
|
|
2829
|
+
routingVersion: nullishToOptional(z126.string()),
|
|
2830
|
+
author: nullishToOptional(z126.string()),
|
|
2831
|
+
organization: nullishToOptional(z126.string()),
|
|
2832
|
+
homepage: nullishToOptional(z126.string()),
|
|
2833
|
+
readme: nullishToOptional(z126.string()),
|
|
2834
|
+
tags: nullishToOptional(z126.array(ExporterTag)).default([]),
|
|
2835
|
+
packageId: nullishToOptional(z126.string().max(255)),
|
|
2836
|
+
iconURL: nullishToOptional(z126.string()),
|
|
2837
|
+
configurationProperties: nullishToOptional(z126.array(PulsarContributionConfigurationProperty)).default([]),
|
|
2838
|
+
customBlocks: nullishToOptional(z126.array(PulsarCustomBlock)).default([]),
|
|
2839
|
+
blockVariants: nullishToOptional(z126.record(z126.string(), z126.array(PulsarContributionVariant))).default({}),
|
|
2840
|
+
usesBrands: nullishToOptional(z126.boolean()).default(false),
|
|
2841
|
+
usesThemes: nullishToOptional(z126.boolean()).default(false),
|
|
2792
2842
|
source: ExporterSource,
|
|
2793
2843
|
gitProvider: nullishToOptional(GitProvider),
|
|
2794
|
-
gitUrl: nullishToOptional(
|
|
2795
|
-
gitBranch: nullishToOptional(
|
|
2796
|
-
gitDirectory: nullishToOptional(
|
|
2844
|
+
gitUrl: nullishToOptional(z126.string()),
|
|
2845
|
+
gitBranch: nullishToOptional(z126.string()),
|
|
2846
|
+
gitDirectory: nullishToOptional(z126.string())
|
|
2797
2847
|
});
|
|
2798
|
-
var Exporter =
|
|
2799
|
-
id:
|
|
2800
|
-
createdAt:
|
|
2801
|
-
name:
|
|
2802
|
-
isPrivate:
|
|
2848
|
+
var Exporter = z126.object({
|
|
2849
|
+
id: z126.string(),
|
|
2850
|
+
createdAt: z126.coerce.date(),
|
|
2851
|
+
name: z126.string(),
|
|
2852
|
+
isPrivate: z126.boolean(),
|
|
2803
2853
|
details: ExporterDetails,
|
|
2804
2854
|
exporterType: nullishToOptional(ExporterType).default("code"),
|
|
2805
|
-
storagePath: nullishToOptional(
|
|
2806
|
-
});
|
|
2807
|
-
var CustomDomain =
|
|
2808
|
-
id:
|
|
2809
|
-
designSystemId:
|
|
2810
|
-
state:
|
|
2811
|
-
supernovaDomain:
|
|
2812
|
-
customerDomain:
|
|
2813
|
-
error:
|
|
2814
|
-
errorCode:
|
|
2815
|
-
});
|
|
2816
|
-
var IntegrationAuthType =
|
|
2817
|
-
var ExternalServiceType =
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2855
|
+
storagePath: nullishToOptional(z126.string()).default("")
|
|
2856
|
+
});
|
|
2857
|
+
var CustomDomain = z127.object({
|
|
2858
|
+
id: z127.string(),
|
|
2859
|
+
designSystemId: z127.string(),
|
|
2860
|
+
state: z127.string(),
|
|
2861
|
+
supernovaDomain: z127.string(),
|
|
2862
|
+
customerDomain: z127.string().nullish(),
|
|
2863
|
+
error: z127.string().nullish(),
|
|
2864
|
+
errorCode: z127.string().nullish()
|
|
2865
|
+
});
|
|
2866
|
+
var IntegrationAuthType = z128.union([z128.literal("OAuth2"), z128.literal("PAT")]);
|
|
2867
|
+
var ExternalServiceType = z128.union([
|
|
2868
|
+
z128.literal("figma"),
|
|
2869
|
+
z128.literal("github"),
|
|
2870
|
+
z128.literal("azure"),
|
|
2871
|
+
z128.literal("gitlab"),
|
|
2872
|
+
z128.literal("bitbucket")
|
|
2823
2873
|
]);
|
|
2824
|
-
var IntegrationUserInfo =
|
|
2825
|
-
id:
|
|
2826
|
-
handle:
|
|
2827
|
-
avatarUrl:
|
|
2828
|
-
email:
|
|
2874
|
+
var IntegrationUserInfo = z128.object({
|
|
2875
|
+
id: z128.string(),
|
|
2876
|
+
handle: z128.string().optional(),
|
|
2877
|
+
avatarUrl: z128.string().optional(),
|
|
2878
|
+
email: z128.string().optional(),
|
|
2829
2879
|
authType: IntegrationAuthType.optional(),
|
|
2830
|
-
customUrl:
|
|
2880
|
+
customUrl: z128.string().optional()
|
|
2831
2881
|
});
|
|
2832
|
-
var UserLinkedIntegrations =
|
|
2882
|
+
var UserLinkedIntegrations = z128.object({
|
|
2833
2883
|
figma: IntegrationUserInfo.optional(),
|
|
2834
2884
|
github: IntegrationUserInfo.array().optional(),
|
|
2835
2885
|
azure: IntegrationUserInfo.array().optional(),
|
|
2836
2886
|
gitlab: IntegrationUserInfo.array().optional(),
|
|
2837
2887
|
bitbucket: IntegrationUserInfo.array().optional()
|
|
2838
2888
|
});
|
|
2839
|
-
var UserIdentity =
|
|
2840
|
-
id:
|
|
2841
|
-
userId:
|
|
2842
|
-
});
|
|
2843
|
-
var UserOnboardingDepartment =
|
|
2844
|
-
var UserOnboardingJobLevel =
|
|
2845
|
-
var UserOnboarding =
|
|
2846
|
-
companyName:
|
|
2847
|
-
numberOfPeopleInOrg:
|
|
2848
|
-
numberOfPeopleInDesignTeam:
|
|
2889
|
+
var UserIdentity = z129.object({
|
|
2890
|
+
id: z129.string(),
|
|
2891
|
+
userId: z129.string()
|
|
2892
|
+
});
|
|
2893
|
+
var UserOnboardingDepartment = z130.enum(["Design", "Engineering", "Brand", "Other"]);
|
|
2894
|
+
var UserOnboardingJobLevel = z130.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
2895
|
+
var UserOnboarding = z130.object({
|
|
2896
|
+
companyName: z130.string().optional(),
|
|
2897
|
+
numberOfPeopleInOrg: z130.string().optional(),
|
|
2898
|
+
numberOfPeopleInDesignTeam: z130.string().optional(),
|
|
2849
2899
|
department: UserOnboardingDepartment.optional(),
|
|
2850
|
-
jobTitle:
|
|
2851
|
-
phase:
|
|
2900
|
+
jobTitle: z130.string().optional(),
|
|
2901
|
+
phase: z130.string().optional(),
|
|
2852
2902
|
jobLevel: UserOnboardingJobLevel.optional()
|
|
2853
2903
|
});
|
|
2854
|
-
var UserProfile =
|
|
2855
|
-
name:
|
|
2856
|
-
avatar:
|
|
2857
|
-
nickname:
|
|
2904
|
+
var UserProfile = z130.object({
|
|
2905
|
+
name: z130.string(),
|
|
2906
|
+
avatar: z130.string().optional(),
|
|
2907
|
+
nickname: z130.string().optional(),
|
|
2858
2908
|
onboarding: UserOnboarding.optional()
|
|
2859
2909
|
});
|
|
2860
|
-
var User =
|
|
2861
|
-
id:
|
|
2862
|
-
email:
|
|
2863
|
-
emailVerified:
|
|
2864
|
-
createdAt:
|
|
2865
|
-
trialExpiresAt:
|
|
2910
|
+
var User = z131.object({
|
|
2911
|
+
id: z131.string(),
|
|
2912
|
+
email: z131.string(),
|
|
2913
|
+
emailVerified: z131.boolean(),
|
|
2914
|
+
createdAt: z131.coerce.date(),
|
|
2915
|
+
trialExpiresAt: z131.coerce.date().optional(),
|
|
2866
2916
|
profile: UserProfile,
|
|
2867
2917
|
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
2868
|
-
loggedOutAt:
|
|
2869
|
-
isProtected:
|
|
2918
|
+
loggedOutAt: z131.coerce.date().optional(),
|
|
2919
|
+
isProtected: z131.boolean()
|
|
2870
2920
|
});
|
|
2871
|
-
var NpmProxyToken =
|
|
2872
|
-
access:
|
|
2873
|
-
expiresAt:
|
|
2921
|
+
var NpmProxyToken = z132.object({
|
|
2922
|
+
access: z132.string(),
|
|
2923
|
+
expiresAt: z132.number()
|
|
2874
2924
|
});
|
|
2875
|
-
var SessionData =
|
|
2876
|
-
returnToUrl:
|
|
2925
|
+
var SessionData = z132.object({
|
|
2926
|
+
returnToUrl: z132.string().optional(),
|
|
2877
2927
|
npmProxyToken: NpmProxyToken.optional()
|
|
2878
2928
|
});
|
|
2879
|
-
var Session =
|
|
2880
|
-
id:
|
|
2881
|
-
expiresAt:
|
|
2882
|
-
userId:
|
|
2929
|
+
var Session = z132.object({
|
|
2930
|
+
id: z132.string(),
|
|
2931
|
+
expiresAt: z132.coerce.date(),
|
|
2932
|
+
userId: z132.string().nullable(),
|
|
2883
2933
|
data: SessionData
|
|
2884
2934
|
});
|
|
2885
|
-
var AuthTokens =
|
|
2886
|
-
access:
|
|
2887
|
-
refresh:
|
|
2935
|
+
var AuthTokens = z132.object({
|
|
2936
|
+
access: z132.string(),
|
|
2937
|
+
refresh: z132.string()
|
|
2888
2938
|
});
|
|
2889
|
-
var UserSession =
|
|
2939
|
+
var UserSession = z132.object({
|
|
2890
2940
|
session: Session,
|
|
2891
2941
|
user: User.nullable()
|
|
2892
2942
|
});
|
|
2893
|
-
var FlaggedFeature =
|
|
2894
|
-
var FeatureFlagMap =
|
|
2895
|
-
var FeatureFlag =
|
|
2896
|
-
id:
|
|
2943
|
+
var FlaggedFeature = z133.enum(["FigmaImporterV2", "ShadowOpacityOptional", "DisableImporter"]);
|
|
2944
|
+
var FeatureFlagMap = z133.record(FlaggedFeature, z133.boolean());
|
|
2945
|
+
var FeatureFlag = z133.object({
|
|
2946
|
+
id: z133.string(),
|
|
2897
2947
|
feature: FlaggedFeature,
|
|
2898
|
-
createdAt:
|
|
2899
|
-
enabled:
|
|
2900
|
-
designSystemId:
|
|
2948
|
+
createdAt: z133.coerce.date(),
|
|
2949
|
+
enabled: z133.boolean(),
|
|
2950
|
+
designSystemId: z133.string().optional()
|
|
2901
2951
|
});
|
|
2902
2952
|
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
2903
2953
|
OAuthProviderNames2["Figma"] = "figma";
|
|
@@ -2907,60 +2957,90 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
|
2907
2957
|
OAuthProviderNames2["Bitbucket"] = "bitbucket";
|
|
2908
2958
|
return OAuthProviderNames2;
|
|
2909
2959
|
})(OAuthProviderNames || {});
|
|
2910
|
-
var OAuthProviderSchema =
|
|
2960
|
+
var OAuthProviderSchema = z134.nativeEnum(OAuthProviderNames);
|
|
2911
2961
|
var OAuthProvider = OAuthProviderSchema.enum;
|
|
2912
|
-
var ExternalOAuthRequest =
|
|
2913
|
-
id:
|
|
2962
|
+
var ExternalOAuthRequest = z135.object({
|
|
2963
|
+
id: z135.string(),
|
|
2914
2964
|
provider: OAuthProviderSchema,
|
|
2915
|
-
userId:
|
|
2916
|
-
state:
|
|
2917
|
-
createdAt:
|
|
2965
|
+
userId: z135.string(),
|
|
2966
|
+
state: z135.string(),
|
|
2967
|
+
createdAt: z135.coerce.date()
|
|
2918
2968
|
});
|
|
2919
|
-
var
|
|
2920
|
-
|
|
2969
|
+
var IntegrationType = z136.enum(["Figma", "Github", "Gitlab", "Bitbucket", "Azure"]);
|
|
2970
|
+
var Integration = z136.object({
|
|
2971
|
+
id: z136.string(),
|
|
2972
|
+
workspaceId: z136.string(),
|
|
2973
|
+
type: IntegrationType,
|
|
2974
|
+
createdAt: z136.coerce.date()
|
|
2975
|
+
});
|
|
2976
|
+
var IntegrationCredentialsType = z136.enum(["OAuth2", "PAT"]);
|
|
2977
|
+
var IntegrationCredentialsProfile = z136.object({
|
|
2978
|
+
id: z136.string(),
|
|
2979
|
+
username: z136.string().optional(),
|
|
2980
|
+
avatarUrl: z136.string().optional()
|
|
2981
|
+
});
|
|
2982
|
+
var IntegrationCredentialsSchema = z136.object({
|
|
2983
|
+
id: z136.string(),
|
|
2984
|
+
type: IntegrationCredentialsType,
|
|
2985
|
+
integrationId: z136.string(),
|
|
2986
|
+
accessToken: z136.string(),
|
|
2987
|
+
userId: z136.string(),
|
|
2988
|
+
createdAt: z136.coerce.date(),
|
|
2989
|
+
refreshToken: z136.string().optional(),
|
|
2990
|
+
profile: IntegrationCredentialsProfile.optional()
|
|
2991
|
+
});
|
|
2992
|
+
var IntegrationTokenSchema = z137.object({
|
|
2993
|
+
id: z137.string(),
|
|
2921
2994
|
provider: OAuthProviderSchema,
|
|
2922
|
-
scope:
|
|
2923
|
-
userId:
|
|
2924
|
-
accessToken:
|
|
2925
|
-
refreshToken:
|
|
2926
|
-
expiresAt:
|
|
2927
|
-
externalUserId:
|
|
2928
|
-
});
|
|
2929
|
-
var
|
|
2995
|
+
scope: z137.string(),
|
|
2996
|
+
userId: z137.string(),
|
|
2997
|
+
accessToken: z137.string(),
|
|
2998
|
+
refreshToken: z137.string(),
|
|
2999
|
+
expiresAt: z137.coerce.date(),
|
|
3000
|
+
externalUserId: z137.string().nullish()
|
|
3001
|
+
});
|
|
3002
|
+
var WorkspaceOAuthRequestSchema = z138.object({
|
|
3003
|
+
id: z138.string(),
|
|
3004
|
+
workspaceId: z138.string(),
|
|
3005
|
+
provider: OAuthProviderSchema,
|
|
3006
|
+
userId: z138.string(),
|
|
3007
|
+
createdAt: z138.coerce.date()
|
|
3008
|
+
});
|
|
3009
|
+
var AnyRecord = z139.record(z139.any());
|
|
2930
3010
|
var NpmPackageVersionDist = AnyRecord.and(
|
|
2931
|
-
|
|
2932
|
-
tarball:
|
|
3011
|
+
z139.object({
|
|
3012
|
+
tarball: z139.string()
|
|
2933
3013
|
})
|
|
2934
3014
|
);
|
|
2935
3015
|
var NpmPackageVersion = AnyRecord.and(
|
|
2936
|
-
|
|
3016
|
+
z139.object({
|
|
2937
3017
|
dist: NpmPackageVersionDist
|
|
2938
3018
|
})
|
|
2939
3019
|
);
|
|
2940
3020
|
var NpmPackage = AnyRecord.and(
|
|
2941
|
-
|
|
2942
|
-
_id:
|
|
2943
|
-
name:
|
|
3021
|
+
z139.object({
|
|
3022
|
+
_id: z139.string(),
|
|
3023
|
+
name: z139.string(),
|
|
2944
3024
|
// e.g. "latest": "1.2.3"
|
|
2945
|
-
"dist-tags":
|
|
3025
|
+
"dist-tags": z139.record(z139.string(), z139.string()),
|
|
2946
3026
|
// "1.2.3": {...}
|
|
2947
|
-
versions:
|
|
3027
|
+
versions: z139.record(NpmPackageVersion)
|
|
2948
3028
|
})
|
|
2949
3029
|
);
|
|
2950
|
-
var NpmProxyTokenPayload =
|
|
2951
|
-
npmProxyRegistryConfigId:
|
|
3030
|
+
var NpmProxyTokenPayload = z140.object({
|
|
3031
|
+
npmProxyRegistryConfigId: z140.string()
|
|
2952
3032
|
});
|
|
2953
|
-
var PersonalAccessToken =
|
|
2954
|
-
id:
|
|
2955
|
-
userId:
|
|
2956
|
-
|
|
2957
|
-
token: z136.string(),
|
|
2958
|
-
createdAt: z136.coerce.date(),
|
|
2959
|
-
hidden: z136.boolean(),
|
|
2960
|
-
workspaceId: z136.string().optional(),
|
|
3033
|
+
var PersonalAccessToken = z141.object({
|
|
3034
|
+
id: z141.string(),
|
|
3035
|
+
userId: z141.string(),
|
|
3036
|
+
workspaceId: z141.string().optional(),
|
|
2961
3037
|
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
2962
|
-
|
|
2963
|
-
|
|
3038
|
+
name: z141.string(),
|
|
3039
|
+
hidden: z141.boolean(),
|
|
3040
|
+
token: z141.string(),
|
|
3041
|
+
scope: z141.string().optional(),
|
|
3042
|
+
createdAt: z141.coerce.date(),
|
|
3043
|
+
expireAt: z141.coerce.date().optional()
|
|
2964
3044
|
});
|
|
2965
3045
|
var SupernovaException = class _SupernovaException extends Error {
|
|
2966
3046
|
//
|
|
@@ -3018,6 +3098,9 @@ var SupernovaException = class _SupernovaException extends Error {
|
|
|
3018
3098
|
static noAccess(message) {
|
|
3019
3099
|
return new _SupernovaException("NoAccess", message);
|
|
3020
3100
|
}
|
|
3101
|
+
static missingCredentials(message) {
|
|
3102
|
+
return new _SupernovaException("MissingCredentials", message);
|
|
3103
|
+
}
|
|
3021
3104
|
//
|
|
3022
3105
|
// To refactor
|
|
3023
3106
|
//
|
|
@@ -3045,25 +3128,25 @@ function groupBy(items, keyFn) {
|
|
|
3045
3128
|
}
|
|
3046
3129
|
return result;
|
|
3047
3130
|
}
|
|
3048
|
-
var ContentLoadInstruction =
|
|
3049
|
-
from:
|
|
3050
|
-
to:
|
|
3051
|
-
authorizationHeaderKvsId:
|
|
3052
|
-
timeout:
|
|
3053
|
-
});
|
|
3054
|
-
var ContentLoaderPayload =
|
|
3055
|
-
type:
|
|
3131
|
+
var ContentLoadInstruction = z142.object({
|
|
3132
|
+
from: z142.string(),
|
|
3133
|
+
to: z142.string(),
|
|
3134
|
+
authorizationHeaderKvsId: z142.string().optional(),
|
|
3135
|
+
timeout: z142.number().optional()
|
|
3136
|
+
});
|
|
3137
|
+
var ContentLoaderPayload = z142.object({
|
|
3138
|
+
type: z142.literal("Single"),
|
|
3056
3139
|
instruction: ContentLoadInstruction
|
|
3057
3140
|
}).or(
|
|
3058
|
-
|
|
3059
|
-
type:
|
|
3060
|
-
loadingChunkSize:
|
|
3061
|
-
instructions:
|
|
3141
|
+
z142.object({
|
|
3142
|
+
type: z142.literal("Multiple"),
|
|
3143
|
+
loadingChunkSize: z142.number().optional(),
|
|
3144
|
+
instructions: z142.array(ContentLoadInstruction)
|
|
3062
3145
|
})
|
|
3063
3146
|
).or(
|
|
3064
|
-
|
|
3065
|
-
type:
|
|
3066
|
-
location:
|
|
3147
|
+
z142.object({
|
|
3148
|
+
type: z142.literal("S3"),
|
|
3149
|
+
location: z142.string()
|
|
3067
3150
|
})
|
|
3068
3151
|
);
|
|
3069
3152
|
function slugify(str, options) {
|
|
@@ -3691,6 +3774,30 @@ var RESERVED_SLUGS = [
|
|
|
3691
3774
|
];
|
|
3692
3775
|
var RESERVED_SLUGS_SET = new Set(RESERVED_SLUGS);
|
|
3693
3776
|
|
|
3777
|
+
// src/api/conversion/documentation/documentation-item-configuration-v2-to-dto.ts
|
|
3778
|
+
var dtoDefaultItemConfigurationV2 = {
|
|
3779
|
+
showSidebar: true,
|
|
3780
|
+
isHidden: false,
|
|
3781
|
+
isPrivate: false,
|
|
3782
|
+
header: {
|
|
3783
|
+
alignment: DocumentationItemHeaderAlignment.Left,
|
|
3784
|
+
backgroundImageScaleType: DocumentationItemHeaderImageScaleType.AspectFill,
|
|
3785
|
+
description: "",
|
|
3786
|
+
showBackgroundOverlay: false,
|
|
3787
|
+
showCoverText: true
|
|
3788
|
+
}
|
|
3789
|
+
};
|
|
3790
|
+
function documentationItemConfigurationToDTOV2(config) {
|
|
3791
|
+
if (!config)
|
|
3792
|
+
return dtoDefaultItemConfigurationV2;
|
|
3793
|
+
return {
|
|
3794
|
+
header: config.header,
|
|
3795
|
+
isHidden: config.isHidden ?? dtoDefaultItemConfigurationV2.isPrivate,
|
|
3796
|
+
isPrivate: config.isPrivate ?? dtoDefaultItemConfigurationV2.isPrivate,
|
|
3797
|
+
showSidebar: config.showSidebar
|
|
3798
|
+
};
|
|
3799
|
+
}
|
|
3800
|
+
|
|
3694
3801
|
// src/api/conversion/documentation/documentation-group-v2-to-dto.ts
|
|
3695
3802
|
function elementGroupsToDocumentationGroupStructureDTOV2(groups, pages) {
|
|
3696
3803
|
const childrenIdsMap = calculateChildrenIdsMapV2(pages, groups);
|
|
@@ -3701,10 +3808,7 @@ function elementGroupsToDocumentationGroupDTOV2(groups, pages) {
|
|
|
3701
3808
|
return groups.map((group) => {
|
|
3702
3809
|
return {
|
|
3703
3810
|
...elementGroupToDocumentationGroupStructureDTOV2(group, childrenIdsMap),
|
|
3704
|
-
configuration: group.data?.configuration
|
|
3705
|
-
showSidebar: true,
|
|
3706
|
-
header: defaultDocumentationItemHeaderV2
|
|
3707
|
-
}
|
|
3811
|
+
configuration: documentationItemConfigurationToDTOV2(group.data?.configuration)
|
|
3708
3812
|
};
|
|
3709
3813
|
});
|
|
3710
3814
|
}
|
|
@@ -3790,10 +3894,7 @@ function documentationPagesToDTOV2(pages, groups, routingVersion) {
|
|
|
3790
3894
|
return pages.map((page) => {
|
|
3791
3895
|
return {
|
|
3792
3896
|
...documentationPageToStructureDTOV2(page, pathsMap),
|
|
3793
|
-
configuration: page.data.configuration
|
|
3794
|
-
showSidebar: true,
|
|
3795
|
-
header: defaultDocumentationItemHeaderV2
|
|
3796
|
-
}
|
|
3897
|
+
configuration: documentationItemConfigurationToDTOV2(page.data.configuration)
|
|
3797
3898
|
};
|
|
3798
3899
|
});
|
|
3799
3900
|
}
|
|
@@ -3829,6 +3930,8 @@ function documentationElementsToHierarchyDto(docPages, docGroups, routingVersion
|
|
|
3829
3930
|
// src/api/conversion/documentation/documentation-item-configuration-v1-to-dto.ts
|
|
3830
3931
|
var dtoDefaultItemConfigurationV1 = {
|
|
3831
3932
|
showSidebar: true,
|
|
3933
|
+
isHidden: false,
|
|
3934
|
+
isPrivate: false,
|
|
3832
3935
|
header: {
|
|
3833
3936
|
alignment: DocumentationItemHeaderAlignment.Left,
|
|
3834
3937
|
backgroundImageScaleType: DocumentationItemHeaderImageScaleType.AspectFill,
|
|
@@ -3842,6 +3945,8 @@ function documentationItemConfigurationToDTOV1(config) {
|
|
|
3842
3945
|
const { backgroundColor, foregroundColor, ...headerRest } = header;
|
|
3843
3946
|
return {
|
|
3844
3947
|
showSidebar,
|
|
3948
|
+
isHidden: config.isHidden ?? dtoDefaultItemConfigurationV1.isHidden,
|
|
3949
|
+
isPrivate: config.isPrivate ?? dtoDefaultItemConfigurationV1.isPrivate,
|
|
3845
3950
|
header: {
|
|
3846
3951
|
...headerRest,
|
|
3847
3952
|
backgroundColor: colorToDTOV1(backgroundColor ?? void 0),
|
|
@@ -3940,93 +4045,123 @@ function documentationPagesToDTOV1(pages, groups, routingVersion) {
|
|
|
3940
4045
|
}
|
|
3941
4046
|
|
|
3942
4047
|
// src/api/dto/design-systems/brand.ts
|
|
3943
|
-
import { z as
|
|
3944
|
-
var DTOBrand =
|
|
3945
|
-
id:
|
|
3946
|
-
designSystemVersionId:
|
|
3947
|
-
persistentId:
|
|
4048
|
+
import { z as z143 } from "zod";
|
|
4049
|
+
var DTOBrand = z143.object({
|
|
4050
|
+
id: z143.string(),
|
|
4051
|
+
designSystemVersionId: z143.string(),
|
|
4052
|
+
persistentId: z143.string(),
|
|
3948
4053
|
meta: ObjectMeta
|
|
3949
4054
|
});
|
|
3950
|
-
var DTOBrandGetResponse =
|
|
3951
|
-
var
|
|
4055
|
+
var DTOBrandGetResponse = z143.object({ brand: DTOBrand });
|
|
4056
|
+
var DTOBrandCreateResponse = z143.object({
|
|
4057
|
+
brand: DTOBrand
|
|
4058
|
+
});
|
|
4059
|
+
var DTOBrandsListResponse = z143.object({ brands: z143.array(DTOBrand) });
|
|
3952
4060
|
|
|
3953
4061
|
// src/api/dto/design-systems/design-system.ts
|
|
4062
|
+
import { z as z144 } from "zod";
|
|
3954
4063
|
var DTODesignSystem = DesignSystem.omit({
|
|
3955
4064
|
name: true,
|
|
3956
|
-
description: true
|
|
4065
|
+
description: true,
|
|
4066
|
+
docExporterId: true
|
|
3957
4067
|
}).extend({
|
|
3958
|
-
meta: ObjectMeta
|
|
4068
|
+
meta: ObjectMeta,
|
|
4069
|
+
docExporterId: z144.string()
|
|
3959
4070
|
});
|
|
3960
4071
|
|
|
4072
|
+
// src/api/dto/design-systems/exporter-property.ts
|
|
4073
|
+
import { z as z145 } from "zod";
|
|
4074
|
+
var DTOExporterProperty = z145.any({});
|
|
4075
|
+
var DTOExporterPropertyListResponse = z145.object({ items: z145.array(DTOExporterProperty) });
|
|
4076
|
+
|
|
3961
4077
|
// src/api/dto/design-systems/version.ts
|
|
3962
|
-
import { z as
|
|
3963
|
-
var DTODesignSystemVersion =
|
|
3964
|
-
id:
|
|
3965
|
-
createdAt:
|
|
4078
|
+
import { z as z146 } from "zod";
|
|
4079
|
+
var DTODesignSystemVersion = z146.object({
|
|
4080
|
+
id: z146.string(),
|
|
4081
|
+
createdAt: z146.date(),
|
|
3966
4082
|
meta: ObjectMeta,
|
|
3967
|
-
version:
|
|
3968
|
-
isReadonly:
|
|
3969
|
-
changeLog:
|
|
3970
|
-
designSystemId:
|
|
4083
|
+
version: z146.string(),
|
|
4084
|
+
isReadonly: z146.boolean(),
|
|
4085
|
+
changeLog: z146.string(),
|
|
4086
|
+
designSystemId: z146.string()
|
|
3971
4087
|
});
|
|
3972
|
-
var DTODesignSystemVersionsListResponse =
|
|
3973
|
-
designSystemVersions:
|
|
4088
|
+
var DTODesignSystemVersionsListResponse = z146.object({
|
|
4089
|
+
designSystemVersions: z146.array(DTODesignSystemVersion)
|
|
3974
4090
|
});
|
|
3975
|
-
var DTODesignSystemVersionGetResponse =
|
|
4091
|
+
var DTODesignSystemVersionGetResponse = z146.object({
|
|
3976
4092
|
designSystemVersion: DTODesignSystemVersion
|
|
3977
4093
|
});
|
|
3978
4094
|
|
|
3979
4095
|
// src/api/dto/design-systems/view.ts
|
|
3980
|
-
import { z as
|
|
3981
|
-
var DTOElementViewColumnSharedAttributes =
|
|
3982
|
-
id:
|
|
3983
|
-
persistentId:
|
|
3984
|
-
width:
|
|
4096
|
+
import { z as z147 } from "zod";
|
|
4097
|
+
var DTOElementViewColumnSharedAttributes = z147.object({
|
|
4098
|
+
id: z147.string(),
|
|
4099
|
+
persistentId: z147.string(),
|
|
4100
|
+
width: z147.number()
|
|
3985
4101
|
});
|
|
3986
4102
|
var DTOElementViewBasePropertyColumn = DTOElementViewColumnSharedAttributes.extend({
|
|
3987
|
-
type:
|
|
4103
|
+
type: z147.literal("BaseProperty"),
|
|
3988
4104
|
basePropertyType: ElementViewBaseColumnType
|
|
3989
4105
|
});
|
|
3990
4106
|
var DTOElementViewPropertyDefinitionColumn = DTOElementViewColumnSharedAttributes.extend({
|
|
3991
|
-
type:
|
|
3992
|
-
propertyDefinitionId:
|
|
4107
|
+
type: z147.literal("PropertyDefinition"),
|
|
4108
|
+
propertyDefinitionId: z147.string()
|
|
3993
4109
|
});
|
|
3994
4110
|
var DTOElementViewThemeColumn = DTOElementViewColumnSharedAttributes.extend({
|
|
3995
|
-
type:
|
|
3996
|
-
themeId:
|
|
4111
|
+
type: z147.literal("Theme"),
|
|
4112
|
+
themeId: z147.string()
|
|
3997
4113
|
});
|
|
3998
|
-
var DTOElementViewColumn =
|
|
4114
|
+
var DTOElementViewColumn = z147.discriminatedUnion("type", [
|
|
3999
4115
|
DTOElementViewBasePropertyColumn,
|
|
4000
4116
|
DTOElementViewPropertyDefinitionColumn,
|
|
4001
4117
|
DTOElementViewThemeColumn
|
|
4002
4118
|
]);
|
|
4003
|
-
var DTOElementView =
|
|
4119
|
+
var DTOElementView = z147.object({
|
|
4004
4120
|
meta: ObjectMeta,
|
|
4005
|
-
persistentId:
|
|
4121
|
+
persistentId: z147.string(),
|
|
4006
4122
|
targetElementType: ElementPropertyTargetType,
|
|
4007
|
-
id:
|
|
4008
|
-
isDefault:
|
|
4009
|
-
columns:
|
|
4123
|
+
id: z147.string(),
|
|
4124
|
+
isDefault: z147.boolean(),
|
|
4125
|
+
columns: z147.array(DTOElementViewColumn)
|
|
4126
|
+
});
|
|
4127
|
+
var DTOElementViewsListResponse = z147.object({
|
|
4128
|
+
elementDataViews: z147.array(DTOElementView)
|
|
4010
4129
|
});
|
|
4011
|
-
|
|
4012
|
-
|
|
4130
|
+
|
|
4131
|
+
// src/api/dto/documentation/anchor.ts
|
|
4132
|
+
import { z as z148 } from "zod";
|
|
4133
|
+
var DTODocumentationPageAnchor = DocumentationPageAnchor;
|
|
4134
|
+
var DTOGetDocumentationPageAnchorsResponse = z148.object({
|
|
4135
|
+
anchors: z148.array(DTODocumentationPageAnchor)
|
|
4013
4136
|
});
|
|
4014
4137
|
|
|
4015
4138
|
// src/api/dto/documentation/link-preview.ts
|
|
4016
|
-
import { z as
|
|
4017
|
-
var DTODocumentationLinkPreviewResponse =
|
|
4139
|
+
import { z as z149 } from "zod";
|
|
4140
|
+
var DTODocumentationLinkPreviewResponse = z149.object({
|
|
4018
4141
|
linkPreview: DocumentationLinkPreview
|
|
4019
4142
|
});
|
|
4020
|
-
var DTODocumentationLinkPreviewRequest =
|
|
4021
|
-
url:
|
|
4022
|
-
documentationItemPersistentId:
|
|
4143
|
+
var DTODocumentationLinkPreviewRequest = z149.object({
|
|
4144
|
+
url: z149.string().optional(),
|
|
4145
|
+
documentationItemPersistentId: z149.string().optional()
|
|
4023
4146
|
});
|
|
4024
4147
|
|
|
4025
4148
|
// src/api/dto/elements/documentation/group-action.ts
|
|
4026
|
-
import { z as
|
|
4149
|
+
import { z as z152 } from "zod";
|
|
4150
|
+
|
|
4151
|
+
// src/api/dto/elements/documentation/group-v2.ts
|
|
4152
|
+
import { z as z151 } from "zod";
|
|
4153
|
+
|
|
4154
|
+
// src/api/dto/elements/documentation/item-configuration-v2.ts
|
|
4155
|
+
import { z as z150 } from "zod";
|
|
4156
|
+
var DTODocumentationItemHeaderV2 = DocumentationItemHeaderV2;
|
|
4157
|
+
var DTODocumentationItemConfigurationV2 = z150.object({
|
|
4158
|
+
showSidebar: z150.boolean(),
|
|
4159
|
+
isPrivate: z150.boolean(),
|
|
4160
|
+
isHidden: z150.boolean(),
|
|
4161
|
+
header: DTODocumentationItemHeaderV2
|
|
4162
|
+
});
|
|
4027
4163
|
|
|
4028
4164
|
// src/api/dto/elements/documentation/group-v2.ts
|
|
4029
|
-
import { z as z142 } from "zod";
|
|
4030
4165
|
var DTODocumentationGroupStructureV2 = ElementGroup.omit({
|
|
4031
4166
|
sortOrder: true,
|
|
4032
4167
|
parentPersistentId: true,
|
|
@@ -4036,137 +4171,137 @@ var DTODocumentationGroupStructureV2 = ElementGroup.omit({
|
|
|
4036
4171
|
data: true,
|
|
4037
4172
|
shortPersistentId: true
|
|
4038
4173
|
}).extend({
|
|
4039
|
-
title:
|
|
4040
|
-
isRoot:
|
|
4041
|
-
childrenIds:
|
|
4174
|
+
title: z151.string(),
|
|
4175
|
+
isRoot: z151.boolean(),
|
|
4176
|
+
childrenIds: z151.array(z151.string()),
|
|
4042
4177
|
groupBehavior: DocumentationGroupBehavior,
|
|
4043
|
-
shortPersistentId:
|
|
4044
|
-
type:
|
|
4178
|
+
shortPersistentId: z151.string(),
|
|
4179
|
+
type: z151.literal("Group")
|
|
4045
4180
|
});
|
|
4046
4181
|
var DTODocumentationGroupV2 = DTODocumentationGroupStructureV2.extend({
|
|
4047
|
-
configuration:
|
|
4182
|
+
configuration: DTODocumentationItemConfigurationV2
|
|
4048
4183
|
});
|
|
4049
|
-
var DTOCreateDocumentationGroupInput =
|
|
4184
|
+
var DTOCreateDocumentationGroupInput = z151.object({
|
|
4050
4185
|
// Identifier
|
|
4051
|
-
persistentId:
|
|
4186
|
+
persistentId: z151.string().uuid(),
|
|
4052
4187
|
// Group properties
|
|
4053
|
-
title:
|
|
4054
|
-
configuration:
|
|
4188
|
+
title: z151.string(),
|
|
4189
|
+
configuration: DTODocumentationItemConfigurationV2.optional(),
|
|
4055
4190
|
// Group placement properties
|
|
4056
|
-
afterPersistentId:
|
|
4057
|
-
parentPersistentId:
|
|
4191
|
+
afterPersistentId: z151.string().uuid().nullish(),
|
|
4192
|
+
parentPersistentId: z151.string().uuid()
|
|
4058
4193
|
});
|
|
4059
|
-
var DTOUpdateDocumentationGroupInput =
|
|
4194
|
+
var DTOUpdateDocumentationGroupInput = z151.object({
|
|
4060
4195
|
// Identifier of the group to update
|
|
4061
|
-
id:
|
|
4196
|
+
id: z151.string(),
|
|
4062
4197
|
// Group properties
|
|
4063
|
-
title:
|
|
4064
|
-
configuration:
|
|
4198
|
+
title: z151.string().optional(),
|
|
4199
|
+
configuration: DTODocumentationItemConfigurationV2.optional()
|
|
4065
4200
|
});
|
|
4066
|
-
var DTOMoveDocumentationGroupInput =
|
|
4201
|
+
var DTOMoveDocumentationGroupInput = z151.object({
|
|
4067
4202
|
// Identifier of the group to update
|
|
4068
|
-
id:
|
|
4203
|
+
id: z151.string(),
|
|
4069
4204
|
// Group placement properties
|
|
4070
|
-
parentPersistentId:
|
|
4071
|
-
afterPersistentId:
|
|
4205
|
+
parentPersistentId: z151.string().uuid(),
|
|
4206
|
+
afterPersistentId: z151.string().uuid().nullish()
|
|
4072
4207
|
});
|
|
4073
|
-
var DTODuplicateDocumentationGroupInput =
|
|
4208
|
+
var DTODuplicateDocumentationGroupInput = z151.object({
|
|
4074
4209
|
// Identifier of the group to duplicate from
|
|
4075
|
-
id:
|
|
4210
|
+
id: z151.string(),
|
|
4076
4211
|
// New group persistent id
|
|
4077
|
-
persistentId:
|
|
4212
|
+
persistentId: z151.string().uuid(),
|
|
4078
4213
|
// Group placement properties
|
|
4079
|
-
afterPersistentId:
|
|
4080
|
-
parentPersistentId:
|
|
4214
|
+
afterPersistentId: z151.string().uuid().nullish(),
|
|
4215
|
+
parentPersistentId: z151.string().uuid()
|
|
4081
4216
|
});
|
|
4082
|
-
var DTOCreateDocumentationTabInput =
|
|
4217
|
+
var DTOCreateDocumentationTabInput = z151.object({
|
|
4083
4218
|
// New group persistent id
|
|
4084
|
-
persistentId:
|
|
4219
|
+
persistentId: z151.string().uuid(),
|
|
4085
4220
|
// If this is page, we will attempt to convert it to tab
|
|
4086
4221
|
// If this is tab group, we will add a new tab to it
|
|
4087
|
-
fromItemPersistentId:
|
|
4088
|
-
tabName:
|
|
4222
|
+
fromItemPersistentId: z151.string(),
|
|
4223
|
+
tabName: z151.string()
|
|
4089
4224
|
});
|
|
4090
|
-
var DTODeleteDocumentationTabGroupInput =
|
|
4225
|
+
var DTODeleteDocumentationTabGroupInput = z151.object({
|
|
4091
4226
|
// Deleted group id
|
|
4092
|
-
id:
|
|
4227
|
+
id: z151.string()
|
|
4093
4228
|
});
|
|
4094
|
-
var DTODeleteDocumentationGroupInput =
|
|
4229
|
+
var DTODeleteDocumentationGroupInput = z151.object({
|
|
4095
4230
|
// Identifier
|
|
4096
|
-
id:
|
|
4231
|
+
id: z151.string(),
|
|
4097
4232
|
// Deletion options
|
|
4098
|
-
deleteSubtree:
|
|
4233
|
+
deleteSubtree: z151.boolean().default(false)
|
|
4099
4234
|
});
|
|
4100
4235
|
|
|
4101
4236
|
// src/api/dto/elements/documentation/group-action.ts
|
|
4102
|
-
var SuccessPayload =
|
|
4103
|
-
success:
|
|
4237
|
+
var SuccessPayload = z152.object({
|
|
4238
|
+
success: z152.literal(true)
|
|
4104
4239
|
});
|
|
4105
|
-
var DTODocumentationGroupCreateActionOutputV2 =
|
|
4106
|
-
type:
|
|
4240
|
+
var DTODocumentationGroupCreateActionOutputV2 = z152.object({
|
|
4241
|
+
type: z152.literal("DocumentationGroupCreate"),
|
|
4107
4242
|
output: SuccessPayload
|
|
4108
4243
|
});
|
|
4109
|
-
var DTODocumentationTabCreateActionOutputV2 =
|
|
4110
|
-
type:
|
|
4244
|
+
var DTODocumentationTabCreateActionOutputV2 = z152.object({
|
|
4245
|
+
type: z152.literal("DocumentationTabCreate"),
|
|
4111
4246
|
output: SuccessPayload
|
|
4112
4247
|
});
|
|
4113
|
-
var DTODocumentationGroupUpdateActionOutputV2 =
|
|
4114
|
-
type:
|
|
4248
|
+
var DTODocumentationGroupUpdateActionOutputV2 = z152.object({
|
|
4249
|
+
type: z152.literal("DocumentationGroupUpdate"),
|
|
4115
4250
|
output: SuccessPayload
|
|
4116
4251
|
});
|
|
4117
|
-
var DTODocumentationGroupMoveActionOutputV2 =
|
|
4118
|
-
type:
|
|
4252
|
+
var DTODocumentationGroupMoveActionOutputV2 = z152.object({
|
|
4253
|
+
type: z152.literal("DocumentationGroupMove"),
|
|
4119
4254
|
output: SuccessPayload
|
|
4120
4255
|
});
|
|
4121
|
-
var DTODocumentationGroupDuplicateActionOutputV2 =
|
|
4122
|
-
type:
|
|
4256
|
+
var DTODocumentationGroupDuplicateActionOutputV2 = z152.object({
|
|
4257
|
+
type: z152.literal("DocumentationGroupDuplicate"),
|
|
4123
4258
|
output: SuccessPayload
|
|
4124
4259
|
});
|
|
4125
|
-
var DTODocumentationGroupDeleteActionOutputV2 =
|
|
4126
|
-
type:
|
|
4260
|
+
var DTODocumentationGroupDeleteActionOutputV2 = z152.object({
|
|
4261
|
+
type: z152.literal("DocumentationGroupDelete"),
|
|
4127
4262
|
output: SuccessPayload
|
|
4128
4263
|
});
|
|
4129
|
-
var DTODocumentationTabGroupDeleteActionOutputV2 =
|
|
4130
|
-
type:
|
|
4264
|
+
var DTODocumentationTabGroupDeleteActionOutputV2 = z152.object({
|
|
4265
|
+
type: z152.literal("DocumentationTabGroupDelete"),
|
|
4131
4266
|
output: SuccessPayload
|
|
4132
4267
|
});
|
|
4133
|
-
var DTODocumentationGroupCreateActionInputV2 =
|
|
4134
|
-
type:
|
|
4268
|
+
var DTODocumentationGroupCreateActionInputV2 = z152.object({
|
|
4269
|
+
type: z152.literal("DocumentationGroupCreate"),
|
|
4135
4270
|
input: DTOCreateDocumentationGroupInput
|
|
4136
4271
|
});
|
|
4137
|
-
var DTODocumentationTabCreateActionInputV2 =
|
|
4138
|
-
type:
|
|
4272
|
+
var DTODocumentationTabCreateActionInputV2 = z152.object({
|
|
4273
|
+
type: z152.literal("DocumentationTabCreate"),
|
|
4139
4274
|
input: DTOCreateDocumentationTabInput
|
|
4140
4275
|
});
|
|
4141
|
-
var DTODocumentationGroupUpdateActionInputV2 =
|
|
4142
|
-
type:
|
|
4276
|
+
var DTODocumentationGroupUpdateActionInputV2 = z152.object({
|
|
4277
|
+
type: z152.literal("DocumentationGroupUpdate"),
|
|
4143
4278
|
input: DTOUpdateDocumentationGroupInput
|
|
4144
4279
|
});
|
|
4145
|
-
var DTODocumentationGroupMoveActionInputV2 =
|
|
4146
|
-
type:
|
|
4280
|
+
var DTODocumentationGroupMoveActionInputV2 = z152.object({
|
|
4281
|
+
type: z152.literal("DocumentationGroupMove"),
|
|
4147
4282
|
input: DTOMoveDocumentationGroupInput
|
|
4148
4283
|
});
|
|
4149
|
-
var DTODocumentationGroupDuplicateActionInputV2 =
|
|
4150
|
-
type:
|
|
4284
|
+
var DTODocumentationGroupDuplicateActionInputV2 = z152.object({
|
|
4285
|
+
type: z152.literal("DocumentationGroupDuplicate"),
|
|
4151
4286
|
input: DTODuplicateDocumentationGroupInput
|
|
4152
4287
|
});
|
|
4153
|
-
var DTODocumentationGroupDeleteActionInputV2 =
|
|
4154
|
-
type:
|
|
4288
|
+
var DTODocumentationGroupDeleteActionInputV2 = z152.object({
|
|
4289
|
+
type: z152.literal("DocumentationGroupDelete"),
|
|
4155
4290
|
input: DTODeleteDocumentationGroupInput
|
|
4156
4291
|
});
|
|
4157
|
-
var DTODocumentationTabGroupDeleteActionInputV2 =
|
|
4158
|
-
type:
|
|
4292
|
+
var DTODocumentationTabGroupDeleteActionInputV2 = z152.object({
|
|
4293
|
+
type: z152.literal("DocumentationTabGroupDelete"),
|
|
4159
4294
|
input: DTODeleteDocumentationTabGroupInput
|
|
4160
4295
|
});
|
|
4161
4296
|
|
|
4162
4297
|
// src/api/dto/elements/documentation/group-v1.ts
|
|
4163
|
-
import { z as
|
|
4298
|
+
import { z as z154 } from "zod";
|
|
4164
4299
|
|
|
4165
4300
|
// src/api/dto/elements/documentation/item-configuration-v1.ts
|
|
4166
|
-
import { z as
|
|
4167
|
-
var DocumentationColorV1 =
|
|
4168
|
-
aliasTo:
|
|
4169
|
-
value:
|
|
4301
|
+
import { z as z153 } from "zod";
|
|
4302
|
+
var DocumentationColorV1 = z153.object({
|
|
4303
|
+
aliasTo: z153.string().optional(),
|
|
4304
|
+
value: z153.string().optional()
|
|
4170
4305
|
});
|
|
4171
4306
|
var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
4172
4307
|
foregroundColor: true,
|
|
@@ -4175,8 +4310,10 @@ var DTODocumentationItemHeaderV1 = DocumentationItemHeaderV1.omit({
|
|
|
4175
4310
|
foregroundColor: DocumentationColorV1.optional(),
|
|
4176
4311
|
backgroundColor: DocumentationColorV1.optional()
|
|
4177
4312
|
});
|
|
4178
|
-
var DTODocumentationItemConfigurationV1 =
|
|
4179
|
-
showSidebar:
|
|
4313
|
+
var DTODocumentationItemConfigurationV1 = z153.object({
|
|
4314
|
+
showSidebar: z153.boolean(),
|
|
4315
|
+
isPrivate: z153.boolean(),
|
|
4316
|
+
isHidden: z153.boolean(),
|
|
4180
4317
|
header: DTODocumentationItemHeaderV1
|
|
4181
4318
|
});
|
|
4182
4319
|
|
|
@@ -4190,124 +4327,131 @@ var DTODocumentationGroupStructureV1 = ElementGroup.omit({
|
|
|
4190
4327
|
data: true,
|
|
4191
4328
|
shortPersistentId: true
|
|
4192
4329
|
}).extend({
|
|
4193
|
-
title:
|
|
4194
|
-
isRoot:
|
|
4195
|
-
childrenIds:
|
|
4330
|
+
title: z154.string(),
|
|
4331
|
+
isRoot: z154.boolean(),
|
|
4332
|
+
childrenIds: z154.array(z154.string()),
|
|
4196
4333
|
groupBehavior: DocumentationGroupBehavior,
|
|
4197
|
-
shortPersistentId:
|
|
4198
|
-
type:
|
|
4334
|
+
shortPersistentId: z154.string(),
|
|
4335
|
+
type: z154.literal("Group")
|
|
4199
4336
|
});
|
|
4200
4337
|
var DTODocumentationGroupV1 = DTODocumentationGroupStructureV1.extend({
|
|
4201
4338
|
configuration: DTODocumentationItemConfigurationV1
|
|
4202
4339
|
});
|
|
4203
4340
|
|
|
4204
4341
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
4205
|
-
import { z as
|
|
4342
|
+
import { z as z156 } from "zod";
|
|
4206
4343
|
|
|
4207
4344
|
// src/api/dto/elements/documentation/page-v2.ts
|
|
4208
|
-
import { z as
|
|
4345
|
+
import { z as z155 } from "zod";
|
|
4209
4346
|
var DTODocumentationPageStructureV2 = DocumentationPageV2.omit({
|
|
4210
4347
|
data: true,
|
|
4211
4348
|
meta: true,
|
|
4212
4349
|
parentPersistentId: true,
|
|
4213
4350
|
sortOrder: true
|
|
4214
4351
|
}).extend({
|
|
4215
|
-
title:
|
|
4216
|
-
path:
|
|
4217
|
-
type:
|
|
4352
|
+
title: z155.string(),
|
|
4353
|
+
path: z155.string(),
|
|
4354
|
+
type: z155.literal("Page")
|
|
4218
4355
|
});
|
|
4219
4356
|
var DTODocumentationPageV2 = DTODocumentationPageStructureV2.extend({
|
|
4220
|
-
configuration:
|
|
4357
|
+
configuration: DTODocumentationItemConfigurationV2
|
|
4221
4358
|
});
|
|
4222
|
-
var DTODocumentationHierarchyV2 =
|
|
4223
|
-
pages:
|
|
4224
|
-
groups:
|
|
4359
|
+
var DTODocumentationHierarchyV2 = z155.object({
|
|
4360
|
+
pages: z155.array(DTODocumentationPageStructureV2),
|
|
4361
|
+
groups: z155.array(DTODocumentationGroupStructureV2)
|
|
4225
4362
|
});
|
|
4226
|
-
var DTOCreateDocumentationPageInputV2 =
|
|
4363
|
+
var DTOCreateDocumentationPageInputV2 = z155.object({
|
|
4227
4364
|
// Identifier
|
|
4228
|
-
persistentId:
|
|
4365
|
+
persistentId: z155.string().uuid(),
|
|
4229
4366
|
// Page properties
|
|
4230
|
-
title:
|
|
4231
|
-
configuration:
|
|
4367
|
+
title: z155.string(),
|
|
4368
|
+
configuration: DTODocumentationItemConfigurationV2.optional(),
|
|
4232
4369
|
// Page placement properties
|
|
4233
|
-
parentPersistentId:
|
|
4234
|
-
afterPersistentId:
|
|
4370
|
+
parentPersistentId: z155.string().uuid(),
|
|
4371
|
+
afterPersistentId: z155.string().uuid().nullish()
|
|
4235
4372
|
});
|
|
4236
|
-
var DTOUpdateDocumentationPageInputV2 =
|
|
4373
|
+
var DTOUpdateDocumentationPageInputV2 = z155.object({
|
|
4237
4374
|
// Identifier of the group to update
|
|
4238
|
-
id:
|
|
4375
|
+
id: z155.string(),
|
|
4239
4376
|
// Page properties
|
|
4240
|
-
title:
|
|
4241
|
-
configuration:
|
|
4377
|
+
title: z155.string().optional(),
|
|
4378
|
+
configuration: DTODocumentationItemConfigurationV2.optional()
|
|
4242
4379
|
});
|
|
4243
|
-
var DTOMoveDocumentationPageInputV2 =
|
|
4380
|
+
var DTOMoveDocumentationPageInputV2 = z155.object({
|
|
4244
4381
|
// Identifier of the group to update
|
|
4245
|
-
id:
|
|
4382
|
+
id: z155.string(),
|
|
4246
4383
|
// Page placement properties
|
|
4247
|
-
parentPersistentId:
|
|
4248
|
-
afterPersistentId:
|
|
4384
|
+
parentPersistentId: z155.string().uuid(),
|
|
4385
|
+
afterPersistentId: z155.string().uuid().nullish()
|
|
4249
4386
|
});
|
|
4250
|
-
var DTODuplicateDocumentationPageInputV2 =
|
|
4387
|
+
var DTODuplicateDocumentationPageInputV2 = z155.object({
|
|
4251
4388
|
// Identifier of the page to duplicate from
|
|
4252
|
-
id:
|
|
4389
|
+
id: z155.string(),
|
|
4253
4390
|
// New page persistent id
|
|
4254
|
-
persistentId:
|
|
4391
|
+
persistentId: z155.string().uuid(),
|
|
4255
4392
|
// Page placement properties
|
|
4256
|
-
parentPersistentId:
|
|
4257
|
-
afterPersistentId:
|
|
4393
|
+
parentPersistentId: z155.string().uuid(),
|
|
4394
|
+
afterPersistentId: z155.string().uuid().nullish()
|
|
4258
4395
|
});
|
|
4259
|
-
var DTODeleteDocumentationPageInputV2 =
|
|
4396
|
+
var DTODeleteDocumentationPageInputV2 = z155.object({
|
|
4260
4397
|
// Identifier
|
|
4261
|
-
id:
|
|
4398
|
+
id: z155.string()
|
|
4262
4399
|
});
|
|
4263
4400
|
|
|
4264
4401
|
// src/api/dto/elements/documentation/page-actions-v2.ts
|
|
4265
|
-
var SuccessPayload2 =
|
|
4266
|
-
success:
|
|
4402
|
+
var SuccessPayload2 = z156.object({
|
|
4403
|
+
success: z156.literal(true)
|
|
4267
4404
|
});
|
|
4268
|
-
var DTODocumentationPageCreateActionOutputV2 =
|
|
4269
|
-
type:
|
|
4405
|
+
var DTODocumentationPageCreateActionOutputV2 = z156.object({
|
|
4406
|
+
type: z156.literal("DocumentationPageCreate"),
|
|
4270
4407
|
output: SuccessPayload2
|
|
4271
4408
|
});
|
|
4272
|
-
var DTODocumentationPageUpdateActionOutputV2 =
|
|
4273
|
-
type:
|
|
4409
|
+
var DTODocumentationPageUpdateActionOutputV2 = z156.object({
|
|
4410
|
+
type: z156.literal("DocumentationPageUpdate"),
|
|
4274
4411
|
output: SuccessPayload2
|
|
4275
4412
|
});
|
|
4276
|
-
var DTODocumentationPageMoveActionOutputV2 =
|
|
4277
|
-
type:
|
|
4413
|
+
var DTODocumentationPageMoveActionOutputV2 = z156.object({
|
|
4414
|
+
type: z156.literal("DocumentationPageMove"),
|
|
4278
4415
|
output: SuccessPayload2
|
|
4279
4416
|
});
|
|
4280
|
-
var DTODocumentationPageDuplicateActionOutputV2 =
|
|
4281
|
-
type:
|
|
4417
|
+
var DTODocumentationPageDuplicateActionOutputV2 = z156.object({
|
|
4418
|
+
type: z156.literal("DocumentationPageDuplicate"),
|
|
4282
4419
|
output: SuccessPayload2
|
|
4283
4420
|
});
|
|
4284
|
-
var DTODocumentationPageDeleteActionOutputV2 =
|
|
4285
|
-
type:
|
|
4421
|
+
var DTODocumentationPageDeleteActionOutputV2 = z156.object({
|
|
4422
|
+
type: z156.literal("DocumentationPageDelete"),
|
|
4286
4423
|
output: SuccessPayload2
|
|
4287
4424
|
});
|
|
4288
|
-
var DTODocumentationPageCreateActionInputV2 =
|
|
4289
|
-
type:
|
|
4425
|
+
var DTODocumentationPageCreateActionInputV2 = z156.object({
|
|
4426
|
+
type: z156.literal("DocumentationPageCreate"),
|
|
4290
4427
|
input: DTOCreateDocumentationPageInputV2
|
|
4291
4428
|
});
|
|
4292
|
-
var DTODocumentationPageUpdateActionInputV2 =
|
|
4293
|
-
type:
|
|
4429
|
+
var DTODocumentationPageUpdateActionInputV2 = z156.object({
|
|
4430
|
+
type: z156.literal("DocumentationPageUpdate"),
|
|
4294
4431
|
input: DTOUpdateDocumentationPageInputV2
|
|
4295
4432
|
});
|
|
4296
|
-
var DTODocumentationPageMoveActionInputV2 =
|
|
4297
|
-
type:
|
|
4433
|
+
var DTODocumentationPageMoveActionInputV2 = z156.object({
|
|
4434
|
+
type: z156.literal("DocumentationPageMove"),
|
|
4298
4435
|
input: DTOMoveDocumentationPageInputV2
|
|
4299
4436
|
});
|
|
4300
|
-
var DTODocumentationPageDuplicateActionInputV2 =
|
|
4301
|
-
type:
|
|
4437
|
+
var DTODocumentationPageDuplicateActionInputV2 = z156.object({
|
|
4438
|
+
type: z156.literal("DocumentationPageDuplicate"),
|
|
4302
4439
|
input: DTODuplicateDocumentationPageInputV2
|
|
4303
4440
|
});
|
|
4304
|
-
var DTODocumentationPageDeleteActionInputV2 =
|
|
4305
|
-
type:
|
|
4441
|
+
var DTODocumentationPageDeleteActionInputV2 = z156.object({
|
|
4442
|
+
type: z156.literal("DocumentationPageDelete"),
|
|
4306
4443
|
input: DTODeleteDocumentationPageInputV2
|
|
4307
4444
|
});
|
|
4308
4445
|
|
|
4446
|
+
// src/api/dto/elements/documentation/page-content.ts
|
|
4447
|
+
import { z as z157 } from "zod";
|
|
4448
|
+
var DTODocumentationPageContent = DocumentationPageContent;
|
|
4449
|
+
var DTODocumentationPageContentGetResponse = z157.object({
|
|
4450
|
+
pageContent: DTODocumentationPageContent
|
|
4451
|
+
});
|
|
4452
|
+
|
|
4309
4453
|
// src/api/dto/elements/documentation/page-v1.ts
|
|
4310
|
-
import { z as
|
|
4454
|
+
import { z as z158 } from "zod";
|
|
4311
4455
|
var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
4312
4456
|
data: true,
|
|
4313
4457
|
meta: true,
|
|
@@ -4315,83 +4459,130 @@ var DocumentationPageV1DTO = DocumentationPageV1.omit({
|
|
|
4315
4459
|
sortOrder: true
|
|
4316
4460
|
}).extend({
|
|
4317
4461
|
configuration: DTODocumentationItemConfigurationV1,
|
|
4318
|
-
blocks:
|
|
4319
|
-
title:
|
|
4320
|
-
path:
|
|
4462
|
+
blocks: z158.array(PageBlockV1),
|
|
4463
|
+
title: z158.string(),
|
|
4464
|
+
path: z158.string()
|
|
4321
4465
|
});
|
|
4322
4466
|
|
|
4323
4467
|
// src/api/dto/elements/figma-nodes/figma-node.ts
|
|
4324
|
-
import { z as
|
|
4325
|
-
var DTOFigmaNodeData =
|
|
4468
|
+
import { z as z159 } from "zod";
|
|
4469
|
+
var DTOFigmaNodeData = z159.object({
|
|
4326
4470
|
// Id of the node in the Figma file
|
|
4327
|
-
figmaNodeId:
|
|
4471
|
+
figmaNodeId: z159.string(),
|
|
4328
4472
|
// Validity
|
|
4329
|
-
isValid:
|
|
4473
|
+
isValid: z159.boolean(),
|
|
4330
4474
|
// Asset data
|
|
4331
|
-
assetId:
|
|
4332
|
-
assetUrl:
|
|
4475
|
+
assetId: z159.string(),
|
|
4476
|
+
assetUrl: z159.string(),
|
|
4333
4477
|
// Asset metadata
|
|
4334
|
-
assetScale:
|
|
4335
|
-
assetWidth:
|
|
4336
|
-
assetHeight:
|
|
4478
|
+
assetScale: z159.number(),
|
|
4479
|
+
assetWidth: z159.number().optional(),
|
|
4480
|
+
assetHeight: z159.number().optional()
|
|
4337
4481
|
});
|
|
4338
4482
|
var DTOFigmaNode = FigmaFileStructure.omit({
|
|
4339
4483
|
data: true
|
|
4340
4484
|
}).extend({
|
|
4341
4485
|
data: DTOFigmaNodeData
|
|
4342
4486
|
});
|
|
4343
|
-
var DTOFigmaNodeRenderInput =
|
|
4487
|
+
var DTOFigmaNodeRenderInput = z159.object({
|
|
4344
4488
|
// Id of a design system's data source representing a linked Figma file
|
|
4345
|
-
sourceId:
|
|
4489
|
+
sourceId: z159.string(),
|
|
4346
4490
|
// Id of a node within the Figma file
|
|
4347
|
-
figmaFileNodeId:
|
|
4491
|
+
figmaFileNodeId: z159.string()
|
|
4348
4492
|
});
|
|
4349
4493
|
|
|
4350
4494
|
// src/api/dto/elements/figma-nodes/node-actions-v2.ts
|
|
4351
|
-
import { z as
|
|
4352
|
-
var DTOFigmaNodeRenderActionOutput =
|
|
4353
|
-
type:
|
|
4354
|
-
figmaNodes:
|
|
4495
|
+
import { z as z160 } from "zod";
|
|
4496
|
+
var DTOFigmaNodeRenderActionOutput = z160.object({
|
|
4497
|
+
type: z160.literal("FigmaNodeRender"),
|
|
4498
|
+
figmaNodes: z160.array(DTOFigmaNode)
|
|
4355
4499
|
});
|
|
4356
|
-
var DTOFigmaNodeRenderActionInput =
|
|
4357
|
-
type:
|
|
4500
|
+
var DTOFigmaNodeRenderActionInput = z160.object({
|
|
4501
|
+
type: z160.literal("FigmaNodeRender"),
|
|
4358
4502
|
input: DTOFigmaNodeRenderInput.array()
|
|
4359
4503
|
});
|
|
4360
4504
|
|
|
4505
|
+
// src/api/dto/elements/properties/property-definitions-actions-v2.ts
|
|
4506
|
+
import { z as z162 } from "zod";
|
|
4507
|
+
|
|
4361
4508
|
// src/api/dto/elements/properties/property-definitions.ts
|
|
4362
|
-
import { z as
|
|
4363
|
-
var
|
|
4364
|
-
|
|
4365
|
-
|
|
4509
|
+
import { z as z161 } from "zod";
|
|
4510
|
+
var CODE_NAME_REGEX2 = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
4511
|
+
var DTOElementPropertyDefinition = z161.object({
|
|
4512
|
+
id: z161.string(),
|
|
4513
|
+
designSystemVersionId: z161.string(),
|
|
4366
4514
|
meta: ObjectMeta,
|
|
4367
|
-
persistentId:
|
|
4515
|
+
persistentId: z161.string(),
|
|
4368
4516
|
type: ElementPropertyTypeSchema,
|
|
4369
4517
|
targetElementType: ElementPropertyTargetType,
|
|
4370
|
-
codeName:
|
|
4371
|
-
options:
|
|
4518
|
+
codeName: z161.string().regex(CODE_NAME_REGEX2),
|
|
4519
|
+
options: z161.array(ElementPropertyDefinitionOption).optional(),
|
|
4372
4520
|
linkElementType: ElementPropertyLinkType.optional()
|
|
4373
4521
|
});
|
|
4374
|
-
var DTOElementPropertyDefinitionsGetResponse =
|
|
4375
|
-
definitions:
|
|
4522
|
+
var DTOElementPropertyDefinitionsGetResponse = z161.object({
|
|
4523
|
+
definitions: z161.array(DTOElementPropertyDefinition)
|
|
4524
|
+
});
|
|
4525
|
+
var DTOCreateElementPropertyDefinitionInputV2 = DTOElementPropertyDefinition.omit({
|
|
4526
|
+
id: true,
|
|
4527
|
+
designSystemVersionId: true
|
|
4528
|
+
});
|
|
4529
|
+
var DTOUpdateElementPropertyDefinitionInputV2 = z161.object({
|
|
4530
|
+
id: z161.string(),
|
|
4531
|
+
name: z161.string().optional(),
|
|
4532
|
+
description: z161.string().optional(),
|
|
4533
|
+
codeName: z161.string().regex(CODE_NAME_REGEX2).optional(),
|
|
4534
|
+
options: z161.array(ElementPropertyDefinitionOption).optional()
|
|
4535
|
+
});
|
|
4536
|
+
var DTODeleteElementPropertyDefinitionInputV2 = z161.object({
|
|
4537
|
+
id: z161.string()
|
|
4538
|
+
});
|
|
4539
|
+
|
|
4540
|
+
// src/api/dto/elements/properties/property-definitions-actions-v2.ts
|
|
4541
|
+
var SuccessPayload3 = z162.object({
|
|
4542
|
+
success: z162.literal(true)
|
|
4543
|
+
});
|
|
4544
|
+
var DTOPropertyDefinitionCreateActionOutputV2 = z162.object({
|
|
4545
|
+
type: z162.literal("PropertyDefinitionCreate"),
|
|
4546
|
+
definition: DTOElementPropertyDefinition
|
|
4547
|
+
});
|
|
4548
|
+
var DTOPropertyDefinitionUpdateActionOutputV2 = z162.object({
|
|
4549
|
+
type: z162.literal("PropertyDefinitionUpdate"),
|
|
4550
|
+
definition: DTOElementPropertyDefinition
|
|
4551
|
+
});
|
|
4552
|
+
var DTOPropertyDefinitionDeleteActionOutputV2 = z162.object({
|
|
4553
|
+
type: z162.literal("PropertyDefinitionDelete"),
|
|
4554
|
+
output: SuccessPayload3
|
|
4555
|
+
});
|
|
4556
|
+
var DTOPropertyDefinitionCreateActionInputV2 = z162.object({
|
|
4557
|
+
type: z162.literal("PropertyDefinitionCreate"),
|
|
4558
|
+
input: DTOCreateElementPropertyDefinitionInputV2
|
|
4559
|
+
});
|
|
4560
|
+
var DTOPropertyDefinitionUpdateActionInputV2 = z162.object({
|
|
4561
|
+
type: z162.literal("PropertyDefinitionUpdate"),
|
|
4562
|
+
input: DTOUpdateElementPropertyDefinitionInputV2
|
|
4563
|
+
});
|
|
4564
|
+
var DTOPropertyDefinitionDeleteActionInputV2 = z162.object({
|
|
4565
|
+
type: z162.literal("PropertyDefinitionDelete"),
|
|
4566
|
+
input: DTODeleteElementPropertyDefinitionInputV2
|
|
4376
4567
|
});
|
|
4377
4568
|
|
|
4378
4569
|
// src/api/dto/elements/properties/property-values.ts
|
|
4379
|
-
import { z as
|
|
4380
|
-
var DTOElementPropertyValue =
|
|
4381
|
-
id:
|
|
4382
|
-
designSystemVersionId:
|
|
4383
|
-
definitionId:
|
|
4384
|
-
targetElementId:
|
|
4385
|
-
value:
|
|
4386
|
-
valuePreview:
|
|
4570
|
+
import { z as z163 } from "zod";
|
|
4571
|
+
var DTOElementPropertyValue = z163.object({
|
|
4572
|
+
id: z163.string(),
|
|
4573
|
+
designSystemVersionId: z163.string(),
|
|
4574
|
+
definitionId: z163.string(),
|
|
4575
|
+
targetElementId: z163.string(),
|
|
4576
|
+
value: z163.union([z163.string(), z163.number(), z163.boolean()]).optional(),
|
|
4577
|
+
valuePreview: z163.string().optional()
|
|
4387
4578
|
});
|
|
4388
|
-
var DTOElementPropertyValuesGetResponse =
|
|
4389
|
-
values:
|
|
4579
|
+
var DTOElementPropertyValuesGetResponse = z163.object({
|
|
4580
|
+
values: z163.array(DTOElementPropertyValue)
|
|
4390
4581
|
});
|
|
4391
4582
|
|
|
4392
4583
|
// src/api/dto/elements/elements-action-v2.ts
|
|
4393
|
-
import { z as
|
|
4394
|
-
var DTOElementActionOutput =
|
|
4584
|
+
import { z as z164 } from "zod";
|
|
4585
|
+
var DTOElementActionOutput = z164.discriminatedUnion("type", [
|
|
4395
4586
|
// Documentation pages
|
|
4396
4587
|
DTODocumentationPageCreateActionOutputV2,
|
|
4397
4588
|
DTODocumentationPageUpdateActionOutputV2,
|
|
@@ -4407,9 +4598,13 @@ var DTOElementActionOutput = z153.discriminatedUnion("type", [
|
|
|
4407
4598
|
DTODocumentationGroupDeleteActionOutputV2,
|
|
4408
4599
|
DTODocumentationTabGroupDeleteActionOutputV2,
|
|
4409
4600
|
// Figma frames
|
|
4410
|
-
DTOFigmaNodeRenderActionOutput
|
|
4601
|
+
DTOFigmaNodeRenderActionOutput,
|
|
4602
|
+
// Properties Definitions
|
|
4603
|
+
DTOPropertyDefinitionCreateActionOutputV2,
|
|
4604
|
+
DTOPropertyDefinitionUpdateActionOutputV2,
|
|
4605
|
+
DTOPropertyDefinitionDeleteActionOutputV2
|
|
4411
4606
|
]);
|
|
4412
|
-
var DTOElementActionInput =
|
|
4607
|
+
var DTOElementActionInput = z164.discriminatedUnion("type", [
|
|
4413
4608
|
// Documentation pages
|
|
4414
4609
|
DTODocumentationPageCreateActionInputV2,
|
|
4415
4610
|
DTODocumentationPageUpdateActionInputV2,
|
|
@@ -4425,57 +4620,73 @@ var DTOElementActionInput = z153.discriminatedUnion("type", [
|
|
|
4425
4620
|
DTODocumentationGroupDeleteActionInputV2,
|
|
4426
4621
|
DTODocumentationTabGroupDeleteActionInputV2,
|
|
4427
4622
|
// Figma frames
|
|
4428
|
-
DTOFigmaNodeRenderActionInput
|
|
4623
|
+
DTOFigmaNodeRenderActionInput,
|
|
4624
|
+
// Properties Definitions
|
|
4625
|
+
DTOPropertyDefinitionCreateActionInputV2,
|
|
4626
|
+
DTOPropertyDefinitionUpdateActionInputV2,
|
|
4627
|
+
DTOPropertyDefinitionDeleteActionInputV2
|
|
4429
4628
|
]);
|
|
4430
4629
|
|
|
4431
4630
|
// src/api/dto/elements/get-elements-v2.ts
|
|
4432
|
-
import { z as
|
|
4433
|
-
var DTOElementsGetTypeFilter =
|
|
4434
|
-
var DTOElementsGetQuerySchema =
|
|
4435
|
-
types:
|
|
4631
|
+
import { z as z165 } from "zod";
|
|
4632
|
+
var DTOElementsGetTypeFilter = z165.enum(["FigmaNode"]);
|
|
4633
|
+
var DTOElementsGetQuerySchema = z165.object({
|
|
4634
|
+
types: z165.string().transform((val) => val.split(",").map((v) => DTOElementsGetTypeFilter.parse(v)))
|
|
4436
4635
|
});
|
|
4437
|
-
var DTOElementsGetOutput =
|
|
4438
|
-
figmaNodes:
|
|
4636
|
+
var DTOElementsGetOutput = z165.object({
|
|
4637
|
+
figmaNodes: z165.array(DTOFigmaNode).optional()
|
|
4638
|
+
});
|
|
4639
|
+
|
|
4640
|
+
// src/api/dto/workspaces/integrations.ts
|
|
4641
|
+
import { z as z166 } from "zod";
|
|
4642
|
+
var DTOIntegration = z166.object({
|
|
4643
|
+
id: z166.string(),
|
|
4644
|
+
workspaceId: z166.string(),
|
|
4645
|
+
type: IntegrationType,
|
|
4646
|
+
createdAt: z166.coerce.date()
|
|
4647
|
+
});
|
|
4648
|
+
var DTOIntegrationOAuthGetResponse = z166.object({
|
|
4649
|
+
url: z166.string()
|
|
4439
4650
|
});
|
|
4440
4651
|
|
|
4441
4652
|
// src/api/dto/workspaces/membership.ts
|
|
4442
|
-
import { z as
|
|
4653
|
+
import { z as z169 } from "zod";
|
|
4443
4654
|
|
|
4444
4655
|
// src/api/dto/workspaces/workspace.ts
|
|
4445
|
-
import { z as
|
|
4656
|
+
import { z as z168 } from "zod";
|
|
4446
4657
|
|
|
4447
4658
|
// src/api/dto/workspaces/npm-registry.ts
|
|
4448
|
-
import { z as
|
|
4449
|
-
var DTONpmRegistryConfig =
|
|
4659
|
+
import { z as z167 } from "zod";
|
|
4660
|
+
var DTONpmRegistryConfig = z167.object({
|
|
4450
4661
|
// Registry basic configuration
|
|
4451
4662
|
registryType: NpmRegistryType,
|
|
4452
|
-
registryUrl:
|
|
4453
|
-
customRegistryUrl:
|
|
4663
|
+
registryUrl: z167.string(),
|
|
4664
|
+
customRegistryUrl: z167.string().optional(),
|
|
4454
4665
|
// URL of Supernova NPM packages proxy
|
|
4455
|
-
proxyUrl:
|
|
4666
|
+
proxyUrl: z167.string(),
|
|
4456
4667
|
// Auth configuration
|
|
4457
4668
|
authType: NpmRegistryAuthType,
|
|
4458
|
-
accessToken:
|
|
4459
|
-
username:
|
|
4460
|
-
password:
|
|
4669
|
+
accessToken: z167.literal("redacted").optional(),
|
|
4670
|
+
username: z167.string().optional(),
|
|
4671
|
+
password: z167.literal("redacted").optional(),
|
|
4461
4672
|
// NPM package scopes for whih the proxy should be enabled
|
|
4462
|
-
enabledScopes:
|
|
4673
|
+
enabledScopes: z167.array(z167.string()),
|
|
4463
4674
|
// True if client should bypass Supernova proxy and connect directly to the registry
|
|
4464
4675
|
// (e.g. when the NPM registry is behind a VPN or firewall which prevents Supernova from accessing it)
|
|
4465
|
-
bypassProxy:
|
|
4676
|
+
bypassProxy: z167.boolean()
|
|
4466
4677
|
});
|
|
4467
4678
|
|
|
4468
4679
|
// src/api/dto/workspaces/workspace.ts
|
|
4469
|
-
var DTOWorkspace =
|
|
4470
|
-
id:
|
|
4680
|
+
var DTOWorkspace = z168.object({
|
|
4681
|
+
id: z168.string(),
|
|
4471
4682
|
profile: WorkspaceProfile,
|
|
4472
4683
|
subscription: Subscription,
|
|
4473
4684
|
npmRegistry: DTONpmRegistryConfig.optional()
|
|
4474
4685
|
});
|
|
4475
4686
|
|
|
4476
4687
|
// src/api/dto/workspaces/membership.ts
|
|
4477
|
-
var DTOWorkspaceRole =
|
|
4478
|
-
var DTOUserWorkspaceMembership =
|
|
4688
|
+
var DTOWorkspaceRole = z169.enum(["Owner", "Admin", "Creator", "Viewer", "Billing"]);
|
|
4689
|
+
var DTOUserWorkspaceMembership = z169.object({
|
|
4479
4690
|
// Workspace the user is a member of
|
|
4480
4691
|
workspace: DTOWorkspace,
|
|
4481
4692
|
// Assigned role the user has in the workspace
|
|
@@ -4485,24 +4696,48 @@ var DTOUserWorkspaceMembership = z157.object({
|
|
|
4485
4696
|
// when a workspace's subscription is downgraded to free tier
|
|
4486
4697
|
effectiveRole: DTOWorkspaceRole
|
|
4487
4698
|
});
|
|
4488
|
-
var DTOUserWorkspaceMembershipsResponse =
|
|
4489
|
-
membership:
|
|
4699
|
+
var DTOUserWorkspaceMembershipsResponse = z169.object({
|
|
4700
|
+
membership: z169.array(DTOUserWorkspaceMembership)
|
|
4701
|
+
});
|
|
4702
|
+
|
|
4703
|
+
// src/api/payloads/design-systems/brand.ts
|
|
4704
|
+
import { z as z170 } from "zod";
|
|
4705
|
+
var DTOCreateBrandInput = z170.object({
|
|
4706
|
+
persistentId: z170.string().uuid(),
|
|
4707
|
+
meta: z170.object({
|
|
4708
|
+
name: z170.string(),
|
|
4709
|
+
description: z170.string()
|
|
4710
|
+
})
|
|
4711
|
+
});
|
|
4712
|
+
|
|
4713
|
+
// src/api/payloads/design-systems/version.ts
|
|
4714
|
+
import { z as z171 } from "zod";
|
|
4715
|
+
function validateSemver(version) {
|
|
4716
|
+
const semverRegex = /^(\d+)(\.\d+)?(\.\d+)?$/;
|
|
4717
|
+
return semverRegex.test(version);
|
|
4718
|
+
}
|
|
4719
|
+
var DTOCreateVersionInput = z171.object({
|
|
4720
|
+
meta: ObjectMeta,
|
|
4721
|
+
version: z171.string().refine(validateSemver, {
|
|
4722
|
+
message: "Invalid semantic versioning format"
|
|
4723
|
+
}),
|
|
4724
|
+
changeLog: z171.string()
|
|
4490
4725
|
});
|
|
4491
4726
|
|
|
4492
4727
|
// src/api/payloads/documentation/block-definitions.ts
|
|
4493
|
-
import { z as
|
|
4494
|
-
var DTOGetBlockDefinitionsOutput =
|
|
4495
|
-
definitions:
|
|
4728
|
+
import { z as z172 } from "zod";
|
|
4729
|
+
var DTOGetBlockDefinitionsOutput = z172.object({
|
|
4730
|
+
definitions: z172.array(PageBlockDefinition)
|
|
4496
4731
|
});
|
|
4497
4732
|
|
|
4498
4733
|
// src/api/payloads/liveblocks/auth.ts
|
|
4499
|
-
import { z as
|
|
4500
|
-
var DTOLiveblocksAuthRequest =
|
|
4501
|
-
room:
|
|
4734
|
+
import { z as z173 } from "zod";
|
|
4735
|
+
var DTOLiveblocksAuthRequest = z173.object({
|
|
4736
|
+
room: z173.string()
|
|
4502
4737
|
});
|
|
4503
4738
|
|
|
4504
4739
|
// src/api/payloads/workspaces/workspace-configuration.ts
|
|
4505
|
-
import { z as
|
|
4740
|
+
import { z as z174 } from "zod";
|
|
4506
4741
|
var prohibitedSsoKeys = ["providerId", "metadataXml", "emailDomains"];
|
|
4507
4742
|
function validateSsoPayload(ssoPayload) {
|
|
4508
4743
|
const keys = [];
|
|
@@ -4525,31 +4760,37 @@ function validateSsoPayload(ssoPayload) {
|
|
|
4525
4760
|
keys
|
|
4526
4761
|
};
|
|
4527
4762
|
}
|
|
4528
|
-
var NpmRegistryInput =
|
|
4529
|
-
enabledScopes:
|
|
4530
|
-
customRegistryUrl:
|
|
4531
|
-
bypassProxy:
|
|
4532
|
-
npmProxyRegistryConfigId:
|
|
4533
|
-
npmProxyVersion:
|
|
4534
|
-
registryType:
|
|
4535
|
-
authType:
|
|
4536
|
-
authHeaderName:
|
|
4537
|
-
authHeaderValue:
|
|
4538
|
-
accessToken:
|
|
4539
|
-
username:
|
|
4540
|
-
password:
|
|
4541
|
-
});
|
|
4542
|
-
var WorkspaceConfigurationPayload =
|
|
4763
|
+
var NpmRegistryInput = z174.object({
|
|
4764
|
+
enabledScopes: z174.array(z174.string()),
|
|
4765
|
+
customRegistryUrl: z174.string().optional(),
|
|
4766
|
+
bypassProxy: z174.boolean().optional(),
|
|
4767
|
+
npmProxyRegistryConfigId: z174.string().optional(),
|
|
4768
|
+
npmProxyVersion: z174.number().optional(),
|
|
4769
|
+
registryType: z174.string(),
|
|
4770
|
+
authType: z174.string(),
|
|
4771
|
+
authHeaderName: z174.string(),
|
|
4772
|
+
authHeaderValue: z174.string(),
|
|
4773
|
+
accessToken: z174.string(),
|
|
4774
|
+
username: z174.string(),
|
|
4775
|
+
password: z174.string()
|
|
4776
|
+
});
|
|
4777
|
+
var WorkspaceConfigurationPayload = z174.object({
|
|
4543
4778
|
ipWhitelist: WorkspaceIpSettings.partial().optional(),
|
|
4544
4779
|
sso: SsoProvider.partial().optional(),
|
|
4545
4780
|
npmRegistrySettings: NpmRegistryInput.partial().optional(),
|
|
4546
4781
|
profile: WorkspaceProfile.partial().optional()
|
|
4547
4782
|
});
|
|
4548
4783
|
|
|
4784
|
+
// src/api/payloads/workspaces/workspace-integrations.ts
|
|
4785
|
+
import { z as z175 } from "zod";
|
|
4786
|
+
var DTOWorkspaceIntegrationOauthInput = z175.object({
|
|
4787
|
+
type: IntegrationType
|
|
4788
|
+
});
|
|
4789
|
+
|
|
4549
4790
|
// src/yjs/design-system-content/documentation-hierarchy.ts
|
|
4550
|
-
import { z as
|
|
4551
|
-
var DocumentationHierarchySettings =
|
|
4552
|
-
routingVersion:
|
|
4791
|
+
import { z as z176 } from "zod";
|
|
4792
|
+
var DocumentationHierarchySettings = z176.object({
|
|
4793
|
+
routingVersion: z176.string()
|
|
4553
4794
|
});
|
|
4554
4795
|
function documentationHierarchyToYjs(doc, transaction) {
|
|
4555
4796
|
doc.transact((trx) => {
|
|
@@ -4624,14 +4865,14 @@ function getInternalSettingsYMap(doc) {
|
|
|
4624
4865
|
}
|
|
4625
4866
|
|
|
4626
4867
|
// src/yjs/design-system-content/item-configuration.ts
|
|
4627
|
-
import { z as
|
|
4628
|
-
var DTODocumentationPageRoomHeaderData =
|
|
4629
|
-
title:
|
|
4630
|
-
configuration:
|
|
4868
|
+
import { z as z177 } from "zod";
|
|
4869
|
+
var DTODocumentationPageRoomHeaderData = z177.object({
|
|
4870
|
+
title: z177.string(),
|
|
4871
|
+
configuration: DTODocumentationItemConfigurationV2
|
|
4631
4872
|
});
|
|
4632
|
-
var DTODocumentationPageRoomHeaderDataUpdate =
|
|
4633
|
-
title:
|
|
4634
|
-
configuration:
|
|
4873
|
+
var DTODocumentationPageRoomHeaderDataUpdate = z177.object({
|
|
4874
|
+
title: z177.string().optional(),
|
|
4875
|
+
configuration: DTODocumentationItemConfigurationV2.omit({ header: true }).extend({ header: DocumentationItemHeaderV2.partial() }).optional()
|
|
4635
4876
|
});
|
|
4636
4877
|
function itemConfigurationToYjs(yDoc, item) {
|
|
4637
4878
|
yDoc.transact((trx) => {
|
|
@@ -4653,10 +4894,10 @@ function itemConfigurationToYjs(yDoc, item) {
|
|
|
4653
4894
|
header.showCoverText !== void 0 && headerYMap.set("showCoverText", header.showCoverText);
|
|
4654
4895
|
header.minHeight !== void 0 && headerYMap.set("minHeight", header.minHeight);
|
|
4655
4896
|
}
|
|
4656
|
-
|
|
4657
|
-
|
|
4658
|
-
|
|
4659
|
-
|
|
4897
|
+
const configYMap = trx.doc.getMap("itemConfiguration");
|
|
4898
|
+
configuration?.showSidebar !== void 0 && configYMap.set("showSidebar", configuration.showSidebar);
|
|
4899
|
+
configuration?.isHidden !== void 0 && configYMap.set("isHidden", configuration.isHidden);
|
|
4900
|
+
configuration?.isPrivate !== void 0 && configYMap.set("isPrivate", configuration.isPrivate);
|
|
4660
4901
|
});
|
|
4661
4902
|
}
|
|
4662
4903
|
function yjsToItemConfiguration(yDoc) {
|
|
@@ -4676,11 +4917,13 @@ function yjsToItemConfiguration(yDoc) {
|
|
|
4676
4917
|
const configYMap = yDoc.getMap("itemConfiguration");
|
|
4677
4918
|
const rawConfig = {
|
|
4678
4919
|
showSidebar: configYMap.get("showSidebar"),
|
|
4920
|
+
isHidden: configYMap.get("isHidden") ?? false,
|
|
4921
|
+
isPrivate: configYMap.get("isPrivate") ?? false,
|
|
4679
4922
|
header: rawHeader
|
|
4680
4923
|
};
|
|
4681
4924
|
return {
|
|
4682
|
-
title:
|
|
4683
|
-
configuration:
|
|
4925
|
+
title: z177.string().parse(title),
|
|
4926
|
+
configuration: DTODocumentationItemConfigurationV2.parse(rawConfig)
|
|
4684
4927
|
};
|
|
4685
4928
|
}
|
|
4686
4929
|
|
|
@@ -4689,9 +4932,9 @@ var PageBlockEditorModel = PageBlockEditorModelV2;
|
|
|
4689
4932
|
var PageSectionEditorModel = PageSectionEditorModelV2;
|
|
4690
4933
|
|
|
4691
4934
|
// src/yjs/docs-editor/model/page.ts
|
|
4692
|
-
import { z as
|
|
4693
|
-
var DocumentationPageEditorModel =
|
|
4694
|
-
blocks:
|
|
4935
|
+
import { z as z178 } from "zod";
|
|
4936
|
+
var DocumentationPageEditorModel = z178.object({
|
|
4937
|
+
blocks: z178.array(PageBlockEditorModel.or(PageSectionEditorModel))
|
|
4695
4938
|
});
|
|
4696
4939
|
|
|
4697
4940
|
// src/yjs/docs-editor/prosemirror/schema.ts
|
|
@@ -5948,20 +6191,26 @@ function serializeTextSpanAttribute(spanAttribute) {
|
|
|
5948
6191
|
return { type: "code", attrs: {} };
|
|
5949
6192
|
case "Link":
|
|
5950
6193
|
if (spanAttribute.link) {
|
|
5951
|
-
return serializeLinkMark(
|
|
6194
|
+
return serializeLinkMark(
|
|
6195
|
+
spanAttribute.link,
|
|
6196
|
+
spanAttribute.openInNewTab ?? spanAttribute.openInNewWindow ?? false
|
|
6197
|
+
);
|
|
5952
6198
|
} else if (spanAttribute.documentationItemId) {
|
|
5953
|
-
return serializeLinkMark(
|
|
6199
|
+
return serializeLinkMark(
|
|
6200
|
+
`@page:${spanAttribute.documentationItemId}`,
|
|
6201
|
+
spanAttribute.openInNewTab ?? spanAttribute.openInNewWindow ?? false
|
|
6202
|
+
);
|
|
5954
6203
|
} else {
|
|
5955
|
-
return serializeLinkMark("about:blank", spanAttribute.openInNewWindow ?? false);
|
|
6204
|
+
return serializeLinkMark("about:blank", spanAttribute.openInNewTab ?? spanAttribute.openInNewWindow ?? false);
|
|
5956
6205
|
}
|
|
5957
6206
|
}
|
|
5958
6207
|
}
|
|
5959
|
-
function serializeLinkMark(href,
|
|
6208
|
+
function serializeLinkMark(href, openInNewTab) {
|
|
5960
6209
|
return {
|
|
5961
6210
|
type: "link",
|
|
5962
6211
|
attrs: {
|
|
5963
6212
|
href,
|
|
5964
|
-
target:
|
|
6213
|
+
target: openInNewTab ? "_blank" : "_self",
|
|
5965
6214
|
rel: "noopener noreferrer nofollow",
|
|
5966
6215
|
class: "tiptap-link"
|
|
5967
6216
|
}
|
|
@@ -7654,7 +7903,7 @@ var blocks = [
|
|
|
7654
7903
|
|
|
7655
7904
|
// src/yjs/docs-editor/prosemirror-to-blocks.ts
|
|
7656
7905
|
import { yXmlFragmentToProsemirrorJSON } from "y-prosemirror";
|
|
7657
|
-
import { z as
|
|
7906
|
+
import { z as z179 } from "zod";
|
|
7658
7907
|
function yDocToPage(yDoc, definitions) {
|
|
7659
7908
|
return yXmlFragmentToPage(yDoc.getXmlFragment("default"), definitions);
|
|
7660
7909
|
}
|
|
@@ -7697,7 +7946,7 @@ function prosemirrorNodeToSectionItem(prosemirrorNode, definitionsMap) {
|
|
|
7697
7946
|
return null;
|
|
7698
7947
|
return {
|
|
7699
7948
|
id,
|
|
7700
|
-
title: getProsemirrorAttribute(prosemirrorNode, "title",
|
|
7949
|
+
title: getProsemirrorAttribute(prosemirrorNode, "title", z179.string()) ?? "",
|
|
7701
7950
|
columns: (prosemirrorNode.content ?? []).filter((c) => c.type === "sectionItemColumn").map((c) => prosemirrorNodeToSectionColumns(c, definitionsMap)).filter(nonNullFilter)
|
|
7702
7951
|
};
|
|
7703
7952
|
}
|
|
@@ -7732,7 +7981,7 @@ function internalProsemirrorNodesToBlocks(prosemirrorNodes, definitionsMap, dept
|
|
|
7732
7981
|
});
|
|
7733
7982
|
}
|
|
7734
7983
|
function internalProsemirrorNodeToBlock(prosemirrorNode, definitionsMap, depth) {
|
|
7735
|
-
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId",
|
|
7984
|
+
const definitionId = getProsemirrorAttribute(prosemirrorNode, "definitionId", z179.string());
|
|
7736
7985
|
if (!definitionId) {
|
|
7737
7986
|
console.warn(`definitionId on ${prosemirrorNode.type} is required to be interpreted as a block, skipping node`);
|
|
7738
7987
|
return [];
|
|
@@ -7774,7 +8023,7 @@ function parseAsRichText(prosemirrorNode, definition, property) {
|
|
|
7774
8023
|
if (!id)
|
|
7775
8024
|
return null;
|
|
7776
8025
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
7777
|
-
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type",
|
|
8026
|
+
const calloutType = parseCalloutType(getProsemirrorAttribute(prosemirrorNode, "type", z179.string().optional()));
|
|
7778
8027
|
return {
|
|
7779
8028
|
// TODO Artem: indent
|
|
7780
8029
|
id,
|
|
@@ -7874,6 +8123,9 @@ function parseRichText(spans) {
|
|
|
7874
8123
|
};
|
|
7875
8124
|
}
|
|
7876
8125
|
function parseRichTextSpan(span) {
|
|
8126
|
+
if (span.type === "hardBreak") {
|
|
8127
|
+
return { text: "\n", attributes: [] };
|
|
8128
|
+
}
|
|
7877
8129
|
if (span.type !== "text" || !span.text)
|
|
7878
8130
|
return null;
|
|
7879
8131
|
const marks = span.marks ?? [];
|
|
@@ -7898,21 +8150,23 @@ function parseRichTextAttribute(mark) {
|
|
|
7898
8150
|
return null;
|
|
7899
8151
|
}
|
|
7900
8152
|
function parseProsemirrorLink(mark) {
|
|
7901
|
-
const href = getProsemirrorAttribute(mark, "href",
|
|
8153
|
+
const href = getProsemirrorAttribute(mark, "href", z179.string().optional());
|
|
7902
8154
|
if (!href)
|
|
7903
8155
|
return null;
|
|
7904
|
-
const target = getProsemirrorAttribute(mark, "target",
|
|
7905
|
-
const
|
|
8156
|
+
const target = getProsemirrorAttribute(mark, "target", z179.string().optional());
|
|
8157
|
+
const openInNewTab = target === "_blank";
|
|
7906
8158
|
if (href.startsWith("@")) {
|
|
7907
8159
|
return {
|
|
7908
8160
|
type: "Link",
|
|
7909
|
-
openInNewWindow,
|
|
8161
|
+
openInNewWindow: openInNewTab,
|
|
8162
|
+
openInNewTab,
|
|
7910
8163
|
documentationItemId: href.split(":")[1]
|
|
7911
8164
|
};
|
|
7912
8165
|
} else {
|
|
7913
8166
|
return {
|
|
7914
8167
|
type: "Link",
|
|
7915
|
-
openInNewWindow,
|
|
8168
|
+
openInNewWindow: openInNewTab,
|
|
8169
|
+
openInNewTab,
|
|
7916
8170
|
link: href
|
|
7917
8171
|
};
|
|
7918
8172
|
}
|
|
@@ -7922,7 +8176,7 @@ function parseAsTable(prosemirrorNode, definition, property) {
|
|
|
7922
8176
|
if (!id)
|
|
7923
8177
|
return null;
|
|
7924
8178
|
const variantId = getProsemirrorBlockVariantId(prosemirrorNode);
|
|
7925
|
-
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder",
|
|
8179
|
+
const hasBorder = getProsemirrorAttribute(prosemirrorNode, "hasBorder", z179.boolean().optional()) !== false;
|
|
7926
8180
|
const tableChild = prosemirrorNode.content?.find((c) => c.type === "table");
|
|
7927
8181
|
if (!tableChild) {
|
|
7928
8182
|
return emptyTable(id, variantId, 0);
|
|
@@ -7969,9 +8223,9 @@ function parseAsTableCell(prosemirrorNode) {
|
|
|
7969
8223
|
const id = getProsemirrorBlockId(prosemirrorNode);
|
|
7970
8224
|
if (!id)
|
|
7971
8225
|
return null;
|
|
7972
|
-
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign",
|
|
8226
|
+
const textAlign = getProsemirrorAttribute(prosemirrorNode, "textAlign", z179.string().optional());
|
|
7973
8227
|
let columnWidth;
|
|
7974
|
-
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth",
|
|
8228
|
+
const columnWidthArray = getProsemirrorAttribute(prosemirrorNode, "colwidth", z179.array(z179.number()).optional());
|
|
7975
8229
|
if (columnWidthArray) {
|
|
7976
8230
|
columnWidth = columnWidthArray[0];
|
|
7977
8231
|
}
|
|
@@ -8009,7 +8263,7 @@ function parseAsTableNode(prosemirrorNode) {
|
|
|
8009
8263
|
value: parseRichText(prosemirrorNode.content ?? [])
|
|
8010
8264
|
};
|
|
8011
8265
|
case "image":
|
|
8012
|
-
const items = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
8266
|
+
const items = getProsemirrorAttribute(prosemirrorNode, "items", z179.string());
|
|
8013
8267
|
if (!items)
|
|
8014
8268
|
return null;
|
|
8015
8269
|
const parsedItems = PageBlockItemV2.array().safeParse(JSON.parse(items));
|
|
@@ -8114,7 +8368,7 @@ function parseAsCustomBlock(prosemirrorNode, definition) {
|
|
|
8114
8368
|
};
|
|
8115
8369
|
}
|
|
8116
8370
|
function parseBlockItems(prosemirrorNode, definition) {
|
|
8117
|
-
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items",
|
|
8371
|
+
const itemsString = getProsemirrorAttribute(prosemirrorNode, "items", z179.string());
|
|
8118
8372
|
if (!itemsString)
|
|
8119
8373
|
return null;
|
|
8120
8374
|
const itemsJson = JSON.parse(itemsString);
|
|
@@ -8126,18 +8380,18 @@ function parseBlockItems(prosemirrorNode, definition) {
|
|
|
8126
8380
|
}
|
|
8127
8381
|
function parseAppearance(prosemirrorNode) {
|
|
8128
8382
|
let appearance = {};
|
|
8129
|
-
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance",
|
|
8383
|
+
const rawAppearanceString = getProsemirrorAttribute(prosemirrorNode, "appearance", z179.string().optional());
|
|
8130
8384
|
if (rawAppearanceString) {
|
|
8131
8385
|
const parsedAppearance = PageBlockAppearanceV2.safeParse(JSON.parse(rawAppearanceString));
|
|
8132
8386
|
if (parsedAppearance.success) {
|
|
8133
8387
|
appearance = parsedAppearance.data;
|
|
8134
8388
|
}
|
|
8135
8389
|
}
|
|
8136
|
-
const columns = getProsemirrorAttribute(prosemirrorNode, "columns",
|
|
8390
|
+
const columns = getProsemirrorAttribute(prosemirrorNode, "columns", z179.number().optional());
|
|
8137
8391
|
if (columns) {
|
|
8138
8392
|
appearance.numberOfColumns = columns;
|
|
8139
8393
|
}
|
|
8140
|
-
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor",
|
|
8394
|
+
const backgroundColor = getProsemirrorAttribute(prosemirrorNode, "backgroundColor", z179.string().optional());
|
|
8141
8395
|
if (backgroundColor) {
|
|
8142
8396
|
const parsedColor = PageBlockColorV2.safeParse(JSON.parse(backgroundColor));
|
|
8143
8397
|
if (parsedColor.success) {
|
|
@@ -8228,13 +8482,13 @@ function valueSchemaForPropertyType(type) {
|
|
|
8228
8482
|
}
|
|
8229
8483
|
}
|
|
8230
8484
|
function getProsemirrorBlockId(prosemirrorNode) {
|
|
8231
|
-
const id = getProsemirrorAttribute(prosemirrorNode, "id",
|
|
8485
|
+
const id = getProsemirrorAttribute(prosemirrorNode, "id", z179.string());
|
|
8232
8486
|
if (!id)
|
|
8233
8487
|
console.warn(`Prosemirror attribute "id" on ${prosemirrorNode.type} is required`);
|
|
8234
8488
|
return id;
|
|
8235
8489
|
}
|
|
8236
8490
|
function getProsemirrorBlockVariantId(prosemirrorNode) {
|
|
8237
|
-
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(
|
|
8491
|
+
return getProsemirrorAttribute(prosemirrorNode, "variantId", nullishToOptional(z179.string()));
|
|
8238
8492
|
}
|
|
8239
8493
|
function getProsemirrorAttribute(prosemirrorNode, attributeName, validationSchema) {
|
|
8240
8494
|
const parsedAttr = validationSchema.safeParse(prosemirrorNode.attrs?.[attributeName]);
|
|
@@ -8260,14 +8514,19 @@ export {
|
|
|
8260
8514
|
BlockDefinitionUtils,
|
|
8261
8515
|
BlockParsingUtils,
|
|
8262
8516
|
DTOBrand,
|
|
8517
|
+
DTOBrandCreateResponse,
|
|
8263
8518
|
DTOBrandGetResponse,
|
|
8264
8519
|
DTOBrandsListResponse,
|
|
8520
|
+
DTOCreateBrandInput,
|
|
8265
8521
|
DTOCreateDocumentationGroupInput,
|
|
8266
8522
|
DTOCreateDocumentationPageInputV2,
|
|
8267
8523
|
DTOCreateDocumentationTabInput,
|
|
8524
|
+
DTOCreateElementPropertyDefinitionInputV2,
|
|
8525
|
+
DTOCreateVersionInput,
|
|
8268
8526
|
DTODeleteDocumentationGroupInput,
|
|
8269
8527
|
DTODeleteDocumentationPageInputV2,
|
|
8270
8528
|
DTODeleteDocumentationTabGroupInput,
|
|
8529
|
+
DTODeleteElementPropertyDefinitionInputV2,
|
|
8271
8530
|
DTODesignSystem,
|
|
8272
8531
|
DTODesignSystemVersion,
|
|
8273
8532
|
DTODesignSystemVersionGetResponse,
|
|
@@ -8288,8 +8547,13 @@ export {
|
|
|
8288
8547
|
DTODocumentationGroupV2,
|
|
8289
8548
|
DTODocumentationHierarchyV2,
|
|
8290
8549
|
DTODocumentationItemConfigurationV1,
|
|
8550
|
+
DTODocumentationItemConfigurationV2,
|
|
8551
|
+
DTODocumentationItemHeaderV2,
|
|
8291
8552
|
DTODocumentationLinkPreviewRequest,
|
|
8292
8553
|
DTODocumentationLinkPreviewResponse,
|
|
8554
|
+
DTODocumentationPageAnchor,
|
|
8555
|
+
DTODocumentationPageContent,
|
|
8556
|
+
DTODocumentationPageContentGetResponse,
|
|
8293
8557
|
DTODocumentationPageCreateActionInputV2,
|
|
8294
8558
|
DTODocumentationPageCreateActionOutputV2,
|
|
8295
8559
|
DTODocumentationPageDeleteActionInputV2,
|
|
@@ -8326,21 +8590,34 @@ export {
|
|
|
8326
8590
|
DTOElementsGetOutput,
|
|
8327
8591
|
DTOElementsGetQuerySchema,
|
|
8328
8592
|
DTOElementsGetTypeFilter,
|
|
8593
|
+
DTOExporterProperty,
|
|
8594
|
+
DTOExporterPropertyListResponse,
|
|
8329
8595
|
DTOFigmaNode,
|
|
8330
8596
|
DTOFigmaNodeData,
|
|
8331
8597
|
DTOFigmaNodeRenderActionInput,
|
|
8332
8598
|
DTOFigmaNodeRenderActionOutput,
|
|
8333
8599
|
DTOFigmaNodeRenderInput,
|
|
8334
8600
|
DTOGetBlockDefinitionsOutput,
|
|
8601
|
+
DTOGetDocumentationPageAnchorsResponse,
|
|
8602
|
+
DTOIntegration,
|
|
8603
|
+
DTOIntegrationOAuthGetResponse,
|
|
8335
8604
|
DTOLiveblocksAuthRequest,
|
|
8336
8605
|
DTOMoveDocumentationGroupInput,
|
|
8337
8606
|
DTOMoveDocumentationPageInputV2,
|
|
8338
8607
|
DTONpmRegistryConfig,
|
|
8608
|
+
DTOPropertyDefinitionCreateActionInputV2,
|
|
8609
|
+
DTOPropertyDefinitionCreateActionOutputV2,
|
|
8610
|
+
DTOPropertyDefinitionDeleteActionInputV2,
|
|
8611
|
+
DTOPropertyDefinitionDeleteActionOutputV2,
|
|
8612
|
+
DTOPropertyDefinitionUpdateActionInputV2,
|
|
8613
|
+
DTOPropertyDefinitionUpdateActionOutputV2,
|
|
8339
8614
|
DTOUpdateDocumentationGroupInput,
|
|
8340
8615
|
DTOUpdateDocumentationPageInputV2,
|
|
8616
|
+
DTOUpdateElementPropertyDefinitionInputV2,
|
|
8341
8617
|
DTOUserWorkspaceMembership,
|
|
8342
8618
|
DTOUserWorkspaceMembershipsResponse,
|
|
8343
8619
|
DTOWorkspace,
|
|
8620
|
+
DTOWorkspaceIntegrationOauthInput,
|
|
8344
8621
|
DTOWorkspaceRole,
|
|
8345
8622
|
DocumentationHierarchySettings,
|
|
8346
8623
|
DocumentationPageEditorModel,
|
|
@@ -8358,6 +8635,7 @@ export {
|
|
|
8358
8635
|
documentationElementsToHierarchyDto,
|
|
8359
8636
|
documentationHierarchyToYjs,
|
|
8360
8637
|
documentationItemConfigurationToDTOV1,
|
|
8638
|
+
documentationItemConfigurationToDTOV2,
|
|
8361
8639
|
documentationPagesToDTOV1,
|
|
8362
8640
|
documentationPagesToDTOV2,
|
|
8363
8641
|
documentationPagesToStructureDTOV2,
|
|
@@ -8379,6 +8657,7 @@ export {
|
|
|
8379
8657
|
prosemirrorNodesToBlocks,
|
|
8380
8658
|
serializeAsCustomBlock,
|
|
8381
8659
|
shallowProsemirrorNodeToBlock,
|
|
8660
|
+
validateSemver,
|
|
8382
8661
|
validateSsoPayload,
|
|
8383
8662
|
yDocToPage,
|
|
8384
8663
|
yXmlFragmentToPage,
|