From 9f319dabaab707c1f4602d417d5d88dce60070f9 Mon Sep 17 00:00:00 2001 From: Hugo Montero Date: Mon, 22 Sep 2025 08:23:55 -0600 Subject: [PATCH 1/2] add downloadManufacturingBackup command to wrap api-service method --- src/Particle.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/Particle.js b/src/Particle.js index f004fbf2..a034b9e1 100644 --- a/src/Particle.js +++ b/src/Particle.js @@ -1717,6 +1717,26 @@ class Particle { }); } + /** + * Download a tachyon manufacturing backup files + * @param {Object} options Options for this API call + * @param {Number} options.deviceId Device ID + * @param {String} [options.auth] The access token. Can be ignored if provided in constructor + * @param {Object} [options.headers] Key/Value pairs like `{ 'X-FOO': 'foo', X-BAR: 'bar' }` to send as headers. + * @param {Object} [options.context] Request context + * @returns {Promise} A promise with a zip file that contains all manufacturing backup files for the specific device. + */ + downloadManufacturingBackup({ deviceId, auth, headers, context }) { + return this.request({ + uri:`/v1/devices/${deviceId}/backup_files`, + method: 'put', + auth, + headers, + context, + isBuffer: true + }); + } + /** * Release a product firmware version as the default version * @param {Object} options Options for this API call From 338fae4ebe9dddbde3fda7df054edb5a7da52cdd Mon Sep 17 00:00:00 2001 From: Hugo Montero Date: Mon, 22 Sep 2025 08:31:17 -0600 Subject: [PATCH 2/2] fix lint --- src/Particle.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Particle.js b/src/Particle.js index a034b9e1..b5f68c65 100644 --- a/src/Particle.js +++ b/src/Particle.js @@ -1717,7 +1717,7 @@ class Particle { }); } - /** + /** * Download a tachyon manufacturing backup files * @param {Object} options Options for this API call * @param {Number} options.deviceId Device ID @@ -1726,16 +1726,16 @@ class Particle { * @param {Object} [options.context] Request context * @returns {Promise} A promise with a zip file that contains all manufacturing backup files for the specific device. */ - downloadManufacturingBackup({ deviceId, auth, headers, context }) { - return this.request({ - uri:`/v1/devices/${deviceId}/backup_files`, - method: 'put', - auth, - headers, - context, - isBuffer: true - }); - } + downloadManufacturingBackup({ deviceId, auth, headers, context }) { + return this.request({ + uri:`/v1/devices/${deviceId}/backup_files`, + method: 'put', + auth, + headers, + context, + isBuffer: true + }); + } /** * Release a product firmware version as the default version