UNPKG

@datocms/cma-client

Version:
80 lines (79 loc) 3.13 kB
import * as Utils from '@datocms/rest-client-utils'; import BaseResource from '../../BaseResource'; import type * as ApiTypes from '../ApiTypes'; import type * as RawApiTypes from '../RawApiTypes'; export default class WebhookCall extends BaseResource { static readonly TYPE: "webhook_call"; /** * List all webhooks calls * * Read more: https://www.datocms.com/docs/content-management-api/resources/webhook-call/instances * * @throws {ApiError} * @throws {TimeoutError} */ list(queryParams?: ApiTypes.WebhookCallInstancesHrefSchema): Promise<ApiTypes.WebhookCallInstancesTargetSchema>; /** * List all webhooks calls * * Read more: https://www.datocms.com/docs/content-management-api/resources/webhook-call/instances * * @throws {ApiError} * @throws {TimeoutError} */ rawList(queryParams?: RawApiTypes.WebhookCallInstancesHrefSchema): Promise<RawApiTypes.WebhookCallInstancesTargetSchema>; /** * Async iterator to auto-paginate over elements returned by list() * * Read more: https://www.datocms.com/docs/content-management-api/resources/webhook-call/instances * * @throws {ApiError} * @throws {TimeoutError} */ listPagedIterator(queryParams?: Utils.OmitFromKnownKeys<ApiTypes.WebhookCallInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<ApiTypes.WebhookCall, void, unknown>; /** * Async iterator to auto-paginate over elements returned by rawList() * * Read more: https://www.datocms.com/docs/content-management-api/resources/webhook-call/instances * * @throws {ApiError} * @throws {TimeoutError} */ rawListPagedIterator(queryParams?: Utils.OmitFromKnownKeys<RawApiTypes.WebhookCallInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<RawApiTypes.WebhookCall, void, unknown>; /** * Retrieve a webhook call * * Read more: https://www.datocms.com/docs/content-management-api/resources/webhook-call/self * * @throws {ApiError} * @throws {TimeoutError} */ find(webhookCallId: string | ApiTypes.WebhookCallData): Promise<ApiTypes.WebhookCall>; /** * Retrieve a webhook call * * Read more: https://www.datocms.com/docs/content-management-api/resources/webhook-call/self * * @throws {ApiError} * @throws {TimeoutError} */ rawFind(webhookCallId: string): Promise<RawApiTypes.WebhookCallSelfTargetSchema>; /** * Re-send the webhook call * * Read more: https://www.datocms.com/docs/content-management-api/resources/webhook-call/resend_webhook * * @throws {ApiError} * @throws {TimeoutError} */ resendWebhook(webhookCallId: string | ApiTypes.WebhookCallData): Promise<void>; /** * Re-send the webhook call * * Read more: https://www.datocms.com/docs/content-management-api/resources/webhook-call/resend_webhook * * @throws {ApiError} * @throws {TimeoutError} */ rawResendWebhook(webhookCallId: string): Promise<void>; }