UNPKG

@altostra/core

Version:

Core library for shared types and logic

21 lines (20 loc) 966 B
import type { Logger } from "../common/Logging"; import type { Organization, OrganizationId } from "../common/Models/Organization"; import type { UserResponse } from "../common/Models/Users"; import type { Dict } from "../common/Types"; import { DataCache } from "../common/Utils/DataCache"; import type { IdentityToken } from "./ServiceClients/common"; export declare const SECONDS_IN_WEEK: number; export interface GetAccountMetadataOptions { team: OrganizationId; getToken: () => Promise<IdentityToken>; logger: Logger; bossEndpoint?: string; settingsDir?: string; } export interface AccountsMetadata { organizations: DataCache<Record<string, Organization>>; users: DataCache<Dict<UserResponse>>; } export declare function getAccountMetadata({ getToken, logger, team, bossEndpoint, settingsDir, }: GetAccountMetadataOptions): AccountsMetadata; export declare function getUsersCachesDirectory(settingsDir?: string | undefined): string;