@espressif/rainmaker-admin-sdk 1.1.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/CHANGELOG.md +209 -0
  2. package/README.md +2 -1
  3. package/dist/cjs/ESPRMBase.cjs +1 -0
  4. package/dist/cjs/ESPRMClaim.cjs +16 -0
  5. package/dist/cjs/entries/ESPRMAdminCommonCustomData.cjs +1 -0
  6. package/dist/cjs/entries/ESPRMAdminNode.cjs +2 -0
  7. package/dist/cjs/entries/ESPRMAdminNodeRegistration.cjs +3 -0
  8. package/dist/cjs/entries/ESPRMClaim.cjs +14 -0
  9. package/dist/cjs/index.cjs +11 -0
  10. package/dist/cjs/methods/ESPRMAdminCommonCustomData/DeleteCommonCustomData.cjs +24 -0
  11. package/dist/cjs/methods/ESPRMAdminCommonCustomData/SetCommonCustomData.cjs +7 -0
  12. package/dist/cjs/methods/ESPRMAdminNode/ActivateDeactivateNodes.cjs +11 -1
  13. package/dist/cjs/methods/ESPRMAdminNode/CancelCommandRequests.cjs +27 -0
  14. package/dist/cjs/methods/ESPRMAdminNode/DeleteNode.cjs +24 -0
  15. package/dist/cjs/methods/ESPRMAdminNodeRegistration/GetNodeCertificateUploadUrl.cjs +25 -0
  16. package/dist/cjs/methods/ESPRMAdminNodeRegistration/GetNodeRegistrationRequest.cjs +24 -0
  17. package/dist/cjs/methods/ESPRMAdminNodeRegistration/ListNodeRegistrationRequests.cjs +21 -0
  18. package/dist/cjs/methods/ESPRMClaim/InitiateClaim.cjs +28 -0
  19. package/dist/cjs/methods/ESPRMClaim/VerifyClaim.cjs +28 -0
  20. package/dist/cjs/services/ESPRMAPIManager.cjs +15 -1
  21. package/dist/cjs/utils/constants.cjs +17 -0
  22. package/dist/cjs/utils/error/errorMessages.cjs +11 -0
  23. package/dist/cjs/utils/validator/ConfigValidator.cjs +9 -0
  24. package/dist/esm/ESPRMBase.js +1 -0
  25. package/dist/esm/ESPRMClaim.js +14 -0
  26. package/dist/esm/entries/ESPRMAdminCommonCustomData.js +1 -0
  27. package/dist/esm/entries/ESPRMAdminNode.js +2 -0
  28. package/dist/esm/entries/ESPRMAdminNodeRegistration.js +3 -0
  29. package/dist/esm/entries/ESPRMClaim.js +8 -0
  30. package/dist/esm/index.js +10 -1
  31. package/dist/esm/methods/ESPRMAdminCommonCustomData/DeleteCommonCustomData.js +22 -0
  32. package/dist/esm/methods/ESPRMAdminCommonCustomData/SetCommonCustomData.js +8 -1
  33. package/dist/esm/methods/ESPRMAdminNode/ActivateDeactivateNodes.js +12 -2
  34. package/dist/esm/methods/ESPRMAdminNode/CancelCommandRequests.js +25 -0
  35. package/dist/esm/methods/ESPRMAdminNode/DeleteNode.js +22 -0
  36. package/dist/esm/methods/ESPRMAdminNodeRegistration/GetNodeCertificateUploadUrl.js +23 -0
  37. package/dist/esm/methods/ESPRMAdminNodeRegistration/GetNodeRegistrationRequest.js +22 -0
  38. package/dist/esm/methods/ESPRMAdminNodeRegistration/ListNodeRegistrationRequests.js +19 -0
  39. package/dist/esm/methods/ESPRMClaim/InitiateClaim.js +26 -0
  40. package/dist/esm/methods/ESPRMClaim/VerifyClaim.js +26 -0
  41. package/dist/esm/services/ESPRMAPIManager.js +15 -1
  42. package/dist/esm/utils/constants.js +17 -1
  43. package/dist/esm/utils/error/errorMessages.js +11 -0
  44. package/dist/esm/utils/validator/ConfigValidator.js +9 -0
  45. package/dist/types/ESPRMClaim.d.ts +12 -0
  46. package/dist/types/entries/ESPRMClaim.d.ts +7 -0
  47. package/dist/types/methods/ESPRMAdminCommonCustomData/DeleteCommonCustomData.d.ts +22 -0
  48. package/dist/types/methods/ESPRMAdminCommonCustomData/SetCommonCustomData.d.ts +6 -1
  49. package/dist/types/methods/ESPRMAdminCommonCustomData/index.d.ts +1 -0
  50. package/dist/types/methods/ESPRMAdminEventFilter/UpdateEventFilter.d.ts +5 -0
  51. package/dist/types/methods/ESPRMAdminNode/ActivateDeactivateNodes.d.ts +9 -6
  52. package/dist/types/methods/ESPRMAdminNode/CancelCommandRequests.d.ts +22 -0
  53. package/dist/types/methods/ESPRMAdminNode/DeleteNode.d.ts +19 -0
  54. package/dist/types/methods/ESPRMAdminNode/index.d.ts +2 -0
  55. package/dist/types/methods/ESPRMAdminNodeRegistration/GetMQTTHost.d.ts +3 -2
  56. package/dist/types/methods/ESPRMAdminNodeRegistration/GetNodeCertificateUploadUrl.d.ts +18 -0
  57. package/dist/types/methods/ESPRMAdminNodeRegistration/GetNodeRegistrationRequest.d.ts +17 -0
  58. package/dist/types/methods/ESPRMAdminNodeRegistration/ListNodeRegistrationRequests.d.ts +19 -0
  59. package/dist/types/methods/ESPRMAdminNodeRegistration/RegisterNodeCertificates.d.ts +6 -6
  60. package/dist/types/methods/ESPRMAdminNodeRegistration/index.d.ts +3 -0
  61. package/dist/types/methods/ESPRMAdminWebhook/GetWebhookIntegrations.d.ts +2 -1
  62. package/dist/types/methods/ESPRMClaim/InitiateClaim.d.ts +21 -0
  63. package/dist/types/methods/ESPRMClaim/VerifyClaim.d.ts +21 -0
  64. package/dist/types/methods/ESPRMClaim/index.d.ts +7 -0
  65. package/dist/types/methods/export.d.ts +1 -0
  66. package/dist/types/services/ESPRMAPIManager.d.ts +6 -0
  67. package/dist/types/types/claim.d.ts +45 -0
  68. package/dist/types/types/command_response.d.ts +56 -7
  69. package/dist/types/types/common_custom_data.d.ts +32 -5
  70. package/dist/types/types/config.d.ts +9 -0
  71. package/dist/types/types/event_filter.d.ts +17 -3
  72. package/dist/types/types/index.d.ts +1 -0
  73. package/dist/types/types/input.d.ts +3 -2
  74. package/dist/types/types/mainTypes.d.ts +2 -1
  75. package/dist/types/types/node.d.ts +33 -3
  76. package/dist/types/types/node_registration.d.ts +164 -12
  77. package/dist/types/types/output.d.ts +3 -2
  78. package/dist/types/types/webhook.d.ts +5 -2
  79. package/dist/types/utils/constants.d.ts +17 -1
  80. package/dist/types/utils/error/errorMessages.d.ts +11 -0
  81. package/dist/types/utils/validator/ConfigValidator.d.ts +1 -0
  82. package/dist/types-cjs/ESPRMClaim.d.cts +12 -0
  83. package/dist/types-cjs/entries/ESPRMClaim.d.cts +7 -0
  84. package/dist/types-cjs/methods/ESPRMAdminCommonCustomData/DeleteCommonCustomData.d.cts +22 -0
  85. package/dist/types-cjs/methods/ESPRMAdminCommonCustomData/SetCommonCustomData.d.cts +6 -1
  86. package/dist/types-cjs/methods/ESPRMAdminCommonCustomData/index.d.cts +1 -0
  87. package/dist/types-cjs/methods/ESPRMAdminEventFilter/UpdateEventFilter.d.cts +5 -0
  88. package/dist/types-cjs/methods/ESPRMAdminNode/ActivateDeactivateNodes.d.cts +9 -6
  89. package/dist/types-cjs/methods/ESPRMAdminNode/CancelCommandRequests.d.cts +22 -0
  90. package/dist/types-cjs/methods/ESPRMAdminNode/DeleteNode.d.cts +19 -0
  91. package/dist/types-cjs/methods/ESPRMAdminNode/index.d.cts +2 -0
  92. package/dist/types-cjs/methods/ESPRMAdminNodeRegistration/GetMQTTHost.d.cts +3 -2
  93. package/dist/types-cjs/methods/ESPRMAdminNodeRegistration/GetNodeCertificateUploadUrl.d.cts +18 -0
  94. package/dist/types-cjs/methods/ESPRMAdminNodeRegistration/GetNodeRegistrationRequest.d.cts +17 -0
  95. package/dist/types-cjs/methods/ESPRMAdminNodeRegistration/ListNodeRegistrationRequests.d.cts +19 -0
  96. package/dist/types-cjs/methods/ESPRMAdminNodeRegistration/RegisterNodeCertificates.d.cts +6 -6
  97. package/dist/types-cjs/methods/ESPRMAdminNodeRegistration/index.d.cts +3 -0
  98. package/dist/types-cjs/methods/ESPRMAdminWebhook/GetWebhookIntegrations.d.cts +2 -1
  99. package/dist/types-cjs/methods/ESPRMClaim/InitiateClaim.d.cts +21 -0
  100. package/dist/types-cjs/methods/ESPRMClaim/VerifyClaim.d.cts +21 -0
  101. package/dist/types-cjs/methods/ESPRMClaim/index.d.cts +7 -0
  102. package/dist/types-cjs/methods/export.d.cts +1 -0
  103. package/dist/types-cjs/services/ESPRMAPIManager.d.cts +6 -0
  104. package/dist/types-cjs/types/claim.d.cts +45 -0
  105. package/dist/types-cjs/types/command_response.d.cts +56 -7
  106. package/dist/types-cjs/types/common_custom_data.d.cts +32 -5
  107. package/dist/types-cjs/types/config.d.cts +9 -0
  108. package/dist/types-cjs/types/event_filter.d.cts +17 -3
  109. package/dist/types-cjs/types/index.d.cts +1 -0
  110. package/dist/types-cjs/types/input.d.cts +3 -2
  111. package/dist/types-cjs/types/mainTypes.d.cts +2 -1
  112. package/dist/types-cjs/types/node.d.cts +33 -3
  113. package/dist/types-cjs/types/node_registration.d.cts +164 -12
  114. package/dist/types-cjs/types/output.d.cts +3 -2
  115. package/dist/types-cjs/types/webhook.d.cts +5 -2
  116. package/dist/types-cjs/utils/constants.d.cts +17 -1
  117. package/dist/types-cjs/utils/error/errorMessages.d.cts +11 -0
  118. package/dist/types-cjs/utils/validator/ConfigValidator.d.cts +1 -0
  119. package/package.json +11 -1
@@ -52,5 +52,6 @@ import { ESPRMAdminAPIStatistics } from "../ESPRMAdminAPIStatistics.js";
52
52
  import { ESPRMAdminMQTTStatistics } from "../ESPRMAdminMQTTStatistics.js";
53
53
  import { ESPRMAdminMatter } from "../ESPRMAdminMatter.js";
54
54
  import { ESPRMAdminNodeParams } from "../ESPRMAdminNodeParams.js";
55
+ import { ESPRMClaim } from "../ESPRMClaim.js";
55
56
  import "../methods/export.js";
56
- export { ESPRMAuth, ESPRMUser, ESPRMAdminUser, ESPRMAdminNode, ESPRMAdminOTAImage, ESPRMAdminOTAJob, ESPRMAdminGroup, ESPRMAdminTag, ESPRMAdminEventFilter, ESPRMAdminCustomData, ESPRMAdminRole, ESPRMAdminPolicy, ESPRMAdminUserRole, ESPRMAdminKey, ESPRMAdminSecureSign, ESPRMAdminFile, ESPRMAdminAPIInfo, ESPRMAdminDeploymentDetails, ESPRMAdminCognitoAppClient, ESPRMAdminCognitoDomain, ESPRMAdminIdentityProvider, ESPRMAdminMessageTemplate, ESPRMAdminDashboard, ESPRMAdminLicense, ESPRMAdminNodeRegistration, ESPRMAdminSuperAdmin, ESPRMAdminSenderEmail, ESPRMAdminCommonCustomData, ESPRMAdminDeploymentSetting, ESPRMAdminConfiguration, ESPRMAdminIoTDeviceRateLimit, ESPRMAdminAPIRateLimit, ESPRMAdminCustomMessageTemplate, ESPRMAdminMobilePlatform, ESPRMAdminPublishMessage, ESPRMAdminPassthrough, ESPRMAdminNodeCertificateCA, ESPRMAdminWebhook, ESPRMAdminStatisticalService, ESPRMAdminMailFailure, ESPRMAdminAPIGateway, ESPRMAdminTermsPolicy, ESPRMAdminCloudwatchLog, ESPRMAdminLogConfig, ESPRMAdminDeploymentCapability, ESPRMAdminAPIStatistics, ESPRMAdminMQTTStatistics, ESPRMAdminMatter, ESPRMAdminNodeParams, };
57
+ export { ESPRMAuth, ESPRMUser, ESPRMAdminUser, ESPRMAdminNode, ESPRMAdminOTAImage, ESPRMAdminOTAJob, ESPRMAdminGroup, ESPRMAdminTag, ESPRMAdminEventFilter, ESPRMAdminCustomData, ESPRMAdminRole, ESPRMAdminPolicy, ESPRMAdminUserRole, ESPRMAdminKey, ESPRMAdminSecureSign, ESPRMAdminFile, ESPRMAdminAPIInfo, ESPRMAdminDeploymentDetails, ESPRMAdminCognitoAppClient, ESPRMAdminCognitoDomain, ESPRMAdminIdentityProvider, ESPRMAdminMessageTemplate, ESPRMAdminDashboard, ESPRMAdminLicense, ESPRMAdminNodeRegistration, ESPRMAdminSuperAdmin, ESPRMAdminSenderEmail, ESPRMAdminCommonCustomData, ESPRMAdminDeploymentSetting, ESPRMAdminConfiguration, ESPRMAdminIoTDeviceRateLimit, ESPRMAdminAPIRateLimit, ESPRMAdminCustomMessageTemplate, ESPRMAdminMobilePlatform, ESPRMAdminPublishMessage, ESPRMAdminPassthrough, ESPRMAdminNodeCertificateCA, ESPRMAdminWebhook, ESPRMAdminStatisticalService, ESPRMAdminMailFailure, ESPRMAdminAPIGateway, ESPRMAdminTermsPolicy, ESPRMAdminCloudwatchLog, ESPRMAdminLogConfig, ESPRMAdminDeploymentCapability, ESPRMAdminAPIStatistics, ESPRMAdminMQTTStatistics, ESPRMAdminMatter, ESPRMAdminNodeParams, ESPRMClaim, };
@@ -3,6 +3,7 @@
3
3
  *
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
+ import type { ESPAPISuccessResponse } from "./api.js";
6
7
  /** Parameters for listing admin nodes. */
7
8
  export interface GetAdminNodesParams {
8
9
  /** Maximum number of records to return. */
@@ -34,11 +35,40 @@ export interface GetAdminNodesParams {
34
35
  }
35
36
  /** Parameters for activating or deactivating nodes. */
36
37
  export interface ActivateDeactivateNodesParams {
37
- /** ID of the node to activate or deactivate. */
38
- node_id: string;
39
- /** Whether to activate (true) or deactivate (false) the node. */
38
+ /**
39
+ * IDs of the nodes to activate or deactivate. At most
40
+ * `MAX_NODE_ACTIVATION_BATCH_SIZE` (25) per request.
41
+ */
42
+ node_ids: string[];
43
+ /** Whether to activate (true) or deactivate (false) the nodes. */
40
44
  activate: boolean;
41
45
  }
46
+ /** Per-node success entry in a 207 activation response. */
47
+ export interface NodeActivationSuccessResult {
48
+ node_id: string;
49
+ status: "success";
50
+ description: string;
51
+ }
52
+ /** Per-node failure entry in a 207 activation response. */
53
+ export interface NodeActivationFailureResult {
54
+ node_id: string;
55
+ status: "failure";
56
+ error_code: number;
57
+ description: string;
58
+ }
59
+ /**
60
+ * 207 Multi-Status response from `PUT admin/nodes`, returned when the
61
+ * per-node outcomes differ.
62
+ */
63
+ export interface NodeActivationMultiStatusResponse {
64
+ responses: Array<NodeActivationSuccessResult | NodeActivationFailureResult>;
65
+ }
66
+ /**
67
+ * Response from `activateDeactivateNodes`. When every node has the same
68
+ * outcome the backend returns a single 200 success; otherwise 207 with
69
+ * per-node results. A uniform failure rejects with `ESPAPIError`.
70
+ */
71
+ export type ActivateDeactivateNodesResponse = ESPAPISuccessResponse | NodeActivationMultiStatusResponse;
42
72
  /** Parameters for listing node tags or tag values. */
43
73
  export interface GetNodeTagsParams {
44
74
  /** Filter by tag name to retrieve its associated tag values. */
@@ -34,13 +34,73 @@ export interface GetNodeCertificatesParams {
34
34
  /** The maximum number of records to return. */
35
35
  num_records?: number;
36
36
  }
37
- /** Request body for registering node certificates. */
37
+ /** Parameters for fetching a pre-signed URL to upload a node certificates CSV. */
38
+ export interface GetNodeCertificateUploadUrlParams {
39
+ /** Name of the CSV file to upload. */
40
+ file_name: string;
41
+ }
42
+ /** Response containing the pre-signed upload URL for a node certificates CSV. */
43
+ export interface NodeCertificateUploadUrlResponse {
44
+ /** The API call status. */
45
+ status: string;
46
+ /** Pre-signed S3 PUT URL (valid for 1 hour). Upload without an `Authorization` header. */
47
+ url: string;
48
+ /** ID of the registration request; pass it to `registerNodeCertificates`. */
49
+ request_id: string;
50
+ }
51
+ /**
52
+ * Request body for registering node certificates from an uploaded CSV.
53
+ *
54
+ * Upload the CSV to the URL from `getNodeCertificateUploadUrl` first, then
55
+ * trigger the registration with the same `request_id`.
56
+ */
38
57
  export interface RegisterNodeCertificatesRequest {
39
- /** List of node IDs to register certificates for. */
40
- node_ids: string[];
41
- /** List of certificates corresponding to the node IDs. */
42
- certs: string[];
43
- [key: string]: unknown;
58
+ /** Name of the uploaded CSV file. */
59
+ file_name: string;
60
+ /** Hex MD5 digest of the uploaded CSV file. */
61
+ file_md5: string;
62
+ /** Request ID returned by `getNodeCertificateUploadUrl`. */
63
+ request_id: string;
64
+ /**
65
+ * The caller's refresh token. The backend requires it and uses it to add
66
+ * the registered nodes to their group.
67
+ */
68
+ refresh_token: string;
69
+ /** The node type. */
70
+ type?: string;
71
+ /** The node model. */
72
+ model?: string;
73
+ /** The node subtype. */
74
+ subtype?: string;
75
+ /**
76
+ * Group to add the nodes to. When omitted, the backend creates a group named
77
+ * after the type/model and the current date.
78
+ */
79
+ group_name?: string;
80
+ /** ID of the parent group when `group_name` is a subgroup. Takes precedence over `parent_group_name`. */
81
+ parent_group_id?: string;
82
+ /** Name of the parent group when `group_name` is a subgroup. */
83
+ parent_group_name?: string;
84
+ /**
85
+ * Comma-separated tags. Static tags are `key:value`; CSV-column tags are
86
+ * `key:@column` and take each node's value from that CSV column.
87
+ */
88
+ tags?: string;
89
+ /** Ignore duplicate node registrations and update existing certificates. */
90
+ force?: boolean;
91
+ /** Only update type, model, subtype and tags of existing nodes. Cannot be combined with `node_policies`. */
92
+ update_nodes?: boolean;
93
+ /** Comma-separated IoT policies to attach: `mqtt`, `videostream`. */
94
+ node_policies?: string;
95
+ /** The tenant ID, required when multi-tenancy is enabled. */
96
+ tenant_id?: string;
97
+ }
98
+ /** Response returned after triggering a node certificate registration. */
99
+ export interface RegisterNodeCertificatesResponse {
100
+ /** The API call status. */
101
+ status: string;
102
+ /** ID of the registration request. */
103
+ request_id: string;
44
104
  }
45
105
  /** Parameters for checking node certificate registration status. */
46
106
  export interface GetNodeCertificateRegistrationParams {
@@ -85,17 +145,109 @@ export interface GetNodeCertificatesResponse {
85
145
  /** The total number of certificates. */
86
146
  total?: number;
87
147
  }
88
- /** Response containing node certificate registration status. */
148
+ /**
149
+ * Response containing node certificate registration status.
150
+ *
151
+ * Unlike `getNodeRegistrationRequest`, this call checks the batch job and
152
+ * reports `failure` when it has died while the request was still `requested`.
153
+ */
89
154
  export interface NodeCertificateRegistrationStatusResponse {
90
- /** The registration request ID. */
91
- request_id?: string;
92
155
  /** The registration status. */
93
- status?: string;
94
- [key: string]: unknown;
156
+ status: NodeRegistrationRequestStatus;
157
+ /** Number of nodes registered so far. */
158
+ completed_count?: number;
159
+ /** Total number of nodes in the request. */
160
+ total_count?: number;
161
+ /** Failure reason, when the request failed. */
162
+ description?: string;
163
+ /** Nodes that failed to register, as reported by the backend. */
164
+ failed_registration?: string;
165
+ /** Name of the group the nodes are added to. */
166
+ group_name?: string;
167
+ /** ID of the group the nodes are added to. */
168
+ group_id?: string;
95
169
  }
96
- /** Response containing the MQTT host endpoint. */
170
+ /** Response containing the deployment's node endpoints. */
97
171
  export interface GetMQTTHostResponse {
98
172
  /** The MQTT broker host address. */
99
173
  mqtt_host?: string;
174
+ /** The AWS IoT credential provider endpoint (written to node NVS as `mqtt_cred_host`). */
175
+ mqtt_cred_host?: string;
176
+ /** The HTTPS node endpoint, when the deployment has one configured. */
177
+ https_host?: string;
100
178
  [key: string]: unknown;
101
179
  }
180
+ /**
181
+ * Status of a node certificate registration request.
182
+ *
183
+ * `failed` and `failure` both mean the request failed: the backend writes
184
+ * `failed` when submitting the batch job fails and `failure` when the batch
185
+ * job itself fails.
186
+ */
187
+ export type NodeRegistrationRequestStatus = "requested" | "in_progress" | "success" | "failed" | "failure";
188
+ /** Parameters for listing node certificate registration requests. */
189
+ export interface ListNodeRegistrationRequestsParams {
190
+ /** Filter results by request status. */
191
+ status?: NodeRegistrationRequestStatus;
192
+ /** The maximum number of records to return (the backend caps this at 25). */
193
+ num_records?: number;
194
+ /** The `next_id` from the previous response, to fetch the next page. */
195
+ start_id?: string;
196
+ }
197
+ /** A node certificate registration request, as returned in the list. */
198
+ export interface NodeRegistrationRequest {
199
+ /** The registration request ID. */
200
+ request_id: string;
201
+ /** The request status. */
202
+ status: NodeRegistrationRequestStatus;
203
+ /** Name of the uploaded certificates CSV file. */
204
+ file_name?: string;
205
+ /** Time the request was created, in epoch seconds. */
206
+ request_timestamp?: number;
207
+ /** Number of nodes registered so far. */
208
+ completed_count?: number;
209
+ /** Total number of nodes in the request. */
210
+ total_count?: number;
211
+ }
212
+ /** Response containing a page of node certificate registration requests. */
213
+ export interface ListNodeRegistrationRequestsResponse {
214
+ /** The API call status. */
215
+ status: string;
216
+ /** Registration requests, newest first. */
217
+ requests?: NodeRegistrationRequest[];
218
+ /** Pagination cursor for the next page; absent on the last page. */
219
+ next_id?: string;
220
+ }
221
+ /** Full detail of a single node certificate registration request. */
222
+ export interface NodeRegistrationRequestDetail extends NodeRegistrationRequest {
223
+ /** Pre-signed download URL of the original CSV (valid for 1 hour). */
224
+ url?: string;
225
+ /** Additional context from the backend, e.g. a batch job failure reason. */
226
+ additional_comments?: string;
227
+ /** Number of nodes that failed to register (omitted when 0). */
228
+ failed_registration_count?: number;
229
+ /** Name of the group the nodes were added to. */
230
+ group_name?: string;
231
+ /** ID of the group the nodes were added to. */
232
+ group_id?: string;
233
+ /** The node type. */
234
+ type?: string;
235
+ /** The node model. */
236
+ model?: string;
237
+ /** The node subtype. */
238
+ subtype?: string;
239
+ /** ID of the parent group. */
240
+ parent_group_id?: string;
241
+ /** Name of the parent group. */
242
+ parent_group_name?: string;
243
+ /** Comma-separated `key:value` tags applied to the nodes. */
244
+ tags?: string;
245
+ /** Whether existing registrations were overwritten. */
246
+ force?: boolean;
247
+ /** Whether existing nodes were updated. */
248
+ update_nodes?: boolean;
249
+ /** The tenant ID. */
250
+ tenant_id?: string;
251
+ /** Policies attached to the nodes. */
252
+ node_policies?: string;
253
+ }
@@ -10,7 +10,7 @@ export type { AdminNodeInfo, AdminNodeListResponse, GetNodeTagsResponse, NodeSta
10
10
  export type { OTAImageInfo, OTAImageRelatedFile, OTAImageCreateResponse, GetOTAImagesResponse, OTAImageUploadUrlResponse, ConfirmOTAImageUploadResponse, OTAPackageUploadUrlResponse, ConfirmOTAPackageUploadResponse, OTAJobInfo, OTAJobCreateResponse, OTAJobUpdateResponse, OTAJobRetriggerResponse, GetOTAJobsResponse, NodeOTAJobStatusEntry, OTAJobStatusResponse, OTAJobStatusSummaryResponse, } from "./ota.js";
11
11
  export type { AdminGroupInfo, CreateAdminGroupResponse, GetAdminGroupsResponse, } from "./group.js";
12
12
  export type { TagResourceInfo, GetAdminTagsResponse, GetTagNamesResponse, } from "./tag.js";
13
- export type { CommandRequestInfo, GetCommandRequestsResponse, AddCommandRequestResponse, } from "./command_response.js";
13
+ export type { CommandRequestInfo, GetCommandRequestsResponse, AddCommandRequestResponse, CancelCommandRequestsResponse, CommandRequestDataError, } from "./command_response.js";
14
14
  export type { EventFilterInfo, GetEventFiltersResponse } from "./event_filter.js";
15
15
  export type { TimeSeriesParamData, TimeSeriesNodeData, GetTimeSeriesDataResponse, GetSimpleTimeSeriesDataResponse, } from "./time_series.js";
16
16
  export type { CustomDataResponse } from "./custom_data.js";
@@ -29,7 +29,7 @@ export type { GetDashboardUpdateStatusResponse, GetDashboardVersionMappingRespon
29
29
  export type { LicenseFileInfo, GetLicenseFileResponse, GetLicenseQuotaResponse, } from "./license.js";
30
30
  export type { GenerateNodeIdsResponse, GetNodeIdsResponse, NodeCertificateInfo, GetNodeCertificatesResponse, NodeCertificateRegistrationStatusResponse, GetMQTTHostResponse, } from "./node_registration.js";
31
31
  export type { GetDeploymentDetailsResponse } from "./deployment_details.js";
32
- export type { GetCommonCustomDataResponse } from "./common_custom_data.js";
32
+ export type { CommonCustomDataItem, GetCommonCustomDataResponse, } from "./common_custom_data.js";
33
33
  export type { GetDeploymentSettingsResponse, GetRbacDeploymentSettingResponse, RbacConfigurationValue, } from "./deployment_setting.js";
34
34
  export type { GetNotificationsResponse } from "./configuration.js";
35
35
  export type { GetIoTDeviceRateRuleResponse } from "./iot_device_rate_limit.js";
@@ -38,6 +38,7 @@ export type { CustomMessageTemplateInfo, GetCustomMessageTemplatesResponse, } fr
38
38
  export type { MobilePlatformInfo, CreateMobilePlatformResponse, GetMobilePlatformsResponse, } from "./mobile_platform.js";
39
39
  export type { PassthroughConfigInfo, CreatePassthroughConfigResponse, GetPassthroughConfigResponse, } from "./passthrough.js";
40
40
  export type { GetNodeCACertificateResponse } from "./node_certificate_ca.js";
41
+ export type { InitiateClaimResponse, VerifyClaimResponse } from "./claim.js";
41
42
  export type { WebhookIntegrationInfo, GetWebhookIntegrationsResponse, WebhookEventMappingInfo, GetWebhookEventMappingResponse, } from "./webhook.js";
42
43
  export type { StatsCount, StatsObject, GetStatsInfoResponse, } from "./statistical_service.js";
43
44
  export type { MailFailureInfo, GetMailFailuresResponse } from "./mail_failure.js";
@@ -63,8 +63,11 @@ export interface WebhookIntegrationInfo {
63
63
  }
64
64
  /** Response containing a list of webhook integrations. */
65
65
  export interface GetWebhookIntegrationsResponse {
66
- /** Array of webhook integration details. */
67
- webhooks_endpoints?: WebhookIntegrationInfo[];
66
+ /**
67
+ * Array of webhook integration details.
68
+ * The backend returns `null` when no integrations are configured.
69
+ */
70
+ integration_info_list?: WebhookIntegrationInfo[] | null;
68
71
  }
69
72
  /** Details of a webhook event mapping. */
70
73
  export interface WebhookEventMappingInfo {
@@ -68,6 +68,7 @@ declare const APIEndpoints: {
68
68
  readonly ADMIN_NODE_IDS: "admin/node_ids";
69
69
  readonly ADMIN_NODE_CERTIFICATES: "admin/node_certificates";
70
70
  readonly ADMIN_NODE_CERTIFICATES_REGISTER: "admin/node_certificates/register";
71
+ readonly ADMIN_NODE_REGISTRATION_REQUESTS: "admin/node_registrations/requests";
71
72
  readonly ADMIN_API_STATS: "admin/api_stats";
72
73
  readonly ADMIN_MQTT_STATS: "admin/mqtt_stats";
73
74
  readonly ADMIN_CHANGE_SUPER_ADMIN: "admin/change_super_admin";
@@ -93,6 +94,8 @@ declare const APIEndpoints: {
93
94
  readonly ADMIN_MATTER_BATCH: "admin/matter/batch";
94
95
  readonly ADMIN_MATTER_BATCH_NODES: "admin/matter/batch/nodes";
95
96
  readonly ADMIN_MAIL_FAILURES: "admin/mail_failures";
97
+ readonly CLAIM_INITIATE: "claim/initiate";
98
+ readonly CLAIM_VERIFY: "claim/verify";
96
99
  };
97
100
  declare const StorageKeys: {
98
101
  readonly ACCESSTOKEN: "com.esprmbase.accessToken";
@@ -103,6 +106,8 @@ declare const ConfigErrorCodes: {
103
106
  readonly SDK_NOT_CONFIGURED: "SDK_NOT_CONFIGURED";
104
107
  readonly INVALID_CONFIG_OBJECT: "INVALID_CONFIG_OBJECT";
105
108
  readonly INVALID_BASE_URL: "INVALID_BASE_URL";
109
+ readonly INVALID_CLAIMING_BASE_URL: "INVALID_CLAIMING_BASE_URL";
110
+ readonly CLAIMING_NOT_CONFIGURED: "CLAIMING_NOT_CONFIGURED";
106
111
  };
107
112
  declare const ValidationErrorCodes: {
108
113
  readonly MISSING_LOGIN_PASSWORD: "MISSING_LOGIN_PASSWORD";
@@ -148,6 +153,15 @@ declare const APICallValidationErrorCodes: {
148
153
  readonly MISSING_PLATFORM_NAME: "MISSING_PLATFORM_NAME";
149
154
  readonly MISSING_PLATFORM_APPLICATION_ARN: "MISSING_PLATFORM_APPLICATION_ARN";
150
155
  readonly MISSING_BATCH_ID: "MISSING_BATCH_ID";
156
+ readonly MISSING_CANCEL_COMMAND_SCOPE: "MISSING_CANCEL_COMMAND_SCOPE";
157
+ readonly CMD_ID_REQUIRES_NODE_ID: "CMD_ID_REQUIRES_NODE_ID";
158
+ readonly MISSING_COMMON_CUSTOM_DATA_NAME: "MISSING_COMMON_CUSTOM_DATA_NAME";
159
+ readonly MISSING_COMMON_CUSTOM_DATA_VALUE: "MISSING_COMMON_CUSTOM_DATA_VALUE";
160
+ readonly MISSING_MAC_ADDRESS: "MISSING_MAC_ADDRESS";
161
+ readonly MISSING_CLAIM_PLATFORM: "MISSING_CLAIM_PLATFORM";
162
+ readonly MISSING_CSR: "MISSING_CSR";
163
+ readonly MISSING_NODE_IDS: "MISSING_NODE_IDS";
164
+ readonly TOO_MANY_NODE_IDS: "TOO_MANY_NODE_IDS";
151
165
  };
152
166
  declare const TokenErrorCodes: {
153
167
  readonly MISSING_ACCESS_TOKEN: "MISSING_ACCESS_TOKEN";
@@ -173,9 +187,11 @@ declare const DEFAULT_REST_API_VERSION = "v1";
173
187
  declare const DEFAULT_REQUEST_TIMEOUT_MS = 30000;
174
188
  /** Tokens expiring within this many seconds are refreshed proactively. */
175
189
  declare const TOKEN_EXPIRY_MARGIN_SECONDS = 30;
190
+ /** Backend limit on node IDs per `PUT admin/nodes` activation request. */
191
+ declare const MAX_NODE_ACTIVATION_BATCH_SIZE = 25;
176
192
  /** errorCode values the SDK itself sets on ESPAPIError for non-HTTP failures. */
177
193
  declare const APIErrorCodes: {
178
194
  readonly REQUEST_TIMEOUT: "REQUEST_TIMEOUT";
179
195
  readonly NETWORK_ERROR: "NETWORK_ERROR";
180
196
  };
181
- export { HTTPMethods, APIEndpoints, StorageKeys, ConfigErrorCodes, ValidationErrorCodes, StorageAdapterErrorCodes, APICallValidationErrorCodes, TokenErrorCodes, ErrorLabels, HTTPStatusCodes, AdditionalInfo, DEFAULT_REST_API_VERSION, DEFAULT_REQUEST_TIMEOUT_MS, TOKEN_EXPIRY_MARGIN_SECONDS, APIErrorCodes, };
197
+ export { HTTPMethods, APIEndpoints, StorageKeys, ConfigErrorCodes, ValidationErrorCodes, StorageAdapterErrorCodes, APICallValidationErrorCodes, TokenErrorCodes, ErrorLabels, HTTPStatusCodes, AdditionalInfo, DEFAULT_REST_API_VERSION, DEFAULT_REQUEST_TIMEOUT_MS, TOKEN_EXPIRY_MARGIN_SECONDS, APIErrorCodes, MAX_NODE_ACTIVATION_BATCH_SIZE, };
@@ -7,6 +7,8 @@ declare const configErrorMessages: {
7
7
  SDK_NOT_CONFIGURED: string;
8
8
  INVALID_CONFIG_OBJECT: string;
9
9
  INVALID_BASE_URL: string;
10
+ INVALID_CLAIMING_BASE_URL: string;
11
+ CLAIMING_NOT_CONFIGURED: string;
10
12
  };
11
13
  declare const validationErrorMessages: {
12
14
  MISSING_LOGIN_PASSWORD: string;
@@ -18,6 +20,8 @@ declare const storageAdapterErrorMessages: {
18
20
  };
19
21
  declare const apiCallValidationErrorMessages: {
20
22
  MISSING_NODE_ID: string;
23
+ MISSING_NODE_IDS: string;
24
+ TOO_MANY_NODE_IDS: string;
21
25
  MISSING_OTA_IMAGE_ID: string;
22
26
  MISSING_ARCHIVE_FLAG: string;
23
27
  MISSING_OTA_JOB_ID: string;
@@ -52,6 +56,13 @@ declare const apiCallValidationErrorMessages: {
52
56
  MISSING_PLATFORM_NAME: string;
53
57
  MISSING_PLATFORM_APPLICATION_ARN: string;
54
58
  MISSING_BATCH_ID: string;
59
+ MISSING_CANCEL_COMMAND_SCOPE: string;
60
+ CMD_ID_REQUIRES_NODE_ID: string;
61
+ MISSING_COMMON_CUSTOM_DATA_NAME: string;
62
+ MISSING_COMMON_CUSTOM_DATA_VALUE: string;
63
+ MISSING_MAC_ADDRESS: string;
64
+ MISSING_CLAIM_PLATFORM: string;
65
+ MISSING_CSR: string;
55
66
  };
56
67
  declare const tokenErrorMessages: {
57
68
  MISSING_ACCESS_TOKEN: string;
@@ -7,5 +7,6 @@ import { ESPRMBaseConfig } from "../../types/config.js";
7
7
  export declare class ConfigValidator {
8
8
  static validateConfig(config: ESPRMBaseConfig): void;
9
9
  private static validateConfigObject;
10
+ private static validateClaimingBaseUrl;
10
11
  private static validateBaseUrl;
11
12
  }
@@ -0,0 +1,12 @@
1
+ /*
2
+ * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Shell class for the standalone ESP RainMaker claiming service.
8
+ * Requires `claimingBaseUrl` in {@link ESPRMBase.configure}.
9
+ * Methods are added via prototype augmentation in methods/ESPRMClaim/*.
10
+ */
11
+ export declare class ESPRMClaim {
12
+ }
@@ -0,0 +1,7 @@
1
+ /*
2
+ * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import "../methods/ESPRMClaim/index.cjs";
7
+ export { ESPRMClaim } from "../ESPRMClaim.cjs";
@@ -0,0 +1,22 @@
1
+ /*
2
+ * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { DeleteCommonCustomDataRequest } from "../../types/common_custom_data.cjs";
7
+ import { ESPAPISuccessResponse } from "../../types/api.cjs";
8
+ declare module "../../ESPRMAdminCommonCustomData.cjs" {
9
+ interface ESPRMAdminCommonCustomData {
10
+ /**
11
+ * Deletes a common custom data entry.
12
+ *
13
+ * The backend has no DELETE method for this resource; an entry is deleted
14
+ * by sending `PUT admin/common_custom_data` with `value: null`.
15
+ *
16
+ * @param params - The name of the entry to delete.
17
+ * @returns A success response confirming the entry was deleted.
18
+ * @throws ESPAPICallValidationError when `name` is empty.
19
+ */
20
+ deleteCommonCustomData(params: DeleteCommonCustomDataRequest): Promise<ESPAPISuccessResponse>;
21
+ }
22
+ }
@@ -8,10 +8,15 @@ import { ESPAPISuccessResponse } from "../../types/api.cjs";
8
8
  declare module "../../ESPRMAdminCommonCustomData.cjs" {
9
9
  interface ESPRMAdminCommonCustomData {
10
10
  /**
11
- * Sets or updates common custom data shared across users.
11
+ * Adds or updates a common custom data entry shared across users.
12
+ *
13
+ * JSON object values are deep merged into the stored object; other value
14
+ * types replace it. See {@link SetCommonCustomDataRequest}.
12
15
  *
13
16
  * @param params - The common custom data payload to set.
14
17
  * @returns A success response confirming the data was set.
18
+ * @throws ESPAPICallValidationError when `name` is empty, or when `value`
19
+ * is `null` or `undefined` (the backend would delete the entry).
15
20
  */
16
21
  setCommonCustomData(params: SetCommonCustomDataRequest): Promise<ESPAPISuccessResponse>;
17
22
  }
@@ -5,3 +5,4 @@
5
5
  */
6
6
  import "./SetCommonCustomData.cjs";
7
7
  import "./GetCommonCustomData.cjs";
8
+ import "./DeleteCommonCustomData.cjs";
@@ -10,6 +10,11 @@ declare module "../../ESPRMAdminEventFilter.cjs" {
10
10
  /**
11
11
  * Updates an existing event filter configuration.
12
12
  *
13
+ * `enabled_for_integrations` adds or removes integrations instead of
14
+ * replacing the stored list; see {@link UpdateEventFilterRequest}. Omit it
15
+ * to change only `enabled`. Fails with error code `113109` when the
16
+ * mapping does not exist (this call never creates one).
17
+ *
13
18
  * @param params - The updated event filter properties.
14
19
  * @returns A success response confirming the event filter was updated.
15
20
  */
@@ -3,16 +3,19 @@
3
3
  *
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { ActivateDeactivateNodesParams } from "../../types/node.cjs";
7
- import { ESPAPISuccessResponse } from "../../types/api.cjs";
6
+ import { ActivateDeactivateNodesParams, ActivateDeactivateNodesResponse } from "../../types/node.cjs";
8
7
  declare module "../../ESPRMAdminNode.cjs" {
9
8
  interface ESPRMAdminNode {
10
9
  /**
11
- * Activates or deactivates nodes based on the provided parameters.
10
+ * Activates or deactivates up to 25 nodes in one request. Supported only
11
+ * on private (customer) deployments.
12
12
  *
13
- * @param params - Parameters specifying which nodes to activate or deactivate.
14
- * @returns A success response confirming the operation.
13
+ * The backend returns a single success when every node has the same
14
+ * outcome, and a 207 response with per-node results when they differ.
15
+ *
16
+ * @param params - Node IDs and whether to activate or deactivate them.
17
+ * @returns A success response, or per-node results on mixed outcomes.
15
18
  */
16
- activateDeactivateNodes(params: ActivateDeactivateNodesParams): Promise<ESPAPISuccessResponse>;
19
+ activateDeactivateNodes(params: ActivateDeactivateNodesParams): Promise<ActivateDeactivateNodesResponse>;
17
20
  }
18
21
  }
@@ -0,0 +1,22 @@
1
+ /*
2
+ * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { CancelCommandRequestsParams, CancelCommandRequestsResponse } from "../../types/command_response.cjs";
7
+ declare module "../../ESPRMAdminNode.cjs" {
8
+ interface ESPRMAdminNode {
9
+ /**
10
+ * Cancels pending (`requested` or `in_progress`) command requests created by any user.
11
+ *
12
+ * - `request_id`: cancels that request. The backend rejects the call (131020)
13
+ * when the request is no longer pending.
14
+ * - `node_id`: cancels every pending request for the node, optionally narrowed
15
+ * by `cmd_id`. Returns `total_cancelled: 0` when nothing matches.
16
+ *
17
+ * @param params - The cancel scope.
18
+ * @returns The number of requests that were cancelled.
19
+ */
20
+ cancelCommandRequests(params: CancelCommandRequestsParams): Promise<CancelCommandRequestsResponse>;
21
+ }
22
+ }
@@ -0,0 +1,19 @@
1
+ /*
2
+ * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ESPAPISuccessResponse } from "../../types/api.cjs";
7
+ declare module "../../ESPRMAdminNode.cjs" {
8
+ interface ESPRMAdminNode {
9
+ /**
10
+ * Permanently deletes a node: its IoT certificates and thing, its data,
11
+ * and its user and group mappings. Cannot be undone. Supported only on
12
+ * public deployments; the backend accepts one node per request.
13
+ *
14
+ * @param nodeId - The ID of the node to delete.
15
+ * @returns A success response confirming the node was deleted.
16
+ */
17
+ deleteNode(nodeId: string): Promise<ESPAPISuccessResponse>;
18
+ }
19
+ }
@@ -7,8 +7,10 @@ import "./GetNodes.cjs";
7
7
  import "./ActivateDeactivateNodes.cjs";
8
8
  import "./AttachNodeTags.cjs";
9
9
  import "./RemoveNodeTags.cjs";
10
+ import "./DeleteNode.cjs";
10
11
  import "./GetNodeTags.cjs";
11
12
  import "./GetCommandRequests.cjs";
12
13
  import "./AddCommandRequest.cjs";
14
+ import "./CancelCommandRequests.cjs";
13
15
  import "./GetTimeSeriesData.cjs";
14
16
  import "./GetSimpleTimeSeriesData.cjs";
@@ -7,9 +7,10 @@ import { GetMQTTHostResponse } from "../../types/node_registration.cjs";
7
7
  declare module "../../ESPRMAdminNodeRegistration.cjs" {
8
8
  interface ESPRMAdminNodeRegistration {
9
9
  /**
10
- * Retrieves the default MQTT host endpoint for the deployment.
10
+ * Retrieves the deployment's default node endpoints: the MQTT host, the
11
+ * IoT credential provider host and, when configured, the HTTPS host.
11
12
  *
12
- * @returns The MQTT host information.
13
+ * @returns The node endpoint information.
13
14
  */
14
15
  getMQTTHost(): Promise<GetMQTTHostResponse>;
15
16
  }
@@ -0,0 +1,18 @@
1
+ /*
2
+ * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { GetNodeCertificateUploadUrlParams, NodeCertificateUploadUrlResponse } from "../../types/node_registration.cjs";
7
+ declare module "../../ESPRMAdminNodeRegistration.cjs" {
8
+ interface ESPRMAdminNodeRegistration {
9
+ /**
10
+ * Fetches a pre-signed URL to upload a node certificates CSV, along with
11
+ * the request ID to pass to `registerNodeCertificates`.
12
+ *
13
+ * @param params - Must include the name of the CSV file.
14
+ * @returns The pre-signed upload URL and the registration request ID.
15
+ */
16
+ getNodeCertificateUploadUrl(params: GetNodeCertificateUploadUrlParams): Promise<NodeCertificateUploadUrlResponse>;
17
+ }
18
+ }
@@ -0,0 +1,17 @@
1
+ /*
2
+ * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { NodeRegistrationRequestDetail } from "../../types/node_registration.cjs";
7
+ declare module "../../ESPRMAdminNodeRegistration.cjs" {
8
+ interface ESPRMAdminNodeRegistration {
9
+ /**
10
+ * Retrieves the full detail of a node certificate registration request.
11
+ *
12
+ * @param requestId - The ID of the registration request.
13
+ * @returns The registration request detail.
14
+ */
15
+ getNodeRegistrationRequest(requestId: string): Promise<NodeRegistrationRequestDetail>;
16
+ }
17
+ }
@@ -0,0 +1,19 @@
1
+ /*
2
+ * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { ListNodeRegistrationRequestsParams } from "../../types/node_registration.cjs";
7
+ import { ListNodeRegistrationRequestsResponse } from "../../types/node_registration.cjs";
8
+ declare module "../../ESPRMAdminNodeRegistration.cjs" {
9
+ interface ESPRMAdminNodeRegistration {
10
+ /**
11
+ * Lists the node certificate registration requests of the signed-in
12
+ * admin, newest first.
13
+ *
14
+ * @param params - Optional status filter and pagination.
15
+ * @returns A page of registration requests.
16
+ */
17
+ listNodeRegistrationRequests(params?: ListNodeRegistrationRequestsParams): Promise<ListNodeRegistrationRequestsResponse>;
18
+ }
19
+ }