import type { ApiRequestOptions } from './ApiRequestOptions'; import { CancelablePromise } from './..'; import { EnvironmentType, EnvironmentToggleFeatures } from '../../types'; type Resolver = (options: ApiRequestOptions) => Promise; type Headers = Record; export type OpenAPIConfig = { BASE: string; VERSION: string; WITH_CREDENTIALS: boolean; CREDENTIALS: 'include' | 'omit' | 'same-origin'; TOKEN?: string | Resolver; USERNAME?: string | Resolver; PASSWORD?: string | Resolver; HEADERS?: Headers | Resolver; ENCODE_PATH?: (path: string) => string; }; export declare class TokenService { /** * @returns string Success * @throws ApiError */ static getSamPortalToken(): CancelablePromise; /** * @returns string Success * @throws ApiError */ static getSamPortalProductionToken(): CancelablePromise; } export declare const getSAMToken: () => Promise; export declare const OpenAPI_APP: OpenAPIConfig; export declare const OpenAPI_SAM: OpenAPIConfig; interface CustomEnvironment { environment: EnvironmentType; token?: Resolver; } export declare function getCustomEnvironmentConfig(feature: EnvironmentToggleFeatures): CustomEnvironment; /** * Determines the environment type for a given feature based on the localStorage configuration. * * This function checks the `ENVIRONMENT_TOGGLE_KEY` in localStorage to determine if the specified * feature is enabled. If the feature is enabled, it returns the current environment * name; otherwise, it returns `null`. * * @param {EnvironmentToggleFeatures} feature - The feature key to check in the localStorage. * * * @returns {EnvironmentType | null} - The environment type for the feature if enabled, or `null` if * the feature is not enabled or the localStorage value is invalid. */ export declare const getFeatureEnvironment: (feature: EnvironmentToggleFeatures) => EnvironmentType | null; export declare const getOpenAPIConfig: (feature: EnvironmentToggleFeatures) => OpenAPIConfig; export {};