@fieldia/core 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/schema/page.schema.json +430 -17
- package/src/index.d.mts +5 -14
- package/src/index.d.ts +5 -14
- package/src/index.js +4 -28
- package/src/index.js.map +1 -1
- package/src/index.mjs +4 -11
- package/src/index.mjs.map +1 -1
- package/src/lib/format/check-page.d.mts +9 -0
- package/src/lib/format/check-page.d.ts +9 -0
- package/src/lib/format/check-page.js +54 -0
- package/src/lib/format/check-page.js.map +1 -0
- package/src/lib/format/check-page.mjs +51 -0
- package/src/lib/format/check-page.mjs.map +1 -0
- package/src/lib/format/columns.d.mts +3 -0
- package/src/lib/format/columns.d.ts +3 -0
- package/src/lib/format/columns.js +8 -0
- package/src/lib/format/columns.js.map +1 -0
- package/src/lib/format/columns.mjs +5 -0
- package/src/lib/format/columns.mjs.map +1 -0
- package/src/lib/format/field.d.mts +163 -35
- package/src/lib/format/field.d.ts +163 -35
- package/src/lib/format/field.js +36 -38
- package/src/lib/format/field.js.map +1 -1
- package/src/lib/format/field.mjs +25 -29
- package/src/lib/format/field.mjs.map +1 -1
- package/src/lib/format/layout.d.mts +216 -3
- package/src/lib/format/layout.d.ts +216 -3
- package/src/lib/format/layout.js +19 -3
- package/src/lib/format/layout.js.map +1 -1
- package/src/lib/format/layout.mjs +17 -2
- package/src/lib/format/layout.mjs.map +1 -1
- package/src/lib/format/names.d.mts +5 -0
- package/src/lib/format/names.d.ts +5 -0
- package/src/lib/format/names.js +27 -0
- package/src/lib/format/names.js.map +1 -0
- package/src/lib/format/names.mjs +24 -0
- package/src/lib/format/names.mjs.map +1 -0
- package/src/lib/format/page.d.mts +132 -10
- package/src/lib/format/page.d.ts +132 -10
- package/src/lib/format/page.js +6 -3
- package/src/lib/format/page.js.map +1 -1
- package/src/lib/format/page.mjs +4 -2
- package/src/lib/format/page.mjs.map +1 -1
- package/src/lib/format/references.d.mts +35 -0
- package/src/lib/format/references.d.ts +35 -0
- package/src/lib/format/references.js +278 -0
- package/src/lib/format/references.js.map +1 -0
- package/src/lib/format/references.mjs +274 -0
- package/src/lib/format/references.mjs.map +1 -0
- package/src/lib/format/translate.d.mts +8 -0
- package/src/lib/format/translate.d.ts +8 -0
- package/src/lib/format/translate.js +36 -0
- package/src/lib/format/translate.js.map +1 -0
- package/src/lib/format/translate.mjs +33 -0
- package/src/lib/format/translate.mjs.map +1 -0
- package/src/lib/format/validate.d.mts +2 -13
- package/src/lib/format/validate.d.ts +2 -13
- package/src/lib/format/validate.js +2 -258
- package/src/lib/format/validate.js.map +1 -1
- package/src/lib/format/validate.mjs +1 -257
- package/src/lib/format/validate.mjs.map +1 -1
- package/src/lib/format/version.d.mts +2 -0
- package/src/lib/format/version.d.ts +2 -0
- package/src/lib/format/version.js +6 -0
- package/src/lib/format/version.js.map +1 -0
- package/src/lib/format/version.mjs +3 -0
- package/src/lib/format/version.mjs.map +1 -0
- package/src/lib/record/data-source.d.mts +27 -1
- package/src/lib/record/data-source.d.ts +27 -1
- package/src/lib/record/data-source.js +16 -0
- package/src/lib/record/data-source.js.map +1 -1
- package/src/lib/record/data-source.mjs +14 -1
- package/src/lib/record/data-source.mjs.map +1 -1
- package/src/lib/record/filter.d.mts +8 -0
- package/src/lib/record/filter.d.ts +8 -0
- package/src/lib/record/filter.js +66 -0
- package/src/lib/record/filter.js.map +1 -0
- package/src/lib/record/filter.mjs +63 -0
- package/src/lib/record/filter.mjs.map +1 -0
- package/src/lib/record/form.d.mts +15 -1
- package/src/lib/record/form.d.ts +15 -1
- package/src/lib/record/form.js +103 -14
- package/src/lib/record/form.js.map +1 -1
- package/src/lib/record/form.mjs +103 -14
- package/src/lib/record/form.mjs.map +1 -1
- package/src/lib/record/memory-data-source.js +2 -28
- package/src/lib/record/memory-data-source.js.map +1 -1
- package/src/lib/record/memory-data-source.mjs +2 -28
- package/src/lib/record/memory-data-source.mjs.map +1 -1
- package/src/runtime.d.mts +26 -0
- package/src/runtime.d.ts +26 -0
- package/src/runtime.js +44 -0
- package/src/runtime.js.map +1 -0
- package/src/runtime.mjs +16 -0
- package/src/runtime.mjs.map +1 -0
package/src/index.mjs
CHANGED
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
1
|
+
export * from './runtime.mjs';
|
|
2
|
+
export { FieldSchema, FieldsSchema, LineFieldSchema, LineKindsSchema, OptionSchema, PropertyDefinitionSchema, FilterConditionSchema, FilterItemSchema, } from './lib/format/field.mjs';
|
|
3
|
+
export { ModifierSchema, LayoutNodeSchema, RootLayoutSchema } from './lib/format/layout.mjs';
|
|
4
|
+
export { PageSchema } from './lib/format/page.mjs';
|
|
4
5
|
export { validatePage } from './lib/format/validate.mjs';
|
|
5
6
|
export { pageJsonSchema } from './lib/format/json-schema.mjs';
|
|
6
|
-
export { compileModifier } from './lib/expression/modifier.mjs';
|
|
7
|
-
export { evaluateModifier, isModifierValid } from './lib/expression/evaluateModifier.mjs';
|
|
8
|
-
export { emptyValue, initialValues, isEmpty, expressionContext, lineKind, } from './lib/record/values.mjs';
|
|
9
|
-
export { checkValue, formatBytes } from './lib/record/check.mjs';
|
|
10
|
-
export { createMemoryDataSource } from './lib/record/memory-data-source.mjs';
|
|
11
|
-
export { hostScheduler, wait } from './lib/record/scheduler.mjs';
|
|
12
|
-
export { createForm, } from './lib/record/form.mjs';
|
|
13
|
-
export { MESSAGES, fill } from './lib/record/messages.mjs';
|
|
14
7
|
//# sourceMappingURL=index.mjs.map
|
package/src/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../libs/core/src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../../libs/core/src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,OAAO,EACL,WAAW,EACX,YAAY,EACZ,eAAe,EACf,eAAe,EACf,YAAY,EACZ,wBAAwB,EACxB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type PageValidation } from './references.mjs';
|
|
2
|
+
/**
|
|
3
|
+
* The check a page gets as it is shown: its outline, then every name and
|
|
4
|
+
* condition in it, the same as `validatePage` finds them. It leaves out the
|
|
5
|
+
* key-by-key check of the format, and so the validation library, which an app
|
|
6
|
+
* showing forms need not carry; run `validatePage` where pages are made or
|
|
7
|
+
* tested. A page that passes is handed back as it is.
|
|
8
|
+
*/
|
|
9
|
+
export declare function checkPage(input: unknown): PageValidation;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type PageValidation } from './references';
|
|
2
|
+
/**
|
|
3
|
+
* The check a page gets as it is shown: its outline, then every name and
|
|
4
|
+
* condition in it, the same as `validatePage` finds them. It leaves out the
|
|
5
|
+
* key-by-key check of the format, and so the validation library, which an app
|
|
6
|
+
* showing forms need not carry; run `validatePage` where pages are made or
|
|
7
|
+
* tested. A page that passes is handed back as it is.
|
|
8
|
+
*/
|
|
9
|
+
export declare function checkPage(input: unknown): PageValidation;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkPage = checkPage;
|
|
4
|
+
const names_1 = require("./names");
|
|
5
|
+
const references_1 = require("./references");
|
|
6
|
+
const version_1 = require("./version");
|
|
7
|
+
const isObject = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
8
|
+
const LAYOUTS = ['sheet', 'sections', 'tabs', 'wizard'];
|
|
9
|
+
/**
|
|
10
|
+
* The check a page gets as it is shown: its outline, then every name and
|
|
11
|
+
* condition in it, the same as `validatePage` finds them. It leaves out the
|
|
12
|
+
* key-by-key check of the format, and so the validation library, which an app
|
|
13
|
+
* showing forms need not carry; run `validatePage` where pages are made or
|
|
14
|
+
* tested. A page that passes is handed back as it is.
|
|
15
|
+
*/
|
|
16
|
+
function checkPage(input) {
|
|
17
|
+
if (!isObject(input))
|
|
18
|
+
return { ok: false, issues: [{ path: '(page)', message: 'a page is a JSON object' }] };
|
|
19
|
+
const issues = [];
|
|
20
|
+
const say = (path, message) => issues.push({ path, message });
|
|
21
|
+
if (input['fieldia'] !== version_1.FORMAT_VERSION)
|
|
22
|
+
say('fieldia', `this build reads format ${version_1.FORMAT_VERSION}`);
|
|
23
|
+
if (typeof input['id'] !== 'string' || !input['id'])
|
|
24
|
+
say('id', 'a page needs an id');
|
|
25
|
+
const data = input['data'];
|
|
26
|
+
if (!isObject(data) || !(data['kind'] === 'responses' || (data['kind'] === 'record' && typeof data['model'] === 'string' && data['model']))) {
|
|
27
|
+
say('data', 'data is { "kind": "record", "model": … } or { "kind": "responses" }');
|
|
28
|
+
}
|
|
29
|
+
const fields = input['fields'];
|
|
30
|
+
if (!isObject(fields))
|
|
31
|
+
say('fields', 'fields is an object of field definitions, by name');
|
|
32
|
+
else {
|
|
33
|
+
for (const [name, def] of Object.entries(fields)) {
|
|
34
|
+
if (!isObject(def) || !names_1.FIELD_TYPES.includes(def['type']) || typeof def['label'] !== 'string') {
|
|
35
|
+
say(`fields.${name}`, 'a field needs a type Fieldia knows and a label');
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const layout = input['layout'];
|
|
40
|
+
if (!isObject(layout) || !LAYOUTS.includes(layout['type']) || !Array.isArray(layout['children'])) {
|
|
41
|
+
say('layout', 'the layout is a sheet, sections, tabs or wizard, with children');
|
|
42
|
+
}
|
|
43
|
+
if (issues.length)
|
|
44
|
+
return { ok: false, issues };
|
|
45
|
+
const page = input;
|
|
46
|
+
try {
|
|
47
|
+
const found = new references_1.ReferenceCheck(page).run();
|
|
48
|
+
return found.length ? { ok: false, issues: found } : { ok: true, page };
|
|
49
|
+
}
|
|
50
|
+
catch (error) {
|
|
51
|
+
return { ok: false, issues: [{ path: '(page)', message: `a part of this page cannot be read: ${error.message}` }] };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=check-page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-page.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/check-page.ts"],"names":[],"mappings":";;AAeA,8BA+BC;AA9CD,mCAAsC;AAEtC,6CAAmF;AACnF,uCAA2C;AAE3C,MAAM,QAAQ,GAAG,CAAC,KAAc,EAAoC,EAAE,CAAC,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC5I,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;AAExD;;;;;;GAMG;AACH,SAAgB,SAAS,CAAC,KAAc;IACtC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,yBAAyB,EAAE,CAAC,EAAE,CAAC;IAC7G,MAAM,MAAM,GAAgB,EAAE,CAAC;IAC/B,MAAM,GAAG,GAAG,CAAC,IAAY,EAAE,OAAe,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;IAC9E,IAAI,KAAK,CAAC,SAAS,CAAC,KAAK,wBAAc;QAAE,GAAG,CAAC,SAAS,EAAE,2BAA2B,wBAAc,EAAE,CAAC,CAAC;IACrG,IAAI,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;QAAE,GAAG,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC;IACrF,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,WAAW,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,QAAQ,IAAI,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5I,GAAG,CAAC,MAAM,EAAE,qEAAqE,CAAC,CAAC;IACrF,CAAC;IACD,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC/B,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,GAAG,CAAC,QAAQ,EAAE,mDAAmD,CAAC,CAAC;SACrF,CAAC;QACJ,KAAK,MAAM,CAAC,IAAI,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACjD,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAE,mBAAkC,CAAC,QAAQ,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,OAAO,GAAG,CAAC,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;gBACrH,GAAG,CAAC,UAAU,IAAI,EAAE,EAAE,gDAAgD,CAAC,CAAC;YAC1E,CAAC;QACH,CAAC;IACH,CAAC;IACD,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC/B,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAW,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,EAAE,CAAC;QAC3G,GAAG,CAAC,QAAQ,EAAE,gEAAgE,CAAC,CAAC;IAClF,CAAC;IACD,IAAI,MAAM,CAAC,MAAM;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC;IAChD,MAAM,IAAI,GAAG,KAAwB,CAAC;IACtC,IAAI,CAAC;QACH,MAAM,KAAK,GAAG,IAAI,2BAAc,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,CAAC;QAC7C,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;IAC1E,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,uCAAwC,KAAe,CAAC,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC;IACjI,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { FIELD_TYPES } from './names.mjs';
|
|
2
|
+
import { ReferenceCheck } from './references.mjs';
|
|
3
|
+
import { FORMAT_VERSION } from './version.mjs';
|
|
4
|
+
const isObject = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
5
|
+
const LAYOUTS = ['sheet', 'sections', 'tabs', 'wizard'];
|
|
6
|
+
/**
|
|
7
|
+
* The check a page gets as it is shown: its outline, then every name and
|
|
8
|
+
* condition in it, the same as `validatePage` finds them. It leaves out the
|
|
9
|
+
* key-by-key check of the format, and so the validation library, which an app
|
|
10
|
+
* showing forms need not carry; run `validatePage` where pages are made or
|
|
11
|
+
* tested. A page that passes is handed back as it is.
|
|
12
|
+
*/
|
|
13
|
+
export function checkPage(input) {
|
|
14
|
+
if (!isObject(input))
|
|
15
|
+
return { ok: false, issues: [{ path: '(page)', message: 'a page is a JSON object' }] };
|
|
16
|
+
const issues = [];
|
|
17
|
+
const say = (path, message) => issues.push({ path, message });
|
|
18
|
+
if (input['fieldia'] !== FORMAT_VERSION)
|
|
19
|
+
say('fieldia', `this build reads format ${FORMAT_VERSION}`);
|
|
20
|
+
if (typeof input['id'] !== 'string' || !input['id'])
|
|
21
|
+
say('id', 'a page needs an id');
|
|
22
|
+
const data = input['data'];
|
|
23
|
+
if (!isObject(data) || !(data['kind'] === 'responses' || (data['kind'] === 'record' && typeof data['model'] === 'string' && data['model']))) {
|
|
24
|
+
say('data', 'data is { "kind": "record", "model": … } or { "kind": "responses" }');
|
|
25
|
+
}
|
|
26
|
+
const fields = input['fields'];
|
|
27
|
+
if (!isObject(fields))
|
|
28
|
+
say('fields', 'fields is an object of field definitions, by name');
|
|
29
|
+
else {
|
|
30
|
+
for (const [name, def] of Object.entries(fields)) {
|
|
31
|
+
if (!isObject(def) || !FIELD_TYPES.includes(def['type']) || typeof def['label'] !== 'string') {
|
|
32
|
+
say(`fields.${name}`, 'a field needs a type Fieldia knows and a label');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const layout = input['layout'];
|
|
37
|
+
if (!isObject(layout) || !LAYOUTS.includes(layout['type']) || !Array.isArray(layout['children'])) {
|
|
38
|
+
say('layout', 'the layout is a sheet, sections, tabs or wizard, with children');
|
|
39
|
+
}
|
|
40
|
+
if (issues.length)
|
|
41
|
+
return { ok: false, issues };
|
|
42
|
+
const page = input;
|
|
43
|
+
try {
|
|
44
|
+
const found = new ReferenceCheck(page).run();
|
|
45
|
+
return found.length ? { ok: false, issues: found } : { ok: true, page };
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
return { ok: false, issues: [{ path: '(page)', message: `a part of this page cannot be read: ${error.message}` }] };
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=check-page.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check-page.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/check-page.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wideColumns = wideColumns;
|
|
4
|
+
/** A section's columns at full width, whichever way they are written. */
|
|
5
|
+
function wideColumns(columns) {
|
|
6
|
+
return typeof columns === 'object' ? columns.wide : columns ?? 1;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=columns.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"columns.js","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/columns.ts"],"names":[],"mappings":";;AAGA,kCAEC;AAHD,yEAAyE;AACzE,SAAgB,WAAW,CAAC,OAAiD;IAC3E,OAAO,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"columns.mjs","sourceRoot":"","sources":["../../../../../../libs/core/src/lib/format/columns.ts"],"names":[],"mappings":"AAEA,yEAAyE;AACzE,MAAM,UAAU,WAAW,CAAC,OAAiD;IAC3E,OAAO,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC;AACnE,CAAC"}
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
import * as z from 'zod';
|
|
2
|
-
|
|
3
|
-
* Field definitions: what a page knows about each value it shows or collects.
|
|
4
|
-
*
|
|
5
|
-
* A page declares its fields once, by name, and its layout points at them —
|
|
6
|
-
* the same split a backend's own field metadata uses, so an app can generate
|
|
7
|
-
* these definitions from it. Names follow Fieldia's naming rule: a backend's
|
|
8
|
-
* vocabulary stays unless it is a product name, jargon, or a clash.
|
|
9
|
-
*/
|
|
10
|
-
/** A field name: what expressions and layout nodes use to refer to a field. */
|
|
11
|
-
export declare const FIELD_NAME: RegExp;
|
|
12
|
-
export declare const FIELD_TYPES: readonly ["char", "text", "html", "integer", "float", "monetary", "boolean", "date", "datetime", "selection", "binary", "image", "many2one", "many2many", "one2many", "reference", "properties", "json"];
|
|
13
|
-
export type FieldType = (typeof FIELD_TYPES)[number];
|
|
2
|
+
export { FIELD_NAME, FIELD_TYPES, type FieldType } from './names.mjs';
|
|
14
3
|
/** One choice in a selection or reference. */
|
|
15
4
|
export declare const OptionSchema: z.ZodObject<{
|
|
16
5
|
value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
|
|
@@ -18,13 +7,16 @@ export declare const OptionSchema: z.ZodObject<{
|
|
|
18
7
|
}, z.core.$strict>;
|
|
19
8
|
export type Option = z.infer<typeof OptionSchema>;
|
|
20
9
|
/**
|
|
21
|
-
* One condition limiting which records a relation may point to.
|
|
22
|
-
*
|
|
23
|
-
*
|
|
10
|
+
* One condition limiting which records a relation may point to. `valueFrom`
|
|
11
|
+
* compares against another field of the record being edited, so a region list
|
|
12
|
+
* can follow the chosen country. `like` finds text inside; `ilike`,
|
|
13
|
+
* `startswith` and `endswith` whatever the case; `set` and `notset` take no
|
|
14
|
+
* value; `between` takes `[low, high]`, both ends included.
|
|
24
15
|
*/
|
|
25
16
|
export declare const FilterConditionSchema: z.ZodObject<{
|
|
26
17
|
field: z.ZodString;
|
|
27
18
|
op: z.ZodEnum<{
|
|
19
|
+
set: "set";
|
|
28
20
|
"=": "=";
|
|
29
21
|
"!=": "!=";
|
|
30
22
|
"<": "<";
|
|
@@ -35,11 +27,57 @@ export declare const FilterConditionSchema: z.ZodObject<{
|
|
|
35
27
|
"not in": "not in";
|
|
36
28
|
like: "like";
|
|
37
29
|
ilike: "ilike";
|
|
30
|
+
startswith: "startswith";
|
|
31
|
+
endswith: "endswith";
|
|
32
|
+
notset: "notset";
|
|
33
|
+
between: "between";
|
|
38
34
|
}>;
|
|
39
35
|
value: z.ZodOptional<z.ZodJSONSchema>;
|
|
40
36
|
valueFrom: z.ZodOptional<z.ZodString>;
|
|
41
37
|
}, z.core.$strict>;
|
|
42
38
|
export type FilterCondition = z.infer<typeof FilterConditionSchema>;
|
|
39
|
+
/**
|
|
40
|
+
* What a filter holds: conditions, and groups of them. The items of a filter
|
|
41
|
+
* all apply together; an `any` group holds when one of its items does, an
|
|
42
|
+
* `all` group when each does, and groups nest.
|
|
43
|
+
*/
|
|
44
|
+
export type FilterItem = FilterCondition | {
|
|
45
|
+
any: FilterItem[];
|
|
46
|
+
} | {
|
|
47
|
+
all: FilterItem[];
|
|
48
|
+
};
|
|
49
|
+
export declare const FilterAnySchema: z.ZodObject<{
|
|
50
|
+
any: z.ZodArray<typeof FilterItemSchema>;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
export declare const FilterAllSchema: z.ZodObject<{
|
|
53
|
+
all: z.ZodArray<typeof FilterItemSchema>;
|
|
54
|
+
}, z.core.$strict>;
|
|
55
|
+
export declare const FilterItemSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
56
|
+
field: z.ZodString;
|
|
57
|
+
op: z.ZodEnum<{
|
|
58
|
+
set: "set";
|
|
59
|
+
"=": "=";
|
|
60
|
+
"!=": "!=";
|
|
61
|
+
"<": "<";
|
|
62
|
+
">": ">";
|
|
63
|
+
"<=": "<=";
|
|
64
|
+
">=": ">=";
|
|
65
|
+
in: "in";
|
|
66
|
+
"not in": "not in";
|
|
67
|
+
like: "like";
|
|
68
|
+
ilike: "ilike";
|
|
69
|
+
startswith: "startswith";
|
|
70
|
+
endswith: "endswith";
|
|
71
|
+
notset: "notset";
|
|
72
|
+
between: "between";
|
|
73
|
+
}>;
|
|
74
|
+
value: z.ZodOptional<z.ZodJSONSchema>;
|
|
75
|
+
valueFrom: z.ZodOptional<z.ZodString>;
|
|
76
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
77
|
+
any: z.ZodArray<typeof FilterItemSchema>;
|
|
78
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
79
|
+
all: z.ZodArray<typeof FilterItemSchema>;
|
|
80
|
+
}, z.core.$strict>]>;
|
|
43
81
|
/** One property of a properties field: its own small field, edited with the widget for its type. */
|
|
44
82
|
export declare const PropertyDefinitionSchema: z.ZodObject<{
|
|
45
83
|
name: z.ZodString;
|
|
@@ -167,9 +205,10 @@ export declare const LineFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
167
205
|
type: z.ZodLiteral<"image">;
|
|
168
206
|
}, z.core.$strict>, z.ZodObject<{
|
|
169
207
|
relation: z.ZodString;
|
|
170
|
-
filter: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
208
|
+
filter: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
171
209
|
field: z.ZodString;
|
|
172
210
|
op: z.ZodEnum<{
|
|
211
|
+
set: "set";
|
|
173
212
|
"=": "=";
|
|
174
213
|
"!=": "!=";
|
|
175
214
|
"<": "<";
|
|
@@ -180,10 +219,18 @@ export declare const LineFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
180
219
|
"not in": "not in";
|
|
181
220
|
like: "like";
|
|
182
221
|
ilike: "ilike";
|
|
222
|
+
startswith: "startswith";
|
|
223
|
+
endswith: "endswith";
|
|
224
|
+
notset: "notset";
|
|
225
|
+
between: "between";
|
|
183
226
|
}>;
|
|
184
227
|
value: z.ZodOptional<z.ZodJSONSchema>;
|
|
185
228
|
valueFrom: z.ZodOptional<z.ZodString>;
|
|
186
|
-
}, z.core.$strict
|
|
229
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
230
|
+
any: z.ZodArray<typeof FilterItemSchema>;
|
|
231
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
232
|
+
all: z.ZodArray<typeof FilterItemSchema>;
|
|
233
|
+
}, z.core.$strict>]>>>;
|
|
187
234
|
label: z.ZodString;
|
|
188
235
|
help: z.ZodOptional<z.ZodString>;
|
|
189
236
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -192,9 +239,10 @@ export declare const LineFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
192
239
|
type: z.ZodLiteral<"many2one">;
|
|
193
240
|
}, z.core.$strict>, z.ZodObject<{
|
|
194
241
|
relation: z.ZodString;
|
|
195
|
-
filter: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
242
|
+
filter: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
196
243
|
field: z.ZodString;
|
|
197
244
|
op: z.ZodEnum<{
|
|
245
|
+
set: "set";
|
|
198
246
|
"=": "=";
|
|
199
247
|
"!=": "!=";
|
|
200
248
|
"<": "<";
|
|
@@ -205,10 +253,18 @@ export declare const LineFieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
205
253
|
"not in": "not in";
|
|
206
254
|
like: "like";
|
|
207
255
|
ilike: "ilike";
|
|
256
|
+
startswith: "startswith";
|
|
257
|
+
endswith: "endswith";
|
|
258
|
+
notset: "notset";
|
|
259
|
+
between: "between";
|
|
208
260
|
}>;
|
|
209
261
|
value: z.ZodOptional<z.ZodJSONSchema>;
|
|
210
262
|
valueFrom: z.ZodOptional<z.ZodString>;
|
|
211
|
-
}, z.core.$strict
|
|
263
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
264
|
+
any: z.ZodArray<typeof FilterItemSchema>;
|
|
265
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
266
|
+
all: z.ZodArray<typeof FilterItemSchema>;
|
|
267
|
+
}, z.core.$strict>]>>>;
|
|
212
268
|
label: z.ZodString;
|
|
213
269
|
help: z.ZodOptional<z.ZodString>;
|
|
214
270
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -378,9 +434,10 @@ export declare const FieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
378
434
|
type: z.ZodLiteral<"image">;
|
|
379
435
|
}, z.core.$strict>, z.ZodObject<{
|
|
380
436
|
relation: z.ZodString;
|
|
381
|
-
filter: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
437
|
+
filter: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
382
438
|
field: z.ZodString;
|
|
383
439
|
op: z.ZodEnum<{
|
|
440
|
+
set: "set";
|
|
384
441
|
"=": "=";
|
|
385
442
|
"!=": "!=";
|
|
386
443
|
"<": "<";
|
|
@@ -391,10 +448,18 @@ export declare const FieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
391
448
|
"not in": "not in";
|
|
392
449
|
like: "like";
|
|
393
450
|
ilike: "ilike";
|
|
451
|
+
startswith: "startswith";
|
|
452
|
+
endswith: "endswith";
|
|
453
|
+
notset: "notset";
|
|
454
|
+
between: "between";
|
|
394
455
|
}>;
|
|
395
456
|
value: z.ZodOptional<z.ZodJSONSchema>;
|
|
396
457
|
valueFrom: z.ZodOptional<z.ZodString>;
|
|
397
|
-
}, z.core.$strict
|
|
458
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
459
|
+
any: z.ZodArray<typeof FilterItemSchema>;
|
|
460
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
461
|
+
all: z.ZodArray<typeof FilterItemSchema>;
|
|
462
|
+
}, z.core.$strict>]>>>;
|
|
398
463
|
label: z.ZodString;
|
|
399
464
|
help: z.ZodOptional<z.ZodString>;
|
|
400
465
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -403,9 +468,10 @@ export declare const FieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
403
468
|
type: z.ZodLiteral<"many2one">;
|
|
404
469
|
}, z.core.$strict>, z.ZodObject<{
|
|
405
470
|
relation: z.ZodString;
|
|
406
|
-
filter: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
471
|
+
filter: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
407
472
|
field: z.ZodString;
|
|
408
473
|
op: z.ZodEnum<{
|
|
474
|
+
set: "set";
|
|
409
475
|
"=": "=";
|
|
410
476
|
"!=": "!=";
|
|
411
477
|
"<": "<";
|
|
@@ -416,10 +482,18 @@ export declare const FieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
416
482
|
"not in": "not in";
|
|
417
483
|
like: "like";
|
|
418
484
|
ilike: "ilike";
|
|
485
|
+
startswith: "startswith";
|
|
486
|
+
endswith: "endswith";
|
|
487
|
+
notset: "notset";
|
|
488
|
+
between: "between";
|
|
419
489
|
}>;
|
|
420
490
|
value: z.ZodOptional<z.ZodJSONSchema>;
|
|
421
491
|
valueFrom: z.ZodOptional<z.ZodString>;
|
|
422
|
-
}, z.core.$strict
|
|
492
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
493
|
+
any: z.ZodArray<typeof FilterItemSchema>;
|
|
494
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
495
|
+
all: z.ZodArray<typeof FilterItemSchema>;
|
|
496
|
+
}, z.core.$strict>]>>>;
|
|
423
497
|
label: z.ZodString;
|
|
424
498
|
help: z.ZodOptional<z.ZodString>;
|
|
425
499
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -535,9 +609,10 @@ export declare const FieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
535
609
|
type: z.ZodLiteral<"image">;
|
|
536
610
|
}, z.core.$strict>, z.ZodObject<{
|
|
537
611
|
relation: z.ZodString;
|
|
538
|
-
filter: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
612
|
+
filter: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
539
613
|
field: z.ZodString;
|
|
540
614
|
op: z.ZodEnum<{
|
|
615
|
+
set: "set";
|
|
541
616
|
"=": "=";
|
|
542
617
|
"!=": "!=";
|
|
543
618
|
"<": "<";
|
|
@@ -548,10 +623,18 @@ export declare const FieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
548
623
|
"not in": "not in";
|
|
549
624
|
like: "like";
|
|
550
625
|
ilike: "ilike";
|
|
626
|
+
startswith: "startswith";
|
|
627
|
+
endswith: "endswith";
|
|
628
|
+
notset: "notset";
|
|
629
|
+
between: "between";
|
|
551
630
|
}>;
|
|
552
631
|
value: z.ZodOptional<z.ZodJSONSchema>;
|
|
553
632
|
valueFrom: z.ZodOptional<z.ZodString>;
|
|
554
|
-
}, z.core.$strict
|
|
633
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
634
|
+
any: z.ZodArray<typeof FilterItemSchema>;
|
|
635
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
636
|
+
all: z.ZodArray<typeof FilterItemSchema>;
|
|
637
|
+
}, z.core.$strict>]>>>;
|
|
555
638
|
label: z.ZodString;
|
|
556
639
|
help: z.ZodOptional<z.ZodString>;
|
|
557
640
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -560,9 +643,10 @@ export declare const FieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
560
643
|
type: z.ZodLiteral<"many2one">;
|
|
561
644
|
}, z.core.$strict>, z.ZodObject<{
|
|
562
645
|
relation: z.ZodString;
|
|
563
|
-
filter: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
646
|
+
filter: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
564
647
|
field: z.ZodString;
|
|
565
648
|
op: z.ZodEnum<{
|
|
649
|
+
set: "set";
|
|
566
650
|
"=": "=";
|
|
567
651
|
"!=": "!=";
|
|
568
652
|
"<": "<";
|
|
@@ -573,10 +657,18 @@ export declare const FieldSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
573
657
|
"not in": "not in";
|
|
574
658
|
like: "like";
|
|
575
659
|
ilike: "ilike";
|
|
660
|
+
startswith: "startswith";
|
|
661
|
+
endswith: "endswith";
|
|
662
|
+
notset: "notset";
|
|
663
|
+
between: "between";
|
|
576
664
|
}>;
|
|
577
665
|
value: z.ZodOptional<z.ZodJSONSchema>;
|
|
578
666
|
valueFrom: z.ZodOptional<z.ZodString>;
|
|
579
|
-
}, z.core.$strict
|
|
667
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
668
|
+
any: z.ZodArray<typeof FilterItemSchema>;
|
|
669
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
670
|
+
all: z.ZodArray<typeof FilterItemSchema>;
|
|
671
|
+
}, z.core.$strict>]>>>;
|
|
580
672
|
label: z.ZodString;
|
|
581
673
|
help: z.ZodOptional<z.ZodString>;
|
|
582
674
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -790,9 +882,10 @@ export declare const FieldsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUn
|
|
|
790
882
|
type: z.ZodLiteral<"image">;
|
|
791
883
|
}, z.core.$strict>, z.ZodObject<{
|
|
792
884
|
relation: z.ZodString;
|
|
793
|
-
filter: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
885
|
+
filter: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
794
886
|
field: z.ZodString;
|
|
795
887
|
op: z.ZodEnum<{
|
|
888
|
+
set: "set";
|
|
796
889
|
"=": "=";
|
|
797
890
|
"!=": "!=";
|
|
798
891
|
"<": "<";
|
|
@@ -803,10 +896,18 @@ export declare const FieldsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUn
|
|
|
803
896
|
"not in": "not in";
|
|
804
897
|
like: "like";
|
|
805
898
|
ilike: "ilike";
|
|
899
|
+
startswith: "startswith";
|
|
900
|
+
endswith: "endswith";
|
|
901
|
+
notset: "notset";
|
|
902
|
+
between: "between";
|
|
806
903
|
}>;
|
|
807
904
|
value: z.ZodOptional<z.ZodJSONSchema>;
|
|
808
905
|
valueFrom: z.ZodOptional<z.ZodString>;
|
|
809
|
-
}, z.core.$strict
|
|
906
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
907
|
+
any: z.ZodArray<typeof FilterItemSchema>;
|
|
908
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
909
|
+
all: z.ZodArray<typeof FilterItemSchema>;
|
|
910
|
+
}, z.core.$strict>]>>>;
|
|
810
911
|
label: z.ZodString;
|
|
811
912
|
help: z.ZodOptional<z.ZodString>;
|
|
812
913
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -815,9 +916,10 @@ export declare const FieldsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUn
|
|
|
815
916
|
type: z.ZodLiteral<"many2one">;
|
|
816
917
|
}, z.core.$strict>, z.ZodObject<{
|
|
817
918
|
relation: z.ZodString;
|
|
818
|
-
filter: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
919
|
+
filter: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
819
920
|
field: z.ZodString;
|
|
820
921
|
op: z.ZodEnum<{
|
|
922
|
+
set: "set";
|
|
821
923
|
"=": "=";
|
|
822
924
|
"!=": "!=";
|
|
823
925
|
"<": "<";
|
|
@@ -828,10 +930,18 @@ export declare const FieldsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUn
|
|
|
828
930
|
"not in": "not in";
|
|
829
931
|
like: "like";
|
|
830
932
|
ilike: "ilike";
|
|
933
|
+
startswith: "startswith";
|
|
934
|
+
endswith: "endswith";
|
|
935
|
+
notset: "notset";
|
|
936
|
+
between: "between";
|
|
831
937
|
}>;
|
|
832
938
|
value: z.ZodOptional<z.ZodJSONSchema>;
|
|
833
939
|
valueFrom: z.ZodOptional<z.ZodString>;
|
|
834
|
-
}, z.core.$strict
|
|
940
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
941
|
+
any: z.ZodArray<typeof FilterItemSchema>;
|
|
942
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
943
|
+
all: z.ZodArray<typeof FilterItemSchema>;
|
|
944
|
+
}, z.core.$strict>]>>>;
|
|
835
945
|
label: z.ZodString;
|
|
836
946
|
help: z.ZodOptional<z.ZodString>;
|
|
837
947
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -947,9 +1057,10 @@ export declare const FieldsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUn
|
|
|
947
1057
|
type: z.ZodLiteral<"image">;
|
|
948
1058
|
}, z.core.$strict>, z.ZodObject<{
|
|
949
1059
|
relation: z.ZodString;
|
|
950
|
-
filter: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1060
|
+
filter: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
951
1061
|
field: z.ZodString;
|
|
952
1062
|
op: z.ZodEnum<{
|
|
1063
|
+
set: "set";
|
|
953
1064
|
"=": "=";
|
|
954
1065
|
"!=": "!=";
|
|
955
1066
|
"<": "<";
|
|
@@ -960,10 +1071,18 @@ export declare const FieldsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUn
|
|
|
960
1071
|
"not in": "not in";
|
|
961
1072
|
like: "like";
|
|
962
1073
|
ilike: "ilike";
|
|
1074
|
+
startswith: "startswith";
|
|
1075
|
+
endswith: "endswith";
|
|
1076
|
+
notset: "notset";
|
|
1077
|
+
between: "between";
|
|
963
1078
|
}>;
|
|
964
1079
|
value: z.ZodOptional<z.ZodJSONSchema>;
|
|
965
1080
|
valueFrom: z.ZodOptional<z.ZodString>;
|
|
966
|
-
}, z.core.$strict
|
|
1081
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1082
|
+
any: z.ZodArray<typeof FilterItemSchema>;
|
|
1083
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1084
|
+
all: z.ZodArray<typeof FilterItemSchema>;
|
|
1085
|
+
}, z.core.$strict>]>>>;
|
|
967
1086
|
label: z.ZodString;
|
|
968
1087
|
help: z.ZodOptional<z.ZodString>;
|
|
969
1088
|
required: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -972,9 +1091,10 @@ export declare const FieldsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUn
|
|
|
972
1091
|
type: z.ZodLiteral<"many2one">;
|
|
973
1092
|
}, z.core.$strict>, z.ZodObject<{
|
|
974
1093
|
relation: z.ZodString;
|
|
975
|
-
filter: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1094
|
+
filter: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
976
1095
|
field: z.ZodString;
|
|
977
1096
|
op: z.ZodEnum<{
|
|
1097
|
+
set: "set";
|
|
978
1098
|
"=": "=";
|
|
979
1099
|
"!=": "!=";
|
|
980
1100
|
"<": "<";
|
|
@@ -985,10 +1105,18 @@ export declare const FieldsSchema: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUn
|
|
|
985
1105
|
"not in": "not in";
|
|
986
1106
|
like: "like";
|
|
987
1107
|
ilike: "ilike";
|
|
1108
|
+
startswith: "startswith";
|
|
1109
|
+
endswith: "endswith";
|
|
1110
|
+
notset: "notset";
|
|
1111
|
+
between: "between";
|
|
988
1112
|
}>;
|
|
989
1113
|
value: z.ZodOptional<z.ZodJSONSchema>;
|
|
990
1114
|
valueFrom: z.ZodOptional<z.ZodString>;
|
|
991
|
-
}, z.core.$strict
|
|
1115
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1116
|
+
any: z.ZodArray<typeof FilterItemSchema>;
|
|
1117
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
1118
|
+
all: z.ZodArray<typeof FilterItemSchema>;
|
|
1119
|
+
}, z.core.$strict>]>>>;
|
|
992
1120
|
label: z.ZodString;
|
|
993
1121
|
help: z.ZodOptional<z.ZodString>;
|
|
994
1122
|
required: z.ZodOptional<z.ZodBoolean>;
|