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