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