Skip to content

Commit 0226f4b

Browse files
baozhoutaoclaude
andcommitted
docs(spec): regenerate the batch reference for CrossObjectBatchDroppedFields (#3794)
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 4c01609 commit 0226f4b

1 file changed

Lines changed: 19 additions & 2 deletions

File tree

content/docs/references/api/batch.mdx

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ Industry alignment: Salesforce Bulk API, Microsoft Dynamics Bulk Operations
3030
## TypeScript Usage
3131

3232
```typescript
33-
import { BatchConfig, BatchOperationResult, BatchOperationType, BatchOptions, BatchRecord, BatchUpdateRequest, BatchUpdateResponse, CrossObjectBatchOperation, CrossObjectBatchRequest, CrossObjectBatchResponse, DeleteManyRequest, UpdateManyRequest } from '@objectstack/spec/api';
34-
import type { BatchConfig, BatchOperationResult, BatchOperationType, BatchOptions, BatchRecord, BatchUpdateRequest, BatchUpdateResponse, CrossObjectBatchOperation, CrossObjectBatchRequest, CrossObjectBatchResponse, DeleteManyRequest, UpdateManyRequest } from '@objectstack/spec/api';
33+
import { BatchConfig, BatchOperationResult, BatchOperationType, BatchOptions, BatchRecord, BatchUpdateRequest, BatchUpdateResponse, CrossObjectBatchDroppedFields, CrossObjectBatchOperation, CrossObjectBatchRequest, CrossObjectBatchResponse, DeleteManyRequest, UpdateManyRequest } from '@objectstack/spec/api';
34+
import type { BatchConfig, BatchOperationResult, BatchOperationType, BatchOptions, BatchRecord, BatchUpdateRequest, BatchUpdateResponse, CrossObjectBatchDroppedFields, CrossObjectBatchOperation, CrossObjectBatchRequest, CrossObjectBatchResponse, DeleteManyRequest, UpdateManyRequest } from '@objectstack/spec/api';
3535

3636
// Validate data
3737
const result = BatchConfig.parse(data);
@@ -136,6 +136,22 @@ const result = BatchConfig.parse(data);
136136
| **results** | `{ id?: string; success: boolean; errors?: { code: string; message: string; category?: string; details?: any; … }[]; data?: Record<string, any>; … }[]` || Detailed results for each record |
137137

138138

139+
---
140+
141+
## CrossObjectBatchDroppedFields
142+
143+
A cross-object batch strip event: dropped fields plus the operation index
144+
145+
### Properties
146+
147+
| Property | Type | Required | Description |
148+
| :--- | :--- | :--- | :--- |
149+
| **object** | `string` || Object the write targeted (resolved object name) |
150+
| **fields** | `string[]` || Caller-supplied field names the engine removed from the write payload |
151+
| **reason** | `Enum<'readonly' \| 'readonly_when'>` || Why the fields were dropped: static readonly (#2948) or a TRUE readonlyWhen predicate (#3042) |
152+
| **index** | `integer` || Index of the operation in the request `operations` array |
153+
154+
139155
---
140156

141157
## CrossObjectBatchOperation
@@ -171,6 +187,7 @@ const result = BatchConfig.parse(data);
171187
| Property | Type | Required | Description |
172188
| :--- | :--- | :--- | :--- |
173189
| **results** | `any[]` || Per-operation result, index-aligned with the request operations |
190+
| **droppedFields** | `{ object: string; fields: string[]; reason: Enum<'readonly' \| 'readonly_when'>; index: integer }[]` | optional | Write-observability (#3407/#3431/#3455/#3794): caller-supplied fields the engine LEGALLY stripped from an operation before it was written — static `readonly` (#2948) or a TRUE `readonlyWhen` predicate (#3042). This endpoint is the console record form's save path (master-detail writes parent + children in one transaction), so without it the ONE surface where a user edits a `readonlyWhen` field reported plain success while the value never landed. Each event carries the `index` of its operation. Present ONLY when ≥1 field was dropped; the batch still committed without them (results/success semantics unchanged). Optional — omit-when-empty keeps the shape backward-compatible. |
174191

175192

176193
---

0 commit comments

Comments
 (0)