@gibme/starlink
    Preparing search index...

    Class Account

    Hierarchy

    • default
      • Account
    Index

    Constructors

    Properties

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

    Accessors

    • get accountName(): undefined | string

      The name of the account

      Returns undefined | string

    • get accountNumber(): string

      The Account Number. Example: ACC-511274-31364-54

      Returns string

    • get defaultRouterConfigId(): undefined | string

      Default router config on the account

      Returns undefined | string

    • get regionCode(): string

      The region code of the account. Example: US

      Returns string

    Methods

    • Adds a user terminal to the account

      Parameters

      • deviceId: string

        UTID, kit serial number, or dish serial number.

      Returns Promise<boolean>

    • Checks the available capacity for the given latitude and longitude

      Parameters

      • latitude: number
      • longitude: number

      Returns Promise<number>

    • Creates a new router configuration on the account

      Parameters

      • nickname: string
      • routerConfig: any

      Returns Promise<RouterConfig>

    • Creates a new service line

      Parameters

      • addressReferenceId: string

        Address Reference ID to associate with the service line.

      • productReferenceId: string

        Subscription Product ID to associate with the service line.

      Returns Promise<ServiceLine>

    • Protected

      Performs an HTTP delete request against the Starlink Enterprise API

      Type Parameters

      Parameters

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

      Returns Promise<Type>

    • Fetches an address by its reference ID

      Parameters

      • addressReferenceId: string

      Returns Promise<AddressId>

    • Fetches all the addresses listed on the account

      Parameters

      • options: Partial<
            {
                addressIds: string[];
                all: boolean;
                limit: number;
                metadata: string;
                page: number;
            },
        > = ...

      Returns Promise<AddressId[]>

    • Fetches realtime data tracking information for the service lines under this account

      Parameters

      • options: Partial<
            {
                all: boolean;
                limit: number;
                page: number;
                previousBillingCycles: number;
                queryStartDateParam: string;
                serviceLinesFilter: string[];
            },
        > = ...

      Returns Promise<Starlink.Management.Response.RealtimeDataTracking[]>

    • Fetches a router

      Parameters

      • routerId: string

      Returns Promise<Router>

    • Fetches the router configuration specified

      Parameters

      • configId: string

      Returns Promise<RouterConfig>

    • Fetches all router configs on the account

      Parameters

      • options: Partial<{ all: boolean; page: number }> = ...

      Returns Promise<RouterConfig[]>

    • Fetches a service line in the account

      Parameters

      • serviceLineNumber: string

        The Service Line Number for the service line

      Returns Promise<ServiceLine>

    • Fetch the services lines in the account

      Parameters

      • options: Partial<
            {
                addressReferenceId: string;
                all: boolean;
                limit: number;
                orderByCreatedDateDescending: boolean;
                page: number;
                searchString: string;
            },
        > = ...

      Returns Promise<ServiceLine[]>

    • Fetches the user terminals for an account

      Parameters

      • options: Partial<
            {
                active: boolean;
                all: boolean;
                hasServiceLine: boolean;
                limit: number;
                page: number;
                searchString: string;
                serviceLineNumbers: string[];
                userTerminalIds: string[];
            },
        > = ...

      Returns Promise<Starlink.Management.Response.UserTerminal[]>

    • Protected

      Performs an HTTP get request against the Starlink Enterprise API

      Type Parameters

      Parameters

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

      Returns Promise<Type>

    Protectedpost

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

      Performs an HTTP post request against the Starlink Enterprise API

      Type Parameters

      Parameters

      • endpoint: string
      • Optionalpayload: object

      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>

    • Remove a service line. This is equivalent to cancelling service for the address.

      Parameters

      • serviceLineNumber: string
      • options: Partial<{ endNow: boolean; reasonForCancellation: string }> = {}

      Returns Promise<boolean>

    • Removes a cold user terminal from the account

      Parameters

      • deviceId: string

        UTID, kit serial number, or dish serial number.

      Returns Promise<boolean>

    • The Telemetry API is designed for users that have their own data infrastructure to monitor Starlink devices remotely.

      This feature enables the ability to perform analysis in near real-time to characterize Starlink device performance relative to ongoing operations.

      The data in the stream has a time-based retention policy. This is configured to be a fraction of a day (8 hours). The implication of this is that if your consuming process goes offline and does not resume for a period of time longer than this retention policy then you will observe loss of data.

      Even though this is a JSON HTTP API, it behaves like a data stream. It is important to understand that a consumer's position is tracked and advanced through each successful response transmission. If the consumer process crashes in the middle of processing a response batch, unprocessed entries will not be present in the subsequent request!

      Each service account advances through the data stream independently. Creating multiple service accounts is a convenient way to consume the data multiple times if, for example, you have multiple environments (e.g. development and production).

      Parameters

      • batchSize: number = 100

        The maximum number of entries to return in the response (default 100).

      • maxLingerMs: number = 100

        The maximum number of milliseconds to collect entries for (default 100).

      Returns Promise<Starlink.Telemetry.Response.Data>

    • Converts the instance to a string (JSON encoded)

      Returns string

    • Updates the account default router configuration to the ID specified

      Parameters

      • configId: string

      Returns Promise<boolean>