@lotics/app-sdk 0.123.1 → 0.123.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +5 -13
- package/docs/queries.md +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24784,24 +24784,16 @@ var tableRecordSelectMemberFieldFilterSchema = zod_default.object({
|
|
|
24784
24784
|
]),
|
|
24785
24785
|
value: zod_default.array(zod_default.string()).nullable()
|
|
24786
24786
|
});
|
|
24787
|
+
var LINK_MEMBERSHIP = ["has_any_of", "has_none_of", "has_all_of"];
|
|
24788
|
+
var LINK_TEXT = ["contains", "not_contains", "starts_with", "ends_with"];
|
|
24787
24789
|
var tableRecordSelectRecordLinkFieldFilterSchema = zod_default.object({
|
|
24788
24790
|
type: zod_default.literal("select_record_link"),
|
|
24789
24791
|
field_key: zod_default.string(),
|
|
24790
|
-
operator: zod_default.enum([
|
|
24791
|
-
// Membership operators — match linked record IDs. value: string[].
|
|
24792
|
-
"has_any_of",
|
|
24793
|
-
"has_none_of",
|
|
24794
|
-
"has_all_of",
|
|
24795
|
-
// Text operators — match the cached display text. value: string.
|
|
24796
|
-
"contains",
|
|
24797
|
-
"not_contains",
|
|
24798
|
-
"starts_with",
|
|
24799
|
-
"ends_with",
|
|
24800
|
-
"is_empty",
|
|
24801
|
-
"is_not_empty"
|
|
24802
|
-
]),
|
|
24792
|
+
operator: zod_default.enum([...LINK_MEMBERSHIP, ...LINK_TEXT, "is_empty", "is_not_empty"]),
|
|
24803
24793
|
value: zod_default.union([zod_default.string(), zod_default.array(zod_default.string())]).nullable()
|
|
24804
24794
|
});
|
|
24795
|
+
var SELECT_RECORD_LINK_MEMBERSHIP_OPERATORS = new Set(LINK_MEMBERSHIP);
|
|
24796
|
+
var SELECT_RECORD_LINK_TEXT_OPERATORS = new Set(LINK_TEXT);
|
|
24805
24797
|
var tableRecordFilesFieldFilterSchema = zod_default.object({
|
|
24806
24798
|
type: zod_default.literal("files"),
|
|
24807
24799
|
field_key: zod_default.string(),
|
package/docs/queries.md
CHANGED
|
@@ -398,14 +398,14 @@ as one. `record_id` is the sole exception, and declaring anything but `text` on
|
|
|
398
398
|
|
|
399
399
|
`{ link: { source, field } }` requires a direct `from_table` parent, and `source` must be a
|
|
400
400
|
`select_record_link` field on it. `field` names a field on the **link target table** —
|
|
401
|
-
resolved **by display name first, then by key
|
|
401
|
+
resolved **by display name first, then by key** (exactly: `SIZE` is not `Size`). A save refuses a
|
|
402
|
+
`field` the target holds under neither, naming its fields. The target row is pinned to the declared
|
|
402
403
|
table, the workspace, live (non-archived, non-draft) rows, and the target table's row scope —
|
|
403
404
|
a scoped-out or stale link extracts as NULL.
|
|
404
405
|
|
|
405
406
|
**Warning:** only the **first** link in the cell is followed. Multi-link analytics go through
|
|
406
|
-
`unnest` + join (§8).
|
|
407
|
-
|
|
408
|
-
target's names are volatile.
|
|
407
|
+
`unnest` + join (§8). Renaming the field a `field` names by its name rewrites that `field` to
|
|
408
|
+
the field's key; a field renamed to a name another read uses re-points that read — prefer keys.
|
|
409
409
|
|
|
410
410
|
**Cost.** Every `link` column over one `source` shares one read of the linked record per row, and
|
|
411
411
|
every `link_agg` column over one `source` shares one aggregate, so ten columns through `customer` cost
|
|
@@ -487,7 +487,7 @@ derived surfaces share one implementation.
|
|
|
487
487
|
| boolean | `boolean` | `equals` (value `true`/`false`; `false` matches NULL/missing) | same | `checked`/`unchecked`/`percent_*` aggregate (`unchecked` counts false **or** empty). |
|
|
488
488
|
| select (single & multi) | `select` | `has_any_of`, `has_none_of`, `has_all_of`, `is_empty`, `is_not_empty` — values are **option keys** (`opt_*`), never labels | the **runtime** `filter` (§9) also takes option **names**, resolving each to its key — an unknown one is refused rather than matching nothing, and the value stays an array either way; a select column the query DERIVES instead of projecting from a field or a select literal carries no option set, so addressing one there is refused | Cells are arrays even for single-selects. Sorting a select column orders by its options' order (a multi-select by its first option), an empty cell last, on every page, keyset included; through a `union` whose arms project different selects, each row by its own select's order (§2 `union`); a select the query derives carries no options and orders by raw JSON. `unnest` fans option keys. |
|
|
489
489
|
| select_member | `select_member` | select ops + `is_current_member`, `is_not_current_member` (field-scoped, no value; `is_not_current_member` matches every cell not holding the requester, an empty one included) | same — `is_current_member` **works at the runtime layer** too | Sorting orders by the first member's name as a reader is shown it (the one the organization gave, else their profile's; a member it does not name reads as empty text), folded like text, then by member id; an empty cell last, on every page, keyset included. `unnest` fans member ids. Anonymous public request: current-member binds the app owner (§1). |
|
|
490
|
-
| select_record_link | `select_record_link` | membership by linked-record **id**: `has_any_of`, `has_none_of`, `has_all_of`; text over the cached **display
|
|
490
|
+
| select_record_link | `select_record_link` | membership by linked-record **id**: `has_any_of`, `has_none_of`, `has_all_of`; text over the cached **display** (deprecated — filter by id, and a linked record's field through a lookup): `contains`, `not_contains`, `starts_with`, `ends_with`; `is_empty`, `is_not_empty` | same — id-membership works at the runtime layer (converged `[{id}]` containment) | Sorting orders by the first linked record's display, folded like text, then by its id; an empty cell last, on every page, keyset included. `unnest` fans link ids (+ display). |
|
|
491
491
|
| files | `files` | `has_filename`, `has_mime_type` (substring), `has_file_count` (exact count), `is_empty`, `is_not_empty` | same | Presign-enriched at delivery (§1); `unnest` fans file ids. Only presence-counting aggregates. |
|
|
492
492
|
| formula | its declared output type (`number`/`text`/`boolean`/`date`/`datetime`, or `select` for one stating its own options, its cell a single select's; `json` until inferred) | filtered by the output type's operators; a cell holding an error (`#ERROR: …`) holds no value — it projects as `null` whatever the output type, and matches what an empty cell matches (`is_empty`, a negation such as `not_equals`) and nothing that needs a value | same | Extracted as a real scalar, so numeric formulas feed `sum`/`avg`/sorts. A **datetime-output** formula matches day-level date filters (full-day expansion). |
|
|
493
493
|
| rollup | decided by the OPERATION, never by the aggregated field: `earliest`/`latest` → `date`/`datetime` per that field's format; **every** other op → `number` | number or date operators per output type; text operators route as text | same | Datetime-format rollups match day-level date filters. `date_range` counts DAYS between the extremes, so it is a number despite its date input. A presence count (`filled`/`empty`/`percent_*`) is a number whatever it counts — including over `files`. |
|
package/package.json
CHANGED