import { Cache } from './cache'; import type { ClientCredentialsResponse } from './xsuaa-service-types'; import type { IasResource } from './destination'; /** * * @internal * @param tenantId - The ID of the tenant to cache the token for. * @param clientId - ClientId to fetch the token. * @returns The cache key. */ export declare function getCacheKey(tenantId: string | undefined, clientId: string): string | undefined; /** * An interface for data the is used for IAS client credentials cache keys * @internal */ interface IasClientCredentialsCacheKeyData { /** * The hostname of the IAS instance. * @example tenant.accounts400.ondemand.com */ iasInstance: string; /** * The client credentials client ID. */ clientId: string; /** * The BTP instanced ID supplied with the token request. */ appTid?: string | undefined; resource?: IasResource | undefined; } /** * * @internal * @param data.iasInstance - The IAS instance (tenant) hostname the token is fetched from. * @param data.appTid - The BTP instance (tenant) id (App-Tid) * @param data.clientId - ClientId to fetch the token. * @param data.resource - The App-To-App resource the token is scoped for. * @returns The cache key. */ export declare function getIasCacheKey(data: IasClientCredentialsCacheKeyData): string | undefined; /** * @internal */ export declare const clientCredentialsTokenCache: { getToken: (tenantId: string | undefined, clientId: string) => ClientCredentialsResponse | undefined; cacheToken: (tenantId: string | undefined, clientId: string, token: ClientCredentialsResponse) => void; getTokenIas: (data: IasClientCredentialsCacheKeyData) => ClientCredentialsResponse | undefined; cacheIasToken: (data: IasClientCredentialsCacheKeyData, tokenResponse: ClientCredentialsResponse) => void; clear: () => void; getCacheInstance: () => Cache; }; export {};