RevenueCat/cordova-plugin-purchases

@ionic-native/purchases needs to be updated

Closed this issue ยท 9 comments

Cyral commented

The types in @ionic-native/purchases are not updated for the latest release, meaning new methods like logIn or logOut cannot be used in TypeScript projects.

Hi! Thanks for reporting! We did open up a PR to the ionic-native repo last week: danielsogl/awesome-cordova-plugins#3702

Unfortuntely, merging it is out of our hands, and wait times have been ~2 months for getting our PRs reviewed and merged on that repo.

Hopefully it'll be a bit quicker this time, but since we don't have control over it I can't make any promises.

I'll keep the ticket open in the meantime

Cyral commented

Thanks for the quick response. I am doing (Purchases as any) for now as a work around for now.

Cyral commented

My bad, I thought @ionic-native/purchases was just a .d.ts type definition file but it actually contains a .ts file with code, so doing (Purchases as any) doesn't actually work. Will have to wait until they merge it.

that's a bummer. I truly wish we had a way of getting this merged faster. Thanks for reporting back!

update here: the relevant PR has been merged! This should be fixed. Closing now, but let us know if you run into any more issues.
Thanks for your patience!

Cyral commented

update here: the relevant PR has been merged! This should be fixed. Closing now, but let us know if you run into any more issues.
Thanks for your patience!

Great! I will implement the update soon. Quick question... does the new account transfer logic send the appropriate webhooks so that the subscription from the old account is cancelled and the new account is subscribed?

Hi @Cyral you'll receive a transfer webhook if you login with a 2nd user and have restore behavior set to transfer. Let me know if I misunderstood your question.

Cyral commented

@beylmk I didn't see there was a new webhook type for this, thanks, that answers the question.