Regression: Bulk Exports specific-day `fetch()` returns `void` instead of `DayInstance` in 6.1.0
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 78/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- node.js, typescript
- Domain
- api
Research direction
Start with src/rest/bulkexports/v1/export/day.ts, especially fetch and fetchWithHttpInfo, and compare its 6.1.0 behavior with the 6.0.2 implementation. Check the related response handling in src/base/Version.ts and use the TypeScript reproduction to verify that days(day).fetch() returns a DayInstance with redirectTo rather than void or the raw payload.
Written by the indexing model from the issue text.
Description
Summary
6.1.0 contains a regression in the Bulk Exports specific-day resource.
client.bulkexports.v1.exports('Messages').days(day).fetch() is typed as Promise<void> and does not construct a DayInstance at runtime. This breaks use of the documented GET /v1/Exports/{ResourceType}/Days/{Day} endpoint through the SDK.
Affected versions
- Works in
twilio6.0.2. - Fails in
twilio6.1.0.
Reproduction
- Install the dependencies in a fresh project:
npm install twilio@6.1.0 typescript - Create
index.tsthat calls the helper and accesses itsredirectTovalue:import twilio from 'twilio'; async function main() { const client = twilio('ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'auth-token'); const day = await client.bulkexports.v1.exports('Messages').days('2026-08-01').fetch(); const url = day.redirectTo; } - Compile the file:
npx tsc --noEmit index.ts
The compiler reports:
TS2339: Property 'redirectTo' does not exist on type 'void'.
This is also a runtime issue: the helper returns the raw parsed API payload rather than a DayInstance. JavaScript consumers may receive a payload with the API field name redirect_to, but cannot read the SDK property redirectTo from its result.
Expected behavior
days(day).fetch() should issue GET /v1/Exports/{ResourceType}/Days/{Day} and resolve to a DayInstance with properties including redirectTo. This is the current documented Node usage for the endpoint: Bulk Export day resource documentation.
Actual behavior
In 6.1.0, the specific-day fetch() is declared as Promise<void> and returns the raw parsed API response rather than a DayInstance. The DayInstance type still defines redirectTo, but the specific-day fetch path does not construct that instance.
Cause
The 6.1.0 generated specific-day resource declares fetch() as Promise<void>. Its implementation returns the raw Version.fetch result without mapping it to a DayInstance. Version.fetch returns the parsed response body, but the specific-day resource's fetchWithHttpInfo explicitly sets body to undefined.
The same 6.1.0 file still declares redirectTo on DayInstance.
In 6.0.2, the equivalent code declares a DayInstance result and maps the response payload into that instance.
Impact
For TypeScript consumers, this causes a compile failure when accessing DayInstance fields such as redirectTo.
For JavaScript consumers, it returns a raw payload rather than the SDK day object and therefore causes a runtime mismatch.
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 564
- Avg merge
- 14h 2m
- Merged PRs (30d)
- 3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from twilio/twilio-node
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
twilio/twilio-node#1192 ·
-
Stale
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
twilio/twilio-node#1183 · 2 comments · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
twilio/twilio-node#1210 ·
-
Authy/Twillo Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
twilio/twilio-node#1208 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
twilio/twilio-node#1190 · 1 comment ·
All issues in twilio/twilio-node
Similar issues
-
calcite-components needs triage refactor
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Esri/calcite-design-system#15203 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 91/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100