/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
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",
    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",
    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",
    DeploymentReadyLegacy: "deployment-ready",
    DeploymentPrepared: "deployment-prepared",
    DeploymentErrorLegacy: "deployment-error",
    DeploymentCheckRerequestedLegacy: "deployment-check-rerequested",
    DeploymentCanceledLegacy: "deployment-canceled",
    ProjectCreatedLegacy: "project-created",
    ProjectRemovedLegacy: "project-removed",
    DomainCreatedLegacy: "domain-created",
    Deployment: "deployment",
    IntegrationConfigurationPermissionUpdated: "integration-configuration-permission-updated",
    IntegrationConfigurationRemovedLegacy: "integration-configuration-removed",
    IntegrationConfigurationScopeChangeConfirmedLegacy: "integration-configuration-scope-change-confirmed",
    MarketplaceInvoiceCreated: "marketplace.invoice.created",
    MarketplaceInvoicePaid: "marketplace.invoice.paid",
    MarketplaceInvoiceNotpaid: "marketplace.invoice.notpaid",
    MarketplaceInvoiceRefunded: "marketplace.invoice.refunded",
    ObservabilityAnomaly: "observability.anomaly",
    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",
    Vitepress: "vitepress",
    Vuepress: "vuepress",
    Parcel: "parcel",
    Fasthtml: "fasthtml",
    SanityV3: "sanity-v3",
    Sanity: "sanity",
    Storybook: "storybook",
    Nitro: "nitro",
    Hono: "hono",
};
/**
 * 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",
    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",
    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",
    DeploymentReadyLegacy: "deployment-ready",
    DeploymentPrepared: "deployment-prepared",
    DeploymentErrorLegacy: "deployment-error",
    DeploymentCheckRerequestedLegacy: "deployment-check-rerequested",
    DeploymentCanceledLegacy: "deployment-canceled",
    ProjectCreatedLegacy: "project-created",
    ProjectRemovedLegacy: "project-removed",
    DomainCreatedLegacy: "domain-created",
    Deployment: "deployment",
    IntegrationConfigurationPermissionUpdated: "integration-configuration-permission-updated",
    IntegrationConfigurationRemovedLegacy: "integration-configuration-removed",
    IntegrationConfigurationScopeChangeConfirmedLegacy: "integration-configuration-scope-change-confirmed",
    MarketplaceInvoiceCreated: "marketplace.invoice.created",
    MarketplaceInvoicePaid: "marketplace.invoice.paid",
    MarketplaceInvoiceNotpaid: "marketplace.invoice.notpaid",
    MarketplaceInvoiceRefunded: "marketplace.invoice.refunded",
    ObservabilityAnomaly: "observability.anomaly",
    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(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetWebhooksRequest$;
(function (GetWebhooksRequest$) {
    /** @deprecated use `GetWebhooksRequest$inboundSchema` instead. */
    GetWebhooksRequest$.inboundSchema = GetWebhooksRequest$inboundSchema;
    /** @deprecated use `GetWebhooksRequest$outboundSchema` instead. */
    GetWebhooksRequest$.outboundSchema = GetWebhooksRequest$outboundSchema;
})(GetWebhooksRequest$ || (GetWebhooksRequest$ = {}));
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
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetWebhooksResponseBodyEvents$;
(function (GetWebhooksResponseBodyEvents$) {
    /** @deprecated use `GetWebhooksResponseBodyEvents$inboundSchema` instead. */
    GetWebhooksResponseBodyEvents$.inboundSchema = GetWebhooksResponseBodyEvents$inboundSchema;
    /** @deprecated use `GetWebhooksResponseBodyEvents$outboundSchema` instead. */
    GetWebhooksResponseBodyEvents$.outboundSchema = GetWebhooksResponseBodyEvents$outboundSchema;
})(GetWebhooksResponseBodyEvents$ || (GetWebhooksResponseBodyEvents$ = {}));
/** @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(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetWebhooksResponseBody2$;
(function (GetWebhooksResponseBody2$) {
    /** @deprecated use `GetWebhooksResponseBody2$inboundSchema` instead. */
    GetWebhooksResponseBody2$.inboundSchema = GetWebhooksResponseBody2$inboundSchema;
    /** @deprecated use `GetWebhooksResponseBody2$outboundSchema` instead. */
    GetWebhooksResponseBody2$.outboundSchema = GetWebhooksResponseBody2$outboundSchema;
})(GetWebhooksResponseBody2$ || (GetWebhooksResponseBody2$ = {}));
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
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetWebhooksResponseBodyFramework$;
(function (GetWebhooksResponseBodyFramework$) {
    /** @deprecated use `GetWebhooksResponseBodyFramework$inboundSchema` instead. */
    GetWebhooksResponseBodyFramework$.inboundSchema = GetWebhooksResponseBodyFramework$inboundSchema;
    /** @deprecated use `GetWebhooksResponseBodyFramework$outboundSchema` instead. */
    GetWebhooksResponseBodyFramework$.outboundSchema = GetWebhooksResponseBodyFramework$outboundSchema;
})(GetWebhooksResponseBodyFramework$ || (GetWebhooksResponseBodyFramework$ = {}));
/** @internal */
export const ProjectsMetadata$inboundSchema = z.object({
    id: z.string(),
    name: z.string(),
    framework: z.nullable(GetWebhooksResponseBodyFramework$inboundSchema)
        .optional(),
    latestDeployment: z.string().optional(),
});
/** @internal */
export const ProjectsMetadata$outboundSchema = z.object({
    id: z.string(),
    name: z.string(),
    framework: z.nullable(GetWebhooksResponseBodyFramework$outboundSchema)
        .optional(),
    latestDeployment: z.string().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ProjectsMetadata$;
(function (ProjectsMetadata$) {
    /** @deprecated use `ProjectsMetadata$inboundSchema` instead. */
    ProjectsMetadata$.inboundSchema = ProjectsMetadata$inboundSchema;
    /** @deprecated use `ProjectsMetadata$outboundSchema` instead. */
    ProjectsMetadata$.outboundSchema = ProjectsMetadata$outboundSchema;
})(ProjectsMetadata$ || (ProjectsMetadata$ = {}));
export function projectsMetadataToJSON(projectsMetadata) {
    return JSON.stringify(ProjectsMetadata$outboundSchema.parse(projectsMetadata));
}
export function projectsMetadataFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ProjectsMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProjectsMetadata' from JSON`);
}
/** @internal */
export const ResponseBodyEvents$inboundSchema = z.nativeEnum(ResponseBodyEvents);
/** @internal */
export const ResponseBodyEvents$outboundSchema = ResponseBodyEvents$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ResponseBodyEvents$;
(function (ResponseBodyEvents$) {
    /** @deprecated use `ResponseBodyEvents$inboundSchema` instead. */
    ResponseBodyEvents$.inboundSchema = ResponseBodyEvents$inboundSchema;
    /** @deprecated use `ResponseBodyEvents$outboundSchema` instead. */
    ResponseBodyEvents$.outboundSchema = ResponseBodyEvents$outboundSchema;
})(ResponseBodyEvents$ || (ResponseBodyEvents$ = {}));
/** @internal */
export const GetWebhooksResponseBody1$inboundSchema = z.object({
    projectsMetadata: z.nullable(z.array(z.lazy(() => ProjectsMetadata$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(() => ProjectsMetadata$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(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetWebhooksResponseBody1$;
(function (GetWebhooksResponseBody1$) {
    /** @deprecated use `GetWebhooksResponseBody1$inboundSchema` instead. */
    GetWebhooksResponseBody1$.inboundSchema = GetWebhooksResponseBody1$inboundSchema;
    /** @deprecated use `GetWebhooksResponseBody1$outboundSchema` instead. */
    GetWebhooksResponseBody1$.outboundSchema = GetWebhooksResponseBody1$outboundSchema;
})(GetWebhooksResponseBody1$ || (GetWebhooksResponseBody1$ = {}));
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)),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetWebhooksResponseBody$;
(function (GetWebhooksResponseBody$) {
    /** @deprecated use `GetWebhooksResponseBody$inboundSchema` instead. */
    GetWebhooksResponseBody$.inboundSchema = GetWebhooksResponseBody$inboundSchema;
    /** @deprecated use `GetWebhooksResponseBody$outboundSchema` instead. */
    GetWebhooksResponseBody$.outboundSchema = GetWebhooksResponseBody$outboundSchema;
})(GetWebhooksResponseBody$ || (GetWebhooksResponseBody$ = {}));
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