@lotics/app-sdk 0.127.1 → 0.127.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.
@@ -7,7 +7,7 @@ every write goes through a workflow — [./mutations.md](./mutations.md). Exact
7
7
  `dist/queries.d.ts`, `dist/row.d.ts`, `dist/select.d.ts`, `dist/members.d.ts`.
8
8
 
9
9
  The read model in one paragraph: an app never sends a raw query. It invokes a **named query by
10
- alias** (bound with `set_app_queries`) and fills the template's declared `{{params.x}}`
10
+ alias** (bound with `set_app`) and fills the template's declared `{{params.x}}`
11
11
  value holes; the server holds the canonical AST and runs it under the **app owner's** authority
12
12
  ([./security.md](./security.md)). The generated `.lotics/app_queries.d.ts` augments `AppQueries`,
13
13
  so params are typed per the binding; an alias it does not carry is accepted as a plain string,
package/docs/queries.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Queries — the query engine authoring reference
2
2
 
3
3
  Every read an app performs is a **named query**: a fixed AST template bound to the app by alias
4
- (`set_app_queries`), validated and compiled when it is written, and invoked by alias
4
+ (a `Query` node of `set_app`), validated and compiled when it is written, and invoked by alias
5
5
  through the read hooks ([data_fetching.md](./data_fetching.md)). This is the authoring reference
6
6
  for the query engine itself.
7
7
 
@@ -11,11 +11,11 @@ for the query engine itself.
11
11
 
12
12
  ### Declaration
13
13
 
14
- Queries live on the app, as an alias → declaration map. `set_app_queries` binds one alias or
15
- several, each call a new version of the app:
14
+ Queries live on the app, as an alias → declaration map. `set_app` binds one alias or
15
+ several through `nodes`, each call a new version of the app:
16
16
 
17
17
  ```jsonc
18
- // set_app_queries { "app_id": "app_…", "queries": { "openOrders": … } }
18
+ // set_app { "app_id": "app_…", "nodes": { "openOrders": { "type": "Query", … } } }
19
19
  {
20
20
  "ast": {
21
21
  "kind": "project",
@@ -28,7 +28,7 @@ several, each call a new version of the app:
28
28
  "columns": ["order_code", "customer", "total", "created"]
29
29
  }
30
30
  }
31
- // set_app_queries { "app_id": "app_…", "queries": { "orderByCode": … } }
31
+ // set_app { "app_id": "app_…", "nodes": { "orderByCode": { "type": "Query", … } } }
32
32
  {
33
33
  "ast": { /* … a filter with "{{params.code}}" … */ },
34
34
  "params": { "code": { "type": "text" } },
@@ -55,7 +55,7 @@ several, each call a new version of the app:
55
55
  those keys; `rows` is never `title`, `lines` or `readings`.
56
56
  - Aliases must be valid JS identifiers (`useQuery("openOrders")` and the generated types depend on it).
57
57
 
58
- A deploy never touches the bindings; `get_app_query` reads one back. The **server holds the
58
+ A deploy never touches the bindings; `get_app`'s `body` reads them back. The **server holds the
59
59
  canonical template**; the app never sends a raw AST over the wire, so a public app reads exactly
60
60
  what its author's queries project — params fill declared value holes and can never widen the
61
61
  query's reach (a token in a `table_id` or field-key position fails validation).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotics/app-sdk",
3
- "version": "0.127.1",
3
+ "version": "0.127.2",
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": {