@espressif/rainmaker-admin-sdk 1.3.0 → 1.3.1
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.
- package/CHANGELOG.md +26 -0
- package/dist/types/methods/ESPRMAdminOTAJob/GetJob.d.ts +12 -3
- package/dist/types/types/input.d.ts +1 -1
- package/dist/types/types/ota.d.ts +42 -8
- package/dist/types-cjs/methods/ESPRMAdminOTAJob/GetJob.d.cts +12 -3
- package/dist/types-cjs/types/input.d.cts +1 -1
- package/dist/types-cjs/types/ota.d.cts +42 -8
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,32 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) and follows the [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) format.
|
|
5
5
|
|
|
6
|
+
## [1.3.1] - 2026-10-07
|
|
7
|
+
|
|
8
|
+
Patch release that corrects the OTA job list types in `ESPRMAdminOTAJob.getJob`
|
|
9
|
+
to match what the backend accepts and returns. No runtime behaviour changes:
|
|
10
|
+
the SDK already forwarded every query parameter and returned the backend's
|
|
11
|
+
response as-is. Only the types were wrong.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- `GetOTAJobParams` now declares the filters the backend accepts:
|
|
16
|
+
`ota_job_name` (case-sensitive "contains" search), `ota_image_id`,
|
|
17
|
+
`archived` and `all`. Callers no longer need a cast to search.
|
|
18
|
+
- `GetOTAJobsResponse.otaJobs`, the key the backend actually returns the job
|
|
19
|
+
list under.
|
|
20
|
+
- `GetOTAJobByIdParams` and a `getJob({ ota_job_id })` overload that returns
|
|
21
|
+
`OTAJobInfo`. The backend answers an ID lookup with the job itself, not a
|
|
22
|
+
list.
|
|
23
|
+
|
|
24
|
+
### Deprecated
|
|
25
|
+
|
|
26
|
+
- `GetOTAJobsResponse.ota_update_jobs` and `GetOTAJobsResponse.total`. The
|
|
27
|
+
backend has never returned either; read `otaJobs` instead. Both will be
|
|
28
|
+
removed in the next minor release.
|
|
29
|
+
- `GetOTAJobParams.ota_job_id`. Pass `GetOTAJobByIdParams` to get the
|
|
30
|
+
correctly typed single-job response.
|
|
31
|
+
|
|
6
32
|
## [1.3.0] - 2026-10-06
|
|
7
33
|
|
|
8
34
|
Minor release that adds node deletion, node claiming through the standalone
|
|
@@ -3,12 +3,21 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { GetOTAJobParams } from "../../types/ota.js";
|
|
7
|
-
import { GetOTAJobsResponse } from "../../types/ota.js";
|
|
6
|
+
import { GetOTAJobByIdParams, GetOTAJobParams, GetOTAJobsResponse, OTAJobInfo } from "../../types/ota.js";
|
|
8
7
|
declare module "../../ESPRMAdminOTAJob.js" {
|
|
9
8
|
interface ESPRMAdminOTAJob {
|
|
10
9
|
/**
|
|
11
|
-
* Retrieves
|
|
10
|
+
* Retrieves a single OTA job by ID.
|
|
11
|
+
*
|
|
12
|
+
* @param params - The ID of the job to fetch.
|
|
13
|
+
* @returns The OTA job. The backend returns the job itself, not a list.
|
|
14
|
+
*/
|
|
15
|
+
getJob(params: GetOTAJobByIdParams): Promise<OTAJobInfo>;
|
|
16
|
+
/**
|
|
17
|
+
* Retrieves a page of OTA jobs, optionally filtered by name or image.
|
|
18
|
+
*
|
|
19
|
+
* When nothing matches, the backend rejects with HTTP 404 and error code
|
|
20
|
+
* `105012` rather than returning an empty list.
|
|
12
21
|
*
|
|
13
22
|
* @param params - Optional query parameters to filter the job list.
|
|
14
23
|
* @returns The list of OTA jobs matching the specified criteria.
|
|
@@ -8,7 +8,7 @@ export type { ESPRMBaseConfig, ESPRMAPIManagerConfig, UserTokensData } from "./c
|
|
|
8
8
|
export type { SignUpRequest, ConfirmUserRequest, ChangePasswordRequest, ForgotPasswordRequest, ForgotPasswordConfirmRequest, LogoutRequest, UpdateUserProfileRequest, DeleteAccountParams, } from "./auth.js";
|
|
9
9
|
export type { CreateAdminUserRequest, UpdateAdminUserRequest, GetAdminUsersParams, DeleteAdminUserParams, } from "./admin_user.js";
|
|
10
10
|
export type { GetAdminNodesParams, ActivateDeactivateNodesParams, GetNodeTagsParams, NodeAttachTagsRequest, } from "./node.js";
|
|
11
|
-
export type { CreateOTAImageRequest, GetOTAImagesParams, ArchiveOTAImageParams, DeleteOTAImageParams, GetOTAImageUploadUrlParams, ConfirmOTAImageUploadRequest, GetOTAPackageUploadUrlParams, ConfirmOTAPackageUploadRequest, CreateOTAJobRequest, CreateOTAJobQueryOptions, OtaJobDownloadWindow, OtaJobValidity, OtaJobMetadata, OtaSecureBoot, OtaNetworkSerialisation, GetOTAJobParams, UpdateOTAJobParams, CancelOTAJobRequest, ArchiveOTAJobRequest, GetOTAJobStatusParams, GetOTAJobStatusSummaryParams, RetriggerOTAJobRequest, } from "./ota.js";
|
|
11
|
+
export type { CreateOTAImageRequest, GetOTAImagesParams, ArchiveOTAImageParams, DeleteOTAImageParams, GetOTAImageUploadUrlParams, ConfirmOTAImageUploadRequest, GetOTAPackageUploadUrlParams, ConfirmOTAPackageUploadRequest, CreateOTAJobRequest, CreateOTAJobQueryOptions, OtaJobDownloadWindow, OtaJobValidity, OtaJobMetadata, OtaSecureBoot, OtaNetworkSerialisation, GetOTAJobParams, GetOTAJobByIdParams, UpdateOTAJobParams, CancelOTAJobRequest, ArchiveOTAJobRequest, GetOTAJobStatusParams, GetOTAJobStatusSummaryParams, RetriggerOTAJobRequest, } from "./ota.js";
|
|
12
12
|
export type { CreateAdminGroupRequest, UpdateAdminGroupRequest, GetAdminGroupsParams, } from "./group.js";
|
|
13
13
|
export type { GetAdminTagsParams, AttachDetachTagsParams, GetTagNamesParams, } from "./tag.js";
|
|
14
14
|
export type { GetCommandRequestsParams, AddCommandRequestBody, CancelCommandRequestsParams, CommandRequestStatus, } from "./command_response.js";
|
|
@@ -159,14 +159,40 @@ export interface CreateOTAJobQueryOptions {
|
|
|
159
159
|
/** Serialise OTA delivery per local network. */
|
|
160
160
|
network_serialised?: boolean;
|
|
161
161
|
}
|
|
162
|
-
/**
|
|
162
|
+
/**
|
|
163
|
+
* Parameters for listing or searching OTA jobs.
|
|
164
|
+
*
|
|
165
|
+
* Without a filter the backend returns a page of jobs, scoped by `archived`
|
|
166
|
+
* and `all`. `ota_job_name` and `ota_image_id` switch it to a search.
|
|
167
|
+
*/
|
|
163
168
|
export interface GetOTAJobParams {
|
|
164
|
-
/**
|
|
169
|
+
/**
|
|
170
|
+
* Filter by specific OTA job ID.
|
|
171
|
+
*
|
|
172
|
+
* @deprecated The backend answers an ID lookup with a single job, not a
|
|
173
|
+
* list. Pass {@link GetOTAJobByIdParams} so `getJob` returns `OTAJobInfo`.
|
|
174
|
+
*/
|
|
165
175
|
ota_job_id?: string;
|
|
166
|
-
/**
|
|
176
|
+
/**
|
|
177
|
+
* Return jobs whose name contains this text. Case-sensitive. Covers archived
|
|
178
|
+
* and unarchived jobs alike: `archived` and `all` are ignored.
|
|
179
|
+
*/
|
|
180
|
+
ota_job_name?: string;
|
|
181
|
+
/** Return every job created from this OTA image. Honours `archived`. */
|
|
182
|
+
ota_image_id?: string;
|
|
183
|
+
/** Maximum number of records to return (backend default and maximum: 25). */
|
|
167
184
|
num_records?: string;
|
|
168
|
-
/** Job ID to start pagination from. */
|
|
185
|
+
/** Job ID to start pagination from (the previous page's `next_id`). */
|
|
169
186
|
start_id?: string;
|
|
187
|
+
/** List archived jobs instead of unarchived ones. Defaults to `false`. */
|
|
188
|
+
archived?: boolean;
|
|
189
|
+
/** List archived and unarchived jobs together. Defaults to `false`. */
|
|
190
|
+
all?: boolean;
|
|
191
|
+
}
|
|
192
|
+
/** Parameters for fetching a single OTA job by ID. */
|
|
193
|
+
export interface GetOTAJobByIdParams {
|
|
194
|
+
/** ID of the OTA job to fetch. */
|
|
195
|
+
ota_job_id: string;
|
|
170
196
|
}
|
|
171
197
|
/** Parameters for updating an OTA job. */
|
|
172
198
|
export interface UpdateOTAJobParams {
|
|
@@ -368,11 +394,19 @@ export interface OTAJobRetriggerResponse {
|
|
|
368
394
|
}
|
|
369
395
|
/** Paginated response containing a list of OTA jobs. */
|
|
370
396
|
export interface GetOTAJobsResponse {
|
|
371
|
-
/**
|
|
372
|
-
|
|
373
|
-
/** ID to use for fetching the next page. */
|
|
397
|
+
/** OTA jobs on this page. */
|
|
398
|
+
otaJobs?: OTAJobInfo[];
|
|
399
|
+
/** ID to use for fetching the next page. Absent on the last page. */
|
|
374
400
|
next_id?: string;
|
|
375
|
-
/**
|
|
401
|
+
/**
|
|
402
|
+
* @deprecated Never returned by the backend; read `otaJobs` instead.
|
|
403
|
+
* Will be removed in the next minor release.
|
|
404
|
+
*/
|
|
405
|
+
ota_update_jobs?: OTAJobInfo[];
|
|
406
|
+
/**
|
|
407
|
+
* @deprecated Never returned by the backend. Will be removed in the next
|
|
408
|
+
* minor release.
|
|
409
|
+
*/
|
|
376
410
|
total?: number;
|
|
377
411
|
}
|
|
378
412
|
/** Per-node OTA status row (GET admin/otajob/status). */
|
|
@@ -3,12 +3,21 @@
|
|
|
3
3
|
*
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
import { GetOTAJobParams } from "../../types/ota.cjs";
|
|
7
|
-
import { GetOTAJobsResponse } from "../../types/ota.cjs";
|
|
6
|
+
import { GetOTAJobByIdParams, GetOTAJobParams, GetOTAJobsResponse, OTAJobInfo } from "../../types/ota.cjs";
|
|
8
7
|
declare module "../../ESPRMAdminOTAJob.cjs" {
|
|
9
8
|
interface ESPRMAdminOTAJob {
|
|
10
9
|
/**
|
|
11
|
-
* Retrieves
|
|
10
|
+
* Retrieves a single OTA job by ID.
|
|
11
|
+
*
|
|
12
|
+
* @param params - The ID of the job to fetch.
|
|
13
|
+
* @returns The OTA job. The backend returns the job itself, not a list.
|
|
14
|
+
*/
|
|
15
|
+
getJob(params: GetOTAJobByIdParams): Promise<OTAJobInfo>;
|
|
16
|
+
/**
|
|
17
|
+
* Retrieves a page of OTA jobs, optionally filtered by name or image.
|
|
18
|
+
*
|
|
19
|
+
* When nothing matches, the backend rejects with HTTP 404 and error code
|
|
20
|
+
* `105012` rather than returning an empty list.
|
|
12
21
|
*
|
|
13
22
|
* @param params - Optional query parameters to filter the job list.
|
|
14
23
|
* @returns The list of OTA jobs matching the specified criteria.
|
|
@@ -8,7 +8,7 @@ export type { ESPRMBaseConfig, ESPRMAPIManagerConfig, UserTokensData } from "./c
|
|
|
8
8
|
export type { SignUpRequest, ConfirmUserRequest, ChangePasswordRequest, ForgotPasswordRequest, ForgotPasswordConfirmRequest, LogoutRequest, UpdateUserProfileRequest, DeleteAccountParams, } from "./auth.cjs";
|
|
9
9
|
export type { CreateAdminUserRequest, UpdateAdminUserRequest, GetAdminUsersParams, DeleteAdminUserParams, } from "./admin_user.cjs";
|
|
10
10
|
export type { GetAdminNodesParams, ActivateDeactivateNodesParams, GetNodeTagsParams, NodeAttachTagsRequest, } from "./node.cjs";
|
|
11
|
-
export type { CreateOTAImageRequest, GetOTAImagesParams, ArchiveOTAImageParams, DeleteOTAImageParams, GetOTAImageUploadUrlParams, ConfirmOTAImageUploadRequest, GetOTAPackageUploadUrlParams, ConfirmOTAPackageUploadRequest, CreateOTAJobRequest, CreateOTAJobQueryOptions, OtaJobDownloadWindow, OtaJobValidity, OtaJobMetadata, OtaSecureBoot, OtaNetworkSerialisation, GetOTAJobParams, UpdateOTAJobParams, CancelOTAJobRequest, ArchiveOTAJobRequest, GetOTAJobStatusParams, GetOTAJobStatusSummaryParams, RetriggerOTAJobRequest, } from "./ota.cjs";
|
|
11
|
+
export type { CreateOTAImageRequest, GetOTAImagesParams, ArchiveOTAImageParams, DeleteOTAImageParams, GetOTAImageUploadUrlParams, ConfirmOTAImageUploadRequest, GetOTAPackageUploadUrlParams, ConfirmOTAPackageUploadRequest, CreateOTAJobRequest, CreateOTAJobQueryOptions, OtaJobDownloadWindow, OtaJobValidity, OtaJobMetadata, OtaSecureBoot, OtaNetworkSerialisation, GetOTAJobParams, GetOTAJobByIdParams, UpdateOTAJobParams, CancelOTAJobRequest, ArchiveOTAJobRequest, GetOTAJobStatusParams, GetOTAJobStatusSummaryParams, RetriggerOTAJobRequest, } from "./ota.cjs";
|
|
12
12
|
export type { CreateAdminGroupRequest, UpdateAdminGroupRequest, GetAdminGroupsParams, } from "./group.cjs";
|
|
13
13
|
export type { GetAdminTagsParams, AttachDetachTagsParams, GetTagNamesParams, } from "./tag.cjs";
|
|
14
14
|
export type { GetCommandRequestsParams, AddCommandRequestBody, CancelCommandRequestsParams, CommandRequestStatus, } from "./command_response.cjs";
|
|
@@ -159,14 +159,40 @@ export interface CreateOTAJobQueryOptions {
|
|
|
159
159
|
/** Serialise OTA delivery per local network. */
|
|
160
160
|
network_serialised?: boolean;
|
|
161
161
|
}
|
|
162
|
-
/**
|
|
162
|
+
/**
|
|
163
|
+
* Parameters for listing or searching OTA jobs.
|
|
164
|
+
*
|
|
165
|
+
* Without a filter the backend returns a page of jobs, scoped by `archived`
|
|
166
|
+
* and `all`. `ota_job_name` and `ota_image_id` switch it to a search.
|
|
167
|
+
*/
|
|
163
168
|
export interface GetOTAJobParams {
|
|
164
|
-
/**
|
|
169
|
+
/**
|
|
170
|
+
* Filter by specific OTA job ID.
|
|
171
|
+
*
|
|
172
|
+
* @deprecated The backend answers an ID lookup with a single job, not a
|
|
173
|
+
* list. Pass {@link GetOTAJobByIdParams} so `getJob` returns `OTAJobInfo`.
|
|
174
|
+
*/
|
|
165
175
|
ota_job_id?: string;
|
|
166
|
-
/**
|
|
176
|
+
/**
|
|
177
|
+
* Return jobs whose name contains this text. Case-sensitive. Covers archived
|
|
178
|
+
* and unarchived jobs alike: `archived` and `all` are ignored.
|
|
179
|
+
*/
|
|
180
|
+
ota_job_name?: string;
|
|
181
|
+
/** Return every job created from this OTA image. Honours `archived`. */
|
|
182
|
+
ota_image_id?: string;
|
|
183
|
+
/** Maximum number of records to return (backend default and maximum: 25). */
|
|
167
184
|
num_records?: string;
|
|
168
|
-
/** Job ID to start pagination from. */
|
|
185
|
+
/** Job ID to start pagination from (the previous page's `next_id`). */
|
|
169
186
|
start_id?: string;
|
|
187
|
+
/** List archived jobs instead of unarchived ones. Defaults to `false`. */
|
|
188
|
+
archived?: boolean;
|
|
189
|
+
/** List archived and unarchived jobs together. Defaults to `false`. */
|
|
190
|
+
all?: boolean;
|
|
191
|
+
}
|
|
192
|
+
/** Parameters for fetching a single OTA job by ID. */
|
|
193
|
+
export interface GetOTAJobByIdParams {
|
|
194
|
+
/** ID of the OTA job to fetch. */
|
|
195
|
+
ota_job_id: string;
|
|
170
196
|
}
|
|
171
197
|
/** Parameters for updating an OTA job. */
|
|
172
198
|
export interface UpdateOTAJobParams {
|
|
@@ -368,11 +394,19 @@ export interface OTAJobRetriggerResponse {
|
|
|
368
394
|
}
|
|
369
395
|
/** Paginated response containing a list of OTA jobs. */
|
|
370
396
|
export interface GetOTAJobsResponse {
|
|
371
|
-
/**
|
|
372
|
-
|
|
373
|
-
/** ID to use for fetching the next page. */
|
|
397
|
+
/** OTA jobs on this page. */
|
|
398
|
+
otaJobs?: OTAJobInfo[];
|
|
399
|
+
/** ID to use for fetching the next page. Absent on the last page. */
|
|
374
400
|
next_id?: string;
|
|
375
|
-
/**
|
|
401
|
+
/**
|
|
402
|
+
* @deprecated Never returned by the backend; read `otaJobs` instead.
|
|
403
|
+
* Will be removed in the next minor release.
|
|
404
|
+
*/
|
|
405
|
+
ota_update_jobs?: OTAJobInfo[];
|
|
406
|
+
/**
|
|
407
|
+
* @deprecated Never returned by the backend. Will be removed in the next
|
|
408
|
+
* minor release.
|
|
409
|
+
*/
|
|
376
410
|
total?: number;
|
|
377
411
|
}
|
|
378
412
|
/** Per-node OTA status row (GET admin/otajob/status). */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@espressif/rainmaker-admin-sdk",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Espressif's Rainmaker Admin SDK enables seamless integration of admin applications with the ESP Rainmaker ecosystem.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Espressif Systems (Shanghai) CO LTD",
|