File tree Expand file tree Collapse file tree
packages/server/src/api/rpc Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { lowerCaseFirst , safeJSONStringify } from '@zenstackhq/common-helpers' ;
2- import { ORMError , ORMErrorReason , type ClientContract } from '@zenstackhq/orm' ;
2+ import { CoreCrudOperations , ORMError , ORMErrorReason , type ClientContract } from '@zenstackhq/orm' ;
33import type { SchemaDef } from '@zenstackhq/orm/schema' ;
44import SuperJSON from 'superjson' ;
55import { match } from 'ts-pattern' ;
@@ -12,24 +12,7 @@ import { processSuperJsonRequestPayload, unmarshalQ } from '../common/utils';
1212import { log , registerCustomSerializers } from '../utils' ;
1313
1414const TRANSACTION_ROUTE_PREFIX = '$transaction' as const ;
15- const VALID_OPS = new Set ( [
16- 'create' ,
17- 'createMany' ,
18- 'createManyAndReturn' ,
19- 'upsert' ,
20- 'findFirst' ,
21- 'findUnique' ,
22- 'findMany' ,
23- 'aggregate' ,
24- 'groupBy' ,
25- 'count' ,
26- 'exists' ,
27- 'update' ,
28- 'updateMany' ,
29- 'updateManyAndReturn' ,
30- 'delete' ,
31- 'deleteMany' ,
32- ] ) ;
15+ const VALID_OPS = new Set ( CoreCrudOperations as unknown as string [ ] ) ;
3316
3417registerCustomSerializers ( ) ;
3518
You can’t perform that action at this time.
0 commit comments