Update generated ARM clients to latest version (#807)

This commit is contained in:
Steve Faulkner
2021-05-20 20:34:29 -05:00
committed by GitHub
parent e6b3f01f16
commit f4b0ea7d69
73 changed files with 1228 additions and 347 deletions

View File

@@ -20,7 +20,7 @@ import { getErrorMessage, getErrorStack } from "../../Common/ErrorHandlingUtils"
import { configContext, Platform } from "../../ConfigContext";
import * as DataModels from "../../Contracts/DataModels";
import { SubscriptionType } from "../../Contracts/SubscriptionType";
import { CollectionCreation, IndexingPolicies } from "../../Shared/Constants";
import { CollectionCreation } from "../../Shared/Constants";
import { Action } from "../../Shared/Telemetry/TelemetryConstants";
import * as TelemetryProcessor from "../../Shared/Telemetry/TelemetryProcessor";
import { userContext } from "../../UserContext";
@@ -41,6 +41,40 @@ export interface AddCollectionPanelProps {
databaseId?: string;
}
const SharedDatabaseDefault: DataModels.IndexingPolicy = {
indexingMode: "consistent",
automatic: true,
includedPaths: [],
excludedPaths: [
{
path: "/*",
},
],
};
const AllPropertiesIndexed: DataModels.IndexingPolicy = {
indexingMode: "consistent",
automatic: true,
includedPaths: [
{
path: "/*",
indexes: [
{
kind: "Range",
dataType: "Number",
precision: -1,
},
{
kind: "Range",
dataType: "String",
precision: -1,
},
],
},
],
excludedPaths: [],
};
export interface AddCollectionPanelState {
createNewDatabase: boolean;
newDatabaseId: string;
@@ -955,14 +989,14 @@ export class AddCollectionPanel extends React.Component<AddCollectionPanelProps,
const partitionKey: DataModels.PartitionKey = partitionKeyString
? {
paths: [partitionKeyString],
kind: Constants.BackendDefaults.partitionKeyKind,
kind: "Hash",
version: partitionKeyVersion,
}
: undefined;
const indexingPolicy: DataModels.IndexingPolicy = this.state.enableIndexing
? IndexingPolicies.AllPropertiesIndexed
: IndexingPolicies.SharedDatabaseDefault;
? AllPropertiesIndexed
: SharedDatabaseDefault;
const telemetryData = {
database: {