@happyvertical/smrt-expenses 0.53.6 → 0.54.1

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.
@@ -90,3 +90,7 @@ selection and reselect-file help; Expenses does not duplicate uploads/storage.
90
90
  Validation: `pnpm --filter @happyvertical/smrt-expenses test`, `test:ui`,
91
91
  `test:e2e`, `typecheck`, `build`, and `verify:pack`. PostgreSQL model validation
92
92
  remains in the existing opt-in `test:postgres` lane; this UI does not alter it.
93
+
94
+ `visibleFields` optionally limits the logical `ExpenseDraftValues` fields rendered by `ExpenseForm`. Omitted renders all existing fields; an empty array renders none. Excluded fields do not emit hidden fallbacks, including `correctionReason`; fixed values can be supplied explicitly through `hiddenFields` without duplicate names. This supports policy-fixed payer fields and domain-owned reference selectors. Visibility is presentation, never authority: endpoints must validate every fixed or submitted value. Unknown retained values and validation errors remain visible for included fields.
95
+
96
+ Composition validation: native Svelte SSR contracts cover defaults, omitted fields, retained malformed values, caller identity, no duplicate fixed inputs, correction/read-only/pending behavior. No persistence, transaction, tenant authority or external provider changes occur; those matrix dimensions are N/A for this presentation-only extension. Node26/Svelte5 native POST markup is the supported runtime edge.
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ var __exportAll = (all, no_symbols) => {
17
17
  };
18
18
  //#endregion
19
19
  //#region src/__smrt-register__.ts
20
- ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-expenses\",\"packageVersion\":\"0.53.6\",\"objects\":{\"@happyvertical/smrt-expenses:ExpenseCollection\":{\"name\":\"expensecollection\",\"className\":\"ExpenseCollection\",\"qualifiedName\":\"@happyvertical/smrt-expenses:ExpenseCollection\",\"collection\":\"expenses\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/expenses/src/collections/ExpenseCollection.ts\",\"packageName\":\"@happyvertical/smrt-expenses\",\"fields\":{},\"methods\":{\"forCostObject\":{\"name\":\"forCostObject\",\"async\":true,\"parameters\":[{\"name\":\"costObjectType\",\"type\":\"string\",\"optional\":false},{\"name\":\"costObjectId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Expense[]>\",\"isStatic\":false,\"isPublic\":true},\"totalsByCurrency\":{\"name\":\"totalsByCurrency\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"ExpenseTotalsOptions\",\"optional\":true}],\"returnType\":\"Promise<CurrencyTotals>\",\"isStatic\":false,\"isPublic\":true},\"commitmentPosition\":{\"name\":\"commitmentPosition\",\"async\":true,\"parameters\":[{\"name\":\"commitmentId\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"object\",\"optional\":true,\"memberTypes\":[\"string\"]}],\"returnType\":\"Promise<CommitmentPosition>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"api\":{\"include\":[]},\"mcp\":{\"include\":[]},\"cli\":false,\"tableName\":\"expenses\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"Expense\",\"exportName\":\"ExpenseCollection\",\"collectionExportName\":\"ExpenseCollectionCollection\",\"schema\":{\"tableName\":\"expenses\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"expenses\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"cost_object_type\\\" TEXT,\\n \\\"cost_object_id\\\" TEXT,\\n \\\"category\\\" TEXT,\\n \\\"description\\\" TEXT,\\n \\\"amount\\\" INTEGER,\\n \\\"currency\\\" TEXT,\\n \\\"incurred_on\\\" TEXT,\\n \\\"recorded_at\\\" TIMESTAMP,\\n \\\"recorded_by_profile_id\\\" UUID,\\n \\\"paid_by\\\" TEXT,\\n \\\"paid_by_profile_id\\\" UUID,\\n \\\"vendor_id\\\" UUID,\\n \\\"commitment_id\\\" UUID,\\n \\\"commitment_line_id\\\" UUID,\\n \\\"review_status\\\" TEXT,\\n \\\"reviewed_by_profile_id\\\" UUID,\\n \\\"reviewed_at\\\" TIMESTAMP,\\n \\\"review_note\\\" TEXT,\\n \\\"duplicate_of_id\\\" UUID,\\n \\\"reimbursable\\\" BOOLEAN,\\n \\\"reimbursed_at\\\" TIMESTAMP,\\n \\\"reimbursement_reference\\\" TEXT\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false,\"unique\":false},\"cost_object_type\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"cost_object_id\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"category\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"description\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"amount\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false},\"currency\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"incurred_on\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"recorded_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"recorded_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"paid_by\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"paid_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"vendor_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"commitment_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"commitment_line_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"review_status\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"reviewed_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"reviewed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"review_note\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"duplicate_of_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"expenses\",\"column\":\"id\",\"onDelete\":\"SET NULL\",\"onUpdate\":\"CASCADE\"}},\"reimbursable\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false},\"reimbursed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"reimbursement_reference\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"expenses_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"expenses_cost_object_idx\",\"columns\":[\"tenant_id\",\"cost_object_type\",\"cost_object_id\",\"incurred_on\"]},{\"name\":\"expenses_commitment_review_idx\",\"columns\":[\"tenant_id\",\"commitment_id\",\"review_status\"]},{\"name\":\"expenses_review_status_idx\",\"columns\":[\"tenant_id\",\"review_status\",\"incurred_on\"]},{\"name\":\"expenses_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"expenses_recorded_by_profile_id_idx\",\"columns\":[\"recorded_by_profile_id\"]},{\"name\":\"expenses_paid_by_profile_id_idx\",\"columns\":[\"paid_by_profile_id\"]},{\"name\":\"expenses_vendor_id_idx\",\"columns\":[\"vendor_id\"]},{\"name\":\"expenses_commitment_id_idx\",\"columns\":[\"commitment_id\"]},{\"name\":\"expenses_commitment_line_id_idx\",\"columns\":[\"commitment_line_id\"]},{\"name\":\"expenses_reviewed_by_profile_id_idx\",\"columns\":[\"reviewed_by_profile_id\"]},{\"name\":\"expenses_duplicate_of_id_idx\",\"columns\":[\"duplicate_of_id\"]}],\"version\":\"af101807\"},\"importPath\":\"@happyvertical/smrt-expenses\"},\"@happyvertical/smrt-expenses:ExpenseReceiptCollection\":{\"name\":\"expensereceiptcollection\",\"className\":\"ExpenseReceiptCollection\",\"qualifiedName\":\"@happyvertical/smrt-expenses:ExpenseReceiptCollection\",\"collection\":\"expensereceipts\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/expenses/src/collections/ExpenseReceiptCollection.ts\",\"packageName\":\"@happyvertical/smrt-expenses\",\"fields\":{},\"methods\":{\"byLeft\":{\"name\":\"byLeft\",\"async\":true,\"parameters\":[{\"name\":\"leftId\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"JunctionFilterOptions\",\"optional\":true}],\"returnType\":\"Promise<TItem[]>\",\"isStatic\":false,\"isPublic\":true},\"byRight\":{\"name\":\"byRight\",\"async\":true,\"parameters\":[{\"name\":\"rightId\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"JunctionFilterOptions\",\"optional\":true}],\"returnType\":\"Promise<TItem[]>\",\"isStatic\":false,\"isPublic\":true},\"attach\":{\"name\":\"attach\",\"async\":true,\"parameters\":[{\"name\":\"_expenseId\",\"type\":\"string\",\"optional\":false},{\"name\":\"_assetId\",\"type\":\"string\",\"optional\":false},{\"name\":\"_opts\",\"type\":\"JunctionAttachOptions\",\"optional\":true}],\"returnType\":\"Promise<ExpenseReceipt>\",\"isStatic\":false,\"isPublic\":true},\"detach\":{\"name\":\"detach\",\"async\":true,\"parameters\":[{\"name\":\"leftId\",\"type\":\"string\",\"optional\":false},{\"name\":\"rightId\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"JunctionFilterOptions\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"setLinks\":{\"name\":\"setLinks\",\"async\":true,\"parameters\":[{\"name\":\"_expenseId\",\"type\":\"string\",\"optional\":false},{\"name\":\"_assetIds\",\"type\":\"string[]\",\"optional\":false},{\"name\":\"_opts\",\"type\":\"JunctionAttachOptions\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"attachReceipt\":{\"name\":\"attachReceipt\",\"async\":true,\"parameters\":[{\"name\":\"input\",\"type\":\"AttachReceiptInput\",\"optional\":false}],\"returnType\":\"Promise<ExpenseReceipt>\",\"isStatic\":false,\"isPublic\":true},\"receiptsFor\":{\"name\":\"receiptsFor\",\"async\":true,\"parameters\":[{\"name\":\"expenseId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ExpenseReceipt[]>\",\"isStatic\":false,\"isPublic\":true},\"findDuplicateReceipts\":{\"name\":\"findDuplicateReceipts\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"FindDuplicateReceiptsOptions\",\"optional\":true}],\"returnType\":\"Promise<DuplicateReceiptGroup[]>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"api\":{\"include\":[]},\"mcp\":{\"include\":[]},\"cli\":false,\"tableName\":\"expense_receipts\"},\"extends\":\"SmrtJunction\",\"extendsTypeArg\":\"ExpenseReceipt\",\"exportName\":\"ExpenseReceiptCollection\",\"collectionExportName\":\"ExpenseReceiptCollectionCollection\",\"schema\":{\"tableName\":\"expense_receipts\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"expense_receipts\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"expense_id\\\" UUID NOT NULL,\\n \\\"asset_id\\\" UUID NOT NULL,\\n \\\"uploaded_by_profile_id\\\" UUID,\\n \\\"filename\\\" TEXT,\\n \\\"mime_type\\\" TEXT,\\n \\\"byte_count\\\" INTEGER,\\n \\\"content_sha256\\\" TEXT NOT NULL\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false,\"unique\":false},\"expense_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"expenses\",\"column\":\"id\",\"onDelete\":\"CASCADE\",\"onUpdate\":\"CASCADE\"}},\"asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"uploaded_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"filename\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"mime_type\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"byte_count\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false},\"content_sha256\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false}},\"indexes\":[{\"name\":\"expense_receipts_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"expense_receipts_expense_sha256_key\",\"columns\":[\"expense_id\",\"content_sha256\"],\"unique\":true},{\"name\":\"expense_receipts_tenant_sha256_idx\",\"columns\":[\"tenant_id\",\"content_sha256\"]},{\"name\":\"expense_receipts_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"expense_receipts_asset_id_idx\",\"columns\":[\"asset_id\"]},{\"name\":\"expense_receipts_uploaded_by_profile_id_idx\",\"columns\":[\"uploaded_by_profile_id\"]}],\"version\":\"5aa77571\"},\"importPath\":\"@happyvertical/smrt-expenses\"},\"@happyvertical/smrt-expenses:Expense\":{\"name\":\"expense\",\"className\":\"Expense\",\"qualifiedName\":\"@happyvertical/smrt-expenses:Expense\",\"collection\":\"expenses\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/expenses/src/models/Expense.ts\",\"packageName\":\"@happyvertical/smrt-expenses\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"sqlType\":\"UUID\",\"nullable\":true,\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":false,\"autoPopulate\":true,\"nullable\":true,\"mode\":\"optional\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"costObjectType\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"costObjectId\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"category\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"description\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"amount\":{\"type\":\"integer\",\"required\":false,\"_meta\":{}},\"currency\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"incurredOn\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"recordedAt\":{\"type\":\"datetime\",\"required\":false},\"recordedByProfileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"PROFILE\"},\"paidBy\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"paidByProfileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"PROFILE\"},\"vendorId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-commerce:Vendor\"},\"commitmentId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-commerce:Contract\"},\"commitmentLineId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-commerce:ContractLineItem\"},\"reviewStatus\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"readonly\":true},\"readonly\":true},\"reviewedByProfileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"PROFILE\"},\"reviewedAt\":{\"type\":\"datetime\",\"required\":false,\"_meta\":{\"readonly\":true},\"readonly\":true},\"reviewNote\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"readonly\":true},\"readonly\":true},\"duplicateOfId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"Expense\",\"_meta\":{\"onDelete\":\"SET NULL\"}},\"reimbursable\":{\"type\":\"boolean\",\"required\":false,\"_meta\":{}},\"reimbursedAt\":{\"type\":\"datetime\",\"required\":false},\"reimbursementReference\":{\"type\":\"text\",\"required\":false,\"_meta\":{}}},\"methods\":{\"isReimbursed\":{\"name\":\"isReimbursed\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isCountable\":{\"name\":\"isCountable\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"review\":{\"name\":\"review\",\"async\":true,\"parameters\":[{\"name\":\"input\",\"type\":\"ReviewExpenseInput\",\"optional\":false}],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"reject\":{\"name\":\"reject\",\"async\":true,\"parameters\":[{\"name\":\"input\",\"type\":\"RejectExpenseInput\",\"optional\":false}],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"markDuplicate\":{\"name\":\"markDuplicate\",\"async\":true,\"parameters\":[{\"name\":\"input\",\"type\":\"MarkDuplicateExpenseInput\",\"optional\":false}],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"reopen\":{\"name\":\"reopen\",\"async\":true,\"parameters\":[{\"name\":\"input\",\"type\":\"ReopenExpenseInput\",\"optional\":false}],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"markReimbursed\":{\"name\":\"markReimbursed\",\"async\":true,\"parameters\":[{\"name\":\"input\",\"type\":\"MarkReimbursedInput\",\"optional\":true}],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"getCostObject\":{\"name\":\"getCostObject\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<T | null>\",\"isStatic\":false,\"isPublic\":true},\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"expenses\",\"api\":{\"include\":[]},\"mcp\":{\"include\":[]},\"cli\":false,\"indexes\":[{\"name\":\"expenses_cost_object_idx\",\"columns\":[\"tenantId\",\"costObjectType\",\"costObjectId\",\"incurredOn\"]},{\"name\":\"expenses_commitment_review_idx\",\"columns\":[\"tenantId\",\"commitmentId\",\"reviewStatus\"]},{\"name\":\"expenses_review_status_idx\",\"columns\":[\"tenantId\",\"reviewStatus\",\"incurredOn\"]}],\"tenantScoped\":{\"mode\":\"optional\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"Expense\",\"collectionExportName\":\"ExpenseCollection\",\"schema\":{\"tableName\":\"expenses\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"expenses\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"cost_object_type\\\" TEXT,\\n \\\"cost_object_id\\\" TEXT,\\n \\\"category\\\" TEXT,\\n \\\"description\\\" TEXT,\\n \\\"amount\\\" INTEGER,\\n \\\"currency\\\" TEXT,\\n \\\"incurred_on\\\" TEXT,\\n \\\"recorded_at\\\" TIMESTAMP,\\n \\\"recorded_by_profile_id\\\" UUID,\\n \\\"paid_by\\\" TEXT,\\n \\\"paid_by_profile_id\\\" UUID,\\n \\\"vendor_id\\\" UUID,\\n \\\"commitment_id\\\" UUID,\\n \\\"commitment_line_id\\\" UUID,\\n \\\"review_status\\\" TEXT,\\n \\\"reviewed_by_profile_id\\\" UUID,\\n \\\"reviewed_at\\\" TIMESTAMP,\\n \\\"review_note\\\" TEXT,\\n \\\"duplicate_of_id\\\" UUID,\\n \\\"reimbursable\\\" BOOLEAN,\\n \\\"reimbursed_at\\\" TIMESTAMP,\\n \\\"reimbursement_reference\\\" TEXT\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false,\"unique\":false},\"cost_object_type\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"cost_object_id\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"category\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"description\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"amount\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false},\"currency\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"incurred_on\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"recorded_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"recorded_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"paid_by\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"paid_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"vendor_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"commitment_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"commitment_line_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"review_status\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"reviewed_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"reviewed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"review_note\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"duplicate_of_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"expenses\",\"column\":\"id\",\"onDelete\":\"SET NULL\",\"onUpdate\":\"CASCADE\"}},\"reimbursable\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false},\"reimbursed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"reimbursement_reference\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"expenses_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"expenses_cost_object_idx\",\"columns\":[\"tenant_id\",\"cost_object_type\",\"cost_object_id\",\"incurred_on\"]},{\"name\":\"expenses_commitment_review_idx\",\"columns\":[\"tenant_id\",\"commitment_id\",\"review_status\"]},{\"name\":\"expenses_review_status_idx\",\"columns\":[\"tenant_id\",\"review_status\",\"incurred_on\"]},{\"name\":\"expenses_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"expenses_recorded_by_profile_id_idx\",\"columns\":[\"recorded_by_profile_id\"]},{\"name\":\"expenses_paid_by_profile_id_idx\",\"columns\":[\"paid_by_profile_id\"]},{\"name\":\"expenses_vendor_id_idx\",\"columns\":[\"vendor_id\"]},{\"name\":\"expenses_commitment_id_idx\",\"columns\":[\"commitment_id\"]},{\"name\":\"expenses_commitment_line_id_idx\",\"columns\":[\"commitment_line_id\"]},{\"name\":\"expenses_reviewed_by_profile_id_idx\",\"columns\":[\"reviewed_by_profile_id\"]},{\"name\":\"expenses_duplicate_of_id_idx\",\"columns\":[\"duplicate_of_id\"]}],\"version\":\"af101807\"},\"importPath\":\"@happyvertical/smrt-expenses\"},\"@happyvertical/smrt-expenses:ExpenseReceipt\":{\"name\":\"expensereceipt\",\"className\":\"ExpenseReceipt\",\"qualifiedName\":\"@happyvertical/smrt-expenses:ExpenseReceipt\",\"collection\":\"expensereceipts\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/expenses/src/models/ExpenseReceipt.ts\",\"packageName\":\"@happyvertical/smrt-expenses\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"sqlType\":\"UUID\",\"nullable\":true,\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":false,\"autoPopulate\":true,\"nullable\":true,\"mode\":\"optional\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"expenseId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"Expense\",\"_meta\":{\"required\":true,\"onDelete\":\"CASCADE\"}},\"assetId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-assets:Asset\"},\"uploadedByProfileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-profiles:Profile\"},\"filename\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"mimeType\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"byteCount\":{\"type\":\"integer\",\"required\":false,\"_meta\":{}},\"contentSha256\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"required\":true}}},\"methods\":{\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"expense_receipts\",\"api\":{\"include\":[]},\"mcp\":{\"include\":[]},\"cli\":false,\"indexes\":[{\"name\":\"expense_receipts_expense_sha256_key\",\"columns\":[\"expenseId\",\"contentSha256\"],\"unique\":true},{\"name\":\"expense_receipts_tenant_sha256_idx\",\"columns\":[\"tenantId\",\"contentSha256\"]}],\"tenantScoped\":{\"mode\":\"optional\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"ExpenseReceipt\",\"collectionExportName\":\"ExpenseReceiptCollection\",\"validationRules\":[{\"field\":\"expenseId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"},{\"field\":\"assetId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"contentSha256\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"expense_receipts\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"expense_receipts\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"expense_id\\\" UUID NOT NULL,\\n \\\"asset_id\\\" UUID NOT NULL,\\n \\\"uploaded_by_profile_id\\\" UUID,\\n \\\"filename\\\" TEXT,\\n \\\"mime_type\\\" TEXT,\\n \\\"byte_count\\\" INTEGER,\\n \\\"content_sha256\\\" TEXT NOT NULL\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false,\"unique\":false},\"expense_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"expenses\",\"column\":\"id\",\"onDelete\":\"CASCADE\",\"onUpdate\":\"CASCADE\"}},\"asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"uploaded_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"filename\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"mime_type\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"byte_count\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false},\"content_sha256\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false}},\"indexes\":[{\"name\":\"expense_receipts_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"expense_receipts_expense_sha256_key\",\"columns\":[\"expense_id\",\"content_sha256\"],\"unique\":true},{\"name\":\"expense_receipts_tenant_sha256_idx\",\"columns\":[\"tenant_id\",\"content_sha256\"]},{\"name\":\"expense_receipts_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"expense_receipts_asset_id_idx\",\"columns\":[\"asset_id\"]},{\"name\":\"expense_receipts_uploaded_by_profile_id_idx\",\"columns\":[\"uploaded_by_profile_id\"]}],\"version\":\"5aa77571\"},\"importPath\":\"@happyvertical/smrt-expenses\"}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-assets\",\"@happyvertical/smrt-commerce\",\"@happyvertical/smrt-core\",\"@happyvertical/smrt-tenancy\"]}"));
20
+ ObjectRegistry.registerPackageManifest(JSON.parse("{\"version\":\"1.0.0\",\"timestamp\":0,\"packageName\":\"@happyvertical/smrt-expenses\",\"packageVersion\":\"0.54.1\",\"objects\":{\"@happyvertical/smrt-expenses:ExpenseCollection\":{\"name\":\"expensecollection\",\"className\":\"ExpenseCollection\",\"qualifiedName\":\"@happyvertical/smrt-expenses:ExpenseCollection\",\"collection\":\"expenses\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/expenses/src/collections/ExpenseCollection.ts\",\"packageName\":\"@happyvertical/smrt-expenses\",\"fields\":{},\"methods\":{\"forCostObject\":{\"name\":\"forCostObject\",\"async\":true,\"parameters\":[{\"name\":\"costObjectType\",\"type\":\"string\",\"optional\":false},{\"name\":\"costObjectId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<Expense[]>\",\"isStatic\":false,\"isPublic\":true},\"totalsByCurrency\":{\"name\":\"totalsByCurrency\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"ExpenseTotalsOptions\",\"optional\":true}],\"returnType\":\"Promise<CurrencyTotals>\",\"isStatic\":false,\"isPublic\":true},\"commitmentPosition\":{\"name\":\"commitmentPosition\",\"async\":true,\"parameters\":[{\"name\":\"commitmentId\",\"type\":\"string\",\"optional\":false},{\"name\":\"options\",\"type\":\"object\",\"optional\":true,\"memberTypes\":[\"string\"]}],\"returnType\":\"Promise<CommitmentPosition>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"api\":{\"include\":[]},\"mcp\":{\"include\":[]},\"cli\":false,\"tableName\":\"expenses\"},\"extends\":\"SmrtCollection\",\"extendsTypeArg\":\"Expense\",\"exportName\":\"ExpenseCollection\",\"collectionExportName\":\"ExpenseCollectionCollection\",\"schema\":{\"tableName\":\"expenses\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"expenses\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"cost_object_type\\\" TEXT,\\n \\\"cost_object_id\\\" TEXT,\\n \\\"category\\\" TEXT,\\n \\\"description\\\" TEXT,\\n \\\"amount\\\" INTEGER,\\n \\\"currency\\\" TEXT,\\n \\\"incurred_on\\\" TEXT,\\n \\\"recorded_at\\\" TIMESTAMP,\\n \\\"recorded_by_profile_id\\\" UUID,\\n \\\"paid_by\\\" TEXT,\\n \\\"paid_by_profile_id\\\" UUID,\\n \\\"vendor_id\\\" UUID,\\n \\\"commitment_id\\\" UUID,\\n \\\"commitment_line_id\\\" UUID,\\n \\\"review_status\\\" TEXT,\\n \\\"reviewed_by_profile_id\\\" UUID,\\n \\\"reviewed_at\\\" TIMESTAMP,\\n \\\"review_note\\\" TEXT,\\n \\\"duplicate_of_id\\\" UUID,\\n \\\"reimbursable\\\" BOOLEAN,\\n \\\"reimbursed_at\\\" TIMESTAMP,\\n \\\"reimbursement_reference\\\" TEXT\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false,\"unique\":false},\"cost_object_type\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"cost_object_id\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"category\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"description\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"amount\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false},\"currency\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"incurred_on\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"recorded_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"recorded_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"paid_by\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"paid_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"vendor_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"commitment_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"commitment_line_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"review_status\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"reviewed_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"reviewed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"review_note\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"duplicate_of_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"expenses\",\"column\":\"id\",\"onDelete\":\"SET NULL\",\"onUpdate\":\"CASCADE\"}},\"reimbursable\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false},\"reimbursed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"reimbursement_reference\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"expenses_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"expenses_cost_object_idx\",\"columns\":[\"tenant_id\",\"cost_object_type\",\"cost_object_id\",\"incurred_on\"]},{\"name\":\"expenses_commitment_review_idx\",\"columns\":[\"tenant_id\",\"commitment_id\",\"review_status\"]},{\"name\":\"expenses_review_status_idx\",\"columns\":[\"tenant_id\",\"review_status\",\"incurred_on\"]},{\"name\":\"expenses_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"expenses_recorded_by_profile_id_idx\",\"columns\":[\"recorded_by_profile_id\"]},{\"name\":\"expenses_paid_by_profile_id_idx\",\"columns\":[\"paid_by_profile_id\"]},{\"name\":\"expenses_vendor_id_idx\",\"columns\":[\"vendor_id\"]},{\"name\":\"expenses_commitment_id_idx\",\"columns\":[\"commitment_id\"]},{\"name\":\"expenses_commitment_line_id_idx\",\"columns\":[\"commitment_line_id\"]},{\"name\":\"expenses_reviewed_by_profile_id_idx\",\"columns\":[\"reviewed_by_profile_id\"]},{\"name\":\"expenses_duplicate_of_id_idx\",\"columns\":[\"duplicate_of_id\"]}],\"version\":\"af101807\"},\"importPath\":\"@happyvertical/smrt-expenses\"},\"@happyvertical/smrt-expenses:ExpenseReceiptCollection\":{\"name\":\"expensereceiptcollection\",\"className\":\"ExpenseReceiptCollection\",\"qualifiedName\":\"@happyvertical/smrt-expenses:ExpenseReceiptCollection\",\"collection\":\"expensereceipts\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/expenses/src/collections/ExpenseReceiptCollection.ts\",\"packageName\":\"@happyvertical/smrt-expenses\",\"fields\":{},\"methods\":{\"byLeft\":{\"name\":\"byLeft\",\"async\":true,\"parameters\":[{\"name\":\"leftId\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"JunctionFilterOptions\",\"optional\":true}],\"returnType\":\"Promise<TItem[]>\",\"isStatic\":false,\"isPublic\":true},\"byRight\":{\"name\":\"byRight\",\"async\":true,\"parameters\":[{\"name\":\"rightId\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"JunctionFilterOptions\",\"optional\":true}],\"returnType\":\"Promise<TItem[]>\",\"isStatic\":false,\"isPublic\":true},\"attach\":{\"name\":\"attach\",\"async\":true,\"parameters\":[{\"name\":\"_expenseId\",\"type\":\"string\",\"optional\":false},{\"name\":\"_assetId\",\"type\":\"string\",\"optional\":false},{\"name\":\"_opts\",\"type\":\"JunctionAttachOptions\",\"optional\":true}],\"returnType\":\"Promise<ExpenseReceipt>\",\"isStatic\":false,\"isPublic\":true},\"detach\":{\"name\":\"detach\",\"async\":true,\"parameters\":[{\"name\":\"leftId\",\"type\":\"string\",\"optional\":false},{\"name\":\"rightId\",\"type\":\"string\",\"optional\":false},{\"name\":\"opts\",\"type\":\"JunctionFilterOptions\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"setLinks\":{\"name\":\"setLinks\",\"async\":true,\"parameters\":[{\"name\":\"_expenseId\",\"type\":\"string\",\"optional\":false},{\"name\":\"_assetIds\",\"type\":\"string[]\",\"optional\":false},{\"name\":\"_opts\",\"type\":\"JunctionAttachOptions\",\"optional\":true}],\"returnType\":\"Promise<void>\",\"isStatic\":false,\"isPublic\":true},\"attachReceipt\":{\"name\":\"attachReceipt\",\"async\":true,\"parameters\":[{\"name\":\"input\",\"type\":\"AttachReceiptInput\",\"optional\":false}],\"returnType\":\"Promise<ExpenseReceipt>\",\"isStatic\":false,\"isPublic\":true},\"receiptsFor\":{\"name\":\"receiptsFor\",\"async\":true,\"parameters\":[{\"name\":\"expenseId\",\"type\":\"string\",\"optional\":false}],\"returnType\":\"Promise<ExpenseReceipt[]>\",\"isStatic\":false,\"isPublic\":true},\"findDuplicateReceipts\":{\"name\":\"findDuplicateReceipts\",\"async\":true,\"parameters\":[{\"name\":\"options\",\"type\":\"FindDuplicateReceiptsOptions\",\"optional\":true}],\"returnType\":\"Promise<DuplicateReceiptGroup[]>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"api\":{\"include\":[]},\"mcp\":{\"include\":[]},\"cli\":false,\"tableName\":\"expense_receipts\"},\"extends\":\"SmrtJunction\",\"extendsTypeArg\":\"ExpenseReceipt\",\"exportName\":\"ExpenseReceiptCollection\",\"collectionExportName\":\"ExpenseReceiptCollectionCollection\",\"schema\":{\"tableName\":\"expense_receipts\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"expense_receipts\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"expense_id\\\" UUID NOT NULL,\\n \\\"asset_id\\\" UUID NOT NULL,\\n \\\"uploaded_by_profile_id\\\" UUID,\\n \\\"filename\\\" TEXT,\\n \\\"mime_type\\\" TEXT,\\n \\\"byte_count\\\" INTEGER,\\n \\\"content_sha256\\\" TEXT NOT NULL\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false,\"unique\":false},\"expense_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"expenses\",\"column\":\"id\",\"onDelete\":\"CASCADE\",\"onUpdate\":\"CASCADE\"}},\"asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"uploaded_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"filename\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"mime_type\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"byte_count\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false},\"content_sha256\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false}},\"indexes\":[{\"name\":\"expense_receipts_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"expense_receipts_expense_sha256_key\",\"columns\":[\"expense_id\",\"content_sha256\"],\"unique\":true},{\"name\":\"expense_receipts_tenant_sha256_idx\",\"columns\":[\"tenant_id\",\"content_sha256\"]},{\"name\":\"expense_receipts_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"expense_receipts_asset_id_idx\",\"columns\":[\"asset_id\"]},{\"name\":\"expense_receipts_uploaded_by_profile_id_idx\",\"columns\":[\"uploaded_by_profile_id\"]}],\"version\":\"5aa77571\"},\"importPath\":\"@happyvertical/smrt-expenses\"},\"@happyvertical/smrt-expenses:Expense\":{\"name\":\"expense\",\"className\":\"Expense\",\"qualifiedName\":\"@happyvertical/smrt-expenses:Expense\",\"collection\":\"expenses\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/expenses/src/models/Expense.ts\",\"packageName\":\"@happyvertical/smrt-expenses\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"sqlType\":\"UUID\",\"nullable\":true,\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":false,\"autoPopulate\":true,\"nullable\":true,\"mode\":\"optional\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"costObjectType\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"costObjectId\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"category\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"description\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"amount\":{\"type\":\"integer\",\"required\":false,\"_meta\":{}},\"currency\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"incurredOn\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"recordedAt\":{\"type\":\"datetime\",\"required\":false},\"recordedByProfileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"PROFILE\"},\"paidBy\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"paidByProfileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"PROFILE\"},\"vendorId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-commerce:Vendor\"},\"commitmentId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-commerce:Contract\"},\"commitmentLineId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-commerce:ContractLineItem\"},\"reviewStatus\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"readonly\":true},\"readonly\":true},\"reviewedByProfileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"PROFILE\"},\"reviewedAt\":{\"type\":\"datetime\",\"required\":false,\"_meta\":{\"readonly\":true},\"readonly\":true},\"reviewNote\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"readonly\":true},\"readonly\":true},\"duplicateOfId\":{\"type\":\"foreignKey\",\"required\":false,\"related\":\"Expense\",\"_meta\":{\"onDelete\":\"SET NULL\"}},\"reimbursable\":{\"type\":\"boolean\",\"required\":false,\"_meta\":{}},\"reimbursedAt\":{\"type\":\"datetime\",\"required\":false},\"reimbursementReference\":{\"type\":\"text\",\"required\":false,\"_meta\":{}}},\"methods\":{\"isReimbursed\":{\"name\":\"isReimbursed\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"isCountable\":{\"name\":\"isCountable\",\"async\":false,\"parameters\":[],\"returnType\":\"boolean\",\"isStatic\":false,\"isPublic\":true},\"review\":{\"name\":\"review\",\"async\":true,\"parameters\":[{\"name\":\"input\",\"type\":\"ReviewExpenseInput\",\"optional\":false}],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"reject\":{\"name\":\"reject\",\"async\":true,\"parameters\":[{\"name\":\"input\",\"type\":\"RejectExpenseInput\",\"optional\":false}],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"markDuplicate\":{\"name\":\"markDuplicate\",\"async\":true,\"parameters\":[{\"name\":\"input\",\"type\":\"MarkDuplicateExpenseInput\",\"optional\":false}],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"reopen\":{\"name\":\"reopen\",\"async\":true,\"parameters\":[{\"name\":\"input\",\"type\":\"ReopenExpenseInput\",\"optional\":false}],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"markReimbursed\":{\"name\":\"markReimbursed\",\"async\":true,\"parameters\":[{\"name\":\"input\",\"type\":\"MarkReimbursedInput\",\"optional\":true}],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true},\"getCostObject\":{\"name\":\"getCostObject\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<T | null>\",\"isStatic\":false,\"isPublic\":true},\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"expenses\",\"api\":{\"include\":[]},\"mcp\":{\"include\":[]},\"cli\":false,\"indexes\":[{\"name\":\"expenses_cost_object_idx\",\"columns\":[\"tenantId\",\"costObjectType\",\"costObjectId\",\"incurredOn\"]},{\"name\":\"expenses_commitment_review_idx\",\"columns\":[\"tenantId\",\"commitmentId\",\"reviewStatus\"]},{\"name\":\"expenses_review_status_idx\",\"columns\":[\"tenantId\",\"reviewStatus\",\"incurredOn\"]}],\"tenantScoped\":{\"mode\":\"optional\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"Expense\",\"collectionExportName\":\"ExpenseCollection\",\"schema\":{\"tableName\":\"expenses\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"expenses\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"cost_object_type\\\" TEXT,\\n \\\"cost_object_id\\\" TEXT,\\n \\\"category\\\" TEXT,\\n \\\"description\\\" TEXT,\\n \\\"amount\\\" INTEGER,\\n \\\"currency\\\" TEXT,\\n \\\"incurred_on\\\" TEXT,\\n \\\"recorded_at\\\" TIMESTAMP,\\n \\\"recorded_by_profile_id\\\" UUID,\\n \\\"paid_by\\\" TEXT,\\n \\\"paid_by_profile_id\\\" UUID,\\n \\\"vendor_id\\\" UUID,\\n \\\"commitment_id\\\" UUID,\\n \\\"commitment_line_id\\\" UUID,\\n \\\"review_status\\\" TEXT,\\n \\\"reviewed_by_profile_id\\\" UUID,\\n \\\"reviewed_at\\\" TIMESTAMP,\\n \\\"review_note\\\" TEXT,\\n \\\"duplicate_of_id\\\" UUID,\\n \\\"reimbursable\\\" BOOLEAN,\\n \\\"reimbursed_at\\\" TIMESTAMP,\\n \\\"reimbursement_reference\\\" TEXT\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false,\"unique\":false},\"cost_object_type\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"cost_object_id\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"category\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"description\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"amount\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false},\"currency\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"incurred_on\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"recorded_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"recorded_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"paid_by\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"paid_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"vendor_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"commitment_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"commitment_line_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"review_status\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"reviewed_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"reviewed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"review_note\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"duplicate_of_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":false,\"unique\":false,\"foreignKey\":{\"table\":\"expenses\",\"column\":\"id\",\"onDelete\":\"SET NULL\",\"onUpdate\":\"CASCADE\"}},\"reimbursable\":{\"type\":\"BOOLEAN\",\"notNull\":false,\"unique\":false},\"reimbursed_at\":{\"type\":\"TIMESTAMP\",\"notNull\":false,\"unique\":false},\"reimbursement_reference\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false}},\"indexes\":[{\"name\":\"expenses_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"expenses_cost_object_idx\",\"columns\":[\"tenant_id\",\"cost_object_type\",\"cost_object_id\",\"incurred_on\"]},{\"name\":\"expenses_commitment_review_idx\",\"columns\":[\"tenant_id\",\"commitment_id\",\"review_status\"]},{\"name\":\"expenses_review_status_idx\",\"columns\":[\"tenant_id\",\"review_status\",\"incurred_on\"]},{\"name\":\"expenses_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"expenses_recorded_by_profile_id_idx\",\"columns\":[\"recorded_by_profile_id\"]},{\"name\":\"expenses_paid_by_profile_id_idx\",\"columns\":[\"paid_by_profile_id\"]},{\"name\":\"expenses_vendor_id_idx\",\"columns\":[\"vendor_id\"]},{\"name\":\"expenses_commitment_id_idx\",\"columns\":[\"commitment_id\"]},{\"name\":\"expenses_commitment_line_id_idx\",\"columns\":[\"commitment_line_id\"]},{\"name\":\"expenses_reviewed_by_profile_id_idx\",\"columns\":[\"reviewed_by_profile_id\"]},{\"name\":\"expenses_duplicate_of_id_idx\",\"columns\":[\"duplicate_of_id\"]}],\"version\":\"af101807\"},\"importPath\":\"@happyvertical/smrt-expenses\"},\"@happyvertical/smrt-expenses:ExpenseReceipt\":{\"name\":\"expensereceipt\",\"className\":\"ExpenseReceipt\",\"qualifiedName\":\"@happyvertical/smrt-expenses:ExpenseReceipt\",\"collection\":\"expensereceipts\",\"filePath\":\"/home/runner/work/smrt/smrt/packages/expenses/src/models/ExpenseReceipt.ts\",\"packageName\":\"@happyvertical/smrt-expenses\",\"fields\":{\"tenantId\":{\"type\":\"text\",\"required\":false,\"_meta\":{\"sqlType\":\"UUID\",\"nullable\":true,\"__tenancy\":{\"isTenantIdField\":true,\"autoFilter\":true,\"required\":false,\"autoPopulate\":true,\"nullable\":true,\"mode\":\"optional\",\"field\":\"tenantId\",\"allowSuperAdminBypass\":false}}},\"expenseId\":{\"type\":\"foreignKey\",\"required\":true,\"related\":\"Expense\",\"_meta\":{\"required\":true,\"onDelete\":\"CASCADE\"}},\"assetId\":{\"type\":\"crossPackageRef\",\"required\":true,\"related\":\"@happyvertical/smrt-assets:Asset\"},\"uploadedByProfileId\":{\"type\":\"crossPackageRef\",\"required\":false,\"related\":\"@happyvertical/smrt-profiles:Profile\"},\"filename\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"mimeType\":{\"type\":\"text\",\"required\":false,\"_meta\":{}},\"byteCount\":{\"type\":\"integer\",\"required\":false,\"_meta\":{}},\"contentSha256\":{\"type\":\"text\",\"required\":true,\"_meta\":{\"required\":true}}},\"methods\":{\"save\":{\"name\":\"save\",\"async\":true,\"parameters\":[],\"returnType\":\"Promise<this>\",\"isStatic\":false,\"isPublic\":true}},\"decoratorConfig\":{\"tableName\":\"expense_receipts\",\"api\":{\"include\":[]},\"mcp\":{\"include\":[]},\"cli\":false,\"indexes\":[{\"name\":\"expense_receipts_expense_sha256_key\",\"columns\":[\"expenseId\",\"contentSha256\"],\"unique\":true},{\"name\":\"expense_receipts_tenant_sha256_idx\",\"columns\":[\"tenantId\",\"contentSha256\"]}],\"tenantScoped\":{\"mode\":\"optional\"},\"conflictColumns\":[\"tenant_id\",\"slug\",\"context\"]},\"extends\":\"SmrtObject\",\"exportName\":\"ExpenseReceipt\",\"collectionExportName\":\"ExpenseReceiptCollection\",\"validationRules\":[{\"field\":\"expenseId\",\"rule\":\"required\",\"fieldType\":\"foreignKey\"},{\"field\":\"assetId\",\"rule\":\"required\",\"fieldType\":\"crossPackageRef\"},{\"field\":\"contentSha256\",\"rule\":\"required\",\"fieldType\":\"text\"}],\"schema\":{\"tableName\":\"expense_receipts\",\"ddl\":\"CREATE TABLE IF NOT EXISTS \\\"expense_receipts\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"tenant_id\\\" UUID,\\n \\\"expense_id\\\" UUID NOT NULL,\\n \\\"asset_id\\\" UUID NOT NULL,\\n \\\"uploaded_by_profile_id\\\" UUID,\\n \\\"filename\\\" TEXT,\\n \\\"mime_type\\\" TEXT,\\n \\\"byte_count\\\" INTEGER,\\n \\\"content_sha256\\\" TEXT NOT NULL\\n);\",\"columns\":{\"id\":{\"type\":\"UUID\",\"primaryKey\":true,\"referenceKind\":\"id\",\"notNull\":true},\"slug\":{\"type\":\"TEXT\",\"notNull\":true},\"context\":{\"type\":\"TEXT\",\"notNull\":true,\"default\":\"\"},\"created_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"updated_at\":{\"type\":\"TIMESTAMP\",\"notNull\":true,\"default\":\"current_timestamp\"},\"tenant_id\":{\"type\":\"UUID\",\"referenceKind\":\"tenantId\",\"notNull\":false,\"unique\":false},\"expense_id\":{\"type\":\"UUID\",\"referenceKind\":\"foreignKey\",\"notNull\":true,\"unique\":false,\"foreignKey\":{\"table\":\"expenses\",\"column\":\"id\",\"onDelete\":\"CASCADE\",\"onUpdate\":\"CASCADE\"}},\"asset_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":true,\"unique\":false},\"uploaded_by_profile_id\":{\"type\":\"UUID\",\"referenceKind\":\"crossPackageRef\",\"notNull\":false,\"unique\":false},\"filename\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"mime_type\":{\"type\":\"TEXT\",\"notNull\":false,\"unique\":false},\"byte_count\":{\"type\":\"INTEGER\",\"notNull\":false,\"unique\":false},\"content_sha256\":{\"type\":\"TEXT\",\"notNull\":true,\"unique\":false}},\"indexes\":[{\"name\":\"expense_receipts_slug_context_idx\",\"columns\":[\"tenant_id\",\"slug\",\"context\"],\"unique\":true,\"nullsNotDistinct\":true},{\"name\":\"expense_receipts_expense_sha256_key\",\"columns\":[\"expense_id\",\"content_sha256\"],\"unique\":true},{\"name\":\"expense_receipts_tenant_sha256_idx\",\"columns\":[\"tenant_id\",\"content_sha256\"]},{\"name\":\"expense_receipts_tenant_id_created_at_idx\",\"columns\":[\"tenant_id\",\"created_at\"]},{\"name\":\"expense_receipts_asset_id_idx\",\"columns\":[\"asset_id\"]},{\"name\":\"expense_receipts_uploaded_by_profile_id_idx\",\"columns\":[\"uploaded_by_profile_id\"]}],\"version\":\"5aa77571\"},\"importPath\":\"@happyvertical/smrt-expenses\"}},\"moduleType\":\"smrt\",\"smrtDependencies\":[\"@happyvertical/smrt-assets\",\"@happyvertical/smrt-commerce\",\"@happyvertical/smrt-core\",\"@happyvertical/smrt-tenancy\"]}"));
21
21
  //#endregion
22
22
  //#region src/collections/ExpenseCollection.ts
23
23
  var ExpenseCollection_exports = /* @__PURE__ */ __exportAll({ ExpenseCollection: () => ExpenseCollection });
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-expenses",
5
- "packageVersion": "0.53.6",
5
+ "packageVersion": "0.54.1",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-expenses:ExpenseCollection": {
8
8
  "name": "expensecollection",
@@ -3,14 +3,14 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-expenses",
6
- "packageVersion": "0.53.6",
6
+ "packageVersion": "0.54.1",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "16597a96256444604ae28654c0a383bccbf13cfdbd01aa6211f374e2b8a23d05",
11
- "packageJson": "6192ae41e06ca5a8a47552476cf99a1dc564736bee202f38ddf6f425d2f1819a",
10
+ "manifest": "c4c11878647aa3250c4362a6f514f930f9e2edcbcf6e44ed661f01c522fba546",
11
+ "packageJson": "b88bc98ffc1c5b8959cf2281b9d032e44dc1b5eaecb4d2f05979671f72971d5a",
12
12
  "agents": "874f50fb4947edfa4547fa4355767f94693481c548f6b087174b7ed4286c47f6",
13
- "moduleDoc:agents/expense-ui.md": "b2a0e24c48243eb2de351c299a9153b2e1020658760d68a032c21592aedf83f1"
13
+ "moduleDoc:agents/expense-ui.md": "1976a6eb30549f99769dac5ec5e91439c424db2d5d5a21fa6353a8984b134064"
14
14
  },
15
15
  "exports": [
16
16
  ".",
@@ -791,7 +791,7 @@
791
791
  {
792
792
  "path": "agents/expense-ui.md",
793
793
  "module": "expense-ui",
794
- "content": "# Expense entry and receipt review\n\nImport `ExpenseForm`, `ExpenseReviewPanel` and their named Props types from\n`@happyvertical/smrt-expenses/svelte`. Registry slots are `expense-form` and\n`expense-review`. `@happyvertical/smrt-expenses/ui` exposes metadata without\nSvelte; `./playground` exposes an interactive retained-draft/review example.\n\n`ExpenseDraftValues` is a complete set of native strings: `amount`, `currency`,\n`incurredOn`, `description`, `category`, `vendorId`, `commitmentId`, `paidBy`,\n`paidByProfileId`, and `correctionReason`. Initialize unused fields to `''`.\nAmount is ordinary currency text (`'125.00'` CAD), distinct from the public\nExpense model's integer minor-unit `amount` (`12500`). Server adapters parse\ncurrency precision, safe integer range and business rules. Calendar dates stay\nlossless text, normally `YYYY-MM-DD`; invalid amounts/dates never disappear due\nto browser number/date coercion. Every validation failure returns original\nstrings, not reconstructed saved-model values.\n\n```svelte\n<script lang=\"ts\">\n import { ExpenseForm, ExpenseReviewPanel } from '@happyvertical/smrt-expenses/svelte';\n let { data, form } = $props();\n</script>\n<ExpenseForm\n action=\"?/save\"\n title=\"Record purchase\"\n values={form?.values ?? data.values}\n errors={form?.errors}\n message={form?.message}\n canEdit={data.mayEdit}\n correcting={data.correcting}\n vendors={data.authorizedVendors}\n commitments={data.authorizedCommitments}\n hiddenFields={[\n { name: 'requestId', value: form?.requestId ?? data.requestId },\n { name: 'costObjectId', value: data.costObjectId },\n { name: 'expectedTenantId', value: data.tenantId },\n ]}\n/>\n<ExpenseReviewPanel\n expense={data.expenseSummary}\n duplicates={data.authorizedDuplicateCandidates}\n history={data.history}\n receipts={data.receiptPanel}\n/>\n```\n\nVendor and commitment options are authorized Commerce `{id, label}` projections.\nResolve Profile names and application-specific award lineage in the consumer.\nUnknown retained references remain selectable/postable; selecting a reference\nnever establishes tenant ownership or commitment eligibility. `fields` maps\nlogical keys to native names; `errors` always uses logical keys. Submitter\n`intentField`/`intent` default to `intent=save`. `hiddenFields` preserves exact\nvalues and repeated names. Avoid field-name collisions. `children` adds\napplication-owned package allocation, quantity, reimbursement and correction\npolicy fields. `correcting` shows a retained reason, but does not implement a\nnew Expense correction model. The caller applies its own correction/history\npolicy and invokes existing guarded methods where appropriate.\n\nThe base form performs native POST by default, with or without JavaScript.\n`onsubmit` allows optional enhancement. `pending` or a supplied\n`smrt-ui/form-retry` `retryStatus` controls progress presentation without clearing\nvalues or creating/rotating request keys. `canEdit=false` disables fields and\nhides save; server-side authorization and replay enforcement remain mandatory.\n\nCurrency uses the shared `CurrencySelect`, localized by the active smrt-ui i18n\ncontext. It preserves the exact retained draft string and the field name from\n`fields.currency`, including native no-JavaScript correction flows. Pass\n`currencyOptions` only when the caller must restrict the shared currency catalog.\n\n`ExpenseReviewSummary` projects public Expense description, integer minor-unit\namount, currency and incurredOn, with caller-localized `statusLabel` and `note`.\n`duplicates` and `history` are explicit authorized presentation DTOs, not a\nparallel ledger. The server supplies findings from ExpenseReceipt duplicate\nqueries and application history. Unknown labels render verbatim. No state or\naction is inferred: `canReview`, `action`, `actions` and hidden fingerprints\nexplicitly provide a native review form. `action=\"\"` posts to the current page;\nomitting `action` hides the review form; `children` can supply retained reason\nor duplicate-selection inputs. A server must reauthorize, reload the model and\ninvoke `review()`, `reject()`, `markDuplicate()` or `reopen()` under its policy.\nNever assign review fields through UI payload binding. Reviewed money remains\nfrozen by the existing model; UI props cannot bypass it.\n\n`receipts` is exactly the public Assets `AttachmentPanelProps`, supporting\nprivate view/download URLs, version notes, native upload and recovery. It is\nrendered outside the review form so upload and review remain separate native\nactions. Use authorized receipt projections; attaching a file does not review\nan expense, mark a duplicate, or change invoice approval. Assets owns file\nselection and reselect-file help; Expenses does not duplicate uploads/storage.\n\nValidation: `pnpm --filter @happyvertical/smrt-expenses test`, `test:ui`,\n`test:e2e`, `typecheck`, `build`, and `verify:pack`. PostgreSQL model validation\nremains in the existing opt-in `test:postgres` lane; this UI does not alter it.\n"
794
+ "content": "# Expense entry and receipt review\n\nImport `ExpenseForm`, `ExpenseReviewPanel` and their named Props types from\n`@happyvertical/smrt-expenses/svelte`. Registry slots are `expense-form` and\n`expense-review`. `@happyvertical/smrt-expenses/ui` exposes metadata without\nSvelte; `./playground` exposes an interactive retained-draft/review example.\n\n`ExpenseDraftValues` is a complete set of native strings: `amount`, `currency`,\n`incurredOn`, `description`, `category`, `vendorId`, `commitmentId`, `paidBy`,\n`paidByProfileId`, and `correctionReason`. Initialize unused fields to `''`.\nAmount is ordinary currency text (`'125.00'` CAD), distinct from the public\nExpense model's integer minor-unit `amount` (`12500`). Server adapters parse\ncurrency precision, safe integer range and business rules. Calendar dates stay\nlossless text, normally `YYYY-MM-DD`; invalid amounts/dates never disappear due\nto browser number/date coercion. Every validation failure returns original\nstrings, not reconstructed saved-model values.\n\n```svelte\n<script lang=\"ts\">\n import { ExpenseForm, ExpenseReviewPanel } from '@happyvertical/smrt-expenses/svelte';\n let { data, form } = $props();\n</script>\n<ExpenseForm\n action=\"?/save\"\n title=\"Record purchase\"\n values={form?.values ?? data.values}\n errors={form?.errors}\n message={form?.message}\n canEdit={data.mayEdit}\n correcting={data.correcting}\n vendors={data.authorizedVendors}\n commitments={data.authorizedCommitments}\n hiddenFields={[\n { name: 'requestId', value: form?.requestId ?? data.requestId },\n { name: 'costObjectId', value: data.costObjectId },\n { name: 'expectedTenantId', value: data.tenantId },\n ]}\n/>\n<ExpenseReviewPanel\n expense={data.expenseSummary}\n duplicates={data.authorizedDuplicateCandidates}\n history={data.history}\n receipts={data.receiptPanel}\n/>\n```\n\nVendor and commitment options are authorized Commerce `{id, label}` projections.\nResolve Profile names and application-specific award lineage in the consumer.\nUnknown retained references remain selectable/postable; selecting a reference\nnever establishes tenant ownership or commitment eligibility. `fields` maps\nlogical keys to native names; `errors` always uses logical keys. Submitter\n`intentField`/`intent` default to `intent=save`. `hiddenFields` preserves exact\nvalues and repeated names. Avoid field-name collisions. `children` adds\napplication-owned package allocation, quantity, reimbursement and correction\npolicy fields. `correcting` shows a retained reason, but does not implement a\nnew Expense correction model. The caller applies its own correction/history\npolicy and invokes existing guarded methods where appropriate.\n\nThe base form performs native POST by default, with or without JavaScript.\n`onsubmit` allows optional enhancement. `pending` or a supplied\n`smrt-ui/form-retry` `retryStatus` controls progress presentation without clearing\nvalues or creating/rotating request keys. `canEdit=false` disables fields and\nhides save; server-side authorization and replay enforcement remain mandatory.\n\nCurrency uses the shared `CurrencySelect`, localized by the active smrt-ui i18n\ncontext. It preserves the exact retained draft string and the field name from\n`fields.currency`, including native no-JavaScript correction flows. Pass\n`currencyOptions` only when the caller must restrict the shared currency catalog.\n\n`ExpenseReviewSummary` projects public Expense description, integer minor-unit\namount, currency and incurredOn, with caller-localized `statusLabel` and `note`.\n`duplicates` and `history` are explicit authorized presentation DTOs, not a\nparallel ledger. The server supplies findings from ExpenseReceipt duplicate\nqueries and application history. Unknown labels render verbatim. No state or\naction is inferred: `canReview`, `action`, `actions` and hidden fingerprints\nexplicitly provide a native review form. `action=\"\"` posts to the current page;\nomitting `action` hides the review form; `children` can supply retained reason\nor duplicate-selection inputs. A server must reauthorize, reload the model and\ninvoke `review()`, `reject()`, `markDuplicate()` or `reopen()` under its policy.\nNever assign review fields through UI payload binding. Reviewed money remains\nfrozen by the existing model; UI props cannot bypass it.\n\n`receipts` is exactly the public Assets `AttachmentPanelProps`, supporting\nprivate view/download URLs, version notes, native upload and recovery. It is\nrendered outside the review form so upload and review remain separate native\nactions. Use authorized receipt projections; attaching a file does not review\nan expense, mark a duplicate, or change invoice approval. Assets owns file\nselection and reselect-file help; Expenses does not duplicate uploads/storage.\n\nValidation: `pnpm --filter @happyvertical/smrt-expenses test`, `test:ui`,\n`test:e2e`, `typecheck`, `build`, and `verify:pack`. PostgreSQL model validation\nremains in the existing opt-in `test:postgres` lane; this UI does not alter it.\n\n`visibleFields` optionally limits the logical `ExpenseDraftValues` fields rendered by `ExpenseForm`. Omitted renders all existing fields; an empty array renders none. Excluded fields do not emit hidden fallbacks, including `correctionReason`; fixed values can be supplied explicitly through `hiddenFields` without duplicate names. This supports policy-fixed payer fields and domain-owned reference selectors. Visibility is presentation, never authority: endpoints must validate every fixed or submitted value. Unknown retained values and validation errors remain visible for included fields.\n\nComposition validation: native Svelte SSR contracts cover defaults, omitted fields, retained malformed values, caller identity, no duplicate fixed inputs, correction/read-only/pending behavior. No persistence, transaction, tenant authority or external provider changes occur; those matrix dimensions are N/A for this presentation-only extension. Node26/Svelte5 native POST markup is the supported runtime edge.\n"
795
795
  }
796
796
  ]
797
797
  }
@@ -24,6 +24,7 @@ let {
24
24
  commitments = [],
25
25
  currencyOptions,
26
26
  fields = {},
27
+ visibleFields,
27
28
  errors = {},
28
29
  message,
29
30
  hiddenFields = [],
@@ -49,6 +50,9 @@ const textFields: (keyof ExpenseDraftValues)[] = [
49
50
  'category',
50
51
  'paidByProfileId',
51
52
  ];
53
+ function visible(field: keyof ExpenseDraftValues) {
54
+ return visibleFields === undefined || visibleFields.includes(field);
55
+ }
52
56
  function name(field: keyof ExpenseDraftValues) {
53
57
  return fields[field] ?? field;
54
58
  }
@@ -62,7 +66,7 @@ function name(field: keyof ExpenseDraftValues) {
62
66
  {#if message}<p role="alert">{message}</p>{/if}
63
67
  {#if retryStatus === 'transport-error'}<p role="status">{t(M['expenses.form.uncertain'])}</p>{/if}
64
68
  <fieldset disabled={!canEdit}>
65
- {#each textFields as field}
69
+ {#each textFields.filter(visible) as field}
66
70
  <FormGroup id={`${formId}-${field}`} label={t(M[`expenses.form.${field}`])} error={errors[field]} hint={field === 'amount' ? t(M['expenses.form.amount_help']) : field === 'incurredOn' ? t(M['expenses.form.date_help']) : undefined}>
67
71
  {#if field === 'currency'}
68
72
  <CurrencySelect name={name(field)} value={values[field]} options={currencyOptions} locale={i18n.locale} readOnly={!canEdit} />
@@ -71,10 +75,12 @@ function name(field: keyof ExpenseDraftValues) {
71
75
  {/if}
72
76
  </FormGroup>
73
77
  {/each}
78
+ {#if visible('description')}
74
79
  <FormGroup id={`${formId}-description`} label={t(M['expenses.form.description'])} error={errors.description}>
75
80
  <Textarea name={name('description')} value={values.description} />
76
81
  </FormGroup>
77
- {#each ['vendorId', 'commitmentId'] as reference}
82
+ {/if}
83
+ {#each (['vendorId', 'commitmentId'] as const).filter(visible) as reference}
78
84
  {@const field = reference as 'vendorId' | 'commitmentId'}
79
85
  {@const options = field === 'vendorId' ? vendors : commitments}
80
86
  <FormGroup id={`${formId}-${field}`} label={t(M[`expenses.form.${field}`])} error={errors[field]}>
@@ -85,6 +91,7 @@ function name(field: keyof ExpenseDraftValues) {
85
91
  </Select>
86
92
  </FormGroup>
87
93
  {/each}
94
+ {#if visible('paidBy')}
88
95
  <FormGroup id={`${formId}-paidBy`} label={t(M['expenses.form.paidBy'])} error={errors.paidBy}>
89
96
  <Select name={name('paidBy')} value={values.paidBy}>
90
97
  {#if !['company', 'person'].includes(values.paidBy)}<option value={values.paidBy}>{values.paidBy}</option>{/if}
@@ -92,11 +99,14 @@ function name(field: keyof ExpenseDraftValues) {
92
99
  <option value="person">{t(M['expenses.form.person'])}</option>
93
100
  </Select>
94
101
  </FormGroup>
102
+ {/if}
103
+ {#if visible('correctionReason')}
95
104
  {#if correcting}
96
105
  <FormGroup id={`${formId}-correctionReason`} label={t(M['expenses.form.correctionReason'])} error={errors.correctionReason}>
97
106
  <Textarea name={name('correctionReason')} value={values.correctionReason} />
98
107
  </FormGroup>
99
108
  {:else}<Input type="hidden" name={name('correctionReason')} value={values.correctionReason} interaction={false} />{/if}
109
+ {/if}
100
110
  {@render children?.()}
101
111
  </fieldset>
102
112
  {#if canEdit}<div><Button type="submit" name={intentField} value={intent} disabled={busy}>{submitLabel ?? t(M[correcting ? 'expenses.form.correct' : 'expenses.form.save'])}</Button></div>{/if}
@@ -1 +1 @@
1
- {"version":3,"file":"ExpenseForm.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ExpenseForm.svelte.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAExE,0EAA0E;AAC1E,MAAM,WAAW,KAAM,SAAQ,gBAAgB;CAAG;AAsGlD,QAAA,MAAM,WAAW,2CAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"ExpenseForm.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ExpenseForm.svelte.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAsB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAExE,0EAA0E;AAC1E,MAAM,WAAW,KAAM,SAAQ,gBAAgB;CAAG;AAgHlD,QAAA,MAAM,WAAW,2CAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
@@ -63,6 +63,8 @@ export interface ExpenseFormProps {
63
63
  currencyOptions?: readonly CodeSelectOption[];
64
64
  /** Optional native field-name adapter; defaults to draft property names. */
65
65
  fields?: Partial<Record<keyof ExpenseDraftValues, string>>;
66
+ /** Render only these logical fields. Omitted means all; [] means none. Fixed values belong in hiddenFields and remain server-validated. */
67
+ visibleFields?: readonly (keyof ExpenseDraftValues)[];
66
68
  /** Server errors keyed by logical draft property. */
67
69
  errors?: Partial<Record<keyof ExpenseDraftValues, string>>;
68
70
  /** Caller error/denial/uncertain-outcome message. */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/svelte/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAC9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAEpD,kFAAkF;AAClF,MAAM,WAAW,kBAAkB;IACjC,0EAA0E;IAC1E,MAAM,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,+EAA+E;IAC/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C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kFAAkF;IAClF,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wCAAwC;IACxC,QAAQ,CAAC,EAAE,kBAAkB,CAAC,UAAU,CAAC,CAAC;CAC3C"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-expenses",
3
- "version": "0.53.6",
3
+ "version": "0.54.1",
4
4
  "description": "Expense records for the SMRT framework - reviewed costs against a cost object, deduplicated receipts, and commitment drawdown",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -33,15 +33,15 @@
33
33
  }
34
34
  },
35
35
  "dependencies": {
36
- "@happyvertical/smrt-assets": "0.53.6",
37
- "@happyvertical/smrt-commerce": "0.53.6",
38
- "@happyvertical/smrt-core": "0.53.6",
39
- "@happyvertical/smrt-tenancy": "0.53.6",
40
- "@happyvertical/smrt-types": "0.53.6",
41
- "@happyvertical/smrt-ui": "0.53.6"
36
+ "@happyvertical/smrt-assets": "0.54.1",
37
+ "@happyvertical/smrt-commerce": "0.54.1",
38
+ "@happyvertical/smrt-core": "0.54.1",
39
+ "@happyvertical/smrt-tenancy": "0.54.1",
40
+ "@happyvertical/smrt-types": "0.54.1",
41
+ "@happyvertical/smrt-ui": "0.54.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@happyvertical/smrt-vitest": "0.53.6",
44
+ "@happyvertical/smrt-vitest": "0.54.1",
45
45
  "@types/node": "24.13.6",
46
46
  "typescript": "6.0.3",
47
47
  "vite": "8.1.4",