@happyvertical/smrt-events 0.42.7 → 0.43.1

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.
@@ -3,13 +3,13 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-events",
6
- "packageVersion": "0.42.7",
6
+ "packageVersion": "0.43.1",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "8812cf84641856dac76dfaef4cfed1549c2224251c802f7a2029913bef140520",
11
- "packageJson": "11845fcbc4feca79259fc97519ad344a8dfb587da7776bfd1317b442f4d4abbd",
12
- "agents": "297e9ee2a72287267bf9774c77587203db5215951075847172ebb012345f599e"
10
+ "manifest": "eaf1a919c3092fedccf0527bef2fdf7bf59e62ce475020ec3f92205e44649ec4",
11
+ "packageJson": "21186a724b16c35ac045f3e9e4daf0586b298e34d4168da2576d32857ca57c65",
12
+ "agents": "c020c54c72cc890a8fccc8d784f0fde9edde4b62df91a038b401de97c2ce47cf"
13
13
  },
14
14
  "exports": [
15
15
  ".",
@@ -867,7 +867,8 @@
867
867
  "toPlainObject",
868
868
  "toPublicJSON",
869
869
  "updateMetadata",
870
- "updateStatus"
870
+ "updateStatus",
871
+ "withDatabase"
871
872
  ],
872
873
  "methodSignatures": [
873
874
  {
@@ -1252,6 +1253,15 @@
1252
1253
  "newStatus: EventStatus"
1253
1254
  ],
1254
1255
  "returns": "Promise<void>"
1256
+ },
1257
+ {
1258
+ "name": "withDatabase",
1259
+ "async": true,
1260
+ "params": [
1261
+ "db: DatabaseInterface",
1262
+ "operation: Function"
1263
+ ],
1264
+ "returns": "Promise<T>"
1255
1265
  }
1256
1266
  ],
1257
1267
  "tenant": {
@@ -1878,7 +1888,8 @@
1878
1888
  "toJSON",
1879
1889
  "toPlainObject",
1880
1890
  "toPublicJSON",
1881
- "updateMetadata"
1891
+ "updateMetadata",
1892
+ "withDatabase"
1882
1893
  ],
1883
1894
  "methodSignatures": [
1884
1895
  {
@@ -2192,6 +2203,15 @@
2192
2203
  "updates: Record<string>"
2193
2204
  ],
2194
2205
  "returns": "void"
2206
+ },
2207
+ {
2208
+ "name": "withDatabase",
2209
+ "async": true,
2210
+ "params": [
2211
+ "db: DatabaseInterface",
2212
+ "operation: Function"
2213
+ ],
2214
+ "returns": "Promise<T>"
2195
2215
  }
2196
2216
  ],
2197
2217
  "tenant": {
@@ -2424,7 +2444,8 @@
2424
2444
  "summarizeAiUsage",
2425
2445
  "toJSON",
2426
2446
  "toPlainObject",
2427
- "toPublicJSON"
2447
+ "toPublicJSON",
2448
+ "withDatabase"
2428
2449
  ],
2429
2450
  "methodSignatures": [
2430
2451
  {
@@ -2721,6 +2742,15 @@
2721
2742
  "options?: PublicJsonOptions"
2722
2743
  ],
2723
2744
  "returns": "Record<string>"
2745
+ },
2746
+ {
2747
+ "name": "withDatabase",
2748
+ "async": true,
2749
+ "params": [
2750
+ "db: DatabaseInterface",
2751
+ "operation: Function"
2752
+ ],
2753
+ "returns": "Promise<T>"
2724
2754
  }
2725
2755
  ],
2726
2756
  "tenant": {
@@ -3213,5 +3243,5 @@
3213
3243
  "polymorphicAssociations": 0,
3214
3244
  "uuidColumns": 25
3215
3245
  },
3216
- "agentDoc": "# @happyvertical/smrt-events\n\nInfinite-nesting event hierarchy with series, types, participants, and role/placement management.\n\n## Models\n\n- **Event** (STI, extends `SmrtHierarchical`): self-referencing parent-child via `parentId` (UUID). Links to `seriesId`, `typeId`, `placeId`. Status: scheduled/in_progress/completed/cancelled/postponed. Hierarchy traversal (`getParent()`, `getChildren()`, `getAncestors()`, `getDescendants()`, `getHierarchy()`, `moveTo()`) is provided by `SmrtHierarchical`; `getRootEvent()` and `isRoot()` remain on `Event`.\n- **EventAsset**: dedicated owned-asset join in `event_assets` with `relationship` and `sortOrder`.\n- **EventType**: classification with JSON schema for custom fields per type.\n- **EventSeries**: recurrence patterns (daily/weekly/monthly/yearly).\n- **EventParticipant**: junction with `role` (home/away/speaker/panelist/etc.), `placement` (numeric — team ordering and rankings), `groupId` (team grouping within event). `conflictColumns: ['event_id', 'profile_id', 'role']`.\n\n## Gotchas\n\n- **No depth limit** on event hierarchy — deep nesting can cause N+1 queries\n- **Placement is numeric**: used for both team ordering (0=home, 1=away) and rankings — context-dependent\n- **GroupId not enforced at DB level**: for logical grouping only (e.g., team members in a game)\n- **Optional tenancy** with nullable tenantId\n- **Metadata stored as JSON string** with get/set/update helpers\n- **Owned asset helpers**: use `Event.getAssets()` / `addAsset()` / `removeAsset()` or the matching `EventCollection` wrappers instead of generic `AssetAssociation`\n"
3246
+ "agentDoc": "# @happyvertical/smrt-events\n\nInfinite-nesting event hierarchy with series, types, participants, and role/placement management.\n\n## Models\n\n- **Event** (STI, extends `SmrtHierarchical`): self-referencing parent-child via `parentId` (UUID). Links to `seriesId`, `typeId`, `placeId`. Status: scheduled/in_progress/completed/cancelled/postponed. Hierarchy traversal (`getParent()`, `getChildren()`, `getAncestors()`, `getDescendants()`, `getHierarchy()`, `moveTo()`) is provided by `SmrtHierarchical`; `getRootEvent()` and `isRoot()` remain on `Event`.\n- **EventAsset**: dedicated owned-asset join in `event_assets` with `relationship` and `sortOrder`.\n- **EventType**: classification with JSON schema for custom fields per type.\n- **EventSeries**: recurrence patterns (daily/weekly/monthly/yearly).\n- **EventParticipant**: junction with `role` (home/away/speaker/panelist/etc.), `placement` (numeric — team ordering and rankings), `groupId` (team grouping within event). `conflictColumns: ['event_id', 'profile_id', 'role']`.\n\n## Gotchas\n\n- **No depth limit** on event hierarchy — deep nesting can cause N+1 queries\n- **Placement is numeric**: used for both team ordering (0=home, 1=away) and rankings — context-dependent\n- **GroupId not enforced at DB level**: for logical grouping only (e.g., team members in a game)\n- **Optional tenancy** with nullable tenantId\n- **Event physical foreign keys**: `parentId`, `seriesId`, and `typeId` retain\n PostgreSQL/SQLite constraints. DuckDB/JSON omit only those explicitly scoped\n physical constraints because DuckDB cannot enforce Event's self-reference or\n generated `ON UPDATE CASCADE`; UUID fields, indexes, relationship loading,\n and application-side delete enforcement remain active on every engine.\n- **Metadata stored as JSON string** with get/set/update helpers\n- **Owned asset helpers**: use `Event.getAssets()` / `addAsset()` / `removeAsset()` or the matching `EventCollection` wrappers instead of generic `AssetAssociation`\n"
3217
3247
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-events",
3
- "version": "0.42.7",
3
+ "version": "0.43.1",
4
4
  "description": "Hierarchical event management with participant tracking and SMRT framework support",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -49,13 +49,13 @@
49
49
  "@happyvertical/logger": "^0.88.0",
50
50
  "@happyvertical/sql": "^0.88.0",
51
51
  "@happyvertical/utils": "^0.88.0",
52
- "@happyvertical/smrt-profiles": "0.42.7",
53
- "@happyvertical/smrt-assets": "0.42.7",
54
- "@happyvertical/smrt-places": "0.42.7",
55
- "@happyvertical/smrt-types": "0.42.7",
56
- "@happyvertical/smrt-ui": "0.42.7",
57
- "@happyvertical/smrt-core": "0.42.7",
58
- "@happyvertical/smrt-tenancy": "0.42.7"
52
+ "@happyvertical/smrt-assets": "0.43.1",
53
+ "@happyvertical/smrt-core": "0.43.1",
54
+ "@happyvertical/smrt-profiles": "0.43.1",
55
+ "@happyvertical/smrt-tenancy": "0.43.1",
56
+ "@happyvertical/smrt-types": "0.43.1",
57
+ "@happyvertical/smrt-ui": "0.43.1",
58
+ "@happyvertical/smrt-places": "0.43.1"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@sveltejs/package": "^2.5.8",
@@ -67,7 +67,7 @@
67
67
  "typescript": "5.9.3",
68
68
  "vite": "8.1.4",
69
69
  "vitest": "4.1.10",
70
- "@happyvertical/smrt-vitest": "0.42.7"
70
+ "@happyvertical/smrt-vitest": "0.43.1"
71
71
  },
72
72
  "keywords": [
73
73
  "events",