nylas / nylas-nodejs

A NodeJS wrapper for the Nylas REST API for email, contacts, and calendar.
MIT License
166 stars 116 forks source link

Grants are unavailable in v3 SDK? #521

Closed KazimirPodolski closed 7 months ago

KazimirPodolski commented 7 months ago

Describe the bug Grants are missing from top-level nylas object. Makes it impossible to use grants in Deno as you cannot import grants.js separately.

To Reproduce

import Nylas from 'nylas'

const nylas = new Nylas({apiKey: Deno.env.get('NYLAS_API_KEY')!})
nylas.grants // <---- doesn't exist, how to work with grants?

SDK Version: 7.0.0-beta.3

Additional context This is a blocker for us as grants webhook schema doesn't include grant data and the only way to get info on new users is grants endpoint.

KazimirPodolski commented 7 months ago

Actually it probably won't work under Node too.

"exports": {
  "import": "./lib/esm/nylas.js",
  "require": "./lib/cjs/nylas.js",
  "types": "./lib/types/nylas.d.ts"
}
KazimirPodolski commented 7 months ago

grants are in nylas.auth, not in nylas...