@happyvertical/smrt-events 0.57.15 → 0.57.17
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +1 -1
- package/dist/smrt-knowledge.json +4 -4
- package/package.json +10 -10
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["key","event"],"sources":["../src/__smrt-register__.ts","../src/calendar/icalendar.ts","../src/models/Event.ts","../src/collections/EventCollection.ts","../src/models/EventSeries.ts","../src/collections/EventSeriesCollection.ts","../src/calendar/sync.ts","../src/models/EventAsset.ts","../src/collections/EventAssetCollection.ts","../src/models/EventParticipant.ts","../src/collections/EventParticipantCollection.ts","../src/models/EventType.ts","../src/collections/EventTypeCollection.ts","../src/recipes.ts"],"sourcesContent":["// Generated by @happyvertical/smrt-core smrtPlugin at library build time.\n// The package manifest is inlined so self-registration cannot miss when a\n// downstream bundler relocates this module away from dist/manifest.json\n// (https://github.com/happyvertical/smrt/issues/1506,\n// https://github.com/happyvertical/smrt/issues/1507).\nimport { ObjectRegistry } from '@happyvertical/smrt-core';\n\nObjectRegistry.registerPackageManifest(JSON.parse(\"{\\\"version\\\":\\\"1.0.0\\\",\\\"timestamp\\\":0,\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"packageVersion\\\":\\\"0.57.15\\\",\\\"objects\\\":{\\\"@happyvertical/smrt-events:EventAssetCollection\\\":{\\\"name\\\":\\\"eventassetcollection\\\",\\\"className\\\":\\\"EventAssetCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventAssetCollection\\\",\\\"collection\\\":\\\"eventassets\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/collections/EventAssetCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"byRight\\\":{\\\"name\\\":\\\"byRight\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"rightId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionFilterOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<TItem[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"byLeft\\\":{\\\"name\\\":\\\"byLeft\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"leftId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionFilterOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<TItem[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"attach\\\":{\\\"name\\\":\\\"attach\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"leftId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"rightId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionAttachOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<TItem>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"detach\\\":{\\\"name\\\":\\\"detach\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"leftId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"rightId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionFilterOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setLinks\\\":{\\\"name\\\":\\\"setLinks\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"leftId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"rightIds\\\",\\\"type\\\":\\\"string[]\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionAttachOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getAssets\\\":{\\\"name\\\":\\\"getAssets\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<Asset[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"addAsset\\\":{\\\"name\\\":\\\"addAsset\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"asset\\\",\\\"type\\\":\\\"Asset\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":true,\\\"default\\\":\\\"attachment\\\"},{\\\"name\\\":\\\"sortOrder\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"removeAsset\\\":{\\\"name\\\":\\\"removeAsset\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"assetId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false,\\\"tableName\\\":\\\"event_assets\\\"},\\\"extends\\\":\\\"SmrtJunction\\\",\\\"extendsTypeArg\\\":\\\"EventAsset\\\",\\\"exportName\\\":\\\"EventAssetCollection\\\",\\\"collectionExportName\\\":\\\"EventAssetCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"event_assets\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"event_assets\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"event_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"asset_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"relationship\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"sort_order\\\\\\\" INTEGER NOT NULL DEFAULT 0\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"event_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"events\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"CASCADE\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"asset_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"relationship\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"sort_order\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":0}},\\\"indexes\\\":[{\\\"name\\\":\\\"event_assets_event_id_asset_id_idx\\\",\\\"columns\\\":[\\\"event_id\\\",\\\"asset_id\\\",\\\"relationship\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"event_assets_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"event_assets_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"event_assets_asset_id_idx\\\",\\\"columns\\\":[\\\"asset_id\\\"]}],\\\"version\\\":\\\"aeebedc6\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:EventCollection\\\":{\\\"name\\\":\\\"eventcollection\\\",\\\"className\\\":\\\"EventCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventCollection\\\",\\\"collection\\\":\\\"events\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/collections/EventCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"getBySeriesId\\\":{\\\"name\\\":\\\"getBySeriesId\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"seriesId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getByPlace\\\":{\\\"name\\\":\\\"getByPlace\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"placeId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getByDateRange\\\":{\\\"name\\\":\\\"getByDateRange\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"startDate\\\",\\\"type\\\":\\\"Date\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"endDate\\\",\\\"type\\\":\\\"Date\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getUpcoming\\\":{\\\"name\\\":\\\"getUpcoming\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"limit\\\",\\\"type\\\":\\\"number\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getByStatus\\\":{\\\"name\\\":\\\"getByStatus\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"status\\\",\\\"type\\\":\\\"EventStatus\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getByType\\\":{\\\"name\\\":\\\"getByType\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"typeId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getRootEvents\\\":{\\\"name\\\":\\\"getRootEvents\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getByParent\\\":{\\\"name\\\":\\\"getByParent\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"parentId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getEventTree\\\":{\\\"name\\\":\\\"getEventTree\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event | null>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getAssets\\\":{\\\"name\\\":\\\"getAssets\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<Asset[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"addAsset\\\":{\\\"name\\\":\\\"addAsset\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"asset\\\",\\\"type\\\":\\\"Asset\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":true,\\\"default\\\":\\\"attachment\\\"},{\\\"name\\\":\\\"sortOrder\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"removeAsset\\\":{\\\"name\\\":\\\"removeAsset\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"assetId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"search\\\":{\\\"name\\\":\\\"search\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"query\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"filters\\\",\\\"type\\\":\\\"EventSearchFilters\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getInProgress\\\":{\\\"name\\\":\\\"getInProgress\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByTenant\\\":{\\\"name\\\":\\\"findByTenant\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findGlobal\\\":{\\\"name\\\":\\\"findGlobal\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findWithGlobals\\\":{\\\"name\\\":\\\"findWithGlobals\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\"]}},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"Event\\\",\\\"exportName\\\":\\\"EventCollection\\\",\\\"collectionExportName\\\":\\\"EventCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"events\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"events\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"_meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"_meta_data\\\\\\\" JSON,\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"parent_id\\\\\\\" UUID,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"series_id\\\\\\\" UUID,\\\\n \\\\\\\"type_id\\\\\\\" UUID,\\\\n \\\\\\\"place_id\\\\\\\" UUID,\\\\n \\\\\\\"description\\\\\\\" TEXT,\\\\n \\\\\\\"start_date\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"end_date\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"all_day\\\\\\\" BOOLEAN DEFAULT FALSE,\\\\n \\\\\\\"time_zone\\\\\\\" TEXT,\\\\n \\\\\\\"status\\\\\\\" TEXT DEFAULT 'scheduled',\\\\n \\\\\\\"round\\\\\\\" INTEGER,\\\\n \\\\\\\"metadata\\\\\\\" TEXT,\\\\n \\\\\\\"external_id\\\\\\\" TEXT,\\\\n \\\\\\\"source\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"_meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"_meta_data\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"parent_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"events\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\",\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"series_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"event_series\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\",\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}},\\\"type_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"event_types\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\",\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}},\\\"place_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"start_date\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false},\\\"end_date\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false},\\\"all_day\\\":{\\\"type\\\":\\\"BOOLEAN\\\",\\\"notNull\\\":false,\\\"default\\\":false},\\\"time_zone\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"scheduled\\\"},\\\"round\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"external_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"source\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"events_slug_context_meta_type_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"events_meta_type_idx\\\",\\\"columns\\\":[\\\"_meta_type\\\"]},{\\\"name\\\":\\\"events_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"events_parent_id_idx\\\",\\\"columns\\\":[\\\"parent_id\\\"]},{\\\"name\\\":\\\"events_series_id_idx\\\",\\\"columns\\\":[\\\"series_id\\\"]},{\\\"name\\\":\\\"events_type_id_idx\\\",\\\"columns\\\":[\\\"type_id\\\"]},{\\\"name\\\":\\\"events_place_id_idx\\\",\\\"columns\\\":[\\\"place_id\\\"]}],\\\"version\\\":\\\"8e689646\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:EventParticipantCollection\\\":{\\\"name\\\":\\\"eventparticipantcollection\\\",\\\"className\\\":\\\"EventParticipantCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventParticipantCollection\\\",\\\"collection\\\":\\\"eventparticipants\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/collections/EventParticipantCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"byRight\\\":{\\\"name\\\":\\\"byRight\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"rightId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionFilterOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<TItem[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"byLeft\\\":{\\\"name\\\":\\\"byLeft\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"leftId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionFilterOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<TItem[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"attach\\\":{\\\"name\\\":\\\"attach\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"leftId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"rightId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionAttachOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<TItem>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"detach\\\":{\\\"name\\\":\\\"detach\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"leftId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"rightId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionFilterOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setLinks\\\":{\\\"name\\\":\\\"setLinks\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"leftId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"rightIds\\\",\\\"type\\\":\\\"string[]\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionAttachOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getByPlacement\\\":{\\\"name\\\":\\\"getByPlacement\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getByGroup\\\":{\\\"name\\\":\\\"getByGroup\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"groupId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getHome\\\":{\\\"name\\\":\\\"getHome\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getAway\\\":{\\\"name\\\":\\\"getAway\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"search\\\":{\\\"name\\\":\\\"search\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"filters\\\",\\\"type\\\":\\\"ParticipantSearchFilters\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getParticipantStats\\\":{\\\"name\\\":\\\"getParticipantStats\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"profileId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"eventTypeId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<object>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByTenant\\\":{\\\"name\\\":\\\"findByTenant\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findGlobal\\\":{\\\"name\\\":\\\"findGlobal\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findWithGlobals\\\":{\\\"name\\\":\\\"findWithGlobals\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\"]}},\\\"extends\\\":\\\"SmrtJunction\\\",\\\"extendsTypeArg\\\":\\\"EventParticipant\\\",\\\"exportName\\\":\\\"EventParticipantCollection\\\",\\\"collectionExportName\\\":\\\"EventParticipantCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"event_participants\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"event_participants\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"event_id\\\\\\\" UUID,\\\\n \\\\\\\"profile_id\\\\\\\" UUID,\\\\n \\\\\\\"role\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"placement\\\\\\\" INTEGER,\\\\n \\\\\\\"group_id\\\\\\\" TEXT,\\\\n \\\\\\\"metadata\\\\\\\" TEXT,\\\\n \\\\\\\"external_id\\\\\\\" TEXT,\\\\n \\\\\\\"source\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"event_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"events\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"CASCADE\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"profile_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"role\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"placement\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"group_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"external_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"source\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"event_participants_event_id_profile_id_idx\\\",\\\"columns\\\":[\\\"event_id\\\",\\\"profile_id\\\",\\\"role\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"event_participants_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"event_participants_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"event_participants_profile_id_idx\\\",\\\"columns\\\":[\\\"profile_id\\\"]}],\\\"version\\\":\\\"c2faac84\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:EventSeriesCollection\\\":{\\\"name\\\":\\\"eventseriescollection\\\",\\\"className\\\":\\\"EventSeriesCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventSeriesCollection\\\",\\\"collection\\\":\\\"eventserieses\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/collections/EventSeriesCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"getByOrganizer\\\":{\\\"name\\\":\\\"getByOrganizer\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"organizerId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventSeries[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getActive\\\":{\\\"name\\\":\\\"getActive\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<EventSeries[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getUpcoming\\\":{\\\"name\\\":\\\"getUpcoming\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"limit\\\",\\\"type\\\":\\\"number\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<EventSeries[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getByType\\\":{\\\"name\\\":\\\"getByType\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"typeId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventSeries[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"search\\\":{\\\"name\\\":\\\"search\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"query\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"filters\\\",\\\"type\\\":\\\"EventSeriesSearchFilters\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<EventSeries[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByTenant\\\":{\\\"name\\\":\\\"findByTenant\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventSeries[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findGlobal\\\":{\\\"name\\\":\\\"findGlobal\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<EventSeries[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findWithGlobals\\\":{\\\"name\\\":\\\"findWithGlobals\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventSeries[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\"]}},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"EventSeries\\\",\\\"exportName\\\":\\\"EventSeriesCollection\\\",\\\"collectionExportName\\\":\\\"EventSeriesCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"event_series\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"event_series\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"_meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"_meta_data\\\\\\\" JSON,\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"type_id\\\\\\\" UUID,\\\\n \\\\\\\"organizer_id\\\\\\\" UUID,\\\\n \\\\\\\"description\\\\\\\" TEXT,\\\\n \\\\\\\"start_date\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"end_date\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"recurrence\\\\\\\" TEXT,\\\\n \\\\\\\"metadata\\\\\\\" TEXT,\\\\n \\\\\\\"external_id\\\\\\\" TEXT,\\\\n \\\\\\\"source\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"_meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"_meta_data\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"type_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"event_types\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"organizer_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"start_date\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false},\\\"end_date\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false},\\\"recurrence\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"external_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"source\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"event_series_slug_context_meta_type_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"event_series_meta_type_idx\\\",\\\"columns\\\":[\\\"_meta_type\\\"]},{\\\"name\\\":\\\"event_series_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"event_series_type_id_idx\\\",\\\"columns\\\":[\\\"type_id\\\"]},{\\\"name\\\":\\\"event_series_organizer_id_idx\\\",\\\"columns\\\":[\\\"organizer_id\\\"]}],\\\"version\\\":\\\"c79f5863\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:EventTypeCollection\\\":{\\\"name\\\":\\\"eventtypecollection\\\",\\\"className\\\":\\\"EventTypeCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventTypeCollection\\\",\\\"collection\\\":\\\"eventtypes\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/collections/EventTypeCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"getOrCreate\\\":{\\\"name\\\":\\\"getOrCreate\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"slug\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"name\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<EventType>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getBySlug\\\":{\\\"name\\\":\\\"getBySlug\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"slug\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventType | null>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"initializeDefaults\\\":{\\\"name\\\":\\\"initializeDefaults\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<EventType[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByTenant\\\":{\\\"name\\\":\\\"findByTenant\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventType[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findGlobal\\\":{\\\"name\\\":\\\"findGlobal\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<EventType[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findWithGlobals\\\":{\\\"name\\\":\\\"findWithGlobals\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventType[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\"]}},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"EventType\\\",\\\"exportName\\\":\\\"EventTypeCollection\\\",\\\"collectionExportName\\\":\\\"EventTypeCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"event_types\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"event_types\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"_meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"_meta_data\\\\\\\" JSON,\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"description\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"schema\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"participant_schema\\\\\\\" TEXT DEFAULT ''\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"_meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"_meta_data\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"schema\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"participant_schema\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"}},\\\"indexes\\\":[{\\\"name\\\":\\\"event_types_slug_context_meta_type_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"event_types_meta_type_idx\\\",\\\"columns\\\":[\\\"_meta_type\\\"]},{\\\"name\\\":\\\"event_types_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"922ae3b0\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:Event\\\":{\\\"name\\\":\\\"event\\\",\\\"className\\\":\\\"Event\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:Event\\\",\\\"collection\\\":\\\"events\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/models/Event.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{\\\"created_at\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false},\\\"updated_at\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false},\\\"parentId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":false,\\\"related\\\":\\\"Event\\\",\\\"_meta\\\":{\\\"nullable\\\":true,\\\"constraint\\\":{\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}}},\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"name\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\",\\\"description\\\":\\\"What the event is called.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"What the event is called.\\\"}},\\\"seriesId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":false,\\\"related\\\":\\\"EventSeries\\\",\\\"description\\\":\\\"The series this event is part of, if any.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"The series this event is part of, if any.\\\",\\\"constraint\\\":{\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}}},\\\"typeId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":false,\\\"related\\\":\\\"EventType\\\",\\\"description\\\":\\\"The kind of event.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"The kind of event.\\\",\\\"constraint\\\":{\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}}},\\\"placeId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"required\\\":false,\\\"related\\\":\\\"@happyvertical/smrt-places:Place\\\",\\\"description\\\":\\\"Where it takes place.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"Where it takes place.\\\"}},\\\"description\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"description\\\":\\\"What the event is about.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"What the event is about.\\\"}},\\\"startDate\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"description\\\":\\\"When it starts.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"When it starts.\\\"}},\\\"endDate\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"description\\\":\\\"When it ends.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"When it ends.\\\"}},\\\"allDay\\\":{\\\"type\\\":\\\"boolean\\\",\\\"required\\\":false,\\\"default\\\":false,\\\"description\\\":\\\"Whether the event lasts all day.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"Whether the event lasts all day.\\\"}},\\\"timeZone\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"status\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"scheduled\\\",\\\"description\\\":\\\"scheduled, in progress, completed, cancelled or postponed.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"scheduled, in progress, completed, cancelled or postponed.\\\"},\\\"enum\\\":[\\\"scheduled\\\",\\\"in_progress\\\",\\\"completed\\\",\\\"cancelled\\\",\\\"postponed\\\"]},\\\"round\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"externalId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"source\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"createdAt\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"updatedAt\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false}},\\\"methods\\\":{\\\"getParent\\\":{\\\"name\\\":\\\"getParent\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<this | null>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getChildren\\\":{\\\"name\\\":\\\"getChildren\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<this[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getAncestors\\\":{\\\"name\\\":\\\"getAncestors\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<this[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getDescendants\\\":{\\\"name\\\":\\\"getDescendants\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<this[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getHierarchy\\\":{\\\"name\\\":\\\"getHierarchy\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<HierarchyView<this>>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"moveTo\\\":{\\\"name\\\":\\\"moveTo\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"newParent\\\",\\\"type\\\":\\\"this | string | null\\\",\\\"optional\\\":false,\\\"unionBranches\\\":[{\\\"type\\\":\\\"this\\\"},{\\\"type\\\":\\\"string\\\"},{\\\"type\\\":\\\"null\\\"}]}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getMetadata\\\":{\\\"name\\\":\\\"getMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Record<string, unknown>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setMetadata\\\":{\\\"name\\\":\\\"setMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"data\\\",\\\"type\\\":\\\"Record<string, unknown>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"updateMetadata\\\":{\\\"name\\\":\\\"updateMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"updates\\\",\\\"type\\\":\\\"Record<string, unknown>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"updateStatus\\\":{\\\"name\\\":\\\"updateStatus\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"newStatus\\\",\\\"type\\\":\\\"EventStatus\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getSeries\\\":{\\\"name\\\":\\\"getSeries\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getType\\\":{\\\"name\\\":\\\"getType\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getPlace\\\":{\\\"name\\\":\\\"getPlace\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getRootEvent\\\":{\\\"name\\\":\\\"getRootEvent\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<Event>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getParticipants\\\":{\\\"name\\\":\\\"getParticipants\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getAssets\\\":{\\\"name\\\":\\\"getAssets\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<Asset[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"addAsset\\\":{\\\"name\\\":\\\"addAsset\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"asset\\\",\\\"type\\\":\\\"Asset\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":true,\\\"default\\\":\\\"attachment\\\"},{\\\"name\\\":\\\"sortOrder\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"removeAsset\\\":{\\\"name\\\":\\\"removeAsset\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"assetId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"isInProgress\\\":{\\\"name\\\":\\\"isInProgress\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"isRoot\\\":{\\\"name\\\":\\\"isRoot\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableStrategy\\\":\\\"sti\\\",\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\"]},\\\"cli\\\":{\\\"skipApiCheck\\\":true},\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"]},\\\"extends\\\":\\\"SmrtHierarchical\\\",\\\"exportName\\\":\\\"Event\\\",\\\"collectionExportName\\\":\\\"EventCollection\\\",\\\"displayLabelField\\\":\\\"name\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"events\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"events\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"_meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"_meta_data\\\\\\\" JSON,\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"parent_id\\\\\\\" UUID,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"series_id\\\\\\\" UUID,\\\\n \\\\\\\"type_id\\\\\\\" UUID,\\\\n \\\\\\\"place_id\\\\\\\" UUID,\\\\n \\\\\\\"description\\\\\\\" TEXT,\\\\n \\\\\\\"start_date\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"end_date\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"all_day\\\\\\\" BOOLEAN DEFAULT FALSE,\\\\n \\\\\\\"time_zone\\\\\\\" TEXT,\\\\n \\\\\\\"status\\\\\\\" TEXT DEFAULT 'scheduled',\\\\n \\\\\\\"round\\\\\\\" INTEGER,\\\\n \\\\\\\"metadata\\\\\\\" TEXT,\\\\n \\\\\\\"external_id\\\\\\\" TEXT,\\\\n \\\\\\\"source\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"_meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"_meta_data\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"parent_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"events\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\",\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"series_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"event_series\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\",\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}},\\\"type_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"event_types\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\",\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}},\\\"place_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"start_date\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false},\\\"end_date\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false},\\\"all_day\\\":{\\\"type\\\":\\\"BOOLEAN\\\",\\\"notNull\\\":false,\\\"default\\\":false},\\\"time_zone\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"scheduled\\\"},\\\"round\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"external_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"source\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"events_slug_context_meta_type_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"events_meta_type_idx\\\",\\\"columns\\\":[\\\"_meta_type\\\"]},{\\\"name\\\":\\\"events_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"events_parent_id_idx\\\",\\\"columns\\\":[\\\"parent_id\\\"]},{\\\"name\\\":\\\"events_series_id_idx\\\",\\\"columns\\\":[\\\"series_id\\\"]},{\\\"name\\\":\\\"events_type_id_idx\\\",\\\"columns\\\":[\\\"type_id\\\"]},{\\\"name\\\":\\\"events_place_id_idx\\\",\\\"columns\\\":[\\\"place_id\\\"]}],\\\"version\\\":\\\"8e689646\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:EventAsset\\\":{\\\"name\\\":\\\"eventasset\\\",\\\"className\\\":\\\"EventAsset\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventAsset\\\",\\\"collection\\\":\\\"eventassets\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/models/EventAsset.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"eventId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":true,\\\"related\\\":\\\"Event\\\",\\\"_meta\\\":{\\\"required\\\":true}},\\\"assetId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"required\\\":true,\\\"related\\\":\\\"@happyvertical/smrt-assets:Asset\\\"},\\\"relationship\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"sortOrder\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"default\\\":0}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"event_assets\\\",\\\"conflictColumns\\\":[\\\"event_id\\\",\\\"asset_id\\\",\\\"relationship\\\"],\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"}},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"EventAsset\\\",\\\"collectionExportName\\\":\\\"EventAssetCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"eventId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"foreignKey\\\"},{\\\"field\\\":\\\"assetId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"crossPackageRef\\\"},{\\\"field\\\":\\\"relationship\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"sortOrder\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"event_assets\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"event_assets\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"event_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"asset_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"relationship\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"sort_order\\\\\\\" INTEGER NOT NULL DEFAULT 0\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"event_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"events\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"CASCADE\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"asset_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"relationship\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"sort_order\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":0}},\\\"indexes\\\":[{\\\"name\\\":\\\"event_assets_event_id_asset_id_idx\\\",\\\"columns\\\":[\\\"event_id\\\",\\\"asset_id\\\",\\\"relationship\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"event_assets_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"event_assets_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"event_assets_asset_id_idx\\\",\\\"columns\\\":[\\\"asset_id\\\"]}],\\\"version\\\":\\\"aeebedc6\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:EventParticipant\\\":{\\\"name\\\":\\\"eventparticipant\\\",\\\"className\\\":\\\"EventParticipant\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventParticipant\\\",\\\"collection\\\":\\\"eventparticipants\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/models/EventParticipant.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"eventId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":false,\\\"related\\\":\\\"Event\\\",\\\"description\\\":\\\"The event the person takes part in.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"The event the person takes part in.\\\"}},\\\"profileId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"required\\\":false,\\\"related\\\":\\\"@happyvertical/smrt-profiles:Profile\\\",\\\"description\\\":\\\"The person taking part.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"The person taking part.\\\"}},\\\"role\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\",\\\"description\\\":\\\"What they do there, for example speaker or attendee.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"What they do there, for example speaker or attendee.\\\"}},\\\"placement\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":false},\\\"groupId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"externalId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"source\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"createdAt\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"updatedAt\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false}},\\\"methods\\\":{\\\"getMetadata\\\":{\\\"name\\\":\\\"getMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Record<string, unknown>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setMetadata\\\":{\\\"name\\\":\\\"setMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"data\\\",\\\"type\\\":\\\"Record<string, unknown>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"updateMetadata\\\":{\\\"name\\\":\\\"updateMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"updates\\\",\\\"type\\\":\\\"Record<string, unknown>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getEvent\\\":{\\\"name\\\":\\\"getEvent\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getProfile\\\":{\\\"name\\\":\\\"getProfile\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getGroupParticipants\\\":{\\\"name\\\":\\\"getGroupParticipants\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"isHome\\\":{\\\"name\\\":\\\"isHome\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"isAway\\\":{\\\"name\\\":\\\"isAway\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"conflictColumns\\\":[\\\"event_id\\\",\\\"profile_id\\\",\\\"role\\\"],\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\"]},\\\"cli\\\":{\\\"skipApiCheck\\\":true},\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"}},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"EventParticipant\\\",\\\"collectionExportName\\\":\\\"EventParticipantCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"event_participants\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"event_participants\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"event_id\\\\\\\" UUID,\\\\n \\\\\\\"profile_id\\\\\\\" UUID,\\\\n \\\\\\\"role\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"placement\\\\\\\" INTEGER,\\\\n \\\\\\\"group_id\\\\\\\" TEXT,\\\\n \\\\\\\"metadata\\\\\\\" TEXT,\\\\n \\\\\\\"external_id\\\\\\\" TEXT,\\\\n \\\\\\\"source\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"event_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"events\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"CASCADE\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"profile_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"role\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"placement\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"group_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"external_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"source\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"event_participants_event_id_profile_id_idx\\\",\\\"columns\\\":[\\\"event_id\\\",\\\"profile_id\\\",\\\"role\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"event_participants_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"event_participants_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"event_participants_profile_id_idx\\\",\\\"columns\\\":[\\\"profile_id\\\"]}],\\\"version\\\":\\\"c2faac84\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:EventSeries\\\":{\\\"name\\\":\\\"eventseries\\\",\\\"className\\\":\\\"EventSeries\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventSeries\\\",\\\"collection\\\":\\\"eventserieses\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/models/EventSeries.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{\\\"created_at\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false},\\\"updated_at\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false},\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"name\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\",\\\"description\\\":\\\"What the series is called.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"What the series is called.\\\"}},\\\"typeId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":false,\\\"related\\\":\\\"EventType\\\",\\\"description\\\":\\\"The kind of event in this series.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"The kind of event in this series.\\\"}},\\\"organizerId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"required\\\":false,\\\"related\\\":\\\"@happyvertical/smrt-profiles:Profile\\\",\\\"description\\\":\\\"Who runs the series.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"Who runs the series.\\\"}},\\\"description\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"description\\\":\\\"What the series is about.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"What the series is about.\\\"}},\\\"startDate\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"description\\\":\\\"When the series begins.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"When the series begins.\\\"}},\\\"endDate\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"description\\\":\\\"When the series ends.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"When the series ends.\\\"}},\\\"recurrence\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"description\\\":\\\"How often it repeats.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"How often it repeats.\\\"}},\\\"metadata\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"externalId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"source\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"createdAt\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"updatedAt\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false}},\\\"methods\\\":{\\\"getRecurrence\\\":{\\\"name\\\":\\\"getRecurrence\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"RecurrencePattern | null\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setRecurrence\\\":{\\\"name\\\":\\\"setRecurrence\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"pattern\\\",\\\"type\\\":\\\"RecurrencePattern\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getOccurrences\\\":{\\\"name\\\":\\\"getOccurrences\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"rangeStart\\\",\\\"type\\\":\\\"Date\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"rangeEnd\\\",\\\"type\\\":\\\"Date\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"options\\\",\\\"type\\\":\\\"object\\\",\\\"optional\\\":true,\\\"memberTypes\\\":[\\\"string\\\",\\\"Date\\\",\\\"number\\\"]}],\\\"returnType\\\":\\\"Date[]\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getMetadata\\\":{\\\"name\\\":\\\"getMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Record<string, unknown>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setMetadata\\\":{\\\"name\\\":\\\"setMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"data\\\",\\\"type\\\":\\\"Record<string, unknown>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"updateMetadata\\\":{\\\"name\\\":\\\"updateMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"updates\\\",\\\"type\\\":\\\"Record<string, unknown>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getType\\\":{\\\"name\\\":\\\"getType\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getOrganizer\\\":{\\\"name\\\":\\\"getOrganizer\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getEvents\\\":{\\\"name\\\":\\\"getEvents\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"isActive\\\":{\\\"name\\\":\\\"isActive\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableStrategy\\\":\\\"sti\\\",\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\"]},\\\"cli\\\":{\\\"skipApiCheck\\\":true},\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"EventSeries\\\",\\\"collectionExportName\\\":\\\"EventSeriesCollection\\\",\\\"displayLabelField\\\":\\\"name\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"event_series\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"event_series\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"_meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"_meta_data\\\\\\\" JSON,\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"type_id\\\\\\\" UUID,\\\\n \\\\\\\"organizer_id\\\\\\\" UUID,\\\\n \\\\\\\"description\\\\\\\" TEXT,\\\\n \\\\\\\"start_date\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"end_date\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"recurrence\\\\\\\" TEXT,\\\\n \\\\\\\"metadata\\\\\\\" TEXT,\\\\n \\\\\\\"external_id\\\\\\\" TEXT,\\\\n \\\\\\\"source\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"_meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"_meta_data\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"type_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"event_types\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"organizer_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"start_date\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false},\\\"end_date\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false},\\\"recurrence\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"external_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"source\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"event_series_slug_context_meta_type_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"event_series_meta_type_idx\\\",\\\"columns\\\":[\\\"_meta_type\\\"]},{\\\"name\\\":\\\"event_series_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"event_series_type_id_idx\\\",\\\"columns\\\":[\\\"type_id\\\"]},{\\\"name\\\":\\\"event_series_organizer_id_idx\\\",\\\"columns\\\":[\\\"organizer_id\\\"]}],\\\"version\\\":\\\"c79f5863\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:EventType\\\":{\\\"name\\\":\\\"eventtype\\\",\\\"className\\\":\\\"EventType\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventType\\\",\\\"collection\\\":\\\"eventtypes\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/models/EventType.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{\\\"created_at\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false},\\\"updated_at\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false},\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"name\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"default\\\":\\\"\\\",\\\"description\\\":\\\"What this kind of event is called, for example workshop.\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"description\\\":\\\"What this kind of event is called, for example workshop.\\\"}},\\\"description\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\",\\\"description\\\":\\\"What this kind of event is for.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"What this kind of event is for.\\\"}},\\\"schema\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"participantSchema\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"createdAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false},\\\"updatedAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false}},\\\"methods\\\":{\\\"getSchema\\\":{\\\"name\\\":\\\"getSchema\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Record<string, unknown>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setSchema\\\":{\\\"name\\\":\\\"setSchema\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"data\\\",\\\"type\\\":\\\"Record<string, unknown>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getParticipantSchema\\\":{\\\"name\\\":\\\"getParticipantSchema\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Record<string, unknown>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setParticipantSchema\\\":{\\\"name\\\":\\\"setParticipantSchema\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"data\\\",\\\"type\\\":\\\"Record<string, unknown>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getBySlug\\\":{\\\"name\\\":\\\"getBySlug\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"_slug\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventType | null>\\\",\\\"isStatic\\\":true,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableStrategy\\\":\\\"sti\\\",\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\"]},\\\"cli\\\":{\\\"skipApiCheck\\\":true},\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"EventType\\\",\\\"collectionExportName\\\":\\\"EventTypeCollection\\\",\\\"displayLabelField\\\":\\\"name\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"name\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"event_types\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"event_types\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"_meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"_meta_data\\\\\\\" JSON,\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"description\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"schema\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"participant_schema\\\\\\\" TEXT DEFAULT ''\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"_meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"_meta_data\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"schema\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"participant_schema\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"}},\\\"indexes\\\":[{\\\"name\\\":\\\"event_types_slug_context_meta_type_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"event_types_meta_type_idx\\\",\\\"columns\\\":[\\\"_meta_type\\\"]},{\\\"name\\\":\\\"event_types_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"922ae3b0\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"}},\\\"moduleType\\\":\\\"smrt\\\",\\\"recipes\\\":[{\\\"id\\\":\\\"events.calendar\\\",\\\"className\\\":\\\"CalendarRecipe\\\",\\\"label\\\":\\\"Events\\\",\\\"summary\\\":\\\"Schedule events, group them in series and track who takes part.\\\",\\\"synonyms\\\":[\\\"calendar\\\",\\\"schedule\\\",\\\"meetings\\\",\\\"bookings\\\",\\\"attendees\\\"],\\\"models\\\":[\\\"@happyvertical/smrt-events:Event\\\",\\\"@happyvertical/smrt-events:EventType\\\",\\\"@happyvertical/smrt-events:EventSeries\\\",\\\"@happyvertical/smrt-events:EventParticipant\\\"],\\\"nav\\\":[{\\\"label\\\":\\\"Events\\\",\\\"model\\\":\\\"@happyvertical/smrt-events:Event\\\",\\\"icon\\\":\\\"calendar\\\",\\\"description\\\":\\\"Everything on your calendar, with who and when.\\\"},{\\\"label\\\":\\\"Event types\\\",\\\"model\\\":\\\"@happyvertical/smrt-events:EventType\\\",\\\"icon\\\":\\\"tag\\\",\\\"description\\\":\\\"The kinds of events you run, such as workshops or classes.\\\"},{\\\"label\\\":\\\"Event series\\\",\\\"model\\\":\\\"@happyvertical/smrt-events:EventSeries\\\",\\\"icon\\\":\\\"repeat\\\",\\\"description\\\":\\\"Repeating schedules, like a class every Tuesday evening.\\\"}],\\\"requires\\\":[],\\\"section\\\":{\\\"id\\\":\\\"calendar\\\",\\\"label\\\":\\\"Calendar\\\",\\\"icon\\\":\\\"calendar\\\",\\\"description\\\":\\\"Events and what is scheduled when.\\\"},\\\"options\\\":{\\\"@happyvertical/smrt-events:Event\\\":{\\\"fields\\\":{\\\"parentId\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"round\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"metadata\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"externalId\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"source\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"timeZone\\\":{\\\"visibility\\\":\\\"hidden\\\"}}},\\\"@happyvertical/smrt-events:EventType\\\":{\\\"fields\\\":{\\\"schema\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"participantSchema\\\":{\\\"visibility\\\":\\\"hidden\\\"}}},\\\"@happyvertical/smrt-events:EventSeries\\\":{\\\"fields\\\":{\\\"metadata\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"externalId\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"source\\\":{\\\"visibility\\\":\\\"hidden\\\"}}},\\\"@happyvertical/smrt-events:EventParticipant\\\":{\\\"fields\\\":{\\\"groupId\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"placement\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"metadata\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"externalId\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"source\\\":{\\\"visibility\\\":\\\"hidden\\\"}}}},\\\"help\\\":{\\\"markdown\\\":\\\"## Overview\\\\n\\\\nEvents is your calendar. Each event has a time and a type, can belong to a\\\\nseries, and lists who takes part.\\\\n\\\\n## Tasks\\\\n\\\\n### Schedule an event\\\\n\\\\n1. Create a new event.\\\\n2. Enter the **{field:name}**, the **{field:startDate}** and the\\\\n **{field:endDate}**.\\\\n3. Pick the **{field:typeId}**, and the **{field:seriesId}** if it repeats.\\\\n4. Add the people taking part with their **{field:role}**.\\\\n\\\\n### Keep it current\\\\n\\\\n1. Update **{field:status}** as the event goes ahead, finishes or is postponed.\\\\n\\\",\\\"fieldRefs\\\":[\\\"endDate\\\",\\\"name\\\",\\\"role\\\",\\\"seriesId\\\",\\\"startDate\\\",\\\"status\\\",\\\"typeId\\\"]},\\\"surfaces\\\":[{\\\"kind\\\":\\\"route\\\",\\\"path\\\":\\\"/events/meeting\\\",\\\"export\\\":\\\"@happyvertical/smrt-events/svelte#MeetingView\\\",\\\"label\\\":\\\"Meeting view\\\"}],\\\"runtime\\\":\\\"both\\\",\\\"demo\\\":{\\\"mode\\\":\\\"server\\\",\\\"reasons\\\":[\\\"Needs a server because its package does not build for a browser: node:crypto; and its package depends on @happyvertical/smrt-places, @happyvertical/smrt-profiles, @happyvertical/smrt-tenancy, which do not build for a browser (#3617, #3624, #3626, #3627).\\\"]}}],\\\"smrtDependencies\\\":[\\\"@happyvertical/smrt-assets\\\",\\\"@happyvertical/smrt-core\\\",\\\"@happyvertical/smrt-places\\\",\\\"@happyvertical/smrt-profiles\\\",\\\"@happyvertical/smrt-tenancy\\\"],\\\"browser\\\":{\\\"status\\\":\\\"server-only\\\",\\\"issues\\\":[\\\"#3617\\\",\\\"#3624\\\",\\\"#3626\\\",\\\"#3627\\\"],\\\"reason\\\":\\\"node:crypto\\\",\\\"via\\\":[\\\"@happyvertical/smrt-places\\\",\\\"@happyvertical/smrt-profiles\\\",\\\"@happyvertical/smrt-tenancy\\\"]},\\\"stampsConstructors\\\":true}\"));\n","import {\n ICAL,\n type ICalendarComponent,\n type ICalendarParseLimits,\n parseICalendar,\n} from '@happyvertical/icalendar';\nimport {\n fromZonedWallTime,\n isValidTimeZone,\n toZonedWallTime,\n} from '../recurrence';\n\n/** A stable upstream identity for a calendar master or detached occurrence. */\nexport interface CalendarEventIdentity {\n source: string;\n uid: string;\n recurrenceId?: string;\n}\n\n/** Parsed data SMRT needs before applying its persistence policy. */\nexport interface CalendarParseOptions {\n floatingTimeZone?: string;\n limits?: ICalendarParseLimits;\n}\n\nexport interface CalendarEventInput {\n identity: CalendarEventIdentity;\n name: string;\n description: string;\n startDate: Date | null;\n endDate: Date | null;\n allDay: boolean;\n timeZone: string;\n status: 'scheduled' | 'cancelled';\n sequence: number | null;\n dtstamp: Date | null;\n recurrence: string | null;\n /** True for a detached record, false for a generated occurrence. */\n detached?: boolean;\n excludedRecurrenceIds: string[];\n additionalRecurrenceIds: string[];\n}\n\n/** A malformed calendar event cannot be given a stable source identity. */\nexport class CalendarEventValidationError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'CalendarEventValidationError';\n }\n}\n\ntype ICalendarTimeValue = InstanceType<typeof ICAL.Time>;\n\nfunction readText(component: ICalendarComponent, name: string): string {\n const value = component.getFirstPropertyValue(name);\n if (typeof value === 'string') return value;\n return value && typeof value.toString === 'function' ? value.toString() : '';\n}\n\nfunction readNumber(\n component: ICalendarComponent,\n name: string,\n): number | null {\n const value = component.getFirstPropertyValue(name);\n return typeof value === 'number' && Number.isSafeInteger(value)\n ? value\n : null;\n}\n\nfunction readTime(\n component: ICalendarComponent,\n name: string,\n): ICalendarTimeValue | null {\n const value = component.getFirstPropertyValue(name);\n return value instanceof ICAL.Time ? value : null;\n}\n\nfunction timeZone(component: ICalendarComponent, name: string): string {\n const parameter = component.getFirstProperty(name)?.getFirstParameter('tzid');\n if (typeof parameter === 'string') return parameter;\n const value = readTime(component, name);\n const tzid = value?.zone?.tzid;\n return typeof tzid === 'string' && tzid !== 'Z' && tzid !== 'floating'\n ? tzid\n : '';\n}\n\nfunction recurrenceId(\n value: ICalendarTimeValue | null,\n zone: string,\n): string | undefined {\n return value\n ? value.isDate\n ? value.toString()\n : instant(value, zone).toISOString()\n : undefined;\n}\n\nfunction recurrenceDates(\n component: ICalendarComponent,\n propertyName: string,\n zone: string,\n): string[] {\n return component.getAllProperties(propertyName).flatMap((property) => {\n const values = property.getValues();\n return values\n .filter(\n (value): value is ICalendarTimeValue => value instanceof ICAL.Time,\n )\n .map(\n (value) =>\n recurrenceId(\n value,\n String(property.getFirstParameter('tzid') || zone),\n )!,\n );\n });\n}\n\n/**\n * Parse VEVENT records with their RFC 5545 source identities and recurrence\n * exception data. This does not fetch a feed or persist anything.\n */\nexport function parseICalendarEvents(\n source: string,\n ics: string,\n options: CalendarParseOptions = {},\n): CalendarEventInput[] {\n if (!source.trim()) {\n throw new CalendarEventValidationError('Calendar source is required');\n }\n\n const { component } = parseICalendar(ics, options.limits);\n const seen = new Set<string>();\n return component.getAllSubcomponents('vevent').map((event) => {\n const uid = readText(event, 'uid').trim();\n if (!uid) {\n throw new CalendarEventValidationError('VEVENT UID is required');\n }\n\n const start = readTime(event, 'dtstart');\n const end = readTime(event, 'dtend');\n const instance = readTime(event, 'recurrence-id');\n const allDay = (start ?? instance)?.isDate === true;\n const resolvedTimeZone =\n timeZone(event, 'dtstart') ||\n timeZone(event, 'recurrence-id') ||\n options.floatingTimeZone ||\n (allDay ? 'UTC' : '');\n if ((start || instance) && !allDay && !resolvedTimeZone) {\n throw new CalendarEventValidationError(\n 'Floating DTSTART requires an explicit source time-zone policy',\n );\n }\n if (resolvedTimeZone && !isValidTimeZone(resolvedTimeZone)) {\n throw new CalendarEventValidationError('Unknown IANA time zone');\n }\n const identity = {\n source,\n uid,\n recurrenceId: recurrenceId(\n instance,\n timeZone(event, 'recurrence-id') || resolvedTimeZone,\n ),\n };\n const key = JSON.stringify([uid, identity.recurrenceId ?? null]);\n if (seen.has(key))\n throw new CalendarEventValidationError('Duplicate VEVENT identity');\n seen.add(key);\n const sequence = readNumber(event, 'sequence');\n if (event.hasProperty('sequence') && (sequence === null || sequence < 0)) {\n throw new CalendarEventValidationError('Invalid SEQUENCE');\n }\n const status = readText(event, 'status').toUpperCase();\n if (status && !['CONFIRMED', 'TENTATIVE', 'CANCELLED'].includes(status)) {\n throw new CalendarEventValidationError('Unsupported VEVENT STATUS');\n }\n if (!start && status !== 'CANCELLED') {\n throw new CalendarEventValidationError('VEVENT DTSTART is required');\n }\n if (\n event.hasProperty('duration') ||\n event.hasProperty('exrule') ||\n event.getFirstProperty('recurrence-id')?.getFirstParameter('range') ||\n event.getAllProperties('rdate').some((p) => p.type === 'period')\n ) {\n throw new CalendarEventValidationError(\n 'Unsupported DURATION, EXRULE, RANGE or PERIOD',\n );\n }\n const startDate = start ? instant(start, resolvedTimeZone) : null;\n if (start && end && start.isDate !== end.isDate)\n throw new CalendarEventValidationError(\n 'DTSTART and DTEND value types differ',\n );\n const endDate = end\n ? instant(end, timeZone(event, 'dtend') || resolvedTimeZone)\n : start && allDay\n ? instant(nextDay(start), resolvedTimeZone)\n : startDate;\n if (startDate && endDate && endDate < startDate) {\n throw new CalendarEventValidationError('DTEND precedes DTSTART');\n }\n\n return {\n identity,\n name: readText(event, 'summary'),\n description: readText(event, 'description'),\n startDate,\n endDate,\n detached: Boolean(instance),\n allDay,\n timeZone: resolvedTimeZone,\n status: status === 'CANCELLED' ? 'cancelled' : 'scheduled',\n sequence,\n dtstamp: readTime(event, 'dtstamp')?.toJSDate() ?? null,\n recurrence: readText(event, 'rrule') || null,\n excludedRecurrenceIds: recurrenceDates(event, 'exdate', resolvedTimeZone),\n additionalRecurrenceIds: recurrenceDates(\n event,\n 'rdate',\n resolvedTimeZone,\n ),\n };\n });\n}\n\nfunction nextDay(value: ICalendarTimeValue): ICalendarTimeValue {\n const next = value.clone();\n next.adjust(1, 0, 0, 0);\n return next;\n}\n\nfunction instant(value: ICalendarTimeValue, zone: string): Date {\n if (value.zone.tzid === 'UTC' || value.zone.tzid === 'Z')\n return value.toJSDate();\n return fromZonedWallTime(\n {\n year: value.year,\n month: value.month,\n day: value.day,\n hour: value.hour,\n minute: value.minute,\n second: value.second,\n millisecond: 0,\n },\n zone || 'UTC',\n );\n}\n\nexport interface CalendarExpansionOptions extends CalendarParseOptions {\n rangeStart: Date;\n rangeEnd: Date;\n /** Hard cap: exceeding it rejects the feed, never returns a partial success. */\n limit?: number;\n /** Includes occurrences scanned before the requested window. */\n maxIterations?: number;\n}\n\n/** Expand a caller-bounded window through the SDK's public recurrence engine.\n * Range endpoints are inclusive. Detached records replace their original slot;\n * EXDATE slots are returned as cancellations so previously persisted occurrences\n * are cancelled as well. No master is returned alongside its first occurrence.\n */\nexport function expandICalendarEvents(\n source: string,\n ics: string,\n options: CalendarExpansionOptions,\n): CalendarEventInput[] {\n const { rangeStart, rangeEnd } = options;\n const limit = options.limit ?? 1000;\n const maxIterations = options.maxIterations ?? 10000;\n if (\n !Number.isFinite(rangeStart.getTime()) ||\n !Number.isFinite(rangeEnd.getTime()) ||\n rangeEnd < rangeStart ||\n !Number.isSafeInteger(limit) ||\n limit < 1 ||\n limit > 10000 ||\n !Number.isSafeInteger(maxIterations) ||\n maxIterations < 1 ||\n maxIterations > 100000\n ) {\n throw new CalendarEventValidationError('Invalid expansion bounds');\n }\n const inputs = parseICalendarEvents(source, ics, options);\n const components = parseICalendar(\n ics,\n options.limits,\n ).component.getAllSubcomponents('vevent');\n const rows = new Map<string, CalendarEventInput>();\n let iterations = 0;\n const key = (entry: CalendarEventInput) =>\n JSON.stringify([entry.identity.uid, entry.identity.recurrenceId ?? null]);\n const put = (entry: CalendarEventInput) => {\n const previous = rows.get(key(entry));\n if (!previous || entry.detached || !previous.detached)\n rows.set(key(entry), entry);\n if (rows.size > limit)\n throw new CalendarEventValidationError(\n 'Calendar occurrence limit exceeded',\n );\n };\n for (let index = 0; index < inputs.length; index++) {\n const entry = inputs[index];\n if (entry.detached) continue;\n const component = components[index];\n if (!entry.recurrence && !entry.additionalRecurrenceIds.length) {\n if (\n !entry.startDate ||\n (entry.startDate >= rangeStart && entry.startDate <= rangeEnd)\n )\n put(entry);\n continue;\n }\n const start = readTime(component, 'dtstart');\n if (!start)\n throw new CalendarEventValidationError(\n 'Recurring master requires DTSTART',\n );\n const rules = component.getAllProperties('rrule');\n for (const property of rules) {\n const raw = property.toJSON()[3];\n const supported = new Set([\n 'freq',\n 'interval',\n 'count',\n 'until',\n 'wkst',\n 'bysecond',\n 'byminute',\n 'byhour',\n 'byday',\n 'bymonthday',\n 'byyearday',\n 'byweekno',\n 'bymonth',\n 'bysetpos',\n ]);\n if (\n raw &&\n typeof raw === 'object' &&\n Object.keys(raw).some((key) => !supported.has(key))\n ) {\n throw new CalendarEventValidationError(\n 'Unsupported recurrence property',\n );\n }\n }\n if (rules.length > 1)\n throw new CalendarEventValidationError('Multiple RRULEs unsupported');\n for (const property of rules) {\n const rule = property.getFirstValue();\n if (\n !(rule instanceof ICAL.Recur) ||\n !['DAILY', 'WEEKLY', 'MONTHLY', 'YEARLY'].includes(rule.freq) ||\n rule.interval < 1 ||\n (rule.count !== null && rule.count < 1)\n ) {\n throw new CalendarEventValidationError(\n 'Unsupported or malformed recurrence',\n );\n }\n if (rule instanceof ICAL.Recur) {\n const allowedParts: Record<string, string[]> = {\n DAILY: [],\n WEEKLY: ['BYDAY'],\n MONTHLY: ['BYDAY', 'BYMONTHDAY', 'BYSETPOS'],\n YEARLY: ['BYMONTH', 'BYMONTHDAY'],\n };\n if (\n Object.keys(rule.parts).some(\n (part) => !allowedParts[rule.freq]?.includes(part),\n ) ||\n (rule.freq === 'MONTHLY' &&\n ((rule.parts.BYMONTHDAY && rule.parts.BYDAY) ||\n (rule.parts.BYSETPOS && !rule.parts.BYDAY))) ||\n (rule.freq === 'WEEKLY' &&\n rule.parts.BYDAY?.some((day) => !/^[A-Z]{2}$/.test(day)))\n ) {\n throw new CalendarEventValidationError(\n 'Unsupported recurrence combination',\n );\n }\n }\n }\n // EXDATE is processed as an explicit cancellation, not silently dropped.\n const expansionComponent = new ICAL.Component(\n JSON.parse(JSON.stringify(component.toJSON())),\n );\n expansionComponent.removeAllProperties('exdate');\n // RDATEs are already normalized with each property's own TZID. Do not\n // reinterpret their wall fields through the master's zone in the iterator.\n expansionComponent.removeAllProperties('rdate');\n // ICAL's floating representation has no IANA offset database. Compare an\n // UNTIL instant in the same wall zone as DTSTART, then expand wall slots.\n for (const property of expansionComponent.getAllProperties('rrule')) {\n const rule = property.getFirstValue();\n if (rule instanceof ICAL.Recur) {\n const declaredUntil = rule.until\n ? instant(rule.until, entry.timeZone)\n : rangeEnd;\n const until = declaredUntil < rangeEnd ? declaredUntil : rangeEnd;\n const wall = toZonedWallTime(until, entry.timeZone);\n rule.until = ICAL.Time.fromData(\n { ...wall, isDate: start.isDate },\n start.zone,\n );\n }\n }\n const iterator = new ICAL.RecurExpansion({\n component: expansionComponent,\n dtstart: start,\n });\n const duration =\n readTime(component, 'dtend')?.subtractDate(start) ??\n ICAL.Duration.fromSeconds(entry.allDay ? 86400 : 0);\n const emitted = new Set<string>();\n const emit = (\n occurrence: ICalendarTimeValue,\n startDate: Date,\n id: string,\n ) => {\n if (startDate < rangeStart || startDate > rangeEnd || emitted.has(id))\n return;\n emitted.add(id);\n const end = occurrence.clone();\n end.addDuration(duration);\n put({\n ...entry,\n identity: { ...entry.identity, recurrenceId: id },\n startDate,\n endDate: entry.allDay\n ? instant(end, entry.timeZone)\n : new Date(\n startDate.getTime() +\n ((entry.endDate?.getTime() ?? 0) -\n (entry.startDate?.getTime() ?? 0)),\n ),\n detached: false,\n status: entry.excludedRecurrenceIds.includes(id)\n ? 'cancelled'\n : entry.status,\n });\n };\n for (;;) {\n if (++iterations > maxIterations)\n throw new CalendarEventValidationError(\n 'Calendar iteration limit exceeded',\n );\n const occurrence = iterator.next();\n if (!occurrence) break;\n const startDate = instant(occurrence, entry.timeZone);\n if (startDate > rangeEnd) break;\n emit(occurrence, startDate, recurrenceId(occurrence, entry.timeZone)!);\n }\n for (const additional of entry.additionalRecurrenceIds) {\n if (++iterations > maxIterations)\n throw new CalendarEventValidationError(\n 'Calendar iteration limit exceeded',\n );\n const occurrence = ICAL.Time.fromString(additional, undefined);\n emit(occurrence, instant(occurrence, entry.timeZone), additional);\n }\n for (const excluded of entry.excludedRecurrenceIds) {\n if (emitted.has(excluded)) continue;\n const startDate = excluded.endsWith('Z')\n ? new Date(excluded)\n : instant(ICAL.Time.fromString(excluded, undefined), entry.timeZone);\n if (startDate >= rangeStart && startDate <= rangeEnd)\n put({\n ...entry,\n identity: { ...entry.identity, recurrenceId: excluded },\n startDate,\n endDate: startDate,\n status: 'cancelled',\n detached: false,\n });\n }\n }\n for (const entry of inputs.filter((e) => e.detached)) {\n // Include an exception when its original OR moved slot is in the window.\n const originalId = entry.identity.recurrenceId!;\n const original = originalId.endsWith('Z')\n ? new Date(originalId)\n : instant(ICAL.Time.fromString(originalId, undefined), entry.timeZone);\n if (\n (original >= rangeStart && original <= rangeEnd) ||\n (entry.startDate &&\n entry.startDate >= rangeStart &&\n entry.startDate <= rangeEnd)\n )\n put(entry);\n }\n return [...rows.values()].sort(\n (a, b) => (a.startDate?.getTime() ?? 0) - (b.startDate?.getTime() ?? 0),\n );\n}\n","/**\n * Event model - Hierarchical event instances\n *\n * Infinitely nestable: Game → Period → Goal → Assist\n */\n\nimport type { Asset } from '@happyvertical/smrt-assets';\nimport {\n assertValidOwnedAssetRelationship,\n assertValidOwnedAssetSortOrder,\n resolveOwnedAssetsById,\n} from '@happyvertical/smrt-assets';\nimport {\n crossPackageRef,\n field,\n foreignKey,\n SmrtHierarchical,\n smrt,\n} from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport type { EventOptions, EventStatus } from '../types';\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableStrategy: 'sti',\n api: { include: ['list', 'get', 'create', 'update', 'delete'] },\n mcp: { include: ['list', 'get', 'create', 'update'] },\n cli: { skipApiCheck: true },\n})\nexport class Event extends SmrtHierarchical { static __smrtPackage__ = \"@happyvertical/smrt-events\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @field({ description: 'What the event is called.' })\n name: string = '';\n @field({ description: 'The series this event is part of, if any.' })\n @foreignKey('EventSeries', {\n constraint: { engines: ['postgres', 'sqlite'] },\n })\n seriesId = ''; // FK to EventSeries (nullable for standalone events)\n // DuckDB cannot enforce a self-FK; PostgreSQL/SQLite retain the physical\n // constraint while every engine retains UUID relationship semantics and\n // application-side delete enforcement.\n @foreignKey('Event', {\n nullable: true,\n constraint: { engines: ['postgres', 'sqlite'] },\n })\n override parentId: string | null = null;\n @field({ description: 'The kind of event.' })\n @foreignKey('EventType', {\n constraint: { engines: ['postgres', 'sqlite'] },\n })\n typeId = ''; // FK to EventType\n @field({ description: 'Where it takes place.' })\n @crossPackageRef('@happyvertical/smrt-places:Place')\n placeId = ''; // FK to Place (from @happyvertical/smrt-places)\n @field({ description: 'What the event is about.' })\n description = '';\n @field({ description: 'When it starts.' })\n startDate: Date | null = null;\n @field({ description: 'When it ends.' })\n endDate: Date | null = null;\n /**\n * True when the event occupies whole calendar days rather than a time\n * range. `startDate` is the first day (local midnight in `timeZone`) and\n * `endDate`, when set, is the exclusive end (midnight after the last day).\n */\n @field({ description: 'Whether the event lasts all day.' })\n allDay: boolean = false;\n /**\n * IANA time zone the event is scheduled in (for example\n * `America/Edmonton`). Empty means \"inherit\" from the series, place, or\n * site. Calendars and recurrence expansion compute wall-clock days in it.\n */\n timeZone = '';\n @field({\n description: 'scheduled, in progress, completed, cancelled or postponed.',\n })\n status: EventStatus = 'scheduled';\n round: number | null = null; // Sequence/round number in series\n metadata = ''; // JSON metadata (stored as text)\n externalId = ''; // External system identifier\n source = ''; // Source system\n\n // Timestamps\n createdAt = new Date();\n updatedAt = new Date();\n\n constructor(options: EventOptions = {}) {\n super(options);\n\n if (options.seriesId !== undefined) this.seriesId = options.seriesId;\n if (options.parentId !== undefined)\n this.parentId = options.parentId ?? null;\n if (options.typeId) this.typeId = options.typeId;\n if (options.placeId !== undefined) this.placeId = options.placeId;\n if (options.description !== undefined)\n this.description = options.description;\n if (options.startDate !== undefined)\n this.startDate = options.startDate || null;\n if (options.endDate !== undefined) this.endDate = options.endDate || null;\n if (options.allDay !== undefined) this.allDay = options.allDay;\n if (options.timeZone !== undefined) this.timeZone = options.timeZone;\n if (options.status !== undefined) this.status = options.status;\n if (options.round !== undefined) this.round = options.round;\n if (options.externalId !== undefined) this.externalId = options.externalId;\n if (options.source !== undefined) this.source = options.source;\n\n // Handle metadata - can be object or JSON string\n if (options.metadata !== undefined) {\n if (typeof options.metadata === 'string') {\n this.metadata = options.metadata;\n } else {\n this.metadata = JSON.stringify(options.metadata);\n }\n }\n\n if (options.createdAt) this.createdAt = options.createdAt;\n if (options.updatedAt) this.updatedAt = options.updatedAt;\n }\n\n /**\n * Get metadata as parsed object\n *\n * @returns Parsed metadata object or empty object\n */\n getMetadata(): Record<string, unknown> {\n if (!this.metadata) return {};\n try {\n return JSON.parse(this.metadata);\n } catch {\n return {};\n }\n }\n\n /**\n * Set metadata from object\n *\n * @param data - Metadata object to store\n */\n setMetadata(data: Record<string, unknown>): void {\n this.metadata = JSON.stringify(data);\n }\n\n /**\n * Update metadata by merging with existing values\n *\n * @param updates - Partial metadata to merge\n */\n updateMetadata(updates: Record<string, unknown>): void {\n const current = this.getMetadata();\n this.setMetadata({ ...current, ...updates });\n }\n\n /**\n * Update event status\n *\n * @param newStatus - New status to set\n */\n async updateStatus(newStatus: EventStatus): Promise<void> {\n this.status = newStatus;\n this.updatedAt = new Date();\n await this.save();\n }\n\n /**\n * Get the series for this event\n *\n * @returns EventSeries instance or null\n */\n async getSeries() {\n if (!this.seriesId) return null;\n\n const { EventSeriesCollection } = await import(\n '../collections/EventSeriesCollection'\n );\n const collection = await EventSeriesCollection.create(this.options);\n\n return await collection.get({ id: this.seriesId });\n }\n\n /**\n * Get the event type\n *\n * @returns EventType instance or null\n */\n async getType() {\n if (!this.typeId) return null;\n\n const { EventTypeCollection } = await import(\n '../collections/EventTypeCollection'\n );\n const collection = await EventTypeCollection.create(this.options);\n\n return await collection.get({ id: this.typeId });\n }\n\n /**\n * Get the place for this event\n *\n * @returns Place instance or null\n */\n async getPlace() {\n if (!this.placeId) return null;\n\n try {\n const { PlaceCollection } = await import('@happyvertical/smrt-places');\n const collection = await PlaceCollection.create(this.options);\n\n return await collection.get({ id: this.placeId });\n } catch {\n // @happyvertical/smrt-places not available\n return null;\n }\n }\n\n // Hierarchy traversal (getParent / getChildren / getAncestors /\n // getDescendants / getHierarchy / moveTo) provided by SmrtHierarchical.\n\n /**\n * Get the root event (top-level ancestor) of this event's hierarchy.\n *\n * @returns Root event instance — `this` when already root\n */\n async getRootEvent(): Promise<Event> {\n const ancestors = await this.getAncestors();\n return (ancestors.length > 0 ? ancestors[0] : this) as Event;\n }\n\n /**\n * Get all participants for this event\n *\n * @returns Array of EventParticipant instances\n */\n async getParticipants() {\n const { EventParticipantCollection } = await import(\n '../collections/EventParticipantCollection'\n );\n const collection = await EventParticipantCollection.create(this.options);\n\n return await collection.list({ where: { eventId: this.id } });\n }\n\n private async getEventAssetCollection() {\n const { EventAssetCollection } = await import(\n '../collections/EventAssetCollection'\n );\n return EventAssetCollection.create({ db: this.db });\n }\n async getAssets(relationship?: string): Promise<Asset[]> {\n if (!this.id) {\n return [];\n }\n\n const eventAssets = await this.getEventAssetCollection();\n const linkedAssets = await eventAssets.byLeft(\n this.id,\n relationship ? { relationship } : {},\n );\n\n return resolveOwnedAssetsById(\n this.db,\n linkedAssets.map((link) => link.assetId),\n this.tenantId,\n );\n }\n\n async addAsset(\n asset: Asset,\n relationship = 'attachment',\n sortOrder = 0,\n ): Promise<void> {\n if (!this.id || !asset.id) {\n throw new Error('Cannot associate unsaved event or asset');\n }\n\n assertValidOwnedAssetRelationship(relationship);\n assertValidOwnedAssetSortOrder(sortOrder);\n\n const eventAssets = await this.getEventAssetCollection();\n await eventAssets.attach(this.id, asset.id, {\n relationship,\n sortOrder,\n tenantId: this.tenantId,\n });\n }\n\n async removeAsset(assetId: string, relationship?: string): Promise<void> {\n if (!this.id) {\n return;\n }\n\n const eventAssets = await this.getEventAssetCollection();\n await eventAssets.detach(\n this.id,\n assetId,\n relationship ? { relationship } : {},\n );\n }\n\n /**\n * Check if event is currently in progress\n *\n * @returns True if current time is between start and end\n */\n isInProgress(): boolean {\n if (this.status !== 'in_progress') return false;\n\n const now = new Date();\n if (this.startDate && now < this.startDate) return false;\n if (this.endDate && now > this.endDate) return false;\n\n return true;\n }\n\n /**\n * Check if event is a root event (no parent)\n *\n * @returns True if parentId is null/empty\n */\n isRoot(): boolean {\n return !this.parentId;\n }\n}\n","/**\n * EventCollection - Collection manager for Event objects\n *\n * Provides hierarchy traversal, filtering, and search capabilities.\n */\n\nimport type { Asset } from '@happyvertical/smrt-assets';\nimport {\n addOwnedAssetFromCollection,\n getOwnedAssetsFromCollection,\n removeOwnedAssetFromCollection,\n} from '@happyvertical/smrt-assets';\nimport { SmrtCollection } from '@happyvertical/smrt-core';\nimport { queryGlobal, queryWithGlobals } from '@happyvertical/smrt-tenancy';\nimport { Event } from '../models/Event';\nimport type { EventSearchFilters, EventStatus } from '../types';\n\nexport class EventCollection extends SmrtCollection<Event> {\n static readonly _itemClass = Event;\n\n /**\n * Get events by series\n *\n * @param seriesId - EventSeries ID\n * @returns Array of Event instances\n */\n async getBySeriesId(seriesId: string): Promise<Event[]> {\n return await this.list({ where: { seriesId } });\n }\n\n /**\n * Get events at a specific place\n *\n * @param placeId - Place ID\n * @returns Array of Event instances\n */\n async getByPlace(placeId: string): Promise<Event[]> {\n return await this.list({ where: { placeId } });\n }\n\n /**\n * Get events by date range\n *\n * @param startDate - Start of date range\n * @param endDate - End of date range\n * @returns Array of Event instances\n */\n async getByDateRange(startDate: Date, endDate: Date): Promise<Event[]> {\n const allEvents = await this.list({});\n\n return allEvents.filter((event) => {\n if (!event.startDate) return false;\n return event.startDate >= startDate && event.startDate <= endDate;\n });\n }\n\n /**\n * Get upcoming events\n *\n * @param limit - Maximum number of events to return\n * @returns Array of Event instances starting in the future\n */\n async getUpcoming(limit?: number): Promise<Event[]> {\n const allEvents = await this.list({});\n const now = new Date();\n\n const upcoming = allEvents\n .filter((event) => event.startDate && event.startDate > now)\n .sort((a, b) => {\n if (!a.startDate || !b.startDate) return 0;\n return a.startDate.getTime() - b.startDate.getTime();\n });\n\n return limit ? upcoming.slice(0, limit) : upcoming;\n }\n\n /**\n * Get events by status\n *\n * @param status - Event status to filter by\n * @returns Array of Event instances\n */\n async getByStatus(status: EventStatus): Promise<Event[]> {\n return await this.list({ where: { status } });\n }\n\n /**\n * Get events by type\n *\n * @param typeId - EventType ID\n * @returns Array of Event instances\n */\n async getByType(typeId: string): Promise<Event[]> {\n return await this.list({ where: { typeId } });\n }\n\n /**\n * Get root events (no parent)\n *\n * @returns Array of Event instances with no parent\n */\n async getRootEvents(): Promise<Event[]> {\n const allEvents = await this.list({});\n return allEvents.filter((event) => !event.parentId);\n }\n\n /**\n * Get children of a parent event\n *\n * @param parentId - Parent event ID\n * @returns Array of child Event instances\n */\n async getByParent(parentId: string): Promise<Event[]> {\n return await this.list({ where: { parentId } });\n }\n\n /**\n * Get full event tree (hierarchy)\n *\n * @param eventId - Root event ID\n * @returns Object with root event and nested children\n */\n async getEventTree(eventId: string): Promise<Event | null> {\n const event = await this.get({ id: eventId });\n if (!event) return null;\n\n return await event.getHierarchy().then((h) => h.current);\n }\n\n async getAssets(eventId: string, relationship?: string): Promise<Asset[]> {\n return getOwnedAssetsFromCollection(this, eventId, relationship);\n }\n\n async addAsset(\n eventId: string,\n asset: Asset,\n relationship = 'attachment',\n sortOrder = 0,\n ): Promise<void> {\n await addOwnedAssetFromCollection(\n this,\n 'Event',\n eventId,\n asset,\n relationship,\n sortOrder,\n );\n }\n\n async removeAsset(\n eventId: string,\n assetId: string,\n relationship?: string,\n ): Promise<void> {\n await removeOwnedAssetFromCollection(\n this,\n 'Event',\n eventId,\n assetId,\n relationship,\n );\n }\n\n /**\n * Search events with filters\n *\n * @param query - Search query for name/description\n * @param filters - Additional filter criteria\n * @returns Array of matching Event instances\n */\n async search(query: string, filters?: EventSearchFilters): Promise<Event[]> {\n let events = await this.list({});\n\n // Filter by query\n if (query) {\n const lowerQuery = query.toLowerCase();\n events = events.filter(\n (e) =>\n e.name?.toLowerCase().includes(lowerQuery) ||\n e.description?.toLowerCase().includes(lowerQuery),\n );\n }\n\n // Apply filters\n if (filters) {\n if (filters.typeId) {\n events = events.filter((e) => e.typeId === filters.typeId);\n }\n if (filters.seriesId) {\n events = events.filter((e) => e.seriesId === filters.seriesId);\n }\n if (filters.placeId) {\n events = events.filter((e) => e.placeId === filters.placeId);\n }\n if (filters.status) {\n if (Array.isArray(filters.status)) {\n events = events.filter((e) => filters.status?.includes(e.status));\n } else {\n events = events.filter((e) => e.status === filters.status);\n }\n }\n if (filters.startDate) {\n const startDate = filters.startDate;\n events = events.filter((e) => e.startDate && e.startDate >= startDate);\n }\n if (filters.endDate) {\n const endDate = filters.endDate;\n events = events.filter((e) => e.startDate && e.startDate <= endDate);\n }\n if (filters.organizerId) {\n // Filter by series organizer\n events = events.filter(async (e) => {\n const series = await e.getSeries();\n return series && series.organizerId === filters.organizerId;\n });\n }\n }\n\n return events;\n }\n\n /**\n * Get events in progress\n *\n * @returns Array of Event instances currently in progress\n */\n async getInProgress(): Promise<Event[]> {\n const inProgressEvents = await this.getByStatus('in_progress');\n return inProgressEvents.filter((event) => event.isInProgress());\n }\n\n // ============================================\n // Tenant Helper Methods\n // ============================================\n\n /**\n * Find all events for a specific tenant\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of Event instances for the tenant\n */\n async findByTenant(tenantId: string): Promise<Event[]> {\n return this.list({ where: { tenantId } });\n }\n\n /**\n * Find all global events (no tenant association).\n *\n * Routes through the shared tenant-global helper so it does not throw under\n * an active tenant context (an explicit `tenant_id IS NULL` filter would be\n * flagged as an isolation violation). (#1600)\n *\n * @returns Array of Event instances with no tenant\n */\n async findGlobal(): Promise<Event[]> {\n return queryGlobal<Event>(this);\n }\n\n /**\n * Find events for a tenant including global events.\n *\n * Fails closed if an active tenant context requests a different tenant's\n * rows; the admin/system path keeps the cross-tenant capability. (#1600)\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of Event instances for the tenant and global events\n */\n async findWithGlobals(tenantId: string): Promise<Event[]> {\n return queryWithGlobals<Event>(this, tenantId, 'Event.findWithGlobals');\n }\n}\n","/**\n * EventSeries model - Groups related events (season, tour, conference, etc.)\n *\n * Examples: '2024 NBA Finals', 'Summer Tour 2024', 'Town Council 2024'\n */\n\nimport {\n crossPackageRef,\n field,\n foreignKey,\n SmrtObject,\n smrt,\n} from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport { expandRecurrence } from '../recurrence';\nimport type { EventSeriesOptions, RecurrencePattern } from '../types';\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableStrategy: 'sti',\n api: { include: ['list', 'get', 'create', 'update', 'delete'] },\n mcp: { include: ['list', 'get', 'create', 'update'] },\n cli: { skipApiCheck: true },\n})\nexport class EventSeries extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-events\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @field({ description: 'What the series is called.' })\n name: string = '';\n @field({ description: 'The kind of event in this series.' })\n @foreignKey('EventType')\n typeId = ''; // FK to EventType\n @field({ description: 'Who runs the series.' })\n @crossPackageRef('@happyvertical/smrt-profiles:Profile')\n organizerId = ''; // FK to Profile (from @happyvertical/smrt-profiles)\n @field({ description: 'What the series is about.' })\n description = '';\n @field({ description: 'When the series begins.' })\n startDate: Date | null = null;\n @field({ description: 'When the series ends.' })\n endDate: Date | null = null;\n @field({ description: 'How often it repeats.' })\n recurrence = ''; // JSON recurrence pattern (stored as text)\n metadata = ''; // JSON metadata (stored as text)\n externalId = ''; // External system identifier\n source = ''; // Source system (e.g., 'ticketmaster', 'espn')\n\n // Timestamps\n createdAt = new Date();\n updatedAt = new Date();\n\n constructor(options: EventSeriesOptions = {}) {\n super(options);\n\n if (options.typeId) this.typeId = options.typeId;\n if (options.organizerId) this.organizerId = options.organizerId;\n if (options.description !== undefined)\n this.description = options.description;\n if (options.startDate !== undefined)\n this.startDate = options.startDate || null;\n if (options.endDate !== undefined) this.endDate = options.endDate || null;\n if (options.externalId !== undefined) this.externalId = options.externalId;\n if (options.source !== undefined) this.source = options.source;\n\n // Handle recurrence - can be object or JSON string\n if (options.recurrence !== undefined) {\n if (typeof options.recurrence === 'string') {\n this.recurrence = options.recurrence;\n } else {\n this.recurrence = JSON.stringify(options.recurrence);\n }\n }\n\n // Handle metadata - can be object or JSON string\n if (options.metadata !== undefined) {\n if (typeof options.metadata === 'string') {\n this.metadata = options.metadata;\n } else {\n this.metadata = JSON.stringify(options.metadata);\n }\n }\n\n if (options.createdAt) this.createdAt = options.createdAt;\n if (options.updatedAt) this.updatedAt = options.updatedAt;\n }\n\n /**\n * Get recurrence pattern as parsed object\n *\n * @returns Parsed recurrence pattern or null\n */\n getRecurrence(): RecurrencePattern | null {\n if (!this.recurrence) return null;\n try {\n return JSON.parse(this.recurrence) as RecurrencePattern;\n } catch {\n return null;\n }\n }\n\n /**\n * Set recurrence pattern from object\n *\n * @param pattern - Recurrence pattern to store\n */\n setRecurrence(pattern: RecurrencePattern): void {\n this.recurrence = JSON.stringify(pattern);\n }\n\n /**\n * Expand this series' recurrence into occurrence start instants within a\n * window. The first occurrence is `startDate` (or `options.start`); its\n * wall-clock time in the time zone is kept for every occurrence, and\n * `endDate` caps the series like an inclusive `until`.\n *\n * @param rangeStart - Inclusive window start\n * @param rangeEnd - Inclusive window end\n * @param options - Time zone (defaults to the pattern's `timeZone`, then UTC) and optional first occurrence\n * @returns Occurrence start instants, or an empty array without a pattern or start\n */\n getOccurrences(\n rangeStart: Date,\n rangeEnd: Date,\n options: { timeZone?: string; start?: Date; limit?: number } = {},\n ): Date[] {\n const pattern = this.getRecurrence();\n const start = options.start ?? this.startDate;\n if (!pattern || !start) return [];\n const end =\n this.endDate && this.endDate.getTime() < rangeEnd.getTime()\n ? this.endDate\n : rangeEnd;\n return expandRecurrence(pattern, {\n start,\n rangeStart,\n rangeEnd: end,\n timeZone: options.timeZone,\n limit: options.limit,\n });\n }\n\n /**\n * Get metadata as parsed object\n *\n * @returns Parsed metadata object or empty object\n */\n getMetadata(): Record<string, unknown> {\n if (!this.metadata) return {};\n try {\n return JSON.parse(this.metadata);\n } catch {\n return {};\n }\n }\n\n /**\n * Set metadata from object\n *\n * @param data - Metadata object to store\n */\n setMetadata(data: Record<string, unknown>): void {\n this.metadata = JSON.stringify(data);\n }\n\n /**\n * Update metadata by merging with existing values\n *\n * @param updates - Partial metadata to merge\n */\n updateMetadata(updates: Record<string, unknown>): void {\n const current = this.getMetadata();\n this.setMetadata({ ...current, ...updates });\n }\n\n /**\n * Get the event type for this series\n *\n * @returns EventType instance or null\n */\n async getType() {\n if (!this.typeId) return null;\n\n const { EventTypeCollection } = await import(\n '../collections/EventTypeCollection'\n );\n const collection = await EventTypeCollection.create(this.options);\n\n return await collection.get({ id: this.typeId });\n }\n\n /**\n * Get the organizer profile for this series\n *\n * @returns Profile instance or null\n */\n async getOrganizer() {\n if (!this.organizerId) return null;\n\n // Import Profile from @happyvertical/smrt-profiles\n try {\n const { ProfileCollection } = await import(\n '@happyvertical/smrt-profiles'\n );\n const collection = await ProfileCollection.create(this.options);\n\n return await collection.get({ id: this.organizerId });\n } catch {\n // @happyvertical/smrt-profiles not available\n return null;\n }\n }\n\n /**\n * Get all events in this series\n *\n * @returns Array of Event instances\n */\n async getEvents() {\n const { EventCollection } = await import('../collections/EventCollection');\n const collection = await EventCollection.create(this.options);\n\n return await collection.list({ where: { seriesId: this.id } });\n }\n\n /**\n * Check if series is currently active\n *\n * @returns True if current date is between start and end\n */\n isActive(): boolean {\n const now = new Date();\n if (this.startDate && now < this.startDate) return false;\n if (this.endDate && now > this.endDate) return false;\n return true;\n }\n}\n","/**\n * EventSeriesCollection - Collection manager for EventSeries objects\n *\n * Provides queries for series by organizer, status, and date ranges.\n */\n\nimport { SmrtCollection } from '@happyvertical/smrt-core';\nimport { queryGlobal, queryWithGlobals } from '@happyvertical/smrt-tenancy';\nimport { EventSeries } from '../models/EventSeries';\nimport type { EventSeriesSearchFilters } from '../types';\n\nexport class EventSeriesCollection extends SmrtCollection<EventSeries> {\n static readonly _itemClass = EventSeries;\n\n /**\n * Get series by organizer\n *\n * @param organizerId - Profile ID of the organizer\n * @returns Array of EventSeries instances\n */\n async getByOrganizer(organizerId: string): Promise<EventSeries[]> {\n return await this.list({ where: { organizerId } });\n }\n\n /**\n * Get currently active series\n *\n * @returns Array of EventSeries instances active today\n */\n async getActive(): Promise<EventSeries[]> {\n const allSeries = await this.list({});\n const now = new Date();\n\n return allSeries.filter((series) => {\n if (series.startDate && now < series.startDate) return false;\n if (series.endDate && now > series.endDate) return false;\n return true;\n });\n }\n\n /**\n * Get upcoming series\n *\n * @param limit - Maximum number of series to return\n * @returns Array of EventSeries instances starting in the future\n */\n async getUpcoming(limit?: number): Promise<EventSeries[]> {\n const allSeries = await this.list({});\n const now = new Date();\n\n const upcoming = allSeries\n .filter((series) => series.startDate && series.startDate > now)\n .sort((a, b) => {\n if (!a.startDate || !b.startDate) return 0;\n return a.startDate.getTime() - b.startDate.getTime();\n });\n\n return limit ? upcoming.slice(0, limit) : upcoming;\n }\n\n /**\n * Get series by type\n *\n * @param typeId - EventType ID\n * @returns Array of EventSeries instances\n */\n async getByType(typeId: string): Promise<EventSeries[]> {\n return await this.list({ where: { typeId } });\n }\n\n /**\n * Search series with filters\n *\n * @param query - Search query for name/description\n * @param filters - Additional filter criteria\n * @returns Array of matching EventSeries instances\n */\n async search(\n query: string,\n filters?: EventSeriesSearchFilters,\n ): Promise<EventSeries[]> {\n let series = await this.list({});\n\n // Filter by query\n if (query) {\n const lowerQuery = query.toLowerCase();\n series = series.filter(\n (s) =>\n s.name?.toLowerCase().includes(lowerQuery) ||\n s.description?.toLowerCase().includes(lowerQuery),\n );\n }\n\n // Apply filters\n if (filters) {\n if (filters.typeId) {\n series = series.filter((s) => s.typeId === filters.typeId);\n }\n if (filters.organizerId) {\n series = series.filter((s) => s.organizerId === filters.organizerId);\n }\n if (filters.startDate) {\n const startDate = filters.startDate;\n series = series.filter((s) => s.startDate && s.startDate >= startDate);\n }\n if (filters.endDate) {\n const endDate = filters.endDate;\n series = series.filter((s) => s.endDate && s.endDate <= endDate);\n }\n }\n\n return series;\n }\n\n // ============================================\n // Tenant Helper Methods\n // ============================================\n\n /**\n * Find all event series for a specific tenant\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of EventSeries instances for the tenant\n */\n async findByTenant(tenantId: string): Promise<EventSeries[]> {\n return this.list({ where: { tenantId } });\n }\n\n /**\n * Find all global event series (no tenant association).\n *\n * Routes through the shared tenant-global helper so it does not throw under\n * an active tenant context (an explicit `tenant_id IS NULL` filter would be\n * flagged as an isolation violation). (#1600)\n *\n * @returns Array of EventSeries instances with no tenant\n */\n async findGlobal(): Promise<EventSeries[]> {\n return queryGlobal<EventSeries>(this);\n }\n\n /**\n * Find event series for a tenant including global series.\n *\n * Fails closed if an active tenant context requests a different tenant's\n * rows; the admin/system path keeps the cross-tenant capability. (#1600)\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of EventSeries instances for the tenant and global series\n */\n async findWithGlobals(tenantId: string): Promise<EventSeries[]> {\n return queryWithGlobals<EventSeries>(\n this,\n tenantId,\n 'EventSeries.findWithGlobals',\n );\n }\n}\n","import { createHash } from 'node:crypto';\nimport { ICAL, parseICalendar } from '@happyvertical/icalendar';\nimport {\n type DatabaseConfig,\n resolveDatabase,\n type SmrtClassOptions,\n} from '@happyvertical/smrt-core';\nimport type { DatabaseInterface } from '@happyvertical/smrt-core/migrations';\nimport { getTenantId } from '@happyvertical/smrt-tenancy';\nimport { EventCollection } from '../collections/EventCollection';\nimport { EventSeriesCollection } from '../collections/EventSeriesCollection';\nimport type { Event } from '../models/Event';\nimport {\n type CalendarEventInput,\n type CalendarExpansionOptions,\n type CalendarParseOptions,\n expandICalendarEvents,\n parseICalendarEvents,\n} from './icalendar';\n\nexport interface CalendarSourceSyncOptions\n extends Omit<SmrtClassOptions, 'db'> {\n db: DatabaseConfig;\n source: string;\n ics: string;\n tenantId?: string | null;\n parse?: CalendarParseOptions;\n expansion?: Omit<CalendarExpansionOptions, keyof CalendarParseOptions>;\n}\n\nexport interface CalendarSourceSyncResult {\n created: number;\n updated: number;\n unchanged: number;\n /** Missing feed entries are deliberately retained; sync never deletes by omission. */\n retainedOnOmission: true;\n}\n\ninterface CalendarVersion {\n sequence: number | null;\n dtstamp: string | null;\n}\n\nfunction stableId(...parts: string[]): string {\n const hex = createHash('sha256').update(JSON.stringify(parts)).digest('hex');\n return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-5${hex.slice(13, 16)}-a${hex.slice(17, 20)}-${hex.slice(20, 32)}`;\n}\n\nfunction identityKey(entry: CalendarEventInput): string {\n return JSON.stringify([\n entry.identity.uid,\n entry.identity.recurrenceId ?? null,\n ]);\n}\n\nfunction versionFrom(event: Pick<Event, 'getMetadata'>): CalendarVersion {\n const calendar = event.getMetadata().calendar;\n if (!calendar || typeof calendar !== 'object')\n return { sequence: null, dtstamp: null };\n const record = calendar as Record<string, unknown>;\n return {\n sequence: typeof record.sequence === 'number' ? record.sequence : null,\n dtstamp: typeof record.dtstamp === 'string' ? record.dtstamp : null,\n };\n}\n\nfunction isNewer(\n entry: CalendarEventInput,\n existing: Pick<Event, 'getMetadata'>,\n): boolean {\n const previous = versionFrom(existing);\n const sequence = entry.sequence ?? 0;\n const oldSequence = previous.sequence ?? 0;\n if (sequence > oldSequence) return true;\n const stamp = entry.dtstamp?.toISOString() ?? '';\n const oldStamp = previous.dtstamp ?? '';\n return stamp > oldStamp;\n}\n\nfunction applyEvent(\n event: Event,\n entry: CalendarEventInput,\n seriesId: string,\n tenantId: string | null,\n): void {\n event.tenantId = tenantId;\n event.seriesId = seriesId;\n event.name = entry.name || (entry.status === 'cancelled' ? event.name : '');\n event.description =\n entry.description ||\n (entry.status === 'cancelled' ? event.description : '');\n event.startDate = entry.startDate ?? event.startDate;\n event.endDate = entry.endDate ?? event.endDate;\n if (entry.startDate) {\n event.allDay = entry.allDay;\n event.timeZone = entry.timeZone;\n }\n event.status = entry.status;\n event.source = entry.identity.source;\n event.externalId = entry.identity.uid;\n event.setMetadata({\n ...event.getMetadata(),\n calendar: {\n uid: entry.identity.uid,\n detached: entry.detached ?? false,\n recurrenceId: entry.identity.recurrenceId ?? null,\n sequence: entry.sequence,\n dtstamp: entry.dtstamp?.toISOString() ?? null,\n rrule: entry.recurrence,\n exdate: entry.excludedRecurrenceIds,\n rdate: entry.additionalRecurrenceIds,\n },\n });\n}\n\n/** Retain one authoritative master document per series, even when the requested\n * window has no occurrences. Expand retained documents, never a stale payload.\n * This runs on the same transaction executor as occurrence materialization.\n */\nasync function retainCalendarMasters(\n series: EventSeriesCollection,\n options: CalendarSourceSyncOptions,\n): Promise<string> {\n const parsed = parseICalendarEvents(\n options.source,\n options.ics,\n options.parse,\n );\n const components = parseICalendar(\n options.ics,\n options.parse?.limits,\n ).component.getAllSubcomponents('vevent');\n const calendar = new ICAL.Component('vcalendar');\n for (let index = 0; index < parsed.length; index++) {\n const entry = parsed[index];\n let component = components[index];\n if (!entry.detached) {\n const id = stableId(\n 'icalendar-series',\n options.tenantId ?? '',\n options.source,\n entry.identity.uid,\n );\n let sourceSeries = await series.get({ id });\n if (!sourceSeries) {\n sourceSeries = await series.create({\n id,\n tenantId: options.tenantId ?? null,\n name: entry.name,\n source: options.source,\n externalId: entry.identity.uid,\n });\n }\n const previous = sourceSeries.getMetadata().calendar;\n const record =\n previous && typeof previous === 'object'\n ? (previous as Record<string, unknown>)\n : {};\n if (\n typeof record.masterIcs === 'string' &&\n !isNewer(entry, sourceSeries)\n ) {\n const retained = parseICalendar(\n record.masterIcs,\n options.parse?.limits,\n ).component.getFirstSubcomponent('vevent');\n if (!retained)\n throw new Error('Stored calendar master is missing VEVENT');\n component = retained;\n } else {\n // Bind floating values to their authoritative source policy before saving\n // the SDK component. Future window requests cannot reinterpret that policy.\n for (const propertyName of [\n 'dtstart',\n 'dtend',\n 'recurrence-id',\n 'rdate',\n 'exdate',\n ]) {\n for (const property of component.getAllProperties(propertyName)) {\n const value = property.getFirstValue();\n if (\n value instanceof ICAL.Time &&\n !value.isDate &&\n value.zone.tzid === 'floating' &&\n !property.getFirstParameter('tzid') &&\n entry.timeZone\n ) {\n property.setParameter('tzid', entry.timeZone);\n }\n }\n }\n const document = new ICAL.Component('vcalendar');\n document.addSubcomponent(component);\n sourceSeries.name = entry.name || sourceSeries.name;\n sourceSeries.setMetadata({\n ...sourceSeries.getMetadata(),\n calendar: {\n uid: entry.identity.uid,\n sequence: entry.sequence,\n dtstamp: entry.dtstamp?.toISOString() ?? null,\n cancelled: entry.status === 'cancelled' && !entry.startDate,\n masterIcs: document.toString(),\n },\n });\n await sourceSeries.save();\n }\n }\n calendar.addSubcomponent(component);\n }\n return calendar.toString();\n}\n\nasync function syncParsed(\n db: DatabaseInterface,\n options: CalendarSourceSyncOptions,\n): Promise<CalendarSourceSyncResult> {\n const events = await EventCollection.create({ db });\n const series = await EventSeriesCollection.create({ db });\n const authoritativeIcs = await retainCalendarMasters(series, options);\n const entries = options.expansion\n ? expandICalendarEvents(options.source, authoritativeIcs, {\n ...options.parse,\n ...options.expansion,\n })\n : parseICalendarEvents(options.source, authoritativeIcs, options.parse);\n if (\n !options.expansion &&\n entries.some(\n (entry) => entry.recurrence || entry.additionalRecurrenceIds.length,\n )\n ) {\n throw new Error('Recurring calendar sync requires bounded expansion');\n }\n const tenantId = options.tenantId ?? null;\n let created = 0;\n let updated = 0;\n let unchanged = 0;\n\n for (const entry of entries) {\n const seriesId = stableId(\n 'icalendar-series',\n tenantId ?? '',\n options.source,\n entry.identity.uid,\n );\n let sourceSeries = await series.get({ id: seriesId });\n if (!sourceSeries) {\n sourceSeries = await series.create({\n id: seriesId,\n tenantId,\n name: entry.name,\n source: options.source,\n externalId: entry.identity.uid,\n });\n sourceSeries.setMetadata({ calendar: { uid: entry.identity.uid } });\n await sourceSeries.save();\n }\n\n if (\n entry.status === 'cancelled' &&\n !entry.startDate &&\n !entry.identity.recurrenceId\n ) {\n const affected = await events.list({ where: { seriesId, tenantId } });\n for (const event of affected) {\n if (!isNewer(entry, event)) {\n unchanged++;\n continue;\n }\n event.status = 'cancelled';\n const calendar = event.getMetadata().calendar;\n event.setMetadata({\n ...event.getMetadata(),\n calendar: {\n ...(calendar && typeof calendar === 'object' ? calendar : {}),\n sequence: entry.sequence,\n dtstamp: entry.dtstamp?.toISOString() ?? null,\n },\n });\n await event.save();\n updated++;\n }\n if (\n !(\n 'cancelled' in\n (sourceSeries.getMetadata().calendar as Record<string, unknown>)\n ) ||\n isNewer(entry, sourceSeries)\n ) {\n sourceSeries.setMetadata({\n ...sourceSeries.getMetadata(),\n calendar: {\n ...(sourceSeries.getMetadata().calendar as Record<string, unknown>),\n uid: entry.identity.uid,\n cancelled: true,\n sequence: entry.sequence,\n dtstamp: entry.dtstamp?.toISOString() ?? null,\n },\n });\n await sourceSeries.save();\n }\n continue;\n }\n\n const id = stableId(\n 'icalendar-event',\n tenantId ?? '',\n options.source,\n identityKey(entry),\n );\n const existing = await events.get({ id });\n const sourceCalendar = sourceSeries.getMetadata().calendar;\n if (\n sourceCalendar &&\n typeof sourceCalendar === 'object' &&\n 'cancelled' in sourceCalendar &&\n sourceCalendar.cancelled === true &&\n !isNewer(entry, sourceSeries)\n ) {\n unchanged++;\n continue;\n }\n const previousCalendar = existing?.getMetadata().calendar;\n const existingDetached =\n previousCalendar &&\n typeof previousCalendar === 'object' &&\n 'detached' in previousCalendar &&\n previousCalendar.detached === true;\n if (\n existing &&\n ((existingDetached && !entry.detached) || !isNewer(entry, existing))\n ) {\n unchanged += 1;\n continue;\n }\n const event = existing ?? (await events.create({ id }));\n applyEvent(event, entry, seriesId, tenantId);\n await event.save();\n if (existing) updated += 1;\n else created += 1;\n }\n\n return { created, updated, unchanged, retainedOnOmission: true };\n}\n\n/**\n * Persist one already-fetched calendar feed. The caller owns fetch, retries and\n * authorization; every write runs through one required database transaction. Feed omission never deletes an existing event.\n */\nexport async function syncICalendarSource(\n options: CalendarSourceSyncOptions,\n): Promise<CalendarSourceSyncResult> {\n if (!options.db) throw new Error('Calendar source sync requires a database');\n const activeTenant = getTenantId();\n const tenantId =\n options.tenantId === undefined ? (activeTenant ?? null) : options.tenantId;\n if (activeTenant && activeTenant !== tenantId)\n throw new Error('Calendar tenant isolation violation');\n const entries = parseICalendarEvents(\n options.source,\n options.ics,\n options.parse,\n );\n if (\n !options.expansion &&\n entries.some((e) => e.recurrence || e.additionalRecurrenceIds.length)\n ) {\n throw new Error('Recurring calendar sync requires bounded expansion');\n }\n const db = await resolveDatabase(options.db);\n if (db.requiresSchemaCheck)\n throw new Error(\n 'Calendar sync requires migrated SQLite/PostgreSQL schemas',\n );\n if (!db.transaction)\n throw new Error('Calendar source sync requires transaction()');\n return db.transaction((transaction) =>\n syncParsed(transaction, { ...options, tenantId }),\n );\n}\n","import type { SmrtObjectOptions } from '@happyvertical/smrt-core';\nimport {\n crossPackageRef,\n field,\n foreignKey,\n SmrtObject,\n smrt,\n} from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\n\nexport interface EventAssetOptions extends SmrtObjectOptions {\n eventId?: string;\n assetId?: string;\n relationship?: string;\n sortOrder?: number;\n tenantId?: string | null;\n}\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableName: 'event_assets',\n conflictColumns: ['event_id', 'asset_id', 'relationship'],\n api: false,\n mcp: false,\n cli: false,\n})\nexport class EventAsset extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-events\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @foreignKey('Event', { required: true })\n eventId = '';\n\n @crossPackageRef('@happyvertical/smrt-assets:Asset', { required: true })\n assetId = '';\n\n @field({ required: true })\n relationship = 'attachment';\n\n @field()\n sortOrder = 0;\n\n constructor(options: EventAssetOptions = {}) {\n super(options);\n if (options.eventId) this.eventId = options.eventId;\n if (options.assetId) this.assetId = options.assetId;\n if (options.relationship) this.relationship = options.relationship;\n if (options.sortOrder !== undefined) this.sortOrder = options.sortOrder;\n if (options.tenantId !== undefined) this.tenantId = options.tenantId;\n }\n}\n","import type { Asset } from '@happyvertical/smrt-assets';\nimport {\n addOwnedAssetFromCollection,\n getOwnedAssetsFromCollection,\n removeOwnedAssetFromCollection,\n} from '@happyvertical/smrt-assets';\nimport type { SmrtCollectionOptions } from '@happyvertical/smrt-core';\nimport { SmrtJunction, smrt } from '@happyvertical/smrt-core';\nimport { EventAsset } from '../models/EventAsset';\nimport type { EventCollection } from './EventCollection';\n\nexport interface EventAssetCollectionOptions extends SmrtCollectionOptions {}\n\n@smrt({\n api: false,\n mcp: false,\n cli: false,\n})\nexport class EventAssetCollection extends SmrtJunction<EventAsset> { static __smrtPackage__ = \"@happyvertical/smrt-events\";\n static readonly _itemClass = EventAsset;\n protected leftField = 'eventId';\n protected rightField = 'assetId';\n\n private eventCollectionPromise: Promise<EventCollection> | null = null;\n\n private async getEventCollection(): Promise<EventCollection> {\n if (!this.eventCollectionPromise) {\n const { EventCollection } = await import('./EventCollection');\n this.eventCollectionPromise = EventCollection.create({ db: this.db });\n }\n\n return this.eventCollectionPromise;\n }\n\n async getAssets(eventId: string, relationship?: string): Promise<Asset[]> {\n return getOwnedAssetsFromCollection(\n await this.getEventCollection(),\n eventId,\n relationship,\n );\n }\n\n async addAsset(\n eventId: string,\n asset: Asset,\n relationship = 'attachment',\n sortOrder = 0,\n ): Promise<void> {\n await addOwnedAssetFromCollection(\n await this.getEventCollection(),\n 'Event',\n eventId,\n asset,\n relationship,\n sortOrder,\n );\n }\n\n async removeAsset(\n eventId: string,\n assetId: string,\n relationship?: string,\n ): Promise<void> {\n await removeOwnedAssetFromCollection(\n await this.getEventCollection(),\n 'Event',\n eventId,\n assetId,\n relationship,\n );\n }\n}\n","/**\n * EventParticipant model - Links participants to events\n *\n * Tracks who participated in an event with role and placement\n */\n\nimport {\n crossPackageRef,\n field,\n foreignKey,\n SmrtObject,\n smrt,\n} from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport type { EventParticipantOptions } from '../types';\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n // Junction table - uses event_id + profile_id + role as natural key\n // instead of slug-based conflict columns\n conflictColumns: ['event_id', 'profile_id', 'role'],\n api: { include: ['list', 'get', 'create', 'update', 'delete'] },\n mcp: { include: ['list', 'get', 'create', 'update'] },\n cli: { skipApiCheck: true },\n})\nexport class EventParticipant extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-events\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n // id inherited from SmrtObject\n\n @field({ description: 'The event the person takes part in.' })\n @foreignKey('Event')\n eventId = ''; // FK to Event\n @field({ description: 'The person taking part.' })\n @crossPackageRef('@happyvertical/smrt-profiles:Profile')\n profileId = ''; // FK to Profile (from @happyvertical/smrt-profiles)\n @field({\n description: 'What they do there, for example speaker or attendee.',\n })\n role: string = ''; // Participant role (ParticipantRole or custom)\n placement: number | null = null; // Numeric position/placement\n groupId = ''; // Optional grouping (e.g., team ID for individual players)\n metadata = ''; // JSON metadata (stored as text)\n externalId = ''; // External system identifier\n source = ''; // Source system\n\n // Timestamps\n createdAt = new Date();\n updatedAt = new Date();\n\n constructor(options: EventParticipantOptions = {}) {\n super(options);\n\n if (options.eventId) this.eventId = options.eventId;\n if (options.profileId) this.profileId = options.profileId;\n if (options.role !== undefined) this.role = options.role;\n if (options.placement !== undefined) this.placement = options.placement;\n if (options.groupId !== undefined) this.groupId = options.groupId;\n if (options.externalId !== undefined) this.externalId = options.externalId;\n if (options.source !== undefined) this.source = options.source;\n\n // Handle metadata - can be object or JSON string\n if (options.metadata !== undefined) {\n if (typeof options.metadata === 'string') {\n this.metadata = options.metadata;\n } else {\n this.metadata = JSON.stringify(options.metadata);\n }\n }\n\n if (options.createdAt) this.createdAt = options.createdAt;\n if (options.updatedAt) this.updatedAt = options.updatedAt;\n }\n\n /**\n * Get metadata as parsed object\n *\n * @returns Parsed metadata object or empty object\n */\n getMetadata(): Record<string, unknown> {\n if (!this.metadata) return {};\n try {\n return JSON.parse(this.metadata);\n } catch {\n return {};\n }\n }\n\n /**\n * Set metadata from object\n *\n * @param data - Metadata object to store\n */\n setMetadata(data: Record<string, unknown>): void {\n this.metadata = JSON.stringify(data);\n }\n\n /**\n * Update metadata by merging with existing values\n *\n * @param updates - Partial metadata to merge\n */\n updateMetadata(updates: Record<string, unknown>): void {\n const current = this.getMetadata();\n this.setMetadata({ ...current, ...updates });\n }\n\n /**\n * Get the event for this participant\n *\n * @returns Event instance or null\n */\n async getEvent() {\n if (!this.eventId) return null;\n\n const { EventCollection } = await import('../collections/EventCollection');\n const collection = await EventCollection.create(this.options);\n\n return await collection.get({ id: this.eventId });\n }\n\n /**\n * Get the profile for this participant\n *\n * @returns Profile instance or null\n */\n async getProfile() {\n if (!this.profileId) return null;\n\n try {\n const { ProfileCollection } = await import(\n '@happyvertical/smrt-profiles'\n );\n const collection = await ProfileCollection.create(this.options);\n\n return await collection.get({ id: this.profileId });\n } catch {\n // @happyvertical/smrt-profiles not available\n return null;\n }\n }\n\n /**\n * Get group participants (others with same groupId)\n *\n * @returns Array of EventParticipant instances\n */\n async getGroupParticipants(): Promise<EventParticipant[]> {\n if (!this.groupId) return [];\n\n const { EventParticipantCollection } = await import(\n '../collections/EventParticipantCollection'\n );\n const collection = await EventParticipantCollection.create(this.options);\n\n const participants = await collection.list({\n where: { eventId: this.eventId, groupId: this.groupId },\n });\n\n // Exclude self from results\n return participants.filter((p: EventParticipant) => p.id !== this.id);\n }\n\n /**\n * Check if this is a home participant (placement = 0)\n *\n * @returns True if placement is 0\n */\n isHome(): boolean {\n return this.placement === 0;\n }\n\n /**\n * Check if this is an away participant (placement = 1)\n *\n * @returns True if placement is 1\n */\n isAway(): boolean {\n return this.placement === 1;\n }\n}\n","/**\n * EventParticipantCollection — junction collection for Event ↔ Profile links.\n *\n * The generic junction surface (byLeft/byRight/attach/detach/setLinks) comes\n * from `SmrtJunction`. Domain-specific helpers (placement-ordered queries,\n * home/away accessors, statistics, tenant scoping) live alongside.\n */\n\nimport { SmrtJunction, smrt } from '@happyvertical/smrt-core';\nimport { queryGlobal, queryWithGlobals } from '@happyvertical/smrt-tenancy';\nimport { EventParticipant } from '../models/EventParticipant';\nimport type { ParticipantSearchFilters } from '../types';\n\n// Decorator with empty config — only needed so the scanner detects the\n// class. See FactContentCollection for the full rationale.\n@smrt()\nexport class EventParticipantCollection extends SmrtJunction<EventParticipant> { static __smrtPackage__ = \"@happyvertical/smrt-events\";\n static readonly _itemClass = EventParticipant;\n protected leftField = 'eventId';\n protected rightField = 'profileId';\n // EventParticipant has no sortOrder column; `placement` is domain ordering\n // (0=home, 1=away) and must not be auto-assigned by setLinks.\n protected sortField: string | null = null;\n protected positionField: string | null = null;\n\n // ============================================\n // Domain helpers\n // ============================================\n\n /**\n * Get participants ordered by placement (nulls last).\n */\n async getByPlacement(eventId: string): Promise<EventParticipant[]> {\n const participants = await this.byLeft(eventId);\n\n return participants.sort((a, b) => {\n if (a.placement === null && b.placement === null) return 0;\n if (a.placement === null) return 1;\n if (b.placement === null) return -1;\n return a.placement - b.placement;\n });\n }\n\n /**\n * Get participants by group within an event.\n */\n async getByGroup(\n eventId: string,\n groupId: string,\n ): Promise<EventParticipant[]> {\n return this.byLeft(eventId, { groupId });\n }\n\n /**\n * Get the home participant(s) — placement = 0.\n */\n async getHome(eventId: string): Promise<EventParticipant[]> {\n return this.byLeft(eventId, { placement: 0 });\n }\n\n /**\n * Get the away participant(s) — placement = 1.\n */\n async getAway(eventId: string): Promise<EventParticipant[]> {\n return this.byLeft(eventId, { placement: 1 });\n }\n\n /**\n * Search participants with optional filters.\n */\n async search(filters: ParticipantSearchFilters): Promise<EventParticipant[]> {\n let participants = await this.list({});\n\n if (filters.eventId) {\n participants = participants.filter((p) => p.eventId === filters.eventId);\n }\n if (filters.profileId) {\n participants = participants.filter(\n (p) => p.profileId === filters.profileId,\n );\n }\n if (filters.role) {\n participants = participants.filter((p) => p.role === filters.role);\n }\n if (filters.groupId) {\n participants = participants.filter((p) => p.groupId === filters.groupId);\n }\n\n return participants;\n }\n\n /**\n * Get participation statistics for a profile, optionally filtered by event type.\n */\n async getParticipantStats(\n profileId: string,\n eventTypeId?: string,\n ): Promise<{\n totalEvents: number;\n byRole: Record<string, number>;\n byPlacement: Record<number, number>;\n }> {\n const participants = await this.byRight(profileId);\n\n let filteredParticipants = participants;\n if (eventTypeId) {\n filteredParticipants = [];\n for (const participant of participants) {\n const event = await participant.getEvent();\n if (event && event.typeId === eventTypeId) {\n filteredParticipants.push(participant);\n }\n }\n }\n\n const byRole: Record<string, number> = {};\n const byPlacement: Record<number, number> = {};\n\n for (const participant of filteredParticipants) {\n byRole[participant.role] = (byRole[participant.role] || 0) + 1;\n\n if (participant.placement !== null) {\n byPlacement[participant.placement] =\n (byPlacement[participant.placement] || 0) + 1;\n }\n }\n\n return {\n totalEvents: filteredParticipants.length,\n byRole,\n byPlacement,\n };\n }\n\n // ============================================\n // Tenant helpers\n // ============================================\n\n async findByTenant(tenantId: string): Promise<EventParticipant[]> {\n return this.list({ where: { tenantId } });\n }\n\n /**\n * Find all global participants (no tenant association).\n *\n * Routes through the shared tenant-global helper so it does not throw under\n * an active tenant context (an explicit `tenant_id IS NULL` filter would be\n * flagged as an isolation violation). (#1600)\n */\n async findGlobal(): Promise<EventParticipant[]> {\n return queryGlobal<EventParticipant>(this);\n }\n\n /**\n * Find participants for a tenant plus all global participants.\n *\n * Fails closed if an active tenant context requests a different tenant's\n * rows; the admin/system path keeps the cross-tenant capability. (#1600)\n */\n async findWithGlobals(tenantId: string): Promise<EventParticipant[]> {\n return queryWithGlobals<EventParticipant>(\n this,\n tenantId,\n 'EventParticipant.findWithGlobals',\n );\n }\n}\n","/**\n * EventType model - Defines types/categories of events\n *\n * Examples: 'basketball-game', 'concert', 'conference', 'goal', 'period'\n */\n\nimport { field, SmrtObject, smrt } from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport type { EventTypeOptions } from '../types';\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableStrategy: 'sti',\n api: { include: ['list', 'get', 'create', 'update', 'delete'] },\n mcp: { include: ['list', 'get', 'create'] },\n cli: { skipApiCheck: true },\n})\nexport class EventType extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-events\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @field({\n required: true,\n description: 'What this kind of event is called, for example workshop.',\n })\n name: string = '';\n\n @field({ description: 'What this kind of event is for.' })\n description: string = ''; // Optional description\n schema: string = ''; // JSON schema for event metadata (stored as text)\n participantSchema: string = ''; // JSON schema for participant metadata (stored as text)\n\n // Timestamps\n createdAt: Date = new Date();\n updatedAt: Date = new Date();\n\n constructor(options: EventTypeOptions = {}) {\n super(options);\n if (options.name) this.name = options.name;\n if (options.description !== undefined)\n this.description = options.description;\n\n // Handle schema - can be object or JSON string\n if (options.schema !== undefined) {\n if (typeof options.schema === 'string') {\n this.schema = options.schema;\n } else {\n this.schema = JSON.stringify(options.schema);\n }\n }\n\n // Handle participant schema\n if (options.participantSchema !== undefined) {\n if (typeof options.participantSchema === 'string') {\n this.participantSchema = options.participantSchema;\n } else {\n this.participantSchema = JSON.stringify(options.participantSchema);\n }\n }\n\n if (options.createdAt) this.createdAt = options.createdAt;\n if (options.updatedAt) this.updatedAt = options.updatedAt;\n }\n\n /**\n * Get schema as parsed object\n *\n * @returns Parsed schema object or empty object if no schema\n */\n getSchema(): Record<string, unknown> {\n if (!this.schema) return {};\n try {\n return JSON.parse(this.schema);\n } catch {\n return {};\n }\n }\n\n /**\n * Set schema from object\n *\n * @param data - Schema object to store\n */\n setSchema(data: Record<string, unknown>): void {\n this.schema = JSON.stringify(data);\n }\n\n /**\n * Get participant schema as parsed object\n *\n * @returns Parsed participant schema object or empty object\n */\n getParticipantSchema(): Record<string, unknown> {\n if (!this.participantSchema) return {};\n try {\n return JSON.parse(this.participantSchema);\n } catch {\n return {};\n }\n }\n\n /**\n * Set participant schema from object\n *\n * @param data - Participant schema object to store\n */\n setParticipantSchema(data: Record<string, unknown>): void {\n this.participantSchema = JSON.stringify(data);\n }\n\n /**\n * Convenience method for slug-based lookup\n *\n * @param slug - The slug to search for\n * @returns EventType instance or null if not found\n */\n static async getBySlug(_slug: string): Promise<EventType | null> {\n // Will be auto-implemented by SMRT\n return null;\n }\n}\n","/**\n * EventTypeCollection - Collection manager for EventType objects\n *\n * Provides lookup and creation for event types.\n */\n\nimport { SmrtCollection } from '@happyvertical/smrt-core';\nimport { queryGlobal, queryWithGlobals } from '@happyvertical/smrt-tenancy';\nimport { EventType } from '../models/EventType';\n\nexport class EventTypeCollection extends SmrtCollection<EventType> {\n static readonly _itemClass = EventType;\n\n /**\n * Get or create an event type by slug\n *\n * @param slug - EventType slug (e.g., 'basketball-game', 'concert')\n * @param name - Optional display name (defaults to capitalized slug)\n * @returns EventType instance\n */\n async getOrCreate(slug: string, name?: string): Promise<EventType> {\n // First try to find existing type with this slug\n const existing = await this.get({ slug });\n\n if (existing) {\n return existing;\n }\n\n // Create new type with auto-generated name if not provided\n const displayName =\n name || slug.replace(/-/g, ' ').replace(/\\b\\w/g, (l) => l.toUpperCase());\n\n return await this.create({\n slug,\n name: displayName,\n });\n }\n\n /**\n * Get an event type by slug\n *\n * @param slug - EventType slug to search for\n * @returns EventType instance or null if not found\n */\n async getBySlug(slug: string): Promise<EventType | null> {\n return await this.get({ slug });\n }\n\n /**\n * Initialize default event types\n *\n * Creates common event types if they don't exist:\n * - Sports: game, period, goal, assist, penalty\n * - Entertainment: concert, performance, song\n * - Professional: conference, session, presentation, workshop\n * - Community: meeting, agenda-item, motion, vote\n *\n * @returns Array of created/existing event types\n */\n async initializeDefaults(): Promise<EventType[]> {\n const defaults = [\n // Sports\n { slug: 'game', name: 'Game' },\n { slug: 'match', name: 'Match' },\n { slug: 'period', name: 'Period' },\n { slug: 'quarter', name: 'Quarter' },\n { slug: 'inning', name: 'Inning' },\n { slug: 'goal', name: 'Goal' },\n { slug: 'assist', name: 'Assist' },\n { slug: 'penalty', name: 'Penalty' },\n { slug: 'substitution', name: 'Substitution' },\n\n // Entertainment\n { slug: 'concert', name: 'Concert' },\n { slug: 'performance', name: 'Performance' },\n { slug: 'set', name: 'Set' },\n { slug: 'song', name: 'Song' },\n { slug: 'theater', name: 'Theater' },\n { slug: 'show', name: 'Show' },\n\n // Professional\n { slug: 'conference', name: 'Conference' },\n { slug: 'session', name: 'Session' },\n { slug: 'presentation', name: 'Presentation' },\n { slug: 'workshop', name: 'Workshop' },\n { slug: 'seminar', name: 'Seminar' },\n { slug: 'keynote', name: 'Keynote' },\n { slug: 'panel', name: 'Panel' },\n\n // Community\n { slug: 'meeting', name: 'Meeting' },\n { slug: 'town-hall', name: 'Town Hall' },\n { slug: 'agenda-item', name: 'Agenda Item' },\n { slug: 'motion', name: 'Motion' },\n { slug: 'amendment', name: 'Amendment' },\n { slug: 'vote', name: 'Vote' },\n { slug: 'discussion', name: 'Discussion' },\n\n // General\n { slug: 'event', name: 'Event' },\n { slug: 'activity', name: 'Activity' },\n { slug: 'action', name: 'Action' },\n ];\n\n const types: EventType[] = [];\n for (const def of defaults) {\n const type = await this.getOrCreate(def.slug, def.name);\n types.push(type);\n }\n\n return types;\n }\n\n // ============================================\n // Tenant Helper Methods\n // ============================================\n\n /**\n * Find all event types for a specific tenant\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of EventType instances for the tenant\n */\n async findByTenant(tenantId: string): Promise<EventType[]> {\n return this.list({ where: { tenantId } });\n }\n\n /**\n * Find all global event types (no tenant association).\n *\n * Routes through the shared tenant-global helper so it does not throw under\n * an active tenant context (an explicit `tenant_id IS NULL` filter would be\n * flagged as an isolation violation). (#1600)\n *\n * @returns Array of EventType instances with no tenant\n */\n async findGlobal(): Promise<EventType[]> {\n return queryGlobal<EventType>(this);\n }\n\n /**\n * Find event types for a tenant including global types.\n *\n * Fails closed if an active tenant context requests a different tenant's\n * rows; the admin/system path keeps the cross-tenant capability. (#1600)\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of EventType instances for the tenant and global types\n */\n async findWithGlobals(tenantId: string): Promise<EventType[]> {\n return queryWithGlobals<EventType>(\n this,\n tenantId,\n 'EventType.findWithGlobals',\n );\n }\n}\n","/**\n * Declared recipes for smrt-events (#3590, #3604): user-facing units of\n * functionality an app or agent can pick instead of the whole package.\n * The scanner reads these statics into the `recipes` array of `manifest.json`\n * and `smrt-knowledge.json`; nothing here runs at that point.\n *\n * @packageDocumentation\n */\n\nimport { SmrtRecipe } from '@happyvertical/smrt-core';\nimport { Event } from './models/Event.js';\nimport { EventParticipant } from './models/EventParticipant.js';\nimport { EventSeries } from './models/EventSeries.js';\nimport { EventType } from './models/EventType.js';\n\n/** Events: Schedule events, group them in series and track who takes part. */\nexport class CalendarRecipe extends SmrtRecipe {\n static id = 'events.calendar';\n static help = './calendar.recipe.md';\n static label = 'Events';\n static summary =\n 'Schedule events, group them in series and track who takes part.';\n static synonyms = [\n 'calendar',\n 'schedule',\n 'meetings',\n 'bookings',\n 'attendees',\n ];\n static section = {\n id: 'calendar',\n label: 'Calendar',\n icon: 'calendar',\n description: 'Events and what is scheduled when.',\n };\n static models = [Event, EventType, EventSeries, EventParticipant];\n static runtime = 'both' as const;\n static surfaces = [\n {\n kind: 'route',\n path: '/events/meeting',\n export: '@happyvertical/smrt-events/svelte#MeetingView',\n label: 'Meeting view',\n },\n ] as const;\n static nav = [\n {\n label: 'Events',\n model: Event,\n icon: 'calendar',\n description: 'Everything on your calendar, with who and when.',\n },\n {\n label: 'Event types',\n model: EventType,\n icon: 'tag',\n description: 'The kinds of events you run, such as workshops or classes.',\n },\n {\n label: 'Event series',\n model: EventSeries,\n icon: 'repeat',\n description: 'Repeating schedules, like a class every Tuesday evening.',\n },\n ];\n static options = {\n Event: {\n fields: {\n parentId: { visibility: 'hidden' },\n round: { visibility: 'hidden' },\n metadata: { visibility: 'hidden' },\n externalId: { visibility: 'hidden' },\n source: { visibility: 'hidden' },\n timeZone: { visibility: 'hidden' },\n },\n },\n EventType: {\n fields: {\n schema: { visibility: 'hidden' },\n participantSchema: { visibility: 'hidden' },\n },\n },\n EventSeries: {\n fields: {\n metadata: { visibility: 'hidden' },\n externalId: { visibility: 'hidden' },\n source: { visibility: 'hidden' },\n },\n },\n EventParticipant: {\n fields: {\n groupId: { visibility: 'hidden' },\n placement: { visibility: 'hidden' },\n metadata: { visibility: 'hidden' },\n externalId: { visibility: 'hidden' },\n source: { visibility: 'hidden' },\n },\n },\n } as const;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAOA,eAAe,wBAAwB,KAAK,MAAM,+2vDAAmj/D,CAAC;;;ACqC/l/D,IAAM,+BAAN,cAA2C,MAAM;CACtD,YAAY,SAAiB;EAC3B,MAAM,OAAO;EACb,KAAK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,YAAY,SAAS;GACjC,YAAY,EAAE,YAAY,SAAS;GACnC,QAAQ,EAAE,YAAY,SAAS;GAC/B,UAAU,EAAE,YAAY,SAAS;EACnC,EACF;EACA,WAAW,EACT,QAAQ;GACN,QAAQ,EAAE,YAAY,SAAS;GAC/B,mBAAmB,EAAE,YAAY,SAAS;EAC5C,EACF;EACA,aAAa,EACX,QAAQ;GACN,UAAU,EAAE,YAAY,SAAS;GACjC,YAAY,EAAE,YAAY,SAAS;GACnC,QAAQ,EAAE,YAAY,SAAS;EACjC,EACF;EACA,kBAAkB,EAChB,QAAQ;GACN,SAAS,EAAE,YAAY,SAAS;GAChC,WAAW,EAAE,YAAY,SAAS;GAClC,UAAU,EAAE,YAAY,SAAS;GACjC,YAAY,EAAE,YAAY,SAAS;GACnC,QAAQ,EAAE,YAAY,SAAS;EACjC,EACF;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["key","event"],"sources":["../src/__smrt-register__.ts","../src/calendar/icalendar.ts","../src/models/Event.ts","../src/collections/EventCollection.ts","../src/models/EventSeries.ts","../src/collections/EventSeriesCollection.ts","../src/calendar/sync.ts","../src/models/EventAsset.ts","../src/collections/EventAssetCollection.ts","../src/models/EventParticipant.ts","../src/collections/EventParticipantCollection.ts","../src/models/EventType.ts","../src/collections/EventTypeCollection.ts","../src/recipes.ts"],"sourcesContent":["// Generated by @happyvertical/smrt-core smrtPlugin at library build time.\n// The package manifest is inlined so self-registration cannot miss when a\n// downstream bundler relocates this module away from dist/manifest.json\n// (https://github.com/happyvertical/smrt/issues/1506,\n// https://github.com/happyvertical/smrt/issues/1507).\nimport { ObjectRegistry } from '@happyvertical/smrt-core';\n\nObjectRegistry.registerPackageManifest(JSON.parse(\"{\\\"version\\\":\\\"1.0.0\\\",\\\"timestamp\\\":0,\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"packageVersion\\\":\\\"0.57.17\\\",\\\"objects\\\":{\\\"@happyvertical/smrt-events:EventAssetCollection\\\":{\\\"name\\\":\\\"eventassetcollection\\\",\\\"className\\\":\\\"EventAssetCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventAssetCollection\\\",\\\"collection\\\":\\\"eventassets\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/collections/EventAssetCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"byRight\\\":{\\\"name\\\":\\\"byRight\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"rightId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionFilterOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<TItem[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"byLeft\\\":{\\\"name\\\":\\\"byLeft\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"leftId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionFilterOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<TItem[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"attach\\\":{\\\"name\\\":\\\"attach\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"leftId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"rightId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionAttachOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<TItem>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"detach\\\":{\\\"name\\\":\\\"detach\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"leftId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"rightId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionFilterOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setLinks\\\":{\\\"name\\\":\\\"setLinks\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"leftId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"rightIds\\\",\\\"type\\\":\\\"string[]\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionAttachOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getAssets\\\":{\\\"name\\\":\\\"getAssets\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<Asset[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"addAsset\\\":{\\\"name\\\":\\\"addAsset\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"asset\\\",\\\"type\\\":\\\"Asset\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":true,\\\"default\\\":\\\"attachment\\\"},{\\\"name\\\":\\\"sortOrder\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"removeAsset\\\":{\\\"name\\\":\\\"removeAsset\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"assetId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false,\\\"tableName\\\":\\\"event_assets\\\"},\\\"extends\\\":\\\"SmrtJunction\\\",\\\"extendsTypeArg\\\":\\\"EventAsset\\\",\\\"exportName\\\":\\\"EventAssetCollection\\\",\\\"collectionExportName\\\":\\\"EventAssetCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"event_assets\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"event_assets\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"event_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"asset_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"relationship\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"sort_order\\\\\\\" INTEGER NOT NULL DEFAULT 0\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"event_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"events\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"CASCADE\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"asset_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"relationship\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"sort_order\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":0}},\\\"indexes\\\":[{\\\"name\\\":\\\"event_assets_event_id_asset_id_idx\\\",\\\"columns\\\":[\\\"event_id\\\",\\\"asset_id\\\",\\\"relationship\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"event_assets_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"event_assets_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"event_assets_asset_id_idx\\\",\\\"columns\\\":[\\\"asset_id\\\"]}],\\\"version\\\":\\\"aeebedc6\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:EventCollection\\\":{\\\"name\\\":\\\"eventcollection\\\",\\\"className\\\":\\\"EventCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventCollection\\\",\\\"collection\\\":\\\"events\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/collections/EventCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"getBySeriesId\\\":{\\\"name\\\":\\\"getBySeriesId\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"seriesId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getByPlace\\\":{\\\"name\\\":\\\"getByPlace\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"placeId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getByDateRange\\\":{\\\"name\\\":\\\"getByDateRange\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"startDate\\\",\\\"type\\\":\\\"Date\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"endDate\\\",\\\"type\\\":\\\"Date\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getUpcoming\\\":{\\\"name\\\":\\\"getUpcoming\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"limit\\\",\\\"type\\\":\\\"number\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getByStatus\\\":{\\\"name\\\":\\\"getByStatus\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"status\\\",\\\"type\\\":\\\"EventStatus\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getByType\\\":{\\\"name\\\":\\\"getByType\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"typeId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getRootEvents\\\":{\\\"name\\\":\\\"getRootEvents\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getByParent\\\":{\\\"name\\\":\\\"getByParent\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"parentId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getEventTree\\\":{\\\"name\\\":\\\"getEventTree\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event | null>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getAssets\\\":{\\\"name\\\":\\\"getAssets\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<Asset[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"addAsset\\\":{\\\"name\\\":\\\"addAsset\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"asset\\\",\\\"type\\\":\\\"Asset\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":true,\\\"default\\\":\\\"attachment\\\"},{\\\"name\\\":\\\"sortOrder\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"removeAsset\\\":{\\\"name\\\":\\\"removeAsset\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"assetId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"search\\\":{\\\"name\\\":\\\"search\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"query\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"filters\\\",\\\"type\\\":\\\"EventSearchFilters\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getInProgress\\\":{\\\"name\\\":\\\"getInProgress\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByTenant\\\":{\\\"name\\\":\\\"findByTenant\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findGlobal\\\":{\\\"name\\\":\\\"findGlobal\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findWithGlobals\\\":{\\\"name\\\":\\\"findWithGlobals\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Event[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\"]}},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"Event\\\",\\\"exportName\\\":\\\"EventCollection\\\",\\\"collectionExportName\\\":\\\"EventCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"events\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"events\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"_meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"_meta_data\\\\\\\" JSON,\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"parent_id\\\\\\\" UUID,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"series_id\\\\\\\" UUID,\\\\n \\\\\\\"type_id\\\\\\\" UUID,\\\\n \\\\\\\"place_id\\\\\\\" UUID,\\\\n \\\\\\\"description\\\\\\\" TEXT,\\\\n \\\\\\\"start_date\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"end_date\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"all_day\\\\\\\" BOOLEAN DEFAULT FALSE,\\\\n \\\\\\\"time_zone\\\\\\\" TEXT,\\\\n \\\\\\\"status\\\\\\\" TEXT DEFAULT 'scheduled',\\\\n \\\\\\\"round\\\\\\\" INTEGER,\\\\n \\\\\\\"metadata\\\\\\\" TEXT,\\\\n \\\\\\\"external_id\\\\\\\" TEXT,\\\\n \\\\\\\"source\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"_meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"_meta_data\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"parent_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"events\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\",\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"series_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"event_series\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\",\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}},\\\"type_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"event_types\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\",\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}},\\\"place_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"start_date\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false},\\\"end_date\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false},\\\"all_day\\\":{\\\"type\\\":\\\"BOOLEAN\\\",\\\"notNull\\\":false,\\\"default\\\":false},\\\"time_zone\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"scheduled\\\"},\\\"round\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"external_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"source\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"events_slug_context_meta_type_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"events_meta_type_idx\\\",\\\"columns\\\":[\\\"_meta_type\\\"]},{\\\"name\\\":\\\"events_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"events_parent_id_idx\\\",\\\"columns\\\":[\\\"parent_id\\\"]},{\\\"name\\\":\\\"events_series_id_idx\\\",\\\"columns\\\":[\\\"series_id\\\"]},{\\\"name\\\":\\\"events_type_id_idx\\\",\\\"columns\\\":[\\\"type_id\\\"]},{\\\"name\\\":\\\"events_place_id_idx\\\",\\\"columns\\\":[\\\"place_id\\\"]}],\\\"version\\\":\\\"8e689646\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:EventParticipantCollection\\\":{\\\"name\\\":\\\"eventparticipantcollection\\\",\\\"className\\\":\\\"EventParticipantCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventParticipantCollection\\\",\\\"collection\\\":\\\"eventparticipants\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/collections/EventParticipantCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"byRight\\\":{\\\"name\\\":\\\"byRight\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"rightId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionFilterOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<TItem[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"byLeft\\\":{\\\"name\\\":\\\"byLeft\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"leftId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionFilterOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<TItem[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"attach\\\":{\\\"name\\\":\\\"attach\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"leftId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"rightId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionAttachOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<TItem>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"detach\\\":{\\\"name\\\":\\\"detach\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"leftId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"rightId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionFilterOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setLinks\\\":{\\\"name\\\":\\\"setLinks\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"leftId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"rightIds\\\",\\\"type\\\":\\\"string[]\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"opts\\\",\\\"type\\\":\\\"JunctionAttachOptions\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getByPlacement\\\":{\\\"name\\\":\\\"getByPlacement\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getByGroup\\\":{\\\"name\\\":\\\"getByGroup\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"groupId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getHome\\\":{\\\"name\\\":\\\"getHome\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getAway\\\":{\\\"name\\\":\\\"getAway\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"eventId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"search\\\":{\\\"name\\\":\\\"search\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"filters\\\",\\\"type\\\":\\\"ParticipantSearchFilters\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getParticipantStats\\\":{\\\"name\\\":\\\"getParticipantStats\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"profileId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"eventTypeId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<object>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByTenant\\\":{\\\"name\\\":\\\"findByTenant\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findGlobal\\\":{\\\"name\\\":\\\"findGlobal\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findWithGlobals\\\":{\\\"name\\\":\\\"findWithGlobals\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\"]}},\\\"extends\\\":\\\"SmrtJunction\\\",\\\"extendsTypeArg\\\":\\\"EventParticipant\\\",\\\"exportName\\\":\\\"EventParticipantCollection\\\",\\\"collectionExportName\\\":\\\"EventParticipantCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"event_participants\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"event_participants\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"event_id\\\\\\\" UUID,\\\\n \\\\\\\"profile_id\\\\\\\" UUID,\\\\n \\\\\\\"role\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"placement\\\\\\\" INTEGER,\\\\n \\\\\\\"group_id\\\\\\\" TEXT,\\\\n \\\\\\\"metadata\\\\\\\" TEXT,\\\\n \\\\\\\"external_id\\\\\\\" TEXT,\\\\n \\\\\\\"source\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"event_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"events\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"CASCADE\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"profile_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"role\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"placement\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"group_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"external_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"source\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"event_participants_event_id_profile_id_idx\\\",\\\"columns\\\":[\\\"event_id\\\",\\\"profile_id\\\",\\\"role\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"event_participants_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"event_participants_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"event_participants_profile_id_idx\\\",\\\"columns\\\":[\\\"profile_id\\\"]}],\\\"version\\\":\\\"c2faac84\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:EventSeriesCollection\\\":{\\\"name\\\":\\\"eventseriescollection\\\",\\\"className\\\":\\\"EventSeriesCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventSeriesCollection\\\",\\\"collection\\\":\\\"eventserieses\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/collections/EventSeriesCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"getByOrganizer\\\":{\\\"name\\\":\\\"getByOrganizer\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"organizerId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventSeries[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getActive\\\":{\\\"name\\\":\\\"getActive\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<EventSeries[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getUpcoming\\\":{\\\"name\\\":\\\"getUpcoming\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"limit\\\",\\\"type\\\":\\\"number\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<EventSeries[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getByType\\\":{\\\"name\\\":\\\"getByType\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"typeId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventSeries[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"search\\\":{\\\"name\\\":\\\"search\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"query\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"filters\\\",\\\"type\\\":\\\"EventSeriesSearchFilters\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<EventSeries[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByTenant\\\":{\\\"name\\\":\\\"findByTenant\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventSeries[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findGlobal\\\":{\\\"name\\\":\\\"findGlobal\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<EventSeries[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findWithGlobals\\\":{\\\"name\\\":\\\"findWithGlobals\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventSeries[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\"]}},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"EventSeries\\\",\\\"exportName\\\":\\\"EventSeriesCollection\\\",\\\"collectionExportName\\\":\\\"EventSeriesCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"event_series\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"event_series\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"_meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"_meta_data\\\\\\\" JSON,\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"type_id\\\\\\\" UUID,\\\\n \\\\\\\"organizer_id\\\\\\\" UUID,\\\\n \\\\\\\"description\\\\\\\" TEXT,\\\\n \\\\\\\"start_date\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"end_date\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"recurrence\\\\\\\" TEXT,\\\\n \\\\\\\"metadata\\\\\\\" TEXT,\\\\n \\\\\\\"external_id\\\\\\\" TEXT,\\\\n \\\\\\\"source\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"_meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"_meta_data\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"type_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"event_types\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"organizer_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"start_date\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false},\\\"end_date\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false},\\\"recurrence\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"external_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"source\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"event_series_slug_context_meta_type_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"event_series_meta_type_idx\\\",\\\"columns\\\":[\\\"_meta_type\\\"]},{\\\"name\\\":\\\"event_series_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"event_series_type_id_idx\\\",\\\"columns\\\":[\\\"type_id\\\"]},{\\\"name\\\":\\\"event_series_organizer_id_idx\\\",\\\"columns\\\":[\\\"organizer_id\\\"]}],\\\"version\\\":\\\"c79f5863\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:EventTypeCollection\\\":{\\\"name\\\":\\\"eventtypecollection\\\",\\\"className\\\":\\\"EventTypeCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventTypeCollection\\\",\\\"collection\\\":\\\"eventtypes\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/collections/EventTypeCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"getOrCreate\\\":{\\\"name\\\":\\\"getOrCreate\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"slug\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"name\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<EventType>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getBySlug\\\":{\\\"name\\\":\\\"getBySlug\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"slug\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventType | null>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"initializeDefaults\\\":{\\\"name\\\":\\\"initializeDefaults\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<EventType[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByTenant\\\":{\\\"name\\\":\\\"findByTenant\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventType[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findGlobal\\\":{\\\"name\\\":\\\"findGlobal\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<EventType[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findWithGlobals\\\":{\\\"name\\\":\\\"findWithGlobals\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventType[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\"]}},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"EventType\\\",\\\"exportName\\\":\\\"EventTypeCollection\\\",\\\"collectionExportName\\\":\\\"EventTypeCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"event_types\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"event_types\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"_meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"_meta_data\\\\\\\" JSON,\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"description\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"schema\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"participant_schema\\\\\\\" TEXT DEFAULT ''\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"_meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"_meta_data\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"schema\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"participant_schema\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"}},\\\"indexes\\\":[{\\\"name\\\":\\\"event_types_slug_context_meta_type_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"event_types_meta_type_idx\\\",\\\"columns\\\":[\\\"_meta_type\\\"]},{\\\"name\\\":\\\"event_types_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"922ae3b0\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:Event\\\":{\\\"name\\\":\\\"event\\\",\\\"className\\\":\\\"Event\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:Event\\\",\\\"collection\\\":\\\"events\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/models/Event.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{\\\"created_at\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false},\\\"updated_at\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false},\\\"parentId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":false,\\\"related\\\":\\\"Event\\\",\\\"_meta\\\":{\\\"nullable\\\":true,\\\"constraint\\\":{\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}}},\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"name\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\",\\\"description\\\":\\\"What the event is called.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"What the event is called.\\\"}},\\\"seriesId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":false,\\\"related\\\":\\\"EventSeries\\\",\\\"description\\\":\\\"The series this event is part of, if any.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"The series this event is part of, if any.\\\",\\\"constraint\\\":{\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}}},\\\"typeId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":false,\\\"related\\\":\\\"EventType\\\",\\\"description\\\":\\\"The kind of event.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"The kind of event.\\\",\\\"constraint\\\":{\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}}},\\\"placeId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"required\\\":false,\\\"related\\\":\\\"@happyvertical/smrt-places:Place\\\",\\\"description\\\":\\\"Where it takes place.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"Where it takes place.\\\"}},\\\"description\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"description\\\":\\\"What the event is about.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"What the event is about.\\\"}},\\\"startDate\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"description\\\":\\\"When it starts.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"When it starts.\\\"}},\\\"endDate\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"description\\\":\\\"When it ends.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"When it ends.\\\"}},\\\"allDay\\\":{\\\"type\\\":\\\"boolean\\\",\\\"required\\\":false,\\\"default\\\":false,\\\"description\\\":\\\"Whether the event lasts all day.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"Whether the event lasts all day.\\\"}},\\\"timeZone\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"status\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"scheduled\\\",\\\"description\\\":\\\"scheduled, in progress, completed, cancelled or postponed.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"scheduled, in progress, completed, cancelled or postponed.\\\"},\\\"enum\\\":[\\\"scheduled\\\",\\\"in_progress\\\",\\\"completed\\\",\\\"cancelled\\\",\\\"postponed\\\"]},\\\"round\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"externalId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"source\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"createdAt\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"updatedAt\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false}},\\\"methods\\\":{\\\"getParent\\\":{\\\"name\\\":\\\"getParent\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<this | null>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getChildren\\\":{\\\"name\\\":\\\"getChildren\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<this[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getAncestors\\\":{\\\"name\\\":\\\"getAncestors\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<this[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getDescendants\\\":{\\\"name\\\":\\\"getDescendants\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<this[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getHierarchy\\\":{\\\"name\\\":\\\"getHierarchy\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<HierarchyView<this>>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"moveTo\\\":{\\\"name\\\":\\\"moveTo\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"newParent\\\",\\\"type\\\":\\\"this | string | null\\\",\\\"optional\\\":false,\\\"unionBranches\\\":[{\\\"type\\\":\\\"this\\\"},{\\\"type\\\":\\\"string\\\"},{\\\"type\\\":\\\"null\\\"}]}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getMetadata\\\":{\\\"name\\\":\\\"getMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Record<string, unknown>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setMetadata\\\":{\\\"name\\\":\\\"setMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"data\\\",\\\"type\\\":\\\"Record<string, unknown>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"updateMetadata\\\":{\\\"name\\\":\\\"updateMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"updates\\\",\\\"type\\\":\\\"Record<string, unknown>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"updateStatus\\\":{\\\"name\\\":\\\"updateStatus\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"newStatus\\\",\\\"type\\\":\\\"EventStatus\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getSeries\\\":{\\\"name\\\":\\\"getSeries\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getType\\\":{\\\"name\\\":\\\"getType\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getPlace\\\":{\\\"name\\\":\\\"getPlace\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getRootEvent\\\":{\\\"name\\\":\\\"getRootEvent\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<Event>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getParticipants\\\":{\\\"name\\\":\\\"getParticipants\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getAssets\\\":{\\\"name\\\":\\\"getAssets\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<Asset[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"addAsset\\\":{\\\"name\\\":\\\"addAsset\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"asset\\\",\\\"type\\\":\\\"Asset\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":true,\\\"default\\\":\\\"attachment\\\"},{\\\"name\\\":\\\"sortOrder\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"removeAsset\\\":{\\\"name\\\":\\\"removeAsset\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"assetId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"relationship\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<void>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"isInProgress\\\":{\\\"name\\\":\\\"isInProgress\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"isRoot\\\":{\\\"name\\\":\\\"isRoot\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableStrategy\\\":\\\"sti\\\",\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\"]},\\\"cli\\\":{\\\"skipApiCheck\\\":true},\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"]},\\\"extends\\\":\\\"SmrtHierarchical\\\",\\\"exportName\\\":\\\"Event\\\",\\\"collectionExportName\\\":\\\"EventCollection\\\",\\\"displayLabelField\\\":\\\"name\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"events\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"events\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"_meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"_meta_data\\\\\\\" JSON,\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"parent_id\\\\\\\" UUID,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"series_id\\\\\\\" UUID,\\\\n \\\\\\\"type_id\\\\\\\" UUID,\\\\n \\\\\\\"place_id\\\\\\\" UUID,\\\\n \\\\\\\"description\\\\\\\" TEXT,\\\\n \\\\\\\"start_date\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"end_date\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"all_day\\\\\\\" BOOLEAN DEFAULT FALSE,\\\\n \\\\\\\"time_zone\\\\\\\" TEXT,\\\\n \\\\\\\"status\\\\\\\" TEXT DEFAULT 'scheduled',\\\\n \\\\\\\"round\\\\\\\" INTEGER,\\\\n \\\\\\\"metadata\\\\\\\" TEXT,\\\\n \\\\\\\"external_id\\\\\\\" TEXT,\\\\n \\\\\\\"source\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"_meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"_meta_data\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"parent_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"events\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\",\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"series_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"event_series\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\",\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}},\\\"type_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"event_types\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\",\\\"engines\\\":[\\\"postgres\\\",\\\"sqlite\\\"]}},\\\"place_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"start_date\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false},\\\"end_date\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false},\\\"all_day\\\":{\\\"type\\\":\\\"BOOLEAN\\\",\\\"notNull\\\":false,\\\"default\\\":false},\\\"time_zone\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"scheduled\\\"},\\\"round\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"external_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"source\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"events_slug_context_meta_type_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"events_meta_type_idx\\\",\\\"columns\\\":[\\\"_meta_type\\\"]},{\\\"name\\\":\\\"events_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"events_parent_id_idx\\\",\\\"columns\\\":[\\\"parent_id\\\"]},{\\\"name\\\":\\\"events_series_id_idx\\\",\\\"columns\\\":[\\\"series_id\\\"]},{\\\"name\\\":\\\"events_type_id_idx\\\",\\\"columns\\\":[\\\"type_id\\\"]},{\\\"name\\\":\\\"events_place_id_idx\\\",\\\"columns\\\":[\\\"place_id\\\"]}],\\\"version\\\":\\\"8e689646\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:EventAsset\\\":{\\\"name\\\":\\\"eventasset\\\",\\\"className\\\":\\\"EventAsset\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventAsset\\\",\\\"collection\\\":\\\"eventassets\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/models/EventAsset.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"eventId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":true,\\\"related\\\":\\\"Event\\\",\\\"_meta\\\":{\\\"required\\\":true}},\\\"assetId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"required\\\":true,\\\"related\\\":\\\"@happyvertical/smrt-assets:Asset\\\"},\\\"relationship\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"sortOrder\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"default\\\":0}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"event_assets\\\",\\\"conflictColumns\\\":[\\\"event_id\\\",\\\"asset_id\\\",\\\"relationship\\\"],\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"}},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"EventAsset\\\",\\\"collectionExportName\\\":\\\"EventAssetCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"eventId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"foreignKey\\\"},{\\\"field\\\":\\\"assetId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"crossPackageRef\\\"},{\\\"field\\\":\\\"relationship\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"sortOrder\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"event_assets\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"event_assets\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"event_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"asset_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"relationship\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"sort_order\\\\\\\" INTEGER NOT NULL DEFAULT 0\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"event_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"events\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"CASCADE\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"asset_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"relationship\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"sort_order\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":0}},\\\"indexes\\\":[{\\\"name\\\":\\\"event_assets_event_id_asset_id_idx\\\",\\\"columns\\\":[\\\"event_id\\\",\\\"asset_id\\\",\\\"relationship\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"event_assets_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"event_assets_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"event_assets_asset_id_idx\\\",\\\"columns\\\":[\\\"asset_id\\\"]}],\\\"version\\\":\\\"aeebedc6\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:EventParticipant\\\":{\\\"name\\\":\\\"eventparticipant\\\",\\\"className\\\":\\\"EventParticipant\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventParticipant\\\",\\\"collection\\\":\\\"eventparticipants\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/models/EventParticipant.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"eventId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":false,\\\"related\\\":\\\"Event\\\",\\\"description\\\":\\\"The event the person takes part in.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"The event the person takes part in.\\\"}},\\\"profileId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"required\\\":false,\\\"related\\\":\\\"@happyvertical/smrt-profiles:Profile\\\",\\\"description\\\":\\\"The person taking part.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"The person taking part.\\\"}},\\\"role\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\",\\\"description\\\":\\\"What they do there, for example speaker or attendee.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"What they do there, for example speaker or attendee.\\\"}},\\\"placement\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":false},\\\"groupId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"externalId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"source\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"createdAt\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"updatedAt\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false}},\\\"methods\\\":{\\\"getMetadata\\\":{\\\"name\\\":\\\"getMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Record<string, unknown>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setMetadata\\\":{\\\"name\\\":\\\"setMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"data\\\",\\\"type\\\":\\\"Record<string, unknown>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"updateMetadata\\\":{\\\"name\\\":\\\"updateMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"updates\\\",\\\"type\\\":\\\"Record<string, unknown>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getEvent\\\":{\\\"name\\\":\\\"getEvent\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getProfile\\\":{\\\"name\\\":\\\"getProfile\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getGroupParticipants\\\":{\\\"name\\\":\\\"getGroupParticipants\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<EventParticipant[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"isHome\\\":{\\\"name\\\":\\\"isHome\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"isAway\\\":{\\\"name\\\":\\\"isAway\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"conflictColumns\\\":[\\\"event_id\\\",\\\"profile_id\\\",\\\"role\\\"],\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\"]},\\\"cli\\\":{\\\"skipApiCheck\\\":true},\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"}},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"EventParticipant\\\",\\\"collectionExportName\\\":\\\"EventParticipantCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"event_participants\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"event_participants\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"event_id\\\\\\\" UUID,\\\\n \\\\\\\"profile_id\\\\\\\" UUID,\\\\n \\\\\\\"role\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"placement\\\\\\\" INTEGER,\\\\n \\\\\\\"group_id\\\\\\\" TEXT,\\\\n \\\\\\\"metadata\\\\\\\" TEXT,\\\\n \\\\\\\"external_id\\\\\\\" TEXT,\\\\n \\\\\\\"source\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"event_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"events\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"CASCADE\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"profile_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"role\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"placement\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"group_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"external_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"source\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"event_participants_event_id_profile_id_idx\\\",\\\"columns\\\":[\\\"event_id\\\",\\\"profile_id\\\",\\\"role\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"event_participants_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"event_participants_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"event_participants_profile_id_idx\\\",\\\"columns\\\":[\\\"profile_id\\\"]}],\\\"version\\\":\\\"c2faac84\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:EventSeries\\\":{\\\"name\\\":\\\"eventseries\\\",\\\"className\\\":\\\"EventSeries\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventSeries\\\",\\\"collection\\\":\\\"eventserieses\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/models/EventSeries.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{\\\"created_at\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false},\\\"updated_at\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false},\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"name\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\",\\\"description\\\":\\\"What the series is called.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"What the series is called.\\\"}},\\\"typeId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":false,\\\"related\\\":\\\"EventType\\\",\\\"description\\\":\\\"The kind of event in this series.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"The kind of event in this series.\\\"}},\\\"organizerId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"required\\\":false,\\\"related\\\":\\\"@happyvertical/smrt-profiles:Profile\\\",\\\"description\\\":\\\"Who runs the series.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"Who runs the series.\\\"}},\\\"description\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"description\\\":\\\"What the series is about.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"What the series is about.\\\"}},\\\"startDate\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"description\\\":\\\"When the series begins.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"When the series begins.\\\"}},\\\"endDate\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"description\\\":\\\"When the series ends.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"When the series ends.\\\"}},\\\"recurrence\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"description\\\":\\\"How often it repeats.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"How often it repeats.\\\"}},\\\"metadata\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"externalId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"source\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"createdAt\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"updatedAt\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false}},\\\"methods\\\":{\\\"getRecurrence\\\":{\\\"name\\\":\\\"getRecurrence\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"RecurrencePattern | null\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setRecurrence\\\":{\\\"name\\\":\\\"setRecurrence\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"pattern\\\",\\\"type\\\":\\\"RecurrencePattern\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getOccurrences\\\":{\\\"name\\\":\\\"getOccurrences\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"rangeStart\\\",\\\"type\\\":\\\"Date\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"rangeEnd\\\",\\\"type\\\":\\\"Date\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"options\\\",\\\"type\\\":\\\"object\\\",\\\"optional\\\":true,\\\"memberTypes\\\":[\\\"string\\\",\\\"Date\\\",\\\"number\\\"]}],\\\"returnType\\\":\\\"Date[]\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getMetadata\\\":{\\\"name\\\":\\\"getMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Record<string, unknown>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setMetadata\\\":{\\\"name\\\":\\\"setMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"data\\\",\\\"type\\\":\\\"Record<string, unknown>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"updateMetadata\\\":{\\\"name\\\":\\\"updateMetadata\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"updates\\\",\\\"type\\\":\\\"Record<string, unknown>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getType\\\":{\\\"name\\\":\\\"getType\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getOrganizer\\\":{\\\"name\\\":\\\"getOrganizer\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getEvents\\\":{\\\"name\\\":\\\"getEvents\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"isActive\\\":{\\\"name\\\":\\\"isActive\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableStrategy\\\":\\\"sti\\\",\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\"]},\\\"cli\\\":{\\\"skipApiCheck\\\":true},\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"EventSeries\\\",\\\"collectionExportName\\\":\\\"EventSeriesCollection\\\",\\\"displayLabelField\\\":\\\"name\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"event_series\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"event_series\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"_meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"_meta_data\\\\\\\" JSON,\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"type_id\\\\\\\" UUID,\\\\n \\\\\\\"organizer_id\\\\\\\" UUID,\\\\n \\\\\\\"description\\\\\\\" TEXT,\\\\n \\\\\\\"start_date\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"end_date\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"recurrence\\\\\\\" TEXT,\\\\n \\\\\\\"metadata\\\\\\\" TEXT,\\\\n \\\\\\\"external_id\\\\\\\" TEXT,\\\\n \\\\\\\"source\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"_meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"_meta_data\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"type_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"event_types\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"organizer_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"start_date\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false},\\\"end_date\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false},\\\"recurrence\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"external_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false},\\\"source\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"event_series_slug_context_meta_type_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"event_series_meta_type_idx\\\",\\\"columns\\\":[\\\"_meta_type\\\"]},{\\\"name\\\":\\\"event_series_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"event_series_type_id_idx\\\",\\\"columns\\\":[\\\"type_id\\\"]},{\\\"name\\\":\\\"event_series_organizer_id_idx\\\",\\\"columns\\\":[\\\"organizer_id\\\"]}],\\\"version\\\":\\\"c79f5863\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"},\\\"@happyvertical/smrt-events:EventType\\\":{\\\"name\\\":\\\"eventtype\\\",\\\"className\\\":\\\"EventType\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-events:EventType\\\",\\\"collection\\\":\\\"eventtypes\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/events/src/models/EventType.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-events\\\",\\\"fields\\\":{\\\"created_at\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false},\\\"updated_at\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false},\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"name\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"default\\\":\\\"\\\",\\\"description\\\":\\\"What this kind of event is called, for example workshop.\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"description\\\":\\\"What this kind of event is called, for example workshop.\\\"}},\\\"description\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\",\\\"description\\\":\\\"What this kind of event is for.\\\",\\\"_meta\\\":{\\\"description\\\":\\\"What this kind of event is for.\\\"}},\\\"schema\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"participantSchema\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"createdAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false},\\\"updatedAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false}},\\\"methods\\\":{\\\"getSchema\\\":{\\\"name\\\":\\\"getSchema\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Record<string, unknown>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setSchema\\\":{\\\"name\\\":\\\"setSchema\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"data\\\",\\\"type\\\":\\\"Record<string, unknown>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getParticipantSchema\\\":{\\\"name\\\":\\\"getParticipantSchema\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Record<string, unknown>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setParticipantSchema\\\":{\\\"name\\\":\\\"setParticipantSchema\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"data\\\",\\\"type\\\":\\\"Record<string, unknown>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getBySlug\\\":{\\\"name\\\":\\\"getBySlug\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"_slug\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<EventType | null>\\\",\\\"isStatic\\\":true,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableStrategy\\\":\\\"sti\\\",\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\"]},\\\"cli\\\":{\\\"skipApiCheck\\\":true},\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"EventType\\\",\\\"collectionExportName\\\":\\\"EventTypeCollection\\\",\\\"displayLabelField\\\":\\\"name\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"name\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"event_types\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"event_types\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"_meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"_meta_data\\\\\\\" JSON,\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"description\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"schema\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"participant_schema\\\\\\\" TEXT DEFAULT ''\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"_meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"_meta_data\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"schema\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"participant_schema\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"}},\\\"indexes\\\":[{\\\"name\\\":\\\"event_types_slug_context_meta_type_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"event_types_meta_type_idx\\\",\\\"columns\\\":[\\\"_meta_type\\\"]},{\\\"name\\\":\\\"event_types_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"922ae3b0\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-events\\\"}},\\\"moduleType\\\":\\\"smrt\\\",\\\"recipes\\\":[{\\\"id\\\":\\\"events.calendar\\\",\\\"className\\\":\\\"CalendarRecipe\\\",\\\"label\\\":\\\"Events\\\",\\\"summary\\\":\\\"Schedule events, group them in series and track who takes part.\\\",\\\"synonyms\\\":[\\\"calendar\\\",\\\"schedule\\\",\\\"meetings\\\",\\\"bookings\\\",\\\"attendees\\\"],\\\"models\\\":[\\\"@happyvertical/smrt-events:Event\\\",\\\"@happyvertical/smrt-events:EventType\\\",\\\"@happyvertical/smrt-events:EventSeries\\\",\\\"@happyvertical/smrt-events:EventParticipant\\\"],\\\"nav\\\":[{\\\"label\\\":\\\"Events\\\",\\\"model\\\":\\\"@happyvertical/smrt-events:Event\\\",\\\"icon\\\":\\\"calendar\\\",\\\"description\\\":\\\"Everything on your calendar, with who and when.\\\"},{\\\"label\\\":\\\"Event types\\\",\\\"model\\\":\\\"@happyvertical/smrt-events:EventType\\\",\\\"icon\\\":\\\"tag\\\",\\\"description\\\":\\\"The kinds of events you run, such as workshops or classes.\\\"},{\\\"label\\\":\\\"Event series\\\",\\\"model\\\":\\\"@happyvertical/smrt-events:EventSeries\\\",\\\"icon\\\":\\\"repeat\\\",\\\"description\\\":\\\"Repeating schedules, like a class every Tuesday evening.\\\"}],\\\"requires\\\":[],\\\"section\\\":{\\\"id\\\":\\\"calendar\\\",\\\"label\\\":\\\"Calendar\\\",\\\"icon\\\":\\\"calendar\\\",\\\"description\\\":\\\"Events and what is scheduled when.\\\"},\\\"options\\\":{\\\"@happyvertical/smrt-events:Event\\\":{\\\"fields\\\":{\\\"parentId\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"round\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"metadata\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"externalId\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"source\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"timeZone\\\":{\\\"visibility\\\":\\\"hidden\\\"}}},\\\"@happyvertical/smrt-events:EventType\\\":{\\\"fields\\\":{\\\"schema\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"participantSchema\\\":{\\\"visibility\\\":\\\"hidden\\\"}}},\\\"@happyvertical/smrt-events:EventSeries\\\":{\\\"fields\\\":{\\\"metadata\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"externalId\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"source\\\":{\\\"visibility\\\":\\\"hidden\\\"}}},\\\"@happyvertical/smrt-events:EventParticipant\\\":{\\\"fields\\\":{\\\"groupId\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"placement\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"metadata\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"externalId\\\":{\\\"visibility\\\":\\\"hidden\\\"},\\\"source\\\":{\\\"visibility\\\":\\\"hidden\\\"}}}},\\\"help\\\":{\\\"markdown\\\":\\\"## Overview\\\\n\\\\nEvents is your calendar. Each event has a time and a type, can belong to a\\\\nseries, and lists who takes part.\\\\n\\\\n## Tasks\\\\n\\\\n### Schedule an event\\\\n\\\\n1. Create a new event.\\\\n2. Enter the **{field:name}**, the **{field:startDate}** and the\\\\n **{field:endDate}**.\\\\n3. Pick the **{field:typeId}**, and the **{field:seriesId}** if it repeats.\\\\n4. Add the people taking part with their **{field:role}**.\\\\n\\\\n### Keep it current\\\\n\\\\n1. Update **{field:status}** as the event goes ahead, finishes or is postponed.\\\\n\\\",\\\"fieldRefs\\\":[\\\"endDate\\\",\\\"name\\\",\\\"role\\\",\\\"seriesId\\\",\\\"startDate\\\",\\\"status\\\",\\\"typeId\\\"]},\\\"surfaces\\\":[{\\\"kind\\\":\\\"route\\\",\\\"path\\\":\\\"/events/meeting\\\",\\\"export\\\":\\\"@happyvertical/smrt-events/svelte#MeetingView\\\",\\\"label\\\":\\\"Meeting view\\\"}],\\\"runtime\\\":\\\"both\\\",\\\"demo\\\":{\\\"mode\\\":\\\"server\\\",\\\"reasons\\\":[\\\"Needs a server because its package does not build for a browser: node:crypto; and its package depends on @happyvertical/smrt-places, @happyvertical/smrt-profiles, @happyvertical/smrt-tenancy, which do not build for a browser (#3617, #3624, #3626, #3627).\\\"]}}],\\\"smrtDependencies\\\":[\\\"@happyvertical/smrt-assets\\\",\\\"@happyvertical/smrt-core\\\",\\\"@happyvertical/smrt-places\\\",\\\"@happyvertical/smrt-profiles\\\",\\\"@happyvertical/smrt-tenancy\\\"],\\\"browser\\\":{\\\"status\\\":\\\"server-only\\\",\\\"issues\\\":[\\\"#3617\\\",\\\"#3624\\\",\\\"#3626\\\",\\\"#3627\\\"],\\\"reason\\\":\\\"node:crypto\\\",\\\"via\\\":[\\\"@happyvertical/smrt-places\\\",\\\"@happyvertical/smrt-profiles\\\",\\\"@happyvertical/smrt-tenancy\\\"]},\\\"stampsConstructors\\\":true}\"));\n","import {\n ICAL,\n type ICalendarComponent,\n type ICalendarParseLimits,\n parseICalendar,\n} from '@happyvertical/icalendar';\nimport {\n fromZonedWallTime,\n isValidTimeZone,\n toZonedWallTime,\n} from '../recurrence';\n\n/** A stable upstream identity for a calendar master or detached occurrence. */\nexport interface CalendarEventIdentity {\n source: string;\n uid: string;\n recurrenceId?: string;\n}\n\n/** Parsed data SMRT needs before applying its persistence policy. */\nexport interface CalendarParseOptions {\n floatingTimeZone?: string;\n limits?: ICalendarParseLimits;\n}\n\nexport interface CalendarEventInput {\n identity: CalendarEventIdentity;\n name: string;\n description: string;\n startDate: Date | null;\n endDate: Date | null;\n allDay: boolean;\n timeZone: string;\n status: 'scheduled' | 'cancelled';\n sequence: number | null;\n dtstamp: Date | null;\n recurrence: string | null;\n /** True for a detached record, false for a generated occurrence. */\n detached?: boolean;\n excludedRecurrenceIds: string[];\n additionalRecurrenceIds: string[];\n}\n\n/** A malformed calendar event cannot be given a stable source identity. */\nexport class CalendarEventValidationError extends Error {\n constructor(message: string) {\n super(message);\n this.name = 'CalendarEventValidationError';\n }\n}\n\ntype ICalendarTimeValue = InstanceType<typeof ICAL.Time>;\n\nfunction readText(component: ICalendarComponent, name: string): string {\n const value = component.getFirstPropertyValue(name);\n if (typeof value === 'string') return value;\n return value && typeof value.toString === 'function' ? value.toString() : '';\n}\n\nfunction readNumber(\n component: ICalendarComponent,\n name: string,\n): number | null {\n const value = component.getFirstPropertyValue(name);\n return typeof value === 'number' && Number.isSafeInteger(value)\n ? value\n : null;\n}\n\nfunction readTime(\n component: ICalendarComponent,\n name: string,\n): ICalendarTimeValue | null {\n const value = component.getFirstPropertyValue(name);\n return value instanceof ICAL.Time ? value : null;\n}\n\nfunction timeZone(component: ICalendarComponent, name: string): string {\n const parameter = component.getFirstProperty(name)?.getFirstParameter('tzid');\n if (typeof parameter === 'string') return parameter;\n const value = readTime(component, name);\n const tzid = value?.zone?.tzid;\n return typeof tzid === 'string' && tzid !== 'Z' && tzid !== 'floating'\n ? tzid\n : '';\n}\n\nfunction recurrenceId(\n value: ICalendarTimeValue | null,\n zone: string,\n): string | undefined {\n return value\n ? value.isDate\n ? value.toString()\n : instant(value, zone).toISOString()\n : undefined;\n}\n\nfunction recurrenceDates(\n component: ICalendarComponent,\n propertyName: string,\n zone: string,\n): string[] {\n return component.getAllProperties(propertyName).flatMap((property) => {\n const values = property.getValues();\n return values\n .filter(\n (value): value is ICalendarTimeValue => value instanceof ICAL.Time,\n )\n .map(\n (value) =>\n recurrenceId(\n value,\n String(property.getFirstParameter('tzid') || zone),\n )!,\n );\n });\n}\n\n/**\n * Parse VEVENT records with their RFC 5545 source identities and recurrence\n * exception data. This does not fetch a feed or persist anything.\n */\nexport function parseICalendarEvents(\n source: string,\n ics: string,\n options: CalendarParseOptions = {},\n): CalendarEventInput[] {\n if (!source.trim()) {\n throw new CalendarEventValidationError('Calendar source is required');\n }\n\n const { component } = parseICalendar(ics, options.limits);\n const seen = new Set<string>();\n return component.getAllSubcomponents('vevent').map((event) => {\n const uid = readText(event, 'uid').trim();\n if (!uid) {\n throw new CalendarEventValidationError('VEVENT UID is required');\n }\n\n const start = readTime(event, 'dtstart');\n const end = readTime(event, 'dtend');\n const instance = readTime(event, 'recurrence-id');\n const allDay = (start ?? instance)?.isDate === true;\n const resolvedTimeZone =\n timeZone(event, 'dtstart') ||\n timeZone(event, 'recurrence-id') ||\n options.floatingTimeZone ||\n (allDay ? 'UTC' : '');\n if ((start || instance) && !allDay && !resolvedTimeZone) {\n throw new CalendarEventValidationError(\n 'Floating DTSTART requires an explicit source time-zone policy',\n );\n }\n if (resolvedTimeZone && !isValidTimeZone(resolvedTimeZone)) {\n throw new CalendarEventValidationError('Unknown IANA time zone');\n }\n const identity = {\n source,\n uid,\n recurrenceId: recurrenceId(\n instance,\n timeZone(event, 'recurrence-id') || resolvedTimeZone,\n ),\n };\n const key = JSON.stringify([uid, identity.recurrenceId ?? null]);\n if (seen.has(key))\n throw new CalendarEventValidationError('Duplicate VEVENT identity');\n seen.add(key);\n const sequence = readNumber(event, 'sequence');\n if (event.hasProperty('sequence') && (sequence === null || sequence < 0)) {\n throw new CalendarEventValidationError('Invalid SEQUENCE');\n }\n const status = readText(event, 'status').toUpperCase();\n if (status && !['CONFIRMED', 'TENTATIVE', 'CANCELLED'].includes(status)) {\n throw new CalendarEventValidationError('Unsupported VEVENT STATUS');\n }\n if (!start && status !== 'CANCELLED') {\n throw new CalendarEventValidationError('VEVENT DTSTART is required');\n }\n if (\n event.hasProperty('duration') ||\n event.hasProperty('exrule') ||\n event.getFirstProperty('recurrence-id')?.getFirstParameter('range') ||\n event.getAllProperties('rdate').some((p) => p.type === 'period')\n ) {\n throw new CalendarEventValidationError(\n 'Unsupported DURATION, EXRULE, RANGE or PERIOD',\n );\n }\n const startDate = start ? instant(start, resolvedTimeZone) : null;\n if (start && end && start.isDate !== end.isDate)\n throw new CalendarEventValidationError(\n 'DTSTART and DTEND value types differ',\n );\n const endDate = end\n ? instant(end, timeZone(event, 'dtend') || resolvedTimeZone)\n : start && allDay\n ? instant(nextDay(start), resolvedTimeZone)\n : startDate;\n if (startDate && endDate && endDate < startDate) {\n throw new CalendarEventValidationError('DTEND precedes DTSTART');\n }\n\n return {\n identity,\n name: readText(event, 'summary'),\n description: readText(event, 'description'),\n startDate,\n endDate,\n detached: Boolean(instance),\n allDay,\n timeZone: resolvedTimeZone,\n status: status === 'CANCELLED' ? 'cancelled' : 'scheduled',\n sequence,\n dtstamp: readTime(event, 'dtstamp')?.toJSDate() ?? null,\n recurrence: readText(event, 'rrule') || null,\n excludedRecurrenceIds: recurrenceDates(event, 'exdate', resolvedTimeZone),\n additionalRecurrenceIds: recurrenceDates(\n event,\n 'rdate',\n resolvedTimeZone,\n ),\n };\n });\n}\n\nfunction nextDay(value: ICalendarTimeValue): ICalendarTimeValue {\n const next = value.clone();\n next.adjust(1, 0, 0, 0);\n return next;\n}\n\nfunction instant(value: ICalendarTimeValue, zone: string): Date {\n if (value.zone.tzid === 'UTC' || value.zone.tzid === 'Z')\n return value.toJSDate();\n return fromZonedWallTime(\n {\n year: value.year,\n month: value.month,\n day: value.day,\n hour: value.hour,\n minute: value.minute,\n second: value.second,\n millisecond: 0,\n },\n zone || 'UTC',\n );\n}\n\nexport interface CalendarExpansionOptions extends CalendarParseOptions {\n rangeStart: Date;\n rangeEnd: Date;\n /** Hard cap: exceeding it rejects the feed, never returns a partial success. */\n limit?: number;\n /** Includes occurrences scanned before the requested window. */\n maxIterations?: number;\n}\n\n/** Expand a caller-bounded window through the SDK's public recurrence engine.\n * Range endpoints are inclusive. Detached records replace their original slot;\n * EXDATE slots are returned as cancellations so previously persisted occurrences\n * are cancelled as well. No master is returned alongside its first occurrence.\n */\nexport function expandICalendarEvents(\n source: string,\n ics: string,\n options: CalendarExpansionOptions,\n): CalendarEventInput[] {\n const { rangeStart, rangeEnd } = options;\n const limit = options.limit ?? 1000;\n const maxIterations = options.maxIterations ?? 10000;\n if (\n !Number.isFinite(rangeStart.getTime()) ||\n !Number.isFinite(rangeEnd.getTime()) ||\n rangeEnd < rangeStart ||\n !Number.isSafeInteger(limit) ||\n limit < 1 ||\n limit > 10000 ||\n !Number.isSafeInteger(maxIterations) ||\n maxIterations < 1 ||\n maxIterations > 100000\n ) {\n throw new CalendarEventValidationError('Invalid expansion bounds');\n }\n const inputs = parseICalendarEvents(source, ics, options);\n const components = parseICalendar(\n ics,\n options.limits,\n ).component.getAllSubcomponents('vevent');\n const rows = new Map<string, CalendarEventInput>();\n let iterations = 0;\n const key = (entry: CalendarEventInput) =>\n JSON.stringify([entry.identity.uid, entry.identity.recurrenceId ?? null]);\n const put = (entry: CalendarEventInput) => {\n const previous = rows.get(key(entry));\n if (!previous || entry.detached || !previous.detached)\n rows.set(key(entry), entry);\n if (rows.size > limit)\n throw new CalendarEventValidationError(\n 'Calendar occurrence limit exceeded',\n );\n };\n for (let index = 0; index < inputs.length; index++) {\n const entry = inputs[index];\n if (entry.detached) continue;\n const component = components[index];\n if (!entry.recurrence && !entry.additionalRecurrenceIds.length) {\n if (\n !entry.startDate ||\n (entry.startDate >= rangeStart && entry.startDate <= rangeEnd)\n )\n put(entry);\n continue;\n }\n const start = readTime(component, 'dtstart');\n if (!start)\n throw new CalendarEventValidationError(\n 'Recurring master requires DTSTART',\n );\n const rules = component.getAllProperties('rrule');\n for (const property of rules) {\n const raw = property.toJSON()[3];\n const supported = new Set([\n 'freq',\n 'interval',\n 'count',\n 'until',\n 'wkst',\n 'bysecond',\n 'byminute',\n 'byhour',\n 'byday',\n 'bymonthday',\n 'byyearday',\n 'byweekno',\n 'bymonth',\n 'bysetpos',\n ]);\n if (\n raw &&\n typeof raw === 'object' &&\n Object.keys(raw).some((key) => !supported.has(key))\n ) {\n throw new CalendarEventValidationError(\n 'Unsupported recurrence property',\n );\n }\n }\n if (rules.length > 1)\n throw new CalendarEventValidationError('Multiple RRULEs unsupported');\n for (const property of rules) {\n const rule = property.getFirstValue();\n if (\n !(rule instanceof ICAL.Recur) ||\n !['DAILY', 'WEEKLY', 'MONTHLY', 'YEARLY'].includes(rule.freq) ||\n rule.interval < 1 ||\n (rule.count !== null && rule.count < 1)\n ) {\n throw new CalendarEventValidationError(\n 'Unsupported or malformed recurrence',\n );\n }\n if (rule instanceof ICAL.Recur) {\n const allowedParts: Record<string, string[]> = {\n DAILY: [],\n WEEKLY: ['BYDAY'],\n MONTHLY: ['BYDAY', 'BYMONTHDAY', 'BYSETPOS'],\n YEARLY: ['BYMONTH', 'BYMONTHDAY'],\n };\n if (\n Object.keys(rule.parts).some(\n (part) => !allowedParts[rule.freq]?.includes(part),\n ) ||\n (rule.freq === 'MONTHLY' &&\n ((rule.parts.BYMONTHDAY && rule.parts.BYDAY) ||\n (rule.parts.BYSETPOS && !rule.parts.BYDAY))) ||\n (rule.freq === 'WEEKLY' &&\n rule.parts.BYDAY?.some((day) => !/^[A-Z]{2}$/.test(day)))\n ) {\n throw new CalendarEventValidationError(\n 'Unsupported recurrence combination',\n );\n }\n }\n }\n // EXDATE is processed as an explicit cancellation, not silently dropped.\n const expansionComponent = new ICAL.Component(\n JSON.parse(JSON.stringify(component.toJSON())),\n );\n expansionComponent.removeAllProperties('exdate');\n // RDATEs are already normalized with each property's own TZID. Do not\n // reinterpret their wall fields through the master's zone in the iterator.\n expansionComponent.removeAllProperties('rdate');\n // ICAL's floating representation has no IANA offset database. Compare an\n // UNTIL instant in the same wall zone as DTSTART, then expand wall slots.\n for (const property of expansionComponent.getAllProperties('rrule')) {\n const rule = property.getFirstValue();\n if (rule instanceof ICAL.Recur) {\n const declaredUntil = rule.until\n ? instant(rule.until, entry.timeZone)\n : rangeEnd;\n const until = declaredUntil < rangeEnd ? declaredUntil : rangeEnd;\n const wall = toZonedWallTime(until, entry.timeZone);\n rule.until = ICAL.Time.fromData(\n { ...wall, isDate: start.isDate },\n start.zone,\n );\n }\n }\n const iterator = new ICAL.RecurExpansion({\n component: expansionComponent,\n dtstart: start,\n });\n const duration =\n readTime(component, 'dtend')?.subtractDate(start) ??\n ICAL.Duration.fromSeconds(entry.allDay ? 86400 : 0);\n const emitted = new Set<string>();\n const emit = (\n occurrence: ICalendarTimeValue,\n startDate: Date,\n id: string,\n ) => {\n if (startDate < rangeStart || startDate > rangeEnd || emitted.has(id))\n return;\n emitted.add(id);\n const end = occurrence.clone();\n end.addDuration(duration);\n put({\n ...entry,\n identity: { ...entry.identity, recurrenceId: id },\n startDate,\n endDate: entry.allDay\n ? instant(end, entry.timeZone)\n : new Date(\n startDate.getTime() +\n ((entry.endDate?.getTime() ?? 0) -\n (entry.startDate?.getTime() ?? 0)),\n ),\n detached: false,\n status: entry.excludedRecurrenceIds.includes(id)\n ? 'cancelled'\n : entry.status,\n });\n };\n for (;;) {\n if (++iterations > maxIterations)\n throw new CalendarEventValidationError(\n 'Calendar iteration limit exceeded',\n );\n const occurrence = iterator.next();\n if (!occurrence) break;\n const startDate = instant(occurrence, entry.timeZone);\n if (startDate > rangeEnd) break;\n emit(occurrence, startDate, recurrenceId(occurrence, entry.timeZone)!);\n }\n for (const additional of entry.additionalRecurrenceIds) {\n if (++iterations > maxIterations)\n throw new CalendarEventValidationError(\n 'Calendar iteration limit exceeded',\n );\n const occurrence = ICAL.Time.fromString(additional, undefined);\n emit(occurrence, instant(occurrence, entry.timeZone), additional);\n }\n for (const excluded of entry.excludedRecurrenceIds) {\n if (emitted.has(excluded)) continue;\n const startDate = excluded.endsWith('Z')\n ? new Date(excluded)\n : instant(ICAL.Time.fromString(excluded, undefined), entry.timeZone);\n if (startDate >= rangeStart && startDate <= rangeEnd)\n put({\n ...entry,\n identity: { ...entry.identity, recurrenceId: excluded },\n startDate,\n endDate: startDate,\n status: 'cancelled',\n detached: false,\n });\n }\n }\n for (const entry of inputs.filter((e) => e.detached)) {\n // Include an exception when its original OR moved slot is in the window.\n const originalId = entry.identity.recurrenceId!;\n const original = originalId.endsWith('Z')\n ? new Date(originalId)\n : instant(ICAL.Time.fromString(originalId, undefined), entry.timeZone);\n if (\n (original >= rangeStart && original <= rangeEnd) ||\n (entry.startDate &&\n entry.startDate >= rangeStart &&\n entry.startDate <= rangeEnd)\n )\n put(entry);\n }\n return [...rows.values()].sort(\n (a, b) => (a.startDate?.getTime() ?? 0) - (b.startDate?.getTime() ?? 0),\n );\n}\n","/**\n * Event model - Hierarchical event instances\n *\n * Infinitely nestable: Game → Period → Goal → Assist\n */\n\nimport type { Asset } from '@happyvertical/smrt-assets';\nimport {\n assertValidOwnedAssetRelationship,\n assertValidOwnedAssetSortOrder,\n resolveOwnedAssetsById,\n} from '@happyvertical/smrt-assets';\nimport {\n crossPackageRef,\n field,\n foreignKey,\n SmrtHierarchical,\n smrt,\n} from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport type { EventOptions, EventStatus } from '../types';\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableStrategy: 'sti',\n api: { include: ['list', 'get', 'create', 'update', 'delete'] },\n mcp: { include: ['list', 'get', 'create', 'update'] },\n cli: { skipApiCheck: true },\n})\nexport class Event extends SmrtHierarchical { static __smrtPackage__ = \"@happyvertical/smrt-events\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @field({ description: 'What the event is called.' })\n name: string = '';\n @field({ description: 'The series this event is part of, if any.' })\n @foreignKey('EventSeries', {\n constraint: { engines: ['postgres', 'sqlite'] },\n })\n seriesId = ''; // FK to EventSeries (nullable for standalone events)\n // DuckDB cannot enforce a self-FK; PostgreSQL/SQLite retain the physical\n // constraint while every engine retains UUID relationship semantics and\n // application-side delete enforcement.\n @foreignKey('Event', {\n nullable: true,\n constraint: { engines: ['postgres', 'sqlite'] },\n })\n override parentId: string | null = null;\n @field({ description: 'The kind of event.' })\n @foreignKey('EventType', {\n constraint: { engines: ['postgres', 'sqlite'] },\n })\n typeId = ''; // FK to EventType\n @field({ description: 'Where it takes place.' })\n @crossPackageRef('@happyvertical/smrt-places:Place')\n placeId = ''; // FK to Place (from @happyvertical/smrt-places)\n @field({ description: 'What the event is about.' })\n description = '';\n @field({ description: 'When it starts.' })\n startDate: Date | null = null;\n @field({ description: 'When it ends.' })\n endDate: Date | null = null;\n /**\n * True when the event occupies whole calendar days rather than a time\n * range. `startDate` is the first day (local midnight in `timeZone`) and\n * `endDate`, when set, is the exclusive end (midnight after the last day).\n */\n @field({ description: 'Whether the event lasts all day.' })\n allDay: boolean = false;\n /**\n * IANA time zone the event is scheduled in (for example\n * `America/Edmonton`). Empty means \"inherit\" from the series, place, or\n * site. Calendars and recurrence expansion compute wall-clock days in it.\n */\n timeZone = '';\n @field({\n description: 'scheduled, in progress, completed, cancelled or postponed.',\n })\n status: EventStatus = 'scheduled';\n round: number | null = null; // Sequence/round number in series\n metadata = ''; // JSON metadata (stored as text)\n externalId = ''; // External system identifier\n source = ''; // Source system\n\n // Timestamps\n createdAt = new Date();\n updatedAt = new Date();\n\n constructor(options: EventOptions = {}) {\n super(options);\n\n if (options.seriesId !== undefined) this.seriesId = options.seriesId;\n if (options.parentId !== undefined)\n this.parentId = options.parentId ?? null;\n if (options.typeId) this.typeId = options.typeId;\n if (options.placeId !== undefined) this.placeId = options.placeId;\n if (options.description !== undefined)\n this.description = options.description;\n if (options.startDate !== undefined)\n this.startDate = options.startDate || null;\n if (options.endDate !== undefined) this.endDate = options.endDate || null;\n if (options.allDay !== undefined) this.allDay = options.allDay;\n if (options.timeZone !== undefined) this.timeZone = options.timeZone;\n if (options.status !== undefined) this.status = options.status;\n if (options.round !== undefined) this.round = options.round;\n if (options.externalId !== undefined) this.externalId = options.externalId;\n if (options.source !== undefined) this.source = options.source;\n\n // Handle metadata - can be object or JSON string\n if (options.metadata !== undefined) {\n if (typeof options.metadata === 'string') {\n this.metadata = options.metadata;\n } else {\n this.metadata = JSON.stringify(options.metadata);\n }\n }\n\n if (options.createdAt) this.createdAt = options.createdAt;\n if (options.updatedAt) this.updatedAt = options.updatedAt;\n }\n\n /**\n * Get metadata as parsed object\n *\n * @returns Parsed metadata object or empty object\n */\n getMetadata(): Record<string, unknown> {\n if (!this.metadata) return {};\n try {\n return JSON.parse(this.metadata);\n } catch {\n return {};\n }\n }\n\n /**\n * Set metadata from object\n *\n * @param data - Metadata object to store\n */\n setMetadata(data: Record<string, unknown>): void {\n this.metadata = JSON.stringify(data);\n }\n\n /**\n * Update metadata by merging with existing values\n *\n * @param updates - Partial metadata to merge\n */\n updateMetadata(updates: Record<string, unknown>): void {\n const current = this.getMetadata();\n this.setMetadata({ ...current, ...updates });\n }\n\n /**\n * Update event status\n *\n * @param newStatus - New status to set\n */\n async updateStatus(newStatus: EventStatus): Promise<void> {\n this.status = newStatus;\n this.updatedAt = new Date();\n await this.save();\n }\n\n /**\n * Get the series for this event\n *\n * @returns EventSeries instance or null\n */\n async getSeries() {\n if (!this.seriesId) return null;\n\n const { EventSeriesCollection } = await import(\n '../collections/EventSeriesCollection'\n );\n const collection = await EventSeriesCollection.create(this.options);\n\n return await collection.get({ id: this.seriesId });\n }\n\n /**\n * Get the event type\n *\n * @returns EventType instance or null\n */\n async getType() {\n if (!this.typeId) return null;\n\n const { EventTypeCollection } = await import(\n '../collections/EventTypeCollection'\n );\n const collection = await EventTypeCollection.create(this.options);\n\n return await collection.get({ id: this.typeId });\n }\n\n /**\n * Get the place for this event\n *\n * @returns Place instance or null\n */\n async getPlace() {\n if (!this.placeId) return null;\n\n try {\n const { PlaceCollection } = await import('@happyvertical/smrt-places');\n const collection = await PlaceCollection.create(this.options);\n\n return await collection.get({ id: this.placeId });\n } catch {\n // @happyvertical/smrt-places not available\n return null;\n }\n }\n\n // Hierarchy traversal (getParent / getChildren / getAncestors /\n // getDescendants / getHierarchy / moveTo) provided by SmrtHierarchical.\n\n /**\n * Get the root event (top-level ancestor) of this event's hierarchy.\n *\n * @returns Root event instance — `this` when already root\n */\n async getRootEvent(): Promise<Event> {\n const ancestors = await this.getAncestors();\n return (ancestors.length > 0 ? ancestors[0] : this) as Event;\n }\n\n /**\n * Get all participants for this event\n *\n * @returns Array of EventParticipant instances\n */\n async getParticipants() {\n const { EventParticipantCollection } = await import(\n '../collections/EventParticipantCollection'\n );\n const collection = await EventParticipantCollection.create(this.options);\n\n return await collection.list({ where: { eventId: this.id } });\n }\n\n private async getEventAssetCollection() {\n const { EventAssetCollection } = await import(\n '../collections/EventAssetCollection'\n );\n return EventAssetCollection.create({ db: this.db });\n }\n async getAssets(relationship?: string): Promise<Asset[]> {\n if (!this.id) {\n return [];\n }\n\n const eventAssets = await this.getEventAssetCollection();\n const linkedAssets = await eventAssets.byLeft(\n this.id,\n relationship ? { relationship } : {},\n );\n\n return resolveOwnedAssetsById(\n this.db,\n linkedAssets.map((link) => link.assetId),\n this.tenantId,\n );\n }\n\n async addAsset(\n asset: Asset,\n relationship = 'attachment',\n sortOrder = 0,\n ): Promise<void> {\n if (!this.id || !asset.id) {\n throw new Error('Cannot associate unsaved event or asset');\n }\n\n assertValidOwnedAssetRelationship(relationship);\n assertValidOwnedAssetSortOrder(sortOrder);\n\n const eventAssets = await this.getEventAssetCollection();\n await eventAssets.attach(this.id, asset.id, {\n relationship,\n sortOrder,\n tenantId: this.tenantId,\n });\n }\n\n async removeAsset(assetId: string, relationship?: string): Promise<void> {\n if (!this.id) {\n return;\n }\n\n const eventAssets = await this.getEventAssetCollection();\n await eventAssets.detach(\n this.id,\n assetId,\n relationship ? { relationship } : {},\n );\n }\n\n /**\n * Check if event is currently in progress\n *\n * @returns True if current time is between start and end\n */\n isInProgress(): boolean {\n if (this.status !== 'in_progress') return false;\n\n const now = new Date();\n if (this.startDate && now < this.startDate) return false;\n if (this.endDate && now > this.endDate) return false;\n\n return true;\n }\n\n /**\n * Check if event is a root event (no parent)\n *\n * @returns True if parentId is null/empty\n */\n isRoot(): boolean {\n return !this.parentId;\n }\n}\n","/**\n * EventCollection - Collection manager for Event objects\n *\n * Provides hierarchy traversal, filtering, and search capabilities.\n */\n\nimport type { Asset } from '@happyvertical/smrt-assets';\nimport {\n addOwnedAssetFromCollection,\n getOwnedAssetsFromCollection,\n removeOwnedAssetFromCollection,\n} from '@happyvertical/smrt-assets';\nimport { SmrtCollection } from '@happyvertical/smrt-core';\nimport { queryGlobal, queryWithGlobals } from '@happyvertical/smrt-tenancy';\nimport { Event } from '../models/Event';\nimport type { EventSearchFilters, EventStatus } from '../types';\n\nexport class EventCollection extends SmrtCollection<Event> {\n static readonly _itemClass = Event;\n\n /**\n * Get events by series\n *\n * @param seriesId - EventSeries ID\n * @returns Array of Event instances\n */\n async getBySeriesId(seriesId: string): Promise<Event[]> {\n return await this.list({ where: { seriesId } });\n }\n\n /**\n * Get events at a specific place\n *\n * @param placeId - Place ID\n * @returns Array of Event instances\n */\n async getByPlace(placeId: string): Promise<Event[]> {\n return await this.list({ where: { placeId } });\n }\n\n /**\n * Get events by date range\n *\n * @param startDate - Start of date range\n * @param endDate - End of date range\n * @returns Array of Event instances\n */\n async getByDateRange(startDate: Date, endDate: Date): Promise<Event[]> {\n const allEvents = await this.list({});\n\n return allEvents.filter((event) => {\n if (!event.startDate) return false;\n return event.startDate >= startDate && event.startDate <= endDate;\n });\n }\n\n /**\n * Get upcoming events\n *\n * @param limit - Maximum number of events to return\n * @returns Array of Event instances starting in the future\n */\n async getUpcoming(limit?: number): Promise<Event[]> {\n const allEvents = await this.list({});\n const now = new Date();\n\n const upcoming = allEvents\n .filter((event) => event.startDate && event.startDate > now)\n .sort((a, b) => {\n if (!a.startDate || !b.startDate) return 0;\n return a.startDate.getTime() - b.startDate.getTime();\n });\n\n return limit ? upcoming.slice(0, limit) : upcoming;\n }\n\n /**\n * Get events by status\n *\n * @param status - Event status to filter by\n * @returns Array of Event instances\n */\n async getByStatus(status: EventStatus): Promise<Event[]> {\n return await this.list({ where: { status } });\n }\n\n /**\n * Get events by type\n *\n * @param typeId - EventType ID\n * @returns Array of Event instances\n */\n async getByType(typeId: string): Promise<Event[]> {\n return await this.list({ where: { typeId } });\n }\n\n /**\n * Get root events (no parent)\n *\n * @returns Array of Event instances with no parent\n */\n async getRootEvents(): Promise<Event[]> {\n const allEvents = await this.list({});\n return allEvents.filter((event) => !event.parentId);\n }\n\n /**\n * Get children of a parent event\n *\n * @param parentId - Parent event ID\n * @returns Array of child Event instances\n */\n async getByParent(parentId: string): Promise<Event[]> {\n return await this.list({ where: { parentId } });\n }\n\n /**\n * Get full event tree (hierarchy)\n *\n * @param eventId - Root event ID\n * @returns Object with root event and nested children\n */\n async getEventTree(eventId: string): Promise<Event | null> {\n const event = await this.get({ id: eventId });\n if (!event) return null;\n\n return await event.getHierarchy().then((h) => h.current);\n }\n\n async getAssets(eventId: string, relationship?: string): Promise<Asset[]> {\n return getOwnedAssetsFromCollection(this, eventId, relationship);\n }\n\n async addAsset(\n eventId: string,\n asset: Asset,\n relationship = 'attachment',\n sortOrder = 0,\n ): Promise<void> {\n await addOwnedAssetFromCollection(\n this,\n 'Event',\n eventId,\n asset,\n relationship,\n sortOrder,\n );\n }\n\n async removeAsset(\n eventId: string,\n assetId: string,\n relationship?: string,\n ): Promise<void> {\n await removeOwnedAssetFromCollection(\n this,\n 'Event',\n eventId,\n assetId,\n relationship,\n );\n }\n\n /**\n * Search events with filters\n *\n * @param query - Search query for name/description\n * @param filters - Additional filter criteria\n * @returns Array of matching Event instances\n */\n async search(query: string, filters?: EventSearchFilters): Promise<Event[]> {\n let events = await this.list({});\n\n // Filter by query\n if (query) {\n const lowerQuery = query.toLowerCase();\n events = events.filter(\n (e) =>\n e.name?.toLowerCase().includes(lowerQuery) ||\n e.description?.toLowerCase().includes(lowerQuery),\n );\n }\n\n // Apply filters\n if (filters) {\n if (filters.typeId) {\n events = events.filter((e) => e.typeId === filters.typeId);\n }\n if (filters.seriesId) {\n events = events.filter((e) => e.seriesId === filters.seriesId);\n }\n if (filters.placeId) {\n events = events.filter((e) => e.placeId === filters.placeId);\n }\n if (filters.status) {\n if (Array.isArray(filters.status)) {\n events = events.filter((e) => filters.status?.includes(e.status));\n } else {\n events = events.filter((e) => e.status === filters.status);\n }\n }\n if (filters.startDate) {\n const startDate = filters.startDate;\n events = events.filter((e) => e.startDate && e.startDate >= startDate);\n }\n if (filters.endDate) {\n const endDate = filters.endDate;\n events = events.filter((e) => e.startDate && e.startDate <= endDate);\n }\n if (filters.organizerId) {\n // Filter by series organizer\n events = events.filter(async (e) => {\n const series = await e.getSeries();\n return series && series.organizerId === filters.organizerId;\n });\n }\n }\n\n return events;\n }\n\n /**\n * Get events in progress\n *\n * @returns Array of Event instances currently in progress\n */\n async getInProgress(): Promise<Event[]> {\n const inProgressEvents = await this.getByStatus('in_progress');\n return inProgressEvents.filter((event) => event.isInProgress());\n }\n\n // ============================================\n // Tenant Helper Methods\n // ============================================\n\n /**\n * Find all events for a specific tenant\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of Event instances for the tenant\n */\n async findByTenant(tenantId: string): Promise<Event[]> {\n return this.list({ where: { tenantId } });\n }\n\n /**\n * Find all global events (no tenant association).\n *\n * Routes through the shared tenant-global helper so it does not throw under\n * an active tenant context (an explicit `tenant_id IS NULL` filter would be\n * flagged as an isolation violation). (#1600)\n *\n * @returns Array of Event instances with no tenant\n */\n async findGlobal(): Promise<Event[]> {\n return queryGlobal<Event>(this);\n }\n\n /**\n * Find events for a tenant including global events.\n *\n * Fails closed if an active tenant context requests a different tenant's\n * rows; the admin/system path keeps the cross-tenant capability. (#1600)\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of Event instances for the tenant and global events\n */\n async findWithGlobals(tenantId: string): Promise<Event[]> {\n return queryWithGlobals<Event>(this, tenantId, 'Event.findWithGlobals');\n }\n}\n","/**\n * EventSeries model - Groups related events (season, tour, conference, etc.)\n *\n * Examples: '2024 NBA Finals', 'Summer Tour 2024', 'Town Council 2024'\n */\n\nimport {\n crossPackageRef,\n field,\n foreignKey,\n SmrtObject,\n smrt,\n} from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport { expandRecurrence } from '../recurrence';\nimport type { EventSeriesOptions, RecurrencePattern } from '../types';\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableStrategy: 'sti',\n api: { include: ['list', 'get', 'create', 'update', 'delete'] },\n mcp: { include: ['list', 'get', 'create', 'update'] },\n cli: { skipApiCheck: true },\n})\nexport class EventSeries extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-events\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @field({ description: 'What the series is called.' })\n name: string = '';\n @field({ description: 'The kind of event in this series.' })\n @foreignKey('EventType')\n typeId = ''; // FK to EventType\n @field({ description: 'Who runs the series.' })\n @crossPackageRef('@happyvertical/smrt-profiles:Profile')\n organizerId = ''; // FK to Profile (from @happyvertical/smrt-profiles)\n @field({ description: 'What the series is about.' })\n description = '';\n @field({ description: 'When the series begins.' })\n startDate: Date | null = null;\n @field({ description: 'When the series ends.' })\n endDate: Date | null = null;\n @field({ description: 'How often it repeats.' })\n recurrence = ''; // JSON recurrence pattern (stored as text)\n metadata = ''; // JSON metadata (stored as text)\n externalId = ''; // External system identifier\n source = ''; // Source system (e.g., 'ticketmaster', 'espn')\n\n // Timestamps\n createdAt = new Date();\n updatedAt = new Date();\n\n constructor(options: EventSeriesOptions = {}) {\n super(options);\n\n if (options.typeId) this.typeId = options.typeId;\n if (options.organizerId) this.organizerId = options.organizerId;\n if (options.description !== undefined)\n this.description = options.description;\n if (options.startDate !== undefined)\n this.startDate = options.startDate || null;\n if (options.endDate !== undefined) this.endDate = options.endDate || null;\n if (options.externalId !== undefined) this.externalId = options.externalId;\n if (options.source !== undefined) this.source = options.source;\n\n // Handle recurrence - can be object or JSON string\n if (options.recurrence !== undefined) {\n if (typeof options.recurrence === 'string') {\n this.recurrence = options.recurrence;\n } else {\n this.recurrence = JSON.stringify(options.recurrence);\n }\n }\n\n // Handle metadata - can be object or JSON string\n if (options.metadata !== undefined) {\n if (typeof options.metadata === 'string') {\n this.metadata = options.metadata;\n } else {\n this.metadata = JSON.stringify(options.metadata);\n }\n }\n\n if (options.createdAt) this.createdAt = options.createdAt;\n if (options.updatedAt) this.updatedAt = options.updatedAt;\n }\n\n /**\n * Get recurrence pattern as parsed object\n *\n * @returns Parsed recurrence pattern or null\n */\n getRecurrence(): RecurrencePattern | null {\n if (!this.recurrence) return null;\n try {\n return JSON.parse(this.recurrence) as RecurrencePattern;\n } catch {\n return null;\n }\n }\n\n /**\n * Set recurrence pattern from object\n *\n * @param pattern - Recurrence pattern to store\n */\n setRecurrence(pattern: RecurrencePattern): void {\n this.recurrence = JSON.stringify(pattern);\n }\n\n /**\n * Expand this series' recurrence into occurrence start instants within a\n * window. The first occurrence is `startDate` (or `options.start`); its\n * wall-clock time in the time zone is kept for every occurrence, and\n * `endDate` caps the series like an inclusive `until`.\n *\n * @param rangeStart - Inclusive window start\n * @param rangeEnd - Inclusive window end\n * @param options - Time zone (defaults to the pattern's `timeZone`, then UTC) and optional first occurrence\n * @returns Occurrence start instants, or an empty array without a pattern or start\n */\n getOccurrences(\n rangeStart: Date,\n rangeEnd: Date,\n options: { timeZone?: string; start?: Date; limit?: number } = {},\n ): Date[] {\n const pattern = this.getRecurrence();\n const start = options.start ?? this.startDate;\n if (!pattern || !start) return [];\n const end =\n this.endDate && this.endDate.getTime() < rangeEnd.getTime()\n ? this.endDate\n : rangeEnd;\n return expandRecurrence(pattern, {\n start,\n rangeStart,\n rangeEnd: end,\n timeZone: options.timeZone,\n limit: options.limit,\n });\n }\n\n /**\n * Get metadata as parsed object\n *\n * @returns Parsed metadata object or empty object\n */\n getMetadata(): Record<string, unknown> {\n if (!this.metadata) return {};\n try {\n return JSON.parse(this.metadata);\n } catch {\n return {};\n }\n }\n\n /**\n * Set metadata from object\n *\n * @param data - Metadata object to store\n */\n setMetadata(data: Record<string, unknown>): void {\n this.metadata = JSON.stringify(data);\n }\n\n /**\n * Update metadata by merging with existing values\n *\n * @param updates - Partial metadata to merge\n */\n updateMetadata(updates: Record<string, unknown>): void {\n const current = this.getMetadata();\n this.setMetadata({ ...current, ...updates });\n }\n\n /**\n * Get the event type for this series\n *\n * @returns EventType instance or null\n */\n async getType() {\n if (!this.typeId) return null;\n\n const { EventTypeCollection } = await import(\n '../collections/EventTypeCollection'\n );\n const collection = await EventTypeCollection.create(this.options);\n\n return await collection.get({ id: this.typeId });\n }\n\n /**\n * Get the organizer profile for this series\n *\n * @returns Profile instance or null\n */\n async getOrganizer() {\n if (!this.organizerId) return null;\n\n // Import Profile from @happyvertical/smrt-profiles\n try {\n const { ProfileCollection } = await import(\n '@happyvertical/smrt-profiles'\n );\n const collection = await ProfileCollection.create(this.options);\n\n return await collection.get({ id: this.organizerId });\n } catch {\n // @happyvertical/smrt-profiles not available\n return null;\n }\n }\n\n /**\n * Get all events in this series\n *\n * @returns Array of Event instances\n */\n async getEvents() {\n const { EventCollection } = await import('../collections/EventCollection');\n const collection = await EventCollection.create(this.options);\n\n return await collection.list({ where: { seriesId: this.id } });\n }\n\n /**\n * Check if series is currently active\n *\n * @returns True if current date is between start and end\n */\n isActive(): boolean {\n const now = new Date();\n if (this.startDate && now < this.startDate) return false;\n if (this.endDate && now > this.endDate) return false;\n return true;\n }\n}\n","/**\n * EventSeriesCollection - Collection manager for EventSeries objects\n *\n * Provides queries for series by organizer, status, and date ranges.\n */\n\nimport { SmrtCollection } from '@happyvertical/smrt-core';\nimport { queryGlobal, queryWithGlobals } from '@happyvertical/smrt-tenancy';\nimport { EventSeries } from '../models/EventSeries';\nimport type { EventSeriesSearchFilters } from '../types';\n\nexport class EventSeriesCollection extends SmrtCollection<EventSeries> {\n static readonly _itemClass = EventSeries;\n\n /**\n * Get series by organizer\n *\n * @param organizerId - Profile ID of the organizer\n * @returns Array of EventSeries instances\n */\n async getByOrganizer(organizerId: string): Promise<EventSeries[]> {\n return await this.list({ where: { organizerId } });\n }\n\n /**\n * Get currently active series\n *\n * @returns Array of EventSeries instances active today\n */\n async getActive(): Promise<EventSeries[]> {\n const allSeries = await this.list({});\n const now = new Date();\n\n return allSeries.filter((series) => {\n if (series.startDate && now < series.startDate) return false;\n if (series.endDate && now > series.endDate) return false;\n return true;\n });\n }\n\n /**\n * Get upcoming series\n *\n * @param limit - Maximum number of series to return\n * @returns Array of EventSeries instances starting in the future\n */\n async getUpcoming(limit?: number): Promise<EventSeries[]> {\n const allSeries = await this.list({});\n const now = new Date();\n\n const upcoming = allSeries\n .filter((series) => series.startDate && series.startDate > now)\n .sort((a, b) => {\n if (!a.startDate || !b.startDate) return 0;\n return a.startDate.getTime() - b.startDate.getTime();\n });\n\n return limit ? upcoming.slice(0, limit) : upcoming;\n }\n\n /**\n * Get series by type\n *\n * @param typeId - EventType ID\n * @returns Array of EventSeries instances\n */\n async getByType(typeId: string): Promise<EventSeries[]> {\n return await this.list({ where: { typeId } });\n }\n\n /**\n * Search series with filters\n *\n * @param query - Search query for name/description\n * @param filters - Additional filter criteria\n * @returns Array of matching EventSeries instances\n */\n async search(\n query: string,\n filters?: EventSeriesSearchFilters,\n ): Promise<EventSeries[]> {\n let series = await this.list({});\n\n // Filter by query\n if (query) {\n const lowerQuery = query.toLowerCase();\n series = series.filter(\n (s) =>\n s.name?.toLowerCase().includes(lowerQuery) ||\n s.description?.toLowerCase().includes(lowerQuery),\n );\n }\n\n // Apply filters\n if (filters) {\n if (filters.typeId) {\n series = series.filter((s) => s.typeId === filters.typeId);\n }\n if (filters.organizerId) {\n series = series.filter((s) => s.organizerId === filters.organizerId);\n }\n if (filters.startDate) {\n const startDate = filters.startDate;\n series = series.filter((s) => s.startDate && s.startDate >= startDate);\n }\n if (filters.endDate) {\n const endDate = filters.endDate;\n series = series.filter((s) => s.endDate && s.endDate <= endDate);\n }\n }\n\n return series;\n }\n\n // ============================================\n // Tenant Helper Methods\n // ============================================\n\n /**\n * Find all event series for a specific tenant\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of EventSeries instances for the tenant\n */\n async findByTenant(tenantId: string): Promise<EventSeries[]> {\n return this.list({ where: { tenantId } });\n }\n\n /**\n * Find all global event series (no tenant association).\n *\n * Routes through the shared tenant-global helper so it does not throw under\n * an active tenant context (an explicit `tenant_id IS NULL` filter would be\n * flagged as an isolation violation). (#1600)\n *\n * @returns Array of EventSeries instances with no tenant\n */\n async findGlobal(): Promise<EventSeries[]> {\n return queryGlobal<EventSeries>(this);\n }\n\n /**\n * Find event series for a tenant including global series.\n *\n * Fails closed if an active tenant context requests a different tenant's\n * rows; the admin/system path keeps the cross-tenant capability. (#1600)\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of EventSeries instances for the tenant and global series\n */\n async findWithGlobals(tenantId: string): Promise<EventSeries[]> {\n return queryWithGlobals<EventSeries>(\n this,\n tenantId,\n 'EventSeries.findWithGlobals',\n );\n }\n}\n","import { createHash } from 'node:crypto';\nimport { ICAL, parseICalendar } from '@happyvertical/icalendar';\nimport {\n type DatabaseConfig,\n resolveDatabase,\n type SmrtClassOptions,\n} from '@happyvertical/smrt-core';\nimport type { DatabaseInterface } from '@happyvertical/smrt-core/migrations';\nimport { getTenantId } from '@happyvertical/smrt-tenancy';\nimport { EventCollection } from '../collections/EventCollection';\nimport { EventSeriesCollection } from '../collections/EventSeriesCollection';\nimport type { Event } from '../models/Event';\nimport {\n type CalendarEventInput,\n type CalendarExpansionOptions,\n type CalendarParseOptions,\n expandICalendarEvents,\n parseICalendarEvents,\n} from './icalendar';\n\nexport interface CalendarSourceSyncOptions\n extends Omit<SmrtClassOptions, 'db'> {\n db: DatabaseConfig;\n source: string;\n ics: string;\n tenantId?: string | null;\n parse?: CalendarParseOptions;\n expansion?: Omit<CalendarExpansionOptions, keyof CalendarParseOptions>;\n}\n\nexport interface CalendarSourceSyncResult {\n created: number;\n updated: number;\n unchanged: number;\n /** Missing feed entries are deliberately retained; sync never deletes by omission. */\n retainedOnOmission: true;\n}\n\ninterface CalendarVersion {\n sequence: number | null;\n dtstamp: string | null;\n}\n\nfunction stableId(...parts: string[]): string {\n const hex = createHash('sha256').update(JSON.stringify(parts)).digest('hex');\n return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-5${hex.slice(13, 16)}-a${hex.slice(17, 20)}-${hex.slice(20, 32)}`;\n}\n\nfunction identityKey(entry: CalendarEventInput): string {\n return JSON.stringify([\n entry.identity.uid,\n entry.identity.recurrenceId ?? null,\n ]);\n}\n\nfunction versionFrom(event: Pick<Event, 'getMetadata'>): CalendarVersion {\n const calendar = event.getMetadata().calendar;\n if (!calendar || typeof calendar !== 'object')\n return { sequence: null, dtstamp: null };\n const record = calendar as Record<string, unknown>;\n return {\n sequence: typeof record.sequence === 'number' ? record.sequence : null,\n dtstamp: typeof record.dtstamp === 'string' ? record.dtstamp : null,\n };\n}\n\nfunction isNewer(\n entry: CalendarEventInput,\n existing: Pick<Event, 'getMetadata'>,\n): boolean {\n const previous = versionFrom(existing);\n const sequence = entry.sequence ?? 0;\n const oldSequence = previous.sequence ?? 0;\n if (sequence > oldSequence) return true;\n const stamp = entry.dtstamp?.toISOString() ?? '';\n const oldStamp = previous.dtstamp ?? '';\n return stamp > oldStamp;\n}\n\nfunction applyEvent(\n event: Event,\n entry: CalendarEventInput,\n seriesId: string,\n tenantId: string | null,\n): void {\n event.tenantId = tenantId;\n event.seriesId = seriesId;\n event.name = entry.name || (entry.status === 'cancelled' ? event.name : '');\n event.description =\n entry.description ||\n (entry.status === 'cancelled' ? event.description : '');\n event.startDate = entry.startDate ?? event.startDate;\n event.endDate = entry.endDate ?? event.endDate;\n if (entry.startDate) {\n event.allDay = entry.allDay;\n event.timeZone = entry.timeZone;\n }\n event.status = entry.status;\n event.source = entry.identity.source;\n event.externalId = entry.identity.uid;\n event.setMetadata({\n ...event.getMetadata(),\n calendar: {\n uid: entry.identity.uid,\n detached: entry.detached ?? false,\n recurrenceId: entry.identity.recurrenceId ?? null,\n sequence: entry.sequence,\n dtstamp: entry.dtstamp?.toISOString() ?? null,\n rrule: entry.recurrence,\n exdate: entry.excludedRecurrenceIds,\n rdate: entry.additionalRecurrenceIds,\n },\n });\n}\n\n/** Retain one authoritative master document per series, even when the requested\n * window has no occurrences. Expand retained documents, never a stale payload.\n * This runs on the same transaction executor as occurrence materialization.\n */\nasync function retainCalendarMasters(\n series: EventSeriesCollection,\n options: CalendarSourceSyncOptions,\n): Promise<string> {\n const parsed = parseICalendarEvents(\n options.source,\n options.ics,\n options.parse,\n );\n const components = parseICalendar(\n options.ics,\n options.parse?.limits,\n ).component.getAllSubcomponents('vevent');\n const calendar = new ICAL.Component('vcalendar');\n for (let index = 0; index < parsed.length; index++) {\n const entry = parsed[index];\n let component = components[index];\n if (!entry.detached) {\n const id = stableId(\n 'icalendar-series',\n options.tenantId ?? '',\n options.source,\n entry.identity.uid,\n );\n let sourceSeries = await series.get({ id });\n if (!sourceSeries) {\n sourceSeries = await series.create({\n id,\n tenantId: options.tenantId ?? null,\n name: entry.name,\n source: options.source,\n externalId: entry.identity.uid,\n });\n }\n const previous = sourceSeries.getMetadata().calendar;\n const record =\n previous && typeof previous === 'object'\n ? (previous as Record<string, unknown>)\n : {};\n if (\n typeof record.masterIcs === 'string' &&\n !isNewer(entry, sourceSeries)\n ) {\n const retained = parseICalendar(\n record.masterIcs,\n options.parse?.limits,\n ).component.getFirstSubcomponent('vevent');\n if (!retained)\n throw new Error('Stored calendar master is missing VEVENT');\n component = retained;\n } else {\n // Bind floating values to their authoritative source policy before saving\n // the SDK component. Future window requests cannot reinterpret that policy.\n for (const propertyName of [\n 'dtstart',\n 'dtend',\n 'recurrence-id',\n 'rdate',\n 'exdate',\n ]) {\n for (const property of component.getAllProperties(propertyName)) {\n const value = property.getFirstValue();\n if (\n value instanceof ICAL.Time &&\n !value.isDate &&\n value.zone.tzid === 'floating' &&\n !property.getFirstParameter('tzid') &&\n entry.timeZone\n ) {\n property.setParameter('tzid', entry.timeZone);\n }\n }\n }\n const document = new ICAL.Component('vcalendar');\n document.addSubcomponent(component);\n sourceSeries.name = entry.name || sourceSeries.name;\n sourceSeries.setMetadata({\n ...sourceSeries.getMetadata(),\n calendar: {\n uid: entry.identity.uid,\n sequence: entry.sequence,\n dtstamp: entry.dtstamp?.toISOString() ?? null,\n cancelled: entry.status === 'cancelled' && !entry.startDate,\n masterIcs: document.toString(),\n },\n });\n await sourceSeries.save();\n }\n }\n calendar.addSubcomponent(component);\n }\n return calendar.toString();\n}\n\nasync function syncParsed(\n db: DatabaseInterface,\n options: CalendarSourceSyncOptions,\n): Promise<CalendarSourceSyncResult> {\n const events = await EventCollection.create({ db });\n const series = await EventSeriesCollection.create({ db });\n const authoritativeIcs = await retainCalendarMasters(series, options);\n const entries = options.expansion\n ? expandICalendarEvents(options.source, authoritativeIcs, {\n ...options.parse,\n ...options.expansion,\n })\n : parseICalendarEvents(options.source, authoritativeIcs, options.parse);\n if (\n !options.expansion &&\n entries.some(\n (entry) => entry.recurrence || entry.additionalRecurrenceIds.length,\n )\n ) {\n throw new Error('Recurring calendar sync requires bounded expansion');\n }\n const tenantId = options.tenantId ?? null;\n let created = 0;\n let updated = 0;\n let unchanged = 0;\n\n for (const entry of entries) {\n const seriesId = stableId(\n 'icalendar-series',\n tenantId ?? '',\n options.source,\n entry.identity.uid,\n );\n let sourceSeries = await series.get({ id: seriesId });\n if (!sourceSeries) {\n sourceSeries = await series.create({\n id: seriesId,\n tenantId,\n name: entry.name,\n source: options.source,\n externalId: entry.identity.uid,\n });\n sourceSeries.setMetadata({ calendar: { uid: entry.identity.uid } });\n await sourceSeries.save();\n }\n\n if (\n entry.status === 'cancelled' &&\n !entry.startDate &&\n !entry.identity.recurrenceId\n ) {\n const affected = await events.list({ where: { seriesId, tenantId } });\n for (const event of affected) {\n if (!isNewer(entry, event)) {\n unchanged++;\n continue;\n }\n event.status = 'cancelled';\n const calendar = event.getMetadata().calendar;\n event.setMetadata({\n ...event.getMetadata(),\n calendar: {\n ...(calendar && typeof calendar === 'object' ? calendar : {}),\n sequence: entry.sequence,\n dtstamp: entry.dtstamp?.toISOString() ?? null,\n },\n });\n await event.save();\n updated++;\n }\n if (\n !(\n 'cancelled' in\n (sourceSeries.getMetadata().calendar as Record<string, unknown>)\n ) ||\n isNewer(entry, sourceSeries)\n ) {\n sourceSeries.setMetadata({\n ...sourceSeries.getMetadata(),\n calendar: {\n ...(sourceSeries.getMetadata().calendar as Record<string, unknown>),\n uid: entry.identity.uid,\n cancelled: true,\n sequence: entry.sequence,\n dtstamp: entry.dtstamp?.toISOString() ?? null,\n },\n });\n await sourceSeries.save();\n }\n continue;\n }\n\n const id = stableId(\n 'icalendar-event',\n tenantId ?? '',\n options.source,\n identityKey(entry),\n );\n const existing = await events.get({ id });\n const sourceCalendar = sourceSeries.getMetadata().calendar;\n if (\n sourceCalendar &&\n typeof sourceCalendar === 'object' &&\n 'cancelled' in sourceCalendar &&\n sourceCalendar.cancelled === true &&\n !isNewer(entry, sourceSeries)\n ) {\n unchanged++;\n continue;\n }\n const previousCalendar = existing?.getMetadata().calendar;\n const existingDetached =\n previousCalendar &&\n typeof previousCalendar === 'object' &&\n 'detached' in previousCalendar &&\n previousCalendar.detached === true;\n if (\n existing &&\n ((existingDetached && !entry.detached) || !isNewer(entry, existing))\n ) {\n unchanged += 1;\n continue;\n }\n const event = existing ?? (await events.create({ id }));\n applyEvent(event, entry, seriesId, tenantId);\n await event.save();\n if (existing) updated += 1;\n else created += 1;\n }\n\n return { created, updated, unchanged, retainedOnOmission: true };\n}\n\n/**\n * Persist one already-fetched calendar feed. The caller owns fetch, retries and\n * authorization; every write runs through one required database transaction. Feed omission never deletes an existing event.\n */\nexport async function syncICalendarSource(\n options: CalendarSourceSyncOptions,\n): Promise<CalendarSourceSyncResult> {\n if (!options.db) throw new Error('Calendar source sync requires a database');\n const activeTenant = getTenantId();\n const tenantId =\n options.tenantId === undefined ? (activeTenant ?? null) : options.tenantId;\n if (activeTenant && activeTenant !== tenantId)\n throw new Error('Calendar tenant isolation violation');\n const entries = parseICalendarEvents(\n options.source,\n options.ics,\n options.parse,\n );\n if (\n !options.expansion &&\n entries.some((e) => e.recurrence || e.additionalRecurrenceIds.length)\n ) {\n throw new Error('Recurring calendar sync requires bounded expansion');\n }\n const db = await resolveDatabase(options.db);\n if (db.requiresSchemaCheck)\n throw new Error(\n 'Calendar sync requires migrated SQLite/PostgreSQL schemas',\n );\n if (!db.transaction)\n throw new Error('Calendar source sync requires transaction()');\n return db.transaction((transaction) =>\n syncParsed(transaction, { ...options, tenantId }),\n );\n}\n","import type { SmrtObjectOptions } from '@happyvertical/smrt-core';\nimport {\n crossPackageRef,\n field,\n foreignKey,\n SmrtObject,\n smrt,\n} from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\n\nexport interface EventAssetOptions extends SmrtObjectOptions {\n eventId?: string;\n assetId?: string;\n relationship?: string;\n sortOrder?: number;\n tenantId?: string | null;\n}\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableName: 'event_assets',\n conflictColumns: ['event_id', 'asset_id', 'relationship'],\n api: false,\n mcp: false,\n cli: false,\n})\nexport class EventAsset extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-events\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @foreignKey('Event', { required: true })\n eventId = '';\n\n @crossPackageRef('@happyvertical/smrt-assets:Asset', { required: true })\n assetId = '';\n\n @field({ required: true })\n relationship = 'attachment';\n\n @field()\n sortOrder = 0;\n\n constructor(options: EventAssetOptions = {}) {\n super(options);\n if (options.eventId) this.eventId = options.eventId;\n if (options.assetId) this.assetId = options.assetId;\n if (options.relationship) this.relationship = options.relationship;\n if (options.sortOrder !== undefined) this.sortOrder = options.sortOrder;\n if (options.tenantId !== undefined) this.tenantId = options.tenantId;\n }\n}\n","import type { Asset } from '@happyvertical/smrt-assets';\nimport {\n addOwnedAssetFromCollection,\n getOwnedAssetsFromCollection,\n removeOwnedAssetFromCollection,\n} from '@happyvertical/smrt-assets';\nimport type { SmrtCollectionOptions } from '@happyvertical/smrt-core';\nimport { SmrtJunction, smrt } from '@happyvertical/smrt-core';\nimport { EventAsset } from '../models/EventAsset';\nimport type { EventCollection } from './EventCollection';\n\nexport interface EventAssetCollectionOptions extends SmrtCollectionOptions {}\n\n@smrt({\n api: false,\n mcp: false,\n cli: false,\n})\nexport class EventAssetCollection extends SmrtJunction<EventAsset> { static __smrtPackage__ = \"@happyvertical/smrt-events\";\n static readonly _itemClass = EventAsset;\n protected leftField = 'eventId';\n protected rightField = 'assetId';\n\n private eventCollectionPromise: Promise<EventCollection> | null = null;\n\n private async getEventCollection(): Promise<EventCollection> {\n if (!this.eventCollectionPromise) {\n const { EventCollection } = await import('./EventCollection');\n this.eventCollectionPromise = EventCollection.create({ db: this.db });\n }\n\n return this.eventCollectionPromise;\n }\n\n async getAssets(eventId: string, relationship?: string): Promise<Asset[]> {\n return getOwnedAssetsFromCollection(\n await this.getEventCollection(),\n eventId,\n relationship,\n );\n }\n\n async addAsset(\n eventId: string,\n asset: Asset,\n relationship = 'attachment',\n sortOrder = 0,\n ): Promise<void> {\n await addOwnedAssetFromCollection(\n await this.getEventCollection(),\n 'Event',\n eventId,\n asset,\n relationship,\n sortOrder,\n );\n }\n\n async removeAsset(\n eventId: string,\n assetId: string,\n relationship?: string,\n ): Promise<void> {\n await removeOwnedAssetFromCollection(\n await this.getEventCollection(),\n 'Event',\n eventId,\n assetId,\n relationship,\n );\n }\n}\n","/**\n * EventParticipant model - Links participants to events\n *\n * Tracks who participated in an event with role and placement\n */\n\nimport {\n crossPackageRef,\n field,\n foreignKey,\n SmrtObject,\n smrt,\n} from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport type { EventParticipantOptions } from '../types';\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n // Junction table - uses event_id + profile_id + role as natural key\n // instead of slug-based conflict columns\n conflictColumns: ['event_id', 'profile_id', 'role'],\n api: { include: ['list', 'get', 'create', 'update', 'delete'] },\n mcp: { include: ['list', 'get', 'create', 'update'] },\n cli: { skipApiCheck: true },\n})\nexport class EventParticipant extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-events\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n // id inherited from SmrtObject\n\n @field({ description: 'The event the person takes part in.' })\n @foreignKey('Event')\n eventId = ''; // FK to Event\n @field({ description: 'The person taking part.' })\n @crossPackageRef('@happyvertical/smrt-profiles:Profile')\n profileId = ''; // FK to Profile (from @happyvertical/smrt-profiles)\n @field({\n description: 'What they do there, for example speaker or attendee.',\n })\n role: string = ''; // Participant role (ParticipantRole or custom)\n placement: number | null = null; // Numeric position/placement\n groupId = ''; // Optional grouping (e.g., team ID for individual players)\n metadata = ''; // JSON metadata (stored as text)\n externalId = ''; // External system identifier\n source = ''; // Source system\n\n // Timestamps\n createdAt = new Date();\n updatedAt = new Date();\n\n constructor(options: EventParticipantOptions = {}) {\n super(options);\n\n if (options.eventId) this.eventId = options.eventId;\n if (options.profileId) this.profileId = options.profileId;\n if (options.role !== undefined) this.role = options.role;\n if (options.placement !== undefined) this.placement = options.placement;\n if (options.groupId !== undefined) this.groupId = options.groupId;\n if (options.externalId !== undefined) this.externalId = options.externalId;\n if (options.source !== undefined) this.source = options.source;\n\n // Handle metadata - can be object or JSON string\n if (options.metadata !== undefined) {\n if (typeof options.metadata === 'string') {\n this.metadata = options.metadata;\n } else {\n this.metadata = JSON.stringify(options.metadata);\n }\n }\n\n if (options.createdAt) this.createdAt = options.createdAt;\n if (options.updatedAt) this.updatedAt = options.updatedAt;\n }\n\n /**\n * Get metadata as parsed object\n *\n * @returns Parsed metadata object or empty object\n */\n getMetadata(): Record<string, unknown> {\n if (!this.metadata) return {};\n try {\n return JSON.parse(this.metadata);\n } catch {\n return {};\n }\n }\n\n /**\n * Set metadata from object\n *\n * @param data - Metadata object to store\n */\n setMetadata(data: Record<string, unknown>): void {\n this.metadata = JSON.stringify(data);\n }\n\n /**\n * Update metadata by merging with existing values\n *\n * @param updates - Partial metadata to merge\n */\n updateMetadata(updates: Record<string, unknown>): void {\n const current = this.getMetadata();\n this.setMetadata({ ...current, ...updates });\n }\n\n /**\n * Get the event for this participant\n *\n * @returns Event instance or null\n */\n async getEvent() {\n if (!this.eventId) return null;\n\n const { EventCollection } = await import('../collections/EventCollection');\n const collection = await EventCollection.create(this.options);\n\n return await collection.get({ id: this.eventId });\n }\n\n /**\n * Get the profile for this participant\n *\n * @returns Profile instance or null\n */\n async getProfile() {\n if (!this.profileId) return null;\n\n try {\n const { ProfileCollection } = await import(\n '@happyvertical/smrt-profiles'\n );\n const collection = await ProfileCollection.create(this.options);\n\n return await collection.get({ id: this.profileId });\n } catch {\n // @happyvertical/smrt-profiles not available\n return null;\n }\n }\n\n /**\n * Get group participants (others with same groupId)\n *\n * @returns Array of EventParticipant instances\n */\n async getGroupParticipants(): Promise<EventParticipant[]> {\n if (!this.groupId) return [];\n\n const { EventParticipantCollection } = await import(\n '../collections/EventParticipantCollection'\n );\n const collection = await EventParticipantCollection.create(this.options);\n\n const participants = await collection.list({\n where: { eventId: this.eventId, groupId: this.groupId },\n });\n\n // Exclude self from results\n return participants.filter((p: EventParticipant) => p.id !== this.id);\n }\n\n /**\n * Check if this is a home participant (placement = 0)\n *\n * @returns True if placement is 0\n */\n isHome(): boolean {\n return this.placement === 0;\n }\n\n /**\n * Check if this is an away participant (placement = 1)\n *\n * @returns True if placement is 1\n */\n isAway(): boolean {\n return this.placement === 1;\n }\n}\n","/**\n * EventParticipantCollection — junction collection for Event ↔ Profile links.\n *\n * The generic junction surface (byLeft/byRight/attach/detach/setLinks) comes\n * from `SmrtJunction`. Domain-specific helpers (placement-ordered queries,\n * home/away accessors, statistics, tenant scoping) live alongside.\n */\n\nimport { SmrtJunction, smrt } from '@happyvertical/smrt-core';\nimport { queryGlobal, queryWithGlobals } from '@happyvertical/smrt-tenancy';\nimport { EventParticipant } from '../models/EventParticipant';\nimport type { ParticipantSearchFilters } from '../types';\n\n// Decorator with empty config — only needed so the scanner detects the\n// class. See FactContentCollection for the full rationale.\n@smrt()\nexport class EventParticipantCollection extends SmrtJunction<EventParticipant> { static __smrtPackage__ = \"@happyvertical/smrt-events\";\n static readonly _itemClass = EventParticipant;\n protected leftField = 'eventId';\n protected rightField = 'profileId';\n // EventParticipant has no sortOrder column; `placement` is domain ordering\n // (0=home, 1=away) and must not be auto-assigned by setLinks.\n protected sortField: string | null = null;\n protected positionField: string | null = null;\n\n // ============================================\n // Domain helpers\n // ============================================\n\n /**\n * Get participants ordered by placement (nulls last).\n */\n async getByPlacement(eventId: string): Promise<EventParticipant[]> {\n const participants = await this.byLeft(eventId);\n\n return participants.sort((a, b) => {\n if (a.placement === null && b.placement === null) return 0;\n if (a.placement === null) return 1;\n if (b.placement === null) return -1;\n return a.placement - b.placement;\n });\n }\n\n /**\n * Get participants by group within an event.\n */\n async getByGroup(\n eventId: string,\n groupId: string,\n ): Promise<EventParticipant[]> {\n return this.byLeft(eventId, { groupId });\n }\n\n /**\n * Get the home participant(s) — placement = 0.\n */\n async getHome(eventId: string): Promise<EventParticipant[]> {\n return this.byLeft(eventId, { placement: 0 });\n }\n\n /**\n * Get the away participant(s) — placement = 1.\n */\n async getAway(eventId: string): Promise<EventParticipant[]> {\n return this.byLeft(eventId, { placement: 1 });\n }\n\n /**\n * Search participants with optional filters.\n */\n async search(filters: ParticipantSearchFilters): Promise<EventParticipant[]> {\n let participants = await this.list({});\n\n if (filters.eventId) {\n participants = participants.filter((p) => p.eventId === filters.eventId);\n }\n if (filters.profileId) {\n participants = participants.filter(\n (p) => p.profileId === filters.profileId,\n );\n }\n if (filters.role) {\n participants = participants.filter((p) => p.role === filters.role);\n }\n if (filters.groupId) {\n participants = participants.filter((p) => p.groupId === filters.groupId);\n }\n\n return participants;\n }\n\n /**\n * Get participation statistics for a profile, optionally filtered by event type.\n */\n async getParticipantStats(\n profileId: string,\n eventTypeId?: string,\n ): Promise<{\n totalEvents: number;\n byRole: Record<string, number>;\n byPlacement: Record<number, number>;\n }> {\n const participants = await this.byRight(profileId);\n\n let filteredParticipants = participants;\n if (eventTypeId) {\n filteredParticipants = [];\n for (const participant of participants) {\n const event = await participant.getEvent();\n if (event && event.typeId === eventTypeId) {\n filteredParticipants.push(participant);\n }\n }\n }\n\n const byRole: Record<string, number> = {};\n const byPlacement: Record<number, number> = {};\n\n for (const participant of filteredParticipants) {\n byRole[participant.role] = (byRole[participant.role] || 0) + 1;\n\n if (participant.placement !== null) {\n byPlacement[participant.placement] =\n (byPlacement[participant.placement] || 0) + 1;\n }\n }\n\n return {\n totalEvents: filteredParticipants.length,\n byRole,\n byPlacement,\n };\n }\n\n // ============================================\n // Tenant helpers\n // ============================================\n\n async findByTenant(tenantId: string): Promise<EventParticipant[]> {\n return this.list({ where: { tenantId } });\n }\n\n /**\n * Find all global participants (no tenant association).\n *\n * Routes through the shared tenant-global helper so it does not throw under\n * an active tenant context (an explicit `tenant_id IS NULL` filter would be\n * flagged as an isolation violation). (#1600)\n */\n async findGlobal(): Promise<EventParticipant[]> {\n return queryGlobal<EventParticipant>(this);\n }\n\n /**\n * Find participants for a tenant plus all global participants.\n *\n * Fails closed if an active tenant context requests a different tenant's\n * rows; the admin/system path keeps the cross-tenant capability. (#1600)\n */\n async findWithGlobals(tenantId: string): Promise<EventParticipant[]> {\n return queryWithGlobals<EventParticipant>(\n this,\n tenantId,\n 'EventParticipant.findWithGlobals',\n );\n }\n}\n","/**\n * EventType model - Defines types/categories of events\n *\n * Examples: 'basketball-game', 'concert', 'conference', 'goal', 'period'\n */\n\nimport { field, SmrtObject, smrt } from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport type { EventTypeOptions } from '../types';\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableStrategy: 'sti',\n api: { include: ['list', 'get', 'create', 'update', 'delete'] },\n mcp: { include: ['list', 'get', 'create'] },\n cli: { skipApiCheck: true },\n})\nexport class EventType extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-events\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @field({\n required: true,\n description: 'What this kind of event is called, for example workshop.',\n })\n name: string = '';\n\n @field({ description: 'What this kind of event is for.' })\n description: string = ''; // Optional description\n schema: string = ''; // JSON schema for event metadata (stored as text)\n participantSchema: string = ''; // JSON schema for participant metadata (stored as text)\n\n // Timestamps\n createdAt: Date = new Date();\n updatedAt: Date = new Date();\n\n constructor(options: EventTypeOptions = {}) {\n super(options);\n if (options.name) this.name = options.name;\n if (options.description !== undefined)\n this.description = options.description;\n\n // Handle schema - can be object or JSON string\n if (options.schema !== undefined) {\n if (typeof options.schema === 'string') {\n this.schema = options.schema;\n } else {\n this.schema = JSON.stringify(options.schema);\n }\n }\n\n // Handle participant schema\n if (options.participantSchema !== undefined) {\n if (typeof options.participantSchema === 'string') {\n this.participantSchema = options.participantSchema;\n } else {\n this.participantSchema = JSON.stringify(options.participantSchema);\n }\n }\n\n if (options.createdAt) this.createdAt = options.createdAt;\n if (options.updatedAt) this.updatedAt = options.updatedAt;\n }\n\n /**\n * Get schema as parsed object\n *\n * @returns Parsed schema object or empty object if no schema\n */\n getSchema(): Record<string, unknown> {\n if (!this.schema) return {};\n try {\n return JSON.parse(this.schema);\n } catch {\n return {};\n }\n }\n\n /**\n * Set schema from object\n *\n * @param data - Schema object to store\n */\n setSchema(data: Record<string, unknown>): void {\n this.schema = JSON.stringify(data);\n }\n\n /**\n * Get participant schema as parsed object\n *\n * @returns Parsed participant schema object or empty object\n */\n getParticipantSchema(): Record<string, unknown> {\n if (!this.participantSchema) return {};\n try {\n return JSON.parse(this.participantSchema);\n } catch {\n return {};\n }\n }\n\n /**\n * Set participant schema from object\n *\n * @param data - Participant schema object to store\n */\n setParticipantSchema(data: Record<string, unknown>): void {\n this.participantSchema = JSON.stringify(data);\n }\n\n /**\n * Convenience method for slug-based lookup\n *\n * @param slug - The slug to search for\n * @returns EventType instance or null if not found\n */\n static async getBySlug(_slug: string): Promise<EventType | null> {\n // Will be auto-implemented by SMRT\n return null;\n }\n}\n","/**\n * EventTypeCollection - Collection manager for EventType objects\n *\n * Provides lookup and creation for event types.\n */\n\nimport { SmrtCollection } from '@happyvertical/smrt-core';\nimport { queryGlobal, queryWithGlobals } from '@happyvertical/smrt-tenancy';\nimport { EventType } from '../models/EventType';\n\nexport class EventTypeCollection extends SmrtCollection<EventType> {\n static readonly _itemClass = EventType;\n\n /**\n * Get or create an event type by slug\n *\n * @param slug - EventType slug (e.g., 'basketball-game', 'concert')\n * @param name - Optional display name (defaults to capitalized slug)\n * @returns EventType instance\n */\n async getOrCreate(slug: string, name?: string): Promise<EventType> {\n // First try to find existing type with this slug\n const existing = await this.get({ slug });\n\n if (existing) {\n return existing;\n }\n\n // Create new type with auto-generated name if not provided\n const displayName =\n name || slug.replace(/-/g, ' ').replace(/\\b\\w/g, (l) => l.toUpperCase());\n\n return await this.create({\n slug,\n name: displayName,\n });\n }\n\n /**\n * Get an event type by slug\n *\n * @param slug - EventType slug to search for\n * @returns EventType instance or null if not found\n */\n async getBySlug(slug: string): Promise<EventType | null> {\n return await this.get({ slug });\n }\n\n /**\n * Initialize default event types\n *\n * Creates common event types if they don't exist:\n * - Sports: game, period, goal, assist, penalty\n * - Entertainment: concert, performance, song\n * - Professional: conference, session, presentation, workshop\n * - Community: meeting, agenda-item, motion, vote\n *\n * @returns Array of created/existing event types\n */\n async initializeDefaults(): Promise<EventType[]> {\n const defaults = [\n // Sports\n { slug: 'game', name: 'Game' },\n { slug: 'match', name: 'Match' },\n { slug: 'period', name: 'Period' },\n { slug: 'quarter', name: 'Quarter' },\n { slug: 'inning', name: 'Inning' },\n { slug: 'goal', name: 'Goal' },\n { slug: 'assist', name: 'Assist' },\n { slug: 'penalty', name: 'Penalty' },\n { slug: 'substitution', name: 'Substitution' },\n\n // Entertainment\n { slug: 'concert', name: 'Concert' },\n { slug: 'performance', name: 'Performance' },\n { slug: 'set', name: 'Set' },\n { slug: 'song', name: 'Song' },\n { slug: 'theater', name: 'Theater' },\n { slug: 'show', name: 'Show' },\n\n // Professional\n { slug: 'conference', name: 'Conference' },\n { slug: 'session', name: 'Session' },\n { slug: 'presentation', name: 'Presentation' },\n { slug: 'workshop', name: 'Workshop' },\n { slug: 'seminar', name: 'Seminar' },\n { slug: 'keynote', name: 'Keynote' },\n { slug: 'panel', name: 'Panel' },\n\n // Community\n { slug: 'meeting', name: 'Meeting' },\n { slug: 'town-hall', name: 'Town Hall' },\n { slug: 'agenda-item', name: 'Agenda Item' },\n { slug: 'motion', name: 'Motion' },\n { slug: 'amendment', name: 'Amendment' },\n { slug: 'vote', name: 'Vote' },\n { slug: 'discussion', name: 'Discussion' },\n\n // General\n { slug: 'event', name: 'Event' },\n { slug: 'activity', name: 'Activity' },\n { slug: 'action', name: 'Action' },\n ];\n\n const types: EventType[] = [];\n for (const def of defaults) {\n const type = await this.getOrCreate(def.slug, def.name);\n types.push(type);\n }\n\n return types;\n }\n\n // ============================================\n // Tenant Helper Methods\n // ============================================\n\n /**\n * Find all event types for a specific tenant\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of EventType instances for the tenant\n */\n async findByTenant(tenantId: string): Promise<EventType[]> {\n return this.list({ where: { tenantId } });\n }\n\n /**\n * Find all global event types (no tenant association).\n *\n * Routes through the shared tenant-global helper so it does not throw under\n * an active tenant context (an explicit `tenant_id IS NULL` filter would be\n * flagged as an isolation violation). (#1600)\n *\n * @returns Array of EventType instances with no tenant\n */\n async findGlobal(): Promise<EventType[]> {\n return queryGlobal<EventType>(this);\n }\n\n /**\n * Find event types for a tenant including global types.\n *\n * Fails closed if an active tenant context requests a different tenant's\n * rows; the admin/system path keeps the cross-tenant capability. (#1600)\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of EventType instances for the tenant and global types\n */\n async findWithGlobals(tenantId: string): Promise<EventType[]> {\n return queryWithGlobals<EventType>(\n this,\n tenantId,\n 'EventType.findWithGlobals',\n );\n }\n}\n","/**\n * Declared recipes for smrt-events (#3590, #3604): user-facing units of\n * functionality an app or agent can pick instead of the whole package.\n * The scanner reads these statics into the `recipes` array of `manifest.json`\n * and `smrt-knowledge.json`; nothing here runs at that point.\n *\n * @packageDocumentation\n */\n\nimport { SmrtRecipe } from '@happyvertical/smrt-core';\nimport { Event } from './models/Event.js';\nimport { EventParticipant } from './models/EventParticipant.js';\nimport { EventSeries } from './models/EventSeries.js';\nimport { EventType } from './models/EventType.js';\n\n/** Events: Schedule events, group them in series and track who takes part. */\nexport class CalendarRecipe extends SmrtRecipe {\n static id = 'events.calendar';\n static help = './calendar.recipe.md';\n static label = 'Events';\n static summary =\n 'Schedule events, group them in series and track who takes part.';\n static synonyms = [\n 'calendar',\n 'schedule',\n 'meetings',\n 'bookings',\n 'attendees',\n ];\n static section = {\n id: 'calendar',\n label: 'Calendar',\n icon: 'calendar',\n description: 'Events and what is scheduled when.',\n };\n static models = [Event, EventType, EventSeries, EventParticipant];\n static runtime = 'both' as const;\n static surfaces = [\n {\n kind: 'route',\n path: '/events/meeting',\n export: '@happyvertical/smrt-events/svelte#MeetingView',\n label: 'Meeting view',\n },\n ] as const;\n static nav = [\n {\n label: 'Events',\n model: Event,\n icon: 'calendar',\n description: 'Everything on your calendar, with who and when.',\n },\n {\n label: 'Event types',\n model: EventType,\n icon: 'tag',\n description: 'The kinds of events you run, such as workshops or classes.',\n },\n {\n label: 'Event series',\n model: EventSeries,\n icon: 'repeat',\n description: 'Repeating schedules, like a class every Tuesday evening.',\n },\n ];\n static options = {\n Event: {\n fields: {\n parentId: { visibility: 'hidden' },\n round: { visibility: 'hidden' },\n metadata: { visibility: 'hidden' },\n externalId: { visibility: 'hidden' },\n source: { visibility: 'hidden' },\n timeZone: { visibility: 'hidden' },\n },\n },\n EventType: {\n fields: {\n schema: { visibility: 'hidden' },\n participantSchema: { visibility: 'hidden' },\n },\n },\n EventSeries: {\n fields: {\n metadata: { visibility: 'hidden' },\n externalId: { visibility: 'hidden' },\n source: { visibility: 'hidden' },\n },\n },\n EventParticipant: {\n fields: {\n groupId: { visibility: 'hidden' },\n placement: { visibility: 'hidden' },\n metadata: { visibility: 'hidden' },\n externalId: { visibility: 'hidden' },\n source: { visibility: 'hidden' },\n },\n },\n } as const;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAOA,eAAe,wBAAwB,KAAK,MAAM,+2vDAAmj/D,CAAC;;;ACqC/l/D,IAAM,+BAAN,cAA2C,MAAM;CACtD,YAAY,SAAiB;EAC3B,MAAM,OAAO;EACb,KAAK,OAAO;CACd;AACF;AAIA,SAAS,SAAS,WAA+B,MAAsB;CACrE,MAAM,QAAQ,UAAU,sBAAsB,IAAI;CAClD,IAAI,OAAO,UAAU,UAAU,OAAO;CACtC,OAAO,SAAS,OAAO,MAAM,aAAa,aAAa,MAAM,SAAS,IAAI;AAC5E;AAEA,SAAS,WACP,WACA,MACe;CACf,MAAM,QAAQ,UAAU,sBAAsB,IAAI;CAClD,OAAO,OAAO,UAAU,YAAY,OAAO,cAAc,KAAK,IAC1D,QACA;AACN;AAEA,SAAS,SACP,WACA,MAC2B;CAC3B,MAAM,QAAQ,UAAU,sBAAsB,IAAI;CAClD,OAAO,iBAAiB,KAAK,OAAO,QAAQ;AAC9C;AAEA,SAAS,SAAS,WAA+B,MAAsB;CACrE,MAAM,YAAY,UAAU,iBAAiB,IAAI,CAAA,EAAG,kBAAkB,MAAM;CAC5E,IAAI,OAAO,cAAc,UAAU,OAAO;CAE1C,MAAM,OADQ,SAAS,WAAW,IACrB,CAAA,EAAO,MAAM;CAC1B,OAAO,OAAO,SAAS,YAAY,SAAS,OAAO,SAAS,aACxD,OACA;AACN;AAEA,SAAS,aACP,OACA,MACoB;CACpB,OAAO,QACH,MAAM,SACJ,MAAM,SAAS,IACf,QAAQ,OAAO,IAAI,CAAA,CAAE,YAAY,IACnC,KAAA;AACN;AAEA,SAAS,gBACP,WACA,cACA,MACU;CACV,OAAO,UAAU,iBAAiB,YAAY,CAAA,CAAE,SAAS,aAAa;EAEpE,OADe,SAAS,UACjB,CAAA,CACJ,QAC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