Skip to content

Commit b6bb2ee

Browse files
claude[bot]claude
andauthored
docs: 13 factual corrections across content/docs/** where the page contradicts the enforced platform (#10616 sweep) (#10714)
* docs(data-modeling): correct the driver count and the retired query surface on the module landing page Fixes #10591 Fixes #10586 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt * docs(data-modeling): correct the stored value shapes for location and currency Fixes #10584 Fixes #10589 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt * docs(data-modeling): add the missing sixth apiMethods primitive (bulk) to the schema-design sample Fixes #10590 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt * docs: drop the IGraphQLService claim and the REST/GraphQL gloss on apiEnabled Fixes #10583 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt * docs(data-modeling): stop presenting the retired partial index key as live in validation.mdx Fixes #10585 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt * docs(data-modeling): unknown field keys are rejected with guidance, not stripped Fixes #10588 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt * docs(ui): nest rowActions/bulkActions under list in the actions.mdx defineView sample Fixes #10578 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt * docs(ui): give the three nameless form-section examples a name, and state the i18n consequence Fixes #10579 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt * docs(data-modeling): cover the five missing field types in validation-rules.mdx (44 of 49 -> 49 of 49) Fixes #10587 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt * docs(getting-started): the examples Quick Run needs pnpm build, and the Standalone tabs bypass the prereq gate Fixes #10582 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt * docs: declare sharingModel on every custom-object example (os validate errors without it) 21 object literals gain an explicit OWD; the one explicitly-partial fragment carries a note instead. Reconciles against all 22 sites in the member card. Fixes #10581 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DdCnBGcHeufjrq7drTD3wt --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent cda4677 commit b6bb2ee

19 files changed

Lines changed: 122 additions & 24 deletions

‎content/docs/concepts/architecture.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
9595

9696
export const Customer = ObjectSchema.create({
9797
name: 'customer',
98+
sharingModel: 'private',
9899
label: 'Customer',
99100
icon: 'building',
100101

@@ -401,6 +402,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
401402

402403
export const Opportunity = ObjectSchema.create({
403404
name: 'opportunity',
405+
sharingModel: 'private',
404406
label: 'Opportunity',
405407
icon: 'target',
406408

‎content/docs/concepts/metadata-driven.mdx‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
7979

8080
export const User = ObjectSchema.create({
8181
name: 'user',
82+
sharingModel: 'private',
8283
label: 'User',
8384
icon: 'user',
8485

@@ -243,6 +244,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
243244

244245
export const Task = ObjectSchema.create({
245246
name: 'task',
247+
sharingModel: 'private',
246248
label: 'Task',
247249
icon: 'check-square',
248250

@@ -341,6 +343,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
341343

342344
export const Account = ObjectSchema.create({
343345
name: 'account',
346+
sharingModel: 'private',
344347
label: 'Account',
345348
fields: {
346349
name: Field.text({ required: true }),
@@ -387,6 +390,7 @@ Follow these strict naming conventions for consistency:
387390
// ✅ Correct naming
388391
export const TodoTask = ObjectSchema.create({
389392
name: 'todo_task', // snake_case machine name
393+
sharingModel: 'private', // OWD — required on custom objects
390394
label: 'Todo Task',
391395

392396
fields: {
@@ -463,14 +467,15 @@ annual_revenue: Field.currency({
463467
```typescript
464468
export const Account = ObjectSchema.create({
465469
name: 'account',
470+
sharingModel: 'private',
466471
label: 'Account',
467472

468473
fields: { /* ... */ },
469474

470475
enable: {
471476
trackHistory: true, // Enable field history tracking
472477
searchable: true, // Include in global search
473-
apiEnabled: true, // Expose via REST/GraphQL
478+
apiEnabled: true, // Expose object via automatic APIs (REST)
474479
files: true, // Enable file attachments
475480
feeds: true, // Enable activity feed
476481
activities: true, // Enable tasks and events
@@ -486,6 +491,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
486491

487492
export const ExampleObject = ObjectSchema.create({
488493
name: 'example_object', // Required: snake_case
494+
sharingModel: 'private', // Required on custom objects: the OWD baseline
489495
label: 'Example Object', // Required: Human-readable
490496
pluralLabel: 'Example Objects', // Optional
491497
icon: 'box', // Optional: Lucide icon name

‎content/docs/data-modeling/drivers.mdx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,7 @@ Then in your object definition:
905905
```typescript
906906
export const AuditLog = ObjectSchema.create({
907907
name: 'audit_log',
908+
sharingModel: 'private',
908909
datasource: 'analytics', // Routes to the analytics database
909910
fields: { /* ... */ },
910911
});

‎content/docs/data-modeling/external-datasources.mdx‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ and `external.columnMap`.
7272
```typescript
7373
export const Customer = ObjectSchema.create({
7474
name: 'ext_customer',
75+
sharingModel: 'private',
7576
datasource: 'warehouse',
7677
external: {
7778
remoteName: 'customers', // remote TABLE name (object name may differ)
@@ -255,6 +256,10 @@ ObjectSchema.create({ /* ... */ external: { remoteName: 'orders', writable: true
255256

256257
With either gate off, insert/update/delete on the federated object is rejected.
257258

259+
The `/* ... */` above still has to carry a `sharingModel` — a custom (non-`sys_`) object
260+
that declares no OWD is an **`os validate` error** (`security-owd-unset`), federated or
261+
not. See the full object above.
262+
258263
<Callout type="warn">
259264
**This gate is federation-only — it does nothing on a managed datasource.**
260265
`allowWrites` answers *who owns this external database*, not *is this connection

‎content/docs/data-modeling/field-types.mdx‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ Reference to a record in another object (foreign key).
314314
| Property | Type | Default | Description |
315315
|:---|:---|:---|:---|
316316
| `reference` | `string` | **required** | Target object name (snake_case) |
317-
| `referenceFilters` | `string[]` | — | **Removed** (#2377, ADR-0049) — no longer a recognized field property (unknown keys are stripped by the schema). Use structured `lookupFilters` + `dependsOn` instead; see [Relationships](/docs/data-modeling/relationships) |
317+
| `referenceFilters` | `string[]` | — | **Removed** (#2377, ADR-0049) — no longer a recognized field property. `FieldSchema` is a strict object, so an unknown key is **rejected with guidance**, not silently stripped (ADR-0078): the error echoes the offending key and prescribes the replacement. Use structured `lookupFilters` + `dependsOn` instead; see [Relationships](/docs/data-modeling/relationships) |
318318
| `deleteBehavior` | `'restrict' \| 'cascade' \| 'set_null'` | `'set_null'` | Behavior when referenced record is deleted. On a *required* lookup `set_null` is escalated to `restrict`, since a NOT NULL foreign key cannot be cleared — **whether the `set_null` was defaulted or written out explicitly**. On a `multiple: true` required lookup the escalation is judged per referencing row: only a row the member removal would leave EMPTY is refused. `cascade` and `restrict` are the values honored as written. Where `set_null` does run, a `multiple: true` lookup loses only the deleted **member** — the other members are kept, and a set emptied that way is stored as `[]`, never `null` |
319319

320320
```typescript
@@ -336,7 +336,7 @@ Parent-child relationship (cascading delete by default).
336336
| Property | Type | Default | Description |
337337
|:---|:---|:---|:---|
338338
| `reference` | `string` | **required** | Target (master) object name |
339-
| `referenceFilters` | `string[]` | — | **Removed** (#2377, ADR-0049) — no longer a recognized field property (unknown keys are stripped by the schema). Use structured `lookupFilters` + `dependsOn` instead; see [Relationships](/docs/data-modeling/relationships) |
339+
| `referenceFilters` | `string[]` | — | **Removed** (#2377, ADR-0049) — no longer a recognized field property. `FieldSchema` is a strict object, so an unknown key is **rejected with guidance**, not silently stripped (ADR-0078): the error echoes the offending key and prescribes the replacement. Use structured `lookupFilters` + `dependsOn` instead; see [Relationships](/docs/data-modeling/relationships) |
340340
| `deleteBehavior` | `'restrict' \| 'cascade' \| 'set_null'` | `'cascade'` | Behavior when parent is deleted. `restrict` is the only value that deviates: master-detail cascades on everything else, so an explicit `set_null` here is **not** honored — the child is deleted with the parent |
341341
| `inlineEdit` | `boolean \| 'grid' \| 'form'` | — | Edit child records inline on the parent create/edit form (`true` = auto-pick, `'grid'`, or `'form'`) |
342342
| `inlineColumns` | `array` | — | Optional explicit inline grid columns |
@@ -530,7 +530,7 @@ Name-keyed map of embedded sub-objects (`Record<string, SubObject>`). Insertion
530530
## Enhanced Types
531531
532532
### `location`
533-
Geographic coordinates. Stored as `{ latitude, longitude, altitude?, accuracy? }` (latitude −90..90, longitude −180..180). No per-type config properties.
533+
Geographic coordinates. Stored as `{ lat, lng, altitude?, accuracy? }` (`lat` −90..90, `lng` −180..180). No per-type config properties. The key names are `lat`/`lng`, not `latitude`/`longitude` — see `LocationValueSchema` in `field-value.zod.ts` (ADR-0104 D1).
534534
535535
```typescript
536536
{ name: 'headquarters', label: 'Location', type: 'location' }

‎content/docs/data-modeling/fields.mdx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
1717

1818
export const Contact = ObjectSchema.create({
1919
name: 'contact',
20+
sharingModel: 'private',
2021
label: 'Contact',
2122
fields: {
2223
first_name: Field.text({ label: 'First Name', required: true }),

‎content/docs/data-modeling/formulas.mdx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
9393

9494
export const Invoice = ObjectSchema.create({
9595
name: 'invoice',
96+
sharingModel: 'private',
9697
nameField: 'display_title', // ADR-0079 — the record title is a designated field; composite titles migrate off the deprecated `titleFormat` to a text formula
9798
fields: {
9899
// Composite record title as a text formula, surfaced via `nameField` above.

‎content/docs/data-modeling/index.mdx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
1515

1616
export const Lead = ObjectSchema.create({
1717
name: 'crm_lead',
18+
sharingModel: 'public_read_write', // OWD — required on every custom object
1819
label: 'Lead',
1920
pluralLabel: 'Leads',
2021
icon: 'funnel',
@@ -35,8 +36,8 @@ That one definition is enough to get a persisted table, CRUD + query endpoints,
3536
- **A full spectrum of field types** — from `text`, `currency`, and `lookup`/`master_detail` relationships to `formula`, `summary`, `signature`, and `vector` (with `dimensions` config for AI embeddings). See the [Field Types gallery](/docs/data-modeling/field-types).
3637
- **Validation as metadata** — required/format rules, CEL script validation with access to `previous.<field>`, uniqueness via indexes, and severity levels — enforced identically in API, UI, and automation.
3738
- **CEL expressions** — formula fields and computed defaults share one expression language ([Expressions](/docs/data-modeling/formulas)).
38-
- **A compiled query AST** — queries are JSON documents validated against the protocol, then compiled by a driver into native queries with joins, aggregations, window functions, HAVING, and subqueries. The [query cheat sheet](/docs/data-modeling/queries) covers the syntax; the [spec](/docs/protocol/objectql/query-syntax) is normative.
39-
- **Four database drivers in this repo** — `driver-sql` (PostgreSQL / MySQL / SQLite via Knex), `driver-mongodb`, `driver-memory` (in-memory, for tests and demos), and `driver-sqlite-wasm` (SQLite in the browser / WebContainers). The same model runs unchanged on any of them.
39+
- **A compiled query AST** — queries are JSON documents validated against the protocol, then compiled by a driver into native queries with aggregations, `groupBy`, `HAVING`, and subqueries. `joins` and request-surface `windowFunctions` were **retired in protocol 17** (#4286, ADR-0049) and are now rejected at parse; window functions survive only as a SQL-driver door (`SqlDriver.findWithWindowFunctions()`), not on the `IDataDriver` contract. The [query cheat sheet](/docs/data-modeling/queries) covers the syntax; the [spec](/docs/protocol/objectql/query-syntax) is normative.
40+
- **Five database drivers in this repo** — `driver-sql` (PostgreSQL / MySQL / SQLite via Knex), `driver-mongodb`, `driver-memory` (in-memory, for tests and demos), `driver-sqlite-wasm` (SQLite in the browser / WebContainers), and `driver-turso` (Turso / libSQL — an **optional** install, because it pulls `@libsql/client` plus native bindings; see [Database Drivers](/docs/data-modeling/drivers)). The same model runs unchanged on any of them.
4041
- **External datasource federation** — introspect an existing external database, import selected tables into the catalog, and query them alongside native objects ([External Datasources](/docs/data-modeling/external-datasources)).
4142
- **Composable ownership** — one package owns an object, and any other package can merge fields, validation rules, and indexes into it without forking the definition ([Object Extensions](/docs/data-modeling/object-extensions)).
4243
- **Repeatable bulk import** — a named mapping projects someone else's column headers and codes onto your fields, and the import endpoint applies it by name ([Import Mappings](/docs/data-modeling/import-mappings)).

‎content/docs/data-modeling/objects.mdx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
1515

1616
export const Account = ObjectSchema.create({
1717
name: 'account',
18+
sharingModel: 'private',
1819
label: 'Account',
1920
pluralLabel: 'Accounts',
2021
icon: 'building',
@@ -79,7 +80,7 @@ Control which platform features are active for this object:
7980
enable: {
8081
trackHistory: true, // Field history tracking for audit
8182
searchable: true, // Include in global search index
82-
apiEnabled: true, // Expose via REST/GraphQL APIs
83+
apiEnabled: true, // Expose object via automatic APIs (REST)
8384
apiMethods: ['get', 'list', 'create', 'update', 'delete'],
8485
files: true, // File attachments
8586
feeds: true, // Activity feed and comments
@@ -373,6 +374,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
373374

374375
export const ProjectTask = ObjectSchema.create({
375376
name: 'project_task',
377+
sharingModel: 'private',
376378
label: 'Project Task',
377379
pluralLabel: 'Project Tasks',
378380
icon: 'check-square',

‎content/docs/data-modeling/schema-design.mdx‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import { ObjectSchema, Field } from '@objectstack/spec/data';
2121
export const MyObject = ObjectSchema.create({
2222
// Metadata
2323
name: 'my_object', // Machine name (snake_case)
24+
sharingModel: 'private', // OWD baseline — REQUIRED on custom objects
2425
label: 'My Object', // Display name
2526
pluralLabel: 'My Objects', // Plural form
2627
icon: 'briefcase', // Icon identifier
@@ -67,13 +68,14 @@ Control which features are available for an object:
6768
enable: {
6869
trackHistory: true, // Track field changes over time
6970
searchable: true, // Include in global search
70-
apiEnabled: true, // Expose via REST/GraphQL
71+
apiEnabled: true, // Expose object via automatic APIs (REST)
7172
apiMethods: [ // Whitelist API operations — six primitives only;
7273
'get', // search/export/… DERIVE from them (list grants
7374
'list', // aggregate/search/export; create+update grants
7475
'create', // upsert/import). undefined = all, [] = none.
7576
'update',
76-
'delete'
77+
'delete',
78+
'bulk' // omitting `bulk` DENIES batch operations
7779
],
7880
files: true, // Allow file attachments
7981
feeds: true, // Enable activity feed (Chatter-like)
@@ -284,6 +286,7 @@ import { ObjectSchema } from '@objectstack/spec/data';
284286

285287
export const Account = ObjectSchema.create({
286288
name: 'account',
289+
sharingModel: 'private',
287290
label: 'Account',
288291

289292
fieldGroups: [
@@ -403,6 +406,7 @@ here (ADR-0085).
403406
```typescript
404407
export const Account = ObjectSchema.create({
405408
name: 'account',
409+
sharingModel: 'private',
406410
label: 'Account',
407411
pluralLabel: 'Accounts',
408412
icon: 'building',

0 commit comments

Comments
 (0)