@apocaliss92/nodedreame 1.4.0 → 1.5.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.
package/dist/index.d.cts CHANGED
@@ -1289,6 +1289,19 @@ declare class VacuumDevice extends BaseDevice<VacuumDeviceEvents> {
1289
1289
  * forwarded verbatim.
1290
1290
  */
1291
1291
  fetchLatestMap(opts?: Omit<VacuumGetMapInput, 'filename'>): Promise<VacuumMap | null>;
1292
+ /**
1293
+ * Seed {@link mapFilename} from the CLOUD SHADOW (the last value the robot
1294
+ * pushed for siid 6 piid 3) WITHOUT waking it — so a docked/idle robot can
1295
+ * surface its LAST cleaning map without a fresh clean. Emits the usual
1296
+ * `propertyChanged`/`stateChanged` (so a map-watching consumer re-renders) and
1297
+ * returns the resolved {@link mapFilename} (null when the model has no map or
1298
+ * the shadow carries no map path yet).
1299
+ *
1300
+ * NOTE: the shadow holds the last LIVE-PATH filename; its OSS blob may have
1301
+ * expired, in which case a follow-up {@link fetchLatestMap} rejects — treat
1302
+ * that as "no saved map available".
1303
+ */
1304
+ refreshSavedMapFilename(): Promise<string | null>;
1292
1305
  /**
1293
1306
  * The current room/segment id, derived from the most-recently-decoded map's
1294
1307
  * active-segment set (`sa`). `null` when no map has been fetched or no
package/dist/index.d.ts CHANGED
@@ -1289,6 +1289,19 @@ declare class VacuumDevice extends BaseDevice<VacuumDeviceEvents> {
1289
1289
  * forwarded verbatim.
1290
1290
  */
1291
1291
  fetchLatestMap(opts?: Omit<VacuumGetMapInput, 'filename'>): Promise<VacuumMap | null>;
1292
+ /**
1293
+ * Seed {@link mapFilename} from the CLOUD SHADOW (the last value the robot
1294
+ * pushed for siid 6 piid 3) WITHOUT waking it — so a docked/idle robot can
1295
+ * surface its LAST cleaning map without a fresh clean. Emits the usual
1296
+ * `propertyChanged`/`stateChanged` (so a map-watching consumer re-renders) and
1297
+ * returns the resolved {@link mapFilename} (null when the model has no map or
1298
+ * the shadow carries no map path yet).
1299
+ *
1300
+ * NOTE: the shadow holds the last LIVE-PATH filename; its OSS blob may have
1301
+ * expired, in which case a follow-up {@link fetchLatestMap} rejects — treat
1302
+ * that as "no saved map available".
1303
+ */
1304
+ refreshSavedMapFilename(): Promise<string | null>;
1292
1305
  /**
1293
1306
  * The current room/segment id, derived from the most-recently-decoded map's
1294
1307
  * active-segment set (`sa`). `null` when no map has been fetched or no
package/dist/index.js CHANGED
@@ -2839,6 +2839,23 @@ var VacuumDevice = class _VacuumDevice extends BaseDevice {
2839
2839
  if (filename === null) return null;
2840
2840
  return this.getMap({ filename, ...opts });
2841
2841
  }
2842
+ /**
2843
+ * Seed {@link mapFilename} from the CLOUD SHADOW (the last value the robot
2844
+ * pushed for siid 6 piid 3) WITHOUT waking it — so a docked/idle robot can
2845
+ * surface its LAST cleaning map without a fresh clean. Emits the usual
2846
+ * `propertyChanged`/`stateChanged` (so a map-watching consumer re-renders) and
2847
+ * returns the resolved {@link mapFilename} (null when the model has no map or
2848
+ * the shadow carries no map path yet).
2849
+ *
2850
+ * NOTE: the shadow holds the last LIVE-PATH filename; its OSS blob may have
2851
+ * expired, in which case a follow-up {@link fetchLatestMap} rejects — treat
2852
+ * that as "no saved map available".
2853
+ */
2854
+ async refreshSavedMapFilename() {
2855
+ if (!this.#caps.canMap) return null;
2856
+ await this.refreshCachedProperties([VACUUM_PROP.MAP_PATH]);
2857
+ return this.mapFilename;
2858
+ }
2842
2859
  /**
2843
2860
  * The current room/segment id, derived from the most-recently-decoded map's
2844
2861
  * active-segment set (`sa`). `null` when no map has been fetched or no