@supernova-studio/model 0.46.0 → 0.46.3
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 +15003 -14579
- package/dist/index.d.ts +15003 -14579
- package/dist/index.js +175 -92
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +680 -597
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/codegen/export-destinations.ts +54 -0
- package/src/codegen/export-jobs.ts +8 -52
- package/src/codegen/export-schedule.ts +37 -0
- package/src/codegen/index.ts +2 -0
- package/src/dsm/data-sources/data-source.ts +1 -1
- package/src/dsm/elements/data/documentation-block-v1.ts +1 -0
- package/src/dsm/elements/figma-node-reference.ts +3 -2
- package/src/dsm/index.ts +0 -1
- package/src/dsm/published-doc-page.ts +0 -1
- package/src/dsm/version.ts +19 -1
- package/src/index.ts +1 -0
- package/src/integrations/integration.ts +45 -7
- package/src/liveblocks/index.ts +1 -0
- package/src/{dsm → liveblocks}/rooms/design-system-version-room.ts +1 -1
- package/src/{dsm → liveblocks}/rooms/documentation-page-room.ts +8 -8
- package/src/{dsm → liveblocks}/rooms/index.ts +1 -0
- package/src/{dsm → liveblocks}/rooms/room-type.ts +1 -0
- package/src/liveblocks/rooms/workspace-room.ts +16 -0
package/dist/index.mjs
CHANGED
|
@@ -788,6 +788,7 @@ var PageBlockShortcut = z34.object({
|
|
|
788
788
|
description: nullishToOptional(z34.string()),
|
|
789
789
|
asset: nullishToOptional(PageBlockAsset),
|
|
790
790
|
documentationItemId: nullishToOptional(z34.string()),
|
|
791
|
+
pageHeadingId: nullishToOptional(z34.string()),
|
|
791
792
|
url: nullishToOptional(z34.string()),
|
|
792
793
|
openInNewTab: nullishToOptional(z34.boolean()),
|
|
793
794
|
urlPreview: nullishToOptional(PageBlockUrlPreview),
|
|
@@ -1647,7 +1648,8 @@ function traverseStructure(node, action) {
|
|
|
1647
1648
|
// src/dsm/elements/figma-node-reference.ts
|
|
1648
1649
|
import { z as z74 } from "zod";
|
|
1649
1650
|
var FigmaNodeReferenceOrigin = z74.object({
|
|
1650
|
-
sourceId: z74.string()
|
|
1651
|
+
sourceId: z74.string(),
|
|
1652
|
+
parentName: z74.string().optional()
|
|
1651
1653
|
});
|
|
1652
1654
|
var FigmaNodeReference = DesignElementBase.extend({
|
|
1653
1655
|
data: FigmaNodeReferenceData,
|
|
@@ -2554,234 +2556,182 @@ var DocumentationPage = z98.object({
|
|
|
2554
2556
|
updatedAt: z98.coerce.date()
|
|
2555
2557
|
});
|
|
2556
2558
|
|
|
2557
|
-
// src/dsm/rooms/design-system-version-room.ts
|
|
2558
|
-
import { z as z99 } from "zod";
|
|
2559
|
-
var DesignSystemVersionRoom = Entity.extend({
|
|
2560
|
-
designSystemVersionId: z99.string(),
|
|
2561
|
-
liveblocksId: z99.string()
|
|
2562
|
-
});
|
|
2563
|
-
var DesignSystemVersionRoomInternalSettings = z99.object({
|
|
2564
|
-
routingVersion: z99.string()
|
|
2565
|
-
});
|
|
2566
|
-
var DesignSystemVersionRoomInitialState = z99.object({
|
|
2567
|
-
pages: z99.array(DocumentationPageV2),
|
|
2568
|
-
groups: z99.array(ElementGroup),
|
|
2569
|
-
internalSettings: DesignSystemVersionRoomInternalSettings
|
|
2570
|
-
});
|
|
2571
|
-
var DesignSystemVersionRoomUpdate = z99.object({
|
|
2572
|
-
pages: z99.array(DocumentationPageV2),
|
|
2573
|
-
groups: z99.array(ElementGroup),
|
|
2574
|
-
deletedPageIds: z99.array(z99.string()),
|
|
2575
|
-
deletedGroupIds: z99.array(z99.string())
|
|
2576
|
-
});
|
|
2577
|
-
|
|
2578
|
-
// src/dsm/rooms/documentation-page-room.ts
|
|
2579
|
-
import { z as z100 } from "zod";
|
|
2580
|
-
var DocumentationPageRoom = Entity.extend({
|
|
2581
|
-
designSystemVersionId: z100.string(),
|
|
2582
|
-
documentationPageId: z100.string(),
|
|
2583
|
-
liveblocksId: z100.string(),
|
|
2584
|
-
isDirty: z100.boolean()
|
|
2585
|
-
});
|
|
2586
|
-
var DocumentationPageRoomState = z100.object({
|
|
2587
|
-
pageItems: z100.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
2588
|
-
itemConfiguration: DocumentationItemConfigurationV2
|
|
2589
|
-
});
|
|
2590
|
-
var DocumentationPageRoomRoomUpdate = z100.object({
|
|
2591
|
-
page: DocumentationPageV2,
|
|
2592
|
-
pageParent: ElementGroup
|
|
2593
|
-
});
|
|
2594
|
-
var DocumentationPageRoomInitialStateUpdate = DocumentationPageRoomRoomUpdate.extend({
|
|
2595
|
-
pageItems: z100.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
2596
|
-
blockDefinitions: z100.array(PageBlockDefinition)
|
|
2597
|
-
});
|
|
2598
|
-
|
|
2599
|
-
// src/dsm/rooms/room-type.ts
|
|
2600
|
-
import { z as z101 } from "zod";
|
|
2601
|
-
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
2602
|
-
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
2603
|
-
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
2604
|
-
return RoomTypeEnum2;
|
|
2605
|
-
})(RoomTypeEnum || {});
|
|
2606
|
-
var RoomTypeSchema = z101.nativeEnum(RoomTypeEnum);
|
|
2607
|
-
var RoomType = RoomTypeSchema.enum;
|
|
2608
|
-
|
|
2609
2559
|
// src/dsm/views/column.ts
|
|
2610
|
-
import { z as
|
|
2611
|
-
var ElementViewBaseColumnType =
|
|
2612
|
-
var ElementViewColumnType =
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2560
|
+
import { z as z99 } from "zod";
|
|
2561
|
+
var ElementViewBaseColumnType = z99.enum(["Name", "Description", "Value", "UpdatedAt"]);
|
|
2562
|
+
var ElementViewColumnType = z99.union([
|
|
2563
|
+
z99.literal("BaseProperty"),
|
|
2564
|
+
z99.literal("PropertyDefinition"),
|
|
2565
|
+
z99.literal("Theme")
|
|
2616
2566
|
]);
|
|
2617
|
-
var ElementViewColumnSharedAttributes =
|
|
2618
|
-
id:
|
|
2619
|
-
persistentId:
|
|
2620
|
-
elementDataViewId:
|
|
2621
|
-
sortPosition:
|
|
2622
|
-
width:
|
|
2567
|
+
var ElementViewColumnSharedAttributes = z99.object({
|
|
2568
|
+
id: z99.string(),
|
|
2569
|
+
persistentId: z99.string(),
|
|
2570
|
+
elementDataViewId: z99.string(),
|
|
2571
|
+
sortPosition: z99.number(),
|
|
2572
|
+
width: z99.number()
|
|
2623
2573
|
});
|
|
2624
2574
|
var ElementViewBasePropertyColumn = ElementViewColumnSharedAttributes.extend({
|
|
2625
|
-
type:
|
|
2575
|
+
type: z99.literal("BaseProperty"),
|
|
2626
2576
|
basePropertyType: ElementViewBaseColumnType
|
|
2627
2577
|
});
|
|
2628
2578
|
var ElementViewPropertyDefinitionColumn = ElementViewColumnSharedAttributes.extend({
|
|
2629
|
-
type:
|
|
2630
|
-
propertyDefinitionId:
|
|
2579
|
+
type: z99.literal("PropertyDefinition"),
|
|
2580
|
+
propertyDefinitionId: z99.string()
|
|
2631
2581
|
});
|
|
2632
2582
|
var ElementViewThemeColumn = ElementViewColumnSharedAttributes.extend({
|
|
2633
|
-
type:
|
|
2634
|
-
themeId:
|
|
2583
|
+
type: z99.literal("Theme"),
|
|
2584
|
+
themeId: z99.string()
|
|
2635
2585
|
});
|
|
2636
|
-
var ElementViewColumn =
|
|
2586
|
+
var ElementViewColumn = z99.discriminatedUnion("type", [
|
|
2637
2587
|
ElementViewBasePropertyColumn,
|
|
2638
2588
|
ElementViewPropertyDefinitionColumn,
|
|
2639
2589
|
ElementViewThemeColumn
|
|
2640
2590
|
]);
|
|
2641
2591
|
|
|
2642
2592
|
// src/dsm/views/view.ts
|
|
2643
|
-
import { z as
|
|
2644
|
-
var ElementView =
|
|
2645
|
-
id:
|
|
2646
|
-
persistentId:
|
|
2647
|
-
designSystemVersionId:
|
|
2648
|
-
name:
|
|
2649
|
-
description:
|
|
2593
|
+
import { z as z100 } from "zod";
|
|
2594
|
+
var ElementView = z100.object({
|
|
2595
|
+
id: z100.string(),
|
|
2596
|
+
persistentId: z100.string(),
|
|
2597
|
+
designSystemVersionId: z100.string(),
|
|
2598
|
+
name: z100.string(),
|
|
2599
|
+
description: z100.string(),
|
|
2650
2600
|
targetElementType: ElementPropertyTargetType,
|
|
2651
|
-
isDefault:
|
|
2601
|
+
isDefault: z100.boolean()
|
|
2652
2602
|
});
|
|
2653
2603
|
|
|
2654
2604
|
// src/dsm/brand.ts
|
|
2655
|
-
import { z as
|
|
2656
|
-
var Brand =
|
|
2657
|
-
id:
|
|
2658
|
-
designSystemVersionId:
|
|
2659
|
-
persistentId:
|
|
2660
|
-
name:
|
|
2661
|
-
description:
|
|
2605
|
+
import { z as z101 } from "zod";
|
|
2606
|
+
var Brand = z101.object({
|
|
2607
|
+
id: z101.string(),
|
|
2608
|
+
designSystemVersionId: z101.string(),
|
|
2609
|
+
persistentId: z101.string(),
|
|
2610
|
+
name: z101.string(),
|
|
2611
|
+
description: z101.string()
|
|
2662
2612
|
});
|
|
2663
2613
|
|
|
2664
2614
|
// src/dsm/design-system.ts
|
|
2665
|
-
import { z as
|
|
2615
|
+
import { z as z111 } from "zod";
|
|
2666
2616
|
|
|
2667
2617
|
// src/workspace/npm-registry-settings.ts
|
|
2668
|
-
import { z as
|
|
2669
|
-
var NpmRegistryAuthType =
|
|
2670
|
-
var NpmRegistryType =
|
|
2671
|
-
var NpmRegistryBasicAuthConfig =
|
|
2672
|
-
authType:
|
|
2673
|
-
username:
|
|
2674
|
-
password:
|
|
2675
|
-
});
|
|
2676
|
-
var NpmRegistryBearerAuthConfig =
|
|
2677
|
-
authType:
|
|
2678
|
-
accessToken:
|
|
2679
|
-
});
|
|
2680
|
-
var NpmRegistryNoAuthConfig =
|
|
2681
|
-
authType:
|
|
2682
|
-
});
|
|
2683
|
-
var NpmRegistrCustomAuthConfig =
|
|
2684
|
-
authType:
|
|
2685
|
-
authHeaderName:
|
|
2686
|
-
authHeaderValue:
|
|
2687
|
-
});
|
|
2688
|
-
var NpmRegistryAuthConfig =
|
|
2618
|
+
import { z as z102 } from "zod";
|
|
2619
|
+
var NpmRegistryAuthType = z102.enum(["Basic", "Bearer", "None", "Custom"]);
|
|
2620
|
+
var NpmRegistryType = z102.enum(["NPMJS", "GitHub", "AzureDevOps", "Artifactory", "Custom"]);
|
|
2621
|
+
var NpmRegistryBasicAuthConfig = z102.object({
|
|
2622
|
+
authType: z102.literal(NpmRegistryAuthType.Enum.Basic),
|
|
2623
|
+
username: z102.string(),
|
|
2624
|
+
password: z102.string()
|
|
2625
|
+
});
|
|
2626
|
+
var NpmRegistryBearerAuthConfig = z102.object({
|
|
2627
|
+
authType: z102.literal(NpmRegistryAuthType.Enum.Bearer),
|
|
2628
|
+
accessToken: z102.string()
|
|
2629
|
+
});
|
|
2630
|
+
var NpmRegistryNoAuthConfig = z102.object({
|
|
2631
|
+
authType: z102.literal(NpmRegistryAuthType.Enum.None)
|
|
2632
|
+
});
|
|
2633
|
+
var NpmRegistrCustomAuthConfig = z102.object({
|
|
2634
|
+
authType: z102.literal(NpmRegistryAuthType.Enum.Custom),
|
|
2635
|
+
authHeaderName: z102.string(),
|
|
2636
|
+
authHeaderValue: z102.string()
|
|
2637
|
+
});
|
|
2638
|
+
var NpmRegistryAuthConfig = z102.discriminatedUnion("authType", [
|
|
2689
2639
|
NpmRegistryBasicAuthConfig,
|
|
2690
2640
|
NpmRegistryBearerAuthConfig,
|
|
2691
2641
|
NpmRegistryNoAuthConfig,
|
|
2692
2642
|
NpmRegistrCustomAuthConfig
|
|
2693
2643
|
]);
|
|
2694
|
-
var NpmRegistryConfigBase =
|
|
2644
|
+
var NpmRegistryConfigBase = z102.object({
|
|
2695
2645
|
registryType: NpmRegistryType,
|
|
2696
|
-
enabledScopes:
|
|
2697
|
-
customRegistryUrl:
|
|
2698
|
-
bypassProxy:
|
|
2699
|
-
npmProxyRegistryConfigId:
|
|
2700
|
-
npmProxyVersion:
|
|
2646
|
+
enabledScopes: z102.array(z102.string()),
|
|
2647
|
+
customRegistryUrl: z102.string().optional(),
|
|
2648
|
+
bypassProxy: z102.boolean().default(false),
|
|
2649
|
+
npmProxyRegistryConfigId: z102.string().optional(),
|
|
2650
|
+
npmProxyVersion: z102.number().optional()
|
|
2701
2651
|
});
|
|
2702
2652
|
var NpmRegistryConfig = NpmRegistryConfigBase.and(NpmRegistryAuthConfig);
|
|
2703
2653
|
|
|
2704
2654
|
// src/workspace/sso-provider.ts
|
|
2705
|
-
import { z as
|
|
2706
|
-
var SsoProvider =
|
|
2707
|
-
providerId:
|
|
2708
|
-
defaultAutoInviteValue:
|
|
2709
|
-
autoInviteDomains:
|
|
2710
|
-
skipDocsSupernovaLogin:
|
|
2711
|
-
areInvitesDisabled:
|
|
2712
|
-
isTestMode:
|
|
2713
|
-
emailDomains:
|
|
2714
|
-
metadataXml:
|
|
2655
|
+
import { z as z103 } from "zod";
|
|
2656
|
+
var SsoProvider = z103.object({
|
|
2657
|
+
providerId: z103.string(),
|
|
2658
|
+
defaultAutoInviteValue: z103.boolean(),
|
|
2659
|
+
autoInviteDomains: z103.record(z103.string(), z103.boolean()),
|
|
2660
|
+
skipDocsSupernovaLogin: z103.boolean(),
|
|
2661
|
+
areInvitesDisabled: z103.boolean(),
|
|
2662
|
+
isTestMode: z103.boolean(),
|
|
2663
|
+
emailDomains: z103.array(z103.string()),
|
|
2664
|
+
metadataXml: z103.string().nullish()
|
|
2715
2665
|
});
|
|
2716
2666
|
|
|
2717
2667
|
// src/workspace/user-invite.ts
|
|
2718
|
-
import { z as
|
|
2668
|
+
import { z as z105 } from "zod";
|
|
2719
2669
|
|
|
2720
2670
|
// src/workspace/workspace-role.ts
|
|
2721
|
-
import { z as
|
|
2722
|
-
var WorkspaceRoleSchema =
|
|
2671
|
+
import { z as z104 } from "zod";
|
|
2672
|
+
var WorkspaceRoleSchema = z104.enum(["Owner", "Admin", "Creator", "Viewer", "Billing", "Guest"]);
|
|
2723
2673
|
var WorkspaceRole = WorkspaceRoleSchema.enum;
|
|
2724
2674
|
|
|
2725
2675
|
// src/workspace/user-invite.ts
|
|
2726
2676
|
var MAX_MEMBERS_COUNT = 100;
|
|
2727
|
-
var UserInvite =
|
|
2728
|
-
email:
|
|
2677
|
+
var UserInvite = z105.object({
|
|
2678
|
+
email: z105.string().email().trim().transform((value) => value.toLowerCase()),
|
|
2729
2679
|
role: WorkspaceRoleSchema
|
|
2730
2680
|
});
|
|
2731
|
-
var UserInvites =
|
|
2681
|
+
var UserInvites = z105.array(UserInvite).max(MAX_MEMBERS_COUNT);
|
|
2732
2682
|
|
|
2733
2683
|
// src/workspace/workspace-context.ts
|
|
2734
|
-
import { z as
|
|
2684
|
+
import { z as z107 } from "zod";
|
|
2735
2685
|
|
|
2736
2686
|
// src/workspace/workspace.ts
|
|
2737
|
-
import { z as
|
|
2687
|
+
import { z as z106 } from "zod";
|
|
2738
2688
|
import IPCIDR from "ip-cidr";
|
|
2739
2689
|
var isValidCIDR = (value) => {
|
|
2740
2690
|
return IPCIDR.isValidAddress(value);
|
|
2741
2691
|
};
|
|
2742
|
-
var WorkspaceIpWhitelistEntry =
|
|
2743
|
-
isEnabled:
|
|
2744
|
-
name:
|
|
2745
|
-
range:
|
|
2692
|
+
var WorkspaceIpWhitelistEntry = z106.object({
|
|
2693
|
+
isEnabled: z106.boolean(),
|
|
2694
|
+
name: z106.string(),
|
|
2695
|
+
range: z106.string().refine(isValidCIDR, {
|
|
2746
2696
|
message: "Invalid IP CIDR"
|
|
2747
2697
|
})
|
|
2748
2698
|
});
|
|
2749
|
-
var WorkspaceIpSettings =
|
|
2750
|
-
isEnabledForCloud:
|
|
2751
|
-
isEnabledForDocs:
|
|
2752
|
-
entries:
|
|
2699
|
+
var WorkspaceIpSettings = z106.object({
|
|
2700
|
+
isEnabledForCloud: z106.boolean(),
|
|
2701
|
+
isEnabledForDocs: z106.boolean(),
|
|
2702
|
+
entries: z106.array(WorkspaceIpWhitelistEntry)
|
|
2753
2703
|
});
|
|
2754
|
-
var WorkspaceProfile =
|
|
2755
|
-
name:
|
|
2756
|
-
handle:
|
|
2757
|
-
color:
|
|
2758
|
-
avatar: nullishToOptional(
|
|
2704
|
+
var WorkspaceProfile = z106.object({
|
|
2705
|
+
name: z106.string(),
|
|
2706
|
+
handle: z106.string(),
|
|
2707
|
+
color: z106.string(),
|
|
2708
|
+
avatar: nullishToOptional(z106.string()),
|
|
2759
2709
|
billingDetails: nullishToOptional(BillingDetails)
|
|
2760
2710
|
});
|
|
2761
|
-
var Workspace =
|
|
2762
|
-
id:
|
|
2711
|
+
var Workspace = z106.object({
|
|
2712
|
+
id: z106.string(),
|
|
2763
2713
|
profile: WorkspaceProfile,
|
|
2764
2714
|
subscription: Subscription,
|
|
2765
2715
|
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
2766
2716
|
sso: nullishToOptional(SsoProvider),
|
|
2767
2717
|
npmRegistrySettings: nullishToOptional(NpmRegistryConfig),
|
|
2768
|
-
designSystems:
|
|
2718
|
+
designSystems: z106.array(DesignSystem).nullish()
|
|
2769
2719
|
});
|
|
2770
|
-
var WorkspaceWithDesignSystems =
|
|
2720
|
+
var WorkspaceWithDesignSystems = z106.object({
|
|
2771
2721
|
workspace: Workspace,
|
|
2772
|
-
designSystems:
|
|
2722
|
+
designSystems: z106.array(DesignSystem)
|
|
2773
2723
|
});
|
|
2774
2724
|
|
|
2775
2725
|
// src/workspace/workspace-context.ts
|
|
2776
|
-
var WorkspaceContext =
|
|
2777
|
-
workspaceId:
|
|
2726
|
+
var WorkspaceContext = z107.object({
|
|
2727
|
+
workspaceId: z107.string(),
|
|
2778
2728
|
product: ProductCodeSchema,
|
|
2779
2729
|
ipWhitelist: nullishToOptional(WorkspaceIpSettings),
|
|
2780
|
-
publicDesignSystem:
|
|
2730
|
+
publicDesignSystem: z107.boolean().optional()
|
|
2781
2731
|
});
|
|
2782
2732
|
|
|
2783
2733
|
// src/workspace/workspace-create.ts
|
|
2784
|
-
import { z as
|
|
2734
|
+
import { z as z108 } from "zod";
|
|
2785
2735
|
|
|
2786
2736
|
// src/utils/validation.ts
|
|
2787
2737
|
var slugRegex = /^[a-z0-9][a-z0-9-]*[a-z0-9]$/;
|
|
@@ -2791,18 +2741,18 @@ var WORKSPACE_NAME_MIN_LENGTH = 2;
|
|
|
2791
2741
|
var WORKSPACE_NAME_MAX_LENGTH = 64;
|
|
2792
2742
|
var HANDLE_MIN_LENGTH = 2;
|
|
2793
2743
|
var HANDLE_MAX_LENGTH = 64;
|
|
2794
|
-
var CreateWorkspaceInput =
|
|
2795
|
-
name:
|
|
2744
|
+
var CreateWorkspaceInput = z108.object({
|
|
2745
|
+
name: z108.string().min(WORKSPACE_NAME_MIN_LENGTH).max(WORKSPACE_NAME_MAX_LENGTH).trim(),
|
|
2796
2746
|
product: ProductCodeSchema,
|
|
2797
|
-
priceId:
|
|
2798
|
-
billingEmail:
|
|
2799
|
-
handle:
|
|
2747
|
+
priceId: z108.string(),
|
|
2748
|
+
billingEmail: z108.string().email().optional(),
|
|
2749
|
+
handle: z108.string().regex(slugRegex).min(HANDLE_MIN_LENGTH).max(HANDLE_MAX_LENGTH).refine((value) => value?.length > 0).optional(),
|
|
2800
2750
|
invites: UserInvites.optional(),
|
|
2801
|
-
promoCode:
|
|
2751
|
+
promoCode: z108.string().optional(),
|
|
2802
2752
|
status: InternalStatusSchema.optional(),
|
|
2803
2753
|
planInterval: BillingIntervalSchema.optional(),
|
|
2804
|
-
seats:
|
|
2805
|
-
seatLimit:
|
|
2754
|
+
seats: z108.number().optional(),
|
|
2755
|
+
seatLimit: z108.number().optional(),
|
|
2806
2756
|
card: CardSchema.optional(),
|
|
2807
2757
|
sso: SsoProvider.optional(),
|
|
2808
2758
|
npmRegistrySettings: NpmRegistryConfig.optional(),
|
|
@@ -2810,211 +2760,267 @@ var CreateWorkspaceInput = z111.object({
|
|
|
2810
2760
|
});
|
|
2811
2761
|
|
|
2812
2762
|
// src/workspace/workspace-invitations.ts
|
|
2813
|
-
import { z as
|
|
2814
|
-
var WorkspaceInvitation =
|
|
2815
|
-
id:
|
|
2816
|
-
email:
|
|
2817
|
-
createdAt:
|
|
2818
|
-
resentAt:
|
|
2819
|
-
role:
|
|
2820
|
-
workspaceId:
|
|
2821
|
-
invitedBy:
|
|
2763
|
+
import { z as z109 } from "zod";
|
|
2764
|
+
var WorkspaceInvitation = z109.object({
|
|
2765
|
+
id: z109.string(),
|
|
2766
|
+
email: z109.string().email(),
|
|
2767
|
+
createdAt: z109.coerce.date(),
|
|
2768
|
+
resentAt: z109.coerce.date().nullish(),
|
|
2769
|
+
role: z109.nativeEnum(WorkspaceRole),
|
|
2770
|
+
workspaceId: z109.string(),
|
|
2771
|
+
invitedBy: z109.string()
|
|
2822
2772
|
});
|
|
2823
2773
|
|
|
2824
2774
|
// src/workspace/workspace-membership.ts
|
|
2825
|
-
import { z as
|
|
2826
|
-
var WorkspaceMembership =
|
|
2827
|
-
id:
|
|
2828
|
-
userId:
|
|
2829
|
-
workspaceId:
|
|
2830
|
-
workspaceRole:
|
|
2831
|
-
});
|
|
2832
|
-
var UpdateMembershipRolesInput =
|
|
2833
|
-
members:
|
|
2834
|
-
|
|
2835
|
-
userId:
|
|
2836
|
-
role:
|
|
2775
|
+
import { z as z110 } from "zod";
|
|
2776
|
+
var WorkspaceMembership = z110.object({
|
|
2777
|
+
id: z110.string(),
|
|
2778
|
+
userId: z110.string(),
|
|
2779
|
+
workspaceId: z110.string(),
|
|
2780
|
+
workspaceRole: z110.nativeEnum(WorkspaceRole)
|
|
2781
|
+
});
|
|
2782
|
+
var UpdateMembershipRolesInput = z110.object({
|
|
2783
|
+
members: z110.array(
|
|
2784
|
+
z110.object({
|
|
2785
|
+
userId: z110.string(),
|
|
2786
|
+
role: z110.nativeEnum(WorkspaceRole)
|
|
2837
2787
|
})
|
|
2838
2788
|
)
|
|
2839
2789
|
});
|
|
2840
2790
|
|
|
2841
2791
|
// src/dsm/design-system.ts
|
|
2842
|
-
var DesignSystemSwitcher =
|
|
2843
|
-
isEnabled:
|
|
2844
|
-
designSystemIds:
|
|
2845
|
-
});
|
|
2846
|
-
var DesignSystem =
|
|
2847
|
-
id:
|
|
2848
|
-
workspaceId:
|
|
2849
|
-
name:
|
|
2850
|
-
description:
|
|
2851
|
-
docExporterId: nullishToOptional(
|
|
2852
|
-
docSlug:
|
|
2853
|
-
docUserSlug: nullishToOptional(
|
|
2854
|
-
docSlugDeprecated:
|
|
2855
|
-
isPublic:
|
|
2856
|
-
isMultibrand:
|
|
2857
|
-
docViewUrl: nullishToOptional(
|
|
2858
|
-
basePrefixes:
|
|
2792
|
+
var DesignSystemSwitcher = z111.object({
|
|
2793
|
+
isEnabled: z111.boolean(),
|
|
2794
|
+
designSystemIds: z111.array(z111.string())
|
|
2795
|
+
});
|
|
2796
|
+
var DesignSystem = z111.object({
|
|
2797
|
+
id: z111.string(),
|
|
2798
|
+
workspaceId: z111.string(),
|
|
2799
|
+
name: z111.string(),
|
|
2800
|
+
description: z111.string(),
|
|
2801
|
+
docExporterId: nullishToOptional(z111.string()),
|
|
2802
|
+
docSlug: z111.string(),
|
|
2803
|
+
docUserSlug: nullishToOptional(z111.string()),
|
|
2804
|
+
docSlugDeprecated: z111.string(),
|
|
2805
|
+
isPublic: z111.boolean(),
|
|
2806
|
+
isMultibrand: z111.boolean(),
|
|
2807
|
+
docViewUrl: nullishToOptional(z111.string()),
|
|
2808
|
+
basePrefixes: z111.array(z111.string()),
|
|
2859
2809
|
designSystemSwitcher: nullishToOptional(DesignSystemSwitcher),
|
|
2860
|
-
createdAt:
|
|
2861
|
-
updatedAt:
|
|
2810
|
+
createdAt: z111.coerce.date(),
|
|
2811
|
+
updatedAt: z111.coerce.date()
|
|
2862
2812
|
});
|
|
2863
|
-
var DesignSystemWithWorkspace =
|
|
2813
|
+
var DesignSystemWithWorkspace = z111.object({
|
|
2864
2814
|
designSystem: DesignSystem,
|
|
2865
2815
|
workspace: Workspace
|
|
2866
2816
|
});
|
|
2867
2817
|
|
|
2868
2818
|
// src/dsm/desing-system-create.ts
|
|
2869
|
-
import { z as
|
|
2819
|
+
import { z as z112 } from "zod";
|
|
2870
2820
|
var DS_NAME_MIN_LENGTH = 2;
|
|
2871
2821
|
var DS_NAME_MAX_LENGTH = 64;
|
|
2872
2822
|
var DS_DESC_MAX_LENGTH = 64;
|
|
2873
|
-
var DesignSystemCreateInputMetadata =
|
|
2874
|
-
name:
|
|
2875
|
-
description:
|
|
2823
|
+
var DesignSystemCreateInputMetadata = z112.object({
|
|
2824
|
+
name: z112.string().min(DS_NAME_MIN_LENGTH).max(DS_NAME_MAX_LENGTH).trim(),
|
|
2825
|
+
description: z112.string().max(DS_DESC_MAX_LENGTH).trim()
|
|
2876
2826
|
});
|
|
2877
|
-
var DesignSystemCreateInput =
|
|
2827
|
+
var DesignSystemCreateInput = z112.object({
|
|
2878
2828
|
meta: DesignSystemCreateInputMetadata,
|
|
2879
|
-
workspaceId:
|
|
2880
|
-
isPublic:
|
|
2881
|
-
basePrefixes:
|
|
2882
|
-
docUserSlug:
|
|
2883
|
-
source:
|
|
2829
|
+
workspaceId: z112.string(),
|
|
2830
|
+
isPublic: z112.boolean().optional(),
|
|
2831
|
+
basePrefixes: z112.array(z112.string()).optional(),
|
|
2832
|
+
docUserSlug: z112.string().nullish().optional(),
|
|
2833
|
+
source: z112.array(z112.string()).optional()
|
|
2884
2834
|
});
|
|
2885
2835
|
|
|
2886
2836
|
// src/dsm/desing-system-update.ts
|
|
2887
|
-
import { z as
|
|
2837
|
+
import { z as z113 } from "zod";
|
|
2888
2838
|
var DS_NAME_MIN_LENGTH2 = 2;
|
|
2889
2839
|
var DS_NAME_MAX_LENGTH2 = 64;
|
|
2890
2840
|
var DS_DESC_MAX_LENGTH2 = 64;
|
|
2891
|
-
var DesignSystemUpdateInputMetadata =
|
|
2892
|
-
name:
|
|
2893
|
-
description:
|
|
2841
|
+
var DesignSystemUpdateInputMetadata = z113.object({
|
|
2842
|
+
name: z113.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2843
|
+
description: z113.string().max(DS_DESC_MAX_LENGTH2).trim().optional()
|
|
2894
2844
|
});
|
|
2895
|
-
var DesignSystemUpdateInput =
|
|
2845
|
+
var DesignSystemUpdateInput = z113.object({
|
|
2896
2846
|
meta: DesignSystemUpdateInputMetadata.optional(),
|
|
2897
|
-
workspaceId:
|
|
2898
|
-
isPublic:
|
|
2899
|
-
basePrefixes:
|
|
2900
|
-
docUserSlug:
|
|
2901
|
-
source:
|
|
2902
|
-
name:
|
|
2903
|
-
description:
|
|
2904
|
-
docExporterId:
|
|
2847
|
+
workspaceId: z113.string().optional(),
|
|
2848
|
+
isPublic: z113.boolean().optional(),
|
|
2849
|
+
basePrefixes: z113.array(z113.string()).optional(),
|
|
2850
|
+
docUserSlug: z113.string().nullish().optional(),
|
|
2851
|
+
source: z113.array(z113.string()).optional(),
|
|
2852
|
+
name: z113.string().min(DS_NAME_MIN_LENGTH2).max(DS_NAME_MAX_LENGTH2).trim().optional(),
|
|
2853
|
+
description: z113.string().max(DS_DESC_MAX_LENGTH2).trim().optional(),
|
|
2854
|
+
docExporterId: z113.string().optional()
|
|
2905
2855
|
});
|
|
2906
2856
|
|
|
2907
2857
|
// src/dsm/exporter-property-values-collection.ts
|
|
2908
|
-
import { z as
|
|
2909
|
-
var ExporterPropertyImageValue =
|
|
2858
|
+
import { z as z114 } from "zod";
|
|
2859
|
+
var ExporterPropertyImageValue = z114.object({
|
|
2910
2860
|
asset: PageBlockAsset.optional(),
|
|
2911
|
-
assetId:
|
|
2912
|
-
assetUrl:
|
|
2913
|
-
});
|
|
2914
|
-
var ExporterPropertyValue =
|
|
2915
|
-
key:
|
|
2916
|
-
value:
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2861
|
+
assetId: z114.string().optional(),
|
|
2862
|
+
assetUrl: z114.string().optional()
|
|
2863
|
+
});
|
|
2864
|
+
var ExporterPropertyValue = z114.object({
|
|
2865
|
+
key: z114.string(),
|
|
2866
|
+
value: z114.union([
|
|
2867
|
+
z114.number(),
|
|
2868
|
+
z114.string(),
|
|
2869
|
+
z114.boolean(),
|
|
2920
2870
|
ExporterPropertyImageValue,
|
|
2921
2871
|
ColorTokenData,
|
|
2922
2872
|
TypographyTokenData
|
|
2923
2873
|
])
|
|
2924
2874
|
});
|
|
2925
|
-
var ExporterPropertyValuesCollection =
|
|
2926
|
-
id:
|
|
2927
|
-
designSystemId:
|
|
2928
|
-
exporterId:
|
|
2929
|
-
values:
|
|
2875
|
+
var ExporterPropertyValuesCollection = z114.object({
|
|
2876
|
+
id: z114.string(),
|
|
2877
|
+
designSystemId: z114.string(),
|
|
2878
|
+
exporterId: z114.string(),
|
|
2879
|
+
values: z114.array(ExporterPropertyValue)
|
|
2930
2880
|
});
|
|
2931
2881
|
|
|
2932
2882
|
// src/dsm/published-doc-page.ts
|
|
2933
|
-
import { z as
|
|
2883
|
+
import { z as z115 } from "zod";
|
|
2934
2884
|
var SHORT_PERSISTENT_ID_LENGTH = 8;
|
|
2935
2885
|
function tryParseShortPersistentId(url = "/") {
|
|
2936
2886
|
const lastUrlPart = url.split("/").pop() || "";
|
|
2937
2887
|
const shortPersistentId = lastUrlPart.split("-").pop()?.replaceAll(".html", "") || null;
|
|
2938
2888
|
return shortPersistentId?.length === SHORT_PERSISTENT_ID_LENGTH ? shortPersistentId : null;
|
|
2939
2889
|
}
|
|
2940
|
-
var PublishedDocPage =
|
|
2941
|
-
id:
|
|
2942
|
-
publishedDocId:
|
|
2943
|
-
pageShortPersistentId:
|
|
2944
|
-
pathV1:
|
|
2945
|
-
pathV2:
|
|
2946
|
-
storagePath:
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
updatedAt: z118.coerce.date()
|
|
2890
|
+
var PublishedDocPage = z115.object({
|
|
2891
|
+
id: z115.string(),
|
|
2892
|
+
publishedDocId: z115.string(),
|
|
2893
|
+
pageShortPersistentId: z115.string(),
|
|
2894
|
+
pathV1: z115.string(),
|
|
2895
|
+
pathV2: z115.string(),
|
|
2896
|
+
storagePath: z115.string(),
|
|
2897
|
+
locale: z115.string().optional(),
|
|
2898
|
+
isPrivate: z115.boolean(),
|
|
2899
|
+
isHidden: z115.boolean(),
|
|
2900
|
+
createdAt: z115.coerce.date(),
|
|
2901
|
+
updatedAt: z115.coerce.date()
|
|
2953
2902
|
});
|
|
2954
2903
|
|
|
2955
2904
|
// src/dsm/published-doc.ts
|
|
2956
|
-
import { z as
|
|
2905
|
+
import { z as z116 } from "zod";
|
|
2957
2906
|
var publishedDocEnvironments = ["Live", "Preview"];
|
|
2958
|
-
var PublishedDocEnvironment =
|
|
2959
|
-
var PublishedDocsChecksums =
|
|
2960
|
-
var PublishedDocRoutingVersion =
|
|
2961
|
-
var PublishedDoc =
|
|
2962
|
-
id:
|
|
2963
|
-
designSystemVersionId:
|
|
2964
|
-
createdAt:
|
|
2965
|
-
updatedAt:
|
|
2966
|
-
lastPublishedAt:
|
|
2967
|
-
isDefault:
|
|
2968
|
-
isPublic:
|
|
2907
|
+
var PublishedDocEnvironment = z116.enum(publishedDocEnvironments);
|
|
2908
|
+
var PublishedDocsChecksums = z116.record(z116.string());
|
|
2909
|
+
var PublishedDocRoutingVersion = z116.enum(["1", "2"]);
|
|
2910
|
+
var PublishedDoc = z116.object({
|
|
2911
|
+
id: z116.string(),
|
|
2912
|
+
designSystemVersionId: z116.string(),
|
|
2913
|
+
createdAt: z116.coerce.date(),
|
|
2914
|
+
updatedAt: z116.coerce.date(),
|
|
2915
|
+
lastPublishedAt: z116.coerce.date(),
|
|
2916
|
+
isDefault: z116.boolean(),
|
|
2917
|
+
isPublic: z116.boolean(),
|
|
2969
2918
|
environment: PublishedDocEnvironment,
|
|
2970
2919
|
checksums: PublishedDocsChecksums,
|
|
2971
|
-
storagePath:
|
|
2972
|
-
wasMigrated:
|
|
2920
|
+
storagePath: z116.string(),
|
|
2921
|
+
wasMigrated: z116.boolean(),
|
|
2973
2922
|
routingVersion: PublishedDocRoutingVersion,
|
|
2974
|
-
usesLocalizations:
|
|
2975
|
-
wasPublishedWithLocalizations:
|
|
2923
|
+
usesLocalizations: z116.boolean(),
|
|
2924
|
+
wasPublishedWithLocalizations: z116.boolean()
|
|
2976
2925
|
});
|
|
2977
2926
|
|
|
2978
2927
|
// src/dsm/version.ts
|
|
2979
|
-
import { z as
|
|
2980
|
-
var DesignSystemVersion =
|
|
2981
|
-
id:
|
|
2982
|
-
version:
|
|
2983
|
-
createdAt:
|
|
2984
|
-
designSystemId:
|
|
2985
|
-
name:
|
|
2986
|
-
comment:
|
|
2987
|
-
isReadonly:
|
|
2988
|
-
changeLog:
|
|
2989
|
-
parentId:
|
|
2928
|
+
import { z as z117 } from "zod";
|
|
2929
|
+
var DesignSystemVersion = z117.object({
|
|
2930
|
+
id: z117.string(),
|
|
2931
|
+
version: z117.string(),
|
|
2932
|
+
createdAt: z117.date(),
|
|
2933
|
+
designSystemId: z117.string(),
|
|
2934
|
+
name: z117.string(),
|
|
2935
|
+
comment: z117.string(),
|
|
2936
|
+
isReadonly: z117.boolean(),
|
|
2937
|
+
changeLog: z117.string(),
|
|
2938
|
+
parentId: z117.string().optional()
|
|
2939
|
+
});
|
|
2940
|
+
var VersionCreationJobStatus = z117.enum(["Success", "InProgress", "Error"]);
|
|
2941
|
+
var VersionCreationJob = z117.object({
|
|
2942
|
+
id: z117.string(),
|
|
2943
|
+
version: z117.string(),
|
|
2944
|
+
designSystemId: z117.string(),
|
|
2945
|
+
designSystemVersionId: nullishToOptional(z117.string()),
|
|
2946
|
+
status: VersionCreationJobStatus,
|
|
2947
|
+
errorMessage: nullishToOptional(z117.string())
|
|
2948
|
+
});
|
|
2949
|
+
|
|
2950
|
+
// src/codegen/export-destinations.ts
|
|
2951
|
+
import { z as z118 } from "zod";
|
|
2952
|
+
var ExporterDestinationSnDocs = z118.object({
|
|
2953
|
+
environment: PublishedDocEnvironment
|
|
2954
|
+
});
|
|
2955
|
+
var ExporterDestinationS3 = z118.object({});
|
|
2956
|
+
var ExporterDestinationGithub = z118.object({
|
|
2957
|
+
connectionId: z118.string(),
|
|
2958
|
+
url: z118.string(),
|
|
2959
|
+
branch: z118.string(),
|
|
2960
|
+
relativePath: z118.string(),
|
|
2961
|
+
// +
|
|
2962
|
+
userId: z118.coerce.string()
|
|
2963
|
+
});
|
|
2964
|
+
var ExporterDestinationAzure = z118.object({
|
|
2965
|
+
connectionId: z118.string(),
|
|
2966
|
+
organizationId: z118.string(),
|
|
2967
|
+
projectId: z118.string(),
|
|
2968
|
+
repositoryId: z118.string(),
|
|
2969
|
+
branch: z118.string(),
|
|
2970
|
+
relativePath: z118.string(),
|
|
2971
|
+
// +
|
|
2972
|
+
userId: z118.coerce.string(),
|
|
2973
|
+
url: z118.string()
|
|
2974
|
+
});
|
|
2975
|
+
var ExporterDestinationGitlab = z118.object({
|
|
2976
|
+
connectionId: z118.string(),
|
|
2977
|
+
projectId: z118.string(),
|
|
2978
|
+
branch: z118.string(),
|
|
2979
|
+
relativePath: z118.string(),
|
|
2980
|
+
// +
|
|
2981
|
+
userId: z118.coerce.string(),
|
|
2982
|
+
url: z118.string()
|
|
2983
|
+
});
|
|
2984
|
+
var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
|
|
2985
|
+
var BITBUCKET_MAX_LENGTH = 64;
|
|
2986
|
+
var ExporterDestinationBitbucket = z118.object({
|
|
2987
|
+
connectionId: z118.string(),
|
|
2988
|
+
workspaceSlug: z118.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2989
|
+
projectKey: z118.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2990
|
+
repoSlug: z118.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
2991
|
+
branch: z118.string(),
|
|
2992
|
+
relativePath: z118.string(),
|
|
2993
|
+
// +
|
|
2994
|
+
userId: z118.coerce.string(),
|
|
2995
|
+
url: z118.string()
|
|
2990
2996
|
});
|
|
2991
2997
|
|
|
2992
2998
|
// src/codegen/export-jobs.ts
|
|
2993
|
-
import { z as
|
|
2994
|
-
var ExporterJobDestination =
|
|
2995
|
-
var ExporterJobStatus =
|
|
2996
|
-
var ExporterJobLogEntryType =
|
|
2997
|
-
var ExporterJobLogEntry =
|
|
2998
|
-
id:
|
|
2999
|
-
time:
|
|
2999
|
+
import { z as z119 } from "zod";
|
|
3000
|
+
var ExporterJobDestination = z119.enum(["s3", "webhookUrl", "github", "documentation", "azure", "gitlab"]);
|
|
3001
|
+
var ExporterJobStatus = z119.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
3002
|
+
var ExporterJobLogEntryType = z119.enum(["success", "info", "warning", "error", "user"]);
|
|
3003
|
+
var ExporterJobLogEntry = z119.object({
|
|
3004
|
+
id: z119.string().optional(),
|
|
3005
|
+
time: z119.coerce.date(),
|
|
3000
3006
|
type: ExporterJobLogEntryType,
|
|
3001
|
-
message:
|
|
3007
|
+
message: z119.string()
|
|
3002
3008
|
});
|
|
3003
|
-
var ExporterJobResultPullRequestDestination =
|
|
3004
|
-
pullRequestUrl:
|
|
3009
|
+
var ExporterJobResultPullRequestDestination = z119.object({
|
|
3010
|
+
pullRequestUrl: z119.string()
|
|
3005
3011
|
});
|
|
3006
|
-
var ExporterJobResultS3Destination =
|
|
3007
|
-
bucket:
|
|
3008
|
-
urlPrefix:
|
|
3009
|
-
path:
|
|
3010
|
-
files:
|
|
3012
|
+
var ExporterJobResultS3Destination = z119.object({
|
|
3013
|
+
bucket: z119.string(),
|
|
3014
|
+
urlPrefix: z119.string().optional(),
|
|
3015
|
+
path: z119.string(),
|
|
3016
|
+
files: z119.array(z119.string())
|
|
3011
3017
|
});
|
|
3012
|
-
var ExporterJobResultDocsDestination =
|
|
3013
|
-
url:
|
|
3018
|
+
var ExporterJobResultDocsDestination = z119.object({
|
|
3019
|
+
url: z119.string()
|
|
3014
3020
|
});
|
|
3015
|
-
var ExporterJobResult =
|
|
3016
|
-
error:
|
|
3017
|
-
logs:
|
|
3021
|
+
var ExporterJobResult = z119.object({
|
|
3022
|
+
error: z119.string().optional(),
|
|
3023
|
+
logs: z119.array(ExporterJobLogEntry).optional(),
|
|
3018
3024
|
s3: ExporterJobResultS3Destination.optional(),
|
|
3019
3025
|
github: ExporterJobResultPullRequestDestination.optional(),
|
|
3020
3026
|
azure: ExporterJobResultPullRequestDestination.optional(),
|
|
@@ -3022,68 +3028,23 @@ var ExporterJobResult = z121.object({
|
|
|
3022
3028
|
bitbucket: ExporterJobResultPullRequestDestination.optional(),
|
|
3023
3029
|
sndocs: ExporterJobResultDocsDestination.optional()
|
|
3024
3030
|
});
|
|
3025
|
-
var
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
var ExporterDestinationAzure = z121.object({
|
|
3038
|
-
connectionId: z121.string(),
|
|
3039
|
-
organizationId: z121.string(),
|
|
3040
|
-
projectId: z121.string(),
|
|
3041
|
-
repositoryId: z121.string(),
|
|
3042
|
-
branch: z121.string(),
|
|
3043
|
-
relativePath: z121.string(),
|
|
3044
|
-
// +
|
|
3045
|
-
userId: z121.coerce.string(),
|
|
3046
|
-
url: z121.string()
|
|
3047
|
-
});
|
|
3048
|
-
var ExporterDestinationGitlab = z121.object({
|
|
3049
|
-
connectionId: z121.string(),
|
|
3050
|
-
projectId: z121.string(),
|
|
3051
|
-
branch: z121.string(),
|
|
3052
|
-
relativePath: z121.string(),
|
|
3053
|
-
// +
|
|
3054
|
-
userId: z121.coerce.string(),
|
|
3055
|
-
url: z121.string()
|
|
3056
|
-
});
|
|
3057
|
-
var BITBUCKET_SLUG = /^[-a-zA-Z0-9~]*$/;
|
|
3058
|
-
var BITBUCKET_MAX_LENGTH = 64;
|
|
3059
|
-
var ExporterDestinationBitbucket = z121.object({
|
|
3060
|
-
connectionId: z121.string(),
|
|
3061
|
-
workspaceSlug: z121.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3062
|
-
projectKey: z121.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3063
|
-
repoSlug: z121.string().max(BITBUCKET_MAX_LENGTH).regex(BITBUCKET_SLUG),
|
|
3064
|
-
branch: z121.string(),
|
|
3065
|
-
relativePath: z121.string(),
|
|
3066
|
-
// +
|
|
3067
|
-
userId: z121.coerce.string(),
|
|
3068
|
-
url: z121.string()
|
|
3069
|
-
});
|
|
3070
|
-
var ExporterJob = z121.object({
|
|
3071
|
-
id: z121.coerce.string(),
|
|
3072
|
-
createdAt: z121.coerce.date(),
|
|
3073
|
-
finishedAt: z121.coerce.date().optional(),
|
|
3074
|
-
designSystemId: z121.coerce.string(),
|
|
3075
|
-
designSystemVersionId: z121.coerce.string(),
|
|
3076
|
-
workspaceId: z121.coerce.string(),
|
|
3077
|
-
scheduleId: z121.coerce.string().nullish(),
|
|
3078
|
-
exporterId: z121.coerce.string(),
|
|
3079
|
-
brandId: z121.coerce.string().optional(),
|
|
3080
|
-
themeId: z121.coerce.string().optional(),
|
|
3081
|
-
estimatedExecutionTime: z121.number().optional(),
|
|
3031
|
+
var ExporterJob = z119.object({
|
|
3032
|
+
id: z119.coerce.string(),
|
|
3033
|
+
createdAt: z119.coerce.date(),
|
|
3034
|
+
finishedAt: z119.coerce.date().optional(),
|
|
3035
|
+
designSystemId: z119.coerce.string(),
|
|
3036
|
+
designSystemVersionId: z119.coerce.string(),
|
|
3037
|
+
workspaceId: z119.coerce.string(),
|
|
3038
|
+
scheduleId: z119.coerce.string().nullish(),
|
|
3039
|
+
exporterId: z119.coerce.string(),
|
|
3040
|
+
brandId: z119.coerce.string().optional(),
|
|
3041
|
+
themeId: z119.coerce.string().optional(),
|
|
3042
|
+
estimatedExecutionTime: z119.number().optional(),
|
|
3082
3043
|
status: ExporterJobStatus,
|
|
3083
3044
|
result: ExporterJobResult.optional(),
|
|
3084
|
-
createdByUserId:
|
|
3045
|
+
createdByUserId: z119.string().optional(),
|
|
3085
3046
|
// CodegenDestinationsModel
|
|
3086
|
-
webhookUrl:
|
|
3047
|
+
webhookUrl: z119.string().optional(),
|
|
3087
3048
|
destinationSnDocs: ExporterDestinationSnDocs.optional(),
|
|
3088
3049
|
destinationS3: ExporterDestinationS3.optional(),
|
|
3089
3050
|
destinationGithub: ExporterDestinationGithub.optional(),
|
|
@@ -3102,28 +3063,51 @@ var ExporterJobFindByFilter = ExporterJob.pick({
|
|
|
3102
3063
|
themeId: true,
|
|
3103
3064
|
brandId: true
|
|
3104
3065
|
}).extend({
|
|
3105
|
-
destinations:
|
|
3066
|
+
destinations: z119.array(ExporterJobDestination),
|
|
3106
3067
|
docsEnvironment: PublishedDocEnvironment
|
|
3107
3068
|
}).partial();
|
|
3108
3069
|
|
|
3070
|
+
// src/codegen/export-schedule.ts
|
|
3071
|
+
import { z as z120 } from "zod";
|
|
3072
|
+
var ExporterScheduleEventType = z120.enum(["InProgress", "Success", "Failed", "Timeout"]);
|
|
3073
|
+
var ExporterSchedule = z120.object({
|
|
3074
|
+
id: z120.coerce.string(),
|
|
3075
|
+
name: z120.coerce.string(),
|
|
3076
|
+
eventType: ExporterScheduleEventType,
|
|
3077
|
+
isEnabled: z120.coerce.boolean(),
|
|
3078
|
+
workspaceId: z120.coerce.string(),
|
|
3079
|
+
designSystemId: z120.coerce.string(),
|
|
3080
|
+
exporterId: z120.coerce.string(),
|
|
3081
|
+
brandId: z120.coerce.string().optional(),
|
|
3082
|
+
themeId: z120.coerce.string().optional(),
|
|
3083
|
+
// CodegenDestinationsModel
|
|
3084
|
+
webhookUrl: z120.string().optional(),
|
|
3085
|
+
destinationSnDocs: ExporterDestinationSnDocs.optional(),
|
|
3086
|
+
destinationS3: ExporterDestinationS3.optional(),
|
|
3087
|
+
destinationGithub: ExporterDestinationGithub.optional(),
|
|
3088
|
+
destinationAzure: ExporterDestinationAzure.optional(),
|
|
3089
|
+
destinationGitlab: ExporterDestinationGitlab.optional(),
|
|
3090
|
+
destinationBitbucket: ExporterDestinationBitbucket.optional()
|
|
3091
|
+
});
|
|
3092
|
+
|
|
3109
3093
|
// src/codegen/exporter-workspace-membership-role.ts
|
|
3110
|
-
import { z as
|
|
3111
|
-
var ExporterWorkspaceMembershipRole =
|
|
3094
|
+
import { z as z121 } from "zod";
|
|
3095
|
+
var ExporterWorkspaceMembershipRole = z121.enum(["Owner", "OwnerArchived", "User"]);
|
|
3112
3096
|
|
|
3113
3097
|
// src/codegen/exporter-workspace-membership.ts
|
|
3114
|
-
import { z as
|
|
3115
|
-
var ExporterWorkspaceMembership =
|
|
3116
|
-
id:
|
|
3117
|
-
workspaceId:
|
|
3118
|
-
exporterId:
|
|
3098
|
+
import { z as z122 } from "zod";
|
|
3099
|
+
var ExporterWorkspaceMembership = z122.object({
|
|
3100
|
+
id: z122.string(),
|
|
3101
|
+
workspaceId: z122.string(),
|
|
3102
|
+
exporterId: z122.string(),
|
|
3119
3103
|
role: ExporterWorkspaceMembershipRole
|
|
3120
3104
|
});
|
|
3121
3105
|
|
|
3122
3106
|
// src/codegen/exporter.ts
|
|
3123
|
-
import { z as
|
|
3107
|
+
import { z as z125 } from "zod";
|
|
3124
3108
|
|
|
3125
3109
|
// src/codegen/git-providers.ts
|
|
3126
|
-
import { z as
|
|
3110
|
+
import { z as z123 } from "zod";
|
|
3127
3111
|
var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
3128
3112
|
GitProviderNames2["Azure"] = "azure";
|
|
3129
3113
|
GitProviderNames2["Github"] = "github";
|
|
@@ -3131,11 +3115,11 @@ var GitProviderNames = /* @__PURE__ */ ((GitProviderNames2) => {
|
|
|
3131
3115
|
GitProviderNames2["Bitbucket"] = "bitbucket";
|
|
3132
3116
|
return GitProviderNames2;
|
|
3133
3117
|
})(GitProviderNames || {});
|
|
3134
|
-
var GitProvider =
|
|
3118
|
+
var GitProvider = z123.nativeEnum(GitProviderNames);
|
|
3135
3119
|
|
|
3136
3120
|
// src/codegen/pulsar.ts
|
|
3137
|
-
import { z as
|
|
3138
|
-
var PulsarPropertyType =
|
|
3121
|
+
import { z as z124 } from "zod";
|
|
3122
|
+
var PulsarPropertyType = z124.enum([
|
|
3139
3123
|
"string",
|
|
3140
3124
|
"number",
|
|
3141
3125
|
"boolean",
|
|
@@ -3148,108 +3132,108 @@ var PulsarPropertyType = z125.enum([
|
|
|
3148
3132
|
"tokenProperties",
|
|
3149
3133
|
"tokenType"
|
|
3150
3134
|
]);
|
|
3151
|
-
var PulsarBaseProperty =
|
|
3152
|
-
label:
|
|
3153
|
-
key:
|
|
3154
|
-
description:
|
|
3135
|
+
var PulsarBaseProperty = z124.object({
|
|
3136
|
+
label: z124.string(),
|
|
3137
|
+
key: z124.string(),
|
|
3138
|
+
description: z124.string().nullish(),
|
|
3155
3139
|
type: PulsarPropertyType,
|
|
3156
|
-
values:
|
|
3157
|
-
default:
|
|
3140
|
+
values: z124.array(z124.string()).nullish(),
|
|
3141
|
+
default: z124.union([z124.string(), z124.boolean(), z124.number()]).nullish(),
|
|
3158
3142
|
// PulsarPropertyValueType //is optional?
|
|
3159
|
-
inputType:
|
|
3143
|
+
inputType: z124.enum(["code", "plain"]).optional(),
|
|
3160
3144
|
//is optional?
|
|
3161
|
-
isMultiline:
|
|
3145
|
+
isMultiline: z124.boolean().nullish()
|
|
3162
3146
|
});
|
|
3163
3147
|
var PulsarContributionConfigurationProperty = PulsarBaseProperty.extend({
|
|
3164
|
-
category:
|
|
3148
|
+
category: z124.string()
|
|
3165
3149
|
});
|
|
3166
|
-
var PulsarContributionVariant =
|
|
3167
|
-
key:
|
|
3168
|
-
name:
|
|
3169
|
-
isDefault: nullishToOptional(
|
|
3170
|
-
description: nullishToOptional(
|
|
3171
|
-
thumbnailURL: nullishToOptional(
|
|
3172
|
-
});
|
|
3173
|
-
var PulsarCustomBlock =
|
|
3174
|
-
title: nullishToOptional(
|
|
3175
|
-
key:
|
|
3176
|
-
category: nullishToOptional(
|
|
3177
|
-
description: nullishToOptional(
|
|
3178
|
-
iconURL: nullishToOptional(
|
|
3179
|
-
mode: nullishToOptional(
|
|
3180
|
-
properties: nullishToOptional(
|
|
3150
|
+
var PulsarContributionVariant = z124.object({
|
|
3151
|
+
key: z124.string(),
|
|
3152
|
+
name: z124.string(),
|
|
3153
|
+
isDefault: nullishToOptional(z124.boolean()),
|
|
3154
|
+
description: nullishToOptional(z124.string()),
|
|
3155
|
+
thumbnailURL: nullishToOptional(z124.string())
|
|
3156
|
+
});
|
|
3157
|
+
var PulsarCustomBlock = z124.object({
|
|
3158
|
+
title: nullishToOptional(z124.string()),
|
|
3159
|
+
key: z124.string(),
|
|
3160
|
+
category: nullishToOptional(z124.string()),
|
|
3161
|
+
description: nullishToOptional(z124.string()),
|
|
3162
|
+
iconURL: nullishToOptional(z124.string()),
|
|
3163
|
+
mode: nullishToOptional(z124.enum(["array", "block"])),
|
|
3164
|
+
properties: nullishToOptional(z124.array(PulsarBaseProperty)).transform((v) => v ?? [])
|
|
3181
3165
|
});
|
|
3182
3166
|
|
|
3183
3167
|
// src/codegen/exporter.ts
|
|
3184
|
-
var ExporterType =
|
|
3185
|
-
var ExporterSource =
|
|
3186
|
-
var ExporterTag =
|
|
3187
|
-
var ExporterDetails =
|
|
3188
|
-
description:
|
|
3189
|
-
version:
|
|
3190
|
-
routingVersion: nullishToOptional(
|
|
3191
|
-
author: nullishToOptional(
|
|
3192
|
-
organization: nullishToOptional(
|
|
3193
|
-
homepage: nullishToOptional(
|
|
3194
|
-
readme: nullishToOptional(
|
|
3195
|
-
tags: nullishToOptional(
|
|
3196
|
-
packageId: nullishToOptional(
|
|
3197
|
-
iconURL: nullishToOptional(
|
|
3198
|
-
configurationProperties: nullishToOptional(
|
|
3199
|
-
customBlocks: nullishToOptional(
|
|
3200
|
-
blockVariants: nullishToOptional(
|
|
3201
|
-
usesBrands: nullishToOptional(
|
|
3202
|
-
usesThemes: nullishToOptional(
|
|
3168
|
+
var ExporterType = z125.enum(["code", "documentation"]);
|
|
3169
|
+
var ExporterSource = z125.enum(["git", "upload"]);
|
|
3170
|
+
var ExporterTag = z125.string().regex(/^[0-9a-zA-Z]+(\s[0-9a-zA-Z]+)*$/);
|
|
3171
|
+
var ExporterDetails = z125.object({
|
|
3172
|
+
description: z125.string(),
|
|
3173
|
+
version: z125.string(),
|
|
3174
|
+
routingVersion: nullishToOptional(z125.string()),
|
|
3175
|
+
author: nullishToOptional(z125.string()),
|
|
3176
|
+
organization: nullishToOptional(z125.string()),
|
|
3177
|
+
homepage: nullishToOptional(z125.string()),
|
|
3178
|
+
readme: nullishToOptional(z125.string()),
|
|
3179
|
+
tags: nullishToOptional(z125.array(ExporterTag)).default([]),
|
|
3180
|
+
packageId: nullishToOptional(z125.string().max(255)),
|
|
3181
|
+
iconURL: nullishToOptional(z125.string()),
|
|
3182
|
+
configurationProperties: nullishToOptional(z125.array(PulsarContributionConfigurationProperty)).default([]),
|
|
3183
|
+
customBlocks: nullishToOptional(z125.array(PulsarCustomBlock)).default([]),
|
|
3184
|
+
blockVariants: nullishToOptional(z125.record(z125.string(), z125.array(PulsarContributionVariant))).default({}),
|
|
3185
|
+
usesBrands: nullishToOptional(z125.boolean()).default(false),
|
|
3186
|
+
usesThemes: nullishToOptional(z125.boolean()).default(false),
|
|
3203
3187
|
source: ExporterSource,
|
|
3204
3188
|
gitProvider: nullishToOptional(GitProvider),
|
|
3205
|
-
gitUrl: nullishToOptional(
|
|
3206
|
-
gitBranch: nullishToOptional(
|
|
3207
|
-
gitDirectory: nullishToOptional(
|
|
3189
|
+
gitUrl: nullishToOptional(z125.string()),
|
|
3190
|
+
gitBranch: nullishToOptional(z125.string()),
|
|
3191
|
+
gitDirectory: nullishToOptional(z125.string())
|
|
3208
3192
|
});
|
|
3209
|
-
var Exporter =
|
|
3210
|
-
id:
|
|
3211
|
-
createdAt:
|
|
3212
|
-
name:
|
|
3213
|
-
isPrivate:
|
|
3193
|
+
var Exporter = z125.object({
|
|
3194
|
+
id: z125.string(),
|
|
3195
|
+
createdAt: z125.coerce.date(),
|
|
3196
|
+
name: z125.string(),
|
|
3197
|
+
isPrivate: z125.boolean(),
|
|
3214
3198
|
details: ExporterDetails,
|
|
3215
3199
|
exporterType: nullishToOptional(ExporterType).default("code"),
|
|
3216
|
-
storagePath: nullishToOptional(
|
|
3200
|
+
storagePath: nullishToOptional(z125.string()).default("")
|
|
3217
3201
|
});
|
|
3218
3202
|
|
|
3219
3203
|
// src/custom-domains/custom-domains.ts
|
|
3220
|
-
import { z as
|
|
3221
|
-
var CustomDomain =
|
|
3222
|
-
id:
|
|
3223
|
-
designSystemId:
|
|
3224
|
-
state:
|
|
3225
|
-
supernovaDomain:
|
|
3226
|
-
customerDomain:
|
|
3227
|
-
error:
|
|
3228
|
-
errorCode:
|
|
3204
|
+
import { z as z126 } from "zod";
|
|
3205
|
+
var CustomDomain = z126.object({
|
|
3206
|
+
id: z126.string(),
|
|
3207
|
+
designSystemId: z126.string(),
|
|
3208
|
+
state: z126.string(),
|
|
3209
|
+
supernovaDomain: z126.string(),
|
|
3210
|
+
customerDomain: z126.string().nullish(),
|
|
3211
|
+
error: z126.string().nullish(),
|
|
3212
|
+
errorCode: z126.string().nullish()
|
|
3229
3213
|
});
|
|
3230
3214
|
|
|
3231
3215
|
// src/docs-server/session.ts
|
|
3232
|
-
import { z as
|
|
3216
|
+
import { z as z133 } from "zod";
|
|
3233
3217
|
|
|
3234
3218
|
// src/users/linked-integrations.ts
|
|
3235
|
-
import { z as
|
|
3236
|
-
var IntegrationAuthType =
|
|
3237
|
-
var ExternalServiceType =
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3219
|
+
import { z as z127 } from "zod";
|
|
3220
|
+
var IntegrationAuthType = z127.union([z127.literal("OAuth2"), z127.literal("PAT")]);
|
|
3221
|
+
var ExternalServiceType = z127.union([
|
|
3222
|
+
z127.literal("figma"),
|
|
3223
|
+
z127.literal("github"),
|
|
3224
|
+
z127.literal("azure"),
|
|
3225
|
+
z127.literal("gitlab"),
|
|
3226
|
+
z127.literal("bitbucket")
|
|
3243
3227
|
]);
|
|
3244
|
-
var IntegrationUserInfo =
|
|
3245
|
-
id:
|
|
3246
|
-
handle:
|
|
3247
|
-
avatarUrl:
|
|
3248
|
-
email:
|
|
3228
|
+
var IntegrationUserInfo = z127.object({
|
|
3229
|
+
id: z127.string(),
|
|
3230
|
+
handle: z127.string().optional(),
|
|
3231
|
+
avatarUrl: z127.string().optional(),
|
|
3232
|
+
email: z127.string().optional(),
|
|
3249
3233
|
authType: IntegrationAuthType.optional(),
|
|
3250
|
-
customUrl:
|
|
3234
|
+
customUrl: z127.string().optional()
|
|
3251
3235
|
});
|
|
3252
|
-
var UserLinkedIntegrations =
|
|
3236
|
+
var UserLinkedIntegrations = z127.object({
|
|
3253
3237
|
figma: IntegrationUserInfo.optional(),
|
|
3254
3238
|
github: IntegrationUserInfo.array().optional(),
|
|
3255
3239
|
azure: IntegrationUserInfo.array().optional(),
|
|
@@ -3258,102 +3242,102 @@ var UserLinkedIntegrations = z128.object({
|
|
|
3258
3242
|
});
|
|
3259
3243
|
|
|
3260
3244
|
// src/users/user-create.ts
|
|
3261
|
-
import { z as
|
|
3262
|
-
var CreateUserInput =
|
|
3263
|
-
email:
|
|
3264
|
-
name:
|
|
3265
|
-
username:
|
|
3245
|
+
import { z as z128 } from "zod";
|
|
3246
|
+
var CreateUserInput = z128.object({
|
|
3247
|
+
email: z128.string(),
|
|
3248
|
+
name: z128.string(),
|
|
3249
|
+
username: z128.string()
|
|
3266
3250
|
});
|
|
3267
3251
|
|
|
3268
3252
|
// src/users/user-identity.ts
|
|
3269
|
-
import { z as
|
|
3270
|
-
var UserIdentity =
|
|
3271
|
-
id:
|
|
3272
|
-
userId:
|
|
3253
|
+
import { z as z129 } from "zod";
|
|
3254
|
+
var UserIdentity = z129.object({
|
|
3255
|
+
id: z129.string(),
|
|
3256
|
+
userId: z129.string()
|
|
3273
3257
|
});
|
|
3274
3258
|
|
|
3275
3259
|
// src/users/user-profile.ts
|
|
3276
|
-
import { z as
|
|
3277
|
-
var UserOnboardingDepartment =
|
|
3278
|
-
var UserOnboardingJobLevel =
|
|
3279
|
-
var UserOnboarding =
|
|
3280
|
-
companyName:
|
|
3281
|
-
numberOfPeopleInOrg:
|
|
3282
|
-
numberOfPeopleInDesignTeam:
|
|
3260
|
+
import { z as z130 } from "zod";
|
|
3261
|
+
var UserOnboardingDepartment = z130.enum(["Design", "Engineering", "Brand", "Other"]);
|
|
3262
|
+
var UserOnboardingJobLevel = z130.enum(["Executive", "Manager", "IndividualContributor", "Other"]);
|
|
3263
|
+
var UserOnboarding = z130.object({
|
|
3264
|
+
companyName: z130.string().optional(),
|
|
3265
|
+
numberOfPeopleInOrg: z130.string().optional(),
|
|
3266
|
+
numberOfPeopleInDesignTeam: z130.string().optional(),
|
|
3283
3267
|
department: UserOnboardingDepartment.optional(),
|
|
3284
|
-
jobTitle:
|
|
3285
|
-
phase:
|
|
3268
|
+
jobTitle: z130.string().optional(),
|
|
3269
|
+
phase: z130.string().optional(),
|
|
3286
3270
|
jobLevel: UserOnboardingJobLevel.optional()
|
|
3287
3271
|
});
|
|
3288
|
-
var UserProfile =
|
|
3289
|
-
name:
|
|
3290
|
-
avatar:
|
|
3291
|
-
nickname:
|
|
3272
|
+
var UserProfile = z130.object({
|
|
3273
|
+
name: z130.string(),
|
|
3274
|
+
avatar: z130.string().optional(),
|
|
3275
|
+
nickname: z130.string().optional(),
|
|
3292
3276
|
onboarding: UserOnboarding.optional()
|
|
3293
3277
|
});
|
|
3294
3278
|
|
|
3295
3279
|
// src/users/user-test.ts
|
|
3296
|
-
import { z as
|
|
3297
|
-
var UserTest =
|
|
3298
|
-
id:
|
|
3299
|
-
email:
|
|
3280
|
+
import { z as z131 } from "zod";
|
|
3281
|
+
var UserTest = z131.object({
|
|
3282
|
+
id: z131.string(),
|
|
3283
|
+
email: z131.string()
|
|
3300
3284
|
});
|
|
3301
3285
|
|
|
3302
3286
|
// src/users/user.ts
|
|
3303
|
-
import { z as
|
|
3304
|
-
var User =
|
|
3305
|
-
id:
|
|
3306
|
-
email:
|
|
3307
|
-
emailVerified:
|
|
3308
|
-
createdAt:
|
|
3309
|
-
trialExpiresAt:
|
|
3287
|
+
import { z as z132 } from "zod";
|
|
3288
|
+
var User = z132.object({
|
|
3289
|
+
id: z132.string(),
|
|
3290
|
+
email: z132.string(),
|
|
3291
|
+
emailVerified: z132.boolean(),
|
|
3292
|
+
createdAt: z132.coerce.date(),
|
|
3293
|
+
trialExpiresAt: z132.coerce.date().optional(),
|
|
3310
3294
|
profile: UserProfile,
|
|
3311
3295
|
linkedIntegrations: UserLinkedIntegrations.optional(),
|
|
3312
|
-
loggedOutAt:
|
|
3313
|
-
isProtected:
|
|
3296
|
+
loggedOutAt: z132.coerce.date().optional(),
|
|
3297
|
+
isProtected: z132.boolean()
|
|
3314
3298
|
});
|
|
3315
3299
|
|
|
3316
3300
|
// src/docs-server/session.ts
|
|
3317
|
-
var NpmProxyToken =
|
|
3318
|
-
access:
|
|
3319
|
-
expiresAt:
|
|
3301
|
+
var NpmProxyToken = z133.object({
|
|
3302
|
+
access: z133.string(),
|
|
3303
|
+
expiresAt: z133.number()
|
|
3320
3304
|
});
|
|
3321
|
-
var SessionData =
|
|
3322
|
-
returnToUrl:
|
|
3305
|
+
var SessionData = z133.object({
|
|
3306
|
+
returnToUrl: z133.string().optional(),
|
|
3323
3307
|
npmProxyToken: NpmProxyToken.optional()
|
|
3324
3308
|
});
|
|
3325
|
-
var Session =
|
|
3326
|
-
id:
|
|
3327
|
-
expiresAt:
|
|
3328
|
-
userId:
|
|
3309
|
+
var Session = z133.object({
|
|
3310
|
+
id: z133.string(),
|
|
3311
|
+
expiresAt: z133.coerce.date(),
|
|
3312
|
+
userId: z133.string().nullable(),
|
|
3329
3313
|
data: SessionData
|
|
3330
3314
|
});
|
|
3331
|
-
var AuthTokens =
|
|
3332
|
-
access:
|
|
3333
|
-
refresh:
|
|
3315
|
+
var AuthTokens = z133.object({
|
|
3316
|
+
access: z133.string(),
|
|
3317
|
+
refresh: z133.string()
|
|
3334
3318
|
});
|
|
3335
|
-
var UserSession =
|
|
3319
|
+
var UserSession = z133.object({
|
|
3336
3320
|
session: Session,
|
|
3337
3321
|
user: User.nullable()
|
|
3338
3322
|
});
|
|
3339
3323
|
|
|
3340
3324
|
// src/feature-flags/feature-flags.ts
|
|
3341
|
-
import { z as
|
|
3342
|
-
var FlaggedFeature =
|
|
3343
|
-
var FeatureFlagMap =
|
|
3344
|
-
var FeatureFlag =
|
|
3345
|
-
id:
|
|
3325
|
+
import { z as z134 } from "zod";
|
|
3326
|
+
var FlaggedFeature = z134.enum(["FigmaImporterV2", "ShadowOpacityOptional", "DisableImporter"]);
|
|
3327
|
+
var FeatureFlagMap = z134.record(FlaggedFeature, z134.boolean());
|
|
3328
|
+
var FeatureFlag = z134.object({
|
|
3329
|
+
id: z134.string(),
|
|
3346
3330
|
feature: FlaggedFeature,
|
|
3347
|
-
createdAt:
|
|
3348
|
-
enabled:
|
|
3349
|
-
designSystemId:
|
|
3331
|
+
createdAt: z134.coerce.date(),
|
|
3332
|
+
enabled: z134.boolean(),
|
|
3333
|
+
designSystemId: z134.string().optional()
|
|
3350
3334
|
});
|
|
3351
3335
|
|
|
3352
3336
|
// src/integrations/external-oauth-request.ts
|
|
3353
|
-
import { z as
|
|
3337
|
+
import { z as z136 } from "zod";
|
|
3354
3338
|
|
|
3355
3339
|
// src/integrations/oauth-providers.ts
|
|
3356
|
-
import { z as
|
|
3340
|
+
import { z as z135 } from "zod";
|
|
3357
3341
|
var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
3358
3342
|
OAuthProviderNames2["Figma"] = "figma";
|
|
3359
3343
|
OAuthProviderNames2["Azure"] = "azure";
|
|
@@ -3362,134 +3346,226 @@ var OAuthProviderNames = /* @__PURE__ */ ((OAuthProviderNames2) => {
|
|
|
3362
3346
|
OAuthProviderNames2["Bitbucket"] = "bitbucket";
|
|
3363
3347
|
return OAuthProviderNames2;
|
|
3364
3348
|
})(OAuthProviderNames || {});
|
|
3365
|
-
var OAuthProviderSchema =
|
|
3349
|
+
var OAuthProviderSchema = z135.nativeEnum(OAuthProviderNames);
|
|
3366
3350
|
var OAuthProvider = OAuthProviderSchema.enum;
|
|
3367
3351
|
|
|
3368
3352
|
// src/integrations/external-oauth-request.ts
|
|
3369
|
-
var ExternalOAuthRequest =
|
|
3370
|
-
id:
|
|
3353
|
+
var ExternalOAuthRequest = z136.object({
|
|
3354
|
+
id: z136.string(),
|
|
3371
3355
|
provider: OAuthProviderSchema,
|
|
3372
|
-
userId:
|
|
3373
|
-
state:
|
|
3374
|
-
createdAt:
|
|
3356
|
+
userId: z136.string(),
|
|
3357
|
+
state: z136.string(),
|
|
3358
|
+
createdAt: z136.coerce.date()
|
|
3375
3359
|
});
|
|
3376
3360
|
|
|
3377
3361
|
// src/integrations/integration.ts
|
|
3378
|
-
import { z as
|
|
3379
|
-
var
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3362
|
+
import { z as z137 } from "zod";
|
|
3363
|
+
var IntegrationDesignSystem = z137.object({
|
|
3364
|
+
designSystemId: z137.string(),
|
|
3365
|
+
brandId: z137.string(),
|
|
3366
|
+
title: z137.string().optional(),
|
|
3367
|
+
userId: z137.string().optional(),
|
|
3368
|
+
date: z137.coerce.date().optional()
|
|
3369
|
+
});
|
|
3370
|
+
var IntegrationCredentialsType = z137.enum(["OAuth2", "PAT", "GithubApp"]);
|
|
3371
|
+
var IntegrationCredentialsProfile = z137.object({
|
|
3372
|
+
id: z137.string(),
|
|
3373
|
+
email: z137.string().optional(),
|
|
3374
|
+
handle: z137.string().optional(),
|
|
3375
|
+
avatarUrl: z137.string().optional()
|
|
3384
3376
|
});
|
|
3385
|
-
var IntegrationCredentials =
|
|
3386
|
-
id:
|
|
3377
|
+
var IntegrationCredentials = z137.object({
|
|
3378
|
+
id: z137.string(),
|
|
3387
3379
|
type: IntegrationCredentialsType,
|
|
3388
|
-
integrationId:
|
|
3389
|
-
accessToken:
|
|
3390
|
-
userId:
|
|
3391
|
-
createdAt:
|
|
3392
|
-
refreshToken:
|
|
3380
|
+
integrationId: z137.string(),
|
|
3381
|
+
accessToken: z137.string(),
|
|
3382
|
+
userId: z137.string(),
|
|
3383
|
+
createdAt: z137.coerce.date(),
|
|
3384
|
+
refreshToken: z137.string().optional(),
|
|
3385
|
+
tokenName: z137.string().optional(),
|
|
3386
|
+
expiresAt: z137.coerce.date().optional(),
|
|
3393
3387
|
profile: IntegrationCredentialsProfile.optional(),
|
|
3394
|
-
customUrl:
|
|
3388
|
+
customUrl: z137.string().optional()
|
|
3395
3389
|
});
|
|
3396
|
-
var
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3390
|
+
var ExtendedIntegrationType = z137.enum([
|
|
3391
|
+
"Figma",
|
|
3392
|
+
"Github",
|
|
3393
|
+
"Gitlab",
|
|
3394
|
+
"Bitbucket",
|
|
3395
|
+
"Azure",
|
|
3396
|
+
"TokenStudio",
|
|
3397
|
+
"FigmaVariablesPlugin"
|
|
3398
|
+
]);
|
|
3399
|
+
var IntegrationType = ExtendedIntegrationType.exclude(["TokenStudio", "FigmaVariablesPlugin"]);
|
|
3400
|
+
var Integration = z137.object({
|
|
3401
|
+
id: z137.string(),
|
|
3402
|
+
workspaceId: z137.string(),
|
|
3400
3403
|
type: IntegrationType,
|
|
3401
|
-
createdAt:
|
|
3402
|
-
integrationCredentials:
|
|
3404
|
+
createdAt: z137.coerce.date(),
|
|
3405
|
+
integrationCredentials: z137.array(IntegrationCredentials).optional()
|
|
3403
3406
|
});
|
|
3404
3407
|
var forbiddenCustomUrldomainList = ["github.com", "gitlab.com", "bitbucket.org", "figma.com", "dev.azure.com"];
|
|
3405
|
-
var IntegrationTokenResponse =
|
|
3406
|
-
access_token:
|
|
3407
|
-
refresh_token:
|
|
3408
|
-
expires_in:
|
|
3409
|
-
token_type:
|
|
3410
|
-
|
|
3408
|
+
var IntegrationTokenResponse = z137.object({
|
|
3409
|
+
access_token: z137.string(),
|
|
3410
|
+
refresh_token: z137.string().optional(),
|
|
3411
|
+
expires_in: z137.union([z137.number().optional(), z137.string().optional()]),
|
|
3412
|
+
token_type: z137.string().optional(),
|
|
3413
|
+
token_name: z137.string().optional(),
|
|
3414
|
+
token_azure_organization_name: z137.string().optional(),
|
|
3415
|
+
// Azure only
|
|
3416
|
+
token_bitbucket_username: z137.string().optional(),
|
|
3417
|
+
// Bitbucket only
|
|
3418
|
+
custom_url: z137.string().optional().refine((value) => {
|
|
3411
3419
|
if (!value)
|
|
3412
3420
|
return true;
|
|
3413
3421
|
if (forbiddenCustomUrldomainList.some((domain) => value.includes(domain)))
|
|
3414
3422
|
return false;
|
|
3415
3423
|
return true;
|
|
3416
3424
|
}, "Custom URL validation failed")
|
|
3417
|
-
}).
|
|
3425
|
+
}).refine((data) => {
|
|
3426
|
+
if (data.custom_url && data.token_azure_organization_name) {
|
|
3427
|
+
return false;
|
|
3428
|
+
}
|
|
3429
|
+
return true;
|
|
3430
|
+
}, "Custom URL and Azure organization name cannot be present at the same time").transform((data) => {
|
|
3418
3431
|
return {
|
|
3419
3432
|
accessToken: data.access_token,
|
|
3420
3433
|
refreshToken: data.refresh_token,
|
|
3421
|
-
expiresIn: data.expires_in,
|
|
3434
|
+
expiresIn: typeof data.expires_in === "string" ? Number(data.expires_in) : data.expires_in,
|
|
3422
3435
|
tokenType: data.token_type,
|
|
3436
|
+
tokenName: data.token_name,
|
|
3437
|
+
tokenBitbucketUsername: data.token_bitbucket_username,
|
|
3438
|
+
tokenAzureOrganizationName: data.token_azure_organization_name,
|
|
3423
3439
|
customUrl: data.custom_url
|
|
3424
3440
|
};
|
|
3425
3441
|
});
|
|
3426
3442
|
|
|
3427
3443
|
// src/integrations/oauth-token.ts
|
|
3444
|
+
import { z as z138 } from "zod";
|
|
3445
|
+
var IntegrationTokenSchema = z138.object({
|
|
3446
|
+
id: z138.string(),
|
|
3447
|
+
provider: OAuthProviderSchema,
|
|
3448
|
+
scope: z138.string(),
|
|
3449
|
+
userId: z138.string(),
|
|
3450
|
+
accessToken: z138.string(),
|
|
3451
|
+
refreshToken: z138.string(),
|
|
3452
|
+
expiresAt: z138.coerce.date(),
|
|
3453
|
+
externalUserId: z138.string().nullish()
|
|
3454
|
+
});
|
|
3455
|
+
|
|
3456
|
+
// src/integrations/workspace-oauth-requests.ts
|
|
3428
3457
|
import { z as z139 } from "zod";
|
|
3429
|
-
var
|
|
3458
|
+
var WorkspaceOAuthRequestSchema = z139.object({
|
|
3430
3459
|
id: z139.string(),
|
|
3460
|
+
workspaceId: z139.string(),
|
|
3431
3461
|
provider: OAuthProviderSchema,
|
|
3432
|
-
scope: z139.string(),
|
|
3433
3462
|
userId: z139.string(),
|
|
3434
|
-
|
|
3435
|
-
refreshToken: z139.string(),
|
|
3436
|
-
expiresAt: z139.coerce.date(),
|
|
3437
|
-
externalUserId: z139.string().nullish()
|
|
3463
|
+
createdAt: z139.coerce.date()
|
|
3438
3464
|
});
|
|
3439
3465
|
|
|
3440
|
-
// src/
|
|
3466
|
+
// src/liveblocks/rooms/design-system-version-room.ts
|
|
3441
3467
|
import { z as z140 } from "zod";
|
|
3442
|
-
var
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
|
|
3447
|
-
|
|
3468
|
+
var DesignSystemVersionRoom = Entity.extend({
|
|
3469
|
+
designSystemVersionId: z140.string(),
|
|
3470
|
+
liveblocksId: z140.string()
|
|
3471
|
+
});
|
|
3472
|
+
var DesignSystemVersionRoomInternalSettings = z140.object({
|
|
3473
|
+
routingVersion: z140.string()
|
|
3474
|
+
});
|
|
3475
|
+
var DesignSystemVersionRoomInitialState = z140.object({
|
|
3476
|
+
pages: z140.array(DocumentationPageV2),
|
|
3477
|
+
groups: z140.array(ElementGroup),
|
|
3478
|
+
internalSettings: DesignSystemVersionRoomInternalSettings
|
|
3479
|
+
});
|
|
3480
|
+
var DesignSystemVersionRoomUpdate = z140.object({
|
|
3481
|
+
pages: z140.array(DocumentationPageV2),
|
|
3482
|
+
groups: z140.array(ElementGroup),
|
|
3483
|
+
deletedPageIds: z140.array(z140.string()),
|
|
3484
|
+
deletedGroupIds: z140.array(z140.string())
|
|
3448
3485
|
});
|
|
3449
3486
|
|
|
3450
|
-
// src/
|
|
3487
|
+
// src/liveblocks/rooms/documentation-page-room.ts
|
|
3451
3488
|
import { z as z141 } from "zod";
|
|
3452
|
-
var
|
|
3489
|
+
var DocumentationPageRoom = Entity.extend({
|
|
3490
|
+
designSystemVersionId: z141.string(),
|
|
3491
|
+
documentationPageId: z141.string(),
|
|
3492
|
+
liveblocksId: z141.string(),
|
|
3493
|
+
isDirty: z141.boolean()
|
|
3494
|
+
});
|
|
3495
|
+
var DocumentationPageRoomState = z141.object({
|
|
3496
|
+
pageItems: z141.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
3497
|
+
itemConfiguration: DocumentationItemConfigurationV2
|
|
3498
|
+
});
|
|
3499
|
+
var DocumentationPageRoomRoomUpdate = z141.object({
|
|
3500
|
+
page: DocumentationPageV2,
|
|
3501
|
+
pageParent: ElementGroup
|
|
3502
|
+
});
|
|
3503
|
+
var DocumentationPageRoomInitialStateUpdate = DocumentationPageRoomRoomUpdate.extend({
|
|
3504
|
+
pageItems: z141.array(PageBlockEditorModelV2.or(PageSectionEditorModelV2)),
|
|
3505
|
+
blockDefinitions: z141.array(PageBlockDefinition)
|
|
3506
|
+
});
|
|
3507
|
+
|
|
3508
|
+
// src/liveblocks/rooms/room-type.ts
|
|
3509
|
+
import { z as z142 } from "zod";
|
|
3510
|
+
var RoomTypeEnum = /* @__PURE__ */ ((RoomTypeEnum2) => {
|
|
3511
|
+
RoomTypeEnum2["DocumentationPage"] = "documentation-page";
|
|
3512
|
+
RoomTypeEnum2["DesignSystemVersion"] = "design-system-version";
|
|
3513
|
+
RoomTypeEnum2["Workspace"] = "workspace";
|
|
3514
|
+
return RoomTypeEnum2;
|
|
3515
|
+
})(RoomTypeEnum || {});
|
|
3516
|
+
var RoomTypeSchema = z142.nativeEnum(RoomTypeEnum);
|
|
3517
|
+
var RoomType = RoomTypeSchema.enum;
|
|
3518
|
+
|
|
3519
|
+
// src/liveblocks/rooms/workspace-room.ts
|
|
3520
|
+
import { z as z143 } from "zod";
|
|
3521
|
+
var WorkspaceRoom = Entity.extend({
|
|
3522
|
+
workspaceId: z143.string(),
|
|
3523
|
+
liveblocksId: z143.string()
|
|
3524
|
+
});
|
|
3525
|
+
|
|
3526
|
+
// src/npm/npm-package.ts
|
|
3527
|
+
import { z as z144 } from "zod";
|
|
3528
|
+
var AnyRecord = z144.record(z144.any());
|
|
3453
3529
|
var NpmPackageVersionDist = AnyRecord.and(
|
|
3454
|
-
|
|
3455
|
-
tarball:
|
|
3530
|
+
z144.object({
|
|
3531
|
+
tarball: z144.string()
|
|
3456
3532
|
})
|
|
3457
3533
|
);
|
|
3458
3534
|
var NpmPackageVersion = AnyRecord.and(
|
|
3459
|
-
|
|
3535
|
+
z144.object({
|
|
3460
3536
|
dist: NpmPackageVersionDist
|
|
3461
3537
|
})
|
|
3462
3538
|
);
|
|
3463
3539
|
var NpmPackage = AnyRecord.and(
|
|
3464
|
-
|
|
3465
|
-
_id:
|
|
3466
|
-
name:
|
|
3540
|
+
z144.object({
|
|
3541
|
+
_id: z144.string(),
|
|
3542
|
+
name: z144.string(),
|
|
3467
3543
|
// e.g. "latest": "1.2.3"
|
|
3468
|
-
"dist-tags":
|
|
3544
|
+
"dist-tags": z144.record(z144.string(), z144.string()),
|
|
3469
3545
|
// "1.2.3": {...}
|
|
3470
|
-
versions:
|
|
3546
|
+
versions: z144.record(NpmPackageVersion)
|
|
3471
3547
|
})
|
|
3472
3548
|
);
|
|
3473
3549
|
|
|
3474
3550
|
// src/npm/npm-proxy-token-payload.ts
|
|
3475
|
-
import { z as
|
|
3476
|
-
var NpmProxyTokenPayload =
|
|
3477
|
-
npmProxyRegistryConfigId:
|
|
3551
|
+
import { z as z145 } from "zod";
|
|
3552
|
+
var NpmProxyTokenPayload = z145.object({
|
|
3553
|
+
npmProxyRegistryConfigId: z145.string()
|
|
3478
3554
|
});
|
|
3479
3555
|
|
|
3480
3556
|
// src/tokens/personal-access-token.ts
|
|
3481
|
-
import { z as
|
|
3482
|
-
var PersonalAccessToken =
|
|
3483
|
-
id:
|
|
3484
|
-
userId:
|
|
3485
|
-
workspaceId:
|
|
3557
|
+
import { z as z146 } from "zod";
|
|
3558
|
+
var PersonalAccessToken = z146.object({
|
|
3559
|
+
id: z146.string(),
|
|
3560
|
+
userId: z146.string(),
|
|
3561
|
+
workspaceId: z146.string().optional(),
|
|
3486
3562
|
workspaceRole: WorkspaceRoleSchema.optional(),
|
|
3487
|
-
name:
|
|
3488
|
-
hidden:
|
|
3489
|
-
token:
|
|
3490
|
-
scope:
|
|
3491
|
-
createdAt:
|
|
3492
|
-
expireAt:
|
|
3563
|
+
name: z146.string(),
|
|
3564
|
+
hidden: z146.boolean(),
|
|
3565
|
+
token: z146.string(),
|
|
3566
|
+
scope: z146.string().optional(),
|
|
3567
|
+
createdAt: z146.coerce.date(),
|
|
3568
|
+
expireAt: z146.coerce.date().optional()
|
|
3493
3569
|
});
|
|
3494
3570
|
|
|
3495
3571
|
// src/utils/errors.ts
|
|
@@ -3624,26 +3700,26 @@ async function sleep(ms) {
|
|
|
3624
3700
|
}
|
|
3625
3701
|
|
|
3626
3702
|
// src/utils/content-loader-instruction.ts
|
|
3627
|
-
import { z as
|
|
3628
|
-
var ContentLoadInstruction =
|
|
3629
|
-
from:
|
|
3630
|
-
to:
|
|
3631
|
-
authorizationHeaderKvsId:
|
|
3632
|
-
timeout:
|
|
3633
|
-
});
|
|
3634
|
-
var ContentLoaderPayload =
|
|
3635
|
-
type:
|
|
3703
|
+
import { z as z147 } from "zod";
|
|
3704
|
+
var ContentLoadInstruction = z147.object({
|
|
3705
|
+
from: z147.string(),
|
|
3706
|
+
to: z147.string(),
|
|
3707
|
+
authorizationHeaderKvsId: z147.string().optional(),
|
|
3708
|
+
timeout: z147.number().optional()
|
|
3709
|
+
});
|
|
3710
|
+
var ContentLoaderPayload = z147.object({
|
|
3711
|
+
type: z147.literal("Single"),
|
|
3636
3712
|
instruction: ContentLoadInstruction
|
|
3637
3713
|
}).or(
|
|
3638
|
-
|
|
3639
|
-
type:
|
|
3640
|
-
loadingChunkSize:
|
|
3641
|
-
instructions:
|
|
3714
|
+
z147.object({
|
|
3715
|
+
type: z147.literal("Multiple"),
|
|
3716
|
+
loadingChunkSize: z147.number().optional(),
|
|
3717
|
+
instructions: z147.array(ContentLoadInstruction)
|
|
3642
3718
|
})
|
|
3643
3719
|
).or(
|
|
3644
|
-
|
|
3645
|
-
type:
|
|
3646
|
-
location:
|
|
3720
|
+
z147.object({
|
|
3721
|
+
type: z147.literal("S3"),
|
|
3722
|
+
location: z147.string()
|
|
3647
3723
|
})
|
|
3648
3724
|
);
|
|
3649
3725
|
|
|
@@ -4448,11 +4524,14 @@ export {
|
|
|
4448
4524
|
ExporterPropertyImageValue,
|
|
4449
4525
|
ExporterPropertyValue,
|
|
4450
4526
|
ExporterPropertyValuesCollection,
|
|
4527
|
+
ExporterSchedule,
|
|
4528
|
+
ExporterScheduleEventType,
|
|
4451
4529
|
ExporterSource,
|
|
4452
4530
|
ExporterTag,
|
|
4453
4531
|
ExporterType,
|
|
4454
4532
|
ExporterWorkspaceMembership,
|
|
4455
4533
|
ExporterWorkspaceMembershipRole,
|
|
4534
|
+
ExtendedIntegrationType,
|
|
4456
4535
|
ExternalOAuthRequest,
|
|
4457
4536
|
ExternalServiceType,
|
|
4458
4537
|
FeatureFlag,
|
|
@@ -4520,6 +4599,7 @@ export {
|
|
|
4520
4599
|
IntegrationCredentials,
|
|
4521
4600
|
IntegrationCredentialsProfile,
|
|
4522
4601
|
IntegrationCredentialsType,
|
|
4602
|
+
IntegrationDesignSystem,
|
|
4523
4603
|
IntegrationTokenResponse,
|
|
4524
4604
|
IntegrationTokenSchema,
|
|
4525
4605
|
IntegrationType,
|
|
@@ -4775,6 +4855,8 @@ export {
|
|
|
4775
4855
|
UserProfile,
|
|
4776
4856
|
UserSession,
|
|
4777
4857
|
UserTest,
|
|
4858
|
+
VersionCreationJob,
|
|
4859
|
+
VersionCreationJobStatus,
|
|
4778
4860
|
Visibility,
|
|
4779
4861
|
VisibilityTokenData,
|
|
4780
4862
|
VisibilityValue,
|
|
@@ -4788,6 +4870,7 @@ export {
|
|
|
4788
4870
|
WorkspaceProfile,
|
|
4789
4871
|
WorkspaceRole,
|
|
4790
4872
|
WorkspaceRoleSchema,
|
|
4873
|
+
WorkspaceRoom,
|
|
4791
4874
|
WorkspaceWithDesignSystems,
|
|
4792
4875
|
ZIndexTokenData,
|
|
4793
4876
|
ZIndexUnit,
|