We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9804e08 commit 3239f53Copy full SHA for 3239f53
packages/spec/src/data/object.zod.ts
@@ -14,6 +14,25 @@ export const ObjectCapabilities = z.object({
14
15
/** Enable REST/GraphQL API access */
16
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'),
36
37
/** Enable attachments/files */
38
files: z.boolean().default(false),
0 commit comments