@inf-monkeys-tech/monkeys 1.0.66 → 1.0.69
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/lib/contracts/declarative-control-http.d.ts +1448 -0
- package/lib/contracts/declarative-control-http.d.ts.map +1 -1
- package/lib/contracts/declarative-control.d.ts +764 -3
- package/lib/contracts/declarative-control.d.ts.map +1 -1
- package/lib/contracts/declarative-control.js +27 -5
- package/lib/contracts/declarative-control.js.map +1 -1
- package/lib/contracts/tenant.d.ts +69 -0
- package/lib/contracts/tenant.d.ts.map +1 -1
- package/lib/contracts/tenant.js +279 -93
- package/lib/contracts/tenant.js.map +1 -1
- package/lib/esm/contracts/index.mjs +144 -50
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +221 -50
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +220 -50
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +144 -50
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/navigation-release.schema.json +582 -0
- package/lib/json-schema/navigation-runtime-bundle.schema.json +588 -1
- package/lib/json-schema/page-release.schema.json +9 -1
- package/lib/json-schema/page-runtime-bundle.schema.json +9 -1
- package/lib/json-schema/tenant-product-config.schema.json +73 -0
- package/lib/json-schema/tenant-runtime-config.schema.json +73 -0
- package/lib/json-schema/workbench-release.schema.json +9 -1
- package/lib/json-schema/workbench-runtime-bundle.schema.json +18 -2
- package/lib/runtime/declarative-control-compiler.d.ts.map +1 -1
- package/lib/runtime/declarative-control-compiler.js +27 -0
- package/lib/runtime/declarative-control-compiler.js.map +1 -1
- package/lib/runtime/index.d.ts +1 -0
- package/lib/runtime/index.d.ts.map +1 -1
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/index.js.map +1 -1
- package/lib/runtime/menu-compiler.d.ts +19 -1
- package/lib/runtime/menu-compiler.d.ts.map +1 -1
- package/lib/runtime/menu-compiler.js +34 -0
- package/lib/runtime/menu-compiler.js.map +1 -1
- package/lib/runtime/navigation-availability.d.ts +6 -0
- package/lib/runtime/navigation-availability.d.ts.map +1 -0
- package/lib/runtime/navigation-availability.js +17 -0
- package/lib/runtime/navigation-availability.js.map +1 -0
- package/lib/schemas/index.d.ts +310 -1
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +5 -4
- package/lib/schemas/index.js.map +1 -1
- package/package.json +1 -1
- package/test/fixtures/navigation-three-roots-topology.json +275 -0
package/lib/esm/index.mjs
CHANGED
|
@@ -8656,18 +8656,21 @@ var RouteClaimSchema = RouteClaimBaseSchema.safeExtend({
|
|
|
8656
8656
|
}).strict();
|
|
8657
8657
|
var DeclarativeRouteClaimSchema = RouteClaimSchema;
|
|
8658
8658
|
var LegacyDeclarativeRouteClaimSchema = LegacyRouteClaimSchema;
|
|
8659
|
-
var
|
|
8659
|
+
var LegacyCompiledRouteMatcherSchema = z10.object({
|
|
8660
8660
|
caseSensitive: z10.boolean(),
|
|
8661
8661
|
trailingSlash: z10.enum(["preserve", "remove", "require"]),
|
|
8662
8662
|
parameters: z10.array(RouteSpaceParameterSchema)
|
|
8663
8663
|
}).strict();
|
|
8664
|
+
var CompiledRouteMatcherSchema = LegacyCompiledRouteMatcherSchema.safeExtend({
|
|
8665
|
+
surface: ProductSurfaceSchema
|
|
8666
|
+
}).strict();
|
|
8664
8667
|
var CompiledRouteClaimSchema = RouteClaimSchema.safeExtend({
|
|
8665
8668
|
normalizedPath: RoutePathTemplateSchema,
|
|
8666
8669
|
matcher: CompiledRouteMatcherSchema
|
|
8667
8670
|
}).strict();
|
|
8668
8671
|
var LegacyCompiledRouteClaimSchema = LegacyRouteClaimSchema.safeExtend({
|
|
8669
8672
|
normalizedPath: RoutePathTemplateSchema,
|
|
8670
|
-
matcher:
|
|
8673
|
+
matcher: LegacyCompiledRouteMatcherSchema
|
|
8671
8674
|
}).strict();
|
|
8672
8675
|
var validateDeclaredRouteSurfaces = (supportedSurfaces, routeClaims, context) => {
|
|
8673
8676
|
if (uniqueArray(supportedSurfaces, (surface) => surface)) {
|
|
@@ -9233,6 +9236,12 @@ var ResolvedNavigationTargetSchema = z10.object({
|
|
|
9233
9236
|
targetRevisionRef: RevisionRefSchema,
|
|
9234
9237
|
releaseRevisionRef: RevisionRefSchema.optional()
|
|
9235
9238
|
}).strict();
|
|
9239
|
+
var UnavailableNavigationTargetSchema = z10.object({
|
|
9240
|
+
nodeId: ContractIdentifierSchema,
|
|
9241
|
+
stableTargetRef: StableRefSchema.refine((reference) => reference.kind === "page", "Only missing Pages can be isolated."),
|
|
9242
|
+
reason: z10.literal("page-missing"),
|
|
9243
|
+
accessPolicy: AccessPolicySchema.nullable()
|
|
9244
|
+
}).strict();
|
|
9236
9245
|
var NavigationReleaseSchema = z10.object({
|
|
9237
9246
|
contract: z10.literal("NavigationRelease"),
|
|
9238
9247
|
...ReleaseBaseShape,
|
|
@@ -9242,13 +9251,17 @@ var NavigationReleaseSchema = z10.object({
|
|
|
9242
9251
|
surface: ProductSurfaceSchema,
|
|
9243
9252
|
placement: ContractIdentifierSchema
|
|
9244
9253
|
}).strict(),
|
|
9245
|
-
resolvedTargets: z10.array(ResolvedNavigationTargetSchema)
|
|
9254
|
+
resolvedTargets: z10.array(ResolvedNavigationTargetSchema),
|
|
9255
|
+
unavailableTargets: z10.array(UnavailableNavigationTargetSchema).optional()
|
|
9246
9256
|
}).strict().superRefine((value, context) => {
|
|
9247
9257
|
validateDependencySnapshot(value.dependencySnapshot, context);
|
|
9248
9258
|
validateReleaseExpectedHead(value, "navigation-release", context);
|
|
9249
9259
|
if (value.navigationRevisionRef.kind !== "navigation") context.addIssue({ code: "custom", path: ["navigationRevisionRef", "kind"], message: "Expected a navigation revision." });
|
|
9250
9260
|
if (value.target.environmentRef.kind !== "environment") context.addIssue({ code: "custom", path: ["target", "environmentRef", "kind"], message: "Navigation release target requires an environment reference." });
|
|
9251
9261
|
if (uniqueArray(value.resolvedTargets, (target) => target.nodeId)) context.addIssue({ code: "custom", path: ["resolvedTargets"], message: "Resolved Navigation node IDs must be unique." });
|
|
9262
|
+
if (uniqueArray([...value.resolvedTargets, ...value.unavailableTargets ?? []], (target) => target.nodeId)) {
|
|
9263
|
+
context.addIssue({ code: "custom", path: ["unavailableTargets"], message: "Navigation target resolutions must have unique node IDs." });
|
|
9264
|
+
}
|
|
9252
9265
|
});
|
|
9253
9266
|
var RuntimeDiagnosticSchema = z10.object({
|
|
9254
9267
|
code: ContractIdentifierSchema,
|
|
@@ -9336,7 +9349,8 @@ var CompiledNavigationDomainCommandTargetSchema = ResolvedNavigationTargetSchema
|
|
|
9336
9349
|
var CompiledNavigationResolvedTargetSchema = z10.discriminatedUnion("kind", [
|
|
9337
9350
|
CompiledNavigationTargetSchema,
|
|
9338
9351
|
CompiledNavigationRegisteredMenuActionTargetSchema,
|
|
9339
|
-
CompiledNavigationDomainCommandTargetSchema
|
|
9352
|
+
CompiledNavigationDomainCommandTargetSchema,
|
|
9353
|
+
UnavailableNavigationTargetSchema.omit({ reason: true }).extend({ kind: z10.literal("unavailable") }).strict()
|
|
9340
9354
|
]);
|
|
9341
9355
|
var CompiledNavigationGroupNodeSchema = NavigationGroupNodeSchema.extend({
|
|
9342
9356
|
ancestorAccessPolicies: z10.array(AccessPolicySchema)
|
|
@@ -9344,7 +9358,14 @@ var CompiledNavigationGroupNodeSchema = NavigationGroupNodeSchema.extend({
|
|
|
9344
9358
|
var CompiledNavigationTargetNodeSchema = NavigationTargetNodeSchema.extend({
|
|
9345
9359
|
ancestorAccessPolicies: z10.array(AccessPolicySchema),
|
|
9346
9360
|
resolvedTarget: CompiledNavigationResolvedTargetSchema
|
|
9347
|
-
}).strict()
|
|
9361
|
+
}).strict().superRefine((node, context) => {
|
|
9362
|
+
if (node.resolvedTarget.nodeId !== node.nodeId || stableRefIdentity(node.resolvedTarget.stableTargetRef) !== stableRefIdentity(node.targetRef)) {
|
|
9363
|
+
context.addIssue({ code: "custom", path: ["resolvedTarget"], message: "Resolved target identity must match the source node." });
|
|
9364
|
+
}
|
|
9365
|
+
if (node.resolvedTarget.kind === "unavailable" && (node.disabled !== true || Object.keys(node.parameterMapping).length > 0)) {
|
|
9366
|
+
context.addIssue({ code: "custom", path: ["resolvedTarget"], message: "Unavailable targets must be disabled and contain no executable input." });
|
|
9367
|
+
}
|
|
9368
|
+
});
|
|
9348
9369
|
var CompiledNavigationSeparatorNodeSchema = NavigationSeparatorNodeSchema.extend({
|
|
9349
9370
|
ancestorAccessPolicies: z10.array(AccessPolicySchema)
|
|
9350
9371
|
}).strict();
|
|
@@ -13335,11 +13356,7 @@ var DesignTokenInlineSourceSchema = z17.object({
|
|
|
13335
13356
|
type: z17.literal("inline"),
|
|
13336
13357
|
document: ThemeTokensSchema
|
|
13337
13358
|
}).strict();
|
|
13338
|
-
var DesignTokenSourceSchema = z17.discriminatedUnion("type", [
|
|
13339
|
-
DesignTokenFileSourceSchema,
|
|
13340
|
-
DesignTokenUrlSourceSchema,
|
|
13341
|
-
DesignTokenInlineSourceSchema
|
|
13342
|
-
]);
|
|
13359
|
+
var DesignTokenSourceSchema = z17.discriminatedUnion("type", [DesignTokenFileSourceSchema, DesignTokenUrlSourceSchema, DesignTokenInlineSourceSchema]);
|
|
13343
13360
|
var TenantDesignTokensConfigSchema = z17.object({
|
|
13344
13361
|
/** Ordered tenant overrides. The backend always applies the product default first. */
|
|
13345
13362
|
tokenSources: z17.array(DesignTokenSourceSchema)
|
|
@@ -13361,14 +13378,8 @@ var TenantDataBindingSchema = z17.discriminatedUnion("kind", [
|
|
|
13361
13378
|
domainRef: ContractIdentifierSchema.optional()
|
|
13362
13379
|
}).strict()
|
|
13363
13380
|
]);
|
|
13364
|
-
var TenantAuthBindingsSchema = z17.record(
|
|
13365
|
-
|
|
13366
|
-
TenantAuthBindingSchema
|
|
13367
|
-
);
|
|
13368
|
-
var TenantDataBindingsSchema = z17.record(
|
|
13369
|
-
ContractIdentifierSchema,
|
|
13370
|
-
TenantDataBindingSchema
|
|
13371
|
-
);
|
|
13381
|
+
var TenantAuthBindingsSchema = z17.record(ContractIdentifierSchema, TenantAuthBindingSchema);
|
|
13382
|
+
var TenantDataBindingsSchema = z17.record(ContractIdentifierSchema, TenantDataBindingSchema);
|
|
13372
13383
|
var TenantTrendRadarSourceSchema = z17.object({
|
|
13373
13384
|
ontologyId: ContractIdentifierSchema,
|
|
13374
13385
|
viewId: ContractIdentifierSchema
|
|
@@ -13433,11 +13444,7 @@ var CurrentUserMenuActionItemSchema = z17.object({
|
|
|
13433
13444
|
ref: z17.enum(CURRENT_USER_MENU_ACTION_REFS),
|
|
13434
13445
|
tone: z17.enum(["default", "danger"]).optional()
|
|
13435
13446
|
}).strict();
|
|
13436
|
-
var CurrentUserMenuItemSchema = z17.discriminatedUnion("kind", [
|
|
13437
|
-
CurrentUserMenuNavigationItemSchema,
|
|
13438
|
-
CurrentUserMenuControlItemSchema,
|
|
13439
|
-
CurrentUserMenuActionItemSchema
|
|
13440
|
-
]);
|
|
13447
|
+
var CurrentUserMenuItemSchema = z17.discriminatedUnion("kind", [CurrentUserMenuNavigationItemSchema, CurrentUserMenuControlItemSchema, CurrentUserMenuActionItemSchema]);
|
|
13441
13448
|
var CurrentUserMenuSectionSchema = z17.object({
|
|
13442
13449
|
id: CurrentUserMenuIdentifierSchema,
|
|
13443
13450
|
label: CurrentUserMenuDisplayTextSchema.optional(),
|
|
@@ -13493,11 +13500,7 @@ var LegacyCurrentUserMenuProfileSchema = z17.array(z17.enum(LEGACY_CURRENT_USER_
|
|
|
13493
13500
|
seen.add(item);
|
|
13494
13501
|
});
|
|
13495
13502
|
});
|
|
13496
|
-
var CurrentUserMenuProfileSchema = z17.union([
|
|
13497
|
-
z17.literal("*"),
|
|
13498
|
-
LegacyCurrentUserMenuProfileSchema,
|
|
13499
|
-
CurrentUserMenuConfigSchema
|
|
13500
|
-
]);
|
|
13503
|
+
var CurrentUserMenuProfileSchema = z17.union([z17.literal("*"), LegacyCurrentUserMenuProfileSchema, CurrentUserMenuConfigSchema]);
|
|
13501
13504
|
var ThemeHeadbarSchema = z17.object({
|
|
13502
13505
|
theme: z17.enum(["card", "glassy", "ghost"]).optional(),
|
|
13503
13506
|
navPosition: z17.enum(["left", "center", "right"]).optional(),
|
|
@@ -13606,7 +13609,10 @@ var TenantWorkbenchPageGroupSchema = z17.object({
|
|
|
13606
13609
|
var TenantWorkbenchConfigSchema = z17.object({
|
|
13607
13610
|
pages: z17.array(TenantWorkbenchPageEnvelopeSchema),
|
|
13608
13611
|
pageGroups: z17.array(TenantWorkbenchPageGroupSchema),
|
|
13609
|
-
catalog: z17.object({
|
|
13612
|
+
catalog: z17.object({
|
|
13613
|
+
enabled: z17.boolean().optional(),
|
|
13614
|
+
defaultEntry: z17.boolean().optional()
|
|
13615
|
+
}).strict().optional(),
|
|
13610
13616
|
quickSwitcherMaxItems: z17.number().int().nonnegative().optional(),
|
|
13611
13617
|
defaultOrder: z17.object({
|
|
13612
13618
|
groups: z17.array(ContractIdentifierSchema),
|
|
@@ -13647,11 +13653,19 @@ var TenantWorkbenchConfigSchema = z17.object({
|
|
|
13647
13653
|
const pageIds = pages.map(({ definition }) => definition.pageId);
|
|
13648
13654
|
const pageIdSet = new Set(pageIds);
|
|
13649
13655
|
if (pageIdSet.size !== pageIds.length) {
|
|
13650
|
-
context.addIssue({
|
|
13656
|
+
context.addIssue({
|
|
13657
|
+
code: "custom",
|
|
13658
|
+
path: ["pages"],
|
|
13659
|
+
message: "Tenant workbench page ids must be unique."
|
|
13660
|
+
});
|
|
13651
13661
|
}
|
|
13652
13662
|
const groupIds = pageGroups.map(({ id }) => id);
|
|
13653
13663
|
if (new Set(groupIds).size !== groupIds.length) {
|
|
13654
|
-
context.addIssue({
|
|
13664
|
+
context.addIssue({
|
|
13665
|
+
code: "custom",
|
|
13666
|
+
path: ["pageGroups"],
|
|
13667
|
+
message: "Tenant workbench page group ids must be unique."
|
|
13668
|
+
});
|
|
13655
13669
|
}
|
|
13656
13670
|
pageGroups.forEach((group, groupIndex) => {
|
|
13657
13671
|
group.pageIds.forEach((pageId, pageIndex) => {
|
|
@@ -13666,7 +13680,10 @@ var TenantWorkbenchConfigSchema = z17.object({
|
|
|
13666
13680
|
});
|
|
13667
13681
|
});
|
|
13668
13682
|
var LoginPageSchema = z17.object({
|
|
13669
|
-
background: z17.object({
|
|
13683
|
+
background: z17.object({
|
|
13684
|
+
imageUrl: z17.string().optional(),
|
|
13685
|
+
gradient: z17.string().optional()
|
|
13686
|
+
}).strict().optional(),
|
|
13670
13687
|
logo: z17.object({
|
|
13671
13688
|
url: z17.string().optional(),
|
|
13672
13689
|
lightUrl: z17.string().optional(),
|
|
@@ -13747,10 +13764,16 @@ var TenantApplicationConfigSchema = z17.object({
|
|
|
13747
13764
|
toast: z17.object({
|
|
13748
13765
|
position: z17.enum(["top-right", "top-left", "bottom-right", "bottom-left", "top-center", "bottom-center"])
|
|
13749
13766
|
}).strict().optional(),
|
|
13750
|
-
icons: z17.object({
|
|
13767
|
+
icons: z17.object({
|
|
13768
|
+
error: CustomIconSchema.optional(),
|
|
13769
|
+
empty: CustomIconSchema.optional()
|
|
13770
|
+
}).strict().optional(),
|
|
13751
13771
|
views: z17.object({
|
|
13752
13772
|
form: z17.object({
|
|
13753
|
-
toast: z17.object({
|
|
13773
|
+
toast: z17.object({
|
|
13774
|
+
afterCreate: z17.boolean(),
|
|
13775
|
+
afterDelete: z17.boolean()
|
|
13776
|
+
}).strict(),
|
|
13754
13777
|
progress: z17.enum(["estimate", "infinite"]),
|
|
13755
13778
|
onlyResult: z17.boolean(),
|
|
13756
13779
|
tabular: z17.object({ theme: z17.enum(["default", "tentiary", "primary"]) }).strict()
|
|
@@ -13771,10 +13794,7 @@ var TenantApplicationConfigSchema = z17.object({
|
|
|
13771
13794
|
}).strict().optional(),
|
|
13772
13795
|
modules: z17.object({
|
|
13773
13796
|
monkeysSpaceSidebar: z17.union([z17.literal("*"), z17.array(ContractIdentifierSchema)]).optional(),
|
|
13774
|
-
monkeysSpaceHeadbar: z17.union([
|
|
13775
|
-
z17.literal("*"),
|
|
13776
|
-
z17.array(TenantHeadbarModuleItemSchema)
|
|
13777
|
-
]).optional(),
|
|
13797
|
+
monkeysSpaceHeadbar: z17.union([z17.literal("*"), z17.array(TenantHeadbarModuleItemSchema)]).optional(),
|
|
13778
13798
|
settingsSidebar: z17.union([z17.literal("*"), z17.array(ContractIdentifierSchema)]).optional()
|
|
13779
13799
|
}).strict().optional(),
|
|
13780
13800
|
headbar: ThemeHeadbarSchema.optional(),
|
|
@@ -13801,7 +13821,10 @@ var TenantApplicationConfigSchema = z17.object({
|
|
|
13801
13821
|
workbenchSidebarViewType: z17.boolean().optional(),
|
|
13802
13822
|
workbenchSidebarFormViewEmbed: z17.boolean().optional(),
|
|
13803
13823
|
workbenchSidebarModernMode: z17.boolean().optional(),
|
|
13804
|
-
ugc: z17.object({
|
|
13824
|
+
ugc: z17.object({
|
|
13825
|
+
onItemClick: z17.boolean(),
|
|
13826
|
+
subtitle: z17.boolean().optional()
|
|
13827
|
+
}).strict().optional(),
|
|
13805
13828
|
uniImagePreview: z17.boolean().optional(),
|
|
13806
13829
|
imagePreviewStyle: z17.union([z17.literal(false), z17.enum(["simple", "normal", "uni"])]).optional(),
|
|
13807
13830
|
teamAsUser: z17.boolean().optional(),
|
|
@@ -13859,7 +13882,10 @@ var TenantApplicationConfigSchema = z17.object({
|
|
|
13859
13882
|
landingPage: TenantLandingPageConfigSchema.optional(),
|
|
13860
13883
|
auth: z17.object({
|
|
13861
13884
|
enabled: z17.array(ContractIdentifierSchema).default([]),
|
|
13862
|
-
oidc: z17.object({
|
|
13885
|
+
oidc: z17.object({
|
|
13886
|
+
buttonText: z17.string().optional(),
|
|
13887
|
+
autoSignin: z17.boolean().optional()
|
|
13888
|
+
}).strict().optional(),
|
|
13863
13889
|
password: z17.object({
|
|
13864
13890
|
registrationEnabled: z17.boolean().optional(),
|
|
13865
13891
|
disableAutoRegister: z17.boolean().optional()
|
|
@@ -13897,6 +13923,18 @@ var TenantApplicationConfigSchema = z17.object({
|
|
|
13897
13923
|
fieldMap: z17.record(z17.string(), z17.string()).optional(),
|
|
13898
13924
|
columnIds: z17.record(z17.string(), z17.string()).optional()
|
|
13899
13925
|
}).strict().optional(),
|
|
13926
|
+
homeShortcutBackground: z17.object({
|
|
13927
|
+
ontologyId: ContractIdentifierSchema,
|
|
13928
|
+
viewId: ContractIdentifierSchema.optional(),
|
|
13929
|
+
viewType: z17.enum(["filter", "container", "share_link"]).optional(),
|
|
13930
|
+
teamId: ContractIdentifierSchema.optional(),
|
|
13931
|
+
teamOnly: z17.boolean().optional(),
|
|
13932
|
+
pageSize: z17.number().int().positive().optional(),
|
|
13933
|
+
sortBy: z17.enum(["pin_order", "asset_id", "updated_timestamp"]).optional(),
|
|
13934
|
+
sortOrder: z17.enum(["asc", "desc"]).optional(),
|
|
13935
|
+
fieldMap: z17.record(z17.string(), z17.string()).optional(),
|
|
13936
|
+
columnIds: z17.record(z17.string(), z17.string()).optional()
|
|
13937
|
+
}).strict().optional(),
|
|
13900
13938
|
homeTrendAssistant: z17.object({
|
|
13901
13939
|
ontologyId: ContractIdentifierSchema.optional(),
|
|
13902
13940
|
viewId: ContractIdentifierSchema.optional(),
|
|
@@ -13904,8 +13942,16 @@ var TenantApplicationConfigSchema = z17.object({
|
|
|
13904
13942
|
viewName: z17.string().optional(),
|
|
13905
13943
|
teamId: ContractIdentifierSchema.optional(),
|
|
13906
13944
|
designOptionsWorkflowId: ContractIdentifierSchema.optional(),
|
|
13907
|
-
tep: z17.object({
|
|
13908
|
-
|
|
13945
|
+
tep: z17.object({
|
|
13946
|
+
baseUrl: z17.string().optional(),
|
|
13947
|
+
timeoutMs: z17.number().int().positive().optional()
|
|
13948
|
+
}).strict().optional(),
|
|
13949
|
+
runtime: z17.object({
|
|
13950
|
+
appId: ContractIdentifierSchema,
|
|
13951
|
+
tepBaseUrlConfigured: z17.boolean(),
|
|
13952
|
+
tepAuthorizationConfigured: z17.boolean(),
|
|
13953
|
+
tepCookieConfigured: z17.boolean()
|
|
13954
|
+
}).strict().optional()
|
|
13909
13955
|
}).strict().optional(),
|
|
13910
13956
|
staticTrendReport: z17.object({
|
|
13911
13957
|
ontologyId: ContractIdentifierSchema,
|
|
@@ -13914,20 +13960,67 @@ var TenantApplicationConfigSchema = z17.object({
|
|
|
13914
13960
|
}).strict().optional(),
|
|
13915
13961
|
trendRadar: TenantTrendRadarSourcesSchema.optional(),
|
|
13916
13962
|
sharing: z17.object({
|
|
13917
|
-
silentViewLinks: z17.object({
|
|
13918
|
-
|
|
13963
|
+
silentViewLinks: z17.object({
|
|
13964
|
+
enabled: z17.boolean().optional(),
|
|
13965
|
+
placement: z17.object({
|
|
13966
|
+
mode: z17.enum(["sourceOntology", "ontology"]).optional(),
|
|
13967
|
+
ontologyId: ContractIdentifierSchema.optional(),
|
|
13968
|
+
parentId: ContractIdentifierSchema.optional(),
|
|
13969
|
+
navId: ContractIdentifierSchema.optional()
|
|
13970
|
+
}).strict().optional()
|
|
13971
|
+
}).strict().optional(),
|
|
13972
|
+
shareAccess: z17.object({
|
|
13973
|
+
publicLinksEnabled: z17.boolean().optional(),
|
|
13974
|
+
passwordGateEnabled: z17.boolean().optional(),
|
|
13975
|
+
passwordAccessTtlSeconds: z17.number().int().positive().optional(),
|
|
13976
|
+
defaultViewTreeDelivery: z17.enum(["manual", "auto"]).optional()
|
|
13977
|
+
}).strict().optional(),
|
|
13919
13978
|
shareDialog: z17.object({
|
|
13920
|
-
audience: z17.object({
|
|
13921
|
-
|
|
13922
|
-
|
|
13979
|
+
audience: z17.object({
|
|
13980
|
+
enabled: z17.boolean().optional(),
|
|
13981
|
+
allowed: z17.array(z17.enum(["user", "team", "public"])).optional(),
|
|
13982
|
+
default: z17.enum(["user", "team", "public"]).optional()
|
|
13983
|
+
}).strict().optional(),
|
|
13984
|
+
accessLevel: z17.object({
|
|
13985
|
+
enabled: z17.boolean().optional(),
|
|
13986
|
+
allowed: z17.array(z17.enum(["read", "write"])).optional(),
|
|
13987
|
+
default: z17.enum(["read", "write"]).optional()
|
|
13988
|
+
}).strict().optional(),
|
|
13989
|
+
viewTreeDelivery: z17.object({
|
|
13990
|
+
enabled: z17.boolean().optional(),
|
|
13991
|
+
allowed: z17.array(z17.enum(["manual", "auto"])).optional(),
|
|
13992
|
+
default: z17.enum(["manual", "auto"]).optional()
|
|
13993
|
+
}).strict().optional()
|
|
13923
13994
|
}).strict().optional()
|
|
13924
13995
|
}).strict().optional()
|
|
13925
13996
|
}).strict().optional(),
|
|
13926
13997
|
kernelRuntime: z17.object({
|
|
13927
13998
|
integrations: z17.object({
|
|
13928
|
-
harbor: z17.object({
|
|
13929
|
-
|
|
13930
|
-
|
|
13999
|
+
harbor: z17.object({
|
|
14000
|
+
endpoint: z17.string().optional(),
|
|
14001
|
+
projectScopes: z17.array(z17.string()).optional(),
|
|
14002
|
+
authMode: z17.string().optional(),
|
|
14003
|
+
principal: z17.string().optional(),
|
|
14004
|
+
autoSync: z17.boolean().optional(),
|
|
14005
|
+
proxyUrl: z17.string().optional()
|
|
14006
|
+
}).strict().optional(),
|
|
14007
|
+
gitlab: z17.object({
|
|
14008
|
+
baseUrl: z17.string().optional(),
|
|
14009
|
+
groupScopes: z17.array(z17.string()).optional(),
|
|
14010
|
+
tokenMode: z17.string().optional(),
|
|
14011
|
+
deployProjectPath: z17.string().optional(),
|
|
14012
|
+
deploymentReportsEnabled: z17.boolean().optional(),
|
|
14013
|
+
proxyUrl: z17.string().optional()
|
|
14014
|
+
}).strict().optional(),
|
|
14015
|
+
kubernetes: z17.object({
|
|
14016
|
+
accessMode: z17.string().optional(),
|
|
14017
|
+
clusterAlias: z17.string().optional(),
|
|
14018
|
+
agentProjectPath: z17.string().optional(),
|
|
14019
|
+
agentName: z17.string().optional(),
|
|
14020
|
+
namespaceScopes: z17.array(z17.string()).optional(),
|
|
14021
|
+
rolloutObserverEnabled: z17.boolean().optional(),
|
|
14022
|
+
proxyUrl: z17.string().optional()
|
|
14023
|
+
}).strict().optional()
|
|
13931
14024
|
}).strict().optional()
|
|
13932
14025
|
}).strict().optional(),
|
|
13933
14026
|
data: z17.object({}).strict().optional(),
|
|
@@ -15909,6 +16002,7 @@ var compileRouteClaims = (input) => {
|
|
|
15909
16002
|
...claim,
|
|
15910
16003
|
normalizedPath,
|
|
15911
16004
|
matcher: {
|
|
16005
|
+
surface: claim.surface,
|
|
15912
16006
|
caseSensitive: routeSpace.caseSensitive,
|
|
15913
16007
|
trailingSlash: routeSpace.trailingSlash,
|
|
15914
16008
|
parameters: routeSpace.parameters
|
|
@@ -16312,7 +16406,14 @@ var compileNavigationRuntimeBundle = (input) => {
|
|
|
16312
16406
|
assertUniqueRegistryKeys(targetRegistry.map((registration) => stableRefKey(registration.stableTargetRef)), "targetRegistry");
|
|
16313
16407
|
const targetsByStableRef = new Map(targetRegistry.map((registration) => [stableRefKey(registration.stableTargetRef), registration]));
|
|
16314
16408
|
const releasedByNodeId = new Map(release.resolvedTargets.map((target) => [target.nodeId, target]));
|
|
16409
|
+
const unavailableByNodeId = new Map((release.unavailableTargets ?? []).map((target) => [target.nodeId, target]));
|
|
16315
16410
|
const nodesById = new Map(navigation.nodes.map((node) => [node.nodeId, node]));
|
|
16411
|
+
for (const target of release.unavailableTargets ?? []) {
|
|
16412
|
+
const node = nodesById.get(target.nodeId);
|
|
16413
|
+
if (node?.kind !== "target" || !sameStableRef(node.targetRef, target.stableTargetRef)) {
|
|
16414
|
+
throw new DeclarativeControlCompilationError("NAV_TARGET_UNRELEASED", "release.unavailableTargets", "An unavailable target must identify its source Page node exactly.");
|
|
16415
|
+
}
|
|
16416
|
+
}
|
|
16316
16417
|
const nodes = orderedNavigationNodes(navigation).map((node, index) => {
|
|
16317
16418
|
const ancestors = [];
|
|
16318
16419
|
let parentId = node.parentNodeId;
|
|
@@ -16327,6 +16428,25 @@ var compileNavigationRuntimeBundle = (input) => {
|
|
|
16327
16428
|
}
|
|
16328
16429
|
const registration = targetsByStableRef.get(stableRefKey(node.targetRef));
|
|
16329
16430
|
const released = releasedByNodeId.get(node.nodeId);
|
|
16431
|
+
const unavailable = unavailableByNodeId.get(node.nodeId);
|
|
16432
|
+
if (!registration && unavailable && node.targetRef.kind === "page" && sameStableRef(unavailable.stableTargetRef, node.targetRef)) {
|
|
16433
|
+
assertTenantCompatible(node.targetRef, scope, `nodes[${index}].targetRef`);
|
|
16434
|
+
if (unavailable.accessPolicy && !accessPolicyChainImplies([...ancestors, node.audience], unavailable.accessPolicy)) {
|
|
16435
|
+
throw new DeclarativeControlCompilationError("AUDIENCE_WIDER_THAN_TARGET", `nodes[${index}].audience`, "Effective Navigation audience is wider than the last verified target audience.");
|
|
16436
|
+
}
|
|
16437
|
+
return {
|
|
16438
|
+
...node,
|
|
16439
|
+
disabled: true,
|
|
16440
|
+
parameterMapping: {},
|
|
16441
|
+
ancestorAccessPolicies: ancestors,
|
|
16442
|
+
resolvedTarget: {
|
|
16443
|
+
kind: "unavailable",
|
|
16444
|
+
nodeId: node.nodeId,
|
|
16445
|
+
stableTargetRef: node.targetRef,
|
|
16446
|
+
accessPolicy: unavailable.accessPolicy
|
|
16447
|
+
}
|
|
16448
|
+
};
|
|
16449
|
+
}
|
|
16330
16450
|
if (!registration || !released || !sameStableRef(registration.stableTargetRef, stableFromRevision(registration.targetRevisionRef)) || !sameStableRef(registration.stableTargetRef, released.stableTargetRef) || !sameRevisionRef(registration.targetRevisionRef, released.targetRevisionRef) || registration.kind === "route" && (Boolean(registration.releaseRevisionRef) !== Boolean(released.releaseRevisionRef) || registration.releaseRevisionRef && released.releaseRevisionRef && !sameRevisionRef(registration.releaseRevisionRef, released.releaseRevisionRef))) {
|
|
16331
16451
|
throw new DeclarativeControlCompilationError("NAV_TARGET_UNRELEASED", `nodes[${index}].targetRef`, "Navigation target is not resolved to the exact active release recorded by NavigationRelease.");
|
|
16332
16452
|
}
|
|
@@ -16456,6 +16576,16 @@ var resolveWorkbenchEntry = (input) => {
|
|
|
16456
16576
|
return { status: "forbidden", workbenchId: "" };
|
|
16457
16577
|
};
|
|
16458
16578
|
|
|
16579
|
+
// src/runtime/navigation-availability.ts
|
|
16580
|
+
var NAVIGATION_UNAVAILABLE_CAPABILITY_HEADER = "x-monkeys-navigation-capabilities";
|
|
16581
|
+
var NAVIGATION_UNAVAILABLE_CAPABILITY = "unavailable-pages-v1";
|
|
16582
|
+
function projectNavigationCompatibility(bundle, supportsUnavailable) {
|
|
16583
|
+
if (supportsUnavailable || !bundle.nodes.some((node) => node.kind === "target" && node.resolvedTarget.kind === "unavailable")) return bundle;
|
|
16584
|
+
const { contentHash: _hash, ...unsigned } = bundle;
|
|
16585
|
+
const nodes = bundle.nodes.filter((node) => node.kind !== "target" || node.resolvedTarget.kind !== "unavailable");
|
|
16586
|
+
return NavigationRuntimeBundleSchema.parse({ ...unsigned, nodes, contentHash: canonicalContentHash({ ...unsigned, nodes }) });
|
|
16587
|
+
}
|
|
16588
|
+
|
|
16459
16589
|
// src/runtime/menu-compiler.ts
|
|
16460
16590
|
var MenuCompilationError = class extends Error {
|
|
16461
16591
|
constructor(code, path, message) {
|
|
@@ -16728,6 +16858,13 @@ var compileMenuRuntimeBundle = (input) => {
|
|
|
16728
16858
|
const contributionProviders = input.contributionProviders.map((registration) => MenuContributionProviderRegistrationSchema.parse(registration));
|
|
16729
16859
|
const inputValidators = input.inputValidators ?? /* @__PURE__ */ new Map();
|
|
16730
16860
|
const knownPermissions = new Set(input.permissionCodes.map((permission) => ContractIdentifierSchema.parse(permission)));
|
|
16861
|
+
const completeApplications = new Set(input.missingPagePolicy?.completeApplicationIds.map((id) => ContractIdentifierSchema.parse(id)) ?? []);
|
|
16862
|
+
const unavailableAccess = input.missingPagePolicy ? MenuAccessRequirementSchema.parse(input.missingPagePolicy.unavailableAccess) : void 0;
|
|
16863
|
+
if (unavailableAccess) {
|
|
16864
|
+
validatePermissionCodes(unavailableAccess.permissionAllOf, knownPermissions, "missingPagePolicy.unavailableAccess.permissionAllOf");
|
|
16865
|
+
validatePermissionCodes(unavailableAccess.permissionAnyOf, knownPermissions, "missingPagePolicy.unavailableAccess.permissionAnyOf");
|
|
16866
|
+
}
|
|
16867
|
+
const diagnostics = [];
|
|
16731
16868
|
pages.forEach((registration, index) => {
|
|
16732
16869
|
if (!registration.page.visibility.productContexts.some((context) => context === registration.applicationId)) {
|
|
16733
16870
|
throw new MenuCompilationError(
|
|
@@ -16792,6 +16929,35 @@ var compileMenuRuntimeBundle = (input) => {
|
|
|
16792
16929
|
if (node.behavior.kind === "navigate") {
|
|
16793
16930
|
const registration = pagesByKey.get(pageKey(node.behavior.page));
|
|
16794
16931
|
if (!registration) {
|
|
16932
|
+
if (unavailableAccess && completeApplications.has(node.behavior.page.applicationId)) {
|
|
16933
|
+
const activationId2 = resolveMenuActivationId(node.behavior.page, node.behavior.activationId);
|
|
16934
|
+
const identity2 = targetKey(node.behavior.page, activationId2);
|
|
16935
|
+
const signature2 = stableSerialize2({ ...node.behavior, activationId: activationId2 });
|
|
16936
|
+
const previous = targetSourceSignatures.get(identity2);
|
|
16937
|
+
if (previous !== void 0 && previous !== signature2) {
|
|
16938
|
+
throw new MenuCompilationError("conflicting-navigation-target", `${nodePath}.behavior`, "Missing navigation target has conflicting behavior or input.");
|
|
16939
|
+
}
|
|
16940
|
+
targetSourceSignatures.set(identity2, signature2);
|
|
16941
|
+
if (definition.applicationId === applicationId) {
|
|
16942
|
+
diagnostics.push({
|
|
16943
|
+
code: "missing-page",
|
|
16944
|
+
severity: "warning",
|
|
16945
|
+
applicationId: definition.applicationId,
|
|
16946
|
+
surface: definition.surface,
|
|
16947
|
+
menuId: definition.menuId,
|
|
16948
|
+
nodeId: node.nodeId,
|
|
16949
|
+
page: node.behavior.page,
|
|
16950
|
+
path: `${nodePath}.behavior.page`
|
|
16951
|
+
});
|
|
16952
|
+
}
|
|
16953
|
+
const { requiredPermission: requiredPermission3, behavior: _behavior3, ...presentation3 } = node;
|
|
16954
|
+
return CompiledMenuItemNodeSchema.parse({
|
|
16955
|
+
...presentation3,
|
|
16956
|
+
disabled: true,
|
|
16957
|
+
behavior: { kind: "navigate", page: node.behavior.page, activationId: activationId2 },
|
|
16958
|
+
access: { ...unavailableAccess, requiredPermission: requiredPermission3 }
|
|
16959
|
+
});
|
|
16960
|
+
}
|
|
16795
16961
|
throw new MenuCompilationError(
|
|
16796
16962
|
"unknown-page",
|
|
16797
16963
|
`${nodePath}.behavior.page`,
|
|
@@ -16954,6 +17120,7 @@ var compileMenuRuntimeBundle = (input) => {
|
|
|
16954
17120
|
};
|
|
16955
17121
|
return Object.freeze({
|
|
16956
17122
|
document: deepFreeze2(document),
|
|
17123
|
+
diagnostics: deepFreeze2(diagnostics),
|
|
16957
17124
|
menusByKey,
|
|
16958
17125
|
navigationTargetsByKey: documentTargetsByKey,
|
|
16959
17126
|
serverInputByTargetKey,
|
|
@@ -17957,6 +18124,8 @@ export {
|
|
|
17957
18124
|
MenuRuntimeBundleSchema,
|
|
17958
18125
|
MenuRuntimeInputBindingSchema,
|
|
17959
18126
|
MenuSourceInputBindingSchema,
|
|
18127
|
+
NAVIGATION_UNAVAILABLE_CAPABILITY,
|
|
18128
|
+
NAVIGATION_UNAVAILABLE_CAPABILITY_HEADER,
|
|
17960
18129
|
NavigationGroupNodeSchema,
|
|
17961
18130
|
NavigationNodeSchema,
|
|
17962
18131
|
NavigationReleaseSchema,
|
|
@@ -18091,6 +18260,7 @@ export {
|
|
|
18091
18260
|
TrendRadarCollectionSubjectRefSchema,
|
|
18092
18261
|
TrendSourceRecordSchema,
|
|
18093
18262
|
TrendSourceSchema,
|
|
18263
|
+
UnavailableNavigationTargetSchema,
|
|
18094
18264
|
ValidationIssueType,
|
|
18095
18265
|
ValidationReasonType,
|
|
18096
18266
|
ViewProviderDescriptorSchema,
|
|
@@ -18170,6 +18340,7 @@ export {
|
|
|
18170
18340
|
normalizeStudioAgentMode,
|
|
18171
18341
|
parseApplicationHandoff,
|
|
18172
18342
|
projectAgentSessionEvents,
|
|
18343
|
+
projectNavigationCompatibility,
|
|
18173
18344
|
publishOpenApiToolCapabilityManifests,
|
|
18174
18345
|
readApplicationHandoffFromUrl,
|
|
18175
18346
|
readMenuActivationFromSearch,
|