@happyvertical/smrt-reports 0.55.22 → 0.55.23

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.
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-reports",
5
- "packageVersion": "0.55.22",
5
+ "packageVersion": "0.55.23",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-reports:SmrtReport": {
8
8
  "name": "smrtreport",
@@ -3,12 +3,12 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-reports",
6
- "packageVersion": "0.55.22",
6
+ "packageVersion": "0.55.23",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "30855b693fef8a0b50ed89036d5dd3e4ff0db5f578d7ddd21ff22d4e022b7a24",
11
- "packageJson": "c45c1d2d7fd13012e5e9abed0ce325d126bd97340b4646a4ef7b4bb1a3732a62",
10
+ "manifest": "dd8f6c8a66048c5874045e9dd8b1f738b04b5c49f93cb9c0555512467b763bd3",
11
+ "packageJson": "9e67b57f8941cb6db99c660e410b39fc992e084b91db54bc7d255b3f53629b5d",
12
12
  "agents": "16b24ae6ad9b15f768befb198807635a9c21d2274ef496cce296eb7383588565",
13
13
  "moduleDoc:agents/runtime-reports.md": "cc54255d814cf12ba9e7d2daf44926b2a18825ed5ac9470792afd60e14666a6f",
14
14
  "moduleDoc:README.md": "c3f1c14edf5fbf3ef65df1081b83837401c3f9fcc5dcf5bc9a735bde879463d5"
package/dist/state.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ObjectRegistry, SmrtCollection, SmrtObject, field, smrt } from "@happyvertical/smrt-core";
2
2
  import { TenantScoped, tenantId } from "@happyvertical/smrt-tenancy";
3
3
  //#region src/__smrt-register__.ts
4
- ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-reports","packageVersion":"0.55.22","objects":{"@happyvertical/smrt-reports:SmrtReport":{"name":"smrtreport","className":"SmrtReport","qualifiedName":"@happyvertical/smrt-reports:SmrtReport","collection":"smrtreports","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/report.ts","packageName":"@happyvertical/smrt-reports","fields":{"refreshedAt":{"type":"datetime","required":false}},"methods":{"isStale":{"name":"isStale","async":false,"parameters":[{"name":"ttlMs","type":"number","optional":true}],"returnType":"boolean","isStatic":false,"isPublic":true},"refresh":{"name":"refresh","async":true,"parameters":[{"name":"options","type":"Omit<ReportRefreshOptions, 'db'>","optional":true}],"returnType":"Promise<ReportRefreshResult>","isStatic":false,"isPublic":true}},"decoratorConfig":{},"extends":"SmrtObject","exportName":"SmrtReport","collectionExportName":"SmrtReportCollection","importPath":"@happyvertical/smrt-reports"},"@happyvertical/smrt-reports:SmrtReportCollection":{"name":"smrtreportcollection","className":"SmrtReportCollection","qualifiedName":"@happyvertical/smrt-reports:SmrtReportCollection","collection":"smrtreports","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/report.ts","packageName":"@happyvertical/smrt-reports","fields":{},"methods":{"refresh":{"name":"refresh","async":true,"parameters":[{"name":"options","type":"Omit<ReportRefreshOptions, 'db'>","optional":true}],"returnType":"Promise<ReportRefreshResult>","isStatic":false,"isPublic":true},"list":{"name":"list","async":true,"parameters":[{"name":"options","type":"SmrtListOptions<ModelType>","optional":true}],"returnType":"Promise<SmrtObject[] | Record<string, unknown>[]>","isStatic":false,"isPublic":true},"get":{"name":"get","async":true,"parameters":[{"name":"filter","type":"any","optional":false,"typeUnresolved":true},{"name":"options","type":"any","optional":true,"typeUnresolved":true}],"returnType":"Promise<ModelType | null>","isStatic":false,"isPublic":true}},"decoratorConfig":{},"extends":"SmrtCollection","extendsTypeArg":"ModelType","exportName":"SmrtReportCollection","collectionExportName":"SmrtReportCollectionCollection","importPath":"@happyvertical/smrt-reports"},"@happyvertical/smrt-reports:RuntimeReport":{"name":"runtimereport","className":"RuntimeReport","qualifiedName":"@happyvertical/smrt-reports:RuntimeReport","collection":"runtimereports","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/runtime-report.ts","packageName":"@happyvertical/smrt-reports","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"title":{"type":"text","required":false,"_meta":{}},"description":{"type":"text","required":false,"_meta":{}},"sourceId":{"type":"text","required":false,"_meta":{}},"spec":{"type":"text","required":true,"_meta":{"required":true}},"specHash":{"type":"text","required":false,"_meta":{}},"status":{"type":"text","required":true,"_meta":{"required":true},"enum":["active","archived"]},"createdByUserId":{"type":"text","required":false,"_meta":{}}},"methods":{"getSpec":{"name":"getSpec","async":false,"parameters":[],"returnType":"RuntimeReportSpec","isStatic":false,"isPublic":true},"setSpec":{"name":"setSpec","async":false,"parameters":[{"name":"spec","type":"RuntimeReportSpec","optional":false}],"returnType":"void","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"runtime_reports","api":{"include":["list","get","create"]},"mcp":{"include":["list","get"]},"cli":{"include":["list","get"]},"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"RuntimeReport","collectionExportName":"RuntimeReportCollection","displayLabelField":"title","validationRules":[{"field":"spec","rule":"required","fieldType":"text"},{"field":"status","rule":"required","fieldType":"text"}],"schema":{"tableName":"runtime_reports","ddl":"CREATE TABLE IF NOT EXISTS \\"runtime_reports\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"title\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_id\\" TEXT,\\n \\"spec\\" TEXT NOT NULL,\\n \\"spec_hash\\" TEXT,\\n \\"status\\" TEXT NOT NULL,\\n \\"created_by_user_id\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"title":{"type":"TEXT","notNull":false,"unique":false},"description":{"type":"TEXT","notNull":false,"unique":false},"source_id":{"type":"TEXT","notNull":false,"unique":false},"spec":{"type":"TEXT","notNull":true,"unique":false},"spec_hash":{"type":"TEXT","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false},"created_by_user_id":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"runtime_reports_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"runtime_reports_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"04a92513"},"importPath":"@happyvertical/smrt-reports"},"@happyvertical/smrt-reports:RuntimeReportCollection":{"name":"runtimereportcollection","className":"RuntimeReportCollection","qualifiedName":"@happyvertical/smrt-reports:RuntimeReportCollection","collection":"runtimereports","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/runtime-report.ts","packageName":"@happyvertical/smrt-reports","fields":{},"methods":{},"decoratorConfig":{"tableName":"runtime_reports"},"extends":"SmrtCollection","extendsTypeArg":"RuntimeReport","exportName":"RuntimeReportCollection","collectionExportName":"RuntimeReportCollectionCollection","schema":{"tableName":"runtime_reports","ddl":"CREATE TABLE IF NOT EXISTS \\"runtime_reports\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"title\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_id\\" TEXT,\\n \\"spec\\" TEXT NOT NULL,\\n \\"spec_hash\\" TEXT,\\n \\"status\\" TEXT NOT NULL,\\n \\"created_by_user_id\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"title":{"type":"TEXT","notNull":false,"unique":false},"description":{"type":"TEXT","notNull":false,"unique":false},"source_id":{"type":"TEXT","notNull":false,"unique":false},"spec":{"type":"TEXT","notNull":true,"unique":false},"spec_hash":{"type":"TEXT","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false},"created_by_user_id":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"runtime_reports_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"runtime_reports_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"04a92513"},"importPath":"@happyvertical/smrt-reports"},"@happyvertical/smrt-reports:SmrtReportRefreshTask":{"name":"smrtreportrefreshtask","className":"SmrtReportRefreshTask","qualifiedName":"@happyvertical/smrt-reports:SmrtReportRefreshTask","collection":"smrtreportrefreshtasks","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/scheduler.ts","packageName":"@happyvertical/smrt-reports","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"reportClass":{"type":"text","required":true,"_meta":{"required":true}},"mode":{"type":"text","required":true,"_meta":{"required":true},"enum":["rebuild","incremental"]},"trigger":{"type":"text","required":true,"_meta":{"required":true},"enum":["manual","schedule","change","ttl","job"]},"args":{"type":"json","required":false,"_meta":{}}},"methods":{"run":{"name":"run","async":true,"parameters":[{"name":"args","type":"ReportRefreshJobArgs","optional":true},{"name":"context","type":"JobExecutionContext","optional":true}],"returnType":"Promise<unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"_smrt_report_refresh_tasks","api":false,"cli":{"include":["list","get"],"skipApiCheck":true,"http":false},"mcp":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"SmrtReportRefreshTask","collectionExportName":"SmrtReportRefreshTaskCollection","validationRules":[{"field":"reportClass","rule":"required","fieldType":"text"},{"field":"mode","rule":"required","fieldType":"text"},{"field":"trigger","rule":"required","fieldType":"text"}],"schema":{"tableName":"_smrt_report_refresh_tasks","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_refresh_tasks\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"mode\\" TEXT NOT NULL,\\n \\"trigger\\" TEXT NOT NULL,\\n \\"args\\" JSON\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"mode":{"type":"TEXT","notNull":true,"unique":false},"trigger":{"type":"TEXT","notNull":true,"unique":false},"args":{"type":"JSON","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_report_refresh_tasks_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"_smrt_report_refresh_tasks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"c9142042"},"importPath":"@happyvertical/smrt-reports/scheduler"},"@happyvertical/smrt-reports:SmrtPrincipalReportRefreshTask":{"name":"smrtprincipalreportrefreshtask","className":"SmrtPrincipalReportRefreshTask","qualifiedName":"@happyvertical/smrt-reports:SmrtPrincipalReportRefreshTask","collection":"smrtprincipalreportrefreshtasks","description":"Worker target whose authority requirement cannot be downgraded by job args.","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/scheduler.ts","packageName":"@happyvertical/smrt-reports","fields":{"tenantId":{"type":"text","required":false,"_meta":{"generated":true,"source":"tenantScoped_decorator","sqlType":"UUID","__tenancy":{"isTenantIdField":true,"mode":"optional","field":"tenantId","autoFilter":true,"autoPopulate":true,"allowSuperAdminBypass":false}}}},"methods":{"run":{"name":"run","async":true,"parameters":[{"name":"args","type":"ReportRefreshJobArgs","optional":true},{"name":"context","type":"JobExecutionContext","optional":true}],"returnType":"Promise<unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"_smrt_principal_report_refresh_tasks","api":false,"cli":{"include":["list","get"],"skipApiCheck":true,"http":false},"mcp":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtReportRefreshTask","exportName":"SmrtPrincipalReportRefreshTask","collectionExportName":"SmrtPrincipalReportRefreshTaskCollection","schema":{"tableName":"_smrt_principal_report_refresh_tasks","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_principal_report_refresh_tasks\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_principal_report_refresh_tasks_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"_smrt_principal_report_refresh_tasks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"226a3b97"},"importPath":"@happyvertical/smrt-reports/scheduler"},"@happyvertical/smrt-reports:SmrtReportRun":{"name":"smrtreportrun","className":"SmrtReportRun","qualifiedName":"@happyvertical/smrt-reports:SmrtReportRun","collection":"smrtreportruns","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/state.ts","packageName":"@happyvertical/smrt-reports","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"scopeKey":{"type":"text","required":true,"_meta":{"required":true}},"reportClass":{"type":"text","required":true,"_meta":{"required":true}},"sourceClass":{"type":"text","required":true,"_meta":{"required":true}},"mode":{"type":"text","required":true,"_meta":{"required":true},"enum":["rebuild","incremental"]},"trigger":{"type":"text","required":true,"_meta":{"required":true},"enum":["manual","schedule","change","ttl","job"]},"status":{"type":"text","required":true,"description":"Whether the refresh is running, finished, failed or was skipped.","_meta":{"required":true,"description":"Whether the refresh is running, finished, failed or was skipped."},"enum":["running","success","failed","skipped"]},"startedAt":{"type":"datetime","required":true,"description":"When the refresh began.","_meta":{"required":true,"description":"When the refresh began."}},"completedAt":{"type":"datetime","required":false,"description":"When the refresh finished. Empty while it is still running.","_meta":{"nullable":true,"description":"When the refresh finished. Empty while it is still running."}},"rowCount":{"type":"integer","required":true,"description":"How many rows the report held after the refresh.","_meta":{"required":true,"description":"How many rows the report held after the refresh."}},"changedGroupCount":{"type":"integer","required":true,"_meta":{"required":true}},"watermarkBefore":{"type":"text","required":false,"_meta":{"nullable":true}},"watermarkAfter":{"type":"text","required":false,"_meta":{"nullable":true}},"error":{"type":"text","required":false,"description":"Why the refresh failed. Empty when it worked.","_meta":{"nullable":true,"description":"Why the refresh failed. Empty when it worked."}},"metadata":{"type":"json","required":false,"_meta":{}}},"methods":{},"decoratorConfig":{"tableName":"_smrt_report_runs","api":false,"cli":{"include":["list","get"],"skipApiCheck":true,"http":false},"mcp":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"SmrtReportRun","collectionExportName":"SmrtReportRunCollection","validationRules":[{"field":"scopeKey","rule":"required","fieldType":"text"},{"field":"reportClass","rule":"required","fieldType":"text"},{"field":"sourceClass","rule":"required","fieldType":"text"},{"field":"mode","rule":"required","fieldType":"text"},{"field":"trigger","rule":"required","fieldType":"text"},{"field":"status","rule":"required","fieldType":"text"},{"field":"startedAt","rule":"required","fieldType":"datetime"},{"field":"rowCount","rule":"required","fieldType":"integer"},{"field":"changedGroupCount","rule":"required","fieldType":"integer"}],"schema":{"tableName":"_smrt_report_runs","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_runs\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"scope_key\\" TEXT NOT NULL,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"source_class\\" TEXT NOT NULL,\\n \\"mode\\" TEXT NOT NULL,\\n \\"trigger\\" TEXT NOT NULL,\\n \\"status\\" TEXT NOT NULL,\\n \\"started_at\\" TIMESTAMP NOT NULL,\\n \\"completed_at\\" TIMESTAMP,\\n \\"row_count\\" INTEGER NOT NULL,\\n \\"changed_group_count\\" INTEGER NOT NULL,\\n \\"watermark_before\\" TEXT,\\n \\"watermark_after\\" TEXT,\\n \\"error\\" TEXT,\\n \\"metadata\\" JSON\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"scope_key":{"type":"TEXT","notNull":true,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"source_class":{"type":"TEXT","notNull":true,"unique":false},"mode":{"type":"TEXT","notNull":true,"unique":false},"trigger":{"type":"TEXT","notNull":true,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false},"started_at":{"type":"TIMESTAMP","notNull":true,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"row_count":{"type":"INTEGER","notNull":true,"unique":false},"changed_group_count":{"type":"INTEGER","notNull":true,"unique":false},"watermark_before":{"type":"TEXT","notNull":false,"unique":false},"watermark_after":{"type":"TEXT","notNull":false,"unique":false},"error":{"type":"TEXT","notNull":false,"unique":false},"metadata":{"type":"JSON","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_report_runs_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"_smrt_report_runs_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"54ff5048"},"importPath":"@happyvertical/smrt-reports/state"},"@happyvertical/smrt-reports:SmrtReportRunCollection":{"name":"smrtreportruncollection","className":"SmrtReportRunCollection","qualifiedName":"@happyvertical/smrt-reports:SmrtReportRunCollection","collection":"smrtreportruns","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/state.ts","packageName":"@happyvertical/smrt-reports","fields":{},"methods":{},"decoratorConfig":{"tableName":"_smrt_report_runs","api":false,"mcp":false},"extends":"SmrtCollection","extendsTypeArg":"SmrtReportRun","exportName":"SmrtReportRunCollection","collectionExportName":"SmrtReportRunCollectionCollection","schema":{"tableName":"_smrt_report_runs","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_runs\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"scope_key\\" TEXT NOT NULL,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"source_class\\" TEXT NOT NULL,\\n \\"mode\\" TEXT NOT NULL,\\n \\"trigger\\" TEXT NOT NULL,\\n \\"status\\" TEXT NOT NULL,\\n \\"started_at\\" TIMESTAMP NOT NULL,\\n \\"completed_at\\" TIMESTAMP,\\n \\"row_count\\" INTEGER NOT NULL,\\n \\"changed_group_count\\" INTEGER NOT NULL,\\n \\"watermark_before\\" TEXT,\\n \\"watermark_after\\" TEXT,\\n \\"error\\" TEXT,\\n \\"metadata\\" JSON\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"scope_key":{"type":"TEXT","notNull":true,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"source_class":{"type":"TEXT","notNull":true,"unique":false},"mode":{"type":"TEXT","notNull":true,"unique":false},"trigger":{"type":"TEXT","notNull":true,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false},"started_at":{"type":"TIMESTAMP","notNull":true,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"row_count":{"type":"INTEGER","notNull":true,"unique":false},"changed_group_count":{"type":"INTEGER","notNull":true,"unique":false},"watermark_before":{"type":"TEXT","notNull":false,"unique":false},"watermark_after":{"type":"TEXT","notNull":false,"unique":false},"error":{"type":"TEXT","notNull":false,"unique":false},"metadata":{"type":"JSON","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_report_runs_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"_smrt_report_runs_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"54ff5048"},"importPath":"@happyvertical/smrt-reports/state"},"@happyvertical/smrt-reports:SmrtReportWatermark":{"name":"smrtreportwatermark","className":"SmrtReportWatermark","qualifiedName":"@happyvertical/smrt-reports:SmrtReportWatermark","collection":"smrtreportwatermarks","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/state.ts","packageName":"@happyvertical/smrt-reports","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"scopeKey":{"type":"text","required":true,"_meta":{"required":true}},"reportClass":{"type":"text","required":true,"_meta":{"required":true}},"sourceClass":{"type":"text","required":true,"_meta":{"required":true}},"watermarkColumn":{"type":"text","required":true,"_meta":{"required":true}},"watermarkValue":{"type":"text","required":false,"_meta":{"nullable":true}},"lastRunId":{"type":"text","required":false,"_meta":{"nullable":true}}},"methods":{},"decoratorConfig":{"tableName":"_smrt_report_watermarks","conflictColumns":["report_class","scope_key","source_class","watermark_column"],"api":false,"cli":{"include":["list","get"],"skipApiCheck":true,"http":false},"mcp":false,"tenantScoped":{"mode":"optional"}},"extends":"SmrtObject","exportName":"SmrtReportWatermark","collectionExportName":"SmrtReportWatermarkCollection","validationRules":[{"field":"scopeKey","rule":"required","fieldType":"text"},{"field":"reportClass","rule":"required","fieldType":"text"},{"field":"sourceClass","rule":"required","fieldType":"text"},{"field":"watermarkColumn","rule":"required","fieldType":"text"}],"schema":{"tableName":"_smrt_report_watermarks","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_watermarks\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"scope_key\\" TEXT NOT NULL,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"source_class\\" TEXT NOT NULL,\\n \\"watermark_column\\" TEXT NOT NULL,\\n \\"watermark_value\\" TEXT,\\n \\"last_run_id\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"scope_key":{"type":"TEXT","notNull":true,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"source_class":{"type":"TEXT","notNull":true,"unique":false},"watermark_column":{"type":"TEXT","notNull":true,"unique":false},"watermark_value":{"type":"TEXT","notNull":false,"unique":false},"last_run_id":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_report_watermarks_report_class_scope_key_idx","columns":["report_class","scope_key","source_class","watermark_column"],"unique":true},{"name":"_smrt_report_watermarks_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_report_watermarks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"dac9d57a"},"importPath":"@happyvertical/smrt-reports/state"},"@happyvertical/smrt-reports:SmrtReportWatermarkCollection":{"name":"smrtreportwatermarkcollection","className":"SmrtReportWatermarkCollection","qualifiedName":"@happyvertical/smrt-reports:SmrtReportWatermarkCollection","collection":"smrtreportwatermarks","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/state.ts","packageName":"@happyvertical/smrt-reports","fields":{},"methods":{},"decoratorConfig":{"tableName":"_smrt_report_watermarks","api":false,"mcp":false},"extends":"SmrtCollection","extendsTypeArg":"SmrtReportWatermark","exportName":"SmrtReportWatermarkCollection","collectionExportName":"SmrtReportWatermarkCollectionCollection","schema":{"tableName":"_smrt_report_watermarks","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_watermarks\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"scope_key\\" TEXT NOT NULL,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"source_class\\" TEXT NOT NULL,\\n \\"watermark_column\\" TEXT NOT NULL,\\n \\"watermark_value\\" TEXT,\\n \\"last_run_id\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"scope_key":{"type":"TEXT","notNull":true,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"source_class":{"type":"TEXT","notNull":true,"unique":false},"watermark_column":{"type":"TEXT","notNull":true,"unique":false},"watermark_value":{"type":"TEXT","notNull":false,"unique":false},"last_run_id":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_report_watermarks_report_class_scope_key_idx","columns":["report_class","scope_key","source_class","watermark_column"],"unique":true},{"name":"_smrt_report_watermarks_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_report_watermarks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"dac9d57a"},"importPath":"@happyvertical/smrt-reports/state"},"@happyvertical/smrt-reports:SmrtReportLock":{"name":"smrtreportlock","className":"SmrtReportLock","qualifiedName":"@happyvertical/smrt-reports:SmrtReportLock","collection":"smrtreportlocks","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/state.ts","packageName":"@happyvertical/smrt-reports","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"scopeKey":{"type":"text","required":true,"_meta":{"required":true}},"reportClass":{"type":"text","required":true,"_meta":{"required":true}},"ownerId":{"type":"text","required":false,"_meta":{"nullable":true}},"acquiredAt":{"type":"datetime","required":false,"_meta":{"nullable":true}},"heartbeatAt":{"type":"datetime","required":false,"_meta":{"nullable":true}},"expiresAt":{"type":"datetime","required":false,"_meta":{"nullable":true}}},"methods":{},"decoratorConfig":{"tableName":"_smrt_report_locks","conflictColumns":["report_class","scope_key"],"api":false,"cli":{"include":["list","get"],"skipApiCheck":true,"http":false},"mcp":false,"tenantScoped":{"mode":"optional"}},"extends":"SmrtObject","exportName":"SmrtReportLock","collectionExportName":"SmrtReportLockCollection","validationRules":[{"field":"scopeKey","rule":"required","fieldType":"text"},{"field":"reportClass","rule":"required","fieldType":"text"}],"schema":{"tableName":"_smrt_report_locks","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_locks\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"scope_key\\" TEXT NOT NULL,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"owner_id\\" TEXT,\\n \\"acquired_at\\" TIMESTAMP,\\n \\"heartbeat_at\\" TIMESTAMP,\\n \\"expires_at\\" 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"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"scope_key":{"type":"TEXT","notNull":true,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"owner_id":{"type":"TEXT","notNull":false,"unique":false},"acquired_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"heartbeat_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"expires_at":{"type":"TIMESTAMP","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_report_locks_report_class_scope_key_idx","columns":["report_class","scope_key"],"unique":true},{"name":"_smrt_report_locks_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_report_locks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"4a2043f9"},"importPath":"@happyvertical/smrt-reports/state"},"@happyvertical/smrt-reports:SmrtReportLockCollection":{"name":"smrtreportlockcollection","className":"SmrtReportLockCollection","qualifiedName":"@happyvertical/smrt-reports:SmrtReportLockCollection","collection":"smrtreportlocks","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/state.ts","packageName":"@happyvertical/smrt-reports","fields":{},"methods":{},"decoratorConfig":{"tableName":"_smrt_report_locks","api":false,"mcp":false},"extends":"SmrtCollection","extendsTypeArg":"SmrtReportLock","exportName":"SmrtReportLockCollection","collectionExportName":"SmrtReportLockCollectionCollection","schema":{"tableName":"_smrt_report_locks","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_locks\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"scope_key\\" TEXT NOT NULL,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"owner_id\\" TEXT,\\n \\"acquired_at\\" TIMESTAMP,\\n \\"heartbeat_at\\" TIMESTAMP,\\n \\"expires_at\\" 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"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"scope_key":{"type":"TEXT","notNull":true,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"owner_id":{"type":"TEXT","notNull":false,"unique":false},"acquired_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"heartbeat_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"expires_at":{"type":"TIMESTAMP","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_report_locks_report_class_scope_key_idx","columns":["report_class","scope_key"],"unique":true},{"name":"_smrt_report_locks_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_report_locks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"4a2043f9"},"importPath":"@happyvertical/smrt-reports/state"},"@happyvertical/smrt-reports:SmrtReportSchedule":{"name":"smrtreportschedule","className":"SmrtReportSchedule","qualifiedName":"@happyvertical/smrt-reports:SmrtReportSchedule","collection":"smrtreportschedules","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/state.ts","packageName":"@happyvertical/smrt-reports","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"scopeKey":{"type":"text","required":true,"_meta":{"required":true}},"reportClass":{"type":"text","required":true,"_meta":{"required":true}},"cron":{"type":"text","required":true,"description":"When the report refreshes, as a cron schedule such as 0 6 * * * for 6 am daily.","_meta":{"required":true,"description":"When the report refreshes, as a cron schedule such as 0 6 * * * for 6 am daily."}},"trigger":{"type":"text","required":true,"_meta":{"required":true},"enum":["manual","schedule","change","ttl","job"]},"mode":{"type":"text","required":true,"description":"Rebuild recomputes the whole report. Incremental updates only what changed.","_meta":{"required":true,"description":"Rebuild recomputes the whole report. Incremental updates only what changed."},"enum":["rebuild","incremental"]},"enabled":{"type":"boolean","required":true,"description":"Turn off to stop refreshing without deleting the schedule.","_meta":{"required":true,"description":"Turn off to stop refreshing without deleting the schedule."}},"status":{"type":"text","required":true,"description":"Whether the schedule is active, paused, disabled or in error.","_meta":{"required":true,"description":"Whether the schedule is active, paused, disabled or in error."},"enum":["active","paused","disabled","error"]},"nextRun":{"type":"datetime","required":false,"description":"When the report is next due to refresh.","_meta":{"nullable":true,"description":"When the report is next due to refresh."}},"lastRun":{"type":"datetime","required":false,"description":"When the report last started a scheduled refresh.","_meta":{"nullable":true,"description":"When the report last started a scheduled refresh."}},"lastStatus":{"type":"text","required":false,"description":"Whether the last scheduled refresh worked or failed.","_meta":{"nullable":true,"description":"Whether the last scheduled refresh worked or failed."},"enum":["success","failed"]},"lastError":{"type":"text","required":false,"description":"Why the last scheduled refresh failed. Empty when it worked.","_meta":{"nullable":true,"description":"Why the last scheduled refresh failed. Empty when it worked."}},"runCount":{"type":"integer","required":true,"_meta":{"required":true}},"successCount":{"type":"integer","required":true,"_meta":{"required":true}},"failureCount":{"type":"integer","required":true,"_meta":{"required":true}},"runningCount":{"type":"integer","required":true,"_meta":{"required":true}},"maxConcurrent":{"type":"integer","required":true,"_meta":{"required":true}},"queue":{"type":"text","required":true,"_meta":{"required":true}},"priority":{"type":"integer","required":true,"_meta":{"required":true}},"timeout":{"type":"integer","required":true,"_meta":{"required":true}}},"methods":{},"decoratorConfig":{"tableName":"_smrt_report_schedules","conflictColumns":["report_class","scope_key","cron","mode"],"api":false,"cli":{"include":["list","get"],"skipApiCheck":true,"http":false},"mcp":false,"tenantScoped":{"mode":"optional"}},"extends":"SmrtObject","exportName":"SmrtReportSchedule","collectionExportName":"SmrtReportScheduleCollection","validationRules":[{"field":"scopeKey","rule":"required","fieldType":"text"},{"field":"reportClass","rule":"required","fieldType":"text"},{"field":"cron","rule":"required","fieldType":"text"},{"field":"trigger","rule":"required","fieldType":"text"},{"field":"mode","rule":"required","fieldType":"text"},{"field":"enabled","rule":"required","fieldType":"boolean"},{"field":"status","rule":"required","fieldType":"text"},{"field":"runCount","rule":"required","fieldType":"integer"},{"field":"successCount","rule":"required","fieldType":"integer"},{"field":"failureCount","rule":"required","fieldType":"integer"},{"field":"runningCount","rule":"required","fieldType":"integer"},{"field":"maxConcurrent","rule":"required","fieldType":"integer"},{"field":"queue","rule":"required","fieldType":"text"},{"field":"priority","rule":"required","fieldType":"integer"},{"field":"timeout","rule":"required","fieldType":"integer"}],"schema":{"tableName":"_smrt_report_schedules","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_schedules\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"scope_key\\" TEXT NOT NULL,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"cron\\" TEXT NOT NULL,\\n \\"trigger\\" TEXT NOT NULL,\\n \\"mode\\" TEXT NOT NULL,\\n \\"enabled\\" BOOLEAN NOT NULL,\\n \\"status\\" TEXT NOT NULL,\\n \\"next_run\\" TIMESTAMP,\\n \\"last_run\\" TIMESTAMP,\\n \\"last_status\\" TEXT,\\n \\"last_error\\" TEXT,\\n \\"run_count\\" INTEGER NOT NULL,\\n \\"success_count\\" INTEGER NOT NULL,\\n \\"failure_count\\" INTEGER NOT NULL,\\n \\"running_count\\" INTEGER NOT NULL,\\n \\"max_concurrent\\" INTEGER NOT NULL,\\n \\"queue\\" TEXT NOT NULL,\\n \\"priority\\" INTEGER NOT NULL,\\n \\"timeout\\" INTEGER NOT NULL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"scope_key":{"type":"TEXT","notNull":true,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"cron":{"type":"TEXT","notNull":true,"unique":false},"trigger":{"type":"TEXT","notNull":true,"unique":false},"mode":{"type":"TEXT","notNull":true,"unique":false},"enabled":{"type":"BOOLEAN","notNull":true,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false},"next_run":{"type":"TIMESTAMP","notNull":false,"unique":false},"last_run":{"type":"TIMESTAMP","notNull":false,"unique":false},"last_status":{"type":"TEXT","notNull":false,"unique":false},"last_error":{"type":"TEXT","notNull":false,"unique":false},"run_count":{"type":"INTEGER","notNull":true,"unique":false},"success_count":{"type":"INTEGER","notNull":true,"unique":false},"failure_count":{"type":"INTEGER","notNull":true,"unique":false},"running_count":{"type":"INTEGER","notNull":true,"unique":false},"max_concurrent":{"type":"INTEGER","notNull":true,"unique":false},"queue":{"type":"TEXT","notNull":true,"unique":false},"priority":{"type":"INTEGER","notNull":true,"unique":false},"timeout":{"type":"INTEGER","notNull":true,"unique":false}},"indexes":[{"name":"_smrt_report_schedules_report_class_scope_key_idx","columns":["report_class","scope_key","cron","mode"],"unique":true},{"name":"_smrt_report_schedules_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_report_schedules_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"4b9f0e69"},"importPath":"@happyvertical/smrt-reports/state"},"@happyvertical/smrt-reports:SmrtReportScheduleCollection":{"name":"smrtreportschedulecollection","className":"SmrtReportScheduleCollection","qualifiedName":"@happyvertical/smrt-reports:SmrtReportScheduleCollection","collection":"smrtreportschedules","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/state.ts","packageName":"@happyvertical/smrt-reports","fields":{},"methods":{},"decoratorConfig":{"tableName":"_smrt_report_schedules","api":false,"mcp":false},"extends":"SmrtCollection","extendsTypeArg":"SmrtReportSchedule","exportName":"SmrtReportScheduleCollection","collectionExportName":"SmrtReportScheduleCollectionCollection","schema":{"tableName":"_smrt_report_schedules","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_schedules\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"scope_key\\" TEXT NOT NULL,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"cron\\" TEXT NOT NULL,\\n \\"trigger\\" TEXT NOT NULL,\\n \\"mode\\" TEXT NOT NULL,\\n \\"enabled\\" BOOLEAN NOT NULL,\\n \\"status\\" TEXT NOT NULL,\\n \\"next_run\\" TIMESTAMP,\\n \\"last_run\\" TIMESTAMP,\\n \\"last_status\\" TEXT,\\n \\"last_error\\" TEXT,\\n \\"run_count\\" INTEGER NOT NULL,\\n \\"success_count\\" INTEGER NOT NULL,\\n \\"failure_count\\" INTEGER NOT NULL,\\n \\"running_count\\" INTEGER NOT NULL,\\n \\"max_concurrent\\" INTEGER NOT NULL,\\n \\"queue\\" TEXT NOT NULL,\\n \\"priority\\" INTEGER NOT NULL,\\n \\"timeout\\" INTEGER NOT NULL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"scope_key":{"type":"TEXT","notNull":true,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"cron":{"type":"TEXT","notNull":true,"unique":false},"trigger":{"type":"TEXT","notNull":true,"unique":false},"mode":{"type":"TEXT","notNull":true,"unique":false},"enabled":{"type":"BOOLEAN","notNull":true,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false},"next_run":{"type":"TIMESTAMP","notNull":false,"unique":false},"last_run":{"type":"TIMESTAMP","notNull":false,"unique":false},"last_status":{"type":"TEXT","notNull":false,"unique":false},"last_error":{"type":"TEXT","notNull":false,"unique":false},"run_count":{"type":"INTEGER","notNull":true,"unique":false},"success_count":{"type":"INTEGER","notNull":true,"unique":false},"failure_count":{"type":"INTEGER","notNull":true,"unique":false},"running_count":{"type":"INTEGER","notNull":true,"unique":false},"max_concurrent":{"type":"INTEGER","notNull":true,"unique":false},"queue":{"type":"TEXT","notNull":true,"unique":false},"priority":{"type":"INTEGER","notNull":true,"unique":false},"timeout":{"type":"INTEGER","notNull":true,"unique":false}},"indexes":[{"name":"_smrt_report_schedules_report_class_scope_key_idx","columns":["report_class","scope_key","cron","mode"],"unique":true},{"name":"_smrt_report_schedules_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_report_schedules_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"4b9f0e69"},"importPath":"@happyvertical/smrt-reports/state"}},"moduleType":"smrt","recipes":[{"id":"reports.materialized","className":"MaterializedReportsRecipe","label":"Reports","summary":"Keep totals and trends ready to read, refreshed on a schedule and open to the assistant.","synonyms":["reports","totals","summaries","rollups","kpis","trends","dashboards"],"models":["@happyvertical/smrt-reports:SmrtReportRun","@happyvertical/smrt-reports:SmrtReportWatermark","@happyvertical/smrt-reports:SmrtReportLock","@happyvertical/smrt-reports:SmrtReportSchedule","@happyvertical/smrt-reports:SmrtReportRefreshTask","@happyvertical/smrt-reports:SmrtPrincipalReportRefreshTask"],"nav":[],"requires":[],"help":{"markdown":"## Overview\\n\\nReports keep totals and trends, such as revenue by month or signups by week,\\nworked out ahead of time so they open instantly. Someone on your team sets up\\neach report once. This feature then records when each report was last\\nrefreshed, how that went, and when it runs next.\\n\\nReports are calculated on your server, never in the browser, so this feature\\nneeds your app's database.\\n\\n## Tasks\\n\\n### Ask the assistant about a report\\n\\n1. Ask in plain words, for example \\"what was revenue last month?\\".\\n2. The assistant looks up the reports your account may see\\n (\`data.discover\`, \`data.inspect\`), then reads rows with \`reports.query\`.\\n It only ever sees the columns and the customer data you are allowed to see.\\n3. If the numbers look old, ask how fresh the report is. The answer says when\\n it was last refreshed.\\n4. Ask the assistant to refresh a stale report. It previews the refresh with\\n \`reports.refresh\` and your app decides who may apply it.\\n\\nThe assistant offers these tools only when your app has switched them on.\\n\\n### Ask a question no report covers\\n\\n1. Describe what you want to see, for example \\"orders by status this quarter\\".\\n2. The assistant checks what it may report on (\`reports.runtime.sources\`) and\\n shows a preview of the report it would save (\`reports.runtime.define\`).\\n3. Nothing is saved until you confirm that exact report.\\n4. Open it again later with \`reports.runtime.list\` and \`reports.runtime.run\`.\\n\\nThese reports are worked out live each time and their rows are never stored.\\nThey are not refreshed in the background. A report that people open every day\\nis worth asking your team to set up as a refreshed report instead.\\n\\n### Keep a report fresh\\n\\n1. Ask your team how the report refreshes: by hand, on a schedule, after the\\n data changes, or when it goes out of date.\\n2. A scheduled report repeats on its **{field:SmrtReportSchedule.cron}**, either\\n rebuilding everything or updating only what changed, per its\\n **{field:SmrtReportSchedule.mode}**.\\n3. Turn **{field:SmrtReportSchedule.enabled}** off to pause a schedule without\\n losing it.\\n4. **{field:SmrtReportSchedule.nextRun}** shows when it is next due.\\n\\n### Check that a refresh worked\\n\\n1. Look at the latest run for the report. **{field:SmrtReportRun.status}**\\n says whether it is running, finished, failed or skipped.\\n2. **{field:SmrtReportRun.completedAt}** and **{field:SmrtReportRun.rowCount}**\\n show when it finished and how many rows it holds.\\n3. If it failed, **{field:SmrtReportRun.error}** says why.\\n","fieldRefs":["SmrtReportRun.completedAt","SmrtReportRun.error","SmrtReportRun.rowCount","SmrtReportRun.status","SmrtReportSchedule.cron","SmrtReportSchedule.enabled","SmrtReportSchedule.mode","SmrtReportSchedule.nextRun"]},"runtime":"server","demo":{"mode":"server","reasons":["The recipe declares runtime \\"server\\".","Needs a server because its package does not build for a browser: node:crypto/events; @happyvertical/sql root: the sync query builders it needs (validateColumnName, buildWhere, buildAggregate, bucketExpr, tableExists) have no browser-safe SDK entry; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3625, #3627)."]}}],"smrtDependencies":["@happyvertical/smrt-core","@happyvertical/smrt-jobs","@happyvertical/smrt-tenancy"],"browser":{"status":"server-only","issues":["#3615","#3624","#3625","#3627"],"reason":"node:crypto/events; @happyvertical/sql root: the sync query builders it needs (validateColumnName, buildWhere, buildAggregate, bucketExpr, tableExists) have no browser-safe SDK entry","via":["@happyvertical/smrt-jobs","@happyvertical/smrt-tenancy"]},"stampsConstructors":true}`));
4
+ ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-reports","packageVersion":"0.55.23","objects":{"@happyvertical/smrt-reports:SmrtReport":{"name":"smrtreport","className":"SmrtReport","qualifiedName":"@happyvertical/smrt-reports:SmrtReport","collection":"smrtreports","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/report.ts","packageName":"@happyvertical/smrt-reports","fields":{"refreshedAt":{"type":"datetime","required":false}},"methods":{"isStale":{"name":"isStale","async":false,"parameters":[{"name":"ttlMs","type":"number","optional":true}],"returnType":"boolean","isStatic":false,"isPublic":true},"refresh":{"name":"refresh","async":true,"parameters":[{"name":"options","type":"Omit<ReportRefreshOptions, 'db'>","optional":true}],"returnType":"Promise<ReportRefreshResult>","isStatic":false,"isPublic":true}},"decoratorConfig":{},"extends":"SmrtObject","exportName":"SmrtReport","collectionExportName":"SmrtReportCollection","importPath":"@happyvertical/smrt-reports"},"@happyvertical/smrt-reports:SmrtReportCollection":{"name":"smrtreportcollection","className":"SmrtReportCollection","qualifiedName":"@happyvertical/smrt-reports:SmrtReportCollection","collection":"smrtreports","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/report.ts","packageName":"@happyvertical/smrt-reports","fields":{},"methods":{"refresh":{"name":"refresh","async":true,"parameters":[{"name":"options","type":"Omit<ReportRefreshOptions, 'db'>","optional":true}],"returnType":"Promise<ReportRefreshResult>","isStatic":false,"isPublic":true},"list":{"name":"list","async":true,"parameters":[{"name":"options","type":"SmrtListOptions<ModelType>","optional":true}],"returnType":"Promise<SmrtObject[] | Record<string, unknown>[]>","isStatic":false,"isPublic":true},"get":{"name":"get","async":true,"parameters":[{"name":"filter","type":"any","optional":false,"typeUnresolved":true},{"name":"options","type":"any","optional":true,"typeUnresolved":true}],"returnType":"Promise<ModelType | null>","isStatic":false,"isPublic":true}},"decoratorConfig":{},"extends":"SmrtCollection","extendsTypeArg":"ModelType","exportName":"SmrtReportCollection","collectionExportName":"SmrtReportCollectionCollection","importPath":"@happyvertical/smrt-reports"},"@happyvertical/smrt-reports:RuntimeReport":{"name":"runtimereport","className":"RuntimeReport","qualifiedName":"@happyvertical/smrt-reports:RuntimeReport","collection":"runtimereports","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/runtime-report.ts","packageName":"@happyvertical/smrt-reports","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"title":{"type":"text","required":false,"_meta":{}},"description":{"type":"text","required":false,"_meta":{}},"sourceId":{"type":"text","required":false,"_meta":{}},"spec":{"type":"text","required":true,"_meta":{"required":true}},"specHash":{"type":"text","required":false,"_meta":{}},"status":{"type":"text","required":true,"_meta":{"required":true},"enum":["active","archived"]},"createdByUserId":{"type":"text","required":false,"_meta":{}}},"methods":{"getSpec":{"name":"getSpec","async":false,"parameters":[],"returnType":"RuntimeReportSpec","isStatic":false,"isPublic":true},"setSpec":{"name":"setSpec","async":false,"parameters":[{"name":"spec","type":"RuntimeReportSpec","optional":false}],"returnType":"void","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"runtime_reports","api":{"include":["list","get","create"]},"mcp":{"include":["list","get"]},"cli":{"include":["list","get"]},"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"RuntimeReport","collectionExportName":"RuntimeReportCollection","displayLabelField":"title","validationRules":[{"field":"spec","rule":"required","fieldType":"text"},{"field":"status","rule":"required","fieldType":"text"}],"schema":{"tableName":"runtime_reports","ddl":"CREATE TABLE IF NOT EXISTS \\"runtime_reports\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"title\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_id\\" TEXT,\\n \\"spec\\" TEXT NOT NULL,\\n \\"spec_hash\\" TEXT,\\n \\"status\\" TEXT NOT NULL,\\n \\"created_by_user_id\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"title":{"type":"TEXT","notNull":false,"unique":false},"description":{"type":"TEXT","notNull":false,"unique":false},"source_id":{"type":"TEXT","notNull":false,"unique":false},"spec":{"type":"TEXT","notNull":true,"unique":false},"spec_hash":{"type":"TEXT","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false},"created_by_user_id":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"runtime_reports_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"runtime_reports_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"04a92513"},"importPath":"@happyvertical/smrt-reports"},"@happyvertical/smrt-reports:RuntimeReportCollection":{"name":"runtimereportcollection","className":"RuntimeReportCollection","qualifiedName":"@happyvertical/smrt-reports:RuntimeReportCollection","collection":"runtimereports","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/runtime-report.ts","packageName":"@happyvertical/smrt-reports","fields":{},"methods":{},"decoratorConfig":{"tableName":"runtime_reports"},"extends":"SmrtCollection","extendsTypeArg":"RuntimeReport","exportName":"RuntimeReportCollection","collectionExportName":"RuntimeReportCollectionCollection","schema":{"tableName":"runtime_reports","ddl":"CREATE TABLE IF NOT EXISTS \\"runtime_reports\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"title\\" TEXT,\\n \\"description\\" TEXT,\\n \\"source_id\\" TEXT,\\n \\"spec\\" TEXT NOT NULL,\\n \\"spec_hash\\" TEXT,\\n \\"status\\" TEXT NOT NULL,\\n \\"created_by_user_id\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"title":{"type":"TEXT","notNull":false,"unique":false},"description":{"type":"TEXT","notNull":false,"unique":false},"source_id":{"type":"TEXT","notNull":false,"unique":false},"spec":{"type":"TEXT","notNull":true,"unique":false},"spec_hash":{"type":"TEXT","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false},"created_by_user_id":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"runtime_reports_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"runtime_reports_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"04a92513"},"importPath":"@happyvertical/smrt-reports"},"@happyvertical/smrt-reports:SmrtReportRefreshTask":{"name":"smrtreportrefreshtask","className":"SmrtReportRefreshTask","qualifiedName":"@happyvertical/smrt-reports:SmrtReportRefreshTask","collection":"smrtreportrefreshtasks","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/scheduler.ts","packageName":"@happyvertical/smrt-reports","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"reportClass":{"type":"text","required":true,"_meta":{"required":true}},"mode":{"type":"text","required":true,"_meta":{"required":true},"enum":["rebuild","incremental"]},"trigger":{"type":"text","required":true,"_meta":{"required":true},"enum":["manual","schedule","change","ttl","job"]},"args":{"type":"json","required":false,"_meta":{}}},"methods":{"run":{"name":"run","async":true,"parameters":[{"name":"args","type":"ReportRefreshJobArgs","optional":true},{"name":"context","type":"JobExecutionContext","optional":true}],"returnType":"Promise<unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"_smrt_report_refresh_tasks","api":false,"cli":{"include":["list","get"],"skipApiCheck":true,"http":false},"mcp":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"SmrtReportRefreshTask","collectionExportName":"SmrtReportRefreshTaskCollection","validationRules":[{"field":"reportClass","rule":"required","fieldType":"text"},{"field":"mode","rule":"required","fieldType":"text"},{"field":"trigger","rule":"required","fieldType":"text"}],"schema":{"tableName":"_smrt_report_refresh_tasks","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_refresh_tasks\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"mode\\" TEXT NOT NULL,\\n \\"trigger\\" TEXT NOT NULL,\\n \\"args\\" JSON\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"mode":{"type":"TEXT","notNull":true,"unique":false},"trigger":{"type":"TEXT","notNull":true,"unique":false},"args":{"type":"JSON","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_report_refresh_tasks_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"_smrt_report_refresh_tasks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"c9142042"},"importPath":"@happyvertical/smrt-reports/scheduler"},"@happyvertical/smrt-reports:SmrtPrincipalReportRefreshTask":{"name":"smrtprincipalreportrefreshtask","className":"SmrtPrincipalReportRefreshTask","qualifiedName":"@happyvertical/smrt-reports:SmrtPrincipalReportRefreshTask","collection":"smrtprincipalreportrefreshtasks","description":"Worker target whose authority requirement cannot be downgraded by job args.","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/scheduler.ts","packageName":"@happyvertical/smrt-reports","fields":{"tenantId":{"type":"text","required":false,"_meta":{"generated":true,"source":"tenantScoped_decorator","sqlType":"UUID","__tenancy":{"isTenantIdField":true,"mode":"optional","field":"tenantId","autoFilter":true,"autoPopulate":true,"allowSuperAdminBypass":false}}}},"methods":{"run":{"name":"run","async":true,"parameters":[{"name":"args","type":"ReportRefreshJobArgs","optional":true},{"name":"context","type":"JobExecutionContext","optional":true}],"returnType":"Promise<unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"_smrt_principal_report_refresh_tasks","api":false,"cli":{"include":["list","get"],"skipApiCheck":true,"http":false},"mcp":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtReportRefreshTask","exportName":"SmrtPrincipalReportRefreshTask","collectionExportName":"SmrtPrincipalReportRefreshTaskCollection","schema":{"tableName":"_smrt_principal_report_refresh_tasks","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_principal_report_refresh_tasks\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_principal_report_refresh_tasks_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"_smrt_principal_report_refresh_tasks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"226a3b97"},"importPath":"@happyvertical/smrt-reports/scheduler"},"@happyvertical/smrt-reports:SmrtReportRun":{"name":"smrtreportrun","className":"SmrtReportRun","qualifiedName":"@happyvertical/smrt-reports:SmrtReportRun","collection":"smrtreportruns","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/state.ts","packageName":"@happyvertical/smrt-reports","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"scopeKey":{"type":"text","required":true,"_meta":{"required":true}},"reportClass":{"type":"text","required":true,"_meta":{"required":true}},"sourceClass":{"type":"text","required":true,"_meta":{"required":true}},"mode":{"type":"text","required":true,"_meta":{"required":true},"enum":["rebuild","incremental"]},"trigger":{"type":"text","required":true,"_meta":{"required":true},"enum":["manual","schedule","change","ttl","job"]},"status":{"type":"text","required":true,"description":"Whether the refresh is running, finished, failed or was skipped.","_meta":{"required":true,"description":"Whether the refresh is running, finished, failed or was skipped."},"enum":["running","success","failed","skipped"]},"startedAt":{"type":"datetime","required":true,"description":"When the refresh began.","_meta":{"required":true,"description":"When the refresh began."}},"completedAt":{"type":"datetime","required":false,"description":"When the refresh finished. Empty while it is still running.","_meta":{"nullable":true,"description":"When the refresh finished. Empty while it is still running."}},"rowCount":{"type":"integer","required":true,"description":"How many rows the report held after the refresh.","_meta":{"required":true,"description":"How many rows the report held after the refresh."}},"changedGroupCount":{"type":"integer","required":true,"_meta":{"required":true}},"watermarkBefore":{"type":"text","required":false,"_meta":{"nullable":true}},"watermarkAfter":{"type":"text","required":false,"_meta":{"nullable":true}},"error":{"type":"text","required":false,"description":"Why the refresh failed. Empty when it worked.","_meta":{"nullable":true,"description":"Why the refresh failed. Empty when it worked."}},"metadata":{"type":"json","required":false,"_meta":{}}},"methods":{},"decoratorConfig":{"tableName":"_smrt_report_runs","api":false,"cli":{"include":["list","get"],"skipApiCheck":true,"http":false},"mcp":false,"tenantScoped":{"mode":"optional"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"SmrtReportRun","collectionExportName":"SmrtReportRunCollection","validationRules":[{"field":"scopeKey","rule":"required","fieldType":"text"},{"field":"reportClass","rule":"required","fieldType":"text"},{"field":"sourceClass","rule":"required","fieldType":"text"},{"field":"mode","rule":"required","fieldType":"text"},{"field":"trigger","rule":"required","fieldType":"text"},{"field":"status","rule":"required","fieldType":"text"},{"field":"startedAt","rule":"required","fieldType":"datetime"},{"field":"rowCount","rule":"required","fieldType":"integer"},{"field":"changedGroupCount","rule":"required","fieldType":"integer"}],"schema":{"tableName":"_smrt_report_runs","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_runs\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"scope_key\\" TEXT NOT NULL,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"source_class\\" TEXT NOT NULL,\\n \\"mode\\" TEXT NOT NULL,\\n \\"trigger\\" TEXT NOT NULL,\\n \\"status\\" TEXT NOT NULL,\\n \\"started_at\\" TIMESTAMP NOT NULL,\\n \\"completed_at\\" TIMESTAMP,\\n \\"row_count\\" INTEGER NOT NULL,\\n \\"changed_group_count\\" INTEGER NOT NULL,\\n \\"watermark_before\\" TEXT,\\n \\"watermark_after\\" TEXT,\\n \\"error\\" TEXT,\\n \\"metadata\\" JSON\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"scope_key":{"type":"TEXT","notNull":true,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"source_class":{"type":"TEXT","notNull":true,"unique":false},"mode":{"type":"TEXT","notNull":true,"unique":false},"trigger":{"type":"TEXT","notNull":true,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false},"started_at":{"type":"TIMESTAMP","notNull":true,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"row_count":{"type":"INTEGER","notNull":true,"unique":false},"changed_group_count":{"type":"INTEGER","notNull":true,"unique":false},"watermark_before":{"type":"TEXT","notNull":false,"unique":false},"watermark_after":{"type":"TEXT","notNull":false,"unique":false},"error":{"type":"TEXT","notNull":false,"unique":false},"metadata":{"type":"JSON","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_report_runs_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"_smrt_report_runs_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"54ff5048"},"importPath":"@happyvertical/smrt-reports/state"},"@happyvertical/smrt-reports:SmrtReportRunCollection":{"name":"smrtreportruncollection","className":"SmrtReportRunCollection","qualifiedName":"@happyvertical/smrt-reports:SmrtReportRunCollection","collection":"smrtreportruns","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/state.ts","packageName":"@happyvertical/smrt-reports","fields":{},"methods":{},"decoratorConfig":{"tableName":"_smrt_report_runs","api":false,"mcp":false},"extends":"SmrtCollection","extendsTypeArg":"SmrtReportRun","exportName":"SmrtReportRunCollection","collectionExportName":"SmrtReportRunCollectionCollection","schema":{"tableName":"_smrt_report_runs","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_runs\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"scope_key\\" TEXT NOT NULL,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"source_class\\" TEXT NOT NULL,\\n \\"mode\\" TEXT NOT NULL,\\n \\"trigger\\" TEXT NOT NULL,\\n \\"status\\" TEXT NOT NULL,\\n \\"started_at\\" TIMESTAMP NOT NULL,\\n \\"completed_at\\" TIMESTAMP,\\n \\"row_count\\" INTEGER NOT NULL,\\n \\"changed_group_count\\" INTEGER NOT NULL,\\n \\"watermark_before\\" TEXT,\\n \\"watermark_after\\" TEXT,\\n \\"error\\" TEXT,\\n \\"metadata\\" JSON\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"scope_key":{"type":"TEXT","notNull":true,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"source_class":{"type":"TEXT","notNull":true,"unique":false},"mode":{"type":"TEXT","notNull":true,"unique":false},"trigger":{"type":"TEXT","notNull":true,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false},"started_at":{"type":"TIMESTAMP","notNull":true,"unique":false},"completed_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"row_count":{"type":"INTEGER","notNull":true,"unique":false},"changed_group_count":{"type":"INTEGER","notNull":true,"unique":false},"watermark_before":{"type":"TEXT","notNull":false,"unique":false},"watermark_after":{"type":"TEXT","notNull":false,"unique":false},"error":{"type":"TEXT","notNull":false,"unique":false},"metadata":{"type":"JSON","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_report_runs_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true,"nullsNotDistinct":true},{"name":"_smrt_report_runs_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"54ff5048"},"importPath":"@happyvertical/smrt-reports/state"},"@happyvertical/smrt-reports:SmrtReportWatermark":{"name":"smrtreportwatermark","className":"SmrtReportWatermark","qualifiedName":"@happyvertical/smrt-reports:SmrtReportWatermark","collection":"smrtreportwatermarks","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/state.ts","packageName":"@happyvertical/smrt-reports","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"scopeKey":{"type":"text","required":true,"_meta":{"required":true}},"reportClass":{"type":"text","required":true,"_meta":{"required":true}},"sourceClass":{"type":"text","required":true,"_meta":{"required":true}},"watermarkColumn":{"type":"text","required":true,"_meta":{"required":true}},"watermarkValue":{"type":"text","required":false,"_meta":{"nullable":true}},"lastRunId":{"type":"text","required":false,"_meta":{"nullable":true}}},"methods":{},"decoratorConfig":{"tableName":"_smrt_report_watermarks","conflictColumns":["report_class","scope_key","source_class","watermark_column"],"api":false,"cli":{"include":["list","get"],"skipApiCheck":true,"http":false},"mcp":false,"tenantScoped":{"mode":"optional"}},"extends":"SmrtObject","exportName":"SmrtReportWatermark","collectionExportName":"SmrtReportWatermarkCollection","validationRules":[{"field":"scopeKey","rule":"required","fieldType":"text"},{"field":"reportClass","rule":"required","fieldType":"text"},{"field":"sourceClass","rule":"required","fieldType":"text"},{"field":"watermarkColumn","rule":"required","fieldType":"text"}],"schema":{"tableName":"_smrt_report_watermarks","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_watermarks\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"scope_key\\" TEXT NOT NULL,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"source_class\\" TEXT NOT NULL,\\n \\"watermark_column\\" TEXT NOT NULL,\\n \\"watermark_value\\" TEXT,\\n \\"last_run_id\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"scope_key":{"type":"TEXT","notNull":true,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"source_class":{"type":"TEXT","notNull":true,"unique":false},"watermark_column":{"type":"TEXT","notNull":true,"unique":false},"watermark_value":{"type":"TEXT","notNull":false,"unique":false},"last_run_id":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_report_watermarks_report_class_scope_key_idx","columns":["report_class","scope_key","source_class","watermark_column"],"unique":true},{"name":"_smrt_report_watermarks_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_report_watermarks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"dac9d57a"},"importPath":"@happyvertical/smrt-reports/state"},"@happyvertical/smrt-reports:SmrtReportWatermarkCollection":{"name":"smrtreportwatermarkcollection","className":"SmrtReportWatermarkCollection","qualifiedName":"@happyvertical/smrt-reports:SmrtReportWatermarkCollection","collection":"smrtreportwatermarks","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/state.ts","packageName":"@happyvertical/smrt-reports","fields":{},"methods":{},"decoratorConfig":{"tableName":"_smrt_report_watermarks","api":false,"mcp":false},"extends":"SmrtCollection","extendsTypeArg":"SmrtReportWatermark","exportName":"SmrtReportWatermarkCollection","collectionExportName":"SmrtReportWatermarkCollectionCollection","schema":{"tableName":"_smrt_report_watermarks","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_watermarks\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"scope_key\\" TEXT NOT NULL,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"source_class\\" TEXT NOT NULL,\\n \\"watermark_column\\" TEXT NOT NULL,\\n \\"watermark_value\\" TEXT,\\n \\"last_run_id\\" TEXT\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"scope_key":{"type":"TEXT","notNull":true,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"source_class":{"type":"TEXT","notNull":true,"unique":false},"watermark_column":{"type":"TEXT","notNull":true,"unique":false},"watermark_value":{"type":"TEXT","notNull":false,"unique":false},"last_run_id":{"type":"TEXT","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_report_watermarks_report_class_scope_key_idx","columns":["report_class","scope_key","source_class","watermark_column"],"unique":true},{"name":"_smrt_report_watermarks_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_report_watermarks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"dac9d57a"},"importPath":"@happyvertical/smrt-reports/state"},"@happyvertical/smrt-reports:SmrtReportLock":{"name":"smrtreportlock","className":"SmrtReportLock","qualifiedName":"@happyvertical/smrt-reports:SmrtReportLock","collection":"smrtreportlocks","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/state.ts","packageName":"@happyvertical/smrt-reports","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"scopeKey":{"type":"text","required":true,"_meta":{"required":true}},"reportClass":{"type":"text","required":true,"_meta":{"required":true}},"ownerId":{"type":"text","required":false,"_meta":{"nullable":true}},"acquiredAt":{"type":"datetime","required":false,"_meta":{"nullable":true}},"heartbeatAt":{"type":"datetime","required":false,"_meta":{"nullable":true}},"expiresAt":{"type":"datetime","required":false,"_meta":{"nullable":true}}},"methods":{},"decoratorConfig":{"tableName":"_smrt_report_locks","conflictColumns":["report_class","scope_key"],"api":false,"cli":{"include":["list","get"],"skipApiCheck":true,"http":false},"mcp":false,"tenantScoped":{"mode":"optional"}},"extends":"SmrtObject","exportName":"SmrtReportLock","collectionExportName":"SmrtReportLockCollection","validationRules":[{"field":"scopeKey","rule":"required","fieldType":"text"},{"field":"reportClass","rule":"required","fieldType":"text"}],"schema":{"tableName":"_smrt_report_locks","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_locks\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"scope_key\\" TEXT NOT NULL,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"owner_id\\" TEXT,\\n \\"acquired_at\\" TIMESTAMP,\\n \\"heartbeat_at\\" TIMESTAMP,\\n \\"expires_at\\" 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"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"scope_key":{"type":"TEXT","notNull":true,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"owner_id":{"type":"TEXT","notNull":false,"unique":false},"acquired_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"heartbeat_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"expires_at":{"type":"TIMESTAMP","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_report_locks_report_class_scope_key_idx","columns":["report_class","scope_key"],"unique":true},{"name":"_smrt_report_locks_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_report_locks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"4a2043f9"},"importPath":"@happyvertical/smrt-reports/state"},"@happyvertical/smrt-reports:SmrtReportLockCollection":{"name":"smrtreportlockcollection","className":"SmrtReportLockCollection","qualifiedName":"@happyvertical/smrt-reports:SmrtReportLockCollection","collection":"smrtreportlocks","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/state.ts","packageName":"@happyvertical/smrt-reports","fields":{},"methods":{},"decoratorConfig":{"tableName":"_smrt_report_locks","api":false,"mcp":false},"extends":"SmrtCollection","extendsTypeArg":"SmrtReportLock","exportName":"SmrtReportLockCollection","collectionExportName":"SmrtReportLockCollectionCollection","schema":{"tableName":"_smrt_report_locks","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_locks\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"scope_key\\" TEXT NOT NULL,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"owner_id\\" TEXT,\\n \\"acquired_at\\" TIMESTAMP,\\n \\"heartbeat_at\\" TIMESTAMP,\\n \\"expires_at\\" 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"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"scope_key":{"type":"TEXT","notNull":true,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"owner_id":{"type":"TEXT","notNull":false,"unique":false},"acquired_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"heartbeat_at":{"type":"TIMESTAMP","notNull":false,"unique":false},"expires_at":{"type":"TIMESTAMP","notNull":false,"unique":false}},"indexes":[{"name":"_smrt_report_locks_report_class_scope_key_idx","columns":["report_class","scope_key"],"unique":true},{"name":"_smrt_report_locks_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_report_locks_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"4a2043f9"},"importPath":"@happyvertical/smrt-reports/state"},"@happyvertical/smrt-reports:SmrtReportSchedule":{"name":"smrtreportschedule","className":"SmrtReportSchedule","qualifiedName":"@happyvertical/smrt-reports:SmrtReportSchedule","collection":"smrtreportschedules","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/state.ts","packageName":"@happyvertical/smrt-reports","fields":{"tenantId":{"type":"text","required":false,"_meta":{"sqlType":"UUID","nullable":true,"__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":false,"autoPopulate":true,"nullable":true,"mode":"optional","field":"tenantId","allowSuperAdminBypass":false}}},"scopeKey":{"type":"text","required":true,"_meta":{"required":true}},"reportClass":{"type":"text","required":true,"_meta":{"required":true}},"cron":{"type":"text","required":true,"description":"When the report refreshes, as a cron schedule such as 0 6 * * * for 6 am daily.","_meta":{"required":true,"description":"When the report refreshes, as a cron schedule such as 0 6 * * * for 6 am daily."}},"trigger":{"type":"text","required":true,"_meta":{"required":true},"enum":["manual","schedule","change","ttl","job"]},"mode":{"type":"text","required":true,"description":"Rebuild recomputes the whole report. Incremental updates only what changed.","_meta":{"required":true,"description":"Rebuild recomputes the whole report. Incremental updates only what changed."},"enum":["rebuild","incremental"]},"enabled":{"type":"boolean","required":true,"description":"Turn off to stop refreshing without deleting the schedule.","_meta":{"required":true,"description":"Turn off to stop refreshing without deleting the schedule."}},"status":{"type":"text","required":true,"description":"Whether the schedule is active, paused, disabled or in error.","_meta":{"required":true,"description":"Whether the schedule is active, paused, disabled or in error."},"enum":["active","paused","disabled","error"]},"nextRun":{"type":"datetime","required":false,"description":"When the report is next due to refresh.","_meta":{"nullable":true,"description":"When the report is next due to refresh."}},"lastRun":{"type":"datetime","required":false,"description":"When the report last started a scheduled refresh.","_meta":{"nullable":true,"description":"When the report last started a scheduled refresh."}},"lastStatus":{"type":"text","required":false,"description":"Whether the last scheduled refresh worked or failed.","_meta":{"nullable":true,"description":"Whether the last scheduled refresh worked or failed."},"enum":["success","failed"]},"lastError":{"type":"text","required":false,"description":"Why the last scheduled refresh failed. Empty when it worked.","_meta":{"nullable":true,"description":"Why the last scheduled refresh failed. Empty when it worked."}},"runCount":{"type":"integer","required":true,"_meta":{"required":true}},"successCount":{"type":"integer","required":true,"_meta":{"required":true}},"failureCount":{"type":"integer","required":true,"_meta":{"required":true}},"runningCount":{"type":"integer","required":true,"_meta":{"required":true}},"maxConcurrent":{"type":"integer","required":true,"_meta":{"required":true}},"queue":{"type":"text","required":true,"_meta":{"required":true}},"priority":{"type":"integer","required":true,"_meta":{"required":true}},"timeout":{"type":"integer","required":true,"_meta":{"required":true}}},"methods":{},"decoratorConfig":{"tableName":"_smrt_report_schedules","conflictColumns":["report_class","scope_key","cron","mode"],"api":false,"cli":{"include":["list","get"],"skipApiCheck":true,"http":false},"mcp":false,"tenantScoped":{"mode":"optional"}},"extends":"SmrtObject","exportName":"SmrtReportSchedule","collectionExportName":"SmrtReportScheduleCollection","validationRules":[{"field":"scopeKey","rule":"required","fieldType":"text"},{"field":"reportClass","rule":"required","fieldType":"text"},{"field":"cron","rule":"required","fieldType":"text"},{"field":"trigger","rule":"required","fieldType":"text"},{"field":"mode","rule":"required","fieldType":"text"},{"field":"enabled","rule":"required","fieldType":"boolean"},{"field":"status","rule":"required","fieldType":"text"},{"field":"runCount","rule":"required","fieldType":"integer"},{"field":"successCount","rule":"required","fieldType":"integer"},{"field":"failureCount","rule":"required","fieldType":"integer"},{"field":"runningCount","rule":"required","fieldType":"integer"},{"field":"maxConcurrent","rule":"required","fieldType":"integer"},{"field":"queue","rule":"required","fieldType":"text"},{"field":"priority","rule":"required","fieldType":"integer"},{"field":"timeout","rule":"required","fieldType":"integer"}],"schema":{"tableName":"_smrt_report_schedules","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_schedules\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"scope_key\\" TEXT NOT NULL,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"cron\\" TEXT NOT NULL,\\n \\"trigger\\" TEXT NOT NULL,\\n \\"mode\\" TEXT NOT NULL,\\n \\"enabled\\" BOOLEAN NOT NULL,\\n \\"status\\" TEXT NOT NULL,\\n \\"next_run\\" TIMESTAMP,\\n \\"last_run\\" TIMESTAMP,\\n \\"last_status\\" TEXT,\\n \\"last_error\\" TEXT,\\n \\"run_count\\" INTEGER NOT NULL,\\n \\"success_count\\" INTEGER NOT NULL,\\n \\"failure_count\\" INTEGER NOT NULL,\\n \\"running_count\\" INTEGER NOT NULL,\\n \\"max_concurrent\\" INTEGER NOT NULL,\\n \\"queue\\" TEXT NOT NULL,\\n \\"priority\\" INTEGER NOT NULL,\\n \\"timeout\\" INTEGER NOT NULL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"scope_key":{"type":"TEXT","notNull":true,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"cron":{"type":"TEXT","notNull":true,"unique":false},"trigger":{"type":"TEXT","notNull":true,"unique":false},"mode":{"type":"TEXT","notNull":true,"unique":false},"enabled":{"type":"BOOLEAN","notNull":true,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false},"next_run":{"type":"TIMESTAMP","notNull":false,"unique":false},"last_run":{"type":"TIMESTAMP","notNull":false,"unique":false},"last_status":{"type":"TEXT","notNull":false,"unique":false},"last_error":{"type":"TEXT","notNull":false,"unique":false},"run_count":{"type":"INTEGER","notNull":true,"unique":false},"success_count":{"type":"INTEGER","notNull":true,"unique":false},"failure_count":{"type":"INTEGER","notNull":true,"unique":false},"running_count":{"type":"INTEGER","notNull":true,"unique":false},"max_concurrent":{"type":"INTEGER","notNull":true,"unique":false},"queue":{"type":"TEXT","notNull":true,"unique":false},"priority":{"type":"INTEGER","notNull":true,"unique":false},"timeout":{"type":"INTEGER","notNull":true,"unique":false}},"indexes":[{"name":"_smrt_report_schedules_report_class_scope_key_idx","columns":["report_class","scope_key","cron","mode"],"unique":true},{"name":"_smrt_report_schedules_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_report_schedules_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"4b9f0e69"},"importPath":"@happyvertical/smrt-reports/state"},"@happyvertical/smrt-reports:SmrtReportScheduleCollection":{"name":"smrtreportschedulecollection","className":"SmrtReportScheduleCollection","qualifiedName":"@happyvertical/smrt-reports:SmrtReportScheduleCollection","collection":"smrtreportschedules","filePath":"/home/runner/work/smrt/smrt/packages/reports/src/state.ts","packageName":"@happyvertical/smrt-reports","fields":{},"methods":{},"decoratorConfig":{"tableName":"_smrt_report_schedules","api":false,"mcp":false},"extends":"SmrtCollection","extendsTypeArg":"SmrtReportSchedule","exportName":"SmrtReportScheduleCollection","collectionExportName":"SmrtReportScheduleCollectionCollection","schema":{"tableName":"_smrt_report_schedules","ddl":"CREATE TABLE IF NOT EXISTS \\"_smrt_report_schedules\\" (\\n \\"id\\" UUID PRIMARY KEY NOT NULL,\\n \\"slug\\" TEXT NOT NULL,\\n \\"context\\" TEXT NOT NULL DEFAULT '',\\n \\"created_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"updated_at\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\"tenant_id\\" UUID,\\n \\"scope_key\\" TEXT NOT NULL,\\n \\"report_class\\" TEXT NOT NULL,\\n \\"cron\\" TEXT NOT NULL,\\n \\"trigger\\" TEXT NOT NULL,\\n \\"mode\\" TEXT NOT NULL,\\n \\"enabled\\" BOOLEAN NOT NULL,\\n \\"status\\" TEXT NOT NULL,\\n \\"next_run\\" TIMESTAMP,\\n \\"last_run\\" TIMESTAMP,\\n \\"last_status\\" TEXT,\\n \\"last_error\\" TEXT,\\n \\"run_count\\" INTEGER NOT NULL,\\n \\"success_count\\" INTEGER NOT NULL,\\n \\"failure_count\\" INTEGER NOT NULL,\\n \\"running_count\\" INTEGER NOT NULL,\\n \\"max_concurrent\\" INTEGER NOT NULL,\\n \\"queue\\" TEXT NOT NULL,\\n \\"priority\\" INTEGER NOT NULL,\\n \\"timeout\\" INTEGER NOT NULL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":false,"unique":false},"scope_key":{"type":"TEXT","notNull":true,"unique":false},"report_class":{"type":"TEXT","notNull":true,"unique":false},"cron":{"type":"TEXT","notNull":true,"unique":false},"trigger":{"type":"TEXT","notNull":true,"unique":false},"mode":{"type":"TEXT","notNull":true,"unique":false},"enabled":{"type":"BOOLEAN","notNull":true,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false},"next_run":{"type":"TIMESTAMP","notNull":false,"unique":false},"last_run":{"type":"TIMESTAMP","notNull":false,"unique":false},"last_status":{"type":"TEXT","notNull":false,"unique":false},"last_error":{"type":"TEXT","notNull":false,"unique":false},"run_count":{"type":"INTEGER","notNull":true,"unique":false},"success_count":{"type":"INTEGER","notNull":true,"unique":false},"failure_count":{"type":"INTEGER","notNull":true,"unique":false},"running_count":{"type":"INTEGER","notNull":true,"unique":false},"max_concurrent":{"type":"INTEGER","notNull":true,"unique":false},"queue":{"type":"TEXT","notNull":true,"unique":false},"priority":{"type":"INTEGER","notNull":true,"unique":false},"timeout":{"type":"INTEGER","notNull":true,"unique":false}},"indexes":[{"name":"_smrt_report_schedules_report_class_scope_key_idx","columns":["report_class","scope_key","cron","mode"],"unique":true},{"name":"_smrt_report_schedules_slug_context_idx","columns":["slug","context"]},{"name":"_smrt_report_schedules_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"4b9f0e69"},"importPath":"@happyvertical/smrt-reports/state"}},"moduleType":"smrt","recipes":[{"id":"reports.materialized","className":"MaterializedReportsRecipe","label":"Reports","summary":"Keep totals and trends ready to read, refreshed on a schedule and open to the assistant.","synonyms":["reports","totals","summaries","rollups","kpis","trends","dashboards"],"models":["@happyvertical/smrt-reports:SmrtReportRun","@happyvertical/smrt-reports:SmrtReportWatermark","@happyvertical/smrt-reports:SmrtReportLock","@happyvertical/smrt-reports:SmrtReportSchedule","@happyvertical/smrt-reports:SmrtReportRefreshTask","@happyvertical/smrt-reports:SmrtPrincipalReportRefreshTask"],"nav":[],"requires":[],"help":{"markdown":"## Overview\\n\\nReports keep totals and trends, such as revenue by month or signups by week,\\nworked out ahead of time so they open instantly. Someone on your team sets up\\neach report once. This feature then records when each report was last\\nrefreshed, how that went, and when it runs next.\\n\\nReports are calculated on your server, never in the browser, so this feature\\nneeds your app's database.\\n\\n## Tasks\\n\\n### Ask the assistant about a report\\n\\n1. Ask in plain words, for example \\"what was revenue last month?\\".\\n2. The assistant looks up the reports your account may see\\n (\`data.discover\`, \`data.inspect\`), then reads rows with \`reports.query\`.\\n It only ever sees the columns and the customer data you are allowed to see.\\n3. If the numbers look old, ask how fresh the report is. The answer says when\\n it was last refreshed.\\n4. Ask the assistant to refresh a stale report. It previews the refresh with\\n \`reports.refresh\` and your app decides who may apply it.\\n\\nThe assistant offers these tools only when your app has switched them on.\\n\\n### Ask a question no report covers\\n\\n1. Describe what you want to see, for example \\"orders by status this quarter\\".\\n2. The assistant checks what it may report on (\`reports.runtime.sources\`) and\\n shows a preview of the report it would save (\`reports.runtime.define\`).\\n3. Nothing is saved until you confirm that exact report.\\n4. Open it again later with \`reports.runtime.list\` and \`reports.runtime.run\`.\\n\\nThese reports are worked out live each time and their rows are never stored.\\nThey are not refreshed in the background. A report that people open every day\\nis worth asking your team to set up as a refreshed report instead.\\n\\n### Keep a report fresh\\n\\n1. Ask your team how the report refreshes: by hand, on a schedule, after the\\n data changes, or when it goes out of date.\\n2. A scheduled report repeats on its **{field:SmrtReportSchedule.cron}**, either\\n rebuilding everything or updating only what changed, per its\\n **{field:SmrtReportSchedule.mode}**.\\n3. Turn **{field:SmrtReportSchedule.enabled}** off to pause a schedule without\\n losing it.\\n4. **{field:SmrtReportSchedule.nextRun}** shows when it is next due.\\n\\n### Check that a refresh worked\\n\\n1. Look at the latest run for the report. **{field:SmrtReportRun.status}**\\n says whether it is running, finished, failed or skipped.\\n2. **{field:SmrtReportRun.completedAt}** and **{field:SmrtReportRun.rowCount}**\\n show when it finished and how many rows it holds.\\n3. If it failed, **{field:SmrtReportRun.error}** says why.\\n","fieldRefs":["SmrtReportRun.completedAt","SmrtReportRun.error","SmrtReportRun.rowCount","SmrtReportRun.status","SmrtReportSchedule.cron","SmrtReportSchedule.enabled","SmrtReportSchedule.mode","SmrtReportSchedule.nextRun"]},"runtime":"server","demo":{"mode":"server","reasons":["The recipe declares runtime \\"server\\".","Needs a server because its package does not build for a browser: node:crypto/events; @happyvertical/sql root: the sync query builders it needs (validateColumnName, buildWhere, buildAggregate, bucketExpr, tableExists) have no browser-safe SDK entry; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3625, #3627)."]}}],"smrtDependencies":["@happyvertical/smrt-core","@happyvertical/smrt-jobs","@happyvertical/smrt-tenancy"],"browser":{"status":"server-only","issues":["#3615","#3624","#3625","#3627"],"reason":"node:crypto/events; @happyvertical/sql root: the sync query builders it needs (validateColumnName, buildWhere, buildAggregate, bucketExpr, tableExists) have no browser-safe SDK entry","via":["@happyvertical/smrt-jobs","@happyvertical/smrt-tenancy"]},"stampsConstructors":true}`));
5
5
  //#endregion
6
6
  //#region src/state.ts
7
7
  var __defProp = Object.defineProperty;
package/dist/state.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","names":["tenantId"],"sources":["../src/__smrt-register__.ts","../src/state.ts"],"sourcesContent":["// Generated by @happyvertical/smrt-core smrtPlugin at library build time.\n// The package manifest is inlined so self-registration cannot miss when a\n// downstream bundler relocates this module away from dist/manifest.json\n// (https://github.com/happyvertical/smrt/issues/1506,\n// https://github.com/happyvertical/smrt/issues/1507).\nimport { ObjectRegistry } from '@happyvertical/smrt-core';\n\nObjectRegistry.registerPackageManifest(JSON.parse(\"{\\\"version\\\":\\\"1.0.0\\\",\\\"timestamp\\\":0,\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"packageVersion\\\":\\\"0.55.22\\\",\\\"objects\\\":{\\\"@happyvertical/smrt-reports:SmrtReport\\\":{\\\"name\\\":\\\"smrtreport\\\",\\\"className\\\":\\\"SmrtReport\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReport\\\",\\\"collection\\\":\\\"smrtreports\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/report.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{\\\"refreshedAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false}},\\\"methods\\\":{\\\"isStale\\\":{\\\"name\\\":\\\"isStale\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"ttlMs\\\",\\\"type\\\":\\\"number\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"refresh\\\":{\\\"name\\\":\\\"refresh\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"options\\\",\\\"type\\\":\\\"Omit<ReportRefreshOptions, 'db'>\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<ReportRefreshResult>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"SmrtReport\\\",\\\"collectionExportName\\\":\\\"SmrtReportCollection\\\",\\\"importPath\\\":\\\"@happyvertical/smrt-reports\\\"},\\\"@happyvertical/smrt-reports:SmrtReportCollection\\\":{\\\"name\\\":\\\"smrtreportcollection\\\",\\\"className\\\":\\\"SmrtReportCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportCollection\\\",\\\"collection\\\":\\\"smrtreports\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/report.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"refresh\\\":{\\\"name\\\":\\\"refresh\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"options\\\",\\\"type\\\":\\\"Omit<ReportRefreshOptions, 'db'>\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<ReportRefreshResult>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"list\\\":{\\\"name\\\":\\\"list\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"options\\\",\\\"type\\\":\\\"SmrtListOptions<ModelType>\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<SmrtObject[] | Record<string, unknown>[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"get\\\":{\\\"name\\\":\\\"get\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"filter\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":false,\\\"typeUnresolved\\\":true},{\\\"name\\\":\\\"options\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":true,\\\"typeUnresolved\\\":true}],\\\"returnType\\\":\\\"Promise<ModelType | null>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"ModelType\\\",\\\"exportName\\\":\\\"SmrtReportCollection\\\",\\\"collectionExportName\\\":\\\"SmrtReportCollectionCollection\\\",\\\"importPath\\\":\\\"@happyvertical/smrt-reports\\\"},\\\"@happyvertical/smrt-reports:RuntimeReport\\\":{\\\"name\\\":\\\"runtimereport\\\",\\\"className\\\":\\\"RuntimeReport\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:RuntimeReport\\\",\\\"collection\\\":\\\"runtimereports\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/runtime-report.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":true,\\\"autoPopulate\\\":true,\\\"nullable\\\":false,\\\"mode\\\":\\\"required\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"title\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{}},\\\"description\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{}},\\\"sourceId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{}},\\\"spec\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"specHash\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{}},\\\"status\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"active\\\",\\\"archived\\\"]},\\\"createdByUserId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{}}},\\\"methods\\\":{\\\"getSpec\\\":{\\\"name\\\":\\\"getSpec\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"RuntimeReportSpec\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setSpec\\\":{\\\"name\\\":\\\"setSpec\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"spec\\\",\\\"type\\\":\\\"RuntimeReportSpec\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"runtime_reports\\\",\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\"]},\\\"cli\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\"]},\\\"tenantScoped\\\":{\\\"mode\\\":\\\"required\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"RuntimeReport\\\",\\\"collectionExportName\\\":\\\"RuntimeReportCollection\\\",\\\"displayLabelField\\\":\\\"title\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"spec\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"status\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"runtime_reports\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"runtime_reports\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"title\\\\\\\" TEXT,\\\\n \\\\\\\"description\\\\\\\" TEXT,\\\\n \\\\\\\"source_id\\\\\\\" TEXT,\\\\n \\\\\\\"spec\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"spec_hash\\\\\\\" TEXT,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"created_by_user_id\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"title\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"source_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"spec\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"spec_hash\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"created_by_user_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"runtime_reports_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"runtime_reports_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"04a92513\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports\\\"},\\\"@happyvertical/smrt-reports:RuntimeReportCollection\\\":{\\\"name\\\":\\\"runtimereportcollection\\\",\\\"className\\\":\\\"RuntimeReportCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:RuntimeReportCollection\\\",\\\"collection\\\":\\\"runtimereports\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/runtime-report.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"runtime_reports\\\"},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"RuntimeReport\\\",\\\"exportName\\\":\\\"RuntimeReportCollection\\\",\\\"collectionExportName\\\":\\\"RuntimeReportCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"runtime_reports\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"runtime_reports\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"title\\\\\\\" TEXT,\\\\n \\\\\\\"description\\\\\\\" TEXT,\\\\n \\\\\\\"source_id\\\\\\\" TEXT,\\\\n \\\\\\\"spec\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"spec_hash\\\\\\\" TEXT,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"created_by_user_id\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"title\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"source_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"spec\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"spec_hash\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"created_by_user_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"runtime_reports_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"runtime_reports_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"04a92513\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports\\\"},\\\"@happyvertical/smrt-reports:SmrtReportRefreshTask\\\":{\\\"name\\\":\\\"smrtreportrefreshtask\\\",\\\"className\\\":\\\"SmrtReportRefreshTask\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportRefreshTask\\\",\\\"collection\\\":\\\"smrtreportrefreshtasks\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/scheduler.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"reportClass\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"mode\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"rebuild\\\",\\\"incremental\\\"]},\\\"trigger\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"manual\\\",\\\"schedule\\\",\\\"change\\\",\\\"ttl\\\",\\\"job\\\"]},\\\"args\\\":{\\\"type\\\":\\\"json\\\",\\\"required\\\":false,\\\"_meta\\\":{}}},\\\"methods\\\":{\\\"run\\\":{\\\"name\\\":\\\"run\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"args\\\",\\\"type\\\":\\\"ReportRefreshJobArgs\\\",\\\"optional\\\":true},{\\\"name\\\":\\\"context\\\",\\\"type\\\":\\\"JobExecutionContext\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<unknown>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_refresh_tasks\\\",\\\"api\\\":false,\\\"cli\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\"],\\\"skipApiCheck\\\":true,\\\"http\\\":false},\\\"mcp\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"SmrtReportRefreshTask\\\",\\\"collectionExportName\\\":\\\"SmrtReportRefreshTaskCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"reportClass\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"mode\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"trigger\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_refresh_tasks\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_refresh_tasks\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"mode\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"trigger\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"args\\\\\\\" JSON\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"mode\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"trigger\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"args\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_refresh_tasks_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"_smrt_report_refresh_tasks_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"c9142042\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/scheduler\\\"},\\\"@happyvertical/smrt-reports:SmrtPrincipalReportRefreshTask\\\":{\\\"name\\\":\\\"smrtprincipalreportrefreshtask\\\",\\\"className\\\":\\\"SmrtPrincipalReportRefreshTask\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtPrincipalReportRefreshTask\\\",\\\"collection\\\":\\\"smrtprincipalreportrefreshtasks\\\",\\\"description\\\":\\\"Worker target whose authority requirement cannot be downgraded by job args.\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/scheduler.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"generated\\\":true,\\\"source\\\":\\\"tenantScoped_decorator\\\",\\\"sqlType\\\":\\\"UUID\\\",\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"autoFilter\\\":true,\\\"autoPopulate\\\":true,\\\"allowSuperAdminBypass\\\":false}}}},\\\"methods\\\":{\\\"run\\\":{\\\"name\\\":\\\"run\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"args\\\",\\\"type\\\":\\\"ReportRefreshJobArgs\\\",\\\"optional\\\":true},{\\\"name\\\":\\\"context\\\",\\\"type\\\":\\\"JobExecutionContext\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<unknown>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_principal_report_refresh_tasks\\\",\\\"api\\\":false,\\\"cli\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\"],\\\"skipApiCheck\\\":true,\\\"http\\\":false},\\\"mcp\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtReportRefreshTask\\\",\\\"exportName\\\":\\\"SmrtPrincipalReportRefreshTask\\\",\\\"collectionExportName\\\":\\\"SmrtPrincipalReportRefreshTaskCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_principal_report_refresh_tasks\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_principal_report_refresh_tasks\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_principal_report_refresh_tasks_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"_smrt_principal_report_refresh_tasks_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"226a3b97\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/scheduler\\\"},\\\"@happyvertical/smrt-reports:SmrtReportRun\\\":{\\\"name\\\":\\\"smrtreportrun\\\",\\\"className\\\":\\\"SmrtReportRun\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportRun\\\",\\\"collection\\\":\\\"smrtreportruns\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/state.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"scopeKey\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"reportClass\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"sourceClass\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"mode\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"rebuild\\\",\\\"incremental\\\"]},\\\"trigger\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"manual\\\",\\\"schedule\\\",\\\"change\\\",\\\"ttl\\\",\\\"job\\\"]},\\\"status\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"description\\\":\\\"Whether the refresh is running, finished, failed or was skipped.\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"description\\\":\\\"Whether the refresh is running, finished, failed or was skipped.\\\"},\\\"enum\\\":[\\\"running\\\",\\\"success\\\",\\\"failed\\\",\\\"skipped\\\"]},\\\"startedAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":true,\\\"description\\\":\\\"When the refresh began.\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"description\\\":\\\"When the refresh began.\\\"}},\\\"completedAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"description\\\":\\\"When the refresh finished. Empty while it is still running.\\\",\\\"_meta\\\":{\\\"nullable\\\":true,\\\"description\\\":\\\"When the refresh finished. Empty while it is still running.\\\"}},\\\"rowCount\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"description\\\":\\\"How many rows the report held after the refresh.\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"description\\\":\\\"How many rows the report held after the refresh.\\\"}},\\\"changedGroupCount\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"watermarkBefore\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}},\\\"watermarkAfter\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}},\\\"error\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"description\\\":\\\"Why the refresh failed. Empty when it worked.\\\",\\\"_meta\\\":{\\\"nullable\\\":true,\\\"description\\\":\\\"Why the refresh failed. Empty when it worked.\\\"}},\\\"metadata\\\":{\\\"type\\\":\\\"json\\\",\\\"required\\\":false,\\\"_meta\\\":{}}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_runs\\\",\\\"api\\\":false,\\\"cli\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\"],\\\"skipApiCheck\\\":true,\\\"http\\\":false},\\\"mcp\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"SmrtReportRun\\\",\\\"collectionExportName\\\":\\\"SmrtReportRunCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"scopeKey\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"reportClass\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"sourceClass\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"mode\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"trigger\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"status\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"startedAt\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"datetime\\\"},{\\\"field\\\":\\\"rowCount\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"},{\\\"field\\\":\\\"changedGroupCount\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_runs\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_runs\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"scope_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"source_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"mode\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"trigger\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"started_at\\\\\\\" TIMESTAMP NOT NULL,\\\\n \\\\\\\"completed_at\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"row_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"changed_group_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"watermark_before\\\\\\\" TEXT,\\\\n \\\\\\\"watermark_after\\\\\\\" TEXT,\\\\n \\\\\\\"error\\\\\\\" TEXT,\\\\n \\\\\\\"metadata\\\\\\\" JSON\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"scope_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"source_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"mode\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"trigger\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"started_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"completed_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"row_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"changed_group_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"watermark_before\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"watermark_after\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"error\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_runs_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"_smrt_report_runs_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"54ff5048\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/state\\\"},\\\"@happyvertical/smrt-reports:SmrtReportRunCollection\\\":{\\\"name\\\":\\\"smrtreportruncollection\\\",\\\"className\\\":\\\"SmrtReportRunCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportRunCollection\\\",\\\"collection\\\":\\\"smrtreportruns\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/state.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_runs\\\",\\\"api\\\":false,\\\"mcp\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"SmrtReportRun\\\",\\\"exportName\\\":\\\"SmrtReportRunCollection\\\",\\\"collectionExportName\\\":\\\"SmrtReportRunCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_runs\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_runs\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"scope_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"source_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"mode\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"trigger\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"started_at\\\\\\\" TIMESTAMP NOT NULL,\\\\n \\\\\\\"completed_at\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"row_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"changed_group_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"watermark_before\\\\\\\" TEXT,\\\\n \\\\\\\"watermark_after\\\\\\\" TEXT,\\\\n \\\\\\\"error\\\\\\\" TEXT,\\\\n \\\\\\\"metadata\\\\\\\" JSON\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"scope_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"source_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"mode\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"trigger\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"started_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"completed_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"row_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"changed_group_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"watermark_before\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"watermark_after\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"error\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_runs_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"_smrt_report_runs_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"54ff5048\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/state\\\"},\\\"@happyvertical/smrt-reports:SmrtReportWatermark\\\":{\\\"name\\\":\\\"smrtreportwatermark\\\",\\\"className\\\":\\\"SmrtReportWatermark\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportWatermark\\\",\\\"collection\\\":\\\"smrtreportwatermarks\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/state.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"scopeKey\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"reportClass\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"sourceClass\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"watermarkColumn\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"watermarkValue\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}},\\\"lastRunId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_watermarks\\\",\\\"conflictColumns\\\":[\\\"report_class\\\",\\\"scope_key\\\",\\\"source_class\\\",\\\"watermark_column\\\"],\\\"api\\\":false,\\\"cli\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\"],\\\"skipApiCheck\\\":true,\\\"http\\\":false},\\\"mcp\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"}},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"SmrtReportWatermark\\\",\\\"collectionExportName\\\":\\\"SmrtReportWatermarkCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"scopeKey\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"reportClass\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"sourceClass\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"watermarkColumn\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_watermarks\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_watermarks\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"scope_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"source_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"watermark_column\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"watermark_value\\\\\\\" TEXT,\\\\n \\\\\\\"last_run_id\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"scope_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"source_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"watermark_column\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"watermark_value\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"last_run_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_watermarks_report_class_scope_key_idx\\\",\\\"columns\\\":[\\\"report_class\\\",\\\"scope_key\\\",\\\"source_class\\\",\\\"watermark_column\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"_smrt_report_watermarks_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"_smrt_report_watermarks_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"dac9d57a\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/state\\\"},\\\"@happyvertical/smrt-reports:SmrtReportWatermarkCollection\\\":{\\\"name\\\":\\\"smrtreportwatermarkcollection\\\",\\\"className\\\":\\\"SmrtReportWatermarkCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportWatermarkCollection\\\",\\\"collection\\\":\\\"smrtreportwatermarks\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/state.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_watermarks\\\",\\\"api\\\":false,\\\"mcp\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"SmrtReportWatermark\\\",\\\"exportName\\\":\\\"SmrtReportWatermarkCollection\\\",\\\"collectionExportName\\\":\\\"SmrtReportWatermarkCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_watermarks\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_watermarks\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"scope_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"source_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"watermark_column\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"watermark_value\\\\\\\" TEXT,\\\\n \\\\\\\"last_run_id\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"scope_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"source_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"watermark_column\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"watermark_value\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"last_run_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_watermarks_report_class_scope_key_idx\\\",\\\"columns\\\":[\\\"report_class\\\",\\\"scope_key\\\",\\\"source_class\\\",\\\"watermark_column\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"_smrt_report_watermarks_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"_smrt_report_watermarks_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"dac9d57a\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/state\\\"},\\\"@happyvertical/smrt-reports:SmrtReportLock\\\":{\\\"name\\\":\\\"smrtreportlock\\\",\\\"className\\\":\\\"SmrtReportLock\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportLock\\\",\\\"collection\\\":\\\"smrtreportlocks\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/state.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"scopeKey\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"reportClass\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"ownerId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}},\\\"acquiredAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}},\\\"heartbeatAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}},\\\"expiresAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_locks\\\",\\\"conflictColumns\\\":[\\\"report_class\\\",\\\"scope_key\\\"],\\\"api\\\":false,\\\"cli\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\"],\\\"skipApiCheck\\\":true,\\\"http\\\":false},\\\"mcp\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"}},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"SmrtReportLock\\\",\\\"collectionExportName\\\":\\\"SmrtReportLockCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"scopeKey\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"reportClass\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_locks\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_locks\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"scope_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"owner_id\\\\\\\" TEXT,\\\\n \\\\\\\"acquired_at\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"heartbeat_at\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"expires_at\\\\\\\" 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\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"scope_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"owner_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"acquired_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"heartbeat_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"expires_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_locks_report_class_scope_key_idx\\\",\\\"columns\\\":[\\\"report_class\\\",\\\"scope_key\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"_smrt_report_locks_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"_smrt_report_locks_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"4a2043f9\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/state\\\"},\\\"@happyvertical/smrt-reports:SmrtReportLockCollection\\\":{\\\"name\\\":\\\"smrtreportlockcollection\\\",\\\"className\\\":\\\"SmrtReportLockCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportLockCollection\\\",\\\"collection\\\":\\\"smrtreportlocks\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/state.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_locks\\\",\\\"api\\\":false,\\\"mcp\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"SmrtReportLock\\\",\\\"exportName\\\":\\\"SmrtReportLockCollection\\\",\\\"collectionExportName\\\":\\\"SmrtReportLockCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_locks\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_locks\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"scope_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"owner_id\\\\\\\" TEXT,\\\\n \\\\\\\"acquired_at\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"heartbeat_at\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"expires_at\\\\\\\" 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\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"scope_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"owner_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"acquired_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"heartbeat_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"expires_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_locks_report_class_scope_key_idx\\\",\\\"columns\\\":[\\\"report_class\\\",\\\"scope_key\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"_smrt_report_locks_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"_smrt_report_locks_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"4a2043f9\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/state\\\"},\\\"@happyvertical/smrt-reports:SmrtReportSchedule\\\":{\\\"name\\\":\\\"smrtreportschedule\\\",\\\"className\\\":\\\"SmrtReportSchedule\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportSchedule\\\",\\\"collection\\\":\\\"smrtreportschedules\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/state.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"scopeKey\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"reportClass\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"cron\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"description\\\":\\\"When the report refreshes, as a cron schedule such as 0 6 * * * for 6 am daily.\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"description\\\":\\\"When the report refreshes, as a cron schedule such as 0 6 * * * for 6 am daily.\\\"}},\\\"trigger\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"manual\\\",\\\"schedule\\\",\\\"change\\\",\\\"ttl\\\",\\\"job\\\"]},\\\"mode\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"description\\\":\\\"Rebuild recomputes the whole report. Incremental updates only what changed.\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"description\\\":\\\"Rebuild recomputes the whole report. Incremental updates only what changed.\\\"},\\\"enum\\\":[\\\"rebuild\\\",\\\"incremental\\\"]},\\\"enabled\\\":{\\\"type\\\":\\\"boolean\\\",\\\"required\\\":true,\\\"description\\\":\\\"Turn off to stop refreshing without deleting the schedule.\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"description\\\":\\\"Turn off to stop refreshing without deleting the schedule.\\\"}},\\\"status\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"description\\\":\\\"Whether the schedule is active, paused, disabled or in error.\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"description\\\":\\\"Whether the schedule is active, paused, disabled or in error.\\\"},\\\"enum\\\":[\\\"active\\\",\\\"paused\\\",\\\"disabled\\\",\\\"error\\\"]},\\\"nextRun\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"description\\\":\\\"When the report is next due to refresh.\\\",\\\"_meta\\\":{\\\"nullable\\\":true,\\\"description\\\":\\\"When the report is next due to refresh.\\\"}},\\\"lastRun\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"description\\\":\\\"When the report last started a scheduled refresh.\\\",\\\"_meta\\\":{\\\"nullable\\\":true,\\\"description\\\":\\\"When the report last started a scheduled refresh.\\\"}},\\\"lastStatus\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"description\\\":\\\"Whether the last scheduled refresh worked or failed.\\\",\\\"_meta\\\":{\\\"nullable\\\":true,\\\"description\\\":\\\"Whether the last scheduled refresh worked or failed.\\\"},\\\"enum\\\":[\\\"success\\\",\\\"failed\\\"]},\\\"lastError\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"description\\\":\\\"Why the last scheduled refresh failed. Empty when it worked.\\\",\\\"_meta\\\":{\\\"nullable\\\":true,\\\"description\\\":\\\"Why the last scheduled refresh failed. Empty when it worked.\\\"}},\\\"runCount\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"successCount\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"failureCount\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"runningCount\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"maxConcurrent\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"queue\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"priority\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"timeout\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_schedules\\\",\\\"conflictColumns\\\":[\\\"report_class\\\",\\\"scope_key\\\",\\\"cron\\\",\\\"mode\\\"],\\\"api\\\":false,\\\"cli\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\"],\\\"skipApiCheck\\\":true,\\\"http\\\":false},\\\"mcp\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"}},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"SmrtReportSchedule\\\",\\\"collectionExportName\\\":\\\"SmrtReportScheduleCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"scopeKey\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"reportClass\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"cron\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"trigger\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"mode\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"enabled\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"boolean\\\"},{\\\"field\\\":\\\"status\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"runCount\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"},{\\\"field\\\":\\\"successCount\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"},{\\\"field\\\":\\\"failureCount\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"},{\\\"field\\\":\\\"runningCount\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"},{\\\"field\\\":\\\"maxConcurrent\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"},{\\\"field\\\":\\\"queue\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"priority\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"},{\\\"field\\\":\\\"timeout\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_schedules\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_schedules\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"scope_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"cron\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"trigger\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"mode\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"enabled\\\\\\\" BOOLEAN NOT NULL,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"next_run\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"last_run\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"last_status\\\\\\\" TEXT,\\\\n \\\\\\\"last_error\\\\\\\" TEXT,\\\\n \\\\\\\"run_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"success_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"failure_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"running_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"max_concurrent\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"queue\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"priority\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"timeout\\\\\\\" INTEGER NOT NULL\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"scope_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"cron\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"trigger\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"mode\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"enabled\\\":{\\\"type\\\":\\\"BOOLEAN\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"next_run\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"last_run\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"last_status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"last_error\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"run_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"success_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"failure_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"running_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"max_concurrent\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"queue\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"priority\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"timeout\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_schedules_report_class_scope_key_idx\\\",\\\"columns\\\":[\\\"report_class\\\",\\\"scope_key\\\",\\\"cron\\\",\\\"mode\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"_smrt_report_schedules_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"_smrt_report_schedules_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"4b9f0e69\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/state\\\"},\\\"@happyvertical/smrt-reports:SmrtReportScheduleCollection\\\":{\\\"name\\\":\\\"smrtreportschedulecollection\\\",\\\"className\\\":\\\"SmrtReportScheduleCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportScheduleCollection\\\",\\\"collection\\\":\\\"smrtreportschedules\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/state.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_schedules\\\",\\\"api\\\":false,\\\"mcp\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"SmrtReportSchedule\\\",\\\"exportName\\\":\\\"SmrtReportScheduleCollection\\\",\\\"collectionExportName\\\":\\\"SmrtReportScheduleCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_schedules\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_schedules\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"scope_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"cron\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"trigger\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"mode\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"enabled\\\\\\\" BOOLEAN NOT NULL,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"next_run\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"last_run\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"last_status\\\\\\\" TEXT,\\\\n \\\\\\\"last_error\\\\\\\" TEXT,\\\\n \\\\\\\"run_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"success_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"failure_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"running_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"max_concurrent\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"queue\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"priority\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"timeout\\\\\\\" INTEGER NOT NULL\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"scope_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"cron\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"trigger\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"mode\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"enabled\\\":{\\\"type\\\":\\\"BOOLEAN\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"next_run\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"last_run\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"last_status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"last_error\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"run_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"success_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"failure_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"running_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"max_concurrent\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"queue\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"priority\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"timeout\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_schedules_report_class_scope_key_idx\\\",\\\"columns\\\":[\\\"report_class\\\",\\\"scope_key\\\",\\\"cron\\\",\\\"mode\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"_smrt_report_schedules_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"_smrt_report_schedules_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"4b9f0e69\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/state\\\"}},\\\"moduleType\\\":\\\"smrt\\\",\\\"recipes\\\":[{\\\"id\\\":\\\"reports.materialized\\\",\\\"className\\\":\\\"MaterializedReportsRecipe\\\",\\\"label\\\":\\\"Reports\\\",\\\"summary\\\":\\\"Keep totals and trends ready to read, refreshed on a schedule and open to the assistant.\\\",\\\"synonyms\\\":[\\\"reports\\\",\\\"totals\\\",\\\"summaries\\\",\\\"rollups\\\",\\\"kpis\\\",\\\"trends\\\",\\\"dashboards\\\"],\\\"models\\\":[\\\"@happyvertical/smrt-reports:SmrtReportRun\\\",\\\"@happyvertical/smrt-reports:SmrtReportWatermark\\\",\\\"@happyvertical/smrt-reports:SmrtReportLock\\\",\\\"@happyvertical/smrt-reports:SmrtReportSchedule\\\",\\\"@happyvertical/smrt-reports:SmrtReportRefreshTask\\\",\\\"@happyvertical/smrt-reports:SmrtPrincipalReportRefreshTask\\\"],\\\"nav\\\":[],\\\"requires\\\":[],\\\"help\\\":{\\\"markdown\\\":\\\"## Overview\\\\n\\\\nReports keep totals and trends, such as revenue by month or signups by week,\\\\nworked out ahead of time so they open instantly. Someone on your team sets up\\\\neach report once. This feature then records when each report was last\\\\nrefreshed, how that went, and when it runs next.\\\\n\\\\nReports are calculated on your server, never in the browser, so this feature\\\\nneeds your app's database.\\\\n\\\\n## Tasks\\\\n\\\\n### Ask the assistant about a report\\\\n\\\\n1. Ask in plain words, for example \\\\\\\"what was revenue last month?\\\\\\\".\\\\n2. The assistant looks up the reports your account may see\\\\n (`data.discover`, `data.inspect`), then reads rows with `reports.query`.\\\\n It only ever sees the columns and the customer data you are allowed to see.\\\\n3. If the numbers look old, ask how fresh the report is. The answer says when\\\\n it was last refreshed.\\\\n4. Ask the assistant to refresh a stale report. It previews the refresh with\\\\n `reports.refresh` and your app decides who may apply it.\\\\n\\\\nThe assistant offers these tools only when your app has switched them on.\\\\n\\\\n### Ask a question no report covers\\\\n\\\\n1. Describe what you want to see, for example \\\\\\\"orders by status this quarter\\\\\\\".\\\\n2. The assistant checks what it may report on (`reports.runtime.sources`) and\\\\n shows a preview of the report it would save (`reports.runtime.define`).\\\\n3. Nothing is saved until you confirm that exact report.\\\\n4. Open it again later with `reports.runtime.list` and `reports.runtime.run`.\\\\n\\\\nThese reports are worked out live each time and their rows are never stored.\\\\nThey are not refreshed in the background. A report that people open every day\\\\nis worth asking your team to set up as a refreshed report instead.\\\\n\\\\n### Keep a report fresh\\\\n\\\\n1. Ask your team how the report refreshes: by hand, on a schedule, after the\\\\n data changes, or when it goes out of date.\\\\n2. A scheduled report repeats on its **{field:SmrtReportSchedule.cron}**, either\\\\n rebuilding everything or updating only what changed, per its\\\\n **{field:SmrtReportSchedule.mode}**.\\\\n3. Turn **{field:SmrtReportSchedule.enabled}** off to pause a schedule without\\\\n losing it.\\\\n4. **{field:SmrtReportSchedule.nextRun}** shows when it is next due.\\\\n\\\\n### Check that a refresh worked\\\\n\\\\n1. Look at the latest run for the report. **{field:SmrtReportRun.status}**\\\\n says whether it is running, finished, failed or skipped.\\\\n2. **{field:SmrtReportRun.completedAt}** and **{field:SmrtReportRun.rowCount}**\\\\n show when it finished and how many rows it holds.\\\\n3. If it failed, **{field:SmrtReportRun.error}** says why.\\\\n\\\",\\\"fieldRefs\\\":[\\\"SmrtReportRun.completedAt\\\",\\\"SmrtReportRun.error\\\",\\\"SmrtReportRun.rowCount\\\",\\\"SmrtReportRun.status\\\",\\\"SmrtReportSchedule.cron\\\",\\\"SmrtReportSchedule.enabled\\\",\\\"SmrtReportSchedule.mode\\\",\\\"SmrtReportSchedule.nextRun\\\"]},\\\"runtime\\\":\\\"server\\\",\\\"demo\\\":{\\\"mode\\\":\\\"server\\\",\\\"reasons\\\":[\\\"The recipe declares runtime \\\\\\\"server\\\\\\\".\\\",\\\"Needs a server because its package does not build for a browser: node:crypto/events; @happyvertical/sql root: the sync query builders it needs (validateColumnName, buildWhere, buildAggregate, bucketExpr, tableExists) have no browser-safe SDK entry; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3625, #3627).\\\"]}}],\\\"smrtDependencies\\\":[\\\"@happyvertical/smrt-core\\\",\\\"@happyvertical/smrt-jobs\\\",\\\"@happyvertical/smrt-tenancy\\\"],\\\"browser\\\":{\\\"status\\\":\\\"server-only\\\",\\\"issues\\\":[\\\"#3615\\\",\\\"#3624\\\",\\\"#3625\\\",\\\"#3627\\\"],\\\"reason\\\":\\\"node:crypto/events; @happyvertical/sql root: the sync query builders it needs (validateColumnName, buildWhere, buildAggregate, bucketExpr, tableExists) have no browser-safe SDK entry\\\",\\\"via\\\":[\\\"@happyvertical/smrt-jobs\\\",\\\"@happyvertical/smrt-tenancy\\\"]},\\\"stampsConstructors\\\":true}\"));\n","import './__smrt-register__.js';\n\nimport {\n field,\n SmrtCollection,\n SmrtObject,\n smrt,\n} from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport type { DatabaseInterface } from '@happyvertical/sql';\nimport type { ReportRefreshMode, ReportRefreshTrigger } from './types.js';\n\nexport const REPORT_RUNS_TABLE = '_smrt_report_runs';\nexport const REPORT_WATERMARKS_TABLE = '_smrt_report_watermarks';\nexport const REPORT_LOCKS_TABLE = '_smrt_report_locks';\nexport const REPORT_SCHEDULES_TABLE = '_smrt_report_schedules';\nexport const REPORT_REFRESH_TASKS_TABLE = '_smrt_report_refresh_tasks';\n\nexport const REPORT_RUNTIME_TABLES = [\n REPORT_RUNS_TABLE,\n REPORT_WATERMARKS_TABLE,\n REPORT_LOCKS_TABLE,\n] as const;\n\nexport const REPORT_SCHEDULER_TABLES = [\n REPORT_SCHEDULES_TABLE,\n REPORT_REFRESH_TASKS_TABLE,\n] as const;\n\nexport type ReportRunStatus = 'running' | 'success' | 'failed' | 'skipped';\nexport type ReportScheduleStatus = 'active' | 'paused' | 'disabled' | 'error';\n\nexport function scopeKeyForTenant(tenantId: string | null | undefined): string {\n return tenantId ? `tenant:${tenantId}` : 'global';\n}\n\nexport async function assertReportTablesReady(\n db: DatabaseInterface,\n tables: readonly string[] = REPORT_RUNTIME_TABLES,\n): Promise<void> {\n for (const table of tables) {\n const ready = await db.tableExists(table);\n if (!ready) {\n throw new Error(\n `Report runtime table '${table}' does not exist. ` +\n 'Run smrt db:migrate before refreshing reports.',\n );\n }\n }\n}\n\nconst INTERNAL_SURFACE = {\n api: false,\n cli: {\n include: ['list', 'get'],\n skipApiCheck: true,\n http: false,\n },\n mcp: false,\n};\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableName: '_smrt_report_runs',\n ...INTERNAL_SURFACE,\n})\nexport class SmrtReportRun extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-reports\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @field({ type: 'text', required: true })\n scopeKey: string = 'global';\n\n @field({ type: 'text', required: true })\n reportClass: string = '';\n\n @field({ type: 'text', required: true })\n sourceClass: string = '';\n\n @field({ type: 'text', required: true })\n mode: ReportRefreshMode = 'rebuild';\n\n @field({ type: 'text', required: true })\n trigger: ReportRefreshTrigger = 'manual';\n\n @field({\n type: 'text',\n required: true,\n description:\n 'Whether the refresh is running, finished, failed or was skipped.',\n })\n status: ReportRunStatus = 'running';\n\n @field({\n type: 'datetime',\n required: true,\n description: 'When the refresh began.',\n })\n startedAt: Date = new Date();\n\n @field({\n type: 'datetime',\n nullable: true,\n description: 'When the refresh finished. Empty while it is still running.',\n })\n completedAt: Date | null = null;\n\n @field({\n type: 'integer',\n required: true,\n description: 'How many rows the report held after the refresh.',\n })\n rowCount: number = 0;\n\n @field({ type: 'integer', required: true })\n changedGroupCount: number = 0;\n\n @field({ type: 'text', nullable: true })\n watermarkBefore: string | null = null;\n\n @field({ type: 'text', nullable: true })\n watermarkAfter: string | null = null;\n\n @field({\n type: 'text',\n nullable: true,\n description: 'Why the refresh failed. Empty when it worked.',\n })\n error: string | null = null;\n\n @field({ type: 'json' })\n metadata: Record<string, unknown> = {};\n}\n\nexport class SmrtReportRunCollection extends SmrtCollection<SmrtReportRun> {\n static readonly _itemClass = SmrtReportRun;\n}\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableName: '_smrt_report_watermarks',\n conflictColumns: [\n 'report_class',\n 'scope_key',\n 'source_class',\n 'watermark_column',\n ],\n ...INTERNAL_SURFACE,\n})\nexport class SmrtReportWatermark extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-reports\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @field({ type: 'text', required: true })\n scopeKey: string = 'global';\n\n @field({ type: 'text', required: true })\n reportClass: string = '';\n\n @field({ type: 'text', required: true })\n sourceClass: string = '';\n\n @field({ type: 'text', required: true })\n watermarkColumn: string = '';\n\n @field({ type: 'text', nullable: true })\n watermarkValue: string | null = null;\n\n @field({ type: 'text', nullable: true })\n lastRunId: string | null = null;\n}\n\nexport class SmrtReportWatermarkCollection extends SmrtCollection<SmrtReportWatermark> {\n static readonly _itemClass = SmrtReportWatermark;\n}\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableName: '_smrt_report_locks',\n conflictColumns: ['report_class', 'scope_key'],\n ...INTERNAL_SURFACE,\n})\nexport class SmrtReportLock extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-reports\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @field({ type: 'text', required: true })\n scopeKey: string = 'global';\n\n @field({ type: 'text', required: true })\n reportClass: string = '';\n\n @field({ type: 'text', nullable: true })\n ownerId: string | null = null;\n\n @field({ type: 'datetime', nullable: true })\n acquiredAt: Date | null = null;\n\n @field({ type: 'datetime', nullable: true })\n heartbeatAt: Date | null = null;\n\n @field({ type: 'datetime', nullable: true })\n expiresAt: Date | null = null;\n}\n\nexport class SmrtReportLockCollection extends SmrtCollection<SmrtReportLock> {\n static readonly _itemClass = SmrtReportLock;\n}\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableName: '_smrt_report_schedules',\n conflictColumns: ['report_class', 'scope_key', 'cron', 'mode'],\n ...INTERNAL_SURFACE,\n})\nexport class SmrtReportSchedule extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-reports\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @field({ type: 'text', required: true })\n scopeKey: string = 'global';\n\n @field({ type: 'text', required: true })\n reportClass: string = '';\n\n @field({\n type: 'text',\n required: true,\n description:\n 'When the report refreshes, as a cron schedule such as 0 6 * * * for 6 am daily.',\n })\n cron: string = '';\n\n @field({ type: 'text', required: true })\n trigger: ReportRefreshTrigger = 'schedule';\n\n @field({\n type: 'text',\n required: true,\n description:\n 'Rebuild recomputes the whole report. Incremental updates only what changed.',\n })\n mode: ReportRefreshMode = 'incremental';\n\n @field({\n type: 'boolean',\n required: true,\n description: 'Turn off to stop refreshing without deleting the schedule.',\n })\n enabled: boolean = true;\n\n @field({\n type: 'text',\n required: true,\n description:\n 'Whether the schedule is active, paused, disabled or in error.',\n })\n status: ReportScheduleStatus = 'active';\n\n @field({\n type: 'datetime',\n nullable: true,\n description: 'When the report is next due to refresh.',\n })\n nextRun: Date | null = null;\n\n @field({\n type: 'datetime',\n nullable: true,\n description: 'When the report last started a scheduled refresh.',\n })\n lastRun: Date | null = null;\n\n @field({\n type: 'text',\n nullable: true,\n description: 'Whether the last scheduled refresh worked or failed.',\n })\n lastStatus: 'success' | 'failed' | null = null;\n\n @field({\n type: 'text',\n nullable: true,\n description: 'Why the last scheduled refresh failed. Empty when it worked.',\n })\n lastError: string | null = null;\n\n @field({ type: 'integer', required: true })\n runCount: number = 0;\n\n @field({ type: 'integer', required: true })\n successCount: number = 0;\n\n @field({ type: 'integer', required: true })\n failureCount: number = 0;\n\n @field({ type: 'integer', required: true })\n runningCount: number = 0;\n\n @field({ type: 'integer', required: true })\n maxConcurrent: number = 1;\n\n @field({ type: 'text', required: true })\n queue: string = 'reports';\n\n @field({ type: 'integer', required: true })\n priority: number = 70;\n\n @field({ type: 'integer', required: true })\n timeout: number = 3600000;\n}\n\nexport class SmrtReportScheduleCollection extends SmrtCollection<SmrtReportSchedule> {\n static readonly _itemClass = SmrtReportSchedule;\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"state.js","names":["tenantId"],"sources":["../src/__smrt-register__.ts","../src/state.ts"],"sourcesContent":["// Generated by @happyvertical/smrt-core smrtPlugin at library build time.\n// The package manifest is inlined so self-registration cannot miss when a\n// downstream bundler relocates this module away from dist/manifest.json\n// (https://github.com/happyvertical/smrt/issues/1506,\n// https://github.com/happyvertical/smrt/issues/1507).\nimport { ObjectRegistry } from '@happyvertical/smrt-core';\n\nObjectRegistry.registerPackageManifest(JSON.parse(\"{\\\"version\\\":\\\"1.0.0\\\",\\\"timestamp\\\":0,\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"packageVersion\\\":\\\"0.55.23\\\",\\\"objects\\\":{\\\"@happyvertical/smrt-reports:SmrtReport\\\":{\\\"name\\\":\\\"smrtreport\\\",\\\"className\\\":\\\"SmrtReport\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReport\\\",\\\"collection\\\":\\\"smrtreports\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/report.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{\\\"refreshedAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false}},\\\"methods\\\":{\\\"isStale\\\":{\\\"name\\\":\\\"isStale\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"ttlMs\\\",\\\"type\\\":\\\"number\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"boolean\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"refresh\\\":{\\\"name\\\":\\\"refresh\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"options\\\",\\\"type\\\":\\\"Omit<ReportRefreshOptions, 'db'>\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<ReportRefreshResult>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"SmrtReport\\\",\\\"collectionExportName\\\":\\\"SmrtReportCollection\\\",\\\"importPath\\\":\\\"@happyvertical/smrt-reports\\\"},\\\"@happyvertical/smrt-reports:SmrtReportCollection\\\":{\\\"name\\\":\\\"smrtreportcollection\\\",\\\"className\\\":\\\"SmrtReportCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportCollection\\\",\\\"collection\\\":\\\"smrtreports\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/report.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"refresh\\\":{\\\"name\\\":\\\"refresh\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"options\\\",\\\"type\\\":\\\"Omit<ReportRefreshOptions, 'db'>\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<ReportRefreshResult>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"list\\\":{\\\"name\\\":\\\"list\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"options\\\",\\\"type\\\":\\\"SmrtListOptions<ModelType>\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<SmrtObject[] | Record<string, unknown>[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"get\\\":{\\\"name\\\":\\\"get\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"filter\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":false,\\\"typeUnresolved\\\":true},{\\\"name\\\":\\\"options\\\",\\\"type\\\":\\\"any\\\",\\\"optional\\\":true,\\\"typeUnresolved\\\":true}],\\\"returnType\\\":\\\"Promise<ModelType | null>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"ModelType\\\",\\\"exportName\\\":\\\"SmrtReportCollection\\\",\\\"collectionExportName\\\":\\\"SmrtReportCollectionCollection\\\",\\\"importPath\\\":\\\"@happyvertical/smrt-reports\\\"},\\\"@happyvertical/smrt-reports:RuntimeReport\\\":{\\\"name\\\":\\\"runtimereport\\\",\\\"className\\\":\\\"RuntimeReport\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:RuntimeReport\\\",\\\"collection\\\":\\\"runtimereports\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/runtime-report.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":true,\\\"autoPopulate\\\":true,\\\"nullable\\\":false,\\\"mode\\\":\\\"required\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"title\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{}},\\\"description\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{}},\\\"sourceId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{}},\\\"spec\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"specHash\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{}},\\\"status\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"active\\\",\\\"archived\\\"]},\\\"createdByUserId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{}}},\\\"methods\\\":{\\\"getSpec\\\":{\\\"name\\\":\\\"getSpec\\\",\\\"async\\\":false,\\\"parameters\\\":[],\\\"returnType\\\":\\\"RuntimeReportSpec\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true},\\\"setSpec\\\":{\\\"name\\\":\\\"setSpec\\\",\\\"async\\\":false,\\\"parameters\\\":[{\\\"name\\\":\\\"spec\\\",\\\"type\\\":\\\"RuntimeReportSpec\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"void\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"runtime_reports\\\",\\\"api\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\",\\\"create\\\"]},\\\"mcp\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\"]},\\\"cli\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\"]},\\\"tenantScoped\\\":{\\\"mode\\\":\\\"required\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"RuntimeReport\\\",\\\"collectionExportName\\\":\\\"RuntimeReportCollection\\\",\\\"displayLabelField\\\":\\\"title\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"spec\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"status\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"runtime_reports\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"runtime_reports\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"title\\\\\\\" TEXT,\\\\n \\\\\\\"description\\\\\\\" TEXT,\\\\n \\\\\\\"source_id\\\\\\\" TEXT,\\\\n \\\\\\\"spec\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"spec_hash\\\\\\\" TEXT,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"created_by_user_id\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"title\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"source_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"spec\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"spec_hash\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"created_by_user_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"runtime_reports_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"runtime_reports_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"04a92513\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports\\\"},\\\"@happyvertical/smrt-reports:RuntimeReportCollection\\\":{\\\"name\\\":\\\"runtimereportcollection\\\",\\\"className\\\":\\\"RuntimeReportCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:RuntimeReportCollection\\\",\\\"collection\\\":\\\"runtimereports\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/runtime-report.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"runtime_reports\\\"},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"RuntimeReport\\\",\\\"exportName\\\":\\\"RuntimeReportCollection\\\",\\\"collectionExportName\\\":\\\"RuntimeReportCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"runtime_reports\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"runtime_reports\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"title\\\\\\\" TEXT,\\\\n \\\\\\\"description\\\\\\\" TEXT,\\\\n \\\\\\\"source_id\\\\\\\" TEXT,\\\\n \\\\\\\"spec\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"spec_hash\\\\\\\" TEXT,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"created_by_user_id\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"title\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"description\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"source_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"spec\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"spec_hash\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"created_by_user_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"runtime_reports_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"runtime_reports_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"04a92513\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports\\\"},\\\"@happyvertical/smrt-reports:SmrtReportRefreshTask\\\":{\\\"name\\\":\\\"smrtreportrefreshtask\\\",\\\"className\\\":\\\"SmrtReportRefreshTask\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportRefreshTask\\\",\\\"collection\\\":\\\"smrtreportrefreshtasks\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/scheduler.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"reportClass\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"mode\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"rebuild\\\",\\\"incremental\\\"]},\\\"trigger\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"manual\\\",\\\"schedule\\\",\\\"change\\\",\\\"ttl\\\",\\\"job\\\"]},\\\"args\\\":{\\\"type\\\":\\\"json\\\",\\\"required\\\":false,\\\"_meta\\\":{}}},\\\"methods\\\":{\\\"run\\\":{\\\"name\\\":\\\"run\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"args\\\",\\\"type\\\":\\\"ReportRefreshJobArgs\\\",\\\"optional\\\":true},{\\\"name\\\":\\\"context\\\",\\\"type\\\":\\\"JobExecutionContext\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<unknown>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_refresh_tasks\\\",\\\"api\\\":false,\\\"cli\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\"],\\\"skipApiCheck\\\":true,\\\"http\\\":false},\\\"mcp\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"SmrtReportRefreshTask\\\",\\\"collectionExportName\\\":\\\"SmrtReportRefreshTaskCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"reportClass\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"mode\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"trigger\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_refresh_tasks\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_refresh_tasks\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"mode\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"trigger\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"args\\\\\\\" JSON\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"mode\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"trigger\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"args\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_refresh_tasks_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"_smrt_report_refresh_tasks_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"c9142042\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/scheduler\\\"},\\\"@happyvertical/smrt-reports:SmrtPrincipalReportRefreshTask\\\":{\\\"name\\\":\\\"smrtprincipalreportrefreshtask\\\",\\\"className\\\":\\\"SmrtPrincipalReportRefreshTask\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtPrincipalReportRefreshTask\\\",\\\"collection\\\":\\\"smrtprincipalreportrefreshtasks\\\",\\\"description\\\":\\\"Worker target whose authority requirement cannot be downgraded by job args.\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/scheduler.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"generated\\\":true,\\\"source\\\":\\\"tenantScoped_decorator\\\",\\\"sqlType\\\":\\\"UUID\\\",\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"autoFilter\\\":true,\\\"autoPopulate\\\":true,\\\"allowSuperAdminBypass\\\":false}}}},\\\"methods\\\":{\\\"run\\\":{\\\"name\\\":\\\"run\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"args\\\",\\\"type\\\":\\\"ReportRefreshJobArgs\\\",\\\"optional\\\":true},{\\\"name\\\":\\\"context\\\",\\\"type\\\":\\\"JobExecutionContext\\\",\\\"optional\\\":true}],\\\"returnType\\\":\\\"Promise<unknown>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_principal_report_refresh_tasks\\\",\\\"api\\\":false,\\\"cli\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\"],\\\"skipApiCheck\\\":true,\\\"http\\\":false},\\\"mcp\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtReportRefreshTask\\\",\\\"exportName\\\":\\\"SmrtPrincipalReportRefreshTask\\\",\\\"collectionExportName\\\":\\\"SmrtPrincipalReportRefreshTaskCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_principal_report_refresh_tasks\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_principal_report_refresh_tasks\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_principal_report_refresh_tasks_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"_smrt_principal_report_refresh_tasks_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"226a3b97\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/scheduler\\\"},\\\"@happyvertical/smrt-reports:SmrtReportRun\\\":{\\\"name\\\":\\\"smrtreportrun\\\",\\\"className\\\":\\\"SmrtReportRun\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportRun\\\",\\\"collection\\\":\\\"smrtreportruns\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/state.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"scopeKey\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"reportClass\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"sourceClass\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"mode\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"rebuild\\\",\\\"incremental\\\"]},\\\"trigger\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"manual\\\",\\\"schedule\\\",\\\"change\\\",\\\"ttl\\\",\\\"job\\\"]},\\\"status\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"description\\\":\\\"Whether the refresh is running, finished, failed or was skipped.\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"description\\\":\\\"Whether the refresh is running, finished, failed or was skipped.\\\"},\\\"enum\\\":[\\\"running\\\",\\\"success\\\",\\\"failed\\\",\\\"skipped\\\"]},\\\"startedAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":true,\\\"description\\\":\\\"When the refresh began.\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"description\\\":\\\"When the refresh began.\\\"}},\\\"completedAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"description\\\":\\\"When the refresh finished. Empty while it is still running.\\\",\\\"_meta\\\":{\\\"nullable\\\":true,\\\"description\\\":\\\"When the refresh finished. Empty while it is still running.\\\"}},\\\"rowCount\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"description\\\":\\\"How many rows the report held after the refresh.\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"description\\\":\\\"How many rows the report held after the refresh.\\\"}},\\\"changedGroupCount\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"watermarkBefore\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}},\\\"watermarkAfter\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}},\\\"error\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"description\\\":\\\"Why the refresh failed. Empty when it worked.\\\",\\\"_meta\\\":{\\\"nullable\\\":true,\\\"description\\\":\\\"Why the refresh failed. Empty when it worked.\\\"}},\\\"metadata\\\":{\\\"type\\\":\\\"json\\\",\\\"required\\\":false,\\\"_meta\\\":{}}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_runs\\\",\\\"api\\\":false,\\\"cli\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\"],\\\"skipApiCheck\\\":true,\\\"http\\\":false},\\\"mcp\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"SmrtReportRun\\\",\\\"collectionExportName\\\":\\\"SmrtReportRunCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"scopeKey\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"reportClass\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"sourceClass\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"mode\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"trigger\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"status\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"startedAt\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"datetime\\\"},{\\\"field\\\":\\\"rowCount\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"},{\\\"field\\\":\\\"changedGroupCount\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_runs\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_runs\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"scope_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"source_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"mode\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"trigger\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"started_at\\\\\\\" TIMESTAMP NOT NULL,\\\\n \\\\\\\"completed_at\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"row_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"changed_group_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"watermark_before\\\\\\\" TEXT,\\\\n \\\\\\\"watermark_after\\\\\\\" TEXT,\\\\n \\\\\\\"error\\\\\\\" TEXT,\\\\n \\\\\\\"metadata\\\\\\\" JSON\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"scope_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"source_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"mode\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"trigger\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"started_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"completed_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"row_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"changed_group_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"watermark_before\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"watermark_after\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"error\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_runs_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"_smrt_report_runs_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"54ff5048\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/state\\\"},\\\"@happyvertical/smrt-reports:SmrtReportRunCollection\\\":{\\\"name\\\":\\\"smrtreportruncollection\\\",\\\"className\\\":\\\"SmrtReportRunCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportRunCollection\\\",\\\"collection\\\":\\\"smrtreportruns\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/state.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_runs\\\",\\\"api\\\":false,\\\"mcp\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"SmrtReportRun\\\",\\\"exportName\\\":\\\"SmrtReportRunCollection\\\",\\\"collectionExportName\\\":\\\"SmrtReportRunCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_runs\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_runs\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"scope_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"source_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"mode\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"trigger\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"started_at\\\\\\\" TIMESTAMP NOT NULL,\\\\n \\\\\\\"completed_at\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"row_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"changed_group_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"watermark_before\\\\\\\" TEXT,\\\\n \\\\\\\"watermark_after\\\\\\\" TEXT,\\\\n \\\\\\\"error\\\\\\\" TEXT,\\\\n \\\\\\\"metadata\\\\\\\" JSON\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"scope_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"source_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"mode\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"trigger\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"started_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"completed_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"row_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"changed_group_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"watermark_before\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"watermark_after\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"error\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"metadata\\\":{\\\"type\\\":\\\"JSON\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_runs_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true,\\\"nullsNotDistinct\\\":true},{\\\"name\\\":\\\"_smrt_report_runs_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"54ff5048\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/state\\\"},\\\"@happyvertical/smrt-reports:SmrtReportWatermark\\\":{\\\"name\\\":\\\"smrtreportwatermark\\\",\\\"className\\\":\\\"SmrtReportWatermark\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportWatermark\\\",\\\"collection\\\":\\\"smrtreportwatermarks\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/state.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"scopeKey\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"reportClass\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"sourceClass\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"watermarkColumn\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"watermarkValue\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}},\\\"lastRunId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_watermarks\\\",\\\"conflictColumns\\\":[\\\"report_class\\\",\\\"scope_key\\\",\\\"source_class\\\",\\\"watermark_column\\\"],\\\"api\\\":false,\\\"cli\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\"],\\\"skipApiCheck\\\":true,\\\"http\\\":false},\\\"mcp\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"}},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"SmrtReportWatermark\\\",\\\"collectionExportName\\\":\\\"SmrtReportWatermarkCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"scopeKey\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"reportClass\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"sourceClass\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"watermarkColumn\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_watermarks\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_watermarks\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"scope_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"source_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"watermark_column\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"watermark_value\\\\\\\" TEXT,\\\\n \\\\\\\"last_run_id\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"scope_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"source_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"watermark_column\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"watermark_value\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"last_run_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_watermarks_report_class_scope_key_idx\\\",\\\"columns\\\":[\\\"report_class\\\",\\\"scope_key\\\",\\\"source_class\\\",\\\"watermark_column\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"_smrt_report_watermarks_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"_smrt_report_watermarks_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"dac9d57a\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/state\\\"},\\\"@happyvertical/smrt-reports:SmrtReportWatermarkCollection\\\":{\\\"name\\\":\\\"smrtreportwatermarkcollection\\\",\\\"className\\\":\\\"SmrtReportWatermarkCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportWatermarkCollection\\\",\\\"collection\\\":\\\"smrtreportwatermarks\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/state.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_watermarks\\\",\\\"api\\\":false,\\\"mcp\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"SmrtReportWatermark\\\",\\\"exportName\\\":\\\"SmrtReportWatermarkCollection\\\",\\\"collectionExportName\\\":\\\"SmrtReportWatermarkCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_watermarks\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_watermarks\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"scope_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"source_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"watermark_column\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"watermark_value\\\\\\\" TEXT,\\\\n \\\\\\\"last_run_id\\\\\\\" TEXT\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"scope_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"source_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"watermark_column\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"watermark_value\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"last_run_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_watermarks_report_class_scope_key_idx\\\",\\\"columns\\\":[\\\"report_class\\\",\\\"scope_key\\\",\\\"source_class\\\",\\\"watermark_column\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"_smrt_report_watermarks_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"_smrt_report_watermarks_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"dac9d57a\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/state\\\"},\\\"@happyvertical/smrt-reports:SmrtReportLock\\\":{\\\"name\\\":\\\"smrtreportlock\\\",\\\"className\\\":\\\"SmrtReportLock\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportLock\\\",\\\"collection\\\":\\\"smrtreportlocks\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/state.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"scopeKey\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"reportClass\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"ownerId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}},\\\"acquiredAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}},\\\"heartbeatAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}},\\\"expiresAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_locks\\\",\\\"conflictColumns\\\":[\\\"report_class\\\",\\\"scope_key\\\"],\\\"api\\\":false,\\\"cli\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\"],\\\"skipApiCheck\\\":true,\\\"http\\\":false},\\\"mcp\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"}},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"SmrtReportLock\\\",\\\"collectionExportName\\\":\\\"SmrtReportLockCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"scopeKey\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"reportClass\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_locks\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_locks\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"scope_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"owner_id\\\\\\\" TEXT,\\\\n \\\\\\\"acquired_at\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"heartbeat_at\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"expires_at\\\\\\\" 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\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"scope_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"owner_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"acquired_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"heartbeat_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"expires_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_locks_report_class_scope_key_idx\\\",\\\"columns\\\":[\\\"report_class\\\",\\\"scope_key\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"_smrt_report_locks_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"_smrt_report_locks_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"4a2043f9\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/state\\\"},\\\"@happyvertical/smrt-reports:SmrtReportLockCollection\\\":{\\\"name\\\":\\\"smrtreportlockcollection\\\",\\\"className\\\":\\\"SmrtReportLockCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportLockCollection\\\",\\\"collection\\\":\\\"smrtreportlocks\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/state.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_locks\\\",\\\"api\\\":false,\\\"mcp\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"SmrtReportLock\\\",\\\"exportName\\\":\\\"SmrtReportLockCollection\\\",\\\"collectionExportName\\\":\\\"SmrtReportLockCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_locks\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_locks\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"scope_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"owner_id\\\\\\\" TEXT,\\\\n \\\\\\\"acquired_at\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"heartbeat_at\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"expires_at\\\\\\\" 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\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"scope_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"owner_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"acquired_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"heartbeat_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"expires_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_locks_report_class_scope_key_idx\\\",\\\"columns\\\":[\\\"report_class\\\",\\\"scope_key\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"_smrt_report_locks_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"_smrt_report_locks_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"4a2043f9\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/state\\\"},\\\"@happyvertical/smrt-reports:SmrtReportSchedule\\\":{\\\"name\\\":\\\"smrtreportschedule\\\",\\\"className\\\":\\\"SmrtReportSchedule\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportSchedule\\\",\\\"collection\\\":\\\"smrtreportschedules\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/state.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"nullable\\\":true,\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":false,\\\"autoPopulate\\\":true,\\\"nullable\\\":true,\\\"mode\\\":\\\"optional\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"scopeKey\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"reportClass\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"cron\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"description\\\":\\\"When the report refreshes, as a cron schedule such as 0 6 * * * for 6 am daily.\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"description\\\":\\\"When the report refreshes, as a cron schedule such as 0 6 * * * for 6 am daily.\\\"}},\\\"trigger\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"manual\\\",\\\"schedule\\\",\\\"change\\\",\\\"ttl\\\",\\\"job\\\"]},\\\"mode\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"description\\\":\\\"Rebuild recomputes the whole report. Incremental updates only what changed.\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"description\\\":\\\"Rebuild recomputes the whole report. Incremental updates only what changed.\\\"},\\\"enum\\\":[\\\"rebuild\\\",\\\"incremental\\\"]},\\\"enabled\\\":{\\\"type\\\":\\\"boolean\\\",\\\"required\\\":true,\\\"description\\\":\\\"Turn off to stop refreshing without deleting the schedule.\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"description\\\":\\\"Turn off to stop refreshing without deleting the schedule.\\\"}},\\\"status\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"description\\\":\\\"Whether the schedule is active, paused, disabled or in error.\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"description\\\":\\\"Whether the schedule is active, paused, disabled or in error.\\\"},\\\"enum\\\":[\\\"active\\\",\\\"paused\\\",\\\"disabled\\\",\\\"error\\\"]},\\\"nextRun\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"description\\\":\\\"When the report is next due to refresh.\\\",\\\"_meta\\\":{\\\"nullable\\\":true,\\\"description\\\":\\\"When the report is next due to refresh.\\\"}},\\\"lastRun\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"description\\\":\\\"When the report last started a scheduled refresh.\\\",\\\"_meta\\\":{\\\"nullable\\\":true,\\\"description\\\":\\\"When the report last started a scheduled refresh.\\\"}},\\\"lastStatus\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"description\\\":\\\"Whether the last scheduled refresh worked or failed.\\\",\\\"_meta\\\":{\\\"nullable\\\":true,\\\"description\\\":\\\"Whether the last scheduled refresh worked or failed.\\\"},\\\"enum\\\":[\\\"success\\\",\\\"failed\\\"]},\\\"lastError\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"description\\\":\\\"Why the last scheduled refresh failed. Empty when it worked.\\\",\\\"_meta\\\":{\\\"nullable\\\":true,\\\"description\\\":\\\"Why the last scheduled refresh failed. Empty when it worked.\\\"}},\\\"runCount\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"successCount\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"failureCount\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"runningCount\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"maxConcurrent\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"queue\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"priority\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"timeout\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_schedules\\\",\\\"conflictColumns\\\":[\\\"report_class\\\",\\\"scope_key\\\",\\\"cron\\\",\\\"mode\\\"],\\\"api\\\":false,\\\"cli\\\":{\\\"include\\\":[\\\"list\\\",\\\"get\\\"],\\\"skipApiCheck\\\":true,\\\"http\\\":false},\\\"mcp\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"optional\\\"}},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"SmrtReportSchedule\\\",\\\"collectionExportName\\\":\\\"SmrtReportScheduleCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"scopeKey\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"reportClass\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"cron\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"trigger\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"mode\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"enabled\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"boolean\\\"},{\\\"field\\\":\\\"status\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"runCount\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"},{\\\"field\\\":\\\"successCount\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"},{\\\"field\\\":\\\"failureCount\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"},{\\\"field\\\":\\\"runningCount\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"},{\\\"field\\\":\\\"maxConcurrent\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"},{\\\"field\\\":\\\"queue\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"priority\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"},{\\\"field\\\":\\\"timeout\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_schedules\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_schedules\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"scope_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"cron\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"trigger\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"mode\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"enabled\\\\\\\" BOOLEAN NOT NULL,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"next_run\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"last_run\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"last_status\\\\\\\" TEXT,\\\\n \\\\\\\"last_error\\\\\\\" TEXT,\\\\n \\\\\\\"run_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"success_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"failure_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"running_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"max_concurrent\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"queue\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"priority\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"timeout\\\\\\\" INTEGER NOT NULL\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"scope_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"cron\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"trigger\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"mode\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"enabled\\\":{\\\"type\\\":\\\"BOOLEAN\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"next_run\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"last_run\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"last_status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"last_error\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"run_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"success_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"failure_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"running_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"max_concurrent\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"queue\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"priority\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"timeout\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_schedules_report_class_scope_key_idx\\\",\\\"columns\\\":[\\\"report_class\\\",\\\"scope_key\\\",\\\"cron\\\",\\\"mode\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"_smrt_report_schedules_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"_smrt_report_schedules_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"4b9f0e69\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/state\\\"},\\\"@happyvertical/smrt-reports:SmrtReportScheduleCollection\\\":{\\\"name\\\":\\\"smrtreportschedulecollection\\\",\\\"className\\\":\\\"SmrtReportScheduleCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-reports:SmrtReportScheduleCollection\\\",\\\"collection\\\":\\\"smrtreportschedules\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/reports/src/state.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-reports\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"_smrt_report_schedules\\\",\\\"api\\\":false,\\\"mcp\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"SmrtReportSchedule\\\",\\\"exportName\\\":\\\"SmrtReportScheduleCollection\\\",\\\"collectionExportName\\\":\\\"SmrtReportScheduleCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"_smrt_report_schedules\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"_smrt_report_schedules\\\\\\\" (\\\\n \\\\\\\"id\\\\\\\" UUID PRIMARY KEY NOT NULL,\\\\n \\\\\\\"slug\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"context\\\\\\\" TEXT NOT NULL DEFAULT '',\\\\n \\\\\\\"created_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"updated_at\\\\\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID,\\\\n \\\\\\\"scope_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"report_class\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"cron\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"trigger\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"mode\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"enabled\\\\\\\" BOOLEAN NOT NULL,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"next_run\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"last_run\\\\\\\" TIMESTAMP,\\\\n \\\\\\\"last_status\\\\\\\" TEXT,\\\\n \\\\\\\"last_error\\\\\\\" TEXT,\\\\n \\\\\\\"run_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"success_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"failure_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"running_count\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"max_concurrent\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"queue\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"priority\\\\\\\" INTEGER NOT NULL,\\\\n \\\\\\\"timeout\\\\\\\" INTEGER NOT NULL\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"scope_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"report_class\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"cron\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"trigger\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"mode\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"enabled\\\":{\\\"type\\\":\\\"BOOLEAN\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"next_run\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"last_run\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"last_status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"last_error\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"run_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"success_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"failure_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"running_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"max_concurrent\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"queue\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"priority\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"timeout\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"_smrt_report_schedules_report_class_scope_key_idx\\\",\\\"columns\\\":[\\\"report_class\\\",\\\"scope_key\\\",\\\"cron\\\",\\\"mode\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"_smrt_report_schedules_slug_context_idx\\\",\\\"columns\\\":[\\\"slug\\\",\\\"context\\\"]},{\\\"name\\\":\\\"_smrt_report_schedules_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"4b9f0e69\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-reports/state\\\"}},\\\"moduleType\\\":\\\"smrt\\\",\\\"recipes\\\":[{\\\"id\\\":\\\"reports.materialized\\\",\\\"className\\\":\\\"MaterializedReportsRecipe\\\",\\\"label\\\":\\\"Reports\\\",\\\"summary\\\":\\\"Keep totals and trends ready to read, refreshed on a schedule and open to the assistant.\\\",\\\"synonyms\\\":[\\\"reports\\\",\\\"totals\\\",\\\"summaries\\\",\\\"rollups\\\",\\\"kpis\\\",\\\"trends\\\",\\\"dashboards\\\"],\\\"models\\\":[\\\"@happyvertical/smrt-reports:SmrtReportRun\\\",\\\"@happyvertical/smrt-reports:SmrtReportWatermark\\\",\\\"@happyvertical/smrt-reports:SmrtReportLock\\\",\\\"@happyvertical/smrt-reports:SmrtReportSchedule\\\",\\\"@happyvertical/smrt-reports:SmrtReportRefreshTask\\\",\\\"@happyvertical/smrt-reports:SmrtPrincipalReportRefreshTask\\\"],\\\"nav\\\":[],\\\"requires\\\":[],\\\"help\\\":{\\\"markdown\\\":\\\"## Overview\\\\n\\\\nReports keep totals and trends, such as revenue by month or signups by week,\\\\nworked out ahead of time so they open instantly. Someone on your team sets up\\\\neach report once. This feature then records when each report was last\\\\nrefreshed, how that went, and when it runs next.\\\\n\\\\nReports are calculated on your server, never in the browser, so this feature\\\\nneeds your app's database.\\\\n\\\\n## Tasks\\\\n\\\\n### Ask the assistant about a report\\\\n\\\\n1. Ask in plain words, for example \\\\\\\"what was revenue last month?\\\\\\\".\\\\n2. The assistant looks up the reports your account may see\\\\n (`data.discover`, `data.inspect`), then reads rows with `reports.query`.\\\\n It only ever sees the columns and the customer data you are allowed to see.\\\\n3. If the numbers look old, ask how fresh the report is. The answer says when\\\\n it was last refreshed.\\\\n4. Ask the assistant to refresh a stale report. It previews the refresh with\\\\n `reports.refresh` and your app decides who may apply it.\\\\n\\\\nThe assistant offers these tools only when your app has switched them on.\\\\n\\\\n### Ask a question no report covers\\\\n\\\\n1. Describe what you want to see, for example \\\\\\\"orders by status this quarter\\\\\\\".\\\\n2. The assistant checks what it may report on (`reports.runtime.sources`) and\\\\n shows a preview of the report it would save (`reports.runtime.define`).\\\\n3. Nothing is saved until you confirm that exact report.\\\\n4. Open it again later with `reports.runtime.list` and `reports.runtime.run`.\\\\n\\\\nThese reports are worked out live each time and their rows are never stored.\\\\nThey are not refreshed in the background. A report that people open every day\\\\nis worth asking your team to set up as a refreshed report instead.\\\\n\\\\n### Keep a report fresh\\\\n\\\\n1. Ask your team how the report refreshes: by hand, on a schedule, after the\\\\n data changes, or when it goes out of date.\\\\n2. A scheduled report repeats on its **{field:SmrtReportSchedule.cron}**, either\\\\n rebuilding everything or updating only what changed, per its\\\\n **{field:SmrtReportSchedule.mode}**.\\\\n3. Turn **{field:SmrtReportSchedule.enabled}** off to pause a schedule without\\\\n losing it.\\\\n4. **{field:SmrtReportSchedule.nextRun}** shows when it is next due.\\\\n\\\\n### Check that a refresh worked\\\\n\\\\n1. Look at the latest run for the report. **{field:SmrtReportRun.status}**\\\\n says whether it is running, finished, failed or skipped.\\\\n2. **{field:SmrtReportRun.completedAt}** and **{field:SmrtReportRun.rowCount}**\\\\n show when it finished and how many rows it holds.\\\\n3. If it failed, **{field:SmrtReportRun.error}** says why.\\\\n\\\",\\\"fieldRefs\\\":[\\\"SmrtReportRun.completedAt\\\",\\\"SmrtReportRun.error\\\",\\\"SmrtReportRun.rowCount\\\",\\\"SmrtReportRun.status\\\",\\\"SmrtReportSchedule.cron\\\",\\\"SmrtReportSchedule.enabled\\\",\\\"SmrtReportSchedule.mode\\\",\\\"SmrtReportSchedule.nextRun\\\"]},\\\"runtime\\\":\\\"server\\\",\\\"demo\\\":{\\\"mode\\\":\\\"server\\\",\\\"reasons\\\":[\\\"The recipe declares runtime \\\\\\\"server\\\\\\\".\\\",\\\"Needs a server because its package does not build for a browser: node:crypto/events; @happyvertical/sql root: the sync query builders it needs (validateColumnName, buildWhere, buildAggregate, bucketExpr, tableExists) have no browser-safe SDK entry; and its package depends on @happyvertical/smrt-jobs, @happyvertical/smrt-tenancy, which do not build for a browser (#3615, #3624, #3625, #3627).\\\"]}}],\\\"smrtDependencies\\\":[\\\"@happyvertical/smrt-core\\\",\\\"@happyvertical/smrt-jobs\\\",\\\"@happyvertical/smrt-tenancy\\\"],\\\"browser\\\":{\\\"status\\\":\\\"server-only\\\",\\\"issues\\\":[\\\"#3615\\\",\\\"#3624\\\",\\\"#3625\\\",\\\"#3627\\\"],\\\"reason\\\":\\\"node:crypto/events; @happyvertical/sql root: the sync query builders it needs (validateColumnName, buildWhere, buildAggregate, bucketExpr, tableExists) have no browser-safe SDK entry\\\",\\\"via\\\":[\\\"@happyvertical/smrt-jobs\\\",\\\"@happyvertical/smrt-tenancy\\\"]},\\\"stampsConstructors\\\":true}\"));\n","import './__smrt-register__.js';\n\nimport {\n field,\n SmrtCollection,\n SmrtObject,\n smrt,\n} from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport type { DatabaseInterface } from '@happyvertical/sql';\nimport type { ReportRefreshMode, ReportRefreshTrigger } from './types.js';\n\nexport const REPORT_RUNS_TABLE = '_smrt_report_runs';\nexport const REPORT_WATERMARKS_TABLE = '_smrt_report_watermarks';\nexport const REPORT_LOCKS_TABLE = '_smrt_report_locks';\nexport const REPORT_SCHEDULES_TABLE = '_smrt_report_schedules';\nexport const REPORT_REFRESH_TASKS_TABLE = '_smrt_report_refresh_tasks';\n\nexport const REPORT_RUNTIME_TABLES = [\n REPORT_RUNS_TABLE,\n REPORT_WATERMARKS_TABLE,\n REPORT_LOCKS_TABLE,\n] as const;\n\nexport const REPORT_SCHEDULER_TABLES = [\n REPORT_SCHEDULES_TABLE,\n REPORT_REFRESH_TASKS_TABLE,\n] as const;\n\nexport type ReportRunStatus = 'running' | 'success' | 'failed' | 'skipped';\nexport type ReportScheduleStatus = 'active' | 'paused' | 'disabled' | 'error';\n\nexport function scopeKeyForTenant(tenantId: string | null | undefined): string {\n return tenantId ? `tenant:${tenantId}` : 'global';\n}\n\nexport async function assertReportTablesReady(\n db: DatabaseInterface,\n tables: readonly string[] = REPORT_RUNTIME_TABLES,\n): Promise<void> {\n for (const table of tables) {\n const ready = await db.tableExists(table);\n if (!ready) {\n throw new Error(\n `Report runtime table '${table}' does not exist. ` +\n 'Run smrt db:migrate before refreshing reports.',\n );\n }\n }\n}\n\nconst INTERNAL_SURFACE = {\n api: false,\n cli: {\n include: ['list', 'get'],\n skipApiCheck: true,\n http: false,\n },\n mcp: false,\n};\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableName: '_smrt_report_runs',\n ...INTERNAL_SURFACE,\n})\nexport class SmrtReportRun extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-reports\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @field({ type: 'text', required: true })\n scopeKey: string = 'global';\n\n @field({ type: 'text', required: true })\n reportClass: string = '';\n\n @field({ type: 'text', required: true })\n sourceClass: string = '';\n\n @field({ type: 'text', required: true })\n mode: ReportRefreshMode = 'rebuild';\n\n @field({ type: 'text', required: true })\n trigger: ReportRefreshTrigger = 'manual';\n\n @field({\n type: 'text',\n required: true,\n description:\n 'Whether the refresh is running, finished, failed or was skipped.',\n })\n status: ReportRunStatus = 'running';\n\n @field({\n type: 'datetime',\n required: true,\n description: 'When the refresh began.',\n })\n startedAt: Date = new Date();\n\n @field({\n type: 'datetime',\n nullable: true,\n description: 'When the refresh finished. Empty while it is still running.',\n })\n completedAt: Date | null = null;\n\n @field({\n type: 'integer',\n required: true,\n description: 'How many rows the report held after the refresh.',\n })\n rowCount: number = 0;\n\n @field({ type: 'integer', required: true })\n changedGroupCount: number = 0;\n\n @field({ type: 'text', nullable: true })\n watermarkBefore: string | null = null;\n\n @field({ type: 'text', nullable: true })\n watermarkAfter: string | null = null;\n\n @field({\n type: 'text',\n nullable: true,\n description: 'Why the refresh failed. Empty when it worked.',\n })\n error: string | null = null;\n\n @field({ type: 'json' })\n metadata: Record<string, unknown> = {};\n}\n\nexport class SmrtReportRunCollection extends SmrtCollection<SmrtReportRun> {\n static readonly _itemClass = SmrtReportRun;\n}\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableName: '_smrt_report_watermarks',\n conflictColumns: [\n 'report_class',\n 'scope_key',\n 'source_class',\n 'watermark_column',\n ],\n ...INTERNAL_SURFACE,\n})\nexport class SmrtReportWatermark extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-reports\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @field({ type: 'text', required: true })\n scopeKey: string = 'global';\n\n @field({ type: 'text', required: true })\n reportClass: string = '';\n\n @field({ type: 'text', required: true })\n sourceClass: string = '';\n\n @field({ type: 'text', required: true })\n watermarkColumn: string = '';\n\n @field({ type: 'text', nullable: true })\n watermarkValue: string | null = null;\n\n @field({ type: 'text', nullable: true })\n lastRunId: string | null = null;\n}\n\nexport class SmrtReportWatermarkCollection extends SmrtCollection<SmrtReportWatermark> {\n static readonly _itemClass = SmrtReportWatermark;\n}\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableName: '_smrt_report_locks',\n conflictColumns: ['report_class', 'scope_key'],\n ...INTERNAL_SURFACE,\n})\nexport class SmrtReportLock extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-reports\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @field({ type: 'text', required: true })\n scopeKey: string = 'global';\n\n @field({ type: 'text', required: true })\n reportClass: string = '';\n\n @field({ type: 'text', nullable: true })\n ownerId: string | null = null;\n\n @field({ type: 'datetime', nullable: true })\n acquiredAt: Date | null = null;\n\n @field({ type: 'datetime', nullable: true })\n heartbeatAt: Date | null = null;\n\n @field({ type: 'datetime', nullable: true })\n expiresAt: Date | null = null;\n}\n\nexport class SmrtReportLockCollection extends SmrtCollection<SmrtReportLock> {\n static readonly _itemClass = SmrtReportLock;\n}\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableName: '_smrt_report_schedules',\n conflictColumns: ['report_class', 'scope_key', 'cron', 'mode'],\n ...INTERNAL_SURFACE,\n})\nexport class SmrtReportSchedule extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-reports\";\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n @field({ type: 'text', required: true })\n scopeKey: string = 'global';\n\n @field({ type: 'text', required: true })\n reportClass: string = '';\n\n @field({\n type: 'text',\n required: true,\n description:\n 'When the report refreshes, as a cron schedule such as 0 6 * * * for 6 am daily.',\n })\n cron: string = '';\n\n @field({ type: 'text', required: true })\n trigger: ReportRefreshTrigger = 'schedule';\n\n @field({\n type: 'text',\n required: true,\n description:\n 'Rebuild recomputes the whole report. Incremental updates only what changed.',\n })\n mode: ReportRefreshMode = 'incremental';\n\n @field({\n type: 'boolean',\n required: true,\n description: 'Turn off to stop refreshing without deleting the schedule.',\n })\n enabled: boolean = true;\n\n @field({\n type: 'text',\n required: true,\n description:\n 'Whether the schedule is active, paused, disabled or in error.',\n })\n status: ReportScheduleStatus = 'active';\n\n @field({\n type: 'datetime',\n nullable: true,\n description: 'When the report is next due to refresh.',\n })\n nextRun: Date | null = null;\n\n @field({\n type: 'datetime',\n nullable: true,\n description: 'When the report last started a scheduled refresh.',\n })\n lastRun: Date | null = null;\n\n @field({\n type: 'text',\n nullable: true,\n description: 'Whether the last scheduled refresh worked or failed.',\n })\n lastStatus: 'success' | 'failed' | null = null;\n\n @field({\n type: 'text',\n nullable: true,\n description: 'Why the last scheduled refresh failed. Empty when it worked.',\n })\n lastError: string | null = null;\n\n @field({ type: 'integer', required: true })\n runCount: number = 0;\n\n @field({ type: 'integer', required: true })\n successCount: number = 0;\n\n @field({ type: 'integer', required: true })\n failureCount: number = 0;\n\n @field({ type: 'integer', required: true })\n runningCount: number = 0;\n\n @field({ type: 'integer', required: true })\n maxConcurrent: number = 1;\n\n @field({ type: 'text', required: true })\n queue: string = 'reports';\n\n @field({ type: 'integer', required: true })\n priority: number = 70;\n\n @field({ type: 'integer', required: true })\n timeout: number = 3600000;\n}\n\nexport class SmrtReportScheduleCollection extends SmrtCollection<SmrtReportSchedule> {\n static readonly _itemClass = SmrtReportSchedule;\n}\n"],"mappings":"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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-reports",
3
- "version": "0.55.22",
3
+ "version": "0.55.23",
4
4
  "description": "Materialized aggregate report models for SMRT",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -43,15 +43,15 @@
43
43
  "./manifest.json": "./dist/manifest.json"
44
44
  },
45
45
  "dependencies": {
46
- "@happyvertical/smrt-core": "0.55.22",
47
- "@happyvertical/smrt-jobs": "0.55.22",
48
- "@happyvertical/smrt-types": "0.55.22",
49
- "@happyvertical/smrt-tenancy": "0.55.22",
46
+ "@happyvertical/smrt-core": "0.55.23",
47
+ "@happyvertical/smrt-jobs": "0.55.23",
48
+ "@happyvertical/smrt-types": "0.55.23",
49
+ "@happyvertical/smrt-tenancy": "0.55.23",
50
50
  "@happyvertical/sql": "^0.103.5"
51
51
  },
52
52
  "devDependencies": {
53
- "@happyvertical/smrt-scanner": "0.55.22",
54
- "@happyvertical/smrt-vitest": "0.55.22",
53
+ "@happyvertical/smrt-scanner": "0.55.23",
54
+ "@happyvertical/smrt-vitest": "0.55.23",
55
55
  "@types/node": "24.13.6",
56
56
  "typescript": "6.0.3",
57
57
  "vite": "8.1.4",