/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { safeParse } from "../lib/schemas.js";
export const Reason = {
    SubscriptionCanceled: "SUBSCRIPTION_CANCELED",
    SubscriptionExpired: "SUBSCRIPTION_EXPIRED",
    UnpaidInvoice: "UNPAID_INVOICE",
    EnterpriseTrialEnded: "ENTERPRISE_TRIAL_ENDED",
    FairUseLimitsExceeded: "FAIR_USE_LIMITS_EXCEEDED",
    BlockedForPlatformAbuse: "BLOCKED_FOR_PLATFORM_ABUSE",
};
export const BlockedDueToOverageType = {
    AnalyticsUsage: "analyticsUsage",
    Artifacts: "artifacts",
    Bandwidth: "bandwidth",
    BlobTotalAdvancedRequests: "blobTotalAdvancedRequests",
    BlobTotalAvgSizeInBytes: "blobTotalAvgSizeInBytes",
    BlobTotalGetResponseObjectSizeInBytes: "blobTotalGetResponseObjectSizeInBytes",
    BlobTotalSimpleRequests: "blobTotalSimpleRequests",
    DataCacheRead: "dataCacheRead",
    DataCacheWrite: "dataCacheWrite",
    EdgeConfigRead: "edgeConfigRead",
    EdgeConfigWrite: "edgeConfigWrite",
    EdgeFunctionExecutionUnits: "edgeFunctionExecutionUnits",
    EdgeMiddlewareInvocations: "edgeMiddlewareInvocations",
    EdgeRequestAdditionalCpuDuration: "edgeRequestAdditionalCpuDuration",
    EdgeRequest: "edgeRequest",
    ElasticConcurrencyBuildSlots: "elasticConcurrencyBuildSlots",
    FastDataTransfer: "fastDataTransfer",
    FastOriginTransfer: "fastOriginTransfer",
    FunctionDuration: "functionDuration",
    FunctionInvocation: "functionInvocation",
    ImageOptimizationCacheRead: "imageOptimizationCacheRead",
    ImageOptimizationCacheWrite: "imageOptimizationCacheWrite",
    ImageOptimizationTransformation: "imageOptimizationTransformation",
    LogDrainsVolume: "logDrainsVolume",
    MonitoringMetric: "monitoringMetric",
    BlobDataTransfer: "blobDataTransfer",
    ObservabilityEvent: "observabilityEvent",
    PostgresComputeTime: "postgresComputeTime",
    PostgresDataStorage: "postgresDataStorage",
    PostgresDataTransfer: "postgresDataTransfer",
    PostgresDatabase: "postgresDatabase",
    PostgresWrittenData: "postgresWrittenData",
    ServerlessFunctionExecution: "serverlessFunctionExecution",
    SourceImages: "sourceImages",
    StorageRedisTotalBandwidthInBytes: "storageRedisTotalBandwidthInBytes",
    StorageRedisTotalCommands: "storageRedisTotalCommands",
    StorageRedisTotalDailyAvgStorageInBytes: "storageRedisTotalDailyAvgStorageInBytes",
    StorageRedisTotalDatabases: "storageRedisTotalDatabases",
    WafOwaspExcessBytes: "wafOwaspExcessBytes",
    WafOwaspRequests: "wafOwaspRequests",
    WafRateLimitRequest: "wafRateLimitRequest",
    WebAnalyticsEvent: "webAnalyticsEvent",
};
/**
 * An object containing infomation related to the amount of platform resources may be allocated to the User account.
 */
export const PurchaseType = {
    Enhanced: "enhanced",
    Ultra: "ultra",
};
export const ViewPreference = {
    List: "list",
    Cards: "cards",
};
export const FavoritesViewPreference = {
    Open: "open",
    Closed: "closed",
};
export const RecentsViewPreference = {
    Open: "open",
    Closed: "closed",
};
export const ImportFlowGitProvider = {
    Github: "github",
    Gitlab: "gitlab",
    Bitbucket: "bitbucket",
    GithubCustomHost: "github-custom-host",
};
/**
 * The user's version. Will always be `northstar`.
 */
export const Version = {
    Northstar: "northstar",
};
/** @internal */
export const Reason$inboundSchema = z
    .nativeEnum(Reason);
/** @internal */
export const Reason$outboundSchema = Reason$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Reason$;
(function (Reason$) {
    /** @deprecated use `Reason$inboundSchema` instead. */
    Reason$.inboundSchema = Reason$inboundSchema;
    /** @deprecated use `Reason$outboundSchema` instead. */
    Reason$.outboundSchema = Reason$outboundSchema;
})(Reason$ || (Reason$ = {}));
/** @internal */
export const BlockedDueToOverageType$inboundSchema = z.nativeEnum(BlockedDueToOverageType);
/** @internal */
export const BlockedDueToOverageType$outboundSchema = BlockedDueToOverageType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var BlockedDueToOverageType$;
(function (BlockedDueToOverageType$) {
    /** @deprecated use `BlockedDueToOverageType$inboundSchema` instead. */
    BlockedDueToOverageType$.inboundSchema = BlockedDueToOverageType$inboundSchema;
    /** @deprecated use `BlockedDueToOverageType$outboundSchema` instead. */
    BlockedDueToOverageType$.outboundSchema = BlockedDueToOverageType$outboundSchema;
})(BlockedDueToOverageType$ || (BlockedDueToOverageType$ = {}));
/** @internal */
export const SoftBlock$inboundSchema = z.object({
    blockedAt: z.number(),
    reason: Reason$inboundSchema,
    blockedDueToOverageType: BlockedDueToOverageType$inboundSchema.optional(),
});
/** @internal */
export const SoftBlock$outboundSchema = z.object({
    blockedAt: z.number(),
    reason: Reason$outboundSchema,
    blockedDueToOverageType: BlockedDueToOverageType$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 SoftBlock$;
(function (SoftBlock$) {
    /** @deprecated use `SoftBlock$inboundSchema` instead. */
    SoftBlock$.inboundSchema = SoftBlock$inboundSchema;
    /** @deprecated use `SoftBlock$outboundSchema` instead. */
    SoftBlock$.outboundSchema = SoftBlock$outboundSchema;
})(SoftBlock$ || (SoftBlock$ = {}));
export function softBlockToJSON(softBlock) {
    return JSON.stringify(SoftBlock$outboundSchema.parse(softBlock));
}
export function softBlockFromJSON(jsonString) {
    return safeParse(jsonString, (x) => SoftBlock$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SoftBlock' from JSON`);
}
/** @internal */
export const Billing$inboundSchema = z.object({});
/** @internal */
export const Billing$outboundSchema = z.object({});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Billing$;
(function (Billing$) {
    /** @deprecated use `Billing$inboundSchema` instead. */
    Billing$.inboundSchema = Billing$inboundSchema;
    /** @deprecated use `Billing$outboundSchema` instead. */
    Billing$.outboundSchema = Billing$outboundSchema;
})(Billing$ || (Billing$ = {}));
export function billingToJSON(billing) {
    return JSON.stringify(Billing$outboundSchema.parse(billing));
}
export function billingFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Billing$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Billing' from JSON`);
}
/** @internal */
export const BuildEntitlements$inboundSchema = z.object({
    enhancedBuilds: z.boolean().optional(),
});
/** @internal */
export const BuildEntitlements$outboundSchema = z.object({
    enhancedBuilds: z.boolean().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var BuildEntitlements$;
(function (BuildEntitlements$) {
    /** @deprecated use `BuildEntitlements$inboundSchema` instead. */
    BuildEntitlements$.inboundSchema = BuildEntitlements$inboundSchema;
    /** @deprecated use `BuildEntitlements$outboundSchema` instead. */
    BuildEntitlements$.outboundSchema = BuildEntitlements$outboundSchema;
})(BuildEntitlements$ || (BuildEntitlements$ = {}));
export function buildEntitlementsToJSON(buildEntitlements) {
    return JSON.stringify(BuildEntitlements$outboundSchema.parse(buildEntitlements));
}
export function buildEntitlementsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => BuildEntitlements$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BuildEntitlements' from JSON`);
}
/** @internal */
export const PurchaseType$inboundSchema = z.nativeEnum(PurchaseType);
/** @internal */
export const PurchaseType$outboundSchema = PurchaseType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PurchaseType$;
(function (PurchaseType$) {
    /** @deprecated use `PurchaseType$inboundSchema` instead. */
    PurchaseType$.inboundSchema = PurchaseType$inboundSchema;
    /** @deprecated use `PurchaseType$outboundSchema` instead. */
    PurchaseType$.outboundSchema = PurchaseType$outboundSchema;
})(PurchaseType$ || (PurchaseType$ = {}));
/** @internal */
export const BuildMachine$inboundSchema = z.object({
    purchaseType: PurchaseType$inboundSchema.optional(),
    isDefaultBuildMachine: z.boolean().optional(),
    cores: z.number().optional(),
    memory: z.number().optional(),
});
/** @internal */
export const BuildMachine$outboundSchema = z.object({
    purchaseType: PurchaseType$outboundSchema.optional(),
    isDefaultBuildMachine: z.boolean().optional(),
    cores: z.number().optional(),
    memory: z.number().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var BuildMachine$;
(function (BuildMachine$) {
    /** @deprecated use `BuildMachine$inboundSchema` instead. */
    BuildMachine$.inboundSchema = BuildMachine$inboundSchema;
    /** @deprecated use `BuildMachine$outboundSchema` instead. */
    BuildMachine$.outboundSchema = BuildMachine$outboundSchema;
})(BuildMachine$ || (BuildMachine$ = {}));
export function buildMachineToJSON(buildMachine) {
    return JSON.stringify(BuildMachine$outboundSchema.parse(buildMachine));
}
export function buildMachineFromJSON(jsonString) {
    return safeParse(jsonString, (x) => BuildMachine$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BuildMachine' from JSON`);
}
/** @internal */
export const ResourceConfig$inboundSchema = z.object({
    nodeType: z.string().optional(),
    concurrentBuilds: z.number().optional(),
    buildEntitlements: z.lazy(() => BuildEntitlements$inboundSchema).optional(),
    awsAccountType: z.string().optional(),
    awsAccountIds: z.array(z.string()).optional(),
    cfZoneName: z.string().optional(),
    imageOptimizationType: z.string().optional(),
    edgeConfigs: z.number().optional(),
    edgeConfigSize: z.number().optional(),
    edgeFunctionMaxSizeBytes: z.number().optional(),
    edgeFunctionExecutionTimeoutMs: z.number().optional(),
    serverlessFunctionDefaultMaxExecutionTime: z.number().optional(),
    serverlessFunctionMaxMemorySize: z.number().optional(),
    kvDatabases: z.number().optional(),
    postgresDatabases: z.number().optional(),
    blobStores: z.number().optional(),
    integrationStores: z.number().optional(),
    cronJobs: z.number().optional(),
    cronJobsPerProject: z.number().optional(),
    microfrontendGroupsPerTeam: z.number().optional(),
    microfrontendProjectsPerGroup: z.number().optional(),
    flagsExplorerOverridesThreshold: z.number().optional(),
    flagsExplorerUnlimitedOverrides: z.boolean().optional(),
    customEnvironmentsPerProject: z.number().optional(),
    buildMachine: z.lazy(() => BuildMachine$inboundSchema).optional(),
});
/** @internal */
export const ResourceConfig$outboundSchema = z.object({
    nodeType: z.string().optional(),
    concurrentBuilds: z.number().optional(),
    buildEntitlements: z.lazy(() => BuildEntitlements$outboundSchema).optional(),
    awsAccountType: z.string().optional(),
    awsAccountIds: z.array(z.string()).optional(),
    cfZoneName: z.string().optional(),
    imageOptimizationType: z.string().optional(),
    edgeConfigs: z.number().optional(),
    edgeConfigSize: z.number().optional(),
    edgeFunctionMaxSizeBytes: z.number().optional(),
    edgeFunctionExecutionTimeoutMs: z.number().optional(),
    serverlessFunctionDefaultMaxExecutionTime: z.number().optional(),
    serverlessFunctionMaxMemorySize: z.number().optional(),
    kvDatabases: z.number().optional(),
    postgresDatabases: z.number().optional(),
    blobStores: z.number().optional(),
    integrationStores: z.number().optional(),
    cronJobs: z.number().optional(),
    cronJobsPerProject: z.number().optional(),
    microfrontendGroupsPerTeam: z.number().optional(),
    microfrontendProjectsPerGroup: z.number().optional(),
    flagsExplorerOverridesThreshold: z.number().optional(),
    flagsExplorerUnlimitedOverrides: z.boolean().optional(),
    customEnvironmentsPerProject: z.number().optional(),
    buildMachine: z.lazy(() => BuildMachine$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 ResourceConfig$;
(function (ResourceConfig$) {
    /** @deprecated use `ResourceConfig$inboundSchema` instead. */
    ResourceConfig$.inboundSchema = ResourceConfig$inboundSchema;
    /** @deprecated use `ResourceConfig$outboundSchema` instead. */
    ResourceConfig$.outboundSchema = ResourceConfig$outboundSchema;
})(ResourceConfig$ || (ResourceConfig$ = {}));
export function resourceConfigToJSON(resourceConfig) {
    return JSON.stringify(ResourceConfig$outboundSchema.parse(resourceConfig));
}
export function resourceConfigFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ResourceConfig$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResourceConfig' from JSON`);
}
/** @internal */
export const ViewPreference$inboundSchema = z.nativeEnum(ViewPreference);
/** @internal */
export const ViewPreference$outboundSchema = ViewPreference$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ViewPreference$;
(function (ViewPreference$) {
    /** @deprecated use `ViewPreference$inboundSchema` instead. */
    ViewPreference$.inboundSchema = ViewPreference$inboundSchema;
    /** @deprecated use `ViewPreference$outboundSchema` instead. */
    ViewPreference$.outboundSchema = ViewPreference$outboundSchema;
})(ViewPreference$ || (ViewPreference$ = {}));
/** @internal */
export const FavoritesViewPreference$inboundSchema = z.nativeEnum(FavoritesViewPreference);
/** @internal */
export const FavoritesViewPreference$outboundSchema = FavoritesViewPreference$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var FavoritesViewPreference$;
(function (FavoritesViewPreference$) {
    /** @deprecated use `FavoritesViewPreference$inboundSchema` instead. */
    FavoritesViewPreference$.inboundSchema = FavoritesViewPreference$inboundSchema;
    /** @deprecated use `FavoritesViewPreference$outboundSchema` instead. */
    FavoritesViewPreference$.outboundSchema = FavoritesViewPreference$outboundSchema;
})(FavoritesViewPreference$ || (FavoritesViewPreference$ = {}));
/** @internal */
export const RecentsViewPreference$inboundSchema = z.nativeEnum(RecentsViewPreference);
/** @internal */
export const RecentsViewPreference$outboundSchema = RecentsViewPreference$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var RecentsViewPreference$;
(function (RecentsViewPreference$) {
    /** @deprecated use `RecentsViewPreference$inboundSchema` instead. */
    RecentsViewPreference$.inboundSchema = RecentsViewPreference$inboundSchema;
    /** @deprecated use `RecentsViewPreference$outboundSchema` instead. */
    RecentsViewPreference$.outboundSchema = RecentsViewPreference$outboundSchema;
})(RecentsViewPreference$ || (RecentsViewPreference$ = {}));
/** @internal */
export const ActiveDashboardViews$inboundSchema = z.object({
    scopeId: z.string(),
    viewPreference: z.nullable(ViewPreference$inboundSchema).optional(),
    favoritesViewPreference: z.nullable(FavoritesViewPreference$inboundSchema)
        .optional(),
    recentsViewPreference: z.nullable(RecentsViewPreference$inboundSchema)
        .optional(),
});
/** @internal */
export const ActiveDashboardViews$outboundSchema = z.object({
    scopeId: z.string(),
    viewPreference: z.nullable(ViewPreference$outboundSchema).optional(),
    favoritesViewPreference: z.nullable(FavoritesViewPreference$outboundSchema)
        .optional(),
    recentsViewPreference: z.nullable(RecentsViewPreference$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 ActiveDashboardViews$;
(function (ActiveDashboardViews$) {
    /** @deprecated use `ActiveDashboardViews$inboundSchema` instead. */
    ActiveDashboardViews$.inboundSchema = ActiveDashboardViews$inboundSchema;
    /** @deprecated use `ActiveDashboardViews$outboundSchema` instead. */
    ActiveDashboardViews$.outboundSchema = ActiveDashboardViews$outboundSchema;
})(ActiveDashboardViews$ || (ActiveDashboardViews$ = {}));
export function activeDashboardViewsToJSON(activeDashboardViews) {
    return JSON.stringify(ActiveDashboardViews$outboundSchema.parse(activeDashboardViews));
}
export function activeDashboardViewsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ActiveDashboardViews$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ActiveDashboardViews' from JSON`);
}
/** @internal */
export const ImportFlowGitNamespace$inboundSchema = z.union([z.string(), z.number()]);
/** @internal */
export const ImportFlowGitNamespace$outboundSchema = z.union([z.string(), z.number()]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ImportFlowGitNamespace$;
(function (ImportFlowGitNamespace$) {
    /** @deprecated use `ImportFlowGitNamespace$inboundSchema` instead. */
    ImportFlowGitNamespace$.inboundSchema = ImportFlowGitNamespace$inboundSchema;
    /** @deprecated use `ImportFlowGitNamespace$outboundSchema` instead. */
    ImportFlowGitNamespace$.outboundSchema = ImportFlowGitNamespace$outboundSchema;
})(ImportFlowGitNamespace$ || (ImportFlowGitNamespace$ = {}));
export function importFlowGitNamespaceToJSON(importFlowGitNamespace) {
    return JSON.stringify(ImportFlowGitNamespace$outboundSchema.parse(importFlowGitNamespace));
}
export function importFlowGitNamespaceFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ImportFlowGitNamespace$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImportFlowGitNamespace' from JSON`);
}
/** @internal */
export const ImportFlowGitNamespaceId$inboundSchema = z.union([z.string(), z.number()]);
/** @internal */
export const ImportFlowGitNamespaceId$outboundSchema = z.union([z.string(), z.number()]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ImportFlowGitNamespaceId$;
(function (ImportFlowGitNamespaceId$) {
    /** @deprecated use `ImportFlowGitNamespaceId$inboundSchema` instead. */
    ImportFlowGitNamespaceId$.inboundSchema = ImportFlowGitNamespaceId$inboundSchema;
    /** @deprecated use `ImportFlowGitNamespaceId$outboundSchema` instead. */
    ImportFlowGitNamespaceId$.outboundSchema = ImportFlowGitNamespaceId$outboundSchema;
})(ImportFlowGitNamespaceId$ || (ImportFlowGitNamespaceId$ = {}));
export function importFlowGitNamespaceIdToJSON(importFlowGitNamespaceId) {
    return JSON.stringify(ImportFlowGitNamespaceId$outboundSchema.parse(importFlowGitNamespaceId));
}
export function importFlowGitNamespaceIdFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ImportFlowGitNamespaceId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ImportFlowGitNamespaceId' from JSON`);
}
/** @internal */
export const ImportFlowGitProvider$inboundSchema = z.nativeEnum(ImportFlowGitProvider);
/** @internal */
export const ImportFlowGitProvider$outboundSchema = ImportFlowGitProvider$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ImportFlowGitProvider$;
(function (ImportFlowGitProvider$) {
    /** @deprecated use `ImportFlowGitProvider$inboundSchema` instead. */
    ImportFlowGitProvider$.inboundSchema = ImportFlowGitProvider$inboundSchema;
    /** @deprecated use `ImportFlowGitProvider$outboundSchema` instead. */
    ImportFlowGitProvider$.outboundSchema = ImportFlowGitProvider$outboundSchema;
})(ImportFlowGitProvider$ || (ImportFlowGitProvider$ = {}));
/** @internal */
export const GitNamespaceId$inboundSchema = z.union([z.string(), z.number()]);
/** @internal */
export const GitNamespaceId$outboundSchema = z.union([z.string(), z.number()]);
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var GitNamespaceId$;
(function (GitNamespaceId$) {
    /** @deprecated use `GitNamespaceId$inboundSchema` instead. */
    GitNamespaceId$.inboundSchema = GitNamespaceId$inboundSchema;
    /** @deprecated use `GitNamespaceId$outboundSchema` instead. */
    GitNamespaceId$.outboundSchema = GitNamespaceId$outboundSchema;
})(GitNamespaceId$ || (GitNamespaceId$ = {}));
export function gitNamespaceIdToJSON(gitNamespaceId) {
    return JSON.stringify(GitNamespaceId$outboundSchema.parse(gitNamespaceId));
}
export function gitNamespaceIdFromJSON(jsonString) {
    return safeParse(jsonString, (x) => GitNamespaceId$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GitNamespaceId' from JSON`);
}
/** @internal */
export const PreferredScopesAndGitNamespaces$inboundSchema = z.object({
    scopeId: z.string(),
    gitNamespaceId: z.nullable(z.union([z.string(), z.number()])),
});
/** @internal */
export const PreferredScopesAndGitNamespaces$outboundSchema = z.object({
    scopeId: z.string(),
    gitNamespaceId: z.nullable(z.union([z.string(), z.number()])),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var PreferredScopesAndGitNamespaces$;
(function (PreferredScopesAndGitNamespaces$) {
    /** @deprecated use `PreferredScopesAndGitNamespaces$inboundSchema` instead. */
    PreferredScopesAndGitNamespaces$.inboundSchema = PreferredScopesAndGitNamespaces$inboundSchema;
    /** @deprecated use `PreferredScopesAndGitNamespaces$outboundSchema` instead. */
    PreferredScopesAndGitNamespaces$.outboundSchema = PreferredScopesAndGitNamespaces$outboundSchema;
})(PreferredScopesAndGitNamespaces$ || (PreferredScopesAndGitNamespaces$ = {}));
export function preferredScopesAndGitNamespacesToJSON(preferredScopesAndGitNamespaces) {
    return JSON.stringify(PreferredScopesAndGitNamespaces$outboundSchema.parse(preferredScopesAndGitNamespaces));
}
export function preferredScopesAndGitNamespacesFromJSON(jsonString) {
    return safeParse(jsonString, (x) => PreferredScopesAndGitNamespaces$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PreferredScopesAndGitNamespaces' from JSON`);
}
/** @internal */
export const Dismissals$inboundSchema = z.object({
    scopeId: z.string(),
    createdAt: z.number(),
});
/** @internal */
export const Dismissals$outboundSchema = z.object({
    scopeId: z.string(),
    createdAt: z.number(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Dismissals$;
(function (Dismissals$) {
    /** @deprecated use `Dismissals$inboundSchema` instead. */
    Dismissals$.inboundSchema = Dismissals$inboundSchema;
    /** @deprecated use `Dismissals$outboundSchema` instead. */
    Dismissals$.outboundSchema = Dismissals$outboundSchema;
})(Dismissals$ || (Dismissals$ = {}));
export function dismissalsToJSON(dismissals) {
    return JSON.stringify(Dismissals$outboundSchema.parse(dismissals));
}
export function dismissalsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => Dismissals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Dismissals' from JSON`);
}
/** @internal */
export const DismissedToasts$inboundSchema = z.object({
    name: z.string(),
    dismissals: z.array(z.lazy(() => Dismissals$inboundSchema)),
});
/** @internal */
export const DismissedToasts$outboundSchema = z.object({
    name: z.string(),
    dismissals: z.array(z.lazy(() => Dismissals$outboundSchema)),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var DismissedToasts$;
(function (DismissedToasts$) {
    /** @deprecated use `DismissedToasts$inboundSchema` instead. */
    DismissedToasts$.inboundSchema = DismissedToasts$inboundSchema;
    /** @deprecated use `DismissedToasts$outboundSchema` instead. */
    DismissedToasts$.outboundSchema = DismissedToasts$outboundSchema;
})(DismissedToasts$ || (DismissedToasts$ = {}));
export function dismissedToastsToJSON(dismissedToasts) {
    return JSON.stringify(DismissedToasts$outboundSchema.parse(dismissedToasts));
}
export function dismissedToastsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => DismissedToasts$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DismissedToasts' from JSON`);
}
/** @internal */
export const FavoriteProjectsAndSpaces$inboundSchema = z.object({
    teamId: z.string(),
    projectId: z.string(),
});
/** @internal */
export const FavoriteProjectsAndSpaces$outboundSchema = z.object({
    teamId: z.string(),
    projectId: z.string(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var FavoriteProjectsAndSpaces$;
(function (FavoriteProjectsAndSpaces$) {
    /** @deprecated use `FavoriteProjectsAndSpaces$inboundSchema` instead. */
    FavoriteProjectsAndSpaces$.inboundSchema = FavoriteProjectsAndSpaces$inboundSchema;
    /** @deprecated use `FavoriteProjectsAndSpaces$outboundSchema` instead. */
    FavoriteProjectsAndSpaces$.outboundSchema = FavoriteProjectsAndSpaces$outboundSchema;
})(FavoriteProjectsAndSpaces$ || (FavoriteProjectsAndSpaces$ = {}));
export function favoriteProjectsAndSpacesToJSON(favoriteProjectsAndSpaces) {
    return JSON.stringify(FavoriteProjectsAndSpaces$outboundSchema.parse(favoriteProjectsAndSpaces));
}
export function favoriteProjectsAndSpacesFromJSON(jsonString) {
    return safeParse(jsonString, (x) => FavoriteProjectsAndSpaces$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FavoriteProjectsAndSpaces' from JSON`);
}
/** @internal */
export const RemoteCaching$inboundSchema = z.object({
    enabled: z.boolean().optional(),
});
/** @internal */
export const RemoteCaching$outboundSchema = z.object({
    enabled: z.boolean().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var RemoteCaching$;
(function (RemoteCaching$) {
    /** @deprecated use `RemoteCaching$inboundSchema` instead. */
    RemoteCaching$.inboundSchema = RemoteCaching$inboundSchema;
    /** @deprecated use `RemoteCaching$outboundSchema` instead. */
    RemoteCaching$.outboundSchema = RemoteCaching$outboundSchema;
})(RemoteCaching$ || (RemoteCaching$ = {}));
export function remoteCachingToJSON(remoteCaching) {
    return JSON.stringify(RemoteCaching$outboundSchema.parse(remoteCaching));
}
export function remoteCachingFromJSON(jsonString) {
    return safeParse(jsonString, (x) => RemoteCaching$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RemoteCaching' from JSON`);
}
/** @internal */
export const DataCache$inboundSchema = z.object({
    excessBillingEnabled: z.boolean().optional(),
});
/** @internal */
export const DataCache$outboundSchema = z.object({
    excessBillingEnabled: z.boolean().optional(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var DataCache$;
(function (DataCache$) {
    /** @deprecated use `DataCache$inboundSchema` instead. */
    DataCache$.inboundSchema = DataCache$inboundSchema;
    /** @deprecated use `DataCache$outboundSchema` instead. */
    DataCache$.outboundSchema = DataCache$outboundSchema;
})(DataCache$ || (DataCache$ = {}));
export function dataCacheToJSON(dataCache) {
    return JSON.stringify(DataCache$outboundSchema.parse(dataCache));
}
export function dataCacheFromJSON(jsonString) {
    return safeParse(jsonString, (x) => DataCache$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DataCache' from JSON`);
}
/** @internal */
export const WebAnalytics$inboundSchema = z.object({
    blockedFrom: z.number().optional(),
    blockedUntil: z.number().optional(),
    isCurrentlyBlocked: z.boolean(),
});
/** @internal */
export const WebAnalytics$outboundSchema = z.object({
    blockedFrom: z.number().optional(),
    blockedUntil: z.number().optional(),
    isCurrentlyBlocked: z.boolean(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var WebAnalytics$;
(function (WebAnalytics$) {
    /** @deprecated use `WebAnalytics$inboundSchema` instead. */
    WebAnalytics$.inboundSchema = WebAnalytics$inboundSchema;
    /** @deprecated use `WebAnalytics$outboundSchema` instead. */
    WebAnalytics$.outboundSchema = WebAnalytics$outboundSchema;
})(WebAnalytics$ || (WebAnalytics$ = {}));
export function webAnalyticsToJSON(webAnalytics) {
    return JSON.stringify(WebAnalytics$outboundSchema.parse(webAnalytics));
}
export function webAnalyticsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => WebAnalytics$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'WebAnalytics' from JSON`);
}
/** @internal */
export const FeatureBlocks$inboundSchema = z.object({
    webAnalytics: z.lazy(() => WebAnalytics$inboundSchema).optional(),
});
/** @internal */
export const FeatureBlocks$outboundSchema = z.object({
    webAnalytics: z.lazy(() => WebAnalytics$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 FeatureBlocks$;
(function (FeatureBlocks$) {
    /** @deprecated use `FeatureBlocks$inboundSchema` instead. */
    FeatureBlocks$.inboundSchema = FeatureBlocks$inboundSchema;
    /** @deprecated use `FeatureBlocks$outboundSchema` instead. */
    FeatureBlocks$.outboundSchema = FeatureBlocks$outboundSchema;
})(FeatureBlocks$ || (FeatureBlocks$ = {}));
export function featureBlocksToJSON(featureBlocks) {
    return JSON.stringify(FeatureBlocks$outboundSchema.parse(featureBlocks));
}
export function featureBlocksFromJSON(jsonString) {
    return safeParse(jsonString, (x) => FeatureBlocks$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FeatureBlocks' from JSON`);
}
/** @internal */
export const NorthstarMigration$inboundSchema = z.object({
    teamId: z.string(),
    projects: z.number(),
    stores: z.number(),
    integrationConfigurations: z.number(),
    integrationClients: z.number(),
    startTime: z.number(),
    endTime: z.number(),
});
/** @internal */
export const NorthstarMigration$outboundSchema = z.object({
    teamId: z.string(),
    projects: z.number(),
    stores: z.number(),
    integrationConfigurations: z.number(),
    integrationClients: z.number(),
    startTime: z.number(),
    endTime: z.number(),
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var NorthstarMigration$;
(function (NorthstarMigration$) {
    /** @deprecated use `NorthstarMigration$inboundSchema` instead. */
    NorthstarMigration$.inboundSchema = NorthstarMigration$inboundSchema;
    /** @deprecated use `NorthstarMigration$outboundSchema` instead. */
    NorthstarMigration$.outboundSchema = NorthstarMigration$outboundSchema;
})(NorthstarMigration$ || (NorthstarMigration$ = {}));
export function northstarMigrationToJSON(northstarMigration) {
    return JSON.stringify(NorthstarMigration$outboundSchema.parse(northstarMigration));
}
export function northstarMigrationFromJSON(jsonString) {
    return safeParse(jsonString, (x) => NorthstarMigration$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'NorthstarMigration' from JSON`);
}
/** @internal */
export const Version$inboundSchema = z
    .nativeEnum(Version);
/** @internal */
export const Version$outboundSchema = Version$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var Version$;
(function (Version$) {
    /** @deprecated use `Version$inboundSchema` instead. */
    Version$.inboundSchema = Version$inboundSchema;
    /** @deprecated use `Version$outboundSchema` instead. */
    Version$.outboundSchema = Version$outboundSchema;
})(Version$ || (Version$ = {}));
/** @internal */
export const AuthUser$inboundSchema = z.object({
    createdAt: z.number(),
    softBlock: z.nullable(z.lazy(() => SoftBlock$inboundSchema)),
    billing: z.nullable(z.lazy(() => Billing$inboundSchema)),
    resourceConfig: z.lazy(() => ResourceConfig$inboundSchema),
    stagingPrefix: z.string(),
    activeDashboardViews: z.array(z.lazy(() => ActiveDashboardViews$inboundSchema)).optional(),
    importFlowGitNamespace: z.nullable(z.union([z.string(), z.number()]))
        .optional(),
    importFlowGitNamespaceId: z.nullable(z.union([z.string(), z.number()]))
        .optional(),
    importFlowGitProvider: z.nullable(ImportFlowGitProvider$inboundSchema)
        .optional(),
    preferredScopesAndGitNamespaces: z.array(z.lazy(() => PreferredScopesAndGitNamespaces$inboundSchema)).optional(),
    dismissedToasts: z.array(z.lazy(() => DismissedToasts$inboundSchema))
        .optional(),
    favoriteProjectsAndSpaces: z.array(z.lazy(() => FavoriteProjectsAndSpaces$inboundSchema)).optional(),
    hasTrialAvailable: z.boolean(),
    remoteCaching: z.lazy(() => RemoteCaching$inboundSchema).optional(),
    dataCache: z.lazy(() => DataCache$inboundSchema).optional(),
    featureBlocks: z.lazy(() => FeatureBlocks$inboundSchema).optional(),
    northstarMigration: z.lazy(() => NorthstarMigration$inboundSchema).optional(),
    id: z.string(),
    email: z.string(),
    name: z.nullable(z.string()),
    username: z.string(),
    avatar: z.nullable(z.string()),
    defaultTeamId: z.nullable(z.string()),
    version: Version$inboundSchema,
});
/** @internal */
export const AuthUser$outboundSchema = z.object({
    createdAt: z.number(),
    softBlock: z.nullable(z.lazy(() => SoftBlock$outboundSchema)),
    billing: z.nullable(z.lazy(() => Billing$outboundSchema)),
    resourceConfig: z.lazy(() => ResourceConfig$outboundSchema),
    stagingPrefix: z.string(),
    activeDashboardViews: z.array(z.lazy(() => ActiveDashboardViews$outboundSchema)).optional(),
    importFlowGitNamespace: z.nullable(z.union([z.string(), z.number()]))
        .optional(),
    importFlowGitNamespaceId: z.nullable(z.union([z.string(), z.number()]))
        .optional(),
    importFlowGitProvider: z.nullable(ImportFlowGitProvider$outboundSchema)
        .optional(),
    preferredScopesAndGitNamespaces: z.array(z.lazy(() => PreferredScopesAndGitNamespaces$outboundSchema)).optional(),
    dismissedToasts: z.array(z.lazy(() => DismissedToasts$outboundSchema))
        .optional(),
    favoriteProjectsAndSpaces: z.array(z.lazy(() => FavoriteProjectsAndSpaces$outboundSchema)).optional(),
    hasTrialAvailable: z.boolean(),
    remoteCaching: z.lazy(() => RemoteCaching$outboundSchema).optional(),
    dataCache: z.lazy(() => DataCache$outboundSchema).optional(),
    featureBlocks: z.lazy(() => FeatureBlocks$outboundSchema).optional(),
    northstarMigration: z.lazy(() => NorthstarMigration$outboundSchema)
        .optional(),
    id: z.string(),
    email: z.string(),
    name: z.nullable(z.string()),
    username: z.string(),
    avatar: z.nullable(z.string()),
    defaultTeamId: z.nullable(z.string()),
    version: Version$outboundSchema,
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var AuthUser$;
(function (AuthUser$) {
    /** @deprecated use `AuthUser$inboundSchema` instead. */
    AuthUser$.inboundSchema = AuthUser$inboundSchema;
    /** @deprecated use `AuthUser$outboundSchema` instead. */
    AuthUser$.outboundSchema = AuthUser$outboundSchema;
})(AuthUser$ || (AuthUser$ = {}));
export function authUserToJSON(authUser) {
    return JSON.stringify(AuthUser$outboundSchema.parse(authUser));
}
export function authUserFromJSON(jsonString) {
    return safeParse(jsonString, (x) => AuthUser$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AuthUser' from JSON`);
}
//# sourceMappingURL=authuser.js.map