@inf-monkeys-tech/monkeys 1.0.36 → 1.0.38
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 +157 -0
- package/lib/contracts/tenant.d.ts.map +1 -1
- package/lib/contracts/tenant.js +4 -0
- package/lib/contracts/tenant.js.map +1 -1
- package/lib/esm/contracts/index.mjs +1089 -768
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +1615 -771
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +1168 -364
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +1084 -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 +392 -0
- package/lib/json-schema/tenant-runtime-config.schema.json +522 -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 +408 -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
- package/test/fixtures/tenant-product-config.public.json +2 -1
package/lib/esm/index.mjs
CHANGED
|
@@ -8303,6 +8303,9 @@ var DomainEventSchema = z8.object({
|
|
|
8303
8303
|
occurredAt: IsoDateTimeSchema
|
|
8304
8304
|
}).strict();
|
|
8305
8305
|
|
|
8306
|
+
// src/contracts/menu.ts
|
|
8307
|
+
import { z as z10 } from "zod";
|
|
8308
|
+
|
|
8306
8309
|
// src/contracts/page.ts
|
|
8307
8310
|
import { z as z9 } from "zod";
|
|
8308
8311
|
var PageTypeSchema = z9.enum([
|
|
@@ -8390,6 +8393,9 @@ var PageDefinitionSchema = z9.object({
|
|
|
8390
8393
|
access: z9.object({
|
|
8391
8394
|
actions: z9.array(z9.enum(["read", "write", "execute", "manage-permissions"])).default([])
|
|
8392
8395
|
}).strict(),
|
|
8396
|
+
input: z9.object({
|
|
8397
|
+
schemaRef: ContractIdentifierSchema
|
|
8398
|
+
}).strict().optional(),
|
|
8393
8399
|
rendererConfig: z9.object({
|
|
8394
8400
|
schemaRef: ContractIdentifierSchema,
|
|
8395
8401
|
value: JsonObjectSchema
|
|
@@ -8579,40 +8585,314 @@ var PageRuntimeProjectionSchema = z9.object({
|
|
|
8579
8585
|
}
|
|
8580
8586
|
});
|
|
8581
8587
|
|
|
8588
|
+
// src/contracts/menu.ts
|
|
8589
|
+
var MENU_ACTIVATION_QUERY_PARAMETER = "__menuActivation";
|
|
8590
|
+
var MENU_CONTRACT_VERSION = 1;
|
|
8591
|
+
var MENU_MAX_DEFINITIONS = 128;
|
|
8592
|
+
var MENU_MAX_NODES = 1024;
|
|
8593
|
+
var MENU_MAX_TREE_DEPTH = 16;
|
|
8594
|
+
var MENU_MAX_INPUT_BYTES = 64 * 1024;
|
|
8595
|
+
var MENU_MAX_INPUT_VALUES = 2048;
|
|
8596
|
+
var MenuOrderSchema = z10.number().int().min(-1e6).max(1e6);
|
|
8597
|
+
var inspectJsonValue = (value) => {
|
|
8598
|
+
let maxDepth = 0;
|
|
8599
|
+
let values = 0;
|
|
8600
|
+
const visit = (candidate, depth) => {
|
|
8601
|
+
values += 1;
|
|
8602
|
+
maxDepth = Math.max(maxDepth, depth);
|
|
8603
|
+
if (Array.isArray(candidate)) {
|
|
8604
|
+
candidate.forEach((item) => visit(item, depth + 1));
|
|
8605
|
+
return;
|
|
8606
|
+
}
|
|
8607
|
+
if (candidate && typeof candidate === "object") {
|
|
8608
|
+
Object.values(candidate).forEach((item) => visit(item, depth + 1));
|
|
8609
|
+
}
|
|
8610
|
+
};
|
|
8611
|
+
visit(value, 1);
|
|
8612
|
+
return {
|
|
8613
|
+
bytes: new TextEncoder().encode(JSON.stringify(value)).byteLength,
|
|
8614
|
+
depth: maxDepth,
|
|
8615
|
+
values
|
|
8616
|
+
};
|
|
8617
|
+
};
|
|
8618
|
+
var MenuBoundedInputSchema = JsonObjectSchema.superRefine((value, context) => {
|
|
8619
|
+
const bounds = inspectJsonValue(value);
|
|
8620
|
+
if (bounds.bytes > MENU_MAX_INPUT_BYTES) {
|
|
8621
|
+
context.addIssue({
|
|
8622
|
+
code: "custom",
|
|
8623
|
+
message: `Menu input exceeds ${MENU_MAX_INPUT_BYTES} UTF-8 bytes.`
|
|
8624
|
+
});
|
|
8625
|
+
}
|
|
8626
|
+
if (bounds.depth > MENU_MAX_TREE_DEPTH) {
|
|
8627
|
+
context.addIssue({
|
|
8628
|
+
code: "custom",
|
|
8629
|
+
message: `Menu input exceeds maximum depth ${MENU_MAX_TREE_DEPTH}.`
|
|
8630
|
+
});
|
|
8631
|
+
}
|
|
8632
|
+
if (bounds.values > MENU_MAX_INPUT_VALUES) {
|
|
8633
|
+
context.addIssue({
|
|
8634
|
+
code: "custom",
|
|
8635
|
+
message: `Menu input exceeds ${MENU_MAX_INPUT_VALUES} values.`
|
|
8636
|
+
});
|
|
8637
|
+
}
|
|
8638
|
+
});
|
|
8639
|
+
var MenuPageRefSchema = z10.object({
|
|
8640
|
+
applicationId: ContractIdentifierSchema,
|
|
8641
|
+
pageId: ContractIdentifierSchema
|
|
8642
|
+
}).strict();
|
|
8643
|
+
var MenuSourceInputBindingSchema = z10.discriminatedUnion("exposure", [
|
|
8644
|
+
z10.object({ exposure: z10.literal("client"), value: MenuBoundedInputSchema }).strict(),
|
|
8645
|
+
z10.object({ exposure: z10.literal("server"), value: MenuBoundedInputSchema }).strict()
|
|
8646
|
+
]);
|
|
8647
|
+
var MenuRuntimeInputBindingSchema = z10.discriminatedUnion("exposure", [
|
|
8648
|
+
z10.object({ exposure: z10.literal("client"), value: MenuBoundedInputSchema }).strict(),
|
|
8649
|
+
z10.object({ exposure: z10.literal("server") }).strict()
|
|
8650
|
+
]);
|
|
8651
|
+
var MenuNavigateBehaviorSchema = z10.object({
|
|
8652
|
+
kind: z10.literal("navigate"),
|
|
8653
|
+
page: MenuPageRefSchema,
|
|
8654
|
+
activationId: ContractIdentifierSchema.optional(),
|
|
8655
|
+
input: MenuSourceInputBindingSchema.optional()
|
|
8656
|
+
}).strict();
|
|
8657
|
+
var MenuActionBehaviorSchema = z10.object({
|
|
8658
|
+
kind: z10.literal("action"),
|
|
8659
|
+
actionRef: ContractIdentifierSchema,
|
|
8660
|
+
input: MenuBoundedInputSchema.optional()
|
|
8661
|
+
}).strict();
|
|
8662
|
+
var MenuBehaviorSchema = z10.discriminatedUnion("kind", [
|
|
8663
|
+
MenuNavigateBehaviorSchema,
|
|
8664
|
+
MenuActionBehaviorSchema
|
|
8665
|
+
]);
|
|
8666
|
+
var MenuNodeBaseShape = {
|
|
8667
|
+
nodeId: ContractIdentifierSchema,
|
|
8668
|
+
parentNodeId: ContractIdentifierSchema.optional(),
|
|
8669
|
+
order: MenuOrderSchema
|
|
8670
|
+
};
|
|
8671
|
+
var MenuGroupNodeSchema = z10.object({
|
|
8672
|
+
...MenuNodeBaseShape,
|
|
8673
|
+
kind: z10.literal("group"),
|
|
8674
|
+
label: LocalizedTextSchema.optional(),
|
|
8675
|
+
iconRef: ContractIdentifierSchema.optional()
|
|
8676
|
+
}).strict();
|
|
8677
|
+
var MenuDividerNodeSchema = z10.object({
|
|
8678
|
+
...MenuNodeBaseShape,
|
|
8679
|
+
kind: z10.literal("divider")
|
|
8680
|
+
}).strict();
|
|
8681
|
+
var MenuItemNodeSchema = z10.object({
|
|
8682
|
+
...MenuNodeBaseShape,
|
|
8683
|
+
kind: z10.literal("item"),
|
|
8684
|
+
label: LocalizedTextSchema,
|
|
8685
|
+
iconRef: ContractIdentifierSchema.optional(),
|
|
8686
|
+
tone: z10.enum(["default", "danger"]).optional(),
|
|
8687
|
+
requiredPermission: ContractIdentifierSchema.optional(),
|
|
8688
|
+
behavior: MenuBehaviorSchema
|
|
8689
|
+
}).strict();
|
|
8690
|
+
var MenuNodeSchema = z10.discriminatedUnion("kind", [
|
|
8691
|
+
MenuGroupNodeSchema,
|
|
8692
|
+
MenuDividerNodeSchema,
|
|
8693
|
+
MenuItemNodeSchema
|
|
8694
|
+
]);
|
|
8695
|
+
var MenuContributionSchema = z10.object({
|
|
8696
|
+
providerId: ContractIdentifierSchema,
|
|
8697
|
+
parentNodeId: ContractIdentifierSchema.optional(),
|
|
8698
|
+
order: MenuOrderSchema
|
|
8699
|
+
}).strict();
|
|
8700
|
+
var validateMenuStructure = (menu, context) => {
|
|
8701
|
+
const nodesById = /* @__PURE__ */ new Map();
|
|
8702
|
+
menu.nodes.forEach((node, index) => {
|
|
8703
|
+
if (nodesById.has(node.nodeId)) {
|
|
8704
|
+
context.addIssue({
|
|
8705
|
+
code: "custom",
|
|
8706
|
+
path: ["nodes", index, "nodeId"],
|
|
8707
|
+
message: `Duplicate menu nodeId: ${node.nodeId}`
|
|
8708
|
+
});
|
|
8709
|
+
return;
|
|
8710
|
+
}
|
|
8711
|
+
nodesById.set(node.nodeId, { node, index });
|
|
8712
|
+
});
|
|
8713
|
+
const validateParent = (parentNodeId, path) => {
|
|
8714
|
+
if (!parentNodeId) return;
|
|
8715
|
+
const parent = nodesById.get(parentNodeId);
|
|
8716
|
+
if (!parent) {
|
|
8717
|
+
context.addIssue({ code: "custom", path, message: `Unknown menu parentNodeId: ${parentNodeId}` });
|
|
8718
|
+
return;
|
|
8719
|
+
}
|
|
8720
|
+
if (parent.node.kind !== "group") {
|
|
8721
|
+
context.addIssue({ code: "custom", path, message: `Menu parent ${parentNodeId} must be a group.` });
|
|
8722
|
+
}
|
|
8723
|
+
};
|
|
8724
|
+
menu.nodes.forEach((node, index) => validateParent(node.parentNodeId, ["nodes", index, "parentNodeId"]));
|
|
8725
|
+
menu.contributions.forEach((contribution, index) => validateParent(contribution.parentNodeId, ["contributions", index, "parentNodeId"]));
|
|
8726
|
+
menu.nodes.forEach((node, index) => {
|
|
8727
|
+
const ancestors = /* @__PURE__ */ new Set([node.nodeId]);
|
|
8728
|
+
let parentNodeId = node.parentNodeId;
|
|
8729
|
+
let depth = 1;
|
|
8730
|
+
while (parentNodeId) {
|
|
8731
|
+
if (ancestors.has(parentNodeId)) {
|
|
8732
|
+
context.addIssue({
|
|
8733
|
+
code: "custom",
|
|
8734
|
+
path: ["nodes", index, "parentNodeId"],
|
|
8735
|
+
message: `Menu node cycle contains ${node.nodeId}.`
|
|
8736
|
+
});
|
|
8737
|
+
break;
|
|
8738
|
+
}
|
|
8739
|
+
ancestors.add(parentNodeId);
|
|
8740
|
+
depth += 1;
|
|
8741
|
+
if (depth > MENU_MAX_TREE_DEPTH) {
|
|
8742
|
+
context.addIssue({
|
|
8743
|
+
code: "custom",
|
|
8744
|
+
path: ["nodes", index, "parentNodeId"],
|
|
8745
|
+
message: `Menu tree exceeds maximum depth ${MENU_MAX_TREE_DEPTH}.`
|
|
8746
|
+
});
|
|
8747
|
+
break;
|
|
8748
|
+
}
|
|
8749
|
+
parentNodeId = nodesById.get(parentNodeId)?.node.parentNodeId;
|
|
8750
|
+
}
|
|
8751
|
+
});
|
|
8752
|
+
const contributionKeys = /* @__PURE__ */ new Set();
|
|
8753
|
+
menu.contributions.forEach((contribution, index) => {
|
|
8754
|
+
const key = `${contribution.parentNodeId ?? ""}\0${contribution.providerId}`;
|
|
8755
|
+
if (contributionKeys.has(key)) {
|
|
8756
|
+
context.addIssue({
|
|
8757
|
+
code: "custom",
|
|
8758
|
+
path: ["contributions", index, "providerId"],
|
|
8759
|
+
message: `Duplicate menu contribution provider at parent: ${contribution.providerId}`
|
|
8760
|
+
});
|
|
8761
|
+
}
|
|
8762
|
+
contributionKeys.add(key);
|
|
8763
|
+
});
|
|
8764
|
+
};
|
|
8765
|
+
var MenuDefinitionSchema = z10.object({
|
|
8766
|
+
contract: z10.literal("MenuDefinition"),
|
|
8767
|
+
version: z10.literal(MENU_CONTRACT_VERSION),
|
|
8768
|
+
applicationId: ContractIdentifierSchema,
|
|
8769
|
+
surface: ContractIdentifierSchema,
|
|
8770
|
+
menuId: ContractIdentifierSchema,
|
|
8771
|
+
nodes: z10.array(MenuNodeSchema).max(MENU_MAX_NODES),
|
|
8772
|
+
contributions: z10.array(MenuContributionSchema).max(MENU_MAX_NODES).default([])
|
|
8773
|
+
}).strict().superRefine(validateMenuStructure);
|
|
8774
|
+
var MenuDefinitionSetSchema = z10.union([
|
|
8775
|
+
z10.literal("*"),
|
|
8776
|
+
z10.object({
|
|
8777
|
+
version: z10.literal(MENU_CONTRACT_VERSION),
|
|
8778
|
+
definitions: z10.array(MenuDefinitionSchema).max(MENU_MAX_DEFINITIONS)
|
|
8779
|
+
}).strict()
|
|
8780
|
+
]);
|
|
8781
|
+
var MenuAccessRequirementSchema = z10.object({
|
|
8782
|
+
authenticated: z10.boolean().default(true),
|
|
8783
|
+
permissionAllOf: z10.array(ContractIdentifierSchema).default([]),
|
|
8784
|
+
permissionAnyOf: z10.array(ContractIdentifierSchema).default([]),
|
|
8785
|
+
featureFlags: z10.array(ContractIdentifierSchema).default([])
|
|
8786
|
+
}).strict();
|
|
8787
|
+
var MenuPageRegistrationSchema = z10.object({
|
|
8788
|
+
applicationId: ContractIdentifierSchema,
|
|
8789
|
+
page: PageDefinitionSchema
|
|
8790
|
+
}).strict();
|
|
8791
|
+
var MenuActionRegistrationSchema = z10.object({
|
|
8792
|
+
applicationId: ContractIdentifierSchema,
|
|
8793
|
+
actionRef: ContractIdentifierSchema,
|
|
8794
|
+
inputSchemaRef: ContractIdentifierSchema.optional(),
|
|
8795
|
+
access: MenuAccessRequirementSchema
|
|
8796
|
+
}).strict();
|
|
8797
|
+
var MenuContributionProviderRegistrationSchema = z10.object({
|
|
8798
|
+
applicationId: ContractIdentifierSchema,
|
|
8799
|
+
providerId: ContractIdentifierSchema,
|
|
8800
|
+
surfaces: z10.array(ContractIdentifierSchema).min(1).optional()
|
|
8801
|
+
}).strict();
|
|
8802
|
+
var CompiledMenuNavigateBehaviorSchema = z10.object({
|
|
8803
|
+
kind: z10.literal("navigate"),
|
|
8804
|
+
page: MenuPageRefSchema,
|
|
8805
|
+
activationId: ContractIdentifierSchema,
|
|
8806
|
+
input: MenuRuntimeInputBindingSchema.optional()
|
|
8807
|
+
}).strict();
|
|
8808
|
+
var CompiledMenuActionBehaviorSchema = z10.object({
|
|
8809
|
+
kind: z10.literal("action"),
|
|
8810
|
+
actionRef: ContractIdentifierSchema,
|
|
8811
|
+
input: MenuBoundedInputSchema.optional()
|
|
8812
|
+
}).strict();
|
|
8813
|
+
var CompiledMenuBehaviorSchema = z10.discriminatedUnion("kind", [
|
|
8814
|
+
CompiledMenuNavigateBehaviorSchema,
|
|
8815
|
+
CompiledMenuActionBehaviorSchema
|
|
8816
|
+
]);
|
|
8817
|
+
var CompiledMenuItemAccessSchema = MenuAccessRequirementSchema.extend({
|
|
8818
|
+
requiredPermission: ContractIdentifierSchema.optional()
|
|
8819
|
+
}).strict();
|
|
8820
|
+
var CompiledMenuGroupNodeSchema = MenuGroupNodeSchema;
|
|
8821
|
+
var CompiledMenuDividerNodeSchema = MenuDividerNodeSchema;
|
|
8822
|
+
var CompiledMenuItemNodeSchema = MenuItemNodeSchema.omit({ behavior: true, requiredPermission: true }).extend({
|
|
8823
|
+
behavior: CompiledMenuBehaviorSchema,
|
|
8824
|
+
access: CompiledMenuItemAccessSchema
|
|
8825
|
+
}).strict();
|
|
8826
|
+
var CompiledMenuNodeSchema = z10.discriminatedUnion("kind", [
|
|
8827
|
+
CompiledMenuGroupNodeSchema,
|
|
8828
|
+
CompiledMenuDividerNodeSchema,
|
|
8829
|
+
CompiledMenuItemNodeSchema
|
|
8830
|
+
]);
|
|
8831
|
+
var CompiledMenuProjectionSchema = z10.object({
|
|
8832
|
+
applicationId: ContractIdentifierSchema,
|
|
8833
|
+
surface: ContractIdentifierSchema,
|
|
8834
|
+
menuId: ContractIdentifierSchema,
|
|
8835
|
+
nodes: z10.array(CompiledMenuNodeSchema).max(MENU_MAX_NODES),
|
|
8836
|
+
contributions: z10.array(MenuContributionSchema).max(MENU_MAX_NODES)
|
|
8837
|
+
}).strict();
|
|
8838
|
+
var MenuNavigationTargetSchema = z10.object({
|
|
8839
|
+
page: MenuPageRefSchema,
|
|
8840
|
+
activationId: ContractIdentifierSchema,
|
|
8841
|
+
input: MenuRuntimeInputBindingSchema.optional()
|
|
8842
|
+
}).strict();
|
|
8843
|
+
var MenuRuntimeBundleSchema = z10.object({
|
|
8844
|
+
contract: z10.literal("MenuRuntimeBundle"),
|
|
8845
|
+
version: z10.literal(MENU_CONTRACT_VERSION),
|
|
8846
|
+
applicationId: ContractIdentifierSchema,
|
|
8847
|
+
sourceVersion: ContractIdentifierSchema,
|
|
8848
|
+
contentHash: Sha256Schema,
|
|
8849
|
+
menus: z10.array(CompiledMenuProjectionSchema).max(MENU_MAX_DEFINITIONS),
|
|
8850
|
+
navigationTargets: z10.array(MenuNavigationTargetSchema),
|
|
8851
|
+
sourceMap: z10.record(z10.string(), ContractIdentifierSchema).default({})
|
|
8852
|
+
}).strict();
|
|
8853
|
+
var MenuContributionResultSchema = z10.object({
|
|
8854
|
+
contract: z10.literal("MenuContributionResult"),
|
|
8855
|
+
applicationId: ContractIdentifierSchema,
|
|
8856
|
+
surface: ContractIdentifierSchema,
|
|
8857
|
+
menuId: ContractIdentifierSchema,
|
|
8858
|
+
providerId: ContractIdentifierSchema,
|
|
8859
|
+
nodes: z10.array(CompiledMenuNodeSchema).max(MENU_MAX_NODES)
|
|
8860
|
+
}).strict();
|
|
8861
|
+
|
|
8582
8862
|
// src/contracts/semantic.ts
|
|
8583
|
-
import { z as
|
|
8584
|
-
var ConceptRelationshipSchema =
|
|
8863
|
+
import { z as z11 } from "zod";
|
|
8864
|
+
var ConceptRelationshipSchema = z11.object({
|
|
8585
8865
|
kind: ContractIdentifierSchema,
|
|
8586
8866
|
targetConceptId: ContractIdentifierSchema,
|
|
8587
|
-
cardinality:
|
|
8867
|
+
cardinality: z11.enum(["one", "optional", "many"])
|
|
8588
8868
|
}).strict();
|
|
8589
|
-
var ConceptDefinitionSchema =
|
|
8590
|
-
contract:
|
|
8869
|
+
var ConceptDefinitionSchema = z11.object({
|
|
8870
|
+
contract: z11.literal("ConceptDefinition"),
|
|
8591
8871
|
conceptId: ContractIdentifierSchema,
|
|
8592
8872
|
ownerRepo: ContractIdentifierSchema,
|
|
8593
|
-
displayName:
|
|
8594
|
-
description:
|
|
8873
|
+
displayName: z11.string().trim().min(1),
|
|
8874
|
+
description: z11.string().optional(),
|
|
8595
8875
|
schemaRef: ContractIdentifierSchema,
|
|
8596
8876
|
ontologyId: ContractIdentifierSchema.optional(),
|
|
8597
|
-
capabilityIds:
|
|
8598
|
-
commandNames:
|
|
8599
|
-
relationships:
|
|
8877
|
+
capabilityIds: z11.array(ContractIdentifierSchema).default([]),
|
|
8878
|
+
commandNames: z11.array(ContractIdentifierSchema).default([]),
|
|
8879
|
+
relationships: z11.array(ConceptRelationshipSchema).default([])
|
|
8600
8880
|
}).strict();
|
|
8601
|
-
var DomainCommandDefinitionSchema =
|
|
8602
|
-
contract:
|
|
8881
|
+
var DomainCommandDefinitionSchema = z11.object({
|
|
8882
|
+
contract: z11.literal("DomainCommandDefinition"),
|
|
8603
8883
|
commandName: ContractIdentifierSchema,
|
|
8604
8884
|
ownerRepo: ContractIdentifierSchema,
|
|
8605
|
-
displayName:
|
|
8606
|
-
description:
|
|
8607
|
-
targetKinds:
|
|
8885
|
+
displayName: z11.string().trim().min(1),
|
|
8886
|
+
description: z11.string().optional(),
|
|
8887
|
+
targetKinds: z11.array(ContractIdentifierSchema).min(1),
|
|
8608
8888
|
inputSchemaRef: ContractIdentifierSchema,
|
|
8609
8889
|
outputSchemaRef: ContractIdentifierSchema.optional(),
|
|
8610
|
-
requiredPermissionCodes:
|
|
8890
|
+
requiredPermissionCodes: z11.array(ContractIdentifierSchema).default([]),
|
|
8611
8891
|
handlerRef: EntityRefSchema,
|
|
8612
|
-
sideEffects:
|
|
8892
|
+
sideEffects: z11.array(z11.enum(["data-write", "execution", "navigation", "notification", "external-call"])).default([])
|
|
8613
8893
|
}).strict();
|
|
8614
|
-
var DomainCommandSchema =
|
|
8615
|
-
contract:
|
|
8894
|
+
var DomainCommandSchema = z11.object({
|
|
8895
|
+
contract: z11.literal("DomainCommand"),
|
|
8616
8896
|
commandId: ContractIdentifierSchema,
|
|
8617
8897
|
commandName: ContractIdentifierSchema,
|
|
8618
8898
|
requestId: ContractIdentifierSchema,
|
|
@@ -8620,29 +8900,30 @@ var DomainCommandSchema = z10.object({
|
|
|
8620
8900
|
idempotencyKey: ContractIdentifierSchema,
|
|
8621
8901
|
targetRef: EntityRefSchema,
|
|
8622
8902
|
actorRef: EntityRefSchema,
|
|
8623
|
-
source:
|
|
8624
|
-
product:
|
|
8903
|
+
source: z11.object({
|
|
8904
|
+
product: z11.enum(["studio", "kernel", "compute", "agent", "mcp", "service"]),
|
|
8625
8905
|
pageId: ContractIdentifierSchema.optional(),
|
|
8626
8906
|
capabilityId: ContractIdentifierSchema.optional()
|
|
8627
8907
|
}).strict(),
|
|
8628
8908
|
payload: JsonObjectSchema,
|
|
8629
8909
|
issuedAt: IsoDateTimeSchema
|
|
8630
8910
|
}).strict();
|
|
8631
|
-
var ProductDeclarationSchema =
|
|
8632
|
-
contract:
|
|
8911
|
+
var ProductDeclarationSchema = z11.object({
|
|
8912
|
+
contract: z11.literal("ProductDeclaration"),
|
|
8633
8913
|
declarationId: ContractIdentifierSchema,
|
|
8634
8914
|
ownerRepo: ContractIdentifierSchema,
|
|
8635
|
-
concepts:
|
|
8636
|
-
ontologies:
|
|
8637
|
-
projections:
|
|
8638
|
-
commands:
|
|
8639
|
-
capabilities:
|
|
8640
|
-
pages:
|
|
8641
|
-
|
|
8642
|
-
|
|
8915
|
+
concepts: z11.array(ConceptDefinitionSchema).default([]),
|
|
8916
|
+
ontologies: z11.array(OntologyDefinitionSchema).default([]),
|
|
8917
|
+
projections: z11.array(ProjectionSpecSchema).default([]),
|
|
8918
|
+
commands: z11.array(DomainCommandDefinitionSchema).default([]),
|
|
8919
|
+
capabilities: z11.array(CapabilityManifestSchema).default([]),
|
|
8920
|
+
pages: z11.array(PageDefinitionSchema).default([]),
|
|
8921
|
+
menus: z11.array(MenuDefinitionSchema).default([])
|
|
8922
|
+
}).strict();
|
|
8923
|
+
var DeclarationGraphEdgeSchema = z11.object({
|
|
8643
8924
|
from: EntityRefSchema,
|
|
8644
8925
|
to: EntityRefSchema,
|
|
8645
|
-
relation:
|
|
8926
|
+
relation: z11.enum([
|
|
8646
8927
|
"uses-ontology",
|
|
8647
8928
|
"uses-projection",
|
|
8648
8929
|
"uses-capability",
|
|
@@ -8650,25 +8931,25 @@ var DeclarationGraphEdgeSchema = z10.object({
|
|
|
8650
8931
|
"relates-to-concept"
|
|
8651
8932
|
])
|
|
8652
8933
|
}).strict();
|
|
8653
|
-
var ChangeImpactSchema =
|
|
8934
|
+
var ChangeImpactSchema = z11.object({
|
|
8654
8935
|
changedRef: EntityRefSchema,
|
|
8655
|
-
affectedRefs:
|
|
8656
|
-
reasons:
|
|
8936
|
+
affectedRefs: z11.array(EntityRefSchema),
|
|
8937
|
+
reasons: z11.array(ContractIdentifierSchema).min(1)
|
|
8657
8938
|
}).strict();
|
|
8658
|
-
var ChangeImpactGraphSchema =
|
|
8659
|
-
contract:
|
|
8939
|
+
var ChangeImpactGraphSchema = z11.object({
|
|
8940
|
+
contract: z11.literal("ChangeImpactGraph"),
|
|
8660
8941
|
declarationId: ContractIdentifierSchema,
|
|
8661
|
-
nodes:
|
|
8662
|
-
edges:
|
|
8663
|
-
impacts:
|
|
8942
|
+
nodes: z11.array(EntityRefSchema),
|
|
8943
|
+
edges: z11.array(DeclarationGraphEdgeSchema),
|
|
8944
|
+
impacts: z11.array(ChangeImpactSchema),
|
|
8664
8945
|
generatedAt: IsoDateTimeSchema
|
|
8665
8946
|
}).strict();
|
|
8666
8947
|
|
|
8667
8948
|
// src/contracts/tenant.ts
|
|
8668
|
-
import { z as
|
|
8949
|
+
import { z as z13 } from "zod";
|
|
8669
8950
|
|
|
8670
8951
|
// src/contracts/theme.ts
|
|
8671
|
-
import { z as
|
|
8952
|
+
import { z as z12 } from "zod";
|
|
8672
8953
|
|
|
8673
8954
|
// src/theme-tokens/core.ts
|
|
8674
8955
|
var import_ajv = __toESM(require_ajv());
|
|
@@ -10895,20 +11176,20 @@ function assertMonkeysThemeTokensComplete(input) {
|
|
|
10895
11176
|
}
|
|
10896
11177
|
|
|
10897
11178
|
// src/contracts/theme.ts
|
|
10898
|
-
var ThemeTokenTypeSchema =
|
|
10899
|
-
var ThemeTokenSchema =
|
|
11179
|
+
var ThemeTokenTypeSchema = z12.enum(THEME_TOKEN_TYPES);
|
|
11180
|
+
var ThemeTokenSchema = z12.record(z12.string(), z12.unknown()).superRefine((input, context) => {
|
|
10900
11181
|
const issues = validateThemeTokensDocumentStructure({ token: input });
|
|
10901
11182
|
for (const issue of issues) {
|
|
10902
11183
|
context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
|
|
10903
11184
|
}
|
|
10904
11185
|
});
|
|
10905
|
-
var ThemeTokenGroupSchema =
|
|
11186
|
+
var ThemeTokenGroupSchema = z12.record(z12.string(), z12.unknown()).superRefine((input, context) => {
|
|
10906
11187
|
const issues = validateThemeTokensDocumentStructure(input);
|
|
10907
11188
|
for (const issue of issues) {
|
|
10908
11189
|
context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
|
|
10909
11190
|
}
|
|
10910
11191
|
});
|
|
10911
|
-
var ThemeTokensSchema =
|
|
11192
|
+
var ThemeTokensSchema = z12.record(z12.string(), z12.unknown()).superRefine((input, context) => {
|
|
10912
11193
|
const issues = validateThemeTokensDocument(input);
|
|
10913
11194
|
for (const issue of issues) {
|
|
10914
11195
|
context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
|
|
@@ -10935,9 +11216,9 @@ var ResolvedThemeTokensSchema = ThemeTokensSchema.superRefine((input, context) =
|
|
|
10935
11216
|
});
|
|
10936
11217
|
|
|
10937
11218
|
// src/contracts/tenant.ts
|
|
10938
|
-
var DesignTokenFileSourceSchema =
|
|
10939
|
-
type:
|
|
10940
|
-
path:
|
|
11219
|
+
var DesignTokenFileSourceSchema = z13.object({
|
|
11220
|
+
type: z13.literal("file"),
|
|
11221
|
+
path: z13.string().trim().min(1).superRefine((source, context) => {
|
|
10941
11222
|
if (/^[a-z][a-z\d+.-]*:/i.test(source)) {
|
|
10942
11223
|
context.addIssue({
|
|
10943
11224
|
code: "custom",
|
|
@@ -10946,9 +11227,9 @@ var DesignTokenFileSourceSchema = z12.object({
|
|
|
10946
11227
|
}
|
|
10947
11228
|
})
|
|
10948
11229
|
}).strict();
|
|
10949
|
-
var DesignTokenUrlSourceSchema =
|
|
10950
|
-
type:
|
|
10951
|
-
url:
|
|
11230
|
+
var DesignTokenUrlSourceSchema = z13.object({
|
|
11231
|
+
type: z13.literal("url"),
|
|
11232
|
+
url: z13.string().trim().min(1).superRefine((source, context) => {
|
|
10952
11233
|
if (!/^https?:\/\//i.test(source)) {
|
|
10953
11234
|
context.addIssue({
|
|
10954
11235
|
code: "custom",
|
|
@@ -10957,94 +11238,94 @@ var DesignTokenUrlSourceSchema = z12.object({
|
|
|
10957
11238
|
}
|
|
10958
11239
|
})
|
|
10959
11240
|
}).strict();
|
|
10960
|
-
var DesignTokenInlineSourceSchema =
|
|
10961
|
-
type:
|
|
11241
|
+
var DesignTokenInlineSourceSchema = z13.object({
|
|
11242
|
+
type: z13.literal("inline"),
|
|
10962
11243
|
document: ThemeTokensSchema
|
|
10963
11244
|
}).strict();
|
|
10964
|
-
var DesignTokenSourceSchema =
|
|
11245
|
+
var DesignTokenSourceSchema = z13.discriminatedUnion("type", [
|
|
10965
11246
|
DesignTokenFileSourceSchema,
|
|
10966
11247
|
DesignTokenUrlSourceSchema,
|
|
10967
11248
|
DesignTokenInlineSourceSchema
|
|
10968
11249
|
]);
|
|
10969
|
-
var TenantDesignTokensConfigSchema =
|
|
11250
|
+
var TenantDesignTokensConfigSchema = z13.object({
|
|
10970
11251
|
/** Ordered tenant overrides. The backend always applies the product default first. */
|
|
10971
|
-
tokenSources:
|
|
11252
|
+
tokenSources: z13.array(DesignTokenSourceSchema)
|
|
10972
11253
|
}).strict();
|
|
10973
|
-
var TenantAuthBindingSchema =
|
|
10974
|
-
kind:
|
|
11254
|
+
var TenantAuthBindingSchema = z13.object({
|
|
11255
|
+
kind: z13.literal("auth-provider"),
|
|
10975
11256
|
providerId: ContractIdentifierSchema,
|
|
10976
11257
|
policyRef: ContractIdentifierSchema.optional()
|
|
10977
11258
|
}).strict();
|
|
10978
|
-
var TenantDataBindingSchema =
|
|
10979
|
-
|
|
10980
|
-
kind:
|
|
11259
|
+
var TenantDataBindingSchema = z13.discriminatedUnion("kind", [
|
|
11260
|
+
z13.object({
|
|
11261
|
+
kind: z13.literal("data-provider"),
|
|
10981
11262
|
providerId: ContractIdentifierSchema,
|
|
10982
11263
|
domainRef: ContractIdentifierSchema.optional()
|
|
10983
11264
|
}).strict(),
|
|
10984
|
-
|
|
10985
|
-
kind:
|
|
11265
|
+
z13.object({
|
|
11266
|
+
kind: z13.literal("projection"),
|
|
10986
11267
|
projectionRef: ContractIdentifierSchema,
|
|
10987
11268
|
domainRef: ContractIdentifierSchema.optional()
|
|
10988
11269
|
}).strict()
|
|
10989
11270
|
]);
|
|
10990
|
-
var TenantAuthBindingsSchema =
|
|
11271
|
+
var TenantAuthBindingsSchema = z13.record(
|
|
10991
11272
|
ContractIdentifierSchema,
|
|
10992
11273
|
TenantAuthBindingSchema
|
|
10993
11274
|
);
|
|
10994
|
-
var TenantDataBindingsSchema =
|
|
11275
|
+
var TenantDataBindingsSchema = z13.record(
|
|
10995
11276
|
ContractIdentifierSchema,
|
|
10996
11277
|
TenantDataBindingSchema
|
|
10997
11278
|
);
|
|
10998
|
-
var TenantTrendRadarSourceSchema =
|
|
11279
|
+
var TenantTrendRadarSourceSchema = z13.object({
|
|
10999
11280
|
ontologyId: ContractIdentifierSchema,
|
|
11000
11281
|
viewId: ContractIdentifierSchema
|
|
11001
11282
|
}).strict();
|
|
11002
|
-
var TenantTrendRadarSourcesSchema =
|
|
11283
|
+
var TenantTrendRadarSourcesSchema = z13.object({
|
|
11003
11284
|
hotwords: TenantTrendRadarSourceSchema.optional(),
|
|
11004
11285
|
brands: TenantTrendRadarSourceSchema.optional()
|
|
11005
11286
|
}).strict();
|
|
11006
|
-
var AssetVariantsSchema =
|
|
11007
|
-
light:
|
|
11008
|
-
dark:
|
|
11287
|
+
var AssetVariantsSchema = z13.object({
|
|
11288
|
+
light: z13.string().optional(),
|
|
11289
|
+
dark: z13.string().optional()
|
|
11009
11290
|
}).strict();
|
|
11010
11291
|
var LEGACY_CURRENT_USER_MENU_ITEM_IDS = ["dark-mode", "language", "settings", "logout"];
|
|
11011
11292
|
var CURRENT_USER_MENU_CONTROL_REFS = ["dark-mode", "language"];
|
|
11012
11293
|
var CURRENT_USER_MENU_ACTION_REFS = ["logout"];
|
|
11013
|
-
var CurrentUserMenuIdentifierSchema =
|
|
11014
|
-
var CurrentUserMenuDisplayTextSchema =
|
|
11015
|
-
|
|
11016
|
-
|
|
11294
|
+
var CurrentUserMenuIdentifierSchema = z13.string().trim().regex(/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/, "Expected a stable current-user menu identifier.");
|
|
11295
|
+
var CurrentUserMenuDisplayTextSchema = z13.union([
|
|
11296
|
+
z13.string().trim().min(1),
|
|
11297
|
+
z13.record(z13.string().trim().min(1), z13.string().trim().min(1)).refine((value) => Object.keys(value).length > 0, "Localized menu text must contain at least one locale.")
|
|
11017
11298
|
]);
|
|
11018
|
-
var CurrentUserMenuNavigationItemSchema =
|
|
11299
|
+
var CurrentUserMenuNavigationItemSchema = z13.object({
|
|
11019
11300
|
id: CurrentUserMenuIdentifierSchema,
|
|
11020
|
-
kind:
|
|
11301
|
+
kind: z13.literal("navigation"),
|
|
11021
11302
|
ref: CurrentUserMenuIdentifierSchema
|
|
11022
11303
|
}).strict();
|
|
11023
|
-
var CurrentUserMenuControlItemSchema =
|
|
11304
|
+
var CurrentUserMenuControlItemSchema = z13.object({
|
|
11024
11305
|
id: CurrentUserMenuIdentifierSchema,
|
|
11025
|
-
kind:
|
|
11026
|
-
ref:
|
|
11306
|
+
kind: z13.literal("control"),
|
|
11307
|
+
ref: z13.enum(CURRENT_USER_MENU_CONTROL_REFS)
|
|
11027
11308
|
}).strict();
|
|
11028
|
-
var CurrentUserMenuActionItemSchema =
|
|
11309
|
+
var CurrentUserMenuActionItemSchema = z13.object({
|
|
11029
11310
|
id: CurrentUserMenuIdentifierSchema,
|
|
11030
|
-
kind:
|
|
11031
|
-
ref:
|
|
11032
|
-
tone:
|
|
11311
|
+
kind: z13.literal("action"),
|
|
11312
|
+
ref: z13.enum(CURRENT_USER_MENU_ACTION_REFS),
|
|
11313
|
+
tone: z13.enum(["default", "danger"]).optional()
|
|
11033
11314
|
}).strict();
|
|
11034
|
-
var CurrentUserMenuItemSchema =
|
|
11315
|
+
var CurrentUserMenuItemSchema = z13.discriminatedUnion("kind", [
|
|
11035
11316
|
CurrentUserMenuNavigationItemSchema,
|
|
11036
11317
|
CurrentUserMenuControlItemSchema,
|
|
11037
11318
|
CurrentUserMenuActionItemSchema
|
|
11038
11319
|
]);
|
|
11039
|
-
var CurrentUserMenuSectionSchema =
|
|
11320
|
+
var CurrentUserMenuSectionSchema = z13.object({
|
|
11040
11321
|
id: CurrentUserMenuIdentifierSchema,
|
|
11041
11322
|
label: CurrentUserMenuDisplayTextSchema.optional(),
|
|
11042
|
-
dividerBefore:
|
|
11043
|
-
items:
|
|
11323
|
+
dividerBefore: z13.boolean().optional(),
|
|
11324
|
+
items: z13.array(CurrentUserMenuItemSchema)
|
|
11044
11325
|
}).strict();
|
|
11045
|
-
var CurrentUserMenuConfigSchema =
|
|
11046
|
-
version:
|
|
11047
|
-
sections:
|
|
11326
|
+
var CurrentUserMenuConfigSchema = z13.object({
|
|
11327
|
+
version: z13.literal(1),
|
|
11328
|
+
sections: z13.array(CurrentUserMenuSectionSchema).max(20)
|
|
11048
11329
|
}).strict().superRefine((value, context) => {
|
|
11049
11330
|
const sectionIds = /* @__PURE__ */ new Set();
|
|
11050
11331
|
const itemIds = /* @__PURE__ */ new Set();
|
|
@@ -11078,7 +11359,7 @@ var CurrentUserMenuConfigSchema = z12.object({
|
|
|
11078
11359
|
});
|
|
11079
11360
|
}
|
|
11080
11361
|
});
|
|
11081
|
-
var LegacyCurrentUserMenuProfileSchema =
|
|
11362
|
+
var LegacyCurrentUserMenuProfileSchema = z13.array(z13.enum(LEGACY_CURRENT_USER_MENU_ITEM_IDS)).superRefine((value, context) => {
|
|
11082
11363
|
const seen = /* @__PURE__ */ new Set();
|
|
11083
11364
|
value.forEach((item, index) => {
|
|
11084
11365
|
if (seen.has(item)) {
|
|
@@ -11091,73 +11372,73 @@ var LegacyCurrentUserMenuProfileSchema = z12.array(z12.enum(LEGACY_CURRENT_USER_
|
|
|
11091
11372
|
seen.add(item);
|
|
11092
11373
|
});
|
|
11093
11374
|
});
|
|
11094
|
-
var CurrentUserMenuProfileSchema =
|
|
11095
|
-
|
|
11375
|
+
var CurrentUserMenuProfileSchema = z13.union([
|
|
11376
|
+
z13.literal("*"),
|
|
11096
11377
|
LegacyCurrentUserMenuProfileSchema,
|
|
11097
11378
|
CurrentUserMenuConfigSchema
|
|
11098
11379
|
]);
|
|
11099
|
-
var ThemeHeadbarSchema =
|
|
11100
|
-
theme:
|
|
11101
|
-
navPosition:
|
|
11102
|
-
actions:
|
|
11380
|
+
var ThemeHeadbarSchema = z13.object({
|
|
11381
|
+
theme: z13.enum(["card", "glassy", "ghost"]).optional(),
|
|
11382
|
+
navPosition: z13.enum(["left", "center", "right"]).optional(),
|
|
11383
|
+
actions: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]).optional(),
|
|
11103
11384
|
profile: CurrentUserMenuProfileSchema.optional(),
|
|
11104
|
-
showTeamQuota:
|
|
11385
|
+
showTeamQuota: z13.boolean().optional()
|
|
11105
11386
|
}).strict();
|
|
11106
|
-
var TenantHeadbarModuleLeafSchema =
|
|
11387
|
+
var TenantHeadbarModuleLeafSchema = z13.object({
|
|
11107
11388
|
id: ContractIdentifierSchema,
|
|
11108
|
-
extraInfo:
|
|
11109
|
-
displayName:
|
|
11110
|
-
visible:
|
|
11111
|
-
disabled:
|
|
11112
|
-
icon:
|
|
11113
|
-
showQuickSwitcher:
|
|
11114
|
-
showSidebar:
|
|
11115
|
-
showContentFrame:
|
|
11389
|
+
extraInfo: z13.boolean().optional(),
|
|
11390
|
+
displayName: z13.union([z13.string(), z13.record(LocaleIdentifierSchema, z13.string())]).optional(),
|
|
11391
|
+
visible: z13.boolean().optional(),
|
|
11392
|
+
disabled: z13.boolean().optional(),
|
|
11393
|
+
icon: z13.string().optional(),
|
|
11394
|
+
showQuickSwitcher: z13.boolean().optional(),
|
|
11395
|
+
showSidebar: z13.boolean().optional(),
|
|
11396
|
+
showContentFrame: z13.boolean().optional()
|
|
11116
11397
|
}).strict();
|
|
11117
11398
|
var TenantHeadbarModuleItemSchema = TenantHeadbarModuleLeafSchema.extend({
|
|
11118
|
-
children:
|
|
11119
|
-
}).strict();
|
|
11120
|
-
var KernelHeadbarSchema =
|
|
11121
|
-
theme:
|
|
11122
|
-
layoutMode:
|
|
11123
|
-
heightPx:
|
|
11124
|
-
navPosition:
|
|
11125
|
-
brandTitle:
|
|
11126
|
-
menuRadius:
|
|
11127
|
-
}).strict();
|
|
11128
|
-
var CustomIconSchema =
|
|
11129
|
-
color:
|
|
11130
|
-
url:
|
|
11131
|
-
type:
|
|
11132
|
-
hintTextColor:
|
|
11133
|
-
}).strict();
|
|
11134
|
-
var WorkbenchCustomerToolSchema =
|
|
11399
|
+
children: z13.array(TenantHeadbarModuleLeafSchema).optional()
|
|
11400
|
+
}).strict();
|
|
11401
|
+
var KernelHeadbarSchema = z13.object({
|
|
11402
|
+
theme: z13.literal("card").optional(),
|
|
11403
|
+
layoutMode: z13.enum(["boxed", "full-bleed"]).optional(),
|
|
11404
|
+
heightPx: z13.number().positive().optional(),
|
|
11405
|
+
navPosition: z13.enum(["left", "center", "right"]).optional(),
|
|
11406
|
+
brandTitle: z13.string().optional(),
|
|
11407
|
+
menuRadius: z13.enum(["default", "none", "sm", "md", "lg", "xl", "full"]).optional()
|
|
11408
|
+
}).strict();
|
|
11409
|
+
var CustomIconSchema = z13.object({
|
|
11410
|
+
color: z13.string().optional(),
|
|
11411
|
+
url: z13.string().optional(),
|
|
11412
|
+
type: z13.enum(["svg", "image"]).optional(),
|
|
11413
|
+
hintTextColor: z13.string().optional()
|
|
11414
|
+
}).strict();
|
|
11415
|
+
var WorkbenchCustomerToolSchema = z13.object({
|
|
11135
11416
|
id: ContractIdentifierSchema,
|
|
11136
|
-
label:
|
|
11137
|
-
fixed:
|
|
11417
|
+
label: z13.union([z13.string(), z13.record(LocaleIdentifierSchema, z13.string())]).optional(),
|
|
11418
|
+
fixed: z13.boolean().optional()
|
|
11138
11419
|
}).strict();
|
|
11139
|
-
var WorkbenchStudioOverrideSchema =
|
|
11140
|
-
studioName:
|
|
11141
|
-
dropdownToolsDefault:
|
|
11142
|
-
existingToolsDefault:
|
|
11143
|
-
historyColumnsDefault:
|
|
11420
|
+
var WorkbenchStudioOverrideSchema = z13.object({
|
|
11421
|
+
studioName: z13.string().trim().min(1),
|
|
11422
|
+
dropdownToolsDefault: z13.array(ContractIdentifierSchema).optional(),
|
|
11423
|
+
existingToolsDefault: z13.array(ContractIdentifierSchema).optional(),
|
|
11424
|
+
historyColumnsDefault: z13.number().int().min(1).max(6).optional()
|
|
11144
11425
|
}).strict();
|
|
11145
|
-
var TenantWorkbenchPageContextSchema =
|
|
11426
|
+
var TenantWorkbenchPageContextSchema = z13.object({
|
|
11146
11427
|
workflow: JsonObjectSchema.optional(),
|
|
11147
11428
|
agent: JsonObjectSchema.optional(),
|
|
11148
11429
|
agentId: ContractIdentifierSchema.optional(),
|
|
11149
11430
|
designProject: JsonObjectSchema.optional(),
|
|
11150
11431
|
designMetadataId: ContractIdentifierSchema.optional(),
|
|
11151
|
-
iframeUrl:
|
|
11152
|
-
info:
|
|
11432
|
+
iframeUrl: z13.string().trim().min(1).optional(),
|
|
11433
|
+
info: z13.object({
|
|
11153
11434
|
displayName: LocalizedTextSchema.optional(),
|
|
11154
11435
|
description: LocalizedTextSchema.optional(),
|
|
11155
|
-
iconUrl:
|
|
11436
|
+
iconUrl: z13.string().trim().min(1).optional()
|
|
11156
11437
|
}).strict().optional(),
|
|
11157
|
-
isBuiltinPinned:
|
|
11158
|
-
isBuiltinReadonly:
|
|
11438
|
+
isBuiltinPinned: z13.boolean().optional(),
|
|
11439
|
+
isBuiltinReadonly: z13.boolean().optional()
|
|
11159
11440
|
}).strict();
|
|
11160
|
-
var TenantWorkbenchPageEnvelopeSchema =
|
|
11441
|
+
var TenantWorkbenchPageEnvelopeSchema = z13.object({
|
|
11161
11442
|
definition: PageDefinitionSchema,
|
|
11162
11443
|
context: TenantWorkbenchPageContextSchema
|
|
11163
11444
|
}).strict().superRefine(({ definition }, context) => {
|
|
@@ -11190,56 +11471,56 @@ var TenantWorkbenchPageEnvelopeSchema = z12.object({
|
|
|
11190
11471
|
});
|
|
11191
11472
|
}
|
|
11192
11473
|
});
|
|
11193
|
-
var TenantWorkbenchPageGroupSchema =
|
|
11474
|
+
var TenantWorkbenchPageGroupSchema = z13.object({
|
|
11194
11475
|
id: ContractIdentifierSchema,
|
|
11195
|
-
pageIds:
|
|
11476
|
+
pageIds: z13.array(ContractIdentifierSchema),
|
|
11196
11477
|
displayName: LocalizedTextSchema,
|
|
11197
|
-
isBuiltIn:
|
|
11198
|
-
iconUrl:
|
|
11199
|
-
sortIndex:
|
|
11478
|
+
isBuiltIn: z13.boolean(),
|
|
11479
|
+
iconUrl: z13.string().optional(),
|
|
11480
|
+
sortIndex: z13.number().int().nullable().optional(),
|
|
11200
11481
|
presetRelationId: ContractIdentifierSchema.optional(),
|
|
11201
11482
|
relationKey: ContractIdentifierSchema.nullable().optional(),
|
|
11202
11483
|
studioId: ContractIdentifierSchema.optional()
|
|
11203
11484
|
}).strict();
|
|
11204
|
-
var TenantWorkbenchConfigSchema =
|
|
11205
|
-
pages:
|
|
11206
|
-
pageGroups:
|
|
11207
|
-
catalog:
|
|
11208
|
-
quickSwitcherMaxItems:
|
|
11209
|
-
defaultOrder:
|
|
11210
|
-
groups:
|
|
11211
|
-
pages:
|
|
11485
|
+
var TenantWorkbenchConfigSchema = z13.object({
|
|
11486
|
+
pages: z13.array(TenantWorkbenchPageEnvelopeSchema),
|
|
11487
|
+
pageGroups: z13.array(TenantWorkbenchPageGroupSchema),
|
|
11488
|
+
catalog: z13.object({ enabled: z13.boolean().optional(), defaultEntry: z13.boolean().optional() }).strict().optional(),
|
|
11489
|
+
quickSwitcherMaxItems: z13.number().int().nonnegative().optional(),
|
|
11490
|
+
defaultOrder: z13.object({
|
|
11491
|
+
groups: z13.array(ContractIdentifierSchema),
|
|
11492
|
+
pages: z13.record(ContractIdentifierSchema, z13.array(ContractIdentifierSchema))
|
|
11212
11493
|
}).strict().optional(),
|
|
11213
|
-
customers:
|
|
11214
|
-
dropdownToolsDefault:
|
|
11215
|
-
layoutManagerTools:
|
|
11216
|
-
studioTabsMode:
|
|
11217
|
-
historyWatermark:
|
|
11218
|
-
svgUrl:
|
|
11219
|
-
coverage:
|
|
11220
|
-
maxLongEdgeRatio:
|
|
11221
|
-
sizing:
|
|
11494
|
+
customers: z13.object({
|
|
11495
|
+
dropdownToolsDefault: z13.array(ContractIdentifierSchema).optional(),
|
|
11496
|
+
layoutManagerTools: z13.array(WorkbenchCustomerToolSchema).optional(),
|
|
11497
|
+
studioTabsMode: z13.enum(["dropdown", "tabs"]).optional(),
|
|
11498
|
+
historyWatermark: z13.object({
|
|
11499
|
+
svgUrl: z13.string().optional(),
|
|
11500
|
+
coverage: z13.array(z13.enum(["list", "detail", "download"])).optional(),
|
|
11501
|
+
maxLongEdgeRatio: z13.number().positive().optional(),
|
|
11502
|
+
sizing: z13.object({
|
|
11222
11503
|
mode: ContractIdentifierSchema,
|
|
11223
|
-
heightRatio:
|
|
11224
|
-
minHeightPx:
|
|
11225
|
-
maxHeightPx:
|
|
11504
|
+
heightRatio: z13.number().positive().optional(),
|
|
11505
|
+
minHeightPx: z13.number().nonnegative().optional(),
|
|
11506
|
+
maxHeightPx: z13.number().nonnegative().optional()
|
|
11226
11507
|
}).strict().optional(),
|
|
11227
|
-
enhance:
|
|
11228
|
-
enabled:
|
|
11229
|
-
backgroundLumaThreshold:
|
|
11230
|
-
stroke:
|
|
11231
|
-
color:
|
|
11232
|
-
opacity:
|
|
11233
|
-
widthRatio:
|
|
11234
|
-
blurRatio:
|
|
11235
|
-
steps:
|
|
11508
|
+
enhance: z13.object({
|
|
11509
|
+
enabled: z13.boolean().optional(),
|
|
11510
|
+
backgroundLumaThreshold: z13.number().min(0).max(1).optional(),
|
|
11511
|
+
stroke: z13.object({
|
|
11512
|
+
color: z13.string().optional(),
|
|
11513
|
+
opacity: z13.number().min(0).max(1).optional(),
|
|
11514
|
+
widthRatio: z13.number().nonnegative().optional(),
|
|
11515
|
+
blurRatio: z13.number().nonnegative().optional(),
|
|
11516
|
+
steps: z13.number().int().positive().optional()
|
|
11236
11517
|
}).strict().optional()
|
|
11237
11518
|
}).strict().optional()
|
|
11238
11519
|
}).strict().optional(),
|
|
11239
|
-
layoutManagerEnabled:
|
|
11240
|
-
existingToolsDefault:
|
|
11241
|
-
historyColumnsDefault:
|
|
11242
|
-
studioOverrides:
|
|
11520
|
+
layoutManagerEnabled: z13.boolean().optional(),
|
|
11521
|
+
existingToolsDefault: z13.array(ContractIdentifierSchema).optional(),
|
|
11522
|
+
historyColumnsDefault: z13.number().int().min(1).max(6).optional(),
|
|
11523
|
+
studioOverrides: z13.array(WorkbenchStudioOverrideSchema).optional()
|
|
11243
11524
|
}).strict().optional()
|
|
11244
11525
|
}).strict().superRefine(({ pages, pageGroups }, context) => {
|
|
11245
11526
|
const pageIds = pages.map(({ definition }) => definition.pageId);
|
|
@@ -11263,38 +11544,38 @@ var TenantWorkbenchConfigSchema = z12.object({
|
|
|
11263
11544
|
});
|
|
11264
11545
|
});
|
|
11265
11546
|
});
|
|
11266
|
-
var LoginPageSchema =
|
|
11267
|
-
background:
|
|
11268
|
-
logo:
|
|
11269
|
-
url:
|
|
11270
|
-
lightUrl:
|
|
11271
|
-
darkUrl:
|
|
11272
|
-
position:
|
|
11273
|
-
scale:
|
|
11547
|
+
var LoginPageSchema = z13.object({
|
|
11548
|
+
background: z13.object({ imageUrl: z13.string().optional(), gradient: z13.string().optional() }).strict().optional(),
|
|
11549
|
+
logo: z13.object({
|
|
11550
|
+
url: z13.string().optional(),
|
|
11551
|
+
lightUrl: z13.string().optional(),
|
|
11552
|
+
darkUrl: z13.string().optional(),
|
|
11553
|
+
position: z13.enum(["top", "middle", "bottom"]).optional(),
|
|
11554
|
+
scale: z13.number().positive().optional()
|
|
11274
11555
|
}).strict().optional(),
|
|
11275
|
-
customCss:
|
|
11556
|
+
customCss: z13.string().optional()
|
|
11276
11557
|
}).strict();
|
|
11277
11558
|
var LandingPageHeadbarConfigShape = {
|
|
11278
|
-
headbarMode:
|
|
11559
|
+
headbarMode: z13.enum(["shared", "hidden"]).optional()
|
|
11279
11560
|
};
|
|
11280
|
-
var LandingPageDefaultConfigSchema =
|
|
11281
|
-
mode:
|
|
11561
|
+
var LandingPageDefaultConfigSchema = z13.object({
|
|
11562
|
+
mode: z13.literal("default"),
|
|
11282
11563
|
...LandingPageHeadbarConfigShape
|
|
11283
11564
|
}).strict();
|
|
11284
|
-
var LandingPageMarkdownConfigSchema =
|
|
11285
|
-
mode:
|
|
11286
|
-
content:
|
|
11565
|
+
var LandingPageMarkdownConfigSchema = z13.object({
|
|
11566
|
+
mode: z13.literal("markdown"),
|
|
11567
|
+
content: z13.string(),
|
|
11287
11568
|
...LandingPageHeadbarConfigShape
|
|
11288
11569
|
}).strict();
|
|
11289
|
-
var LandingPageHtmlConfigSchema =
|
|
11290
|
-
mode:
|
|
11291
|
-
content:
|
|
11570
|
+
var LandingPageHtmlConfigSchema = z13.object({
|
|
11571
|
+
mode: z13.literal("html"),
|
|
11572
|
+
content: z13.string(),
|
|
11292
11573
|
...LandingPageHeadbarConfigShape
|
|
11293
11574
|
}).strict();
|
|
11294
|
-
var LandingPageIframeConfigSchema =
|
|
11295
|
-
mode:
|
|
11575
|
+
var LandingPageIframeConfigSchema = z13.object({
|
|
11576
|
+
mode: z13.literal("iframe"),
|
|
11296
11577
|
...LandingPageHeadbarConfigShape,
|
|
11297
|
-
url:
|
|
11578
|
+
url: z13.string().refine((value) => {
|
|
11298
11579
|
if (/^\/(?!\/)/.test(value)) {
|
|
11299
11580
|
return !value.includes("\\");
|
|
11300
11581
|
}
|
|
@@ -11306,422 +11587,425 @@ var LandingPageIframeConfigSchema = z12.object({
|
|
|
11306
11587
|
}
|
|
11307
11588
|
}, "Landing page iframe URL must use a root-relative path or HTTP(S) without embedded credentials.")
|
|
11308
11589
|
}).strict();
|
|
11309
|
-
var TenantLandingPageConfigSchema =
|
|
11590
|
+
var TenantLandingPageConfigSchema = z13.discriminatedUnion("mode", [
|
|
11310
11591
|
LandingPageDefaultConfigSchema,
|
|
11311
11592
|
LandingPageMarkdownConfigSchema,
|
|
11312
11593
|
LandingPageHtmlConfigSchema,
|
|
11313
11594
|
LandingPageIframeConfigSchema
|
|
11314
11595
|
]);
|
|
11315
|
-
var TenantApplicationConfigSchema =
|
|
11316
|
-
theme:
|
|
11317
|
-
id:
|
|
11318
|
-
name:
|
|
11319
|
-
title:
|
|
11596
|
+
var TenantApplicationConfigSchema = z13.object({
|
|
11597
|
+
theme: z13.object({
|
|
11598
|
+
id: z13.string().optional(),
|
|
11599
|
+
name: z13.string().optional(),
|
|
11600
|
+
title: z13.string().optional(),
|
|
11320
11601
|
favicon: AssetVariantsSchema.optional(),
|
|
11321
11602
|
logo: AssetVariantsSchema.optional(),
|
|
11322
|
-
pwaIcon:
|
|
11323
|
-
form:
|
|
11324
|
-
toast:
|
|
11325
|
-
position:
|
|
11603
|
+
pwaIcon: z13.string().optional(),
|
|
11604
|
+
form: z13.object({ variant: z13.enum(["bento", "ghost"]) }).strict().optional(),
|
|
11605
|
+
toast: z13.object({
|
|
11606
|
+
position: z13.enum(["top-right", "top-left", "bottom-right", "bottom-left", "top-center", "bottom-center"])
|
|
11326
11607
|
}).strict().optional(),
|
|
11327
|
-
icons:
|
|
11328
|
-
views:
|
|
11329
|
-
form:
|
|
11330
|
-
toast:
|
|
11331
|
-
progress:
|
|
11332
|
-
onlyResult:
|
|
11333
|
-
tabular:
|
|
11608
|
+
icons: z13.object({ error: CustomIconSchema.optional(), empty: CustomIconSchema.optional() }).strict().optional(),
|
|
11609
|
+
views: z13.object({
|
|
11610
|
+
form: z13.object({
|
|
11611
|
+
toast: z13.object({ afterCreate: z13.boolean(), afterDelete: z13.boolean() }).strict(),
|
|
11612
|
+
progress: z13.enum(["estimate", "infinite"]),
|
|
11613
|
+
onlyResult: z13.boolean(),
|
|
11614
|
+
tabular: z13.object({ theme: z13.enum(["default", "tentiary", "primary"]) }).strict()
|
|
11334
11615
|
}).strict()
|
|
11335
11616
|
}).strict().optional(),
|
|
11336
11617
|
loginPage: LoginPageSchema.optional(),
|
|
11337
|
-
extraLanguageURL:
|
|
11338
|
-
hideSpaceHeader:
|
|
11339
|
-
showSidebarTeamSelector:
|
|
11340
|
-
showWorkbenchSidebar:
|
|
11341
|
-
workbenchViewTheme:
|
|
11342
|
-
defaults:
|
|
11343
|
-
showFormInImageDetail:
|
|
11344
|
-
darkMode:
|
|
11345
|
-
language:
|
|
11346
|
-
showDarkModeToggle:
|
|
11347
|
-
showLanguageToggle:
|
|
11618
|
+
extraLanguageURL: z13.record(z13.string(), z13.string()).optional(),
|
|
11619
|
+
hideSpaceHeader: z13.boolean().optional(),
|
|
11620
|
+
showSidebarTeamSelector: z13.boolean().optional(),
|
|
11621
|
+
showWorkbenchSidebar: z13.boolean().optional(),
|
|
11622
|
+
workbenchViewTheme: z13.enum(["default", "bsd-blue"]).optional(),
|
|
11623
|
+
defaults: z13.object({
|
|
11624
|
+
showFormInImageDetail: z13.boolean().optional(),
|
|
11625
|
+
darkMode: z13.enum(["light", "dark", "auto"]).optional(),
|
|
11626
|
+
language: z13.enum(["en-US", "zh-CN", "ja-JP"]).optional(),
|
|
11627
|
+
showDarkModeToggle: z13.boolean().optional(),
|
|
11628
|
+
showLanguageToggle: z13.boolean().optional()
|
|
11348
11629
|
}).strict().optional(),
|
|
11349
|
-
modules:
|
|
11350
|
-
monkeysSpaceSidebar:
|
|
11351
|
-
monkeysSpaceHeadbar:
|
|
11352
|
-
|
|
11353
|
-
|
|
11630
|
+
modules: z13.object({
|
|
11631
|
+
monkeysSpaceSidebar: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]).optional(),
|
|
11632
|
+
monkeysSpaceHeadbar: z13.union([
|
|
11633
|
+
z13.literal("*"),
|
|
11634
|
+
z13.array(TenantHeadbarModuleItemSchema)
|
|
11354
11635
|
]).optional(),
|
|
11355
|
-
settingsSidebar:
|
|
11636
|
+
settingsSidebar: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]).optional()
|
|
11356
11637
|
}).strict().optional(),
|
|
11357
11638
|
headbar: ThemeHeadbarSchema.optional(),
|
|
11358
|
-
kernelLayout:
|
|
11359
|
-
navigationMode:
|
|
11360
|
-
allowNavigationModeSwitch:
|
|
11639
|
+
kernelLayout: z13.object({
|
|
11640
|
+
navigationMode: z13.enum(["sidebar", "topbar"]).optional(),
|
|
11641
|
+
allowNavigationModeSwitch: z13.boolean().optional(),
|
|
11361
11642
|
headbar: KernelHeadbarSchema.optional()
|
|
11362
11643
|
}).strict().optional(),
|
|
11363
|
-
paginationPosition:
|
|
11364
|
-
ugcViewIconOnlyMode:
|
|
11365
|
-
workflowPreviewExecutionGrid:
|
|
11366
|
-
selectionModeDisplayType:
|
|
11367
|
-
clickBehavior:
|
|
11368
|
-
showErrorFilter:
|
|
11369
|
-
displayType:
|
|
11370
|
-
showDetailButton:
|
|
11644
|
+
paginationPosition: z13.enum(["left", "right"]).optional(),
|
|
11645
|
+
ugcViewIconOnlyMode: z13.boolean().optional(),
|
|
11646
|
+
workflowPreviewExecutionGrid: z13.object({
|
|
11647
|
+
selectionModeDisplayType: z13.enum(["operation-button", "dropdown-menu"]).optional(),
|
|
11648
|
+
clickBehavior: z13.enum(["preview", "select", "fill-form", "none"]).optional(),
|
|
11649
|
+
showErrorFilter: z13.boolean().optional(),
|
|
11650
|
+
displayType: z13.enum(["grid", "masonry"]).optional(),
|
|
11651
|
+
showDetailButton: z13.boolean().optional()
|
|
11371
11652
|
}).strict().optional(),
|
|
11372
|
-
workbenchSidebarDefaultOpen:
|
|
11373
|
-
workbenchSidebarMoreAction:
|
|
11374
|
-
workbenchSidebarApart:
|
|
11375
|
-
workbenchSidebarToggleGroupDetail:
|
|
11376
|
-
workbenchSidebarViewType:
|
|
11377
|
-
workbenchSidebarFormViewEmbed:
|
|
11378
|
-
workbenchSidebarModernMode:
|
|
11379
|
-
ugc:
|
|
11380
|
-
uniImagePreview:
|
|
11381
|
-
imagePreviewStyle:
|
|
11382
|
-
teamAsUser:
|
|
11383
|
-
themeMode:
|
|
11384
|
-
density:
|
|
11385
|
-
pageZoom:
|
|
11386
|
-
miniMode:
|
|
11387
|
-
workflow:
|
|
11388
|
-
historyResult:
|
|
11389
|
-
uploader:
|
|
11390
|
-
orientation:
|
|
11391
|
-
pasteButton:
|
|
11392
|
-
statusText:
|
|
11653
|
+
workbenchSidebarDefaultOpen: z13.boolean().optional(),
|
|
11654
|
+
workbenchSidebarMoreAction: z13.boolean().optional(),
|
|
11655
|
+
workbenchSidebarApart: z13.boolean().optional(),
|
|
11656
|
+
workbenchSidebarToggleGroupDetail: z13.boolean().optional(),
|
|
11657
|
+
workbenchSidebarViewType: z13.boolean().optional(),
|
|
11658
|
+
workbenchSidebarFormViewEmbed: z13.boolean().optional(),
|
|
11659
|
+
workbenchSidebarModernMode: z13.boolean().optional(),
|
|
11660
|
+
ugc: z13.object({ onItemClick: z13.boolean(), subtitle: z13.boolean().optional() }).strict().optional(),
|
|
11661
|
+
uniImagePreview: z13.boolean().optional(),
|
|
11662
|
+
imagePreviewStyle: z13.union([z13.literal(false), z13.enum(["simple", "normal", "uni"])]).optional(),
|
|
11663
|
+
teamAsUser: z13.boolean().optional(),
|
|
11664
|
+
themeMode: z13.enum(["shadow", "border"]).optional(),
|
|
11665
|
+
density: z13.enum(["compact", "default", "comfortable"]).optional(),
|
|
11666
|
+
pageZoom: z13.number().positive().optional(),
|
|
11667
|
+
miniMode: z13.object({ showPreviewViewExecutionResultGrid: z13.boolean() }).strict().optional(),
|
|
11668
|
+
workflow: z13.object({ allowConcurrentRuns: z13.boolean() }).strict().optional(),
|
|
11669
|
+
historyResult: z13.object({ display: z13.boolean() }).strict().optional(),
|
|
11670
|
+
uploader: z13.object({
|
|
11671
|
+
orientation: z13.enum(["vertical", "horizontal"]),
|
|
11672
|
+
pasteButton: z13.boolean(),
|
|
11673
|
+
statusText: z13.boolean()
|
|
11393
11674
|
}).strict().optional(),
|
|
11394
|
-
designProjects:
|
|
11395
|
-
oneOnOne:
|
|
11396
|
-
newTabOpenBoard:
|
|
11397
|
-
defaultShowGrid:
|
|
11398
|
-
createDefaultFrame:
|
|
11399
|
-
showPageMenu:
|
|
11400
|
-
showMainMenu:
|
|
11401
|
-
showStylePanel:
|
|
11402
|
-
showToolbar:
|
|
11403
|
-
toolbarPosition:
|
|
11404
|
-
showContextMenu:
|
|
11405
|
-
showActionsMenu:
|
|
11406
|
-
showPageAndLayerSidebar:
|
|
11407
|
-
showBoardOperationSidebar:
|
|
11408
|
-
showMiniToolsToolbar:
|
|
11409
|
-
showRightSidebar:
|
|
11410
|
-
showRealtimeDrawing:
|
|
11411
|
-
showWorkflow:
|
|
11412
|
-
showVersionManager:
|
|
11413
|
-
showAgent:
|
|
11414
|
-
AgentTools:
|
|
11675
|
+
designProjects: z13.object({
|
|
11676
|
+
oneOnOne: z13.boolean(),
|
|
11677
|
+
newTabOpenBoard: z13.boolean(),
|
|
11678
|
+
defaultShowGrid: z13.boolean().optional(),
|
|
11679
|
+
createDefaultFrame: z13.boolean(),
|
|
11680
|
+
showPageMenu: z13.boolean(),
|
|
11681
|
+
showMainMenu: z13.boolean(),
|
|
11682
|
+
showStylePanel: z13.boolean(),
|
|
11683
|
+
showToolbar: z13.boolean(),
|
|
11684
|
+
toolbarPosition: z13.enum(["bottom", "left"]).optional(),
|
|
11685
|
+
showContextMenu: z13.boolean(),
|
|
11686
|
+
showActionsMenu: z13.boolean(),
|
|
11687
|
+
showPageAndLayerSidebar: z13.boolean().optional(),
|
|
11688
|
+
showBoardOperationSidebar: z13.boolean().optional(),
|
|
11689
|
+
showMiniToolsToolbar: z13.boolean().optional(),
|
|
11690
|
+
showRightSidebar: z13.boolean().optional(),
|
|
11691
|
+
showRealtimeDrawing: z13.boolean().optional(),
|
|
11692
|
+
showWorkflow: z13.boolean().optional(),
|
|
11693
|
+
showVersionManager: z13.boolean().optional(),
|
|
11694
|
+
showAgent: z13.boolean().optional(),
|
|
11695
|
+
AgentTools: z13.array(ContractIdentifierSchema).optional()
|
|
11415
11696
|
}).strict().optional(),
|
|
11416
11697
|
workbench: TenantWorkbenchConfigSchema.optional(),
|
|
11417
|
-
visionProWorkflows:
|
|
11418
|
-
initTeam:
|
|
11419
|
-
imageThumbnail:
|
|
11420
|
-
pages:
|
|
11421
|
-
allowPageKeys:
|
|
11698
|
+
visionProWorkflows: z13.array(ContractIdentifierSchema).optional(),
|
|
11699
|
+
initTeam: z13.boolean().optional(),
|
|
11700
|
+
imageThumbnail: z13.boolean().optional(),
|
|
11701
|
+
pages: z13.object({
|
|
11702
|
+
allowPageKeys: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]),
|
|
11422
11703
|
defaultPageKey: ContractIdentifierSchema.optional()
|
|
11423
11704
|
}).strict().optional(),
|
|
11424
|
-
agent:
|
|
11705
|
+
agent: z13.object({
|
|
11425
11706
|
logo: AssetVariantsSchema.optional(),
|
|
11426
|
-
brandDisplayMode:
|
|
11427
|
-
density:
|
|
11707
|
+
brandDisplayMode: z13.enum(["auto", "logo-only", "logo-name", "name-only"]).optional(),
|
|
11708
|
+
density: z13.enum(["compact", "default", "comfortable"]).optional(),
|
|
11709
|
+
sessionCentric: z13.boolean().optional()
|
|
11428
11710
|
}).strict().optional()
|
|
11429
11711
|
}).strict(),
|
|
11430
11712
|
landingPage: TenantLandingPageConfigSchema.optional(),
|
|
11431
|
-
auth:
|
|
11432
|
-
enabled:
|
|
11433
|
-
oidc:
|
|
11434
|
-
password:
|
|
11435
|
-
hideAuthToast:
|
|
11436
|
-
autoReload:
|
|
11437
|
-
defaultOtherTeam:
|
|
11713
|
+
auth: z13.object({
|
|
11714
|
+
enabled: z13.array(ContractIdentifierSchema).default([]),
|
|
11715
|
+
oidc: z13.object({ buttonText: z13.string().optional(), autoSignin: z13.boolean().optional() }).strict().optional(),
|
|
11716
|
+
password: z13.object({ disableAutoRegister: z13.boolean().optional() }).strict().optional(),
|
|
11717
|
+
hideAuthToast: z13.boolean().optional(),
|
|
11718
|
+
autoReload: z13.boolean().optional(),
|
|
11719
|
+
defaultOtherTeam: z13.boolean().optional()
|
|
11438
11720
|
}).strict(),
|
|
11439
|
-
endpoints:
|
|
11440
|
-
module:
|
|
11441
|
-
behavior:
|
|
11442
|
-
clearWorkflowFormStorageAfterUpdate:
|
|
11443
|
-
autoApproveOAuth:
|
|
11444
|
-
rememberWorkflowModelSelection:
|
|
11721
|
+
endpoints: z13.record(ContractIdentifierSchema, z13.string()),
|
|
11722
|
+
module: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]),
|
|
11723
|
+
behavior: z13.object({
|
|
11724
|
+
clearWorkflowFormStorageAfterUpdate: z13.boolean().optional(),
|
|
11725
|
+
autoApproveOAuth: z13.boolean().optional(),
|
|
11726
|
+
rememberWorkflowModelSelection: z13.boolean().optional()
|
|
11445
11727
|
}).strict(),
|
|
11446
|
-
dataManagement:
|
|
11447
|
-
favoriteOntologyId:
|
|
11448
|
-
pairedOntologyId:
|
|
11449
|
-
galleryOntologyIds:
|
|
11450
|
-
galleryOntologyId:
|
|
11451
|
-
dataBrowserDefaultOntologyId:
|
|
11452
|
-
workflowResultOntologyId:
|
|
11453
|
-
homeAdvertisement:
|
|
11728
|
+
dataManagement: z13.object({
|
|
11729
|
+
favoriteOntologyId: z13.string().optional(),
|
|
11730
|
+
pairedOntologyId: z13.string().optional(),
|
|
11731
|
+
galleryOntologyIds: z13.array(ContractIdentifierSchema).max(20).optional(),
|
|
11732
|
+
galleryOntologyId: z13.string().optional(),
|
|
11733
|
+
dataBrowserDefaultOntologyId: z13.string().optional(),
|
|
11734
|
+
workflowResultOntologyId: z13.string().optional(),
|
|
11735
|
+
homeAdvertisement: z13.object({
|
|
11454
11736
|
ontologyId: ContractIdentifierSchema,
|
|
11455
11737
|
viewId: ContractIdentifierSchema.optional(),
|
|
11456
|
-
viewType:
|
|
11738
|
+
viewType: z13.enum(["filter", "container", "share_link"]).optional(),
|
|
11457
11739
|
teamId: ContractIdentifierSchema.optional(),
|
|
11458
|
-
teamOnly:
|
|
11459
|
-
pageSize:
|
|
11460
|
-
sortBy:
|
|
11461
|
-
sortOrder:
|
|
11462
|
-
fieldMap:
|
|
11463
|
-
columnIds:
|
|
11740
|
+
teamOnly: z13.boolean().optional(),
|
|
11741
|
+
pageSize: z13.number().int().positive().optional(),
|
|
11742
|
+
sortBy: z13.enum(["pin_order", "asset_id", "updated_timestamp", "created_timestamp"]).optional(),
|
|
11743
|
+
sortOrder: z13.enum(["asc", "desc"]).optional(),
|
|
11744
|
+
fieldMap: z13.record(z13.string(), z13.string()).optional(),
|
|
11745
|
+
columnIds: z13.record(z13.string(), z13.string()).optional()
|
|
11464
11746
|
}).strict().optional(),
|
|
11465
|
-
homeTrendAssistant:
|
|
11747
|
+
homeTrendAssistant: z13.object({
|
|
11466
11748
|
ontologyId: ContractIdentifierSchema.optional(),
|
|
11467
11749
|
viewId: ContractIdentifierSchema.optional(),
|
|
11468
11750
|
viewInstanceId: ContractIdentifierSchema.optional(),
|
|
11469
|
-
viewName:
|
|
11751
|
+
viewName: z13.string().optional(),
|
|
11470
11752
|
teamId: ContractIdentifierSchema.optional(),
|
|
11471
11753
|
designOptionsWorkflowId: ContractIdentifierSchema.optional(),
|
|
11472
|
-
tep:
|
|
11473
|
-
runtime:
|
|
11754
|
+
tep: z13.object({ baseUrl: z13.string().optional(), timeoutMs: z13.number().int().positive().optional() }).strict().optional(),
|
|
11755
|
+
runtime: z13.object({ appId: ContractIdentifierSchema, tepBaseUrlConfigured: z13.boolean(), tepAuthorizationConfigured: z13.boolean(), tepCookieConfigured: z13.boolean() }).strict().optional()
|
|
11474
11756
|
}).strict().optional(),
|
|
11475
11757
|
trendRadar: TenantTrendRadarSourcesSchema.optional(),
|
|
11476
|
-
sharing:
|
|
11477
|
-
silentViewLinks:
|
|
11478
|
-
shareAccess:
|
|
11479
|
-
shareDialog:
|
|
11480
|
-
audience:
|
|
11481
|
-
accessLevel:
|
|
11482
|
-
viewTreeDelivery:
|
|
11758
|
+
sharing: z13.object({
|
|
11759
|
+
silentViewLinks: z13.object({ enabled: z13.boolean().optional(), placement: z13.object({ mode: z13.enum(["sourceOntology", "ontology"]).optional(), ontologyId: ContractIdentifierSchema.optional(), parentId: ContractIdentifierSchema.optional(), navId: ContractIdentifierSchema.optional() }).strict().optional() }).strict().optional(),
|
|
11760
|
+
shareAccess: z13.object({ publicLinksEnabled: z13.boolean().optional(), passwordGateEnabled: z13.boolean().optional(), passwordAccessTtlSeconds: z13.number().int().positive().optional(), defaultViewTreeDelivery: z13.enum(["manual", "auto"]).optional() }).strict().optional(),
|
|
11761
|
+
shareDialog: z13.object({
|
|
11762
|
+
audience: z13.object({ enabled: z13.boolean().optional(), allowed: z13.array(z13.enum(["user", "team", "public"])).optional(), default: z13.enum(["user", "team", "public"]).optional() }).strict().optional(),
|
|
11763
|
+
accessLevel: z13.object({ enabled: z13.boolean().optional(), allowed: z13.array(z13.enum(["read", "write"])).optional(), default: z13.enum(["read", "write"]).optional() }).strict().optional(),
|
|
11764
|
+
viewTreeDelivery: z13.object({ enabled: z13.boolean().optional(), allowed: z13.array(z13.enum(["manual", "auto"])).optional(), default: z13.enum(["manual", "auto"]).optional() }).strict().optional()
|
|
11483
11765
|
}).strict().optional()
|
|
11484
11766
|
}).strict().optional()
|
|
11485
11767
|
}).strict().optional(),
|
|
11486
|
-
compute:
|
|
11487
|
-
integrations:
|
|
11488
|
-
harbor:
|
|
11489
|
-
gitlab:
|
|
11490
|
-
kubernetes:
|
|
11768
|
+
compute: z13.object({
|
|
11769
|
+
integrations: z13.object({
|
|
11770
|
+
harbor: z13.object({ endpoint: z13.string().optional(), projectScopes: z13.array(z13.string()).optional(), authMode: z13.string().optional(), principal: z13.string().optional(), autoSync: z13.boolean().optional(), proxyUrl: z13.string().optional() }).strict().optional(),
|
|
11771
|
+
gitlab: z13.object({ baseUrl: z13.string().optional(), groupScopes: z13.array(z13.string()).optional(), tokenMode: z13.string().optional(), deployProjectPath: z13.string().optional(), deploymentReportsEnabled: z13.boolean().optional(), proxyUrl: z13.string().optional() }).strict().optional(),
|
|
11772
|
+
kubernetes: z13.object({ accessMode: z13.string().optional(), clusterAlias: z13.string().optional(), agentProjectPath: z13.string().optional(), agentName: z13.string().optional(), namespaceScopes: z13.array(z13.string()).optional(), rolloutObserverEnabled: z13.boolean().optional(), proxyUrl: z13.string().optional() }).strict().optional()
|
|
11491
11773
|
}).strict().optional()
|
|
11492
11774
|
}).strict().optional(),
|
|
11493
|
-
data:
|
|
11494
|
-
storage:
|
|
11495
|
-
presignMode:
|
|
11496
|
-
presign:
|
|
11497
|
-
expiresInSeconds:
|
|
11498
|
-
buckets:
|
|
11499
|
-
|
|
11775
|
+
data: z13.object({}).strict().optional(),
|
|
11776
|
+
storage: z13.object({
|
|
11777
|
+
presignMode: z13.enum(["frontend", "backend", "both"]).optional(),
|
|
11778
|
+
presign: z13.object({
|
|
11779
|
+
expiresInSeconds: z13.number().int().positive(),
|
|
11780
|
+
buckets: z13.array(
|
|
11781
|
+
z13.object({
|
|
11500
11782
|
id: ContractIdentifierSchema,
|
|
11501
11783
|
provider: ContractIdentifierSchema,
|
|
11502
11784
|
preferredUrlPatternId: ContractIdentifierSchema,
|
|
11503
|
-
urlPatterns:
|
|
11504
|
-
|
|
11785
|
+
urlPatterns: z13.array(
|
|
11786
|
+
z13.object({
|
|
11505
11787
|
id: ContractIdentifierSchema,
|
|
11506
|
-
type:
|
|
11507
|
-
hostname:
|
|
11508
|
-
preferred:
|
|
11509
|
-
bucketSegment:
|
|
11788
|
+
type: z13.enum(["bucket-hostname", "provider-hostname"]),
|
|
11789
|
+
hostname: z13.string().trim().min(1),
|
|
11790
|
+
preferred: z13.boolean().optional(),
|
|
11791
|
+
bucketSegment: z13.string().optional()
|
|
11510
11792
|
}).strict()
|
|
11511
11793
|
)
|
|
11512
11794
|
}).strict()
|
|
11513
11795
|
)
|
|
11514
11796
|
}).strict().optional()
|
|
11515
11797
|
}).strict().optional(),
|
|
11516
|
-
monkeyData:
|
|
11798
|
+
monkeyData: z13.object({ baseUrl: z13.string().optional() }).strict().optional()
|
|
11517
11799
|
}).strict();
|
|
11518
|
-
var TenantProductConfigSchema =
|
|
11519
|
-
contract:
|
|
11800
|
+
var TenantProductConfigSchema = z13.object({
|
|
11801
|
+
contract: z13.literal("TenantProductConfig"),
|
|
11520
11802
|
tenantId: ContractIdentifierSchema,
|
|
11521
11803
|
appId: ContractIdentifierSchema,
|
|
11522
11804
|
environment: ContractIdentifierSchema,
|
|
11523
11805
|
designTokens: TenantDesignTokensConfigSchema,
|
|
11524
|
-
moduleRefs:
|
|
11525
|
-
pageRefs:
|
|
11526
|
-
featureFlags:
|
|
11806
|
+
moduleRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11807
|
+
pageRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11808
|
+
featureFlags: z13.record(z13.string(), z13.boolean()).default({}),
|
|
11527
11809
|
authBinding: TenantAuthBindingsSchema,
|
|
11528
11810
|
dataBinding: TenantDataBindingsSchema,
|
|
11529
|
-
sourceMap:
|
|
11530
|
-
warnings:
|
|
11811
|
+
sourceMap: z13.record(z13.string(), ContractIdentifierSchema),
|
|
11812
|
+
warnings: z13.array(z13.string()).default([]),
|
|
11813
|
+
menus: MenuDefinitionSetSchema.optional(),
|
|
11531
11814
|
applicationConfig: TenantApplicationConfigSchema
|
|
11532
11815
|
}).strict();
|
|
11533
|
-
var TenantRuntimeConfigSchema =
|
|
11534
|
-
contract:
|
|
11816
|
+
var TenantRuntimeConfigSchema = z13.object({
|
|
11817
|
+
contract: z13.literal("TenantRuntimeConfig"),
|
|
11535
11818
|
tenantId: ContractIdentifierSchema,
|
|
11536
11819
|
appId: ContractIdentifierSchema,
|
|
11537
11820
|
environment: ContractIdentifierSchema,
|
|
11538
11821
|
designTokens: ResolvedThemeTokensSchema,
|
|
11539
|
-
moduleRefs:
|
|
11540
|
-
pageRefs:
|
|
11541
|
-
featureFlags:
|
|
11822
|
+
moduleRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11823
|
+
pageRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11824
|
+
featureFlags: z13.record(z13.string(), z13.boolean()).default({}),
|
|
11542
11825
|
authBinding: TenantAuthBindingsSchema,
|
|
11543
11826
|
dataBinding: TenantDataBindingsSchema,
|
|
11544
|
-
sourceMap:
|
|
11545
|
-
warnings:
|
|
11827
|
+
sourceMap: z13.record(z13.string(), ContractIdentifierSchema),
|
|
11828
|
+
warnings: z13.array(z13.string()).default([]),
|
|
11829
|
+
menuBundle: MenuRuntimeBundleSchema.optional(),
|
|
11546
11830
|
applicationConfig: TenantApplicationConfigSchema
|
|
11547
11831
|
}).strict();
|
|
11548
11832
|
|
|
11549
11833
|
// src/contracts/trend.ts
|
|
11550
|
-
import { z as
|
|
11551
|
-
var RadarDecisionMetricsSchema =
|
|
11552
|
-
currentSales:
|
|
11553
|
-
forecastSales:
|
|
11554
|
-
searchHeat:
|
|
11555
|
-
socialHeat:
|
|
11556
|
-
confidence:
|
|
11557
|
-
}).strict();
|
|
11558
|
-
var TrendSourceSchema =
|
|
11834
|
+
import { z as z14 } from "zod";
|
|
11835
|
+
var RadarDecisionMetricsSchema = z14.object({
|
|
11836
|
+
currentSales: z14.number().finite(),
|
|
11837
|
+
forecastSales: z14.number().finite(),
|
|
11838
|
+
searchHeat: z14.number().finite(),
|
|
11839
|
+
socialHeat: z14.number().finite(),
|
|
11840
|
+
confidence: z14.number().min(0).max(1)
|
|
11841
|
+
}).strict();
|
|
11842
|
+
var TrendSourceSchema = z14.object({
|
|
11559
11843
|
sourceId: ContractIdentifierSchema,
|
|
11560
11844
|
provider: ContractIdentifierSchema,
|
|
11561
|
-
channel:
|
|
11845
|
+
channel: z14.enum(["trend", "ecommerce", "social", "search", "internal"]),
|
|
11562
11846
|
collectedAt: IsoDateTimeSchema,
|
|
11563
|
-
sourceUrl:
|
|
11564
|
-
evidenceRefs:
|
|
11847
|
+
sourceUrl: z14.string().url().optional(),
|
|
11848
|
+
evidenceRefs: z14.array(EntityRefSchema).default([])
|
|
11565
11849
|
}).strict();
|
|
11566
|
-
var TrendIngestRunSchema =
|
|
11567
|
-
contract:
|
|
11850
|
+
var TrendIngestRunSchema = z14.object({
|
|
11851
|
+
contract: z14.literal("TrendIngestRun"),
|
|
11568
11852
|
ingestRunId: ContractIdentifierSchema,
|
|
11569
11853
|
sourceId: ContractIdentifierSchema,
|
|
11570
11854
|
requestId: ContractIdentifierSchema,
|
|
11571
11855
|
idempotencyKey: ContractIdentifierSchema,
|
|
11572
|
-
status:
|
|
11573
|
-
recordCount:
|
|
11574
|
-
errorCount:
|
|
11856
|
+
status: z14.enum(["RUNNING", "SUCCEEDED", "FAILED", "PARTIAL"]),
|
|
11857
|
+
recordCount: z14.number().int().nonnegative(),
|
|
11858
|
+
errorCount: z14.number().int().nonnegative(),
|
|
11575
11859
|
startedAt: IsoDateTimeSchema,
|
|
11576
11860
|
completedAt: IsoDateTimeSchema.optional()
|
|
11577
11861
|
}).strict();
|
|
11578
|
-
var TrendSourceRecordSchema =
|
|
11579
|
-
contract:
|
|
11862
|
+
var TrendSourceRecordSchema = z14.object({
|
|
11863
|
+
contract: z14.literal("TrendSourceRecord"),
|
|
11580
11864
|
sourceRecordId: ContractIdentifierSchema,
|
|
11581
11865
|
source: TrendSourceSchema,
|
|
11582
11866
|
ingestRunRef: EntityRefSchema,
|
|
11583
|
-
recordVersion:
|
|
11867
|
+
recordVersion: z14.number().int().positive(),
|
|
11584
11868
|
contentHash: Sha256Schema,
|
|
11585
11869
|
payload: JsonValueSchema,
|
|
11586
11870
|
idempotencyKey: ContractIdentifierSchema,
|
|
11587
11871
|
collectedAt: IsoDateTimeSchema
|
|
11588
11872
|
}).strict();
|
|
11589
|
-
var HotwordBodySchema =
|
|
11590
|
-
contract:
|
|
11873
|
+
var HotwordBodySchema = z14.object({
|
|
11874
|
+
contract: z14.literal("HotwordBody"),
|
|
11591
11875
|
hotwordId: ContractIdentifierSchema,
|
|
11592
|
-
label:
|
|
11593
|
-
normalizedLabel:
|
|
11594
|
-
categories:
|
|
11595
|
-
sourceRefs:
|
|
11596
|
-
relationRefs:
|
|
11876
|
+
label: z14.string().trim().min(1),
|
|
11877
|
+
normalizedLabel: z14.string().trim().min(1),
|
|
11878
|
+
categories: z14.array(ContractIdentifierSchema).default([]),
|
|
11879
|
+
sourceRefs: z14.array(TrendSourceSchema).min(1),
|
|
11880
|
+
relationRefs: z14.array(EntityRefSchema).default([]),
|
|
11597
11881
|
createdAt: IsoDateTimeSchema,
|
|
11598
11882
|
updatedAt: IsoDateTimeSchema
|
|
11599
11883
|
}).strict();
|
|
11600
11884
|
var CommerceBodyFieldsSchema = {
|
|
11601
|
-
displayName:
|
|
11602
|
-
normalizedName:
|
|
11603
|
-
categories:
|
|
11604
|
-
sourceRefs:
|
|
11605
|
-
relationRefs:
|
|
11885
|
+
displayName: z14.string().trim().min(1),
|
|
11886
|
+
normalizedName: z14.string().trim().min(1),
|
|
11887
|
+
categories: z14.array(ContractIdentifierSchema).default([]),
|
|
11888
|
+
sourceRefs: z14.array(EntityRefSchema).min(1),
|
|
11889
|
+
relationRefs: z14.array(EntityRefSchema).default([]),
|
|
11606
11890
|
createdAt: IsoDateTimeSchema,
|
|
11607
11891
|
updatedAt: IsoDateTimeSchema
|
|
11608
11892
|
};
|
|
11609
|
-
var BrandBodySchema =
|
|
11610
|
-
contract:
|
|
11893
|
+
var BrandBodySchema = z14.object({
|
|
11894
|
+
contract: z14.literal("BrandBody"),
|
|
11611
11895
|
brandId: ContractIdentifierSchema,
|
|
11612
11896
|
...CommerceBodyFieldsSchema
|
|
11613
11897
|
}).strict();
|
|
11614
|
-
var ProductBodySchema =
|
|
11615
|
-
contract:
|
|
11898
|
+
var ProductBodySchema = z14.object({
|
|
11899
|
+
contract: z14.literal("ProductBody"),
|
|
11616
11900
|
productId: ContractIdentifierSchema,
|
|
11617
11901
|
brandRef: EntityRefSchema.optional(),
|
|
11618
11902
|
...CommerceBodyFieldsSchema
|
|
11619
11903
|
}).strict();
|
|
11620
|
-
var TrendMetricSnapshotSchema =
|
|
11621
|
-
contract:
|
|
11904
|
+
var TrendMetricSnapshotSchema = z14.object({
|
|
11905
|
+
contract: z14.literal("TrendMetricSnapshot"),
|
|
11622
11906
|
snapshotId: ContractIdentifierSchema,
|
|
11623
11907
|
subjectRef: EntityRefSchema,
|
|
11624
11908
|
observedAt: IsoDateTimeSchema,
|
|
11625
|
-
metrics:
|
|
11626
|
-
confidence:
|
|
11627
|
-
evidenceRefs:
|
|
11909
|
+
metrics: z14.record(z14.string(), z14.number().finite()),
|
|
11910
|
+
confidence: z14.number().min(0).max(1),
|
|
11911
|
+
evidenceRefs: z14.array(EntityRefSchema).min(1)
|
|
11628
11912
|
}).strict();
|
|
11629
|
-
var RadarScoreModelBodySchema =
|
|
11630
|
-
contract:
|
|
11913
|
+
var RadarScoreModelBodySchema = z14.object({
|
|
11914
|
+
contract: z14.literal("RadarScoreModelBody"),
|
|
11631
11915
|
modelId: ContractIdentifierSchema,
|
|
11632
|
-
version:
|
|
11916
|
+
version: z14.number().int().positive(),
|
|
11633
11917
|
weights: RadarDecisionMetricsSchema,
|
|
11634
|
-
thresholds:
|
|
11635
|
-
explanationRules:
|
|
11918
|
+
thresholds: z14.record(z14.string(), z14.number().finite()).default({}),
|
|
11919
|
+
explanationRules: z14.record(z14.string(), z14.string().trim().min(1)).default({}),
|
|
11636
11920
|
createdAt: IsoDateTimeSchema
|
|
11637
11921
|
}).strict();
|
|
11638
|
-
var RadarScoreProjectionSchema =
|
|
11639
|
-
contract:
|
|
11922
|
+
var RadarScoreProjectionSchema = z14.object({
|
|
11923
|
+
contract: z14.literal("RadarScoreProjection"),
|
|
11640
11924
|
projectionId: ContractIdentifierSchema,
|
|
11641
11925
|
subjectRef: EntityRefSchema,
|
|
11642
11926
|
modelRef: EntityRefSchema,
|
|
11643
|
-
totalScore:
|
|
11927
|
+
totalScore: z14.number().finite(),
|
|
11644
11928
|
dimensions: RadarDecisionMetricsSchema,
|
|
11645
|
-
evidenceRefs:
|
|
11929
|
+
evidenceRefs: z14.array(EntityRefSchema).min(1),
|
|
11646
11930
|
freshnessAt: IsoDateTimeSchema
|
|
11647
11931
|
}).strict();
|
|
11648
|
-
var RadarPanoramaNodeSchema =
|
|
11932
|
+
var RadarPanoramaNodeSchema = z14.object({
|
|
11649
11933
|
ref: EntityRefSchema,
|
|
11650
|
-
label:
|
|
11651
|
-
categories:
|
|
11652
|
-
score:
|
|
11934
|
+
label: z14.string().trim().min(1),
|
|
11935
|
+
categories: z14.array(ContractIdentifierSchema).default([]),
|
|
11936
|
+
score: z14.number().finite().optional(),
|
|
11653
11937
|
freshnessAt: IsoDateTimeSchema.optional()
|
|
11654
11938
|
}).strict();
|
|
11655
|
-
var RadarPanoramaEdgeSchema =
|
|
11939
|
+
var RadarPanoramaEdgeSchema = z14.object({
|
|
11656
11940
|
sourceRef: EntityRefSchema,
|
|
11657
11941
|
targetRef: EntityRefSchema,
|
|
11658
11942
|
relation: ContractIdentifierSchema,
|
|
11659
|
-
evidenceRefs:
|
|
11943
|
+
evidenceRefs: z14.array(EntityRefSchema).default([])
|
|
11660
11944
|
}).strict();
|
|
11661
|
-
var RadarPanoramaSchema =
|
|
11662
|
-
contract:
|
|
11663
|
-
nodes:
|
|
11664
|
-
edges:
|
|
11945
|
+
var RadarPanoramaSchema = z14.object({
|
|
11946
|
+
contract: z14.literal("RadarPanorama"),
|
|
11947
|
+
nodes: z14.array(RadarPanoramaNodeSchema),
|
|
11948
|
+
edges: z14.array(RadarPanoramaEdgeSchema),
|
|
11665
11949
|
generatedAt: IsoDateTimeSchema
|
|
11666
11950
|
}).strict();
|
|
11667
|
-
var BrandGeneticsProfileSchema =
|
|
11668
|
-
contract:
|
|
11951
|
+
var BrandGeneticsProfileSchema = z14.object({
|
|
11952
|
+
contract: z14.literal("BrandGeneticsProfile"),
|
|
11669
11953
|
brandRef: EntityRefSchema,
|
|
11670
|
-
categories:
|
|
11671
|
-
signature:
|
|
11672
|
-
relatedRefs:
|
|
11673
|
-
evidenceRefs:
|
|
11954
|
+
categories: z14.array(ContractIdentifierSchema).default([]),
|
|
11955
|
+
signature: z14.record(ContractIdentifierSchema, z14.number().finite()),
|
|
11956
|
+
relatedRefs: z14.array(EntityRefSchema).default([]),
|
|
11957
|
+
evidenceRefs: z14.array(EntityRefSchema).default([]),
|
|
11674
11958
|
computedAt: IsoDateTimeSchema
|
|
11675
11959
|
}).strict();
|
|
11676
|
-
var RadarOpportunityMatrixPointSchema =
|
|
11960
|
+
var RadarOpportunityMatrixPointSchema = z14.object({
|
|
11677
11961
|
subjectRef: EntityRefSchema,
|
|
11678
|
-
label:
|
|
11679
|
-
x:
|
|
11680
|
-
y:
|
|
11681
|
-
score:
|
|
11682
|
-
evidenceRefs:
|
|
11683
|
-
}).strict();
|
|
11684
|
-
var RadarOpportunityMatrixSchema =
|
|
11685
|
-
contract:
|
|
11686
|
-
xMetric:
|
|
11687
|
-
yMetric:
|
|
11688
|
-
points:
|
|
11962
|
+
label: z14.string().trim().min(1),
|
|
11963
|
+
x: z14.number().finite(),
|
|
11964
|
+
y: z14.number().finite(),
|
|
11965
|
+
score: z14.number().finite(),
|
|
11966
|
+
evidenceRefs: z14.array(EntityRefSchema).default([])
|
|
11967
|
+
}).strict();
|
|
11968
|
+
var RadarOpportunityMatrixSchema = z14.object({
|
|
11969
|
+
contract: z14.literal("RadarOpportunityMatrix"),
|
|
11970
|
+
xMetric: z14.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
|
|
11971
|
+
yMetric: z14.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
|
|
11972
|
+
points: z14.array(RadarOpportunityMatrixPointSchema),
|
|
11689
11973
|
computedAt: IsoDateTimeSchema
|
|
11690
11974
|
}).strict();
|
|
11691
|
-
var RadarQueryBodySchema =
|
|
11692
|
-
contract:
|
|
11975
|
+
var RadarQueryBodySchema = z14.object({
|
|
11976
|
+
contract: z14.literal("RadarQueryBody"),
|
|
11693
11977
|
queryId: ContractIdentifierSchema,
|
|
11694
|
-
filters:
|
|
11695
|
-
sort:
|
|
11978
|
+
filters: z14.record(z14.string(), JsonValueSchema).default({}),
|
|
11979
|
+
sort: z14.object({
|
|
11696
11980
|
field: ContractIdentifierSchema,
|
|
11697
|
-
direction:
|
|
11981
|
+
direction: z14.enum(["asc", "desc"])
|
|
11698
11982
|
}).strict(),
|
|
11699
|
-
pageSize:
|
|
11983
|
+
pageSize: z14.number().int().min(1).max(200),
|
|
11700
11984
|
updatedAt: IsoDateTimeSchema
|
|
11701
11985
|
}).strict();
|
|
11702
|
-
var SavedRadarQuerySchema =
|
|
11703
|
-
contract:
|
|
11986
|
+
var SavedRadarQuerySchema = z14.object({
|
|
11987
|
+
contract: z14.literal("SavedRadarQuery"),
|
|
11704
11988
|
savedQueryId: ContractIdentifierSchema,
|
|
11705
11989
|
teamId: ContractIdentifierSchema,
|
|
11706
11990
|
ownerRef: EntityRefSchema,
|
|
11707
|
-
name:
|
|
11991
|
+
name: z14.string().trim().min(1),
|
|
11708
11992
|
queryRef: EntityRefSchema,
|
|
11709
|
-
expectedVersion:
|
|
11993
|
+
expectedVersion: z14.number().int().nonnegative(),
|
|
11710
11994
|
updatedAt: IsoDateTimeSchema
|
|
11711
11995
|
}).strict();
|
|
11712
|
-
var RadarSelectionSchema =
|
|
11713
|
-
contract:
|
|
11996
|
+
var RadarSelectionSchema = z14.object({
|
|
11997
|
+
contract: z14.literal("RadarSelection"),
|
|
11714
11998
|
selectionId: ContractIdentifierSchema,
|
|
11715
11999
|
teamId: ContractIdentifierSchema,
|
|
11716
12000
|
ownerRef: EntityRefSchema,
|
|
11717
|
-
subjectRefs:
|
|
11718
|
-
status:
|
|
11719
|
-
note:
|
|
11720
|
-
expectedVersion:
|
|
12001
|
+
subjectRefs: z14.array(EntityRefSchema),
|
|
12002
|
+
status: z14.enum(["stashed", "selected", "rejected", "archived"]),
|
|
12003
|
+
note: z14.string().optional(),
|
|
12004
|
+
expectedVersion: z14.number().int().nonnegative(),
|
|
11721
12005
|
updatedAt: IsoDateTimeSchema
|
|
11722
12006
|
}).strict();
|
|
11723
|
-
var RadarAnalysisRunSchema =
|
|
11724
|
-
contract:
|
|
12007
|
+
var RadarAnalysisRunSchema = z14.object({
|
|
12008
|
+
contract: z14.literal("RadarAnalysisRun"),
|
|
11725
12009
|
runId: ContractIdentifierSchema,
|
|
11726
12010
|
teamId: ContractIdentifierSchema,
|
|
11727
12011
|
selectionRef: EntityRefSchema,
|
|
@@ -11730,66 +12014,66 @@ var RadarAnalysisRunSchema = z13.object({
|
|
|
11730
12014
|
designProjectRef: EntityRefSchema.optional(),
|
|
11731
12015
|
replayedFromRef: EntityRefSchema.optional(),
|
|
11732
12016
|
workflowDefinitionTeamId: ContractIdentifierSchema.optional(),
|
|
11733
|
-
workflowInput:
|
|
11734
|
-
createDesignProject:
|
|
11735
|
-
designProjectName:
|
|
12017
|
+
workflowInput: z14.record(z14.string(), JsonValueSchema).default({}),
|
|
12018
|
+
createDesignProject: z14.boolean().default(true),
|
|
12019
|
+
designProjectName: z14.string().trim().min(1).max(200).optional(),
|
|
11736
12020
|
modelRef: EntityRefSchema,
|
|
11737
12021
|
requestId: ContractIdentifierSchema,
|
|
11738
12022
|
idempotencyKey: ContractIdentifierSchema,
|
|
11739
|
-
status:
|
|
11740
|
-
outputRefs:
|
|
11741
|
-
error:
|
|
12023
|
+
status: z14.enum(["QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
|
|
12024
|
+
outputRefs: z14.array(EntityRefSchema).default([]),
|
|
12025
|
+
error: z14.object({
|
|
11742
12026
|
code: ContractIdentifierSchema,
|
|
11743
|
-
message:
|
|
11744
|
-
retryable:
|
|
12027
|
+
message: z14.string().trim().min(1),
|
|
12028
|
+
retryable: z14.boolean()
|
|
11745
12029
|
}).strict().optional(),
|
|
11746
12030
|
startedAt: IsoDateTimeSchema.optional(),
|
|
11747
12031
|
completedAt: IsoDateTimeSchema.optional(),
|
|
11748
12032
|
createdAt: IsoDateTimeSchema
|
|
11749
12033
|
}).strict();
|
|
11750
|
-
var RadarAnalysisAssetSchema =
|
|
12034
|
+
var RadarAnalysisAssetSchema = z14.object({
|
|
11751
12035
|
artifactRef: EntityRefSchema,
|
|
11752
12036
|
kind: ContractIdentifierSchema,
|
|
11753
|
-
mimeType:
|
|
11754
|
-
url:
|
|
11755
|
-
metadata:
|
|
12037
|
+
mimeType: z14.string().trim().min(1).optional(),
|
|
12038
|
+
url: z14.string().url(),
|
|
12039
|
+
metadata: z14.record(z14.string(), JsonValueSchema).default({}),
|
|
11756
12040
|
createdAt: IsoDateTimeSchema
|
|
11757
12041
|
}).strict();
|
|
11758
|
-
var RadarAnalysisDetailSchema =
|
|
11759
|
-
contract:
|
|
12042
|
+
var RadarAnalysisDetailSchema = z14.object({
|
|
12043
|
+
contract: z14.literal("RadarAnalysisDetail"),
|
|
11760
12044
|
run: RadarAnalysisRunSchema,
|
|
11761
|
-
runVersion:
|
|
12045
|
+
runVersion: z14.number().int().positive(),
|
|
11762
12046
|
selection: RadarSelectionSchema,
|
|
11763
|
-
outputs:
|
|
11764
|
-
assets:
|
|
11765
|
-
lineage:
|
|
12047
|
+
outputs: z14.array(OutputRecordSchema),
|
|
12048
|
+
assets: z14.array(RadarAnalysisAssetSchema),
|
|
12049
|
+
lineage: z14.array(LineageRecordSchema)
|
|
11766
12050
|
}).strict();
|
|
11767
|
-
var RadarActionRecordSchema =
|
|
11768
|
-
contract:
|
|
12051
|
+
var RadarActionRecordSchema = z14.object({
|
|
12052
|
+
contract: z14.literal("RadarActionRecord"),
|
|
11769
12053
|
actionId: ContractIdentifierSchema,
|
|
11770
12054
|
teamId: ContractIdentifierSchema,
|
|
11771
12055
|
actorRef: EntityRefSchema,
|
|
11772
|
-
action:
|
|
12056
|
+
action: z14.enum(["stash", "select", "reject", "archive", "launch", "retry", "replay", "rollback"]),
|
|
11773
12057
|
targetRef: EntityRefSchema,
|
|
11774
12058
|
requestId: ContractIdentifierSchema,
|
|
11775
12059
|
idempotencyKey: ContractIdentifierSchema,
|
|
11776
|
-
expectedVersion:
|
|
12060
|
+
expectedVersion: z14.number().int().nonnegative(),
|
|
11777
12061
|
occurredAt: IsoDateTimeSchema
|
|
11778
12062
|
}).strict();
|
|
11779
|
-
var RadarWritebackRecordSchema =
|
|
11780
|
-
contract:
|
|
12063
|
+
var RadarWritebackRecordSchema = z14.object({
|
|
12064
|
+
contract: z14.literal("RadarWritebackRecord"),
|
|
11781
12065
|
writebackId: ContractIdentifierSchema,
|
|
11782
12066
|
actionRef: EntityRefSchema,
|
|
11783
12067
|
targetRef: EntityRefSchema,
|
|
11784
|
-
status:
|
|
11785
|
-
resultingVersion:
|
|
11786
|
-
error:
|
|
12068
|
+
status: z14.enum(["PENDING", "APPLIED", "FAILED"]),
|
|
12069
|
+
resultingVersion: z14.number().int().nonnegative().optional(),
|
|
12070
|
+
error: z14.string().trim().min(1).optional(),
|
|
11787
12071
|
recordedAt: IsoDateTimeSchema
|
|
11788
12072
|
}).strict();
|
|
11789
12073
|
|
|
11790
12074
|
// src/contracts/workflow-definition.ts
|
|
11791
|
-
import { z as
|
|
11792
|
-
var ConductorTaskTypeSchema =
|
|
12075
|
+
import { z as z15 } from "zod";
|
|
12076
|
+
var ConductorTaskTypeSchema = z15.enum([
|
|
11793
12077
|
"SIMPLE",
|
|
11794
12078
|
"DYNAMIC",
|
|
11795
12079
|
"FORK_JOIN",
|
|
@@ -11838,46 +12122,46 @@ var requiredTaskFields = {
|
|
|
11838
12122
|
WAIT: ["inputParameters"],
|
|
11839
12123
|
TERMINATE: ["inputParameters"]
|
|
11840
12124
|
};
|
|
11841
|
-
var ConductorTaskDefinitionSchema =
|
|
11842
|
-
() =>
|
|
12125
|
+
var ConductorTaskDefinitionSchema = z15.lazy(
|
|
12126
|
+
() => z15.object({
|
|
11843
12127
|
name: ContractIdentifierSchema,
|
|
11844
12128
|
taskReferenceName: ContractIdentifierSchema,
|
|
11845
12129
|
type: ConductorTaskTypeSchema,
|
|
11846
|
-
inputParameters:
|
|
11847
|
-
startDelay:
|
|
11848
|
-
optional:
|
|
11849
|
-
asyncComplete:
|
|
11850
|
-
rateLimited:
|
|
11851
|
-
retryCount:
|
|
11852
|
-
taskDefinition:
|
|
11853
|
-
loopCondition:
|
|
11854
|
-
loopOver:
|
|
11855
|
-
sink:
|
|
11856
|
-
forkTasks:
|
|
11857
|
-
joinOn:
|
|
11858
|
-
defaultExclusiveJoinTask:
|
|
11859
|
-
dynamicForkTasksParam:
|
|
11860
|
-
dynamicForkTasksInputParamName:
|
|
11861
|
-
subWorkflowParam:
|
|
11862
|
-
$ref:
|
|
12130
|
+
inputParameters: z15.record(z15.string(), JsonValueSchema).optional(),
|
|
12131
|
+
startDelay: z15.number().int().nonnegative().optional(),
|
|
12132
|
+
optional: z15.boolean().optional(),
|
|
12133
|
+
asyncComplete: z15.boolean().optional(),
|
|
12134
|
+
rateLimited: z15.boolean().optional(),
|
|
12135
|
+
retryCount: z15.number().int().nonnegative().optional(),
|
|
12136
|
+
taskDefinition: z15.record(z15.string(), JsonValueSchema).optional(),
|
|
12137
|
+
loopCondition: z15.string().optional(),
|
|
12138
|
+
loopOver: z15.array(ConductorTaskDefinitionSchema).optional(),
|
|
12139
|
+
sink: z15.string().optional(),
|
|
12140
|
+
forkTasks: z15.array(z15.array(ConductorTaskDefinitionSchema)).optional(),
|
|
12141
|
+
joinOn: z15.array(ContractIdentifierSchema).optional(),
|
|
12142
|
+
defaultExclusiveJoinTask: z15.array(ContractIdentifierSchema).optional(),
|
|
12143
|
+
dynamicForkTasksParam: z15.string().optional(),
|
|
12144
|
+
dynamicForkTasksInputParamName: z15.string().optional(),
|
|
12145
|
+
subWorkflowParam: z15.object({
|
|
12146
|
+
$ref: z15.string().optional(),
|
|
11863
12147
|
name: ContractIdentifierSchema,
|
|
11864
|
-
version:
|
|
11865
|
-
taskToDomain:
|
|
11866
|
-
workflowDefinition:
|
|
12148
|
+
version: z15.number().int().positive().optional(),
|
|
12149
|
+
taskToDomain: z15.record(z15.string(), z15.string()).optional(),
|
|
12150
|
+
workflowDefinition: z15.record(z15.string(), JsonValueSchema).optional()
|
|
11867
12151
|
}).strict().optional(),
|
|
11868
|
-
decisionCases:
|
|
11869
|
-
defaultCase:
|
|
11870
|
-
evaluatorType:
|
|
11871
|
-
expression:
|
|
12152
|
+
decisionCases: z15.record(z15.string(), z15.array(ConductorTaskDefinitionSchema)).optional(),
|
|
12153
|
+
defaultCase: z15.array(ConductorTaskDefinitionSchema).optional(),
|
|
12154
|
+
evaluatorType: z15.enum(["value-param", "javascript", "graaljs"]).optional(),
|
|
12155
|
+
expression: z15.string().optional(),
|
|
11872
12156
|
__alias: JsonValueSchema.optional(),
|
|
11873
|
-
callbackFromWorker:
|
|
12157
|
+
callbackFromWorker: z15.boolean().optional(),
|
|
11874
12158
|
caseExpression: JsonValueSchema.optional(),
|
|
11875
|
-
caseValueParam:
|
|
11876
|
-
dependencies:
|
|
11877
|
-
description:
|
|
11878
|
-
dynamicTaskNameParam:
|
|
11879
|
-
joinMode:
|
|
11880
|
-
permissive:
|
|
12159
|
+
caseValueParam: z15.string().optional(),
|
|
12160
|
+
dependencies: z15.array(JsonValueSchema).optional(),
|
|
12161
|
+
description: z15.string().optional(),
|
|
12162
|
+
dynamicTaskNameParam: z15.string().optional(),
|
|
12163
|
+
joinMode: z15.string().optional(),
|
|
12164
|
+
permissive: z15.boolean().optional(),
|
|
11881
12165
|
joinTaskRef: ContractIdentifierSchema.optional(),
|
|
11882
12166
|
forkTaskRef: ContractIdentifierSchema.optional()
|
|
11883
12167
|
}).strict().superRefine((task, context) => {
|
|
@@ -11891,29 +12175,29 @@ var ConductorTaskDefinitionSchema = z14.lazy(
|
|
|
11891
12175
|
}
|
|
11892
12176
|
})
|
|
11893
12177
|
);
|
|
11894
|
-
var ConductorWorkflowDefinitionSchema =
|
|
11895
|
-
ownerApp:
|
|
11896
|
-
createTime:
|
|
11897
|
-
updateTime:
|
|
11898
|
-
createdBy:
|
|
11899
|
-
updatedBy:
|
|
12178
|
+
var ConductorWorkflowDefinitionSchema = z15.object({
|
|
12179
|
+
ownerApp: z15.string().optional(),
|
|
12180
|
+
createTime: z15.number().int().nonnegative().optional(),
|
|
12181
|
+
updateTime: z15.number().int().nonnegative().optional(),
|
|
12182
|
+
createdBy: z15.string().optional(),
|
|
12183
|
+
updatedBy: z15.string().optional(),
|
|
11900
12184
|
name: ContractIdentifierSchema,
|
|
11901
|
-
description:
|
|
11902
|
-
version:
|
|
11903
|
-
tasks:
|
|
11904
|
-
inputParameters:
|
|
11905
|
-
outputParameters:
|
|
12185
|
+
description: z15.string().optional(),
|
|
12186
|
+
version: z15.number().int().positive(),
|
|
12187
|
+
tasks: z15.array(ConductorTaskDefinitionSchema),
|
|
12188
|
+
inputParameters: z15.array(ContractIdentifierSchema),
|
|
12189
|
+
outputParameters: z15.record(z15.string(), JsonValueSchema).optional(),
|
|
11906
12190
|
failureWorkflow: ContractIdentifierSchema.optional(),
|
|
11907
|
-
schemaVersion:
|
|
11908
|
-
restartable:
|
|
11909
|
-
workflowStatusListenerEnabled:
|
|
11910
|
-
ownerEmail:
|
|
11911
|
-
timeoutPolicy:
|
|
11912
|
-
timeoutSeconds:
|
|
11913
|
-
variables:
|
|
11914
|
-
inputTemplate:
|
|
11915
|
-
}).strict();
|
|
11916
|
-
var WorkflowParameterTypeSchema =
|
|
12191
|
+
schemaVersion: z15.number().int().positive().optional(),
|
|
12192
|
+
restartable: z15.boolean().optional(),
|
|
12193
|
+
workflowStatusListenerEnabled: z15.boolean().optional(),
|
|
12194
|
+
ownerEmail: z15.string().email().optional(),
|
|
12195
|
+
timeoutPolicy: z15.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
|
|
12196
|
+
timeoutSeconds: z15.number().int().nonnegative(),
|
|
12197
|
+
variables: z15.record(z15.string(), JsonValueSchema).optional(),
|
|
12198
|
+
inputTemplate: z15.record(z15.string(), JsonValueSchema).optional()
|
|
12199
|
+
}).strict();
|
|
12200
|
+
var WorkflowParameterTypeSchema = z15.enum([
|
|
11917
12201
|
"string",
|
|
11918
12202
|
"file",
|
|
11919
12203
|
"number",
|
|
@@ -11923,213 +12207,213 @@ var WorkflowParameterTypeSchema = z14.enum([
|
|
|
11923
12207
|
"notice",
|
|
11924
12208
|
"canvas-assist"
|
|
11925
12209
|
]);
|
|
11926
|
-
var WorkflowConditionalStateSchema =
|
|
11927
|
-
conditions:
|
|
11928
|
-
|
|
11929
|
-
field:
|
|
11930
|
-
operator:
|
|
12210
|
+
var WorkflowConditionalStateSchema = z15.object({
|
|
12211
|
+
conditions: z15.array(
|
|
12212
|
+
z15.object({
|
|
12213
|
+
field: z15.string(),
|
|
12214
|
+
operator: z15.enum(["is", "isNot", "isGreaterThan", "isLessThan", "isGreaterThanOrEqual", "isLessThanOrEqual", "in", "notIn"]),
|
|
11931
12215
|
value: JsonValueSchema
|
|
11932
12216
|
}).strict()
|
|
11933
12217
|
),
|
|
11934
|
-
logic:
|
|
11935
|
-
}).strict();
|
|
11936
|
-
var ImageSelectMappingAppearanceSchema =
|
|
11937
|
-
columns:
|
|
11938
|
-
cardSize:
|
|
11939
|
-
imageAspectRatio:
|
|
11940
|
-
gap:
|
|
11941
|
-
radius:
|
|
11942
|
-
borderStyle:
|
|
11943
|
-
borderWidth:
|
|
11944
|
-
enableScroll:
|
|
11945
|
-
maxHeight:
|
|
11946
|
-
enableCollapse:
|
|
11947
|
-
visibleRows:
|
|
11948
|
-
hideLabel:
|
|
11949
|
-
hideDescription:
|
|
11950
|
-
hideValue:
|
|
11951
|
-
}).strict();
|
|
11952
|
-
var ComfyWorkflowPortBindingSchema =
|
|
11953
|
-
node:
|
|
11954
|
-
key:
|
|
11955
|
-
}).strict();
|
|
11956
|
-
var WorkflowParameterTypeOptionsSchema =
|
|
11957
|
-
editor:
|
|
11958
|
-
editorLanguage:
|
|
11959
|
-
maxValue:
|
|
11960
|
-
minValue:
|
|
11961
|
-
max:
|
|
11962
|
-
min:
|
|
11963
|
-
multipleValues:
|
|
11964
|
-
numberPrecision:
|
|
11965
|
-
password:
|
|
11966
|
-
rows:
|
|
11967
|
-
assetType:
|
|
11968
|
-
accept:
|
|
11969
|
-
maxSize:
|
|
11970
|
-
fileType:
|
|
11971
|
-
aiMultiShotMainImageField:
|
|
11972
|
-
aiMultiShotWorkflowAppId:
|
|
11973
|
-
aiMultiShotWorkflowId:
|
|
11974
|
-
allowCustomInput:
|
|
11975
|
-
allowUploadVideo:
|
|
11976
|
-
aspectRatioField:
|
|
11977
|
-
assemblyValueType:
|
|
11978
|
-
autoAnalyzeDesignImage:
|
|
11979
|
-
autoDetectAspectRatio:
|
|
11980
|
-
autoIncrementId:
|
|
12218
|
+
logic: z15.enum(["AND", "OR"]).optional()
|
|
12219
|
+
}).strict();
|
|
12220
|
+
var ImageSelectMappingAppearanceSchema = z15.object({
|
|
12221
|
+
columns: z15.number().int().min(1).max(4).optional(),
|
|
12222
|
+
cardSize: z15.enum(["sm", "md", "lg"]).optional(),
|
|
12223
|
+
imageAspectRatio: z15.enum(["square", "4:5", "3:4", "16:9"]).optional(),
|
|
12224
|
+
gap: z15.enum(["sm", "md", "lg"]).optional(),
|
|
12225
|
+
radius: z15.enum(["sm", "md", "lg", "xl"]).optional(),
|
|
12226
|
+
borderStyle: z15.enum(["none", "soft", "strong"]).optional(),
|
|
12227
|
+
borderWidth: z15.union([z15.literal(0), z15.literal(1), z15.literal(2)]).optional(),
|
|
12228
|
+
enableScroll: z15.boolean().optional(),
|
|
12229
|
+
maxHeight: z15.number().int().min(160).max(1200).optional(),
|
|
12230
|
+
enableCollapse: z15.boolean().optional(),
|
|
12231
|
+
visibleRows: z15.number().int().min(1).max(6).optional(),
|
|
12232
|
+
hideLabel: z15.boolean().optional(),
|
|
12233
|
+
hideDescription: z15.boolean().optional(),
|
|
12234
|
+
hideValue: z15.boolean().optional()
|
|
12235
|
+
}).strict();
|
|
12236
|
+
var ComfyWorkflowPortBindingSchema = z15.object({
|
|
12237
|
+
node: z15.union([z15.string(), z15.number()]),
|
|
12238
|
+
key: z15.string().optional()
|
|
12239
|
+
}).strict();
|
|
12240
|
+
var WorkflowParameterTypeOptionsSchema = z15.object({
|
|
12241
|
+
editor: z15.enum(["code", "codeNodeEditor", "htmlEditor", "sqlEditor", "json"]).optional(),
|
|
12242
|
+
editorLanguage: z15.enum(["javaScript", "json", "python", "sql"]).optional(),
|
|
12243
|
+
maxValue: z15.number().optional(),
|
|
12244
|
+
minValue: z15.number().optional(),
|
|
12245
|
+
max: z15.number().optional(),
|
|
12246
|
+
min: z15.number().optional(),
|
|
12247
|
+
multipleValues: z15.boolean().optional(),
|
|
12248
|
+
numberPrecision: z15.number().nonnegative().optional(),
|
|
12249
|
+
password: z15.boolean().optional(),
|
|
12250
|
+
rows: z15.number().int().positive().optional(),
|
|
12251
|
+
assetType: z15.string().optional(),
|
|
12252
|
+
accept: z15.string().optional(),
|
|
12253
|
+
maxSize: z15.number().positive().optional(),
|
|
12254
|
+
fileType: z15.string().optional(),
|
|
12255
|
+
aiMultiShotMainImageField: z15.string().optional(),
|
|
12256
|
+
aiMultiShotWorkflowAppId: z15.string().optional(),
|
|
12257
|
+
aiMultiShotWorkflowId: z15.string().optional(),
|
|
12258
|
+
allowCustomInput: z15.boolean().optional(),
|
|
12259
|
+
allowUploadVideo: z15.boolean().optional(),
|
|
12260
|
+
aspectRatioField: z15.string().optional(),
|
|
12261
|
+
assemblyValueType: z15.string().optional(),
|
|
12262
|
+
autoAnalyzeDesignImage: z15.boolean().optional(),
|
|
12263
|
+
autoDetectAspectRatio: z15.boolean().optional(),
|
|
12264
|
+
autoIncrementId: z15.boolean().optional(),
|
|
11981
12265
|
comfyOptions: ComfyWorkflowPortBindingSchema.optional(),
|
|
11982
|
-
comfyuiModelServerId:
|
|
11983
|
-
comfyuiModelTypeName:
|
|
12266
|
+
comfyuiModelServerId: z15.string().optional(),
|
|
12267
|
+
comfyuiModelTypeName: z15.string().optional(),
|
|
11984
12268
|
defaultCustomInput: JsonValueSchema.optional(),
|
|
11985
|
-
descriptionAlert:
|
|
11986
|
-
disabled:
|
|
11987
|
-
editable:
|
|
11988
|
-
enableAiMultiShot:
|
|
11989
|
-
enableBooleanSwitchMode:
|
|
11990
|
-
enableClear:
|
|
11991
|
-
enableExpand:
|
|
11992
|
-
enableImageMask:
|
|
11993
|
-
enableImageOverlay:
|
|
11994
|
-
enablePopupEditor:
|
|
11995
|
-
enablePromptFontSize:
|
|
11996
|
-
enableReset:
|
|
11997
|
-
enableSelectItemIcon:
|
|
11998
|
-
enableSelectList:
|
|
11999
|
-
enableSelectSearch:
|
|
12000
|
-
enableSliderEnterMode:
|
|
12001
|
-
enableVoice:
|
|
12002
|
-
expandButtonText:
|
|
12003
|
-
foldUp:
|
|
12004
|
-
hidden:
|
|
12005
|
-
hideRequiredDot:
|
|
12006
|
-
inlineTitleWithSelect:
|
|
12007
|
-
knowledgeGraphButtonText:
|
|
12008
|
-
identifyAttributeCount:
|
|
12009
|
-
identifyAttributes:
|
|
12010
|
-
identifyMaxVariants:
|
|
12011
|
-
identifySourceField:
|
|
12012
|
-
imageOverlayBaseField:
|
|
12013
|
-
imageOverlayOverlayField:
|
|
12269
|
+
descriptionAlert: z15.boolean().optional(),
|
|
12270
|
+
disabled: z15.union([z15.boolean(), WorkflowConditionalStateSchema]).optional(),
|
|
12271
|
+
editable: z15.union([z15.boolean(), WorkflowConditionalStateSchema]).optional(),
|
|
12272
|
+
enableAiMultiShot: z15.boolean().optional(),
|
|
12273
|
+
enableBooleanSwitchMode: z15.boolean().optional(),
|
|
12274
|
+
enableClear: z15.boolean().optional(),
|
|
12275
|
+
enableExpand: z15.boolean().optional(),
|
|
12276
|
+
enableImageMask: z15.boolean().optional(),
|
|
12277
|
+
enableImageOverlay: z15.boolean().optional(),
|
|
12278
|
+
enablePopupEditor: z15.boolean().optional(),
|
|
12279
|
+
enablePromptFontSize: z15.boolean().optional(),
|
|
12280
|
+
enableReset: z15.boolean().optional(),
|
|
12281
|
+
enableSelectItemIcon: z15.boolean().optional(),
|
|
12282
|
+
enableSelectList: z15.boolean().optional(),
|
|
12283
|
+
enableSelectSearch: z15.boolean().optional(),
|
|
12284
|
+
enableSliderEnterMode: z15.boolean().optional(),
|
|
12285
|
+
enableVoice: z15.boolean().optional(),
|
|
12286
|
+
expandButtonText: z15.string().optional(),
|
|
12287
|
+
foldUp: z15.boolean().optional(),
|
|
12288
|
+
hidden: z15.boolean().optional(),
|
|
12289
|
+
hideRequiredDot: z15.boolean().optional(),
|
|
12290
|
+
inlineTitleWithSelect: z15.boolean().optional(),
|
|
12291
|
+
knowledgeGraphButtonText: z15.string().optional(),
|
|
12292
|
+
identifyAttributeCount: z15.union([z15.number().nonnegative(), z15.string().min(1), z15.object({ min: z15.number().nonnegative().optional(), max: z15.number().nonnegative().optional() }).strict()]).optional(),
|
|
12293
|
+
identifyAttributes: z15.array(JsonValueSchema).optional(),
|
|
12294
|
+
identifyMaxVariants: z15.number().int().nonnegative().optional(),
|
|
12295
|
+
identifySourceField: z15.string().optional(),
|
|
12296
|
+
imageOverlayBaseField: z15.string().optional(),
|
|
12297
|
+
imageOverlayOverlayField: z15.string().optional(),
|
|
12014
12298
|
imageSelectMappingAppearance: ImageSelectMappingAppearanceSchema.optional(),
|
|
12015
|
-
imageSelectMappingColumns:
|
|
12016
|
-
imageSelectMappingEnableCustomUpload:
|
|
12017
|
-
imageSelectMappingHideLabel:
|
|
12018
|
-
imageSelectMappingHideLink:
|
|
12019
|
-
imageSelectMappingHideMeta:
|
|
12020
|
-
imageSelectMappingInlineUseLargeUploadBox:
|
|
12021
|
-
imageSelectMappingPromptField:
|
|
12022
|
-
imageSelectMappingTabOrder:
|
|
12023
|
-
imageSelectMappingTabWidthMode:
|
|
12299
|
+
imageSelectMappingColumns: z15.number().int().min(1).max(4).optional(),
|
|
12300
|
+
imageSelectMappingEnableCustomUpload: z15.boolean().optional(),
|
|
12301
|
+
imageSelectMappingHideLabel: z15.boolean().optional(),
|
|
12302
|
+
imageSelectMappingHideLink: z15.boolean().optional(),
|
|
12303
|
+
imageSelectMappingHideMeta: z15.boolean().optional(),
|
|
12304
|
+
imageSelectMappingInlineUseLargeUploadBox: z15.boolean().optional(),
|
|
12305
|
+
imageSelectMappingPromptField: z15.string().optional(),
|
|
12306
|
+
imageSelectMappingTabOrder: z15.enum(["template-first", "upload-first"]).optional(),
|
|
12307
|
+
imageSelectMappingTabWidthMode: z15.enum(["content", "fill"]).optional(),
|
|
12024
12308
|
imageSelectMappingTemplatePrompt: LocalizedTextSchema.optional(),
|
|
12025
12309
|
imageSelectMappingTemplateTabTitle: LocalizedTextSchema.optional(),
|
|
12026
|
-
imageSelectMappingUploadMode:
|
|
12310
|
+
imageSelectMappingUploadMode: z15.enum(["tabs", "inline"]).optional(),
|
|
12027
12311
|
imageSelectMappingUploadPrompt: LocalizedTextSchema.optional(),
|
|
12028
12312
|
imageSelectMappingUploadTabTitle: LocalizedTextSchema.optional(),
|
|
12029
|
-
endpoints:
|
|
12030
|
-
examples:
|
|
12313
|
+
endpoints: z15.array(JsonValueSchema).optional(),
|
|
12314
|
+
examples: z15.array(JsonValueSchema).optional(),
|
|
12031
12315
|
extraData: JsonValueSchema.optional(),
|
|
12032
12316
|
layer: JsonValueSchema.optional(),
|
|
12033
12317
|
map: JsonValueSchema.optional(),
|
|
12034
|
-
multiline:
|
|
12035
|
-
options:
|
|
12036
|
-
originalFiles:
|
|
12318
|
+
multiline: z15.boolean().optional(),
|
|
12319
|
+
options: z15.array(JsonValueSchema).optional(),
|
|
12320
|
+
originalFiles: z15.array(JsonValueSchema).optional(),
|
|
12037
12321
|
placeholder: LocalizedTextSchema.optional(),
|
|
12038
|
-
preserveSelectListOrder:
|
|
12322
|
+
preserveSelectListOrder: z15.boolean().optional(),
|
|
12039
12323
|
promptDictionary: JsonValueSchema.optional(),
|
|
12040
|
-
promptFontSize:
|
|
12324
|
+
promptFontSize: z15.number().optional(),
|
|
12041
12325
|
promptModeToggle: JsonValueSchema.optional(),
|
|
12042
|
-
requireActiveSelectFilter:
|
|
12043
|
-
restoreDefaultOnEmptyEnter:
|
|
12044
|
-
search:
|
|
12045
|
-
selectButtonEnableCollapse:
|
|
12046
|
-
selectButtonVisibleRows:
|
|
12047
|
-
selectList:
|
|
12048
|
-
selectListDisplayMode:
|
|
12049
|
-
selectPromptField:
|
|
12050
|
-
showAddLocalFileButton:
|
|
12051
|
-
singleColumn:
|
|
12052
|
-
singleFrameForMultiple:
|
|
12053
|
-
textSingleLine:
|
|
12054
|
-
textareaMiniHeight:
|
|
12326
|
+
requireActiveSelectFilter: z15.boolean().optional(),
|
|
12327
|
+
restoreDefaultOnEmptyEnter: z15.boolean().optional(),
|
|
12328
|
+
search: z15.boolean().optional(),
|
|
12329
|
+
selectButtonEnableCollapse: z15.boolean().optional(),
|
|
12330
|
+
selectButtonVisibleRows: z15.number().int().positive().optional(),
|
|
12331
|
+
selectList: z15.array(JsonValueSchema).optional(),
|
|
12332
|
+
selectListDisplayMode: z15.string().optional(),
|
|
12333
|
+
selectPromptField: z15.string().optional(),
|
|
12334
|
+
showAddLocalFileButton: z15.boolean().optional(),
|
|
12335
|
+
singleColumn: z15.boolean().optional(),
|
|
12336
|
+
singleFrameForMultiple: z15.boolean().optional(),
|
|
12337
|
+
textSingleLine: z15.boolean().optional(),
|
|
12338
|
+
textareaMiniHeight: z15.number().nonnegative().optional(),
|
|
12055
12339
|
tips: LocalizedTextSchema.optional(),
|
|
12056
12340
|
visibility: JsonValueSchema.optional(),
|
|
12057
|
-
voiceButtonText:
|
|
12058
|
-
designAnalysisFields:
|
|
12059
|
-
designAnalysisFillStrategy:
|
|
12060
|
-
designAnalysisMaxFields:
|
|
12061
|
-
designAnalysisType:
|
|
12062
|
-
designAnalysisFieldPrefix:
|
|
12063
|
-
}).strict();
|
|
12064
|
-
var WorkflowParameterSchema =
|
|
12065
|
-
() =>
|
|
12341
|
+
voiceButtonText: z15.string().optional(),
|
|
12342
|
+
designAnalysisFields: z15.array(JsonValueSchema).optional(),
|
|
12343
|
+
designAnalysisFillStrategy: z15.string().optional(),
|
|
12344
|
+
designAnalysisMaxFields: z15.number().int().nonnegative().optional(),
|
|
12345
|
+
designAnalysisType: z15.string().optional(),
|
|
12346
|
+
designAnalysisFieldPrefix: z15.string().optional()
|
|
12347
|
+
}).strict();
|
|
12348
|
+
var WorkflowParameterSchema = z15.lazy(
|
|
12349
|
+
() => z15.object({
|
|
12066
12350
|
displayName: LocalizedTextSchema,
|
|
12067
12351
|
name: ContractIdentifierSchema,
|
|
12068
12352
|
type: WorkflowParameterTypeSchema,
|
|
12069
12353
|
typeOptions: WorkflowParameterTypeOptionsSchema.optional(),
|
|
12070
12354
|
default: JsonValueSchema.optional(),
|
|
12071
12355
|
description: LocalizedTextSchema.optional(),
|
|
12072
|
-
hint:
|
|
12073
|
-
displayOptions:
|
|
12074
|
-
hide:
|
|
12075
|
-
show:
|
|
12356
|
+
hint: z15.string().optional(),
|
|
12357
|
+
displayOptions: z15.object({
|
|
12358
|
+
hide: z15.record(z15.string(), z15.array(JsonValueSchema)).optional(),
|
|
12359
|
+
show: z15.record(z15.string(), z15.array(JsonValueSchema)).optional()
|
|
12076
12360
|
}).strict().optional(),
|
|
12077
|
-
options:
|
|
12078
|
-
|
|
12361
|
+
options: z15.array(z15.union([
|
|
12362
|
+
z15.object({ name: LocalizedTextSchema, value: z15.union([z15.string(), z15.number(), z15.boolean()]), action: z15.string().optional(), description: LocalizedTextSchema.optional() }).strict(),
|
|
12079
12363
|
WorkflowParameterSchema,
|
|
12080
|
-
|
|
12364
|
+
z15.object({ displayName: z15.string(), name: ContractIdentifierSchema, values: z15.array(WorkflowParameterSchema) }).strict()
|
|
12081
12365
|
])).optional(),
|
|
12082
12366
|
placeholder: LocalizedTextSchema.optional(),
|
|
12083
|
-
isNodeSetting:
|
|
12084
|
-
noDataExpression:
|
|
12085
|
-
required:
|
|
12086
|
-
example:
|
|
12087
|
-
extractValue:
|
|
12088
|
-
properties:
|
|
12089
|
-
assetType:
|
|
12090
|
-
flag:
|
|
12091
|
-
enableExpand:
|
|
12092
|
-
enableVoice:
|
|
12093
|
-
expandButtonText:
|
|
12094
|
-
knowledgeGraphButtonText:
|
|
12095
|
-
selectListDisplayMode:
|
|
12096
|
-
voiceButtonText:
|
|
12367
|
+
isNodeSetting: z15.boolean().optional(),
|
|
12368
|
+
noDataExpression: z15.boolean().optional(),
|
|
12369
|
+
required: z15.boolean().optional(),
|
|
12370
|
+
example: z15.string().optional(),
|
|
12371
|
+
extractValue: z15.object({ type: z15.literal("regex"), regex: z15.string() }).strict().optional(),
|
|
12372
|
+
properties: z15.array(WorkflowParameterSchema).optional(),
|
|
12373
|
+
assetType: z15.string().optional(),
|
|
12374
|
+
flag: z15.boolean().optional(),
|
|
12375
|
+
enableExpand: z15.boolean().optional(),
|
|
12376
|
+
enableVoice: z15.boolean().optional(),
|
|
12377
|
+
expandButtonText: z15.string().optional(),
|
|
12378
|
+
knowledgeGraphButtonText: z15.string().optional(),
|
|
12379
|
+
selectListDisplayMode: z15.string().optional(),
|
|
12380
|
+
voiceButtonText: z15.string().optional()
|
|
12097
12381
|
}).strict()
|
|
12098
12382
|
);
|
|
12099
|
-
var WorkflowOutputBindingSchema =
|
|
12100
|
-
var WorkflowNodeSchema =
|
|
12383
|
+
var WorkflowOutputBindingSchema = z15.object({ key: ContractIdentifierSchema, value: z15.string() }).strict();
|
|
12384
|
+
var WorkflowNodeSchema = z15.object({
|
|
12101
12385
|
id: ContractIdentifierSchema,
|
|
12102
12386
|
referenceName: ContractIdentifierSchema,
|
|
12103
12387
|
capabilityRef: ContractIdentifierSchema,
|
|
12104
12388
|
capabilityVersion: ContractIdentifierSchema.optional(),
|
|
12105
|
-
inputBindings:
|
|
12106
|
-
configuration:
|
|
12389
|
+
inputBindings: z15.record(z15.string(), JsonValueSchema).default({}),
|
|
12390
|
+
configuration: z15.object({ executor: z15.literal("conductor"), task: ConductorTaskDefinitionSchema }).strict()
|
|
12107
12391
|
}).strict().superRefine((node, context) => {
|
|
12108
12392
|
if (node.configuration.task.taskReferenceName !== node.referenceName) context.addIssue({ code: "custom", path: ["configuration", "task", "taskReferenceName"], message: "Conductor task reference must match node referenceName." });
|
|
12109
12393
|
if (node.configuration.task.name !== node.capabilityRef) context.addIssue({ code: "custom", path: ["configuration", "task", "name"], message: "Conductor task name must match node capabilityRef." });
|
|
12110
12394
|
if (JSON.stringify(node.configuration.task.inputParameters ?? {}) !== JSON.stringify(node.inputBindings)) context.addIssue({ code: "custom", path: ["configuration", "task", "inputParameters"], message: "Conductor task inputs must match node inputBindings." });
|
|
12111
12395
|
});
|
|
12112
|
-
var WorkflowEdgeSchema =
|
|
12396
|
+
var WorkflowEdgeSchema = z15.object({
|
|
12113
12397
|
from: ContractIdentifierSchema,
|
|
12114
12398
|
to: ContractIdentifierSchema,
|
|
12115
12399
|
outputPort: ContractIdentifierSchema.optional(),
|
|
12116
12400
|
inputPort: ContractIdentifierSchema.optional(),
|
|
12117
|
-
condition:
|
|
12401
|
+
condition: z15.string().optional()
|
|
12118
12402
|
}).strict();
|
|
12119
|
-
var WorkflowTriggerSchema =
|
|
12403
|
+
var WorkflowTriggerSchema = z15.object({
|
|
12120
12404
|
id: ContractIdentifierSchema,
|
|
12121
|
-
type:
|
|
12122
|
-
enabled:
|
|
12123
|
-
schedule:
|
|
12124
|
-
webhook:
|
|
12125
|
-
path:
|
|
12126
|
-
method:
|
|
12127
|
-
auth:
|
|
12128
|
-
basicAuth:
|
|
12129
|
-
headerAuth:
|
|
12130
|
-
responseUntil:
|
|
12405
|
+
type: z15.enum(["manual", "schedule", "webhook", "event", "api"]),
|
|
12406
|
+
enabled: z15.boolean(),
|
|
12407
|
+
schedule: z15.object({ cron: z15.string().trim().min(1) }).strict().optional(),
|
|
12408
|
+
webhook: z15.object({
|
|
12409
|
+
path: z15.string().trim().min(1).optional(),
|
|
12410
|
+
method: z15.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]),
|
|
12411
|
+
auth: z15.enum(["NONE", "BASIC", "CUSTOM_HEADER"]),
|
|
12412
|
+
basicAuth: z15.object({ username: z15.string(), password: z15.string() }).strict().optional(),
|
|
12413
|
+
headerAuth: z15.object({ name: z15.string().trim().min(1), value: z15.string() }).strict().optional(),
|
|
12414
|
+
responseUntil: z15.enum(["WORKFLOW_STARTED", "WORKFLOW_COMPLETED_OR_FINISHED"])
|
|
12131
12415
|
}).strict().optional(),
|
|
12132
|
-
event:
|
|
12416
|
+
event: z15.object({
|
|
12133
12417
|
eventType: ContractIdentifierSchema,
|
|
12134
12418
|
configuration: JsonValueSchema.optional()
|
|
12135
12419
|
}).strict().optional()
|
|
@@ -12138,63 +12422,63 @@ var WorkflowTriggerSchema = z14.object({
|
|
|
12138
12422
|
if (trigger.type === "webhook" && !trigger.webhook) context.addIssue({ code: "custom", path: ["webhook"], message: "Webhook trigger requires webhook configuration." });
|
|
12139
12423
|
if (trigger.type === "event" && !trigger.event) context.addIssue({ code: "custom", path: ["event"], message: "Event trigger requires event configuration." });
|
|
12140
12424
|
});
|
|
12141
|
-
var WorkflowValidationIssueSchema =
|
|
12425
|
+
var WorkflowValidationIssueSchema = z15.object({
|
|
12142
12426
|
taskReferenceName: ContractIdentifierSchema,
|
|
12143
|
-
issueType:
|
|
12144
|
-
detailReason:
|
|
12145
|
-
humanMessage:
|
|
12427
|
+
issueType: z15.enum(["ERROR", "WARNING"]),
|
|
12428
|
+
detailReason: z15.object({ type: ContractIdentifierSchema, name: ContractIdentifierSchema, detailInformation: JsonValueSchema.optional() }).strict(),
|
|
12429
|
+
humanMessage: z15.object({ en: z15.string(), zh: z15.string() }).strict()
|
|
12146
12430
|
}).strict();
|
|
12147
|
-
var WorkflowDefinitionSchema =
|
|
12148
|
-
contract:
|
|
12431
|
+
var WorkflowDefinitionSchema = z15.object({
|
|
12432
|
+
contract: z15.literal("WorkflowDefinition"),
|
|
12149
12433
|
metadata: ContractMetadataSchema.omit({ name: true, description: true, labels: true }).extend({
|
|
12150
12434
|
name: LocalizedTextSchema,
|
|
12151
12435
|
description: LocalizedTextSchema.optional(),
|
|
12152
|
-
role:
|
|
12436
|
+
role: z15.enum(["workflow", "template"]),
|
|
12153
12437
|
teamId: ContractIdentifierSchema,
|
|
12154
12438
|
creatorRef: EntityRefSchema,
|
|
12155
|
-
tags:
|
|
12439
|
+
tags: z15.array(ContractIdentifierSchema).default([])
|
|
12156
12440
|
}).strict(),
|
|
12157
|
-
revision:
|
|
12158
|
-
kind:
|
|
12159
|
-
recordVersion:
|
|
12160
|
-
sourceVersion:
|
|
12441
|
+
revision: z15.object({
|
|
12442
|
+
kind: z15.enum(["release", "backup"]),
|
|
12443
|
+
recordVersion: z15.number().int().positive(),
|
|
12444
|
+
sourceVersion: z15.number().int().positive().optional()
|
|
12161
12445
|
}).strict().superRefine((revision, context) => {
|
|
12162
12446
|
if (revision.kind === "backup" && revision.sourceVersion === void 0) context.addIssue({ code: "custom", path: ["sourceVersion"], message: "Backup revisions require a sourceVersion." });
|
|
12163
12447
|
}),
|
|
12164
|
-
presentation:
|
|
12165
|
-
ports:
|
|
12166
|
-
parameters:
|
|
12167
|
-
graph:
|
|
12168
|
-
execution:
|
|
12169
|
-
timeoutMs:
|
|
12170
|
-
retries:
|
|
12171
|
-
concurrencyLimit:
|
|
12172
|
-
idempotency:
|
|
12173
|
-
rateLimit:
|
|
12448
|
+
presentation: z15.object({ iconUrl: z15.string().optional(), thumbnail: z15.string().optional() }).strict(),
|
|
12449
|
+
ports: z15.object({ inputs: z15.array(ContractPortSchema).default([]), outputs: z15.array(ContractPortSchema).default([]) }).strict(),
|
|
12450
|
+
parameters: z15.object({ variables: z15.array(WorkflowParameterSchema).default([]), outputs: z15.array(WorkflowOutputBindingSchema).default([]) }).strict(),
|
|
12451
|
+
graph: z15.object({ nodes: z15.array(WorkflowNodeSchema), edges: z15.array(WorkflowEdgeSchema).default([]) }).strict(),
|
|
12452
|
+
execution: z15.object({
|
|
12453
|
+
timeoutMs: z15.number().int().positive().optional(),
|
|
12454
|
+
retries: z15.number().int().nonnegative().default(0),
|
|
12455
|
+
concurrencyLimit: z15.number().int().positive().optional(),
|
|
12456
|
+
idempotency: z15.enum(["required", "supported", "none"]),
|
|
12457
|
+
rateLimit: z15.object({ enabled: z15.boolean(), max: z15.number().int().nonnegative(), windowMs: z15.number().int().nonnegative() }).strict().superRefine((rateLimit, context) => {
|
|
12174
12458
|
if (rateLimit.enabled && (rateLimit.max === 0 || rateLimit.windowMs === 0)) context.addIssue({ code: "custom", message: "Enabled rate limit requires positive max and windowMs." });
|
|
12175
12459
|
}).optional(),
|
|
12176
|
-
conductor:
|
|
12177
|
-
ownerApp:
|
|
12178
|
-
createTime:
|
|
12179
|
-
updateTime:
|
|
12180
|
-
createdBy:
|
|
12181
|
-
updatedBy:
|
|
12460
|
+
conductor: z15.object({
|
|
12461
|
+
ownerApp: z15.string().optional(),
|
|
12462
|
+
createTime: z15.number().int().nonnegative().optional(),
|
|
12463
|
+
updateTime: z15.number().int().nonnegative().optional(),
|
|
12464
|
+
createdBy: z15.string().optional(),
|
|
12465
|
+
updatedBy: z15.string().optional(),
|
|
12182
12466
|
failureWorkflow: ContractIdentifierSchema.optional(),
|
|
12183
|
-
schemaVersion:
|
|
12184
|
-
restartable:
|
|
12185
|
-
workflowStatusListenerEnabled:
|
|
12186
|
-
ownerEmail:
|
|
12187
|
-
timeoutPolicy:
|
|
12188
|
-
variables:
|
|
12189
|
-
inputTemplate:
|
|
12467
|
+
schemaVersion: z15.number().int().positive().optional(),
|
|
12468
|
+
restartable: z15.boolean().optional(),
|
|
12469
|
+
workflowStatusListenerEnabled: z15.boolean().optional(),
|
|
12470
|
+
ownerEmail: z15.string().email().optional(),
|
|
12471
|
+
timeoutPolicy: z15.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
|
|
12472
|
+
variables: z15.record(z15.string(), JsonValueSchema).optional(),
|
|
12473
|
+
inputTemplate: z15.record(z15.string(), JsonValueSchema).optional()
|
|
12190
12474
|
}).strict()
|
|
12191
12475
|
}).strict(),
|
|
12192
|
-
triggers:
|
|
12193
|
-
views:
|
|
12194
|
-
dataContracts:
|
|
12195
|
-
governance:
|
|
12196
|
-
interfaces:
|
|
12197
|
-
openai:
|
|
12476
|
+
triggers: z15.array(WorkflowTriggerSchema).default([]),
|
|
12477
|
+
views: z15.array(z15.object({ pageRef: ContractIdentifierSchema, placement: ContractIdentifierSchema.optional() }).strict()).default([]),
|
|
12478
|
+
dataContracts: z15.object({ reads: z15.array(ContractIdentifierSchema).default([]), writes: z15.array(ContractIdentifierSchema).default([]), emits: z15.array(ContractIdentifierSchema).default([]) }).strict(),
|
|
12479
|
+
governance: z15.object({ activated: z15.boolean(), validated: z15.boolean(), validationIssues: z15.array(WorkflowValidationIssueSchema).default([]), hidden: z15.boolean().optional() }).strict(),
|
|
12480
|
+
interfaces: z15.object({
|
|
12481
|
+
openai: z15.object({ enabled: z15.boolean(), modelName: z15.string().trim().min(1).optional() }).strict(),
|
|
12198
12482
|
shortcutRef: EntityRefSchema.optional(),
|
|
12199
12483
|
preferredAppId: ContractIdentifierSchema.optional()
|
|
12200
12484
|
}).strict().superRefine((interfaces, context) => {
|
|
@@ -12213,21 +12497,21 @@ var WorkflowDefinitionSchema = z14.object({
|
|
|
12213
12497
|
});
|
|
12214
12498
|
|
|
12215
12499
|
// src/contracts/workflow-runtime.ts
|
|
12216
|
-
import { z as
|
|
12217
|
-
var WorkflowCatalogEntrySchema =
|
|
12218
|
-
contract:
|
|
12500
|
+
import { z as z16 } from "zod";
|
|
12501
|
+
var WorkflowCatalogEntrySchema = z16.object({
|
|
12502
|
+
contract: z16.literal("WorkflowCatalogEntry"),
|
|
12219
12503
|
workflowId: ContractIdentifierSchema,
|
|
12220
12504
|
teamId: ContractIdentifierSchema,
|
|
12221
12505
|
creatorRef: EntityRefSchema,
|
|
12222
12506
|
currentDefinitionRef: EntityRefSchema,
|
|
12223
|
-
lifecycle:
|
|
12224
|
-
asset:
|
|
12225
|
-
preset:
|
|
12226
|
-
marketplacePublished:
|
|
12507
|
+
lifecycle: z16.enum(["ACTIVE", "DELETED"]),
|
|
12508
|
+
asset: z16.object({
|
|
12509
|
+
preset: z16.boolean(),
|
|
12510
|
+
marketplacePublished: z16.boolean(),
|
|
12227
12511
|
publishConfig: JsonObjectSchema.optional(),
|
|
12228
|
-
sort:
|
|
12512
|
+
sort: z16.number().int(),
|
|
12229
12513
|
forkFromRef: EntityRefSchema.optional(),
|
|
12230
|
-
notAuthorized:
|
|
12514
|
+
notAuthorized: z16.boolean()
|
|
12231
12515
|
}).strict(),
|
|
12232
12516
|
createdAt: IsoDateTimeSchema,
|
|
12233
12517
|
updatedAt: IsoDateTimeSchema,
|
|
@@ -12262,17 +12546,17 @@ var WorkflowCatalogEntrySchema = z15.object({
|
|
|
12262
12546
|
});
|
|
12263
12547
|
}
|
|
12264
12548
|
});
|
|
12265
|
-
var WorkflowPublicationSchema =
|
|
12266
|
-
contract:
|
|
12549
|
+
var WorkflowPublicationSchema = z16.object({
|
|
12550
|
+
contract: z16.literal("WorkflowPublication"),
|
|
12267
12551
|
publicationId: ContractIdentifierSchema,
|
|
12268
12552
|
definitionRef: EntityRefSchema,
|
|
12269
12553
|
runtimeDefinitionRef: EntityRefSchema,
|
|
12270
12554
|
sourceHash: Sha256Schema,
|
|
12271
12555
|
compiledHash: Sha256Schema,
|
|
12272
|
-
status:
|
|
12556
|
+
status: z16.enum(["PENDING", "PUBLISHED", "FAILED", "RETIRED"]),
|
|
12273
12557
|
publisherRef: EntityRefSchema,
|
|
12274
12558
|
publishedAt: IsoDateTimeSchema.optional(),
|
|
12275
|
-
failureReason:
|
|
12559
|
+
failureReason: z16.string().trim().min(1).optional()
|
|
12276
12560
|
}).strict().superRefine((publication, context) => {
|
|
12277
12561
|
if (publication.definitionRef.kind !== "workflow-definition") {
|
|
12278
12562
|
context.addIssue({
|
|
@@ -12303,12 +12587,12 @@ var WorkflowPublicationSchema = z15.object({
|
|
|
12303
12587
|
});
|
|
12304
12588
|
}
|
|
12305
12589
|
});
|
|
12306
|
-
var WorkflowCompletionCommitSchema =
|
|
12307
|
-
contract:
|
|
12590
|
+
var WorkflowCompletionCommitSchema = z16.object({
|
|
12591
|
+
contract: z16.literal("WorkflowCompletionCommit"),
|
|
12308
12592
|
commitId: ContractIdentifierSchema,
|
|
12309
12593
|
run: ApplicationRunSchema,
|
|
12310
|
-
outputs:
|
|
12311
|
-
artifacts:
|
|
12594
|
+
outputs: z16.array(OutputRecordSchema),
|
|
12595
|
+
artifacts: z16.array(ArtifactManifestSchema),
|
|
12312
12596
|
lineage: LineageRecordSchema,
|
|
12313
12597
|
completedAt: IsoDateTimeSchema
|
|
12314
12598
|
}).strict().superRefine((commit, context) => {
|
|
@@ -12350,15 +12634,15 @@ var WorkflowCompletionCommitSchema = z15.object({
|
|
|
12350
12634
|
}
|
|
12351
12635
|
});
|
|
12352
12636
|
});
|
|
12353
|
-
var WorkflowCompletionReceiptSchema =
|
|
12354
|
-
contract:
|
|
12637
|
+
var WorkflowCompletionReceiptSchema = z16.object({
|
|
12638
|
+
contract: z16.literal("WorkflowCompletionReceipt"),
|
|
12355
12639
|
commitId: ContractIdentifierSchema,
|
|
12356
12640
|
runRef: EntityRefSchema,
|
|
12357
|
-
outputRefs:
|
|
12358
|
-
artifactRefs:
|
|
12641
|
+
outputRefs: z16.array(EntityRefSchema),
|
|
12642
|
+
artifactRefs: z16.array(EntityRefSchema),
|
|
12359
12643
|
contentHash: Sha256Schema,
|
|
12360
12644
|
committedAt: IsoDateTimeSchema,
|
|
12361
|
-
idempotentReplay:
|
|
12645
|
+
idempotentReplay: z16.boolean()
|
|
12362
12646
|
}).strict().superRefine((receipt, context) => {
|
|
12363
12647
|
if (receipt.runRef.kind !== "application-run") {
|
|
12364
12648
|
context.addIssue({
|
|
@@ -12422,6 +12706,9 @@ var canonicalContractSchemas = {
|
|
|
12422
12706
|
"expiring-access-grant": ExpiringAccessGrantSchema,
|
|
12423
12707
|
"hotword-body": HotwordBodySchema,
|
|
12424
12708
|
"lineage-record": LineageRecordSchema,
|
|
12709
|
+
"menu-definition": MenuDefinitionSchema,
|
|
12710
|
+
"menu-definition-set": MenuDefinitionSetSchema,
|
|
12711
|
+
"menu-runtime-bundle": MenuRuntimeBundleSchema,
|
|
12425
12712
|
"ontology-definition": OntologyDefinitionSchema,
|
|
12426
12713
|
"overlay-node": OverlayNodeSchema,
|
|
12427
12714
|
"output-record": OutputRecordSchema,
|
|
@@ -12818,6 +13105,11 @@ var compileProductDeclaration = (input) => {
|
|
|
12818
13105
|
const commandsByName = uniqueIndex(declaration.commands, (value) => value.commandName, "command name");
|
|
12819
13106
|
const capabilitiesById = uniqueIndex(declaration.capabilities, (value) => value.id, "capability id");
|
|
12820
13107
|
const pagesById = uniqueIndex(declaration.pages, (value) => value.pageId, "page id");
|
|
13108
|
+
const menusByKey = uniqueIndex(
|
|
13109
|
+
declaration.menus,
|
|
13110
|
+
(value) => `${value.applicationId}/${value.surface}/${value.menuId}`,
|
|
13111
|
+
"menu definition"
|
|
13112
|
+
);
|
|
12821
13113
|
const nodes = [];
|
|
12822
13114
|
const edges = [];
|
|
12823
13115
|
const addNode = (kind, id) => nodes.push(ref(kind, id));
|
|
@@ -12832,6 +13124,7 @@ var compileProductDeclaration = (input) => {
|
|
|
12832
13124
|
}
|
|
12833
13125
|
for (const command of declaration.commands) addNode("command", command.commandName);
|
|
12834
13126
|
for (const capability of declaration.capabilities) addNode("capability", capability.id);
|
|
13127
|
+
for (const menu of declaration.menus) addNode("menu", `${menu.applicationId}/${menu.surface}/${menu.menuId}`);
|
|
12835
13128
|
for (const concept of declaration.concepts) {
|
|
12836
13129
|
addNode("concept", concept.conceptId);
|
|
12837
13130
|
if (concept.ontologyId) {
|
|
@@ -12877,6 +13170,7 @@ var compileProductDeclaration = (input) => {
|
|
|
12877
13170
|
commandsByName,
|
|
12878
13171
|
capabilitiesById,
|
|
12879
13172
|
pagesById,
|
|
13173
|
+
menusByKey,
|
|
12880
13174
|
nodes: Object.freeze(nodes),
|
|
12881
13175
|
edges: Object.freeze(edges)
|
|
12882
13176
|
});
|
|
@@ -12955,6 +13249,512 @@ var buildChangeImpactGraph = (previousInput, nextInput, generatedAt = (/* @__PUR
|
|
|
12955
13249
|
});
|
|
12956
13250
|
};
|
|
12957
13251
|
|
|
13252
|
+
// src/runtime/menu-compiler.ts
|
|
13253
|
+
var MenuCompilationError = class extends Error {
|
|
13254
|
+
constructor(code, path, message) {
|
|
13255
|
+
super(`${path}: ${message}`);
|
|
13256
|
+
this.name = "MenuCompilationError";
|
|
13257
|
+
this.code = code;
|
|
13258
|
+
this.path = path;
|
|
13259
|
+
}
|
|
13260
|
+
};
|
|
13261
|
+
var menuKey = (applicationId, surface, menuId) => `${applicationId}\0${surface}\0${menuId}`;
|
|
13262
|
+
var pageKey = (page) => `${page.applicationId}\0${page.pageId}`;
|
|
13263
|
+
var targetKey = (page, activationId) => `${page.applicationId}\0${page.pageId}\0${activationId}`;
|
|
13264
|
+
var actionKey = (applicationId, actionRef) => `${applicationId}\0${actionRef}`;
|
|
13265
|
+
var providerKey = (applicationId, providerId) => `${applicationId}\0${providerId}`;
|
|
13266
|
+
var stableSerialize = (value) => {
|
|
13267
|
+
if (value === void 0) return "null";
|
|
13268
|
+
if (value === null || typeof value !== "object") return JSON.stringify(value) ?? "null";
|
|
13269
|
+
if (Array.isArray(value)) return `[${value.map((item) => stableSerialize(item)).join(",")}]`;
|
|
13270
|
+
const record = value;
|
|
13271
|
+
return `{${Object.keys(record).filter((key) => record[key] !== void 0).sort().map((key) => `${JSON.stringify(key)}:${stableSerialize(record[key])}`).join(",")}}`;
|
|
13272
|
+
};
|
|
13273
|
+
var deepFreeze = (value) => {
|
|
13274
|
+
if (value === null || typeof value !== "object" || Object.isFrozen(value)) return value;
|
|
13275
|
+
Object.values(value).forEach((child) => deepFreeze(child));
|
|
13276
|
+
return Object.freeze(value);
|
|
13277
|
+
};
|
|
13278
|
+
var SHA256_INITIAL = [
|
|
13279
|
+
1779033703,
|
|
13280
|
+
3144134277,
|
|
13281
|
+
1013904242,
|
|
13282
|
+
2773480762,
|
|
13283
|
+
1359893119,
|
|
13284
|
+
2600822924,
|
|
13285
|
+
528734635,
|
|
13286
|
+
1541459225
|
|
13287
|
+
];
|
|
13288
|
+
var SHA256_ROUND = [
|
|
13289
|
+
1116352408,
|
|
13290
|
+
1899447441,
|
|
13291
|
+
3049323471,
|
|
13292
|
+
3921009573,
|
|
13293
|
+
961987163,
|
|
13294
|
+
1508970993,
|
|
13295
|
+
2453635748,
|
|
13296
|
+
2870763221,
|
|
13297
|
+
3624381080,
|
|
13298
|
+
310598401,
|
|
13299
|
+
607225278,
|
|
13300
|
+
1426881987,
|
|
13301
|
+
1925078388,
|
|
13302
|
+
2162078206,
|
|
13303
|
+
2614888103,
|
|
13304
|
+
3248222580,
|
|
13305
|
+
3835390401,
|
|
13306
|
+
4022224774,
|
|
13307
|
+
264347078,
|
|
13308
|
+
604807628,
|
|
13309
|
+
770255983,
|
|
13310
|
+
1249150122,
|
|
13311
|
+
1555081692,
|
|
13312
|
+
1996064986,
|
|
13313
|
+
2554220882,
|
|
13314
|
+
2821834349,
|
|
13315
|
+
2952996808,
|
|
13316
|
+
3210313671,
|
|
13317
|
+
3336571891,
|
|
13318
|
+
3584528711,
|
|
13319
|
+
113926993,
|
|
13320
|
+
338241895,
|
|
13321
|
+
666307205,
|
|
13322
|
+
773529912,
|
|
13323
|
+
1294757372,
|
|
13324
|
+
1396182291,
|
|
13325
|
+
1695183700,
|
|
13326
|
+
1986661051,
|
|
13327
|
+
2177026350,
|
|
13328
|
+
2456956037,
|
|
13329
|
+
2730485921,
|
|
13330
|
+
2820302411,
|
|
13331
|
+
3259730800,
|
|
13332
|
+
3345764771,
|
|
13333
|
+
3516065817,
|
|
13334
|
+
3600352804,
|
|
13335
|
+
4094571909,
|
|
13336
|
+
275423344,
|
|
13337
|
+
430227734,
|
|
13338
|
+
506948616,
|
|
13339
|
+
659060556,
|
|
13340
|
+
883997877,
|
|
13341
|
+
958139571,
|
|
13342
|
+
1322822218,
|
|
13343
|
+
1537002063,
|
|
13344
|
+
1747873779,
|
|
13345
|
+
1955562222,
|
|
13346
|
+
2024104815,
|
|
13347
|
+
2227730452,
|
|
13348
|
+
2361852424,
|
|
13349
|
+
2428436474,
|
|
13350
|
+
2756734187,
|
|
13351
|
+
3204031479,
|
|
13352
|
+
3329325298
|
|
13353
|
+
];
|
|
13354
|
+
var rotateRight = (value, amount) => value >>> amount | value << 32 - amount;
|
|
13355
|
+
var sha256Hex = (value) => {
|
|
13356
|
+
const source = [...new TextEncoder().encode(value)];
|
|
13357
|
+
const bitLength = source.length * 8;
|
|
13358
|
+
source.push(128);
|
|
13359
|
+
while (source.length % 64 !== 56) source.push(0);
|
|
13360
|
+
const high = Math.floor(bitLength / 4294967296);
|
|
13361
|
+
const low = bitLength >>> 0;
|
|
13362
|
+
for (let shift = 24; shift >= 0; shift -= 8) source.push(high >>> shift & 255);
|
|
13363
|
+
for (let shift = 24; shift >= 0; shift -= 8) source.push(low >>> shift & 255);
|
|
13364
|
+
const hash = [...SHA256_INITIAL];
|
|
13365
|
+
const words = new Array(64).fill(0);
|
|
13366
|
+
for (let offset = 0; offset < source.length; offset += 64) {
|
|
13367
|
+
for (let index = 0; index < 16; index += 1) {
|
|
13368
|
+
const start = offset + index * 4;
|
|
13369
|
+
words[index] = (source[start] << 24 | source[start + 1] << 16 | source[start + 2] << 8 | source[start + 3]) >>> 0;
|
|
13370
|
+
}
|
|
13371
|
+
for (let index = 16; index < 64; index += 1) {
|
|
13372
|
+
const previous = words[index - 15];
|
|
13373
|
+
const recent = words[index - 2];
|
|
13374
|
+
const small0 = rotateRight(previous, 7) ^ rotateRight(previous, 18) ^ previous >>> 3;
|
|
13375
|
+
const small1 = rotateRight(recent, 17) ^ rotateRight(recent, 19) ^ recent >>> 10;
|
|
13376
|
+
words[index] = words[index - 16] + small0 + words[index - 7] + small1 >>> 0;
|
|
13377
|
+
}
|
|
13378
|
+
let [a, b, c, d, e, f, g, h] = hash;
|
|
13379
|
+
for (let index = 0; index < 64; index += 1) {
|
|
13380
|
+
const big1 = rotateRight(e, 6) ^ rotateRight(e, 11) ^ rotateRight(e, 25);
|
|
13381
|
+
const choice = e & f ^ ~e & g;
|
|
13382
|
+
const temp1 = h + big1 + choice + SHA256_ROUND[index] + words[index] >>> 0;
|
|
13383
|
+
const big0 = rotateRight(a, 2) ^ rotateRight(a, 13) ^ rotateRight(a, 22);
|
|
13384
|
+
const majority = a & b ^ a & c ^ b & c;
|
|
13385
|
+
const temp2 = big0 + majority >>> 0;
|
|
13386
|
+
h = g;
|
|
13387
|
+
g = f;
|
|
13388
|
+
f = e;
|
|
13389
|
+
e = d + temp1 >>> 0;
|
|
13390
|
+
d = c;
|
|
13391
|
+
c = b;
|
|
13392
|
+
b = a;
|
|
13393
|
+
a = temp1 + temp2 >>> 0;
|
|
13394
|
+
}
|
|
13395
|
+
hash[0] = hash[0] + a >>> 0;
|
|
13396
|
+
hash[1] = hash[1] + b >>> 0;
|
|
13397
|
+
hash[2] = hash[2] + c >>> 0;
|
|
13398
|
+
hash[3] = hash[3] + d >>> 0;
|
|
13399
|
+
hash[4] = hash[4] + e >>> 0;
|
|
13400
|
+
hash[5] = hash[5] + f >>> 0;
|
|
13401
|
+
hash[6] = hash[6] + g >>> 0;
|
|
13402
|
+
hash[7] = hash[7] + h >>> 0;
|
|
13403
|
+
}
|
|
13404
|
+
return hash.map((part) => part.toString(16).padStart(8, "0")).join("");
|
|
13405
|
+
};
|
|
13406
|
+
var uniqueIndex2 = (values, key, path) => {
|
|
13407
|
+
const result = /* @__PURE__ */ new Map();
|
|
13408
|
+
values.forEach((value, index) => {
|
|
13409
|
+
const identity = key(value);
|
|
13410
|
+
if (result.has(identity)) {
|
|
13411
|
+
throw new MenuCompilationError(
|
|
13412
|
+
"duplicate-registration",
|
|
13413
|
+
`${path}[${index}]`,
|
|
13414
|
+
`Duplicate registry identity: ${identity.split("\0").join("/")}`
|
|
13415
|
+
);
|
|
13416
|
+
}
|
|
13417
|
+
result.set(identity, value);
|
|
13418
|
+
});
|
|
13419
|
+
return result;
|
|
13420
|
+
};
|
|
13421
|
+
var normalizedSiblingOrder = (left, right) => left.order - right.order || left.nodeId.localeCompare(right.nodeId);
|
|
13422
|
+
var normalizeNodeOrder = (nodes) => {
|
|
13423
|
+
const childrenByParent = /* @__PURE__ */ new Map();
|
|
13424
|
+
nodes.forEach((node) => {
|
|
13425
|
+
const parent = node.parentNodeId ?? "";
|
|
13426
|
+
const children = childrenByParent.get(parent) ?? [];
|
|
13427
|
+
children.push(node);
|
|
13428
|
+
childrenByParent.set(parent, children);
|
|
13429
|
+
});
|
|
13430
|
+
childrenByParent.forEach((children) => children.sort(normalizedSiblingOrder));
|
|
13431
|
+
const ordered = [];
|
|
13432
|
+
const appendChildren = (parentNodeId) => {
|
|
13433
|
+
for (const node of childrenByParent.get(parentNodeId) ?? []) {
|
|
13434
|
+
ordered.push(node);
|
|
13435
|
+
appendChildren(node.nodeId);
|
|
13436
|
+
}
|
|
13437
|
+
};
|
|
13438
|
+
appendChildren("");
|
|
13439
|
+
return ordered;
|
|
13440
|
+
};
|
|
13441
|
+
var requirementFromPage = (registration) => ({
|
|
13442
|
+
authenticated: registration.page.visibility.authenticated,
|
|
13443
|
+
permissionAllOf: registration.page.visibility.permissionAllOf,
|
|
13444
|
+
permissionAnyOf: registration.page.visibility.permissionAnyOf,
|
|
13445
|
+
featureFlags: registration.page.visibility.featureFlags
|
|
13446
|
+
});
|
|
13447
|
+
var validatePermissionCodes = (permissions, knownPermissions, path) => {
|
|
13448
|
+
permissions.forEach((permission, index) => {
|
|
13449
|
+
if (!knownPermissions.has(permission)) {
|
|
13450
|
+
throw new MenuCompilationError(
|
|
13451
|
+
"unknown-permission",
|
|
13452
|
+
`${path}[${index}]`,
|
|
13453
|
+
`Unknown platform permission: ${permission}`
|
|
13454
|
+
);
|
|
13455
|
+
}
|
|
13456
|
+
});
|
|
13457
|
+
};
|
|
13458
|
+
var validateInput = (value, schemaRef, validators, path) => {
|
|
13459
|
+
if (!schemaRef) {
|
|
13460
|
+
throw new MenuCompilationError(
|
|
13461
|
+
"missing-input-schema",
|
|
13462
|
+
path,
|
|
13463
|
+
"Input is configured but the target has no input schema reference."
|
|
13464
|
+
);
|
|
13465
|
+
}
|
|
13466
|
+
const validator = validators.get(schemaRef);
|
|
13467
|
+
if (!validator) {
|
|
13468
|
+
throw new MenuCompilationError(
|
|
13469
|
+
"unknown-input-schema",
|
|
13470
|
+
path,
|
|
13471
|
+
`No input validator is registered for ${schemaRef}.`
|
|
13472
|
+
);
|
|
13473
|
+
}
|
|
13474
|
+
try {
|
|
13475
|
+
return MenuBoundedInputSchema.parse(validator(value));
|
|
13476
|
+
} catch (error) {
|
|
13477
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
13478
|
+
throw new MenuCompilationError("invalid-input", path, `Input validation failed for ${schemaRef}: ${message}`);
|
|
13479
|
+
}
|
|
13480
|
+
};
|
|
13481
|
+
var evaluateAccess = (item, context) => {
|
|
13482
|
+
const reasons = [];
|
|
13483
|
+
const protectedBySession = item.access.authenticated || item.access.permissionAllOf.length > 0 || item.access.permissionAnyOf.length > 0 || item.access.requiredPermission !== void 0;
|
|
13484
|
+
if (!context.sessionResolved && protectedBySession) reasons.push("session-unresolved");
|
|
13485
|
+
if (item.access.authenticated && !context.authenticated) reasons.push("authentication");
|
|
13486
|
+
const granted = new Set(context.permissionCodes);
|
|
13487
|
+
const elevated = context.isKernelSuperAdmin === true || granted.has("*");
|
|
13488
|
+
if (item.access.permissionAllOf.some((permission) => !granted.has(permission))) {
|
|
13489
|
+
reasons.push("permission-all");
|
|
13490
|
+
}
|
|
13491
|
+
if (item.access.permissionAnyOf.length > 0 && !item.access.permissionAnyOf.some((permission) => granted.has(permission))) {
|
|
13492
|
+
reasons.push("permission-any");
|
|
13493
|
+
}
|
|
13494
|
+
if (!elevated && item.access.requiredPermission && !granted.has(item.access.requiredPermission)) {
|
|
13495
|
+
reasons.push("required-permission");
|
|
13496
|
+
}
|
|
13497
|
+
if (item.access.featureFlags.some((flag) => context.featureFlags[flag] !== true)) {
|
|
13498
|
+
reasons.push("feature-flag");
|
|
13499
|
+
}
|
|
13500
|
+
return Object.freeze({ allowed: reasons.length === 0, reasons: Object.freeze(reasons) });
|
|
13501
|
+
};
|
|
13502
|
+
var resolveMenuActivationId = (page, activationId) => activationId ?? page.pageId;
|
|
13503
|
+
var readMenuActivationFromSearch = (search) => {
|
|
13504
|
+
const params = typeof search === "string" ? new URLSearchParams(search) : search;
|
|
13505
|
+
const value = params.get(MENU_ACTIVATION_QUERY_PARAMETER)?.trim();
|
|
13506
|
+
return value || void 0;
|
|
13507
|
+
};
|
|
13508
|
+
var serializeMenuActivationSearch = (search, page, activationId) => {
|
|
13509
|
+
const params = new URLSearchParams(typeof search === "string" ? search : search.toString());
|
|
13510
|
+
const effectiveActivationId = resolveMenuActivationId(page, activationId);
|
|
13511
|
+
if (effectiveActivationId === page.pageId) params.delete(MENU_ACTIVATION_QUERY_PARAMETER);
|
|
13512
|
+
else params.set(MENU_ACTIVATION_QUERY_PARAMETER, effectiveActivationId);
|
|
13513
|
+
return params.toString();
|
|
13514
|
+
};
|
|
13515
|
+
var isCompiledMenuItemSelected = (item, page, activationId) => item.behavior.kind === "navigate" && pageKey(item.behavior.page) === pageKey(page) && item.behavior.activationId === resolveMenuActivationId(page, activationId);
|
|
13516
|
+
var compileMenuRuntimeBundle = (input) => {
|
|
13517
|
+
const applicationId = ContractIdentifierSchema.parse(input.applicationId);
|
|
13518
|
+
const supportedSurfaces = new Set(input.supportedSurfaces.map((surface) => ContractIdentifierSchema.parse(surface)));
|
|
13519
|
+
const definitions = input.definitions.map((definition) => MenuDefinitionSchema.parse(definition));
|
|
13520
|
+
const pages = input.pages.map((registration) => MenuPageRegistrationSchema.parse(registration));
|
|
13521
|
+
const actions = input.actions.map((registration) => MenuActionRegistrationSchema.parse(registration));
|
|
13522
|
+
const contributionProviders = input.contributionProviders.map((registration) => MenuContributionProviderRegistrationSchema.parse(registration));
|
|
13523
|
+
const inputValidators = input.inputValidators ?? /* @__PURE__ */ new Map();
|
|
13524
|
+
const knownPermissions = new Set(input.permissionCodes.map((permission) => ContractIdentifierSchema.parse(permission)));
|
|
13525
|
+
pages.forEach((registration, index) => {
|
|
13526
|
+
if (!registration.page.visibility.productContexts.some((context) => context === registration.applicationId)) {
|
|
13527
|
+
throw new MenuCompilationError(
|
|
13528
|
+
"invalid-page-application",
|
|
13529
|
+
`pages[${index}].applicationId`,
|
|
13530
|
+
`Page ${registration.page.pageId} is not visible in ${registration.applicationId}.`
|
|
13531
|
+
);
|
|
13532
|
+
}
|
|
13533
|
+
});
|
|
13534
|
+
const pagesByKey = uniqueIndex2(pages, (registration) => pageKey({
|
|
13535
|
+
applicationId: registration.applicationId,
|
|
13536
|
+
pageId: registration.page.pageId
|
|
13537
|
+
}), "pages");
|
|
13538
|
+
const actionsByKey = uniqueIndex2(actions, (registration) => actionKey(
|
|
13539
|
+
registration.applicationId,
|
|
13540
|
+
registration.actionRef
|
|
13541
|
+
), "actions");
|
|
13542
|
+
const providersByKey = uniqueIndex2(contributionProviders, (registration) => providerKey(
|
|
13543
|
+
registration.applicationId,
|
|
13544
|
+
registration.providerId
|
|
13545
|
+
), "contributionProviders");
|
|
13546
|
+
const definitionsByKey = /* @__PURE__ */ new Map();
|
|
13547
|
+
definitions.forEach((definition, index) => {
|
|
13548
|
+
const identity = menuKey(definition.applicationId, definition.surface, definition.menuId);
|
|
13549
|
+
if (definitionsByKey.has(identity)) {
|
|
13550
|
+
throw new MenuCompilationError(
|
|
13551
|
+
"duplicate-definition",
|
|
13552
|
+
`definitions[${index}]`,
|
|
13553
|
+
`Duplicate menu definition: ${definition.applicationId}/${definition.surface}/${definition.menuId}`
|
|
13554
|
+
);
|
|
13555
|
+
}
|
|
13556
|
+
definitionsByKey.set(identity, definition);
|
|
13557
|
+
});
|
|
13558
|
+
const targetSourceSignatures = /* @__PURE__ */ new Map();
|
|
13559
|
+
const navigationTargetsByKey = /* @__PURE__ */ new Map();
|
|
13560
|
+
const serverInputByTargetKey = /* @__PURE__ */ new Map();
|
|
13561
|
+
const requestedTargetKeys = /* @__PURE__ */ new Set();
|
|
13562
|
+
const requestedMenus = [];
|
|
13563
|
+
definitions.forEach((definition, definitionIndex) => {
|
|
13564
|
+
if (definition.applicationId === applicationId && !supportedSurfaces.has(definition.surface)) {
|
|
13565
|
+
throw new MenuCompilationError(
|
|
13566
|
+
"unsupported-surface",
|
|
13567
|
+
`definitions[${definitionIndex}].surface`,
|
|
13568
|
+
`Application ${applicationId} does not support menu surface ${definition.surface}.`
|
|
13569
|
+
);
|
|
13570
|
+
}
|
|
13571
|
+
const compiledNodes = definition.nodes.map((node, nodeIndex) => {
|
|
13572
|
+
if (node.kind !== "item") return node;
|
|
13573
|
+
const nodePath = `definitions[${definitionIndex}].nodes[${nodeIndex}]`;
|
|
13574
|
+
if (node.requiredPermission && !knownPermissions.has(node.requiredPermission)) {
|
|
13575
|
+
throw new MenuCompilationError(
|
|
13576
|
+
"unknown-permission",
|
|
13577
|
+
`${nodePath}.requiredPermission`,
|
|
13578
|
+
`Unknown platform permission: ${node.requiredPermission}`
|
|
13579
|
+
);
|
|
13580
|
+
}
|
|
13581
|
+
let access;
|
|
13582
|
+
if (node.behavior.kind === "navigate") {
|
|
13583
|
+
const registration = pagesByKey.get(pageKey(node.behavior.page));
|
|
13584
|
+
if (!registration) {
|
|
13585
|
+
throw new MenuCompilationError(
|
|
13586
|
+
"unknown-page",
|
|
13587
|
+
`${nodePath}.behavior.page`,
|
|
13588
|
+
`Unknown page reference: ${node.behavior.page.applicationId}/${node.behavior.page.pageId}`
|
|
13589
|
+
);
|
|
13590
|
+
}
|
|
13591
|
+
access = requirementFromPage(registration);
|
|
13592
|
+
validatePermissionCodes(access.permissionAllOf, knownPermissions, `${nodePath}.targetAccess.permissionAllOf`);
|
|
13593
|
+
validatePermissionCodes(access.permissionAnyOf, knownPermissions, `${nodePath}.targetAccess.permissionAnyOf`);
|
|
13594
|
+
const activationId = resolveMenuActivationId(node.behavior.page, node.behavior.activationId);
|
|
13595
|
+
const identity = targetKey(node.behavior.page, activationId);
|
|
13596
|
+
let runtimeInput;
|
|
13597
|
+
let normalizedSourceInput;
|
|
13598
|
+
if (node.behavior.input) {
|
|
13599
|
+
const normalized = validateInput(
|
|
13600
|
+
node.behavior.input.value,
|
|
13601
|
+
registration.page.input?.schemaRef,
|
|
13602
|
+
inputValidators,
|
|
13603
|
+
`${nodePath}.behavior.input.value`
|
|
13604
|
+
);
|
|
13605
|
+
normalizedSourceInput = { exposure: node.behavior.input.exposure, value: normalized };
|
|
13606
|
+
runtimeInput = node.behavior.input.exposure === "client" ? { exposure: "client", value: normalized } : { exposure: "server" };
|
|
13607
|
+
if (node.behavior.input.exposure === "server" && definition.applicationId === applicationId) {
|
|
13608
|
+
serverInputByTargetKey.set(identity, deepFreeze(normalized));
|
|
13609
|
+
}
|
|
13610
|
+
}
|
|
13611
|
+
const signature = stableSerialize({
|
|
13612
|
+
kind: "navigate",
|
|
13613
|
+
page: node.behavior.page,
|
|
13614
|
+
activationId,
|
|
13615
|
+
input: normalizedSourceInput
|
|
13616
|
+
});
|
|
13617
|
+
const existingSignature = targetSourceSignatures.get(identity);
|
|
13618
|
+
if (existingSignature !== void 0 && existingSignature !== signature) {
|
|
13619
|
+
throw new MenuCompilationError(
|
|
13620
|
+
"conflicting-navigation-target",
|
|
13621
|
+
`${nodePath}.behavior`,
|
|
13622
|
+
`Navigation target ${node.behavior.page.applicationId}/${node.behavior.page.pageId}/${activationId} has conflicting behavior or input.`
|
|
13623
|
+
);
|
|
13624
|
+
}
|
|
13625
|
+
targetSourceSignatures.set(identity, signature);
|
|
13626
|
+
if (!navigationTargetsByKey.has(identity)) {
|
|
13627
|
+
navigationTargetsByKey.set(identity, {
|
|
13628
|
+
page: node.behavior.page,
|
|
13629
|
+
activationId,
|
|
13630
|
+
input: runtimeInput
|
|
13631
|
+
});
|
|
13632
|
+
}
|
|
13633
|
+
if (definition.applicationId === applicationId) requestedTargetKeys.add(identity);
|
|
13634
|
+
const { requiredPermission: requiredPermission2, behavior: _behavior2, ...presentation2 } = node;
|
|
13635
|
+
return CompiledMenuItemNodeSchema.parse({
|
|
13636
|
+
...presentation2,
|
|
13637
|
+
behavior: {
|
|
13638
|
+
kind: "navigate",
|
|
13639
|
+
page: node.behavior.page,
|
|
13640
|
+
activationId,
|
|
13641
|
+
input: runtimeInput
|
|
13642
|
+
},
|
|
13643
|
+
access: { ...access, requiredPermission: requiredPermission2 }
|
|
13644
|
+
});
|
|
13645
|
+
}
|
|
13646
|
+
const action = actionsByKey.get(actionKey(definition.applicationId, node.behavior.actionRef));
|
|
13647
|
+
if (!action) {
|
|
13648
|
+
throw new MenuCompilationError(
|
|
13649
|
+
"unknown-action",
|
|
13650
|
+
`${nodePath}.behavior.actionRef`,
|
|
13651
|
+
`Unknown action reference for ${definition.applicationId}: ${node.behavior.actionRef}`
|
|
13652
|
+
);
|
|
13653
|
+
}
|
|
13654
|
+
access = action.access;
|
|
13655
|
+
validatePermissionCodes(access.permissionAllOf, knownPermissions, `${nodePath}.targetAccess.permissionAllOf`);
|
|
13656
|
+
validatePermissionCodes(access.permissionAnyOf, knownPermissions, `${nodePath}.targetAccess.permissionAnyOf`);
|
|
13657
|
+
const actionInput = node.behavior.input ? validateInput(node.behavior.input, action.inputSchemaRef, inputValidators, `${nodePath}.behavior.input`) : void 0;
|
|
13658
|
+
const { requiredPermission, behavior: _behavior, ...presentation } = node;
|
|
13659
|
+
return CompiledMenuItemNodeSchema.parse({
|
|
13660
|
+
...presentation,
|
|
13661
|
+
behavior: { kind: "action", actionRef: node.behavior.actionRef, input: actionInput },
|
|
13662
|
+
access: { ...access, requiredPermission }
|
|
13663
|
+
});
|
|
13664
|
+
});
|
|
13665
|
+
definition.contributions.forEach((contribution, contributionIndex) => {
|
|
13666
|
+
const provider = providersByKey.get(providerKey(definition.applicationId, contribution.providerId));
|
|
13667
|
+
const path = `definitions[${definitionIndex}].contributions[${contributionIndex}].providerId`;
|
|
13668
|
+
if (!provider) {
|
|
13669
|
+
throw new MenuCompilationError(
|
|
13670
|
+
"unknown-contribution-provider",
|
|
13671
|
+
path,
|
|
13672
|
+
`Unknown contribution provider for ${definition.applicationId}: ${contribution.providerId}`
|
|
13673
|
+
);
|
|
13674
|
+
}
|
|
13675
|
+
if (provider.surfaces && !provider.surfaces.includes(definition.surface)) {
|
|
13676
|
+
throw new MenuCompilationError(
|
|
13677
|
+
"unsupported-contribution-surface",
|
|
13678
|
+
path,
|
|
13679
|
+
`Provider ${contribution.providerId} does not support surface ${definition.surface}.`
|
|
13680
|
+
);
|
|
13681
|
+
}
|
|
13682
|
+
});
|
|
13683
|
+
if (definition.applicationId !== applicationId) return;
|
|
13684
|
+
requestedMenus.push(CompiledMenuProjectionSchema.parse({
|
|
13685
|
+
applicationId: definition.applicationId,
|
|
13686
|
+
surface: definition.surface,
|
|
13687
|
+
menuId: definition.menuId,
|
|
13688
|
+
nodes: normalizeNodeOrder(compiledNodes),
|
|
13689
|
+
contributions: [...definition.contributions].sort((left, right) => (left.parentNodeId ?? "").localeCompare(right.parentNodeId ?? "") || left.order - right.order || left.providerId.localeCompare(right.providerId))
|
|
13690
|
+
}));
|
|
13691
|
+
});
|
|
13692
|
+
const menus = requestedMenus.sort((left, right) => left.surface.localeCompare(right.surface) || left.menuId.localeCompare(right.menuId));
|
|
13693
|
+
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));
|
|
13694
|
+
const unsignedDocument = {
|
|
13695
|
+
contract: "MenuRuntimeBundle",
|
|
13696
|
+
version: MENU_CONTRACT_VERSION,
|
|
13697
|
+
applicationId,
|
|
13698
|
+
sourceVersion: input.sourceVersion,
|
|
13699
|
+
menus,
|
|
13700
|
+
navigationTargets,
|
|
13701
|
+
sourceMap: Object.fromEntries(
|
|
13702
|
+
Object.entries(input.sourceMap ?? {}).sort(([left], [right]) => left.localeCompare(right))
|
|
13703
|
+
)
|
|
13704
|
+
};
|
|
13705
|
+
const document = MenuRuntimeBundleSchema.parse({
|
|
13706
|
+
...unsignedDocument,
|
|
13707
|
+
contentHash: sha256Hex(stableSerialize(unsignedDocument))
|
|
13708
|
+
});
|
|
13709
|
+
const menusByKey = new Map(document.menus.map((menu) => [
|
|
13710
|
+
menuKey(menu.applicationId, menu.surface, menu.menuId),
|
|
13711
|
+
menu
|
|
13712
|
+
]));
|
|
13713
|
+
const documentTargetsByKey = new Map(document.navigationTargets.map((target) => [
|
|
13714
|
+
targetKey(target.page, target.activationId),
|
|
13715
|
+
target
|
|
13716
|
+
]));
|
|
13717
|
+
const resolveNavigationTarget = (page, explicitActivationId) => {
|
|
13718
|
+
const parsedPage = MenuPageRefSchema.parse(page);
|
|
13719
|
+
if (explicitActivationId !== void 0) {
|
|
13720
|
+
const parsedActivation = ContractIdentifierSchema.safeParse(explicitActivationId);
|
|
13721
|
+
if (!parsedActivation.success) return Object.freeze({ status: "invalid", reason: "invalid-activation" });
|
|
13722
|
+
const target2 = documentTargetsByKey.get(targetKey(parsedPage, parsedActivation.data));
|
|
13723
|
+
if (target2) return Object.freeze({ status: "resolved", target: target2 });
|
|
13724
|
+
const sameActivation = document.navigationTargets.find((candidate) => candidate.page.applicationId === parsedPage.applicationId && candidate.activationId === parsedActivation.data);
|
|
13725
|
+
return Object.freeze({
|
|
13726
|
+
status: "invalid",
|
|
13727
|
+
reason: sameActivation ? "page-mismatch" : "unknown-activation"
|
|
13728
|
+
});
|
|
13729
|
+
}
|
|
13730
|
+
const target = documentTargetsByKey.get(targetKey(parsedPage, parsedPage.pageId));
|
|
13731
|
+
return target ? Object.freeze({ status: "resolved", target }) : Object.freeze({ status: "unmatched" });
|
|
13732
|
+
};
|
|
13733
|
+
return Object.freeze({
|
|
13734
|
+
document: deepFreeze(document),
|
|
13735
|
+
menusByKey,
|
|
13736
|
+
navigationTargetsByKey: documentTargetsByKey,
|
|
13737
|
+
serverInputByTargetKey,
|
|
13738
|
+
evaluateItemAccess: evaluateAccess,
|
|
13739
|
+
resolveNavigationTarget,
|
|
13740
|
+
selectedNodeIds(menu, page, activationId) {
|
|
13741
|
+
if (menu.applicationId !== document.applicationId) return /* @__PURE__ */ new Set();
|
|
13742
|
+
const nodesById = new Map(menu.nodes.map((node) => [node.nodeId, node]));
|
|
13743
|
+
const selected = /* @__PURE__ */ new Set();
|
|
13744
|
+
for (const node of menu.nodes) {
|
|
13745
|
+
if (node.kind !== "item" || !isCompiledMenuItemSelected(node, page, activationId)) continue;
|
|
13746
|
+
selected.add(node.nodeId);
|
|
13747
|
+
let parentNodeId = node.parentNodeId;
|
|
13748
|
+
while (parentNodeId) {
|
|
13749
|
+
selected.add(parentNodeId);
|
|
13750
|
+
parentNodeId = nodesById.get(parentNodeId)?.parentNodeId;
|
|
13751
|
+
}
|
|
13752
|
+
}
|
|
13753
|
+
return selected;
|
|
13754
|
+
}
|
|
13755
|
+
});
|
|
13756
|
+
};
|
|
13757
|
+
|
|
12958
13758
|
// src/runtime/view-provider-registry.ts
|
|
12959
13759
|
var referenceVersion = (version) => version === void 0 ? void 0 : String(version);
|
|
12960
13760
|
var sameStringSet = (left, right) => {
|
|
@@ -13230,7 +14030,7 @@ var compilePageRuntimeProjection = (input) => {
|
|
|
13230
14030
|
const guardsByPageId = unique2(document.guards, (guard) => guard.pageId, "guard pageId");
|
|
13231
14031
|
const renderersByPageId = unique2(document.renderers, (renderer) => renderer.pageId, "renderer pageId");
|
|
13232
14032
|
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));
|
|
13233
|
-
const
|
|
14033
|
+
const evaluateAccess2 = (pageId, context) => {
|
|
13234
14034
|
const guard = guardsByPageId.get(pageId);
|
|
13235
14035
|
if (!guard) throw new Error(`Unknown page guard: ${pageId}`);
|
|
13236
14036
|
const reasons = [];
|
|
@@ -13253,9 +14053,9 @@ var compilePageRuntimeProjection = (input) => {
|
|
|
13253
14053
|
navigationByPageId,
|
|
13254
14054
|
guardsByPageId,
|
|
13255
14055
|
renderersByPageId,
|
|
13256
|
-
evaluateAccess,
|
|
14056
|
+
evaluateAccess: evaluateAccess2,
|
|
13257
14057
|
visibleNavigation(context) {
|
|
13258
|
-
return Object.freeze(document.navigation.filter((item) =>
|
|
14058
|
+
return Object.freeze(document.navigation.filter((item) => evaluateAccess2(item.pageId, context).allowed));
|
|
13259
14059
|
},
|
|
13260
14060
|
matchRoute(pathname) {
|
|
13261
14061
|
const path = pathname.split("?")[0]?.split("#")[0] || "/";
|
|
@@ -13435,6 +14235,7 @@ var compileTenantRuntimeConfig = (input) => {
|
|
|
13435
14235
|
dataBinding: productConfig.dataBinding,
|
|
13436
14236
|
sourceMap: productConfig.sourceMap,
|
|
13437
14237
|
warnings: productConfig.warnings,
|
|
14238
|
+
menuBundle: input.menuBundle,
|
|
13438
14239
|
applicationConfig: productConfig.applicationConfig
|
|
13439
14240
|
}));
|
|
13440
14241
|
};
|
|
@@ -13755,6 +14556,15 @@ export {
|
|
|
13755
14556
|
CapabilitySourceTypeSchema,
|
|
13756
14557
|
ChangeImpactGraphSchema,
|
|
13757
14558
|
ChangeImpactSchema,
|
|
14559
|
+
CompiledMenuActionBehaviorSchema,
|
|
14560
|
+
CompiledMenuBehaviorSchema,
|
|
14561
|
+
CompiledMenuDividerNodeSchema,
|
|
14562
|
+
CompiledMenuGroupNodeSchema,
|
|
14563
|
+
CompiledMenuItemAccessSchema,
|
|
14564
|
+
CompiledMenuItemNodeSchema,
|
|
14565
|
+
CompiledMenuNavigateBehaviorSchema,
|
|
14566
|
+
CompiledMenuNodeSchema,
|
|
14567
|
+
CompiledMenuProjectionSchema,
|
|
13758
14568
|
CompletionEventSchema,
|
|
13759
14569
|
CompletionHeaderSchema,
|
|
13760
14570
|
ConceptDefinitionSchema,
|
|
@@ -13792,7 +14602,36 @@ export {
|
|
|
13792
14602
|
LineageRecordSchema,
|
|
13793
14603
|
LocaleIdentifierSchema,
|
|
13794
14604
|
LocalizedTextSchema,
|
|
14605
|
+
MENU_ACTIVATION_QUERY_PARAMETER,
|
|
14606
|
+
MENU_CONTRACT_VERSION,
|
|
14607
|
+
MENU_MAX_DEFINITIONS,
|
|
14608
|
+
MENU_MAX_INPUT_BYTES,
|
|
14609
|
+
MENU_MAX_INPUT_VALUES,
|
|
14610
|
+
MENU_MAX_NODES,
|
|
14611
|
+
MENU_MAX_TREE_DEPTH,
|
|
13795
14612
|
MONKEYS_REQUIRED_THEME_TOKEN_PATHS,
|
|
14613
|
+
MenuAccessRequirementSchema,
|
|
14614
|
+
MenuActionBehaviorSchema,
|
|
14615
|
+
MenuActionRegistrationSchema,
|
|
14616
|
+
MenuBehaviorSchema,
|
|
14617
|
+
MenuBoundedInputSchema,
|
|
14618
|
+
MenuCompilationError,
|
|
14619
|
+
MenuContributionProviderRegistrationSchema,
|
|
14620
|
+
MenuContributionResultSchema,
|
|
14621
|
+
MenuContributionSchema,
|
|
14622
|
+
MenuDefinitionSchema,
|
|
14623
|
+
MenuDefinitionSetSchema,
|
|
14624
|
+
MenuDividerNodeSchema,
|
|
14625
|
+
MenuGroupNodeSchema,
|
|
14626
|
+
MenuItemNodeSchema,
|
|
14627
|
+
MenuNavigateBehaviorSchema,
|
|
14628
|
+
MenuNavigationTargetSchema,
|
|
14629
|
+
MenuNodeSchema,
|
|
14630
|
+
MenuPageRefSchema,
|
|
14631
|
+
MenuPageRegistrationSchema,
|
|
14632
|
+
MenuRuntimeBundleSchema,
|
|
14633
|
+
MenuRuntimeInputBindingSchema,
|
|
14634
|
+
MenuSourceInputBindingSchema,
|
|
13796
14635
|
OntologyDefinitionSchema,
|
|
13797
14636
|
OutputRecordSchema,
|
|
13798
14637
|
OverlayNodeSchema,
|
|
@@ -13896,6 +14735,7 @@ export {
|
|
|
13896
14735
|
canonicalContractSchemas,
|
|
13897
14736
|
compileCapabilityRegistry,
|
|
13898
14737
|
compileConductorWorkflowDefinition,
|
|
14738
|
+
compileMenuRuntimeBundle,
|
|
13899
14739
|
compilePageRuntimeProjection,
|
|
13900
14740
|
compileProductDeclaration,
|
|
13901
14741
|
compileProductRuntimeCatalog,
|
|
@@ -13919,6 +14759,7 @@ export {
|
|
|
13919
14759
|
getAgentSessionRuntimeCapabilities,
|
|
13920
14760
|
isAgentResourceModeCompatible,
|
|
13921
14761
|
isAgentSessionTerminalStatus,
|
|
14762
|
+
isCompiledMenuItemSelected,
|
|
13922
14763
|
mergeThemeTokenDocuments,
|
|
13923
14764
|
normalizeAgentExecutionMode,
|
|
13924
14765
|
normalizeAgentMode,
|
|
@@ -13926,9 +14767,12 @@ export {
|
|
|
13926
14767
|
projectAgentSessionEvents,
|
|
13927
14768
|
publishOpenApiToolCapabilityManifests,
|
|
13928
14769
|
readApplicationHandoffFromUrl,
|
|
14770
|
+
readMenuActivationFromSearch,
|
|
13929
14771
|
resolveAgentSessionCommandTransition,
|
|
14772
|
+
resolveMenuActivationId,
|
|
13930
14773
|
resolveThemeTokens,
|
|
13931
14774
|
serializeApplicationHandoff,
|
|
14775
|
+
serializeMenuActivationSearch,
|
|
13932
14776
|
toAgentSessionViewModel,
|
|
13933
14777
|
validateDomainCommand,
|
|
13934
14778
|
validateThemeTokensDocument,
|