@gibme/starlink
    Preparing search index...

    Class UserTerminal

    Hierarchy

    • default
      • UserTerminal
    Index

    Constructors

    Properties

    baseUrl: "https://starlink.com/api/public" = 'https://starlink.com/api/public'
    client_id: string
    client_secret: string

    Accessors

    • get accountNumber(): string

      Returns string

    • get active(): boolean

      Returns boolean

    • get dishSerialNumber(): string

      Returns string

    • get kitSerialNumber(): string

      Returns string

    • get nickname(): string | null

      Returns string | null

    • get serviceLineNumber(): string | null

      Returns string | null

    • get userTerminalId(): string

      Returns string

    Methods

    • Adds the terminal to the service line specified

      Parameters

      Returns Promise<boolean>

    • Protected

      Performs an HTTP delete request against the Starlink Enterprise API

      Type Parameters

      Parameters

      • endpoint: string
      • params: Record<string, any> = {}

      Returns Promise<Type>

    • Protected

      Performs an HTTP get request against the Starlink Enterprise API

      Type Parameters

      Parameters

      • endpoint: string
      • params: Record<string, any> = {}

      Returns Promise<Type>

    • Protected

      Walks a paginated endpoint, returning every record.

      When all: false, fetches the single page given by page and returns its results. When all: true (default), walks pages until isLastPage, asserting that the total received matches totalCount from the wire response.

      Type Parameters

      • Record_

      Parameters

      • method: "GET" | "POST"
      • endpoint: string
      • opts: Partial<
            {
                all: boolean;
                body: object;
                filters: Record<string, any>;
                page: number;
            },
        > = {}

      Returns Promise<Record_[]>

    Protectedpost

    • post<Type extends Starlink.Response = any>(
          endpoint: string,
          payload?: object,
          params?: Record<string, any>,
      ): Promise<Type>
      Protected

      Performs an HTTP post request against the Starlink Enterprise API

      Type Parameters

      Parameters

      • endpoint: string
      • Optionalpayload: object
      • params: Record<string, any> = {}

      Returns Promise<Type>

    • Protected

      Performs an HTTP put request against the Starlink Enterprise API

      Type Parameters

      Parameters

      • endpoint: string
      • Optionalpayload: string | object

      Returns Promise<Type>

    • Removes the terminal from it's assigned service line

      Returns Promise<boolean>

    • Converts the instance to a string (JSON encoded)

      Returns string

    • Disconnects the internal rate-limit cache and releases its resources

      Returns Promise<void>