@inf-monkeys-tech/monkeys 1.1.32 → 1.1.34
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/README.md +19 -0
- 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/page-expression.d.ts +7 -0
- package/lib/contracts/page-expression.d.ts.map +1 -1
- package/lib/contracts/page-expression.js +13 -6
- package/lib/contracts/page-expression.js.map +1 -1
- package/lib/contracts/tenant.d.ts +3 -0
- package/lib/contracts/tenant.d.ts.map +1 -1
- package/lib/contracts/tenant.js +1 -0
- package/lib/contracts/tenant.js.map +1 -1
- package/lib/contracts/workflow-canvas.d.ts +73 -0
- package/lib/contracts/workflow-canvas.d.ts.map +1 -0
- package/lib/contracts/workflow-canvas.js +33 -0
- package/lib/contracts/workflow-canvas.js.map +1 -0
- package/lib/contracts/workflow-definition.d.ts +537 -0
- package/lib/contracts/workflow-definition.d.ts.map +1 -1
- package/lib/contracts/workflow-definition.js +12 -2
- package/lib/contracts/workflow-definition.js.map +1 -1
- package/lib/esm/{chunk-COMJDE7H.mjs → chunk-DDEMQXTP.mjs} +3 -3
- package/lib/esm/{chunk-DMDJCNPT.mjs → chunk-EKT45BA4.mjs} +2 -2
- package/lib/esm/{chunk-O5YP4QQ7.mjs → chunk-IJ2W77NR.mjs} +2 -2
- package/lib/esm/{chunk-BQ77E4VU.mjs → chunk-L5CYU6K4.mjs} +390 -339
- package/lib/esm/chunk-L5CYU6K4.mjs.map +1 -0
- package/lib/esm/{chunk-HLCW3N47.mjs → chunk-UWGXMF6O.mjs} +2 -2
- package/lib/esm/{chunk-OL3X34S6.mjs → chunk-ZN3TO3U7.mjs} +17 -10
- package/lib/esm/{chunk-OL3X34S6.mjs.map → chunk-ZN3TO3U7.mjs.map} +1 -1
- package/lib/esm/contracts/index.mjs +16 -4
- package/lib/esm/index.mjs +18 -6
- package/lib/esm/index.mjs.map +1 -1
- package/lib/esm/runtime/index.mjs +3 -3
- package/lib/esm/schemas/index.mjs +3 -3
- package/lib/json-schema/tenant-product-config.schema.json +4 -0
- package/lib/json-schema/tenant-runtime-config.schema.json +4 -0
- package/lib/json-schema/workflow-definition.schema.json +195 -65
- package/lib/runtime/action-program-author.d.ts +7 -1
- package/lib/runtime/action-program-author.d.ts.map +1 -1
- package/lib/runtime/action-program-author.js.map +1 -1
- package/lib/runtime/page-expression.d.ts.map +1 -1
- package/lib/runtime/page-expression.js +16 -7
- package/lib/runtime/page-expression.js.map +1 -1
- package/lib/schemas/index.d.ts +44 -0
- package/lib/schemas/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/esm/chunk-BQ77E4VU.mjs.map +0 -1
- /package/lib/esm/{chunk-COMJDE7H.mjs.map → chunk-DDEMQXTP.mjs.map} +0 -0
- /package/lib/esm/{chunk-DMDJCNPT.mjs.map → chunk-EKT45BA4.mjs.map} +0 -0
- /package/lib/esm/{chunk-O5YP4QQ7.mjs.map → chunk-IJ2W77NR.mjs.map} +0 -0
- /package/lib/esm/{chunk-HLCW3N47.mjs.map → chunk-UWGXMF6O.mjs.map} +0 -0
|
@@ -7767,9 +7767,10 @@ var RecursivePageExpressionSchema = z4.lazy(() => z4.discriminatedUnion("kind",
|
|
|
7767
7767
|
...["map", "filter", "sum"].map((kind) => z4.object({ kind: z4.literal(kind), source: RecursivePageExpressionSchema, value: RecursivePageExpressionSchema }).strict())
|
|
7768
7768
|
]));
|
|
7769
7769
|
var PAGE_EXPRESSION_LIMITS = Object.freeze({ depth: 32, nodes: 4096, operations: 2e4, collection: 1e3, bytes: 1048576 });
|
|
7770
|
-
var
|
|
7770
|
+
var PAGE_EXPRESSION_VALUE_LIMITS = Object.freeze({ depth: 32, nodes: 262144, collection: 1e3, bytes: 16777216 });
|
|
7771
|
+
var assertValueBudget = (value, limits) => {
|
|
7771
7772
|
if (value === null || typeof value !== "object") {
|
|
7772
|
-
if (typeof value === "string" && value.length * 2 >
|
|
7773
|
+
if (typeof value === "string" && value.length * 2 > limits.bytes) throw new Error("PAGE_EXPRESSION_BUDGET");
|
|
7773
7774
|
return;
|
|
7774
7775
|
}
|
|
7775
7776
|
const queue = [{ value, depth: 0 }];
|
|
@@ -7777,19 +7778,22 @@ var assertPageValueBudget = (value) => {
|
|
|
7777
7778
|
let bytes = 0;
|
|
7778
7779
|
while (queue.length) {
|
|
7779
7780
|
const item = queue.pop();
|
|
7780
|
-
if (++nodes >
|
|
7781
|
+
if (++nodes > limits.nodes || item.depth > limits.depth) throw new Error("PAGE_EXPRESSION_BUDGET");
|
|
7782
|
+
if (limits === PAGE_EXPRESSION_VALUE_LIMITS && Array.isArray(item.value) && item.value.length > limits.collection) throw new Error("PAGE_EXPRESSION_BUDGET");
|
|
7781
7783
|
if (typeof item.value === "string") bytes += item.value.length * 2;
|
|
7782
7784
|
if (item.value && typeof item.value === "object") {
|
|
7783
7785
|
for (const [key, child] of Object.entries(item.value)) {
|
|
7784
7786
|
bytes += key.length * 2;
|
|
7785
7787
|
if (["__proto__", "prototype", "constructor"].includes(key)) throw new Error("PAGE_EXPRESSION_UNSAFE_PATH");
|
|
7786
|
-
if (queue.length >=
|
|
7788
|
+
if (queue.length >= limits.nodes) throw new Error("PAGE_EXPRESSION_BUDGET");
|
|
7787
7789
|
queue.push({ value: child, depth: item.depth + 1 });
|
|
7788
7790
|
}
|
|
7789
7791
|
}
|
|
7790
|
-
if (bytes >
|
|
7792
|
+
if (bytes > limits.bytes) throw new Error("PAGE_EXPRESSION_BUDGET");
|
|
7791
7793
|
}
|
|
7792
7794
|
};
|
|
7795
|
+
var assertPageValueBudget = (value) => assertValueBudget(value, PAGE_EXPRESSION_LIMITS);
|
|
7796
|
+
var assertPageExpressionValueBudget = (value) => assertValueBudget(value, PAGE_EXPRESSION_VALUE_LIMITS);
|
|
7793
7797
|
var PageExpressionSchema = z4.unknown().superRefine((value, context) => {
|
|
7794
7798
|
try {
|
|
7795
7799
|
assertPageValueBudget(value);
|
|
@@ -19019,6 +19023,7 @@ var TenantApplicationConfigSchema = z17.object({
|
|
|
19019
19023
|
landingPage: TenantLandingPageConfigSchema.optional(),
|
|
19020
19024
|
auth: z17.object({
|
|
19021
19025
|
enabled: z17.array(ContractIdentifierSchema).default([]),
|
|
19026
|
+
defaultLoginMethod: z17.string().max(128).optional(),
|
|
19022
19027
|
oidc: z17.object({
|
|
19023
19028
|
buttonText: z17.string().optional(),
|
|
19024
19029
|
autoSignin: z17.boolean().optional()
|
|
@@ -19231,9 +19236,40 @@ var TenantRuntimeConfigSchema = z17.object({
|
|
|
19231
19236
|
declarativeRuntime: DeclarativeRuntimeRolloutCapabilitySchema.optional()
|
|
19232
19237
|
}).strict();
|
|
19233
19238
|
|
|
19234
|
-
// src/contracts/workflow-
|
|
19239
|
+
// src/contracts/workflow-canvas.ts
|
|
19235
19240
|
import { z as z18 } from "zod";
|
|
19236
|
-
var
|
|
19241
|
+
var WorkflowCanvasElementSchema = z18.object({
|
|
19242
|
+
id: z18.string().min(1),
|
|
19243
|
+
type: z18.enum(["rectangle", "diamond", "ellipse", "text", "arrow", "line", "freedraw", "image", "frame", "magicframe", "embeddable", "iframe"]),
|
|
19244
|
+
x: z18.number().finite(),
|
|
19245
|
+
y: z18.number().finite(),
|
|
19246
|
+
width: z18.number().finite().nonnegative(),
|
|
19247
|
+
height: z18.number().finite().nonnegative(),
|
|
19248
|
+
customData: z18.object({
|
|
19249
|
+
workflow: z18.object({
|
|
19250
|
+
nodeRef: z18.string().min(1).optional(),
|
|
19251
|
+
edgeRef: z18.string().min(1).optional()
|
|
19252
|
+
}).strict().optional()
|
|
19253
|
+
}).strict().optional()
|
|
19254
|
+
}).catchall(JsonValueSchema);
|
|
19255
|
+
var WorkflowCanvasSchema = z18.object({
|
|
19256
|
+
engine: z18.literal("excalidraw"),
|
|
19257
|
+
schemaVersion: z18.literal(1),
|
|
19258
|
+
elements: z18.array(WorkflowCanvasElementSchema).max(2e4),
|
|
19259
|
+
files: z18.record(z18.string(), z18.object({
|
|
19260
|
+
reference: z18.string().regex(/^file:\/\/[A-Za-z0-9][A-Za-z0-9_-]{0,127}$/),
|
|
19261
|
+
mimeType: z18.enum(["image/png", "image/jpeg", "image/webp", "image/gif", "image/svg+xml"]),
|
|
19262
|
+
created: z18.number().finite().nonnegative()
|
|
19263
|
+
}).strict())
|
|
19264
|
+
}).strict().superRefine((canvas, context) => {
|
|
19265
|
+
if (new Set(canvas.elements.map((element) => element.id)).size !== canvas.elements.length) {
|
|
19266
|
+
context.addIssue({ code: "custom", path: ["elements"], message: "Canvas element identities must be unique." });
|
|
19267
|
+
}
|
|
19268
|
+
});
|
|
19269
|
+
|
|
19270
|
+
// src/contracts/workflow-definition.ts
|
|
19271
|
+
import { z as z19 } from "zod";
|
|
19272
|
+
var ConductorTaskTypeSchema = z19.enum([
|
|
19237
19273
|
"SIMPLE",
|
|
19238
19274
|
"DYNAMIC",
|
|
19239
19275
|
"FORK_JOIN",
|
|
@@ -19282,46 +19318,46 @@ var requiredTaskFields = {
|
|
|
19282
19318
|
WAIT: ["inputParameters"],
|
|
19283
19319
|
TERMINATE: ["inputParameters"]
|
|
19284
19320
|
};
|
|
19285
|
-
var ConductorTaskDefinitionSchema =
|
|
19286
|
-
() =>
|
|
19321
|
+
var ConductorTaskDefinitionSchema = z19.lazy(
|
|
19322
|
+
() => z19.object({
|
|
19287
19323
|
name: ContractIdentifierSchema,
|
|
19288
19324
|
taskReferenceName: ContractIdentifierSchema,
|
|
19289
19325
|
type: ConductorTaskTypeSchema,
|
|
19290
|
-
inputParameters:
|
|
19291
|
-
startDelay:
|
|
19292
|
-
optional:
|
|
19293
|
-
asyncComplete:
|
|
19294
|
-
rateLimited:
|
|
19295
|
-
retryCount:
|
|
19296
|
-
taskDefinition:
|
|
19297
|
-
loopCondition:
|
|
19298
|
-
loopOver:
|
|
19299
|
-
sink:
|
|
19300
|
-
forkTasks:
|
|
19301
|
-
joinOn:
|
|
19302
|
-
defaultExclusiveJoinTask:
|
|
19303
|
-
dynamicForkTasksParam:
|
|
19304
|
-
dynamicForkTasksInputParamName:
|
|
19305
|
-
subWorkflowParam:
|
|
19306
|
-
$ref:
|
|
19326
|
+
inputParameters: z19.record(z19.string(), JsonValueSchema).optional(),
|
|
19327
|
+
startDelay: z19.number().int().nonnegative().optional(),
|
|
19328
|
+
optional: z19.boolean().optional(),
|
|
19329
|
+
asyncComplete: z19.boolean().optional(),
|
|
19330
|
+
rateLimited: z19.boolean().optional(),
|
|
19331
|
+
retryCount: z19.number().int().nonnegative().optional(),
|
|
19332
|
+
taskDefinition: z19.record(z19.string(), JsonValueSchema).optional(),
|
|
19333
|
+
loopCondition: z19.string().optional(),
|
|
19334
|
+
loopOver: z19.array(ConductorTaskDefinitionSchema).optional(),
|
|
19335
|
+
sink: z19.string().optional(),
|
|
19336
|
+
forkTasks: z19.array(z19.array(ConductorTaskDefinitionSchema)).optional(),
|
|
19337
|
+
joinOn: z19.array(ContractIdentifierSchema).optional(),
|
|
19338
|
+
defaultExclusiveJoinTask: z19.array(ContractIdentifierSchema).optional(),
|
|
19339
|
+
dynamicForkTasksParam: z19.string().optional(),
|
|
19340
|
+
dynamicForkTasksInputParamName: z19.string().optional(),
|
|
19341
|
+
subWorkflowParam: z19.object({
|
|
19342
|
+
$ref: z19.string().optional(),
|
|
19307
19343
|
name: ContractIdentifierSchema,
|
|
19308
|
-
version:
|
|
19309
|
-
taskToDomain:
|
|
19310
|
-
workflowDefinition:
|
|
19344
|
+
version: z19.number().int().positive().optional(),
|
|
19345
|
+
taskToDomain: z19.record(z19.string(), z19.string()).optional(),
|
|
19346
|
+
workflowDefinition: z19.record(z19.string(), JsonValueSchema).optional()
|
|
19311
19347
|
}).strict().optional(),
|
|
19312
|
-
decisionCases:
|
|
19313
|
-
defaultCase:
|
|
19314
|
-
evaluatorType:
|
|
19315
|
-
expression:
|
|
19348
|
+
decisionCases: z19.record(z19.string(), z19.array(ConductorTaskDefinitionSchema)).optional(),
|
|
19349
|
+
defaultCase: z19.array(ConductorTaskDefinitionSchema).optional(),
|
|
19350
|
+
evaluatorType: z19.enum(["value-param", "javascript", "graaljs"]).optional(),
|
|
19351
|
+
expression: z19.string().optional(),
|
|
19316
19352
|
__alias: JsonValueSchema.optional(),
|
|
19317
|
-
callbackFromWorker:
|
|
19353
|
+
callbackFromWorker: z19.boolean().optional(),
|
|
19318
19354
|
caseExpression: JsonValueSchema.optional(),
|
|
19319
|
-
caseValueParam:
|
|
19320
|
-
dependencies:
|
|
19321
|
-
description:
|
|
19322
|
-
dynamicTaskNameParam:
|
|
19323
|
-
joinMode:
|
|
19324
|
-
permissive:
|
|
19355
|
+
caseValueParam: z19.string().optional(),
|
|
19356
|
+
dependencies: z19.array(JsonValueSchema).optional(),
|
|
19357
|
+
description: z19.string().optional(),
|
|
19358
|
+
dynamicTaskNameParam: z19.string().optional(),
|
|
19359
|
+
joinMode: z19.string().optional(),
|
|
19360
|
+
permissive: z19.boolean().optional(),
|
|
19325
19361
|
joinTaskRef: ContractIdentifierSchema.optional(),
|
|
19326
19362
|
forkTaskRef: ContractIdentifierSchema.optional()
|
|
19327
19363
|
}).strict().superRefine((task, context) => {
|
|
@@ -19335,29 +19371,29 @@ var ConductorTaskDefinitionSchema = z18.lazy(
|
|
|
19335
19371
|
}
|
|
19336
19372
|
})
|
|
19337
19373
|
);
|
|
19338
|
-
var ConductorWorkflowDefinitionSchema =
|
|
19339
|
-
ownerApp:
|
|
19340
|
-
createTime:
|
|
19341
|
-
updateTime:
|
|
19342
|
-
createdBy:
|
|
19343
|
-
updatedBy:
|
|
19374
|
+
var ConductorWorkflowDefinitionSchema = z19.object({
|
|
19375
|
+
ownerApp: z19.string().optional(),
|
|
19376
|
+
createTime: z19.number().int().nonnegative().optional(),
|
|
19377
|
+
updateTime: z19.number().int().nonnegative().optional(),
|
|
19378
|
+
createdBy: z19.string().optional(),
|
|
19379
|
+
updatedBy: z19.string().optional(),
|
|
19344
19380
|
name: ContractIdentifierSchema,
|
|
19345
|
-
description:
|
|
19346
|
-
version:
|
|
19347
|
-
tasks:
|
|
19348
|
-
inputParameters:
|
|
19349
|
-
outputParameters:
|
|
19381
|
+
description: z19.string().optional(),
|
|
19382
|
+
version: z19.number().int().positive(),
|
|
19383
|
+
tasks: z19.array(ConductorTaskDefinitionSchema),
|
|
19384
|
+
inputParameters: z19.array(ContractIdentifierSchema),
|
|
19385
|
+
outputParameters: z19.record(z19.string(), JsonValueSchema).optional(),
|
|
19350
19386
|
failureWorkflow: ContractIdentifierSchema.optional(),
|
|
19351
|
-
schemaVersion:
|
|
19352
|
-
restartable:
|
|
19353
|
-
workflowStatusListenerEnabled:
|
|
19354
|
-
ownerEmail:
|
|
19355
|
-
timeoutPolicy:
|
|
19356
|
-
timeoutSeconds:
|
|
19357
|
-
variables:
|
|
19358
|
-
inputTemplate:
|
|
19387
|
+
schemaVersion: z19.number().int().positive().optional(),
|
|
19388
|
+
restartable: z19.boolean().optional(),
|
|
19389
|
+
workflowStatusListenerEnabled: z19.boolean().optional(),
|
|
19390
|
+
ownerEmail: z19.string().email().optional(),
|
|
19391
|
+
timeoutPolicy: z19.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
|
|
19392
|
+
timeoutSeconds: z19.number().int().nonnegative(),
|
|
19393
|
+
variables: z19.record(z19.string(), JsonValueSchema).optional(),
|
|
19394
|
+
inputTemplate: z19.record(z19.string(), JsonValueSchema).optional()
|
|
19359
19395
|
}).strict();
|
|
19360
|
-
var WorkflowParameterTypeSchema =
|
|
19396
|
+
var WorkflowParameterTypeSchema = z19.enum([
|
|
19361
19397
|
"string",
|
|
19362
19398
|
"file",
|
|
19363
19399
|
"number",
|
|
@@ -19367,214 +19403,214 @@ var WorkflowParameterTypeSchema = z18.enum([
|
|
|
19367
19403
|
"notice",
|
|
19368
19404
|
"canvas-assist"
|
|
19369
19405
|
]);
|
|
19370
|
-
var WorkflowConditionalStateSchema =
|
|
19371
|
-
conditions:
|
|
19372
|
-
|
|
19373
|
-
field:
|
|
19374
|
-
operator:
|
|
19406
|
+
var WorkflowConditionalStateSchema = z19.object({
|
|
19407
|
+
conditions: z19.array(
|
|
19408
|
+
z19.object({
|
|
19409
|
+
field: z19.string(),
|
|
19410
|
+
operator: z19.enum(["is", "isNot", "isGreaterThan", "isLessThan", "isGreaterThanOrEqual", "isLessThanOrEqual", "in", "notIn"]),
|
|
19375
19411
|
value: JsonValueSchema
|
|
19376
19412
|
}).strict()
|
|
19377
19413
|
),
|
|
19378
|
-
logic:
|
|
19414
|
+
logic: z19.enum(["AND", "OR"]).optional()
|
|
19379
19415
|
}).strict();
|
|
19380
|
-
var ImageSelectMappingAppearanceSchema =
|
|
19381
|
-
columns:
|
|
19382
|
-
cardSize:
|
|
19383
|
-
imageAspectRatio:
|
|
19384
|
-
gap:
|
|
19385
|
-
radius:
|
|
19386
|
-
borderStyle:
|
|
19387
|
-
borderWidth:
|
|
19388
|
-
enableScroll:
|
|
19389
|
-
maxHeight:
|
|
19390
|
-
enableCollapse:
|
|
19391
|
-
visibleRows:
|
|
19392
|
-
hideLabel:
|
|
19393
|
-
hideDescription:
|
|
19394
|
-
hideValue:
|
|
19416
|
+
var ImageSelectMappingAppearanceSchema = z19.object({
|
|
19417
|
+
columns: z19.number().int().min(1).max(4).optional(),
|
|
19418
|
+
cardSize: z19.enum(["sm", "md", "lg"]).optional(),
|
|
19419
|
+
imageAspectRatio: z19.enum(["square", "4:5", "3:4", "16:9"]).optional(),
|
|
19420
|
+
gap: z19.enum(["sm", "md", "lg"]).optional(),
|
|
19421
|
+
radius: z19.enum(["sm", "md", "lg", "xl"]).optional(),
|
|
19422
|
+
borderStyle: z19.enum(["none", "soft", "strong"]).optional(),
|
|
19423
|
+
borderWidth: z19.union([z19.literal(0), z19.literal(1), z19.literal(2)]).optional(),
|
|
19424
|
+
enableScroll: z19.boolean().optional(),
|
|
19425
|
+
maxHeight: z19.number().int().min(160).max(1200).optional(),
|
|
19426
|
+
enableCollapse: z19.boolean().optional(),
|
|
19427
|
+
visibleRows: z19.number().int().min(1).max(6).optional(),
|
|
19428
|
+
hideLabel: z19.boolean().optional(),
|
|
19429
|
+
hideDescription: z19.boolean().optional(),
|
|
19430
|
+
hideValue: z19.boolean().optional()
|
|
19395
19431
|
}).strict();
|
|
19396
|
-
var ComfyWorkflowPortBindingSchema =
|
|
19397
|
-
node:
|
|
19398
|
-
key:
|
|
19432
|
+
var ComfyWorkflowPortBindingSchema = z19.object({
|
|
19433
|
+
node: z19.union([z19.string(), z19.number()]),
|
|
19434
|
+
key: z19.string().optional()
|
|
19399
19435
|
}).strict();
|
|
19400
|
-
var WorkflowParameterTypeOptionsSchema =
|
|
19401
|
-
editor:
|
|
19402
|
-
editorLanguage:
|
|
19403
|
-
maxValue:
|
|
19404
|
-
minValue:
|
|
19405
|
-
max:
|
|
19406
|
-
min:
|
|
19407
|
-
multipleValues:
|
|
19408
|
-
numberPrecision:
|
|
19409
|
-
password:
|
|
19410
|
-
rows:
|
|
19411
|
-
assetType:
|
|
19412
|
-
accept:
|
|
19413
|
-
maxSize:
|
|
19414
|
-
fileType:
|
|
19415
|
-
aiMultiShotMainImageField:
|
|
19416
|
-
aiMultiShotWorkflowAppId:
|
|
19417
|
-
aiMultiShotWorkflowId:
|
|
19418
|
-
allowCustomInput:
|
|
19419
|
-
allowUploadVideo:
|
|
19420
|
-
aspectRatioField:
|
|
19421
|
-
assemblyValueType:
|
|
19422
|
-
autoAnalyzeDesignImage:
|
|
19423
|
-
autoDetectAspectRatio:
|
|
19424
|
-
autoIncrementId:
|
|
19436
|
+
var WorkflowParameterTypeOptionsSchema = z19.object({
|
|
19437
|
+
editor: z19.enum(["code", "codeNodeEditor", "htmlEditor", "sqlEditor", "json"]).optional(),
|
|
19438
|
+
editorLanguage: z19.enum(["javaScript", "json", "python", "sql"]).optional(),
|
|
19439
|
+
maxValue: z19.number().optional(),
|
|
19440
|
+
minValue: z19.number().optional(),
|
|
19441
|
+
max: z19.number().optional(),
|
|
19442
|
+
min: z19.number().optional(),
|
|
19443
|
+
multipleValues: z19.boolean().optional(),
|
|
19444
|
+
numberPrecision: z19.number().nonnegative().optional(),
|
|
19445
|
+
password: z19.boolean().optional(),
|
|
19446
|
+
rows: z19.number().int().positive().optional(),
|
|
19447
|
+
assetType: z19.string().optional(),
|
|
19448
|
+
accept: z19.string().optional(),
|
|
19449
|
+
maxSize: z19.number().positive().optional(),
|
|
19450
|
+
fileType: z19.string().optional(),
|
|
19451
|
+
aiMultiShotMainImageField: z19.string().optional(),
|
|
19452
|
+
aiMultiShotWorkflowAppId: z19.string().optional(),
|
|
19453
|
+
aiMultiShotWorkflowId: z19.string().optional(),
|
|
19454
|
+
allowCustomInput: z19.boolean().optional(),
|
|
19455
|
+
allowUploadVideo: z19.boolean().optional(),
|
|
19456
|
+
aspectRatioField: z19.string().optional(),
|
|
19457
|
+
assemblyValueType: z19.string().optional(),
|
|
19458
|
+
autoAnalyzeDesignImage: z19.boolean().optional(),
|
|
19459
|
+
autoDetectAspectRatio: z19.boolean().optional(),
|
|
19460
|
+
autoIncrementId: z19.boolean().optional(),
|
|
19425
19461
|
comfyOptions: ComfyWorkflowPortBindingSchema.optional(),
|
|
19426
|
-
comfyuiModelServerId:
|
|
19427
|
-
comfyuiModelTypeName:
|
|
19462
|
+
comfyuiModelServerId: z19.string().optional(),
|
|
19463
|
+
comfyuiModelTypeName: z19.string().optional(),
|
|
19428
19464
|
defaultCustomInput: JsonValueSchema.optional(),
|
|
19429
|
-
descriptionAlert:
|
|
19430
|
-
disabled:
|
|
19431
|
-
editable:
|
|
19432
|
-
enableAiMultiShot:
|
|
19433
|
-
enableBooleanSwitchMode:
|
|
19434
|
-
enableClear:
|
|
19435
|
-
enableExpand:
|
|
19436
|
-
enableImageCrop:
|
|
19437
|
-
enableImageMask:
|
|
19438
|
-
enableImageOverlay:
|
|
19439
|
-
enablePopupEditor:
|
|
19440
|
-
enablePromptFontSize:
|
|
19441
|
-
enableReset:
|
|
19442
|
-
enableSelectItemIcon:
|
|
19443
|
-
enableSelectList:
|
|
19444
|
-
enableSelectSearch:
|
|
19445
|
-
enableSliderEnterMode:
|
|
19446
|
-
enableVoice:
|
|
19447
|
-
expandButtonText:
|
|
19448
|
-
foldUp:
|
|
19449
|
-
hidden:
|
|
19450
|
-
hideRequiredDot:
|
|
19451
|
-
inlineTitleWithSelect:
|
|
19452
|
-
knowledgeGraphButtonText:
|
|
19453
|
-
identifyAttributeCount:
|
|
19454
|
-
identifyAttributes:
|
|
19455
|
-
identifyMaxVariants:
|
|
19456
|
-
identifySourceField:
|
|
19457
|
-
imageOverlayBaseField:
|
|
19458
|
-
imageOverlayOverlayField:
|
|
19465
|
+
descriptionAlert: z19.boolean().optional(),
|
|
19466
|
+
disabled: z19.union([z19.boolean(), WorkflowConditionalStateSchema]).optional(),
|
|
19467
|
+
editable: z19.union([z19.boolean(), WorkflowConditionalStateSchema]).optional(),
|
|
19468
|
+
enableAiMultiShot: z19.boolean().optional(),
|
|
19469
|
+
enableBooleanSwitchMode: z19.boolean().optional(),
|
|
19470
|
+
enableClear: z19.boolean().optional(),
|
|
19471
|
+
enableExpand: z19.boolean().optional(),
|
|
19472
|
+
enableImageCrop: z19.boolean().optional(),
|
|
19473
|
+
enableImageMask: z19.boolean().optional(),
|
|
19474
|
+
enableImageOverlay: z19.boolean().optional(),
|
|
19475
|
+
enablePopupEditor: z19.boolean().optional(),
|
|
19476
|
+
enablePromptFontSize: z19.boolean().optional(),
|
|
19477
|
+
enableReset: z19.boolean().optional(),
|
|
19478
|
+
enableSelectItemIcon: z19.boolean().optional(),
|
|
19479
|
+
enableSelectList: z19.boolean().optional(),
|
|
19480
|
+
enableSelectSearch: z19.boolean().optional(),
|
|
19481
|
+
enableSliderEnterMode: z19.boolean().optional(),
|
|
19482
|
+
enableVoice: z19.boolean().optional(),
|
|
19483
|
+
expandButtonText: z19.string().optional(),
|
|
19484
|
+
foldUp: z19.boolean().optional(),
|
|
19485
|
+
hidden: z19.boolean().optional(),
|
|
19486
|
+
hideRequiredDot: z19.boolean().optional(),
|
|
19487
|
+
inlineTitleWithSelect: z19.boolean().optional(),
|
|
19488
|
+
knowledgeGraphButtonText: z19.string().optional(),
|
|
19489
|
+
identifyAttributeCount: z19.union([z19.number().nonnegative(), z19.string().min(1), z19.object({ min: z19.number().nonnegative().optional(), max: z19.number().nonnegative().optional() }).strict()]).optional(),
|
|
19490
|
+
identifyAttributes: z19.array(JsonValueSchema).optional(),
|
|
19491
|
+
identifyMaxVariants: z19.number().int().nonnegative().optional(),
|
|
19492
|
+
identifySourceField: z19.string().optional(),
|
|
19493
|
+
imageOverlayBaseField: z19.string().optional(),
|
|
19494
|
+
imageOverlayOverlayField: z19.string().optional(),
|
|
19459
19495
|
imageSelectMappingAppearance: ImageSelectMappingAppearanceSchema.optional(),
|
|
19460
|
-
imageSelectMappingColumns:
|
|
19461
|
-
imageSelectMappingEnableCustomUpload:
|
|
19462
|
-
imageSelectMappingHideLabel:
|
|
19463
|
-
imageSelectMappingHideLink:
|
|
19464
|
-
imageSelectMappingHideMeta:
|
|
19465
|
-
imageSelectMappingInlineUseLargeUploadBox:
|
|
19466
|
-
imageSelectMappingPromptField:
|
|
19467
|
-
imageSelectMappingTabOrder:
|
|
19468
|
-
imageSelectMappingTabWidthMode:
|
|
19496
|
+
imageSelectMappingColumns: z19.number().int().min(1).max(4).optional(),
|
|
19497
|
+
imageSelectMappingEnableCustomUpload: z19.boolean().optional(),
|
|
19498
|
+
imageSelectMappingHideLabel: z19.boolean().optional(),
|
|
19499
|
+
imageSelectMappingHideLink: z19.boolean().optional(),
|
|
19500
|
+
imageSelectMappingHideMeta: z19.boolean().optional(),
|
|
19501
|
+
imageSelectMappingInlineUseLargeUploadBox: z19.boolean().optional(),
|
|
19502
|
+
imageSelectMappingPromptField: z19.string().optional(),
|
|
19503
|
+
imageSelectMappingTabOrder: z19.enum(["template-first", "upload-first"]).optional(),
|
|
19504
|
+
imageSelectMappingTabWidthMode: z19.enum(["content", "fill"]).optional(),
|
|
19469
19505
|
imageSelectMappingTemplatePrompt: LocalizedTextSchema.optional(),
|
|
19470
19506
|
imageSelectMappingTemplateTabTitle: LocalizedTextSchema.optional(),
|
|
19471
|
-
imageSelectMappingUploadMode:
|
|
19507
|
+
imageSelectMappingUploadMode: z19.enum(["tabs", "inline"]).optional(),
|
|
19472
19508
|
imageSelectMappingUploadPrompt: LocalizedTextSchema.optional(),
|
|
19473
19509
|
imageSelectMappingUploadTabTitle: LocalizedTextSchema.optional(),
|
|
19474
|
-
endpoints:
|
|
19475
|
-
examples:
|
|
19510
|
+
endpoints: z19.array(JsonValueSchema).optional(),
|
|
19511
|
+
examples: z19.array(JsonValueSchema).optional(),
|
|
19476
19512
|
extraData: JsonValueSchema.optional(),
|
|
19477
19513
|
layer: JsonValueSchema.optional(),
|
|
19478
19514
|
map: JsonValueSchema.optional(),
|
|
19479
|
-
multiline:
|
|
19480
|
-
options:
|
|
19481
|
-
originalFiles:
|
|
19515
|
+
multiline: z19.boolean().optional(),
|
|
19516
|
+
options: z19.array(JsonValueSchema).optional(),
|
|
19517
|
+
originalFiles: z19.array(JsonValueSchema).optional(),
|
|
19482
19518
|
placeholder: LocalizedTextSchema.optional(),
|
|
19483
|
-
preserveSelectListOrder:
|
|
19519
|
+
preserveSelectListOrder: z19.boolean().optional(),
|
|
19484
19520
|
promptDictionary: JsonValueSchema.optional(),
|
|
19485
|
-
promptFontSize:
|
|
19521
|
+
promptFontSize: z19.number().optional(),
|
|
19486
19522
|
promptModeToggle: JsonValueSchema.optional(),
|
|
19487
|
-
requireActiveSelectFilter:
|
|
19488
|
-
restoreDefaultOnEmptyEnter:
|
|
19489
|
-
search:
|
|
19490
|
-
selectButtonEnableCollapse:
|
|
19491
|
-
selectButtonVisibleRows:
|
|
19492
|
-
selectList:
|
|
19493
|
-
selectListDisplayMode:
|
|
19494
|
-
selectPromptField:
|
|
19495
|
-
showAddLocalFileButton:
|
|
19496
|
-
singleColumn:
|
|
19497
|
-
singleFrameForMultiple:
|
|
19498
|
-
textSingleLine:
|
|
19499
|
-
textareaMiniHeight:
|
|
19523
|
+
requireActiveSelectFilter: z19.boolean().optional(),
|
|
19524
|
+
restoreDefaultOnEmptyEnter: z19.boolean().optional(),
|
|
19525
|
+
search: z19.boolean().optional(),
|
|
19526
|
+
selectButtonEnableCollapse: z19.boolean().optional(),
|
|
19527
|
+
selectButtonVisibleRows: z19.number().int().positive().optional(),
|
|
19528
|
+
selectList: z19.array(JsonValueSchema).optional(),
|
|
19529
|
+
selectListDisplayMode: z19.string().optional(),
|
|
19530
|
+
selectPromptField: z19.string().optional(),
|
|
19531
|
+
showAddLocalFileButton: z19.boolean().optional(),
|
|
19532
|
+
singleColumn: z19.boolean().optional(),
|
|
19533
|
+
singleFrameForMultiple: z19.boolean().optional(),
|
|
19534
|
+
textSingleLine: z19.boolean().optional(),
|
|
19535
|
+
textareaMiniHeight: z19.number().nonnegative().optional(),
|
|
19500
19536
|
tips: LocalizedTextSchema.optional(),
|
|
19501
19537
|
visibility: JsonValueSchema.optional(),
|
|
19502
|
-
voiceButtonText:
|
|
19503
|
-
designAnalysisFields:
|
|
19504
|
-
designAnalysisFillStrategy:
|
|
19505
|
-
designAnalysisMaxFields:
|
|
19506
|
-
designAnalysisType:
|
|
19507
|
-
designAnalysisFieldPrefix:
|
|
19538
|
+
voiceButtonText: z19.string().optional(),
|
|
19539
|
+
designAnalysisFields: z19.array(JsonValueSchema).optional(),
|
|
19540
|
+
designAnalysisFillStrategy: z19.string().optional(),
|
|
19541
|
+
designAnalysisMaxFields: z19.number().int().nonnegative().optional(),
|
|
19542
|
+
designAnalysisType: z19.string().optional(),
|
|
19543
|
+
designAnalysisFieldPrefix: z19.string().optional()
|
|
19508
19544
|
}).strict();
|
|
19509
|
-
var WorkflowParameterSchema =
|
|
19510
|
-
() =>
|
|
19545
|
+
var WorkflowParameterSchema = z19.lazy(
|
|
19546
|
+
() => z19.object({
|
|
19511
19547
|
displayName: LocalizedTextSchema,
|
|
19512
19548
|
name: ContractIdentifierSchema,
|
|
19513
19549
|
type: WorkflowParameterTypeSchema,
|
|
19514
19550
|
typeOptions: WorkflowParameterTypeOptionsSchema.optional(),
|
|
19515
19551
|
default: JsonValueSchema.optional(),
|
|
19516
19552
|
description: LocalizedTextSchema.optional(),
|
|
19517
|
-
hint:
|
|
19518
|
-
displayOptions:
|
|
19519
|
-
hide:
|
|
19520
|
-
show:
|
|
19553
|
+
hint: z19.string().optional(),
|
|
19554
|
+
displayOptions: z19.object({
|
|
19555
|
+
hide: z19.record(z19.string(), z19.array(JsonValueSchema)).optional(),
|
|
19556
|
+
show: z19.record(z19.string(), z19.array(JsonValueSchema)).optional()
|
|
19521
19557
|
}).strict().optional(),
|
|
19522
|
-
options:
|
|
19523
|
-
|
|
19558
|
+
options: z19.array(z19.union([
|
|
19559
|
+
z19.object({ name: LocalizedTextSchema, value: z19.union([z19.string(), z19.number(), z19.boolean()]), action: z19.string().optional(), description: LocalizedTextSchema.optional() }).strict(),
|
|
19524
19560
|
WorkflowParameterSchema,
|
|
19525
|
-
|
|
19561
|
+
z19.object({ displayName: z19.string(), name: ContractIdentifierSchema, values: z19.array(WorkflowParameterSchema) }).strict()
|
|
19526
19562
|
])).optional(),
|
|
19527
19563
|
placeholder: LocalizedTextSchema.optional(),
|
|
19528
|
-
isNodeSetting:
|
|
19529
|
-
noDataExpression:
|
|
19530
|
-
required:
|
|
19531
|
-
example:
|
|
19532
|
-
extractValue:
|
|
19533
|
-
properties:
|
|
19534
|
-
assetType:
|
|
19535
|
-
flag:
|
|
19536
|
-
enableExpand:
|
|
19537
|
-
enableVoice:
|
|
19538
|
-
expandButtonText:
|
|
19539
|
-
knowledgeGraphButtonText:
|
|
19540
|
-
selectListDisplayMode:
|
|
19541
|
-
voiceButtonText:
|
|
19564
|
+
isNodeSetting: z19.boolean().optional(),
|
|
19565
|
+
noDataExpression: z19.boolean().optional(),
|
|
19566
|
+
required: z19.boolean().optional(),
|
|
19567
|
+
example: z19.string().optional(),
|
|
19568
|
+
extractValue: z19.object({ type: z19.literal("regex"), regex: z19.string() }).strict().optional(),
|
|
19569
|
+
properties: z19.array(WorkflowParameterSchema).optional(),
|
|
19570
|
+
assetType: z19.string().optional(),
|
|
19571
|
+
flag: z19.boolean().optional(),
|
|
19572
|
+
enableExpand: z19.boolean().optional(),
|
|
19573
|
+
enableVoice: z19.boolean().optional(),
|
|
19574
|
+
expandButtonText: z19.string().optional(),
|
|
19575
|
+
knowledgeGraphButtonText: z19.string().optional(),
|
|
19576
|
+
selectListDisplayMode: z19.string().optional(),
|
|
19577
|
+
voiceButtonText: z19.string().optional()
|
|
19542
19578
|
}).strict()
|
|
19543
19579
|
);
|
|
19544
|
-
var WorkflowOutputBindingSchema =
|
|
19545
|
-
var WorkflowNodeSchema =
|
|
19580
|
+
var WorkflowOutputBindingSchema = z19.object({ key: ContractIdentifierSchema, value: z19.string() }).strict();
|
|
19581
|
+
var WorkflowNodeSchema = z19.object({
|
|
19546
19582
|
id: ContractIdentifierSchema,
|
|
19547
19583
|
referenceName: ContractIdentifierSchema,
|
|
19548
19584
|
capabilityRef: ContractIdentifierSchema,
|
|
19549
19585
|
capabilityVersion: ContractIdentifierSchema.optional(),
|
|
19550
|
-
inputBindings:
|
|
19551
|
-
configuration:
|
|
19586
|
+
inputBindings: z19.record(z19.string(), JsonValueSchema).default({}),
|
|
19587
|
+
configuration: z19.object({ executor: z19.literal("conductor"), task: ConductorTaskDefinitionSchema }).strict()
|
|
19552
19588
|
}).strict().superRefine((node, context) => {
|
|
19553
19589
|
if (node.configuration.task.taskReferenceName !== node.referenceName) context.addIssue({ code: "custom", path: ["configuration", "task", "taskReferenceName"], message: "Conductor task reference must match node referenceName." });
|
|
19554
19590
|
if (node.configuration.task.name !== node.capabilityRef) context.addIssue({ code: "custom", path: ["configuration", "task", "name"], message: "Conductor task name must match node capabilityRef." });
|
|
19555
19591
|
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." });
|
|
19556
19592
|
});
|
|
19557
|
-
var WorkflowEdgeSchema =
|
|
19593
|
+
var WorkflowEdgeSchema = z19.object({
|
|
19558
19594
|
from: ContractIdentifierSchema,
|
|
19559
19595
|
to: ContractIdentifierSchema,
|
|
19560
19596
|
outputPort: ContractIdentifierSchema.optional(),
|
|
19561
19597
|
inputPort: ContractIdentifierSchema.optional(),
|
|
19562
|
-
condition:
|
|
19598
|
+
condition: z19.string().optional()
|
|
19563
19599
|
}).strict();
|
|
19564
|
-
var WorkflowTriggerSchema =
|
|
19600
|
+
var WorkflowTriggerSchema = z19.object({
|
|
19565
19601
|
id: ContractIdentifierSchema,
|
|
19566
|
-
type:
|
|
19567
|
-
enabled:
|
|
19568
|
-
schedule:
|
|
19569
|
-
webhook:
|
|
19570
|
-
path:
|
|
19571
|
-
method:
|
|
19572
|
-
auth:
|
|
19573
|
-
basicAuth:
|
|
19574
|
-
headerAuth:
|
|
19575
|
-
responseUntil:
|
|
19602
|
+
type: z19.enum(["manual", "schedule", "webhook", "event", "api"]),
|
|
19603
|
+
enabled: z19.boolean(),
|
|
19604
|
+
schedule: z19.object({ cron: z19.string().trim().min(1) }).strict().optional(),
|
|
19605
|
+
webhook: z19.object({
|
|
19606
|
+
path: z19.string().trim().min(1).optional(),
|
|
19607
|
+
method: z19.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "HEAD"]),
|
|
19608
|
+
auth: z19.enum(["NONE", "BASIC", "CUSTOM_HEADER"]),
|
|
19609
|
+
basicAuth: z19.object({ username: z19.string(), password: z19.string() }).strict().optional(),
|
|
19610
|
+
headerAuth: z19.object({ name: z19.string().trim().min(1), value: z19.string() }).strict().optional(),
|
|
19611
|
+
responseUntil: z19.enum(["WORKFLOW_STARTED", "WORKFLOW_COMPLETED_OR_FINISHED"])
|
|
19576
19612
|
}).strict().optional(),
|
|
19577
|
-
event:
|
|
19613
|
+
event: z19.object({
|
|
19578
19614
|
eventType: ContractIdentifierSchema,
|
|
19579
19615
|
configuration: JsonValueSchema.optional()
|
|
19580
19616
|
}).strict().optional()
|
|
@@ -19583,63 +19619,63 @@ var WorkflowTriggerSchema = z18.object({
|
|
|
19583
19619
|
if (trigger.type === "webhook" && !trigger.webhook) context.addIssue({ code: "custom", path: ["webhook"], message: "Webhook trigger requires webhook configuration." });
|
|
19584
19620
|
if (trigger.type === "event" && !trigger.event) context.addIssue({ code: "custom", path: ["event"], message: "Event trigger requires event configuration." });
|
|
19585
19621
|
});
|
|
19586
|
-
var WorkflowValidationIssueSchema =
|
|
19622
|
+
var WorkflowValidationIssueSchema = z19.object({
|
|
19587
19623
|
taskReferenceName: ContractIdentifierSchema,
|
|
19588
|
-
issueType:
|
|
19589
|
-
detailReason:
|
|
19590
|
-
humanMessage:
|
|
19624
|
+
issueType: z19.enum(["ERROR", "WARNING"]),
|
|
19625
|
+
detailReason: z19.object({ type: ContractIdentifierSchema, name: ContractIdentifierSchema, detailInformation: JsonValueSchema.optional() }).strict(),
|
|
19626
|
+
humanMessage: z19.object({ en: z19.string(), zh: z19.string() }).strict()
|
|
19591
19627
|
}).strict();
|
|
19592
|
-
var WorkflowDefinitionSchema =
|
|
19593
|
-
contract:
|
|
19628
|
+
var WorkflowDefinitionSchema = z19.object({
|
|
19629
|
+
contract: z19.literal("WorkflowDefinition"),
|
|
19594
19630
|
metadata: ContractMetadataSchema.omit({ name: true, description: true, labels: true }).extend({
|
|
19595
19631
|
name: LocalizedTextSchema,
|
|
19596
19632
|
description: LocalizedTextSchema.optional(),
|
|
19597
|
-
role:
|
|
19633
|
+
role: z19.enum(["workflow", "template"]),
|
|
19598
19634
|
teamId: ContractIdentifierSchema,
|
|
19599
19635
|
creatorRef: EntityRefSchema,
|
|
19600
|
-
tags:
|
|
19636
|
+
tags: z19.array(ContractIdentifierSchema).default([])
|
|
19601
19637
|
}).strict(),
|
|
19602
|
-
revision:
|
|
19603
|
-
kind:
|
|
19604
|
-
recordVersion:
|
|
19605
|
-
sourceVersion:
|
|
19638
|
+
revision: z19.object({
|
|
19639
|
+
kind: z19.enum(["release", "backup"]),
|
|
19640
|
+
recordVersion: z19.number().int().positive(),
|
|
19641
|
+
sourceVersion: z19.number().int().positive().optional()
|
|
19606
19642
|
}).strict().superRefine((revision, context) => {
|
|
19607
19643
|
if (revision.kind === "backup" && revision.sourceVersion === void 0) context.addIssue({ code: "custom", path: ["sourceVersion"], message: "Backup revisions require a sourceVersion." });
|
|
19608
19644
|
}),
|
|
19609
|
-
presentation:
|
|
19610
|
-
ports:
|
|
19611
|
-
parameters:
|
|
19612
|
-
graph:
|
|
19613
|
-
execution:
|
|
19614
|
-
timeoutMs:
|
|
19615
|
-
retries:
|
|
19616
|
-
concurrencyLimit:
|
|
19617
|
-
idempotency:
|
|
19618
|
-
rateLimit:
|
|
19645
|
+
presentation: z19.object({ iconUrl: z19.string().optional(), thumbnail: z19.string().optional(), canvas: WorkflowCanvasSchema.optional() }).strict(),
|
|
19646
|
+
ports: z19.object({ inputs: z19.array(ContractPortSchema).default([]), outputs: z19.array(ContractPortSchema).default([]) }).strict(),
|
|
19647
|
+
parameters: z19.object({ variables: z19.array(WorkflowParameterSchema).default([]), outputs: z19.array(WorkflowOutputBindingSchema).default([]) }).strict(),
|
|
19648
|
+
graph: z19.object({ nodes: z19.array(WorkflowNodeSchema), edges: z19.array(WorkflowEdgeSchema).default([]) }).strict(),
|
|
19649
|
+
execution: z19.object({
|
|
19650
|
+
timeoutMs: z19.number().int().positive().optional(),
|
|
19651
|
+
retries: z19.number().int().nonnegative().default(0),
|
|
19652
|
+
concurrencyLimit: z19.number().int().positive().optional(),
|
|
19653
|
+
idempotency: z19.enum(["required", "supported", "none"]),
|
|
19654
|
+
rateLimit: z19.object({ enabled: z19.boolean(), max: z19.number().int().nonnegative(), windowMs: z19.number().int().nonnegative() }).strict().superRefine((rateLimit, context) => {
|
|
19619
19655
|
if (rateLimit.enabled && (rateLimit.max === 0 || rateLimit.windowMs === 0)) context.addIssue({ code: "custom", message: "Enabled rate limit requires positive max and windowMs." });
|
|
19620
19656
|
}).optional(),
|
|
19621
|
-
conductor:
|
|
19622
|
-
ownerApp:
|
|
19623
|
-
createTime:
|
|
19624
|
-
updateTime:
|
|
19625
|
-
createdBy:
|
|
19626
|
-
updatedBy:
|
|
19657
|
+
conductor: z19.object({
|
|
19658
|
+
ownerApp: z19.string().optional(),
|
|
19659
|
+
createTime: z19.number().int().nonnegative().optional(),
|
|
19660
|
+
updateTime: z19.number().int().nonnegative().optional(),
|
|
19661
|
+
createdBy: z19.string().optional(),
|
|
19662
|
+
updatedBy: z19.string().optional(),
|
|
19627
19663
|
failureWorkflow: ContractIdentifierSchema.optional(),
|
|
19628
|
-
schemaVersion:
|
|
19629
|
-
restartable:
|
|
19630
|
-
workflowStatusListenerEnabled:
|
|
19631
|
-
ownerEmail:
|
|
19632
|
-
timeoutPolicy:
|
|
19633
|
-
variables:
|
|
19634
|
-
inputTemplate:
|
|
19664
|
+
schemaVersion: z19.number().int().positive().optional(),
|
|
19665
|
+
restartable: z19.boolean().optional(),
|
|
19666
|
+
workflowStatusListenerEnabled: z19.boolean().optional(),
|
|
19667
|
+
ownerEmail: z19.string().email().optional(),
|
|
19668
|
+
timeoutPolicy: z19.enum(["TIME_OUT_WF", "ALERT_ONLY"]).optional(),
|
|
19669
|
+
variables: z19.record(z19.string(), JsonValueSchema).optional(),
|
|
19670
|
+
inputTemplate: z19.record(z19.string(), JsonValueSchema).optional()
|
|
19635
19671
|
}).strict()
|
|
19636
19672
|
}).strict(),
|
|
19637
|
-
triggers:
|
|
19638
|
-
views:
|
|
19639
|
-
dataContracts:
|
|
19640
|
-
governance:
|
|
19641
|
-
interfaces:
|
|
19642
|
-
openai:
|
|
19673
|
+
triggers: z19.array(WorkflowTriggerSchema).default([]),
|
|
19674
|
+
views: z19.array(z19.object({ pageRef: ContractIdentifierSchema, placement: ContractIdentifierSchema.optional() }).strict()).default([]),
|
|
19675
|
+
dataContracts: z19.object({ reads: z19.array(ContractIdentifierSchema).default([]), writes: z19.array(ContractIdentifierSchema).default([]), emits: z19.array(ContractIdentifierSchema).default([]) }).strict(),
|
|
19676
|
+
governance: z19.object({ activated: z19.boolean(), validated: z19.boolean(), validationIssues: z19.array(WorkflowValidationIssueSchema).default([]), hidden: z19.boolean().optional() }).strict(),
|
|
19677
|
+
interfaces: z19.object({
|
|
19678
|
+
openai: z19.object({ enabled: z19.boolean(), modelName: z19.string().trim().min(1).optional() }).strict(),
|
|
19643
19679
|
shortcutRef: EntityRefSchema.optional(),
|
|
19644
19680
|
preferredAppId: ContractIdentifierSchema.optional()
|
|
19645
19681
|
}).strict().superRefine((interfaces, context) => {
|
|
@@ -19656,101 +19692,110 @@ var WorkflowDefinitionSchema = z18.object({
|
|
|
19656
19692
|
});
|
|
19657
19693
|
if (definition.revision.kind === "release" && definition.metadata.version !== definition.revision.recordVersion) context.addIssue({ code: "custom", path: ["revision", "recordVersion"], message: "Release recordVersion must equal metadata.version." });
|
|
19658
19694
|
});
|
|
19695
|
+
var WorkflowEditorCommandSchema = z19.object({
|
|
19696
|
+
expectedRecordVersion: z19.number().int().positive(),
|
|
19697
|
+
requestId: z19.string().min(1).max(128),
|
|
19698
|
+
definition: WorkflowDefinitionSchema
|
|
19699
|
+
}).strict();
|
|
19700
|
+
var WorkflowEditorDocumentSchema = z19.object({
|
|
19701
|
+
recordVersion: z19.number().int().positive(),
|
|
19702
|
+
definition: WorkflowDefinitionSchema
|
|
19703
|
+
}).strict();
|
|
19659
19704
|
|
|
19660
19705
|
// src/contracts/workflow-column.ts
|
|
19661
|
-
import { z as
|
|
19662
|
-
var WorkflowColumnFieldRefSchema =
|
|
19706
|
+
import { z as z20 } from "zod";
|
|
19707
|
+
var WorkflowColumnFieldRefSchema = z20.object({
|
|
19663
19708
|
ontologyId: ContractIdentifierSchema,
|
|
19664
19709
|
fieldKey: ContractIdentifierSchema
|
|
19665
19710
|
}).strict();
|
|
19666
|
-
var WorkflowColumnInputSchema =
|
|
19667
|
-
|
|
19668
|
-
|
|
19669
|
-
|
|
19670
|
-
|
|
19671
|
-
kind:
|
|
19672
|
-
field:
|
|
19711
|
+
var WorkflowColumnInputSchema = z20.discriminatedUnion("kind", [
|
|
19712
|
+
z20.object({ kind: z20.literal("default") }).strict(),
|
|
19713
|
+
z20.object({ kind: z20.literal("constant"), value: JsonValueSchema }).strict(),
|
|
19714
|
+
z20.object({ kind: z20.literal("field"), field: WorkflowColumnFieldRefSchema }).strict(),
|
|
19715
|
+
z20.object({
|
|
19716
|
+
kind: z20.literal("context"),
|
|
19717
|
+
field: z20.enum(["assetId", "teamId", "ontologyId", "columnId"])
|
|
19673
19718
|
}).strict()
|
|
19674
19719
|
]);
|
|
19675
|
-
var WorkflowColumnDependencySchema =
|
|
19676
|
-
|
|
19677
|
-
|
|
19678
|
-
kind:
|
|
19720
|
+
var WorkflowColumnDependencySchema = z20.discriminatedUnion("kind", [
|
|
19721
|
+
z20.object({ kind: z20.literal("field"), field: WorkflowColumnFieldRefSchema }).strict(),
|
|
19722
|
+
z20.object({
|
|
19723
|
+
kind: z20.literal("relation"),
|
|
19679
19724
|
relation: WorkflowColumnFieldRefSchema,
|
|
19680
|
-
direction:
|
|
19681
|
-
fields:
|
|
19725
|
+
direction: z20.enum(["incoming", "outgoing"]),
|
|
19726
|
+
fields: z20.array(WorkflowColumnFieldRefSchema).max(100)
|
|
19682
19727
|
}).strict()
|
|
19683
19728
|
]);
|
|
19684
|
-
var WorkflowColumnOutputPathSchema =
|
|
19685
|
-
var WorkflowColumnOutputSchema =
|
|
19686
|
-
type:
|
|
19729
|
+
var WorkflowColumnOutputPathSchema = z20.array(z20.string().min(1).max(256)).max(20);
|
|
19730
|
+
var WorkflowColumnOutputSchema = z20.object({
|
|
19731
|
+
type: z20.enum(["number", "text", "json"]),
|
|
19687
19732
|
path: WorkflowColumnOutputPathSchema,
|
|
19688
|
-
nullable:
|
|
19733
|
+
nullable: z20.boolean().default(false)
|
|
19689
19734
|
}).strict();
|
|
19690
|
-
var WorkflowColumnBindingSchema =
|
|
19691
|
-
contract:
|
|
19692
|
-
version:
|
|
19693
|
-
enabled:
|
|
19694
|
-
paused:
|
|
19695
|
-
workflow:
|
|
19735
|
+
var WorkflowColumnBindingSchema = z20.object({
|
|
19736
|
+
contract: z20.literal("WorkflowColumnBinding"),
|
|
19737
|
+
version: z20.literal(1),
|
|
19738
|
+
enabled: z20.boolean(),
|
|
19739
|
+
paused: z20.boolean().default(false),
|
|
19740
|
+
workflow: z20.object({
|
|
19696
19741
|
id: ContractIdentifierSchema,
|
|
19697
|
-
version:
|
|
19742
|
+
version: z20.number().int().positive(),
|
|
19698
19743
|
inputSchemaHash: Sha256Schema
|
|
19699
19744
|
}).strict(),
|
|
19700
|
-
inputs:
|
|
19701
|
-
dependencies:
|
|
19745
|
+
inputs: z20.record(z20.string().min(1).max(128), WorkflowColumnInputSchema),
|
|
19746
|
+
dependencies: z20.array(WorkflowColumnDependencySchema).max(100).default([]),
|
|
19702
19747
|
output: WorkflowColumnOutputSchema,
|
|
19703
|
-
policy:
|
|
19704
|
-
debounceMs:
|
|
19705
|
-
maxDelayMs:
|
|
19706
|
-
concurrency:
|
|
19748
|
+
policy: z20.object({
|
|
19749
|
+
debounceMs: z20.number().int().min(0).max(3e4).default(5e3),
|
|
19750
|
+
maxDelayMs: z20.number().int().min(0).max(3e4).default(3e4),
|
|
19751
|
+
concurrency: z20.number().int().min(1).max(32).default(2),
|
|
19707
19752
|
// Indexed queries need visible projections of their declared sources before execution.
|
|
19708
|
-
requireSearchProjection:
|
|
19753
|
+
requireSearchProjection: z20.boolean().optional()
|
|
19709
19754
|
}).strict().default({ debounceMs: 5e3, maxDelayMs: 3e4, concurrency: 2 }),
|
|
19710
19755
|
// The workflow supplies an ISO datetime with offset for one future expiry.
|
|
19711
19756
|
// Scheduling infrastructure needs no knowledge of months or business periods.
|
|
19712
|
-
expiry:
|
|
19757
|
+
expiry: z20.object({ path: WorkflowColumnOutputPathSchema }).strict().optional()
|
|
19713
19758
|
}).strict();
|
|
19714
19759
|
|
|
19715
19760
|
// src/contracts/component-assembly.ts
|
|
19716
|
-
import { z as
|
|
19717
|
-
var member =
|
|
19761
|
+
import { z as z21 } from "zod";
|
|
19762
|
+
var member = z21.string().min(1).max(256).refine(
|
|
19718
19763
|
(value) => !["__proto__", "prototype", "constructor"].includes(value),
|
|
19719
19764
|
"Unsafe component member."
|
|
19720
19765
|
);
|
|
19721
|
-
var ComponentEventArgumentSchema =
|
|
19722
|
-
argument:
|
|
19723
|
-
path:
|
|
19766
|
+
var ComponentEventArgumentSchema = z21.object({
|
|
19767
|
+
argument: z21.number().int().min(0).max(31),
|
|
19768
|
+
path: z21.array(member).max(16).default([])
|
|
19724
19769
|
}).strict();
|
|
19725
|
-
var ComponentEventBindingSchema =
|
|
19770
|
+
var ComponentEventBindingSchema = z21.object({
|
|
19726
19771
|
port: ContractIdentifierSchema,
|
|
19727
|
-
arguments:
|
|
19728
|
-
preventDefault:
|
|
19729
|
-
stopPropagation:
|
|
19772
|
+
arguments: z21.array(ComponentEventArgumentSchema).max(32).default([]),
|
|
19773
|
+
preventDefault: z21.boolean().default(false),
|
|
19774
|
+
stopPropagation: z21.boolean().default(false)
|
|
19730
19775
|
}).strict();
|
|
19731
|
-
var ComponentMessageSchema =
|
|
19776
|
+
var ComponentMessageSchema = z21.union([
|
|
19732
19777
|
ContractIdentifierSchema,
|
|
19733
|
-
|
|
19734
|
-
|
|
19778
|
+
z21.object({ textI18n: I18nTextSchema }).strict(),
|
|
19779
|
+
z21.object({ key: ContractIdentifierSchema, values: z21.record(member, z21.union([z21.string(), z21.number().finite(), z21.boolean()])).default({}) }).strict()
|
|
19735
19780
|
]);
|
|
19736
|
-
var ComponentMessageBindingSchema =
|
|
19737
|
-
path:
|
|
19781
|
+
var ComponentMessageBindingSchema = z21.object({
|
|
19782
|
+
path: z21.array(z21.union([
|
|
19738
19783
|
member.refine((value) => !/[\u0000-\u001f\u007f-\u009f]/.test(value), "Invalid component path member."),
|
|
19739
|
-
|
|
19784
|
+
z21.number().int().nonnegative().max(Number.MAX_SAFE_INTEGER)
|
|
19740
19785
|
])).min(1).max(16),
|
|
19741
19786
|
message: ComponentMessageSchema
|
|
19742
19787
|
}).strict();
|
|
19743
|
-
var ComponentAssemblySchema =
|
|
19744
|
-
contract:
|
|
19745
|
-
schemaVersion:
|
|
19788
|
+
var ComponentAssemblySchema = z21.object({
|
|
19789
|
+
contract: z21.literal("ComponentAssembly"),
|
|
19790
|
+
schemaVersion: z21.literal(1),
|
|
19746
19791
|
props: JsonObjectSchema.default({}),
|
|
19747
|
-
events:
|
|
19792
|
+
events: z21.record(member, ComponentEventBindingSchema).default({}),
|
|
19748
19793
|
// Each name remains an explicit RenderTree slot; array order controls composition.
|
|
19749
|
-
slots:
|
|
19750
|
-
renderers:
|
|
19751
|
-
hosts:
|
|
19752
|
-
messages:
|
|
19753
|
-
messageBindings:
|
|
19794
|
+
slots: z21.record(member, z21.union([ContractIdentifierSchema, z21.array(ContractIdentifierSchema).min(1).max(256).refine((names) => new Set(names).size === names.length, "Component slot names must be unique.")])).default({}),
|
|
19795
|
+
renderers: z21.record(member, ContractIdentifierSchema).default({}),
|
|
19796
|
+
hosts: z21.record(member, ContractIdentifierSchema).default({}),
|
|
19797
|
+
messages: z21.record(member, ComponentMessageSchema).default({}),
|
|
19798
|
+
messageBindings: z21.array(ComponentMessageBindingSchema).max(256).optional()
|
|
19754
19799
|
}).strict().superRefine((value, context) => {
|
|
19755
19800
|
const paths = value.messageBindings?.map((binding) => binding.path) ?? [];
|
|
19756
19801
|
for (const [index, path] of paths.entries()) {
|
|
@@ -19770,32 +19815,32 @@ var ComponentAssemblySchema = z20.object({
|
|
|
19770
19815
|
});
|
|
19771
19816
|
|
|
19772
19817
|
// src/contracts/record-editor-draft.ts
|
|
19773
|
-
import { z as
|
|
19774
|
-
var member2 =
|
|
19775
|
-
var RecordEditorPathSchema =
|
|
19776
|
-
var RecordEditorFieldErrorSchema =
|
|
19777
|
-
var RecordEditorDraftSchema =
|
|
19778
|
-
revision:
|
|
19818
|
+
import { z as z22 } from "zod";
|
|
19819
|
+
var member2 = z22.string().min(1).max(256).refine((value) => !["__proto__", "prototype", "constructor"].includes(value), "Unsafe editor path.");
|
|
19820
|
+
var RecordEditorPathSchema = z22.array(z22.union([member2, z22.object({ itemId: z22.string().min(1).max(256), idKey: member2.default("id") }).strict()])).max(32);
|
|
19821
|
+
var RecordEditorFieldErrorSchema = z22.object({ path: RecordEditorPathSchema, code: z22.string().min(1).max(256) }).strict();
|
|
19822
|
+
var RecordEditorDraftSchema = z22.object({
|
|
19823
|
+
revision: z22.string().min(1).max(256),
|
|
19779
19824
|
original: JsonObjectSchema,
|
|
19780
19825
|
value: JsonObjectSchema,
|
|
19781
|
-
touched:
|
|
19782
|
-
errors:
|
|
19826
|
+
touched: z22.array(RecordEditorPathSchema).max(4096),
|
|
19827
|
+
errors: z22.array(RecordEditorFieldErrorSchema).max(4096)
|
|
19783
19828
|
}).strict();
|
|
19784
|
-
var RecordEditorDraftOperationSchema =
|
|
19785
|
-
|
|
19786
|
-
|
|
19787
|
-
|
|
19788
|
-
|
|
19789
|
-
|
|
19790
|
-
|
|
19829
|
+
var RecordEditorDraftOperationSchema = z22.discriminatedUnion("kind", [
|
|
19830
|
+
z22.object({ kind: z22.literal("set"), path: RecordEditorPathSchema, value: JsonValueSchema }).strict(),
|
|
19831
|
+
z22.object({ kind: z22.literal("touch"), path: RecordEditorPathSchema }).strict(),
|
|
19832
|
+
z22.object({ kind: z22.literal("reset"), revision: z22.string().min(1).max(256), value: JsonObjectSchema }).strict(),
|
|
19833
|
+
z22.object({ kind: z22.literal("insert"), path: RecordEditorPathSchema, idKey: member2.default("id"), value: JsonObjectSchema, beforeId: z22.string().min(1).optional() }).strict(),
|
|
19834
|
+
z22.object({ kind: z22.literal("remove"), path: RecordEditorPathSchema, idKey: member2.default("id"), itemId: z22.string().min(1) }).strict(),
|
|
19835
|
+
z22.object({ kind: z22.literal("move"), path: RecordEditorPathSchema, idKey: member2.default("id"), itemId: z22.string().min(1), beforeId: z22.string().min(1).optional() }).strict()
|
|
19791
19836
|
]);
|
|
19792
|
-
var RecordEditorValidationDetailsSchema =
|
|
19793
|
-
contract:
|
|
19794
|
-
schemaVersion:
|
|
19795
|
-
errors:
|
|
19837
|
+
var RecordEditorValidationDetailsSchema = z22.object({
|
|
19838
|
+
contract: z22.literal("RecordEditorValidation"),
|
|
19839
|
+
schemaVersion: z22.literal(1),
|
|
19840
|
+
errors: z22.array(RecordEditorFieldErrorSchema).min(1).max(256)
|
|
19796
19841
|
}).strict();
|
|
19797
|
-
var RecordEditorSubmissionSnapshotSchema =
|
|
19798
|
-
revision:
|
|
19842
|
+
var RecordEditorSubmissionSnapshotSchema = z22.object({
|
|
19843
|
+
revision: z22.string().min(1).max(256),
|
|
19799
19844
|
value: JsonObjectSchema
|
|
19800
19845
|
}).strict();
|
|
19801
19846
|
|
|
@@ -19895,7 +19940,9 @@ export {
|
|
|
19895
19940
|
PageExpressionRootSchema,
|
|
19896
19941
|
PageOperatorSchema,
|
|
19897
19942
|
PAGE_EXPRESSION_LIMITS,
|
|
19943
|
+
PAGE_EXPRESSION_VALUE_LIMITS,
|
|
19898
19944
|
assertPageValueBudget,
|
|
19945
|
+
assertPageExpressionValueBudget,
|
|
19899
19946
|
PageExpressionSchema,
|
|
19900
19947
|
PagePropertyBindingSchema,
|
|
19901
19948
|
visitPageExpression,
|
|
@@ -20277,6 +20324,8 @@ export {
|
|
|
20277
20324
|
DeclarativeRuntimeRolloutCapabilitySchema,
|
|
20278
20325
|
TenantProductConfigSchema,
|
|
20279
20326
|
TenantRuntimeConfigSchema,
|
|
20327
|
+
WorkflowCanvasElementSchema,
|
|
20328
|
+
WorkflowCanvasSchema,
|
|
20280
20329
|
ConductorTaskTypeSchema,
|
|
20281
20330
|
ConductorTaskDefinitionSchema,
|
|
20282
20331
|
ConductorWorkflowDefinitionSchema,
|
|
@@ -20288,6 +20337,8 @@ export {
|
|
|
20288
20337
|
WorkflowTriggerSchema,
|
|
20289
20338
|
WorkflowValidationIssueSchema,
|
|
20290
20339
|
WorkflowDefinitionSchema,
|
|
20340
|
+
WorkflowEditorCommandSchema,
|
|
20341
|
+
WorkflowEditorDocumentSchema,
|
|
20291
20342
|
WorkflowColumnFieldRefSchema,
|
|
20292
20343
|
WorkflowColumnInputSchema,
|
|
20293
20344
|
WorkflowColumnDependencySchema,
|
|
@@ -20306,4 +20357,4 @@ export {
|
|
|
20306
20357
|
RecordEditorValidationDetailsSchema,
|
|
20307
20358
|
RecordEditorSubmissionSnapshotSchema
|
|
20308
20359
|
};
|
|
20309
|
-
//# sourceMappingURL=chunk-
|
|
20360
|
+
//# sourceMappingURL=chunk-L5CYU6K4.mjs.map
|