/** * Clio data regions. * * Clio hosts each firm's data in one of four regions, chosen when the Clio * account is created. The REST API and the OAuth endpoints both live on the * regional hostname, so CLIO_REGION must match the Clio server the firm logs * in to. This module is the single place that maps a region code to its base * URL; every other module imports from here instead of hardcoding hosts. */ export declare const CLIO_REGION_BASE_URLS: { readonly us: "https://app.clio.com"; readonly eu: "https://eu.app.clio.com"; readonly au: "https://au.app.clio.com"; readonly ca: "https://ca.app.clio.com"; }; export type ClioRegion = keyof typeof CLIO_REGION_BASE_URLS; export declare const CLIO_REGIONS: ClioRegion[]; export declare const DEFAULT_CLIO_REGION: ClioRegion; export declare class InvalidClioRegionError extends Error { readonly value: string; constructor(value: string); } export declare function isClioRegion(value: string): value is ClioRegion; /** * Parse a raw CLIO_REGION value. Unset or blank means the default (us). * Anything else must be one of the known region codes; there is no silent * fallback to the US endpoint. */ export declare function parseClioRegion(raw: string | undefined): ClioRegion; export declare function getClioRegion(env?: NodeJS.ProcessEnv): ClioRegion; /** Explicit value first, then CLIO_REGION from `env`, then the default. */ export declare function resolveRegion(input?: string, env?: NodeJS.ProcessEnv): ClioRegion; /** * The URL helpers below take either a region code (pure: no env, no * overrides) or a process env (today's behaviour: CLIO_REGION plus the * CLIO_API_BASE / CLIO_AUTH_URL / CLIO_TOKEN_URL overrides). */ export type RegionOrEnv = ClioRegion | NodeJS.ProcessEnv; /** Regional host with scheme and no path, e.g. https://eu.app.clio.com */ export declare function getClioRegionBaseUrl(env?: NodeJS.ProcessEnv): string; /** API base, e.g. https://eu.app.clio.com/api/v4. CLIO_API_BASE takes precedence over the region. */ export declare function getClioApiBaseUrl(arg?: RegionOrEnv): string; /** OAuth authorization endpoint. CLIO_AUTH_URL takes precedence over the region. */ export declare function getClioAuthorizeUrl(arg?: RegionOrEnv): string; /** OAuth token endpoint. CLIO_TOKEN_URL takes precedence over the region. */ export declare function getClioTokenUrl(arg?: RegionOrEnv): string; //# sourceMappingURL=clioRegion.d.ts.map