Skip to main content

Types

The interfaces and type aliases the SDK exports, grouped by what they describe. All are importable from the package root as type-only imports:

import type { ESPRMNeoBaseConfig, NodeConfig, ScheduleItem } from "@espressif/rainmaker-neo-base-sdk";

The SDK models the wire format and its own runtime shapes separately. Types ending in API are raw backend payloads in snake_case; everything else is the camelCase shape your app works with. You rarely need an API type; they are exported for apps that inspect a cached payload directly.

Configuration and credentials

TypeDescribes
ESPRMNeoBaseConfigThe object configure() takes
UserTokensDataidToken, accessToken, refreshToken
ESPAWSCredentialsTemporary credentials, camelCase
AWSCredentialsAssume-role credentials, snake_case
AssumeRoleRequestAssume-role request body

ESPAWSCredentials and AWSCredentials describe different steps of the same chain and use different casing. See Sessions and credentials.

Adaptors

TypeImplemented by
ESPStorageAdapterYour storage adaptor
ESPProvisionAdapterInterfaceYour provisioning adaptor
MQTTTransportYour MQTT adaptor
ESPTransportInterfaceA custom transport

Type your adaptor objects against these; it is the cheapest way to satisfy the method-presence validation configure() performs.

Users and auth responses

ESPRMNeoUserInfo is what getUserInfo() returns. The response types are all optional-message envelopes: ConfirmSignUpResponse, ForgotPasswordResponse, SetNewPasswordResponse, ChangePasswordResponse, SuccessResponse.

ESPAPIResponse is the general write response — message, statusCode and errorCode, all optional. Success is signalled by the absence of a thrown error, not by a field.

IntegrationInfo describes one entry from listIntegrations().

Groups and sharing

TypeDescribes
ESPRMNeoGroupPlain group shape, camelCase
GroupUserAccessType"primary" | "secondary" | "subgroup"
GroupUser, GroupSharingInfoResult of getSharingInfo()
ShareOptionsusername and accessType for share()
SharingRequestAccessTypeAdds "subentity" for subgroup invitations
SharingRequestInfoRaw sharing request payload
ESPRMNeoGroupSetParamsOptionssubgroupId for group control
NodeCapabilityInfoPer-node capability block

Note that the exported interface ESPRMNeoGroup and the class ESPRMNeoGroup share a name; the class implements the interface. Importing the value gets you the class; a type-only import gets you the interface.

Nodes, devices and parameters

TypeDescribes
NodeConfigRuntime config, live device instances
NodeConfigAPIWire and cache config, raw records
ESPRMNeoDeviceInterfacePlain device shape
ESPRMNeoServiceInterfacePlain service shape
ESPRMNeoParamInterfaceShared parameter fields
ESPRMNeoDeviceParamInterfaceAdds deviceName, uiType
ESPRMNeoServiceParamInterfaceAdds serviceName
ESPRMNeoAttributeInterfacename and value
ESPRMNeoNodeInfoInterfaceModel, firmware and other metadata
ESPRMNeoConnectivityStatusInterfaceisConnected, lastConnectionTimestamp

NodeConfig and NodeConfigAPI differ only in devices and services: the first holds live SDK instances, the second holds raw records. The SDK persists the raw form and never writes class instances to storage.

The shadow types (ESPRMNeoShadowDocument, ESPRMNeoShadowState, ESPRMNeoShadowReported and ESPRMNeoExtractedShadow) describe the cloud state document. Shadow payloads are frequently partial, so every field is optional.

Transports and subscriptions

TypeDescribes
ESPTransportConfigtype and metadata for a transport
ESPNodeUpdateDataOne normalised parameter update
ESPSubscriptionChannelInterfaceA subscription channel
ESPNodeSubscriptionConfigPer-node channelOrder
NodeLikeMinimal node shape the manager accepts

NodeLike exists so lightweight proxies can be passed to the subscription manager without depending on the full node class. The exported resolveNodeId(node) reads an ID from one.

Discovery

ESPEventCallback and EventCallbacks are the callback aliases used by the event API.

Provisioning

ESPDeviceInterface is the device descriptor an adaptor returns and the ESPDevice constructor takes. ESPWifiList is one scan result. ESPProvResponse and ESPClaimResponse are the progress payloads, and ESPClaimProgressCallback is the claiming callback alias.

Schedules, triggers, automations

TypeDescribes
ScheduleItem, ScheduleTriggerA schedule and its timing
ScheduleActionMapdevice → param → value
TriggerItem, TriggerOperatorA trigger and its six operators
CreateAutomationInput, AutomationItemAutomation input and stored form
AutomationConditions, AutomationActionsCondition and action blocks
ActionTargetnode, path, value
AutomationStatus"enabled" | "disabled"

TriggerOperator is worth importing specifically; it constrains the operator to the six spellings firmware accepts, which a plain string literal does not. See Triggers.

Time series

ESPRMNeoTSDataOptions is the options object all six time-series methods take. ESPRMNeoTSDataResult is what they return, holding ESPRMNeoTSDataPoint items in data and ESPRMNeoTSAggregateEntry items in aggregates, with ESPRMNeoTSWindowAggregate inside each. ESPRMNeoTSAggregationWindow constrains the window to hourly, daily, weekly or monthly. FetchTSDataConfig is what the exported fetchers take.

Types you cannot import yet

Several option types are missing from the package root

GetNodeOptions, GetNodesOptions, GetDeviceParamsOptions, ProvisionOptions and AssumeRoleOptions are declared inside the SDK but are not re-exported, so import type { GetNodeOptions } fails. Pass inline object literals for these until a release exports them; the fields are documented on the pages that use them.