@happyvertical/smrt-events 0.55.3 → 0.55.5
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/calendar/sync.d.ts +2 -3
- package/dist/calendar/sync.d.ts.map +1 -1
- package/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +1 -1
- package/dist/smrt-knowledge.json +3 -3
- package/package.json +14 -14
package/dist/calendar/sync.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { getDatabase } from '@happyvertical/sql';
|
|
1
|
+
import { type DatabaseConfig, type SmrtClassOptions } from '@happyvertical/smrt-core';
|
|
3
2
|
import { type CalendarExpansionOptions, type CalendarParseOptions } from "./icalendar.js";
|
|
4
3
|
export interface CalendarSourceSyncOptions extends Omit<SmrtClassOptions, 'db'> {
|
|
5
|
-
db:
|
|
4
|
+
db: DatabaseConfig;
|
|
6
5
|
source: string;
|
|
7
6
|
ics: string;
|
|
8
7
|
tenantId?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/calendar/sync.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"sync.d.ts","sourceRoot":"","sources":["../../src/calendar/sync.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,gBAAgB,EACtB,MAAM,0BAA0B,CAAC;AAMlC,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EAG1B,MAAM,gBAAa,CAAC;AAErB,MAAM,WAAW,yBACf,SAAQ,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC;IACpC,EAAE,EAAE,cAAc,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,EAAE,oBAAoB,CAAC;IAC7B,SAAS,CAAC,EAAE,IAAI,CAAC,wBAAwB,EAAE,MAAM,oBAAoB,CAAC,CAAC;CACxE;AAED,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,sFAAsF;IACtF,kBAAkB,EAAE,IAAI,CAAC;CAC1B;AAsTD;;;GAGG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,yBAAyB,GACjC,OAAO,CAAC,wBAAwB,CAAC,CA4BnC"}
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { a as formatEventDateRange, c as isEventNow, d as validateEventStatus, f as expandRecurrence, h as toZonedWallTime, i as formatDuration, l as parseRecurrencePattern, m as isValidTimeZone, n as calculateNextOccurrence, o as generateEventSlug, p as fromZonedWallTime, r as checkSchedulingConflict, s as getEventStatusFromDates, t as calculateDuration, u as sortEventsByDate } from "./chunks/utils-DV00CoDY.js";
|
|
2
2
|
import { EVENTS_MODULE_META, EVENTS_UI_SLOTS } from "./ui.js";
|
|
3
|
-
import { ObjectRegistry, SmrtCollection, SmrtHierarchical, SmrtJunction, SmrtObject, crossPackageRef, field, foreignKey, smrt } from "@happyvertical/smrt-core";
|
|
3
|
+
import { ObjectRegistry, SmrtCollection, SmrtHierarchical, SmrtJunction, SmrtObject, crossPackageRef, field, foreignKey, resolveDatabase, smrt } from "@happyvertical/smrt-core";
|
|
4
4
|
import { ICAL, parseICalendar } from "@happyvertical/icalendar";
|
|
5
5
|
import { createHash } from "node:crypto";
|
|
6
6
|
import { TenantScoped, getTenantId, queryGlobal, queryWithGlobals, tenantId } from "@happyvertical/smrt-tenancy";
|
|
7
|
-
import { getDatabase } from "@happyvertical/sql";
|
|
8
7
|
import { addOwnedAssetFromCollection, assertValidOwnedAssetRelationship, assertValidOwnedAssetSortOrder, getOwnedAssetsFromCollection, removeOwnedAssetFromCollection, resolveOwnedAssetsById } from "@happyvertical/smrt-assets";
|
|
9
8
|
//#region \0rolldown/runtime.js
|
|
10
9
|
var __defProp$7 = Object.defineProperty;
|
|
@@ -19,7 +18,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
19
18
|
};
|
|
20
19
|
//#endregion
|
|
21
20
|
//#region src/__smrt-register__.ts
|
|
22
|
-
ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-events","packageVersion":"0.55.3","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":{},"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":{},"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":{},"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":{},"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":""},"seriesId":{"type":"foreignKey","required":false,"related":"EventSeries","_meta":{"constraint":{"engines":["postgres","sqlite"]}}},"typeId":{"type":"foreignKey","required":false,"related":"EventType","_meta":{"constraint":{"engines":["postgres","sqlite"]}}},"placeId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-places:Place"},"description":{"type":"text","required":false},"startDate":{"type":"datetime","required":false},"endDate":{"type":"datetime","required":false},"allDay":{"type":"boolean","required":false,"default":false},"timeZone":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"scheduled","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"},"profileId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile"},"role":{"type":"text","required":false,"default":""},"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":""},"typeId":{"type":"foreignKey","required":false,"related":"EventType"},"organizerId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile"},"description":{"type":"text","required":false},"startDate":{"type":"datetime","required":false},"endDate":{"type":"datetime","required":false},"recurrence":{"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":{"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":"","_meta":{"required":true}},"description":{"type":"text","required":false,"default":""},"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","smrtDependencies":["@happyvertical/smrt-assets","@happyvertical/smrt-core","@happyvertical/smrt-places","@happyvertical/smrt-profiles","@happyvertical/smrt-tenancy"],"stampsConstructors":true}`));
|
|
21
|
+
ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-events","packageVersion":"0.55.5","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":{},"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":{},"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":{},"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":{},"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":""},"seriesId":{"type":"foreignKey","required":false,"related":"EventSeries","_meta":{"constraint":{"engines":["postgres","sqlite"]}}},"typeId":{"type":"foreignKey","required":false,"related":"EventType","_meta":{"constraint":{"engines":["postgres","sqlite"]}}},"placeId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-places:Place"},"description":{"type":"text","required":false},"startDate":{"type":"datetime","required":false},"endDate":{"type":"datetime","required":false},"allDay":{"type":"boolean","required":false,"default":false},"timeZone":{"type":"text","required":false},"status":{"type":"text","required":false,"default":"scheduled","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"},"profileId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile"},"role":{"type":"text","required":false,"default":""},"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":""},"typeId":{"type":"foreignKey","required":false,"related":"EventType"},"organizerId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile"},"description":{"type":"text","required":false},"startDate":{"type":"datetime","required":false},"endDate":{"type":"datetime","required":false},"recurrence":{"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":{"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":"","_meta":{"required":true}},"description":{"type":"text","required":false,"default":""},"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","smrtDependencies":["@happyvertical/smrt-assets","@happyvertical/smrt-core","@happyvertical/smrt-places","@happyvertical/smrt-profiles","@happyvertical/smrt-tenancy"],"stampsConstructors":true}`));
|
|
23
22
|
//#endregion
|
|
24
23
|
//#region src/calendar/icalendar.ts
|
|
25
24
|
var CalendarEventValidationError = class extends Error {
|
|
@@ -1190,7 +1189,7 @@ async function syncICalendarSource(options) {
|
|
|
1190
1189
|
if (activeTenant && activeTenant !== tenantId) throw new Error("Calendar tenant isolation violation");
|
|
1191
1190
|
const entries = parseICalendarEvents(options.source, options.ics, options.parse);
|
|
1192
1191
|
if (!options.expansion && entries.some((e) => e.recurrence || e.additionalRecurrenceIds.length)) throw new Error("Recurring calendar sync requires bounded expansion");
|
|
1193
|
-
const db = await
|
|
1192
|
+
const db = await resolveDatabase(options.db);
|
|
1194
1193
|
if (db.requiresSchemaCheck) throw new Error("Calendar sync requires migrated SQLite/PostgreSQL schemas");
|
|
1195
1194
|
if (!db.transaction) throw new Error("Calendar source sync requires transaction()");
|
|
1196
1195
|
return db.transaction((transaction) => syncParsed(transaction, {
|