/** * SMI-645: Webhook Schemas - Zod validation schemas for GitHub webhooks * * SMI-680: Extracted from WebhookPayload.ts to reduce file size. * * Provides secure payload validation using Zod schemas. * * @see WebhookPayload.ts for type definitions and helper functions */ import { z } from 'zod'; /** * Git user schema (author/committer) */ export declare const GitUserSchema: z.ZodObject<{ name: z.ZodString; email: z.ZodString; username: z.ZodOptional; }, z.core.$loose>; /** * Repository owner schema */ export declare const RepositoryOwnerSchema: z.ZodObject<{ login: z.ZodString; id: z.ZodNumber; type: z.ZodEnum<{ User: "User"; Organization: "Organization"; }>; avatar_url: z.ZodOptional; html_url: z.ZodOptional; }, z.core.$loose>; /** * Webhook repository schema - minimum required fields */ export declare const WebhookRepositorySchema: z.ZodObject<{ id: z.ZodOptional; name: z.ZodOptional; full_name: z.ZodString; private: z.ZodOptional; owner: z.ZodOptional; avatar_url: z.ZodOptional; html_url: z.ZodOptional; }, z.core.$loose>>; html_url: z.ZodOptional; default_branch: z.ZodString; }, z.core.$loose>; /** * Push commit schema */ export declare const PushCommitSchema: z.ZodObject<{ id: z.ZodString; message: z.ZodString; added: z.ZodArray; removed: z.ZodArray; modified: z.ZodArray; }, z.core.$loose>; /** * Push event payload schema * @see https://docs.github.com/en/webhooks/webhook-events-and-payloads#push */ export declare const PushEventSchema: z.ZodObject<{ ref: z.ZodString; before: z.ZodString; after: z.ZodString; repository: z.ZodObject<{ id: z.ZodOptional; name: z.ZodOptional; full_name: z.ZodString; private: z.ZodOptional; owner: z.ZodOptional; avatar_url: z.ZodOptional; html_url: z.ZodOptional; }, z.core.$loose>>; html_url: z.ZodOptional; default_branch: z.ZodString; }, z.core.$loose>; commits: z.ZodOptional; removed: z.ZodArray; modified: z.ZodArray; }, z.core.$loose>>>; }, z.core.$loose>; /** * Webhook sender schema */ export declare const WebhookSenderSchema: z.ZodObject<{ login: z.ZodString; id: z.ZodNumber; type: z.ZodEnum<{ User: "User"; Organization: "Organization"; Bot: "Bot"; }>; }, z.core.$loose>; /** * Repository event payload schema * @see https://docs.github.com/en/webhooks/webhook-events-and-payloads#repository */ export declare const RepositoryEventSchema: z.ZodObject<{ action: z.ZodString; repository: z.ZodObject<{ id: z.ZodOptional; name: z.ZodOptional; full_name: z.ZodString; private: z.ZodOptional; owner: z.ZodOptional; avatar_url: z.ZodOptional; html_url: z.ZodOptional; }, z.core.$loose>>; html_url: z.ZodOptional; default_branch: z.ZodString; }, z.core.$loose>; sender: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>; /** * Webhook hook config schema */ export declare const WebhookHookConfigSchema: z.ZodObject<{ content_type: z.ZodString; insecure_ssl: z.ZodString; url: z.ZodString; }, z.core.$loose>; /** * Webhook hook schema */ export declare const WebhookHookSchema: z.ZodObject<{ type: z.ZodString; id: z.ZodNumber; name: z.ZodString; active: z.ZodBoolean; events: z.ZodArray; config: z.ZodObject<{ content_type: z.ZodString; insecure_ssl: z.ZodString; url: z.ZodString; }, z.core.$loose>; }, z.core.$loose>; /** * Ping event payload schema * @see https://docs.github.com/en/webhooks/webhook-events-and-payloads#ping */ export declare const PingEventSchema: z.ZodObject<{ zen: z.ZodString; hook_id: z.ZodNumber; hook: z.ZodObject<{ type: z.ZodString; id: z.ZodNumber; name: z.ZodString; active: z.ZodBoolean; events: z.ZodArray; config: z.ZodObject<{ content_type: z.ZodString; insecure_ssl: z.ZodString; url: z.ZodString; }, z.core.$loose>; }, z.core.$loose>; repository: z.ZodOptional; name: z.ZodOptional; full_name: z.ZodString; private: z.ZodOptional; owner: z.ZodOptional; avatar_url: z.ZodOptional; html_url: z.ZodOptional; }, z.core.$loose>>; html_url: z.ZodOptional; default_branch: z.ZodString; }, z.core.$loose>>; sender: z.ZodOptional; }, z.core.$loose>>; }, z.core.$loose>; //# sourceMappingURL=webhook-schemas.d.ts.map