@lotics/app-sdk 0.120.2 → 0.121.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/AGENTS.md +1 -1
- package/dist/activity.d.ts +15 -2
- package/dist/{chunk-NZXJENJ2.js → chunk-MK4DBY6R.js} +653 -20
- package/dist/index.d.ts +2 -2
- package/dist/index.js +139 -50
- package/dist/router.js +1 -1
- package/dist/rpc.d.ts +1 -1
- package/dist/shared_types.d.ts +2 -1
- package/dist/store.d.ts +2 -0
- package/dist/viewer.d.ts +2 -0
- package/docs/members_and_options.md +21 -5
- package/docs/runtime.md +1 -0
- package/docs/security.md +1 -0
- package/docs/workflows.md +3 -3
- package/package.json +1 -1
package/docs/security.md
CHANGED
|
@@ -103,6 +103,7 @@ A publicly-shared app (its own origin, or its public link) is reachable by **any
|
|
|
103
103
|
| Agent runs (`useAgentRun`) | **No** — rejected: agent runs require an authenticated member, and each member's run history is private to them (a guessed session id cannot read another member's thread) |
|
|
104
104
|
| Comments (`useComments`) | **No** — members-only |
|
|
105
105
|
| Record activity (`useRecordActivity`) | **No** — the app's organization's members only |
|
|
106
|
+
| Undo of a record's change (`undoRecordChange`) | **No** — a member of the app's organization holding `write_data` on the record's table, on a row their own row rule covers |
|
|
106
107
|
| Member roster (`useMembers`) | **No** — same-org members only (below) |
|
|
107
108
|
|
|
108
109
|
**Warning — `is_current_member` on a public app resolves to the app owner.** An anonymous request has no viewer to bind, so both `is_current_member` and `current_member in_any_group` fall back to the owner's identity and the owner's groups. A "my items" query shows every anonymous visitor the *owner's* items, and a manager-only read template gated on a group the owner belongs to **passes for every anonymous visitor**. Never rely on viewer-bound predicates in a public app.
|
package/docs/workflows.md
CHANGED
|
@@ -384,15 +384,15 @@ body does not look like what you typed.
|
|
|
384
384
|
| `x.length` (dot only) | `length(x)` — strings and arrays. `x["length"]` still reads a field |
|
|
385
385
|
| `String(x)`, `Number(x)`, `parseFloat(x)`, `+x` | `toString(x)` / `toNumber(x)` |
|
|
386
386
|
| `x.toUpperCase()`, `x.toLowerCase()` | `upper(x)`, `lower(x)` |
|
|
387
|
-
| `x.toFixed(2)` | `formatNumber(x, 2)` |
|
|
388
|
-
| `Math.round/min/max/abs/floor/ceil/pow/sqrt(…)` | the like-named helper |
|
|
387
|
+
| `x.toFixed(2)` | `formatNumber(x, 2)` — rounds the decimal, a half away from zero: `1.005` is `"1.01"` |
|
|
388
|
+
| `Math.round/min/max/abs/floor/ceil/pow/sqrt(…)` | the like-named helper. `round` rounds the decimal, a half away from zero: `round(-2.5)` is `-3` |
|
|
389
389
|
| `Math.max(...arr)` / `Math.min(...arr)` | `max(arr)` / `min(arr)` |
|
|
390
390
|
| `JSON.parse`, `JSON.stringify` | `parseJson`, `toJson` |
|
|
391
391
|
| `Array.isArray`, `Object.keys/values/entries` | `isArray`, `keys`/`values`/`entries` |
|
|
392
392
|
| `arr.at(i)` | `at(arr, i)` — negative counts from the end |
|
|
393
393
|
| `arr.filter(Boolean)` | `compact(arr)` — drops every falsy element |
|
|
394
394
|
| `[...a, b]` | `concat(a, [b])` |
|
|
395
|
-
| `{ ...a, b: 1 }` | `merge(a, { b: 1 })` — later sources win, as in JS |
|
|
395
|
+
| `{ ...a, b: 1 }` | `merge(merge({}, a), { b: 1 })` — later sources win, as in JS — and reads back as the spread, typed as you wrote it |
|
|
396
396
|
| `{ table_id }` | `{ table_id: table_id }` — in expressions **and** tool inputs |
|
|
397
397
|
| `undefined` | `null` |
|
|
398
398
|
| `xs.push(a, b);` | `xs = concat(xs, [a, b])` — statement form |
|
package/package.json
CHANGED