Skip to content

Commit 211f3a9

Browse files
committed
docs(skills): objectstack-api teaches the recycle bin a by-id delete keeps
The data-API table, the derived-verb note and the DELETE pitfall said a delete is hard and there is no recycle bin. A by-id delete of a business object now keeps its rows in sys_recycle_bin (30 days by default); multi deletes, platform rows and rows deleted before the bin existed are not in it, and no restore or purge door is exposed yet. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J8VVAnsTJVz6nCb7n8NUJs
1 parent 1b3e22f commit 211f3a9

2 files changed

Lines changed: 15 additions & 7 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@objectstack/skills': patch
3+
---
4+
5+
docs(skills): objectstack-api no longer teaches that `DELETE` is a hard delete with no recycle bin: a by-id delete keeps a business object's rows in `sys_recycle_bin` (30 days by default; not `multi: true` deletes, platform rows or rows deleted before the bin existed), and restore is not exposed yet
6+
7+
Clause-②: no
8+
Metadata-protocol: none

‎skills/objectstack-api/SKILL.md‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ GET /api/v1/data/{object} # List records (with filter, sort, paginat
4444
GET /api/v1/data/{object}/:id # Get single record
4545
POST /api/v1/data/{object} # Create record
4646
PATCH /api/v1/data/{object}/:id # Update record
47-
DELETE /api/v1/data/{object}/:id # Delete record (hard delete)
47+
DELETE /api/v1/data/{object}/:id # Delete record (kept in the recycle bin)
4848
POST /api/v1/data/{object}/query # Complex queries + aggregation (QueryAST in body)
4949
POST /api/v1/data/{object}/batch # Per-object batch operations
5050
POST /api/v1/batch # Cross-object atomic batch
@@ -265,8 +265,8 @@ eight extra verbs are never declared in `apiMethods`:
265265
| `export` | `list` | `GET /data/{object}/export` |
266266

267267
`history` (from `get` ∧ `trackHistory`) gates only. `restore` / `purge` never
268-
derive — the trash surface is retired. Declaring any derived verb in
269-
`apiMethods` is stripped at parse with a FROM → TO warning.
268+
derive: the recycle bin has no restore or purge door yet. Declaring any
269+
derived verb in `apiMethods` is stripped at parse with a FROM → TO warning.
270270

271271
`POST /data/{object}/import` takes `mapping` as `{ Column: field }` or as
272272
`FieldMappingEntry[]` (`api/export.zod.ts`); only the entry form carries
@@ -413,10 +413,10 @@ keys mean the run produced none — never invent an empty.
413413
read. Sending neither skips the check; a mismatch answers **409
414414
`CONCURRENT_UPDATE`**; the quoted-empty entity-tag (`""`) is refused **400
415415
`VALIDATION_FAILED`**, not treated as omitted.
416-
2. **Assuming `DELETE` is recoverable.** ObjectStack `DELETE` is a hard
417-
delete — there is no recycle bin (the dead `enable.trash` flag was removed
418-
in 16.x). For recoverability, use per-field `trackHistory` (audit
419-
trail) or a `lifecycle` archive policy instead of custom soft-delete logic.
416+
2. **Treating `DELETE` as final, or as restorable today.** A by-id delete
417+
keeps a business object's rows in the recycle bin (`sys_recycle_bin`, 30
418+
days by default; never `multi: true` deletes, platform rows or rows deleted
419+
before the bin existed). Restore is not exposed yet; build no soft-delete.
420420

421421
---
422422

0 commit comments

Comments
 (0)