Options
All
  • Public
  • Public/Protected
  • All
Menu

@azure/cosmos

Package version

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

AggregateType

AggregateType: "Average" | "Count" | "Max" | "Min" | "Sum"

CreateOperation

CreateOperation: OperationWithItem & { operationType: typeof Create }

DeleteOperation

DeleteOperation: OperationBase & { id: string; operationType: typeof Delete }

GroupByExpressions

GroupByExpressions: string[]

JSONValue

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

Operation

OperationInput

OperationWithItem

OperationWithItem: OperationBase & { resourceBody: JSONObject }

PartitionKey

PartitionKey: PartitionKeyDefinition | string | number | {}

ReadOperation

ReadOperation: OperationBase & { id: string; operationType: typeof Read }

ReplaceOperation

ReplaceOperation: OperationWithItem & { id: string; operationType: typeof Replace }

SubStatusCode

SubStatusCode: typeof SubStatusCode[keyof typeof SubStatusCode]

TokenProvider

TokenProvider: (requestInfo: RequestInfo) => Promise<string>

Type declaration

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

      • requestInfo: RequestInfo

      Returns Promise<string>

UpsertOperation

UpsertOperation: OperationWithItem & { operationType: typeof Upsert }

VerboseOmit

VerboseOmit<T, K>: Pick<T, Exclude<keyof T, K>>

Type parameters

  • T

  • K: keyof any

v1Key

v1Key: string | number | null | {} | undefined

v2Key

v2Key: string | number | null | {} | undefined

Variables

Const BulkOperationType

BulkOperationType: { Create: "Create"; Delete: "Delete"; Read: "Read"; Replace: "Replace"; Upsert: "Upsert" } = {Create: "Create",Upsert: "Upsert",Read: "Read",Delete: "Delete",Replace: "Replace"} as const

Type declaration

  • Create: "Create"
  • Delete: "Delete"
  • Read: "Read"
  • Replace: "Replace"
  • Upsert: "Upsert"

Const DEFAULT_PARTITION_KEY_PATH

DEFAULT_PARTITION_KEY_PATH: "/_partitionKey" = "/_partitionKey" as "/_partitionKey"

Const JsonContentType

JsonContentType: "application/json" = "application/json"

Const MAX_STRING_CHARS

MAX_STRING_CHARS: 100 = 100

Const QueryJsonContentType

QueryJsonContentType: "application/query+json" = "application/query+json"

Const emptyGroup

emptyGroup: "__empty__" = "__empty__"

Const globalCrypto

globalCrypto: Crypto = globalRef.crypto || globalRef.msCrypto

Const globalRef

globalRef: any = typeof self === "undefined" ? window : self

Const illegalResourceIdCharacters

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

Const trimLeftSlashes

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

Const trimRightSlashes

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

Functions

_x64Add

  • _x64Add(m: number[], n: number[]): number[]

_x64Fmix

  • _x64Fmix(h: number[]): number[]

_x64LeftShift

  • _x64LeftShift(m: number[], n: number): number[]

_x64Multiply

  • _x64Multiply(m: number[], n: number[]): number[]

_x64Rotl

  • _x64Rotl(m: number[], n: number): number[]

_x64Xor

  • _x64Xor(m: number[], n: number[]): number[]

_x86Fmix

  • _x86Fmix(h: number): number

_x86Multiply

  • _x86Multiply(m: number, n: number): number

_x86Rotl

  • _x86Rotl(m: number, n: number): number

atob

  • atob(str: string): any

buf2hex

  • buf2hex(buffer: ArrayBuffer): any

bufferToHex

  • bufferToHex(buffer: ArrayBuffer): any

checkURL

  • checkURL(testString: string): URL

createAggregator

  • createAggregator(aggregateType: AggregateType): AverageAggregator | CountAggregator | MaxAggregator | MinAggregator | SumAggregator | StaticValueAggregator

decorateOperation

digest

  • digest(str: string): Promise<any>

doubleToByteArrayJSBI

  • doubleToByteArrayJSBI(double: number): any

encodeBase64

  • encodeBase64(value: ArrayBuffer): string

encodeByType

  • encodeByType(key: v1Key): any

encodeNumberAsUInt64JSBI

  • encodeNumberAsUInt64JSBI(value: number): any

encodeUTF8

  • encodeUTF8(str: string): Uint8Array

executeRequest

  • executeRequest(requestContext: RequestContext): Promise<Response<any>>

Const extractAggregateResult

  • extractAggregateResult(payload: any): any

generateHeaders

  • generateHeaders(masterKey: string, method: HTTPMethod, resourceType?: ResourceType, resourceId?: string, date?: Date): Promise<{ __computed: string }>

getPartitionKeyToHash

  • getPartitionKeyToHash(operation: Operation, partitionProperty: string): any

getRawBitsJSBI

  • getRawBitsJSBI(value: number): any

hasResource

  • hasResource(operation: Operation): operation is CreateOperation | UpsertOperation | ReplaceOperation

hashObject

  • hashObject(object: any): Promise<any>

hashV1PartitionKey

  • hashV1PartitionKey(partitionKey: v1Key): string

hashV2PartitionKey

  • hashV2PartitionKey(partitionKey: v2Key): string

hmac

  • hmac(key: string, message: string): Promise<any>

isKeyInRange

  • isKeyInRange(min: string, max: string, key: string): boolean

normalizeEndpoint

  • normalizeEndpoint(endpoint: string): string

prefixKeyByType

  • prefixKeyByType(key: v1Key): any

reverse

  • reverse(buff: Buffer): any

signature

  • signature(masterKey: string, method: HTTPMethod, resourceType: ResourceType, resourceId?: string, date?: Date): Promise<string>

userAgent

  • userAgent(): string

validateOffer

writeNumberForBinaryEncodingJSBI

  • writeNumberForBinaryEncodingJSBI(hash: number): any

writeStringForBinaryEncoding

  • writeStringForBinaryEncoding(payload: string): any

x64Hash128

  • x64Hash128(bytes: Buffer, seed?: number): any

x86Hash128

  • x86Hash128(bytes: Buffer, seed?: number): string

x86Hash32

  • x86Hash32(bytes: Buffer, seed?: number): number

Object literals

Const BytePrefix

BytePrefix: object

Binary

Binary: string = "12"

False

False: string = "02"

Float

Float: string = "14"

Guid

Guid: string = "13"

Infinity

Infinity: string = "FF"

Int16

Int16: string = "0c"

Int32

Int32: string = "0b"

Int64

Int64: string = "0a"

Int8

Int8: string = "0d"

MaxNumber

MaxNumber: string = "06"

MaxString

MaxString: string = "09"

MinNumber

MinNumber: string = "04"

MinString

MinString: string = "07"

Null

Null: string = "01"

Number

Number: string = "05"

String

String: string = "08"

True

True: string = "03"

Uint16

Uint16: string = "10"

Uint32

Uint32: string = "0f"

Uint64

Uint64: string = "0e"

Uint8

Uint8: string = "11"

Undefined

Undefined: string = "00"

Generated using TypeDoc