import { z } from "zod"; import type { PollingGetPollersOutput as ProtoGetPollersOutput, PollingGetTargetManagersInput as ProtoGetPollingTargetManagersInput, PollingGetTargetManagersOutput as ProtoGetPollingTargetManagersOutput, PollingGetTargetChannelsInput as ProtoGetPollingTargetChannelsInput, PollingGetTargetChannelsOutput as ProtoGetPollingTargetChannelsOutput, PollingManagerTarget as ProtoPollingManagerTarget, PollingPoller as ProtoPollingPoller } from "../gen/channel/app/sdk/v1/extension.js"; type ProtoBacked = T & Proto; export declare const PollingExecutionScopeSchema: z.ZodEnum<["channel", "manager"]>; /** * Polling handler metadata returned from extension.polling.metadata.getPollers. */ export declare const PollingPollerSchema: z.ZodObject<{ /** * Full app function name invoked with channel context and empty params. */ functionName: z.ZodString; /** * Handler run creation interval, in seconds. */ intervalSeconds: z.ZodNumber; /** * Per-call timeout, in seconds. AppStore defaults to 30 when omitted. */ timeoutSeconds: z.ZodOptional; /** * Per-handler max in-flight calls per polling worker process. */ maxConcurrency: z.ZodOptional; /** * Per-handler request rate per polling worker process. */ rps: z.ZodOptional; /** * Caller scope for the polling function. AppStore defaults to channel when omitted. */ executionScope: z.ZodOptional>; }, "strip", z.ZodTypeAny, { functionName: string; intervalSeconds: number; executionScope?: "manager" | "channel" | undefined; timeoutSeconds?: number | undefined; maxConcurrency?: number | undefined; rps?: number | undefined; }, { functionName: string; intervalSeconds: number; executionScope?: "manager" | "channel" | undefined; timeoutSeconds?: number | undefined; maxConcurrency?: number | undefined; rps?: number | undefined; }>; export type PollingPoller = ProtoBacked, ProtoPollingPoller>; /** * Metadata response schema for polling handler registration. */ export declare const GetPollersOutputSchema: z.ZodObject<{ pollers: z.ZodArray; /** * Per-handler max in-flight calls per polling worker process. */ maxConcurrency: z.ZodOptional; /** * Per-handler request rate per polling worker process. */ rps: z.ZodOptional; /** * Caller scope for the polling function. AppStore defaults to channel when omitted. */ executionScope: z.ZodOptional>; }, "strip", z.ZodTypeAny, { functionName: string; intervalSeconds: number; executionScope?: "manager" | "channel" | undefined; timeoutSeconds?: number | undefined; maxConcurrency?: number | undefined; rps?: number | undefined; }, { functionName: string; intervalSeconds: number; executionScope?: "manager" | "channel" | undefined; timeoutSeconds?: number | undefined; maxConcurrency?: number | undefined; rps?: number | undefined; }>, "many">; }, "strip", z.ZodTypeAny, { pollers: { functionName: string; intervalSeconds: number; executionScope?: "manager" | "channel" | undefined; timeoutSeconds?: number | undefined; maxConcurrency?: number | undefined; rps?: number | undefined; }[]; }, { pollers: { functionName: string; intervalSeconds: number; executionScope?: "manager" | "channel" | undefined; timeoutSeconds?: number | undefined; maxConcurrency?: number | undefined; rps?: number | undefined; }[]; }>; export type GetPollersOutput = ProtoBacked, ProtoGetPollersOutput>; /** * Input schema for extension.polling.target.getChannels. */ export declare const GetPollingTargetChannelsInputSchema: z.ZodObject<{ /** * Polling function name from the poller metadata currently being enqueued. */ functionName: z.ZodString; /** * Cursor previously returned as nextCursor. */ cursor: z.ZodOptional; /** * Maximum number of channel IDs to return. */ limit: z.ZodNumber; }, "strip", z.ZodTypeAny, { limit: number; functionName: string; cursor?: string | undefined; }, { limit: number; functionName: string; cursor?: string | undefined; }>; export type GetPollingTargetChannelsInput = ProtoBacked, ProtoGetPollingTargetChannelsInput>; /** * Output schema for extension.polling.target.getChannels. */ export declare const GetPollingTargetChannelsOutputSchema: z.ZodEffects; nextCursor: z.ZodOptional; hasNextPage: z.ZodOptional; }, "strip", z.ZodTypeAny, { channelIds: string[]; nextCursor?: string | undefined; hasNextPage?: boolean | undefined; }, { channelIds: string[]; nextCursor?: string | undefined; hasNextPage?: boolean | undefined; }>, { channelIds: string[]; nextCursor?: string | undefined; hasNextPage?: boolean | undefined; }, { channelIds: string[]; nextCursor?: string | undefined; hasNextPage?: boolean | undefined; }>; export type GetPollingTargetChannelsOutput = ProtoBacked, ProtoGetPollingTargetChannelsOutput>; /** * One manager-scoped polling target resolved by the app. */ export declare const PollingManagerTargetSchema: z.ZodObject<{ channelId: z.ZodString; managerId: z.ZodString; }, "strip", z.ZodTypeAny, { channelId: string; managerId: string; }, { channelId: string; managerId: string; }>; export type PollingManagerTarget = ProtoBacked, ProtoPollingManagerTarget>; /** * Input schema for extension.polling.target.getManagers. */ export declare const GetPollingTargetManagersInputSchema: z.ZodObject<{ functionName: z.ZodString; cursor: z.ZodOptional; /** * Maximum number of channel/manager targets to return. */ limit: z.ZodNumber; }, "strip", z.ZodTypeAny, { limit: number; functionName: string; cursor?: string | undefined; }, { limit: number; functionName: string; cursor?: string | undefined; }>; export type GetPollingTargetManagersInput = ProtoBacked, ProtoGetPollingTargetManagersInput>; /** * Output schema for extension.polling.target.getManagers. */ export declare const GetPollingTargetManagersOutputSchema: z.ZodEffects, "many">; nextCursor: z.ZodOptional; hasNextPage: z.ZodOptional; }, "strip", z.ZodTypeAny, { targets: { channelId: string; managerId: string; }[]; nextCursor?: string | undefined; hasNextPage?: boolean | undefined; }, { targets: { channelId: string; managerId: string; }[]; nextCursor?: string | undefined; hasNextPage?: boolean | undefined; }>, { targets: { channelId: string; managerId: string; }[]; nextCursor?: string | undefined; hasNextPage?: boolean | undefined; }, { targets: { channelId: string; managerId: string; }[]; nextCursor?: string | undefined; hasNextPage?: boolean | undefined; }>; export type GetPollingTargetManagersOutput = ProtoBacked, ProtoGetPollingTargetManagersOutput>; export {}; //# sourceMappingURL=polling.d.ts.map