diff --git a/packages/adapter-commons/src/service.ts b/packages/adapter-commons/src/service.ts index e6763c1c19..3c43a8f958 100644 --- a/packages/adapter-commons/src/service.ts +++ b/packages/adapter-commons/src/service.ts @@ -171,6 +171,9 @@ export class AdapterService implements ServiceMethods> { return callMethod(this, '_get', id, params); } + create (data: Partial, params?: Params): Promise; + create (data: Partial[], params?: Params): Promise; + create (data: Partial | Partial[], params?: Params): Promise; create (data: Partial | Partial[], params?: Params): Promise { if (Array.isArray(data) && !this.allowsMulti('create')) { return Promise.reject(new MethodNotAllowed('Can not create multiple entries')); @@ -189,6 +192,9 @@ export class AdapterService implements ServiceMethods> { return callMethod(this, '_update', id, data, params); } + patch (id: Id, data: Partial, params?: Params): Promise; + patch (id: null, data: Partial, params?: Params): Promise; + patch (id: NullableId, data: Partial, params?: Params): Promise; patch (id: NullableId, data: Partial, params?: Params): Promise { if (id === null && !this.allowsMulti('patch')) { return Promise.reject(new MethodNotAllowed('Can not patch multiple entries')); @@ -197,6 +203,9 @@ export class AdapterService implements ServiceMethods> { return callMethod(this, '_patch', id, data, params); } + remove (id: Id, params?: Params): Promise; + remove (id: null, params?: Params): Promise; + remove (id: NullableId, params?: Params): Promise; remove (id: NullableId, params?: Params): Promise { if (id === null && !this.allowsMulti('remove')) { return Promise.reject(new MethodNotAllowed('Can not remove multiple entries'));