mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-01-24 01:40:24 +00:00
dfb1b50621
Co-authored-by: victor-meng <56978073+victor-meng@users.noreply.github.com>
27 lines
790 B
TypeScript
27 lines
790 B
TypeScript
import { DatabaseAccount } from "./Contracts/DataModels";
|
|
import { SubscriptionType } from "./Contracts/SubscriptionType";
|
|
import { DefaultAccountExperienceType } from "./DefaultAccountExperienceType";
|
|
|
|
interface UserContext {
|
|
masterKey?: string;
|
|
subscriptionId?: string;
|
|
resourceGroup?: string;
|
|
databaseAccount?: DatabaseAccount;
|
|
endpoint?: string;
|
|
accessToken?: string;
|
|
authorizationToken?: string;
|
|
resourceToken?: string;
|
|
defaultExperience?: DefaultAccountExperienceType;
|
|
useSDKOperations?: boolean;
|
|
subscriptionType?: SubscriptionType;
|
|
quotaId?: string;
|
|
}
|
|
|
|
const userContext: Readonly<UserContext> = {} as const;
|
|
|
|
function updateUserContext(newContext: UserContext): void {
|
|
Object.assign(userContext, newContext);
|
|
}
|
|
|
|
export { userContext, updateUserContext };
|