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