/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../lib/schemas.js";
export const ListDeploymentAliasesProtectionBypassAliasesResponse200Scope = {
    EmailInvite: "email_invite",
};
export const ListDeploymentAliasesProtectionBypassAliasesResponseScope = {
    AliasProtectionOverride: "alias-protection-override",
};
export const ListDeploymentAliasesProtectionBypassAccess = {
    Requested: "requested",
    Granted: "granted",
};
export const ListDeploymentAliasesProtectionBypassAliasesScope = {
    User: "user",
};
export const ListDeploymentAliasesProtectionBypassScope = {
    ShareableLink: "shareable-link",
};
/** @internal */
export const ListDeploymentAliasesRequest$inboundSchema = z.object({
    id: z.string(),
    teamId: z.string().optional(),
    slug: z.string().optional(),
});
/** @internal */
export const ListDeploymentAliasesRequest$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 ListDeploymentAliasesRequest$;
(function (ListDeploymentAliasesRequest$) {
    /** @deprecated use `ListDeploymentAliasesRequest$inboundSchema` instead. */
    ListDeploymentAliasesRequest$.inboundSchema = ListDeploymentAliasesRequest$inboundSchema;
    /** @deprecated use `ListDeploymentAliasesRequest$outboundSchema` instead. */
    ListDeploymentAliasesRequest$.outboundSchema = ListDeploymentAliasesRequest$outboundSchema;
})(ListDeploymentAliasesRequest$ || (ListDeploymentAliasesRequest$ = {}));
export function listDeploymentAliasesRequestToJSON(listDeploymentAliasesRequest) {
    return JSON.stringify(ListDeploymentAliasesRequest$outboundSchema.parse(listDeploymentAliasesRequest));
}
export function listDeploymentAliasesRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ListDeploymentAliasesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListDeploymentAliasesRequest' from JSON`);
}
/** @internal */
export const ListDeploymentAliasesProtectionBypassAliasesResponse200Scope$inboundSchema = z.nativeEnum(ListDeploymentAliasesProtectionBypassAliasesResponse200Scope);
/** @internal */
export const ListDeploymentAliasesProtectionBypassAliasesResponse200Scope$outboundSchema = ListDeploymentAliasesProtectionBypassAliasesResponse200Scope$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ListDeploymentAliasesProtectionBypassAliasesResponse200Scope$;
(function (ListDeploymentAliasesProtectionBypassAliasesResponse200Scope$) {
    /** @deprecated use `ListDeploymentAliasesProtectionBypassAliasesResponse200Scope$inboundSchema` instead. */
    ListDeploymentAliasesProtectionBypassAliasesResponse200Scope$.inboundSchema = ListDeploymentAliasesProtectionBypassAliasesResponse200Scope$inboundSchema;
    /** @deprecated use `ListDeploymentAliasesProtectionBypassAliasesResponse200Scope$outboundSchema` instead. */
    ListDeploymentAliasesProtectionBypassAliasesResponse200Scope$.outboundSchema = ListDeploymentAliasesProtectionBypassAliasesResponse200Scope$outboundSchema;
})(ListDeploymentAliasesProtectionBypassAliasesResponse200Scope$ || (ListDeploymentAliasesProtectionBypassAliasesResponse200Scope$ = {}));
/** @internal */
export const ProtectionBypass4$inboundSchema = z.object({
    createdAt: z.number(),
    lastUpdatedAt: z.number(),
    lastUpdatedBy: z.string(),
    scope: ListDeploymentAliasesProtectionBypassAliasesResponse200Scope$inboundSchema,
});
/** @internal */
export const ProtectionBypass4$outboundSchema = z.object({
    createdAt: z.number(),
    lastUpdatedAt: z.number(),
    lastUpdatedBy: z.string(),
    scope: ListDeploymentAliasesProtectionBypassAliasesResponse200Scope$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ProtectionBypass4$;
(function (ProtectionBypass4$) {
    /** @deprecated use `ProtectionBypass4$inboundSchema` instead. */
    ProtectionBypass4$.inboundSchema = ProtectionBypass4$inboundSchema;
    /** @deprecated use `ProtectionBypass4$outboundSchema` instead. */
    ProtectionBypass4$.outboundSchema = ProtectionBypass4$outboundSchema;
})(ProtectionBypass4$ || (ProtectionBypass4$ = {}));
export function protectionBypass4ToJSON(protectionBypass4) {
    return JSON.stringify(ProtectionBypass4$outboundSchema.parse(protectionBypass4));
}
export function protectionBypass4FromJSON(jsonString) {
    return safeParse(jsonString, (x) => ProtectionBypass4$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProtectionBypass4' from JSON`);
}
/** @internal */
export const ListDeploymentAliasesProtectionBypassAliasesResponseScope$inboundSchema = z.nativeEnum(ListDeploymentAliasesProtectionBypassAliasesResponseScope);
/** @internal */
export const ListDeploymentAliasesProtectionBypassAliasesResponseScope$outboundSchema = ListDeploymentAliasesProtectionBypassAliasesResponseScope$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ListDeploymentAliasesProtectionBypassAliasesResponseScope$;
(function (ListDeploymentAliasesProtectionBypassAliasesResponseScope$) {
    /** @deprecated use `ListDeploymentAliasesProtectionBypassAliasesResponseScope$inboundSchema` instead. */
    ListDeploymentAliasesProtectionBypassAliasesResponseScope$.inboundSchema = ListDeploymentAliasesProtectionBypassAliasesResponseScope$inboundSchema;
    /** @deprecated use `ListDeploymentAliasesProtectionBypassAliasesResponseScope$outboundSchema` instead. */
    ListDeploymentAliasesProtectionBypassAliasesResponseScope$.outboundSchema = ListDeploymentAliasesProtectionBypassAliasesResponseScope$outboundSchema;
})(ListDeploymentAliasesProtectionBypassAliasesResponseScope$ || (ListDeploymentAliasesProtectionBypassAliasesResponseScope$ = {}));
/** @internal */
export const ProtectionBypass3$inboundSchema = z.object({
    createdAt: z.number(),
    createdBy: z.string(),
    scope: ListDeploymentAliasesProtectionBypassAliasesResponseScope$inboundSchema,
});
/** @internal */
export const ProtectionBypass3$outboundSchema = z.object({
    createdAt: z.number(),
    createdBy: z.string(),
    scope: ListDeploymentAliasesProtectionBypassAliasesResponseScope$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ProtectionBypass3$;
(function (ProtectionBypass3$) {
    /** @deprecated use `ProtectionBypass3$inboundSchema` instead. */
    ProtectionBypass3$.inboundSchema = ProtectionBypass3$inboundSchema;
    /** @deprecated use `ProtectionBypass3$outboundSchema` instead. */
    ProtectionBypass3$.outboundSchema = ProtectionBypass3$outboundSchema;
})(ProtectionBypass3$ || (ProtectionBypass3$ = {}));
export function protectionBypass3ToJSON(protectionBypass3) {
    return JSON.stringify(ProtectionBypass3$outboundSchema.parse(protectionBypass3));
}
export function protectionBypass3FromJSON(jsonString) {
    return safeParse(jsonString, (x) => ProtectionBypass3$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ProtectionBypass3' from JSON`);
}
/** @internal */
export const ListDeploymentAliasesProtectionBypassAccess$inboundSchema = z
    .nativeEnum(ListDeploymentAliasesProtectionBypassAccess);
/** @internal */
export const ListDeploymentAliasesProtectionBypassAccess$outboundSchema = ListDeploymentAliasesProtectionBypassAccess$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ListDeploymentAliasesProtectionBypassAccess$;
(function (ListDeploymentAliasesProtectionBypassAccess$) {
    /** @deprecated use `ListDeploymentAliasesProtectionBypassAccess$inboundSchema` instead. */
    ListDeploymentAliasesProtectionBypassAccess$.inboundSchema = ListDeploymentAliasesProtectionBypassAccess$inboundSchema;
    /** @deprecated use `ListDeploymentAliasesProtectionBypassAccess$outboundSchema` instead. */
    ListDeploymentAliasesProtectionBypassAccess$.outboundSchema = ListDeploymentAliasesProtectionBypassAccess$outboundSchema;
})(ListDeploymentAliasesProtectionBypassAccess$ || (ListDeploymentAliasesProtectionBypassAccess$ = {}));
/** @internal */
export const ListDeploymentAliasesProtectionBypassAliasesScope$inboundSchema = z
    .nativeEnum(ListDeploymentAliasesProtectionBypassAliasesScope);
/** @internal */
export const ListDeploymentAliasesProtectionBypassAliasesScope$outboundSchema = ListDeploymentAliasesProtectionBypassAliasesScope$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ListDeploymentAliasesProtectionBypassAliasesScope$;
(function (ListDeploymentAliasesProtectionBypassAliasesScope$) {
    /** @deprecated use `ListDeploymentAliasesProtectionBypassAliasesScope$inboundSchema` instead. */
    ListDeploymentAliasesProtectionBypassAliasesScope$.inboundSchema = ListDeploymentAliasesProtectionBypassAliasesScope$inboundSchema;
    /** @deprecated use `ListDeploymentAliasesProtectionBypassAliasesScope$outboundSchema` instead. */
    ListDeploymentAliasesProtectionBypassAliasesScope$.outboundSchema = ListDeploymentAliasesProtectionBypassAliasesScope$outboundSchema;
})(ListDeploymentAliasesProtectionBypassAliasesScope$ || (ListDeploymentAliasesProtectionBypassAliasesScope$ = {}));
/** @internal */
export const ListDeploymentAliasesProtectionBypass2$inboundSchema = z.object({
    createdAt: z.number(),
    lastUpdatedAt: z.number(),
    lastUpdatedBy: z.string(),
    access: ListDeploymentAliasesProtectionBypassAccess$inboundSchema,
    scope: ListDeploymentAliasesProtectionBypassAliasesScope$inboundSchema,
});
/** @internal */
export const ListDeploymentAliasesProtectionBypass2$outboundSchema = z.object({
    createdAt: z.number(),
    lastUpdatedAt: z.number(),
    lastUpdatedBy: z.string(),
    access: ListDeploymentAliasesProtectionBypassAccess$outboundSchema,
    scope: ListDeploymentAliasesProtectionBypassAliasesScope$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ListDeploymentAliasesProtectionBypass2$;
(function (ListDeploymentAliasesProtectionBypass2$) {
    /** @deprecated use `ListDeploymentAliasesProtectionBypass2$inboundSchema` instead. */
    ListDeploymentAliasesProtectionBypass2$.inboundSchema = ListDeploymentAliasesProtectionBypass2$inboundSchema;
    /** @deprecated use `ListDeploymentAliasesProtectionBypass2$outboundSchema` instead. */
    ListDeploymentAliasesProtectionBypass2$.outboundSchema = ListDeploymentAliasesProtectionBypass2$outboundSchema;
})(ListDeploymentAliasesProtectionBypass2$ || (ListDeploymentAliasesProtectionBypass2$ = {}));
export function listDeploymentAliasesProtectionBypass2ToJSON(listDeploymentAliasesProtectionBypass2) {
    return JSON.stringify(ListDeploymentAliasesProtectionBypass2$outboundSchema.parse(listDeploymentAliasesProtectionBypass2));
}
export function listDeploymentAliasesProtectionBypass2FromJSON(jsonString) {
    return safeParse(jsonString, (x) => ListDeploymentAliasesProtectionBypass2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListDeploymentAliasesProtectionBypass2' from JSON`);
}
/** @internal */
export const ListDeploymentAliasesProtectionBypassScope$inboundSchema = z
    .nativeEnum(ListDeploymentAliasesProtectionBypassScope);
/** @internal */
export const ListDeploymentAliasesProtectionBypassScope$outboundSchema = ListDeploymentAliasesProtectionBypassScope$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ListDeploymentAliasesProtectionBypassScope$;
(function (ListDeploymentAliasesProtectionBypassScope$) {
    /** @deprecated use `ListDeploymentAliasesProtectionBypassScope$inboundSchema` instead. */
    ListDeploymentAliasesProtectionBypassScope$.inboundSchema = ListDeploymentAliasesProtectionBypassScope$inboundSchema;
    /** @deprecated use `ListDeploymentAliasesProtectionBypassScope$outboundSchema` instead. */
    ListDeploymentAliasesProtectionBypassScope$.outboundSchema = ListDeploymentAliasesProtectionBypassScope$outboundSchema;
})(ListDeploymentAliasesProtectionBypassScope$ || (ListDeploymentAliasesProtectionBypassScope$ = {}));
/** @internal */
export const ListDeploymentAliasesProtectionBypass1$inboundSchema = z.object({
    createdAt: z.number(),
    createdBy: z.string(),
    scope: ListDeploymentAliasesProtectionBypassScope$inboundSchema,
});
/** @internal */
export const ListDeploymentAliasesProtectionBypass1$outboundSchema = z.object({
    createdAt: z.number(),
    createdBy: z.string(),
    scope: ListDeploymentAliasesProtectionBypassScope$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ListDeploymentAliasesProtectionBypass1$;
(function (ListDeploymentAliasesProtectionBypass1$) {
    /** @deprecated use `ListDeploymentAliasesProtectionBypass1$inboundSchema` instead. */
    ListDeploymentAliasesProtectionBypass1$.inboundSchema = ListDeploymentAliasesProtectionBypass1$inboundSchema;
    /** @deprecated use `ListDeploymentAliasesProtectionBypass1$outboundSchema` instead. */
    ListDeploymentAliasesProtectionBypass1$.outboundSchema = ListDeploymentAliasesProtectionBypass1$outboundSchema;
})(ListDeploymentAliasesProtectionBypass1$ || (ListDeploymentAliasesProtectionBypass1$ = {}));
export function listDeploymentAliasesProtectionBypass1ToJSON(listDeploymentAliasesProtectionBypass1) {
    return JSON.stringify(ListDeploymentAliasesProtectionBypass1$outboundSchema.parse(listDeploymentAliasesProtectionBypass1));
}
export function listDeploymentAliasesProtectionBypass1FromJSON(jsonString) {
    return safeParse(jsonString, (x) => ListDeploymentAliasesProtectionBypass1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListDeploymentAliasesProtectionBypass1' from JSON`);
}
/** @internal */
export const ListDeploymentAliasesProtectionBypass$inboundSchema = z.union([
    z.lazy(() => ListDeploymentAliasesProtectionBypass2$inboundSchema),
    z.lazy(() => ProtectionBypass4$inboundSchema),
    z.lazy(() => ListDeploymentAliasesProtectionBypass1$inboundSchema),
    z.lazy(() => ProtectionBypass3$inboundSchema),
]);
/** @internal */
export const ListDeploymentAliasesProtectionBypass$outboundSchema = z.union([
    z.lazy(() => ListDeploymentAliasesProtectionBypass2$outboundSchema),
    z.lazy(() => ProtectionBypass4$outboundSchema),
    z.lazy(() => ListDeploymentAliasesProtectionBypass1$outboundSchema),
    z.lazy(() => ProtectionBypass3$outboundSchema),
]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ListDeploymentAliasesProtectionBypass$;
(function (ListDeploymentAliasesProtectionBypass$) {
    /** @deprecated use `ListDeploymentAliasesProtectionBypass$inboundSchema` instead. */
    ListDeploymentAliasesProtectionBypass$.inboundSchema = ListDeploymentAliasesProtectionBypass$inboundSchema;
    /** @deprecated use `ListDeploymentAliasesProtectionBypass$outboundSchema` instead. */
    ListDeploymentAliasesProtectionBypass$.outboundSchema = ListDeploymentAliasesProtectionBypass$outboundSchema;
})(ListDeploymentAliasesProtectionBypass$ || (ListDeploymentAliasesProtectionBypass$ = {}));
export function listDeploymentAliasesProtectionBypassToJSON(listDeploymentAliasesProtectionBypass) {
    return JSON.stringify(ListDeploymentAliasesProtectionBypass$outboundSchema.parse(listDeploymentAliasesProtectionBypass));
}
export function listDeploymentAliasesProtectionBypassFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ListDeploymentAliasesProtectionBypass$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListDeploymentAliasesProtectionBypass' from JSON`);
}
/** @internal */
export const Aliases$inboundSchema = z.object({
    uid: z.string(),
    alias: z.string(),
    created: z.string().datetime({ offset: true }).transform(v => new Date(v)),
    redirect: z.nullable(z.string()).optional(),
    protectionBypass: z.record(z.union([
        z.lazy(() => ListDeploymentAliasesProtectionBypass2$inboundSchema),
        z.lazy(() => ProtectionBypass4$inboundSchema),
        z.lazy(() => ListDeploymentAliasesProtectionBypass1$inboundSchema),
        z.lazy(() => ProtectionBypass3$inboundSchema),
    ])).optional(),
});
/** @internal */
export const Aliases$outboundSchema = z.object({
    uid: z.string(),
    alias: z.string(),
    created: z.date().transform(v => v.toISOString()),
    redirect: z.nullable(z.string()).optional(),
    protectionBypass: z.record(z.union([
        z.lazy(() => ListDeploymentAliasesProtectionBypass2$outboundSchema),
        z.lazy(() => ProtectionBypass4$outboundSchema),
        z.lazy(() => ListDeploymentAliasesProtectionBypass1$outboundSchema),
        z.lazy(() => ProtectionBypass3$outboundSchema),
    ])).optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Aliases$;
(function (Aliases$) {
    /** @deprecated use `Aliases$inboundSchema` instead. */
    Aliases$.inboundSchema = Aliases$inboundSchema;
    /** @deprecated use `Aliases$outboundSchema` instead. */
    Aliases$.outboundSchema = Aliases$outboundSchema;
})(Aliases$ || (Aliases$ = {}));
export function aliasesToJSON(aliases) {
    return JSON.stringify(Aliases$outboundSchema.parse(aliases));
}
export function aliasesFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Aliases$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Aliases' from JSON`);
}
/** @internal */
export const ListDeploymentAliasesResponseBody$inboundSchema = z.object({
    aliases: z.array(z.lazy(() => Aliases$inboundSchema)),
});
/** @internal */
export const ListDeploymentAliasesResponseBody$outboundSchema = z.object({
    aliases: z.array(z.lazy(() => Aliases$outboundSchema)),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ListDeploymentAliasesResponseBody$;
(function (ListDeploymentAliasesResponseBody$) {
    /** @deprecated use `ListDeploymentAliasesResponseBody$inboundSchema` instead. */
    ListDeploymentAliasesResponseBody$.inboundSchema = ListDeploymentAliasesResponseBody$inboundSchema;
    /** @deprecated use `ListDeploymentAliasesResponseBody$outboundSchema` instead. */
    ListDeploymentAliasesResponseBody$.outboundSchema = ListDeploymentAliasesResponseBody$outboundSchema;
})(ListDeploymentAliasesResponseBody$ || (ListDeploymentAliasesResponseBody$ = {}));
export function listDeploymentAliasesResponseBodyToJSON(listDeploymentAliasesResponseBody) {
    return JSON.stringify(ListDeploymentAliasesResponseBody$outboundSchema.parse(listDeploymentAliasesResponseBody));
}
export function listDeploymentAliasesResponseBodyFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ListDeploymentAliasesResponseBody$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListDeploymentAliasesResponseBody' from JSON`);
}
//# sourceMappingURL=listdeploymentaliasesop.js.map