import { AbstractServiceOptions , Item , PrimaryKey , Webhook , MutationOptions } from '../types' ; import { register } from '../webhooks' ; import { ItemsService } from './items' ; export class WebhooksService extends ItemsService < Webhook > { constructor ( options ) { super ( 'directus_webhooks' , options ) ; } async createOne ( data , opts ? ) { const result = await super . createOne ( data , opts ) ; await register ( ) ; return result ; } async createMany ( data , opts ? ) { const result = await super . createMany ( data , opts ) ; await register ( ) ; return result ; } async updateOne ( key , data , opts ? ) { const result = await super . updateOne ( key , data , opts ) ; await register ( ) ; return result ; } async updateMany ( keys , data , opts ? ) { const result = await super . updateMany ( keys , data , opts ) ; await register ( ) ; return result ; } async deleteOne ( key , opts ? ) { const result = await super . deleteOne ( key , opts ) ; await register ( ) ; return result ; } async deleteMany ( keys , opts ? ) { const result = await super . deleteMany ( keys , opts ) ; await register ( ) ; return result ; } }