@rytass/bpm-core-shared 0.20.1 → 0.21.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/CHANGELOG.md +74 -0
- package/README.md +5 -0
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/index.js.map +1 -1
- package/src/lib/form-filter.d.ts +166 -0
- package/src/lib/form-filter.js +388 -0
- package/src/lib/form-filter.js.map +1 -0
- package/src/lib/form.d.ts +26 -0
- package/src/lib/form.js +29 -1
- package/src/lib/form.js.map +1 -1
- package/src/lib/organization.d.ts +7 -0
- package/src/lib/organization.js +8 -0
- package/src/lib/organization.js.map +1 -1
- package/src/lib/workflow-command.d.ts +18 -1
- package/src/lib/workflow-command.js +30 -0
- package/src/lib/workflow-command.js.map +1 -1
- package/src/lib/workflow-graph.d.ts +104 -5
- package/src/lib/workflow-graph.js +321 -32
- package/src/lib/workflow-graph.js.map +1 -1
- package/src/lib/workflow-toolset.js +190 -24
- package/src/lib/workflow-toolset.js.map +1 -1
- package/src/lib/workflow.d.ts +135 -0
- package/src/lib/workflow.js +132 -0
- package/src/lib/workflow.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,77 @@
|
|
|
1
|
+
## 0.21.1 (2026-11-11)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **workflow-engine:** judge the launchable list with the initiator customFields resolver ([92faedec](https://github.com/Rytass/BPMCore/commit/92faedec))
|
|
6
|
+
- **react:** read the designer's today in the host organization time zone ([9a31ff90](https://github.com/Rytass/BPMCore/commit/9a31ff90))
|
|
7
|
+
- **shared:** add the default organization time zone constant ([3dac42de](https://github.com/Rytass/BPMCore/commit/3dac42de))
|
|
8
|
+
- **workflow-engine:** refuse a submit or resubmit holding more files than maxFiles ([abf75d2f](https://github.com/Rytass/BPMCore/commit/abf75d2f))
|
|
9
|
+
- **shared:** tell which stages can start a manager chain with exactly one person ([6afc0c2d](https://github.com/Rytass/BPMCore/commit/6afc0c2d))
|
|
10
|
+
- **shared:** let a manager chain start from a form pick or an earlier stage ([d181c1e8](https://github.com/Rytass/BPMCore/commit/d181c1e8))
|
|
11
|
+
- **shared:** add excludeNodeActors to user task nodes ([0d6c5c42](https://github.com/Rytass/BPMCore/commit/0d6c5c42))
|
|
12
|
+
- **react:** ask for the approval comment in the designer and on the approve dialog ([f80aaf04](https://github.com/Rytass/BPMCore/commit/f80aaf04))
|
|
13
|
+
- **shared:** add setUserTaskRequireApprovalComment command and AI tool ([efe41c94](https://github.com/Rytass/BPMCore/commit/efe41c94))
|
|
14
|
+
- **workflow-engine:** require a comment when a person approves at a node ([84474780](https://github.com/Rytass/BPMCore/commit/84474780))
|
|
15
|
+
|
|
16
|
+
### 🩹 Fixes
|
|
17
|
+
|
|
18
|
+
- **shared:** count excludeNodeActors handing over to the initiator's managers as multiple approvers ([6c5e7de6](https://github.com/Rytass/BPMCore/commit/6c5e7de6))
|
|
19
|
+
- **bpm-core:** build one workflow engine so every caller sees the host resolver ([3e172843](https://github.com/Rytass/BPMCore/commit/3e172843))
|
|
20
|
+
- **workflow-engine:** time out the initiator customFields resolver and keep its errors server-side ([45ff109d](https://github.com/Rytass/BPMCore/commit/45ff109d))
|
|
21
|
+
- **react:** say ad-hoc approvers are not excluded in the excludeNodeActors hint ([815a89c4](https://github.com/Rytass/BPMCore/commit/815a89c4))
|
|
22
|
+
- **shared:** refuse a manager chain notify recipient without a whole-number level ([cdca8b1e](https://github.com/Rytass/BPMCore/commit/cdca8b1e))
|
|
23
|
+
- **workflow-engine:** count a repeated file_upload id once, as the binding does ([d75adb5c](https://github.com/Rytass/BPMCore/commit/d75adb5c))
|
|
24
|
+
- **shared:** keep manager chain level and stage ids as written ([1c741259](https://github.com/Rytass/BPMCore/commit/1c741259))
|
|
25
|
+
- **shared:** require an organization for a notify ORG_UNIT_MANAGER recipient ([1d348b84](https://github.com/Rytass/BPMCore/commit/1d348b84))
|
|
26
|
+
- **workflow-engine:** hold a set-form-field write to member and unit value shapes ([c9d0523c](https://github.com/Rytass/BPMCore/commit/c9d0523c))
|
|
27
|
+
- **shared:** quote the start-level schema line so the INITIATOR example compiles ([f0e64cf9](https://github.com/Rytass/BPMCore/commit/f0e64cf9))
|
|
28
|
+
- **shared:** keep any start level the toolset is handed so validation reports it ([ca7e762f](https://github.com/Rytass/BPMCore/commit/ca7e762f))
|
|
29
|
+
- **shared:** let the policy decide when a lone listed member may hand over to the initiator manager ([418b192b](https://github.com/Rytass/BPMCore/commit/418b192b))
|
|
30
|
+
- **shared:** keep a chain start and start level the toolset cannot read so validation reports them ([2ed228a9](https://github.com/Rytass/BPMCore/commit/2ed228a9))
|
|
31
|
+
- **shared:** keep the chain start when the toolset rewrites an approver ([71e3e1e7](https://github.com/Rytass/BPMCore/commit/71e3e1e7))
|
|
32
|
+
- **shared:** name a start without a type in words and read a fractional start level back ([02b86146](https://github.com/Rytass/BPMCore/commit/02b86146))
|
|
33
|
+
- **shared:** say parallel-branch stages are unsupported in excludeNodeActors hints ([ea6f5efa](https://github.com/Rytass/BPMCore/commit/ea6f5efa))
|
|
34
|
+
- **shared:** describe what a skipped exclusion stage reads ([6c62b03f](https://github.com/Rytass/BPMCore/commit/6c62b03f))
|
|
35
|
+
- **shared:** describe the stage rule in the excludeNodeActors tool and read a broken nodeIds safely ([c7a67f79](https://github.com/Rytass/BPMCore/commit/c7a67f79))
|
|
36
|
+
- **shared:** hold every excludeNodeActors stage to the NODE_ACTOR source rules ([d16f216a](https://github.com/Rytass/BPMCore/commit/d16f216a))
|
|
37
|
+
- **react:** harden the notify recipient panel after review ([17fab8db](https://github.com/Rytass/BPMCore/commit/17fab8db))
|
|
38
|
+
|
|
39
|
+
### ❤️ Thank You
|
|
40
|
+
|
|
41
|
+
- Chia Yu Pai @fantasywind
|
|
42
|
+
- Kai-Chieh Yang
|
|
43
|
+
|
|
44
|
+
## 0.21.0 (2026-11-11)
|
|
45
|
+
|
|
46
|
+
### 🚀 Features
|
|
47
|
+
|
|
48
|
+
- **bpm-core-react:** place refused fill values on their fields by path ([0f26687](https://github.com/Rytass/BPMCore/commit/0f26687))
|
|
49
|
+
- **bpm-core-client:** expose refused form values on request errors ([3a5d406](https://github.com/Rytass/BPMCore/commit/3a5d406))
|
|
50
|
+
- **shared:** add structured form data issue contract ([827e26d](https://github.com/Rytass/BPMCore/commit/827e26d))
|
|
51
|
+
- **client:** add a filterable expense example list built on field filters ([3d624fb](https://github.com/Rytass/BPMCore/commit/3d624fb))
|
|
52
|
+
- **react:** filterable toggle in the form builder and list field filters ([e8d58bf](https://github.com/Rytass/BPMCore/commit/e8d58bf))
|
|
53
|
+
- **client:** pass field filters and sort to the approval-instance list ([bbfd789](https://github.com/Rytass/BPMCore/commit/bbfd789))
|
|
54
|
+
- **workflow-engine:** filter and sort approval instances by form fields ([6e4a98f](https://github.com/Rytass/BPMCore/commit/6e4a98f))
|
|
55
|
+
- **template:** refuse to enable a filterable field over conflicting history ([42628b4](https://github.com/Rytass/BPMCore/commit/42628b4))
|
|
56
|
+
- **shared:** declare filterable form fields and the field filter contract ([166389e](https://github.com/Rytass/BPMCore/commit/166389e))
|
|
57
|
+
- **api:** add a staging notify webhook showcase pushed over SSE ([0cb3ea5](https://github.com/Rytass/BPMCore/commit/0cb3ea5))
|
|
58
|
+
|
|
59
|
+
### 🩹 Fixes
|
|
60
|
+
|
|
61
|
+
- **client:** read form data issues all or nothing ([c0e4281](https://github.com/Rytass/BPMCore/commit/c0e4281))
|
|
62
|
+
- **shared:** name the table, not a column, for a malformed filterable table ([c4b0420](https://github.com/Rytass/BPMCore/commit/c4b0420))
|
|
63
|
+
- **shared:** describe filterable value mismatches in Chinese ([afd27a7](https://github.com/Rytass/BPMCore/commit/afd27a7))
|
|
64
|
+
- **client:** name data-source values in case titles from the option snapshot ([14ade77](https://github.com/Rytass/BPMCore/commit/14ade77))
|
|
65
|
+
- **shared:** narrow the self-approval flag with typeof in the resolver fallback parser ([19497cf](https://github.com/Rytass/BPMCore/commit/19497cf))
|
|
66
|
+
|
|
67
|
+
### 🔥 Performance
|
|
68
|
+
|
|
69
|
+
- **template:** scan instances only for fields a publish newly makes filterable ([b18dda2](https://github.com/Rytass/BPMCore/commit/b18dda2))
|
|
70
|
+
|
|
71
|
+
### ❤️ Thank You
|
|
72
|
+
|
|
73
|
+
- Chia Yu Pai @fantasywind
|
|
74
|
+
|
|
1
75
|
## 0.20.1 (2026-11-10)
|
|
2
76
|
|
|
3
77
|
### 🩹 Fixes
|
package/README.md
CHANGED
|
@@ -69,6 +69,11 @@ without a `mode` normalize to `single`; `radio` is always single and
|
|
|
69
69
|
`ORG_MANAGER_CHAIN` accept an optional `fallback` (`NONE`, `DIRECT`, or
|
|
70
70
|
`POSITION`). The `POSITION` fallback type is not released yet (it landed after
|
|
71
71
|
`v0.16.2`); older engines reject it at run time.
|
|
72
|
+
`ORG_MANAGER_CHAIN` also takes `startFrom` (`OrgManagerChainStart`: the
|
|
73
|
+
initiator, the person picked in a form field, or the person who approved an
|
|
74
|
+
earlier stage) and `startPositionLevel` (managers below it are walked past);
|
|
75
|
+
both are optional, and an older engine ignores them and climbs from the
|
|
76
|
+
initiator.
|
|
72
77
|
- Service task actions (`ServiceAction`) have three types. The workflow engine
|
|
73
78
|
executes all three at run time:
|
|
74
79
|
- `NOTIFY`: `channels`, `recipients` (an `ApproverResolver`), optional
|
package/package.json
CHANGED
package/src/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export * from './lib/field-access';
|
|
|
5
5
|
export * from './lib/field-access-lint';
|
|
6
6
|
export * from './lib/field-access-matrix';
|
|
7
7
|
export * from './lib/form';
|
|
8
|
+
export * from './lib/form-filter';
|
|
8
9
|
export * from './lib/identity';
|
|
9
10
|
export * from './lib/organization';
|
|
10
11
|
export * from './lib/status';
|
package/src/index.js
CHANGED
|
@@ -8,6 +8,7 @@ tslib_1.__exportStar(require("./lib/field-access"), exports);
|
|
|
8
8
|
tslib_1.__exportStar(require("./lib/field-access-lint"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./lib/field-access-matrix"), exports);
|
|
10
10
|
tslib_1.__exportStar(require("./lib/form"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./lib/form-filter"), exports);
|
|
11
12
|
tslib_1.__exportStar(require("./lib/identity"), exports);
|
|
12
13
|
tslib_1.__exportStar(require("./lib/organization"), exports);
|
|
13
14
|
tslib_1.__exportStar(require("./lib/status"), exports);
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/shared/src/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC;AAChC,oEAA0C;AAC1C,uEAA6C;AAC7C,6DAAmC;AACnC,kEAAwC;AACxC,oEAA0C;AAC1C,qDAA2B;AAC3B,yDAA+B;AAC/B,6DAAmC;AACnC,uDAA6B;AAC7B,yDAA+B;AAC/B,+DAAqC;AACrC,iEAAuC;AACvC,iEAAuC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/shared/src/index.ts"],"names":[],"mappings":";;;AAAA,0DAAgC;AAChC,oEAA0C;AAC1C,uEAA6C;AAC7C,6DAAmC;AACnC,kEAAwC;AACxC,oEAA0C;AAC1C,qDAA2B;AAC3B,4DAAkC;AAClC,yDAA+B;AAC/B,6DAAmC;AACnC,uDAA6B;AAC7B,yDAA+B;AAC/B,+DAAqC;AACrC,iEAAuC;AACvC,iEAAuC"}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { type FormDefinitionSchema, type FormFieldDefinition, type FormFieldOption, type TableColumnDefinition } from './form';
|
|
2
|
+
/**
|
|
3
|
+
* Filtering and sorting the approval-instance list by form fields (ADR 25).
|
|
4
|
+
*
|
|
5
|
+
* Everything that decides "is this value right for a filterable field" lives
|
|
6
|
+
* here so the write-time check, the enable-time scan of old instances, the
|
|
7
|
+
* query compiler and the designer all answer the same way.
|
|
8
|
+
*/
|
|
9
|
+
/** Top-level field types a form designer may mark `filterable` (ADR 25 §5.2). */
|
|
10
|
+
export declare const FILTERABLE_FIELD_TYPES: readonly ["autocomplete", "boolean", "checkbox", "date", "datetime", "member", "money", "number", "org_unit", "radio", "select", "text", "textarea"];
|
|
11
|
+
export type FilterableFieldType = (typeof FILTERABLE_FIELD_TYPES)[number];
|
|
12
|
+
/** Table column types a form designer may mark `filterable`: every column type. */
|
|
13
|
+
export declare const FILTERABLE_TABLE_COLUMN_TYPES: readonly TableColumnDefinition['type'][];
|
|
14
|
+
/**
|
|
15
|
+
* Sort keys that are not form fields. A filterable field must not use one of
|
|
16
|
+
* these as its `fieldKey`, or a sort request would be ambiguous.
|
|
17
|
+
*/
|
|
18
|
+
export declare const APPROVAL_INSTANCE_SORT_TIME_FIELDS: readonly ["submittedAt", "updatedAt", "completedAt"];
|
|
19
|
+
export type ApprovalInstanceSortTimeField = (typeof APPROVAL_INSTANCE_SORT_TIME_FIELDS)[number];
|
|
20
|
+
export declare function isApprovalInstanceSortTimeField(value: string): value is ApprovalInstanceSortTimeField;
|
|
21
|
+
export declare function isFilterableFieldType(type: FormFieldDefinition['type'], placement?: 'column' | 'top-level'): boolean;
|
|
22
|
+
export type ApprovalInstanceFieldFilterOperator = 'CONTAINS' | 'EQUALS' | 'IN' | 'NOT_EQUALS' | 'RANGE';
|
|
23
|
+
export declare const APPROVAL_INSTANCE_FIELD_FILTER_OPERATORS: readonly ApprovalInstanceFieldFilterOperator[];
|
|
24
|
+
export interface ApprovalInstanceFieldFilter {
|
|
25
|
+
/** A top-level fieldKey, or `<tableKey>.<columnKey>` for a table column. */
|
|
26
|
+
readonly fieldKey: string;
|
|
27
|
+
readonly operator: ApprovalInstanceFieldFilterOperator;
|
|
28
|
+
/** EQUALS, NOT_EQUALS and CONTAINS read the first value; IN reads them all. */
|
|
29
|
+
readonly values?: readonly string[];
|
|
30
|
+
/** RANGE lower bound, inclusive. Decimal string, `YYYY-MM-DD` or ISO 8601. */
|
|
31
|
+
readonly from?: string;
|
|
32
|
+
/** RANGE upper bound, inclusive. */
|
|
33
|
+
readonly to?: string;
|
|
34
|
+
}
|
|
35
|
+
export type ApprovalInstanceSortDirection = 'ASC' | 'DESC';
|
|
36
|
+
export interface ApprovalInstanceSort {
|
|
37
|
+
/** A top-level filterable fieldKey, or one of {@link APPROVAL_INSTANCE_SORT_TIME_FIELDS}. */
|
|
38
|
+
readonly field: string;
|
|
39
|
+
readonly direction?: ApprovalInstanceSortDirection;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* How a filterable value is stored and compared. Several field types share a
|
|
43
|
+
* kind: `money` compares like `number`, and every option-like field compares
|
|
44
|
+
* by its stored value.
|
|
45
|
+
*/
|
|
46
|
+
export type FilterableValueKind = 'boolean' | 'date' | 'datetime' | 'member' | 'number' | 'option' | 'org_unit' | 'text';
|
|
47
|
+
export declare function readFilterableValueKind(type: FormFieldDefinition['type']): FilterableValueKind | null;
|
|
48
|
+
/** Operators a field type accepts (ADR 25 §7.2). */
|
|
49
|
+
export declare function readFilterOperatorsForFieldType(type: FormFieldDefinition['type']): readonly ApprovalInstanceFieldFilterOperator[];
|
|
50
|
+
/** A filterable top-level field can be sorted on; a table column cannot (ADR 25 §7.5). */
|
|
51
|
+
export declare function isFilterableFieldSortable(path: FilterableFieldPath): boolean;
|
|
52
|
+
/** One filterable field, top-level or table column, as the list query sees it. */
|
|
53
|
+
export interface FilterableFieldPath {
|
|
54
|
+
/** `fieldKey`, or `<tableKey>.<columnKey>`. */
|
|
55
|
+
readonly path: string;
|
|
56
|
+
readonly tableKey: string | null;
|
|
57
|
+
/** The key inside a row for a column; the fieldKey for a top-level field. */
|
|
58
|
+
readonly key: string;
|
|
59
|
+
readonly field: FormFieldDefinition | TableColumnDefinition;
|
|
60
|
+
readonly kind: FilterableValueKind;
|
|
61
|
+
readonly label: string;
|
|
62
|
+
/** Static options and their labels; `null` for a data-source or non-option field. */
|
|
63
|
+
readonly staticOptions: readonly FormFieldOption[] | null;
|
|
64
|
+
/** Labels live in the instance's option snapshot (a top-level data-source field). */
|
|
65
|
+
readonly usesOptionSnapshot: boolean;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* The fields of `schema` a list query may filter on: every field (or table
|
|
69
|
+
* column) marked `filterable` whose type allows it. A field marked filterable
|
|
70
|
+
* with a type that does not allow it is skipped here; the schema lint reports
|
|
71
|
+
* it.
|
|
72
|
+
*/
|
|
73
|
+
export declare function readFilterableFieldPaths(schema: FormDefinitionSchema | null | undefined): readonly FilterableFieldPath[];
|
|
74
|
+
export declare function findFilterableFieldPath(schema: FormDefinitionSchema | null | undefined, path: string): FilterableFieldPath | null;
|
|
75
|
+
/**
|
|
76
|
+
* Every field and column of a schema by path, filterable or not. The enable
|
|
77
|
+
* check compares a new filterable field against what older versions stored
|
|
78
|
+
* at the same path, whether or not they were filterable then.
|
|
79
|
+
*/
|
|
80
|
+
export declare function readFormFieldTypesByPath(schema: FormDefinitionSchema | null | undefined): ReadonlyMap<string, FormFieldDefinition['type']>;
|
|
81
|
+
export type FilterableValueCheck = {
|
|
82
|
+
readonly status: 'empty';
|
|
83
|
+
} | {
|
|
84
|
+
readonly status: 'valid';
|
|
85
|
+
} | {
|
|
86
|
+
readonly status: 'invalid';
|
|
87
|
+
readonly expected: string;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Whether one stored value fits a filterable field (ADR 25 §5.4, §6).
|
|
91
|
+
*
|
|
92
|
+
* - Missing and `null` are "no value". So is `""` for a number, money, date,
|
|
93
|
+
* datetime or boolean field (a cleared input), and `[]` for a multi-value
|
|
94
|
+
* field.
|
|
95
|
+
* - An option or member field accepts a string or an array of strings either
|
|
96
|
+
* way: its `mode` / `multiple` may change between versions without changing
|
|
97
|
+
* its type, and the query matches both shapes.
|
|
98
|
+
*/
|
|
99
|
+
export declare function checkFilterableFieldValue(field: FormFieldDefinition | TableColumnDefinition, value: unknown): FilterableValueCheck;
|
|
100
|
+
export declare function isCanonicalDate(value: unknown): value is string;
|
|
101
|
+
export declare function isCanonicalDateTime(value: unknown): value is string;
|
|
102
|
+
/**
|
|
103
|
+
* A value inside a filterable path that does not fit its field. `path` is the
|
|
104
|
+
* top-level fieldKey, `<tableKey>.<columnKey>` for a bad cell, or the bare
|
|
105
|
+
* `tableKey` when the table itself (or one of its rows) is malformed.
|
|
106
|
+
*/
|
|
107
|
+
export interface FilterableValueProblem {
|
|
108
|
+
readonly path: string;
|
|
109
|
+
/** Index of the table row, or `null` for a top-level field. */
|
|
110
|
+
readonly rowIndex: number | null;
|
|
111
|
+
readonly value: unknown;
|
|
112
|
+
readonly expected: string;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Every value in `formData` that does not fit one of `paths`. Used both when
|
|
116
|
+
* writing (refuse the write) and when enabling a field (refuse to enable while
|
|
117
|
+
* old instances hold such values). A table that is not an array, or a row that
|
|
118
|
+
* is not an object, is a problem of every filterable column in it.
|
|
119
|
+
*/
|
|
120
|
+
export declare function readFilterableValueProblems(paths: readonly FilterableFieldPath[], formData: Readonly<Record<string, unknown>> | null | undefined): readonly FilterableValueProblem[];
|
|
121
|
+
/** A field that would become filterable but whose history forbids it. */
|
|
122
|
+
export type FilterableFieldIssue = {
|
|
123
|
+
readonly kind: 'TYPE_CHANGED';
|
|
124
|
+
readonly path: string;
|
|
125
|
+
readonly label: string;
|
|
126
|
+
readonly type: FormFieldDefinition['type'];
|
|
127
|
+
/** Older versions, still holding instances, that stored another type here. */
|
|
128
|
+
readonly conflicts: readonly {
|
|
129
|
+
readonly versionNumber: number;
|
|
130
|
+
readonly type: FormFieldDefinition['type'];
|
|
131
|
+
}[];
|
|
132
|
+
} | {
|
|
133
|
+
readonly kind: 'INVALID_VALUES';
|
|
134
|
+
readonly path: string;
|
|
135
|
+
readonly label: string;
|
|
136
|
+
readonly type: FormFieldDefinition['type'];
|
|
137
|
+
readonly invalidInstanceCount: number;
|
|
138
|
+
/**
|
|
139
|
+
* The first few, for the message. The stored value is deliberately not
|
|
140
|
+
* carried: the issue reaches designers who may not read the instance.
|
|
141
|
+
*/
|
|
142
|
+
readonly samples: readonly {
|
|
143
|
+
readonly instanceId: string;
|
|
144
|
+
readonly rowIndex: number | null;
|
|
145
|
+
readonly expected: string;
|
|
146
|
+
}[];
|
|
147
|
+
};
|
|
148
|
+
export declare const FILTERABLE_FIELD_ISSUE_SAMPLE_LIMIT = 5;
|
|
149
|
+
/**
|
|
150
|
+
* The enable check (ADR 25 §5.4), pure: given the schema about to take effect,
|
|
151
|
+
* the schemas of older versions that hold instances, and those instances'
|
|
152
|
+
* form data, report every filterable field that may not be enabled.
|
|
153
|
+
*/
|
|
154
|
+
export declare function readFilterableFieldIssues(input: {
|
|
155
|
+
readonly schema: FormDefinitionSchema | null | undefined;
|
|
156
|
+
readonly history: readonly {
|
|
157
|
+
readonly versionNumber: number;
|
|
158
|
+
readonly schema: FormDefinitionSchema | null | undefined;
|
|
159
|
+
}[];
|
|
160
|
+
readonly instances: readonly {
|
|
161
|
+
readonly id: string;
|
|
162
|
+
readonly formData: Readonly<Record<string, unknown>> | null | undefined;
|
|
163
|
+
}[];
|
|
164
|
+
}): readonly FilterableFieldIssue[];
|
|
165
|
+
/** One line per issue, in the words the designer and the publish error use. */
|
|
166
|
+
export declare function describeFilterableFieldIssue(issue: FilterableFieldIssue): string;
|