import * as z from "zod/v3"; import { OpenEnum } 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 = OpenEnum; /** * 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 = OpenEnum; /** * 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 = OpenEnum; /** * Where the vendor stores the webhook target URL. `app` means one URL per vendor developer app, which customers on Apideck's own credentials cannot configure. `tenant` means each customer's vendor account holds its own URL. */ export declare const TargetURLScope: { readonly App: "app"; readonly Tenant: "tenant"; }; /** * Where the vendor stores the webhook target URL. `app` means one URL per vendor developer app, which customers on Apideck's own credentials cannot configure. `tenant` means each customer's vendor account holds its own URL. */ export type TargetURLScope = OpenEnum; /** * 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 = OpenEnum; /** * 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; /** * Service IDs of connectors that receive events from this connector's webhook URL when the URL's own connector has no callable connection for the event. Connectors listed here must use the same webhook event mapping. */ sharedWith?: Array | undefined; /** * Where the vendor stores the webhook target URL. `app` means one URL per vendor developer app, which customers on Apideck's own credentials cannot configure. `tenant` means each customer's vendor account holds its own URL. */ targetUrlScope?: TargetURLScope | undefined; /** * Whether Unify accepts webhook URLs scoped to a vendor developer app for this connector, rather than to one Apideck application. Events delivered to such a URL reach every connection that the vendor app authorized. */ vendorAppUrl?: boolean | undefined; /** * Virtual webhook config for the connector. */ virtualWebhooks?: VirtualWebhooks | undefined; }; /** @internal */ export declare const Mode$inboundSchema: z.ZodType; /** @internal */ export declare const SubscriptionLevel$inboundSchema: z.ZodType; /** @internal */ export declare const ManagedVia$inboundSchema: z.ZodType; /** @internal */ export declare const TargetURLScope$inboundSchema: z.ZodType; /** @internal */ export declare const Unit$inboundSchema: z.ZodType; /** @internal */ export declare const RequestRate$inboundSchema: z.ZodType; export declare function requestRateFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const WebhookSupportResources$inboundSchema: z.ZodType; export declare function webhookSupportResourcesFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const VirtualWebhooks$inboundSchema: z.ZodType; export declare function virtualWebhooksFromJSON(jsonString: string): SafeParseResult; /** @internal */ export declare const WebhookSupport$inboundSchema: z.ZodType; export declare function webhookSupportFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=webhooksupport.d.ts.map