UNPKG

@kontent-ai/management-sdk

Version:
24 lines (20 loc) 856 B
import { IManagementClientConfig } from '../../config'; import { BaseResponses } from '../../responses'; import { ManagementQueryService } from '../../services'; import { BaseQuery } from '../base-query'; import { Identifiers } from '../../models'; export class EnableWebhookQuery extends BaseQuery<BaseResponses.EmptyContentManagementResponse> { constructor( protected config: IManagementClientConfig, protected queryService: ManagementQueryService, public identifier: Identifiers.WebhookIdentifier ) { super(config, queryService); } toPromise(): Promise<BaseResponses.EmptyContentManagementResponse> { return this.queryService.enableWebhookAsync(this.getUrl(), this.queryConfig); } protected getAction(): string { return this.apiEndpoints.enableWebhook(this.identifier); } }