@happyvertical/smrt-places 0.45.3 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/manifest.json +22 -11
- package/dist/smrt-knowledge.json +186 -12
- package/package.json +7 -7
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.45.3\",\"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\":{\"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\":{\"skipApiCheck\":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\":{\"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\":{\"skipApiCheck\":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.47.0\",\"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\":{\"getParent\":{\"name\":\"getParent\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this | null>\",\"isStatic\":false,\"isPublic\":true},\"getChildren\":{\"name\":\"getChildren\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this[]>\",\"isStatic\":false,\"isPublic\":true},\"getAncestors\":{\"name\":\"getAncestors\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this[]>\",\"isStatic\":false,\"isPublic\":true},\"getDescendants\":{\"name\":\"getDescendants\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this[]>\",\"isStatic\":false,\"isPublic\":true},\"getHierarchy\":{\"name\":\"getHierarchy\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<HierarchyView<this>>\",\"isStatic\":false,\"isPublic\":true},\"moveTo\":{\"name\":\"moveTo\",\"async\":true,\"parameters\":[{\"name\":\"newParent\",\"type\":\"this | string | null\",\"optional\":false,\"unionBranches\":[{\"type\":\"this\"},{\"type\":\"string\"},{\"type\":\"null\"}]}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"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, unknown>\",\"isStatic\":false,\"isPublic\":true},\"setMetadata\":{\"name\":\"setMetadata\",\"async\":false,\"parameters\":[{\"name\":\"data\",\"type\":\"Record<string, unknown>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"updateMetadata\":{\"name\":\"updateMetadata\",\"async\":false,\"parameters\":[{\"name\":\"updates\",\"type\":\"Record<string, unknown>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getType\":{\"name\":\"getType\",\"async\":true,\"parameters\":[],\"returnType\":\"any\",\"isStatic\":false,\"isPublic\":true},\"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\":{\"skipApiCheck\":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\":{\"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\":{\"skipApiCheck\":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.47.0",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-places:PlaceAssetCollection": {
|
|
8
8
|
"name": "placeassetcollection",
|
|
@@ -798,7 +798,7 @@
|
|
|
798
798
|
"name": "getParent",
|
|
799
799
|
"async": true,
|
|
800
800
|
"parameters": [],
|
|
801
|
-
"returnType": "Promise<null>",
|
|
801
|
+
"returnType": "Promise<this | null>",
|
|
802
802
|
"isStatic": false,
|
|
803
803
|
"isPublic": true
|
|
804
804
|
},
|
|
@@ -806,7 +806,7 @@
|
|
|
806
806
|
"name": "getChildren",
|
|
807
807
|
"async": true,
|
|
808
808
|
"parameters": [],
|
|
809
|
-
"returnType": "Promise",
|
|
809
|
+
"returnType": "Promise<this[]>",
|
|
810
810
|
"isStatic": false,
|
|
811
811
|
"isPublic": true
|
|
812
812
|
},
|
|
@@ -814,7 +814,7 @@
|
|
|
814
814
|
"name": "getAncestors",
|
|
815
815
|
"async": true,
|
|
816
816
|
"parameters": [],
|
|
817
|
-
"returnType": "Promise",
|
|
817
|
+
"returnType": "Promise<this[]>",
|
|
818
818
|
"isStatic": false,
|
|
819
819
|
"isPublic": true
|
|
820
820
|
},
|
|
@@ -822,7 +822,7 @@
|
|
|
822
822
|
"name": "getDescendants",
|
|
823
823
|
"async": true,
|
|
824
824
|
"parameters": [],
|
|
825
|
-
"returnType": "Promise",
|
|
825
|
+
"returnType": "Promise<this[]>",
|
|
826
826
|
"isStatic": false,
|
|
827
827
|
"isPublic": true
|
|
828
828
|
},
|
|
@@ -830,7 +830,7 @@
|
|
|
830
830
|
"name": "getHierarchy",
|
|
831
831
|
"async": true,
|
|
832
832
|
"parameters": [],
|
|
833
|
-
"returnType": "Promise<HierarchyView
|
|
833
|
+
"returnType": "Promise<HierarchyView<this>>",
|
|
834
834
|
"isStatic": false,
|
|
835
835
|
"isPublic": true
|
|
836
836
|
},
|
|
@@ -840,8 +840,19 @@
|
|
|
840
840
|
"parameters": [
|
|
841
841
|
{
|
|
842
842
|
"name": "newParent",
|
|
843
|
-
"type": "string | null",
|
|
844
|
-
"optional": false
|
|
843
|
+
"type": "this | string | null",
|
|
844
|
+
"optional": false,
|
|
845
|
+
"unionBranches": [
|
|
846
|
+
{
|
|
847
|
+
"type": "this"
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
"type": "string"
|
|
851
|
+
},
|
|
852
|
+
{
|
|
853
|
+
"type": "null"
|
|
854
|
+
}
|
|
855
|
+
]
|
|
845
856
|
}
|
|
846
857
|
],
|
|
847
858
|
"returnType": "Promise<void>",
|
|
@@ -868,7 +879,7 @@
|
|
|
868
879
|
"name": "getMetadata",
|
|
869
880
|
"async": false,
|
|
870
881
|
"parameters": [],
|
|
871
|
-
"returnType": "Record<string>",
|
|
882
|
+
"returnType": "Record<string, unknown>",
|
|
872
883
|
"isStatic": false,
|
|
873
884
|
"isPublic": true
|
|
874
885
|
},
|
|
@@ -878,7 +889,7 @@
|
|
|
878
889
|
"parameters": [
|
|
879
890
|
{
|
|
880
891
|
"name": "data",
|
|
881
|
-
"type": "Record<string>",
|
|
892
|
+
"type": "Record<string, unknown>",
|
|
882
893
|
"optional": false
|
|
883
894
|
}
|
|
884
895
|
],
|
|
@@ -892,7 +903,7 @@
|
|
|
892
903
|
"parameters": [
|
|
893
904
|
{
|
|
894
905
|
"name": "updates",
|
|
895
|
-
"type": "Record<string>",
|
|
906
|
+
"type": "Record<string, unknown>",
|
|
896
907
|
"optional": false
|
|
897
908
|
}
|
|
898
909
|
],
|
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.47.0",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
10
|
+
"manifest": "77bf302ad9c183687cfc9bd94e773604f79d18679e7fd83cab5593134eb411a4",
|
|
11
|
+
"packageJson": "2cd0b7639b9de3cf55110d5e8668b324af56ce13c51a932abe76e44733cb08e8",
|
|
12
12
|
"agents": "1f12a465f3ef103ac0ba27bcec1ec2b982fd0f5e8a63b9a42738f2c79ecebe49"
|
|
13
13
|
},
|
|
14
14
|
"exports": [
|
|
@@ -153,6 +153,64 @@
|
|
|
153
153
|
}
|
|
154
154
|
],
|
|
155
155
|
"surfaces": [],
|
|
156
|
+
"withheldSurfaces": [
|
|
157
|
+
{
|
|
158
|
+
"kind": "api",
|
|
159
|
+
"operation": "addAsset",
|
|
160
|
+
"code": "api-disabled",
|
|
161
|
+
"reason": "api is disabled",
|
|
162
|
+
"objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
"kind": "api",
|
|
166
|
+
"operation": "attach",
|
|
167
|
+
"code": "api-disabled",
|
|
168
|
+
"reason": "api is disabled",
|
|
169
|
+
"objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"kind": "api",
|
|
173
|
+
"operation": "byLeft",
|
|
174
|
+
"code": "api-disabled",
|
|
175
|
+
"reason": "api is disabled",
|
|
176
|
+
"objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"kind": "api",
|
|
180
|
+
"operation": "byRight",
|
|
181
|
+
"code": "api-disabled",
|
|
182
|
+
"reason": "api is disabled",
|
|
183
|
+
"objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"kind": "api",
|
|
187
|
+
"operation": "detach",
|
|
188
|
+
"code": "api-disabled",
|
|
189
|
+
"reason": "api is disabled",
|
|
190
|
+
"objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"kind": "api",
|
|
194
|
+
"operation": "getAssets",
|
|
195
|
+
"code": "api-disabled",
|
|
196
|
+
"reason": "api is disabled",
|
|
197
|
+
"objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"kind": "api",
|
|
201
|
+
"operation": "removeAsset",
|
|
202
|
+
"code": "api-disabled",
|
|
203
|
+
"reason": "api is disabled",
|
|
204
|
+
"objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"kind": "api",
|
|
208
|
+
"operation": "setLinks",
|
|
209
|
+
"code": "api-disabled",
|
|
210
|
+
"reason": "api is disabled",
|
|
211
|
+
"objectName": "@happyvertical/smrt-places:PlaceAssetCollection"
|
|
212
|
+
}
|
|
213
|
+
],
|
|
156
214
|
"relationshipFeatures": [
|
|
157
215
|
"SmrtJunction",
|
|
158
216
|
"uuidColumns"
|
|
@@ -890,7 +948,7 @@
|
|
|
890
948
|
{
|
|
891
949
|
"name": "getAncestors",
|
|
892
950
|
"async": true,
|
|
893
|
-
"returns": "Promise"
|
|
951
|
+
"returns": "Promise<this[]>"
|
|
894
952
|
},
|
|
895
953
|
{
|
|
896
954
|
"name": "getAssets",
|
|
@@ -903,12 +961,12 @@
|
|
|
903
961
|
{
|
|
904
962
|
"name": "getChildren",
|
|
905
963
|
"async": true,
|
|
906
|
-
"returns": "Promise"
|
|
964
|
+
"returns": "Promise<this[]>"
|
|
907
965
|
},
|
|
908
966
|
{
|
|
909
967
|
"name": "getDescendants",
|
|
910
968
|
"async": true,
|
|
911
|
-
"returns": "Promise"
|
|
969
|
+
"returns": "Promise<this[]>"
|
|
912
970
|
},
|
|
913
971
|
{
|
|
914
972
|
"name": "getGeoData",
|
|
@@ -917,16 +975,16 @@
|
|
|
917
975
|
{
|
|
918
976
|
"name": "getHierarchy",
|
|
919
977
|
"async": true,
|
|
920
|
-
"returns": "Promise<HierarchyView
|
|
978
|
+
"returns": "Promise<HierarchyView<this>>"
|
|
921
979
|
},
|
|
922
980
|
{
|
|
923
981
|
"name": "getMetadata",
|
|
924
|
-
"returns": "Record<string>"
|
|
982
|
+
"returns": "Record<string, unknown>"
|
|
925
983
|
},
|
|
926
984
|
{
|
|
927
985
|
"name": "getParent",
|
|
928
986
|
"async": true,
|
|
929
|
-
"returns": "Promise<null>"
|
|
987
|
+
"returns": "Promise<this | null>"
|
|
930
988
|
},
|
|
931
989
|
{
|
|
932
990
|
"name": "getType",
|
|
@@ -941,7 +999,7 @@
|
|
|
941
999
|
"name": "moveTo",
|
|
942
1000
|
"async": true,
|
|
943
1001
|
"params": [
|
|
944
|
-
"newParent: string | null"
|
|
1002
|
+
"newParent: this | string | null"
|
|
945
1003
|
],
|
|
946
1004
|
"returns": "Promise<void>"
|
|
947
1005
|
},
|
|
@@ -957,14 +1015,14 @@
|
|
|
957
1015
|
{
|
|
958
1016
|
"name": "setMetadata",
|
|
959
1017
|
"params": [
|
|
960
|
-
"data: Record<string>"
|
|
1018
|
+
"data: Record<string, unknown>"
|
|
961
1019
|
],
|
|
962
1020
|
"returns": "void"
|
|
963
1021
|
},
|
|
964
1022
|
{
|
|
965
1023
|
"name": "updateMetadata",
|
|
966
1024
|
"params": [
|
|
967
|
-
"updates: Record<string>"
|
|
1025
|
+
"updates: Record<string, unknown>"
|
|
968
1026
|
],
|
|
969
1027
|
"returns": "void"
|
|
970
1028
|
}
|
|
@@ -1167,6 +1225,113 @@
|
|
|
1167
1225
|
"objectName": "@happyvertical/smrt-places:Place"
|
|
1168
1226
|
}
|
|
1169
1227
|
],
|
|
1228
|
+
"withheldSurfaces": [
|
|
1229
|
+
{
|
|
1230
|
+
"kind": "api",
|
|
1231
|
+
"operation": "addAsset",
|
|
1232
|
+
"code": "not-included",
|
|
1233
|
+
"reason": "not listed in api.include",
|
|
1234
|
+
"objectName": "@happyvertical/smrt-places:Place"
|
|
1235
|
+
},
|
|
1236
|
+
{
|
|
1237
|
+
"kind": "api",
|
|
1238
|
+
"operation": "getAncestors",
|
|
1239
|
+
"code": "not-included",
|
|
1240
|
+
"reason": "not listed in api.include",
|
|
1241
|
+
"objectName": "@happyvertical/smrt-places:Place"
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
"kind": "api",
|
|
1245
|
+
"operation": "getAssets",
|
|
1246
|
+
"code": "not-included",
|
|
1247
|
+
"reason": "not listed in api.include",
|
|
1248
|
+
"objectName": "@happyvertical/smrt-places:Place"
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
"kind": "api",
|
|
1252
|
+
"operation": "getChildren",
|
|
1253
|
+
"code": "not-included",
|
|
1254
|
+
"reason": "not listed in api.include",
|
|
1255
|
+
"objectName": "@happyvertical/smrt-places:Place"
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
"kind": "api",
|
|
1259
|
+
"operation": "getDescendants",
|
|
1260
|
+
"code": "not-included",
|
|
1261
|
+
"reason": "not listed in api.include",
|
|
1262
|
+
"objectName": "@happyvertical/smrt-places:Place"
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
"kind": "api",
|
|
1266
|
+
"operation": "getGeoData",
|
|
1267
|
+
"code": "not-included",
|
|
1268
|
+
"reason": "not listed in api.include",
|
|
1269
|
+
"objectName": "@happyvertical/smrt-places:Place"
|
|
1270
|
+
},
|
|
1271
|
+
{
|
|
1272
|
+
"kind": "api",
|
|
1273
|
+
"operation": "getHierarchy",
|
|
1274
|
+
"code": "not-included",
|
|
1275
|
+
"reason": "not listed in api.include",
|
|
1276
|
+
"objectName": "@happyvertical/smrt-places:Place"
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
"kind": "api",
|
|
1280
|
+
"operation": "getMetadata",
|
|
1281
|
+
"code": "not-included",
|
|
1282
|
+
"reason": "not listed in api.include",
|
|
1283
|
+
"objectName": "@happyvertical/smrt-places:Place"
|
|
1284
|
+
},
|
|
1285
|
+
{
|
|
1286
|
+
"kind": "api",
|
|
1287
|
+
"operation": "getParent",
|
|
1288
|
+
"code": "not-included",
|
|
1289
|
+
"reason": "not listed in api.include",
|
|
1290
|
+
"objectName": "@happyvertical/smrt-places:Place"
|
|
1291
|
+
},
|
|
1292
|
+
{
|
|
1293
|
+
"kind": "api",
|
|
1294
|
+
"operation": "getType",
|
|
1295
|
+
"code": "not-included",
|
|
1296
|
+
"reason": "not listed in api.include",
|
|
1297
|
+
"objectName": "@happyvertical/smrt-places:Place"
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
"kind": "api",
|
|
1301
|
+
"operation": "hasCoordinates",
|
|
1302
|
+
"code": "not-included",
|
|
1303
|
+
"reason": "not listed in api.include",
|
|
1304
|
+
"objectName": "@happyvertical/smrt-places:Place"
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
"kind": "api",
|
|
1308
|
+
"operation": "moveTo",
|
|
1309
|
+
"code": "not-included",
|
|
1310
|
+
"reason": "not listed in api.include",
|
|
1311
|
+
"objectName": "@happyvertical/smrt-places:Place"
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
"kind": "api",
|
|
1315
|
+
"operation": "removeAsset",
|
|
1316
|
+
"code": "not-included",
|
|
1317
|
+
"reason": "not listed in api.include",
|
|
1318
|
+
"objectName": "@happyvertical/smrt-places:Place"
|
|
1319
|
+
},
|
|
1320
|
+
{
|
|
1321
|
+
"kind": "api",
|
|
1322
|
+
"operation": "setMetadata",
|
|
1323
|
+
"code": "not-included",
|
|
1324
|
+
"reason": "not listed in api.include",
|
|
1325
|
+
"objectName": "@happyvertical/smrt-places:Place"
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
"kind": "api",
|
|
1329
|
+
"operation": "updateMetadata",
|
|
1330
|
+
"code": "not-included",
|
|
1331
|
+
"reason": "not listed in api.include",
|
|
1332
|
+
"objectName": "@happyvertical/smrt-places:Place"
|
|
1333
|
+
}
|
|
1334
|
+
],
|
|
1170
1335
|
"relationshipFeatures": [
|
|
1171
1336
|
"SmrtHierarchical",
|
|
1172
1337
|
"foreignKey",
|
|
@@ -1411,6 +1576,15 @@
|
|
|
1411
1576
|
"objectName": "@happyvertical/smrt-places:PlaceType"
|
|
1412
1577
|
}
|
|
1413
1578
|
],
|
|
1579
|
+
"withheldSurfaces": [
|
|
1580
|
+
{
|
|
1581
|
+
"kind": "api",
|
|
1582
|
+
"operation": "getBySlug",
|
|
1583
|
+
"code": "not-included",
|
|
1584
|
+
"reason": "not listed in api.include",
|
|
1585
|
+
"objectName": "@happyvertical/smrt-places:PlaceType"
|
|
1586
|
+
}
|
|
1587
|
+
],
|
|
1414
1588
|
"relationshipFeatures": [
|
|
1415
1589
|
"uuidColumns"
|
|
1416
1590
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-places",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"description": "Hierarchical place management with geo integration and SMRT framework support",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
"@happyvertical/files": "^0.89.4",
|
|
29
29
|
"@happyvertical/geo": "^0.89.4",
|
|
30
30
|
"@happyvertical/logger": "^0.89.4",
|
|
31
|
+
"@happyvertical/smrt-assets": "0.47.0",
|
|
32
|
+
"@happyvertical/smrt-core": "0.47.0",
|
|
33
|
+
"@happyvertical/smrt-tenancy": "0.47.0",
|
|
31
34
|
"@happyvertical/sql": "^0.89.4",
|
|
32
|
-
"@happyvertical/utils": "^0.89.4"
|
|
33
|
-
"@happyvertical/smrt-assets": "0.45.3",
|
|
34
|
-
"@happyvertical/smrt-tenancy": "0.45.3",
|
|
35
|
-
"@happyvertical/smrt-core": "0.45.3"
|
|
35
|
+
"@happyvertical/utils": "^0.89.4"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
+
"@happyvertical/smrt-vitest": "0.47.0",
|
|
38
39
|
"@types/node": "24.13.2",
|
|
39
40
|
"fast-glob": "3.3.3",
|
|
40
41
|
"typescript": "5.9.3",
|
|
41
42
|
"vite": "8.1.4",
|
|
42
|
-
"vitest": "4.1.10"
|
|
43
|
-
"@happyvertical/smrt-vitest": "0.45.3"
|
|
43
|
+
"vitest": "4.1.10"
|
|
44
44
|
},
|
|
45
45
|
"keywords": [
|
|
46
46
|
"ai",
|