@happyvertical/smrt-tags 0.46.0 → 0.47.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/manifest.json +50 -12
- package/dist/smrt-knowledge.json +111 -9
- package/package.json +4 -4
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-tags\",\"packageVersion\":\"0.46.0\",\"objects\":{\"@happyvertical/smrt-tags:TagAlias\":{\"name\":\"tagalias\",\"className\":\"TagAlias\",\"qualifiedName\":\"@happyvertical/smrt-tags:TagAlias\",\"collection\":\"tagaliases\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/tags/src/tag-alias.ts\",\"packageName\":\"@happyvertical/smrt-tags\",\"fields\":{\"created_at\":{\"type\":\"datetime\",\"required\":false},\"updated_at\":{\"type\":\"datetime\",\"required\":false},\"tagSlug\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"alias\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"language\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"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}}},\"createdAt\":{\"type\":\"datetime\",\"required\":false}},\"methods\":{\"getTag\":{\"name\":\"getTag\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Tag | null>\",\"isStatic\":false,\"isPublic\":true},\"searchByAlias\":{\"name\":\"searchByAlias\",\"async\":true,\"parameters\":[{\"name\":\"_alias\",\"type\":\"string\",\"optional\":false},{\"name\":\"_language\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":true,\"isPublic\":true},\"getAliasesForTag\":{\"name\":\"getAliasesForTag\",\"async\":true,\"parameters\":[{\"name\":\"_tagSlug\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<TagAlias[]>\",\"isStatic\":true,\"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\":\"TagAlias\",\"collectionExportName\":\"TagAliasCollection\",\"validationRules\":[{\"field\":\"alias\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"tag_aliases\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"tag_aliases\\\" (\\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 \\\"tag_slug\\\" TEXT DEFAULT '',\\n \\\"alias\\\" TEXT DEFAULT '',\\n \\\"language\\\" TEXT DEFAULT '',\\n \\\"tenant_id\\\" UUID\\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\"},\"tag_slug\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"alias\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"language\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false}},\"indexes\":[{\"name\":\"tag_aliases_slug_context_meta_type_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\",\"_meta_type\"],\"unique\":true},{\"name\":\"tag_aliases_meta_type_idx\",\"columns\":[\"_meta_type\"]},{\"name\":\"tag_aliases_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]}],\"version\":\"95a4bc18\"}},\"@happyvertical/smrt-tags:TagAliasCollection\":{\"name\":\"tagaliascollection\",\"className\":\"TagAliasCollection\",\"qualifiedName\":\"@happyvertical/smrt-tags:TagAliasCollection\",\"collection\":\"tagaliases\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/tags/src/tag-aliases.ts\",\"packageName\":\"@happyvertical/smrt-tags\",\"fields\":{},\"methods\":{\"addAlias\":{\"name\":\"addAlias\",\"async\":true,\"parameters\":[{\"name\":\"tagSlug\",\"type\":\"string\",\"optional\":false},{\"name\":\"alias\",\"type\":\"string\",\"optional\":false},{\"name\":\"language\",\"type\":\"string\",\"optional\":true},{\"name\":\"context\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<TagAlias>\",\"isStatic\":false,\"isPublic\":true},\"searchByAlias\":{\"name\":\"searchByAlias\",\"async\":true,\"parameters\":[{\"name\":\"alias\",\"type\":\"string\",\"optional\":false},{\"name\":\"language\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":false,\"isPublic\":true},\"getAliasesForTag\":{\"name\":\"getAliasesForTag\",\"async\":true,\"parameters\":[{\"name\":\"tagSlug\",\"type\":\"string\",\"optional\":false},{\"name\":\"language\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<TagAlias[]>\",\"isStatic\":false,\"isPublic\":true},\"removeAlias\":{\"name\":\"removeAlias\",\"async\":true,\"parameters\":[{\"name\":\"aliasId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"bulkAddAliases\":{\"name\":\"bulkAddAliases\",\"async\":true,\"parameters\":[{\"name\":\"tagSlug\",\"type\":\"string\",\"optional\":false},{\"name\":\"aliases\",\"type\":\"Array<object>\",\"optional\":false}],\"returnType\":\"Promise<TagAlias[]>\",\"isStatic\":false,\"isPublic\":true},\"getAliasesByLanguage\":{\"name\":\"getAliasesByLanguage\",\"async\":true,\"parameters\":[{\"name\":\"tagSlug\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Map<string, string[]>>\",\"isStatic\":false,\"isPublic\":true},\"findMatchingAliases\":{\"name\":\"findMatchingAliases\",\"async\":true,\"parameters\":[{\"name\":\"query\",\"type\":\"string\",\"optional\":false},{\"name\":\"language\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<TagAlias[]>\",\"isStatic\":false,\"isPublic\":true},\"findByTenant\":{\"name\":\"findByTenant\",\"async\":true,\"parameters\":[{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<TagAlias[]>\",\"isStatic\":false,\"isPublic\":true},\"findGlobal\":{\"name\":\"findGlobal\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<TagAlias[]>\",\"isStatic\":false,\"isPublic\":true},\"findWithGlobals\":{\"name\":\"findWithGlobals\",\"async\":true,\"parameters\":[{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<TagAlias[]>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"TagAlias\",\"exportName\":\"TagAliasCollection\",\"collectionExportName\":\"TagAliasCollectionCollection\",\"schema\":{\"tableName\":\"tag_alias_collections\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"tag_alias_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\":\"tag_alias_collections_slug_context_idx\",\"columns\":[\"slug\",\"context\"],\"unique\":true},{\"name\":\"tag_alias_collections_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"1a92c60d\"}},\"@happyvertical/smrt-tags:Tag\":{\"name\":\"tag\",\"className\":\"Tag\",\"qualifiedName\":\"@happyvertical/smrt-tags:Tag\",\"collection\":\"tags\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/tags/src/tag.ts\",\"packageName\":\"@happyvertical/smrt-tags\",\"fields\":{\"created_at\":{\"type\":\"datetime\",\"required\":false},\"updated_at\":{\"type\":\"datetime\",\"required\":false},\"parentId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"Tag\",\"_meta\":{\"nullable\":true}},\"name\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"level\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"description\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"metadata\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"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}}},\"createdAt\":{\"type\":\"datetime\",\"required\":false},\"updatedAt\":{\"type\":\"datetime\",\"required\":false}},\"methods\":{\"getParent\":{\"name\":\"getParent\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<null>\",\"isStatic\":false,\"isPublic\":true},\"getChildren\":{\"name\":\"getChildren\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"getAncestors\":{\"name\":\"getAncestors\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"getDescendants\":{\"name\":\"getDescendants\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise\",\"isStatic\":false,\"isPublic\":true},\"getHierarchy\":{\"name\":\"getHierarchy\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<HierarchyView>\",\"isStatic\":false,\"isPublic\":true},\"moveTo\":{\"name\":\"moveTo\",\"async\":true,\"parameters\":[{\"name\":\"newParent\",\"type\":\"string | null\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getMetadata\":{\"name\":\"getMetadata\",\"async\":false,\"parameters\":[],\"returnType\":\"TagMetadata\",\"isStatic\":false,\"isPublic\":true},\"setMetadata\":{\"name\":\"setMetadata\",\"async\":false,\"parameters\":[{\"name\":\"data\",\"type\":\"TagMetadata\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"updateMetadata\":{\"name\":\"updateMetadata\",\"async\":false,\"parameters\":[{\"name\":\"updates\",\"type\":\"Partial<TagMetadata>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getBySlug\":{\"name\":\"getBySlug\",\"async\":true,\"parameters\":[{\"name\":\"_slug\",\"type\":\"string\",\"optional\":false},{\"name\":\"_context\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<Tag | null>\",\"isStatic\":true,\"isPublic\":true},\"getRootTags\":{\"name\":\"getRootTags\",\"async\":true,\"parameters\":[{\"name\":\"_context\",\"type\":\"string\",\"optional\":true,\"default\":\"global\"}],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":true,\"isPublic\":true}},\"decoratorConfig\":{\"tableStrategy\":\"sti\",\"api\":{\"include\":[\"list\",\"get\",\"create\",\"update\",\"delete\"]},\"mcp\":{\"include\":[\"list\",\"get\",\"create\",\"update\"]},\"cli\":{\"skipApiCheck\":true},\"tenantScoped\":{\"mode\":\"optional\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\",\"_meta_type\"]},\"extends\":\"SmrtHierarchical\",\"exportName\":\"Tag\",\"collectionExportName\":\"TagCollection\",\"validationRules\":[{\"field\":\"name\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"tags\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"tags\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"_meta_type\\\" TEXT NOT NULL,\\n \\\"_meta_data\\\" JSON,\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"parent_id\\\" UUID,\\n \\\"name\\\" TEXT DEFAULT '',\\n \\\"level\\\" INTEGER DEFAULT 0,\\n \\\"description\\\" TEXT DEFAULT '',\\n \\\"metadata\\\" TEXT DEFAULT '',\\n \\\"tenant_id\\\" UUID\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"_meta_type\":{\"type\":\"TEXT\",\"notNull\":true},\"_meta_data\":{\"type\":\"JSON\",\"notNull\":false},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"parent_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"foreignKey\":{\"table\":\"tags\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"name\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"level\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":0},\"description\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false}},\"indexes\":[{\"name\":\"tags_slug_context_meta_type_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\",\"_meta_type\"],\"unique\":true},{\"name\":\"tags_meta_type_idx\",\"columns\":[\"_meta_type\"]},{\"name\":\"tags_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"tags_parent_id_idx\",\"columns\":[\"parent_id\"]}],\"version\":\"4da9de3e\"}},\"@happyvertical/smrt-tags:TagCollection\":{\"name\":\"tagcollection\",\"className\":\"TagCollection\",\"qualifiedName\":\"@happyvertical/smrt-tags:TagCollection\",\"collection\":\"tags\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/tags/src/tags.ts\",\"packageName\":\"@happyvertical/smrt-tags\",\"fields\":{},\"methods\":{\"getOrCreate\":{\"name\":\"getOrCreate\",\"async\":true,\"parameters\":[{\"name\":\"slug\",\"type\":\"string\",\"optional\":false},{\"name\":\"context\",\"type\":\"string\",\"optional\":true,\"default\":\"global\"}],\"returnType\":\"Promise<Tag>\",\"isStatic\":false,\"isPublic\":true},\"listByContext\":{\"name\":\"listByContext\",\"async\":true,\"parameters\":[{\"name\":\"context\",\"type\":\"string\",\"optional\":false},{\"name\":\"parentSlug\",\"type\":\"string | null\",\"optional\":true}],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":false,\"isPublic\":true},\"getRootTags\":{\"name\":\"getRootTags\",\"async\":true,\"parameters\":[{\"name\":\"context\",\"type\":\"string\",\"optional\":true,\"default\":\"global\"}],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":false,\"isPublic\":true},\"getChildren\":{\"name\":\"getChildren\",\"async\":true,\"parameters\":[{\"name\":\"parentSlug\",\"type\":\"string\",\"optional\":false},{\"name\":\"context\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":false,\"isPublic\":true},\"getHierarchy\":{\"name\":\"getHierarchy\",\"async\":true,\"parameters\":[{\"name\":\"slug\",\"type\":\"string\",\"optional\":false},{\"name\":\"context\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<TagHierarchy>\",\"isStatic\":false,\"isPublic\":true},\"moveTag\":{\"name\":\"moveTag\",\"async\":true,\"parameters\":[{\"name\":\"slug\",\"type\":\"string\",\"optional\":false},{\"name\":\"newParentSlug\",\"type\":\"string | null\",\"optional\":false},{\"name\":\"context\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"mergeTag\":{\"name\":\"mergeTag\",\"async\":true,\"parameters\":[{\"name\":\"fromSlug\",\"type\":\"string\",\"optional\":false},{\"name\":\"toSlug\",\"type\":\"string\",\"optional\":false},{\"name\":\"context\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"cleanupUnused\":{\"name\":\"cleanupUnused\",\"async\":true,\"parameters\":[{\"name\":\"context\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true},\"calculateLevel\":{\"name\":\"calculateLevel\",\"async\":true,\"parameters\":[{\"name\":\"parentSlug\",\"type\":\"string | null\",\"optional\":false},{\"name\":\"context\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true},\"findByTenant\":{\"name\":\"findByTenant\",\"async\":true,\"parameters\":[{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":false,\"isPublic\":true},\"findGlobal\":{\"name\":\"findGlobal\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":false,\"isPublic\":true},\"findWithGlobals\":{\"name\":\"findWithGlobals\",\"async\":true,\"parameters\":[{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"Tag\",\"exportName\":\"TagCollection\",\"collectionExportName\":\"TagCollectionCollection\",\"schema\":{\"tableName\":\"tag_collections\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"tag_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\":\"tag_collections_slug_context_idx\",\"columns\":[\"slug\",\"context\"],\"unique\":true},{\"name\":\"tag_collections_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"42236c49\"}}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-core\",\"@happyvertical/smrt-tenancy\"]}"));
|
|
17
|
+
ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-tags\",\"packageVersion\":\"0.47.0\",\"objects\":{\"@happyvertical/smrt-tags:TagAlias\":{\"name\":\"tagalias\",\"className\":\"TagAlias\",\"qualifiedName\":\"@happyvertical/smrt-tags:TagAlias\",\"collection\":\"tagaliases\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/tags/src/tag-alias.ts\",\"packageName\":\"@happyvertical/smrt-tags\",\"fields\":{\"created_at\":{\"type\":\"datetime\",\"required\":false},\"updated_at\":{\"type\":\"datetime\",\"required\":false},\"tagSlug\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"alias\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"language\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"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}}},\"createdAt\":{\"type\":\"datetime\",\"required\":false}},\"methods\":{\"getTag\":{\"name\":\"getTag\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Tag | null>\",\"isStatic\":false,\"isPublic\":true},\"searchByAlias\":{\"name\":\"searchByAlias\",\"async\":true,\"parameters\":[{\"name\":\"_alias\",\"type\":\"string\",\"optional\":false},{\"name\":\"_language\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":true,\"isPublic\":true},\"getAliasesForTag\":{\"name\":\"getAliasesForTag\",\"async\":true,\"parameters\":[{\"name\":\"_tagSlug\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<TagAlias[]>\",\"isStatic\":true,\"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\":\"TagAlias\",\"collectionExportName\":\"TagAliasCollection\",\"validationRules\":[{\"field\":\"alias\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"tag_aliases\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"tag_aliases\\\" (\\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 \\\"tag_slug\\\" TEXT DEFAULT '',\\n \\\"alias\\\" TEXT DEFAULT '',\\n \\\"language\\\" TEXT DEFAULT '',\\n \\\"tenant_id\\\" UUID\\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\"},\"tag_slug\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"alias\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"language\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false}},\"indexes\":[{\"name\":\"tag_aliases_slug_context_meta_type_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\",\"_meta_type\"],\"unique\":true},{\"name\":\"tag_aliases_meta_type_idx\",\"columns\":[\"_meta_type\"]},{\"name\":\"tag_aliases_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]}],\"version\":\"95a4bc18\"}},\"@happyvertical/smrt-tags:TagAliasCollection\":{\"name\":\"tagaliascollection\",\"className\":\"TagAliasCollection\",\"qualifiedName\":\"@happyvertical/smrt-tags:TagAliasCollection\",\"collection\":\"tagaliases\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/tags/src/tag-aliases.ts\",\"packageName\":\"@happyvertical/smrt-tags\",\"fields\":{},\"methods\":{\"addAlias\":{\"name\":\"addAlias\",\"async\":true,\"parameters\":[{\"name\":\"tagSlug\",\"type\":\"string\",\"optional\":false},{\"name\":\"alias\",\"type\":\"string\",\"optional\":false},{\"name\":\"language\",\"type\":\"string\",\"optional\":true},{\"name\":\"context\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<TagAlias>\",\"isStatic\":false,\"isPublic\":true},\"searchByAlias\":{\"name\":\"searchByAlias\",\"async\":true,\"parameters\":[{\"name\":\"alias\",\"type\":\"string\",\"optional\":false},{\"name\":\"language\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":false,\"isPublic\":true},\"getAliasesForTag\":{\"name\":\"getAliasesForTag\",\"async\":true,\"parameters\":[{\"name\":\"tagSlug\",\"type\":\"string\",\"optional\":false},{\"name\":\"language\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<TagAlias[]>\",\"isStatic\":false,\"isPublic\":true},\"removeAlias\":{\"name\":\"removeAlias\",\"async\":true,\"parameters\":[{\"name\":\"aliasId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"bulkAddAliases\":{\"name\":\"bulkAddAliases\",\"async\":true,\"parameters\":[{\"name\":\"tagSlug\",\"type\":\"string\",\"optional\":false},{\"name\":\"aliases\",\"type\":\"Array<object>\",\"optional\":false,\"memberTypes\":[\"string\"]}],\"returnType\":\"Promise<TagAlias[]>\",\"isStatic\":false,\"isPublic\":true},\"getAliasesByLanguage\":{\"name\":\"getAliasesByLanguage\",\"async\":true,\"parameters\":[{\"name\":\"tagSlug\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Map<string, string[]>>\",\"isStatic\":false,\"isPublic\":true},\"findMatchingAliases\":{\"name\":\"findMatchingAliases\",\"async\":true,\"parameters\":[{\"name\":\"query\",\"type\":\"string\",\"optional\":false},{\"name\":\"language\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<TagAlias[]>\",\"isStatic\":false,\"isPublic\":true},\"findByTenant\":{\"name\":\"findByTenant\",\"async\":true,\"parameters\":[{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<TagAlias[]>\",\"isStatic\":false,\"isPublic\":true},\"findGlobal\":{\"name\":\"findGlobal\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<TagAlias[]>\",\"isStatic\":false,\"isPublic\":true},\"findWithGlobals\":{\"name\":\"findWithGlobals\",\"async\":true,\"parameters\":[{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<TagAlias[]>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"TagAlias\",\"exportName\":\"TagAliasCollection\",\"collectionExportName\":\"TagAliasCollectionCollection\",\"schema\":{\"tableName\":\"tag_alias_collections\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"tag_alias_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\":\"tag_alias_collections_slug_context_idx\",\"columns\":[\"slug\",\"context\"],\"unique\":true},{\"name\":\"tag_alias_collections_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"1a92c60d\"}},\"@happyvertical/smrt-tags:Tag\":{\"name\":\"tag\",\"className\":\"Tag\",\"qualifiedName\":\"@happyvertical/smrt-tags:Tag\",\"collection\":\"tags\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/tags/src/tag.ts\",\"packageName\":\"@happyvertical/smrt-tags\",\"fields\":{\"created_at\":{\"type\":\"datetime\",\"required\":false},\"updated_at\":{\"type\":\"datetime\",\"required\":false},\"parentId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"Tag\",\"_meta\":{\"nullable\":true}},\"name\":{\"type\":\"text\",\"required\":true,\"default\":\"\",\"_meta\":{\"required\":true}},\"level\":{\"type\":\"integer\",\"required\":false,\"default\":0},\"description\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"metadata\":{\"type\":\"text\",\"required\":false,\"default\":\"\"},\"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}}},\"createdAt\":{\"type\":\"datetime\",\"required\":false},\"updatedAt\":{\"type\":\"datetime\",\"required\":false}},\"methods\":{\"getParent\":{\"name\":\"getParent\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this | null>\",\"isStatic\":false,\"isPublic\":true},\"getChildren\":{\"name\":\"getChildren\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this[]>\",\"isStatic\":false,\"isPublic\":true},\"getAncestors\":{\"name\":\"getAncestors\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this[]>\",\"isStatic\":false,\"isPublic\":true},\"getDescendants\":{\"name\":\"getDescendants\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this[]>\",\"isStatic\":false,\"isPublic\":true},\"getHierarchy\":{\"name\":\"getHierarchy\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<HierarchyView<this>>\",\"isStatic\":false,\"isPublic\":true},\"moveTo\":{\"name\":\"moveTo\",\"async\":true,\"parameters\":[{\"name\":\"newParent\",\"type\":\"this | string | null\",\"optional\":false,\"unionBranches\":[{\"type\":\"this\"},{\"type\":\"string\"},{\"type\":\"null\"}]}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"getMetadata\":{\"name\":\"getMetadata\",\"async\":false,\"parameters\":[],\"returnType\":\"TagMetadata\",\"isStatic\":false,\"isPublic\":true},\"setMetadata\":{\"name\":\"setMetadata\",\"async\":false,\"parameters\":[{\"name\":\"data\",\"type\":\"TagMetadata\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"updateMetadata\":{\"name\":\"updateMetadata\",\"async\":false,\"parameters\":[{\"name\":\"updates\",\"type\":\"Partial<TagMetadata>\",\"optional\":false}],\"returnType\":\"void\",\"isStatic\":false,\"isPublic\":true},\"getBySlug\":{\"name\":\"getBySlug\",\"async\":true,\"parameters\":[{\"name\":\"_slug\",\"type\":\"string\",\"optional\":false},{\"name\":\"_context\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<Tag | null>\",\"isStatic\":true,\"isPublic\":true},\"getRootTags\":{\"name\":\"getRootTags\",\"async\":true,\"parameters\":[{\"name\":\"_context\",\"type\":\"string\",\"optional\":true,\"default\":\"global\"}],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":true,\"isPublic\":true}},\"decoratorConfig\":{\"tableStrategy\":\"sti\",\"api\":{\"include\":[\"list\",\"get\",\"create\",\"update\",\"delete\"]},\"mcp\":{\"include\":[\"list\",\"get\",\"create\",\"update\"]},\"cli\":{\"skipApiCheck\":true},\"tenantScoped\":{\"mode\":\"optional\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\",\"_meta_type\"]},\"extends\":\"SmrtHierarchical\",\"exportName\":\"Tag\",\"collectionExportName\":\"TagCollection\",\"validationRules\":[{\"field\":\"name\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"tags\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"tags\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"_meta_type\\\" TEXT NOT NULL,\\n \\\"_meta_data\\\" JSON,\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"parent_id\\\" UUID,\\n \\\"name\\\" TEXT DEFAULT '',\\n \\\"level\\\" INTEGER DEFAULT 0,\\n \\\"description\\\" TEXT DEFAULT '',\\n \\\"metadata\\\" TEXT DEFAULT '',\\n \\\"tenant_id\\\" UUID\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"_meta_type\":{\"type\":\"TEXT\",\"notNull\":true},\"_meta_data\":{\"type\":\"JSON\",\"notNull\":false},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"parent_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"foreignKey\":{\"table\":\"tags\",\"column\":\"id\",\"onDelete\":\"NO ACTION\",\"onUpdate\":\"CASCADE\"}},\"name\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"level\":{\"type\":\"INTEGER\",\"notNull\":false,\"default\":0},\"description\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"metadata\":{\"type\":\"TEXT\",\"notNull\":false,\"default\":\"\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false}},\"indexes\":[{\"name\":\"tags_slug_context_meta_type_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\",\"_meta_type\"],\"unique\":true},{\"name\":\"tags_meta_type_idx\",\"columns\":[\"_meta_type\"]},{\"name\":\"tags_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"tags_parent_id_idx\",\"columns\":[\"parent_id\"]}],\"version\":\"4da9de3e\"}},\"@happyvertical/smrt-tags:TagCollection\":{\"name\":\"tagcollection\",\"className\":\"TagCollection\",\"qualifiedName\":\"@happyvertical/smrt-tags:TagCollection\",\"collection\":\"tags\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/tags/src/tags.ts\",\"packageName\":\"@happyvertical/smrt-tags\",\"fields\":{},\"methods\":{\"getOrCreate\":{\"name\":\"getOrCreate\",\"async\":true,\"parameters\":[{\"name\":\"slug\",\"type\":\"string\",\"optional\":false},{\"name\":\"context\",\"type\":\"string\",\"optional\":true,\"default\":\"global\"}],\"returnType\":\"Promise<Tag>\",\"isStatic\":false,\"isPublic\":true},\"listByContext\":{\"name\":\"listByContext\",\"async\":true,\"parameters\":[{\"name\":\"context\",\"type\":\"string\",\"optional\":false},{\"name\":\"parentSlug\",\"type\":\"string | null\",\"optional\":true,\"unionBranches\":[{\"type\":\"string\"},{\"type\":\"null\"}]}],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":false,\"isPublic\":true},\"getRootTags\":{\"name\":\"getRootTags\",\"async\":true,\"parameters\":[{\"name\":\"context\",\"type\":\"string\",\"optional\":true,\"default\":\"global\"}],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":false,\"isPublic\":true},\"getChildren\":{\"name\":\"getChildren\",\"async\":true,\"parameters\":[{\"name\":\"parentSlug\",\"type\":\"string\",\"optional\":false},{\"name\":\"context\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":false,\"isPublic\":true},\"getHierarchy\":{\"name\":\"getHierarchy\",\"async\":true,\"parameters\":[{\"name\":\"slug\",\"type\":\"string\",\"optional\":false},{\"name\":\"context\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<TagHierarchy>\",\"isStatic\":false,\"isPublic\":true},\"moveTag\":{\"name\":\"moveTag\",\"async\":true,\"parameters\":[{\"name\":\"slug\",\"type\":\"string\",\"optional\":false},{\"name\":\"newParentSlug\",\"type\":\"string | null\",\"optional\":false,\"unionBranches\":[{\"type\":\"string\"},{\"type\":\"null\"}]},{\"name\":\"context\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"mergeTag\":{\"name\":\"mergeTag\",\"async\":true,\"parameters\":[{\"name\":\"fromSlug\",\"type\":\"string\",\"optional\":false},{\"name\":\"toSlug\",\"type\":\"string\",\"optional\":false},{\"name\":\"context\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"cleanupUnused\":{\"name\":\"cleanupUnused\",\"async\":true,\"parameters\":[{\"name\":\"context\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true},\"calculateLevel\":{\"name\":\"calculateLevel\",\"async\":true,\"parameters\":[{\"name\":\"parentSlug\",\"type\":\"string | null\",\"optional\":false,\"unionBranches\":[{\"type\":\"string\"},{\"type\":\"null\"}]},{\"name\":\"context\",\"type\":\"string\",\"optional\":true}],\"returnType\":\"Promise<number>\",\"isStatic\":false,\"isPublic\":true},\"findByTenant\":{\"name\":\"findByTenant\",\"async\":true,\"parameters\":[{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":false,\"isPublic\":true},\"findGlobal\":{\"name\":\"findGlobal\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":false,\"isPublic\":true},\"findWithGlobals\":{\"name\":\"findWithGlobals\",\"async\":true,\"parameters\":[{\"name\":\"tenantId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Tag[]>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"Tag\",\"exportName\":\"TagCollection\",\"collectionExportName\":\"TagCollectionCollection\",\"schema\":{\"tableName\":\"tag_collections\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"tag_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\":\"tag_collections_slug_context_idx\",\"columns\":[\"slug\",\"context\"],\"unique\":true},{\"name\":\"tag_collections_created_at_idx\",\"columns\":[\"created_at\"]}],\"version\":\"42236c49\"}}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-core\",\"@happyvertical/smrt-tenancy\"]}"));
|
|
18
18
|
//#endregion
|
|
19
19
|
//#region src/tag.ts
|
|
20
20
|
var __defProp$1 = Object.defineProperty;
|
package/dist/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-tags",
|
|
5
|
-
"packageVersion": "0.
|
|
5
|
+
"packageVersion": "0.47.0",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-tags:TagAlias": {
|
|
8
8
|
"name": "tagalias",
|
|
@@ -333,7 +333,10 @@
|
|
|
333
333
|
{
|
|
334
334
|
"name": "aliases",
|
|
335
335
|
"type": "Array<object>",
|
|
336
|
-
"optional": false
|
|
336
|
+
"optional": false,
|
|
337
|
+
"memberTypes": [
|
|
338
|
+
"string"
|
|
339
|
+
]
|
|
337
340
|
}
|
|
338
341
|
],
|
|
339
342
|
"returnType": "Promise<TagAlias[]>",
|
|
@@ -543,7 +546,7 @@
|
|
|
543
546
|
"name": "getParent",
|
|
544
547
|
"async": true,
|
|
545
548
|
"parameters": [],
|
|
546
|
-
"returnType": "Promise<null>",
|
|
549
|
+
"returnType": "Promise<this | null>",
|
|
547
550
|
"isStatic": false,
|
|
548
551
|
"isPublic": true
|
|
549
552
|
},
|
|
@@ -551,7 +554,7 @@
|
|
|
551
554
|
"name": "getChildren",
|
|
552
555
|
"async": true,
|
|
553
556
|
"parameters": [],
|
|
554
|
-
"returnType": "Promise",
|
|
557
|
+
"returnType": "Promise<this[]>",
|
|
555
558
|
"isStatic": false,
|
|
556
559
|
"isPublic": true
|
|
557
560
|
},
|
|
@@ -559,7 +562,7 @@
|
|
|
559
562
|
"name": "getAncestors",
|
|
560
563
|
"async": true,
|
|
561
564
|
"parameters": [],
|
|
562
|
-
"returnType": "Promise",
|
|
565
|
+
"returnType": "Promise<this[]>",
|
|
563
566
|
"isStatic": false,
|
|
564
567
|
"isPublic": true
|
|
565
568
|
},
|
|
@@ -567,7 +570,7 @@
|
|
|
567
570
|
"name": "getDescendants",
|
|
568
571
|
"async": true,
|
|
569
572
|
"parameters": [],
|
|
570
|
-
"returnType": "Promise",
|
|
573
|
+
"returnType": "Promise<this[]>",
|
|
571
574
|
"isStatic": false,
|
|
572
575
|
"isPublic": true
|
|
573
576
|
},
|
|
@@ -575,7 +578,7 @@
|
|
|
575
578
|
"name": "getHierarchy",
|
|
576
579
|
"async": true,
|
|
577
580
|
"parameters": [],
|
|
578
|
-
"returnType": "Promise<HierarchyView
|
|
581
|
+
"returnType": "Promise<HierarchyView<this>>",
|
|
579
582
|
"isStatic": false,
|
|
580
583
|
"isPublic": true
|
|
581
584
|
},
|
|
@@ -585,8 +588,19 @@
|
|
|
585
588
|
"parameters": [
|
|
586
589
|
{
|
|
587
590
|
"name": "newParent",
|
|
588
|
-
"type": "string | null",
|
|
589
|
-
"optional": false
|
|
591
|
+
"type": "this | string | null",
|
|
592
|
+
"optional": false,
|
|
593
|
+
"unionBranches": [
|
|
594
|
+
{
|
|
595
|
+
"type": "this"
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
"type": "string"
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
"type": "null"
|
|
602
|
+
}
|
|
603
|
+
]
|
|
590
604
|
}
|
|
591
605
|
],
|
|
592
606
|
"returnType": "Promise<void>",
|
|
@@ -855,7 +869,15 @@
|
|
|
855
869
|
{
|
|
856
870
|
"name": "parentSlug",
|
|
857
871
|
"type": "string | null",
|
|
858
|
-
"optional": true
|
|
872
|
+
"optional": true,
|
|
873
|
+
"unionBranches": [
|
|
874
|
+
{
|
|
875
|
+
"type": "string"
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
"type": "null"
|
|
879
|
+
}
|
|
880
|
+
]
|
|
859
881
|
}
|
|
860
882
|
],
|
|
861
883
|
"returnType": "Promise<Tag[]>",
|
|
@@ -927,7 +949,15 @@
|
|
|
927
949
|
{
|
|
928
950
|
"name": "newParentSlug",
|
|
929
951
|
"type": "string | null",
|
|
930
|
-
"optional": false
|
|
952
|
+
"optional": false,
|
|
953
|
+
"unionBranches": [
|
|
954
|
+
{
|
|
955
|
+
"type": "string"
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
"type": "null"
|
|
959
|
+
}
|
|
960
|
+
]
|
|
931
961
|
},
|
|
932
962
|
{
|
|
933
963
|
"name": "context",
|
|
@@ -984,7 +1014,15 @@
|
|
|
984
1014
|
{
|
|
985
1015
|
"name": "parentSlug",
|
|
986
1016
|
"type": "string | null",
|
|
987
|
-
"optional": false
|
|
1017
|
+
"optional": false,
|
|
1018
|
+
"unionBranches": [
|
|
1019
|
+
{
|
|
1020
|
+
"type": "string"
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
"type": "null"
|
|
1024
|
+
}
|
|
1025
|
+
]
|
|
988
1026
|
},
|
|
989
1027
|
{
|
|
990
1028
|
"name": "context",
|
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-tags",
|
|
6
|
-
"packageVersion": "0.
|
|
6
|
+
"packageVersion": "0.47.0",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
10
|
+
"manifest": "a8404eb43e0b7e933628837cb495de1058a357cc0c16d5f91a53f0795c219c99",
|
|
11
|
+
"packageJson": "2d05d48b9595a4c661181c1582e4a35adbfd04c7dc1373692174e3b4321abc17",
|
|
12
12
|
"agents": "900516b49407d5a521c2f0f2bdb2d4ab0c97e620808115718779f7ecf3ace222"
|
|
13
13
|
},
|
|
14
14
|
"exports": [
|
|
@@ -250,6 +250,29 @@
|
|
|
250
250
|
"objectName": "@happyvertical/smrt-tags:TagAlias"
|
|
251
251
|
}
|
|
252
252
|
],
|
|
253
|
+
"withheldSurfaces": [
|
|
254
|
+
{
|
|
255
|
+
"kind": "api",
|
|
256
|
+
"operation": "getAliasesForTag",
|
|
257
|
+
"code": "not-included",
|
|
258
|
+
"reason": "not listed in api.include",
|
|
259
|
+
"objectName": "@happyvertical/smrt-tags:TagAlias"
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
"kind": "api",
|
|
263
|
+
"operation": "getTag",
|
|
264
|
+
"code": "not-included",
|
|
265
|
+
"reason": "not listed in api.include",
|
|
266
|
+
"objectName": "@happyvertical/smrt-tags:TagAlias"
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"kind": "api",
|
|
270
|
+
"operation": "searchByAlias",
|
|
271
|
+
"code": "not-included",
|
|
272
|
+
"reason": "not listed in api.include",
|
|
273
|
+
"objectName": "@happyvertical/smrt-tags:TagAlias"
|
|
274
|
+
}
|
|
275
|
+
],
|
|
253
276
|
"relationshipFeatures": [
|
|
254
277
|
"uuidColumns"
|
|
255
278
|
],
|
|
@@ -671,7 +694,7 @@
|
|
|
671
694
|
{
|
|
672
695
|
"name": "getAncestors",
|
|
673
696
|
"async": true,
|
|
674
|
-
"returns": "Promise"
|
|
697
|
+
"returns": "Promise<this[]>"
|
|
675
698
|
},
|
|
676
699
|
{
|
|
677
700
|
"name": "getBySlug",
|
|
@@ -686,17 +709,17 @@
|
|
|
686
709
|
{
|
|
687
710
|
"name": "getChildren",
|
|
688
711
|
"async": true,
|
|
689
|
-
"returns": "Promise"
|
|
712
|
+
"returns": "Promise<this[]>"
|
|
690
713
|
},
|
|
691
714
|
{
|
|
692
715
|
"name": "getDescendants",
|
|
693
716
|
"async": true,
|
|
694
|
-
"returns": "Promise"
|
|
717
|
+
"returns": "Promise<this[]>"
|
|
695
718
|
},
|
|
696
719
|
{
|
|
697
720
|
"name": "getHierarchy",
|
|
698
721
|
"async": true,
|
|
699
|
-
"returns": "Promise<HierarchyView
|
|
722
|
+
"returns": "Promise<HierarchyView<this>>"
|
|
700
723
|
},
|
|
701
724
|
{
|
|
702
725
|
"name": "getMetadata",
|
|
@@ -705,7 +728,7 @@
|
|
|
705
728
|
{
|
|
706
729
|
"name": "getParent",
|
|
707
730
|
"async": true,
|
|
708
|
-
"returns": "Promise<null>"
|
|
731
|
+
"returns": "Promise<this | null>"
|
|
709
732
|
},
|
|
710
733
|
{
|
|
711
734
|
"name": "getRootTags",
|
|
@@ -720,7 +743,7 @@
|
|
|
720
743
|
"name": "moveTo",
|
|
721
744
|
"async": true,
|
|
722
745
|
"params": [
|
|
723
|
-
"newParent: string | null"
|
|
746
|
+
"newParent: this | string | null"
|
|
724
747
|
],
|
|
725
748
|
"returns": "Promise<void>"
|
|
726
749
|
},
|
|
@@ -913,6 +936,85 @@
|
|
|
913
936
|
"objectName": "@happyvertical/smrt-tags:Tag"
|
|
914
937
|
}
|
|
915
938
|
],
|
|
939
|
+
"withheldSurfaces": [
|
|
940
|
+
{
|
|
941
|
+
"kind": "api",
|
|
942
|
+
"operation": "getAncestors",
|
|
943
|
+
"code": "not-included",
|
|
944
|
+
"reason": "not listed in api.include",
|
|
945
|
+
"objectName": "@happyvertical/smrt-tags:Tag"
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
"kind": "api",
|
|
949
|
+
"operation": "getBySlug",
|
|
950
|
+
"code": "not-included",
|
|
951
|
+
"reason": "not listed in api.include",
|
|
952
|
+
"objectName": "@happyvertical/smrt-tags:Tag"
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
"kind": "api",
|
|
956
|
+
"operation": "getChildren",
|
|
957
|
+
"code": "not-included",
|
|
958
|
+
"reason": "not listed in api.include",
|
|
959
|
+
"objectName": "@happyvertical/smrt-tags:Tag"
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
"kind": "api",
|
|
963
|
+
"operation": "getDescendants",
|
|
964
|
+
"code": "not-included",
|
|
965
|
+
"reason": "not listed in api.include",
|
|
966
|
+
"objectName": "@happyvertical/smrt-tags:Tag"
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
"kind": "api",
|
|
970
|
+
"operation": "getHierarchy",
|
|
971
|
+
"code": "not-included",
|
|
972
|
+
"reason": "not listed in api.include",
|
|
973
|
+
"objectName": "@happyvertical/smrt-tags:Tag"
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
"kind": "api",
|
|
977
|
+
"operation": "getMetadata",
|
|
978
|
+
"code": "not-included",
|
|
979
|
+
"reason": "not listed in api.include",
|
|
980
|
+
"objectName": "@happyvertical/smrt-tags:Tag"
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
"kind": "api",
|
|
984
|
+
"operation": "getParent",
|
|
985
|
+
"code": "not-included",
|
|
986
|
+
"reason": "not listed in api.include",
|
|
987
|
+
"objectName": "@happyvertical/smrt-tags:Tag"
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
"kind": "api",
|
|
991
|
+
"operation": "getRootTags",
|
|
992
|
+
"code": "not-included",
|
|
993
|
+
"reason": "not listed in api.include",
|
|
994
|
+
"objectName": "@happyvertical/smrt-tags:Tag"
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
"kind": "api",
|
|
998
|
+
"operation": "moveTo",
|
|
999
|
+
"code": "not-included",
|
|
1000
|
+
"reason": "not listed in api.include",
|
|
1001
|
+
"objectName": "@happyvertical/smrt-tags:Tag"
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
"kind": "api",
|
|
1005
|
+
"operation": "setMetadata",
|
|
1006
|
+
"code": "not-included",
|
|
1007
|
+
"reason": "not listed in api.include",
|
|
1008
|
+
"objectName": "@happyvertical/smrt-tags:Tag"
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"kind": "api",
|
|
1012
|
+
"operation": "updateMetadata",
|
|
1013
|
+
"code": "not-included",
|
|
1014
|
+
"reason": "not listed in api.include",
|
|
1015
|
+
"objectName": "@happyvertical/smrt-tags:Tag"
|
|
1016
|
+
}
|
|
1017
|
+
],
|
|
916
1018
|
"relationshipFeatures": [
|
|
917
1019
|
"SmrtHierarchical",
|
|
918
1020
|
"foreignKey",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-tags",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.47.0",
|
|
4
4
|
"description": "Reusable tagging system with hierarchies, contexts, and multi-language support for SMRT framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"@happyvertical/ai": "^0.89.4",
|
|
27
27
|
"@happyvertical/files": "^0.89.4",
|
|
28
28
|
"@happyvertical/logger": "^0.89.4",
|
|
29
|
+
"@happyvertical/smrt-core": "0.47.0",
|
|
30
|
+
"@happyvertical/smrt-tenancy": "0.47.0",
|
|
29
31
|
"@happyvertical/sql": "^0.89.4",
|
|
30
|
-
"@happyvertical/utils": "^0.89.4"
|
|
31
|
-
"@happyvertical/smrt-tenancy": "0.46.0",
|
|
32
|
-
"@happyvertical/smrt-core": "0.46.0"
|
|
32
|
+
"@happyvertical/utils": "^0.89.4"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/node": "24.13.2",
|