/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { webhooksCreate } from "../funcs/webhooksCreate.js"; import { webhooksDelete } from "../funcs/webhooksDelete.js"; import { webhooksGet } from "../funcs/webhooksGet.js"; import { webhooksList } from "../funcs/webhooksList.js"; import { webhooksUpdate } from "../funcs/webhooksUpdate.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Webhooks extends ClientSDK { /** * List webhooks * * @remarks * Lists all webhook configurations with pagination */ async list( request: operations.GetApiLeadScraperMicroserviceApiV1WebhooksRequest, options?: RequestOptions, ): Promise< operations.GetApiLeadScraperMicroserviceApiV1WebhooksResponseBody > { return unwrapAsync(webhooksList( this, request, options, )); } /** * Create webhook * * @remarks * Creates a new webhook configuration for event notifications */ async create( request: operations.PostApiLeadScraperMicroserviceApiV1WebhooksRequestBody, options?: RequestOptions, ): Promise< operations.PostApiLeadScraperMicroserviceApiV1WebhooksResponseBody > { return unwrapAsync(webhooksCreate( this, request, options, )); } /** * Update webhook * * @remarks * Updates an existing webhook configuration */ async update( request: operations.PutApiLeadScraperMicroserviceApiV1WebhooksRequestBody, options?: RequestOptions, ): Promise< operations.PutApiLeadScraperMicroserviceApiV1WebhooksResponseBody > { return unwrapAsync(webhooksUpdate( this, request, options, )); } /** * Get webhook * * @remarks * Retrieves details of a specific webhook configuration */ async get( request: operations.GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest, options?: RequestOptions, ): Promise< operations.GetApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody > { return unwrapAsync(webhooksGet( this, request, options, )); } /** * Delete webhook * * @remarks * Deletes a webhook configuration */ async delete( request: operations.DeleteApiLeadScraperMicroserviceApiV1WebhooksWebhookIdRequest, options?: RequestOptions, ): Promise< operations.DeleteApiLeadScraperMicroserviceApiV1WebhooksWebhookIdResponseBody > { return unwrapAsync(webhooksDelete( this, request, options, )); } }