import { A as CoreApp, D as Studio, tt as LocalApplication } from "./application-list-Dh3Y9exX.js"; import "./config-BjBi67kU.js"; import { ClientError, ServerError } from "@sanity/client"; /** * Reads the dev server's payload. A running CLI is the only source of local * applications, and one it can't describe is dropped rather than failing the * whole list. * @public */ declare function parseLocalApplications(applications: readonly unknown[]): LocalApplication[]; /** * Builds a `Studio` from a local CLI dev-server payload. The client manifest and * the forwarded interfaces are adapted into brett's deployment shape, so a local * studio reads workspaces, schema, version and interfaces through the same * channel a deployed one does. * @public */ declare function createStudioApplicationFromLocal(local: Extract): Studio; /** * Builds a `CoreApp` from a local CLI dev-server payload. The forwarded * interfaces are adapted into brett's deployment shape, and the manifest's * title and icon are lifted onto the application record brett would serve. * @public */ declare function createCoreApplicationFromLocal(local: Extract): CoreApp; declare global { var __SANITY_STAGING__: boolean | undefined; } /** * Returns the Sanity domain based on the `__SANITY_STAGING__` runtime-time flag. * If the flag is set to `true`, the staging domain is returned. * Otherwise, the production domain is returned. * * @public */ declare function getSanityDomain(): string; /** * Returns the API host based on the `__SANITY_STAGING__` runtime-time flag. * If the flag is set to `true`, the staging API host is returned. * Otherwise, the production API host is returned. * * @public */ declare function getApiHost(): string | undefined; /** * Returns the domain brett applications are served from — an application * deployed through the new `/applications` API lives at `-apps-`, * a different URL from the legacy studio domain. * * @public */ declare function getApplicationDomain(): string; /** * Returns the current Sanity environment based on the `__SANITY_STAGING__` runtime-time flag. * If the flag is set to `true`, "staging" is returned. * Otherwise, "production" is returned. * * @public */ declare function getSanityEnv(): "staging" | "production"; /** * @internal */ declare const isSanityClientError: (err: unknown) => err is ClientError | ServerError; export { getSanityEnv as a, parseLocalApplications as c, getSanityDomain as i, getApiHost as n, createCoreApplicationFromLocal as o, getApplicationDomain as r, createStudioApplicationFromLocal as s, isSanityClientError as t }; //# sourceMappingURL=index-C15YDHgO.d.ts.map