nylas
Version:
A NodeJS wrapper for the Nylas REST API for email, contacts, and calendar.
59 lines (58 loc) • 1.42 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Grants = void 0;
const resource_js_1 = require("./resource.js");
/**
* Nylas Grants API
*
* The Nylas Grants API allows for the management of grants.
*/
class Grants extends resource_js_1.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,
});
}
}
exports.Grants = Grants;