Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Create test and augment VoiceResponse with config param. #874

Closed
wants to merge 106 commits into from

Conversation

mariomui
Copy link

@mariomui mariomui commented Jan 6, 2023

Closes 691

#691
In this issue, a community member ask for a configuration object to be passed into VoiceResponse so they can use a simpler:

const response = new VoiceResponse({ connectionOverride: 'rc=2&ct=1000' });
response.redirect({
    method: 'POST'
}, 'https://example.com/foo?query=123');

instead of the more verbose:

const response = new VoiceResponse();
response.redirect({
    method: 'POST'
}, 'https://example.com/foo?query=123#rc=2&ct=1000');

in order to use overrides specified in:
https://www.twilio.com/docs/usage/webhooks/webhooks-connection-overrides

Checklist

  • I acknowledge that all my contributions will be made under the project's license
  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the Contribution Guidelines and my PR follows them
  • I have titled the PR appropriately
  • I have updated my branch with the main branch
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation about the functionality in the appropriate .md file
  • I have added inline documentation to the code I modified

If you have questions, please file a support ticket, or create a GitHub Issue in this repository.

claudiachua and others added 30 commits June 1, 2022 11:10
* [DI-2059] default lazyloading to true
Fixes Sonar code coverage!!!
* feat: generate Twilio.ts file
* [DI-2164] modify unit test to regrex expressions
* chore: drop node versions < 14
* [DI-1401] Add utili funcs to Version and property to Page
* [DI-1412] Add Cluster Test
* [DI-1412] Include Cluster Test
* chore: yeet lodash
* chore: upgrade target to es2020
childish-sambino and others added 25 commits December 27, 2022 14:08
* chore: touch up request validator
This removes TypeScript errors for non-matching types.
Fixes twilio#715

If the messageBody is malformed then there will be a json parse error since the only check to allow parse is whether the body be a string or not. If we wrap the parse in a try catch, we can code a gentler response.
* [DI-2414] test: add test case to ensure done only gets called once

* [DI-2414] fix: only call done once in each

* [DI-2414] test: fix test cases

* [DI-2414] nit: update logic for version

* [DI-2414] nit: remove use strict from test cases

* [DI-2414] chore: make code pretty
* Moving to Typedoc and handcrafted changes

* Prettier changes
Corrects some strict Typescript issues and simplifies the implementation.
* [DI-2426] remove signature overloading
@claudiachua claudiachua added the code-generation issue deals with generated code label Jan 13, 2023
@childish-sambino childish-sambino changed the base branch from 4.0.0-rc to main January 13, 2023 21:36
@claudiachua
Copy link

Hi @mariomui , Thanks for your PR. However, the changes are to generated code so we'll have to make changes in the generator. We have this on our internal backlog (DI-2544).

@mariomui mariomui closed this Jan 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-generation issue deals with generated code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants