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