Documentation

Mistake on this page? Email us

Query

Hierarchy

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

createdAt

createdAt: Date

The timestamp of when the query was created

filter

filter: object

The device filter

Constructed like so:

 filter: {
   state: { $eq: "bootstrapped" },
   createdAt: { $gte: new Date("01-01-2014"), $lte: new Date("01-01-2018") },
   updatedAt: { $gte: new Date("01-01-2014"), $lte: new Date("01-01-2018") },
   customAttributes: {
     <custom_name_1>: { $eq: "custom_value_1" },
     <custom_name_2>: { $ne: "custom_value_2" }
   }
 }

Type declaration

id

id: string

The ID of the query

name

name: string

The name of the query

updatedAt

updatedAt: Date

The timestamp when the query was updated

Methods

delete

  • delete(): Promise<void>
  • Delete the query

    Returns Promise<void>

    Promise containing any error

  • Delete the query

    Parameters

    • callback: CallbackFn<void>

      A function that is passed any error

    Returns void

update

  • update(): Promise<Query>
  • Update the query

    Returns Promise<Query>

    Promise of query

  • Update the query

    Parameters

    • callback: CallbackFn<Query>

      A function that is passed the arguments (error, query)

    Returns void