TagoIO SDK for JavaScript and TypeScript

Index

Classes

Interfaces

Type aliases

Functions

Object literals

Type aliases

AccessQuery

AccessQuery: Query<AccessInfo, "name" | "active" | "created_at" | "updated_at">

ActionQuery

ActionQuery: Query<ActionInfo, "name" | "active" | "locked" | "last_triggered" | "created_at" | "updated_at">

ActionTriggerType

ActionTriggerType: { resource: "device" | "bucket" | "file" | "analysis" | "action" | "am" | "user" | "financial" | "profile"; tag_key: string; tag_value: string; when: "create" | "update" | "delete" } | { interval: string } | { cron: string; timezone: string | Date } | { device: string; is: Conditionals; second_value?: string; unlock?: boolean; value: string; value_type: "string" | "number" | "boolean" | "*"; variable: string }

ActionType

ActionType: "condition" | "resource" | "interval" | "schedule" | "mqtt_topic"

ActionTypeParams

ActionTypeParams: { script: GenericID[]; type: "script" } | { message: string; subject: string; type: "notification" } | { message: string; run_user: GenericID; subject: string; type: "notification_run" } | { message: string; subject: string; to: string; type: "email" } | { message: string; to: string; type: "sms" } | { bucket: string; payload: string; topic: string; type: "mqtt" } | { headers: {}; type: "post"; url: string }

AnalysisQuery

AnalysisQuery: Query<AnalysisInfo, "name" | "active" | "run_on" | "last_run" | "created_at" | "updated_at">

Base64

Base64: string

BucketQuery

BucketQuery: Query<BucketInfo, "name" | "visible" | "data_retention" | "created_at" | "updated_at">

Condition

Condition: "None" | "Pending" | "Accepted" | "Refused"

Conditionals

Conditionals: "<" | ">" | "=" | "!" | "><" | "*"

ConnectorQuery

ConnectorQuery: Query<ConnectorInfo, "name" | "id" | "description" | "logo_url" | "install_text" | "install_end_text" | "device_annotation" | "payload_decoder" | "networks">

DashboardQuery

DashboardQuery: Query<DashboardInfo, "name" | "label" | "active" | "created_at" | "updated_at">

DataToSend

DataToSend: Omit<Data, "id" | "created_at" | "origin" | "time"> & { time?: Date }

DeviceCreateResponse

DeviceCreateResponse: { bucket_id: GenericID; device_id: GenericID; token: GenericToken }

Type declaration

DeviceListItem

DeviceListItem: Omit<DeviceInfo, "bucket"> & { bucket: GenericID }

ExpireTimeOption

ExpireTimeOption: "never" | string

ExportBucket

ExportBucket: { id: string; origin: string; variables: string[] }[]

ExportOption

ExportOption: "csv" | "json" | "xml"

GenericID

GenericID: string

ID used on TagoIO, string with 24 character

GenericToken

GenericToken: string

Token used on TagoIO, string with 36 characters

ListResponse

ListResponse: DeviceInfo[]

NetworkQuery

NetworkQuery: Query<NetworkInfo, "name" | "description" | "logo_url" | "icon_url" | "banner_url" | "device_parameters" | "middleware_endpoint" | "payload_encoder" | "payload_decoder" | "serial_number" | "documentation_url" | "public" | "created_at" | "updated_at">

NotificationType

NotificationType: "dashboard" | "bucket" | "analysis" | "profile" | "tago" | "limit_alert"

PermissionOption

PermissionOption: "write" | "read" | "full" | "deny"

PublicKeyResponse

PublicKeyResponse: { expire_time: "never"; token: GenericToken }

Type declaration

RecursivePartial

RecursivePartial<T>: {}

Type parameters

  • T

Type declaration

RefType

RefType: "dashboard"

Regions

Regions: "usa-1" | "env"

RunTypeOptions

RunTypeOptions: "node" | "python"

TagTypes

TagTypes: "bucket" | "device" | "dashboard" | "action" | "analysis"

TemplateInstallParams

ThemeOption

ThemeOption: "actionSchedule" | "actionTriggerByData" | "actionTriggerByResource" | "actionTriggerByMQTT" | "alertDangerBackground" | "alertInfoBackground" | "alertWarningBackground" | "analysisExternal" | "analysisInternal" | "buttonDanger" | "buttonDangerText" | "buttonDefault" | "buttonDefaultText" | "buttonDisabled" | "buttonDisabledText" | "buttonIconLabel" | "buttonPrimary" | "buttonPrimaryText" | "buttonSuccess" | "buttonSuccessText" | "buttonWarning" | "buttonWarningText" | "deviceInputOutput1Day" | "deviceInputOutput3Days" | "deviceInputOutput3Hours" | "deviceInputOutput6Hours" | "deviceInputOutputRest" | "dottedBorder" | "dropdownAccent" | "dropdownBackground" | "floatingSidebarTitle" | "footerBackground" | "formControlBorder" | "gaugeEmpty" | "gaugeFill" | "gaugePrimaryText" | "gaugeSecondaryText" | "iconRadioSelected" | "iconRadioSubTitle" | "informationIcon" | "inputBackground" | "inputBackgroundReadOnly" | "inputError" | "inputForeground" | "inputForegroundReadOnly" | "lightBorder" | "limitAlert" | "link" | "listNavColor" | "listTitleLabel" | "loading" | "loginButton" | "loginButtonText" | "loginForeground" | "loginForm" | "modalContainer" | "modalOverlay" | "navbar" | "navbarBetaDeveloperBorder" | "navbarButton" | "navbarDropdownBorder" | "navbarDropdownOption" | "navbarDropdownOptionBorder" | "navbarText" | "navDescription" | "notificationButtonAmount" | "notificationButtonAmountText" | "notificationFilterBackground" | "notificationFooter" | "notificationItemBorder" | "notificationItemDate" | "notificationItemTextAccepted" | "notificationItemUnread" | "primary" | "publicPageNavigationBar" | "sidebarAccessSelected" | "sidebarAccountSelected" | "sidebarActionSelected" | "sidebarAnalysisSelected" | "sidebarBackground" | "sidebarBillingSelected" | "sidebarBucketSelected" | "sidebarDashboardSelected" | "sidebarDeviceSelected" | "sidebarExploreSelected" | "sidebarFileSelected" | "sidebarForegroundIcon" | "sidebarForegroundText" | "sidebarHomeSelected" | "sidebarItem" | "sidebarRibbon" | "sidebarRunSelected" | "sidebarSeparator" | "sidebarSeparatorForeground" | "sidebarUserSelected" | "snakeButtonOutline" | "svgTagoFont" | "svgTagoIOHole" | "switchDisabledBackground" | "switchSlider" | "tabBackground" | "tabLabelBorder" | "tooltipContainer" | "tooltipText" | "verticalTabItem" | "verticalTabItemBorder" | "widgetCardBackground" | "widgetIconsAccent" | "widgetIconsBackground" | "widgetIconsColor" | "widgetIconsFooterBasic" | "widgetIconsFooterPremium" | "auth_bg_opacity" | "auth_bg_src" | "auth_bg_type" | "auth_form_opacity"

TokenCreateResponse

TokenCreateResponse: { expire_date: ExpireTimeOption; permission: PermissionOption; token: GenericToken }

Type declaration

UserQuery

UserQuery: Query<UserInfo, "name" | "active" | "last_login" | "created_at" | "updated_at">

analysisFunction

analysisFunction: (context: any, data: any) => any

Type declaration

    • (context: any, data: any): any
    • Parameters

      • context: any
      • data: any

      Returns any

valuesTypes

valuesTypes: string | number | boolean | void

widgetOverwrite

widgetOverwrite: {}

Type declaration

widgetOverwriteOptions

widgetOverwriteOptions: "start_date" | "end_date" | "timezone"

Functions

envToJson

  • Convert Environment Array to Object Note: It will replace duplicate keys for the last one

    Parameters

    Returns {}

    • [key: string]: string

getTokenByName

  • getTokenByName(Account: Account, deviceID: string, names?: string[] | string): Promise<string>
  • Parameters

    • Account: Account
    • deviceID: string

      Id of device

    • Optional names: string[] | string

      Array of names of the token, if null will return the first token found

    Returns Promise<string>

Object literals

Const Utils

Utils: object

envToJson

envToJson: envToJson

getAPIVersion

getAPIVersion: getVersion

getTokenByName

getTokenByName: getTokenByName