import { z } from "zod";
const POSITIVE_INTEGER_OR_UUID = /^([1-9][0-9]*|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
/**
 * A single connection entry in the connections map.
 * Provides a connectionId that maps a named connection alias to a Zapier connection.
 */
export const ConnectionEntrySchema = z.object({
    connectionId: z
        .union([
        z.string().regex(POSITIVE_INTEGER_OR_UUID),
        z.number().int().positive(),
    ])
        .describe("Zapier connection ID for the third-party service."),
});
/**
 * A map of named connections. Keys are user-defined connection aliases
 * (e.g. "slack_work", "slack_private") that can be referenced via the
 * `connection` parameter on action calls.
 */
export const ConnectionsMapSchema = z.record(z.string(), ConnectionEntrySchema);
