Uh oh!
There was an error while loading. Please reload this page.
chore: make ach debit daily report readable only to match octo - #135
chore: make ach debit daily report readable only to match octo#135srikar-methodfi wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR narrows the set of report type values that can be used with POST /reports so that ach.debit.daily is treated as read-only (retrievable/downloadable but not creatable), aligning behavior with “octo”.
Changes:
- Introduces
ReportCreateTypes/TReportCreateTypesand updatesIReportCreateOpts.typeto only allow creatable report types. - Leaves
ach.debit.dailyinReportTypes/IReport.typeso it remains readable. - Adds TypeScript compile-time assertions in the report tests to enforce “readable but not creatable”.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/resources/Report.tests.ts | Adds type-level assertions validating ach.debit.daily remains readable but is not creatable. |
| src/resources/Report/index.ts | Splits “all report types” vs “creatable report types” by introducing ReportCreateTypes and narrowing IReportCreateOpts.type. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (1)
src/resources/Report/index.ts:26
ReportTypes.ach_debit_dailywas removed, which is a breaking API change for any downstream code that referenced this exported constant. If the goal is only to prevent creation while still allowing consumers to reference the type for retrieval, consider preserving a deprecated alias (or introducing a dedicatedReportCreateTypesconstant/type for creatable reports) instead of removing the key fromReportTypes.
export const ReportRetrieveTypes = {
...ReportTypes,
ach_debit_daily: 'ach.debit.daily',
} as const;
export type TReportRetrieveTypes = typeof ReportRetrieveTypes[keyof typeof ReportRetrieveTypes];
make ach debit daily report readable only to match octo