/*
 * 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 { SDKValidationError } from "./sdkvalidationerror.js";

export type GetMicrofrontendsInGroupRequest = {
  groupId: string;
  /**
   * The Team identifier to perform the request on behalf of.
   */
  teamId?: string | undefined;
  /**
   * The Team slug to perform the request on behalf of.
   */
  slug?: string | undefined;
};

export type GetMicrofrontendsInGroupCreator4 = {
  type: "system";
};

export type GetMicrofrontendsInGroupCreatorIntegration = {
  integrationId: string;
  configurationId: string;
};

export type GetMicrofrontendsInGroupCreator3 = {
  type: "integration";
  integration: GetMicrofrontendsInGroupCreatorIntegration;
};

export type GetMicrofrontendsInGroupCreatorApp = {
  /**
   * The internal ID of the Vercel App backing this principal.
   */
  id: string;
  /**
   * The protocol-facing OAuth client ID. This may differ from {@link id} when Client ID Metadata Documents (CIMD) are used.
   */
  clientId?: string | undefined;
};

export type GetMicrofrontendsInGroupCreator2 = {
  type: "app";
  app: GetMicrofrontendsInGroupCreatorApp;
};

export type GetMicrofrontendsInGroupViaIntegration = {
  integrationId: string;
  configurationId: string;
};

/**
 * Set when a Vercel App or Integration acts on behalf of a {@link User}. Captures user-consented OAuth delegation that the ACL layer may inspect to evaluate scope restrictions. This is NOT for impersonation or token-exchange provenance — those live on `auth.token`, not on the principal.
 */
export type GetMicrofrontendsInGroupVia2 = {
  type: "integration";
  integration: GetMicrofrontendsInGroupViaIntegration;
};

export type GetMicrofrontendsInGroupViaApp = {
  /**
   * The internal ID of the Vercel App backing this principal.
   */
  id: string;
  /**
   * The protocol-facing OAuth client ID. This may differ from {@link id} when Client ID Metadata Documents (CIMD) are used.
   */
  clientId?: string | undefined;
};

/**
 * Set when a Vercel App or Integration acts on behalf of a {@link User}. Captures user-consented OAuth delegation that the ACL layer may inspect to evaluate scope restrictions. This is NOT for impersonation or token-exchange provenance — those live on `auth.token`, not on the principal.
 */
export type GetMicrofrontendsInGroupVia1 = {
  type: "app";
  app: GetMicrofrontendsInGroupViaApp;
};

export type GetMicrofrontendsInGroupCreatorVia =
  | GetMicrofrontendsInGroupVia1
  | GetMicrofrontendsInGroupVia2;

export type GetMicrofrontendsInGroupCreatorUser = {
  id: string;
};

export type GetMicrofrontendsInGroupCreator1 = {
  type: "user";
  via: GetMicrofrontendsInGroupVia1 | GetMicrofrontendsInGroupVia2 | null;
  user: GetMicrofrontendsInGroupCreatorUser;
};

export type GetMicrofrontendsInGroupCreator =
  | GetMicrofrontendsInGroupCreator1
  | GetMicrofrontendsInGroupCreator2
  | GetMicrofrontendsInGroupCreator3
  | GetMicrofrontendsInGroupCreator4;

export const GetMicrofrontendsInGroupConfiguredBy = {
  A: "A",
  Cname: "CNAME",
  Dns01: "dns-01",
  Http: "http",
} as const;
export type GetMicrofrontendsInGroupConfiguredBy = ClosedEnum<
  typeof GetMicrofrontendsInGroupConfiguredBy
>;

export type GetMicrofrontendsInGroupMicrofrontendsResponseAliasAssigned =
  | number
  | boolean;

export type GetMicrofrontendsInGroupMicrofrontendsResponseAliasError = {
  code: string;
  message: string;
};

/**
 * The type of matching to perform
 */
export const GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAliasDeploymentType =
  {
    EndsWith: "endsWith",
    Equals: "equals",
    StartsWith: "startsWith",
  } as const;
/**
 * The type of matching to perform
 */
export type GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAliasDeploymentType =
  ClosedEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAliasDeploymentType
  >;

export type GetMicrofrontendsInGroupMicrofrontendsResponse200BranchMatcher = {
  /**
   * The type of matching to perform
   */
  type:
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAliasDeploymentType;
  /**
   * The pattern to match against branch names
   */
  pattern: string;
};

export type GetMicrofrontendsInGroupMicrofrontendsResponseBuilds = {
  use: string;
  src?: string | undefined;
  dest?: string | undefined;
};

export const GetMicrofrontendsInGroupMicrofrontendsResponseChecksConclusion = {
  Canceled: "canceled",
  Failed: "failed",
  Skipped: "skipped",
  Succeeded: "succeeded",
} as const;
export type GetMicrofrontendsInGroupMicrofrontendsResponseChecksConclusion =
  ClosedEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponseChecksConclusion
  >;

export const GetMicrofrontendsInGroupMicrofrontendsResponseChecksState = {
  Completed: "completed",
  Registered: "registered",
  Running: "running",
} as const;
export type GetMicrofrontendsInGroupMicrofrontendsResponseChecksState =
  ClosedEnum<typeof GetMicrofrontendsInGroupMicrofrontendsResponseChecksState>;

export type GetMicrofrontendsInGroupMicrofrontendsResponse200Creator = {
  email: string;
  githubLogin?: string | undefined;
  gitlabLogin?: string | undefined;
  uid: string;
  username: string;
};

export type GetMicrofrontendsInGroupMicrofrontendsResponseOidcTokenClaims = {
  iss: string;
  sub: string;
  scope: string;
  aud: string;
  owner: string;
  ownerId: string;
  project: string;
  projectId: string;
  environment: string;
  customEnvironmentId?: string | undefined;
  mfeGroupIds?: Array<string> | undefined;
  plan?: string | undefined;
};

export const GetMicrofrontendsInGroupMicrofrontendsResponsePlan = {
  Enterprise: "enterprise",
  Hobby: "hobby",
  Pro: "pro",
} as const;
export type GetMicrofrontendsInGroupMicrofrontendsResponsePlan = ClosedEnum<
  typeof GetMicrofrontendsInGroupMicrofrontendsResponsePlan
>;

export const GetMicrofrontendsInGroupMicrofrontendsResponseReadyState = {
  Blocked: "BLOCKED",
  Building: "BUILDING",
  Canceled: "CANCELED",
  Error: "ERROR",
  Initializing: "INITIALIZING",
  Queued: "QUEUED",
  Ready: "READY",
} as const;
export type GetMicrofrontendsInGroupMicrofrontendsResponseReadyState =
  ClosedEnum<typeof GetMicrofrontendsInGroupMicrofrontendsResponseReadyState>;

export const GetMicrofrontendsInGroupMicrofrontendsResponseReadySubstate = {
  Promoted: "PROMOTED",
  Rolling: "ROLLING",
  Staged: "STAGED",
} as const;
export type GetMicrofrontendsInGroupMicrofrontendsResponseReadySubstate =
  ClosedEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponseReadySubstate
  >;

export const GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAliasType =
  {
    Lambdas: "LAMBDAS",
  } as const;
export type GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAliasType =
  ClosedEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAliasType
  >;

export type GetMicrofrontendsInGroupDeployment = {
  id: string;
  alias?: Array<string> | undefined;
  aliasAssigned?: number | boolean | null | undefined;
  aliasError?:
    | GetMicrofrontendsInGroupMicrofrontendsResponseAliasError
    | null
    | undefined;
  aliasFinal?: string | null | undefined;
  automaticAliases?: Array<string> | undefined;
  branchMatcher?:
    | GetMicrofrontendsInGroupMicrofrontendsResponse200BranchMatcher
    | undefined;
  buildingAt?: number | undefined;
  builds?:
    | Array<GetMicrofrontendsInGroupMicrofrontendsResponseBuilds>
    | undefined;
  checksConclusion?:
    | GetMicrofrontendsInGroupMicrofrontendsResponseChecksConclusion
    | undefined;
  checksState?:
    | GetMicrofrontendsInGroupMicrofrontendsResponseChecksState
    | undefined;
  connectBuildsEnabled?: boolean | undefined;
  connectConfigurationId?: string | undefined;
  createdAt: number;
  createdIn: string;
  creator: GetMicrofrontendsInGroupMicrofrontendsResponse200Creator | null;
  deletedAt?: number | undefined;
  deploymentHostname: string;
  forced?: boolean | undefined;
  name: string;
  meta?: { [k: string]: string } | undefined;
  monorepoManager?: string | null | undefined;
  oidcTokenClaims?:
    | GetMicrofrontendsInGroupMicrofrontendsResponseOidcTokenClaims
    | undefined;
  plan: GetMicrofrontendsInGroupMicrofrontendsResponsePlan;
  /**
   * Whether or not preview comments are enabled for the deployment
   */
  previewCommentsEnabled?: boolean | undefined;
  private: boolean;
  readyAt?: number | undefined;
  readyState: GetMicrofrontendsInGroupMicrofrontendsResponseReadyState;
  readySubstate?:
    | GetMicrofrontendsInGroupMicrofrontendsResponseReadySubstate
    | undefined;
  requestedAt?: number | undefined;
  target?: string | null | undefined;
  teamId?: string | null | undefined;
  type:
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAliasType;
  url: string;
  /**
   * Present for user creators; omitted for app/integration/system creators.
   */
  userId?: string | undefined;
  withCache?: boolean | undefined;
};

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

export const GetMicrofrontendsInGroupTarget = {
  Preview: "PREVIEW",
  Production: "PRODUCTION",
  Staging: "STAGING",
} as const;
export type GetMicrofrontendsInGroupTarget = ClosedEnum<
  typeof GetMicrofrontendsInGroupTarget
>;

export type GetMicrofrontendsInGroupAlias = {
  configuredBy?: GetMicrofrontendsInGroupConfiguredBy | null | undefined;
  configuredChangedAt?: number | null | undefined;
  createdAt?: number | null | undefined;
  deployment: GetMicrofrontendsInGroupDeployment | null;
  domain: string;
  environment: GetMicrofrontendsInGroupEnvironment;
  gitBranch?: string | null | undefined;
  redirect?: string | null | undefined;
  redirectStatusCode?: number | null | undefined;
  target: GetMicrofrontendsInGroupTarget;
};

export type GetMicrofrontendsInGroupAnalytics = {
  id: string;
  canceledAt?: number | null | undefined;
  disabledAt: number;
  enabledAt: number;
  paidAt?: number | undefined;
  sampleRatePercent?: number | null | undefined;
  spendLimitInDollars?: number | null | undefined;
};

export type GetMicrofrontendsInGroupSpeedInsights = {
  id: string;
  enabledAt?: number | undefined;
  disabledAt?: number | undefined;
  canceledAt?: number | undefined;
  hasData?: boolean | undefined;
  /**
   * When the first free (not Speed Insights Plus) production data point was observed, in ms. Set once by subscriber-analytics-events; projects that already had data before this field shipped get it backfilled on their next batch, so it reads "first free data point observed", not necessarily "first ever".
   */
  dataReceivedAt?: number | undefined;
  paidAt?: number | undefined;
};

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

export type GetMicrofrontendsInGroupEnvId =
  | string
  | GetMicrofrontendsInGroupEnvId2;

export type GetMicrofrontendsInGroupAws = {
  subnetIds: Array<string>;
  securityGroupId?: string | undefined;
};

export type GetMicrofrontendsInGroupConnectConfigurations = {
  envId: string | GetMicrofrontendsInGroupEnvId2;
  connectConfigurationId: string;
  dc?: string | undefined;
  passive: boolean;
  buildsEnabled: boolean;
  aws?: GetMicrofrontendsInGroupAws | undefined;
  createdAt: number;
  updatedAt: number;
};

/**
 * The origin of this definition. 'api' means created via the API. Undefined means it originated from a deployment (vercel.json).
 */
export const GetMicrofrontendsInGroupSource = {
  Api: "api",
} as const;
/**
 * The origin of this definition. 'api' means created via the API. Undefined means it originated from a deployment (vercel.json).
 */
export type GetMicrofrontendsInGroupSource = ClosedEnum<
  typeof GetMicrofrontendsInGroupSource
>;

export type GetMicrofrontendsInGroupDefinitions = {
  /**
   * The hostname that should be used.
   */
  host: string;
  /**
   * The path that should be called for the cronjob.
   */
  path: string;
  /**
   * The cron expression.
   */
  schedule: string;
  /**
   * The origin of this definition. 'api' means created via the API. Undefined means it originated from a deployment (vercel.json).
   */
  source?: GetMicrofrontendsInGroupSource | undefined;
  /**
   * A human-readable description of what this cron job does.
   */
  description?: string | undefined;
  /**
   * Whether the host was inferred from the production deployment URL rather than explicitly provided.
   */
  hostInferred?: boolean | undefined;
};

export type GetMicrofrontendsInGroupCrons = {
  /**
   * The time the feature was enabled for this project. Note: It enables automatically with the first Deployment that outputs cronjobs.
   */
  enabledAt: number;
  /**
   * The time the feature was disabled for this project.
   */
  disabledAt: number | null;
  updatedAt: number;
  /**
   * The ID of the Deployment from which the definitions originated.
   */
  deploymentId: string | null;
  definitions: Array<GetMicrofrontendsInGroupDefinitions>;
};

export type GetMicrofrontendsInGroupDataCache = {
  userDisabled: boolean;
  storageSizeBytes?: number | null | undefined;
  unlimited?: boolean | 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.
 */
export type GetMicrofrontendsInGroupDeploymentExpiration = {
  /**
   * Number of days to keep non-production deployments (mostly preview deployments) before soft deletion.
   */
  expirationDays?: number | undefined;
  /**
   * Number of days to keep production deployments before soft deletion.
   */
  expirationDaysProduction?: number | undefined;
  /**
   * Number of days to keep canceled deployments before soft deletion.
   */
  expirationDaysCanceled?: number | undefined;
  /**
   * Number of days to keep errored deployments before soft deletion.
   */
  expirationDaysErrored?: number | undefined;
  /**
   * Minimum number of production deployments to keep for this project, even if they are over the production expiration limit.
   */
  deploymentsToKeep?: number | undefined;
};

export type GetMicrofrontendsInGroupExpiration2 = {
  /**
   * Unix ms timestamp when the project was locked.
   */
  lockedAt: number;
  /**
   * userId of the actor that triggered the lock (system or admin).
   */
  lockedBy: string;
};

export type GetMicrofrontendsInGroupExpiration1 = {
  /**
   * Unix ms timestamp when the project is scheduled to expire.
   */
  expiresAt: number;
};

export type GetMicrofrontendsInGroupExpiration =
  | GetMicrofrontendsInGroupExpiration2
  | GetMicrofrontendsInGroupExpiration1;

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

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

export type GetMicrofrontendsInGroupMicrofrontendsTarget =
  | Array<GetMicrofrontendsInGroupTarget1>
  | GetMicrofrontendsInGroupTarget2;

export const GetMicrofrontendsInGroupType = {
  Encrypted: "encrypted",
  Plain: "plain",
  Secret: "secret",
  Sensitive: "sensitive",
  System: "system",
} as const;
export type GetMicrofrontendsInGroupType = ClosedEnum<
  typeof GetMicrofrontendsInGroupType
>;

/**
 * User-facing config/secret model. When set, authoritative for new code paths. Legacy rows omit this field and callers fall back to existing `type` behavior.
 */
export const GetMicrofrontendsInGroupVisibility = {
  Config: "config",
  Secret: "secret",
} as const;
/**
 * User-facing config/secret model. When set, authoritative for new code paths. Legacy rows omit this field and callers fall back to existing `type` behavior.
 */
export type GetMicrofrontendsInGroupVisibility = ClosedEnum<
  typeof GetMicrofrontendsInGroupVisibility
>;

export type GetMicrofrontendsInGroupContentHint17 = {
  type: "flags-connection-string";
  projectId: string;
};

export type GetMicrofrontendsInGroupContentHint16 = {
  type: "integration-store-secret";
  storeId: string;
  integrationId: string;
  integrationProductId: string;
  integrationConfigurationId: string;
};

export type GetMicrofrontendsInGroupContentHint15 = {
  type: "postgres-url-no-ssl";
  storeId: string;
};

export type GetMicrofrontendsInGroupContentHint14 = {
  type: "postgres-database";
  storeId: string;
};

export type GetMicrofrontendsInGroupContentHint13 = {
  type: "postgres-password";
  storeId: string;
};

export type GetMicrofrontendsInGroupContentHint12 = {
  type: "postgres-host";
  storeId: string;
};

export type GetMicrofrontendsInGroupContentHint11 = {
  type: "postgres-user";
  storeId: string;
};

export type GetMicrofrontendsInGroupContentHint10 = {
  type: "postgres-prisma-url";
  storeId: string;
};

export type GetMicrofrontendsInGroupContentHint9 = {
  type: "postgres-url-non-pooling";
  storeId: string;
};

export type GetMicrofrontendsInGroupContentHint8 = {
  type: "postgres-url";
  storeId: string;
};

export type GetMicrofrontendsInGroupContentHint7 = {
  type: "blob-webhook-public-key";
  storeId: string;
};

export type GetMicrofrontendsInGroupContentHint6 = {
  type: "blob-store-id";
  storeId: string;
};

export type GetMicrofrontendsInGroupContentHint5 = {
  type: "blob-read-write-token";
  storeId: string;
};

export type GetMicrofrontendsInGroupContentHint4 = {
  type: "redis-rest-api-read-only-token";
  storeId: string;
};

export type GetMicrofrontendsInGroupContentHint3 = {
  type: "redis-rest-api-token";
  storeId: string;
};

export type GetMicrofrontendsInGroupContentHint2 = {
  type: "redis-rest-api-url";
  storeId: string;
};

export type GetMicrofrontendsInGroupContentHint1 = {
  type: "redis-url";
  storeId: string;
};

export type GetMicrofrontendsInGroupContentHint =
  | GetMicrofrontendsInGroupContentHint1
  | GetMicrofrontendsInGroupContentHint2
  | GetMicrofrontendsInGroupContentHint3
  | GetMicrofrontendsInGroupContentHint4
  | GetMicrofrontendsInGroupContentHint5
  | GetMicrofrontendsInGroupContentHint6
  | GetMicrofrontendsInGroupContentHint7
  | GetMicrofrontendsInGroupContentHint8
  | GetMicrofrontendsInGroupContentHint9
  | GetMicrofrontendsInGroupContentHint10
  | GetMicrofrontendsInGroupContentHint11
  | GetMicrofrontendsInGroupContentHint12
  | GetMicrofrontendsInGroupContentHint13
  | GetMicrofrontendsInGroupContentHint14
  | GetMicrofrontendsInGroupContentHint15
  | GetMicrofrontendsInGroupContentHint16
  | GetMicrofrontendsInGroupContentHint17;

export const GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsType =
  {
    FlagsSecret: "flags-secret",
  } as const;
export type GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsType =
  ClosedEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsType
  >;

/**
 * Similar to `contentHints`, but should not be exposed to the user.
 */
export type GetMicrofrontendsInGroupInternalContentHint = {
  type:
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsType;
  /**
   * Contains the `value` of the env variable, encrypted with a special key to make decryption possible in the subscriber Lambda.
   */
  encryptedValue: string;
};

export type GetMicrofrontendsInGroupEnv = {
  target?:
    | Array<GetMicrofrontendsInGroupTarget1>
    | GetMicrofrontendsInGroupTarget2
    | undefined;
  type: GetMicrofrontendsInGroupType;
  /**
   * This is used to identify variables that have been migrated from type secret to sensitive.
   */
  sunsetSecretId?: string | undefined;
  /**
   * Legacy now-encryption ciphertext, present after migration swaps value/vsmValue
   */
  legacyValue?: string | undefined;
  decrypted?: boolean | undefined;
  value: string;
  vsmValue?: string | undefined;
  id?: string | undefined;
  key: string;
  configurationId?: string | null | undefined;
  createdAt?: number | undefined;
  updatedAt?: number | undefined;
  createdBy?: string | null | undefined;
  updatedBy?: string | null | undefined;
  gitBranch?: string | undefined;
  /**
   * User-facing config/secret model. When set, authoritative for new code paths. Legacy rows omit this field and callers fall back to existing `type` behavior.
   */
  visibility?: GetMicrofrontendsInGroupVisibility | undefined;
  edgeConfigId?: string | null | undefined;
  edgeConfigTokenId?: string | null | undefined;
  contentHint?:
    | GetMicrofrontendsInGroupContentHint1
    | GetMicrofrontendsInGroupContentHint2
    | GetMicrofrontendsInGroupContentHint3
    | GetMicrofrontendsInGroupContentHint4
    | GetMicrofrontendsInGroupContentHint5
    | GetMicrofrontendsInGroupContentHint6
    | GetMicrofrontendsInGroupContentHint7
    | GetMicrofrontendsInGroupContentHint8
    | GetMicrofrontendsInGroupContentHint9
    | GetMicrofrontendsInGroupContentHint10
    | GetMicrofrontendsInGroupContentHint11
    | GetMicrofrontendsInGroupContentHint12
    | GetMicrofrontendsInGroupContentHint13
    | GetMicrofrontendsInGroupContentHint14
    | GetMicrofrontendsInGroupContentHint15
    | GetMicrofrontendsInGroupContentHint16
    | GetMicrofrontendsInGroupContentHint17
    | null
    | undefined;
  /**
   * Similar to `contentHints`, but should not be exposed to the user.
   */
  internalContentHint?:
    | GetMicrofrontendsInGroupInternalContentHint
    | null
    | undefined;
  comment?: string | undefined;
  customEnvironmentIds?: Array<string> | undefined;
};

/**
 * The type of environment (production, preview, or development)
 */
export const GetMicrofrontendsInGroupMicrofrontendsType = {
  Development: "development",
  Preview: "preview",
  Production: "production",
} as const;
/**
 * The type of environment (production, preview, or development)
 */
export type GetMicrofrontendsInGroupMicrofrontendsType = ClosedEnum<
  typeof GetMicrofrontendsInGroupMicrofrontendsType
>;

/**
 * The type of matching to perform
 */
export const GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsCustomEnvironmentsType =
  {
    EndsWith: "endsWith",
    Equals: "equals",
    StartsWith: "startsWith",
  } as const;
/**
 * The type of matching to perform
 */
export type GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsCustomEnvironmentsType =
  ClosedEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsCustomEnvironmentsType
  >;

/**
 * Configuration for matching git branches to this environment
 */
export type GetMicrofrontendsInGroupBranchMatcher = {
  /**
   * The type of matching to perform
   */
  type:
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsCustomEnvironmentsType;
  /**
   * The pattern to match against branch names
   */
  pattern: string;
};

/**
 * A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`.
 */
export type GetMicrofrontendsInGroupVerification = {
  type: string;
  domain: string;
  value: string;
  reason: string;
};

/**
 * List of domains associated with this environment
 */
export type GetMicrofrontendsInGroupDomains = {
  name: string;
  apexName: string;
  projectId: string;
  redirect?: string | null | undefined;
  redirectStatusCode?: number | null | undefined;
  gitBranch?: string | null | undefined;
  customEnvironmentId?: string | null | undefined;
  updatedAt?: number | undefined;
  createdAt?: number | undefined;
  /**
   * `true` if the domain is verified for use with the project. If `false` it will not be used as an alias on this project until the challenge in `verification` is completed.
   */
  verified: boolean;
  /**
   * A list of verification challenges, one of which must be completed to verify the domain for use on the project. After the challenge is complete `POST /projects/:idOrName/domains/:domain/verify` to verify the domain. Possible challenges: - If `verification.type = TXT` the `verification.domain` will be checked for a TXT record matching `verification.value`.
   */
  verification?: Array<GetMicrofrontendsInGroupVerification> | undefined;
};

/**
 * Internal representation of a custom environment with all required properties
 */
export type GetMicrofrontendsInGroupCustomEnvironments = {
  /**
   * Unique identifier for the custom environment (format: env_*)
   */
  id: string;
  /**
   * URL-friendly name of the environment
   */
  slug: string;
  /**
   * The type of environment (production, preview, or development)
   */
  type: GetMicrofrontendsInGroupMicrofrontendsType;
  /**
   * Optional description of the environment's purpose
   */
  description?: string | undefined;
  /**
   * Configuration for matching git branches to this environment
   */
  branchMatcher?: GetMicrofrontendsInGroupBranchMatcher | undefined;
  /**
   * List of domains associated with this environment
   */
  domains?: Array<GetMicrofrontendsInGroupDomains> | undefined;
  /**
   * List of aliases for the current deployment
   */
  currentDeploymentAliases?: Array<string> | undefined;
  /**
   * Timestamp when the environment was created
   */
  createdAt: number;
  /**
   * Timestamp when the environment was last updated
   */
  updatedAt: number;
};

export const GetMicrofrontendsInGroupFramework = {
  ActixWeb: "actix-web",
  Angular: "angular",
  Ash: "ash",
  Astro: "astro",
  Axum: "axum",
  Blitzjs: "blitzjs",
  Brunch: "brunch",
  Bun: "bun",
  Container: "container",
  CreateReactApp: "create-react-app",
  Django: "django",
  Docusaurus: "docusaurus",
  Docusaurus2: "docusaurus-2",
  Dojo: "dojo",
  Eleventy: "eleventy",
  Elysia: "elysia",
  Ember: "ember",
  Eve: "eve",
  Express: "express",
  FactoryEve: "factory-eve",
  Fastapi: "fastapi",
  Fasthtml: "fasthtml",
  Fastify: "fastify",
  Flask: "flask",
  Gatsby: "gatsby",
  Go: "go",
  Gridsome: "gridsome",
  H3: "h3",
  Hexo: "hexo",
  Hono: "hono",
  Hugo: "hugo",
  Hydrogen: "hydrogen",
  IonicAngular: "ionic-angular",
  IonicReact: "ionic-react",
  Jekyll: "jekyll",
  Koa: "koa",
  Mastra: "mastra",
  Middleman: "middleman",
  Nestjs: "nestjs",
  Nextjs: "nextjs",
  Nitro: "nitro",
  Node: "node",
  Nuxtjs: "nuxtjs",
  Parcel: "parcel",
  Polymer: "polymer",
  Preact: "preact",
  Python: "python",
  ReactRouter: "react-router",
  Redwoodjs: "redwoodjs",
  Remix: "remix",
  Ruby: "ruby",
  Rust: "rust",
  Saber: "saber",
  Sanity: "sanity",
  SanityV2: "sanity-v2",
  Sapper: "sapper",
  Scully: "scully",
  Services: "services",
  Solidstart: "solidstart",
  Solidstart1: "solidstart-1",
  Stencil: "stencil",
  Storybook: "storybook",
  Svelte: "svelte",
  Sveltekit: "sveltekit",
  Sveltekit1: "sveltekit-1",
  TanstackStart: "tanstack-start",
  TanstackStartLovable: "tanstack-start-lovable",
  Umijs: "umijs",
  Vite: "vite",
  Vitepress: "vitepress",
  Vue: "vue",
  Vuepress: "vuepress",
  Xmcp: "xmcp",
  Zola: "zola",
} as const;
export type GetMicrofrontendsInGroupFramework = ClosedEnum<
  typeof GetMicrofrontendsInGroupFramework
>;

/**
 * Service kind (Service.type). Omitted for schemas that do not define one.
 */
export const GetMicrofrontendsInGroupServiceType = {
  Cron: "cron",
  Job: "job",
  Web: "web",
  Worker: "worker",
} as const;
/**
 * Service kind (Service.type). Omitted for schemas that do not define one.
 */
export type GetMicrofrontendsInGroupServiceType = ClosedEnum<
  typeof GetMicrofrontendsInGroupServiceType
>;

/**
 * Framework slug, when the service has one (omitted otherwise).
 */
export const GetMicrofrontendsInGroupMicrofrontendsFramework = {
  ActixWeb: "actix-web",
  Angular: "angular",
  Ash: "ash",
  Astro: "astro",
  Axum: "axum",
  Blitzjs: "blitzjs",
  Brunch: "brunch",
  Bun: "bun",
  Container: "container",
  CreateReactApp: "create-react-app",
  Django: "django",
  Docusaurus: "docusaurus",
  Docusaurus2: "docusaurus-2",
  Dojo: "dojo",
  Eleventy: "eleventy",
  Elysia: "elysia",
  Ember: "ember",
  Eve: "eve",
  Express: "express",
  FactoryEve: "factory-eve",
  Fastapi: "fastapi",
  Fasthtml: "fasthtml",
  Fastify: "fastify",
  Flask: "flask",
  Gatsby: "gatsby",
  Go: "go",
  Gridsome: "gridsome",
  H3: "h3",
  Hexo: "hexo",
  Hono: "hono",
  Hugo: "hugo",
  Hydrogen: "hydrogen",
  IonicAngular: "ionic-angular",
  IonicReact: "ionic-react",
  Jekyll: "jekyll",
  Koa: "koa",
  Mastra: "mastra",
  Middleman: "middleman",
  Nestjs: "nestjs",
  Nextjs: "nextjs",
  Nitro: "nitro",
  Node: "node",
  Nuxtjs: "nuxtjs",
  Parcel: "parcel",
  Polymer: "polymer",
  Preact: "preact",
  Python: "python",
  ReactRouter: "react-router",
  Redwoodjs: "redwoodjs",
  Remix: "remix",
  Ruby: "ruby",
  Rust: "rust",
  Saber: "saber",
  Sanity: "sanity",
  SanityV2: "sanity-v2",
  Sapper: "sapper",
  Scully: "scully",
  Services: "services",
  Solidstart: "solidstart",
  Solidstart1: "solidstart-1",
  Stencil: "stencil",
  Storybook: "storybook",
  Svelte: "svelte",
  Sveltekit: "sveltekit",
  Sveltekit1: "sveltekit-1",
  TanstackStart: "tanstack-start",
  TanstackStartLovable: "tanstack-start-lovable",
  Umijs: "umijs",
  Vite: "vite",
  Vitepress: "vitepress",
  Vue: "vue",
  Vuepress: "vuepress",
  Xmcp: "xmcp",
  Zola: "zola",
} as const;
/**
 * Framework slug, when the service has one (omitted otherwise).
 */
export type GetMicrofrontendsInGroupMicrofrontendsFramework = ClosedEnum<
  typeof GetMicrofrontendsInGroupMicrofrontendsFramework
>;

export type GetMicrofrontendsInGroupServices = {
  /**
   * Service name from the deployment (Service.name).
   */
  serviceName: string;
  /**
   * Service kind (Service.type). Omitted for schemas that do not define one.
   */
  serviceType?: GetMicrofrontendsInGroupServiceType | undefined;
  /**
   * Framework slug, when the service has one (omitted otherwise).
   */
  framework?: GetMicrofrontendsInGroupMicrofrontendsFramework | undefined;
  /**
   * Generic runtime, e.g. 'node' | 'python' | 'go' | 'ruby' | 'rust' (Service.runtime). Omitted for static builds.
   */
  runtime?: string | undefined;
};

export type GetMicrofrontendsInGroupIpBuckets = {
  bucket: string;
  default?: boolean | undefined;
  supportUntil?: number | undefined;
};

export type GetMicrofrontendsInGroupLint = {
  targets: Array<string>;
};

export type GetMicrofrontendsInGroupTypecheck = {
  targets: Array<string>;
};

export type GetMicrofrontendsInGroupMfeConfigPresent = {
  targets: Array<string>;
};

export type GetMicrofrontendsInGroupJobs = {
  lint?: GetMicrofrontendsInGroupLint | undefined;
  typecheck?: GetMicrofrontendsInGroupTypecheck | undefined;
  mfeConfigPresent?: GetMicrofrontendsInGroupMfeConfigPresent | undefined;
};

export type GetMicrofrontendsInGroupMicrofrontendsAliasAssigned =
  | number
  | boolean;

export type GetMicrofrontendsInGroupAliasError = {
  code: string;
  message: string;
};

/**
 * The type of matching to perform
 */
export const GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyType =
  {
    EndsWith: "endsWith",
    Equals: "equals",
    StartsWith: "startsWith",
  } as const;
/**
 * The type of matching to perform
 */
export type GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyType =
  ClosedEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyType
  >;

export type GetMicrofrontendsInGroupMicrofrontendsBranchMatcher = {
  /**
   * The type of matching to perform
   */
  type:
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyType;
  /**
   * The pattern to match against branch names
   */
  pattern: string;
};

export type GetMicrofrontendsInGroupBuilds = {
  use: string;
  src?: string | undefined;
  dest?: string | undefined;
};

export const GetMicrofrontendsInGroupChecksConclusion = {
  Canceled: "canceled",
  Failed: "failed",
  Skipped: "skipped",
  Succeeded: "succeeded",
} as const;
export type GetMicrofrontendsInGroupChecksConclusion = ClosedEnum<
  typeof GetMicrofrontendsInGroupChecksConclusion
>;

export const GetMicrofrontendsInGroupChecksState = {
  Completed: "completed",
  Registered: "registered",
  Running: "running",
} as const;
export type GetMicrofrontendsInGroupChecksState = ClosedEnum<
  typeof GetMicrofrontendsInGroupChecksState
>;

export type GetMicrofrontendsInGroupMicrofrontendsCreator = {
  email: string;
  githubLogin?: string | undefined;
  gitlabLogin?: string | undefined;
  uid: string;
  username: string;
};

export type GetMicrofrontendsInGroupOidcTokenClaims = {
  iss: string;
  sub: string;
  scope: string;
  aud: string;
  owner: string;
  ownerId: string;
  project: string;
  projectId: string;
  environment: string;
  customEnvironmentId?: string | undefined;
  mfeGroupIds?: Array<string> | undefined;
  plan?: string | undefined;
};

export const GetMicrofrontendsInGroupPlan = {
  Enterprise: "enterprise",
  Hobby: "hobby",
  Pro: "pro",
} as const;
export type GetMicrofrontendsInGroupPlan = ClosedEnum<
  typeof GetMicrofrontendsInGroupPlan
>;

export const GetMicrofrontendsInGroupReadyState = {
  Blocked: "BLOCKED",
  Building: "BUILDING",
  Canceled: "CANCELED",
  Error: "ERROR",
  Initializing: "INITIALIZING",
  Queued: "QUEUED",
  Ready: "READY",
} as const;
export type GetMicrofrontendsInGroupReadyState = ClosedEnum<
  typeof GetMicrofrontendsInGroupReadyState
>;

export const GetMicrofrontendsInGroupReadySubstate = {
  Promoted: "PROMOTED",
  Rolling: "ROLLING",
  Staged: "STAGED",
} as const;
export type GetMicrofrontendsInGroupReadySubstate = ClosedEnum<
  typeof GetMicrofrontendsInGroupReadySubstate
>;

export const GetMicrofrontendsInGroupMicrofrontendsResponseType = {
  Lambdas: "LAMBDAS",
} as const;
export type GetMicrofrontendsInGroupMicrofrontendsResponseType = ClosedEnum<
  typeof GetMicrofrontendsInGroupMicrofrontendsResponseType
>;

export type GetMicrofrontendsInGroupLatestDeployments = {
  id: string;
  alias?: Array<string> | undefined;
  aliasAssigned?: number | boolean | null | undefined;
  aliasError?: GetMicrofrontendsInGroupAliasError | null | undefined;
  aliasFinal?: string | null | undefined;
  automaticAliases?: Array<string> | undefined;
  branchMatcher?:
    | GetMicrofrontendsInGroupMicrofrontendsBranchMatcher
    | undefined;
  buildingAt?: number | undefined;
  builds?: Array<GetMicrofrontendsInGroupBuilds> | undefined;
  checksConclusion?: GetMicrofrontendsInGroupChecksConclusion | undefined;
  checksState?: GetMicrofrontendsInGroupChecksState | undefined;
  connectBuildsEnabled?: boolean | undefined;
  connectConfigurationId?: string | undefined;
  createdAt: number;
  createdIn: string;
  creator: GetMicrofrontendsInGroupMicrofrontendsCreator | null;
  deletedAt?: number | undefined;
  deploymentHostname: string;
  forced?: boolean | undefined;
  name: string;
  meta?: { [k: string]: string } | undefined;
  monorepoManager?: string | null | undefined;
  oidcTokenClaims?: GetMicrofrontendsInGroupOidcTokenClaims | undefined;
  plan: GetMicrofrontendsInGroupPlan;
  /**
   * Whether or not preview comments are enabled for the deployment
   */
  previewCommentsEnabled?: boolean | undefined;
  private: boolean;
  readyAt?: number | undefined;
  readyState: GetMicrofrontendsInGroupReadyState;
  readySubstate?: GetMicrofrontendsInGroupReadySubstate | undefined;
  requestedAt?: number | undefined;
  target?: string | null | undefined;
  teamId?: string | null | undefined;
  type: GetMicrofrontendsInGroupMicrofrontendsResponseType;
  url: string;
  /**
   * Present for user creators; omitted for app/integration/system creators.
   */
  userId?: string | undefined;
  withCache?: boolean | undefined;
};

export type GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONResponseBodyDeployHooks =
  {
    createdAt?: number | undefined;
    id: string;
    name: string;
    ref: string;
    url: string;
  };

export type GetMicrofrontendsInGroupLink8 = {
  /**
   * Owner (namespace) slug, e.g. `acme`.
   */
  owner: string;
  repo: string;
  /**
   * Origin repository id.
   */
  repoId: string;
  /**
   * Origin namespace id (`ns_…`) of the owner.
   */
  ownerId: string;
  type: "cursor-origin";
  createdAt?: number | undefined;
  deployHooks: Array<
    GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONResponseBodyDeployHooks
  >;
  gitCredentialId: string;
  updatedAt?: number | undefined;
  sourceless?: boolean | undefined;
  productionBranch: string;
};

export type GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONDeployHooks =
  {
    createdAt?: number | undefined;
    id: string;
    name: string;
    ref: string;
    url: string;
  };

export type GetMicrofrontendsInGroupLink7 = {
  org: string;
  repo: string;
  repoId: string;
  type: "v0";
  createdAt?: number | undefined;
  deployHooks: Array<
    GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONDeployHooks
  >;
  gitCredentialId: string;
  updatedAt?: number | undefined;
  sourceless?: boolean | undefined;
  productionBranch: string;
};

export type GetMicrofrontendsInGroupLinkMicrofrontendsResponse200DeployHooks = {
  createdAt?: number | undefined;
  id: string;
  name: string;
  ref: string;
  url: string;
};

export type GetMicrofrontendsInGroupLink6 = {
  org: string;
  repo: string;
  repoId: string;
  type: "vercel";
  createdAt?: number | undefined;
  deployHooks: Array<
    GetMicrofrontendsInGroupLinkMicrofrontendsResponse200DeployHooks
  >;
  gitCredentialId: string;
  updatedAt?: number | undefined;
  sourceless?: boolean | undefined;
  productionBranch: string;
};

export type GetMicrofrontendsInGroupLinkMicrofrontendsResponseDeployHooks = {
  createdAt?: number | undefined;
  id: string;
  name: string;
  ref: string;
  url: string;
};

export type GetMicrofrontendsInGroupLink5 = {
  name: string;
  slug: string;
  owner: string;
  type: "bitbucket";
  uuid: string;
  workspaceUuid: string;
  createdAt?: number | undefined;
  deployHooks: Array<
    GetMicrofrontendsInGroupLinkMicrofrontendsResponseDeployHooks
  >;
  gitCredentialId: string;
  updatedAt?: number | undefined;
  sourceless?: boolean | undefined;
  productionBranch: string;
};

export type GetMicrofrontendsInGroupLinkMicrofrontendsDeployHooks = {
  createdAt?: number | undefined;
  id: string;
  name: string;
  ref: string;
  url: string;
};

export type GetMicrofrontendsInGroupLink4 = {
  projectId: string;
  projectName: string;
  projectNameWithNamespace: string;
  projectNamespace: string;
  /**
   * A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes. This is the id of the top level group that a namespace belongs to. Gitlab supports group nesting (up to 20 levels).
   */
  projectOwnerId?: number | undefined;
  projectUrl: string;
  type: "gitlab";
  createdAt?: number | undefined;
  deployHooks: Array<GetMicrofrontendsInGroupLinkMicrofrontendsDeployHooks>;
  gitCredentialId: string;
  updatedAt?: number | undefined;
  sourceless?: boolean | undefined;
  productionBranch: string;
};

export type GetMicrofrontendsInGroupLinkDeployHooks = {
  createdAt?: number | undefined;
  id: string;
  name: string;
  ref: string;
  url: string;
};

export type GetMicrofrontendsInGroupLink3 = {
  org: string;
  /**
   * A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes.
   */
  repoOwnerId?: number | undefined;
  repo?: string | undefined;
  repoId?: number | undefined;
  type: "github-custom-host";
  host: string;
  createdAt?: number | undefined;
  deployHooks: Array<GetMicrofrontendsInGroupLinkDeployHooks>;
  gitCredentialId: string;
  updatedAt?: number | undefined;
  sourceless?: boolean | undefined;
  productionBranch: string;
};

export type GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONResponseBodyProjects2DeployHooks =
  {
    createdAt?: number | undefined;
    id: string;
    name: string;
    ref: string;
    url: string;
  };

export type GetMicrofrontendsInGroupLink2 = {
  type: "github-limited";
  createdAt?: number | undefined;
  org: string;
  /**
   * A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes.
   */
  repoOwnerId?: number | undefined;
  repo?: string | undefined;
  repoId?: number | undefined;
  deployHooks: Array<
    GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONResponseBodyProjects2DeployHooks
  >;
  gitCredentialId: string;
  updatedAt?: number | undefined;
  sourceless?: boolean | undefined;
  productionBranch: string;
};

export type GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsDeployHooks =
  {
    createdAt?: number | undefined;
    id: string;
    name: string;
    ref: string;
    url: string;
  };

export type GetMicrofrontendsInGroupLink1 = {
  org: string;
  /**
   * A new field, should be included in all new project links, is being added just in time when a deployment is created. This is needed for Protected Git scopes.
   */
  repoOwnerId?: number | undefined;
  repo?: string | undefined;
  repoId?: number | undefined;
  type: "github";
  createdAt?: number | undefined;
  deployHooks: Array<
    GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsDeployHooks
  >;
  gitCredentialId: string;
  updatedAt?: number | undefined;
  sourceless?: boolean | undefined;
  productionBranch: string;
};

export type GetMicrofrontendsInGroupLink =
  | GetMicrofrontendsInGroupLink1
  | GetMicrofrontendsInGroupLink2
  | GetMicrofrontendsInGroupLink3
  | GetMicrofrontendsInGroupLink4
  | GetMicrofrontendsInGroupLink5
  | GetMicrofrontendsInGroupLink6
  | GetMicrofrontendsInGroupLink7
  | GetMicrofrontendsInGroupLink8;

export type GetMicrofrontendsInGroupBlobs = {
  /**
   * Marks the team-level, Vercel-managed default blob project (`vercel-blob-default-project`) that orphan blob stores are scoped to when connected without an explicit project. Set only by internal storage flows and immutable after creation — guards rely on it to protect the connected stores from being lost when the project is deleted or transferred.
   */
  isDefaultApp?: boolean | undefined;
};

export type GetMicrofrontendsInGroupMicrofrontends3 = {
  updatedAt: number;
  groupIds: Array<any>;
  enabled: false;
  freeProjectForLegacyLimits?: boolean | undefined;
};

export type GetMicrofrontendsInGroupMicrofrontends2 = {
  isDefaultApp?: false | undefined;
  /**
   * Whether observability data should be routed to this microfrontend project or a root project.
   */
  routeObservabilityToThisProject?: boolean | undefined;
  /**
   * Whether to add microfrontends routing to aliases. This means domains in this project will route as a microfrontend.
   */
  doNotRouteWithMicrofrontendsRouting?: boolean | undefined;
  /**
   * Timestamp when the microfrontends settings were last updated.
   */
  updatedAt: number;
  /**
   * The group IDs of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together.
   */
  groupIds: Array<string>;
  /**
   * Whether microfrontends are enabled for this project.
   */
  enabled: true;
  /**
   * A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI. Includes the leading slash, e.g. `/docs`
   */
  defaultRoute?: string | undefined;
  /**
   * Whether the project was part of the legacy limits for hobby and pro-trial before billing was added. This field is only set when the team is upgraded to a paid plan and we are backfilling the subscription status. We cap the subscription to 2 projects and set this field for the 3rd project. When this field is set, the project is not charged for and we do not call any billing APIs for this project.
   */
  freeProjectForLegacyLimits?: boolean | undefined;
};

export type GetMicrofrontendsInGroupMicrofrontends1 = {
  isDefaultApp: true;
  /**
   * Timestamp when the microfrontends settings were last updated.
   */
  updatedAt: number;
  /**
   * The group IDs of microfrontends that this project belongs to. Each microfrontend project must belong to a microfrontends group that is the set of microfrontends that are used together.
   */
  groupIds: Array<string>;
  /**
   * Whether microfrontends are enabled for this project.
   */
  enabled: true;
  /**
   * A path that is used to take screenshots and as the default path in preview links when a domain for this microfrontend is shown in the UI. Includes the leading slash, e.g. `/docs`
   */
  defaultRoute?: string | undefined;
  /**
   * Whether the project was part of the legacy limits for hobby and pro-trial before billing was added. This field is only set when the team is upgraded to a paid plan and we are backfilling the subscription status. We cap the subscription to 2 projects and set this field for the 3rd project. When this field is set, the project is not charged for and we do not call any billing APIs for this project.
   */
  freeProjectForLegacyLimits?: boolean | undefined;
};

export type GetMicrofrontendsInGroupMicrofrontends =
  | GetMicrofrontendsInGroupMicrofrontends1
  | GetMicrofrontendsInGroupMicrofrontends2
  | GetMicrofrontendsInGroupMicrofrontends3;

export const GetMicrofrontendsInGroupNodeVersion = {
  TenDotX: "10.x",
  TwelveDotX: "12.x",
  FourteenDotX: "14.x",
  SixteenDotX: "16.x",
  EighteenDotX: "18.x",
  TwentyDotX: "20.x",
  TwentyTwoDotX: "22.x",
  TwentyFourDotX: "24.x",
  EightDot10DotX: "8.10.x",
} as const;
export type GetMicrofrontendsInGroupNodeVersion = ClosedEnum<
  typeof GetMicrofrontendsInGroupNodeVersion
>;

export type GetMicrofrontendsInGroupPaths = {
  value: string;
};

export type GetMicrofrontendsInGroupOptionsAllowlist = {
  paths: Array<GetMicrofrontendsInGroupPaths>;
};

export type GetMicrofrontendsInGroupPasswordProtection = {};

export const GetMicrofrontendsInGroupDeploymentType = {
  All: "all",
  AllExceptCustomDomains: "all_except_custom_domains",
  Preview: "preview",
  ProdDeploymentUrlsAndAllPreviews: "prod_deployment_urls_and_all_previews",
} as const;
export type GetMicrofrontendsInGroupDeploymentType = ClosedEnum<
  typeof GetMicrofrontendsInGroupDeploymentType
>;

export type GetMicrofrontendsInGroupPassport = {
  deploymentType: GetMicrofrontendsInGroupDeploymentType;
  connectorId: string;
};

export type GetMicrofrontendsInGroupSandboxUrls = {
  inheritDeploymentProtection?: boolean | undefined;
};

export type GetMicrofrontendsInGroupProtectionConfig = {
  sandboxUrls?: GetMicrofrontendsInGroupSandboxUrls | undefined;
};

export const GetMicrofrontendsInGroupRegion = {
  Arn1: "arn1",
  Bom1: "bom1",
  Cdg1: "cdg1",
  Cle1: "cle1",
  Cpt1: "cpt1",
  Dub1: "dub1",
  Fra1: "fra1",
  Gru1: "gru1",
  Hkg1: "hkg1",
  Hnd1: "hnd1",
  Iad1: "iad1",
  Icn1: "icn1",
  Kix1: "kix1",
  Lhr1: "lhr1",
  Pdx1: "pdx1",
  Sfo1: "sfo1",
  Sin1: "sin1",
  Syd1: "syd1",
  Yul1: "yul1",
} as const;
export type GetMicrofrontendsInGroupRegion = ClosedEnum<
  typeof GetMicrofrontendsInGroupRegion
>;

export const GetMicrofrontendsInGroupFailoverRegions = {
  Arn1: "arn1",
  Bom1: "bom1",
  Cdg1: "cdg1",
  Cle1: "cle1",
  Cpt1: "cpt1",
  Dub1: "dub1",
  Fra1: "fra1",
  Gru1: "gru1",
  Hkg1: "hkg1",
  Hnd1: "hnd1",
  Iad1: "iad1",
  Icn1: "icn1",
  Kix1: "kix1",
  Lhr1: "lhr1",
  Pdx1: "pdx1",
  Sfo1: "sfo1",
  Sin1: "sin1",
  Syd1: "syd1",
  Yul1: "yul1",
} as const;
export type GetMicrofrontendsInGroupFailoverRegions = ClosedEnum<
  typeof GetMicrofrontendsInGroupFailoverRegions
>;

export type GetMicrofrontendsInGroupSandbox = {
  region?: GetMicrofrontendsInGroupRegion | undefined;
  failoverRegions?: Array<GetMicrofrontendsInGroupFailoverRegions> | undefined;
};

export const GetMicrofrontendsInGroupMicrofrontendsFunctionDefaultMemoryType = {
  Performance: "performance",
  PerformanceXl: "performance_xl",
  Standard: "standard",
  StandardLegacy: "standard_legacy",
} as const;
export type GetMicrofrontendsInGroupMicrofrontendsFunctionDefaultMemoryType =
  ClosedEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsFunctionDefaultMemoryType
  >;

export const GetMicrofrontendsInGroupMicrofrontendsBuildMachineType = {
  Basic: "basic",
  Enhanced: "enhanced",
  Standard: "standard",
  Turbo: "turbo",
} as const;
export type GetMicrofrontendsInGroupMicrofrontendsBuildMachineType = ClosedEnum<
  typeof GetMicrofrontendsInGroupMicrofrontendsBuildMachineType
>;

export const GetMicrofrontendsInGroupMicrofrontendsBuildMachineSelection = {
  Elastic: "elastic",
  Fixed: "fixed",
} as const;
export type GetMicrofrontendsInGroupMicrofrontendsBuildMachineSelection =
  ClosedEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsBuildMachineSelection
  >;

export const GetMicrofrontendsInGroupMicrofrontendsBuildMachineElasticReason = {
  BasicFloor: "basic-floor",
  BuildTimeoutFailure: "build-timeout-failure",
  EnospcFailure: "enospc-failure",
  EnterpriseFloor: "enterprise-floor",
  HighPeakDisk: "high-peak-disk",
  HighPeakMemory: "high-peak-memory",
  LongBuildDuration: "long-build-duration",
  OomFailure: "oom-failure",
  ShortBuildDuration: "short-build-duration",
  SustainedHighCpu: "sustained-high-cpu",
} as const;
export type GetMicrofrontendsInGroupMicrofrontendsBuildMachineElasticReason =
  ClosedEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsBuildMachineElasticReason
  >;

export const GetMicrofrontendsInGroupConfiguration = {
  SkipNamespaceQueue: "SKIP_NAMESPACE_QUEUE",
  WaitForNamespaceQueue: "WAIT_FOR_NAMESPACE_QUEUE",
} as const;
export type GetMicrofrontendsInGroupConfiguration = ClosedEnum<
  typeof GetMicrofrontendsInGroupConfiguration
>;

export type GetMicrofrontendsInGroupBuildQueue = {
  configuration?: GetMicrofrontendsInGroupConfiguration | undefined;
};

export type GetMicrofrontendsInGroupResourceConfig = {
  fluid?: boolean | undefined;
  functionDefaultRegions: Array<string>;
  functionDefaultTimeout?: number | undefined;
  functionDefaultMemoryType?:
    | GetMicrofrontendsInGroupMicrofrontendsFunctionDefaultMemoryType
    | undefined;
  functionZeroConfigFailover?: boolean | undefined;
  elasticConcurrencyEnabled?: boolean | undefined;
  buildMachineType?:
    | GetMicrofrontendsInGroupMicrofrontendsBuildMachineType
    | undefined;
  buildMachineSelection?:
    | GetMicrofrontendsInGroupMicrofrontendsBuildMachineSelection
    | undefined;
  buildMachineElasticLastUpdated?: number | undefined;
  buildMachineElasticReason?:
    | GetMicrofrontendsInGroupMicrofrontendsBuildMachineElasticReason
    | undefined;
  isNSNBDisabled?: boolean | undefined;
  buildQueue?: GetMicrofrontendsInGroupBuildQueue | undefined;
  enableFunctionsBeta?: boolean | undefined;
};

/**
 * Description of why a project was rolled back, and by whom. Note that lastAliasRequest contains the from/to details of the rollback.
 */
export type GetMicrofrontendsInGroupRollbackDescription = {
  /**
   * The user who rolled back the project.
   */
  userId: string;
  /**
   * The username of the user who rolled back the project.
   */
  username: string;
  /**
   * User-supplied explanation of why they rolled back the project. Limited to 250 characters.
   */
  description: string;
  /**
   * Timestamp of when the rollback was requested.
   */
  createdAt: number;
};

/**
 * An array of all the stages required during a deployment release. Each stage defines a target percentage and advancement rules. The final stage must always have targetPercentage: 100.
 */
export type GetMicrofrontendsInGroupStages = {
  /**
   * The percentage of traffic to serve to the canary deployment (0-100)
   */
  targetPercentage: number;
  /**
   * Whether or not this stage requires manual approval to proceed
   */
  requireApproval?: boolean | undefined;
  /**
   * Duration in minutes for automatic advancement to the next stage
   */
  duration?: number | undefined;
  /**
   * Whether to linearly shift traffic over the duration of this stage
   */
  linearShift?: boolean | undefined;
};

/**
 * The metric this check evaluates.
 */
export const GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsRollingReleaseType =
  {
    ErrorRate5xx: "error-rate-5xx",
  } as const;
/**
 * The metric this check evaluates.
 */
export type GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsRollingReleaseType =
  ClosedEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsRollingReleaseType
  >;

/**
 * The checks to evaluate. An empty array means nothing is evaluated.
 */
export type GetMicrofrontendsInGroupChecks = {
  /**
   * The metric this check evaluates.
   */
  type:
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsRollingReleaseType;
  /**
   * Minimum number of requests required in the window before the check can fail. Below this, the check is inconclusive rather than failing, so low-traffic stages don't gate on noise. Defaults to `100` when omitted.
   */
  minSampleSize?: number | undefined;
  /**
   * Response status codes to ignore entirely — dropped from both the numerator (errors) and the denominator (total requests). Defaults to `[]` when omitted.
   */
  excludeStatusCodes?: Array<number> | undefined;
  /**
   * Request paths to ignore entirely — dropped from both the numerator (errors) and the denominator (total requests). Matched exactly against the request path with any query string removed; no prefix or glob matching. Defaults to `[]` when omitted.
   */
  excludePaths?: Array<string> | undefined;
  /**
   * Seconds of ingest lag to allow for: the query's upper bound is `now() - this value`, so the check never reads a window that is still filling. Defaults to `30` when omitted.
   */
  ingestWatermarkSeconds?: number | undefined;
};

/**
 * What to do when the gate trips: pause the rollout, or roll it back.
 */
export const GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONAction =
  {
    Pause: "pause",
    Rollback: "rollback",
  } as const;
/**
 * What to do when the gate trips: pause the rollout, or roll it back.
 */
export type GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONAction =
  ClosedEnum<
    typeof GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONAction
  >;

/**
 * Automated gating configuration. Omitted (the default) means no gating is configured, which is equivalent to `enabled: false`.
 */
export type GetMicrofrontendsInGroupGate = {
  /**
   * Whether automated gating is enabled for this project's rollouts.
   */
  enabled: boolean;
  /**
   * The checks to evaluate. An empty array means nothing is evaluated.
   */
  checks: Array<GetMicrofrontendsInGroupChecks>;
  /**
   * How many failing evaluations within {@link windowSize} trip the gate. Defaults to `3` when omitted.
   */
  failureThreshold?: number | undefined;
  /**
   * How many of the most recent evaluations {@link failureThreshold} is counted against. Defaults to `5` when omitted.
   */
  windowSize?: number | undefined;
  /**
   * What to do when the gate trips: pause the rollout, or roll it back.
   */
  action:
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONAction;
  /**
   * When true, a tripped gate is only reported — {@link action} is not taken.
   */
  dryRun: boolean;
};

/**
 * Project-level rolling release configuration that defines how deployments should be gradually rolled out
 */
export type GetMicrofrontendsInGroupRollingRelease = {
  /**
   * The environment that the release targets, currently only supports production. Adding in case we want to configure with alias groups or custom environments.
   */
  target: string;
  /**
   * An array of all the stages required during a deployment release. Each stage defines a target percentage and advancement rules. The final stage must always have targetPercentage: 100.
   */
  stages?: Array<GetMicrofrontendsInGroupStages> | null | undefined;
  /**
   * Whether the request served by a canary deployment should return a header indicating a canary was served. Defaults to `false` when omitted.
   */
  canaryResponseHeader?: boolean | undefined;
  /**
   * Automated gating configuration. Omitted (the default) means no gating is configured, which is equivalent to `enabled: false`.
   */
  gate?: GetMicrofrontendsInGroupGate | undefined;
};

export const GetMicrofrontendsInGroupFunctionDefaultMemoryType = {
  Performance: "performance",
  PerformanceXl: "performance_xl",
  Standard: "standard",
  StandardLegacy: "standard_legacy",
} as const;
export type GetMicrofrontendsInGroupFunctionDefaultMemoryType = ClosedEnum<
  typeof GetMicrofrontendsInGroupFunctionDefaultMemoryType
>;

export const GetMicrofrontendsInGroupBuildMachineType = {
  Basic: "basic",
  Enhanced: "enhanced",
  Standard: "standard",
  Turbo: "turbo",
} as const;
export type GetMicrofrontendsInGroupBuildMachineType = ClosedEnum<
  typeof GetMicrofrontendsInGroupBuildMachineType
>;

/** @internal */
export type GetMicrofrontendsInGroupRequest$Outbound = {
  groupId: string;
  teamId?: string | undefined;
  slug?: string | undefined;
};

/** @internal */
export const GetMicrofrontendsInGroupRequest$outboundSchema: z.ZodType<
  GetMicrofrontendsInGroupRequest$Outbound,
  z.ZodTypeDef,
  GetMicrofrontendsInGroupRequest
> = z.object({
  groupId: z.string(),
  teamId: z.string().optional(),
  slug: z.string().optional(),
});

export function getMicrofrontendsInGroupRequestToJSON(
  getMicrofrontendsInGroupRequest: GetMicrofrontendsInGroupRequest,
): string {
  return JSON.stringify(
    GetMicrofrontendsInGroupRequest$outboundSchema.parse(
      getMicrofrontendsInGroupRequest,
    ),
  );
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupCreator1$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupCreator1,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("user"),
  via: types.nullable(
    z.union([
      z.lazy(() => GetMicrofrontendsInGroupVia1$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupVia2$inboundSchema),
    ]),
  ),
  user: z.lazy(() => GetMicrofrontendsInGroupCreatorUser$inboundSchema),
});

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

/** @internal */
export const GetMicrofrontendsInGroupCreator$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupCreator,
  z.ZodTypeDef,
  unknown
> = z.union([
  z.lazy(() => GetMicrofrontendsInGroupCreator1$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupCreator2$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupCreator3$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupCreator4$inboundSchema),
]);

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

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

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

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

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

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

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsResponseBuilds$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupMicrofrontendsResponseBuilds,
    z.ZodTypeDef,
    unknown
  > = z.object({
    use: types.string(),
    src: types.optional(types.string()),
    dest: types.optional(types.string()),
  });

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsResponse200Creator$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupMicrofrontendsResponse200Creator,
    z.ZodTypeDef,
    unknown
  > = z.object({
    email: types.string(),
    githubLogin: types.optional(types.string()),
    gitlabLogin: types.optional(types.string()),
    uid: types.string(),
    username: types.string(),
  });

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

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsResponseOidcTokenClaims$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupMicrofrontendsResponseOidcTokenClaims,
    z.ZodTypeDef,
    unknown
  > = z.object({
    iss: types.string(),
    sub: types.string(),
    scope: types.string(),
    aud: types.string(),
    owner: types.string(),
    owner_id: types.string(),
    project: types.string(),
    project_id: types.string(),
    environment: types.string(),
    custom_environment_id: types.optional(types.string()),
    mfe_group_ids: types.optional(z.array(types.string())),
    plan: types.optional(types.string()),
  }).transform((v) => {
    return remap$(v, {
      "owner_id": "ownerId",
      "project_id": "projectId",
      "custom_environment_id": "customEnvironmentId",
      "mfe_group_ids": "mfeGroupIds",
    });
  });

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

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

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupDeployment$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupDeployment,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: types.string(),
  alias: types.optional(z.array(types.string())),
  aliasAssigned: z.nullable(smartUnion([types.number(), types.boolean()]))
    .optional(),
  aliasError: z.nullable(
    z.lazy(() =>
      GetMicrofrontendsInGroupMicrofrontendsResponseAliasError$inboundSchema
    ),
  ).optional(),
  aliasFinal: z.nullable(types.string()).optional(),
  automaticAliases: types.optional(z.array(types.string())),
  branchMatcher: types.optional(
    z.lazy(() =>
      GetMicrofrontendsInGroupMicrofrontendsResponse200BranchMatcher$inboundSchema
    ),
  ),
  buildingAt: types.optional(types.number()),
  builds: types.optional(
    z.array(z.lazy(() =>
      GetMicrofrontendsInGroupMicrofrontendsResponseBuilds$inboundSchema
    )),
  ),
  checksConclusion: types.optional(
    GetMicrofrontendsInGroupMicrofrontendsResponseChecksConclusion$inboundSchema,
  ),
  checksState: types.optional(
    GetMicrofrontendsInGroupMicrofrontendsResponseChecksState$inboundSchema,
  ),
  connectBuildsEnabled: types.optional(types.boolean()),
  connectConfigurationId: types.optional(types.string()),
  createdAt: types.number(),
  createdIn: types.string(),
  creator: types.nullable(
    z.lazy(() =>
      GetMicrofrontendsInGroupMicrofrontendsResponse200Creator$inboundSchema
    ),
  ),
  deletedAt: types.optional(types.number()),
  deploymentHostname: types.string(),
  forced: types.optional(types.boolean()),
  name: types.string(),
  meta: types.optional(z.record(types.string())),
  monorepoManager: z.nullable(types.string()).optional(),
  oidcTokenClaims: types.optional(
    z.lazy(() =>
      GetMicrofrontendsInGroupMicrofrontendsResponseOidcTokenClaims$inboundSchema
    ),
  ),
  plan: GetMicrofrontendsInGroupMicrofrontendsResponsePlan$inboundSchema,
  previewCommentsEnabled: types.optional(types.boolean()),
  private: types.boolean(),
  readyAt: types.optional(types.number()),
  readyState:
    GetMicrofrontendsInGroupMicrofrontendsResponseReadyState$inboundSchema,
  readySubstate: types.optional(
    GetMicrofrontendsInGroupMicrofrontendsResponseReadySubstate$inboundSchema,
  ),
  requestedAt: types.optional(types.number()),
  target: z.nullable(types.string()).optional(),
  teamId: z.nullable(types.string()).optional(),
  type:
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsAliasType$inboundSchema,
  url: types.string(),
  userId: types.optional(types.string()),
  withCache: types.optional(types.boolean()),
});

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupAlias$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupAlias,
  z.ZodTypeDef,
  unknown
> = z.object({
  configuredBy: z.nullable(GetMicrofrontendsInGroupConfiguredBy$inboundSchema)
    .optional(),
  configuredChangedAt: z.nullable(types.number()).optional(),
  createdAt: z.nullable(types.number()).optional(),
  deployment: types.nullable(
    z.lazy(() => GetMicrofrontendsInGroupDeployment$inboundSchema),
  ),
  domain: types.string(),
  environment: GetMicrofrontendsInGroupEnvironment$inboundSchema,
  gitBranch: z.nullable(types.string()).optional(),
  redirect: z.nullable(types.string()).optional(),
  redirectStatusCode: z.nullable(types.number()).optional(),
  target: GetMicrofrontendsInGroupTarget$inboundSchema,
});

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

/** @internal */
export const GetMicrofrontendsInGroupAnalytics$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupAnalytics,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: types.string(),
  canceledAt: z.nullable(types.number()).optional(),
  disabledAt: types.number(),
  enabledAt: types.number(),
  paidAt: types.optional(types.number()),
  sampleRatePercent: z.nullable(types.number()).optional(),
  spendLimitInDollars: z.nullable(types.number()).optional(),
});

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

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

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

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

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

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupConnectConfigurations$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupConnectConfigurations,
    z.ZodTypeDef,
    unknown
  > = z.object({
    envId: smartUnion([
      types.string(),
      GetMicrofrontendsInGroupEnvId2$inboundSchema,
    ]),
    connectConfigurationId: types.string(),
    dc: types.optional(types.string()),
    passive: types.boolean(),
    buildsEnabled: types.boolean(),
    aws: types.optional(
      z.lazy(() => GetMicrofrontendsInGroupAws$inboundSchema),
    ),
    createdAt: types.number(),
    updatedAt: types.number(),
  });

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

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

/** @internal */
export const GetMicrofrontendsInGroupDefinitions$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupDefinitions,
  z.ZodTypeDef,
  unknown
> = z.object({
  host: types.string(),
  path: types.string(),
  schedule: types.string(),
  source: types.optional(GetMicrofrontendsInGroupSource$inboundSchema),
  description: types.optional(types.string()),
  hostInferred: types.optional(types.boolean()),
});

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

/** @internal */
export const GetMicrofrontendsInGroupCrons$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupCrons,
  z.ZodTypeDef,
  unknown
> = z.object({
  enabledAt: types.number(),
  disabledAt: types.nullable(types.number()),
  updatedAt: types.number(),
  deploymentId: types.nullable(types.string()),
  definitions: z.array(
    z.lazy(() => GetMicrofrontendsInGroupDefinitions$inboundSchema),
  ),
});

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

/** @internal */
export const GetMicrofrontendsInGroupDataCache$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupDataCache,
  z.ZodTypeDef,
  unknown
> = z.object({
  userDisabled: types.boolean(),
  storageSizeBytes: z.nullable(types.number()).optional(),
  unlimited: types.optional(types.boolean()),
});

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

/** @internal */
export const GetMicrofrontendsInGroupDeploymentExpiration$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupDeploymentExpiration,
    z.ZodTypeDef,
    unknown
  > = z.object({
    expirationDays: types.optional(types.number()),
    expirationDaysProduction: types.optional(types.number()),
    expirationDaysCanceled: types.optional(types.number()),
    expirationDaysErrored: types.optional(types.number()),
    deploymentsToKeep: types.optional(types.number()),
  });

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

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

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

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

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

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

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsTarget$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupMicrofrontendsTarget,
    z.ZodTypeDef,
    unknown
  > = smartUnion([
    z.array(GetMicrofrontendsInGroupTarget1$inboundSchema),
    GetMicrofrontendsInGroupTarget2$inboundSchema,
  ]);

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint17$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint17,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("flags-connection-string"),
  projectId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint16$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint16,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("integration-store-secret"),
  storeId: types.string(),
  integrationId: types.string(),
  integrationProductId: types.string(),
  integrationConfigurationId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint15$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint15,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("postgres-url-no-ssl"),
  storeId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint14$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint14,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("postgres-database"),
  storeId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint13$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint13,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("postgres-password"),
  storeId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint12$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint12,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("postgres-host"),
  storeId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint11$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint11,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("postgres-user"),
  storeId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint10$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint10,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("postgres-prisma-url"),
  storeId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint9$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint9,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("postgres-url-non-pooling"),
  storeId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint8$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint8,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("postgres-url"),
  storeId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint7$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint7,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("blob-webhook-public-key"),
  storeId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint6$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint6,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("blob-store-id"),
  storeId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint5$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint5,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("blob-read-write-token"),
  storeId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint4$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint4,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("redis-rest-api-read-only-token"),
  storeId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint3$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint3,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("redis-rest-api-token"),
  storeId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint2$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint2,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("redis-rest-api-url"),
  storeId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint1$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint1,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("redis-url"),
  storeId: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupContentHint$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupContentHint,
  z.ZodTypeDef,
  unknown
> = z.union([
  z.lazy(() => GetMicrofrontendsInGroupContentHint1$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupContentHint2$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupContentHint3$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupContentHint4$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupContentHint5$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupContentHint6$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupContentHint7$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupContentHint8$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupContentHint9$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupContentHint10$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupContentHint11$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupContentHint12$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupContentHint13$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupContentHint14$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupContentHint15$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupContentHint16$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupContentHint17$inboundSchema),
]);

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

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupEnv$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupEnv,
  z.ZodTypeDef,
  unknown
> = z.object({
  target: types.optional(
    smartUnion([
      z.array(GetMicrofrontendsInGroupTarget1$inboundSchema),
      GetMicrofrontendsInGroupTarget2$inboundSchema,
    ]),
  ),
  type: GetMicrofrontendsInGroupType$inboundSchema,
  sunsetSecretId: types.optional(types.string()),
  legacyValue: types.optional(types.string()),
  decrypted: types.optional(types.boolean()),
  value: types.string(),
  vsmValue: types.optional(types.string()),
  id: types.optional(types.string()),
  key: types.string(),
  configurationId: z.nullable(types.string()).optional(),
  createdAt: types.optional(types.number()),
  updatedAt: types.optional(types.number()),
  createdBy: z.nullable(types.string()).optional(),
  updatedBy: z.nullable(types.string()).optional(),
  gitBranch: types.optional(types.string()),
  visibility: types.optional(GetMicrofrontendsInGroupVisibility$inboundSchema),
  edgeConfigId: z.nullable(types.string()).optional(),
  edgeConfigTokenId: z.nullable(types.string()).optional(),
  contentHint: z.nullable(
    z.union([
      z.lazy(() => GetMicrofrontendsInGroupContentHint1$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupContentHint2$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupContentHint3$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupContentHint4$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupContentHint5$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupContentHint6$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupContentHint7$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupContentHint8$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupContentHint9$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupContentHint10$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupContentHint11$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupContentHint12$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupContentHint13$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupContentHint14$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupContentHint15$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupContentHint16$inboundSchema),
      z.lazy(() => GetMicrofrontendsInGroupContentHint17$inboundSchema),
    ]),
  ).optional(),
  internalContentHint: z.nullable(
    z.lazy(() => GetMicrofrontendsInGroupInternalContentHint$inboundSchema),
  ).optional(),
  comment: types.optional(types.string()),
  customEnvironmentIds: types.optional(z.array(types.string())),
});

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

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

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupVerification$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupVerification,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.string(),
  domain: types.string(),
  value: types.string(),
  reason: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupDomains$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupDomains,
  z.ZodTypeDef,
  unknown
> = z.object({
  name: types.string(),
  apexName: types.string(),
  projectId: types.string(),
  redirect: z.nullable(types.string()).optional(),
  redirectStatusCode: z.nullable(types.number()).optional(),
  gitBranch: z.nullable(types.string()).optional(),
  customEnvironmentId: z.nullable(types.string()).optional(),
  updatedAt: types.optional(types.number()),
  createdAt: types.optional(types.number()),
  verified: types.boolean(),
  verification: types.optional(
    z.array(z.lazy(() => GetMicrofrontendsInGroupVerification$inboundSchema)),
  ),
});

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

/** @internal */
export const GetMicrofrontendsInGroupCustomEnvironments$inboundSchema:
  z.ZodType<GetMicrofrontendsInGroupCustomEnvironments, z.ZodTypeDef, unknown> =
    z.object({
      id: types.string(),
      slug: types.string(),
      type: GetMicrofrontendsInGroupMicrofrontendsType$inboundSchema,
      description: types.optional(types.string()),
      branchMatcher: types.optional(
        z.lazy(() => GetMicrofrontendsInGroupBranchMatcher$inboundSchema),
      ),
      domains: types.optional(
        z.array(z.lazy(() => GetMicrofrontendsInGroupDomains$inboundSchema)),
      ),
      currentDeploymentAliases: types.optional(z.array(types.string())),
      createdAt: types.number(),
      updatedAt: types.number(),
    });

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

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupServices$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupServices,
  z.ZodTypeDef,
  unknown
> = z.object({
  serviceName: types.string(),
  serviceType: types.optional(
    GetMicrofrontendsInGroupServiceType$inboundSchema,
  ),
  framework: types.optional(
    GetMicrofrontendsInGroupMicrofrontendsFramework$inboundSchema,
  ),
  runtime: types.optional(types.string()),
});

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

/** @internal */
export const GetMicrofrontendsInGroupIpBuckets$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupIpBuckets,
  z.ZodTypeDef,
  unknown
> = z.object({
  bucket: types.string(),
  default: types.optional(types.boolean()),
  supportUntil: types.optional(types.number()),
});

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

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

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

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

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupJobs$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupJobs,
  z.ZodTypeDef,
  unknown
> = z.object({
  lint: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupLint$inboundSchema),
  ),
  typecheck: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupTypecheck$inboundSchema),
  ),
  "mfe-config-present": types.optional(
    z.lazy(() => GetMicrofrontendsInGroupMfeConfigPresent$inboundSchema),
  ),
}).transform((v) => {
  return remap$(v, {
    "mfe-config-present": "mfeConfigPresent",
  });
});

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

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

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

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

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

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupBuilds$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupBuilds,
  z.ZodTypeDef,
  unknown
> = z.object({
  use: types.string(),
  src: types.optional(types.string()),
  dest: types.optional(types.string()),
});

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontendsCreator$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupMicrofrontendsCreator,
    z.ZodTypeDef,
    unknown
  > = z.object({
    email: types.string(),
    githubLogin: types.optional(types.string()),
    gitlabLogin: types.optional(types.string()),
    uid: types.string(),
    username: types.string(),
  });

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

/** @internal */
export const GetMicrofrontendsInGroupOidcTokenClaims$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupOidcTokenClaims,
  z.ZodTypeDef,
  unknown
> = z.object({
  iss: types.string(),
  sub: types.string(),
  scope: types.string(),
  aud: types.string(),
  owner: types.string(),
  owner_id: types.string(),
  project: types.string(),
  project_id: types.string(),
  environment: types.string(),
  custom_environment_id: types.optional(types.string()),
  mfe_group_ids: types.optional(z.array(types.string())),
  plan: types.optional(types.string()),
}).transform((v) => {
  return remap$(v, {
    "owner_id": "ownerId",
    "project_id": "projectId",
    "custom_environment_id": "customEnvironmentId",
    "mfe_group_ids": "mfeGroupIds",
  });
});

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

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

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupLatestDeployments$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupLatestDeployments,
  z.ZodTypeDef,
  unknown
> = z.object({
  id: types.string(),
  alias: types.optional(z.array(types.string())),
  aliasAssigned: z.nullable(smartUnion([types.number(), types.boolean()]))
    .optional(),
  aliasError: z.nullable(
    z.lazy(() => GetMicrofrontendsInGroupAliasError$inboundSchema),
  ).optional(),
  aliasFinal: z.nullable(types.string()).optional(),
  automaticAliases: types.optional(z.array(types.string())),
  branchMatcher: types.optional(
    z.lazy(() =>
      GetMicrofrontendsInGroupMicrofrontendsBranchMatcher$inboundSchema
    ),
  ),
  buildingAt: types.optional(types.number()),
  builds: types.optional(
    z.array(z.lazy(() => GetMicrofrontendsInGroupBuilds$inboundSchema)),
  ),
  checksConclusion: types.optional(
    GetMicrofrontendsInGroupChecksConclusion$inboundSchema,
  ),
  checksState: types.optional(
    GetMicrofrontendsInGroupChecksState$inboundSchema,
  ),
  connectBuildsEnabled: types.optional(types.boolean()),
  connectConfigurationId: types.optional(types.string()),
  createdAt: types.number(),
  createdIn: types.string(),
  creator: types.nullable(
    z.lazy(() => GetMicrofrontendsInGroupMicrofrontendsCreator$inboundSchema),
  ),
  deletedAt: types.optional(types.number()),
  deploymentHostname: types.string(),
  forced: types.optional(types.boolean()),
  name: types.string(),
  meta: types.optional(z.record(types.string())),
  monorepoManager: z.nullable(types.string()).optional(),
  oidcTokenClaims: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupOidcTokenClaims$inboundSchema),
  ),
  plan: GetMicrofrontendsInGroupPlan$inboundSchema,
  previewCommentsEnabled: types.optional(types.boolean()),
  private: types.boolean(),
  readyAt: types.optional(types.number()),
  readyState: GetMicrofrontendsInGroupReadyState$inboundSchema,
  readySubstate: types.optional(
    GetMicrofrontendsInGroupReadySubstate$inboundSchema,
  ),
  requestedAt: types.optional(types.number()),
  target: z.nullable(types.string()).optional(),
  teamId: z.nullable(types.string()).optional(),
  type: GetMicrofrontendsInGroupMicrofrontendsResponseType$inboundSchema,
  url: types.string(),
  userId: types.optional(types.string()),
  withCache: types.optional(types.boolean()),
});

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

/** @internal */
export const GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONResponseBodyDeployHooks$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONResponseBodyDeployHooks,
    z.ZodTypeDef,
    unknown
  > = z.object({
    createdAt: types.optional(types.number()),
    id: types.string(),
    name: types.string(),
    ref: types.string(),
    url: types.string(),
  });

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

/** @internal */
export const GetMicrofrontendsInGroupLink8$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupLink8,
  z.ZodTypeDef,
  unknown
> = z.object({
  owner: types.string(),
  repo: types.string(),
  repoId: types.string(),
  ownerId: types.string(),
  type: types.literal("cursor-origin"),
  createdAt: types.optional(types.number()),
  deployHooks: z.array(
    z.lazy(() =>
      GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONResponseBodyDeployHooks$inboundSchema
    ),
  ),
  gitCredentialId: types.string(),
  updatedAt: types.optional(types.number()),
  sourceless: types.optional(types.boolean()),
  productionBranch: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONDeployHooks$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONDeployHooks,
    z.ZodTypeDef,
    unknown
  > = z.object({
    createdAt: types.optional(types.number()),
    id: types.string(),
    name: types.string(),
    ref: types.string(),
    url: types.string(),
  });

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

/** @internal */
export const GetMicrofrontendsInGroupLink7$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupLink7,
  z.ZodTypeDef,
  unknown
> = z.object({
  org: types.string(),
  repo: types.string(),
  repoId: types.string(),
  type: types.literal("v0"),
  createdAt: types.optional(types.number()),
  deployHooks: z.array(
    z.lazy(() =>
      GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONDeployHooks$inboundSchema
    ),
  ),
  gitCredentialId: types.string(),
  updatedAt: types.optional(types.number()),
  sourceless: types.optional(types.boolean()),
  productionBranch: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupLinkMicrofrontendsResponse200DeployHooks$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupLinkMicrofrontendsResponse200DeployHooks,
    z.ZodTypeDef,
    unknown
  > = z.object({
    createdAt: types.optional(types.number()),
    id: types.string(),
    name: types.string(),
    ref: types.string(),
    url: types.string(),
  });

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

/** @internal */
export const GetMicrofrontendsInGroupLink6$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupLink6,
  z.ZodTypeDef,
  unknown
> = z.object({
  org: types.string(),
  repo: types.string(),
  repoId: types.string(),
  type: types.literal("vercel"),
  createdAt: types.optional(types.number()),
  deployHooks: z.array(
    z.lazy(() =>
      GetMicrofrontendsInGroupLinkMicrofrontendsResponse200DeployHooks$inboundSchema
    ),
  ),
  gitCredentialId: types.string(),
  updatedAt: types.optional(types.number()),
  sourceless: types.optional(types.boolean()),
  productionBranch: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupLinkMicrofrontendsResponseDeployHooks$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupLinkMicrofrontendsResponseDeployHooks,
    z.ZodTypeDef,
    unknown
  > = z.object({
    createdAt: types.optional(types.number()),
    id: types.string(),
    name: types.string(),
    ref: types.string(),
    url: types.string(),
  });

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

/** @internal */
export const GetMicrofrontendsInGroupLink5$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupLink5,
  z.ZodTypeDef,
  unknown
> = z.object({
  name: types.string(),
  slug: types.string(),
  owner: types.string(),
  type: types.literal("bitbucket"),
  uuid: types.string(),
  workspaceUuid: types.string(),
  createdAt: types.optional(types.number()),
  deployHooks: z.array(
    z.lazy(() =>
      GetMicrofrontendsInGroupLinkMicrofrontendsResponseDeployHooks$inboundSchema
    ),
  ),
  gitCredentialId: types.string(),
  updatedAt: types.optional(types.number()),
  sourceless: types.optional(types.boolean()),
  productionBranch: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupLinkMicrofrontendsDeployHooks$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupLinkMicrofrontendsDeployHooks,
    z.ZodTypeDef,
    unknown
  > = z.object({
    createdAt: types.optional(types.number()),
    id: types.string(),
    name: types.string(),
    ref: types.string(),
    url: types.string(),
  });

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

/** @internal */
export const GetMicrofrontendsInGroupLink4$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupLink4,
  z.ZodTypeDef,
  unknown
> = z.object({
  projectId: types.string(),
  projectName: types.string(),
  projectNameWithNamespace: types.string(),
  projectNamespace: types.string(),
  projectOwnerId: types.optional(types.number()),
  projectUrl: types.string(),
  type: types.literal("gitlab"),
  createdAt: types.optional(types.number()),
  deployHooks: z.array(
    z.lazy(() =>
      GetMicrofrontendsInGroupLinkMicrofrontendsDeployHooks$inboundSchema
    ),
  ),
  gitCredentialId: types.string(),
  updatedAt: types.optional(types.number()),
  sourceless: types.optional(types.boolean()),
  productionBranch: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupLinkDeployHooks$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupLinkDeployHooks,
  z.ZodTypeDef,
  unknown
> = z.object({
  createdAt: types.optional(types.number()),
  id: types.string(),
  name: types.string(),
  ref: types.string(),
  url: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupLink3$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupLink3,
  z.ZodTypeDef,
  unknown
> = z.object({
  org: types.string(),
  repoOwnerId: types.optional(types.number()),
  repo: types.optional(types.string()),
  repoId: types.optional(types.number()),
  type: types.literal("github-custom-host"),
  host: types.string(),
  createdAt: types.optional(types.number()),
  deployHooks: z.array(
    z.lazy(() => GetMicrofrontendsInGroupLinkDeployHooks$inboundSchema),
  ),
  gitCredentialId: types.string(),
  updatedAt: types.optional(types.number()),
  sourceless: types.optional(types.boolean()),
  productionBranch: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONResponseBodyProjects2DeployHooks$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONResponseBodyProjects2DeployHooks,
    z.ZodTypeDef,
    unknown
  > = z.object({
    createdAt: types.optional(types.number()),
    id: types.string(),
    name: types.string(),
    ref: types.string(),
    url: types.string(),
  });

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

/** @internal */
export const GetMicrofrontendsInGroupLink2$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupLink2,
  z.ZodTypeDef,
  unknown
> = z.object({
  type: types.literal("github-limited"),
  createdAt: types.optional(types.number()),
  org: types.string(),
  repoOwnerId: types.optional(types.number()),
  repo: types.optional(types.string()),
  repoId: types.optional(types.number()),
  deployHooks: z.array(
    z.lazy(() =>
      GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONResponseBodyProjects2DeployHooks$inboundSchema
    ),
  ),
  gitCredentialId: types.string(),
  updatedAt: types.optional(types.number()),
  sourceless: types.optional(types.boolean()),
  productionBranch: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsDeployHooks$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsDeployHooks,
    z.ZodTypeDef,
    unknown
  > = z.object({
    createdAt: types.optional(types.number()),
    id: types.string(),
    name: types.string(),
    ref: types.string(),
    url: types.string(),
  });

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

/** @internal */
export const GetMicrofrontendsInGroupLink1$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupLink1,
  z.ZodTypeDef,
  unknown
> = z.object({
  org: types.string(),
  repoOwnerId: types.optional(types.number()),
  repo: types.optional(types.string()),
  repoId: types.optional(types.number()),
  type: types.literal("github"),
  createdAt: types.optional(types.number()),
  deployHooks: z.array(
    z.lazy(() =>
      GetMicrofrontendsInGroupLinkMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsDeployHooks$inboundSchema
    ),
  ),
  gitCredentialId: types.string(),
  updatedAt: types.optional(types.number()),
  sourceless: types.optional(types.boolean()),
  productionBranch: types.string(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupLink$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupLink,
  z.ZodTypeDef,
  unknown
> = z.union([
  z.lazy(() => GetMicrofrontendsInGroupLink1$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupLink2$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupLink3$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupLink4$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupLink5$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupLink6$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupLink7$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupLink8$inboundSchema),
]);

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontends3$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupMicrofrontends3,
  z.ZodTypeDef,
  unknown
> = z.object({
  updatedAt: types.number(),
  groupIds: z.array(z.any()),
  enabled: types.literal(false),
  freeProjectForLegacyLimits: types.optional(types.boolean()),
});

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

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontends2$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupMicrofrontends2,
  z.ZodTypeDef,
  unknown
> = z.object({
  isDefaultApp: types.optional(types.literal(false)),
  routeObservabilityToThisProject: types.optional(types.boolean()),
  doNotRouteWithMicrofrontendsRouting: types.optional(types.boolean()),
  updatedAt: types.number(),
  groupIds: z.array(types.string()),
  enabled: types.literal(true),
  defaultRoute: types.optional(types.string()),
  freeProjectForLegacyLimits: types.optional(types.boolean()),
});

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

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontends1$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupMicrofrontends1,
  z.ZodTypeDef,
  unknown
> = z.object({
  isDefaultApp: types.literal(true),
  updatedAt: types.number(),
  groupIds: z.array(types.string()),
  enabled: types.literal(true),
  defaultRoute: types.optional(types.string()),
  freeProjectForLegacyLimits: types.optional(types.boolean()),
});

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

/** @internal */
export const GetMicrofrontendsInGroupMicrofrontends$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupMicrofrontends,
  z.ZodTypeDef,
  unknown
> = smartUnion([
  z.lazy(() => GetMicrofrontendsInGroupMicrofrontends1$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupMicrofrontends2$inboundSchema),
  z.lazy(() => GetMicrofrontendsInGroupMicrofrontends3$inboundSchema),
]);

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

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

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

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

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

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

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

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

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

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

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupProtectionConfig$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupProtectionConfig,
  z.ZodTypeDef,
  unknown
> = z.object({
  sandboxUrls: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupSandboxUrls$inboundSchema),
  ),
});

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupSandbox$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupSandbox,
  z.ZodTypeDef,
  unknown
> = z.object({
  region: types.optional(GetMicrofrontendsInGroupRegion$inboundSchema),
  failoverRegions: types.optional(
    z.array(GetMicrofrontendsInGroupFailoverRegions$inboundSchema),
  ),
});

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

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

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

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

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

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

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

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

/** @internal */
export const GetMicrofrontendsInGroupResourceConfig$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupResourceConfig,
  z.ZodTypeDef,
  unknown
> = z.object({
  fluid: types.optional(types.boolean()),
  functionDefaultRegions: z.array(types.string()),
  functionDefaultTimeout: types.optional(types.number()),
  functionDefaultMemoryType: types.optional(
    GetMicrofrontendsInGroupMicrofrontendsFunctionDefaultMemoryType$inboundSchema,
  ),
  functionZeroConfigFailover: types.optional(types.boolean()),
  elasticConcurrencyEnabled: types.optional(types.boolean()),
  buildMachineType: types.optional(
    GetMicrofrontendsInGroupMicrofrontendsBuildMachineType$inboundSchema,
  ),
  buildMachineSelection: types.optional(
    GetMicrofrontendsInGroupMicrofrontendsBuildMachineSelection$inboundSchema,
  ),
  buildMachineElasticLastUpdated: types.optional(types.number()),
  buildMachineElasticReason: types.optional(
    GetMicrofrontendsInGroupMicrofrontendsBuildMachineElasticReason$inboundSchema,
  ),
  isNSNBDisabled: types.optional(types.boolean()),
  buildQueue: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupBuildQueue$inboundSchema),
  ),
  enableFunctionsBeta: types.optional(types.boolean()),
});

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

/** @internal */
export const GetMicrofrontendsInGroupRollbackDescription$inboundSchema:
  z.ZodType<
    GetMicrofrontendsInGroupRollbackDescription,
    z.ZodTypeDef,
    unknown
  > = z.object({
    userId: types.string(),
    username: types.string(),
    description: types.string(),
    createdAt: types.number(),
  });

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

/** @internal */
export const GetMicrofrontendsInGroupStages$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupStages,
  z.ZodTypeDef,
  unknown
> = z.object({
  targetPercentage: types.number(),
  requireApproval: types.optional(types.boolean()),
  duration: types.optional(types.number()),
  linearShift: types.optional(types.boolean()),
});

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

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

/** @internal */
export const GetMicrofrontendsInGroupChecks$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupChecks,
  z.ZodTypeDef,
  unknown
> = z.object({
  type:
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONResponseBodyProjectsRollingReleaseType$inboundSchema,
  minSampleSize: types.optional(types.number()),
  excludeStatusCodes: types.optional(z.array(types.number())),
  excludePaths: types.optional(z.array(types.string())),
  ingestWatermarkSeconds: types.optional(types.number()),
});

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

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

/** @internal */
export const GetMicrofrontendsInGroupGate$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupGate,
  z.ZodTypeDef,
  unknown
> = z.object({
  enabled: types.boolean(),
  checks: z.array(z.lazy(() => GetMicrofrontendsInGroupChecks$inboundSchema)),
  failureThreshold: types.optional(types.number()),
  windowSize: types.optional(types.number()),
  action:
    GetMicrofrontendsInGroupMicrofrontendsResponse200ApplicationJSONAction$inboundSchema,
  dryRun: types.boolean(),
});

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

/** @internal */
export const GetMicrofrontendsInGroupRollingRelease$inboundSchema: z.ZodType<
  GetMicrofrontendsInGroupRollingRelease,
  z.ZodTypeDef,
  unknown
> = z.object({
  target: types.string(),
  stages: z.nullable(
    z.array(z.lazy(() => GetMicrofrontendsInGroupStages$inboundSchema)),
  ).optional(),
  canaryResponseHeader: types.optional(types.boolean()),
  gate: types.optional(
    z.lazy(() => GetMicrofrontendsInGroupGate$inboundSchema),
  ),
});

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

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

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