Repository navigation
Create a new partners access point to flood affected villages - #280
Draft
wadhwamatic wants to merge 1 commit into
Draft
wadhwamatic wants to merge 1 commit into
wadhwamatic wants to merge 1 commit into
Conversation
|
Build succeeded and deployed:
(hash 52cf790 deployed at 2026-09-09T02:39:25)
|
wadhwamatic
marked this pull request as draft
September 9, 2026 04:10
This branch has not been deployed
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
Adds a new partner-facing API endpoint that exposes approved flood-affected village data to external partners (starting with IDPoor), without giving them direct access to Kobo.
Closes #278
What's included
GET /partners/flood-affected-villages?startDate=&endDate=— returns one row per affected village for approved flood submissions in the given disaster-event date rangex-api-keyheader) viaPARTNER_API_KEYS, separate from staff loginKOBO_PUBLIC_API_TOKEN), isolated from the validation-workflow tokengazetteerCoderesolution from the flood form'sg2/villageselect-multiple field, backed by a generatedvillageToCommunelookup table (packages/interfaces/src/kobo/villages.ts)PARTNER_SKIP_APPROVAL_FILTERlocal-dev-only escape hatch for testing before any submissions are approvedPartnersService(query filtering, village expansion, unknown-code handling, pagination)Design notes
Testing
PartnersServicetests cover the approval filter, village expansion, and paginationFollow-ups (tracked separately, not blocking this PR)