"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.zTicketCreatedWebhookPayload = void 0;
const zod_1 = require("zod");
/**
 * Problem:
 * Freshdesk allows their users to define a custom webhook payload.
 * This means there's no "standard" webhook payload and it's not possible to define a "standard" schema for it.
 *
 * Alternative 1:
 * If a customer wants to use a webhook-based integration with Freshdesk, we register the webhook
 * in a private extension and define a custom contract/schema together with the customer and use that instead.
 *
 * Alternative 2:
 * We try to define a schema for the webhook payload that is flexible enough to handle all possible payloads.
 * Haven't attempted this yet.
 *
 * See https://support.freshdesk.com/support/solutions/articles/132589-using-webhooks-in-automation-rules
 */
exports.zTicketCreatedWebhookPayload = zod_1.z.object({
    freshdesk_webhook: zod_1.z.object({
        ticket_id: zod_1.z.union([zod_1.z.string(), zod_1.z.number()]),
    }),
});
//# sourceMappingURL=types.js.map