import * as z from "zod/v4-mini"; import { ClosedEnum, OpenEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdk-validation-error.js"; export declare const CreateWebhookEventTypeRequest: { readonly QueueItemNew: "QUEUE_ITEM_NEW"; readonly QueueItemCompleted: "QUEUE_ITEM_COMPLETED"; readonly QueueItemAction: "QUEUE_ITEM_ACTION"; readonly QueueItemRejected: "QUEUE_ITEM_REJECTED"; readonly QueueItemAllowed: "QUEUE_ITEM_ALLOWED"; readonly AuthorBlocked: "AUTHOR_BLOCKED"; readonly AuthorUnblocked: "AUTHOR_UNBLOCKED"; readonly AuthorSuspended: "AUTHOR_SUSPENDED"; readonly AuthorUpdated: "AUTHOR_UPDATED"; readonly AuthorTrustLevelChanged: "AUTHOR_TRUST_LEVEL_CHANGED"; readonly AuthorAction: "AUTHOR_ACTION"; }; export type CreateWebhookEventTypeRequest = ClosedEnum; export type CreateWebhookRequestBody = { /** * The webhook's name, used to identify it in the dashboard */ name: string; /** * The webhook's description */ description?: string | null | undefined; /** * The webhook's URL. We'll call this URL when an event occurs. */ url: string; /** * Event types this webhook subscribes to. One webhook URL receives all events you list here. */ eventTypes: Array; }; export type CreateWebhookRequest = { /** * The project to act on, when you call with an organization key. Optional when the organization has one project. A project key acts on its own project: naming another one is an error. */ projectId?: string | undefined; body: CreateWebhookRequestBody; }; export declare const CreateWebhookEventTypeResponse: { readonly QueueItemNew: "QUEUE_ITEM_NEW"; readonly QueueItemCompleted: "QUEUE_ITEM_COMPLETED"; readonly QueueItemAction: "QUEUE_ITEM_ACTION"; readonly QueueItemRejected: "QUEUE_ITEM_REJECTED"; readonly QueueItemAllowed: "QUEUE_ITEM_ALLOWED"; readonly AuthorBlocked: "AUTHOR_BLOCKED"; readonly AuthorUnblocked: "AUTHOR_UNBLOCKED"; readonly AuthorSuspended: "AUTHOR_SUSPENDED"; readonly AuthorUpdated: "AUTHOR_UPDATED"; readonly AuthorTrustLevelChanged: "AUTHOR_TRUST_LEVEL_CHANGED"; readonly AuthorAction: "AUTHOR_ACTION"; }; export type CreateWebhookEventTypeResponse = OpenEnum; /** * Payload envelope version. V2 is the Stripe-style envelope; V1 is the legacy flat shape and is read-only via this API. */ export declare const CreateWebhookPayloadVersion: { readonly V1: "V1"; readonly V2: "V2"; }; /** * Payload envelope version. V2 is the Stripe-style envelope; V1 is the legacy flat shape and is read-only via this API. */ export type CreateWebhookPayloadVersion = OpenEnum; /** * Webhook created successfully */ export type CreateWebhookResponse = { /** * The ID of the webhook. */ id: string; /** * The webhook's name. */ name: string; /** * The webhook's description. */ description?: string | null | undefined; /** * The URL we call when a subscribed event occurs. */ url: string; /** * Event types this webhook subscribes to. Empty for legacy v1 webhooks, which subscribe via their single deprecated `type` instead. */ eventTypes: Array; /** * Payload envelope version. V2 is the Stripe-style envelope; V1 is the legacy flat shape and is read-only via this API. */ payloadVersion: CreateWebhookPayloadVersion; /** * The date the webhook was created. */ createdAt: string; }; /** @internal */ export declare const CreateWebhookEventTypeRequest$outboundSchema: z.ZodMiniEnum; /** @internal */ export type CreateWebhookRequestBody$Outbound = { name: string; description?: string | null | undefined; url: string; eventTypes: Array; }; /** @internal */ export declare const CreateWebhookRequestBody$outboundSchema: z.ZodMiniType; export declare function createWebhookRequestBodyToJSON(createWebhookRequestBody: CreateWebhookRequestBody): string; /** @internal */ export type CreateWebhookRequest$Outbound = { projectId?: string | undefined; body: CreateWebhookRequestBody$Outbound; }; /** @internal */ export declare const CreateWebhookRequest$outboundSchema: z.ZodMiniType; export declare function createWebhookRequestToJSON(createWebhookRequest: CreateWebhookRequest): string; /** @internal */ export declare const CreateWebhookEventTypeResponse$inboundSchema: z.ZodMiniType; /** @internal */ export declare const CreateWebhookPayloadVersion$inboundSchema: z.ZodMiniType; /** @internal */ export declare const CreateWebhookResponse$inboundSchema: z.ZodMiniType; export declare function createWebhookResponseFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=create-webhook.d.ts.map