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"; /** * Mode of the webhook support. */ export declare const Mode: { readonly Native: "native"; readonly Virtual: "virtual"; readonly None: "none"; }; /** * Mode of the webhook support. */ export type Mode = ClosedEnum; /** * Received events are scoped to connection or across integration. */ export declare const SubscriptionLevel: { readonly Connection: "connection"; readonly Integration: "integration"; }; /** * Received events are scoped to connection or across integration. */ export type SubscriptionLevel = ClosedEnum; /** * How the subscription is managed in the downstream. */ export declare const ManagedVia: { readonly Manual: "manual"; readonly Api: "api"; }; /** * How the subscription is managed in the downstream. */ export type ManagedVia = ClosedEnum; /** * The window unit for the rate. */ export declare const Unit: { readonly Second: "second"; readonly Minute: "minute"; readonly Hour: "hour"; readonly Day: "day"; }; /** * The window unit for the rate. */ export type Unit = ClosedEnum; /** * The rate at which requests for resources will be made to downstream. */ export type RequestRate = { /** * The number of requests per window unit. */ rate: number; /** * Size of request window. */ size: number; /** * The window unit for the rate. */ unit: Unit; }; export type WebhookSupportResources = { events?: Array | undefined; }; /** * Virtual webhook config for the connector. */ export type VirtualWebhooks = { /** * The rate at which requests for resources will be made to downstream. */ requestRate: RequestRate; /** * The resources that will be requested from downstream. */ resources?: { [k: string]: WebhookSupportResources; } | undefined; }; /** * How webhooks are supported for the connector. Sometimes the connector natively supports webhooks, other times Apideck virtualizes them based on polling. */ export type WebhookSupport = { /** * Mode of the webhook support. */ mode?: Mode | undefined; /** * Received events are scoped to connection or across integration. */ subscriptionLevel?: SubscriptionLevel | undefined; /** * How the subscription is managed in the downstream. */ managedVia?: ManagedVia | undefined; /** * Virtual webhook config for the connector. */ virtualWebhooks?: VirtualWebhooks | undefined; }; /** @internal */ export declare const Mode$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Mode$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 Mode$ { /** @deprecated use `Mode$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Native: "native"; readonly Virtual: "virtual"; readonly None: "none"; }>; /** @deprecated use `Mode$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Native: "native"; readonly Virtual: "virtual"; readonly None: "none"; }>; } /** @internal */ export declare const SubscriptionLevel$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const SubscriptionLevel$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 SubscriptionLevel$ { /** @deprecated use `SubscriptionLevel$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Connection: "connection"; readonly Integration: "integration"; }>; /** @deprecated use `SubscriptionLevel$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Connection: "connection"; readonly Integration: "integration"; }>; } /** @internal */ export declare const ManagedVia$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const ManagedVia$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 ManagedVia$ { /** @deprecated use `ManagedVia$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Manual: "manual"; readonly Api: "api"; }>; /** @deprecated use `ManagedVia$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Manual: "manual"; readonly Api: "api"; }>; } /** @internal */ export declare const Unit$inboundSchema: z.ZodNativeEnum; /** @internal */ export declare const Unit$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 Unit$ { /** @deprecated use `Unit$inboundSchema` instead. */ const inboundSchema: z.ZodNativeEnum<{ readonly Second: "second"; readonly Minute: "minute"; readonly Hour: "hour"; readonly Day: "day"; }>; /** @deprecated use `Unit$outboundSchema` instead. */ const outboundSchema: z.ZodNativeEnum<{ readonly Second: "second"; readonly Minute: "minute"; readonly Hour: "hour"; readonly Day: "day"; }>; } /** @internal */ export declare const RequestRate$inboundSchema: z.ZodType; /** @internal */ export type RequestRate$Outbound = { rate: number; size: number; unit: string; }; /** @internal */ export declare const RequestRate$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 RequestRate$ { /** @deprecated use `RequestRate$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `RequestRate$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `RequestRate$Outbound` instead. */ type Outbound = RequestRate$Outbound; } export declare function requestRateToJSON(requestRate: RequestRate): string; export declare function requestRateFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const WebhookSupportResources$inboundSchema: z.ZodType; /** @internal */ export type WebhookSupportResources$Outbound = { events?: Array | undefined; }; /** @internal */ export declare const WebhookSupportResources$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 WebhookSupportResources$ { /** @deprecated use `WebhookSupportResources$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `WebhookSupportResources$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `WebhookSupportResources$Outbound` instead. */ type Outbound = WebhookSupportResources$Outbound; } export declare function webhookSupportResourcesToJSON(webhookSupportResources: WebhookSupportResources): string; export declare function webhookSupportResourcesFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const VirtualWebhooks$inboundSchema: z.ZodType; /** @internal */ export type VirtualWebhooks$Outbound = { request_rate: RequestRate$Outbound; resources?: { [k: string]: WebhookSupportResources$Outbound; } | undefined; }; /** @internal */ export declare const VirtualWebhooks$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 VirtualWebhooks$ { /** @deprecated use `VirtualWebhooks$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `VirtualWebhooks$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `VirtualWebhooks$Outbound` instead. */ type Outbound = VirtualWebhooks$Outbound; } export declare function virtualWebhooksToJSON(virtualWebhooks: VirtualWebhooks): string; export declare function virtualWebhooksFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const WebhookSupport$inboundSchema: z.ZodType; /** @internal */ export type WebhookSupport$Outbound = { mode?: string | undefined; subscription_level?: string | undefined; managed_via?: string | undefined; virtual_webhooks?: VirtualWebhooks$Outbound | undefined; }; /** @internal */ export declare const WebhookSupport$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 WebhookSupport$ { /** @deprecated use `WebhookSupport$inboundSchema` instead. */ const inboundSchema: z.ZodType; /** @deprecated use `WebhookSupport$outboundSchema` instead. */ const outboundSchema: z.ZodType; /** @deprecated use `WebhookSupport$Outbound` instead. */ type Outbound = WebhookSupport$Outbound; } export declare function webhookSupportToJSON(webhookSupport: WebhookSupport): string; export declare function webhookSupportFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=webhooksupport.d.ts.map