@happyvertical/smrt-properties 0.49.3 → 0.49.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/manifest.json +195 -16
- package/dist/smrt-knowledge.json +6 -6
- package/package.json +6 -6
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.49.3\",\"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\":{},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"Property\",\"exportName\":\"PropertyCollection\",\"collectionExportName\":\"PropertyCollectionCollection\",\"schema\":{\"tableName\":\"property_collections\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"property_collections\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"}},\"indexes\":[{\"name\":\"property_collections_slug_context_idx\",\"columns\":[\"slug\",\"context\"],\"unique\":true},{\"name\":\"property_collections_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"755c73e0\"}},\"@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\":{},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"Zone\",\"exportName\":\"ZoneCollection\",\"collectionExportName\":\"ZoneCollectionCollection\",\"schema\":{\"tableName\":\"zone_collections\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"zone_collections\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"}},\"indexes\":[{\"name\":\"zone_collections_slug_context_idx\",\"columns\":[\"slug\",\"context\"],\"unique\":true},{\"name\":\"zone_collections_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"5bed4522\"}},\"@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\"},\"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\",\"schema\":{\"tableName\":\"properties\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"properties\\\" (\\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\":{\"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},{\"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\":\"6431d246\"}},\"@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\",\"schema\":{\"tableName\":\"zones\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"zones\\\" (\\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\":{\"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},{\"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\":\"a9fed5be\"}}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-core\",\"@happyvertical/smrt-prompts\",\"@happyvertical/smrt-tenancy\"]}"));
|
|
17
|
+
ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-properties\",\"packageVersion\":\"0.49.5\",\"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\":{},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"Property\",\"exportName\":\"PropertyCollection\",\"collectionExportName\":\"PropertyCollectionCollection\",\"schema\":{\"tableName\":\"properties\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"properties\\\" (\\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\":{\"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\":\"6431d246\"}},\"@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\":{},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"Zone\",\"exportName\":\"ZoneCollection\",\"collectionExportName\":\"ZoneCollectionCollection\",\"schema\":{\"tableName\":\"zones\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"zones\\\" (\\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\":{\"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\":\"a9fed5be\"}},\"@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\"},\"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\",\"schema\":{\"tableName\":\"properties\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"properties\\\" (\\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\":{\"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\":\"6431d246\"}},\"@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\",\"schema\":{\"tableName\":\"zones\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"zones\\\" (\\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\":{\"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\":\"a9fed5be\"}}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-core\",\"@happyvertical/smrt-prompts\",\"@happyvertical/smrt-tenancy\"]}"));
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/prompts.ts
|
|
20
20
|
var smrtPropertiesSummarizePrompt = definePrompt({
|
package/dist/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-properties",
|
|
5
|
-
"packageVersion": "0.49.
|
|
5
|
+
"packageVersion": "0.49.5",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-properties:PropertyCollection": {
|
|
8
8
|
"name": "propertycollection",
|
|
@@ -151,8 +151,8 @@
|
|
|
151
151
|
"exportName": "PropertyCollection",
|
|
152
152
|
"collectionExportName": "PropertyCollectionCollection",
|
|
153
153
|
"schema": {
|
|
154
|
-
"tableName": "
|
|
155
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
154
|
+
"tableName": "properties",
|
|
155
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"properties\" (\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);",
|
|
156
156
|
"columns": {
|
|
157
157
|
"id": {
|
|
158
158
|
"type": "UUID",
|
|
@@ -169,6 +169,14 @@
|
|
|
169
169
|
"notNull": true,
|
|
170
170
|
"default": ""
|
|
171
171
|
},
|
|
172
|
+
"_meta_type": {
|
|
173
|
+
"type": "TEXT",
|
|
174
|
+
"notNull": true
|
|
175
|
+
},
|
|
176
|
+
"_meta_data": {
|
|
177
|
+
"type": "JSON",
|
|
178
|
+
"notNull": false
|
|
179
|
+
},
|
|
172
180
|
"created_at": {
|
|
173
181
|
"type": "TIMESTAMP",
|
|
174
182
|
"notNull": true,
|
|
@@ -178,25 +186,92 @@
|
|
|
178
186
|
"type": "TIMESTAMP",
|
|
179
187
|
"notNull": true,
|
|
180
188
|
"default": "current_timestamp"
|
|
189
|
+
},
|
|
190
|
+
"tenant_id": {
|
|
191
|
+
"type": "UUID",
|
|
192
|
+
"referenceKind": "tenantId",
|
|
193
|
+
"notNull": false
|
|
194
|
+
},
|
|
195
|
+
"name": {
|
|
196
|
+
"type": "TEXT",
|
|
197
|
+
"notNull": false,
|
|
198
|
+
"default": ""
|
|
199
|
+
},
|
|
200
|
+
"domain": {
|
|
201
|
+
"type": "TEXT",
|
|
202
|
+
"notNull": false,
|
|
203
|
+
"default": ""
|
|
204
|
+
},
|
|
205
|
+
"url": {
|
|
206
|
+
"type": "TEXT",
|
|
207
|
+
"notNull": false,
|
|
208
|
+
"default": ""
|
|
209
|
+
},
|
|
210
|
+
"description": {
|
|
211
|
+
"type": "TEXT",
|
|
212
|
+
"notNull": false,
|
|
213
|
+
"default": ""
|
|
214
|
+
},
|
|
215
|
+
"repository_id": {
|
|
216
|
+
"type": "UUID",
|
|
217
|
+
"referenceKind": "crossPackageRef",
|
|
218
|
+
"notNull": false
|
|
219
|
+
},
|
|
220
|
+
"owner_id": {
|
|
221
|
+
"type": "UUID",
|
|
222
|
+
"referenceKind": "crossPackageRef",
|
|
223
|
+
"notNull": false
|
|
224
|
+
},
|
|
225
|
+
"status": {
|
|
226
|
+
"type": "TEXT",
|
|
227
|
+
"notNull": false,
|
|
228
|
+
"default": "active"
|
|
229
|
+
},
|
|
230
|
+
"metadata": {
|
|
231
|
+
"type": "JSON",
|
|
232
|
+
"notNull": false,
|
|
233
|
+
"default": {}
|
|
181
234
|
}
|
|
182
235
|
},
|
|
183
236
|
"indexes": [
|
|
184
237
|
{
|
|
185
|
-
"name": "
|
|
238
|
+
"name": "properties_slug_context_meta_type_idx",
|
|
186
239
|
"columns": [
|
|
240
|
+
"tenant_id",
|
|
187
241
|
"slug",
|
|
188
|
-
"context"
|
|
242
|
+
"context",
|
|
243
|
+
"_meta_type"
|
|
189
244
|
],
|
|
190
|
-
"unique": true
|
|
245
|
+
"unique": true,
|
|
246
|
+
"nullsNotDistinct": true
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
"name": "properties_meta_type_idx",
|
|
250
|
+
"columns": [
|
|
251
|
+
"_meta_type"
|
|
252
|
+
]
|
|
191
253
|
},
|
|
192
254
|
{
|
|
193
|
-
"name": "
|
|
255
|
+
"name": "properties_tenant_id_created_at_idx",
|
|
194
256
|
"columns": [
|
|
257
|
+
"tenant_id",
|
|
195
258
|
"created_at"
|
|
196
259
|
]
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"name": "properties_repository_id_idx",
|
|
263
|
+
"columns": [
|
|
264
|
+
"repository_id"
|
|
265
|
+
]
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "properties_owner_id_idx",
|
|
269
|
+
"columns": [
|
|
270
|
+
"owner_id"
|
|
271
|
+
]
|
|
197
272
|
}
|
|
198
273
|
],
|
|
199
|
-
"version": "
|
|
274
|
+
"version": "6431d246"
|
|
200
275
|
}
|
|
201
276
|
},
|
|
202
277
|
"@happyvertical/smrt-properties:ZoneCollection": {
|
|
@@ -476,8 +551,8 @@
|
|
|
476
551
|
"exportName": "ZoneCollection",
|
|
477
552
|
"collectionExportName": "ZoneCollectionCollection",
|
|
478
553
|
"schema": {
|
|
479
|
-
"tableName": "
|
|
480
|
-
"ddl": "CREATE TABLE IF NOT EXISTS \"
|
|
554
|
+
"tableName": "zones",
|
|
555
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"zones\" (\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);",
|
|
481
556
|
"columns": {
|
|
482
557
|
"id": {
|
|
483
558
|
"type": "UUID",
|
|
@@ -503,25 +578,127 @@
|
|
|
503
578
|
"type": "TIMESTAMP",
|
|
504
579
|
"notNull": true,
|
|
505
580
|
"default": "current_timestamp"
|
|
581
|
+
},
|
|
582
|
+
"parent_id": {
|
|
583
|
+
"type": "UUID",
|
|
584
|
+
"referenceKind": "foreignKey",
|
|
585
|
+
"notNull": false,
|
|
586
|
+
"unique": false,
|
|
587
|
+
"foreignKey": {
|
|
588
|
+
"table": "zones",
|
|
589
|
+
"column": "id",
|
|
590
|
+
"onDelete": "NO ACTION",
|
|
591
|
+
"onUpdate": "CASCADE"
|
|
592
|
+
}
|
|
593
|
+
},
|
|
594
|
+
"tenant_id": {
|
|
595
|
+
"type": "UUID",
|
|
596
|
+
"referenceKind": "tenantId",
|
|
597
|
+
"notNull": false,
|
|
598
|
+
"unique": false
|
|
599
|
+
},
|
|
600
|
+
"property_id": {
|
|
601
|
+
"type": "UUID",
|
|
602
|
+
"referenceKind": "foreignKey",
|
|
603
|
+
"notNull": false,
|
|
604
|
+
"unique": false,
|
|
605
|
+
"foreignKey": {
|
|
606
|
+
"table": "properties",
|
|
607
|
+
"column": "id",
|
|
608
|
+
"onDelete": "NO ACTION",
|
|
609
|
+
"onUpdate": "CASCADE"
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
"name": {
|
|
613
|
+
"type": "TEXT",
|
|
614
|
+
"notNull": false,
|
|
615
|
+
"unique": false,
|
|
616
|
+
"default": ""
|
|
617
|
+
},
|
|
618
|
+
"type": {
|
|
619
|
+
"type": "TEXT",
|
|
620
|
+
"notNull": false,
|
|
621
|
+
"unique": false,
|
|
622
|
+
"default": ""
|
|
623
|
+
},
|
|
624
|
+
"path": {
|
|
625
|
+
"type": "TEXT",
|
|
626
|
+
"notNull": false,
|
|
627
|
+
"unique": false,
|
|
628
|
+
"default": ""
|
|
629
|
+
},
|
|
630
|
+
"selector": {
|
|
631
|
+
"type": "TEXT",
|
|
632
|
+
"notNull": false,
|
|
633
|
+
"unique": false,
|
|
634
|
+
"default": ""
|
|
635
|
+
},
|
|
636
|
+
"position": {
|
|
637
|
+
"type": "TEXT",
|
|
638
|
+
"notNull": false,
|
|
639
|
+
"unique": false,
|
|
640
|
+
"default": ""
|
|
641
|
+
},
|
|
642
|
+
"width": {
|
|
643
|
+
"type": "INTEGER",
|
|
644
|
+
"notNull": false,
|
|
645
|
+
"unique": false
|
|
646
|
+
},
|
|
647
|
+
"height": {
|
|
648
|
+
"type": "INTEGER",
|
|
649
|
+
"notNull": false,
|
|
650
|
+
"unique": false
|
|
651
|
+
},
|
|
652
|
+
"allowed_formats": {
|
|
653
|
+
"type": "JSON",
|
|
654
|
+
"notNull": false,
|
|
655
|
+
"unique": false,
|
|
656
|
+
"default": []
|
|
657
|
+
},
|
|
658
|
+
"default_content_id": {
|
|
659
|
+
"type": "TEXT",
|
|
660
|
+
"notNull": false,
|
|
661
|
+
"unique": false
|
|
662
|
+
},
|
|
663
|
+
"metadata": {
|
|
664
|
+
"type": "JSON",
|
|
665
|
+
"notNull": false,
|
|
666
|
+
"unique": false,
|
|
667
|
+
"default": {}
|
|
506
668
|
}
|
|
507
669
|
},
|
|
508
670
|
"indexes": [
|
|
509
671
|
{
|
|
510
|
-
"name": "
|
|
672
|
+
"name": "zones_slug_context_idx",
|
|
511
673
|
"columns": [
|
|
674
|
+
"tenant_id",
|
|
512
675
|
"slug",
|
|
513
676
|
"context"
|
|
514
677
|
],
|
|
515
|
-
"unique": true
|
|
678
|
+
"unique": true,
|
|
679
|
+
"nullsNotDistinct": true
|
|
516
680
|
},
|
|
517
681
|
{
|
|
518
|
-
"name": "
|
|
682
|
+
"name": "zones_tenant_id_created_at_idx",
|
|
519
683
|
"columns": [
|
|
684
|
+
"tenant_id",
|
|
520
685
|
"created_at"
|
|
521
686
|
]
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
"name": "zones_parent_id_idx",
|
|
690
|
+
"columns": [
|
|
691
|
+
"parent_id"
|
|
692
|
+
]
|
|
693
|
+
},
|
|
694
|
+
{
|
|
695
|
+
"name": "zones_property_id_idx",
|
|
696
|
+
"columns": [
|
|
697
|
+
"property_id"
|
|
698
|
+
]
|
|
522
699
|
}
|
|
523
700
|
],
|
|
524
|
-
"version": "
|
|
701
|
+
"version": "a9fed5be"
|
|
525
702
|
}
|
|
526
703
|
},
|
|
527
704
|
"@happyvertical/smrt-properties:Property": {
|
|
@@ -774,7 +951,8 @@
|
|
|
774
951
|
"context",
|
|
775
952
|
"_meta_type"
|
|
776
953
|
],
|
|
777
|
-
"unique": true
|
|
954
|
+
"unique": true,
|
|
955
|
+
"nullsNotDistinct": true
|
|
778
956
|
},
|
|
779
957
|
{
|
|
780
958
|
"name": "properties_meta_type_idx",
|
|
@@ -1200,7 +1378,8 @@
|
|
|
1200
1378
|
"slug",
|
|
1201
1379
|
"context"
|
|
1202
1380
|
],
|
|
1203
|
-
"unique": true
|
|
1381
|
+
"unique": true,
|
|
1382
|
+
"nullsNotDistinct": true
|
|
1204
1383
|
},
|
|
1205
1384
|
{
|
|
1206
1385
|
"name": "zones_tenant_id_created_at_idx",
|
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.49.
|
|
6
|
+
"packageVersion": "0.49.5",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
10
|
+
"manifest": "643ae120b3d76c84f8889c8104501af230373bfef8dac1abf8fcc6d91e045176",
|
|
11
|
+
"packageJson": "792a50627edf7ef101aa44afcf4a7a0328f55fecf7130f58eec2070e437638de",
|
|
12
12
|
"agents": "a0f6fb35fa6c32a8c94158511c5f1722e1a96c2fcc01e790ec4b424d02845743"
|
|
13
13
|
},
|
|
14
14
|
"exports": [
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"name": "PropertyCollection",
|
|
47
47
|
"qualifiedName": "@happyvertical/smrt-properties:PropertyCollection",
|
|
48
48
|
"collection": "properties",
|
|
49
|
-
"tableName": "
|
|
49
|
+
"tableName": "properties",
|
|
50
50
|
"packageName": "@happyvertical/smrt-properties",
|
|
51
51
|
"extends": "SmrtCollection",
|
|
52
52
|
"fields": [],
|
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
"name": "ZoneCollection",
|
|
350
350
|
"qualifiedName": "@happyvertical/smrt-properties:ZoneCollection",
|
|
351
351
|
"collection": "zones",
|
|
352
|
-
"tableName": "
|
|
352
|
+
"tableName": "zones",
|
|
353
353
|
"packageName": "@happyvertical/smrt-properties",
|
|
354
354
|
"extends": "SmrtCollection",
|
|
355
355
|
"fields": [],
|
|
@@ -2491,7 +2491,7 @@
|
|
|
2491
2491
|
"junctionCollections": 0,
|
|
2492
2492
|
"hierarchicalObjects": 1,
|
|
2493
2493
|
"polymorphicAssociations": 0,
|
|
2494
|
-
"uuidColumns":
|
|
2494
|
+
"uuidColumns": 16
|
|
2495
2495
|
},
|
|
2496
2496
|
"agentDoc": "# @happyvertical/smrt-properties\n\nDigital properties (websites, apps) with hierarchical zones for content/ad placement.\n\n## Models\n\n- **Property** (STI): `domain`, `url`, optional repository/owner links. Status: active/inactive/pending. Methods dynamically import/create ZoneCollection for lazy loading.\n- **Zone**: hierarchical via `parentId`. `path`/`selector`/`dimensions` for placement. `allowedFormats` array. Tree operations: `getAncestors()`, `getDescendants()`, `getFullPath()`, `moveZone()` (with cycle detection).\n\n## ZoneCollection Key Methods\n\n`getTree()` (builds nested structure), `moveZone()` (validates against descendant cycles), `deleteZone(cascade?)` (cascade=false orphans children to parent), `findWithGlobals(tenantId)`.\n\nIn-memory depth caching prevents N+1 queries during tree operations.\n\n## Property Key Methods\n\n- `getZones()` / `getZoneTree()` / `createZone()` — ZoneCollection wrappers loaded lazily via dynamic import.\n- `isActive()` — convenience status check.\n- AI: `summarize()` (uses `smrtProperties.property.summarize` prompt via `@happyvertical/smrt-prompts`).\n\n## Prompt Registry\n\n`Property.summarize()` is registered with `@happyvertical/smrt-prompts` so tenants can override the template/model/params at runtime:\n\n```typescript\nimport { smrtPropertiesSummarizePrompt } from '@happyvertical/smrt-properties';\n// key: 'smrtProperties.property.summarize'\n```\n\nOnly non-PII fields are passed to the AI provider: `name`, `domain`, `description`, `status`, plus aggregate zone information (count + top-level zone names). Internal foreign-key fields (`ownerId`, `repositoryId`, `tenantId`) and the extensible `metadata` blob are intentionally excluded — `metadata` may contain analytics IDs or tenant-private configuration.\n\n## Gotchas\n\n- **Empty allowedFormats = all formats**: empty array means no restrictions, not no formats\n- **Zone dimensions nullable independently**: check `hasDimensions()` before using width/height\n- **deleteZone(cascade=false)**: doesn't delete children — moves them to parent (orphan pattern)\n- **Optional tenancy** on both models\n"
|
|
2497
2497
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-properties",
|
|
3
|
-
"version": "0.49.
|
|
3
|
+
"version": "0.49.5",
|
|
4
4
|
"description": "Digital property and zone management models for SMRT framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"./manifest.json": "./dist/manifest.json"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@happyvertical/smrt-core": "0.49.
|
|
23
|
-
"@happyvertical/smrt-prompts": "0.49.
|
|
24
|
-
"@happyvertical/smrt-tenancy": "0.49.
|
|
22
|
+
"@happyvertical/smrt-core": "0.49.5",
|
|
23
|
+
"@happyvertical/smrt-prompts": "0.49.5",
|
|
24
|
+
"@happyvertical/smrt-tenancy": "0.49.5"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@happyvertical/smrt-cli": "0.49.
|
|
28
|
-
"@happyvertical/smrt-vitest": "0.49.
|
|
27
|
+
"@happyvertical/smrt-cli": "0.49.5",
|
|
28
|
+
"@happyvertical/smrt-vitest": "0.49.5",
|
|
29
29
|
"@happyvertical/sql": "^0.89.6",
|
|
30
30
|
"@types/node": "24.13.2",
|
|
31
31
|
"fast-glob": "3.3.3",
|