@dudousxd/nestjs-durable-store-prisma 0.25.0 → 0.26.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dudousxd/nestjs-durable-store-prisma",
3
- "version": "0.25.0",
3
+ "version": "0.26.0",
4
4
  "description": "Prisma adapter for the nestjs-durable StateStore",
5
5
  "license": "MIT",
6
6
  "author": "Davide Carvalho",
@@ -37,8 +37,8 @@
37
37
  "prisma": "6.19.3",
38
38
  "tsup": "8.3.5",
39
39
  "typescript": "5.9.3",
40
- "@dudousxd/nestjs-durable-core": "^0.87.0",
41
- "@dudousxd/nestjs-durable-testing": "^0.24.0"
40
+ "@dudousxd/nestjs-durable-core": "^0.88.0",
41
+ "@dudousxd/nestjs-durable-testing": "^0.25.0"
42
42
  },
43
43
  "module": "./dist/index.js",
44
44
  "exports": {
@@ -142,6 +142,19 @@ model DurableBufferedEvent {
142
142
  @@map("durable_buffered_events")
143
143
  }
144
144
 
145
+ // Signal dedupe ids (`engine.signal(token, payload, { id })`) — only needed if you send signals with
146
+ // an `id`. One row per (token, signalId), deduplicating until `expiresAt` (epoch ms as a BigInt).
147
+ // Expired rows are ignored by `claimSignalId` and deleted by `engine.sweepExpiredSignalIds()`.
148
+ model DurableSignalId {
149
+ token String
150
+ signalId String @map("signal_id")
151
+ expiresAt BigInt @map("expires_at")
152
+
153
+ @@id([token, signalId])
154
+ @@index([expiresAt], map: "durable_signal_ids_expires_at_idx")
155
+ @@map("durable_signal_ids")
156
+ }
157
+
145
158
  // Persisted schedules (`engine.schedules`) — only needed if you use them. `spec`/`state` are
146
159
  // engine-owned JSON documents; `nextFireAt` is epoch ms as a BigInt (exact, so the compare-and-set in
147
160
  // `updateSchedule` can't be defeated by a timestamp's precision).