openxiangda-contracts 2.47.0 → 2.69.1

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 (177) hide show
  1. package/dist/ai.d.ts +1 -1
  2. package/dist/ai.d.ts.map +1 -1
  3. package/dist/ai.js +4 -3
  4. package/dist/ai.js.map +1 -1
  5. package/dist/browser.d.ts +13 -0
  6. package/dist/browser.d.ts.map +1 -1
  7. package/dist/browser.js +13 -0
  8. package/dist/browser.js.map +1 -1
  9. package/dist/concurrency.d.ts +3 -3
  10. package/dist/concurrency.d.ts.map +1 -1
  11. package/dist/data-field-validation.d.ts.map +1 -1
  12. package/dist/data-field-validation.js +17 -2
  13. package/dist/data-field-validation.js.map +1 -1
  14. package/dist/field-value-schemas.d.ts +1 -1
  15. package/dist/index.d.ts +17 -0
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js +17 -0
  18. package/dist/index.js.map +1 -1
  19. package/dist/native-compiler/actor-authority.d.ts +11 -0
  20. package/dist/native-compiler/actor-authority.d.ts.map +1 -0
  21. package/dist/native-compiler/actor-authority.js +56 -0
  22. package/dist/native-compiler/actor-authority.js.map +1 -0
  23. package/dist/native-compiler/artifact-capacity.d.ts +12 -0
  24. package/dist/native-compiler/artifact-capacity.d.ts.map +1 -0
  25. package/dist/native-compiler/artifact-capacity.js +34 -0
  26. package/dist/native-compiler/artifact-capacity.js.map +1 -0
  27. package/dist/native-compiler/authenticated-public-read.d.ts +18 -0
  28. package/dist/native-compiler/authenticated-public-read.d.ts.map +1 -0
  29. package/dist/native-compiler/authenticated-public-read.js +79 -0
  30. package/dist/native-compiler/authenticated-public-read.js.map +1 -0
  31. package/dist/native-compiler/compiler.d.ts +3 -22
  32. package/dist/native-compiler/compiler.d.ts.map +1 -1
  33. package/dist/native-compiler/compiler.js +441 -59
  34. package/dist/native-compiler/compiler.js.map +1 -1
  35. package/dist/native-compiler/data-business-command.d.ts +44 -0
  36. package/dist/native-compiler/data-business-command.d.ts.map +1 -0
  37. package/dist/native-compiler/data-business-command.js +88 -0
  38. package/dist/native-compiler/data-business-command.js.map +1 -0
  39. package/dist/native-compiler/data-capacity.d.ts +14 -3
  40. package/dist/native-compiler/data-capacity.d.ts.map +1 -1
  41. package/dist/native-compiler/data-capacity.js +11 -3
  42. package/dist/native-compiler/data-capacity.js.map +1 -1
  43. package/dist/native-compiler/data-field.d.ts +24 -0
  44. package/dist/native-compiler/data-field.d.ts.map +1 -1
  45. package/dist/native-compiler/data-field.js +23 -2
  46. package/dist/native-compiler/data-field.js.map +1 -1
  47. package/dist/native-compiler/data-surface.d.ts +1 -1
  48. package/dist/native-compiler/data-surface.d.ts.map +1 -1
  49. package/dist/native-compiler/data-surface.js +2 -0
  50. package/dist/native-compiler/data-surface.js.map +1 -1
  51. package/dist/native-compiler/date-event-projection.d.ts +13 -0
  52. package/dist/native-compiler/date-event-projection.d.ts.map +1 -0
  53. package/dist/native-compiler/date-event-projection.js +71 -0
  54. package/dist/native-compiler/date-event-projection.js.map +1 -0
  55. package/dist/native-compiler/declaration-capacity.d.ts +60 -0
  56. package/dist/native-compiler/declaration-capacity.d.ts.map +1 -0
  57. package/dist/native-compiler/declaration-capacity.js +32 -0
  58. package/dist/native-compiler/declaration-capacity.js.map +1 -0
  59. package/dist/native-compiler/development-backend.d.ts +84 -0
  60. package/dist/native-compiler/development-backend.d.ts.map +1 -0
  61. package/dist/native-compiler/development-backend.js +77 -0
  62. package/dist/native-compiler/development-backend.js.map +1 -0
  63. package/dist/native-compiler/development-configuration.d.ts +65 -0
  64. package/dist/native-compiler/development-configuration.d.ts.map +1 -0
  65. package/dist/native-compiler/development-configuration.js +143 -0
  66. package/dist/native-compiler/development-configuration.js.map +1 -0
  67. package/dist/native-compiler/index.cjs +6 -6
  68. package/dist/native-compiler/index.d.ts +22 -0
  69. package/dist/native-compiler/index.d.ts.map +1 -1
  70. package/dist/native-compiler/index.js +6 -6
  71. package/dist/native-compiler/managed-concurrency.js +2 -2
  72. package/dist/native-compiler/managed-concurrency.js.map +1 -1
  73. package/dist/native-compiler/record-set-guard.d.ts +5 -0
  74. package/dist/native-compiler/record-set-guard.d.ts.map +1 -0
  75. package/dist/native-compiler/record-set-guard.js +27 -0
  76. package/dist/native-compiler/record-set-guard.js.map +1 -0
  77. package/dist/native-compiler/resource-view.d.ts +4 -0
  78. package/dist/native-compiler/resource-view.d.ts.map +1 -0
  79. package/dist/native-compiler/resource-view.js +20 -0
  80. package/dist/native-compiler/resource-view.js.map +1 -0
  81. package/dist/native-compiler/unique-keys.d.ts +21 -0
  82. package/dist/native-compiler/unique-keys.d.ts.map +1 -1
  83. package/dist/native-compiler/unique-keys.js +17 -3
  84. package/dist/native-compiler/unique-keys.js.map +1 -1
  85. package/dist/native-compiler/user-candidates.d.ts +80 -0
  86. package/dist/native-compiler/user-candidates.d.ts.map +1 -0
  87. package/dist/native-compiler/user-candidates.js +197 -0
  88. package/dist/native-compiler/user-candidates.js.map +1 -0
  89. package/dist/native-compiler/workflow-approval-empty.d.ts +28 -0
  90. package/dist/native-compiler/workflow-approval-empty.d.ts.map +1 -0
  91. package/dist/native-compiler/workflow-approval-empty.js +34 -0
  92. package/dist/native-compiler/workflow-approval-empty.js.map +1 -0
  93. package/dist/native-compiler/workflow-approved-delegation.d.ts +39 -0
  94. package/dist/native-compiler/workflow-approved-delegation.d.ts.map +1 -0
  95. package/dist/native-compiler/workflow-approved-delegation.js +94 -0
  96. package/dist/native-compiler/workflow-approved-delegation.js.map +1 -0
  97. package/dist/native-compiler/workflow-business-command.d.ts +108 -0
  98. package/dist/native-compiler/workflow-business-command.d.ts.map +1 -0
  99. package/dist/native-compiler/workflow-business-command.js +62 -0
  100. package/dist/native-compiler/workflow-business-command.js.map +1 -0
  101. package/dist/native-compiler/workflow-completion-deadline.d.ts +41 -0
  102. package/dist/native-compiler/workflow-completion-deadline.d.ts.map +1 -0
  103. package/dist/native-compiler/workflow-completion-deadline.js +40 -0
  104. package/dist/native-compiler/workflow-completion-deadline.js.map +1 -0
  105. package/dist/native-compiler/workflow-correction.d.ts +16 -0
  106. package/dist/native-compiler/workflow-correction.d.ts.map +1 -0
  107. package/dist/native-compiler/workflow-correction.js +42 -0
  108. package/dist/native-compiler/workflow-correction.js.map +1 -0
  109. package/dist/native-compiler/workflow-delegation-administration.d.ts +73 -0
  110. package/dist/native-compiler/workflow-delegation-administration.d.ts.map +1 -1
  111. package/dist/native-compiler/workflow-delegation-administration.js +6 -4
  112. package/dist/native-compiler/workflow-delegation-administration.js.map +1 -1
  113. package/dist/native-compiler/workflow-graph.d.ts +21 -2
  114. package/dist/native-compiler/workflow-graph.d.ts.map +1 -1
  115. package/dist/native-compiler/workflow-graph.js +20 -3
  116. package/dist/native-compiler/workflow-graph.js.map +1 -1
  117. package/dist/native-compiler/workflow-initiator-approval.d.ts +32 -0
  118. package/dist/native-compiler/workflow-initiator-approval.d.ts.map +1 -0
  119. package/dist/native-compiler/workflow-initiator-approval.js +45 -0
  120. package/dist/native-compiler/workflow-initiator-approval.js.map +1 -0
  121. package/dist/native-compiler/workflow-instance-policy.d.ts +2 -0
  122. package/dist/native-compiler/workflow-instance-policy.d.ts.map +1 -1
  123. package/dist/native-compiler/workflow-instance-policy.js +9 -4
  124. package/dist/native-compiler/workflow-instance-policy.js.map +1 -1
  125. package/dist/native-compiler/workflow-launch-preflight.d.ts +22 -0
  126. package/dist/native-compiler/workflow-launch-preflight.d.ts.map +1 -0
  127. package/dist/native-compiler/workflow-launch-preflight.js +30 -0
  128. package/dist/native-compiler/workflow-launch-preflight.js.map +1 -0
  129. package/dist/native-compiler/workflow-native-stage.d.ts +69 -0
  130. package/dist/native-compiler/workflow-native-stage.d.ts.map +1 -0
  131. package/dist/native-compiler/workflow-native-stage.js +42 -0
  132. package/dist/native-compiler/workflow-native-stage.js.map +1 -0
  133. package/dist/native-compiler/workflow-node-administration.d.ts +11 -1
  134. package/dist/native-compiler/workflow-node-administration.d.ts.map +1 -1
  135. package/dist/native-compiler/workflow-node-administration.js +25 -5
  136. package/dist/native-compiler/workflow-node-administration.js.map +1 -1
  137. package/dist/native-compiler/workflow-owned-subject.d.ts +60 -0
  138. package/dist/native-compiler/workflow-owned-subject.d.ts.map +1 -0
  139. package/dist/native-compiler/workflow-owned-subject.js +69 -0
  140. package/dist/native-compiler/workflow-owned-subject.js.map +1 -0
  141. package/dist/native-compiler/workflow-rejection-notification.d.ts +31 -0
  142. package/dist/native-compiler/workflow-rejection-notification.d.ts.map +1 -0
  143. package/dist/native-compiler/workflow-rejection-notification.js +47 -0
  144. package/dist/native-compiler/workflow-rejection-notification.js.map +1 -0
  145. package/dist/native-compiler/workflow-role-union.d.ts +31 -0
  146. package/dist/native-compiler/workflow-role-union.d.ts.map +1 -0
  147. package/dist/native-compiler/workflow-role-union.js +38 -0
  148. package/dist/native-compiler/workflow-role-union.js.map +1 -0
  149. package/dist/native-compiler/workflow-task-page.d.ts +10 -3
  150. package/dist/native-compiler/workflow-task-page.d.ts.map +1 -1
  151. package/dist/native-compiler/workflow-task-page.js +5 -3
  152. package/dist/native-compiler/workflow-task-page.js.map +1 -1
  153. package/dist/native-version.d.ts +36 -1
  154. package/dist/native-version.d.ts.map +1 -1
  155. package/dist/native-version.js +36 -1
  156. package/dist/native-version.js.map +1 -1
  157. package/dist/native.d.ts +24 -2
  158. package/dist/native.d.ts.map +1 -1
  159. package/dist/native.js.map +1 -1
  160. package/dist/references.d.ts +2 -0
  161. package/dist/references.d.ts.map +1 -1
  162. package/dist/schemas.d.ts +10118 -5656
  163. package/dist/schemas.d.ts.map +1 -1
  164. package/dist/schemas.js +379 -17
  165. package/dist/schemas.js.map +1 -1
  166. package/dist/surface.d.ts +4 -2
  167. package/dist/surface.d.ts.map +1 -1
  168. package/dist/surface.js +1 -19
  169. package/dist/surface.js.map +1 -1
  170. package/dist/types.d.ts +371 -13
  171. package/dist/types.d.ts.map +1 -1
  172. package/dist/types.js +6 -2
  173. package/dist/types.js.map +1 -1
  174. package/dist/validation.d.ts.map +1 -1
  175. package/dist/validation.js +61 -2
  176. package/dist/validation.js.map +1 -1
  177. package/package.json +1 -1
package/dist/schemas.js CHANGED
@@ -1,6 +1,9 @@
1
+ import { NATIVE_CONTRACT_CAPACITY_V2 } from './native-compiler/declaration-capacity.js';
1
2
  import { DATA_SUBTABLE_MAX_ROWS, DATA_TRANSACTION_MAX_OPERATIONS, DATA_TRANSACTION_MAX_BYTES } from './native-compiler/data-capacity.js';
2
3
  import { nativeUniqueKeysJsonSchema } from './native-compiler/unique-keys.js';
3
4
  import { workflowAssignmentRoutingPolicySchema } from './native-compiler/workflow-assignment-routing.js';
5
+ import { workflowBusinessCommandInvocationSchema } from './native-compiler/workflow-business-command.js';
6
+ import { WORKFLOW_CONFIGURABLE_OPERATIONS } from './native-compiler/workflow-node-administration.js';
4
7
  import { DATA_AUDIT_METADATA_FIELDS } from './native-compiler/data-audit-access.js';
5
8
  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";
6
9
  import { CLI_EVENT_SCHEMA_VERSION, CLI_EVENT_TYPES, CLI_RESULT_SCHEMA_VERSION, CLI_PROTOCOL_VERSION, WORKSPACE_TEMPLATE_BINDING_SCHEMA_VERSION, } from "./cli.js";
@@ -8,6 +11,8 @@ import { aiCapabilityCatalogSchema } from "./ai.js";
8
11
  import { departmentReferenceValueSchema, resourceReferenceValueSchema, userReferenceValueSchema, } from "./field-value-schemas.js";
9
12
  import { WORKFLOW_SUMMARY_ENVELOPE_MAX_BYTES, WORKFLOW_SUMMARY_MAX_FIELDS, WORKFLOW_SUMMARY_TEXT_LONG_MAX_BYTES, } from "./workflow-summary.js";
10
13
  import { WORKFLOW_DETAIL_ENVELOPE_MAX_BYTES, WORKFLOW_DETAIL_MAX_FIELDS, WORKFLOW_DETAIL_MAX_RECORD_PROPERTIES, WORKFLOW_DETAIL_MAX_SUBTABLE_ROWS, } from "./workflow-detail.js";
14
+ import { workflowRoleCodesSchema } from './native-compiler/workflow-role-union.js';
15
+ import { workflowOwnedSubjectCreateSchema } from './native-compiler/workflow-owned-subject.js';
11
16
  const digest = { type: "string", pattern: "^[0-9a-f]{64}$" };
12
17
  const prefixedDigest = {
13
18
  type: "string",
@@ -698,6 +703,7 @@ export const currentInitiatorDirectorySnapshotSchema = {
698
703
  userId: nonEmptyString,
699
704
  displayName: nonEmptyString,
700
705
  employeeNumber: { anyOf: [nonEmptyString, { type: "null" }] },
706
+ phone: { anyOf: [{ type: "string", minLength: 1, maxLength: 80 }, { type: "null" }] },
701
707
  primaryDepartment: {
702
708
  anyOf: [directorySnapshotValueSchema, { type: "null" }],
703
709
  },
@@ -1066,6 +1072,37 @@ export const nativeAuthorizationManagementCatalogSchema = {
1066
1072
  "unrestrictedRoleCodes", "rules",
1067
1073
  ],
1068
1074
  properties: {
1075
+ workflowBindings: {
1076
+ type: "array", maxItems: 10000,
1077
+ items: {
1078
+ type: "object", additionalProperties: false,
1079
+ required: ["workflowCode", "nodeId", "roleCode", "definitionVersion", "bindingVersion", "configurationRevision", "source", "contexts"],
1080
+ properties: {
1081
+ workflowCode: nonEmptyString, nodeId: nonEmptyString, roleCode: nativeStableCode,
1082
+ definitionVersion: { type: "integer", minimum: 1 },
1083
+ bindingVersion: { type: "integer", minimum: 1 },
1084
+ configurationRevision: { type: "integer", minimum: 0 },
1085
+ source: { enum: ["default_binding", "node_override", "routing_source"] },
1086
+ contexts: { type: "array", minItems: 1, maxItems: 2, uniqueItems: true, items: { enum: ["active", "in_flight"] } },
1087
+ },
1088
+ },
1089
+ },
1090
+ candidateFields: {
1091
+ type: "array",
1092
+ maxItems: 10000,
1093
+ items: {
1094
+ type: "object",
1095
+ additionalProperties: false,
1096
+ required: ["dataLogicalRevisionId", "resourceCode", "fieldCode", "roleCode", "operation"],
1097
+ properties: {
1098
+ dataLogicalRevisionId: nonEmptyString,
1099
+ resourceCode: nativeStableCode,
1100
+ fieldCode: nonEmptyString,
1101
+ roleCode: nativeStableCode,
1102
+ operation: nonEmptyString,
1103
+ },
1104
+ },
1105
+ },
1069
1106
  dimensionCode: nativeStableCode,
1070
1107
  allRoles: { type: "boolean" },
1071
1108
  roleCodes: {
@@ -1914,6 +1951,11 @@ export const nativeScopeValuePageSchema = {
1914
1951
  nextCursor: { type: ["string", "null"] },
1915
1952
  },
1916
1953
  };
1954
+ const recordEditInputSchema = {
1955
+ type: 'object', additionalProperties: false, required: ['operationCode', 'recordId', 'expectedRevision'],
1956
+ properties: { operationCode: { type: 'string', minLength: 1, maxLength: 128 },
1957
+ recordId: { type: 'string', format: 'uuid' }, expectedRevision: { type: 'integer', minimum: 1, maximum: Number.MAX_SAFE_INTEGER } },
1958
+ };
1917
1959
  export const dataFieldSourceQuerySchema = {
1918
1960
  $id: SCHEMA_VERSIONS.dataFieldSourceQuery,
1919
1961
  type: "object",
@@ -1921,6 +1963,7 @@ export const dataFieldSourceQuerySchema = {
1921
1963
  required: ["schemaVersion", "operation"],
1922
1964
  properties: {
1923
1965
  schemaVersion: { const: SCHEMA_VERSIONS.dataFieldSourceQuery },
1966
+ action: recordEditInputSchema,
1924
1967
  operation: { enum: ["create", "update"] },
1925
1968
  launch: {
1926
1969
  type: "object", additionalProperties: false,
@@ -1928,6 +1971,7 @@ export const dataFieldSourceQuerySchema = {
1928
1971
  properties: {
1929
1972
  workflowCode: { type: "string", minLength: 1, maxLength: 128 },
1930
1973
  operationCode: { type: "string", minLength: 1, maxLength: 255 },
1974
+ subtableFieldCode: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_]{0,62}$' },
1931
1975
  },
1932
1976
  },
1933
1977
  keyword: { type: "string", maxLength: 500 },
@@ -1942,6 +1986,35 @@ export const dataFieldSourceQuerySchema = {
1942
1986
  },
1943
1987
  },
1944
1988
  };
1989
+ export const workflowTaskFieldSourceQuerySchema = {
1990
+ $id: SCHEMA_VERSIONS.workflowTaskFieldSourceQuery,
1991
+ type: 'object',
1992
+ additionalProperties: false,
1993
+ required: ['schemaVersion', 'expectedRevision', 'expectedTaskVersion'],
1994
+ properties: {
1995
+ schemaVersion: { const: SCHEMA_VERSIONS.workflowTaskFieldSourceQuery },
1996
+ expectedRevision: { type: 'integer', minimum: 1, maximum: Number.MAX_SAFE_INTEGER },
1997
+ expectedTaskVersion: { type: 'integer', minimum: 1, maximum: Number.MAX_SAFE_INTEGER },
1998
+ keyword: dataFieldSourceQuerySchema.properties.keyword,
1999
+ cursor: dataFieldSourceQuerySchema.properties.cursor,
2000
+ bindings: dataFieldSourceQuerySchema.properties.bindings,
2001
+ subtable: {
2002
+ type: 'object', additionalProperties: false, required: ['fieldCode', 'row'],
2003
+ properties: {
2004
+ fieldCode: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_]{0,62}$' },
2005
+ row: { oneOf: [
2006
+ { type: 'object', additionalProperties: false, required: ['kind', 'id', 'expectedRevision'], properties: {
2007
+ kind: { const: 'persisted' }, id: { type: 'string', format: 'uuid' },
2008
+ expectedRevision: { type: 'integer', minimum: 1, maximum: Number.MAX_SAFE_INTEGER },
2009
+ } },
2010
+ { type: 'object', additionalProperties: false, required: ['kind', 'key'], properties: {
2011
+ kind: { const: 'new' }, key: { type: 'string', pattern: '^[A-Za-z0-9][A-Za-z0-9_.:-]{0,127}$' },
2012
+ } },
2013
+ ] },
2014
+ },
2015
+ },
2016
+ },
2017
+ };
1945
2018
  export const dataFieldSourcePageSchema = {
1946
2019
  $id: SCHEMA_VERSIONS.dataFieldSourcePage,
1947
2020
  type: "object",
@@ -1974,6 +2047,74 @@ export const dataFieldSourcePageSchema = {
1974
2047
  nextCursor: { type: ["string", "null"] },
1975
2048
  },
1976
2049
  };
2050
+ const userCandidateId = { type: 'string', minLength: 1, maxLength: 255, pattern: '^\\S(?:[\\s\\S]*\\S)?$' };
2051
+ const userCandidateRevision = { type: 'integer', minimum: 1, maximum: Number.MAX_SAFE_INTEGER };
2052
+ const userCandidateSearchProperties = {
2053
+ schemaVersion: { const: SCHEMA_VERSIONS.userCandidatesQuery },
2054
+ keyword: { type: 'string', maxLength: 64 },
2055
+ cursor: { type: 'string', minLength: 1, maxLength: 2048 },
2056
+ selectedIds: { type: 'array', maxItems: 200, uniqueItems: true, items: userCandidateId },
2057
+ };
2058
+ /** Each endpoint accepts exactly one owner context, never caller-supplied role/scope. */
2059
+ export const userCandidatesQuerySchema = {
2060
+ $id: SCHEMA_VERSIONS.userCandidatesQuery,
2061
+ oneOf: [
2062
+ {
2063
+ type: 'object', additionalProperties: false, required: ['schemaVersion', 'operation'],
2064
+ properties: {
2065
+ ...userCandidateSearchProperties, operation: { const: 'create' },
2066
+ launch: dataFieldSourceQuerySchema.properties.launch,
2067
+ scopeValue: { type: 'string', minLength: 1, maxLength: 255, pattern: '^\\S(?:[\\s\\S]*\\S)?$' },
2068
+ },
2069
+ },
2070
+ {
2071
+ type: 'object', additionalProperties: false,
2072
+ required: ['schemaVersion', 'operation', 'recordId', 'expectedRevision'],
2073
+ properties: {
2074
+ ...userCandidateSearchProperties, operation: { const: 'update' },
2075
+ recordId: userCandidateId, expectedRevision: userCandidateRevision,
2076
+ action: recordEditInputSchema,
2077
+ launch: dataFieldSourceQuerySchema.properties.launch,
2078
+ },
2079
+ },
2080
+ {
2081
+ type: 'object', additionalProperties: false,
2082
+ required: ['schemaVersion', 'expectedRevision', 'expectedTaskVersion'],
2083
+ properties: {
2084
+ ...userCandidateSearchProperties, expectedRevision: userCandidateRevision,
2085
+ expectedTaskVersion: userCandidateRevision,
2086
+ },
2087
+ },
2088
+ ],
2089
+ };
2090
+ const userCandidateValue = {
2091
+ type: 'object', additionalProperties: false, required: ['value', 'label'],
2092
+ properties: { value: userCandidateId, label: { type: 'string' } },
2093
+ };
2094
+ export const userCandidatesPageSchema = {
2095
+ $id: SCHEMA_VERSIONS.userCandidatesPage,
2096
+ type: 'object', additionalProperties: false,
2097
+ required: ['schemaVersion', 'resourceCode', 'fieldCode', 'environmentHeadRevision', 'evaluatedAt', 'items', 'selected', 'nextCursor'],
2098
+ properties: {
2099
+ schemaVersion: { const: SCHEMA_VERSIONS.userCandidatesPage },
2100
+ resourceCode: nativeStableCode,
2101
+ fieldCode: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_]{0,62}$' },
2102
+ environmentHeadRevision: userCandidateRevision,
2103
+ recordRevision: userCandidateRevision,
2104
+ evaluatedAt: dateTime,
2105
+ items: { type: 'array', maxItems: 50, items: userCandidateValue },
2106
+ selected: {
2107
+ type: 'array', maxItems: 200,
2108
+ items: { oneOf: [
2109
+ { ...userCandidateValue, required: ['value', 'label', 'status'],
2110
+ properties: { ...userCandidateValue.properties, status: { const: 'valid' } } },
2111
+ { type: 'object', additionalProperties: false, required: ['value', 'status'],
2112
+ properties: { value: userCandidateId, status: { const: 'invalid' } } },
2113
+ ] },
2114
+ },
2115
+ nextCursor: { type: ['string', 'null'] },
2116
+ },
2117
+ };
1977
2118
  export const dataRefSchema = {
1978
2119
  $id: SCHEMA_VERSIONS.dataRef,
1979
2120
  type: "object",
@@ -2050,6 +2191,23 @@ const dataFieldResourceSourceFilterSchema = {
2050
2191
  },
2051
2192
  ],
2052
2193
  };
2194
+ export const dataFieldUserCandidatesSchema = {
2195
+ type: 'object', additionalProperties: false, required: ['kind', 'roleCode'],
2196
+ properties: {
2197
+ kind: { const: 'app-role' },
2198
+ roleCode: { type: 'string', minLength: 1, maxLength: 128, pattern: '^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$' },
2199
+ pageSize: { type: 'integer', minimum: 1, maximum: 50 },
2200
+ scope: { type: 'object', additionalProperties: false, required: ['dimensionCode', 'operation'],
2201
+ properties: {
2202
+ dimensionCode: { type: 'string', minLength: 1, maxLength: 128, pattern: '^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$' },
2203
+ operation: { type: 'string', minLength: 1, maxLength: 64, pattern: '^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$' },
2204
+ field: dataFieldCode, value: { type: 'string', minLength: 1, maxLength: 255, pattern: '^\\S(?:[\\s\\S]*\\S)?$' },
2205
+ creation: { const: 'prospective' },
2206
+ },
2207
+ oneOf: [{ required: ['field'], not: { required: ['value'] } }, { required: ['value'], not: { anyOf: [{ required: ['field'] }, { required: ['creation'] }] } }],
2208
+ },
2209
+ },
2210
+ };
2053
2211
  const dataFieldResourceSourceSchema = {
2054
2212
  type: "object",
2055
2213
  additionalProperties: false,
@@ -2083,6 +2241,7 @@ const dataFieldResourceSourceSchema = {
2083
2241
  },
2084
2242
  pageSize: { type: "integer", minimum: 1, maximum: 100 },
2085
2243
  loadMode: { enum: ["search", "all"] },
2244
+ clearOnBindingChange: { type: 'boolean' },
2086
2245
  },
2087
2246
  };
2088
2247
  const dataCapabilities = {
@@ -2100,6 +2259,10 @@ const dataFieldSurfaceSchema = {
2100
2259
  type: "object",
2101
2260
  additionalProperties: false,
2102
2261
  allOf: [
2262
+ {
2263
+ if: { required: ['userCandidates'] },
2264
+ then: { properties: { type: { enum: ['user.single', 'user.multiple'] } } },
2265
+ },
2103
2266
  {
2104
2267
  if: {
2105
2268
  properties: { type: { enum: ["date-range", "datetime-range"] } },
@@ -2189,6 +2352,7 @@ const dataFieldSurfaceSchema = {
2189
2352
  searchable: { type: "boolean" },
2190
2353
  sortable: { type: "boolean" },
2191
2354
  source: dataFieldResourceSourceSchema,
2355
+ userCandidates: dataFieldUserCandidatesSchema,
2192
2356
  timePrecision: { enum: ["minute", "second"] },
2193
2357
  serial: {
2194
2358
  type: "object",
@@ -2207,6 +2371,7 @@ const dataFieldSurfaceSchema = {
2207
2371
  resourceCode: dataResourceCode,
2208
2372
  foreignKey: dataFieldCode,
2209
2373
  orderField: dataFieldCode,
2374
+ minRows: { type: "integer", minimum: 0, maximum: DATA_SUBTABLE_MAX_ROWS },
2210
2375
  maxRows: { type: "integer", minimum: 1, maximum: DATA_SUBTABLE_MAX_ROWS },
2211
2376
  },
2212
2377
  },
@@ -2406,6 +2571,25 @@ export const dataResourceSchema = {
2406
2571
  appCode: nonEmptyString,
2407
2572
  code: dataResourceCode,
2408
2573
  name: nonEmptyString,
2574
+ recordComments: {
2575
+ type: 'object', additionalProperties: false, required: ['read', 'create'],
2576
+ properties: {
2577
+ read: { type: 'array', maxItems: 20, uniqueItems: true, items: nonEmptyString },
2578
+ create: { type: 'array', maxItems: 20, uniqueItems: true, items: nonEmptyString },
2579
+ },
2580
+ },
2581
+ recordDeletion: {
2582
+ type: 'object', additionalProperties: false, required: ['delete'],
2583
+ properties: { delete: { type: 'array', maxItems: 20, uniqueItems: true, items: nonEmptyString } },
2584
+ },
2585
+ recordPrint: {
2586
+ type: "object", additionalProperties: false, required: ["read"],
2587
+ properties: { read: { type: "array", maxItems: 20, uniqueItems: true, items: nonEmptyString } },
2588
+ },
2589
+ workflowHistory: {
2590
+ type: 'object', additionalProperties: false, required: ['read'],
2591
+ properties: { read: { type: 'array', maxItems: 20, uniqueItems: true, items: nonEmptyString } },
2592
+ },
2409
2593
  schema: {
2410
2594
  type: "object",
2411
2595
  additionalProperties: false,
@@ -2419,6 +2603,10 @@ export const dataResourceSchema = {
2419
2603
  type: "object",
2420
2604
  additionalProperties: false,
2421
2605
  allOf: [
2606
+ {
2607
+ if: { required: ['userCandidates'] },
2608
+ then: { properties: { type: { enum: ['user.single', 'user.multiple'] } } },
2609
+ },
2422
2610
  {
2423
2611
  if: {
2424
2612
  properties: {
@@ -2486,6 +2674,7 @@ export const dataResourceSchema = {
2486
2674
  items: { $ref: "#/$defs/dataFieldOption" },
2487
2675
  },
2488
2676
  source: dataFieldResourceSourceSchema,
2677
+ userCandidates: dataFieldUserCandidatesSchema,
2489
2678
  maxLength: { type: "integer", minimum: 1, maximum: 1000000 },
2490
2679
  precision: { type: "integer", minimum: 1, maximum: 1000 },
2491
2680
  scale: { type: "integer", minimum: 0, maximum: 1000 },
@@ -2525,6 +2714,7 @@ export const dataResourceSchema = {
2525
2714
  resourceCode: dataResourceCode,
2526
2715
  foreignKey: dataFieldCode,
2527
2716
  orderField: dataFieldCode,
2717
+ minRows: { type: "integer", minimum: 0, maximum: DATA_SUBTABLE_MAX_ROWS },
2528
2718
  maxRows: { type: "integer", minimum: 1, maximum: DATA_SUBTABLE_MAX_ROWS },
2529
2719
  },
2530
2720
  },
@@ -3374,6 +3564,52 @@ const dataTransactionOperation = {
3374
3564
  };
3375
3565
  const dataTransactionGuard = {
3376
3566
  oneOf: [
3567
+ {
3568
+ type: 'object', additionalProperties: false,
3569
+ required: ['kind', 'resourceCode', 'errorCode', 'records'],
3570
+ properties: {
3571
+ kind: { const: 'record-set-match' },
3572
+ resourceCode: dataResourceCode,
3573
+ errorCode: { type: 'string', pattern: '^OPENXIANGDA_[A-Z0-9_]{1,96}$' },
3574
+ records: {
3575
+ type: 'array', minItems: 1, maxItems: 500, uniqueItems: true,
3576
+ items: {
3577
+ type: 'object', additionalProperties: false, required: ['id', 'expectedRevision'],
3578
+ properties: {
3579
+ id: { type: 'string', pattern: '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$' },
3580
+ expectedRevision: { type: 'integer', minimum: 1, maximum: Number.MAX_SAFE_INTEGER },
3581
+ },
3582
+ },
3583
+ },
3584
+ where: { $ref: '#/$defs/dataWhere' },
3585
+ },
3586
+ },
3587
+ {
3588
+ type: 'object', additionalProperties: false,
3589
+ required: ['kind', 'errorCode', 'anyOf'],
3590
+ properties: {
3591
+ kind: { const: 'actor-authority' },
3592
+ errorCode: { type: 'string', pattern: '^OPENXIANGDA_[A-Z0-9_]{1,96}$' },
3593
+ allowAppSuperAdmin: { type: 'boolean' },
3594
+ anyOf: {
3595
+ type: 'array', minItems: 1, maxItems: 20, uniqueItems: true,
3596
+ items: {
3597
+ type: 'object', additionalProperties: false, required: ['roleCode'],
3598
+ properties: {
3599
+ roleCode: { type: 'string', pattern: '^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$', maxLength: 100 },
3600
+ scope: {
3601
+ type: 'object', additionalProperties: false, required: ['dimensionCode', 'value', 'operation'],
3602
+ properties: {
3603
+ dimensionCode: { type: 'string', pattern: '^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$', maxLength: 100 },
3604
+ value: { type: 'string', minLength: 1, maxLength: 255, pattern: '^\\S(?:[\\s\\S]*\\S)?$' },
3605
+ operation: { type: 'string', maxLength: 64, pattern: '^[A-Za-z0-9*][A-Za-z0-9*._:-]*$' },
3606
+ },
3607
+ },
3608
+ },
3609
+ },
3610
+ },
3611
+ },
3612
+ },
3377
3613
  {
3378
3614
  type: "object", additionalProperties: false,
3379
3615
  required: ["kind", "operationIndex", "field", "operator", "offsetMilliseconds", "errorCode"],
@@ -5152,9 +5388,26 @@ const workflowNodeSchema = {
5152
5388
  title: nonEmptyString,
5153
5389
  binding: nonEmptyString,
5154
5390
  mode: { enum: ["single", "any", "all", "sequence"] },
5391
+ emptyPolicy: { enum: ["block", "skip"] },
5392
+ initiatorApprovalPolicy: { enum: ["manual", "auto_approve"] },
5393
+ completionDeadline: {
5394
+ type: 'object', additionalProperties: false, required: ['afterSeconds', 'action'],
5395
+ properties: { afterSeconds: { type: 'integer', minimum: 1, maximum: 2592000 }, action: { const: 'approve' } },
5396
+ },
5155
5397
  onApprove: nonEmptyString,
5156
5398
  onReject: nonEmptyString,
5157
5399
  taskPageCode: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,63}$' },
5400
+ operationPolicy: {
5401
+ type: 'object', additionalProperties: false,
5402
+ properties: Object.fromEntries(WORKFLOW_CONFIGURABLE_OPERATIONS.map(operation => [operation, {
5403
+ type: 'object', additionalProperties: false, minProperties: 1,
5404
+ properties: {
5405
+ label: { type: 'string', minLength: 1, maxLength: 40, pattern: '^(?!.*[\\u0000-\\u001f\\u007f])(?=.*\\S).*$' },
5406
+ ...(['approve', 'reject'].includes(operation) ? { commentRequired: { type: 'boolean' } } : {}),
5407
+ ...(['transfer', 'delegate', 'add_assignee', 'return'].includes(operation) ? { reasonRequired: { type: 'boolean' } } : {}),
5408
+ },
5409
+ }])),
5410
+ },
5158
5411
  allowedOperations: {
5159
5412
  type: "array",
5160
5413
  uniqueItems: true,
@@ -5233,6 +5486,9 @@ const workflowNodeSchema = {
5233
5486
  },
5234
5487
  workflowCcNodeSchema,
5235
5488
  workflowBusinessStepNodeSchema,
5489
+ { type: 'object', additionalProperties: false, required: ['id', 'kind', 'title', 'taskPageCode', 'next'],
5490
+ properties: { id: nonEmptyString, kind: { const: 'correction' }, title: nonEmptyString,
5491
+ taskPageCode: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,63}$' }, next: nonEmptyString } },
5236
5492
  ],
5237
5493
  };
5238
5494
  export const workflowDefinitionSchema = {
@@ -5253,6 +5509,28 @@ export const workflowDefinitionSchema = {
5253
5509
  schemaVersion: { const: SCHEMA_VERSIONS.workflowDefinition },
5254
5510
  code: { type: "string", pattern: "^[A-Za-z][A-Za-z0-9_-]{0,127}$" },
5255
5511
  title: nonEmptyString,
5512
+ launchPreflight: {
5513
+ type: 'object', additionalProperties: false, required: ['requiredApprovalNodes'],
5514
+ properties: { requiredApprovalNodes: { type: 'array', minItems: 1, maxItems: 20, uniqueItems: true,
5515
+ items: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,127}$' } } },
5516
+ },
5517
+ approvedDelegation: {
5518
+ type: 'object', additionalProperties: false,
5519
+ required: ['confirmationNodeId', 'confirmer', 'requestsField', 'maxRequests'],
5520
+ properties: {
5521
+ confirmationNodeId: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,127}$' },
5522
+ confirmer: { enum: ['initiator', 'delegate'] },
5523
+ requestsField: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_]{0,62}$' },
5524
+ maxRequests: { type: 'integer', minimum: 1, maximum: 500 },
5525
+ },
5526
+ },
5527
+ commandHandlers: {
5528
+ type: 'object', additionalProperties: false, minProperties: 1,
5529
+ properties: Object.fromEntries(['approve', 'reject', 'withdraw', 'resubmit'].map(command => [command, {
5530
+ type: 'object', additionalProperties: false, required: ['operationCode'],
5531
+ properties: { operationCode: { type: 'string', pattern: '^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$' } },
5532
+ }])),
5533
+ },
5256
5534
  taskPages: {
5257
5535
  type: 'object', minProperties: 1, maxProperties: 16,
5258
5536
  propertyNames: { pattern: '^[A-Za-z][A-Za-z0-9_-]{0,63}$' },
@@ -5277,6 +5555,15 @@ export const workflowDefinitionSchema = {
5277
5555
  acceptedCommandDeactivationPolicy: {
5278
5556
  enum: ["finish-pinned", "cancel-on-deactivate"],
5279
5557
  },
5558
+ rejectionNotification: {
5559
+ type: 'object', additionalProperties: false,
5560
+ required: ['recipient', 'title', 'summary'],
5561
+ properties: {
5562
+ recipient: { const: 'record_last_modifier' },
5563
+ title: { type: 'string', minLength: 1, maxLength: 160, pattern: '\\S' },
5564
+ summary: { type: 'string', minLength: 1, maxLength: 500, pattern: '\\S' },
5565
+ },
5566
+ },
5280
5567
  instanceCommands: {
5281
5568
  type: "object",
5282
5569
  additionalProperties: false,
@@ -5285,9 +5572,10 @@ export const workflowDefinitionSchema = {
5285
5572
  withdraw: {
5286
5573
  type: "object",
5287
5574
  additionalProperties: false,
5288
- required: ["beforeFact"],
5575
+ minProperties: 1,
5289
5576
  properties: {
5290
5577
  beforeFact: { type: "string", pattern: "^[A-Za-z][A-Za-z0-9_]{0,62}$" },
5578
+ reasonRequired: { type: "boolean" },
5291
5579
  },
5292
5580
  },
5293
5581
  terminate: {
@@ -5390,6 +5678,17 @@ export const workflowBindingSchema = {
5390
5678
  type: "object",
5391
5679
  additionalProperties: false,
5392
5680
  required: ["provider"],
5681
+ allOf: [{
5682
+ if: { required: ['roleCodes'] },
5683
+ then: { properties: { provider: { enum: ['app_role', 'app_role_in_scope'] } }, not: { anyOf: [{ required: ['roleCode'] }, { required: ['candidateField'] }] } },
5684
+ }, {
5685
+ if: { required: ['candidateField'] },
5686
+ then: {
5687
+ required: ['inputPath'],
5688
+ properties: { provider: { const: 'form_field_users' } },
5689
+ not: { anyOf: [{ required: ['roleCode'] }, { required: ['scope'] }, { required: ['routing'] }] },
5690
+ },
5691
+ }],
5393
5692
  properties: {
5394
5693
  provider: {
5395
5694
  enum: [
@@ -5408,10 +5707,12 @@ export const workflowBindingSchema = {
5408
5707
  },
5409
5708
  users: { type: "array", uniqueItems: true, items: nonEmptyString },
5410
5709
  inputPath: { type: "string" },
5710
+ candidateField: dataFieldCode,
5411
5711
  departmentIdFrom: { type: "string" },
5412
5712
  level: { type: "integer", minimum: 1, maximum: 20 },
5413
5713
  fallbackToAncestorSupervisor: { type: "boolean" },
5414
5714
  roleCode: { type: "string" },
5715
+ roleCodes: workflowRoleCodesSchema,
5415
5716
  scope: {
5416
5717
  type: "object",
5417
5718
  additionalProperties: false,
@@ -5709,6 +6010,37 @@ export const businessProcessCommitSchema = {
5709
6010
  },
5710
6011
  },
5711
6012
  };
6013
+ export const businessProcessCommandWithDataSchema = {
6014
+ $id: SCHEMA_VERSIONS.businessProcessCommandWithData,
6015
+ $defs: { dataWhere: dataWhereSchema },
6016
+ 'x-openxiangda-max-bytes': DATA_TRANSACTION_MAX_BYTES,
6017
+ type: 'object',
6018
+ additionalProperties: false,
6019
+ required: ['schemaVersion', 'environmentKey', 'workflow', 'subject', 'data', 'expectedTransition'],
6020
+ allOf: [{
6021
+ if: { properties: { expectedTransition: { required: ['kind'], properties: { kind: { const: 'correction-replay' } } } } },
6022
+ then: { properties: { workflow: { properties: { target: { properties: { kind: { const: 'task' }, command: { const: 'resubmit' } } } } } } },
6023
+ }],
6024
+ properties: {
6025
+ schemaVersion: { const: SCHEMA_VERSIONS.businessProcessCommandWithData },
6026
+ environmentKey: { enum: DEPLOYMENT_ENVIRONMENTS },
6027
+ workflow: workflowBusinessCommandInvocationSchema,
6028
+ subject: {
6029
+ type: 'object', additionalProperties: false, required: ['fromOperation'],
6030
+ properties: { fromOperation: { type: 'string', minLength: 1, maxLength: 128 } },
6031
+ },
6032
+ data: businessProcessCommitSchema.properties.data,
6033
+ expectedTransition: { oneOf: [{
6034
+ type: 'object', additionalProperties: false,
6035
+ required: ['status', 'outcome', 'currentNodeId'],
6036
+ properties: {
6037
+ status: { enum: ['running', 'approved', 'rejected', 'withdrawn'] },
6038
+ outcome: { type: ['string', 'null'], maxLength: 128 },
6039
+ currentNodeId: { type: ['string', 'null'], minLength: 1, maxLength: 128 },
6040
+ },
6041
+ }, { type: 'object', additionalProperties: false, required: ['kind'], properties: { kind: { const: 'correction-replay' } } }] },
6042
+ },
6043
+ };
5712
6044
  export const standardProcessCommitSchema = {
5713
6045
  $id: SCHEMA_VERSIONS.standardProcessCommit,
5714
6046
  type: "object",
@@ -6508,6 +6840,7 @@ const workflowNamedOperationLaunchIntentSchema = {
6508
6840
  "output",
6509
6841
  ],
6510
6842
  properties: {
6843
+ ownedSubject: workflowOwnedSubjectCreateSchema,
6511
6844
  operationCode: {
6512
6845
  type: "string",
6513
6846
  pattern: "^[A-Za-z][A-Za-z0-9_.:-]{0,254}$",
@@ -6735,6 +7068,7 @@ export const workflowDelegationSchema = {
6735
7068
  appCode: nonEmptyString,
6736
7069
  environmentKey: nonEmptyString,
6737
7070
  workflowCode: { type: ["string", "null"] },
7071
+ nodeId: { type: ["string", "null"], pattern: "^[A-Za-z0-9._:-]{1,128}$" },
6738
7072
  delegatorUserId: nonEmptyString,
6739
7073
  delegateUserId: nonEmptyString,
6740
7074
  delegatorRoleSubjectKey: nonEmptyString,
@@ -6974,17 +7308,28 @@ const appPerspectiveContractSchema = {
6974
7308
  default: { type: "boolean" },
6975
7309
  },
6976
7310
  };
7311
+ import { workflowNativeStagePolicySchema } from './native-compiler/workflow-native-stage.js';
6977
7312
  const appOperationPlatformAccessSchema = {
6978
7313
  type: "object",
6979
7314
  additionalProperties: false,
6980
7315
  minProperties: 1,
6981
7316
  properties: {
7317
+ ownedSubject: workflowOwnedSubjectCreateSchema,
7318
+ workflowStage: workflowNativeStagePolicySchema,
7319
+ recordEdit: {
7320
+ type: 'object', additionalProperties: false, required: ['resourceCode', 'fieldCodes'],
7321
+ properties: { resourceCode: dataResourceCode, fieldCodes: { type: 'array', minItems: 1, maxItems: 200, uniqueItems: true, items: dataFieldCode } },
7322
+ },
7323
+ dataCommands: {
7324
+ type: 'object', additionalProperties: false, required: ['mode'],
7325
+ properties: { mode: { const: 'recoverable-native' } },
7326
+ },
6982
7327
  roleAssertions: {
6983
7328
  type: "object", additionalProperties: false, required: ["roleCodes"],
6984
7329
  properties: { roleCodes: {
6985
7330
  type: "array", minItems: 1, maxItems: 20, uniqueItems: true,
6986
7331
  items: { type: "string", pattern: "^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$", maxLength: 100 },
6987
- } },
7332
+ }, actorAuthority: { const: true } },
6988
7333
  },
6989
7334
  directory: {
6990
7335
  type: "object",
@@ -6995,7 +7340,7 @@ const appOperationPlatformAccessSchema = {
6995
7340
  fields: {
6996
7341
  type: "array",
6997
7342
  minItems: 1,
6998
- maxItems: 4,
7343
+ maxItems: 5,
6999
7344
  uniqueItems: true,
7000
7345
  items: {
7001
7346
  enum: [
@@ -7003,10 +7348,18 @@ const appOperationPlatformAccessSchema = {
7003
7348
  "employeeNumber",
7004
7349
  "primaryDepartment",
7005
7350
  "departments",
7351
+ "phone",
7006
7352
  ],
7007
7353
  },
7008
7354
  },
7009
7355
  },
7356
+ allOf: [{
7357
+ if: { properties: { mode: { const: "selected-user" } } },
7358
+ then: { properties: { fields: {
7359
+ maxItems: 4,
7360
+ items: { enum: ["displayName", "employeeNumber", "primaryDepartment", "departments"] },
7361
+ } } },
7362
+ }],
7010
7363
  },
7011
7364
  managedFiles: {
7012
7365
  type: "array",
@@ -7054,6 +7407,7 @@ const appOperationPlatformAccessSchema = {
7054
7407
  uniqueItems: true,
7055
7408
  items: stableCode,
7056
7409
  },
7410
+ businessCommands: { type: 'array', minItems: 1, maxItems: 4, uniqueItems: true, items: { enum: ['approve', 'reject', 'withdraw', 'resubmit'] } },
7057
7411
  },
7058
7412
  },
7059
7413
  decimalReservation: {
@@ -8060,6 +8414,9 @@ const appDataPolicyDeclarationSchema = {
8060
8414
  name: nonEmptyString,
8061
8415
  resourceCode: stableCode,
8062
8416
  unrestrictedRoleCodes: dataPolicyRoleCodes,
8417
+ publicRead: { type: 'object', additionalProperties: false, required: ['fields'], properties: {
8418
+ fields: { type: 'array', minItems: 1, maxItems: 1000, uniqueItems: true, items: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_]{0,62}$' } },
8419
+ } },
8063
8420
  operations: {
8064
8421
  type: "array",
8065
8422
  minItems: 1,
@@ -8094,6 +8451,7 @@ const appDataPolicyDeclarationSchema = {
8094
8451
  ],
8095
8452
  },
8096
8453
  { not: { required: ["operations", "readExpression"] } },
8454
+ { if: { required: ['publicRead'] }, then: { required: ['operations'], properties: { operations: { const: ['read'] } }, not: { anyOf: [{ required: ['readExpression'] }, { required: ['writeBoundary'] }] } } },
8097
8455
  ],
8098
8456
  };
8099
8457
  const subjectReadSurfaceDeclarationSchema = {
@@ -8209,10 +8567,10 @@ export const configurationBundleSchema = {
8209
8567
  authenticatedUserRoleCode: stableCode,
8210
8568
  capabilities: {
8211
8569
  type: "array",
8212
- maxItems: 2000,
8570
+ maxItems: NATIVE_CONTRACT_CAPACITY_V2.capabilities,
8213
8571
  items: appCapabilityDeclarationSchema,
8214
8572
  },
8215
- roles: { type: "array", maxItems: 100, items: appRoleDeclarationSchema },
8573
+ roles: { type: "array", maxItems: NATIVE_CONTRACT_CAPACITY_V2.roles, items: appRoleDeclarationSchema },
8216
8574
  scopeDimensions: {
8217
8575
  type: "array",
8218
8576
  maxItems: 100,
@@ -8235,7 +8593,7 @@ export const configurationBundleSchema = {
8235
8593
  },
8236
8594
  dataPolicies: {
8237
8595
  type: "array",
8238
- maxItems: 100,
8596
+ maxItems: NATIVE_CONTRACT_CAPACITY_V2.dataPolicies,
8239
8597
  items: appDataPolicyDeclarationSchema,
8240
8598
  },
8241
8599
  authorizationTransitions: {
@@ -8265,7 +8623,7 @@ export const configurationBundleSchema = {
8265
8623
  properties: {
8266
8624
  resources: {
8267
8625
  type: "array",
8268
- maxItems: 100,
8626
+ maxItems: NATIVE_CONTRACT_CAPACITY_V2.resources,
8269
8627
  items: { $ref: SCHEMA_VERSIONS.dataResource },
8270
8628
  },
8271
8629
  concurrency: { type: "object" },
@@ -8315,9 +8673,9 @@ export const configurationBundleSchema = {
8315
8673
  "editableParameters",
8316
8674
  ],
8317
8675
  properties: {
8318
- definitions: { type: "array", maxItems: 100, items: { type: "object" } },
8319
- bindings: { type: "array", maxItems: 100, items: { type: "object" } },
8320
- activations: { type: "array", maxItems: 100, items: { type: "object" } },
8676
+ definitions: { type: "array", maxItems: NATIVE_CONTRACT_CAPACITY_V2.workflows, items: { type: "object" } },
8677
+ bindings: { type: "array", maxItems: NATIVE_CONTRACT_CAPACITY_V2.workflows, items: { type: "object" } },
8678
+ activations: { type: "array", maxItems: NATIVE_CONTRACT_CAPACITY_V2.workflows, items: { type: "object" } },
8321
8679
  providers: { type: "array", maxItems: 100, items: { type: "object" } },
8322
8680
  editableParameters: {
8323
8681
  type: "array",
@@ -8331,7 +8689,7 @@ export const configurationBundleSchema = {
8331
8689
  additionalProperties: false,
8332
8690
  required: ["routes", "user", "admin", "devicePolicy"],
8333
8691
  properties: {
8334
- routes: { type: "array", maxItems: 500, items: appRouteDeclarationSchema },
8692
+ routes: { type: "array", maxItems: NATIVE_CONTRACT_CAPACITY_V2.routes, items: appRouteDeclarationSchema },
8335
8693
  user: {
8336
8694
  type: "object",
8337
8695
  additionalProperties: false,
@@ -8497,7 +8855,7 @@ export const applicationRouteManifestSchema = {
8497
8855
  },
8498
8856
  routes: {
8499
8857
  type: "array",
8500
- maxItems: 512,
8858
+ maxItems: NATIVE_CONTRACT_CAPACITY_V2.routes,
8501
8859
  items: appRouteManifestEntrySchema,
8502
8860
  },
8503
8861
  digest,
@@ -8541,14 +8899,14 @@ export const contractBundleSchema = {
8541
8899
  maxItems: 100,
8542
8900
  items: appPerspectiveContractSchema,
8543
8901
  },
8544
- resources: { type: "array", maxItems: 100, items: { type: "object" } },
8902
+ resources: { type: "array", maxItems: NATIVE_CONTRACT_CAPACITY_V2.resources, items: { type: "object" } },
8545
8903
  concurrency: { type: "object" },
8546
8904
  subjectReadSurfaces: {
8547
8905
  type: "array",
8548
8906
  maxItems: 50,
8549
8907
  items: subjectReadSurfaceDeclarationSchema,
8550
8908
  },
8551
- capabilities: { type: "array", maxItems: 2000, items: { type: "object" } },
8909
+ capabilities: { type: "array", maxItems: NATIVE_CONTRACT_CAPACITY_V2.capabilities, items: { type: "object" } },
8552
8910
  operations: { type: "array", maxItems: 500, items: { type: "object" } },
8553
8911
  eventConsumers: { type: "array", maxItems: 100, items: { type: "object" } },
8554
8912
  eventProducers: { type: "array", maxItems: 1000, items: { type: "object" } },
@@ -8559,8 +8917,8 @@ export const contractBundleSchema = {
8559
8917
  },
8560
8918
  eventHandlerManifest: eventHandlerManifestSchema,
8561
8919
  eventTypes: { type: "array", maxItems: 500, items: nonEmptyString },
8562
- workflows: { type: "array", maxItems: 100, items: { type: "object" } },
8563
- routes: { type: "array", maxItems: 500, items: appRouteContractSchema },
8920
+ workflows: { type: "array", maxItems: NATIVE_CONTRACT_CAPACITY_V2.workflows, items: { type: "object" } },
8921
+ routes: { type: "array", maxItems: NATIVE_CONTRACT_CAPACITY_V2.routes, items: appRouteContractSchema },
8564
8922
  authentication: {
8565
8923
  anyOf: [{ type: "null" }, applicationAuthenticationSchema],
8566
8924
  },
@@ -8571,7 +8929,7 @@ export const contractBundleSchema = {
8571
8929
  adminAccess: appRouteAccessSchema,
8572
8930
  adminPages: {
8573
8931
  type: "array",
8574
- maxItems: 500,
8932
+ maxItems: NATIVE_CONTRACT_CAPACITY_V2.adminPages,
8575
8933
  items: appAdminPageContractSchema,
8576
8934
  },
8577
8935
  adminNavigation: appAdminNavigationContractSchema,
@@ -8649,7 +9007,10 @@ export const contractSchemas = {
8649
9007
  nativeScopeValueResolveRequest: nativeScopeValueResolveRequestSchema,
8650
9008
  nativeScopeValuePage: nativeScopeValuePageSchema,
8651
9009
  dataFieldSourceQuery: dataFieldSourceQuerySchema,
9010
+ workflowTaskFieldSourceQuery: workflowTaskFieldSourceQuerySchema,
8652
9011
  dataFieldSourcePage: dataFieldSourcePageSchema,
9012
+ userCandidatesQuery: userCandidatesQuerySchema,
9013
+ userCandidatesPage: userCandidatesPageSchema,
8653
9014
  dataRef: dataRefSchema,
8654
9015
  dataResource: dataResourceSchema,
8655
9016
  dataQuery: dataQuerySchema,
@@ -8702,6 +9063,7 @@ export const contractSchemas = {
8702
9063
  workflowAssigneeRequest: workflowAssigneeRequestSchema,
8703
9064
  workflowAssigneeResponse: workflowAssigneeResponseSchema,
8704
9065
  businessProcessCommit: businessProcessCommitSchema,
9066
+ businessProcessCommandWithData: businessProcessCommandWithDataSchema,
8705
9067
  standardProcessCommit: standardProcessCommitSchema,
8706
9068
  businessProcessCommand: businessProcessCommandSchema,
8707
9069
  businessProcessReceipt: businessProcessReceiptSchema,