import { ApplicationId, ISODateString, APIPayload } from '../../common/v2.js'; import '../../utils.js'; /** * APIApplication#language — canonical runtime slug returned by the API. * `static` covers HTML/CSS sites. * @see https://docs.squarecloud.app/en/api-reference/endpoint/apps/info * @see https://docs.squarecloud.app/en/getting-started/config-file */ type ApplicationLanguage = "javascript" | "typescript" | "python" | "java" | "elixir" | "go" | "rust" | "ruby" | "php" | "dotnet" | "static"; declare const ApplicationLanguage: { readonly JavaScript: "javascript"; readonly TypeScript: "typescript"; readonly Python: "python"; readonly Java: "java"; readonly Elixir: "elixir"; readonly Go: "go"; readonly Rust: "rust"; readonly Ruby: "ruby"; readonly PHP: "php"; readonly Dotnet: "dotnet"; readonly Static: "static"; }; /** * @see https://docs.squarecloud.app/en/api-reference/endpoint/apps/info */ interface APIApplication { id: ApplicationId; name: string; desc?: string; owner: string; cluster: string; ram: number; language: ApplicationLanguage; /** Default `.squareweb.app` hostname. `null` for non-web apps. */ domain: string | null; /** Custom domain bound to the app, when configured. */ custom: string | null; created_at: ISODateString; } type APIApplicationPayload = APIPayload; /** * Narrowing of {@link APIApplication} for web applications — `domain` is * always present. * @see https://docs.squarecloud.app/en/api-reference/endpoint/apps/info */ interface APIWebsiteApplication extends APIApplication { domain: string; } type APIWebsiteApplicationPayload = APIPayload; export { type APIApplication, type APIApplicationPayload, type APIWebsiteApplication, type APIWebsiteApplicationPayload, ApplicationLanguage };