@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
|
@@ -8266,6 +8266,9 @@ var DomainEventSchema = z8.object({
|
|
|
8266
8266
|
occurredAt: IsoDateTimeSchema
|
|
8267
8267
|
}).strict();
|
|
8268
8268
|
|
|
8269
|
+
// src/contracts/menu.ts
|
|
8270
|
+
import { z as z10 } from "zod";
|
|
8271
|
+
|
|
8269
8272
|
// src/contracts/page.ts
|
|
8270
8273
|
import { z as z9 } from "zod";
|
|
8271
8274
|
var PageTypeSchema = z9.enum([
|
|
@@ -8353,6 +8356,9 @@ var PageDefinitionSchema = z9.object({
|
|
|
8353
8356
|
access: z9.object({
|
|
8354
8357
|
actions: z9.array(z9.enum(["read", "write", "execute", "manage-permissions"])).default([])
|
|
8355
8358
|
}).strict(),
|
|
8359
|
+
input: z9.object({
|
|
8360
|
+
schemaRef: ContractIdentifierSchema
|
|
8361
|
+
}).strict().optional(),
|
|
8356
8362
|
rendererConfig: z9.object({
|
|
8357
8363
|
schemaRef: ContractIdentifierSchema,
|
|
8358
8364
|
value: JsonObjectSchema
|
|
@@ -8542,40 +8548,314 @@ var PageRuntimeProjectionSchema = z9.object({
|
|
|
8542
8548
|
}
|
|
8543
8549
|
});
|
|
8544
8550
|
|
|
8551
|
+
// src/contracts/menu.ts
|
|
8552
|
+
var MENU_ACTIVATION_QUERY_PARAMETER = "__menuActivation";
|
|
8553
|
+
var MENU_CONTRACT_VERSION = 1;
|
|
8554
|
+
var MENU_MAX_DEFINITIONS = 128;
|
|
8555
|
+
var MENU_MAX_NODES = 1024;
|
|
8556
|
+
var MENU_MAX_TREE_DEPTH = 16;
|
|
8557
|
+
var MENU_MAX_INPUT_BYTES = 64 * 1024;
|
|
8558
|
+
var MENU_MAX_INPUT_VALUES = 2048;
|
|
8559
|
+
var MenuOrderSchema = z10.number().int().min(-1e6).max(1e6);
|
|
8560
|
+
var inspectJsonValue = (value) => {
|
|
8561
|
+
let maxDepth = 0;
|
|
8562
|
+
let values = 0;
|
|
8563
|
+
const visit = (candidate, depth) => {
|
|
8564
|
+
values += 1;
|
|
8565
|
+
maxDepth = Math.max(maxDepth, depth);
|
|
8566
|
+
if (Array.isArray(candidate)) {
|
|
8567
|
+
candidate.forEach((item) => visit(item, depth + 1));
|
|
8568
|
+
return;
|
|
8569
|
+
}
|
|
8570
|
+
if (candidate && typeof candidate === "object") {
|
|
8571
|
+
Object.values(candidate).forEach((item) => visit(item, depth + 1));
|
|
8572
|
+
}
|
|
8573
|
+
};
|
|
8574
|
+
visit(value, 1);
|
|
8575
|
+
return {
|
|
8576
|
+
bytes: new TextEncoder().encode(JSON.stringify(value)).byteLength,
|
|
8577
|
+
depth: maxDepth,
|
|
8578
|
+
values
|
|
8579
|
+
};
|
|
8580
|
+
};
|
|
8581
|
+
var MenuBoundedInputSchema = JsonObjectSchema.superRefine((value, context) => {
|
|
8582
|
+
const bounds = inspectJsonValue(value);
|
|
8583
|
+
if (bounds.bytes > MENU_MAX_INPUT_BYTES) {
|
|
8584
|
+
context.addIssue({
|
|
8585
|
+
code: "custom",
|
|
8586
|
+
message: `Menu input exceeds ${MENU_MAX_INPUT_BYTES} UTF-8 bytes.`
|
|
8587
|
+
});
|
|
8588
|
+
}
|
|
8589
|
+
if (bounds.depth > MENU_MAX_TREE_DEPTH) {
|
|
8590
|
+
context.addIssue({
|
|
8591
|
+
code: "custom",
|
|
8592
|
+
message: `Menu input exceeds maximum depth ${MENU_MAX_TREE_DEPTH}.`
|
|
8593
|
+
});
|
|
8594
|
+
}
|
|
8595
|
+
if (bounds.values > MENU_MAX_INPUT_VALUES) {
|
|
8596
|
+
context.addIssue({
|
|
8597
|
+
code: "custom",
|
|
8598
|
+
message: `Menu input exceeds ${MENU_MAX_INPUT_VALUES} values.`
|
|
8599
|
+
});
|
|
8600
|
+
}
|
|
8601
|
+
});
|
|
8602
|
+
var MenuPageRefSchema = z10.object({
|
|
8603
|
+
applicationId: ContractIdentifierSchema,
|
|
8604
|
+
pageId: ContractIdentifierSchema
|
|
8605
|
+
}).strict();
|
|
8606
|
+
var MenuSourceInputBindingSchema = z10.discriminatedUnion("exposure", [
|
|
8607
|
+
z10.object({ exposure: z10.literal("client"), value: MenuBoundedInputSchema }).strict(),
|
|
8608
|
+
z10.object({ exposure: z10.literal("server"), value: MenuBoundedInputSchema }).strict()
|
|
8609
|
+
]);
|
|
8610
|
+
var MenuRuntimeInputBindingSchema = z10.discriminatedUnion("exposure", [
|
|
8611
|
+
z10.object({ exposure: z10.literal("client"), value: MenuBoundedInputSchema }).strict(),
|
|
8612
|
+
z10.object({ exposure: z10.literal("server") }).strict()
|
|
8613
|
+
]);
|
|
8614
|
+
var MenuNavigateBehaviorSchema = z10.object({
|
|
8615
|
+
kind: z10.literal("navigate"),
|
|
8616
|
+
page: MenuPageRefSchema,
|
|
8617
|
+
activationId: ContractIdentifierSchema.optional(),
|
|
8618
|
+
input: MenuSourceInputBindingSchema.optional()
|
|
8619
|
+
}).strict();
|
|
8620
|
+
var MenuActionBehaviorSchema = z10.object({
|
|
8621
|
+
kind: z10.literal("action"),
|
|
8622
|
+
actionRef: ContractIdentifierSchema,
|
|
8623
|
+
input: MenuBoundedInputSchema.optional()
|
|
8624
|
+
}).strict();
|
|
8625
|
+
var MenuBehaviorSchema = z10.discriminatedUnion("kind", [
|
|
8626
|
+
MenuNavigateBehaviorSchema,
|
|
8627
|
+
MenuActionBehaviorSchema
|
|
8628
|
+
]);
|
|
8629
|
+
var MenuNodeBaseShape = {
|
|
8630
|
+
nodeId: ContractIdentifierSchema,
|
|
8631
|
+
parentNodeId: ContractIdentifierSchema.optional(),
|
|
8632
|
+
order: MenuOrderSchema
|
|
8633
|
+
};
|
|
8634
|
+
var MenuGroupNodeSchema = z10.object({
|
|
8635
|
+
...MenuNodeBaseShape,
|
|
8636
|
+
kind: z10.literal("group"),
|
|
8637
|
+
label: LocalizedTextSchema.optional(),
|
|
8638
|
+
iconRef: ContractIdentifierSchema.optional()
|
|
8639
|
+
}).strict();
|
|
8640
|
+
var MenuDividerNodeSchema = z10.object({
|
|
8641
|
+
...MenuNodeBaseShape,
|
|
8642
|
+
kind: z10.literal("divider")
|
|
8643
|
+
}).strict();
|
|
8644
|
+
var MenuItemNodeSchema = z10.object({
|
|
8645
|
+
...MenuNodeBaseShape,
|
|
8646
|
+
kind: z10.literal("item"),
|
|
8647
|
+
label: LocalizedTextSchema,
|
|
8648
|
+
iconRef: ContractIdentifierSchema.optional(),
|
|
8649
|
+
tone: z10.enum(["default", "danger"]).optional(),
|
|
8650
|
+
requiredPermission: ContractIdentifierSchema.optional(),
|
|
8651
|
+
behavior: MenuBehaviorSchema
|
|
8652
|
+
}).strict();
|
|
8653
|
+
var MenuNodeSchema = z10.discriminatedUnion("kind", [
|
|
8654
|
+
MenuGroupNodeSchema,
|
|
8655
|
+
MenuDividerNodeSchema,
|
|
8656
|
+
MenuItemNodeSchema
|
|
8657
|
+
]);
|
|
8658
|
+
var MenuContributionSchema = z10.object({
|
|
8659
|
+
providerId: ContractIdentifierSchema,
|
|
8660
|
+
parentNodeId: ContractIdentifierSchema.optional(),
|
|
8661
|
+
order: MenuOrderSchema
|
|
8662
|
+
}).strict();
|
|
8663
|
+
var validateMenuStructure = (menu, context) => {
|
|
8664
|
+
const nodesById = /* @__PURE__ */ new Map();
|
|
8665
|
+
menu.nodes.forEach((node, index) => {
|
|
8666
|
+
if (nodesById.has(node.nodeId)) {
|
|
8667
|
+
context.addIssue({
|
|
8668
|
+
code: "custom",
|
|
8669
|
+
path: ["nodes", index, "nodeId"],
|
|
8670
|
+
message: `Duplicate menu nodeId: ${node.nodeId}`
|
|
8671
|
+
});
|
|
8672
|
+
return;
|
|
8673
|
+
}
|
|
8674
|
+
nodesById.set(node.nodeId, { node, index });
|
|
8675
|
+
});
|
|
8676
|
+
const validateParent = (parentNodeId, path) => {
|
|
8677
|
+
if (!parentNodeId) return;
|
|
8678
|
+
const parent = nodesById.get(parentNodeId);
|
|
8679
|
+
if (!parent) {
|
|
8680
|
+
context.addIssue({ code: "custom", path, message: `Unknown menu parentNodeId: ${parentNodeId}` });
|
|
8681
|
+
return;
|
|
8682
|
+
}
|
|
8683
|
+
if (parent.node.kind !== "group") {
|
|
8684
|
+
context.addIssue({ code: "custom", path, message: `Menu parent ${parentNodeId} must be a group.` });
|
|
8685
|
+
}
|
|
8686
|
+
};
|
|
8687
|
+
menu.nodes.forEach((node, index) => validateParent(node.parentNodeId, ["nodes", index, "parentNodeId"]));
|
|
8688
|
+
menu.contributions.forEach((contribution, index) => validateParent(contribution.parentNodeId, ["contributions", index, "parentNodeId"]));
|
|
8689
|
+
menu.nodes.forEach((node, index) => {
|
|
8690
|
+
const ancestors = /* @__PURE__ */ new Set([node.nodeId]);
|
|
8691
|
+
let parentNodeId = node.parentNodeId;
|
|
8692
|
+
let depth = 1;
|
|
8693
|
+
while (parentNodeId) {
|
|
8694
|
+
if (ancestors.has(parentNodeId)) {
|
|
8695
|
+
context.addIssue({
|
|
8696
|
+
code: "custom",
|
|
8697
|
+
path: ["nodes", index, "parentNodeId"],
|
|
8698
|
+
message: `Menu node cycle contains ${node.nodeId}.`
|
|
8699
|
+
});
|
|
8700
|
+
break;
|
|
8701
|
+
}
|
|
8702
|
+
ancestors.add(parentNodeId);
|
|
8703
|
+
depth += 1;
|
|
8704
|
+
if (depth > MENU_MAX_TREE_DEPTH) {
|
|
8705
|
+
context.addIssue({
|
|
8706
|
+
code: "custom",
|
|
8707
|
+
path: ["nodes", index, "parentNodeId"],
|
|
8708
|
+
message: `Menu tree exceeds maximum depth ${MENU_MAX_TREE_DEPTH}.`
|
|
8709
|
+
});
|
|
8710
|
+
break;
|
|
8711
|
+
}
|
|
8712
|
+
parentNodeId = nodesById.get(parentNodeId)?.node.parentNodeId;
|
|
8713
|
+
}
|
|
8714
|
+
});
|
|
8715
|
+
const contributionKeys = /* @__PURE__ */ new Set();
|
|
8716
|
+
menu.contributions.forEach((contribution, index) => {
|
|
8717
|
+
const key = `${contribution.parentNodeId ?? ""}\0${contribution.providerId}`;
|
|
8718
|
+
if (contributionKeys.has(key)) {
|
|
8719
|
+
context.addIssue({
|
|
8720
|
+
code: "custom",
|
|
8721
|
+
path: ["contributions", index, "providerId"],
|
|
8722
|
+
message: `Duplicate menu contribution provider at parent: ${contribution.providerId}`
|
|
8723
|
+
});
|
|
8724
|
+
}
|
|
8725
|
+
contributionKeys.add(key);
|
|
8726
|
+
});
|
|
8727
|
+
};
|
|
8728
|
+
var MenuDefinitionSchema = z10.object({
|
|
8729
|
+
contract: z10.literal("MenuDefinition"),
|
|
8730
|
+
version: z10.literal(MENU_CONTRACT_VERSION),
|
|
8731
|
+
applicationId: ContractIdentifierSchema,
|
|
8732
|
+
surface: ContractIdentifierSchema,
|
|
8733
|
+
menuId: ContractIdentifierSchema,
|
|
8734
|
+
nodes: z10.array(MenuNodeSchema).max(MENU_MAX_NODES),
|
|
8735
|
+
contributions: z10.array(MenuContributionSchema).max(MENU_MAX_NODES).default([])
|
|
8736
|
+
}).strict().superRefine(validateMenuStructure);
|
|
8737
|
+
var MenuDefinitionSetSchema = z10.union([
|
|
8738
|
+
z10.literal("*"),
|
|
8739
|
+
z10.object({
|
|
8740
|
+
version: z10.literal(MENU_CONTRACT_VERSION),
|
|
8741
|
+
definitions: z10.array(MenuDefinitionSchema).max(MENU_MAX_DEFINITIONS)
|
|
8742
|
+
}).strict()
|
|
8743
|
+
]);
|
|
8744
|
+
var MenuAccessRequirementSchema = z10.object({
|
|
8745
|
+
authenticated: z10.boolean().default(true),
|
|
8746
|
+
permissionAllOf: z10.array(ContractIdentifierSchema).default([]),
|
|
8747
|
+
permissionAnyOf: z10.array(ContractIdentifierSchema).default([]),
|
|
8748
|
+
featureFlags: z10.array(ContractIdentifierSchema).default([])
|
|
8749
|
+
}).strict();
|
|
8750
|
+
var MenuPageRegistrationSchema = z10.object({
|
|
8751
|
+
applicationId: ContractIdentifierSchema,
|
|
8752
|
+
page: PageDefinitionSchema
|
|
8753
|
+
}).strict();
|
|
8754
|
+
var MenuActionRegistrationSchema = z10.object({
|
|
8755
|
+
applicationId: ContractIdentifierSchema,
|
|
8756
|
+
actionRef: ContractIdentifierSchema,
|
|
8757
|
+
inputSchemaRef: ContractIdentifierSchema.optional(),
|
|
8758
|
+
access: MenuAccessRequirementSchema
|
|
8759
|
+
}).strict();
|
|
8760
|
+
var MenuContributionProviderRegistrationSchema = z10.object({
|
|
8761
|
+
applicationId: ContractIdentifierSchema,
|
|
8762
|
+
providerId: ContractIdentifierSchema,
|
|
8763
|
+
surfaces: z10.array(ContractIdentifierSchema).min(1).optional()
|
|
8764
|
+
}).strict();
|
|
8765
|
+
var CompiledMenuNavigateBehaviorSchema = z10.object({
|
|
8766
|
+
kind: z10.literal("navigate"),
|
|
8767
|
+
page: MenuPageRefSchema,
|
|
8768
|
+
activationId: ContractIdentifierSchema,
|
|
8769
|
+
input: MenuRuntimeInputBindingSchema.optional()
|
|
8770
|
+
}).strict();
|
|
8771
|
+
var CompiledMenuActionBehaviorSchema = z10.object({
|
|
8772
|
+
kind: z10.literal("action"),
|
|
8773
|
+
actionRef: ContractIdentifierSchema,
|
|
8774
|
+
input: MenuBoundedInputSchema.optional()
|
|
8775
|
+
}).strict();
|
|
8776
|
+
var CompiledMenuBehaviorSchema = z10.discriminatedUnion("kind", [
|
|
8777
|
+
CompiledMenuNavigateBehaviorSchema,
|
|
8778
|
+
CompiledMenuActionBehaviorSchema
|
|
8779
|
+
]);
|
|
8780
|
+
var CompiledMenuItemAccessSchema = MenuAccessRequirementSchema.extend({
|
|
8781
|
+
requiredPermission: ContractIdentifierSchema.optional()
|
|
8782
|
+
}).strict();
|
|
8783
|
+
var CompiledMenuGroupNodeSchema = MenuGroupNodeSchema;
|
|
8784
|
+
var CompiledMenuDividerNodeSchema = MenuDividerNodeSchema;
|
|
8785
|
+
var CompiledMenuItemNodeSchema = MenuItemNodeSchema.omit({ behavior: true, requiredPermission: true }).extend({
|
|
8786
|
+
behavior: CompiledMenuBehaviorSchema,
|
|
8787
|
+
access: CompiledMenuItemAccessSchema
|
|
8788
|
+
}).strict();
|
|
8789
|
+
var CompiledMenuNodeSchema = z10.discriminatedUnion("kind", [
|
|
8790
|
+
CompiledMenuGroupNodeSchema,
|
|
8791
|
+
CompiledMenuDividerNodeSchema,
|
|
8792
|
+
CompiledMenuItemNodeSchema
|
|
8793
|
+
]);
|
|
8794
|
+
var CompiledMenuProjectionSchema = z10.object({
|
|
8795
|
+
applicationId: ContractIdentifierSchema,
|
|
8796
|
+
surface: ContractIdentifierSchema,
|
|
8797
|
+
menuId: ContractIdentifierSchema,
|
|
8798
|
+
nodes: z10.array(CompiledMenuNodeSchema).max(MENU_MAX_NODES),
|
|
8799
|
+
contributions: z10.array(MenuContributionSchema).max(MENU_MAX_NODES)
|
|
8800
|
+
}).strict();
|
|
8801
|
+
var MenuNavigationTargetSchema = z10.object({
|
|
8802
|
+
page: MenuPageRefSchema,
|
|
8803
|
+
activationId: ContractIdentifierSchema,
|
|
8804
|
+
input: MenuRuntimeInputBindingSchema.optional()
|
|
8805
|
+
}).strict();
|
|
8806
|
+
var MenuRuntimeBundleSchema = z10.object({
|
|
8807
|
+
contract: z10.literal("MenuRuntimeBundle"),
|
|
8808
|
+
version: z10.literal(MENU_CONTRACT_VERSION),
|
|
8809
|
+
applicationId: ContractIdentifierSchema,
|
|
8810
|
+
sourceVersion: ContractIdentifierSchema,
|
|
8811
|
+
contentHash: Sha256Schema,
|
|
8812
|
+
menus: z10.array(CompiledMenuProjectionSchema).max(MENU_MAX_DEFINITIONS),
|
|
8813
|
+
navigationTargets: z10.array(MenuNavigationTargetSchema),
|
|
8814
|
+
sourceMap: z10.record(z10.string(), ContractIdentifierSchema).default({})
|
|
8815
|
+
}).strict();
|
|
8816
|
+
var MenuContributionResultSchema = z10.object({
|
|
8817
|
+
contract: z10.literal("MenuContributionResult"),
|
|
8818
|
+
applicationId: ContractIdentifierSchema,
|
|
8819
|
+
surface: ContractIdentifierSchema,
|
|
8820
|
+
menuId: ContractIdentifierSchema,
|
|
8821
|
+
providerId: ContractIdentifierSchema,
|
|
8822
|
+
nodes: z10.array(CompiledMenuNodeSchema).max(MENU_MAX_NODES)
|
|
8823
|
+
}).strict();
|
|
8824
|
+
|
|
8545
8825
|
// src/contracts/semantic.ts
|
|
8546
|
-
import { z as
|
|
8547
|
-
var ConceptRelationshipSchema =
|
|
8826
|
+
import { z as z11 } from "zod";
|
|
8827
|
+
var ConceptRelationshipSchema = z11.object({
|
|
8548
8828
|
kind: ContractIdentifierSchema,
|
|
8549
8829
|
targetConceptId: ContractIdentifierSchema,
|
|
8550
|
-
cardinality:
|
|
8830
|
+
cardinality: z11.enum(["one", "optional", "many"])
|
|
8551
8831
|
}).strict();
|
|
8552
|
-
var ConceptDefinitionSchema =
|
|
8553
|
-
contract:
|
|
8832
|
+
var ConceptDefinitionSchema = z11.object({
|
|
8833
|
+
contract: z11.literal("ConceptDefinition"),
|
|
8554
8834
|
conceptId: ContractIdentifierSchema,
|
|
8555
8835
|
ownerRepo: ContractIdentifierSchema,
|
|
8556
|
-
displayName:
|
|
8557
|
-
description:
|
|
8836
|
+
displayName: z11.string().trim().min(1),
|
|
8837
|
+
description: z11.string().optional(),
|
|
8558
8838
|
schemaRef: ContractIdentifierSchema,
|
|
8559
8839
|
ontologyId: ContractIdentifierSchema.optional(),
|
|
8560
|
-
capabilityIds:
|
|
8561
|
-
commandNames:
|
|
8562
|
-
relationships:
|
|
8840
|
+
capabilityIds: z11.array(ContractIdentifierSchema).default([]),
|
|
8841
|
+
commandNames: z11.array(ContractIdentifierSchema).default([]),
|
|
8842
|
+
relationships: z11.array(ConceptRelationshipSchema).default([])
|
|
8563
8843
|
}).strict();
|
|
8564
|
-
var DomainCommandDefinitionSchema =
|
|
8565
|
-
contract:
|
|
8844
|
+
var DomainCommandDefinitionSchema = z11.object({
|
|
8845
|
+
contract: z11.literal("DomainCommandDefinition"),
|
|
8566
8846
|
commandName: ContractIdentifierSchema,
|
|
8567
8847
|
ownerRepo: ContractIdentifierSchema,
|
|
8568
|
-
displayName:
|
|
8569
|
-
description:
|
|
8570
|
-
targetKinds:
|
|
8848
|
+
displayName: z11.string().trim().min(1),
|
|
8849
|
+
description: z11.string().optional(),
|
|
8850
|
+
targetKinds: z11.array(ContractIdentifierSchema).min(1),
|
|
8571
8851
|
inputSchemaRef: ContractIdentifierSchema,
|
|
8572
8852
|
outputSchemaRef: ContractIdentifierSchema.optional(),
|
|
8573
|
-
requiredPermissionCodes:
|
|
8853
|
+
requiredPermissionCodes: z11.array(ContractIdentifierSchema).default([]),
|
|
8574
8854
|
handlerRef: EntityRefSchema,
|
|
8575
|
-
sideEffects:
|
|
8855
|
+
sideEffects: z11.array(z11.enum(["data-write", "execution", "navigation", "notification", "external-call"])).default([])
|
|
8576
8856
|
}).strict();
|
|
8577
|
-
var DomainCommandSchema =
|
|
8578
|
-
contract:
|
|
8857
|
+
var DomainCommandSchema = z11.object({
|
|
8858
|
+
contract: z11.literal("DomainCommand"),
|
|
8579
8859
|
commandId: ContractIdentifierSchema,
|
|
8580
8860
|
commandName: ContractIdentifierSchema,
|
|
8581
8861
|
requestId: ContractIdentifierSchema,
|
|
@@ -8583,29 +8863,30 @@ var DomainCommandSchema = z10.object({
|
|
|
8583
8863
|
idempotencyKey: ContractIdentifierSchema,
|
|
8584
8864
|
targetRef: EntityRefSchema,
|
|
8585
8865
|
actorRef: EntityRefSchema,
|
|
8586
|
-
source:
|
|
8587
|
-
product:
|
|
8866
|
+
source: z11.object({
|
|
8867
|
+
product: z11.enum(["studio", "kernel", "compute", "agent", "mcp", "service"]),
|
|
8588
8868
|
pageId: ContractIdentifierSchema.optional(),
|
|
8589
8869
|
capabilityId: ContractIdentifierSchema.optional()
|
|
8590
8870
|
}).strict(),
|
|
8591
8871
|
payload: JsonObjectSchema,
|
|
8592
8872
|
issuedAt: IsoDateTimeSchema
|
|
8593
8873
|
}).strict();
|
|
8594
|
-
var ProductDeclarationSchema =
|
|
8595
|
-
contract:
|
|
8874
|
+
var ProductDeclarationSchema = z11.object({
|
|
8875
|
+
contract: z11.literal("ProductDeclaration"),
|
|
8596
8876
|
declarationId: ContractIdentifierSchema,
|
|
8597
8877
|
ownerRepo: ContractIdentifierSchema,
|
|
8598
|
-
concepts:
|
|
8599
|
-
ontologies:
|
|
8600
|
-
projections:
|
|
8601
|
-
commands:
|
|
8602
|
-
capabilities:
|
|
8603
|
-
pages:
|
|
8604
|
-
|
|
8605
|
-
|
|
8878
|
+
concepts: z11.array(ConceptDefinitionSchema).default([]),
|
|
8879
|
+
ontologies: z11.array(OntologyDefinitionSchema).default([]),
|
|
8880
|
+
projections: z11.array(ProjectionSpecSchema).default([]),
|
|
8881
|
+
commands: z11.array(DomainCommandDefinitionSchema).default([]),
|
|
8882
|
+
capabilities: z11.array(CapabilityManifestSchema).default([]),
|
|
8883
|
+
pages: z11.array(PageDefinitionSchema).default([]),
|
|
8884
|
+
menus: z11.array(MenuDefinitionSchema).default([])
|
|
8885
|
+
}).strict();
|
|
8886
|
+
var DeclarationGraphEdgeSchema = z11.object({
|
|
8606
8887
|
from: EntityRefSchema,
|
|
8607
8888
|
to: EntityRefSchema,
|
|
8608
|
-
relation:
|
|
8889
|
+
relation: z11.enum([
|
|
8609
8890
|
"uses-ontology",
|
|
8610
8891
|
"uses-projection",
|
|
8611
8892
|
"uses-capability",
|
|
@@ -8613,25 +8894,25 @@ var DeclarationGraphEdgeSchema = z10.object({
|
|
|
8613
8894
|
"relates-to-concept"
|
|
8614
8895
|
])
|
|
8615
8896
|
}).strict();
|
|
8616
|
-
var ChangeImpactSchema =
|
|
8897
|
+
var ChangeImpactSchema = z11.object({
|
|
8617
8898
|
changedRef: EntityRefSchema,
|
|
8618
|
-
affectedRefs:
|
|
8619
|
-
reasons:
|
|
8899
|
+
affectedRefs: z11.array(EntityRefSchema),
|
|
8900
|
+
reasons: z11.array(ContractIdentifierSchema).min(1)
|
|
8620
8901
|
}).strict();
|
|
8621
|
-
var ChangeImpactGraphSchema =
|
|
8622
|
-
contract:
|
|
8902
|
+
var ChangeImpactGraphSchema = z11.object({
|
|
8903
|
+
contract: z11.literal("ChangeImpactGraph"),
|
|
8623
8904
|
declarationId: ContractIdentifierSchema,
|
|
8624
|
-
nodes:
|
|
8625
|
-
edges:
|
|
8626
|
-
impacts:
|
|
8905
|
+
nodes: z11.array(EntityRefSchema),
|
|
8906
|
+
edges: z11.array(DeclarationGraphEdgeSchema),
|
|
8907
|
+
impacts: z11.array(ChangeImpactSchema),
|
|
8627
8908
|
generatedAt: IsoDateTimeSchema
|
|
8628
8909
|
}).strict();
|
|
8629
8910
|
|
|
8630
8911
|
// src/contracts/tenant.ts
|
|
8631
|
-
import { z as
|
|
8912
|
+
import { z as z13 } from "zod";
|
|
8632
8913
|
|
|
8633
8914
|
// src/contracts/theme.ts
|
|
8634
|
-
import { z as
|
|
8915
|
+
import { z as z12 } from "zod";
|
|
8635
8916
|
|
|
8636
8917
|
// src/theme-tokens/core.ts
|
|
8637
8918
|
var import_ajv = __toESM(require_ajv());
|
|
@@ -10825,20 +11106,20 @@ var MONKEYS_REQUIRED_THEME_TOKEN_PATHS = Object.freeze({
|
|
|
10825
11106
|
});
|
|
10826
11107
|
|
|
10827
11108
|
// src/contracts/theme.ts
|
|
10828
|
-
var ThemeTokenTypeSchema =
|
|
10829
|
-
var ThemeTokenSchema =
|
|
11109
|
+
var ThemeTokenTypeSchema = z12.enum(THEME_TOKEN_TYPES);
|
|
11110
|
+
var ThemeTokenSchema = z12.record(z12.string(), z12.unknown()).superRefine((input, context) => {
|
|
10830
11111
|
const issues = validateThemeTokensDocumentStructure({ token: input });
|
|
10831
11112
|
for (const issue of issues) {
|
|
10832
11113
|
context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
|
|
10833
11114
|
}
|
|
10834
11115
|
});
|
|
10835
|
-
var ThemeTokenGroupSchema =
|
|
11116
|
+
var ThemeTokenGroupSchema = z12.record(z12.string(), z12.unknown()).superRefine((input, context) => {
|
|
10836
11117
|
const issues = validateThemeTokensDocumentStructure(input);
|
|
10837
11118
|
for (const issue of issues) {
|
|
10838
11119
|
context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
|
|
10839
11120
|
}
|
|
10840
11121
|
});
|
|
10841
|
-
var ThemeTokensSchema =
|
|
11122
|
+
var ThemeTokensSchema = z12.record(z12.string(), z12.unknown()).superRefine((input, context) => {
|
|
10842
11123
|
const issues = validateThemeTokensDocument(input);
|
|
10843
11124
|
for (const issue of issues) {
|
|
10844
11125
|
context.addIssue({ code: "custom", message: `${issue.path} ${issue.message}` });
|
|
@@ -10865,9 +11146,9 @@ var ResolvedThemeTokensSchema = ThemeTokensSchema.superRefine((input, context) =
|
|
|
10865
11146
|
});
|
|
10866
11147
|
|
|
10867
11148
|
// src/contracts/tenant.ts
|
|
10868
|
-
var DesignTokenFileSourceSchema =
|
|
10869
|
-
type:
|
|
10870
|
-
path:
|
|
11149
|
+
var DesignTokenFileSourceSchema = z13.object({
|
|
11150
|
+
type: z13.literal("file"),
|
|
11151
|
+
path: z13.string().trim().min(1).superRefine((source, context) => {
|
|
10871
11152
|
if (/^[a-z][a-z\d+.-]*:/i.test(source)) {
|
|
10872
11153
|
context.addIssue({
|
|
10873
11154
|
code: "custom",
|
|
@@ -10876,9 +11157,9 @@ var DesignTokenFileSourceSchema = z12.object({
|
|
|
10876
11157
|
}
|
|
10877
11158
|
})
|
|
10878
11159
|
}).strict();
|
|
10879
|
-
var DesignTokenUrlSourceSchema =
|
|
10880
|
-
type:
|
|
10881
|
-
url:
|
|
11160
|
+
var DesignTokenUrlSourceSchema = z13.object({
|
|
11161
|
+
type: z13.literal("url"),
|
|
11162
|
+
url: z13.string().trim().min(1).superRefine((source, context) => {
|
|
10882
11163
|
if (!/^https?:\/\//i.test(source)) {
|
|
10883
11164
|
context.addIssue({
|
|
10884
11165
|
code: "custom",
|
|
@@ -10887,94 +11168,94 @@ var DesignTokenUrlSourceSchema = z12.object({
|
|
|
10887
11168
|
}
|
|
10888
11169
|
})
|
|
10889
11170
|
}).strict();
|
|
10890
|
-
var DesignTokenInlineSourceSchema =
|
|
10891
|
-
type:
|
|
11171
|
+
var DesignTokenInlineSourceSchema = z13.object({
|
|
11172
|
+
type: z13.literal("inline"),
|
|
10892
11173
|
document: ThemeTokensSchema
|
|
10893
11174
|
}).strict();
|
|
10894
|
-
var DesignTokenSourceSchema =
|
|
11175
|
+
var DesignTokenSourceSchema = z13.discriminatedUnion("type", [
|
|
10895
11176
|
DesignTokenFileSourceSchema,
|
|
10896
11177
|
DesignTokenUrlSourceSchema,
|
|
10897
11178
|
DesignTokenInlineSourceSchema
|
|
10898
11179
|
]);
|
|
10899
|
-
var TenantDesignTokensConfigSchema =
|
|
11180
|
+
var TenantDesignTokensConfigSchema = z13.object({
|
|
10900
11181
|
/** Ordered tenant overrides. The backend always applies the product default first. */
|
|
10901
|
-
tokenSources:
|
|
11182
|
+
tokenSources: z13.array(DesignTokenSourceSchema)
|
|
10902
11183
|
}).strict();
|
|
10903
|
-
var TenantAuthBindingSchema =
|
|
10904
|
-
kind:
|
|
11184
|
+
var TenantAuthBindingSchema = z13.object({
|
|
11185
|
+
kind: z13.literal("auth-provider"),
|
|
10905
11186
|
providerId: ContractIdentifierSchema,
|
|
10906
11187
|
policyRef: ContractIdentifierSchema.optional()
|
|
10907
11188
|
}).strict();
|
|
10908
|
-
var TenantDataBindingSchema =
|
|
10909
|
-
|
|
10910
|
-
kind:
|
|
11189
|
+
var TenantDataBindingSchema = z13.discriminatedUnion("kind", [
|
|
11190
|
+
z13.object({
|
|
11191
|
+
kind: z13.literal("data-provider"),
|
|
10911
11192
|
providerId: ContractIdentifierSchema,
|
|
10912
11193
|
domainRef: ContractIdentifierSchema.optional()
|
|
10913
11194
|
}).strict(),
|
|
10914
|
-
|
|
10915
|
-
kind:
|
|
11195
|
+
z13.object({
|
|
11196
|
+
kind: z13.literal("projection"),
|
|
10916
11197
|
projectionRef: ContractIdentifierSchema,
|
|
10917
11198
|
domainRef: ContractIdentifierSchema.optional()
|
|
10918
11199
|
}).strict()
|
|
10919
11200
|
]);
|
|
10920
|
-
var TenantAuthBindingsSchema =
|
|
11201
|
+
var TenantAuthBindingsSchema = z13.record(
|
|
10921
11202
|
ContractIdentifierSchema,
|
|
10922
11203
|
TenantAuthBindingSchema
|
|
10923
11204
|
);
|
|
10924
|
-
var TenantDataBindingsSchema =
|
|
11205
|
+
var TenantDataBindingsSchema = z13.record(
|
|
10925
11206
|
ContractIdentifierSchema,
|
|
10926
11207
|
TenantDataBindingSchema
|
|
10927
11208
|
);
|
|
10928
|
-
var TenantTrendRadarSourceSchema =
|
|
11209
|
+
var TenantTrendRadarSourceSchema = z13.object({
|
|
10929
11210
|
ontologyId: ContractIdentifierSchema,
|
|
10930
11211
|
viewId: ContractIdentifierSchema
|
|
10931
11212
|
}).strict();
|
|
10932
|
-
var TenantTrendRadarSourcesSchema =
|
|
11213
|
+
var TenantTrendRadarSourcesSchema = z13.object({
|
|
10933
11214
|
hotwords: TenantTrendRadarSourceSchema.optional(),
|
|
10934
11215
|
brands: TenantTrendRadarSourceSchema.optional()
|
|
10935
11216
|
}).strict();
|
|
10936
|
-
var AssetVariantsSchema =
|
|
10937
|
-
light:
|
|
10938
|
-
dark:
|
|
11217
|
+
var AssetVariantsSchema = z13.object({
|
|
11218
|
+
light: z13.string().optional(),
|
|
11219
|
+
dark: z13.string().optional()
|
|
10939
11220
|
}).strict();
|
|
10940
11221
|
var LEGACY_CURRENT_USER_MENU_ITEM_IDS = ["dark-mode", "language", "settings", "logout"];
|
|
10941
11222
|
var CURRENT_USER_MENU_CONTROL_REFS = ["dark-mode", "language"];
|
|
10942
11223
|
var CURRENT_USER_MENU_ACTION_REFS = ["logout"];
|
|
10943
|
-
var CurrentUserMenuIdentifierSchema =
|
|
10944
|
-
var CurrentUserMenuDisplayTextSchema =
|
|
10945
|
-
|
|
10946
|
-
|
|
11224
|
+
var CurrentUserMenuIdentifierSchema = z13.string().trim().regex(/^[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/, "Expected a stable current-user menu identifier.");
|
|
11225
|
+
var CurrentUserMenuDisplayTextSchema = z13.union([
|
|
11226
|
+
z13.string().trim().min(1),
|
|
11227
|
+
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.")
|
|
10947
11228
|
]);
|
|
10948
|
-
var CurrentUserMenuNavigationItemSchema =
|
|
11229
|
+
var CurrentUserMenuNavigationItemSchema = z13.object({
|
|
10949
11230
|
id: CurrentUserMenuIdentifierSchema,
|
|
10950
|
-
kind:
|
|
11231
|
+
kind: z13.literal("navigation"),
|
|
10951
11232
|
ref: CurrentUserMenuIdentifierSchema
|
|
10952
11233
|
}).strict();
|
|
10953
|
-
var CurrentUserMenuControlItemSchema =
|
|
11234
|
+
var CurrentUserMenuControlItemSchema = z13.object({
|
|
10954
11235
|
id: CurrentUserMenuIdentifierSchema,
|
|
10955
|
-
kind:
|
|
10956
|
-
ref:
|
|
11236
|
+
kind: z13.literal("control"),
|
|
11237
|
+
ref: z13.enum(CURRENT_USER_MENU_CONTROL_REFS)
|
|
10957
11238
|
}).strict();
|
|
10958
|
-
var CurrentUserMenuActionItemSchema =
|
|
11239
|
+
var CurrentUserMenuActionItemSchema = z13.object({
|
|
10959
11240
|
id: CurrentUserMenuIdentifierSchema,
|
|
10960
|
-
kind:
|
|
10961
|
-
ref:
|
|
10962
|
-
tone:
|
|
11241
|
+
kind: z13.literal("action"),
|
|
11242
|
+
ref: z13.enum(CURRENT_USER_MENU_ACTION_REFS),
|
|
11243
|
+
tone: z13.enum(["default", "danger"]).optional()
|
|
10963
11244
|
}).strict();
|
|
10964
|
-
var CurrentUserMenuItemSchema =
|
|
11245
|
+
var CurrentUserMenuItemSchema = z13.discriminatedUnion("kind", [
|
|
10965
11246
|
CurrentUserMenuNavigationItemSchema,
|
|
10966
11247
|
CurrentUserMenuControlItemSchema,
|
|
10967
11248
|
CurrentUserMenuActionItemSchema
|
|
10968
11249
|
]);
|
|
10969
|
-
var CurrentUserMenuSectionSchema =
|
|
11250
|
+
var CurrentUserMenuSectionSchema = z13.object({
|
|
10970
11251
|
id: CurrentUserMenuIdentifierSchema,
|
|
10971
11252
|
label: CurrentUserMenuDisplayTextSchema.optional(),
|
|
10972
|
-
dividerBefore:
|
|
10973
|
-
items:
|
|
11253
|
+
dividerBefore: z13.boolean().optional(),
|
|
11254
|
+
items: z13.array(CurrentUserMenuItemSchema)
|
|
10974
11255
|
}).strict();
|
|
10975
|
-
var CurrentUserMenuConfigSchema =
|
|
10976
|
-
version:
|
|
10977
|
-
sections:
|
|
11256
|
+
var CurrentUserMenuConfigSchema = z13.object({
|
|
11257
|
+
version: z13.literal(1),
|
|
11258
|
+
sections: z13.array(CurrentUserMenuSectionSchema).max(20)
|
|
10978
11259
|
}).strict().superRefine((value, context) => {
|
|
10979
11260
|
const sectionIds = /* @__PURE__ */ new Set();
|
|
10980
11261
|
const itemIds = /* @__PURE__ */ new Set();
|
|
@@ -11008,7 +11289,7 @@ var CurrentUserMenuConfigSchema = z12.object({
|
|
|
11008
11289
|
});
|
|
11009
11290
|
}
|
|
11010
11291
|
});
|
|
11011
|
-
var LegacyCurrentUserMenuProfileSchema =
|
|
11292
|
+
var LegacyCurrentUserMenuProfileSchema = z13.array(z13.enum(LEGACY_CURRENT_USER_MENU_ITEM_IDS)).superRefine((value, context) => {
|
|
11012
11293
|
const seen = /* @__PURE__ */ new Set();
|
|
11013
11294
|
value.forEach((item, index) => {
|
|
11014
11295
|
if (seen.has(item)) {
|
|
@@ -11021,73 +11302,73 @@ var LegacyCurrentUserMenuProfileSchema = z12.array(z12.enum(LEGACY_CURRENT_USER_
|
|
|
11021
11302
|
seen.add(item);
|
|
11022
11303
|
});
|
|
11023
11304
|
});
|
|
11024
|
-
var CurrentUserMenuProfileSchema =
|
|
11025
|
-
|
|
11305
|
+
var CurrentUserMenuProfileSchema = z13.union([
|
|
11306
|
+
z13.literal("*"),
|
|
11026
11307
|
LegacyCurrentUserMenuProfileSchema,
|
|
11027
11308
|
CurrentUserMenuConfigSchema
|
|
11028
11309
|
]);
|
|
11029
|
-
var ThemeHeadbarSchema =
|
|
11030
|
-
theme:
|
|
11031
|
-
navPosition:
|
|
11032
|
-
actions:
|
|
11310
|
+
var ThemeHeadbarSchema = z13.object({
|
|
11311
|
+
theme: z13.enum(["card", "glassy", "ghost"]).optional(),
|
|
11312
|
+
navPosition: z13.enum(["left", "center", "right"]).optional(),
|
|
11313
|
+
actions: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]).optional(),
|
|
11033
11314
|
profile: CurrentUserMenuProfileSchema.optional(),
|
|
11034
|
-
showTeamQuota:
|
|
11315
|
+
showTeamQuota: z13.boolean().optional()
|
|
11035
11316
|
}).strict();
|
|
11036
|
-
var TenantHeadbarModuleLeafSchema =
|
|
11317
|
+
var TenantHeadbarModuleLeafSchema = z13.object({
|
|
11037
11318
|
id: ContractIdentifierSchema,
|
|
11038
|
-
extraInfo:
|
|
11039
|
-
displayName:
|
|
11040
|
-
visible:
|
|
11041
|
-
disabled:
|
|
11042
|
-
icon:
|
|
11043
|
-
showQuickSwitcher:
|
|
11044
|
-
showSidebar:
|
|
11045
|
-
showContentFrame:
|
|
11319
|
+
extraInfo: z13.boolean().optional(),
|
|
11320
|
+
displayName: z13.union([z13.string(), z13.record(LocaleIdentifierSchema, z13.string())]).optional(),
|
|
11321
|
+
visible: z13.boolean().optional(),
|
|
11322
|
+
disabled: z13.boolean().optional(),
|
|
11323
|
+
icon: z13.string().optional(),
|
|
11324
|
+
showQuickSwitcher: z13.boolean().optional(),
|
|
11325
|
+
showSidebar: z13.boolean().optional(),
|
|
11326
|
+
showContentFrame: z13.boolean().optional()
|
|
11046
11327
|
}).strict();
|
|
11047
11328
|
var TenantHeadbarModuleItemSchema = TenantHeadbarModuleLeafSchema.extend({
|
|
11048
|
-
children:
|
|
11049
|
-
}).strict();
|
|
11050
|
-
var KernelHeadbarSchema =
|
|
11051
|
-
theme:
|
|
11052
|
-
layoutMode:
|
|
11053
|
-
heightPx:
|
|
11054
|
-
navPosition:
|
|
11055
|
-
brandTitle:
|
|
11056
|
-
menuRadius:
|
|
11057
|
-
}).strict();
|
|
11058
|
-
var CustomIconSchema =
|
|
11059
|
-
color:
|
|
11060
|
-
url:
|
|
11061
|
-
type:
|
|
11062
|
-
hintTextColor:
|
|
11063
|
-
}).strict();
|
|
11064
|
-
var WorkbenchCustomerToolSchema =
|
|
11329
|
+
children: z13.array(TenantHeadbarModuleLeafSchema).optional()
|
|
11330
|
+
}).strict();
|
|
11331
|
+
var KernelHeadbarSchema = z13.object({
|
|
11332
|
+
theme: z13.literal("card").optional(),
|
|
11333
|
+
layoutMode: z13.enum(["boxed", "full-bleed"]).optional(),
|
|
11334
|
+
heightPx: z13.number().positive().optional(),
|
|
11335
|
+
navPosition: z13.enum(["left", "center", "right"]).optional(),
|
|
11336
|
+
brandTitle: z13.string().optional(),
|
|
11337
|
+
menuRadius: z13.enum(["default", "none", "sm", "md", "lg", "xl", "full"]).optional()
|
|
11338
|
+
}).strict();
|
|
11339
|
+
var CustomIconSchema = z13.object({
|
|
11340
|
+
color: z13.string().optional(),
|
|
11341
|
+
url: z13.string().optional(),
|
|
11342
|
+
type: z13.enum(["svg", "image"]).optional(),
|
|
11343
|
+
hintTextColor: z13.string().optional()
|
|
11344
|
+
}).strict();
|
|
11345
|
+
var WorkbenchCustomerToolSchema = z13.object({
|
|
11065
11346
|
id: ContractIdentifierSchema,
|
|
11066
|
-
label:
|
|
11067
|
-
fixed:
|
|
11347
|
+
label: z13.union([z13.string(), z13.record(LocaleIdentifierSchema, z13.string())]).optional(),
|
|
11348
|
+
fixed: z13.boolean().optional()
|
|
11068
11349
|
}).strict();
|
|
11069
|
-
var WorkbenchStudioOverrideSchema =
|
|
11070
|
-
studioName:
|
|
11071
|
-
dropdownToolsDefault:
|
|
11072
|
-
existingToolsDefault:
|
|
11073
|
-
historyColumnsDefault:
|
|
11350
|
+
var WorkbenchStudioOverrideSchema = z13.object({
|
|
11351
|
+
studioName: z13.string().trim().min(1),
|
|
11352
|
+
dropdownToolsDefault: z13.array(ContractIdentifierSchema).optional(),
|
|
11353
|
+
existingToolsDefault: z13.array(ContractIdentifierSchema).optional(),
|
|
11354
|
+
historyColumnsDefault: z13.number().int().min(1).max(6).optional()
|
|
11074
11355
|
}).strict();
|
|
11075
|
-
var TenantWorkbenchPageContextSchema =
|
|
11356
|
+
var TenantWorkbenchPageContextSchema = z13.object({
|
|
11076
11357
|
workflow: JsonObjectSchema.optional(),
|
|
11077
11358
|
agent: JsonObjectSchema.optional(),
|
|
11078
11359
|
agentId: ContractIdentifierSchema.optional(),
|
|
11079
11360
|
designProject: JsonObjectSchema.optional(),
|
|
11080
11361
|
designMetadataId: ContractIdentifierSchema.optional(),
|
|
11081
|
-
iframeUrl:
|
|
11082
|
-
info:
|
|
11362
|
+
iframeUrl: z13.string().trim().min(1).optional(),
|
|
11363
|
+
info: z13.object({
|
|
11083
11364
|
displayName: LocalizedTextSchema.optional(),
|
|
11084
11365
|
description: LocalizedTextSchema.optional(),
|
|
11085
|
-
iconUrl:
|
|
11366
|
+
iconUrl: z13.string().trim().min(1).optional()
|
|
11086
11367
|
}).strict().optional(),
|
|
11087
|
-
isBuiltinPinned:
|
|
11088
|
-
isBuiltinReadonly:
|
|
11368
|
+
isBuiltinPinned: z13.boolean().optional(),
|
|
11369
|
+
isBuiltinReadonly: z13.boolean().optional()
|
|
11089
11370
|
}).strict();
|
|
11090
|
-
var TenantWorkbenchPageEnvelopeSchema =
|
|
11371
|
+
var TenantWorkbenchPageEnvelopeSchema = z13.object({
|
|
11091
11372
|
definition: PageDefinitionSchema,
|
|
11092
11373
|
context: TenantWorkbenchPageContextSchema
|
|
11093
11374
|
}).strict().superRefine(({ definition }, context) => {
|
|
@@ -11120,56 +11401,56 @@ var TenantWorkbenchPageEnvelopeSchema = z12.object({
|
|
|
11120
11401
|
});
|
|
11121
11402
|
}
|
|
11122
11403
|
});
|
|
11123
|
-
var TenantWorkbenchPageGroupSchema =
|
|
11404
|
+
var TenantWorkbenchPageGroupSchema = z13.object({
|
|
11124
11405
|
id: ContractIdentifierSchema,
|
|
11125
|
-
pageIds:
|
|
11406
|
+
pageIds: z13.array(ContractIdentifierSchema),
|
|
11126
11407
|
displayName: LocalizedTextSchema,
|
|
11127
|
-
isBuiltIn:
|
|
11128
|
-
iconUrl:
|
|
11129
|
-
sortIndex:
|
|
11408
|
+
isBuiltIn: z13.boolean(),
|
|
11409
|
+
iconUrl: z13.string().optional(),
|
|
11410
|
+
sortIndex: z13.number().int().nullable().optional(),
|
|
11130
11411
|
presetRelationId: ContractIdentifierSchema.optional(),
|
|
11131
11412
|
relationKey: ContractIdentifierSchema.nullable().optional(),
|
|
11132
11413
|
studioId: ContractIdentifierSchema.optional()
|
|
11133
11414
|
}).strict();
|
|
11134
|
-
var TenantWorkbenchConfigSchema =
|
|
11135
|
-
pages:
|
|
11136
|
-
pageGroups:
|
|
11137
|
-
catalog:
|
|
11138
|
-
quickSwitcherMaxItems:
|
|
11139
|
-
defaultOrder:
|
|
11140
|
-
groups:
|
|
11141
|
-
pages:
|
|
11415
|
+
var TenantWorkbenchConfigSchema = z13.object({
|
|
11416
|
+
pages: z13.array(TenantWorkbenchPageEnvelopeSchema),
|
|
11417
|
+
pageGroups: z13.array(TenantWorkbenchPageGroupSchema),
|
|
11418
|
+
catalog: z13.object({ enabled: z13.boolean().optional(), defaultEntry: z13.boolean().optional() }).strict().optional(),
|
|
11419
|
+
quickSwitcherMaxItems: z13.number().int().nonnegative().optional(),
|
|
11420
|
+
defaultOrder: z13.object({
|
|
11421
|
+
groups: z13.array(ContractIdentifierSchema),
|
|
11422
|
+
pages: z13.record(ContractIdentifierSchema, z13.array(ContractIdentifierSchema))
|
|
11142
11423
|
}).strict().optional(),
|
|
11143
|
-
customers:
|
|
11144
|
-
dropdownToolsDefault:
|
|
11145
|
-
layoutManagerTools:
|
|
11146
|
-
studioTabsMode:
|
|
11147
|
-
historyWatermark:
|
|
11148
|
-
svgUrl:
|
|
11149
|
-
coverage:
|
|
11150
|
-
maxLongEdgeRatio:
|
|
11151
|
-
sizing:
|
|
11424
|
+
customers: z13.object({
|
|
11425
|
+
dropdownToolsDefault: z13.array(ContractIdentifierSchema).optional(),
|
|
11426
|
+
layoutManagerTools: z13.array(WorkbenchCustomerToolSchema).optional(),
|
|
11427
|
+
studioTabsMode: z13.enum(["dropdown", "tabs"]).optional(),
|
|
11428
|
+
historyWatermark: z13.object({
|
|
11429
|
+
svgUrl: z13.string().optional(),
|
|
11430
|
+
coverage: z13.array(z13.enum(["list", "detail", "download"])).optional(),
|
|
11431
|
+
maxLongEdgeRatio: z13.number().positive().optional(),
|
|
11432
|
+
sizing: z13.object({
|
|
11152
11433
|
mode: ContractIdentifierSchema,
|
|
11153
|
-
heightRatio:
|
|
11154
|
-
minHeightPx:
|
|
11155
|
-
maxHeightPx:
|
|
11434
|
+
heightRatio: z13.number().positive().optional(),
|
|
11435
|
+
minHeightPx: z13.number().nonnegative().optional(),
|
|
11436
|
+
maxHeightPx: z13.number().nonnegative().optional()
|
|
11156
11437
|
}).strict().optional(),
|
|
11157
|
-
enhance:
|
|
11158
|
-
enabled:
|
|
11159
|
-
backgroundLumaThreshold:
|
|
11160
|
-
stroke:
|
|
11161
|
-
color:
|
|
11162
|
-
opacity:
|
|
11163
|
-
widthRatio:
|
|
11164
|
-
blurRatio:
|
|
11165
|
-
steps:
|
|
11438
|
+
enhance: z13.object({
|
|
11439
|
+
enabled: z13.boolean().optional(),
|
|
11440
|
+
backgroundLumaThreshold: z13.number().min(0).max(1).optional(),
|
|
11441
|
+
stroke: z13.object({
|
|
11442
|
+
color: z13.string().optional(),
|
|
11443
|
+
opacity: z13.number().min(0).max(1).optional(),
|
|
11444
|
+
widthRatio: z13.number().nonnegative().optional(),
|
|
11445
|
+
blurRatio: z13.number().nonnegative().optional(),
|
|
11446
|
+
steps: z13.number().int().positive().optional()
|
|
11166
11447
|
}).strict().optional()
|
|
11167
11448
|
}).strict().optional()
|
|
11168
11449
|
}).strict().optional(),
|
|
11169
|
-
layoutManagerEnabled:
|
|
11170
|
-
existingToolsDefault:
|
|
11171
|
-
historyColumnsDefault:
|
|
11172
|
-
studioOverrides:
|
|
11450
|
+
layoutManagerEnabled: z13.boolean().optional(),
|
|
11451
|
+
existingToolsDefault: z13.array(ContractIdentifierSchema).optional(),
|
|
11452
|
+
historyColumnsDefault: z13.number().int().min(1).max(6).optional(),
|
|
11453
|
+
studioOverrides: z13.array(WorkbenchStudioOverrideSchema).optional()
|
|
11173
11454
|
}).strict().optional()
|
|
11174
11455
|
}).strict().superRefine(({ pages, pageGroups }, context) => {
|
|
11175
11456
|
const pageIds = pages.map(({ definition }) => definition.pageId);
|
|
@@ -11193,38 +11474,38 @@ var TenantWorkbenchConfigSchema = z12.object({
|
|
|
11193
11474
|
});
|
|
11194
11475
|
});
|
|
11195
11476
|
});
|
|
11196
|
-
var LoginPageSchema =
|
|
11197
|
-
background:
|
|
11198
|
-
logo:
|
|
11199
|
-
url:
|
|
11200
|
-
lightUrl:
|
|
11201
|
-
darkUrl:
|
|
11202
|
-
position:
|
|
11203
|
-
scale:
|
|
11477
|
+
var LoginPageSchema = z13.object({
|
|
11478
|
+
background: z13.object({ imageUrl: z13.string().optional(), gradient: z13.string().optional() }).strict().optional(),
|
|
11479
|
+
logo: z13.object({
|
|
11480
|
+
url: z13.string().optional(),
|
|
11481
|
+
lightUrl: z13.string().optional(),
|
|
11482
|
+
darkUrl: z13.string().optional(),
|
|
11483
|
+
position: z13.enum(["top", "middle", "bottom"]).optional(),
|
|
11484
|
+
scale: z13.number().positive().optional()
|
|
11204
11485
|
}).strict().optional(),
|
|
11205
|
-
customCss:
|
|
11486
|
+
customCss: z13.string().optional()
|
|
11206
11487
|
}).strict();
|
|
11207
11488
|
var LandingPageHeadbarConfigShape = {
|
|
11208
|
-
headbarMode:
|
|
11489
|
+
headbarMode: z13.enum(["shared", "hidden"]).optional()
|
|
11209
11490
|
};
|
|
11210
|
-
var LandingPageDefaultConfigSchema =
|
|
11211
|
-
mode:
|
|
11491
|
+
var LandingPageDefaultConfigSchema = z13.object({
|
|
11492
|
+
mode: z13.literal("default"),
|
|
11212
11493
|
...LandingPageHeadbarConfigShape
|
|
11213
11494
|
}).strict();
|
|
11214
|
-
var LandingPageMarkdownConfigSchema =
|
|
11215
|
-
mode:
|
|
11216
|
-
content:
|
|
11495
|
+
var LandingPageMarkdownConfigSchema = z13.object({
|
|
11496
|
+
mode: z13.literal("markdown"),
|
|
11497
|
+
content: z13.string(),
|
|
11217
11498
|
...LandingPageHeadbarConfigShape
|
|
11218
11499
|
}).strict();
|
|
11219
|
-
var LandingPageHtmlConfigSchema =
|
|
11220
|
-
mode:
|
|
11221
|
-
content:
|
|
11500
|
+
var LandingPageHtmlConfigSchema = z13.object({
|
|
11501
|
+
mode: z13.literal("html"),
|
|
11502
|
+
content: z13.string(),
|
|
11222
11503
|
...LandingPageHeadbarConfigShape
|
|
11223
11504
|
}).strict();
|
|
11224
|
-
var LandingPageIframeConfigSchema =
|
|
11225
|
-
mode:
|
|
11505
|
+
var LandingPageIframeConfigSchema = z13.object({
|
|
11506
|
+
mode: z13.literal("iframe"),
|
|
11226
11507
|
...LandingPageHeadbarConfigShape,
|
|
11227
|
-
url:
|
|
11508
|
+
url: z13.string().refine((value) => {
|
|
11228
11509
|
if (/^\/(?!\/)/.test(value)) {
|
|
11229
11510
|
return !value.includes("\\");
|
|
11230
11511
|
}
|
|
@@ -11236,422 +11517,424 @@ var LandingPageIframeConfigSchema = z12.object({
|
|
|
11236
11517
|
}
|
|
11237
11518
|
}, "Landing page iframe URL must use a root-relative path or HTTP(S) without embedded credentials.")
|
|
11238
11519
|
}).strict();
|
|
11239
|
-
var TenantLandingPageConfigSchema =
|
|
11520
|
+
var TenantLandingPageConfigSchema = z13.discriminatedUnion("mode", [
|
|
11240
11521
|
LandingPageDefaultConfigSchema,
|
|
11241
11522
|
LandingPageMarkdownConfigSchema,
|
|
11242
11523
|
LandingPageHtmlConfigSchema,
|
|
11243
11524
|
LandingPageIframeConfigSchema
|
|
11244
11525
|
]);
|
|
11245
|
-
var TenantApplicationConfigSchema =
|
|
11246
|
-
theme:
|
|
11247
|
-
id:
|
|
11248
|
-
name:
|
|
11249
|
-
title:
|
|
11526
|
+
var TenantApplicationConfigSchema = z13.object({
|
|
11527
|
+
theme: z13.object({
|
|
11528
|
+
id: z13.string().optional(),
|
|
11529
|
+
name: z13.string().optional(),
|
|
11530
|
+
title: z13.string().optional(),
|
|
11250
11531
|
favicon: AssetVariantsSchema.optional(),
|
|
11251
11532
|
logo: AssetVariantsSchema.optional(),
|
|
11252
|
-
pwaIcon:
|
|
11253
|
-
form:
|
|
11254
|
-
toast:
|
|
11255
|
-
position:
|
|
11533
|
+
pwaIcon: z13.string().optional(),
|
|
11534
|
+
form: z13.object({ variant: z13.enum(["bento", "ghost"]) }).strict().optional(),
|
|
11535
|
+
toast: z13.object({
|
|
11536
|
+
position: z13.enum(["top-right", "top-left", "bottom-right", "bottom-left", "top-center", "bottom-center"])
|
|
11256
11537
|
}).strict().optional(),
|
|
11257
|
-
icons:
|
|
11258
|
-
views:
|
|
11259
|
-
form:
|
|
11260
|
-
toast:
|
|
11261
|
-
progress:
|
|
11262
|
-
onlyResult:
|
|
11263
|
-
tabular:
|
|
11538
|
+
icons: z13.object({ error: CustomIconSchema.optional(), empty: CustomIconSchema.optional() }).strict().optional(),
|
|
11539
|
+
views: z13.object({
|
|
11540
|
+
form: z13.object({
|
|
11541
|
+
toast: z13.object({ afterCreate: z13.boolean(), afterDelete: z13.boolean() }).strict(),
|
|
11542
|
+
progress: z13.enum(["estimate", "infinite"]),
|
|
11543
|
+
onlyResult: z13.boolean(),
|
|
11544
|
+
tabular: z13.object({ theme: z13.enum(["default", "tentiary", "primary"]) }).strict()
|
|
11264
11545
|
}).strict()
|
|
11265
11546
|
}).strict().optional(),
|
|
11266
11547
|
loginPage: LoginPageSchema.optional(),
|
|
11267
|
-
extraLanguageURL:
|
|
11268
|
-
hideSpaceHeader:
|
|
11269
|
-
showSidebarTeamSelector:
|
|
11270
|
-
showWorkbenchSidebar:
|
|
11271
|
-
workbenchViewTheme:
|
|
11272
|
-
defaults:
|
|
11273
|
-
showFormInImageDetail:
|
|
11274
|
-
darkMode:
|
|
11275
|
-
language:
|
|
11276
|
-
showDarkModeToggle:
|
|
11277
|
-
showLanguageToggle:
|
|
11548
|
+
extraLanguageURL: z13.record(z13.string(), z13.string()).optional(),
|
|
11549
|
+
hideSpaceHeader: z13.boolean().optional(),
|
|
11550
|
+
showSidebarTeamSelector: z13.boolean().optional(),
|
|
11551
|
+
showWorkbenchSidebar: z13.boolean().optional(),
|
|
11552
|
+
workbenchViewTheme: z13.enum(["default", "bsd-blue"]).optional(),
|
|
11553
|
+
defaults: z13.object({
|
|
11554
|
+
showFormInImageDetail: z13.boolean().optional(),
|
|
11555
|
+
darkMode: z13.enum(["light", "dark", "auto"]).optional(),
|
|
11556
|
+
language: z13.enum(["en-US", "zh-CN", "ja-JP"]).optional(),
|
|
11557
|
+
showDarkModeToggle: z13.boolean().optional(),
|
|
11558
|
+
showLanguageToggle: z13.boolean().optional()
|
|
11278
11559
|
}).strict().optional(),
|
|
11279
|
-
modules:
|
|
11280
|
-
monkeysSpaceSidebar:
|
|
11281
|
-
monkeysSpaceHeadbar:
|
|
11282
|
-
|
|
11283
|
-
|
|
11560
|
+
modules: z13.object({
|
|
11561
|
+
monkeysSpaceSidebar: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]).optional(),
|
|
11562
|
+
monkeysSpaceHeadbar: z13.union([
|
|
11563
|
+
z13.literal("*"),
|
|
11564
|
+
z13.array(TenantHeadbarModuleItemSchema)
|
|
11284
11565
|
]).optional(),
|
|
11285
|
-
settingsSidebar:
|
|
11566
|
+
settingsSidebar: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]).optional()
|
|
11286
11567
|
}).strict().optional(),
|
|
11287
11568
|
headbar: ThemeHeadbarSchema.optional(),
|
|
11288
|
-
kernelLayout:
|
|
11289
|
-
navigationMode:
|
|
11290
|
-
allowNavigationModeSwitch:
|
|
11569
|
+
kernelLayout: z13.object({
|
|
11570
|
+
navigationMode: z13.enum(["sidebar", "topbar"]).optional(),
|
|
11571
|
+
allowNavigationModeSwitch: z13.boolean().optional(),
|
|
11291
11572
|
headbar: KernelHeadbarSchema.optional()
|
|
11292
11573
|
}).strict().optional(),
|
|
11293
|
-
paginationPosition:
|
|
11294
|
-
ugcViewIconOnlyMode:
|
|
11295
|
-
workflowPreviewExecutionGrid:
|
|
11296
|
-
selectionModeDisplayType:
|
|
11297
|
-
clickBehavior:
|
|
11298
|
-
showErrorFilter:
|
|
11299
|
-
displayType:
|
|
11300
|
-
showDetailButton:
|
|
11574
|
+
paginationPosition: z13.enum(["left", "right"]).optional(),
|
|
11575
|
+
ugcViewIconOnlyMode: z13.boolean().optional(),
|
|
11576
|
+
workflowPreviewExecutionGrid: z13.object({
|
|
11577
|
+
selectionModeDisplayType: z13.enum(["operation-button", "dropdown-menu"]).optional(),
|
|
11578
|
+
clickBehavior: z13.enum(["preview", "select", "fill-form", "none"]).optional(),
|
|
11579
|
+
showErrorFilter: z13.boolean().optional(),
|
|
11580
|
+
displayType: z13.enum(["grid", "masonry"]).optional(),
|
|
11581
|
+
showDetailButton: z13.boolean().optional()
|
|
11301
11582
|
}).strict().optional(),
|
|
11302
|
-
workbenchSidebarDefaultOpen:
|
|
11303
|
-
workbenchSidebarMoreAction:
|
|
11304
|
-
workbenchSidebarApart:
|
|
11305
|
-
workbenchSidebarToggleGroupDetail:
|
|
11306
|
-
workbenchSidebarViewType:
|
|
11307
|
-
workbenchSidebarFormViewEmbed:
|
|
11308
|
-
workbenchSidebarModernMode:
|
|
11309
|
-
ugc:
|
|
11310
|
-
uniImagePreview:
|
|
11311
|
-
imagePreviewStyle:
|
|
11312
|
-
teamAsUser:
|
|
11313
|
-
themeMode:
|
|
11314
|
-
density:
|
|
11315
|
-
pageZoom:
|
|
11316
|
-
miniMode:
|
|
11317
|
-
workflow:
|
|
11318
|
-
historyResult:
|
|
11319
|
-
uploader:
|
|
11320
|
-
orientation:
|
|
11321
|
-
pasteButton:
|
|
11322
|
-
statusText:
|
|
11583
|
+
workbenchSidebarDefaultOpen: z13.boolean().optional(),
|
|
11584
|
+
workbenchSidebarMoreAction: z13.boolean().optional(),
|
|
11585
|
+
workbenchSidebarApart: z13.boolean().optional(),
|
|
11586
|
+
workbenchSidebarToggleGroupDetail: z13.boolean().optional(),
|
|
11587
|
+
workbenchSidebarViewType: z13.boolean().optional(),
|
|
11588
|
+
workbenchSidebarFormViewEmbed: z13.boolean().optional(),
|
|
11589
|
+
workbenchSidebarModernMode: z13.boolean().optional(),
|
|
11590
|
+
ugc: z13.object({ onItemClick: z13.boolean(), subtitle: z13.boolean().optional() }).strict().optional(),
|
|
11591
|
+
uniImagePreview: z13.boolean().optional(),
|
|
11592
|
+
imagePreviewStyle: z13.union([z13.literal(false), z13.enum(["simple", "normal", "uni"])]).optional(),
|
|
11593
|
+
teamAsUser: z13.boolean().optional(),
|
|
11594
|
+
themeMode: z13.enum(["shadow", "border"]).optional(),
|
|
11595
|
+
density: z13.enum(["compact", "default", "comfortable"]).optional(),
|
|
11596
|
+
pageZoom: z13.number().positive().optional(),
|
|
11597
|
+
miniMode: z13.object({ showPreviewViewExecutionResultGrid: z13.boolean() }).strict().optional(),
|
|
11598
|
+
workflow: z13.object({ allowConcurrentRuns: z13.boolean() }).strict().optional(),
|
|
11599
|
+
historyResult: z13.object({ display: z13.boolean() }).strict().optional(),
|
|
11600
|
+
uploader: z13.object({
|
|
11601
|
+
orientation: z13.enum(["vertical", "horizontal"]),
|
|
11602
|
+
pasteButton: z13.boolean(),
|
|
11603
|
+
statusText: z13.boolean()
|
|
11323
11604
|
}).strict().optional(),
|
|
11324
|
-
designProjects:
|
|
11325
|
-
oneOnOne:
|
|
11326
|
-
newTabOpenBoard:
|
|
11327
|
-
defaultShowGrid:
|
|
11328
|
-
createDefaultFrame:
|
|
11329
|
-
showPageMenu:
|
|
11330
|
-
showMainMenu:
|
|
11331
|
-
showStylePanel:
|
|
11332
|
-
showToolbar:
|
|
11333
|
-
toolbarPosition:
|
|
11334
|
-
showContextMenu:
|
|
11335
|
-
showActionsMenu:
|
|
11336
|
-
showPageAndLayerSidebar:
|
|
11337
|
-
showBoardOperationSidebar:
|
|
11338
|
-
showMiniToolsToolbar:
|
|
11339
|
-
showRightSidebar:
|
|
11340
|
-
showRealtimeDrawing:
|
|
11341
|
-
showWorkflow:
|
|
11342
|
-
showVersionManager:
|
|
11343
|
-
showAgent:
|
|
11344
|
-
AgentTools:
|
|
11605
|
+
designProjects: z13.object({
|
|
11606
|
+
oneOnOne: z13.boolean(),
|
|
11607
|
+
newTabOpenBoard: z13.boolean(),
|
|
11608
|
+
defaultShowGrid: z13.boolean().optional(),
|
|
11609
|
+
createDefaultFrame: z13.boolean(),
|
|
11610
|
+
showPageMenu: z13.boolean(),
|
|
11611
|
+
showMainMenu: z13.boolean(),
|
|
11612
|
+
showStylePanel: z13.boolean(),
|
|
11613
|
+
showToolbar: z13.boolean(),
|
|
11614
|
+
toolbarPosition: z13.enum(["bottom", "left"]).optional(),
|
|
11615
|
+
showContextMenu: z13.boolean(),
|
|
11616
|
+
showActionsMenu: z13.boolean(),
|
|
11617
|
+
showPageAndLayerSidebar: z13.boolean().optional(),
|
|
11618
|
+
showBoardOperationSidebar: z13.boolean().optional(),
|
|
11619
|
+
showMiniToolsToolbar: z13.boolean().optional(),
|
|
11620
|
+
showRightSidebar: z13.boolean().optional(),
|
|
11621
|
+
showRealtimeDrawing: z13.boolean().optional(),
|
|
11622
|
+
showWorkflow: z13.boolean().optional(),
|
|
11623
|
+
showVersionManager: z13.boolean().optional(),
|
|
11624
|
+
showAgent: z13.boolean().optional(),
|
|
11625
|
+
AgentTools: z13.array(ContractIdentifierSchema).optional()
|
|
11345
11626
|
}).strict().optional(),
|
|
11346
11627
|
workbench: TenantWorkbenchConfigSchema.optional(),
|
|
11347
|
-
visionProWorkflows:
|
|
11348
|
-
initTeam:
|
|
11349
|
-
imageThumbnail:
|
|
11350
|
-
pages:
|
|
11351
|
-
allowPageKeys:
|
|
11628
|
+
visionProWorkflows: z13.array(ContractIdentifierSchema).optional(),
|
|
11629
|
+
initTeam: z13.boolean().optional(),
|
|
11630
|
+
imageThumbnail: z13.boolean().optional(),
|
|
11631
|
+
pages: z13.object({
|
|
11632
|
+
allowPageKeys: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]),
|
|
11352
11633
|
defaultPageKey: ContractIdentifierSchema.optional()
|
|
11353
11634
|
}).strict().optional(),
|
|
11354
|
-
agent:
|
|
11635
|
+
agent: z13.object({
|
|
11355
11636
|
logo: AssetVariantsSchema.optional(),
|
|
11356
|
-
brandDisplayMode:
|
|
11357
|
-
density:
|
|
11637
|
+
brandDisplayMode: z13.enum(["auto", "logo-only", "logo-name", "name-only"]).optional(),
|
|
11638
|
+
density: z13.enum(["compact", "default", "comfortable"]).optional()
|
|
11358
11639
|
}).strict().optional()
|
|
11359
11640
|
}).strict(),
|
|
11360
11641
|
landingPage: TenantLandingPageConfigSchema.optional(),
|
|
11361
|
-
auth:
|
|
11362
|
-
enabled:
|
|
11363
|
-
oidc:
|
|
11364
|
-
password:
|
|
11365
|
-
hideAuthToast:
|
|
11366
|
-
autoReload:
|
|
11367
|
-
defaultOtherTeam:
|
|
11642
|
+
auth: z13.object({
|
|
11643
|
+
enabled: z13.array(ContractIdentifierSchema).default([]),
|
|
11644
|
+
oidc: z13.object({ buttonText: z13.string().optional(), autoSignin: z13.boolean().optional() }).strict().optional(),
|
|
11645
|
+
password: z13.object({ disableAutoRegister: z13.boolean().optional() }).strict().optional(),
|
|
11646
|
+
hideAuthToast: z13.boolean().optional(),
|
|
11647
|
+
autoReload: z13.boolean().optional(),
|
|
11648
|
+
defaultOtherTeam: z13.boolean().optional()
|
|
11368
11649
|
}).strict(),
|
|
11369
|
-
endpoints:
|
|
11370
|
-
module:
|
|
11371
|
-
behavior:
|
|
11372
|
-
clearWorkflowFormStorageAfterUpdate:
|
|
11373
|
-
autoApproveOAuth:
|
|
11374
|
-
rememberWorkflowModelSelection:
|
|
11650
|
+
endpoints: z13.record(ContractIdentifierSchema, z13.string()),
|
|
11651
|
+
module: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]),
|
|
11652
|
+
behavior: z13.object({
|
|
11653
|
+
clearWorkflowFormStorageAfterUpdate: z13.boolean().optional(),
|
|
11654
|
+
autoApproveOAuth: z13.boolean().optional(),
|
|
11655
|
+
rememberWorkflowModelSelection: z13.boolean().optional()
|
|
11375
11656
|
}).strict(),
|
|
11376
|
-
dataManagement:
|
|
11377
|
-
favoriteOntologyId:
|
|
11378
|
-
pairedOntologyId:
|
|
11379
|
-
galleryOntologyIds:
|
|
11380
|
-
galleryOntologyId:
|
|
11381
|
-
dataBrowserDefaultOntologyId:
|
|
11382
|
-
workflowResultOntologyId:
|
|
11383
|
-
homeAdvertisement:
|
|
11657
|
+
dataManagement: z13.object({
|
|
11658
|
+
favoriteOntologyId: z13.string().optional(),
|
|
11659
|
+
pairedOntologyId: z13.string().optional(),
|
|
11660
|
+
galleryOntologyIds: z13.array(ContractIdentifierSchema).max(20).optional(),
|
|
11661
|
+
galleryOntologyId: z13.string().optional(),
|
|
11662
|
+
dataBrowserDefaultOntologyId: z13.string().optional(),
|
|
11663
|
+
workflowResultOntologyId: z13.string().optional(),
|
|
11664
|
+
homeAdvertisement: z13.object({
|
|
11384
11665
|
ontologyId: ContractIdentifierSchema,
|
|
11385
11666
|
viewId: ContractIdentifierSchema.optional(),
|
|
11386
|
-
viewType:
|
|
11667
|
+
viewType: z13.enum(["filter", "container", "share_link"]).optional(),
|
|
11387
11668
|
teamId: ContractIdentifierSchema.optional(),
|
|
11388
|
-
teamOnly:
|
|
11389
|
-
pageSize:
|
|
11390
|
-
sortBy:
|
|
11391
|
-
sortOrder:
|
|
11392
|
-
fieldMap:
|
|
11393
|
-
columnIds:
|
|
11669
|
+
teamOnly: z13.boolean().optional(),
|
|
11670
|
+
pageSize: z13.number().int().positive().optional(),
|
|
11671
|
+
sortBy: z13.enum(["pin_order", "asset_id", "updated_timestamp", "created_timestamp"]).optional(),
|
|
11672
|
+
sortOrder: z13.enum(["asc", "desc"]).optional(),
|
|
11673
|
+
fieldMap: z13.record(z13.string(), z13.string()).optional(),
|
|
11674
|
+
columnIds: z13.record(z13.string(), z13.string()).optional()
|
|
11394
11675
|
}).strict().optional(),
|
|
11395
|
-
homeTrendAssistant:
|
|
11676
|
+
homeTrendAssistant: z13.object({
|
|
11396
11677
|
ontologyId: ContractIdentifierSchema.optional(),
|
|
11397
11678
|
viewId: ContractIdentifierSchema.optional(),
|
|
11398
11679
|
viewInstanceId: ContractIdentifierSchema.optional(),
|
|
11399
|
-
viewName:
|
|
11680
|
+
viewName: z13.string().optional(),
|
|
11400
11681
|
teamId: ContractIdentifierSchema.optional(),
|
|
11401
11682
|
designOptionsWorkflowId: ContractIdentifierSchema.optional(),
|
|
11402
|
-
tep:
|
|
11403
|
-
runtime:
|
|
11683
|
+
tep: z13.object({ baseUrl: z13.string().optional(), timeoutMs: z13.number().int().positive().optional() }).strict().optional(),
|
|
11684
|
+
runtime: z13.object({ appId: ContractIdentifierSchema, tepBaseUrlConfigured: z13.boolean(), tepAuthorizationConfigured: z13.boolean(), tepCookieConfigured: z13.boolean() }).strict().optional()
|
|
11404
11685
|
}).strict().optional(),
|
|
11405
11686
|
trendRadar: TenantTrendRadarSourcesSchema.optional(),
|
|
11406
|
-
sharing:
|
|
11407
|
-
silentViewLinks:
|
|
11408
|
-
shareAccess:
|
|
11409
|
-
shareDialog:
|
|
11410
|
-
audience:
|
|
11411
|
-
accessLevel:
|
|
11412
|
-
viewTreeDelivery:
|
|
11687
|
+
sharing: z13.object({
|
|
11688
|
+
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(),
|
|
11689
|
+
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(),
|
|
11690
|
+
shareDialog: z13.object({
|
|
11691
|
+
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(),
|
|
11692
|
+
accessLevel: z13.object({ enabled: z13.boolean().optional(), allowed: z13.array(z13.enum(["read", "write"])).optional(), default: z13.enum(["read", "write"]).optional() }).strict().optional(),
|
|
11693
|
+
viewTreeDelivery: z13.object({ enabled: z13.boolean().optional(), allowed: z13.array(z13.enum(["manual", "auto"])).optional(), default: z13.enum(["manual", "auto"]).optional() }).strict().optional()
|
|
11413
11694
|
}).strict().optional()
|
|
11414
11695
|
}).strict().optional()
|
|
11415
11696
|
}).strict().optional(),
|
|
11416
|
-
compute:
|
|
11417
|
-
integrations:
|
|
11418
|
-
harbor:
|
|
11419
|
-
gitlab:
|
|
11420
|
-
kubernetes:
|
|
11697
|
+
compute: z13.object({
|
|
11698
|
+
integrations: z13.object({
|
|
11699
|
+
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(),
|
|
11700
|
+
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(),
|
|
11701
|
+
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()
|
|
11421
11702
|
}).strict().optional()
|
|
11422
11703
|
}).strict().optional(),
|
|
11423
|
-
data:
|
|
11424
|
-
storage:
|
|
11425
|
-
presignMode:
|
|
11426
|
-
presign:
|
|
11427
|
-
expiresInSeconds:
|
|
11428
|
-
buckets:
|
|
11429
|
-
|
|
11704
|
+
data: z13.object({}).strict().optional(),
|
|
11705
|
+
storage: z13.object({
|
|
11706
|
+
presignMode: z13.enum(["frontend", "backend", "both"]).optional(),
|
|
11707
|
+
presign: z13.object({
|
|
11708
|
+
expiresInSeconds: z13.number().int().positive(),
|
|
11709
|
+
buckets: z13.array(
|
|
11710
|
+
z13.object({
|
|
11430
11711
|
id: ContractIdentifierSchema,
|
|
11431
11712
|
provider: ContractIdentifierSchema,
|
|
11432
11713
|
preferredUrlPatternId: ContractIdentifierSchema,
|
|
11433
|
-
urlPatterns:
|
|
11434
|
-
|
|
11714
|
+
urlPatterns: z13.array(
|
|
11715
|
+
z13.object({
|
|
11435
11716
|
id: ContractIdentifierSchema,
|
|
11436
|
-
type:
|
|
11437
|
-
hostname:
|
|
11438
|
-
preferred:
|
|
11439
|
-
bucketSegment:
|
|
11717
|
+
type: z13.enum(["bucket-hostname", "provider-hostname"]),
|
|
11718
|
+
hostname: z13.string().trim().min(1),
|
|
11719
|
+
preferred: z13.boolean().optional(),
|
|
11720
|
+
bucketSegment: z13.string().optional()
|
|
11440
11721
|
}).strict()
|
|
11441
11722
|
)
|
|
11442
11723
|
}).strict()
|
|
11443
11724
|
)
|
|
11444
11725
|
}).strict().optional()
|
|
11445
11726
|
}).strict().optional(),
|
|
11446
|
-
monkeyData:
|
|
11727
|
+
monkeyData: z13.object({ baseUrl: z13.string().optional() }).strict().optional()
|
|
11447
11728
|
}).strict();
|
|
11448
|
-
var TenantProductConfigSchema =
|
|
11449
|
-
contract:
|
|
11729
|
+
var TenantProductConfigSchema = z13.object({
|
|
11730
|
+
contract: z13.literal("TenantProductConfig"),
|
|
11450
11731
|
tenantId: ContractIdentifierSchema,
|
|
11451
11732
|
appId: ContractIdentifierSchema,
|
|
11452
11733
|
environment: ContractIdentifierSchema,
|
|
11453
11734
|
designTokens: TenantDesignTokensConfigSchema,
|
|
11454
|
-
moduleRefs:
|
|
11455
|
-
pageRefs:
|
|
11456
|
-
featureFlags:
|
|
11735
|
+
moduleRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11736
|
+
pageRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11737
|
+
featureFlags: z13.record(z13.string(), z13.boolean()).default({}),
|
|
11457
11738
|
authBinding: TenantAuthBindingsSchema,
|
|
11458
11739
|
dataBinding: TenantDataBindingsSchema,
|
|
11459
|
-
sourceMap:
|
|
11460
|
-
warnings:
|
|
11740
|
+
sourceMap: z13.record(z13.string(), ContractIdentifierSchema),
|
|
11741
|
+
warnings: z13.array(z13.string()).default([]),
|
|
11742
|
+
menus: MenuDefinitionSetSchema.optional(),
|
|
11461
11743
|
applicationConfig: TenantApplicationConfigSchema
|
|
11462
11744
|
}).strict();
|
|
11463
|
-
var TenantRuntimeConfigSchema =
|
|
11464
|
-
contract:
|
|
11745
|
+
var TenantRuntimeConfigSchema = z13.object({
|
|
11746
|
+
contract: z13.literal("TenantRuntimeConfig"),
|
|
11465
11747
|
tenantId: ContractIdentifierSchema,
|
|
11466
11748
|
appId: ContractIdentifierSchema,
|
|
11467
11749
|
environment: ContractIdentifierSchema,
|
|
11468
11750
|
designTokens: ResolvedThemeTokensSchema,
|
|
11469
|
-
moduleRefs:
|
|
11470
|
-
pageRefs:
|
|
11471
|
-
featureFlags:
|
|
11751
|
+
moduleRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11752
|
+
pageRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11753
|
+
featureFlags: z13.record(z13.string(), z13.boolean()).default({}),
|
|
11472
11754
|
authBinding: TenantAuthBindingsSchema,
|
|
11473
11755
|
dataBinding: TenantDataBindingsSchema,
|
|
11474
|
-
sourceMap:
|
|
11475
|
-
warnings:
|
|
11756
|
+
sourceMap: z13.record(z13.string(), ContractIdentifierSchema),
|
|
11757
|
+
warnings: z13.array(z13.string()).default([]),
|
|
11758
|
+
menuBundle: MenuRuntimeBundleSchema.optional(),
|
|
11476
11759
|
applicationConfig: TenantApplicationConfigSchema
|
|
11477
11760
|
}).strict();
|
|
11478
11761
|
|
|
11479
11762
|
// src/contracts/trend.ts
|
|
11480
|
-
import { z as
|
|
11481
|
-
var RadarDecisionMetricsSchema =
|
|
11482
|
-
currentSales:
|
|
11483
|
-
forecastSales:
|
|
11484
|
-
searchHeat:
|
|
11485
|
-
socialHeat:
|
|
11486
|
-
confidence:
|
|
11487
|
-
}).strict();
|
|
11488
|
-
var TrendSourceSchema =
|
|
11763
|
+
import { z as z14 } from "zod";
|
|
11764
|
+
var RadarDecisionMetricsSchema = z14.object({
|
|
11765
|
+
currentSales: z14.number().finite(),
|
|
11766
|
+
forecastSales: z14.number().finite(),
|
|
11767
|
+
searchHeat: z14.number().finite(),
|
|
11768
|
+
socialHeat: z14.number().finite(),
|
|
11769
|
+
confidence: z14.number().min(0).max(1)
|
|
11770
|
+
}).strict();
|
|
11771
|
+
var TrendSourceSchema = z14.object({
|
|
11489
11772
|
sourceId: ContractIdentifierSchema,
|
|
11490
11773
|
provider: ContractIdentifierSchema,
|
|
11491
|
-
channel:
|
|
11774
|
+
channel: z14.enum(["trend", "ecommerce", "social", "search", "internal"]),
|
|
11492
11775
|
collectedAt: IsoDateTimeSchema,
|
|
11493
|
-
sourceUrl:
|
|
11494
|
-
evidenceRefs:
|
|
11776
|
+
sourceUrl: z14.string().url().optional(),
|
|
11777
|
+
evidenceRefs: z14.array(EntityRefSchema).default([])
|
|
11495
11778
|
}).strict();
|
|
11496
|
-
var TrendIngestRunSchema =
|
|
11497
|
-
contract:
|
|
11779
|
+
var TrendIngestRunSchema = z14.object({
|
|
11780
|
+
contract: z14.literal("TrendIngestRun"),
|
|
11498
11781
|
ingestRunId: ContractIdentifierSchema,
|
|
11499
11782
|
sourceId: ContractIdentifierSchema,
|
|
11500
11783
|
requestId: ContractIdentifierSchema,
|
|
11501
11784
|
idempotencyKey: ContractIdentifierSchema,
|
|
11502
|
-
status:
|
|
11503
|
-
recordCount:
|
|
11504
|
-
errorCount:
|
|
11785
|
+
status: z14.enum(["RUNNING", "SUCCEEDED", "FAILED", "PARTIAL"]),
|
|
11786
|
+
recordCount: z14.number().int().nonnegative(),
|
|
11787
|
+
errorCount: z14.number().int().nonnegative(),
|
|
11505
11788
|
startedAt: IsoDateTimeSchema,
|
|
11506
11789
|
completedAt: IsoDateTimeSchema.optional()
|
|
11507
11790
|
}).strict();
|
|
11508
|
-
var TrendSourceRecordSchema =
|
|
11509
|
-
contract:
|
|
11791
|
+
var TrendSourceRecordSchema = z14.object({
|
|
11792
|
+
contract: z14.literal("TrendSourceRecord"),
|
|
11510
11793
|
sourceRecordId: ContractIdentifierSchema,
|
|
11511
11794
|
source: TrendSourceSchema,
|
|
11512
11795
|
ingestRunRef: EntityRefSchema,
|
|
11513
|
-
recordVersion:
|
|
11796
|
+
recordVersion: z14.number().int().positive(),
|
|
11514
11797
|
contentHash: Sha256Schema,
|
|
11515
11798
|
payload: JsonValueSchema,
|
|
11516
11799
|
idempotencyKey: ContractIdentifierSchema,
|
|
11517
11800
|
collectedAt: IsoDateTimeSchema
|
|
11518
11801
|
}).strict();
|
|
11519
|
-
var HotwordBodySchema =
|
|
11520
|
-
contract:
|
|
11802
|
+
var HotwordBodySchema = z14.object({
|
|
11803
|
+
contract: z14.literal("HotwordBody"),
|
|
11521
11804
|
hotwordId: ContractIdentifierSchema,
|
|
11522
|
-
label:
|
|
11523
|
-
normalizedLabel:
|
|
11524
|
-
categories:
|
|
11525
|
-
sourceRefs:
|
|
11526
|
-
relationRefs:
|
|
11805
|
+
label: z14.string().trim().min(1),
|
|
11806
|
+
normalizedLabel: z14.string().trim().min(1),
|
|
11807
|
+
categories: z14.array(ContractIdentifierSchema).default([]),
|
|
11808
|
+
sourceRefs: z14.array(TrendSourceSchema).min(1),
|
|
11809
|
+
relationRefs: z14.array(EntityRefSchema).default([]),
|
|
11527
11810
|
createdAt: IsoDateTimeSchema,
|
|
11528
11811
|
updatedAt: IsoDateTimeSchema
|
|
11529
11812
|
}).strict();
|
|
11530
11813
|
var CommerceBodyFieldsSchema = {
|
|
11531
|
-
displayName:
|
|
11532
|
-
normalizedName:
|
|
11533
|
-
categories:
|
|
11534
|
-
sourceRefs:
|
|
11535
|
-
relationRefs:
|
|
11814
|
+
displayName: z14.string().trim().min(1),
|
|
11815
|
+
normalizedName: z14.string().trim().min(1),
|
|
11816
|
+
categories: z14.array(ContractIdentifierSchema).default([]),
|
|
11817
|
+
sourceRefs: z14.array(EntityRefSchema).min(1),
|
|
11818
|
+
relationRefs: z14.array(EntityRefSchema).default([]),
|
|
11536
11819
|
createdAt: IsoDateTimeSchema,
|
|
11537
11820
|
updatedAt: IsoDateTimeSchema
|
|
11538
11821
|
};
|
|
11539
|
-
var BrandBodySchema =
|
|
11540
|
-
contract:
|
|
11822
|
+
var BrandBodySchema = z14.object({
|
|
11823
|
+
contract: z14.literal("BrandBody"),
|
|
11541
11824
|
brandId: ContractIdentifierSchema,
|
|
11542
11825
|
...CommerceBodyFieldsSchema
|
|
11543
11826
|
}).strict();
|
|
11544
|
-
var ProductBodySchema =
|
|
11545
|
-
contract:
|
|
11827
|
+
var ProductBodySchema = z14.object({
|
|
11828
|
+
contract: z14.literal("ProductBody"),
|
|
11546
11829
|
productId: ContractIdentifierSchema,
|
|
11547
11830
|
brandRef: EntityRefSchema.optional(),
|
|
11548
11831
|
...CommerceBodyFieldsSchema
|
|
11549
11832
|
}).strict();
|
|
11550
|
-
var TrendMetricSnapshotSchema =
|
|
11551
|
-
contract:
|
|
11833
|
+
var TrendMetricSnapshotSchema = z14.object({
|
|
11834
|
+
contract: z14.literal("TrendMetricSnapshot"),
|
|
11552
11835
|
snapshotId: ContractIdentifierSchema,
|
|
11553
11836
|
subjectRef: EntityRefSchema,
|
|
11554
11837
|
observedAt: IsoDateTimeSchema,
|
|
11555
|
-
metrics:
|
|
11556
|
-
confidence:
|
|
11557
|
-
evidenceRefs:
|
|
11838
|
+
metrics: z14.record(z14.string(), z14.number().finite()),
|
|
11839
|
+
confidence: z14.number().min(0).max(1),
|
|
11840
|
+
evidenceRefs: z14.array(EntityRefSchema).min(1)
|
|
11558
11841
|
}).strict();
|
|
11559
|
-
var RadarScoreModelBodySchema =
|
|
11560
|
-
contract:
|
|
11842
|
+
var RadarScoreModelBodySchema = z14.object({
|
|
11843
|
+
contract: z14.literal("RadarScoreModelBody"),
|
|
11561
11844
|
modelId: ContractIdentifierSchema,
|
|
11562
|
-
version:
|
|
11845
|
+
version: z14.number().int().positive(),
|
|
11563
11846
|
weights: RadarDecisionMetricsSchema,
|
|
11564
|
-
thresholds:
|
|
11565
|
-
explanationRules:
|
|
11847
|
+
thresholds: z14.record(z14.string(), z14.number().finite()).default({}),
|
|
11848
|
+
explanationRules: z14.record(z14.string(), z14.string().trim().min(1)).default({}),
|
|
11566
11849
|
createdAt: IsoDateTimeSchema
|
|
11567
11850
|
}).strict();
|
|
11568
|
-
var RadarScoreProjectionSchema =
|
|
11569
|
-
contract:
|
|
11851
|
+
var RadarScoreProjectionSchema = z14.object({
|
|
11852
|
+
contract: z14.literal("RadarScoreProjection"),
|
|
11570
11853
|
projectionId: ContractIdentifierSchema,
|
|
11571
11854
|
subjectRef: EntityRefSchema,
|
|
11572
11855
|
modelRef: EntityRefSchema,
|
|
11573
|
-
totalScore:
|
|
11856
|
+
totalScore: z14.number().finite(),
|
|
11574
11857
|
dimensions: RadarDecisionMetricsSchema,
|
|
11575
|
-
evidenceRefs:
|
|
11858
|
+
evidenceRefs: z14.array(EntityRefSchema).min(1),
|
|
11576
11859
|
freshnessAt: IsoDateTimeSchema
|
|
11577
11860
|
}).strict();
|
|
11578
|
-
var RadarPanoramaNodeSchema =
|
|
11861
|
+
var RadarPanoramaNodeSchema = z14.object({
|
|
11579
11862
|
ref: EntityRefSchema,
|
|
11580
|
-
label:
|
|
11581
|
-
categories:
|
|
11582
|
-
score:
|
|
11863
|
+
label: z14.string().trim().min(1),
|
|
11864
|
+
categories: z14.array(ContractIdentifierSchema).default([]),
|
|
11865
|
+
score: z14.number().finite().optional(),
|
|
11583
11866
|
freshnessAt: IsoDateTimeSchema.optional()
|
|
11584
11867
|
}).strict();
|
|
11585
|
-
var RadarPanoramaEdgeSchema =
|
|
11868
|
+
var RadarPanoramaEdgeSchema = z14.object({
|
|
11586
11869
|
sourceRef: EntityRefSchema,
|
|
11587
11870
|
targetRef: EntityRefSchema,
|
|
11588
11871
|
relation: ContractIdentifierSchema,
|
|
11589
|
-
evidenceRefs:
|
|
11872
|
+
evidenceRefs: z14.array(EntityRefSchema).default([])
|
|
11590
11873
|
}).strict();
|
|
11591
|
-
var RadarPanoramaSchema =
|
|
11592
|
-
contract:
|
|
11593
|
-
nodes:
|
|
11594
|
-
edges:
|
|
11874
|
+
var RadarPanoramaSchema = z14.object({
|
|
11875
|
+
contract: z14.literal("RadarPanorama"),
|
|
11876
|
+
nodes: z14.array(RadarPanoramaNodeSchema),
|
|
11877
|
+
edges: z14.array(RadarPanoramaEdgeSchema),
|
|
11595
11878
|
generatedAt: IsoDateTimeSchema
|
|
11596
11879
|
}).strict();
|
|
11597
|
-
var BrandGeneticsProfileSchema =
|
|
11598
|
-
contract:
|
|
11880
|
+
var BrandGeneticsProfileSchema = z14.object({
|
|
11881
|
+
contract: z14.literal("BrandGeneticsProfile"),
|
|
11599
11882
|
brandRef: EntityRefSchema,
|
|
11600
|
-
categories:
|
|
11601
|
-
signature:
|
|
11602
|
-
relatedRefs:
|
|
11603
|
-
evidenceRefs:
|
|
11883
|
+
categories: z14.array(ContractIdentifierSchema).default([]),
|
|
11884
|
+
signature: z14.record(ContractIdentifierSchema, z14.number().finite()),
|
|
11885
|
+
relatedRefs: z14.array(EntityRefSchema).default([]),
|
|
11886
|
+
evidenceRefs: z14.array(EntityRefSchema).default([]),
|
|
11604
11887
|
computedAt: IsoDateTimeSchema
|
|
11605
11888
|
}).strict();
|
|
11606
|
-
var RadarOpportunityMatrixPointSchema =
|
|
11889
|
+
var RadarOpportunityMatrixPointSchema = z14.object({
|
|
11607
11890
|
subjectRef: EntityRefSchema,
|
|
11608
|
-
label:
|
|
11609
|
-
x:
|
|
11610
|
-
y:
|
|
11611
|
-
score:
|
|
11612
|
-
evidenceRefs:
|
|
11613
|
-
}).strict();
|
|
11614
|
-
var RadarOpportunityMatrixSchema =
|
|
11615
|
-
contract:
|
|
11616
|
-
xMetric:
|
|
11617
|
-
yMetric:
|
|
11618
|
-
points:
|
|
11891
|
+
label: z14.string().trim().min(1),
|
|
11892
|
+
x: z14.number().finite(),
|
|
11893
|
+
y: z14.number().finite(),
|
|
11894
|
+
score: z14.number().finite(),
|
|
11895
|
+
evidenceRefs: z14.array(EntityRefSchema).default([])
|
|
11896
|
+
}).strict();
|
|
11897
|
+
var RadarOpportunityMatrixSchema = z14.object({
|
|
11898
|
+
contract: z14.literal("RadarOpportunityMatrix"),
|
|
11899
|
+
xMetric: z14.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
|
|
11900
|
+
yMetric: z14.enum(["currentSales", "forecastSales", "searchHeat", "socialHeat", "confidence"]),
|
|
11901
|
+
points: z14.array(RadarOpportunityMatrixPointSchema),
|
|
11619
11902
|
computedAt: IsoDateTimeSchema
|
|
11620
11903
|
}).strict();
|
|
11621
|
-
var RadarQueryBodySchema =
|
|
11622
|
-
contract:
|
|
11904
|
+
var RadarQueryBodySchema = z14.object({
|
|
11905
|
+
contract: z14.literal("RadarQueryBody"),
|
|
11623
11906
|
queryId: ContractIdentifierSchema,
|
|
11624
|
-
filters:
|
|
11625
|
-
sort:
|
|
11907
|
+
filters: z14.record(z14.string(), JsonValueSchema).default({}),
|
|
11908
|
+
sort: z14.object({
|
|
11626
11909
|
field: ContractIdentifierSchema,
|
|
11627
|
-
direction:
|
|
11910
|
+
direction: z14.enum(["asc", "desc"])
|
|
11628
11911
|
}).strict(),
|
|
11629
|
-
pageSize:
|
|
11912
|
+
pageSize: z14.number().int().min(1).max(200),
|
|
11630
11913
|
updatedAt: IsoDateTimeSchema
|
|
11631
11914
|
}).strict();
|
|
11632
|
-
var SavedRadarQuerySchema =
|
|
11633
|
-
contract:
|
|
11915
|
+
var SavedRadarQuerySchema = z14.object({
|
|
11916
|
+
contract: z14.literal("SavedRadarQuery"),
|
|
11634
11917
|
savedQueryId: ContractIdentifierSchema,
|
|
11635
11918
|
teamId: ContractIdentifierSchema,
|
|
11636
11919
|
ownerRef: EntityRefSchema,
|
|
11637
|
-
name:
|
|
11920
|
+
name: z14.string().trim().min(1),
|
|
11638
11921
|
queryRef: EntityRefSchema,
|
|
11639
|
-
expectedVersion:
|
|
11922
|
+
expectedVersion: z14.number().int().nonnegative(),
|
|
11640
11923
|
updatedAt: IsoDateTimeSchema
|
|
11641
11924
|
}).strict();
|
|
11642
|
-
var RadarSelectionSchema =
|
|
11643
|
-
contract:
|
|
11925
|
+
var RadarSelectionSchema = z14.object({
|
|
11926
|
+
contract: z14.literal("RadarSelection"),
|
|
11644
11927
|
selectionId: ContractIdentifierSchema,
|
|
11645
11928
|
teamId: ContractIdentifierSchema,
|
|
11646
11929
|
ownerRef: EntityRefSchema,
|
|
11647
|
-
subjectRefs:
|
|
11648
|
-
status:
|
|
11649
|
-
note:
|
|
11650
|
-
expectedVersion:
|
|
11930
|
+
subjectRefs: z14.array(EntityRefSchema),
|
|
11931
|
+
status: z14.enum(["stashed", "selected", "rejected", "archived"]),
|
|
11932
|
+
note: z14.string().optional(),
|
|
11933
|
+
expectedVersion: z14.number().int().nonnegative(),
|
|
11651
11934
|
updatedAt: IsoDateTimeSchema
|
|
11652
11935
|
}).strict();
|
|
11653
|
-
var RadarAnalysisRunSchema =
|
|
11654
|
-
contract:
|
|
11936
|
+
var RadarAnalysisRunSchema = z14.object({
|
|
11937
|
+
contract: z14.literal("RadarAnalysisRun"),
|
|
11655
11938
|
runId: ContractIdentifierSchema,
|
|
11656
11939
|
teamId: ContractIdentifierSchema,
|
|
11657
11940
|
selectionRef: EntityRefSchema,
|
|
@@ -11660,66 +11943,66 @@ var RadarAnalysisRunSchema = z13.object({
|
|
|
11660
11943
|
designProjectRef: EntityRefSchema.optional(),
|
|
11661
11944
|
replayedFromRef: EntityRefSchema.optional(),
|
|
11662
11945
|
workflowDefinitionTeamId: ContractIdentifierSchema.optional(),
|
|
11663
|
-
workflowInput:
|
|
11664
|
-
createDesignProject:
|
|
11665
|
-
designProjectName:
|
|
11946
|
+
workflowInput: z14.record(z14.string(), JsonValueSchema).default({}),
|
|
11947
|
+
createDesignProject: z14.boolean().default(true),
|
|
11948
|
+
designProjectName: z14.string().trim().min(1).max(200).optional(),
|
|
11666
11949
|
modelRef: EntityRefSchema,
|
|
11667
11950
|
requestId: ContractIdentifierSchema,
|
|
11668
11951
|
idempotencyKey: ContractIdentifierSchema,
|
|
11669
|
-
status:
|
|
11670
|
-
outputRefs:
|
|
11671
|
-
error:
|
|
11952
|
+
status: z14.enum(["QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
|
|
11953
|
+
outputRefs: z14.array(EntityRefSchema).default([]),
|
|
11954
|
+
error: z14.object({
|
|
11672
11955
|
code: ContractIdentifierSchema,
|
|
11673
|
-
message:
|
|
11674
|
-
retryable:
|
|
11956
|
+
message: z14.string().trim().min(1),
|
|
11957
|
+
retryable: z14.boolean()
|
|
11675
11958
|
}).strict().optional(),
|
|
11676
11959
|
startedAt: IsoDateTimeSchema.optional(),
|
|
11677
11960
|
completedAt: IsoDateTimeSchema.optional(),
|
|
11678
11961
|
createdAt: IsoDateTimeSchema
|
|
11679
11962
|
}).strict();
|
|
11680
|
-
var RadarAnalysisAssetSchema =
|
|
11963
|
+
var RadarAnalysisAssetSchema = z14.object({
|
|
11681
11964
|
artifactRef: EntityRefSchema,
|
|
11682
11965
|
kind: ContractIdentifierSchema,
|
|
11683
|
-
mimeType:
|
|
11684
|
-
url:
|
|
11685
|
-
metadata:
|
|
11966
|
+
mimeType: z14.string().trim().min(1).optional(),
|
|
11967
|
+
url: z14.string().url(),
|
|
11968
|
+
metadata: z14.record(z14.string(), JsonValueSchema).default({}),
|
|
11686
11969
|
createdAt: IsoDateTimeSchema
|
|
11687
11970
|
}).strict();
|
|
11688
|
-
var RadarAnalysisDetailSchema =
|
|
11689
|
-
contract:
|
|
11971
|
+
var RadarAnalysisDetailSchema = z14.object({
|
|
11972
|
+
contract: z14.literal("RadarAnalysisDetail"),
|
|
11690
11973
|
run: RadarAnalysisRunSchema,
|
|
11691
|
-
runVersion:
|
|
11974
|
+
runVersion: z14.number().int().positive(),
|
|
11692
11975
|
selection: RadarSelectionSchema,
|
|
11693
|
-
outputs:
|
|
11694
|
-
assets:
|
|
11695
|
-
lineage:
|
|
11976
|
+
outputs: z14.array(OutputRecordSchema),
|
|
11977
|
+
assets: z14.array(RadarAnalysisAssetSchema),
|
|
11978
|
+
lineage: z14.array(LineageRecordSchema)
|
|
11696
11979
|
}).strict();
|
|
11697
|
-
var RadarActionRecordSchema =
|
|
11698
|
-
contract:
|
|
11980
|
+
var RadarActionRecordSchema = z14.object({
|
|
11981
|
+
contract: z14.literal("RadarActionRecord"),
|
|
11699
11982
|
actionId: ContractIdentifierSchema,
|
|
11700
11983
|
teamId: ContractIdentifierSchema,
|
|
11701
11984
|
actorRef: EntityRefSchema,
|
|
11702
|
-
action:
|
|
11985
|
+
action: z14.enum(["stash", "select", "reject", "archive", "launch", "retry", "replay", "rollback"]),
|
|
11703
11986
|
targetRef: EntityRefSchema,
|
|
11704
11987
|
requestId: ContractIdentifierSchema,
|
|
11705
11988
|
idempotencyKey: ContractIdentifierSchema,
|
|
11706
|
-
expectedVersion:
|
|
11989
|
+
expectedVersion: z14.number().int().nonnegative(),
|
|
11707
11990
|
occurredAt: IsoDateTimeSchema
|
|
11708
11991
|
}).strict();
|
|
11709
|
-
var RadarWritebackRecordSchema =
|
|
11710
|
-
contract:
|
|
11992
|
+
var RadarWritebackRecordSchema = z14.object({
|
|
11993
|
+
contract: z14.literal("RadarWritebackRecord"),
|
|
11711
11994
|
writebackId: ContractIdentifierSchema,
|
|
11712
11995
|
actionRef: EntityRefSchema,
|
|
11713
11996
|
targetRef: EntityRefSchema,
|
|
11714
|
-
status:
|
|
11715
|
-
resultingVersion:
|
|
11716
|
-
error:
|
|
11997
|
+
status: z14.enum(["PENDING", "APPLIED", "FAILED"]),
|
|
11998
|
+
resultingVersion: z14.number().int().nonnegative().optional(),
|
|
11999
|
+
error: z14.string().trim().min(1).optional(),
|
|
11717
12000
|
recordedAt: IsoDateTimeSchema
|
|
11718
12001
|
}).strict();
|
|
11719
12002
|
|
|
11720
12003
|
// src/contracts/workflow-definition.ts
|
|
11721
|
-
import { z as
|
|
11722
|
-
var ConductorTaskTypeSchema =
|
|
12004
|
+
import { z as z15 } from "zod";
|
|
12005
|
+
var ConductorTaskTypeSchema = z15.enum([
|
|
11723
12006
|
"SIMPLE",
|
|
11724
12007
|
"DYNAMIC",
|
|
11725
12008
|
"FORK_JOIN",
|
|
@@ -11768,46 +12051,46 @@ var requiredTaskFields = {
|
|
|
11768
12051
|
WAIT: ["inputParameters"],
|
|
11769
12052
|
TERMINATE: ["inputParameters"]
|
|
11770
12053
|
};
|
|
11771
|
-
var ConductorTaskDefinitionSchema =
|
|
11772
|
-
() =>
|
|
12054
|
+
var ConductorTaskDefinitionSchema = z15.lazy(
|
|
12055
|
+
() => z15.object({
|
|
11773
12056
|
name: ContractIdentifierSchema,
|
|
11774
12057
|
taskReferenceName: ContractIdentifierSchema,
|
|
11775
12058
|
type: ConductorTaskTypeSchema,
|
|
11776
|
-
inputParameters:
|
|
11777
|
-
startDelay:
|
|
11778
|
-
optional:
|
|
11779
|
-
asyncComplete:
|
|
11780
|
-
rateLimited:
|
|
11781
|
-
retryCount:
|
|
11782
|
-
taskDefinition:
|
|
11783
|
-
loopCondition:
|
|
11784
|
-
loopOver:
|
|
11785
|
-
sink:
|
|
11786
|
-
forkTasks:
|
|
11787
|
-
joinOn:
|
|
11788
|
-
defaultExclusiveJoinTask:
|
|
11789
|
-
dynamicForkTasksParam:
|
|
11790
|
-
dynamicForkTasksInputParamName:
|
|
11791
|
-
subWorkflowParam:
|
|
11792
|
-
$ref:
|
|
12059
|
+
inputParameters: z15.record(z15.string(), JsonValueSchema).optional(),
|
|
12060
|
+
startDelay: z15.number().int().nonnegative().optional(),
|
|
12061
|
+
optional: z15.boolean().optional(),
|
|
12062
|
+
asyncComplete: z15.boolean().optional(),
|
|
12063
|
+
rateLimited: z15.boolean().optional(),
|
|
12064
|
+
retryCount: z15.number().int().nonnegative().optional(),
|
|
12065
|
+
taskDefinition: z15.record(z15.string(), JsonValueSchema).optional(),
|
|
12066
|
+
loopCondition: z15.string().optional(),
|
|
12067
|
+
loopOver: z15.array(ConductorTaskDefinitionSchema).optional(),
|
|
12068
|
+
sink: z15.string().optional(),
|
|
12069
|
+
forkTasks: z15.array(z15.array(ConductorTaskDefinitionSchema)).optional(),
|
|
12070
|
+
joinOn: z15.array(ContractIdentifierSchema).optional(),
|
|
12071
|
+
defaultExclusiveJoinTask: z15.array(ContractIdentifierSchema).optional(),
|
|
12072
|
+
dynamicForkTasksParam: z15.string().optional(),
|
|
12073
|
+
dynamicForkTasksInputParamName: z15.string().optional(),
|
|
12074
|
+
subWorkflowParam: z15.object({
|
|
12075
|
+
$ref: z15.string().optional(),
|
|
11793
12076
|
name: ContractIdentifierSchema,
|
|
11794
|
-
version:
|
|
11795
|
-
taskToDomain:
|
|
11796
|
-
workflowDefinition:
|
|
12077
|
+
version: z15.number().int().positive().optional(),
|
|
12078
|
+
taskToDomain: z15.record(z15.string(), z15.string()).optional(),
|
|
12079
|
+
workflowDefinition: z15.record(z15.string(), JsonValueSchema).optional()
|
|
11797
12080
|
}).strict().optional(),
|
|
11798
|
-
decisionCases:
|
|
11799
|
-
defaultCase:
|
|
11800
|
-
evaluatorType:
|
|
11801
|
-
expression:
|
|
12081
|
+
decisionCases: z15.record(z15.string(), z15.array(ConductorTaskDefinitionSchema)).optional(),
|
|
12082
|
+
defaultCase: z15.array(ConductorTaskDefinitionSchema).optional(),
|
|
12083
|
+
evaluatorType: z15.enum(["value-param", "javascript", "graaljs"]).optional(),
|
|
12084
|
+
expression: z15.string().optional(),
|
|
11802
12085
|
__alias: JsonValueSchema.optional(),
|
|
11803
|
-
callbackFromWorker:
|
|
12086
|
+
callbackFromWorker: z15.boolean().optional(),
|
|
11804
12087
|
caseExpression: JsonValueSchema.optional(),
|
|
11805
|
-
caseValueParam:
|
|
11806
|
-
dependencies:
|
|
11807
|
-
description:
|
|
11808
|
-
dynamicTaskNameParam:
|
|
11809
|
-
joinMode:
|
|
11810
|
-
permissive:
|
|
12088
|
+
caseValueParam: z15.string().optional(),
|
|
12089
|
+
dependencies: z15.array(JsonValueSchema).optional(),
|
|
12090
|
+
description: z15.string().optional(),
|
|
12091
|
+
dynamicTaskNameParam: z15.string().optional(),
|
|
12092
|
+
joinMode: z15.string().optional(),
|
|
12093
|
+
permissive: z15.boolean().optional(),
|
|
11811
12094
|
joinTaskRef: ContractIdentifierSchema.optional(),
|
|
11812
12095
|
forkTaskRef: ContractIdentifierSchema.optional()
|
|
11813
12096
|
}).strict().superRefine((task, context) => {
|
|
@@ -11821,29 +12104,29 @@ var ConductorTaskDefinitionSchema = z14.lazy(
|
|
|
11821
12104
|
}
|
|
11822
12105
|
})
|
|
11823
12106
|
);
|
|
11824
|
-
var ConductorWorkflowDefinitionSchema =
|
|
11825
|
-
ownerApp:
|
|
11826
|
-
createTime:
|
|
11827
|
-
updateTime:
|
|
11828
|
-
createdBy:
|
|
11829
|
-
updatedBy:
|
|
12107
|
+
var ConductorWorkflowDefinitionSchema = z15.object({
|
|
12108
|
+
ownerApp: z15.string().optional(),
|
|
12109
|
+
createTime: z15.number().int().nonnegative().optional(),
|
|
12110
|
+
updateTime: z15.number().int().nonnegative().optional(),
|
|
12111
|
+
createdBy: z15.string().optional(),
|
|
12112
|
+
updatedBy: z15.string().optional(),
|
|
11830
12113
|
name: ContractIdentifierSchema,
|
|
11831
|
-
description:
|
|
11832
|
-
version:
|
|
11833
|
-
tasks:
|
|
11834
|
-
inputParameters:
|
|
11835
|
-
outputParameters:
|
|
12114
|
+
description: z15.string().optional(),
|
|
12115
|
+
version: z15.number().int().positive(),
|
|
12116
|
+
tasks: z15.array(ConductorTaskDefinitionSchema),
|
|
12117
|
+
inputParameters: z15.array(ContractIdentifierSchema),
|
|
12118
|
+
outputParameters: z15.record(z15.string(), JsonValueSchema).optional(),
|
|
11836
12119
|
failureWorkflow: ContractIdentifierSchema.optional(),
|
|
11837
|
-
schemaVersion:
|
|
11838
|
-
restartable:
|
|
11839
|
-
workflowStatusListenerEnabled:
|
|
11840
|
-
ownerEmail:
|
|
11841
|
-
timeoutPolicy:
|
|
11842
|
-
timeoutSeconds:
|
|
11843
|
-
variables:
|
|
11844
|
-
inputTemplate:
|
|
11845
|
-
}).strict();
|
|
11846
|
-
var WorkflowParameterTypeSchema =
|
|
12120
|
+
schemaVersion: z15.number().int().positive().optional(),
|
|
12121
|
+
restartable: z15.boolean().optional(),
|
|
12122
|
+
workflowStatusListenerEnabled: z15.boolean().optional(),
|
|
12123
|
+
ownerEmail: z15.string().email().optional(),
|
|
12124
|
+
timeoutPolicy: z15.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
|
|
12125
|
+
timeoutSeconds: z15.number().int().nonnegative(),
|
|
12126
|
+
variables: z15.record(z15.string(), JsonValueSchema).optional(),
|
|
12127
|
+
inputTemplate: z15.record(z15.string(), JsonValueSchema).optional()
|
|
12128
|
+
}).strict();
|
|
12129
|
+
var WorkflowParameterTypeSchema = z15.enum([
|
|
11847
12130
|
"string",
|
|
11848
12131
|
"file",
|
|
11849
12132
|
"number",
|
|
@@ -11853,213 +12136,213 @@ var WorkflowParameterTypeSchema = z14.enum([
|
|
|
11853
12136
|
"notice",
|
|
11854
12137
|
"canvas-assist"
|
|
11855
12138
|
]);
|
|
11856
|
-
var WorkflowConditionalStateSchema =
|
|
11857
|
-
conditions:
|
|
11858
|
-
|
|
11859
|
-
field:
|
|
11860
|
-
operator:
|
|
12139
|
+
var WorkflowConditionalStateSchema = z15.object({
|
|
12140
|
+
conditions: z15.array(
|
|
12141
|
+
z15.object({
|
|
12142
|
+
field: z15.string(),
|
|
12143
|
+
operator: z15.enum(["is", "isNot", "isGreaterThan", "isLessThan", "isGreaterThanOrEqual", "isLessThanOrEqual", "in", "notIn"]),
|
|
11861
12144
|
value: JsonValueSchema
|
|
11862
12145
|
}).strict()
|
|
11863
12146
|
),
|
|
11864
|
-
logic:
|
|
11865
|
-
}).strict();
|
|
11866
|
-
var ImageSelectMappingAppearanceSchema =
|
|
11867
|
-
columns:
|
|
11868
|
-
cardSize:
|
|
11869
|
-
imageAspectRatio:
|
|
11870
|
-
gap:
|
|
11871
|
-
radius:
|
|
11872
|
-
borderStyle:
|
|
11873
|
-
borderWidth:
|
|
11874
|
-
enableScroll:
|
|
11875
|
-
maxHeight:
|
|
11876
|
-
enableCollapse:
|
|
11877
|
-
visibleRows:
|
|
11878
|
-
hideLabel:
|
|
11879
|
-
hideDescription:
|
|
11880
|
-
hideValue:
|
|
11881
|
-
}).strict();
|
|
11882
|
-
var ComfyWorkflowPortBindingSchema =
|
|
11883
|
-
node:
|
|
11884
|
-
key:
|
|
11885
|
-
}).strict();
|
|
11886
|
-
var WorkflowParameterTypeOptionsSchema =
|
|
11887
|
-
editor:
|
|
11888
|
-
editorLanguage:
|
|
11889
|
-
maxValue:
|
|
11890
|
-
minValue:
|
|
11891
|
-
max:
|
|
11892
|
-
min:
|
|
11893
|
-
multipleValues:
|
|
11894
|
-
numberPrecision:
|
|
11895
|
-
password:
|
|
11896
|
-
rows:
|
|
11897
|
-
assetType:
|
|
11898
|
-
accept:
|
|
11899
|
-
maxSize:
|
|
11900
|
-
fileType:
|
|
11901
|
-
aiMultiShotMainImageField:
|
|
11902
|
-
aiMultiShotWorkflowAppId:
|
|
11903
|
-
aiMultiShotWorkflowId:
|
|
11904
|
-
allowCustomInput:
|
|
11905
|
-
allowUploadVideo:
|
|
11906
|
-
aspectRatioField:
|
|
11907
|
-
assemblyValueType:
|
|
11908
|
-
autoAnalyzeDesignImage:
|
|
11909
|
-
autoDetectAspectRatio:
|
|
11910
|
-
autoIncrementId:
|
|
12147
|
+
logic: z15.enum(["AND", "OR"]).optional()
|
|
12148
|
+
}).strict();
|
|
12149
|
+
var ImageSelectMappingAppearanceSchema = z15.object({
|
|
12150
|
+
columns: z15.number().int().min(1).max(4).optional(),
|
|
12151
|
+
cardSize: z15.enum(["sm", "md", "lg"]).optional(),
|
|
12152
|
+
imageAspectRatio: z15.enum(["square", "4:5", "3:4", "16:9"]).optional(),
|
|
12153
|
+
gap: z15.enum(["sm", "md", "lg"]).optional(),
|
|
12154
|
+
radius: z15.enum(["sm", "md", "lg", "xl"]).optional(),
|
|
12155
|
+
borderStyle: z15.enum(["none", "soft", "strong"]).optional(),
|
|
12156
|
+
borderWidth: z15.union([z15.literal(0), z15.literal(1), z15.literal(2)]).optional(),
|
|
12157
|
+
enableScroll: z15.boolean().optional(),
|
|
12158
|
+
maxHeight: z15.number().int().min(160).max(1200).optional(),
|
|
12159
|
+
enableCollapse: z15.boolean().optional(),
|
|
12160
|
+
visibleRows: z15.number().int().min(1).max(6).optional(),
|
|
12161
|
+
hideLabel: z15.boolean().optional(),
|
|
12162
|
+
hideDescription: z15.boolean().optional(),
|
|
12163
|
+
hideValue: z15.boolean().optional()
|
|
12164
|
+
}).strict();
|
|
12165
|
+
var ComfyWorkflowPortBindingSchema = z15.object({
|
|
12166
|
+
node: z15.union([z15.string(), z15.number()]),
|
|
12167
|
+
key: z15.string().optional()
|
|
12168
|
+
}).strict();
|
|
12169
|
+
var WorkflowParameterTypeOptionsSchema = z15.object({
|
|
12170
|
+
editor: z15.enum(["code", "codeNodeEditor", "htmlEditor", "sqlEditor", "json"]).optional(),
|
|
12171
|
+
editorLanguage: z15.enum(["javaScript", "json", "python", "sql"]).optional(),
|
|
12172
|
+
maxValue: z15.number().optional(),
|
|
12173
|
+
minValue: z15.number().optional(),
|
|
12174
|
+
max: z15.number().optional(),
|
|
12175
|
+
min: z15.number().optional(),
|
|
12176
|
+
multipleValues: z15.boolean().optional(),
|
|
12177
|
+
numberPrecision: z15.number().nonnegative().optional(),
|
|
12178
|
+
password: z15.boolean().optional(),
|
|
12179
|
+
rows: z15.number().int().positive().optional(),
|
|
12180
|
+
assetType: z15.string().optional(),
|
|
12181
|
+
accept: z15.string().optional(),
|
|
12182
|
+
maxSize: z15.number().positive().optional(),
|
|
12183
|
+
fileType: z15.string().optional(),
|
|
12184
|
+
aiMultiShotMainImageField: z15.string().optional(),
|
|
12185
|
+
aiMultiShotWorkflowAppId: z15.string().optional(),
|
|
12186
|
+
aiMultiShotWorkflowId: z15.string().optional(),
|
|
12187
|
+
allowCustomInput: z15.boolean().optional(),
|
|
12188
|
+
allowUploadVideo: z15.boolean().optional(),
|
|
12189
|
+
aspectRatioField: z15.string().optional(),
|
|
12190
|
+
assemblyValueType: z15.string().optional(),
|
|
12191
|
+
autoAnalyzeDesignImage: z15.boolean().optional(),
|
|
12192
|
+
autoDetectAspectRatio: z15.boolean().optional(),
|
|
12193
|
+
autoIncrementId: z15.boolean().optional(),
|
|
11911
12194
|
comfyOptions: ComfyWorkflowPortBindingSchema.optional(),
|
|
11912
|
-
comfyuiModelServerId:
|
|
11913
|
-
comfyuiModelTypeName:
|
|
12195
|
+
comfyuiModelServerId: z15.string().optional(),
|
|
12196
|
+
comfyuiModelTypeName: z15.string().optional(),
|
|
11914
12197
|
defaultCustomInput: JsonValueSchema.optional(),
|
|
11915
|
-
descriptionAlert:
|
|
11916
|
-
disabled:
|
|
11917
|
-
editable:
|
|
11918
|
-
enableAiMultiShot:
|
|
11919
|
-
enableBooleanSwitchMode:
|
|
11920
|
-
enableClear:
|
|
11921
|
-
enableExpand:
|
|
11922
|
-
enableImageMask:
|
|
11923
|
-
enableImageOverlay:
|
|
11924
|
-
enablePopupEditor:
|
|
11925
|
-
enablePromptFontSize:
|
|
11926
|
-
enableReset:
|
|
11927
|
-
enableSelectItemIcon:
|
|
11928
|
-
enableSelectList:
|
|
11929
|
-
enableSelectSearch:
|
|
11930
|
-
enableSliderEnterMode:
|
|
11931
|
-
enableVoice:
|
|
11932
|
-
expandButtonText:
|
|
11933
|
-
foldUp:
|
|
11934
|
-
hidden:
|
|
11935
|
-
hideRequiredDot:
|
|
11936
|
-
inlineTitleWithSelect:
|
|
11937
|
-
knowledgeGraphButtonText:
|
|
11938
|
-
identifyAttributeCount:
|
|
11939
|
-
identifyAttributes:
|
|
11940
|
-
identifyMaxVariants:
|
|
11941
|
-
identifySourceField:
|
|
11942
|
-
imageOverlayBaseField:
|
|
11943
|
-
imageOverlayOverlayField:
|
|
12198
|
+
descriptionAlert: z15.boolean().optional(),
|
|
12199
|
+
disabled: z15.union([z15.boolean(), WorkflowConditionalStateSchema]).optional(),
|
|
12200
|
+
editable: z15.union([z15.boolean(), WorkflowConditionalStateSchema]).optional(),
|
|
12201
|
+
enableAiMultiShot: z15.boolean().optional(),
|
|
12202
|
+
enableBooleanSwitchMode: z15.boolean().optional(),
|
|
12203
|
+
enableClear: z15.boolean().optional(),
|
|
12204
|
+
enableExpand: z15.boolean().optional(),
|
|
12205
|
+
enableImageMask: z15.boolean().optional(),
|
|
12206
|
+
enableImageOverlay: z15.boolean().optional(),
|
|
12207
|
+
enablePopupEditor: z15.boolean().optional(),
|
|
12208
|
+
enablePromptFontSize: z15.boolean().optional(),
|
|
12209
|
+
enableReset: z15.boolean().optional(),
|
|
12210
|
+
enableSelectItemIcon: z15.boolean().optional(),
|
|
12211
|
+
enableSelectList: z15.boolean().optional(),
|
|
12212
|
+
enableSelectSearch: z15.boolean().optional(),
|
|
12213
|
+
enableSliderEnterMode: z15.boolean().optional(),
|
|
12214
|
+
enableVoice: z15.boolean().optional(),
|
|
12215
|
+
expandButtonText: z15.string().optional(),
|
|
12216
|
+
foldUp: z15.boolean().optional(),
|
|
12217
|
+
hidden: z15.boolean().optional(),
|
|
12218
|
+
hideRequiredDot: z15.boolean().optional(),
|
|
12219
|
+
inlineTitleWithSelect: z15.boolean().optional(),
|
|
12220
|
+
knowledgeGraphButtonText: z15.string().optional(),
|
|
12221
|
+
identifyAttributeCount: z15.union([z15.number().nonnegative(), z15.string().min(1), z15.object({ min: z15.number().nonnegative().optional(), max: z15.number().nonnegative().optional() }).strict()]).optional(),
|
|
12222
|
+
identifyAttributes: z15.array(JsonValueSchema).optional(),
|
|
12223
|
+
identifyMaxVariants: z15.number().int().nonnegative().optional(),
|
|
12224
|
+
identifySourceField: z15.string().optional(),
|
|
12225
|
+
imageOverlayBaseField: z15.string().optional(),
|
|
12226
|
+
imageOverlayOverlayField: z15.string().optional(),
|
|
11944
12227
|
imageSelectMappingAppearance: ImageSelectMappingAppearanceSchema.optional(),
|
|
11945
|
-
imageSelectMappingColumns:
|
|
11946
|
-
imageSelectMappingEnableCustomUpload:
|
|
11947
|
-
imageSelectMappingHideLabel:
|
|
11948
|
-
imageSelectMappingHideLink:
|
|
11949
|
-
imageSelectMappingHideMeta:
|
|
11950
|
-
imageSelectMappingInlineUseLargeUploadBox:
|
|
11951
|
-
imageSelectMappingPromptField:
|
|
11952
|
-
imageSelectMappingTabOrder:
|
|
11953
|
-
imageSelectMappingTabWidthMode:
|
|
12228
|
+
imageSelectMappingColumns: z15.number().int().min(1).max(4).optional(),
|
|
12229
|
+
imageSelectMappingEnableCustomUpload: z15.boolean().optional(),
|
|
12230
|
+
imageSelectMappingHideLabel: z15.boolean().optional(),
|
|
12231
|
+
imageSelectMappingHideLink: z15.boolean().optional(),
|
|
12232
|
+
imageSelectMappingHideMeta: z15.boolean().optional(),
|
|
12233
|
+
imageSelectMappingInlineUseLargeUploadBox: z15.boolean().optional(),
|
|
12234
|
+
imageSelectMappingPromptField: z15.string().optional(),
|
|
12235
|
+
imageSelectMappingTabOrder: z15.enum(["template-first", "upload-first"]).optional(),
|
|
12236
|
+
imageSelectMappingTabWidthMode: z15.enum(["content", "fill"]).optional(),
|
|
11954
12237
|
imageSelectMappingTemplatePrompt: LocalizedTextSchema.optional(),
|
|
11955
12238
|
imageSelectMappingTemplateTabTitle: LocalizedTextSchema.optional(),
|
|
11956
|
-
imageSelectMappingUploadMode:
|
|
12239
|
+
imageSelectMappingUploadMode: z15.enum(["tabs", "inline"]).optional(),
|
|
11957
12240
|
imageSelectMappingUploadPrompt: LocalizedTextSchema.optional(),
|
|
11958
12241
|
imageSelectMappingUploadTabTitle: LocalizedTextSchema.optional(),
|
|
11959
|
-
endpoints:
|
|
11960
|
-
examples:
|
|
12242
|
+
endpoints: z15.array(JsonValueSchema).optional(),
|
|
12243
|
+
examples: z15.array(JsonValueSchema).optional(),
|
|
11961
12244
|
extraData: JsonValueSchema.optional(),
|
|
11962
12245
|
layer: JsonValueSchema.optional(),
|
|
11963
12246
|
map: JsonValueSchema.optional(),
|
|
11964
|
-
multiline:
|
|
11965
|
-
options:
|
|
11966
|
-
originalFiles:
|
|
12247
|
+
multiline: z15.boolean().optional(),
|
|
12248
|
+
options: z15.array(JsonValueSchema).optional(),
|
|
12249
|
+
originalFiles: z15.array(JsonValueSchema).optional(),
|
|
11967
12250
|
placeholder: LocalizedTextSchema.optional(),
|
|
11968
|
-
preserveSelectListOrder:
|
|
12251
|
+
preserveSelectListOrder: z15.boolean().optional(),
|
|
11969
12252
|
promptDictionary: JsonValueSchema.optional(),
|
|
11970
|
-
promptFontSize:
|
|
12253
|
+
promptFontSize: z15.number().optional(),
|
|
11971
12254
|
promptModeToggle: JsonValueSchema.optional(),
|
|
11972
|
-
requireActiveSelectFilter:
|
|
11973
|
-
restoreDefaultOnEmptyEnter:
|
|
11974
|
-
search:
|
|
11975
|
-
selectButtonEnableCollapse:
|
|
11976
|
-
selectButtonVisibleRows:
|
|
11977
|
-
selectList:
|
|
11978
|
-
selectListDisplayMode:
|
|
11979
|
-
selectPromptField:
|
|
11980
|
-
showAddLocalFileButton:
|
|
11981
|
-
singleColumn:
|
|
11982
|
-
singleFrameForMultiple:
|
|
11983
|
-
textSingleLine:
|
|
11984
|
-
textareaMiniHeight:
|
|
12255
|
+
requireActiveSelectFilter: z15.boolean().optional(),
|
|
12256
|
+
restoreDefaultOnEmptyEnter: z15.boolean().optional(),
|
|
12257
|
+
search: z15.boolean().optional(),
|
|
12258
|
+
selectButtonEnableCollapse: z15.boolean().optional(),
|
|
12259
|
+
selectButtonVisibleRows: z15.number().int().positive().optional(),
|
|
12260
|
+
selectList: z15.array(JsonValueSchema).optional(),
|
|
12261
|
+
selectListDisplayMode: z15.string().optional(),
|
|
12262
|
+
selectPromptField: z15.string().optional(),
|
|
12263
|
+
showAddLocalFileButton: z15.boolean().optional(),
|
|
12264
|
+
singleColumn: z15.boolean().optional(),
|
|
12265
|
+
singleFrameForMultiple: z15.boolean().optional(),
|
|
12266
|
+
textSingleLine: z15.boolean().optional(),
|
|
12267
|
+
textareaMiniHeight: z15.number().nonnegative().optional(),
|
|
11985
12268
|
tips: LocalizedTextSchema.optional(),
|
|
11986
12269
|
visibility: JsonValueSchema.optional(),
|
|
11987
|
-
voiceButtonText:
|
|
11988
|
-
designAnalysisFields:
|
|
11989
|
-
designAnalysisFillStrategy:
|
|
11990
|
-
designAnalysisMaxFields:
|
|
11991
|
-
designAnalysisType:
|
|
11992
|
-
designAnalysisFieldPrefix:
|
|
11993
|
-
}).strict();
|
|
11994
|
-
var WorkflowParameterSchema =
|
|
11995
|
-
() =>
|
|
12270
|
+
voiceButtonText: z15.string().optional(),
|
|
12271
|
+
designAnalysisFields: z15.array(JsonValueSchema).optional(),
|
|
12272
|
+
designAnalysisFillStrategy: z15.string().optional(),
|
|
12273
|
+
designAnalysisMaxFields: z15.number().int().nonnegative().optional(),
|
|
12274
|
+
designAnalysisType: z15.string().optional(),
|
|
12275
|
+
designAnalysisFieldPrefix: z15.string().optional()
|
|
12276
|
+
}).strict();
|
|
12277
|
+
var WorkflowParameterSchema = z15.lazy(
|
|
12278
|
+
() => z15.object({
|
|
11996
12279
|
displayName: LocalizedTextSchema,
|
|
11997
12280
|
name: ContractIdentifierSchema,
|
|
11998
12281
|
type: WorkflowParameterTypeSchema,
|
|
11999
12282
|
typeOptions: WorkflowParameterTypeOptionsSchema.optional(),
|
|
12000
12283
|
default: JsonValueSchema.optional(),
|
|
12001
12284
|
description: LocalizedTextSchema.optional(),
|
|
12002
|
-
hint:
|
|
12003
|
-
displayOptions:
|
|
12004
|
-
hide:
|
|
12005
|
-
show:
|
|
12285
|
+
hint: z15.string().optional(),
|
|
12286
|
+
displayOptions: z15.object({
|
|
12287
|
+
hide: z15.record(z15.string(), z15.array(JsonValueSchema)).optional(),
|
|
12288
|
+
show: z15.record(z15.string(), z15.array(JsonValueSchema)).optional()
|
|
12006
12289
|
}).strict().optional(),
|
|
12007
|
-
options:
|
|
12008
|
-
|
|
12290
|
+
options: z15.array(z15.union([
|
|
12291
|
+
z15.object({ name: LocalizedTextSchema, value: z15.union([z15.string(), z15.number(), z15.boolean()]), action: z15.string().optional(), description: LocalizedTextSchema.optional() }).strict(),
|
|
12009
12292
|
WorkflowParameterSchema,
|
|
12010
|
-
|
|
12293
|
+
z15.object({ displayName: z15.string(), name: ContractIdentifierSchema, values: z15.array(WorkflowParameterSchema) }).strict()
|
|
12011
12294
|
])).optional(),
|
|
12012
12295
|
placeholder: LocalizedTextSchema.optional(),
|
|
12013
|
-
isNodeSetting:
|
|
12014
|
-
noDataExpression:
|
|
12015
|
-
required:
|
|
12016
|
-
example:
|
|
12017
|
-
extractValue:
|
|
12018
|
-
properties:
|
|
12019
|
-
assetType:
|
|
12020
|
-
flag:
|
|
12021
|
-
enableExpand:
|
|
12022
|
-
enableVoice:
|
|
12023
|
-
expandButtonText:
|
|
12024
|
-
knowledgeGraphButtonText:
|
|
12025
|
-
selectListDisplayMode:
|
|
12026
|
-
voiceButtonText:
|
|
12296
|
+
isNodeSetting: z15.boolean().optional(),
|
|
12297
|
+
noDataExpression: z15.boolean().optional(),
|
|
12298
|
+
required: z15.boolean().optional(),
|
|
12299
|
+
example: z15.string().optional(),
|
|
12300
|
+
extractValue: z15.object({ type: z15.literal("regex"), regex: z15.string() }).strict().optional(),
|
|
12301
|
+
properties: z15.array(WorkflowParameterSchema).optional(),
|
|
12302
|
+
assetType: z15.string().optional(),
|
|
12303
|
+
flag: z15.boolean().optional(),
|
|
12304
|
+
enableExpand: z15.boolean().optional(),
|
|
12305
|
+
enableVoice: z15.boolean().optional(),
|
|
12306
|
+
expandButtonText: z15.string().optional(),
|
|
12307
|
+
knowledgeGraphButtonText: z15.string().optional(),
|
|
12308
|
+
selectListDisplayMode: z15.string().optional(),
|
|
12309
|
+
voiceButtonText: z15.string().optional()
|
|
12027
12310
|
}).strict()
|
|
12028
12311
|
);
|
|
12029
|
-
var WorkflowOutputBindingSchema =
|
|
12030
|
-
var WorkflowNodeSchema =
|
|
12312
|
+
var WorkflowOutputBindingSchema = z15.object({ key: ContractIdentifierSchema, value: z15.string() }).strict();
|
|
12313
|
+
var WorkflowNodeSchema = z15.object({
|
|
12031
12314
|
id: ContractIdentifierSchema,
|
|
12032
12315
|
referenceName: ContractIdentifierSchema,
|
|
12033
12316
|
capabilityRef: ContractIdentifierSchema,
|
|
12034
12317
|
capabilityVersion: ContractIdentifierSchema.optional(),
|
|
12035
|
-
inputBindings:
|
|
12036
|
-
configuration:
|
|
12318
|
+
inputBindings: z15.record(z15.string(), JsonValueSchema).default({}),
|
|
12319
|
+
configuration: z15.object({ executor: z15.literal("conductor"), task: ConductorTaskDefinitionSchema }).strict()
|
|
12037
12320
|
}).strict().superRefine((node, context) => {
|
|
12038
12321
|
if (node.configuration.task.taskReferenceName !== node.referenceName) context.addIssue({ code: "custom", path: ["configuration", "task", "taskReferenceName"], message: "Conductor task reference must match node referenceName." });
|
|
12039
12322
|
if (node.configuration.task.name !== node.capabilityRef) context.addIssue({ code: "custom", path: ["configuration", "task", "name"], message: "Conductor task name must match node capabilityRef." });
|
|
12040
12323
|
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." });
|
|
12041
12324
|
});
|
|
12042
|
-
var WorkflowEdgeSchema =
|
|
12325
|
+
var WorkflowEdgeSchema = z15.object({
|
|
12043
12326
|
from: ContractIdentifierSchema,
|
|
12044
12327
|
to: ContractIdentifierSchema,
|
|
12045
12328
|
outputPort: ContractIdentifierSchema.optional(),
|
|
12046
12329
|
inputPort: ContractIdentifierSchema.optional(),
|
|
12047
|
-
condition:
|
|
12330
|
+
condition: z15.string().optional()
|
|
12048
12331
|
}).strict();
|
|
12049
|
-
var WorkflowTriggerSchema =
|
|
12332
|
+
var WorkflowTriggerSchema = z15.object({
|
|
12050
12333
|
id: ContractIdentifierSchema,
|
|
12051
|
-
type:
|
|
12052
|
-
enabled:
|
|
12053
|
-
schedule:
|
|
12054
|
-
webhook:
|
|
12055
|
-
path:
|
|
12056
|
-
method:
|
|
12057
|
-
auth:
|
|
12058
|
-
basicAuth:
|
|
12059
|
-
headerAuth:
|
|
12060
|
-
responseUntil:
|
|
12334
|
+
type: z15.enum(["manual", "schedule", "webhook", "event", "api"]),
|
|
12335
|
+
enabled: z15.boolean(),
|
|
12336
|
+
schedule: z15.object({ cron: z15.string().trim().min(1) }).strict().optional(),
|
|
12337
|
+
webhook: z15.object({
|
|
12338
|
+
path: z15.string().trim().min(1).optional(),
|
|
12339
|
+
method: z15.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]),
|
|
12340
|
+
auth: z15.enum(["NONE", "BASIC", "CUSTOM_HEADER"]),
|
|
12341
|
+
basicAuth: z15.object({ username: z15.string(), password: z15.string() }).strict().optional(),
|
|
12342
|
+
headerAuth: z15.object({ name: z15.string().trim().min(1), value: z15.string() }).strict().optional(),
|
|
12343
|
+
responseUntil: z15.enum(["WORKFLOW_STARTED", "WORKFLOW_COMPLETED_OR_FINISHED"])
|
|
12061
12344
|
}).strict().optional(),
|
|
12062
|
-
event:
|
|
12345
|
+
event: z15.object({
|
|
12063
12346
|
eventType: ContractIdentifierSchema,
|
|
12064
12347
|
configuration: JsonValueSchema.optional()
|
|
12065
12348
|
}).strict().optional()
|
|
@@ -12068,63 +12351,63 @@ var WorkflowTriggerSchema = z14.object({
|
|
|
12068
12351
|
if (trigger.type === "webhook" && !trigger.webhook) context.addIssue({ code: "custom", path: ["webhook"], message: "Webhook trigger requires webhook configuration." });
|
|
12069
12352
|
if (trigger.type === "event" && !trigger.event) context.addIssue({ code: "custom", path: ["event"], message: "Event trigger requires event configuration." });
|
|
12070
12353
|
});
|
|
12071
|
-
var WorkflowValidationIssueSchema =
|
|
12354
|
+
var WorkflowValidationIssueSchema = z15.object({
|
|
12072
12355
|
taskReferenceName: ContractIdentifierSchema,
|
|
12073
|
-
issueType:
|
|
12074
|
-
detailReason:
|
|
12075
|
-
humanMessage:
|
|
12356
|
+
issueType: z15.enum(["ERROR", "WARNING"]),
|
|
12357
|
+
detailReason: z15.object({ type: ContractIdentifierSchema, name: ContractIdentifierSchema, detailInformation: JsonValueSchema.optional() }).strict(),
|
|
12358
|
+
humanMessage: z15.object({ en: z15.string(), zh: z15.string() }).strict()
|
|
12076
12359
|
}).strict();
|
|
12077
|
-
var WorkflowDefinitionSchema =
|
|
12078
|
-
contract:
|
|
12360
|
+
var WorkflowDefinitionSchema = z15.object({
|
|
12361
|
+
contract: z15.literal("WorkflowDefinition"),
|
|
12079
12362
|
metadata: ContractMetadataSchema.omit({ name: true, description: true, labels: true }).extend({
|
|
12080
12363
|
name: LocalizedTextSchema,
|
|
12081
12364
|
description: LocalizedTextSchema.optional(),
|
|
12082
|
-
role:
|
|
12365
|
+
role: z15.enum(["workflow", "template"]),
|
|
12083
12366
|
teamId: ContractIdentifierSchema,
|
|
12084
12367
|
creatorRef: EntityRefSchema,
|
|
12085
|
-
tags:
|
|
12368
|
+
tags: z15.array(ContractIdentifierSchema).default([])
|
|
12086
12369
|
}).strict(),
|
|
12087
|
-
revision:
|
|
12088
|
-
kind:
|
|
12089
|
-
recordVersion:
|
|
12090
|
-
sourceVersion:
|
|
12370
|
+
revision: z15.object({
|
|
12371
|
+
kind: z15.enum(["release", "backup"]),
|
|
12372
|
+
recordVersion: z15.number().int().positive(),
|
|
12373
|
+
sourceVersion: z15.number().int().positive().optional()
|
|
12091
12374
|
}).strict().superRefine((revision, context) => {
|
|
12092
12375
|
if (revision.kind === "backup" && revision.sourceVersion === void 0) context.addIssue({ code: "custom", path: ["sourceVersion"], message: "Backup revisions require a sourceVersion." });
|
|
12093
12376
|
}),
|
|
12094
|
-
presentation:
|
|
12095
|
-
ports:
|
|
12096
|
-
parameters:
|
|
12097
|
-
graph:
|
|
12098
|
-
execution:
|
|
12099
|
-
timeoutMs:
|
|
12100
|
-
retries:
|
|
12101
|
-
concurrencyLimit:
|
|
12102
|
-
idempotency:
|
|
12103
|
-
rateLimit:
|
|
12377
|
+
presentation: z15.object({ iconUrl: z15.string().optional(), thumbnail: z15.string().optional() }).strict(),
|
|
12378
|
+
ports: z15.object({ inputs: z15.array(ContractPortSchema).default([]), outputs: z15.array(ContractPortSchema).default([]) }).strict(),
|
|
12379
|
+
parameters: z15.object({ variables: z15.array(WorkflowParameterSchema).default([]), outputs: z15.array(WorkflowOutputBindingSchema).default([]) }).strict(),
|
|
12380
|
+
graph: z15.object({ nodes: z15.array(WorkflowNodeSchema), edges: z15.array(WorkflowEdgeSchema).default([]) }).strict(),
|
|
12381
|
+
execution: z15.object({
|
|
12382
|
+
timeoutMs: z15.number().int().positive().optional(),
|
|
12383
|
+
retries: z15.number().int().nonnegative().default(0),
|
|
12384
|
+
concurrencyLimit: z15.number().int().positive().optional(),
|
|
12385
|
+
idempotency: z15.enum(["required", "supported", "none"]),
|
|
12386
|
+
rateLimit: z15.object({ enabled: z15.boolean(), max: z15.number().int().nonnegative(), windowMs: z15.number().int().nonnegative() }).strict().superRefine((rateLimit, context) => {
|
|
12104
12387
|
if (rateLimit.enabled && (rateLimit.max === 0 || rateLimit.windowMs === 0)) context.addIssue({ code: "custom", message: "Enabled rate limit requires positive max and windowMs." });
|
|
12105
12388
|
}).optional(),
|
|
12106
|
-
conductor:
|
|
12107
|
-
ownerApp:
|
|
12108
|
-
createTime:
|
|
12109
|
-
updateTime:
|
|
12110
|
-
createdBy:
|
|
12111
|
-
updatedBy:
|
|
12389
|
+
conductor: z15.object({
|
|
12390
|
+
ownerApp: z15.string().optional(),
|
|
12391
|
+
createTime: z15.number().int().nonnegative().optional(),
|
|
12392
|
+
updateTime: z15.number().int().nonnegative().optional(),
|
|
12393
|
+
createdBy: z15.string().optional(),
|
|
12394
|
+
updatedBy: z15.string().optional(),
|
|
12112
12395
|
failureWorkflow: ContractIdentifierSchema.optional(),
|
|
12113
|
-
schemaVersion:
|
|
12114
|
-
restartable:
|
|
12115
|
-
workflowStatusListenerEnabled:
|
|
12116
|
-
ownerEmail:
|
|
12117
|
-
timeoutPolicy:
|
|
12118
|
-
variables:
|
|
12119
|
-
inputTemplate:
|
|
12396
|
+
schemaVersion: z15.number().int().positive().optional(),
|
|
12397
|
+
restartable: z15.boolean().optional(),
|
|
12398
|
+
workflowStatusListenerEnabled: z15.boolean().optional(),
|
|
12399
|
+
ownerEmail: z15.string().email().optional(),
|
|
12400
|
+
timeoutPolicy: z15.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
|
|
12401
|
+
variables: z15.record(z15.string(), JsonValueSchema).optional(),
|
|
12402
|
+
inputTemplate: z15.record(z15.string(), JsonValueSchema).optional()
|
|
12120
12403
|
}).strict()
|
|
12121
12404
|
}).strict(),
|
|
12122
|
-
triggers:
|
|
12123
|
-
views:
|
|
12124
|
-
dataContracts:
|
|
12125
|
-
governance:
|
|
12126
|
-
interfaces:
|
|
12127
|
-
openai:
|
|
12405
|
+
triggers: z15.array(WorkflowTriggerSchema).default([]),
|
|
12406
|
+
views: z15.array(z15.object({ pageRef: ContractIdentifierSchema, placement: ContractIdentifierSchema.optional() }).strict()).default([]),
|
|
12407
|
+
dataContracts: z15.object({ reads: z15.array(ContractIdentifierSchema).default([]), writes: z15.array(ContractIdentifierSchema).default([]), emits: z15.array(ContractIdentifierSchema).default([]) }).strict(),
|
|
12408
|
+
governance: z15.object({ activated: z15.boolean(), validated: z15.boolean(), validationIssues: z15.array(WorkflowValidationIssueSchema).default([]), hidden: z15.boolean().optional() }).strict(),
|
|
12409
|
+
interfaces: z15.object({
|
|
12410
|
+
openai: z15.object({ enabled: z15.boolean(), modelName: z15.string().trim().min(1).optional() }).strict(),
|
|
12128
12411
|
shortcutRef: EntityRefSchema.optional(),
|
|
12129
12412
|
preferredAppId: ContractIdentifierSchema.optional()
|
|
12130
12413
|
}).strict().superRefine((interfaces, context) => {
|
|
@@ -12143,21 +12426,21 @@ var WorkflowDefinitionSchema = z14.object({
|
|
|
12143
12426
|
});
|
|
12144
12427
|
|
|
12145
12428
|
// src/contracts/workflow-runtime.ts
|
|
12146
|
-
import { z as
|
|
12147
|
-
var WorkflowCatalogEntrySchema =
|
|
12148
|
-
contract:
|
|
12429
|
+
import { z as z16 } from "zod";
|
|
12430
|
+
var WorkflowCatalogEntrySchema = z16.object({
|
|
12431
|
+
contract: z16.literal("WorkflowCatalogEntry"),
|
|
12149
12432
|
workflowId: ContractIdentifierSchema,
|
|
12150
12433
|
teamId: ContractIdentifierSchema,
|
|
12151
12434
|
creatorRef: EntityRefSchema,
|
|
12152
12435
|
currentDefinitionRef: EntityRefSchema,
|
|
12153
|
-
lifecycle:
|
|
12154
|
-
asset:
|
|
12155
|
-
preset:
|
|
12156
|
-
marketplacePublished:
|
|
12436
|
+
lifecycle: z16.enum(["ACTIVE", "DELETED"]),
|
|
12437
|
+
asset: z16.object({
|
|
12438
|
+
preset: z16.boolean(),
|
|
12439
|
+
marketplacePublished: z16.boolean(),
|
|
12157
12440
|
publishConfig: JsonObjectSchema.optional(),
|
|
12158
|
-
sort:
|
|
12441
|
+
sort: z16.number().int(),
|
|
12159
12442
|
forkFromRef: EntityRefSchema.optional(),
|
|
12160
|
-
notAuthorized:
|
|
12443
|
+
notAuthorized: z16.boolean()
|
|
12161
12444
|
}).strict(),
|
|
12162
12445
|
createdAt: IsoDateTimeSchema,
|
|
12163
12446
|
updatedAt: IsoDateTimeSchema,
|
|
@@ -12192,17 +12475,17 @@ var WorkflowCatalogEntrySchema = z15.object({
|
|
|
12192
12475
|
});
|
|
12193
12476
|
}
|
|
12194
12477
|
});
|
|
12195
|
-
var WorkflowPublicationSchema =
|
|
12196
|
-
contract:
|
|
12478
|
+
var WorkflowPublicationSchema = z16.object({
|
|
12479
|
+
contract: z16.literal("WorkflowPublication"),
|
|
12197
12480
|
publicationId: ContractIdentifierSchema,
|
|
12198
12481
|
definitionRef: EntityRefSchema,
|
|
12199
12482
|
runtimeDefinitionRef: EntityRefSchema,
|
|
12200
12483
|
sourceHash: Sha256Schema,
|
|
12201
12484
|
compiledHash: Sha256Schema,
|
|
12202
|
-
status:
|
|
12485
|
+
status: z16.enum(["PENDING", "PUBLISHED", "FAILED", "RETIRED"]),
|
|
12203
12486
|
publisherRef: EntityRefSchema,
|
|
12204
12487
|
publishedAt: IsoDateTimeSchema.optional(),
|
|
12205
|
-
failureReason:
|
|
12488
|
+
failureReason: z16.string().trim().min(1).optional()
|
|
12206
12489
|
}).strict().superRefine((publication, context) => {
|
|
12207
12490
|
if (publication.definitionRef.kind !== "workflow-definition") {
|
|
12208
12491
|
context.addIssue({
|
|
@@ -12233,12 +12516,12 @@ var WorkflowPublicationSchema = z15.object({
|
|
|
12233
12516
|
});
|
|
12234
12517
|
}
|
|
12235
12518
|
});
|
|
12236
|
-
var WorkflowCompletionCommitSchema =
|
|
12237
|
-
contract:
|
|
12519
|
+
var WorkflowCompletionCommitSchema = z16.object({
|
|
12520
|
+
contract: z16.literal("WorkflowCompletionCommit"),
|
|
12238
12521
|
commitId: ContractIdentifierSchema,
|
|
12239
12522
|
run: ApplicationRunSchema,
|
|
12240
|
-
outputs:
|
|
12241
|
-
artifacts:
|
|
12523
|
+
outputs: z16.array(OutputRecordSchema),
|
|
12524
|
+
artifacts: z16.array(ArtifactManifestSchema),
|
|
12242
12525
|
lineage: LineageRecordSchema,
|
|
12243
12526
|
completedAt: IsoDateTimeSchema
|
|
12244
12527
|
}).strict().superRefine((commit, context) => {
|
|
@@ -12280,15 +12563,15 @@ var WorkflowCompletionCommitSchema = z15.object({
|
|
|
12280
12563
|
}
|
|
12281
12564
|
});
|
|
12282
12565
|
});
|
|
12283
|
-
var WorkflowCompletionReceiptSchema =
|
|
12284
|
-
contract:
|
|
12566
|
+
var WorkflowCompletionReceiptSchema = z16.object({
|
|
12567
|
+
contract: z16.literal("WorkflowCompletionReceipt"),
|
|
12285
12568
|
commitId: ContractIdentifierSchema,
|
|
12286
12569
|
runRef: EntityRefSchema,
|
|
12287
|
-
outputRefs:
|
|
12288
|
-
artifactRefs:
|
|
12570
|
+
outputRefs: z16.array(EntityRefSchema),
|
|
12571
|
+
artifactRefs: z16.array(EntityRefSchema),
|
|
12289
12572
|
contentHash: Sha256Schema,
|
|
12290
12573
|
committedAt: IsoDateTimeSchema,
|
|
12291
|
-
idempotentReplay:
|
|
12574
|
+
idempotentReplay: z16.boolean()
|
|
12292
12575
|
}).strict().superRefine((receipt, context) => {
|
|
12293
12576
|
if (receipt.runRef.kind !== "application-run") {
|
|
12294
12577
|
context.addIssue({
|
|
@@ -12383,6 +12666,15 @@ export {
|
|
|
12383
12666
|
CapabilitySourceTypeSchema,
|
|
12384
12667
|
ChangeImpactGraphSchema,
|
|
12385
12668
|
ChangeImpactSchema,
|
|
12669
|
+
CompiledMenuActionBehaviorSchema,
|
|
12670
|
+
CompiledMenuBehaviorSchema,
|
|
12671
|
+
CompiledMenuDividerNodeSchema,
|
|
12672
|
+
CompiledMenuGroupNodeSchema,
|
|
12673
|
+
CompiledMenuItemAccessSchema,
|
|
12674
|
+
CompiledMenuItemNodeSchema,
|
|
12675
|
+
CompiledMenuNavigateBehaviorSchema,
|
|
12676
|
+
CompiledMenuNodeSchema,
|
|
12677
|
+
CompiledMenuProjectionSchema,
|
|
12386
12678
|
CompletionEventSchema,
|
|
12387
12679
|
CompletionHeaderSchema,
|
|
12388
12680
|
ConceptDefinitionSchema,
|
|
@@ -12419,6 +12711,34 @@ export {
|
|
|
12419
12711
|
LineageRecordSchema,
|
|
12420
12712
|
LocaleIdentifierSchema,
|
|
12421
12713
|
LocalizedTextSchema,
|
|
12714
|
+
MENU_ACTIVATION_QUERY_PARAMETER,
|
|
12715
|
+
MENU_CONTRACT_VERSION,
|
|
12716
|
+
MENU_MAX_DEFINITIONS,
|
|
12717
|
+
MENU_MAX_INPUT_BYTES,
|
|
12718
|
+
MENU_MAX_INPUT_VALUES,
|
|
12719
|
+
MENU_MAX_NODES,
|
|
12720
|
+
MENU_MAX_TREE_DEPTH,
|
|
12721
|
+
MenuAccessRequirementSchema,
|
|
12722
|
+
MenuActionBehaviorSchema,
|
|
12723
|
+
MenuActionRegistrationSchema,
|
|
12724
|
+
MenuBehaviorSchema,
|
|
12725
|
+
MenuBoundedInputSchema,
|
|
12726
|
+
MenuContributionProviderRegistrationSchema,
|
|
12727
|
+
MenuContributionResultSchema,
|
|
12728
|
+
MenuContributionSchema,
|
|
12729
|
+
MenuDefinitionSchema,
|
|
12730
|
+
MenuDefinitionSetSchema,
|
|
12731
|
+
MenuDividerNodeSchema,
|
|
12732
|
+
MenuGroupNodeSchema,
|
|
12733
|
+
MenuItemNodeSchema,
|
|
12734
|
+
MenuNavigateBehaviorSchema,
|
|
12735
|
+
MenuNavigationTargetSchema,
|
|
12736
|
+
MenuNodeSchema,
|
|
12737
|
+
MenuPageRefSchema,
|
|
12738
|
+
MenuPageRegistrationSchema,
|
|
12739
|
+
MenuRuntimeBundleSchema,
|
|
12740
|
+
MenuRuntimeInputBindingSchema,
|
|
12741
|
+
MenuSourceInputBindingSchema,
|
|
12422
12742
|
OntologyDefinitionSchema,
|
|
12423
12743
|
OutputRecordSchema,
|
|
12424
12744
|
OverlayNodeSchema,
|