@lotics/app-sdk 0.124.11 → 0.125.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-BNJZBF6D.js → chunk-2KJSE73G.js} +19 -4
- package/dist/index.js +3 -10
- package/dist/router.js +1 -1
- package/dist/shared_types.d.ts +163 -42
- package/docs/runtime.md +1 -1
- package/package.json +1 -1
|
@@ -250,6 +250,9 @@ function isFieldKey(value) {
|
|
|
250
250
|
return value.startsWith(FIELD_KEY_PREFIX);
|
|
251
251
|
}
|
|
252
252
|
|
|
253
|
+
// ../shared/src/schemas/read_row.ts
|
|
254
|
+
var RECORD_ID_COLUMN = "__source_record_id";
|
|
255
|
+
|
|
253
256
|
// ../shared/src/compare_bounds.ts
|
|
254
257
|
var COMPARE_KEYS = ["gt", "gte", "lt", "lte"];
|
|
255
258
|
function isRecordBound(bound) {
|
|
@@ -258,10 +261,19 @@ function isRecordBound(bound) {
|
|
|
258
261
|
function boundsOf(compared) {
|
|
259
262
|
return COMPARE_KEYS.flatMap((key) => {
|
|
260
263
|
const bound = compared[key];
|
|
261
|
-
return bound === void 0 ? [] : [{ key, bound }];
|
|
264
|
+
return bound === void 0 || bound === null ? [] : [{ key, bound }];
|
|
262
265
|
});
|
|
263
266
|
}
|
|
264
267
|
|
|
268
|
+
// ../shared/src/utils.ts
|
|
269
|
+
function sample(arr) {
|
|
270
|
+
if (arr.length === 0) return void 0;
|
|
271
|
+
return arr[Math.floor(Math.random() * arr.length)];
|
|
272
|
+
}
|
|
273
|
+
function assertNever(value) {
|
|
274
|
+
throw new Error(`Unhandled union member: ${JSON.stringify(value)}`);
|
|
275
|
+
}
|
|
276
|
+
|
|
265
277
|
// ../shared/src/schemas/app_spec_rules.ts
|
|
266
278
|
var bandKey = (band) => `${band.min ?? ""}..${band.max ?? ""}`;
|
|
267
279
|
function bandOf(tiers, figure) {
|
|
@@ -271,6 +283,10 @@ function bandOf(tiers, figure) {
|
|
|
271
283
|
}
|
|
272
284
|
var AGENT_SCAN_READS = ["text", "iso6346"];
|
|
273
285
|
var SCAN_READS = [...AGENT_SCAN_READS, "code"];
|
|
286
|
+
var REGISTER_PERIODS = ["today", "week", "month", "quarter", "year"];
|
|
287
|
+
var PERIOD_SPANS = { today: "day", week: "week", month: "month", quarter: "quarter", year: "year" };
|
|
288
|
+
var isViewSize = (span) => span === "day" || span === "week" || span === "month";
|
|
289
|
+
var TIME_LAYOUT_PERIODS = REGISTER_PERIODS.filter((period) => isViewSize(PERIOD_SPANS[period]));
|
|
274
290
|
|
|
275
291
|
// ../../node_modules/big.js/big.mjs
|
|
276
292
|
var DP = 20;
|
|
@@ -919,9 +935,6 @@ function coefficientOf(decimal) {
|
|
|
919
935
|
return { digits, exponent: Number(exponent) };
|
|
920
936
|
}
|
|
921
937
|
|
|
922
|
-
// ../shared/src/schemas/read_row.ts
|
|
923
|
-
var RECORD_ID_COLUMN = "__source_record_id";
|
|
924
|
-
|
|
925
938
|
// ../shared/src/schemas/app_query_aggregate.ts
|
|
926
939
|
var APP_QUERY_BATCH_MAX = 16;
|
|
927
940
|
var AGGREGATE_COUNT_COLUMN = "__count";
|
|
@@ -2029,6 +2042,8 @@ export {
|
|
|
2029
2042
|
COMPARE_KEYS,
|
|
2030
2043
|
isRecordBound,
|
|
2031
2044
|
boundsOf,
|
|
2045
|
+
sample,
|
|
2046
|
+
assertNever,
|
|
2032
2047
|
bandKey,
|
|
2033
2048
|
bandOf,
|
|
2034
2049
|
addDecimal,
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
aggregateRows,
|
|
9
9
|
anyRecordingLive,
|
|
10
10
|
applyPatch,
|
|
11
|
+
assertNever,
|
|
11
12
|
bandKey,
|
|
12
13
|
bandOf,
|
|
13
14
|
boundsOf,
|
|
@@ -41,6 +42,7 @@ import {
|
|
|
41
42
|
rpc,
|
|
42
43
|
rpcAgentRun,
|
|
43
44
|
rpcAgentRunContinue,
|
|
45
|
+
sample,
|
|
44
46
|
searchWords,
|
|
45
47
|
setUrlParams,
|
|
46
48
|
subscribeQueriesChanged,
|
|
@@ -49,7 +51,7 @@ import {
|
|
|
49
51
|
subtractDecimal,
|
|
50
52
|
sumDecimal,
|
|
51
53
|
urlParam
|
|
52
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-2KJSE73G.js";
|
|
53
55
|
|
|
54
56
|
// src/mount.tsx
|
|
55
57
|
import { createRoot } from "react-dom/client";
|
|
@@ -1841,15 +1843,6 @@ var EvalAstFactory = class {
|
|
|
1841
1843
|
}
|
|
1842
1844
|
};
|
|
1843
1845
|
|
|
1844
|
-
// ../shared/src/utils.ts
|
|
1845
|
-
function sample(arr) {
|
|
1846
|
-
if (arr.length === 0) return void 0;
|
|
1847
|
-
return arr[Math.floor(Math.random() * arr.length)];
|
|
1848
|
-
}
|
|
1849
|
-
function assertNever(value) {
|
|
1850
|
-
throw new Error(`Unhandled union member: ${JSON.stringify(value)}`);
|
|
1851
|
-
}
|
|
1852
|
-
|
|
1853
1846
|
// ../shared/src/expression_array.ts
|
|
1854
1847
|
var expression_array_exports = {};
|
|
1855
1848
|
__export(expression_array_exports, {
|
package/dist/router.js
CHANGED
package/dist/shared_types.d.ts
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
*/
|
|
6
6
|
export type AppAbsence = { member: { id: string; name: string; }; stand_in: { id: string; name: string; }; starts_on: string; ends_on: string; group_ids: string[]; };
|
|
7
7
|
/** A files cell entry; `url`/`thumbnail_url` are presigned (24h) and load from the sandboxed frame. */
|
|
8
|
-
export
|
|
8
|
+
export interface AppFile {
|
|
9
9
|
id: string;
|
|
10
10
|
filename: string;
|
|
11
11
|
mime_type: string;
|
|
12
12
|
url: string;
|
|
13
13
|
thumbnail_url?: string;
|
|
14
14
|
/** Bytes; absent on older files — sort by the raw number, format at display. */
|
|
15
|
-
size?: number;
|
|
15
|
+
size?: number | null;
|
|
16
16
|
/** ISO upload timestamp. */
|
|
17
17
|
created_at?: string;
|
|
18
18
|
/** The document template the file was generated from (`dtl_…`); absent on a file a person brought. */
|
|
@@ -22,11 +22,29 @@ export type AppFile = {
|
|
|
22
22
|
* on every read of an app not declaring `capabilities.photo_places` or by a caller outside its organization.
|
|
23
23
|
*/
|
|
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
|
-
|
|
27
|
+
/** What a body read needs of a table: its id, its name for a refusal, and its fields. */
|
|
28
|
+
export type BodyTable = { id: string; name: string; fields: (TableField)[]; title_field_key: string | null; };
|
|
29
|
+
/**
|
|
30
|
+
* One bound: a number, an ISO date (`2026-03-01`, `2026-03-01T09:30`), `{ "now": true }` — the day or the moment of
|
|
31
|
+
* reading — or, where a place takes it (`R`, by default), `{ "record": "<alias>" }`. A place that takes no record bound
|
|
32
|
+
* states `Bound<never>`.
|
|
33
|
+
*/
|
|
34
|
+
export type Bound<R = { record: string; }> = string | number | R | { now: true; };
|
|
35
|
+
/** The cards as the spec's register states them: they state no facts. */
|
|
36
|
+
export interface CardsSpec {
|
|
37
|
+
kind: "cards";
|
|
38
|
+
}
|
|
39
|
+
/** One node of the page as the model and the spec state it. */
|
|
40
|
+
export type ComposeNode = { use: "Column"; children: ComposeOf<StatedComposeRows>[]; } | { use: "Bar"; children: ComposeOf<StatedComposeRows>[]; } | { use: "Group"; title: string; children: ComposeOf<StatedComposeRows>[]; } | { use: "Panel"; title: string; children: ComposeOf<StatedComposeRows>[]; } | { use: "Title"; } | { use: "Status"; } | { use: "Field"; field: string; } | { use: "Document"; field: string; } | { use: "Act"; act: string; } | { use: "Copy"; field: string; as: "plain" | "raw"; } | StatedComposeRows;
|
|
41
|
+
/** One node of a page over what its `Rows` pieces are: the piece it mounts (`use`), that piece's props, and what it holds. */
|
|
42
|
+
export type ComposeOf<Rows extends { use: "Rows"; child: string; }> = Rows | { use: "Column"; children: ComposeOf<Rows>[]; } | { use: "Bar"; children: ComposeOf<Rows>[]; } | { use: "Group"; title: string; children: ComposeOf<Rows>[]; } | { use: "Panel"; title: string; children: ComposeOf<Rows>[]; } | { use: "Title"; } | { use: "Status"; } | { use: "Field"; field: string; } | { use: "Document"; field: string; } | { use: "Act"; act: string; } | { use: "Copy"; field: string; as: "plain" | "raw"; };
|
|
43
|
+
/** What every `Rows` piece names: the child whose rows it lists. */
|
|
44
|
+
export type ComposeRowsPiece = { use: "Rows"; child: string; };
|
|
45
|
+
export interface ExportCall {
|
|
28
46
|
params?: { [x: string]: unknown; };
|
|
29
|
-
filter?:
|
|
47
|
+
filter?: QueryFilterGroup<string> | QueryFilterCondition<string>;
|
|
30
48
|
sort?: readonly QuerySortKey<string>[];
|
|
31
49
|
/**
|
|
32
50
|
* A register's tabs, each one's rows beside the call's own (the open tab's): a template reads them under each
|
|
@@ -34,24 +52,29 @@ export type ExportCall = {
|
|
|
34
52
|
*/
|
|
35
53
|
tabs?: readonly ExportTab[];
|
|
36
54
|
report: ExportReport;
|
|
37
|
-
file:
|
|
55
|
+
file: ExportFile;
|
|
38
56
|
/**
|
|
39
57
|
* The words each option key of a select column prints as, by the column, in either file: a cell the server names
|
|
40
58
|
* by its field's option prints as that.
|
|
41
59
|
*/
|
|
42
60
|
labels?: { readonly [x: string]: Readonly<Record<string, string>>; };
|
|
43
|
-
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The file an export makes: the default report workbook — its words in `language`, the rows under `columns` on the
|
|
64
|
+
* tab `sheet` — or a template the query declares under `templates`, by its name there.
|
|
65
|
+
*/
|
|
66
|
+
export type ExportFile = { kind: "workbook"; language: ReportLanguage; sheet: string; columns: ReportColumn[]; } | { kind: "template"; template: string; };
|
|
44
67
|
export type ExportNarrowing = { status?: string[] | undefined; filters?: Record<string, { kind: "ids"; ids: string[]; unset?: true | undefined; } | { kind: "members"; mine: boolean; ids: string[]; unset?: true | undefined; } | { kind: "dates"; from: string | null; to: string | null; unset?: true | undefined; } | { kind: "yes_no"; value: boolean; } | { kind: "number"; min: number | null; max: number | null; unit?: string | undefined; } | { kind: "bands"; bands: { min: number | null; max: number | null; }[]; } | null> | undefined; search?: string | undefined; overdue?: true | undefined; waiting?: boolean | undefined; tab?: string | undefined; period?: { from: string; to: string; } | undefined; window?: { from: string; to: string; } | undefined; sort?: { field: string; dir: "asc" | "desc"; } | undefined; group?: string | null | undefined; folder?: string | undefined; per?: string | undefined; };
|
|
45
68
|
/**
|
|
46
69
|
* What an export states of its rows beside them: the page's title, one line per thing narrowing them, and the
|
|
47
70
|
* figures over them as the screen drew them.
|
|
48
71
|
*/
|
|
49
|
-
export
|
|
72
|
+
export interface ExportReport {
|
|
50
73
|
title: string;
|
|
51
74
|
lines: string[];
|
|
52
75
|
readings: ReportReading[];
|
|
53
76
|
/** Each date filter narrowing the rows, by field alias: its bounds, a day or a minute of one, with no zone. */
|
|
54
|
-
dates?: { [x: string]: { from?: string
|
|
77
|
+
dates?: { [x: string]: { from?: string; to?: string; }; };
|
|
55
78
|
/** The file's name, in the template grammar over the report; absent, the template's name, or `title`. */
|
|
56
79
|
filename?: string;
|
|
57
80
|
/** The period a register's tabs read their rows over: its bounds, a day or a minute of one, with no zone. */
|
|
@@ -63,21 +86,21 @@ export type ExportReport = {
|
|
|
63
86
|
* scalar, null where the row holds none.
|
|
64
87
|
*/
|
|
65
88
|
per_row?: { [x: string]: string | number | boolean | null; };
|
|
66
|
-
}
|
|
89
|
+
}
|
|
67
90
|
/** One tab of the register: its rows read as the export's own are — same query and params — under its own filter and order. */
|
|
68
|
-
export
|
|
91
|
+
export interface ExportTab {
|
|
69
92
|
tab: string;
|
|
70
93
|
label: string;
|
|
71
|
-
filter?:
|
|
94
|
+
filter?: QueryFilterGroup<string> | QueryFilterCondition<string>;
|
|
72
95
|
sort?: readonly QuerySortKey<string>[];
|
|
73
96
|
/**
|
|
74
97
|
* A tab of totals over the period: the declared query `query` read again under `params` (the period's two days), its
|
|
75
98
|
* rows joined to the tab's by the link column `via`, and the columns `columns` each one's `alias` and header.
|
|
76
99
|
*/
|
|
77
100
|
totals?: { query: string; params: Record<string, string>; via: string; columns: { alias: string; label: string; }[]; };
|
|
78
|
-
}
|
|
101
|
+
}
|
|
79
102
|
/** The file an app export made, as a link to download it: no workspace file, so no id, and kept a day. */
|
|
80
|
-
export
|
|
103
|
+
export interface ExportedFile {
|
|
81
104
|
filename: string;
|
|
82
105
|
mime_type: string;
|
|
83
106
|
/** Signed for at most an hour, for the caller who exported. */
|
|
@@ -86,17 +109,17 @@ export type ExportedFile = {
|
|
|
86
109
|
size: number;
|
|
87
110
|
/** When the server made it, ISO 8601. */
|
|
88
111
|
created_at: string;
|
|
89
|
-
}
|
|
112
|
+
}
|
|
90
113
|
export type ListOutsideLinksResult = { record_title: string; outside: { key: string; title: string; live: OutsideLink | null; last_closed: OutsideLink | null; }[]; };
|
|
91
114
|
export type OutsideLink = { id: string; outside_key: string; record_id: string; recipient: string; issued_by_member_id: string; created_at: string; expires_at: string; opened_at: string | null; revoked_at: string | null; revoked_reason: "issuer_left" | "left_stage" | "owner_changed" | "record_deleted" | "replaced" | "revoked" | "used" | null; };
|
|
92
115
|
/** Where a device stood: degrees north and east, and how many metres off it said it may be. */
|
|
93
|
-
export
|
|
116
|
+
export interface PhotoPlace {
|
|
94
117
|
latitude: number;
|
|
95
118
|
longitude: number;
|
|
96
119
|
accuracy: number;
|
|
97
|
-
}
|
|
120
|
+
}
|
|
98
121
|
/** What an aggregate asks: output columns to group by, an output date grouped by its day, an output number summed. */
|
|
99
|
-
export
|
|
122
|
+
export interface QueryAggregate {
|
|
100
123
|
by?: readonly string[];
|
|
101
124
|
/**
|
|
102
125
|
* The `by` columns grouped by the band of their number in place of its value, each with its ascending
|
|
@@ -105,44 +128,114 @@ export type QueryAggregate = {
|
|
|
105
128
|
bands?: { readonly [x: string]: readonly number[]; };
|
|
106
129
|
day?: string;
|
|
107
130
|
sum?: string;
|
|
108
|
-
}
|
|
131
|
+
}
|
|
109
132
|
/** A column's order — applied after the named query, bounded to its projected columns. */
|
|
110
|
-
export
|
|
133
|
+
export interface QueryFieldSortKey<C extends string = string> {
|
|
134
|
+
field_key: C;
|
|
135
|
+
order: "asc" | "desc";
|
|
136
|
+
/** Where blank cells sit; `"bottom"` when omitted. */
|
|
137
|
+
blank_position?: "bottom" | "top";
|
|
138
|
+
}
|
|
111
139
|
/**
|
|
112
140
|
* Runtime filter applied after the named query, bounded to its projected
|
|
113
141
|
* columns — by `C` at compile time and again on the server.
|
|
114
142
|
*/
|
|
115
|
-
export type QueryFilter = QueryFilterGroup | QueryFilterCondition<
|
|
116
|
-
export type QueryFilterCondition = QueryFilterFieldCondition | QueryFilterRecordIdCondition;
|
|
117
|
-
export
|
|
118
|
-
|
|
143
|
+
export type QueryFilter<C extends string = string> = QueryFilterGroup<C> | QueryFilterCondition<C>;
|
|
144
|
+
export type QueryFilterCondition<C extends string = string> = QueryFilterFieldCondition<C> | QueryFilterRecordIdCondition;
|
|
145
|
+
export interface QueryFilterFieldCondition<C extends string = string> {
|
|
146
|
+
node_type: "condition";
|
|
147
|
+
field_key: C;
|
|
148
|
+
type?: string;
|
|
149
|
+
operator: string;
|
|
150
|
+
value?: unknown;
|
|
151
|
+
/** A comparison on a figure read in each row's own unit or currency: the option, by key, its value is in. */
|
|
152
|
+
unit_option?: string;
|
|
153
|
+
}
|
|
154
|
+
export interface QueryFilterGroup<C extends string = string> {
|
|
155
|
+
node_type: "group";
|
|
156
|
+
logic: "and" | "or";
|
|
157
|
+
children: (QueryFilterGroup<C> | QueryFilterCondition<C>)[];
|
|
158
|
+
}
|
|
119
159
|
/** A condition on the row's own id — no `field_key`, since no field holds it. */
|
|
120
|
-
export
|
|
160
|
+
export interface QueryFilterRecordIdCondition {
|
|
121
161
|
node_type: "condition";
|
|
122
162
|
type: "record_id";
|
|
123
163
|
operator: string;
|
|
124
|
-
value?:
|
|
125
|
-
}
|
|
164
|
+
value?: unknown;
|
|
165
|
+
}
|
|
126
166
|
/**
|
|
127
167
|
* The rows each filter keeps, in turn, before the rest — a row with the first it meets, those meeting none last;
|
|
128
168
|
* each part in the keys after. At most 8 filters.
|
|
129
169
|
*/
|
|
130
|
-
export
|
|
170
|
+
export interface QueryFirstSortKey<C extends string = string> {
|
|
171
|
+
first: QueryFilter<C>[];
|
|
172
|
+
}
|
|
131
173
|
/**
|
|
132
174
|
* One row of a query whose columns codegen could not read (a dynamic alias, a
|
|
133
175
|
* bare `from_table`). Values stay `unknown` — the cell readers narrow them.
|
|
134
176
|
* Only the two addressing columns are typed, because they are handed raw to a
|
|
135
177
|
* `record_id` / `table_id`; every other `__*` column has a reader that owns it.
|
|
136
178
|
*/
|
|
137
|
-
export
|
|
179
|
+
export interface QueryRow {
|
|
180
|
+
[key: string]: unknown;
|
|
138
181
|
/** The record this row came from: null on a grouped row, which stands for no one record. */
|
|
139
|
-
__source_record_id?: string;
|
|
182
|
+
__source_record_id?: string | null;
|
|
140
183
|
/** The table that record lives in: null on a grouped row. */
|
|
141
|
-
__source_table_id?: string;
|
|
142
|
-
}
|
|
184
|
+
__source_table_id?: string | null;
|
|
185
|
+
}
|
|
143
186
|
/** One key of a read's order; each breaks the ties of the ones before it. */
|
|
144
|
-
export type QuerySortKey = QueryFieldSortKey | QueryFirstSortKey
|
|
187
|
+
export type QuerySortKey<C extends string = string> = QueryFieldSortKey<C> | QueryFirstSortKey<C>;
|
|
145
188
|
export type QueryWriteShape = { columns: Record<string, { table_id: string; field_key: string; } | { table_id: string; via: string; target_table_id: string; field_key: string; } | null>; rows?: { table_id: string; filter?: TableRecordFilters | undefined; closed: boolean; sort: { field_key: string; order: "asc" | "desc"; }[]; } | undefined; totals?: { table_id: string; filter?: TableRecordFilters | undefined; by: { output: string; field_key: string; }[]; aggregates: { output: string; operation: "avg" | "checked" | "count" | "date_range" | "earliest" | "empty" | "filled" | "latest" | "max" | "median" | "min" | "percent_checked" | "percent_empty" | "percent_filled" | "percent_unchecked" | "percent_unique" | "range" | "selected" | "string_agg" | "sum" | "unchecked" | "unique"; field_key?: string | undefined; }[]; } | undefined; };
|
|
189
|
+
/** A bound read from a field of the record a List stands beside: the day or figure that field holds when the rows are read. */
|
|
190
|
+
export type RecordBound = { record: string; };
|
|
191
|
+
export interface ReportColumn {
|
|
192
|
+
/** Each row's cell by it. */
|
|
193
|
+
key: string;
|
|
194
|
+
header: string;
|
|
195
|
+
/** A `date` cell is an ISO day or moment. */
|
|
196
|
+
type: "date" | "number" | "text";
|
|
197
|
+
}
|
|
198
|
+
export type ReportLanguage = "en" | "vi";
|
|
199
|
+
export interface ReportPart {
|
|
200
|
+
label: string;
|
|
201
|
+
value: number;
|
|
202
|
+
/** Its share of the whole, 0–1; none where the whole is unknown or nothing. */
|
|
203
|
+
share: number | null;
|
|
204
|
+
}
|
|
205
|
+
export interface ReportPivotColumn {
|
|
206
|
+
label: string;
|
|
207
|
+
total: number | null;
|
|
208
|
+
}
|
|
209
|
+
export interface ReportPivotRow {
|
|
210
|
+
label: string;
|
|
211
|
+
/** Its figure under every column, in their order. */
|
|
212
|
+
values: number[];
|
|
213
|
+
total: number | null;
|
|
214
|
+
}
|
|
215
|
+
export interface ReportPoint {
|
|
216
|
+
/** The period as its axis names it. */
|
|
217
|
+
label: string;
|
|
218
|
+
value: number;
|
|
219
|
+
/** Still running, or cut by the window's edge. */
|
|
220
|
+
partial: boolean;
|
|
221
|
+
}
|
|
222
|
+
export type ReportReading = { kind: "failed"; label: string; } | (ReportReadingHead & { kind: "metric"; value: number | null; }) | (ReportReadingHead & { kind: "breakdown"; byLabel: string; parts: ReportPart[]; total: number | null; }) | (ReportReadingHead & { kind: "trend"; points: ReportPoint[]; }) | (ReportReadingHead & { kind: "pivot"; rowsLabel: string; columnsLabel: string; columns: ReportPivotColumn[]; rows: ReportPivotRow[]; total: number | null; });
|
|
223
|
+
/** What every reading of numbers states beside its figures. */
|
|
224
|
+
export interface ReportReadingHead {
|
|
225
|
+
label: string;
|
|
226
|
+
/** What its figures are: the summed field's name, or a count's word. */
|
|
227
|
+
valueLabel: string;
|
|
228
|
+
/** The unit or currency its figures read in; none for a count or a plain number. */
|
|
229
|
+
unit: string | null;
|
|
230
|
+
/** The read behind it was cut: its figures stand, every total over them is left out (`null`). */
|
|
231
|
+
truncated: boolean;
|
|
232
|
+
}
|
|
233
|
+
export interface ResolvedLink {
|
|
234
|
+
/** A `rec_…` id, to correlate or filter. */
|
|
235
|
+
id: string;
|
|
236
|
+
/** The primary-field value, to render. */
|
|
237
|
+
display: string;
|
|
238
|
+
}
|
|
146
239
|
/**
|
|
147
240
|
* A member, in the one shape a `select_member` cell and the `useMembers`
|
|
148
241
|
* roster both return. `email`, `image`, `groups`, `role` and `joined` reach
|
|
@@ -150,13 +243,13 @@ export type QueryWriteShape = { columns: Record<string, { table_id: string; fiel
|
|
|
150
243
|
* and `archived`. Absent is not empty: `image: null` is "no photo", a missing
|
|
151
244
|
* `image` is "not told".
|
|
152
245
|
*/
|
|
153
|
-
export
|
|
246
|
+
export interface ResolvedMember {
|
|
154
247
|
id: string;
|
|
155
248
|
/** `null` for an id outside the org (a removed member). */
|
|
156
249
|
name: string | null;
|
|
157
|
-
email?: string;
|
|
250
|
+
email?: string | null;
|
|
158
251
|
/** Presigned; `null` without a photo. */
|
|
159
|
-
image?: string;
|
|
252
|
+
image?: string | null;
|
|
160
253
|
/** Group names — the platform's "department"; `[]` when in none. */
|
|
161
254
|
groups?: string[];
|
|
162
255
|
/**
|
|
@@ -171,9 +264,9 @@ export type ResolvedMember = {
|
|
|
171
264
|
* one, since a departed member cannot be assigned.
|
|
172
265
|
*/
|
|
173
266
|
archived?: true;
|
|
174
|
-
}
|
|
267
|
+
}
|
|
175
268
|
/** The server resolves each `select` cell to `ResolvedOption[]` before the app sees it. */
|
|
176
|
-
export
|
|
269
|
+
export interface ResolvedOption {
|
|
177
270
|
key: string;
|
|
178
271
|
/** The key, for an option deleted after the cell was written. */
|
|
179
272
|
label: string;
|
|
@@ -184,12 +277,18 @@ export type ResolvedOption = {
|
|
|
184
277
|
color?: string;
|
|
185
278
|
/** A brand or icon mark, from `useFieldOptions` only. */
|
|
186
279
|
mark?: { kind: "brand"; name: string; } | { kind: "icon"; name: string; };
|
|
187
|
-
}
|
|
188
|
-
export type SpecFile = { version: 29; app: { alias: string; label: string; description?: string | undefined; locale: "en" | "vi"; }; entities: Record<string, { alias: string; label: string; singular?: string | undefined; 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?: "autonumber" | "boolean" | "date" | "files" | "formula" | "lookup" | "number" | "rollup" | "select" | "select_member" | "select_record_link" | "text" | undefined; label: string; description?: string | undefined; format?: "datetime" | "link" | "markdown" | "text" | undefined; multi?: true | undefined; required?: true | undefined; readonly?: true | undefined; notation?: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | undefined; limit?: { field: string; } | { value: number; } | undefined; gate?: { field: string; } | { value: number; } | undefined; tolerance?: number | undefined; due?: true | undefined; frees?: true | undefined; summed?: true | undefined; accumulates?: true | undefined; whole?: true | undefined; restates?: string | undefined; starts?: "me" | "today" | undefined; default?: string | number | boolean | string[] | undefined; 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" | undefined; mark?: { kind: string; name: string; } | undefined; id: string; }[] | undefined; link?: string | undefined; accept?: string | undefined; image?: string | undefined; party?: "organization" | "person" | undefined; pictures?: { query: string; param: string; } | undefined; face?: Record<string, string> | undefined; default_from?: { link: string; field: string; } | undefined; reads?: string[] | undefined; through?: { link: string; field: string; } | undefined; pick?: { query: string; param?: string | undefined; same?: { field: string; param: string; }[] | undefined; } | undefined; picks_only?: true | undefined; suggest?: { query: string; param: string; column: string; } | undefined; applies?: ({ field: string; options: string[]; } | { field: string; value: boolean; })[] | undefined; }>; title: string; subtitle?: string[] | undefined; image?: string | undefined; mark?: string | undefined; description?: string | undefined; party?: "organization" | "person" | undefined; mine?: string | undefined; status?: { field: string; closed?: string[] | undefined; history?: string | undefined; dates?: Record<string, string> | undefined; stages?: Record<string, { owner: { kind: "member"; column: string; label: string; } | { kind: "group"; group: string; label: string; }; within?: number | undefined; when?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; }> | undefined; maker?: string | undefined; moves?: { query: string; param: string; link: string; status: string; at: string; by?: string | undefined; went: Record<string, string>; } | undefined; } | undefined; settled?: string | undefined; task?: { close?: { to: string; act?: string | undefined; } | undefined; reopen?: { to: string; act?: string | undefined; } | undefined; member?: string | undefined; } | undefined; progress?: { entity: string; via: string; passed?: string | undefined; read: { query: string; param: string; }; }[] | undefined; figure?: string | undefined; scan?: { read: "iso6346" | "text"; agent: string; } | { read: "code"; } | undefined; place?: { address: string; latitude: string; longitude: string; accuracy?: string | undefined; } | undefined; on_site?: { photos: string[]; place?: string | undefined; latitude: string; longitude: string; radius: number; } | undefined; pin?: { on: string; x: string; y: string; } | undefined; size?: { across: string; along: string; up: string; } | undefined; list: { query: string; param?: string | undefined; }; listed?: string[] | undefined; one?: { query: string; param?: string | undefined; } | undefined; create?: { workflow: string; fields: string[]; picker?: string[] | undefined; } | undefined; update?: { workflow: string; fields?: string[] | undefined; } | undefined; remove?: { workflow: string; with?: string[] | undefined; } | undefined; }>; lists: { key?: string | undefined; label?: string | undefined; entity: string; scope?: { field: string; entity: string; param: string; counts: { query: string; param?: string | undefined; }; } | undefined; register: { columns: string[]; filters: (string | { field: string; tiers: number[]; })[]; book?: true | undefined; search?: string[] | undefined; sort?: { field: string; desc?: true | undefined; }[] | undefined; group?: string | undefined; tabs?: { tab: string; label: string; term?: { kind: "in"; field: string; } | { kind: "open"; from: string; to: string; } | undefined; 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; }; } | undefined; }[]; } | undefined; where?: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; sort?: { field: string; desc?: true | undefined; }[] | undefined; }[] | undefined; period?: "month" | "quarter" | "today" | "week" | "year" | { days: number; } | undefined; layout: "calendar" | "cards" | "gantt" | "lanes" | "plan" | "roster" | "table"; roster?: { entity: string; via: string; day?: string | undefined; end?: string | undefined; expect?: string | undefined; of?: string | undefined; cadence?: { on: ("fri" | "mon" | "sat" | "sun" | "thu" | "tue" | "wed")[]; from?: string | undefined; until?: string | undefined; } | undefined; read: { query: string; param: string; }; create?: string[] | undefined; } | undefined; lanes?: { field: string; start: string; end?: string | undefined; loads?: { value: string; against: string; }[] | undefined; read?: { query: string; param: string; } | undefined; } | undefined; gantt?: { start: string; end: string; milestones?: string[] | undefined; planned?: { start?: string | undefined; end?: string | undefined; } | undefined; progress?: string | undefined; after?: string | undefined; } | undefined; plan?: { at: string; across: string; up: string; fill?: string | undefined; mark?: { field: string; option: string; } | undefined; size?: { field: string; options: Record<string, { across: number; along: number; up: number; }>; } | undefined; place: { entity: string; kind: string; kinds: { bay: string; area: string; landmark: string; }; sheet?: string | undefined; scale?: string | undefined; x: string; y: string; width?: string | undefined; depth?: string | undefined; across: string; up: string; reach_from?: string | undefined; stacked?: string | undefined; reaches?: { first: string; last: string; both: string; } | undefined; size?: { across: string; along: string; up: string; } | undefined; }; load?: { query: string; param?: string | undefined; } | undefined; } | undefined; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; opens?: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; remove?: false | undefined; create?: string[] | undefined; add_label?: string | undefined; heading?: string | undefined; export?: { label?: string | undefined; description?: string | undefined; query: string; template?: string | undefined; filename?: string | undefined; where?: ({ field: string; options: string[]; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; per?: string | undefined; per_row?: string[] | undefined; books?: string[] | undefined; key: string; }[] | undefined; readings?: ({ entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "metric"; value?: string | undefined; average?: true | undefined; over?: string | undefined; target?: number | undefined; better?: "down" | "up" | undefined; bound?: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; } | undefined; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "breakdown"; by: string | { field: string; tiers: number[]; }; value?: string | undefined; over?: string | undefined; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "trend"; over: string; value?: string | undefined; ahead?: true | undefined; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "pivot"; rows: string | { field: string; tiers: number[]; }; columns: string | { field: string; tiers: number[]; }; value?: string | undefined; over?: string | undefined; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "shortfall"; by: string; across?: string | undefined; value?: string | undefined; on_hand: { entity: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; by: string; across?: string | undefined; value?: string | undefined; }; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "progress"; planned: { start: string; end: string; }; done: string; finished?: string | undefined; weight?: string | undefined; measured?: { via: string; read: { query: string; param: string; }; } | undefined; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "list"; columns: string[]; app?: { id: string; } | undefined; })[] | undefined; attention?: false | undefined; }; books?: { entity: string; fields?: Record<string, string> | undefined; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; create?: string[] | undefined; }[] | undefined; owns?: { queries: string[]; workflows: string[]; } | undefined; }[]; pages: Record<string, { door?: "beside" | "drawer" | "page" | undefined; sections: { title?: string | undefined; description?: string | undefined; at?: string[] | undefined; fields: string[]; reads?: string[] | undefined; blocks: ({ kind: "timeline"; entity: string; via: string; read: { query: string; param?: string | undefined; }; title: string; at: string; by?: string | undefined; create?: string[] | undefined; add_label?: string | undefined; when?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; } | { kind: "list"; reading: { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "list"; columns: string[]; app?: { id: string; } | undefined; }; via: string; same?: { field: string; param: string; } | undefined; bounds?: { field: string; param: string; of: "date" | "number"; lookup?: true | undefined; }[] | undefined; open?: "in_place" | undefined; when?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; } | { kind: "rows"; entity: string; via: string; read: { query: string; param?: string | undefined; }; title: string; columns: string[]; create?: string[] | undefined; add_label?: string | undefined; totals?: Record<string, string> | undefined; narrower?: string[] | undefined; soonest?: string[] | undefined; expect?: string | undefined; of?: string | undefined; where?: { field: string; options: string[]; }[] | undefined; filters?: (string | { field: string; tiers: number[]; })[] | undefined; search?: string[] | undefined; group?: string | undefined; sort?: { field: string; desc?: true | undefined; }[] | undefined; edits?: string[] | undefined; remove?: false | undefined; pick?: { read: { query: string; param?: string | undefined; }; back: string; same?: { field: string; param: string; }[] | undefined; admits?: { query: string; param?: string | undefined; } | undefined; } | undefined; checklist?: { photo?: string | undefined; clause?: string | undefined; words?: string[] | undefined; failed?: string[] | undefined; passed?: string | undefined; } | undefined; compare?: { before: string; after: string; } | undefined; current?: string | undefined; post?: { bodies?: string[] | undefined; text: string; compute?: { expression: string; reads: Record<string, { from: "row"; field: string; } | { from: "record"; field: string; } | { from: "place"; field: string; } | { from: "formula"; expression: string; }>; } | undefined; media: string; link?: string | undefined; network: string; group?: string | undefined; networks: Record<string, "facebook" | "instagram" | "linkedin" | "threads" | "x">; } | undefined; under?: { field: string; entity: string; via: string; back: string; read: { query: string; param?: string | undefined; }; where?: { field: string; options: string[]; }[] | undefined; } | undefined; when?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; } | { kind: "agenda"; entity: string; via: string; read: { query: string; param?: string | undefined; }; title: string; columns: string[]; day: string; time?: string | undefined; part?: string | undefined; start?: string | undefined; create?: string[] | undefined; add_label?: string | undefined; when?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; } | { kind: "files"; fields: string[]; title: string; add_label?: string | undefined; when?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; } | { kind: "text"; field: string; title: string; when?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; } | { kind: "figures"; fields: string[]; when?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; } | { kind: "statement"; title: string; lines: { field: string; op?: "equals" | "minus" | "plus" | "times" | undefined; rate?: string | undefined; parts?: { entity: string; read: { query: string; param: string; }; same: string; before?: { field: string; param: string; } | undefined; columns: string[]; figure: string; } | undefined; }[]; when?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; } | { kind: "reading"; reading: { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "metric"; value?: string | undefined; average?: true | undefined; over?: string | undefined; target?: number | undefined; better?: "down" | "up" | undefined; bound?: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; } | undefined; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "breakdown"; by: string | { field: string; tiers: number[]; }; value?: string | undefined; over?: string | undefined; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "trend"; over: string; value?: string | undefined; ahead?: true | undefined; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "pivot"; rows: string | { field: string; tiers: number[]; }; columns: string | { field: string; tiers: number[]; }; value?: string | undefined; over?: string | undefined; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "shortfall"; by: string; across?: string | undefined; value?: string | undefined; on_hand: { entity: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; by: string; across?: string | undefined; value?: string | undefined; }; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "progress"; planned: { start: string; end: string; }; done: string; finished?: string | undefined; weight?: string | undefined; measured?: { via: string; read: { query: string; param: string; }; } | undefined; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "list"; columns: string[]; app?: { id: string; } | undefined; }; via: string; when?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; } | { kind: "funnel"; entity: string; read: { query: string; param?: string | undefined; }; label: string; steps: string[]; when?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; })[]; acts: string[]; entry?: string[] | undefined; acts_last?: true | undefined; when?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; page?: string | undefined; side?: true | undefined; }[]; outside?: { key: string; entity: string; title: string; description?: string | undefined; at: string[]; fields: string[]; one: { query: string; param: string; }; blocks: { kind: "list"; reading: { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "list"; columns: string[]; app?: { id: string; } | undefined; }; via: string; same?: { field: string; param: string; } | undefined; bounds?: { field: string; param: string; of: "date" | "number"; lookup?: true | undefined; }[] | undefined; open?: "in_place" | undefined; when?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; }[]; acts: string[]; }[] | undefined; comments?: true | undefined; moves?: { kind: "timeline"; entity: string; via: string; read: { query: string; param?: string | undefined; }; title: string; at: string; by?: string | undefined; create?: string[] | undefined; add_label?: string | undefined; when?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; } | undefined; compose?: { use: "Title"; } | { use: "Status"; } | { use: "Field"; field: string; } | { use: "Document"; field: string; } | { use: "Act"; act: string; } | { use: "Rows"; child: string; create?: false | undefined; remove?: true | undefined; } | { use: "Copy"; field: string; as: "plain" | "raw"; } | { use: "Column"; children: ComposeNode[]; } | { use: "Bar"; children: ComposeNode[]; } | { use: "Group"; title: string; children: ComposeNode[]; } | { use: "Panel"; title: string; children: ComposeNode[]; } | undefined; }>; acts: { alias: string; label: string; on: "record" | "rows" | "view"; of: string; workflow?: string | undefined; open?: { app: string; } | undefined; when?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; to?: string | undefined; writes?: true | undefined; into?: string | undefined; paper?: { entity: string; option: string; } | undefined; marks?: Record<string, boolean> | undefined; requires?: string[] | undefined; recommends?: string[] | undefined; 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" | undefined; mark?: { kind: string; name: string; } | undefined; }[] | undefined; entity?: string | undefined; required?: true | undefined; default?: string | undefined; accept?: string | undefined; })[] | undefined; starts?: Record<string, "me" | "today"> | undefined; makes?: string | undefined; papers?: { template: string; label: string; when?: ({ field: string; options: string[]; } | { field: string; value: boolean; })[] | undefined; }[] | undefined; archive?: string | undefined; intake?: { agent: string; papers: { entity: string; kind: string; files: string; }; fields: string[]; parties?: { link: string; fields: string[]; }[] | undefined; rows?: { entity: string; fields: string[]; key?: string[] | undefined; }[] | undefined; } | undefined; recording?: { into: string; via: string; audio: string; transcript: string; video?: string | undefined; agent?: string | undefined; } | undefined; sign?: { into: string; by: string; at: string; witness?: string | undefined; } | undefined; review?: true | undefined; confirm?: string | true | undefined; danger?: true | undefined; }[]; checks: { field: string; of: string; blocks?: "all" | string[] | undefined; resolve?: string | undefined; reads?: string[] | undefined; }[]; } | { version: 29; app: { alias: string; label: string; description?: string | undefined; locale: "en" | "vi"; }; dashboard: ({ entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "metric"; value?: string | undefined; average?: true | undefined; over?: string | undefined; target?: number | undefined; better?: "down" | "up" | undefined; bound?: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; } | undefined; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "breakdown"; by: string | { field: string; tiers: number[]; }; value?: string | undefined; over?: string | undefined; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "trend"; over: string; value?: string | undefined; ahead?: true | undefined; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "pivot"; rows: string | { field: string; tiers: number[]; }; columns: string | { field: string; tiers: number[]; }; value?: string | undefined; over?: string | undefined; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "shortfall"; by: string; across?: string | undefined; value?: string | undefined; on_hand: { entity: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; by: string; across?: string | undefined; value?: string | undefined; }; } | { entity: string; label: string; read: { query: string; param?: string | undefined; aggregate?: { by?: string[] | undefined; bands?: Record<string, number[]> | undefined; day?: string | undefined; sum?: string | undefined; } | undefined; }; where?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; } | { field: string; member: "me"; })[] | undefined; tab?: string | undefined; kind: "list"; columns: string[]; app?: { id: string; } | undefined; })[]; tabs?: { tab: string; label: string; }[] | undefined; period?: "month" | "quarter" | "year" | { days: 30; } | undefined; entities: Record<string, { alias: string; label: string; singular?: string | undefined; 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?: "autonumber" | "boolean" | "date" | "files" | "formula" | "lookup" | "number" | "rollup" | "select" | "select_member" | "select_record_link" | "text" | undefined; label: string; description?: string | undefined; format?: "datetime" | "link" | "markdown" | "text" | undefined; multi?: true | undefined; required?: true | undefined; readonly?: true | undefined; notation?: { style: "decimal"; } | { style: "currency"; currency: string | { per_row: string; }; } | { style: "unit"; unit: string | { per_row: string; }; } | undefined; limit?: { field: string; } | { value: number; } | undefined; gate?: { field: string; } | { value: number; } | undefined; tolerance?: number | undefined; due?: true | undefined; frees?: true | undefined; summed?: true | undefined; accumulates?: true | undefined; whole?: true | undefined; restates?: string | undefined; starts?: "me" | "today" | undefined; default?: string | number | boolean | string[] | undefined; 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" | undefined; mark?: { kind: string; name: string; } | undefined; id: string; }[] | undefined; link?: string | undefined; accept?: string | undefined; image?: string | undefined; party?: "organization" | "person" | undefined; pictures?: { query: string; param: string; } | undefined; face?: Record<string, string> | undefined; default_from?: { link: string; field: string; } | undefined; reads?: string[] | undefined; through?: { link: string; field: string; } | undefined; pick?: { query: string; param?: string | undefined; same?: { field: string; param: string; }[] | undefined; } | undefined; picks_only?: true | undefined; suggest?: { query: string; param: string; column: string; } | undefined; applies?: ({ field: string; options: string[]; } | { field: string; value: boolean; })[] | undefined; }>; title: string; subtitle?: string[] | undefined; image?: string | undefined; mark?: string | undefined; description?: string | undefined; party?: "organization" | "person" | undefined; mine?: string | undefined; status?: { field: string; closed?: string[] | undefined; history?: string | undefined; dates?: Record<string, string> | undefined; stages?: Record<string, { owner: { kind: "member"; column: string; label: string; } | { kind: "group"; group: string; label: string; }; within?: number | undefined; when?: ({ field: string; options: string[]; } | { field: string; compare: Compared; of: "date" | "datetime" | "number"; zone?: string | undefined; } | { field: string; empty: boolean; } | { field: string; value: boolean; })[] | undefined; }> | undefined; maker?: string | undefined; moves?: { query: string; param: string; link: string; status: string; at: string; by?: string | undefined; went: Record<string, string>; } | undefined; } | undefined; settled?: string | undefined; task?: { close?: { to: string; act?: string | undefined; } | undefined; reopen?: { to: string; act?: string | undefined; } | undefined; member?: string | undefined; } | undefined; progress?: { entity: string; via: string; passed?: string | undefined; read: { query: string; param: string; }; }[] | undefined; figure?: string | undefined; scan?: { read: "iso6346" | "text"; agent: string; } | { read: "code"; } | undefined; place?: { address: string; latitude: string; longitude: string; accuracy?: string | undefined; } | undefined; on_site?: { photos: string[]; place?: string | undefined; latitude: string; longitude: string; radius: number; } | undefined; pin?: { on: string; x: string; y: string; } | undefined; size?: { across: string; along: string; up: string; } | undefined; list: { query: string; param?: string | undefined; }; listed?: string[] | undefined; one?: { query: string; param?: string | undefined; } | undefined; create?: { workflow: string; fields: string[]; picker?: string[] | undefined; } | undefined; update?: { workflow: string; fields?: string[] | undefined; } | undefined; remove?: { workflow: string; with?: string[] | undefined; } | undefined; }>; };
|
|
280
|
+
}
|
|
281
|
+
export type SpecFile = { version: 30; app: { alias: string; label: string; description: string | null; locale: ReportLanguage; }; 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: "autonumber" | "boolean" | "date" | "files" | "formula" | "lookup" | "number" | "rollup" | "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; }[] | 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; }>; lists: { key: string | null; label: string | null; entity: string; scope: { field: string; entity: string; param: string; counts: { query: string; param: string | null; }; } | null; register: { columns: string[]; filters: (string | { field: string; tiers: number[]; })[]; book: 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; heading: 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[]; books: 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: "autonumber" | "boolean" | "date" | "files" | "formula" | "lookup" | "number" | "rollup" | "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; }[] | 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; 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: "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: "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[]; open: { kind: "app"; app: { id: string; }; } | { kind: "drawer"; }; } | { 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: "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; })[]; attention: boolean; }; entities: string[]; books: { entity: string; fields: Record<string, string>; scope: string | null; register: { columns: string[]; filters: (string | { field: string; tiers: number[]; })[]; book: 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; heading: 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[]; books: 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: "autonumber" | "boolean" | "date" | "files" | "formula" | "lookup" | "number" | "rollup" | "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; }[] | 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; 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: "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: "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[]; open: { kind: "app"; app: { id: string; }; } | { kind: "drawer"; }; } | { 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: "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; })[]; 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: "autonumber" | "boolean" | "date" | "files" | "formula" | "lookup" | "number" | "rollup" | "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; }[] | 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; owns: { queries: string[]; workflows: string[]; entities: string[]; } | null; }[]; pages: Record<string, { door: "beside" | "drawer" | "page" | null; sections: { title: string | null; description: string | null; at: string[] | null; 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"; entity: string; via: string; read: { query: string; param: string; }; title: string; columns: string[]; day: string; time: string | null; part: string | null; start: string | null; create: string[] | null; 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: "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"; 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[]; open: { kind: "app"; app: { id: string; }; } | { kind: "drawer"; }; }; via: string; same: { field: string; param: string; } | null; bounds: { field: string; param: string; of: "date" | "number"; lookup: boolean; }[]; open: "in_place" | 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; })[]; } | { entity: string; via: string; read: { query: string; param: string; }; title: string; columns: string[]; create: string[] | null; add_label: string | null; totals: Record<string, string>; narrower: string[]; soonest: string[]; expect: string | null; of: string | null; where: { field: string; options: string[]; }[]; add_form: { preset: Record<string, { id: string; label: string; }>; among: Record<string, string[]>; } | null; filters: (string | { field: string; tiers: number[]; })[]; search: string[]; group: string | null; sort: { field: string; desc: boolean; }[] | null; edits: string[]; remove: boolean; 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; }; 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"; } | { entity: string; via: string; read: { query: string; param: string; }; title: string; columns: string[]; create: string[] | null; add_label: string | null; totals: Record<string, string>; narrower: string[]; soonest: string[]; expect: string | null; of: string | null; where: { field: string; options: string[]; }[]; add_form: { preset: Record<string, { id: string; label: string; }>; among: Record<string, string[]>; } | null; filters: (string | { field: string; tiers: number[]; })[]; search: string[]; group: string | null; sort: { field: string; desc: boolean; }[] | null; edits: string[]; remove: boolean; 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; }; 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: "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: "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[]; open: { kind: "app"; app: { id: string; }; } | { kind: "drawer"; }; } | { 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: "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; }; 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: "timeline"; entity: string; via: string; read: { query: string; param: string; }; title: string; at: string; by: string | null; create: string[] | null; 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; })[]; })[]; 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; }[]; 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"; via: string; same: { field: string; param: string; } | null; bounds: { field: string; param: string; of: "date" | "number"; lookup: boolean; }[]; open: "in_place" | 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; })[]; 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[]; }; }[]; acts: string[]; }]; }; opens_on: { days: number; } | { span: "day" | "month" | "quarter" | "week" | "year"; view: "day" | "month" | "week" | null; }; }[]; comments: boolean; moves: { kind: "timeline"; entity: string; via: string; read: { query: string; param: string; }; title: string; at: string; by: string | null; create: string[] | null; 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; })[]; } | null; compose: { use: "Title"; } | { use: "Status"; } | { use: "Field"; field: string; } | { use: "Document"; field: string; } | { use: "Act"; act: string; } | { use: "Rows"; child: string; create: boolean; remove: boolean; } | { use: "Copy"; field: string; as: "plain" | "raw"; } | { use: "Column"; children: ComposeNode[]; } | { use: "Bar"; children: ComposeNode[]; } | { use: "Group"; title: string; children: ComposeNode[]; } | { use: "Panel"; title: string; children: ComposeNode[]; } | null; }>; acts: { alias: string; label: string; on: "record" | "rows" | "view"; of: string; workflow: string | null; open: { app: 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; })[]; 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; }[] | 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: "autonumber" | "boolean" | "date" | "files" | "formula" | "lookup" | "number" | "rollup" | "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; }[] | 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[]; }[]; 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; stands: string[]; }[]; checks: { field: string; of: string; blocks: "all" | string[] | null; resolve: string[]; reads: string[]; stands: string[]; }[]; } | { version: 30; app: { alias: string; label: string; description: string | null; locale: ReportLanguage; }; dashboard: ({ 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: "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[]; open: { kind: "app"; app: { id: string; }; } | { kind: "drawer"; }; } | { 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; })[]; tabs: { tab: string; label: string; }[] | null; opens_on: { days: 30; } | { span: "month" | "quarter" | "year"; }; 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: "autonumber" | "boolean" | "date" | "files" | "formula" | "lookup" | "number" | "rollup" | "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; }[] | 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; }>; };
|
|
282
|
+
/** The register's layout as the spec states it: `kind` and the facts the runtime draws it from. */
|
|
283
|
+
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"; };
|
|
284
|
+
/** A comparison as a compiled app states it: every key, `null` where it bounds nothing. */
|
|
285
|
+
export type StatedBounds<V> = { gt: V | null; gte: V | null; lt: V | null; lte: V | null; };
|
|
286
|
+
/** A `Rows` piece as the model and the spec state it: whether rows are added here and whether they offer a Delete. The acts of its rows are the app's, each `of` the child. */
|
|
287
|
+
export type StatedComposeRows = ComposeRowsPiece & { create: boolean; remove: boolean; };
|
|
189
288
|
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; }[]; 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; 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; }[] | 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; };
|
|
190
289
|
export type TableRecordFilters = TableRecordFiltersConditionNode | TableRecordFiltersGroupNode | TableRecordFiltersTraversalNode;
|
|
191
|
-
export type TableRecordFiltersConditionNode = { node_type: "condition"; field_key?: string
|
|
192
|
-
export type TableRecordFiltersGroupNode = { node_type: "group"; logic: "and" | "or"; children: (
|
|
290
|
+
export type TableRecordFiltersConditionNode = { node_type: "condition"; field_key?: string; type?: string; operator: string; value?: unknown; unit_option?: string; };
|
|
291
|
+
export type TableRecordFiltersGroupNode = { node_type: "group"; logic: "and" | "or"; children: (TableRecordFiltersConditionNode | TableRecordFiltersTraversalNode | TableRecordFiltersGroupNode)[]; };
|
|
193
292
|
/**
|
|
194
293
|
* Traversal node — filter the current table by a field on a record reachable
|
|
195
294
|
* through one or more `select_record_link` hops. ANY semantics: a row matches
|
|
@@ -203,3 +302,25 @@ export type TableRecordFiltersGroupNode = { node_type: "group"; logic: "and" | "
|
|
|
203
302
|
* Max path depth and inner-condition syntax are validated by `validateFilters`.
|
|
204
303
|
*/
|
|
205
304
|
export type TableRecordFiltersTraversalNode = { node_type: "traversal"; path: string[]; condition: TableRecordFiltersConditionNode; };
|
|
305
|
+
/** The table as the spec's register states it: it states no facts. */
|
|
306
|
+
export interface TableSpec {
|
|
307
|
+
kind: "table";
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* The presigned files, skipping any without a `url`. A lookup arrives one
|
|
311
|
+
* level deeper, flattened as in readLinks.
|
|
312
|
+
*/
|
|
313
|
+
export declare const readFiles: (v: unknown) => AppFile[];
|
|
314
|
+
/**
|
|
315
|
+
* Every linked record. A lookup of a link arrives one level deeper (one link
|
|
316
|
+
* cell per linked row); it is flattened here, in order, each id once.
|
|
317
|
+
*/
|
|
318
|
+
export declare const readLinks: (v: unknown) => ResolvedLink[];
|
|
319
|
+
/** `[]` for an empty or malformed cell; malformed entries are dropped. */
|
|
320
|
+
export declare const readMembers: (value: unknown) => ResolvedMember[];
|
|
321
|
+
/**
|
|
322
|
+
* `[]` for an empty or malformed cell; a bare string (options unresolved
|
|
323
|
+
* server-side) becomes `{ key, label: key }`; malformed entries are dropped.
|
|
324
|
+
*/
|
|
325
|
+
export declare const readSelect: (value: unknown) => ResolvedOption[];
|
|
326
|
+
export declare const row: { opt: (v: unknown) => string | null; text: (v: unknown) => string; num: (v: unknown) => number | null; bool: (v: unknown) => boolean | null; date: (v: unknown) => Date | null; datetime: (v: unknown) => Date | null; link: (v: unknown) => ResolvedLink | null; };
|
package/docs/runtime.md
CHANGED
|
@@ -259,7 +259,7 @@ semantics are documented:
|
|
|
259
259
|
|---|---|---|---|
|
|
260
260
|
| `query` | `{ alias, params?, limit?, offset?, … }` | `{ rows }` | [queries](./queries.md), [data fetching](./data_fetching.md) |
|
|
261
261
|
| `export` | `{ alias, params?, filter?, sort?, report, file }` (`exportQuery`) or `{ export: { key, … } }` (`exportApp`) | `{ file }` | [data fetching](./data_fetching.md) |
|
|
262
|
-
| `spec` | `{}` | `HostSpec`: the app's compiled `app.json` itself (format
|
|
262
|
+
| `spec` | `{}` | `HostSpec`: the app's compiled `app.json` itself (format 30: `lists`, `pages` by entity, `entities`, flat `acts` and `checks`; a dashboard's readings), never the route's wrapper | this doc |
|
|
263
263
|
| `field_options` | `{ alias }` | `{ fields }` | [members & options](./members_and_options.md) |
|
|
264
264
|
| `workflow` | `{ alias, inputs }` | `WorkflowResult` | [mutations](./mutations.md) |
|
|
265
265
|
| `upload` | `{ file: File }` (the `File` crosses the bridge by structured clone) | uploaded-file object | [files](./files.md) |
|
package/package.json
CHANGED