Waterly WaterlyConnect Developer Hub
SDK TypeScript / JavaScript axios

Node.js Client

A TypeScript-first package that wraps the WaterlyConnect REST API with generated schema types and a small axios-based HTTP client. Best for server-side services, adapter layers, ETL jobs, and any Node.js runtime that needs a typed path from tag data to a successful submission.

TSGenerated schema types
axiosHTTP transport
CJSCommonJS build included
Prerequisites
  • Node.js available in the environment that will submit payloads.
  • A Waterly-provided submission URL ending in /connect/submit.
  • A client token and an assigned device identity (id and type) from the Waterly team.
  • Outbound HTTPS access from your runtime to the WaterlyConnect endpoint.
Quick Start
  1. 1
    Install the package. Add @waterclick/waterlyconnect-nodejs-client to your project dependencies.
  2. 2
    Create the config. Supply the submission URL, your client token, and the device object with id and type.
  3. 3
    Instantiate and submit. Create a WaterlyConnectApiClient and call submitData with an array of TagDatum objects.
Submission Example
import {
  TagDatum,
  WaterlyConnectApiClient,
  WaterlyConnectApiClientConfig
} from "@waterclick/waterlyconnect-nodejs-client";

const config: WaterlyConnectApiClientConfig = {
  url: "https://app.waterlyapp.com/connect/submit",
  clientToken: "your-client-token",
  clientDevice: {
    id: "plant-west-01",
    type: "SCADA Gateway"
  }
};

const client = new WaterlyConnectApiClient(config);

const tags: TagDatum[] = [
  {
    name: "FinishedWaterFlow",
    value: "123.2",
    last_change_timestamp: Math.floor(Date.now() / 1000)
  },
  {
    name: "ClearwellLevel",
    value: "14.7",
    last_change_timestamp: Math.floor(Date.now() / 1000),
    unit: "FT"
  }
];

await client.submitData(tags);
Files
Package README

Full API reference, type documentation, and usage notes.

Open README
Client source

Main TypeScript implementation of the HTTP client.

client.ts
Generated schema

TypeScript types derived from the canonical OpenAPI YAML.

schema.ts
Package manifest

Includes the local schema generation script path.

package.json