Merged
Conversation
Add POST /api/plans/:planId/mislaka/parse endpoint that accepts a multipart Excel upload of the Israeli pension clearinghouse file (HaTmuna HaMle'a) and returns structured pension product data. - Parser reads Sheet 1, maps Hebrew column headers to English fields - Infers plan type from Hebrew product names - Handles header variations, formatted numbers, status variants - Memory-based upload via multer (10MB limit, xlsx/xls only) - Registered in OpenAPI docs - 20 unit tests covering parser, header mapping, and service layer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /api/plans/:planId/mislaka/parseendpoint for parsing Mislaka "HaTmuna HaMle'a" Excel filesuseParseMislakahook), enabling removal of the client-side mock fallbackNew files
src/api/mislaka/parser.ts- Core parser: header mapping, plan type inference, number/status parsingsrc/api/mislaka/mislakaModel.ts- Zod schemas for request params and responsesrc/api/mislaka/mislakaService.ts- Service layer with plan ownership checksrc/api/mislaka/mislakaController.ts- Request handler with file/auth validationsrc/api/mislaka/mislakaRouter.ts- Express router with multer middleware and OpenAPI registrationsrc/api/mislaka/__tests__/parser.test.ts- 15 unit tests for parser and plan type inferencesrc/api/mislaka/__tests__/mislakaService.test.ts- 5 unit tests for service layerTest plan
pnpm testpasses (264 tests, 20 new)pnpm buildsucceeds (tsc + tsup)pnpm spell- 0 issuesuseParseMislakahook works with the real endpoint (removes 404 mock fallback)