@lotics/app-sdk 0.124.4 → 0.124.6

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/docs/queries.md CHANGED
@@ -42,9 +42,9 @@ several, each call a new version of the app:
42
42
  (`text`, `number`, `boolean`, `date`, `datetime`, `email`, `select`, `member`, `record_link`,
43
43
  `date_range`, `file`, `json`, `object`, `array`); each param may set `required: false`
44
44
  (default is required) and `description`. Nesting is capped at depth 8.
45
- - **`description`** — one line saying what the query returns, capped at 300 characters. No app
46
- code reads it: it is what the **agents** that reach this app's data (its declared agents, a
47
- member's chat while the app is open) read to choose between your aliases.
45
+ - **`description`** — one line saying what the query returns. No app code reads it: it is what
46
+ the **agents** that reach this app's data (its declared agents, a member's chat while the app is
47
+ open) read to choose between your aliases, its first 300 characters.
48
48
  - **`templates`** — the document templates an `exportQuery` of this alias may fill, by the name
49
49
  the export asks for: `{ "<name>": { "template_id": "dtl_…", "rows": "<key>" } }`. The template
50
50
  is filled with `{ title, lines, readings, <key>: every row }`, each row keyed by output column —
@@ -64,8 +64,7 @@ query's reach (a token in a `table_id` or field-key position fails validation).
64
64
 
65
65
  Binding fails — with the compiler's own message, never raw SQL/Postgres text — when any alias:
66
66
 
67
- 1. isn't a valid identifier, or the declaration isn't `{ ast, params?, description?, templates? }` (a
68
- description over 300 characters is refused here too);
67
+ 1. isn't a valid identifier, or the declaration isn't `{ ast, params?, description?, templates? }`;
69
68
  2. references `{{params.x}}` without declaring param `x` (typos can't silently widen);
70
69
  3. doesn't parse as a `QueryNode` **as the raw template** (the runtime parses the stored
71
70
  template before substitution, so a template that only parses after substitution would fail
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/app-sdk",
3
- "version": "0.124.4",
3
+ "version": "0.124.6",
4
4
  "description": "The SDK a Lotics custom-code app reads and writes through — typed hooks over the host bridge, cell readers, mount() and AppRouter",
5
5
  "type": "module",
6
6
  "exports": {
package/dist/members.d.ts DELETED
@@ -1,31 +0,0 @@
1
- /**
2
- * A member, in the one shape a `select_member` cell and the `useMembers`
3
- * roster both return. `email`, `image`, `groups`, `role` and `joined` reach
4
- * only an authenticated member of the org; a public visitor sees `id`, `name`
5
- * and `archived`. Absent is not empty: `image: null` is "no photo", a missing
6
- * `image` is "not told".
7
- */
8
- export interface ResolvedMember {
9
- id: string;
10
- /** `null` for an id outside the org (a removed member). */
11
- name: string | null;
12
- email?: string | null;
13
- /** Presigned; `null` without a photo. */
14
- image?: string | null;
15
- /** Group names — the platform's "department"; `[]` when in none. */
16
- groups?: string[];
17
- /**
18
- * The organization PERMISSION level, not a job title — "who is this person"
19
- * is `groups`. Raw: translate it yourself.
20
- */
21
- role?: "owner" | "admin" | "member";
22
- /** ISO timestamp of joining the organization. */
23
- joined?: string;
24
- /**
25
- * `true` for a member who has left; never `false`. The roster never returns
26
- * one, since a departed member cannot be assigned.
27
- */
28
- archived?: true;
29
- }
30
- /** `[]` for an empty or malformed cell; malformed entries are dropped. */
31
- export declare function readMembers(value: unknown): ResolvedMember[];
package/dist/select.d.ts DELETED
@@ -1,24 +0,0 @@
1
- /** The server resolves each `select` cell to `ResolvedOption[]` before the app sees it. */
2
- export interface ResolvedOption {
3
- key: string;
4
- /** The key, for an option deleted after the cell was written. */
5
- label: string;
6
- /**
7
- * A palette token (`"blue"`), from `useFieldOptions` only — a cell carries
8
- * key and label.
9
- */
10
- color?: string;
11
- /** A brand or icon mark, from `useFieldOptions` only. */
12
- mark?: {
13
- kind: "brand";
14
- name: string;
15
- } | {
16
- kind: "icon";
17
- name: string;
18
- };
19
- }
20
- /**
21
- * `[]` for an empty or malformed cell; a bare string (options unresolved
22
- * server-side) becomes `{ key, label: key }`; malformed entries are dropped.
23
- */
24
- export declare function readSelect(value: unknown): ResolvedOption[];