mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-02-03 06:36:44 +00:00
21 lines
505 B
TypeScript
21 lines
505 B
TypeScript
|
import { DatabaseAccount } from "./Contracts/DataModels";
|
||
|
|
||
|
interface UserContext {
|
||
|
masterKey?: string;
|
||
|
subscriptionId?: string;
|
||
|
resourceGroup?: string;
|
||
|
databaseAccount?: DatabaseAccount;
|
||
|
endpoint?: string;
|
||
|
accessToken?: string;
|
||
|
authorizationToken?: string;
|
||
|
resourceToken?: string;
|
||
|
}
|
||
|
|
||
|
const userContext: Readonly<UserContext> = {} as const;
|
||
|
|
||
|
function updateUserContext(newContext: UserContext): void {
|
||
|
Object.assign(userContext, newContext);
|
||
|
}
|
||
|
|
||
|
export { userContext, updateUserContext };
|