@happyvertical/smrt-support 0.70.2 → 0.71.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/README.md CHANGED
@@ -53,6 +53,22 @@ await support.recordInteraction(supportCase, {
53
53
  });
54
54
  ```
55
55
 
56
+ ### External requester ownership
57
+
58
+ `SupportCase.requesterKey` is an opaque, nullable, indexed key the app composes
59
+ (for example `<productKey>:<userId>`); smrt never interprets it. Open cases with
60
+ `openCase({ requesterKey })`, list with
61
+ `listByRequester(key, { tenantId, since?, limit?, offset? })` (stable
62
+ `created_at DESC, id DESC`), and move ownership with
63
+ `reassignRequester({ tenantId, fromKey, toKey, caseIds? })`, a single
64
+ idempotent UPDATE that returns the moved case ids. These methods never open a
65
+ transaction: to run inside a caller's transaction (e.g. holding advisory
66
+ locks) create the service on the tx-bound database
67
+ (`SupportCaseService.create({ db: tx })`), since a nested `transaction()` takes
68
+ a new pooled connection, not a savepoint. `reassignRequester` is a bulk column
69
+ update and writes no per-case audit events. Existing deployments add the
70
+ nullable column and index through the normal schema migration; no backfill.
71
+
56
72
  Application schemas must be migrated before runtime; Support verifies its
57
73
  tables and does not create them on demand.
58
74