Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions skills/objectstack-api/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,10 @@ are **client** contracts — nothing in a stack declares them.

### Public (anonymous) Form Endpoints

Any `FormView` declared with `sharing.allowAnonymous: true` and a
`publicLink` slug is auto-mounted at:
A `FormView` is served by the anonymous form endpoints only when its
`sharing` declares all three: `enabled: true` (the schema default is
`false`), `allowAnonymous: true` and a `publicLink` slug. Miss any one and
both endpoints answer `404 FORM_NOT_FOUND`. The form is then mounted at:

```
GET /api/v1/forms/:slug # returns form spec + restricted objectSchema
Expand All @@ -88,10 +90,14 @@ are intended for Web-to-Lead / Web-to-Case style flows. The framework
strips fields outside the form's `sections[].fields[]` list; a
`beforeInsert` hook on the target object should stamp safe defaults
(`status='new'`, `lead_source='web'`, …) and `delete` privileged keys
(`owner`, `internal_notes`, …). For the full contract, read
(`owner`, `internal_notes`, …). On a walled posture (`group`/`isolated`), a
form on an object walled by an organization column is withheld too — both
endpoints `404`, and save / publish warn `public-form-intake-unavailable`;
declare `tenancy: { enabled: false }` on an object whose rows belong to no
organization to offer it again. For the full contract, read
`node_modules/@objectstack/spec/src/ui/view.zod.ts` (`FormViewSchema`) and
`node_modules/@objectstack/spec/src/ui/sharing.zod.ts` (`SharingConfigSchema`
with `allowAnonymous` / `publicLink`).
with `enabled` / `allowAnonymous` / `publicLink`).

---

Expand Down
2 changes: 1 addition & 1 deletion skills/objectstack-ui/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ Use this CRM-style structure as the canonical UI assembly reference:
| UI Surface | Typical Location | Pattern to Follow |
|:--|:--|:--|
| Multi-view object UI | `src/views/*.view.ts` | Define default `list` + `form`, then named `listViews` / `formViews` for scenarios |
| **Public / anonymous form** | `src/views/*.view.ts` (formView with `sharing.allowAnonymous: true`) | Web-to-Lead / Web-to-Case. Auto-exposed at `GET/POST /api/v1/forms/:slug` |
| **Public form** | `src/views/*.view.ts` (formView with `sharing: { enabled: true, allowAnonymous: true, publicLink: 'slug' }`) | Web-to-Lead at `GET/POST /api/v1/forms/:slug` |
| App navigation | `src/apps/*.app.ts` | Use grouped nav trees, `viewName` shortcuts, and `requiresObject` for capability-aware visibility |
| **Analytics dataset** | `src/datasets/*.dataset.ts` | One per object you want reportable — dashboards and reports bind a **declared** dataset by name, so an object without one has no analytics face |
| Dashboards | `src/dashboards/*.dashboard.ts` | Combine KPI + chart + table widgets with shared `dateRange` and `globalFilters` |
Expand Down
Loading