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