UNPKG

@vercel/sdk

Version:

<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>

3,524 lines 118 kB
/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */

import * as z from "zod/v3";
import { remap as remap$ } from "../lib/primitives.js";
import { safeParse } from "../lib/schemas.js";
import { ClosedEnum } from "../types/enums.js";
import { Result as SafeParseResult } from "../types/fp.js";
import * as types from "../types/primitives.js";
import { smartUnion } from "../types/smartUnion.js";
import {
  GetMicrofrontendsInGroupAnalytics,
  GetMicrofrontendsInGroupAnalytics$inboundSchema,
  GetMicrofrontendsInGroupConnectConfigurations,
  GetMicrofrontendsInGroupConnectConfigurations$inboundSchema,
  GetMicrofrontendsInGroupCrons,
  GetMicrofrontendsInGroupCrons$inboundSchema,
  GetMicrofrontendsInGroupCustomEnvironments,
  GetMicrofrontendsInGroupCustomEnvironments$inboundSchema,
  GetMicrofrontendsInGroupDataCache,
  GetMicrofrontendsInGroupDataCache$inboundSchema,
  GetMicrofrontendsInGroupDefaultResourceConfig,
  GetMicrofrontendsInGroupDefaultResourceConfig$inboundSchema,
  GetMicrofrontendsInGroupDeploymentExpiration,
  GetMicrofrontendsInGroupDeploymentExpiration$inboundSchema,
  GetMicrofrontendsInGroupEnv,
  GetMicrofrontendsInGroupEnv$inboundSchema,
  GetMicrofrontendsInGroupExpiration,
  GetMicrofrontendsInGroupExpiration$inboundSchema,
  GetMicrofrontendsInGroupFramework,
  GetMicrofrontendsInGroupFramework$inboundSchema,
  GetMicrofrontendsInGroupFrom,
  GetMicrofrontendsInGroupFrom$inboundSchema,
  GetMicrofrontendsInGroupIpBuckets,
  GetMicrofrontendsInGroupIpBuckets$inboundSchema,
  GetMicrofrontendsInGroupJobs,
  GetMicrofrontendsInGroupJobs$inboundSchema,
  GetMicrofrontendsInGroupLastAliasRequest,
  GetMicrofrontendsInGroupLastAliasRequest$inboundSchema,
  GetMicrofrontendsInGroupLastRollbackTarget,
  GetMicrofrontendsInGroupLastRollbackTarget$inboundSchema,
  GetMicrofrontendsInGroupLatestDeployments,
  GetMicrofrontendsInGroupLatestDeployments$inboundSchema,
  GetMicrofrontendsInGroupLink,
  GetMicrofrontendsInGroupLink$inboundSchema,
  GetMicrofrontendsInGroupMicrofrontends,
  GetMicrofrontendsInGroupMicrofrontends$inboundSchema,
  GetMicrofrontendsInGroupNodeVersion,
  GetMicrofrontendsInGroupNodeVersion$inboundSchema,
  GetMicrofrontendsInGroupOptionsAllowlist,
  GetMicrofrontendsInGroupOptionsAllowlist$inboundSchema,
  GetMicrofrontendsInGroupPassport,
  GetMicrofrontendsInGroupPassport$inboundSchema,
  GetMicrofrontendsInGroupPasswordProtection,
  GetMicrofrontendsInGroupPasswordProtection$inboundSchema,
  GetMicrofrontendsInGroupPermissions,
  GetMicrofrontendsInGroupPermissions$inboundSchema,
  GetMicrofrontendsInGroupProtectionBypass,
  GetMicrofrontendsInGroupProtectionBypass$inboundSchema,
  GetMicrofrontendsInGroupProtectionConfig,
  GetMicrofrontendsInGroupProtectionConfig$inboundSchema,
  GetMicrofrontendsInGroupResourceConfig,
  GetMicrofrontendsInGroupResourceConfig$inboundSchema,
  GetMicrofrontendsInGroupRollbackDescription,
  GetMicrofrontendsInGroupRollbackDescription$inboundSchema,
  GetMicrofrontendsInGroupRollingRelease,
  GetMicrofrontendsInGroupRollingRelease$inboundSchema,
  GetMicrofrontendsInGroupServices,
  GetMicrofrontendsInGroupServices$inboundSchema,
  GetMicrofrontendsInGroupSpeedInsights,
  GetMicrofrontendsInGroupSpeedInsights$inboundSchema,
  GetMicrofrontendsInGroupSsoProtection,
  GetMicrofrontendsInGroupSsoProtection$inboundSchema,
  GetMicrofrontendsInGroupStaticIps,
  GetMicrofrontendsInGroupStaticIps$inboundSchema,
  GetMicrofrontendsInGroupTargets,
  GetMicrofrontendsInGroupTargets$inboundSchema,
  GetMicrofrontendsInGroupToMicrofrontends2,
  GetMicrofrontendsInGroupToMicrofrontends2$inboundSchema,
  GetMicrofrontendsInGroupTrustedIps,
  GetMicrofrontendsInGroupTrustedIps$inboundSchema,
} from "./getmicrofrontendsingrouptomicrofrontends2.js";
import { SDKValidationError } from "./sdkvalidationerror.js";

export const GetMicrofrontendsInGroupToMicrofrontendsResponse200Preset = {
  AllCustom: "all-custom",
} as const;
export type GetMicrofrontendsInGroupToMicrofrontendsResponse200Preset =
  ClosedEnum<typeof GetMicrofrontendsInGroupToMicrofrontendsResponse200Preset>;

/**
 * The target envs on the current project that may be accessed.
 */
export type GetMicrofrontendsInGroupToMicrofrontends1 = {
  /**
   * System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
   */
  slugs: Array<string>;
  preset?:
    | GetMicrofrontendsInGroupToMicrofrontendsResponse200Preset
    | undefined;
};

export type GetMicrofrontendsInGroupMicrofrontendsTo =
  | GetMicrofrontendsInGroupToMicrofrontends1
  | GetMicrofrontendsInGroupToMicrofrontends2;

/**
 * Optional overrides for the default same-env-by-slug matching. Provide explicit rules to allow cross-env access or presets.
 */
export type GetMicrofrontendsInGroupCustomAllow = {
  from: GetMicrofrontendsInGroupFrom;
  to:
    | GetMicrofrontendsInGroupToMicrofrontends1
    | GetMicrofrontendsInGroupToMicrofrontends2;
};

export type GetMicrofrontendsInGroupMicrofrontendsProjects = {
  label?: string | undefined;
  /**
   * Optional overrides for the default same-env-by-slug matching. Provide explicit rules to allow cross-env access or presets.
   */
  customAllow?: Array<GetMicrofrontendsInGroupCustomAllow> | undefined;
};

export const GetMicrofrontendsInGroupToMicrofrontendsPreset = {
  AllCustom: "all-custom",
} as const;
export type GetMicrofrontendsInGroupToMicrofrontendsPreset = ClosedEnum<
  typeof GetMicrofrontendsInGroupToMicrofrontendsPreset
>;

/**
 * The target envs on the current project that may be accessed.
 */
export type GetMicrofrontendsInGroupTo2 = {
  /**
   * System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
   */
  slugs?: Array<string> | undefined;
  preset: GetMicrofrontendsInGroupToMicrofrontendsPreset;
};

export const GetMicrofrontendsInGroupToPreset = {
  AllCustom: "all-custom",
} as const;
export type GetMicrofrontendsInGroupToPreset = ClosedEnum<
  typeof GetMicrofrontendsInGroupToPreset
>;

/**
 * The target envs on the current project that may be accessed.
 */
export type GetMicrofrontendsInGroupTo1 = {
  /**
   * System environment slugs (`production`, `preview`) and/or custom environment slugs defined on the referenced project.
   */
  slugs: Array<string>;
  preset?: GetMicrofrontendsInGroupToPreset | undefined;
};

export type GetMicrofrontendsInGroupTo =
  | GetMicrofrontendsInGroupTo1
  | GetMicrofrontendsInGroupTo2;

export type GetMicrofrontendsInGroupOidcProviders = {
  to: GetMicrofrontendsInGroupTo1 | GetMicrofrontendsInGroupTo2;
  label?: string | undefined;
  claims: { [k: string]: Array<string> };
};

export type GetMicrofrontendsInGroupTrustedSources = {
  projects?:
    | { [k: string]: GetMicrofrontendsInGroupMicrofrontendsProjects }
    | undefined;
  oidcProviders?:
    | { [k: string]: Array<GetMicrofrontendsInGroupOidcProviders> }
    | undefined;
};

export type GetMicrofrontendsInGroupGitComments = {
  /**
   * Whether the Vercel bot should comment on PRs
   */
  onPullRequest: boolean;
  /**
   * Whether the Vercel bot should comment on commits
   */
  onCommit: boolean;
};

/**
 * Whether the Vercel bot should automatically create GitHub deployments https://docs.github.com/en/rest/deployments/deployments#about-deployments NOTE: repository-dispatch events should be used instead
 */
export const GetMicrofrontendsInGroupCreateDeployments = {
  Disabled: "disabled",
  Enabled: "enabled",
} as const;
/**
 * Whether the Vercel bot should automatically create GitHub deployments https://docs.github.com/en/rest/deployments/deployments#about-deployments NOTE: repository-dispatch events should be used instead
 */
export type GetMicrofrontendsInGroupCreateDeployments = ClosedEnum<
  typeof GetMicrofrontendsInGroupCreateDeployments
>;

/**
 * Configuration for consolidated git commit status reporting. When enabled, Vercel will post a single consolidated commit status instead of individual statuses for each deployment.
 */
export type GetMicrofrontendsInGroupConsolidatedGitCommitStatus = {
  /**
   * Whether consolidated commit status is enabled.
   */
  enabled: boolean;
  /**
   * Whether to propagate individual deployment failures to the consolidated status.
   */
  propagateFailures: boolean;
};

export type GetMicrofrontendsInGroupGitProviderOptions = {
  /**
   * Whether the Vercel bot should automatically create GitHub deployments https://docs.github.com/en/rest/deployments/deployments#about-deployments NOTE: repository-dispatch events should be used instead
   */
  createDeployments: GetMicrofrontendsInGroupCreateDeployments;
  /**
   * Whether the Vercel bot should not automatically create GitHub repository-dispatch events on deployment events. https://vercel.com/docs/git/vercel-for-github#repository-dispatch-events - `true`: disable repository-dispatch events for this project (explicit override of the team setting). - `false`: enable repository-dispatch events for this project (explicit override of the team setting). - absent: inherit from `team.disableRepositoryDispatchEvents`.
   */
  disableRepositoryDispatchEvents?: boolean | undefined;
  /**
   * Whether the project requires commits to be signed & verified before deployments will be created. - `true`: require verified commits for this project (explicit override of the team setting). - `false`: do not require verified commits (explicit override of the team setting). - absent: inherit from `team.requireVerifiedCommits`.
   */
  requireVerifiedCommits?: boolean | undefined;
  /**
   * Whether Vercel should post commit statuses for this project. When omitted, commit statuses remain enabled.
   */
  gitCommitStatus?: boolean | undefined;
  /**
   * Configuration for consolidated git commit status reporting. When enabled, Vercel will post a single consolidated commit status instead of individual statuses for each deployment.
   */
  consolidatedGitCommitStatus?:
    | GetMicrofrontendsInGroupConsolidatedGitCommitStatus
    | undefined;
};

export type GetMicrofrontendsInGroupWebAnalytics = {
  id: string;
  disabledAt?: number | undefined;
  canceledAt?: number | undefined;
  enabledAt?: number | undefined;
  hasData?: true | undefined;
};

export const GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyAction =
  {
    Challenge: "challenge",
    Deny: "deny",
    Log: "log",
  } as const;
export type GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyAction =
  ClosedEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyAction
  >;

export type GetMicrofrontendsInGroupVercelRuleset = {
  active: boolean;
  action?:
    | GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyAction
    | undefined;
};

export const GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAction =
  {
    Challenge: "challenge",
    Deny: "deny",
    Log: "log",
  } as const;
export type GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAction =
  ClosedEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAction
  >;

export type GetMicrofrontendsInGroupTrafficSources = {
  active: boolean;
  action?:
    | GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAction
    | undefined;
};

export const GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsSecurityAction =
  {
    Challenge: "challenge",
    Deny: "deny",
    Log: "log",
  } as const;
export type GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsSecurityAction =
  ClosedEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsSecurityAction
  >;

export type GetMicrofrontendsInGroupBotFilter = {
  active: boolean;
  action?:
    | GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsSecurityAction
    | undefined;
};

export const GetMicrofrontendsInGroupMicrofrontendsResponse200Action = {
  Challenge: "challenge",
  Deny: "deny",
  Log: "log",
} as const;
export type GetMicrofrontendsInGroupMicrofrontendsResponse200Action =
  ClosedEnum<typeof GetMicrofrontendsInGroupMicrofrontendsResponse200Action>;

export type GetMicrofrontendsInGroupAiBots = {
  active: boolean;
  action?: GetMicrofrontendsInGroupMicrofrontendsResponse200Action | undefined;
};

export const GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONAction =
  {
    Challenge: "challenge",
    Deny: "deny",
    Log: "log",
  } as const;
export type GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONAction =
  ClosedEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONAction
  >;

export type GetMicrofrontendsInGroupOwasp = {
  active: boolean;
  action?:
    | GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONAction
    | undefined;
};

export type GetMicrofrontendsInGroupManagedRules = {
  vercelRuleset: GetMicrofrontendsInGroupVercelRuleset;
  trafficSources: GetMicrofrontendsInGroupTrafficSources;
  botFilter: GetMicrofrontendsInGroupBotFilter;
  aiBots: GetMicrofrontendsInGroupAiBots;
  owasp: GetMicrofrontendsInGroupOwasp;
};

export const GetMicrofrontendsInGroupLogHeaders2 = {
  Wildcard: "*",
} as const;
export type GetMicrofrontendsInGroupLogHeaders2 = ClosedEnum<
  typeof GetMicrofrontendsInGroupLogHeaders2
>;

export type GetMicrofrontendsInGroupLogHeaders =
  | Array<string>
  | GetMicrofrontendsInGroupLogHeaders2;

export type GetMicrofrontendsInGroupSecurityPlusMetadata = {
  updatedAt: number;
  /**
   * Timestamp when the feature was first enabled. Never changes after initial enablement.
   */
  firstEnabledAt?: number | undefined;
};

export type GetMicrofrontendsInGroupSecurity = {
  attackModeEnabled?: boolean | undefined;
  attackModeUpdatedAt?: number | undefined;
  firewallEnabled?: boolean | undefined;
  firewallUpdatedAt?: number | undefined;
  attackModeActiveUntil?: number | null | undefined;
  firewallConfigVersion?: number | undefined;
  firewallSeawallEnabled?: boolean | undefined;
  ja3Enabled?: boolean | undefined;
  ja4Enabled?: boolean | undefined;
  firewallBypassIps?: Array<string> | undefined;
  managedRules?: GetMicrofrontendsInGroupManagedRules | null | undefined;
  botIdEnabled?: boolean | undefined;
  logHeaders?: Array<string> | GetMicrofrontendsInGroupLogHeaders2 | undefined;
  securityPlus?: boolean | undefined;
  securityPlusMetadata?:
    | GetMicrofrontendsInGroupSecurityPlusMetadata
    | undefined;
  /**
   * Whether Page Integrity is enabled for this project. Used by the metadata service to gate DynamoDB lookups against the page-integrity-inventory table.
   */
  pageIntegrityEnabled?: boolean | undefined;
};

/**
 * - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com`
 */
export const GetMicrofrontendsInGroupIssuerMode = {
  Global: "global",
  Team: "team",
} as const;
/**
 * - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com`
 */
export type GetMicrofrontendsInGroupIssuerMode = ClosedEnum<
  typeof GetMicrofrontendsInGroupIssuerMode
>;

export type GetMicrofrontendsInGroupOidcTokenConfig = {
  /**
   * Whether or not to generate OpenID Connect JSON Web Tokens.
   */
  enabled?: boolean | undefined;
  /**
   * - team: `https://oidc.vercel.com/[team_slug]` - global: `https://oidc.vercel.com`
   */
  issuerMode?: GetMicrofrontendsInGroupIssuerMode | undefined;
};

/**
 * Allowlist entry for GitLab, which uses nested groups rather than a flat org/repo. `namespace` is the full group path (e.g. `group` or `group/subgroup`); `project` is the leaf project name. Omit `project` to match any project under the namespace. Namespace is matched case-insensitively.
 */
export type GetMicrofrontendsInGroupSources2 = {
  provider: "gitlab";
  namespace: string;
  project?: string | undefined;
};

export const GetMicrofrontendsInGroupSourcesMicrofrontendsProvider = {
  Bitbucket: "bitbucket",
  Github: "github",
} as const;
export type GetMicrofrontendsInGroupSourcesMicrofrontendsProvider = ClosedEnum<
  typeof GetMicrofrontendsInGroupSourcesMicrofrontendsProvider
>;

/**
 * Allowlist entry for GitHub and Bitbucket, whose repos are identified by a flat `org`/`repo` (Bitbucket's workspace/owner maps to `org`, its repo slug to `repo`). Omit `repo` to match any repo in the org. Org is matched case-insensitively.
 */
export type GetMicrofrontendsInGroupSources1 = {
  provider: GetMicrofrontendsInGroupSourcesMicrofrontendsProvider;
  org: string;
  repo?: string | undefined;
};

export type GetMicrofrontendsInGroupSources =
  | (GetMicrofrontendsInGroupSources1 & { provider: "bitbucket" })
  | (GetMicrofrontendsInGroupSources1 & { provider: "github" })
  | GetMicrofrontendsInGroupSources2;

export type GetMicrofrontendsInGroupEnvironmentsMicrofrontends2 = {
  type: "custom";
  environmentId: string;
};

export const GetMicrofrontendsInGroupEnvironmentsMicrofrontendsTarget = {
  Preview: "preview",
  Production: "production",
} as const;
export type GetMicrofrontendsInGroupEnvironmentsMicrofrontendsTarget =
  ClosedEnum<typeof GetMicrofrontendsInGroupEnvironmentsMicrofrontendsTarget>;

export type GetMicrofrontendsInGroupEnvironmentsMicrofrontends1 = {
  type: "system";
  target: GetMicrofrontendsInGroupEnvironmentsMicrofrontendsTarget;
};

export type GetMicrofrontendsInGroupEnvironments =
  | GetMicrofrontendsInGroupEnvironmentsMicrofrontends1
  | GetMicrofrontendsInGroupEnvironmentsMicrofrontends2;

/**
 * `enabled: true` with empty `sources` is deny-all.
 */
export type GetMicrofrontendsInGroupGitSources = {
  sources: Array<
    | (GetMicrofrontendsInGroupSources1 & { provider: "bitbucket" })
    | (GetMicrofrontendsInGroupSources1 & { provider: "github" })
    | GetMicrofrontendsInGroupSources2
  >;
  enabled: boolean;
  environments: Array<
    | GetMicrofrontendsInGroupEnvironmentsMicrofrontends1
    | GetMicrofrontendsInGroupEnvironmentsMicrofrontends2
  >;
};

/**
 * Customer-configurable deployment sources. Every deploy classifies to exactly one. JSON schema in `packages/deployment-policy/schemas/body.ts` enumerates exactly these values. - `'git'` — git provider webhook. - `'cli'` — Vercel CLI (legacy classic-token CLI and SIWV CLI both). - `'rest-api'` — direct user/team-token REST upload. Does NOT cover deploy hooks, Marketplace integrations, or first-party app tokens. - `'deploy-hook'` — project deploy-hook URL. The URL is the credential. - `'integration'` — third-party Marketplace actor: Marketplace integration token, user-delegated OAuth from a Marketplace app, or an unrecognized third-party Vercel App. First-party Vercel Apps are never `'integration'`. - `'v0'` — the v0 product surface (entitlement-gated). v0 deploys through the CLI under the hood, but classifies as its own source so a team can allow or deny v0 independently of `'cli'`. First-party Vercel apps (Toolbar, etc.) classify as `'first-party'` — see `ClassifiedSource` in `./checks`. They're not in this union because they aren't customer-configurable; they bypass `checkDeploymentSources` entirely. v0 is intentionally NOT among them: like the CLI, it's a real product surface and is policy-controllable.
 */
export const GetMicrofrontendsInGroupMicrofrontendsSources = {
  Cli: "cli",
  DeployHook: "deploy-hook",
  Git: "git",
  Integration: "integration",
  RestApi: "rest-api",
  V0: "v0",
} as const;
/**
 * Customer-configurable deployment sources. Every deploy classifies to exactly one. JSON schema in `packages/deployment-policy/schemas/body.ts` enumerates exactly these values. - `'git'` — git provider webhook. - `'cli'` — Vercel CLI (legacy classic-token CLI and SIWV CLI both). - `'rest-api'` — direct user/team-token REST upload. Does NOT cover deploy hooks, Marketplace integrations, or first-party app tokens. - `'deploy-hook'` — project deploy-hook URL. The URL is the credential. - `'integration'` — third-party Marketplace actor: Marketplace integration token, user-delegated OAuth from a Marketplace app, or an unrecognized third-party Vercel App. First-party Vercel Apps are never `'integration'`. - `'v0'` — the v0 product surface (entitlement-gated). v0 deploys through the CLI under the hood, but classifies as its own source so a team can allow or deny v0 independently of `'cli'`. First-party Vercel apps (Toolbar, etc.) classify as `'first-party'` — see `ClassifiedSource` in `./checks`. They're not in this union because they aren't customer-configurable; they bypass `checkDeploymentSources` entirely. v0 is intentionally NOT among them: like the CLI, it's a real product surface and is policy-controllable.
 */
export type GetMicrofrontendsInGroupMicrofrontendsSources = ClosedEnum<
  typeof GetMicrofrontendsInGroupMicrofrontendsSources
>;

export type GetMicrofrontendsInGroupEnvironments2 = {
  type: "custom";
  environmentId: string;
};

export const GetMicrofrontendsInGroupEnvironmentsTarget = {
  Preview: "preview",
  Production: "production",
} as const;
export type GetMicrofrontendsInGroupEnvironmentsTarget = ClosedEnum<
  typeof GetMicrofrontendsInGroupEnvironmentsTarget
>;

export type GetMicrofrontendsInGroupEnvironments1 = {
  type: "system";
  target: GetMicrofrontendsInGroupEnvironmentsTarget;
};

export type GetMicrofrontendsInGroupMicrofrontendsEnvironments =
  | GetMicrofrontendsInGroupEnvironments1
  | GetMicrofrontendsInGroupEnvironments2;

/**
 * `enabled: true` with empty `sources` is deny-all.
 */
export type GetMicrofrontendsInGroupDeploymentSources = {
  sources: Array<GetMicrofrontendsInGroupMicrofrontendsSources>;
  enabled: boolean;
  environments: Array<
    | GetMicrofrontendsInGroupEnvironments1
    | GetMicrofrontendsInGroupEnvironments2
  >;
};

/**
 * Project shape. `null` on a rule list clears the project's override for that rule type (fall back to team for every env); omitting is equivalent. Setting `deploymentPolicy` itself to `null` clears every override at once. Kept structurally distinct from {@link TeamDeploymentPolicy} so the two storage locations don't share a type by accident.
 */
export type GetMicrofrontendsInGroupDeploymentPolicy = {
  gitSources?: Array<GetMicrofrontendsInGroupGitSources> | null | undefined;
  deploymentSources?:
    | Array<GetMicrofrontendsInGroupDeploymentSources>
    | null
    | undefined;
};

export const GetMicrofrontendsInGroupFlatRateTier = {
  Advanced: "advanced",
  Base: "base",
  Critical: "critical",
  Standard: "standard",
} as const;
export type GetMicrofrontendsInGroupFlatRateTier = ClosedEnum<
  typeof GetMicrofrontendsInGroupFlatRateTier
>;

/**
 * Billing mode. Always 'flat' for flat-rate projects.
 */
export const GetMicrofrontendsInGroupKind = {
  Flat: "flat",
} as const;
/**
 * Billing mode. Always 'flat' for flat-rate projects.
 */
export type GetMicrofrontendsInGroupKind = ClosedEnum<
  typeof GetMicrofrontendsInGroupKind
>;

export type GetMicrofrontendsInGroupUsageStatus = {
  /**
   * Billing mode. Always 'flat' for flat-rate projects.
   */
  kind: GetMicrofrontendsInGroupKind;
  /**
   * Timestamp until which the project has exceeded its CDN allowance.
   */
  exceededAllowanceUntil?: number | undefined;
  /**
   * Timestamp until which throttling is bypassed (project pays list rates for overage).
   */
  bypassThrottleUntil?: number | undefined;
  /**
   * Whether the project is currently throttled.
   */
  throttled?: boolean | undefined;
};

export type GetMicrofrontendsInGroupFeatures = {
  webAnalytics?: boolean | undefined;
};

export type GetMicrofrontendsInGroupHistory = {
  scanner: string;
  reason: string;
  by: string;
  byId: string;
  at: number;
};

export const GetMicrofrontendsInGroupMicrofrontendsResponseAction = {
  Blocked: "blocked",
} as const;
export type GetMicrofrontendsInGroupMicrofrontendsResponseAction = ClosedEnum<
  typeof GetMicrofrontendsInGroupMicrofrontendsResponseAction
>;

export type GetMicrofrontendsInGroupBlock = {
  action: GetMicrofrontendsInGroupMicrofrontendsResponseAction;
  reason: string;
  statusCode: number;
  createdAt: number;
  caseId?: string | undefined;
  actor?: string | undefined;
  comment?: string | undefined;
  ineligibleForAppeal?: boolean | undefined;
  isCascading?: boolean | undefined;
};

export type GetMicrofrontendsInGroupHasMicrofrontendsResponse200Value = {
  eq: string;
};

export type GetMicrofrontendsInGroupHasMicrofrontends2 = {
  type: "host";
  value: GetMicrofrontendsInGroupHasMicrofrontendsResponse200Value;
};

export const GetMicrofrontendsInGroupHasMicrofrontendsResponseKey = {
  XVercelIpCountry: "x-vercel-ip-country",
} as const;
export type GetMicrofrontendsInGroupHasMicrofrontendsResponseKey = ClosedEnum<
  typeof GetMicrofrontendsInGroupHasMicrofrontendsResponseKey
>;

export type GetMicrofrontendsInGroupHasMicrofrontendsResponseValue = {
  eq: string;
};

export type GetMicrofrontendsInGroupHasMicrofrontends1 = {
  type: "header";
  key: GetMicrofrontendsInGroupHasMicrofrontendsResponseKey;
  value: GetMicrofrontendsInGroupHasMicrofrontendsResponseValue;
};

export type GetMicrofrontendsInGroupRouteHas =
  | GetMicrofrontendsInGroupHasMicrofrontends1
  | GetMicrofrontendsInGroupHasMicrofrontends2;

export const GetMicrofrontendsInGroupRouteAction = {
  BlockLegalCwc: "block_legal_cwc",
} as const;
export type GetMicrofrontendsInGroupRouteAction = ClosedEnum<
  typeof GetMicrofrontendsInGroupRouteAction
>;

export type GetMicrofrontendsInGroupRouteMitigate = {
  action: GetMicrofrontendsInGroupRouteAction;
};

export type GetMicrofrontendsInGroupRoute2 = {
  has: Array<
    | GetMicrofrontendsInGroupHasMicrofrontends1
    | GetMicrofrontendsInGroupHasMicrofrontends2
  >;
  mitigate: GetMicrofrontendsInGroupRouteMitigate;
  src?: string | undefined;
};

export type GetMicrofrontendsInGroupRoute1 = {
  src: string;
  status: number;
};

export type GetMicrofrontendsInGroupBlockHistoryMicrofrontendsRoute =
  | GetMicrofrontendsInGroupRoute1
  | GetMicrofrontendsInGroupRoute2;

export type GetMicrofrontendsInGroupBlockHistory4 = {
  action: "route-unblocked";
  route: GetMicrofrontendsInGroupRoute1 | GetMicrofrontendsInGroupRoute2;
  statusCode?: number | undefined;
  createdAt: number;
  caseId?: string | undefined;
  actor?: string | undefined;
  comment?: string | undefined;
  ineligibleForAppeal?: boolean | undefined;
  isCascading?: boolean | undefined;
};

export type GetMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONResponseBodyValue =
  {
    eq: string;
  };

export type GetMicrofrontendsInGroupHasMicrofrontendsResponse2 = {
  type: "host";
  value:
    GetMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONResponseBodyValue;
};

export const GetMicrofrontendsInGroupHasMicrofrontendsKey = {
  XVercelIpCountry: "x-vercel-ip-country",
} as const;
export type GetMicrofrontendsInGroupHasMicrofrontendsKey = ClosedEnum<
  typeof GetMicrofrontendsInGroupHasMicrofrontendsKey
>;

export type GetMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONValue =
  {
    eq: string;
  };

export type GetMicrofrontendsInGroupHasMicrofrontendsResponse1 = {
  type: "header";
  key: GetMicrofrontendsInGroupHasMicrofrontendsKey;
  value:
    GetMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONValue;
};

export type GetMicrofrontendsInGroupRouteMicrofrontendsHas =
  | GetMicrofrontendsInGroupHasMicrofrontendsResponse1
  | GetMicrofrontendsInGroupHasMicrofrontendsResponse2;

export const GetMicrofrontendsInGroupRouteMicrofrontendsAction = {
  BlockLegalCwc: "block_legal_cwc",
} as const;
export type GetMicrofrontendsInGroupRouteMicrofrontendsAction = ClosedEnum<
  typeof GetMicrofrontendsInGroupRouteMicrofrontendsAction
>;

export type GetMicrofrontendsInGroupRouteMicrofrontendsMitigate = {
  action: GetMicrofrontendsInGroupRouteMicrofrontendsAction;
};

export type GetMicrofrontendsInGroupRouteMicrofrontends2 = {
  has: Array<
    | GetMicrofrontendsInGroupHasMicrofrontendsResponse1
    | GetMicrofrontendsInGroupHasMicrofrontendsResponse2
  >;
  mitigate: GetMicrofrontendsInGroupRouteMicrofrontendsMitigate;
  src?: string | undefined;
};

export type GetMicrofrontendsInGroupRouteMicrofrontends1 = {
  src: string;
  status: number;
};

export type GetMicrofrontendsInGroupBlockHistoryRoute =
  | GetMicrofrontendsInGroupRouteMicrofrontends1
  | GetMicrofrontendsInGroupRouteMicrofrontends2;

export type GetMicrofrontendsInGroupBlockHistory3 = {
  action: "route-blocked";
  route:
    | GetMicrofrontendsInGroupRouteMicrofrontends1
    | GetMicrofrontendsInGroupRouteMicrofrontends2;
  reason: string;
  createdAt: number;
  caseId?: string | undefined;
  actor?: string | undefined;
  comment?: string | undefined;
  ineligibleForAppeal?: boolean | undefined;
  isCascading?: boolean | undefined;
};

export type GetMicrofrontendsInGroupBlockHistory2 = {
  action: "unblocked";
  createdAt: number;
  caseId?: string | undefined;
  actor?: string | undefined;
  comment?: string | undefined;
  ineligibleForAppeal?: boolean | undefined;
  isCascading?: boolean | undefined;
};

export type GetMicrofrontendsInGroupBlockHistory1 = {
  action: "blocked";
  reason: string;
  statusCode: number;
  createdAt: number;
  caseId?: string | undefined;
  actor?: string | undefined;
  comment?: string | undefined;
  ineligibleForAppeal?: boolean | undefined;
  isCascading?: boolean | undefined;
};

export type GetMicrofrontendsInGroupBlockHistory =
  | GetMicrofrontendsInGroupBlockHistory1
  | GetMicrofrontendsInGroupBlockHistory2
  | GetMicrofrontendsInGroupBlockHistory3
  | GetMicrofrontendsInGroupBlockHistory4;

export const GetMicrofrontendsInGroupMicrofrontendsAction = {
  AddDeploymentInterstitial: "add-deployment-interstitial",
  AddProjectInterstitial: "add-project-interstitial",
  RemoveDeploymentInterstitial: "remove-deployment-interstitial",
  RemoveProjectInterstitial: "remove-project-interstitial",
} as const;
export type GetMicrofrontendsInGroupMicrofrontendsAction = ClosedEnum<
  typeof GetMicrofrontendsInGroupMicrofrontendsAction
>;

export type GetMicrofrontendsInGroupInterstitialHistory = {
  action: GetMicrofrontendsInGroupMicrofrontendsAction;
  createdAt: number;
  caseId?: string | undefined;
  reason?: string | undefined;
  actor?: string | undefined;
  comment?: string | undefined;
};

export type GetMicrofrontendsInGroupAbuse = {
  scanner?: string | undefined;
  history: Array<GetMicrofrontendsInGroupHistory>;
  updatedAt: number;
  block?: GetMicrofrontendsInGroupBlock | undefined;
  blockHistory?:
    | Array<
      | GetMicrofrontendsInGroupBlockHistory1
      | GetMicrofrontendsInGroupBlockHistory2
      | GetMicrofrontendsInGroupBlockHistory3
      | GetMicrofrontendsInGroupBlockHistory4
    >
    | undefined;
  interstitial?: boolean | undefined;
  interstitialHistory?:
    | Array<GetMicrofrontendsInGroupInterstitialHistory>
    | undefined;
};

export type GetMicrofrontendsInGroupHasMicrofrontendsValue = {
  eq: string;
};

export type GetMicrofrontendsInGroupHas2 = {
  type: "host";
  value: GetMicrofrontendsInGroupHasMicrofrontendsValue;
};

export const GetMicrofrontendsInGroupHasKey = {
  XVercelIpCountry: "x-vercel-ip-country",
} as const;
export type GetMicrofrontendsInGroupHasKey = ClosedEnum<
  typeof GetMicrofrontendsInGroupHasKey
>;

export type GetMicrofrontendsInGroupHasValue = {
  eq: string;
};

export type GetMicrofrontendsInGroupHas1 = {
  type: "header";
  key: GetMicrofrontendsInGroupHasKey;
  value: GetMicrofrontendsInGroupHasValue;
};

export type GetMicrofrontendsInGroupInternalRoutesHas =
  | GetMicrofrontendsInGroupHas1
  | GetMicrofrontendsInGroupHas2;

export const GetMicrofrontendsInGroupInternalRoutesAction = {
  BlockLegalCwc: "block_legal_cwc",
} as const;
export type GetMicrofrontendsInGroupInternalRoutesAction = ClosedEnum<
  typeof GetMicrofrontendsInGroupInternalRoutesAction
>;

export type GetMicrofrontendsInGroupInternalRoutesMitigate = {
  action: GetMicrofrontendsInGroupInternalRoutesAction;
};

export type GetMicrofrontendsInGroupInternalRoutes2 = {
  has: Array<GetMicrofrontendsInGroupHas1 | GetMicrofrontendsInGroupHas2>;
  mitigate: GetMicrofrontendsInGroupInternalRoutesMitigate;
  src?: string | undefined;
};

export type GetMicrofrontendsInGroupInternalRoutes1 = {
  src: string;
  status: number;
};

export type GetMicrofrontendsInGroupInternalRoutes =
  | GetMicrofrontendsInGroupInternalRoutes1
  | GetMicrofrontendsInGroupInternalRoutes2;

export const GetMicrofrontendsInGroupAction = {
  Accept: "accept",
  Cancel: "cancel",
  Delete: "delete",
} as const;
export type GetMicrofrontendsInGroupAction = ClosedEnum<
  typeof GetMicrofrontendsInGroupAction
>;

export type GetMicrofrontendsInGroupValuePreviousValue =
  | string
  | number
  | boolean;

export type GetMicrofrontendsInGroupValueCurrentValue =
  | string
  | number
  | boolean;

export type GetMicrofrontendsInGroupValue3 = {
  previousValue: string | number | boolean;
  currentValue: string | number | boolean;
};

export type GetMicrofrontendsInGroupValue =
  | GetMicrofrontendsInGroupValue3
  | string
  | number
  | boolean;

export type GetMicrofrontendsInGroupDismissedToasts = {
  key: string;
  dismissedAt: number;
  action: GetMicrofrontendsInGroupAction;
  value: GetMicrofrontendsInGroupValue3 | string | number | boolean | null;
};

export const GetMicrofrontendsInGroupMicrofrontendsEnv = {
  Preview: "preview",
  Production: "production",
} as const;
export type GetMicrofrontendsInGroupMicrofrontendsEnv = ClosedEnum<
  typeof GetMicrofrontendsInGroupMicrofrontendsEnv
>;

export type GetMicrofrontendsInGroupSamplingRules = {
  rate: number;
  env?: GetMicrofrontendsInGroupMicrofrontendsEnv | undefined;
  requestPath?: string | undefined;
};

export type GetMicrofrontendsInGroupTracing = {
  domains?: string | undefined;
  ignorePaths?: Array<string> | undefined;
  samplingRules?: Array<GetMicrofrontendsInGroupSamplingRules> | undefined;
};

export type GetMicrofrontendsInGroupProjects = {
  accountId: string;
  analytics?: GetMicrofrontendsInGroupAnalytics | undefined;
  appliedCve55182Migration?: boolean | undefined;
  speedInsights?: GetMicrofrontendsInGroupSpeedInsights | undefined;
  autoExposeSystemEnvs?: boolean | undefined;
  autoAssignCustomDomains?: boolean | undefined;
  autoAssignCustomDomainsUpdatedBy?: string | undefined;
  buildCommand?: string | null | undefined;
  commandForIgnoringBuildStep?: string | null | undefined;
  connectConfigurations?:
    | Array<GetMicrofrontendsInGroupConnectConfigurations>
    | null
    | undefined;
  connectConfigurationId?: string | null | undefined;
  connectBuildsEnabled?: boolean | undefined;
  passiveConnectConfigurationId?: string | null | undefined;
  createdAt?: number | undefined;
  customerSupportCodeVisibility?: boolean | undefined;
  crons?: GetMicrofrontendsInGroupCrons | undefined;
  dataCache?: GetMicrofrontendsInGroupDataCache | undefined;
  /**
   * Retention policies for deployments. These are enforced at the project level, but we also maintain an instance of this at the team level as a default policy that gets applied to new projects.
   */
  deploymentExpiration: GetMicrofrontendsInGroupDeploymentExpiration;
  expiration?: GetMicrofrontendsInGroupExpiration | undefined;
  devCommand?: string | null | undefined;
  directoryListing: boolean;
  installCommand?: string | null | undefined;
  env?: Array<GetMicrofrontendsInGroupEnv> | undefined;
  customEnvironments?:
    | Array<GetMicrofrontendsInGroupCustomEnvironments>
    | undefined;
  framework?: GetMicrofrontendsInGroupFramework | null | undefined;
  services?: Array<GetMicrofrontendsInGroupServices> | undefined;
  gitForkProtection?: boolean | undefined;
  gitLFS?: boolean | undefined;
  id: string;
  ipBuckets?: Array<GetMicrofrontendsInGroupIpBuckets> | undefined;
  jobs?: GetMicrofrontendsInGroupJobs | undefined;
  latestDeployments?:
    | Array<GetMicrofrontendsInGroupLatestDeployments>
    | undefined;
  link?: GetMicrofrontendsInGroupLink | undefined;
  microfrontends?: GetMicrofrontendsInGroupMicrofrontends | undefined;
  name: string;
  nodeVersion: GetMicrofrontendsInGroupNodeVersion;
  optionsAllowlist?:
    | GetMicrofrontendsInGroupOptionsAllowlist
    | null
    | undefined;
  outputDirectory?: string | null | undefined;
  passwordProtection?:
    | GetMicrofrontendsInGroupPasswordProtection
    | null
    | undefined;
  passport?: GetMicrofrontendsInGroupPassport | null | undefined;
  protectionConfig?: GetMicrofrontendsInGroupProtectionConfig | undefined;
  productionDeploymentsFastLane?: boolean | undefined;
  resourceConfig: GetMicrofrontendsInGroupResourceConfig;
  /**
   * Description of why a project was rolled back, and by whom. Note that lastAliasRequest contains the from/to details of the rollback.
   */
  rollbackDescription?: GetMicrofrontendsInGroupRollbackDescription | undefined;
  /**
   * Project-level rolling release configuration that defines how deployments should be gradually rolled out
   */
  rollingRelease?: GetMicrofrontendsInGroupRollingRelease | null | undefined;
  defaultResourceConfig: GetMicrofrontendsInGroupDefaultResourceConfig;
  rootDirectory?: string | null | undefined;
  serverlessFunctionZeroConfigFailover?: boolean | undefined;
  skewProtectionBoundaryAt?: number | undefined;
  skewProtectionMaxAge?: number | undefined;
  skewProtectionAllowedDomains?: Array<string> | undefined;
  skipGitConnectDuringLink?: boolean | undefined;
  staticIps?: GetMicrofrontendsInGroupStaticIps | undefined;
  sourceFilesOutsideRootDirectory?: boolean | undefined;
  enableAffectedProjectsDeployments?: boolean | undefined;
  enableExternalRewriteCaching?: boolean | undefined;
  ssoProtection?: GetMicrofrontendsInGroupSsoProtection | null | undefined;
  targets?: { [k: string]: GetMicrofrontendsInGroupTargets | null } | undefined;
  transferCompletedAt?: number | undefined;
  transferStartedAt?: number | undefined;
  transferToAccountId?: string | undefined;
  transferredFromAccountId?: string | undefined;
  updatedAt?: number | undefined;
  live?: boolean | undefined;
  enablePreviewFeedback?: boolean | null | undefined;
  enableProductionFeedback?: boolean | null | undefined;
  permissions?: GetMicrofrontendsInGroupPermissions | undefined;
  lastRollbackTarget?:
    | GetMicrofrontendsInGroupLastRollbackTarget
    | null
    | undefined;
  lastAliasRequest?:
    | GetMicrofrontendsInGroupLastAliasRequest
    | null
    | undefined;
  protectionBypass?:
    | { [k: string]: GetMicrofrontendsInGroupProtectionBypass }
    | undefined;
  hasActiveBranches?: boolean | undefined;
  trustedIps?: GetMicrofrontendsInGroupTrustedIps | null | undefined;
  trustedSources?: GetMicrofrontendsInGroupTrustedSources | null | undefined;
  gitComments?: GetMicrofrontendsInGroupGitComments | undefined;
  gitProviderOptions?: GetMicrofrontendsInGroupGitProviderOptions | undefined;
  paused?: boolean | undefined;
  concurrencyBucketName?: string | undefined;
  webAnalytics?: GetMicrofrontendsInGroupWebAnalytics | undefined;
  security?: GetMicrofrontendsInGroupSecurity | undefined;
  oidcTokenConfig?: GetMicrofrontendsInGroupOidcTokenConfig | undefined;
  /**
   * Project shape. `null` on a rule list clears the project's override for that rule type (fall back to team for every env); omitting is equivalent. Setting `deploymentPolicy` itself to `null` clears every override at once. Kept structurally distinct from {@link TeamDeploymentPolicy} so the two storage locations don't share a type by accident.
   */
  deploymentPolicy?:
    | GetMicrofrontendsInGroupDeploymentPolicy
    | null
    | undefined;
  tier?: string | undefined;
  flatRateTier?: GetMicrofrontendsInGroupFlatRateTier | undefined;
  usageStatus?: GetMicrofrontendsInGroupUsageStatus | undefined;
  features?: GetMicrofrontendsInGroupFeatures | undefined;
  v0?: boolean | undefined;
  v0Created?: boolean | undefined;
  abuse?: GetMicrofrontendsInGroupAbuse | undefined;
  internalRoutes?:
    | Array<
      | GetMicrofrontendsInGroupInternalRoutes1
      | GetMicrofrontendsInGroupInternalRoutes2
    >
    | undefined;
  hasDeployments?: boolean | undefined;
  dismissedToasts?: Array<GetMicrofrontendsInGroupDismissedToasts> | undefined;
  protectedSourcemaps?: boolean | undefined;
  tracing?: GetMicrofrontendsInGroupTracing | undefined;
  avatar?: string | null | undefined;
};

export type GetMicrofrontendsInGroupResponseBody = {
  projects: Array<GetMicrofrontendsInGroupProjects>;
};

/** @internal */
export const GetMicrofrontendsInGroupToMicrofrontendsResponse200Preset$inboundSchema:
  z.ZodNativeEnum<
    typeof GetMicrofrontendsInGroupToMicrofrontendsResponse200Preset
  > = z.nativeEnum(GetMicrofrontendsInGroupToMicrofrontendsResponse200Preset);

/** @internal */
export const GetMicrofrontendsInGroupToMicrofrontends1$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupToMicrofrontends1,
  z.ZodTypeDef,
  unknown
> = z.object({
  slugs: z.array(types.string()),
  preset: types.optional(
    GetMicrofrontendsInGroupToMicrofrontendsResponse200Preset$inboundSchema,
  ),
});

export function getMicrofrontendsInGroupToMicrofrontends1FromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupToMicrofrontends1,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupToMicrofrontends1$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupToMicrofrontends1' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsTo$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupMicrofrontendsTo,
  z.ZodTypeDef,
  unknown
> = smartUnion([
  z.lazy(() => GetMicrofrontendsInGroupToMicrofrontends1$inboundSchema),
  GetMicrofrontendsInGroupToMicrofrontends2$inboundSchema,
]);

export function getMicrofrontendsInGroupMicrofrontendsToFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupMicrofrontendsTo,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupMicrofrontendsTo$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupMicrofrontendsTo' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupCustomAllow$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupCustomAllow,
  z.ZodTypeDef,
  unknown
> = z.object({
  from: GetMicrofrontendsInGroupFrom$inboundSchema,
  to: smartUnion([
    z.lazy(() => GetMicrofrontendsInGroupToMicrofrontends1$inboundSchema),
    GetMicrofrontendsInGroupToMicrofrontends2$inboundSchema,
  ]),
});

export function getMicrofrontendsInGroupCustomAllowFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupCustomAllow, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupCustomAllow$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupCustomAllow' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsProjects$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupMicrofrontendsProjects,
    z.ZodTypeDef,
    unknown
  > = z.object({
    label: types.optional(types.string()),
    customAllow: types.optional(
      z.array(z.lazy(() => GetMicrofrontendsInGroupCustomAllow$inboundSchema)),
    ),
  });

export function getMicrofrontendsInGroupMicrofrontendsProjectsFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupMicrofrontendsProjects,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupMicrofrontendsProjects$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupMicrofrontendsProjects' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupToMicrofrontendsPreset$inboundSchema:
  z.ZodNativeEnum<typeof GetMicrofrontendsInGroupToMicrofrontendsPreset> = z
    .nativeEnum(GetMicrofrontendsInGroupToMicrofrontendsPreset);

/** @internal */
export const GetMicrofrontendsInGroupTo2$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupTo2,
  z.ZodTypeDef,
  unknown
> = z.object({
  slugs: types.optional(z.array(types.string())),
  preset: GetMicrofrontendsInGroupToMicrofrontendsPreset$inboundSchema,
});

export function getMicrofrontendsInGroupTo2FromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupTo2, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupTo2$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupTo2' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupToPreset$inboundSchema: z.ZodNativeEnum<
  typeof GetMicrofrontendsInGroupToPreset
> = z.nativeEnum(GetMicrofrontendsInGroupToPreset);

/** @internal */
export const GetMicrofrontendsInGroupTo1$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupTo1,
  z.ZodTypeDef,
  unknown
> = z.object({
  slugs: z.array(types.string()),
  preset: types.optional(GetMicrofrontendsInGroupToPreset$inboundSchema),
});

export function getMicrofrontendsInGroupTo1FromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupTo1, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupTo1$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupTo1' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupTo$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupTo,
  z.ZodTypeDef,
  unknown
> = smartUnion([
  z.lazy(() => GetMicrofrontendsInGroupTo1$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupTo2$inboundSchema),
]);

export function getMicrofrontendsInGroupToFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupTo, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupTo$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupTo' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupOidcProviders$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupOidcProviders,
  z.ZodTypeDef,
  unknown
> = z.object({
  to: smartUnion([
    z.lazy(() => GetMicrofrontendsInGroupTo1$inboundSchema),
    z.lazy(() => GetMicrofrontendsInGroupTo2$inboundSchema),
  ]),
  label: types.optional(types.string()),
  claims: z.record(z.array(types.string())),
});

export function getMicrofrontendsInGroupOidcProvidersFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupOidcProviders, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupOidcProviders$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupOidcProviders' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupTrustedSources$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupTrustedSources,
  z.ZodTypeDef,
  unknown
> = z.object({
  projects: types.optional(
    z.record(z.lazy(() =>
      GetMicrofrontendsInGroupMicrofrontendsProjects$inboundSchema
    )),
  ),
  oidcProviders: types.optional(
    z.record(z.array(z.lazy(() =>
      GetMicrofrontendsInGroupOidcProviders$inboundSchema
    ))),
  ),
});

export function getMicrofrontendsInGroupTrustedSourcesFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupTrustedSources, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupTrustedSources$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupTrustedSources' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupGitComments$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupGitComments,
  z.ZodTypeDef,
  unknown
> = z.object({
  onPullRequest: types.boolean(),
  onCommit: types.boolean(),
});

export function getMicrofrontendsInGroupGitCommentsFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupGitComments, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupGitComments$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupGitComments' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupCreateDeployments$inboundSchema:
  z.ZodNativeEnum<typeof GetMicrofrontendsInGroupCreateDeployments> = z
    .nativeEnum(GetMicrofrontendsInGroupCreateDeployments);

/** @internal */
export const GetMicrofrontendsInGroupConsolidatedGitCommitStatus$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupConsolidatedGitCommitStatus,
    z.ZodTypeDef,
    unknown
  > = z.object({
    enabled: types.boolean(),
    propagateFailures: types.boolean(),
  });

export function getMicrofrontendsInGroupConsolidatedGitCommitStatusFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupConsolidatedGitCommitStatus,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupConsolidatedGitCommitStatus$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupConsolidatedGitCommitStatus' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupGitProviderOptions$inboundSchema:
  z.ZodType<GetMicrofrontendsInGroupGitProviderOptions, z.ZodTypeDef, unknown> =
    z.object({
      createDeployments:
        GetMicrofrontendsInGroupCreateDeployments$inboundSchema,
      disableRepositoryDispatchEvents: types.optional(types.boolean()),
      requireVerifiedCommits: types.optional(types.boolean()),
      gitCommitStatus: types.optional(types.boolean()),
      consolidatedGitCommitStatus: types.optional(
        z.lazy(() =>
          GetMicrofrontendsInGroupConsolidatedGitCommitStatus$inboundSchema
        ),
      ),
    });

export function getMicrofrontendsInGroupGitProviderOptionsFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupGitProviderOptions,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupGitProviderOptions$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupGitProviderOptions' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupWebAnalytics$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupWebAnalytics,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: types.string(),
  disabledAt: types.optional(types.number()),
  canceledAt: types.optional(types.number()),
  enabledAt: types.optional(types.number()),
  hasData: types.optional(types.literal(true)),
});

export function getMicrofrontendsInGroupWebAnalyticsFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupWebAnalytics, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupWebAnalytics$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupWebAnalytics' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyAction$inboundSchema:
  z.ZodNativeEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyAction
  > = z.nativeEnum(
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyAction,
  );

/** @internal */
export const GetMicrofrontendsInGroupVercelRuleset$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupVercelRuleset,
  z.ZodTypeDef,
  unknown
> = z.object({
  active: types.boolean(),
  action: types.optional(
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyAction$inboundSchema,
  ),
});

export function getMicrofrontendsInGroupVercelRulesetFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupVercelRuleset, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupVercelRuleset$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupVercelRuleset' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAction$inboundSchema:
  z.ZodNativeEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAction
  > = z.nativeEnum(
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAction,
  );

/** @internal */
export const GetMicrofrontendsInGroupTrafficSources$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupTrafficSources,
  z.ZodTypeDef,
  unknown
> = z.object({
  active: types.boolean(),
  action: types.optional(
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAction$inboundSchema,
  ),
});

export function getMicrofrontendsInGroupTrafficSourcesFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupTrafficSources, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupTrafficSources$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupTrafficSources' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsSecurityAction$inboundSchema:
  z.ZodNativeEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsSecurityAction
  > = z.nativeEnum(
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsSecurityAction,
  );

/** @internal */
export const GetMicrofrontendsInGroupBotFilter$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupBotFilter,
  z.ZodTypeDef,
  unknown
> = z.object({
  active: types.boolean(),
  action: types.optional(
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsSecurityAction$inboundSchema,
  ),
});

export function getMicrofrontendsInGroupBotFilterFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupBotFilter, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupBotFilter$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupBotFilter' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsResponse200Action$inboundSchema:
  z.ZodNativeEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponse200Action
  > = z.nativeEnum(GetMicrofrontendsInGroupMicrofrontendsResponse200Action);

/** @internal */
export const GetMicrofrontendsInGroupAiBots$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupAiBots,
  z.ZodTypeDef,
  unknown
> = z.object({
  active: types.boolean(),
  action: types.optional(
    GetMicrofrontendsInGroupMicrofrontendsResponse200Action$inboundSchema,
  ),
});

export function getMicrofrontendsInGroupAiBotsFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupAiBots, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupAiBots$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupAiBots' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONAction$inboundSchema:
  z.ZodNativeEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONAction
  > = z.nativeEnum(
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONAction,
  );

/** @internal */
export const GetMicrofrontendsInGroupOwasp$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupOwasp,
  z.ZodTypeDef,
  unknown
> = z.object({
  active: types.boolean(),
  action: types.optional(
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONAction$inboundSchema,
  ),
});

export function getMicrofrontendsInGroupOwaspFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupOwasp, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupOwasp$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupOwasp' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupManagedRules$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupManagedRules,
  z.ZodTypeDef,
  unknown
> = z.object({
  vercel_ruleset: z.lazy(() =>
    GetMicrofrontendsInGroupVercelRuleset$inboundSchema
  ),
  traffic_sources: z.lazy(() =>
    GetMicrofrontendsInGroupTrafficSources$inboundSchema
  ),
  bot_filter: z.lazy(() => GetMicrofrontendsInGroupBotFilter$inboundSchema),
  ai_bots: z.lazy(() => GetMicrofrontendsInGroupAiBots$inboundSchema),
  owasp: z.lazy(() => GetMicrofrontendsInGroupOwasp$inboundSchema),
}).transform((v) => {
  return remap$(v, {
    "vercel_ruleset": "vercelRuleset",
    "traffic_sources": "trafficSources",
    "bot_filter": "botFilter",
    "ai_bots": "aiBots",
  });
});

export function getMicrofrontendsInGroupManagedRulesFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupManagedRules, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupManagedRules$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupManagedRules' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupLogHeaders2$inboundSchema: z.ZodNativeEnum<
  typeof GetMicrofrontendsInGroupLogHeaders2
> = z.nativeEnum(GetMicrofrontendsInGroupLogHeaders2);

/** @internal */
export const GetMicrofrontendsInGroupLogHeaders$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupLogHeaders,
  z.ZodTypeDef,
  unknown
> = smartUnion([
  z.array(types.string()),
  GetMicrofrontendsInGroupLogHeaders2$inboundSchema,
]);

export function getMicrofrontendsInGroupLogHeadersFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupLogHeaders, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupLogHeaders$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupLogHeaders' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupSecurityPlusMetadata$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupSecurityPlusMetadata,
    z.ZodTypeDef,
    unknown
  > = z.object({
    updatedAt: types.number(),
    firstEnabledAt: types.optional(types.number()),
  });

export function getMicrofrontendsInGroupSecurityPlusMetadataFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupSecurityPlusMetadata,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupSecurityPlusMetadata$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupSecurityPlusMetadata' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupSecurity$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupSecurity,
  z.ZodTypeDef,
  unknown
> = z.object({
  attackModeEnabled: types.optional(types.boolean()),
  attackModeUpdatedAt: types.optional(types.number()),
  firewallEnabled: types.optional(types.boolean()),
  firewallUpdatedAt: types.optional(types.number()),
  attackModeActiveUntil: z.nullable(types.number()).optional(),
  firewallConfigVersion: types.optional(types.number()),
  firewallSeawallEnabled: types.optional(types.boolean()),
  ja3Enabled: types.optional(types.boolean()),
  ja4Enabled: types.optional(types.boolean()),
  firewallBypassIps: types.optional(z.array(types.string())),
  managedRules: z.nullable(
    z.lazy(() => GetMicrofrontendsInGroupManagedRules$inboundSchema),
  ).optional(),
  botIdEnabled: types.optional(types.boolean()),
  log_headers: types.optional(
    smartUnion([
      z.array(types.string()),
      GetMicrofrontendsInGroupLogHeaders2$inboundSchema,
    ]),
  ),
  securityPlus: types.optional(types.boolean()),
  securityPlusMetadata: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupSecurityPlusMetadata$inboundSchema),
  ),
  pageIntegrityEnabled: types.optional(types.boolean()),
}).transform((v) => {
  return remap$(v, {
    "log_headers": "logHeaders",
  });
});

export function getMicrofrontendsInGroupSecurityFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupSecurity, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupSecurity$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupSecurity' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupIssuerMode$inboundSchema: z.ZodNativeEnum<
  typeof GetMicrofrontendsInGroupIssuerMode
> = z.nativeEnum(GetMicrofrontendsInGroupIssuerMode);

/** @internal */
export const GetMicrofrontendsInGroupOidcTokenConfig$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupOidcTokenConfig,
  z.ZodTypeDef,
  unknown
> = z.object({
  enabled: types.optional(types.boolean()),
  issuerMode: types.optional(GetMicrofrontendsInGroupIssuerMode$inboundSchema),
});

export function getMicrofrontendsInGroupOidcTokenConfigFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupOidcTokenConfig,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupOidcTokenConfig$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupOidcTokenConfig' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupSources2$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupSources2,
  z.ZodTypeDef,
  unknown
> = z.object({
  provider: types.literal("gitlab"),
  namespace: types.string(),
  project: types.optional(types.string()),
});

export function getMicrofrontendsInGroupSources2FromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupSources2, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupSources2$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupSources2' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupSourcesMicrofrontendsProvider$inboundSchema:
  z.ZodNativeEnum<
    typeof GetMicrofrontendsInGroupSourcesMicrofrontendsProvider
  > = z.nativeEnum(GetMicrofrontendsInGroupSourcesMicrofrontendsProvider);

/** @internal */
export const GetMicrofrontendsInGroupSources1$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupSources1,
  z.ZodTypeDef,
  unknown
> = z.object({
  provider: GetMicrofrontendsInGroupSourcesMicrofrontendsProvider$inboundSchema,
  org: types.string(),
  repo: types.optional(types.string()),
});

export function getMicrofrontendsInGroupSources1FromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupSources1, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupSources1$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupSources1' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupSources$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupSources,
  z.ZodTypeDef,
  unknown
> = z.union([
  z.lazy(() => GetMicrofrontendsInGroupSources1$inboundSchema).and(
    z.object({ provider: z.literal("bitbucket") }),
  ),
  z.lazy(() => GetMicrofrontendsInGroupSources1$inboundSchema).and(
    z.object({ provider: z.literal("github") }),
  ),
  z.lazy(() => GetMicrofrontendsInGroupSources2$inboundSchema),
]);

export function getMicrofrontendsInGroupSourcesFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupSources, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupSources$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupSources' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupEnvironmentsMicrofrontends2$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupEnvironmentsMicrofrontends2,
    z.ZodTypeDef,
    unknown
  > = z.object({
    type: types.literal("custom"),
    environmentId: types.string(),
  });

export function getMicrofrontendsInGroupEnvironmentsMicrofrontends2FromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupEnvironmentsMicrofrontends2,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupEnvironmentsMicrofrontends2$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupEnvironmentsMicrofrontends2' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupEnvironmentsMicrofrontendsTarget$inboundSchema:
  z.ZodNativeEnum<
    typeof GetMicrofrontendsInGroupEnvironmentsMicrofrontendsTarget
  > = z.nativeEnum(GetMicrofrontendsInGroupEnvironmentsMicrofrontendsTarget);

/** @internal */
export const GetMicrofrontendsInGroupEnvironmentsMicrofrontends1$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupEnvironmentsMicrofrontends1,
    z.ZodTypeDef,
    unknown
  > = z.object({
    type: types.literal("system"),
    target:
      GetMicrofrontendsInGroupEnvironmentsMicrofrontendsTarget$inboundSchema,
  });

export function getMicrofrontendsInGroupEnvironmentsMicrofrontends1FromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupEnvironmentsMicrofrontends1,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupEnvironmentsMicrofrontends1$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupEnvironmentsMicrofrontends1' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupEnvironments$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupEnvironments,
  z.ZodTypeDef,
  unknown
> = z.union([
  z.lazy(() =>
    GetMicrofrontendsInGroupEnvironmentsMicrofrontends1$inboundSchema
  ),
  z.lazy(() =>
    GetMicrofrontendsInGroupEnvironmentsMicrofrontends2$inboundSchema
  ),
]);

export function getMicrofrontendsInGroupEnvironmentsFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupEnvironments, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupEnvironments$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupEnvironments' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupGitSources$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupGitSources,
  z.ZodTypeDef,
  unknown
> = z.object({
  sources: z.array(
    z.union([
      z.lazy(() => GetMicrofrontendsInGroupSources1$inboundSchema).and(
        z.object({ provider: z.literal("bitbucket") }),
      ),
      z.lazy(() => GetMicrofrontendsInGroupSources1$inboundSchema).and(
        z.object({ provider: z.literal("github") }),
      ),
      z.lazy(() => GetMicrofrontendsInGroupSources2$inboundSchema),
    ]),
  ),
  enabled: types.boolean(),
  environments: z.array(
    z.union([
      z.lazy(() =>
        GetMicrofrontendsInGroupEnvironmentsMicrofrontends1$inboundSchema
      ),
      z.lazy(() =>
        GetMicrofrontendsInGroupEnvironmentsMicrofrontends2$inboundSchema
      ),
    ]),
  ),
});

export function getMicrofrontendsInGroupGitSourcesFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupGitSources, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupGitSources$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupGitSources' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsSources$inboundSchema:
  z.ZodNativeEnum<typeof GetMicrofrontendsInGroupMicrofrontendsSources> = z
    .nativeEnum(GetMicrofrontendsInGroupMicrofrontendsSources);

/** @internal */
export const GetMicrofrontendsInGroupEnvironments2$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupEnvironments2,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("custom"),
  environmentId: types.string(),
});

export function getMicrofrontendsInGroupEnvironments2FromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupEnvironments2, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupEnvironments2$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupEnvironments2' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupEnvironmentsTarget$inboundSchema:
  z.ZodNativeEnum<typeof GetMicrofrontendsInGroupEnvironmentsTarget> = z
    .nativeEnum(GetMicrofrontendsInGroupEnvironmentsTarget);

/** @internal */
export const GetMicrofrontendsInGroupEnvironments1$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupEnvironments1,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("system"),
  target: GetMicrofrontendsInGroupEnvironmentsTarget$inboundSchema,
});

export function getMicrofrontendsInGroupEnvironments1FromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupEnvironments1, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupEnvironments1$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupEnvironments1' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsEnvironments$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupMicrofrontendsEnvironments,
    z.ZodTypeDef,
    unknown
  > = z.union([
    z.lazy(() => GetMicrofrontendsInGroupEnvironments1$inboundSchema),
    z.lazy(() => GetMicrofrontendsInGroupEnvironments2$inboundSchema),
  ]);

export function getMicrofrontendsInGroupMicrofrontendsEnvironmentsFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupMicrofrontendsEnvironments,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupMicrofrontendsEnvironments$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupMicrofrontendsEnvironments' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupDeploymentSources$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupDeploymentSources,
  z.ZodTypeDef,
  unknown
> = z.object({
  sources: z.array(GetMicrofrontendsInGroupMicrofrontendsSources$inboundSchema),
  enabled: types.boolean(),
  environments: z.array(
    z.union([
      z.lazy(() => GetMicrofrontendsInGroupEnvironments1$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupEnvironments2$inboundSchema),
    ]),
  ),
});

export function getMicrofrontendsInGroupDeploymentSourcesFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupDeploymentSources,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupDeploymentSources$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupDeploymentSources' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupDeploymentPolicy$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupDeploymentPolicy,
  z.ZodTypeDef,
  unknown
> = z.object({
  gitSources: z.nullable(
    z.array(z.lazy(() => GetMicrofrontendsInGroupGitSources$inboundSchema)),
  ).optional(),
  deploymentSources: z.nullable(
    z.array(
      z.lazy(() => GetMicrofrontendsInGroupDeploymentSources$inboundSchema),
    ),
  ).optional(),
});

export function getMicrofrontendsInGroupDeploymentPolicyFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupDeploymentPolicy,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupDeploymentPolicy$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupDeploymentPolicy' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupFlatRateTier$inboundSchema:
  z.ZodNativeEnum<typeof GetMicrofrontendsInGroupFlatRateTier> = z.nativeEnum(
    GetMicrofrontendsInGroupFlatRateTier,
  );

/** @internal */
export const GetMicrofrontendsInGroupKind$inboundSchema: z.ZodNativeEnum<
  typeof GetMicrofrontendsInGroupKind
> = z.nativeEnum(GetMicrofrontendsInGroupKind);

/** @internal */
export const GetMicrofrontendsInGroupUsageStatus$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupUsageStatus,
  z.ZodTypeDef,
  unknown
> = z.object({
  kind: GetMicrofrontendsInGroupKind$inboundSchema,
  exceededAllowanceUntil: types.optional(types.number()),
  bypassThrottleUntil: types.optional(types.number()),
  throttled: types.optional(types.boolean()),
});

export function getMicrofrontendsInGroupUsageStatusFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupUsageStatus, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupUsageStatus$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupUsageStatus' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupFeatures$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupFeatures,
  z.ZodTypeDef,
  unknown
> = z.object({
  webAnalytics: types.optional(types.boolean()),
});

export function getMicrofrontendsInGroupFeaturesFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupFeatures, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupFeatures$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupFeatures' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupHistory$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupHistory,
  z.ZodTypeDef,
  unknown
> = z.object({
  scanner: types.string(),
  reason: types.string(),
  by: types.string(),
  byId: types.string(),
  at: types.number(),
});

export function getMicrofrontendsInGroupHistoryFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupHistory, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupHistory$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupHistory' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsResponseAction$inboundSchema:
  z.ZodNativeEnum<typeof GetMicrofrontendsInGroupMicrofrontendsResponseAction> =
    z.nativeEnum(GetMicrofrontendsInGroupMicrofrontendsResponseAction);

/** @internal */
export const GetMicrofrontendsInGroupBlock$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupBlock,
  z.ZodTypeDef,
  unknown
> = z.object({
  action: GetMicrofrontendsInGroupMicrofrontendsResponseAction$inboundSchema,
  reason: types.string(),
  statusCode: types.number(),
  createdAt: types.number(),
  caseId: types.optional(types.string()),
  actor: types.optional(types.string()),
  comment: types.optional(types.string()),
  ineligibleForAppeal: types.optional(types.boolean()),
  isCascading: types.optional(types.boolean()),
});

export function getMicrofrontendsInGroupBlockFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupBlock, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupBlock$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupBlock' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupHasMicrofrontendsResponse200Value$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupHasMicrofrontendsResponse200Value,
    z.ZodTypeDef,
    unknown
  > = z.object({
    eq: types.string(),
  });

export function getMicrofrontendsInGroupHasMicrofrontendsResponse200ValueFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupHasMicrofrontendsResponse200Value,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupHasMicrofrontendsResponse200Value$inboundSchema
        .parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupHasMicrofrontendsResponse200Value' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupHasMicrofrontends2$inboundSchema:
  z.ZodType<GetMicrofrontendsInGroupHasMicrofrontends2, z.ZodTypeDef, unknown> =
    z.object({
      type: types.literal("host"),
      value: z.lazy(() =>
        GetMicrofrontendsInGroupHasMicrofrontendsResponse200Value$inboundSchema
      ),
    });

export function getMicrofrontendsInGroupHasMicrofrontends2FromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupHasMicrofrontends2,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupHasMicrofrontends2$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupHasMicrofrontends2' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupHasMicrofrontendsResponseKey$inboundSchema:
  z.ZodNativeEnum<typeof GetMicrofrontendsInGroupHasMicrofrontendsResponseKey> =
    z.nativeEnum(GetMicrofrontendsInGroupHasMicrofrontendsResponseKey);

/** @internal */
export const GetMicrofrontendsInGroupHasMicrofrontendsResponseValue$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupHasMicrofrontendsResponseValue,
    z.ZodTypeDef,
    unknown
  > = z.object({
    eq: types.string(),
  });

export function getMicrofrontendsInGroupHasMicrofrontendsResponseValueFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupHasMicrofrontendsResponseValue,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupHasMicrofrontendsResponseValue$inboundSchema
        .parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupHasMicrofrontendsResponseValue' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupHasMicrofrontends1$inboundSchema:
  z.ZodType<GetMicrofrontendsInGroupHasMicrofrontends1, z.ZodTypeDef, unknown> =
    z.object({
      type: types.literal("header"),
      key: GetMicrofrontendsInGroupHasMicrofrontendsResponseKey$inboundSchema,
      value: z.lazy(() =>
        GetMicrofrontendsInGroupHasMicrofrontendsResponseValue$inboundSchema
      ),
    });

export function getMicrofrontendsInGroupHasMicrofrontends1FromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupHasMicrofrontends1,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupHasMicrofrontends1$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupHasMicrofrontends1' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupRouteHas$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupRouteHas,
  z.ZodTypeDef,
  unknown
> = z.union([
  z.lazy(() => GetMicrofrontendsInGroupHasMicrofrontends1$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupHasMicrofrontends2$inboundSchema),
]);

export function getMicrofrontendsInGroupRouteHasFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupRouteHas, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupRouteHas$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupRouteHas' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupRouteAction$inboundSchema: z.ZodNativeEnum<
  typeof GetMicrofrontendsInGroupRouteAction
> = z.nativeEnum(GetMicrofrontendsInGroupRouteAction);

/** @internal */
export const GetMicrofrontendsInGroupRouteMitigate$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupRouteMitigate,
  z.ZodTypeDef,
  unknown
> = z.object({
  action: GetMicrofrontendsInGroupRouteAction$inboundSchema,
});

export function getMicrofrontendsInGroupRouteMitigateFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupRouteMitigate, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupRouteMitigate$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupRouteMitigate' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupRoute2$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupRoute2,
  z.ZodTypeDef,
  unknown
> = z.object({
  has: z.array(
    z.union([
      z.lazy(() => GetMicrofrontendsInGroupHasMicrofrontends1$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupHasMicrofrontends2$inboundSchema),
    ]),
  ),
  mitigate: z.lazy(() => GetMicrofrontendsInGroupRouteMitigate$inboundSchema),
  src: types.optional(types.string()),
});

export function getMicrofrontendsInGroupRoute2FromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupRoute2, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupRoute2$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupRoute2' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupRoute1$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupRoute1,
  z.ZodTypeDef,
  unknown
> = z.object({
  src: types.string(),
  status: types.number(),
});

export function getMicrofrontendsInGroupRoute1FromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupRoute1, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupRoute1$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupRoute1' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupBlockHistoryMicrofrontendsRoute$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupBlockHistoryMicrofrontendsRoute,
    z.ZodTypeDef,
    unknown
  > = smartUnion([
    z.lazy(() => GetMicrofrontendsInGroupRoute1$inboundSchema),
    z.lazy(() => GetMicrofrontendsInGroupRoute2$inboundSchema),
  ]);

export function getMicrofrontendsInGroupBlockHistoryMicrofrontendsRouteFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupBlockHistoryMicrofrontendsRoute,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupBlockHistoryMicrofrontendsRoute$inboundSchema
        .parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupBlockHistoryMicrofrontendsRoute' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupBlockHistory4$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupBlockHistory4,
  z.ZodTypeDef,
  unknown
> = z.object({
  action: types.literal("route-unblocked"),
  route: smartUnion([
    z.lazy(() => GetMicrofrontendsInGroupRoute1$inboundSchema),
    z.lazy(() => GetMicrofrontendsInGroupRoute2$inboundSchema),
  ]),
  statusCode: types.optional(types.number()),
  createdAt: types.number(),
  caseId: types.optional(types.string()),
  actor: types.optional(types.string()),
  comment: types.optional(types.string()),
  ineligibleForAppeal: types.optional(types.boolean()),
  isCascading: types.optional(types.boolean()),
});

export function getMicrofrontendsInGroupBlockHistory4FromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupBlockHistory4, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupBlockHistory4$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupBlockHistory4' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONResponseBodyValue$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONResponseBodyValue,
    z.ZodTypeDef,
    unknown
  > = z.object({
    eq: types.string(),
  });

export function getMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONResponseBodyValueFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONResponseBodyValue,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONResponseBodyValue$inboundSchema
        .parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONResponseBodyValue' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupHasMicrofrontendsResponse2$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupHasMicrofrontendsResponse2,
    z.ZodTypeDef,
    unknown
  > = z.object({
    type: types.literal("host"),
    value: z.lazy(() =>
      GetMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONResponseBodyValue$inboundSchema
    ),
  });

export function getMicrofrontendsInGroupHasMicrofrontendsResponse2FromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupHasMicrofrontendsResponse2,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupHasMicrofrontendsResponse2$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupHasMicrofrontendsResponse2' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupHasMicrofrontendsKey$inboundSchema:
  z.ZodNativeEnum<typeof GetMicrofrontendsInGroupHasMicrofrontendsKey> = z
    .nativeEnum(GetMicrofrontendsInGroupHasMicrofrontendsKey);

/** @internal */
export const GetMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONValue$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONValue,
    z.ZodTypeDef,
    unknown
  > = z.object({
    eq: types.string(),
  });

export function getMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONValueFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONValue,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONValue$inboundSchema
        .parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONValue' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupHasMicrofrontendsResponse1$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupHasMicrofrontendsResponse1,
    z.ZodTypeDef,
    unknown
  > = z.object({
    type: types.literal("header"),
    key: GetMicrofrontendsInGroupHasMicrofrontendsKey$inboundSchema,
    value: z.lazy(() =>
      GetMicrofrontendsInGroupHasMicrofrontendsResponse200ApplicationJSONValue$inboundSchema
    ),
  });

export function getMicrofrontendsInGroupHasMicrofrontendsResponse1FromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupHasMicrofrontendsResponse1,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupHasMicrofrontendsResponse1$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupHasMicrofrontendsResponse1' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupRouteMicrofrontendsHas$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupRouteMicrofrontendsHas,
    z.ZodTypeDef,
    unknown
  > = z.union([
    z.lazy(() =>
      GetMicrofrontendsInGroupHasMicrofrontendsResponse1$inboundSchema
    ),
    z.lazy(() =>
      GetMicrofrontendsInGroupHasMicrofrontendsResponse2$inboundSchema
    ),
  ]);

export function getMicrofrontendsInGroupRouteMicrofrontendsHasFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupRouteMicrofrontendsHas,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupRouteMicrofrontendsHas$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupRouteMicrofrontendsHas' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupRouteMicrofrontendsAction$inboundSchema:
  z.ZodNativeEnum<typeof GetMicrofrontendsInGroupRouteMicrofrontendsAction> = z
    .nativeEnum(GetMicrofrontendsInGroupRouteMicrofrontendsAction);

/** @internal */
export const GetMicrofrontendsInGroupRouteMicrofrontendsMitigate$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupRouteMicrofrontendsMitigate,
    z.ZodTypeDef,
    unknown
  > = z.object({
    action: GetMicrofrontendsInGroupRouteMicrofrontendsAction$inboundSchema,
  });

export function getMicrofrontendsInGroupRouteMicrofrontendsMitigateFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupRouteMicrofrontendsMitigate,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupRouteMicrofrontendsMitigate$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupRouteMicrofrontendsMitigate' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupRouteMicrofrontends2$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupRouteMicrofrontends2,
    z.ZodTypeDef,
    unknown
  > = z.object({
    has: z.array(
      z.union([
        z.lazy(() =>
          GetMicrofrontendsInGroupHasMicrofrontendsResponse1$inboundSchema
        ),
        z.lazy(() =>
          GetMicrofrontendsInGroupHasMicrofrontendsResponse2$inboundSchema
        ),
      ]),
    ),
    mitigate: z.lazy(() =>
      GetMicrofrontendsInGroupRouteMicrofrontendsMitigate$inboundSchema
    ),
    src: types.optional(types.string()),
  });

export function getMicrofrontendsInGroupRouteMicrofrontends2FromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupRouteMicrofrontends2,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupRouteMicrofrontends2$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupRouteMicrofrontends2' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupRouteMicrofrontends1$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupRouteMicrofrontends1,
    z.ZodTypeDef,
    unknown
  > = z.object({
    src: types.string(),
    status: types.number(),
  });

export function getMicrofrontendsInGroupRouteMicrofrontends1FromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupRouteMicrofrontends1,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupRouteMicrofrontends1$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupRouteMicrofrontends1' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupBlockHistoryRoute$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupBlockHistoryRoute,
  z.ZodTypeDef,
  unknown
> = smartUnion([
  z.lazy(() => GetMicrofrontendsInGroupRouteMicrofrontends1$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupRouteMicrofrontends2$inboundSchema),
]);

export function getMicrofrontendsInGroupBlockHistoryRouteFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupBlockHistoryRoute,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupBlockHistoryRoute$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupBlockHistoryRoute' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupBlockHistory3$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupBlockHistory3,
  z.ZodTypeDef,
  unknown
> = z.object({
  action: types.literal("route-blocked"),
  route: smartUnion([
    z.lazy(() => GetMicrofrontendsInGroupRouteMicrofrontends1$inboundSchema),
    z.lazy(() => GetMicrofrontendsInGroupRouteMicrofrontends2$inboundSchema),
  ]),
  reason: types.string(),
  createdAt: types.number(),
  caseId: types.optional(types.string()),
  actor: types.optional(types.string()),
  comment: types.optional(types.string()),
  ineligibleForAppeal: types.optional(types.boolean()),
  isCascading: types.optional(types.boolean()),
});

export function getMicrofrontendsInGroupBlockHistory3FromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupBlockHistory3, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupBlockHistory3$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupBlockHistory3' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupBlockHistory2$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupBlockHistory2,
  z.ZodTypeDef,
  unknown
> = z.object({
  action: types.literal("unblocked"),
  createdAt: types.number(),
  caseId: types.optional(types.string()),
  actor: types.optional(types.string()),
  comment: types.optional(types.string()),
  ineligibleForAppeal: types.optional(types.boolean()),
  isCascading: types.optional(types.boolean()),
});

export function getMicrofrontendsInGroupBlockHistory2FromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupBlockHistory2, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupBlockHistory2$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupBlockHistory2' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupBlockHistory1$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupBlockHistory1,
  z.ZodTypeDef,
  unknown
> = z.object({
  action: types.literal("blocked"),
  reason: types.string(),
  statusCode: types.number(),
  createdAt: types.number(),
  caseId: types.optional(types.string()),
  actor: types.optional(types.string()),
  comment: types.optional(types.string()),
  ineligibleForAppeal: types.optional(types.boolean()),
  isCascading: types.optional(types.boolean()),
});

export function getMicrofrontendsInGroupBlockHistory1FromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupBlockHistory1, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupBlockHistory1$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupBlockHistory1' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupBlockHistory$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupBlockHistory,
  z.ZodTypeDef,
  unknown
> = z.union([
  z.lazy(() => GetMicrofrontendsInGroupBlockHistory1$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupBlockHistory2$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupBlockHistory3$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupBlockHistory4$inboundSchema),
]);

export function getMicrofrontendsInGroupBlockHistoryFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupBlockHistory, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupBlockHistory$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupBlockHistory' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsAction$inboundSchema:
  z.ZodNativeEnum<typeof GetMicrofrontendsInGroupMicrofrontendsAction> = z
    .nativeEnum(GetMicrofrontendsInGroupMicrofrontendsAction);

/** @internal */
export const GetMicrofrontendsInGroupInterstitialHistory$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupInterstitialHistory,
    z.ZodTypeDef,
    unknown
  > = z.object({
    action: GetMicrofrontendsInGroupMicrofrontendsAction$inboundSchema,
    createdAt: types.number(),
    caseId: types.optional(types.string()),
    reason: types.optional(types.string()),
    actor: types.optional(types.string()),
    comment: types.optional(types.string()),
  });

export function getMicrofrontendsInGroupInterstitialHistoryFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupInterstitialHistory,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupInterstitialHistory$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupInterstitialHistory' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupAbuse$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupAbuse,
  z.ZodTypeDef,
  unknown
> = z.object({
  scanner: types.optional(types.string()),
  history: z.array(z.lazy(() => GetMicrofrontendsInGroupHistory$inboundSchema)),
  updatedAt: types.number(),
  block: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupBlock$inboundSchema),
  ),
  blockHistory: types.optional(
    z.array(z.union([
      z.lazy(() => GetMicrofrontendsInGroupBlockHistory1$inboundSchema),
      z.lazy(() =>
        GetMicrofrontendsInGroupBlockHistory2$inboundSchema
      ),
      z.lazy(() => GetMicrofrontendsInGroupBlockHistory3$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupBlockHistory4$inboundSchema),
    ])),
  ),
  interstitial: types.optional(types.boolean()),
  interstitialHistory: types.optional(
    z.array(z.lazy(() =>
      GetMicrofrontendsInGroupInterstitialHistory$inboundSchema
    )),
  ),
});

export function getMicrofrontendsInGroupAbuseFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupAbuse, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupAbuse$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupAbuse' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupHasMicrofrontendsValue$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupHasMicrofrontendsValue,
    z.ZodTypeDef,
    unknown
  > = z.object({
    eq: types.string(),
  });

export function getMicrofrontendsInGroupHasMicrofrontendsValueFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupHasMicrofrontendsValue,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupHasMicrofrontendsValue$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupHasMicrofrontendsValue' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupHas2$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupHas2,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("host"),
  value: z.lazy(() =>
    GetMicrofrontendsInGroupHasMicrofrontendsValue$inboundSchema
  ),
});

export function getMicrofrontendsInGroupHas2FromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupHas2, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupHas2$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupHas2' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupHasKey$inboundSchema: z.ZodNativeEnum<
  typeof GetMicrofrontendsInGroupHasKey
> = z.nativeEnum(GetMicrofrontendsInGroupHasKey);

/** @internal */
export const GetMicrofrontendsInGroupHasValue$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupHasValue,
  z.ZodTypeDef,
  unknown
> = z.object({
  eq: types.string(),
});

export function getMicrofrontendsInGroupHasValueFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupHasValue, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupHasValue$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupHasValue' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupHas1$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupHas1,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("header"),
  key: GetMicrofrontendsInGroupHasKey$inboundSchema,
  value: z.lazy(() => GetMicrofrontendsInGroupHasValue$inboundSchema),
});

export function getMicrofrontendsInGroupHas1FromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupHas1, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupHas1$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupHas1' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupInternalRoutesHas$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupInternalRoutesHas,
  z.ZodTypeDef,
  unknown
> = z.union([
  z.lazy(() => GetMicrofrontendsInGroupHas1$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupHas2$inboundSchema),
]);

export function getMicrofrontendsInGroupInternalRoutesHasFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupInternalRoutesHas,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupInternalRoutesHas$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupInternalRoutesHas' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupInternalRoutesAction$inboundSchema:
  z.ZodNativeEnum<typeof GetMicrofrontendsInGroupInternalRoutesAction> = z
    .nativeEnum(GetMicrofrontendsInGroupInternalRoutesAction);

/** @internal */
export const GetMicrofrontendsInGroupInternalRoutesMitigate$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupInternalRoutesMitigate,
    z.ZodTypeDef,
    unknown
  > = z.object({
    action: GetMicrofrontendsInGroupInternalRoutesAction$inboundSchema,
  });

export function getMicrofrontendsInGroupInternalRoutesMitigateFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupInternalRoutesMitigate,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupInternalRoutesMitigate$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupInternalRoutesMitigate' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupInternalRoutes2$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupInternalRoutes2,
  z.ZodTypeDef,
  unknown
> = z.object({
  has: z.array(
    z.union([
      z.lazy(() => GetMicrofrontendsInGroupHas1$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupHas2$inboundSchema),
    ]),
  ),
  mitigate: z.lazy(() =>
    GetMicrofrontendsInGroupInternalRoutesMitigate$inboundSchema
  ),
  src: types.optional(types.string()),
});

export function getMicrofrontendsInGroupInternalRoutes2FromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupInternalRoutes2,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupInternalRoutes2$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupInternalRoutes2' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupInternalRoutes1$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupInternalRoutes1,
  z.ZodTypeDef,
  unknown
> = z.object({
  src: types.string(),
  status: types.number(),
});

export function getMicrofrontendsInGroupInternalRoutes1FromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupInternalRoutes1,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupInternalRoutes1$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupInternalRoutes1' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupInternalRoutes$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupInternalRoutes,
  z.ZodTypeDef,
  unknown
> = smartUnion([
  z.lazy(() => GetMicrofrontendsInGroupInternalRoutes1$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupInternalRoutes2$inboundSchema),
]);

export function getMicrofrontendsInGroupInternalRoutesFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupInternalRoutes, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupInternalRoutes$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupInternalRoutes' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupAction$inboundSchema: z.ZodNativeEnum<
  typeof GetMicrofrontendsInGroupAction
> = z.nativeEnum(GetMicrofrontendsInGroupAction);

/** @internal */
export const GetMicrofrontendsInGroupValuePreviousValue$inboundSchema:
  z.ZodType<GetMicrofrontendsInGroupValuePreviousValue, z.ZodTypeDef, unknown> =
    smartUnion([types.string(), types.number(), types.boolean()]);

export function getMicrofrontendsInGroupValuePreviousValueFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupValuePreviousValue,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupValuePreviousValue$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupValuePreviousValue' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupValueCurrentValue$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupValueCurrentValue,
  z.ZodTypeDef,
  unknown
> = smartUnion([types.string(), types.number(), types.boolean()]);

export function getMicrofrontendsInGroupValueCurrentValueFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupValueCurrentValue,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupValueCurrentValue$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupValueCurrentValue' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupValue3$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupValue3,
  z.ZodTypeDef,
  unknown
> = z.object({
  previousValue: smartUnion([types.string(), types.number(), types.boolean()]),
  currentValue: smartUnion([types.string(), types.number(), types.boolean()]),
});

export function getMicrofrontendsInGroupValue3FromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupValue3, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupValue3$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupValue3' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupValue$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupValue,
  z.ZodTypeDef,
  unknown
> = smartUnion([
  z.lazy(() => GetMicrofrontendsInGroupValue3$inboundSchema),
  types.string(),
  types.number(),
  types.boolean(),
]);

export function getMicrofrontendsInGroupValueFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupValue, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupValue$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupValue' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupDismissedToasts$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupDismissedToasts,
  z.ZodTypeDef,
  unknown
> = z.object({
  key: types.string(),
  dismissedAt: types.number(),
  action: GetMicrofrontendsInGroupAction$inboundSchema,
  value: types.nullable(
    smartUnion([
      z.lazy(() => GetMicrofrontendsInGroupValue3$inboundSchema),
      types.string(),
      types.number(),
      types.boolean(),
    ]),
  ),
});

export function getMicrofrontendsInGroupDismissedToastsFromJSON(
  jsonString: string,
): SafeParseResult<
  GetMicrofrontendsInGroupDismissedToasts,
  SDKValidationError
> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupDismissedToasts$inboundSchema.parse(
        JSON.parse(x),
      ),
    `Failed to parse 'GetMicrofrontendsInGroupDismissedToasts' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsEnv$inboundSchema:
  z.ZodNativeEnum<typeof GetMicrofrontendsInGroupMicrofrontendsEnv> = z
    .nativeEnum(GetMicrofrontendsInGroupMicrofrontendsEnv);

/** @internal */
export const GetMicrofrontendsInGroupSamplingRules$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupSamplingRules,
  z.ZodTypeDef,
  unknown
> = z.object({
  rate: types.number(),
  env: types.optional(GetMicrofrontendsInGroupMicrofrontendsEnv$inboundSchema),
  requestPath: types.optional(types.string()),
});

export function getMicrofrontendsInGroupSamplingRulesFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupSamplingRules, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupSamplingRules$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupSamplingRules' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupTracing$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupTracing,
  z.ZodTypeDef,
  unknown
> = z.object({
  domains: types.optional(types.string()),
  ignorePaths: types.optional(z.array(types.string())),
  samplingRules: types.optional(
    z.array(z.lazy(() => GetMicrofrontendsInGroupSamplingRules$inboundSchema)),
  ),
});

export function getMicrofrontendsInGroupTracingFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupTracing, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupTracing$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupTracing' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupProjects$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupProjects,
  z.ZodTypeDef,
  unknown
> = z.object({
  accountId: types.string(),
  analytics: types.optional(GetMicrofrontendsInGroupAnalytics$inboundSchema),
  appliedCve55182Migration: types.optional(types.boolean()),
  speedInsights: types.optional(
    GetMicrofrontendsInGroupSpeedInsights$inboundSchema,
  ),
  autoExposeSystemEnvs: types.optional(types.boolean()),
  autoAssignCustomDomains: types.optional(types.boolean()),
  autoAssignCustomDomainsUpdatedBy: types.optional(types.string()),
  buildCommand: z.nullable(types.string()).optional(),
  commandForIgnoringBuildStep: z.nullable(types.string()).optional(),
  connectConfigurations: z.nullable(
    z.array(GetMicrofrontendsInGroupConnectConfigurations$inboundSchema),
  ).optional(),
  connectConfigurationId: z.nullable(types.string()).optional(),
  connectBuildsEnabled: types.optional(types.boolean()),
  passiveConnectConfigurationId: z.nullable(types.string()).optional(),
  createdAt: types.optional(types.number()),
  customerSupportCodeVisibility: types.optional(types.boolean()),
  crons: types.optional(GetMicrofrontendsInGroupCrons$inboundSchema),
  dataCache: types.optional(GetMicrofrontendsInGroupDataCache$inboundSchema),
  deploymentExpiration:
    GetMicrofrontendsInGroupDeploymentExpiration$inboundSchema,
  expiration: types.optional(GetMicrofrontendsInGroupExpiration$inboundSchema),
  devCommand: z.nullable(types.string()).optional(),
  directoryListing: types.boolean(),
  installCommand: z.nullable(types.string()).optional(),
  env: types.optional(z.array(GetMicrofrontendsInGroupEnv$inboundSchema)),
  customEnvironments: types.optional(
    z.array(GetMicrofrontendsInGroupCustomEnvironments$inboundSchema),
  ),
  framework: z.nullable(GetMicrofrontendsInGroupFramework$inboundSchema)
    .optional(),
  services: types.optional(
    z.array(GetMicrofrontendsInGroupServices$inboundSchema),
  ),
  gitForkProtection: types.optional(types.boolean()),
  gitLFS: types.optional(types.boolean()),
  id: types.string(),
  ipBuckets: types.optional(
    z.array(GetMicrofrontendsInGroupIpBuckets$inboundSchema),
  ),
  jobs: types.optional(GetMicrofrontendsInGroupJobs$inboundSchema),
  latestDeployments: types.optional(
    z.array(GetMicrofrontendsInGroupLatestDeployments$inboundSchema),
  ),
  link: types.optional(GetMicrofrontendsInGroupLink$inboundSchema),
  microfrontends: types.optional(
    GetMicrofrontendsInGroupMicrofrontends$inboundSchema,
  ),
  name: types.string(),
  nodeVersion: GetMicrofrontendsInGroupNodeVersion$inboundSchema,
  optionsAllowlist: z.nullable(
    GetMicrofrontendsInGroupOptionsAllowlist$inboundSchema,
  ).optional(),
  outputDirectory: z.nullable(types.string()).optional(),
  passwordProtection: z.nullable(
    GetMicrofrontendsInGroupPasswordProtection$inboundSchema,
  ).optional(),
  passport: z.nullable(GetMicrofrontendsInGroupPassport$inboundSchema)
    .optional(),
  protectionConfig: types.optional(
    GetMicrofrontendsInGroupProtectionConfig$inboundSchema,
  ),
  productionDeploymentsFastLane: types.optional(types.boolean()),
  resourceConfig: GetMicrofrontendsInGroupResourceConfig$inboundSchema,
  rollbackDescription: types.optional(
    GetMicrofrontendsInGroupRollbackDescription$inboundSchema,
  ),
  rollingRelease: z.nullable(
    GetMicrofrontendsInGroupRollingRelease$inboundSchema,
  ).optional(),
  defaultResourceConfig:
    GetMicrofrontendsInGroupDefaultResourceConfig$inboundSchema,
  rootDirectory: z.nullable(types.string()).optional(),
  serverlessFunctionZeroConfigFailover: types.optional(types.boolean()),
  skewProtectionBoundaryAt: types.optional(types.number()),
  skewProtectionMaxAge: types.optional(types.number()),
  skewProtectionAllowedDomains: types.optional(z.array(types.string())),
  skipGitConnectDuringLink: types.optional(types.boolean()),
  staticIps: types.optional(GetMicrofrontendsInGroupStaticIps$inboundSchema),
  sourceFilesOutsideRootDirectory: types.optional(types.boolean()),
  enableAffectedProjectsDeployments: types.optional(types.boolean()),
  enableExternalRewriteCaching: types.optional(types.boolean()),
  ssoProtection: z.nullable(GetMicrofrontendsInGroupSsoProtection$inboundSchema)
    .optional(),
  targets: types.optional(
    z.record(types.nullable(GetMicrofrontendsInGroupTargets$inboundSchema)),
  ),
  transferCompletedAt: types.optional(types.number()),
  transferStartedAt: types.optional(types.number()),
  transferToAccountId: types.optional(types.string()),
  transferredFromAccountId: types.optional(types.string()),
  updatedAt: types.optional(types.number()),
  live: types.optional(types.boolean()),
  enablePreviewFeedback: z.nullable(types.boolean()).optional(),
  enableProductionFeedback: z.nullable(types.boolean()).optional(),
  permissions: types.optional(
    GetMicrofrontendsInGroupPermissions$inboundSchema,
  ),
  lastRollbackTarget: z.nullable(
    GetMicrofrontendsInGroupLastRollbackTarget$inboundSchema,
  ).optional(),
  lastAliasRequest: z.nullable(
    GetMicrofrontendsInGroupLastAliasRequest$inboundSchema,
  ).optional(),
  protectionBypass: types.optional(
    z.record(GetMicrofrontendsInGroupProtectionBypass$inboundSchema),
  ),
  hasActiveBranches: types.optional(types.boolean()),
  trustedIps: z.nullable(GetMicrofrontendsInGroupTrustedIps$inboundSchema)
    .optional(),
  trustedSources: z.nullable(
    z.lazy(() => GetMicrofrontendsInGroupTrustedSources$inboundSchema),
  ).optional(),
  gitComments: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupGitComments$inboundSchema),
  ),
  gitProviderOptions: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupGitProviderOptions$inboundSchema),
  ),
  paused: types.optional(types.boolean()),
  concurrencyBucketName: types.optional(types.string()),
  webAnalytics: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupWebAnalytics$inboundSchema),
  ),
  security: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupSecurity$inboundSchema),
  ),
  oidcTokenConfig: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupOidcTokenConfig$inboundSchema),
  ),
  deploymentPolicy: z.nullable(
    z.lazy(() => GetMicrofrontendsInGroupDeploymentPolicy$inboundSchema),
  ).optional(),
  tier: types.optional(types.string()),
  flatRateTier: types.optional(
    GetMicrofrontendsInGroupFlatRateTier$inboundSchema,
  ),
  usageStatus: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupUsageStatus$inboundSchema),
  ),
  features: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupFeatures$inboundSchema),
  ),
  v0: types.optional(types.boolean()),
  v0Created: types.optional(types.boolean()),
  abuse: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupAbuse$inboundSchema),
  ),
  internalRoutes: types.optional(
    z.array(smartUnion([
      z.lazy(() => GetMicrofrontendsInGroupInternalRoutes1$inboundSchema),
      z.lazy(() =>
        GetMicrofrontendsInGroupInternalRoutes2$inboundSchema
      ),
    ])),
  ),
  hasDeployments: types.optional(types.boolean()),
  dismissedToasts: types.optional(
    z.array(
      z.lazy(() => GetMicrofrontendsInGroupDismissedToasts$inboundSchema),
    ),
  ),
  protectedSourcemaps: types.optional(types.boolean()),
  tracing: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupTracing$inboundSchema),
  ),
  avatar: z.nullable(types.string()).optional(),
});

export function getMicrofrontendsInGroupProjectsFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupProjects, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) => GetMicrofrontendsInGroupProjects$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupProjects' from JSON`,
  );
}

/** @internal */
export const GetMicrofrontendsInGroupResponseBody$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupResponseBody,
  z.ZodTypeDef,
  unknown
> = z.object({
  projects: z.array(
    z.lazy(() => GetMicrofrontendsInGroupProjects$inboundSchema),
  ),
});

export function getMicrofrontendsInGroupResponseBodyFromJSON(
  jsonString: string,
): SafeParseResult<GetMicrofrontendsInGroupResponseBody, SDKValidationError> {
  return safeParse(
    jsonString,
    (x) =>
      GetMicrofrontendsInGroupResponseBody$inboundSchema.parse(JSON.parse(x)),
    `Failed to parse 'GetMicrofrontendsInGroupResponseBody' from JSON`,
  );
}