import { z } from "zod/v4"; export declare const WebhookEndpointApiStatus: z.ZodEnum<{ active: "active"; deleting: "deleting"; inactive: "inactive"; }>; export type WebhookEndpointApiStatus = z.infer; export declare const WebhookDeliveryApiStatus: z.ZodEnum<{ failed: "failed"; filtered: "filtered"; pending: "pending"; processing: "processing"; succeeded: "succeeded"; unmatched: "unmatched"; }>; export type WebhookDeliveryApiStatus = z.infer; export declare const WebhookEndpointObject: z.ZodObject<{ id: z.ZodString; declaredId: z.ZodString; source: z.ZodString; status: z.ZodEnum<{ active: "active"; deleting: "deleting"; inactive: "inactive"; }>; secretProvisioning: z.ZodEnum<{ either: "either"; integrator: "integrator"; provider: "provider"; }>; secretSet: z.ZodBoolean; tenantId: z.ZodNullable; externalRef: z.ZodNullable; url: z.ZodString; createdAt: z.ZodCoercedDate; updatedAt: z.ZodCoercedDate; }, z.core.$strip>; export type WebhookEndpointObject = z.infer; export declare const ListWebhookEndpointsResponse: z.ZodObject<{ data: z.ZodArray; secretProvisioning: z.ZodEnum<{ either: "either"; integrator: "integrator"; provider: "provider"; }>; secretSet: z.ZodBoolean; tenantId: z.ZodNullable; externalRef: z.ZodNullable; url: z.ZodString; createdAt: z.ZodCoercedDate; updatedAt: z.ZodCoercedDate; }, z.core.$strip>>; }, z.core.$strip>; export type ListWebhookEndpointsResponse = z.infer; export declare const WebhookEndpointSubscriberObject: z.ZodObject<{ id: z.ZodString; type: z.ZodEnum<{ session: "session"; task: "task"; }>; taskId: z.ZodString; filter: z.ZodNullable; }, z.core.$strip>; export type WebhookEndpointSubscriberObject = z.infer; export declare const WebhookEndpointDetailObject: z.ZodObject<{ id: z.ZodString; declaredId: z.ZodString; source: z.ZodString; status: z.ZodEnum<{ active: "active"; deleting: "deleting"; inactive: "inactive"; }>; secretProvisioning: z.ZodEnum<{ either: "either"; integrator: "integrator"; provider: "provider"; }>; secretSet: z.ZodBoolean; tenantId: z.ZodNullable; externalRef: z.ZodNullable; url: z.ZodString; createdAt: z.ZodCoercedDate; updatedAt: z.ZodCoercedDate; subscribers: z.ZodArray; taskId: z.ZodString; filter: z.ZodNullable; }, z.core.$strip>>; setupPrompt: z.ZodString; }, z.core.$strip>; export type WebhookEndpointDetailObject = z.infer; export declare const WebhookDeliveryListItem: z.ZodObject<{ id: z.ZodString; endpoint: z.ZodNullable>; status: z.ZodEnum<{ failed: "failed"; filtered: "filtered"; pending: "pending"; processing: "processing"; succeeded: "succeeded"; unmatched: "unmatched"; }>; externalDeliveryId: z.ZodString; isTest: z.ZodBoolean; createdAt: z.ZodCoercedDate; processedAt: z.ZodNullable>; }, z.core.$strip>; export type WebhookDeliveryListItem = z.infer; /** Query for `GET /api/v1/webhooks/deliveries`, newest first. */ export type ListWebhookDeliveriesQuery = { /** Declared endpoint ids or `wh_` ids. */ endpoint?: string | string[]; status?: WebhookDeliveryApiStatus | WebhookDeliveryApiStatus[]; /** A duration back from now, such as `"1h"` or `"7d"`. */ period?: string; from?: Date; to?: Date; /** 1 to 100. */ limit?: number; /** The `pagination.next` cursor from a previous page. */ after?: string; }; export declare const ListWebhookDeliveriesResponse: z.ZodObject<{ data: z.ZodArray>; status: z.ZodEnum<{ failed: "failed"; filtered: "filtered"; pending: "pending"; processing: "processing"; succeeded: "succeeded"; unmatched: "unmatched"; }>; externalDeliveryId: z.ZodString; isTest: z.ZodBoolean; createdAt: z.ZodCoercedDate; processedAt: z.ZodNullable>; }, z.core.$strip>>; pagination: z.ZodObject<{ next: z.ZodOptional; previous: z.ZodOptional; }, z.core.$strip>; }, z.core.$strip>; export type ListWebhookDeliveriesResponse = z.infer; export declare const WebhookDeliveryTargetApiStatus: z.ZodEnum<{ failed: "failed"; filtered: "filtered"; pending: "pending"; succeeded: "succeeded"; }>; export type WebhookDeliveryTargetApiStatus = z.infer; /** * What a delivery did for one subscriber, or (type `waiter`) the summary of the waiting runs it * matched. `runId` and `sessionId` are friendly ids. */ export declare const WebhookDeliveryTargetObject: z.ZodObject<{ id: z.ZodString; type: z.ZodEnum<{ session: "session"; task: "task"; waiter: "waiter"; }>; status: z.ZodEnum<{ failed: "failed"; filtered: "filtered"; pending: "pending"; succeeded: "succeeded"; }>; reason: z.ZodNullable; error: z.ZodNullable; runId: z.ZodNullable; sessionId: z.ZodNullable; waiters: z.ZodNullable>; }, z.core.$strip>; export type WebhookDeliveryTargetObject = z.infer; export declare const WebhookDeliveryObject: z.ZodObject<{ id: z.ZodString; endpoint: z.ZodNullable>; status: z.ZodEnum<{ failed: "failed"; filtered: "filtered"; pending: "pending"; processing: "processing"; succeeded: "succeeded"; unmatched: "unmatched"; }>; externalDeliveryId: z.ZodString; isTest: z.ZodBoolean; createdAt: z.ZodCoercedDate; processedAt: z.ZodNullable>; idempotencyKey: z.ZodString; event: z.ZodNullable; headers: z.ZodNullable>; rawBodyHash: z.ZodNullable; error: z.ZodNullable; filterReason: z.ZodNullable; targets: z.ZodArray; status: z.ZodEnum<{ failed: "failed"; filtered: "filtered"; pending: "pending"; succeeded: "succeeded"; }>; reason: z.ZodNullable; error: z.ZodNullable; runId: z.ZodNullable; sessionId: z.ZodNullable; waiters: z.ZodNullable>; }, z.core.$strip>>; updatedAt: z.ZodCoercedDate; }, z.core.$strip>; export type WebhookDeliveryObject = z.infer; export declare const MAX_WEBHOOK_PREVIOUS_SECRET_TTL_SECONDS: number; /** * How long, in seconds, the secret being replaced keeps verifying deliveries (at most 7 days). Omit it * or pass 0 to replace the secret immediately. */ export declare const WebhookPreviousSecretTtlSeconds: z.ZodNumber; /** `POST /api/v1/webhooks/endpoints/:endpointId/rotate-secret`: the body is optional. */ export declare const RotateWebhookEndpointSecretRequestBody: z.ZodObject<{ previousSecretTtlSeconds: z.ZodOptional; }, z.core.$strip>; export type RotateWebhookEndpointSecretRequestBody = z.infer; /** Rotating/setting a signing secret returns the plaintext ONCE; it is never readable again. */ export declare const RotateWebhookEndpointSecretResponse: z.ZodObject<{ id: z.ZodString; secretSet: z.ZodLiteral; secret: z.ZodString; previousSecretExpiresAt: z.ZodOptional; }, z.core.$strip>; export type RotateWebhookEndpointSecretResponse = z.infer; /** `PUT /api/v1/webhooks/endpoints/:endpointId/secret`: store a secret or public key the provider issued. */ export declare const SetWebhookEndpointSecretRequestBody: z.ZodObject<{ secret: z.ZodString; previousSecretTtlSeconds: z.ZodOptional; }, z.core.$strip>; export type SetWebhookEndpointSecretRequestBody = z.infer; export declare const SetWebhookEndpointSecretResponse: z.ZodObject<{ id: z.ZodString; secretSet: z.ZodLiteral; previousSecretExpiresAt: z.ZodOptional; }, z.core.$strip>; export type SetWebhookEndpointSecretResponse = z.infer; /** Replaying re-runs a delivery's task from its stored event as a new delivery. */ export declare const ReplayWebhookDeliveryResponse: z.ZodObject<{ deliveryId: z.ZodString; replayedFrom: z.ZodString; }, z.core.$strip>; export type ReplayWebhookDeliveryResponse = z.infer; /** * `POST /api/v1/webhooks/endpoints/:endpointId/waiters`, where `:endpointId` is the declared endpoint * id or its `wh_` id. A waiter only matches deliveries that arrive after it was created. */ export declare const CreateWebhookWaiterRequestBody: z.ZodObject<{ match: z.ZodOptional>>; filter: z.ZodOptional; timeout: z.ZodOptional; tags: z.ZodOptional]>>; idempotencyKey: z.ZodOptional; idempotencyKeyTTL: z.ZodOptional; endpoint: z.ZodOptional; externalRef: z.ZodOptional; }, z.core.$strip>>; }, z.core.$strip>; export type CreateWebhookWaiterRequestBody = z.infer; export declare const CreateWebhookWaiterResponseBody: z.ZodObject<{ id: z.ZodString; url: z.ZodOptional; expiresAt: z.ZodCoercedDate; isCached: z.ZodBoolean; }, z.core.$strip>; export type CreateWebhookWaiterResponseBody = z.infer; export declare const WebhookWaiterErrorCode: z.ZodEnum<{ invalid_request: "invalid_request"; webhook_endpoint_not_found: "webhook_endpoint_not_found"; webhook_filter_invalid: "webhook_filter_invalid"; webhook_waiter_limit: "webhook_waiter_limit"; }>; export type WebhookWaiterErrorCode = z.infer; export declare const WebhookWaiterErrorResponseBody: z.ZodObject<{ error: z.ZodString; code: z.ZodEnum<{ invalid_request: "invalid_request"; webhook_endpoint_not_found: "webhook_endpoint_not_found"; webhook_filter_invalid: "webhook_filter_invalid"; webhook_waiter_limit: "webhook_waiter_limit"; }>; reason: z.ZodOptional>; }, z.core.$strip>; export type WebhookWaiterErrorResponseBody = z.infer; /** `POST /api/v1/webhooks/waiters/:waiterId/cancel`. `too_late`: a delivery already claimed it. */ export declare const CancelWebhookWaiterResponseBody: z.ZodObject<{ cancelled: z.ZodBoolean; reason: z.ZodOptional>; deliveryId: z.ZodOptional; }, z.core.$strip>; export type CancelWebhookWaiterResponseBody = z.infer;