{ "version": "R4", "source": "api/src/report-materials/report-materials.service.ts", "generatedAt": "2026-07-31T02:11:40.149Z", "publicMethods": [ { "name": "buildOfficialTemplate", "signature": "async buildOfficialTemplate(reportType: 'signature' | 'drainage', operatorId?: string)", "canonicalBodySha256": "507a97f3e067489fb16a33a040612f5a5e4524227ca8f9d8361e24d1b2baf785", "originalLines": [ 99, 120 ], "domain": "officialExport" }, { "name": "exportPending", "signature": "async exportPending(query: { reportType?: 'signature' | 'drainage'; tenantId?: string; applicationId?: string }, operatorId?: string)", "canonicalBodySha256": "f9f1cca955a9ce267f6b9c9a6d6c0b81be994908668705da1591bc550ee07cfe", "originalLines": [ 122, 139 ], "domain": "officialExport" }, { "name": "listPending", "signature": "async listPending(query: { reportType?: 'signature' | 'drainage'; tenantId?: string; applicationId?: string } & PagedQuery)", "canonicalBodySha256": "ecd97e4e397b63e7578645100bae82af66a9494ddefb4c1a627d8c30208ffdd9", "originalLines": [ 141, 151 ], "domain": "pendingQuery" }, { "name": "listImportProfiles", "signature": "listImportProfiles(reportType?: 'signature' | 'drainage')", "canonicalBodySha256": "37b13cca9ffb528b106871cdd3c89023f6d0f9e053080e6891d4271e35e2525d", "originalLines": [ 198, 204 ], "domain": "importParser" }, { "name": "saveImportProfile", "signature": "async saveImportProfile(data: CreateImportProfileDto)", "canonicalBodySha256": "6712ab96ded2c18120377b7b0c49193d374a858a2916b898df8b161bbbad4795", "originalLines": [ 206, 229 ], "domain": "importParser" }, { "name": "analyzeImport", "signature": "async analyzeImport(file: { originalname: string; mimetype: string; size: number; buffer: Buffer }, options: AnalyzeImportOptions)", "canonicalBodySha256": "ba5429c8b3fedce0de7420f9c9773215e5a6888cbb72a2b25eec152decb14aa4", "originalLines": [ 231, 297 ], "domain": "importParser" }, { "name": "commitImport", "signature": "async commitImport(batchId: string, data: ImportCommitDto)", "canonicalBodySha256": "8f68974ad5f7ae0231167e1801b5a3e2dccdcc78b691075967ab5838f62ec1dc", "originalLines": [ 299, 383 ], "domain": "importReview" }, { "name": "listImportReviewBatches", "signature": "async listImportReviewBatches(query: PagedQuery & { reportType?: 'signature' | 'drainage'; status?: string } = {})", "canonicalBodySha256": "6373de6acab0f6f12d99b000965ad798bd8c9aaeddcceece74080b033da5364e", "originalLines": [ 385, 436 ], "domain": "importReview" }, { "name": "reviewImportItems", "signature": "async reviewImportItems(batchId: string, data: ReviewImportItemsDto)", "canonicalBodySha256": "5303e3a9f6d0313edc69cd5fa6d93cb1408ebe782cbbe3f9e210f3ade939f27f", "originalLines": [ 438, 504 ], "domain": "importReview" }, { "name": "listBatches", "signature": "async listBatches(query: PagedQuery = {})", "canonicalBodySha256": "a9b65be1a5e9fa64a9aa863c70f3d19f7fe1d175fc8c3494b22c48d9ba425279", "originalLines": [ 506, 546 ], "domain": "batchGeneration" }, { "name": "createBatch", "signature": "async createBatch(data: CreateReportBatchDto)", "canonicalBodySha256": "59da60790350e19299b7fc80b9dd0d1763f118fb6f82fe3a09b458a3cb02db94", "originalLines": [ 548, 618 ], "domain": "batchGeneration" }, { "name": "preflightBatch", "signature": "async preflightBatch(data: Pick)", "canonicalBodySha256": "6eb007143fbba353d39a3cca80f93cc4ba9fb9f6bab5182449dc2ca462234c9e", "originalLines": [ 620, 637 ], "domain": "batchGeneration" } ], "internalMethods": [ { "name": "findPendingItems", "signature": "private async findPendingItems(query: { reportType?: 'signature' | 'drainage'; tenantId?: string; applicationId?: string } & PagedQuery)", "canonicalBodySha256": "6a4b0b9953f5499afc60605d6f68a17893dad51b89348f25799846ba7ae57f4e", "originalLines": [ 153, 196 ], "domain": "pendingQuery" }, { "name": "stageSignatureRow", "signature": "private async stageSignatureRow(tenantId: string, applicationId: string | undefined, mappings: ImportMapping[], values: Record)", "canonicalBodySha256": "c9431e56ee3c93b416c17830feff3eee66dc5a0940d6a28b29f21f7d897a23b3", "originalLines": [ 639, 665 ], "domain": "importReview" }, { "name": "stageDrainageRow", "signature": "private async stageDrainageRow(tenantId: string, applicationId: string | undefined, mappings: ImportMapping[], values: Record)", "canonicalBodySha256": "2a174fcb79e93e9abc293ad9205f9aa7d2c740731a250e75e598394b7c083d7c", "originalLines": [ 667, 691 ], "domain": "importReview" }, { "name": "applyImportItem", "signature": "private async applyImportItem(\n batch: { tenantId: string; applicationId: string | null; reportType: string },\n item: { reportType: string; targetId: string | null; payload: Prisma.JsonValue },\n reviewerId: string,\n )", "canonicalBodySha256": "2c016f04fb0a0aa2f6658a721a0e2c298a6c93d0d9111caf8f9adbdda5233d41", "originalLines": [ 693, 756 ], "domain": "importReview" }, { "name": "prepareBatchItem", "signature": "private async prepareBatchItem(batchId: string, selected: CreateReportBatchDto['items'][number], inspection: ReportBatchInspection)", "canonicalBodySha256": "f61ad17413f40c65437264b8ddf412de9184ebfcbd6fbc23cab5c2a7617e9674", "originalLines": [ 758, 777 ], "domain": "batchGeneration" }, { "name": "inspectBatchItem", "signature": "private async inspectBatchItem(selected: CreateReportBatchDto['items'][number]): Promise", "canonicalBodySha256": "e04d7e20b23ac726eff80d6847290676b390b016013315523f05d58bf5fbece9", "originalLines": [ 779, 858 ], "domain": "batchGeneration" }, { "name": "claimBatchOperation", "signature": "private async claimBatchOperation(idempotencyKey: string, fingerprint: string, userId?: string)", "canonicalBodySha256": "c14878a5728ae576e703f7429bc83e947f922e85aeae349e62bb52ae3cf230d4", "originalLines": [ 860, 873 ], "domain": "batchOperation" }, { "name": "completeBatchOperation", "signature": "private async completeBatchOperation(operationId: string, batchId: string, result: Record)", "canonicalBodySha256": "f4500197f33a4d023fbd735b9f38fbcd18fdd8fdca4419174b04f903531abdfb", "originalLines": [ 875, 877 ], "domain": "batchOperation" }, { "name": "failBatchOperation", "signature": "private async failBatchOperation(operationId: string, message: string, batchId?: string)", "canonicalBodySha256": "eb33a3102646844242592cb51dde16a455ca0055ee61e9c97f43ce07e51c12f8", "originalLines": [ 879, 882 ], "domain": "batchOperation" }, { "name": "exportChannelBatch", "signature": "private async exportChannelBatch(batchId: string, channelId: string, items: Array>>)", "canonicalBodySha256": "ea0df6daed595dfd4bea01ab6e4f51f3dd0bb6883e6e18c1c38e5997c0a9007c", "originalLines": [ 884, 943 ], "domain": "channelExport" }, { "name": "recordTask", "signature": "private recordTask(taskId: string, channelId: string, statusBefore: string | undefined, statusAfter: string, reason?: string)", "canonicalBodySha256": "9d1ce8db45c7623800d3117e2d246823dd7eb13e0970a5fa14f0392e8e4489eb", "originalLines": [ 945, 947 ], "domain": "channelExport" } ], "contracts": [ { "name": "ImportMapping", "sha256": "a0d06f96f2f99f135d8d86eaeb3f3a7525fa24224d5664e80567da75cdecee06" }, { "name": "CreateImportProfileDto", "sha256": "6ffebbc39754d4b9df71a47d09c55f139ea33f9c4c0e26d8fa9c9756f7d642e6" }, { "name": "ImportCommitDto", "sha256": "7c4c7b25184101b781037d97e93c5b4c1f836259153cc7cb26ded7f9bcf504c1" }, { "name": "ReviewImportItemsDto", "sha256": "73be0348645a4316428eec4bd39d0ef02f84cef43c24530200d6c896cfae40e7" }, { "name": "PagedQuery", "sha256": "78ddbb3a41b07a37729b80c84e969cf3344d44c19bdebff93b593bacf2b51293" }, { "name": "CreateReportBatchDto", "sha256": "530b306e1f237c522e4a202ed1d43bca6e527eb6dd44afa113988de54fdad35f" }, { "name": "ReportBatchTarget", "sha256": "a91a765ad37d69e0f797c2b9c4b692789765b539a6b13d212f1a93cd5b1b4e65" }, { "name": "ReportBatchInspection", "sha256": "e00a2a0750dad4c413466426a2710a2ea59c2c8b369e61726db3f175b700cc00" }, { "name": "AnalyzeImportOptions", "sha256": "74e5e84a09befe64caada9f8574a52dde7e30770a7ffe4b99e417c60c6eda40b" }, { "name": "EmbeddedImage", "sha256": "9db22983b69311e82b0899663cd1534dd72510f14259ba37693bd63bc9bad59b" } ], "helpers": [ { "name": "profileData", "sha256": "e61848d9a038403295c40d26588ca44c32d4372529726ad9f2e22232474efc69" }, { "name": "validateProfile", "sha256": "6fe77bdd3830c93b40d9f3d3282f0fdd2c5afa8f025504ba57f9f8113a725947" }, { "name": "loadWorkbook", "sha256": "46ce8da23dce75f31ab29d00c0dae8e063d14cb72ccfbec95333bb1064bbcf39" }, { "name": "assertSafeWorkbook", "sha256": "5ed20a1e12793355949b5cf951b4113c9c61517bf5a97491cc22671ee6ccaa56" }, { "name": "safeSpreadsheetText", "sha256": "5a7db626de509e78628fc87ebf20e43d227e6ce3fefdf48bd82dd040ffd35683" }, { "name": "readEmbeddedImages", "sha256": "9fbd0df019528353aa7fc5220a279b23711d36fa61f78e0880d8bb2cc6228f4d" }, { "name": "suggestMappings", "sha256": "79abe1b569ffb867fd39ace7e731f1885dd113ac470d8b8dea315775d0eb3c28" }, { "name": "remapProfileColumns", "sha256": "4b58e11d2e3d97a1b352109a9be7c26aa25bdecdbb5e542a0fb241e46c7f657a" }, { "name": "signatureCoreMapping", "sha256": "5d4b0bdc68886cb022eecbf4eb4721613df74210d3165fd737b9badea00e5729" }, { "name": "drainageCoreMapping", "sha256": "256323027325923786e84c308eeebcd0dde0e0b5d27a563d10e794d318b7bddd" }, { "name": "normalizeHeader", "sha256": "b30ab7e6903b8e8411e3195c23581379badb6241bd518e327eb10ad0358e0c5c" }, { "name": "normalizeFieldCode", "sha256": "49387c9ca040ea2cbc5a4732652c4389f32be8169536f9e132225579dff839fa" }, { "name": "clamp", "sha256": "0aaed2dc249288c7f197e033b858c35aa10a0a2642203d5d92c94bd5db323926" }, { "name": "normalizePage", "sha256": "f04be3697001d814b86457cdd93eb6a83cff1b712327a4e74960c2436b784b19" }, { "name": "normalizePageSize", "sha256": "af1c28386f9802cb9c7cc3dddc712c1559d92d2c777b2bbce65d12cb1c5ecc38" }, { "name": "dateRange", "sha256": "a0029a9c2eac718e2c7d63b30a7b3b65c504f859838ac9de7499ec1103ae1e89" }, { "name": "cellText", "sha256": "a6f5fd540e5cbcbc8fc1ef1dfb4b8203e16212bb2d7c4a8b3aa0068f296f8981" }, { "name": "transformValue", "sha256": "584b33bf430cd5c47e6e9a36b88a75519335125e80b0b63e3139e5f156333118" }, { "name": "mappedCoreValue", "sha256": "a34b22e2cfbe93445eeedcfbf4f0b60d9ee0f5ed872c069e6db260a58dda723f" }, { "name": "dynamicValues", "sha256": "a955844529a42a1f0bd73645bb4407980c7ae570bcd7d52a738fcae46f444d9b" }, { "name": "jsonRecord", "sha256": "2f7c1984863c82abc61e7f753bd5bf1d752802d4ab552dd7ee03d6ddd7844ce1" }, { "name": "hasValue", "sha256": "ae0550bd772c41447e7f975cb12a4812bc7ccde1ade718cd4fa1b3ae6af34583" }, { "name": "isFileRef", "sha256": "37413460e45e152f80c3b49e82addfc332dacf0d3585cffe8868e8b93f2da87b" }, { "name": "resolveExportValue", "sha256": "c6aae47afc4ece039eb97053ed491136a38563506deb0246a3d0c37784b7bccc" }, { "name": "applyExportTransform", "sha256": "197b0126b8a8cf69d0087e45ec221ad608c7e5e2e94d8a2735adebfdcd801fad" }, { "name": "styleHeader", "sha256": "8c419d0cd3fcbd2f84d4b079ae025557560fa479d59b5d3aca4970c65319d496" }, { "name": "normalizeImageExtension", "sha256": "8c2f57eedc5c5294001b6a842581cf4b3cb9a61dbe392c700e0672416692fddc" }, { "name": "imageContentType", "sha256": "589cd67492e900039830c1c6694cc910b726bf78e3b275d53664965842b122c7" }, { "name": "safeFileName", "sha256": "948e0371435a10f79bc24a9c70ed0911bff050c209cba794e42b713fecd50a34" }, { "name": "normalizeBatchIdempotencyKey", "sha256": "e2f921d15dc1300b15c23089fd63c6c1ecafdfb11fbce93cdb3f7dd7b3a7b760" }, { "name": "jsonStringArray", "sha256": "469f80e2ba2119bfa26c19e371224b239c2df8ab6bdbe75f5906ab2047744622" }, { "name": "jsonSafe", "sha256": "3f72a3704848a68c9488c3b692c4f6144e64a7f6cb51ca3ad2ba5d7d92cd3e4f" } ], "domains": { "officialExport": { "className": "ReportOfficialExportService", "file": "api/src/report-materials/official-export.service.ts", "methods": [ "buildOfficialTemplate", "exportPending" ] }, "importParser": { "className": "ReportImportParserService", "file": "api/src/report-materials/import-parser.service.ts", "methods": [ "listImportProfiles", "saveImportProfile", "analyzeImport" ] }, "importReview": { "className": "ReportImportReviewService", "file": "api/src/report-materials/import-review.service.ts", "methods": [ "commitImport", "listImportReviewBatches", "reviewImportItems", "stageSignatureRow", "stageDrainageRow", "applyImportItem" ] }, "pendingQuery": { "className": "ReportPendingQueryService", "file": "api/src/report-materials/pending-query.service.ts", "methods": [ "listPending", "findPendingItems" ] }, "batchGeneration": { "className": "ReportBatchGenerationService", "file": "api/src/report-materials/batch-generation.service.ts", "methods": [ "listBatches", "createBatch", "preflightBatch", "prepareBatchItem", "inspectBatchItem" ] }, "channelExport": { "className": "ReportChannelExportService", "file": "api/src/report-materials/channel-export.service.ts", "methods": [ "exportChannelBatch", "recordTask" ] }, "batchOperation": { "className": "ReportBatchOperationService", "file": "api/src/report-materials/batch-operation.service.ts", "methods": [ "claimBatchOperation", "completeBatchOperation", "failBatchOperation" ] } } }