@happyvertical/smrt-places 0.42.7 → 0.43.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/manifest.json +62 -6
- package/dist/smrt-knowledge.json +25 -5
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { addOwnedAssetFromCollection, assertValidOwnedAssetRelationship, assertV
|
|
|
5
5
|
import { TenantScoped, queryGlobal, queryWithGlobals, tenantId } from "@happyvertical/smrt-tenancy";
|
|
6
6
|
import { getGeoAdapter } from "@happyvertical/geo";
|
|
7
7
|
//#region src/__smrt-register__.ts
|
|
8
|
-
ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-places\",\"packageVersion\":\"0.42.7\",\"objects\":{\"@happyvertical/smrt-places:PlaceAssetCollection\":{\"name\":\"placeassetcollection\",\"className\":\"PlaceAssetCollection\",\"qualifiedName\":\"@happyvertical/smrt-places:PlaceAssetCollection\",\"collection\":\"placeassets\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/places/src/collections/PlaceAssetCollection.ts\",\"packageName\":\"@happyvertical/smrt-places\",\"fields\":{},\"methods\":{\"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},\"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},\"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\":\"placeId\",\"type\":\"string\",\"optional\":false},{\"name\":\"relationship\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<Asset[]>\",\"isStatic\":false,\"isPublic\":true},\"addAsset\":{\"name\":\"addAsset\",\"async\":true,\"parameters\":[{\"name\":\"placeId\",\"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\":\"placeId\",\"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\":\"place_assets\"},\"extends\":\"SmrtJunction\",\"extendsTypeArg\":\"PlaceAsset\",\"exportName\":\"PlaceAssetCollection\",\"collectionExportName\":\"PlaceAssetCollectionCollection\",\"schema\":{\"tableName\":\"place_assets\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"place_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);\",\"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\"}},\"indexes\":[{\"name\":\"place_assets_slug_context_idx\",\"columns\":[\"slug\",\"context\"],\"unique\":true},{\"name\":\"place_assets_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"ceff1c5e\"}},\"@happyvertical/smrt-places:PlaceCollection\":{\"name\":\"placecollection\",\"className\":\"PlaceCollection\",\"qualifiedName\":\"@happyvertical/smrt-places:PlaceCollection\",\"collection\":\"places\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/places/src/collections/PlaceCollection.ts\",\"packageName\":\"@happyvertical/smrt-places\",\"fields\":{},\"methods\":{\"lookupOrCreate\":{\"name\":\"lookupOrCreate\",\"async\":true,\"parameters\":[{\"name\":\"query\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"LookupOrCreateOptions\",\"optional\":true}],\"returnType\":\"Promise<Place | null>\",\"isStatic\":false,\"isPublic\":true},\"discoverNearby\":{\"name\":\"discoverNearby\",\"async\":true,\"parameters\":[{\"name\":\"latitude\",\"type\":\"number\",\"optional\":false},{\"name\":\"longitude\",\"type\":\"number\",\"optional\":false},{\"name\":\"radiusMeters\",\"type\":\"number\",\"optional\":false},{\"name\":\"options\",\"type\":\"DiscoverNearbyOptions\",\"optional\":true}],\"returnType\":\"Promise<Place[]>\",\"isStatic\":false,\"isPublic\":true},\"resolveTrackPlaces\":{\"name\":\"resolveTrackPlaces\",\"async\":true,\"parameters\":[{\"name\":\"points\",\"type\":\"ReadonlyArray<TrackPoint>\",\"optional\":false},{\"name\":\"options\",\"type\":\"ResolveTrackPlacesOptions\",\"optional\":true}],\"returnType\":\"Promise<TrackPlacesResult>\",\"isStatic\":false,\"isPublic\":true},\"getChildren\":{\"name\":\"getChildren\",\"async\":true,\"parameters\":[{\"name\":\"parentId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Place[]>\",\"isStatic\":false,\"isPublic\":true},\"getRootPlaces\":{\"name\":\"getRootPlaces\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Place[]>\",\"isStatic\":false,\"isPublic\":true},\"getByType\":{\"name\":\"getByType\",\"async\":true,\"parameters\":[{\"name\":\"typeSlug\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Place[]>\",\"isStatic\":false,\"isPublic\":true},\"getHierarchy\":{\"name\":\"getHierarchy\",\"async\":true,\"parameters\":[{\"name\":\"placeId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getAssets\":{\"name\":\"getAssets\",\"async\":true,\"parameters\":[{\"name\":\"placeId\",\"type\":\"string\",\"optional\":false},{\"name\":\"relationship\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<Asset[]>\",\"isStatic\":false,\"isPublic\":true},\"addAsset\":{\"name\":\"addAsset\",\"async\":true,\"parameters\":[{\"name\":\"placeId\",\"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\":\"placeId\",\"type\":\"string\",\"optional\":false},{\"name\":\"assetId\",\"type\":\"string\",\"optional\":false},{\"name\":\"relationship\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"searchByProximity\":{\"name\":\"searchByProximity\",\"async\":true,\"parameters\":[{\"name\":\"latitude\",\"type\":\"number\",\"optional\":false},{\"name\":\"longitude\",\"type\":\"number\",\"optional\":false},{\"name\":\"radiusKm\",\"type\":\"number\",\"optional\":true}],\"returnType\":\"Promise<Place[]>\",\"isStatic\":false,\"isPublic\":true},\"findByTenant\":{\"name\":\"findByTenant\",\"async\":true,\"parameters\":[{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Place[]>\",\"isStatic\":false,\"isPublic\":true},\"findGlobal\":{\"name\":\"findGlobal\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Place[]>\",\"isStatic\":false,\"isPublic\":true},\"findWithGlobals\":{\"name\":\"findWithGlobals\",\"async\":true,\"parameters\":[{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Place[]>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"Place\",\"exportName\":\"PlaceCollection\",\"collectionExportName\":\"PlaceCollectionCollection\",\"schema\":{\"tableName\":\"place_collections\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"place_collections\\\" (\\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);\",\"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\"}},\"indexes\":[{\"name\":\"place_collections_slug_context_idx\",\"columns\":[\"slug\",\"context\"],\"unique\":true},{\"name\":\"place_collections_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"d0da2f8d\"}},\"@happyvertical/smrt-places:PlaceTypeCollection\":{\"name\":\"placetypecollection\",\"className\":\"PlaceTypeCollection\",\"qualifiedName\":\"@happyvertical/smrt-places:PlaceTypeCollection\",\"collection\":\"placetypes\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/places/src/collections/PlaceTypeCollection.ts\",\"packageName\":\"@happyvertical/smrt-places\",\"fields\":{},\"methods\":{\"getOrCreate\":{\"name\":\"getOrCreate\",\"async\":true,\"parameters\":[{\"name\":\"slug\",\"type\":\"string\",\"optional\":false},{\"name\":\"name\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<PlaceType>\",\"isStatic\":false,\"isPublic\":true},\"getBySlug\":{\"name\":\"getBySlug\",\"async\":true,\"parameters\":[{\"name\":\"slug\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<PlaceType | null>\",\"isStatic\":false,\"isPublic\":true},\"initializeDefaults\":{\"name\":\"initializeDefaults\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<PlaceType[]>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"PlaceType\",\"exportName\":\"PlaceTypeCollection\",\"collectionExportName\":\"PlaceTypeCollectionCollection\",\"schema\":{\"tableName\":\"place_type_collections\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"place_type_collections\\\" (\\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);\",\"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\"}},\"indexes\":[{\"name\":\"place_type_collections_slug_context_idx\",\"columns\":[\"slug\",\"context\"],\"unique\":true},{\"name\":\"place_type_collections_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"b6691888\"}},\"@happyvertical/smrt-places:Place\":{\"name\":\"place\",\"className\":\"Place\",\"qualifiedName\":\"@happyvertical/smrt-places:Place\",\"collection\":\"places\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/places/src/models/Place.ts\",\"packageName\":\"@happyvertical/smrt-places\",\"fields\":{\"created_at\":{\"type\":\"datetime\",\"required\":false},\"updated_at\":{\"type\":\"datetime\",\"required\":false},\"parentId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"Place\",\"_meta\":{\"nullable\":true}},\"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}}},\"typeId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"PlaceType\"},\"name\":{\"type\":\"text\",\"required\":false},\"description\":{\"type\":\"text\",\"required\":false},\"latitude\":{\"type\":\"decimal\",\"required\":false,\"_meta\":{}},\"longitude\":{\"type\":\"decimal\",\"required\":false,\"_meta\":{}},\"streetNumber\":{\"type\":\"text\",\"required\":false},\"streetName\":{\"type\":\"text\",\"required\":false},\"city\":{\"type\":\"text\",\"required\":false},\"region\":{\"type\":\"text\",\"required\":false},\"country\":{\"type\":\"text\",\"required\":false},\"postalCode\":{\"type\":\"text\",\"required\":false},\"countryCode\":{\"type\":\"text\",\"required\":false},\"timezone\":{\"type\":\"text\",\"required\":false},\"externalId\":{\"type\":\"text\",\"required\":false},\"source\":{\"type\":\"text\",\"required\":false},\"metadata\":{\"type\":\"text\",\"required\":false},\"createdAt\":{\"type\":\"text\",\"required\":false},\"updatedAt\":{\"type\":\"text\",\"required\":false}},\"methods\":{\"getAiUsageSnapshot\":{\"name\":\"getAiUsageSnapshot\",\"async\":false,\"parameters\":[],\"returnType\":\"AiUsageSnapshot | undefined\",\"isStatic\":false,\"isPublic\":true},\"resetAiUsage\":{\"name\":\"resetAiUsage\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"listAiUsage\":{\"name\":\"listAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageListOptions\",\"optional\":true}],\"returnType\":\"Promise<SmrtAiUsageRecord[]>\",\"isStatic\":false,\"isPublic\":true},\"summarizeAiUsage\":{\"name\":\"summarizeAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageSummaryOptions\",\"optional\":true}],\"returnType\":\"Promise<Record<string, AiUsageStats>>\",\"isStatic\":false,\"isPublic\":true},\"destroy\":{\"name\":\"destroy\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"markAsPersisted\":{\"name\":\"markAsPersisted\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"requireInsertOnSave\":{\"name\":\"requireInsertOnSave\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"initialize\":{\"name\":\"initialize\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"loadDataFromDb\":{\"name\":\"loadDataFromDb\",\"async\":true,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string>\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getFields\":{\"name\":\"getFields\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"toJSON\":{\"name\":\"toJSON\",\"async\":false,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"toPlainObject\":{\"name\":\"toPlainObject\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"toPublicJSON\":{\"name\":\"toPublicJSON\",\"async\":false,\"parameters\":[{\"name\":\"options\",\"type\":\"PublicJsonOptions\",\"optional\":true}],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"getId\":{\"name\":\"getId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSlug\":{\"name\":\"getSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSavedId\":{\"name\":\"getSavedId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"isSaved\":{\"name\":\"isSaved\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"classifyConstraintError\":{\"name\":\"classifyConstraintError\",\"async\":false,\"parameters\":[{\"name\":\"message\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"'unique' | 'not_null' | null\",\"isStatic\":true,\"isPublic\":true},\"loadFromId\":{\"name\":\"loadFromId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"loadFromSlug\":{\"name\":\"loadFromSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"is\":{\"name\":\"is\",\"async\":true,\"parameters\":[{\"name\":\"criteria\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"do\":{\"name\":\"do\",\"async\":true,\"parameters\":[{\"name\":\"instructions\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"describe\":{\"name\":\"describe\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"isRelatedLoaded\":{\"name\":\"isRelatedLoaded\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"_setLoadedRelationship\":{\"name\":\"_setLoadedRelationship\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"value\",\"type\":\"any\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"loadRelated\":{\"name\":\"loadRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"loadRelatedMany\":{\"name\":\"loadRelatedMany\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any[]>\",\"isStatic\":false,\"isPublic\":true},\"getRelated\":{\"name\":\"getRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"getAvailableTools\":{\"name\":\"getAvailableTools\",\"async\":false,\"parameters\":[],\"returnType\":\"AITool[]\",\"isStatic\":false,\"isPublic\":true},\"executeToolCall\":{\"name\":\"executeToolCall\",\"async\":true,\"parameters\":[{\"name\":\"toolCall\",\"type\":\"ToolCall\",\"optional\":false}],\"returnType\":\"Promise<ToolCallResult>\",\"isStatic\":false,\"isPublic\":true},\"remember\":{\"name\":\"remember\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"recall\":{\"name\":\"recall\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"recallAll\":{\"name\":\"recallAll\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"Promise<Map<string>>\",\"isStatic\":false,\"isPublic\":true},\"forget\":{\"name\":\"forget\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"forgetScope\":{\"name\":\"forgetScope\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true},\"generateEmbeddings\":{\"name\":\"generateEmbeddings\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"GenerateEmbeddingsOptions\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getEmbedding\":{\"name\":\"getEmbedding\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"model\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<number[] | null>\",\"isStatic\":false,\"isPublic\":true},\"hasStaleEmbeddings\":{\"name\":\"hasStaleEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true},\"clearEmbeddings\":{\"name\":\"clearEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getParent\":{\"name\":\"getParent\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<null>\",\"isStatic\":false,\"isPublic\":true},\"getChildren\":{\"name\":\"getChildren\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"getAncestors\":{\"name\":\"getAncestors\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"getDescendants\":{\"name\":\"getDescendants\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"getHierarchy\":{\"name\":\"getHierarchy\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<HierarchyView>\",\"isStatic\":false,\"isPublic\":true},\"moveTo\":{\"name\":\"moveTo\",\"async\":true,\"parameters\":[{\"name\":\"newParent\",\"type\":\"string | null\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getGeoData\":{\"name\":\"getGeoData\",\"async\":false,\"parameters\":[],\"returnType\":\"GeoData\",\"isStatic\":false,\"isPublic\":true},\"hasCoordinates\":{\"name\":\"hasCoordinates\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"getMetadata\":{\"name\":\"getMetadata\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"setMetadata\":{\"name\":\"setMetadata\",\"async\":false,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"updateMetadata\":{\"name\":\"updateMetadata\",\"async\":false,\"parameters\":[{\"name\":\"updates\",\"type\":\"Record<string>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getType\":{\"name\":\"getType\",\"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}},\"decoratorConfig\":{\"tableStrategy\":\"sti\",\"api\":{\"include\":[\"list\",\"get\",\"create\",\"update\",\"delete\"]},\"mcp\":{\"include\":[\"list\",\"get\",\"create\",\"update\"]},\"cli\":true,\"tenantScoped\":{\"mode\":\"optional\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\",\"_meta_type\"]},\"extends\":\"SmrtHierarchical\",\"exportName\":\"Place\",\"collectionExportName\":\"PlaceCollection\",\"schema\":{\"tableName\":\"places\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"places\\\" (\\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 \\\"type_id\\\" UUID,\\n \\\"name\\\" TEXT,\\n \\\"description\\\" TEXT,\\n \\\"latitude\\\" REAL,\\n \\\"longitude\\\" REAL,\\n \\\"street_number\\\" TEXT,\\n \\\"street_name\\\" TEXT,\\n \\\"city\\\" TEXT,\\n \\\"region\\\" TEXT,\\n \\\"country\\\" TEXT,\\n \\\"postal_code\\\" TEXT,\\n \\\"country_code\\\" TEXT,\\n \\\"timezone\\\" TEXT,\\n \\\"external_id\\\" TEXT,\\n \\\"source\\\" TEXT,\\n \\\"metadata\\\" 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},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false},\"type_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false},\"name\":{\"type\":\"TEXT\",\"notNull\":false},\"description\":{\"type\":\"TEXT\",\"notNull\":false},\"latitude\":{\"type\":\"REAL\",\"notNull\":false},\"longitude\":{\"type\":\"REAL\",\"notNull\":false},\"street_number\":{\"type\":\"TEXT\",\"notNull\":false},\"street_name\":{\"type\":\"TEXT\",\"notNull\":false},\"city\":{\"type\":\"TEXT\",\"notNull\":false},\"region\":{\"type\":\"TEXT\",\"notNull\":false},\"country\":{\"type\":\"TEXT\",\"notNull\":false},\"postal_code\":{\"type\":\"TEXT\",\"notNull\":false},\"country_code\":{\"type\":\"TEXT\",\"notNull\":false},\"timezone\":{\"type\":\"TEXT\",\"notNull\":false},\"external_id\":{\"type\":\"TEXT\",\"notNull\":false},\"source\":{\"type\":\"TEXT\",\"notNull\":false},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false}},\"indexes\":[{\"name\":\"places_slug_context_meta_type_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\",\"_meta_type\"],\"unique\":true},{\"name\":\"places_meta_type_idx\",\"columns\":[\"_meta_type\"]},{\"name\":\"places_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"places_parent_id_idx\",\"columns\":[\"parent_id\"]},{\"name\":\"places_type_id_idx\",\"columns\":[\"type_id\"]}],\"version\":\"1fe43eb8\"}},\"@happyvertical/smrt-places:PlaceAsset\":{\"name\":\"placeasset\",\"className\":\"PlaceAsset\",\"qualifiedName\":\"@happyvertical/smrt-places:PlaceAsset\",\"collection\":\"placeassets\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/places/src/models/PlaceAsset.ts\",\"packageName\":\"@happyvertical/smrt-places\",\"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}}},\"placeId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"Place\",\"_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\":\"place_assets\",\"conflictColumns\":[\"place_id\",\"asset_id\",\"relationship\"],\"api\":false,\"mcp\":false,\"cli\":false,\"tenantScoped\":{\"mode\":\"optional\"}},\"extends\":\"SmrtObject\",\"exportName\":\"PlaceAsset\",\"collectionExportName\":\"PlaceAssetCollection\",\"validationRules\":[{\"field\":\"placeId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"},{\"field\":\"assetId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"relationship\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"sortOrder\",\"rule\":\"required\",\"fieldType\":\"integer\"}],\"schema\":{\"tableName\":\"place_assets\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"place_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 \\\"place_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},\"place_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false},\"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\":\"place_assets_place_id_asset_id_idx\",\"columns\":[\"place_id\",\"asset_id\",\"relationship\"],\"unique\":true},{\"name\":\"place_assets_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"place_assets_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"place_assets_asset_id_idx\",\"columns\":[\"asset_id\"]}],\"version\":\"34bbdfbb\"}},\"@happyvertical/smrt-places:PlaceType\":{\"name\":\"placetype\",\"className\":\"PlaceType\",\"qualifiedName\":\"@happyvertical/smrt-places:PlaceType\",\"collection\":\"placetypes\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/places/src/models/PlaceType.ts\",\"packageName\":\"@happyvertical/smrt-places\",\"fields\":{\"created_at\":{\"type\":\"datetime\",\"required\":false},\"updated_at\":{\"type\":\"datetime\",\"required\":false},\"name\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"description\":{\"type\":\"text\",\"required\":false},\"createdAt\":{\"type\":\"text\",\"required\":false},\"updatedAt\":{\"type\":\"text\",\"required\":false}},\"methods\":{\"getAiUsageSnapshot\":{\"name\":\"getAiUsageSnapshot\",\"async\":false,\"parameters\":[],\"returnType\":\"AiUsageSnapshot | undefined\",\"isStatic\":false,\"isPublic\":true},\"resetAiUsage\":{\"name\":\"resetAiUsage\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"listAiUsage\":{\"name\":\"listAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageListOptions\",\"optional\":true}],\"returnType\":\"Promise<SmrtAiUsageRecord[]>\",\"isStatic\":false,\"isPublic\":true},\"summarizeAiUsage\":{\"name\":\"summarizeAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageSummaryOptions\",\"optional\":true}],\"returnType\":\"Promise<Record<string, AiUsageStats>>\",\"isStatic\":false,\"isPublic\":true},\"destroy\":{\"name\":\"destroy\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"markAsPersisted\":{\"name\":\"markAsPersisted\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"requireInsertOnSave\":{\"name\":\"requireInsertOnSave\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"initialize\":{\"name\":\"initialize\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"loadDataFromDb\":{\"name\":\"loadDataFromDb\",\"async\":true,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string>\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getFields\":{\"name\":\"getFields\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"toJSON\":{\"name\":\"toJSON\",\"async\":false,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"toPlainObject\":{\"name\":\"toPlainObject\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"toPublicJSON\":{\"name\":\"toPublicJSON\",\"async\":false,\"parameters\":[{\"name\":\"options\",\"type\":\"PublicJsonOptions\",\"optional\":true}],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"getId\":{\"name\":\"getId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSlug\":{\"name\":\"getSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSavedId\":{\"name\":\"getSavedId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"isSaved\":{\"name\":\"isSaved\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"classifyConstraintError\":{\"name\":\"classifyConstraintError\",\"async\":false,\"parameters\":[{\"name\":\"message\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"'unique' | 'not_null' | null\",\"isStatic\":true,\"isPublic\":true},\"loadFromId\":{\"name\":\"loadFromId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"loadFromSlug\":{\"name\":\"loadFromSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"is\":{\"name\":\"is\",\"async\":true,\"parameters\":[{\"name\":\"criteria\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"do\":{\"name\":\"do\",\"async\":true,\"parameters\":[{\"name\":\"instructions\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"describe\":{\"name\":\"describe\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"isRelatedLoaded\":{\"name\":\"isRelatedLoaded\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"_setLoadedRelationship\":{\"name\":\"_setLoadedRelationship\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"value\",\"type\":\"any\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"loadRelated\":{\"name\":\"loadRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"loadRelatedMany\":{\"name\":\"loadRelatedMany\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any[]>\",\"isStatic\":false,\"isPublic\":true},\"getRelated\":{\"name\":\"getRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"getAvailableTools\":{\"name\":\"getAvailableTools\",\"async\":false,\"parameters\":[],\"returnType\":\"AITool[]\",\"isStatic\":false,\"isPublic\":true},\"executeToolCall\":{\"name\":\"executeToolCall\",\"async\":true,\"parameters\":[{\"name\":\"toolCall\",\"type\":\"ToolCall\",\"optional\":false}],\"returnType\":\"Promise<ToolCallResult>\",\"isStatic\":false,\"isPublic\":true},\"remember\":{\"name\":\"remember\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"recall\":{\"name\":\"recall\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"recallAll\":{\"name\":\"recallAll\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"Promise<Map<string>>\",\"isStatic\":false,\"isPublic\":true},\"forget\":{\"name\":\"forget\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"forgetScope\":{\"name\":\"forgetScope\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true},\"generateEmbeddings\":{\"name\":\"generateEmbeddings\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"GenerateEmbeddingsOptions\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getEmbedding\":{\"name\":\"getEmbedding\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"model\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<number[] | null>\",\"isStatic\":false,\"isPublic\":true},\"hasStaleEmbeddings\":{\"name\":\"hasStaleEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true},\"clearEmbeddings\":{\"name\":\"clearEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getBySlug\":{\"name\":\"getBySlug\",\"async\":true,\"parameters\":[{\"name\":\"_slug\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<PlaceType | null>\",\"isStatic\":true,\"isPublic\":true}},\"decoratorConfig\":{\"tableStrategy\":\"sti\",\"api\":{\"include\":[\"list\",\"get\",\"create\",\"update\",\"delete\"]},\"mcp\":{\"include\":[\"list\",\"get\",\"create\"]},\"cli\":true},\"extends\":\"SmrtObject\",\"exportName\":\"PlaceType\",\"collectionExportName\":\"PlaceTypeCollection\",\"validationRules\":[{\"field\":\"name\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"place_types\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"place_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 \\\"name\\\" TEXT DEFAULT '',\\n \\\"description\\\" 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\"},\"name\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"description\":{\"type\":\"TEXT\",\"notNull\":false}},\"indexes\":[{\"name\":\"place_types_slug_context_meta_type_idx\",\"columns\":[\"slug\",\"context\",\"_meta_type\"],\"unique\":true},{\"name\":\"place_types_meta_type_idx\",\"columns\":[\"_meta_type\"]},{\"name\":\"place_types_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"8c3bb691\"}}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-assets\",\"@happyvertical/smrt-core\",\"@happyvertical/smrt-tenancy\"]}"));
|
|
8
|
+
ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-places\",\"packageVersion\":\"0.43.1\",\"objects\":{\"@happyvertical/smrt-places:PlaceAssetCollection\":{\"name\":\"placeassetcollection\",\"className\":\"PlaceAssetCollection\",\"qualifiedName\":\"@happyvertical/smrt-places:PlaceAssetCollection\",\"collection\":\"placeassets\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/places/src/collections/PlaceAssetCollection.ts\",\"packageName\":\"@happyvertical/smrt-places\",\"fields\":{},\"methods\":{\"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},\"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},\"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\":\"placeId\",\"type\":\"string\",\"optional\":false},{\"name\":\"relationship\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<Asset[]>\",\"isStatic\":false,\"isPublic\":true},\"addAsset\":{\"name\":\"addAsset\",\"async\":true,\"parameters\":[{\"name\":\"placeId\",\"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\":\"placeId\",\"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\":\"place_assets\"},\"extends\":\"SmrtJunction\",\"extendsTypeArg\":\"PlaceAsset\",\"exportName\":\"PlaceAssetCollection\",\"collectionExportName\":\"PlaceAssetCollectionCollection\",\"schema\":{\"tableName\":\"place_assets\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"place_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);\",\"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\"}},\"indexes\":[{\"name\":\"place_assets_slug_context_idx\",\"columns\":[\"slug\",\"context\"],\"unique\":true},{\"name\":\"place_assets_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"ceff1c5e\"}},\"@happyvertical/smrt-places:PlaceCollection\":{\"name\":\"placecollection\",\"className\":\"PlaceCollection\",\"qualifiedName\":\"@happyvertical/smrt-places:PlaceCollection\",\"collection\":\"places\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/places/src/collections/PlaceCollection.ts\",\"packageName\":\"@happyvertical/smrt-places\",\"fields\":{},\"methods\":{\"lookupOrCreate\":{\"name\":\"lookupOrCreate\",\"async\":true,\"parameters\":[{\"name\":\"query\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"LookupOrCreateOptions\",\"optional\":true}],\"returnType\":\"Promise<Place | null>\",\"isStatic\":false,\"isPublic\":true},\"discoverNearby\":{\"name\":\"discoverNearby\",\"async\":true,\"parameters\":[{\"name\":\"latitude\",\"type\":\"number\",\"optional\":false},{\"name\":\"longitude\",\"type\":\"number\",\"optional\":false},{\"name\":\"radiusMeters\",\"type\":\"number\",\"optional\":false},{\"name\":\"options\",\"type\":\"DiscoverNearbyOptions\",\"optional\":true}],\"returnType\":\"Promise<Place[]>\",\"isStatic\":false,\"isPublic\":true},\"resolveTrackPlaces\":{\"name\":\"resolveTrackPlaces\",\"async\":true,\"parameters\":[{\"name\":\"points\",\"type\":\"ReadonlyArray<TrackPoint>\",\"optional\":false},{\"name\":\"options\",\"type\":\"ResolveTrackPlacesOptions\",\"optional\":true}],\"returnType\":\"Promise<TrackPlacesResult>\",\"isStatic\":false,\"isPublic\":true},\"getChildren\":{\"name\":\"getChildren\",\"async\":true,\"parameters\":[{\"name\":\"parentId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Place[]>\",\"isStatic\":false,\"isPublic\":true},\"getRootPlaces\":{\"name\":\"getRootPlaces\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Place[]>\",\"isStatic\":false,\"isPublic\":true},\"getByType\":{\"name\":\"getByType\",\"async\":true,\"parameters\":[{\"name\":\"typeSlug\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Place[]>\",\"isStatic\":false,\"isPublic\":true},\"getHierarchy\":{\"name\":\"getHierarchy\",\"async\":true,\"parameters\":[{\"name\":\"placeId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getAssets\":{\"name\":\"getAssets\",\"async\":true,\"parameters\":[{\"name\":\"placeId\",\"type\":\"string\",\"optional\":false},{\"name\":\"relationship\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<Asset[]>\",\"isStatic\":false,\"isPublic\":true},\"addAsset\":{\"name\":\"addAsset\",\"async\":true,\"parameters\":[{\"name\":\"placeId\",\"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\":\"placeId\",\"type\":\"string\",\"optional\":false},{\"name\":\"assetId\",\"type\":\"string\",\"optional\":false},{\"name\":\"relationship\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"searchByProximity\":{\"name\":\"searchByProximity\",\"async\":true,\"parameters\":[{\"name\":\"latitude\",\"type\":\"number\",\"optional\":false},{\"name\":\"longitude\",\"type\":\"number\",\"optional\":false},{\"name\":\"radiusKm\",\"type\":\"number\",\"optional\":true}],\"returnType\":\"Promise<Place[]>\",\"isStatic\":false,\"isPublic\":true},\"findByTenant\":{\"name\":\"findByTenant\",\"async\":true,\"parameters\":[{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Place[]>\",\"isStatic\":false,\"isPublic\":true},\"findGlobal\":{\"name\":\"findGlobal\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Place[]>\",\"isStatic\":false,\"isPublic\":true},\"findWithGlobals\":{\"name\":\"findWithGlobals\",\"async\":true,\"parameters\":[{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Place[]>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"Place\",\"exportName\":\"PlaceCollection\",\"collectionExportName\":\"PlaceCollectionCollection\",\"schema\":{\"tableName\":\"place_collections\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"place_collections\\\" (\\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);\",\"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\"}},\"indexes\":[{\"name\":\"place_collections_slug_context_idx\",\"columns\":[\"slug\",\"context\"],\"unique\":true},{\"name\":\"place_collections_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"d0da2f8d\"}},\"@happyvertical/smrt-places:PlaceTypeCollection\":{\"name\":\"placetypecollection\",\"className\":\"PlaceTypeCollection\",\"qualifiedName\":\"@happyvertical/smrt-places:PlaceTypeCollection\",\"collection\":\"placetypes\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/places/src/collections/PlaceTypeCollection.ts\",\"packageName\":\"@happyvertical/smrt-places\",\"fields\":{},\"methods\":{\"getOrCreate\":{\"name\":\"getOrCreate\",\"async\":true,\"parameters\":[{\"name\":\"slug\",\"type\":\"string\",\"optional\":false},{\"name\":\"name\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<PlaceType>\",\"isStatic\":false,\"isPublic\":true},\"getBySlug\":{\"name\":\"getBySlug\",\"async\":true,\"parameters\":[{\"name\":\"slug\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<PlaceType | null>\",\"isStatic\":false,\"isPublic\":true},\"initializeDefaults\":{\"name\":\"initializeDefaults\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<PlaceType[]>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"PlaceType\",\"exportName\":\"PlaceTypeCollection\",\"collectionExportName\":\"PlaceTypeCollectionCollection\",\"schema\":{\"tableName\":\"place_type_collections\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"place_type_collections\\\" (\\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);\",\"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\"}},\"indexes\":[{\"name\":\"place_type_collections_slug_context_idx\",\"columns\":[\"slug\",\"context\"],\"unique\":true},{\"name\":\"place_type_collections_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"b6691888\"}},\"@happyvertical/smrt-places:Place\":{\"name\":\"place\",\"className\":\"Place\",\"qualifiedName\":\"@happyvertical/smrt-places:Place\",\"collection\":\"places\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/places/src/models/Place.ts\",\"packageName\":\"@happyvertical/smrt-places\",\"fields\":{\"created_at\":{\"type\":\"datetime\",\"required\":false},\"updated_at\":{\"type\":\"datetime\",\"required\":false},\"parentId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"Place\",\"_meta\":{\"nullable\":true}},\"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}}},\"typeId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"PlaceType\"},\"name\":{\"type\":\"text\",\"required\":false},\"description\":{\"type\":\"text\",\"required\":false},\"latitude\":{\"type\":\"decimal\",\"required\":false,\"_meta\":{}},\"longitude\":{\"type\":\"decimal\",\"required\":false,\"_meta\":{}},\"streetNumber\":{\"type\":\"text\",\"required\":false},\"streetName\":{\"type\":\"text\",\"required\":false},\"city\":{\"type\":\"text\",\"required\":false},\"region\":{\"type\":\"text\",\"required\":false},\"country\":{\"type\":\"text\",\"required\":false},\"postalCode\":{\"type\":\"text\",\"required\":false},\"countryCode\":{\"type\":\"text\",\"required\":false},\"timezone\":{\"type\":\"text\",\"required\":false},\"externalId\":{\"type\":\"text\",\"required\":false},\"source\":{\"type\":\"text\",\"required\":false},\"metadata\":{\"type\":\"text\",\"required\":false},\"createdAt\":{\"type\":\"text\",\"required\":false},\"updatedAt\":{\"type\":\"text\",\"required\":false}},\"methods\":{\"withDatabase\":{\"name\":\"withDatabase\",\"async\":true,\"parameters\":[{\"name\":\"db\",\"type\":\"DatabaseInterface\",\"optional\":false},{\"name\":\"operation\",\"type\":\"Function\",\"optional\":false}],\"returnType\":\"Promise<T>\",\"isStatic\":false,\"isPublic\":true},\"getAiUsageSnapshot\":{\"name\":\"getAiUsageSnapshot\",\"async\":false,\"parameters\":[],\"returnType\":\"AiUsageSnapshot | undefined\",\"isStatic\":false,\"isPublic\":true},\"resetAiUsage\":{\"name\":\"resetAiUsage\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"listAiUsage\":{\"name\":\"listAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageListOptions\",\"optional\":true}],\"returnType\":\"Promise<SmrtAiUsageRecord[]>\",\"isStatic\":false,\"isPublic\":true},\"summarizeAiUsage\":{\"name\":\"summarizeAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageSummaryOptions\",\"optional\":true}],\"returnType\":\"Promise<Record<string, AiUsageStats>>\",\"isStatic\":false,\"isPublic\":true},\"destroy\":{\"name\":\"destroy\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"markAsPersisted\":{\"name\":\"markAsPersisted\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"requireInsertOnSave\":{\"name\":\"requireInsertOnSave\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"initialize\":{\"name\":\"initialize\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"loadDataFromDb\":{\"name\":\"loadDataFromDb\",\"async\":true,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string>\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getFields\":{\"name\":\"getFields\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"toJSON\":{\"name\":\"toJSON\",\"async\":false,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"toPlainObject\":{\"name\":\"toPlainObject\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"toPublicJSON\":{\"name\":\"toPublicJSON\",\"async\":false,\"parameters\":[{\"name\":\"options\",\"type\":\"PublicJsonOptions\",\"optional\":true}],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"getId\":{\"name\":\"getId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSlug\":{\"name\":\"getSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSavedId\":{\"name\":\"getSavedId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"isSaved\":{\"name\":\"isSaved\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"classifyConstraintError\":{\"name\":\"classifyConstraintError\",\"async\":false,\"parameters\":[{\"name\":\"message\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"'unique' | 'not_null' | null\",\"isStatic\":true,\"isPublic\":true},\"loadFromId\":{\"name\":\"loadFromId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"loadFromSlug\":{\"name\":\"loadFromSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"is\":{\"name\":\"is\",\"async\":true,\"parameters\":[{\"name\":\"criteria\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"do\":{\"name\":\"do\",\"async\":true,\"parameters\":[{\"name\":\"instructions\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"describe\":{\"name\":\"describe\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"isRelatedLoaded\":{\"name\":\"isRelatedLoaded\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"_setLoadedRelationship\":{\"name\":\"_setLoadedRelationship\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"value\",\"type\":\"any\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"loadRelated\":{\"name\":\"loadRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"loadRelatedMany\":{\"name\":\"loadRelatedMany\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any[]>\",\"isStatic\":false,\"isPublic\":true},\"getRelated\":{\"name\":\"getRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"getAvailableTools\":{\"name\":\"getAvailableTools\",\"async\":false,\"parameters\":[],\"returnType\":\"AITool[]\",\"isStatic\":false,\"isPublic\":true},\"executeToolCall\":{\"name\":\"executeToolCall\",\"async\":true,\"parameters\":[{\"name\":\"toolCall\",\"type\":\"ToolCall\",\"optional\":false}],\"returnType\":\"Promise<ToolCallResult>\",\"isStatic\":false,\"isPublic\":true},\"remember\":{\"name\":\"remember\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"recall\":{\"name\":\"recall\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"recallAll\":{\"name\":\"recallAll\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"Promise<Map<string>>\",\"isStatic\":false,\"isPublic\":true},\"forget\":{\"name\":\"forget\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"forgetScope\":{\"name\":\"forgetScope\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true},\"generateEmbeddings\":{\"name\":\"generateEmbeddings\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"GenerateEmbeddingsOptions\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getEmbedding\":{\"name\":\"getEmbedding\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"model\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<number[] | null>\",\"isStatic\":false,\"isPublic\":true},\"hasStaleEmbeddings\":{\"name\":\"hasStaleEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true},\"clearEmbeddings\":{\"name\":\"clearEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getParent\":{\"name\":\"getParent\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<null>\",\"isStatic\":false,\"isPublic\":true},\"getChildren\":{\"name\":\"getChildren\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"getAncestors\":{\"name\":\"getAncestors\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"getDescendants\":{\"name\":\"getDescendants\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"getHierarchy\":{\"name\":\"getHierarchy\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<HierarchyView>\",\"isStatic\":false,\"isPublic\":true},\"moveTo\":{\"name\":\"moveTo\",\"async\":true,\"parameters\":[{\"name\":\"newParent\",\"type\":\"string | null\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getGeoData\":{\"name\":\"getGeoData\",\"async\":false,\"parameters\":[],\"returnType\":\"GeoData\",\"isStatic\":false,\"isPublic\":true},\"hasCoordinates\":{\"name\":\"hasCoordinates\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"getMetadata\":{\"name\":\"getMetadata\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"setMetadata\":{\"name\":\"setMetadata\",\"async\":false,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"updateMetadata\":{\"name\":\"updateMetadata\",\"async\":false,\"parameters\":[{\"name\":\"updates\",\"type\":\"Record<string>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getType\":{\"name\":\"getType\",\"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}},\"decoratorConfig\":{\"tableStrategy\":\"sti\",\"api\":{\"include\":[\"list\",\"get\",\"create\",\"update\",\"delete\"]},\"mcp\":{\"include\":[\"list\",\"get\",\"create\",\"update\"]},\"cli\":true,\"tenantScoped\":{\"mode\":\"optional\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\",\"_meta_type\"]},\"extends\":\"SmrtHierarchical\",\"exportName\":\"Place\",\"collectionExportName\":\"PlaceCollection\",\"schema\":{\"tableName\":\"places\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"places\\\" (\\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 \\\"type_id\\\" UUID,\\n \\\"name\\\" TEXT,\\n \\\"description\\\" TEXT,\\n \\\"latitude\\\" REAL,\\n \\\"longitude\\\" REAL,\\n \\\"street_number\\\" TEXT,\\n \\\"street_name\\\" TEXT,\\n \\\"city\\\" TEXT,\\n \\\"region\\\" TEXT,\\n \\\"country\\\" TEXT,\\n \\\"postal_code\\\" TEXT,\\n \\\"country_code\\\" TEXT,\\n \\\"timezone\\\" TEXT,\\n \\\"external_id\\\" TEXT,\\n \\\"source\\\" TEXT,\\n \\\"metadata\\\" 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\":\"places\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false},\"type_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"foreignKey\":{\"table\":\"place_types\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"name\":{\"type\":\"TEXT\",\"notNull\":false},\"description\":{\"type\":\"TEXT\",\"notNull\":false},\"latitude\":{\"type\":\"REAL\",\"notNull\":false},\"longitude\":{\"type\":\"REAL\",\"notNull\":false},\"street_number\":{\"type\":\"TEXT\",\"notNull\":false},\"street_name\":{\"type\":\"TEXT\",\"notNull\":false},\"city\":{\"type\":\"TEXT\",\"notNull\":false},\"region\":{\"type\":\"TEXT\",\"notNull\":false},\"country\":{\"type\":\"TEXT\",\"notNull\":false},\"postal_code\":{\"type\":\"TEXT\",\"notNull\":false},\"country_code\":{\"type\":\"TEXT\",\"notNull\":false},\"timezone\":{\"type\":\"TEXT\",\"notNull\":false},\"external_id\":{\"type\":\"TEXT\",\"notNull\":false},\"source\":{\"type\":\"TEXT\",\"notNull\":false},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false}},\"indexes\":[{\"name\":\"places_slug_context_meta_type_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\",\"_meta_type\"],\"unique\":true},{\"name\":\"places_meta_type_idx\",\"columns\":[\"_meta_type\"]},{\"name\":\"places_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"places_parent_id_idx\",\"columns\":[\"parent_id\"]},{\"name\":\"places_type_id_idx\",\"columns\":[\"type_id\"]}],\"version\":\"f670088c\"}},\"@happyvertical/smrt-places:PlaceAsset\":{\"name\":\"placeasset\",\"className\":\"PlaceAsset\",\"qualifiedName\":\"@happyvertical/smrt-places:PlaceAsset\",\"collection\":\"placeassets\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/places/src/models/PlaceAsset.ts\",\"packageName\":\"@happyvertical/smrt-places\",\"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}}},\"placeId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"Place\",\"_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\":\"place_assets\",\"conflictColumns\":[\"place_id\",\"asset_id\",\"relationship\"],\"api\":false,\"mcp\":false,\"cli\":false,\"tenantScoped\":{\"mode\":\"optional\"}},\"extends\":\"SmrtObject\",\"exportName\":\"PlaceAsset\",\"collectionExportName\":\"PlaceAssetCollection\",\"validationRules\":[{\"field\":\"placeId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"},{\"field\":\"assetId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"relationship\",\"rule\":\"required\",\"fieldType\":\"text\"},{\"field\":\"sortOrder\",\"rule\":\"required\",\"fieldType\":\"integer\"}],\"schema\":{\"tableName\":\"place_assets\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"place_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 \\\"place_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},\"place_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"places\",\"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\":\"place_assets_place_id_asset_id_idx\",\"columns\":[\"place_id\",\"asset_id\",\"relationship\"],\"unique\":true},{\"name\":\"place_assets_slug_context_idx\",\"columns\":[\"slug\",\"context\"]},{\"name\":\"place_assets_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"place_assets_asset_id_idx\",\"columns\":[\"asset_id\"]}],\"version\":\"adf47666\"}},\"@happyvertical/smrt-places:PlaceType\":{\"name\":\"placetype\",\"className\":\"PlaceType\",\"qualifiedName\":\"@happyvertical/smrt-places:PlaceType\",\"collection\":\"placetypes\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/places/src/models/PlaceType.ts\",\"packageName\":\"@happyvertical/smrt-places\",\"fields\":{\"created_at\":{\"type\":\"datetime\",\"required\":false},\"updated_at\":{\"type\":\"datetime\",\"required\":false},\"name\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"description\":{\"type\":\"text\",\"required\":false},\"createdAt\":{\"type\":\"text\",\"required\":false},\"updatedAt\":{\"type\":\"text\",\"required\":false}},\"methods\":{\"withDatabase\":{\"name\":\"withDatabase\",\"async\":true,\"parameters\":[{\"name\":\"db\",\"type\":\"DatabaseInterface\",\"optional\":false},{\"name\":\"operation\",\"type\":\"Function\",\"optional\":false}],\"returnType\":\"Promise<T>\",\"isStatic\":false,\"isPublic\":true},\"getAiUsageSnapshot\":{\"name\":\"getAiUsageSnapshot\",\"async\":false,\"parameters\":[],\"returnType\":\"AiUsageSnapshot | undefined\",\"isStatic\":false,\"isPublic\":true},\"resetAiUsage\":{\"name\":\"resetAiUsage\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"listAiUsage\":{\"name\":\"listAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageListOptions\",\"optional\":true}],\"returnType\":\"Promise<SmrtAiUsageRecord[]>\",\"isStatic\":false,\"isPublic\":true},\"summarizeAiUsage\":{\"name\":\"summarizeAiUsage\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiUsageSummaryOptions\",\"optional\":true}],\"returnType\":\"Promise<Record<string, AiUsageStats>>\",\"isStatic\":false,\"isPublic\":true},\"destroy\":{\"name\":\"destroy\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"markAsPersisted\":{\"name\":\"markAsPersisted\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"requireInsertOnSave\":{\"name\":\"requireInsertOnSave\",\"async\":false,\"parameters\":[],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"initialize\":{\"name\":\"initialize\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"loadDataFromDb\":{\"name\":\"loadDataFromDb\",\"async\":true,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string>\",\"optional\":false}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getFields\":{\"name\":\"getFields\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"toJSON\":{\"name\":\"toJSON\",\"async\":false,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"toPlainObject\":{\"name\":\"toPlainObject\",\"async\":false,\"parameters\":[],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"toPublicJSON\":{\"name\":\"toPublicJSON\",\"async\":false,\"parameters\":[{\"name\":\"options\",\"type\":\"PublicJsonOptions\",\"optional\":true}],\"returnType\":\"Record<string>\",\"isStatic\":false,\"isPublic\":true},\"getId\":{\"name\":\"getId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSlug\":{\"name\":\"getSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"getSavedId\":{\"name\":\"getSavedId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"isSaved\":{\"name\":\"isSaved\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"classifyConstraintError\":{\"name\":\"classifyConstraintError\",\"async\":false,\"parameters\":[{\"name\":\"message\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"'unique' | 'not_null' | null\",\"isStatic\":true,\"isPublic\":true},\"loadFromId\":{\"name\":\"loadFromId\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"loadFromSlug\":{\"name\":\"loadFromSlug\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"is\":{\"name\":\"is\",\"async\":true,\"parameters\":[{\"name\":\"criteria\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"do\":{\"name\":\"do\",\"async\":true,\"parameters\":[{\"name\":\"instructions\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"describe\":{\"name\":\"describe\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"AiOperationOptions\",\"optional\":true}],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"delete\":{\"name\":\"delete\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"isRelatedLoaded\":{\"name\":\"isRelatedLoaded\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"_setLoadedRelationship\":{\"name\":\"_setLoadedRelationship\",\"async\":false,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"value\",\"type\":\"any\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"loadRelated\":{\"name\":\"loadRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"loadRelatedMany\":{\"name\":\"loadRelatedMany\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any[]>\",\"isStatic\":false,\"isPublic\":true},\"getRelated\":{\"name\":\"getRelated\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"LoadRelatedOptions\",\"optional\":true}],\"returnType\":\"Promise<any>\",\"isStatic\":false,\"isPublic\":true},\"getAvailableTools\":{\"name\":\"getAvailableTools\",\"async\":false,\"parameters\":[],\"returnType\":\"AITool[]\",\"isStatic\":false,\"isPublic\":true},\"executeToolCall\":{\"name\":\"executeToolCall\",\"async\":true,\"parameters\":[{\"name\":\"toolCall\",\"type\":\"ToolCall\",\"optional\":false}],\"returnType\":\"Promise<ToolCallResult>\",\"isStatic\":false,\"isPublic\":true},\"remember\":{\"name\":\"remember\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"recall\":{\"name\":\"recall\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"recallAll\":{\"name\":\"recallAll\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":true}],\"returnType\":\"Promise<Map<string>>\",\"isStatic\":false,\"isPublic\":true},\"forget\":{\"name\":\"forget\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"forgetScope\":{\"name\":\"forgetScope\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"object\",\"optional\":false}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true},\"generateEmbeddings\":{\"name\":\"generateEmbeddings\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"GenerateEmbeddingsOptions\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getEmbedding\":{\"name\":\"getEmbedding\",\"async\":true,\"parameters\":[{\"name\":\"fieldName\",\"type\":\"string\",\"optional\":false},{\"name\":\"model\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<number[] | null>\",\"isStatic\":false,\"isPublic\":true},\"hasStaleEmbeddings\":{\"name\":\"hasStaleEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<boolean>\",\"isStatic\":false,\"isPublic\":true},\"clearEmbeddings\":{\"name\":\"clearEmbeddings\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getBySlug\":{\"name\":\"getBySlug\",\"async\":true,\"parameters\":[{\"name\":\"_slug\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<PlaceType | null>\",\"isStatic\":true,\"isPublic\":true}},\"decoratorConfig\":{\"tableStrategy\":\"sti\",\"api\":{\"include\":[\"list\",\"get\",\"create\",\"update\",\"delete\"]},\"mcp\":{\"include\":[\"list\",\"get\",\"create\"]},\"cli\":true},\"extends\":\"SmrtObject\",\"exportName\":\"PlaceType\",\"collectionExportName\":\"PlaceTypeCollection\",\"validationRules\":[{\"field\":\"name\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"place_types\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"place_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 \\\"name\\\" TEXT DEFAULT '',\\n \\\"description\\\" 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\"},\"name\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"description\":{\"type\":\"TEXT\",\"notNull\":false}},\"indexes\":[{\"name\":\"place_types_slug_context_meta_type_idx\",\"columns\":[\"slug\",\"context\",\"_meta_type\"],\"unique\":true},{\"name\":\"place_types_meta_type_idx\",\"columns\":[\"_meta_type\"]},{\"name\":\"place_types_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"8c3bb691\"}}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-assets\",\"@happyvertical/smrt-core\",\"@happyvertical/smrt-tenancy\"]}"));
|
|
9
9
|
//#endregion
|
|
10
10
|
//#region src/models/PlaceAsset.ts
|
|
11
11
|
var __defProp$2 = Object.defineProperty;
|
package/dist/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-places",
|
|
5
|
-
"packageVersion": "0.
|
|
5
|
+
"packageVersion": "0.43.1",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-places:PlaceAssetCollection": {
|
|
8
8
|
"name": "placeassetcollection",
|
|
@@ -794,6 +794,25 @@
|
|
|
794
794
|
}
|
|
795
795
|
},
|
|
796
796
|
"methods": {
|
|
797
|
+
"withDatabase": {
|
|
798
|
+
"name": "withDatabase",
|
|
799
|
+
"async": true,
|
|
800
|
+
"parameters": [
|
|
801
|
+
{
|
|
802
|
+
"name": "db",
|
|
803
|
+
"type": "DatabaseInterface",
|
|
804
|
+
"optional": false
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
"name": "operation",
|
|
808
|
+
"type": "Function",
|
|
809
|
+
"optional": false
|
|
810
|
+
}
|
|
811
|
+
],
|
|
812
|
+
"returnType": "Promise<T>",
|
|
813
|
+
"isStatic": false,
|
|
814
|
+
"isPublic": true
|
|
815
|
+
},
|
|
797
816
|
"getAiUsageSnapshot": {
|
|
798
817
|
"name": "getAiUsageSnapshot",
|
|
799
818
|
"async": false,
|
|
@@ -1529,7 +1548,13 @@
|
|
|
1529
1548
|
"parent_id": {
|
|
1530
1549
|
"type": "UUID",
|
|
1531
1550
|
"referenceKind": "foreignKey",
|
|
1532
|
-
"notNull": false
|
|
1551
|
+
"notNull": false,
|
|
1552
|
+
"foreignKey": {
|
|
1553
|
+
"table": "places",
|
|
1554
|
+
"column": "id",
|
|
1555
|
+
"onDelete": "NO ACTION",
|
|
1556
|
+
"onUpdate": "CASCADE"
|
|
1557
|
+
}
|
|
1533
1558
|
},
|
|
1534
1559
|
"tenant_id": {
|
|
1535
1560
|
"type": "UUID",
|
|
@@ -1539,7 +1564,13 @@
|
|
|
1539
1564
|
"type_id": {
|
|
1540
1565
|
"type": "UUID",
|
|
1541
1566
|
"referenceKind": "foreignKey",
|
|
1542
|
-
"notNull": false
|
|
1567
|
+
"notNull": false,
|
|
1568
|
+
"foreignKey": {
|
|
1569
|
+
"table": "place_types",
|
|
1570
|
+
"column": "id",
|
|
1571
|
+
"onDelete": "NO ACTION",
|
|
1572
|
+
"onUpdate": "CASCADE"
|
|
1573
|
+
}
|
|
1543
1574
|
},
|
|
1544
1575
|
"name": {
|
|
1545
1576
|
"type": "TEXT",
|
|
@@ -1639,7 +1670,7 @@
|
|
|
1639
1670
|
]
|
|
1640
1671
|
}
|
|
1641
1672
|
],
|
|
1642
|
-
"version": "
|
|
1673
|
+
"version": "f670088c"
|
|
1643
1674
|
}
|
|
1644
1675
|
},
|
|
1645
1676
|
"@happyvertical/smrt-places:PlaceAsset": {
|
|
@@ -1773,7 +1804,13 @@
|
|
|
1773
1804
|
"type": "UUID",
|
|
1774
1805
|
"referenceKind": "foreignKey",
|
|
1775
1806
|
"notNull": true,
|
|
1776
|
-
"unique": false
|
|
1807
|
+
"unique": false,
|
|
1808
|
+
"foreignKey": {
|
|
1809
|
+
"table": "places",
|
|
1810
|
+
"column": "id",
|
|
1811
|
+
"onDelete": "CASCADE",
|
|
1812
|
+
"onUpdate": "CASCADE"
|
|
1813
|
+
}
|
|
1777
1814
|
},
|
|
1778
1815
|
"asset_id": {
|
|
1779
1816
|
"type": "UUID",
|
|
@@ -1824,7 +1861,7 @@
|
|
|
1824
1861
|
]
|
|
1825
1862
|
}
|
|
1826
1863
|
],
|
|
1827
|
-
"version": "
|
|
1864
|
+
"version": "adf47666"
|
|
1828
1865
|
}
|
|
1829
1866
|
},
|
|
1830
1867
|
"@happyvertical/smrt-places:PlaceType": {
|
|
@@ -1865,6 +1902,25 @@
|
|
|
1865
1902
|
}
|
|
1866
1903
|
},
|
|
1867
1904
|
"methods": {
|
|
1905
|
+
"withDatabase": {
|
|
1906
|
+
"name": "withDatabase",
|
|
1907
|
+
"async": true,
|
|
1908
|
+
"parameters": [
|
|
1909
|
+
{
|
|
1910
|
+
"name": "db",
|
|
1911
|
+
"type": "DatabaseInterface",
|
|
1912
|
+
"optional": false
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
"name": "operation",
|
|
1916
|
+
"type": "Function",
|
|
1917
|
+
"optional": false
|
|
1918
|
+
}
|
|
1919
|
+
],
|
|
1920
|
+
"returnType": "Promise<T>",
|
|
1921
|
+
"isStatic": false,
|
|
1922
|
+
"isPublic": true
|
|
1923
|
+
},
|
|
1868
1924
|
"getAiUsageSnapshot": {
|
|
1869
1925
|
"name": "getAiUsageSnapshot",
|
|
1870
1926
|
"async": false,
|
package/dist/smrt-knowledge.json
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
"sensitiveFieldsExcluded": true,
|
|
4
4
|
"generatedAt": "1970-01-01T00:00:00.000Z",
|
|
5
5
|
"packageName": "@happyvertical/smrt-places",
|
|
6
|
-
"packageVersion": "0.
|
|
6
|
+
"packageVersion": "0.43.1",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
10
|
+
"manifest": "9b47a42c9efadb4b7ae4149d027b7d4550bfaef3bf5f5176e00dc2beeea8e225",
|
|
11
|
+
"packageJson": "4ad46cb953e578fee42e0c3aa945cddd6d824e37f5fb251d7194eccf49fb93ea",
|
|
12
12
|
"agents": "1f12a465f3ef103ac0ba27bcec1ec2b982fd0f5e8a63b9a42738f2c79ecebe49"
|
|
13
13
|
},
|
|
14
14
|
"exports": [
|
|
@@ -573,7 +573,8 @@
|
|
|
573
573
|
"toJSON",
|
|
574
574
|
"toPlainObject",
|
|
575
575
|
"toPublicJSON",
|
|
576
|
-
"updateMetadata"
|
|
576
|
+
"updateMetadata",
|
|
577
|
+
"withDatabase"
|
|
577
578
|
],
|
|
578
579
|
"methodSignatures": [
|
|
579
580
|
{
|
|
@@ -930,6 +931,15 @@
|
|
|
930
931
|
"updates: Record<string>"
|
|
931
932
|
],
|
|
932
933
|
"returns": "void"
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
"name": "withDatabase",
|
|
937
|
+
"async": true,
|
|
938
|
+
"params": [
|
|
939
|
+
"db: DatabaseInterface",
|
|
940
|
+
"operation: Function"
|
|
941
|
+
],
|
|
942
|
+
"returns": "Promise<T>"
|
|
933
943
|
}
|
|
934
944
|
],
|
|
935
945
|
"tenant": {
|
|
@@ -1215,7 +1225,8 @@
|
|
|
1215
1225
|
"summarizeAiUsage",
|
|
1216
1226
|
"toJSON",
|
|
1217
1227
|
"toPlainObject",
|
|
1218
|
-
"toPublicJSON"
|
|
1228
|
+
"toPublicJSON",
|
|
1229
|
+
"withDatabase"
|
|
1219
1230
|
],
|
|
1220
1231
|
"methodSignatures": [
|
|
1221
1232
|
{
|
|
@@ -1490,6 +1501,15 @@
|
|
|
1490
1501
|
"options?: PublicJsonOptions"
|
|
1491
1502
|
],
|
|
1492
1503
|
"returns": "Record<string>"
|
|
1504
|
+
},
|
|
1505
|
+
{
|
|
1506
|
+
"name": "withDatabase",
|
|
1507
|
+
"async": true,
|
|
1508
|
+
"params": [
|
|
1509
|
+
"db: DatabaseInterface",
|
|
1510
|
+
"operation: Function"
|
|
1511
|
+
],
|
|
1512
|
+
"returns": "Promise<T>"
|
|
1493
1513
|
}
|
|
1494
1514
|
],
|
|
1495
1515
|
"tableStrategy": "sti",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-places",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.1",
|
|
4
4
|
"description": "Hierarchical place management with geo integration and SMRT framework support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"@happyvertical/logger": "^0.88.0",
|
|
31
31
|
"@happyvertical/sql": "^0.88.0",
|
|
32
32
|
"@happyvertical/utils": "^0.88.0",
|
|
33
|
-
"@happyvertical/smrt-
|
|
34
|
-
"@happyvertical/smrt-
|
|
35
|
-
"@happyvertical/smrt-tenancy": "0.
|
|
33
|
+
"@happyvertical/smrt-assets": "0.43.1",
|
|
34
|
+
"@happyvertical/smrt-core": "0.43.1",
|
|
35
|
+
"@happyvertical/smrt-tenancy": "0.43.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": "24.13.2",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"typescript": "5.9.3",
|
|
41
41
|
"vite": "8.1.4",
|
|
42
42
|
"vitest": "4.1.10",
|
|
43
|
-
"@happyvertical/smrt-vitest": "0.
|
|
43
|
+
"@happyvertical/smrt-vitest": "0.43.1"
|
|
44
44
|
},
|
|
45
45
|
"keywords": [
|
|
46
46
|
"ai",
|