Options
All
  • Public
  • Public/Protected
  • All
Menu

@azure/cosmos

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

JSONValue

JSONValue: boolean | number | string | null | JSONArray | JSONObject

Next

Next: function

Next is a function which takes in requestContext returns a promise. You must await/then that promise which will contain the response from further plugins, allowing you to log those results or handle errors.

Type declaration

PartitionKey

PartitionKey: PartitionKeyDefinition | Point | Range | __type

Plugin

Plugin: function

Plugins allow you to customize the behavior of the SDk with additional logging, retry, or additional functionality.

A plugin is a function which returns a Promise<Response>, and is passed a RequestContext and Next object.

Next is a function which takes in requestContext returns a promise. You must await/then that promise which will contain the response from further plugins, allowing you to log those results or handle errors.

RequestContext is an object which controls what operation is happening, against which endpoint, and more. Modifying this and passing it along via next is how you modify future SDK behavior.

Type declaration

TokenProvider

TokenProvider: function

Type declaration

    • (requestInfo: RequestInfo): Promise<string>
    • Parameters

      • requestInfo: RequestInfo

      Returns Promise<string>

Variables

Const CONNECTION_ERROR_CODES

CONNECTION_ERROR_CODES: (string | number)[] = [WindowsInterruptedFunctionCall,WindowsFileHandleNotValid,WindowsPermissionDenied,WindowsBadAddress,WindowsInvalidArgumnet,WindowsResourceTemporarilyUnavailable,WindowsOperationNowInProgress,WindowsAddressAlreadyInUse,WindowsConnectionResetByPeer,WindowsCannotSendAfterSocketShutdown,WindowsConnectionTimedOut,WindowsConnectionRefused,WindowsNameTooLong,WindowsHostIsDown,WindowsNoRouteTohost,LinuxConnectionReset,TimeoutErrorCode]

Const LinuxConnectionReset

LinuxConnectionReset: "ECONNRESET" = "ECONNRESET"

Const TimeoutErrorCode

TimeoutErrorCode: "TimeoutError" = "TimeoutError"

Const WindowsAddressAlreadyInUse

WindowsAddressAlreadyInUse: 10048 = 10048

Const WindowsBadAddress

WindowsBadAddress: 10014 = 10014

Const WindowsCannotSendAfterSocketShutdown

WindowsCannotSendAfterSocketShutdown: 10058 = 10058

Const WindowsConnectionRefused

WindowsConnectionRefused: 10061 = 10061

Const WindowsConnectionResetByPeer

WindowsConnectionResetByPeer: 10054 = 10054

Const WindowsConnectionTimedOut

WindowsConnectionTimedOut: 10060 = 10060

Const WindowsFileHandleNotValid

WindowsFileHandleNotValid: 10009 = 10009

Const WindowsHostIsDown

WindowsHostIsDown: 10064 = 10064

Const WindowsInterruptedFunctionCall

WindowsInterruptedFunctionCall: 10004 = 10004

Const WindowsInvalidArgumnet

WindowsInvalidArgumnet: 10022 = 10022

Const WindowsNameTooLong

WindowsNameTooLong: 10063 = 10063

Const WindowsNoRouteTohost

WindowsNoRouteTohost: 10065 = 10065

Const WindowsOperationNowInProgress

WindowsOperationNowInProgress: 10036 = 10036

Const WindowsPermissionDenied

WindowsPermissionDenied: 10013 = 10013

Const WindowsResourceTemporarilyUnavailable

WindowsResourceTemporarilyUnavailable: 10035 = 10035

Const defaultConnectionPolicy

defaultConnectionPolicy: object = Object.freeze({connectionMode: ConnectionMode.Gateway,requestTimeout: 60000,enableEndpointDiscovery: true,preferredLocations: [],retryOptions: defaultRetryOptions,disableSSLVerification: false,useMultipleWriteLocations: true})

Type declaration

Let defaultHttpAgent

defaultHttpAgent: Agent

Let defaultHttpsAgent

defaultHttpsAgent: Agent

Const defaultRetryOptions

defaultRetryOptions: object = Object.freeze({maxRetryAttemptCount: 9,fixedRetryIntervalInMilliseconds: 0,maxWaitTimeInSeconds: 30})

Type declaration

Const isNode

isNode: boolean = Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]"

Functions

compareRanges

  • compareRanges(a: any, b: any): 1 | -1 | 0

createAttachmentUri

  • createAttachmentUri(databaseId: string, collectionId: string, documentId: string, attachmentId: string): string
  • summary

    Given a database, collection and conflict id, this creates a conflict link.

    description

    Would be used when creating a Conflict in Azure Cosmos DB database service.

    Parameters

    • databaseId: string

      -The database Id

    • collectionId: string

      -The collection Id

    • documentId: string

      -The document Id\

    • attachmentId: string

      -The attachment Id

    Returns string

    -A conflict link in the format of dbs/{0}/colls/{1}/conflicts/{2} \ with {0} being a Uri escaped version of the databaseId, {1} being collectionId and {2} being the conflictId

createConflictUri

  • createConflictUri(databaseId: string, collectionId: string, conflictId: string): string
  • summary

    Given a database, collection and conflict id, this creates a conflict link.

    description

    Would be used when creating a Conflict in Azure Cosmos DB database service.

    Parameters

    • databaseId: string

      -The database Id

    • collectionId: string

      -The collection Id

    • conflictId: string

      -The conflict Id

    Returns string

    -A conflict link in the format of dbs/{0}/colls/{1}/conflicts/{2} \ with {0} being a Uri escaped version of the databaseId, {1} being collectionId and {2} being the conflictId

createDatabaseUri

  • createDatabaseUri(databaseId: string): string
  • Given a database id, this creates a database link.

    description

    Would be used when creating or deleting a DocumentCollection \ or a User in Azure Cosmos DB database service

    Parameters

    • databaseId: string

      -The database id

    Returns string

    -A database link in the format of dbs/{0} \ with {0} being a Uri escaped version of the databaseId

createDocumentCollectionUri

  • createDocumentCollectionUri(databaseId: string, collectionId: string): string
  • Given a database and collection id, this creates a collection link.

    description

    Would be used when updating or deleting a DocumentCollection, creating a \ Document, a StoredProcedure, a Trigger, a UserDefinedFunction, or when executing a query \ with CreateDocumentQuery in Azure Cosmos DB database service.

    Parameters

    • databaseId: string

      -The database id

    • collectionId: string

      -The collection id

    Returns string

    A collection link in the format of dbs/{0}/colls/{1} \ with {0} being a Uri escaped version of the databaseId and {1} being collectionId

createDocumentUri

  • createDocumentUri(databaseId: string, collectionId: string, documentId: string): string
  • Given a database and collection id, this creates a collection link.

    description

    Would be used when creating an Attachment, or when replacing \ or deleting a Document in Azure Cosmos DB database service

    Parameters

    • databaseId: string

      -The database id

    • collectionId: string

      -The collection id

    • documentId: string

      -The document id

    Returns string

    -A document link in the format of \ dbs/{0}/colls/{1}/docs/{2} with {0} being a Uri escaped version of \ the databaseId, {1} being collectionId and {2} being the documentId

createPartitionKeyRangesUri

  • createPartitionKeyRangesUri(databaseId: string, collectionId: string): string
  • summary

    Given a database and collection, this creates a partition key ranges link in\ the Azure Cosmos DB database service.

    Parameters

    • databaseId: string

      -The database Id

    • collectionId: string

      -The collection Id

    Returns string

    -A partition key ranges link in the format of \ dbs/{0}/colls/{1}/pkranges with {0} being a Uri escaped version of the databaseId and {1} being collectionId

createPermissionUri

  • createPermissionUri(databaseId: string, userId: string, permissionId: string): string
  • Given a database, collection and document id, this creates a document link.

    description

    Would be used when replacing or deleting a Permission in Azure Cosmos DB database service.

    Parameters

    • databaseId: string

      -The database Id

    • userId: string

      -The user Id

    • permissionId: string

      The permissionId

    Returns string

    A permission link in the format of dbs/{0}/users/{1}/permissions/{2} \ with {0} being a Uri escaped version of the databaseId, {1} being userId and {2} being permissionId

createStoredProcedureUri

  • createStoredProcedureUri(databaseId: string, collectionId: string, storedProcedureId: string): string
  • Given a database, collection and stored proc id, this creates a stored proc link.

    description

    Would be used when replacing, executing, or deleting a StoredProcedure in \ Azure Cosmos DB database service.

    Parameters

    • databaseId: string

      -The database Id

    • collectionId: string

      -The collection Id

    • storedProcedureId: string

      -The stored procedure Id

    Returns string

    -A stored procedure link in the format of \ dbs/{0}/colls/{1}/sprocs/{2} with {0} being a Uri escaped version of the databaseId, \ {1} being collectionId and {2} being the storedProcedureId

createTriggerUri

  • createTriggerUri(databaseId: string, collectionId: string, triggerId: string): string
  • summary

    Given a database, collection and trigger id, this creates a trigger link.

    description

    Would be used when replacing, executing, or deleting a Trigger in Azure Cosmos DB database service

    Parameters

    • databaseId: string

      -The database Id

    • collectionId: string

      -The collection Id

    • triggerId: string

      -The trigger Id

    Returns string

    -A trigger link in the format of \ dbs/{0}/colls/{1}/triggers/{2} with {0} being a Uri escaped version of the databaseId, \ {1} being collectionId and {2} being the triggerId

createUserDefinedFunctionUri

  • createUserDefinedFunctionUri(databaseId: string, collectionId: string, udfId: string): string
  • summary

    Given a database, collection and udf id, this creates a udf link.

    description

    Would be used when replacing, executing, or deleting a UserDefinedFunction in \ Azure Cosmos DB database service

    Parameters

    • databaseId: string

      -The database Id

    • collectionId: string

      -The collection Id

    • udfId: string

      -The User Defined Function Id

    Returns string

    -A udf link in the format of dbs/{0}/colls/{1}/udfs/{2} \ with {0} being a Uri escaped version of the databaseId, {1} being collectionId and {2} being the udfId

createUserUri

  • createUserUri(databaseId: string, userId: string): string
  • Given a database and user id, this creates a user link.

    description

    Would be used when creating a Permission, or when replacing or deleting \ a User in Azure Cosmos DB database service

    Parameters

    • databaseId: string

      -The database id

    • userId: string

      -The user id

    Returns string

    A user link in the format of dbs/{0}/users/{1} \ with {0} being a Uri escaped version of the databaseId and {1} being userId

execute

  • execute(__namedParameters: object): Promise<Response<any>>

extractPartitionKey

getAuthorizationTokenUsingResourceTokens

  • getAuthorizationTokenUsingResourceTokens(resourceTokens: object, path: string, resourceId: string): string
  • Parameters

    • resourceTokens: object
      • [resourceId: string]: string
    • path: string
    • resourceId: string

    Returns string

getContainerLink

  • getContainerLink(link: string): string

getHeaders

getHexaDigit

  • getHexaDigit(): string

getInitialHeader

getResourceIdFromPath

  • getResourceIdFromPath(resourcePath: string): string

getUserAgent

  • getUserAgent(): string

httpRequest

isChangeFeedOptions

  • isChangeFeedOptions(options: unknown): boolean

isCompleteSetOfRange

  • isCompleteSetOfRange(partitionKeyOrderedRange: any): boolean

isNumeric

  • isNumeric(input: any): boolean

isReadRequest

isResourceValid

  • isResourceValid(resource: any, err: any): boolean

isStringNullOrEmpty

  • isStringNullOrEmpty(inputString: string): boolean

max

  • max(int1: string, int2: string): string

mergeHeaders

needsRetry

  • needsRetry(operationType: OperationType, code: number | string): boolean

parseConnectionString

parseDelimitedString

  • parseDelimitedString(delimitedString: string): object

parseLink

  • parseLink(resourcePath: string): object

parsePath

  • parsePath(path: string): string[]

request

  • request<T>(requestContext: RequestContext): Promise<CosmosResponse<T>>

setAuthorizationHeader

setAuthorizationTokenHeaderUsingMasterKey

sleep

  • sleep(time: number): Promise<void>

timeSpanFromMetrics

  • timeSpanFromMetrics(metrics: object, key: string): TimeSpan

trimSlashFromLeftAndRight

  • trimSlashFromLeftAndRight(inputString: string): string

trimSlashes

  • trimSlashes(source: string): string

undefinedPartitionKey

validateResourceId

  • validateResourceId(resourceId: string): boolean

Object literals

Const Constants

Constants: object

CurrentVersion

CurrentVersion: string = "2018-12-31"

DatabaseAccountEndpoint

DatabaseAccountEndpoint: string = "databaseAccountEndpoint"

DefaultUnavailableLocationExpirationTimeMS

DefaultUnavailableLocationExpirationTimeMS: number = 5 * 60 * 1000

ENABLE_MULTIPLE_WRITABLE_LOCATIONS

ENABLE_MULTIPLE_WRITABLE_LOCATIONS: string = "enableMultipleWriteLocations"

Name

Name: string = "name"

ReadableLocations

ReadableLocations: string = "readableLocations"

SDKName

SDKName: string = "azure-cosmos-js"

SDKVersion

SDKVersion: string = "REPLACE_SDK_VERSION"

ThrottleRetryCount

ThrottleRetryCount: string = "x-ms-throttle-retry-count"

ThrottleRetryWaitTimeInMs

ThrottleRetryWaitTimeInMs: string = "x-ms-throttle-retry-wait-time-ms"

WritableLocations

WritableLocations: string = "writableLocations"

ConsistentHashRing

ConsistentHashRing: object

DefaultVirtualNodesPerCollection

DefaultVirtualNodesPerCollection: number = 128

DefaultPrecisions

DefaultPrecisions: object

DefaultNumberHashPrecision

DefaultNumberHashPrecision: number = 3

DefaultNumberRangePrecision

DefaultNumberRangePrecision: number = -1

DefaultStringHashPrecision

DefaultStringHashPrecision: number = 3

DefaultStringRangePrecision

DefaultStringRangePrecision: number = -1

EffectiveParitionKeyConstants

EffectiveParitionKeyConstants: object

MaximumExclusiveEffectivePartitionKey

MaximumExclusiveEffectivePartitionKey: string = "FF"

MinimumInclusiveEffectivePartitionKey

MinimumInclusiveEffectivePartitionKey: string = ""

HttpHeaders

HttpHeaders: object

ALLOW_MULTIPLE_WRITES

ALLOW_MULTIPLE_WRITES: string = "x-ms-cosmos-allow-tentative-writes"

A_IM

A_IM: string = "A-IM"

Accept

Accept: string = "Accept"

AcceptCharset

AcceptCharset: string = "Accept-Charset"

AcceptEncoding

AcceptEncoding: string = "Accept-Encoding"

AcceptLanguage

AcceptLanguage: string = "Accept-Language"

AcceptRanges

AcceptRanges: string = "Accept-Ranges"

AccessControlAllowHeaders

AccessControlAllowHeaders: string = "Access-Control-Allow-Headers"

AccessControlAllowOrigin

AccessControlAllowOrigin: string = "Access-Control-Allow-Origin"

ActivityId

ActivityId: string = "x-ms-activity-id"

Authorization

Authorization: string = "authorization"

CacheControl

CacheControl: string = "Cache-Control"

CharacterSet

CharacterSet: string = "CharacterSet"

CollectionCurrentUsageInMb

CollectionCurrentUsageInMb: string = "x-ms-collection-usage-mb"

CollectionPartitionInfo

CollectionPartitionInfo: string = "x-ms-collection-partition-info"

CollectionQuotaInMb

CollectionQuotaInMb: string = "x-ms-collection-quota-mb"

CollectionServiceInfo

CollectionServiceInfo: string = "x-ms-collection-service-info"

ConsistencyLevel

ConsistencyLevel: string = "x-ms-consistency-level"

ContentEncoding

ContentEncoding: string = "Content-Encoding"

ContentLanguage

ContentLanguage: string = "Content-Language"

ContentLength

ContentLength: string = "Content-Length"

ContentLocation

ContentLocation: string = "Content-Location"

ContentMd5

ContentMd5: string = "Content-Md5"

ContentRange

ContentRange: string = "Content-Range"

ContentType

ContentType: string = "Content-Type"

Continuation

Continuation: string = "x-ms-continuation"

CurrentEntityCount

CurrentEntityCount: string = "x-ms-root-entity-current-count"

CurrentMediaStorageUsageInMB

CurrentMediaStorageUsageInMB: string = "x-ms-media-storage-usage-mb"

DisableRUPerMinuteUsage

DisableRUPerMinuteUsage: string = "x-ms-documentdb-disable-ru-per-minute-usage"

ETag

ETag: string = "etag"

EmitVerboseTracesInQuery

EmitVerboseTracesInQuery: string = "x-ms-documentdb-query-emit-traces"

EnableCrossPartitionQuery

EnableCrossPartitionQuery: string = "x-ms-documentdb-query-enablecrosspartition"

EnableScanInQuery

EnableScanInQuery: string = "x-ms-documentdb-query-enable-scan"

EnableScriptLogging

EnableScriptLogging: string = "x-ms-documentdb-script-enable-logging"

Host

Host: string = "Host"

HttpDate

HttpDate: string = "date"

IfMatch

IfMatch: string = "If-Match"

IfModifiedSince

IfModifiedSince: string = "If-Modified-Since"

IfNoneMatch

IfNoneMatch: string = "If-None-Match"

IfRange

IfRange: string = "If-Range"

IfUnmodifiedSince

IfUnmodifiedSince: string = "If-Unmodified-Since"

IndexTransformationProgress

IndexTransformationProgress: string = "x-ms-documentdb-collection-index-transformation-progress"

IndexingDirective

IndexingDirective: string = "x-ms-indexing-directive"

IsFeedUnfiltered

IsFeedUnfiltered: string = "x-ms-is-feed-unfiltered"

IsQuery

IsQuery: string = "x-ms-documentdb-isquery"

IsQueryPlan

IsQueryPlan: string = "x-ms-cosmos-is-query-plan-request"

IsRUPerMinuteUsed

IsRUPerMinuteUsed: string = "x-ms-documentdb-is-ru-per-minute-used"

IsUpsert

IsUpsert: string = "x-ms-documentdb-is-upsert"

ItemCount

ItemCount: string = "x-ms-item-count"

KeepAlive

KeepAlive: string = "Keep-Alive"

KeyValueEncodingFormat

KeyValueEncodingFormat: string = "application/x-www-form-urlencoded"

LastModified

LastModified: string = "Last-Modified"

LazyIndexingProgress

LazyIndexingProgress: string = "x-ms-documentdb-collection-lazy-indexing-progress"

Location

Location: string = "Location"

MaxEntityCount

MaxEntityCount: string = "x-ms-root-entity-max-count"

MaxForwards

MaxForwards: string = "Max-Forwards"

MaxMediaStorageUsageInMB

MaxMediaStorageUsageInMB: string = "x-ms-max-media-storage-usage-mb"

MaxResourceQuota

MaxResourceQuota: string = "x-ms-resource-quota"

MethodOverride

MethodOverride: string = "X-HTTP-Method"

OfferIsRUPerMinuteThroughputEnabled

OfferIsRUPerMinuteThroughputEnabled: string = "x-ms-offer-is-ru-per-minute-throughput-enabled"

OfferThroughput

OfferThroughput: string = "x-ms-offer-throughput"

OfferType

OfferType: string = "x-ms-offer-type"

Origin

Origin: string = "Origin"

OwnerFullName

OwnerFullName: string = "x-ms-alt-content-path"

OwnerId

OwnerId: string = "x-ms-content-path"

PageSize

PageSize: string = "x-ms-max-item-count"

ParallelizeCrossPartitionQuery

ParallelizeCrossPartitionQuery: string = "x-ms-documentdb-query-parallelizecrosspartitionquery"

PartitionKey

PartitionKey: string = "x-ms-documentdb-partitionkey"

PartitionKeyRangeID

PartitionKeyRangeID: string = "x-ms-documentdb-partitionkeyrangeid"

PopulateQueryMetrics

PopulateQueryMetrics: string = "x-ms-documentdb-populatequerymetrics"

PopulateQuotaInfo

PopulateQuotaInfo: string = "x-ms-documentdb-populatequotainfo"

PostTriggerExclude

PostTriggerExclude: string = "x-ms-documentdb-post-trigger-exclude"

PostTriggerInclude

PostTriggerInclude: string = "x-ms-documentdb-post-trigger-include"

PreTriggerExclude

PreTriggerExclude: string = "x-ms-documentdb-pre-trigger-exclude"

PreTriggerInclude

PreTriggerInclude: string = "x-ms-documentdb-pre-trigger-include"

Prefer

Prefer: string = "Prefer"

ProxyAuthenticate

ProxyAuthenticate: string = "Proxy-Authenticate"

ProxyAuthorization

ProxyAuthorization: string = "Proxy-Authorization"

Query

Query: string = "x-ms-documentdb-query"

QueryMetrics

QueryMetrics: string = "x-ms-documentdb-query-metrics"

QueryVersion

QueryVersion: string = "x-ms-cosmos-query-version"

Referer

Referer: string = "referer"

RequestCharge

RequestCharge: string = "x-ms-request-charge"

ResourceTokenExpiry

ResourceTokenExpiry: string = "x-ms-documentdb-expiry-seconds"

RetryAfter

RetryAfter: string = "Retry-After"

RetryAfterInMilliseconds

RetryAfterInMilliseconds: string = "x-ms-retry-after-ms"

ScriptLogResults

ScriptLogResults: string = "x-ms-documentdb-script-log-results"

SessionToken

SessionToken: string = "x-ms-session-token"

SetCookie

SetCookie: string = "Set-Cookie"

SimpleToken

SimpleToken: string = "SWT"

Slug

Slug: string = "Slug"

SubStatus

SubStatus: string = "x-ms-substatus"

SupportedQueryFeatures

SupportedQueryFeatures: string = "x-ms-cosmos-supported-query-features"

TransferEncoding

TransferEncoding: string = "Transfer-Encoding"

UserAgent

UserAgent: string = "User-Agent"

Version

Version: string = "x-ms-version"

WrapAssertion

WrapAssertion: string = "wrap_assertion"

WrapAssertionFormat

WrapAssertionFormat: string = "wrap_assertion_format"

WrapScope

WrapScope: string = "wrap_scope"

WwwAuthenticate

WwwAuthenticate: string = "Www-Authenticate"

XDate

XDate: string = "x-ms-date"

MediaTypes

MediaTypes: object

Any

Any: string = "*/*"

ImageJpeg

ImageJpeg: string = "image/jpeg"

ImagePng

ImagePng: string = "image/png"

Javascript

Javascript: string = "application/x-javascript"

Json

Json: string = "application/json"

OctetStream

OctetStream: string = "application/octet-stream"

QueryJson

QueryJson: string = "application/query+json"

SQL

SQL: string = "application/sql"

TextHtml

TextHtml: string = "text/html"

TextPlain

TextPlain: string = "text/plain"

Xml

Xml: string = "application/xml"

PartitionKeyRange

PartitionKeyRange: object

Id

Id: string = "id"

MaxExclusive

MaxExclusive: string = "maxExclusive"

MinInclusive

MinInclusive: string = "minInclusive"

Path

Path: object

AttachmentsPathSegment

AttachmentsPathSegment: string = "attachments"

CollectionsPathSegment

CollectionsPathSegment: string = "colls"

ConflictsPathSegment

ConflictsPathSegment: string = "conflicts"

DatabaseAccountPathSegment

DatabaseAccountPathSegment: string = "databaseaccount"

DatabasesPathSegment

DatabasesPathSegment: string = "dbs"

DocumentsPathSegment

DocumentsPathSegment: string = "docs"

OffersPathSegment

OffersPathSegment: string = "offers"

PartitionKeyRangesPathSegment

PartitionKeyRangesPathSegment: string = "pkranges"

PermissionsPathSegment

PermissionsPathSegment: string = "permissions"

SchemasPathSegment

SchemasPathSegment: string = "schemas"

StoredProceduresPathSegment

StoredProceduresPathSegment: string = "sprocs"

TopologyPathSegment

TopologyPathSegment: string = "topology"

TriggersPathSegment

TriggersPathSegment: string = "triggers"

UserDefinedFunctionsPathSegment

UserDefinedFunctionsPathSegment: string = "udfs"

UsersPathSegment

UsersPathSegment: string = "users"

QueryRangeConstants

QueryRangeConstants: object

MaxExclusive

MaxExclusive: string = "maxExclusive"

MinInclusive

MinInclusive: string = "minInclusive"

min

min: string = "min"

Quota

Quota: object

CollectionSize

CollectionSize: string = "collectionSize"

RegularExpressions

RegularExpressions: object

IllegalResourceIdCharacters

IllegalResourceIdCharacters: RegExp = new RegExp("[/\\\\?#]")

TrimLeftSlashes

TrimLeftSlashes: RegExp = new RegExp("^[/]+")

TrimRightSlashes

TrimRightSlashes: RegExp = new RegExp("[/]+$")

Const StatusCode

StatusCode: number

Accepted

Accepted: 202 = 202 as 202

BadRequest

BadRequest: 400 = 400 as 400

Conflict

Conflict: 409 = 409 as 409

Created

Created: 201 = 201 as 201

Forbidden

Forbidden: 403 = 403 as 403

Gone

Gone: 410 = 410 as 410

InternalServerError

InternalServerError: 500 = 500 as 500

MethodNotAllowed

MethodNotAllowed: 405 = 405 as 405

NoContent

NoContent: 204 = 204 as 204

NotFound

NotFound: 404 = 404 as 404

NotModified

NotModified: 304 = 304 as 304

Ok

Ok: 200 = 200 as 200

OperationCancelled

OperationCancelled: number = 1201

OperationPaused

OperationPaused: 1200 = 1200 as 1200

PreconditionFailed

PreconditionFailed: 412 = 412 as 412

RequestEntityTooLarge

RequestEntityTooLarge: 413 = 413 as 413

RequestTimeout

RequestTimeout: 408 = 408 as 408

RetryWith

RetryWith: 449 = 449 as 449

ServiceUnavailable

ServiceUnavailable: 503 = 503 as 503

TooManyRequests

TooManyRequests: 429 = 429 as 429

Unauthorized

Unauthorized: 401 = 401 as 401

Const StatusCodes

StatusCodes: object

Accepted

Accepted: number = 202

BadRequest

BadRequest: number = 400

Conflict

Conflict: number = 409

Created

Created: number = 201

Forbidden

Forbidden: number = 403

Gone

Gone: number = 410

InternalServerError

InternalServerError: number = 500

MethodNotAllowed

MethodNotAllowed: number = 405

NoContent

NoContent: number = 204

NotFound

NotFound: number = 404

NotModified

NotModified: number = 304

Ok

Ok: number = 200

OperationCancelled

OperationCancelled: number = 1201

OperationPaused

OperationPaused: number = 1200

PreconditionFailed

PreconditionFailed: number = 412

RequestEntityTooLarge

RequestEntityTooLarge: number = 413

RequestTimeout

RequestTimeout: number = 408

RetryWith

RetryWith: number = 449

ServiceUnavailable

ServiceUnavailable: number = 503

TooManyRequests

TooManyRequests: number = 429

Unauthorized

Unauthorized: number = 401

Const SubStatusCode

SubStatusCode: number

CrossPartitionQueryNotServable

CrossPartitionQueryNotServable: 1004 = 1004 as 1004

PartitionKeyRangeGone

PartitionKeyRangeGone: 1002 = 1002 as 1002

ReadSessionNotAvailable

ReadSessionNotAvailable: 1002 = 1002 as 1002

Unknown

Unknown: 0 = 0 as 0

WriteForbidden

WriteForbidden: number = 3

Const SubStatusCodes

SubStatusCodes: object

CrossPartitionQueryNotServable

CrossPartitionQueryNotServable: number = 1004

PartitionKeyRangeGone

PartitionKeyRangeGone: number = 1002

ReadSessionNotAvailable

ReadSessionNotAvailable: number = 1002

Unknown

Unknown: number = 0

WriteForbidden

WriteForbidden: number = 3

Generated using TypeDoc