cosmos-explorer/src/UserContext.ts
Steve Faulkner dfb1b50621
Explorer.ts Cleanup (#341)
Co-authored-by: victor-meng <56978073+victor-meng@users.noreply.github.com>
2020-12-16 20:00:39 -06:00

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 };