/*
 * 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 GetWebhookEvents = {
    BudgetReached: "budget.reached",
    BudgetReset: "budget.reset",
    DomainCreated: "domain.created",
    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",
    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",
    ProjectCreated: "project.created",
    ProjectRemoved: "project.removed",
    DeploymentChecksCompletedLegacy: "deployment-checks-completed",
    DeploymentReadyLegacy: "deployment-ready",
    DeploymentPreparedLegacy: "deployment-prepared",
    DeploymentErrorLegacy: "deployment-error",
    DeploymentCheckRerequestedLegacy: "deployment-check-rerequested",
    DeploymentCanceledLegacy: "deployment-canceled",
    ProjectCreatedLegacy: "project-created",
    ProjectRemovedLegacy: "project-removed",
    DomainCreatedLegacy: "domain-created",
    DeploymentLegacy: "deployment",
    IntegrationConfigurationPermissionUpdatedLegacy: "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",
    TestWebhook: "observability.anomaly",
    undefined: "test-webhook",
};
/** @internal */
export const GetWebhookRequest$inboundSchema = z.object({
    id: z.string(),
    teamId: z.string().optional(),
    slug: z.string().optional(),
});
/** @internal */
export const GetWebhookRequest$outboundSchema = z.object({
    id: z.string(),
    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 GetWebhookRequest$;
(function (GetWebhookRequest$) {
    /** @deprecated use `GetWebhookRequest$inboundSchema` instead. */
    GetWebhookRequest$.inboundSchema = GetWebhookRequest$inboundSchema;
    /** @deprecated use `GetWebhookRequest$outboundSchema` instead. */
    GetWebhookRequest$.outboundSchema = GetWebhookRequest$outboundSchema;
})(GetWebhookRequest$ || (GetWebhookRequest$ = {}));
export function getWebhookRequestToJSON(getWebhookRequest) {
    return JSON.stringify(GetWebhookRequest$outboundSchema.parse(getWebhookRequest));
}
export function getWebhookRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetWebhookRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetWebhookRequest' from JSON`);
}
/** @internal */
export const GetWebhookEvents$inboundSchema = z.nativeEnum(GetWebhookEvents);
/** @internal */
export const GetWebhookEvents$outboundSchema = GetWebhookEvents$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GetWebhookEvents$;
(function (GetWebhookEvents$) {
    /** @deprecated use `GetWebhookEvents$inboundSchema` instead. */
    GetWebhookEvents$.inboundSchema = GetWebhookEvents$inboundSchema;
    /** @deprecated use `GetWebhookEvents$outboundSchema` instead. */
    GetWebhookEvents$.outboundSchema = GetWebhookEvents$outboundSchema;
})(GetWebhookEvents$ || (GetWebhookEvents$ = {}));
/** @internal */
export const GetWebhookResponseBody$inboundSchema = z.object({
    events: z.array(GetWebhookEvents$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 GetWebhookResponseBody$outboundSchema = z.object({
    events: z.array(GetWebhookEvents$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 GetWebhookResponseBody$;
(function (GetWebhookResponseBody$) {
    /** @deprecated use `GetWebhookResponseBody$inboundSchema` instead. */
    GetWebhookResponseBody$.inboundSchema = GetWebhookResponseBody$inboundSchema;
    /** @deprecated use `GetWebhookResponseBody$outboundSchema` instead. */
    GetWebhookResponseBody$.outboundSchema = GetWebhookResponseBody$outboundSchema;
})(GetWebhookResponseBody$ || (GetWebhookResponseBody$ = {}));
export function getWebhookResponseBodyToJSON(getWebhookResponseBody) {
    return JSON.stringify(GetWebhookResponseBody$outboundSchema.parse(getWebhookResponseBody));
}
export function getWebhookResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GetWebhookResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetWebhookResponseBody' from JSON`);
}
//# sourceMappingURL=getwebhookop.js.map