import * as z from "zod/v3";
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<typeof Mode>;
/**
 * 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<typeof SubscriptionLevel>;
/**
 * 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<typeof ManagedVia>;
/**
 * 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<typeof Unit>;
/**
 * 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<string> | 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<typeof Mode>;
/** @internal */
export declare const SubscriptionLevel$inboundSchema: z.ZodNativeEnum<typeof SubscriptionLevel>;
/** @internal */
export declare const ManagedVia$inboundSchema: z.ZodNativeEnum<typeof ManagedVia>;
/** @internal */
export declare const Unit$inboundSchema: z.ZodNativeEnum<typeof Unit>;
/** @internal */
export declare const RequestRate$inboundSchema: z.ZodType<RequestRate, z.ZodTypeDef, unknown>;
export declare function requestRateFromJSON(jsonString: string): SafeParseResult<RequestRate, SDKValidationError>;
/** @internal */
export declare const WebhookSupportResources$inboundSchema: z.ZodType<WebhookSupportResources, z.ZodTypeDef, unknown>;
export declare function webhookSupportResourcesFromJSON(jsonString: string): SafeParseResult<WebhookSupportResources, SDKValidationError>;
/** @internal */
export declare const VirtualWebhooks$inboundSchema: z.ZodType<VirtualWebhooks, z.ZodTypeDef, unknown>;
export declare function virtualWebhooksFromJSON(jsonString: string): SafeParseResult<VirtualWebhooks, SDKValidationError>;
/** @internal */
export declare const WebhookSupport$inboundSchema: z.ZodType<WebhookSupport, z.ZodTypeDef, unknown>;
export declare function webhookSupportFromJSON(jsonString: string): SafeParseResult<WebhookSupport, SDKValidationError>;
//# sourceMappingURL=webhooksupport.d.ts.map