import { ObjectType } from '../../interfaces';

export interface RestController {
  create?: (data: any, query: ObjectType) => Promise<any>;
  get?: (id: any, query: ObjectType) => Promise<any>;
  getAll?: (query: ObjectType) => Promise<any>;
  update?: (id: any, data: any, query: ObjectType) => Promise<any>;
  patch?: (id: any, data: any, query: ObjectType) => Promise<any>;
  delete?: (id: any, query: ObjectType) => Promise<any>;
}

export interface RestController {
  create?: (data: any, query: object) => Promise<any>;
  get?: (id: any, query: object) => Promise<any>;
  getAll?: (query: object) => Promise<any>;
  update?: (id: any, data: any, query: object) => Promise<any>;
  patch?: (id: any, data: any, query: object) => Promise<any>;
  delete?: (id: any, query: object) => Promise<any>;
}

--- 
+++ 
@@ -1,8 +1,10 @@
+import { ObjectType } from '../../interfaces';
+
 export interface RestController {
-  create?: (data: any, query: object) => Promise<any>;
-  get?: (id: any, query: object) => Promise<any>;
-  getAll?: (query: object) => Promise<any>;
-  update?: (id: any, data: any, query: object) => Promise<any>;
-  patch?: (id: any, data: any, query: object) => Promise<any>;
-  delete?: (id: any, query: object) => Promise<any>;
+  create?: (data: any, query: ObjectType) => Promise<any>;
+  get?: (id: any, query: ObjectType) => Promise<any>;
+  getAll?: (query: ObjectType) => Promise<any>;
+  update?: (id: any, data: any, query: ObjectType) => Promise<any>;
+  patch?: (id: any, data: any, query: ObjectType) => Promise<any>;
+  delete?: (id: any, query: ObjectType) => Promise<any>;
 }
Replace object by ObjectType in rest-controller.
