@happyvertical/smrt-properties 0.51.31 → 0.51.33
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/__smrt-register__.d.ts +2 -0
- package/dist/__smrt-register__.d.ts.map +1 -0
- package/dist/collections/Properties.d.ts +92 -0
- package/dist/collections/Properties.d.ts.map +1 -0
- package/dist/collections/Zones.d.ts +137 -0
- package/dist/collections/Zones.d.ts.map +1 -0
- package/dist/collections/index.d.ts +3 -0
- package/dist/collections/index.d.ts.map +1 -0
- package/dist/index.d.ts +68 -445
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -1
- package/dist/manifest.json +1 -1
- package/dist/models/Property.d.ts +80 -0
- package/dist/models/Property.d.ts.map +1 -0
- package/dist/models/Zone.d.ts +97 -0
- package/dist/models/Zone.d.ts.map +1 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/prompts.d.ts +17 -0
- package/dist/prompts.d.ts.map +1 -0
- package/dist/smrt-knowledge.json +4 -4
- package/dist/types.d.ts +55 -58
- package/dist/types.d.ts.map +1 -0
- 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.51.31\",\"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\"},\"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\":{},\"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\"},\"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\"},\"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\"},\"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\",\"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\"},\"importPath\":\"@happyvertical/smrt-properties\"}},\"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.51.33\",\"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\"},\"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\":{},\"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\"},\"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\"},\"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\"},\"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\",\"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\"},\"importPath\":\"@happyvertical/smrt-properties\"}},\"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
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Property model - Digital property representation
|
|
3
|
+
*
|
|
4
|
+
* Represents a digital property (website, app, publication) that can contain
|
|
5
|
+
* hierarchical zones for content/ad placement.
|
|
6
|
+
*/
|
|
7
|
+
import { SmrtObject } from '@happyvertical/smrt-core';
|
|
8
|
+
import type { PropertyOptions, PropertyStatus } from '../types';
|
|
9
|
+
export declare class Property extends SmrtObject {
|
|
10
|
+
/**
|
|
11
|
+
* Tenant ID for multi-tenant isolation
|
|
12
|
+
*/
|
|
13
|
+
tenantId: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Display name of the property
|
|
16
|
+
*/
|
|
17
|
+
name: string;
|
|
18
|
+
/**
|
|
19
|
+
* Domain name (e.g., "oakcreeknews.com")
|
|
20
|
+
*/
|
|
21
|
+
domain: string;
|
|
22
|
+
/**
|
|
23
|
+
* Full URL (e.g., "https://oakcreeknews.com")
|
|
24
|
+
*/
|
|
25
|
+
url: string;
|
|
26
|
+
/**
|
|
27
|
+
* Property description
|
|
28
|
+
*/
|
|
29
|
+
description: string;
|
|
30
|
+
/**
|
|
31
|
+
* Link to Repository (from smrt-projects)
|
|
32
|
+
* Optional - used when property is backed by a git repository
|
|
33
|
+
*/
|
|
34
|
+
repositoryId: string | null;
|
|
35
|
+
/**
|
|
36
|
+
* Link to Profile (from smrt-profiles)
|
|
37
|
+
* Optional - owner/publisher of the property
|
|
38
|
+
*/
|
|
39
|
+
ownerId: string | null;
|
|
40
|
+
/**
|
|
41
|
+
* Property status
|
|
42
|
+
*/
|
|
43
|
+
status: PropertyStatus;
|
|
44
|
+
/**
|
|
45
|
+
* Extensible metadata (analytics IDs, config, etc.)
|
|
46
|
+
*/
|
|
47
|
+
metadata: Record<string, unknown>;
|
|
48
|
+
constructor(options?: PropertyOptions);
|
|
49
|
+
/**
|
|
50
|
+
* Get all zones for this property
|
|
51
|
+
*/
|
|
52
|
+
getZones(): Promise<import('./Zone').Zone[]>;
|
|
53
|
+
/**
|
|
54
|
+
* Get zone tree for this property
|
|
55
|
+
*/
|
|
56
|
+
getZoneTree(): Promise<import('../types').ZoneTree<import('./Zone').Zone>>;
|
|
57
|
+
/**
|
|
58
|
+
* Create a zone on this property
|
|
59
|
+
*/
|
|
60
|
+
createZone(options: Omit<import('../types').ZoneOptions, 'propertyId'>): Promise<import('./Zone').Zone>;
|
|
61
|
+
/**
|
|
62
|
+
* Check if property is active
|
|
63
|
+
*/
|
|
64
|
+
isActive(): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* AI-powered: Generate a summary of the property and its zones.
|
|
67
|
+
*
|
|
68
|
+
* Uses the `smrtProperties.property.summarize` prompt registered via
|
|
69
|
+
* `@happyvertical/smrt-prompts`, allowing tenant- or instance-level
|
|
70
|
+
* overrides of the template, model, and parameters at runtime.
|
|
71
|
+
*
|
|
72
|
+
* Only non-PII fields (name, domain, description, status) plus aggregate
|
|
73
|
+
* zone information are sent to the AI provider. Internal foreign-key
|
|
74
|
+
* fields and the extensible `metadata` blob are intentionally excluded.
|
|
75
|
+
*
|
|
76
|
+
* @returns Generated summary text
|
|
77
|
+
*/
|
|
78
|
+
summarize(): Promise<string>;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=Property.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Property.d.ts","sourceRoot":"","sources":["../../src/models/Property.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAmB,UAAU,EAAQ,MAAM,0BAA0B,CAAC;AAO7E,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAEhE,qBAOa,QAAS,SAAQ,UAAU;IACtC;;OAEG;IAEH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE/B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAM;IAElB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAM;IAEpB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAM;IAEjB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAM;IAEzB;;;OAGG;IAEH,YAAY,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEnC;;;OAGG;IAEH,OAAO,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE9B;;OAEG;IACH,MAAM,EAAE,cAAc,CAAY;IAElC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;gBAE3B,OAAO,GAAE,eAAoB;IAezC;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,OAAO,QAAQ,EAAE,IAAI,EAAE,CAAC;IAOlD;;OAEG;IACG,WAAW,IAAI,OAAO,CAC1B,OAAO,UAAU,EAAE,QAAQ,CAAC,OAAO,QAAQ,EAAE,IAAI,CAAC,CACnD;IAOD;;OAEG;IACG,UAAU,CACd,OAAO,EAAE,IAAI,CAAC,OAAO,UAAU,EAAE,WAAW,EAAE,YAAY,CAAC,GAC1D,OAAO,CAAC,OAAO,QAAQ,EAAE,IAAI,CAAC;IAcjC;;OAEG;IACH,QAAQ,IAAI,OAAO;IAInB;;;;;;;;;;;;OAYG;IACG,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC;CAqCnC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zone model - Hierarchical placement area within a property
|
|
3
|
+
*
|
|
4
|
+
* Zones represent pages, sections, or slots within a digital property.
|
|
5
|
+
* They can be nested arbitrarily using the parentId self-reference.
|
|
6
|
+
*/
|
|
7
|
+
import { SmrtHierarchical } from '@happyvertical/smrt-core';
|
|
8
|
+
import type { ZoneOptions, ZoneTreeNode } from '../types';
|
|
9
|
+
export declare class Zone extends SmrtHierarchical {
|
|
10
|
+
/**
|
|
11
|
+
* Tenant ID for multi-tenant isolation
|
|
12
|
+
*/
|
|
13
|
+
tenantId: string | null;
|
|
14
|
+
/**
|
|
15
|
+
* Parent property ID (required)
|
|
16
|
+
*/
|
|
17
|
+
propertyId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Display name
|
|
20
|
+
*/
|
|
21
|
+
name: string;
|
|
22
|
+
/**
|
|
23
|
+
* Zone type (descriptive, not structural)
|
|
24
|
+
* Common values: "page", "section", "slot", "container", "widget"
|
|
25
|
+
*/
|
|
26
|
+
type: string;
|
|
27
|
+
/**
|
|
28
|
+
* URL path pattern (e.g., "/", "/articles/*")
|
|
29
|
+
*/
|
|
30
|
+
path: string;
|
|
31
|
+
/**
|
|
32
|
+
* CSS selector for placement (e.g., "#header", ".sidebar")
|
|
33
|
+
*/
|
|
34
|
+
selector: string;
|
|
35
|
+
/**
|
|
36
|
+
* Position hint (e.g., "top", "after-paragraph-3")
|
|
37
|
+
*/
|
|
38
|
+
position: string;
|
|
39
|
+
/**
|
|
40
|
+
* Width in pixels (null = fluid)
|
|
41
|
+
*/
|
|
42
|
+
width: number | null;
|
|
43
|
+
/**
|
|
44
|
+
* Height in pixels (null = fluid)
|
|
45
|
+
*/
|
|
46
|
+
height: number | null;
|
|
47
|
+
/**
|
|
48
|
+
* Allowed content/ad formats
|
|
49
|
+
*/
|
|
50
|
+
allowedFormats: string[];
|
|
51
|
+
/**
|
|
52
|
+
* Default content/asset ID for fallback
|
|
53
|
+
*/
|
|
54
|
+
defaultContentId: string | null;
|
|
55
|
+
/**
|
|
56
|
+
* Extensible metadata
|
|
57
|
+
*/
|
|
58
|
+
metadata: Record<string, unknown>;
|
|
59
|
+
constructor(options?: ZoneOptions);
|
|
60
|
+
/**
|
|
61
|
+
* Check if this is a top-level zone (no parent)
|
|
62
|
+
*/
|
|
63
|
+
isTopLevel(): boolean;
|
|
64
|
+
/**
|
|
65
|
+
* Check if this zone has dimensions set
|
|
66
|
+
*/
|
|
67
|
+
hasDimensions(): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Get dimensions as string (e.g., "728x90")
|
|
70
|
+
*/
|
|
71
|
+
getDimensionString(): string | null;
|
|
72
|
+
/**
|
|
73
|
+
* Get the parent property
|
|
74
|
+
*/
|
|
75
|
+
getProperty(): Promise<import('./Property').Property | null>;
|
|
76
|
+
/**
|
|
77
|
+
* Get the full path from root to this zone
|
|
78
|
+
*/
|
|
79
|
+
getFullPath(): Promise<string>;
|
|
80
|
+
/**
|
|
81
|
+
* Get the depth in the hierarchy (0 = top-level)
|
|
82
|
+
*/
|
|
83
|
+
getDepth(): Promise<number>;
|
|
84
|
+
/**
|
|
85
|
+
* Create a child zone under this zone
|
|
86
|
+
*/
|
|
87
|
+
createChild(options: Omit<ZoneOptions, 'propertyId' | 'parentId'>): Promise<Zone>;
|
|
88
|
+
/**
|
|
89
|
+
* Build tree node for this zone and its children
|
|
90
|
+
*/
|
|
91
|
+
toTreeNode(): Promise<ZoneTreeNode<Zone>>;
|
|
92
|
+
/**
|
|
93
|
+
* Check if a format is allowed in this zone
|
|
94
|
+
*/
|
|
95
|
+
isFormatAllowed(format: string): boolean;
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=Zone.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Zone.d.ts","sourceRoot":"","sources":["../../src/models/Zone.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAc,gBAAgB,EAAQ,MAAM,0BAA0B,CAAC;AAE9E,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE1D,qBAMa,IAAK,SAAQ,gBAAgB;IACxC;;OAEG;IAEH,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE/B;;OAEG;IAEH,UAAU,EAAE,MAAM,CAAM;IAIxB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAM;IAElB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAM;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAM;IAElB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAM;IAEtB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAM;IAEtB;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE5B;;OAEG;IACH,MAAM,EAAE,MAAM,GAAG,IAAI,CAAQ;IAE7B;;OAEG;IACH,cAAc,EAAE,MAAM,EAAE,CAAM;IAE9B;;OAEG;IACH,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEvC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAM;gBAE3B,OAAO,GAAE,WAAgB;IAmBrC;;OAEG;IACH,UAAU,IAAI,OAAO;IAIrB;;OAEG;IACH,aAAa,IAAI,OAAO;IAIxB;;OAEG;IACH,kBAAkB,IAAI,MAAM,GAAG,IAAI;IAKnC;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,OAAO,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAC;IAYlE;;OAEG;IACG,WAAW,IAAI,OAAO,CAAC,MAAM,CAAC;IAMpC;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;IAKjC;;OAEG;IACG,WAAW,CACf,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,YAAY,GAAG,UAAU,CAAC,GACpD,OAAO,CAAC,IAAI,CAAC;IAehB;;OAEG;IACG,UAAU,IAAI,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;IAS/C;;OAEG;IACH,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO;CAIzC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/models/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prompt registrations for the @happyvertical/smrt-properties package.
|
|
3
|
+
*
|
|
4
|
+
* Prompts are registered at module-load time via `definePrompt()` so that
|
|
5
|
+
* tenant-aware overrides can be applied at call time via `resolvePrompt()`.
|
|
6
|
+
*
|
|
7
|
+
* Mirrors the pattern used by `@happyvertical/smrt-profiles` (see
|
|
8
|
+
* `prompts.ts`) and `@happyvertical/smrt-content` (see `content-prompts.ts`).
|
|
9
|
+
*/
|
|
10
|
+
import { type ResolvedPromptAI } from '@happyvertical/smrt-prompts';
|
|
11
|
+
export declare const smrtPropertiesSummarizePrompt: import("@happyvertical/smrt-prompts").PromptDefinition;
|
|
12
|
+
export declare function promptMessageOptions(ai: ResolvedPromptAI): {
|
|
13
|
+
maxTokens?: number | undefined;
|
|
14
|
+
temperature?: number | undefined;
|
|
15
|
+
model?: string | undefined;
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=prompts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,6BAA6B,CAAC;AASrC,eAAO,MAAM,6BAA6B,wDAexC,CAAC;AAEH,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,gBAAgB;;;;EASxD"}
|
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.51.
|
|
6
|
+
"packageVersion": "0.51.33",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
10
|
+
"manifest": "6c787031284489e489f99969ec62427a5f66878009303d312f97a73136318294",
|
|
11
|
+
"packageJson": "4bf2e387f8a1459283ffb65119c0b7f0ad9301af9df717d071224165180259ed",
|
|
12
12
|
"agents": "a0f6fb35fa6c32a8c94158511c5f1722e1a96c2fcc01e790ec4b424d02845743"
|
|
13
13
|
},
|
|
14
14
|
"exports": [
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"@happyvertical/sql": "catalog:",
|
|
26
26
|
"@types/node": "24.13.6",
|
|
27
27
|
"fast-glob": "3.3.3",
|
|
28
|
-
"typescript": "
|
|
28
|
+
"typescript": "6.0.3",
|
|
29
29
|
"vite": "8.1.4",
|
|
30
30
|
"vitest": "4.1.10"
|
|
31
31
|
},
|
package/dist/types.d.ts
CHANGED
|
@@ -1,58 +1,55 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Options for creating a Zone instance
|
|
25
|
-
*/
|
|
26
|
-
export
|
|
27
|
-
tenantId?: string | null;
|
|
28
|
-
propertyId?: string;
|
|
29
|
-
parentId?: string | null;
|
|
30
|
-
name?: string;
|
|
31
|
-
type?: string;
|
|
32
|
-
path?: string;
|
|
33
|
-
selector?: string;
|
|
34
|
-
position?: string;
|
|
35
|
-
width?: number | null;
|
|
36
|
-
height?: number | null;
|
|
37
|
-
allowedFormats?: string[];
|
|
38
|
-
defaultContentId?: string | null;
|
|
39
|
-
metadata?: Record<string, unknown>;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export { }
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for @happyvertical/smrt-properties
|
|
3
|
+
*/
|
|
4
|
+
import type { SmrtObjectOptions } from '@happyvertical/smrt-core';
|
|
5
|
+
/**
|
|
6
|
+
* Status of a digital property
|
|
7
|
+
*/
|
|
8
|
+
export type PropertyStatus = 'active' | 'inactive' | 'pending';
|
|
9
|
+
/**
|
|
10
|
+
* Options for creating a Property instance
|
|
11
|
+
*/
|
|
12
|
+
export interface PropertyOptions extends SmrtObjectOptions {
|
|
13
|
+
tenantId?: string | null;
|
|
14
|
+
name?: string;
|
|
15
|
+
domain?: string;
|
|
16
|
+
url?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
repositoryId?: string | null;
|
|
19
|
+
ownerId?: string | null;
|
|
20
|
+
status?: PropertyStatus;
|
|
21
|
+
metadata?: Record<string, unknown>;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Options for creating a Zone instance
|
|
25
|
+
*/
|
|
26
|
+
export interface ZoneOptions extends SmrtObjectOptions {
|
|
27
|
+
tenantId?: string | null;
|
|
28
|
+
propertyId?: string;
|
|
29
|
+
parentId?: string | null;
|
|
30
|
+
name?: string;
|
|
31
|
+
type?: string;
|
|
32
|
+
path?: string;
|
|
33
|
+
selector?: string;
|
|
34
|
+
position?: string;
|
|
35
|
+
width?: number | null;
|
|
36
|
+
height?: number | null;
|
|
37
|
+
allowedFormats?: string[];
|
|
38
|
+
defaultContentId?: string | null;
|
|
39
|
+
metadata?: Record<string, unknown>;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* A node in the zone tree hierarchy
|
|
43
|
+
*/
|
|
44
|
+
export interface ZoneTreeNode<T = unknown> {
|
|
45
|
+
zone: T;
|
|
46
|
+
children: ZoneTreeNode<T>[];
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Complete zone tree for a property
|
|
50
|
+
*/
|
|
51
|
+
export interface ZoneTree<T = unknown> {
|
|
52
|
+
propertyId: string;
|
|
53
|
+
roots: ZoneTreeNode<T>[];
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,GAAG,SAAS,CAAC;AAE/D;;GAEG;AACH,MAAM,WAAW,eAAgB,SAAQ,iBAAiB;IACxD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,iBAAiB;IACpD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC,GAAG,OAAO;IACvC,IAAI,EAAE,CAAC,CAAC;IACR,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ,CAAC,CAAC,GAAG,OAAO;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;CAC1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-properties",
|
|
3
|
-
"version": "0.51.
|
|
3
|
+
"version": "0.51.33",
|
|
4
4
|
"description": "Digital property and zone management models for SMRT framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -19,17 +19,17 @@
|
|
|
19
19
|
"./manifest.json": "./dist/manifest.json"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@happyvertical/smrt-core": "0.51.
|
|
23
|
-
"@happyvertical/smrt-prompts": "0.51.
|
|
24
|
-
"@happyvertical/smrt-tenancy": "0.51.
|
|
22
|
+
"@happyvertical/smrt-core": "0.51.33",
|
|
23
|
+
"@happyvertical/smrt-prompts": "0.51.33",
|
|
24
|
+
"@happyvertical/smrt-tenancy": "0.51.33"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@happyvertical/smrt-cli": "0.51.
|
|
28
|
-
"@happyvertical/smrt-vitest": "0.51.
|
|
27
|
+
"@happyvertical/smrt-cli": "0.51.33",
|
|
28
|
+
"@happyvertical/smrt-vitest": "0.51.33",
|
|
29
29
|
"@happyvertical/sql": "^0.94.1",
|
|
30
30
|
"@types/node": "24.13.6",
|
|
31
31
|
"fast-glob": "3.3.3",
|
|
32
|
-
"typescript": "
|
|
32
|
+
"typescript": "6.0.3",
|
|
33
33
|
"vite": "8.1.4",
|
|
34
34
|
"vitest": "4.1.10"
|
|
35
35
|
},
|