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.
- package/dist/ai.d.ts +1 -1
- package/dist/ai.d.ts.map +1 -1
- package/dist/ai.js +4 -3
- package/dist/ai.js.map +1 -1
- package/dist/browser.d.ts +13 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +13 -0
- package/dist/browser.js.map +1 -1
- package/dist/concurrency.d.ts +3 -3
- package/dist/concurrency.d.ts.map +1 -1
- package/dist/data-field-validation.d.ts.map +1 -1
- package/dist/data-field-validation.js +17 -2
- package/dist/data-field-validation.js.map +1 -1
- package/dist/field-value-schemas.d.ts +1 -1
- package/dist/index.d.ts +17 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -1
- package/dist/native-compiler/actor-authority.d.ts +11 -0
- package/dist/native-compiler/actor-authority.d.ts.map +1 -0
- package/dist/native-compiler/actor-authority.js +56 -0
- package/dist/native-compiler/actor-authority.js.map +1 -0
- package/dist/native-compiler/artifact-capacity.d.ts +12 -0
- package/dist/native-compiler/artifact-capacity.d.ts.map +1 -0
- package/dist/native-compiler/artifact-capacity.js +34 -0
- package/dist/native-compiler/artifact-capacity.js.map +1 -0
- package/dist/native-compiler/authenticated-public-read.d.ts +18 -0
- package/dist/native-compiler/authenticated-public-read.d.ts.map +1 -0
- package/dist/native-compiler/authenticated-public-read.js +79 -0
- package/dist/native-compiler/authenticated-public-read.js.map +1 -0
- package/dist/native-compiler/compiler.d.ts +3 -22
- package/dist/native-compiler/compiler.d.ts.map +1 -1
- package/dist/native-compiler/compiler.js +441 -59
- package/dist/native-compiler/compiler.js.map +1 -1
- package/dist/native-compiler/data-business-command.d.ts +44 -0
- package/dist/native-compiler/data-business-command.d.ts.map +1 -0
- package/dist/native-compiler/data-business-command.js +88 -0
- package/dist/native-compiler/data-business-command.js.map +1 -0
- package/dist/native-compiler/data-capacity.d.ts +14 -3
- package/dist/native-compiler/data-capacity.d.ts.map +1 -1
- package/dist/native-compiler/data-capacity.js +11 -3
- package/dist/native-compiler/data-capacity.js.map +1 -1
- package/dist/native-compiler/data-field.d.ts +24 -0
- package/dist/native-compiler/data-field.d.ts.map +1 -1
- package/dist/native-compiler/data-field.js +23 -2
- package/dist/native-compiler/data-field.js.map +1 -1
- package/dist/native-compiler/data-surface.d.ts +1 -1
- package/dist/native-compiler/data-surface.d.ts.map +1 -1
- package/dist/native-compiler/data-surface.js +2 -0
- package/dist/native-compiler/data-surface.js.map +1 -1
- package/dist/native-compiler/date-event-projection.d.ts +13 -0
- package/dist/native-compiler/date-event-projection.d.ts.map +1 -0
- package/dist/native-compiler/date-event-projection.js +71 -0
- package/dist/native-compiler/date-event-projection.js.map +1 -0
- package/dist/native-compiler/declaration-capacity.d.ts +60 -0
- package/dist/native-compiler/declaration-capacity.d.ts.map +1 -0
- package/dist/native-compiler/declaration-capacity.js +32 -0
- package/dist/native-compiler/declaration-capacity.js.map +1 -0
- package/dist/native-compiler/development-backend.d.ts +84 -0
- package/dist/native-compiler/development-backend.d.ts.map +1 -0
- package/dist/native-compiler/development-backend.js +77 -0
- package/dist/native-compiler/development-backend.js.map +1 -0
- package/dist/native-compiler/development-configuration.d.ts +65 -0
- package/dist/native-compiler/development-configuration.d.ts.map +1 -0
- package/dist/native-compiler/development-configuration.js +143 -0
- package/dist/native-compiler/development-configuration.js.map +1 -0
- package/dist/native-compiler/index.cjs +6 -6
- package/dist/native-compiler/index.d.ts +22 -0
- package/dist/native-compiler/index.d.ts.map +1 -1
- package/dist/native-compiler/index.js +6 -6
- package/dist/native-compiler/managed-concurrency.js +2 -2
- package/dist/native-compiler/managed-concurrency.js.map +1 -1
- package/dist/native-compiler/record-set-guard.d.ts +5 -0
- package/dist/native-compiler/record-set-guard.d.ts.map +1 -0
- package/dist/native-compiler/record-set-guard.js +27 -0
- package/dist/native-compiler/record-set-guard.js.map +1 -0
- package/dist/native-compiler/resource-view.d.ts +4 -0
- package/dist/native-compiler/resource-view.d.ts.map +1 -0
- package/dist/native-compiler/resource-view.js +20 -0
- package/dist/native-compiler/resource-view.js.map +1 -0
- package/dist/native-compiler/unique-keys.d.ts +21 -0
- package/dist/native-compiler/unique-keys.d.ts.map +1 -1
- package/dist/native-compiler/unique-keys.js +17 -3
- package/dist/native-compiler/unique-keys.js.map +1 -1
- package/dist/native-compiler/user-candidates.d.ts +80 -0
- package/dist/native-compiler/user-candidates.d.ts.map +1 -0
- package/dist/native-compiler/user-candidates.js +197 -0
- package/dist/native-compiler/user-candidates.js.map +1 -0
- package/dist/native-compiler/workflow-approval-empty.d.ts +28 -0
- package/dist/native-compiler/workflow-approval-empty.d.ts.map +1 -0
- package/dist/native-compiler/workflow-approval-empty.js +34 -0
- package/dist/native-compiler/workflow-approval-empty.js.map +1 -0
- package/dist/native-compiler/workflow-approved-delegation.d.ts +39 -0
- package/dist/native-compiler/workflow-approved-delegation.d.ts.map +1 -0
- package/dist/native-compiler/workflow-approved-delegation.js +94 -0
- package/dist/native-compiler/workflow-approved-delegation.js.map +1 -0
- package/dist/native-compiler/workflow-business-command.d.ts +108 -0
- package/dist/native-compiler/workflow-business-command.d.ts.map +1 -0
- package/dist/native-compiler/workflow-business-command.js +62 -0
- package/dist/native-compiler/workflow-business-command.js.map +1 -0
- package/dist/native-compiler/workflow-completion-deadline.d.ts +41 -0
- package/dist/native-compiler/workflow-completion-deadline.d.ts.map +1 -0
- package/dist/native-compiler/workflow-completion-deadline.js +40 -0
- package/dist/native-compiler/workflow-completion-deadline.js.map +1 -0
- package/dist/native-compiler/workflow-correction.d.ts +16 -0
- package/dist/native-compiler/workflow-correction.d.ts.map +1 -0
- package/dist/native-compiler/workflow-correction.js +42 -0
- package/dist/native-compiler/workflow-correction.js.map +1 -0
- package/dist/native-compiler/workflow-delegation-administration.d.ts +73 -0
- package/dist/native-compiler/workflow-delegation-administration.d.ts.map +1 -1
- package/dist/native-compiler/workflow-delegation-administration.js +6 -4
- package/dist/native-compiler/workflow-delegation-administration.js.map +1 -1
- package/dist/native-compiler/workflow-graph.d.ts +21 -2
- package/dist/native-compiler/workflow-graph.d.ts.map +1 -1
- package/dist/native-compiler/workflow-graph.js +20 -3
- package/dist/native-compiler/workflow-graph.js.map +1 -1
- package/dist/native-compiler/workflow-initiator-approval.d.ts +32 -0
- package/dist/native-compiler/workflow-initiator-approval.d.ts.map +1 -0
- package/dist/native-compiler/workflow-initiator-approval.js +45 -0
- package/dist/native-compiler/workflow-initiator-approval.js.map +1 -0
- package/dist/native-compiler/workflow-instance-policy.d.ts +2 -0
- package/dist/native-compiler/workflow-instance-policy.d.ts.map +1 -1
- package/dist/native-compiler/workflow-instance-policy.js +9 -4
- package/dist/native-compiler/workflow-instance-policy.js.map +1 -1
- package/dist/native-compiler/workflow-launch-preflight.d.ts +22 -0
- package/dist/native-compiler/workflow-launch-preflight.d.ts.map +1 -0
- package/dist/native-compiler/workflow-launch-preflight.js +30 -0
- package/dist/native-compiler/workflow-launch-preflight.js.map +1 -0
- package/dist/native-compiler/workflow-native-stage.d.ts +69 -0
- package/dist/native-compiler/workflow-native-stage.d.ts.map +1 -0
- package/dist/native-compiler/workflow-native-stage.js +42 -0
- package/dist/native-compiler/workflow-native-stage.js.map +1 -0
- package/dist/native-compiler/workflow-node-administration.d.ts +11 -1
- package/dist/native-compiler/workflow-node-administration.d.ts.map +1 -1
- package/dist/native-compiler/workflow-node-administration.js +25 -5
- package/dist/native-compiler/workflow-node-administration.js.map +1 -1
- package/dist/native-compiler/workflow-owned-subject.d.ts +60 -0
- package/dist/native-compiler/workflow-owned-subject.d.ts.map +1 -0
- package/dist/native-compiler/workflow-owned-subject.js +69 -0
- package/dist/native-compiler/workflow-owned-subject.js.map +1 -0
- package/dist/native-compiler/workflow-rejection-notification.d.ts +31 -0
- package/dist/native-compiler/workflow-rejection-notification.d.ts.map +1 -0
- package/dist/native-compiler/workflow-rejection-notification.js +47 -0
- package/dist/native-compiler/workflow-rejection-notification.js.map +1 -0
- package/dist/native-compiler/workflow-role-union.d.ts +31 -0
- package/dist/native-compiler/workflow-role-union.d.ts.map +1 -0
- package/dist/native-compiler/workflow-role-union.js +38 -0
- package/dist/native-compiler/workflow-role-union.js.map +1 -0
- package/dist/native-compiler/workflow-task-page.d.ts +10 -3
- package/dist/native-compiler/workflow-task-page.d.ts.map +1 -1
- package/dist/native-compiler/workflow-task-page.js +5 -3
- package/dist/native-compiler/workflow-task-page.js.map +1 -1
- package/dist/native-version.d.ts +36 -1
- package/dist/native-version.d.ts.map +1 -1
- package/dist/native-version.js +36 -1
- package/dist/native-version.js.map +1 -1
- package/dist/native.d.ts +24 -2
- package/dist/native.d.ts.map +1 -1
- package/dist/native.js.map +1 -1
- package/dist/references.d.ts +2 -0
- package/dist/references.d.ts.map +1 -1
- package/dist/schemas.d.ts +10118 -5656
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +379 -17
- package/dist/schemas.js.map +1 -1
- package/dist/surface.d.ts +4 -2
- package/dist/surface.d.ts.map +1 -1
- package/dist/surface.js +1 -19
- package/dist/surface.js.map +1 -1
- package/dist/types.d.ts +371 -13
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +6 -2
- package/dist/types.js.map +1 -1
- package/dist/validation.d.ts.map +1 -1
- package/dist/validation.js +61 -2
- package/dist/validation.js.map +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { PLATFORM_CAPABILITY_CONTRACT_VERSIONS } from "./native-version.js";
|
|
2
|
-
export { OPENXIANGDA_COMPILER_CONTRACT_VERSION, PLATFORM_CAPABILITY_CONTRACT_VERSIONS } from "./native-version.js";
|
|
3
|
-
import type { DataResourceSurface } from "./surface.js";
|
|
1
|
+
import { PLATFORM_CAPABILITY_CONTRACT_VERSIONS, OPENXIANGDA_CONTRACT_VERSION } from "./native-version.js";
|
|
2
|
+
export { OPENXIANGDA_COMPILER_CONTRACT_VERSION, PLATFORM_CAPABILITY_CONTRACT_VERSIONS, OPENXIANGDA_CONTRACT_VERSION } from "./native-version.js";
|
|
3
|
+
import type { DataFieldSurface, DataResourceSurface } from "./surface.js";
|
|
4
4
|
import type { CascadePathValue, DataFieldOption, DateRangeValue, DepartmentReferenceValue, LabeledValue, ManagedImageValue, ResourceReferenceValue, StableAddressValue, StableLocationValue, StableSignatureValue, UserReferenceValue } from "./field-values.js";
|
|
5
|
+
import type { DataFieldUserCandidates } from './native-compiler/user-candidates.js';
|
|
5
6
|
import type { DataFieldResourceSource } from "./references.js";
|
|
6
7
|
import type { WorkflowBusinessData } from "./workflow-summary.js";
|
|
7
8
|
import type { WorkflowBusinessDetail } from "./workflow-detail.js";
|
|
8
9
|
import type { WorkflowBusinessStepNode, WorkflowBusinessStepResult } from './native-compiler/workflow-business-step.js';
|
|
9
10
|
import type { AppWorkflowLaunchContextDeclaration, AppWorkflowLaunchInputBindingDeclaration, AppWorkflowNamedOperationOutputDeclaration } from "./native.js";
|
|
10
11
|
import { type CliProtocolCapabilities } from "./cli.js";
|
|
11
|
-
export declare const OPENXIANGDA_CONTRACT_VERSION: "2.0.0-alpha.5";
|
|
12
12
|
export declare const SCHEMA_VERSIONS: {
|
|
13
13
|
readonly cliEvent: "openxiangda.cli-event/v1";
|
|
14
14
|
readonly workspaceTemplateBinding: "openxiangda.workspace-template-binding/v1";
|
|
@@ -53,7 +53,10 @@ export declare const SCHEMA_VERSIONS: {
|
|
|
53
53
|
readonly nativeScopeValueResolveRequest: "openxiangda.native-scope-value-resolve-request/v2";
|
|
54
54
|
readonly nativeScopeValuePage: "openxiangda.native-scope-value-page/v2";
|
|
55
55
|
readonly dataFieldSourceQuery: "openxiangda.data-field-source-query/v2";
|
|
56
|
+
readonly workflowTaskFieldSourceQuery: "openxiangda.workflow-task-field-source-query/v2";
|
|
56
57
|
readonly dataFieldSourcePage: "openxiangda.data-field-source-page/v2";
|
|
58
|
+
readonly userCandidatesQuery: "openxiangda.user-candidates-query/v2";
|
|
59
|
+
readonly userCandidatesPage: "openxiangda.user-candidates-page/v2";
|
|
57
60
|
readonly dataRef: "openxiangda.data-ref/v2";
|
|
58
61
|
readonly dataResource: "openxiangda.data-resource/v2";
|
|
59
62
|
readonly dataQuery: "openxiangda.data-query/v2";
|
|
@@ -106,6 +109,7 @@ export declare const SCHEMA_VERSIONS: {
|
|
|
106
109
|
readonly workflowAssigneeRequest: "openxiangda.workflow-assignee-request/v2.1";
|
|
107
110
|
readonly workflowAssigneeResponse: "openxiangda.workflow-assignee-response/v2";
|
|
108
111
|
readonly businessProcessCommit: "openxiangda.business-process.commit/v2";
|
|
112
|
+
readonly businessProcessCommandWithData: "openxiangda.business-process-command-with-data/v2";
|
|
109
113
|
readonly standardProcessCommit: "openxiangda.standard-process.commit/v2";
|
|
110
114
|
readonly businessProcessCommand: "openxiangda.business-process.command/v2";
|
|
111
115
|
readonly businessProcessReceipt: "openxiangda.business-process-receipt/v2";
|
|
@@ -324,6 +328,8 @@ export interface CurrentInitiatorDirectorySnapshot {
|
|
|
324
328
|
userId: string;
|
|
325
329
|
displayName?: string;
|
|
326
330
|
employeeNumber?: string | null;
|
|
331
|
+
/** Only present when a verified current-initiator operation declares phone. */
|
|
332
|
+
phone?: string | null;
|
|
327
333
|
primaryDepartment?: {
|
|
328
334
|
value: string;
|
|
329
335
|
label: string;
|
|
@@ -335,7 +341,7 @@ export interface CurrentInitiatorDirectorySnapshot {
|
|
|
335
341
|
snapshotRevision: Sha256Digest;
|
|
336
342
|
resolvedAt: IsoDateTime;
|
|
337
343
|
}
|
|
338
|
-
export interface SelectedUserDirectorySnapshot extends Omit<CurrentInitiatorDirectorySnapshot, "schemaVersion"> {
|
|
344
|
+
export interface SelectedUserDirectorySnapshot extends Omit<CurrentInitiatorDirectorySnapshot, "schemaVersion" | "phone"> {
|
|
339
345
|
schemaVersion: "openxiangda.selected-user-directory-snapshot/v2";
|
|
340
346
|
}
|
|
341
347
|
/** Query hints only; revalidate the selected member in the committing transaction. */
|
|
@@ -422,6 +428,16 @@ export interface NativeScopeDimensionApplicability {
|
|
|
422
428
|
roleCodes: string[];
|
|
423
429
|
unrestrictedRoleCodes: string[];
|
|
424
430
|
rules: NativeScopeDimensionApplicabilityRule[];
|
|
431
|
+
/** Scoped candidate fields are independent of CRUD policy applicability. */
|
|
432
|
+
candidateFields?: Array<{
|
|
433
|
+
dataLogicalRevisionId: string;
|
|
434
|
+
resourceCode: string;
|
|
435
|
+
fieldCode: string;
|
|
436
|
+
roleCode: string;
|
|
437
|
+
operation: string;
|
|
438
|
+
}>;
|
|
439
|
+
/** Effective scoped workflow duties; does not grant ordinary data access. */
|
|
440
|
+
workflowBindings?: Array<Pick<WorkflowRoleReference, 'workflowCode' | 'nodeId' | 'roleCode' | 'definitionVersion' | 'bindingVersion' | 'configurationRevision' | 'source' | 'contexts'>>;
|
|
425
441
|
}
|
|
426
442
|
export interface NativeAuthorizationManagementScopeDimension {
|
|
427
443
|
code: string;
|
|
@@ -1006,6 +1022,13 @@ export interface NativeScopeValuePage {
|
|
|
1006
1022
|
export interface DataFieldSourceLaunchBinding {
|
|
1007
1023
|
workflowCode: string;
|
|
1008
1024
|
operationCode: string;
|
|
1025
|
+
/** Named create's owned root subtable; host resource is its child. */
|
|
1026
|
+
subtableFieldCode?: string;
|
|
1027
|
+
}
|
|
1028
|
+
export interface DataRecordEditInput {
|
|
1029
|
+
operationCode: string;
|
|
1030
|
+
recordId: string;
|
|
1031
|
+
expectedRevision: number;
|
|
1009
1032
|
}
|
|
1010
1033
|
export interface DataFieldSourceQuery {
|
|
1011
1034
|
schemaVersion: typeof SCHEMA_VERSIONS.dataFieldSourceQuery;
|
|
@@ -1016,6 +1039,34 @@ export interface DataFieldSourceQuery {
|
|
|
1016
1039
|
bindings?: Record<string, unknown>;
|
|
1017
1040
|
/** 正式流程发起意图;平台核验字段绑定和动作能力,目标仍按当前用户读取。 */
|
|
1018
1041
|
launch?: DataFieldSourceLaunchBinding;
|
|
1042
|
+
action?: DataRecordEditInput;
|
|
1043
|
+
}
|
|
1044
|
+
/** 当前任务表单的资源引用输入上下文,不授予普通 CRUD 写入权限。 */
|
|
1045
|
+
export interface WorkflowTaskSourceBinding {
|
|
1046
|
+
taskId: string;
|
|
1047
|
+
expectedRevision: number;
|
|
1048
|
+
expectedTaskVersion: number;
|
|
1049
|
+
subtable?: WorkflowTaskFieldSourceQuery['subtable'];
|
|
1050
|
+
}
|
|
1051
|
+
export interface WorkflowTaskFieldSourceQuery {
|
|
1052
|
+
schemaVersion: typeof SCHEMA_VERSIONS.workflowTaskFieldSourceQuery;
|
|
1053
|
+
expectedRevision: number;
|
|
1054
|
+
expectedTaskVersion: number;
|
|
1055
|
+
keyword?: string;
|
|
1056
|
+
cursor?: string;
|
|
1057
|
+
bindings?: Record<string, unknown>;
|
|
1058
|
+
/** Current owned row, qualified by the fixed task page; never child CRUD. */
|
|
1059
|
+
subtable?: {
|
|
1060
|
+
fieldCode: string;
|
|
1061
|
+
row: {
|
|
1062
|
+
kind: 'persisted';
|
|
1063
|
+
id: string;
|
|
1064
|
+
expectedRevision: number;
|
|
1065
|
+
} | {
|
|
1066
|
+
kind: 'new';
|
|
1067
|
+
key: string;
|
|
1068
|
+
};
|
|
1069
|
+
};
|
|
1019
1070
|
}
|
|
1020
1071
|
export interface DataFieldSourcePage {
|
|
1021
1072
|
schemaVersion: typeof SCHEMA_VERSIONS.dataFieldSourcePage;
|
|
@@ -1027,6 +1078,52 @@ export interface DataFieldSourcePage {
|
|
|
1027
1078
|
items: ResourceReferenceValue[];
|
|
1028
1079
|
nextCursor: string | null;
|
|
1029
1080
|
}
|
|
1081
|
+
/** Candidate scope is owned by the field declaration and saved record/task. */
|
|
1082
|
+
export interface UserCandidateSearch {
|
|
1083
|
+
schemaVersion: typeof SCHEMA_VERSIONS.userCandidatesQuery;
|
|
1084
|
+
keyword?: string;
|
|
1085
|
+
cursor?: string;
|
|
1086
|
+
selectedIds?: string[];
|
|
1087
|
+
}
|
|
1088
|
+
export type DataFieldUserCandidateQuery = UserCandidateSearch & {
|
|
1089
|
+
launch?: DataFieldSourceLaunchBinding;
|
|
1090
|
+
action?: DataRecordEditInput;
|
|
1091
|
+
} & ({
|
|
1092
|
+
operation: 'create';
|
|
1093
|
+
recordId?: never;
|
|
1094
|
+
expectedRevision?: never;
|
|
1095
|
+
scopeValue?: string;
|
|
1096
|
+
} | {
|
|
1097
|
+
operation: 'update';
|
|
1098
|
+
recordId: string;
|
|
1099
|
+
expectedRevision: number;
|
|
1100
|
+
scopeValue?: never;
|
|
1101
|
+
});
|
|
1102
|
+
export interface WorkflowTaskUserCandidateQuery extends UserCandidateSearch {
|
|
1103
|
+
expectedRevision: number;
|
|
1104
|
+
expectedTaskVersion: number;
|
|
1105
|
+
}
|
|
1106
|
+
export interface UserCandidatePage {
|
|
1107
|
+
schemaVersion: typeof SCHEMA_VERSIONS.userCandidatesPage;
|
|
1108
|
+
resourceCode: string;
|
|
1109
|
+
fieldCode: string;
|
|
1110
|
+
environmentHeadRevision: number;
|
|
1111
|
+
recordRevision?: number;
|
|
1112
|
+
evaluatedAt: IsoDateTime;
|
|
1113
|
+
items: Array<{
|
|
1114
|
+
value: string;
|
|
1115
|
+
label: string;
|
|
1116
|
+
}>;
|
|
1117
|
+
selected: Array<{
|
|
1118
|
+
value: string;
|
|
1119
|
+
label: string;
|
|
1120
|
+
status: 'valid';
|
|
1121
|
+
} | {
|
|
1122
|
+
value: string;
|
|
1123
|
+
status: 'invalid';
|
|
1124
|
+
}>;
|
|
1125
|
+
nextCursor: string | null;
|
|
1126
|
+
}
|
|
1030
1127
|
export interface DataRef {
|
|
1031
1128
|
schemaVersion: typeof SCHEMA_VERSIONS.dataRef;
|
|
1032
1129
|
appCode: string;
|
|
@@ -1047,6 +1144,8 @@ export interface DataFieldDefinition {
|
|
|
1047
1144
|
options?: DataFieldOption[];
|
|
1048
1145
|
/** Dynamic same-application source for resource-reference fields. */
|
|
1049
1146
|
source?: DataFieldResourceSource;
|
|
1147
|
+
/** Authoritative role membership constraint for user references. */
|
|
1148
|
+
userCandidates?: DataFieldUserCandidates;
|
|
1050
1149
|
maxLength?: number;
|
|
1051
1150
|
precision?: number;
|
|
1052
1151
|
scale?: number;
|
|
@@ -1072,6 +1171,7 @@ export interface DataFieldDefinition {
|
|
|
1072
1171
|
resourceCode: string;
|
|
1073
1172
|
foreignKey: string;
|
|
1074
1173
|
orderField: string;
|
|
1174
|
+
minRows?: number;
|
|
1075
1175
|
maxRows?: number;
|
|
1076
1176
|
};
|
|
1077
1177
|
}
|
|
@@ -1121,6 +1221,10 @@ export type DataUniqueKeyCondition = {
|
|
|
1121
1221
|
fieldCode: string;
|
|
1122
1222
|
operator: 'in' | 'notIn';
|
|
1123
1223
|
values: string[];
|
|
1224
|
+
} | {
|
|
1225
|
+
fieldCode: string;
|
|
1226
|
+
operator: 'eq' | 'ne';
|
|
1227
|
+
value: boolean;
|
|
1124
1228
|
};
|
|
1125
1229
|
export interface DataUniqueKey {
|
|
1126
1230
|
code: string;
|
|
@@ -1143,6 +1247,23 @@ export interface DataResource {
|
|
|
1143
1247
|
invariants?: DataResourceInvariant[];
|
|
1144
1248
|
decimalReservationLifecycle?: DataDecimalReservationLifecycle;
|
|
1145
1249
|
uniqueKeys?: DataUniqueKey[];
|
|
1250
|
+
/** Explicit business-viewer history policy; absence and empty read disable it. */
|
|
1251
|
+
workflowHistory?: {
|
|
1252
|
+
read: string[];
|
|
1253
|
+
};
|
|
1254
|
+
/** Independent same-membership record printing policy; omission disables it. */
|
|
1255
|
+
recordPrint?: {
|
|
1256
|
+
read: string[];
|
|
1257
|
+
};
|
|
1258
|
+
/** Independent same-membership collaboration; omission disables comments. */
|
|
1259
|
+
recordComments?: {
|
|
1260
|
+
read: string[];
|
|
1261
|
+
create: string[];
|
|
1262
|
+
};
|
|
1263
|
+
/** Explicit same-membership authority to delete a record and its workflow. */
|
|
1264
|
+
recordDeletion?: {
|
|
1265
|
+
delete: string[];
|
|
1266
|
+
};
|
|
1146
1267
|
/** Default UI metadata projected with the authoritative Data Resource. */
|
|
1147
1268
|
surface?: DataResourceSurface;
|
|
1148
1269
|
capabilities: {
|
|
@@ -1158,6 +1279,74 @@ export interface DataResource {
|
|
|
1158
1279
|
createdAt?: IsoDateTime;
|
|
1159
1280
|
updatedAt?: IsoDateTime;
|
|
1160
1281
|
}
|
|
1282
|
+
/** Platform-owned append-only comment, independent of business edits and workflow opinions. */
|
|
1283
|
+
/** Explicit record permission; opaque previews never expose another instance or its participants. */
|
|
1284
|
+
export interface DataRecordDeletionPreview {
|
|
1285
|
+
schemaVersion: 'openxiangda.data-record-deletion-preview/v1';
|
|
1286
|
+
resourceCode: string;
|
|
1287
|
+
resourceName: string;
|
|
1288
|
+
recordId: string;
|
|
1289
|
+
appVersionId: string;
|
|
1290
|
+
environmentHeadRevision: number;
|
|
1291
|
+
recordRevision: number;
|
|
1292
|
+
affectedRecords: number;
|
|
1293
|
+
workflowCount: number;
|
|
1294
|
+
pendingLaunchCount: number;
|
|
1295
|
+
cancelledTaskCount: number;
|
|
1296
|
+
canCommit: boolean;
|
|
1297
|
+
blocker?: 'pending_launch' | 'multiple_workflows' | 'owned_workflow';
|
|
1298
|
+
receiptOwner?: 'native-transaction' | 'workflow-command';
|
|
1299
|
+
previewToken?: string;
|
|
1300
|
+
expiresAt?: IsoDateTime;
|
|
1301
|
+
}
|
|
1302
|
+
export interface DataRecordDeletionMutation {
|
|
1303
|
+
schemaVersion: 'openxiangda.data-record-deletion-request/v1';
|
|
1304
|
+
previewToken: string;
|
|
1305
|
+
idempotencyKey: string;
|
|
1306
|
+
reason: string;
|
|
1307
|
+
}
|
|
1308
|
+
/** Projection over an existing Native transaction or Workflow command receipt. */
|
|
1309
|
+
export interface DataRecordDeletionReceipt {
|
|
1310
|
+
schemaVersion: 'openxiangda.data-record-deletion-receipt/v1';
|
|
1311
|
+
resourceCode: string;
|
|
1312
|
+
recordId: string;
|
|
1313
|
+
idempotencyKey: string;
|
|
1314
|
+
receiptOwner: 'native-transaction' | 'workflow-command';
|
|
1315
|
+
receiptId: string;
|
|
1316
|
+
deleted: boolean;
|
|
1317
|
+
replayed: boolean;
|
|
1318
|
+
errorCode?: string;
|
|
1319
|
+
}
|
|
1320
|
+
export interface DataRecordComment {
|
|
1321
|
+
id: string;
|
|
1322
|
+
body: string;
|
|
1323
|
+
authorUserId: string;
|
|
1324
|
+
isOwn: boolean;
|
|
1325
|
+
createdAt: IsoDateTime;
|
|
1326
|
+
appVersionId: string;
|
|
1327
|
+
environmentHeadRevision: number;
|
|
1328
|
+
}
|
|
1329
|
+
export interface DataRecordCommentPage {
|
|
1330
|
+
schemaVersion: 'openxiangda.data-record-comments/v1';
|
|
1331
|
+
resourceCode: string;
|
|
1332
|
+
recordId: string;
|
|
1333
|
+
items: DataRecordComment[];
|
|
1334
|
+
nextCursor: string | null;
|
|
1335
|
+
limit: number;
|
|
1336
|
+
}
|
|
1337
|
+
export interface DataRecordCommentMutation {
|
|
1338
|
+
schemaVersion: 'openxiangda.data-record-comment-create/v1';
|
|
1339
|
+
body: string;
|
|
1340
|
+
idempotencyKey: string;
|
|
1341
|
+
}
|
|
1342
|
+
export interface DataRecordCommentReceipt {
|
|
1343
|
+
schemaVersion: 'openxiangda.data-record-comment-receipt/v1';
|
|
1344
|
+
resourceCode: string;
|
|
1345
|
+
recordId: string;
|
|
1346
|
+
idempotencyKey: string;
|
|
1347
|
+
comment: DataRecordComment;
|
|
1348
|
+
replayed: boolean;
|
|
1349
|
+
}
|
|
1161
1350
|
export type DataQueryOperator = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "contains" | "startsWith" | "endsWith" | "in" | "between" | "has" | "hasAny" | "hasAll" | "overlaps" | "containedBy" | "jsonContains" | "isEmpty" | "isNotEmpty";
|
|
1162
1351
|
export type DataWhere = {
|
|
1163
1352
|
and: DataWhere[];
|
|
@@ -1231,6 +1420,22 @@ export interface DataBatchQueryResult<T extends Record<string, unknown> = Record
|
|
|
1231
1420
|
schemaVersion: typeof SCHEMA_VERSIONS.dataBatchQueryResult;
|
|
1232
1421
|
results: DataBatchQueryItemResult<T>[];
|
|
1233
1422
|
}
|
|
1423
|
+
/** A bounded current-user print projection, without commands or permission metadata. */
|
|
1424
|
+
export interface DataRecordPrint {
|
|
1425
|
+
schemaVersion: "openxiangda.data-record-print/v1";
|
|
1426
|
+
resourceCode: string;
|
|
1427
|
+
resourceName: string;
|
|
1428
|
+
recordId: string;
|
|
1429
|
+
viewCode?: string;
|
|
1430
|
+
viewName?: string;
|
|
1431
|
+
appVersionId: string;
|
|
1432
|
+
environmentHeadRevision: number;
|
|
1433
|
+
preparedAt: IsoDateTime;
|
|
1434
|
+
fields: Array<Pick<DataFieldSurface, "label" | "type" | "widget" | "section" | "options" | "rangeBoundary" | "timePrecision"> & {
|
|
1435
|
+
code: string;
|
|
1436
|
+
}>;
|
|
1437
|
+
data: Record<string, unknown>;
|
|
1438
|
+
}
|
|
1234
1439
|
export interface DataRecord<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
1235
1440
|
schemaVersion: typeof SCHEMA_VERSIONS.dataRecord;
|
|
1236
1441
|
resourceCode: string;
|
|
@@ -1450,7 +1655,33 @@ export type DataTransactionRecordAssertion = {
|
|
|
1450
1655
|
field: string;
|
|
1451
1656
|
operator: "eq" | "neq" | "gt" | "gte" | "lt" | "lte";
|
|
1452
1657
|
};
|
|
1453
|
-
export
|
|
1658
|
+
export interface DataActorAuthorityRequirement {
|
|
1659
|
+
roleCode: string;
|
|
1660
|
+
scope?: {
|
|
1661
|
+
dimensionCode: string;
|
|
1662
|
+
value: string;
|
|
1663
|
+
operation: string;
|
|
1664
|
+
};
|
|
1665
|
+
}
|
|
1666
|
+
export interface DataTransactionActorAuthorityGuard {
|
|
1667
|
+
/** Current actor and required capability come only from the verified named action. */
|
|
1668
|
+
kind: 'actor-authority';
|
|
1669
|
+
anyOf: DataActorAuthorityRequirement[];
|
|
1670
|
+
allowAppSuperAdmin?: boolean;
|
|
1671
|
+
errorCode: string;
|
|
1672
|
+
}
|
|
1673
|
+
export interface DataTransactionRecordSetMatchGuard {
|
|
1674
|
+
/** Verify every readable record and its explicit revision in one bounded set. */
|
|
1675
|
+
kind: 'record-set-match';
|
|
1676
|
+
resourceCode: string;
|
|
1677
|
+
errorCode: string;
|
|
1678
|
+
records: {
|
|
1679
|
+
id: string;
|
|
1680
|
+
expectedRevision: number;
|
|
1681
|
+
}[];
|
|
1682
|
+
where?: DataWhere;
|
|
1683
|
+
}
|
|
1684
|
+
export type DataTransactionGuard = DataTransactionActorAuthorityGuard | DataTransactionRecordSetMatchGuard | {
|
|
1454
1685
|
/** Compare an actual create/update datetime with database acceptance time plus offset. */
|
|
1455
1686
|
kind: "operation-time";
|
|
1456
1687
|
operationIndex: number;
|
|
@@ -1541,7 +1772,7 @@ export interface CloudEvent<TData extends Record<string, unknown> = Record<strin
|
|
|
1541
1772
|
}
|
|
1542
1773
|
export declare const DATA_EVENT_TYPES_V2: readonly ["openxiangda.data.record.created.v2", "openxiangda.data.record.updated.v2", "openxiangda.data.record.deleted.v2"];
|
|
1543
1774
|
export type DataEventTypeV2 = (typeof DATA_EVENT_TYPES_V2)[number];
|
|
1544
|
-
export declare const WORKFLOW_EVENT_TYPES_V2: readonly ["openxiangda.workflow.step.requested.v2", "openxiangda.workflow.step.result_received.v2", "openxiangda.workflow.step.completed.v2", "openxiangda.workflow.step.continuation_failed.v2", "openxiangda.workflow.instance.started.v2", "openxiangda.workflow.instance.completed.v2", "openxiangda.workflow.instance.rejected.v2", "openxiangda.workflow.instance.returned.v2", "openxiangda.workflow.instance.resumed.v2", "openxiangda.workflow.instance.withdrawn.v2", "openxiangda.workflow.instance.terminated.v2", "openxiangda.workflow.instance.cc_added.v2", "openxiangda.workflow.task.created.v2", "openxiangda.workflow.task.assigned.v2", "openxiangda.workflow.task.assignment_pending.v2", "openxiangda.workflow.task.assignment_resolution_failed.v2", "openxiangda.workflow.task.approved.v2", "openxiangda.workflow.task.completed.v2", "openxiangda.workflow.task.rejected.v2", "openxiangda.workflow.task.returned.v2", "openxiangda.workflow.task.resubmitted.v2", "openxiangda.workflow.task.transferred.v2", "openxiangda.workflow.task.reassigned.v2", "openxiangda.workflow.task.delegated.v2", "openxiangda.workflow.task.assignee_added.v2", "openxiangda.workflow.task.cancelled.v2", "openxiangda.workflow.participant.activated.v2", "openxiangda.workflow.participant.completed.v2", "openxiangda.workflow.participant.rejected.v2", "openxiangda.workflow.participant.returned.v2", "openxiangda.workflow.participant.transferred.v2", "openxiangda.workflow.participant.reassigned.v2", "openxiangda.workflow.participant.delegated.v2", "openxiangda.workflow.participant.added.v2", "openxiangda.workflow.participant.suspended.v2", "openxiangda.workflow.participant.resumed.v2", "openxiangda.workflow.participant.cancelled.v2"];
|
|
1775
|
+
export declare const WORKFLOW_EVENT_TYPES_V2: readonly ["openxiangda.workflow.node.skipped.v2", "openxiangda.workflow.step.requested.v2", "openxiangda.workflow.step.result_received.v2", "openxiangda.workflow.step.completed.v2", "openxiangda.workflow.step.continuation_failed.v2", "openxiangda.workflow.instance.started.v2", "openxiangda.workflow.instance.completed.v2", "openxiangda.workflow.instance.rejected.v2", "openxiangda.workflow.instance.returned.v2", "openxiangda.workflow.instance.resumed.v2", "openxiangda.workflow.instance.withdrawn.v2", "openxiangda.workflow.instance.terminated.v2", "openxiangda.workflow.instance.cc_added.v2", "openxiangda.workflow.task.created.v2", "openxiangda.workflow.task.assigned.v2", "openxiangda.workflow.task.assignment_pending.v2", "openxiangda.workflow.task.assignment_resolution_failed.v2", "openxiangda.workflow.task.approved.v2", "openxiangda.workflow.task.completed.v2", "openxiangda.workflow.task.rejected.v2", "openxiangda.workflow.task.returned.v2", "openxiangda.workflow.task.resubmitted.v2", "openxiangda.workflow.task.transferred.v2", "openxiangda.workflow.task.reassigned.v2", "openxiangda.workflow.task.delegated.v2", "openxiangda.workflow.task.assignee_added.v2", "openxiangda.workflow.task.cancelled.v2", "openxiangda.workflow.participant.activated.v2", "openxiangda.workflow.participant.completed.v2", "openxiangda.workflow.participant.rejected.v2", "openxiangda.workflow.participant.returned.v2", "openxiangda.workflow.participant.transferred.v2", "openxiangda.workflow.participant.reassigned.v2", "openxiangda.workflow.participant.delegated.v2", "openxiangda.workflow.participant.added.v2", "openxiangda.workflow.participant.suspended.v2", "openxiangda.workflow.participant.resumed.v2", "openxiangda.workflow.participant.cancelled.v2"];
|
|
1545
1776
|
export type WorkflowEventTypeV2 = (typeof WORKFLOW_EVENT_TYPES_V2)[number];
|
|
1546
1777
|
export type EventProducerKind = "data" | "app" | "workflow" | "timer" | "date" | "system";
|
|
1547
1778
|
export interface EventCatalogEntry {
|
|
@@ -1839,6 +2070,12 @@ export interface WorkflowApprovalNode {
|
|
|
1839
2070
|
title: string;
|
|
1840
2071
|
binding: string;
|
|
1841
2072
|
mode: WorkflowApprovalMode;
|
|
2073
|
+
/** Code-owned. Omitted means block; skip requires a verified empty supported source. */
|
|
2074
|
+
emptyPolicy?: "block" | "skip";
|
|
2075
|
+
/** Code-owned. Only a direct active initiator seat can be automatically approved. */
|
|
2076
|
+
initiatorApprovalPolicy?: "manual" | "auto_approve";
|
|
2077
|
+
/** Code-owned deadline for whole-node completion; optional inputs only. */
|
|
2078
|
+
completionDeadline?: import('./native-compiler/workflow-completion-deadline.js').WorkflowCompletionDeadline;
|
|
1842
2079
|
onApprove: string;
|
|
1843
2080
|
onReject: string;
|
|
1844
2081
|
allowedOperations?: WorkflowCommand[];
|
|
@@ -1858,8 +2095,10 @@ export type WorkflowConfigurableOperation = 'approve' | 'reject' | 'return' | 't
|
|
|
1858
2095
|
export type WorkflowConfigurableAssigneeProvider = 'fixed_users' | 'app_role' | 'app_role_in_scope';
|
|
1859
2096
|
export interface WorkflowNodeOperationPolicy {
|
|
1860
2097
|
label?: string;
|
|
1861
|
-
/**
|
|
2098
|
+
/** Approve defaults to false, reject to true; explicit false is code-owned. */
|
|
1862
2099
|
commentRequired?: boolean;
|
|
2100
|
+
/** Transfer/delegate/add_assignee/return default to true; administrators cannot loosen the code baseline. */
|
|
2101
|
+
reasonRequired?: boolean;
|
|
1863
2102
|
}
|
|
1864
2103
|
export interface WorkflowApprovalAdministration {
|
|
1865
2104
|
modes?: WorkflowApprovalMode[];
|
|
@@ -1897,14 +2136,20 @@ export interface WorkflowCcNode {
|
|
|
1897
2136
|
notify?: boolean;
|
|
1898
2137
|
administration?: WorkflowCcAdministration;
|
|
1899
2138
|
}
|
|
1900
|
-
export type WorkflowNode = WorkflowApprovalNode | WorkflowConditionNode | WorkflowEndNode | WorkflowCcNode | WorkflowBusinessStepNode;
|
|
2139
|
+
export type WorkflowNode = WorkflowApprovalNode | WorkflowConditionNode | WorkflowEndNode | WorkflowCcNode | import('./native-compiler/workflow-correction.js').WorkflowCorrectionNode | WorkflowBusinessStepNode;
|
|
1901
2140
|
export interface WorkflowDefinition {
|
|
1902
2141
|
schemaVersion: typeof SCHEMA_VERSIONS.workflowDefinition;
|
|
1903
2142
|
code: string;
|
|
1904
2143
|
title: string;
|
|
1905
2144
|
acceptedCommandDeactivationPolicy: "finish-pinned" | "cancel-on-deactivate";
|
|
1906
2145
|
subject: WorkflowSubjectDefinition;
|
|
2146
|
+
commandHandlers?: import('./native-compiler/workflow-business-command.js').WorkflowCommandHandlers;
|
|
2147
|
+
launchPreflight?: import('./native-compiler/workflow-launch-preflight.js').WorkflowLaunchPreflight;
|
|
2148
|
+
/** Atomic approval effect; requires current-cycle direct human confirmation. */
|
|
2149
|
+
approvedDelegation?: import('./native-compiler/workflow-approved-delegation.js').WorkflowApprovedDelegationPolicy;
|
|
1907
2150
|
instanceCommands?: WorkflowInstanceCommandPolicies;
|
|
2151
|
+
/** Code-owned, frozen at rejection using the subject's last successful business writer. */
|
|
2152
|
+
rejectionNotification?: import('./native-compiler/workflow-rejection-notification.js').WorkflowRejectionNotification;
|
|
1908
2153
|
startAt: string;
|
|
1909
2154
|
inputSchema: Record<string, unknown> & {
|
|
1910
2155
|
type: "object";
|
|
@@ -1928,7 +2173,8 @@ export interface WorkflowDefinition {
|
|
|
1928
2173
|
}
|
|
1929
2174
|
export interface WorkflowInstanceCommandPolicies {
|
|
1930
2175
|
withdraw?: {
|
|
1931
|
-
beforeFact
|
|
2176
|
+
beforeFact?: string;
|
|
2177
|
+
reasonRequired?: boolean;
|
|
1932
2178
|
};
|
|
1933
2179
|
terminate?: {
|
|
1934
2180
|
capability: string;
|
|
@@ -1944,6 +2190,8 @@ export interface WorkflowSubjectDefinition {
|
|
|
1944
2190
|
export type WorkflowBindingProvider = "fixed_users" | "initiator" | "input_users" | "form_field_users" | "department_supervisor" | "app_role" | "app_role_in_scope" | "business_relation" | "previous_node_actor" | "initiator_select" | "application_provider";
|
|
1945
2191
|
export interface WorkflowBindingEntry {
|
|
1946
2192
|
provider: WorkflowBindingProvider;
|
|
2193
|
+
/** Reference to the constrained subject field; role/scope remain declared once. */
|
|
2194
|
+
candidateField?: string;
|
|
1947
2195
|
users?: string[];
|
|
1948
2196
|
inputPath?: string;
|
|
1949
2197
|
departmentIdFrom?: string;
|
|
@@ -1955,6 +2203,8 @@ export interface WorkflowBindingEntry {
|
|
|
1955
2203
|
valueFrom?: string;
|
|
1956
2204
|
value?: string;
|
|
1957
2205
|
};
|
|
2206
|
+
/** 2–8 ordered roles, exclusive with roleCode. Overlapping users occupy one seat. */
|
|
2207
|
+
roleCodes?: string[];
|
|
1958
2208
|
relationCode?: string;
|
|
1959
2209
|
resourceCode?: string;
|
|
1960
2210
|
resourceIdFrom?: string;
|
|
@@ -2045,9 +2295,11 @@ export interface WorkflowRoleReference {
|
|
|
2045
2295
|
configurationRevision: number;
|
|
2046
2296
|
contexts: Array<'active' | 'in_flight'>;
|
|
2047
2297
|
source: 'default_binding' | 'node_override' | 'routing_source';
|
|
2048
|
-
provider: 'app_role' | 'app_role_in_scope';
|
|
2298
|
+
provider: 'app_role' | 'app_role_in_scope' | 'form_field_users';
|
|
2049
2299
|
routingSourceCode?: string;
|
|
2050
2300
|
scopeDimensionCode?: string;
|
|
2301
|
+
candidateField?: string;
|
|
2302
|
+
dataLogicalRevisionId?: string;
|
|
2051
2303
|
}
|
|
2052
2304
|
export interface WorkflowRoleReferencePage {
|
|
2053
2305
|
schemaVersion: typeof SCHEMA_VERSIONS.workflowRoleReferencePage;
|
|
@@ -2106,6 +2358,11 @@ export interface WorkflowNodeConfigurationPatch {
|
|
|
2106
2358
|
} | {
|
|
2107
2359
|
provider: "app_role" | "app_role_in_scope";
|
|
2108
2360
|
roleCode: string;
|
|
2361
|
+
roleCodes?: never;
|
|
2362
|
+
} | {
|
|
2363
|
+
provider: "app_role" | "app_role_in_scope";
|
|
2364
|
+
roleCodes: string[];
|
|
2365
|
+
roleCode?: never;
|
|
2109
2366
|
};
|
|
2110
2367
|
}
|
|
2111
2368
|
export interface WorkflowNodeConfigurationState {
|
|
@@ -2127,6 +2384,9 @@ export interface WorkflowNodeConfigurations {
|
|
|
2127
2384
|
title: string;
|
|
2128
2385
|
binding?: WorkflowBindingEntry;
|
|
2129
2386
|
mode?: WorkflowApprovalMode;
|
|
2387
|
+
emptyPolicy?: "block" | "skip";
|
|
2388
|
+
initiatorApprovalPolicy?: "manual" | "auto_approve";
|
|
2389
|
+
completionDeadline?: import('./native-compiler/workflow-completion-deadline.js').WorkflowCompletionDeadline;
|
|
2130
2390
|
allowedOperations?: WorkflowCommand[];
|
|
2131
2391
|
operationPolicy?: Partial<Record<WorkflowConfigurableOperation, WorkflowNodeOperationPolicy>>;
|
|
2132
2392
|
fieldPolicy?: WorkflowApprovalNode['fieldPolicy'];
|
|
@@ -2140,6 +2400,9 @@ export interface WorkflowNodeConfigurations {
|
|
|
2140
2400
|
binding?: WorkflowBindingEntry;
|
|
2141
2401
|
bindingDigest?: string;
|
|
2142
2402
|
mode?: WorkflowApprovalMode;
|
|
2403
|
+
emptyPolicy?: "block" | "skip";
|
|
2404
|
+
initiatorApprovalPolicy?: "manual" | "auto_approve";
|
|
2405
|
+
completionDeadline?: import('./native-compiler/workflow-completion-deadline.js').WorkflowCompletionDeadline;
|
|
2143
2406
|
allowedOperations?: WorkflowCommand[];
|
|
2144
2407
|
operationPolicy?: Partial<Record<WorkflowConfigurableOperation, WorkflowNodeOperationPolicy>>;
|
|
2145
2408
|
fieldPolicy?: WorkflowApprovalNode['fieldPolicy'];
|
|
@@ -2554,6 +2817,7 @@ export interface WorkflowTask {
|
|
|
2554
2817
|
dataRef: Record<string, unknown>;
|
|
2555
2818
|
createdAt: IsoDateTime;
|
|
2556
2819
|
updatedAt: IsoDateTime;
|
|
2820
|
+
completionDeadline?: import('./native-compiler/workflow-completion-deadline.js').WorkflowCompletionDeadlineState;
|
|
2557
2821
|
}
|
|
2558
2822
|
export interface WorkflowDetailNavigation {
|
|
2559
2823
|
custom: boolean;
|
|
@@ -2621,6 +2885,8 @@ export interface WorkflowOperationSurface {
|
|
|
2621
2885
|
method: "POST";
|
|
2622
2886
|
href: string;
|
|
2623
2887
|
idempotencyRequired: boolean;
|
|
2888
|
+
/** Fixed Workflow handler; shared client uses the current immutable app operation surface. */
|
|
2889
|
+
operationCode?: string;
|
|
2624
2890
|
};
|
|
2625
2891
|
refresh: string[];
|
|
2626
2892
|
}
|
|
@@ -2679,6 +2945,38 @@ export interface WorkflowCommandInput {
|
|
|
2679
2945
|
idempotencyKey: string;
|
|
2680
2946
|
input?: Record<string, unknown>;
|
|
2681
2947
|
}
|
|
2948
|
+
/** Original Workflow authority and exact subject CAS from the shared Surface client. */
|
|
2949
|
+
export interface WorkflowBusinessCommandInvocation extends WorkflowCommandInput {
|
|
2950
|
+
workflowCode: string;
|
|
2951
|
+
target: {
|
|
2952
|
+
kind: 'task';
|
|
2953
|
+
id: string;
|
|
2954
|
+
command: 'approve' | 'reject' | 'resubmit';
|
|
2955
|
+
} | {
|
|
2956
|
+
kind: 'instance';
|
|
2957
|
+
id: string;
|
|
2958
|
+
command: 'withdraw';
|
|
2959
|
+
};
|
|
2960
|
+
recordId: string;
|
|
2961
|
+
expectedRevision: number;
|
|
2962
|
+
}
|
|
2963
|
+
/** A verified Named Action combines business effects with the original Workflow decision. */
|
|
2964
|
+
export interface BusinessProcessCommandWithData {
|
|
2965
|
+
schemaVersion: typeof SCHEMA_VERSIONS.businessProcessCommandWithData;
|
|
2966
|
+
environmentKey: DeploymentEnvironment;
|
|
2967
|
+
workflow: WorkflowBusinessCommandInvocation;
|
|
2968
|
+
subject: {
|
|
2969
|
+
fromOperation: string;
|
|
2970
|
+
};
|
|
2971
|
+
data: BusinessProcessCommit['data'];
|
|
2972
|
+
expectedTransition: {
|
|
2973
|
+
status: 'running' | 'approved' | 'rejected' | 'withdrawn';
|
|
2974
|
+
outcome: string | null;
|
|
2975
|
+
currentNodeId: string | null;
|
|
2976
|
+
} | {
|
|
2977
|
+
kind: 'correction-replay';
|
|
2978
|
+
};
|
|
2979
|
+
}
|
|
2682
2980
|
/**
|
|
2683
2981
|
* Result returned by a task or instance Workflow command.
|
|
2684
2982
|
*
|
|
@@ -2744,6 +3042,8 @@ export interface WorkflowLaunchSurface {
|
|
|
2744
3042
|
};
|
|
2745
3043
|
}
|
|
2746
3044
|
export interface WorkflowNamedOperationLaunchIntent {
|
|
3045
|
+
/** Projected from the sealed operation, never editable launch input. */
|
|
3046
|
+
ownedSubject?: import('./native-compiler/workflow-owned-subject.js').WorkflowOwnedSubjectCreate;
|
|
2747
3047
|
operationCode: string;
|
|
2748
3048
|
method: "POST";
|
|
2749
3049
|
href: string;
|
|
@@ -2758,7 +3058,7 @@ export interface WorkflowTimelineFlowItem {
|
|
|
2758
3058
|
nodeId: string | null;
|
|
2759
3059
|
kind: "start" | WorkflowNode["kind"];
|
|
2760
3060
|
title: string;
|
|
2761
|
-
status: "completed" | "active" | "waiting" | "returned" | "cancelled" | "error";
|
|
3061
|
+
status: "completed" | "skipped" | "active" | "waiting" | "returned" | "cancelled" | "error";
|
|
2762
3062
|
startedAt: IsoDateTime | null;
|
|
2763
3063
|
completedAt: IsoDateTime | null;
|
|
2764
3064
|
assignees: Array<{
|
|
@@ -2788,7 +3088,7 @@ export interface WorkflowTimelineItem {
|
|
|
2788
3088
|
severity: "normal" | "admin" | "security";
|
|
2789
3089
|
createdAt: IsoDateTime;
|
|
2790
3090
|
}
|
|
2791
|
-
export type WorkflowTimelineDisplayStatus = "completed" | "active" | "waiting" | "returned" | "rejected" | "withdrawn" | "terminated" | "cancelled" | "error";
|
|
3091
|
+
export type WorkflowTimelineDisplayStatus = "completed" | "skipped" | "active" | "waiting" | "returned" | "rejected" | "withdrawn" | "terminated" | "cancelled" | "error";
|
|
2792
3092
|
export interface WorkflowTimelineDisplayOperation {
|
|
2793
3093
|
id: string;
|
|
2794
3094
|
operation: string;
|
|
@@ -2817,6 +3117,62 @@ export interface WorkflowTimelineDisplayEntry {
|
|
|
2817
3117
|
export interface WorkflowTimelineDisplay {
|
|
2818
3118
|
entries: WorkflowTimelineDisplayEntry[];
|
|
2819
3119
|
}
|
|
3120
|
+
/** Read-only business history. No facts, raw log detail, tokens or role seats. */
|
|
3121
|
+
export interface WorkflowRecordHistoryPerson {
|
|
3122
|
+
userId: string;
|
|
3123
|
+
displayName: string;
|
|
3124
|
+
status: string;
|
|
3125
|
+
outcome: string | null;
|
|
3126
|
+
comment: string | null;
|
|
3127
|
+
completedAt: IsoDateTime | null;
|
|
3128
|
+
}
|
|
3129
|
+
export interface WorkflowRecordHistoryVisit {
|
|
3130
|
+
id: string;
|
|
3131
|
+
nodeId: string;
|
|
3132
|
+
nodeKind: string;
|
|
3133
|
+
title: string;
|
|
3134
|
+
status: string;
|
|
3135
|
+
enteredAt: IsoDateTime | null;
|
|
3136
|
+
completedAt: IsoDateTime | null;
|
|
3137
|
+
people: WorkflowRecordHistoryPerson[];
|
|
3138
|
+
}
|
|
3139
|
+
export interface WorkflowRecordHistoryOperation {
|
|
3140
|
+
id: string;
|
|
3141
|
+
nodeVisitId: string | null;
|
|
3142
|
+
operation: string;
|
|
3143
|
+
operationLabel: string;
|
|
3144
|
+
actor: {
|
|
3145
|
+
userId: string;
|
|
3146
|
+
displayName: string;
|
|
3147
|
+
};
|
|
3148
|
+
actingForUserId: string | null;
|
|
3149
|
+
reason: string | null;
|
|
3150
|
+
occurredAt: IsoDateTime | null;
|
|
3151
|
+
}
|
|
3152
|
+
export interface WorkflowRecordHistory {
|
|
3153
|
+
schemaVersion: 'openxiangda.workflow-record-history/v1';
|
|
3154
|
+
resourceCode: string;
|
|
3155
|
+
recordId: string;
|
|
3156
|
+
recordRevision: number;
|
|
3157
|
+
environmentKey: 'preproduction' | 'production';
|
|
3158
|
+
instance: {
|
|
3159
|
+
id: string;
|
|
3160
|
+
workflowCode: string;
|
|
3161
|
+
version: number;
|
|
3162
|
+
definitionVersionId: string;
|
|
3163
|
+
definitionDigest: string;
|
|
3164
|
+
status: string;
|
|
3165
|
+
eventSequence: number;
|
|
3166
|
+
startedAt: IsoDateTime | null;
|
|
3167
|
+
completedAt: IsoDateTime | null;
|
|
3168
|
+
};
|
|
3169
|
+
visits: WorkflowRecordHistoryVisit[];
|
|
3170
|
+
items: WorkflowRecordHistoryOperation[];
|
|
3171
|
+
total: number;
|
|
3172
|
+
limit: number;
|
|
3173
|
+
offset: number;
|
|
3174
|
+
hasMore: boolean;
|
|
3175
|
+
}
|
|
2820
3176
|
export interface WorkflowTimeline {
|
|
2821
3177
|
engineVersion: "2.0";
|
|
2822
3178
|
instanceId: string;
|
|
@@ -2859,6 +3215,8 @@ export interface WorkflowDelegation {
|
|
|
2859
3215
|
appCode: string;
|
|
2860
3216
|
environmentKey: string;
|
|
2861
3217
|
workflowCode: string | null;
|
|
3218
|
+
/** Omitted/null covers all applicable approval nodes in the workflow scope. */
|
|
3219
|
+
nodeId?: string | null;
|
|
2862
3220
|
delegatorUserId: string;
|
|
2863
3221
|
delegateUserId: string;
|
|
2864
3222
|
delegatorRoleSubjectKey: string;
|