import * as z from "zod"; import { ClosedEnum } from "../../types/enums.js"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { Status } from "./status.js"; import { UnifiedApiId } from "./unifiedapiid.js"; import { WebhookEventType } from "./webhookeventtype.js"; /** * Indicates if the webhook has has been disabled as it reached its retry limit or if account is over the usage allocated by it's plan. */ export declare const DisabledReason: { readonly None: "none"; readonly RetryLimit: "retry_limit"; readonly UsageLimit: "usage_limit"; }; /** * Indicates if the webhook has has been disabled as it reached its retry limit or if account is over the usage allocated by it's plan. */ export type DisabledReason = ClosedEnum; export type Webhook = { id?: string | undefined; /** * A description of the object. */ description?: string | null | undefined; /** * Name of Apideck Unified API */ unifiedApi: UnifiedApiId; /** * The status of the webhook. */ status: Status; /** * Indicates if the webhook has has been disabled as it reached its retry limit or if account is over the usage allocated by it's plan. */ disabledReason?: DisabledReason | undefined; /** * The delivery url of the webhook endpoint. */ deliveryUrl: string; /** * The Unify Base URL events from connectors will be sent to after service id is appended. */ executeBaseUrl: string; /** * The list of subscribed events for this webhook. [`*`] indicates that all events are enabled. */ events: Array; /** * The date and time when the object was last updated. */ updatedAt?: Date | null | undefined; /** * The date and time when the object was created. */ createdAt?: Date | null | undefined; }; /** @internal */ export declare const DisabledReason$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const DisabledReason$outboundSchema: z.ZodNativeEnum; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace DisabledReason$ { /** @deprecated use `DisabledReason$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly None: "none"; readonly RetryLimit: "retry_limit"; readonly UsageLimit: "usage_limit"; }>; /** @deprecated use `DisabledReason$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly None: "none"; readonly RetryLimit: "retry_limit"; readonly UsageLimit: "usage_limit"; }>; } /** @internal */ export declare const Webhook$inboundSchema: z.ZodType; /** @internal */ export type Webhook$Outbound = { id?: string | undefined; description?: string | null | undefined; unified_api: string; status: string; disabled_reason?: string | undefined; delivery_url: string; execute_base_url: string; events: Array; updated_at?: string | null | undefined; created_at?: string | null | undefined; }; /** @internal */ export declare const Webhook$outboundSchema: z.ZodType; /** * @internal * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module. */ export declare namespace Webhook$ { /** @deprecated use `Webhook$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `Webhook$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `Webhook$Outbound` instead. */ type Outbound = Webhook$Outbound; } export declare function webhookToJSON(webhook: Webhook): string; export declare function webhookFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=webhook.d.ts.map