@inf-monkeys-tech/monkeys 1.0.35 → 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 +445 -4
- package/lib/contracts/tenant.d.ts.map +1 -1
- package/lib/contracts/tenant.js +113 -2
- package/lib/contracts/tenant.js.map +1 -1
- package/lib/esm/contracts/index.mjs +1166 -746
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +1692 -749
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +1234 -342
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +1158 -746
- 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 +537 -2
- package/lib/json-schema/tenant-runtime-config.schema.json +667 -2
- 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 +477 -3
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +46 -2
- package/lib/schemas/index.js.map +1 -1
- package/package.json +1 -1
- package/test/fixtures/current-user-menu-profile.v1.json +22 -0
- 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,118 +11168,207 @@ 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()
|
|
11220
|
+
}).strict();
|
|
11221
|
+
var LEGACY_CURRENT_USER_MENU_ITEM_IDS = ["dark-mode", "language", "settings", "logout"];
|
|
11222
|
+
var CURRENT_USER_MENU_CONTROL_REFS = ["dark-mode", "language"];
|
|
11223
|
+
var CURRENT_USER_MENU_ACTION_REFS = ["logout"];
|
|
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.")
|
|
11228
|
+
]);
|
|
11229
|
+
var CurrentUserMenuNavigationItemSchema = z13.object({
|
|
11230
|
+
id: CurrentUserMenuIdentifierSchema,
|
|
11231
|
+
kind: z13.literal("navigation"),
|
|
11232
|
+
ref: CurrentUserMenuIdentifierSchema
|
|
11233
|
+
}).strict();
|
|
11234
|
+
var CurrentUserMenuControlItemSchema = z13.object({
|
|
11235
|
+
id: CurrentUserMenuIdentifierSchema,
|
|
11236
|
+
kind: z13.literal("control"),
|
|
11237
|
+
ref: z13.enum(CURRENT_USER_MENU_CONTROL_REFS)
|
|
11238
|
+
}).strict();
|
|
11239
|
+
var CurrentUserMenuActionItemSchema = z13.object({
|
|
11240
|
+
id: CurrentUserMenuIdentifierSchema,
|
|
11241
|
+
kind: z13.literal("action"),
|
|
11242
|
+
ref: z13.enum(CURRENT_USER_MENU_ACTION_REFS),
|
|
11243
|
+
tone: z13.enum(["default", "danger"]).optional()
|
|
10939
11244
|
}).strict();
|
|
10940
|
-
var
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
|
|
10944
|
-
|
|
10945
|
-
|
|
11245
|
+
var CurrentUserMenuItemSchema = z13.discriminatedUnion("kind", [
|
|
11246
|
+
CurrentUserMenuNavigationItemSchema,
|
|
11247
|
+
CurrentUserMenuControlItemSchema,
|
|
11248
|
+
CurrentUserMenuActionItemSchema
|
|
11249
|
+
]);
|
|
11250
|
+
var CurrentUserMenuSectionSchema = z13.object({
|
|
11251
|
+
id: CurrentUserMenuIdentifierSchema,
|
|
11252
|
+
label: CurrentUserMenuDisplayTextSchema.optional(),
|
|
11253
|
+
dividerBefore: z13.boolean().optional(),
|
|
11254
|
+
items: z13.array(CurrentUserMenuItemSchema)
|
|
10946
11255
|
}).strict();
|
|
10947
|
-
var
|
|
11256
|
+
var CurrentUserMenuConfigSchema = z13.object({
|
|
11257
|
+
version: z13.literal(1),
|
|
11258
|
+
sections: z13.array(CurrentUserMenuSectionSchema).max(20)
|
|
11259
|
+
}).strict().superRefine((value, context) => {
|
|
11260
|
+
const sectionIds = /* @__PURE__ */ new Set();
|
|
11261
|
+
const itemIds = /* @__PURE__ */ new Set();
|
|
11262
|
+
let itemCount = 0;
|
|
11263
|
+
value.sections.forEach((section, sectionIndex) => {
|
|
11264
|
+
if (sectionIds.has(section.id)) {
|
|
11265
|
+
context.addIssue({
|
|
11266
|
+
code: "custom",
|
|
11267
|
+
message: `Duplicate current-user menu section id ${section.id}.`,
|
|
11268
|
+
path: ["sections", sectionIndex, "id"]
|
|
11269
|
+
});
|
|
11270
|
+
}
|
|
11271
|
+
sectionIds.add(section.id);
|
|
11272
|
+
itemCount += section.items.length;
|
|
11273
|
+
section.items.forEach((item, itemIndex) => {
|
|
11274
|
+
if (itemIds.has(item.id)) {
|
|
11275
|
+
context.addIssue({
|
|
11276
|
+
code: "custom",
|
|
11277
|
+
message: `Duplicate current-user menu item id ${item.id}.`,
|
|
11278
|
+
path: ["sections", sectionIndex, "items", itemIndex, "id"]
|
|
11279
|
+
});
|
|
11280
|
+
}
|
|
11281
|
+
itemIds.add(item.id);
|
|
11282
|
+
});
|
|
11283
|
+
});
|
|
11284
|
+
if (itemCount > 100) {
|
|
11285
|
+
context.addIssue({
|
|
11286
|
+
code: "custom",
|
|
11287
|
+
message: "Current-user menu supports at most 100 items.",
|
|
11288
|
+
path: ["sections"]
|
|
11289
|
+
});
|
|
11290
|
+
}
|
|
11291
|
+
});
|
|
11292
|
+
var LegacyCurrentUserMenuProfileSchema = z13.array(z13.enum(LEGACY_CURRENT_USER_MENU_ITEM_IDS)).superRefine((value, context) => {
|
|
11293
|
+
const seen = /* @__PURE__ */ new Set();
|
|
11294
|
+
value.forEach((item, index) => {
|
|
11295
|
+
if (seen.has(item)) {
|
|
11296
|
+
context.addIssue({
|
|
11297
|
+
code: "custom",
|
|
11298
|
+
message: `Duplicate legacy current-user menu item ${item}.`,
|
|
11299
|
+
path: [index]
|
|
11300
|
+
});
|
|
11301
|
+
}
|
|
11302
|
+
seen.add(item);
|
|
11303
|
+
});
|
|
11304
|
+
});
|
|
11305
|
+
var CurrentUserMenuProfileSchema = z13.union([
|
|
11306
|
+
z13.literal("*"),
|
|
11307
|
+
LegacyCurrentUserMenuProfileSchema,
|
|
11308
|
+
CurrentUserMenuConfigSchema
|
|
11309
|
+
]);
|
|
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(),
|
|
11314
|
+
profile: CurrentUserMenuProfileSchema.optional(),
|
|
11315
|
+
showTeamQuota: z13.boolean().optional()
|
|
11316
|
+
}).strict();
|
|
11317
|
+
var TenantHeadbarModuleLeafSchema = z13.object({
|
|
10948
11318
|
id: ContractIdentifierSchema,
|
|
10949
|
-
extraInfo:
|
|
10950
|
-
displayName:
|
|
10951
|
-
visible:
|
|
10952
|
-
disabled:
|
|
10953
|
-
icon:
|
|
10954
|
-
showQuickSwitcher:
|
|
10955
|
-
showSidebar:
|
|
10956
|
-
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()
|
|
10957
11327
|
}).strict();
|
|
10958
11328
|
var TenantHeadbarModuleItemSchema = TenantHeadbarModuleLeafSchema.extend({
|
|
10959
|
-
children:
|
|
10960
|
-
}).strict();
|
|
10961
|
-
var KernelHeadbarSchema =
|
|
10962
|
-
theme:
|
|
10963
|
-
layoutMode:
|
|
10964
|
-
heightPx:
|
|
10965
|
-
navPosition:
|
|
10966
|
-
brandTitle:
|
|
10967
|
-
menuRadius:
|
|
10968
|
-
}).strict();
|
|
10969
|
-
var CustomIconSchema =
|
|
10970
|
-
color:
|
|
10971
|
-
url:
|
|
10972
|
-
type:
|
|
10973
|
-
hintTextColor:
|
|
10974
|
-
}).strict();
|
|
10975
|
-
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({
|
|
10976
11346
|
id: ContractIdentifierSchema,
|
|
10977
|
-
label:
|
|
10978
|
-
fixed:
|
|
11347
|
+
label: z13.union([z13.string(), z13.record(LocaleIdentifierSchema, z13.string())]).optional(),
|
|
11348
|
+
fixed: z13.boolean().optional()
|
|
10979
11349
|
}).strict();
|
|
10980
|
-
var WorkbenchStudioOverrideSchema =
|
|
10981
|
-
studioName:
|
|
10982
|
-
dropdownToolsDefault:
|
|
10983
|
-
existingToolsDefault:
|
|
10984
|
-
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()
|
|
10985
11355
|
}).strict();
|
|
10986
|
-
var TenantWorkbenchPageContextSchema =
|
|
11356
|
+
var TenantWorkbenchPageContextSchema = z13.object({
|
|
10987
11357
|
workflow: JsonObjectSchema.optional(),
|
|
10988
11358
|
agent: JsonObjectSchema.optional(),
|
|
10989
11359
|
agentId: ContractIdentifierSchema.optional(),
|
|
10990
11360
|
designProject: JsonObjectSchema.optional(),
|
|
10991
11361
|
designMetadataId: ContractIdentifierSchema.optional(),
|
|
10992
|
-
iframeUrl:
|
|
10993
|
-
info:
|
|
11362
|
+
iframeUrl: z13.string().trim().min(1).optional(),
|
|
11363
|
+
info: z13.object({
|
|
10994
11364
|
displayName: LocalizedTextSchema.optional(),
|
|
10995
11365
|
description: LocalizedTextSchema.optional(),
|
|
10996
|
-
iconUrl:
|
|
11366
|
+
iconUrl: z13.string().trim().min(1).optional()
|
|
10997
11367
|
}).strict().optional(),
|
|
10998
|
-
isBuiltinPinned:
|
|
10999
|
-
isBuiltinReadonly:
|
|
11368
|
+
isBuiltinPinned: z13.boolean().optional(),
|
|
11369
|
+
isBuiltinReadonly: z13.boolean().optional()
|
|
11000
11370
|
}).strict();
|
|
11001
|
-
var TenantWorkbenchPageEnvelopeSchema =
|
|
11371
|
+
var TenantWorkbenchPageEnvelopeSchema = z13.object({
|
|
11002
11372
|
definition: PageDefinitionSchema,
|
|
11003
11373
|
context: TenantWorkbenchPageContextSchema
|
|
11004
11374
|
}).strict().superRefine(({ definition }, context) => {
|
|
@@ -11031,56 +11401,56 @@ var TenantWorkbenchPageEnvelopeSchema = z12.object({
|
|
|
11031
11401
|
});
|
|
11032
11402
|
}
|
|
11033
11403
|
});
|
|
11034
|
-
var TenantWorkbenchPageGroupSchema =
|
|
11404
|
+
var TenantWorkbenchPageGroupSchema = z13.object({
|
|
11035
11405
|
id: ContractIdentifierSchema,
|
|
11036
|
-
pageIds:
|
|
11406
|
+
pageIds: z13.array(ContractIdentifierSchema),
|
|
11037
11407
|
displayName: LocalizedTextSchema,
|
|
11038
|
-
isBuiltIn:
|
|
11039
|
-
iconUrl:
|
|
11040
|
-
sortIndex:
|
|
11408
|
+
isBuiltIn: z13.boolean(),
|
|
11409
|
+
iconUrl: z13.string().optional(),
|
|
11410
|
+
sortIndex: z13.number().int().nullable().optional(),
|
|
11041
11411
|
presetRelationId: ContractIdentifierSchema.optional(),
|
|
11042
11412
|
relationKey: ContractIdentifierSchema.nullable().optional(),
|
|
11043
11413
|
studioId: ContractIdentifierSchema.optional()
|
|
11044
11414
|
}).strict();
|
|
11045
|
-
var TenantWorkbenchConfigSchema =
|
|
11046
|
-
pages:
|
|
11047
|
-
pageGroups:
|
|
11048
|
-
catalog:
|
|
11049
|
-
quickSwitcherMaxItems:
|
|
11050
|
-
defaultOrder:
|
|
11051
|
-
groups:
|
|
11052
|
-
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))
|
|
11053
11423
|
}).strict().optional(),
|
|
11054
|
-
customers:
|
|
11055
|
-
dropdownToolsDefault:
|
|
11056
|
-
layoutManagerTools:
|
|
11057
|
-
studioTabsMode:
|
|
11058
|
-
historyWatermark:
|
|
11059
|
-
svgUrl:
|
|
11060
|
-
coverage:
|
|
11061
|
-
maxLongEdgeRatio:
|
|
11062
|
-
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({
|
|
11063
11433
|
mode: ContractIdentifierSchema,
|
|
11064
|
-
heightRatio:
|
|
11065
|
-
minHeightPx:
|
|
11066
|
-
maxHeightPx:
|
|
11434
|
+
heightRatio: z13.number().positive().optional(),
|
|
11435
|
+
minHeightPx: z13.number().nonnegative().optional(),
|
|
11436
|
+
maxHeightPx: z13.number().nonnegative().optional()
|
|
11067
11437
|
}).strict().optional(),
|
|
11068
|
-
enhance:
|
|
11069
|
-
enabled:
|
|
11070
|
-
backgroundLumaThreshold:
|
|
11071
|
-
stroke:
|
|
11072
|
-
color:
|
|
11073
|
-
opacity:
|
|
11074
|
-
widthRatio:
|
|
11075
|
-
blurRatio:
|
|
11076
|
-
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()
|
|
11077
11447
|
}).strict().optional()
|
|
11078
11448
|
}).strict().optional()
|
|
11079
11449
|
}).strict().optional(),
|
|
11080
|
-
layoutManagerEnabled:
|
|
11081
|
-
existingToolsDefault:
|
|
11082
|
-
historyColumnsDefault:
|
|
11083
|
-
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()
|
|
11084
11454
|
}).strict().optional()
|
|
11085
11455
|
}).strict().superRefine(({ pages, pageGroups }, context) => {
|
|
11086
11456
|
const pageIds = pages.map(({ definition }) => definition.pageId);
|
|
@@ -11104,38 +11474,38 @@ var TenantWorkbenchConfigSchema = z12.object({
|
|
|
11104
11474
|
});
|
|
11105
11475
|
});
|
|
11106
11476
|
});
|
|
11107
|
-
var LoginPageSchema =
|
|
11108
|
-
background:
|
|
11109
|
-
logo:
|
|
11110
|
-
url:
|
|
11111
|
-
lightUrl:
|
|
11112
|
-
darkUrl:
|
|
11113
|
-
position:
|
|
11114
|
-
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()
|
|
11115
11485
|
}).strict().optional(),
|
|
11116
|
-
customCss:
|
|
11486
|
+
customCss: z13.string().optional()
|
|
11117
11487
|
}).strict();
|
|
11118
11488
|
var LandingPageHeadbarConfigShape = {
|
|
11119
|
-
headbarMode:
|
|
11489
|
+
headbarMode: z13.enum(["shared", "hidden"]).optional()
|
|
11120
11490
|
};
|
|
11121
|
-
var LandingPageDefaultConfigSchema =
|
|
11122
|
-
mode:
|
|
11491
|
+
var LandingPageDefaultConfigSchema = z13.object({
|
|
11492
|
+
mode: z13.literal("default"),
|
|
11123
11493
|
...LandingPageHeadbarConfigShape
|
|
11124
11494
|
}).strict();
|
|
11125
|
-
var LandingPageMarkdownConfigSchema =
|
|
11126
|
-
mode:
|
|
11127
|
-
content:
|
|
11495
|
+
var LandingPageMarkdownConfigSchema = z13.object({
|
|
11496
|
+
mode: z13.literal("markdown"),
|
|
11497
|
+
content: z13.string(),
|
|
11128
11498
|
...LandingPageHeadbarConfigShape
|
|
11129
11499
|
}).strict();
|
|
11130
|
-
var LandingPageHtmlConfigSchema =
|
|
11131
|
-
mode:
|
|
11132
|
-
content:
|
|
11500
|
+
var LandingPageHtmlConfigSchema = z13.object({
|
|
11501
|
+
mode: z13.literal("html"),
|
|
11502
|
+
content: z13.string(),
|
|
11133
11503
|
...LandingPageHeadbarConfigShape
|
|
11134
11504
|
}).strict();
|
|
11135
|
-
var LandingPageIframeConfigSchema =
|
|
11136
|
-
mode:
|
|
11505
|
+
var LandingPageIframeConfigSchema = z13.object({
|
|
11506
|
+
mode: z13.literal("iframe"),
|
|
11137
11507
|
...LandingPageHeadbarConfigShape,
|
|
11138
|
-
url:
|
|
11508
|
+
url: z13.string().refine((value) => {
|
|
11139
11509
|
if (/^\/(?!\/)/.test(value)) {
|
|
11140
11510
|
return !value.includes("\\");
|
|
11141
11511
|
}
|
|
@@ -11147,422 +11517,424 @@ var LandingPageIframeConfigSchema = z12.object({
|
|
|
11147
11517
|
}
|
|
11148
11518
|
}, "Landing page iframe URL must use a root-relative path or HTTP(S) without embedded credentials.")
|
|
11149
11519
|
}).strict();
|
|
11150
|
-
var TenantLandingPageConfigSchema =
|
|
11520
|
+
var TenantLandingPageConfigSchema = z13.discriminatedUnion("mode", [
|
|
11151
11521
|
LandingPageDefaultConfigSchema,
|
|
11152
11522
|
LandingPageMarkdownConfigSchema,
|
|
11153
11523
|
LandingPageHtmlConfigSchema,
|
|
11154
11524
|
LandingPageIframeConfigSchema
|
|
11155
11525
|
]);
|
|
11156
|
-
var TenantApplicationConfigSchema =
|
|
11157
|
-
theme:
|
|
11158
|
-
id:
|
|
11159
|
-
name:
|
|
11160
|
-
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(),
|
|
11161
11531
|
favicon: AssetVariantsSchema.optional(),
|
|
11162
11532
|
logo: AssetVariantsSchema.optional(),
|
|
11163
|
-
pwaIcon:
|
|
11164
|
-
form:
|
|
11165
|
-
toast:
|
|
11166
|
-
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"])
|
|
11167
11537
|
}).strict().optional(),
|
|
11168
|
-
icons:
|
|
11169
|
-
views:
|
|
11170
|
-
form:
|
|
11171
|
-
toast:
|
|
11172
|
-
progress:
|
|
11173
|
-
onlyResult:
|
|
11174
|
-
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()
|
|
11175
11545
|
}).strict()
|
|
11176
11546
|
}).strict().optional(),
|
|
11177
11547
|
loginPage: LoginPageSchema.optional(),
|
|
11178
|
-
extraLanguageURL:
|
|
11179
|
-
hideSpaceHeader:
|
|
11180
|
-
showSidebarTeamSelector:
|
|
11181
|
-
showWorkbenchSidebar:
|
|
11182
|
-
workbenchViewTheme:
|
|
11183
|
-
defaults:
|
|
11184
|
-
showFormInImageDetail:
|
|
11185
|
-
darkMode:
|
|
11186
|
-
language:
|
|
11187
|
-
showDarkModeToggle:
|
|
11188
|
-
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()
|
|
11189
11559
|
}).strict().optional(),
|
|
11190
|
-
modules:
|
|
11191
|
-
monkeysSpaceSidebar:
|
|
11192
|
-
monkeysSpaceHeadbar:
|
|
11193
|
-
|
|
11194
|
-
|
|
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)
|
|
11195
11565
|
]).optional(),
|
|
11196
|
-
settingsSidebar:
|
|
11566
|
+
settingsSidebar: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]).optional()
|
|
11197
11567
|
}).strict().optional(),
|
|
11198
11568
|
headbar: ThemeHeadbarSchema.optional(),
|
|
11199
|
-
kernelLayout:
|
|
11200
|
-
navigationMode:
|
|
11201
|
-
allowNavigationModeSwitch:
|
|
11569
|
+
kernelLayout: z13.object({
|
|
11570
|
+
navigationMode: z13.enum(["sidebar", "topbar"]).optional(),
|
|
11571
|
+
allowNavigationModeSwitch: z13.boolean().optional(),
|
|
11202
11572
|
headbar: KernelHeadbarSchema.optional()
|
|
11203
11573
|
}).strict().optional(),
|
|
11204
|
-
paginationPosition:
|
|
11205
|
-
ugcViewIconOnlyMode:
|
|
11206
|
-
workflowPreviewExecutionGrid:
|
|
11207
|
-
selectionModeDisplayType:
|
|
11208
|
-
clickBehavior:
|
|
11209
|
-
showErrorFilter:
|
|
11210
|
-
displayType:
|
|
11211
|
-
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()
|
|
11212
11582
|
}).strict().optional(),
|
|
11213
|
-
workbenchSidebarDefaultOpen:
|
|
11214
|
-
workbenchSidebarMoreAction:
|
|
11215
|
-
workbenchSidebarApart:
|
|
11216
|
-
workbenchSidebarToggleGroupDetail:
|
|
11217
|
-
workbenchSidebarViewType:
|
|
11218
|
-
workbenchSidebarFormViewEmbed:
|
|
11219
|
-
workbenchSidebarModernMode:
|
|
11220
|
-
ugc:
|
|
11221
|
-
uniImagePreview:
|
|
11222
|
-
imagePreviewStyle:
|
|
11223
|
-
teamAsUser:
|
|
11224
|
-
themeMode:
|
|
11225
|
-
density:
|
|
11226
|
-
pageZoom:
|
|
11227
|
-
miniMode:
|
|
11228
|
-
workflow:
|
|
11229
|
-
historyResult:
|
|
11230
|
-
uploader:
|
|
11231
|
-
orientation:
|
|
11232
|
-
pasteButton:
|
|
11233
|
-
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()
|
|
11234
11604
|
}).strict().optional(),
|
|
11235
|
-
designProjects:
|
|
11236
|
-
oneOnOne:
|
|
11237
|
-
newTabOpenBoard:
|
|
11238
|
-
defaultShowGrid:
|
|
11239
|
-
createDefaultFrame:
|
|
11240
|
-
showPageMenu:
|
|
11241
|
-
showMainMenu:
|
|
11242
|
-
showStylePanel:
|
|
11243
|
-
showToolbar:
|
|
11244
|
-
toolbarPosition:
|
|
11245
|
-
showContextMenu:
|
|
11246
|
-
showActionsMenu:
|
|
11247
|
-
showPageAndLayerSidebar:
|
|
11248
|
-
showBoardOperationSidebar:
|
|
11249
|
-
showMiniToolsToolbar:
|
|
11250
|
-
showRightSidebar:
|
|
11251
|
-
showRealtimeDrawing:
|
|
11252
|
-
showWorkflow:
|
|
11253
|
-
showVersionManager:
|
|
11254
|
-
showAgent:
|
|
11255
|
-
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()
|
|
11256
11626
|
}).strict().optional(),
|
|
11257
11627
|
workbench: TenantWorkbenchConfigSchema.optional(),
|
|
11258
|
-
visionProWorkflows:
|
|
11259
|
-
initTeam:
|
|
11260
|
-
imageThumbnail:
|
|
11261
|
-
pages:
|
|
11262
|
-
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)]),
|
|
11263
11633
|
defaultPageKey: ContractIdentifierSchema.optional()
|
|
11264
11634
|
}).strict().optional(),
|
|
11265
|
-
agent:
|
|
11635
|
+
agent: z13.object({
|
|
11266
11636
|
logo: AssetVariantsSchema.optional(),
|
|
11267
|
-
brandDisplayMode:
|
|
11268
|
-
density:
|
|
11637
|
+
brandDisplayMode: z13.enum(["auto", "logo-only", "logo-name", "name-only"]).optional(),
|
|
11638
|
+
density: z13.enum(["compact", "default", "comfortable"]).optional()
|
|
11269
11639
|
}).strict().optional()
|
|
11270
11640
|
}).strict(),
|
|
11271
11641
|
landingPage: TenantLandingPageConfigSchema.optional(),
|
|
11272
|
-
auth:
|
|
11273
|
-
enabled:
|
|
11274
|
-
oidc:
|
|
11275
|
-
password:
|
|
11276
|
-
hideAuthToast:
|
|
11277
|
-
autoReload:
|
|
11278
|
-
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()
|
|
11279
11649
|
}).strict(),
|
|
11280
|
-
endpoints:
|
|
11281
|
-
module:
|
|
11282
|
-
behavior:
|
|
11283
|
-
clearWorkflowFormStorageAfterUpdate:
|
|
11284
|
-
autoApproveOAuth:
|
|
11285
|
-
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()
|
|
11286
11656
|
}).strict(),
|
|
11287
|
-
dataManagement:
|
|
11288
|
-
favoriteOntologyId:
|
|
11289
|
-
pairedOntologyId:
|
|
11290
|
-
galleryOntologyIds:
|
|
11291
|
-
galleryOntologyId:
|
|
11292
|
-
dataBrowserDefaultOntologyId:
|
|
11293
|
-
workflowResultOntologyId:
|
|
11294
|
-
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({
|
|
11295
11665
|
ontologyId: ContractIdentifierSchema,
|
|
11296
11666
|
viewId: ContractIdentifierSchema.optional(),
|
|
11297
|
-
viewType:
|
|
11667
|
+
viewType: z13.enum(["filter", "container", "share_link"]).optional(),
|
|
11298
11668
|
teamId: ContractIdentifierSchema.optional(),
|
|
11299
|
-
teamOnly:
|
|
11300
|
-
pageSize:
|
|
11301
|
-
sortBy:
|
|
11302
|
-
sortOrder:
|
|
11303
|
-
fieldMap:
|
|
11304
|
-
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()
|
|
11305
11675
|
}).strict().optional(),
|
|
11306
|
-
homeTrendAssistant:
|
|
11676
|
+
homeTrendAssistant: z13.object({
|
|
11307
11677
|
ontologyId: ContractIdentifierSchema.optional(),
|
|
11308
11678
|
viewId: ContractIdentifierSchema.optional(),
|
|
11309
11679
|
viewInstanceId: ContractIdentifierSchema.optional(),
|
|
11310
|
-
viewName:
|
|
11680
|
+
viewName: z13.string().optional(),
|
|
11311
11681
|
teamId: ContractIdentifierSchema.optional(),
|
|
11312
11682
|
designOptionsWorkflowId: ContractIdentifierSchema.optional(),
|
|
11313
|
-
tep:
|
|
11314
|
-
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()
|
|
11315
11685
|
}).strict().optional(),
|
|
11316
11686
|
trendRadar: TenantTrendRadarSourcesSchema.optional(),
|
|
11317
|
-
sharing:
|
|
11318
|
-
silentViewLinks:
|
|
11319
|
-
shareAccess:
|
|
11320
|
-
shareDialog:
|
|
11321
|
-
audience:
|
|
11322
|
-
accessLevel:
|
|
11323
|
-
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()
|
|
11324
11694
|
}).strict().optional()
|
|
11325
11695
|
}).strict().optional()
|
|
11326
11696
|
}).strict().optional(),
|
|
11327
|
-
compute:
|
|
11328
|
-
integrations:
|
|
11329
|
-
harbor:
|
|
11330
|
-
gitlab:
|
|
11331
|
-
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()
|
|
11332
11702
|
}).strict().optional()
|
|
11333
11703
|
}).strict().optional(),
|
|
11334
|
-
data:
|
|
11335
|
-
storage:
|
|
11336
|
-
presignMode:
|
|
11337
|
-
presign:
|
|
11338
|
-
expiresInSeconds:
|
|
11339
|
-
buckets:
|
|
11340
|
-
|
|
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({
|
|
11341
11711
|
id: ContractIdentifierSchema,
|
|
11342
11712
|
provider: ContractIdentifierSchema,
|
|
11343
11713
|
preferredUrlPatternId: ContractIdentifierSchema,
|
|
11344
|
-
urlPatterns:
|
|
11345
|
-
|
|
11714
|
+
urlPatterns: z13.array(
|
|
11715
|
+
z13.object({
|
|
11346
11716
|
id: ContractIdentifierSchema,
|
|
11347
|
-
type:
|
|
11348
|
-
hostname:
|
|
11349
|
-
preferred:
|
|
11350
|
-
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()
|
|
11351
11721
|
}).strict()
|
|
11352
11722
|
)
|
|
11353
11723
|
}).strict()
|
|
11354
11724
|
)
|
|
11355
11725
|
}).strict().optional()
|
|
11356
11726
|
}).strict().optional(),
|
|
11357
|
-
monkeyData:
|
|
11727
|
+
monkeyData: z13.object({ baseUrl: z13.string().optional() }).strict().optional()
|
|
11358
11728
|
}).strict();
|
|
11359
|
-
var TenantProductConfigSchema =
|
|
11360
|
-
contract:
|
|
11729
|
+
var TenantProductConfigSchema = z13.object({
|
|
11730
|
+
contract: z13.literal("TenantProductConfig"),
|
|
11361
11731
|
tenantId: ContractIdentifierSchema,
|
|
11362
11732
|
appId: ContractIdentifierSchema,
|
|
11363
11733
|
environment: ContractIdentifierSchema,
|
|
11364
11734
|
designTokens: TenantDesignTokensConfigSchema,
|
|
11365
|
-
moduleRefs:
|
|
11366
|
-
pageRefs:
|
|
11367
|
-
featureFlags:
|
|
11735
|
+
moduleRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11736
|
+
pageRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11737
|
+
featureFlags: z13.record(z13.string(), z13.boolean()).default({}),
|
|
11368
11738
|
authBinding: TenantAuthBindingsSchema,
|
|
11369
11739
|
dataBinding: TenantDataBindingsSchema,
|
|
11370
|
-
sourceMap:
|
|
11371
|
-
warnings:
|
|
11740
|
+
sourceMap: z13.record(z13.string(), ContractIdentifierSchema),
|
|
11741
|
+
warnings: z13.array(z13.string()).default([]),
|
|
11742
|
+
menus: MenuDefinitionSetSchema.optional(),
|
|
11372
11743
|
applicationConfig: TenantApplicationConfigSchema
|
|
11373
11744
|
}).strict();
|
|
11374
|
-
var TenantRuntimeConfigSchema =
|
|
11375
|
-
contract:
|
|
11745
|
+
var TenantRuntimeConfigSchema = z13.object({
|
|
11746
|
+
contract: z13.literal("TenantRuntimeConfig"),
|
|
11376
11747
|
tenantId: ContractIdentifierSchema,
|
|
11377
11748
|
appId: ContractIdentifierSchema,
|
|
11378
11749
|
environment: ContractIdentifierSchema,
|
|
11379
11750
|
designTokens: ResolvedThemeTokensSchema,
|
|
11380
|
-
moduleRefs:
|
|
11381
|
-
pageRefs:
|
|
11382
|
-
featureFlags:
|
|
11751
|
+
moduleRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11752
|
+
pageRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11753
|
+
featureFlags: z13.record(z13.string(), z13.boolean()).default({}),
|
|
11383
11754
|
authBinding: TenantAuthBindingsSchema,
|
|
11384
11755
|
dataBinding: TenantDataBindingsSchema,
|
|
11385
|
-
sourceMap:
|
|
11386
|
-
warnings:
|
|
11756
|
+
sourceMap: z13.record(z13.string(), ContractIdentifierSchema),
|
|
11757
|
+
warnings: z13.array(z13.string()).default([]),
|
|
11758
|
+
menuBundle: MenuRuntimeBundleSchema.optional(),
|
|
11387
11759
|
applicationConfig: TenantApplicationConfigSchema
|
|
11388
11760
|
}).strict();
|
|
11389
11761
|
|
|
11390
11762
|
// src/contracts/trend.ts
|
|
11391
|
-
import { z as
|
|
11392
|
-
var RadarDecisionMetricsSchema =
|
|
11393
|
-
currentSales:
|
|
11394
|
-
forecastSales:
|
|
11395
|
-
searchHeat:
|
|
11396
|
-
socialHeat:
|
|
11397
|
-
confidence:
|
|
11398
|
-
}).strict();
|
|
11399
|
-
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({
|
|
11400
11772
|
sourceId: ContractIdentifierSchema,
|
|
11401
11773
|
provider: ContractIdentifierSchema,
|
|
11402
|
-
channel:
|
|
11774
|
+
channel: z14.enum(["trend", "ecommerce", "social", "search", "internal"]),
|
|
11403
11775
|
collectedAt: IsoDateTimeSchema,
|
|
11404
|
-
sourceUrl:
|
|
11405
|
-
evidenceRefs:
|
|
11776
|
+
sourceUrl: z14.string().url().optional(),
|
|
11777
|
+
evidenceRefs: z14.array(EntityRefSchema).default([])
|
|
11406
11778
|
}).strict();
|
|
11407
|
-
var TrendIngestRunSchema =
|
|
11408
|
-
contract:
|
|
11779
|
+
var TrendIngestRunSchema = z14.object({
|
|
11780
|
+
contract: z14.literal("TrendIngestRun"),
|
|
11409
11781
|
ingestRunId: ContractIdentifierSchema,
|
|
11410
11782
|
sourceId: ContractIdentifierSchema,
|
|
11411
11783
|
requestId: ContractIdentifierSchema,
|
|
11412
11784
|
idempotencyKey: ContractIdentifierSchema,
|
|
11413
|
-
status:
|
|
11414
|
-
recordCount:
|
|
11415
|
-
errorCount:
|
|
11785
|
+
status: z14.enum(["RUNNING", "SUCCEEDED", "FAILED", "PARTIAL"]),
|
|
11786
|
+
recordCount: z14.number().int().nonnegative(),
|
|
11787
|
+
errorCount: z14.number().int().nonnegative(),
|
|
11416
11788
|
startedAt: IsoDateTimeSchema,
|
|
11417
11789
|
completedAt: IsoDateTimeSchema.optional()
|
|
11418
11790
|
}).strict();
|
|
11419
|
-
var TrendSourceRecordSchema =
|
|
11420
|
-
contract:
|
|
11791
|
+
var TrendSourceRecordSchema = z14.object({
|
|
11792
|
+
contract: z14.literal("TrendSourceRecord"),
|
|
11421
11793
|
sourceRecordId: ContractIdentifierSchema,
|
|
11422
11794
|
source: TrendSourceSchema,
|
|
11423
11795
|
ingestRunRef: EntityRefSchema,
|
|
11424
|
-
recordVersion:
|
|
11796
|
+
recordVersion: z14.number().int().positive(),
|
|
11425
11797
|
contentHash: Sha256Schema,
|
|
11426
11798
|
payload: JsonValueSchema,
|
|
11427
11799
|
idempotencyKey: ContractIdentifierSchema,
|
|
11428
11800
|
collectedAt: IsoDateTimeSchema
|
|
11429
11801
|
}).strict();
|
|
11430
|
-
var HotwordBodySchema =
|
|
11431
|
-
contract:
|
|
11802
|
+
var HotwordBodySchema = z14.object({
|
|
11803
|
+
contract: z14.literal("HotwordBody"),
|
|
11432
11804
|
hotwordId: ContractIdentifierSchema,
|
|
11433
|
-
label:
|
|
11434
|
-
normalizedLabel:
|
|
11435
|
-
categories:
|
|
11436
|
-
sourceRefs:
|
|
11437
|
-
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([]),
|
|
11438
11810
|
createdAt: IsoDateTimeSchema,
|
|
11439
11811
|
updatedAt: IsoDateTimeSchema
|
|
11440
11812
|
}).strict();
|
|
11441
11813
|
var CommerceBodyFieldsSchema = {
|
|
11442
|
-
displayName:
|
|
11443
|
-
normalizedName:
|
|
11444
|
-
categories:
|
|
11445
|
-
sourceRefs:
|
|
11446
|
-
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([]),
|
|
11447
11819
|
createdAt: IsoDateTimeSchema,
|
|
11448
11820
|
updatedAt: IsoDateTimeSchema
|
|
11449
11821
|
};
|
|
11450
|
-
var BrandBodySchema =
|
|
11451
|
-
contract:
|
|
11822
|
+
var BrandBodySchema = z14.object({
|
|
11823
|
+
contract: z14.literal("BrandBody"),
|
|
11452
11824
|
brandId: ContractIdentifierSchema,
|
|
11453
11825
|
...CommerceBodyFieldsSchema
|
|
11454
11826
|
}).strict();
|
|
11455
|
-
var ProductBodySchema =
|
|
11456
|
-
contract:
|
|
11827
|
+
var ProductBodySchema = z14.object({
|
|
11828
|
+
contract: z14.literal("ProductBody"),
|
|
11457
11829
|
productId: ContractIdentifierSchema,
|
|
11458
11830
|
brandRef: EntityRefSchema.optional(),
|
|
11459
11831
|
...CommerceBodyFieldsSchema
|
|
11460
11832
|
}).strict();
|
|
11461
|
-
var TrendMetricSnapshotSchema =
|
|
11462
|
-
contract:
|
|
11833
|
+
var TrendMetricSnapshotSchema = z14.object({
|
|
11834
|
+
contract: z14.literal("TrendMetricSnapshot"),
|
|
11463
11835
|
snapshotId: ContractIdentifierSchema,
|
|
11464
11836
|
subjectRef: EntityRefSchema,
|
|
11465
11837
|
observedAt: IsoDateTimeSchema,
|
|
11466
|
-
metrics:
|
|
11467
|
-
confidence:
|
|
11468
|
-
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)
|
|
11469
11841
|
}).strict();
|
|
11470
|
-
var RadarScoreModelBodySchema =
|
|
11471
|
-
contract:
|
|
11842
|
+
var RadarScoreModelBodySchema = z14.object({
|
|
11843
|
+
contract: z14.literal("RadarScoreModelBody"),
|
|
11472
11844
|
modelId: ContractIdentifierSchema,
|
|
11473
|
-
version:
|
|
11845
|
+
version: z14.number().int().positive(),
|
|
11474
11846
|
weights: RadarDecisionMetricsSchema,
|
|
11475
|
-
thresholds:
|
|
11476
|
-
explanationRules:
|
|
11847
|
+
thresholds: z14.record(z14.string(), z14.number().finite()).default({}),
|
|
11848
|
+
explanationRules: z14.record(z14.string(), z14.string().trim().min(1)).default({}),
|
|
11477
11849
|
createdAt: IsoDateTimeSchema
|
|
11478
11850
|
}).strict();
|
|
11479
|
-
var RadarScoreProjectionSchema =
|
|
11480
|
-
contract:
|
|
11851
|
+
var RadarScoreProjectionSchema = z14.object({
|
|
11852
|
+
contract: z14.literal("RadarScoreProjection"),
|
|
11481
11853
|
projectionId: ContractIdentifierSchema,
|
|
11482
11854
|
subjectRef: EntityRefSchema,
|
|
11483
11855
|
modelRef: EntityRefSchema,
|
|
11484
|
-
totalScore:
|
|
11856
|
+
totalScore: z14.number().finite(),
|
|
11485
11857
|
dimensions: RadarDecisionMetricsSchema,
|
|
11486
|
-
evidenceRefs:
|
|
11858
|
+
evidenceRefs: z14.array(EntityRefSchema).min(1),
|
|
11487
11859
|
freshnessAt: IsoDateTimeSchema
|
|
11488
11860
|
}).strict();
|
|
11489
|
-
var RadarPanoramaNodeSchema =
|
|
11861
|
+
var RadarPanoramaNodeSchema = z14.object({
|
|
11490
11862
|
ref: EntityRefSchema,
|
|
11491
|
-
label:
|
|
11492
|
-
categories:
|
|
11493
|
-
score:
|
|
11863
|
+
label: z14.string().trim().min(1),
|
|
11864
|
+
categories: z14.array(ContractIdentifierSchema).default([]),
|
|
11865
|
+
score: z14.number().finite().optional(),
|
|
11494
11866
|
freshnessAt: IsoDateTimeSchema.optional()
|
|
11495
11867
|
}).strict();
|
|
11496
|
-
var RadarPanoramaEdgeSchema =
|
|
11868
|
+
var RadarPanoramaEdgeSchema = z14.object({
|
|
11497
11869
|
sourceRef: EntityRefSchema,
|
|
11498
11870
|
targetRef: EntityRefSchema,
|
|
11499
11871
|
relation: ContractIdentifierSchema,
|
|
11500
|
-
evidenceRefs:
|
|
11872
|
+
evidenceRefs: z14.array(EntityRefSchema).default([])
|
|
11501
11873
|
}).strict();
|
|
11502
|
-
var RadarPanoramaSchema =
|
|
11503
|
-
contract:
|
|
11504
|
-
nodes:
|
|
11505
|
-
edges:
|
|
11874
|
+
var RadarPanoramaSchema = z14.object({
|
|
11875
|
+
contract: z14.literal("RadarPanorama"),
|
|
11876
|
+
nodes: z14.array(RadarPanoramaNodeSchema),
|
|
11877
|
+
edges: z14.array(RadarPanoramaEdgeSchema),
|
|
11506
11878
|
generatedAt: IsoDateTimeSchema
|
|
11507
11879
|
}).strict();
|
|
11508
|
-
var BrandGeneticsProfileSchema =
|
|
11509
|
-
contract:
|
|
11880
|
+
var BrandGeneticsProfileSchema = z14.object({
|
|
11881
|
+
contract: z14.literal("BrandGeneticsProfile"),
|
|
11510
11882
|
brandRef: EntityRefSchema,
|
|
11511
|
-
categories:
|
|
11512
|
-
signature:
|
|
11513
|
-
relatedRefs:
|
|
11514
|
-
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([]),
|
|
11515
11887
|
computedAt: IsoDateTimeSchema
|
|
11516
11888
|
}).strict();
|
|
11517
|
-
var RadarOpportunityMatrixPointSchema =
|
|
11889
|
+
var RadarOpportunityMatrixPointSchema = z14.object({
|
|
11518
11890
|
subjectRef: EntityRefSchema,
|
|
11519
|
-
label:
|
|
11520
|
-
x:
|
|
11521
|
-
y:
|
|
11522
|
-
score:
|
|
11523
|
-
evidenceRefs:
|
|
11524
|
-
}).strict();
|
|
11525
|
-
var RadarOpportunityMatrixSchema =
|
|
11526
|
-
contract:
|
|
11527
|
-
xMetric:
|
|
11528
|
-
yMetric:
|
|
11529
|
-
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),
|
|
11530
11902
|
computedAt: IsoDateTimeSchema
|
|
11531
11903
|
}).strict();
|
|
11532
|
-
var RadarQueryBodySchema =
|
|
11533
|
-
contract:
|
|
11904
|
+
var RadarQueryBodySchema = z14.object({
|
|
11905
|
+
contract: z14.literal("RadarQueryBody"),
|
|
11534
11906
|
queryId: ContractIdentifierSchema,
|
|
11535
|
-
filters:
|
|
11536
|
-
sort:
|
|
11907
|
+
filters: z14.record(z14.string(), JsonValueSchema).default({}),
|
|
11908
|
+
sort: z14.object({
|
|
11537
11909
|
field: ContractIdentifierSchema,
|
|
11538
|
-
direction:
|
|
11910
|
+
direction: z14.enum(["asc", "desc"])
|
|
11539
11911
|
}).strict(),
|
|
11540
|
-
pageSize:
|
|
11912
|
+
pageSize: z14.number().int().min(1).max(200),
|
|
11541
11913
|
updatedAt: IsoDateTimeSchema
|
|
11542
11914
|
}).strict();
|
|
11543
|
-
var SavedRadarQuerySchema =
|
|
11544
|
-
contract:
|
|
11915
|
+
var SavedRadarQuerySchema = z14.object({
|
|
11916
|
+
contract: z14.literal("SavedRadarQuery"),
|
|
11545
11917
|
savedQueryId: ContractIdentifierSchema,
|
|
11546
11918
|
teamId: ContractIdentifierSchema,
|
|
11547
11919
|
ownerRef: EntityRefSchema,
|
|
11548
|
-
name:
|
|
11920
|
+
name: z14.string().trim().min(1),
|
|
11549
11921
|
queryRef: EntityRefSchema,
|
|
11550
|
-
expectedVersion:
|
|
11922
|
+
expectedVersion: z14.number().int().nonnegative(),
|
|
11551
11923
|
updatedAt: IsoDateTimeSchema
|
|
11552
11924
|
}).strict();
|
|
11553
|
-
var RadarSelectionSchema =
|
|
11554
|
-
contract:
|
|
11925
|
+
var RadarSelectionSchema = z14.object({
|
|
11926
|
+
contract: z14.literal("RadarSelection"),
|
|
11555
11927
|
selectionId: ContractIdentifierSchema,
|
|
11556
11928
|
teamId: ContractIdentifierSchema,
|
|
11557
11929
|
ownerRef: EntityRefSchema,
|
|
11558
|
-
subjectRefs:
|
|
11559
|
-
status:
|
|
11560
|
-
note:
|
|
11561
|
-
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(),
|
|
11562
11934
|
updatedAt: IsoDateTimeSchema
|
|
11563
11935
|
}).strict();
|
|
11564
|
-
var RadarAnalysisRunSchema =
|
|
11565
|
-
contract:
|
|
11936
|
+
var RadarAnalysisRunSchema = z14.object({
|
|
11937
|
+
contract: z14.literal("RadarAnalysisRun"),
|
|
11566
11938
|
runId: ContractIdentifierSchema,
|
|
11567
11939
|
teamId: ContractIdentifierSchema,
|
|
11568
11940
|
selectionRef: EntityRefSchema,
|
|
@@ -11571,66 +11943,66 @@ var RadarAnalysisRunSchema = z13.object({
|
|
|
11571
11943
|
designProjectRef: EntityRefSchema.optional(),
|
|
11572
11944
|
replayedFromRef: EntityRefSchema.optional(),
|
|
11573
11945
|
workflowDefinitionTeamId: ContractIdentifierSchema.optional(),
|
|
11574
|
-
workflowInput:
|
|
11575
|
-
createDesignProject:
|
|
11576
|
-
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(),
|
|
11577
11949
|
modelRef: EntityRefSchema,
|
|
11578
11950
|
requestId: ContractIdentifierSchema,
|
|
11579
11951
|
idempotencyKey: ContractIdentifierSchema,
|
|
11580
|
-
status:
|
|
11581
|
-
outputRefs:
|
|
11582
|
-
error:
|
|
11952
|
+
status: z14.enum(["QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
|
|
11953
|
+
outputRefs: z14.array(EntityRefSchema).default([]),
|
|
11954
|
+
error: z14.object({
|
|
11583
11955
|
code: ContractIdentifierSchema,
|
|
11584
|
-
message:
|
|
11585
|
-
retryable:
|
|
11956
|
+
message: z14.string().trim().min(1),
|
|
11957
|
+
retryable: z14.boolean()
|
|
11586
11958
|
}).strict().optional(),
|
|
11587
11959
|
startedAt: IsoDateTimeSchema.optional(),
|
|
11588
11960
|
completedAt: IsoDateTimeSchema.optional(),
|
|
11589
11961
|
createdAt: IsoDateTimeSchema
|
|
11590
11962
|
}).strict();
|
|
11591
|
-
var RadarAnalysisAssetSchema =
|
|
11963
|
+
var RadarAnalysisAssetSchema = z14.object({
|
|
11592
11964
|
artifactRef: EntityRefSchema,
|
|
11593
11965
|
kind: ContractIdentifierSchema,
|
|
11594
|
-
mimeType:
|
|
11595
|
-
url:
|
|
11596
|
-
metadata:
|
|
11966
|
+
mimeType: z14.string().trim().min(1).optional(),
|
|
11967
|
+
url: z14.string().url(),
|
|
11968
|
+
metadata: z14.record(z14.string(), JsonValueSchema).default({}),
|
|
11597
11969
|
createdAt: IsoDateTimeSchema
|
|
11598
11970
|
}).strict();
|
|
11599
|
-
var RadarAnalysisDetailSchema =
|
|
11600
|
-
contract:
|
|
11971
|
+
var RadarAnalysisDetailSchema = z14.object({
|
|
11972
|
+
contract: z14.literal("RadarAnalysisDetail"),
|
|
11601
11973
|
run: RadarAnalysisRunSchema,
|
|
11602
|
-
runVersion:
|
|
11974
|
+
runVersion: z14.number().int().positive(),
|
|
11603
11975
|
selection: RadarSelectionSchema,
|
|
11604
|
-
outputs:
|
|
11605
|
-
assets:
|
|
11606
|
-
lineage:
|
|
11976
|
+
outputs: z14.array(OutputRecordSchema),
|
|
11977
|
+
assets: z14.array(RadarAnalysisAssetSchema),
|
|
11978
|
+
lineage: z14.array(LineageRecordSchema)
|
|
11607
11979
|
}).strict();
|
|
11608
|
-
var RadarActionRecordSchema =
|
|
11609
|
-
contract:
|
|
11980
|
+
var RadarActionRecordSchema = z14.object({
|
|
11981
|
+
contract: z14.literal("RadarActionRecord"),
|
|
11610
11982
|
actionId: ContractIdentifierSchema,
|
|
11611
11983
|
teamId: ContractIdentifierSchema,
|
|
11612
11984
|
actorRef: EntityRefSchema,
|
|
11613
|
-
action:
|
|
11985
|
+
action: z14.enum(["stash", "select", "reject", "archive", "launch", "retry", "replay", "rollback"]),
|
|
11614
11986
|
targetRef: EntityRefSchema,
|
|
11615
11987
|
requestId: ContractIdentifierSchema,
|
|
11616
11988
|
idempotencyKey: ContractIdentifierSchema,
|
|
11617
|
-
expectedVersion:
|
|
11989
|
+
expectedVersion: z14.number().int().nonnegative(),
|
|
11618
11990
|
occurredAt: IsoDateTimeSchema
|
|
11619
11991
|
}).strict();
|
|
11620
|
-
var RadarWritebackRecordSchema =
|
|
11621
|
-
contract:
|
|
11992
|
+
var RadarWritebackRecordSchema = z14.object({
|
|
11993
|
+
contract: z14.literal("RadarWritebackRecord"),
|
|
11622
11994
|
writebackId: ContractIdentifierSchema,
|
|
11623
11995
|
actionRef: EntityRefSchema,
|
|
11624
11996
|
targetRef: EntityRefSchema,
|
|
11625
|
-
status:
|
|
11626
|
-
resultingVersion:
|
|
11627
|
-
error:
|
|
11997
|
+
status: z14.enum(["PENDING", "APPLIED", "FAILED"]),
|
|
11998
|
+
resultingVersion: z14.number().int().nonnegative().optional(),
|
|
11999
|
+
error: z14.string().trim().min(1).optional(),
|
|
11628
12000
|
recordedAt: IsoDateTimeSchema
|
|
11629
12001
|
}).strict();
|
|
11630
12002
|
|
|
11631
12003
|
// src/contracts/workflow-definition.ts
|
|
11632
|
-
import { z as
|
|
11633
|
-
var ConductorTaskTypeSchema =
|
|
12004
|
+
import { z as z15 } from "zod";
|
|
12005
|
+
var ConductorTaskTypeSchema = z15.enum([
|
|
11634
12006
|
"SIMPLE",
|
|
11635
12007
|
"DYNAMIC",
|
|
11636
12008
|
"FORK_JOIN",
|
|
@@ -11679,46 +12051,46 @@ var requiredTaskFields = {
|
|
|
11679
12051
|
WAIT: ["inputParameters"],
|
|
11680
12052
|
TERMINATE: ["inputParameters"]
|
|
11681
12053
|
};
|
|
11682
|
-
var ConductorTaskDefinitionSchema =
|
|
11683
|
-
() =>
|
|
12054
|
+
var ConductorTaskDefinitionSchema = z15.lazy(
|
|
12055
|
+
() => z15.object({
|
|
11684
12056
|
name: ContractIdentifierSchema,
|
|
11685
12057
|
taskReferenceName: ContractIdentifierSchema,
|
|
11686
12058
|
type: ConductorTaskTypeSchema,
|
|
11687
|
-
inputParameters:
|
|
11688
|
-
startDelay:
|
|
11689
|
-
optional:
|
|
11690
|
-
asyncComplete:
|
|
11691
|
-
rateLimited:
|
|
11692
|
-
retryCount:
|
|
11693
|
-
taskDefinition:
|
|
11694
|
-
loopCondition:
|
|
11695
|
-
loopOver:
|
|
11696
|
-
sink:
|
|
11697
|
-
forkTasks:
|
|
11698
|
-
joinOn:
|
|
11699
|
-
defaultExclusiveJoinTask:
|
|
11700
|
-
dynamicForkTasksParam:
|
|
11701
|
-
dynamicForkTasksInputParamName:
|
|
11702
|
-
subWorkflowParam:
|
|
11703
|
-
$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(),
|
|
11704
12076
|
name: ContractIdentifierSchema,
|
|
11705
|
-
version:
|
|
11706
|
-
taskToDomain:
|
|
11707
|
-
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()
|
|
11708
12080
|
}).strict().optional(),
|
|
11709
|
-
decisionCases:
|
|
11710
|
-
defaultCase:
|
|
11711
|
-
evaluatorType:
|
|
11712
|
-
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(),
|
|
11713
12085
|
__alias: JsonValueSchema.optional(),
|
|
11714
|
-
callbackFromWorker:
|
|
12086
|
+
callbackFromWorker: z15.boolean().optional(),
|
|
11715
12087
|
caseExpression: JsonValueSchema.optional(),
|
|
11716
|
-
caseValueParam:
|
|
11717
|
-
dependencies:
|
|
11718
|
-
description:
|
|
11719
|
-
dynamicTaskNameParam:
|
|
11720
|
-
joinMode:
|
|
11721
|
-
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(),
|
|
11722
12094
|
joinTaskRef: ContractIdentifierSchema.optional(),
|
|
11723
12095
|
forkTaskRef: ContractIdentifierSchema.optional()
|
|
11724
12096
|
}).strict().superRefine((task, context) => {
|
|
@@ -11732,29 +12104,29 @@ var ConductorTaskDefinitionSchema = z14.lazy(
|
|
|
11732
12104
|
}
|
|
11733
12105
|
})
|
|
11734
12106
|
);
|
|
11735
|
-
var ConductorWorkflowDefinitionSchema =
|
|
11736
|
-
ownerApp:
|
|
11737
|
-
createTime:
|
|
11738
|
-
updateTime:
|
|
11739
|
-
createdBy:
|
|
11740
|
-
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(),
|
|
11741
12113
|
name: ContractIdentifierSchema,
|
|
11742
|
-
description:
|
|
11743
|
-
version:
|
|
11744
|
-
tasks:
|
|
11745
|
-
inputParameters:
|
|
11746
|
-
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(),
|
|
11747
12119
|
failureWorkflow: ContractIdentifierSchema.optional(),
|
|
11748
|
-
schemaVersion:
|
|
11749
|
-
restartable:
|
|
11750
|
-
workflowStatusListenerEnabled:
|
|
11751
|
-
ownerEmail:
|
|
11752
|
-
timeoutPolicy:
|
|
11753
|
-
timeoutSeconds:
|
|
11754
|
-
variables:
|
|
11755
|
-
inputTemplate:
|
|
11756
|
-
}).strict();
|
|
11757
|
-
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([
|
|
11758
12130
|
"string",
|
|
11759
12131
|
"file",
|
|
11760
12132
|
"number",
|
|
@@ -11764,213 +12136,213 @@ var WorkflowParameterTypeSchema = z14.enum([
|
|
|
11764
12136
|
"notice",
|
|
11765
12137
|
"canvas-assist"
|
|
11766
12138
|
]);
|
|
11767
|
-
var WorkflowConditionalStateSchema =
|
|
11768
|
-
conditions:
|
|
11769
|
-
|
|
11770
|
-
field:
|
|
11771
|
-
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"]),
|
|
11772
12144
|
value: JsonValueSchema
|
|
11773
12145
|
}).strict()
|
|
11774
12146
|
),
|
|
11775
|
-
logic:
|
|
11776
|
-
}).strict();
|
|
11777
|
-
var ImageSelectMappingAppearanceSchema =
|
|
11778
|
-
columns:
|
|
11779
|
-
cardSize:
|
|
11780
|
-
imageAspectRatio:
|
|
11781
|
-
gap:
|
|
11782
|
-
radius:
|
|
11783
|
-
borderStyle:
|
|
11784
|
-
borderWidth:
|
|
11785
|
-
enableScroll:
|
|
11786
|
-
maxHeight:
|
|
11787
|
-
enableCollapse:
|
|
11788
|
-
visibleRows:
|
|
11789
|
-
hideLabel:
|
|
11790
|
-
hideDescription:
|
|
11791
|
-
hideValue:
|
|
11792
|
-
}).strict();
|
|
11793
|
-
var ComfyWorkflowPortBindingSchema =
|
|
11794
|
-
node:
|
|
11795
|
-
key:
|
|
11796
|
-
}).strict();
|
|
11797
|
-
var WorkflowParameterTypeOptionsSchema =
|
|
11798
|
-
editor:
|
|
11799
|
-
editorLanguage:
|
|
11800
|
-
maxValue:
|
|
11801
|
-
minValue:
|
|
11802
|
-
max:
|
|
11803
|
-
min:
|
|
11804
|
-
multipleValues:
|
|
11805
|
-
numberPrecision:
|
|
11806
|
-
password:
|
|
11807
|
-
rows:
|
|
11808
|
-
assetType:
|
|
11809
|
-
accept:
|
|
11810
|
-
maxSize:
|
|
11811
|
-
fileType:
|
|
11812
|
-
aiMultiShotMainImageField:
|
|
11813
|
-
aiMultiShotWorkflowAppId:
|
|
11814
|
-
aiMultiShotWorkflowId:
|
|
11815
|
-
allowCustomInput:
|
|
11816
|
-
allowUploadVideo:
|
|
11817
|
-
aspectRatioField:
|
|
11818
|
-
assemblyValueType:
|
|
11819
|
-
autoAnalyzeDesignImage:
|
|
11820
|
-
autoDetectAspectRatio:
|
|
11821
|
-
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(),
|
|
11822
12194
|
comfyOptions: ComfyWorkflowPortBindingSchema.optional(),
|
|
11823
|
-
comfyuiModelServerId:
|
|
11824
|
-
comfyuiModelTypeName:
|
|
12195
|
+
comfyuiModelServerId: z15.string().optional(),
|
|
12196
|
+
comfyuiModelTypeName: z15.string().optional(),
|
|
11825
12197
|
defaultCustomInput: JsonValueSchema.optional(),
|
|
11826
|
-
descriptionAlert:
|
|
11827
|
-
disabled:
|
|
11828
|
-
editable:
|
|
11829
|
-
enableAiMultiShot:
|
|
11830
|
-
enableBooleanSwitchMode:
|
|
11831
|
-
enableClear:
|
|
11832
|
-
enableExpand:
|
|
11833
|
-
enableImageMask:
|
|
11834
|
-
enableImageOverlay:
|
|
11835
|
-
enablePopupEditor:
|
|
11836
|
-
enablePromptFontSize:
|
|
11837
|
-
enableReset:
|
|
11838
|
-
enableSelectItemIcon:
|
|
11839
|
-
enableSelectList:
|
|
11840
|
-
enableSelectSearch:
|
|
11841
|
-
enableSliderEnterMode:
|
|
11842
|
-
enableVoice:
|
|
11843
|
-
expandButtonText:
|
|
11844
|
-
foldUp:
|
|
11845
|
-
hidden:
|
|
11846
|
-
hideRequiredDot:
|
|
11847
|
-
inlineTitleWithSelect:
|
|
11848
|
-
knowledgeGraphButtonText:
|
|
11849
|
-
identifyAttributeCount:
|
|
11850
|
-
identifyAttributes:
|
|
11851
|
-
identifyMaxVariants:
|
|
11852
|
-
identifySourceField:
|
|
11853
|
-
imageOverlayBaseField:
|
|
11854
|
-
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(),
|
|
11855
12227
|
imageSelectMappingAppearance: ImageSelectMappingAppearanceSchema.optional(),
|
|
11856
|
-
imageSelectMappingColumns:
|
|
11857
|
-
imageSelectMappingEnableCustomUpload:
|
|
11858
|
-
imageSelectMappingHideLabel:
|
|
11859
|
-
imageSelectMappingHideLink:
|
|
11860
|
-
imageSelectMappingHideMeta:
|
|
11861
|
-
imageSelectMappingInlineUseLargeUploadBox:
|
|
11862
|
-
imageSelectMappingPromptField:
|
|
11863
|
-
imageSelectMappingTabOrder:
|
|
11864
|
-
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(),
|
|
11865
12237
|
imageSelectMappingTemplatePrompt: LocalizedTextSchema.optional(),
|
|
11866
12238
|
imageSelectMappingTemplateTabTitle: LocalizedTextSchema.optional(),
|
|
11867
|
-
imageSelectMappingUploadMode:
|
|
12239
|
+
imageSelectMappingUploadMode: z15.enum(["tabs", "inline"]).optional(),
|
|
11868
12240
|
imageSelectMappingUploadPrompt: LocalizedTextSchema.optional(),
|
|
11869
12241
|
imageSelectMappingUploadTabTitle: LocalizedTextSchema.optional(),
|
|
11870
|
-
endpoints:
|
|
11871
|
-
examples:
|
|
12242
|
+
endpoints: z15.array(JsonValueSchema).optional(),
|
|
12243
|
+
examples: z15.array(JsonValueSchema).optional(),
|
|
11872
12244
|
extraData: JsonValueSchema.optional(),
|
|
11873
12245
|
layer: JsonValueSchema.optional(),
|
|
11874
12246
|
map: JsonValueSchema.optional(),
|
|
11875
|
-
multiline:
|
|
11876
|
-
options:
|
|
11877
|
-
originalFiles:
|
|
12247
|
+
multiline: z15.boolean().optional(),
|
|
12248
|
+
options: z15.array(JsonValueSchema).optional(),
|
|
12249
|
+
originalFiles: z15.array(JsonValueSchema).optional(),
|
|
11878
12250
|
placeholder: LocalizedTextSchema.optional(),
|
|
11879
|
-
preserveSelectListOrder:
|
|
12251
|
+
preserveSelectListOrder: z15.boolean().optional(),
|
|
11880
12252
|
promptDictionary: JsonValueSchema.optional(),
|
|
11881
|
-
promptFontSize:
|
|
12253
|
+
promptFontSize: z15.number().optional(),
|
|
11882
12254
|
promptModeToggle: JsonValueSchema.optional(),
|
|
11883
|
-
requireActiveSelectFilter:
|
|
11884
|
-
restoreDefaultOnEmptyEnter:
|
|
11885
|
-
search:
|
|
11886
|
-
selectButtonEnableCollapse:
|
|
11887
|
-
selectButtonVisibleRows:
|
|
11888
|
-
selectList:
|
|
11889
|
-
selectListDisplayMode:
|
|
11890
|
-
selectPromptField:
|
|
11891
|
-
showAddLocalFileButton:
|
|
11892
|
-
singleColumn:
|
|
11893
|
-
singleFrameForMultiple:
|
|
11894
|
-
textSingleLine:
|
|
11895
|
-
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(),
|
|
11896
12268
|
tips: LocalizedTextSchema.optional(),
|
|
11897
12269
|
visibility: JsonValueSchema.optional(),
|
|
11898
|
-
voiceButtonText:
|
|
11899
|
-
designAnalysisFields:
|
|
11900
|
-
designAnalysisFillStrategy:
|
|
11901
|
-
designAnalysisMaxFields:
|
|
11902
|
-
designAnalysisType:
|
|
11903
|
-
designAnalysisFieldPrefix:
|
|
11904
|
-
}).strict();
|
|
11905
|
-
var WorkflowParameterSchema =
|
|
11906
|
-
() =>
|
|
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({
|
|
11907
12279
|
displayName: LocalizedTextSchema,
|
|
11908
12280
|
name: ContractIdentifierSchema,
|
|
11909
12281
|
type: WorkflowParameterTypeSchema,
|
|
11910
12282
|
typeOptions: WorkflowParameterTypeOptionsSchema.optional(),
|
|
11911
12283
|
default: JsonValueSchema.optional(),
|
|
11912
12284
|
description: LocalizedTextSchema.optional(),
|
|
11913
|
-
hint:
|
|
11914
|
-
displayOptions:
|
|
11915
|
-
hide:
|
|
11916
|
-
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()
|
|
11917
12289
|
}).strict().optional(),
|
|
11918
|
-
options:
|
|
11919
|
-
|
|
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(),
|
|
11920
12292
|
WorkflowParameterSchema,
|
|
11921
|
-
|
|
12293
|
+
z15.object({ displayName: z15.string(), name: ContractIdentifierSchema, values: z15.array(WorkflowParameterSchema) }).strict()
|
|
11922
12294
|
])).optional(),
|
|
11923
12295
|
placeholder: LocalizedTextSchema.optional(),
|
|
11924
|
-
isNodeSetting:
|
|
11925
|
-
noDataExpression:
|
|
11926
|
-
required:
|
|
11927
|
-
example:
|
|
11928
|
-
extractValue:
|
|
11929
|
-
properties:
|
|
11930
|
-
assetType:
|
|
11931
|
-
flag:
|
|
11932
|
-
enableExpand:
|
|
11933
|
-
enableVoice:
|
|
11934
|
-
expandButtonText:
|
|
11935
|
-
knowledgeGraphButtonText:
|
|
11936
|
-
selectListDisplayMode:
|
|
11937
|
-
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()
|
|
11938
12310
|
}).strict()
|
|
11939
12311
|
);
|
|
11940
|
-
var WorkflowOutputBindingSchema =
|
|
11941
|
-
var WorkflowNodeSchema =
|
|
12312
|
+
var WorkflowOutputBindingSchema = z15.object({ key: ContractIdentifierSchema, value: z15.string() }).strict();
|
|
12313
|
+
var WorkflowNodeSchema = z15.object({
|
|
11942
12314
|
id: ContractIdentifierSchema,
|
|
11943
12315
|
referenceName: ContractIdentifierSchema,
|
|
11944
12316
|
capabilityRef: ContractIdentifierSchema,
|
|
11945
12317
|
capabilityVersion: ContractIdentifierSchema.optional(),
|
|
11946
|
-
inputBindings:
|
|
11947
|
-
configuration:
|
|
12318
|
+
inputBindings: z15.record(z15.string(), JsonValueSchema).default({}),
|
|
12319
|
+
configuration: z15.object({ executor: z15.literal("conductor"), task: ConductorTaskDefinitionSchema }).strict()
|
|
11948
12320
|
}).strict().superRefine((node, context) => {
|
|
11949
12321
|
if (node.configuration.task.taskReferenceName !== node.referenceName) context.addIssue({ code: "custom", path: ["configuration", "task", "taskReferenceName"], message: "Conductor task reference must match node referenceName." });
|
|
11950
12322
|
if (node.configuration.task.name !== node.capabilityRef) context.addIssue({ code: "custom", path: ["configuration", "task", "name"], message: "Conductor task name must match node capabilityRef." });
|
|
11951
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." });
|
|
11952
12324
|
});
|
|
11953
|
-
var WorkflowEdgeSchema =
|
|
12325
|
+
var WorkflowEdgeSchema = z15.object({
|
|
11954
12326
|
from: ContractIdentifierSchema,
|
|
11955
12327
|
to: ContractIdentifierSchema,
|
|
11956
12328
|
outputPort: ContractIdentifierSchema.optional(),
|
|
11957
12329
|
inputPort: ContractIdentifierSchema.optional(),
|
|
11958
|
-
condition:
|
|
12330
|
+
condition: z15.string().optional()
|
|
11959
12331
|
}).strict();
|
|
11960
|
-
var WorkflowTriggerSchema =
|
|
12332
|
+
var WorkflowTriggerSchema = z15.object({
|
|
11961
12333
|
id: ContractIdentifierSchema,
|
|
11962
|
-
type:
|
|
11963
|
-
enabled:
|
|
11964
|
-
schedule:
|
|
11965
|
-
webhook:
|
|
11966
|
-
path:
|
|
11967
|
-
method:
|
|
11968
|
-
auth:
|
|
11969
|
-
basicAuth:
|
|
11970
|
-
headerAuth:
|
|
11971
|
-
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"])
|
|
11972
12344
|
}).strict().optional(),
|
|
11973
|
-
event:
|
|
12345
|
+
event: z15.object({
|
|
11974
12346
|
eventType: ContractIdentifierSchema,
|
|
11975
12347
|
configuration: JsonValueSchema.optional()
|
|
11976
12348
|
}).strict().optional()
|
|
@@ -11979,63 +12351,63 @@ var WorkflowTriggerSchema = z14.object({
|
|
|
11979
12351
|
if (trigger.type === "webhook" && !trigger.webhook) context.addIssue({ code: "custom", path: ["webhook"], message: "Webhook trigger requires webhook configuration." });
|
|
11980
12352
|
if (trigger.type === "event" && !trigger.event) context.addIssue({ code: "custom", path: ["event"], message: "Event trigger requires event configuration." });
|
|
11981
12353
|
});
|
|
11982
|
-
var WorkflowValidationIssueSchema =
|
|
12354
|
+
var WorkflowValidationIssueSchema = z15.object({
|
|
11983
12355
|
taskReferenceName: ContractIdentifierSchema,
|
|
11984
|
-
issueType:
|
|
11985
|
-
detailReason:
|
|
11986
|
-
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()
|
|
11987
12359
|
}).strict();
|
|
11988
|
-
var WorkflowDefinitionSchema =
|
|
11989
|
-
contract:
|
|
12360
|
+
var WorkflowDefinitionSchema = z15.object({
|
|
12361
|
+
contract: z15.literal("WorkflowDefinition"),
|
|
11990
12362
|
metadata: ContractMetadataSchema.omit({ name: true, description: true, labels: true }).extend({
|
|
11991
12363
|
name: LocalizedTextSchema,
|
|
11992
12364
|
description: LocalizedTextSchema.optional(),
|
|
11993
|
-
role:
|
|
12365
|
+
role: z15.enum(["workflow", "template"]),
|
|
11994
12366
|
teamId: ContractIdentifierSchema,
|
|
11995
12367
|
creatorRef: EntityRefSchema,
|
|
11996
|
-
tags:
|
|
12368
|
+
tags: z15.array(ContractIdentifierSchema).default([])
|
|
11997
12369
|
}).strict(),
|
|
11998
|
-
revision:
|
|
11999
|
-
kind:
|
|
12000
|
-
recordVersion:
|
|
12001
|
-
sourceVersion:
|
|
12370
|
+
revision: z15.object({
|
|
12371
|
+
kind: z15.enum(["release", "backup"]),
|
|
12372
|
+
recordVersion: z15.number().int().positive(),
|
|
12373
|
+
sourceVersion: z15.number().int().positive().optional()
|
|
12002
12374
|
}).strict().superRefine((revision, context) => {
|
|
12003
12375
|
if (revision.kind === "backup" && revision.sourceVersion === void 0) context.addIssue({ code: "custom", path: ["sourceVersion"], message: "Backup revisions require a sourceVersion." });
|
|
12004
12376
|
}),
|
|
12005
|
-
presentation:
|
|
12006
|
-
ports:
|
|
12007
|
-
parameters:
|
|
12008
|
-
graph:
|
|
12009
|
-
execution:
|
|
12010
|
-
timeoutMs:
|
|
12011
|
-
retries:
|
|
12012
|
-
concurrencyLimit:
|
|
12013
|
-
idempotency:
|
|
12014
|
-
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) => {
|
|
12015
12387
|
if (rateLimit.enabled && (rateLimit.max === 0 || rateLimit.windowMs === 0)) context.addIssue({ code: "custom", message: "Enabled rate limit requires positive max and windowMs." });
|
|
12016
12388
|
}).optional(),
|
|
12017
|
-
conductor:
|
|
12018
|
-
ownerApp:
|
|
12019
|
-
createTime:
|
|
12020
|
-
updateTime:
|
|
12021
|
-
createdBy:
|
|
12022
|
-
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(),
|
|
12023
12395
|
failureWorkflow: ContractIdentifierSchema.optional(),
|
|
12024
|
-
schemaVersion:
|
|
12025
|
-
restartable:
|
|
12026
|
-
workflowStatusListenerEnabled:
|
|
12027
|
-
ownerEmail:
|
|
12028
|
-
timeoutPolicy:
|
|
12029
|
-
variables:
|
|
12030
|
-
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()
|
|
12031
12403
|
}).strict()
|
|
12032
12404
|
}).strict(),
|
|
12033
|
-
triggers:
|
|
12034
|
-
views:
|
|
12035
|
-
dataContracts:
|
|
12036
|
-
governance:
|
|
12037
|
-
interfaces:
|
|
12038
|
-
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(),
|
|
12039
12411
|
shortcutRef: EntityRefSchema.optional(),
|
|
12040
12412
|
preferredAppId: ContractIdentifierSchema.optional()
|
|
12041
12413
|
}).strict().superRefine((interfaces, context) => {
|
|
@@ -12054,21 +12426,21 @@ var WorkflowDefinitionSchema = z14.object({
|
|
|
12054
12426
|
});
|
|
12055
12427
|
|
|
12056
12428
|
// src/contracts/workflow-runtime.ts
|
|
12057
|
-
import { z as
|
|
12058
|
-
var WorkflowCatalogEntrySchema =
|
|
12059
|
-
contract:
|
|
12429
|
+
import { z as z16 } from "zod";
|
|
12430
|
+
var WorkflowCatalogEntrySchema = z16.object({
|
|
12431
|
+
contract: z16.literal("WorkflowCatalogEntry"),
|
|
12060
12432
|
workflowId: ContractIdentifierSchema,
|
|
12061
12433
|
teamId: ContractIdentifierSchema,
|
|
12062
12434
|
creatorRef: EntityRefSchema,
|
|
12063
12435
|
currentDefinitionRef: EntityRefSchema,
|
|
12064
|
-
lifecycle:
|
|
12065
|
-
asset:
|
|
12066
|
-
preset:
|
|
12067
|
-
marketplacePublished:
|
|
12436
|
+
lifecycle: z16.enum(["ACTIVE", "DELETED"]),
|
|
12437
|
+
asset: z16.object({
|
|
12438
|
+
preset: z16.boolean(),
|
|
12439
|
+
marketplacePublished: z16.boolean(),
|
|
12068
12440
|
publishConfig: JsonObjectSchema.optional(),
|
|
12069
|
-
sort:
|
|
12441
|
+
sort: z16.number().int(),
|
|
12070
12442
|
forkFromRef: EntityRefSchema.optional(),
|
|
12071
|
-
notAuthorized:
|
|
12443
|
+
notAuthorized: z16.boolean()
|
|
12072
12444
|
}).strict(),
|
|
12073
12445
|
createdAt: IsoDateTimeSchema,
|
|
12074
12446
|
updatedAt: IsoDateTimeSchema,
|
|
@@ -12103,17 +12475,17 @@ var WorkflowCatalogEntrySchema = z15.object({
|
|
|
12103
12475
|
});
|
|
12104
12476
|
}
|
|
12105
12477
|
});
|
|
12106
|
-
var WorkflowPublicationSchema =
|
|
12107
|
-
contract:
|
|
12478
|
+
var WorkflowPublicationSchema = z16.object({
|
|
12479
|
+
contract: z16.literal("WorkflowPublication"),
|
|
12108
12480
|
publicationId: ContractIdentifierSchema,
|
|
12109
12481
|
definitionRef: EntityRefSchema,
|
|
12110
12482
|
runtimeDefinitionRef: EntityRefSchema,
|
|
12111
12483
|
sourceHash: Sha256Schema,
|
|
12112
12484
|
compiledHash: Sha256Schema,
|
|
12113
|
-
status:
|
|
12485
|
+
status: z16.enum(["PENDING", "PUBLISHED", "FAILED", "RETIRED"]),
|
|
12114
12486
|
publisherRef: EntityRefSchema,
|
|
12115
12487
|
publishedAt: IsoDateTimeSchema.optional(),
|
|
12116
|
-
failureReason:
|
|
12488
|
+
failureReason: z16.string().trim().min(1).optional()
|
|
12117
12489
|
}).strict().superRefine((publication, context) => {
|
|
12118
12490
|
if (publication.definitionRef.kind !== "workflow-definition") {
|
|
12119
12491
|
context.addIssue({
|
|
@@ -12144,12 +12516,12 @@ var WorkflowPublicationSchema = z15.object({
|
|
|
12144
12516
|
});
|
|
12145
12517
|
}
|
|
12146
12518
|
});
|
|
12147
|
-
var WorkflowCompletionCommitSchema =
|
|
12148
|
-
contract:
|
|
12519
|
+
var WorkflowCompletionCommitSchema = z16.object({
|
|
12520
|
+
contract: z16.literal("WorkflowCompletionCommit"),
|
|
12149
12521
|
commitId: ContractIdentifierSchema,
|
|
12150
12522
|
run: ApplicationRunSchema,
|
|
12151
|
-
outputs:
|
|
12152
|
-
artifacts:
|
|
12523
|
+
outputs: z16.array(OutputRecordSchema),
|
|
12524
|
+
artifacts: z16.array(ArtifactManifestSchema),
|
|
12153
12525
|
lineage: LineageRecordSchema,
|
|
12154
12526
|
completedAt: IsoDateTimeSchema
|
|
12155
12527
|
}).strict().superRefine((commit, context) => {
|
|
@@ -12191,15 +12563,15 @@ var WorkflowCompletionCommitSchema = z15.object({
|
|
|
12191
12563
|
}
|
|
12192
12564
|
});
|
|
12193
12565
|
});
|
|
12194
|
-
var WorkflowCompletionReceiptSchema =
|
|
12195
|
-
contract:
|
|
12566
|
+
var WorkflowCompletionReceiptSchema = z16.object({
|
|
12567
|
+
contract: z16.literal("WorkflowCompletionReceipt"),
|
|
12196
12568
|
commitId: ContractIdentifierSchema,
|
|
12197
12569
|
runRef: EntityRefSchema,
|
|
12198
|
-
outputRefs:
|
|
12199
|
-
artifactRefs:
|
|
12570
|
+
outputRefs: z16.array(EntityRefSchema),
|
|
12571
|
+
artifactRefs: z16.array(EntityRefSchema),
|
|
12200
12572
|
contentHash: Sha256Schema,
|
|
12201
12573
|
committedAt: IsoDateTimeSchema,
|
|
12202
|
-
idempotentReplay:
|
|
12574
|
+
idempotentReplay: z16.boolean()
|
|
12203
12575
|
}).strict().superRefine((receipt, context) => {
|
|
12204
12576
|
if (receipt.runRef.kind !== "application-run") {
|
|
12205
12577
|
context.addIssue({
|
|
@@ -12284,6 +12656,8 @@ export {
|
|
|
12284
12656
|
BodyRelationRecordSchema,
|
|
12285
12657
|
BrandBodySchema,
|
|
12286
12658
|
BrandGeneticsProfileSchema,
|
|
12659
|
+
CURRENT_USER_MENU_ACTION_REFS,
|
|
12660
|
+
CURRENT_USER_MENU_CONTROL_REFS,
|
|
12287
12661
|
CapabilityManifestSchema,
|
|
12288
12662
|
CapabilityProviderBindingSchema,
|
|
12289
12663
|
CapabilityRegistryDocumentSchema,
|
|
@@ -12292,6 +12666,15 @@ export {
|
|
|
12292
12666
|
CapabilitySourceTypeSchema,
|
|
12293
12667
|
ChangeImpactGraphSchema,
|
|
12294
12668
|
ChangeImpactSchema,
|
|
12669
|
+
CompiledMenuActionBehaviorSchema,
|
|
12670
|
+
CompiledMenuBehaviorSchema,
|
|
12671
|
+
CompiledMenuDividerNodeSchema,
|
|
12672
|
+
CompiledMenuGroupNodeSchema,
|
|
12673
|
+
CompiledMenuItemAccessSchema,
|
|
12674
|
+
CompiledMenuItemNodeSchema,
|
|
12675
|
+
CompiledMenuNavigateBehaviorSchema,
|
|
12676
|
+
CompiledMenuNodeSchema,
|
|
12677
|
+
CompiledMenuProjectionSchema,
|
|
12295
12678
|
CompletionEventSchema,
|
|
12296
12679
|
CompletionHeaderSchema,
|
|
12297
12680
|
ConceptDefinitionSchema,
|
|
@@ -12303,6 +12686,14 @@ export {
|
|
|
12303
12686
|
ContractMetadataSchema,
|
|
12304
12687
|
ContractPortSchema,
|
|
12305
12688
|
ContractVersionSchema,
|
|
12689
|
+
CurrentUserMenuActionItemSchema,
|
|
12690
|
+
CurrentUserMenuConfigSchema,
|
|
12691
|
+
CurrentUserMenuControlItemSchema,
|
|
12692
|
+
CurrentUserMenuDisplayTextSchema,
|
|
12693
|
+
CurrentUserMenuItemSchema,
|
|
12694
|
+
CurrentUserMenuNavigationItemSchema,
|
|
12695
|
+
CurrentUserMenuProfileSchema,
|
|
12696
|
+
CurrentUserMenuSectionSchema,
|
|
12306
12697
|
DataContinuityEnvelopeSchema,
|
|
12307
12698
|
DeclarationGraphEdgeSchema,
|
|
12308
12699
|
DesignTokenSourceSchema,
|
|
@@ -12316,9 +12707,38 @@ export {
|
|
|
12316
12707
|
IsoDateTimeSchema,
|
|
12317
12708
|
JsonObjectSchema,
|
|
12318
12709
|
JsonValueSchema,
|
|
12710
|
+
LEGACY_CURRENT_USER_MENU_ITEM_IDS,
|
|
12319
12711
|
LineageRecordSchema,
|
|
12320
12712
|
LocaleIdentifierSchema,
|
|
12321
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,
|
|
12322
12742
|
OntologyDefinitionSchema,
|
|
12323
12743
|
OutputRecordSchema,
|
|
12324
12744
|
OverlayNodeSchema,
|