openxiangda-contracts 2.43.0 → 2.63.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 (114) hide show
  1. package/dist/browser.d.ts +8 -0
  2. package/dist/browser.d.ts.map +1 -1
  3. package/dist/browser.js +8 -0
  4. package/dist/browser.js.map +1 -1
  5. package/dist/concurrency.d.ts +2 -2
  6. package/dist/concurrency.d.ts.map +1 -1
  7. package/dist/data-field-validation.d.ts.map +1 -1
  8. package/dist/data-field-validation.js +13 -2
  9. package/dist/data-field-validation.js.map +1 -1
  10. package/dist/field-value-schemas.d.ts +1 -1
  11. package/dist/field-value-schemas.d.ts.map +1 -1
  12. package/dist/field-value-schemas.js +2 -1
  13. package/dist/field-value-schemas.js.map +1 -1
  14. package/dist/index.d.ts +8 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +8 -0
  17. package/dist/index.js.map +1 -1
  18. package/dist/native-compiler/compiler.d.ts +1 -1
  19. package/dist/native-compiler/compiler.d.ts.map +1 -1
  20. package/dist/native-compiler/compiler.js +266 -22
  21. package/dist/native-compiler/compiler.js.map +1 -1
  22. package/dist/native-compiler/data-business-command.d.ts +42 -0
  23. package/dist/native-compiler/data-business-command.d.ts.map +1 -0
  24. package/dist/native-compiler/data-business-command.js +88 -0
  25. package/dist/native-compiler/data-business-command.js.map +1 -0
  26. package/dist/native-compiler/data-capacity.d.ts +8 -0
  27. package/dist/native-compiler/data-capacity.d.ts.map +1 -0
  28. package/dist/native-compiler/data-capacity.js +15 -0
  29. package/dist/native-compiler/data-capacity.js.map +1 -0
  30. package/dist/native-compiler/data-field.d.ts +2 -0
  31. package/dist/native-compiler/data-field.d.ts.map +1 -1
  32. package/dist/native-compiler/data-field.js +7 -2
  33. package/dist/native-compiler/data-field.js.map +1 -1
  34. package/dist/native-compiler/data-surface.d.ts +1 -1
  35. package/dist/native-compiler/data-surface.d.ts.map +1 -1
  36. package/dist/native-compiler/data-surface.js +2 -0
  37. package/dist/native-compiler/data-surface.js.map +1 -1
  38. package/dist/native-compiler/index.cjs +5 -5
  39. package/dist/native-compiler/index.d.ts +10 -0
  40. package/dist/native-compiler/index.d.ts.map +1 -1
  41. package/dist/native-compiler/index.js +5 -5
  42. package/dist/native-compiler/managed-concurrency.js +2 -2
  43. package/dist/native-compiler/managed-concurrency.js.map +1 -1
  44. package/dist/native-compiler/resource-view.d.ts +4 -0
  45. package/dist/native-compiler/resource-view.d.ts.map +1 -0
  46. package/dist/native-compiler/resource-view.js +20 -0
  47. package/dist/native-compiler/resource-view.js.map +1 -0
  48. package/dist/native-compiler/unique-keys.d.ts +21 -0
  49. package/dist/native-compiler/unique-keys.d.ts.map +1 -1
  50. package/dist/native-compiler/unique-keys.js +17 -3
  51. package/dist/native-compiler/unique-keys.js.map +1 -1
  52. package/dist/native-compiler/user-candidates.d.ts +72 -0
  53. package/dist/native-compiler/user-candidates.d.ts.map +1 -0
  54. package/dist/native-compiler/user-candidates.js +184 -0
  55. package/dist/native-compiler/user-candidates.js.map +1 -0
  56. package/dist/native-compiler/workflow-approval-empty.d.ts +28 -0
  57. package/dist/native-compiler/workflow-approval-empty.d.ts.map +1 -0
  58. package/dist/native-compiler/workflow-approval-empty.js +34 -0
  59. package/dist/native-compiler/workflow-approval-empty.js.map +1 -0
  60. package/dist/native-compiler/workflow-business-command.d.ts +108 -0
  61. package/dist/native-compiler/workflow-business-command.d.ts.map +1 -0
  62. package/dist/native-compiler/workflow-business-command.js +58 -0
  63. package/dist/native-compiler/workflow-business-command.js.map +1 -0
  64. package/dist/native-compiler/workflow-graph.d.ts +8 -0
  65. package/dist/native-compiler/workflow-graph.d.ts.map +1 -1
  66. package/dist/native-compiler/workflow-graph.js +1 -0
  67. package/dist/native-compiler/workflow-graph.js.map +1 -1
  68. package/dist/native-compiler/workflow-initiator-approval.d.ts +28 -0
  69. package/dist/native-compiler/workflow-initiator-approval.d.ts.map +1 -0
  70. package/dist/native-compiler/workflow-initiator-approval.js +30 -0
  71. package/dist/native-compiler/workflow-initiator-approval.js.map +1 -0
  72. package/dist/native-compiler/workflow-instance-policy.d.ts +2 -0
  73. package/dist/native-compiler/workflow-instance-policy.d.ts.map +1 -1
  74. package/dist/native-compiler/workflow-instance-policy.js +9 -4
  75. package/dist/native-compiler/workflow-instance-policy.js.map +1 -1
  76. package/dist/native-compiler/workflow-launch-preflight.d.ts +22 -0
  77. package/dist/native-compiler/workflow-launch-preflight.d.ts.map +1 -0
  78. package/dist/native-compiler/workflow-launch-preflight.js +30 -0
  79. package/dist/native-compiler/workflow-launch-preflight.js.map +1 -0
  80. package/dist/native-compiler/workflow-node-administration.d.ts +6 -0
  81. package/dist/native-compiler/workflow-node-administration.d.ts.map +1 -1
  82. package/dist/native-compiler/workflow-node-administration.js +9 -2
  83. package/dist/native-compiler/workflow-node-administration.js.map +1 -1
  84. package/dist/native-compiler/workflow-rejection-notification.d.ts +31 -0
  85. package/dist/native-compiler/workflow-rejection-notification.d.ts.map +1 -0
  86. package/dist/native-compiler/workflow-rejection-notification.js +47 -0
  87. package/dist/native-compiler/workflow-rejection-notification.js.map +1 -0
  88. package/dist/native-compiler/workflow-task-page.d.ts +44 -3
  89. package/dist/native-compiler/workflow-task-page.d.ts.map +1 -1
  90. package/dist/native-compiler/workflow-task-page.js +108 -9
  91. package/dist/native-compiler/workflow-task-page.js.map +1 -1
  92. package/dist/native-version.d.ts +19 -1
  93. package/dist/native-version.d.ts.map +1 -1
  94. package/dist/native-version.js +19 -1
  95. package/dist/native-version.js.map +1 -1
  96. package/dist/native.d.ts +15 -2
  97. package/dist/native.d.ts.map +1 -1
  98. package/dist/native.js.map +1 -1
  99. package/dist/schemas.d.ts +3048 -212
  100. package/dist/schemas.d.ts.map +1 -1
  101. package/dist/schemas.js +253 -9
  102. package/dist/schemas.js.map +1 -1
  103. package/dist/surface.d.ts +3 -2
  104. package/dist/surface.d.ts.map +1 -1
  105. package/dist/surface.js +1 -19
  106. package/dist/surface.js.map +1 -1
  107. package/dist/types.d.ts +286 -8
  108. package/dist/types.d.ts.map +1 -1
  109. package/dist/types.js +4 -0
  110. package/dist/types.js.map +1 -1
  111. package/dist/validation.d.ts.map +1 -1
  112. package/dist/validation.js +42 -5
  113. package/dist/validation.js.map +1 -1
  114. package/package.json +1 -1
package/dist/schemas.js CHANGED
@@ -1,5 +1,8 @@
1
+ import { DATA_SUBTABLE_MAX_ROWS, DATA_TRANSACTION_MAX_OPERATIONS, DATA_TRANSACTION_MAX_BYTES } from './native-compiler/data-capacity.js';
1
2
  import { nativeUniqueKeysJsonSchema } from './native-compiler/unique-keys.js';
2
3
  import { workflowAssignmentRoutingPolicySchema } from './native-compiler/workflow-assignment-routing.js';
4
+ import { workflowBusinessCommandInvocationSchema } from './native-compiler/workflow-business-command.js';
5
+ import { WORKFLOW_CONFIGURABLE_OPERATIONS } from './native-compiler/workflow-node-administration.js';
3
6
  import { DATA_AUDIT_METADATA_FIELDS } from './native-compiler/data-audit-access.js';
4
7
  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";
5
8
  import { CLI_EVENT_SCHEMA_VERSION, CLI_EVENT_TYPES, CLI_RESULT_SCHEMA_VERSION, CLI_PROTOCOL_VERSION, WORKSPACE_TEMPLATE_BINDING_SCHEMA_VERSION, } from "./cli.js";
@@ -697,6 +700,7 @@ export const currentInitiatorDirectorySnapshotSchema = {
697
700
  userId: nonEmptyString,
698
701
  displayName: nonEmptyString,
699
702
  employeeNumber: { anyOf: [nonEmptyString, { type: "null" }] },
703
+ phone: { anyOf: [{ type: "string", minLength: 1, maxLength: 80 }, { type: "null" }] },
700
704
  primaryDepartment: {
701
705
  anyOf: [directorySnapshotValueSchema, { type: "null" }],
702
706
  },
@@ -1065,6 +1069,37 @@ export const nativeAuthorizationManagementCatalogSchema = {
1065
1069
  "unrestrictedRoleCodes", "rules",
1066
1070
  ],
1067
1071
  properties: {
1072
+ workflowBindings: {
1073
+ type: "array", maxItems: 10000,
1074
+ items: {
1075
+ type: "object", additionalProperties: false,
1076
+ required: ["workflowCode", "nodeId", "roleCode", "definitionVersion", "bindingVersion", "configurationRevision", "source", "contexts"],
1077
+ properties: {
1078
+ workflowCode: nonEmptyString, nodeId: nonEmptyString, roleCode: nativeStableCode,
1079
+ definitionVersion: { type: "integer", minimum: 1 },
1080
+ bindingVersion: { type: "integer", minimum: 1 },
1081
+ configurationRevision: { type: "integer", minimum: 0 },
1082
+ source: { enum: ["default_binding", "node_override", "routing_source"] },
1083
+ contexts: { type: "array", minItems: 1, maxItems: 2, uniqueItems: true, items: { enum: ["active", "in_flight"] } },
1084
+ },
1085
+ },
1086
+ },
1087
+ candidateFields: {
1088
+ type: "array",
1089
+ maxItems: 10000,
1090
+ items: {
1091
+ type: "object",
1092
+ additionalProperties: false,
1093
+ required: ["dataLogicalRevisionId", "resourceCode", "fieldCode", "roleCode", "operation"],
1094
+ properties: {
1095
+ dataLogicalRevisionId: nonEmptyString,
1096
+ resourceCode: nativeStableCode,
1097
+ fieldCode: nonEmptyString,
1098
+ roleCode: nativeStableCode,
1099
+ operation: nonEmptyString,
1100
+ },
1101
+ },
1102
+ },
1068
1103
  dimensionCode: nativeStableCode,
1069
1104
  allRoles: { type: "boolean" },
1070
1105
  roleCodes: {
@@ -1913,6 +1948,11 @@ export const nativeScopeValuePageSchema = {
1913
1948
  nextCursor: { type: ["string", "null"] },
1914
1949
  },
1915
1950
  };
1951
+ const recordEditInputSchema = {
1952
+ type: 'object', additionalProperties: false, required: ['operationCode', 'recordId', 'expectedRevision'],
1953
+ properties: { operationCode: { type: 'string', minLength: 1, maxLength: 128 },
1954
+ recordId: { type: 'string', format: 'uuid' }, expectedRevision: { type: 'integer', minimum: 1, maximum: Number.MAX_SAFE_INTEGER } },
1955
+ };
1916
1956
  export const dataFieldSourceQuerySchema = {
1917
1957
  $id: SCHEMA_VERSIONS.dataFieldSourceQuery,
1918
1958
  type: "object",
@@ -1920,6 +1960,7 @@ export const dataFieldSourceQuerySchema = {
1920
1960
  required: ["schemaVersion", "operation"],
1921
1961
  properties: {
1922
1962
  schemaVersion: { const: SCHEMA_VERSIONS.dataFieldSourceQuery },
1963
+ action: recordEditInputSchema,
1923
1964
  operation: { enum: ["create", "update"] },
1924
1965
  launch: {
1925
1966
  type: "object", additionalProperties: false,
@@ -1973,6 +2014,73 @@ export const dataFieldSourcePageSchema = {
1973
2014
  nextCursor: { type: ["string", "null"] },
1974
2015
  },
1975
2016
  };
2017
+ const userCandidateId = { type: 'string', minLength: 1, maxLength: 255, pattern: '^\\S(?:[\\s\\S]*\\S)?$' };
2018
+ const userCandidateRevision = { type: 'integer', minimum: 1, maximum: Number.MAX_SAFE_INTEGER };
2019
+ const userCandidateSearchProperties = {
2020
+ schemaVersion: { const: SCHEMA_VERSIONS.userCandidatesQuery },
2021
+ keyword: { type: 'string', maxLength: 64 },
2022
+ cursor: { type: 'string', minLength: 1, maxLength: 2048 },
2023
+ selectedIds: { type: 'array', maxItems: 200, uniqueItems: true, items: userCandidateId },
2024
+ };
2025
+ /** Each endpoint accepts exactly one owner context, never caller-supplied role/scope. */
2026
+ export const userCandidatesQuerySchema = {
2027
+ $id: SCHEMA_VERSIONS.userCandidatesQuery,
2028
+ oneOf: [
2029
+ {
2030
+ type: 'object', additionalProperties: false, required: ['schemaVersion', 'operation'],
2031
+ properties: {
2032
+ ...userCandidateSearchProperties, operation: { const: 'create' },
2033
+ launch: dataFieldSourceQuerySchema.properties.launch,
2034
+ },
2035
+ },
2036
+ {
2037
+ type: 'object', additionalProperties: false,
2038
+ required: ['schemaVersion', 'operation', 'recordId', 'expectedRevision'],
2039
+ properties: {
2040
+ ...userCandidateSearchProperties, operation: { const: 'update' },
2041
+ recordId: userCandidateId, expectedRevision: userCandidateRevision,
2042
+ action: recordEditInputSchema,
2043
+ launch: dataFieldSourceQuerySchema.properties.launch,
2044
+ },
2045
+ },
2046
+ {
2047
+ type: 'object', additionalProperties: false,
2048
+ required: ['schemaVersion', 'expectedRevision', 'expectedTaskVersion'],
2049
+ properties: {
2050
+ ...userCandidateSearchProperties, expectedRevision: userCandidateRevision,
2051
+ expectedTaskVersion: userCandidateRevision,
2052
+ },
2053
+ },
2054
+ ],
2055
+ };
2056
+ const userCandidateValue = {
2057
+ type: 'object', additionalProperties: false, required: ['value', 'label'],
2058
+ properties: { value: userCandidateId, label: { type: 'string' } },
2059
+ };
2060
+ export const userCandidatesPageSchema = {
2061
+ $id: SCHEMA_VERSIONS.userCandidatesPage,
2062
+ type: 'object', additionalProperties: false,
2063
+ required: ['schemaVersion', 'resourceCode', 'fieldCode', 'environmentHeadRevision', 'evaluatedAt', 'items', 'selected', 'nextCursor'],
2064
+ properties: {
2065
+ schemaVersion: { const: SCHEMA_VERSIONS.userCandidatesPage },
2066
+ resourceCode: nativeStableCode,
2067
+ fieldCode: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_]{0,62}$' },
2068
+ environmentHeadRevision: userCandidateRevision,
2069
+ recordRevision: userCandidateRevision,
2070
+ evaluatedAt: dateTime,
2071
+ items: { type: 'array', maxItems: 50, items: userCandidateValue },
2072
+ selected: {
2073
+ type: 'array', maxItems: 200,
2074
+ items: { oneOf: [
2075
+ { ...userCandidateValue, required: ['value', 'label', 'status'],
2076
+ properties: { ...userCandidateValue.properties, status: { const: 'valid' } } },
2077
+ { type: 'object', additionalProperties: false, required: ['value', 'status'],
2078
+ properties: { value: userCandidateId, status: { const: 'invalid' } } },
2079
+ ] },
2080
+ },
2081
+ nextCursor: { type: ['string', 'null'] },
2082
+ },
2083
+ };
1976
2084
  export const dataRefSchema = {
1977
2085
  $id: SCHEMA_VERSIONS.dataRef,
1978
2086
  type: "object",
@@ -2049,6 +2157,22 @@ const dataFieldResourceSourceFilterSchema = {
2049
2157
  },
2050
2158
  ],
2051
2159
  };
2160
+ export const dataFieldUserCandidatesSchema = {
2161
+ type: 'object', additionalProperties: false, required: ['kind', 'roleCode'],
2162
+ properties: {
2163
+ kind: { const: 'app-role' },
2164
+ roleCode: { type: 'string', minLength: 1, maxLength: 128, pattern: '^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$' },
2165
+ pageSize: { type: 'integer', minimum: 1, maximum: 50 },
2166
+ scope: { type: 'object', additionalProperties: false, required: ['dimensionCode', 'operation'],
2167
+ properties: {
2168
+ dimensionCode: { type: 'string', minLength: 1, maxLength: 128, pattern: '^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$' },
2169
+ operation: { type: 'string', minLength: 1, maxLength: 64, pattern: '^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$' },
2170
+ field: dataFieldCode, value: { type: 'string', minLength: 1, maxLength: 255, pattern: '^\\S(?:[\\s\\S]*\\S)?$' },
2171
+ },
2172
+ oneOf: [{ required: ['field'], not: { required: ['value'] } }, { required: ['value'], not: { required: ['field'] } }],
2173
+ },
2174
+ },
2175
+ };
2052
2176
  const dataFieldResourceSourceSchema = {
2053
2177
  type: "object",
2054
2178
  additionalProperties: false,
@@ -2099,6 +2223,10 @@ const dataFieldSurfaceSchema = {
2099
2223
  type: "object",
2100
2224
  additionalProperties: false,
2101
2225
  allOf: [
2226
+ {
2227
+ if: { required: ['userCandidates'] },
2228
+ then: { properties: { type: { enum: ['user.single', 'user.multiple'] } } },
2229
+ },
2102
2230
  {
2103
2231
  if: {
2104
2232
  properties: { type: { enum: ["date-range", "datetime-range"] } },
@@ -2188,6 +2316,7 @@ const dataFieldSurfaceSchema = {
2188
2316
  searchable: { type: "boolean" },
2189
2317
  sortable: { type: "boolean" },
2190
2318
  source: dataFieldResourceSourceSchema,
2319
+ userCandidates: dataFieldUserCandidatesSchema,
2191
2320
  timePrecision: { enum: ["minute", "second"] },
2192
2321
  serial: {
2193
2322
  type: "object",
@@ -2206,7 +2335,7 @@ const dataFieldSurfaceSchema = {
2206
2335
  resourceCode: dataResourceCode,
2207
2336
  foreignKey: dataFieldCode,
2208
2337
  orderField: dataFieldCode,
2209
- maxRows: { type: "integer", minimum: 1, maximum: 49 },
2338
+ maxRows: { type: "integer", minimum: 1, maximum: DATA_SUBTABLE_MAX_ROWS },
2210
2339
  },
2211
2340
  },
2212
2341
  },
@@ -2405,6 +2534,25 @@ export const dataResourceSchema = {
2405
2534
  appCode: nonEmptyString,
2406
2535
  code: dataResourceCode,
2407
2536
  name: nonEmptyString,
2537
+ recordComments: {
2538
+ type: 'object', additionalProperties: false, required: ['read', 'create'],
2539
+ properties: {
2540
+ read: { type: 'array', maxItems: 20, uniqueItems: true, items: nonEmptyString },
2541
+ create: { type: 'array', maxItems: 20, uniqueItems: true, items: nonEmptyString },
2542
+ },
2543
+ },
2544
+ recordDeletion: {
2545
+ type: 'object', additionalProperties: false, required: ['delete'],
2546
+ properties: { delete: { type: 'array', maxItems: 20, uniqueItems: true, items: nonEmptyString } },
2547
+ },
2548
+ recordPrint: {
2549
+ type: "object", additionalProperties: false, required: ["read"],
2550
+ properties: { read: { type: "array", maxItems: 20, uniqueItems: true, items: nonEmptyString } },
2551
+ },
2552
+ workflowHistory: {
2553
+ type: 'object', additionalProperties: false, required: ['read'],
2554
+ properties: { read: { type: 'array', maxItems: 20, uniqueItems: true, items: nonEmptyString } },
2555
+ },
2408
2556
  schema: {
2409
2557
  type: "object",
2410
2558
  additionalProperties: false,
@@ -2418,6 +2566,10 @@ export const dataResourceSchema = {
2418
2566
  type: "object",
2419
2567
  additionalProperties: false,
2420
2568
  allOf: [
2569
+ {
2570
+ if: { required: ['userCandidates'] },
2571
+ then: { properties: { type: { enum: ['user.single', 'user.multiple'] } } },
2572
+ },
2421
2573
  {
2422
2574
  if: {
2423
2575
  properties: {
@@ -2485,6 +2637,7 @@ export const dataResourceSchema = {
2485
2637
  items: { $ref: "#/$defs/dataFieldOption" },
2486
2638
  },
2487
2639
  source: dataFieldResourceSourceSchema,
2640
+ userCandidates: dataFieldUserCandidatesSchema,
2488
2641
  maxLength: { type: "integer", minimum: 1, maximum: 1000000 },
2489
2642
  precision: { type: "integer", minimum: 1, maximum: 1000 },
2490
2643
  scale: { type: "integer", minimum: 0, maximum: 1000 },
@@ -2524,7 +2677,7 @@ export const dataResourceSchema = {
2524
2677
  resourceCode: dataResourceCode,
2525
2678
  foreignKey: dataFieldCode,
2526
2679
  orderField: dataFieldCode,
2527
- maxRows: { type: "integer", minimum: 1, maximum: 49 },
2680
+ maxRows: { type: "integer", minimum: 1, maximum: DATA_SUBTABLE_MAX_ROWS },
2528
2681
  },
2529
2682
  },
2530
2683
  },
@@ -3280,7 +3433,7 @@ const dataTransactionOperationReference = {
3280
3433
  additionalProperties: false,
3281
3434
  required: ["operationIndex", "field"],
3282
3435
  properties: {
3283
- operationIndex: { type: "integer", minimum: 0, maximum: 99 },
3436
+ operationIndex: { type: "integer", minimum: 0, maximum: DATA_TRANSACTION_MAX_OPERATIONS - 1 },
3284
3437
  field: { const: "id" },
3285
3438
  },
3286
3439
  };
@@ -3378,7 +3531,7 @@ const dataTransactionGuard = {
3378
3531
  required: ["kind", "operationIndex", "field", "operator", "offsetMilliseconds", "errorCode"],
3379
3532
  properties: {
3380
3533
  kind: { const: "operation-time" },
3381
- operationIndex: { type: "integer", minimum: 0, maximum: 99 },
3534
+ operationIndex: { type: "integer", minimum: 0, maximum: DATA_TRANSACTION_MAX_OPERATIONS - 1 },
3382
3535
  field: dataFieldCode,
3383
3536
  operator: { enum: ["eq", "neq", "gt", "gte", "lt", "lte"] },
3384
3537
  offsetMilliseconds: { type: "integer", minimum: -31622400000, maximum: 31622400000 },
@@ -3581,6 +3734,7 @@ const dataTransactionGuard = {
3581
3734
  };
3582
3735
  export const dataTransactionRequestSchema = {
3583
3736
  $id: SCHEMA_VERSIONS.dataTransactionRequest,
3737
+ "x-openxiangda-max-bytes": DATA_TRANSACTION_MAX_BYTES,
3584
3738
  $defs: { dataWhere: dataWhereSchema },
3585
3739
  type: "object",
3586
3740
  additionalProperties: false,
@@ -3594,7 +3748,7 @@ export const dataTransactionRequestSchema = {
3594
3748
  properties: {
3595
3749
  reservationKey: { type: "string", minLength: 1, maxLength: 128 },
3596
3750
  transitionKey: { type: "string", minLength: 1, maxLength: 128 },
3597
- childOperationIndex: { type: "integer", minimum: 0, maximum: 99 },
3751
+ childOperationIndex: { type: "integer", minimum: 0, maximum: DATA_TRANSACTION_MAX_OPERATIONS - 1 },
3598
3752
  },
3599
3753
  },
3600
3754
  guards: {
@@ -3605,7 +3759,7 @@ export const dataTransactionRequestSchema = {
3605
3759
  operations: {
3606
3760
  type: "array",
3607
3761
  minItems: 1,
3608
- maxItems: 100,
3762
+ maxItems: DATA_TRANSACTION_MAX_OPERATIONS,
3609
3763
  items: dataTransactionOperation,
3610
3764
  },
3611
3765
  },
@@ -3622,7 +3776,7 @@ export const dataTransactionResultSchema = {
3622
3776
  replayed: { type: "boolean" },
3623
3777
  items: {
3624
3778
  type: "array",
3625
- maxItems: 100,
3779
+ maxItems: DATA_TRANSACTION_MAX_OPERATIONS,
3626
3780
  items: {
3627
3781
  oneOf: [
3628
3782
  {
@@ -5150,9 +5304,21 @@ const workflowNodeSchema = {
5150
5304
  title: nonEmptyString,
5151
5305
  binding: nonEmptyString,
5152
5306
  mode: { enum: ["single", "any", "all", "sequence"] },
5307
+ emptyPolicy: { enum: ["block", "skip"] },
5308
+ initiatorApprovalPolicy: { enum: ["manual", "auto_approve"] },
5153
5309
  onApprove: nonEmptyString,
5154
5310
  onReject: nonEmptyString,
5155
5311
  taskPageCode: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,63}$' },
5312
+ operationPolicy: {
5313
+ type: 'object', additionalProperties: false,
5314
+ properties: Object.fromEntries(WORKFLOW_CONFIGURABLE_OPERATIONS.map(operation => [operation, {
5315
+ type: 'object', additionalProperties: false, minProperties: 1,
5316
+ properties: {
5317
+ label: { type: 'string', minLength: 1, maxLength: 40, pattern: '^(?!.*[\\u0000-\\u001f\\u007f])(?=.*\\S).*$' },
5318
+ ...(['approve', 'reject'].includes(operation) ? { commentRequired: { type: 'boolean' } } : {}),
5319
+ },
5320
+ }])),
5321
+ },
5156
5322
  allowedOperations: {
5157
5323
  type: "array",
5158
5324
  uniqueItems: true,
@@ -5251,6 +5417,18 @@ export const workflowDefinitionSchema = {
5251
5417
  schemaVersion: { const: SCHEMA_VERSIONS.workflowDefinition },
5252
5418
  code: { type: "string", pattern: "^[A-Za-z][A-Za-z0-9_-]{0,127}$" },
5253
5419
  title: nonEmptyString,
5420
+ launchPreflight: {
5421
+ type: 'object', additionalProperties: false, required: ['requiredApprovalNodes'],
5422
+ properties: { requiredApprovalNodes: { type: 'array', minItems: 1, maxItems: 20, uniqueItems: true,
5423
+ items: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,127}$' } } },
5424
+ },
5425
+ commandHandlers: {
5426
+ type: 'object', additionalProperties: false, minProperties: 1,
5427
+ properties: Object.fromEntries(['approve', 'reject', 'withdraw'].map(command => [command, {
5428
+ type: 'object', additionalProperties: false, required: ['operationCode'],
5429
+ properties: { operationCode: { type: 'string', pattern: '^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$' } },
5430
+ }])),
5431
+ },
5254
5432
  taskPages: {
5255
5433
  type: 'object', minProperties: 1, maxProperties: 16,
5256
5434
  propertyNames: { pattern: '^[A-Za-z][A-Za-z0-9_-]{0,63}$' },
@@ -5275,6 +5453,15 @@ export const workflowDefinitionSchema = {
5275
5453
  acceptedCommandDeactivationPolicy: {
5276
5454
  enum: ["finish-pinned", "cancel-on-deactivate"],
5277
5455
  },
5456
+ rejectionNotification: {
5457
+ type: 'object', additionalProperties: false,
5458
+ required: ['recipient', 'title', 'summary'],
5459
+ properties: {
5460
+ recipient: { const: 'record_last_modifier' },
5461
+ title: { type: 'string', minLength: 1, maxLength: 160, pattern: '\\S' },
5462
+ summary: { type: 'string', minLength: 1, maxLength: 500, pattern: '\\S' },
5463
+ },
5464
+ },
5278
5465
  instanceCommands: {
5279
5466
  type: "object",
5280
5467
  additionalProperties: false,
@@ -5283,9 +5470,10 @@ export const workflowDefinitionSchema = {
5283
5470
  withdraw: {
5284
5471
  type: "object",
5285
5472
  additionalProperties: false,
5286
- required: ["beforeFact"],
5473
+ minProperties: 1,
5287
5474
  properties: {
5288
5475
  beforeFact: { type: "string", pattern: "^[A-Za-z][A-Za-z0-9_]{0,62}$" },
5476
+ reasonRequired: { type: "boolean" },
5289
5477
  },
5290
5478
  },
5291
5479
  terminate: {
@@ -5388,6 +5576,14 @@ export const workflowBindingSchema = {
5388
5576
  type: "object",
5389
5577
  additionalProperties: false,
5390
5578
  required: ["provider"],
5579
+ allOf: [{
5580
+ if: { required: ['candidateField'] },
5581
+ then: {
5582
+ required: ['inputPath'],
5583
+ properties: { provider: { const: 'form_field_users' } },
5584
+ not: { anyOf: [{ required: ['roleCode'] }, { required: ['scope'] }, { required: ['routing'] }] },
5585
+ },
5586
+ }],
5391
5587
  properties: {
5392
5588
  provider: {
5393
5589
  enum: [
@@ -5406,6 +5602,7 @@ export const workflowBindingSchema = {
5406
5602
  },
5407
5603
  users: { type: "array", uniqueItems: true, items: nonEmptyString },
5408
5604
  inputPath: { type: "string" },
5605
+ candidateField: dataFieldCode,
5409
5606
  departmentIdFrom: { type: "string" },
5410
5607
  level: { type: "integer", minimum: 1, maximum: 20 },
5411
5608
  fallbackToAncestorSupervisor: { type: "boolean" },
@@ -5707,6 +5904,33 @@ export const businessProcessCommitSchema = {
5707
5904
  },
5708
5905
  },
5709
5906
  };
5907
+ export const businessProcessCommandWithDataSchema = {
5908
+ $id: SCHEMA_VERSIONS.businessProcessCommandWithData,
5909
+ $defs: { dataWhere: dataWhereSchema },
5910
+ 'x-openxiangda-max-bytes': DATA_TRANSACTION_MAX_BYTES,
5911
+ type: 'object',
5912
+ additionalProperties: false,
5913
+ required: ['schemaVersion', 'environmentKey', 'workflow', 'subject', 'data', 'expectedTransition'],
5914
+ properties: {
5915
+ schemaVersion: { const: SCHEMA_VERSIONS.businessProcessCommandWithData },
5916
+ environmentKey: { enum: DEPLOYMENT_ENVIRONMENTS },
5917
+ workflow: workflowBusinessCommandInvocationSchema,
5918
+ subject: {
5919
+ type: 'object', additionalProperties: false, required: ['fromOperation'],
5920
+ properties: { fromOperation: { type: 'string', minLength: 1, maxLength: 128 } },
5921
+ },
5922
+ data: businessProcessCommitSchema.properties.data,
5923
+ expectedTransition: {
5924
+ type: 'object', additionalProperties: false,
5925
+ required: ['status', 'outcome', 'currentNodeId'],
5926
+ properties: {
5927
+ status: { enum: ['running', 'approved', 'rejected', 'withdrawn'] },
5928
+ outcome: { type: ['string', 'null'], maxLength: 128 },
5929
+ currentNodeId: { type: ['string', 'null'], minLength: 1, maxLength: 128 },
5930
+ },
5931
+ },
5932
+ },
5933
+ };
5710
5934
  export const standardProcessCommitSchema = {
5711
5935
  $id: SCHEMA_VERSIONS.standardProcessCommit,
5712
5936
  type: "object",
@@ -6977,6 +7201,14 @@ const appOperationPlatformAccessSchema = {
6977
7201
  additionalProperties: false,
6978
7202
  minProperties: 1,
6979
7203
  properties: {
7204
+ recordEdit: {
7205
+ type: 'object', additionalProperties: false, required: ['resourceCode', 'fieldCodes'],
7206
+ properties: { resourceCode: dataResourceCode, fieldCodes: { type: 'array', minItems: 1, maxItems: 200, uniqueItems: true, items: dataFieldCode } },
7207
+ },
7208
+ dataCommands: {
7209
+ type: 'object', additionalProperties: false, required: ['mode'],
7210
+ properties: { mode: { const: 'recoverable-native' } },
7211
+ },
6980
7212
  roleAssertions: {
6981
7213
  type: "object", additionalProperties: false, required: ["roleCodes"],
6982
7214
  properties: { roleCodes: {
@@ -6993,7 +7225,7 @@ const appOperationPlatformAccessSchema = {
6993
7225
  fields: {
6994
7226
  type: "array",
6995
7227
  minItems: 1,
6996
- maxItems: 4,
7228
+ maxItems: 5,
6997
7229
  uniqueItems: true,
6998
7230
  items: {
6999
7231
  enum: [
@@ -7001,10 +7233,18 @@ const appOperationPlatformAccessSchema = {
7001
7233
  "employeeNumber",
7002
7234
  "primaryDepartment",
7003
7235
  "departments",
7236
+ "phone",
7004
7237
  ],
7005
7238
  },
7006
7239
  },
7007
7240
  },
7241
+ allOf: [{
7242
+ if: { properties: { mode: { const: "selected-user" } } },
7243
+ then: { properties: { fields: {
7244
+ maxItems: 4,
7245
+ items: { enum: ["displayName", "employeeNumber", "primaryDepartment", "departments"] },
7246
+ } } },
7247
+ }],
7008
7248
  },
7009
7249
  managedFiles: {
7010
7250
  type: "array",
@@ -7052,6 +7292,7 @@ const appOperationPlatformAccessSchema = {
7052
7292
  uniqueItems: true,
7053
7293
  items: stableCode,
7054
7294
  },
7295
+ businessCommands: { type: 'array', minItems: 1, maxItems: 3, uniqueItems: true, items: { enum: ['approve', 'reject', 'withdraw'] } },
7055
7296
  },
7056
7297
  },
7057
7298
  decimalReservation: {
@@ -8648,6 +8889,8 @@ export const contractSchemas = {
8648
8889
  nativeScopeValuePage: nativeScopeValuePageSchema,
8649
8890
  dataFieldSourceQuery: dataFieldSourceQuerySchema,
8650
8891
  dataFieldSourcePage: dataFieldSourcePageSchema,
8892
+ userCandidatesQuery: userCandidatesQuerySchema,
8893
+ userCandidatesPage: userCandidatesPageSchema,
8651
8894
  dataRef: dataRefSchema,
8652
8895
  dataResource: dataResourceSchema,
8653
8896
  dataQuery: dataQuerySchema,
@@ -8700,6 +8943,7 @@ export const contractSchemas = {
8700
8943
  workflowAssigneeRequest: workflowAssigneeRequestSchema,
8701
8944
  workflowAssigneeResponse: workflowAssigneeResponseSchema,
8702
8945
  businessProcessCommit: businessProcessCommitSchema,
8946
+ businessProcessCommandWithData: businessProcessCommandWithDataSchema,
8703
8947
  standardProcessCommit: standardProcessCommitSchema,
8704
8948
  businessProcessCommand: businessProcessCommandSchema,
8705
8949
  businessProcessReceipt: businessProcessReceiptSchema,