Options
All
  • Public
  • Public/Protected
  • All
Menu

Cognite JavaScript SDK

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

ADFSRequestParamsMapping

ADFSRequestParamsMapping: {}

Type declaration

Acl3D

AclAction3D

AclAction3D: READ | CREATE | UPDATE | DELETE

AclActionAnalytics

AclActionAnalytics: READ | EXECUTE | LIST

AclActionApiKeys

AclActionApiKeys: LIST | CREATE | DELETE

AclActionAssets

AclActionAssets: READ | WRITE

AclActionDataSets

AclActionDataSets: READ | WRITE | OWNER

AclActionEvents

AclActionEvents: READ | WRITE

AclActionFiles

AclActionFiles: READ | WRITE

AclActionGroups

AclActionGroups: LIST | READ | CREATE | UPDATE | DELETE

AclActionProjects

AclActionProjects: LIST | READ | CREATE | UPDATE

AclActionRaw

AclActionRaw: READ | WRITE | LIST

AclActionSecurityCategories

AclActionSecurityCategories: MEMBEROF | LIST | CREATE | DELETE

AclActionSequences

AclActionSequences: READ | WRITE

AclActionTemplateGroups

AclActionTemplateGroups: READ | WRITE

AclActionTemplateInstances

AclActionTemplateInstances: READ | WRITE

AclActionTimeseries

AclActionTimeseries: READ | WRITE

AclActionUsers

AclActionUsers: LIST | CREATE | DELETE

AclAnalytics

AclApiKeys

AclAssets

AclDataSets

AclEvents

AclFiles

AclGroups

AclProjects

AclRaw

AclScope3D

AclScope3D: AclScopeAll

AclScopeAnalytics

AclScopeAnalytics: AclScopeAll

AclScopeApiKeys

AclScopeApiKeys: AclScopeAll | AclScopeCurrentUser

AclScopeAssets

AclScopeDatasets

AclScopeDatasets: AclScopeAll | AclScopeIds

AclScopeEvents

AclScopeFiles

AclScopeGroups

AclScopeProjects

AclScopeProjects: AclScopeAll

AclScopeRaw

AclScopeRaw: AclScopeAll

AclScopeSecurityCategories

AclScopeSecurityCategories: AclScopeAll

AclScopeSequences

AclScopeSequences: AclScopeAll | AclScopeDatasetsIds

AclScopeTemplateGroups

AclScopeTemplateGroups: AclScopeAll | AclScopeDatasetsIds

AclScopeTemplateInstances

AclScopeTemplateInstances: AclScopeAll | AclScopeDatasetsIds

AclScopeTimeseries

AclScopeUsers

AclScopeUsers: AclScopeAll

AclSecurityCategories

AclSequences

AclTemplateGroups

AclTemplateInstances

AclTimeseries

AclUsers

Aggregate

Aggregate: "average" | "max" | "min" | "count" | "sum" | "interpolation" | "stepInterpolation" | "totalVariation" | "continuousVariance" | "discreteVariance"

Aggregates

Aggregates: "avg" | "count" | "max" | "min" | "stCentroid" | "stCollect" | "stConvexHull" | "stIntersection" | "stUnion" | "sum" | "variance"

ApplicationDomains

ApplicationDomains: string[]

List of domains permitted for redirects. Redirects as part of a login flow may only target a domain (or subdomain) on this list. If this list is set to be empty, it will not be possible to use a login flow.

ArrayPatchClaimNames

ArrayPatchClaimNames: { set: ClaimName[] } | { add?: ClaimName[]; remove?: ClaimName[] }

ArrayPatchLong

ArrayPatchLong: { set: number[] } | { add?: number[]; remove?: number[] }

ArrayPatchString

ArrayPatchString: { set: string[] } | { add?: string[]; remove?: string[] }

AssetAggregate

AssetAggregate: AggregateResponse

Response from asset aggregate endpoint

AssetAggregatedProperty

AssetAggregatedProperty: "childCount" | "path" | "depth"

AssetChange

AssetDescription

AssetDescription: string

Description of asset.

AssetExternalId

AssetExternalId: ExternalId

AssetIdEither

AssetIdEither: IdEither

AssetInternalId

AssetInternalId: InternalId

AssetName

AssetName: string

Name of asset. Often referred to as tag.

AssetSource

AssetSource: string

The source of this asset

AssetsSource

AssetsSource: { filter?: ObjectOrString<AssetFilterProps>; mappings?: undefined | {}; type: "assets" }

Type declaration

AutoPagingEach

AutoPagingEach<T>: (handler: AutoPagingEachHandler<T>) => Promise<void>

Type parameters

  • T

Type declaration

AutoPagingEachHandler

AutoPagingEachHandler<T>: (item: T) => (false | true | void) | Promise<void | boolean>

Type parameters

  • T

Type declaration

    • (item: T): (false | true | void) | Promise<void | boolean>
    • Parameters

      • item: T

      Returns (false | true | void) | Promise<void | boolean>

AutoPagingToArray

AutoPagingToArray<T>: (options?: AutoPagingToArrayOptions) => Promise<T[]>

Type parameters

  • T

Type declaration

BaseRequestOptions

BaseRequestOptions: HttpRequestOptions

CREATE

CREATE: "CREATE"

CogniteCapability

CogniteCapability: SingleCogniteCapability[]

CogniteExternalId

CogniteExternalId: string

External Id provided by client. Should be unique within the project.

CogniteInternalId

CogniteInternalId: number

ContextJobId

ContextJobId: number

Contextualization job ID.

ContextJobStatus

ContextJobStatus: "QUEUED" | "RUNNING" | "COMPLETED" | "FAILED"

CreateAssetMapping3D

CreateAssetMapping3D: AssetMapping3DBase

CursorAndAsyncIterator

CursorAndAsyncIterator<T>: Promise<ListResponse<T[]>> & CogniteAsyncIterator<T>

A Promise to a response that can be awaited like normal, but at the risk of not getting all results due to API limits. In which case a nextCursor field is returned to request the next page. Helper methods are provided to abstract away the pagination.

Example using client.timeseries.list with a per-request limit of 1000:

const response = client.timeseries.list({ filter: { assetIds: [ASSET_ID] }, limit: 1000 });

You can get up to 1000 elements with normal await:

const { items, nextCursor } = await response;

You can use autoPagingToArray to get more items than the per-request limit. E.g. an array of up to 5000 items:

const timeseries = await response.autoPagingToArray({ limit: 5000 });

You may also specify { limit: Infinity } to get all results.

You can also iterate through all items (unless you break out of the loop) like so:

for await (const value of response) {
  // do something to value
}

Type parameters

  • T

DELETE

DELETE: "DELETE"

DataSetChange

DataSetWriteProtected

DataSetWriteProtected: boolean

Write-protected data sets impose additional restrictions on write access to resources inside a data set which can help ensuring data integrity of the data set. For write-protected data set in addition to a writing capability that has given resource data in scope, principal must be an owners of the data set. Note that this does not affect any security categories set for given resource data, both security category membership and data set ownership is required in such case

Datapoints

DatapointsDeleteRequest

DatapointsQuery

DateRange

DateRange: Range<Timestamp>

DefaultGroupId

DefaultGroupId: number

A default group for all project users. Can be used to establish default capabilities. WARNING: this group may be logically deleted

DeleteAssetMapping3D

DeleteAssetMapping3D: AssetMapping3DBase

DocumentFilter

A JSON based filtering language. See detailed documentation above.

DocumentFilterBool

DocumentFilterBool: { and: DocumentFilter[] } | { or: DocumentFilter[] } | { not: DocumentFilter }

A query that matches items matching boolean combinations of other queries. It is built using one or more boolean clauses, which can be of types: and, or or not

DocumentFilterLeaf

Leaf filter

DocumentFilterProperty

DocumentFilterProperty: string[]

Property you wish to filter. It's a list of strings to allow specifying nested properties. For example, If you have the object {"foo": {"../bar": "baz"}, "bar": 123}, you can refer to the nested property as ["foo", "../bar"] and the un-nested one as ["bar"].

example

["sourceFile","name"]

DocumentFilterRangeValue

DocumentFilterRangeValue: number

Value you wish to find in the provided property using a range clause.

DocumentFilterValue

DocumentFilterValue: string | number | boolean | Label

Value you wish to find in the provided property.

DocumentFilterValueList

DocumentFilterValueList: DocumentFilterValue[]

One or more values you wish to find in the provided property.

DocumentSearchRequest

EXECUTE

EXECUTE: "EXECUTE"

EntityMatchingChange

EntityMatchingChange: IdEither & EntityMatchingPatch

EntityMatchingClassifier

EntityMatchingClassifier: "randomforest" | "decisiontree" | "logisticregression" | "augmentedlogisticregression" | "augmentedrandomforest"

EntityMatchingFeatureType

EntityMatchingFeatureType: "simple" | "bigram" | "frequencyweightedbigram" | "bigramextratokenizers" | "bigramcombo"

EntityMatchingPredictRequest

EntityMatchingPredictRequest: IdEither & EntityMatchingPredictRequestBase

EntityMatchingRefitRequest

EntityMatchingRefitRequest: IdEither & EntityMatchingRefitRequestBase

EpochTimestamp

EpochTimestamp: number

The number of milliseconds since 00:00:00 Thursday, 1 January 1970, Coordinated Universal Time (UTC), minus leap seconds.

format

int64

min

0

EventAggregate

EventAggregate: AggregateResponse

Response from event aggregate endpoint

EventChange

EventRetrieveParams

EventRetrieveParams: IgnoreUnknownIds

EventsSource

EventsSource: { filter?: ObjectOrString<EventFilter>; mappings?: undefined | {}; type: "events" }

Type declaration

ExternalDatapointsQuery

ExternalEntityTrueMatch

ExternalEntityTrueMatchSource

ExternalEntityTrueMatchSource: { sourceId: CogniteInternalId } | { sourceExternalId: CogniteExternalId }

ExternalEntityTrueMatchTarget

ExternalEntityTrueMatchTarget: { targetId: CogniteInternalId } | { targetExternalId: CogniteExternalId }

ExternalIdPrefix

ExternalIdPrefix: string

Prefix filter on externalId. (case-sensitive)

ExternalView

ExternalView: { dataSetId?: undefined | number; externalId: string; source: Source }

Type declaration

  • Optional dataSetId?: undefined | number
  • externalId: string
  • source: Source

FileAggregate

FileAggregate: AggregateResponse

Response from file aggregate endpoint

FileChangeUpdate

FileContent

FileContent: ArrayBuffer | Buffer | any

FileGeoLocationGeometry

FileGeoLocationGeometryType

FileGeoLocationGeometryType: "Point" | "MultiPolygon" | "MultiLineString" | "MultiPoint" | "Polygon" | "LineString"

FileGeoLocationPatch

FileGeoLocationPatch: SetField<FileGeoLocation> | RemoveField

FileGeoLocationRelation

FileGeoLocationRelation: "intersects" | "disjoint" | "within"

FileGeoLocationType

FileGeoLocationType: "Feature"

FileMimeType

FileMimeType: string

File type. E.g. text/plain, application/pdf, ...

FileName

FileName: string

Name of the file.

FileRetrieveParams

FileRetrieveParams: IgnoreUnknownIds

FilesSource

FilesSource: { filter?: ObjectOrString<FileFilter>; mappings?: undefined | {}; type: "files" }

Type declaration

GeometryPropertyType

GeometryPropertyType: "GEOMETRY" | "POINT" | "LINESTRING" | "POLYGON" | "MULTIPOINT" | "MULTILINESTRING" | "MULTIPOLYGON" | "GEOMETRYCOLLECTION" | "GEOMETRYZ" | "POINTZ" | "LINESTRINGZ" | "POLYGONZ" | "MULTIPOINTZ" | "MULTILINESTRINGZ" | "MULTIPOLYGONZ" | "GEOMETRYM" | "POINTM" | "LINESTRINGM" | "POLYGONM" | "MULTIPOINTM" | "MULTILINESTRINGM" | "MULTIPOLYGONM" | "GEOMETRYCOLLECTIONM" | "GEOMETRYZM" | "POINTZM" | "LINESTRINGZM" | "POLYGONZM" | "MULTIPOINTZM" | "MULTILINESTRINGZM" | "MULTIPOLYGONZM" | "GEOMETRYCOLLECTIONZM"

GeometryType

GeometryType: "WKT" | "GEOJSON"

GeospatialFeatureFilter

GeospatialFeatureFilter: { or: GeospatialFeatureFilter[] } | { and: GeospatialFeatureFilter[] } | { not: GeospatialFeatureFilter } | { equals: GeospatialPropertyAndValue } | { missing: { property: string } } | { like: GeospatialPropertyAndPattern } | { regex: GeospatialPropertyAndPattern } | { range: { gt: string | number; property: string } | { lt: string | number; property: string } | { gte: string | number; property: string } | { lte: string | number; property: string } } | { stWithin: GeospatialPropertyAndValue } | { stContains: GeospatialPropertyAndValue } | { stIntersects: GeospatialPropertyAndValue } | { stContainsProperly: GeospatialPropertyAndValue } | { stWithinProperly: GeospatialPropertyAndValue } | { stWithinDistance: GeospatialPropertyAndValue & { distance: number } }

GeospatialFeatureTypeProperty

GeospatialFeatureTypeProperty: { description?: undefined | string; optional?: undefined | false | true; type: Exclude<GeospatialPropertyType, GeometryPropertyType | "STRING"> } | { description?: undefined | string; optional?: undefined | false | true; srid?: undefined | number; type: GeometryPropertyType } | { description?: undefined | string; optional?: undefined | false | true; size: number; type: "STRING" }

GeospatialIndexSpec

GeospatialIndexSpec: { properties: string[] }

Type declaration

  • properties: string[]

GeospatialPropertyType

GeospatialPropertyType: "STRING" | "LONG" | "DOUBLE" | "BOOLEAN" | "TIMESTAMP" | GeometryPropertyType

GraphQlError

GraphQlError: { locations: { column: number; line: number }[]; message: string; path: string[] }

Type declaration

  • locations: { column: number; line: number }[]
  • message: string
  • path: string[]

GraphQlResponse

GraphQlResponse: { data: any; errors: GraphQlError[] }

Type declaration

GroupName

GroupName: string

Name of the group

example

Production Engineers

GroupSourceId

GroupSourceId: string

ID of the group in the source. If this is the same ID as a group in the IDP, a user in that group will implicitly be a part of this group as well.

example

b7c9a5a4-99c2-4785-bed3-5e6ad9a78603

Groups

HttpCall

HttpCall: <ResponseType>(path: string, options?: HttpRequestOptions) => Promise<HttpResponse<ResponseType>>

Type declaration

HttpResponseType

HttpResponseType: "json" | "arraybuffer" | "text"

IdEither

IntegerRange

IntegerRange: Range<number>

Range between two integers

ItemsResponse

ItemsResponse<T>: ItemsWrapper<T[]>

Type parameters

  • T

KeysOfType

KeysOfType<T, U>: {}[keyof T]

Type parameters

  • T

  • U

LIST

LIST: "LIST"

LabelFilter

LabelList

LabelList: Label[]

A list of the labels associated with this resource item.

LatestDataBeforeRequest

LatestDataParams

LatestDataParams: IgnoreUnknownIds

LineStringCoordinates

LineStringCoordinates: PointCoordinates[]

ListEndpoint

ListEndpoint<QueryType, ResponseType>: (query?: QueryType) => Promise<HttpResponse<CursorResponse<ResponseType>>>

Type parameters

Type declaration

ListRawDatabases

ListRawDatabases: FilterQuery

ListRawTables

ListRawTables: FilterQuery

ListReveal3DNodeAncestors

ListReveal3DNodeAncestors: FilterQuery

LogoutUrl

LogoutUrl: string

The url to send the user to in order to log out

example

https://accounts.google.com/logout

MEMBEROF

MEMBEROF: "MEMBEROF"

MetadataPatch

MetadataPatch: ObjectPatch<string>

MultiLineStringCoordinates

MultiLineStringCoordinates: PointCoordinates[][]

MultiPointCoordinates

MultiPointCoordinates: PointCoordinates[]

MultiPolygonCoordinates

MultiPolygonCoordinates: PointCoordinates[][][]

NoInfer

NoInfer<T>: [T][T extends any ? 0 : never]

Type parameters

  • T

NullableProperty

NullableProperty<T>: T | { isNull: boolean }

Type parameters

  • T

NullableSinglePatchLong

NullableSinglePatchLong: { set: number } | { setNull: true }

NullableSinglePatchString

NullableSinglePatchString: { set: string } | { setNull: true }

OWNER

OWNER: "OWNER"

ObjectOrString

ObjectOrString<T>: {}

Type parameters

  • T

Type declaration

ObjectPatch

ObjectPatch<T>: { set: {} } | { add: {}; remove: string[] }

Type parameters

  • T

OnAuthenticate

OnAuthenticate: (login: OnAuthenticateLoginObject) => void

Type declaration

OnTokens

OnTokens: (tokens: AuthTokens) => void

Type declaration

    • (tokens: AuthTokens): void
    • Parameters

      • tokens: AuthTokens

      Returns void

Partition

Partition: string

Splits the data set into N partitions. This should NOT be used for frontend applications. Partitions are formatted as n/m, where n is the index of the parititon, and m is the total number or partitions. i.e. 20 partitions would have one request with partition: 1/20, then another partition: 2/20 and so on. You need to use autoPagingToArray(...) on each partition in order to receive all the data.

example

1/10

PointCoordinates

PointCoordinates: Tuple2<number>

PolygonCoordinates

PolygonCoordinates: PointCoordinates[][]

ProjectName

ProjectName: string

The display name of the project.

example

Open Industrial Data

Properties

Properties: Record<string, GeospatialFeatureTypeProperty>

READ

READ: "READ"

RelationshipResourceType

RelationshipResourceType: "asset" | "timeSeries" | "file" | "event" | "sequence"

RelationshipsDeleteParams

RelationshipsDeleteParams: IgnoreUnknownIds

RelationshipsRetrieveParams

RelationshipsRetrieveParams: IgnoreUnknownIds

Response

Response: HttpResponse<any>

Response401Handler

Response401Handler: (err: HttpError, retry: () => void, reject: () => void) => void

Type declaration

    • (err: HttpError, retry: () => void, reject: () => void): void
    • Parameters

      • err: HttpError
      • retry: () => void
          • (): void
          • Returns void

      • reject: () => void
          • (): void
          • Returns void

      Returns void

ResponseHandler

ResponseHandler<ResponseType>: (res: Response) => Promise<ResponseType>

Type parameters

  • ResponseType

Type declaration

    • (res: Response): Promise<ResponseType>
    • Parameters

      • res: Response

      Returns Promise<ResponseType>

Revision3DStatus

Revision3DStatus: "Queued" | "Processing" | "Done" | "Failed"

RevisionMetadata

RevisionMetadata: {}

Type declaration

  • [key: string]: string

RevisionMetadataUpdate

SequenceAggregate

SequenceAggregate: AggregateResponse

Response from sequence aggregate endpoint

SequenceChange

SequenceChange: SequencePatch & IdEither

SequenceColumnDescription

SequenceColumnDescription: string

Description of the column

SequenceColumnName

SequenceColumnName: string

Human readable name of the column

SequenceDescription

SequenceDescription: string

Description of the sequence

SequenceItem

SequenceItem: number | string | null

Element of type corresponding to the column type. May include NULL!

SequenceName

SequenceName: string

Name of the sequence

SequenceRetrieveParams

SequenceRetrieveParams: IgnoreUnknownIds

SequenceRowsDelete

SequenceRowsDelete: SequenceRowsDeleteData & IdEither

SequenceRowsInsert

SequenceRowsInsert: SequenceRowsInsertData & IdEither

SequenceRowsRetrieve

SequenceRowsRetrieve: SequenceRowsRetriveData & IdEither

A request for datapoints stored

SequenceValueType

SequenceValueType: "STRING" | "DOUBLE" | "LONG"

What type the datapoints in a column will have. DOUBLE is restricted to the range [-1E100, 1E100]

default

STRING

SequencesSource

SequencesSource: { filter?: ObjectOrString<SequenceFilter>; mappings?: undefined | {}; type: "sequences" }

Type declaration

ServiceAccountName

ServiceAccountName: string

Unique name of the service account

SingleCogniteCapability

SingleCogniteCapability: { groupsAcl: AclGroups } | { assetsAcl: AclAssets } | { eventsAcl: AclEvents } | { filesAcl: AclFiles } | { usersAcl: AclUsers } | { projectsAcl: AclProjects } | { securityCategoriesAcl: AclSecurityCategories } | { rawAcl: AclRaw } | { timeSeriesAcl: AclTimeseries } | { apikeysAcl: AclApiKeys } | { threedAcl: Acl3D } | { sequencesAcl: AclSequences } | { analyticsAcl: AclAnalytics } | { datasetsAcl: AclDataSets } | { templateGroupsAcl: AclTemplateGroups } | { templateInstancesAcl: AclTemplateInstances }

SinglePatch

SinglePatch<T>: { set: T } | { setNull: boolean }

Type parameters

  • T

SinglePatchDate

SinglePatchDate: { set: Timestamp } | { setNull: boolean }

SinglePatchString

SinglePatchString: SetField<string> | RemoveField

SortOrder

SortOrder: "asc" | "desc"

Items can be sorted in either ascending or descending order

Source

SyntheticDatapoint

TemplateGroup

TemplateGroup: ExternalTemplateGroup & { createdTime: Timestamp; lastUpdatedTime: Timestamp; owners: string[] }

TemplateInstance

TemplateInstance: ExternalTemplateInstance & { createdTime: Timestamp; lastUpdatedTime: Timestamp }

TimeSeriesSource

TimeSeriesSource: { filter?: ObjectOrString<TimeseriesFilter>; mappings?: undefined | {}; type: "timeSeries" }

Type declaration

TimeSeriesUpdate

TimeseriesAggregate

TimeseriesAggregate: AggregateResponse

Response from timeseries aggregate endpoint

TimeseriesIdEither

TimeseriesIdEither: InternalId | ExternalId

TimeseriesIsStep

TimeseriesIsStep: boolean

Whether the time series is a step series or not.

TimeseriesIsString

TimeseriesIsString: boolean

Whether the time series is string valued or not.

TimeseriesName

TimeseriesName: string

Name of time series

TimeseriesRetrieveParams

TimeseriesRetrieveParams: IgnoreUnknownIds

TimeseriesUnit

TimeseriesUnit: string

The physical unit of the time series.

Timestamp

Timestamp: number | Date

A point in time, either a number or a Date object. The Date is converted to a number when api calls are made.

Tuple2

Tuple2<T>: [T, T]

Type parameters

  • T

Tuple3

Tuple3<T>: T[]

Type parameters

  • T

UPDATE

UPDATE: "UPDATE"

UrlName

UrlName: string

The url name of the project. This is used as part of API calls. It should only contain letters, digits and hyphens, as long as the hyphens are not at the start or end.

example

publicdata

ValidDomains

ValidDomains: string[]

List of valid domains. If left empty, any user registered with the OAuth2 provider will get access.

View

View: ExternalView & { createdTime: Timestamp; lastUpdatedTime: Timestamp }

ViewFilterQuery

ViewFilterQuery: FilterQuery

WRITE

WRITE: "WRITE"

Variables

Const ACCESS_TOKEN

ACCESS_TOKEN: "access_token" = "access_token"

Const ACCESS_TOKEN_PARAM

ACCESS_TOKEN_PARAM: "access_token" = "access_token"

Const DEFAULT_MAX_RETRY_ATTEMPTS

DEFAULT_MAX_RETRY_ATTEMPTS: 5 = 5

Const ERROR_DESCRIPTION_PARAM

ERROR_DESCRIPTION_PARAM: "error_description" = "error_description"

Const ERROR_PARAM

ERROR_PARAM: "error" = "error"

Const EXPIRES_IN

EXPIRES_IN: "expires_in" = "expires_in"

Const ID_TOKEN

ID_TOKEN: "id_token" = "id_token"

Const ID_TOKEN_PARAM

ID_TOKEN_PARAM: "id_token" = "id_token"

Const LOGIN_IFRAME_NAME

LOGIN_IFRAME_NAME: "adfsSilentLoginIframe" = "adfsSilentLoginIframe"

Const LOGIN_POPUP_NAME

LOGIN_POPUP_NAME: "cognite-js-sdk-auth-popup" = "cognite-js-sdk-auth-popup"

Const POPUP

POPUP: "POPUP" = "POPUP"

Const REDIRECT

REDIRECT: "REDIRECT" = "REDIRECT"

Const SCOPE

SCOPE: "scope" = "scope"

Const TOKEN_TYPE

TOKEN_TYPE: "token_type" = "token_type"

Const apiKey

apiKey: "TEST_KEY" = "TEST_KEY"

Const mockBaseUrl

mockBaseUrl: "https://example.com" = "https://example.com"

Const project

project: "TEST_PROJECT" = "TEST_PROJECT"

Const projectId

projectId: 123 = 123

Const retryValidator

retryValidator: (request: HttpRequest, response: HttpResponse<any>, retryCount: number) => boolean = createRetryValidator(ENDPOINTS_TO_RETRY)

Type declaration

Const user

user: "user@example.com" = "user@example.com"

Functions

accessApi

  • accessApi<T>(api: T | undefined): T

clearParametersFromUrl

  • clearParametersFromUrl(...params: string[]): void

Const createRetryValidator

  • createRetryValidator(endpointsToRetry: EndpointList, maxRetries?: number): RetryValidator

Const createUniversalRetryValidator

  • createUniversalRetryValidator(maxRetries?: number): RetryValidator

extractADFSToken

  • extractADFSToken(query: string): ADFSToken | null

extractTokensFromUrl

  • extractTokensFromUrl(): null | AuthTokens

generateLoginUrl

  • generateLoginUrl(params: AuthorizeParams): string

getChildrenMap

  • getChildrenMap<T>(nodes: Node<T>[]): Map<Node<T>, Node<T>[]>

getIdInfoFromAccessToken

  • getIdInfoFromAccessToken(httpClient: CDFHttpClient, accessToken: string): Promise<null | IdInfo>

getSortedPropInArray

  • getSortedPropInArray<T>(arr: T[], propName: string): any[]

headersWithDefaultField

isLoginPopupWindow

  • isLoginPopupWindow(): boolean

isTokensValid

  • isTokensValid(httpClient: CDFHttpClient, project: string, tokens: AuthTokens): Promise<boolean>

isValidRetryStatusCode

  • isValidRetryStatusCode(status: number): boolean

loginPopupHandler

  • loginPopupHandler(): void

lowercaseHeadersKeys

makeAutoPagingEach

  • makeAutoPagingEach<T>(asyncIteratorNext: () => Promise<IteratorResult<T>>): AutoPagingEach<T>

makeAutoPagingToArray

  • makeAutoPagingToArray<T>(autoPagingEach: AutoPagingEach<T>): autoPagingToArray

matchPathWithEndpoint

  • matchPathWithEndpoint(path: string, endpoint: string): boolean

matchPathWithEndpoints

  • matchPathWithEndpoints(path: string, endpoints: string[]): boolean

onAuthenticateWithPopup

onAuthenticateWithRedirect

randomInt

  • randomInt(): number

retryInSeconds

  • retryInSeconds<ResponseType>(func: () => Promise<ResponseType>, secondsBetweenRetries?: number, statusCodeToRetry?: number, finishAfterSeconds?: number): Promise<ResponseType>
  • Type parameters

    • ResponseType

    Parameters

    • func: () => Promise<ResponseType>
        • (): Promise<ResponseType>
        • Returns Promise<ResponseType>

    • Default value secondsBetweenRetries: number = 3
    • Default value statusCodeToRetry: number = 404
    • Default value finishAfterSeconds: number = 300

    Returns Promise<ResponseType>

runTestWithRetryWhenFailing

  • runTestWithRetryWhenFailing(testFunction: () => Promise<void>): Promise<void>

serialiseErrors

setupClient

setupLoggedInClient

setupMockableClient

Const simpleCompare

  • simpleCompare(a: number, b: number): number

string2arrayBuffer

  • string2arrayBuffer(str: string): ArrayBuffer

Object literals

Const ContextJobStatus

ContextJobStatus: object

COMPLETED

COMPLETED: "QUEUED" | "RUNNING" | "COMPLETED" | "FAILED" = 'COMPLETED' as ContextJobStatus

FAILED

FAILED: "QUEUED" | "RUNNING" | "COMPLETED" | "FAILED" = 'FAILED' as ContextJobStatus

QUEUED

QUEUED: "QUEUED" | "RUNNING" | "COMPLETED" | "FAILED" = 'QUEUED' as ContextJobStatus

RUNNING

RUNNING: "QUEUED" | "RUNNING" | "COMPLETED" | "FAILED" = 'RUNNING' as ContextJobStatus

Const ENDPOINTS_TO_RETRY

ENDPOINTS_TO_RETRY: object

[HttpMethod.Post]

[HttpMethod.Post]: string[] = ['/assets/list','/assets/byids','/assets/search','/events/list','/events/byids','/events/search','/files/list','/files/byids','/files/search','/files/initupload','/files/downloadlink','/timeseries/byids','/timeseries/search','/timeseries/data','/timeseries/data/list','/timeseries/data/latest','/timeseries/data/delete','/timeseries/synthetic/query',]

Const EntityMatchingClassifier

EntityMatchingClassifier: object

AUGMENTED_LOGISTIC_REGRESSION

AUGMENTED_LOGISTIC_REGRESSION: "randomforest" | "decisiontree" | "logisticregression" | "augmentedlogisticregression" | "augmentedrandomforest" = 'augmentedlogisticregression' as EntityMatchingClassifier

AUGMENTED_RANDOM_FOREST

AUGMENTED_RANDOM_FOREST: "randomforest" | "decisiontree" | "logisticregression" | "augmentedlogisticregression" | "augmentedrandomforest" = 'augmentedrandomforest' as EntityMatchingClassifier

DECISION_TREE

DECISION_TREE: "randomforest" | "decisiontree" | "logisticregression" | "augmentedlogisticregression" | "augmentedrandomforest" = 'decisiontree' as EntityMatchingClassifier

LOGISTIC_REGRESSION

LOGISTIC_REGRESSION: "randomforest" | "decisiontree" | "logisticregression" | "augmentedlogisticregression" | "augmentedrandomforest" = 'logisticregression' as EntityMatchingClassifier

RANDOM_FOREST

RANDOM_FOREST: "randomforest" | "decisiontree" | "logisticregression" | "augmentedlogisticregression" | "augmentedrandomforest" = 'randomforest' as EntityMatchingClassifier

Const EntityMatchingFeatureType

EntityMatchingFeatureType: object

BIGRAM

BIGRAM: "simple" | "bigram" | "frequencyweightedbigram" | "bigramextratokenizers" | "bigramcombo" = 'bigram' as EntityMatchingFeatureType

BIGRAM_COMBO

BIGRAM_COMBO: "simple" | "bigram" | "frequencyweightedbigram" | "bigramextratokenizers" | "bigramcombo" = 'bigramcombo' as EntityMatchingFeatureType

BIGRAM_EXTRA_TOKENIZERS

BIGRAM_EXTRA_TOKENIZERS: "simple" | "bigram" | "frequencyweightedbigram" | "bigramextratokenizers" | "bigramcombo" = 'bigramextratokenizers' as EntityMatchingFeatureType

FREQUENCY_WEIGHTED_BIGRAM

FREQUENCY_WEIGHTED_BIGRAM: "simple" | "bigram" | "frequencyweightedbigram" | "bigramextratokenizers" | "bigramcombo" = 'frequencyweightedbigram' as EntityMatchingFeatureType

SIMPLE

SIMPLE: "simple" | "bigram" | "frequencyweightedbigram" | "bigramextratokenizers" | "bigramcombo" = 'simple' as EntityMatchingFeatureType

Const HttpResponseType

HttpResponseType: object

ArrayBuffer

ArrayBuffer: "json" | "arraybuffer" | "text" = 'arraybuffer' as HttpResponseType

Json

Json: "json" | "arraybuffer" | "text" = 'json' as HttpResponseType

Text

Text: "json" | "arraybuffer" | "text" = 'text' as HttpResponseType

Const SequenceValueType

SequenceValueType: object

DOUBLE

DOUBLE: "LONG" | "STRING" | "DOUBLE" = 'DOUBLE' as SequenceValueType

LONG

LONG: "LONG" | "STRING" | "DOUBLE" = 'LONG' as SequenceValueType

STRING

STRING: "LONG" | "STRING" | "DOUBLE" = 'STRING' as SequenceValueType

Const SortOrder

SortOrder: object

ASC

ASC: "asc" | "desc" = 'asc' as SortOrder

DESC

DESC: "asc" | "desc" = 'desc' as SortOrder

Const adfsRequestParamsMapping

adfsRequestParamsMapping: object

clientId

clientId: "client_id" = "client_id"

redirectUri

redirectUri: "redirect_uri" = "redirect_uri"

resource

resource: "resource" = "resource"

responseMode

responseMode: "response_mode" = "response_mode"

responseType

responseType: "response_type" = "response_type"

scope

scope: "scope" = "scope"

Const authTokens

authTokens: object

accessToken

accessToken: string = "abc"

idToken

idToken: string = "def"

Const loggedInResponse

loggedInResponse: object

data

data: object

loggedIn

loggedIn: boolean = true

project

project: string

projectId

projectId: number

user

user: string

Const notLoggedInResponse

notLoggedInResponse: object

data

data: object

loggedIn

loggedIn: boolean = false

project

project: string = ""

user

user: string = ""