UNPKG

@datocms/cma-client

Version:
80 lines (79 loc) 3.21 kB
import * as Utils from '@datocms/rest-client-utils'; import BaseResource from '../../BaseResource'; import type * as SchemaTypes from '../SchemaTypes'; import type * as SimpleSchemaTypes from '../SimpleSchemaTypes'; 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?: SimpleSchemaTypes.WebhookCallInstancesHrefSchema): Promise<SimpleSchemaTypes.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?: SchemaTypes.WebhookCallInstancesHrefSchema): Promise<SchemaTypes.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<SimpleSchemaTypes.WebhookCallInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<SimpleSchemaTypes.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<SchemaTypes.WebhookCallInstancesHrefSchema, 'page'>, iteratorOptions?: Utils.IteratorOptions): AsyncGenerator<SchemaTypes.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 | SimpleSchemaTypes.WebhookCallData): Promise<SimpleSchemaTypes.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<SchemaTypes.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 | SimpleSchemaTypes.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>; }