@happyvertical/smrt-properties 0.61.2 → 0.61.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +130 -18
- package/dist/smrt-knowledge.json +3 -3
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
14
14
|
};
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/__smrt-register__.ts
|
|
17
|
-
ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-properties","packageVersion":"0.61.2","objects":{"@happyvertical/smrt-properties:PropertyCollection":{"name":"propertycollection","className":"PropertyCollection","qualifiedName":"@happyvertical/smrt-properties:PropertyCollection","collection":"properties","filePath":"/home/runner/work/smrt/smrt/packages/properties/src/collections/Properties.ts","packageName":"@happyvertical/smrt-properties","fields":{},"methods":{"findByDomain":{"name":"findByDomain","async":true,"parameters":[{"name":"domain","type":"string","optional":false}],"returnType":"Promise<Property | null>","isStatic":false,"isPublic":true},"findByRepository":{"name":"findByRepository","async":true,"parameters":[{"name":"repositoryId","type":"string","optional":false}],"returnType":"Promise<Property[]>","isStatic":false,"isPublic":true},"findByOwner":{"name":"findByOwner","async":true,"parameters":[{"name":"ownerId","type":"string","optional":false}],"returnType":"Promise<Property[]>","isStatic":false,"isPublic":true},"findActive":{"name":"findActive","async":true,"parameters":[],"returnType":"Promise<Property[]>","isStatic":false,"isPublic":true},"findByStatus":{"name":"findByStatus","async":true,"parameters":[{"name":"status","type":"PropertyStatus","optional":false}],"returnType":"Promise<Property[]>","isStatic":false,"isPublic":true},"getOrCreateByDomain":{"name":"getOrCreateByDomain","async":true,"parameters":[{"name":"domain","type":"string","optional":false},{"name":"defaults","type":"object","optional":true,"memberTypes":["string","string | null"]}],"returnType":"Promise<Property>","isStatic":false,"isPublic":true},"countByStatus":{"name":"countByStatus","async":true,"parameters":[],"returnType":"Promise<Record<PropertyStatus, number>>","isStatic":false,"isPublic":true},"findByTenant":{"name":"findByTenant","async":true,"parameters":[{"name":"tenantId","type":"string","optional":false}],"returnType":"Promise<Property[]>","isStatic":false,"isPublic":true},"findGlobal":{"name":"findGlobal","async":true,"parameters":[],"returnType":"Promise<Property[]>","isStatic":false,"isPublic":true},"findWithGlobals":{"name":"findWithGlobals","async":true,"parameters":[{"name":"tenantId","type":"string","optional":false}],"returnType":"Promise<Property[]>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":{"include":["list","get","create","update","delete"]},"mcp":{"include":["list","get","create"]}},"extends":"SmrtCollection","extendsTypeArg":"Property","exportName":"PropertyCollection","collectionExportName":"PropertyCollectionCollection","collectionOf":"@happyvertical/smrt-properties:Property","inheritedExposure":["api","mcp"],"schema":{"tableName":"properties","ddl":"CREATE TABLE IF NOT EXISTS \\"properties\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"name\\" TEXT DEFAULT '',\\n \\"domain\\" TEXT DEFAULT '',\\n \\"url\\" TEXT DEFAULT '',\\n \\"description\\" TEXT DEFAULT '',\\n \\"repository_id\\" UUID,\\n \\"owner_id\\" UUID,\\n \\"status\\" TEXT DEFAULT 'active',\\n \\"metadata\\" JSON DEFAULT '{}'\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"name":{"type":"TEXT","notNull":false,"default":""},"domain":{"type":"TEXT","notNull":false,"default":""},"url":{"type":"TEXT","notNull":false,"default":""},"description":{"type":"TEXT","notNull":false,"default":""},"repository_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false},"owner_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"active"},"metadata":{"type":"JSON","notNull":false,"default":{}}},"indexes":[{"name":"properties_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"properties_meta_type_idx","columns":["_meta_type"]},{"name":"properties_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"properties_repository_id_idx","columns":["repository_id"]},{"name":"properties_owner_id_idx","columns":["owner_id"]}],"version":"5300aec9"},"importPath":"@happyvertical/smrt-properties"},"@happyvertical/smrt-properties:ZoneCollection":{"name":"zonecollection","className":"ZoneCollection","qualifiedName":"@happyvertical/smrt-properties:ZoneCollection","collection":"zones","filePath":"/home/runner/work/smrt/smrt/packages/properties/src/collections/Zones.ts","packageName":"@happyvertical/smrt-properties","fields":{},"methods":{"findByProperty":{"name":"findByProperty","async":true,"parameters":[{"name":"propertyId","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"findTopLevel":{"name":"findTopLevel","async":true,"parameters":[{"name":"propertyId","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"findChildren":{"name":"findChildren","async":true,"parameters":[{"name":"parentId","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"findByPath":{"name":"findByPath","async":true,"parameters":[{"name":"propertyId","type":"string","optional":false},{"name":"path","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"findByType":{"name":"findByType","async":true,"parameters":[{"name":"propertyId","type":"string","optional":false},{"name":"type","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"getTree":{"name":"getTree","async":true,"parameters":[{"name":"propertyId","type":"string","optional":false}],"returnType":"Promise<ZoneTree<Zone>>","isStatic":false,"isPublic":true},"getAncestors":{"name":"getAncestors","async":true,"parameters":[{"name":"zoneId","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"getDescendants":{"name":"getDescendants","async":true,"parameters":[{"name":"zoneId","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"getMaxDepth":{"name":"getMaxDepth","async":true,"parameters":[{"name":"propertyId","type":"string","optional":false}],"returnType":"Promise<number>","isStatic":false,"isPublic":true},"findByDimensions":{"name":"findByDimensions","async":true,"parameters":[{"name":"propertyId","type":"string","optional":false},{"name":"width","type":"number","optional":false},{"name":"height","type":"number","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"findByAllowedFormat":{"name":"findByAllowedFormat","async":true,"parameters":[{"name":"propertyId","type":"string","optional":false},{"name":"format","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"moveZone":{"name":"moveZone","async":true,"parameters":[{"name":"zoneId","type":"string","optional":false},{"name":"newParentId","type":"string | null","optional":false,"unionBranches":[{"type":"string"},{"type":"null"}]}],"returnType":"Promise<Zone | null>","isStatic":false,"isPublic":true},"deleteZone":{"name":"deleteZone","async":true,"parameters":[{"name":"zoneId","type":"string","optional":false},{"name":"cascade","type":"boolean","optional":true}],"returnType":"Promise<number>","isStatic":false,"isPublic":true},"findByTenant":{"name":"findByTenant","async":true,"parameters":[{"name":"tenantId","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"findGlobal":{"name":"findGlobal","async":true,"parameters":[],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"findWithGlobals":{"name":"findWithGlobals","async":true,"parameters":[{"name":"tenantId","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":{"include":["list","get","create","update","delete"]},"mcp":{"include":["list","get","create"]}},"extends":"SmrtCollection","extendsTypeArg":"Zone","exportName":"ZoneCollection","collectionExportName":"ZoneCollectionCollection","collectionOf":"@happyvertical/smrt-properties:Zone","inheritedExposure":["api","mcp"],"schema":{"tableName":"zones","ddl":"CREATE TABLE IF NOT EXISTS \\"zones\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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 \\"parent_id\\" UUID,\\n \\"tenant_id\\" UUID,\\n \\"property_id\\" UUID,\\n \\"name\\" TEXT DEFAULT '',\\n \\"type\\" TEXT DEFAULT '',\\n \\"path\\" TEXT DEFAULT '',\\n \\"selector\\" TEXT DEFAULT '',\\n \\"position\\" TEXT DEFAULT '',\\n \\"width\\" INTEGER,\\n \\"height\\" INTEGER,\\n \\"allowed_formats\\" JSON DEFAULT '[]',\\n \\"default_content_id\\" TEXT,\\n \\"metadata\\" JSON DEFAULT '{}'\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"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"},"parent_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"zones","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"property_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"properties","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"name":{"type":"TEXT","notNull":false,"unique":false,"default":""},"type":{"type":"TEXT","notNull":false,"unique":false,"default":""},"path":{"type":"TEXT","notNull":false,"unique":false,"default":""},"selector":{"type":"TEXT","notNull":false,"unique":false,"default":""},"position":{"type":"TEXT","notNull":false,"unique":false,"default":""},"width":{"type":"INTEGER","notNull":false,"unique":false},"height":{"type":"INTEGER","notNull":false,"unique":false},"allowed_formats":{"type":"JSON","notNull":false,"unique":false,"default":[]},"default_content_id":{"type":"TEXT","notNull":false,"unique":false},"metadata":{"type":"JSON","notNull":false,"unique":false,"default":{}}},"indexes":[{"name":"zones_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"zones_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"zones_parent_id_idx","columns":["parent_id"]},{"name":"zones_property_id_idx","columns":["property_id"]}],"version":"907163cb"},"importPath":"@happyvertical/smrt-properties"},"@happyvertical/smrt-properties:Property":{"name":"property","className":"Property","qualifiedName":"@happyvertical/smrt-properties:Property","collection":"properties","filePath":"/home/runner/work/smrt/smrt/packages/properties/src/models/Property.ts","packageName":"@happyvertical/smrt-properties","fields":{"created_at":{"type":"datetime","required":false},"updated_at":{"type":"datetime","required":false},"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"name":{"type":"text","required":false,"default":""},"domain":{"type":"text","required":false,"default":""},"url":{"type":"text","required":false,"default":""},"description":{"type":"text","required":false,"default":""},"repositoryId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-projects:Repository"},"ownerId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-profiles:Profile"},"status":{"type":"text","required":false,"default":"active","enum":["active","inactive","pending"]},"metadata":{"type":"json","required":false,"default":{}}},"methods":{"getZones":{"name":"getZones","async":true,"parameters":[],"returnType":"any","isStatic":false,"isPublic":true},"getZoneTree":{"name":"getZoneTree","async":true,"parameters":[],"returnType":"any","isStatic":false,"isPublic":true},"createZone":{"name":"createZone","async":true,"parameters":[{"name":"options","type":"any","optional":false,"typeUnresolved":true}],"returnType":"any","isStatic":false,"isPublic":true},"isActive":{"name":"isActive","async":false,"parameters":[],"returnType":"boolean","isStatic":false,"isPublic":true},"summarize":{"name":"summarize","async":true,"parameters":[],"returnType":"Promise<string>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableStrategy":"sti","api":{"include":["list","get","create","update","delete"]},"mcp":{"include":["list","get","create"]},"cli":{"skipApiCheck":true},"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context","_meta_type"]},"extends":"SmrtObject","exportName":"Property","collectionExportName":"PropertyCollection","displayLabelField":"name","schema":{"tableName":"properties","ddl":"CREATE TABLE IF NOT EXISTS \\"properties\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"name\\" TEXT DEFAULT '',\\n \\"domain\\" TEXT DEFAULT '',\\n \\"url\\" TEXT DEFAULT '',\\n \\"description\\" TEXT DEFAULT '',\\n \\"repository_id\\" UUID,\\n \\"owner_id\\" UUID,\\n \\"status\\" TEXT DEFAULT 'active',\\n \\"metadata\\" JSON DEFAULT '{}'\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"name":{"type":"TEXT","notNull":false,"default":""},"domain":{"type":"TEXT","notNull":false,"default":""},"url":{"type":"TEXT","notNull":false,"default":""},"description":{"type":"TEXT","notNull":false,"default":""},"repository_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false},"owner_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"active"},"metadata":{"type":"JSON","notNull":false,"default":{}}},"indexes":[{"name":"properties_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"properties_meta_type_idx","columns":["_meta_type"]},{"name":"properties_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"properties_repository_id_idx","columns":["repository_id"]},{"name":"properties_owner_id_idx","columns":["owner_id"]}],"version":"5300aec9"},"importPath":"@happyvertical/smrt-properties"},"@happyvertical/smrt-properties:Zone":{"name":"zone","className":"Zone","qualifiedName":"@happyvertical/smrt-properties:Zone","collection":"zones","filePath":"/home/runner/work/smrt/smrt/packages/properties/src/models/Zone.ts","packageName":"@happyvertical/smrt-properties","fields":{"parentId":{"type":"foreignKey","required":false,"related":"Zone","_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}}},"propertyId":{"type":"foreignKey","required":false,"related":"Property"},"name":{"type":"text","required":false,"default":""},"type":{"type":"text","required":false,"default":""},"path":{"type":"text","required":false,"default":""},"selector":{"type":"text","required":false,"default":""},"position":{"type":"text","required":false,"default":""},"width":{"type":"integer","required":false},"height":{"type":"integer","required":false},"allowedFormats":{"type":"json","required":false,"default":[]},"defaultContentId":{"type":"text","required":false},"metadata":{"type":"json","required":false,"default":{}}},"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},"isTopLevel":{"name":"isTopLevel","async":false,"parameters":[],"returnType":"boolean","isStatic":false,"isPublic":true},"hasDimensions":{"name":"hasDimensions","async":false,"parameters":[],"returnType":"boolean","isStatic":false,"isPublic":true},"getDimensionString":{"name":"getDimensionString","async":false,"parameters":[],"returnType":"string | null","isStatic":false,"isPublic":true},"getProperty":{"name":"getProperty","async":true,"parameters":[],"returnType":"any","isStatic":false,"isPublic":true},"getFullPath":{"name":"getFullPath","async":true,"parameters":[],"returnType":"Promise<string>","isStatic":false,"isPublic":true},"getDepth":{"name":"getDepth","async":true,"parameters":[],"returnType":"Promise<number>","isStatic":false,"isPublic":true},"createChild":{"name":"createChild","async":true,"parameters":[{"name":"options","type":"Omit<ZoneOptions, 'propertyId' | 'parentId'>","optional":false}],"returnType":"Promise<Zone>","isStatic":false,"isPublic":true},"toTreeNode":{"name":"toTreeNode","async":true,"parameters":[],"returnType":"Promise<ZoneTreeNode<Zone>>","isStatic":false,"isPublic":true},"isFormatAllowed":{"name":"isFormatAllowed","async":false,"parameters":[{"name":"format","type":"string","optional":false}],"returnType":"boolean","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":{"include":["list","get","create","update","delete"]},"mcp":{"include":["list","get","create"]},"cli":{"skipApiCheck":true},"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtHierarchical","exportName":"Zone","collectionExportName":"ZoneCollection","displayLabelField":"name","schema":{"tableName":"zones","ddl":"CREATE TABLE IF NOT EXISTS \\"zones\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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 \\"parent_id\\" UUID,\\n \\"tenant_id\\" UUID,\\n \\"property_id\\" UUID,\\n \\"name\\" TEXT DEFAULT '',\\n \\"type\\" TEXT DEFAULT '',\\n \\"path\\" TEXT DEFAULT '',\\n \\"selector\\" TEXT DEFAULT '',\\n \\"position\\" TEXT DEFAULT '',\\n \\"width\\" INTEGER,\\n \\"height\\" INTEGER,\\n \\"allowed_formats\\" JSON DEFAULT '[]',\\n \\"default_content_id\\" TEXT,\\n \\"metadata\\" JSON DEFAULT '{}'\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"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"},"parent_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"zones","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"property_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"properties","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"name":{"type":"TEXT","notNull":false,"unique":false,"default":""},"type":{"type":"TEXT","notNull":false,"unique":false,"default":""},"path":{"type":"TEXT","notNull":false,"unique":false,"default":""},"selector":{"type":"TEXT","notNull":false,"unique":false,"default":""},"position":{"type":"TEXT","notNull":false,"unique":false,"default":""},"width":{"type":"INTEGER","notNull":false,"unique":false},"height":{"type":"INTEGER","notNull":false,"unique":false},"allowed_formats":{"type":"JSON","notNull":false,"unique":false,"default":[]},"default_content_id":{"type":"TEXT","notNull":false,"unique":false},"metadata":{"type":"JSON","notNull":false,"unique":false,"default":{}}},"indexes":[{"name":"zones_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"zones_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"zones_parent_id_idx","columns":["parent_id"]},{"name":"zones_property_id_idx","columns":["property_id"]}],"version":"907163cb"},"importPath":"@happyvertical/smrt-properties"}},"moduleType":"smrt","smrtDependencies":["@happyvertical/smrt-core","@happyvertical/smrt-prompts","@happyvertical/smrt-tenancy"],"browser":{"status":"server-only","issues":["#3624"],"via":["@happyvertical/smrt-tenancy"]},"stampsConstructors":true}`));
|
|
17
|
+
ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-properties","packageVersion":"0.61.4","objects":{"@happyvertical/smrt-properties:PropertyCollection":{"name":"propertycollection","className":"PropertyCollection","qualifiedName":"@happyvertical/smrt-properties:PropertyCollection","collection":"properties","filePath":"src/collections/Properties.ts","packageName":"@happyvertical/smrt-properties","fields":{},"methods":{"findByDomain":{"name":"findByDomain","async":true,"parameters":[{"name":"domain","type":"string","optional":false}],"returnType":"Promise<Property | null>","isStatic":false,"isPublic":true},"findByRepository":{"name":"findByRepository","async":true,"parameters":[{"name":"repositoryId","type":"string","optional":false}],"returnType":"Promise<Property[]>","isStatic":false,"isPublic":true},"findByOwner":{"name":"findByOwner","async":true,"parameters":[{"name":"ownerId","type":"string","optional":false}],"returnType":"Promise<Property[]>","isStatic":false,"isPublic":true},"findActive":{"name":"findActive","async":true,"parameters":[],"returnType":"Promise<Property[]>","isStatic":false,"isPublic":true},"findByStatus":{"name":"findByStatus","async":true,"parameters":[{"name":"status","type":"PropertyStatus","optional":false}],"returnType":"Promise<Property[]>","isStatic":false,"isPublic":true},"getOrCreateByDomain":{"name":"getOrCreateByDomain","async":true,"parameters":[{"name":"domain","type":"string","optional":false},{"name":"defaults","type":"object","optional":true,"memberTypes":["string","string | null"]}],"returnType":"Promise<Property>","isStatic":false,"isPublic":true},"countByStatus":{"name":"countByStatus","async":true,"parameters":[],"returnType":"Promise<Record<PropertyStatus, number>>","isStatic":false,"isPublic":true},"findByTenant":{"name":"findByTenant","async":true,"parameters":[{"name":"tenantId","type":"string","optional":false}],"returnType":"Promise<Property[]>","isStatic":false,"isPublic":true},"findGlobal":{"name":"findGlobal","async":true,"parameters":[],"returnType":"Promise<Property[]>","isStatic":false,"isPublic":true},"findWithGlobals":{"name":"findWithGlobals","async":true,"parameters":[{"name":"tenantId","type":"string","optional":false}],"returnType":"Promise<Property[]>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":{"include":["list","get","create","update","delete"]},"mcp":{"include":["list","get","create"]}},"extends":"SmrtCollection","extendsTypeArg":"Property","exportName":"PropertyCollection","collectionExportName":"PropertyCollectionCollection","collectionOf":"@happyvertical/smrt-properties:Property","inheritedExposure":["api","mcp"],"schema":{"tableName":"properties","ddl":"CREATE TABLE IF NOT EXISTS \\"properties\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"name\\" TEXT DEFAULT '',\\n \\"domain\\" TEXT DEFAULT '',\\n \\"url\\" TEXT DEFAULT '',\\n \\"description\\" TEXT DEFAULT '',\\n \\"repository_id\\" UUID,\\n \\"owner_id\\" UUID,\\n \\"status\\" TEXT DEFAULT 'active',\\n \\"metadata\\" JSON DEFAULT '{}'\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"name":{"type":"TEXT","notNull":false,"default":""},"domain":{"type":"TEXT","notNull":false,"default":""},"url":{"type":"TEXT","notNull":false,"default":""},"description":{"type":"TEXT","notNull":false,"default":""},"repository_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false},"owner_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"active"},"metadata":{"type":"JSON","notNull":false,"default":{}}},"indexes":[{"name":"properties_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"properties_meta_type_idx","columns":["_meta_type"]},{"name":"properties_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"properties_repository_id_idx","columns":["repository_id"]},{"name":"properties_owner_id_idx","columns":["owner_id"]}],"version":"5300aec9"},"importPath":"@happyvertical/smrt-properties"},"@happyvertical/smrt-properties:ZoneCollection":{"name":"zonecollection","className":"ZoneCollection","qualifiedName":"@happyvertical/smrt-properties:ZoneCollection","collection":"zones","filePath":"src/collections/Zones.ts","packageName":"@happyvertical/smrt-properties","fields":{},"methods":{"findByProperty":{"name":"findByProperty","async":true,"parameters":[{"name":"propertyId","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"findTopLevel":{"name":"findTopLevel","async":true,"parameters":[{"name":"propertyId","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"findChildren":{"name":"findChildren","async":true,"parameters":[{"name":"parentId","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"findByPath":{"name":"findByPath","async":true,"parameters":[{"name":"propertyId","type":"string","optional":false},{"name":"path","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"findByType":{"name":"findByType","async":true,"parameters":[{"name":"propertyId","type":"string","optional":false},{"name":"type","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"getTree":{"name":"getTree","async":true,"parameters":[{"name":"propertyId","type":"string","optional":false}],"returnType":"Promise<ZoneTree<Zone>>","isStatic":false,"isPublic":true},"getAncestors":{"name":"getAncestors","async":true,"parameters":[{"name":"zoneId","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"getDescendants":{"name":"getDescendants","async":true,"parameters":[{"name":"zoneId","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"getMaxDepth":{"name":"getMaxDepth","async":true,"parameters":[{"name":"propertyId","type":"string","optional":false}],"returnType":"Promise<number>","isStatic":false,"isPublic":true},"findByDimensions":{"name":"findByDimensions","async":true,"parameters":[{"name":"propertyId","type":"string","optional":false},{"name":"width","type":"number","optional":false},{"name":"height","type":"number","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"findByAllowedFormat":{"name":"findByAllowedFormat","async":true,"parameters":[{"name":"propertyId","type":"string","optional":false},{"name":"format","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"moveZone":{"name":"moveZone","async":true,"parameters":[{"name":"zoneId","type":"string","optional":false},{"name":"newParentId","type":"string | null","optional":false,"unionBranches":[{"type":"string"},{"type":"null"}]}],"returnType":"Promise<Zone | null>","isStatic":false,"isPublic":true},"deleteZone":{"name":"deleteZone","async":true,"parameters":[{"name":"zoneId","type":"string","optional":false},{"name":"cascade","type":"boolean","optional":true}],"returnType":"Promise<number>","isStatic":false,"isPublic":true},"findByTenant":{"name":"findByTenant","async":true,"parameters":[{"name":"tenantId","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"findGlobal":{"name":"findGlobal","async":true,"parameters":[],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true},"findWithGlobals":{"name":"findWithGlobals","async":true,"parameters":[{"name":"tenantId","type":"string","optional":false}],"returnType":"Promise<Zone[]>","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":{"include":["list","get","create","update","delete"]},"mcp":{"include":["list","get","create"]}},"extends":"SmrtCollection","extendsTypeArg":"Zone","exportName":"ZoneCollection","collectionExportName":"ZoneCollectionCollection","collectionOf":"@happyvertical/smrt-properties:Zone","inheritedExposure":["api","mcp"],"schema":{"tableName":"zones","ddl":"CREATE TABLE IF NOT EXISTS \\"zones\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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 \\"parent_id\\" UUID,\\n \\"tenant_id\\" UUID,\\n \\"property_id\\" UUID,\\n \\"name\\" TEXT DEFAULT '',\\n \\"type\\" TEXT DEFAULT '',\\n \\"path\\" TEXT DEFAULT '',\\n \\"selector\\" TEXT DEFAULT '',\\n \\"position\\" TEXT DEFAULT '',\\n \\"width\\" INTEGER,\\n \\"height\\" INTEGER,\\n \\"allowed_formats\\" JSON DEFAULT '[]',\\n \\"default_content_id\\" TEXT,\\n \\"metadata\\" JSON DEFAULT '{}'\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"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"},"parent_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"zones","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"property_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"properties","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"name":{"type":"TEXT","notNull":false,"unique":false,"default":""},"type":{"type":"TEXT","notNull":false,"unique":false,"default":""},"path":{"type":"TEXT","notNull":false,"unique":false,"default":""},"selector":{"type":"TEXT","notNull":false,"unique":false,"default":""},"position":{"type":"TEXT","notNull":false,"unique":false,"default":""},"width":{"type":"INTEGER","notNull":false,"unique":false},"height":{"type":"INTEGER","notNull":false,"unique":false},"allowed_formats":{"type":"JSON","notNull":false,"unique":false,"default":[]},"default_content_id":{"type":"TEXT","notNull":false,"unique":false},"metadata":{"type":"JSON","notNull":false,"unique":false,"default":{}}},"indexes":[{"name":"zones_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"zones_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"zones_parent_id_idx","columns":["parent_id"]},{"name":"zones_property_id_idx","columns":["property_id"]}],"version":"907163cb"},"importPath":"@happyvertical/smrt-properties"},"@happyvertical/smrt-properties:Property":{"name":"property","className":"Property","qualifiedName":"@happyvertical/smrt-properties:Property","collection":"properties","filePath":"src/models/Property.ts","packageName":"@happyvertical/smrt-properties","fields":{"created_at":{"type":"datetime","_meta":{"__statedOptions":[]},"required":false},"updated_at":{"type":"datetime","_meta":{"__statedOptions":[]},"required":false},"tenantId":{"type":"text","_meta":{"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false},"__statedOptions":["sqlType","nullable","__tenancy","required"],"sqlType":"UUID","nullable":true,"required":false},"required":false},"name":{"type":"text","_meta":{"__statedOptions":["default"]},"required":false,"default":""},"domain":{"type":"text","_meta":{"__statedOptions":["default"]},"required":false,"default":""},"url":{"type":"text","_meta":{"__statedOptions":["default"]},"required":false,"default":""},"description":{"type":"text","_meta":{"__statedOptions":["default"]},"required":false,"default":""},"repositoryId":{"type":"crossPackageRef","_meta":{"__statedOptions":["related"]},"required":false,"related":"@happyvertical/smrt-projects:Repository"},"ownerId":{"type":"crossPackageRef","_meta":{"__statedOptions":["related"]},"required":false,"related":"@happyvertical/smrt-profiles:Profile"},"status":{"type":"text","_meta":{"__statedOptions":["default","enum"]},"required":false,"default":"active","enum":["active","inactive","pending"]},"metadata":{"type":"json","_meta":{"__statedOptions":["default"]},"required":false,"default":{}}},"methods":{"getZones":{"name":"getZones","async":true,"parameters":[],"returnType":"any","isStatic":false,"isPublic":true},"getZoneTree":{"name":"getZoneTree","async":true,"parameters":[],"returnType":"any","isStatic":false,"isPublic":true},"createZone":{"name":"createZone","async":true,"parameters":[{"name":"options","type":"any","optional":false,"typeUnresolved":true}],"returnType":"any","isStatic":false,"isPublic":true},"isActive":{"name":"isActive","async":false,"parameters":[],"returnType":"boolean","isStatic":false,"isPublic":true},"summarize":{"name":"summarize","async":true,"parameters":[],"returnType":"Promise<string>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableStrategy":"sti","api":{"include":["list","get","create","update","delete"]},"mcp":{"include":["list","get","create"]},"cli":{"skipApiCheck":true},"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context","_meta_type"]},"extends":"SmrtObject","exportName":"Property","collectionExportName":"PropertyCollection","displayLabelField":"name","schema":{"tableName":"properties","ddl":"CREATE TABLE IF NOT EXISTS \\"properties\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"_meta_type\\" TEXT NOT NULL,\\n \\"_meta_data\\" JSON,\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"name\\" TEXT DEFAULT '',\\n \\"domain\\" TEXT DEFAULT '',\\n \\"url\\" TEXT DEFAULT '',\\n \\"description\\" TEXT DEFAULT '',\\n \\"repository_id\\" UUID,\\n \\"owner_id\\" UUID,\\n \\"status\\" TEXT DEFAULT 'active',\\n \\"metadata\\" JSON DEFAULT '{}'\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"_meta_type":{"type":"TEXT","notNull":true},"_meta_data":{"type":"JSON","notNull":false},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false},"name":{"type":"TEXT","notNull":false,"default":""},"domain":{"type":"TEXT","notNull":false,"default":""},"url":{"type":"TEXT","notNull":false,"default":""},"description":{"type":"TEXT","notNull":false,"default":""},"repository_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false},"owner_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false},"status":{"type":"TEXT","notNull":false,"default":"active"},"metadata":{"type":"JSON","notNull":false,"default":{}}},"indexes":[{"name":"properties_slug_context_meta_type_idx","columns":["tenant_id","slug","context","_meta_type"],"unique":true,"nullsNotDistinct":true},{"name":"properties_meta_type_idx","columns":["_meta_type"]},{"name":"properties_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"properties_repository_id_idx","columns":["repository_id"]},{"name":"properties_owner_id_idx","columns":["owner_id"]}],"version":"5300aec9"},"importPath":"@happyvertical/smrt-properties"},"@happyvertical/smrt-properties:Zone":{"name":"zone","className":"Zone","qualifiedName":"@happyvertical/smrt-properties:Zone","collection":"zones","filePath":"src/models/Zone.ts","packageName":"@happyvertical/smrt-properties","fields":{"parentId":{"type":"foreignKey","_meta":{"__statedOptions":[],"nullable":true},"required":false,"related":"Zone"},"tenantId":{"type":"text","_meta":{"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false},"__statedOptions":["sqlType","nullable","__tenancy","required"],"sqlType":"UUID","nullable":true,"required":false},"required":false},"propertyId":{"type":"foreignKey","_meta":{"__statedOptions":["related"]},"required":false,"related":"Property"},"name":{"type":"text","_meta":{"__statedOptions":["default"]},"required":false,"default":""},"type":{"type":"text","_meta":{"__statedOptions":["default"]},"required":false,"default":""},"path":{"type":"text","_meta":{"__statedOptions":["default"]},"required":false,"default":""},"selector":{"type":"text","_meta":{"__statedOptions":["default"]},"required":false,"default":""},"position":{"type":"text","_meta":{"__statedOptions":["default"]},"required":false,"default":""},"width":{"type":"integer","_meta":{"__statedOptions":[]},"required":false},"height":{"type":"integer","_meta":{"__statedOptions":[]},"required":false},"allowedFormats":{"type":"json","_meta":{"__statedOptions":["default"]},"required":false,"default":[]},"defaultContentId":{"type":"text","_meta":{"__statedOptions":[]},"required":false},"metadata":{"type":"json","_meta":{"__statedOptions":["default"]},"required":false,"default":{}}},"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},"isTopLevel":{"name":"isTopLevel","async":false,"parameters":[],"returnType":"boolean","isStatic":false,"isPublic":true},"hasDimensions":{"name":"hasDimensions","async":false,"parameters":[],"returnType":"boolean","isStatic":false,"isPublic":true},"getDimensionString":{"name":"getDimensionString","async":false,"parameters":[],"returnType":"string | null","isStatic":false,"isPublic":true},"getProperty":{"name":"getProperty","async":true,"parameters":[],"returnType":"any","isStatic":false,"isPublic":true},"getFullPath":{"name":"getFullPath","async":true,"parameters":[],"returnType":"Promise<string>","isStatic":false,"isPublic":true},"getDepth":{"name":"getDepth","async":true,"parameters":[],"returnType":"Promise<number>","isStatic":false,"isPublic":true},"createChild":{"name":"createChild","async":true,"parameters":[{"name":"options","type":"Omit<ZoneOptions, 'propertyId' | 'parentId'>","optional":false}],"returnType":"Promise<Zone>","isStatic":false,"isPublic":true},"toTreeNode":{"name":"toTreeNode","async":true,"parameters":[],"returnType":"Promise<ZoneTreeNode<Zone>>","isStatic":false,"isPublic":true},"isFormatAllowed":{"name":"isFormatAllowed","async":false,"parameters":[{"name":"format","type":"string","optional":false}],"returnType":"boolean","isStatic":false,"isPublic":true}},"decoratorConfig":{"api":{"include":["list","get","create","update","delete"]},"mcp":{"include":["list","get","create"]},"cli":{"skipApiCheck":true},"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtHierarchical","exportName":"Zone","collectionExportName":"ZoneCollection","displayLabelField":"name","schema":{"tableName":"zones","ddl":"CREATE TABLE IF NOT EXISTS \\"zones\\" (\\n \\"_sync_origin_device_id\\" TEXT,\\n \\"_sync_revision\\" INTEGER,\\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 \\"parent_id\\" UUID,\\n \\"tenant_id\\" UUID,\\n \\"property_id\\" UUID,\\n \\"name\\" TEXT DEFAULT '',\\n \\"type\\" TEXT DEFAULT '',\\n \\"path\\" TEXT DEFAULT '',\\n \\"selector\\" TEXT DEFAULT '',\\n \\"position\\" TEXT DEFAULT '',\\n \\"width\\" INTEGER,\\n \\"height\\" INTEGER,\\n \\"allowed_formats\\" JSON DEFAULT '[]',\\n \\"default_content_id\\" TEXT,\\n \\"metadata\\" JSON DEFAULT '{}'\\n);","columns":{"_sync_origin_device_id":{"type":"TEXT"},"_sync_revision":{"type":"INTEGER"},"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"},"parent_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"zones","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"property_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"properties","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"name":{"type":"TEXT","notNull":false,"unique":false,"default":""},"type":{"type":"TEXT","notNull":false,"unique":false,"default":""},"path":{"type":"TEXT","notNull":false,"unique":false,"default":""},"selector":{"type":"TEXT","notNull":false,"unique":false,"default":""},"position":{"type":"TEXT","notNull":false,"unique":false,"default":""},"width":{"type":"INTEGER","notNull":false,"unique":false},"height":{"type":"INTEGER","notNull":false,"unique":false},"allowed_formats":{"type":"JSON","notNull":false,"unique":false,"default":[]},"default_content_id":{"type":"TEXT","notNull":false,"unique":false},"metadata":{"type":"JSON","notNull":false,"unique":false,"default":{}}},"indexes":[{"name":"zones_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"zones_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"zones_parent_id_idx","columns":["parent_id"]},{"name":"zones_property_id_idx","columns":["property_id"]}],"version":"907163cb"},"importPath":"@happyvertical/smrt-properties"}},"moduleType":"smrt","smrtDependencies":["@happyvertical/smrt-core","@happyvertical/smrt-prompts","@happyvertical/smrt-tenancy"],"browser":{"status":"server-only","issues":["#3624"],"via":["@happyvertical/smrt-tenancy"]},"stampsConstructors":true}`));
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/prompts.ts
|
|
20
20
|
var smrtPropertiesSummarizePrompt = definePrompt({
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/__smrt-register__.ts","../src/prompts.ts","../src/models/Property.ts","../src/collections/Properties.ts","../src/models/Zone.ts","../src/collections/Zones.ts"],"sourcesContent":["// Generated by @happyvertical/smrt-core smrtPlugin at library build time.\n// The package manifest is inlined so self-registration cannot miss when a\n// downstream bundler relocates this module away from dist/manifest.json\n// (https://github.com/happyvertical/smrt/issues/1506,\n// https://github.com/happyvertical/smrt/issues/1507).\nimport { ObjectRegistry } from '@happyvertical/smrt-core';\n\nObjectRegistry.registerPackageManifest(JSON.parse(\"{\\\"version\\\":\\\"1.0.0\\\",\\\"timestamp\\\":0,\\\"packageName\\\":\\\"@happyvertical/smrt-properties\\\",\\\"packageVersion\\\":\\\"0.61.2\\\",\\\"objects\\\":{\\\"@happyvertical/smrt-properties:PropertyCollection\\\":{\\\"name\\\":\\\"propertycollection\\\",\\\"className\\\":\\\"PropertyCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-properties:PropertyCollection\\\",\\\"collection\\\":\\\"properties\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/properties/src/collections/Properties.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-properties\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"findByDomain\\\":{\\\"name\\\":\\\"findByDomain\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"domain\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Property | null>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByRepository\\\":{\\\"name\\\":\\\"findByRepository\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"repositoryId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Property[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByOwner\\\":{\\\"name\\\":\\\"findByOwner\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"ownerId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Property[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findActive\\\":{\\\"name\\\":\\\"findActive\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<Property[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByStatus\\\":{\\\"name\\\":\\\"findByStatus\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"status\\\",\\\"type\\\":\\\"PropertyStatus\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Property[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getOrCreateByDomain\\\":{\\\"name\\\":\\\"getOrCreateByDomain\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"domain\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"defaults\\\",\\\"type\\\":\\\"object\\\",\\\"optional\\\":true,\\\"memberTypes\\\":[\\\"string\\\",\\\"string | null\\\"]}],\\\"returnType\\\":\\\"Promise<Property>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"countByStatus\\\":{\\\"name\\\":\\\"countByStatus\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<Record<PropertyStatus, number>>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByTenant\\\":{\\\"name\\\":\\\"findByTenant\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Property[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findGlobal\\\":{\\\"name\\\":\\\"findGlobal\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<Property[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findWithGlobals\\\":{\\\"name\\\":\\\"findWithGlobals\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Property[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\"]}},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"Property\\\",\\\"exportName\\\":\\\"PropertyCollection\\\",\\\"collectionExportName\\\":\\\"PropertyCollectionCollection\\\",\\\"collectionOf\\\":\\\"@happyvertical/smrt-properties:Property\\\",\\\"inheritedExposure\\\":[\\\"api\\\",\\\"mcp\\\"],\\\"schema\\\":{\\\"tableName\\\":\\\"properties\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"properties\\\\\\\" (\\\\n \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"_meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"_meta_data\\\\\\\" JSON,\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"domain\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"url\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"description\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"repository_id\\\\\\\" UUID,\\\\n \\\\\\\"owner_id\\\\\\\" UUID,\\\\n \\\\\\\"status\\\\\\\" TEXT DEFAULT 'active',\\\\n \\\\\\\"metadata\\\\\\\" JSON DEFAULT '{}'\\\\n);\\\",\\\"columns\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"_meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"_meta_data\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"domain\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"url\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"repository_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false},\\\"owner_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"active\\\"},\\\"metadata\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"default\\\":{}}},\\\"indexes\\\":[{\\\"name\\\":\\\"properties_slug_context_meta_type_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"properties_meta_type_idx\\\",\\\"columns\\\":[\\\"_meta_type\\\"]},{\\\"name\\\":\\\"properties_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"properties_repository_id_idx\\\",\\\"columns\\\":[\\\"repository_id\\\"]},{\\\"name\\\":\\\"properties_owner_id_idx\\\",\\\"columns\\\":[\\\"owner_id\\\"]}],\\\"version\\\":\\\"5300aec9\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-properties\\\"},\\\"@happyvertical/smrt-properties:ZoneCollection\\\":{\\\"name\\\":\\\"zonecollection\\\",\\\"className\\\":\\\"ZoneCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-properties:ZoneCollection\\\",\\\"collection\\\":\\\"zones\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/properties/src/collections/Zones.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-properties\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"findByProperty\\\":{\\\"name\\\":\\\"findByProperty\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"propertyId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findTopLevel\\\":{\\\"name\\\":\\\"findTopLevel\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"propertyId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findChildren\\\":{\\\"name\\\":\\\"findChildren\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"parentId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByPath\\\":{\\\"name\\\":\\\"findByPath\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"propertyId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"path\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByType\\\":{\\\"name\\\":\\\"findByType\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"propertyId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"type\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getTree\\\":{\\\"name\\\":\\\"getTree\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"propertyId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<ZoneTree<Zone>>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getAncestors\\\":{\\\"name\\\":\\\"getAncestors\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"zoneId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getDescendants\\\":{\\\"name\\\":\\\"getDescendants\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"zoneId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getMaxDepth\\\":{\\\"name\\\":\\\"getMaxDepth\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"propertyId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<number>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByDimensions\\\":{\\\"name\\\":\\\"findByDimensions\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"propertyId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"width\\\",\\\"type\\\":\\\"number\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"height\\\",\\\"type\\\":\\\"number\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByAllowedFormat\\\":{\\\"name\\\":\\\"findByAllowedFormat\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"propertyId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"format\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"moveZone\\\":{\\\"name\\\":\\\"moveZone\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"zoneId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"newParentId\\\",\\\"type\\\":\\\"string | null\\\",\\\"optional\\\":false,\\\"unionBranches\\\":[{\\\"type\\\":\\\"string\\\"},{\\\"type\\\":\\\"null\\\"}]}],\\\"returnType\\\":\\\"Promise<Zone | null>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"deleteZone\\\":{\\\"name\\\":\\\"deleteZone\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"zoneId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"cascade\\\",\\\"type\\\":\\\"boolean\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<number>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByTenant\\\":{\\\"name\\\":\\\"findByTenant\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findGlobal\\\":{\\\"name\\\":\\\"findGlobal\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findWithGlobals\\\":{\\\"name\\\":\\\"findWithGlobals\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\"]}},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"Zone\\\",\\\"exportName\\\":\\\"ZoneCollection\\\",\\\"collectionExportName\\\":\\\"ZoneCollectionCollection\\\",\\\"collectionOf\\\":\\\"@happyvertical/smrt-properties:Zone\\\",\\\"inheritedExposure\\\":[\\\"api\\\",\\\"mcp\\\"],\\\"schema\\\":{\\\"tableName\\\":\\\"zones\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"zones\\\\\\\" (\\\\n \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\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 \\\\\\\"parent_id\\\\\\\" UUID,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"property_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"type\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"path\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"selector\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"position\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"width\\\\\\\" INTEGER,\\\\n \\\\\\\"height\\\\\\\" INTEGER,\\\\n \\\\\\\"allowed_formats\\\\\\\" JSON DEFAULT '[]',\\\\n \\\\\\\"default_content_id\\\\\\\" TEXT,\\\\n \\\\\\\"metadata\\\\\\\" JSON DEFAULT '{}'\\\\n);\\\",\\\"columns\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"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\\\"},\\\"parent_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"zones\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"property_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"properties\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"path\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"selector\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"position\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"width\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"height\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"allowed_formats\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":[]},\\\"default_content_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":{}}},\\\"indexes\\\":[{\\\"name\\\":\\\"zones_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"zones_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"zones_parent_id_idx\\\",\\\"columns\\\":[\\\"parent_id\\\"]},{\\\"name\\\":\\\"zones_property_id_idx\\\",\\\"columns\\\":[\\\"property_id\\\"]}],\\\"version\\\":\\\"907163cb\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-properties\\\"},\\\"@happyvertical/smrt-properties:Property\\\":{\\\"name\\\":\\\"property\\\",\\\"className\\\":\\\"Property\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-properties:Property\\\",\\\"collection\\\":\\\"properties\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/properties/src/models/Property.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-properties\\\",\\\"fields\\\":{\\\"created_at\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false},\\\"updated_at\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false},\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"name\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"domain\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"url\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"description\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"repositoryId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"required\\\":false,\\\"related\\\":\\\"@happyvertical/smrt-projects:Repository\\\"},\\\"ownerId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"required\\\":false,\\\"related\\\":\\\"@happyvertical/smrt-profiles:Profile\\\"},\\\"status\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"active\\\",\\\"enum\\\":[\\\"active\\\",\\\"inactive\\\",\\\"pending\\\"]},\\\"metadata\\\":{\\\"type\\\":\\\"json\\\",\\\"required\\\":false,\\\"default\\\":{}}},\\\"methods\\\":{\\\"getZones\\\":{\\\"name\\\":\\\"getZones\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getZoneTree\\\":{\\\"name\\\":\\\"getZoneTree\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"createZone\\\":{\\\"name\\\":\\\"createZone\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"options\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":false,\\\"typeUnresolved\\\":true}],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"isActive\\\":{\\\"name\\\":\\\"isActive\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"summarize\\\":{\\\"name\\\":\\\"summarize\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<string>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableStrategy\\\":\\\"sti\\\",\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\"]},\\\"cli\\\":{\\\"skipApiCheck\\\":true},\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"Property\\\",\\\"collectionExportName\\\":\\\"PropertyCollection\\\",\\\"displayLabelField\\\":\\\"name\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"properties\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"properties\\\\\\\" (\\\\n \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"_meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"_meta_data\\\\\\\" JSON,\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"domain\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"url\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"description\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"repository_id\\\\\\\" UUID,\\\\n \\\\\\\"owner_id\\\\\\\" UUID,\\\\n \\\\\\\"status\\\\\\\" TEXT DEFAULT 'active',\\\\n \\\\\\\"metadata\\\\\\\" JSON DEFAULT '{}'\\\\n);\\\",\\\"columns\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"_meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"_meta_data\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"domain\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"url\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"repository_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false},\\\"owner_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"active\\\"},\\\"metadata\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"default\\\":{}}},\\\"indexes\\\":[{\\\"name\\\":\\\"properties_slug_context_meta_type_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"properties_meta_type_idx\\\",\\\"columns\\\":[\\\"_meta_type\\\"]},{\\\"name\\\":\\\"properties_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"properties_repository_id_idx\\\",\\\"columns\\\":[\\\"repository_id\\\"]},{\\\"name\\\":\\\"properties_owner_id_idx\\\",\\\"columns\\\":[\\\"owner_id\\\"]}],\\\"version\\\":\\\"5300aec9\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-properties\\\"},\\\"@happyvertical/smrt-properties:Zone\\\":{\\\"name\\\":\\\"zone\\\",\\\"className\\\":\\\"Zone\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-properties:Zone\\\",\\\"collection\\\":\\\"zones\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/properties/src/models/Zone.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-properties\\\",\\\"fields\\\":{\\\"parentId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":false,\\\"related\\\":\\\"Zone\\\",\\\"_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}}},\\\"propertyId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":false,\\\"related\\\":\\\"Property\\\"},\\\"name\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"type\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"path\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"selector\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"position\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"width\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":false},\\\"height\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":false},\\\"allowedFormats\\\":{\\\"type\\\":\\\"json\\\",\\\"required\\\":false,\\\"default\\\":[]},\\\"defaultContentId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"json\\\",\\\"required\\\":false,\\\"default\\\":{}}},\\\"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},\\\"isTopLevel\\\":{\\\"name\\\":\\\"isTopLevel\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"hasDimensions\\\":{\\\"name\\\":\\\"hasDimensions\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getDimensionString\\\":{\\\"name\\\":\\\"getDimensionString\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"string | null\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getProperty\\\":{\\\"name\\\":\\\"getProperty\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getFullPath\\\":{\\\"name\\\":\\\"getFullPath\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<string>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getDepth\\\":{\\\"name\\\":\\\"getDepth\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<number>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"createChild\\\":{\\\"name\\\":\\\"createChild\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"options\\\",\\\"type\\\":\\\"Omit<ZoneOptions, 'propertyId' | 'parentId'>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"toTreeNode\\\":{\\\"name\\\":\\\"toTreeNode\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<ZoneTreeNode<Zone>>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"isFormatAllowed\\\":{\\\"name\\\":\\\"isFormatAllowed\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"format\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\"]},\\\"cli\\\":{\\\"skipApiCheck\\\":true},\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtHierarchical\\\",\\\"exportName\\\":\\\"Zone\\\",\\\"collectionExportName\\\":\\\"ZoneCollection\\\",\\\"displayLabelField\\\":\\\"name\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"zones\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"zones\\\\\\\" (\\\\n \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\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 \\\\\\\"parent_id\\\\\\\" UUID,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"property_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"type\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"path\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"selector\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"position\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"width\\\\\\\" INTEGER,\\\\n \\\\\\\"height\\\\\\\" INTEGER,\\\\n \\\\\\\"allowed_formats\\\\\\\" JSON DEFAULT '[]',\\\\n \\\\\\\"default_content_id\\\\\\\" TEXT,\\\\n \\\\\\\"metadata\\\\\\\" JSON DEFAULT '{}'\\\\n);\\\",\\\"columns\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"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\\\"},\\\"parent_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"zones\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"property_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"properties\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"path\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"selector\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"position\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"width\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"height\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"allowed_formats\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":[]},\\\"default_content_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":{}}},\\\"indexes\\\":[{\\\"name\\\":\\\"zones_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"zones_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"zones_parent_id_idx\\\",\\\"columns\\\":[\\\"parent_id\\\"]},{\\\"name\\\":\\\"zones_property_id_idx\\\",\\\"columns\\\":[\\\"property_id\\\"]}],\\\"version\\\":\\\"907163cb\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-properties\\\"}},\\\"moduleType\\\":\\\"smrt\\\",\\\"smrtDependencies\\\":[\\\"@happyvertical/smrt-core\\\",\\\"@happyvertical/smrt-prompts\\\",\\\"@happyvertical/smrt-tenancy\\\"],\\\"browser\\\":{\\\"status\\\":\\\"server-only\\\",\\\"issues\\\":[\\\"#3624\\\"],\\\"via\\\":[\\\"@happyvertical/smrt-tenancy\\\"]},\\\"stampsConstructors\\\":true}\"));\n","/**\n * Prompt registrations for the @happyvertical/smrt-properties package.\n *\n * Prompts are registered at module-load time via `definePrompt()` so that\n * tenant-aware overrides can be applied at call time via `resolvePrompt()`.\n *\n * Mirrors the pattern used by `@happyvertical/smrt-profiles` (see\n * `prompts.ts`) and `@happyvertical/smrt-content` (see `content-prompts.ts`).\n */\n\nimport { definePrompt } from '@happyvertical/smrt-prompts';\n\n// Property summarization only uses non-PII property fields\n// (name, domain, description, status) plus aggregate zone information.\n// Internal/foreign-key fields like ownerId, repositoryId, tenantId, and the\n// extensible `metadata` blob are intentionally NOT passed to the AI\n// provider — they may link to identifying records or contain analytics IDs\n// and other configuration secrets. If a downstream tenant needs richer\n// context they can override the template via PromptOverride.\nexport const smrtPropertiesSummarizePrompt = definePrompt({\n key: 'smrtProperties.property.summarize',\n template: `Summarize this digital property:\nName: {propertyName}\nDomain: {propertyDomain}\nDescription: {propertyDescription}\nStatus: {propertyStatus}\nTotal zones: {totalZones}\nTop-level zones: {topLevelZones}`,\n ai: { profile: 'good' },\n editable: {\n template: true,\n profile: true,\n model: true,\n params: true,\n },\n});\n\n/**\n * Canonical helper lives in `@happyvertical/smrt-prompts` (#4751): it also\n * forwards the resolution's `usageTags` (`promptKey`, `promptLayer`,\n * `templateHash`). Re-exported here for existing importers.\n */\nexport { promptMessageOptions } from '@happyvertical/smrt-prompts';\n","/**\n * Property model - Digital property representation\n *\n * Represents a digital property (website, app, publication) that can contain\n * hierarchical zones for content/ad placement.\n */\n\nimport { crossPackageRef, SmrtObject, smrt } from '@happyvertical/smrt-core';\nimport { resolvePrompt } from '@happyvertical/smrt-prompts';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport {\n promptMessageOptions,\n smrtPropertiesSummarizePrompt,\n} from '../prompts';\nimport type { PropertyOptions, PropertyStatus } from '../types';\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableStrategy: 'sti',\n api: { include: ['list', 'get', 'create', 'update', 'delete'] },\n mcp: { include: ['list', 'get', 'create'] },\n cli: { skipApiCheck: true },\n})\nexport class Property extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-properties\";\n /**\n * Tenant ID for multi-tenant isolation\n */\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n /**\n * Display name of the property\n */\n name: string = '';\n\n /**\n * Domain name (e.g., \"oakcreeknews.com\")\n */\n domain: string = '';\n\n /**\n * Full URL (e.g., \"https://oakcreeknews.com\")\n */\n url: string = '';\n\n /**\n * Property description\n */\n description: string = '';\n\n /**\n * Link to Repository (from smrt-projects)\n * Optional - used when property is backed by a git repository\n */\n @crossPackageRef('@happyvertical/smrt-projects:Repository')\n repositoryId: string | null = null;\n\n /**\n * Link to Profile (from smrt-profiles)\n * Optional - owner/publisher of the property\n */\n @crossPackageRef('@happyvertical/smrt-profiles:Profile')\n ownerId: string | null = null;\n\n /**\n * Property status\n */\n status: PropertyStatus = 'active';\n\n /**\n * Extensible metadata (analytics IDs, config, etc.)\n */\n metadata: Record<string, unknown> = {};\n\n constructor(options: PropertyOptions = {}) {\n super(options);\n if (options.tenantId !== undefined) this.tenantId = options.tenantId;\n if (options.name !== undefined) this.name = options.name;\n if (options.domain !== undefined) this.domain = options.domain;\n if (options.url !== undefined) this.url = options.url;\n if (options.description !== undefined)\n this.description = options.description;\n if (options.repositoryId !== undefined)\n this.repositoryId = options.repositoryId;\n if (options.ownerId !== undefined) this.ownerId = options.ownerId;\n if (options.status !== undefined) this.status = options.status;\n if (options.metadata !== undefined) this.metadata = options.metadata;\n }\n\n /**\n * Get all zones for this property\n */\n async getZones(): Promise<import('./Zone').Zone[]> {\n if (!this.id) return [];\n const { ZoneCollection } = await import('../collections/Zones');\n const collection = await ZoneCollection.create(this.options);\n return await collection.findByProperty(this.id);\n }\n\n /**\n * Get zone tree for this property\n */\n async getZoneTree(): Promise<\n import('../types').ZoneTree<import('./Zone').Zone>\n > {\n if (!this.id) return { propertyId: '', roots: [] };\n const { ZoneCollection } = await import('../collections/Zones');\n const collection = await ZoneCollection.create(this.options);\n return await collection.getTree(this.id);\n }\n\n /**\n * Create a zone on this property\n */\n async createZone(\n options: Omit<import('../types').ZoneOptions, 'propertyId'>,\n ): Promise<import('./Zone').Zone> {\n if (!this.id) {\n throw new Error('Property must be saved before creating zones');\n }\n const { ZoneCollection } = await import('../collections/Zones');\n const collection = await ZoneCollection.create(this.options);\n const zone = await collection.create({\n ...options,\n propertyId: this.id,\n });\n await zone.save();\n return zone;\n }\n\n /**\n * Check if property is active\n */\n isActive(): boolean {\n return this.status === 'active';\n }\n\n /**\n * AI-powered: Generate a summary of the property and its zones.\n *\n * Uses the `smrtProperties.property.summarize` prompt registered via\n * `@happyvertical/smrt-prompts`, allowing tenant- or instance-level\n * overrides of the template, model, and parameters at runtime.\n *\n * Only non-PII fields (name, domain, description, status) plus aggregate\n * zone information are sent to the AI provider. Internal foreign-key\n * fields and the extensible `metadata` blob are intentionally excluded.\n *\n * @returns Generated summary text\n */\n async summarize(): Promise<string> {\n const zones = await this.getZones();\n const topLevelZones = zones.filter((z) => z.parentId === null);\n\n // Resolve `db` from either the canonical `db` option or its `persistence`\n // alias. SmrtClass maps `persistence → db` lazily during `initialize()`,\n // so on a freshly-constructed Property that has not yet been initialized,\n // `this.options.db` may be undefined while `this.options.persistence` is\n // set. Falling back here ensures stored app- and tenant-level prompt\n // overrides in `_smrt_prompt_overrides` are honored on the first call —\n // before `getAiClient()` triggers full initialization further below.\n const db = this.options.db ?? this.options.persistence;\n\n const resolvedPrompt = await resolvePrompt(\n smrtPropertiesSummarizePrompt.key,\n {\n db,\n tenantId: this.tenantId,\n variables: {\n propertyName: this.name || '',\n propertyDomain: this.domain || '',\n propertyDescription: this.description || '',\n propertyStatus: this.status || '',\n totalZones: String(zones.length),\n topLevelZones: topLevelZones.map((z) => z.name).join(', '),\n },\n },\n );\n\n // A tier profile (#4750) selects the tier client and tags the usage row.\n const { ai, aiOptions } = await this.prepareAiOperation(\n promptMessageOptions(resolvedPrompt.ai),\n );\n const response = await ai.message(resolvedPrompt.text, aiOptions);\n\n return response.trim();\n }\n}\n","/**\n * PropertyCollection - Collection manager for Property objects\n *\n * Provides querying and management operations for Property entities.\n */\n\nimport { SmrtCollection } from '@happyvertical/smrt-core';\nimport { queryGlobal, queryWithGlobals } from '@happyvertical/smrt-tenancy';\nimport { Property } from '../models/Property';\nimport type { PropertyStatus } from '../types';\n\nexport class PropertyCollection extends SmrtCollection<Property> {\n static readonly _itemClass = Property;\n\n /**\n * Find a property by domain\n *\n * @param domain - Domain name\n * @returns Property or null\n */\n async findByDomain(domain: string): Promise<Property | null> {\n const results = await this.list({\n where: { domain },\n limit: 1,\n });\n return results[0] || null;\n }\n\n /**\n * Find properties by repository ID\n *\n * @param repositoryId - Repository ID\n * @returns Array of properties\n */\n async findByRepository(repositoryId: string): Promise<Property[]> {\n return await this.list({\n where: { repositoryId },\n });\n }\n\n /**\n * Find properties by owner ID\n *\n * @param ownerId - Owner profile ID\n * @returns Array of properties\n */\n async findByOwner(ownerId: string): Promise<Property[]> {\n return await this.list({\n where: { ownerId },\n });\n }\n\n /**\n * Find active properties\n *\n * @returns Array of active properties\n */\n async findActive(): Promise<Property[]> {\n return await this.list({\n where: { status: 'active' as PropertyStatus },\n });\n }\n\n /**\n * Find properties by status\n *\n * @param status - Property status\n * @returns Array of properties with the given status\n */\n async findByStatus(status: PropertyStatus): Promise<Property[]> {\n return await this.list({\n where: { status },\n });\n }\n\n /**\n * Get or create a property by domain\n *\n * @param domain - Domain name\n * @param defaults - Default values for creation\n * @returns Property (existing or newly created)\n */\n async getOrCreateByDomain(\n domain: string,\n defaults: {\n name?: string;\n url?: string;\n repositoryId?: string | null;\n ownerId?: string | null;\n } = {},\n ): Promise<Property> {\n let property = await this.findByDomain(domain);\n\n if (!property) {\n property = await this.create({\n domain,\n name: defaults.name || domain,\n url: defaults.url || `https://${domain}`,\n repositoryId: defaults.repositoryId ?? null,\n ownerId: defaults.ownerId ?? null,\n status: 'active',\n });\n await property.save();\n }\n\n return property;\n }\n\n /**\n * Count properties by status\n *\n * @returns Object with counts per status\n */\n async countByStatus(): Promise<Record<PropertyStatus, number>> {\n const all = await this.list({});\n const counts: Record<PropertyStatus, number> = {\n active: 0,\n inactive: 0,\n pending: 0,\n };\n\n for (const prop of all) {\n counts[prop.status]++;\n }\n\n return counts;\n }\n\n // ============================================\n // Tenant Helper Methods\n // ============================================\n\n /**\n * Find properties belonging to a specific tenant\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of properties for the tenant\n */\n async findByTenant(tenantId: string): Promise<Property[]> {\n return this.list({ where: { tenantId } });\n }\n\n /**\n * Find all global properties (no tenant association).\n *\n * Routes through the shared tenant-global helper so it does not throw under\n * an active tenant context (an explicit `tenant_id IS NULL` filter would be\n * flagged as an isolation violation). (#1600)\n *\n * @returns Array of global properties\n */\n async findGlobal(): Promise<Property[]> {\n return queryGlobal<Property>(this);\n }\n\n /**\n * Find properties for a tenant plus all global properties.\n *\n * Fails closed if an active tenant context requests a different tenant's\n * rows; the admin/system path keeps the cross-tenant capability. (#1600)\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of tenant-specific and global properties\n */\n async findWithGlobals(tenantId: string): Promise<Property[]> {\n return queryWithGlobals<Property>(\n this,\n tenantId,\n 'Property.findWithGlobals',\n );\n }\n}\n","/**\n * Zone model - Hierarchical placement area within a property\n *\n * Zones represent pages, sections, or slots within a digital property.\n * They can be nested arbitrarily using the parentId self-reference.\n */\n\nimport { foreignKey, SmrtHierarchical, smrt } from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport type { ZoneOptions, ZoneTreeNode } from '../types';\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n api: { include: ['list', 'get', 'create', 'update', 'delete'] },\n mcp: { include: ['list', 'get', 'create'] },\n cli: { skipApiCheck: true },\n})\nexport class Zone extends SmrtHierarchical { static __smrtPackage__ = \"@happyvertical/smrt-properties\";\n /**\n * Tenant ID for multi-tenant isolation\n */\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n /**\n * Parent property ID (required)\n */\n @foreignKey('Property')\n propertyId: string = '';\n\n // parentId inherited from SmrtHierarchical (null = top-level zone)\n\n /**\n * Display name\n */\n name: string = '';\n\n /**\n * Zone type (descriptive, not structural)\n * Common values: \"page\", \"section\", \"slot\", \"container\", \"widget\"\n */\n type: string = '';\n\n /**\n * URL path pattern (e.g., \"/\", \"/articles/*\")\n */\n path: string = '';\n\n /**\n * CSS selector for placement (e.g., \"#header\", \".sidebar\")\n */\n selector: string = '';\n\n /**\n * Position hint (e.g., \"top\", \"after-paragraph-3\")\n */\n position: string = '';\n\n /**\n * Width in pixels (null = fluid)\n */\n width: number | null = null;\n\n /**\n * Height in pixels (null = fluid)\n */\n height: number | null = null;\n\n /**\n * Allowed content/ad formats\n */\n allowedFormats: string[] = [];\n\n /**\n * Default content/asset ID for fallback\n */\n defaultContentId: string | null = null;\n\n /**\n * Extensible metadata\n */\n metadata: Record<string, unknown> = {};\n\n constructor(options: ZoneOptions = {}) {\n super(options);\n if (options.tenantId !== undefined) this.tenantId = options.tenantId;\n if (options.propertyId !== undefined) this.propertyId = options.propertyId;\n if (options.parentId !== undefined) this.parentId = options.parentId;\n if (options.name !== undefined) this.name = options.name;\n if (options.type !== undefined) this.type = options.type;\n if (options.path !== undefined) this.path = options.path;\n if (options.selector !== undefined) this.selector = options.selector;\n if (options.position !== undefined) this.position = options.position;\n if (options.width !== undefined) this.width = options.width;\n if (options.height !== undefined) this.height = options.height;\n if (options.allowedFormats !== undefined)\n this.allowedFormats = options.allowedFormats;\n if (options.defaultContentId !== undefined)\n this.defaultContentId = options.defaultContentId;\n if (options.metadata !== undefined) this.metadata = options.metadata;\n }\n\n /**\n * Check if this is a top-level zone (no parent)\n */\n isTopLevel(): boolean {\n return this.parentId === null;\n }\n\n /**\n * Check if this zone has dimensions set\n */\n hasDimensions(): boolean {\n return this.width !== null && this.height !== null;\n }\n\n /**\n * Get dimensions as string (e.g., \"728x90\")\n */\n getDimensionString(): string | null {\n if (!this.hasDimensions()) return null;\n return `${this.width}x${this.height}`;\n }\n\n /**\n * Get the parent property\n */\n async getProperty(): Promise<import('./Property').Property | null> {\n const { PropertyCollection } = await import('../collections/Properties');\n const collection = await PropertyCollection.create(this.options);\n return await collection.get({ id: this.propertyId });\n }\n\n // Hierarchy traversal (getParent / getChildren / getAncestors /\n // getDescendants / getHierarchy / moveTo) provided by SmrtHierarchical.\n // The collection-level depth cache in `ZoneCollection.getAncestors` /\n // `getDescendants` remains available for callers that go through the\n // collection — the base-class methods do their own batched queries.\n\n /**\n * Get the full path from root to this zone\n */\n async getFullPath(): Promise<string> {\n const ancestors = await this.getAncestors();\n const names = [...ancestors.map((z) => z.name), this.name];\n return names.join(' > ');\n }\n\n /**\n * Get the depth in the hierarchy (0 = top-level)\n */\n async getDepth(): Promise<number> {\n const ancestors = await this.getAncestors();\n return ancestors.length;\n }\n\n /**\n * Create a child zone under this zone\n */\n async createChild(\n options: Omit<ZoneOptions, 'propertyId' | 'parentId'>,\n ): Promise<Zone> {\n if (!this.id) {\n throw new Error('Zone must be saved before creating children');\n }\n const { ZoneCollection } = await import('../collections/Zones');\n const collection = await ZoneCollection.create(this.options);\n const zone = await collection.create({\n ...options,\n propertyId: this.propertyId,\n parentId: this.id,\n });\n await zone.save();\n return zone;\n }\n\n /**\n * Build tree node for this zone and its children\n */\n async toTreeNode(): Promise<ZoneTreeNode<Zone>> {\n const children = await this.getChildren();\n const childNodes = await Promise.all(children.map((c) => c.toTreeNode()));\n return {\n zone: this,\n children: childNodes,\n };\n }\n\n /**\n * Check if a format is allowed in this zone\n */\n isFormatAllowed(format: string): boolean {\n if (this.allowedFormats.length === 0) return true; // No restrictions\n return this.allowedFormats.includes(format);\n }\n}\n","/**\n * ZoneCollection - Collection manager for Zone objects\n *\n * Provides querying and tree operations for Zone entities.\n */\n\nimport { SmrtCollection } from '@happyvertical/smrt-core';\nimport { queryGlobal, queryWithGlobals } from '@happyvertical/smrt-tenancy';\nimport { Zone } from '../models/Zone';\nimport type { ZoneTree, ZoneTreeNode } from '../types';\n\nexport class ZoneCollection extends SmrtCollection<Zone> {\n static readonly _itemClass = Zone;\n\n /**\n * Find all zones for a property\n *\n * @param propertyId - Property ID\n * @returns Array of zones\n */\n async findByProperty(propertyId: string): Promise<Zone[]> {\n return await this.list({\n where: { propertyId },\n });\n }\n\n /**\n * Find top-level zones for a property (no parent)\n *\n * @param propertyId - Property ID\n * @returns Array of top-level zones\n */\n async findTopLevel(propertyId: string): Promise<Zone[]> {\n return await this.list({\n where: { propertyId, parentId: null },\n });\n }\n\n /**\n * Find direct children of a zone\n *\n * @param parentId - Parent zone ID\n * @returns Array of child zones\n */\n async findChildren(parentId: string): Promise<Zone[]> {\n return await this.list({\n where: { parentId },\n });\n }\n\n /**\n * Find zones by path pattern\n *\n * @param propertyId - Property ID\n * @param path - URL path to match\n * @returns Array of matching zones\n */\n async findByPath(propertyId: string, path: string): Promise<Zone[]> {\n return await this.list({\n where: { propertyId, path },\n });\n }\n\n /**\n * Find zones by type\n *\n * @param propertyId - Property ID\n * @param type - Zone type\n * @returns Array of zones of the given type\n */\n async findByType(propertyId: string, type: string): Promise<Zone[]> {\n return await this.list({\n where: { propertyId, type },\n });\n }\n\n /**\n * Get the complete zone tree for a property\n *\n * @param propertyId - Property ID\n * @returns ZoneTree structure\n */\n async getTree(propertyId: string): Promise<ZoneTree<Zone>> {\n const allZones = await this.findByProperty(propertyId);\n const zoneMap = new Map<string, Zone>();\n const childrenMap = new Map<string, Zone[]>();\n\n // Build lookup maps\n for (const zone of allZones) {\n if (zone.id) {\n zoneMap.set(zone.id, zone);\n }\n if (!childrenMap.has(zone.parentId || '')) {\n childrenMap.set(zone.parentId || '', []);\n }\n childrenMap.get(zone.parentId || '')?.push(zone);\n }\n\n // Build tree nodes recursively\n const buildNode = (zone: Zone): ZoneTreeNode<Zone> => {\n const children = (zone.id ? childrenMap.get(zone.id) : []) || [];\n return {\n zone,\n children: children.map(buildNode),\n };\n };\n\n // Get root nodes (no parent)\n const roots = childrenMap.get('') || [];\n\n return {\n propertyId,\n roots: roots.map(buildNode),\n };\n }\n\n /**\n * Get all ancestors of a zone (path to root)\n *\n * @param zoneId - Zone ID\n * @returns Array of ancestors (from root to parent)\n */\n async getAncestors(zoneId: string): Promise<Zone[]> {\n const ancestors: Zone[] = [];\n\n // Get the starting zone\n const startZone = await this.get({ id: zoneId });\n if (!startZone) return ancestors;\n\n let currentId: string | null = startZone.parentId;\n\n // Walk up the tree\n while (currentId) {\n const parent = await this.get({ id: currentId });\n if (!parent) break;\n ancestors.unshift(parent); // Add to front (root first)\n currentId = parent.parentId;\n }\n\n return ancestors;\n }\n\n /**\n * Get all descendants of a zone recursively\n *\n * @param zoneId - Zone ID\n * @returns Array of all descendant zones\n */\n async getDescendants(zoneId: string): Promise<Zone[]> {\n const descendants: Zone[] = [];\n const queue: string[] = [zoneId];\n\n while (queue.length > 0) {\n const currentId = queue.shift();\n if (!currentId) continue;\n\n const children = await this.findChildren(currentId);\n\n for (const child of children) {\n descendants.push(child);\n if (child.id) {\n queue.push(child.id);\n }\n }\n }\n\n return descendants;\n }\n\n /**\n * Get the depth of the deepest zone in a property\n *\n * @param propertyId - Property ID\n * @returns Maximum depth (0 = only top-level zones)\n */\n async getMaxDepth(propertyId: string): Promise<number> {\n const allZones = await this.findByProperty(propertyId);\n\n // Build a lookup map for efficient in-memory traversal\n const zonesById = new Map<string, Zone>();\n for (const zone of allZones) {\n if (zone.id) {\n zonesById.set(zone.id, zone);\n }\n }\n\n // Cache computed depths\n const depthCache = new Map<string, number>();\n\n const getDepth = (zone: Zone): number => {\n if (!zone.id) return 0;\n\n const cached = depthCache.get(zone.id);\n if (cached !== undefined) return cached;\n\n let depth = 0;\n let current: Zone | undefined = zone;\n const visited = new Set<string>();\n\n // Walk up the parent chain using in-memory lookup\n while (current?.id) {\n const parentId = current.parentId;\n if (!parentId) break;\n\n // Prevent infinite loops from cyclic data\n if (visited.has(parentId)) break;\n visited.add(parentId);\n\n const parent = zonesById.get(parentId);\n if (!parent) break;\n\n depth += 1;\n current = parent;\n }\n\n depthCache.set(zone.id, depth);\n return depth;\n };\n\n let maxDepth = 0;\n for (const zone of allZones) {\n maxDepth = Math.max(maxDepth, getDepth(zone));\n }\n\n return maxDepth;\n }\n\n /**\n * Find zones with specific dimensions\n *\n * @param propertyId - Property ID\n * @param width - Required width\n * @param height - Required height\n * @returns Array of matching zones\n */\n async findByDimensions(\n propertyId: string,\n width: number,\n height: number,\n ): Promise<Zone[]> {\n return await this.list({\n where: { propertyId, width, height },\n });\n }\n\n /**\n * Find zones that allow a specific format\n *\n * @param propertyId - Property ID\n * @param format - Format to check\n * @returns Array of zones allowing the format\n */\n async findByAllowedFormat(\n propertyId: string,\n format: string,\n ): Promise<Zone[]> {\n const allZones = await this.findByProperty(propertyId);\n return allZones.filter((zone) => zone.isFormatAllowed(format));\n }\n\n /**\n * Move a zone to a new parent\n *\n * @param zoneId - Zone ID to move\n * @param newParentId - New parent ID (null for top-level)\n * @returns Updated zone\n */\n async moveZone(\n zoneId: string,\n newParentId: string | null,\n ): Promise<Zone | null> {\n const zone = await this.get({ id: zoneId });\n if (!zone) return null;\n\n // Prevent circular references\n if (newParentId) {\n const descendants = await this.getDescendants(zoneId);\n const descendantIds = descendants.map((d) => d.id);\n if (descendantIds.includes(newParentId)) {\n throw new Error('Cannot move zone into one of its descendants');\n }\n }\n\n zone.parentId = newParentId;\n await zone.save();\n return zone;\n }\n\n /**\n * Delete a zone and optionally its descendants\n *\n * @param zoneId - Zone ID to delete\n * @param cascade - Whether to delete descendants\n * @returns Number of zones deleted\n */\n async deleteZone(zoneId: string, cascade: boolean = false): Promise<number> {\n const zone = await this.get({ id: zoneId });\n if (!zone) return 0;\n\n let deleted = 0;\n\n if (cascade) {\n const descendants = await this.getDescendants(zoneId);\n for (const desc of descendants) {\n await desc.delete();\n deleted++;\n }\n } else {\n // Move children to parent\n const children = await this.findChildren(zoneId);\n for (const child of children) {\n child.parentId = zone.parentId;\n await child.save();\n }\n }\n\n await zone.delete();\n deleted++;\n\n return deleted;\n }\n\n // ============================================\n // Tenant Helper Methods\n // ============================================\n\n /**\n * Find zones belonging to a specific tenant\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of zones for the tenant\n */\n async findByTenant(tenantId: string): Promise<Zone[]> {\n return this.list({ where: { tenantId } });\n }\n\n /**\n * Find all global zones (no tenant association).\n *\n * Routes through the shared tenant-global helper so it does not throw under\n * an active tenant context (an explicit `tenant_id IS NULL` filter would be\n * flagged as an isolation violation). (#1600)\n *\n * @returns Array of global zones\n */\n async findGlobal(): Promise<Zone[]> {\n return queryGlobal<Zone>(this);\n }\n\n /**\n * Find zones for a tenant plus all global zones.\n *\n * Fails closed if an active tenant context requests a different tenant's\n * rows; the admin/system path keeps the cross-tenant capability. (#1600)\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of tenant-specific and global zones\n */\n async findWithGlobals(tenantId: string): Promise<Zone[]> {\n return queryWithGlobals<Zone>(this, tenantId, 'Zone.findWithGlobals');\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAOA,eAAe,wBAAwB,KAAK,MAAM,ivtBAAq8zB,CAAC;;;ACYj/zB,IAAM,gCAAgC,aAAa;CACxD,KAAK;CACL,UAAU;;;;;;;CAOV,IAAI,EAAE,SAAS,OAAO;CACtB,UAAU;EACR,UAAU;EACV,SAAS;EACT,OAAO;EACP,QAAQ;CACV;AACF,CAAC;;;;;;;;;;;;;;;;;;ACZM,IAAM,WAAN,cAAuB,WAAW;CAKvC,WAA0B;;;;CAK1B,OAAe;;;;CAKf,SAAiB;;;;CAKjB,MAAc;;;;CAKd,cAAsB;CAOtB,eAA8B;CAO9B,UAAyB;;;;CAKzB,SAAyB;;;;CAKzB,WAAoC,CAAC;CAErC,YAAY,UAA2B,CAAC,GAAG;EACzC,MAAM,OAAO;EACb,IAAI,QAAQ,aAAa,KAAA,GAAW,KAAK,WAAW,QAAQ;EAC5D,IAAI,QAAQ,SAAS,KAAA,GAAW,KAAK,OAAO,QAAQ;EACpD,IAAI,QAAQ,WAAW,KAAA,GAAW,KAAK,SAAS,QAAQ;EACxD,IAAI,QAAQ,QAAQ,KAAA,GAAW,KAAK,MAAM,QAAQ;EAClD,IAAI,QAAQ,gBAAgB,KAAA,GAC1B,KAAK,cAAc,QAAQ;EAC7B,IAAI,QAAQ,iBAAiB,KAAA,GAC3B,KAAK,eAAe,QAAQ;EAC9B,IAAI,QAAQ,YAAY,KAAA,GAAW,KAAK,UAAU,QAAQ;EAC1D,IAAI,QAAQ,WAAW,KAAA,GAAW,KAAK,SAAS,QAAQ;EACxD,IAAI,QAAQ,aAAa,KAAA,GAAW,KAAK,WAAW,QAAQ;CAC9D;;;;CAKA,MAAM,WAA6C;EACjD,IAAI,CAAC,KAAK,IAAI,OAAO,CAAC;EACtB,MAAM,EAA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AC5B,MAAM,WAAW,KAAK;IACtB,MAAM,MAAM,KAAK;GACnB;EACF;EAEA,MAAM,KAAK,OAAO;EAClB;EAEA,OAAO;CACT;;;;;;;CAYA,MAAM,aAAa,UAAmC;EACpD,OAAO,KAAK,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;CAC1C;;;;;;;;;;CAWA,MAAM,aAA8B;EAClC,OAAO,YAAkB,IAAI;CAC/B;;;;;;;;;;CAWA,MAAM,gBAAgB,UAAmC;EACvD,OAAO,iBAAuB,MAAM,UAAU,sBAAsB;CACtE;AACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/__smrt-register__.ts","../src/prompts.ts","../src/models/Property.ts","../src/collections/Properties.ts","../src/models/Zone.ts","../src/collections/Zones.ts"],"sourcesContent":["// Generated by @happyvertical/smrt-core smrtPlugin at library build time.\n// The package manifest is inlined so self-registration cannot miss when a\n// downstream bundler relocates this module away from dist/manifest.json\n// (https://github.com/happyvertical/smrt/issues/1506,\n// https://github.com/happyvertical/smrt/issues/1507).\nimport { ObjectRegistry } from '@happyvertical/smrt-core';\n\nObjectRegistry.registerPackageManifest(JSON.parse(\"{\\\"version\\\":\\\"1.0.0\\\",\\\"timestamp\\\":0,\\\"packageName\\\":\\\"@happyvertical/smrt-properties\\\",\\\"packageVersion\\\":\\\"0.61.4\\\",\\\"objects\\\":{\\\"@happyvertical/smrt-properties:PropertyCollection\\\":{\\\"name\\\":\\\"propertycollection\\\",\\\"className\\\":\\\"PropertyCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-properties:PropertyCollection\\\",\\\"collection\\\":\\\"properties\\\",\\\"filePath\\\":\\\"src/collections/Properties.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-properties\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"findByDomain\\\":{\\\"name\\\":\\\"findByDomain\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"domain\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Property | null>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByRepository\\\":{\\\"name\\\":\\\"findByRepository\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"repositoryId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Property[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByOwner\\\":{\\\"name\\\":\\\"findByOwner\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"ownerId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Property[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findActive\\\":{\\\"name\\\":\\\"findActive\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<Property[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByStatus\\\":{\\\"name\\\":\\\"findByStatus\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"status\\\",\\\"type\\\":\\\"PropertyStatus\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Property[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getOrCreateByDomain\\\":{\\\"name\\\":\\\"getOrCreateByDomain\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"domain\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"defaults\\\",\\\"type\\\":\\\"object\\\",\\\"optional\\\":true,\\\"memberTypes\\\":[\\\"string\\\",\\\"string | null\\\"]}],\\\"returnType\\\":\\\"Promise<Property>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"countByStatus\\\":{\\\"name\\\":\\\"countByStatus\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<Record<PropertyStatus, number>>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByTenant\\\":{\\\"name\\\":\\\"findByTenant\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Property[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findGlobal\\\":{\\\"name\\\":\\\"findGlobal\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<Property[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findWithGlobals\\\":{\\\"name\\\":\\\"findWithGlobals\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Property[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\"]}},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"Property\\\",\\\"exportName\\\":\\\"PropertyCollection\\\",\\\"collectionExportName\\\":\\\"PropertyCollectionCollection\\\",\\\"collectionOf\\\":\\\"@happyvertical/smrt-properties:Property\\\",\\\"inheritedExposure\\\":[\\\"api\\\",\\\"mcp\\\"],\\\"schema\\\":{\\\"tableName\\\":\\\"properties\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"properties\\\\\\\" (\\\\n \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"_meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"_meta_data\\\\\\\" JSON,\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"domain\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"url\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"description\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"repository_id\\\\\\\" UUID,\\\\n \\\\\\\"owner_id\\\\\\\" UUID,\\\\n \\\\\\\"status\\\\\\\" TEXT DEFAULT 'active',\\\\n \\\\\\\"metadata\\\\\\\" JSON DEFAULT '{}'\\\\n);\\\",\\\"columns\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"_meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"_meta_data\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"domain\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"url\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"repository_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false},\\\"owner_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"active\\\"},\\\"metadata\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"default\\\":{}}},\\\"indexes\\\":[{\\\"name\\\":\\\"properties_slug_context_meta_type_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"properties_meta_type_idx\\\",\\\"columns\\\":[\\\"_meta_type\\\"]},{\\\"name\\\":\\\"properties_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"properties_repository_id_idx\\\",\\\"columns\\\":[\\\"repository_id\\\"]},{\\\"name\\\":\\\"properties_owner_id_idx\\\",\\\"columns\\\":[\\\"owner_id\\\"]}],\\\"version\\\":\\\"5300aec9\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-properties\\\"},\\\"@happyvertical/smrt-properties:ZoneCollection\\\":{\\\"name\\\":\\\"zonecollection\\\",\\\"className\\\":\\\"ZoneCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-properties:ZoneCollection\\\",\\\"collection\\\":\\\"zones\\\",\\\"filePath\\\":\\\"src/collections/Zones.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-properties\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"findByProperty\\\":{\\\"name\\\":\\\"findByProperty\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"propertyId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findTopLevel\\\":{\\\"name\\\":\\\"findTopLevel\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"propertyId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findChildren\\\":{\\\"name\\\":\\\"findChildren\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"parentId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByPath\\\":{\\\"name\\\":\\\"findByPath\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"propertyId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"path\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByType\\\":{\\\"name\\\":\\\"findByType\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"propertyId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"type\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getTree\\\":{\\\"name\\\":\\\"getTree\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"propertyId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<ZoneTree<Zone>>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getAncestors\\\":{\\\"name\\\":\\\"getAncestors\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"zoneId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getDescendants\\\":{\\\"name\\\":\\\"getDescendants\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"zoneId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getMaxDepth\\\":{\\\"name\\\":\\\"getMaxDepth\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"propertyId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<number>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByDimensions\\\":{\\\"name\\\":\\\"findByDimensions\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"propertyId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"width\\\",\\\"type\\\":\\\"number\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"height\\\",\\\"type\\\":\\\"number\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByAllowedFormat\\\":{\\\"name\\\":\\\"findByAllowedFormat\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"propertyId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"format\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"moveZone\\\":{\\\"name\\\":\\\"moveZone\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"zoneId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"newParentId\\\",\\\"type\\\":\\\"string | null\\\",\\\"optional\\\":false,\\\"unionBranches\\\":[{\\\"type\\\":\\\"string\\\"},{\\\"type\\\":\\\"null\\\"}]}],\\\"returnType\\\":\\\"Promise<Zone | null>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"deleteZone\\\":{\\\"name\\\":\\\"deleteZone\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"zoneId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"cascade\\\",\\\"type\\\":\\\"boolean\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<number>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findByTenant\\\":{\\\"name\\\":\\\"findByTenant\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findGlobal\\\":{\\\"name\\\":\\\"findGlobal\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"findWithGlobals\\\":{\\\"name\\\":\\\"findWithGlobals\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"tenantId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\"]}},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"Zone\\\",\\\"exportName\\\":\\\"ZoneCollection\\\",\\\"collectionExportName\\\":\\\"ZoneCollectionCollection\\\",\\\"collectionOf\\\":\\\"@happyvertical/smrt-properties:Zone\\\",\\\"inheritedExposure\\\":[\\\"api\\\",\\\"mcp\\\"],\\\"schema\\\":{\\\"tableName\\\":\\\"zones\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"zones\\\\\\\" (\\\\n \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\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 \\\\\\\"parent_id\\\\\\\" UUID,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"property_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"type\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"path\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"selector\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"position\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"width\\\\\\\" INTEGER,\\\\n \\\\\\\"height\\\\\\\" INTEGER,\\\\n \\\\\\\"allowed_formats\\\\\\\" JSON DEFAULT '[]',\\\\n \\\\\\\"default_content_id\\\\\\\" TEXT,\\\\n \\\\\\\"metadata\\\\\\\" JSON DEFAULT '{}'\\\\n);\\\",\\\"columns\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"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\\\"},\\\"parent_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"zones\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"property_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"properties\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"path\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"selector\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"position\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"width\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"height\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"allowed_formats\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":[]},\\\"default_content_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":{}}},\\\"indexes\\\":[{\\\"name\\\":\\\"zones_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"zones_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"zones_parent_id_idx\\\",\\\"columns\\\":[\\\"parent_id\\\"]},{\\\"name\\\":\\\"zones_property_id_idx\\\",\\\"columns\\\":[\\\"property_id\\\"]}],\\\"version\\\":\\\"907163cb\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-properties\\\"},\\\"@happyvertical/smrt-properties:Property\\\":{\\\"name\\\":\\\"property\\\",\\\"className\\\":\\\"Property\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-properties:Property\\\",\\\"collection\\\":\\\"properties\\\",\\\"filePath\\\":\\\"src/models/Property.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-properties\\\",\\\"fields\\\":{\\\"created_at\\\":{\\\"type\\\":\\\"datetime\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[]},\\\"required\\\":false},\\\"updated_at\\\":{\\\"type\\\":\\\"datetime\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[]},\\\"required\\\":false},\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"_meta\\\":{\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false},\\\"__statedOptions\\\":[\\\"sqlType\\\",\\\"nullable\\\",\\\"__tenancy\\\",\\\"required\\\"],\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"required\\\":false},\\\"required\\\":false},\\\"name\\\":{\\\"type\\\":\\\"text\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[\\\"default\\\"]},\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"domain\\\":{\\\"type\\\":\\\"text\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[\\\"default\\\"]},\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"url\\\":{\\\"type\\\":\\\"text\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[\\\"default\\\"]},\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"description\\\":{\\\"type\\\":\\\"text\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[\\\"default\\\"]},\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"repositoryId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[\\\"related\\\"]},\\\"required\\\":false,\\\"related\\\":\\\"@happyvertical/smrt-projects:Repository\\\"},\\\"ownerId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[\\\"related\\\"]},\\\"required\\\":false,\\\"related\\\":\\\"@happyvertical/smrt-profiles:Profile\\\"},\\\"status\\\":{\\\"type\\\":\\\"text\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[\\\"default\\\",\\\"enum\\\"]},\\\"required\\\":false,\\\"default\\\":\\\"active\\\",\\\"enum\\\":[\\\"active\\\",\\\"inactive\\\",\\\"pending\\\"]},\\\"metadata\\\":{\\\"type\\\":\\\"json\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[\\\"default\\\"]},\\\"required\\\":false,\\\"default\\\":{}}},\\\"methods\\\":{\\\"getZones\\\":{\\\"name\\\":\\\"getZones\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getZoneTree\\\":{\\\"name\\\":\\\"getZoneTree\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"createZone\\\":{\\\"name\\\":\\\"createZone\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"options\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":false,\\\"typeUnresolved\\\":true}],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"isActive\\\":{\\\"name\\\":\\\"isActive\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"summarize\\\":{\\\"name\\\":\\\"summarize\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<string>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableStrategy\\\":\\\"sti\\\",\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\"]},\\\"cli\\\":{\\\"skipApiCheck\\\":true},\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"Property\\\",\\\"collectionExportName\\\":\\\"PropertyCollection\\\",\\\"displayLabelField\\\":\\\"name\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"properties\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"properties\\\\\\\" (\\\\n \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"_meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"_meta_data\\\\\\\" JSON,\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"domain\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"url\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"description\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"repository_id\\\\\\\" UUID,\\\\n \\\\\\\"owner_id\\\\\\\" UUID,\\\\n \\\\\\\"status\\\\\\\" TEXT DEFAULT 'active',\\\\n \\\\\\\"metadata\\\\\\\" JSON DEFAULT '{}'\\\\n);\\\",\\\"columns\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"_meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"_meta_data\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"domain\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"url\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"\\\"},\\\"repository_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false},\\\"owner_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"default\\\":\\\"active\\\"},\\\"metadata\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"default\\\":{}}},\\\"indexes\\\":[{\\\"name\\\":\\\"properties_slug_context_meta_type_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\",\\\"_meta_type\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"properties_meta_type_idx\\\",\\\"columns\\\":[\\\"_meta_type\\\"]},{\\\"name\\\":\\\"properties_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"properties_repository_id_idx\\\",\\\"columns\\\":[\\\"repository_id\\\"]},{\\\"name\\\":\\\"properties_owner_id_idx\\\",\\\"columns\\\":[\\\"owner_id\\\"]}],\\\"version\\\":\\\"5300aec9\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-properties\\\"},\\\"@happyvertical/smrt-properties:Zone\\\":{\\\"name\\\":\\\"zone\\\",\\\"className\\\":\\\"Zone\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-properties:Zone\\\",\\\"collection\\\":\\\"zones\\\",\\\"filePath\\\":\\\"src/models/Zone.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-properties\\\",\\\"fields\\\":{\\\"parentId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[],\\\"nullable\\\":true},\\\"required\\\":false,\\\"related\\\":\\\"Zone\\\"},\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"_meta\\\":{\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false},\\\"__statedOptions\\\":[\\\"sqlType\\\",\\\"nullable\\\",\\\"__tenancy\\\",\\\"required\\\"],\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"required\\\":false},\\\"required\\\":false},\\\"propertyId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[\\\"related\\\"]},\\\"required\\\":false,\\\"related\\\":\\\"Property\\\"},\\\"name\\\":{\\\"type\\\":\\\"text\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[\\\"default\\\"]},\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"type\\\":{\\\"type\\\":\\\"text\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[\\\"default\\\"]},\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"path\\\":{\\\"type\\\":\\\"text\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[\\\"default\\\"]},\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"selector\\\":{\\\"type\\\":\\\"text\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[\\\"default\\\"]},\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"position\\\":{\\\"type\\\":\\\"text\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[\\\"default\\\"]},\\\"required\\\":false,\\\"default\\\":\\\"\\\"},\\\"width\\\":{\\\"type\\\":\\\"integer\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[]},\\\"required\\\":false},\\\"height\\\":{\\\"type\\\":\\\"integer\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[]},\\\"required\\\":false},\\\"allowedFormats\\\":{\\\"type\\\":\\\"json\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[\\\"default\\\"]},\\\"required\\\":false,\\\"default\\\":[]},\\\"defaultContentId\\\":{\\\"type\\\":\\\"text\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[]},\\\"required\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"json\\\",\\\"_meta\\\":{\\\"__statedOptions\\\":[\\\"default\\\"]},\\\"required\\\":false,\\\"default\\\":{}}},\\\"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},\\\"isTopLevel\\\":{\\\"name\\\":\\\"isTopLevel\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"hasDimensions\\\":{\\\"name\\\":\\\"hasDimensions\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getDimensionString\\\":{\\\"name\\\":\\\"getDimensionString\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"string | null\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getProperty\\\":{\\\"name\\\":\\\"getProperty\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"any\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getFullPath\\\":{\\\"name\\\":\\\"getFullPath\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<string>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"getDepth\\\":{\\\"name\\\":\\\"getDepth\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<number>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"createChild\\\":{\\\"name\\\":\\\"createChild\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"options\\\",\\\"type\\\":\\\"Omit<ZoneOptions, 'propertyId' | 'parentId'>\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Zone>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"toTreeNode\\\":{\\\"name\\\":\\\"toTreeNode\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<ZoneTreeNode<Zone>>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"isFormatAllowed\\\":{\\\"name\\\":\\\"isFormatAllowed\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"format\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\",\\\"update\\\",\\\"delete\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\"]},\\\"cli\\\":{\\\"skipApiCheck\\\":true},\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtHierarchical\\\",\\\"exportName\\\":\\\"Zone\\\",\\\"collectionExportName\\\":\\\"ZoneCollection\\\",\\\"displayLabelField\\\":\\\"name\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"zones\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"zones\\\\\\\" (\\\\n \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\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 \\\\\\\"parent_id\\\\\\\" UUID,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"property_id\\\\\\\" UUID,\\\\n \\\\\\\"name\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"type\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"path\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"selector\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"position\\\\\\\" TEXT DEFAULT '',\\\\n \\\\\\\"width\\\\\\\" INTEGER,\\\\n \\\\\\\"height\\\\\\\" INTEGER,\\\\n \\\\\\\"allowed_formats\\\\\\\" JSON DEFAULT '[]',\\\\n \\\\\\\"default_content_id\\\\\\\" TEXT,\\\\n \\\\\\\"metadata\\\\\\\" JSON DEFAULT '{}'\\\\n);\\\",\\\"columns\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"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\\\"},\\\"parent_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"zones\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"property_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"foreignKey\\\":{\\\"table\\\":\\\"properties\\\",\\\"column\\\":\\\"id\\\",\\\"onDelete\\\":\\\"NO ACTION\\\",\\\"onUpdate\\\":\\\"CASCADE\\\"}},\\\"name\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"path\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"selector\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"position\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":\\\"\\\"},\\\"width\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"height\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"allowed_formats\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":[]},\\\"default_content_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":{}}},\\\"indexes\\\":[{\\\"name\\\":\\\"zones_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"zones_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"zones_parent_id_idx\\\",\\\"columns\\\":[\\\"parent_id\\\"]},{\\\"name\\\":\\\"zones_property_id_idx\\\",\\\"columns\\\":[\\\"property_id\\\"]}],\\\"version\\\":\\\"907163cb\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-properties\\\"}},\\\"moduleType\\\":\\\"smrt\\\",\\\"smrtDependencies\\\":[\\\"@happyvertical/smrt-core\\\",\\\"@happyvertical/smrt-prompts\\\",\\\"@happyvertical/smrt-tenancy\\\"],\\\"browser\\\":{\\\"status\\\":\\\"server-only\\\",\\\"issues\\\":[\\\"#3624\\\"],\\\"via\\\":[\\\"@happyvertical/smrt-tenancy\\\"]},\\\"stampsConstructors\\\":true}\"));\n","/**\n * Prompt registrations for the @happyvertical/smrt-properties package.\n *\n * Prompts are registered at module-load time via `definePrompt()` so that\n * tenant-aware overrides can be applied at call time via `resolvePrompt()`.\n *\n * Mirrors the pattern used by `@happyvertical/smrt-profiles` (see\n * `prompts.ts`) and `@happyvertical/smrt-content` (see `content-prompts.ts`).\n */\n\nimport { definePrompt } from '@happyvertical/smrt-prompts';\n\n// Property summarization only uses non-PII property fields\n// (name, domain, description, status) plus aggregate zone information.\n// Internal/foreign-key fields like ownerId, repositoryId, tenantId, and the\n// extensible `metadata` blob are intentionally NOT passed to the AI\n// provider — they may link to identifying records or contain analytics IDs\n// and other configuration secrets. If a downstream tenant needs richer\n// context they can override the template via PromptOverride.\nexport const smrtPropertiesSummarizePrompt = definePrompt({\n key: 'smrtProperties.property.summarize',\n template: `Summarize this digital property:\nName: {propertyName}\nDomain: {propertyDomain}\nDescription: {propertyDescription}\nStatus: {propertyStatus}\nTotal zones: {totalZones}\nTop-level zones: {topLevelZones}`,\n ai: { profile: 'good' },\n editable: {\n template: true,\n profile: true,\n model: true,\n params: true,\n },\n});\n\n/**\n * Canonical helper lives in `@happyvertical/smrt-prompts` (#4751): it also\n * forwards the resolution's `usageTags` (`promptKey`, `promptLayer`,\n * `templateHash`). Re-exported here for existing importers.\n */\nexport { promptMessageOptions } from '@happyvertical/smrt-prompts';\n","/**\n * Property model - Digital property representation\n *\n * Represents a digital property (website, app, publication) that can contain\n * hierarchical zones for content/ad placement.\n */\n\nimport { crossPackageRef, SmrtObject, smrt } from '@happyvertical/smrt-core';\nimport { resolvePrompt } from '@happyvertical/smrt-prompts';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport {\n promptMessageOptions,\n smrtPropertiesSummarizePrompt,\n} from '../prompts';\nimport type { PropertyOptions, PropertyStatus } from '../types';\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableStrategy: 'sti',\n api: { include: ['list', 'get', 'create', 'update', 'delete'] },\n mcp: { include: ['list', 'get', 'create'] },\n cli: { skipApiCheck: true },\n})\nexport class Property extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-properties\";\n /**\n * Tenant ID for multi-tenant isolation\n */\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n /**\n * Display name of the property\n */\n name: string = '';\n\n /**\n * Domain name (e.g., \"oakcreeknews.com\")\n */\n domain: string = '';\n\n /**\n * Full URL (e.g., \"https://oakcreeknews.com\")\n */\n url: string = '';\n\n /**\n * Property description\n */\n description: string = '';\n\n /**\n * Link to Repository (from smrt-projects)\n * Optional - used when property is backed by a git repository\n */\n @crossPackageRef('@happyvertical/smrt-projects:Repository')\n repositoryId: string | null = null;\n\n /**\n * Link to Profile (from smrt-profiles)\n * Optional - owner/publisher of the property\n */\n @crossPackageRef('@happyvertical/smrt-profiles:Profile')\n ownerId: string | null = null;\n\n /**\n * Property status\n */\n status: PropertyStatus = 'active';\n\n /**\n * Extensible metadata (analytics IDs, config, etc.)\n */\n metadata: Record<string, unknown> = {};\n\n constructor(options: PropertyOptions = {}) {\n super(options);\n if (options.tenantId !== undefined) this.tenantId = options.tenantId;\n if (options.name !== undefined) this.name = options.name;\n if (options.domain !== undefined) this.domain = options.domain;\n if (options.url !== undefined) this.url = options.url;\n if (options.description !== undefined)\n this.description = options.description;\n if (options.repositoryId !== undefined)\n this.repositoryId = options.repositoryId;\n if (options.ownerId !== undefined) this.ownerId = options.ownerId;\n if (options.status !== undefined) this.status = options.status;\n if (options.metadata !== undefined) this.metadata = options.metadata;\n }\n\n /**\n * Get all zones for this property\n */\n async getZones(): Promise<import('./Zone').Zone[]> {\n if (!this.id) return [];\n const { ZoneCollection } = await import('../collections/Zones');\n const collection = await ZoneCollection.create(this.options);\n return await collection.findByProperty(this.id);\n }\n\n /**\n * Get zone tree for this property\n */\n async getZoneTree(): Promise<\n import('../types').ZoneTree<import('./Zone').Zone>\n > {\n if (!this.id) return { propertyId: '', roots: [] };\n const { ZoneCollection } = await import('../collections/Zones');\n const collection = await ZoneCollection.create(this.options);\n return await collection.getTree(this.id);\n }\n\n /**\n * Create a zone on this property\n */\n async createZone(\n options: Omit<import('../types').ZoneOptions, 'propertyId'>,\n ): Promise<import('./Zone').Zone> {\n if (!this.id) {\n throw new Error('Property must be saved before creating zones');\n }\n const { ZoneCollection } = await import('../collections/Zones');\n const collection = await ZoneCollection.create(this.options);\n const zone = await collection.create({\n ...options,\n propertyId: this.id,\n });\n await zone.save();\n return zone;\n }\n\n /**\n * Check if property is active\n */\n isActive(): boolean {\n return this.status === 'active';\n }\n\n /**\n * AI-powered: Generate a summary of the property and its zones.\n *\n * Uses the `smrtProperties.property.summarize` prompt registered via\n * `@happyvertical/smrt-prompts`, allowing tenant- or instance-level\n * overrides of the template, model, and parameters at runtime.\n *\n * Only non-PII fields (name, domain, description, status) plus aggregate\n * zone information are sent to the AI provider. Internal foreign-key\n * fields and the extensible `metadata` blob are intentionally excluded.\n *\n * @returns Generated summary text\n */\n async summarize(): Promise<string> {\n const zones = await this.getZones();\n const topLevelZones = zones.filter((z) => z.parentId === null);\n\n // Resolve `db` from either the canonical `db` option or its `persistence`\n // alias. SmrtClass maps `persistence → db` lazily during `initialize()`,\n // so on a freshly-constructed Property that has not yet been initialized,\n // `this.options.db` may be undefined while `this.options.persistence` is\n // set. Falling back here ensures stored app- and tenant-level prompt\n // overrides in `_smrt_prompt_overrides` are honored on the first call —\n // before `getAiClient()` triggers full initialization further below.\n const db = this.options.db ?? this.options.persistence;\n\n const resolvedPrompt = await resolvePrompt(\n smrtPropertiesSummarizePrompt.key,\n {\n db,\n tenantId: this.tenantId,\n variables: {\n propertyName: this.name || '',\n propertyDomain: this.domain || '',\n propertyDescription: this.description || '',\n propertyStatus: this.status || '',\n totalZones: String(zones.length),\n topLevelZones: topLevelZones.map((z) => z.name).join(', '),\n },\n },\n );\n\n // A tier profile (#4750) selects the tier client and tags the usage row.\n const { ai, aiOptions } = await this.prepareAiOperation(\n promptMessageOptions(resolvedPrompt.ai),\n );\n const response = await ai.message(resolvedPrompt.text, aiOptions);\n\n return response.trim();\n }\n}\n","/**\n * PropertyCollection - Collection manager for Property objects\n *\n * Provides querying and management operations for Property entities.\n */\n\nimport { SmrtCollection } from '@happyvertical/smrt-core';\nimport { queryGlobal, queryWithGlobals } from '@happyvertical/smrt-tenancy';\nimport { Property } from '../models/Property';\nimport type { PropertyStatus } from '../types';\n\nexport class PropertyCollection extends SmrtCollection<Property> {\n static readonly _itemClass = Property;\n\n /**\n * Find a property by domain\n *\n * @param domain - Domain name\n * @returns Property or null\n */\n async findByDomain(domain: string): Promise<Property | null> {\n const results = await this.list({\n where: { domain },\n limit: 1,\n });\n return results[0] || null;\n }\n\n /**\n * Find properties by repository ID\n *\n * @param repositoryId - Repository ID\n * @returns Array of properties\n */\n async findByRepository(repositoryId: string): Promise<Property[]> {\n return await this.list({\n where: { repositoryId },\n });\n }\n\n /**\n * Find properties by owner ID\n *\n * @param ownerId - Owner profile ID\n * @returns Array of properties\n */\n async findByOwner(ownerId: string): Promise<Property[]> {\n return await this.list({\n where: { ownerId },\n });\n }\n\n /**\n * Find active properties\n *\n * @returns Array of active properties\n */\n async findActive(): Promise<Property[]> {\n return await this.list({\n where: { status: 'active' as PropertyStatus },\n });\n }\n\n /**\n * Find properties by status\n *\n * @param status - Property status\n * @returns Array of properties with the given status\n */\n async findByStatus(status: PropertyStatus): Promise<Property[]> {\n return await this.list({\n where: { status },\n });\n }\n\n /**\n * Get or create a property by domain\n *\n * @param domain - Domain name\n * @param defaults - Default values for creation\n * @returns Property (existing or newly created)\n */\n async getOrCreateByDomain(\n domain: string,\n defaults: {\n name?: string;\n url?: string;\n repositoryId?: string | null;\n ownerId?: string | null;\n } = {},\n ): Promise<Property> {\n let property = await this.findByDomain(domain);\n\n if (!property) {\n property = await this.create({\n domain,\n name: defaults.name || domain,\n url: defaults.url || `https://${domain}`,\n repositoryId: defaults.repositoryId ?? null,\n ownerId: defaults.ownerId ?? null,\n status: 'active',\n });\n await property.save();\n }\n\n return property;\n }\n\n /**\n * Count properties by status\n *\n * @returns Object with counts per status\n */\n async countByStatus(): Promise<Record<PropertyStatus, number>> {\n const all = await this.list({});\n const counts: Record<PropertyStatus, number> = {\n active: 0,\n inactive: 0,\n pending: 0,\n };\n\n for (const prop of all) {\n counts[prop.status]++;\n }\n\n return counts;\n }\n\n // ============================================\n // Tenant Helper Methods\n // ============================================\n\n /**\n * Find properties belonging to a specific tenant\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of properties for the tenant\n */\n async findByTenant(tenantId: string): Promise<Property[]> {\n return this.list({ where: { tenantId } });\n }\n\n /**\n * Find all global properties (no tenant association).\n *\n * Routes through the shared tenant-global helper so it does not throw under\n * an active tenant context (an explicit `tenant_id IS NULL` filter would be\n * flagged as an isolation violation). (#1600)\n *\n * @returns Array of global properties\n */\n async findGlobal(): Promise<Property[]> {\n return queryGlobal<Property>(this);\n }\n\n /**\n * Find properties for a tenant plus all global properties.\n *\n * Fails closed if an active tenant context requests a different tenant's\n * rows; the admin/system path keeps the cross-tenant capability. (#1600)\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of tenant-specific and global properties\n */\n async findWithGlobals(tenantId: string): Promise<Property[]> {\n return queryWithGlobals<Property>(\n this,\n tenantId,\n 'Property.findWithGlobals',\n );\n }\n}\n","/**\n * Zone model - Hierarchical placement area within a property\n *\n * Zones represent pages, sections, or slots within a digital property.\n * They can be nested arbitrarily using the parentId self-reference.\n */\n\nimport { foreignKey, SmrtHierarchical, smrt } from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport type { ZoneOptions, ZoneTreeNode } from '../types';\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n api: { include: ['list', 'get', 'create', 'update', 'delete'] },\n mcp: { include: ['list', 'get', 'create'] },\n cli: { skipApiCheck: true },\n})\nexport class Zone extends SmrtHierarchical { static __smrtPackage__ = \"@happyvertical/smrt-properties\";\n /**\n * Tenant ID for multi-tenant isolation\n */\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n /**\n * Parent property ID (required)\n */\n @foreignKey('Property')\n propertyId: string = '';\n\n // parentId inherited from SmrtHierarchical (null = top-level zone)\n\n /**\n * Display name\n */\n name: string = '';\n\n /**\n * Zone type (descriptive, not structural)\n * Common values: \"page\", \"section\", \"slot\", \"container\", \"widget\"\n */\n type: string = '';\n\n /**\n * URL path pattern (e.g., \"/\", \"/articles/*\")\n */\n path: string = '';\n\n /**\n * CSS selector for placement (e.g., \"#header\", \".sidebar\")\n */\n selector: string = '';\n\n /**\n * Position hint (e.g., \"top\", \"after-paragraph-3\")\n */\n position: string = '';\n\n /**\n * Width in pixels (null = fluid)\n */\n width: number | null = null;\n\n /**\n * Height in pixels (null = fluid)\n */\n height: number | null = null;\n\n /**\n * Allowed content/ad formats\n */\n allowedFormats: string[] = [];\n\n /**\n * Default content/asset ID for fallback\n */\n defaultContentId: string | null = null;\n\n /**\n * Extensible metadata\n */\n metadata: Record<string, unknown> = {};\n\n constructor(options: ZoneOptions = {}) {\n super(options);\n if (options.tenantId !== undefined) this.tenantId = options.tenantId;\n if (options.propertyId !== undefined) this.propertyId = options.propertyId;\n if (options.parentId !== undefined) this.parentId = options.parentId;\n if (options.name !== undefined) this.name = options.name;\n if (options.type !== undefined) this.type = options.type;\n if (options.path !== undefined) this.path = options.path;\n if (options.selector !== undefined) this.selector = options.selector;\n if (options.position !== undefined) this.position = options.position;\n if (options.width !== undefined) this.width = options.width;\n if (options.height !== undefined) this.height = options.height;\n if (options.allowedFormats !== undefined)\n this.allowedFormats = options.allowedFormats;\n if (options.defaultContentId !== undefined)\n this.defaultContentId = options.defaultContentId;\n if (options.metadata !== undefined) this.metadata = options.metadata;\n }\n\n /**\n * Check if this is a top-level zone (no parent)\n */\n isTopLevel(): boolean {\n return this.parentId === null;\n }\n\n /**\n * Check if this zone has dimensions set\n */\n hasDimensions(): boolean {\n return this.width !== null && this.height !== null;\n }\n\n /**\n * Get dimensions as string (e.g., \"728x90\")\n */\n getDimensionString(): string | null {\n if (!this.hasDimensions()) return null;\n return `${this.width}x${this.height}`;\n }\n\n /**\n * Get the parent property\n */\n async getProperty(): Promise<import('./Property').Property | null> {\n const { PropertyCollection } = await import('../collections/Properties');\n const collection = await PropertyCollection.create(this.options);\n return await collection.get({ id: this.propertyId });\n }\n\n // Hierarchy traversal (getParent / getChildren / getAncestors /\n // getDescendants / getHierarchy / moveTo) provided by SmrtHierarchical.\n // The collection-level depth cache in `ZoneCollection.getAncestors` /\n // `getDescendants` remains available for callers that go through the\n // collection — the base-class methods do their own batched queries.\n\n /**\n * Get the full path from root to this zone\n */\n async getFullPath(): Promise<string> {\n const ancestors = await this.getAncestors();\n const names = [...ancestors.map((z) => z.name), this.name];\n return names.join(' > ');\n }\n\n /**\n * Get the depth in the hierarchy (0 = top-level)\n */\n async getDepth(): Promise<number> {\n const ancestors = await this.getAncestors();\n return ancestors.length;\n }\n\n /**\n * Create a child zone under this zone\n */\n async createChild(\n options: Omit<ZoneOptions, 'propertyId' | 'parentId'>,\n ): Promise<Zone> {\n if (!this.id) {\n throw new Error('Zone must be saved before creating children');\n }\n const { ZoneCollection } = await import('../collections/Zones');\n const collection = await ZoneCollection.create(this.options);\n const zone = await collection.create({\n ...options,\n propertyId: this.propertyId,\n parentId: this.id,\n });\n await zone.save();\n return zone;\n }\n\n /**\n * Build tree node for this zone and its children\n */\n async toTreeNode(): Promise<ZoneTreeNode<Zone>> {\n const children = await this.getChildren();\n const childNodes = await Promise.all(children.map((c) => c.toTreeNode()));\n return {\n zone: this,\n children: childNodes,\n };\n }\n\n /**\n * Check if a format is allowed in this zone\n */\n isFormatAllowed(format: string): boolean {\n if (this.allowedFormats.length === 0) return true; // No restrictions\n return this.allowedFormats.includes(format);\n }\n}\n","/**\n * ZoneCollection - Collection manager for Zone objects\n *\n * Provides querying and tree operations for Zone entities.\n */\n\nimport { SmrtCollection } from '@happyvertical/smrt-core';\nimport { queryGlobal, queryWithGlobals } from '@happyvertical/smrt-tenancy';\nimport { Zone } from '../models/Zone';\nimport type { ZoneTree, ZoneTreeNode } from '../types';\n\nexport class ZoneCollection extends SmrtCollection<Zone> {\n static readonly _itemClass = Zone;\n\n /**\n * Find all zones for a property\n *\n * @param propertyId - Property ID\n * @returns Array of zones\n */\n async findByProperty(propertyId: string): Promise<Zone[]> {\n return await this.list({\n where: { propertyId },\n });\n }\n\n /**\n * Find top-level zones for a property (no parent)\n *\n * @param propertyId - Property ID\n * @returns Array of top-level zones\n */\n async findTopLevel(propertyId: string): Promise<Zone[]> {\n return await this.list({\n where: { propertyId, parentId: null },\n });\n }\n\n /**\n * Find direct children of a zone\n *\n * @param parentId - Parent zone ID\n * @returns Array of child zones\n */\n async findChildren(parentId: string): Promise<Zone[]> {\n return await this.list({\n where: { parentId },\n });\n }\n\n /**\n * Find zones by path pattern\n *\n * @param propertyId - Property ID\n * @param path - URL path to match\n * @returns Array of matching zones\n */\n async findByPath(propertyId: string, path: string): Promise<Zone[]> {\n return await this.list({\n where: { propertyId, path },\n });\n }\n\n /**\n * Find zones by type\n *\n * @param propertyId - Property ID\n * @param type - Zone type\n * @returns Array of zones of the given type\n */\n async findByType(propertyId: string, type: string): Promise<Zone[]> {\n return await this.list({\n where: { propertyId, type },\n });\n }\n\n /**\n * Get the complete zone tree for a property\n *\n * @param propertyId - Property ID\n * @returns ZoneTree structure\n */\n async getTree(propertyId: string): Promise<ZoneTree<Zone>> {\n const allZones = await this.findByProperty(propertyId);\n const zoneMap = new Map<string, Zone>();\n const childrenMap = new Map<string, Zone[]>();\n\n // Build lookup maps\n for (const zone of allZones) {\n if (zone.id) {\n zoneMap.set(zone.id, zone);\n }\n if (!childrenMap.has(zone.parentId || '')) {\n childrenMap.set(zone.parentId || '', []);\n }\n childrenMap.get(zone.parentId || '')?.push(zone);\n }\n\n // Build tree nodes recursively\n const buildNode = (zone: Zone): ZoneTreeNode<Zone> => {\n const children = (zone.id ? childrenMap.get(zone.id) : []) || [];\n return {\n zone,\n children: children.map(buildNode),\n };\n };\n\n // Get root nodes (no parent)\n const roots = childrenMap.get('') || [];\n\n return {\n propertyId,\n roots: roots.map(buildNode),\n };\n }\n\n /**\n * Get all ancestors of a zone (path to root)\n *\n * @param zoneId - Zone ID\n * @returns Array of ancestors (from root to parent)\n */\n async getAncestors(zoneId: string): Promise<Zone[]> {\n const ancestors: Zone[] = [];\n\n // Get the starting zone\n const startZone = await this.get({ id: zoneId });\n if (!startZone) return ancestors;\n\n let currentId: string | null = startZone.parentId;\n\n // Walk up the tree\n while (currentId) {\n const parent = await this.get({ id: currentId });\n if (!parent) break;\n ancestors.unshift(parent); // Add to front (root first)\n currentId = parent.parentId;\n }\n\n return ancestors;\n }\n\n /**\n * Get all descendants of a zone recursively\n *\n * @param zoneId - Zone ID\n * @returns Array of all descendant zones\n */\n async getDescendants(zoneId: string): Promise<Zone[]> {\n const descendants: Zone[] = [];\n const queue: string[] = [zoneId];\n\n while (queue.length > 0) {\n const currentId = queue.shift();\n if (!currentId) continue;\n\n const children = await this.findChildren(currentId);\n\n for (const child of children) {\n descendants.push(child);\n if (child.id) {\n queue.push(child.id);\n }\n }\n }\n\n return descendants;\n }\n\n /**\n * Get the depth of the deepest zone in a property\n *\n * @param propertyId - Property ID\n * @returns Maximum depth (0 = only top-level zones)\n */\n async getMaxDepth(propertyId: string): Promise<number> {\n const allZones = await this.findByProperty(propertyId);\n\n // Build a lookup map for efficient in-memory traversal\n const zonesById = new Map<string, Zone>();\n for (const zone of allZones) {\n if (zone.id) {\n zonesById.set(zone.id, zone);\n }\n }\n\n // Cache computed depths\n const depthCache = new Map<string, number>();\n\n const getDepth = (zone: Zone): number => {\n if (!zone.id) return 0;\n\n const cached = depthCache.get(zone.id);\n if (cached !== undefined) return cached;\n\n let depth = 0;\n let current: Zone | undefined = zone;\n const visited = new Set<string>();\n\n // Walk up the parent chain using in-memory lookup\n while (current?.id) {\n const parentId = current.parentId;\n if (!parentId) break;\n\n // Prevent infinite loops from cyclic data\n if (visited.has(parentId)) break;\n visited.add(parentId);\n\n const parent = zonesById.get(parentId);\n if (!parent) break;\n\n depth += 1;\n current = parent;\n }\n\n depthCache.set(zone.id, depth);\n return depth;\n };\n\n let maxDepth = 0;\n for (const zone of allZones) {\n maxDepth = Math.max(maxDepth, getDepth(zone));\n }\n\n return maxDepth;\n }\n\n /**\n * Find zones with specific dimensions\n *\n * @param propertyId - Property ID\n * @param width - Required width\n * @param height - Required height\n * @returns Array of matching zones\n */\n async findByDimensions(\n propertyId: string,\n width: number,\n height: number,\n ): Promise<Zone[]> {\n return await this.list({\n where: { propertyId, width, height },\n });\n }\n\n /**\n * Find zones that allow a specific format\n *\n * @param propertyId - Property ID\n * @param format - Format to check\n * @returns Array of zones allowing the format\n */\n async findByAllowedFormat(\n propertyId: string,\n format: string,\n ): Promise<Zone[]> {\n const allZones = await this.findByProperty(propertyId);\n return allZones.filter((zone) => zone.isFormatAllowed(format));\n }\n\n /**\n * Move a zone to a new parent\n *\n * @param zoneId - Zone ID to move\n * @param newParentId - New parent ID (null for top-level)\n * @returns Updated zone\n */\n async moveZone(\n zoneId: string,\n newParentId: string | null,\n ): Promise<Zone | null> {\n const zone = await this.get({ id: zoneId });\n if (!zone) return null;\n\n // Prevent circular references\n if (newParentId) {\n const descendants = await this.getDescendants(zoneId);\n const descendantIds = descendants.map((d) => d.id);\n if (descendantIds.includes(newParentId)) {\n throw new Error('Cannot move zone into one of its descendants');\n }\n }\n\n zone.parentId = newParentId;\n await zone.save();\n return zone;\n }\n\n /**\n * Delete a zone and optionally its descendants\n *\n * @param zoneId - Zone ID to delete\n * @param cascade - Whether to delete descendants\n * @returns Number of zones deleted\n */\n async deleteZone(zoneId: string, cascade: boolean = false): Promise<number> {\n const zone = await this.get({ id: zoneId });\n if (!zone) return 0;\n\n let deleted = 0;\n\n if (cascade) {\n const descendants = await this.getDescendants(zoneId);\n for (const desc of descendants) {\n await desc.delete();\n deleted++;\n }\n } else {\n // Move children to parent\n const children = await this.findChildren(zoneId);\n for (const child of children) {\n child.parentId = zone.parentId;\n await child.save();\n }\n }\n\n await zone.delete();\n deleted++;\n\n return deleted;\n }\n\n // ============================================\n // Tenant Helper Methods\n // ============================================\n\n /**\n * Find zones belonging to a specific tenant\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of zones for the tenant\n */\n async findByTenant(tenantId: string): Promise<Zone[]> {\n return this.list({ where: { tenantId } });\n }\n\n /**\n * Find all global zones (no tenant association).\n *\n * Routes through the shared tenant-global helper so it does not throw under\n * an active tenant context (an explicit `tenant_id IS NULL` filter would be\n * flagged as an isolation violation). (#1600)\n *\n * @returns Array of global zones\n */\n async findGlobal(): Promise<Zone[]> {\n return queryGlobal<Zone>(this);\n }\n\n /**\n * Find zones for a tenant plus all global zones.\n *\n * Fails closed if an active tenant context requests a different tenant's\n * rows; the admin/system path keeps the cross-tenant capability. (#1600)\n *\n * @param tenantId - Tenant ID to filter by\n * @returns Array of tenant-specific and global zones\n */\n async findWithGlobals(tenantId: string): Promise<Zone[]> {\n return queryWithGlobals<Zone>(this, tenantId, 'Zone.findWithGlobals');\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAOA,eAAe,wBAAwB,KAAK,MAAM,0gvBAA821B,CAAC;;;ACY151B,IAAM,gCAAgC,aAAa;CACxD,KAAK;CACL,UAAU;;;;;;;CAOV,IAAI,EAAE,SAAS,OAAO;CACtB,UAAU;EACR,UAAU;EACV,SAAS;EACT,OAAO;EACP,QAAQ;CACV;AACF,CAAC;;;;;;;;;;;;;;;;;;ACZM,IAAM,WAAN,cAAuB,WAAW;CAKvC,WAA0B;;;;CAK1B,OAAe;;;;CAKf,SAAiB;;;;CAKjB,MAAc;;;;CAKd,cAAsB;CAOtB,eAA8B;CAO9B,UAAyB;;;;CAKzB,SAAyB;;;;CAKzB,WAAoC,CAAC;CAErC,YAAY,UAA2B,CAAC,GAAG;EACzC,MAAM,OAAO;EACb,IAAI,QAAQ,aAAa,KAAA,GAAW,KAAK,WAAW,QAAQ;EAC5D,IAAI,QAAQ,SAAS,KAAA,GAAW,KAAK,OAAO,QAAQ;EACpD,IAAI,QAAQ,WAAW,KAAA,GAAW,KAAK,SAAS,QAAQ;EACxD,IAAI,QAAQ,QAAQ,KAAA,GAAW,KAAK,MAAM,QAAQ;EAClD,IAAI,QAAQ,gBAAgB,KAAA,GAC1B,KAAK,cAAc,QAAQ;EAC7B,IAAI,QAAQ,iBAAiB,KAAA,GAC3B,KAAK,eAAe,QAAQ;EAC9B,IAAI,QAAQ,YAAY,KAAA,GAAW,KAAK,UAAU,QAAQ;EAC1D,IAAI,QAAQ,WAAW,KAAA,GAAW,KAAK,SAAS,QAAQ;EACxD,IAAI,QAAQ,aAAa,KAAA,GAAW,KAAK,WAAW,QAAQ;CAC9D;;;;CAKA,MAAM,WAA6C;EACjD,IAAI,CAAC,KAAK,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;GAC/C,KAAA,MAAW,SAAS,UAAU;IAC5B,MAAM,WAAW,KAAK;IACtB,MAAM,MAAM,KAAK;GACnB;EACF;EAEA,MAAM,KAAK,OAAO;EAClB;EAEA,OAAO;CACT;;;;;;;CAYA,MAAM,aAAa,UAAmC;EACpD,OAAO,KAAK,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;CAC1C;;;;;;;;;;CAWA,MAAM,aAA8B;EAClC,OAAO,YAAkB,IAAI;CAC/B;;;;;;;;;;CAWA,MAAM,gBAAgB,UAAmC;EACvD,OAAO,iBAAuB,MAAM,UAAU,sBAAsB;CACtE;AACF"}
|
package/dist/manifest.json
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-properties",
|
|
5
|
-
"packageVersion": "0.61.
|
|
5
|
+
"packageVersion": "0.61.4",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-properties:PropertyCollection": {
|
|
8
8
|
"name": "propertycollection",
|
|
9
9
|
"className": "PropertyCollection",
|
|
10
10
|
"qualifiedName": "@happyvertical/smrt-properties:PropertyCollection",
|
|
11
11
|
"collection": "properties",
|
|
12
|
-
"filePath": "
|
|
12
|
+
"filePath": "src/collections/Properties.ts",
|
|
13
13
|
"packageName": "@happyvertical/smrt-properties",
|
|
14
14
|
"fields": {},
|
|
15
15
|
"methods": {
|
|
@@ -308,7 +308,7 @@
|
|
|
308
308
|
"className": "ZoneCollection",
|
|
309
309
|
"qualifiedName": "@happyvertical/smrt-properties:ZoneCollection",
|
|
310
310
|
"collection": "zones",
|
|
311
|
-
"filePath": "
|
|
311
|
+
"filePath": "src/collections/Zones.ts",
|
|
312
312
|
"packageName": "@happyvertical/smrt-properties",
|
|
313
313
|
"fields": {},
|
|
314
314
|
"methods": {
|
|
@@ -764,23 +764,26 @@
|
|
|
764
764
|
"className": "Property",
|
|
765
765
|
"qualifiedName": "@happyvertical/smrt-properties:Property",
|
|
766
766
|
"collection": "properties",
|
|
767
|
-
"filePath": "
|
|
767
|
+
"filePath": "src/models/Property.ts",
|
|
768
768
|
"packageName": "@happyvertical/smrt-properties",
|
|
769
769
|
"fields": {
|
|
770
770
|
"created_at": {
|
|
771
771
|
"type": "datetime",
|
|
772
|
+
"_meta": {
|
|
773
|
+
"__statedOptions": []
|
|
774
|
+
},
|
|
772
775
|
"required": false
|
|
773
776
|
},
|
|
774
777
|
"updated_at": {
|
|
775
778
|
"type": "datetime",
|
|
779
|
+
"_meta": {
|
|
780
|
+
"__statedOptions": []
|
|
781
|
+
},
|
|
776
782
|
"required": false
|
|
777
783
|
},
|
|
778
784
|
"tenantId": {
|
|
779
785
|
"type": "text",
|
|
780
|
-
"required": false,
|
|
781
786
|
"_meta": {
|
|
782
|
-
"sqlType": "UUID",
|
|
783
|
-
"nullable": true,
|
|
784
787
|
"__tenancy": {
|
|
785
788
|
"isTenantIdField": true,
|
|
786
789
|
"autoFilter": true,
|
|
@@ -790,41 +793,87 @@
|
|
|
790
793
|
"mode": "optional",
|
|
791
794
|
"field": "tenantId",
|
|
792
795
|
"allowSuperAdminBypass": false
|
|
793
|
-
}
|
|
794
|
-
|
|
796
|
+
},
|
|
797
|
+
"__statedOptions": [
|
|
798
|
+
"sqlType",
|
|
799
|
+
"nullable",
|
|
800
|
+
"__tenancy",
|
|
801
|
+
"required"
|
|
802
|
+
],
|
|
803
|
+
"sqlType": "UUID",
|
|
804
|
+
"nullable": true,
|
|
805
|
+
"required": false
|
|
806
|
+
},
|
|
807
|
+
"required": false
|
|
795
808
|
},
|
|
796
809
|
"name": {
|
|
797
810
|
"type": "text",
|
|
811
|
+
"_meta": {
|
|
812
|
+
"__statedOptions": [
|
|
813
|
+
"default"
|
|
814
|
+
]
|
|
815
|
+
},
|
|
798
816
|
"required": false,
|
|
799
817
|
"default": ""
|
|
800
818
|
},
|
|
801
819
|
"domain": {
|
|
802
820
|
"type": "text",
|
|
821
|
+
"_meta": {
|
|
822
|
+
"__statedOptions": [
|
|
823
|
+
"default"
|
|
824
|
+
]
|
|
825
|
+
},
|
|
803
826
|
"required": false,
|
|
804
827
|
"default": ""
|
|
805
828
|
},
|
|
806
829
|
"url": {
|
|
807
830
|
"type": "text",
|
|
831
|
+
"_meta": {
|
|
832
|
+
"__statedOptions": [
|
|
833
|
+
"default"
|
|
834
|
+
]
|
|
835
|
+
},
|
|
808
836
|
"required": false,
|
|
809
837
|
"default": ""
|
|
810
838
|
},
|
|
811
839
|
"description": {
|
|
812
840
|
"type": "text",
|
|
841
|
+
"_meta": {
|
|
842
|
+
"__statedOptions": [
|
|
843
|
+
"default"
|
|
844
|
+
]
|
|
845
|
+
},
|
|
813
846
|
"required": false,
|
|
814
847
|
"default": ""
|
|
815
848
|
},
|
|
816
849
|
"repositoryId": {
|
|
817
850
|
"type": "crossPackageRef",
|
|
851
|
+
"_meta": {
|
|
852
|
+
"__statedOptions": [
|
|
853
|
+
"related"
|
|
854
|
+
]
|
|
855
|
+
},
|
|
818
856
|
"required": false,
|
|
819
857
|
"related": "@happyvertical/smrt-projects:Repository"
|
|
820
858
|
},
|
|
821
859
|
"ownerId": {
|
|
822
860
|
"type": "crossPackageRef",
|
|
861
|
+
"_meta": {
|
|
862
|
+
"__statedOptions": [
|
|
863
|
+
"related"
|
|
864
|
+
]
|
|
865
|
+
},
|
|
823
866
|
"required": false,
|
|
824
867
|
"related": "@happyvertical/smrt-profiles:Profile"
|
|
825
868
|
},
|
|
826
869
|
"status": {
|
|
827
870
|
"type": "text",
|
|
871
|
+
"_meta": {
|
|
872
|
+
"__statedOptions": [
|
|
873
|
+
"default",
|
|
874
|
+
"enum"
|
|
875
|
+
]
|
|
876
|
+
},
|
|
828
877
|
"required": false,
|
|
829
878
|
"default": "active",
|
|
830
879
|
"enum": [
|
|
@@ -835,6 +884,11 @@
|
|
|
835
884
|
},
|
|
836
885
|
"metadata": {
|
|
837
886
|
"type": "json",
|
|
887
|
+
"_meta": {
|
|
888
|
+
"__statedOptions": [
|
|
889
|
+
"default"
|
|
890
|
+
]
|
|
891
|
+
},
|
|
838
892
|
"required": false,
|
|
839
893
|
"default": {}
|
|
840
894
|
}
|
|
@@ -1059,23 +1113,21 @@
|
|
|
1059
1113
|
"className": "Zone",
|
|
1060
1114
|
"qualifiedName": "@happyvertical/smrt-properties:Zone",
|
|
1061
1115
|
"collection": "zones",
|
|
1062
|
-
"filePath": "
|
|
1116
|
+
"filePath": "src/models/Zone.ts",
|
|
1063
1117
|
"packageName": "@happyvertical/smrt-properties",
|
|
1064
1118
|
"fields": {
|
|
1065
1119
|
"parentId": {
|
|
1066
1120
|
"type": "foreignKey",
|
|
1067
|
-
"required": false,
|
|
1068
|
-
"related": "Zone",
|
|
1069
1121
|
"_meta": {
|
|
1122
|
+
"__statedOptions": [],
|
|
1070
1123
|
"nullable": true
|
|
1071
|
-
}
|
|
1124
|
+
},
|
|
1125
|
+
"required": false,
|
|
1126
|
+
"related": "Zone"
|
|
1072
1127
|
},
|
|
1073
1128
|
"tenantId": {
|
|
1074
1129
|
"type": "text",
|
|
1075
|
-
"required": false,
|
|
1076
1130
|
"_meta": {
|
|
1077
|
-
"sqlType": "UUID",
|
|
1078
|
-
"nullable": true,
|
|
1079
1131
|
"__tenancy": {
|
|
1080
1132
|
"isTenantIdField": true,
|
|
1081
1133
|
"autoFilter": true,
|
|
@@ -1085,58 +1137,117 @@
|
|
|
1085
1137
|
"mode": "optional",
|
|
1086
1138
|
"field": "tenantId",
|
|
1087
1139
|
"allowSuperAdminBypass": false
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1140
|
+
},
|
|
1141
|
+
"__statedOptions": [
|
|
1142
|
+
"sqlType",
|
|
1143
|
+
"nullable",
|
|
1144
|
+
"__tenancy",
|
|
1145
|
+
"required"
|
|
1146
|
+
],
|
|
1147
|
+
"sqlType": "UUID",
|
|
1148
|
+
"nullable": true,
|
|
1149
|
+
"required": false
|
|
1150
|
+
},
|
|
1151
|
+
"required": false
|
|
1090
1152
|
},
|
|
1091
1153
|
"propertyId": {
|
|
1092
1154
|
"type": "foreignKey",
|
|
1155
|
+
"_meta": {
|
|
1156
|
+
"__statedOptions": [
|
|
1157
|
+
"related"
|
|
1158
|
+
]
|
|
1159
|
+
},
|
|
1093
1160
|
"required": false,
|
|
1094
1161
|
"related": "Property"
|
|
1095
1162
|
},
|
|
1096
1163
|
"name": {
|
|
1097
1164
|
"type": "text",
|
|
1165
|
+
"_meta": {
|
|
1166
|
+
"__statedOptions": [
|
|
1167
|
+
"default"
|
|
1168
|
+
]
|
|
1169
|
+
},
|
|
1098
1170
|
"required": false,
|
|
1099
1171
|
"default": ""
|
|
1100
1172
|
},
|
|
1101
1173
|
"type": {
|
|
1102
1174
|
"type": "text",
|
|
1175
|
+
"_meta": {
|
|
1176
|
+
"__statedOptions": [
|
|
1177
|
+
"default"
|
|
1178
|
+
]
|
|
1179
|
+
},
|
|
1103
1180
|
"required": false,
|
|
1104
1181
|
"default": ""
|
|
1105
1182
|
},
|
|
1106
1183
|
"path": {
|
|
1107
1184
|
"type": "text",
|
|
1185
|
+
"_meta": {
|
|
1186
|
+
"__statedOptions": [
|
|
1187
|
+
"default"
|
|
1188
|
+
]
|
|
1189
|
+
},
|
|
1108
1190
|
"required": false,
|
|
1109
1191
|
"default": ""
|
|
1110
1192
|
},
|
|
1111
1193
|
"selector": {
|
|
1112
1194
|
"type": "text",
|
|
1195
|
+
"_meta": {
|
|
1196
|
+
"__statedOptions": [
|
|
1197
|
+
"default"
|
|
1198
|
+
]
|
|
1199
|
+
},
|
|
1113
1200
|
"required": false,
|
|
1114
1201
|
"default": ""
|
|
1115
1202
|
},
|
|
1116
1203
|
"position": {
|
|
1117
1204
|
"type": "text",
|
|
1205
|
+
"_meta": {
|
|
1206
|
+
"__statedOptions": [
|
|
1207
|
+
"default"
|
|
1208
|
+
]
|
|
1209
|
+
},
|
|
1118
1210
|
"required": false,
|
|
1119
1211
|
"default": ""
|
|
1120
1212
|
},
|
|
1121
1213
|
"width": {
|
|
1122
1214
|
"type": "integer",
|
|
1215
|
+
"_meta": {
|
|
1216
|
+
"__statedOptions": []
|
|
1217
|
+
},
|
|
1123
1218
|
"required": false
|
|
1124
1219
|
},
|
|
1125
1220
|
"height": {
|
|
1126
1221
|
"type": "integer",
|
|
1222
|
+
"_meta": {
|
|
1223
|
+
"__statedOptions": []
|
|
1224
|
+
},
|
|
1127
1225
|
"required": false
|
|
1128
1226
|
},
|
|
1129
1227
|
"allowedFormats": {
|
|
1130
1228
|
"type": "json",
|
|
1229
|
+
"_meta": {
|
|
1230
|
+
"__statedOptions": [
|
|
1231
|
+
"default"
|
|
1232
|
+
]
|
|
1233
|
+
},
|
|
1131
1234
|
"required": false,
|
|
1132
1235
|
"default": []
|
|
1133
1236
|
},
|
|
1134
1237
|
"defaultContentId": {
|
|
1135
1238
|
"type": "text",
|
|
1239
|
+
"_meta": {
|
|
1240
|
+
"__statedOptions": []
|
|
1241
|
+
},
|
|
1136
1242
|
"required": false
|
|
1137
1243
|
},
|
|
1138
1244
|
"metadata": {
|
|
1139
1245
|
"type": "json",
|
|
1246
|
+
"_meta": {
|
|
1247
|
+
"__statedOptions": [
|
|
1248
|
+
"default"
|
|
1249
|
+
]
|
|
1250
|
+
},
|
|
1140
1251
|
"required": false,
|
|
1141
1252
|
"default": {}
|
|
1142
1253
|
}
|
|
@@ -1499,5 +1610,6 @@
|
|
|
1499
1610
|
"@happyvertical/smrt-tenancy"
|
|
1500
1611
|
]
|
|
1501
1612
|
},
|
|
1613
|
+
"schemaFingerprint": "339bfc611792e3c040b1a9a79eff9f29840562f33405c3bc151921a1cf5c3141",
|
|
1502
1614
|
"stampsConstructors": true
|
|
1503
1615
|
}
|
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-properties",
|
|
6
|
-
"packageVersion": "0.61.
|
|
6
|
+
"packageVersion": "0.61.4",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
10
|
+
"manifest": "4dc5f5bcdc0b675b73905289cbf4195d0f6855d94b3bc80ba8c2ceb994105298",
|
|
11
|
+
"packageJson": "acb4e53e69f2977decbd9ce9a6ff41219602297799f2904dfdbfb057a2089c4a",
|
|
12
12
|
"agents": "d5b7f6706025deceaf6a7eadbf0b52c32bfed5c7d6c8dd4bbc6f58b23448b531"
|
|
13
13
|
},
|
|
14
14
|
"exports": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-properties",
|
|
3
|
-
"version": "0.61.
|
|
3
|
+
"version": "0.61.4",
|
|
4
4
|
"description": "Digital property and zone management models for SMRT framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,14 +19,14 @@
|
|
|
19
19
|
"./manifest.json": "./dist/manifest.json"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@happyvertical/smrt-core": "0.61.
|
|
23
|
-
"@happyvertical/smrt-prompts": "0.61.
|
|
24
|
-
"@happyvertical/smrt-tenancy": "0.61.
|
|
22
|
+
"@happyvertical/smrt-core": "0.61.4",
|
|
23
|
+
"@happyvertical/smrt-prompts": "0.61.4",
|
|
24
|
+
"@happyvertical/smrt-tenancy": "0.61.4"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@happyvertical/smrt-cli": "0.61.
|
|
28
|
-
"@happyvertical/smrt-vitest": "0.61.
|
|
29
|
-
"@happyvertical/sql": "^0.
|
|
27
|
+
"@happyvertical/smrt-cli": "0.61.4",
|
|
28
|
+
"@happyvertical/smrt-vitest": "0.61.4",
|
|
29
|
+
"@happyvertical/sql": "^0.113.0",
|
|
30
30
|
"@types/node": "24.13.6",
|
|
31
31
|
"typescript": "6.0.3",
|
|
32
32
|
"vite": "8.1.6",
|