openxiangda-contracts 2.79.1 → 2.82.0
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/dist/ai.d.ts +290 -21
- package/dist/ai.d.ts.map +1 -1
- package/dist/ai.js +23 -14
- package/dist/ai.js.map +1 -1
- package/dist/application-agent.d.ts +540 -0
- package/dist/application-agent.d.ts.map +1 -0
- package/dist/application-agent.js +98 -0
- package/dist/application-agent.js.map +1 -0
- package/dist/browser.d.ts +5 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +5 -0
- package/dist/browser.js.map +1 -1
- package/dist/field-value-schemas.d.ts +2 -1427
- package/dist/field-value-schemas.d.ts.map +1 -1
- package/dist/field-value-schemas.js +2 -261
- package/dist/field-value-schemas.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/native-compiler/application-agent.d.ts +39 -0
- package/dist/native-compiler/application-agent.d.ts.map +1 -0
- package/dist/native-compiler/application-agent.js +344 -0
- package/dist/native-compiler/application-agent.js.map +1 -0
- package/dist/native-compiler/compiler.d.ts.map +1 -1
- package/dist/native-compiler/compiler.js +9 -6
- package/dist/native-compiler/compiler.js.map +1 -1
- package/dist/native-compiler/declaration-capacity.d.ts +3 -0
- package/dist/native-compiler/declaration-capacity.d.ts.map +1 -1
- package/dist/native-compiler/declaration-capacity.js +1 -1
- package/dist/native-compiler/declaration-capacity.js.map +1 -1
- package/dist/native-compiler/field-value-schemas.d.ts +1428 -0
- package/dist/native-compiler/field-value-schemas.d.ts.map +1 -0
- package/dist/native-compiler/field-value-schemas.js +262 -0
- package/dist/native-compiler/field-value-schemas.js.map +1 -0
- package/dist/native-compiler/index.cjs +3 -3
- package/dist/native-compiler/index.d.ts +7 -0
- package/dist/native-compiler/index.d.ts.map +1 -1
- package/dist/native-compiler/index.js +3 -3
- package/dist/native-compiler/workflow-authoring.d.ts +24 -0
- package/dist/native-compiler/workflow-authoring.d.ts.map +1 -0
- package/dist/native-compiler/workflow-authoring.js +84 -0
- package/dist/native-compiler/workflow-authoring.js.map +1 -0
- package/dist/native-compiler/workflow-business-step.d.ts +5 -0
- package/dist/native-compiler/workflow-business-step.d.ts.map +1 -1
- package/dist/native-compiler/workflow-business-step.js +23 -3
- package/dist/native-compiler/workflow-business-step.js.map +1 -1
- package/dist/native-compiler/workflow-conditional-assignment.d.ts +708 -0
- package/dist/native-compiler/workflow-conditional-assignment.d.ts.map +1 -0
- package/dist/native-compiler/workflow-conditional-assignment.js +312 -0
- package/dist/native-compiler/workflow-conditional-assignment.js.map +1 -0
- package/dist/native-compiler/workflow-designer.d.ts +8 -1
- package/dist/native-compiler/workflow-designer.d.ts.map +1 -1
- package/dist/native-compiler/workflow-designer.js +18 -8
- package/dist/native-compiler/workflow-designer.js.map +1 -1
- package/dist/native-compiler/workflow-expression.d.ts +12 -0
- package/dist/native-compiler/workflow-expression.d.ts.map +1 -0
- package/dist/native-compiler/workflow-expression.js +74 -0
- package/dist/native-compiler/workflow-expression.js.map +1 -0
- package/dist/native-compiler/workflow-return-eligibility.d.ts +8 -0
- package/dist/native-compiler/workflow-return-eligibility.d.ts.map +1 -0
- package/dist/native-compiler/workflow-return-eligibility.js +32 -0
- package/dist/native-compiler/workflow-return-eligibility.js.map +1 -0
- package/dist/native-compiler/workflow-schema-constants.d.ts +5 -0
- package/dist/native-compiler/workflow-schema-constants.d.ts.map +1 -0
- package/dist/native-compiler/workflow-schema-constants.js +5 -0
- package/dist/native-compiler/workflow-schema-constants.js.map +1 -0
- package/dist/native-compiler/workflow-schema.d.ts +1662 -0
- package/dist/native-compiler/workflow-schema.d.ts.map +1 -0
- package/dist/native-compiler/workflow-schema.js +519 -0
- package/dist/native-compiler/workflow-schema.js.map +1 -0
- package/dist/native-compiler/workflow-source-sync.d.ts.map +1 -1
- package/dist/native-compiler/workflow-source-sync.js +5 -9
- package/dist/native-compiler/workflow-source-sync.js.map +1 -1
- package/dist/native-version.d.ts +1 -0
- package/dist/native-version.d.ts.map +1 -1
- package/dist/native-version.js +1 -0
- package/dist/native-version.js.map +1 -1
- package/dist/native.d.ts +2 -0
- package/dist/native.d.ts.map +1 -1
- package/dist/native.js.map +1 -1
- package/dist/schemas.d.ts +711 -1570
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +4 -495
- package/dist/schemas.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +3 -2
- package/dist/types.js.map +1 -1
- package/dist/workflow-summary.d.ts +1 -1
- package/dist/workflow-summary.d.ts.map +1 -1
- package/dist/workflow-summary.js +2 -1
- package/dist/workflow-summary.js.map +1 -1
- package/package.json +1 -1
package/dist/schemas.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
+
import { workflowDefinitionSchema, workflowBindingSchema } from './native-compiler/workflow-schema.js';
|
|
2
|
+
export { workflowDefinitionSchema, workflowBindingSchema, workflowBusinessStepNodeSchema } from './native-compiler/workflow-schema.js';
|
|
1
3
|
import { DATA_RESOURCE_MAX_FIELDS, WORKFLOW_LAUNCH_MAX_INPUTS } from './native-compiler/data-capacity.js';
|
|
2
4
|
import { NATIVE_CONTRACT_CAPACITY_V2 } from './native-compiler/declaration-capacity.js';
|
|
3
5
|
import { NATIVE_ARTIFACT_CAPACITY_V2 } from './native-compiler/artifact-capacity-limits.js';
|
|
4
6
|
import { DATA_SUBTABLE_MAX_ROWS, DATA_SUBTABLE_MAX_TOTAL_ROWS, DATA_TRANSACTION_MAX_OPERATIONS, DATA_TRANSACTION_MAX_BYTES } from './native-compiler/data-capacity.js';
|
|
5
7
|
import { nativeUniqueKeysJsonSchema } from './native-compiler/unique-keys.js';
|
|
6
|
-
import { workflowAssignmentRoutingPolicySchema } from './native-compiler/workflow-assignment-routing.js';
|
|
7
8
|
import { workflowBusinessCommandInvocationSchema } from './native-compiler/workflow-business-command.js';
|
|
8
|
-
import { WORKFLOW_CONFIGURABLE_OPERATIONS } from './native-compiler/workflow-node-administration.js';
|
|
9
9
|
import { DATA_AUDIT_METADATA_FIELDS } from './native-compiler/data-audit-access.js';
|
|
10
10
|
import { CONFIGURATION_COMPATIBILITY_CAPABILITY, OPENXIANGDA_COMPILER_CONTRACT_VERSION, DEPLOYMENT_ENVIRONMENTS, LOCAL_RUNTIME_MODE, OPENXIANGDA_CONTRACT_VERSION, PLATFORM_CAPABILITY_CONTRACT_VERSIONS, SCHEMA_VERSIONS, RUNTIME_CAPACITY_PREFLIGHT_SCHEMA, DATA_FIELD_TYPES, } from "./types.js";
|
|
11
11
|
import { CLI_EVENT_SCHEMA_VERSION, CLI_EVENT_TYPES, CLI_RESULT_SCHEMA_VERSION, CLI_PROTOCOL_VERSION, WORKSPACE_TEMPLATE_BINDING_SCHEMA_VERSION, } from "./cli.js";
|
|
@@ -13,7 +13,6 @@ import { aiCapabilityCatalogSchema } from "./ai.js";
|
|
|
13
13
|
import { departmentReferenceValueSchema, resourceReferenceValueSchema, userReferenceValueSchema, } from "./field-value-schemas.js";
|
|
14
14
|
import { WORKFLOW_SUMMARY_ENVELOPE_MAX_BYTES, WORKFLOW_SUMMARY_MAX_FIELDS, WORKFLOW_SUMMARY_TEXT_LONG_MAX_BYTES, } from "./workflow-summary.js";
|
|
15
15
|
import { WORKFLOW_DETAIL_ENVELOPE_MAX_BYTES, WORKFLOW_DETAIL_MAX_FIELDS, WORKFLOW_DETAIL_MAX_RECORD_PROPERTIES, WORKFLOW_DETAIL_MAX_SUBTABLE_ROWS, } from "./workflow-detail.js";
|
|
16
|
-
import { workflowRoleCodesSchema } from './native-compiler/workflow-role-union.js';
|
|
17
16
|
import { workflowOwnedSubjectCreateSchema } from './native-compiler/workflow-owned-subject.js';
|
|
18
17
|
const digest = { type: "string", pattern: "^[0-9a-f]{64}$" };
|
|
19
18
|
const prefixedDigest = {
|
|
@@ -5327,498 +5326,6 @@ export const eventDeliveryAckSchema = {
|
|
|
5327
5326
|
receiptStatus: { const: "succeeded" },
|
|
5328
5327
|
},
|
|
5329
5328
|
};
|
|
5330
|
-
const workflowExpressionSchema = {
|
|
5331
|
-
type: "object",
|
|
5332
|
-
required: ["op"],
|
|
5333
|
-
properties: {
|
|
5334
|
-
op: {
|
|
5335
|
-
enum: [
|
|
5336
|
-
"literal",
|
|
5337
|
-
"path",
|
|
5338
|
-
"eq",
|
|
5339
|
-
"neq",
|
|
5340
|
-
"gt",
|
|
5341
|
-
"gte",
|
|
5342
|
-
"lt",
|
|
5343
|
-
"lte",
|
|
5344
|
-
"in",
|
|
5345
|
-
"contains",
|
|
5346
|
-
"and",
|
|
5347
|
-
"or",
|
|
5348
|
-
"not",
|
|
5349
|
-
"exists",
|
|
5350
|
-
],
|
|
5351
|
-
},
|
|
5352
|
-
value: {},
|
|
5353
|
-
path: { type: "string", pattern: "^[A-Za-z][A-Za-z0-9_.]{0,254}$" },
|
|
5354
|
-
left: { type: "object" },
|
|
5355
|
-
right: { type: "object" },
|
|
5356
|
-
values: { type: "array", minItems: 1, items: { type: "object" } },
|
|
5357
|
-
},
|
|
5358
|
-
};
|
|
5359
|
-
const workflowCcNodeSchema = {
|
|
5360
|
-
type: 'object', additionalProperties: false,
|
|
5361
|
-
required: ['id', 'kind', 'title', 'binding', 'next', 'emptyPolicy'],
|
|
5362
|
-
properties: {
|
|
5363
|
-
id: nonEmptyString, kind: { const: 'cc' }, title: nonEmptyString,
|
|
5364
|
-
binding: nonEmptyString, next: nonEmptyString,
|
|
5365
|
-
emptyPolicy: { enum: ['block', 'skip'] }, notify: { type: 'boolean' },
|
|
5366
|
-
administration: {
|
|
5367
|
-
type: 'object', additionalProperties: false,
|
|
5368
|
-
properties: {
|
|
5369
|
-
assigneeProviders: { type: 'array', minItems: 1, maxItems: 3, uniqueItems: true, items: { enum: ['fixed_users', 'app_role', 'app_role_in_scope'] } },
|
|
5370
|
-
},
|
|
5371
|
-
},
|
|
5372
|
-
},
|
|
5373
|
-
};
|
|
5374
|
-
const workflowReminderSchema = { type: 'object', additionalProperties: false, required: ['afterSeconds', 'everySeconds', 'max', 'to'], properties: { afterSeconds: { type: 'integer', minimum: 1, maximum: 2592000 }, everySeconds: { type: 'integer', minimum: 1, maximum: 2592000 }, max: { type: 'integer', minimum: 1, maximum: 10 }, to: { type: 'array', minItems: 1, maxItems: 1, items: { const: 'handlers' } } } };
|
|
5375
|
-
export const workflowBusinessStepNodeSchema = {
|
|
5376
|
-
type: 'object', additionalProperties: false,
|
|
5377
|
-
required: ['id', 'kind', 'title', 'next', 'handler', 'inputSchema', 'outputSchema', 'inputs'],
|
|
5378
|
-
properties: {
|
|
5379
|
-
id: nonEmptyString, kind: { const: 'action' }, title: nonEmptyString, next: nonEmptyString,
|
|
5380
|
-
handler: {
|
|
5381
|
-
type: 'object', additionalProperties: false, required: ['code', 'version', 'mode'],
|
|
5382
|
-
properties: { code: { type: 'string', pattern: '^[a-z][a-z0-9-]{0,100}$' }, version: { type: 'integer', minimum: 1, maximum: 1_000_000 }, mode: { enum: ['pure', 'reconciled-effect'] }, dataTransaction: { const: true } },
|
|
5383
|
-
allOf: [{ if: { required: ['dataTransaction'] }, then: { properties: { mode: { const: 'reconciled-effect' } } } }],
|
|
5384
|
-
},
|
|
5385
|
-
notification: { type: 'object', additionalProperties: false, required: ['template', 'recipients'], properties: {
|
|
5386
|
-
template: { const: 'workflow_message' }, recipients: { oneOf: [
|
|
5387
|
-
{ type: 'object', additionalProperties: false, required: ['provider'], properties: { provider: { const: 'initiator' } } },
|
|
5388
|
-
{ type: 'object', additionalProperties: false, required: ['provider', 'users'], properties: { provider: { const: 'fixed_users' }, users: { type: 'array', minItems: 1, maxItems: 50, uniqueItems: true, items: { type: 'string', minLength: 1, maxLength: 255 } } } },
|
|
5389
|
-
{ type: 'object', additionalProperties: false, required: ['provider', 'roleCode'], properties: { provider: { const: 'app_role' }, roleCode: nonEmptyString } },
|
|
5390
|
-
{ type: 'object', additionalProperties: false, required: ['provider', 'inputPath'], properties: { provider: { const: 'form_field_users' }, inputPath: nonEmptyString } },
|
|
5391
|
-
] },
|
|
5392
|
-
} },
|
|
5393
|
-
inputSchema: { type: 'object' }, outputSchema: { type: 'object' },
|
|
5394
|
-
inputs: { type: 'object', maxProperties: 32, additionalProperties: {
|
|
5395
|
-
oneOf: [
|
|
5396
|
-
{ type: 'object', additionalProperties: false, required: ['source', 'path'], properties: { source: { const: 'fact' }, path: { type: 'string', minLength: 1, maxLength: 256 } } },
|
|
5397
|
-
{ type: 'object', additionalProperties: false, required: ['source', 'value'], properties: { source: { const: 'literal' }, value: {} } },
|
|
5398
|
-
],
|
|
5399
|
-
} },
|
|
5400
|
-
},
|
|
5401
|
-
};
|
|
5402
|
-
const workflowReturnPolicySchema = {
|
|
5403
|
-
type: 'object', additionalProperties: false, required: ['targets'], properties: {
|
|
5404
|
-
targets: { type: 'array', maxItems: 20, items: {
|
|
5405
|
-
type: 'object', additionalProperties: false, required: ['nodeId', 'routes', 'defaultRoute'],
|
|
5406
|
-
properties: { nodeId: nonEmptyString, routes: { type: 'array', minItems: 1, maxItems: 2, uniqueItems: true, items: { enum: ['replay', 'resume'] } }, defaultRoute: { enum: ['replay', 'resume'] } },
|
|
5407
|
-
} },
|
|
5408
|
-
},
|
|
5409
|
-
};
|
|
5410
|
-
const workflowNodeSchema = {
|
|
5411
|
-
oneOf: [
|
|
5412
|
-
{
|
|
5413
|
-
type: 'object', additionalProperties: false,
|
|
5414
|
-
required: ['id', 'kind', 'title', 'binding', 'mode', 'next', 'allowedOperations', 'requiredOperations'],
|
|
5415
|
-
properties: {
|
|
5416
|
-
id: nonEmptyString, kind: { const: 'handle' }, title: nonEmptyString, reminders: workflowReminderSchema,
|
|
5417
|
-
binding: nonEmptyString, mode: { enum: ['single', 'any', 'all', 'sequence'] },
|
|
5418
|
-
next: nonEmptyString, emptyPolicy: { const: 'block' },
|
|
5419
|
-
taskPageCode: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,63}$' },
|
|
5420
|
-
allowedOperations: { type: 'array', uniqueItems: true, items: { enum: ['complete', 'save_form', 'return', 'transfer', 'delegate'] } },
|
|
5421
|
-
requiredOperations: { type: 'array', uniqueItems: true, items: { enum: ['complete', 'save_form', 'return', 'transfer', 'delegate'] } },
|
|
5422
|
-
returnPolicy: workflowReturnPolicySchema,
|
|
5423
|
-
returnTargets: { type: 'array', items: nonEmptyString, uniqueItems: true },
|
|
5424
|
-
operationPolicy: { type: 'object', additionalProperties: false, properties: Object.fromEntries(['complete', 'save_form', 'return', 'transfer', 'delegate'].map(operation => [operation, {
|
|
5425
|
-
type: 'object', additionalProperties: false, minProperties: 1,
|
|
5426
|
-
properties: { label: { type: 'string', minLength: 1, maxLength: 40 },
|
|
5427
|
-
...(operation !== 'save_form' ? { opinion: { enum: ['none', 'optional', 'required'] }, minimumOpinion: { enum: ['none', 'optional', 'required'] } } : {}),
|
|
5428
|
-
...(operation === 'complete' ? { commentRequired: { type: 'boolean' } } : {}),
|
|
5429
|
-
...(['return', 'transfer', 'delegate'].includes(operation) ? { reasonRequired: { type: 'boolean' } } : {}) },
|
|
5430
|
-
}])) },
|
|
5431
|
-
administration: { type: 'object', additionalProperties: false, properties: {
|
|
5432
|
-
modes: { type: 'array', uniqueItems: true, minItems: 1, maxItems: 4, items: { enum: ['single', 'any', 'all', 'sequence'] } },
|
|
5433
|
-
assigneeProviders: { type: 'array', uniqueItems: true, minItems: 1, maxItems: 3, items: { enum: ['fixed_users', 'app_role', 'app_role_in_scope'] } },
|
|
5434
|
-
operations: { type: 'array', uniqueItems: true, minItems: 1, maxItems: 5, items: { enum: ['complete', 'save_form', 'return', 'transfer', 'delegate'] } },
|
|
5435
|
-
} },
|
|
5436
|
-
fieldPolicy: { type: 'object', additionalProperties: false, properties: { default: { enum: ['hidden', 'readonly', 'edit', 'edit_required'] }, fields: { type: 'object', additionalProperties: { enum: ['hidden', 'readonly', 'edit', 'edit_required'] } } } },
|
|
5437
|
-
},
|
|
5438
|
-
},
|
|
5439
|
-
{
|
|
5440
|
-
type: "object",
|
|
5441
|
-
additionalProperties: false,
|
|
5442
|
-
required: [
|
|
5443
|
-
"id",
|
|
5444
|
-
"kind",
|
|
5445
|
-
"title",
|
|
5446
|
-
"binding",
|
|
5447
|
-
"mode",
|
|
5448
|
-
"onApprove",
|
|
5449
|
-
"onReject",
|
|
5450
|
-
],
|
|
5451
|
-
properties: {
|
|
5452
|
-
id: nonEmptyString,
|
|
5453
|
-
kind: { const: "approval" },
|
|
5454
|
-
reminders: workflowReminderSchema,
|
|
5455
|
-
title: nonEmptyString,
|
|
5456
|
-
binding: nonEmptyString,
|
|
5457
|
-
mode: { enum: ["single", "any", "all", "sequence"] },
|
|
5458
|
-
emptyPolicy: { enum: ["block", "skip"] },
|
|
5459
|
-
initiatorApprovalPolicy: { enum: ["manual", "auto_approve"] },
|
|
5460
|
-
completionDeadline: {
|
|
5461
|
-
type: 'object', additionalProperties: false, required: ['afterSeconds', 'action'],
|
|
5462
|
-
properties: { afterSeconds: { type: 'integer', minimum: 1, maximum: 2592000 }, action: { const: 'approve' } },
|
|
5463
|
-
},
|
|
5464
|
-
onApprove: nonEmptyString,
|
|
5465
|
-
onReject: nonEmptyString,
|
|
5466
|
-
taskPageCode: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,63}$' },
|
|
5467
|
-
operationPolicy: {
|
|
5468
|
-
type: 'object', additionalProperties: false,
|
|
5469
|
-
properties: Object.fromEntries(WORKFLOW_CONFIGURABLE_OPERATIONS.map(operation => [operation, {
|
|
5470
|
-
type: 'object', additionalProperties: false, minProperties: 1,
|
|
5471
|
-
properties: {
|
|
5472
|
-
label: { type: 'string', minLength: 1, maxLength: 40, pattern: '^(?!.*[\\u0000-\\u001f\\u007f])(?=.*\\S).*$' },
|
|
5473
|
-
...(operation !== 'save_form' ? { opinion: { enum: ['none', 'optional', 'required'] }, minimumOpinion: { enum: ['none', 'optional', 'required'] } } : {}),
|
|
5474
|
-
...(['complete', 'approve', 'reject'].includes(operation) ? { commentRequired: { type: 'boolean' } } : {}),
|
|
5475
|
-
...(['transfer', 'delegate', 'add_assignee', 'return'].includes(operation) ? { reasonRequired: { type: 'boolean' } } : {}),
|
|
5476
|
-
},
|
|
5477
|
-
}])),
|
|
5478
|
-
},
|
|
5479
|
-
requiredOperations: { type: 'array', minItems: 1, maxItems: 7, uniqueItems: true, items: { enum: [...WORKFLOW_CONFIGURABLE_OPERATIONS] } },
|
|
5480
|
-
allowedOperations: {
|
|
5481
|
-
type: "array",
|
|
5482
|
-
uniqueItems: true,
|
|
5483
|
-
items: {
|
|
5484
|
-
enum: [
|
|
5485
|
-
"approve",
|
|
5486
|
-
"reject",
|
|
5487
|
-
"return",
|
|
5488
|
-
"transfer",
|
|
5489
|
-
"delegate",
|
|
5490
|
-
"add_assignee",
|
|
5491
|
-
"resubmit",
|
|
5492
|
-
"save_form",
|
|
5493
|
-
"admin_reassign",
|
|
5494
|
-
"admin_override",
|
|
5495
|
-
],
|
|
5496
|
-
},
|
|
5497
|
-
},
|
|
5498
|
-
returnPolicy: workflowReturnPolicySchema,
|
|
5499
|
-
returnTargets: {
|
|
5500
|
-
type: "array",
|
|
5501
|
-
uniqueItems: true,
|
|
5502
|
-
items: nonEmptyString,
|
|
5503
|
-
},
|
|
5504
|
-
fieldPolicy: {
|
|
5505
|
-
type: "object",
|
|
5506
|
-
additionalProperties: false,
|
|
5507
|
-
properties: {
|
|
5508
|
-
default: {
|
|
5509
|
-
enum: ["hidden", "readonly", "edit", "edit_required"],
|
|
5510
|
-
},
|
|
5511
|
-
fields: {
|
|
5512
|
-
type: "object",
|
|
5513
|
-
additionalProperties: {
|
|
5514
|
-
enum: ["hidden", "readonly", "edit", "edit_required"],
|
|
5515
|
-
},
|
|
5516
|
-
},
|
|
5517
|
-
},
|
|
5518
|
-
},
|
|
5519
|
-
},
|
|
5520
|
-
},
|
|
5521
|
-
{
|
|
5522
|
-
type: "object",
|
|
5523
|
-
additionalProperties: false,
|
|
5524
|
-
required: ["id", "kind", "branches", "otherwise"],
|
|
5525
|
-
properties: {
|
|
5526
|
-
id: nonEmptyString,
|
|
5527
|
-
kind: { const: "condition" },
|
|
5528
|
-
title: { type: "string" },
|
|
5529
|
-
branches: {
|
|
5530
|
-
type: "array",
|
|
5531
|
-
minItems: 1,
|
|
5532
|
-
items: {
|
|
5533
|
-
type: "object",
|
|
5534
|
-
additionalProperties: false,
|
|
5535
|
-
required: ["when", "target"],
|
|
5536
|
-
properties: {
|
|
5537
|
-
when: workflowExpressionSchema,
|
|
5538
|
-
target: nonEmptyString,
|
|
5539
|
-
label: { type: "string" },
|
|
5540
|
-
},
|
|
5541
|
-
},
|
|
5542
|
-
},
|
|
5543
|
-
otherwise: nonEmptyString,
|
|
5544
|
-
},
|
|
5545
|
-
},
|
|
5546
|
-
{
|
|
5547
|
-
type: "object",
|
|
5548
|
-
additionalProperties: false,
|
|
5549
|
-
required: ["id", "kind", "title", "outcome"],
|
|
5550
|
-
properties: {
|
|
5551
|
-
id: nonEmptyString,
|
|
5552
|
-
kind: { const: "end" },
|
|
5553
|
-
title: nonEmptyString,
|
|
5554
|
-
outcome: nonEmptyString,
|
|
5555
|
-
},
|
|
5556
|
-
},
|
|
5557
|
-
workflowCcNodeSchema,
|
|
5558
|
-
workflowBusinessStepNodeSchema,
|
|
5559
|
-
{ type: 'object', additionalProperties: false, required: ['id', 'kind', 'title', 'taskPageCode', 'next'],
|
|
5560
|
-
properties: { id: nonEmptyString, kind: { const: 'correction' }, title: nonEmptyString, reminders: workflowReminderSchema,
|
|
5561
|
-
taskPageCode: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,63}$' }, next: nonEmptyString } },
|
|
5562
|
-
],
|
|
5563
|
-
};
|
|
5564
|
-
export const workflowDefinitionSchema = {
|
|
5565
|
-
$id: SCHEMA_VERSIONS.workflowDefinition,
|
|
5566
|
-
type: "object",
|
|
5567
|
-
additionalProperties: false,
|
|
5568
|
-
required: [
|
|
5569
|
-
"schemaVersion",
|
|
5570
|
-
"code",
|
|
5571
|
-
"title",
|
|
5572
|
-
"acceptedCommandDeactivationPolicy",
|
|
5573
|
-
"subject",
|
|
5574
|
-
"startAt",
|
|
5575
|
-
"inputSchema",
|
|
5576
|
-
"nodes",
|
|
5577
|
-
],
|
|
5578
|
-
properties: {
|
|
5579
|
-
schemaVersion: { const: SCHEMA_VERSIONS.workflowDefinition },
|
|
5580
|
-
code: { type: "string", pattern: "^[A-Za-z][A-Za-z0-9_-]{0,127}$" },
|
|
5581
|
-
title: nonEmptyString,
|
|
5582
|
-
launchPreflight: {
|
|
5583
|
-
type: 'object', additionalProperties: false, required: ['requiredApprovalNodes'],
|
|
5584
|
-
properties: { requiredApprovalNodes: { type: 'array', minItems: 1, maxItems: 20, uniqueItems: true,
|
|
5585
|
-
items: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,127}$' } } },
|
|
5586
|
-
},
|
|
5587
|
-
approvedDelegation: {
|
|
5588
|
-
type: 'object', additionalProperties: false,
|
|
5589
|
-
required: ['confirmationNodeId', 'confirmer', 'requestsField', 'maxRequests'],
|
|
5590
|
-
properties: {
|
|
5591
|
-
confirmationNodeId: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,127}$' },
|
|
5592
|
-
confirmer: { enum: ['initiator', 'delegate'] },
|
|
5593
|
-
requestsField: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_]{0,62}$' },
|
|
5594
|
-
maxRequests: { type: 'integer', minimum: 1, maximum: 500 },
|
|
5595
|
-
},
|
|
5596
|
-
},
|
|
5597
|
-
commandHandlers: {
|
|
5598
|
-
type: 'object', additionalProperties: false, minProperties: 1,
|
|
5599
|
-
properties: Object.fromEntries(['approve', 'reject', 'withdraw', 'resubmit'].map(command => [command, {
|
|
5600
|
-
type: 'object', additionalProperties: false, required: ['operationCode'],
|
|
5601
|
-
properties: { operationCode: { type: 'string', pattern: '^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$' },
|
|
5602
|
-
...(command === 'approve' ? { transitionPolicy: { const: 'workflow' } } : {}),
|
|
5603
|
-
...(command === 'resubmit' ? { derivedSubjectFields: { type: 'array', minItems: 1, maxItems: 32, uniqueItems: true,
|
|
5604
|
-
items: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_]{0,62}$' } } } : {}) },
|
|
5605
|
-
}])),
|
|
5606
|
-
},
|
|
5607
|
-
taskPages: {
|
|
5608
|
-
type: 'object', minProperties: 1, maxProperties: 16,
|
|
5609
|
-
propertyNames: { pattern: '^[A-Za-z][A-Za-z0-9_-]{0,63}$' },
|
|
5610
|
-
additionalProperties: {
|
|
5611
|
-
type: 'object', additionalProperties: false, required: ['title', 'fields'],
|
|
5612
|
-
properties: {
|
|
5613
|
-
title: { type: 'string', minLength: 1, maxLength: 160 },
|
|
5614
|
-
fields: {
|
|
5615
|
-
type: 'array', minItems: 1, maxItems: DATA_RESOURCE_MAX_FIELDS,
|
|
5616
|
-
items: {
|
|
5617
|
-
type: 'object', additionalProperties: false, required: ['code'],
|
|
5618
|
-
properties: {
|
|
5619
|
-
code: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_]{0,62}$' },
|
|
5620
|
-
readonly: { type: 'boolean' }, required: { type: 'boolean' },
|
|
5621
|
-
visibleWhen: workflowExpressionSchema, requiredWhen: workflowExpressionSchema,
|
|
5622
|
-
},
|
|
5623
|
-
},
|
|
5624
|
-
},
|
|
5625
|
-
},
|
|
5626
|
-
},
|
|
5627
|
-
},
|
|
5628
|
-
acceptedCommandDeactivationPolicy: {
|
|
5629
|
-
enum: ["finish-pinned", "cancel-on-deactivate"],
|
|
5630
|
-
},
|
|
5631
|
-
rejectionNotification: {
|
|
5632
|
-
type: 'object', additionalProperties: false,
|
|
5633
|
-
required: ['recipient', 'title', 'summary'],
|
|
5634
|
-
properties: {
|
|
5635
|
-
recipient: { const: 'record_last_modifier' },
|
|
5636
|
-
title: { type: 'string', minLength: 1, maxLength: 160, pattern: '\\S' },
|
|
5637
|
-
summary: { type: 'string', minLength: 1, maxLength: 500, pattern: '\\S' },
|
|
5638
|
-
},
|
|
5639
|
-
},
|
|
5640
|
-
instanceCommands: {
|
|
5641
|
-
type: "object",
|
|
5642
|
-
additionalProperties: false,
|
|
5643
|
-
minProperties: 1,
|
|
5644
|
-
properties: {
|
|
5645
|
-
withdraw: {
|
|
5646
|
-
type: "object",
|
|
5647
|
-
additionalProperties: false,
|
|
5648
|
-
minProperties: 1,
|
|
5649
|
-
properties: {
|
|
5650
|
-
beforeFact: { type: "string", pattern: "^[A-Za-z][A-Za-z0-9_]{0,62}$" },
|
|
5651
|
-
reasonRequired: { type: "boolean" },
|
|
5652
|
-
},
|
|
5653
|
-
},
|
|
5654
|
-
terminate: {
|
|
5655
|
-
type: "object",
|
|
5656
|
-
additionalProperties: false,
|
|
5657
|
-
required: ["capability"],
|
|
5658
|
-
properties: {
|
|
5659
|
-
capability: { type: "string", maxLength: 255, pattern: "^app:[a-z][a-z0-9]*(?:-[a-z0-9]+)*:[A-Za-z0-9:._-]+$" },
|
|
5660
|
-
beforeFact: { type: "string", pattern: "^[A-Za-z][A-Za-z0-9_]{0,62}$" },
|
|
5661
|
-
},
|
|
5662
|
-
},
|
|
5663
|
-
},
|
|
5664
|
-
},
|
|
5665
|
-
subject: {
|
|
5666
|
-
type: "object",
|
|
5667
|
-
additionalProperties: false,
|
|
5668
|
-
required: ["resourceCode", "factProjection", "summaryFields"],
|
|
5669
|
-
properties: {
|
|
5670
|
-
resourceCode: {
|
|
5671
|
-
type: "string",
|
|
5672
|
-
pattern: "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
|
|
5673
|
-
},
|
|
5674
|
-
factProjection: {
|
|
5675
|
-
type: "object",
|
|
5676
|
-
minProperties: 1,
|
|
5677
|
-
maxProperties: 64,
|
|
5678
|
-
propertyNames: {
|
|
5679
|
-
pattern: "^[A-Za-z][A-Za-z0-9_.]{0,127}$",
|
|
5680
|
-
},
|
|
5681
|
-
additionalProperties: {
|
|
5682
|
-
type: "string",
|
|
5683
|
-
pattern: "^[A-Za-z][A-Za-z0-9_]{0,62}$",
|
|
5684
|
-
},
|
|
5685
|
-
},
|
|
5686
|
-
summaryFields: {
|
|
5687
|
-
type: "array",
|
|
5688
|
-
maxItems: WORKFLOW_SUMMARY_MAX_FIELDS,
|
|
5689
|
-
uniqueItems: true,
|
|
5690
|
-
items: dataFieldCode,
|
|
5691
|
-
},
|
|
5692
|
-
},
|
|
5693
|
-
},
|
|
5694
|
-
startAt: nonEmptyString,
|
|
5695
|
-
inputSchema: {
|
|
5696
|
-
type: "object",
|
|
5697
|
-
required: ["type", "additionalProperties"],
|
|
5698
|
-
properties: {
|
|
5699
|
-
type: { const: "object" },
|
|
5700
|
-
additionalProperties: { const: false },
|
|
5701
|
-
},
|
|
5702
|
-
},
|
|
5703
|
-
organizationContext: {
|
|
5704
|
-
type: "object",
|
|
5705
|
-
additionalProperties: false,
|
|
5706
|
-
properties: {
|
|
5707
|
-
department: {
|
|
5708
|
-
type: "object",
|
|
5709
|
-
additionalProperties: false,
|
|
5710
|
-
required: ["source"],
|
|
5711
|
-
properties: {
|
|
5712
|
-
source: {
|
|
5713
|
-
enum: [
|
|
5714
|
-
"none",
|
|
5715
|
-
"user_primary_department",
|
|
5716
|
-
"choose_if_multiple",
|
|
5717
|
-
"always_choose",
|
|
5718
|
-
"fixed",
|
|
5719
|
-
"from_input",
|
|
5720
|
-
"from_role_scope",
|
|
5721
|
-
],
|
|
5722
|
-
},
|
|
5723
|
-
required: { type: "boolean" },
|
|
5724
|
-
value: { type: "string" },
|
|
5725
|
-
path: { type: "string" },
|
|
5726
|
-
dimension: { type: "string" },
|
|
5727
|
-
},
|
|
5728
|
-
},
|
|
5729
|
-
},
|
|
5730
|
-
},
|
|
5731
|
-
nodes: {
|
|
5732
|
-
type: "object",
|
|
5733
|
-
minProperties: 1,
|
|
5734
|
-
maxProperties: 200,
|
|
5735
|
-
additionalProperties: workflowNodeSchema,
|
|
5736
|
-
},
|
|
5737
|
-
},
|
|
5738
|
-
};
|
|
5739
|
-
export const workflowBindingSchema = {
|
|
5740
|
-
$id: SCHEMA_VERSIONS.workflowBinding,
|
|
5741
|
-
type: "object",
|
|
5742
|
-
additionalProperties: false,
|
|
5743
|
-
required: ["schemaVersion", "workflowCode", "bindings"],
|
|
5744
|
-
properties: {
|
|
5745
|
-
schemaVersion: { const: SCHEMA_VERSIONS.workflowBinding },
|
|
5746
|
-
workflowCode: nonEmptyString,
|
|
5747
|
-
bindings: {
|
|
5748
|
-
type: "object",
|
|
5749
|
-
maxProperties: 200,
|
|
5750
|
-
additionalProperties: {
|
|
5751
|
-
type: "object",
|
|
5752
|
-
additionalProperties: false,
|
|
5753
|
-
required: ["provider"],
|
|
5754
|
-
allOf: [{
|
|
5755
|
-
if: { required: ['roleCodes'] },
|
|
5756
|
-
then: { properties: { provider: { enum: ['app_role', 'app_role_in_scope'] } }, not: { anyOf: [{ required: ['roleCode'] }, { required: ['candidateField'] }] } },
|
|
5757
|
-
}, {
|
|
5758
|
-
if: { required: ['candidateField'] },
|
|
5759
|
-
then: {
|
|
5760
|
-
required: ['inputPath'],
|
|
5761
|
-
properties: { provider: { const: 'form_field_users' } },
|
|
5762
|
-
not: { anyOf: [{ required: ['roleCode'] }, { required: ['scope'] }, { required: ['routing'] }] },
|
|
5763
|
-
},
|
|
5764
|
-
}, {
|
|
5765
|
-
if: { required: ['selectedInputPath'] },
|
|
5766
|
-
then: { properties: { provider: { enum: ['app_role', 'app_role_in_scope'] } },
|
|
5767
|
-
anyOf: [{ required: ['roleCode'] }, { required: ['roleCodes'] }],
|
|
5768
|
-
not: { anyOf: [{ required: ['candidateField'] }, { required: ['inputPath'] }, { required: ['routing'] }] } },
|
|
5769
|
-
}],
|
|
5770
|
-
properties: {
|
|
5771
|
-
provider: {
|
|
5772
|
-
enum: [
|
|
5773
|
-
"fixed_users",
|
|
5774
|
-
"initiator",
|
|
5775
|
-
"input_users",
|
|
5776
|
-
"form_field_users",
|
|
5777
|
-
"department_supervisor",
|
|
5778
|
-
"supervisor_chain",
|
|
5779
|
-
"app_role",
|
|
5780
|
-
"app_role_in_scope",
|
|
5781
|
-
"business_relation",
|
|
5782
|
-
"previous_node_actor",
|
|
5783
|
-
"initiator_select",
|
|
5784
|
-
"application_provider",
|
|
5785
|
-
],
|
|
5786
|
-
},
|
|
5787
|
-
users: { type: "array", uniqueItems: true, items: nonEmptyString },
|
|
5788
|
-
inputPath: { type: "string" },
|
|
5789
|
-
selectedInputPath: { type: "string", maxLength: 255, pattern: "^[A-Za-z][A-Za-z0-9_-]*(?:\\.[A-Za-z][A-Za-z0-9_-]*)*$" },
|
|
5790
|
-
candidateField: dataFieldCode,
|
|
5791
|
-
from: { oneOf: [{ const: 'initiator' }, { type: 'object', additionalProperties: false, required: ['field'], properties: { field: { type: 'string', maxLength: 255 } } }] },
|
|
5792
|
-
until: { oneOf: [{ const: 'top' }, { type: 'object', additionalProperties: false, required: ['level'], properties: { level: { type: 'integer', minimum: 1, maximum: 20 } } }, { type: 'object', additionalProperties: false, required: ['roleCode'], properties: { roleCode: nonEmptyString } }] },
|
|
5793
|
-
continuous: { type: 'boolean' }, missing: { enum: ['skip_level', 'block'] },
|
|
5794
|
-
departmentIdFrom: { type: "string" },
|
|
5795
|
-
level: { type: "integer", minimum: 1, maximum: 20 },
|
|
5796
|
-
fallbackToAncestorSupervisor: { type: "boolean" },
|
|
5797
|
-
roleCode: { type: "string" },
|
|
5798
|
-
roleCodes: workflowRoleCodesSchema,
|
|
5799
|
-
scope: {
|
|
5800
|
-
type: "object",
|
|
5801
|
-
additionalProperties: false,
|
|
5802
|
-
required: ["dimension"],
|
|
5803
|
-
properties: {
|
|
5804
|
-
dimension: nonEmptyString,
|
|
5805
|
-
valueFrom: { type: "string" },
|
|
5806
|
-
value: { type: "string" },
|
|
5807
|
-
},
|
|
5808
|
-
},
|
|
5809
|
-
relationCode: { type: "string" },
|
|
5810
|
-
resourceCode: { type: "string" },
|
|
5811
|
-
resourceIdFrom: { type: "string" },
|
|
5812
|
-
providerCode: { type: "string" },
|
|
5813
|
-
min: { type: "integer", minimum: 1, maximum: 200 },
|
|
5814
|
-
max: { type: "integer", minimum: 1, maximum: 200 },
|
|
5815
|
-
delegatable: { type: "boolean" },
|
|
5816
|
-
routing: workflowAssignmentRoutingPolicySchema,
|
|
5817
|
-
},
|
|
5818
|
-
},
|
|
5819
|
-
},
|
|
5820
|
-
},
|
|
5821
|
-
};
|
|
5822
5329
|
export const workflowPreparationSchema = {
|
|
5823
5330
|
$id: SCHEMA_VERSIONS.workflowPreparation,
|
|
5824
5331
|
type: "object",
|
|
@@ -8621,6 +8128,7 @@ const subjectReadSurfaceDeclarationSchema = {
|
|
|
8621
8128
|
},
|
|
8622
8129
|
},
|
|
8623
8130
|
};
|
|
8131
|
+
import { applicationAgentDeclarationSchemaV2 } from './application-agent.js';
|
|
8624
8132
|
export const configurationBundleSchema = {
|
|
8625
8133
|
$id: SCHEMA_VERSIONS.configurationBundle,
|
|
8626
8134
|
$defs: { appDataPolicyExpression: appDataPolicyExpressionSchema },
|
|
@@ -8641,6 +8149,7 @@ export const configurationBundleSchema = {
|
|
|
8641
8149
|
],
|
|
8642
8150
|
properties: {
|
|
8643
8151
|
schemaVersion: { const: SCHEMA_VERSIONS.configurationBundle },
|
|
8152
|
+
agents: { type: "array", maxItems: 20, items: applicationAgentDeclarationSchemaV2 },
|
|
8644
8153
|
compilerContractVersion: {
|
|
8645
8154
|
const: OPENXIANGDA_COMPILER_CONTRACT_VERSION,
|
|
8646
8155
|
},
|