UNPKG

@azure/cosmos

Version:
518 lines (517 loc) • 31.4 kB
var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var constants_exports = {}; __export(constants_exports, { AAD_AUTH_PREFIX: () => AAD_AUTH_PREFIX, AAD_DEFAULT_SCOPE: () => AAD_DEFAULT_SCOPE, AAD_RESOURCE_NOT_FOUND_ERROR: () => AAD_RESOURCE_NOT_FOUND_ERROR, Constants: () => Constants, CosmosContainerChildResourceKind: () => CosmosContainerChildResourceKind, CosmosKeyType: () => CosmosKeyType, HTTPMethod: () => HTTPMethod, OperationType: () => OperationType, PartitionAvailablilityStatus: () => PartitionAvailablilityStatus, PermissionScopeValues: () => PermissionScopeValues, QueryExecution: () => QueryExecution, QueryFeature: () => QueryFeature, ResourceType: () => ResourceType, SDKSupportedCapabilities: () => SDKSupportedCapabilities, SasTokenPermissionKind: () => SasTokenPermissionKind, UserAgentFeatureFlags: () => UserAgentFeatureFlags }); module.exports = __toCommonJS(constants_exports); const Constants = { HttpHeaders: { Authorization: "authorization", ETag: "etag", MethodOverride: "X-HTTP-Method", Slug: "Slug", ContentType: "Content-Type", LastModified: "Last-Modified", ContentEncoding: "Content-Encoding", CharacterSet: "CharacterSet", UserAgent: "User-Agent", CustomUserAgent: "x-ms-useragent", IfModifiedSince: "If-Modified-Since", IfMatch: "If-Match", IfNoneMatch: "If-None-Match", ContentLength: "Content-Length", AcceptEncoding: "Accept-Encoding", KeepAlive: "Keep-Alive", CacheControl: "Cache-Control", TransferEncoding: "Transfer-Encoding", ContentLanguage: "Content-Language", ContentLocation: "Content-Location", ContentMd5: "Content-Md5", ContentRange: "Content-Range", Accept: "Accept", AcceptCharset: "Accept-Charset", AcceptLanguage: "Accept-Language", IfRange: "If-Range", IfUnmodifiedSince: "If-Unmodified-Since", MaxForwards: "Max-Forwards", ProxyAuthorization: "Proxy-Authorization", AcceptRanges: "Accept-Ranges", ProxyAuthenticate: "Proxy-Authenticate", RetryAfter: "Retry-After", SetCookie: "Set-Cookie", WwwAuthenticate: "Www-Authenticate", Origin: "Origin", Host: "Host", AccessControlAllowOrigin: "Access-Control-Allow-Origin", AccessControlAllowHeaders: "Access-Control-Allow-Headers", KeyValueEncodingFormat: "application/x-www-form-urlencoded", WrapAssertionFormat: "wrap_assertion_format", WrapAssertion: "wrap_assertion", WrapScope: "wrap_scope", SimpleToken: "SWT", HttpDate: "date", Prefer: "Prefer", Location: "Location", Referer: "referer", A_IM: "A-IM", PreferReturnMinimal: "return=minimal", // Query Query: "x-ms-documentdb-query", IsQuery: "x-ms-documentdb-isquery", IsQueryPlan: "x-ms-cosmos-is-query-plan-request", SupportedQueryFeatures: "x-ms-cosmos-supported-query-features", QueryVersion: "x-ms-cosmos-query-version", // Our custom Azure Cosmos DB headers Continuation: "x-ms-continuation", ContinuationToken: "x-ms-continuation-token", PageSize: "x-ms-max-item-count", ItemCount: "x-ms-item-count", ChangeFeedWireFormatVersion: "x-ms-cosmos-changefeed-wire-format-version", // Request sender generated. Simply echoed by backend. ActivityId: "x-ms-activity-id", CorrelatedActivityId: "x-ms-cosmos-correlated-activityid", PreTriggerInclude: "x-ms-documentdb-pre-trigger-include", PreTriggerExclude: "x-ms-documentdb-pre-trigger-exclude", PostTriggerInclude: "x-ms-documentdb-post-trigger-include", PostTriggerExclude: "x-ms-documentdb-post-trigger-exclude", IndexingDirective: "x-ms-indexing-directive", SessionToken: "x-ms-session-token", ConsistencyLevel: "x-ms-consistency-level", XDate: "x-ms-date", CollectionPartitionInfo: "x-ms-collection-partition-info", CollectionServiceInfo: "x-ms-collection-service-info", // Deprecated, use RetryAfterInMs instead. RetryAfterInMilliseconds: "x-ms-retry-after-ms", RetryAfterInMs: "x-ms-retry-after-ms", IsFeedUnfiltered: "x-ms-is-feed-unfiltered", ResourceTokenExpiry: "x-ms-documentdb-expiry-seconds", EnableScanInQuery: "x-ms-documentdb-query-enable-scan", EmitVerboseTracesInQuery: "x-ms-documentdb-query-emit-traces", EnableCrossPartitionQuery: "x-ms-documentdb-query-enablecrosspartition", ParallelizeCrossPartitionQuery: "x-ms-documentdb-query-parallelizecrosspartitionquery", ResponseContinuationTokenLimitInKB: "x-ms-documentdb-responsecontinuationtokenlimitinkb", SDKSupportedCapabilities: "x-ms-cosmos-sdk-supportedcapabilities", // QueryMetrics // Request header to tell backend to give you query metrics. PopulateQueryMetrics: "x-ms-documentdb-populatequerymetrics", // Response header that holds the serialized version of query metrics. QueryMetrics: "x-ms-documentdb-query-metrics", // IndexMetrics // Request header to tell backend to give you index metrics. PopulateIndexMetrics: "x-ms-cosmos-populateindexmetrics-V2", // Response header that holds the serialized version of index metrics. IndexUtilization: "x-ms-cosmos-index-utilization", // Version headers and values Version: "x-ms-version", // Owner name OwnerFullName: "x-ms-alt-content-path", // Owner ID used for name based request in session token. OwnerId: "x-ms-content-path", // Partition Key PartitionKey: "x-ms-documentdb-partitionkey", PartitionKeyRangeID: "x-ms-documentdb-partitionkeyrangeid", // Epk Range headers StartEpk: "x-ms-start-epk", EndEpk: "x-ms-end-epk", // Read Feed Type ReadFeedKeyType: "x-ms-read-key-type", // Quota Info MaxEntityCount: "x-ms-root-entity-max-count", CurrentEntityCount: "x-ms-root-entity-current-count", CollectionQuotaInMb: "x-ms-collection-quota-mb", CollectionCurrentUsageInMb: "x-ms-collection-usage-mb", MaxMediaStorageUsageInMB: "x-ms-max-media-storage-usage-mb", CurrentMediaStorageUsageInMB: "x-ms-media-storage-usage-mb", RequestCharge: "x-ms-request-charge", PopulateQuotaInfo: "x-ms-documentdb-populatequotainfo", MaxResourceQuota: "x-ms-resource-quota", // Offer header OfferType: "x-ms-offer-type", OfferThroughput: "x-ms-offer-throughput", AutoscaleSettings: "x-ms-cosmos-offer-autopilot-settings", // Custom RUs/minute headers DisableRUPerMinuteUsage: "x-ms-documentdb-disable-ru-per-minute-usage", IsRUPerMinuteUsed: "x-ms-documentdb-is-ru-per-minute-used", OfferIsRUPerMinuteThroughputEnabled: "x-ms-offer-is-ru-per-minute-throughput-enabled", // Index progress headers IndexTransformationProgress: "x-ms-documentdb-collection-index-transformation-progress", LazyIndexingProgress: "x-ms-documentdb-collection-lazy-indexing-progress", // Upsert header IsUpsert: "x-ms-documentdb-is-upsert", // Sub status of the error SubStatus: "x-ms-substatus", // StoredProcedure related headers EnableScriptLogging: "x-ms-documentdb-script-enable-logging", ScriptLogResults: "x-ms-documentdb-script-log-results", // Multi-Region Write ALLOW_MULTIPLE_WRITES: "x-ms-cosmos-allow-tentative-writes", // Bulk/Batch header IsBatchRequest: "x-ms-cosmos-is-batch-request", IsBatchAtomic: "x-ms-cosmos-batch-atomic", BatchContinueOnError: "x-ms-cosmos-batch-continue-on-error", // Dedicated Gateway Headers DedicatedGatewayPerRequestCacheStaleness: "x-ms-dedicatedgateway-max-age", DedicatedGatewayPerRequestBypassCache: "x-ms-dedicatedgateway-bypass-cache", // Cache Refresh header ForceRefresh: "x-ms-force-refresh", // Throughput related headers PriorityLevel: "x-ms-cosmos-priority-level", ThroughputBucket: "x-ms-cosmos-throughput-bucket", // Encryption Headers IsClientEncryptedHeader: "x-ms-cosmos-is-client-encrypted", IntendedCollectionHeader: "x-ms-cosmos-intended-collection-rid", DatabaseRidHeader: "x-ms-cosmos-database-rid", AllowCachedReadsHeader: "x-ms-cosmos-allow-cachedreads" }, // ThrottledRequests Retry policy default values ThrottledRequestMaxRetryAttemptCount: 9, ThrottledRequestMaxWaitTimeInSeconds: 30, ThrottledRequestFixedRetryIntervalInMs: 0, // GlobalDB related constants WritableLocations: "writableLocations", ReadableLocations: "readableLocations", LocationUnavailableExpirationTimeInMs: 5 * 60 * 1e3, // 5 minutes StalePartitionUnavailabilityRefreshIntervalInMs: 1 * 60 * 1e3, // 1 minute AllowedPartitionUnavailabilityDurationInMs: 5 * 60 * 1e3, // 5 minutes ReadRequestFailureCountThreshold: 10, WriteRequestFailureCountThreshold: 5, ConsecutiveFailureCountResetIntervalInMS: 1e3 * 60 * 1, // 1 minute // ServiceDocument Resource ENABLE_MULTIPLE_WRITABLE_LOCATIONS: "enableMultipleWriteLocations", EnablePerPartitionFailover: "enablePerPartitionFailoverBehavior", // Background refresh time DefaultUnavailableLocationExpirationTimeMS: 5 * 60 * 1e3, // Client generated retry count response header ThrottleRetryCount: "x-ms-throttle-retry-count", ThrottleRetryWaitTimeInMs: "x-ms-throttle-retry-wait-time-ms", // Platform CurrentVersion: "2020-07-15", AzureNamespace: "Azure.Cosmos", AzurePackageName: "@azure/cosmos", SDKName: "azure-cosmos-js", SDKVersion: "4.9.2", // Diagnostics CosmosDbDiagnosticLevelEnvVarName: "AZURE_COSMOSDB_DIAGNOSTICS_LEVEL", // Bulk Operations DefaultMaxBulkRequestBodySizeInBytes: 220201, MaxBulkOperationsCount: 100, BulkMaxDegreeOfConcurrency: 20, // Encryption Encryption: { DiagnosticsDecryptOperation: "Decrypt", DiagnosticsDuration: "Duration in milliseconds", DiagnosticsEncryptionDiagnostics: "EncryptionDiagnostics", DiagnosticsEncryptOperation: "Encrypt", DiagnosticsPropertiesEncryptedCount: "Properties Encrypted Count", DiagnosticsPropertiesDecryptedCount: "Properties Decrypted Count", DiagnosticsStartTime: "Start time" }, Quota: { CollectionSize: "collectionSize" }, Path: { Root: "/", DatabasesPathSegment: "dbs", CollectionsPathSegment: "colls", UsersPathSegment: "users", DocumentsPathSegment: "docs", PermissionsPathSegment: "permissions", StoredProceduresPathSegment: "sprocs", TriggersPathSegment: "triggers", UserDefinedFunctionsPathSegment: "udfs", ConflictsPathSegment: "conflicts", AttachmentsPathSegment: "attachments", PartitionKeyRangesPathSegment: "pkranges", SchemasPathSegment: "schemas", OffersPathSegment: "offers", TopologyPathSegment: "topology", DatabaseAccountPathSegment: "databaseaccount" }, PartitionKeyRange: { // Partition Key Range Constants MinInclusive: "minInclusive", MaxExclusive: "maxExclusive", Id: "id" }, QueryRangeConstants: { // Partition Key Range Constants MinInclusive: "minInclusive", MaxExclusive: "maxExclusive", min: "min" }, /** * @deprecated Use EffectivePartitionKeyConstants instead */ EffectiveParitionKeyConstants: { MinimumInclusiveEffectivePartitionKey: "", MaximumExclusiveEffectivePartitionKey: "FF" }, EffectivePartitionKeyConstants: { MinimumInclusiveEffectivePartitionKey: "", MaximumExclusiveEffectivePartitionKey: "FF" }, // Changefeed AllVersionsAndDeletesMode formatting version AllVersionsAndDeletesChangeFeedWireFormatVersion: "2021-09-15", ChangeFeedIfNoneMatchStartFromNowHeader: "*", // Default TTL for encryption caches is 2 hrs (7200 sec) DefaultEncryptionCacheTimeToLiveInSeconds: 7200, // Timeout to clear encryption related cache EncryptionCacheRefreshIntervalInMs: 6e4, // 1 minute RequestTimeoutForReadsInMs: 2e3 // 2 seconds }; const AAD_DEFAULT_SCOPE = "https://cosmos.azure.com/.default"; const AAD_AUTH_PREFIX = "type=aad&ver=1.0&sig="; const AAD_RESOURCE_NOT_FOUND_ERROR = "AADSTS500011"; const QueryExecution = { /** Default page size for query execution when maxItemCount is not specified */ DEFAULT_PAGE_SIZE: 10, /** Default maximum buffer size for vector search queries */ DEFAULT_MAX_VECTOR_SEARCH_BUFFER_SIZE: 5e4 }; var ResourceType = /* @__PURE__ */ ((ResourceType2) => { ResourceType2["none"] = ""; ResourceType2["database"] = "dbs"; ResourceType2["offer"] = "offers"; ResourceType2["user"] = "users"; ResourceType2["permission"] = "permissions"; ResourceType2["container"] = "colls"; ResourceType2["conflicts"] = "conflicts"; ResourceType2["sproc"] = "sprocs"; ResourceType2["udf"] = "udfs"; ResourceType2["trigger"] = "triggers"; ResourceType2["item"] = "docs"; ResourceType2["pkranges"] = "pkranges"; ResourceType2["partitionkey"] = "partitionKey"; ResourceType2["clientencryptionkey"] = "clientencryptionkeys"; return ResourceType2; })(ResourceType || {}); var HTTPMethod = /* @__PURE__ */ ((HTTPMethod2) => { HTTPMethod2["get"] = "GET"; HTTPMethod2["patch"] = "PATCH"; HTTPMethod2["post"] = "POST"; HTTPMethod2["put"] = "PUT"; HTTPMethod2["delete"] = "DELETE"; return HTTPMethod2; })(HTTPMethod || {}); var OperationType = /* @__PURE__ */ ((OperationType2) => { OperationType2["Create"] = "create"; OperationType2["Replace"] = "replace"; OperationType2["Upsert"] = "upsert"; OperationType2["Delete"] = "delete"; OperationType2["Read"] = "read"; OperationType2["Query"] = "query"; OperationType2["Execute"] = "execute"; OperationType2["Batch"] = "batch"; OperationType2["Patch"] = "patch"; return OperationType2; })(OperationType || {}); var CosmosKeyType = /* @__PURE__ */ ((CosmosKeyType2) => { CosmosKeyType2["PrimaryMaster"] = "PRIMARY_MASTER"; CosmosKeyType2["SecondaryMaster"] = "SECONDARY_MASTER"; CosmosKeyType2["PrimaryReadOnly"] = "PRIMARY_READONLY"; CosmosKeyType2["SecondaryReadOnly"] = "SECONDARY_READONLY"; return CosmosKeyType2; })(CosmosKeyType || {}); var CosmosContainerChildResourceKind = /* @__PURE__ */ ((CosmosContainerChildResourceKind2) => { CosmosContainerChildResourceKind2["Item"] = "ITEM"; CosmosContainerChildResourceKind2["StoredProcedure"] = "STORED_PROCEDURE"; CosmosContainerChildResourceKind2["UserDefinedFunction"] = "USER_DEFINED_FUNCTION"; CosmosContainerChildResourceKind2["Trigger"] = "TRIGGER"; return CosmosContainerChildResourceKind2; })(CosmosContainerChildResourceKind || {}); var PermissionScopeValues = /* @__PURE__ */ ((PermissionScopeValues2) => { PermissionScopeValues2[PermissionScopeValues2["ScopeAccountReadValue"] = 1] = "ScopeAccountReadValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeAccountListDatabasesValue"] = 2] = "ScopeAccountListDatabasesValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeDatabaseReadValue"] = 4] = "ScopeDatabaseReadValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeDatabaseReadOfferValue"] = 8] = "ScopeDatabaseReadOfferValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeDatabaseListContainerValue"] = 16] = "ScopeDatabaseListContainerValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerReadValue"] = 32] = "ScopeContainerReadValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerReadOfferValue"] = 64] = "ScopeContainerReadOfferValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeAccountCreateDatabasesValue"] = 1] = "ScopeAccountCreateDatabasesValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeAccountDeleteDatabasesValue"] = 2] = "ScopeAccountDeleteDatabasesValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeDatabaseDeleteValue"] = 4] = "ScopeDatabaseDeleteValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeDatabaseReplaceOfferValue"] = 8] = "ScopeDatabaseReplaceOfferValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeDatabaseCreateContainerValue"] = 16] = "ScopeDatabaseCreateContainerValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeDatabaseDeleteContainerValue"] = 32] = "ScopeDatabaseDeleteContainerValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerReplaceValue"] = 64] = "ScopeContainerReplaceValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerDeleteValue"] = 128] = "ScopeContainerDeleteValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerReplaceOfferValue"] = 256] = "ScopeContainerReplaceOfferValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeAccountReadAllAccessValue"] = 65535] = "ScopeAccountReadAllAccessValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeDatabaseReadAllAccessValue"] = 124] = "ScopeDatabaseReadAllAccessValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainersReadAllAccessValue"] = 96] = "ScopeContainersReadAllAccessValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeAccountWriteAllAccessValue"] = 65535] = "ScopeAccountWriteAllAccessValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeDatabaseWriteAllAccessValue"] = 508] = "ScopeDatabaseWriteAllAccessValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainersWriteAllAccessValue"] = 448] = "ScopeContainersWriteAllAccessValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerExecuteQueriesValue"] = 1] = "ScopeContainerExecuteQueriesValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerReadFeedsValue"] = 2] = "ScopeContainerReadFeedsValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerReadStoredProceduresValue"] = 4] = "ScopeContainerReadStoredProceduresValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerReadUserDefinedFunctionsValue"] = 8] = "ScopeContainerReadUserDefinedFunctionsValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerReadTriggersValue"] = 16] = "ScopeContainerReadTriggersValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerReadConflictsValue"] = 32] = "ScopeContainerReadConflictsValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeItemReadValue"] = 64] = "ScopeItemReadValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeStoredProcedureReadValue"] = 128] = "ScopeStoredProcedureReadValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeUserDefinedFunctionReadValue"] = 256] = "ScopeUserDefinedFunctionReadValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeTriggerReadValue"] = 512] = "ScopeTriggerReadValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerCreateItemsValue"] = 1] = "ScopeContainerCreateItemsValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerReplaceItemsValue"] = 2] = "ScopeContainerReplaceItemsValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerUpsertItemsValue"] = 4] = "ScopeContainerUpsertItemsValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerDeleteItemsValue"] = 8] = "ScopeContainerDeleteItemsValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerCreateStoredProceduresValue"] = 16] = "ScopeContainerCreateStoredProceduresValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerReplaceStoredProceduresValue"] = 32] = "ScopeContainerReplaceStoredProceduresValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerDeleteStoredProceduresValue"] = 64] = "ScopeContainerDeleteStoredProceduresValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerExecuteStoredProceduresValue"] = 128] = "ScopeContainerExecuteStoredProceduresValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerCreateTriggersValue"] = 256] = "ScopeContainerCreateTriggersValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerReplaceTriggersValue"] = 512] = "ScopeContainerReplaceTriggersValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerDeleteTriggersValue"] = 1024] = "ScopeContainerDeleteTriggersValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerCreateUserDefinedFunctionsValue"] = 2048] = "ScopeContainerCreateUserDefinedFunctionsValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerReplaceUserDefinedFunctionsValue"] = 4096] = "ScopeContainerReplaceUserDefinedFunctionsValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerDeleteUserDefinedFunctionSValue"] = 8192] = "ScopeContainerDeleteUserDefinedFunctionSValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerDeleteCONFLICTSValue"] = 16384] = "ScopeContainerDeleteCONFLICTSValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeItemReplaceValue"] = 65536] = "ScopeItemReplaceValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeItemUpsertValue"] = 131072] = "ScopeItemUpsertValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeItemDeleteValue"] = 262144] = "ScopeItemDeleteValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeStoredProcedureReplaceValue"] = 1048576] = "ScopeStoredProcedureReplaceValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeStoredProcedureDeleteValue"] = 2097152] = "ScopeStoredProcedureDeleteValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeStoredProcedureExecuteValue"] = 4194304] = "ScopeStoredProcedureExecuteValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeUserDefinedFunctionReplaceValue"] = 8388608] = "ScopeUserDefinedFunctionReplaceValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeUserDefinedFunctionDeleteValue"] = 16777216] = "ScopeUserDefinedFunctionDeleteValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeTriggerReplaceValue"] = 33554432] = "ScopeTriggerReplaceValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeTriggerDeleteValue"] = 67108864] = "ScopeTriggerDeleteValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerReadAllAccessValue"] = 4294967295] = "ScopeContainerReadAllAccessValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeItemReadAllAccessValue"] = 65] = "ScopeItemReadAllAccessValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeContainerWriteAllAccessValue"] = 4294967295] = "ScopeContainerWriteAllAccessValue"; PermissionScopeValues2[PermissionScopeValues2["ScopeItemWriteAllAccessValue"] = 458767] = "ScopeItemWriteAllAccessValue"; PermissionScopeValues2[PermissionScopeValues2["NoneValue"] = 0] = "NoneValue"; return PermissionScopeValues2; })(PermissionScopeValues || {}); var SasTokenPermissionKind = /* @__PURE__ */ ((SasTokenPermissionKind2) => { SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerCreateItems"] = 1 /* ScopeContainerCreateItemsValue */] = "ContainerCreateItems"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerReplaceItems"] = 2 /* ScopeContainerReplaceItemsValue */] = "ContainerReplaceItems"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerUpsertItems"] = 4 /* ScopeContainerUpsertItemsValue */] = "ContainerUpsertItems"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerDeleteItems"] = 128 /* ScopeContainerDeleteValue */] = "ContainerDeleteItems"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerExecuteQueries"] = 1 /* ScopeContainerExecuteQueriesValue */] = "ContainerExecuteQueries"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerReadFeeds"] = 2 /* ScopeContainerReadFeedsValue */] = "ContainerReadFeeds"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerCreateStoreProcedure"] = 16 /* ScopeContainerCreateStoredProceduresValue */] = "ContainerCreateStoreProcedure"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerReadStoreProcedure"] = 4 /* ScopeContainerReadStoredProceduresValue */] = "ContainerReadStoreProcedure"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerReplaceStoreProcedure"] = 32 /* ScopeContainerReplaceStoredProceduresValue */] = "ContainerReplaceStoreProcedure"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerDeleteStoreProcedure"] = 64 /* ScopeContainerDeleteStoredProceduresValue */] = "ContainerDeleteStoreProcedure"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerCreateTriggers"] = 256 /* ScopeContainerCreateTriggersValue */] = "ContainerCreateTriggers"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerReadTriggers"] = 16 /* ScopeContainerReadTriggersValue */] = "ContainerReadTriggers"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerReplaceTriggers"] = 512 /* ScopeContainerReplaceTriggersValue */] = "ContainerReplaceTriggers"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerDeleteTriggers"] = 1024 /* ScopeContainerDeleteTriggersValue */] = "ContainerDeleteTriggers"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerCreateUserDefinedFunctions"] = 2048 /* ScopeContainerCreateUserDefinedFunctionsValue */] = "ContainerCreateUserDefinedFunctions"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerReadUserDefinedFunctions"] = 8 /* ScopeContainerReadUserDefinedFunctionsValue */] = "ContainerReadUserDefinedFunctions"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerReplaceUserDefinedFunctions"] = 4096 /* ScopeContainerReplaceUserDefinedFunctionsValue */] = "ContainerReplaceUserDefinedFunctions"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerDeleteUserDefinedFunctions"] = 8192 /* ScopeContainerDeleteUserDefinedFunctionSValue */] = "ContainerDeleteUserDefinedFunctions"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerExecuteStoredProcedure"] = 128 /* ScopeContainerExecuteStoredProceduresValue */] = "ContainerExecuteStoredProcedure"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerReadConflicts"] = 32 /* ScopeContainerReadConflictsValue */] = "ContainerReadConflicts"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerDeleteConflicts"] = 16384 /* ScopeContainerDeleteCONFLICTSValue */] = "ContainerDeleteConflicts"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerReadAny"] = 64 /* ScopeContainerReadOfferValue */] = "ContainerReadAny"; SasTokenPermissionKind2[SasTokenPermissionKind2["ContainerFullAccess"] = 4294967295 /* ScopeContainerReadAllAccessValue */] = "ContainerFullAccess"; SasTokenPermissionKind2[SasTokenPermissionKind2["ItemReadAny"] = 65536 /* ScopeItemReplaceValue */] = "ItemReadAny"; SasTokenPermissionKind2[SasTokenPermissionKind2["ItemFullAccess"] = 65 /* ScopeItemReadAllAccessValue */] = "ItemFullAccess"; SasTokenPermissionKind2[SasTokenPermissionKind2["ItemRead"] = 64 /* ScopeItemReadValue */] = "ItemRead"; SasTokenPermissionKind2[SasTokenPermissionKind2["ItemReplace"] = 65536 /* ScopeItemReplaceValue */] = "ItemReplace"; SasTokenPermissionKind2[SasTokenPermissionKind2["ItemUpsert"] = 131072 /* ScopeItemUpsertValue */] = "ItemUpsert"; SasTokenPermissionKind2[SasTokenPermissionKind2["ItemDelete"] = 262144 /* ScopeItemDeleteValue */] = "ItemDelete"; SasTokenPermissionKind2[SasTokenPermissionKind2["StoreProcedureRead"] = 128 /* ScopeStoredProcedureReadValue */] = "StoreProcedureRead"; SasTokenPermissionKind2[SasTokenPermissionKind2["StoreProcedureReplace"] = 1048576 /* ScopeStoredProcedureReplaceValue */] = "StoreProcedureReplace"; SasTokenPermissionKind2[SasTokenPermissionKind2["StoreProcedureDelete"] = 2097152 /* ScopeStoredProcedureDeleteValue */] = "StoreProcedureDelete"; SasTokenPermissionKind2[SasTokenPermissionKind2["StoreProcedureExecute"] = 4194304 /* ScopeStoredProcedureExecuteValue */] = "StoreProcedureExecute"; SasTokenPermissionKind2[SasTokenPermissionKind2["UserDefinedFuntionRead"] = 256 /* ScopeUserDefinedFunctionReadValue */] = "UserDefinedFuntionRead"; SasTokenPermissionKind2[SasTokenPermissionKind2["UserDefinedFuntionReplace"] = 8388608 /* ScopeUserDefinedFunctionReplaceValue */] = "UserDefinedFuntionReplace"; SasTokenPermissionKind2[SasTokenPermissionKind2["UserDefinedFuntionDelete"] = 16777216 /* ScopeUserDefinedFunctionDeleteValue */] = "UserDefinedFuntionDelete"; SasTokenPermissionKind2[SasTokenPermissionKind2["TriggerRead"] = 512 /* ScopeTriggerReadValue */] = "TriggerRead"; SasTokenPermissionKind2[SasTokenPermissionKind2["TriggerReplace"] = 33554432 /* ScopeTriggerReplaceValue */] = "TriggerReplace"; SasTokenPermissionKind2[SasTokenPermissionKind2["TriggerDelete"] = 67108864 /* ScopeTriggerDeleteValue */] = "TriggerDelete"; return SasTokenPermissionKind2; })(SasTokenPermissionKind || {}); var QueryFeature = /* @__PURE__ */ ((QueryFeature2) => { QueryFeature2["NonValueAggregate"] = "NonValueAggregate"; QueryFeature2["Aggregate"] = "Aggregate"; QueryFeature2["Distinct"] = "Distinct"; QueryFeature2["MultipleOrderBy"] = "MultipleOrderBy"; QueryFeature2["OffsetAndLimit"] = "OffsetAndLimit"; QueryFeature2["OrderBy"] = "OrderBy"; QueryFeature2["Top"] = "Top"; QueryFeature2["CompositeAggregate"] = "CompositeAggregate"; QueryFeature2["GroupBy"] = "GroupBy"; QueryFeature2["MultipleAggregates"] = "MultipleAggregates"; QueryFeature2["NonStreamingOrderBy"] = "NonStreamingOrderBy"; QueryFeature2["ListAndSetAggregate"] = "ListAndSetAggregate"; QueryFeature2["CountIf"] = "CountIf"; QueryFeature2["HybridSearch"] = "HybridSearch"; QueryFeature2["WeightedRankFusion"] = "WeightedRankFusion"; QueryFeature2["HybridSearchSkipOrderByRewrite"] = "HybridSearchSkipOrderByRewrite"; return QueryFeature2; })(QueryFeature || {}); var SDKSupportedCapabilities = /* @__PURE__ */ ((SDKSupportedCapabilities2) => { SDKSupportedCapabilities2[SDKSupportedCapabilities2["PartitionMerge"] = 1] = "PartitionMerge"; return SDKSupportedCapabilities2; })(SDKSupportedCapabilities || {}); var PartitionAvailablilityStatus = /* @__PURE__ */ ((PartitionAvailablilityStatus2) => { PartitionAvailablilityStatus2[PartitionAvailablilityStatus2["Available"] = 0] = "Available"; PartitionAvailablilityStatus2[PartitionAvailablilityStatus2["Unavailable"] = 1] = "Unavailable"; return PartitionAvailablilityStatus2; })(PartitionAvailablilityStatus || {}); var UserAgentFeatureFlags = /* @__PURE__ */ ((UserAgentFeatureFlags2) => { UserAgentFeatureFlags2[UserAgentFeatureFlags2["PerPartitionAutomaticFailover"] = 1] = "PerPartitionAutomaticFailover"; UserAgentFeatureFlags2[UserAgentFeatureFlags2["PerPartitionCircuitBreaker"] = 2] = "PerPartitionCircuitBreaker"; return UserAgentFeatureFlags2; })(UserAgentFeatureFlags || {}); // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { AAD_AUTH_PREFIX, AAD_DEFAULT_SCOPE, AAD_RESOURCE_NOT_FOUND_ERROR, Constants, CosmosContainerChildResourceKind, CosmosKeyType, HTTPMethod, OperationType, PartitionAvailablilityStatus, PermissionScopeValues, QueryExecution, QueryFeature, ResourceType, SDKSupportedCapabilities, SasTokenPermissionKind, UserAgentFeatureFlags });