@happyvertical/smrt-ingestion 0.0.0-stage → 0.55.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +33 -0
- package/CLAUDE.md +1 -0
- package/EXTRACTION.md +120 -0
- package/LICENSE +7 -0
- package/README.md +147 -2
- package/dist/__smrt-register__.d.ts +2 -0
- package/dist/__smrt-register__.d.ts.map +1 -0
- package/dist/chunks/extraction-providers-C66ADDVe.js +433 -0
- package/dist/chunks/extraction-providers-C66ADDVe.js.map +1 -0
- package/dist/dto.d.ts +53 -0
- package/dist/dto.d.ts.map +1 -0
- package/dist/dto.js +0 -0
- package/dist/execution-contracts.d.ts +128 -0
- package/dist/execution-contracts.d.ts.map +1 -0
- package/dist/execution-dto.d.ts +70 -0
- package/dist/execution-dto.d.ts.map +1 -0
- package/dist/execution.d.ts +56 -0
- package/dist/execution.d.ts.map +1 -0
- package/dist/execution.js +7615 -0
- package/dist/execution.js.map +1 -0
- package/dist/extraction-providers.d.ts +35 -0
- package/dist/extraction-providers.d.ts.map +1 -0
- package/dist/extraction-types.d.ts +94 -0
- package/dist/extraction-types.d.ts.map +1 -0
- package/dist/extraction-worker.d.ts +2 -0
- package/dist/extraction-worker.d.ts.map +1 -0
- package/dist/extraction-worker.js +81 -0
- package/dist/extraction-worker.js.map +1 -0
- package/dist/extraction.d.ts +49 -0
- package/dist/extraction.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/manifest.json +4091 -0
- package/dist/models.d.ts +186 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +923 -0
- package/dist/models.js.map +1 -0
- package/dist/policy.d.ts +46 -0
- package/dist/policy.d.ts.map +1 -0
- package/dist/server.d.ts +168 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +1758 -0
- package/dist/server.js.map +1 -0
- package/dist/smrt-knowledge.json +1605 -0
- package/dist/sources/common.d.ts +32 -0
- package/dist/sources/common.d.ts.map +1 -0
- package/dist/sources/email.d.ts +40 -0
- package/dist/sources/email.d.ts.map +1 -0
- package/dist/sources/http.d.ts +30 -0
- package/dist/sources/http.d.ts.map +1 -0
- package/dist/sources/index.d.ts +8 -0
- package/dist/sources/index.d.ts.map +1 -0
- package/dist/sources/watch-folder.d.ts +27 -0
- package/dist/sources/watch-folder.d.ts.map +1 -0
- package/package.json +80 -3
package/dist/models.js
ADDED
|
@@ -0,0 +1,923 @@
|
|
|
1
|
+
import { ObjectRegistry, SmrtObject, crossPackageRef, field, foreignKey, smrt } from "@happyvertical/smrt-core";
|
|
2
|
+
import { TenantScoped, tenantId } from "@happyvertical/smrt-tenancy";
|
|
3
|
+
//#region src/__smrt-register__.ts
|
|
4
|
+
ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-ingestion","packageVersion":"0.55.5","objects":{"@happyvertical/smrt-ingestion:IntakeItem":{"name":"intakeitem","className":"IntakeItem","qualifiedName":"@happyvertical/smrt-ingestion:IntakeItem","collection":"intakeitems","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","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}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"sourceId":{"type":"text","required":true,"_meta":{"required":true}},"sourceVersion":{"type":"text","required":true,"_meta":{"required":true}},"deliveryKey":{"type":"text","required":true,"_meta":{"required":true}},"payloadDigest":{"type":"text","required":true,"_meta":{"required":true}},"scopeDigest":{"type":"text","required":true,"_meta":{"required":true}},"receiptState":{"type":"text","required":true,"_meta":{"required":true}},"processingState":{"type":"text","required":true,"_meta":{"required":true}},"visibility":{"type":"text","required":true,"_meta":{"required":true}},"receiptVersion":{"type":"integer","required":true,"_meta":{"required":true}},"analysisRevision":{"type":"integer","required":true,"_meta":{"required":true}},"fence":{"type":"integer","required":true,"_meta":{"required":true}},"leaseToken":{"type":"text","required":true,"_meta":{"required":true}},"leaseUntil":{"type":"datetime","required":false,"_meta":{"nullable":true}},"expiresAt":{"type":"datetime","required":true,"_meta":{"required":true}},"replayUntil":{"type":"datetime","required":true,"_meta":{"required":true}},"cancelled":{"type":"boolean","required":true,"_meta":{"required":true}},"traceId":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_items","conflictColumns":["tenant_id","source_id","delivery_key"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_items_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_items_expiry_idx","columns":["tenantId","expiresAt"]},{"name":"intake_items_receipt_idx","columns":["tenantId","receiptState","leaseUntil"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeItem","collectionExportName":"IntakeItemCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"sourceId","rule":"required","fieldType":"text"},{"field":"sourceVersion","rule":"required","fieldType":"text"},{"field":"deliveryKey","rule":"required","fieldType":"text"},{"field":"payloadDigest","rule":"required","fieldType":"text"},{"field":"scopeDigest","rule":"required","fieldType":"text"},{"field":"receiptState","rule":"required","fieldType":"text"},{"field":"processingState","rule":"required","fieldType":"text"},{"field":"visibility","rule":"required","fieldType":"text"},{"field":"receiptVersion","rule":"required","fieldType":"integer"},{"field":"analysisRevision","rule":"required","fieldType":"integer"},{"field":"fence","rule":"required","fieldType":"integer"},{"field":"leaseToken","rule":"required","fieldType":"text"},{"field":"expiresAt","rule":"required","fieldType":"datetime"},{"field":"replayUntil","rule":"required","fieldType":"datetime"},{"field":"cancelled","rule":"required","fieldType":"boolean"},{"field":"traceId","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_items","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_items\\" (\\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 \\"confidential_scope_id\\" TEXT NOT NULL,\\n \\"source_id\\" TEXT NOT NULL,\\n \\"source_version\\" TEXT NOT NULL,\\n \\"delivery_key\\" TEXT NOT NULL,\\n \\"payload_digest\\" TEXT NOT NULL,\\n \\"scope_digest\\" TEXT NOT NULL,\\n \\"receipt_state\\" TEXT NOT NULL,\\n \\"processing_state\\" TEXT NOT NULL,\\n \\"visibility\\" TEXT NOT NULL,\\n \\"receipt_version\\" INTEGER NOT NULL,\\n \\"analysis_revision\\" INTEGER NOT NULL,\\n \\"fence\\" INTEGER NOT NULL,\\n \\"lease_token\\" TEXT NOT NULL,\\n \\"lease_until\\" TIMESTAMP,\\n \\"expires_at\\" TIMESTAMP NOT NULL,\\n \\"replay_until\\" TIMESTAMP NOT NULL,\\n \\"cancelled\\" BOOLEAN NOT NULL,\\n \\"trace_id\\" TEXT NOT NULL,\\n \\"data\\" JSON 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":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"source_id":{"type":"TEXT","notNull":true,"unique":false},"source_version":{"type":"TEXT","notNull":true,"unique":false},"delivery_key":{"type":"TEXT","notNull":true,"unique":false},"payload_digest":{"type":"TEXT","notNull":true,"unique":false},"scope_digest":{"type":"TEXT","notNull":true,"unique":false},"receipt_state":{"type":"TEXT","notNull":true,"unique":false},"processing_state":{"type":"TEXT","notNull":true,"unique":false},"visibility":{"type":"TEXT","notNull":true,"unique":false},"receipt_version":{"type":"INTEGER","notNull":true,"unique":false},"analysis_revision":{"type":"INTEGER","notNull":true,"unique":false},"fence":{"type":"INTEGER","notNull":true,"unique":false},"lease_token":{"type":"TEXT","notNull":true,"unique":false},"lease_until":{"type":"TIMESTAMP","notNull":false,"unique":false},"expires_at":{"type":"TIMESTAMP","notNull":true,"unique":false},"replay_until":{"type":"TIMESTAMP","notNull":true,"unique":false},"cancelled":{"type":"BOOLEAN","notNull":true,"unique":false},"trace_id":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_items_tenant_id_source_id_idx","columns":["tenant_id","source_id","delivery_key"],"unique":true},{"name":"intake_items_slug_context_idx","columns":["slug","context"]},{"name":"intake_items_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_items_expiry_idx","columns":["tenant_id","expires_at"]},{"name":"intake_items_receipt_idx","columns":["tenant_id","receipt_state","lease_until"]},{"name":"intake_items_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"c1267254"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeEvidence":{"name":"intakeevidence","className":"IntakeEvidence","qualifiedName":"@happyvertical/smrt-ingestion:IntakeEvidence","collection":"intakeevidences","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","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}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"partId":{"type":"text","required":true,"_meta":{"required":true}},"parentEvidenceId":{"type":"foreignKey","required":false,"related":"IntakeEvidence","_meta":{"nullable":true}},"assetId":{"type":"crossPackageRef","required":false,"related":"@happyvertical/smrt-assets:Asset","_meta":{"nullable":true,"onDelete":"SET NULL"}},"state":{"type":"text","required":true,"_meta":{"required":true}},"contentHash":{"type":"text","required":true,"_meta":{"required":true}},"byteLength":{"type":"integer","required":true,"_meta":{"required":true}},"mediaType":{"type":"text","required":true,"_meta":{"required":true}},"sourceUri":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_evidence","conflictColumns":["tenant_id","item_id","part_id"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_evidence_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_evidence_item_idx","columns":["tenantId","itemId"]},{"name":"intake_evidence_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeEvidence","collectionExportName":"IntakeEvidenceCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"partId","rule":"required","fieldType":"text"},{"field":"state","rule":"required","fieldType":"text"},{"field":"contentHash","rule":"required","fieldType":"text"},{"field":"byteLength","rule":"required","fieldType":"integer"},{"field":"mediaType","rule":"required","fieldType":"text"},{"field":"sourceUri","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_evidence","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_evidence\\" (\\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 \\"confidential_scope_id\\" TEXT NOT NULL,\\n \\"item_id\\" UUID NOT NULL,\\n \\"part_id\\" TEXT NOT NULL,\\n \\"parent_evidence_id\\" UUID,\\n \\"asset_id\\" UUID,\\n \\"state\\" TEXT NOT NULL,\\n \\"content_hash\\" TEXT NOT NULL,\\n \\"byte_length\\" INTEGER NOT NULL,\\n \\"media_type\\" TEXT NOT NULL,\\n \\"source_uri\\" TEXT NOT NULL,\\n \\"data\\" JSON 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":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"part_id":{"type":"TEXT","notNull":true,"unique":false},"parent_evidence_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"intake_evidence","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"asset_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":false,"unique":false},"state":{"type":"TEXT","notNull":true,"unique":false},"content_hash":{"type":"TEXT","notNull":true,"unique":false},"byte_length":{"type":"INTEGER","notNull":true,"unique":false},"media_type":{"type":"TEXT","notNull":true,"unique":false},"source_uri":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_evidence_tenant_id_item_id_idx","columns":["tenant_id","item_id","part_id"],"unique":true},{"name":"intake_evidence_slug_context_idx","columns":["slug","context"]},{"name":"intake_evidence_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_evidence_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_evidence_state_idx","columns":["tenant_id","state"]},{"name":"intake_evidence_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_evidence_item_id_idx","columns":["item_id"]},{"name":"intake_evidence_parent_evidence_id_idx","columns":["parent_evidence_id"]},{"name":"intake_evidence_asset_id_idx","columns":["asset_id"]}],"version":"503a292c"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeAnalysis":{"name":"intakeanalysis","className":"IntakeAnalysis","qualifiedName":"@happyvertical/smrt-ingestion:IntakeAnalysis","collection":"intakeanalysises","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","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}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"revision":{"type":"integer","required":true,"_meta":{"required":true}},"fence":{"type":"integer","required":true,"_meta":{"required":true}},"attemptNumber":{"type":"integer","required":true,"_meta":{"required":true}},"currentAttemptId":{"type":"foreignKey","required":false,"related":"IntakeAnalysisAttempt","_meta":{"nullable":true}},"state":{"type":"text","required":true,"_meta":{"required":true}},"inputDigest":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_analyses","conflictColumns":["tenant_id","item_id","revision"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_analyses_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_analyses_item_idx","columns":["tenantId","itemId"]},{"name":"intake_analyses_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeAnalysis","collectionExportName":"IntakeAnalysisCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"revision","rule":"required","fieldType":"integer"},{"field":"fence","rule":"required","fieldType":"integer"},{"field":"attemptNumber","rule":"required","fieldType":"integer"},{"field":"state","rule":"required","fieldType":"text"},{"field":"inputDigest","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_analyses","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_analyses\\" (\\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 \\"confidential_scope_id\\" TEXT NOT NULL,\\n \\"item_id\\" UUID NOT NULL,\\n \\"revision\\" INTEGER NOT NULL,\\n \\"fence\\" INTEGER NOT NULL,\\n \\"attempt_number\\" INTEGER NOT NULL,\\n \\"current_attempt_id\\" UUID,\\n \\"state\\" TEXT NOT NULL,\\n \\"input_digest\\" TEXT NOT NULL,\\n \\"data\\" JSON 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":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"revision":{"type":"INTEGER","notNull":true,"unique":false},"fence":{"type":"INTEGER","notNull":true,"unique":false},"attempt_number":{"type":"INTEGER","notNull":true,"unique":false},"current_attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"intake_analysis_attempts","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"state":{"type":"TEXT","notNull":true,"unique":false},"input_digest":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_analyses_tenant_id_item_id_idx","columns":["tenant_id","item_id","revision"],"unique":true},{"name":"intake_analyses_slug_context_idx","columns":["slug","context"]},{"name":"intake_analyses_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_analyses_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_analyses_state_idx","columns":["tenant_id","state"]},{"name":"intake_analyses_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_analyses_item_id_idx","columns":["item_id"]},{"name":"intake_analyses_current_attempt_id_idx","columns":["current_attempt_id"]}],"version":"7c76601a"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeAnalysisAttempt":{"name":"intakeanalysisattempt","className":"IntakeAnalysisAttempt","qualifiedName":"@happyvertical/smrt-ingestion:IntakeAnalysisAttempt","collection":"intakeanalysisattempts","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","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}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"analysisId":{"type":"foreignKey","required":true,"related":"IntakeAnalysis","_meta":{"required":true}},"attemptNumber":{"type":"integer","required":true,"_meta":{"required":true}},"fence":{"type":"integer","required":true,"_meta":{"required":true}},"state":{"type":"text","required":true,"_meta":{"required":true}},"leaseToken":{"type":"text","required":true,"_meta":{"required":true}},"leaseUntil":{"type":"datetime","required":false,"_meta":{"nullable":true}},"outputDigest":{"type":"text","required":true,"_meta":{"required":true}},"safeError":{"type":"text","required":true,"_meta":{"required":true}},"confidence":{"type":"decimal","required":false,"_meta":{"nullable":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_analysis_attempts","conflictColumns":["tenant_id","analysis_id","attempt_number"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_analysis_attempts_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_analysis_attempts_item_idx","columns":["tenantId","itemId"]},{"name":"intake_analysis_attempts_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeAnalysisAttempt","collectionExportName":"IntakeAnalysisAttemptCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"analysisId","rule":"required","fieldType":"foreignKey"},{"field":"attemptNumber","rule":"required","fieldType":"integer"},{"field":"fence","rule":"required","fieldType":"integer"},{"field":"state","rule":"required","fieldType":"text"},{"field":"leaseToken","rule":"required","fieldType":"text"},{"field":"outputDigest","rule":"required","fieldType":"text"},{"field":"safeError","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_analysis_attempts","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_analysis_attempts\\" (\\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 \\"confidential_scope_id\\" TEXT NOT NULL,\\n \\"item_id\\" UUID NOT NULL,\\n \\"analysis_id\\" UUID NOT NULL,\\n \\"attempt_number\\" INTEGER NOT NULL,\\n \\"fence\\" INTEGER NOT NULL,\\n \\"state\\" TEXT NOT NULL,\\n \\"lease_token\\" TEXT NOT NULL,\\n \\"lease_until\\" TIMESTAMP,\\n \\"output_digest\\" TEXT NOT NULL,\\n \\"safe_error\\" TEXT NOT NULL,\\n \\"confidence\\" REAL,\\n \\"data\\" JSON 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":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"analysis_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_analyses","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"attempt_number":{"type":"INTEGER","notNull":true,"unique":false},"fence":{"type":"INTEGER","notNull":true,"unique":false},"state":{"type":"TEXT","notNull":true,"unique":false},"lease_token":{"type":"TEXT","notNull":true,"unique":false},"lease_until":{"type":"TIMESTAMP","notNull":false,"unique":false},"output_digest":{"type":"TEXT","notNull":true,"unique":false},"safe_error":{"type":"TEXT","notNull":true,"unique":false},"confidence":{"type":"REAL","notNull":false,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_analysis_attempts_tenant_id_analysis_id_idx","columns":["tenant_id","analysis_id","attempt_number"],"unique":true},{"name":"intake_analysis_attempts_slug_context_idx","columns":["slug","context"]},{"name":"intake_analysis_attempts_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_analysis_attempts_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_analysis_attempts_state_idx","columns":["tenant_id","state"]},{"name":"intake_analysis_attempts_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_analysis_attempts_item_id_idx","columns":["item_id"]},{"name":"intake_analysis_attempts_analysis_id_idx","columns":["analysis_id"]}],"version":"b51f7c2d"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakePlan":{"name":"intakeplan","className":"IntakePlan","qualifiedName":"@happyvertical/smrt-ingestion:IntakePlan","collection":"intakeplans","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","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}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"planKey":{"type":"text","required":true,"_meta":{"required":true}},"revision":{"type":"integer","required":true,"_meta":{"required":true}},"digest":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_plans","conflictColumns":["tenant_id","item_id","plan_key","revision"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_plans_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_plans_item_idx","columns":["tenantId","itemId"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakePlan","collectionExportName":"IntakePlanCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"planKey","rule":"required","fieldType":"text"},{"field":"revision","rule":"required","fieldType":"integer"},{"field":"digest","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_plans","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_plans\\" (\\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 \\"confidential_scope_id\\" TEXT NOT NULL,\\n \\"item_id\\" UUID NOT NULL,\\n \\"plan_key\\" TEXT NOT NULL,\\n \\"revision\\" INTEGER NOT NULL,\\n \\"digest\\" TEXT NOT NULL,\\n \\"data\\" JSON 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":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"plan_key":{"type":"TEXT","notNull":true,"unique":false},"revision":{"type":"INTEGER","notNull":true,"unique":false},"digest":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_plans_tenant_id_item_id_idx","columns":["tenant_id","item_id","plan_key","revision"],"unique":true},{"name":"intake_plans_slug_context_idx","columns":["slug","context"]},{"name":"intake_plans_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_plans_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_plans_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_plans_item_id_idx","columns":["item_id"]}],"version":"ade3ae21"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeAction":{"name":"intakeaction","className":"IntakeAction","qualifiedName":"@happyvertical/smrt-ingestion:IntakeAction","collection":"intakeactions","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","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}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"actionKey":{"type":"text","required":true,"_meta":{"required":true}},"state":{"type":"text","required":true,"_meta":{"required":true}},"proposalRevision":{"type":"integer","required":true,"_meta":{"required":true}},"reviewVersion":{"type":"integer","required":true,"_meta":{"required":true}},"executionAttempt":{"type":"integer","required":true,"_meta":{"required":true}},"fence":{"type":"integer","required":true,"_meta":{"required":true}},"resultDigest":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_actions","conflictColumns":["tenant_id","item_id","action_key"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_actions_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_actions_item_idx","columns":["tenantId","itemId"]},{"name":"intake_actions_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeAction","collectionExportName":"IntakeActionCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"actionKey","rule":"required","fieldType":"text"},{"field":"state","rule":"required","fieldType":"text"},{"field":"proposalRevision","rule":"required","fieldType":"integer"},{"field":"reviewVersion","rule":"required","fieldType":"integer"},{"field":"executionAttempt","rule":"required","fieldType":"integer"},{"field":"fence","rule":"required","fieldType":"integer"},{"field":"resultDigest","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_actions","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_actions\\" (\\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 \\"confidential_scope_id\\" TEXT NOT NULL,\\n \\"item_id\\" UUID NOT NULL,\\n \\"action_key\\" TEXT NOT NULL,\\n \\"state\\" TEXT NOT NULL,\\n \\"proposal_revision\\" INTEGER NOT NULL,\\n \\"review_version\\" INTEGER NOT NULL,\\n \\"execution_attempt\\" INTEGER NOT NULL,\\n \\"fence\\" INTEGER NOT NULL,\\n \\"result_digest\\" TEXT NOT NULL,\\n \\"data\\" JSON 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":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"action_key":{"type":"TEXT","notNull":true,"unique":false},"state":{"type":"TEXT","notNull":true,"unique":false},"proposal_revision":{"type":"INTEGER","notNull":true,"unique":false},"review_version":{"type":"INTEGER","notNull":true,"unique":false},"execution_attempt":{"type":"INTEGER","notNull":true,"unique":false},"fence":{"type":"INTEGER","notNull":true,"unique":false},"result_digest":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_actions_tenant_id_item_id_idx","columns":["tenant_id","item_id","action_key"],"unique":true},{"name":"intake_actions_slug_context_idx","columns":["slug","context"]},{"name":"intake_actions_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_actions_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_actions_state_idx","columns":["tenant_id","state"]},{"name":"intake_actions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_actions_item_id_idx","columns":["item_id"]}],"version":"a6d52621"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeProposal":{"name":"intakeproposal","className":"IntakeProposal","qualifiedName":"@happyvertical/smrt-ingestion:IntakeProposal","collection":"intakeproposals","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","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}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"actionId":{"type":"foreignKey","required":true,"related":"IntakeAction","_meta":{"required":true}},"analysisId":{"type":"foreignKey","required":true,"related":"IntakeAnalysis","_meta":{"required":true}},"analysisAttemptId":{"type":"foreignKey","required":true,"related":"IntakeAnalysisAttempt","_meta":{"required":true}},"revision":{"type":"integer","required":true,"_meta":{"required":true}},"bindingHash":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_proposals","conflictColumns":["tenant_id","action_id","revision"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_proposals_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_proposals_item_idx","columns":["tenantId","itemId"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeProposal","collectionExportName":"IntakeProposalCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"actionId","rule":"required","fieldType":"foreignKey"},{"field":"analysisId","rule":"required","fieldType":"foreignKey"},{"field":"analysisAttemptId","rule":"required","fieldType":"foreignKey"},{"field":"revision","rule":"required","fieldType":"integer"},{"field":"bindingHash","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_proposals","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_proposals\\" (\\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 \\"confidential_scope_id\\" TEXT NOT NULL,\\n \\"item_id\\" UUID NOT NULL,\\n \\"action_id\\" UUID NOT NULL,\\n \\"analysis_id\\" UUID NOT NULL,\\n \\"analysis_attempt_id\\" UUID NOT NULL,\\n \\"revision\\" INTEGER NOT NULL,\\n \\"binding_hash\\" TEXT NOT NULL,\\n \\"data\\" JSON 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":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"action_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_actions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"analysis_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_analyses","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"analysis_attempt_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_analysis_attempts","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"revision":{"type":"INTEGER","notNull":true,"unique":false},"binding_hash":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_proposals_tenant_id_action_id_idx","columns":["tenant_id","action_id","revision"],"unique":true},{"name":"intake_proposals_slug_context_idx","columns":["slug","context"]},{"name":"intake_proposals_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_proposals_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_proposals_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_proposals_item_id_idx","columns":["item_id"]},{"name":"intake_proposals_action_id_idx","columns":["action_id"]},{"name":"intake_proposals_analysis_id_idx","columns":["analysis_id"]},{"name":"intake_proposals_analysis_attempt_id_idx","columns":["analysis_attempt_id"]}],"version":"fe602385"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeReviewDecision":{"name":"intakereviewdecision","className":"IntakeReviewDecision","qualifiedName":"@happyvertical/smrt-ingestion:IntakeReviewDecision","collection":"intakereviewdecisions","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","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}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"actionId":{"type":"foreignKey","required":true,"related":"IntakeAction","_meta":{"required":true}},"proposalId":{"type":"foreignKey","required":true,"related":"IntakeProposal","_meta":{"required":true}},"reviewVersion":{"type":"integer","required":true,"_meta":{"required":true}},"bindingHash":{"type":"text","required":true,"_meta":{"required":true}},"decision":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_review_decisions","conflictColumns":["tenant_id","action_id","review_version"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_review_decisions_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_review_decisions_item_idx","columns":["tenantId","itemId"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeReviewDecision","collectionExportName":"IntakeReviewDecisionCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"actionId","rule":"required","fieldType":"foreignKey"},{"field":"proposalId","rule":"required","fieldType":"foreignKey"},{"field":"reviewVersion","rule":"required","fieldType":"integer"},{"field":"bindingHash","rule":"required","fieldType":"text"},{"field":"decision","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_review_decisions","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_review_decisions\\" (\\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 \\"confidential_scope_id\\" TEXT NOT NULL,\\n \\"item_id\\" UUID NOT NULL,\\n \\"action_id\\" UUID NOT NULL,\\n \\"proposal_id\\" UUID NOT NULL,\\n \\"review_version\\" INTEGER NOT NULL,\\n \\"binding_hash\\" TEXT NOT NULL,\\n \\"decision\\" TEXT NOT NULL,\\n \\"data\\" JSON 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":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"action_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_actions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"proposal_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_proposals","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"review_version":{"type":"INTEGER","notNull":true,"unique":false},"binding_hash":{"type":"TEXT","notNull":true,"unique":false},"decision":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_review_decisions_tenant_id_action_id_idx","columns":["tenant_id","action_id","review_version"],"unique":true},{"name":"intake_review_decisions_slug_context_idx","columns":["slug","context"]},{"name":"intake_review_decisions_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_review_decisions_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_review_decisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_review_decisions_item_id_idx","columns":["item_id"]},{"name":"intake_review_decisions_action_id_idx","columns":["action_id"]},{"name":"intake_review_decisions_proposal_id_idx","columns":["proposal_id"]}],"version":"80f24292"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeExecution":{"name":"intakeexecution","className":"IntakeExecution","qualifiedName":"@happyvertical/smrt-ingestion:IntakeExecution","collection":"intakeexecutions","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","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}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"actionId":{"type":"foreignKey","required":true,"related":"IntakeAction","_meta":{"required":true}},"attemptNumber":{"type":"integer","required":true,"_meta":{"required":true}},"fence":{"type":"integer","required":true,"_meta":{"required":true}},"state":{"type":"text","required":true,"_meta":{"required":true}},"bindingHash":{"type":"text","required":true,"_meta":{"required":true}},"resultDigest":{"type":"text","required":true,"_meta":{"required":true}},"idempotencyKey":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_executions","conflictColumns":["tenant_id","action_id","attempt_number"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_executions_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_executions_item_idx","columns":["tenantId","itemId"]},{"name":"intake_executions_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeExecution","collectionExportName":"IntakeExecutionCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"actionId","rule":"required","fieldType":"foreignKey"},{"field":"attemptNumber","rule":"required","fieldType":"integer"},{"field":"fence","rule":"required","fieldType":"integer"},{"field":"state","rule":"required","fieldType":"text"},{"field":"bindingHash","rule":"required","fieldType":"text"},{"field":"resultDigest","rule":"required","fieldType":"text"},{"field":"idempotencyKey","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_executions","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_executions\\" (\\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 \\"confidential_scope_id\\" TEXT NOT NULL,\\n \\"item_id\\" UUID NOT NULL,\\n \\"action_id\\" UUID NOT NULL,\\n \\"attempt_number\\" INTEGER NOT NULL,\\n \\"fence\\" INTEGER NOT NULL,\\n \\"state\\" TEXT NOT NULL,\\n \\"binding_hash\\" TEXT NOT NULL,\\n \\"result_digest\\" TEXT NOT NULL,\\n \\"idempotency_key\\" TEXT NOT NULL,\\n \\"data\\" JSON 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":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"action_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_actions","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"attempt_number":{"type":"INTEGER","notNull":true,"unique":false},"fence":{"type":"INTEGER","notNull":true,"unique":false},"state":{"type":"TEXT","notNull":true,"unique":false},"binding_hash":{"type":"TEXT","notNull":true,"unique":false},"result_digest":{"type":"TEXT","notNull":true,"unique":false},"idempotency_key":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_executions_tenant_id_action_id_idx","columns":["tenant_id","action_id","attempt_number"],"unique":true},{"name":"intake_executions_slug_context_idx","columns":["slug","context"]},{"name":"intake_executions_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_executions_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_executions_state_idx","columns":["tenant_id","state"]},{"name":"intake_executions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_executions_item_id_idx","columns":["item_id"]},{"name":"intake_executions_action_id_idx","columns":["action_id"]}],"version":"6a14ec3c"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeFeedback":{"name":"intakefeedback","className":"IntakeFeedback","qualifiedName":"@happyvertical/smrt-ingestion:IntakeFeedback","collection":"intakefeedbacks","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","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}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"requestKey":{"type":"text","required":true,"_meta":{"required":true}},"supersedesId":{"type":"foreignKey","required":false,"related":"IntakeFeedback","_meta":{"nullable":true}},"kind":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_feedback","conflictColumns":["tenant_id","item_id","request_key"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_feedback_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_feedback_item_idx","columns":["tenantId","itemId"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeFeedback","collectionExportName":"IntakeFeedbackCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"requestKey","rule":"required","fieldType":"text"},{"field":"kind","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_feedback","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_feedback\\" (\\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 \\"confidential_scope_id\\" TEXT NOT NULL,\\n \\"item_id\\" UUID NOT NULL,\\n \\"request_key\\" TEXT NOT NULL,\\n \\"supersedes_id\\" UUID,\\n \\"kind\\" TEXT NOT NULL,\\n \\"data\\" JSON 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":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"request_key":{"type":"TEXT","notNull":true,"unique":false},"supersedes_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false,"foreignKey":{"table":"intake_feedback","column":"id","onDelete":"NO ACTION","onUpdate":"CASCADE"}},"kind":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_feedback_tenant_id_item_id_idx","columns":["tenant_id","item_id","request_key"],"unique":true},{"name":"intake_feedback_slug_context_idx","columns":["slug","context"]},{"name":"intake_feedback_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_feedback_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_feedback_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_feedback_item_id_idx","columns":["item_id"]},{"name":"intake_feedback_supersedes_id_idx","columns":["supersedes_id"]}],"version":"087279a0"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeDispatch":{"name":"intakedispatch","className":"IntakeDispatch","qualifiedName":"@happyvertical/smrt-ingestion:IntakeDispatch","collection":"intakedispatches","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","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}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"stage":{"type":"text","required":true,"_meta":{"required":true}},"revision":{"type":"integer","required":true,"_meta":{"required":true}},"state":{"type":"text","required":true,"_meta":{"required":true}},"jobId":{"type":"text","required":true,"_meta":{"required":true}},"deliveries":{"type":"integer","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_dispatches","conflictColumns":["tenant_id","item_id","stage","revision"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_dispatches_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_dispatches_item_idx","columns":["tenantId","itemId"]},{"name":"intake_dispatches_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeDispatch","collectionExportName":"IntakeDispatchCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"stage","rule":"required","fieldType":"text"},{"field":"revision","rule":"required","fieldType":"integer"},{"field":"state","rule":"required","fieldType":"text"},{"field":"jobId","rule":"required","fieldType":"text"},{"field":"deliveries","rule":"required","fieldType":"integer"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_dispatches","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_dispatches\\" (\\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 \\"confidential_scope_id\\" TEXT NOT NULL,\\n \\"item_id\\" UUID NOT NULL,\\n \\"stage\\" TEXT NOT NULL,\\n \\"revision\\" INTEGER NOT NULL,\\n \\"state\\" TEXT NOT NULL,\\n \\"job_id\\" TEXT NOT NULL,\\n \\"deliveries\\" INTEGER NOT NULL,\\n \\"data\\" JSON 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":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"stage":{"type":"TEXT","notNull":true,"unique":false},"revision":{"type":"INTEGER","notNull":true,"unique":false},"state":{"type":"TEXT","notNull":true,"unique":false},"job_id":{"type":"TEXT","notNull":true,"unique":false},"deliveries":{"type":"INTEGER","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_dispatches_tenant_id_item_id_idx","columns":["tenant_id","item_id","stage","revision"],"unique":true},{"name":"intake_dispatches_slug_context_idx","columns":["slug","context"]},{"name":"intake_dispatches_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_dispatches_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_dispatches_state_idx","columns":["tenant_id","state"]},{"name":"intake_dispatches_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_dispatches_item_id_idx","columns":["item_id"]}],"version":"037a8ea3"},"importPath":"@happyvertical/smrt-ingestion/models"},"@happyvertical/smrt-ingestion:IntakeDeletion":{"name":"intakedeletion","className":"IntakeDeletion","qualifiedName":"@happyvertical/smrt-ingestion:IntakeDeletion","collection":"intakedeletions","filePath":"/home/runner/work/smrt/smrt/packages/ingestion/src/models.ts","packageName":"@happyvertical/smrt-ingestion","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}}},"confidentialScopeId":{"type":"text","required":true,"_meta":{"required":true}},"itemId":{"type":"foreignKey","required":true,"related":"IntakeItem","_meta":{"required":true}},"state":{"type":"text","required":true,"_meta":{"required":true}},"data":{"type":"json","required":true,"_meta":{"required":true}}},"methods":{"getData":{"name":"getData","async":false,"parameters":[],"returnType":"Record<string, unknown>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"intake_deletions","conflictColumns":["tenant_id","item_id"],"api":false,"cli":false,"mcp":false,"indexes":[{"name":"intake_deletions_scope_idx","columns":["tenantId","confidentialScopeId"]},{"name":"intake_deletions_item_idx","columns":["tenantId","itemId"]},{"name":"intake_deletions_state_idx","columns":["tenantId","state"]}],"tenantScoped":{"mode":"required"}},"extends":"SmrtObject","exportName":"IntakeDeletion","collectionExportName":"IntakeDeletionCollection","validationRules":[{"field":"confidentialScopeId","rule":"required","fieldType":"text"},{"field":"itemId","rule":"required","fieldType":"foreignKey"},{"field":"state","rule":"required","fieldType":"text"},{"field":"data","rule":"required","fieldType":"json"}],"schema":{"tableName":"intake_deletions","ddl":"CREATE TABLE IF NOT EXISTS \\"intake_deletions\\" (\\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 \\"confidential_scope_id\\" TEXT NOT NULL,\\n \\"item_id\\" UUID NOT NULL,\\n \\"state\\" TEXT NOT NULL,\\n \\"data\\" JSON 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":true,"unique":false},"confidential_scope_id":{"type":"TEXT","notNull":true,"unique":false},"item_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false,"foreignKey":{"table":"intake_items","column":"id","onDelete":"CASCADE","onUpdate":"CASCADE"}},"state":{"type":"TEXT","notNull":true,"unique":false},"data":{"type":"JSON","notNull":true,"unique":false}},"indexes":[{"name":"intake_deletions_tenant_id_item_id_idx","columns":["tenant_id","item_id"],"unique":true},{"name":"intake_deletions_slug_context_idx","columns":["slug","context"]},{"name":"intake_deletions_scope_idx","columns":["tenant_id","confidential_scope_id"]},{"name":"intake_deletions_item_idx","columns":["tenant_id","item_id"]},{"name":"intake_deletions_state_idx","columns":["tenant_id","state"]},{"name":"intake_deletions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"intake_deletions_item_id_idx","columns":["item_id"]}],"version":"474ffa09"},"importPath":"@happyvertical/smrt-ingestion/models"}},"moduleType":"smrt","smrtDependencies":["@happyvertical/smrt-agents","@happyvertical/smrt-assets","@happyvertical/smrt-content","@happyvertical/smrt-core","@happyvertical/smrt-jobs","@happyvertical/smrt-playbooks","@happyvertical/smrt-tenancy","@happyvertical/smrt-users"],"stampsConstructors":true}`));
|
|
5
|
+
//#endregion
|
|
6
|
+
//#region src/models.ts
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
configurable: true,
|
|
12
|
+
writable: true,
|
|
13
|
+
value
|
|
14
|
+
}) : obj[key] = value;
|
|
15
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
16
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
17
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--) if (decorator = decorators[i]) result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
18
|
+
if (kind && result) __defProp(target, key, result);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
21
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
22
|
+
var IntakeItem = class extends SmrtObject {
|
|
23
|
+
tenantId = "";
|
|
24
|
+
confidentialScopeId = "";
|
|
25
|
+
sourceId = "";
|
|
26
|
+
sourceVersion = "";
|
|
27
|
+
deliveryKey = "";
|
|
28
|
+
payloadDigest = "";
|
|
29
|
+
scopeDigest = "";
|
|
30
|
+
receiptState = "";
|
|
31
|
+
processingState = "";
|
|
32
|
+
visibility = "";
|
|
33
|
+
receiptVersion = 0;
|
|
34
|
+
analysisRevision = 0;
|
|
35
|
+
fence = 0;
|
|
36
|
+
leaseToken = "";
|
|
37
|
+
leaseUntil = null;
|
|
38
|
+
expiresAt = /* @__PURE__ */ new Date();
|
|
39
|
+
replayUntil = /* @__PURE__ */ new Date();
|
|
40
|
+
cancelled = false;
|
|
41
|
+
traceId = "";
|
|
42
|
+
data = "{}";
|
|
43
|
+
/** Parse a bounded object payload; malformed persisted data fails closed. */
|
|
44
|
+
getData() {
|
|
45
|
+
const value = typeof this.data === "string" ? JSON.parse(this.data) : this.data;
|
|
46
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid intake payload");
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
__publicField(IntakeItem, "__smrtPackage__", "@happyvertical/smrt-ingestion");
|
|
51
|
+
__decorateClass([tenantId()], IntakeItem.prototype, "tenantId", 2);
|
|
52
|
+
__decorateClass([field({
|
|
53
|
+
type: "text",
|
|
54
|
+
required: true
|
|
55
|
+
})], IntakeItem.prototype, "confidentialScopeId", 2);
|
|
56
|
+
__decorateClass([field({
|
|
57
|
+
type: "text",
|
|
58
|
+
required: true
|
|
59
|
+
})], IntakeItem.prototype, "sourceId", 2);
|
|
60
|
+
__decorateClass([field({
|
|
61
|
+
type: "text",
|
|
62
|
+
required: true
|
|
63
|
+
})], IntakeItem.prototype, "sourceVersion", 2);
|
|
64
|
+
__decorateClass([field({
|
|
65
|
+
type: "text",
|
|
66
|
+
required: true
|
|
67
|
+
})], IntakeItem.prototype, "deliveryKey", 2);
|
|
68
|
+
__decorateClass([field({
|
|
69
|
+
type: "text",
|
|
70
|
+
required: true
|
|
71
|
+
})], IntakeItem.prototype, "payloadDigest", 2);
|
|
72
|
+
__decorateClass([field({
|
|
73
|
+
type: "text",
|
|
74
|
+
required: true
|
|
75
|
+
})], IntakeItem.prototype, "scopeDigest", 2);
|
|
76
|
+
__decorateClass([field({
|
|
77
|
+
type: "text",
|
|
78
|
+
required: true
|
|
79
|
+
})], IntakeItem.prototype, "receiptState", 2);
|
|
80
|
+
__decorateClass([field({
|
|
81
|
+
type: "text",
|
|
82
|
+
required: true
|
|
83
|
+
})], IntakeItem.prototype, "processingState", 2);
|
|
84
|
+
__decorateClass([field({
|
|
85
|
+
type: "text",
|
|
86
|
+
required: true
|
|
87
|
+
})], IntakeItem.prototype, "visibility", 2);
|
|
88
|
+
__decorateClass([field({
|
|
89
|
+
type: "integer",
|
|
90
|
+
required: true
|
|
91
|
+
})], IntakeItem.prototype, "receiptVersion", 2);
|
|
92
|
+
__decorateClass([field({
|
|
93
|
+
type: "integer",
|
|
94
|
+
required: true
|
|
95
|
+
})], IntakeItem.prototype, "analysisRevision", 2);
|
|
96
|
+
__decorateClass([field({
|
|
97
|
+
type: "integer",
|
|
98
|
+
required: true
|
|
99
|
+
})], IntakeItem.prototype, "fence", 2);
|
|
100
|
+
__decorateClass([field({
|
|
101
|
+
type: "text",
|
|
102
|
+
required: true
|
|
103
|
+
})], IntakeItem.prototype, "leaseToken", 2);
|
|
104
|
+
__decorateClass([field({
|
|
105
|
+
type: "datetime",
|
|
106
|
+
nullable: true
|
|
107
|
+
})], IntakeItem.prototype, "leaseUntil", 2);
|
|
108
|
+
__decorateClass([field({
|
|
109
|
+
type: "datetime",
|
|
110
|
+
required: true
|
|
111
|
+
})], IntakeItem.prototype, "expiresAt", 2);
|
|
112
|
+
__decorateClass([field({
|
|
113
|
+
type: "datetime",
|
|
114
|
+
required: true
|
|
115
|
+
})], IntakeItem.prototype, "replayUntil", 2);
|
|
116
|
+
__decorateClass([field({
|
|
117
|
+
type: "boolean",
|
|
118
|
+
required: true
|
|
119
|
+
})], IntakeItem.prototype, "cancelled", 2);
|
|
120
|
+
__decorateClass([field({
|
|
121
|
+
type: "text",
|
|
122
|
+
required: true
|
|
123
|
+
})], IntakeItem.prototype, "traceId", 2);
|
|
124
|
+
__decorateClass([field({
|
|
125
|
+
type: "json",
|
|
126
|
+
required: true
|
|
127
|
+
})], IntakeItem.prototype, "data", 2);
|
|
128
|
+
IntakeItem = __decorateClass([smrt({
|
|
129
|
+
tableName: "intake_items",
|
|
130
|
+
conflictColumns: [
|
|
131
|
+
"tenant_id",
|
|
132
|
+
"source_id",
|
|
133
|
+
"delivery_key"
|
|
134
|
+
],
|
|
135
|
+
api: false,
|
|
136
|
+
cli: false,
|
|
137
|
+
mcp: false,
|
|
138
|
+
indexes: [
|
|
139
|
+
{
|
|
140
|
+
name: "intake_items_scope_idx",
|
|
141
|
+
columns: ["tenantId", "confidentialScopeId"]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
name: "intake_items_expiry_idx",
|
|
145
|
+
columns: ["tenantId", "expiresAt"]
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "intake_items_receipt_idx",
|
|
149
|
+
columns: [
|
|
150
|
+
"tenantId",
|
|
151
|
+
"receiptState",
|
|
152
|
+
"leaseUntil"
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
}), TenantScoped({ mode: "required" })], IntakeItem);
|
|
157
|
+
var IntakeEvidence = class extends SmrtObject {
|
|
158
|
+
tenantId = "";
|
|
159
|
+
confidentialScopeId = "";
|
|
160
|
+
itemId = "";
|
|
161
|
+
partId = "";
|
|
162
|
+
parentEvidenceId = null;
|
|
163
|
+
assetId = null;
|
|
164
|
+
state = "";
|
|
165
|
+
contentHash = "";
|
|
166
|
+
byteLength = 0;
|
|
167
|
+
mediaType = "";
|
|
168
|
+
sourceUri = "";
|
|
169
|
+
data = "{}";
|
|
170
|
+
/** Parse a bounded object payload; malformed persisted data fails closed. */
|
|
171
|
+
getData() {
|
|
172
|
+
const value = typeof this.data === "string" ? JSON.parse(this.data) : this.data;
|
|
173
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid intake payload");
|
|
174
|
+
return value;
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
__publicField(IntakeEvidence, "__smrtPackage__", "@happyvertical/smrt-ingestion");
|
|
178
|
+
__decorateClass([tenantId()], IntakeEvidence.prototype, "tenantId", 2);
|
|
179
|
+
__decorateClass([field({
|
|
180
|
+
type: "text",
|
|
181
|
+
required: true
|
|
182
|
+
})], IntakeEvidence.prototype, "confidentialScopeId", 2);
|
|
183
|
+
__decorateClass([foreignKey("IntakeItem", { required: true })], IntakeEvidence.prototype, "itemId", 2);
|
|
184
|
+
__decorateClass([field({
|
|
185
|
+
type: "text",
|
|
186
|
+
required: true
|
|
187
|
+
})], IntakeEvidence.prototype, "partId", 2);
|
|
188
|
+
__decorateClass([foreignKey("IntakeEvidence", { nullable: true })], IntakeEvidence.prototype, "parentEvidenceId", 2);
|
|
189
|
+
__decorateClass([crossPackageRef("@happyvertical/smrt-assets:Asset", {
|
|
190
|
+
nullable: true,
|
|
191
|
+
onDelete: "SET NULL"
|
|
192
|
+
})], IntakeEvidence.prototype, "assetId", 2);
|
|
193
|
+
__decorateClass([field({
|
|
194
|
+
type: "text",
|
|
195
|
+
required: true
|
|
196
|
+
})], IntakeEvidence.prototype, "state", 2);
|
|
197
|
+
__decorateClass([field({
|
|
198
|
+
type: "text",
|
|
199
|
+
required: true
|
|
200
|
+
})], IntakeEvidence.prototype, "contentHash", 2);
|
|
201
|
+
__decorateClass([field({
|
|
202
|
+
type: "integer",
|
|
203
|
+
required: true
|
|
204
|
+
})], IntakeEvidence.prototype, "byteLength", 2);
|
|
205
|
+
__decorateClass([field({
|
|
206
|
+
type: "text",
|
|
207
|
+
required: true
|
|
208
|
+
})], IntakeEvidence.prototype, "mediaType", 2);
|
|
209
|
+
__decorateClass([field({
|
|
210
|
+
type: "text",
|
|
211
|
+
required: true
|
|
212
|
+
})], IntakeEvidence.prototype, "sourceUri", 2);
|
|
213
|
+
__decorateClass([field({
|
|
214
|
+
type: "json",
|
|
215
|
+
required: true
|
|
216
|
+
})], IntakeEvidence.prototype, "data", 2);
|
|
217
|
+
IntakeEvidence = __decorateClass([smrt({
|
|
218
|
+
tableName: "intake_evidence",
|
|
219
|
+
conflictColumns: [
|
|
220
|
+
"tenant_id",
|
|
221
|
+
"item_id",
|
|
222
|
+
"part_id"
|
|
223
|
+
],
|
|
224
|
+
api: false,
|
|
225
|
+
cli: false,
|
|
226
|
+
mcp: false,
|
|
227
|
+
indexes: [
|
|
228
|
+
{
|
|
229
|
+
name: "intake_evidence_scope_idx",
|
|
230
|
+
columns: ["tenantId", "confidentialScopeId"]
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
name: "intake_evidence_item_idx",
|
|
234
|
+
columns: ["tenantId", "itemId"]
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
name: "intake_evidence_state_idx",
|
|
238
|
+
columns: ["tenantId", "state"]
|
|
239
|
+
}
|
|
240
|
+
]
|
|
241
|
+
}), TenantScoped({ mode: "required" })], IntakeEvidence);
|
|
242
|
+
var IntakeAnalysis = class extends SmrtObject {
|
|
243
|
+
tenantId = "";
|
|
244
|
+
confidentialScopeId = "";
|
|
245
|
+
itemId = "";
|
|
246
|
+
revision = 0;
|
|
247
|
+
fence = 0;
|
|
248
|
+
attemptNumber = 0;
|
|
249
|
+
currentAttemptId = null;
|
|
250
|
+
state = "";
|
|
251
|
+
inputDigest = "";
|
|
252
|
+
data = "{}";
|
|
253
|
+
/** Parse a bounded object payload; malformed persisted data fails closed. */
|
|
254
|
+
getData() {
|
|
255
|
+
const value = typeof this.data === "string" ? JSON.parse(this.data) : this.data;
|
|
256
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid intake payload");
|
|
257
|
+
return value;
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
__publicField(IntakeAnalysis, "__smrtPackage__", "@happyvertical/smrt-ingestion");
|
|
261
|
+
__decorateClass([tenantId()], IntakeAnalysis.prototype, "tenantId", 2);
|
|
262
|
+
__decorateClass([field({
|
|
263
|
+
type: "text",
|
|
264
|
+
required: true
|
|
265
|
+
})], IntakeAnalysis.prototype, "confidentialScopeId", 2);
|
|
266
|
+
__decorateClass([foreignKey("IntakeItem", { required: true })], IntakeAnalysis.prototype, "itemId", 2);
|
|
267
|
+
__decorateClass([field({
|
|
268
|
+
type: "integer",
|
|
269
|
+
required: true
|
|
270
|
+
})], IntakeAnalysis.prototype, "revision", 2);
|
|
271
|
+
__decorateClass([field({
|
|
272
|
+
type: "integer",
|
|
273
|
+
required: true
|
|
274
|
+
})], IntakeAnalysis.prototype, "fence", 2);
|
|
275
|
+
__decorateClass([field({
|
|
276
|
+
type: "integer",
|
|
277
|
+
required: true
|
|
278
|
+
})], IntakeAnalysis.prototype, "attemptNumber", 2);
|
|
279
|
+
__decorateClass([foreignKey("IntakeAnalysisAttempt", { nullable: true })], IntakeAnalysis.prototype, "currentAttemptId", 2);
|
|
280
|
+
__decorateClass([field({
|
|
281
|
+
type: "text",
|
|
282
|
+
required: true
|
|
283
|
+
})], IntakeAnalysis.prototype, "state", 2);
|
|
284
|
+
__decorateClass([field({
|
|
285
|
+
type: "text",
|
|
286
|
+
required: true
|
|
287
|
+
})], IntakeAnalysis.prototype, "inputDigest", 2);
|
|
288
|
+
__decorateClass([field({
|
|
289
|
+
type: "json",
|
|
290
|
+
required: true
|
|
291
|
+
})], IntakeAnalysis.prototype, "data", 2);
|
|
292
|
+
IntakeAnalysis = __decorateClass([smrt({
|
|
293
|
+
tableName: "intake_analyses",
|
|
294
|
+
conflictColumns: [
|
|
295
|
+
"tenant_id",
|
|
296
|
+
"item_id",
|
|
297
|
+
"revision"
|
|
298
|
+
],
|
|
299
|
+
api: false,
|
|
300
|
+
cli: false,
|
|
301
|
+
mcp: false,
|
|
302
|
+
indexes: [
|
|
303
|
+
{
|
|
304
|
+
name: "intake_analyses_scope_idx",
|
|
305
|
+
columns: ["tenantId", "confidentialScopeId"]
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
name: "intake_analyses_item_idx",
|
|
309
|
+
columns: ["tenantId", "itemId"]
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
name: "intake_analyses_state_idx",
|
|
313
|
+
columns: ["tenantId", "state"]
|
|
314
|
+
}
|
|
315
|
+
]
|
|
316
|
+
}), TenantScoped({ mode: "required" })], IntakeAnalysis);
|
|
317
|
+
var IntakeAnalysisAttempt = class extends SmrtObject {
|
|
318
|
+
tenantId = "";
|
|
319
|
+
confidentialScopeId = "";
|
|
320
|
+
itemId = "";
|
|
321
|
+
analysisId = "";
|
|
322
|
+
attemptNumber = 0;
|
|
323
|
+
fence = 0;
|
|
324
|
+
state = "";
|
|
325
|
+
leaseToken = "";
|
|
326
|
+
leaseUntil = null;
|
|
327
|
+
outputDigest = "";
|
|
328
|
+
safeError = "";
|
|
329
|
+
confidence = null;
|
|
330
|
+
data = "{}";
|
|
331
|
+
/** Parse a bounded object payload; malformed persisted data fails closed. */
|
|
332
|
+
getData() {
|
|
333
|
+
const value = typeof this.data === "string" ? JSON.parse(this.data) : this.data;
|
|
334
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid intake payload");
|
|
335
|
+
return value;
|
|
336
|
+
}
|
|
337
|
+
};
|
|
338
|
+
__publicField(IntakeAnalysisAttempt, "__smrtPackage__", "@happyvertical/smrt-ingestion");
|
|
339
|
+
__decorateClass([tenantId()], IntakeAnalysisAttempt.prototype, "tenantId", 2);
|
|
340
|
+
__decorateClass([field({
|
|
341
|
+
type: "text",
|
|
342
|
+
required: true
|
|
343
|
+
})], IntakeAnalysisAttempt.prototype, "confidentialScopeId", 2);
|
|
344
|
+
__decorateClass([foreignKey("IntakeItem", { required: true })], IntakeAnalysisAttempt.prototype, "itemId", 2);
|
|
345
|
+
__decorateClass([foreignKey("IntakeAnalysis", { required: true })], IntakeAnalysisAttempt.prototype, "analysisId", 2);
|
|
346
|
+
__decorateClass([field({
|
|
347
|
+
type: "integer",
|
|
348
|
+
required: true
|
|
349
|
+
})], IntakeAnalysisAttempt.prototype, "attemptNumber", 2);
|
|
350
|
+
__decorateClass([field({
|
|
351
|
+
type: "integer",
|
|
352
|
+
required: true
|
|
353
|
+
})], IntakeAnalysisAttempt.prototype, "fence", 2);
|
|
354
|
+
__decorateClass([field({
|
|
355
|
+
type: "text",
|
|
356
|
+
required: true
|
|
357
|
+
})], IntakeAnalysisAttempt.prototype, "state", 2);
|
|
358
|
+
__decorateClass([field({
|
|
359
|
+
type: "text",
|
|
360
|
+
required: true
|
|
361
|
+
})], IntakeAnalysisAttempt.prototype, "leaseToken", 2);
|
|
362
|
+
__decorateClass([field({
|
|
363
|
+
type: "datetime",
|
|
364
|
+
nullable: true
|
|
365
|
+
})], IntakeAnalysisAttempt.prototype, "leaseUntil", 2);
|
|
366
|
+
__decorateClass([field({
|
|
367
|
+
type: "text",
|
|
368
|
+
required: true
|
|
369
|
+
})], IntakeAnalysisAttempt.prototype, "outputDigest", 2);
|
|
370
|
+
__decorateClass([field({
|
|
371
|
+
type: "text",
|
|
372
|
+
required: true
|
|
373
|
+
})], IntakeAnalysisAttempt.prototype, "safeError", 2);
|
|
374
|
+
__decorateClass([field({
|
|
375
|
+
type: "decimal",
|
|
376
|
+
nullable: true
|
|
377
|
+
})], IntakeAnalysisAttempt.prototype, "confidence", 2);
|
|
378
|
+
__decorateClass([field({
|
|
379
|
+
type: "json",
|
|
380
|
+
required: true
|
|
381
|
+
})], IntakeAnalysisAttempt.prototype, "data", 2);
|
|
382
|
+
IntakeAnalysisAttempt = __decorateClass([smrt({
|
|
383
|
+
tableName: "intake_analysis_attempts",
|
|
384
|
+
conflictColumns: [
|
|
385
|
+
"tenant_id",
|
|
386
|
+
"analysis_id",
|
|
387
|
+
"attempt_number"
|
|
388
|
+
],
|
|
389
|
+
api: false,
|
|
390
|
+
cli: false,
|
|
391
|
+
mcp: false,
|
|
392
|
+
indexes: [
|
|
393
|
+
{
|
|
394
|
+
name: "intake_analysis_attempts_scope_idx",
|
|
395
|
+
columns: ["tenantId", "confidentialScopeId"]
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
name: "intake_analysis_attempts_item_idx",
|
|
399
|
+
columns: ["tenantId", "itemId"]
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
name: "intake_analysis_attempts_state_idx",
|
|
403
|
+
columns: ["tenantId", "state"]
|
|
404
|
+
}
|
|
405
|
+
]
|
|
406
|
+
}), TenantScoped({ mode: "required" })], IntakeAnalysisAttempt);
|
|
407
|
+
var IntakePlan = class extends SmrtObject {
|
|
408
|
+
tenantId = "";
|
|
409
|
+
confidentialScopeId = "";
|
|
410
|
+
itemId = "";
|
|
411
|
+
planKey = "";
|
|
412
|
+
revision = 0;
|
|
413
|
+
digest = "";
|
|
414
|
+
data = "{}";
|
|
415
|
+
/** Parse a bounded object payload; malformed persisted data fails closed. */
|
|
416
|
+
getData() {
|
|
417
|
+
const value = typeof this.data === "string" ? JSON.parse(this.data) : this.data;
|
|
418
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid intake payload");
|
|
419
|
+
return value;
|
|
420
|
+
}
|
|
421
|
+
};
|
|
422
|
+
__publicField(IntakePlan, "__smrtPackage__", "@happyvertical/smrt-ingestion");
|
|
423
|
+
__decorateClass([tenantId()], IntakePlan.prototype, "tenantId", 2);
|
|
424
|
+
__decorateClass([field({
|
|
425
|
+
type: "text",
|
|
426
|
+
required: true
|
|
427
|
+
})], IntakePlan.prototype, "confidentialScopeId", 2);
|
|
428
|
+
__decorateClass([foreignKey("IntakeItem", { required: true })], IntakePlan.prototype, "itemId", 2);
|
|
429
|
+
__decorateClass([field({
|
|
430
|
+
type: "text",
|
|
431
|
+
required: true
|
|
432
|
+
})], IntakePlan.prototype, "planKey", 2);
|
|
433
|
+
__decorateClass([field({
|
|
434
|
+
type: "integer",
|
|
435
|
+
required: true
|
|
436
|
+
})], IntakePlan.prototype, "revision", 2);
|
|
437
|
+
__decorateClass([field({
|
|
438
|
+
type: "text",
|
|
439
|
+
required: true
|
|
440
|
+
})], IntakePlan.prototype, "digest", 2);
|
|
441
|
+
__decorateClass([field({
|
|
442
|
+
type: "json",
|
|
443
|
+
required: true
|
|
444
|
+
})], IntakePlan.prototype, "data", 2);
|
|
445
|
+
IntakePlan = __decorateClass([smrt({
|
|
446
|
+
tableName: "intake_plans",
|
|
447
|
+
conflictColumns: [
|
|
448
|
+
"tenant_id",
|
|
449
|
+
"item_id",
|
|
450
|
+
"plan_key",
|
|
451
|
+
"revision"
|
|
452
|
+
],
|
|
453
|
+
api: false,
|
|
454
|
+
cli: false,
|
|
455
|
+
mcp: false,
|
|
456
|
+
indexes: [{
|
|
457
|
+
name: "intake_plans_scope_idx",
|
|
458
|
+
columns: ["tenantId", "confidentialScopeId"]
|
|
459
|
+
}, {
|
|
460
|
+
name: "intake_plans_item_idx",
|
|
461
|
+
columns: ["tenantId", "itemId"]
|
|
462
|
+
}]
|
|
463
|
+
}), TenantScoped({ mode: "required" })], IntakePlan);
|
|
464
|
+
var IntakeAction = class extends SmrtObject {
|
|
465
|
+
tenantId = "";
|
|
466
|
+
confidentialScopeId = "";
|
|
467
|
+
itemId = "";
|
|
468
|
+
actionKey = "";
|
|
469
|
+
state = "";
|
|
470
|
+
proposalRevision = 0;
|
|
471
|
+
reviewVersion = 0;
|
|
472
|
+
executionAttempt = 0;
|
|
473
|
+
fence = 0;
|
|
474
|
+
resultDigest = "";
|
|
475
|
+
data = "{}";
|
|
476
|
+
/** Parse a bounded object payload; malformed persisted data fails closed. */
|
|
477
|
+
getData() {
|
|
478
|
+
const value = typeof this.data === "string" ? JSON.parse(this.data) : this.data;
|
|
479
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid intake payload");
|
|
480
|
+
return value;
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
__publicField(IntakeAction, "__smrtPackage__", "@happyvertical/smrt-ingestion");
|
|
484
|
+
__decorateClass([tenantId()], IntakeAction.prototype, "tenantId", 2);
|
|
485
|
+
__decorateClass([field({
|
|
486
|
+
type: "text",
|
|
487
|
+
required: true
|
|
488
|
+
})], IntakeAction.prototype, "confidentialScopeId", 2);
|
|
489
|
+
__decorateClass([foreignKey("IntakeItem", { required: true })], IntakeAction.prototype, "itemId", 2);
|
|
490
|
+
__decorateClass([field({
|
|
491
|
+
type: "text",
|
|
492
|
+
required: true
|
|
493
|
+
})], IntakeAction.prototype, "actionKey", 2);
|
|
494
|
+
__decorateClass([field({
|
|
495
|
+
type: "text",
|
|
496
|
+
required: true
|
|
497
|
+
})], IntakeAction.prototype, "state", 2);
|
|
498
|
+
__decorateClass([field({
|
|
499
|
+
type: "integer",
|
|
500
|
+
required: true
|
|
501
|
+
})], IntakeAction.prototype, "proposalRevision", 2);
|
|
502
|
+
__decorateClass([field({
|
|
503
|
+
type: "integer",
|
|
504
|
+
required: true
|
|
505
|
+
})], IntakeAction.prototype, "reviewVersion", 2);
|
|
506
|
+
__decorateClass([field({
|
|
507
|
+
type: "integer",
|
|
508
|
+
required: true
|
|
509
|
+
})], IntakeAction.prototype, "executionAttempt", 2);
|
|
510
|
+
__decorateClass([field({
|
|
511
|
+
type: "integer",
|
|
512
|
+
required: true
|
|
513
|
+
})], IntakeAction.prototype, "fence", 2);
|
|
514
|
+
__decorateClass([field({
|
|
515
|
+
type: "text",
|
|
516
|
+
required: true
|
|
517
|
+
})], IntakeAction.prototype, "resultDigest", 2);
|
|
518
|
+
__decorateClass([field({
|
|
519
|
+
type: "json",
|
|
520
|
+
required: true
|
|
521
|
+
})], IntakeAction.prototype, "data", 2);
|
|
522
|
+
IntakeAction = __decorateClass([smrt({
|
|
523
|
+
tableName: "intake_actions",
|
|
524
|
+
conflictColumns: [
|
|
525
|
+
"tenant_id",
|
|
526
|
+
"item_id",
|
|
527
|
+
"action_key"
|
|
528
|
+
],
|
|
529
|
+
api: false,
|
|
530
|
+
cli: false,
|
|
531
|
+
mcp: false,
|
|
532
|
+
indexes: [
|
|
533
|
+
{
|
|
534
|
+
name: "intake_actions_scope_idx",
|
|
535
|
+
columns: ["tenantId", "confidentialScopeId"]
|
|
536
|
+
},
|
|
537
|
+
{
|
|
538
|
+
name: "intake_actions_item_idx",
|
|
539
|
+
columns: ["tenantId", "itemId"]
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
name: "intake_actions_state_idx",
|
|
543
|
+
columns: ["tenantId", "state"]
|
|
544
|
+
}
|
|
545
|
+
]
|
|
546
|
+
}), TenantScoped({ mode: "required" })], IntakeAction);
|
|
547
|
+
var IntakeProposal = class extends SmrtObject {
|
|
548
|
+
tenantId = "";
|
|
549
|
+
confidentialScopeId = "";
|
|
550
|
+
itemId = "";
|
|
551
|
+
actionId = "";
|
|
552
|
+
analysisId = "";
|
|
553
|
+
analysisAttemptId = "";
|
|
554
|
+
revision = 0;
|
|
555
|
+
bindingHash = "";
|
|
556
|
+
data = "{}";
|
|
557
|
+
/** Parse a bounded object payload; malformed persisted data fails closed. */
|
|
558
|
+
getData() {
|
|
559
|
+
const value = typeof this.data === "string" ? JSON.parse(this.data) : this.data;
|
|
560
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid intake payload");
|
|
561
|
+
return value;
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
__publicField(IntakeProposal, "__smrtPackage__", "@happyvertical/smrt-ingestion");
|
|
565
|
+
__decorateClass([tenantId()], IntakeProposal.prototype, "tenantId", 2);
|
|
566
|
+
__decorateClass([field({
|
|
567
|
+
type: "text",
|
|
568
|
+
required: true
|
|
569
|
+
})], IntakeProposal.prototype, "confidentialScopeId", 2);
|
|
570
|
+
__decorateClass([foreignKey("IntakeItem", { required: true })], IntakeProposal.prototype, "itemId", 2);
|
|
571
|
+
__decorateClass([foreignKey("IntakeAction", { required: true })], IntakeProposal.prototype, "actionId", 2);
|
|
572
|
+
__decorateClass([foreignKey("IntakeAnalysis", { required: true })], IntakeProposal.prototype, "analysisId", 2);
|
|
573
|
+
__decorateClass([foreignKey("IntakeAnalysisAttempt", { required: true })], IntakeProposal.prototype, "analysisAttemptId", 2);
|
|
574
|
+
__decorateClass([field({
|
|
575
|
+
type: "integer",
|
|
576
|
+
required: true
|
|
577
|
+
})], IntakeProposal.prototype, "revision", 2);
|
|
578
|
+
__decorateClass([field({
|
|
579
|
+
type: "text",
|
|
580
|
+
required: true
|
|
581
|
+
})], IntakeProposal.prototype, "bindingHash", 2);
|
|
582
|
+
__decorateClass([field({
|
|
583
|
+
type: "json",
|
|
584
|
+
required: true
|
|
585
|
+
})], IntakeProposal.prototype, "data", 2);
|
|
586
|
+
IntakeProposal = __decorateClass([smrt({
|
|
587
|
+
tableName: "intake_proposals",
|
|
588
|
+
conflictColumns: [
|
|
589
|
+
"tenant_id",
|
|
590
|
+
"action_id",
|
|
591
|
+
"revision"
|
|
592
|
+
],
|
|
593
|
+
api: false,
|
|
594
|
+
cli: false,
|
|
595
|
+
mcp: false,
|
|
596
|
+
indexes: [{
|
|
597
|
+
name: "intake_proposals_scope_idx",
|
|
598
|
+
columns: ["tenantId", "confidentialScopeId"]
|
|
599
|
+
}, {
|
|
600
|
+
name: "intake_proposals_item_idx",
|
|
601
|
+
columns: ["tenantId", "itemId"]
|
|
602
|
+
}]
|
|
603
|
+
}), TenantScoped({ mode: "required" })], IntakeProposal);
|
|
604
|
+
var IntakeReviewDecision = class extends SmrtObject {
|
|
605
|
+
tenantId = "";
|
|
606
|
+
confidentialScopeId = "";
|
|
607
|
+
itemId = "";
|
|
608
|
+
actionId = "";
|
|
609
|
+
proposalId = "";
|
|
610
|
+
reviewVersion = 0;
|
|
611
|
+
bindingHash = "";
|
|
612
|
+
decision = "";
|
|
613
|
+
data = "{}";
|
|
614
|
+
/** Parse a bounded object payload; malformed persisted data fails closed. */
|
|
615
|
+
getData() {
|
|
616
|
+
const value = typeof this.data === "string" ? JSON.parse(this.data) : this.data;
|
|
617
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid intake payload");
|
|
618
|
+
return value;
|
|
619
|
+
}
|
|
620
|
+
};
|
|
621
|
+
__publicField(IntakeReviewDecision, "__smrtPackage__", "@happyvertical/smrt-ingestion");
|
|
622
|
+
__decorateClass([tenantId()], IntakeReviewDecision.prototype, "tenantId", 2);
|
|
623
|
+
__decorateClass([field({
|
|
624
|
+
type: "text",
|
|
625
|
+
required: true
|
|
626
|
+
})], IntakeReviewDecision.prototype, "confidentialScopeId", 2);
|
|
627
|
+
__decorateClass([foreignKey("IntakeItem", { required: true })], IntakeReviewDecision.prototype, "itemId", 2);
|
|
628
|
+
__decorateClass([foreignKey("IntakeAction", { required: true })], IntakeReviewDecision.prototype, "actionId", 2);
|
|
629
|
+
__decorateClass([foreignKey("IntakeProposal", { required: true })], IntakeReviewDecision.prototype, "proposalId", 2);
|
|
630
|
+
__decorateClass([field({
|
|
631
|
+
type: "integer",
|
|
632
|
+
required: true
|
|
633
|
+
})], IntakeReviewDecision.prototype, "reviewVersion", 2);
|
|
634
|
+
__decorateClass([field({
|
|
635
|
+
type: "text",
|
|
636
|
+
required: true
|
|
637
|
+
})], IntakeReviewDecision.prototype, "bindingHash", 2);
|
|
638
|
+
__decorateClass([field({
|
|
639
|
+
type: "text",
|
|
640
|
+
required: true
|
|
641
|
+
})], IntakeReviewDecision.prototype, "decision", 2);
|
|
642
|
+
__decorateClass([field({
|
|
643
|
+
type: "json",
|
|
644
|
+
required: true
|
|
645
|
+
})], IntakeReviewDecision.prototype, "data", 2);
|
|
646
|
+
IntakeReviewDecision = __decorateClass([smrt({
|
|
647
|
+
tableName: "intake_review_decisions",
|
|
648
|
+
conflictColumns: [
|
|
649
|
+
"tenant_id",
|
|
650
|
+
"action_id",
|
|
651
|
+
"review_version"
|
|
652
|
+
],
|
|
653
|
+
api: false,
|
|
654
|
+
cli: false,
|
|
655
|
+
mcp: false,
|
|
656
|
+
indexes: [{
|
|
657
|
+
name: "intake_review_decisions_scope_idx",
|
|
658
|
+
columns: ["tenantId", "confidentialScopeId"]
|
|
659
|
+
}, {
|
|
660
|
+
name: "intake_review_decisions_item_idx",
|
|
661
|
+
columns: ["tenantId", "itemId"]
|
|
662
|
+
}]
|
|
663
|
+
}), TenantScoped({ mode: "required" })], IntakeReviewDecision);
|
|
664
|
+
var IntakeExecution = class extends SmrtObject {
|
|
665
|
+
tenantId = "";
|
|
666
|
+
confidentialScopeId = "";
|
|
667
|
+
itemId = "";
|
|
668
|
+
actionId = "";
|
|
669
|
+
attemptNumber = 0;
|
|
670
|
+
fence = 0;
|
|
671
|
+
state = "";
|
|
672
|
+
bindingHash = "";
|
|
673
|
+
resultDigest = "";
|
|
674
|
+
idempotencyKey = "";
|
|
675
|
+
data = "{}";
|
|
676
|
+
/** Parse a bounded object payload; malformed persisted data fails closed. */
|
|
677
|
+
getData() {
|
|
678
|
+
const value = typeof this.data === "string" ? JSON.parse(this.data) : this.data;
|
|
679
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid intake payload");
|
|
680
|
+
return value;
|
|
681
|
+
}
|
|
682
|
+
};
|
|
683
|
+
__publicField(IntakeExecution, "__smrtPackage__", "@happyvertical/smrt-ingestion");
|
|
684
|
+
__decorateClass([tenantId()], IntakeExecution.prototype, "tenantId", 2);
|
|
685
|
+
__decorateClass([field({
|
|
686
|
+
type: "text",
|
|
687
|
+
required: true
|
|
688
|
+
})], IntakeExecution.prototype, "confidentialScopeId", 2);
|
|
689
|
+
__decorateClass([foreignKey("IntakeItem", { required: true })], IntakeExecution.prototype, "itemId", 2);
|
|
690
|
+
__decorateClass([foreignKey("IntakeAction", { required: true })], IntakeExecution.prototype, "actionId", 2);
|
|
691
|
+
__decorateClass([field({
|
|
692
|
+
type: "integer",
|
|
693
|
+
required: true
|
|
694
|
+
})], IntakeExecution.prototype, "attemptNumber", 2);
|
|
695
|
+
__decorateClass([field({
|
|
696
|
+
type: "integer",
|
|
697
|
+
required: true
|
|
698
|
+
})], IntakeExecution.prototype, "fence", 2);
|
|
699
|
+
__decorateClass([field({
|
|
700
|
+
type: "text",
|
|
701
|
+
required: true
|
|
702
|
+
})], IntakeExecution.prototype, "state", 2);
|
|
703
|
+
__decorateClass([field({
|
|
704
|
+
type: "text",
|
|
705
|
+
required: true
|
|
706
|
+
})], IntakeExecution.prototype, "bindingHash", 2);
|
|
707
|
+
__decorateClass([field({
|
|
708
|
+
type: "text",
|
|
709
|
+
required: true
|
|
710
|
+
})], IntakeExecution.prototype, "resultDigest", 2);
|
|
711
|
+
__decorateClass([field({
|
|
712
|
+
type: "text",
|
|
713
|
+
required: true
|
|
714
|
+
})], IntakeExecution.prototype, "idempotencyKey", 2);
|
|
715
|
+
__decorateClass([field({
|
|
716
|
+
type: "json",
|
|
717
|
+
required: true
|
|
718
|
+
})], IntakeExecution.prototype, "data", 2);
|
|
719
|
+
IntakeExecution = __decorateClass([smrt({
|
|
720
|
+
tableName: "intake_executions",
|
|
721
|
+
conflictColumns: [
|
|
722
|
+
"tenant_id",
|
|
723
|
+
"action_id",
|
|
724
|
+
"attempt_number"
|
|
725
|
+
],
|
|
726
|
+
api: false,
|
|
727
|
+
cli: false,
|
|
728
|
+
mcp: false,
|
|
729
|
+
indexes: [
|
|
730
|
+
{
|
|
731
|
+
name: "intake_executions_scope_idx",
|
|
732
|
+
columns: ["tenantId", "confidentialScopeId"]
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
name: "intake_executions_item_idx",
|
|
736
|
+
columns: ["tenantId", "itemId"]
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
name: "intake_executions_state_idx",
|
|
740
|
+
columns: ["tenantId", "state"]
|
|
741
|
+
}
|
|
742
|
+
]
|
|
743
|
+
}), TenantScoped({ mode: "required" })], IntakeExecution);
|
|
744
|
+
var IntakeFeedback = class extends SmrtObject {
|
|
745
|
+
tenantId = "";
|
|
746
|
+
confidentialScopeId = "";
|
|
747
|
+
itemId = "";
|
|
748
|
+
requestKey = "";
|
|
749
|
+
supersedesId = null;
|
|
750
|
+
kind = "";
|
|
751
|
+
data = "{}";
|
|
752
|
+
/** Parse a bounded object payload; malformed persisted data fails closed. */
|
|
753
|
+
getData() {
|
|
754
|
+
const value = typeof this.data === "string" ? JSON.parse(this.data) : this.data;
|
|
755
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid intake payload");
|
|
756
|
+
return value;
|
|
757
|
+
}
|
|
758
|
+
};
|
|
759
|
+
__publicField(IntakeFeedback, "__smrtPackage__", "@happyvertical/smrt-ingestion");
|
|
760
|
+
__decorateClass([tenantId()], IntakeFeedback.prototype, "tenantId", 2);
|
|
761
|
+
__decorateClass([field({
|
|
762
|
+
type: "text",
|
|
763
|
+
required: true
|
|
764
|
+
})], IntakeFeedback.prototype, "confidentialScopeId", 2);
|
|
765
|
+
__decorateClass([foreignKey("IntakeItem", { required: true })], IntakeFeedback.prototype, "itemId", 2);
|
|
766
|
+
__decorateClass([field({
|
|
767
|
+
type: "text",
|
|
768
|
+
required: true
|
|
769
|
+
})], IntakeFeedback.prototype, "requestKey", 2);
|
|
770
|
+
__decorateClass([foreignKey("IntakeFeedback", { nullable: true })], IntakeFeedback.prototype, "supersedesId", 2);
|
|
771
|
+
__decorateClass([field({
|
|
772
|
+
type: "text",
|
|
773
|
+
required: true
|
|
774
|
+
})], IntakeFeedback.prototype, "kind", 2);
|
|
775
|
+
__decorateClass([field({
|
|
776
|
+
type: "json",
|
|
777
|
+
required: true
|
|
778
|
+
})], IntakeFeedback.prototype, "data", 2);
|
|
779
|
+
IntakeFeedback = __decorateClass([smrt({
|
|
780
|
+
tableName: "intake_feedback",
|
|
781
|
+
conflictColumns: [
|
|
782
|
+
"tenant_id",
|
|
783
|
+
"item_id",
|
|
784
|
+
"request_key"
|
|
785
|
+
],
|
|
786
|
+
api: false,
|
|
787
|
+
cli: false,
|
|
788
|
+
mcp: false,
|
|
789
|
+
indexes: [{
|
|
790
|
+
name: "intake_feedback_scope_idx",
|
|
791
|
+
columns: ["tenantId", "confidentialScopeId"]
|
|
792
|
+
}, {
|
|
793
|
+
name: "intake_feedback_item_idx",
|
|
794
|
+
columns: ["tenantId", "itemId"]
|
|
795
|
+
}]
|
|
796
|
+
}), TenantScoped({ mode: "required" })], IntakeFeedback);
|
|
797
|
+
var IntakeDispatch = class extends SmrtObject {
|
|
798
|
+
tenantId = "";
|
|
799
|
+
confidentialScopeId = "";
|
|
800
|
+
itemId = "";
|
|
801
|
+
stage = "";
|
|
802
|
+
revision = 0;
|
|
803
|
+
state = "";
|
|
804
|
+
jobId = "";
|
|
805
|
+
deliveries = 0;
|
|
806
|
+
data = "{}";
|
|
807
|
+
/** Parse a bounded object payload; malformed persisted data fails closed. */
|
|
808
|
+
getData() {
|
|
809
|
+
const value = typeof this.data === "string" ? JSON.parse(this.data) : this.data;
|
|
810
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid intake payload");
|
|
811
|
+
return value;
|
|
812
|
+
}
|
|
813
|
+
};
|
|
814
|
+
__publicField(IntakeDispatch, "__smrtPackage__", "@happyvertical/smrt-ingestion");
|
|
815
|
+
__decorateClass([tenantId()], IntakeDispatch.prototype, "tenantId", 2);
|
|
816
|
+
__decorateClass([field({
|
|
817
|
+
type: "text",
|
|
818
|
+
required: true
|
|
819
|
+
})], IntakeDispatch.prototype, "confidentialScopeId", 2);
|
|
820
|
+
__decorateClass([foreignKey("IntakeItem", { required: true })], IntakeDispatch.prototype, "itemId", 2);
|
|
821
|
+
__decorateClass([field({
|
|
822
|
+
type: "text",
|
|
823
|
+
required: true
|
|
824
|
+
})], IntakeDispatch.prototype, "stage", 2);
|
|
825
|
+
__decorateClass([field({
|
|
826
|
+
type: "integer",
|
|
827
|
+
required: true
|
|
828
|
+
})], IntakeDispatch.prototype, "revision", 2);
|
|
829
|
+
__decorateClass([field({
|
|
830
|
+
type: "text",
|
|
831
|
+
required: true
|
|
832
|
+
})], IntakeDispatch.prototype, "state", 2);
|
|
833
|
+
__decorateClass([field({
|
|
834
|
+
type: "text",
|
|
835
|
+
required: true
|
|
836
|
+
})], IntakeDispatch.prototype, "jobId", 2);
|
|
837
|
+
__decorateClass([field({
|
|
838
|
+
type: "integer",
|
|
839
|
+
required: true
|
|
840
|
+
})], IntakeDispatch.prototype, "deliveries", 2);
|
|
841
|
+
__decorateClass([field({
|
|
842
|
+
type: "json",
|
|
843
|
+
required: true
|
|
844
|
+
})], IntakeDispatch.prototype, "data", 2);
|
|
845
|
+
IntakeDispatch = __decorateClass([smrt({
|
|
846
|
+
tableName: "intake_dispatches",
|
|
847
|
+
conflictColumns: [
|
|
848
|
+
"tenant_id",
|
|
849
|
+
"item_id",
|
|
850
|
+
"stage",
|
|
851
|
+
"revision"
|
|
852
|
+
],
|
|
853
|
+
api: false,
|
|
854
|
+
cli: false,
|
|
855
|
+
mcp: false,
|
|
856
|
+
indexes: [
|
|
857
|
+
{
|
|
858
|
+
name: "intake_dispatches_scope_idx",
|
|
859
|
+
columns: ["tenantId", "confidentialScopeId"]
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
name: "intake_dispatches_item_idx",
|
|
863
|
+
columns: ["tenantId", "itemId"]
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
name: "intake_dispatches_state_idx",
|
|
867
|
+
columns: ["tenantId", "state"]
|
|
868
|
+
}
|
|
869
|
+
]
|
|
870
|
+
}), TenantScoped({ mode: "required" })], IntakeDispatch);
|
|
871
|
+
var IntakeDeletion = class extends SmrtObject {
|
|
872
|
+
tenantId = "";
|
|
873
|
+
confidentialScopeId = "";
|
|
874
|
+
itemId = "";
|
|
875
|
+
state = "";
|
|
876
|
+
data = "{}";
|
|
877
|
+
/** Parse a bounded object payload; malformed persisted data fails closed. */
|
|
878
|
+
getData() {
|
|
879
|
+
const value = typeof this.data === "string" ? JSON.parse(this.data) : this.data;
|
|
880
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) throw new Error("Invalid intake payload");
|
|
881
|
+
return value;
|
|
882
|
+
}
|
|
883
|
+
};
|
|
884
|
+
__publicField(IntakeDeletion, "__smrtPackage__", "@happyvertical/smrt-ingestion");
|
|
885
|
+
__decorateClass([tenantId()], IntakeDeletion.prototype, "tenantId", 2);
|
|
886
|
+
__decorateClass([field({
|
|
887
|
+
type: "text",
|
|
888
|
+
required: true
|
|
889
|
+
})], IntakeDeletion.prototype, "confidentialScopeId", 2);
|
|
890
|
+
__decorateClass([foreignKey("IntakeItem", { required: true })], IntakeDeletion.prototype, "itemId", 2);
|
|
891
|
+
__decorateClass([field({
|
|
892
|
+
type: "text",
|
|
893
|
+
required: true
|
|
894
|
+
})], IntakeDeletion.prototype, "state", 2);
|
|
895
|
+
__decorateClass([field({
|
|
896
|
+
type: "json",
|
|
897
|
+
required: true
|
|
898
|
+
})], IntakeDeletion.prototype, "data", 2);
|
|
899
|
+
IntakeDeletion = __decorateClass([smrt({
|
|
900
|
+
tableName: "intake_deletions",
|
|
901
|
+
conflictColumns: ["tenant_id", "item_id"],
|
|
902
|
+
api: false,
|
|
903
|
+
cli: false,
|
|
904
|
+
mcp: false,
|
|
905
|
+
indexes: [
|
|
906
|
+
{
|
|
907
|
+
name: "intake_deletions_scope_idx",
|
|
908
|
+
columns: ["tenantId", "confidentialScopeId"]
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
name: "intake_deletions_item_idx",
|
|
912
|
+
columns: ["tenantId", "itemId"]
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
name: "intake_deletions_state_idx",
|
|
916
|
+
columns: ["tenantId", "state"]
|
|
917
|
+
}
|
|
918
|
+
]
|
|
919
|
+
}), TenantScoped({ mode: "required" })], IntakeDeletion);
|
|
920
|
+
//#endregion
|
|
921
|
+
export { IntakeAction, IntakeAnalysis, IntakeAnalysisAttempt, IntakeDeletion, IntakeDispatch, IntakeEvidence, IntakeExecution, IntakeFeedback, IntakeItem, IntakePlan, IntakeProposal, IntakeReviewDecision };
|
|
922
|
+
|
|
923
|
+
//# sourceMappingURL=models.js.map
|