@inf-monkeys-tech/monkeys 1.0.36 → 1.0.37
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/common.d.ts +2 -1
- package/lib/contracts/common.d.ts.map +1 -1
- package/lib/contracts/common.js.map +1 -1
- package/lib/contracts/index.d.ts +1 -0
- package/lib/contracts/index.d.ts.map +1 -1
- package/lib/contracts/index.js +1 -0
- package/lib/contracts/index.js.map +1 -1
- package/lib/contracts/menu.d.ts +790 -0
- package/lib/contracts/menu.d.ts.map +1 -0
- package/lib/contracts/menu.js +319 -0
- package/lib/contracts/menu.js.map +1 -0
- package/lib/contracts/page.d.ts +6 -0
- package/lib/contracts/page.d.ts.map +1 -1
- package/lib/contracts/page.js +6 -0
- package/lib/contracts/page.js.map +1 -1
- package/lib/contracts/semantic.d.ts +59 -0
- package/lib/contracts/semantic.d.ts.map +1 -1
- package/lib/contracts/semantic.js +2 -0
- package/lib/contracts/semantic.js.map +1 -1
- package/lib/contracts/tenant.d.ts +154 -0
- package/lib/contracts/tenant.d.ts.map +1 -1
- package/lib/contracts/tenant.js +3 -0
- package/lib/contracts/tenant.js.map +1 -1
- package/lib/esm/contracts/index.mjs +1088 -768
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +1614 -771
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +1167 -364
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +1083 -768
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/index.json +3 -0
- package/lib/json-schema/menu-definition-set.schema.json +411 -0
- package/lib/json-schema/menu-definition.schema.json +385 -0
- package/lib/json-schema/menu-runtime-bundle.schema.json +541 -0
- package/lib/json-schema/page-definition.schema.json +14 -0
- package/lib/json-schema/page-runtime-descriptor.schema.json +14 -0
- package/lib/json-schema/product-declaration.schema.json +369 -1
- package/lib/json-schema/tenant-product-config.schema.json +389 -0
- package/lib/json-schema/tenant-runtime-config.schema.json +519 -0
- package/lib/runtime/declaration-compiler.d.ts +2 -0
- package/lib/runtime/declaration-compiler.d.ts.map +1 -1
- package/lib/runtime/declaration-compiler.js +4 -0
- package/lib/runtime/declaration-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 +58 -0
- package/lib/runtime/menu-compiler.d.ts.map +1 -0
- package/lib/runtime/menu-compiler.js +436 -0
- package/lib/runtime/menu-compiler.js.map +1 -0
- package/lib/runtime/tenant-config.d.ts +2 -0
- package/lib/runtime/tenant-config.d.ts.map +1 -1
- package/lib/runtime/tenant-config.js +1 -0
- package/lib/runtime/tenant-config.js.map +1 -1
- package/lib/schemas/index.d.ts +406 -0
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +38 -3
- package/lib/schemas/index.js.map +1 -1
- package/package.json +1 -1
- package/test/fixtures/menu-definition.v1.json +41 -0
|
@@ -8567,7 +8567,7 @@ function toAgentSessionViewModel(projection, snapshot) {
|
|
|
8567
8567
|
}
|
|
8568
8568
|
|
|
8569
8569
|
// src/contracts/semantic.ts
|
|
8570
|
-
import { z as
|
|
8570
|
+
import { z as z9 } from "zod";
|
|
8571
8571
|
|
|
8572
8572
|
// src/contracts/data.ts
|
|
8573
8573
|
import { z as z6 } from "zod";
|
|
@@ -8635,6 +8635,9 @@ var DomainEventSchema = z6.object({
|
|
|
8635
8635
|
occurredAt: IsoDateTimeSchema
|
|
8636
8636
|
}).strict();
|
|
8637
8637
|
|
|
8638
|
+
// src/contracts/menu.ts
|
|
8639
|
+
import { z as z8 } from "zod";
|
|
8640
|
+
|
|
8638
8641
|
// src/contracts/page.ts
|
|
8639
8642
|
import { z as z7 } from "zod";
|
|
8640
8643
|
var PageTypeSchema = z7.enum([
|
|
@@ -8722,6 +8725,9 @@ var PageDefinitionSchema = z7.object({
|
|
|
8722
8725
|
access: z7.object({
|
|
8723
8726
|
actions: z7.array(z7.enum(["read", "write", "execute", "manage-permissions"])).default([])
|
|
8724
8727
|
}).strict(),
|
|
8728
|
+
input: z7.object({
|
|
8729
|
+
schemaRef: ContractIdentifierSchema
|
|
8730
|
+
}).strict().optional(),
|
|
8725
8731
|
rendererConfig: z7.object({
|
|
8726
8732
|
schemaRef: ContractIdentifierSchema,
|
|
8727
8733
|
value: JsonObjectSchema
|
|
@@ -8911,39 +8917,313 @@ var PageRuntimeProjectionSchema = z7.object({
|
|
|
8911
8917
|
}
|
|
8912
8918
|
});
|
|
8913
8919
|
|
|
8920
|
+
// src/contracts/menu.ts
|
|
8921
|
+
var MENU_ACTIVATION_QUERY_PARAMETER = "__menuActivation";
|
|
8922
|
+
var MENU_CONTRACT_VERSION = 1;
|
|
8923
|
+
var MENU_MAX_DEFINITIONS = 128;
|
|
8924
|
+
var MENU_MAX_NODES = 1024;
|
|
8925
|
+
var MENU_MAX_TREE_DEPTH = 16;
|
|
8926
|
+
var MENU_MAX_INPUT_BYTES = 64 * 1024;
|
|
8927
|
+
var MENU_MAX_INPUT_VALUES = 2048;
|
|
8928
|
+
var MenuOrderSchema = z8.number().int().min(-1e6).max(1e6);
|
|
8929
|
+
var inspectJsonValue = (value) => {
|
|
8930
|
+
let maxDepth = 0;
|
|
8931
|
+
let values = 0;
|
|
8932
|
+
const visit = (candidate, depth) => {
|
|
8933
|
+
values += 1;
|
|
8934
|
+
maxDepth = Math.max(maxDepth, depth);
|
|
8935
|
+
if (Array.isArray(candidate)) {
|
|
8936
|
+
candidate.forEach((item) => visit(item, depth + 1));
|
|
8937
|
+
return;
|
|
8938
|
+
}
|
|
8939
|
+
if (candidate && typeof candidate === "object") {
|
|
8940
|
+
Object.values(candidate).forEach((item) => visit(item, depth + 1));
|
|
8941
|
+
}
|
|
8942
|
+
};
|
|
8943
|
+
visit(value, 1);
|
|
8944
|
+
return {
|
|
8945
|
+
bytes: new TextEncoder().encode(JSON.stringify(value)).byteLength,
|
|
8946
|
+
depth: maxDepth,
|
|
8947
|
+
values
|
|
8948
|
+
};
|
|
8949
|
+
};
|
|
8950
|
+
var MenuBoundedInputSchema = JsonObjectSchema.superRefine((value, context) => {
|
|
8951
|
+
const bounds = inspectJsonValue(value);
|
|
8952
|
+
if (bounds.bytes > MENU_MAX_INPUT_BYTES) {
|
|
8953
|
+
context.addIssue({
|
|
8954
|
+
code: "custom",
|
|
8955
|
+
message: `Menu input exceeds ${MENU_MAX_INPUT_BYTES} UTF-8 bytes.`
|
|
8956
|
+
});
|
|
8957
|
+
}
|
|
8958
|
+
if (bounds.depth > MENU_MAX_TREE_DEPTH) {
|
|
8959
|
+
context.addIssue({
|
|
8960
|
+
code: "custom",
|
|
8961
|
+
message: `Menu input exceeds maximum depth ${MENU_MAX_TREE_DEPTH}.`
|
|
8962
|
+
});
|
|
8963
|
+
}
|
|
8964
|
+
if (bounds.values > MENU_MAX_INPUT_VALUES) {
|
|
8965
|
+
context.addIssue({
|
|
8966
|
+
code: "custom",
|
|
8967
|
+
message: `Menu input exceeds ${MENU_MAX_INPUT_VALUES} values.`
|
|
8968
|
+
});
|
|
8969
|
+
}
|
|
8970
|
+
});
|
|
8971
|
+
var MenuPageRefSchema = z8.object({
|
|
8972
|
+
applicationId: ContractIdentifierSchema,
|
|
8973
|
+
pageId: ContractIdentifierSchema
|
|
8974
|
+
}).strict();
|
|
8975
|
+
var MenuSourceInputBindingSchema = z8.discriminatedUnion("exposure", [
|
|
8976
|
+
z8.object({ exposure: z8.literal("client"), value: MenuBoundedInputSchema }).strict(),
|
|
8977
|
+
z8.object({ exposure: z8.literal("server"), value: MenuBoundedInputSchema }).strict()
|
|
8978
|
+
]);
|
|
8979
|
+
var MenuRuntimeInputBindingSchema = z8.discriminatedUnion("exposure", [
|
|
8980
|
+
z8.object({ exposure: z8.literal("client"), value: MenuBoundedInputSchema }).strict(),
|
|
8981
|
+
z8.object({ exposure: z8.literal("server") }).strict()
|
|
8982
|
+
]);
|
|
8983
|
+
var MenuNavigateBehaviorSchema = z8.object({
|
|
8984
|
+
kind: z8.literal("navigate"),
|
|
8985
|
+
page: MenuPageRefSchema,
|
|
8986
|
+
activationId: ContractIdentifierSchema.optional(),
|
|
8987
|
+
input: MenuSourceInputBindingSchema.optional()
|
|
8988
|
+
}).strict();
|
|
8989
|
+
var MenuActionBehaviorSchema = z8.object({
|
|
8990
|
+
kind: z8.literal("action"),
|
|
8991
|
+
actionRef: ContractIdentifierSchema,
|
|
8992
|
+
input: MenuBoundedInputSchema.optional()
|
|
8993
|
+
}).strict();
|
|
8994
|
+
var MenuBehaviorSchema = z8.discriminatedUnion("kind", [
|
|
8995
|
+
MenuNavigateBehaviorSchema,
|
|
8996
|
+
MenuActionBehaviorSchema
|
|
8997
|
+
]);
|
|
8998
|
+
var MenuNodeBaseShape = {
|
|
8999
|
+
nodeId: ContractIdentifierSchema,
|
|
9000
|
+
parentNodeId: ContractIdentifierSchema.optional(),
|
|
9001
|
+
order: MenuOrderSchema
|
|
9002
|
+
};
|
|
9003
|
+
var MenuGroupNodeSchema = z8.object({
|
|
9004
|
+
...MenuNodeBaseShape,
|
|
9005
|
+
kind: z8.literal("group"),
|
|
9006
|
+
label: LocalizedTextSchema.optional(),
|
|
9007
|
+
iconRef: ContractIdentifierSchema.optional()
|
|
9008
|
+
}).strict();
|
|
9009
|
+
var MenuDividerNodeSchema = z8.object({
|
|
9010
|
+
...MenuNodeBaseShape,
|
|
9011
|
+
kind: z8.literal("divider")
|
|
9012
|
+
}).strict();
|
|
9013
|
+
var MenuItemNodeSchema = z8.object({
|
|
9014
|
+
...MenuNodeBaseShape,
|
|
9015
|
+
kind: z8.literal("item"),
|
|
9016
|
+
label: LocalizedTextSchema,
|
|
9017
|
+
iconRef: ContractIdentifierSchema.optional(),
|
|
9018
|
+
tone: z8.enum(["default", "danger"]).optional(),
|
|
9019
|
+
requiredPermission: ContractIdentifierSchema.optional(),
|
|
9020
|
+
behavior: MenuBehaviorSchema
|
|
9021
|
+
}).strict();
|
|
9022
|
+
var MenuNodeSchema = z8.discriminatedUnion("kind", [
|
|
9023
|
+
MenuGroupNodeSchema,
|
|
9024
|
+
MenuDividerNodeSchema,
|
|
9025
|
+
MenuItemNodeSchema
|
|
9026
|
+
]);
|
|
9027
|
+
var MenuContributionSchema = z8.object({
|
|
9028
|
+
providerId: ContractIdentifierSchema,
|
|
9029
|
+
parentNodeId: ContractIdentifierSchema.optional(),
|
|
9030
|
+
order: MenuOrderSchema
|
|
9031
|
+
}).strict();
|
|
9032
|
+
var validateMenuStructure = (menu, context) => {
|
|
9033
|
+
const nodesById = /* @__PURE__ */ new Map();
|
|
9034
|
+
menu.nodes.forEach((node, index) => {
|
|
9035
|
+
if (nodesById.has(node.nodeId)) {
|
|
9036
|
+
context.addIssue({
|
|
9037
|
+
code: "custom",
|
|
9038
|
+
path: ["nodes", index, "nodeId"],
|
|
9039
|
+
message: `Duplicate menu nodeId: ${node.nodeId}`
|
|
9040
|
+
});
|
|
9041
|
+
return;
|
|
9042
|
+
}
|
|
9043
|
+
nodesById.set(node.nodeId, { node, index });
|
|
9044
|
+
});
|
|
9045
|
+
const validateParent = (parentNodeId, path) => {
|
|
9046
|
+
if (!parentNodeId) return;
|
|
9047
|
+
const parent = nodesById.get(parentNodeId);
|
|
9048
|
+
if (!parent) {
|
|
9049
|
+
context.addIssue({ code: "custom", path, message: `Unknown menu parentNodeId: ${parentNodeId}` });
|
|
9050
|
+
return;
|
|
9051
|
+
}
|
|
9052
|
+
if (parent.node.kind !== "group") {
|
|
9053
|
+
context.addIssue({ code: "custom", path, message: `Menu parent ${parentNodeId} must be a group.` });
|
|
9054
|
+
}
|
|
9055
|
+
};
|
|
9056
|
+
menu.nodes.forEach((node, index) => validateParent(node.parentNodeId, ["nodes", index, "parentNodeId"]));
|
|
9057
|
+
menu.contributions.forEach((contribution, index) => validateParent(contribution.parentNodeId, ["contributions", index, "parentNodeId"]));
|
|
9058
|
+
menu.nodes.forEach((node, index) => {
|
|
9059
|
+
const ancestors = /* @__PURE__ */ new Set([node.nodeId]);
|
|
9060
|
+
let parentNodeId = node.parentNodeId;
|
|
9061
|
+
let depth = 1;
|
|
9062
|
+
while (parentNodeId) {
|
|
9063
|
+
if (ancestors.has(parentNodeId)) {
|
|
9064
|
+
context.addIssue({
|
|
9065
|
+
code: "custom",
|
|
9066
|
+
path: ["nodes", index, "parentNodeId"],
|
|
9067
|
+
message: `Menu node cycle contains ${node.nodeId}.`
|
|
9068
|
+
});
|
|
9069
|
+
break;
|
|
9070
|
+
}
|
|
9071
|
+
ancestors.add(parentNodeId);
|
|
9072
|
+
depth += 1;
|
|
9073
|
+
if (depth > MENU_MAX_TREE_DEPTH) {
|
|
9074
|
+
context.addIssue({
|
|
9075
|
+
code: "custom",
|
|
9076
|
+
path: ["nodes", index, "parentNodeId"],
|
|
9077
|
+
message: `Menu tree exceeds maximum depth ${MENU_MAX_TREE_DEPTH}.`
|
|
9078
|
+
});
|
|
9079
|
+
break;
|
|
9080
|
+
}
|
|
9081
|
+
parentNodeId = nodesById.get(parentNodeId)?.node.parentNodeId;
|
|
9082
|
+
}
|
|
9083
|
+
});
|
|
9084
|
+
const contributionKeys = /* @__PURE__ */ new Set();
|
|
9085
|
+
menu.contributions.forEach((contribution, index) => {
|
|
9086
|
+
const key = `${contribution.parentNodeId ?? ""}\0${contribution.providerId}`;
|
|
9087
|
+
if (contributionKeys.has(key)) {
|
|
9088
|
+
context.addIssue({
|
|
9089
|
+
code: "custom",
|
|
9090
|
+
path: ["contributions", index, "providerId"],
|
|
9091
|
+
message: `Duplicate menu contribution provider at parent: ${contribution.providerId}`
|
|
9092
|
+
});
|
|
9093
|
+
}
|
|
9094
|
+
contributionKeys.add(key);
|
|
9095
|
+
});
|
|
9096
|
+
};
|
|
9097
|
+
var MenuDefinitionSchema = z8.object({
|
|
9098
|
+
contract: z8.literal("MenuDefinition"),
|
|
9099
|
+
version: z8.literal(MENU_CONTRACT_VERSION),
|
|
9100
|
+
applicationId: ContractIdentifierSchema,
|
|
9101
|
+
surface: ContractIdentifierSchema,
|
|
9102
|
+
menuId: ContractIdentifierSchema,
|
|
9103
|
+
nodes: z8.array(MenuNodeSchema).max(MENU_MAX_NODES),
|
|
9104
|
+
contributions: z8.array(MenuContributionSchema).max(MENU_MAX_NODES).default([])
|
|
9105
|
+
}).strict().superRefine(validateMenuStructure);
|
|
9106
|
+
var MenuDefinitionSetSchema = z8.union([
|
|
9107
|
+
z8.literal("*"),
|
|
9108
|
+
z8.object({
|
|
9109
|
+
version: z8.literal(MENU_CONTRACT_VERSION),
|
|
9110
|
+
definitions: z8.array(MenuDefinitionSchema).max(MENU_MAX_DEFINITIONS)
|
|
9111
|
+
}).strict()
|
|
9112
|
+
]);
|
|
9113
|
+
var MenuAccessRequirementSchema = z8.object({
|
|
9114
|
+
authenticated: z8.boolean().default(true),
|
|
9115
|
+
permissionAllOf: z8.array(ContractIdentifierSchema).default([]),
|
|
9116
|
+
permissionAnyOf: z8.array(ContractIdentifierSchema).default([]),
|
|
9117
|
+
featureFlags: z8.array(ContractIdentifierSchema).default([])
|
|
9118
|
+
}).strict();
|
|
9119
|
+
var MenuPageRegistrationSchema = z8.object({
|
|
9120
|
+
applicationId: ContractIdentifierSchema,
|
|
9121
|
+
page: PageDefinitionSchema
|
|
9122
|
+
}).strict();
|
|
9123
|
+
var MenuActionRegistrationSchema = z8.object({
|
|
9124
|
+
applicationId: ContractIdentifierSchema,
|
|
9125
|
+
actionRef: ContractIdentifierSchema,
|
|
9126
|
+
inputSchemaRef: ContractIdentifierSchema.optional(),
|
|
9127
|
+
access: MenuAccessRequirementSchema
|
|
9128
|
+
}).strict();
|
|
9129
|
+
var MenuContributionProviderRegistrationSchema = z8.object({
|
|
9130
|
+
applicationId: ContractIdentifierSchema,
|
|
9131
|
+
providerId: ContractIdentifierSchema,
|
|
9132
|
+
surfaces: z8.array(ContractIdentifierSchema).min(1).optional()
|
|
9133
|
+
}).strict();
|
|
9134
|
+
var CompiledMenuNavigateBehaviorSchema = z8.object({
|
|
9135
|
+
kind: z8.literal("navigate"),
|
|
9136
|
+
page: MenuPageRefSchema,
|
|
9137
|
+
activationId: ContractIdentifierSchema,
|
|
9138
|
+
input: MenuRuntimeInputBindingSchema.optional()
|
|
9139
|
+
}).strict();
|
|
9140
|
+
var CompiledMenuActionBehaviorSchema = z8.object({
|
|
9141
|
+
kind: z8.literal("action"),
|
|
9142
|
+
actionRef: ContractIdentifierSchema,
|
|
9143
|
+
input: MenuBoundedInputSchema.optional()
|
|
9144
|
+
}).strict();
|
|
9145
|
+
var CompiledMenuBehaviorSchema = z8.discriminatedUnion("kind", [
|
|
9146
|
+
CompiledMenuNavigateBehaviorSchema,
|
|
9147
|
+
CompiledMenuActionBehaviorSchema
|
|
9148
|
+
]);
|
|
9149
|
+
var CompiledMenuItemAccessSchema = MenuAccessRequirementSchema.extend({
|
|
9150
|
+
requiredPermission: ContractIdentifierSchema.optional()
|
|
9151
|
+
}).strict();
|
|
9152
|
+
var CompiledMenuGroupNodeSchema = MenuGroupNodeSchema;
|
|
9153
|
+
var CompiledMenuDividerNodeSchema = MenuDividerNodeSchema;
|
|
9154
|
+
var CompiledMenuItemNodeSchema = MenuItemNodeSchema.omit({ behavior: true, requiredPermission: true }).extend({
|
|
9155
|
+
behavior: CompiledMenuBehaviorSchema,
|
|
9156
|
+
access: CompiledMenuItemAccessSchema
|
|
9157
|
+
}).strict();
|
|
9158
|
+
var CompiledMenuNodeSchema = z8.discriminatedUnion("kind", [
|
|
9159
|
+
CompiledMenuGroupNodeSchema,
|
|
9160
|
+
CompiledMenuDividerNodeSchema,
|
|
9161
|
+
CompiledMenuItemNodeSchema
|
|
9162
|
+
]);
|
|
9163
|
+
var CompiledMenuProjectionSchema = z8.object({
|
|
9164
|
+
applicationId: ContractIdentifierSchema,
|
|
9165
|
+
surface: ContractIdentifierSchema,
|
|
9166
|
+
menuId: ContractIdentifierSchema,
|
|
9167
|
+
nodes: z8.array(CompiledMenuNodeSchema).max(MENU_MAX_NODES),
|
|
9168
|
+
contributions: z8.array(MenuContributionSchema).max(MENU_MAX_NODES)
|
|
9169
|
+
}).strict();
|
|
9170
|
+
var MenuNavigationTargetSchema = z8.object({
|
|
9171
|
+
page: MenuPageRefSchema,
|
|
9172
|
+
activationId: ContractIdentifierSchema,
|
|
9173
|
+
input: MenuRuntimeInputBindingSchema.optional()
|
|
9174
|
+
}).strict();
|
|
9175
|
+
var MenuRuntimeBundleSchema = z8.object({
|
|
9176
|
+
contract: z8.literal("MenuRuntimeBundle"),
|
|
9177
|
+
version: z8.literal(MENU_CONTRACT_VERSION),
|
|
9178
|
+
applicationId: ContractIdentifierSchema,
|
|
9179
|
+
sourceVersion: ContractIdentifierSchema,
|
|
9180
|
+
contentHash: Sha256Schema,
|
|
9181
|
+
menus: z8.array(CompiledMenuProjectionSchema).max(MENU_MAX_DEFINITIONS),
|
|
9182
|
+
navigationTargets: z8.array(MenuNavigationTargetSchema),
|
|
9183
|
+
sourceMap: z8.record(z8.string(), ContractIdentifierSchema).default({})
|
|
9184
|
+
}).strict();
|
|
9185
|
+
var MenuContributionResultSchema = z8.object({
|
|
9186
|
+
contract: z8.literal("MenuContributionResult"),
|
|
9187
|
+
applicationId: ContractIdentifierSchema,
|
|
9188
|
+
surface: ContractIdentifierSchema,
|
|
9189
|
+
menuId: ContractIdentifierSchema,
|
|
9190
|
+
providerId: ContractIdentifierSchema,
|
|
9191
|
+
nodes: z8.array(CompiledMenuNodeSchema).max(MENU_MAX_NODES)
|
|
9192
|
+
}).strict();
|
|
9193
|
+
|
|
8914
9194
|
// src/contracts/semantic.ts
|
|
8915
|
-
var ConceptRelationshipSchema =
|
|
9195
|
+
var ConceptRelationshipSchema = z9.object({
|
|
8916
9196
|
kind: ContractIdentifierSchema,
|
|
8917
9197
|
targetConceptId: ContractIdentifierSchema,
|
|
8918
|
-
cardinality:
|
|
9198
|
+
cardinality: z9.enum(["one", "optional", "many"])
|
|
8919
9199
|
}).strict();
|
|
8920
|
-
var ConceptDefinitionSchema =
|
|
8921
|
-
contract:
|
|
9200
|
+
var ConceptDefinitionSchema = z9.object({
|
|
9201
|
+
contract: z9.literal("ConceptDefinition"),
|
|
8922
9202
|
conceptId: ContractIdentifierSchema,
|
|
8923
9203
|
ownerRepo: ContractIdentifierSchema,
|
|
8924
|
-
displayName:
|
|
8925
|
-
description:
|
|
9204
|
+
displayName: z9.string().trim().min(1),
|
|
9205
|
+
description: z9.string().optional(),
|
|
8926
9206
|
schemaRef: ContractIdentifierSchema,
|
|
8927
9207
|
ontologyId: ContractIdentifierSchema.optional(),
|
|
8928
|
-
capabilityIds:
|
|
8929
|
-
commandNames:
|
|
8930
|
-
relationships:
|
|
9208
|
+
capabilityIds: z9.array(ContractIdentifierSchema).default([]),
|
|
9209
|
+
commandNames: z9.array(ContractIdentifierSchema).default([]),
|
|
9210
|
+
relationships: z9.array(ConceptRelationshipSchema).default([])
|
|
8931
9211
|
}).strict();
|
|
8932
|
-
var DomainCommandDefinitionSchema =
|
|
8933
|
-
contract:
|
|
9212
|
+
var DomainCommandDefinitionSchema = z9.object({
|
|
9213
|
+
contract: z9.literal("DomainCommandDefinition"),
|
|
8934
9214
|
commandName: ContractIdentifierSchema,
|
|
8935
9215
|
ownerRepo: ContractIdentifierSchema,
|
|
8936
|
-
displayName:
|
|
8937
|
-
description:
|
|
8938
|
-
targetKinds:
|
|
9216
|
+
displayName: z9.string().trim().min(1),
|
|
9217
|
+
description: z9.string().optional(),
|
|
9218
|
+
targetKinds: z9.array(ContractIdentifierSchema).min(1),
|
|
8939
9219
|
inputSchemaRef: ContractIdentifierSchema,
|
|
8940
9220
|
outputSchemaRef: ContractIdentifierSchema.optional(),
|
|
8941
|
-
requiredPermissionCodes:
|
|
9221
|
+
requiredPermissionCodes: z9.array(ContractIdentifierSchema).default([]),
|
|
8942
9222
|
handlerRef: EntityRefSchema,
|
|
8943
|
-
sideEffects:
|
|
9223
|
+
sideEffects: z9.array(z9.enum(["data-write", "execution", "navigation", "notification", "external-call"])).default([])
|
|
8944
9224
|
}).strict();
|
|
8945
|
-
var DomainCommandSchema =
|
|
8946
|
-
contract:
|
|
9225
|
+
var DomainCommandSchema = z9.object({
|
|
9226
|
+
contract: z9.literal("DomainCommand"),
|
|
8947
9227
|
commandId: ContractIdentifierSchema,
|
|
8948
9228
|
commandName: ContractIdentifierSchema,
|
|
8949
9229
|
requestId: ContractIdentifierSchema,
|
|
@@ -8951,29 +9231,30 @@ var DomainCommandSchema = z8.object({
|
|
|
8951
9231
|
idempotencyKey: ContractIdentifierSchema,
|
|
8952
9232
|
targetRef: EntityRefSchema,
|
|
8953
9233
|
actorRef: EntityRefSchema,
|
|
8954
|
-
source:
|
|
8955
|
-
product:
|
|
9234
|
+
source: z9.object({
|
|
9235
|
+
product: z9.enum(["studio", "kernel", "compute", "agent", "mcp", "service"]),
|
|
8956
9236
|
pageId: ContractIdentifierSchema.optional(),
|
|
8957
9237
|
capabilityId: ContractIdentifierSchema.optional()
|
|
8958
9238
|
}).strict(),
|
|
8959
9239
|
payload: JsonObjectSchema,
|
|
8960
9240
|
issuedAt: IsoDateTimeSchema
|
|
8961
9241
|
}).strict();
|
|
8962
|
-
var ProductDeclarationSchema =
|
|
8963
|
-
contract:
|
|
9242
|
+
var ProductDeclarationSchema = z9.object({
|
|
9243
|
+
contract: z9.literal("ProductDeclaration"),
|
|
8964
9244
|
declarationId: ContractIdentifierSchema,
|
|
8965
9245
|
ownerRepo: ContractIdentifierSchema,
|
|
8966
|
-
concepts:
|
|
8967
|
-
ontologies:
|
|
8968
|
-
projections:
|
|
8969
|
-
commands:
|
|
8970
|
-
capabilities:
|
|
8971
|
-
pages:
|
|
9246
|
+
concepts: z9.array(ConceptDefinitionSchema).default([]),
|
|
9247
|
+
ontologies: z9.array(OntologyDefinitionSchema).default([]),
|
|
9248
|
+
projections: z9.array(ProjectionSpecSchema).default([]),
|
|
9249
|
+
commands: z9.array(DomainCommandDefinitionSchema).default([]),
|
|
9250
|
+
capabilities: z9.array(CapabilityManifestSchema).default([]),
|
|
9251
|
+
pages: z9.array(PageDefinitionSchema).default([]),
|
|
9252
|
+
menus: z9.array(MenuDefinitionSchema).default([])
|
|
8972
9253
|
}).strict();
|
|
8973
|
-
var DeclarationGraphEdgeSchema =
|
|
9254
|
+
var DeclarationGraphEdgeSchema = z9.object({
|
|
8974
9255
|
from: EntityRefSchema,
|
|
8975
9256
|
to: EntityRefSchema,
|
|
8976
|
-
relation:
|
|
9257
|
+
relation: z9.enum([
|
|
8977
9258
|
"uses-ontology",
|
|
8978
9259
|
"uses-projection",
|
|
8979
9260
|
"uses-capability",
|
|
@@ -8981,17 +9262,17 @@ var DeclarationGraphEdgeSchema = z8.object({
|
|
|
8981
9262
|
"relates-to-concept"
|
|
8982
9263
|
])
|
|
8983
9264
|
}).strict();
|
|
8984
|
-
var ChangeImpactSchema =
|
|
9265
|
+
var ChangeImpactSchema = z9.object({
|
|
8985
9266
|
changedRef: EntityRefSchema,
|
|
8986
|
-
affectedRefs:
|
|
8987
|
-
reasons:
|
|
9267
|
+
affectedRefs: z9.array(EntityRefSchema),
|
|
9268
|
+
reasons: z9.array(ContractIdentifierSchema).min(1)
|
|
8988
9269
|
}).strict();
|
|
8989
|
-
var ChangeImpactGraphSchema =
|
|
8990
|
-
contract:
|
|
9270
|
+
var ChangeImpactGraphSchema = z9.object({
|
|
9271
|
+
contract: z9.literal("ChangeImpactGraph"),
|
|
8991
9272
|
declarationId: ContractIdentifierSchema,
|
|
8992
|
-
nodes:
|
|
8993
|
-
edges:
|
|
8994
|
-
impacts:
|
|
9273
|
+
nodes: z9.array(EntityRefSchema),
|
|
9274
|
+
edges: z9.array(DeclarationGraphEdgeSchema),
|
|
9275
|
+
impacts: z9.array(ChangeImpactSchema),
|
|
8995
9276
|
generatedAt: IsoDateTimeSchema
|
|
8996
9277
|
}).strict();
|
|
8997
9278
|
|
|
@@ -9134,6 +9415,11 @@ var compileProductDeclaration = (input) => {
|
|
|
9134
9415
|
const commandsByName = uniqueIndex(declaration.commands, (value) => value.commandName, "command name");
|
|
9135
9416
|
const capabilitiesById = uniqueIndex(declaration.capabilities, (value) => value.id, "capability id");
|
|
9136
9417
|
const pagesById = uniqueIndex(declaration.pages, (value) => value.pageId, "page id");
|
|
9418
|
+
const menusByKey = uniqueIndex(
|
|
9419
|
+
declaration.menus,
|
|
9420
|
+
(value) => `${value.applicationId}/${value.surface}/${value.menuId}`,
|
|
9421
|
+
"menu definition"
|
|
9422
|
+
);
|
|
9137
9423
|
const nodes = [];
|
|
9138
9424
|
const edges = [];
|
|
9139
9425
|
const addNode = (kind, id) => nodes.push(ref(kind, id));
|
|
@@ -9148,6 +9434,7 @@ var compileProductDeclaration = (input) => {
|
|
|
9148
9434
|
}
|
|
9149
9435
|
for (const command of declaration.commands) addNode("command", command.commandName);
|
|
9150
9436
|
for (const capability of declaration.capabilities) addNode("capability", capability.id);
|
|
9437
|
+
for (const menu of declaration.menus) addNode("menu", `${menu.applicationId}/${menu.surface}/${menu.menuId}`);
|
|
9151
9438
|
for (const concept of declaration.concepts) {
|
|
9152
9439
|
addNode("concept", concept.conceptId);
|
|
9153
9440
|
if (concept.ontologyId) {
|
|
@@ -9193,6 +9480,7 @@ var compileProductDeclaration = (input) => {
|
|
|
9193
9480
|
commandsByName,
|
|
9194
9481
|
capabilitiesById,
|
|
9195
9482
|
pagesById,
|
|
9483
|
+
menusByKey,
|
|
9196
9484
|
nodes: Object.freeze(nodes),
|
|
9197
9485
|
edges: Object.freeze(edges)
|
|
9198
9486
|
});
|
|
@@ -9271,6 +9559,512 @@ var buildChangeImpactGraph = (previousInput, nextInput, generatedAt = (/* @__PUR
|
|
|
9271
9559
|
});
|
|
9272
9560
|
};
|
|
9273
9561
|
|
|
9562
|
+
// src/runtime/menu-compiler.ts
|
|
9563
|
+
var MenuCompilationError = class extends Error {
|
|
9564
|
+
constructor(code, path, message) {
|
|
9565
|
+
super(`${path}: ${message}`);
|
|
9566
|
+
this.name = "MenuCompilationError";
|
|
9567
|
+
this.code = code;
|
|
9568
|
+
this.path = path;
|
|
9569
|
+
}
|
|
9570
|
+
};
|
|
9571
|
+
var menuKey = (applicationId, surface, menuId) => `${applicationId}\0${surface}\0${menuId}`;
|
|
9572
|
+
var pageKey = (page) => `${page.applicationId}\0${page.pageId}`;
|
|
9573
|
+
var targetKey = (page, activationId) => `${page.applicationId}\0${page.pageId}\0${activationId}`;
|
|
9574
|
+
var actionKey = (applicationId, actionRef) => `${applicationId}\0${actionRef}`;
|
|
9575
|
+
var providerKey = (applicationId, providerId) => `${applicationId}\0${providerId}`;
|
|
9576
|
+
var stableSerialize = (value) => {
|
|
9577
|
+
if (value === void 0) return "null";
|
|
9578
|
+
if (value === null || typeof value !== "object") return JSON.stringify(value) ?? "null";
|
|
9579
|
+
if (Array.isArray(value)) return `[${value.map((item) => stableSerialize(item)).join(",")}]`;
|
|
9580
|
+
const record = value;
|
|
9581
|
+
return `{${Object.keys(record).filter((key) => record[key] !== void 0).sort().map((key) => `${JSON.stringify(key)}:${stableSerialize(record[key])}`).join(",")}}`;
|
|
9582
|
+
};
|
|
9583
|
+
var deepFreeze = (value) => {
|
|
9584
|
+
if (value === null || typeof value !== "object" || Object.isFrozen(value)) return value;
|
|
9585
|
+
Object.values(value).forEach((child) => deepFreeze(child));
|
|
9586
|
+
return Object.freeze(value);
|
|
9587
|
+
};
|
|
9588
|
+
var SHA256_INITIAL = [
|
|
9589
|
+
1779033703,
|
|
9590
|
+
3144134277,
|
|
9591
|
+
1013904242,
|
|
9592
|
+
2773480762,
|
|
9593
|
+
1359893119,
|
|
9594
|
+
2600822924,
|
|
9595
|
+
528734635,
|
|
9596
|
+
1541459225
|
|
9597
|
+
];
|
|
9598
|
+
var SHA256_ROUND = [
|
|
9599
|
+
1116352408,
|
|
9600
|
+
1899447441,
|
|
9601
|
+
3049323471,
|
|
9602
|
+
3921009573,
|
|
9603
|
+
961987163,
|
|
9604
|
+
1508970993,
|
|
9605
|
+
2453635748,
|
|
9606
|
+
2870763221,
|
|
9607
|
+
3624381080,
|
|
9608
|
+
310598401,
|
|
9609
|
+
607225278,
|
|
9610
|
+
1426881987,
|
|
9611
|
+
1925078388,
|
|
9612
|
+
2162078206,
|
|
9613
|
+
2614888103,
|
|
9614
|
+
3248222580,
|
|
9615
|
+
3835390401,
|
|
9616
|
+
4022224774,
|
|
9617
|
+
264347078,
|
|
9618
|
+
604807628,
|
|
9619
|
+
770255983,
|
|
9620
|
+
1249150122,
|
|
9621
|
+
1555081692,
|
|
9622
|
+
1996064986,
|
|
9623
|
+
2554220882,
|
|
9624
|
+
2821834349,
|
|
9625
|
+
2952996808,
|
|
9626
|
+
3210313671,
|
|
9627
|
+
3336571891,
|
|
9628
|
+
3584528711,
|
|
9629
|
+
113926993,
|
|
9630
|
+
338241895,
|
|
9631
|
+
666307205,
|
|
9632
|
+
773529912,
|
|
9633
|
+
1294757372,
|
|
9634
|
+
1396182291,
|
|
9635
|
+
1695183700,
|
|
9636
|
+
1986661051,
|
|
9637
|
+
2177026350,
|
|
9638
|
+
2456956037,
|
|
9639
|
+
2730485921,
|
|
9640
|
+
2820302411,
|
|
9641
|
+
3259730800,
|
|
9642
|
+
3345764771,
|
|
9643
|
+
3516065817,
|
|
9644
|
+
3600352804,
|
|
9645
|
+
4094571909,
|
|
9646
|
+
275423344,
|
|
9647
|
+
430227734,
|
|
9648
|
+
506948616,
|
|
9649
|
+
659060556,
|
|
9650
|
+
883997877,
|
|
9651
|
+
958139571,
|
|
9652
|
+
1322822218,
|
|
9653
|
+
1537002063,
|
|
9654
|
+
1747873779,
|
|
9655
|
+
1955562222,
|
|
9656
|
+
2024104815,
|
|
9657
|
+
2227730452,
|
|
9658
|
+
2361852424,
|
|
9659
|
+
2428436474,
|
|
9660
|
+
2756734187,
|
|
9661
|
+
3204031479,
|
|
9662
|
+
3329325298
|
|
9663
|
+
];
|
|
9664
|
+
var rotateRight = (value, amount) => value >>> amount | value << 32 - amount;
|
|
9665
|
+
var sha256Hex = (value) => {
|
|
9666
|
+
const source = [...new TextEncoder().encode(value)];
|
|
9667
|
+
const bitLength = source.length * 8;
|
|
9668
|
+
source.push(128);
|
|
9669
|
+
while (source.length % 64 !== 56) source.push(0);
|
|
9670
|
+
const high = Math.floor(bitLength / 4294967296);
|
|
9671
|
+
const low = bitLength >>> 0;
|
|
9672
|
+
for (let shift = 24; shift >= 0; shift -= 8) source.push(high >>> shift & 255);
|
|
9673
|
+
for (let shift = 24; shift >= 0; shift -= 8) source.push(low >>> shift & 255);
|
|
9674
|
+
const hash = [...SHA256_INITIAL];
|
|
9675
|
+
const words = new Array(64).fill(0);
|
|
9676
|
+
for (let offset = 0; offset < source.length; offset += 64) {
|
|
9677
|
+
for (let index = 0; index < 16; index += 1) {
|
|
9678
|
+
const start = offset + index * 4;
|
|
9679
|
+
words[index] = (source[start] << 24 | source[start + 1] << 16 | source[start + 2] << 8 | source[start + 3]) >>> 0;
|
|
9680
|
+
}
|
|
9681
|
+
for (let index = 16; index < 64; index += 1) {
|
|
9682
|
+
const previous = words[index - 15];
|
|
9683
|
+
const recent = words[index - 2];
|
|
9684
|
+
const small0 = rotateRight(previous, 7) ^ rotateRight(previous, 18) ^ previous >>> 3;
|
|
9685
|
+
const small1 = rotateRight(recent, 17) ^ rotateRight(recent, 19) ^ recent >>> 10;
|
|
9686
|
+
words[index] = words[index - 16] + small0 + words[index - 7] + small1 >>> 0;
|
|
9687
|
+
}
|
|
9688
|
+
let [a, b, c, d, e, f, g, h] = hash;
|
|
9689
|
+
for (let index = 0; index < 64; index += 1) {
|
|
9690
|
+
const big1 = rotateRight(e, 6) ^ rotateRight(e, 11) ^ rotateRight(e, 25);
|
|
9691
|
+
const choice = e & f ^ ~e & g;
|
|
9692
|
+
const temp1 = h + big1 + choice + SHA256_ROUND[index] + words[index] >>> 0;
|
|
9693
|
+
const big0 = rotateRight(a, 2) ^ rotateRight(a, 13) ^ rotateRight(a, 22);
|
|
9694
|
+
const majority = a & b ^ a & c ^ b & c;
|
|
9695
|
+
const temp2 = big0 + majority >>> 0;
|
|
9696
|
+
h = g;
|
|
9697
|
+
g = f;
|
|
9698
|
+
f = e;
|
|
9699
|
+
e = d + temp1 >>> 0;
|
|
9700
|
+
d = c;
|
|
9701
|
+
c = b;
|
|
9702
|
+
b = a;
|
|
9703
|
+
a = temp1 + temp2 >>> 0;
|
|
9704
|
+
}
|
|
9705
|
+
hash[0] = hash[0] + a >>> 0;
|
|
9706
|
+
hash[1] = hash[1] + b >>> 0;
|
|
9707
|
+
hash[2] = hash[2] + c >>> 0;
|
|
9708
|
+
hash[3] = hash[3] + d >>> 0;
|
|
9709
|
+
hash[4] = hash[4] + e >>> 0;
|
|
9710
|
+
hash[5] = hash[5] + f >>> 0;
|
|
9711
|
+
hash[6] = hash[6] + g >>> 0;
|
|
9712
|
+
hash[7] = hash[7] + h >>> 0;
|
|
9713
|
+
}
|
|
9714
|
+
return hash.map((part) => part.toString(16).padStart(8, "0")).join("");
|
|
9715
|
+
};
|
|
9716
|
+
var uniqueIndex2 = (values, key, path) => {
|
|
9717
|
+
const result = /* @__PURE__ */ new Map();
|
|
9718
|
+
values.forEach((value, index) => {
|
|
9719
|
+
const identity = key(value);
|
|
9720
|
+
if (result.has(identity)) {
|
|
9721
|
+
throw new MenuCompilationError(
|
|
9722
|
+
"duplicate-registration",
|
|
9723
|
+
`${path}[${index}]`,
|
|
9724
|
+
`Duplicate registry identity: ${identity.split("\0").join("/")}`
|
|
9725
|
+
);
|
|
9726
|
+
}
|
|
9727
|
+
result.set(identity, value);
|
|
9728
|
+
});
|
|
9729
|
+
return result;
|
|
9730
|
+
};
|
|
9731
|
+
var normalizedSiblingOrder = (left, right) => left.order - right.order || left.nodeId.localeCompare(right.nodeId);
|
|
9732
|
+
var normalizeNodeOrder = (nodes) => {
|
|
9733
|
+
const childrenByParent = /* @__PURE__ */ new Map();
|
|
9734
|
+
nodes.forEach((node) => {
|
|
9735
|
+
const parent = node.parentNodeId ?? "";
|
|
9736
|
+
const children = childrenByParent.get(parent) ?? [];
|
|
9737
|
+
children.push(node);
|
|
9738
|
+
childrenByParent.set(parent, children);
|
|
9739
|
+
});
|
|
9740
|
+
childrenByParent.forEach((children) => children.sort(normalizedSiblingOrder));
|
|
9741
|
+
const ordered = [];
|
|
9742
|
+
const appendChildren = (parentNodeId) => {
|
|
9743
|
+
for (const node of childrenByParent.get(parentNodeId) ?? []) {
|
|
9744
|
+
ordered.push(node);
|
|
9745
|
+
appendChildren(node.nodeId);
|
|
9746
|
+
}
|
|
9747
|
+
};
|
|
9748
|
+
appendChildren("");
|
|
9749
|
+
return ordered;
|
|
9750
|
+
};
|
|
9751
|
+
var requirementFromPage = (registration) => ({
|
|
9752
|
+
authenticated: registration.page.visibility.authenticated,
|
|
9753
|
+
permissionAllOf: registration.page.visibility.permissionAllOf,
|
|
9754
|
+
permissionAnyOf: registration.page.visibility.permissionAnyOf,
|
|
9755
|
+
featureFlags: registration.page.visibility.featureFlags
|
|
9756
|
+
});
|
|
9757
|
+
var validatePermissionCodes = (permissions, knownPermissions, path) => {
|
|
9758
|
+
permissions.forEach((permission, index) => {
|
|
9759
|
+
if (!knownPermissions.has(permission)) {
|
|
9760
|
+
throw new MenuCompilationError(
|
|
9761
|
+
"unknown-permission",
|
|
9762
|
+
`${path}[${index}]`,
|
|
9763
|
+
`Unknown platform permission: ${permission}`
|
|
9764
|
+
);
|
|
9765
|
+
}
|
|
9766
|
+
});
|
|
9767
|
+
};
|
|
9768
|
+
var validateInput = (value, schemaRef, validators, path) => {
|
|
9769
|
+
if (!schemaRef) {
|
|
9770
|
+
throw new MenuCompilationError(
|
|
9771
|
+
"missing-input-schema",
|
|
9772
|
+
path,
|
|
9773
|
+
"Input is configured but the target has no input schema reference."
|
|
9774
|
+
);
|
|
9775
|
+
}
|
|
9776
|
+
const validator = validators.get(schemaRef);
|
|
9777
|
+
if (!validator) {
|
|
9778
|
+
throw new MenuCompilationError(
|
|
9779
|
+
"unknown-input-schema",
|
|
9780
|
+
path,
|
|
9781
|
+
`No input validator is registered for ${schemaRef}.`
|
|
9782
|
+
);
|
|
9783
|
+
}
|
|
9784
|
+
try {
|
|
9785
|
+
return MenuBoundedInputSchema.parse(validator(value));
|
|
9786
|
+
} catch (error) {
|
|
9787
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
9788
|
+
throw new MenuCompilationError("invalid-input", path, `Input validation failed for ${schemaRef}: ${message}`);
|
|
9789
|
+
}
|
|
9790
|
+
};
|
|
9791
|
+
var evaluateAccess = (item, context) => {
|
|
9792
|
+
const reasons = [];
|
|
9793
|
+
const protectedBySession = item.access.authenticated || item.access.permissionAllOf.length > 0 || item.access.permissionAnyOf.length > 0 || item.access.requiredPermission !== void 0;
|
|
9794
|
+
if (!context.sessionResolved && protectedBySession) reasons.push("session-unresolved");
|
|
9795
|
+
if (item.access.authenticated && !context.authenticated) reasons.push("authentication");
|
|
9796
|
+
const granted = new Set(context.permissionCodes);
|
|
9797
|
+
const elevated = context.isKernelSuperAdmin === true || granted.has("*");
|
|
9798
|
+
if (item.access.permissionAllOf.some((permission) => !granted.has(permission))) {
|
|
9799
|
+
reasons.push("permission-all");
|
|
9800
|
+
}
|
|
9801
|
+
if (item.access.permissionAnyOf.length > 0 && !item.access.permissionAnyOf.some((permission) => granted.has(permission))) {
|
|
9802
|
+
reasons.push("permission-any");
|
|
9803
|
+
}
|
|
9804
|
+
if (!elevated && item.access.requiredPermission && !granted.has(item.access.requiredPermission)) {
|
|
9805
|
+
reasons.push("required-permission");
|
|
9806
|
+
}
|
|
9807
|
+
if (item.access.featureFlags.some((flag) => context.featureFlags[flag] !== true)) {
|
|
9808
|
+
reasons.push("feature-flag");
|
|
9809
|
+
}
|
|
9810
|
+
return Object.freeze({ allowed: reasons.length === 0, reasons: Object.freeze(reasons) });
|
|
9811
|
+
};
|
|
9812
|
+
var resolveMenuActivationId = (page, activationId) => activationId ?? page.pageId;
|
|
9813
|
+
var readMenuActivationFromSearch = (search) => {
|
|
9814
|
+
const params = typeof search === "string" ? new URLSearchParams(search) : search;
|
|
9815
|
+
const value = params.get(MENU_ACTIVATION_QUERY_PARAMETER)?.trim();
|
|
9816
|
+
return value || void 0;
|
|
9817
|
+
};
|
|
9818
|
+
var serializeMenuActivationSearch = (search, page, activationId) => {
|
|
9819
|
+
const params = new URLSearchParams(typeof search === "string" ? search : search.toString());
|
|
9820
|
+
const effectiveActivationId = resolveMenuActivationId(page, activationId);
|
|
9821
|
+
if (effectiveActivationId === page.pageId) params.delete(MENU_ACTIVATION_QUERY_PARAMETER);
|
|
9822
|
+
else params.set(MENU_ACTIVATION_QUERY_PARAMETER, effectiveActivationId);
|
|
9823
|
+
return params.toString();
|
|
9824
|
+
};
|
|
9825
|
+
var isCompiledMenuItemSelected = (item, page, activationId) => item.behavior.kind === "navigate" && pageKey(item.behavior.page) === pageKey(page) && item.behavior.activationId === resolveMenuActivationId(page, activationId);
|
|
9826
|
+
var compileMenuRuntimeBundle = (input) => {
|
|
9827
|
+
const applicationId = ContractIdentifierSchema.parse(input.applicationId);
|
|
9828
|
+
const supportedSurfaces = new Set(input.supportedSurfaces.map((surface) => ContractIdentifierSchema.parse(surface)));
|
|
9829
|
+
const definitions = input.definitions.map((definition) => MenuDefinitionSchema.parse(definition));
|
|
9830
|
+
const pages = input.pages.map((registration) => MenuPageRegistrationSchema.parse(registration));
|
|
9831
|
+
const actions = input.actions.map((registration) => MenuActionRegistrationSchema.parse(registration));
|
|
9832
|
+
const contributionProviders = input.contributionProviders.map((registration) => MenuContributionProviderRegistrationSchema.parse(registration));
|
|
9833
|
+
const inputValidators = input.inputValidators ?? /* @__PURE__ */ new Map();
|
|
9834
|
+
const knownPermissions = new Set(input.permissionCodes.map((permission) => ContractIdentifierSchema.parse(permission)));
|
|
9835
|
+
pages.forEach((registration, index) => {
|
|
9836
|
+
if (!registration.page.visibility.productContexts.some((context) => context === registration.applicationId)) {
|
|
9837
|
+
throw new MenuCompilationError(
|
|
9838
|
+
"invalid-page-application",
|
|
9839
|
+
`pages[${index}].applicationId`,
|
|
9840
|
+
`Page ${registration.page.pageId} is not visible in ${registration.applicationId}.`
|
|
9841
|
+
);
|
|
9842
|
+
}
|
|
9843
|
+
});
|
|
9844
|
+
const pagesByKey = uniqueIndex2(pages, (registration) => pageKey({
|
|
9845
|
+
applicationId: registration.applicationId,
|
|
9846
|
+
pageId: registration.page.pageId
|
|
9847
|
+
}), "pages");
|
|
9848
|
+
const actionsByKey = uniqueIndex2(actions, (registration) => actionKey(
|
|
9849
|
+
registration.applicationId,
|
|
9850
|
+
registration.actionRef
|
|
9851
|
+
), "actions");
|
|
9852
|
+
const providersByKey = uniqueIndex2(contributionProviders, (registration) => providerKey(
|
|
9853
|
+
registration.applicationId,
|
|
9854
|
+
registration.providerId
|
|
9855
|
+
), "contributionProviders");
|
|
9856
|
+
const definitionsByKey = /* @__PURE__ */ new Map();
|
|
9857
|
+
definitions.forEach((definition, index) => {
|
|
9858
|
+
const identity = menuKey(definition.applicationId, definition.surface, definition.menuId);
|
|
9859
|
+
if (definitionsByKey.has(identity)) {
|
|
9860
|
+
throw new MenuCompilationError(
|
|
9861
|
+
"duplicate-definition",
|
|
9862
|
+
`definitions[${index}]`,
|
|
9863
|
+
`Duplicate menu definition: ${definition.applicationId}/${definition.surface}/${definition.menuId}`
|
|
9864
|
+
);
|
|
9865
|
+
}
|
|
9866
|
+
definitionsByKey.set(identity, definition);
|
|
9867
|
+
});
|
|
9868
|
+
const targetSourceSignatures = /* @__PURE__ */ new Map();
|
|
9869
|
+
const navigationTargetsByKey = /* @__PURE__ */ new Map();
|
|
9870
|
+
const serverInputByTargetKey = /* @__PURE__ */ new Map();
|
|
9871
|
+
const requestedTargetKeys = /* @__PURE__ */ new Set();
|
|
9872
|
+
const requestedMenus = [];
|
|
9873
|
+
definitions.forEach((definition, definitionIndex) => {
|
|
9874
|
+
if (definition.applicationId === applicationId && !supportedSurfaces.has(definition.surface)) {
|
|
9875
|
+
throw new MenuCompilationError(
|
|
9876
|
+
"unsupported-surface",
|
|
9877
|
+
`definitions[${definitionIndex}].surface`,
|
|
9878
|
+
`Application ${applicationId} does not support menu surface ${definition.surface}.`
|
|
9879
|
+
);
|
|
9880
|
+
}
|
|
9881
|
+
const compiledNodes = definition.nodes.map((node, nodeIndex) => {
|
|
9882
|
+
if (node.kind !== "item") return node;
|
|
9883
|
+
const nodePath = `definitions[${definitionIndex}].nodes[${nodeIndex}]`;
|
|
9884
|
+
if (node.requiredPermission && !knownPermissions.has(node.requiredPermission)) {
|
|
9885
|
+
throw new MenuCompilationError(
|
|
9886
|
+
"unknown-permission",
|
|
9887
|
+
`${nodePath}.requiredPermission`,
|
|
9888
|
+
`Unknown platform permission: ${node.requiredPermission}`
|
|
9889
|
+
);
|
|
9890
|
+
}
|
|
9891
|
+
let access;
|
|
9892
|
+
if (node.behavior.kind === "navigate") {
|
|
9893
|
+
const registration = pagesByKey.get(pageKey(node.behavior.page));
|
|
9894
|
+
if (!registration) {
|
|
9895
|
+
throw new MenuCompilationError(
|
|
9896
|
+
"unknown-page",
|
|
9897
|
+
`${nodePath}.behavior.page`,
|
|
9898
|
+
`Unknown page reference: ${node.behavior.page.applicationId}/${node.behavior.page.pageId}`
|
|
9899
|
+
);
|
|
9900
|
+
}
|
|
9901
|
+
access = requirementFromPage(registration);
|
|
9902
|
+
validatePermissionCodes(access.permissionAllOf, knownPermissions, `${nodePath}.targetAccess.permissionAllOf`);
|
|
9903
|
+
validatePermissionCodes(access.permissionAnyOf, knownPermissions, `${nodePath}.targetAccess.permissionAnyOf`);
|
|
9904
|
+
const activationId = resolveMenuActivationId(node.behavior.page, node.behavior.activationId);
|
|
9905
|
+
const identity = targetKey(node.behavior.page, activationId);
|
|
9906
|
+
let runtimeInput;
|
|
9907
|
+
let normalizedSourceInput;
|
|
9908
|
+
if (node.behavior.input) {
|
|
9909
|
+
const normalized = validateInput(
|
|
9910
|
+
node.behavior.input.value,
|
|
9911
|
+
registration.page.input?.schemaRef,
|
|
9912
|
+
inputValidators,
|
|
9913
|
+
`${nodePath}.behavior.input.value`
|
|
9914
|
+
);
|
|
9915
|
+
normalizedSourceInput = { exposure: node.behavior.input.exposure, value: normalized };
|
|
9916
|
+
runtimeInput = node.behavior.input.exposure === "client" ? { exposure: "client", value: normalized } : { exposure: "server" };
|
|
9917
|
+
if (node.behavior.input.exposure === "server" && definition.applicationId === applicationId) {
|
|
9918
|
+
serverInputByTargetKey.set(identity, deepFreeze(normalized));
|
|
9919
|
+
}
|
|
9920
|
+
}
|
|
9921
|
+
const signature = stableSerialize({
|
|
9922
|
+
kind: "navigate",
|
|
9923
|
+
page: node.behavior.page,
|
|
9924
|
+
activationId,
|
|
9925
|
+
input: normalizedSourceInput
|
|
9926
|
+
});
|
|
9927
|
+
const existingSignature = targetSourceSignatures.get(identity);
|
|
9928
|
+
if (existingSignature !== void 0 && existingSignature !== signature) {
|
|
9929
|
+
throw new MenuCompilationError(
|
|
9930
|
+
"conflicting-navigation-target",
|
|
9931
|
+
`${nodePath}.behavior`,
|
|
9932
|
+
`Navigation target ${node.behavior.page.applicationId}/${node.behavior.page.pageId}/${activationId} has conflicting behavior or input.`
|
|
9933
|
+
);
|
|
9934
|
+
}
|
|
9935
|
+
targetSourceSignatures.set(identity, signature);
|
|
9936
|
+
if (!navigationTargetsByKey.has(identity)) {
|
|
9937
|
+
navigationTargetsByKey.set(identity, {
|
|
9938
|
+
page: node.behavior.page,
|
|
9939
|
+
activationId,
|
|
9940
|
+
input: runtimeInput
|
|
9941
|
+
});
|
|
9942
|
+
}
|
|
9943
|
+
if (definition.applicationId === applicationId) requestedTargetKeys.add(identity);
|
|
9944
|
+
const { requiredPermission: requiredPermission2, behavior: _behavior2, ...presentation2 } = node;
|
|
9945
|
+
return CompiledMenuItemNodeSchema.parse({
|
|
9946
|
+
...presentation2,
|
|
9947
|
+
behavior: {
|
|
9948
|
+
kind: "navigate",
|
|
9949
|
+
page: node.behavior.page,
|
|
9950
|
+
activationId,
|
|
9951
|
+
input: runtimeInput
|
|
9952
|
+
},
|
|
9953
|
+
access: { ...access, requiredPermission: requiredPermission2 }
|
|
9954
|
+
});
|
|
9955
|
+
}
|
|
9956
|
+
const action = actionsByKey.get(actionKey(definition.applicationId, node.behavior.actionRef));
|
|
9957
|
+
if (!action) {
|
|
9958
|
+
throw new MenuCompilationError(
|
|
9959
|
+
"unknown-action",
|
|
9960
|
+
`${nodePath}.behavior.actionRef`,
|
|
9961
|
+
`Unknown action reference for ${definition.applicationId}: ${node.behavior.actionRef}`
|
|
9962
|
+
);
|
|
9963
|
+
}
|
|
9964
|
+
access = action.access;
|
|
9965
|
+
validatePermissionCodes(access.permissionAllOf, knownPermissions, `${nodePath}.targetAccess.permissionAllOf`);
|
|
9966
|
+
validatePermissionCodes(access.permissionAnyOf, knownPermissions, `${nodePath}.targetAccess.permissionAnyOf`);
|
|
9967
|
+
const actionInput = node.behavior.input ? validateInput(node.behavior.input, action.inputSchemaRef, inputValidators, `${nodePath}.behavior.input`) : void 0;
|
|
9968
|
+
const { requiredPermission, behavior: _behavior, ...presentation } = node;
|
|
9969
|
+
return CompiledMenuItemNodeSchema.parse({
|
|
9970
|
+
...presentation,
|
|
9971
|
+
behavior: { kind: "action", actionRef: node.behavior.actionRef, input: actionInput },
|
|
9972
|
+
access: { ...access, requiredPermission }
|
|
9973
|
+
});
|
|
9974
|
+
});
|
|
9975
|
+
definition.contributions.forEach((contribution, contributionIndex) => {
|
|
9976
|
+
const provider = providersByKey.get(providerKey(definition.applicationId, contribution.providerId));
|
|
9977
|
+
const path = `definitions[${definitionIndex}].contributions[${contributionIndex}].providerId`;
|
|
9978
|
+
if (!provider) {
|
|
9979
|
+
throw new MenuCompilationError(
|
|
9980
|
+
"unknown-contribution-provider",
|
|
9981
|
+
path,
|
|
9982
|
+
`Unknown contribution provider for ${definition.applicationId}: ${contribution.providerId}`
|
|
9983
|
+
);
|
|
9984
|
+
}
|
|
9985
|
+
if (provider.surfaces && !provider.surfaces.includes(definition.surface)) {
|
|
9986
|
+
throw new MenuCompilationError(
|
|
9987
|
+
"unsupported-contribution-surface",
|
|
9988
|
+
path,
|
|
9989
|
+
`Provider ${contribution.providerId} does not support surface ${definition.surface}.`
|
|
9990
|
+
);
|
|
9991
|
+
}
|
|
9992
|
+
});
|
|
9993
|
+
if (definition.applicationId !== applicationId) return;
|
|
9994
|
+
requestedMenus.push(CompiledMenuProjectionSchema.parse({
|
|
9995
|
+
applicationId: definition.applicationId,
|
|
9996
|
+
surface: definition.surface,
|
|
9997
|
+
menuId: definition.menuId,
|
|
9998
|
+
nodes: normalizeNodeOrder(compiledNodes),
|
|
9999
|
+
contributions: [...definition.contributions].sort((left, right) => (left.parentNodeId ?? "").localeCompare(right.parentNodeId ?? "") || left.order - right.order || left.providerId.localeCompare(right.providerId))
|
|
10000
|
+
}));
|
|
10001
|
+
});
|
|
10002
|
+
const menus = requestedMenus.sort((left, right) => left.surface.localeCompare(right.surface) || left.menuId.localeCompare(right.menuId));
|
|
10003
|
+
const navigationTargets = [...requestedTargetKeys].map((identity) => navigationTargetsByKey.get(identity)).filter((target) => target !== void 0).sort((left, right) => left.page.applicationId.localeCompare(right.page.applicationId) || left.page.pageId.localeCompare(right.page.pageId) || left.activationId.localeCompare(right.activationId));
|
|
10004
|
+
const unsignedDocument = {
|
|
10005
|
+
contract: "MenuRuntimeBundle",
|
|
10006
|
+
version: MENU_CONTRACT_VERSION,
|
|
10007
|
+
applicationId,
|
|
10008
|
+
sourceVersion: input.sourceVersion,
|
|
10009
|
+
menus,
|
|
10010
|
+
navigationTargets,
|
|
10011
|
+
sourceMap: Object.fromEntries(
|
|
10012
|
+
Object.entries(input.sourceMap ?? {}).sort(([left], [right]) => left.localeCompare(right))
|
|
10013
|
+
)
|
|
10014
|
+
};
|
|
10015
|
+
const document = MenuRuntimeBundleSchema.parse({
|
|
10016
|
+
...unsignedDocument,
|
|
10017
|
+
contentHash: sha256Hex(stableSerialize(unsignedDocument))
|
|
10018
|
+
});
|
|
10019
|
+
const menusByKey = new Map(document.menus.map((menu) => [
|
|
10020
|
+
menuKey(menu.applicationId, menu.surface, menu.menuId),
|
|
10021
|
+
menu
|
|
10022
|
+
]));
|
|
10023
|
+
const documentTargetsByKey = new Map(document.navigationTargets.map((target) => [
|
|
10024
|
+
targetKey(target.page, target.activationId),
|
|
10025
|
+
target
|
|
10026
|
+
]));
|
|
10027
|
+
const resolveNavigationTarget = (page, explicitActivationId) => {
|
|
10028
|
+
const parsedPage = MenuPageRefSchema.parse(page);
|
|
10029
|
+
if (explicitActivationId !== void 0) {
|
|
10030
|
+
const parsedActivation = ContractIdentifierSchema.safeParse(explicitActivationId);
|
|
10031
|
+
if (!parsedActivation.success) return Object.freeze({ status: "invalid", reason: "invalid-activation" });
|
|
10032
|
+
const target2 = documentTargetsByKey.get(targetKey(parsedPage, parsedActivation.data));
|
|
10033
|
+
if (target2) return Object.freeze({ status: "resolved", target: target2 });
|
|
10034
|
+
const sameActivation = document.navigationTargets.find((candidate) => candidate.page.applicationId === parsedPage.applicationId && candidate.activationId === parsedActivation.data);
|
|
10035
|
+
return Object.freeze({
|
|
10036
|
+
status: "invalid",
|
|
10037
|
+
reason: sameActivation ? "page-mismatch" : "unknown-activation"
|
|
10038
|
+
});
|
|
10039
|
+
}
|
|
10040
|
+
const target = documentTargetsByKey.get(targetKey(parsedPage, parsedPage.pageId));
|
|
10041
|
+
return target ? Object.freeze({ status: "resolved", target }) : Object.freeze({ status: "unmatched" });
|
|
10042
|
+
};
|
|
10043
|
+
return Object.freeze({
|
|
10044
|
+
document: deepFreeze(document),
|
|
10045
|
+
menusByKey,
|
|
10046
|
+
navigationTargetsByKey: documentTargetsByKey,
|
|
10047
|
+
serverInputByTargetKey,
|
|
10048
|
+
evaluateItemAccess: evaluateAccess,
|
|
10049
|
+
resolveNavigationTarget,
|
|
10050
|
+
selectedNodeIds(menu, page, activationId) {
|
|
10051
|
+
if (menu.applicationId !== document.applicationId) return /* @__PURE__ */ new Set();
|
|
10052
|
+
const nodesById = new Map(menu.nodes.map((node) => [node.nodeId, node]));
|
|
10053
|
+
const selected = /* @__PURE__ */ new Set();
|
|
10054
|
+
for (const node of menu.nodes) {
|
|
10055
|
+
if (node.kind !== "item" || !isCompiledMenuItemSelected(node, page, activationId)) continue;
|
|
10056
|
+
selected.add(node.nodeId);
|
|
10057
|
+
let parentNodeId = node.parentNodeId;
|
|
10058
|
+
while (parentNodeId) {
|
|
10059
|
+
selected.add(parentNodeId);
|
|
10060
|
+
parentNodeId = nodesById.get(parentNodeId)?.parentNodeId;
|
|
10061
|
+
}
|
|
10062
|
+
}
|
|
10063
|
+
return selected;
|
|
10064
|
+
}
|
|
10065
|
+
});
|
|
10066
|
+
};
|
|
10067
|
+
|
|
9274
10068
|
// src/runtime/view-provider-registry.ts
|
|
9275
10069
|
var referenceVersion = (version) => version === void 0 ? void 0 : String(version);
|
|
9276
10070
|
var sameStringSet = (left, right) => {
|
|
@@ -9546,7 +10340,7 @@ var compilePageRuntimeProjection = (input) => {
|
|
|
9546
10340
|
const guardsByPageId = unique2(document.guards, (guard) => guard.pageId, "guard pageId");
|
|
9547
10341
|
const renderersByPageId = unique2(document.renderers, (renderer) => renderer.pageId, "renderer pageId");
|
|
9548
10342
|
const matchers = pages.map((page) => ({ page, pattern: routePattern(page.routePath), specificity: routeSpecificity(page.routePath) })).sort((left, right) => right.specificity - left.specificity || left.page.pageId.localeCompare(right.page.pageId));
|
|
9549
|
-
const
|
|
10343
|
+
const evaluateAccess2 = (pageId, context) => {
|
|
9550
10344
|
const guard = guardsByPageId.get(pageId);
|
|
9551
10345
|
if (!guard) throw new Error(`Unknown page guard: ${pageId}`);
|
|
9552
10346
|
const reasons = [];
|
|
@@ -9569,9 +10363,9 @@ var compilePageRuntimeProjection = (input) => {
|
|
|
9569
10363
|
navigationByPageId,
|
|
9570
10364
|
guardsByPageId,
|
|
9571
10365
|
renderersByPageId,
|
|
9572
|
-
evaluateAccess,
|
|
10366
|
+
evaluateAccess: evaluateAccess2,
|
|
9573
10367
|
visibleNavigation(context) {
|
|
9574
|
-
return Object.freeze(document.navigation.filter((item) =>
|
|
10368
|
+
return Object.freeze(document.navigation.filter((item) => evaluateAccess2(item.pageId, context).allowed));
|
|
9575
10369
|
},
|
|
9576
10370
|
matchRoute(pathname) {
|
|
9577
10371
|
const path = pathname.split("?")[0]?.split("#")[0] || "/";
|
|
@@ -9735,10 +10529,10 @@ var compileRenderTree = (input) => {
|
|
|
9735
10529
|
};
|
|
9736
10530
|
|
|
9737
10531
|
// src/contracts/tenant.ts
|
|
9738
|
-
import { z as
|
|
10532
|
+
import { z as z11 } from "zod";
|
|
9739
10533
|
|
|
9740
10534
|
// src/contracts/theme.ts
|
|
9741
|
-
import { z as
|
|
10535
|
+
import { z as z10 } from "zod";
|
|
9742
10536
|
|
|
9743
10537
|
// src/theme-tokens/core.ts
|
|
9744
10538
|
var import_ajv = __toESM(require_ajv());
|
|
@@ -11965,20 +12759,20 @@ function assertMonkeysThemeTokensComplete(input) {
|
|
|
11965
12759
|
}
|
|
11966
12760
|
|
|
11967
12761
|
// src/contracts/theme.ts
|
|
11968
|
-
var ThemeTokenTypeSchema =
|
|
11969
|
-
var ThemeTokenSchema =
|
|
12762
|
+
var ThemeTokenTypeSchema = z10.enum(THEME_TOKEN_TYPES);
|
|
12763
|
+
var ThemeTokenSchema = z10.record(z10.string(), z10.unknown()).superRefine((input, context) => {
|
|
11970
12764
|
const issues = validateThemeTokensDocumentStructure({ token: input });
|
|
11971
12765
|
for (const issue of issues) {
|
|
11972
12766
|
context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
|
|
11973
12767
|
}
|
|
11974
12768
|
});
|
|
11975
|
-
var ThemeTokenGroupSchema =
|
|
12769
|
+
var ThemeTokenGroupSchema = z10.record(z10.string(), z10.unknown()).superRefine((input, context) => {
|
|
11976
12770
|
const issues = validateThemeTokensDocumentStructure(input);
|
|
11977
12771
|
for (const issue of issues) {
|
|
11978
12772
|
context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
|
|
11979
12773
|
}
|
|
11980
12774
|
});
|
|
11981
|
-
var ThemeTokensSchema =
|
|
12775
|
+
var ThemeTokensSchema = z10.record(z10.string(), z10.unknown()).superRefine((input, context) => {
|
|
11982
12776
|
const issues = validateThemeTokensDocument(input);
|
|
11983
12777
|
for (const issue of issues) {
|
|
11984
12778
|
context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
|
|
@@ -12005,9 +12799,9 @@ var ResolvedThemeTokensSchema = ThemeTokensSchema.superRefine((input, context) =
|
|
|
12005
12799
|
});
|
|
12006
12800
|
|
|
12007
12801
|
// src/contracts/tenant.ts
|
|
12008
|
-
var DesignTokenFileSourceSchema =
|
|
12009
|
-
type:
|
|
12010
|
-
path:
|
|
12802
|
+
var DesignTokenFileSourceSchema = z11.object({
|
|
12803
|
+
type: z11.literal("file"),
|
|
12804
|
+
path: z11.string().trim().min(1).superRefine((source, context) => {
|
|
12011
12805
|
if (/^[a-z][a-z\d+.-]*:/i.test(source)) {
|
|
12012
12806
|
context.addIssue({
|
|
12013
12807
|
code: "custom",
|
|
@@ -12016,9 +12810,9 @@ var DesignTokenFileSourceSchema = z10.object({
|
|
|
12016
12810
|
}
|
|
12017
12811
|
})
|
|
12018
12812
|
}).strict();
|
|
12019
|
-
var DesignTokenUrlSourceSchema =
|
|
12020
|
-
type:
|
|
12021
|
-
url:
|
|
12813
|
+
var DesignTokenUrlSourceSchema = z11.object({
|
|
12814
|
+
type: z11.literal("url"),
|
|
12815
|
+
url: z11.string().trim().min(1).superRefine((source, context) => {
|
|
12022
12816
|
if (!/^https?:\/\//i.test(source)) {
|
|
12023
12817
|
context.addIssue({
|
|
12024
12818
|
code: "custom",
|
|
@@ -12027,94 +12821,94 @@ var DesignTokenUrlSourceSchema = z10.object({
|
|
|
12027
12821
|
}
|
|
12028
12822
|
})
|
|
12029
12823
|
}).strict();
|
|
12030
|
-
var DesignTokenInlineSourceSchema =
|
|
12031
|
-
type:
|
|
12824
|
+
var DesignTokenInlineSourceSchema = z11.object({
|
|
12825
|
+
type: z11.literal("inline"),
|
|
12032
12826
|
document: ThemeTokensSchema
|
|
12033
12827
|
}).strict();
|
|
12034
|
-
var DesignTokenSourceSchema =
|
|
12828
|
+
var DesignTokenSourceSchema = z11.discriminatedUnion("type", [
|
|
12035
12829
|
DesignTokenFileSourceSchema,
|
|
12036
12830
|
DesignTokenUrlSourceSchema,
|
|
12037
12831
|
DesignTokenInlineSourceSchema
|
|
12038
12832
|
]);
|
|
12039
|
-
var TenantDesignTokensConfigSchema =
|
|
12833
|
+
var TenantDesignTokensConfigSchema = z11.object({
|
|
12040
12834
|
/** Ordered tenant overrides. The backend always applies the product default first. */
|
|
12041
|
-
tokenSources:
|
|
12835
|
+
tokenSources: z11.array(DesignTokenSourceSchema)
|
|
12042
12836
|
}).strict();
|
|
12043
|
-
var TenantAuthBindingSchema =
|
|
12044
|
-
kind:
|
|
12837
|
+
var TenantAuthBindingSchema = z11.object({
|
|
12838
|
+
kind: z11.literal("auth-provider"),
|
|
12045
12839
|
providerId: ContractIdentifierSchema,
|
|
12046
12840
|
policyRef: ContractIdentifierSchema.optional()
|
|
12047
12841
|
}).strict();
|
|
12048
|
-
var TenantDataBindingSchema =
|
|
12049
|
-
|
|
12050
|
-
kind:
|
|
12842
|
+
var TenantDataBindingSchema = z11.discriminatedUnion("kind", [
|
|
12843
|
+
z11.object({
|
|
12844
|
+
kind: z11.literal("data-provider"),
|
|
12051
12845
|
providerId: ContractIdentifierSchema,
|
|
12052
12846
|
domainRef: ContractIdentifierSchema.optional()
|
|
12053
12847
|
}).strict(),
|
|
12054
|
-
|
|
12055
|
-
kind:
|
|
12848
|
+
z11.object({
|
|
12849
|
+
kind: z11.literal("projection"),
|
|
12056
12850
|
projectionRef: ContractIdentifierSchema,
|
|
12057
12851
|
domainRef: ContractIdentifierSchema.optional()
|
|
12058
12852
|
}).strict()
|
|
12059
12853
|
]);
|
|
12060
|
-
var TenantAuthBindingsSchema =
|
|
12854
|
+
var TenantAuthBindingsSchema = z11.record(
|
|
12061
12855
|
ContractIdentifierSchema,
|
|
12062
12856
|
TenantAuthBindingSchema
|
|
12063
12857
|
);
|
|
12064
|
-
var TenantDataBindingsSchema =
|
|
12858
|
+
var TenantDataBindingsSchema = z11.record(
|
|
12065
12859
|
ContractIdentifierSchema,
|
|
12066
12860
|
TenantDataBindingSchema
|
|
12067
12861
|
);
|
|
12068
|
-
var TenantTrendRadarSourceSchema =
|
|
12862
|
+
var TenantTrendRadarSourceSchema = z11.object({
|
|
12069
12863
|
ontologyId: ContractIdentifierSchema,
|
|
12070
12864
|
viewId: ContractIdentifierSchema
|
|
12071
12865
|
}).strict();
|
|
12072
|
-
var TenantTrendRadarSourcesSchema =
|
|
12866
|
+
var TenantTrendRadarSourcesSchema = z11.object({
|
|
12073
12867
|
hotwords: TenantTrendRadarSourceSchema.optional(),
|
|
12074
12868
|
brands: TenantTrendRadarSourceSchema.optional()
|
|
12075
12869
|
}).strict();
|
|
12076
|
-
var AssetVariantsSchema =
|
|
12077
|
-
light:
|
|
12078
|
-
dark:
|
|
12870
|
+
var AssetVariantsSchema = z11.object({
|
|
12871
|
+
light: z11.string().optional(),
|
|
12872
|
+
dark: z11.string().optional()
|
|
12079
12873
|
}).strict();
|
|
12080
12874
|
var LEGACY_CURRENT_USER_MENU_ITEM_IDS = ["dark-mode", "language", "settings", "logout"];
|
|
12081
12875
|
var CURRENT_USER_MENU_CONTROL_REFS = ["dark-mode", "language"];
|
|
12082
12876
|
var CURRENT_USER_MENU_ACTION_REFS = ["logout"];
|
|
12083
|
-
var CurrentUserMenuIdentifierSchema =
|
|
12084
|
-
var CurrentUserMenuDisplayTextSchema =
|
|
12085
|
-
|
|
12086
|
-
|
|
12877
|
+
var CurrentUserMenuIdentifierSchema = z11.string().trim().regex(/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/, "Expected a stable current-user menu identifier.");
|
|
12878
|
+
var CurrentUserMenuDisplayTextSchema = z11.union([
|
|
12879
|
+
z11.string().trim().min(1),
|
|
12880
|
+
z11.record(z11.string().trim().min(1), z11.string().trim().min(1)).refine((value) => Object.keys(value).length > 0, "Localized menu text must contain at least one locale.")
|
|
12087
12881
|
]);
|
|
12088
|
-
var CurrentUserMenuNavigationItemSchema =
|
|
12882
|
+
var CurrentUserMenuNavigationItemSchema = z11.object({
|
|
12089
12883
|
id: CurrentUserMenuIdentifierSchema,
|
|
12090
|
-
kind:
|
|
12884
|
+
kind: z11.literal("navigation"),
|
|
12091
12885
|
ref: CurrentUserMenuIdentifierSchema
|
|
12092
12886
|
}).strict();
|
|
12093
|
-
var CurrentUserMenuControlItemSchema =
|
|
12887
|
+
var CurrentUserMenuControlItemSchema = z11.object({
|
|
12094
12888
|
id: CurrentUserMenuIdentifierSchema,
|
|
12095
|
-
kind:
|
|
12096
|
-
ref:
|
|
12889
|
+
kind: z11.literal("control"),
|
|
12890
|
+
ref: z11.enum(CURRENT_USER_MENU_CONTROL_REFS)
|
|
12097
12891
|
}).strict();
|
|
12098
|
-
var CurrentUserMenuActionItemSchema =
|
|
12892
|
+
var CurrentUserMenuActionItemSchema = z11.object({
|
|
12099
12893
|
id: CurrentUserMenuIdentifierSchema,
|
|
12100
|
-
kind:
|
|
12101
|
-
ref:
|
|
12102
|
-
tone:
|
|
12894
|
+
kind: z11.literal("action"),
|
|
12895
|
+
ref: z11.enum(CURRENT_USER_MENU_ACTION_REFS),
|
|
12896
|
+
tone: z11.enum(["default", "danger"]).optional()
|
|
12103
12897
|
}).strict();
|
|
12104
|
-
var CurrentUserMenuItemSchema =
|
|
12898
|
+
var CurrentUserMenuItemSchema = z11.discriminatedUnion("kind", [
|
|
12105
12899
|
CurrentUserMenuNavigationItemSchema,
|
|
12106
12900
|
CurrentUserMenuControlItemSchema,
|
|
12107
12901
|
CurrentUserMenuActionItemSchema
|
|
12108
12902
|
]);
|
|
12109
|
-
var CurrentUserMenuSectionSchema =
|
|
12903
|
+
var CurrentUserMenuSectionSchema = z11.object({
|
|
12110
12904
|
id: CurrentUserMenuIdentifierSchema,
|
|
12111
12905
|
label: CurrentUserMenuDisplayTextSchema.optional(),
|
|
12112
|
-
dividerBefore:
|
|
12113
|
-
items:
|
|
12906
|
+
dividerBefore: z11.boolean().optional(),
|
|
12907
|
+
items: z11.array(CurrentUserMenuItemSchema)
|
|
12114
12908
|
}).strict();
|
|
12115
|
-
var CurrentUserMenuConfigSchema =
|
|
12116
|
-
version:
|
|
12117
|
-
sections:
|
|
12909
|
+
var CurrentUserMenuConfigSchema = z11.object({
|
|
12910
|
+
version: z11.literal(1),
|
|
12911
|
+
sections: z11.array(CurrentUserMenuSectionSchema).max(20)
|
|
12118
12912
|
}).strict().superRefine((value, context) => {
|
|
12119
12913
|
const sectionIds = /* @__PURE__ */ new Set();
|
|
12120
12914
|
const itemIds = /* @__PURE__ */ new Set();
|
|
@@ -12148,7 +12942,7 @@ var CurrentUserMenuConfigSchema = z10.object({
|
|
|
12148
12942
|
});
|
|
12149
12943
|
}
|
|
12150
12944
|
});
|
|
12151
|
-
var LegacyCurrentUserMenuProfileSchema =
|
|
12945
|
+
var LegacyCurrentUserMenuProfileSchema = z11.array(z11.enum(LEGACY_CURRENT_USER_MENU_ITEM_IDS)).superRefine((value, context) => {
|
|
12152
12946
|
const seen = /* @__PURE__ */ new Set();
|
|
12153
12947
|
value.forEach((item, index) => {
|
|
12154
12948
|
if (seen.has(item)) {
|
|
@@ -12161,73 +12955,73 @@ var LegacyCurrentUserMenuProfileSchema = z10.array(z10.enum(LEGACY_CURRENT_USER_
|
|
|
12161
12955
|
seen.add(item);
|
|
12162
12956
|
});
|
|
12163
12957
|
});
|
|
12164
|
-
var CurrentUserMenuProfileSchema =
|
|
12165
|
-
|
|
12958
|
+
var CurrentUserMenuProfileSchema = z11.union([
|
|
12959
|
+
z11.literal("*"),
|
|
12166
12960
|
LegacyCurrentUserMenuProfileSchema,
|
|
12167
12961
|
CurrentUserMenuConfigSchema
|
|
12168
12962
|
]);
|
|
12169
|
-
var ThemeHeadbarSchema =
|
|
12170
|
-
theme:
|
|
12171
|
-
navPosition:
|
|
12172
|
-
actions:
|
|
12963
|
+
var ThemeHeadbarSchema = z11.object({
|
|
12964
|
+
theme: z11.enum(["card", "glassy", "ghost"]).optional(),
|
|
12965
|
+
navPosition: z11.enum(["left", "center", "right"]).optional(),
|
|
12966
|
+
actions: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]).optional(),
|
|
12173
12967
|
profile: CurrentUserMenuProfileSchema.optional(),
|
|
12174
|
-
showTeamQuota:
|
|
12968
|
+
showTeamQuota: z11.boolean().optional()
|
|
12175
12969
|
}).strict();
|
|
12176
|
-
var TenantHeadbarModuleLeafSchema =
|
|
12970
|
+
var TenantHeadbarModuleLeafSchema = z11.object({
|
|
12177
12971
|
id: ContractIdentifierSchema,
|
|
12178
|
-
extraInfo:
|
|
12179
|
-
displayName:
|
|
12180
|
-
visible:
|
|
12181
|
-
disabled:
|
|
12182
|
-
icon:
|
|
12183
|
-
showQuickSwitcher:
|
|
12184
|
-
showSidebar:
|
|
12185
|
-
showContentFrame:
|
|
12972
|
+
extraInfo: z11.boolean().optional(),
|
|
12973
|
+
displayName: z11.union([z11.string(), z11.record(LocaleIdentifierSchema, z11.string())]).optional(),
|
|
12974
|
+
visible: z11.boolean().optional(),
|
|
12975
|
+
disabled: z11.boolean().optional(),
|
|
12976
|
+
icon: z11.string().optional(),
|
|
12977
|
+
showQuickSwitcher: z11.boolean().optional(),
|
|
12978
|
+
showSidebar: z11.boolean().optional(),
|
|
12979
|
+
showContentFrame: z11.boolean().optional()
|
|
12186
12980
|
}).strict();
|
|
12187
12981
|
var TenantHeadbarModuleItemSchema = TenantHeadbarModuleLeafSchema.extend({
|
|
12188
|
-
children:
|
|
12982
|
+
children: z11.array(TenantHeadbarModuleLeafSchema).optional()
|
|
12189
12983
|
}).strict();
|
|
12190
|
-
var KernelHeadbarSchema =
|
|
12191
|
-
theme:
|
|
12192
|
-
layoutMode:
|
|
12193
|
-
heightPx:
|
|
12194
|
-
navPosition:
|
|
12195
|
-
brandTitle:
|
|
12196
|
-
menuRadius:
|
|
12984
|
+
var KernelHeadbarSchema = z11.object({
|
|
12985
|
+
theme: z11.literal("card").optional(),
|
|
12986
|
+
layoutMode: z11.enum(["boxed", "full-bleed"]).optional(),
|
|
12987
|
+
heightPx: z11.number().positive().optional(),
|
|
12988
|
+
navPosition: z11.enum(["left", "center", "right"]).optional(),
|
|
12989
|
+
brandTitle: z11.string().optional(),
|
|
12990
|
+
menuRadius: z11.enum(["default", "none", "sm", "md", "lg", "xl", "full"]).optional()
|
|
12197
12991
|
}).strict();
|
|
12198
|
-
var CustomIconSchema =
|
|
12199
|
-
color:
|
|
12200
|
-
url:
|
|
12201
|
-
type:
|
|
12202
|
-
hintTextColor:
|
|
12992
|
+
var CustomIconSchema = z11.object({
|
|
12993
|
+
color: z11.string().optional(),
|
|
12994
|
+
url: z11.string().optional(),
|
|
12995
|
+
type: z11.enum(["svg", "image"]).optional(),
|
|
12996
|
+
hintTextColor: z11.string().optional()
|
|
12203
12997
|
}).strict();
|
|
12204
|
-
var WorkbenchCustomerToolSchema =
|
|
12998
|
+
var WorkbenchCustomerToolSchema = z11.object({
|
|
12205
12999
|
id: ContractIdentifierSchema,
|
|
12206
|
-
label:
|
|
12207
|
-
fixed:
|
|
13000
|
+
label: z11.union([z11.string(), z11.record(LocaleIdentifierSchema, z11.string())]).optional(),
|
|
13001
|
+
fixed: z11.boolean().optional()
|
|
12208
13002
|
}).strict();
|
|
12209
|
-
var WorkbenchStudioOverrideSchema =
|
|
12210
|
-
studioName:
|
|
12211
|
-
dropdownToolsDefault:
|
|
12212
|
-
existingToolsDefault:
|
|
12213
|
-
historyColumnsDefault:
|
|
13003
|
+
var WorkbenchStudioOverrideSchema = z11.object({
|
|
13004
|
+
studioName: z11.string().trim().min(1),
|
|
13005
|
+
dropdownToolsDefault: z11.array(ContractIdentifierSchema).optional(),
|
|
13006
|
+
existingToolsDefault: z11.array(ContractIdentifierSchema).optional(),
|
|
13007
|
+
historyColumnsDefault: z11.number().int().min(1).max(6).optional()
|
|
12214
13008
|
}).strict();
|
|
12215
|
-
var TenantWorkbenchPageContextSchema =
|
|
13009
|
+
var TenantWorkbenchPageContextSchema = z11.object({
|
|
12216
13010
|
workflow: JsonObjectSchema.optional(),
|
|
12217
13011
|
agent: JsonObjectSchema.optional(),
|
|
12218
13012
|
agentId: ContractIdentifierSchema.optional(),
|
|
12219
13013
|
designProject: JsonObjectSchema.optional(),
|
|
12220
13014
|
designMetadataId: ContractIdentifierSchema.optional(),
|
|
12221
|
-
iframeUrl:
|
|
12222
|
-
info:
|
|
13015
|
+
iframeUrl: z11.string().trim().min(1).optional(),
|
|
13016
|
+
info: z11.object({
|
|
12223
13017
|
displayName: LocalizedTextSchema.optional(),
|
|
12224
13018
|
description: LocalizedTextSchema.optional(),
|
|
12225
|
-
iconUrl:
|
|
13019
|
+
iconUrl: z11.string().trim().min(1).optional()
|
|
12226
13020
|
}).strict().optional(),
|
|
12227
|
-
isBuiltinPinned:
|
|
12228
|
-
isBuiltinReadonly:
|
|
13021
|
+
isBuiltinPinned: z11.boolean().optional(),
|
|
13022
|
+
isBuiltinReadonly: z11.boolean().optional()
|
|
12229
13023
|
}).strict();
|
|
12230
|
-
var TenantWorkbenchPageEnvelopeSchema =
|
|
13024
|
+
var TenantWorkbenchPageEnvelopeSchema = z11.object({
|
|
12231
13025
|
definition: PageDefinitionSchema,
|
|
12232
13026
|
context: TenantWorkbenchPageContextSchema
|
|
12233
13027
|
}).strict().superRefine(({ definition }, context) => {
|
|
@@ -12260,56 +13054,56 @@ var TenantWorkbenchPageEnvelopeSchema = z10.object({
|
|
|
12260
13054
|
});
|
|
12261
13055
|
}
|
|
12262
13056
|
});
|
|
12263
|
-
var TenantWorkbenchPageGroupSchema =
|
|
13057
|
+
var TenantWorkbenchPageGroupSchema = z11.object({
|
|
12264
13058
|
id: ContractIdentifierSchema,
|
|
12265
|
-
pageIds:
|
|
13059
|
+
pageIds: z11.array(ContractIdentifierSchema),
|
|
12266
13060
|
displayName: LocalizedTextSchema,
|
|
12267
|
-
isBuiltIn:
|
|
12268
|
-
iconUrl:
|
|
12269
|
-
sortIndex:
|
|
13061
|
+
isBuiltIn: z11.boolean(),
|
|
13062
|
+
iconUrl: z11.string().optional(),
|
|
13063
|
+
sortIndex: z11.number().int().nullable().optional(),
|
|
12270
13064
|
presetRelationId: ContractIdentifierSchema.optional(),
|
|
12271
13065
|
relationKey: ContractIdentifierSchema.nullable().optional(),
|
|
12272
13066
|
studioId: ContractIdentifierSchema.optional()
|
|
12273
13067
|
}).strict();
|
|
12274
|
-
var TenantWorkbenchConfigSchema =
|
|
12275
|
-
pages:
|
|
12276
|
-
pageGroups:
|
|
12277
|
-
catalog:
|
|
12278
|
-
quickSwitcherMaxItems:
|
|
12279
|
-
defaultOrder:
|
|
12280
|
-
groups:
|
|
12281
|
-
pages:
|
|
13068
|
+
var TenantWorkbenchConfigSchema = z11.object({
|
|
13069
|
+
pages: z11.array(TenantWorkbenchPageEnvelopeSchema),
|
|
13070
|
+
pageGroups: z11.array(TenantWorkbenchPageGroupSchema),
|
|
13071
|
+
catalog: z11.object({ enabled: z11.boolean().optional(), defaultEntry: z11.boolean().optional() }).strict().optional(),
|
|
13072
|
+
quickSwitcherMaxItems: z11.number().int().nonnegative().optional(),
|
|
13073
|
+
defaultOrder: z11.object({
|
|
13074
|
+
groups: z11.array(ContractIdentifierSchema),
|
|
13075
|
+
pages: z11.record(ContractIdentifierSchema, z11.array(ContractIdentifierSchema))
|
|
12282
13076
|
}).strict().optional(),
|
|
12283
|
-
customers:
|
|
12284
|
-
dropdownToolsDefault:
|
|
12285
|
-
layoutManagerTools:
|
|
12286
|
-
studioTabsMode:
|
|
12287
|
-
historyWatermark:
|
|
12288
|
-
svgUrl:
|
|
12289
|
-
coverage:
|
|
12290
|
-
maxLongEdgeRatio:
|
|
12291
|
-
sizing:
|
|
13077
|
+
customers: z11.object({
|
|
13078
|
+
dropdownToolsDefault: z11.array(ContractIdentifierSchema).optional(),
|
|
13079
|
+
layoutManagerTools: z11.array(WorkbenchCustomerToolSchema).optional(),
|
|
13080
|
+
studioTabsMode: z11.enum(["dropdown", "tabs"]).optional(),
|
|
13081
|
+
historyWatermark: z11.object({
|
|
13082
|
+
svgUrl: z11.string().optional(),
|
|
13083
|
+
coverage: z11.array(z11.enum(["list", "detail", "download"])).optional(),
|
|
13084
|
+
maxLongEdgeRatio: z11.number().positive().optional(),
|
|
13085
|
+
sizing: z11.object({
|
|
12292
13086
|
mode: ContractIdentifierSchema,
|
|
12293
|
-
heightRatio:
|
|
12294
|
-
minHeightPx:
|
|
12295
|
-
maxHeightPx:
|
|
13087
|
+
heightRatio: z11.number().positive().optional(),
|
|
13088
|
+
minHeightPx: z11.number().nonnegative().optional(),
|
|
13089
|
+
maxHeightPx: z11.number().nonnegative().optional()
|
|
12296
13090
|
}).strict().optional(),
|
|
12297
|
-
enhance:
|
|
12298
|
-
enabled:
|
|
12299
|
-
backgroundLumaThreshold:
|
|
12300
|
-
stroke:
|
|
12301
|
-
color:
|
|
12302
|
-
opacity:
|
|
12303
|
-
widthRatio:
|
|
12304
|
-
blurRatio:
|
|
12305
|
-
steps:
|
|
13091
|
+
enhance: z11.object({
|
|
13092
|
+
enabled: z11.boolean().optional(),
|
|
13093
|
+
backgroundLumaThreshold: z11.number().min(0).max(1).optional(),
|
|
13094
|
+
stroke: z11.object({
|
|
13095
|
+
color: z11.string().optional(),
|
|
13096
|
+
opacity: z11.number().min(0).max(1).optional(),
|
|
13097
|
+
widthRatio: z11.number().nonnegative().optional(),
|
|
13098
|
+
blurRatio: z11.number().nonnegative().optional(),
|
|
13099
|
+
steps: z11.number().int().positive().optional()
|
|
12306
13100
|
}).strict().optional()
|
|
12307
13101
|
}).strict().optional()
|
|
12308
13102
|
}).strict().optional(),
|
|
12309
|
-
layoutManagerEnabled:
|
|
12310
|
-
existingToolsDefault:
|
|
12311
|
-
historyColumnsDefault:
|
|
12312
|
-
studioOverrides:
|
|
13103
|
+
layoutManagerEnabled: z11.boolean().optional(),
|
|
13104
|
+
existingToolsDefault: z11.array(ContractIdentifierSchema).optional(),
|
|
13105
|
+
historyColumnsDefault: z11.number().int().min(1).max(6).optional(),
|
|
13106
|
+
studioOverrides: z11.array(WorkbenchStudioOverrideSchema).optional()
|
|
12313
13107
|
}).strict().optional()
|
|
12314
13108
|
}).strict().superRefine(({ pages, pageGroups }, context) => {
|
|
12315
13109
|
const pageIds = pages.map(({ definition }) => definition.pageId);
|
|
@@ -12333,38 +13127,38 @@ var TenantWorkbenchConfigSchema = z10.object({
|
|
|
12333
13127
|
});
|
|
12334
13128
|
});
|
|
12335
13129
|
});
|
|
12336
|
-
var LoginPageSchema =
|
|
12337
|
-
background:
|
|
12338
|
-
logo:
|
|
12339
|
-
url:
|
|
12340
|
-
lightUrl:
|
|
12341
|
-
darkUrl:
|
|
12342
|
-
position:
|
|
12343
|
-
scale:
|
|
13130
|
+
var LoginPageSchema = z11.object({
|
|
13131
|
+
background: z11.object({ imageUrl: z11.string().optional(), gradient: z11.string().optional() }).strict().optional(),
|
|
13132
|
+
logo: z11.object({
|
|
13133
|
+
url: z11.string().optional(),
|
|
13134
|
+
lightUrl: z11.string().optional(),
|
|
13135
|
+
darkUrl: z11.string().optional(),
|
|
13136
|
+
position: z11.enum(["top", "middle", "bottom"]).optional(),
|
|
13137
|
+
scale: z11.number().positive().optional()
|
|
12344
13138
|
}).strict().optional(),
|
|
12345
|
-
customCss:
|
|
13139
|
+
customCss: z11.string().optional()
|
|
12346
13140
|
}).strict();
|
|
12347
13141
|
var LandingPageHeadbarConfigShape = {
|
|
12348
|
-
headbarMode:
|
|
13142
|
+
headbarMode: z11.enum(["shared", "hidden"]).optional()
|
|
12349
13143
|
};
|
|
12350
|
-
var LandingPageDefaultConfigSchema =
|
|
12351
|
-
mode:
|
|
13144
|
+
var LandingPageDefaultConfigSchema = z11.object({
|
|
13145
|
+
mode: z11.literal("default"),
|
|
12352
13146
|
...LandingPageHeadbarConfigShape
|
|
12353
13147
|
}).strict();
|
|
12354
|
-
var LandingPageMarkdownConfigSchema =
|
|
12355
|
-
mode:
|
|
12356
|
-
content:
|
|
13148
|
+
var LandingPageMarkdownConfigSchema = z11.object({
|
|
13149
|
+
mode: z11.literal("markdown"),
|
|
13150
|
+
content: z11.string(),
|
|
12357
13151
|
...LandingPageHeadbarConfigShape
|
|
12358
13152
|
}).strict();
|
|
12359
|
-
var LandingPageHtmlConfigSchema =
|
|
12360
|
-
mode:
|
|
12361
|
-
content:
|
|
13153
|
+
var LandingPageHtmlConfigSchema = z11.object({
|
|
13154
|
+
mode: z11.literal("html"),
|
|
13155
|
+
content: z11.string(),
|
|
12362
13156
|
...LandingPageHeadbarConfigShape
|
|
12363
13157
|
}).strict();
|
|
12364
|
-
var LandingPageIframeConfigSchema =
|
|
12365
|
-
mode:
|
|
13158
|
+
var LandingPageIframeConfigSchema = z11.object({
|
|
13159
|
+
mode: z11.literal("iframe"),
|
|
12366
13160
|
...LandingPageHeadbarConfigShape,
|
|
12367
|
-
url:
|
|
13161
|
+
url: z11.string().refine((value) => {
|
|
12368
13162
|
if (/^\/(?!\/)/.test(value)) {
|
|
12369
13163
|
return !value.includes("\\");
|
|
12370
13164
|
}
|
|
@@ -12376,243 +13170,245 @@ var LandingPageIframeConfigSchema = z10.object({
|
|
|
12376
13170
|
}
|
|
12377
13171
|
}, "Landing page iframe URL must use a root-relative path or HTTP(S) without embedded credentials.")
|
|
12378
13172
|
}).strict();
|
|
12379
|
-
var TenantLandingPageConfigSchema =
|
|
13173
|
+
var TenantLandingPageConfigSchema = z11.discriminatedUnion("mode", [
|
|
12380
13174
|
LandingPageDefaultConfigSchema,
|
|
12381
13175
|
LandingPageMarkdownConfigSchema,
|
|
12382
13176
|
LandingPageHtmlConfigSchema,
|
|
12383
13177
|
LandingPageIframeConfigSchema
|
|
12384
13178
|
]);
|
|
12385
|
-
var TenantApplicationConfigSchema =
|
|
12386
|
-
theme:
|
|
12387
|
-
id:
|
|
12388
|
-
name:
|
|
12389
|
-
title:
|
|
13179
|
+
var TenantApplicationConfigSchema = z11.object({
|
|
13180
|
+
theme: z11.object({
|
|
13181
|
+
id: z11.string().optional(),
|
|
13182
|
+
name: z11.string().optional(),
|
|
13183
|
+
title: z11.string().optional(),
|
|
12390
13184
|
favicon: AssetVariantsSchema.optional(),
|
|
12391
13185
|
logo: AssetVariantsSchema.optional(),
|
|
12392
|
-
pwaIcon:
|
|
12393
|
-
form:
|
|
12394
|
-
toast:
|
|
12395
|
-
position:
|
|
13186
|
+
pwaIcon: z11.string().optional(),
|
|
13187
|
+
form: z11.object({ variant: z11.enum(["bento", "ghost"]) }).strict().optional(),
|
|
13188
|
+
toast: z11.object({
|
|
13189
|
+
position: z11.enum(["top-right", "top-left", "bottom-right", "bottom-left", "top-center", "bottom-center"])
|
|
12396
13190
|
}).strict().optional(),
|
|
12397
|
-
icons:
|
|
12398
|
-
views:
|
|
12399
|
-
form:
|
|
12400
|
-
toast:
|
|
12401
|
-
progress:
|
|
12402
|
-
onlyResult:
|
|
12403
|
-
tabular:
|
|
13191
|
+
icons: z11.object({ error: CustomIconSchema.optional(), empty: CustomIconSchema.optional() }).strict().optional(),
|
|
13192
|
+
views: z11.object({
|
|
13193
|
+
form: z11.object({
|
|
13194
|
+
toast: z11.object({ afterCreate: z11.boolean(), afterDelete: z11.boolean() }).strict(),
|
|
13195
|
+
progress: z11.enum(["estimate", "infinite"]),
|
|
13196
|
+
onlyResult: z11.boolean(),
|
|
13197
|
+
tabular: z11.object({ theme: z11.enum(["default", "tentiary", "primary"]) }).strict()
|
|
12404
13198
|
}).strict()
|
|
12405
13199
|
}).strict().optional(),
|
|
12406
13200
|
loginPage: LoginPageSchema.optional(),
|
|
12407
|
-
extraLanguageURL:
|
|
12408
|
-
hideSpaceHeader:
|
|
12409
|
-
showSidebarTeamSelector:
|
|
12410
|
-
showWorkbenchSidebar:
|
|
12411
|
-
workbenchViewTheme:
|
|
12412
|
-
defaults:
|
|
12413
|
-
showFormInImageDetail:
|
|
12414
|
-
darkMode:
|
|
12415
|
-
language:
|
|
12416
|
-
showDarkModeToggle:
|
|
12417
|
-
showLanguageToggle:
|
|
13201
|
+
extraLanguageURL: z11.record(z11.string(), z11.string()).optional(),
|
|
13202
|
+
hideSpaceHeader: z11.boolean().optional(),
|
|
13203
|
+
showSidebarTeamSelector: z11.boolean().optional(),
|
|
13204
|
+
showWorkbenchSidebar: z11.boolean().optional(),
|
|
13205
|
+
workbenchViewTheme: z11.enum(["default", "bsd-blue"]).optional(),
|
|
13206
|
+
defaults: z11.object({
|
|
13207
|
+
showFormInImageDetail: z11.boolean().optional(),
|
|
13208
|
+
darkMode: z11.enum(["light", "dark", "auto"]).optional(),
|
|
13209
|
+
language: z11.enum(["en-US", "zh-CN", "ja-JP"]).optional(),
|
|
13210
|
+
showDarkModeToggle: z11.boolean().optional(),
|
|
13211
|
+
showLanguageToggle: z11.boolean().optional()
|
|
12418
13212
|
}).strict().optional(),
|
|
12419
|
-
modules:
|
|
12420
|
-
monkeysSpaceSidebar:
|
|
12421
|
-
monkeysSpaceHeadbar:
|
|
12422
|
-
|
|
12423
|
-
|
|
13213
|
+
modules: z11.object({
|
|
13214
|
+
monkeysSpaceSidebar: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]).optional(),
|
|
13215
|
+
monkeysSpaceHeadbar: z11.union([
|
|
13216
|
+
z11.literal("*"),
|
|
13217
|
+
z11.array(TenantHeadbarModuleItemSchema)
|
|
12424
13218
|
]).optional(),
|
|
12425
|
-
settingsSidebar:
|
|
13219
|
+
settingsSidebar: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]).optional()
|
|
12426
13220
|
}).strict().optional(),
|
|
12427
13221
|
headbar: ThemeHeadbarSchema.optional(),
|
|
12428
|
-
kernelLayout:
|
|
12429
|
-
navigationMode:
|
|
12430
|
-
allowNavigationModeSwitch:
|
|
13222
|
+
kernelLayout: z11.object({
|
|
13223
|
+
navigationMode: z11.enum(["sidebar", "topbar"]).optional(),
|
|
13224
|
+
allowNavigationModeSwitch: z11.boolean().optional(),
|
|
12431
13225
|
headbar: KernelHeadbarSchema.optional()
|
|
12432
13226
|
}).strict().optional(),
|
|
12433
|
-
paginationPosition:
|
|
12434
|
-
ugcViewIconOnlyMode:
|
|
12435
|
-
workflowPreviewExecutionGrid:
|
|
12436
|
-
selectionModeDisplayType:
|
|
12437
|
-
clickBehavior:
|
|
12438
|
-
showErrorFilter:
|
|
12439
|
-
displayType:
|
|
12440
|
-
showDetailButton:
|
|
13227
|
+
paginationPosition: z11.enum(["left", "right"]).optional(),
|
|
13228
|
+
ugcViewIconOnlyMode: z11.boolean().optional(),
|
|
13229
|
+
workflowPreviewExecutionGrid: z11.object({
|
|
13230
|
+
selectionModeDisplayType: z11.enum(["operation-button", "dropdown-menu"]).optional(),
|
|
13231
|
+
clickBehavior: z11.enum(["preview", "select", "fill-form", "none"]).optional(),
|
|
13232
|
+
showErrorFilter: z11.boolean().optional(),
|
|
13233
|
+
displayType: z11.enum(["grid", "masonry"]).optional(),
|
|
13234
|
+
showDetailButton: z11.boolean().optional()
|
|
12441
13235
|
}).strict().optional(),
|
|
12442
|
-
workbenchSidebarDefaultOpen:
|
|
12443
|
-
workbenchSidebarMoreAction:
|
|
12444
|
-
workbenchSidebarApart:
|
|
12445
|
-
workbenchSidebarToggleGroupDetail:
|
|
12446
|
-
workbenchSidebarViewType:
|
|
12447
|
-
workbenchSidebarFormViewEmbed:
|
|
12448
|
-
workbenchSidebarModernMode:
|
|
12449
|
-
ugc:
|
|
12450
|
-
uniImagePreview:
|
|
12451
|
-
imagePreviewStyle:
|
|
12452
|
-
teamAsUser:
|
|
12453
|
-
themeMode:
|
|
12454
|
-
density:
|
|
12455
|
-
pageZoom:
|
|
12456
|
-
miniMode:
|
|
12457
|
-
workflow:
|
|
12458
|
-
historyResult:
|
|
12459
|
-
uploader:
|
|
12460
|
-
orientation:
|
|
12461
|
-
pasteButton:
|
|
12462
|
-
statusText:
|
|
13236
|
+
workbenchSidebarDefaultOpen: z11.boolean().optional(),
|
|
13237
|
+
workbenchSidebarMoreAction: z11.boolean().optional(),
|
|
13238
|
+
workbenchSidebarApart: z11.boolean().optional(),
|
|
13239
|
+
workbenchSidebarToggleGroupDetail: z11.boolean().optional(),
|
|
13240
|
+
workbenchSidebarViewType: z11.boolean().optional(),
|
|
13241
|
+
workbenchSidebarFormViewEmbed: z11.boolean().optional(),
|
|
13242
|
+
workbenchSidebarModernMode: z11.boolean().optional(),
|
|
13243
|
+
ugc: z11.object({ onItemClick: z11.boolean(), subtitle: z11.boolean().optional() }).strict().optional(),
|
|
13244
|
+
uniImagePreview: z11.boolean().optional(),
|
|
13245
|
+
imagePreviewStyle: z11.union([z11.literal(false), z11.enum(["simple", "normal", "uni"])]).optional(),
|
|
13246
|
+
teamAsUser: z11.boolean().optional(),
|
|
13247
|
+
themeMode: z11.enum(["shadow", "border"]).optional(),
|
|
13248
|
+
density: z11.enum(["compact", "default", "comfortable"]).optional(),
|
|
13249
|
+
pageZoom: z11.number().positive().optional(),
|
|
13250
|
+
miniMode: z11.object({ showPreviewViewExecutionResultGrid: z11.boolean() }).strict().optional(),
|
|
13251
|
+
workflow: z11.object({ allowConcurrentRuns: z11.boolean() }).strict().optional(),
|
|
13252
|
+
historyResult: z11.object({ display: z11.boolean() }).strict().optional(),
|
|
13253
|
+
uploader: z11.object({
|
|
13254
|
+
orientation: z11.enum(["vertical", "horizontal"]),
|
|
13255
|
+
pasteButton: z11.boolean(),
|
|
13256
|
+
statusText: z11.boolean()
|
|
12463
13257
|
}).strict().optional(),
|
|
12464
|
-
designProjects:
|
|
12465
|
-
oneOnOne:
|
|
12466
|
-
newTabOpenBoard:
|
|
12467
|
-
defaultShowGrid:
|
|
12468
|
-
createDefaultFrame:
|
|
12469
|
-
showPageMenu:
|
|
12470
|
-
showMainMenu:
|
|
12471
|
-
showStylePanel:
|
|
12472
|
-
showToolbar:
|
|
12473
|
-
toolbarPosition:
|
|
12474
|
-
showContextMenu:
|
|
12475
|
-
showActionsMenu:
|
|
12476
|
-
showPageAndLayerSidebar:
|
|
12477
|
-
showBoardOperationSidebar:
|
|
12478
|
-
showMiniToolsToolbar:
|
|
12479
|
-
showRightSidebar:
|
|
12480
|
-
showRealtimeDrawing:
|
|
12481
|
-
showWorkflow:
|
|
12482
|
-
showVersionManager:
|
|
12483
|
-
showAgent:
|
|
12484
|
-
AgentTools:
|
|
13258
|
+
designProjects: z11.object({
|
|
13259
|
+
oneOnOne: z11.boolean(),
|
|
13260
|
+
newTabOpenBoard: z11.boolean(),
|
|
13261
|
+
defaultShowGrid: z11.boolean().optional(),
|
|
13262
|
+
createDefaultFrame: z11.boolean(),
|
|
13263
|
+
showPageMenu: z11.boolean(),
|
|
13264
|
+
showMainMenu: z11.boolean(),
|
|
13265
|
+
showStylePanel: z11.boolean(),
|
|
13266
|
+
showToolbar: z11.boolean(),
|
|
13267
|
+
toolbarPosition: z11.enum(["bottom", "left"]).optional(),
|
|
13268
|
+
showContextMenu: z11.boolean(),
|
|
13269
|
+
showActionsMenu: z11.boolean(),
|
|
13270
|
+
showPageAndLayerSidebar: z11.boolean().optional(),
|
|
13271
|
+
showBoardOperationSidebar: z11.boolean().optional(),
|
|
13272
|
+
showMiniToolsToolbar: z11.boolean().optional(),
|
|
13273
|
+
showRightSidebar: z11.boolean().optional(),
|
|
13274
|
+
showRealtimeDrawing: z11.boolean().optional(),
|
|
13275
|
+
showWorkflow: z11.boolean().optional(),
|
|
13276
|
+
showVersionManager: z11.boolean().optional(),
|
|
13277
|
+
showAgent: z11.boolean().optional(),
|
|
13278
|
+
AgentTools: z11.array(ContractIdentifierSchema).optional()
|
|
12485
13279
|
}).strict().optional(),
|
|
12486
13280
|
workbench: TenantWorkbenchConfigSchema.optional(),
|
|
12487
|
-
visionProWorkflows:
|
|
12488
|
-
initTeam:
|
|
12489
|
-
imageThumbnail:
|
|
12490
|
-
pages:
|
|
12491
|
-
allowPageKeys:
|
|
13281
|
+
visionProWorkflows: z11.array(ContractIdentifierSchema).optional(),
|
|
13282
|
+
initTeam: z11.boolean().optional(),
|
|
13283
|
+
imageThumbnail: z11.boolean().optional(),
|
|
13284
|
+
pages: z11.object({
|
|
13285
|
+
allowPageKeys: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]),
|
|
12492
13286
|
defaultPageKey: ContractIdentifierSchema.optional()
|
|
12493
13287
|
}).strict().optional(),
|
|
12494
|
-
agent:
|
|
13288
|
+
agent: z11.object({
|
|
12495
13289
|
logo: AssetVariantsSchema.optional(),
|
|
12496
|
-
brandDisplayMode:
|
|
12497
|
-
density:
|
|
13290
|
+
brandDisplayMode: z11.enum(["auto", "logo-only", "logo-name", "name-only"]).optional(),
|
|
13291
|
+
density: z11.enum(["compact", "default", "comfortable"]).optional()
|
|
12498
13292
|
}).strict().optional()
|
|
12499
13293
|
}).strict(),
|
|
12500
13294
|
landingPage: TenantLandingPageConfigSchema.optional(),
|
|
12501
|
-
auth:
|
|
12502
|
-
enabled:
|
|
12503
|
-
oidc:
|
|
12504
|
-
password:
|
|
12505
|
-
hideAuthToast:
|
|
12506
|
-
autoReload:
|
|
12507
|
-
defaultOtherTeam:
|
|
13295
|
+
auth: z11.object({
|
|
13296
|
+
enabled: z11.array(ContractIdentifierSchema).default([]),
|
|
13297
|
+
oidc: z11.object({ buttonText: z11.string().optional(), autoSignin: z11.boolean().optional() }).strict().optional(),
|
|
13298
|
+
password: z11.object({ disableAutoRegister: z11.boolean().optional() }).strict().optional(),
|
|
13299
|
+
hideAuthToast: z11.boolean().optional(),
|
|
13300
|
+
autoReload: z11.boolean().optional(),
|
|
13301
|
+
defaultOtherTeam: z11.boolean().optional()
|
|
12508
13302
|
}).strict(),
|
|
12509
|
-
endpoints:
|
|
12510
|
-
module:
|
|
12511
|
-
behavior:
|
|
12512
|
-
clearWorkflowFormStorageAfterUpdate:
|
|
12513
|
-
autoApproveOAuth:
|
|
12514
|
-
rememberWorkflowModelSelection:
|
|
13303
|
+
endpoints: z11.record(ContractIdentifierSchema, z11.string()),
|
|
13304
|
+
module: z11.union([z11.literal("*"), z11.array(ContractIdentifierSchema)]),
|
|
13305
|
+
behavior: z11.object({
|
|
13306
|
+
clearWorkflowFormStorageAfterUpdate: z11.boolean().optional(),
|
|
13307
|
+
autoApproveOAuth: z11.boolean().optional(),
|
|
13308
|
+
rememberWorkflowModelSelection: z11.boolean().optional()
|
|
12515
13309
|
}).strict(),
|
|
12516
|
-
dataManagement:
|
|
12517
|
-
favoriteOntologyId:
|
|
12518
|
-
pairedOntologyId:
|
|
12519
|
-
galleryOntologyIds:
|
|
12520
|
-
galleryOntologyId:
|
|
12521
|
-
dataBrowserDefaultOntologyId:
|
|
12522
|
-
workflowResultOntologyId:
|
|
12523
|
-
homeAdvertisement:
|
|
13310
|
+
dataManagement: z11.object({
|
|
13311
|
+
favoriteOntologyId: z11.string().optional(),
|
|
13312
|
+
pairedOntologyId: z11.string().optional(),
|
|
13313
|
+
galleryOntologyIds: z11.array(ContractIdentifierSchema).max(20).optional(),
|
|
13314
|
+
galleryOntologyId: z11.string().optional(),
|
|
13315
|
+
dataBrowserDefaultOntologyId: z11.string().optional(),
|
|
13316
|
+
workflowResultOntologyId: z11.string().optional(),
|
|
13317
|
+
homeAdvertisement: z11.object({
|
|
12524
13318
|
ontologyId: ContractIdentifierSchema,
|
|
12525
13319
|
viewId: ContractIdentifierSchema.optional(),
|
|
12526
|
-
viewType:
|
|
13320
|
+
viewType: z11.enum(["filter", "container", "share_link"]).optional(),
|
|
12527
13321
|
teamId: ContractIdentifierSchema.optional(),
|
|
12528
|
-
teamOnly:
|
|
12529
|
-
pageSize:
|
|
12530
|
-
sortBy:
|
|
12531
|
-
sortOrder:
|
|
12532
|
-
fieldMap:
|
|
12533
|
-
columnIds:
|
|
13322
|
+
teamOnly: z11.boolean().optional(),
|
|
13323
|
+
pageSize: z11.number().int().positive().optional(),
|
|
13324
|
+
sortBy: z11.enum(["pin_order", "asset_id", "updated_timestamp", "created_timestamp"]).optional(),
|
|
13325
|
+
sortOrder: z11.enum(["asc", "desc"]).optional(),
|
|
13326
|
+
fieldMap: z11.record(z11.string(), z11.string()).optional(),
|
|
13327
|
+
columnIds: z11.record(z11.string(), z11.string()).optional()
|
|
12534
13328
|
}).strict().optional(),
|
|
12535
|
-
homeTrendAssistant:
|
|
13329
|
+
homeTrendAssistant: z11.object({
|
|
12536
13330
|
ontologyId: ContractIdentifierSchema.optional(),
|
|
12537
13331
|
viewId: ContractIdentifierSchema.optional(),
|
|
12538
13332
|
viewInstanceId: ContractIdentifierSchema.optional(),
|
|
12539
|
-
viewName:
|
|
13333
|
+
viewName: z11.string().optional(),
|
|
12540
13334
|
teamId: ContractIdentifierSchema.optional(),
|
|
12541
13335
|
designOptionsWorkflowId: ContractIdentifierSchema.optional(),
|
|
12542
|
-
tep:
|
|
12543
|
-
runtime:
|
|
13336
|
+
tep: z11.object({ baseUrl: z11.string().optional(), timeoutMs: z11.number().int().positive().optional() }).strict().optional(),
|
|
13337
|
+
runtime: z11.object({ appId: ContractIdentifierSchema, tepBaseUrlConfigured: z11.boolean(), tepAuthorizationConfigured: z11.boolean(), tepCookieConfigured: z11.boolean() }).strict().optional()
|
|
12544
13338
|
}).strict().optional(),
|
|
12545
13339
|
trendRadar: TenantTrendRadarSourcesSchema.optional(),
|
|
12546
|
-
sharing:
|
|
12547
|
-
silentViewLinks:
|
|
12548
|
-
shareAccess:
|
|
12549
|
-
shareDialog:
|
|
12550
|
-
audience:
|
|
12551
|
-
accessLevel:
|
|
12552
|
-
viewTreeDelivery:
|
|
13340
|
+
sharing: z11.object({
|
|
13341
|
+
silentViewLinks: z11.object({ enabled: z11.boolean().optional(), placement: z11.object({ mode: z11.enum(["sourceOntology", "ontology"]).optional(), ontologyId: ContractIdentifierSchema.optional(), parentId: ContractIdentifierSchema.optional(), navId: ContractIdentifierSchema.optional() }).strict().optional() }).strict().optional(),
|
|
13342
|
+
shareAccess: z11.object({ publicLinksEnabled: z11.boolean().optional(), passwordGateEnabled: z11.boolean().optional(), passwordAccessTtlSeconds: z11.number().int().positive().optional(), defaultViewTreeDelivery: z11.enum(["manual", "auto"]).optional() }).strict().optional(),
|
|
13343
|
+
shareDialog: z11.object({
|
|
13344
|
+
audience: z11.object({ enabled: z11.boolean().optional(), allowed: z11.array(z11.enum(["user", "team", "public"])).optional(), default: z11.enum(["user", "team", "public"]).optional() }).strict().optional(),
|
|
13345
|
+
accessLevel: z11.object({ enabled: z11.boolean().optional(), allowed: z11.array(z11.enum(["read", "write"])).optional(), default: z11.enum(["read", "write"]).optional() }).strict().optional(),
|
|
13346
|
+
viewTreeDelivery: z11.object({ enabled: z11.boolean().optional(), allowed: z11.array(z11.enum(["manual", "auto"])).optional(), default: z11.enum(["manual", "auto"]).optional() }).strict().optional()
|
|
12553
13347
|
}).strict().optional()
|
|
12554
13348
|
}).strict().optional()
|
|
12555
13349
|
}).strict().optional(),
|
|
12556
|
-
compute:
|
|
12557
|
-
integrations:
|
|
12558
|
-
harbor:
|
|
12559
|
-
gitlab:
|
|
12560
|
-
kubernetes:
|
|
13350
|
+
compute: z11.object({
|
|
13351
|
+
integrations: z11.object({
|
|
13352
|
+
harbor: z11.object({ endpoint: z11.string().optional(), projectScopes: z11.array(z11.string()).optional(), authMode: z11.string().optional(), principal: z11.string().optional(), autoSync: z11.boolean().optional(), proxyUrl: z11.string().optional() }).strict().optional(),
|
|
13353
|
+
gitlab: z11.object({ baseUrl: z11.string().optional(), groupScopes: z11.array(z11.string()).optional(), tokenMode: z11.string().optional(), deployProjectPath: z11.string().optional(), deploymentReportsEnabled: z11.boolean().optional(), proxyUrl: z11.string().optional() }).strict().optional(),
|
|
13354
|
+
kubernetes: z11.object({ accessMode: z11.string().optional(), clusterAlias: z11.string().optional(), agentProjectPath: z11.string().optional(), agentName: z11.string().optional(), namespaceScopes: z11.array(z11.string()).optional(), rolloutObserverEnabled: z11.boolean().optional(), proxyUrl: z11.string().optional() }).strict().optional()
|
|
12561
13355
|
}).strict().optional()
|
|
12562
13356
|
}).strict().optional(),
|
|
12563
|
-
data:
|
|
12564
|
-
storage:
|
|
12565
|
-
presignMode:
|
|
12566
|
-
presign:
|
|
12567
|
-
expiresInSeconds:
|
|
12568
|
-
buckets:
|
|
12569
|
-
|
|
13357
|
+
data: z11.object({}).strict().optional(),
|
|
13358
|
+
storage: z11.object({
|
|
13359
|
+
presignMode: z11.enum(["frontend", "backend", "both"]).optional(),
|
|
13360
|
+
presign: z11.object({
|
|
13361
|
+
expiresInSeconds: z11.number().int().positive(),
|
|
13362
|
+
buckets: z11.array(
|
|
13363
|
+
z11.object({
|
|
12570
13364
|
id: ContractIdentifierSchema,
|
|
12571
13365
|
provider: ContractIdentifierSchema,
|
|
12572
13366
|
preferredUrlPatternId: ContractIdentifierSchema,
|
|
12573
|
-
urlPatterns:
|
|
12574
|
-
|
|
13367
|
+
urlPatterns: z11.array(
|
|
13368
|
+
z11.object({
|
|
12575
13369
|
id: ContractIdentifierSchema,
|
|
12576
|
-
type:
|
|
12577
|
-
hostname:
|
|
12578
|
-
preferred:
|
|
12579
|
-
bucketSegment:
|
|
13370
|
+
type: z11.enum(["bucket-hostname", "provider-hostname"]),
|
|
13371
|
+
hostname: z11.string().trim().min(1),
|
|
13372
|
+
preferred: z11.boolean().optional(),
|
|
13373
|
+
bucketSegment: z11.string().optional()
|
|
12580
13374
|
}).strict()
|
|
12581
13375
|
)
|
|
12582
13376
|
}).strict()
|
|
12583
13377
|
)
|
|
12584
13378
|
}).strict().optional()
|
|
12585
13379
|
}).strict().optional(),
|
|
12586
|
-
monkeyData:
|
|
13380
|
+
monkeyData: z11.object({ baseUrl: z11.string().optional() }).strict().optional()
|
|
12587
13381
|
}).strict();
|
|
12588
|
-
var TenantProductConfigSchema =
|
|
12589
|
-
contract:
|
|
13382
|
+
var TenantProductConfigSchema = z11.object({
|
|
13383
|
+
contract: z11.literal("TenantProductConfig"),
|
|
12590
13384
|
tenantId: ContractIdentifierSchema,
|
|
12591
13385
|
appId: ContractIdentifierSchema,
|
|
12592
13386
|
environment: ContractIdentifierSchema,
|
|
12593
13387
|
designTokens: TenantDesignTokensConfigSchema,
|
|
12594
|
-
moduleRefs:
|
|
12595
|
-
pageRefs:
|
|
12596
|
-
featureFlags:
|
|
13388
|
+
moduleRefs: z11.array(ContractIdentifierSchema).default([]),
|
|
13389
|
+
pageRefs: z11.array(ContractIdentifierSchema).default([]),
|
|
13390
|
+
featureFlags: z11.record(z11.string(), z11.boolean()).default({}),
|
|
12597
13391
|
authBinding: TenantAuthBindingsSchema,
|
|
12598
13392
|
dataBinding: TenantDataBindingsSchema,
|
|
12599
|
-
sourceMap:
|
|
12600
|
-
warnings:
|
|
13393
|
+
sourceMap: z11.record(z11.string(), ContractIdentifierSchema),
|
|
13394
|
+
warnings: z11.array(z11.string()).default([]),
|
|
13395
|
+
menus: MenuDefinitionSetSchema.optional(),
|
|
12601
13396
|
applicationConfig: TenantApplicationConfigSchema
|
|
12602
13397
|
}).strict();
|
|
12603
|
-
var TenantRuntimeConfigSchema =
|
|
12604
|
-
contract:
|
|
13398
|
+
var TenantRuntimeConfigSchema = z11.object({
|
|
13399
|
+
contract: z11.literal("TenantRuntimeConfig"),
|
|
12605
13400
|
tenantId: ContractIdentifierSchema,
|
|
12606
13401
|
appId: ContractIdentifierSchema,
|
|
12607
13402
|
environment: ContractIdentifierSchema,
|
|
12608
13403
|
designTokens: ResolvedThemeTokensSchema,
|
|
12609
|
-
moduleRefs:
|
|
12610
|
-
pageRefs:
|
|
12611
|
-
featureFlags:
|
|
13404
|
+
moduleRefs: z11.array(ContractIdentifierSchema).default([]),
|
|
13405
|
+
pageRefs: z11.array(ContractIdentifierSchema).default([]),
|
|
13406
|
+
featureFlags: z11.record(z11.string(), z11.boolean()).default({}),
|
|
12612
13407
|
authBinding: TenantAuthBindingsSchema,
|
|
12613
13408
|
dataBinding: TenantDataBindingsSchema,
|
|
12614
|
-
sourceMap:
|
|
12615
|
-
warnings:
|
|
13409
|
+
sourceMap: z11.record(z11.string(), ContractIdentifierSchema),
|
|
13410
|
+
warnings: z11.array(z11.string()).default([]),
|
|
13411
|
+
menuBundle: MenuRuntimeBundleSchema.optional(),
|
|
12616
13412
|
applicationConfig: TenantApplicationConfigSchema
|
|
12617
13413
|
}).strict();
|
|
12618
13414
|
|
|
@@ -12633,6 +13429,7 @@ var compileTenantRuntimeConfig = (input) => {
|
|
|
12633
13429
|
dataBinding: productConfig.dataBinding,
|
|
12634
13430
|
sourceMap: productConfig.sourceMap,
|
|
12635
13431
|
warnings: productConfig.warnings,
|
|
13432
|
+
menuBundle: input.menuBundle,
|
|
12636
13433
|
applicationConfig: productConfig.applicationConfig
|
|
12637
13434
|
}));
|
|
12638
13435
|
};
|
|
@@ -12888,6 +13685,7 @@ export {
|
|
|
12888
13685
|
APPLICATION_HANDOFF_QUERY_PARAMETER,
|
|
12889
13686
|
DEFAULT_CONDUCTOR_OWNER_EMAIL,
|
|
12890
13687
|
MONKEYS_REQUIRED_THEME_TOKEN_PATHS,
|
|
13688
|
+
MenuCompilationError,
|
|
12891
13689
|
ThemeTokenValidationError,
|
|
12892
13690
|
applyViewRuntimeBindings,
|
|
12893
13691
|
assertMonkeysThemeTokensComplete,
|
|
@@ -12896,6 +13694,7 @@ export {
|
|
|
12896
13694
|
buildChangeImpactGraph,
|
|
12897
13695
|
compileCapabilityRegistry,
|
|
12898
13696
|
compileConductorWorkflowDefinition,
|
|
13697
|
+
compileMenuRuntimeBundle,
|
|
12899
13698
|
compilePageRuntimeProjection,
|
|
12900
13699
|
compileProductDeclaration,
|
|
12901
13700
|
compileProductRuntimeCatalog,
|
|
@@ -12913,13 +13712,17 @@ export {
|
|
|
12913
13712
|
createToolCapabilityManifest,
|
|
12914
13713
|
createWorkflowCapabilityManifest,
|
|
12915
13714
|
extractOpenApiCapabilityManifests,
|
|
13715
|
+
isCompiledMenuItemSelected,
|
|
12916
13716
|
mergeThemeTokenDocuments,
|
|
12917
13717
|
parseApplicationHandoff,
|
|
12918
13718
|
projectAgentSessionEvents,
|
|
12919
13719
|
publishOpenApiToolCapabilityManifests,
|
|
12920
13720
|
readApplicationHandoffFromUrl,
|
|
13721
|
+
readMenuActivationFromSearch,
|
|
13722
|
+
resolveMenuActivationId,
|
|
12921
13723
|
resolveThemeTokens,
|
|
12922
13724
|
serializeApplicationHandoff,
|
|
13725
|
+
serializeMenuActivationSearch,
|
|
12923
13726
|
toAgentSessionViewModel,
|
|
12924
13727
|
validateDomainCommand,
|
|
12925
13728
|
validateThemeTokensDocument,
|