athombv / homey-web-api-issues

This issue tracker is for Homey Developers using the Web API.
4 stars 1 forks source link

Typescript definitions are broken #17

Open spkesDE opened 1 year ago

spkesDE commented 1 year ago

Hey,

the TS definitions are broken. I bet there is more then these examples Current definition: new HomeyAPIApp(this.homey, false); Right definition: new HomeyAPIApp({ homey: this.homey, debug?: false })

Also all sub definition are missing e.g. api.insights, api.devices and of course all sub methods.

OlivierZal commented 1 year ago

Hi,

Is there any update on this?

I confirm both issues:

mligtenberg commented 1 year ago

Hi,

Again, any update on this? I tried everything up till 3.0.0-rc.14, and I really don't want too do some custom typescript definitions stuff. But I feel I have too as the current once are completely broken.

spkesDE commented 1 year ago

Athom said they will come when there done with the V3 version. You could use it as any for a temp fix

jeroenwienk commented 1 year ago

Since createAppAPI should be used I assume this is no longer an issue.

OlivierZal commented 1 year ago

A problem also exist with createAppApi: it does not exist on any of the types HomeyAPIxxx

spkesDE commented 1 year ago

image

jeroenwienk commented 1 year ago

3.0.8 HomeyAPI should now have 2 static methods on its type.

image

spkesDE commented 1 year ago

Can confirm its working, but createAppAPI should return an HomeyAPI object not an any object. Also the Managers objects are missing in the HomeyAPI object and mostlikey the sub defintions e.g. await this.api.insights.getLogEntries(opts)

image image image

OlivierZal commented 1 year ago

@jeroenwienk, to ease the follow-up, I created separate issues:

shingoo79 commented 1 month ago

Any news on that topic?