nylas
Version:
A NodeJS wrapper for the Nylas REST API for email, contacts, and calendar.
55 lines (54 loc) • 1.28 kB
JavaScript
import { Resource } from './resource.js';
/**
* Nylas Grants API
*
* The Nylas Grants API allows for the management of grants.
*/
export class Grants extends Resource {
/**
* Return all Grants
* @return The list of Grants
*/
async list({ overrides, queryParams } = {},
/**
* @deprecated Use `queryParams` instead.
*/
_queryParams) {
return super._list({
queryParams: queryParams ?? _queryParams ?? undefined,
path: `/v3/grants`,
overrides: overrides ?? {},
});
}
/**
* Return a Grant
* @return The Grant
*/
find({ grantId, overrides, }) {
return super._find({
path: `/v3/grants/${grantId}`,
overrides,
});
}
/**
* Update a Grant
* @return The updated Grant
*/
update({ grantId, requestBody, overrides, }) {
return super._updatePatch({
path: `/v3/grants/${grantId}`,
requestBody,
overrides,
});
}
/**
* Delete a Grant
* @return The deletion response
*/
destroy({ grantId, overrides, }) {
return super._destroy({
path: `/v3/grants/${grantId}`,
overrides,
});
}
}