@authhero/adapter-interfaces 4.0.0 → 4.2.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.
@@ -14,4 +14,13 @@ export interface CodesAdapter {
14
14
  */
15
15
  consume: (tenant_id: string, code_id: string) => Promise<boolean>;
16
16
  remove: (tenant_id: string, code_id: string) => Promise<boolean>;
17
+ /**
18
+ * Delete codes that expired before the given ISO date. Returns count deleted.
19
+ *
20
+ * Codes are short-lived by design, so nothing reads a row once it is past
21
+ * `expires_at` — this is a pure retention sweep, and unlike `remove` it is
22
+ * not tenant-scoped. Intended to be driven by `cleanupCodes` from a
23
+ * scheduled handler.
24
+ */
25
+ cleanup: (olderThan: string) => Promise<number>;
17
26
  }
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "type": "git",
12
12
  "url": "https://github.com/markusahlstrand/authhero"
13
13
  },
14
- "version": "4.0.0",
14
+ "version": "4.2.0",
15
15
  "files": [
16
16
  "dist"
17
17
  ],