@lotics/app-sdk 0.126.1 → 0.127.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -93,6 +93,9 @@ function getMockAgent(alias) {
93
93
  if (!isMockMode()) return null;
94
94
  return registeredFixture?.agents?.[alias] ?? null;
95
95
  }
96
+ function getMockAgentBeat() {
97
+ return registeredFixture?.agentBeatMs;
98
+ }
96
99
  function getMockExport(alias) {
97
100
  if (!isMockMode()) return null;
98
101
  return registeredFixture?.exports?.[alias] ?? null;
@@ -7919,7 +7922,7 @@ var TOOL_INPUT_SEMANTICS = {
7919
7922
  // ─── Document-generation tools ────────────────────────────────────────
7920
7923
  generate_document: {
7921
7924
  data: { kind: "template_variables" },
7922
- document_template_id: { kind: "scalar" },
7925
+ document_template_id: { kind: "template_ref" },
7923
7926
  filename: { kind: "text" },
7924
7927
  html: { kind: "text" }
7925
7928
  },
@@ -7953,7 +7956,7 @@ var TOOL_INPUT_SEMANTICS = {
7953
7956
  bcc: { kind: "text" },
7954
7957
  file_ids: { kind: "scalar" },
7955
7958
  draft: { kind: "scalar" },
7956
- template_id: { kind: "scalar" },
7959
+ template_id: { kind: "template_ref" },
7957
7960
  template_data: { kind: "template_variables" }
7958
7961
  },
7959
7962
  gmail_send_email: {
@@ -7965,7 +7968,7 @@ var TOOL_INPUT_SEMANTICS = {
7965
7968
  content: { kind: "text" },
7966
7969
  file_ids: { kind: "scalar" },
7967
7970
  draft: { kind: "scalar" },
7968
- template_id: { kind: "scalar" },
7971
+ template_id: { kind: "template_ref" },
7969
7972
  template_data: { kind: "template_variables" }
7970
7973
  },
7971
7974
  telegram_list_chats: {
@@ -8037,7 +8040,7 @@ var TOOL_INPUT_SEMANTICS = {
8037
8040
  bcc: { kind: "text" },
8038
8041
  file_ids: { kind: "scalar" },
8039
8042
  draft: { kind: "scalar" },
8040
- template_id: { kind: "scalar" },
8043
+ template_id: { kind: "template_ref" },
8041
8044
  template_data: { kind: "template_variables" }
8042
8045
  },
8043
8046
  outlook_send_email: {
@@ -8050,7 +8053,7 @@ var TOOL_INPUT_SEMANTICS = {
8050
8053
  content: { kind: "text" },
8051
8054
  file_ids: { kind: "scalar" },
8052
8055
  draft: { kind: "scalar" },
8053
- template_id: { kind: "scalar" },
8056
+ template_id: { kind: "template_ref" },
8054
8057
  template_data: { kind: "template_variables" }
8055
8058
  },
8056
8059
  wininvoice_create_or_update_invoice: {
@@ -8248,7 +8251,6 @@ function stepChildStepArrays(step) {
8248
8251
  case "tool_call":
8249
8252
  case "wait":
8250
8253
  case "wait_for_event":
8251
- case "wait_for_approval":
8252
8254
  case "return":
8253
8255
  case "bind":
8254
8256
  case "validate":
@@ -9694,7 +9696,7 @@ var LoopSignal = class {
9694
9696
  var MAX_PREDICTED_ITERATIONS = 500;
9695
9697
  var PREDICTION_BUDGET_MS = 1e3;
9696
9698
  var PREDICTION_MISSES_MAX = 50;
9697
- var ENDS_THE_WALK = /* @__PURE__ */ new Set(["return", "validate", "break", "continue", "wait", "wait_for_event", "wait_for_approval"]);
9699
+ var ENDS_THE_WALK = /* @__PURE__ */ new Set(["return", "validate", "break", "continue", "wait", "wait_for_event"]);
9698
9700
  function unread(key) {
9699
9701
  throw new UnknownValue(key);
9700
9702
  }
@@ -9991,7 +9993,6 @@ async function run(walk, step) {
9991
9993
  }
9992
9994
  case "wait":
9993
9995
  case "wait_for_event":
9994
- case "wait_for_approval":
9995
9996
  walk.unsure = true;
9996
9997
  return unknownAt(walk.ctx.step_outputs, step.id);
9997
9998
  case "bind": {
@@ -10824,7 +10825,7 @@ function useAgentRun(alias) {
10824
10825
  const inflight = streamLeg(
10825
10826
  (onText) => mock === null ? rpcAgentRun({ alias, session_id: opts.sessionId, input: input ?? {} }, onText, (runId) => {
10826
10827
  runIdRef.current = runId;
10827
- }) : playMockRun(typeof mock === "function" ? mock(input ?? {}) : mock, onText),
10828
+ }) : playMockRun(typeof mock === "function" ? mock(input ?? {}) : mock, onText, getMockAgentBeat()),
10828
10829
  initialAgentRunState()
10829
10830
  );
10830
10831
  const tracked = inflight.finally(() => {
package/dist/mock.d.ts CHANGED
@@ -43,6 +43,8 @@ export interface AppFixture {
43
43
  exportApps?: Record<string, MockExportApp>;
44
44
  /** `useRecording(alias)` reads as available; `start`/`stop` change nothing. */
45
45
  recordings?: Record<string, RecordingState>;
46
+ /** How long a played agent run waits before each line it streams; a real run's pace when unset. */
47
+ agentBeatMs?: number;
46
48
  }
47
49
  export declare function registerMockFixture(fixture: AppFixture | undefined): void;
48
50
  /** The raw `?__mock=1` flag, fixture or not; false where `window.location` is absent. */
@@ -53,6 +55,8 @@ export declare function getMockRows(alias: string, call: MockQueryCall): Array<R
53
55
  export declare function getMockWorkflow(alias: string): MockWorkflow | null;
54
56
  /** Null for an unmocked alias, which runs for real. */
55
57
  export declare function getMockAgent(alias: string): MockAgent | null;
58
+ /** The pace the fixture plays agent runs at; undefined for a real run's. */
59
+ export declare function getMockAgentBeat(): number | undefined;
56
60
  /** Null for an unmocked alias, which the server exports. */
57
61
  export declare function getMockExport(alias: string): MockExport | null;
58
62
  /** Null for an unmocked key, which the server exports. */
@@ -24,7 +24,7 @@ export interface AppFile {
24
24
  place?: PhotoPlace;
25
25
  }
26
26
  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; };
27
- export type AppSpec = { version: 31; app: { alias: string; label: string; description: string | null; locale: ReportLanguage; scope: { entity: string; param: string; counts: { query: string; param: string | null; } | null; list: string | null; } | null; opens_on: { days: 30; } | { span: "month" | "quarter" | "year"; } | 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" | "link" | "markdown" | "text" | null; multi: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; tolerance: number | null; due: boolean; frees: boolean; summed: boolean; accumulates: 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[]; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; } | null; picks_only: boolean; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; }>; title: string; subtitle: string[]; image: string | null; mark: string | null; description: string | null; party: "organization" | "person" | null; mine: string | null; status: { field: string; closed: string[]; history: string | null; dates: Record<string, string>; stages: { option: string; label: string; owner: { kind: "member"; column: string; 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; } | { read: "code"; } | null; place: { address: string; latitude: string; longitude: string; accuracy: string | null; } | null; on_site: { photos: string[]; place: string | null; latitude: string; longitude: string; radius: number; } | null; pin: { on: string; x: string; y: string; } | null; size: { across: string; along: string; up: 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; }; create: { workflow: string; fields: string[]; picker: string[] | null; } | 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[]; filters: (string | { field: string; tiers: number[]; })[]; source_column: boolean; beside: boolean; search: string[] | null; 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"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; }[]; } | 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; }; 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: { label: string | null; description: string | null; query: string; template: string | null; filename: string | null; where: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; per: string | null; per_row: string[]; sources: string[] | null; held: Record<string, string[]> | null; per_field: { 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" | "link" | "markdown" | "text" | null; multi: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; tolerance: number | null; due: boolean; frees: boolean; summed: boolean; accumulates: 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[]; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; } | null; picks_only: boolean; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; } | null; fixed: boolean; key: string; }[]; readings: ({ entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; columns: string[]; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; by: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; value: string | null; average: boolean; over: string | null; target: number | 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; sum: 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; sum: 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"; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; }; columns: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; weight: string | null; measured: { via: string; read: { query: string; param: string; }; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; 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; sum: 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; sum: 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"; })[]; tab: string | null; over: string; value: string | null; ahead: boolean; })[]; attention: boolean; }; entities: string[]; sources: { entity: string; fields: Record<string, string>; scope: string | null; register: { columns: string[]; filters: (string | { field: string; tiers: number[]; })[]; source_column: boolean; beside: boolean; search: string[] | null; 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"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; }[]; } | 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; }; 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: { label: string | null; description: string | null; query: string; template: string | null; filename: string | null; where: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; per: string | null; per_row: string[]; sources: string[] | null; held: Record<string, string[]> | null; per_field: { 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" | "link" | "markdown" | "text" | null; multi: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; tolerance: number | null; due: boolean; frees: boolean; summed: boolean; accumulates: 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[]; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; } | null; picks_only: boolean; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; } | null; fixed: boolean; key: string; }[]; readings: ({ entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; columns: string[]; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; by: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; value: string | null; average: boolean; over: string | null; target: number | 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; sum: 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; sum: 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"; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; }; columns: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; weight: string | null; measured: { via: string; read: { query: string; param: string; }; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; 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; sum: 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; sum: 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"; })[]; tab: string | null; over: string; value: string | null; ahead: boolean; })[]; attention: boolean; }; }[]; place: { 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" | "link" | "markdown" | "text" | null; multi: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; tolerance: number | null; due: boolean; frees: boolean; summed: boolean; accumulates: 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[]; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; } | null; picks_only: boolean; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; }>; title: string; subtitle: string[]; image: string | null; mark: string | null; description: string | null; party: "organization" | "person" | null; mine: string | null; status: { field: string; closed: string[]; history: string | null; dates: Record<string, string>; stages: { option: string; label: string; owner: { kind: "member"; column: string; 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; } | { read: "code"; } | null; place: { address: string; latitude: string; longitude: string; accuracy: string | null; } | null; on_site: { photos: string[]; place: string | null; latitude: string; longitude: string; radius: number; } | null; pin: { on: string; x: string; y: string; } | null; size: { across: string; along: string; up: 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; }; create: { workflow: string; fields: string[]; picker: string[] | null; } | null; update: { workflow: string; fields: string[]; } | null; remove: { workflow: string; with: string[]; } | null; } | null; bound: { read: { query: string; param: string; }; same: { field: string; param: string; } | null; bounds: { field: string; param: string; of: "date" | "number"; lookup: boolean; }[]; 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; sum: 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"; })[]; tab: string | null; columns: string[]; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; by: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; value: string | null; average: boolean; over: string | null; target: number | 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; sum: 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; sum: 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"; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; }; columns: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; 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; sum: 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; sum: 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"; })[]; tab: string | null; over: string; value: string | null; ahead: boolean; }; scope: { field: string; } | null; }[]; })[]; pages: Record<string, { door: "drawer" | "page" | null; sections: { title: string | null; description: string | null; at: string[] | null; fields: string[]; groups: { label: string; fields: string[]; }[]; 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; })[]; } | { 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: "figures"; fields: 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: "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: "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; })[]; } | { 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; }; key: string; where: { field: string; options: string[]; }[]; add_form: { preset: Record<string, { id: string; label: string; }>; among: Record<string, string[]>; } | null; } | 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: "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; }; key: string; where: { field: string; options: string[]; }[]; add_form: { preset: Record<string, { id: string; label: string; }>; among: Record<string, string[]>; } | null; } | 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: "outline"; counts: { query: string; param: string; }; } | { 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; sum: 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"; })[]; tab: string | null; columns: string[]; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; by: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; value: string | null; average: boolean; over: string | null; target: number | 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; sum: 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; sum: 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"; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; }; columns: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; weight: string | null; measured: { via: string; read: { query: string; param: string; }; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; 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; sum: 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; sum: 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"; })[]; tab: string | null; over: string; value: string | null; ahead: boolean; }; 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: "statement"; title: string; lines: { field: string; op: "equals" | "minus" | "plus" | "times" | null; rate: string | null; parts: { entity: string; read: { query: string; param: 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: "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: "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; })[]; } | { 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; })[]; })[]; 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; })[]; page: string | null; side: boolean; }[]; views: { kind: "list"; key: string; label: string; entity: string; scope: { field: string; } | null; register: { columns: string[]; filters: (string | { field: string; tiers: number[]; })[]; source_column: boolean; beside: boolean; search: string[] | null; 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"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; }[]; } | 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; }; 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: { label: string | null; description: string | null; query: string; template: string | null; filename: string | null; where: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; per: string | null; per_row: string[]; sources: string[] | null; held: Record<string, string[]> | null; per_field: { 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" | "link" | "markdown" | "text" | null; multi: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; tolerance: number | null; due: boolean; frees: boolean; summed: boolean; accumulates: 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[]; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; } | null; picks_only: boolean; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; } | null; fixed: boolean; key: string; }[]; readings: ({ entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; columns: string[]; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; by: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; value: string | null; average: boolean; over: string | null; target: number | 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; sum: 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; sum: 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"; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; }; columns: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; weight: string | null; measured: { via: string; read: { query: string; param: string; }; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; 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; sum: 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; sum: 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"; })[]; tab: string | null; over: string; value: string | null; ahead: boolean; })[]; attention: boolean; }; entities: string[]; sources: { entity: string; fields: Record<string, string>; scope: string | null; register: { columns: string[]; filters: (string | { field: string; tiers: number[]; })[]; source_column: boolean; beside: boolean; search: string[] | null; 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"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; }[]; } | 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; }; 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: { label: string | null; description: string | null; query: string; template: string | null; filename: string | null; where: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; per: string | null; per_row: string[]; sources: string[] | null; held: Record<string, string[]> | null; per_field: { 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" | "link" | "markdown" | "text" | null; multi: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; tolerance: number | null; due: boolean; frees: boolean; summed: boolean; accumulates: 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[]; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; } | null; picks_only: boolean; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; } | null; fixed: boolean; key: string; }[]; readings: ({ entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; columns: string[]; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; by: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; value: string | null; average: boolean; over: string | null; target: number | 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; sum: 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; sum: 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"; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; }; columns: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; weight: string | null; measured: { via: string; read: { query: string; param: string; }; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; 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; sum: 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; sum: 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"; })[]; tab: string | null; over: string; value: string | null; ahead: boolean; })[]; attention: boolean; }; }[]; place: { 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" | "link" | "markdown" | "text" | null; multi: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; tolerance: number | null; due: boolean; frees: boolean; summed: boolean; accumulates: 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[]; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; } | null; picks_only: boolean; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; }>; title: string; subtitle: string[]; image: string | null; mark: string | null; description: string | null; party: "organization" | "person" | null; mine: string | null; status: { field: string; closed: string[]; history: string | null; dates: Record<string, string>; stages: { option: string; label: string; owner: { kind: "member"; column: string; 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; } | { read: "code"; } | null; place: { address: string; latitude: string; longitude: string; accuracy: string | null; } | null; on_site: { photos: string[]; place: string | null; latitude: string; longitude: string; radius: number; } | null; pin: { on: string; x: string; y: string; } | null; size: { across: string; along: string; up: 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; }; create: { workflow: string; fields: string[]; picker: string[] | null; } | null; update: { workflow: string; fields: string[]; } | null; remove: { workflow: string; with: string[]; } | null; } | null; bound: { read: { query: string; param: string; }; same: { field: string; param: string; } | null; bounds: { field: string; param: string; of: "date" | "number"; lookup: boolean; }[]; 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; sum: 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"; })[]; tab: string | null; columns: string[]; }; 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; })[]; }[]; acts: string[]; }]; }; opens_on: { days: number; } | { span: "day" | "month" | "quarter" | "week" | "year"; view: "day" | "month" | "week" | null; }; }[]; 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"; 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"; 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; 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" | "link" | "markdown" | "text" | null; multi: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; tolerance: number | null; due: boolean; frees: boolean; summed: boolean; accumulates: 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[]; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; } | null; picks_only: boolean; 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: { entity: string; kind: string; files: string; }; fields: string[]; parties: { link: string; fields: string[]; key: string[]; }[]; rows: { entity: string; fields: string[]; key: string[]; }[]; links: { entity: string; table: string; }[]; } | null; recording: { into: string; via: string; audio: string; transcript: string; video: string | null; agent: string | null; } | null; sign: { into: string; by: string; at: string; witness: string | null; } | null; review: boolean; confirm: string | true | null; danger: boolean; corrects: boolean; drafted: boolean; stands: string[]; views: string[]; }[]; checks: { field: string; of: string; blocks: "all" | string[] | null; resolve: string[]; reads: string[]; stands: string[]; }[]; };
27
+ export type AppSpec = { version: 31; app: { alias: string; label: string; description: string | null; locale: ReportLanguage; scope: { entity: string; param: string; counts: { query: string; param: string | null; } | null; list: string | null; } | null; opens_on: { days: 30; } | { span: "month" | "quarter" | "year"; } | 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" | "link" | "markdown" | "text" | null; multi: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; rating: number | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; tolerance: number | null; due: boolean; frees: boolean; summed: boolean; accumulates: 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[]; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; } | null; picks_only: boolean; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; }>; title: string; subtitle: string[]; image: string | null; mark: string | null; description: string | null; party: "organization" | "person" | null; mine: string | null; status: { field: string; closed: string[]; history: string | null; dates: Record<string, string>; stages: { option: string; label: string; owner: { kind: "member"; column: string; 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; } | { read: "code"; } | null; place: { address: string; latitude: string; longitude: string; accuracy: string | null; } | null; on_site: { photos: string[]; place: string | null; latitude: string; longitude: string; radius: number; } | null; pin: { on: string; x: string; y: string; } | null; size: { across: string; along: string; up: 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; }; create: { workflow: string; fields: string[]; picker: string[] | null; } | 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[]; filters: (string | { field: string; tiers: number[]; })[]; source_column: boolean; beside: boolean; search: string[] | null; 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"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; }[]; } | 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; }; 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: { label: string | null; description: string | null; query: string; template: string | null; filename: string | null; where: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; per: string | null; per_row: string[]; sources: string[] | null; held: Record<string, string[]> | null; per_field: { 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" | "link" | "markdown" | "text" | null; multi: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; rating: number | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; tolerance: number | null; due: boolean; frees: boolean; summed: boolean; accumulates: 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[]; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; } | null; picks_only: boolean; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; } | null; fixed: boolean; key: string; }[]; readings: ({ entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; columns: string[]; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; by: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; value: string | null; average: boolean; over: string | null; target: number | 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; sum: 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; sum: 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"; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; }; columns: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; weight: string | null; measured: { via: string; read: { query: string; param: string; }; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; 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; sum: 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; sum: 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"; })[]; tab: string | null; over: string; value: string | null; ahead: boolean; })[]; attention: boolean; }; entities: string[]; sources: { entity: string; fields: Record<string, string>; scope: string | null; register: { columns: string[]; filters: (string | { field: string; tiers: number[]; })[]; source_column: boolean; beside: boolean; search: string[] | null; 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"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; }[]; } | 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; }; 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: { label: string | null; description: string | null; query: string; template: string | null; filename: string | null; where: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; per: string | null; per_row: string[]; sources: string[] | null; held: Record<string, string[]> | null; per_field: { 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" | "link" | "markdown" | "text" | null; multi: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; rating: number | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; tolerance: number | null; due: boolean; frees: boolean; summed: boolean; accumulates: 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[]; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; } | null; picks_only: boolean; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; } | null; fixed: boolean; key: string; }[]; readings: ({ entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; columns: string[]; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; by: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; value: string | null; average: boolean; over: string | null; target: number | 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; sum: 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; sum: 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"; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; }; columns: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; weight: string | null; measured: { via: string; read: { query: string; param: string; }; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; 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; sum: 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; sum: 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"; })[]; tab: string | null; over: string; value: string | null; ahead: boolean; })[]; attention: boolean; }; }[]; place: { 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" | "link" | "markdown" | "text" | null; multi: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; rating: number | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; tolerance: number | null; due: boolean; frees: boolean; summed: boolean; accumulates: 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[]; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; } | null; picks_only: boolean; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; }>; title: string; subtitle: string[]; image: string | null; mark: string | null; description: string | null; party: "organization" | "person" | null; mine: string | null; status: { field: string; closed: string[]; history: string | null; dates: Record<string, string>; stages: { option: string; label: string; owner: { kind: "member"; column: string; 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; } | { read: "code"; } | null; place: { address: string; latitude: string; longitude: string; accuracy: string | null; } | null; on_site: { photos: string[]; place: string | null; latitude: string; longitude: string; radius: number; } | null; pin: { on: string; x: string; y: string; } | null; size: { across: string; along: string; up: 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; }; create: { workflow: string; fields: string[]; picker: string[] | null; } | null; update: { workflow: string; fields: string[]; } | null; remove: { workflow: string; with: string[]; } | null; } | null; bound: { read: { query: string; param: string; }; same: { field: string; param: string; } | null; bounds: { field: string; param: string; of: "date" | "number"; lookup: boolean; }[]; 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; sum: 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"; })[]; tab: string | null; columns: string[]; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; by: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; value: string | null; average: boolean; over: string | null; target: number | 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; sum: 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; sum: 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"; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; }; columns: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; 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; sum: 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; sum: 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"; })[]; tab: string | null; over: string; value: string | null; ahead: boolean; }; scope: { field: string; } | null; }[]; })[]; pages: Record<string, { door: "drawer" | "page" | null; sections: { title: string | null; description: string | null; at: string[] | null; fields: string[]; groups: { label: string; fields: string[]; }[]; 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; })[]; } | { 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: "figures"; fields: 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: "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: "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; })[]; } | { 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; }; key: string; where: { field: string; options: string[]; }[]; add_form: { preset: Record<string, { id: string; label: string; }>; among: Record<string, string[]>; } | null; } | 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: "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; }; key: string; where: { field: string; options: string[]; }[]; add_form: { preset: Record<string, { id: string; label: string; }>; among: Record<string, string[]>; } | null; } | 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: "outline"; counts: { query: string; param: string; }; } | { 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; sum: 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"; })[]; tab: string | null; columns: string[]; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; by: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; value: string | null; average: boolean; over: string | null; target: number | 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; sum: 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; sum: 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"; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; }; columns: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; weight: string | null; measured: { via: string; read: { query: string; param: string; }; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; 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; sum: 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; sum: 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"; })[]; tab: string | null; over: string; value: string | null; ahead: boolean; }; 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: "statement"; title: string; lines: { field: string; op: "equals" | "minus" | "plus" | "times" | null; rate: string | null; parts: { entity: string; read: { query: string; param: 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: "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: "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; })[]; } | { 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; })[]; })[]; 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; })[]; page: string | null; side: boolean; }[]; views: { kind: "list"; key: string; label: string; entity: string; scope: { field: string; } | null; register: { columns: string[]; filters: (string | { field: string; tiers: number[]; })[]; source_column: boolean; beside: boolean; search: string[] | null; 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"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; }[]; } | 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; }; 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: { label: string | null; description: string | null; query: string; template: string | null; filename: string | null; where: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; per: string | null; per_row: string[]; sources: string[] | null; held: Record<string, string[]> | null; per_field: { 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" | "link" | "markdown" | "text" | null; multi: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; rating: number | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; tolerance: number | null; due: boolean; frees: boolean; summed: boolean; accumulates: 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[]; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; } | null; picks_only: boolean; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; } | null; fixed: boolean; key: string; }[]; readings: ({ entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; columns: string[]; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; by: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; value: string | null; average: boolean; over: string | null; target: number | 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; sum: 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; sum: 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"; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; }; columns: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; weight: string | null; measured: { via: string; read: { query: string; param: string; }; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; 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; sum: 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; sum: 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"; })[]; tab: string | null; over: string; value: string | null; ahead: boolean; })[]; attention: boolean; }; entities: string[]; sources: { entity: string; fields: Record<string, string>; scope: string | null; register: { columns: string[]; filters: (string | { field: string; tiers: number[]; })[]; source_column: boolean; beside: boolean; search: string[] | null; 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"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; }[]; } | 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; }; 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: { label: string | null; description: string | null; query: string; template: string | null; filename: string | null; where: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[]; per: string | null; per_row: string[]; sources: string[] | null; held: Record<string, string[]> | null; per_field: { 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" | "link" | "markdown" | "text" | null; multi: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; rating: number | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; tolerance: number | null; due: boolean; frees: boolean; summed: boolean; accumulates: 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[]; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; } | null; picks_only: boolean; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; } | null; fixed: boolean; key: string; }[]; readings: ({ entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; columns: string[]; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; tab: string | null; by: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; value: string | null; average: boolean; over: string | null; target: number | 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; sum: 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; sum: 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"; })[]; tab: string | null; rows: string | { field: string; tiers: number[]; }; columns: string | { field: string; tiers: number[]; }; value: string | 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; sum: 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"; })[]; tab: string | null; planned: { start: string; end: string; }; done: string; finished: string | null; weight: string | null; measured: { via: string; read: { query: string; param: string; }; } | null; } | { entity: string; label: string; read: { query: string; param: string | null; aggregate: { by: string[] | null; bands: Record<string, number[]> | null; day: string | null; sum: 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"; })[]; 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; sum: 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; sum: 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"; })[]; tab: string | null; over: string; value: string | null; ahead: boolean; })[]; attention: boolean; }; }[]; place: { 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" | "link" | "markdown" | "text" | null; multi: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; rating: number | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; tolerance: number | null; due: boolean; frees: boolean; summed: boolean; accumulates: 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[]; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; } | null; picks_only: boolean; suggest: { query: string; param: string; column: string; } | null; applies: ({ field: string; options: string[]; } | { field: string; value: boolean; })[]; }>; title: string; subtitle: string[]; image: string | null; mark: string | null; description: string | null; party: "organization" | "person" | null; mine: string | null; status: { field: string; closed: string[]; history: string | null; dates: Record<string, string>; stages: { option: string; label: string; owner: { kind: "member"; column: string; 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; } | { read: "code"; } | null; place: { address: string; latitude: string; longitude: string; accuracy: string | null; } | null; on_site: { photos: string[]; place: string | null; latitude: string; longitude: string; radius: number; } | null; pin: { on: string; x: string; y: string; } | null; size: { across: string; along: string; up: 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; }; create: { workflow: string; fields: string[]; picker: string[] | null; } | null; update: { workflow: string; fields: string[]; } | null; remove: { workflow: string; with: string[]; } | null; } | null; bound: { read: { query: string; param: string; }; same: { field: string; param: string; } | null; bounds: { field: string; param: string; of: "date" | "number"; lookup: boolean; }[]; 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; sum: 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"; })[]; tab: string | null; columns: string[]; }; 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; })[]; }[]; acts: string[]; }]; }; opens_on: { days: number; } | { span: "day" | "month" | "quarter" | "week" | "year"; view: "day" | "month" | "week" | null; }; }[]; 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"; 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"; 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; 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" | "link" | "markdown" | "text" | null; multi: boolean; required: boolean; readonly: boolean; notation: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | null; rating: number | null; limit: { field: string; } | { value: number; } | null; gate: { field: string; } | { value: number; } | null; tolerance: number | null; due: boolean; frees: boolean; summed: boolean; accumulates: 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[]; through: { link: string; field: string; } | null; pick: { query: string; param: string; same: { field: string; param: string; }[]; } | null; picks_only: boolean; 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: { entity: string; kind: string; files: string; }; fields: string[]; parties: { link: string; fields: string[]; key: string[]; }[]; rows: { entity: string; fields: string[]; key: string[]; }[]; links: { entity: string; table: string; }[]; } | null; recording: { into: string; via: string; audio: string; transcript: string; video: string | null; agent: string | null; } | null; sign: { into: string; by: string; at: string; witness: string | null; } | null; review: boolean; confirm: string | true | null; danger: boolean; corrects: boolean; drafted: boolean; stands: string[]; views: string[]; }[]; checks: { field: string; of: string; blocks: "all" | string[] | null; resolve: string[]; reads: string[]; stands: string[]; }[]; };
28
28
  /** What a body read needs of a table: its id, its name for a refusal, and its fields. */
29
29
  export type BodyTable = { id: string; name: string; fields: (TableField)[]; title_field_key: string | null; };
30
30
  /**
@@ -277,7 +277,7 @@ export interface ResolvedOption {
277
277
  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; }[]; read: { query: string; param: string; } | null; } | { kind: "plan"; at: string; across: string; up: string; fill: string | null; mark: { field: string; option: string; } | null; size: { field: string; options: Record<string, { across: number; along: number; up: number; }>; } | null; place: { entity: string; read: { query: string; param: string | null; }; kind: string; kinds: { bay: string; area: string; landmark: string; }; sheet: string | null; scale: string | null; x: string; y: string; width: string | null; depth: string | null; across: string; up: string; reach_from: string | null; stacked: string | null; reaches: { first: string; last: string; both: 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: ("fri" | "mon" | "sat" | "sun" | "thu" | "tue" | "wed")[]; from: string | null; until: string | null; } | null; read: { query: string; param: string; }; 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"; };
278
278
  /** A comparison as a compiled app states it: every key, `null` where it bounds nothing. */
279
279
  export type StatedBounds<V> = { gt: V | null; gte: V | null; lt: V | null; lte: V | null; };
280
- 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"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | 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?: "link" | "markdown" | "text" | 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" | 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"; 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: "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; }; 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"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | 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"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | undefined; lookup_field_format?: string | undefined; lookup_field_currency?: string | undefined; lookup_field_unit?: string | undefined; lookup_field_options?: { key: string; 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"; } | { 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"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | 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"; 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; };
280
+ 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"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | 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?: "link" | "markdown" | "text" | 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" | 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"; 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: "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; }; 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"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | 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"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | undefined; lookup_field_format?: string | undefined; lookup_field_currency?: string | undefined; lookup_field_unit?: string | undefined; lookup_field_options?: { key: string; 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"; } | { 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"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | 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"; 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; };
281
281
  export type TableRecordFilters = TableRecordFiltersConditionNode | TableRecordFiltersGroupNode | TableRecordFiltersTraversalNode;
282
282
  export type TableRecordFiltersConditionNode = { node_type: "condition"; field_key?: string; type?: string; operator: string; value?: unknown; unit_option?: string; };
283
283
  export type TableRecordFiltersGroupNode = { node_type: "group"; logic: "and" | "or"; children: (TableRecordFiltersConditionNode | TableRecordFiltersTraversalNode | TableRecordFiltersGroupNode)[]; };
package/docs/ai.md CHANGED
@@ -347,11 +347,6 @@ from a real field. And **an input's `description` is the only place a DEFAULT is
347
347
  visible** — write what omitting it means ("left blank = today"), or the agent
348
348
  asks the member instead of omitting.
349
349
 
350
- **Put anything irreversible behind a
351
- [`wait_for_approval`](./workflows.md#wait_for_approval--the-one-wait-worth-binding):**
352
- an email, a shipment, a published post, a write over a value with no version to
353
- restore. The body's own gate is the only human checkpoint on this path.
354
-
355
350
  **Shape a mutating alias around ONE call per job.** An alias that takes a single
356
351
  record turns a fifteen-record job into fifteen executions, and a partial failure
357
352
  leaves it half done with nothing that says so. Take an array input — one call,
package/docs/mutations.md CHANGED
@@ -465,7 +465,7 @@ lock exists to route changes through review).
465
465
 
466
466
  ### The change-request path: `request_locked_record_change`
467
467
 
468
- For a locked record, the save becomes one approval request carrying the **diffed** change set
468
+ For a locked record, the save becomes one change request carrying the **diffed** change set
469
469
  plus a reason. The workflow body calls the `request_locked_record_change` tool:
470
470
 
471
471
  ```js
@@ -477,7 +477,7 @@ const req = await request_locked_record_change({
477
477
  changes: i.changes, // { fld_key: new value } — the app-side diff
478
478
  reason: i.reason,
479
479
  });
480
- return({ status: "success", message: "Change request submitted for approval.", data: { request_id: req.approval_request_id } });
480
+ return({ status: "success", message: "Change request submitted for approval.", data: { request_id: req.request_id } });
481
481
  ```
482
482
 
483
483
  Contract points:
@@ -486,7 +486,7 @@ Contract points:
486
486
  value) is reviewed and applied **atomically** — the approver accepts or rejects the set as
487
487
  a whole. Include every changed field in the same call; don't submit per-field requests.
488
488
  - **Nothing changes immediately.** The tool returns
489
- `{ approval_request_id, status: "pending" }`; the record's values update only when an
489
+ `{ request_id, status: "pending" }`; the record's values update only when an
490
490
  approver (the table's configured approvers, else org admins) accepts. The submission
491
491
  succeeds, so the automatic re-read fires and returns the *old* values — that is correct,
492
492
  and it is why the pending state must come from the RESULT rather than from the row. Render
@@ -551,7 +551,7 @@ What the steps cannot tell before they run is never guessed:
551
551
  end the run (`return`, `validate`, `break`), so does every write after it: a create that first
552
552
  looks for a row to reuse draws nothing until the server says which it did. A `catch` block and a
553
553
  `while` or counted `for` loop wait too.
554
- - A pause (`wait`, `wait_for_event`, `wait_for_approval`): every write after it waits for the answer.
554
+ - A pause (`wait`, `wait_for_event`): every write after it waits for the answer.
555
555
  - A step that changes rows it cannot draw — `lock_records`, `update_records` with `restore` or `locked`, a pressed button, an
556
556
  agent whose tools can change rows, a `create_records` matching on a field, a filtered update or
557
557
  delete: every read over the tables it may touch (every read, where it names none) is `pending`
package/docs/runtime.md CHANGED
@@ -68,7 +68,8 @@ Activation is a **two-step gate** — both must hold, so demo data shipping in t
68
68
  bundle never leaks into normal traffic:
69
69
 
70
70
  1. A fixture is registered via `mount({ fixture })` (`AppFixture` type:
71
- `dist/mock.d.ts` — `{ queries?, workflows?, agents?, exports?, exportApps?, recordings? }`).
71
+ `dist/mock.d.ts` — `{ queries?, workflows?, agents?, exports?, exportApps?, recordings?, agentBeatMs? }`;
72
+ `agentBeatMs` paces each line a mocked agent run streams, a real run's pace when unset, `0` in a test).
72
73
  2. The page URL carries `?__mock=1` (exactly `1`). Without the flag the fixture
73
74
  is completely inert.
74
75
 
package/docs/workflows.md CHANGED
@@ -53,7 +53,7 @@ compile-time "cannot find name", not a runtime `undefined`.
53
53
  | `record` | button workflows | the record the button was pressed on |
54
54
  | `index` | inside a `for-of` body | the current 0-based iteration index — always the **innermost** loop's. To use an outer loop's index in a nested body, bind it in the outer one (`const outerIdx = index;`) and read that |
55
55
  | `<bind_name>` | inside a `for-of` body | the current item. Each loop keeps its own, so a nested body reads the outer loop's item by its own bind name |
56
- | `<name>` | its block, after the declaration | a `const` — a step's output (`rows.records`, `approval.status`, …) or a bound value |
56
+ | `<name>` | its block, after the declaration | a `const` — a step's output (`rows.records`, `order.data`, …) or a bound value |
57
57
  | `<let_name>` | its block | a mutable `let` binding |
58
58
  | `<param>` | inside a helper callback | that lambda's parameter |
59
59
  | `(await <tool>({…}))` | anywhere the call runs unconditionally | that call's output, read in place (see *`await` inside a statement*) |
@@ -136,7 +136,6 @@ The body is a sequence of statements, each of which maps 1:1 onto a stored step.
136
136
  | Error handling | `try { … } catch (e) { … }` |
137
137
  | Pause | `await wait({ duration_in_minutes: 5 });` |
138
138
  | Pause for an event | `await wait_for_event({ event_type: "payment" \| "webhook", event_ref, timeout_in_minutes? });` |
139
- | Pause for a decision | `const a = await wait_for_approval({ approvers, prompt, timeout_in_minutes? });` |
140
139
  | LLM reasoning | `const x = await agent({ instructions, input, model?, output });` |
141
140
  | Run a declared agent | `const x = await app_agent({ alias, input, wait? });` |
142
141
  | Guard | `validate({ checks: [{ fail_when, field_key?, message }, …] });` |
@@ -252,25 +251,9 @@ An app workflow whose alias declares no inputs leaves input-shaped keys unchecke
252
251
  be written before its declaration. A key outside its row is refused when the body is SAVED — by
253
252
  `set_workflow`, by an agent binding one — and by a `dry_run` call before that. `return({ field_errors })` keys are not checked.
254
253
 
255
- ### `wait_for_approval` — the one wait worth binding
254
+ ### `wait` and `wait_for_event`
256
255
 
257
- ```js
258
- const approval = await wait_for_approval({
259
- approvers: trigger.app_workflow.inputs.approvers,
260
- prompt: `Approve this order?`,
261
- });
262
-
263
- if (approval.status == "approved") { … } else { … }
264
- ```
265
-
266
- Output: `{ status: "approved" | "rejected" | "timed_out", decided_by: MemberId | null,
267
- decided_at: string, decision_comment: string | null }`. `approvers` takes loose forms — bare
268
- `"mbr_*"` and `"grp_*"` strings are wrapped by prefix, full principal objects
269
- (`{ type: "member" | "member_group" | "organization", id }`) pass through — so a `select_member`
270
- field value or a `member` input works unwrapped. An approvers value that resolves to nobody ends
271
- the run legibly as `status: "error"` naming the bad value; it does not throw.
272
-
273
- Plain `wait` and `wait_for_event` carry no payload and are statement-only. `wait.duration_in_minutes`
256
+ `wait` and `wait_for_event` carry no payload and are statement-only. `wait.duration_in_minutes`
274
257
  and every `timeout_in_minutes` must be a **positive number literal**, not an expression, and
275
258
  `wait_for_event.event_type` is a string literal from a closed set — `"payment"` or `"webhook"`.
276
259
 
@@ -301,7 +284,7 @@ name" when broken:
301
284
  exist. The agent's reasoning is not readable.
302
285
 
303
286
  `model` is an optional pin — omit it to follow the platform default. The step is atomic (no wait
304
- or approval inside it).
287
+ inside it).
305
288
 
306
289
  ### `app_agent` — run one of this app's agents as one step
307
290
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/app-sdk",
3
- "version": "0.126.1",
3
+ "version": "0.127.1",
4
4
  "description": "The SDK a Lotics custom-code app reads and writes through — typed hooks over the host bridge, cell readers, mount() and AppRouter",
5
5
  "type": "module",
6
6
  "exports": {