@lotics/app-sdk 0.134.8 → 0.134.9
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/AGENTS.md +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +68 -16
- package/dist/queries.d.ts +13 -0
- package/dist/router.js +1 -1
- package/dist/shared_types.d.ts +2 -2
- package/dist/store.d.ts +19 -1
- package/docs/data_fetching.md +2 -0
- package/package.json +1 -1
- /package/dist/{chunk-2RHCJQ6C.js → chunk-EEYMVVPE.js} +0 -0
package/AGENTS.md
CHANGED
|
@@ -14,7 +14,7 @@ This file is the index. The **exact type** of anything is its shipped declaratio
|
|
|
14
14
|
|
|
15
15
|
| Doc | Read it for |
|
|
16
16
|
|---|---|
|
|
17
|
-
| [docs/data_fetching.md](./docs/data_fetching.md) | The reads: `useQuery(alias, params, opts)` — its rows (`limit`), numbered pages (`page`), a keyset feed (`more`), its `total` or the total alone, only the columns it draws (`fields`), a push re-reading only the records it changed (`refresh: "changed"`), with `total: { by }` a count per value of one column and `total: { where }` a count per named filter, from one scan — `useQueries` for reads known only at render, `queryAll` outside React, `exportQuery` for a file of them the server makes, `exportApp` for the workbook of a JSON app's List; every hook answers one `QueryState`. The ROW type (`RowOf` — the alias's projected columns and nothing else), runtime `sort`/`filter` keys, cell readers (`row.*`, `readSelect`, `readMembers`, `readLinks`, `readFiles`, `readLocked`/`readLockedBy`, `readCreatedAt`/`readUpdatedAt`), the SDK's own cache — **arrival revalidates** — **realtime push** and `answeredAt` (the server answering again what a screen drew), a write drawn on every read from the press, a count as its own full scan, and the search-as-you-type and record-picker patterns. |
|
|
17
|
+
| [docs/data_fetching.md](./docs/data_fetching.md) | The reads: `useQuery(alias, params, opts)` — its rows (`limit`), numbered pages (`page`), a keyset feed (`more`), its `total` or the total alone, only the columns it draws (`fields`), a push re-reading only the records it changed (`refresh: "changed"`), with `total: { by }` a count per value of one column and `total: { where }` a count per named filter, from one scan — `useQueries` for reads known only at render, `prefetchQuery` / `prefetchQueries` to start a read before its screen mounts, `seedQuery` to show rows already held as its first answer, `queryAll` outside React, `exportQuery` for a file of them the server makes, `exportApp` for the workbook of a JSON app's List; every hook answers one `QueryState`. The ROW type (`RowOf` — the alias's projected columns and nothing else), runtime `sort`/`filter` keys, cell readers (`row.*`, `readSelect`, `readMembers`, `readLinks`, `readFiles`, `readLocked`/`readLockedBy`, `readCreatedAt`/`readUpdatedAt`), the SDK's own cache — **arrival revalidates** — **realtime push** and `answeredAt` (the server answering again what a screen drew), a write drawn on every read from the press, a count as its own full scan, and the search-as-you-type and record-picker patterns. |
|
|
18
18
|
| [docs/queries.md](./docs/queries.md) | **The query engine reference** — AST node kinds, per-field-type operators, filters/params/pruning, free-text search, combining tables, shaping (aggregates, date buckets, windows), runtime refinement bounds, limits and the efficiency playbook. |
|
|
19
19
|
| [docs/mutations.md](./docs/mutations.md) | `useWorkflow` (the ONLY write path; `useWorkflows` for writes that are data), the `WorkflowResult` resolve-never-throw contract (`field_errors`), typed inputs, every write drawn on every read from the press — predicted from the workflow's own steps, taken back on a refusal, `pending` meanwhile — the re-read a successful write triggers over the tables its body names, diff-before-update, locked records, `useNewRecord`, read-after-write ordering (`writesSettled()`). |
|
|
20
20
|
| [docs/workflows.md](./docs/workflows.md) | **The workflow-BODY reference** — the JS subset a body may use, opaque `fld_*`/`opt_*` keys, every step form, the accepted sugar, helpers, record-write surfaces, the traps and the verify loop. |
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export { reportAppError } from "./error_report.js";
|
|
|
5
5
|
export type { AppErrorKind, AppErrorPiece } from "./error_report.js";
|
|
6
6
|
export { useWorkflow, useWorkflows, writesSettled, useFileUpload, useAttachments, useAttachmentPiles, useMembers, useMemberNames, useAgentRun, useAgentRuns, useAiContext, buildChoiceOutput, } from "./hooks.js";
|
|
7
7
|
export type { UploadedFile, WorkflowResult, MembersOptions, MemberName, MemberNamesState, AgentRunOptions, UseAgentRun, AgentRunLanding, AgentRunRecord, AgentRunState, AgentUIPart, PendingChoice, ChoiceQuestion, ChoiceOption, AskUserChoiceOutput, } from "./hooks.js";
|
|
8
|
-
export { useQuery, useQueries, queryAll, exportQuery, exportApp, useFieldOptions } from "./queries.js";
|
|
8
|
+
export { useQuery, useQueries, prefetchQuery, prefetchQueries, seedQuery, queryAll, exportQuery, exportApp, useFieldOptions } from "./queries.js";
|
|
9
9
|
export type { QueryCall, QueryState, RowOf, QueryOptions, ColumnKeyOf, FieldOptions, FieldOptionsState, FieldOptionsOptions, FigureUnits, } from "./queries.js";
|
|
10
10
|
export type { QueryRow, QuerySortKey, QueryFieldSortKey, QueryFirstSortKey, QueryFilter, QueryFilterCondition, QueryFilterFieldCondition, QueryFilterRecordIdCondition, QueryFilterGroup, ExportCall, ExportFile, ExportReport, ExportTab, } from "./shared_types.js";
|
|
11
11
|
export type { ExportedFile } from "./shared_types.js";
|
package/dist/index.js
CHANGED
|
@@ -56,7 +56,7 @@ import {
|
|
|
56
56
|
subtractDecimal,
|
|
57
57
|
sumDecimal,
|
|
58
58
|
urlParam
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-EEYMVVPE.js";
|
|
60
60
|
|
|
61
61
|
// src/mount.tsx
|
|
62
62
|
import { createRoot } from "react-dom/client";
|
|
@@ -576,6 +576,7 @@ function slotOf(key, fetcher, aliases, patcher = null) {
|
|
|
576
576
|
inflight: null,
|
|
577
577
|
stale: false,
|
|
578
578
|
outdated: false,
|
|
579
|
+
warmed: false,
|
|
579
580
|
paint: null,
|
|
580
581
|
stagings: [],
|
|
581
582
|
fetcher,
|
|
@@ -737,8 +738,10 @@ function useKey(key, fetcher, opts = {}) {
|
|
|
737
738
|
listen();
|
|
738
739
|
if (slot === null) return;
|
|
739
740
|
const answered2 = slot.askedAt > 0;
|
|
741
|
+
const warmed = slot.warmed;
|
|
742
|
+
slot.warmed = false;
|
|
740
743
|
slot.mounts.set(id, { focus });
|
|
741
|
-
if (slot.outdated || slot.error === null && (!answered2 || arrival && seeded.current !== key)) void ask(slot, slot.outdated);
|
|
744
|
+
if (slot.outdated || slot.error === null && (!answered2 || arrival && seeded.current !== key && !warmed)) void ask(slot, slot.outdated);
|
|
742
745
|
return () => {
|
|
743
746
|
slot.mounts.delete(id);
|
|
744
747
|
};
|
|
@@ -801,12 +804,30 @@ async function stageKey(key, next, write2) {
|
|
|
801
804
|
slot.stagings = slot.stagings.map((one) => one.token === token2 ? { ...one, settledAt } : one);
|
|
802
805
|
void ask(slot, true);
|
|
803
806
|
}
|
|
804
|
-
async function readKey(key, fetcher) {
|
|
805
|
-
const slot = slots.get(key) ?? slotOf(key, fetcher, NO_ALIASES);
|
|
807
|
+
async function readKey(key, fetcher, opts = {}) {
|
|
808
|
+
const slot = slots.get(key) ?? slotOf(key, fetcher, opts.aliases === void 0 ? NO_ALIASES : new Set(opts.aliases));
|
|
806
809
|
if (slot.askedAt === 0) await ask(slot, false);
|
|
807
810
|
if (slot.askedAt === 0) throw slot.error ?? new Error(`"${key}" answered nothing.`);
|
|
808
811
|
return slot.answer;
|
|
809
812
|
}
|
|
813
|
+
function warmKey(key, fetcher, opts) {
|
|
814
|
+
if (slots.has(key)) return;
|
|
815
|
+
const slot = slotOf(key, fetcher, new Set(opts.aliases));
|
|
816
|
+
slot.warmed = true;
|
|
817
|
+
void ask(slot, false).then(() => {
|
|
818
|
+
if (slot.error === null || slot.mounts.size > 0) return;
|
|
819
|
+
slots.delete(key);
|
|
820
|
+
reportAppError("rejection", slot.error);
|
|
821
|
+
});
|
|
822
|
+
}
|
|
823
|
+
function seedKey(key, fetcher, answer, opts) {
|
|
824
|
+
const slot = slotOf(key, fetcher, new Set(opts.aliases));
|
|
825
|
+
if (slot.askedAt > 0 || slot.inflight !== null) return;
|
|
826
|
+
slot.answer = answer;
|
|
827
|
+
slot.askedAt = tick();
|
|
828
|
+
slot.error = null;
|
|
829
|
+
changed(slot);
|
|
830
|
+
}
|
|
810
831
|
function setKey(key, answer) {
|
|
811
832
|
const slot = slots.get(key);
|
|
812
833
|
if (slot === void 0) return;
|
|
@@ -15581,6 +15602,21 @@ function namedCounts(named) {
|
|
|
15581
15602
|
var feedWants = /* @__PURE__ */ new Map();
|
|
15582
15603
|
function ignore() {
|
|
15583
15604
|
}
|
|
15605
|
+
function rowsRead(alias, params, opts, page) {
|
|
15606
|
+
const sort2 = statedSort(opts.sort);
|
|
15607
|
+
const call = JSON.stringify([params, opts.filter ?? null, sort2 ?? null, opts.fields ?? null]);
|
|
15608
|
+
const apart = opts.revalidateOnChange ?? true ? [] : ["held"];
|
|
15609
|
+
const key = JSON.stringify(["rows", alias, call, opts.limit ?? null, opts.page ?? null, page, opts.refresh ?? null, ...apart]);
|
|
15610
|
+
const fetch = (askedAt) => askRows(key, alias, askedAt, {
|
|
15611
|
+
params,
|
|
15612
|
+
filter: opts.filter,
|
|
15613
|
+
sort: sort2,
|
|
15614
|
+
...opts.fields === void 0 ? {} : { fields: opts.fields },
|
|
15615
|
+
limit: opts.page ?? opts.limit,
|
|
15616
|
+
offset: opts.page === void 0 ? 0 : page * opts.page
|
|
15617
|
+
});
|
|
15618
|
+
return { key, fetch };
|
|
15619
|
+
}
|
|
15584
15620
|
function useQuery(alias, params = {}, opts = {}) {
|
|
15585
15621
|
const modes = [opts.limit, opts.page, opts.more].filter((one) => one !== void 0);
|
|
15586
15622
|
if (modes.length > 1) throw new Error(`useQuery("${alias}") takes one of \`limit\`, \`page\` and \`more\`; it was given ${modes.length}.`);
|
|
@@ -15604,21 +15640,15 @@ function useQuery(alias, params = {}, opts = {}) {
|
|
|
15604
15640
|
const turn2 = held2?.onChange;
|
|
15605
15641
|
const setPage = useCallback5((next) => turn2 === void 0 ? setPaging({ call, page: Math.max(0, next) }) : turn2(Math.max(0, next)), [call, turn2]);
|
|
15606
15642
|
const patches = opts.refresh === "changed" && opts.limit === void 0 && opts.page === void 0 && opts.more === void 0;
|
|
15607
|
-
const
|
|
15643
|
+
const rowsAsked = rowsRead(alias, params, opts, page);
|
|
15644
|
+
const rowsKey = !enabled || !wantsRows || opts.more !== void 0 ? null : rowsAsked.key;
|
|
15608
15645
|
const patchRowsRead = !patches ? void 0 : (held3, changes, since) => {
|
|
15609
15646
|
const ids = held3 === void 0 ? null : patchIds(held3, alias, fields, changes);
|
|
15610
15647
|
return held3 === void 0 || ids === null ? null : (askedAt) => patchRows(rowsKey ?? "", alias, askedAt, { held: held3, ids, since }, { params, filter: filter2, sort: sort2, ...fields === void 0 ? {} : { fields }, offset: 0 });
|
|
15611
15648
|
};
|
|
15612
15649
|
const rows = useKey(
|
|
15613
15650
|
rowsKey,
|
|
15614
|
-
|
|
15615
|
-
params,
|
|
15616
|
-
filter: filter2,
|
|
15617
|
-
sort: sort2,
|
|
15618
|
-
...fields === void 0 ? {} : { fields },
|
|
15619
|
-
limit: opts.page ?? opts.limit,
|
|
15620
|
-
offset: opts.page === void 0 ? 0 : page * opts.page
|
|
15621
|
-
}),
|
|
15651
|
+
rowsAsked.fetch,
|
|
15622
15652
|
{ focus, aliases, patch: patchRowsRead, known: mocking ? () => knownRows(alias, { params, filter: filter2, sort: sort2, limit: opts.page ?? opts.limit, offset: opts.page === void 0 ? 0 : page * opts.page }) : void 0 }
|
|
15623
15653
|
);
|
|
15624
15654
|
const feedKey = !enabled || !wantsRows || opts.more === void 0 ? null : JSON.stringify(["feed", alias, call, opts.more, ...apart]);
|
|
@@ -15738,11 +15768,17 @@ async function askCall(key, call, askedAt, patch) {
|
|
|
15738
15768
|
const count = call.total === true ? settle(askCount(key, call.alias, askedAt, { params, filter: call.filter })) : null;
|
|
15739
15769
|
return { rows: rows === null ? null : await rows, count: count === null ? null : await count };
|
|
15740
15770
|
}
|
|
15771
|
+
function callsRead(calls) {
|
|
15772
|
+
const shape = JSON.stringify(calls.map((call) => [call.alias, call.params ?? {}, call.filter ?? null, statedSort(call.sort) ?? null, call.aggregate ?? null, call.total ?? false, call.rows ?? true, call.fields ?? null, call.refresh ?? null]));
|
|
15773
|
+
const key = JSON.stringify(["calls", shape]);
|
|
15774
|
+
return { shape, key, fetch: (askedAt) => Promise.all(calls.map((call) => askCall(key, call, askedAt))) };
|
|
15775
|
+
}
|
|
15741
15776
|
function useQueries(calls, opts = {}) {
|
|
15742
15777
|
const enabled = opts.enabled ?? true;
|
|
15743
|
-
const
|
|
15744
|
-
const
|
|
15745
|
-
const
|
|
15778
|
+
const asked = callsRead(calls);
|
|
15779
|
+
const shape = asked.shape;
|
|
15780
|
+
const key = !enabled || calls.length === 0 ? null : asked.key;
|
|
15781
|
+
const answers = useKey(key, asked.fetch, {
|
|
15746
15782
|
focus: opts.revalidateOnFocus ?? true,
|
|
15747
15783
|
aliases: calls.map((call) => call.alias),
|
|
15748
15784
|
// A call that opted in and can be patched is; the others of the key are asked whole in the same push.
|
|
@@ -15792,6 +15828,19 @@ function useQueries(calls, opts = {}) {
|
|
|
15792
15828
|
[shape, answers.data, answers.askedAt, answers.loading, answers.error, version2]
|
|
15793
15829
|
);
|
|
15794
15830
|
}
|
|
15831
|
+
function prefetchQuery(alias, params = {}, opts = {}) {
|
|
15832
|
+
const { key, fetch } = rowsRead(alias, params, opts, 0);
|
|
15833
|
+
warmKey(key, fetch, { aliases: [alias] });
|
|
15834
|
+
}
|
|
15835
|
+
function seedQuery(alias, params, opts, rows) {
|
|
15836
|
+
const { key, fetch } = rowsRead(alias, params, opts, 0);
|
|
15837
|
+
seedKey(key, fetch, { rows: [...rows], truncated: false }, { aliases: [alias] });
|
|
15838
|
+
}
|
|
15839
|
+
function prefetchQueries(calls) {
|
|
15840
|
+
if (calls.length === 0) return;
|
|
15841
|
+
const { key, fetch } = callsRead(calls);
|
|
15842
|
+
warmKey(key, fetch, { aliases: calls.map((call) => call.alias) });
|
|
15843
|
+
}
|
|
15795
15844
|
var QUERY_ALL_PAGE = 1e3;
|
|
15796
15845
|
async function queryAll(alias, params = {}, opts = {}) {
|
|
15797
15846
|
const criteria = readCriteria({ params, filter: opts.filter, sort: opts.sort });
|
|
@@ -16209,6 +16258,8 @@ export {
|
|
|
16209
16258
|
newRecordId,
|
|
16210
16259
|
openExternal,
|
|
16211
16260
|
openRequested,
|
|
16261
|
+
prefetchQueries,
|
|
16262
|
+
prefetchQuery,
|
|
16212
16263
|
preparedForUpload,
|
|
16213
16264
|
queriesChanged,
|
|
16214
16265
|
queryAll,
|
|
@@ -16227,6 +16278,7 @@ export {
|
|
|
16227
16278
|
row,
|
|
16228
16279
|
rpc,
|
|
16229
16280
|
saveFileFromUrl,
|
|
16281
|
+
seedQuery,
|
|
16230
16282
|
subscribeOpen,
|
|
16231
16283
|
urlParam,
|
|
16232
16284
|
useAgentRun,
|
package/dist/queries.d.ts
CHANGED
|
@@ -151,6 +151,19 @@ export interface QueryCall {
|
|
|
151
151
|
* fails carries its own `error`, the others their rows.
|
|
152
152
|
*/
|
|
153
153
|
export declare function useQueries(calls: readonly QueryCall[], opts?: Pick<QueryOptions, "enabled" | "revalidateOnFocus">): QueryState<QueryRow>[];
|
|
154
|
+
/**
|
|
155
|
+
* Starts the read `useQuery(alias, params, opts)` makes of its first rows, before a screen mounts it: that screen finds the
|
|
156
|
+
* answer held, or the request in flight, and asks nothing twice. For `limit`, `filter`, `sort` and `fields` only.
|
|
157
|
+
*/
|
|
158
|
+
export declare function prefetchQuery<K extends string>(alias: K, ...args: QueryArgs<K, Pick<QueryOptions<ColumnKeyOf<K>>, "limit" | "filter" | "sort" | "fields">>): void;
|
|
159
|
+
/**
|
|
160
|
+
* Shows `rows` as the first answer of the read `useQuery(alias, params, opts)` makes, before a screen mounts it: the screen draws them
|
|
161
|
+
* at once and asks the server once in the background, whose answer replaces them. For rows the app already holds of that read (a row
|
|
162
|
+
* of another read of the same table, projected to the columns this one draws). A read already answered keeps its answer.
|
|
163
|
+
*/
|
|
164
|
+
export declare function seedQuery(alias: string, params: Record<string, unknown>, opts: Pick<QueryOptions, "limit" | "filter" | "sort" | "fields">, rows: readonly QueryRow[]): void;
|
|
165
|
+
/** Starts the reads `useQueries(calls)` makes, before a screen mounts them (`prefetchQuery`). */
|
|
166
|
+
export declare function prefetchQueries(calls: readonly QueryCall[]): void;
|
|
154
167
|
/**
|
|
155
168
|
* Every row a declared query matches, read a page at a time to the end — for what must hold every row
|
|
156
169
|
* (an act over every row in view), never for a screen, which pages, nor for a file, which `exportQuery` makes on the
|
package/dist/router.js
CHANGED
package/dist/shared_types.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export interface AppFile {
|
|
|
27
27
|
place?: PhotoPlace;
|
|
28
28
|
}
|
|
29
29
|
export type AppLoadTiming = { boot_ms?: number | undefined; page_bytes?: number | undefined; page_connect_ms?: number | undefined; page_decoded_bytes?: number | undefined; page_download_ms?: number | undefined; page_ttfb_ms?: number | undefined; };
|
|
30
|
-
export type AppSpec = { version: 76; app: { alias: string; label: string; description: string | null; locale: DocumentTemplateLocale; scope: { entity: string; param: string; counts: { query: string; param: string | null; } | null; list: string | null; } | null; opens_on: { days: number; } | { span: "day" | "month" | "quarter" | "week" | "year"; view: "day" | "month" | "week" | null; ahead: boolean; } | null; }; entities: Record<string, { alias: string; label: string; singular: string | null; table: string; fields: Record<string, { alias: string; id: string; type: "autonumber" | "boolean" | "date" | "files" | "formula" | "lookup" | "number" | "rollup" | "select" | "select_member" | "select_record_link" | "text"; result: "boolean" | "date" | "files" | "number" | "select" | "select_member" | "select_record_link" | "text" | null; label: string; description: string | null; format: "datetime" | "email" | "link" | "markdown" | "month" | "phone" | "text" | "time" | null; multi: boolean; photo_places: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; decimals: number | null; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals: number | null; } | null; rating: number | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; due: boolean; frees: boolean; summed: boolean; accumulates: boolean; serial: boolean; whole: boolean; restates: string | null; starts: "me" | "today" | null; default: string | number | boolean | string[] | null; options: { id: string; alias: string; label: string; color: "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "gray" | "green" | "indigo" | "lime" | "neutral" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "slate" | "stone" | "teal" | "violet" | "yellow" | "zinc" | null; mark: { kind: string; name: string; } | null; short: string | null; }[] | null; link: string | null; accept: string | null; image: string | null; party: "organization" | "person" | null; pictures: { query: string; param: string; } | null; face: Record<string, string>; default_from: { link: string; field: string; } | null; reads: string[]; reads_through: string[]; counts: { entity: string; back: string | null; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; } | null; missing: { entity: string; } | null; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; bounds: { field: string; param: string; of: "date" | "number"; lookup: boolean; }[]; } | null; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; }>; title: string; subtitle: string[]; image: string | null; image_from: "any" | "images"; image_shape: "landscape" | "portrait" | "square" | null; mark: string | null; description: string | null; party: "organization" | "person" | null; lead: string | null; image_order: string[]; mine: string | null; unique: string[][]; status: { field: string; closed: string[]; dropped: string[]; history: string | null; dates: Record<string, string>; stages: { option: string; label: string; owner: { kind: "member"; column: string; link: string | null; label: string; } | { kind: "group"; group: string; label: string; }; within: number | null; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; }[]; maker: string | null; moves: { query: string; param: string; link: string; status: string; at: string; by: string | null; went: Record<string, string>; } | null; } | null; settled: string | null; task: { close: { to: string; act: string | null; } | null; reopen: { to: string; act: string | null; } | null; member: string | null; } | null; progress: { entity: string; via: string; passed: string | null; read: { query: string; param: string; }; }[]; figure: string | null; scan: { read: "iso6346" | "text"; agent: string; field: string | null; photo: string | null; } | { read: "code"; field: string | null; photo: string | null; } | null; place: { address: string; latitude: string; longitude: string; accuracy: string | null; } | null; pin: { on: string; x: string; y: string; } | null; cadence: { on: { days: ("fri" | "mon" | "sat" | "sun" | "thu" | "tue" | "wed")[]; } | { field: string; }; every: { days: number | RecordBound; } | { months: number | RecordBound; } | { years: number | RecordBound; } | null; start: string | null; end: string | null; from: string | null; until: string | null; }[]; nests: { parent: string; children: string; closed: string | null; } | null; filed: Record<string, string>; list: { query: string; param: string | null; }; listed: string[] | null; one: { query: string; param: string; } | null; query: { opens: string[]; adds: string[]; } | null; create: { workflow: string; fields: string[]; picker: string[] | null; picker_only: boolean; inputs: Record<string, { alias: string; id: string; type: "autonumber" | "boolean" | "date" | "files" | "formula" | "lookup" | "number" | "rollup" | "select" | "select_member" | "select_record_link" | "text"; result: "boolean" | "date" | "files" | "number" | "select" | "select_member" | "select_record_link" | "text" | null; label: string; description: string | null; format: "datetime" | "email" | "link" | "markdown" | "month" | "phone" | "text" | "time" | null; multi: boolean; photo_places: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; decimals: number | null; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals: number | null; } | null; rating: number | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; due: boolean; frees: boolean; summed: boolean; accumulates: boolean; serial: boolean; whole: boolean; restates: string | null; starts: "me" | "today" | null; default: string | number | boolean | string[] | null; options: { id: string; alias: string; label: string; color: "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "gray" | "green" | "indigo" | "lime" | "neutral" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "slate" | "stone" | "teal" | "violet" | "yellow" | "zinc" | null; mark: { kind: string; name: string; } | null; short: string | null; }[] | null; link: string | null; accept: string | null; image: string | null; party: "organization" | "person" | null; pictures: { query: string; param: string; } | null; face: Record<string, string>; default_from: { link: string; field: string; } | null; reads: string[]; reads_through: string[]; counts: { entity: string; back: string | null; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; } | null; missing: { entity: string; } | null; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; bounds: { field: string; param: string; of: "date" | "number"; lookup: boolean; }[]; } | null; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; }>; handed: string[]; starts: Record<string, "me" | "today">; } | null; update: { workflow: string; fields: string[]; } | null; remove: { workflow: string; with: string[]; } | null; }>; views: ({ kind: "list"; key: string; label: string; entity: string; scope: { field: string; } | null; register: { columns: string[]; columns_stated: boolean; edits: string[]; filters: (string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; })[]; source_column: boolean; beside: boolean; search: string[] | null; chips: boolean; checks: boolean; regroup: boolean; sort: { field: string; desc: boolean; }[] | null; group: string | null; tabs: { tab: string; label: string; term: { kind: "in"; field: string; } | { kind: "open"; from: string; to: string; } | null; totals: { via: string; read: { query: string; }; columns: { alias: string; label: string; notation: { style: "decimal"; decimals: number | null; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals: number | null; } | null; aggregate: "avg" | "max" | "min" | "sum"; }[]; } | null; where: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; sort: { field: string; desc: boolean; }[] | null; }[] | null; opens_on: { days: number; } | { span: "day" | "month" | "quarter" | "week" | "year"; view: "day" | "month" | "week" | null; ahead: boolean; } | null; layout: SpecLayout; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; opens: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; remove: boolean; create: string[] | null; add_label: string | null; export: boolean | { act: string; }; readings: ({ entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "list"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number | RecordBound>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | RecordBound | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; } | { field: string; record: string; })[]; tab: string | null; columns: string[]; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "pivot"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; columns: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "shortfall"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string; across: string | null; value: string | null; on_hand: { entity: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; by: string | null; across: string | null; value: string | null; }; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; })[]; attention: boolean; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; }; entities: string[]; sources: { entity: string; fields: Record<string, string>; scope: string | null; register: { columns: string[]; columns_stated: boolean; edits: string[]; filters: (string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; })[]; source_column: boolean; beside: boolean; search: string[] | null; chips: boolean; checks: boolean; regroup: boolean; sort: { field: string; desc: boolean; }[] | null; group: string | null; tabs: { tab: string; label: string; term: { kind: "in"; field: string; } | { kind: "open"; from: string; to: string; } | null; totals: { via: string; read: { query: string; }; columns: { alias: string; label: string; notation: { style: "decimal"; decimals: number | null; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals: number | null; } | null; aggregate: "avg" | "max" | "min" | "sum"; }[]; } | null; where: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; sort: { field: string; desc: boolean; }[] | null; }[] | null; opens_on: { days: number; } | { span: "day" | "month" | "quarter" | "week" | "year"; view: "day" | "month" | "week" | null; ahead: boolean; } | null; layout: SpecLayout; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; opens: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; remove: boolean; create: string[] | null; add_label: string | null; export: boolean | { act: string; }; readings: ({ entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "list"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number | RecordBound>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | RecordBound | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; } | { field: string; record: string; })[]; tab: string | null; columns: string[]; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "pivot"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; columns: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "shortfall"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string; across: string | null; value: string | null; on_hand: { entity: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; by: string | null; across: string | null; value: string | null; }; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; })[]; attention: boolean; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; }; }[]; place: { options: Record<string, { id: string; alias: string; label: string; color: "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "gray" | "green" | "indigo" | "lime" | "neutral" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "slate" | "stone" | "teal" | "violet" | "yellow" | "zinc" | null; mark: { kind: string; name: string; } | null; short: string | null; }[]>; closed: string[]; } | null; read: string | null; bound: { read: { query: string; param: string; }; listed: string[]; same: { field: string; param: string; } | null; bounds: { field: string; param: string; lookup: boolean; of: "date" | "link" | "member" | "number" | "select"; options: Record<string, string> | null; }[]; via: string; } | null; } | { kind: "sheet"; key: string; label: string; readings: { reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "list"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number | RecordBound>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | RecordBound | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; } | { field: string; record: string; })[]; tab: string | null; columns: string[]; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "pivot"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; columns: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "shortfall"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string; across: string | null; value: string | null; on_hand: { entity: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; by: string | null; across: string | null; value: string | null; }; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; }; scope: { field: string; } | null; }[]; })[]; pages: Record<string, { door: "drawer" | "page" | null; facts: string[]; checks: boolean; sections: { title: string | null; description: string | null; at: string[] | null; fields: string[]; groups: { label: string; fields: string[]; acts: string[]; heads: string[] | null; lines: { key: string; label: string | null; cells: ({ kind: "field"; field: string; } | { kind: "blank"; } | { kind: "act"; act: string; } | { kind: "value"; key: string; label: string; compute: { expression: string; reads: Record<string, { from: "row"; field: string; } | { from: "record"; field: string; } | { from: "place"; field: string; } | { from: "formula"; expression: string; }>; }; output: "boolean" | "date" | "datetime" | "number" | "text"; notation: { style: "decimal"; decimals: number | null; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals: number | null; } | null; })[]; }[] | null; }[]; reads: string[]; blocks: ({ kind: "funnel"; entity: string; read: { query: string; param: string; }; label: string; steps: string[]; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { key: string; totals: Record<string, string>; narrower: string[]; soonest: string[]; expect: string | null; of: string | null; add_form: { preset: Record<string, { id: string; label: string; }>; among: Record<string, string[]>; } | null; edits: string[]; pick: { read: { query: string; param: string | null; }; back: string; same: { field: string; param: string; }[]; admits: { query: string; param: string | null; } | null; } | null; checklist: { photo: string | null; clause: string | null; words: string[]; failed: string[]; passed: string | null; } | null; gantt: { start: string; end: string; milestones: string[]; planned: { start: string | null; end: string | null; } | null; progress: string | null; after: string | null; } | null; compare: { before: string; after: string; } | null; current: string | null; post: { bodies: string[]; text: string; compute: { expression: string; reads: Record<string, { from: "row"; field: string; } | { from: "record"; field: string; } | { from: "place"; field: string; } | { from: "formula"; expression: string; }>; } | null; media: string; link: string | null; network: string; group: string | null; networks: Record<string, "facebook" | "instagram" | "linkedin" | "threads" | "x">; } | null; under: { field: string; entity: string; via: string; back: string; read: { query: string; param: string; listed: string[]; }; key: string; where: { field: string; options: string[]; }[]; add_form: { preset: Record<string, { id: string; label: string; }>; among: Record<string, string[]>; } | null; } | null; layout: "cards" | "table" | null | undefined; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; kind: "rows"; } | { key: string; totals: Record<string, string>; narrower: string[]; soonest: string[]; expect: string | null; of: string | null; add_form: { preset: Record<string, { id: string; label: string; }>; among: Record<string, string[]>; } | null; edits: string[]; pick: { read: { query: string; param: string | null; }; back: string; same: { field: string; param: string; }[]; admits: { query: string; param: string | null; } | null; } | null; checklist: { photo: string | null; clause: string | null; words: string[]; failed: string[]; passed: string | null; } | null; gantt: { start: string; end: string; milestones: string[]; planned: { start: string | null; end: string | null; } | null; progress: string | null; after: string | null; } | null; compare: { before: string; after: string; } | null; current: string | null; post: { bodies: string[]; text: string; compute: { expression: string; reads: Record<string, { from: "row"; field: string; } | { from: "record"; field: string; } | { from: "place"; field: string; } | { from: "formula"; expression: string; }>; } | null; media: string; link: string | null; network: string; group: string | null; networks: Record<string, "facebook" | "instagram" | "linkedin" | "threads" | "x">; } | null; under: { field: string; entity: string; via: string; back: string; read: { query: string; param: string; listed: string[]; }; key: string; where: { field: string; options: string[]; }[]; add_form: { preset: Record<string, { id: string; label: string; }>; among: Record<string, string[]>; } | null; } | null; layout: "cards" | "table" | null | undefined; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; kind: "outline"; counts: { query: string; param: string; }; } | { kind: "figures"; fields: string[]; labels: Record<string, string>; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "list"; key: string; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "statement"; title: string; lines: { field: string; op: "equals" | "minus" | "plus" | "times" | null; rate: string | null; parts: { entity: string; read: { query: string; param: string; listed: string[]; }; same: string; before: { field: string; param: string; } | null; columns: string[]; figure: string; } | null; }[]; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "timeline"; key: string; at: string; by: string | null; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "agenda"; key: string; day: string; time: string | null; part: string | null; start: string | null; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "files"; fields: string[]; title: string; add_label: string | null; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "reading"; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "list"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number | RecordBound>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | RecordBound | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; } | { field: string; record: string; })[]; tab: string | null; columns: string[]; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "pivot"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; columns: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "shortfall"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string; across: string | null; value: string | null; on_hand: { entity: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; by: string | null; across: string | null; value: string | null; }; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; }; via: string; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "text"; field: string; title: string; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "comments"; key: string; title: string; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "choices"; field: string; title: string; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "linked"; field: string; title: string; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; })[]; acts: string[]; entry: string[]; acts_last: boolean; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; side: boolean; tab: string | null; }[]; steps: boolean; views: { kind: "list"; key: string; label: string; entity: string; scope: { field: string; } | null; register: { columns: string[]; columns_stated: boolean; edits: string[]; filters: (string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; })[]; source_column: boolean; beside: boolean; search: string[] | null; chips: boolean; checks: boolean; regroup: boolean; sort: { field: string; desc: boolean; }[] | null; group: string | null; tabs: { tab: string; label: string; term: { kind: "in"; field: string; } | { kind: "open"; from: string; to: string; } | null; totals: { via: string; read: { query: string; }; columns: { alias: string; label: string; notation: { style: "decimal"; decimals: number | null; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals: number | null; } | null; aggregate: "avg" | "max" | "min" | "sum"; }[]; } | null; where: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; sort: { field: string; desc: boolean; }[] | null; }[] | null; opens_on: { days: number; } | { span: "day" | "month" | "quarter" | "week" | "year"; view: "day" | "month" | "week" | null; ahead: boolean; } | null; layout: SpecLayout; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; opens: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; remove: boolean; create: string[] | null; add_label: string | null; export: boolean | { act: string; }; readings: ({ entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "list"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number | RecordBound>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | RecordBound | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; } | { field: string; record: string; })[]; tab: string | null; columns: string[]; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "pivot"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; columns: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "shortfall"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string; across: string | null; value: string | null; on_hand: { entity: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; by: string | null; across: string | null; value: string | null; }; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; })[]; attention: boolean; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; }; entities: string[]; sources: { entity: string; fields: Record<string, string>; scope: string | null; register: { columns: string[]; columns_stated: boolean; edits: string[]; filters: (string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; })[]; source_column: boolean; beside: boolean; search: string[] | null; chips: boolean; checks: boolean; regroup: boolean; sort: { field: string; desc: boolean; }[] | null; group: string | null; tabs: { tab: string; label: string; term: { kind: "in"; field: string; } | { kind: "open"; from: string; to: string; } | null; totals: { via: string; read: { query: string; }; columns: { alias: string; label: string; notation: { style: "decimal"; decimals: number | null; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals: number | null; } | null; aggregate: "avg" | "max" | "min" | "sum"; }[]; } | null; where: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; sort: { field: string; desc: boolean; }[] | null; }[] | null; opens_on: { days: number; } | { span: "day" | "month" | "quarter" | "week" | "year"; view: "day" | "month" | "week" | null; ahead: boolean; } | null; layout: SpecLayout; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; opens: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; remove: boolean; create: string[] | null; add_label: string | null; export: boolean | { act: string; }; readings: ({ entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "list"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number | RecordBound>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | RecordBound | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; } | { field: string; record: string; })[]; tab: string | null; columns: string[]; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "pivot"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; columns: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "shortfall"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string; across: string | null; value: string | null; on_hand: { entity: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; by: string | null; across: string | null; value: string | null; }; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; })[]; attention: boolean; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; }; }[]; place: { options: Record<string, { id: string; alias: string; label: string; color: "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "gray" | "green" | "indigo" | "lime" | "neutral" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "slate" | "stone" | "teal" | "violet" | "yellow" | "zinc" | null; mark: { kind: string; name: string; } | null; short: string | null; }[]>; closed: string[]; } | null; read: string | null; bound: { read: { query: string; param: string; }; listed: string[]; same: { field: string; param: string; } | null; bounds: { field: string; param: string; lookup: boolean; of: "date" | "link" | "member" | "number" | "select"; options: Record<string, string> | null; }[]; via: string; } | null; }[]; draws: string[]; outside: { key: string; entity: string; at: string[]; one: { query: string; param: string; }; page: { door: "page"; draws: string[]; sections: [{ title: string; description: string | null; fields: string[]; blocks: { kind: "list"; key: string; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "list"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number | RecordBound>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | RecordBound | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; } | { field: string; record: string; })[]; tab: string | null; columns: string[]; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; }; via: string; same: { field: string; param: string; } | null; bounds: { field: string; param: string; of: "date" | "number"; lookup: boolean; }[]; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; after: number; }[]; acts: string[]; }]; }; opens_on: { days: number; } | { span: "day" | "month" | "quarter" | "week" | "year"; view: "day" | "month" | "week" | null; ahead: boolean; }; }[]; moves: { entity: string; via: string; read: { query: string; param: string; }; title: string; at: string; by: string | null; create: string[] | null; add_label: string | null; } | null; }>; acts: { alias: string; label: string; on: "record" | "rows" | "view"; rowless: boolean; period: boolean; of: string; workflow: string; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; to: string | null; writes: boolean; into: string | null; paper: { entity: string; option: string; } | null; marks: Record<string, boolean>; requires: string[]; recommends: string[]; asks: (string | { input: string; label: string; type: "date" | "file" | "link" | "long_text" | "member" | "number" | "select" | "text"; multi: boolean; options: { alias: string; label: string; color: "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "gray" | "green" | "indigo" | "lime" | "neutral" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "slate" | "stone" | "teal" | "violet" | "yellow" | "zinc" | null; mark: { kind: string; name: string; } | null; short: string | null; }[] | null; entity: string | null; required: boolean; default: string | null; starts: "me" | "today" | null; accept: string | null; })[]; asking: Record<string, { alias: string; id: string; type: "autonumber" | "boolean" | "date" | "files" | "formula" | "lookup" | "number" | "rollup" | "select" | "select_member" | "select_record_link" | "text"; result: "boolean" | "date" | "files" | "number" | "select" | "select_member" | "select_record_link" | "text" | null; label: string; description: string | null; format: "datetime" | "email" | "link" | "markdown" | "month" | "phone" | "text" | "time" | null; multi: boolean; photo_places: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; decimals: number | null; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals: number | null; } | null; rating: number | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; due: boolean; frees: boolean; summed: boolean; accumulates: boolean; serial: boolean; whole: boolean; restates: string | null; starts: "me" | "today" | null; default: string | number | boolean | string[] | null; options: { id: string; alias: string; label: string; color: "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "gray" | "green" | "indigo" | "lime" | "neutral" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "slate" | "stone" | "teal" | "violet" | "yellow" | "zinc" | null; mark: { kind: string; name: string; } | null; short: string | null; }[] | null; link: string | null; accept: string | null; image: string | null; party: "organization" | "person" | null; pictures: { query: string; param: string; } | null; face: Record<string, string>; default_from: { link: string; field: string; } | null; reads: string[]; reads_through: string[]; counts: { entity: string; back: string | null; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; } | null; missing: { entity: string; } | null; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; bounds: { field: string; param: string; of: "date" | "number"; lookup: boolean; }[]; } | null; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; }>; starts: Record<string, "me" | "today">; makes: string | null; papers: { template: string; label: string; when: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; }[] | null; archive: string | null; intake: { agent: string; papers: { type: "lines"; entity: string; kind: string; files: string; } | { type: "field"; files: string; } | null; fields: string[]; parties: { link: string; fields: string[]; key: string[]; }[]; rows: { entity: string; fields: string[]; key: string[]; files: string | null; }[]; links: { entity: string; table: string; }[]; } | null; sign: { into: string; by: string; at: string; witness: string | null; } | null; review: boolean; owes: { entity: string; via: string; day: string; end: string | null; planned: string | null; cadence: number; } | null; confirm: string | true | null; danger: boolean; button: "lead" | boolean; owner: { kind: "member"; column: string; link: string | null; label: string; } | { kind: "group"; group: string; label: string; } | null; corrects: boolean; drafted: boolean; stands: string[]; views: string[]; }[]; checks: { field: string; of: string; blocks: "all" | string[] | null; resolve: string[]; writers: string[]; reads: string[]; draft?: { expression: string; reads: Record<string, { from: "row"; field: string; } | { from: "record"; field: string; } | { from: "place"; field: string; } | { from: "formula"; expression: string; }>; } | undefined; stands: string[]; }[]; };
|
|
30
|
+
export type AppSpec = { version: 77; app: { alias: string; label: string; description: string | null; locale: DocumentTemplateLocale; scope: { entity: string; param: string; counts: { query: string; param: string | null; } | null; list: string | null; } | null; opens_on: { days: number; } | { span: "day" | "month" | "quarter" | "week" | "year"; view: "day" | "month" | "week" | null; ahead: boolean; } | null; }; entities: Record<string, { alias: string; label: string; singular: string | null; table: string; fields: Record<string, { alias: string; id: string; type: "autonumber" | "boolean" | "date" | "files" | "formula" | "lookup" | "number" | "rollup" | "select" | "select_member" | "select_record_link" | "text"; result: "boolean" | "date" | "files" | "number" | "select" | "select_member" | "select_record_link" | "text" | null; label: string; description: string | null; format: "datetime" | "email" | "link" | "markdown" | "month" | "phone" | "text" | "time" | null; multi: boolean; photo_places: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; decimals: number | null; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals: number | null; } | null; rating: number | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; due: boolean; frees: boolean; summed: boolean; accumulates: boolean; serial: boolean; whole: boolean; restates: string | null; starts: "me" | "today" | null; default: string | number | boolean | string[] | null; options: { id: string; alias: string; label: string; color: "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "gray" | "green" | "indigo" | "lime" | "neutral" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "slate" | "stone" | "teal" | "violet" | "yellow" | "zinc" | null; mark: { kind: string; name: string; } | null; short: string | null; }[] | null; link: string | null; accept: string | null; image: string | null; party: "organization" | "person" | null; pictures: { query: string; param: string; } | null; face: Record<string, string>; default_from: { link: string; field: string; } | null; reads: string[]; reads_through: string[]; counts: { entity: string; back: string | null; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; } | null; missing: { entity: string; } | null; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; bounds: { field: string; param: string; of: "date" | "number"; lookup: boolean; }[]; } | null; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; }>; title: string; subtitle: string[]; image: string | null; image_from: "any" | "images"; image_shape: "landscape" | "portrait" | "square" | null; mark: string | null; description: string | null; party: "organization" | "person" | null; lead: string | null; image_order: string[]; mine: string | null; unique: string[][]; status: { field: string; closed: string[]; dropped: string[]; history: string | null; dates: Record<string, string>; stages: { option: string; label: string; owner: { kind: "member"; column: string; link: string | null; label: string; } | { kind: "group"; group: string; label: string; }; within: number | null; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; }[]; maker: string | null; moves: { query: string; param: string; link: string; status: string; at: string; by: string | null; went: Record<string, string>; } | null; } | null; settled: string | null; task: { close: { to: string; act: string | null; } | null; reopen: { to: string; act: string | null; } | null; member: string | null; } | null; progress: { entity: string; via: string; passed: string | null; read: { query: string; param: string; }; }[]; figure: string | null; scan: { read: "iso6346" | "text"; agent: string; field: string | null; photo: string | null; } | { read: "code"; field: string | null; photo: string | null; } | null; place: { address: string; latitude: string; longitude: string; accuracy: string | null; } | null; pin: { on: string; x: string; y: string; } | null; cadence: { on: { days: ("fri" | "mon" | "sat" | "sun" | "thu" | "tue" | "wed")[]; } | { field: string; }; every: { days: number | RecordBound; } | { months: number | RecordBound; } | { years: number | RecordBound; } | null; start: string | null; end: string | null; from: string | null; until: string | null; }[]; nests: { parent: string; children: string; closed: string | null; } | null; filed: Record<string, string>; list: { query: string; param: string | null; }; listed: string[] | null; one: { query: string; param: string; } | null; query: { opens: string[]; adds: string[]; } | null; create: { workflow: string; fields: string[]; picker: string[] | null; picker_only: boolean; inputs: Record<string, { alias: string; id: string; type: "autonumber" | "boolean" | "date" | "files" | "formula" | "lookup" | "number" | "rollup" | "select" | "select_member" | "select_record_link" | "text"; result: "boolean" | "date" | "files" | "number" | "select" | "select_member" | "select_record_link" | "text" | null; label: string; description: string | null; format: "datetime" | "email" | "link" | "markdown" | "month" | "phone" | "text" | "time" | null; multi: boolean; photo_places: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; decimals: number | null; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals: number | null; } | null; rating: number | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; due: boolean; frees: boolean; summed: boolean; accumulates: boolean; serial: boolean; whole: boolean; restates: string | null; starts: "me" | "today" | null; default: string | number | boolean | string[] | null; options: { id: string; alias: string; label: string; color: "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "gray" | "green" | "indigo" | "lime" | "neutral" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "slate" | "stone" | "teal" | "violet" | "yellow" | "zinc" | null; mark: { kind: string; name: string; } | null; short: string | null; }[] | null; link: string | null; accept: string | null; image: string | null; party: "organization" | "person" | null; pictures: { query: string; param: string; } | null; face: Record<string, string>; default_from: { link: string; field: string; } | null; reads: string[]; reads_through: string[]; counts: { entity: string; back: string | null; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; } | null; missing: { entity: string; } | null; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; bounds: { field: string; param: string; of: "date" | "number"; lookup: boolean; }[]; } | null; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; }>; handed: string[]; starts: Record<string, "me" | "today">; } | null; update: { workflow: string; fields: string[]; } | null; remove: { workflow: string; with: string[]; } | null; }>; views: ({ kind: "list"; key: string; label: string; entity: string; scope: { field: string; } | null; register: { columns: string[]; columns_stated: boolean; edits: string[]; filters: (string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; })[]; source_column: boolean; beside: boolean; search: string[] | null; chips: boolean; checks: boolean; regroup: boolean; sort: { field: string; desc: boolean; }[] | null; group: string | null; tabs: { tab: string; label: string; term: { kind: "in"; field: string; } | { kind: "open"; from: string; to: string; } | null; totals: { via: string; read: { query: string; }; columns: { alias: string; label: string; notation: { style: "decimal"; decimals: number | null; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals: number | null; } | null; aggregate: "avg" | "max" | "min" | "sum"; }[]; } | null; where: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; sort: { field: string; desc: boolean; }[] | null; }[] | null; opens_on: { days: number; } | { span: "day" | "month" | "quarter" | "week" | "year"; view: "day" | "month" | "week" | null; ahead: boolean; } | null; layout: SpecLayout; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; opens: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; remove: boolean; create: string[] | null; add_label: string | null; export: boolean | { act: string; }; readings: ({ entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "list"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number | RecordBound>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | RecordBound | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; } | { field: string; record: string; })[]; tab: string | null; columns: string[]; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "pivot"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; columns: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "shortfall"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string; across: string | null; value: string | null; on_hand: { entity: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; by: string | null; across: string | null; value: string | null; }; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; })[]; attention: boolean; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; }; entities: string[]; sources: { entity: string; fields: Record<string, string>; scope: string | null; register: { columns: string[]; columns_stated: boolean; edits: string[]; filters: (string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; })[]; source_column: boolean; beside: boolean; search: string[] | null; chips: boolean; checks: boolean; regroup: boolean; sort: { field: string; desc: boolean; }[] | null; group: string | null; tabs: { tab: string; label: string; term: { kind: "in"; field: string; } | { kind: "open"; from: string; to: string; } | null; totals: { via: string; read: { query: string; }; columns: { alias: string; label: string; notation: { style: "decimal"; decimals: number | null; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals: number | null; } | null; aggregate: "avg" | "max" | "min" | "sum"; }[]; } | null; where: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; sort: { field: string; desc: boolean; }[] | null; }[] | null; opens_on: { days: number; } | { span: "day" | "month" | "quarter" | "week" | "year"; view: "day" | "month" | "week" | null; ahead: boolean; } | null; layout: SpecLayout; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; opens: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; remove: boolean; create: string[] | null; add_label: string | null; export: boolean | { act: string; }; readings: ({ entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "list"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number | RecordBound>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | RecordBound | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; } | { field: string; record: string; })[]; tab: string | null; columns: string[]; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "pivot"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; columns: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "shortfall"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string; across: string | null; value: string | null; on_hand: { entity: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; by: string | null; across: string | null; value: string | null; }; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; })[]; attention: boolean; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; }; }[]; place: { options: Record<string, { id: string; alias: string; label: string; color: "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "gray" | "green" | "indigo" | "lime" | "neutral" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "slate" | "stone" | "teal" | "violet" | "yellow" | "zinc" | null; mark: { kind: string; name: string; } | null; short: string | null; }[]>; closed: string[]; } | null; read: string | null; bound: { read: { query: string; param: string; }; listed: string[]; same: { field: string; param: string; } | null; bounds: { field: string; param: string; lookup: boolean; of: "date" | "link" | "member" | "number" | "select"; options: Record<string, string> | null; }[]; via: string; } | null; } | { kind: "sheet"; key: string; label: string; readings: { reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "list"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number | RecordBound>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | RecordBound | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; } | { field: string; record: string; })[]; tab: string | null; columns: string[]; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "pivot"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; columns: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "shortfall"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string; across: string | null; value: string | null; on_hand: { entity: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; by: string | null; across: string | null; value: string | null; }; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; }; scope: { field: string; } | null; }[]; })[]; pages: Record<string, { door: "drawer" | "page" | null; facts: string[]; checks: boolean; sections: { title: string | null; description: string | null; at: string[] | null; fields: string[]; columns?: 1 | 2 | undefined; groups: { label: string; fields: string[]; columns?: 1 | 2 | undefined; acts: string[]; heads: string[] | null; lines: { key: string; label: string | null; cells: ({ kind: "field"; field: string; } | { kind: "blank"; } | { kind: "act"; act: string; } | { kind: "value"; key: string; label: string; compute: { expression: string; reads: Record<string, { from: "row"; field: string; } | { from: "record"; field: string; } | { from: "place"; field: string; } | { from: "formula"; expression: string; }>; }; output: "boolean" | "date" | "datetime" | "number" | "text"; notation: { style: "decimal"; decimals: number | null; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals: number | null; } | null; })[]; }[] | null; }[]; reads: string[]; blocks: ({ kind: "funnel"; entity: string; read: { query: string; param: string; }; label: string; steps: string[]; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { key: string; totals: Record<string, string>; narrower: string[]; soonest: string[]; expect: string | null; of: string | null; add_form: { preset: Record<string, { id: string; label: string; }>; among: Record<string, string[]>; } | null; edits: string[]; pick: { read: { query: string; param: string | null; }; back: string; same: { field: string; param: string; }[]; admits: { query: string; param: string | null; } | null; } | null; checklist: { photo: string | null; clause: string | null; words: string[]; failed: string[]; passed: string | null; } | null; gantt: { start: string; end: string; milestones: string[]; planned: { start: string | null; end: string | null; } | null; progress: string | null; after: string | null; } | null; compare: { before: string; after: string; } | null; current: string | null; post: { bodies: string[]; text: string; compute: { expression: string; reads: Record<string, { from: "row"; field: string; } | { from: "record"; field: string; } | { from: "place"; field: string; } | { from: "formula"; expression: string; }>; } | null; media: string; link: string | null; network: string; group: string | null; networks: Record<string, "facebook" | "instagram" | "linkedin" | "threads" | "x">; } | null; under: { field: string; entity: string; via: string; back: string; read: { query: string; param: string; listed: string[]; }; key: string; where: { field: string; options: string[]; }[]; add_form: { preset: Record<string, { id: string; label: string; }>; among: Record<string, string[]>; } | null; } | null; layout: "cards" | "table" | null | undefined; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; kind: "rows"; } | { key: string; totals: Record<string, string>; narrower: string[]; soonest: string[]; expect: string | null; of: string | null; add_form: { preset: Record<string, { id: string; label: string; }>; among: Record<string, string[]>; } | null; edits: string[]; pick: { read: { query: string; param: string | null; }; back: string; same: { field: string; param: string; }[]; admits: { query: string; param: string | null; } | null; } | null; checklist: { photo: string | null; clause: string | null; words: string[]; failed: string[]; passed: string | null; } | null; gantt: { start: string; end: string; milestones: string[]; planned: { start: string | null; end: string | null; } | null; progress: string | null; after: string | null; } | null; compare: { before: string; after: string; } | null; current: string | null; post: { bodies: string[]; text: string; compute: { expression: string; reads: Record<string, { from: "row"; field: string; } | { from: "record"; field: string; } | { from: "place"; field: string; } | { from: "formula"; expression: string; }>; } | null; media: string; link: string | null; network: string; group: string | null; networks: Record<string, "facebook" | "instagram" | "linkedin" | "threads" | "x">; } | null; under: { field: string; entity: string; via: string; back: string; read: { query: string; param: string; listed: string[]; }; key: string; where: { field: string; options: string[]; }[]; add_form: { preset: Record<string, { id: string; label: string; }>; among: Record<string, string[]>; } | null; } | null; layout: "cards" | "table" | null | undefined; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; kind: "outline"; counts: { query: string; param: string; }; } | { kind: "figures"; fields: string[]; labels: Record<string, string>; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "list"; key: string; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "statement"; title: string; lines: { field: string; op: "equals" | "minus" | "plus" | "times" | null; rate: string | null; parts: { entity: string; read: { query: string; param: string; listed: string[]; }; same: string; before: { field: string; param: string; } | null; columns: string[]; figure: string; } | null; }[]; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "timeline"; key: string; at: string; by: string | null; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "agenda"; key: string; day: string; time: string | null; part: string | null; start: string | null; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "files"; fields: string[]; title: string; add_label: string | null; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "reading"; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "list"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number | RecordBound>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | RecordBound | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; } | { field: string; record: string; })[]; tab: string | null; columns: string[]; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "pivot"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; columns: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "shortfall"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string; across: string | null; value: string | null; on_hand: { entity: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; by: string | null; across: string | null; value: string | null; }; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; }; via: string; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "text"; field: string; title: string; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "comments"; key: string; title: string; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "choices"; field: string; title: string; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; } | { kind: "linked"; field: string; title: string; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; })[]; acts: string[]; entry: string[]; acts_last: boolean; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; side: boolean; tab: string | null; }[]; steps: boolean; views: { kind: "list"; key: string; label: string; entity: string; scope: { field: string; } | null; register: { columns: string[]; columns_stated: boolean; edits: string[]; filters: (string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; })[]; source_column: boolean; beside: boolean; search: string[] | null; chips: boolean; checks: boolean; regroup: boolean; sort: { field: string; desc: boolean; }[] | null; group: string | null; tabs: { tab: string; label: string; term: { kind: "in"; field: string; } | { kind: "open"; from: string; to: string; } | null; totals: { via: string; read: { query: string; }; columns: { alias: string; label: string; notation: { style: "decimal"; decimals: number | null; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals: number | null; } | null; aggregate: "avg" | "max" | "min" | "sum"; }[]; } | null; where: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; sort: { field: string; desc: boolean; }[] | null; }[] | null; opens_on: { days: number; } | { span: "day" | "month" | "quarter" | "week" | "year"; view: "day" | "month" | "week" | null; ahead: boolean; } | null; layout: SpecLayout; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; opens: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; remove: boolean; create: string[] | null; add_label: string | null; export: boolean | { act: string; }; readings: ({ entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "list"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number | RecordBound>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | RecordBound | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; } | { field: string; record: string; })[]; tab: string | null; columns: string[]; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "pivot"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; columns: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "shortfall"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string; across: string | null; value: string | null; on_hand: { entity: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; by: string | null; across: string | null; value: string | null; }; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; })[]; attention: boolean; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; }; entities: string[]; sources: { entity: string; fields: Record<string, string>; scope: string | null; register: { columns: string[]; columns_stated: boolean; edits: string[]; filters: (string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; })[]; source_column: boolean; beside: boolean; search: string[] | null; chips: boolean; checks: boolean; regroup: boolean; sort: { field: string; desc: boolean; }[] | null; group: string | null; tabs: { tab: string; label: string; term: { kind: "in"; field: string; } | { kind: "open"; from: string; to: string; } | null; totals: { via: string; read: { query: string; }; columns: { alias: string; label: string; notation: { style: "decimal"; decimals: number | null; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals: number | null; } | null; aggregate: "avg" | "max" | "min" | "sum"; }[]; } | null; where: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; sort: { field: string; desc: boolean; }[] | null; }[] | null; opens_on: { days: number; } | { span: "day" | "month" | "quarter" | "week" | "year"; view: "day" | "month" | "week" | null; ahead: boolean; } | null; layout: SpecLayout; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; opens: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; remove: boolean; create: string[] | null; add_label: string | null; export: boolean | { act: string; }; readings: ({ entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "list"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number | RecordBound>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | RecordBound | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; } | { field: string; record: string; })[]; tab: string | null; columns: string[]; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "pivot"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; columns: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "shortfall"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string; across: string | null; value: string | null; on_hand: { entity: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; by: string | null; across: string | null; value: string | null; }; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; })[]; attention: boolean; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; }; }[]; place: { options: Record<string, { id: string; alias: string; label: string; color: "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "gray" | "green" | "indigo" | "lime" | "neutral" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "slate" | "stone" | "teal" | "violet" | "yellow" | "zinc" | null; mark: { kind: string; name: string; } | null; short: string | null; }[]>; closed: string[]; } | null; read: string | null; bound: { read: { query: string; param: string; }; listed: string[]; same: { field: string; param: string; } | null; bounds: { field: string; param: string; lookup: boolean; of: "date" | "link" | "member" | "number" | "select"; options: Record<string, string> | null; }[]; via: string; } | null; }[]; draws: string[]; outside: { key: string; entity: string; at: string[]; one: { query: string; param: string; }; page: { door: "page"; draws: string[]; sections: [{ title: string; description: string | null; fields: string[]; blocks: { kind: "list"; key: string; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "list"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number | RecordBound>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | RecordBound | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; } | { field: string; record: string; })[]; tab: string | null; columns: string[]; column_readings: { read: { query: string; param: string; window: boolean; change: boolean; } | null; period: "month" | "quarter" | "today" | "tomorrow" | "week" | "year" | { days: number; } | null; columns: { key: string; at: number; child: boolean; reading: { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "breakdown"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; by: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; }; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; sort: "asc" | "desc" | null; over: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "metric"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; over: string | null; target: number | { field: string; } | null; better: "down" | "up" | null; bound: { value: number; } | { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "progress"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; }; kind: "trend"; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; } | { field: string; through: true; })[]; tab: string | null; over: string; value: string | null; aggregate: "avg" | "max" | "min" | "sum"; ahead: boolean; split: string | { field: string; tiers: number[]; } | { field: string; values: "all" | "held"; } | null; within: { low: number | RecordBound | null; high: number | RecordBound | null; } | null; hourly: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; hour: true | null; sum: string | null; max: string | null; min: string | null; } | null; } | null; } | { kind: "funnel"; entity: string; label: string; steps: string[]; read: { query: string; param: string | null; }; }; }[]; } | null; }; via: string; same: { field: string; param: string; } | null; bounds: { field: string; param: string; of: "date" | "number"; lookup: boolean; }[]; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; after: number; }[]; acts: string[]; }]; }; opens_on: { days: number; } | { span: "day" | "month" | "quarter" | "week" | "year"; view: "day" | "month" | "week" | null; ahead: boolean; }; }[]; moves: { entity: string; via: string; read: { query: string; param: string; }; title: string; at: string; by: string | null; create: string[] | null; add_label: string | null; } | null; }>; acts: { alias: string; label: string; on: "record" | "rows" | "view"; rowless: boolean; period: boolean; of: string; workflow: string; when: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<Bound>; of: "date" | "datetime" | "number"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[]; to: string | null; writes: boolean; into: string | null; paper: { entity: string; option: string; } | null; marks: Record<string, boolean>; requires: string[]; recommends: string[]; asks: (string | { input: string; label: string; type: "date" | "file" | "link" | "long_text" | "member" | "number" | "select" | "text"; multi: boolean; options: { alias: string; label: string; color: "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "gray" | "green" | "indigo" | "lime" | "neutral" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "slate" | "stone" | "teal" | "violet" | "yellow" | "zinc" | null; mark: { kind: string; name: string; } | null; short: string | null; }[] | null; entity: string | null; required: boolean; default: string | null; starts: "me" | "today" | null; accept: string | null; })[]; asking: Record<string, { alias: string; id: string; type: "autonumber" | "boolean" | "date" | "files" | "formula" | "lookup" | "number" | "rollup" | "select" | "select_member" | "select_record_link" | "text"; result: "boolean" | "date" | "files" | "number" | "select" | "select_member" | "select_record_link" | "text" | null; label: string; description: string | null; format: "datetime" | "email" | "link" | "markdown" | "month" | "phone" | "text" | "time" | null; multi: boolean; photo_places: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; decimals: number | null; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals: number | null; } | null; rating: number | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; due: boolean; frees: boolean; summed: boolean; accumulates: boolean; serial: boolean; whole: boolean; restates: string | null; starts: "me" | "today" | null; default: string | number | boolean | string[] | null; options: { id: string; alias: string; label: string; color: "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "gray" | "green" | "indigo" | "lime" | "neutral" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "slate" | "stone" | "teal" | "violet" | "yellow" | "zinc" | null; mark: { kind: string; name: string; } | null; short: string | null; }[] | null; link: string | null; accept: string | null; image: string | null; party: "organization" | "person" | null; pictures: { query: string; param: string; } | null; face: Record<string, string>; default_from: { link: string; field: string; } | null; reads: string[]; reads_through: string[]; counts: { entity: string; back: string | null; where: ({ field: string; options: string[]; } | { field: string; compare: StatedBounds<number>; of: "number"; zone: string | null; } | { field: string; compare: StatedBounds<string | { now: true; }>; of: "date" | "datetime"; zone: string | null; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; } | null; missing: { entity: string; } | null; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; bounds: { field: string; param: string; of: "date" | "number"; lookup: boolean; }[]; } | null; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; }>; starts: Record<string, "me" | "today">; makes: string | null; papers: { template: string; label: string; when: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; }[] | null; archive: string | null; intake: { agent: string; papers: { type: "lines"; entity: string; kind: string; files: string; } | { type: "field"; files: string; } | null; fields: string[]; parties: { link: string; fields: string[]; key: string[]; }[]; rows: { entity: string; fields: string[]; key: string[]; files: string | null; }[]; links: { entity: string; table: string; }[]; } | null; sign: { into: string; by: string; at: string; witness: string | null; } | null; review: boolean; owes: { entity: string; via: string; day: string; end: string | null; planned: string | null; cadence: number; } | null; confirm: string | true | null; danger: boolean; button: "lead" | boolean; owner: { kind: "member"; column: string; link: string | null; label: string; } | { kind: "group"; group: string; label: string; } | null; corrects: boolean; drafted: boolean; stands: string[]; views: string[]; }[]; checks: { field: string; of: string; blocks: "all" | string[] | null; resolve: string[]; writers: string[]; reads: string[]; draft?: { expression: string; reads: Record<string, { from: "row"; field: string; } | { from: "record"; field: string; } | { from: "place"; field: string; } | { from: "formula"; expression: string; }>; } | undefined; stands: string[]; }[]; };
|
|
31
31
|
/** What a body read needs of a table: its id, its name for a refusal, and its fields. */
|
|
32
32
|
export type BodyTable = { id: string; name: string; fields: (TableField)[]; title_field_key: string | null; };
|
|
33
33
|
/**
|
|
@@ -288,7 +288,7 @@ export interface ResolvedOption {
|
|
|
288
288
|
mark?: { kind: "brand"; name: string; } | { kind: "icon"; name: string; };
|
|
289
289
|
}
|
|
290
290
|
/** The register's layout as the spec states it: `kind` and the facts the runtime draws it from. */
|
|
291
|
-
export type SpecLayout = CardsSpec | TableSpec | { kind: "calendar"; date: string; end: string | null; } | { kind: "lanes"; field: string; group: string | null; start: string; end: string | null; loads: { value: string; against: string; }[]; per: "day" | "week"; holds: { quantity: string | null; limit: number | { against: string; }; frees: boolean; read: { query: string; param: string | null; listed: string[]; }; } | null; read: { query: string; param: string; listed: string[]; } | null; opens: string | null; folder: string | null; order: string | null; held: boolean; down: { field: string; held: boolean; moves: boolean; opens: string | null; } | null; move: string | null; } | { kind: "plan"; at: string; across: string; up: string; to: { at: string; across: string; up: string; by: string | null; } | null; fill: string[]; mark: { field: string; options: string[]; } | null; size: { field: string; options: Record<string, { across: number; along: number; up: number; }>; } | null; place: { entity: string; read: { query: string; param: string | null; listed: string[]; }; kind: string; kinds: { bay: string; area: string | null; landmark: string | null; }; sheet: string | null; scale: string | null; x: string; y: string; width: string | null; depth: string | null; across: string; up: string; reach_from: string | null; points: string | null; stacked: string | null; reaches: { first: string; last: string; both: string; } | null; pointing: { up: string; right: string; down: string; left: string; } | null; size: { across: string; along: string; up: string; } | null; }; load: { query: string; param: string | null; } | null; } | { kind: "roster"; entity: string; via: string; day: string | null; end: string | null; expect: string | null; of: string | null; cadence: { on: { days: ("fri" | "mon" | "sat" | "sun" | "thu" | "tue" | "wed")[]; } | { field: string; }; every: { days: number | RecordBound; } | { months: number | RecordBound; } | { years: number | RecordBound; } | null; from: string | null; until: string | null; planned: string | null; closed: { entity: string; read: { query: string; param: string | null; }; from: string; to: string | null; via: string | null; }[]; } | null; read: { query: string; param: string; listed: string[]; }; covers: number | null; value: string | null; create: string[] | null; } | { start: string; end: string; milestones: string[]; planned: { start: string | null; end: string | null; } | null; progress: string | null; after: string | null; kind: "gantt"; };
|
|
291
|
+
export type SpecLayout = CardsSpec | TableSpec | { kind: "calendar"; date: string; end: string | null; } | { kind: "lanes"; field: string; group: string | null; start: string; end: string | null; loads: { value: string; against: string; }[]; per: "day" | "week"; holds: { quantity: string | null; limit: number | { against: string; }; frees: boolean; read: { query: string; param: string | null; listed: string[]; }; } | null; read: { query: string; param: string; listed: string[]; } | null; opens: string | null; folder: string | null; order: string | null; held: boolean; down: { field: string; held: boolean; moves: boolean; opens: string | null; } | null; move: string | null; } | { kind: "plan"; at: string; across: string; up: string; to: { at: string; across: string; up: string; by: string | null; } | null; fill: string[]; mark: { field: string; options: string[]; } | null; size: { field: string; options: Record<string, { across: number; along: number; up: number; }>; } | null; place: { entity: string; read: { query: string; param: string | null; listed: string[]; }; page_row?: string[] | undefined; kind: string; kinds: { bay: string; area: string | null; landmark: string | null; }; sheet: string | null; scale: string | null; x: string; y: string; width: string | null; depth: string | null; across: string; up: string; reach_from: string | null; points: string | null; stacked: string | null; reaches: { first: string; last: string; both: string; } | null; pointing: { up: string; right: string; down: string; left: string; } | null; size: { across: string; along: string; up: string; } | null; }; load: { query: string; param: string | null; } | null; } | { kind: "roster"; entity: string; via: string; day: string | null; end: string | null; expect: string | null; of: string | null; cadence: { on: { days: ("fri" | "mon" | "sat" | "sun" | "thu" | "tue" | "wed")[]; } | { field: string; }; every: { days: number | RecordBound; } | { months: number | RecordBound; } | { years: number | RecordBound; } | null; from: string | null; until: string | null; planned: string | null; closed: { entity: string; read: { query: string; param: string | null; }; from: string; to: string | null; via: string | null; }[]; } | null; read: { query: string; param: string; listed: string[]; }; covers: number | null; value: string | null; create: string[] | null; } | { start: string; end: string; milestones: string[]; planned: { start: string | null; end: string | null; } | null; progress: string | null; after: string | null; kind: "gantt"; };
|
|
292
292
|
/** A comparison as a compiled app states it: every key, `null` where it bounds nothing. */
|
|
293
293
|
export type StatedBounds<V> = { gt: V | null; gte: V | null; lt: V | null; lte: V | null; };
|
|
294
294
|
export type TableField = { key: string; alias?: string | undefined; name: string; description: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; type: "number"; notation?: { style: "decimal"; decimals?: number | undefined; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals?: number | undefined; } | undefined; rating?: { max: number; } | null | undefined; format: "currency" | "number" | "percentage"; currency?: string | null | undefined; unit?: string | null | undefined; unit_field?: string | null | undefined; currency_field?: string | null | undefined; default_value?: number | null | undefined; default_from?: { link_field_key: string; through?: string[] | undefined; field_key: string; options?: Record<string, string> | undefined; } | null | undefined; } | { key: string; alias?: string | undefined; name: string; description: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; type: "text"; unique?: boolean | undefined; format?: "email" | "link" | "markdown" | "phone" | "text" | "time" | undefined; default_value?: string | null | undefined; default_from?: { link_field_key: string; through?: string[] | undefined; field_key: string; options?: Record<string, string> | undefined; } | null | undefined; } | { key: string; alias?: string | undefined; name: string; description: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; type: "date"; format?: "date" | "date_range" | "datetime" | "datetime_range" | "month" | undefined; timezone?: string | undefined; derive_from?: "created_at" | "updated_at" | undefined; default_value?: string | null | undefined; default_from?: { link_field_key: string; through?: string[] | undefined; field_key: string; options?: Record<string, string> | undefined; } | null | undefined; } | { key: string; alias?: string | undefined; name: string; description: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; type: "boolean"; default_value?: boolean | null | undefined; default_from?: { link_field_key: string; through?: string[] | undefined; field_key: string; options?: Record<string, string> | undefined; } | null | undefined; } | { key: string; alias?: string | undefined; name: string; description: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; type: "select"; options: { key: string; alias?: string | undefined; name: string; color?: "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "gray" | "green" | "indigo" | "lime" | "neutral" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "slate" | "stone" | "teal" | "violet" | "yellow" | "zinc" | undefined; mark?: { kind: string; name: string; } | undefined; short?: string | undefined; }[]; multi?: boolean | undefined; default_value?: string[] | null | undefined; default_from?: { link_field_key: string; through?: string[] | undefined; field_key: string; options?: Record<string, string> | undefined; } | null | undefined; } | { key: string; alias?: string | undefined; name: string; description: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; type: "select_member"; multi?: boolean | undefined; default_value?: string[] | null | undefined; default_from?: { link_field_key: string; through?: string[] | undefined; field_key: string; options?: Record<string, string> | undefined; } | null | undefined; } | { key: string; alias?: string | undefined; name: string; description: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; type: "select_record_link"; table_id: string; paired_field_key?: string | undefined; cardinality?: "many" | "one" | undefined; default_from?: { link_field_key: string; through?: string[] | undefined; field_key: string; options?: Record<string, string> | undefined; } | null | undefined; } | { key: string; alias?: string | undefined; name: string; description: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; type: "rollup"; source_field_key: string; aggregate_option: { operation: "missing"; field_key: string; } | { operation: "checked" | "percent_checked" | "percent_unchecked" | "unchecked"; field_key: string; } | { operation: "empty" | "filled" | "percent_empty" | "percent_filled" | "selected"; field_key: string; } | { operation: "empty" | "filled" | "percent_empty" | "percent_filled" | "percent_unique" | "unique"; field_key: string; } | { operation: "empty" | "filled" | "percent_empty" | "percent_filled" | "percent_unique" | "selected" | "unique"; field_key: string; } | { operation: "date_range" | "earliest" | "empty" | "filled" | "latest" | "percent_empty" | "percent_filled" | "percent_unique" | "unique"; field_key: string; } | { operation: "avg" | "empty" | "filled" | "max" | "median" | "min" | "percent_empty" | "percent_filled" | "percent_unique" | "range" | "sum" | "unique"; field_key: string; } | { operation: "avg" | "date_range" | "earliest" | "empty" | "filled" | "latest" | "max" | "median" | "min" | "percent_empty" | "percent_filled" | "percent_unique" | "range" | "sum" | "unique"; field_key: string; } | { operation: "avg" | "checked" | "date_range" | "earliest" | "empty" | "filled" | "latest" | "max" | "median" | "min" | "percent_checked" | "percent_empty" | "percent_filled" | "percent_unchecked" | "percent_unique" | "range" | "sum" | "unchecked" | "unique"; field_key: string; } | { operation: "count"; field_key?: string | undefined; }; of_field_key?: string | undefined; filter?: TableRecordFiltersGroupNode | undefined; aggregate_field_type?: "autonumber" | "boolean" | "button" | "date" | "files" | "formula" | "lookup" | "number" | "rollup" | "select" | "select_member" | "select_record_link" | "text" | undefined; aggregate_field_notation?: { style: "decimal"; decimals?: number | undefined; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals?: number | undefined; } | undefined; aggregate_field_format?: string | undefined; aggregate_field_currency?: string | undefined; aggregate_field_unit?: string | undefined; aggregate_field_unit_field?: string | undefined; aggregate_field_currency_field?: string | undefined; } | { key: string; alias?: string | undefined; name: string; description: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; type: "lookup"; source_field_key: string; lookup_field_key: string; lookup_field_type?: "autonumber" | "boolean" | "button" | "date" | "files" | "formula" | "lookup" | "number" | "rollup" | "select" | "select_member" | "select_record_link" | "text" | undefined; lookup_field_notation?: { style: "decimal"; decimals?: number | undefined; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals?: number | undefined; } | undefined; lookup_field_format?: string | undefined; lookup_field_currency?: string | undefined; lookup_field_unit?: string | undefined; lookup_field_options?: { key: string; alias?: string | undefined; name: string; color?: string | undefined; mark?: { kind: string; name: string; } | undefined; }[] | undefined; lookup_field_autonumber?: boolean | undefined; lookup_field_several?: true | undefined; order_by?: { field_key: string; direction: "asc" | "desc"; } | undefined; } | { key: string; alias?: string | undefined; name: string; description: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; type: "files"; photo_places?: true | undefined; } | { key: string; alias?: string | undefined; name: string; description: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; type: "formula"; formula: { expression: string; notation?: { style: "decimal"; decimals?: number | undefined; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; decimals?: number | undefined; } | undefined; link?: true | undefined; format?: "currency" | "link" | "number" | "percentage" | undefined; currency?: string | undefined; unit?: string | undefined; unit_field?: string | undefined; currency_field?: string | undefined; options?: { key: string; alias?: string | undefined; name: string; color?: "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "gray" | "green" | "indigo" | "lime" | "neutral" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "slate" | "stone" | "teal" | "violet" | "yellow" | "zinc" | undefined; mark?: { kind: string; name: string; } | undefined; short?: string | undefined; }[] | undefined; output_type?: "boolean" | "date" | "datetime" | "number" | "select" | "text" | undefined; volatile?: boolean | undefined; }; } | { key: string; alias?: string | undefined; name: string; description: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; type: "button"; text: string; workflow_id?: string | null | undefined; } | { key: string; alias?: string | undefined; name: string; description: string; confirm_before_update?: boolean | undefined; required?: boolean | undefined; type: "autonumber"; prefix?: string | undefined; padding?: number | undefined; template?: string | undefined; };
|
package/dist/store.d.ts
CHANGED
|
@@ -61,7 +61,25 @@ export declare function useKey<T>(key: string | null, fetcher: Fetcher<T>, opts?
|
|
|
61
61
|
*/
|
|
62
62
|
export declare function stageKey<T>(key: string, next: (current: T | undefined) => T, write: () => Promise<unknown>): Promise<void>;
|
|
63
63
|
/** A key's answer outside a render: the one held, else the request in flight, else a new one — so a key read here and on screen is asked once. */
|
|
64
|
-
export declare function readKey<T>(key: string, fetcher: Fetcher<T
|
|
64
|
+
export declare function readKey<T>(key: string, fetcher: Fetcher<T>, opts?: {
|
|
65
|
+
aliases?: readonly string[];
|
|
66
|
+
}): Promise<T>;
|
|
67
|
+
/**
|
|
68
|
+
* Ask a key no screen reads yet, so its first mount finds the answer held or in flight and asks nothing more. A key already held
|
|
69
|
+
* is left as it is. A failure removes the key — the mount asks afresh and shows its own outcome — and is reported, since no screen
|
|
70
|
+
* has shown it; a key mounted while the ask was out keeps the failure, which that mount shows.
|
|
71
|
+
*/
|
|
72
|
+
export declare function warmKey<T>(key: string, fetcher: Fetcher<T>, opts: {
|
|
73
|
+
aliases: readonly string[];
|
|
74
|
+
}): void;
|
|
75
|
+
/**
|
|
76
|
+
* Hold `answer` under a key no screen has answered yet, which its first mount shows at once and asks again in the background: the
|
|
77
|
+
* answer is what the app already holds of the read, not the server's answer to it. A key already answered, or asked and not yet answered (a mount's ask, a warm), keeps its own: the seed never stands in
|
|
78
|
+
* for an answer on its way, and never outdates it.
|
|
79
|
+
*/
|
|
80
|
+
export declare function seedKey<T>(key: string, fetcher: Fetcher<T>, answer: T, opts: {
|
|
81
|
+
aliases: readonly string[];
|
|
82
|
+
}): void;
|
|
65
83
|
/** Replace a key's answer with what the app knows it now is, asking nothing. */
|
|
66
84
|
export declare function setKey(key: string, answer: unknown): void;
|
|
67
85
|
/** Test seam: forget every answer. */
|
package/docs/data_fetching.md
CHANGED
|
@@ -24,6 +24,8 @@ untyped. It is written from the app's live bindings by `lotics app deploy` and
|
|
|
24
24
|
| `useQuery(alias, params?, { rows: false, total: true })` | `total` only, no rows (`total: { by: column }` or `total: { where: { name: filter } }` adds `counts`) | a facet chip, a queue badge, an "N awaiting approval" tile — the size of a set you are not listing |
|
|
25
25
|
| `useQueries(calls, opts?)` | one state per `{ alias, params?, filter?, sort?, aggregate?, total?, rows?, fields? }`, in order — a `sort` orders that call's rows before the cap cuts them | reads that are DATA — a list known only at render, one read per item, or one count per stage (`rows: false, total: true`, each state's `.total`); the deploy's alias scan reads a list as dynamic, so every alias in it is still declared. With `aggregate` a call answers the groups of its filtered rows instead of the rows ([queries](./queries.md)) |
|
|
26
26
|
| `queryAll(alias, params?, { filter, sort })` | a promise of every row | outside React, for a job that must hold the whole narrowed set in the browser (the ids an act runs on): it asks page after page until the server says the set ended, never stopping at the 10,000-row cap. The server's rows as stored — no write of this app is drawn over them |
|
|
27
|
+
| `prefetchQuery(alias, params?, { limit, filter, sort, fields })`, `prefetchQueries(calls)` | nothing | before a screen mounts: starts the read `useQuery` / `useQueries` makes of the same arguments, so the screen finds the answer held or the request in flight and asks nothing twice. The first mount takes the answer as fresh; a failure is reported and the mount asks afresh |
|
|
28
|
+
| `seedQuery(alias, params, { limit, filter, sort, fields }, rows)` | nothing | before a screen mounts: shows `rows` as the first answer of the read `useQuery` of the same arguments makes — rows the app already holds of it — so the screen draws them at once and asks the server once in the background, whose answer replaces them. A read already answered keeps its answer |
|
|
27
29
|
| `exportQuery(alias, { params, filter, sort, tabs?, report, file, labels? })` | a promise of an `ExportedFile`: `{ filename, mime_type, url, size, created_at }` | every row the narrowed set holds, made into one file by the server — no row reaches the browser. `tabs` (2 to 5, each `{ tab, label, filter?, sort?, totals? }`; `totals` is `{ query, params, via, columns }`, the read of a totals tab beside its rows, joined on the link column `via`, refused where that read lacks `via` or a column or a group links several rows; the groups naming one row, one per kind of row a totals tab adds, are added up) are each read as the export's own rows are — same query and params, under the tab's own filter and sort (absent, the declared order). `report` is `{ title, lines, readings }`; `file` is `{ kind: "workbook", language, sheet, columns }` (the report workbook, its head closing with the moment the server made it, each column `{ key, header, type }` an output column of the query — a `number` one on a number column, a `date` one on a date or datetime; with `tabs`, one sheet per tab named by its `label` in place of `sheet`). `labels`, by `select` output column, the words each option key prints as in the file — a cell no field of the query names (a union's literal column) arrives as its bare key; a cell its field's option names prints as that, a key the map lacks as itself, and a column no select of the query holds as it is. Past 20,000 rows, in any tab, it rejects, never cuts; each caller makes at most 60 exports a minute. The file has no `id` — it is a download, not a workspace file a workflow or a field takes: its `url` is signed for the caller for at most an hour, so download it with `downloadFileFromUrl(url, filename)` (`@lotics/ui/download`) when the promise resolves — a tab `openExternal` opens seconds after the click is a pop-up the browser blocks; the server deletes the file a day after it is made |
|
|
28
30
|
| `exportApp(list, narrowing)` | a promise of an `ExportedFile`, as `exportQuery`'s | the workbook the server makes of a List of a JSON app that states `export: true`, named by its View id (a root List's key; `<page entity>.<key>` for a List on a page; a custom-code app makes its files with `exportQuery`), over the rows as `narrowing` states it (`tab`, `status`, `filters`, `search`, `overdue`, `waiting`, `period`, `window`, `sort`, `group`, `folder`, `row`; a `filters` entry `null` clears the chip the register opens on; `row` is the id of the row a List below a Record page hangs from, required there and refused elsewhere): the server reads the rows, the band's readings and the names under the caller's own access. Download it as `exportQuery`'s |
|
|
29
31
|
|
package/package.json
CHANGED
|
File without changes
|