Documentation

Mistake on this page? Email us

Device repository

Hierarchy

Index

Constructors

constructor

  • Initalise a new instance of the repository

    Parameters

    • Optional config: Config

      The configuration to use, if null then repository will initalise its own using dotenv

    • Optional client: Client

      The client instance to use

    Returns DeviceRepository

Properties

client

client: Client

The repository client instance

config

config: Config

The repository configuration class

Methods

addToGroup

  • addToGroup

    Parameters

    Returns Promise<void>

create

  • create

    Parameters

    Returns Promise<Device>

delete

  • delete(id: string): Promise<void>
  • delete

    Parameters

    • id: string

      The ID of the device.

    Returns Promise<void>

list

  • list(options?: DeviceListOptions): Paginator<Device, ListOptions>
  • list

    Parameters

    • Optional options: DeviceListOptions

      Options to use for the List

    Returns Paginator<Device, ListOptions>

read

  • read(id: string): Promise<Device>
  • read

    Parameters

    • id: string

      The ID of the device. The device ID is used across all Device Management APIs.

    Returns Promise<Device>

removeFromGroup

  • removeFromGroup

    Parameters

    Returns Promise<void>

renewCertificate

  • renewCertificate

    Parameters

    • certificateName: string

      The certificate name.

    • id: string

      The certificate enrollment ID.

    Returns Promise<CertificateEnrollment>

update

  • update

    Parameters

    • request: DeviceUpdateRequest

      The entity to perform action on.

    • id: string

      The ID of the device. The device ID is used across all Device Management APIs.

    Returns Promise<Device>