@inf-monkeys-tech/monkeys 1.0.36 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/contracts/common.d.ts +2 -1
- package/lib/contracts/common.d.ts.map +1 -1
- package/lib/contracts/common.js.map +1 -1
- package/lib/contracts/index.d.ts +1 -0
- package/lib/contracts/index.d.ts.map +1 -1
- package/lib/contracts/index.js +1 -0
- package/lib/contracts/index.js.map +1 -1
- package/lib/contracts/menu.d.ts +790 -0
- package/lib/contracts/menu.d.ts.map +1 -0
- package/lib/contracts/menu.js +319 -0
- package/lib/contracts/menu.js.map +1 -0
- package/lib/contracts/page.d.ts +6 -0
- package/lib/contracts/page.d.ts.map +1 -1
- package/lib/contracts/page.js +6 -0
- package/lib/contracts/page.js.map +1 -1
- package/lib/contracts/semantic.d.ts +59 -0
- package/lib/contracts/semantic.d.ts.map +1 -1
- package/lib/contracts/semantic.js +2 -0
- package/lib/contracts/semantic.js.map +1 -1
- package/lib/contracts/tenant.d.ts +154 -0
- package/lib/contracts/tenant.d.ts.map +1 -1
- package/lib/contracts/tenant.js +3 -0
- package/lib/contracts/tenant.js.map +1 -1
- package/lib/esm/contracts/index.mjs +1088 -768
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +1614 -771
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +1167 -364
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +1083 -768
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/index.json +3 -0
- package/lib/json-schema/menu-definition-set.schema.json +411 -0
- package/lib/json-schema/menu-definition.schema.json +385 -0
- package/lib/json-schema/menu-runtime-bundle.schema.json +541 -0
- package/lib/json-schema/page-definition.schema.json +14 -0
- package/lib/json-schema/page-runtime-descriptor.schema.json +14 -0
- package/lib/json-schema/product-declaration.schema.json +369 -1
- package/lib/json-schema/tenant-product-config.schema.json +389 -0
- package/lib/json-schema/tenant-runtime-config.schema.json +519 -0
- package/lib/runtime/declaration-compiler.d.ts +2 -0
- package/lib/runtime/declaration-compiler.d.ts.map +1 -1
- package/lib/runtime/declaration-compiler.js +4 -0
- package/lib/runtime/declaration-compiler.js.map +1 -1
- package/lib/runtime/index.d.ts +1 -0
- package/lib/runtime/index.d.ts.map +1 -1
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/index.js.map +1 -1
- package/lib/runtime/menu-compiler.d.ts +58 -0
- package/lib/runtime/menu-compiler.d.ts.map +1 -0
- package/lib/runtime/menu-compiler.js +436 -0
- package/lib/runtime/menu-compiler.js.map +1 -0
- package/lib/runtime/tenant-config.d.ts +2 -0
- package/lib/runtime/tenant-config.d.ts.map +1 -1
- package/lib/runtime/tenant-config.js +1 -0
- package/lib/runtime/tenant-config.js.map +1 -1
- package/lib/schemas/index.d.ts +406 -0
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +38 -3
- package/lib/schemas/index.js.map +1 -1
- package/package.json +1 -1
- package/test/fixtures/menu-definition.v1.json +41 -0
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,424 @@ 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()
|
|
11428
11709
|
}).strict().optional()
|
|
11429
11710
|
}).strict(),
|
|
11430
11711
|
landingPage: TenantLandingPageConfigSchema.optional(),
|
|
11431
|
-
auth:
|
|
11432
|
-
enabled:
|
|
11433
|
-
oidc:
|
|
11434
|
-
password:
|
|
11435
|
-
hideAuthToast:
|
|
11436
|
-
autoReload:
|
|
11437
|
-
defaultOtherTeam:
|
|
11712
|
+
auth: z13.object({
|
|
11713
|
+
enabled: z13.array(ContractIdentifierSchema).default([]),
|
|
11714
|
+
oidc: z13.object({ buttonText: z13.string().optional(), autoSignin: z13.boolean().optional() }).strict().optional(),
|
|
11715
|
+
password: z13.object({ disableAutoRegister: z13.boolean().optional() }).strict().optional(),
|
|
11716
|
+
hideAuthToast: z13.boolean().optional(),
|
|
11717
|
+
autoReload: z13.boolean().optional(),
|
|
11718
|
+
defaultOtherTeam: z13.boolean().optional()
|
|
11438
11719
|
}).strict(),
|
|
11439
|
-
endpoints:
|
|
11440
|
-
module:
|
|
11441
|
-
behavior:
|
|
11442
|
-
clearWorkflowFormStorageAfterUpdate:
|
|
11443
|
-
autoApproveOAuth:
|
|
11444
|
-
rememberWorkflowModelSelection:
|
|
11720
|
+
endpoints: z13.record(ContractIdentifierSchema, z13.string()),
|
|
11721
|
+
module: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]),
|
|
11722
|
+
behavior: z13.object({
|
|
11723
|
+
clearWorkflowFormStorageAfterUpdate: z13.boolean().optional(),
|
|
11724
|
+
autoApproveOAuth: z13.boolean().optional(),
|
|
11725
|
+
rememberWorkflowModelSelection: z13.boolean().optional()
|
|
11445
11726
|
}).strict(),
|
|
11446
|
-
dataManagement:
|
|
11447
|
-
favoriteOntologyId:
|
|
11448
|
-
pairedOntologyId:
|
|
11449
|
-
galleryOntologyIds:
|
|
11450
|
-
galleryOntologyId:
|
|
11451
|
-
dataBrowserDefaultOntologyId:
|
|
11452
|
-
workflowResultOntologyId:
|
|
11453
|
-
homeAdvertisement:
|
|
11727
|
+
dataManagement: z13.object({
|
|
11728
|
+
favoriteOntologyId: z13.string().optional(),
|
|
11729
|
+
pairedOntologyId: z13.string().optional(),
|
|
11730
|
+
galleryOntologyIds: z13.array(ContractIdentifierSchema).max(20).optional(),
|
|
11731
|
+
galleryOntologyId: z13.string().optional(),
|
|
11732
|
+
dataBrowserDefaultOntologyId: z13.string().optional(),
|
|
11733
|
+
workflowResultOntologyId: z13.string().optional(),
|
|
11734
|
+
homeAdvertisement: z13.object({
|
|
11454
11735
|
ontologyId: ContractIdentifierSchema,
|
|
11455
11736
|
viewId: ContractIdentifierSchema.optional(),
|
|
11456
|
-
viewType:
|
|
11737
|
+
viewType: z13.enum(["filter", "container", "share_link"]).optional(),
|
|
11457
11738
|
teamId: ContractIdentifierSchema.optional(),
|
|
11458
|
-
teamOnly:
|
|
11459
|
-
pageSize:
|
|
11460
|
-
sortBy:
|
|
11461
|
-
sortOrder:
|
|
11462
|
-
fieldMap:
|
|
11463
|
-
columnIds:
|
|
11739
|
+
teamOnly: z13.boolean().optional(),
|
|
11740
|
+
pageSize: z13.number().int().positive().optional(),
|
|
11741
|
+
sortBy: z13.enum(["pin_order", "asset_id", "updated_timestamp", "created_timestamp"]).optional(),
|
|
11742
|
+
sortOrder: z13.enum(["asc", "desc"]).optional(),
|
|
11743
|
+
fieldMap: z13.record(z13.string(), z13.string()).optional(),
|
|
11744
|
+
columnIds: z13.record(z13.string(), z13.string()).optional()
|
|
11464
11745
|
}).strict().optional(),
|
|
11465
|
-
homeTrendAssistant:
|
|
11746
|
+
homeTrendAssistant: z13.object({
|
|
11466
11747
|
ontologyId: ContractIdentifierSchema.optional(),
|
|
11467
11748
|
viewId: ContractIdentifierSchema.optional(),
|
|
11468
11749
|
viewInstanceId: ContractIdentifierSchema.optional(),
|
|
11469
|
-
viewName:
|
|
11750
|
+
viewName: z13.string().optional(),
|
|
11470
11751
|
teamId: ContractIdentifierSchema.optional(),
|
|
11471
11752
|
designOptionsWorkflowId: ContractIdentifierSchema.optional(),
|
|
11472
|
-
tep:
|
|
11473
|
-
runtime:
|
|
11753
|
+
tep: z13.object({ baseUrl: z13.string().optional(), timeoutMs: z13.number().int().positive().optional() }).strict().optional(),
|
|
11754
|
+
runtime: z13.object({ appId: ContractIdentifierSchema, tepBaseUrlConfigured: z13.boolean(), tepAuthorizationConfigured: z13.boolean(), tepCookieConfigured: z13.boolean() }).strict().optional()
|
|
11474
11755
|
}).strict().optional(),
|
|
11475
11756
|
trendRadar: TenantTrendRadarSourcesSchema.optional(),
|
|
11476
|
-
sharing:
|
|
11477
|
-
silentViewLinks:
|
|
11478
|
-
shareAccess:
|
|
11479
|
-
shareDialog:
|
|
11480
|
-
audience:
|
|
11481
|
-
accessLevel:
|
|
11482
|
-
viewTreeDelivery:
|
|
11757
|
+
sharing: z13.object({
|
|
11758
|
+
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(),
|
|
11759
|
+
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(),
|
|
11760
|
+
shareDialog: z13.object({
|
|
11761
|
+
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(),
|
|
11762
|
+
accessLevel: z13.object({ enabled: z13.boolean().optional(), allowed: z13.array(z13.enum(["read", "write"])).optional(), default: z13.enum(["read", "write"]).optional() }).strict().optional(),
|
|
11763
|
+
viewTreeDelivery: z13.object({ enabled: z13.boolean().optional(), allowed: z13.array(z13.enum(["manual", "auto"])).optional(), default: z13.enum(["manual", "auto"]).optional() }).strict().optional()
|
|
11483
11764
|
}).strict().optional()
|
|
11484
11765
|
}).strict().optional()
|
|
11485
11766
|
}).strict().optional(),
|
|
11486
|
-
compute:
|
|
11487
|
-
integrations:
|
|
11488
|
-
harbor:
|
|
11489
|
-
gitlab:
|
|
11490
|
-
kubernetes:
|
|
11767
|
+
compute: z13.object({
|
|
11768
|
+
integrations: z13.object({
|
|
11769
|
+
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(),
|
|
11770
|
+
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(),
|
|
11771
|
+
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
11772
|
}).strict().optional()
|
|
11492
11773
|
}).strict().optional(),
|
|
11493
|
-
data:
|
|
11494
|
-
storage:
|
|
11495
|
-
presignMode:
|
|
11496
|
-
presign:
|
|
11497
|
-
expiresInSeconds:
|
|
11498
|
-
buckets:
|
|
11499
|
-
|
|
11774
|
+
data: z13.object({}).strict().optional(),
|
|
11775
|
+
storage: z13.object({
|
|
11776
|
+
presignMode: z13.enum(["frontend", "backend", "both"]).optional(),
|
|
11777
|
+
presign: z13.object({
|
|
11778
|
+
expiresInSeconds: z13.number().int().positive(),
|
|
11779
|
+
buckets: z13.array(
|
|
11780
|
+
z13.object({
|
|
11500
11781
|
id: ContractIdentifierSchema,
|
|
11501
11782
|
provider: ContractIdentifierSchema,
|
|
11502
11783
|
preferredUrlPatternId: ContractIdentifierSchema,
|
|
11503
|
-
urlPatterns:
|
|
11504
|
-
|
|
11784
|
+
urlPatterns: z13.array(
|
|
11785
|
+
z13.object({
|
|
11505
11786
|
id: ContractIdentifierSchema,
|
|
11506
|
-
type:
|
|
11507
|
-
hostname:
|
|
11508
|
-
preferred:
|
|
11509
|
-
bucketSegment:
|
|
11787
|
+
type: z13.enum(["bucket-hostname", "provider-hostname"]),
|
|
11788
|
+
hostname: z13.string().trim().min(1),
|
|
11789
|
+
preferred: z13.boolean().optional(),
|
|
11790
|
+
bucketSegment: z13.string().optional()
|
|
11510
11791
|
}).strict()
|
|
11511
11792
|
)
|
|
11512
11793
|
}).strict()
|
|
11513
11794
|
)
|
|
11514
11795
|
}).strict().optional()
|
|
11515
11796
|
}).strict().optional(),
|
|
11516
|
-
monkeyData:
|
|
11797
|
+
monkeyData: z13.object({ baseUrl: z13.string().optional() }).strict().optional()
|
|
11517
11798
|
}).strict();
|
|
11518
|
-
var TenantProductConfigSchema =
|
|
11519
|
-
contract:
|
|
11799
|
+
var TenantProductConfigSchema = z13.object({
|
|
11800
|
+
contract: z13.literal("TenantProductConfig"),
|
|
11520
11801
|
tenantId: ContractIdentifierSchema,
|
|
11521
11802
|
appId: ContractIdentifierSchema,
|
|
11522
11803
|
environment: ContractIdentifierSchema,
|
|
11523
11804
|
designTokens: TenantDesignTokensConfigSchema,
|
|
11524
|
-
moduleRefs:
|
|
11525
|
-
pageRefs:
|
|
11526
|
-
featureFlags:
|
|
11805
|
+
moduleRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11806
|
+
pageRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11807
|
+
featureFlags: z13.record(z13.string(), z13.boolean()).default({}),
|
|
11527
11808
|
authBinding: TenantAuthBindingsSchema,
|
|
11528
11809
|
dataBinding: TenantDataBindingsSchema,
|
|
11529
|
-
sourceMap:
|
|
11530
|
-
warnings:
|
|
11810
|
+
sourceMap: z13.record(z13.string(), ContractIdentifierSchema),
|
|
11811
|
+
warnings: z13.array(z13.string()).default([]),
|
|
11812
|
+
menus: MenuDefinitionSetSchema.optional(),
|
|
11531
11813
|
applicationConfig: TenantApplicationConfigSchema
|
|
11532
11814
|
}).strict();
|
|
11533
|
-
var TenantRuntimeConfigSchema =
|
|
11534
|
-
contract:
|
|
11815
|
+
var TenantRuntimeConfigSchema = z13.object({
|
|
11816
|
+
contract: z13.literal("TenantRuntimeConfig"),
|
|
11535
11817
|
tenantId: ContractIdentifierSchema,
|
|
11536
11818
|
appId: ContractIdentifierSchema,
|
|
11537
11819
|
environment: ContractIdentifierSchema,
|
|
11538
11820
|
designTokens: ResolvedThemeTokensSchema,
|
|
11539
|
-
moduleRefs:
|
|
11540
|
-
pageRefs:
|
|
11541
|
-
featureFlags:
|
|
11821
|
+
moduleRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11822
|
+
pageRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11823
|
+
featureFlags: z13.record(z13.string(), z13.boolean()).default({}),
|
|
11542
11824
|
authBinding: TenantAuthBindingsSchema,
|
|
11543
11825
|
dataBinding: TenantDataBindingsSchema,
|
|
11544
|
-
sourceMap:
|
|
11545
|
-
warnings:
|
|
11826
|
+
sourceMap: z13.record(z13.string(), ContractIdentifierSchema),
|
|
11827
|
+
warnings: z13.array(z13.string()).default([]),
|
|
11828
|
+
menuBundle: MenuRuntimeBundleSchema.optional(),
|
|
11546
11829
|
applicationConfig: TenantApplicationConfigSchema
|
|
11547
11830
|
}).strict();
|
|
11548
11831
|
|
|
11549
11832
|
// 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 =
|
|
11833
|
+
import { z as z14 } from "zod";
|
|
11834
|
+
var RadarDecisionMetricsSchema = z14.object({
|
|
11835
|
+
currentSales: z14.number().finite(),
|
|
11836
|
+
forecastSales: z14.number().finite(),
|
|
11837
|
+
searchHeat: z14.number().finite(),
|
|
11838
|
+
socialHeat: z14.number().finite(),
|
|
11839
|
+
confidence: z14.number().min(0).max(1)
|
|
11840
|
+
}).strict();
|
|
11841
|
+
var TrendSourceSchema = z14.object({
|
|
11559
11842
|
sourceId: ContractIdentifierSchema,
|
|
11560
11843
|
provider: ContractIdentifierSchema,
|
|
11561
|
-
channel:
|
|
11844
|
+
channel: z14.enum(["trend", "ecommerce", "social", "search", "internal"]),
|
|
11562
11845
|
collectedAt: IsoDateTimeSchema,
|
|
11563
|
-
sourceUrl:
|
|
11564
|
-
evidenceRefs:
|
|
11846
|
+
sourceUrl: z14.string().url().optional(),
|
|
11847
|
+
evidenceRefs: z14.array(EntityRefSchema).default([])
|
|
11565
11848
|
}).strict();
|
|
11566
|
-
var TrendIngestRunSchema =
|
|
11567
|
-
contract:
|
|
11849
|
+
var TrendIngestRunSchema = z14.object({
|
|
11850
|
+
contract: z14.literal("TrendIngestRun"),
|
|
11568
11851
|
ingestRunId: ContractIdentifierSchema,
|
|
11569
11852
|
sourceId: ContractIdentifierSchema,
|
|
11570
11853
|
requestId: ContractIdentifierSchema,
|
|
11571
11854
|
idempotencyKey: ContractIdentifierSchema,
|
|
11572
|
-
status:
|
|
11573
|
-
recordCount:
|
|
11574
|
-
errorCount:
|
|
11855
|
+
status: z14.enum(["RUNNING", "SUCCEEDED", "FAILED", "PARTIAL"]),
|
|
11856
|
+
recordCount: z14.number().int().nonnegative(),
|
|
11857
|
+
errorCount: z14.number().int().nonnegative(),
|
|
11575
11858
|
startedAt: IsoDateTimeSchema,
|
|
11576
11859
|
completedAt: IsoDateTimeSchema.optional()
|
|
11577
11860
|
}).strict();
|
|
11578
|
-
var TrendSourceRecordSchema =
|
|
11579
|
-
contract:
|
|
11861
|
+
var TrendSourceRecordSchema = z14.object({
|
|
11862
|
+
contract: z14.literal("TrendSourceRecord"),
|
|
11580
11863
|
sourceRecordId: ContractIdentifierSchema,
|
|
11581
11864
|
source: TrendSourceSchema,
|
|
11582
11865
|
ingestRunRef: EntityRefSchema,
|
|
11583
|
-
recordVersion:
|
|
11866
|
+
recordVersion: z14.number().int().positive(),
|
|
11584
11867
|
contentHash: Sha256Schema,
|
|
11585
11868
|
payload: JsonValueSchema,
|
|
11586
11869
|
idempotencyKey: ContractIdentifierSchema,
|
|
11587
11870
|
collectedAt: IsoDateTimeSchema
|
|
11588
11871
|
}).strict();
|
|
11589
|
-
var HotwordBodySchema =
|
|
11590
|
-
contract:
|
|
11872
|
+
var HotwordBodySchema = z14.object({
|
|
11873
|
+
contract: z14.literal("HotwordBody"),
|
|
11591
11874
|
hotwordId: ContractIdentifierSchema,
|
|
11592
|
-
label:
|
|
11593
|
-
normalizedLabel:
|
|
11594
|
-
categories:
|
|
11595
|
-
sourceRefs:
|
|
11596
|
-
relationRefs:
|
|
11875
|
+
label: z14.string().trim().min(1),
|
|
11876
|
+
normalizedLabel: z14.string().trim().min(1),
|
|
11877
|
+
categories: z14.array(ContractIdentifierSchema).default([]),
|
|
11878
|
+
sourceRefs: z14.array(TrendSourceSchema).min(1),
|
|
11879
|
+
relationRefs: z14.array(EntityRefSchema).default([]),
|
|
11597
11880
|
createdAt: IsoDateTimeSchema,
|
|
11598
11881
|
updatedAt: IsoDateTimeSchema
|
|
11599
11882
|
}).strict();
|
|
11600
11883
|
var CommerceBodyFieldsSchema = {
|
|
11601
|
-
displayName:
|
|
11602
|
-
normalizedName:
|
|
11603
|
-
categories:
|
|
11604
|
-
sourceRefs:
|
|
11605
|
-
relationRefs:
|
|
11884
|
+
displayName: z14.string().trim().min(1),
|
|
11885
|
+
normalizedName: z14.string().trim().min(1),
|
|
11886
|
+
categories: z14.array(ContractIdentifierSchema).default([]),
|
|
11887
|
+
sourceRefs: z14.array(EntityRefSchema).min(1),
|
|
11888
|
+
relationRefs: z14.array(EntityRefSchema).default([]),
|
|
11606
11889
|
createdAt: IsoDateTimeSchema,
|
|
11607
11890
|
updatedAt: IsoDateTimeSchema
|
|
11608
11891
|
};
|
|
11609
|
-
var BrandBodySchema =
|
|
11610
|
-
contract:
|
|
11892
|
+
var BrandBodySchema = z14.object({
|
|
11893
|
+
contract: z14.literal("BrandBody"),
|
|
11611
11894
|
brandId: ContractIdentifierSchema,
|
|
11612
11895
|
...CommerceBodyFieldsSchema
|
|
11613
11896
|
}).strict();
|
|
11614
|
-
var ProductBodySchema =
|
|
11615
|
-
contract:
|
|
11897
|
+
var ProductBodySchema = z14.object({
|
|
11898
|
+
contract: z14.literal("ProductBody"),
|
|
11616
11899
|
productId: ContractIdentifierSchema,
|
|
11617
11900
|
brandRef: EntityRefSchema.optional(),
|
|
11618
11901
|
...CommerceBodyFieldsSchema
|
|
11619
11902
|
}).strict();
|
|
11620
|
-
var TrendMetricSnapshotSchema =
|
|
11621
|
-
contract:
|
|
11903
|
+
var TrendMetricSnapshotSchema = z14.object({
|
|
11904
|
+
contract: z14.literal("TrendMetricSnapshot"),
|
|
11622
11905
|
snapshotId: ContractIdentifierSchema,
|
|
11623
11906
|
subjectRef: EntityRefSchema,
|
|
11624
11907
|
observedAt: IsoDateTimeSchema,
|
|
11625
|
-
metrics:
|
|
11626
|
-
confidence:
|
|
11627
|
-
evidenceRefs:
|
|
11908
|
+
metrics: z14.record(z14.string(), z14.number().finite()),
|
|
11909
|
+
confidence: z14.number().min(0).max(1),
|
|
11910
|
+
evidenceRefs: z14.array(EntityRefSchema).min(1)
|
|
11628
11911
|
}).strict();
|
|
11629
|
-
var RadarScoreModelBodySchema =
|
|
11630
|
-
contract:
|
|
11912
|
+
var RadarScoreModelBodySchema = z14.object({
|
|
11913
|
+
contract: z14.literal("RadarScoreModelBody"),
|
|
11631
11914
|
modelId: ContractIdentifierSchema,
|
|
11632
|
-
version:
|
|
11915
|
+
version: z14.number().int().positive(),
|
|
11633
11916
|
weights: RadarDecisionMetricsSchema,
|
|
11634
|
-
thresholds:
|
|
11635
|
-
explanationRules:
|
|
11917
|
+
thresholds: z14.record(z14.string(), z14.number().finite()).default({}),
|
|
11918
|
+
explanationRules: z14.record(z14.string(), z14.string().trim().min(1)).default({}),
|
|
11636
11919
|
createdAt: IsoDateTimeSchema
|
|
11637
11920
|
}).strict();
|
|
11638
|
-
var RadarScoreProjectionSchema =
|
|
11639
|
-
contract:
|
|
11921
|
+
var RadarScoreProjectionSchema = z14.object({
|
|
11922
|
+
contract: z14.literal("RadarScoreProjection"),
|
|
11640
11923
|
projectionId: ContractIdentifierSchema,
|
|
11641
11924
|
subjectRef: EntityRefSchema,
|
|
11642
11925
|
modelRef: EntityRefSchema,
|
|
11643
|
-
totalScore:
|
|
11926
|
+
totalScore: z14.number().finite(),
|
|
11644
11927
|
dimensions: RadarDecisionMetricsSchema,
|
|
11645
|
-
evidenceRefs:
|
|
11928
|
+
evidenceRefs: z14.array(EntityRefSchema).min(1),
|
|
11646
11929
|
freshnessAt: IsoDateTimeSchema
|
|
11647
11930
|
}).strict();
|
|
11648
|
-
var RadarPanoramaNodeSchema =
|
|
11931
|
+
var RadarPanoramaNodeSchema = z14.object({
|
|
11649
11932
|
ref: EntityRefSchema,
|
|
11650
|
-
label:
|
|
11651
|
-
categories:
|
|
11652
|
-
score:
|
|
11933
|
+
label: z14.string().trim().min(1),
|
|
11934
|
+
categories: z14.array(ContractIdentifierSchema).default([]),
|
|
11935
|
+
score: z14.number().finite().optional(),
|
|
11653
11936
|
freshnessAt: IsoDateTimeSchema.optional()
|
|
11654
11937
|
}).strict();
|
|
11655
|
-
var RadarPanoramaEdgeSchema =
|
|
11938
|
+
var RadarPanoramaEdgeSchema = z14.object({
|
|
11656
11939
|
sourceRef: EntityRefSchema,
|
|
11657
11940
|
targetRef: EntityRefSchema,
|
|
11658
11941
|
relation: ContractIdentifierSchema,
|
|
11659
|
-
evidenceRefs:
|
|
11942
|
+
evidenceRefs: z14.array(EntityRefSchema).default([])
|
|
11660
11943
|
}).strict();
|
|
11661
|
-
var RadarPanoramaSchema =
|
|
11662
|
-
contract:
|
|
11663
|
-
nodes:
|
|
11664
|
-
edges:
|
|
11944
|
+
var RadarPanoramaSchema = z14.object({
|
|
11945
|
+
contract: z14.literal("RadarPanorama"),
|
|
11946
|
+
nodes: z14.array(RadarPanoramaNodeSchema),
|
|
11947
|
+
edges: z14.array(RadarPanoramaEdgeSchema),
|
|
11665
11948
|
generatedAt: IsoDateTimeSchema
|
|
11666
11949
|
}).strict();
|
|
11667
|
-
var BrandGeneticsProfileSchema =
|
|
11668
|
-
contract:
|
|
11950
|
+
var BrandGeneticsProfileSchema = z14.object({
|
|
11951
|
+
contract: z14.literal("BrandGeneticsProfile"),
|
|
11669
11952
|
brandRef: EntityRefSchema,
|
|
11670
|
-
categories:
|
|
11671
|
-
signature:
|
|
11672
|
-
relatedRefs:
|
|
11673
|
-
evidenceRefs:
|
|
11953
|
+
categories: z14.array(ContractIdentifierSchema).default([]),
|
|
11954
|
+
signature: z14.record(ContractIdentifierSchema, z14.number().finite()),
|
|
11955
|
+
relatedRefs: z14.array(EntityRefSchema).default([]),
|
|
11956
|
+
evidenceRefs: z14.array(EntityRefSchema).default([]),
|
|
11674
11957
|
computedAt: IsoDateTimeSchema
|
|
11675
11958
|
}).strict();
|
|
11676
|
-
var RadarOpportunityMatrixPointSchema =
|
|
11959
|
+
var RadarOpportunityMatrixPointSchema = z14.object({
|
|
11677
11960
|
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:
|
|
11961
|
+
label: z14.string().trim().min(1),
|
|
11962
|
+
x: z14.number().finite(),
|
|
11963
|
+
y: z14.number().finite(),
|
|
11964
|
+
score: z14.number().finite(),
|
|
11965
|
+
evidenceRefs: z14.array(EntityRefSchema).default([])
|
|
11966
|
+
}).strict();
|
|
11967
|
+
var RadarOpportunityMatrixSchema = z14.object({
|
|
11968
|
+
contract: z14.literal("RadarOpportunityMatrix"),
|
|
11969
|
+
xMetric: z14.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
|
|
11970
|
+
yMetric: z14.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
|
|
11971
|
+
points: z14.array(RadarOpportunityMatrixPointSchema),
|
|
11689
11972
|
computedAt: IsoDateTimeSchema
|
|
11690
11973
|
}).strict();
|
|
11691
|
-
var RadarQueryBodySchema =
|
|
11692
|
-
contract:
|
|
11974
|
+
var RadarQueryBodySchema = z14.object({
|
|
11975
|
+
contract: z14.literal("RadarQueryBody"),
|
|
11693
11976
|
queryId: ContractIdentifierSchema,
|
|
11694
|
-
filters:
|
|
11695
|
-
sort:
|
|
11977
|
+
filters: z14.record(z14.string(), JsonValueSchema).default({}),
|
|
11978
|
+
sort: z14.object({
|
|
11696
11979
|
field: ContractIdentifierSchema,
|
|
11697
|
-
direction:
|
|
11980
|
+
direction: z14.enum(["asc", "desc"])
|
|
11698
11981
|
}).strict(),
|
|
11699
|
-
pageSize:
|
|
11982
|
+
pageSize: z14.number().int().min(1).max(200),
|
|
11700
11983
|
updatedAt: IsoDateTimeSchema
|
|
11701
11984
|
}).strict();
|
|
11702
|
-
var SavedRadarQuerySchema =
|
|
11703
|
-
contract:
|
|
11985
|
+
var SavedRadarQuerySchema = z14.object({
|
|
11986
|
+
contract: z14.literal("SavedRadarQuery"),
|
|
11704
11987
|
savedQueryId: ContractIdentifierSchema,
|
|
11705
11988
|
teamId: ContractIdentifierSchema,
|
|
11706
11989
|
ownerRef: EntityRefSchema,
|
|
11707
|
-
name:
|
|
11990
|
+
name: z14.string().trim().min(1),
|
|
11708
11991
|
queryRef: EntityRefSchema,
|
|
11709
|
-
expectedVersion:
|
|
11992
|
+
expectedVersion: z14.number().int().nonnegative(),
|
|
11710
11993
|
updatedAt: IsoDateTimeSchema
|
|
11711
11994
|
}).strict();
|
|
11712
|
-
var RadarSelectionSchema =
|
|
11713
|
-
contract:
|
|
11995
|
+
var RadarSelectionSchema = z14.object({
|
|
11996
|
+
contract: z14.literal("RadarSelection"),
|
|
11714
11997
|
selectionId: ContractIdentifierSchema,
|
|
11715
11998
|
teamId: ContractIdentifierSchema,
|
|
11716
11999
|
ownerRef: EntityRefSchema,
|
|
11717
|
-
subjectRefs:
|
|
11718
|
-
status:
|
|
11719
|
-
note:
|
|
11720
|
-
expectedVersion:
|
|
12000
|
+
subjectRefs: z14.array(EntityRefSchema),
|
|
12001
|
+
status: z14.enum(["stashed", "selected", "rejected", "archived"]),
|
|
12002
|
+
note: z14.string().optional(),
|
|
12003
|
+
expectedVersion: z14.number().int().nonnegative(),
|
|
11721
12004
|
updatedAt: IsoDateTimeSchema
|
|
11722
12005
|
}).strict();
|
|
11723
|
-
var RadarAnalysisRunSchema =
|
|
11724
|
-
contract:
|
|
12006
|
+
var RadarAnalysisRunSchema = z14.object({
|
|
12007
|
+
contract: z14.literal("RadarAnalysisRun"),
|
|
11725
12008
|
runId: ContractIdentifierSchema,
|
|
11726
12009
|
teamId: ContractIdentifierSchema,
|
|
11727
12010
|
selectionRef: EntityRefSchema,
|
|
@@ -11730,66 +12013,66 @@ var RadarAnalysisRunSchema = z13.object({
|
|
|
11730
12013
|
designProjectRef: EntityRefSchema.optional(),
|
|
11731
12014
|
replayedFromRef: EntityRefSchema.optional(),
|
|
11732
12015
|
workflowDefinitionTeamId: ContractIdentifierSchema.optional(),
|
|
11733
|
-
workflowInput:
|
|
11734
|
-
createDesignProject:
|
|
11735
|
-
designProjectName:
|
|
12016
|
+
workflowInput: z14.record(z14.string(), JsonValueSchema).default({}),
|
|
12017
|
+
createDesignProject: z14.boolean().default(true),
|
|
12018
|
+
designProjectName: z14.string().trim().min(1).max(200).optional(),
|
|
11736
12019
|
modelRef: EntityRefSchema,
|
|
11737
12020
|
requestId: ContractIdentifierSchema,
|
|
11738
12021
|
idempotencyKey: ContractIdentifierSchema,
|
|
11739
|
-
status:
|
|
11740
|
-
outputRefs:
|
|
11741
|
-
error:
|
|
12022
|
+
status: z14.enum(["QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
|
|
12023
|
+
outputRefs: z14.array(EntityRefSchema).default([]),
|
|
12024
|
+
error: z14.object({
|
|
11742
12025
|
code: ContractIdentifierSchema,
|
|
11743
|
-
message:
|
|
11744
|
-
retryable:
|
|
12026
|
+
message: z14.string().trim().min(1),
|
|
12027
|
+
retryable: z14.boolean()
|
|
11745
12028
|
}).strict().optional(),
|
|
11746
12029
|
startedAt: IsoDateTimeSchema.optional(),
|
|
11747
12030
|
completedAt: IsoDateTimeSchema.optional(),
|
|
11748
12031
|
createdAt: IsoDateTimeSchema
|
|
11749
12032
|
}).strict();
|
|
11750
|
-
var RadarAnalysisAssetSchema =
|
|
12033
|
+
var RadarAnalysisAssetSchema = z14.object({
|
|
11751
12034
|
artifactRef: EntityRefSchema,
|
|
11752
12035
|
kind: ContractIdentifierSchema,
|
|
11753
|
-
mimeType:
|
|
11754
|
-
url:
|
|
11755
|
-
metadata:
|
|
12036
|
+
mimeType: z14.string().trim().min(1).optional(),
|
|
12037
|
+
url: z14.string().url(),
|
|
12038
|
+
metadata: z14.record(z14.string(), JsonValueSchema).default({}),
|
|
11756
12039
|
createdAt: IsoDateTimeSchema
|
|
11757
12040
|
}).strict();
|
|
11758
|
-
var RadarAnalysisDetailSchema =
|
|
11759
|
-
contract:
|
|
12041
|
+
var RadarAnalysisDetailSchema = z14.object({
|
|
12042
|
+
contract: z14.literal("RadarAnalysisDetail"),
|
|
11760
12043
|
run: RadarAnalysisRunSchema,
|
|
11761
|
-
runVersion:
|
|
12044
|
+
runVersion: z14.number().int().positive(),
|
|
11762
12045
|
selection: RadarSelectionSchema,
|
|
11763
|
-
outputs:
|
|
11764
|
-
assets:
|
|
11765
|
-
lineage:
|
|
12046
|
+
outputs: z14.array(OutputRecordSchema),
|
|
12047
|
+
assets: z14.array(RadarAnalysisAssetSchema),
|
|
12048
|
+
lineage: z14.array(LineageRecordSchema)
|
|
11766
12049
|
}).strict();
|
|
11767
|
-
var RadarActionRecordSchema =
|
|
11768
|
-
contract:
|
|
12050
|
+
var RadarActionRecordSchema = z14.object({
|
|
12051
|
+
contract: z14.literal("RadarActionRecord"),
|
|
11769
12052
|
actionId: ContractIdentifierSchema,
|
|
11770
12053
|
teamId: ContractIdentifierSchema,
|
|
11771
12054
|
actorRef: EntityRefSchema,
|
|
11772
|
-
action:
|
|
12055
|
+
action: z14.enum(["stash", "select", "reject", "archive", "launch", "retry", "replay", "rollback"]),
|
|
11773
12056
|
targetRef: EntityRefSchema,
|
|
11774
12057
|
requestId: ContractIdentifierSchema,
|
|
11775
12058
|
idempotencyKey: ContractIdentifierSchema,
|
|
11776
|
-
expectedVersion:
|
|
12059
|
+
expectedVersion: z14.number().int().nonnegative(),
|
|
11777
12060
|
occurredAt: IsoDateTimeSchema
|
|
11778
12061
|
}).strict();
|
|
11779
|
-
var RadarWritebackRecordSchema =
|
|
11780
|
-
contract:
|
|
12062
|
+
var RadarWritebackRecordSchema = z14.object({
|
|
12063
|
+
contract: z14.literal("RadarWritebackRecord"),
|
|
11781
12064
|
writebackId: ContractIdentifierSchema,
|
|
11782
12065
|
actionRef: EntityRefSchema,
|
|
11783
12066
|
targetRef: EntityRefSchema,
|
|
11784
|
-
status:
|
|
11785
|
-
resultingVersion:
|
|
11786
|
-
error:
|
|
12067
|
+
status: z14.enum(["PENDING", "APPLIED", "FAILED"]),
|
|
12068
|
+
resultingVersion: z14.number().int().nonnegative().optional(),
|
|
12069
|
+
error: z14.string().trim().min(1).optional(),
|
|
11787
12070
|
recordedAt: IsoDateTimeSchema
|
|
11788
12071
|
}).strict();
|
|
11789
12072
|
|
|
11790
12073
|
// src/contracts/workflow-definition.ts
|
|
11791
|
-
import { z as
|
|
11792
|
-
var ConductorTaskTypeSchema =
|
|
12074
|
+
import { z as z15 } from "zod";
|
|
12075
|
+
var ConductorTaskTypeSchema = z15.enum([
|
|
11793
12076
|
"SIMPLE",
|
|
11794
12077
|
"DYNAMIC",
|
|
11795
12078
|
"FORK_JOIN",
|
|
@@ -11838,46 +12121,46 @@ var requiredTaskFields = {
|
|
|
11838
12121
|
WAIT: ["inputParameters"],
|
|
11839
12122
|
TERMINATE: ["inputParameters"]
|
|
11840
12123
|
};
|
|
11841
|
-
var ConductorTaskDefinitionSchema =
|
|
11842
|
-
() =>
|
|
12124
|
+
var ConductorTaskDefinitionSchema = z15.lazy(
|
|
12125
|
+
() => z15.object({
|
|
11843
12126
|
name: ContractIdentifierSchema,
|
|
11844
12127
|
taskReferenceName: ContractIdentifierSchema,
|
|
11845
12128
|
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:
|
|
12129
|
+
inputParameters: z15.record(z15.string(), JsonValueSchema).optional(),
|
|
12130
|
+
startDelay: z15.number().int().nonnegative().optional(),
|
|
12131
|
+
optional: z15.boolean().optional(),
|
|
12132
|
+
asyncComplete: z15.boolean().optional(),
|
|
12133
|
+
rateLimited: z15.boolean().optional(),
|
|
12134
|
+
retryCount: z15.number().int().nonnegative().optional(),
|
|
12135
|
+
taskDefinition: z15.record(z15.string(), JsonValueSchema).optional(),
|
|
12136
|
+
loopCondition: z15.string().optional(),
|
|
12137
|
+
loopOver: z15.array(ConductorTaskDefinitionSchema).optional(),
|
|
12138
|
+
sink: z15.string().optional(),
|
|
12139
|
+
forkTasks: z15.array(z15.array(ConductorTaskDefinitionSchema)).optional(),
|
|
12140
|
+
joinOn: z15.array(ContractIdentifierSchema).optional(),
|
|
12141
|
+
defaultExclusiveJoinTask: z15.array(ContractIdentifierSchema).optional(),
|
|
12142
|
+
dynamicForkTasksParam: z15.string().optional(),
|
|
12143
|
+
dynamicForkTasksInputParamName: z15.string().optional(),
|
|
12144
|
+
subWorkflowParam: z15.object({
|
|
12145
|
+
$ref: z15.string().optional(),
|
|
11863
12146
|
name: ContractIdentifierSchema,
|
|
11864
|
-
version:
|
|
11865
|
-
taskToDomain:
|
|
11866
|
-
workflowDefinition:
|
|
12147
|
+
version: z15.number().int().positive().optional(),
|
|
12148
|
+
taskToDomain: z15.record(z15.string(), z15.string()).optional(),
|
|
12149
|
+
workflowDefinition: z15.record(z15.string(), JsonValueSchema).optional()
|
|
11867
12150
|
}).strict().optional(),
|
|
11868
|
-
decisionCases:
|
|
11869
|
-
defaultCase:
|
|
11870
|
-
evaluatorType:
|
|
11871
|
-
expression:
|
|
12151
|
+
decisionCases: z15.record(z15.string(), z15.array(ConductorTaskDefinitionSchema)).optional(),
|
|
12152
|
+
defaultCase: z15.array(ConductorTaskDefinitionSchema).optional(),
|
|
12153
|
+
evaluatorType: z15.enum(["value-param", "javascript", "graaljs"]).optional(),
|
|
12154
|
+
expression: z15.string().optional(),
|
|
11872
12155
|
__alias: JsonValueSchema.optional(),
|
|
11873
|
-
callbackFromWorker:
|
|
12156
|
+
callbackFromWorker: z15.boolean().optional(),
|
|
11874
12157
|
caseExpression: JsonValueSchema.optional(),
|
|
11875
|
-
caseValueParam:
|
|
11876
|
-
dependencies:
|
|
11877
|
-
description:
|
|
11878
|
-
dynamicTaskNameParam:
|
|
11879
|
-
joinMode:
|
|
11880
|
-
permissive:
|
|
12158
|
+
caseValueParam: z15.string().optional(),
|
|
12159
|
+
dependencies: z15.array(JsonValueSchema).optional(),
|
|
12160
|
+
description: z15.string().optional(),
|
|
12161
|
+
dynamicTaskNameParam: z15.string().optional(),
|
|
12162
|
+
joinMode: z15.string().optional(),
|
|
12163
|
+
permissive: z15.boolean().optional(),
|
|
11881
12164
|
joinTaskRef: ContractIdentifierSchema.optional(),
|
|
11882
12165
|
forkTaskRef: ContractIdentifierSchema.optional()
|
|
11883
12166
|
}).strict().superRefine((task, context) => {
|
|
@@ -11891,29 +12174,29 @@ var ConductorTaskDefinitionSchema = z14.lazy(
|
|
|
11891
12174
|
}
|
|
11892
12175
|
})
|
|
11893
12176
|
);
|
|
11894
|
-
var ConductorWorkflowDefinitionSchema =
|
|
11895
|
-
ownerApp:
|
|
11896
|
-
createTime:
|
|
11897
|
-
updateTime:
|
|
11898
|
-
createdBy:
|
|
11899
|
-
updatedBy:
|
|
12177
|
+
var ConductorWorkflowDefinitionSchema = z15.object({
|
|
12178
|
+
ownerApp: z15.string().optional(),
|
|
12179
|
+
createTime: z15.number().int().nonnegative().optional(),
|
|
12180
|
+
updateTime: z15.number().int().nonnegative().optional(),
|
|
12181
|
+
createdBy: z15.string().optional(),
|
|
12182
|
+
updatedBy: z15.string().optional(),
|
|
11900
12183
|
name: ContractIdentifierSchema,
|
|
11901
|
-
description:
|
|
11902
|
-
version:
|
|
11903
|
-
tasks:
|
|
11904
|
-
inputParameters:
|
|
11905
|
-
outputParameters:
|
|
12184
|
+
description: z15.string().optional(),
|
|
12185
|
+
version: z15.number().int().positive(),
|
|
12186
|
+
tasks: z15.array(ConductorTaskDefinitionSchema),
|
|
12187
|
+
inputParameters: z15.array(ContractIdentifierSchema),
|
|
12188
|
+
outputParameters: z15.record(z15.string(), JsonValueSchema).optional(),
|
|
11906
12189
|
failureWorkflow: ContractIdentifierSchema.optional(),
|
|
11907
|
-
schemaVersion:
|
|
11908
|
-
restartable:
|
|
11909
|
-
workflowStatusListenerEnabled:
|
|
11910
|
-
ownerEmail:
|
|
11911
|
-
timeoutPolicy:
|
|
11912
|
-
timeoutSeconds:
|
|
11913
|
-
variables:
|
|
11914
|
-
inputTemplate:
|
|
11915
|
-
}).strict();
|
|
11916
|
-
var WorkflowParameterTypeSchema =
|
|
12190
|
+
schemaVersion: z15.number().int().positive().optional(),
|
|
12191
|
+
restartable: z15.boolean().optional(),
|
|
12192
|
+
workflowStatusListenerEnabled: z15.boolean().optional(),
|
|
12193
|
+
ownerEmail: z15.string().email().optional(),
|
|
12194
|
+
timeoutPolicy: z15.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
|
|
12195
|
+
timeoutSeconds: z15.number().int().nonnegative(),
|
|
12196
|
+
variables: z15.record(z15.string(), JsonValueSchema).optional(),
|
|
12197
|
+
inputTemplate: z15.record(z15.string(), JsonValueSchema).optional()
|
|
12198
|
+
}).strict();
|
|
12199
|
+
var WorkflowParameterTypeSchema = z15.enum([
|
|
11917
12200
|
"string",
|
|
11918
12201
|
"file",
|
|
11919
12202
|
"number",
|
|
@@ -11923,213 +12206,213 @@ var WorkflowParameterTypeSchema = z14.enum([
|
|
|
11923
12206
|
"notice",
|
|
11924
12207
|
"canvas-assist"
|
|
11925
12208
|
]);
|
|
11926
|
-
var WorkflowConditionalStateSchema =
|
|
11927
|
-
conditions:
|
|
11928
|
-
|
|
11929
|
-
field:
|
|
11930
|
-
operator:
|
|
12209
|
+
var WorkflowConditionalStateSchema = z15.object({
|
|
12210
|
+
conditions: z15.array(
|
|
12211
|
+
z15.object({
|
|
12212
|
+
field: z15.string(),
|
|
12213
|
+
operator: z15.enum(["is", "isNot", "isGreaterThan", "isLessThan", "isGreaterThanOrEqual", "isLessThanOrEqual", "in", "notIn"]),
|
|
11931
12214
|
value: JsonValueSchema
|
|
11932
12215
|
}).strict()
|
|
11933
12216
|
),
|
|
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:
|
|
12217
|
+
logic: z15.enum(["AND", "OR"]).optional()
|
|
12218
|
+
}).strict();
|
|
12219
|
+
var ImageSelectMappingAppearanceSchema = z15.object({
|
|
12220
|
+
columns: z15.number().int().min(1).max(4).optional(),
|
|
12221
|
+
cardSize: z15.enum(["sm", "md", "lg"]).optional(),
|
|
12222
|
+
imageAspectRatio: z15.enum(["square", "4:5", "3:4", "16:9"]).optional(),
|
|
12223
|
+
gap: z15.enum(["sm", "md", "lg"]).optional(),
|
|
12224
|
+
radius: z15.enum(["sm", "md", "lg", "xl"]).optional(),
|
|
12225
|
+
borderStyle: z15.enum(["none", "soft", "strong"]).optional(),
|
|
12226
|
+
borderWidth: z15.union([z15.literal(0), z15.literal(1), z15.literal(2)]).optional(),
|
|
12227
|
+
enableScroll: z15.boolean().optional(),
|
|
12228
|
+
maxHeight: z15.number().int().min(160).max(1200).optional(),
|
|
12229
|
+
enableCollapse: z15.boolean().optional(),
|
|
12230
|
+
visibleRows: z15.number().int().min(1).max(6).optional(),
|
|
12231
|
+
hideLabel: z15.boolean().optional(),
|
|
12232
|
+
hideDescription: z15.boolean().optional(),
|
|
12233
|
+
hideValue: z15.boolean().optional()
|
|
12234
|
+
}).strict();
|
|
12235
|
+
var ComfyWorkflowPortBindingSchema = z15.object({
|
|
12236
|
+
node: z15.union([z15.string(), z15.number()]),
|
|
12237
|
+
key: z15.string().optional()
|
|
12238
|
+
}).strict();
|
|
12239
|
+
var WorkflowParameterTypeOptionsSchema = z15.object({
|
|
12240
|
+
editor: z15.enum(["code", "codeNodeEditor", "htmlEditor", "sqlEditor", "json"]).optional(),
|
|
12241
|
+
editorLanguage: z15.enum(["javaScript", "json", "python", "sql"]).optional(),
|
|
12242
|
+
maxValue: z15.number().optional(),
|
|
12243
|
+
minValue: z15.number().optional(),
|
|
12244
|
+
max: z15.number().optional(),
|
|
12245
|
+
min: z15.number().optional(),
|
|
12246
|
+
multipleValues: z15.boolean().optional(),
|
|
12247
|
+
numberPrecision: z15.number().nonnegative().optional(),
|
|
12248
|
+
password: z15.boolean().optional(),
|
|
12249
|
+
rows: z15.number().int().positive().optional(),
|
|
12250
|
+
assetType: z15.string().optional(),
|
|
12251
|
+
accept: z15.string().optional(),
|
|
12252
|
+
maxSize: z15.number().positive().optional(),
|
|
12253
|
+
fileType: z15.string().optional(),
|
|
12254
|
+
aiMultiShotMainImageField: z15.string().optional(),
|
|
12255
|
+
aiMultiShotWorkflowAppId: z15.string().optional(),
|
|
12256
|
+
aiMultiShotWorkflowId: z15.string().optional(),
|
|
12257
|
+
allowCustomInput: z15.boolean().optional(),
|
|
12258
|
+
allowUploadVideo: z15.boolean().optional(),
|
|
12259
|
+
aspectRatioField: z15.string().optional(),
|
|
12260
|
+
assemblyValueType: z15.string().optional(),
|
|
12261
|
+
autoAnalyzeDesignImage: z15.boolean().optional(),
|
|
12262
|
+
autoDetectAspectRatio: z15.boolean().optional(),
|
|
12263
|
+
autoIncrementId: z15.boolean().optional(),
|
|
11981
12264
|
comfyOptions: ComfyWorkflowPortBindingSchema.optional(),
|
|
11982
|
-
comfyuiModelServerId:
|
|
11983
|
-
comfyuiModelTypeName:
|
|
12265
|
+
comfyuiModelServerId: z15.string().optional(),
|
|
12266
|
+
comfyuiModelTypeName: z15.string().optional(),
|
|
11984
12267
|
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:
|
|
12268
|
+
descriptionAlert: z15.boolean().optional(),
|
|
12269
|
+
disabled: z15.union([z15.boolean(), WorkflowConditionalStateSchema]).optional(),
|
|
12270
|
+
editable: z15.union([z15.boolean(), WorkflowConditionalStateSchema]).optional(),
|
|
12271
|
+
enableAiMultiShot: z15.boolean().optional(),
|
|
12272
|
+
enableBooleanSwitchMode: z15.boolean().optional(),
|
|
12273
|
+
enableClear: z15.boolean().optional(),
|
|
12274
|
+
enableExpand: z15.boolean().optional(),
|
|
12275
|
+
enableImageMask: z15.boolean().optional(),
|
|
12276
|
+
enableImageOverlay: z15.boolean().optional(),
|
|
12277
|
+
enablePopupEditor: z15.boolean().optional(),
|
|
12278
|
+
enablePromptFontSize: z15.boolean().optional(),
|
|
12279
|
+
enableReset: z15.boolean().optional(),
|
|
12280
|
+
enableSelectItemIcon: z15.boolean().optional(),
|
|
12281
|
+
enableSelectList: z15.boolean().optional(),
|
|
12282
|
+
enableSelectSearch: z15.boolean().optional(),
|
|
12283
|
+
enableSliderEnterMode: z15.boolean().optional(),
|
|
12284
|
+
enableVoice: z15.boolean().optional(),
|
|
12285
|
+
expandButtonText: z15.string().optional(),
|
|
12286
|
+
foldUp: z15.boolean().optional(),
|
|
12287
|
+
hidden: z15.boolean().optional(),
|
|
12288
|
+
hideRequiredDot: z15.boolean().optional(),
|
|
12289
|
+
inlineTitleWithSelect: z15.boolean().optional(),
|
|
12290
|
+
knowledgeGraphButtonText: z15.string().optional(),
|
|
12291
|
+
identifyAttributeCount: z15.union([z15.number().nonnegative(), z15.string().min(1), z15.object({ min: z15.number().nonnegative().optional(), max: z15.number().nonnegative().optional() }).strict()]).optional(),
|
|
12292
|
+
identifyAttributes: z15.array(JsonValueSchema).optional(),
|
|
12293
|
+
identifyMaxVariants: z15.number().int().nonnegative().optional(),
|
|
12294
|
+
identifySourceField: z15.string().optional(),
|
|
12295
|
+
imageOverlayBaseField: z15.string().optional(),
|
|
12296
|
+
imageOverlayOverlayField: z15.string().optional(),
|
|
12014
12297
|
imageSelectMappingAppearance: ImageSelectMappingAppearanceSchema.optional(),
|
|
12015
|
-
imageSelectMappingColumns:
|
|
12016
|
-
imageSelectMappingEnableCustomUpload:
|
|
12017
|
-
imageSelectMappingHideLabel:
|
|
12018
|
-
imageSelectMappingHideLink:
|
|
12019
|
-
imageSelectMappingHideMeta:
|
|
12020
|
-
imageSelectMappingInlineUseLargeUploadBox:
|
|
12021
|
-
imageSelectMappingPromptField:
|
|
12022
|
-
imageSelectMappingTabOrder:
|
|
12023
|
-
imageSelectMappingTabWidthMode:
|
|
12298
|
+
imageSelectMappingColumns: z15.number().int().min(1).max(4).optional(),
|
|
12299
|
+
imageSelectMappingEnableCustomUpload: z15.boolean().optional(),
|
|
12300
|
+
imageSelectMappingHideLabel: z15.boolean().optional(),
|
|
12301
|
+
imageSelectMappingHideLink: z15.boolean().optional(),
|
|
12302
|
+
imageSelectMappingHideMeta: z15.boolean().optional(),
|
|
12303
|
+
imageSelectMappingInlineUseLargeUploadBox: z15.boolean().optional(),
|
|
12304
|
+
imageSelectMappingPromptField: z15.string().optional(),
|
|
12305
|
+
imageSelectMappingTabOrder: z15.enum(["template-first", "upload-first"]).optional(),
|
|
12306
|
+
imageSelectMappingTabWidthMode: z15.enum(["content", "fill"]).optional(),
|
|
12024
12307
|
imageSelectMappingTemplatePrompt: LocalizedTextSchema.optional(),
|
|
12025
12308
|
imageSelectMappingTemplateTabTitle: LocalizedTextSchema.optional(),
|
|
12026
|
-
imageSelectMappingUploadMode:
|
|
12309
|
+
imageSelectMappingUploadMode: z15.enum(["tabs", "inline"]).optional(),
|
|
12027
12310
|
imageSelectMappingUploadPrompt: LocalizedTextSchema.optional(),
|
|
12028
12311
|
imageSelectMappingUploadTabTitle: LocalizedTextSchema.optional(),
|
|
12029
|
-
endpoints:
|
|
12030
|
-
examples:
|
|
12312
|
+
endpoints: z15.array(JsonValueSchema).optional(),
|
|
12313
|
+
examples: z15.array(JsonValueSchema).optional(),
|
|
12031
12314
|
extraData: JsonValueSchema.optional(),
|
|
12032
12315
|
layer: JsonValueSchema.optional(),
|
|
12033
12316
|
map: JsonValueSchema.optional(),
|
|
12034
|
-
multiline:
|
|
12035
|
-
options:
|
|
12036
|
-
originalFiles:
|
|
12317
|
+
multiline: z15.boolean().optional(),
|
|
12318
|
+
options: z15.array(JsonValueSchema).optional(),
|
|
12319
|
+
originalFiles: z15.array(JsonValueSchema).optional(),
|
|
12037
12320
|
placeholder: LocalizedTextSchema.optional(),
|
|
12038
|
-
preserveSelectListOrder:
|
|
12321
|
+
preserveSelectListOrder: z15.boolean().optional(),
|
|
12039
12322
|
promptDictionary: JsonValueSchema.optional(),
|
|
12040
|
-
promptFontSize:
|
|
12323
|
+
promptFontSize: z15.number().optional(),
|
|
12041
12324
|
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:
|
|
12325
|
+
requireActiveSelectFilter: z15.boolean().optional(),
|
|
12326
|
+
restoreDefaultOnEmptyEnter: z15.boolean().optional(),
|
|
12327
|
+
search: z15.boolean().optional(),
|
|
12328
|
+
selectButtonEnableCollapse: z15.boolean().optional(),
|
|
12329
|
+
selectButtonVisibleRows: z15.number().int().positive().optional(),
|
|
12330
|
+
selectList: z15.array(JsonValueSchema).optional(),
|
|
12331
|
+
selectListDisplayMode: z15.string().optional(),
|
|
12332
|
+
selectPromptField: z15.string().optional(),
|
|
12333
|
+
showAddLocalFileButton: z15.boolean().optional(),
|
|
12334
|
+
singleColumn: z15.boolean().optional(),
|
|
12335
|
+
singleFrameForMultiple: z15.boolean().optional(),
|
|
12336
|
+
textSingleLine: z15.boolean().optional(),
|
|
12337
|
+
textareaMiniHeight: z15.number().nonnegative().optional(),
|
|
12055
12338
|
tips: LocalizedTextSchema.optional(),
|
|
12056
12339
|
visibility: JsonValueSchema.optional(),
|
|
12057
|
-
voiceButtonText:
|
|
12058
|
-
designAnalysisFields:
|
|
12059
|
-
designAnalysisFillStrategy:
|
|
12060
|
-
designAnalysisMaxFields:
|
|
12061
|
-
designAnalysisType:
|
|
12062
|
-
designAnalysisFieldPrefix:
|
|
12063
|
-
}).strict();
|
|
12064
|
-
var WorkflowParameterSchema =
|
|
12065
|
-
() =>
|
|
12340
|
+
voiceButtonText: z15.string().optional(),
|
|
12341
|
+
designAnalysisFields: z15.array(JsonValueSchema).optional(),
|
|
12342
|
+
designAnalysisFillStrategy: z15.string().optional(),
|
|
12343
|
+
designAnalysisMaxFields: z15.number().int().nonnegative().optional(),
|
|
12344
|
+
designAnalysisType: z15.string().optional(),
|
|
12345
|
+
designAnalysisFieldPrefix: z15.string().optional()
|
|
12346
|
+
}).strict();
|
|
12347
|
+
var WorkflowParameterSchema = z15.lazy(
|
|
12348
|
+
() => z15.object({
|
|
12066
12349
|
displayName: LocalizedTextSchema,
|
|
12067
12350
|
name: ContractIdentifierSchema,
|
|
12068
12351
|
type: WorkflowParameterTypeSchema,
|
|
12069
12352
|
typeOptions: WorkflowParameterTypeOptionsSchema.optional(),
|
|
12070
12353
|
default: JsonValueSchema.optional(),
|
|
12071
12354
|
description: LocalizedTextSchema.optional(),
|
|
12072
|
-
hint:
|
|
12073
|
-
displayOptions:
|
|
12074
|
-
hide:
|
|
12075
|
-
show:
|
|
12355
|
+
hint: z15.string().optional(),
|
|
12356
|
+
displayOptions: z15.object({
|
|
12357
|
+
hide: z15.record(z15.string(), z15.array(JsonValueSchema)).optional(),
|
|
12358
|
+
show: z15.record(z15.string(), z15.array(JsonValueSchema)).optional()
|
|
12076
12359
|
}).strict().optional(),
|
|
12077
|
-
options:
|
|
12078
|
-
|
|
12360
|
+
options: z15.array(z15.union([
|
|
12361
|
+
z15.object({ name: LocalizedTextSchema, value: z15.union([z15.string(), z15.number(), z15.boolean()]), action: z15.string().optional(), description: LocalizedTextSchema.optional() }).strict(),
|
|
12079
12362
|
WorkflowParameterSchema,
|
|
12080
|
-
|
|
12363
|
+
z15.object({ displayName: z15.string(), name: ContractIdentifierSchema, values: z15.array(WorkflowParameterSchema) }).strict()
|
|
12081
12364
|
])).optional(),
|
|
12082
12365
|
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:
|
|
12366
|
+
isNodeSetting: z15.boolean().optional(),
|
|
12367
|
+
noDataExpression: z15.boolean().optional(),
|
|
12368
|
+
required: z15.boolean().optional(),
|
|
12369
|
+
example: z15.string().optional(),
|
|
12370
|
+
extractValue: z15.object({ type: z15.literal("regex"), regex: z15.string() }).strict().optional(),
|
|
12371
|
+
properties: z15.array(WorkflowParameterSchema).optional(),
|
|
12372
|
+
assetType: z15.string().optional(),
|
|
12373
|
+
flag: z15.boolean().optional(),
|
|
12374
|
+
enableExpand: z15.boolean().optional(),
|
|
12375
|
+
enableVoice: z15.boolean().optional(),
|
|
12376
|
+
expandButtonText: z15.string().optional(),
|
|
12377
|
+
knowledgeGraphButtonText: z15.string().optional(),
|
|
12378
|
+
selectListDisplayMode: z15.string().optional(),
|
|
12379
|
+
voiceButtonText: z15.string().optional()
|
|
12097
12380
|
}).strict()
|
|
12098
12381
|
);
|
|
12099
|
-
var WorkflowOutputBindingSchema =
|
|
12100
|
-
var WorkflowNodeSchema =
|
|
12382
|
+
var WorkflowOutputBindingSchema = z15.object({ key: ContractIdentifierSchema, value: z15.string() }).strict();
|
|
12383
|
+
var WorkflowNodeSchema = z15.object({
|
|
12101
12384
|
id: ContractIdentifierSchema,
|
|
12102
12385
|
referenceName: ContractIdentifierSchema,
|
|
12103
12386
|
capabilityRef: ContractIdentifierSchema,
|
|
12104
12387
|
capabilityVersion: ContractIdentifierSchema.optional(),
|
|
12105
|
-
inputBindings:
|
|
12106
|
-
configuration:
|
|
12388
|
+
inputBindings: z15.record(z15.string(), JsonValueSchema).default({}),
|
|
12389
|
+
configuration: z15.object({ executor: z15.literal("conductor"), task: ConductorTaskDefinitionSchema }).strict()
|
|
12107
12390
|
}).strict().superRefine((node, context) => {
|
|
12108
12391
|
if (node.configuration.task.taskReferenceName !== node.referenceName) context.addIssue({ code: "custom", path: ["configuration", "task", "taskReferenceName"], message: "Conductor task reference must match node referenceName." });
|
|
12109
12392
|
if (node.configuration.task.name !== node.capabilityRef) context.addIssue({ code: "custom", path: ["configuration", "task", "name"], message: "Conductor task name must match node capabilityRef." });
|
|
12110
12393
|
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
12394
|
});
|
|
12112
|
-
var WorkflowEdgeSchema =
|
|
12395
|
+
var WorkflowEdgeSchema = z15.object({
|
|
12113
12396
|
from: ContractIdentifierSchema,
|
|
12114
12397
|
to: ContractIdentifierSchema,
|
|
12115
12398
|
outputPort: ContractIdentifierSchema.optional(),
|
|
12116
12399
|
inputPort: ContractIdentifierSchema.optional(),
|
|
12117
|
-
condition:
|
|
12400
|
+
condition: z15.string().optional()
|
|
12118
12401
|
}).strict();
|
|
12119
|
-
var WorkflowTriggerSchema =
|
|
12402
|
+
var WorkflowTriggerSchema = z15.object({
|
|
12120
12403
|
id: ContractIdentifierSchema,
|
|
12121
|
-
type:
|
|
12122
|
-
enabled:
|
|
12123
|
-
schedule:
|
|
12124
|
-
webhook:
|
|
12125
|
-
path:
|
|
12126
|
-
method:
|
|
12127
|
-
auth:
|
|
12128
|
-
basicAuth:
|
|
12129
|
-
headerAuth:
|
|
12130
|
-
responseUntil:
|
|
12404
|
+
type: z15.enum(["manual", "schedule", "webhook", "event", "api"]),
|
|
12405
|
+
enabled: z15.boolean(),
|
|
12406
|
+
schedule: z15.object({ cron: z15.string().trim().min(1) }).strict().optional(),
|
|
12407
|
+
webhook: z15.object({
|
|
12408
|
+
path: z15.string().trim().min(1).optional(),
|
|
12409
|
+
method: z15.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]),
|
|
12410
|
+
auth: z15.enum(["NONE", "BASIC", "CUSTOM_HEADER"]),
|
|
12411
|
+
basicAuth: z15.object({ username: z15.string(), password: z15.string() }).strict().optional(),
|
|
12412
|
+
headerAuth: z15.object({ name: z15.string().trim().min(1), value: z15.string() }).strict().optional(),
|
|
12413
|
+
responseUntil: z15.enum(["WORKFLOW_STARTED", "WORKFLOW_COMPLETED_OR_FINISHED"])
|
|
12131
12414
|
}).strict().optional(),
|
|
12132
|
-
event:
|
|
12415
|
+
event: z15.object({
|
|
12133
12416
|
eventType: ContractIdentifierSchema,
|
|
12134
12417
|
configuration: JsonValueSchema.optional()
|
|
12135
12418
|
}).strict().optional()
|
|
@@ -12138,63 +12421,63 @@ var WorkflowTriggerSchema = z14.object({
|
|
|
12138
12421
|
if (trigger.type === "webhook" && !trigger.webhook) context.addIssue({ code: "custom", path: ["webhook"], message: "Webhook trigger requires webhook configuration." });
|
|
12139
12422
|
if (trigger.type === "event" && !trigger.event) context.addIssue({ code: "custom", path: ["event"], message: "Event trigger requires event configuration." });
|
|
12140
12423
|
});
|
|
12141
|
-
var WorkflowValidationIssueSchema =
|
|
12424
|
+
var WorkflowValidationIssueSchema = z15.object({
|
|
12142
12425
|
taskReferenceName: ContractIdentifierSchema,
|
|
12143
|
-
issueType:
|
|
12144
|
-
detailReason:
|
|
12145
|
-
humanMessage:
|
|
12426
|
+
issueType: z15.enum(["ERROR", "WARNING"]),
|
|
12427
|
+
detailReason: z15.object({ type: ContractIdentifierSchema, name: ContractIdentifierSchema, detailInformation: JsonValueSchema.optional() }).strict(),
|
|
12428
|
+
humanMessage: z15.object({ en: z15.string(), zh: z15.string() }).strict()
|
|
12146
12429
|
}).strict();
|
|
12147
|
-
var WorkflowDefinitionSchema =
|
|
12148
|
-
contract:
|
|
12430
|
+
var WorkflowDefinitionSchema = z15.object({
|
|
12431
|
+
contract: z15.literal("WorkflowDefinition"),
|
|
12149
12432
|
metadata: ContractMetadataSchema.omit({ name: true, description: true, labels: true }).extend({
|
|
12150
12433
|
name: LocalizedTextSchema,
|
|
12151
12434
|
description: LocalizedTextSchema.optional(),
|
|
12152
|
-
role:
|
|
12435
|
+
role: z15.enum(["workflow", "template"]),
|
|
12153
12436
|
teamId: ContractIdentifierSchema,
|
|
12154
12437
|
creatorRef: EntityRefSchema,
|
|
12155
|
-
tags:
|
|
12438
|
+
tags: z15.array(ContractIdentifierSchema).default([])
|
|
12156
12439
|
}).strict(),
|
|
12157
|
-
revision:
|
|
12158
|
-
kind:
|
|
12159
|
-
recordVersion:
|
|
12160
|
-
sourceVersion:
|
|
12440
|
+
revision: z15.object({
|
|
12441
|
+
kind: z15.enum(["release", "backup"]),
|
|
12442
|
+
recordVersion: z15.number().int().positive(),
|
|
12443
|
+
sourceVersion: z15.number().int().positive().optional()
|
|
12161
12444
|
}).strict().superRefine((revision, context) => {
|
|
12162
12445
|
if (revision.kind === "backup" && revision.sourceVersion === void 0) context.addIssue({ code: "custom", path: ["sourceVersion"], message: "Backup revisions require a sourceVersion." });
|
|
12163
12446
|
}),
|
|
12164
|
-
presentation:
|
|
12165
|
-
ports:
|
|
12166
|
-
parameters:
|
|
12167
|
-
graph:
|
|
12168
|
-
execution:
|
|
12169
|
-
timeoutMs:
|
|
12170
|
-
retries:
|
|
12171
|
-
concurrencyLimit:
|
|
12172
|
-
idempotency:
|
|
12173
|
-
rateLimit:
|
|
12447
|
+
presentation: z15.object({ iconUrl: z15.string().optional(), thumbnail: z15.string().optional() }).strict(),
|
|
12448
|
+
ports: z15.object({ inputs: z15.array(ContractPortSchema).default([]), outputs: z15.array(ContractPortSchema).default([]) }).strict(),
|
|
12449
|
+
parameters: z15.object({ variables: z15.array(WorkflowParameterSchema).default([]), outputs: z15.array(WorkflowOutputBindingSchema).default([]) }).strict(),
|
|
12450
|
+
graph: z15.object({ nodes: z15.array(WorkflowNodeSchema), edges: z15.array(WorkflowEdgeSchema).default([]) }).strict(),
|
|
12451
|
+
execution: z15.object({
|
|
12452
|
+
timeoutMs: z15.number().int().positive().optional(),
|
|
12453
|
+
retries: z15.number().int().nonnegative().default(0),
|
|
12454
|
+
concurrencyLimit: z15.number().int().positive().optional(),
|
|
12455
|
+
idempotency: z15.enum(["required", "supported", "none"]),
|
|
12456
|
+
rateLimit: z15.object({ enabled: z15.boolean(), max: z15.number().int().nonnegative(), windowMs: z15.number().int().nonnegative() }).strict().superRefine((rateLimit, context) => {
|
|
12174
12457
|
if (rateLimit.enabled && (rateLimit.max === 0 || rateLimit.windowMs === 0)) context.addIssue({ code: "custom", message: "Enabled rate limit requires positive max and windowMs." });
|
|
12175
12458
|
}).optional(),
|
|
12176
|
-
conductor:
|
|
12177
|
-
ownerApp:
|
|
12178
|
-
createTime:
|
|
12179
|
-
updateTime:
|
|
12180
|
-
createdBy:
|
|
12181
|
-
updatedBy:
|
|
12459
|
+
conductor: z15.object({
|
|
12460
|
+
ownerApp: z15.string().optional(),
|
|
12461
|
+
createTime: z15.number().int().nonnegative().optional(),
|
|
12462
|
+
updateTime: z15.number().int().nonnegative().optional(),
|
|
12463
|
+
createdBy: z15.string().optional(),
|
|
12464
|
+
updatedBy: z15.string().optional(),
|
|
12182
12465
|
failureWorkflow: ContractIdentifierSchema.optional(),
|
|
12183
|
-
schemaVersion:
|
|
12184
|
-
restartable:
|
|
12185
|
-
workflowStatusListenerEnabled:
|
|
12186
|
-
ownerEmail:
|
|
12187
|
-
timeoutPolicy:
|
|
12188
|
-
variables:
|
|
12189
|
-
inputTemplate:
|
|
12466
|
+
schemaVersion: z15.number().int().positive().optional(),
|
|
12467
|
+
restartable: z15.boolean().optional(),
|
|
12468
|
+
workflowStatusListenerEnabled: z15.boolean().optional(),
|
|
12469
|
+
ownerEmail: z15.string().email().optional(),
|
|
12470
|
+
timeoutPolicy: z15.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
|
|
12471
|
+
variables: z15.record(z15.string(), JsonValueSchema).optional(),
|
|
12472
|
+
inputTemplate: z15.record(z15.string(), JsonValueSchema).optional()
|
|
12190
12473
|
}).strict()
|
|
12191
12474
|
}).strict(),
|
|
12192
|
-
triggers:
|
|
12193
|
-
views:
|
|
12194
|
-
dataContracts:
|
|
12195
|
-
governance:
|
|
12196
|
-
interfaces:
|
|
12197
|
-
openai:
|
|
12475
|
+
triggers: z15.array(WorkflowTriggerSchema).default([]),
|
|
12476
|
+
views: z15.array(z15.object({ pageRef: ContractIdentifierSchema, placement: ContractIdentifierSchema.optional() }).strict()).default([]),
|
|
12477
|
+
dataContracts: z15.object({ reads: z15.array(ContractIdentifierSchema).default([]), writes: z15.array(ContractIdentifierSchema).default([]), emits: z15.array(ContractIdentifierSchema).default([]) }).strict(),
|
|
12478
|
+
governance: z15.object({ activated: z15.boolean(), validated: z15.boolean(), validationIssues: z15.array(WorkflowValidationIssueSchema).default([]), hidden: z15.boolean().optional() }).strict(),
|
|
12479
|
+
interfaces: z15.object({
|
|
12480
|
+
openai: z15.object({ enabled: z15.boolean(), modelName: z15.string().trim().min(1).optional() }).strict(),
|
|
12198
12481
|
shortcutRef: EntityRefSchema.optional(),
|
|
12199
12482
|
preferredAppId: ContractIdentifierSchema.optional()
|
|
12200
12483
|
}).strict().superRefine((interfaces, context) => {
|
|
@@ -12213,21 +12496,21 @@ var WorkflowDefinitionSchema = z14.object({
|
|
|
12213
12496
|
});
|
|
12214
12497
|
|
|
12215
12498
|
// src/contracts/workflow-runtime.ts
|
|
12216
|
-
import { z as
|
|
12217
|
-
var WorkflowCatalogEntrySchema =
|
|
12218
|
-
contract:
|
|
12499
|
+
import { z as z16 } from "zod";
|
|
12500
|
+
var WorkflowCatalogEntrySchema = z16.object({
|
|
12501
|
+
contract: z16.literal("WorkflowCatalogEntry"),
|
|
12219
12502
|
workflowId: ContractIdentifierSchema,
|
|
12220
12503
|
teamId: ContractIdentifierSchema,
|
|
12221
12504
|
creatorRef: EntityRefSchema,
|
|
12222
12505
|
currentDefinitionRef: EntityRefSchema,
|
|
12223
|
-
lifecycle:
|
|
12224
|
-
asset:
|
|
12225
|
-
preset:
|
|
12226
|
-
marketplacePublished:
|
|
12506
|
+
lifecycle: z16.enum(["ACTIVE", "DELETED"]),
|
|
12507
|
+
asset: z16.object({
|
|
12508
|
+
preset: z16.boolean(),
|
|
12509
|
+
marketplacePublished: z16.boolean(),
|
|
12227
12510
|
publishConfig: JsonObjectSchema.optional(),
|
|
12228
|
-
sort:
|
|
12511
|
+
sort: z16.number().int(),
|
|
12229
12512
|
forkFromRef: EntityRefSchema.optional(),
|
|
12230
|
-
notAuthorized:
|
|
12513
|
+
notAuthorized: z16.boolean()
|
|
12231
12514
|
}).strict(),
|
|
12232
12515
|
createdAt: IsoDateTimeSchema,
|
|
12233
12516
|
updatedAt: IsoDateTimeSchema,
|
|
@@ -12262,17 +12545,17 @@ var WorkflowCatalogEntrySchema = z15.object({
|
|
|
12262
12545
|
});
|
|
12263
12546
|
}
|
|
12264
12547
|
});
|
|
12265
|
-
var WorkflowPublicationSchema =
|
|
12266
|
-
contract:
|
|
12548
|
+
var WorkflowPublicationSchema = z16.object({
|
|
12549
|
+
contract: z16.literal("WorkflowPublication"),
|
|
12267
12550
|
publicationId: ContractIdentifierSchema,
|
|
12268
12551
|
definitionRef: EntityRefSchema,
|
|
12269
12552
|
runtimeDefinitionRef: EntityRefSchema,
|
|
12270
12553
|
sourceHash: Sha256Schema,
|
|
12271
12554
|
compiledHash: Sha256Schema,
|
|
12272
|
-
status:
|
|
12555
|
+
status: z16.enum(["PENDING", "PUBLISHED", "FAILED", "RETIRED"]),
|
|
12273
12556
|
publisherRef: EntityRefSchema,
|
|
12274
12557
|
publishedAt: IsoDateTimeSchema.optional(),
|
|
12275
|
-
failureReason:
|
|
12558
|
+
failureReason: z16.string().trim().min(1).optional()
|
|
12276
12559
|
}).strict().superRefine((publication, context) => {
|
|
12277
12560
|
if (publication.definitionRef.kind !== "workflow-definition") {
|
|
12278
12561
|
context.addIssue({
|
|
@@ -12303,12 +12586,12 @@ var WorkflowPublicationSchema = z15.object({
|
|
|
12303
12586
|
});
|
|
12304
12587
|
}
|
|
12305
12588
|
});
|
|
12306
|
-
var WorkflowCompletionCommitSchema =
|
|
12307
|
-
contract:
|
|
12589
|
+
var WorkflowCompletionCommitSchema = z16.object({
|
|
12590
|
+
contract: z16.literal("WorkflowCompletionCommit"),
|
|
12308
12591
|
commitId: ContractIdentifierSchema,
|
|
12309
12592
|
run: ApplicationRunSchema,
|
|
12310
|
-
outputs:
|
|
12311
|
-
artifacts:
|
|
12593
|
+
outputs: z16.array(OutputRecordSchema),
|
|
12594
|
+
artifacts: z16.array(ArtifactManifestSchema),
|
|
12312
12595
|
lineage: LineageRecordSchema,
|
|
12313
12596
|
completedAt: IsoDateTimeSchema
|
|
12314
12597
|
}).strict().superRefine((commit, context) => {
|
|
@@ -12350,15 +12633,15 @@ var WorkflowCompletionCommitSchema = z15.object({
|
|
|
12350
12633
|
}
|
|
12351
12634
|
});
|
|
12352
12635
|
});
|
|
12353
|
-
var WorkflowCompletionReceiptSchema =
|
|
12354
|
-
contract:
|
|
12636
|
+
var WorkflowCompletionReceiptSchema = z16.object({
|
|
12637
|
+
contract: z16.literal("WorkflowCompletionReceipt"),
|
|
12355
12638
|
commitId: ContractIdentifierSchema,
|
|
12356
12639
|
runRef: EntityRefSchema,
|
|
12357
|
-
outputRefs:
|
|
12358
|
-
artifactRefs:
|
|
12640
|
+
outputRefs: z16.array(EntityRefSchema),
|
|
12641
|
+
artifactRefs: z16.array(EntityRefSchema),
|
|
12359
12642
|
contentHash: Sha256Schema,
|
|
12360
12643
|
committedAt: IsoDateTimeSchema,
|
|
12361
|
-
idempotentReplay:
|
|
12644
|
+
idempotentReplay: z16.boolean()
|
|
12362
12645
|
}).strict().superRefine((receipt, context) => {
|
|
12363
12646
|
if (receipt.runRef.kind !== "application-run") {
|
|
12364
12647
|
context.addIssue({
|
|
@@ -12422,6 +12705,9 @@ var canonicalContractSchemas = {
|
|
|
12422
12705
|
"expiring-access-grant": ExpiringAccessGrantSchema,
|
|
12423
12706
|
"hotword-body": HotwordBodySchema,
|
|
12424
12707
|
"lineage-record": LineageRecordSchema,
|
|
12708
|
+
"menu-definition": MenuDefinitionSchema,
|
|
12709
|
+
"menu-definition-set": MenuDefinitionSetSchema,
|
|
12710
|
+
"menu-runtime-bundle": MenuRuntimeBundleSchema,
|
|
12425
12711
|
"ontology-definition": OntologyDefinitionSchema,
|
|
12426
12712
|
"overlay-node": OverlayNodeSchema,
|
|
12427
12713
|
"output-record": OutputRecordSchema,
|
|
@@ -12818,6 +13104,11 @@ var compileProductDeclaration = (input) => {
|
|
|
12818
13104
|
const commandsByName = uniqueIndex(declaration.commands, (value) => value.commandName, "command name");
|
|
12819
13105
|
const capabilitiesById = uniqueIndex(declaration.capabilities, (value) => value.id, "capability id");
|
|
12820
13106
|
const pagesById = uniqueIndex(declaration.pages, (value) => value.pageId, "page id");
|
|
13107
|
+
const menusByKey = uniqueIndex(
|
|
13108
|
+
declaration.menus,
|
|
13109
|
+
(value) => `${value.applicationId}/${value.surface}/${value.menuId}`,
|
|
13110
|
+
"menu definition"
|
|
13111
|
+
);
|
|
12821
13112
|
const nodes = [];
|
|
12822
13113
|
const edges = [];
|
|
12823
13114
|
const addNode = (kind, id) => nodes.push(ref(kind, id));
|
|
@@ -12832,6 +13123,7 @@ var compileProductDeclaration = (input) => {
|
|
|
12832
13123
|
}
|
|
12833
13124
|
for (const command of declaration.commands) addNode("command", command.commandName);
|
|
12834
13125
|
for (const capability of declaration.capabilities) addNode("capability", capability.id);
|
|
13126
|
+
for (const menu of declaration.menus) addNode("menu", `${menu.applicationId}/${menu.surface}/${menu.menuId}`);
|
|
12835
13127
|
for (const concept of declaration.concepts) {
|
|
12836
13128
|
addNode("concept", concept.conceptId);
|
|
12837
13129
|
if (concept.ontologyId) {
|
|
@@ -12877,6 +13169,7 @@ var compileProductDeclaration = (input) => {
|
|
|
12877
13169
|
commandsByName,
|
|
12878
13170
|
capabilitiesById,
|
|
12879
13171
|
pagesById,
|
|
13172
|
+
menusByKey,
|
|
12880
13173
|
nodes: Object.freeze(nodes),
|
|
12881
13174
|
edges: Object.freeze(edges)
|
|
12882
13175
|
});
|
|
@@ -12955,6 +13248,512 @@ var buildChangeImpactGraph = (previousInput, nextInput, generatedAt = (/* @__PUR
|
|
|
12955
13248
|
});
|
|
12956
13249
|
};
|
|
12957
13250
|
|
|
13251
|
+
// src/runtime/menu-compiler.ts
|
|
13252
|
+
var MenuCompilationError = class extends Error {
|
|
13253
|
+
constructor(code, path, message) {
|
|
13254
|
+
super(`${path}: ${message}`);
|
|
13255
|
+
this.name = "MenuCompilationError";
|
|
13256
|
+
this.code = code;
|
|
13257
|
+
this.path = path;
|
|
13258
|
+
}
|
|
13259
|
+
};
|
|
13260
|
+
var menuKey = (applicationId, surface, menuId) => `${applicationId}\0${surface}\0${menuId}`;
|
|
13261
|
+
var pageKey = (page) => `${page.applicationId}\0${page.pageId}`;
|
|
13262
|
+
var targetKey = (page, activationId) => `${page.applicationId}\0${page.pageId}\0${activationId}`;
|
|
13263
|
+
var actionKey = (applicationId, actionRef) => `${applicationId}\0${actionRef}`;
|
|
13264
|
+
var providerKey = (applicationId, providerId) => `${applicationId}\0${providerId}`;
|
|
13265
|
+
var stableSerialize = (value) => {
|
|
13266
|
+
if (value === void 0) return "null";
|
|
13267
|
+
if (value === null || typeof value !== "object") return JSON.stringify(value) ?? "null";
|
|
13268
|
+
if (Array.isArray(value)) return `[${value.map((item) => stableSerialize(item)).join(",")}]`;
|
|
13269
|
+
const record = value;
|
|
13270
|
+
return `{${Object.keys(record).filter((key) => record[key] !== void 0).sort().map((key) => `${JSON.stringify(key)}:${stableSerialize(record[key])}`).join(",")}}`;
|
|
13271
|
+
};
|
|
13272
|
+
var deepFreeze = (value) => {
|
|
13273
|
+
if (value === null || typeof value !== "object" || Object.isFrozen(value)) return value;
|
|
13274
|
+
Object.values(value).forEach((child) => deepFreeze(child));
|
|
13275
|
+
return Object.freeze(value);
|
|
13276
|
+
};
|
|
13277
|
+
var SHA256_INITIAL = [
|
|
13278
|
+
1779033703,
|
|
13279
|
+
3144134277,
|
|
13280
|
+
1013904242,
|
|
13281
|
+
2773480762,
|
|
13282
|
+
1359893119,
|
|
13283
|
+
2600822924,
|
|
13284
|
+
528734635,
|
|
13285
|
+
1541459225
|
|
13286
|
+
];
|
|
13287
|
+
var SHA256_ROUND = [
|
|
13288
|
+
1116352408,
|
|
13289
|
+
1899447441,
|
|
13290
|
+
3049323471,
|
|
13291
|
+
3921009573,
|
|
13292
|
+
961987163,
|
|
13293
|
+
1508970993,
|
|
13294
|
+
2453635748,
|
|
13295
|
+
2870763221,
|
|
13296
|
+
3624381080,
|
|
13297
|
+
310598401,
|
|
13298
|
+
607225278,
|
|
13299
|
+
1426881987,
|
|
13300
|
+
1925078388,
|
|
13301
|
+
2162078206,
|
|
13302
|
+
2614888103,
|
|
13303
|
+
3248222580,
|
|
13304
|
+
3835390401,
|
|
13305
|
+
4022224774,
|
|
13306
|
+
264347078,
|
|
13307
|
+
604807628,
|
|
13308
|
+
770255983,
|
|
13309
|
+
1249150122,
|
|
13310
|
+
1555081692,
|
|
13311
|
+
1996064986,
|
|
13312
|
+
2554220882,
|
|
13313
|
+
2821834349,
|
|
13314
|
+
2952996808,
|
|
13315
|
+
3210313671,
|
|
13316
|
+
3336571891,
|
|
13317
|
+
3584528711,
|
|
13318
|
+
113926993,
|
|
13319
|
+
338241895,
|
|
13320
|
+
666307205,
|
|
13321
|
+
773529912,
|
|
13322
|
+
1294757372,
|
|
13323
|
+
1396182291,
|
|
13324
|
+
1695183700,
|
|
13325
|
+
1986661051,
|
|
13326
|
+
2177026350,
|
|
13327
|
+
2456956037,
|
|
13328
|
+
2730485921,
|
|
13329
|
+
2820302411,
|
|
13330
|
+
3259730800,
|
|
13331
|
+
3345764771,
|
|
13332
|
+
3516065817,
|
|
13333
|
+
3600352804,
|
|
13334
|
+
4094571909,
|
|
13335
|
+
275423344,
|
|
13336
|
+
430227734,
|
|
13337
|
+
506948616,
|
|
13338
|
+
659060556,
|
|
13339
|
+
883997877,
|
|
13340
|
+
958139571,
|
|
13341
|
+
1322822218,
|
|
13342
|
+
1537002063,
|
|
13343
|
+
1747873779,
|
|
13344
|
+
1955562222,
|
|
13345
|
+
2024104815,
|
|
13346
|
+
2227730452,
|
|
13347
|
+
2361852424,
|
|
13348
|
+
2428436474,
|
|
13349
|
+
2756734187,
|
|
13350
|
+
3204031479,
|
|
13351
|
+
3329325298
|
|
13352
|
+
];
|
|
13353
|
+
var rotateRight = (value, amount) => value >>> amount | value << 32 - amount;
|
|
13354
|
+
var sha256Hex = (value) => {
|
|
13355
|
+
const source = [...new TextEncoder().encode(value)];
|
|
13356
|
+
const bitLength = source.length * 8;
|
|
13357
|
+
source.push(128);
|
|
13358
|
+
while (source.length % 64 !== 56) source.push(0);
|
|
13359
|
+
const high = Math.floor(bitLength / 4294967296);
|
|
13360
|
+
const low = bitLength >>> 0;
|
|
13361
|
+
for (let shift = 24; shift >= 0; shift -= 8) source.push(high >>> shift & 255);
|
|
13362
|
+
for (let shift = 24; shift >= 0; shift -= 8) source.push(low >>> shift & 255);
|
|
13363
|
+
const hash = [...SHA256_INITIAL];
|
|
13364
|
+
const words = new Array(64).fill(0);
|
|
13365
|
+
for (let offset = 0; offset < source.length; offset += 64) {
|
|
13366
|
+
for (let index = 0; index < 16; index += 1) {
|
|
13367
|
+
const start = offset + index * 4;
|
|
13368
|
+
words[index] = (source[start] << 24 | source[start + 1] << 16 | source[start + 2] << 8 | source[start + 3]) >>> 0;
|
|
13369
|
+
}
|
|
13370
|
+
for (let index = 16; index < 64; index += 1) {
|
|
13371
|
+
const previous = words[index - 15];
|
|
13372
|
+
const recent = words[index - 2];
|
|
13373
|
+
const small0 = rotateRight(previous, 7) ^ rotateRight(previous, 18) ^ previous >>> 3;
|
|
13374
|
+
const small1 = rotateRight(recent, 17) ^ rotateRight(recent, 19) ^ recent >>> 10;
|
|
13375
|
+
words[index] = words[index - 16] + small0 + words[index - 7] + small1 >>> 0;
|
|
13376
|
+
}
|
|
13377
|
+
let [a, b, c, d, e, f, g, h] = hash;
|
|
13378
|
+
for (let index = 0; index < 64; index += 1) {
|
|
13379
|
+
const big1 = rotateRight(e, 6) ^ rotateRight(e, 11) ^ rotateRight(e, 25);
|
|
13380
|
+
const choice = e & f ^ ~e & g;
|
|
13381
|
+
const temp1 = h + big1 + choice + SHA256_ROUND[index] + words[index] >>> 0;
|
|
13382
|
+
const big0 = rotateRight(a, 2) ^ rotateRight(a, 13) ^ rotateRight(a, 22);
|
|
13383
|
+
const majority = a & b ^ a & c ^ b & c;
|
|
13384
|
+
const temp2 = big0 + majority >>> 0;
|
|
13385
|
+
h = g;
|
|
13386
|
+
g = f;
|
|
13387
|
+
f = e;
|
|
13388
|
+
e = d + temp1 >>> 0;
|
|
13389
|
+
d = c;
|
|
13390
|
+
c = b;
|
|
13391
|
+
b = a;
|
|
13392
|
+
a = temp1 + temp2 >>> 0;
|
|
13393
|
+
}
|
|
13394
|
+
hash[0] = hash[0] + a >>> 0;
|
|
13395
|
+
hash[1] = hash[1] + b >>> 0;
|
|
13396
|
+
hash[2] = hash[2] + c >>> 0;
|
|
13397
|
+
hash[3] = hash[3] + d >>> 0;
|
|
13398
|
+
hash[4] = hash[4] + e >>> 0;
|
|
13399
|
+
hash[5] = hash[5] + f >>> 0;
|
|
13400
|
+
hash[6] = hash[6] + g >>> 0;
|
|
13401
|
+
hash[7] = hash[7] + h >>> 0;
|
|
13402
|
+
}
|
|
13403
|
+
return hash.map((part) => part.toString(16).padStart(8, "0")).join("");
|
|
13404
|
+
};
|
|
13405
|
+
var uniqueIndex2 = (values, key, path) => {
|
|
13406
|
+
const result = /* @__PURE__ */ new Map();
|
|
13407
|
+
values.forEach((value, index) => {
|
|
13408
|
+
const identity = key(value);
|
|
13409
|
+
if (result.has(identity)) {
|
|
13410
|
+
throw new MenuCompilationError(
|
|
13411
|
+
"duplicate-registration",
|
|
13412
|
+
`${path}[${index}]`,
|
|
13413
|
+
`Duplicate registry identity: ${identity.split("\0").join("/")}`
|
|
13414
|
+
);
|
|
13415
|
+
}
|
|
13416
|
+
result.set(identity, value);
|
|
13417
|
+
});
|
|
13418
|
+
return result;
|
|
13419
|
+
};
|
|
13420
|
+
var normalizedSiblingOrder = (left, right) => left.order - right.order || left.nodeId.localeCompare(right.nodeId);
|
|
13421
|
+
var normalizeNodeOrder = (nodes) => {
|
|
13422
|
+
const childrenByParent = /* @__PURE__ */ new Map();
|
|
13423
|
+
nodes.forEach((node) => {
|
|
13424
|
+
const parent = node.parentNodeId ?? "";
|
|
13425
|
+
const children = childrenByParent.get(parent) ?? [];
|
|
13426
|
+
children.push(node);
|
|
13427
|
+
childrenByParent.set(parent, children);
|
|
13428
|
+
});
|
|
13429
|
+
childrenByParent.forEach((children) => children.sort(normalizedSiblingOrder));
|
|
13430
|
+
const ordered = [];
|
|
13431
|
+
const appendChildren = (parentNodeId) => {
|
|
13432
|
+
for (const node of childrenByParent.get(parentNodeId) ?? []) {
|
|
13433
|
+
ordered.push(node);
|
|
13434
|
+
appendChildren(node.nodeId);
|
|
13435
|
+
}
|
|
13436
|
+
};
|
|
13437
|
+
appendChildren("");
|
|
13438
|
+
return ordered;
|
|
13439
|
+
};
|
|
13440
|
+
var requirementFromPage = (registration) => ({
|
|
13441
|
+
authenticated: registration.page.visibility.authenticated,
|
|
13442
|
+
permissionAllOf: registration.page.visibility.permissionAllOf,
|
|
13443
|
+
permissionAnyOf: registration.page.visibility.permissionAnyOf,
|
|
13444
|
+
featureFlags: registration.page.visibility.featureFlags
|
|
13445
|
+
});
|
|
13446
|
+
var validatePermissionCodes = (permissions, knownPermissions, path) => {
|
|
13447
|
+
permissions.forEach((permission, index) => {
|
|
13448
|
+
if (!knownPermissions.has(permission)) {
|
|
13449
|
+
throw new MenuCompilationError(
|
|
13450
|
+
"unknown-permission",
|
|
13451
|
+
`${path}[${index}]`,
|
|
13452
|
+
`Unknown platform permission: ${permission}`
|
|
13453
|
+
);
|
|
13454
|
+
}
|
|
13455
|
+
});
|
|
13456
|
+
};
|
|
13457
|
+
var validateInput = (value, schemaRef, validators, path) => {
|
|
13458
|
+
if (!schemaRef) {
|
|
13459
|
+
throw new MenuCompilationError(
|
|
13460
|
+
"missing-input-schema",
|
|
13461
|
+
path,
|
|
13462
|
+
"Input is configured but the target has no input schema reference."
|
|
13463
|
+
);
|
|
13464
|
+
}
|
|
13465
|
+
const validator = validators.get(schemaRef);
|
|
13466
|
+
if (!validator) {
|
|
13467
|
+
throw new MenuCompilationError(
|
|
13468
|
+
"unknown-input-schema",
|
|
13469
|
+
path,
|
|
13470
|
+
`No input validator is registered for ${schemaRef}.`
|
|
13471
|
+
);
|
|
13472
|
+
}
|
|
13473
|
+
try {
|
|
13474
|
+
return MenuBoundedInputSchema.parse(validator(value));
|
|
13475
|
+
} catch (error) {
|
|
13476
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
13477
|
+
throw new MenuCompilationError("invalid-input", path, `Input validation failed for ${schemaRef}: ${message}`);
|
|
13478
|
+
}
|
|
13479
|
+
};
|
|
13480
|
+
var evaluateAccess = (item, context) => {
|
|
13481
|
+
const reasons = [];
|
|
13482
|
+
const protectedBySession = item.access.authenticated || item.access.permissionAllOf.length > 0 || item.access.permissionAnyOf.length > 0 || item.access.requiredPermission !== void 0;
|
|
13483
|
+
if (!context.sessionResolved && protectedBySession) reasons.push("session-unresolved");
|
|
13484
|
+
if (item.access.authenticated && !context.authenticated) reasons.push("authentication");
|
|
13485
|
+
const granted = new Set(context.permissionCodes);
|
|
13486
|
+
const elevated = context.isKernelSuperAdmin === true || granted.has("*");
|
|
13487
|
+
if (item.access.permissionAllOf.some((permission) => !granted.has(permission))) {
|
|
13488
|
+
reasons.push("permission-all");
|
|
13489
|
+
}
|
|
13490
|
+
if (item.access.permissionAnyOf.length > 0 && !item.access.permissionAnyOf.some((permission) => granted.has(permission))) {
|
|
13491
|
+
reasons.push("permission-any");
|
|
13492
|
+
}
|
|
13493
|
+
if (!elevated && item.access.requiredPermission && !granted.has(item.access.requiredPermission)) {
|
|
13494
|
+
reasons.push("required-permission");
|
|
13495
|
+
}
|
|
13496
|
+
if (item.access.featureFlags.some((flag) => context.featureFlags[flag] !== true)) {
|
|
13497
|
+
reasons.push("feature-flag");
|
|
13498
|
+
}
|
|
13499
|
+
return Object.freeze({ allowed: reasons.length === 0, reasons: Object.freeze(reasons) });
|
|
13500
|
+
};
|
|
13501
|
+
var resolveMenuActivationId = (page, activationId) => activationId ?? page.pageId;
|
|
13502
|
+
var readMenuActivationFromSearch = (search) => {
|
|
13503
|
+
const params = typeof search === "string" ? new URLSearchParams(search) : search;
|
|
13504
|
+
const value = params.get(MENU_ACTIVATION_QUERY_PARAMETER)?.trim();
|
|
13505
|
+
return value || void 0;
|
|
13506
|
+
};
|
|
13507
|
+
var serializeMenuActivationSearch = (search, page, activationId) => {
|
|
13508
|
+
const params = new URLSearchParams(typeof search === "string" ? search : search.toString());
|
|
13509
|
+
const effectiveActivationId = resolveMenuActivationId(page, activationId);
|
|
13510
|
+
if (effectiveActivationId === page.pageId) params.delete(MENU_ACTIVATION_QUERY_PARAMETER);
|
|
13511
|
+
else params.set(MENU_ACTIVATION_QUERY_PARAMETER, effectiveActivationId);
|
|
13512
|
+
return params.toString();
|
|
13513
|
+
};
|
|
13514
|
+
var isCompiledMenuItemSelected = (item, page, activationId) => item.behavior.kind === "navigate" && pageKey(item.behavior.page) === pageKey(page) && item.behavior.activationId === resolveMenuActivationId(page, activationId);
|
|
13515
|
+
var compileMenuRuntimeBundle = (input) => {
|
|
13516
|
+
const applicationId = ContractIdentifierSchema.parse(input.applicationId);
|
|
13517
|
+
const supportedSurfaces = new Set(input.supportedSurfaces.map((surface) => ContractIdentifierSchema.parse(surface)));
|
|
13518
|
+
const definitions = input.definitions.map((definition) => MenuDefinitionSchema.parse(definition));
|
|
13519
|
+
const pages = input.pages.map((registration) => MenuPageRegistrationSchema.parse(registration));
|
|
13520
|
+
const actions = input.actions.map((registration) => MenuActionRegistrationSchema.parse(registration));
|
|
13521
|
+
const contributionProviders = input.contributionProviders.map((registration) => MenuContributionProviderRegistrationSchema.parse(registration));
|
|
13522
|
+
const inputValidators = input.inputValidators ?? /* @__PURE__ */ new Map();
|
|
13523
|
+
const knownPermissions = new Set(input.permissionCodes.map((permission) => ContractIdentifierSchema.parse(permission)));
|
|
13524
|
+
pages.forEach((registration, index) => {
|
|
13525
|
+
if (!registration.page.visibility.productContexts.some((context) => context === registration.applicationId)) {
|
|
13526
|
+
throw new MenuCompilationError(
|
|
13527
|
+
"invalid-page-application",
|
|
13528
|
+
`pages[${index}].applicationId`,
|
|
13529
|
+
`Page ${registration.page.pageId} is not visible in ${registration.applicationId}.`
|
|
13530
|
+
);
|
|
13531
|
+
}
|
|
13532
|
+
});
|
|
13533
|
+
const pagesByKey = uniqueIndex2(pages, (registration) => pageKey({
|
|
13534
|
+
applicationId: registration.applicationId,
|
|
13535
|
+
pageId: registration.page.pageId
|
|
13536
|
+
}), "pages");
|
|
13537
|
+
const actionsByKey = uniqueIndex2(actions, (registration) => actionKey(
|
|
13538
|
+
registration.applicationId,
|
|
13539
|
+
registration.actionRef
|
|
13540
|
+
), "actions");
|
|
13541
|
+
const providersByKey = uniqueIndex2(contributionProviders, (registration) => providerKey(
|
|
13542
|
+
registration.applicationId,
|
|
13543
|
+
registration.providerId
|
|
13544
|
+
), "contributionProviders");
|
|
13545
|
+
const definitionsByKey = /* @__PURE__ */ new Map();
|
|
13546
|
+
definitions.forEach((definition, index) => {
|
|
13547
|
+
const identity = menuKey(definition.applicationId, definition.surface, definition.menuId);
|
|
13548
|
+
if (definitionsByKey.has(identity)) {
|
|
13549
|
+
throw new MenuCompilationError(
|
|
13550
|
+
"duplicate-definition",
|
|
13551
|
+
`definitions[${index}]`,
|
|
13552
|
+
`Duplicate menu definition: ${definition.applicationId}/${definition.surface}/${definition.menuId}`
|
|
13553
|
+
);
|
|
13554
|
+
}
|
|
13555
|
+
definitionsByKey.set(identity, definition);
|
|
13556
|
+
});
|
|
13557
|
+
const targetSourceSignatures = /* @__PURE__ */ new Map();
|
|
13558
|
+
const navigationTargetsByKey = /* @__PURE__ */ new Map();
|
|
13559
|
+
const serverInputByTargetKey = /* @__PURE__ */ new Map();
|
|
13560
|
+
const requestedTargetKeys = /* @__PURE__ */ new Set();
|
|
13561
|
+
const requestedMenus = [];
|
|
13562
|
+
definitions.forEach((definition, definitionIndex) => {
|
|
13563
|
+
if (definition.applicationId === applicationId && !supportedSurfaces.has(definition.surface)) {
|
|
13564
|
+
throw new MenuCompilationError(
|
|
13565
|
+
"unsupported-surface",
|
|
13566
|
+
`definitions[${definitionIndex}].surface`,
|
|
13567
|
+
`Application ${applicationId} does not support menu surface ${definition.surface}.`
|
|
13568
|
+
);
|
|
13569
|
+
}
|
|
13570
|
+
const compiledNodes = definition.nodes.map((node, nodeIndex) => {
|
|
13571
|
+
if (node.kind !== "item") return node;
|
|
13572
|
+
const nodePath = `definitions[${definitionIndex}].nodes[${nodeIndex}]`;
|
|
13573
|
+
if (node.requiredPermission && !knownPermissions.has(node.requiredPermission)) {
|
|
13574
|
+
throw new MenuCompilationError(
|
|
13575
|
+
"unknown-permission",
|
|
13576
|
+
`${nodePath}.requiredPermission`,
|
|
13577
|
+
`Unknown platform permission: ${node.requiredPermission}`
|
|
13578
|
+
);
|
|
13579
|
+
}
|
|
13580
|
+
let access;
|
|
13581
|
+
if (node.behavior.kind === "navigate") {
|
|
13582
|
+
const registration = pagesByKey.get(pageKey(node.behavior.page));
|
|
13583
|
+
if (!registration) {
|
|
13584
|
+
throw new MenuCompilationError(
|
|
13585
|
+
"unknown-page",
|
|
13586
|
+
`${nodePath}.behavior.page`,
|
|
13587
|
+
`Unknown page reference: ${node.behavior.page.applicationId}/${node.behavior.page.pageId}`
|
|
13588
|
+
);
|
|
13589
|
+
}
|
|
13590
|
+
access = requirementFromPage(registration);
|
|
13591
|
+
validatePermissionCodes(access.permissionAllOf, knownPermissions, `${nodePath}.targetAccess.permissionAllOf`);
|
|
13592
|
+
validatePermissionCodes(access.permissionAnyOf, knownPermissions, `${nodePath}.targetAccess.permissionAnyOf`);
|
|
13593
|
+
const activationId = resolveMenuActivationId(node.behavior.page, node.behavior.activationId);
|
|
13594
|
+
const identity = targetKey(node.behavior.page, activationId);
|
|
13595
|
+
let runtimeInput;
|
|
13596
|
+
let normalizedSourceInput;
|
|
13597
|
+
if (node.behavior.input) {
|
|
13598
|
+
const normalized = validateInput(
|
|
13599
|
+
node.behavior.input.value,
|
|
13600
|
+
registration.page.input?.schemaRef,
|
|
13601
|
+
inputValidators,
|
|
13602
|
+
`${nodePath}.behavior.input.value`
|
|
13603
|
+
);
|
|
13604
|
+
normalizedSourceInput = { exposure: node.behavior.input.exposure, value: normalized };
|
|
13605
|
+
runtimeInput = node.behavior.input.exposure === "client" ? { exposure: "client", value: normalized } : { exposure: "server" };
|
|
13606
|
+
if (node.behavior.input.exposure === "server" && definition.applicationId === applicationId) {
|
|
13607
|
+
serverInputByTargetKey.set(identity, deepFreeze(normalized));
|
|
13608
|
+
}
|
|
13609
|
+
}
|
|
13610
|
+
const signature = stableSerialize({
|
|
13611
|
+
kind: "navigate",
|
|
13612
|
+
page: node.behavior.page,
|
|
13613
|
+
activationId,
|
|
13614
|
+
input: normalizedSourceInput
|
|
13615
|
+
});
|
|
13616
|
+
const existingSignature = targetSourceSignatures.get(identity);
|
|
13617
|
+
if (existingSignature !== void 0 && existingSignature !== signature) {
|
|
13618
|
+
throw new MenuCompilationError(
|
|
13619
|
+
"conflicting-navigation-target",
|
|
13620
|
+
`${nodePath}.behavior`,
|
|
13621
|
+
`Navigation target ${node.behavior.page.applicationId}/${node.behavior.page.pageId}/${activationId} has conflicting behavior or input.`
|
|
13622
|
+
);
|
|
13623
|
+
}
|
|
13624
|
+
targetSourceSignatures.set(identity, signature);
|
|
13625
|
+
if (!navigationTargetsByKey.has(identity)) {
|
|
13626
|
+
navigationTargetsByKey.set(identity, {
|
|
13627
|
+
page: node.behavior.page,
|
|
13628
|
+
activationId,
|
|
13629
|
+
input: runtimeInput
|
|
13630
|
+
});
|
|
13631
|
+
}
|
|
13632
|
+
if (definition.applicationId === applicationId) requestedTargetKeys.add(identity);
|
|
13633
|
+
const { requiredPermission: requiredPermission2, behavior: _behavior2, ...presentation2 } = node;
|
|
13634
|
+
return CompiledMenuItemNodeSchema.parse({
|
|
13635
|
+
...presentation2,
|
|
13636
|
+
behavior: {
|
|
13637
|
+
kind: "navigate",
|
|
13638
|
+
page: node.behavior.page,
|
|
13639
|
+
activationId,
|
|
13640
|
+
input: runtimeInput
|
|
13641
|
+
},
|
|
13642
|
+
access: { ...access, requiredPermission: requiredPermission2 }
|
|
13643
|
+
});
|
|
13644
|
+
}
|
|
13645
|
+
const action = actionsByKey.get(actionKey(definition.applicationId, node.behavior.actionRef));
|
|
13646
|
+
if (!action) {
|
|
13647
|
+
throw new MenuCompilationError(
|
|
13648
|
+
"unknown-action",
|
|
13649
|
+
`${nodePath}.behavior.actionRef`,
|
|
13650
|
+
`Unknown action reference for ${definition.applicationId}: ${node.behavior.actionRef}`
|
|
13651
|
+
);
|
|
13652
|
+
}
|
|
13653
|
+
access = action.access;
|
|
13654
|
+
validatePermissionCodes(access.permissionAllOf, knownPermissions, `${nodePath}.targetAccess.permissionAllOf`);
|
|
13655
|
+
validatePermissionCodes(access.permissionAnyOf, knownPermissions, `${nodePath}.targetAccess.permissionAnyOf`);
|
|
13656
|
+
const actionInput = node.behavior.input ? validateInput(node.behavior.input, action.inputSchemaRef, inputValidators, `${nodePath}.behavior.input`) : void 0;
|
|
13657
|
+
const { requiredPermission, behavior: _behavior, ...presentation } = node;
|
|
13658
|
+
return CompiledMenuItemNodeSchema.parse({
|
|
13659
|
+
...presentation,
|
|
13660
|
+
behavior: { kind: "action", actionRef: node.behavior.actionRef, input: actionInput },
|
|
13661
|
+
access: { ...access, requiredPermission }
|
|
13662
|
+
});
|
|
13663
|
+
});
|
|
13664
|
+
definition.contributions.forEach((contribution, contributionIndex) => {
|
|
13665
|
+
const provider = providersByKey.get(providerKey(definition.applicationId, contribution.providerId));
|
|
13666
|
+
const path = `definitions[${definitionIndex}].contributions[${contributionIndex}].providerId`;
|
|
13667
|
+
if (!provider) {
|
|
13668
|
+
throw new MenuCompilationError(
|
|
13669
|
+
"unknown-contribution-provider",
|
|
13670
|
+
path,
|
|
13671
|
+
`Unknown contribution provider for ${definition.applicationId}: ${contribution.providerId}`
|
|
13672
|
+
);
|
|
13673
|
+
}
|
|
13674
|
+
if (provider.surfaces && !provider.surfaces.includes(definition.surface)) {
|
|
13675
|
+
throw new MenuCompilationError(
|
|
13676
|
+
"unsupported-contribution-surface",
|
|
13677
|
+
path,
|
|
13678
|
+
`Provider ${contribution.providerId} does not support surface ${definition.surface}.`
|
|
13679
|
+
);
|
|
13680
|
+
}
|
|
13681
|
+
});
|
|
13682
|
+
if (definition.applicationId !== applicationId) return;
|
|
13683
|
+
requestedMenus.push(CompiledMenuProjectionSchema.parse({
|
|
13684
|
+
applicationId: definition.applicationId,
|
|
13685
|
+
surface: definition.surface,
|
|
13686
|
+
menuId: definition.menuId,
|
|
13687
|
+
nodes: normalizeNodeOrder(compiledNodes),
|
|
13688
|
+
contributions: [...definition.contributions].sort((left, right) => (left.parentNodeId ?? "").localeCompare(right.parentNodeId ?? "") || left.order - right.order || left.providerId.localeCompare(right.providerId))
|
|
13689
|
+
}));
|
|
13690
|
+
});
|
|
13691
|
+
const menus = requestedMenus.sort((left, right) => left.surface.localeCompare(right.surface) || left.menuId.localeCompare(right.menuId));
|
|
13692
|
+
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));
|
|
13693
|
+
const unsignedDocument = {
|
|
13694
|
+
contract: "MenuRuntimeBundle",
|
|
13695
|
+
version: MENU_CONTRACT_VERSION,
|
|
13696
|
+
applicationId,
|
|
13697
|
+
sourceVersion: input.sourceVersion,
|
|
13698
|
+
menus,
|
|
13699
|
+
navigationTargets,
|
|
13700
|
+
sourceMap: Object.fromEntries(
|
|
13701
|
+
Object.entries(input.sourceMap ?? {}).sort(([left], [right]) => left.localeCompare(right))
|
|
13702
|
+
)
|
|
13703
|
+
};
|
|
13704
|
+
const document = MenuRuntimeBundleSchema.parse({
|
|
13705
|
+
...unsignedDocument,
|
|
13706
|
+
contentHash: sha256Hex(stableSerialize(unsignedDocument))
|
|
13707
|
+
});
|
|
13708
|
+
const menusByKey = new Map(document.menus.map((menu) => [
|
|
13709
|
+
menuKey(menu.applicationId, menu.surface, menu.menuId),
|
|
13710
|
+
menu
|
|
13711
|
+
]));
|
|
13712
|
+
const documentTargetsByKey = new Map(document.navigationTargets.map((target) => [
|
|
13713
|
+
targetKey(target.page, target.activationId),
|
|
13714
|
+
target
|
|
13715
|
+
]));
|
|
13716
|
+
const resolveNavigationTarget = (page, explicitActivationId) => {
|
|
13717
|
+
const parsedPage = MenuPageRefSchema.parse(page);
|
|
13718
|
+
if (explicitActivationId !== void 0) {
|
|
13719
|
+
const parsedActivation = ContractIdentifierSchema.safeParse(explicitActivationId);
|
|
13720
|
+
if (!parsedActivation.success) return Object.freeze({ status: "invalid", reason: "invalid-activation" });
|
|
13721
|
+
const target2 = documentTargetsByKey.get(targetKey(parsedPage, parsedActivation.data));
|
|
13722
|
+
if (target2) return Object.freeze({ status: "resolved", target: target2 });
|
|
13723
|
+
const sameActivation = document.navigationTargets.find((candidate) => candidate.page.applicationId === parsedPage.applicationId && candidate.activationId === parsedActivation.data);
|
|
13724
|
+
return Object.freeze({
|
|
13725
|
+
status: "invalid",
|
|
13726
|
+
reason: sameActivation ? "page-mismatch" : "unknown-activation"
|
|
13727
|
+
});
|
|
13728
|
+
}
|
|
13729
|
+
const target = documentTargetsByKey.get(targetKey(parsedPage, parsedPage.pageId));
|
|
13730
|
+
return target ? Object.freeze({ status: "resolved", target }) : Object.freeze({ status: "unmatched" });
|
|
13731
|
+
};
|
|
13732
|
+
return Object.freeze({
|
|
13733
|
+
document: deepFreeze(document),
|
|
13734
|
+
menusByKey,
|
|
13735
|
+
navigationTargetsByKey: documentTargetsByKey,
|
|
13736
|
+
serverInputByTargetKey,
|
|
13737
|
+
evaluateItemAccess: evaluateAccess,
|
|
13738
|
+
resolveNavigationTarget,
|
|
13739
|
+
selectedNodeIds(menu, page, activationId) {
|
|
13740
|
+
if (menu.applicationId !== document.applicationId) return /* @__PURE__ */ new Set();
|
|
13741
|
+
const nodesById = new Map(menu.nodes.map((node) => [node.nodeId, node]));
|
|
13742
|
+
const selected = /* @__PURE__ */ new Set();
|
|
13743
|
+
for (const node of menu.nodes) {
|
|
13744
|
+
if (node.kind !== "item" || !isCompiledMenuItemSelected(node, page, activationId)) continue;
|
|
13745
|
+
selected.add(node.nodeId);
|
|
13746
|
+
let parentNodeId = node.parentNodeId;
|
|
13747
|
+
while (parentNodeId) {
|
|
13748
|
+
selected.add(parentNodeId);
|
|
13749
|
+
parentNodeId = nodesById.get(parentNodeId)?.parentNodeId;
|
|
13750
|
+
}
|
|
13751
|
+
}
|
|
13752
|
+
return selected;
|
|
13753
|
+
}
|
|
13754
|
+
});
|
|
13755
|
+
};
|
|
13756
|
+
|
|
12958
13757
|
// src/runtime/view-provider-registry.ts
|
|
12959
13758
|
var referenceVersion = (version) => version === void 0 ? void 0 : String(version);
|
|
12960
13759
|
var sameStringSet = (left, right) => {
|
|
@@ -13230,7 +14029,7 @@ var compilePageRuntimeProjection = (input) => {
|
|
|
13230
14029
|
const guardsByPageId = unique2(document.guards, (guard) => guard.pageId, "guard pageId");
|
|
13231
14030
|
const renderersByPageId = unique2(document.renderers, (renderer) => renderer.pageId, "renderer pageId");
|
|
13232
14031
|
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
|
|
14032
|
+
const evaluateAccess2 = (pageId, context) => {
|
|
13234
14033
|
const guard = guardsByPageId.get(pageId);
|
|
13235
14034
|
if (!guard) throw new Error(`Unknown page guard: ${pageId}`);
|
|
13236
14035
|
const reasons = [];
|
|
@@ -13253,9 +14052,9 @@ var compilePageRuntimeProjection = (input) => {
|
|
|
13253
14052
|
navigationByPageId,
|
|
13254
14053
|
guardsByPageId,
|
|
13255
14054
|
renderersByPageId,
|
|
13256
|
-
evaluateAccess,
|
|
14055
|
+
evaluateAccess: evaluateAccess2,
|
|
13257
14056
|
visibleNavigation(context) {
|
|
13258
|
-
return Object.freeze(document.navigation.filter((item) =>
|
|
14057
|
+
return Object.freeze(document.navigation.filter((item) => evaluateAccess2(item.pageId, context).allowed));
|
|
13259
14058
|
},
|
|
13260
14059
|
matchRoute(pathname) {
|
|
13261
14060
|
const path = pathname.split("?")[0]?.split("#")[0] || "/";
|
|
@@ -13435,6 +14234,7 @@ var compileTenantRuntimeConfig = (input) => {
|
|
|
13435
14234
|
dataBinding: productConfig.dataBinding,
|
|
13436
14235
|
sourceMap: productConfig.sourceMap,
|
|
13437
14236
|
warnings: productConfig.warnings,
|
|
14237
|
+
menuBundle: input.menuBundle,
|
|
13438
14238
|
applicationConfig: productConfig.applicationConfig
|
|
13439
14239
|
}));
|
|
13440
14240
|
};
|
|
@@ -13755,6 +14555,15 @@ export {
|
|
|
13755
14555
|
CapabilitySourceTypeSchema,
|
|
13756
14556
|
ChangeImpactGraphSchema,
|
|
13757
14557
|
ChangeImpactSchema,
|
|
14558
|
+
CompiledMenuActionBehaviorSchema,
|
|
14559
|
+
CompiledMenuBehaviorSchema,
|
|
14560
|
+
CompiledMenuDividerNodeSchema,
|
|
14561
|
+
CompiledMenuGroupNodeSchema,
|
|
14562
|
+
CompiledMenuItemAccessSchema,
|
|
14563
|
+
CompiledMenuItemNodeSchema,
|
|
14564
|
+
CompiledMenuNavigateBehaviorSchema,
|
|
14565
|
+
CompiledMenuNodeSchema,
|
|
14566
|
+
CompiledMenuProjectionSchema,
|
|
13758
14567
|
CompletionEventSchema,
|
|
13759
14568
|
CompletionHeaderSchema,
|
|
13760
14569
|
ConceptDefinitionSchema,
|
|
@@ -13792,7 +14601,36 @@ export {
|
|
|
13792
14601
|
LineageRecordSchema,
|
|
13793
14602
|
LocaleIdentifierSchema,
|
|
13794
14603
|
LocalizedTextSchema,
|
|
14604
|
+
MENU_ACTIVATION_QUERY_PARAMETER,
|
|
14605
|
+
MENU_CONTRACT_VERSION,
|
|
14606
|
+
MENU_MAX_DEFINITIONS,
|
|
14607
|
+
MENU_MAX_INPUT_BYTES,
|
|
14608
|
+
MENU_MAX_INPUT_VALUES,
|
|
14609
|
+
MENU_MAX_NODES,
|
|
14610
|
+
MENU_MAX_TREE_DEPTH,
|
|
13795
14611
|
MONKEYS_REQUIRED_THEME_TOKEN_PATHS,
|
|
14612
|
+
MenuAccessRequirementSchema,
|
|
14613
|
+
MenuActionBehaviorSchema,
|
|
14614
|
+
MenuActionRegistrationSchema,
|
|
14615
|
+
MenuBehaviorSchema,
|
|
14616
|
+
MenuBoundedInputSchema,
|
|
14617
|
+
MenuCompilationError,
|
|
14618
|
+
MenuContributionProviderRegistrationSchema,
|
|
14619
|
+
MenuContributionResultSchema,
|
|
14620
|
+
MenuContributionSchema,
|
|
14621
|
+
MenuDefinitionSchema,
|
|
14622
|
+
MenuDefinitionSetSchema,
|
|
14623
|
+
MenuDividerNodeSchema,
|
|
14624
|
+
MenuGroupNodeSchema,
|
|
14625
|
+
MenuItemNodeSchema,
|
|
14626
|
+
MenuNavigateBehaviorSchema,
|
|
14627
|
+
MenuNavigationTargetSchema,
|
|
14628
|
+
MenuNodeSchema,
|
|
14629
|
+
MenuPageRefSchema,
|
|
14630
|
+
MenuPageRegistrationSchema,
|
|
14631
|
+
MenuRuntimeBundleSchema,
|
|
14632
|
+
MenuRuntimeInputBindingSchema,
|
|
14633
|
+
MenuSourceInputBindingSchema,
|
|
13796
14634
|
OntologyDefinitionSchema,
|
|
13797
14635
|
OutputRecordSchema,
|
|
13798
14636
|
OverlayNodeSchema,
|
|
@@ -13896,6 +14734,7 @@ export {
|
|
|
13896
14734
|
canonicalContractSchemas,
|
|
13897
14735
|
compileCapabilityRegistry,
|
|
13898
14736
|
compileConductorWorkflowDefinition,
|
|
14737
|
+
compileMenuRuntimeBundle,
|
|
13899
14738
|
compilePageRuntimeProjection,
|
|
13900
14739
|
compileProductDeclaration,
|
|
13901
14740
|
compileProductRuntimeCatalog,
|
|
@@ -13919,6 +14758,7 @@ export {
|
|
|
13919
14758
|
getAgentSessionRuntimeCapabilities,
|
|
13920
14759
|
isAgentResourceModeCompatible,
|
|
13921
14760
|
isAgentSessionTerminalStatus,
|
|
14761
|
+
isCompiledMenuItemSelected,
|
|
13922
14762
|
mergeThemeTokenDocuments,
|
|
13923
14763
|
normalizeAgentExecutionMode,
|
|
13924
14764
|
normalizeAgentMode,
|
|
@@ -13926,9 +14766,12 @@ export {
|
|
|
13926
14766
|
projectAgentSessionEvents,
|
|
13927
14767
|
publishOpenApiToolCapabilityManifests,
|
|
13928
14768
|
readApplicationHandoffFromUrl,
|
|
14769
|
+
readMenuActivationFromSearch,
|
|
13929
14770
|
resolveAgentSessionCommandTransition,
|
|
14771
|
+
resolveMenuActivationId,
|
|
13930
14772
|
resolveThemeTokens,
|
|
13931
14773
|
serializeApplicationHandoff,
|
|
14774
|
+
serializeMenuActivationSearch,
|
|
13932
14775
|
toAgentSessionViewModel,
|
|
13933
14776
|
validateDomainCommand,
|
|
13934
14777
|
validateThemeTokensDocument,
|