@supernova-studio/model 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 +3591 -268
- package/dist/index.d.ts +3591 -268
- package/dist/index.js +120 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +625 -521
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/dsm/brand.ts +2 -0
- package/src/dsm/desing-system-create.ts +1 -2
- package/src/dsm/desing-system-update.ts +2 -3
- package/src/dsm/documentation/index.ts +1 -0
- package/src/dsm/documentation/page-anchor.ts +9 -0
- package/src/dsm/documentation/page-content.ts +0 -1
- package/src/dsm/elements/data/documentation-block-v1.ts +3 -1
- package/src/dsm/elements/data/documentation-v1.ts +2 -0
- package/src/dsm/elements/data/documentation-v2.ts +4 -0
- package/src/dsm/exporter-property-values-collection.ts +31 -0
- package/src/dsm/index.ts +1 -0
- package/src/dsm/properties/property-definition.ts +8 -2
- package/src/dsm/published-doc-page.ts +18 -11
- package/src/dsm/views/view.ts +6 -1
- package/src/feature-flags/feature-flags.ts +1 -1
- package/src/integrations/index.ts +2 -0
- package/src/integrations/integration.ts +36 -0
- package/src/integrations/workspace-oauth-requests.ts +12 -0
- package/src/tokens/personal-access-token.ts +12 -4
- package/src/utils/errors.ts +6 -1
package/dist/index.mjs
CHANGED
|
@@ -599,6 +599,7 @@ import { z as z30 } from "zod";
|
|
|
599
599
|
var ElementPropertyTypeSchema = z30.enum(["Text", "Number", "Boolean", "Select", "Generic", "Link", "URL"]);
|
|
600
600
|
var ElementPropertyTargetType = z30.enum(["Token", "Component", "DocumentationPage"]);
|
|
601
601
|
var ElementPropertyLinkType = z30.enum(["FigmaComponent", "DocumentationPage"]);
|
|
602
|
+
var CODE_NAME_REGEX = /^[a-zA-Z_$][a-zA-Z_$0-9]{1,99}$/;
|
|
602
603
|
var ColorTokenInlineData = z30.object({
|
|
603
604
|
value: z30.string()
|
|
604
605
|
});
|
|
@@ -612,7 +613,7 @@ var ElementPropertyDefinition = z30.object({
|
|
|
612
613
|
designSystemVersionId: z30.string(),
|
|
613
614
|
persistentId: z30.string(),
|
|
614
615
|
name: z30.string(),
|
|
615
|
-
codeName: z30.string(),
|
|
616
|
+
codeName: z30.string().regex(CODE_NAME_REGEX),
|
|
616
617
|
description: z30.string(),
|
|
617
618
|
type: ElementPropertyTypeSchema,
|
|
618
619
|
targetElementType: ElementPropertyTargetType,
|
|
@@ -780,6 +781,7 @@ var PageBlockShortcut = z34.object({
|
|
|
780
781
|
asset: nullishToOptional(PageBlockAsset),
|
|
781
782
|
documentationItemId: nullishToOptional(z34.string()),
|
|
782
783
|
url: nullishToOptional(z34.string()),
|
|
784
|
+
openInNewTab: nullishToOptional(z34.boolean()),
|
|
783
785
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
784
786
|
documentationItemPreview: nullishToOptional(PageBlockLinkPreview)
|
|
785
787
|
});
|
|
@@ -837,7 +839,9 @@ var PageBlockTextSpanAttribute = z34.object({
|
|
|
837
839
|
type: PageBlockTextSpanAttributeType,
|
|
838
840
|
link: nullishToOptional(z34.string()),
|
|
839
841
|
documentationItemId: nullishToOptional(z34.string()),
|
|
840
|
-
openInNewWindow: nullishToOptional(z34.boolean())
|
|
842
|
+
openInNewWindow: nullishToOptional(z34.boolean()),
|
|
843
|
+
// deprecated. use openInNewTab
|
|
844
|
+
openInNewTab: nullishToOptional(z34.boolean())
|
|
841
845
|
});
|
|
842
846
|
var PageBlockTextSpan = z34.object({
|
|
843
847
|
text: z34.string(),
|
|
@@ -1167,6 +1171,8 @@ var defaultDocumentationItemHeaderV1 = {
|
|
|
1167
1171
|
// src/dsm/elements/data/documentation-v1.ts
|
|
1168
1172
|
var DocumentationItemConfigurationV1 = z38.object({
|
|
1169
1173
|
showSidebar: z38.boolean(),
|
|
1174
|
+
isPrivate: z38.boolean().optional(),
|
|
1175
|
+
isHidden: z38.boolean().optional(),
|
|
1170
1176
|
header: DocumentationItemHeaderV1
|
|
1171
1177
|
});
|
|
1172
1178
|
var defaultDocumentationItemConfigurationV1 = {
|
|
@@ -1210,10 +1216,14 @@ var defaultDocumentationItemHeaderV2 = {
|
|
|
1210
1216
|
// src/dsm/elements/data/documentation-v2.ts
|
|
1211
1217
|
var DocumentationItemConfigurationV2 = z41.object({
|
|
1212
1218
|
showSidebar: z41.boolean(),
|
|
1219
|
+
isPrivate: z41.boolean().optional(),
|
|
1220
|
+
isHidden: z41.boolean().optional(),
|
|
1213
1221
|
header: DocumentationItemHeaderV2
|
|
1214
1222
|
});
|
|
1215
1223
|
var defaultDocumentationItemConfigurationV2 = {
|
|
1216
1224
|
header: defaultDocumentationItemHeaderV2,
|
|
1225
|
+
isHidden: false,
|
|
1226
|
+
isPrivate: false,
|
|
1217
1227
|
showSidebar: true
|
|
1218
1228
|
};
|
|
1219
1229
|
|
|
@@ -2481,282 +2491,289 @@ var DocumentationLinkPreview = z94.object({
|
|
|
2481
2491
|
thumbnail: PageBlockImageReference.optional()
|
|
2482
2492
|
});
|
|
2483
2493
|
|
|
2484
|
-
// src/dsm/documentation/page-
|
|
2494
|
+
// src/dsm/documentation/page-anchor.ts
|
|
2485
2495
|
import { z as z95 } from "zod";
|
|
2486
|
-
var
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
updatedAt: z95.coerce.date(),
|
|
2491
|
-
documentationPageId: z95.string(),
|
|
2492
|
-
documentationPageName: z95.string(),
|
|
2493
|
-
storagePath: z95.string()
|
|
2496
|
+
var DocumentationPageAnchor = z95.object({
|
|
2497
|
+
blockId: z95.string(),
|
|
2498
|
+
level: z95.number(),
|
|
2499
|
+
text: z95.string()
|
|
2494
2500
|
});
|
|
2495
2501
|
|
|
2496
|
-
// src/dsm/documentation/page-content.ts
|
|
2502
|
+
// src/dsm/documentation/page-content-backup.ts
|
|
2497
2503
|
import { z as z96 } from "zod";
|
|
2498
|
-
var
|
|
2499
|
-
PageBlockEditorModelV2,
|
|
2500
|
-
PageSectionEditorModelV2
|
|
2501
|
-
]);
|
|
2502
|
-
var DocumentationPageContentData = z96.object({
|
|
2503
|
-
items: z96.array(DocumentationPageContentItem)
|
|
2504
|
-
});
|
|
2505
|
-
var DocumentationPageContent = z96.object({
|
|
2504
|
+
var DocumentationPageContentBackup = z96.object({
|
|
2506
2505
|
id: z96.string(),
|
|
2507
2506
|
designSystemVersionId: z96.string(),
|
|
2508
2507
|
createdAt: z96.coerce.date(),
|
|
2509
2508
|
updatedAt: z96.coerce.date(),
|
|
2510
2509
|
documentationPageId: z96.string(),
|
|
2511
|
-
|
|
2512
|
-
|
|
2510
|
+
documentationPageName: z96.string(),
|
|
2511
|
+
storagePath: z96.string()
|
|
2513
2512
|
});
|
|
2514
2513
|
|
|
2515
|
-
// src/dsm/documentation/page.ts
|
|
2514
|
+
// src/dsm/documentation/page-content.ts
|
|
2516
2515
|
import { z as z97 } from "zod";
|
|
2517
|
-
var
|
|
2518
|
-
|
|
2516
|
+
var DocumentationPageContentItem = z97.discriminatedUnion("type", [
|
|
2517
|
+
PageBlockEditorModelV2,
|
|
2518
|
+
PageSectionEditorModelV2
|
|
2519
|
+
]);
|
|
2520
|
+
var DocumentationPageContentData = z97.object({
|
|
2521
|
+
items: z97.array(DocumentationPageContentItem)
|
|
2522
|
+
});
|
|
2523
|
+
var DocumentationPageContent = z97.object({
|
|
2519
2524
|
id: z97.string(),
|
|
2520
|
-
persistentId: z97.string(),
|
|
2521
|
-
shortPersistentId: z97.string(),
|
|
2522
2525
|
designSystemVersionId: z97.string(),
|
|
2523
|
-
parentPersistentId: z97.string().nullish(),
|
|
2524
|
-
sortOrder: z97.number(),
|
|
2525
|
-
title: z97.string(),
|
|
2526
|
-
slug: z97.string(),
|
|
2527
|
-
userSlug: z97.string().nullish(),
|
|
2528
2526
|
createdAt: z97.coerce.date(),
|
|
2529
|
-
updatedAt: z97.coerce.date()
|
|
2527
|
+
updatedAt: z97.coerce.date(),
|
|
2528
|
+
documentationPageId: z97.string(),
|
|
2529
|
+
data: DocumentationPageContentData
|
|
2530
2530
|
});
|
|
2531
2531
|
|
|
2532
|
-
// src/dsm/
|
|
2532
|
+
// src/dsm/documentation/page.ts
|
|
2533
2533
|
import { z as z98 } from "zod";
|
|
2534
|
-
var
|
|
2534
|
+
var DocumentationPage = z98.object({
|
|
2535
|
+
type: z98.literal("DocumentationPage"),
|
|
2536
|
+
id: z98.string(),
|
|
2537
|
+
persistentId: z98.string(),
|
|
2538
|
+
shortPersistentId: z98.string(),
|
|
2535
2539
|
designSystemVersionId: z98.string(),
|
|
2536
|
-
|
|
2540
|
+
parentPersistentId: z98.string().nullish(),
|
|
2541
|
+
sortOrder: z98.number(),
|
|
2542
|
+
title: z98.string(),
|
|
2543
|
+
slug: z98.string(),
|
|
2544
|
+
userSlug: z98.string().nullish(),
|
|
2545
|
+
createdAt: z98.coerce.date(),
|
|
2546
|
+
updatedAt: z98.coerce.date()
|
|
2547
|
+
});
|
|
2548
|
+
|
|
2549
|
+
// src/dsm/rooms/design-system-version-room.ts
|
|
2550
|
+
import { z as z99 } from "zod";
|
|
2551
|
+
var DesignSystemVersionRoom = Entity.extend({
|
|
2552
|
+
designSystemVersionId: z99.string(),
|
|
2553
|
+
liveblocksId: z99.string()
|
|
2537
2554
|
});
|
|
2538
|
-
var DesignSystemVersionRoomInternalSettings =
|
|
2539
|
-
routingVersion:
|
|
2555
|
+
var DesignSystemVersionRoomInternalSettings = z99.object({
|
|
2556
|
+
routingVersion: z99.string()
|
|
2540
2557
|
});
|
|
2541
|
-
var DesignSystemVersionRoomInitialState =
|
|
2542
|
-
pages:
|
|
2543
|
-
groups:
|
|
2558
|
+
var DesignSystemVersionRoomInitialState = z99.object({
|
|
2559
|
+
pages: z99.array(DocumentationPageV2),
|
|
2560
|
+
groups: z99.array(ElementGroup),
|
|
2544
2561
|
internalSettings: DesignSystemVersionRoomInternalSettings
|
|
2545
2562
|
});
|
|
2546
|
-
var DesignSystemVersionRoomUpdate =
|
|
2547
|
-
pages:
|
|
2548
|
-
groups:
|
|
2549
|
-
deletedPageIds:
|
|
2550
|
-
deletedGroupIds:
|
|
2563
|
+
var DesignSystemVersionRoomUpdate = z99.object({
|
|
2564
|
+
pages: z99.array(DocumentationPageV2),
|
|
2565
|
+
groups: z99.array(ElementGroup),
|
|
2566
|
+
deletedPageIds: z99.array(z99.string()),
|
|
2567
|
+
deletedGroupIds: z99.array(z99.string())
|
|
2551
2568
|
});
|
|
2552
2569
|
|
|
2553
2570
|
// src/dsm/rooms/documentation-page-room.ts
|
|
2554
|
-
import { z as
|
|
2571
|
+
import { z as z100 } from "zod";
|
|
2555
2572
|
var DocumentationPageRoom = Entity.extend({
|
|
2556
|
-
designSystemVersionId:
|
|
2557
|
-
documentationPageId:
|
|
2558
|
-
liveblocksId:
|
|
2559
|
-
isDirty:
|
|
2573
|
+
designSystemVersionId: z100.string(),
|
|
2574
|
+
documentationPageId: z100.string(),
|
|
2575
|
+
liveblocksId: z100.string(),
|
|
2576
|
+
isDirty: z100.boolean()
|
|
2560
2577
|
});
|
|
2561
|
-
var DocumentationPageRoomState =
|
|
2562
|
-
pageItems:
|
|
2578
|
+
var DocumentationPageRoomState = z100.object({
|
|
2579
|
+
pageItems: z100.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
2563
2580
|
itemConfiguration: DocumentationItemConfigurationV2
|
|
2564
2581
|
});
|
|
2565
|
-
var DocumentationPageRoomRoomUpdate =
|
|
2582
|
+
var DocumentationPageRoomRoomUpdate = z100.object({
|
|
2566
2583
|
page: DocumentationPageV2,
|
|
2567
2584
|
pageParent: ElementGroup
|
|
2568
2585
|
});
|
|
2569
2586
|
var DocumentationPageRoomInitialStateUpdate = DocumentationPageRoomRoomUpdate.extend({
|
|
2570
|
-
pageItems:
|
|
2571
|
-
blockDefinitions:
|
|
2587
|
+
pageItems: z100.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
2588
|
+
blockDefinitions: z100.array(PageBlockDefinition)
|
|
2572
2589
|
});
|
|
2573
2590
|
|
|
2574
2591
|
// src/dsm/rooms/room-type.ts
|
|
2575
|
-
import { z as
|
|
2592
|
+
import { z as z101 } from "zod";
|
|
2576
2593
|
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
2577
2594
|
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
2578
2595
|
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
2579
2596
|
return RoomTypeEnum2;
|
|
2580
2597
|
})(RoomTypeEnum || {});
|
|
2581
|
-
var RoomTypeSchema =
|
|
2598
|
+
var RoomTypeSchema = z101.nativeEnum(RoomTypeEnum);
|
|
2582
2599
|
var RoomType = RoomTypeSchema.enum;
|
|
2583
2600
|
|
|
2584
2601
|
// src/dsm/views/column.ts
|
|
2585
|
-
import { z as
|
|
2586
|
-
var ElementViewBaseColumnType =
|
|
2587
|
-
var ElementViewColumnType =
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2602
|
+
import { z as z102 } from "zod";
|
|
2603
|
+
var ElementViewBaseColumnType = z102.enum(["Name", "Description", "Value", "UpdatedAt"]);
|
|
2604
|
+
var ElementViewColumnType = z102.union([
|
|
2605
|
+
z102.literal("BaseProperty"),
|
|
2606
|
+
z102.literal("PropertyDefinition"),
|
|
2607
|
+
z102.literal("Theme")
|
|
2591
2608
|
]);
|
|
2592
|
-
var ElementViewColumnSharedAttributes =
|
|
2593
|
-
id:
|
|
2594
|
-
persistentId:
|
|
2595
|
-
elementDataViewId:
|
|
2596
|
-
sortPosition:
|
|
2597
|
-
width:
|
|
2609
|
+
var ElementViewColumnSharedAttributes = z102.object({
|
|
2610
|
+
id: z102.string(),
|
|
2611
|
+
persistentId: z102.string(),
|
|
2612
|
+
elementDataViewId: z102.string(),
|
|
2613
|
+
sortPosition: z102.number(),
|
|
2614
|
+
width: z102.number()
|
|
2598
2615
|
});
|
|
2599
2616
|
var ElementViewBasePropertyColumn = ElementViewColumnSharedAttributes.extend({
|
|
2600
|
-
type:
|
|
2617
|
+
type: z102.literal("BaseProperty"),
|
|
2601
2618
|
basePropertyType: ElementViewBaseColumnType
|
|
2602
2619
|
});
|
|
2603
2620
|
var ElementViewPropertyDefinitionColumn = ElementViewColumnSharedAttributes.extend({
|
|
2604
|
-
type:
|
|
2605
|
-
propertyDefinitionId:
|
|
2621
|
+
type: z102.literal("PropertyDefinition"),
|
|
2622
|
+
propertyDefinitionId: z102.string()
|
|
2606
2623
|
});
|
|
2607
2624
|
var ElementViewThemeColumn = ElementViewColumnSharedAttributes.extend({
|
|
2608
|
-
type:
|
|
2609
|
-
themeId:
|
|
2625
|
+
type: z102.literal("Theme"),
|
|
2626
|
+
themeId: z102.string()
|
|
2610
2627
|
});
|
|
2611
|
-
var ElementViewColumn =
|
|
2628
|
+
var ElementViewColumn = z102.discriminatedUnion("type", [
|
|
2612
2629
|
ElementViewBasePropertyColumn,
|
|
2613
2630
|
ElementViewPropertyDefinitionColumn,
|
|
2614
2631
|
ElementViewThemeColumn
|
|
2615
2632
|
]);
|
|
2616
2633
|
|
|
2617
2634
|
// src/dsm/views/view.ts
|
|
2618
|
-
import { z as z102 } from "zod";
|
|
2619
|
-
var ElementView = z102.object({
|
|
2620
|
-
id: z102.string(),
|
|
2621
|
-
persistentId: z102.string(),
|
|
2622
|
-
designSystemVersionId: z102.string(),
|
|
2623
|
-
name: z102.string(),
|
|
2624
|
-
description: z102.string(),
|
|
2625
|
-
targetElementType: ElementPropertyTargetType,
|
|
2626
|
-
isDefault: z102.boolean()
|
|
2627
|
-
});
|
|
2628
|
-
|
|
2629
|
-
// src/dsm/brand.ts
|
|
2630
2635
|
import { z as z103 } from "zod";
|
|
2631
|
-
var
|
|
2636
|
+
var ElementView = z103.object({
|
|
2632
2637
|
id: z103.string(),
|
|
2633
|
-
designSystemVersionId: z103.string(),
|
|
2634
2638
|
persistentId: z103.string(),
|
|
2639
|
+
designSystemVersionId: z103.string(),
|
|
2635
2640
|
name: z103.string(),
|
|
2636
|
-
description: z103.string()
|
|
2641
|
+
description: z103.string(),
|
|
2642
|
+
targetElementType: ElementPropertyTargetType,
|
|
2643
|
+
isDefault: z103.boolean()
|
|
2644
|
+
});
|
|
2645
|
+
|
|
2646
|
+
// src/dsm/brand.ts
|
|
2647
|
+
import { z as z104 } from "zod";
|
|
2648
|
+
var Brand = z104.object({
|
|
2649
|
+
id: z104.string(),
|
|
2650
|
+
designSystemVersionId: z104.string(),
|
|
2651
|
+
persistentId: z104.string(),
|
|
2652
|
+
name: z104.string(),
|
|
2653
|
+
description: z104.string()
|
|
2637
2654
|
});
|
|
2638
2655
|
|
|
2639
2656
|
// src/dsm/design-system.ts
|
|
2640
|
-
import { z as
|
|
2657
|
+
import { z as z114 } from "zod";
|
|
2641
2658
|
|
|
2642
2659
|
// src/workspace/npm-registry-settings.ts
|
|
2643
|
-
import { z as
|
|
2644
|
-
var NpmRegistryAuthType =
|
|
2645
|
-
var NpmRegistryType =
|
|
2646
|
-
var NpmRegistryBasicAuthConfig =
|
|
2647
|
-
authType:
|
|
2648
|
-
username:
|
|
2649
|
-
password:
|
|
2650
|
-
});
|
|
2651
|
-
var NpmRegistryBearerAuthConfig =
|
|
2652
|
-
authType:
|
|
2653
|
-
accessToken:
|
|
2654
|
-
});
|
|
2655
|
-
var NpmRegistryNoAuthConfig =
|
|
2656
|
-
authType:
|
|
2657
|
-
});
|
|
2658
|
-
var NpmRegistrCustomAuthConfig =
|
|
2659
|
-
authType:
|
|
2660
|
-
authHeaderName:
|
|
2661
|
-
authHeaderValue:
|
|
2662
|
-
});
|
|
2663
|
-
var NpmRegistryAuthConfig =
|
|
2660
|
+
import { z as z105 } from "zod";
|
|
2661
|
+
var NpmRegistryAuthType = z105.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
2662
|
+
var NpmRegistryType = z105.enum(["NPMJS", "GitHub", "AzureDevOps", "Artifactory", "Custom"]);
|
|
2663
|
+
var NpmRegistryBasicAuthConfig = z105.object({
|
|
2664
|
+
authType: z105.literal(NpmRegistryAuthType.Enum.Basic),
|
|
2665
|
+
username: z105.string(),
|
|
2666
|
+
password: z105.string()
|
|
2667
|
+
});
|
|
2668
|
+
var NpmRegistryBearerAuthConfig = z105.object({
|
|
2669
|
+
authType: z105.literal(NpmRegistryAuthType.Enum.Bearer),
|
|
2670
|
+
accessToken: z105.string()
|
|
2671
|
+
});
|
|
2672
|
+
var NpmRegistryNoAuthConfig = z105.object({
|
|
2673
|
+
authType: z105.literal(NpmRegistryAuthType.Enum.None)
|
|
2674
|
+
});
|
|
2675
|
+
var NpmRegistrCustomAuthConfig = z105.object({
|
|
2676
|
+
authType: z105.literal(NpmRegistryAuthType.Enum.Custom),
|
|
2677
|
+
authHeaderName: z105.string(),
|
|
2678
|
+
authHeaderValue: z105.string()
|
|
2679
|
+
});
|
|
2680
|
+
var NpmRegistryAuthConfig = z105.discriminatedUnion("authType", [
|
|
2664
2681
|
NpmRegistryBasicAuthConfig,
|
|
2665
2682
|
NpmRegistryBearerAuthConfig,
|
|
2666
2683
|
NpmRegistryNoAuthConfig,
|
|
2667
2684
|
NpmRegistrCustomAuthConfig
|
|
2668
2685
|
]);
|
|
2669
|
-
var NpmRegistryConfigBase =
|
|
2686
|
+
var NpmRegistryConfigBase = z105.object({
|
|
2670
2687
|
registryType: NpmRegistryType,
|
|
2671
|
-
enabledScopes:
|
|
2672
|
-
customRegistryUrl:
|
|
2673
|
-
bypassProxy:
|
|
2674
|
-
npmProxyRegistryConfigId:
|
|
2675
|
-
npmProxyVersion:
|
|
2688
|
+
enabledScopes: z105.array(z105.string()),
|
|
2689
|
+
customRegistryUrl: z105.string().optional(),
|
|
2690
|
+
bypassProxy: z105.boolean().default(false),
|
|
2691
|
+
npmProxyRegistryConfigId: z105.string().optional(),
|
|
2692
|
+
npmProxyVersion: z105.number().optional()
|
|
2676
2693
|
});
|
|
2677
2694
|
var NpmRegistryConfig = NpmRegistryConfigBase.and(NpmRegistryAuthConfig);
|
|
2678
2695
|
|
|
2679
2696
|
// src/workspace/sso-provider.ts
|
|
2680
|
-
import { z as
|
|
2681
|
-
var SsoProvider =
|
|
2682
|
-
providerId:
|
|
2683
|
-
defaultAutoInviteValue:
|
|
2684
|
-
autoInviteDomains:
|
|
2685
|
-
skipDocsSupernovaLogin:
|
|
2686
|
-
areInvitesDisabled:
|
|
2687
|
-
isTestMode:
|
|
2688
|
-
emailDomains:
|
|
2689
|
-
metadataXml:
|
|
2697
|
+
import { z as z106 } from "zod";
|
|
2698
|
+
var SsoProvider = z106.object({
|
|
2699
|
+
providerId: z106.string(),
|
|
2700
|
+
defaultAutoInviteValue: z106.boolean(),
|
|
2701
|
+
autoInviteDomains: z106.record(z106.string(), z106.boolean()),
|
|
2702
|
+
skipDocsSupernovaLogin: z106.boolean(),
|
|
2703
|
+
areInvitesDisabled: z106.boolean(),
|
|
2704
|
+
isTestMode: z106.boolean(),
|
|
2705
|
+
emailDomains: z106.array(z106.string()),
|
|
2706
|
+
metadataXml: z106.string().nullish()
|
|
2690
2707
|
});
|
|
2691
2708
|
|
|
2692
2709
|
// src/workspace/user-invite.ts
|
|
2693
|
-
import { z as
|
|
2710
|
+
import { z as z108 } from "zod";
|
|
2694
2711
|
|
|
2695
2712
|
// src/workspace/workspace-role.ts
|
|
2696
|
-
import { z as
|
|
2697
|
-
var WorkspaceRoleSchema =
|
|
2713
|
+
import { z as z107 } from "zod";
|
|
2714
|
+
var WorkspaceRoleSchema = z107.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest"]);
|
|
2698
2715
|
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
2699
2716
|
|
|
2700
2717
|
// src/workspace/user-invite.ts
|
|
2701
2718
|
var MAX_MEMBERS_COUNT = 100;
|
|
2702
|
-
var UserInvite =
|
|
2703
|
-
email:
|
|
2719
|
+
var UserInvite = z108.object({
|
|
2720
|
+
email: z108.string().email().trim().transform((value) => value.toLowerCase()),
|
|
2704
2721
|
role: WorkspaceRoleSchema
|
|
2705
2722
|
});
|
|
2706
|
-
var UserInvites =
|
|
2723
|
+
var UserInvites = z108.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
2707
2724
|
|
|
2708
2725
|
// src/workspace/workspace-context.ts
|
|
2709
|
-
import { z as
|
|
2726
|
+
import { z as z110 } from "zod";
|
|
2710
2727
|
|
|
2711
2728
|
// src/workspace/workspace.ts
|
|
2712
|
-
import { z as
|
|
2729
|
+
import { z as z109 } from "zod";
|
|
2713
2730
|
import IPCIDR from "ip-cidr";
|
|
2714
2731
|
var isValidCIDR = (value) => {
|
|
2715
2732
|
return IPCIDR.isValidAddress(value);
|
|
2716
2733
|
};
|
|
2717
|
-
var WorkspaceIpWhitelistEntry =
|
|
2718
|
-
isEnabled:
|
|
2719
|
-
name:
|
|
2720
|
-
range:
|
|
2734
|
+
var WorkspaceIpWhitelistEntry = z109.object({
|
|
2735
|
+
isEnabled: z109.boolean(),
|
|
2736
|
+
name: z109.string(),
|
|
2737
|
+
range: z109.string().refine(isValidCIDR, {
|
|
2721
2738
|
message: "Invalid IP CIDR"
|
|
2722
2739
|
})
|
|
2723
2740
|
});
|
|
2724
|
-
var WorkspaceIpSettings =
|
|
2725
|
-
isEnabledForCloud:
|
|
2726
|
-
isEnabledForDocs:
|
|
2727
|
-
entries:
|
|
2741
|
+
var WorkspaceIpSettings = z109.object({
|
|
2742
|
+
isEnabledForCloud: z109.boolean(),
|
|
2743
|
+
isEnabledForDocs: z109.boolean(),
|
|
2744
|
+
entries: z109.array(WorkspaceIpWhitelistEntry)
|
|
2728
2745
|
});
|
|
2729
|
-
var WorkspaceProfile =
|
|
2730
|
-
name:
|
|
2731
|
-
handle:
|
|
2732
|
-
color:
|
|
2733
|
-
avatar: nullishToOptional(
|
|
2746
|
+
var WorkspaceProfile = z109.object({
|
|
2747
|
+
name: z109.string(),
|
|
2748
|
+
handle: z109.string(),
|
|
2749
|
+
color: z109.string(),
|
|
2750
|
+
avatar: nullishToOptional(z109.string()),
|
|
2734
2751
|
billingDetails: nullishToOptional(BillingDetails)
|
|
2735
2752
|
});
|
|
2736
|
-
var Workspace =
|
|
2737
|
-
id:
|
|
2753
|
+
var Workspace = z109.object({
|
|
2754
|
+
id: z109.string(),
|
|
2738
2755
|
profile: WorkspaceProfile,
|
|
2739
2756
|
subscription: Subscription,
|
|
2740
2757
|
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
2741
2758
|
sso: nullishToOptional(SsoProvider),
|
|
2742
2759
|
npmRegistrySettings: nullishToOptional(NpmRegistryConfig),
|
|
2743
|
-
designSystems:
|
|
2760
|
+
designSystems: z109.array(DesignSystem).nullish()
|
|
2744
2761
|
});
|
|
2745
|
-
var WorkspaceWithDesignSystems =
|
|
2762
|
+
var WorkspaceWithDesignSystems = z109.object({
|
|
2746
2763
|
workspace: Workspace,
|
|
2747
|
-
designSystems:
|
|
2764
|
+
designSystems: z109.array(DesignSystem)
|
|
2748
2765
|
});
|
|
2749
2766
|
|
|
2750
2767
|
// src/workspace/workspace-context.ts
|
|
2751
|
-
var WorkspaceContext =
|
|
2752
|
-
workspaceId:
|
|
2768
|
+
var WorkspaceContext = z110.object({
|
|
2769
|
+
workspaceId: z110.string(),
|
|
2753
2770
|
product: ProductCodeSchema,
|
|
2754
2771
|
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
2755
|
-
publicDesignSystem:
|
|
2772
|
+
publicDesignSystem: z110.boolean().optional()
|
|
2756
2773
|
});
|
|
2757
2774
|
|
|
2758
2775
|
// src/workspace/workspace-create.ts
|
|
2759
|
-
import { z as
|
|
2776
|
+
import { z as z111 } from "zod";
|
|
2760
2777
|
|
|
2761
2778
|
// src/utils/validation.ts
|
|
2762
2779
|
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
@@ -2766,18 +2783,18 @@ var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
|
2766
2783
|
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
2767
2784
|
var HANDLE_MIN_LENGTH = 2;
|
|
2768
2785
|
var HANDLE_MAX_LENGTH = 64;
|
|
2769
|
-
var CreateWorkspaceInput =
|
|
2770
|
-
name:
|
|
2786
|
+
var CreateWorkspaceInput = z111.object({
|
|
2787
|
+
name: z111.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
2771
2788
|
product: ProductCodeSchema,
|
|
2772
|
-
priceId:
|
|
2773
|
-
billingEmail:
|
|
2774
|
-
handle:
|
|
2789
|
+
priceId: z111.string(),
|
|
2790
|
+
billingEmail: z111.string().email().optional(),
|
|
2791
|
+
handle: z111.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => value?.length > 0).optional(),
|
|
2775
2792
|
invites: UserInvites.optional(),
|
|
2776
|
-
promoCode:
|
|
2793
|
+
promoCode: z111.string().optional(),
|
|
2777
2794
|
status: InternalStatusSchema.optional(),
|
|
2778
2795
|
planInterval: BillingIntervalSchema.optional(),
|
|
2779
|
-
seats:
|
|
2780
|
-
seatLimit:
|
|
2796
|
+
seats: z111.number().optional(),
|
|
2797
|
+
seatLimit: z111.number().optional(),
|
|
2781
2798
|
card: CardSchema.optional(),
|
|
2782
2799
|
sso: SsoProvider.optional(),
|
|
2783
2800
|
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
@@ -2785,173 +2802,210 @@ var CreateWorkspaceInput = z110.object({
|
|
|
2785
2802
|
});
|
|
2786
2803
|
|
|
2787
2804
|
// src/workspace/workspace-invitations.ts
|
|
2788
|
-
import { z as z111 } from "zod";
|
|
2789
|
-
var WorkspaceInvitation = z111.object({
|
|
2790
|
-
id: z111.string(),
|
|
2791
|
-
email: z111.string().email(),
|
|
2792
|
-
createdAt: z111.coerce.date(),
|
|
2793
|
-
resentAt: z111.coerce.date().nullish(),
|
|
2794
|
-
role: z111.nativeEnum(WorkspaceRole),
|
|
2795
|
-
workspaceId: z111.string(),
|
|
2796
|
-
invitedBy: z111.string()
|
|
2797
|
-
});
|
|
2798
|
-
|
|
2799
|
-
// src/workspace/workspace-membership.ts
|
|
2800
2805
|
import { z as z112 } from "zod";
|
|
2801
|
-
var
|
|
2806
|
+
var WorkspaceInvitation = z112.object({
|
|
2802
2807
|
id: z112.string(),
|
|
2803
|
-
|
|
2808
|
+
email: z112.string().email(),
|
|
2809
|
+
createdAt: z112.coerce.date(),
|
|
2810
|
+
resentAt: z112.coerce.date().nullish(),
|
|
2811
|
+
role: z112.nativeEnum(WorkspaceRole),
|
|
2804
2812
|
workspaceId: z112.string(),
|
|
2805
|
-
|
|
2813
|
+
invitedBy: z112.string()
|
|
2806
2814
|
});
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2815
|
+
|
|
2816
|
+
// src/workspace/workspace-membership.ts
|
|
2817
|
+
import { z as z113 } from "zod";
|
|
2818
|
+
var WorkspaceMembership = z113.object({
|
|
2819
|
+
id: z113.string(),
|
|
2820
|
+
userId: z113.string(),
|
|
2821
|
+
workspaceId: z113.string(),
|
|
2822
|
+
workspaceRole: z113.nativeEnum(WorkspaceRole)
|
|
2823
|
+
});
|
|
2824
|
+
var UpdateMembershipRolesInput = z113.object({
|
|
2825
|
+
members: z113.array(
|
|
2826
|
+
z113.object({
|
|
2827
|
+
userId: z113.string(),
|
|
2828
|
+
role: z113.nativeEnum(WorkspaceRole)
|
|
2812
2829
|
})
|
|
2813
2830
|
)
|
|
2814
2831
|
});
|
|
2815
2832
|
|
|
2816
2833
|
// src/dsm/design-system.ts
|
|
2817
|
-
var DesignSystemSwitcher =
|
|
2818
|
-
isEnabled:
|
|
2819
|
-
designSystemIds:
|
|
2834
|
+
var DesignSystemSwitcher = z114.object({
|
|
2835
|
+
isEnabled: z114.boolean(),
|
|
2836
|
+
designSystemIds: z114.array(z114.string())
|
|
2820
2837
|
});
|
|
2821
|
-
var DesignSystem =
|
|
2822
|
-
id:
|
|
2823
|
-
workspaceId:
|
|
2824
|
-
name:
|
|
2825
|
-
description:
|
|
2826
|
-
docExporterId: nullishToOptional(
|
|
2827
|
-
docSlug:
|
|
2828
|
-
docUserSlug: nullishToOptional(
|
|
2829
|
-
docSlugDeprecated:
|
|
2830
|
-
isPublic:
|
|
2831
|
-
isMultibrand:
|
|
2832
|
-
docViewUrl: nullishToOptional(
|
|
2833
|
-
basePrefixes:
|
|
2838
|
+
var DesignSystem = z114.object({
|
|
2839
|
+
id: z114.string(),
|
|
2840
|
+
workspaceId: z114.string(),
|
|
2841
|
+
name: z114.string(),
|
|
2842
|
+
description: z114.string(),
|
|
2843
|
+
docExporterId: nullishToOptional(z114.string()),
|
|
2844
|
+
docSlug: z114.string(),
|
|
2845
|
+
docUserSlug: nullishToOptional(z114.string()),
|
|
2846
|
+
docSlugDeprecated: z114.string(),
|
|
2847
|
+
isPublic: z114.boolean(),
|
|
2848
|
+
isMultibrand: z114.boolean(),
|
|
2849
|
+
docViewUrl: nullishToOptional(z114.string()),
|
|
2850
|
+
basePrefixes: z114.array(z114.string()),
|
|
2834
2851
|
designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
|
|
2835
|
-
createdAt:
|
|
2836
|
-
updatedAt:
|
|
2852
|
+
createdAt: z114.coerce.date(),
|
|
2853
|
+
updatedAt: z114.coerce.date()
|
|
2837
2854
|
});
|
|
2838
|
-
var DesignSystemWithWorkspace =
|
|
2855
|
+
var DesignSystemWithWorkspace = z114.object({
|
|
2839
2856
|
designSystem: DesignSystem,
|
|
2840
2857
|
workspace: Workspace
|
|
2841
2858
|
});
|
|
2842
2859
|
|
|
2843
2860
|
// src/dsm/desing-system-create.ts
|
|
2844
|
-
import { z as
|
|
2861
|
+
import { z as z115 } from "zod";
|
|
2845
2862
|
var DS_NAME_MIN_LENGTH = 2;
|
|
2846
2863
|
var DS_NAME_MAX_LENGTH = 64;
|
|
2847
|
-
var DS_DESC_MIN_LENGTH = 2;
|
|
2848
2864
|
var DS_DESC_MAX_LENGTH = 64;
|
|
2849
|
-
var DesignSystemCreateInputMetadata =
|
|
2850
|
-
name:
|
|
2851
|
-
description:
|
|
2865
|
+
var DesignSystemCreateInputMetadata = z115.object({
|
|
2866
|
+
name: z115.string().min(DS_NAME_MIN_LENGTH).max(DS_NAME_MAX_LENGTH).trim(),
|
|
2867
|
+
description: z115.string().max(DS_DESC_MAX_LENGTH).trim()
|
|
2852
2868
|
});
|
|
2853
|
-
var DesignSystemCreateInput =
|
|
2869
|
+
var DesignSystemCreateInput = z115.object({
|
|
2854
2870
|
meta: DesignSystemCreateInputMetadata,
|
|
2855
|
-
workspaceId:
|
|
2856
|
-
isPublic:
|
|
2857
|
-
basePrefixes:
|
|
2858
|
-
docUserSlug:
|
|
2859
|
-
source:
|
|
2871
|
+
workspaceId: z115.string(),
|
|
2872
|
+
isPublic: z115.boolean().optional(),
|
|
2873
|
+
basePrefixes: z115.array(z115.string()).optional(),
|
|
2874
|
+
docUserSlug: z115.string().nullish().optional(),
|
|
2875
|
+
source: z115.array(z115.string()).optional()
|
|
2860
2876
|
});
|
|
2861
2877
|
|
|
2862
2878
|
// src/dsm/desing-system-update.ts
|
|
2863
|
-
import { z as
|
|
2879
|
+
import { z as z116 } from "zod";
|
|
2864
2880
|
var DS_NAME_MIN_LENGTH2 = 2;
|
|
2865
2881
|
var DS_NAME_MAX_LENGTH2 = 64;
|
|
2866
|
-
var DS_DESC_MIN_LENGTH2 = 2;
|
|
2867
2882
|
var DS_DESC_MAX_LENGTH2 = 64;
|
|
2868
|
-
var DesignSystemUpdateInputMetadata =
|
|
2869
|
-
name:
|
|
2870
|
-
description:
|
|
2883
|
+
var DesignSystemUpdateInputMetadata = z116.object({
|
|
2884
|
+
name: z116.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2885
|
+
description: z116.string().max(DS_DESC_MAX_LENGTH2).trim().optional()
|
|
2871
2886
|
});
|
|
2872
|
-
var DesignSystemUpdateInput =
|
|
2887
|
+
var DesignSystemUpdateInput = z116.object({
|
|
2873
2888
|
meta: DesignSystemUpdateInputMetadata.optional(),
|
|
2874
|
-
workspaceId:
|
|
2875
|
-
isPublic:
|
|
2876
|
-
basePrefixes:
|
|
2877
|
-
docUserSlug:
|
|
2878
|
-
source:
|
|
2879
|
-
name:
|
|
2880
|
-
description:
|
|
2881
|
-
docExporterId:
|
|
2889
|
+
workspaceId: z116.string().optional(),
|
|
2890
|
+
isPublic: z116.boolean().optional(),
|
|
2891
|
+
basePrefixes: z116.array(z116.string()).optional(),
|
|
2892
|
+
docUserSlug: z116.string().nullish().optional(),
|
|
2893
|
+
source: z116.array(z116.string()).optional(),
|
|
2894
|
+
name: z116.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2895
|
+
description: z116.string().max(DS_DESC_MAX_LENGTH2).trim().optional(),
|
|
2896
|
+
docExporterId: z116.string().optional()
|
|
2897
|
+
});
|
|
2898
|
+
|
|
2899
|
+
// src/dsm/exporter-property-values-collection.ts
|
|
2900
|
+
import { z as z117 } from "zod";
|
|
2901
|
+
var ExporterPropertyImageValue = z117.object({
|
|
2902
|
+
asset: PageBlockAsset.optional(),
|
|
2903
|
+
assetId: z117.string().optional(),
|
|
2904
|
+
assetUrl: z117.string().optional()
|
|
2905
|
+
});
|
|
2906
|
+
var ExporterPropertyValue = z117.object({
|
|
2907
|
+
key: z117.string(),
|
|
2908
|
+
value: z117.union([
|
|
2909
|
+
z117.number(),
|
|
2910
|
+
z117.string(),
|
|
2911
|
+
z117.boolean(),
|
|
2912
|
+
ExporterPropertyImageValue,
|
|
2913
|
+
ColorTokenData,
|
|
2914
|
+
TypographyTokenData
|
|
2915
|
+
])
|
|
2916
|
+
});
|
|
2917
|
+
var ExporterPropertyValuesCollection = z117.object({
|
|
2918
|
+
id: z117.string(),
|
|
2919
|
+
designSystemId: z117.string(),
|
|
2920
|
+
exporterId: z117.string(),
|
|
2921
|
+
values: z117.array(ExporterPropertyValue)
|
|
2882
2922
|
});
|
|
2883
2923
|
|
|
2884
2924
|
// src/dsm/published-doc-page.ts
|
|
2925
|
+
import { z as z118 } from "zod";
|
|
2885
2926
|
var SHORT_PERSISTENT_ID_LENGTH = 8;
|
|
2886
2927
|
function tryParseShortPersistentId(url = "/") {
|
|
2887
2928
|
const lastUrlPart = url.split("/").pop() || "";
|
|
2888
2929
|
const shortPersistentId = lastUrlPart.split("-").pop()?.replaceAll(".html", "") || null;
|
|
2889
2930
|
return shortPersistentId?.length === SHORT_PERSISTENT_ID_LENGTH ? shortPersistentId : null;
|
|
2890
2931
|
}
|
|
2932
|
+
var PublishedDocPage = z118.object({
|
|
2933
|
+
id: z118.string(),
|
|
2934
|
+
publishedDocId: z118.string(),
|
|
2935
|
+
pageShortPersistentId: z118.string(),
|
|
2936
|
+
pathV1: z118.string(),
|
|
2937
|
+
pathV2: z118.string(),
|
|
2938
|
+
storagePath: z118.string(),
|
|
2939
|
+
locale: z118.string().optional(),
|
|
2940
|
+
isPrivate: z118.boolean(),
|
|
2941
|
+
isHidden: z118.boolean(),
|
|
2942
|
+
createdAt: z118.coerce.date(),
|
|
2943
|
+
updatedAt: z118.coerce.date()
|
|
2944
|
+
});
|
|
2891
2945
|
|
|
2892
2946
|
// src/dsm/published-doc.ts
|
|
2893
|
-
import { z as
|
|
2947
|
+
import { z as z119 } from "zod";
|
|
2894
2948
|
var publishedDocEnvironments = ["Live", "Preview"];
|
|
2895
|
-
var PublishedDocEnvironment =
|
|
2896
|
-
var PublishedDocsChecksums =
|
|
2897
|
-
var PublishedDocRoutingVersion =
|
|
2898
|
-
var PublishedDoc =
|
|
2899
|
-
id:
|
|
2900
|
-
designSystemVersionId:
|
|
2901
|
-
createdAt:
|
|
2902
|
-
updatedAt:
|
|
2903
|
-
lastPublishedAt:
|
|
2904
|
-
isDefault:
|
|
2905
|
-
isPublic:
|
|
2949
|
+
var PublishedDocEnvironment = z119.enum(publishedDocEnvironments);
|
|
2950
|
+
var PublishedDocsChecksums = z119.record(z119.string());
|
|
2951
|
+
var PublishedDocRoutingVersion = z119.enum(["1", "2"]);
|
|
2952
|
+
var PublishedDoc = z119.object({
|
|
2953
|
+
id: z119.string(),
|
|
2954
|
+
designSystemVersionId: z119.string(),
|
|
2955
|
+
createdAt: z119.coerce.date(),
|
|
2956
|
+
updatedAt: z119.coerce.date(),
|
|
2957
|
+
lastPublishedAt: z119.coerce.date(),
|
|
2958
|
+
isDefault: z119.boolean(),
|
|
2959
|
+
isPublic: z119.boolean(),
|
|
2906
2960
|
environment: PublishedDocEnvironment,
|
|
2907
2961
|
checksums: PublishedDocsChecksums,
|
|
2908
|
-
storagePath:
|
|
2909
|
-
wasMigrated:
|
|
2962
|
+
storagePath: z119.string(),
|
|
2963
|
+
wasMigrated: z119.boolean(),
|
|
2910
2964
|
routingVersion: PublishedDocRoutingVersion,
|
|
2911
|
-
usesLocalizations:
|
|
2912
|
-
wasPublishedWithLocalizations:
|
|
2965
|
+
usesLocalizations: z119.boolean(),
|
|
2966
|
+
wasPublishedWithLocalizations: z119.boolean()
|
|
2913
2967
|
});
|
|
2914
2968
|
|
|
2915
2969
|
// src/dsm/version.ts
|
|
2916
|
-
import { z as
|
|
2917
|
-
var DesignSystemVersion =
|
|
2918
|
-
id:
|
|
2919
|
-
version:
|
|
2920
|
-
createdAt:
|
|
2921
|
-
designSystemId:
|
|
2922
|
-
name:
|
|
2923
|
-
comment:
|
|
2924
|
-
isReadonly:
|
|
2925
|
-
changeLog:
|
|
2926
|
-
parentId:
|
|
2970
|
+
import { z as z120 } from "zod";
|
|
2971
|
+
var DesignSystemVersion = z120.object({
|
|
2972
|
+
id: z120.string(),
|
|
2973
|
+
version: z120.string(),
|
|
2974
|
+
createdAt: z120.date(),
|
|
2975
|
+
designSystemId: z120.string(),
|
|
2976
|
+
name: z120.string(),
|
|
2977
|
+
comment: z120.string(),
|
|
2978
|
+
isReadonly: z120.boolean(),
|
|
2979
|
+
changeLog: z120.string(),
|
|
2980
|
+
parentId: z120.string().optional()
|
|
2927
2981
|
});
|
|
2928
2982
|
|
|
2929
2983
|
// src/codegen/export-jobs.ts
|
|
2930
|
-
import { z as
|
|
2931
|
-
var ExporterJobDestination =
|
|
2932
|
-
var ExporterJobStatus =
|
|
2933
|
-
var ExporterJobLogEntryType =
|
|
2934
|
-
var ExporterJobLogEntry =
|
|
2935
|
-
id:
|
|
2936
|
-
time:
|
|
2984
|
+
import { z as z121 } from "zod";
|
|
2985
|
+
var ExporterJobDestination = z121.enum(["s3", "webhookUrl", "github", "documentation", "azure", "gitlab"]);
|
|
2986
|
+
var ExporterJobStatus = z121.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
2987
|
+
var ExporterJobLogEntryType = z121.enum(["success", "info", "warning", "error", "user"]);
|
|
2988
|
+
var ExporterJobLogEntry = z121.object({
|
|
2989
|
+
id: z121.string().optional(),
|
|
2990
|
+
time: z121.coerce.date(),
|
|
2937
2991
|
type: ExporterJobLogEntryType,
|
|
2938
|
-
message:
|
|
2992
|
+
message: z121.string()
|
|
2939
2993
|
});
|
|
2940
|
-
var ExporterJobResultPullRequestDestination =
|
|
2941
|
-
pullRequestUrl:
|
|
2994
|
+
var ExporterJobResultPullRequestDestination = z121.object({
|
|
2995
|
+
pullRequestUrl: z121.string()
|
|
2942
2996
|
});
|
|
2943
|
-
var ExporterJobResultS3Destination =
|
|
2944
|
-
bucket:
|
|
2945
|
-
urlPrefix:
|
|
2946
|
-
path:
|
|
2947
|
-
files:
|
|
2997
|
+
var ExporterJobResultS3Destination = z121.object({
|
|
2998
|
+
bucket: z121.string(),
|
|
2999
|
+
urlPrefix: z121.string().optional(),
|
|
3000
|
+
path: z121.string(),
|
|
3001
|
+
files: z121.array(z121.string())
|
|
2948
3002
|
});
|
|
2949
|
-
var ExporterJobResultDocsDestination =
|
|
2950
|
-
url:
|
|
3003
|
+
var ExporterJobResultDocsDestination = z121.object({
|
|
3004
|
+
url: z121.string()
|
|
2951
3005
|
});
|
|
2952
|
-
var ExporterJobResult =
|
|
2953
|
-
error:
|
|
2954
|
-
logs:
|
|
3006
|
+
var ExporterJobResult = z121.object({
|
|
3007
|
+
error: z121.string().optional(),
|
|
3008
|
+
logs: z121.array(ExporterJobLogEntry).optional(),
|
|
2955
3009
|
s3: ExporterJobResultS3Destination.optional(),
|
|
2956
3010
|
github: ExporterJobResultPullRequestDestination.optional(),
|
|
2957
3011
|
azure: ExporterJobResultPullRequestDestination.optional(),
|
|
@@ -2959,68 +3013,68 @@ var ExporterJobResult = z118.object({
|
|
|
2959
3013
|
bitbucket: ExporterJobResultPullRequestDestination.optional(),
|
|
2960
3014
|
sndocs: ExporterJobResultDocsDestination.optional()
|
|
2961
3015
|
});
|
|
2962
|
-
var ExporterDestinationSnDocs =
|
|
3016
|
+
var ExporterDestinationSnDocs = z121.object({
|
|
2963
3017
|
environment: PublishedDocEnvironment
|
|
2964
3018
|
});
|
|
2965
|
-
var ExporterDestinationS3 =
|
|
2966
|
-
var ExporterDestinationGithub =
|
|
2967
|
-
connectionId:
|
|
2968
|
-
url:
|
|
2969
|
-
branch:
|
|
2970
|
-
relativePath:
|
|
3019
|
+
var ExporterDestinationS3 = z121.object({});
|
|
3020
|
+
var ExporterDestinationGithub = z121.object({
|
|
3021
|
+
connectionId: z121.string(),
|
|
3022
|
+
url: z121.string(),
|
|
3023
|
+
branch: z121.string(),
|
|
3024
|
+
relativePath: z121.string(),
|
|
2971
3025
|
// +
|
|
2972
|
-
userId:
|
|
2973
|
-
});
|
|
2974
|
-
var ExporterDestinationAzure =
|
|
2975
|
-
connectionId:
|
|
2976
|
-
organizationId:
|
|
2977
|
-
projectId:
|
|
2978
|
-
repositoryId:
|
|
2979
|
-
branch:
|
|
2980
|
-
relativePath:
|
|
3026
|
+
userId: z121.coerce.string()
|
|
3027
|
+
});
|
|
3028
|
+
var ExporterDestinationAzure = z121.object({
|
|
3029
|
+
connectionId: z121.string(),
|
|
3030
|
+
organizationId: z121.string(),
|
|
3031
|
+
projectId: z121.string(),
|
|
3032
|
+
repositoryId: z121.string(),
|
|
3033
|
+
branch: z121.string(),
|
|
3034
|
+
relativePath: z121.string(),
|
|
2981
3035
|
// +
|
|
2982
|
-
userId:
|
|
2983
|
-
url:
|
|
2984
|
-
});
|
|
2985
|
-
var ExporterDestinationGitlab =
|
|
2986
|
-
connectionId:
|
|
2987
|
-
projectId:
|
|
2988
|
-
branch:
|
|
2989
|
-
relativePath:
|
|
3036
|
+
userId: z121.coerce.string(),
|
|
3037
|
+
url: z121.string()
|
|
3038
|
+
});
|
|
3039
|
+
var ExporterDestinationGitlab = z121.object({
|
|
3040
|
+
connectionId: z121.string(),
|
|
3041
|
+
projectId: z121.string(),
|
|
3042
|
+
branch: z121.string(),
|
|
3043
|
+
relativePath: z121.string(),
|
|
2990
3044
|
// +
|
|
2991
|
-
userId:
|
|
2992
|
-
url:
|
|
3045
|
+
userId: z121.coerce.string(),
|
|
3046
|
+
url: z121.string()
|
|
2993
3047
|
});
|
|
2994
3048
|
var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
|
|
2995
3049
|
var BITBUCKET_MAX_LENGTH = 64;
|
|
2996
|
-
var ExporterDestinationBitbucket =
|
|
2997
|
-
connectionId:
|
|
2998
|
-
workspaceSlug:
|
|
2999
|
-
projectKey:
|
|
3000
|
-
repoSlug:
|
|
3001
|
-
branch:
|
|
3002
|
-
relativePath:
|
|
3050
|
+
var ExporterDestinationBitbucket = z121.object({
|
|
3051
|
+
connectionId: z121.string(),
|
|
3052
|
+
workspaceSlug: z121.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3053
|
+
projectKey: z121.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3054
|
+
repoSlug: z121.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3055
|
+
branch: z121.string(),
|
|
3056
|
+
relativePath: z121.string(),
|
|
3003
3057
|
// +
|
|
3004
|
-
userId:
|
|
3005
|
-
url:
|
|
3006
|
-
});
|
|
3007
|
-
var ExporterJob =
|
|
3008
|
-
id:
|
|
3009
|
-
createdAt:
|
|
3010
|
-
finishedAt:
|
|
3011
|
-
designSystemId:
|
|
3012
|
-
designSystemVersionId:
|
|
3013
|
-
workspaceId:
|
|
3014
|
-
scheduleId:
|
|
3015
|
-
exporterId:
|
|
3016
|
-
brandId:
|
|
3017
|
-
themeId:
|
|
3018
|
-
estimatedExecutionTime:
|
|
3058
|
+
userId: z121.coerce.string(),
|
|
3059
|
+
url: z121.string()
|
|
3060
|
+
});
|
|
3061
|
+
var ExporterJob = z121.object({
|
|
3062
|
+
id: z121.coerce.string(),
|
|
3063
|
+
createdAt: z121.coerce.date(),
|
|
3064
|
+
finishedAt: z121.coerce.date().optional(),
|
|
3065
|
+
designSystemId: z121.coerce.string(),
|
|
3066
|
+
designSystemVersionId: z121.coerce.string(),
|
|
3067
|
+
workspaceId: z121.coerce.string(),
|
|
3068
|
+
scheduleId: z121.coerce.string().nullish(),
|
|
3069
|
+
exporterId: z121.coerce.string(),
|
|
3070
|
+
brandId: z121.coerce.string().optional(),
|
|
3071
|
+
themeId: z121.coerce.string().optional(),
|
|
3072
|
+
estimatedExecutionTime: z121.number().optional(),
|
|
3019
3073
|
status: ExporterJobStatus,
|
|
3020
3074
|
result: ExporterJobResult.optional(),
|
|
3021
|
-
createdByUserId:
|
|
3075
|
+
createdByUserId: z121.string().optional(),
|
|
3022
3076
|
// CodegenDestinationsModel
|
|
3023
|
-
webhookUrl:
|
|
3077
|
+
webhookUrl: z121.string().optional(),
|
|
3024
3078
|
destinationSnDocs: ExporterDestinationSnDocs.optional(),
|
|
3025
3079
|
destinationS3: ExporterDestinationS3.optional(),
|
|
3026
3080
|
destinationGithub: ExporterDestinationGithub.optional(),
|
|
@@ -3039,28 +3093,28 @@ var ExporterJobFindByFilter = ExporterJob.pick({
|
|
|
3039
3093
|
themeId: true,
|
|
3040
3094
|
brandId: true
|
|
3041
3095
|
}).extend({
|
|
3042
|
-
destinations:
|
|
3096
|
+
destinations: z121.array(ExporterJobDestination),
|
|
3043
3097
|
docsEnvironment: PublishedDocEnvironment
|
|
3044
3098
|
}).partial();
|
|
3045
3099
|
|
|
3046
3100
|
// src/codegen/exporter-workspace-membership-role.ts
|
|
3047
|
-
import { z as
|
|
3048
|
-
var ExporterWorkspaceMembershipRole =
|
|
3101
|
+
import { z as z122 } from "zod";
|
|
3102
|
+
var ExporterWorkspaceMembershipRole = z122.enum(["Owner", "OwnerArchived", "User"]);
|
|
3049
3103
|
|
|
3050
3104
|
// src/codegen/exporter-workspace-membership.ts
|
|
3051
|
-
import { z as
|
|
3052
|
-
var ExporterWorkspaceMembership =
|
|
3053
|
-
id:
|
|
3054
|
-
workspaceId:
|
|
3055
|
-
exporterId:
|
|
3105
|
+
import { z as z123 } from "zod";
|
|
3106
|
+
var ExporterWorkspaceMembership = z123.object({
|
|
3107
|
+
id: z123.string(),
|
|
3108
|
+
workspaceId: z123.string(),
|
|
3109
|
+
exporterId: z123.string(),
|
|
3056
3110
|
role: ExporterWorkspaceMembershipRole
|
|
3057
3111
|
});
|
|
3058
3112
|
|
|
3059
3113
|
// src/codegen/exporter.ts
|
|
3060
|
-
import { z as
|
|
3114
|
+
import { z as z126 } from "zod";
|
|
3061
3115
|
|
|
3062
3116
|
// src/codegen/git-providers.ts
|
|
3063
|
-
import { z as
|
|
3117
|
+
import { z as z124 } from "zod";
|
|
3064
3118
|
var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
3065
3119
|
GitProviderNames2["Azure"] = "azure";
|
|
3066
3120
|
GitProviderNames2["Github"] = "github";
|
|
@@ -3068,11 +3122,11 @@ var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
|
3068
3122
|
GitProviderNames2["Bitbucket"] = "bitbucket";
|
|
3069
3123
|
return GitProviderNames2;
|
|
3070
3124
|
})(GitProviderNames || {});
|
|
3071
|
-
var GitProvider =
|
|
3125
|
+
var GitProvider = z124.nativeEnum(GitProviderNames);
|
|
3072
3126
|
|
|
3073
3127
|
// src/codegen/pulsar.ts
|
|
3074
|
-
import { z as
|
|
3075
|
-
var PulsarPropertyType =
|
|
3128
|
+
import { z as z125 } from "zod";
|
|
3129
|
+
var PulsarPropertyType = z125.enum([
|
|
3076
3130
|
"string",
|
|
3077
3131
|
"number",
|
|
3078
3132
|
"boolean",
|
|
@@ -3085,108 +3139,108 @@ var PulsarPropertyType = z122.enum([
|
|
|
3085
3139
|
"tokenProperties",
|
|
3086
3140
|
"tokenType"
|
|
3087
3141
|
]);
|
|
3088
|
-
var PulsarBaseProperty =
|
|
3089
|
-
label:
|
|
3090
|
-
key:
|
|
3091
|
-
description:
|
|
3142
|
+
var PulsarBaseProperty = z125.object({
|
|
3143
|
+
label: z125.string(),
|
|
3144
|
+
key: z125.string(),
|
|
3145
|
+
description: z125.string().nullish(),
|
|
3092
3146
|
type: PulsarPropertyType,
|
|
3093
|
-
values:
|
|
3094
|
-
default:
|
|
3147
|
+
values: z125.array(z125.string()).nullish(),
|
|
3148
|
+
default: z125.union([z125.string(), z125.boolean(), z125.number()]).nullish(),
|
|
3095
3149
|
// PulsarPropertyValueType //is optional?
|
|
3096
|
-
inputType:
|
|
3150
|
+
inputType: z125.enum(["code", "plain"]).optional(),
|
|
3097
3151
|
//is optional?
|
|
3098
|
-
isMultiline:
|
|
3152
|
+
isMultiline: z125.boolean().nullish()
|
|
3099
3153
|
});
|
|
3100
3154
|
var PulsarContributionConfigurationProperty = PulsarBaseProperty.extend({
|
|
3101
|
-
category:
|
|
3155
|
+
category: z125.string()
|
|
3102
3156
|
});
|
|
3103
|
-
var PulsarContributionVariant =
|
|
3104
|
-
key:
|
|
3105
|
-
name:
|
|
3106
|
-
isDefault: nullishToOptional(
|
|
3107
|
-
description: nullishToOptional(
|
|
3108
|
-
thumbnailURL: nullishToOptional(
|
|
3157
|
+
var PulsarContributionVariant = z125.object({
|
|
3158
|
+
key: z125.string(),
|
|
3159
|
+
name: z125.string(),
|
|
3160
|
+
isDefault: nullishToOptional(z125.boolean()),
|
|
3161
|
+
description: nullishToOptional(z125.string()),
|
|
3162
|
+
thumbnailURL: nullishToOptional(z125.string())
|
|
3109
3163
|
});
|
|
3110
|
-
var PulsarCustomBlock =
|
|
3111
|
-
title: nullishToOptional(
|
|
3112
|
-
key:
|
|
3113
|
-
category: nullishToOptional(
|
|
3114
|
-
description: nullishToOptional(
|
|
3115
|
-
iconURL: nullishToOptional(
|
|
3116
|
-
mode: nullishToOptional(
|
|
3117
|
-
properties: nullishToOptional(
|
|
3164
|
+
var PulsarCustomBlock = z125.object({
|
|
3165
|
+
title: nullishToOptional(z125.string()),
|
|
3166
|
+
key: z125.string(),
|
|
3167
|
+
category: nullishToOptional(z125.string()),
|
|
3168
|
+
description: nullishToOptional(z125.string()),
|
|
3169
|
+
iconURL: nullishToOptional(z125.string()),
|
|
3170
|
+
mode: nullishToOptional(z125.enum(["array", "block"])),
|
|
3171
|
+
properties: nullishToOptional(z125.array(PulsarBaseProperty)).transform((v) => v ?? [])
|
|
3118
3172
|
});
|
|
3119
3173
|
|
|
3120
3174
|
// src/codegen/exporter.ts
|
|
3121
|
-
var ExporterType =
|
|
3122
|
-
var ExporterSource =
|
|
3123
|
-
var ExporterTag =
|
|
3124
|
-
var ExporterDetails =
|
|
3125
|
-
description:
|
|
3126
|
-
version:
|
|
3127
|
-
routingVersion: nullishToOptional(
|
|
3128
|
-
author: nullishToOptional(
|
|
3129
|
-
organization: nullishToOptional(
|
|
3130
|
-
homepage: nullishToOptional(
|
|
3131
|
-
readme: nullishToOptional(
|
|
3132
|
-
tags: nullishToOptional(
|
|
3133
|
-
packageId: nullishToOptional(
|
|
3134
|
-
iconURL: nullishToOptional(
|
|
3135
|
-
configurationProperties: nullishToOptional(
|
|
3136
|
-
customBlocks: nullishToOptional(
|
|
3137
|
-
blockVariants: nullishToOptional(
|
|
3138
|
-
usesBrands: nullishToOptional(
|
|
3139
|
-
usesThemes: nullishToOptional(
|
|
3175
|
+
var ExporterType = z126.enum(["code", "documentation"]);
|
|
3176
|
+
var ExporterSource = z126.enum(["git", "upload"]);
|
|
3177
|
+
var ExporterTag = z126.string().regex(/^[0-9a-zA-Z]+(\s[0-9a-zA-Z]+)*$/);
|
|
3178
|
+
var ExporterDetails = z126.object({
|
|
3179
|
+
description: z126.string(),
|
|
3180
|
+
version: z126.string(),
|
|
3181
|
+
routingVersion: nullishToOptional(z126.string()),
|
|
3182
|
+
author: nullishToOptional(z126.string()),
|
|
3183
|
+
organization: nullishToOptional(z126.string()),
|
|
3184
|
+
homepage: nullishToOptional(z126.string()),
|
|
3185
|
+
readme: nullishToOptional(z126.string()),
|
|
3186
|
+
tags: nullishToOptional(z126.array(ExporterTag)).default([]),
|
|
3187
|
+
packageId: nullishToOptional(z126.string().max(255)),
|
|
3188
|
+
iconURL: nullishToOptional(z126.string()),
|
|
3189
|
+
configurationProperties: nullishToOptional(z126.array(PulsarContributionConfigurationProperty)).default([]),
|
|
3190
|
+
customBlocks: nullishToOptional(z126.array(PulsarCustomBlock)).default([]),
|
|
3191
|
+
blockVariants: nullishToOptional(z126.record(z126.string(), z126.array(PulsarContributionVariant))).default({}),
|
|
3192
|
+
usesBrands: nullishToOptional(z126.boolean()).default(false),
|
|
3193
|
+
usesThemes: nullishToOptional(z126.boolean()).default(false),
|
|
3140
3194
|
source: ExporterSource,
|
|
3141
3195
|
gitProvider: nullishToOptional(GitProvider),
|
|
3142
|
-
gitUrl: nullishToOptional(
|
|
3143
|
-
gitBranch: nullishToOptional(
|
|
3144
|
-
gitDirectory: nullishToOptional(
|
|
3196
|
+
gitUrl: nullishToOptional(z126.string()),
|
|
3197
|
+
gitBranch: nullishToOptional(z126.string()),
|
|
3198
|
+
gitDirectory: nullishToOptional(z126.string())
|
|
3145
3199
|
});
|
|
3146
|
-
var Exporter =
|
|
3147
|
-
id:
|
|
3148
|
-
createdAt:
|
|
3149
|
-
name:
|
|
3150
|
-
isPrivate:
|
|
3200
|
+
var Exporter = z126.object({
|
|
3201
|
+
id: z126.string(),
|
|
3202
|
+
createdAt: z126.coerce.date(),
|
|
3203
|
+
name: z126.string(),
|
|
3204
|
+
isPrivate: z126.boolean(),
|
|
3151
3205
|
details: ExporterDetails,
|
|
3152
3206
|
exporterType: nullishToOptional(ExporterType).default("code"),
|
|
3153
|
-
storagePath: nullishToOptional(
|
|
3207
|
+
storagePath: nullishToOptional(z126.string()).default("")
|
|
3154
3208
|
});
|
|
3155
3209
|
|
|
3156
3210
|
// src/custom-domains/custom-domains.ts
|
|
3157
|
-
import { z as
|
|
3158
|
-
var CustomDomain =
|
|
3159
|
-
id:
|
|
3160
|
-
designSystemId:
|
|
3161
|
-
state:
|
|
3162
|
-
supernovaDomain:
|
|
3163
|
-
customerDomain:
|
|
3164
|
-
error:
|
|
3165
|
-
errorCode:
|
|
3211
|
+
import { z as z127 } from "zod";
|
|
3212
|
+
var CustomDomain = z127.object({
|
|
3213
|
+
id: z127.string(),
|
|
3214
|
+
designSystemId: z127.string(),
|
|
3215
|
+
state: z127.string(),
|
|
3216
|
+
supernovaDomain: z127.string(),
|
|
3217
|
+
customerDomain: z127.string().nullish(),
|
|
3218
|
+
error: z127.string().nullish(),
|
|
3219
|
+
errorCode: z127.string().nullish()
|
|
3166
3220
|
});
|
|
3167
3221
|
|
|
3168
3222
|
// src/docs-server/session.ts
|
|
3169
|
-
import { z as
|
|
3223
|
+
import { z as z132 } from "zod";
|
|
3170
3224
|
|
|
3171
3225
|
// src/users/linked-integrations.ts
|
|
3172
|
-
import { z as
|
|
3173
|
-
var IntegrationAuthType =
|
|
3174
|
-
var ExternalServiceType =
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3226
|
+
import { z as z128 } from "zod";
|
|
3227
|
+
var IntegrationAuthType = z128.union([z128.literal("OAuth2"), z128.literal("PAT")]);
|
|
3228
|
+
var ExternalServiceType = z128.union([
|
|
3229
|
+
z128.literal("figma"),
|
|
3230
|
+
z128.literal("github"),
|
|
3231
|
+
z128.literal("azure"),
|
|
3232
|
+
z128.literal("gitlab"),
|
|
3233
|
+
z128.literal("bitbucket")
|
|
3180
3234
|
]);
|
|
3181
|
-
var IntegrationUserInfo =
|
|
3182
|
-
id:
|
|
3183
|
-
handle:
|
|
3184
|
-
avatarUrl:
|
|
3185
|
-
email:
|
|
3235
|
+
var IntegrationUserInfo = z128.object({
|
|
3236
|
+
id: z128.string(),
|
|
3237
|
+
handle: z128.string().optional(),
|
|
3238
|
+
avatarUrl: z128.string().optional(),
|
|
3239
|
+
email: z128.string().optional(),
|
|
3186
3240
|
authType: IntegrationAuthType.optional(),
|
|
3187
|
-
customUrl:
|
|
3241
|
+
customUrl: z128.string().optional()
|
|
3188
3242
|
});
|
|
3189
|
-
var UserLinkedIntegrations =
|
|
3243
|
+
var UserLinkedIntegrations = z128.object({
|
|
3190
3244
|
figma: IntegrationUserInfo.optional(),
|
|
3191
3245
|
github: IntegrationUserInfo.array().optional(),
|
|
3192
3246
|
azure: IntegrationUserInfo.array().optional(),
|
|
@@ -3195,87 +3249,87 @@ var UserLinkedIntegrations = z125.object({
|
|
|
3195
3249
|
});
|
|
3196
3250
|
|
|
3197
3251
|
// src/users/user-identity.ts
|
|
3198
|
-
import { z as
|
|
3199
|
-
var UserIdentity =
|
|
3200
|
-
id:
|
|
3201
|
-
userId:
|
|
3252
|
+
import { z as z129 } from "zod";
|
|
3253
|
+
var UserIdentity = z129.object({
|
|
3254
|
+
id: z129.string(),
|
|
3255
|
+
userId: z129.string()
|
|
3202
3256
|
});
|
|
3203
3257
|
|
|
3204
3258
|
// src/users/user-profile.ts
|
|
3205
|
-
import { z as
|
|
3206
|
-
var UserOnboardingDepartment =
|
|
3207
|
-
var UserOnboardingJobLevel =
|
|
3208
|
-
var UserOnboarding =
|
|
3209
|
-
companyName:
|
|
3210
|
-
numberOfPeopleInOrg:
|
|
3211
|
-
numberOfPeopleInDesignTeam:
|
|
3259
|
+
import { z as z130 } from "zod";
|
|
3260
|
+
var UserOnboardingDepartment = z130.enum(["Design", "Engineering", "Brand", "Other"]);
|
|
3261
|
+
var UserOnboardingJobLevel = z130.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
3262
|
+
var UserOnboarding = z130.object({
|
|
3263
|
+
companyName: z130.string().optional(),
|
|
3264
|
+
numberOfPeopleInOrg: z130.string().optional(),
|
|
3265
|
+
numberOfPeopleInDesignTeam: z130.string().optional(),
|
|
3212
3266
|
department: UserOnboardingDepartment.optional(),
|
|
3213
|
-
jobTitle:
|
|
3214
|
-
phase:
|
|
3267
|
+
jobTitle: z130.string().optional(),
|
|
3268
|
+
phase: z130.string().optional(),
|
|
3215
3269
|
jobLevel: UserOnboardingJobLevel.optional()
|
|
3216
3270
|
});
|
|
3217
|
-
var UserProfile =
|
|
3218
|
-
name:
|
|
3219
|
-
avatar:
|
|
3220
|
-
nickname:
|
|
3271
|
+
var UserProfile = z130.object({
|
|
3272
|
+
name: z130.string(),
|
|
3273
|
+
avatar: z130.string().optional(),
|
|
3274
|
+
nickname: z130.string().optional(),
|
|
3221
3275
|
onboarding: UserOnboarding.optional()
|
|
3222
3276
|
});
|
|
3223
3277
|
|
|
3224
3278
|
// src/users/user.ts
|
|
3225
|
-
import { z as
|
|
3226
|
-
var User =
|
|
3227
|
-
id:
|
|
3228
|
-
email:
|
|
3229
|
-
emailVerified:
|
|
3230
|
-
createdAt:
|
|
3231
|
-
trialExpiresAt:
|
|
3279
|
+
import { z as z131 } from "zod";
|
|
3280
|
+
var User = z131.object({
|
|
3281
|
+
id: z131.string(),
|
|
3282
|
+
email: z131.string(),
|
|
3283
|
+
emailVerified: z131.boolean(),
|
|
3284
|
+
createdAt: z131.coerce.date(),
|
|
3285
|
+
trialExpiresAt: z131.coerce.date().optional(),
|
|
3232
3286
|
profile: UserProfile,
|
|
3233
3287
|
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
3234
|
-
loggedOutAt:
|
|
3235
|
-
isProtected:
|
|
3288
|
+
loggedOutAt: z131.coerce.date().optional(),
|
|
3289
|
+
isProtected: z131.boolean()
|
|
3236
3290
|
});
|
|
3237
3291
|
|
|
3238
3292
|
// src/docs-server/session.ts
|
|
3239
|
-
var NpmProxyToken =
|
|
3240
|
-
access:
|
|
3241
|
-
expiresAt:
|
|
3293
|
+
var NpmProxyToken = z132.object({
|
|
3294
|
+
access: z132.string(),
|
|
3295
|
+
expiresAt: z132.number()
|
|
3242
3296
|
});
|
|
3243
|
-
var SessionData =
|
|
3244
|
-
returnToUrl:
|
|
3297
|
+
var SessionData = z132.object({
|
|
3298
|
+
returnToUrl: z132.string().optional(),
|
|
3245
3299
|
npmProxyToken: NpmProxyToken.optional()
|
|
3246
3300
|
});
|
|
3247
|
-
var Session =
|
|
3248
|
-
id:
|
|
3249
|
-
expiresAt:
|
|
3250
|
-
userId:
|
|
3301
|
+
var Session = z132.object({
|
|
3302
|
+
id: z132.string(),
|
|
3303
|
+
expiresAt: z132.coerce.date(),
|
|
3304
|
+
userId: z132.string().nullable(),
|
|
3251
3305
|
data: SessionData
|
|
3252
3306
|
});
|
|
3253
|
-
var AuthTokens =
|
|
3254
|
-
access:
|
|
3255
|
-
refresh:
|
|
3307
|
+
var AuthTokens = z132.object({
|
|
3308
|
+
access: z132.string(),
|
|
3309
|
+
refresh: z132.string()
|
|
3256
3310
|
});
|
|
3257
|
-
var UserSession =
|
|
3311
|
+
var UserSession = z132.object({
|
|
3258
3312
|
session: Session,
|
|
3259
3313
|
user: User.nullable()
|
|
3260
3314
|
});
|
|
3261
3315
|
|
|
3262
3316
|
// src/feature-flags/feature-flags.ts
|
|
3263
|
-
import { z as
|
|
3264
|
-
var FlaggedFeature =
|
|
3265
|
-
var FeatureFlagMap =
|
|
3266
|
-
var FeatureFlag =
|
|
3267
|
-
id:
|
|
3317
|
+
import { z as z133 } from "zod";
|
|
3318
|
+
var FlaggedFeature = z133.enum(["FigmaImporterV2", "ShadowOpacityOptional", "DisableImporter"]);
|
|
3319
|
+
var FeatureFlagMap = z133.record(FlaggedFeature, z133.boolean());
|
|
3320
|
+
var FeatureFlag = z133.object({
|
|
3321
|
+
id: z133.string(),
|
|
3268
3322
|
feature: FlaggedFeature,
|
|
3269
|
-
createdAt:
|
|
3270
|
-
enabled:
|
|
3271
|
-
designSystemId:
|
|
3323
|
+
createdAt: z133.coerce.date(),
|
|
3324
|
+
enabled: z133.boolean(),
|
|
3325
|
+
designSystemId: z133.string().optional()
|
|
3272
3326
|
});
|
|
3273
3327
|
|
|
3274
3328
|
// src/integrations/external-oauth-request.ts
|
|
3275
|
-
import { z as
|
|
3329
|
+
import { z as z135 } from "zod";
|
|
3276
3330
|
|
|
3277
3331
|
// src/integrations/oauth-providers.ts
|
|
3278
|
-
import { z as
|
|
3332
|
+
import { z as z134 } from "zod";
|
|
3279
3333
|
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
3280
3334
|
OAuthProviderNames2["Figma"] = "figma";
|
|
3281
3335
|
OAuthProviderNames2["Azure"] = "azure";
|
|
@@ -3284,74 +3338,110 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
|
3284
3338
|
OAuthProviderNames2["Bitbucket"] = "bitbucket";
|
|
3285
3339
|
return OAuthProviderNames2;
|
|
3286
3340
|
})(OAuthProviderNames || {});
|
|
3287
|
-
var OAuthProviderSchema =
|
|
3341
|
+
var OAuthProviderSchema = z134.nativeEnum(OAuthProviderNames);
|
|
3288
3342
|
var OAuthProvider = OAuthProviderSchema.enum;
|
|
3289
3343
|
|
|
3290
3344
|
// src/integrations/external-oauth-request.ts
|
|
3291
|
-
var ExternalOAuthRequest =
|
|
3292
|
-
id:
|
|
3345
|
+
var ExternalOAuthRequest = z135.object({
|
|
3346
|
+
id: z135.string(),
|
|
3293
3347
|
provider: OAuthProviderSchema,
|
|
3294
|
-
userId:
|
|
3295
|
-
state:
|
|
3296
|
-
createdAt:
|
|
3348
|
+
userId: z135.string(),
|
|
3349
|
+
state: z135.string(),
|
|
3350
|
+
createdAt: z135.coerce.date()
|
|
3351
|
+
});
|
|
3352
|
+
|
|
3353
|
+
// src/integrations/integration.ts
|
|
3354
|
+
import { z as z136 } from "zod";
|
|
3355
|
+
var IntegrationType = z136.enum(["Figma", "Github", "Gitlab", "Bitbucket", "Azure"]);
|
|
3356
|
+
var Integration = z136.object({
|
|
3357
|
+
id: z136.string(),
|
|
3358
|
+
workspaceId: z136.string(),
|
|
3359
|
+
type: IntegrationType,
|
|
3360
|
+
createdAt: z136.coerce.date()
|
|
3361
|
+
});
|
|
3362
|
+
var IntegrationCredentialsType = z136.enum(["OAuth2", "PAT"]);
|
|
3363
|
+
var IntegrationCredentialsProfile = z136.object({
|
|
3364
|
+
id: z136.string(),
|
|
3365
|
+
username: z136.string().optional(),
|
|
3366
|
+
avatarUrl: z136.string().optional()
|
|
3367
|
+
});
|
|
3368
|
+
var IntegrationCredentialsSchema = z136.object({
|
|
3369
|
+
id: z136.string(),
|
|
3370
|
+
type: IntegrationCredentialsType,
|
|
3371
|
+
integrationId: z136.string(),
|
|
3372
|
+
accessToken: z136.string(),
|
|
3373
|
+
userId: z136.string(),
|
|
3374
|
+
createdAt: z136.coerce.date(),
|
|
3375
|
+
refreshToken: z136.string().optional(),
|
|
3376
|
+
profile: IntegrationCredentialsProfile.optional()
|
|
3297
3377
|
});
|
|
3298
3378
|
|
|
3299
3379
|
// src/integrations/oauth-token.ts
|
|
3300
|
-
import { z as
|
|
3301
|
-
var IntegrationTokenSchema =
|
|
3302
|
-
id:
|
|
3380
|
+
import { z as z137 } from "zod";
|
|
3381
|
+
var IntegrationTokenSchema = z137.object({
|
|
3382
|
+
id: z137.string(),
|
|
3383
|
+
provider: OAuthProviderSchema,
|
|
3384
|
+
scope: z137.string(),
|
|
3385
|
+
userId: z137.string(),
|
|
3386
|
+
accessToken: z137.string(),
|
|
3387
|
+
refreshToken: z137.string(),
|
|
3388
|
+
expiresAt: z137.coerce.date(),
|
|
3389
|
+
externalUserId: z137.string().nullish()
|
|
3390
|
+
});
|
|
3391
|
+
|
|
3392
|
+
// src/integrations/workspace-oauth-requests.ts
|
|
3393
|
+
import { z as z138 } from "zod";
|
|
3394
|
+
var WorkspaceOAuthRequestSchema = z138.object({
|
|
3395
|
+
id: z138.string(),
|
|
3396
|
+
workspaceId: z138.string(),
|
|
3303
3397
|
provider: OAuthProviderSchema,
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
accessToken: z133.string(),
|
|
3307
|
-
refreshToken: z133.string(),
|
|
3308
|
-
expiresAt: z133.coerce.date(),
|
|
3309
|
-
externalUserId: z133.string().nullish()
|
|
3398
|
+
userId: z138.string(),
|
|
3399
|
+
createdAt: z138.coerce.date()
|
|
3310
3400
|
});
|
|
3311
3401
|
|
|
3312
3402
|
// src/npm/npm-package.ts
|
|
3313
|
-
import { z as
|
|
3314
|
-
var AnyRecord =
|
|
3403
|
+
import { z as z139 } from "zod";
|
|
3404
|
+
var AnyRecord = z139.record(z139.any());
|
|
3315
3405
|
var NpmPackageVersionDist = AnyRecord.and(
|
|
3316
|
-
|
|
3317
|
-
tarball:
|
|
3406
|
+
z139.object({
|
|
3407
|
+
tarball: z139.string()
|
|
3318
3408
|
})
|
|
3319
3409
|
);
|
|
3320
3410
|
var NpmPackageVersion = AnyRecord.and(
|
|
3321
|
-
|
|
3411
|
+
z139.object({
|
|
3322
3412
|
dist: NpmPackageVersionDist
|
|
3323
3413
|
})
|
|
3324
3414
|
);
|
|
3325
3415
|
var NpmPackage = AnyRecord.and(
|
|
3326
|
-
|
|
3327
|
-
_id:
|
|
3328
|
-
name:
|
|
3416
|
+
z139.object({
|
|
3417
|
+
_id: z139.string(),
|
|
3418
|
+
name: z139.string(),
|
|
3329
3419
|
// e.g. "latest": "1.2.3"
|
|
3330
|
-
"dist-tags":
|
|
3420
|
+
"dist-tags": z139.record(z139.string(), z139.string()),
|
|
3331
3421
|
// "1.2.3": {...}
|
|
3332
|
-
versions:
|
|
3422
|
+
versions: z139.record(NpmPackageVersion)
|
|
3333
3423
|
})
|
|
3334
3424
|
);
|
|
3335
3425
|
|
|
3336
3426
|
// src/npm/npm-proxy-token-payload.ts
|
|
3337
|
-
import { z as
|
|
3338
|
-
var NpmProxyTokenPayload =
|
|
3339
|
-
npmProxyRegistryConfigId:
|
|
3427
|
+
import { z as z140 } from "zod";
|
|
3428
|
+
var NpmProxyTokenPayload = z140.object({
|
|
3429
|
+
npmProxyRegistryConfigId: z140.string()
|
|
3340
3430
|
});
|
|
3341
3431
|
|
|
3342
3432
|
// src/tokens/personal-access-token.ts
|
|
3343
|
-
import { z as
|
|
3344
|
-
var PersonalAccessToken =
|
|
3345
|
-
id:
|
|
3346
|
-
userId:
|
|
3347
|
-
|
|
3348
|
-
token: z136.string(),
|
|
3349
|
-
createdAt: z136.coerce.date(),
|
|
3350
|
-
hidden: z136.boolean(),
|
|
3351
|
-
workspaceId: z136.string().optional(),
|
|
3433
|
+
import { z as z141 } from "zod";
|
|
3434
|
+
var PersonalAccessToken = z141.object({
|
|
3435
|
+
id: z141.string(),
|
|
3436
|
+
userId: z141.string(),
|
|
3437
|
+
workspaceId: z141.string().optional(),
|
|
3352
3438
|
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
3353
|
-
|
|
3354
|
-
|
|
3439
|
+
name: z141.string(),
|
|
3440
|
+
hidden: z141.boolean(),
|
|
3441
|
+
token: z141.string(),
|
|
3442
|
+
scope: z141.string().optional(),
|
|
3443
|
+
createdAt: z141.coerce.date(),
|
|
3444
|
+
expireAt: z141.coerce.date().optional()
|
|
3355
3445
|
});
|
|
3356
3446
|
|
|
3357
3447
|
// src/utils/errors.ts
|
|
@@ -3411,6 +3501,9 @@ var SupernovaException = class _SupernovaException extends Error {
|
|
|
3411
3501
|
static noAccess(message) {
|
|
3412
3502
|
return new _SupernovaException("NoAccess", message);
|
|
3413
3503
|
}
|
|
3504
|
+
static missingCredentials(message) {
|
|
3505
|
+
return new _SupernovaException("MissingCredentials", message);
|
|
3506
|
+
}
|
|
3414
3507
|
//
|
|
3415
3508
|
// To refactor
|
|
3416
3509
|
//
|
|
@@ -3483,26 +3576,26 @@ async function sleep(ms) {
|
|
|
3483
3576
|
}
|
|
3484
3577
|
|
|
3485
3578
|
// src/utils/content-loader-instruction.ts
|
|
3486
|
-
import { z as
|
|
3487
|
-
var ContentLoadInstruction =
|
|
3488
|
-
from:
|
|
3489
|
-
to:
|
|
3490
|
-
authorizationHeaderKvsId:
|
|
3491
|
-
timeout:
|
|
3492
|
-
});
|
|
3493
|
-
var ContentLoaderPayload =
|
|
3494
|
-
type:
|
|
3579
|
+
import { z as z142 } from "zod";
|
|
3580
|
+
var ContentLoadInstruction = z142.object({
|
|
3581
|
+
from: z142.string(),
|
|
3582
|
+
to: z142.string(),
|
|
3583
|
+
authorizationHeaderKvsId: z142.string().optional(),
|
|
3584
|
+
timeout: z142.number().optional()
|
|
3585
|
+
});
|
|
3586
|
+
var ContentLoaderPayload = z142.object({
|
|
3587
|
+
type: z142.literal("Single"),
|
|
3495
3588
|
instruction: ContentLoadInstruction
|
|
3496
3589
|
}).or(
|
|
3497
|
-
|
|
3498
|
-
type:
|
|
3499
|
-
loadingChunkSize:
|
|
3500
|
-
instructions:
|
|
3590
|
+
z142.object({
|
|
3591
|
+
type: z142.literal("Multiple"),
|
|
3592
|
+
loadingChunkSize: z142.number().optional(),
|
|
3593
|
+
instructions: z142.array(ContentLoadInstruction)
|
|
3501
3594
|
})
|
|
3502
3595
|
).or(
|
|
3503
|
-
|
|
3504
|
-
type:
|
|
3505
|
-
location:
|
|
3596
|
+
z142.object({
|
|
3597
|
+
type: z142.literal("S3"),
|
|
3598
|
+
location: z142.string()
|
|
3506
3599
|
})
|
|
3507
3600
|
);
|
|
3508
3601
|
|
|
@@ -4249,6 +4342,7 @@ export {
|
|
|
4249
4342
|
DocumentationItemHeaderV2,
|
|
4250
4343
|
DocumentationLinkPreview,
|
|
4251
4344
|
DocumentationPage,
|
|
4345
|
+
DocumentationPageAnchor,
|
|
4252
4346
|
DocumentationPageContent,
|
|
4253
4347
|
DocumentationPageContentBackup,
|
|
4254
4348
|
DocumentationPageContentData,
|
|
@@ -4302,6 +4396,9 @@ export {
|
|
|
4302
4396
|
ExporterJobResultPullRequestDestination,
|
|
4303
4397
|
ExporterJobResultS3Destination,
|
|
4304
4398
|
ExporterJobStatus,
|
|
4399
|
+
ExporterPropertyImageValue,
|
|
4400
|
+
ExporterPropertyValue,
|
|
4401
|
+
ExporterPropertyValuesCollection,
|
|
4305
4402
|
ExporterSource,
|
|
4306
4403
|
ExporterTag,
|
|
4307
4404
|
ExporterType,
|
|
@@ -4369,8 +4466,13 @@ export {
|
|
|
4369
4466
|
ImportWarning,
|
|
4370
4467
|
ImportWarningType,
|
|
4371
4468
|
ImportedFigmaSourceData,
|
|
4469
|
+
Integration,
|
|
4372
4470
|
IntegrationAuthType,
|
|
4471
|
+
IntegrationCredentialsProfile,
|
|
4472
|
+
IntegrationCredentialsSchema,
|
|
4473
|
+
IntegrationCredentialsType,
|
|
4373
4474
|
IntegrationTokenSchema,
|
|
4475
|
+
IntegrationType,
|
|
4374
4476
|
IntegrationUserInfo,
|
|
4375
4477
|
InternalStatus,
|
|
4376
4478
|
InternalStatusSchema,
|
|
@@ -4544,6 +4646,7 @@ export {
|
|
|
4544
4646
|
ProductCopyValue,
|
|
4545
4647
|
PublishedDoc,
|
|
4546
4648
|
PublishedDocEnvironment,
|
|
4649
|
+
PublishedDocPage,
|
|
4547
4650
|
PublishedDocRoutingVersion,
|
|
4548
4651
|
PublishedDocsChecksums,
|
|
4549
4652
|
PulsarBaseProperty,
|
|
@@ -4630,6 +4733,7 @@ export {
|
|
|
4630
4733
|
WorkspaceIpSettings,
|
|
4631
4734
|
WorkspaceIpWhitelistEntry,
|
|
4632
4735
|
WorkspaceMembership,
|
|
4736
|
+
WorkspaceOAuthRequestSchema,
|
|
4633
4737
|
WorkspaceProfile,
|
|
4634
4738
|
WorkspaceRole,
|
|
4635
4739
|
WorkspaceRoleSchema,
|