import { type Encodable } from "@automate.ax/codec"; import { CALENDLY_PAGINATION_SCHEMA, getCalendlyApi as getCalendlyContractApi } from "@automate.ax/integration-contracts/calendly"; import * as z from "zod"; import type { ResolvedIntegrationAccount } from "../../../automation/integrations.js"; export declare const CALENDLY_ACCOUNT = "calendly"; /** * Builds a Calendly OAuth account requirement for one scope. * * @param requiredScope - Calendly OAuth scope. */ export declare function calendlyAccountRequirement(requiredScope: string): { readonly connections: readonly [{ readonly connectionMethodId: "oauth"; readonly requiredScope: string; }]; }; export declare const CALENDLY_PAGE_INPUT_SCHEMA: z.ZodObject<{ count: z.ZodPrefault; pageToken: z.ZodOptional; }, z.core.$strip>; export declare const CALENDLY_PAGE_INFO_SCHEMA: z.ZodObject<{ nextPageToken: z.ZodNullable; }, z.core.$strip>; /** * Wraps the Calendly client with action retry classification. * * @param account - Resolved Calendly account. */ export declare function getCalendlyApi(account: ResolvedIntegrationAccount<"calendly">): ReturnType; /** * Omits undefined fields before encoding a Calendly request body. * * @param value - Action input object. */ export declare function compactCalendlyInput(value: Record): Encodable; /** * Omits undefined Calendly query parameters. * * @param value - Query parameter object. */ export declare function compactCalendlyQuery(value: Record): Record; /** * Validates a Calendly time window against its endpoint limit. * * @param value - Requested time window. * @param value.endTime - Exclusive window end. * @param value.startTime - Inclusive window start. * @param context - Zod refinement context. * @param maximumDays - Provider maximum window length. */ export declare function validateCalendlyDateRange(value: { endTime: string; startTime: string; }, context: z.RefinementCtx, maximumDays: number): void; /** * Builds a Calendly resource response schema. * * @param schema - Resource schema. */ export declare function resourceResponse(schema: TSchema): z.ZodObject<{ resource: TSchema; }, z.core.$strip>; /** * Builds a Calendly collection response schema. * * @param schema - Collection item schema. */ export declare function collectionResponse(schema: TSchema): z.ZodObject<{ collection: z.ZodArray; pagination: z.ZodObject<{ count: z.ZodNumber; nextPage: z.ZodNullable; nextPageToken: z.ZodNullable; previousPage: z.ZodNullable; previousPageToken: z.ZodNullable; }, z.core.$strip>; }, z.core.$strip>; /** * Normalizes Calendly collection pagination for public actions. * * @param response - Calendly collection response. * @param response.collection - Provider collection. * @param response.pagination - Provider pagination metadata. */ export declare function toPage(response: { collection: T[]; pagination: z.output; }): { items: T[]; pageInfo: { nextPageToken: string | null; }; }; //# sourceMappingURL=lib.d.ts.map