openxiangda-contracts 2.78.0 → 2.81.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.
Files changed (172) hide show
  1. package/dist/ai.d.ts +321 -21
  2. package/dist/ai.d.ts.map +1 -1
  3. package/dist/ai.js +37 -14
  4. package/dist/ai.js.map +1 -1
  5. package/dist/application-agent.d.ts +540 -0
  6. package/dist/application-agent.d.ts.map +1 -0
  7. package/dist/application-agent.js +98 -0
  8. package/dist/application-agent.js.map +1 -0
  9. package/dist/browser.d.ts +15 -0
  10. package/dist/browser.d.ts.map +1 -1
  11. package/dist/browser.js +14 -0
  12. package/dist/browser.js.map +1 -1
  13. package/dist/cli.d.ts +5 -0
  14. package/dist/cli.d.ts.map +1 -1
  15. package/dist/data-field-validation.js +26 -23
  16. package/dist/data-field-validation.js.map +1 -1
  17. package/dist/field-value-schemas.d.ts +2 -1427
  18. package/dist/field-value-schemas.d.ts.map +1 -1
  19. package/dist/field-value-schemas.js +2 -261
  20. package/dist/field-value-schemas.js.map +1 -1
  21. package/dist/index.d.ts +13 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +13 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/native-compiler/address-value.d.ts +13 -0
  26. package/dist/native-compiler/address-value.d.ts.map +1 -0
  27. package/dist/native-compiler/address-value.js +70 -0
  28. package/dist/native-compiler/address-value.js.map +1 -0
  29. package/dist/native-compiler/application-agent.d.ts +39 -0
  30. package/dist/native-compiler/application-agent.d.ts.map +1 -0
  31. package/dist/native-compiler/application-agent.js +344 -0
  32. package/dist/native-compiler/application-agent.js.map +1 -0
  33. package/dist/native-compiler/cascade-value.d.ts +6 -0
  34. package/dist/native-compiler/cascade-value.d.ts.map +1 -0
  35. package/dist/native-compiler/cascade-value.js +47 -0
  36. package/dist/native-compiler/cascade-value.js.map +1 -0
  37. package/dist/native-compiler/compiler.d.ts +1 -1
  38. package/dist/native-compiler/compiler.d.ts.map +1 -1
  39. package/dist/native-compiler/compiler.js +85 -56
  40. package/dist/native-compiler/compiler.js.map +1 -1
  41. package/dist/native-compiler/data-field.d.ts +3 -0
  42. package/dist/native-compiler/data-field.d.ts.map +1 -1
  43. package/dist/native-compiler/data-field.js +10 -2
  44. package/dist/native-compiler/data-field.js.map +1 -1
  45. package/dist/native-compiler/declaration-capacity.d.ts +3 -0
  46. package/dist/native-compiler/declaration-capacity.d.ts.map +1 -1
  47. package/dist/native-compiler/declaration-capacity.js +1 -1
  48. package/dist/native-compiler/declaration-capacity.js.map +1 -1
  49. package/dist/native-compiler/field-value-schemas.d.ts +1428 -0
  50. package/dist/native-compiler/field-value-schemas.d.ts.map +1 -0
  51. package/dist/native-compiler/field-value-schemas.js +262 -0
  52. package/dist/native-compiler/field-value-schemas.js.map +1 -0
  53. package/dist/native-compiler/index.cjs +4 -4
  54. package/dist/native-compiler/index.d.ts +17 -0
  55. package/dist/native-compiler/index.d.ts.map +1 -1
  56. package/dist/native-compiler/index.js +4 -4
  57. package/dist/native-compiler/resource-query.d.ts +21 -0
  58. package/dist/native-compiler/resource-query.d.ts.map +1 -0
  59. package/dist/native-compiler/resource-query.js +154 -0
  60. package/dist/native-compiler/resource-query.js.map +1 -0
  61. package/dist/native-compiler/workflow-approval-empty.d.ts +1 -1
  62. package/dist/native-compiler/workflow-approval-empty.d.ts.map +1 -1
  63. package/dist/native-compiler/workflow-approval-empty.js +1 -1
  64. package/dist/native-compiler/workflow-approval-empty.js.map +1 -1
  65. package/dist/native-compiler/workflow-authoring.d.ts +24 -0
  66. package/dist/native-compiler/workflow-authoring.d.ts.map +1 -0
  67. package/dist/native-compiler/workflow-authoring.js +84 -0
  68. package/dist/native-compiler/workflow-authoring.js.map +1 -0
  69. package/dist/native-compiler/workflow-business-step.d.ts +13 -2
  70. package/dist/native-compiler/workflow-business-step.d.ts.map +1 -1
  71. package/dist/native-compiler/workflow-business-step.js +31 -6
  72. package/dist/native-compiler/workflow-business-step.js.map +1 -1
  73. package/dist/native-compiler/workflow-completion-deadline.d.ts +1 -0
  74. package/dist/native-compiler/workflow-completion-deadline.d.ts.map +1 -1
  75. package/dist/native-compiler/workflow-completion-deadline.js +1 -1
  76. package/dist/native-compiler/workflow-completion-deadline.js.map +1 -1
  77. package/dist/native-compiler/workflow-correction.d.ts +1 -0
  78. package/dist/native-compiler/workflow-correction.d.ts.map +1 -1
  79. package/dist/native-compiler/workflow-correction.js +5 -4
  80. package/dist/native-compiler/workflow-correction.js.map +1 -1
  81. package/dist/native-compiler/workflow-designer.d.ts +134 -0
  82. package/dist/native-compiler/workflow-designer.d.ts.map +1 -0
  83. package/dist/native-compiler/workflow-designer.js +407 -0
  84. package/dist/native-compiler/workflow-designer.js.map +1 -0
  85. package/dist/native-compiler/workflow-events.d.ts +8 -0
  86. package/dist/native-compiler/workflow-events.d.ts.map +1 -0
  87. package/dist/native-compiler/workflow-events.js +53 -0
  88. package/dist/native-compiler/workflow-events.js.map +1 -0
  89. package/dist/native-compiler/workflow-expression.d.ts +4 -0
  90. package/dist/native-compiler/workflow-expression.d.ts.map +1 -0
  91. package/dist/native-compiler/workflow-expression.js +47 -0
  92. package/dist/native-compiler/workflow-expression.js.map +1 -0
  93. package/dist/native-compiler/workflow-graph.d.ts +16 -1
  94. package/dist/native-compiler/workflow-graph.d.ts.map +1 -1
  95. package/dist/native-compiler/workflow-graph.js +27 -5
  96. package/dist/native-compiler/workflow-graph.js.map +1 -1
  97. package/dist/native-compiler/workflow-handle.d.ts +4 -0
  98. package/dist/native-compiler/workflow-handle.d.ts.map +1 -0
  99. package/dist/native-compiler/workflow-handle.js +20 -0
  100. package/dist/native-compiler/workflow-handle.js.map +1 -0
  101. package/dist/native-compiler/workflow-initiator-approval.d.ts +1 -0
  102. package/dist/native-compiler/workflow-initiator-approval.d.ts.map +1 -1
  103. package/dist/native-compiler/workflow-initiator-approval.js +1 -1
  104. package/dist/native-compiler/workflow-initiator-approval.js.map +1 -1
  105. package/dist/native-compiler/workflow-node-administration.d.ts +12 -1
  106. package/dist/native-compiler/workflow-node-administration.d.ts.map +1 -1
  107. package/dist/native-compiler/workflow-node-administration.js +66 -14
  108. package/dist/native-compiler/workflow-node-administration.js.map +1 -1
  109. package/dist/native-compiler/workflow-parallel.d.ts +69 -0
  110. package/dist/native-compiler/workflow-parallel.d.ts.map +1 -0
  111. package/dist/native-compiler/workflow-parallel.js +178 -0
  112. package/dist/native-compiler/workflow-parallel.js.map +1 -0
  113. package/dist/native-compiler/workflow-platform-notify.d.ts +41 -0
  114. package/dist/native-compiler/workflow-platform-notify.d.ts.map +1 -0
  115. package/dist/native-compiler/workflow-platform-notify.js +49 -0
  116. package/dist/native-compiler/workflow-platform-notify.js.map +1 -0
  117. package/dist/native-compiler/workflow-reminders.d.ts +11 -0
  118. package/dist/native-compiler/workflow-reminders.d.ts.map +1 -0
  119. package/dist/native-compiler/workflow-reminders.js +12 -0
  120. package/dist/native-compiler/workflow-reminders.js.map +1 -0
  121. package/dist/native-compiler/workflow-return-eligibility.d.ts +8 -0
  122. package/dist/native-compiler/workflow-return-eligibility.d.ts.map +1 -0
  123. package/dist/native-compiler/workflow-return-eligibility.js +32 -0
  124. package/dist/native-compiler/workflow-return-eligibility.js.map +1 -0
  125. package/dist/native-compiler/workflow-return-policy.d.ts +20 -0
  126. package/dist/native-compiler/workflow-return-policy.d.ts.map +1 -0
  127. package/dist/native-compiler/workflow-return-policy.js +37 -0
  128. package/dist/native-compiler/workflow-return-policy.js.map +1 -0
  129. package/dist/native-compiler/workflow-role-union.d.ts +5 -1
  130. package/dist/native-compiler/workflow-role-union.d.ts.map +1 -1
  131. package/dist/native-compiler/workflow-role-union.js +1 -1
  132. package/dist/native-compiler/workflow-role-union.js.map +1 -1
  133. package/dist/native-compiler/workflow-schema-constants.d.ts +5 -0
  134. package/dist/native-compiler/workflow-schema-constants.d.ts.map +1 -0
  135. package/dist/native-compiler/workflow-schema-constants.js +5 -0
  136. package/dist/native-compiler/workflow-schema-constants.js.map +1 -0
  137. package/dist/native-compiler/workflow-schema.d.ts +1634 -0
  138. package/dist/native-compiler/workflow-schema.d.ts.map +1 -0
  139. package/dist/native-compiler/workflow-schema.js +519 -0
  140. package/dist/native-compiler/workflow-schema.js.map +1 -0
  141. package/dist/native-compiler/workflow-source-sync.d.ts +109 -0
  142. package/dist/native-compiler/workflow-source-sync.d.ts.map +1 -0
  143. package/dist/native-compiler/workflow-source-sync.js +116 -0
  144. package/dist/native-compiler/workflow-source-sync.js.map +1 -0
  145. package/dist/native-compiler/workflow-supervisor-chain.d.ts +16 -0
  146. package/dist/native-compiler/workflow-supervisor-chain.d.ts.map +1 -0
  147. package/dist/native-compiler/workflow-supervisor-chain.js +44 -0
  148. package/dist/native-compiler/workflow-supervisor-chain.js.map +1 -0
  149. package/dist/native-compiler/workflow-task-page.js +1 -1
  150. package/dist/native-compiler/workflow-task-page.js.map +1 -1
  151. package/dist/native-version.d.ts +7 -0
  152. package/dist/native-version.d.ts.map +1 -1
  153. package/dist/native-version.js +7 -0
  154. package/dist/native-version.js.map +1 -1
  155. package/dist/native.d.ts +10 -0
  156. package/dist/native.d.ts.map +1 -1
  157. package/dist/native.js.map +1 -1
  158. package/dist/references.d.ts +4 -0
  159. package/dist/references.d.ts.map +1 -1
  160. package/dist/schemas.d.ts +1485 -1088
  161. package/dist/schemas.d.ts.map +1 -1
  162. package/dist/schemas.js +33 -449
  163. package/dist/schemas.js.map +1 -1
  164. package/dist/types.d.ts +48 -12
  165. package/dist/types.d.ts.map +1 -1
  166. package/dist/types.js +4 -42
  167. package/dist/types.js.map +1 -1
  168. package/dist/workflow-summary.d.ts +1 -1
  169. package/dist/workflow-summary.d.ts.map +1 -1
  170. package/dist/workflow-summary.js +2 -1
  171. package/dist/workflow-summary.js.map +1 -1
  172. 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 = {
@@ -1808,6 +1807,7 @@ const directoryEntrySchema = {
1808
1807
  },
1809
1808
  description: { type: "string" },
1810
1809
  selectable: { type: "boolean" },
1810
+ inactive: { type: "boolean" },
1811
1811
  path: {
1812
1812
  type: "array",
1813
1813
  items: {
@@ -1880,7 +1880,7 @@ export const nativeScopeValueResolveRequestSchema = {
1880
1880
  properties: {
1881
1881
  schemaVersion: { const: SCHEMA_VERSIONS.nativeScopeValueResolveRequest },
1882
1882
  dimensionCode: nativeStableCode,
1883
- operation: { enum: ["create", "update"] },
1883
+ operation: { enum: ["create", "update", "filter"] },
1884
1884
  values: {
1885
1885
  type: "array",
1886
1886
  minItems: 1,
@@ -1935,7 +1935,7 @@ export const nativeScopeValuePageSchema = {
1935
1935
  pattern: "^[A-Za-z][A-Za-z0-9_]{0,62}$",
1936
1936
  },
1937
1937
  dimensionCode: nativeStableCode,
1938
- operation: { enum: ["create", "update"] },
1938
+ operation: { enum: ["create", "update", "filter"] },
1939
1939
  items: {
1940
1940
  type: "array",
1941
1941
  maxItems: 50,
@@ -1947,6 +1947,7 @@ export const nativeScopeValuePageSchema = {
1947
1947
  value: nonEmptyString,
1948
1948
  label: nonEmptyString,
1949
1949
  selectable: { type: "boolean" },
1950
+ inactive: { type: "boolean" },
1950
1951
  },
1951
1952
  },
1952
1953
  },
@@ -1963,10 +1964,20 @@ export const dataFieldSourceQuerySchema = {
1963
1964
  type: "object",
1964
1965
  additionalProperties: false,
1965
1966
  required: ["schemaVersion", "operation"],
1967
+ allOf: [
1968
+ { if: { properties: { operation: { const: 'filter' } } },
1969
+ then: { not: { anyOf: ['bindings', 'launch', 'action', 'record'].map(key => ({ required: [key] })) } } },
1970
+ { if: { required: ['record'] }, then: { properties: { operation: { const: 'update' } },
1971
+ not: { anyOf: [{ required: ['launch'] }, { required: ['action'] }] } } },
1972
+ { if: { required: ['action'] }, then: { properties: { operation: { const: 'update' } },
1973
+ not: { required: ['launch'] } } },
1974
+ ],
1966
1975
  properties: {
1967
1976
  schemaVersion: { const: SCHEMA_VERSIONS.dataFieldSourceQuery },
1968
1977
  action: recordEditInputSchema,
1969
- operation: { enum: ["create", "update"] },
1978
+ record: { type: "object", additionalProperties: false, required: ["id", "expectedRevision"],
1979
+ properties: { id: { type: "string", format: "uuid" }, expectedRevision: { type: "integer", minimum: 1, maximum: Number.MAX_SAFE_INTEGER } } },
1980
+ operation: { enum: ["create", "update", "filter"] },
1970
1981
  launch: {
1971
1982
  type: "object", additionalProperties: false,
1972
1983
  required: ["workflowCode", "operationCode"],
@@ -2040,7 +2051,7 @@ export const dataFieldSourcePageSchema = {
2040
2051
  pattern: "^[A-Za-z][A-Za-z0-9_]{0,62}$",
2041
2052
  },
2042
2053
  sourceResourceCode: nativeStableCode,
2043
- operation: { enum: ["create", "update"] },
2054
+ operation: { enum: ["create", "update", "filter"] },
2044
2055
  items: {
2045
2056
  type: "array",
2046
2057
  maxItems: 100,
@@ -2241,6 +2252,11 @@ const dataFieldResourceSourceSchema = {
2241
2252
  maxItems: 20,
2242
2253
  items: dataFieldResourceSourceFilterSchema,
2243
2254
  },
2255
+ filterWhere: {
2256
+ type: "array", maxItems: 20,
2257
+ items: { type: "object", additionalProperties: false, required: ["field", "operator", "value"],
2258
+ properties: { field: dataFieldCode, operator: { enum: ["eq", "in"] }, value: {} } },
2259
+ },
2244
2260
  pageSize: { type: "integer", minimum: 1, maximum: 100 },
2245
2261
  loadMode: { enum: ["search", "all"] },
2246
2262
  clearOnBindingChange: { type: 'boolean' },
@@ -5310,446 +5326,6 @@ export const eventDeliveryAckSchema = {
5310
5326
  receiptStatus: { const: "succeeded" },
5311
5327
  },
5312
5328
  };
5313
- const workflowExpressionSchema = {
5314
- type: "object",
5315
- required: ["op"],
5316
- properties: {
5317
- op: {
5318
- enum: [
5319
- "literal",
5320
- "path",
5321
- "eq",
5322
- "neq",
5323
- "gt",
5324
- "gte",
5325
- "lt",
5326
- "lte",
5327
- "in",
5328
- "contains",
5329
- "and",
5330
- "or",
5331
- "not",
5332
- "exists",
5333
- ],
5334
- },
5335
- value: {},
5336
- path: { type: "string", pattern: "^[A-Za-z][A-Za-z0-9_.]{0,254}$" },
5337
- left: { type: "object" },
5338
- right: { type: "object" },
5339
- values: { type: "array", minItems: 1, items: { type: "object" } },
5340
- },
5341
- };
5342
- const workflowCcNodeSchema = {
5343
- type: 'object', additionalProperties: false,
5344
- required: ['id', 'kind', 'title', 'binding', 'next', 'emptyPolicy'],
5345
- properties: {
5346
- id: nonEmptyString, kind: { const: 'cc' }, title: nonEmptyString,
5347
- binding: nonEmptyString, next: nonEmptyString,
5348
- emptyPolicy: { enum: ['block', 'skip'] }, notify: { type: 'boolean' },
5349
- administration: {
5350
- type: 'object', additionalProperties: false,
5351
- properties: {
5352
- assigneeProviders: { type: 'array', minItems: 1, maxItems: 3, uniqueItems: true, items: { enum: ['fixed_users', 'app_role', 'app_role_in_scope'] } },
5353
- },
5354
- },
5355
- },
5356
- };
5357
- export const workflowBusinessStepNodeSchema = {
5358
- type: 'object', additionalProperties: false,
5359
- required: ['id', 'kind', 'title', 'next', 'handler', 'inputSchema', 'outputSchema', 'inputs'],
5360
- properties: {
5361
- id: nonEmptyString, kind: { const: 'action' }, title: nonEmptyString, next: nonEmptyString,
5362
- handler: {
5363
- type: 'object', additionalProperties: false, required: ['code', 'version', 'mode'],
5364
- 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 } },
5365
- allOf: [{ if: { required: ['dataTransaction'] }, then: { properties: { mode: { const: 'reconciled-effect' } } } }],
5366
- },
5367
- inputSchema: { type: 'object' }, outputSchema: { type: 'object' },
5368
- inputs: { type: 'object', maxProperties: 32, additionalProperties: {
5369
- oneOf: [
5370
- { type: 'object', additionalProperties: false, required: ['source', 'path'], properties: { source: { const: 'fact' }, path: { type: 'string', minLength: 1, maxLength: 256 } } },
5371
- { type: 'object', additionalProperties: false, required: ['source', 'value'], properties: { source: { const: 'literal' }, value: {} } },
5372
- ],
5373
- } },
5374
- },
5375
- };
5376
- const workflowNodeSchema = {
5377
- oneOf: [
5378
- {
5379
- type: "object",
5380
- additionalProperties: false,
5381
- required: [
5382
- "id",
5383
- "kind",
5384
- "title",
5385
- "binding",
5386
- "mode",
5387
- "onApprove",
5388
- "onReject",
5389
- ],
5390
- properties: {
5391
- id: nonEmptyString,
5392
- kind: { const: "approval" },
5393
- title: nonEmptyString,
5394
- binding: nonEmptyString,
5395
- mode: { enum: ["single", "any", "all", "sequence"] },
5396
- emptyPolicy: { enum: ["block", "skip"] },
5397
- initiatorApprovalPolicy: { enum: ["manual", "auto_approve"] },
5398
- completionDeadline: {
5399
- type: 'object', additionalProperties: false, required: ['afterSeconds', 'action'],
5400
- properties: { afterSeconds: { type: 'integer', minimum: 1, maximum: 2592000 }, action: { const: 'approve' } },
5401
- },
5402
- onApprove: nonEmptyString,
5403
- onReject: nonEmptyString,
5404
- taskPageCode: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,63}$' },
5405
- operationPolicy: {
5406
- type: 'object', additionalProperties: false,
5407
- properties: Object.fromEntries(WORKFLOW_CONFIGURABLE_OPERATIONS.map(operation => [operation, {
5408
- type: 'object', additionalProperties: false, minProperties: 1,
5409
- properties: {
5410
- label: { type: 'string', minLength: 1, maxLength: 40, pattern: '^(?!.*[\\u0000-\\u001f\\u007f])(?=.*\\S).*$' },
5411
- ...(['approve', 'reject'].includes(operation) ? { commentRequired: { type: 'boolean' } } : {}),
5412
- ...(['transfer', 'delegate', 'add_assignee', 'return'].includes(operation) ? { reasonRequired: { type: 'boolean' } } : {}),
5413
- },
5414
- }])),
5415
- },
5416
- allowedOperations: {
5417
- type: "array",
5418
- uniqueItems: true,
5419
- items: {
5420
- enum: [
5421
- "approve",
5422
- "reject",
5423
- "return",
5424
- "transfer",
5425
- "delegate",
5426
- "add_assignee",
5427
- "resubmit",
5428
- "save_form",
5429
- "admin_reassign",
5430
- "admin_override",
5431
- ],
5432
- },
5433
- },
5434
- returnTargets: {
5435
- type: "array",
5436
- uniqueItems: true,
5437
- items: nonEmptyString,
5438
- },
5439
- fieldPolicy: {
5440
- type: "object",
5441
- additionalProperties: false,
5442
- properties: {
5443
- default: {
5444
- enum: ["hidden", "readonly", "edit", "edit_required"],
5445
- },
5446
- fields: {
5447
- type: "object",
5448
- additionalProperties: {
5449
- enum: ["hidden", "readonly", "edit", "edit_required"],
5450
- },
5451
- },
5452
- },
5453
- },
5454
- },
5455
- },
5456
- {
5457
- type: "object",
5458
- additionalProperties: false,
5459
- required: ["id", "kind", "branches", "otherwise"],
5460
- properties: {
5461
- id: nonEmptyString,
5462
- kind: { const: "condition" },
5463
- title: { type: "string" },
5464
- branches: {
5465
- type: "array",
5466
- minItems: 1,
5467
- items: {
5468
- type: "object",
5469
- additionalProperties: false,
5470
- required: ["when", "target"],
5471
- properties: {
5472
- when: workflowExpressionSchema,
5473
- target: nonEmptyString,
5474
- label: { type: "string" },
5475
- },
5476
- },
5477
- },
5478
- otherwise: nonEmptyString,
5479
- },
5480
- },
5481
- {
5482
- type: "object",
5483
- additionalProperties: false,
5484
- required: ["id", "kind", "title", "outcome"],
5485
- properties: {
5486
- id: nonEmptyString,
5487
- kind: { const: "end" },
5488
- title: nonEmptyString,
5489
- outcome: nonEmptyString,
5490
- },
5491
- },
5492
- workflowCcNodeSchema,
5493
- workflowBusinessStepNodeSchema,
5494
- { type: 'object', additionalProperties: false, required: ['id', 'kind', 'title', 'taskPageCode', 'next'],
5495
- properties: { id: nonEmptyString, kind: { const: 'correction' }, title: nonEmptyString,
5496
- taskPageCode: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,63}$' }, next: nonEmptyString } },
5497
- ],
5498
- };
5499
- export const workflowDefinitionSchema = {
5500
- $id: SCHEMA_VERSIONS.workflowDefinition,
5501
- type: "object",
5502
- additionalProperties: false,
5503
- required: [
5504
- "schemaVersion",
5505
- "code",
5506
- "title",
5507
- "acceptedCommandDeactivationPolicy",
5508
- "subject",
5509
- "startAt",
5510
- "inputSchema",
5511
- "nodes",
5512
- ],
5513
- properties: {
5514
- schemaVersion: { const: SCHEMA_VERSIONS.workflowDefinition },
5515
- code: { type: "string", pattern: "^[A-Za-z][A-Za-z0-9_-]{0,127}$" },
5516
- title: nonEmptyString,
5517
- launchPreflight: {
5518
- type: 'object', additionalProperties: false, required: ['requiredApprovalNodes'],
5519
- properties: { requiredApprovalNodes: { type: 'array', minItems: 1, maxItems: 20, uniqueItems: true,
5520
- items: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,127}$' } } },
5521
- },
5522
- approvedDelegation: {
5523
- type: 'object', additionalProperties: false,
5524
- required: ['confirmationNodeId', 'confirmer', 'requestsField', 'maxRequests'],
5525
- properties: {
5526
- confirmationNodeId: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,127}$' },
5527
- confirmer: { enum: ['initiator', 'delegate'] },
5528
- requestsField: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_]{0,62}$' },
5529
- maxRequests: { type: 'integer', minimum: 1, maximum: 500 },
5530
- },
5531
- },
5532
- commandHandlers: {
5533
- type: 'object', additionalProperties: false, minProperties: 1,
5534
- properties: Object.fromEntries(['approve', 'reject', 'withdraw', 'resubmit'].map(command => [command, {
5535
- type: 'object', additionalProperties: false, required: ['operationCode'],
5536
- properties: { operationCode: { type: 'string', pattern: '^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$' },
5537
- ...(command === 'approve' ? { transitionPolicy: { const: 'workflow' } } : {}),
5538
- ...(command === 'resubmit' ? { derivedSubjectFields: { type: 'array', minItems: 1, maxItems: 32, uniqueItems: true,
5539
- items: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_]{0,62}$' } } } : {}) },
5540
- }])),
5541
- },
5542
- taskPages: {
5543
- type: 'object', minProperties: 1, maxProperties: 16,
5544
- propertyNames: { pattern: '^[A-Za-z][A-Za-z0-9_-]{0,63}$' },
5545
- additionalProperties: {
5546
- type: 'object', additionalProperties: false, required: ['title', 'fields'],
5547
- properties: {
5548
- title: { type: 'string', minLength: 1, maxLength: 160 },
5549
- fields: {
5550
- type: 'array', minItems: 1, maxItems: DATA_RESOURCE_MAX_FIELDS,
5551
- items: {
5552
- type: 'object', additionalProperties: false, required: ['code'],
5553
- properties: {
5554
- code: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_]{0,62}$' },
5555
- readonly: { type: 'boolean' }, required: { type: 'boolean' },
5556
- visibleWhen: workflowExpressionSchema, requiredWhen: workflowExpressionSchema,
5557
- },
5558
- },
5559
- },
5560
- },
5561
- },
5562
- },
5563
- acceptedCommandDeactivationPolicy: {
5564
- enum: ["finish-pinned", "cancel-on-deactivate"],
5565
- },
5566
- rejectionNotification: {
5567
- type: 'object', additionalProperties: false,
5568
- required: ['recipient', 'title', 'summary'],
5569
- properties: {
5570
- recipient: { const: 'record_last_modifier' },
5571
- title: { type: 'string', minLength: 1, maxLength: 160, pattern: '\\S' },
5572
- summary: { type: 'string', minLength: 1, maxLength: 500, pattern: '\\S' },
5573
- },
5574
- },
5575
- instanceCommands: {
5576
- type: "object",
5577
- additionalProperties: false,
5578
- minProperties: 1,
5579
- properties: {
5580
- withdraw: {
5581
- type: "object",
5582
- additionalProperties: false,
5583
- minProperties: 1,
5584
- properties: {
5585
- beforeFact: { type: "string", pattern: "^[A-Za-z][A-Za-z0-9_]{0,62}$" },
5586
- reasonRequired: { type: "boolean" },
5587
- },
5588
- },
5589
- terminate: {
5590
- type: "object",
5591
- additionalProperties: false,
5592
- required: ["capability"],
5593
- properties: {
5594
- capability: { type: "string", maxLength: 255, pattern: "^app:[a-z][a-z0-9]*(?:-[a-z0-9]+)*:[A-Za-z0-9:._-]+$" },
5595
- beforeFact: { type: "string", pattern: "^[A-Za-z][A-Za-z0-9_]{0,62}$" },
5596
- },
5597
- },
5598
- },
5599
- },
5600
- subject: {
5601
- type: "object",
5602
- additionalProperties: false,
5603
- required: ["resourceCode", "factProjection", "summaryFields"],
5604
- properties: {
5605
- resourceCode: {
5606
- type: "string",
5607
- pattern: "^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$",
5608
- },
5609
- factProjection: {
5610
- type: "object",
5611
- minProperties: 1,
5612
- maxProperties: 64,
5613
- propertyNames: {
5614
- pattern: "^[A-Za-z][A-Za-z0-9_.]{0,127}$",
5615
- },
5616
- additionalProperties: {
5617
- type: "string",
5618
- pattern: "^[A-Za-z][A-Za-z0-9_]{0,62}$",
5619
- },
5620
- },
5621
- summaryFields: {
5622
- type: "array",
5623
- maxItems: WORKFLOW_SUMMARY_MAX_FIELDS,
5624
- uniqueItems: true,
5625
- items: dataFieldCode,
5626
- },
5627
- },
5628
- },
5629
- startAt: nonEmptyString,
5630
- inputSchema: {
5631
- type: "object",
5632
- required: ["type", "additionalProperties"],
5633
- properties: {
5634
- type: { const: "object" },
5635
- additionalProperties: { const: false },
5636
- },
5637
- },
5638
- organizationContext: {
5639
- type: "object",
5640
- additionalProperties: false,
5641
- properties: {
5642
- department: {
5643
- type: "object",
5644
- additionalProperties: false,
5645
- required: ["source"],
5646
- properties: {
5647
- source: {
5648
- enum: [
5649
- "none",
5650
- "user_primary_department",
5651
- "choose_if_multiple",
5652
- "always_choose",
5653
- "fixed",
5654
- "from_input",
5655
- "from_role_scope",
5656
- ],
5657
- },
5658
- required: { type: "boolean" },
5659
- value: { type: "string" },
5660
- path: { type: "string" },
5661
- dimension: { type: "string" },
5662
- },
5663
- },
5664
- },
5665
- },
5666
- nodes: {
5667
- type: "object",
5668
- minProperties: 1,
5669
- maxProperties: 200,
5670
- additionalProperties: workflowNodeSchema,
5671
- },
5672
- },
5673
- };
5674
- export const workflowBindingSchema = {
5675
- $id: SCHEMA_VERSIONS.workflowBinding,
5676
- type: "object",
5677
- additionalProperties: false,
5678
- required: ["schemaVersion", "workflowCode", "bindings"],
5679
- properties: {
5680
- schemaVersion: { const: SCHEMA_VERSIONS.workflowBinding },
5681
- workflowCode: nonEmptyString,
5682
- bindings: {
5683
- type: "object",
5684
- maxProperties: 200,
5685
- additionalProperties: {
5686
- type: "object",
5687
- additionalProperties: false,
5688
- required: ["provider"],
5689
- allOf: [{
5690
- if: { required: ['roleCodes'] },
5691
- then: { properties: { provider: { enum: ['app_role', 'app_role_in_scope'] } }, not: { anyOf: [{ required: ['roleCode'] }, { required: ['candidateField'] }] } },
5692
- }, {
5693
- if: { required: ['candidateField'] },
5694
- then: {
5695
- required: ['inputPath'],
5696
- properties: { provider: { const: 'form_field_users' } },
5697
- not: { anyOf: [{ required: ['roleCode'] }, { required: ['scope'] }, { required: ['routing'] }] },
5698
- },
5699
- }, {
5700
- if: { required: ['selectedInputPath'] },
5701
- then: { properties: { provider: { enum: ['app_role', 'app_role_in_scope'] } },
5702
- anyOf: [{ required: ['roleCode'] }, { required: ['roleCodes'] }],
5703
- not: { anyOf: [{ required: ['candidateField'] }, { required: ['inputPath'] }, { required: ['routing'] }] } },
5704
- }],
5705
- properties: {
5706
- provider: {
5707
- enum: [
5708
- "fixed_users",
5709
- "initiator",
5710
- "input_users",
5711
- "form_field_users",
5712
- "department_supervisor",
5713
- "app_role",
5714
- "app_role_in_scope",
5715
- "business_relation",
5716
- "previous_node_actor",
5717
- "initiator_select",
5718
- "application_provider",
5719
- ],
5720
- },
5721
- users: { type: "array", uniqueItems: true, items: nonEmptyString },
5722
- inputPath: { type: "string" },
5723
- selectedInputPath: { type: "string", maxLength: 255, pattern: "^[A-Za-z][A-Za-z0-9_-]*(?:\\.[A-Za-z][A-Za-z0-9_-]*)*$" },
5724
- candidateField: dataFieldCode,
5725
- departmentIdFrom: { type: "string" },
5726
- level: { type: "integer", minimum: 1, maximum: 20 },
5727
- fallbackToAncestorSupervisor: { type: "boolean" },
5728
- roleCode: { type: "string" },
5729
- roleCodes: workflowRoleCodesSchema,
5730
- scope: {
5731
- type: "object",
5732
- additionalProperties: false,
5733
- required: ["dimension"],
5734
- properties: {
5735
- dimension: nonEmptyString,
5736
- valueFrom: { type: "string" },
5737
- value: { type: "string" },
5738
- },
5739
- },
5740
- relationCode: { type: "string" },
5741
- resourceCode: { type: "string" },
5742
- resourceIdFrom: { type: "string" },
5743
- providerCode: { type: "string" },
5744
- min: { type: "integer", minimum: 1, maximum: 200 },
5745
- max: { type: "integer", minimum: 1, maximum: 200 },
5746
- delegatable: { type: "boolean" },
5747
- routing: workflowAssignmentRoutingPolicySchema,
5748
- },
5749
- },
5750
- },
5751
- },
5752
- };
5753
5329
  export const workflowPreparationSchema = {
5754
5330
  $id: SCHEMA_VERSIONS.workflowPreparation,
5755
5331
  type: "object",
@@ -6716,7 +6292,10 @@ export const workflowSurfaceSchema = {
6716
6292
  },
6717
6293
  },
6718
6294
  fieldPolicy: { type: "object" },
6719
- operations: { type: "array", items: { type: "object" } },
6295
+ operations: { type: "array", items: { type: "object", properties: {
6296
+ prominence: { anyOf: [{ type: "integer", minimum: 1, maximum: 1000 }, { type: "null" }] },
6297
+ consequence: { type: "string", minLength: 1, maxLength: 1000 },
6298
+ } } },
6720
6299
  extensions: { type: "object" },
6721
6300
  },
6722
6301
  };
@@ -6785,7 +6364,10 @@ export const workflowDetailSurfaceSchema = {
6785
6364
  },
6786
6365
  nodes: { type: "array", items: { type: "object" } },
6787
6366
  handlingRecords: { type: "array", items: { type: "object" } },
6788
- operations: { type: "array", items: { type: "object" } },
6367
+ operations: { type: "array", items: { type: "object", properties: {
6368
+ prominence: { anyOf: [{ type: "integer", minimum: 1, maximum: 1000 }, { type: "null" }] },
6369
+ consequence: { type: "string", minLength: 1, maxLength: 1000 },
6370
+ } } },
6789
6371
  navigationContext: {
6790
6372
  type: "object",
6791
6373
  additionalProperties: false,
@@ -8546,6 +8128,7 @@ const subjectReadSurfaceDeclarationSchema = {
8546
8128
  },
8547
8129
  },
8548
8130
  };
8131
+ import { applicationAgentDeclarationSchemaV2 } from './application-agent.js';
8549
8132
  export const configurationBundleSchema = {
8550
8133
  $id: SCHEMA_VERSIONS.configurationBundle,
8551
8134
  $defs: { appDataPolicyExpression: appDataPolicyExpressionSchema },
@@ -8566,6 +8149,7 @@ export const configurationBundleSchema = {
8566
8149
  ],
8567
8150
  properties: {
8568
8151
  schemaVersion: { const: SCHEMA_VERSIONS.configurationBundle },
8152
+ agents: { type: "array", maxItems: 20, items: applicationAgentDeclarationSchemaV2 },
8569
8153
  compilerContractVersion: {
8570
8154
  const: OPENXIANGDA_COMPILER_CONTRACT_VERSION,
8571
8155
  },