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