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
| Type | Describes |
|---|---|
ESPRMNeoBaseConfig | The object configure() takes |
UserTokensData | idToken, accessToken, refreshToken |
ESPAWSCredentials | Temporary credentials, camelCase |
AWSCredentials | Assume-role credentials, snake_case |
AssumeRoleRequest | Assume-role request body |
ESPAWSCredentials and AWSCredentials describe different steps of the same chain and use different casing. See Sessions and credentials.
Adaptors
| Type | Implemented by |
|---|---|
ESPStorageAdapter | Your storage adaptor |
ESPProvisionAdapterInterface | Your provisioning adaptor |
MQTTTransport | Your MQTT adaptor |
ESPTransportInterface | A 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
| Type | Describes |
|---|---|
ESPRMNeoGroup | Plain group shape, camelCase |
GroupUserAccessType | "primary" | "secondary" | "subgroup" |
GroupUser, GroupSharingInfo | Result of getSharingInfo() |
ShareOptions | username and accessType for share() |
SharingRequestAccessType | Adds "subentity" for subgroup invitations |
SharingRequestInfo | Raw sharing request payload |
ESPRMNeoGroupSetParamsOptions | subgroupId for group control |
NodeCapabilityInfo | Per-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
| Type | Describes |
|---|---|
NodeConfig | Runtime config, live device instances |
NodeConfigAPI | Wire and cache config, raw records |
ESPRMNeoDeviceInterface | Plain device shape |
ESPRMNeoServiceInterface | Plain service shape |
ESPRMNeoParamInterface | Shared parameter fields |
ESPRMNeoDeviceParamInterface | Adds deviceName, uiType |
ESPRMNeoServiceParamInterface | Adds serviceName |
ESPRMNeoAttributeInterface | name and value |
ESPRMNeoNodeInfoInterface | Model, firmware and other metadata |
ESPRMNeoConnectivityStatusInterface | isConnected, 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
| Type | Describes |
|---|---|
ESPTransportConfig | type and metadata for a transport |
ESPNodeUpdateData | One normalised parameter update |
ESPSubscriptionChannelInterface | A subscription channel |
ESPNodeSubscriptionConfig | Per-node channelOrder |
NodeLike | Minimal 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
| Type | Describes |
|---|---|
ScheduleItem, ScheduleTrigger | A schedule and its timing |
ScheduleActionMap | device → param → value |
TriggerItem, TriggerOperator | A trigger and its six operators |
CreateAutomationInput, AutomationItem | Automation input and stored form |
AutomationConditions, AutomationActions | Condition and action blocks |
ActionTarget | node, 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
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.
Related
- Configuration reference —
ESPRMNeoBaseConfigfield by field - Constants and enums — the values these types hold
- Nodes — the hierarchy the node types model
- Helpers — exported functions using these types
- Errors — the error classes