openxiangda-contracts 2.63.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 (144) 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 +6 -0
  6. package/dist/browser.d.ts.map +1 -1
  7. package/dist/browser.js +6 -0
  8. package/dist/browser.js.map +1 -1
  9. package/dist/concurrency.d.ts +1 -1
  10. package/dist/concurrency.d.ts.map +1 -1
  11. package/dist/data-field-validation.js +7 -2
  12. package/dist/data-field-validation.js.map +1 -1
  13. package/dist/field-value-schemas.d.ts +1 -1
  14. package/dist/index.d.ts +10 -0
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +10 -0
  17. package/dist/index.js.map +1 -1
  18. package/dist/native-compiler/actor-authority.d.ts +11 -0
  19. package/dist/native-compiler/actor-authority.d.ts.map +1 -0
  20. package/dist/native-compiler/actor-authority.js +56 -0
  21. package/dist/native-compiler/actor-authority.js.map +1 -0
  22. package/dist/native-compiler/artifact-capacity.d.ts +12 -0
  23. package/dist/native-compiler/artifact-capacity.d.ts.map +1 -0
  24. package/dist/native-compiler/artifact-capacity.js +34 -0
  25. package/dist/native-compiler/artifact-capacity.js.map +1 -0
  26. package/dist/native-compiler/authenticated-public-read.d.ts +18 -0
  27. package/dist/native-compiler/authenticated-public-read.d.ts.map +1 -0
  28. package/dist/native-compiler/authenticated-public-read.js +79 -0
  29. package/dist/native-compiler/authenticated-public-read.js.map +1 -0
  30. package/dist/native-compiler/compiler.d.ts +2 -21
  31. package/dist/native-compiler/compiler.d.ts.map +1 -1
  32. package/dist/native-compiler/compiler.js +203 -46
  33. package/dist/native-compiler/compiler.js.map +1 -1
  34. package/dist/native-compiler/data-business-command.d.ts +3 -1
  35. package/dist/native-compiler/data-business-command.d.ts.map +1 -1
  36. package/dist/native-compiler/data-business-command.js.map +1 -1
  37. package/dist/native-compiler/data-capacity.d.ts +14 -3
  38. package/dist/native-compiler/data-capacity.d.ts.map +1 -1
  39. package/dist/native-compiler/data-capacity.js +11 -3
  40. package/dist/native-compiler/data-capacity.js.map +1 -1
  41. package/dist/native-compiler/data-field.d.ts +22 -0
  42. package/dist/native-compiler/data-field.d.ts.map +1 -1
  43. package/dist/native-compiler/data-field.js +19 -2
  44. package/dist/native-compiler/data-field.js.map +1 -1
  45. package/dist/native-compiler/date-event-projection.d.ts +13 -0
  46. package/dist/native-compiler/date-event-projection.d.ts.map +1 -0
  47. package/dist/native-compiler/date-event-projection.js +71 -0
  48. package/dist/native-compiler/date-event-projection.js.map +1 -0
  49. package/dist/native-compiler/declaration-capacity.d.ts +60 -0
  50. package/dist/native-compiler/declaration-capacity.d.ts.map +1 -0
  51. package/dist/native-compiler/declaration-capacity.js +32 -0
  52. package/dist/native-compiler/declaration-capacity.js.map +1 -0
  53. package/dist/native-compiler/development-backend.d.ts +84 -0
  54. package/dist/native-compiler/development-backend.d.ts.map +1 -0
  55. package/dist/native-compiler/development-backend.js +77 -0
  56. package/dist/native-compiler/development-backend.js.map +1 -0
  57. package/dist/native-compiler/development-configuration.d.ts +65 -0
  58. package/dist/native-compiler/development-configuration.d.ts.map +1 -0
  59. package/dist/native-compiler/development-configuration.js +143 -0
  60. package/dist/native-compiler/development-configuration.js.map +1 -0
  61. package/dist/native-compiler/index.cjs +6 -6
  62. package/dist/native-compiler/index.d.ts +13 -0
  63. package/dist/native-compiler/index.d.ts.map +1 -1
  64. package/dist/native-compiler/index.js +6 -6
  65. package/dist/native-compiler/record-set-guard.d.ts +5 -0
  66. package/dist/native-compiler/record-set-guard.d.ts.map +1 -0
  67. package/dist/native-compiler/record-set-guard.js +27 -0
  68. package/dist/native-compiler/record-set-guard.js.map +1 -0
  69. package/dist/native-compiler/user-candidates.d.ts +9 -1
  70. package/dist/native-compiler/user-candidates.d.ts.map +1 -1
  71. package/dist/native-compiler/user-candidates.js +14 -1
  72. package/dist/native-compiler/user-candidates.js.map +1 -1
  73. package/dist/native-compiler/workflow-approved-delegation.d.ts +39 -0
  74. package/dist/native-compiler/workflow-approved-delegation.d.ts.map +1 -0
  75. package/dist/native-compiler/workflow-approved-delegation.js +94 -0
  76. package/dist/native-compiler/workflow-approved-delegation.js.map +1 -0
  77. package/dist/native-compiler/workflow-business-command.d.ts +2 -2
  78. package/dist/native-compiler/workflow-business-command.d.ts.map +1 -1
  79. package/dist/native-compiler/workflow-business-command.js +8 -4
  80. package/dist/native-compiler/workflow-business-command.js.map +1 -1
  81. package/dist/native-compiler/workflow-completion-deadline.d.ts +41 -0
  82. package/dist/native-compiler/workflow-completion-deadline.d.ts.map +1 -0
  83. package/dist/native-compiler/workflow-completion-deadline.js +40 -0
  84. package/dist/native-compiler/workflow-completion-deadline.js.map +1 -0
  85. package/dist/native-compiler/workflow-correction.d.ts +16 -0
  86. package/dist/native-compiler/workflow-correction.d.ts.map +1 -0
  87. package/dist/native-compiler/workflow-correction.js +42 -0
  88. package/dist/native-compiler/workflow-correction.js.map +1 -0
  89. package/dist/native-compiler/workflow-delegation-administration.d.ts +73 -0
  90. package/dist/native-compiler/workflow-delegation-administration.d.ts.map +1 -1
  91. package/dist/native-compiler/workflow-delegation-administration.js +6 -4
  92. package/dist/native-compiler/workflow-delegation-administration.js.map +1 -1
  93. package/dist/native-compiler/workflow-graph.d.ts +13 -2
  94. package/dist/native-compiler/workflow-graph.d.ts.map +1 -1
  95. package/dist/native-compiler/workflow-graph.js +20 -4
  96. package/dist/native-compiler/workflow-graph.js.map +1 -1
  97. package/dist/native-compiler/workflow-initiator-approval.d.ts +5 -1
  98. package/dist/native-compiler/workflow-initiator-approval.d.ts.map +1 -1
  99. package/dist/native-compiler/workflow-initiator-approval.js +18 -3
  100. package/dist/native-compiler/workflow-initiator-approval.js.map +1 -1
  101. package/dist/native-compiler/workflow-native-stage.d.ts +69 -0
  102. package/dist/native-compiler/workflow-native-stage.d.ts.map +1 -0
  103. package/dist/native-compiler/workflow-native-stage.js +42 -0
  104. package/dist/native-compiler/workflow-native-stage.js.map +1 -0
  105. package/dist/native-compiler/workflow-node-administration.d.ts +5 -1
  106. package/dist/native-compiler/workflow-node-administration.d.ts.map +1 -1
  107. package/dist/native-compiler/workflow-node-administration.js +17 -4
  108. package/dist/native-compiler/workflow-node-administration.js.map +1 -1
  109. package/dist/native-compiler/workflow-owned-subject.d.ts +60 -0
  110. package/dist/native-compiler/workflow-owned-subject.d.ts.map +1 -0
  111. package/dist/native-compiler/workflow-owned-subject.js +69 -0
  112. package/dist/native-compiler/workflow-owned-subject.js.map +1 -0
  113. package/dist/native-compiler/workflow-role-union.d.ts +31 -0
  114. package/dist/native-compiler/workflow-role-union.d.ts.map +1 -0
  115. package/dist/native-compiler/workflow-role-union.js +38 -0
  116. package/dist/native-compiler/workflow-role-union.js.map +1 -0
  117. package/dist/native-compiler/workflow-task-page.d.ts +10 -3
  118. package/dist/native-compiler/workflow-task-page.d.ts.map +1 -1
  119. package/dist/native-compiler/workflow-task-page.js +5 -3
  120. package/dist/native-compiler/workflow-task-page.js.map +1 -1
  121. package/dist/native-version.d.ts +20 -0
  122. package/dist/native-version.d.ts.map +1 -1
  123. package/dist/native-version.js +20 -0
  124. package/dist/native-version.js.map +1 -1
  125. package/dist/native.d.ts +9 -0
  126. package/dist/native.d.ts.map +1 -1
  127. package/dist/native.js.map +1 -1
  128. package/dist/references.d.ts +2 -0
  129. package/dist/references.d.ts.map +1 -1
  130. package/dist/schemas.d.ts +1708 -80
  131. package/dist/schemas.d.ts.map +1 -1
  132. package/dist/schemas.js +147 -27
  133. package/dist/schemas.js.map +1 -1
  134. package/dist/surface.d.ts +1 -0
  135. package/dist/surface.d.ts.map +1 -1
  136. package/dist/surface.js.map +1 -1
  137. package/dist/types.d.ts +87 -7
  138. package/dist/types.d.ts.map +1 -1
  139. package/dist/types.js +2 -2
  140. package/dist/types.js.map +1 -1
  141. package/dist/validation.d.ts.map +1 -1
  142. package/dist/validation.js +26 -0
  143. package/dist/validation.js.map +1 -1
  144. package/package.json +1 -1
package/dist/schemas.js CHANGED
@@ -1,3 +1,4 @@
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';
@@ -10,6 +11,8 @@ import { aiCapabilityCatalogSchema } from "./ai.js";
10
11
  import { departmentReferenceValueSchema, resourceReferenceValueSchema, userReferenceValueSchema, } from "./field-value-schemas.js";
11
12
  import { WORKFLOW_SUMMARY_ENVELOPE_MAX_BYTES, WORKFLOW_SUMMARY_MAX_FIELDS, WORKFLOW_SUMMARY_TEXT_LONG_MAX_BYTES, } from "./workflow-summary.js";
12
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';
13
16
  const digest = { type: "string", pattern: "^[0-9a-f]{64}$" };
14
17
  const prefixedDigest = {
15
18
  type: "string",
@@ -1968,6 +1971,7 @@ export const dataFieldSourceQuerySchema = {
1968
1971
  properties: {
1969
1972
  workflowCode: { type: "string", minLength: 1, maxLength: 128 },
1970
1973
  operationCode: { type: "string", minLength: 1, maxLength: 255 },
1974
+ subtableFieldCode: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_]{0,62}$' },
1971
1975
  },
1972
1976
  },
1973
1977
  keyword: { type: "string", maxLength: 500 },
@@ -1982,6 +1986,35 @@ export const dataFieldSourceQuerySchema = {
1982
1986
  },
1983
1987
  },
1984
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
+ };
1985
2018
  export const dataFieldSourcePageSchema = {
1986
2019
  $id: SCHEMA_VERSIONS.dataFieldSourcePage,
1987
2020
  type: "object",
@@ -2031,6 +2064,7 @@ export const userCandidatesQuerySchema = {
2031
2064
  properties: {
2032
2065
  ...userCandidateSearchProperties, operation: { const: 'create' },
2033
2066
  launch: dataFieldSourceQuerySchema.properties.launch,
2067
+ scopeValue: { type: 'string', minLength: 1, maxLength: 255, pattern: '^\\S(?:[\\s\\S]*\\S)?$' },
2034
2068
  },
2035
2069
  },
2036
2070
  {
@@ -2168,8 +2202,9 @@ export const dataFieldUserCandidatesSchema = {
2168
2202
  dimensionCode: { type: 'string', minLength: 1, maxLength: 128, pattern: '^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$' },
2169
2203
  operation: { type: 'string', minLength: 1, maxLength: 64, pattern: '^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$' },
2170
2204
  field: dataFieldCode, value: { type: 'string', minLength: 1, maxLength: 255, pattern: '^\\S(?:[\\s\\S]*\\S)?$' },
2205
+ creation: { const: 'prospective' },
2171
2206
  },
2172
- oneOf: [{ required: ['field'], not: { required: ['value'] } }, { required: ['value'], not: { required: ['field'] } }],
2207
+ oneOf: [{ required: ['field'], not: { required: ['value'] } }, { required: ['value'], not: { anyOf: [{ required: ['field'] }, { required: ['creation'] }] } }],
2173
2208
  },
2174
2209
  },
2175
2210
  };
@@ -2206,6 +2241,7 @@ const dataFieldResourceSourceSchema = {
2206
2241
  },
2207
2242
  pageSize: { type: "integer", minimum: 1, maximum: 100 },
2208
2243
  loadMode: { enum: ["search", "all"] },
2244
+ clearOnBindingChange: { type: 'boolean' },
2209
2245
  },
2210
2246
  };
2211
2247
  const dataCapabilities = {
@@ -2335,6 +2371,7 @@ const dataFieldSurfaceSchema = {
2335
2371
  resourceCode: dataResourceCode,
2336
2372
  foreignKey: dataFieldCode,
2337
2373
  orderField: dataFieldCode,
2374
+ minRows: { type: "integer", minimum: 0, maximum: DATA_SUBTABLE_MAX_ROWS },
2338
2375
  maxRows: { type: "integer", minimum: 1, maximum: DATA_SUBTABLE_MAX_ROWS },
2339
2376
  },
2340
2377
  },
@@ -2677,6 +2714,7 @@ export const dataResourceSchema = {
2677
2714
  resourceCode: dataResourceCode,
2678
2715
  foreignKey: dataFieldCode,
2679
2716
  orderField: dataFieldCode,
2717
+ minRows: { type: "integer", minimum: 0, maximum: DATA_SUBTABLE_MAX_ROWS },
2680
2718
  maxRows: { type: "integer", minimum: 1, maximum: DATA_SUBTABLE_MAX_ROWS },
2681
2719
  },
2682
2720
  },
@@ -3526,6 +3564,52 @@ const dataTransactionOperation = {
3526
3564
  };
3527
3565
  const dataTransactionGuard = {
3528
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
+ },
3529
3613
  {
3530
3614
  type: "object", additionalProperties: false,
3531
3615
  required: ["kind", "operationIndex", "field", "operator", "offsetMilliseconds", "errorCode"],
@@ -5306,6 +5390,10 @@ const workflowNodeSchema = {
5306
5390
  mode: { enum: ["single", "any", "all", "sequence"] },
5307
5391
  emptyPolicy: { enum: ["block", "skip"] },
5308
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
+ },
5309
5397
  onApprove: nonEmptyString,
5310
5398
  onReject: nonEmptyString,
5311
5399
  taskPageCode: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,63}$' },
@@ -5316,6 +5404,7 @@ const workflowNodeSchema = {
5316
5404
  properties: {
5317
5405
  label: { type: 'string', minLength: 1, maxLength: 40, pattern: '^(?!.*[\\u0000-\\u001f\\u007f])(?=.*\\S).*$' },
5318
5406
  ...(['approve', 'reject'].includes(operation) ? { commentRequired: { type: 'boolean' } } : {}),
5407
+ ...(['transfer', 'delegate', 'add_assignee', 'return'].includes(operation) ? { reasonRequired: { type: 'boolean' } } : {}),
5319
5408
  },
5320
5409
  }])),
5321
5410
  },
@@ -5397,6 +5486,9 @@ const workflowNodeSchema = {
5397
5486
  },
5398
5487
  workflowCcNodeSchema,
5399
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 } },
5400
5492
  ],
5401
5493
  };
5402
5494
  export const workflowDefinitionSchema = {
@@ -5422,9 +5514,19 @@ export const workflowDefinitionSchema = {
5422
5514
  properties: { requiredApprovalNodes: { type: 'array', minItems: 1, maxItems: 20, uniqueItems: true,
5423
5515
  items: { type: 'string', pattern: '^[A-Za-z][A-Za-z0-9_-]{0,127}$' } } },
5424
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
+ },
5425
5527
  commandHandlers: {
5426
5528
  type: 'object', additionalProperties: false, minProperties: 1,
5427
- properties: Object.fromEntries(['approve', 'reject', 'withdraw'].map(command => [command, {
5529
+ properties: Object.fromEntries(['approve', 'reject', 'withdraw', 'resubmit'].map(command => [command, {
5428
5530
  type: 'object', additionalProperties: false, required: ['operationCode'],
5429
5531
  properties: { operationCode: { type: 'string', pattern: '^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$' } },
5430
5532
  }])),
@@ -5577,6 +5679,9 @@ export const workflowBindingSchema = {
5577
5679
  additionalProperties: false,
5578
5680
  required: ["provider"],
5579
5681
  allOf: [{
5682
+ if: { required: ['roleCodes'] },
5683
+ then: { properties: { provider: { enum: ['app_role', 'app_role_in_scope'] } }, not: { anyOf: [{ required: ['roleCode'] }, { required: ['candidateField'] }] } },
5684
+ }, {
5580
5685
  if: { required: ['candidateField'] },
5581
5686
  then: {
5582
5687
  required: ['inputPath'],
@@ -5607,6 +5712,7 @@ export const workflowBindingSchema = {
5607
5712
  level: { type: "integer", minimum: 1, maximum: 20 },
5608
5713
  fallbackToAncestorSupervisor: { type: "boolean" },
5609
5714
  roleCode: { type: "string" },
5715
+ roleCodes: workflowRoleCodesSchema,
5610
5716
  scope: {
5611
5717
  type: "object",
5612
5718
  additionalProperties: false,
@@ -5911,6 +6017,10 @@ export const businessProcessCommandWithDataSchema = {
5911
6017
  type: 'object',
5912
6018
  additionalProperties: false,
5913
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
+ }],
5914
6024
  properties: {
5915
6025
  schemaVersion: { const: SCHEMA_VERSIONS.businessProcessCommandWithData },
5916
6026
  environmentKey: { enum: DEPLOYMENT_ENVIRONMENTS },
@@ -5920,15 +6030,15 @@ export const businessProcessCommandWithDataSchema = {
5920
6030
  properties: { fromOperation: { type: 'string', minLength: 1, maxLength: 128 } },
5921
6031
  },
5922
6032
  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
- },
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' } } }] },
5932
6042
  },
5933
6043
  };
5934
6044
  export const standardProcessCommitSchema = {
@@ -6730,6 +6840,7 @@ const workflowNamedOperationLaunchIntentSchema = {
6730
6840
  "output",
6731
6841
  ],
6732
6842
  properties: {
6843
+ ownedSubject: workflowOwnedSubjectCreateSchema,
6733
6844
  operationCode: {
6734
6845
  type: "string",
6735
6846
  pattern: "^[A-Za-z][A-Za-z0-9_.:-]{0,254}$",
@@ -6957,6 +7068,7 @@ export const workflowDelegationSchema = {
6957
7068
  appCode: nonEmptyString,
6958
7069
  environmentKey: nonEmptyString,
6959
7070
  workflowCode: { type: ["string", "null"] },
7071
+ nodeId: { type: ["string", "null"], pattern: "^[A-Za-z0-9._:-]{1,128}$" },
6960
7072
  delegatorUserId: nonEmptyString,
6961
7073
  delegateUserId: nonEmptyString,
6962
7074
  delegatorRoleSubjectKey: nonEmptyString,
@@ -7196,11 +7308,14 @@ const appPerspectiveContractSchema = {
7196
7308
  default: { type: "boolean" },
7197
7309
  },
7198
7310
  };
7311
+ import { workflowNativeStagePolicySchema } from './native-compiler/workflow-native-stage.js';
7199
7312
  const appOperationPlatformAccessSchema = {
7200
7313
  type: "object",
7201
7314
  additionalProperties: false,
7202
7315
  minProperties: 1,
7203
7316
  properties: {
7317
+ ownedSubject: workflowOwnedSubjectCreateSchema,
7318
+ workflowStage: workflowNativeStagePolicySchema,
7204
7319
  recordEdit: {
7205
7320
  type: 'object', additionalProperties: false, required: ['resourceCode', 'fieldCodes'],
7206
7321
  properties: { resourceCode: dataResourceCode, fieldCodes: { type: 'array', minItems: 1, maxItems: 200, uniqueItems: true, items: dataFieldCode } },
@@ -7214,7 +7329,7 @@ const appOperationPlatformAccessSchema = {
7214
7329
  properties: { roleCodes: {
7215
7330
  type: "array", minItems: 1, maxItems: 20, uniqueItems: true,
7216
7331
  items: { type: "string", pattern: "^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$", maxLength: 100 },
7217
- } },
7332
+ }, actorAuthority: { const: true } },
7218
7333
  },
7219
7334
  directory: {
7220
7335
  type: "object",
@@ -7292,7 +7407,7 @@ const appOperationPlatformAccessSchema = {
7292
7407
  uniqueItems: true,
7293
7408
  items: stableCode,
7294
7409
  },
7295
- businessCommands: { type: 'array', minItems: 1, maxItems: 3, uniqueItems: true, items: { enum: ['approve', 'reject', 'withdraw'] } },
7410
+ businessCommands: { type: 'array', minItems: 1, maxItems: 4, uniqueItems: true, items: { enum: ['approve', 'reject', 'withdraw', 'resubmit'] } },
7296
7411
  },
7297
7412
  },
7298
7413
  decimalReservation: {
@@ -8299,6 +8414,9 @@ const appDataPolicyDeclarationSchema = {
8299
8414
  name: nonEmptyString,
8300
8415
  resourceCode: stableCode,
8301
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
+ } },
8302
8420
  operations: {
8303
8421
  type: "array",
8304
8422
  minItems: 1,
@@ -8333,6 +8451,7 @@ const appDataPolicyDeclarationSchema = {
8333
8451
  ],
8334
8452
  },
8335
8453
  { not: { required: ["operations", "readExpression"] } },
8454
+ { if: { required: ['publicRead'] }, then: { required: ['operations'], properties: { operations: { const: ['read'] } }, not: { anyOf: [{ required: ['readExpression'] }, { required: ['writeBoundary'] }] } } },
8336
8455
  ],
8337
8456
  };
8338
8457
  const subjectReadSurfaceDeclarationSchema = {
@@ -8448,10 +8567,10 @@ export const configurationBundleSchema = {
8448
8567
  authenticatedUserRoleCode: stableCode,
8449
8568
  capabilities: {
8450
8569
  type: "array",
8451
- maxItems: 2000,
8570
+ maxItems: NATIVE_CONTRACT_CAPACITY_V2.capabilities,
8452
8571
  items: appCapabilityDeclarationSchema,
8453
8572
  },
8454
- roles: { type: "array", maxItems: 100, items: appRoleDeclarationSchema },
8573
+ roles: { type: "array", maxItems: NATIVE_CONTRACT_CAPACITY_V2.roles, items: appRoleDeclarationSchema },
8455
8574
  scopeDimensions: {
8456
8575
  type: "array",
8457
8576
  maxItems: 100,
@@ -8474,7 +8593,7 @@ export const configurationBundleSchema = {
8474
8593
  },
8475
8594
  dataPolicies: {
8476
8595
  type: "array",
8477
- maxItems: 100,
8596
+ maxItems: NATIVE_CONTRACT_CAPACITY_V2.dataPolicies,
8478
8597
  items: appDataPolicyDeclarationSchema,
8479
8598
  },
8480
8599
  authorizationTransitions: {
@@ -8504,7 +8623,7 @@ export const configurationBundleSchema = {
8504
8623
  properties: {
8505
8624
  resources: {
8506
8625
  type: "array",
8507
- maxItems: 100,
8626
+ maxItems: NATIVE_CONTRACT_CAPACITY_V2.resources,
8508
8627
  items: { $ref: SCHEMA_VERSIONS.dataResource },
8509
8628
  },
8510
8629
  concurrency: { type: "object" },
@@ -8554,9 +8673,9 @@ export const configurationBundleSchema = {
8554
8673
  "editableParameters",
8555
8674
  ],
8556
8675
  properties: {
8557
- definitions: { type: "array", maxItems: 100, items: { type: "object" } },
8558
- bindings: { type: "array", maxItems: 100, items: { type: "object" } },
8559
- 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" } },
8560
8679
  providers: { type: "array", maxItems: 100, items: { type: "object" } },
8561
8680
  editableParameters: {
8562
8681
  type: "array",
@@ -8570,7 +8689,7 @@ export const configurationBundleSchema = {
8570
8689
  additionalProperties: false,
8571
8690
  required: ["routes", "user", "admin", "devicePolicy"],
8572
8691
  properties: {
8573
- routes: { type: "array", maxItems: 500, items: appRouteDeclarationSchema },
8692
+ routes: { type: "array", maxItems: NATIVE_CONTRACT_CAPACITY_V2.routes, items: appRouteDeclarationSchema },
8574
8693
  user: {
8575
8694
  type: "object",
8576
8695
  additionalProperties: false,
@@ -8736,7 +8855,7 @@ export const applicationRouteManifestSchema = {
8736
8855
  },
8737
8856
  routes: {
8738
8857
  type: "array",
8739
- maxItems: 512,
8858
+ maxItems: NATIVE_CONTRACT_CAPACITY_V2.routes,
8740
8859
  items: appRouteManifestEntrySchema,
8741
8860
  },
8742
8861
  digest,
@@ -8780,14 +8899,14 @@ export const contractBundleSchema = {
8780
8899
  maxItems: 100,
8781
8900
  items: appPerspectiveContractSchema,
8782
8901
  },
8783
- resources: { type: "array", maxItems: 100, items: { type: "object" } },
8902
+ resources: { type: "array", maxItems: NATIVE_CONTRACT_CAPACITY_V2.resources, items: { type: "object" } },
8784
8903
  concurrency: { type: "object" },
8785
8904
  subjectReadSurfaces: {
8786
8905
  type: "array",
8787
8906
  maxItems: 50,
8788
8907
  items: subjectReadSurfaceDeclarationSchema,
8789
8908
  },
8790
- capabilities: { type: "array", maxItems: 2000, items: { type: "object" } },
8909
+ capabilities: { type: "array", maxItems: NATIVE_CONTRACT_CAPACITY_V2.capabilities, items: { type: "object" } },
8791
8910
  operations: { type: "array", maxItems: 500, items: { type: "object" } },
8792
8911
  eventConsumers: { type: "array", maxItems: 100, items: { type: "object" } },
8793
8912
  eventProducers: { type: "array", maxItems: 1000, items: { type: "object" } },
@@ -8798,8 +8917,8 @@ export const contractBundleSchema = {
8798
8917
  },
8799
8918
  eventHandlerManifest: eventHandlerManifestSchema,
8800
8919
  eventTypes: { type: "array", maxItems: 500, items: nonEmptyString },
8801
- workflows: { type: "array", maxItems: 100, items: { type: "object" } },
8802
- 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 },
8803
8922
  authentication: {
8804
8923
  anyOf: [{ type: "null" }, applicationAuthenticationSchema],
8805
8924
  },
@@ -8810,7 +8929,7 @@ export const contractBundleSchema = {
8810
8929
  adminAccess: appRouteAccessSchema,
8811
8930
  adminPages: {
8812
8931
  type: "array",
8813
- maxItems: 500,
8932
+ maxItems: NATIVE_CONTRACT_CAPACITY_V2.adminPages,
8814
8933
  items: appAdminPageContractSchema,
8815
8934
  },
8816
8935
  adminNavigation: appAdminNavigationContractSchema,
@@ -8888,6 +9007,7 @@ export const contractSchemas = {
8888
9007
  nativeScopeValueResolveRequest: nativeScopeValueResolveRequestSchema,
8889
9008
  nativeScopeValuePage: nativeScopeValuePageSchema,
8890
9009
  dataFieldSourceQuery: dataFieldSourceQuerySchema,
9010
+ workflowTaskFieldSourceQuery: workflowTaskFieldSourceQuerySchema,
8891
9011
  dataFieldSourcePage: dataFieldSourcePageSchema,
8892
9012
  userCandidatesQuery: userCandidatesQuerySchema,
8893
9013
  userCandidatesPage: userCandidatesPageSchema,