@inf-monkeys-tech/monkeys 1.0.35 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/contracts/common.d.ts +2 -1
- package/lib/contracts/common.d.ts.map +1 -1
- package/lib/contracts/common.js.map +1 -1
- package/lib/contracts/index.d.ts +1 -0
- package/lib/contracts/index.d.ts.map +1 -1
- package/lib/contracts/index.js +1 -0
- package/lib/contracts/index.js.map +1 -1
- package/lib/contracts/menu.d.ts +790 -0
- package/lib/contracts/menu.d.ts.map +1 -0
- package/lib/contracts/menu.js +319 -0
- package/lib/contracts/menu.js.map +1 -0
- package/lib/contracts/page.d.ts +6 -0
- package/lib/contracts/page.d.ts.map +1 -1
- package/lib/contracts/page.js +6 -0
- package/lib/contracts/page.js.map +1 -1
- package/lib/contracts/semantic.d.ts +59 -0
- package/lib/contracts/semantic.d.ts.map +1 -1
- package/lib/contracts/semantic.js +2 -0
- package/lib/contracts/semantic.js.map +1 -1
- package/lib/contracts/tenant.d.ts +445 -4
- package/lib/contracts/tenant.d.ts.map +1 -1
- package/lib/contracts/tenant.js +113 -2
- package/lib/contracts/tenant.js.map +1 -1
- package/lib/esm/contracts/index.mjs +1166 -746
- package/lib/esm/contracts/index.mjs.map +1 -1
- package/lib/esm/index.mjs +1692 -749
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +1234 -342
- package/lib/esm/runtime/index.mjs.map +1 -1
- package/lib/esm/schemas/index.mjs +1158 -746
- package/lib/esm/schemas/index.mjs.map +1 -1
- package/lib/json-schema/index.json +3 -0
- package/lib/json-schema/menu-definition-set.schema.json +411 -0
- package/lib/json-schema/menu-definition.schema.json +385 -0
- package/lib/json-schema/menu-runtime-bundle.schema.json +541 -0
- package/lib/json-schema/page-definition.schema.json +14 -0
- package/lib/json-schema/page-runtime-descriptor.schema.json +14 -0
- package/lib/json-schema/product-declaration.schema.json +369 -1
- package/lib/json-schema/tenant-product-config.schema.json +537 -2
- package/lib/json-schema/tenant-runtime-config.schema.json +667 -2
- package/lib/runtime/declaration-compiler.d.ts +2 -0
- package/lib/runtime/declaration-compiler.d.ts.map +1 -1
- package/lib/runtime/declaration-compiler.js +4 -0
- package/lib/runtime/declaration-compiler.js.map +1 -1
- package/lib/runtime/index.d.ts +1 -0
- package/lib/runtime/index.d.ts.map +1 -1
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/index.js.map +1 -1
- package/lib/runtime/menu-compiler.d.ts +58 -0
- package/lib/runtime/menu-compiler.d.ts.map +1 -0
- package/lib/runtime/menu-compiler.js +436 -0
- package/lib/runtime/menu-compiler.js.map +1 -0
- package/lib/runtime/tenant-config.d.ts +2 -0
- package/lib/runtime/tenant-config.d.ts.map +1 -1
- package/lib/runtime/tenant-config.js +1 -0
- package/lib/runtime/tenant-config.js.map +1 -1
- package/lib/schemas/index.d.ts +477 -3
- package/lib/schemas/index.d.ts.map +1 -1
- package/lib/schemas/index.js +46 -2
- package/lib/schemas/index.js.map +1 -1
- package/package.json +1 -1
- package/test/fixtures/current-user-menu-profile.v1.json +22 -0
- package/test/fixtures/menu-definition.v1.json +41 -0
|
@@ -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,118 +11105,207 @@ 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()
|
|
11157
|
+
}).strict();
|
|
11158
|
+
var LEGACY_CURRENT_USER_MENU_ITEM_IDS = ["dark-mode", "language", "settings", "logout"];
|
|
11159
|
+
var CURRENT_USER_MENU_CONTROL_REFS = ["dark-mode", "language"];
|
|
11160
|
+
var CURRENT_USER_MENU_ACTION_REFS = ["logout"];
|
|
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.")
|
|
11165
|
+
]);
|
|
11166
|
+
var CurrentUserMenuNavigationItemSchema = z13.object({
|
|
11167
|
+
id: CurrentUserMenuIdentifierSchema,
|
|
11168
|
+
kind: z13.literal("navigation"),
|
|
11169
|
+
ref: CurrentUserMenuIdentifierSchema
|
|
11170
|
+
}).strict();
|
|
11171
|
+
var CurrentUserMenuControlItemSchema = z13.object({
|
|
11172
|
+
id: CurrentUserMenuIdentifierSchema,
|
|
11173
|
+
kind: z13.literal("control"),
|
|
11174
|
+
ref: z13.enum(CURRENT_USER_MENU_CONTROL_REFS)
|
|
11175
|
+
}).strict();
|
|
11176
|
+
var CurrentUserMenuActionItemSchema = z13.object({
|
|
11177
|
+
id: CurrentUserMenuIdentifierSchema,
|
|
11178
|
+
kind: z13.literal("action"),
|
|
11179
|
+
ref: z13.enum(CURRENT_USER_MENU_ACTION_REFS),
|
|
11180
|
+
tone: z13.enum(["default", "danger"]).optional()
|
|
10877
11181
|
}).strict();
|
|
10878
|
-
var
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
11182
|
+
var CurrentUserMenuItemSchema = z13.discriminatedUnion("kind", [
|
|
11183
|
+
CurrentUserMenuNavigationItemSchema,
|
|
11184
|
+
CurrentUserMenuControlItemSchema,
|
|
11185
|
+
CurrentUserMenuActionItemSchema
|
|
11186
|
+
]);
|
|
11187
|
+
var CurrentUserMenuSectionSchema = z13.object({
|
|
11188
|
+
id: CurrentUserMenuIdentifierSchema,
|
|
11189
|
+
label: CurrentUserMenuDisplayTextSchema.optional(),
|
|
11190
|
+
dividerBefore: z13.boolean().optional(),
|
|
11191
|
+
items: z13.array(CurrentUserMenuItemSchema)
|
|
10884
11192
|
}).strict();
|
|
10885
|
-
var
|
|
11193
|
+
var CurrentUserMenuConfigSchema = z13.object({
|
|
11194
|
+
version: z13.literal(1),
|
|
11195
|
+
sections: z13.array(CurrentUserMenuSectionSchema).max(20)
|
|
11196
|
+
}).strict().superRefine((value, context) => {
|
|
11197
|
+
const sectionIds = /* @__PURE__ */ new Set();
|
|
11198
|
+
const itemIds = /* @__PURE__ */ new Set();
|
|
11199
|
+
let itemCount = 0;
|
|
11200
|
+
value.sections.forEach((section, sectionIndex) => {
|
|
11201
|
+
if (sectionIds.has(section.id)) {
|
|
11202
|
+
context.addIssue({
|
|
11203
|
+
code: "custom",
|
|
11204
|
+
message: `Duplicate current-user menu section id ${section.id}.`,
|
|
11205
|
+
path: ["sections", sectionIndex, "id"]
|
|
11206
|
+
});
|
|
11207
|
+
}
|
|
11208
|
+
sectionIds.add(section.id);
|
|
11209
|
+
itemCount += section.items.length;
|
|
11210
|
+
section.items.forEach((item, itemIndex) => {
|
|
11211
|
+
if (itemIds.has(item.id)) {
|
|
11212
|
+
context.addIssue({
|
|
11213
|
+
code: "custom",
|
|
11214
|
+
message: `Duplicate current-user menu item id ${item.id}.`,
|
|
11215
|
+
path: ["sections", sectionIndex, "items", itemIndex, "id"]
|
|
11216
|
+
});
|
|
11217
|
+
}
|
|
11218
|
+
itemIds.add(item.id);
|
|
11219
|
+
});
|
|
11220
|
+
});
|
|
11221
|
+
if (itemCount > 100) {
|
|
11222
|
+
context.addIssue({
|
|
11223
|
+
code: "custom",
|
|
11224
|
+
message: "Current-user menu supports at most 100 items.",
|
|
11225
|
+
path: ["sections"]
|
|
11226
|
+
});
|
|
11227
|
+
}
|
|
11228
|
+
});
|
|
11229
|
+
var LegacyCurrentUserMenuProfileSchema = z13.array(z13.enum(LEGACY_CURRENT_USER_MENU_ITEM_IDS)).superRefine((value, context) => {
|
|
11230
|
+
const seen = /* @__PURE__ */ new Set();
|
|
11231
|
+
value.forEach((item, index) => {
|
|
11232
|
+
if (seen.has(item)) {
|
|
11233
|
+
context.addIssue({
|
|
11234
|
+
code: "custom",
|
|
11235
|
+
message: `Duplicate legacy current-user menu item ${item}.`,
|
|
11236
|
+
path: [index]
|
|
11237
|
+
});
|
|
11238
|
+
}
|
|
11239
|
+
seen.add(item);
|
|
11240
|
+
});
|
|
11241
|
+
});
|
|
11242
|
+
var CurrentUserMenuProfileSchema = z13.union([
|
|
11243
|
+
z13.literal("*"),
|
|
11244
|
+
LegacyCurrentUserMenuProfileSchema,
|
|
11245
|
+
CurrentUserMenuConfigSchema
|
|
11246
|
+
]);
|
|
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(),
|
|
11251
|
+
profile: CurrentUserMenuProfileSchema.optional(),
|
|
11252
|
+
showTeamQuota: z13.boolean().optional()
|
|
11253
|
+
}).strict();
|
|
11254
|
+
var TenantHeadbarModuleLeafSchema = z13.object({
|
|
10886
11255
|
id: ContractIdentifierSchema,
|
|
10887
|
-
extraInfo:
|
|
10888
|
-
displayName:
|
|
10889
|
-
visible:
|
|
10890
|
-
disabled:
|
|
10891
|
-
icon:
|
|
10892
|
-
showQuickSwitcher:
|
|
10893
|
-
showSidebar:
|
|
10894
|
-
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()
|
|
10895
11264
|
}).strict();
|
|
10896
11265
|
var TenantHeadbarModuleItemSchema = TenantHeadbarModuleLeafSchema.extend({
|
|
10897
|
-
children:
|
|
10898
|
-
}).strict();
|
|
10899
|
-
var KernelHeadbarSchema =
|
|
10900
|
-
theme:
|
|
10901
|
-
layoutMode:
|
|
10902
|
-
heightPx:
|
|
10903
|
-
navPosition:
|
|
10904
|
-
brandTitle:
|
|
10905
|
-
menuRadius:
|
|
10906
|
-
}).strict();
|
|
10907
|
-
var CustomIconSchema =
|
|
10908
|
-
color:
|
|
10909
|
-
url:
|
|
10910
|
-
type:
|
|
10911
|
-
hintTextColor:
|
|
10912
|
-
}).strict();
|
|
10913
|
-
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({
|
|
10914
11283
|
id: ContractIdentifierSchema,
|
|
10915
|
-
label:
|
|
10916
|
-
fixed:
|
|
11284
|
+
label: z13.union([z13.string(), z13.record(LocaleIdentifierSchema, z13.string())]).optional(),
|
|
11285
|
+
fixed: z13.boolean().optional()
|
|
10917
11286
|
}).strict();
|
|
10918
|
-
var WorkbenchStudioOverrideSchema =
|
|
10919
|
-
studioName:
|
|
10920
|
-
dropdownToolsDefault:
|
|
10921
|
-
existingToolsDefault:
|
|
10922
|
-
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()
|
|
10923
11292
|
}).strict();
|
|
10924
|
-
var TenantWorkbenchPageContextSchema =
|
|
11293
|
+
var TenantWorkbenchPageContextSchema = z13.object({
|
|
10925
11294
|
workflow: JsonObjectSchema.optional(),
|
|
10926
11295
|
agent: JsonObjectSchema.optional(),
|
|
10927
11296
|
agentId: ContractIdentifierSchema.optional(),
|
|
10928
11297
|
designProject: JsonObjectSchema.optional(),
|
|
10929
11298
|
designMetadataId: ContractIdentifierSchema.optional(),
|
|
10930
|
-
iframeUrl:
|
|
10931
|
-
info:
|
|
11299
|
+
iframeUrl: z13.string().trim().min(1).optional(),
|
|
11300
|
+
info: z13.object({
|
|
10932
11301
|
displayName: LocalizedTextSchema.optional(),
|
|
10933
11302
|
description: LocalizedTextSchema.optional(),
|
|
10934
|
-
iconUrl:
|
|
11303
|
+
iconUrl: z13.string().trim().min(1).optional()
|
|
10935
11304
|
}).strict().optional(),
|
|
10936
|
-
isBuiltinPinned:
|
|
10937
|
-
isBuiltinReadonly:
|
|
11305
|
+
isBuiltinPinned: z13.boolean().optional(),
|
|
11306
|
+
isBuiltinReadonly: z13.boolean().optional()
|
|
10938
11307
|
}).strict();
|
|
10939
|
-
var TenantWorkbenchPageEnvelopeSchema =
|
|
11308
|
+
var TenantWorkbenchPageEnvelopeSchema = z13.object({
|
|
10940
11309
|
definition: PageDefinitionSchema,
|
|
10941
11310
|
context: TenantWorkbenchPageContextSchema
|
|
10942
11311
|
}).strict().superRefine(({ definition }, context) => {
|
|
@@ -10969,56 +11338,56 @@ var TenantWorkbenchPageEnvelopeSchema = z12.object({
|
|
|
10969
11338
|
});
|
|
10970
11339
|
}
|
|
10971
11340
|
});
|
|
10972
|
-
var TenantWorkbenchPageGroupSchema =
|
|
11341
|
+
var TenantWorkbenchPageGroupSchema = z13.object({
|
|
10973
11342
|
id: ContractIdentifierSchema,
|
|
10974
|
-
pageIds:
|
|
11343
|
+
pageIds: z13.array(ContractIdentifierSchema),
|
|
10975
11344
|
displayName: LocalizedTextSchema,
|
|
10976
|
-
isBuiltIn:
|
|
10977
|
-
iconUrl:
|
|
10978
|
-
sortIndex:
|
|
11345
|
+
isBuiltIn: z13.boolean(),
|
|
11346
|
+
iconUrl: z13.string().optional(),
|
|
11347
|
+
sortIndex: z13.number().int().nullable().optional(),
|
|
10979
11348
|
presetRelationId: ContractIdentifierSchema.optional(),
|
|
10980
11349
|
relationKey: ContractIdentifierSchema.nullable().optional(),
|
|
10981
11350
|
studioId: ContractIdentifierSchema.optional()
|
|
10982
11351
|
}).strict();
|
|
10983
|
-
var TenantWorkbenchConfigSchema =
|
|
10984
|
-
pages:
|
|
10985
|
-
pageGroups:
|
|
10986
|
-
catalog:
|
|
10987
|
-
quickSwitcherMaxItems:
|
|
10988
|
-
defaultOrder:
|
|
10989
|
-
groups:
|
|
10990
|
-
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))
|
|
10991
11360
|
}).strict().optional(),
|
|
10992
|
-
customers:
|
|
10993
|
-
dropdownToolsDefault:
|
|
10994
|
-
layoutManagerTools:
|
|
10995
|
-
studioTabsMode:
|
|
10996
|
-
historyWatermark:
|
|
10997
|
-
svgUrl:
|
|
10998
|
-
coverage:
|
|
10999
|
-
maxLongEdgeRatio:
|
|
11000
|
-
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({
|
|
11001
11370
|
mode: ContractIdentifierSchema,
|
|
11002
|
-
heightRatio:
|
|
11003
|
-
minHeightPx:
|
|
11004
|
-
maxHeightPx:
|
|
11371
|
+
heightRatio: z13.number().positive().optional(),
|
|
11372
|
+
minHeightPx: z13.number().nonnegative().optional(),
|
|
11373
|
+
maxHeightPx: z13.number().nonnegative().optional()
|
|
11005
11374
|
}).strict().optional(),
|
|
11006
|
-
enhance:
|
|
11007
|
-
enabled:
|
|
11008
|
-
backgroundLumaThreshold:
|
|
11009
|
-
stroke:
|
|
11010
|
-
color:
|
|
11011
|
-
opacity:
|
|
11012
|
-
widthRatio:
|
|
11013
|
-
blurRatio:
|
|
11014
|
-
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()
|
|
11015
11384
|
}).strict().optional()
|
|
11016
11385
|
}).strict().optional()
|
|
11017
11386
|
}).strict().optional(),
|
|
11018
|
-
layoutManagerEnabled:
|
|
11019
|
-
existingToolsDefault:
|
|
11020
|
-
historyColumnsDefault:
|
|
11021
|
-
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()
|
|
11022
11391
|
}).strict().optional()
|
|
11023
11392
|
}).strict().superRefine(({ pages, pageGroups }, context) => {
|
|
11024
11393
|
const pageIds = pages.map(({ definition }) => definition.pageId);
|
|
@@ -11042,38 +11411,38 @@ var TenantWorkbenchConfigSchema = z12.object({
|
|
|
11042
11411
|
});
|
|
11043
11412
|
});
|
|
11044
11413
|
});
|
|
11045
|
-
var LoginPageSchema =
|
|
11046
|
-
background:
|
|
11047
|
-
logo:
|
|
11048
|
-
url:
|
|
11049
|
-
lightUrl:
|
|
11050
|
-
darkUrl:
|
|
11051
|
-
position:
|
|
11052
|
-
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()
|
|
11053
11422
|
}).strict().optional(),
|
|
11054
|
-
customCss:
|
|
11423
|
+
customCss: z13.string().optional()
|
|
11055
11424
|
}).strict();
|
|
11056
11425
|
var LandingPageHeadbarConfigShape = {
|
|
11057
|
-
headbarMode:
|
|
11426
|
+
headbarMode: z13.enum(["shared", "hidden"]).optional()
|
|
11058
11427
|
};
|
|
11059
|
-
var LandingPageDefaultConfigSchema =
|
|
11060
|
-
mode:
|
|
11428
|
+
var LandingPageDefaultConfigSchema = z13.object({
|
|
11429
|
+
mode: z13.literal("default"),
|
|
11061
11430
|
...LandingPageHeadbarConfigShape
|
|
11062
11431
|
}).strict();
|
|
11063
|
-
var LandingPageMarkdownConfigSchema =
|
|
11064
|
-
mode:
|
|
11065
|
-
content:
|
|
11432
|
+
var LandingPageMarkdownConfigSchema = z13.object({
|
|
11433
|
+
mode: z13.literal("markdown"),
|
|
11434
|
+
content: z13.string(),
|
|
11066
11435
|
...LandingPageHeadbarConfigShape
|
|
11067
11436
|
}).strict();
|
|
11068
|
-
var LandingPageHtmlConfigSchema =
|
|
11069
|
-
mode:
|
|
11070
|
-
content:
|
|
11437
|
+
var LandingPageHtmlConfigSchema = z13.object({
|
|
11438
|
+
mode: z13.literal("html"),
|
|
11439
|
+
content: z13.string(),
|
|
11071
11440
|
...LandingPageHeadbarConfigShape
|
|
11072
11441
|
}).strict();
|
|
11073
|
-
var LandingPageIframeConfigSchema =
|
|
11074
|
-
mode:
|
|
11442
|
+
var LandingPageIframeConfigSchema = z13.object({
|
|
11443
|
+
mode: z13.literal("iframe"),
|
|
11075
11444
|
...LandingPageHeadbarConfigShape,
|
|
11076
|
-
url:
|
|
11445
|
+
url: z13.string().refine((value) => {
|
|
11077
11446
|
if (/^\/(?!\/)/.test(value)) {
|
|
11078
11447
|
return !value.includes("\\");
|
|
11079
11448
|
}
|
|
@@ -11085,422 +11454,424 @@ var LandingPageIframeConfigSchema = z12.object({
|
|
|
11085
11454
|
}
|
|
11086
11455
|
}, "Landing page iframe URL must use a root-relative path or HTTP(S) without embedded credentials.")
|
|
11087
11456
|
}).strict();
|
|
11088
|
-
var TenantLandingPageConfigSchema =
|
|
11457
|
+
var TenantLandingPageConfigSchema = z13.discriminatedUnion("mode", [
|
|
11089
11458
|
LandingPageDefaultConfigSchema,
|
|
11090
11459
|
LandingPageMarkdownConfigSchema,
|
|
11091
11460
|
LandingPageHtmlConfigSchema,
|
|
11092
11461
|
LandingPageIframeConfigSchema
|
|
11093
11462
|
]);
|
|
11094
|
-
var TenantApplicationConfigSchema =
|
|
11095
|
-
theme:
|
|
11096
|
-
id:
|
|
11097
|
-
name:
|
|
11098
|
-
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(),
|
|
11099
11468
|
favicon: AssetVariantsSchema.optional(),
|
|
11100
11469
|
logo: AssetVariantsSchema.optional(),
|
|
11101
|
-
pwaIcon:
|
|
11102
|
-
form:
|
|
11103
|
-
toast:
|
|
11104
|
-
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"])
|
|
11105
11474
|
}).strict().optional(),
|
|
11106
|
-
icons:
|
|
11107
|
-
views:
|
|
11108
|
-
form:
|
|
11109
|
-
toast:
|
|
11110
|
-
progress:
|
|
11111
|
-
onlyResult:
|
|
11112
|
-
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()
|
|
11113
11482
|
}).strict()
|
|
11114
11483
|
}).strict().optional(),
|
|
11115
11484
|
loginPage: LoginPageSchema.optional(),
|
|
11116
|
-
extraLanguageURL:
|
|
11117
|
-
hideSpaceHeader:
|
|
11118
|
-
showSidebarTeamSelector:
|
|
11119
|
-
showWorkbenchSidebar:
|
|
11120
|
-
workbenchViewTheme:
|
|
11121
|
-
defaults:
|
|
11122
|
-
showFormInImageDetail:
|
|
11123
|
-
darkMode:
|
|
11124
|
-
language:
|
|
11125
|
-
showDarkModeToggle:
|
|
11126
|
-
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()
|
|
11127
11496
|
}).strict().optional(),
|
|
11128
|
-
modules:
|
|
11129
|
-
monkeysSpaceSidebar:
|
|
11130
|
-
monkeysSpaceHeadbar:
|
|
11131
|
-
|
|
11132
|
-
|
|
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)
|
|
11133
11502
|
]).optional(),
|
|
11134
|
-
settingsSidebar:
|
|
11503
|
+
settingsSidebar: z13.union([z13.literal("*"), z13.array(ContractIdentifierSchema)]).optional()
|
|
11135
11504
|
}).strict().optional(),
|
|
11136
11505
|
headbar: ThemeHeadbarSchema.optional(),
|
|
11137
|
-
kernelLayout:
|
|
11138
|
-
navigationMode:
|
|
11139
|
-
allowNavigationModeSwitch:
|
|
11506
|
+
kernelLayout: z13.object({
|
|
11507
|
+
navigationMode: z13.enum(["sidebar", "topbar"]).optional(),
|
|
11508
|
+
allowNavigationModeSwitch: z13.boolean().optional(),
|
|
11140
11509
|
headbar: KernelHeadbarSchema.optional()
|
|
11141
11510
|
}).strict().optional(),
|
|
11142
|
-
paginationPosition:
|
|
11143
|
-
ugcViewIconOnlyMode:
|
|
11144
|
-
workflowPreviewExecutionGrid:
|
|
11145
|
-
selectionModeDisplayType:
|
|
11146
|
-
clickBehavior:
|
|
11147
|
-
showErrorFilter:
|
|
11148
|
-
displayType:
|
|
11149
|
-
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()
|
|
11150
11519
|
}).strict().optional(),
|
|
11151
|
-
workbenchSidebarDefaultOpen:
|
|
11152
|
-
workbenchSidebarMoreAction:
|
|
11153
|
-
workbenchSidebarApart:
|
|
11154
|
-
workbenchSidebarToggleGroupDetail:
|
|
11155
|
-
workbenchSidebarViewType:
|
|
11156
|
-
workbenchSidebarFormViewEmbed:
|
|
11157
|
-
workbenchSidebarModernMode:
|
|
11158
|
-
ugc:
|
|
11159
|
-
uniImagePreview:
|
|
11160
|
-
imagePreviewStyle:
|
|
11161
|
-
teamAsUser:
|
|
11162
|
-
themeMode:
|
|
11163
|
-
density:
|
|
11164
|
-
pageZoom:
|
|
11165
|
-
miniMode:
|
|
11166
|
-
workflow:
|
|
11167
|
-
historyResult:
|
|
11168
|
-
uploader:
|
|
11169
|
-
orientation:
|
|
11170
|
-
pasteButton:
|
|
11171
|
-
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()
|
|
11172
11541
|
}).strict().optional(),
|
|
11173
|
-
designProjects:
|
|
11174
|
-
oneOnOne:
|
|
11175
|
-
newTabOpenBoard:
|
|
11176
|
-
defaultShowGrid:
|
|
11177
|
-
createDefaultFrame:
|
|
11178
|
-
showPageMenu:
|
|
11179
|
-
showMainMenu:
|
|
11180
|
-
showStylePanel:
|
|
11181
|
-
showToolbar:
|
|
11182
|
-
toolbarPosition:
|
|
11183
|
-
showContextMenu:
|
|
11184
|
-
showActionsMenu:
|
|
11185
|
-
showPageAndLayerSidebar:
|
|
11186
|
-
showBoardOperationSidebar:
|
|
11187
|
-
showMiniToolsToolbar:
|
|
11188
|
-
showRightSidebar:
|
|
11189
|
-
showRealtimeDrawing:
|
|
11190
|
-
showWorkflow:
|
|
11191
|
-
showVersionManager:
|
|
11192
|
-
showAgent:
|
|
11193
|
-
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()
|
|
11194
11563
|
}).strict().optional(),
|
|
11195
11564
|
workbench: TenantWorkbenchConfigSchema.optional(),
|
|
11196
|
-
visionProWorkflows:
|
|
11197
|
-
initTeam:
|
|
11198
|
-
imageThumbnail:
|
|
11199
|
-
pages:
|
|
11200
|
-
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)]),
|
|
11201
11570
|
defaultPageKey: ContractIdentifierSchema.optional()
|
|
11202
11571
|
}).strict().optional(),
|
|
11203
|
-
agent:
|
|
11572
|
+
agent: z13.object({
|
|
11204
11573
|
logo: AssetVariantsSchema.optional(),
|
|
11205
|
-
brandDisplayMode:
|
|
11206
|
-
density:
|
|
11574
|
+
brandDisplayMode: z13.enum(["auto", "logo-only", "logo-name", "name-only"]).optional(),
|
|
11575
|
+
density: z13.enum(["compact", "default", "comfortable"]).optional()
|
|
11207
11576
|
}).strict().optional()
|
|
11208
11577
|
}).strict(),
|
|
11209
11578
|
landingPage: TenantLandingPageConfigSchema.optional(),
|
|
11210
|
-
auth:
|
|
11211
|
-
enabled:
|
|
11212
|
-
oidc:
|
|
11213
|
-
password:
|
|
11214
|
-
hideAuthToast:
|
|
11215
|
-
autoReload:
|
|
11216
|
-
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()
|
|
11217
11586
|
}).strict(),
|
|
11218
|
-
endpoints:
|
|
11219
|
-
module:
|
|
11220
|
-
behavior:
|
|
11221
|
-
clearWorkflowFormStorageAfterUpdate:
|
|
11222
|
-
autoApproveOAuth:
|
|
11223
|
-
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()
|
|
11224
11593
|
}).strict(),
|
|
11225
|
-
dataManagement:
|
|
11226
|
-
favoriteOntologyId:
|
|
11227
|
-
pairedOntologyId:
|
|
11228
|
-
galleryOntologyIds:
|
|
11229
|
-
galleryOntologyId:
|
|
11230
|
-
dataBrowserDefaultOntologyId:
|
|
11231
|
-
workflowResultOntologyId:
|
|
11232
|
-
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({
|
|
11233
11602
|
ontologyId: ContractIdentifierSchema,
|
|
11234
11603
|
viewId: ContractIdentifierSchema.optional(),
|
|
11235
|
-
viewType:
|
|
11604
|
+
viewType: z13.enum(["filter", "container", "share_link"]).optional(),
|
|
11236
11605
|
teamId: ContractIdentifierSchema.optional(),
|
|
11237
|
-
teamOnly:
|
|
11238
|
-
pageSize:
|
|
11239
|
-
sortBy:
|
|
11240
|
-
sortOrder:
|
|
11241
|
-
fieldMap:
|
|
11242
|
-
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()
|
|
11243
11612
|
}).strict().optional(),
|
|
11244
|
-
homeTrendAssistant:
|
|
11613
|
+
homeTrendAssistant: z13.object({
|
|
11245
11614
|
ontologyId: ContractIdentifierSchema.optional(),
|
|
11246
11615
|
viewId: ContractIdentifierSchema.optional(),
|
|
11247
11616
|
viewInstanceId: ContractIdentifierSchema.optional(),
|
|
11248
|
-
viewName:
|
|
11617
|
+
viewName: z13.string().optional(),
|
|
11249
11618
|
teamId: ContractIdentifierSchema.optional(),
|
|
11250
11619
|
designOptionsWorkflowId: ContractIdentifierSchema.optional(),
|
|
11251
|
-
tep:
|
|
11252
|
-
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()
|
|
11253
11622
|
}).strict().optional(),
|
|
11254
11623
|
trendRadar: TenantTrendRadarSourcesSchema.optional(),
|
|
11255
|
-
sharing:
|
|
11256
|
-
silentViewLinks:
|
|
11257
|
-
shareAccess:
|
|
11258
|
-
shareDialog:
|
|
11259
|
-
audience:
|
|
11260
|
-
accessLevel:
|
|
11261
|
-
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()
|
|
11262
11631
|
}).strict().optional()
|
|
11263
11632
|
}).strict().optional()
|
|
11264
11633
|
}).strict().optional(),
|
|
11265
|
-
compute:
|
|
11266
|
-
integrations:
|
|
11267
|
-
harbor:
|
|
11268
|
-
gitlab:
|
|
11269
|
-
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()
|
|
11270
11639
|
}).strict().optional()
|
|
11271
11640
|
}).strict().optional(),
|
|
11272
|
-
data:
|
|
11273
|
-
storage:
|
|
11274
|
-
presignMode:
|
|
11275
|
-
presign:
|
|
11276
|
-
expiresInSeconds:
|
|
11277
|
-
buckets:
|
|
11278
|
-
|
|
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({
|
|
11279
11648
|
id: ContractIdentifierSchema,
|
|
11280
11649
|
provider: ContractIdentifierSchema,
|
|
11281
11650
|
preferredUrlPatternId: ContractIdentifierSchema,
|
|
11282
|
-
urlPatterns:
|
|
11283
|
-
|
|
11651
|
+
urlPatterns: z13.array(
|
|
11652
|
+
z13.object({
|
|
11284
11653
|
id: ContractIdentifierSchema,
|
|
11285
|
-
type:
|
|
11286
|
-
hostname:
|
|
11287
|
-
preferred:
|
|
11288
|
-
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()
|
|
11289
11658
|
}).strict()
|
|
11290
11659
|
)
|
|
11291
11660
|
}).strict()
|
|
11292
11661
|
)
|
|
11293
11662
|
}).strict().optional()
|
|
11294
11663
|
}).strict().optional(),
|
|
11295
|
-
monkeyData:
|
|
11664
|
+
monkeyData: z13.object({ baseUrl: z13.string().optional() }).strict().optional()
|
|
11296
11665
|
}).strict();
|
|
11297
|
-
var TenantProductConfigSchema =
|
|
11298
|
-
contract:
|
|
11666
|
+
var TenantProductConfigSchema = z13.object({
|
|
11667
|
+
contract: z13.literal("TenantProductConfig"),
|
|
11299
11668
|
tenantId: ContractIdentifierSchema,
|
|
11300
11669
|
appId: ContractIdentifierSchema,
|
|
11301
11670
|
environment: ContractIdentifierSchema,
|
|
11302
11671
|
designTokens: TenantDesignTokensConfigSchema,
|
|
11303
|
-
moduleRefs:
|
|
11304
|
-
pageRefs:
|
|
11305
|
-
featureFlags:
|
|
11672
|
+
moduleRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11673
|
+
pageRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11674
|
+
featureFlags: z13.record(z13.string(), z13.boolean()).default({}),
|
|
11306
11675
|
authBinding: TenantAuthBindingsSchema,
|
|
11307
11676
|
dataBinding: TenantDataBindingsSchema,
|
|
11308
|
-
sourceMap:
|
|
11309
|
-
warnings:
|
|
11677
|
+
sourceMap: z13.record(z13.string(), ContractIdentifierSchema),
|
|
11678
|
+
warnings: z13.array(z13.string()).default([]),
|
|
11679
|
+
menus: MenuDefinitionSetSchema.optional(),
|
|
11310
11680
|
applicationConfig: TenantApplicationConfigSchema
|
|
11311
11681
|
}).strict();
|
|
11312
|
-
var TenantRuntimeConfigSchema =
|
|
11313
|
-
contract:
|
|
11682
|
+
var TenantRuntimeConfigSchema = z13.object({
|
|
11683
|
+
contract: z13.literal("TenantRuntimeConfig"),
|
|
11314
11684
|
tenantId: ContractIdentifierSchema,
|
|
11315
11685
|
appId: ContractIdentifierSchema,
|
|
11316
11686
|
environment: ContractIdentifierSchema,
|
|
11317
11687
|
designTokens: ResolvedThemeTokensSchema,
|
|
11318
|
-
moduleRefs:
|
|
11319
|
-
pageRefs:
|
|
11320
|
-
featureFlags:
|
|
11688
|
+
moduleRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11689
|
+
pageRefs: z13.array(ContractIdentifierSchema).default([]),
|
|
11690
|
+
featureFlags: z13.record(z13.string(), z13.boolean()).default({}),
|
|
11321
11691
|
authBinding: TenantAuthBindingsSchema,
|
|
11322
11692
|
dataBinding: TenantDataBindingsSchema,
|
|
11323
|
-
sourceMap:
|
|
11324
|
-
warnings:
|
|
11693
|
+
sourceMap: z13.record(z13.string(), ContractIdentifierSchema),
|
|
11694
|
+
warnings: z13.array(z13.string()).default([]),
|
|
11695
|
+
menuBundle: MenuRuntimeBundleSchema.optional(),
|
|
11325
11696
|
applicationConfig: TenantApplicationConfigSchema
|
|
11326
11697
|
}).strict();
|
|
11327
11698
|
|
|
11328
11699
|
// src/contracts/trend.ts
|
|
11329
|
-
import { z as
|
|
11330
|
-
var RadarDecisionMetricsSchema =
|
|
11331
|
-
currentSales:
|
|
11332
|
-
forecastSales:
|
|
11333
|
-
searchHeat:
|
|
11334
|
-
socialHeat:
|
|
11335
|
-
confidence:
|
|
11336
|
-
}).strict();
|
|
11337
|
-
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({
|
|
11338
11709
|
sourceId: ContractIdentifierSchema,
|
|
11339
11710
|
provider: ContractIdentifierSchema,
|
|
11340
|
-
channel:
|
|
11711
|
+
channel: z14.enum(["trend", "ecommerce", "social", "search", "internal"]),
|
|
11341
11712
|
collectedAt: IsoDateTimeSchema,
|
|
11342
|
-
sourceUrl:
|
|
11343
|
-
evidenceRefs:
|
|
11713
|
+
sourceUrl: z14.string().url().optional(),
|
|
11714
|
+
evidenceRefs: z14.array(EntityRefSchema).default([])
|
|
11344
11715
|
}).strict();
|
|
11345
|
-
var TrendIngestRunSchema =
|
|
11346
|
-
contract:
|
|
11716
|
+
var TrendIngestRunSchema = z14.object({
|
|
11717
|
+
contract: z14.literal("TrendIngestRun"),
|
|
11347
11718
|
ingestRunId: ContractIdentifierSchema,
|
|
11348
11719
|
sourceId: ContractIdentifierSchema,
|
|
11349
11720
|
requestId: ContractIdentifierSchema,
|
|
11350
11721
|
idempotencyKey: ContractIdentifierSchema,
|
|
11351
|
-
status:
|
|
11352
|
-
recordCount:
|
|
11353
|
-
errorCount:
|
|
11722
|
+
status: z14.enum(["RUNNING", "SUCCEEDED", "FAILED", "PARTIAL"]),
|
|
11723
|
+
recordCount: z14.number().int().nonnegative(),
|
|
11724
|
+
errorCount: z14.number().int().nonnegative(),
|
|
11354
11725
|
startedAt: IsoDateTimeSchema,
|
|
11355
11726
|
completedAt: IsoDateTimeSchema.optional()
|
|
11356
11727
|
}).strict();
|
|
11357
|
-
var TrendSourceRecordSchema =
|
|
11358
|
-
contract:
|
|
11728
|
+
var TrendSourceRecordSchema = z14.object({
|
|
11729
|
+
contract: z14.literal("TrendSourceRecord"),
|
|
11359
11730
|
sourceRecordId: ContractIdentifierSchema,
|
|
11360
11731
|
source: TrendSourceSchema,
|
|
11361
11732
|
ingestRunRef: EntityRefSchema,
|
|
11362
|
-
recordVersion:
|
|
11733
|
+
recordVersion: z14.number().int().positive(),
|
|
11363
11734
|
contentHash: Sha256Schema,
|
|
11364
11735
|
payload: JsonValueSchema,
|
|
11365
11736
|
idempotencyKey: ContractIdentifierSchema,
|
|
11366
11737
|
collectedAt: IsoDateTimeSchema
|
|
11367
11738
|
}).strict();
|
|
11368
|
-
var HotwordBodySchema =
|
|
11369
|
-
contract:
|
|
11739
|
+
var HotwordBodySchema = z14.object({
|
|
11740
|
+
contract: z14.literal("HotwordBody"),
|
|
11370
11741
|
hotwordId: ContractIdentifierSchema,
|
|
11371
|
-
label:
|
|
11372
|
-
normalizedLabel:
|
|
11373
|
-
categories:
|
|
11374
|
-
sourceRefs:
|
|
11375
|
-
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([]),
|
|
11376
11747
|
createdAt: IsoDateTimeSchema,
|
|
11377
11748
|
updatedAt: IsoDateTimeSchema
|
|
11378
11749
|
}).strict();
|
|
11379
11750
|
var CommerceBodyFieldsSchema = {
|
|
11380
|
-
displayName:
|
|
11381
|
-
normalizedName:
|
|
11382
|
-
categories:
|
|
11383
|
-
sourceRefs:
|
|
11384
|
-
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([]),
|
|
11385
11756
|
createdAt: IsoDateTimeSchema,
|
|
11386
11757
|
updatedAt: IsoDateTimeSchema
|
|
11387
11758
|
};
|
|
11388
|
-
var BrandBodySchema =
|
|
11389
|
-
contract:
|
|
11759
|
+
var BrandBodySchema = z14.object({
|
|
11760
|
+
contract: z14.literal("BrandBody"),
|
|
11390
11761
|
brandId: ContractIdentifierSchema,
|
|
11391
11762
|
...CommerceBodyFieldsSchema
|
|
11392
11763
|
}).strict();
|
|
11393
|
-
var ProductBodySchema =
|
|
11394
|
-
contract:
|
|
11764
|
+
var ProductBodySchema = z14.object({
|
|
11765
|
+
contract: z14.literal("ProductBody"),
|
|
11395
11766
|
productId: ContractIdentifierSchema,
|
|
11396
11767
|
brandRef: EntityRefSchema.optional(),
|
|
11397
11768
|
...CommerceBodyFieldsSchema
|
|
11398
11769
|
}).strict();
|
|
11399
|
-
var TrendMetricSnapshotSchema =
|
|
11400
|
-
contract:
|
|
11770
|
+
var TrendMetricSnapshotSchema = z14.object({
|
|
11771
|
+
contract: z14.literal("TrendMetricSnapshot"),
|
|
11401
11772
|
snapshotId: ContractIdentifierSchema,
|
|
11402
11773
|
subjectRef: EntityRefSchema,
|
|
11403
11774
|
observedAt: IsoDateTimeSchema,
|
|
11404
|
-
metrics:
|
|
11405
|
-
confidence:
|
|
11406
|
-
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)
|
|
11407
11778
|
}).strict();
|
|
11408
|
-
var RadarScoreModelBodySchema =
|
|
11409
|
-
contract:
|
|
11779
|
+
var RadarScoreModelBodySchema = z14.object({
|
|
11780
|
+
contract: z14.literal("RadarScoreModelBody"),
|
|
11410
11781
|
modelId: ContractIdentifierSchema,
|
|
11411
|
-
version:
|
|
11782
|
+
version: z14.number().int().positive(),
|
|
11412
11783
|
weights: RadarDecisionMetricsSchema,
|
|
11413
|
-
thresholds:
|
|
11414
|
-
explanationRules:
|
|
11784
|
+
thresholds: z14.record(z14.string(), z14.number().finite()).default({}),
|
|
11785
|
+
explanationRules: z14.record(z14.string(), z14.string().trim().min(1)).default({}),
|
|
11415
11786
|
createdAt: IsoDateTimeSchema
|
|
11416
11787
|
}).strict();
|
|
11417
|
-
var RadarScoreProjectionSchema =
|
|
11418
|
-
contract:
|
|
11788
|
+
var RadarScoreProjectionSchema = z14.object({
|
|
11789
|
+
contract: z14.literal("RadarScoreProjection"),
|
|
11419
11790
|
projectionId: ContractIdentifierSchema,
|
|
11420
11791
|
subjectRef: EntityRefSchema,
|
|
11421
11792
|
modelRef: EntityRefSchema,
|
|
11422
|
-
totalScore:
|
|
11793
|
+
totalScore: z14.number().finite(),
|
|
11423
11794
|
dimensions: RadarDecisionMetricsSchema,
|
|
11424
|
-
evidenceRefs:
|
|
11795
|
+
evidenceRefs: z14.array(EntityRefSchema).min(1),
|
|
11425
11796
|
freshnessAt: IsoDateTimeSchema
|
|
11426
11797
|
}).strict();
|
|
11427
|
-
var RadarPanoramaNodeSchema =
|
|
11798
|
+
var RadarPanoramaNodeSchema = z14.object({
|
|
11428
11799
|
ref: EntityRefSchema,
|
|
11429
|
-
label:
|
|
11430
|
-
categories:
|
|
11431
|
-
score:
|
|
11800
|
+
label: z14.string().trim().min(1),
|
|
11801
|
+
categories: z14.array(ContractIdentifierSchema).default([]),
|
|
11802
|
+
score: z14.number().finite().optional(),
|
|
11432
11803
|
freshnessAt: IsoDateTimeSchema.optional()
|
|
11433
11804
|
}).strict();
|
|
11434
|
-
var RadarPanoramaEdgeSchema =
|
|
11805
|
+
var RadarPanoramaEdgeSchema = z14.object({
|
|
11435
11806
|
sourceRef: EntityRefSchema,
|
|
11436
11807
|
targetRef: EntityRefSchema,
|
|
11437
11808
|
relation: ContractIdentifierSchema,
|
|
11438
|
-
evidenceRefs:
|
|
11809
|
+
evidenceRefs: z14.array(EntityRefSchema).default([])
|
|
11439
11810
|
}).strict();
|
|
11440
|
-
var RadarPanoramaSchema =
|
|
11441
|
-
contract:
|
|
11442
|
-
nodes:
|
|
11443
|
-
edges:
|
|
11811
|
+
var RadarPanoramaSchema = z14.object({
|
|
11812
|
+
contract: z14.literal("RadarPanorama"),
|
|
11813
|
+
nodes: z14.array(RadarPanoramaNodeSchema),
|
|
11814
|
+
edges: z14.array(RadarPanoramaEdgeSchema),
|
|
11444
11815
|
generatedAt: IsoDateTimeSchema
|
|
11445
11816
|
}).strict();
|
|
11446
|
-
var BrandGeneticsProfileSchema =
|
|
11447
|
-
contract:
|
|
11817
|
+
var BrandGeneticsProfileSchema = z14.object({
|
|
11818
|
+
contract: z14.literal("BrandGeneticsProfile"),
|
|
11448
11819
|
brandRef: EntityRefSchema,
|
|
11449
|
-
categories:
|
|
11450
|
-
signature:
|
|
11451
|
-
relatedRefs:
|
|
11452
|
-
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([]),
|
|
11453
11824
|
computedAt: IsoDateTimeSchema
|
|
11454
11825
|
}).strict();
|
|
11455
|
-
var RadarOpportunityMatrixPointSchema =
|
|
11826
|
+
var RadarOpportunityMatrixPointSchema = z14.object({
|
|
11456
11827
|
subjectRef: EntityRefSchema,
|
|
11457
|
-
label:
|
|
11458
|
-
x:
|
|
11459
|
-
y:
|
|
11460
|
-
score:
|
|
11461
|
-
evidenceRefs:
|
|
11462
|
-
}).strict();
|
|
11463
|
-
var RadarOpportunityMatrixSchema =
|
|
11464
|
-
contract:
|
|
11465
|
-
xMetric:
|
|
11466
|
-
yMetric:
|
|
11467
|
-
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),
|
|
11468
11839
|
computedAt: IsoDateTimeSchema
|
|
11469
11840
|
}).strict();
|
|
11470
|
-
var RadarQueryBodySchema =
|
|
11471
|
-
contract:
|
|
11841
|
+
var RadarQueryBodySchema = z14.object({
|
|
11842
|
+
contract: z14.literal("RadarQueryBody"),
|
|
11472
11843
|
queryId: ContractIdentifierSchema,
|
|
11473
|
-
filters:
|
|
11474
|
-
sort:
|
|
11844
|
+
filters: z14.record(z14.string(), JsonValueSchema).default({}),
|
|
11845
|
+
sort: z14.object({
|
|
11475
11846
|
field: ContractIdentifierSchema,
|
|
11476
|
-
direction:
|
|
11847
|
+
direction: z14.enum(["asc", "desc"])
|
|
11477
11848
|
}).strict(),
|
|
11478
|
-
pageSize:
|
|
11849
|
+
pageSize: z14.number().int().min(1).max(200),
|
|
11479
11850
|
updatedAt: IsoDateTimeSchema
|
|
11480
11851
|
}).strict();
|
|
11481
|
-
var SavedRadarQuerySchema =
|
|
11482
|
-
contract:
|
|
11852
|
+
var SavedRadarQuerySchema = z14.object({
|
|
11853
|
+
contract: z14.literal("SavedRadarQuery"),
|
|
11483
11854
|
savedQueryId: ContractIdentifierSchema,
|
|
11484
11855
|
teamId: ContractIdentifierSchema,
|
|
11485
11856
|
ownerRef: EntityRefSchema,
|
|
11486
|
-
name:
|
|
11857
|
+
name: z14.string().trim().min(1),
|
|
11487
11858
|
queryRef: EntityRefSchema,
|
|
11488
|
-
expectedVersion:
|
|
11859
|
+
expectedVersion: z14.number().int().nonnegative(),
|
|
11489
11860
|
updatedAt: IsoDateTimeSchema
|
|
11490
11861
|
}).strict();
|
|
11491
|
-
var RadarSelectionSchema =
|
|
11492
|
-
contract:
|
|
11862
|
+
var RadarSelectionSchema = z14.object({
|
|
11863
|
+
contract: z14.literal("RadarSelection"),
|
|
11493
11864
|
selectionId: ContractIdentifierSchema,
|
|
11494
11865
|
teamId: ContractIdentifierSchema,
|
|
11495
11866
|
ownerRef: EntityRefSchema,
|
|
11496
|
-
subjectRefs:
|
|
11497
|
-
status:
|
|
11498
|
-
note:
|
|
11499
|
-
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(),
|
|
11500
11871
|
updatedAt: IsoDateTimeSchema
|
|
11501
11872
|
}).strict();
|
|
11502
|
-
var RadarAnalysisRunSchema =
|
|
11503
|
-
contract:
|
|
11873
|
+
var RadarAnalysisRunSchema = z14.object({
|
|
11874
|
+
contract: z14.literal("RadarAnalysisRun"),
|
|
11504
11875
|
runId: ContractIdentifierSchema,
|
|
11505
11876
|
teamId: ContractIdentifierSchema,
|
|
11506
11877
|
selectionRef: EntityRefSchema,
|
|
@@ -11509,66 +11880,66 @@ var RadarAnalysisRunSchema = z13.object({
|
|
|
11509
11880
|
designProjectRef: EntityRefSchema.optional(),
|
|
11510
11881
|
replayedFromRef: EntityRefSchema.optional(),
|
|
11511
11882
|
workflowDefinitionTeamId: ContractIdentifierSchema.optional(),
|
|
11512
|
-
workflowInput:
|
|
11513
|
-
createDesignProject:
|
|
11514
|
-
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(),
|
|
11515
11886
|
modelRef: EntityRefSchema,
|
|
11516
11887
|
requestId: ContractIdentifierSchema,
|
|
11517
11888
|
idempotencyKey: ContractIdentifierSchema,
|
|
11518
|
-
status:
|
|
11519
|
-
outputRefs:
|
|
11520
|
-
error:
|
|
11889
|
+
status: z14.enum(["QUEUED", "RUNNING", "SUCCEEDED", "FAILED", "CANCELLED", "PARTIAL"]),
|
|
11890
|
+
outputRefs: z14.array(EntityRefSchema).default([]),
|
|
11891
|
+
error: z14.object({
|
|
11521
11892
|
code: ContractIdentifierSchema,
|
|
11522
|
-
message:
|
|
11523
|
-
retryable:
|
|
11893
|
+
message: z14.string().trim().min(1),
|
|
11894
|
+
retryable: z14.boolean()
|
|
11524
11895
|
}).strict().optional(),
|
|
11525
11896
|
startedAt: IsoDateTimeSchema.optional(),
|
|
11526
11897
|
completedAt: IsoDateTimeSchema.optional(),
|
|
11527
11898
|
createdAt: IsoDateTimeSchema
|
|
11528
11899
|
}).strict();
|
|
11529
|
-
var RadarAnalysisAssetSchema =
|
|
11900
|
+
var RadarAnalysisAssetSchema = z14.object({
|
|
11530
11901
|
artifactRef: EntityRefSchema,
|
|
11531
11902
|
kind: ContractIdentifierSchema,
|
|
11532
|
-
mimeType:
|
|
11533
|
-
url:
|
|
11534
|
-
metadata:
|
|
11903
|
+
mimeType: z14.string().trim().min(1).optional(),
|
|
11904
|
+
url: z14.string().url(),
|
|
11905
|
+
metadata: z14.record(z14.string(), JsonValueSchema).default({}),
|
|
11535
11906
|
createdAt: IsoDateTimeSchema
|
|
11536
11907
|
}).strict();
|
|
11537
|
-
var RadarAnalysisDetailSchema =
|
|
11538
|
-
contract:
|
|
11908
|
+
var RadarAnalysisDetailSchema = z14.object({
|
|
11909
|
+
contract: z14.literal("RadarAnalysisDetail"),
|
|
11539
11910
|
run: RadarAnalysisRunSchema,
|
|
11540
|
-
runVersion:
|
|
11911
|
+
runVersion: z14.number().int().positive(),
|
|
11541
11912
|
selection: RadarSelectionSchema,
|
|
11542
|
-
outputs:
|
|
11543
|
-
assets:
|
|
11544
|
-
lineage:
|
|
11913
|
+
outputs: z14.array(OutputRecordSchema),
|
|
11914
|
+
assets: z14.array(RadarAnalysisAssetSchema),
|
|
11915
|
+
lineage: z14.array(LineageRecordSchema)
|
|
11545
11916
|
}).strict();
|
|
11546
|
-
var RadarActionRecordSchema =
|
|
11547
|
-
contract:
|
|
11917
|
+
var RadarActionRecordSchema = z14.object({
|
|
11918
|
+
contract: z14.literal("RadarActionRecord"),
|
|
11548
11919
|
actionId: ContractIdentifierSchema,
|
|
11549
11920
|
teamId: ContractIdentifierSchema,
|
|
11550
11921
|
actorRef: EntityRefSchema,
|
|
11551
|
-
action:
|
|
11922
|
+
action: z14.enum(["stash", "select", "reject", "archive", "launch", "retry", "replay", "rollback"]),
|
|
11552
11923
|
targetRef: EntityRefSchema,
|
|
11553
11924
|
requestId: ContractIdentifierSchema,
|
|
11554
11925
|
idempotencyKey: ContractIdentifierSchema,
|
|
11555
|
-
expectedVersion:
|
|
11926
|
+
expectedVersion: z14.number().int().nonnegative(),
|
|
11556
11927
|
occurredAt: IsoDateTimeSchema
|
|
11557
11928
|
}).strict();
|
|
11558
|
-
var RadarWritebackRecordSchema =
|
|
11559
|
-
contract:
|
|
11929
|
+
var RadarWritebackRecordSchema = z14.object({
|
|
11930
|
+
contract: z14.literal("RadarWritebackRecord"),
|
|
11560
11931
|
writebackId: ContractIdentifierSchema,
|
|
11561
11932
|
actionRef: EntityRefSchema,
|
|
11562
11933
|
targetRef: EntityRefSchema,
|
|
11563
|
-
status:
|
|
11564
|
-
resultingVersion:
|
|
11565
|
-
error:
|
|
11934
|
+
status: z14.enum(["PENDING", "APPLIED", "FAILED"]),
|
|
11935
|
+
resultingVersion: z14.number().int().nonnegative().optional(),
|
|
11936
|
+
error: z14.string().trim().min(1).optional(),
|
|
11566
11937
|
recordedAt: IsoDateTimeSchema
|
|
11567
11938
|
}).strict();
|
|
11568
11939
|
|
|
11569
11940
|
// src/contracts/workflow-definition.ts
|
|
11570
|
-
import { z as
|
|
11571
|
-
var ConductorTaskTypeSchema =
|
|
11941
|
+
import { z as z15 } from "zod";
|
|
11942
|
+
var ConductorTaskTypeSchema = z15.enum([
|
|
11572
11943
|
"SIMPLE",
|
|
11573
11944
|
"DYNAMIC",
|
|
11574
11945
|
"FORK_JOIN",
|
|
@@ -11617,46 +11988,46 @@ var requiredTaskFields = {
|
|
|
11617
11988
|
WAIT: ["inputParameters"],
|
|
11618
11989
|
TERMINATE: ["inputParameters"]
|
|
11619
11990
|
};
|
|
11620
|
-
var ConductorTaskDefinitionSchema =
|
|
11621
|
-
() =>
|
|
11991
|
+
var ConductorTaskDefinitionSchema = z15.lazy(
|
|
11992
|
+
() => z15.object({
|
|
11622
11993
|
name: ContractIdentifierSchema,
|
|
11623
11994
|
taskReferenceName: ContractIdentifierSchema,
|
|
11624
11995
|
type: ConductorTaskTypeSchema,
|
|
11625
|
-
inputParameters:
|
|
11626
|
-
startDelay:
|
|
11627
|
-
optional:
|
|
11628
|
-
asyncComplete:
|
|
11629
|
-
rateLimited:
|
|
11630
|
-
retryCount:
|
|
11631
|
-
taskDefinition:
|
|
11632
|
-
loopCondition:
|
|
11633
|
-
loopOver:
|
|
11634
|
-
sink:
|
|
11635
|
-
forkTasks:
|
|
11636
|
-
joinOn:
|
|
11637
|
-
defaultExclusiveJoinTask:
|
|
11638
|
-
dynamicForkTasksParam:
|
|
11639
|
-
dynamicForkTasksInputParamName:
|
|
11640
|
-
subWorkflowParam:
|
|
11641
|
-
$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(),
|
|
11642
12013
|
name: ContractIdentifierSchema,
|
|
11643
|
-
version:
|
|
11644
|
-
taskToDomain:
|
|
11645
|
-
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()
|
|
11646
12017
|
}).strict().optional(),
|
|
11647
|
-
decisionCases:
|
|
11648
|
-
defaultCase:
|
|
11649
|
-
evaluatorType:
|
|
11650
|
-
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(),
|
|
11651
12022
|
__alias: JsonValueSchema.optional(),
|
|
11652
|
-
callbackFromWorker:
|
|
12023
|
+
callbackFromWorker: z15.boolean().optional(),
|
|
11653
12024
|
caseExpression: JsonValueSchema.optional(),
|
|
11654
|
-
caseValueParam:
|
|
11655
|
-
dependencies:
|
|
11656
|
-
description:
|
|
11657
|
-
dynamicTaskNameParam:
|
|
11658
|
-
joinMode:
|
|
11659
|
-
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(),
|
|
11660
12031
|
joinTaskRef: ContractIdentifierSchema.optional(),
|
|
11661
12032
|
forkTaskRef: ContractIdentifierSchema.optional()
|
|
11662
12033
|
}).strict().superRefine((task, context) => {
|
|
@@ -11670,29 +12041,29 @@ var ConductorTaskDefinitionSchema = z14.lazy(
|
|
|
11670
12041
|
}
|
|
11671
12042
|
})
|
|
11672
12043
|
);
|
|
11673
|
-
var ConductorWorkflowDefinitionSchema =
|
|
11674
|
-
ownerApp:
|
|
11675
|
-
createTime:
|
|
11676
|
-
updateTime:
|
|
11677
|
-
createdBy:
|
|
11678
|
-
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(),
|
|
11679
12050
|
name: ContractIdentifierSchema,
|
|
11680
|
-
description:
|
|
11681
|
-
version:
|
|
11682
|
-
tasks:
|
|
11683
|
-
inputParameters:
|
|
11684
|
-
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(),
|
|
11685
12056
|
failureWorkflow: ContractIdentifierSchema.optional(),
|
|
11686
|
-
schemaVersion:
|
|
11687
|
-
restartable:
|
|
11688
|
-
workflowStatusListenerEnabled:
|
|
11689
|
-
ownerEmail:
|
|
11690
|
-
timeoutPolicy:
|
|
11691
|
-
timeoutSeconds:
|
|
11692
|
-
variables:
|
|
11693
|
-
inputTemplate:
|
|
11694
|
-
}).strict();
|
|
11695
|
-
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([
|
|
11696
12067
|
"string",
|
|
11697
12068
|
"file",
|
|
11698
12069
|
"number",
|
|
@@ -11702,213 +12073,213 @@ var WorkflowParameterTypeSchema = z14.enum([
|
|
|
11702
12073
|
"notice",
|
|
11703
12074
|
"canvas-assist"
|
|
11704
12075
|
]);
|
|
11705
|
-
var WorkflowConditionalStateSchema =
|
|
11706
|
-
conditions:
|
|
11707
|
-
|
|
11708
|
-
field:
|
|
11709
|
-
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"]),
|
|
11710
12081
|
value: JsonValueSchema
|
|
11711
12082
|
}).strict()
|
|
11712
12083
|
),
|
|
11713
|
-
logic:
|
|
11714
|
-
}).strict();
|
|
11715
|
-
var ImageSelectMappingAppearanceSchema =
|
|
11716
|
-
columns:
|
|
11717
|
-
cardSize:
|
|
11718
|
-
imageAspectRatio:
|
|
11719
|
-
gap:
|
|
11720
|
-
radius:
|
|
11721
|
-
borderStyle:
|
|
11722
|
-
borderWidth:
|
|
11723
|
-
enableScroll:
|
|
11724
|
-
maxHeight:
|
|
11725
|
-
enableCollapse:
|
|
11726
|
-
visibleRows:
|
|
11727
|
-
hideLabel:
|
|
11728
|
-
hideDescription:
|
|
11729
|
-
hideValue:
|
|
11730
|
-
}).strict();
|
|
11731
|
-
var ComfyWorkflowPortBindingSchema =
|
|
11732
|
-
node:
|
|
11733
|
-
key:
|
|
11734
|
-
}).strict();
|
|
11735
|
-
var WorkflowParameterTypeOptionsSchema =
|
|
11736
|
-
editor:
|
|
11737
|
-
editorLanguage:
|
|
11738
|
-
maxValue:
|
|
11739
|
-
minValue:
|
|
11740
|
-
max:
|
|
11741
|
-
min:
|
|
11742
|
-
multipleValues:
|
|
11743
|
-
numberPrecision:
|
|
11744
|
-
password:
|
|
11745
|
-
rows:
|
|
11746
|
-
assetType:
|
|
11747
|
-
accept:
|
|
11748
|
-
maxSize:
|
|
11749
|
-
fileType:
|
|
11750
|
-
aiMultiShotMainImageField:
|
|
11751
|
-
aiMultiShotWorkflowAppId:
|
|
11752
|
-
aiMultiShotWorkflowId:
|
|
11753
|
-
allowCustomInput:
|
|
11754
|
-
allowUploadVideo:
|
|
11755
|
-
aspectRatioField:
|
|
11756
|
-
assemblyValueType:
|
|
11757
|
-
autoAnalyzeDesignImage:
|
|
11758
|
-
autoDetectAspectRatio:
|
|
11759
|
-
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(),
|
|
11760
12131
|
comfyOptions: ComfyWorkflowPortBindingSchema.optional(),
|
|
11761
|
-
comfyuiModelServerId:
|
|
11762
|
-
comfyuiModelTypeName:
|
|
12132
|
+
comfyuiModelServerId: z15.string().optional(),
|
|
12133
|
+
comfyuiModelTypeName: z15.string().optional(),
|
|
11763
12134
|
defaultCustomInput: JsonValueSchema.optional(),
|
|
11764
|
-
descriptionAlert:
|
|
11765
|
-
disabled:
|
|
11766
|
-
editable:
|
|
11767
|
-
enableAiMultiShot:
|
|
11768
|
-
enableBooleanSwitchMode:
|
|
11769
|
-
enableClear:
|
|
11770
|
-
enableExpand:
|
|
11771
|
-
enableImageMask:
|
|
11772
|
-
enableImageOverlay:
|
|
11773
|
-
enablePopupEditor:
|
|
11774
|
-
enablePromptFontSize:
|
|
11775
|
-
enableReset:
|
|
11776
|
-
enableSelectItemIcon:
|
|
11777
|
-
enableSelectList:
|
|
11778
|
-
enableSelectSearch:
|
|
11779
|
-
enableSliderEnterMode:
|
|
11780
|
-
enableVoice:
|
|
11781
|
-
expandButtonText:
|
|
11782
|
-
foldUp:
|
|
11783
|
-
hidden:
|
|
11784
|
-
hideRequiredDot:
|
|
11785
|
-
inlineTitleWithSelect:
|
|
11786
|
-
knowledgeGraphButtonText:
|
|
11787
|
-
identifyAttributeCount:
|
|
11788
|
-
identifyAttributes:
|
|
11789
|
-
identifyMaxVariants:
|
|
11790
|
-
identifySourceField:
|
|
11791
|
-
imageOverlayBaseField:
|
|
11792
|
-
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(),
|
|
11793
12164
|
imageSelectMappingAppearance: ImageSelectMappingAppearanceSchema.optional(),
|
|
11794
|
-
imageSelectMappingColumns:
|
|
11795
|
-
imageSelectMappingEnableCustomUpload:
|
|
11796
|
-
imageSelectMappingHideLabel:
|
|
11797
|
-
imageSelectMappingHideLink:
|
|
11798
|
-
imageSelectMappingHideMeta:
|
|
11799
|
-
imageSelectMappingInlineUseLargeUploadBox:
|
|
11800
|
-
imageSelectMappingPromptField:
|
|
11801
|
-
imageSelectMappingTabOrder:
|
|
11802
|
-
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(),
|
|
11803
12174
|
imageSelectMappingTemplatePrompt: LocalizedTextSchema.optional(),
|
|
11804
12175
|
imageSelectMappingTemplateTabTitle: LocalizedTextSchema.optional(),
|
|
11805
|
-
imageSelectMappingUploadMode:
|
|
12176
|
+
imageSelectMappingUploadMode: z15.enum(["tabs", "inline"]).optional(),
|
|
11806
12177
|
imageSelectMappingUploadPrompt: LocalizedTextSchema.optional(),
|
|
11807
12178
|
imageSelectMappingUploadTabTitle: LocalizedTextSchema.optional(),
|
|
11808
|
-
endpoints:
|
|
11809
|
-
examples:
|
|
12179
|
+
endpoints: z15.array(JsonValueSchema).optional(),
|
|
12180
|
+
examples: z15.array(JsonValueSchema).optional(),
|
|
11810
12181
|
extraData: JsonValueSchema.optional(),
|
|
11811
12182
|
layer: JsonValueSchema.optional(),
|
|
11812
12183
|
map: JsonValueSchema.optional(),
|
|
11813
|
-
multiline:
|
|
11814
|
-
options:
|
|
11815
|
-
originalFiles:
|
|
12184
|
+
multiline: z15.boolean().optional(),
|
|
12185
|
+
options: z15.array(JsonValueSchema).optional(),
|
|
12186
|
+
originalFiles: z15.array(JsonValueSchema).optional(),
|
|
11816
12187
|
placeholder: LocalizedTextSchema.optional(),
|
|
11817
|
-
preserveSelectListOrder:
|
|
12188
|
+
preserveSelectListOrder: z15.boolean().optional(),
|
|
11818
12189
|
promptDictionary: JsonValueSchema.optional(),
|
|
11819
|
-
promptFontSize:
|
|
12190
|
+
promptFontSize: z15.number().optional(),
|
|
11820
12191
|
promptModeToggle: JsonValueSchema.optional(),
|
|
11821
|
-
requireActiveSelectFilter:
|
|
11822
|
-
restoreDefaultOnEmptyEnter:
|
|
11823
|
-
search:
|
|
11824
|
-
selectButtonEnableCollapse:
|
|
11825
|
-
selectButtonVisibleRows:
|
|
11826
|
-
selectList:
|
|
11827
|
-
selectListDisplayMode:
|
|
11828
|
-
selectPromptField:
|
|
11829
|
-
showAddLocalFileButton:
|
|
11830
|
-
singleColumn:
|
|
11831
|
-
singleFrameForMultiple:
|
|
11832
|
-
textSingleLine:
|
|
11833
|
-
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(),
|
|
11834
12205
|
tips: LocalizedTextSchema.optional(),
|
|
11835
12206
|
visibility: JsonValueSchema.optional(),
|
|
11836
|
-
voiceButtonText:
|
|
11837
|
-
designAnalysisFields:
|
|
11838
|
-
designAnalysisFillStrategy:
|
|
11839
|
-
designAnalysisMaxFields:
|
|
11840
|
-
designAnalysisType:
|
|
11841
|
-
designAnalysisFieldPrefix:
|
|
11842
|
-
}).strict();
|
|
11843
|
-
var WorkflowParameterSchema =
|
|
11844
|
-
() =>
|
|
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({
|
|
11845
12216
|
displayName: LocalizedTextSchema,
|
|
11846
12217
|
name: ContractIdentifierSchema,
|
|
11847
12218
|
type: WorkflowParameterTypeSchema,
|
|
11848
12219
|
typeOptions: WorkflowParameterTypeOptionsSchema.optional(),
|
|
11849
12220
|
default: JsonValueSchema.optional(),
|
|
11850
12221
|
description: LocalizedTextSchema.optional(),
|
|
11851
|
-
hint:
|
|
11852
|
-
displayOptions:
|
|
11853
|
-
hide:
|
|
11854
|
-
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()
|
|
11855
12226
|
}).strict().optional(),
|
|
11856
|
-
options:
|
|
11857
|
-
|
|
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(),
|
|
11858
12229
|
WorkflowParameterSchema,
|
|
11859
|
-
|
|
12230
|
+
z15.object({ displayName: z15.string(), name: ContractIdentifierSchema, values: z15.array(WorkflowParameterSchema) }).strict()
|
|
11860
12231
|
])).optional(),
|
|
11861
12232
|
placeholder: LocalizedTextSchema.optional(),
|
|
11862
|
-
isNodeSetting:
|
|
11863
|
-
noDataExpression:
|
|
11864
|
-
required:
|
|
11865
|
-
example:
|
|
11866
|
-
extractValue:
|
|
11867
|
-
properties:
|
|
11868
|
-
assetType:
|
|
11869
|
-
flag:
|
|
11870
|
-
enableExpand:
|
|
11871
|
-
enableVoice:
|
|
11872
|
-
expandButtonText:
|
|
11873
|
-
knowledgeGraphButtonText:
|
|
11874
|
-
selectListDisplayMode:
|
|
11875
|
-
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()
|
|
11876
12247
|
}).strict()
|
|
11877
12248
|
);
|
|
11878
|
-
var WorkflowOutputBindingSchema =
|
|
11879
|
-
var WorkflowNodeSchema =
|
|
12249
|
+
var WorkflowOutputBindingSchema = z15.object({ key: ContractIdentifierSchema, value: z15.string() }).strict();
|
|
12250
|
+
var WorkflowNodeSchema = z15.object({
|
|
11880
12251
|
id: ContractIdentifierSchema,
|
|
11881
12252
|
referenceName: ContractIdentifierSchema,
|
|
11882
12253
|
capabilityRef: ContractIdentifierSchema,
|
|
11883
12254
|
capabilityVersion: ContractIdentifierSchema.optional(),
|
|
11884
|
-
inputBindings:
|
|
11885
|
-
configuration:
|
|
12255
|
+
inputBindings: z15.record(z15.string(), JsonValueSchema).default({}),
|
|
12256
|
+
configuration: z15.object({ executor: z15.literal("conductor"), task: ConductorTaskDefinitionSchema }).strict()
|
|
11886
12257
|
}).strict().superRefine((node, context) => {
|
|
11887
12258
|
if (node.configuration.task.taskReferenceName !== node.referenceName) context.addIssue({ code: "custom", path: ["configuration", "task", "taskReferenceName"], message: "Conductor task reference must match node referenceName." });
|
|
11888
12259
|
if (node.configuration.task.name !== node.capabilityRef) context.addIssue({ code: "custom", path: ["configuration", "task", "name"], message: "Conductor task name must match node capabilityRef." });
|
|
11889
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." });
|
|
11890
12261
|
});
|
|
11891
|
-
var WorkflowEdgeSchema =
|
|
12262
|
+
var WorkflowEdgeSchema = z15.object({
|
|
11892
12263
|
from: ContractIdentifierSchema,
|
|
11893
12264
|
to: ContractIdentifierSchema,
|
|
11894
12265
|
outputPort: ContractIdentifierSchema.optional(),
|
|
11895
12266
|
inputPort: ContractIdentifierSchema.optional(),
|
|
11896
|
-
condition:
|
|
12267
|
+
condition: z15.string().optional()
|
|
11897
12268
|
}).strict();
|
|
11898
|
-
var WorkflowTriggerSchema =
|
|
12269
|
+
var WorkflowTriggerSchema = z15.object({
|
|
11899
12270
|
id: ContractIdentifierSchema,
|
|
11900
|
-
type:
|
|
11901
|
-
enabled:
|
|
11902
|
-
schedule:
|
|
11903
|
-
webhook:
|
|
11904
|
-
path:
|
|
11905
|
-
method:
|
|
11906
|
-
auth:
|
|
11907
|
-
basicAuth:
|
|
11908
|
-
headerAuth:
|
|
11909
|
-
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"])
|
|
11910
12281
|
}).strict().optional(),
|
|
11911
|
-
event:
|
|
12282
|
+
event: z15.object({
|
|
11912
12283
|
eventType: ContractIdentifierSchema,
|
|
11913
12284
|
configuration: JsonValueSchema.optional()
|
|
11914
12285
|
}).strict().optional()
|
|
@@ -11917,63 +12288,63 @@ var WorkflowTriggerSchema = z14.object({
|
|
|
11917
12288
|
if (trigger.type === "webhook" && !trigger.webhook) context.addIssue({ code: "custom", path: ["webhook"], message: "Webhook trigger requires webhook configuration." });
|
|
11918
12289
|
if (trigger.type === "event" && !trigger.event) context.addIssue({ code: "custom", path: ["event"], message: "Event trigger requires event configuration." });
|
|
11919
12290
|
});
|
|
11920
|
-
var WorkflowValidationIssueSchema =
|
|
12291
|
+
var WorkflowValidationIssueSchema = z15.object({
|
|
11921
12292
|
taskReferenceName: ContractIdentifierSchema,
|
|
11922
|
-
issueType:
|
|
11923
|
-
detailReason:
|
|
11924
|
-
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()
|
|
11925
12296
|
}).strict();
|
|
11926
|
-
var WorkflowDefinitionSchema =
|
|
11927
|
-
contract:
|
|
12297
|
+
var WorkflowDefinitionSchema = z15.object({
|
|
12298
|
+
contract: z15.literal("WorkflowDefinition"),
|
|
11928
12299
|
metadata: ContractMetadataSchema.omit({ name: true, description: true, labels: true }).extend({
|
|
11929
12300
|
name: LocalizedTextSchema,
|
|
11930
12301
|
description: LocalizedTextSchema.optional(),
|
|
11931
|
-
role:
|
|
12302
|
+
role: z15.enum(["workflow", "template"]),
|
|
11932
12303
|
teamId: ContractIdentifierSchema,
|
|
11933
12304
|
creatorRef: EntityRefSchema,
|
|
11934
|
-
tags:
|
|
12305
|
+
tags: z15.array(ContractIdentifierSchema).default([])
|
|
11935
12306
|
}).strict(),
|
|
11936
|
-
revision:
|
|
11937
|
-
kind:
|
|
11938
|
-
recordVersion:
|
|
11939
|
-
sourceVersion:
|
|
12307
|
+
revision: z15.object({
|
|
12308
|
+
kind: z15.enum(["release", "backup"]),
|
|
12309
|
+
recordVersion: z15.number().int().positive(),
|
|
12310
|
+
sourceVersion: z15.number().int().positive().optional()
|
|
11940
12311
|
}).strict().superRefine((revision, context) => {
|
|
11941
12312
|
if (revision.kind === "backup" && revision.sourceVersion === void 0) context.addIssue({ code: "custom", path: ["sourceVersion"], message: "Backup revisions require a sourceVersion." });
|
|
11942
12313
|
}),
|
|
11943
|
-
presentation:
|
|
11944
|
-
ports:
|
|
11945
|
-
parameters:
|
|
11946
|
-
graph:
|
|
11947
|
-
execution:
|
|
11948
|
-
timeoutMs:
|
|
11949
|
-
retries:
|
|
11950
|
-
concurrencyLimit:
|
|
11951
|
-
idempotency:
|
|
11952
|
-
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) => {
|
|
11953
12324
|
if (rateLimit.enabled && (rateLimit.max === 0 || rateLimit.windowMs === 0)) context.addIssue({ code: "custom", message: "Enabled rate limit requires positive max and windowMs." });
|
|
11954
12325
|
}).optional(),
|
|
11955
|
-
conductor:
|
|
11956
|
-
ownerApp:
|
|
11957
|
-
createTime:
|
|
11958
|
-
updateTime:
|
|
11959
|
-
createdBy:
|
|
11960
|
-
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(),
|
|
11961
12332
|
failureWorkflow: ContractIdentifierSchema.optional(),
|
|
11962
|
-
schemaVersion:
|
|
11963
|
-
restartable:
|
|
11964
|
-
workflowStatusListenerEnabled:
|
|
11965
|
-
ownerEmail:
|
|
11966
|
-
timeoutPolicy:
|
|
11967
|
-
variables:
|
|
11968
|
-
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()
|
|
11969
12340
|
}).strict()
|
|
11970
12341
|
}).strict(),
|
|
11971
|
-
triggers:
|
|
11972
|
-
views:
|
|
11973
|
-
dataContracts:
|
|
11974
|
-
governance:
|
|
11975
|
-
interfaces:
|
|
11976
|
-
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(),
|
|
11977
12348
|
shortcutRef: EntityRefSchema.optional(),
|
|
11978
12349
|
preferredAppId: ContractIdentifierSchema.optional()
|
|
11979
12350
|
}).strict().superRefine((interfaces, context) => {
|
|
@@ -11992,21 +12363,21 @@ var WorkflowDefinitionSchema = z14.object({
|
|
|
11992
12363
|
});
|
|
11993
12364
|
|
|
11994
12365
|
// src/contracts/workflow-runtime.ts
|
|
11995
|
-
import { z as
|
|
11996
|
-
var WorkflowCatalogEntrySchema =
|
|
11997
|
-
contract:
|
|
12366
|
+
import { z as z16 } from "zod";
|
|
12367
|
+
var WorkflowCatalogEntrySchema = z16.object({
|
|
12368
|
+
contract: z16.literal("WorkflowCatalogEntry"),
|
|
11998
12369
|
workflowId: ContractIdentifierSchema,
|
|
11999
12370
|
teamId: ContractIdentifierSchema,
|
|
12000
12371
|
creatorRef: EntityRefSchema,
|
|
12001
12372
|
currentDefinitionRef: EntityRefSchema,
|
|
12002
|
-
lifecycle:
|
|
12003
|
-
asset:
|
|
12004
|
-
preset:
|
|
12005
|
-
marketplacePublished:
|
|
12373
|
+
lifecycle: z16.enum(["ACTIVE", "DELETED"]),
|
|
12374
|
+
asset: z16.object({
|
|
12375
|
+
preset: z16.boolean(),
|
|
12376
|
+
marketplacePublished: z16.boolean(),
|
|
12006
12377
|
publishConfig: JsonObjectSchema.optional(),
|
|
12007
|
-
sort:
|
|
12378
|
+
sort: z16.number().int(),
|
|
12008
12379
|
forkFromRef: EntityRefSchema.optional(),
|
|
12009
|
-
notAuthorized:
|
|
12380
|
+
notAuthorized: z16.boolean()
|
|
12010
12381
|
}).strict(),
|
|
12011
12382
|
createdAt: IsoDateTimeSchema,
|
|
12012
12383
|
updatedAt: IsoDateTimeSchema,
|
|
@@ -12041,17 +12412,17 @@ var WorkflowCatalogEntrySchema = z15.object({
|
|
|
12041
12412
|
});
|
|
12042
12413
|
}
|
|
12043
12414
|
});
|
|
12044
|
-
var WorkflowPublicationSchema =
|
|
12045
|
-
contract:
|
|
12415
|
+
var WorkflowPublicationSchema = z16.object({
|
|
12416
|
+
contract: z16.literal("WorkflowPublication"),
|
|
12046
12417
|
publicationId: ContractIdentifierSchema,
|
|
12047
12418
|
definitionRef: EntityRefSchema,
|
|
12048
12419
|
runtimeDefinitionRef: EntityRefSchema,
|
|
12049
12420
|
sourceHash: Sha256Schema,
|
|
12050
12421
|
compiledHash: Sha256Schema,
|
|
12051
|
-
status:
|
|
12422
|
+
status: z16.enum(["PENDING", "PUBLISHED", "FAILED", "RETIRED"]),
|
|
12052
12423
|
publisherRef: EntityRefSchema,
|
|
12053
12424
|
publishedAt: IsoDateTimeSchema.optional(),
|
|
12054
|
-
failureReason:
|
|
12425
|
+
failureReason: z16.string().trim().min(1).optional()
|
|
12055
12426
|
}).strict().superRefine((publication, context) => {
|
|
12056
12427
|
if (publication.definitionRef.kind !== "workflow-definition") {
|
|
12057
12428
|
context.addIssue({
|
|
@@ -12082,12 +12453,12 @@ var WorkflowPublicationSchema = z15.object({
|
|
|
12082
12453
|
});
|
|
12083
12454
|
}
|
|
12084
12455
|
});
|
|
12085
|
-
var WorkflowCompletionCommitSchema =
|
|
12086
|
-
contract:
|
|
12456
|
+
var WorkflowCompletionCommitSchema = z16.object({
|
|
12457
|
+
contract: z16.literal("WorkflowCompletionCommit"),
|
|
12087
12458
|
commitId: ContractIdentifierSchema,
|
|
12088
12459
|
run: ApplicationRunSchema,
|
|
12089
|
-
outputs:
|
|
12090
|
-
artifacts:
|
|
12460
|
+
outputs: z16.array(OutputRecordSchema),
|
|
12461
|
+
artifacts: z16.array(ArtifactManifestSchema),
|
|
12091
12462
|
lineage: LineageRecordSchema,
|
|
12092
12463
|
completedAt: IsoDateTimeSchema
|
|
12093
12464
|
}).strict().superRefine((commit, context) => {
|
|
@@ -12129,15 +12500,15 @@ var WorkflowCompletionCommitSchema = z15.object({
|
|
|
12129
12500
|
}
|
|
12130
12501
|
});
|
|
12131
12502
|
});
|
|
12132
|
-
var WorkflowCompletionReceiptSchema =
|
|
12133
|
-
contract:
|
|
12503
|
+
var WorkflowCompletionReceiptSchema = z16.object({
|
|
12504
|
+
contract: z16.literal("WorkflowCompletionReceipt"),
|
|
12134
12505
|
commitId: ContractIdentifierSchema,
|
|
12135
12506
|
runRef: EntityRefSchema,
|
|
12136
|
-
outputRefs:
|
|
12137
|
-
artifactRefs:
|
|
12507
|
+
outputRefs: z16.array(EntityRefSchema),
|
|
12508
|
+
artifactRefs: z16.array(EntityRefSchema),
|
|
12138
12509
|
contentHash: Sha256Schema,
|
|
12139
12510
|
committedAt: IsoDateTimeSchema,
|
|
12140
|
-
idempotentReplay:
|
|
12511
|
+
idempotentReplay: z16.boolean()
|
|
12141
12512
|
}).strict().superRefine((receipt, context) => {
|
|
12142
12513
|
if (receipt.runRef.kind !== "application-run") {
|
|
12143
12514
|
context.addIssue({
|
|
@@ -12201,6 +12572,9 @@ var canonicalContractSchemas = {
|
|
|
12201
12572
|
"expiring-access-grant": ExpiringAccessGrantSchema,
|
|
12202
12573
|
"hotword-body": HotwordBodySchema,
|
|
12203
12574
|
"lineage-record": LineageRecordSchema,
|
|
12575
|
+
"menu-definition": MenuDefinitionSchema,
|
|
12576
|
+
"menu-definition-set": MenuDefinitionSetSchema,
|
|
12577
|
+
"menu-runtime-bundle": MenuRuntimeBundleSchema,
|
|
12204
12578
|
"ontology-definition": OntologyDefinitionSchema,
|
|
12205
12579
|
"overlay-node": OverlayNodeSchema,
|
|
12206
12580
|
"output-record": OutputRecordSchema,
|
|
@@ -12290,6 +12664,15 @@ export {
|
|
|
12290
12664
|
CapabilityRegistrySourceSchema,
|
|
12291
12665
|
CapabilitySourceTypeSchema,
|
|
12292
12666
|
ChangeImpactGraphSchema,
|
|
12667
|
+
CompiledMenuActionBehaviorSchema,
|
|
12668
|
+
CompiledMenuBehaviorSchema,
|
|
12669
|
+
CompiledMenuDividerNodeSchema,
|
|
12670
|
+
CompiledMenuGroupNodeSchema,
|
|
12671
|
+
CompiledMenuItemAccessSchema,
|
|
12672
|
+
CompiledMenuItemNodeSchema,
|
|
12673
|
+
CompiledMenuNavigateBehaviorSchema,
|
|
12674
|
+
CompiledMenuNodeSchema,
|
|
12675
|
+
CompiledMenuProjectionSchema,
|
|
12293
12676
|
CompletionEventSchema,
|
|
12294
12677
|
CompletionHeaderSchema,
|
|
12295
12678
|
ConceptDefinitionSchema,
|
|
@@ -12298,6 +12681,14 @@ export {
|
|
|
12298
12681
|
ConductorWorkflowDefinitionSchema,
|
|
12299
12682
|
ContractMetadataSchema,
|
|
12300
12683
|
ContractPortSchema,
|
|
12684
|
+
CurrentUserMenuActionItemSchema,
|
|
12685
|
+
CurrentUserMenuConfigSchema,
|
|
12686
|
+
CurrentUserMenuControlItemSchema,
|
|
12687
|
+
CurrentUserMenuDisplayTextSchema,
|
|
12688
|
+
CurrentUserMenuItemSchema,
|
|
12689
|
+
CurrentUserMenuNavigationItemSchema,
|
|
12690
|
+
CurrentUserMenuProfileSchema,
|
|
12691
|
+
CurrentUserMenuSectionSchema,
|
|
12301
12692
|
DataContinuityEnvelopeSchema,
|
|
12302
12693
|
DomainCommandDefinitionSchema,
|
|
12303
12694
|
DomainCommandSchema,
|
|
@@ -12309,6 +12700,27 @@ export {
|
|
|
12309
12700
|
JsonObjectSchema,
|
|
12310
12701
|
JsonValueSchema,
|
|
12311
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,
|
|
12312
12724
|
OntologyDefinitionSchema,
|
|
12313
12725
|
OutputRecordSchema,
|
|
12314
12726
|
OverlayNodeSchema,
|