@camstack/addon-provider-petkit 0.2.96 → 0.2.97

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/addon.js CHANGED
@@ -21817,6 +21817,14 @@ var NativeCropResultSchema = object({
21817
21817
  * set `encodeJpeg: true`; `bytes` is then absent.
21818
21818
  */
21819
21819
  jpeg: string().optional(),
21820
+ /**
21821
+ * The SAME compressed JPEG as `jpeg`, as bytes (D462). Present instead of
21822
+ * `jpeg` when the request set `acceptJpegBytes`; a request that did not gets
21823
+ * `jpeg` exactly as before. MsgPack and the mesh leg both carry binary —
21824
+ * `bytes` above has crossed this boundary as a `Uint8Array` all along — so
21825
+ * base64 was buying nothing but a multi-megabyte string in the relay's heap.
21826
+ */
21827
+ jpegBytes: _instanceof(Uint8Array).optional(),
21820
21828
  width: number().int().positive(),
21821
21829
  height: number().int().positive(),
21822
21830
  /**
@@ -21883,7 +21891,14 @@ var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
21883
21891
  })]);
21884
21892
  /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
21885
21893
  var ParkedTrackFrameSchema = object({
21886
- jpeg: string(),
21894
+ /**
21895
+ * Base64 JPEG — the pre-D462 wire. OPTIONAL since D462: a request that set
21896
+ * `acceptJpegBytes` is answered in `jpegBytes` and this is then absent.
21897
+ * Exactly one of the two is present.
21898
+ */
21899
+ jpeg: string().optional(),
21900
+ /** The same JPEG as bytes, for a caller that declared it reads them (D462). */
21901
+ jpegBytes: _instanceof(Uint8Array).optional(),
21887
21902
  width: number().int().positive(),
21888
21903
  height: number().int().positive(),
21889
21904
  /** The frame instant the parcel shows (the caller's clock, echoed back). */
@@ -22470,6 +22485,13 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
22470
22485
  bbox: NativeCropBboxSchema,
22471
22486
  maxWidth: number().int().positive().optional(),
22472
22487
  /**
22488
+ * The caller reads a `Uint8Array` (D462). When set, a JPEG answer comes
22489
+ * back in `jpegBytes` instead of base64 `jpeg`. Absent means the old
22490
+ * wire — never assume consent: a pre-D462 caller parses the field as
22491
+ * base64 and bytes would decode to garbage rather than fail.
22492
+ */
22493
+ acceptJpegBytes: boolean().optional(),
22494
+ /**
22473
22495
  * When `true`, the runner encodes the resolved crop to JPEG ON THE
22474
22496
  * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
22475
22497
  * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
@@ -22537,7 +22559,14 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
22537
22559
  }), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
22538
22560
  deviceId: number(),
22539
22561
  trackId: string(),
22540
- kind: ParkedFrameKindSchema
22562
+ kind: ParkedFrameKindSchema,
22563
+ /**
22564
+ * The caller reads a `Uint8Array` (D462). When set, a JPEG answer comes
22565
+ * back in `jpegBytes` instead of base64 `jpeg`. Absent means the old
22566
+ * wire — never assume consent: a pre-D462 caller parses the field as
22567
+ * base64 and bytes would decode to garbage rather than fail.
22568
+ */
22569
+ acceptJpegBytes: boolean().optional()
22541
22570
  }), ParkedTrackFrameSchema.nullable()), method(object({
22542
22571
  deviceId: number(),
22543
22572
  trackId: string()
package/dist/addon.mjs CHANGED
@@ -21816,6 +21816,14 @@ var NativeCropResultSchema = object({
21816
21816
  * set `encodeJpeg: true`; `bytes` is then absent.
21817
21817
  */
21818
21818
  jpeg: string().optional(),
21819
+ /**
21820
+ * The SAME compressed JPEG as `jpeg`, as bytes (D462). Present instead of
21821
+ * `jpeg` when the request set `acceptJpegBytes`; a request that did not gets
21822
+ * `jpeg` exactly as before. MsgPack and the mesh leg both carry binary —
21823
+ * `bytes` above has crossed this boundary as a `Uint8Array` all along — so
21824
+ * base64 was buying nothing but a multi-megabyte string in the relay's heap.
21825
+ */
21826
+ jpegBytes: _instanceof(Uint8Array).optional(),
21819
21827
  width: number().int().positive(),
21820
21828
  height: number().int().positive(),
21821
21829
  /**
@@ -21882,7 +21890,14 @@ var ParkTrackFrameResultSchema = discriminatedUnion("parked", [object({
21882
21890
  })]);
21883
21891
  /** A retrieved parcel — the runner's own JPEG, base64 for the wire. */
21884
21892
  var ParkedTrackFrameSchema = object({
21885
- jpeg: string(),
21893
+ /**
21894
+ * Base64 JPEG — the pre-D462 wire. OPTIONAL since D462: a request that set
21895
+ * `acceptJpegBytes` is answered in `jpegBytes` and this is then absent.
21896
+ * Exactly one of the two is present.
21897
+ */
21898
+ jpeg: string().optional(),
21899
+ /** The same JPEG as bytes, for a caller that declared it reads them (D462). */
21900
+ jpegBytes: _instanceof(Uint8Array).optional(),
21886
21901
  width: number().int().positive(),
21887
21902
  height: number().int().positive(),
21888
21903
  /** The frame instant the parcel shows (the caller's clock, echoed back). */
@@ -22469,6 +22484,13 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
22469
22484
  bbox: NativeCropBboxSchema,
22470
22485
  maxWidth: number().int().positive().optional(),
22471
22486
  /**
22487
+ * The caller reads a `Uint8Array` (D462). When set, a JPEG answer comes
22488
+ * back in `jpegBytes` instead of base64 `jpeg`. Absent means the old
22489
+ * wire — never assume consent: a pre-D462 caller parses the field as
22490
+ * base64 and bytes would decode to garbage rather than fail.
22491
+ */
22492
+ acceptJpegBytes: boolean().optional(),
22493
+ /**
22472
22494
  * When `true`, the runner encodes the resolved crop to JPEG ON THE
22473
22495
  * OWNING NODE and returns it in `jpeg` (base64) INSTEAD of raw `bytes`.
22474
22496
  * Callers set this for CROSS-NODE fetches (`handle.nodeId` is a remote
@@ -22536,7 +22558,14 @@ method(RunnerCameraConfigSchema, object({ success: literal(true) }), { kind: "mu
22536
22558
  }), ParkTrackFrameResultSchema, { kind: "mutation" }), method(object({
22537
22559
  deviceId: number(),
22538
22560
  trackId: string(),
22539
- kind: ParkedFrameKindSchema
22561
+ kind: ParkedFrameKindSchema,
22562
+ /**
22563
+ * The caller reads a `Uint8Array` (D462). When set, a JPEG answer comes
22564
+ * back in `jpegBytes` instead of base64 `jpeg`. Absent means the old
22565
+ * wire — never assume consent: a pre-D462 caller parses the field as
22566
+ * base64 and bytes would decode to garbage rather than fail.
22567
+ */
22568
+ acceptJpegBytes: boolean().optional()
22540
22569
  }), ParkedTrackFrameSchema.nullable()), method(object({
22541
22570
  deviceId: number(),
22542
22571
  trackId: string()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-petkit",
3
- "version": "0.2.96",
3
+ "version": "0.2.97",
4
4
  "description": "PetKit smart-feeder device-provider addon for CamStack — wraps the @apocaliss92/nodepetkit PetKit cloud client",
5
5
  "keywords": [
6
6
  "camstack",