Skip to content

Commit 3239f53

Browse files
committed
Update object.zod.ts
1 parent 9804e08 commit 3239f53

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

packages/spec/src/data/object.zod.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,25 @@ export const ObjectCapabilities = z.object({
1414

1515
/** Enable REST/GraphQL API access */
1616
apiEnabled: z.boolean().default(true),
17+
18+
/**
19+
* API Supported Operations
20+
* Explicitly whitelist allowed operations.
21+
* If not defined, all standard operations are allowed (if apiEnabled=true).
22+
*/
23+
apiMethods: z.array(z.enum([
24+
'get', 'list',
25+
'create', 'update', 'delete',
26+
'upsert',
27+
'bulk_create', 'bulk_update', 'bulk_delete', 'bulk_upsert',
28+
'aggregate', // count, sum, group by
29+
'history', // audit trail access
30+
'search', // full text search
31+
'restore', // undelete from trash
32+
'purge', // hard delete
33+
'import', // data import
34+
'export', // data export
35+
])).optional().describe('Allowed API operations'),
1736

1837
/** Enable attachments/files */
1938
files: z.boolean().default(false),

0 commit comments

Comments
 (0)