Documentation

Mistake on this page? Email us

Campaign

Hierarchy

Index

Constructors

constructor

Properties

createdAt

createdAt: Date

The time the object was created

description

description: string

An optional description of the campaign

deviceFilter

deviceFilter: object

The device filter to use

Constructed like so:

 deviceFilter: {
   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

finishedAt

finishedAt: Date

The timestamp when the update campaign finished

id

id: string

The ID of the campaign

manifestId

manifestId: string

ID of the manifest to use for update

manifestUrl

manifestUrl: string

URL of the manifest used

name

name: string

A name for this campaign

object

object: string

The API resource entity

phase

phase: string

The phase of the campaign

scheduledAt

scheduledAt: Date

The timestamp at which update campaign scheduled to start

startedAt

startedAt: Date

The timestamp at which update campaign scheduled to start

state

The state of the campaign

updatedAt

updatedAt: Date

The timestamp when the update campaign was updated

Methods

delete

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

    Returns Promise<void>

    Promise containing any error

  • Delete the campaign

    Parameters

    • callback: CallbackFn<void>

      A function that is passed any error

    Returns void

listDeviceStates

start

  • Start the campaign

    Returns Promise<Campaign>

    Promise containing campaign

  • Start the campaign

    Parameters

    • callback: CallbackFn<Campaign>

      A function that is passed the return arguments (error, campaign)

    Returns void

stop

  • Stop the campaign

    Returns Promise<Campaign>

    Promise containing campaign

  • Stop the campaign

    Parameters

    • callback: CallbackFn<Campaign>

      A function that is passed the return arguments (error, campaign)

    Returns void

update

  • Update the campaign

    Returns Promise<Campaign>

    Promise of campaign

  • Update the campaign

    Parameters

    • callback: CallbackFn<Campaign>

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

    Returns void