@kontent-ai/management-sdk
Version:
Official Kontent.ai management SDK
28 lines (25 loc) • 860 B
text/typescript
import { IManagementClientConfig } from '../config';
import { Identifiers } from '../models';
import { ManagementQueryService } from '../services';
export class WebhookIdentifierQuery<TResult> {
constructor(
protected config: IManagementClientConfig,
protected queryService: ManagementQueryService,
protected buildResult: (
config: IManagementClientConfig,
queryService: ManagementQueryService,
identifier: Identifiers.WebhookIdentifier
) => TResult
) {}
/**
* Id identifier
* @param id Id of the webhook
*/
byId(id: string): TResult {
return this.buildResult(
this.config,
this.queryService,
new Identifiers.WebhookIdentifier(Identifiers.WebhookIdentifierEnum.Id, id)
);
}
}