question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Property 'calls' does not exist on type 'Vonage'

See original GitHub issue

Issue

Vonage in relation to Typescript. After initializing a Vonage object, the calls property is not recognized as being part of the object, since it’s not defined in d.ts.

Code

import Vonage from '@vonage/server-sdk';

const vonage = new Vonage({
    apiKey: process.env.VONAGE_API_KEY,
    apiSecret: process.env.VONAGE_API_SECRET,
    applicationId: process.env.VONAGE_APPLICATION_ID,
});

vonage.calls.create({...}, (error: any, response: any) => {...}).

Error

The calls in vonage.calls.create is underlined and specifies the following problem: Property 'calls' does not exist on type 'Vonage'.

Request

Is there any short-term plan on adding typing for this as well? Or is there a workaround that I am not aware of? Besides using // @ts-ignore.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
manchuckcommented, Dec 13, 2022

@serfermorhc and @speak-jure Apologies as we are behind on updating the code snippets and documentation. calls is no longer a property on numbers. We updated the function names to be more descriptive. Instead of calling vonage.numbers.calls.create, you can call vonage.numbers.createOutboundCall. I have added a migration guide that should explain all the changes.

Another point of note, we updated most of the functions to accept a parameters object instead of just passing in parameters. We are looking to build out technical documentation for all our functions. Once that is ready to go, you will be able to get a more detailed rundown of what needs to be passed into each call.

1reaction
speak-jurecommented, Mar 14, 2022

Hey Kelly!

Thank you for your reply. I assumed it’s an upcoming improvement, but I’m glad to have gotten your confirmation. I have a workaround set up by using @ts-ignore, so I agree that my request is more of a nice to have than anything else.

Keep up the good work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to resolve 'calls' does not exist on type '() => any'
It looks like SshRefService currently defines getClient() : any . As a result, it's correctly throwing this error. This is happening because ...
Read more >
DocStrap Source: modules/nxmCall.js - Vonage Developer
@event Application#call:status:changed * @property {NXMCall} nxmCall - the actual event * @example <caption>listen for nxmCall status changed events on ...
Read more >
Error - OpenTok.js | Vonage Video API Developer
One of the signal properties — data, type, or to — is invalid. Or the data cannot be parsed as JSON. 404, The...
Read more >
Pages - Vonage Contact Center PILOT Product Documentation for ...
Vonage Contact Center can record all inbound and outbound calls. ... Choose from different media types available in your account, such as Phone, ......
Read more >
Number Insight API - Vonage Developer
There are three levels of Number Insight API available: Basic, Standard and Advanced. ... If a number does not have a country code...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found