2020-08-06 14:03:46 -05:00
|
|
|
import { DatabaseAccount } from "./Contracts/DataModels";
|
2020-08-11 18:36:42 -07:00
|
|
|
import { DefaultAccountExperienceType } from "./DefaultAccountExperienceType";
|
2020-08-06 14:03:46 -05:00
|
|
|
|
|
|
|
interface UserContext {
|
|
|
|
masterKey?: string;
|
|
|
|
subscriptionId?: string;
|
|
|
|
resourceGroup?: string;
|
|
|
|
databaseAccount?: DatabaseAccount;
|
|
|
|
endpoint?: string;
|
|
|
|
accessToken?: string;
|
|
|
|
authorizationToken?: string;
|
|
|
|
resourceToken?: string;
|
2020-08-11 18:36:42 -07:00
|
|
|
defaultExperience?: DefaultAccountExperienceType;
|
2020-08-19 16:11:43 -07:00
|
|
|
useSDKOperations?: boolean;
|
2020-08-06 14:03:46 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
const userContext: Readonly<UserContext> = {} as const;
|
|
|
|
|
|
|
|
function updateUserContext(newContext: UserContext): void {
|
|
|
|
Object.assign(userContext, newContext);
|
|
|
|
}
|
|
|
|
|
|
|
|
export { userContext, updateUserContext };
|