@balena/open-balena-api 27.0.0-build-state-get-release-b82452363aba8cbd3639228daf3b544733838dd1-1 → 27.1.0-build-644-last-api-heartbeat-state-change-event-a28dfa80d59485962f8d7f04dfbd36f443b63e2f-1

Sign up to get free protection for your applications and to get access to all the features.
@@ -682,6 +682,7 @@ export interface Device {
682
682
  __id: Actor['Read']['id'];
683
683
  } | [Actor['Read']];
684
684
  api_heartbeat_state: 'online' | 'offline' | 'timeout' | 'unknown';
685
+ changed_api_heartbeat_state_on__date: Types['Date Time']['Read'] | null;
685
686
  uuid: Types['Text']['Read'];
686
687
  local_id: Types['Short Text']['Read'] | null;
687
688
  device_name: Types['Short Text']['Read'] | null;
@@ -763,6 +764,7 @@ export interface Device {
763
764
  id: Types['Serial']['Write'];
764
765
  actor: Actor['Write']['id'];
765
766
  api_heartbeat_state: 'online' | 'offline' | 'timeout' | 'unknown';
767
+ changed_api_heartbeat_state_on__date: Types['Date Time']['Write'] | null;
766
768
  uuid: Types['Text']['Write'];
767
769
  local_id: Types['Short Text']['Write'] | null;
768
770
  device_name: Types['Short Text']['Write'] | null;
package/dist/balena.sbvr CHANGED
@@ -374,6 +374,9 @@ Term: device
374
374
  Necessity: each device has exactly one api heartbeat state
375
375
  Definition: "online" or "offline" or "timeout" or "unknown"
376
376
 
377
+ Fact type: device [changed api heartbeat state on] date
378
+ Necessity: each device [changed api heartbeat state on] at most one date.
379
+
377
380
  Fact type: device has env var name
378
381
  Term Form: device environment variable
379
382
  Database Table Name: device environment variable
@@ -451,7 +454,7 @@ Fact type: user (Auth) has public key
451
454
  -- user public key
452
455
 
453
456
  Fact type: user public key has title
454
- Necessity: each user public key has exactly one title
457
+ Necessity: each user public key has exactly one title
455
458
 
456
459
 
457
460
  -- application type
@@ -172,7 +172,7 @@ export class DeviceOnlineStateManager extends EventEmitter {
172
172
  let err;
173
173
  try {
174
174
  // patch the api_heartbeat_state value to the new state...
175
- const body = {
175
+ const baseBody = {
176
176
  api_heartbeat_state: newState,
177
177
  };
178
178
  await api.resin.patch({
@@ -181,10 +181,17 @@ export class DeviceOnlineStateManager extends EventEmitter {
181
181
  id: deviceId,
182
182
  options: {
183
183
  $filter: {
184
- $not: body,
184
+ $not: baseBody,
185
185
  },
186
186
  },
187
- body,
187
+ body: {
188
+ ...baseBody,
189
+ // Since the heartbeat manager is the only place that we update the heartbeat state
190
+ // we are updating the heartbeat's change date in here rather than a hook, so that
191
+ // we can avoid the extra DB request that a generic hook would require for checking
192
+ // whether the value actually changed or not.
193
+ changed_api_heartbeat_state_on__date: Date.now(),
194
+ },
188
195
  });
189
196
  }
190
197
  catch ($err) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/features/device-heartbeat/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,QAAQ,MAAM,MAAM,CAAC;AAE5B,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD,OAAO,EAAE,MAAM,IAAI,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,OAAO,EACN,2BAA2B,EAC3B,mCAAmC,EACnC,+CAA+C,EAC/C,gCAAgC,EAChC,KAAK,GACL,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,MAAM,EAAE,GAAG,EAAE,GAAG,SAAS,CAAC;AAE1B,MAAM,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAC5C,GAAG,CAAC,KAAK,CAAC,OAAO,CAChB;IACC,QAAQ,EAAE,wBAAwB;IA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D,CAAC,yBAAyB,CAAC,SAAS,IAAI,IAAI;oBAC3C,IAAI,CAAC,GAAG,EAAE;wBACT,yBAAyB,CAAC,SAAS;4BAClC,+CAA+C,CAAC,CAAC,EACpD,CAAC;YACF,uCAAuC;YACvC,MAAM,IAAI,CAAC,iBAAiB,CAAC,QAAQ,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;YAClE,IAAI,+CAA+C,IAAI,IAAI,EAAE,CAAC;gBAC7D,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;YACxB,CAAC;QACF,CAAC;QAED,yBAAyB;QACzB,MAAM,IAAI,CAAC,8BAA8B,CACxC,QAAQ,EACR,yBAAyB,EACzB,kBAAkB,CAAC,MAAM,EACzB,kBAAkB,CAAC,OAAO,EAC1B,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,EAAE,mGAAmG;QAC9H,SAAS,CACT,CAAC;IACH,CAAC;;AAGF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,wBAAwB,EAAE,CAAC,CAAC"}
@@ -9,6 +9,7 @@ export declare const checkDeviceExistsIsFrozen: import("../../infra/cache/multi-
9
9
  __id: import("../../balena-model.js").Actor["Read"]["id"];
10
10
  } | [import("../../balena-model.js").Actor["Read"]];
11
11
  api_heartbeat_state: "online" | "offline" | "timeout" | "unknown";
12
+ changed_api_heartbeat_state_on__date: import("@balena/sbvr-types").Types["Date Time"]["Read"] | null;
12
13
  uuid: import("@balena/sbvr-types").Types["Text"]["Read"];
13
14
  local_id: import("@balena/sbvr-types").Types["Short Text"]["Read"] | null;
14
15
  device_name: import("@balena/sbvr-types").Types["Short Text"]["Read"] | null;
@@ -0,0 +1,2 @@
1
+ ALTER TABLE "device"
2
+ ADD COLUMN IF NOT EXISTS "changed api heartbeat state on-date" TIMESTAMP NULL;
@@ -379,6 +379,9 @@ Term: device
379
379
  Necessity: each device has exactly one api heartbeat state
380
380
  Definition: "online" or "offline" or "timeout" or "unknown"
381
381
 
382
+ Fact type: device [changed api heartbeat state on] date
383
+ Necessity: each device [changed api heartbeat state on] at most one date.
384
+
382
385
  Fact type: device has env var name
383
386
  Term Form: device environment variable
384
387
  Database Table Name: device environment variable
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@balena/open-balena-api",
3
3
  "description": "Internet of things, Made Simple",
4
- "version": "27.0.0-build-state-get-release-b82452363aba8cbd3639228daf3b544733838dd1-1",
4
+ "version": "27.1.0-build-644-last-api-heartbeat-state-change-event-a28dfa80d59485962f8d7f04dfbd36f443b63e2f-1",
5
5
  "license": "AGPL-3.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -168,6 +168,6 @@
168
168
  "loader": "ts-node/esm/transpile-only"
169
169
  },
170
170
  "versionist": {
171
- "publishedAt": "2024-09-04T12:57:57.744Z"
171
+ "publishedAt": "2024-09-05T16:42:16.974Z"
172
172
  }
173
173
  }