@byok-sdk/cloud-dataplane 0.17.0 → 0.19.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.js CHANGED
@@ -1498,6 +1498,15 @@ var PostgresTaskAttemptStore = class {
1498
1498
  client.release();
1499
1499
  }
1500
1500
  }
1501
+ async readTaskAgentMessage(tenant, input) {
1502
+ const result = await this.#pool.query(
1503
+ `SELECT ${AGENT_MESSAGE_ADMISSION_SELECT_COLUMNS}
1504
+ FROM agent_message_admission
1505
+ WHERE tenant_id = $1 AND device_id = $2 AND task_id = $3`,
1506
+ [tenant, input.deviceId, input.taskId]
1507
+ );
1508
+ return result.rows[0] === void 0 ? void 0 : admissionRowToRecord(result.rows[0]);
1509
+ }
1501
1510
  async readAgentMessage(tenant, input) {
1502
1511
  const result = await this.#pool.query(
1503
1512
  `SELECT ${AGENT_MESSAGE_ADMISSION_SELECT_COLUMNS}
@@ -2785,10 +2794,10 @@ var PostgresDeviceAssertionReplayAuthority = class {
2785
2794
  }
2786
2795
  const result = await this.#pool.query(
2787
2796
  `INSERT INTO device_assertion_replay (
2788
- tenant_id, issuer, product_id, device_id, audience, jti, expires_at
2797
+ tenant_id, issuer, product_id, device_id, audience, schema, jti, expires_at
2789
2798
  )
2790
- VALUES ($1, $2, $3, $4, $5, $6, $7)
2791
- ON CONFLICT (tenant_id, issuer, product_id, device_id, audience, jti) DO NOTHING
2799
+ VALUES ($1, $2, $3, $4, $5, $6, $7, $8)
2800
+ ON CONFLICT (tenant_id, issuer, product_id, device_id, audience, schema, jti) DO NOTHING
2792
2801
  RETURNING jti`,
2793
2802
  [
2794
2803
  input.tenantId,
@@ -2796,6 +2805,7 @@ var PostgresDeviceAssertionReplayAuthority = class {
2796
2805
  input.productId,
2797
2806
  input.deviceId,
2798
2807
  input.audience,
2808
+ input.schema,
2799
2809
  input.jti,
2800
2810
  input.expiresAt
2801
2811
  ]