mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-19 00:41:31 +00:00
Remove Explorer.collectionCreationDefaults (#840)
Co-authored-by: Steve Faulkner <southpolesteve@gmail.com>
This commit is contained in:
@@ -2,7 +2,25 @@ import { AuthType } from "./AuthType";
|
||||
import { DatabaseAccount } from "./Contracts/DataModels";
|
||||
import { SubscriptionType } from "./Contracts/SubscriptionType";
|
||||
import { extractFeatures, Features } from "./Platform/Hosted/extractFeatures";
|
||||
import { CollectionCreation } from "./Shared/Constants";
|
||||
import { CollectionCreation, CollectionCreationDefaults } from "./Shared/Constants";
|
||||
|
||||
interface ThroughputDefaults {
|
||||
fixed: number;
|
||||
unlimited:
|
||||
| number
|
||||
| {
|
||||
collectionThreshold: number;
|
||||
lessThanOrEqualToThreshold: number;
|
||||
greatThanThreshold: number;
|
||||
};
|
||||
unlimitedmax: number;
|
||||
unlimitedmin: number;
|
||||
shared: number;
|
||||
}
|
||||
export interface CollectionCreationDefaults {
|
||||
storage: string;
|
||||
throughput: ThroughputDefaults;
|
||||
}
|
||||
|
||||
interface UserContext {
|
||||
readonly authType?: AuthType;
|
||||
@@ -26,6 +44,7 @@ interface UserContext {
|
||||
readonly features: Features;
|
||||
readonly addCollectionFlight: string;
|
||||
readonly hasWriteAccess: boolean;
|
||||
collectionCreationDefaults: CollectionCreationDefaults;
|
||||
}
|
||||
|
||||
export type ApiType = "SQL" | "Mongo" | "Gremlin" | "Tables" | "Cassandra";
|
||||
@@ -43,6 +62,7 @@ const userContext: UserContext = {
|
||||
useSDKOperations,
|
||||
addCollectionFlight: CollectionCreation.DefaultAddCollectionDefaultFlight,
|
||||
subscriptionType: CollectionCreation.DefaultSubscriptionType,
|
||||
collectionCreationDefaults: CollectionCreationDefaults,
|
||||
};
|
||||
|
||||
function updateUserContext(newContext: Partial<UserContext>): void {
|
||||
|
||||
Reference in New Issue
Block a user