nylas / nylas-nodejs

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

Add support for the detect provider endpoint #548

Open mrashed-dev opened 4 months ago

mrashed-dev commented 4 months ago

Description

This PR adds support for the /connect/detect_provider endpint.

Usage

To get the provider:

const Nylas = require('nylas');

// Initialize an instance of the Nylas SDK using the client credentials
Nylas.config({
  clientId: "CLIENT_ID",
  clientSecret: "CLIENT_SECRET",
});

// Pass the email to the detect provider function
const detectProviderRes = await Nylas.detectProvider("example@email.com");

License

I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.

codecov[bot] commented 4 months ago

Codecov Report

Attention: Patch coverage is 38.88889% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 91.44%. Comparing base (605d691) to head (4fec930).

Files Patch % Lines
src/models/detect-provider-response.ts 45.45% 6 Missing :warning:
src/nylas.ts 28.57% 5 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## v6 #548 +/- ## ========================================== - Coverage 91.79% 91.44% -0.36% ========================================== Files 62 63 +1 Lines 2670 2688 +18 Branches 490 491 +1 ========================================== + Hits 2451 2458 +7 - Misses 218 229 +11 Partials 1 1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.