/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod/v3";
import { safeParse } from "../lib/schemas.js";
/**
 * The webhooks events
 */
export const GetWebhooksResponseBodyEvents = {
    BudgetReached: "budget.reached",
    BudgetReset: "budget.reset",
    DomainCreated: "domain.created",
    DomainDnsRecordsChanged: "domain.dns.records.changed",
    DomainTransferInStarted: "domain.transfer-in.started",
    DomainTransferInCompleted: "domain.transfer-in.completed",
    DomainTransferInFailed: "domain.transfer-in.failed",
    DomainCertificateAdd: "domain.certificate.add",
    DomainCertificateAddFailed: "domain.certificate.add.failed",
    DomainCertificateRenew: "domain.certificate.renew",
    DomainCertificateRenewFailed: "domain.certificate.renew.failed",
    DomainCertificateDeleted: "domain.certificate.deleted",
    DomainRenewal: "domain.renewal",
    DomainRenewalFailed: "domain.renewal.failed",
    DomainAutoRenewChanged: "domain.auto-renew.changed",
    DeploymentCreated: "deployment.created",
    DeploymentCleanup: "deployment.cleanup",
    DeploymentError: "deployment.error",
    DeploymentCanceled: "deployment.canceled",
    DeploymentSucceeded: "deployment.succeeded",
    DeploymentReady: "deployment.ready",
    DeploymentCheckRerequested: "deployment.check-rerequested",
    DeploymentPromoted: "deployment.promoted",
    DeploymentIntegrationActionStart: "deployment.integration.action.start",
    DeploymentIntegrationActionCancel: "deployment.integration.action.cancel",
    DeploymentIntegrationActionCleanup: "deployment.integration.action.cleanup",
    DeploymentCheckrunStart: "deployment.checkrun.start",
    DeploymentCheckrunCancel: "deployment.checkrun.cancel",
    EdgeConfigCreated: "edge-config.created",
    EdgeConfigDeleted: "edge-config.deleted",
    EdgeConfigItemsUpdated: "edge-config.items.updated",
    FirewallAttack: "firewall.attack",
    IntegrationConfigurationPermissionUpgraded: "integration-configuration.permission-upgraded",
    IntegrationConfigurationRemoved: "integration-configuration.removed",
    IntegrationConfigurationScopeChangeConfirmed: "integration-configuration.scope-change-confirmed",
    IntegrationConfigurationTransferred: "integration-configuration.transferred",
    IntegrationResourceProjectConnected: "integration-resource.project-connected",
    IntegrationResourceProjectDisconnected: "integration-resource.project-disconnected",
    ProjectCreated: "project.created",
    ProjectRemoved: "project.removed",
    ProjectDomainCreated: "project.domain.created",
    ProjectDomainUpdated: "project.domain.updated",
    ProjectDomainDeleted: "project.domain.deleted",
    ProjectDomainVerified: "project.domain.verified",
    ProjectDomainUnverified: "project.domain.unverified",
    ProjectDomainMoved: "project.domain.moved",
    ProjectRollingReleaseStarted: "project.rolling-release.started",
    ProjectRollingReleaseAborted: "project.rolling-release.aborted",
    ProjectRollingReleaseCompleted: "project.rolling-release.completed",
    ProjectRollingReleaseApproved: "project.rolling-release.approved",
    DeploymentChecksFailed: "deployment.checks.failed",
    DeploymentChecksSucceeded: "deployment.checks.succeeded",
    DeploymentChecksCompleted: "deployment-checks-completed",
    DeploymentReadyHyphen: "deployment-ready",
    DeploymentPreparedHyphen: "deployment-prepared",
    DeploymentErrorHyphen: "deployment-error",
    DeploymentCheckRerequestedHyphen: "deployment-check-rerequested",
    DeploymentCanceledHyphen: "deployment-canceled",
    ProjectCreatedHyphen: "project-created",
    ProjectRemovedHyphen: "project-removed",
    DomainCreatedHyphen: "domain-created",
    Deployment: "deployment",
    IntegrationConfigurationPermissionUpdatedHyphen: "integration-configuration-permission-updated",
    IntegrationConfigurationRemovedHyphen: "integration-configuration-removed",
    IntegrationConfigurationScopeChangeConfirmedHyphen: "integration-configuration-scope-change-confirmed",
    MarketplaceMemberChanged: "marketplace.member.changed",
    MarketplaceInvoiceCreated: "marketplace.invoice.created",
    MarketplaceInvoicePaid: "marketplace.invoice.paid",
    MarketplaceInvoiceNotpaid: "marketplace.invoice.notpaid",
    MarketplaceInvoiceRefunded: "marketplace.invoice.refunded",
    ObservabilityAnomaly: "observability.anomaly",
    ObservabilityAnomalyError: "observability.anomaly-error",
    ObservabilityUsageAnomaly: "observability.usage-anomaly",
    ObservabilityErrorAnomaly: "observability.error-anomaly",
    ObservabilityAnomalyBotId: "observability.anomaly-botId",
    TestWebhook: "test-webhook",
};
export const GetWebhooksResponseBodyFramework = {
    Blitzjs: "blitzjs",
    Nextjs: "nextjs",
    Gatsby: "gatsby",
    Remix: "remix",
    ReactRouter: "react-router",
    Astro: "astro",
    Hexo: "hexo",
    Eleventy: "eleventy",
    Docusaurus2: "docusaurus-2",
    Docusaurus: "docusaurus",
    Preact: "preact",
    Solidstart1: "solidstart-1",
    Solidstart: "solidstart",
    Dojo: "dojo",
    Ember: "ember",
    Vue: "vue",
    Scully: "scully",
    IonicAngular: "ionic-angular",
    Angular: "angular",
    Polymer: "polymer",
    Svelte: "svelte",
    Sveltekit: "sveltekit",
    Sveltekit1: "sveltekit-1",
    IonicReact: "ionic-react",
    CreateReactApp: "create-react-app",
    Gridsome: "gridsome",
    Umijs: "umijs",
    Sapper: "sapper",
    Saber: "saber",
    Stencil: "stencil",
    Nuxtjs: "nuxtjs",
    Redwoodjs: "redwoodjs",
    Hugo: "hugo",
    Jekyll: "jekyll",
    Brunch: "brunch",
    Middleman: "middleman",
    Zola: "zola",
    Hydrogen: "hydrogen",
    Vite: "vite",
    TanstackStart: "tanstack-start",
    Vitepress: "vitepress",
    Vuepress: "vuepress",
    Parcel: "parcel",
    Fastapi: "fastapi",
    Flask: "flask",
    Fasthtml: "fasthtml",
    SanityV3: "sanity-v3",
    Sanity: "sanity",
    Storybook: "storybook",
    Nitro: "nitro",
    Hono: "hono",
    Express: "express",
    H3: "h3",
    Nestjs: "nestjs",
    Elysia: "elysia",
    Fastify: "fastify",
    Xmcp: "xmcp",
};
/**
 * The webhooks events
 */
export const ResponseBodyEvents = {
    BudgetReached: "budget.reached",
    BudgetReset: "budget.reset",
    DomainCreated: "domain.created",
    DomainDnsRecordsChanged: "domain.dns.records.changed",
    DomainTransferInStarted: "domain.transfer-in.started",
    DomainTransferInCompleted: "domain.transfer-in.completed",
    DomainTransferInFailed: "domain.transfer-in.failed",
    DomainCertificateAdd: "domain.certificate.add",
    DomainCertificateAddFailed: "domain.certificate.add.failed",
    DomainCertificateRenew: "domain.certificate.renew",
    DomainCertificateRenewFailed: "domain.certificate.renew.failed",
    DomainCertificateDeleted: "domain.certificate.deleted",
    DomainRenewal: "domain.renewal",
    DomainRenewalFailed: "domain.renewal.failed",
    DomainAutoRenewChanged: "domain.auto-renew.changed",
    DeploymentCreated: "deployment.created",
    DeploymentCleanup: "deployment.cleanup",
    DeploymentError: "deployment.error",
    DeploymentCanceled: "deployment.canceled",
    DeploymentSucceeded: "deployment.succeeded",
    DeploymentReady: "deployment.ready",
    DeploymentCheckRerequested: "deployment.check-rerequested",
    DeploymentPromoted: "deployment.promoted",
    DeploymentIntegrationActionStart: "deployment.integration.action.start",
    DeploymentIntegrationActionCancel: "deployment.integration.action.cancel",
    DeploymentIntegrationActionCleanup: "deployment.integration.action.cleanup",
    DeploymentCheckrunStart: "deployment.checkrun.start",
    DeploymentCheckrunCancel: "deployment.checkrun.cancel",
    EdgeConfigCreated: "edge-config.created",
    EdgeConfigDeleted: "edge-config.deleted",
    EdgeConfigItemsUpdated: "edge-config.items.updated",
    FirewallAttack: "firewall.attack",
    IntegrationConfigurationPermissionUpgraded: "integration-configuration.permission-upgraded",
    IntegrationConfigurationRemoved: "integration-configuration.removed",
    IntegrationConfigurationScopeChangeConfirmed: "integration-configuration.scope-change-confirmed",
    IntegrationConfigurationTransferred: "integration-configuration.transferred",
    IntegrationResourceProjectConnected: "integration-resource.project-connected",
    IntegrationResourceProjectDisconnected: "integration-resource.project-disconnected",
    ProjectCreated: "project.created",
    ProjectRemoved: "project.removed",
    ProjectDomainCreated: "project.domain.created",
    ProjectDomainUpdated: "project.domain.updated",
    ProjectDomainDeleted: "project.domain.deleted",
    ProjectDomainVerified: "project.domain.verified",
    ProjectDomainUnverified: "project.domain.unverified",
    ProjectDomainMoved: "project.domain.moved",
    ProjectRollingReleaseStarted: "project.rolling-release.started",
    ProjectRollingReleaseAborted: "project.rolling-release.aborted",
    ProjectRollingReleaseCompleted: "project.rolling-release.completed",
    ProjectRollingReleaseApproved: "project.rolling-release.approved",
    DeploymentChecksFailed: "deployment.checks.failed",
    DeploymentChecksSucceeded: "deployment.checks.succeeded",
    DeploymentChecksCompleted: "deployment-checks-completed",
    DeploymentReadyHyphen: "deployment-ready",
    DeploymentPreparedHyphen: "deployment-prepared",
    DeploymentErrorHyphen: "deployment-error",
    DeploymentCheckRerequestedHyphen: "deployment-check-rerequested",
    DeploymentCanceledHyphen: "deployment-canceled",
    ProjectCreatedHyphen: "project-created",
    ProjectRemovedHyphen: "project-removed",
    DomainCreatedHyphen: "domain-created",
    Deployment: "deployment",
    IntegrationConfigurationPermissionUpdatedHyphen: "integration-configuration-permission-updated",
    IntegrationConfigurationRemovedHyphen: "integration-configuration-removed",
    IntegrationConfigurationScopeChangeConfirmedHyphen: "integration-configuration-scope-change-confirmed",
    MarketplaceMemberChanged: "marketplace.member.changed",
    MarketplaceInvoiceCreated: "marketplace.invoice.created",
    MarketplaceInvoicePaid: "marketplace.invoice.paid",
    MarketplaceInvoiceNotpaid: "marketplace.invoice.notpaid",
    MarketplaceInvoiceRefunded: "marketplace.invoice.refunded",
    ObservabilityAnomaly: "observability.anomaly",
    ObservabilityAnomalyError: "observability.anomaly-error",
    ObservabilityUsageAnomaly: "observability.usage-anomaly",
    ObservabilityErrorAnomaly: "observability.error-anomaly",
    ObservabilityAnomalyBotId: "observability.anomaly-botId",
    TestWebhook: "test-webhook",
};
/** @internal */
export const GetWebhooksRequest$inboundSchema = z.object({
    projectId: z.string().optional(),
    teamId: z.string().optional(),
    slug: z.string().optional(),
});
/** @internal */
export const GetWebhooksRequest$outboundSchema = z.object({
    projectId: z.string().optional(),
    teamId: z.string().optional(),
    slug: z.string().optional(),
});
export function getWebhooksRequestToJSON(getWebhooksRequest) {
    return JSON.stringify(GetWebhooksRequest$outboundSchema.parse(getWebhooksRequest));
}
export function getWebhooksRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetWebhooksRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetWebhooksRequest' from JSON`);
}
/** @internal */
export const GetWebhooksResponseBodyEvents$inboundSchema = z.nativeEnum(GetWebhooksResponseBodyEvents);
/** @internal */
export const GetWebhooksResponseBodyEvents$outboundSchema = GetWebhooksResponseBodyEvents$inboundSchema;
/** @internal */
export const GetWebhooksResponseBody2$inboundSchema = z.object({
    events: z.array(GetWebhooksResponseBodyEvents$inboundSchema),
    id: z.string(),
    url: z.string(),
    ownerId: z.string(),
    createdAt: z.number(),
    updatedAt: z.number(),
    projectIds: z.array(z.string()).optional(),
});
/** @internal */
export const GetWebhooksResponseBody2$outboundSchema = z.object({
    events: z.array(GetWebhooksResponseBodyEvents$outboundSchema),
    id: z.string(),
    url: z.string(),
    ownerId: z.string(),
    createdAt: z.number(),
    updatedAt: z.number(),
    projectIds: z.array(z.string()).optional(),
});
export function getWebhooksResponseBody2ToJSON(getWebhooksResponseBody2) {
    return JSON.stringify(GetWebhooksResponseBody2$outboundSchema.parse(getWebhooksResponseBody2));
}
export function getWebhooksResponseBody2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetWebhooksResponseBody2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetWebhooksResponseBody2' from JSON`);
}
/** @internal */
export const GetWebhooksResponseBodyFramework$inboundSchema = z.nativeEnum(GetWebhooksResponseBodyFramework);
/** @internal */
export const GetWebhooksResponseBodyFramework$outboundSchema = GetWebhooksResponseBodyFramework$inboundSchema;
/** @internal */
export const GetWebhooksResponseBodyProjectsMetadata$inboundSchema = z.object({
    id: z.string(),
    name: z.string(),
    framework: z.nullable(GetWebhooksResponseBodyFramework$inboundSchema)
        .optional(),
    latestDeployment: z.string().optional(),
});
/** @internal */
export const GetWebhooksResponseBodyProjectsMetadata$outboundSchema = z.object({
    id: z.string(),
    name: z.string(),
    framework: z.nullable(GetWebhooksResponseBodyFramework$outboundSchema)
        .optional(),
    latestDeployment: z.string().optional(),
});
export function getWebhooksResponseBodyProjectsMetadataToJSON(getWebhooksResponseBodyProjectsMetadata) {
    return JSON.stringify(GetWebhooksResponseBodyProjectsMetadata$outboundSchema.parse(getWebhooksResponseBodyProjectsMetadata));
}
export function getWebhooksResponseBodyProjectsMetadataFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetWebhooksResponseBodyProjectsMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetWebhooksResponseBodyProjectsMetadata' from JSON`);
}
/** @internal */
export const ResponseBodyEvents$inboundSchema = z.nativeEnum(ResponseBodyEvents);
/** @internal */
export const ResponseBodyEvents$outboundSchema = ResponseBodyEvents$inboundSchema;
/** @internal */
export const GetWebhooksResponseBody1$inboundSchema = z.object({
    projectsMetadata: z.nullable(z.array(z.lazy(() => GetWebhooksResponseBodyProjectsMetadata$inboundSchema))),
    events: z.array(ResponseBodyEvents$inboundSchema),
    id: z.string(),
    url: z.string(),
    ownerId: z.string(),
    createdAt: z.number(),
    updatedAt: z.number(),
    projectIds: z.array(z.string()).optional(),
});
/** @internal */
export const GetWebhooksResponseBody1$outboundSchema = z.object({
    projectsMetadata: z.nullable(z.array(z.lazy(() => GetWebhooksResponseBodyProjectsMetadata$outboundSchema))),
    events: z.array(ResponseBodyEvents$outboundSchema),
    id: z.string(),
    url: z.string(),
    ownerId: z.string(),
    createdAt: z.number(),
    updatedAt: z.number(),
    projectIds: z.array(z.string()).optional(),
});
export function getWebhooksResponseBody1ToJSON(getWebhooksResponseBody1) {
    return JSON.stringify(GetWebhooksResponseBody1$outboundSchema.parse(getWebhooksResponseBody1));
}
export function getWebhooksResponseBody1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetWebhooksResponseBody1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetWebhooksResponseBody1' from JSON`);
}
/** @internal */
export const GetWebhooksResponseBody$inboundSchema = z.union([
    z.array(z.lazy(() => GetWebhooksResponseBody1$inboundSchema)),
    z.array(z.lazy(() => GetWebhooksResponseBody2$inboundSchema)),
]);
/** @internal */
export const GetWebhooksResponseBody$outboundSchema = z.union([
    z.array(z.lazy(() => GetWebhooksResponseBody1$outboundSchema)),
    z.array(z.lazy(() => GetWebhooksResponseBody2$outboundSchema)),
]);
export function getWebhooksResponseBodyToJSON(getWebhooksResponseBody) {
    return JSON.stringify(GetWebhooksResponseBody$outboundSchema.parse(getWebhooksResponseBody));
}
export function getWebhooksResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetWebhooksResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetWebhooksResponseBody' from JSON`);
}
//# sourceMappingURL=getwebhooksop.js.map