attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
56 lines • 2.09 kB
JavaScript
;
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.Comments = void 0;
const commentsCreate_js_1 = require("../funcs/commentsCreate.js");
const commentsDelete_js_1 = require("../funcs/commentsDelete.js");
const commentsGet_js_1 = require("../funcs/commentsGet.js");
const sdks_js_1 = require("../lib/sdks.js");
const fp_js_1 = require("../types/fp.js");
class Comments extends sdks_js_1.ClientSDK {
/**
* Create a comment
*
* @remarks
* Creates a new comment related to an existing thread, record or entry.
*
* To create comments on records, you will need the `object_configuration:read` and `record_permission:read` scopes.
*
* To create comments on list entries, you will need the `list_configuration:read` and `list_entry:read` scopes.
*
* Required scopes: `comment:read-write`.
*/
async create(request, options) {
return (0, fp_js_1.unwrapAsync)((0, commentsCreate_js_1.commentsCreate)(this, request, options));
}
/**
* Get a comment
*
* @remarks
* Get a single comment by ID.
*
* To view comments on records, you will need the `object_configuration:read` and `record_permission:read` scopes.
*
* To view comments on list entries, you will need the `list_configuration:read` and `list_entry:read` scopes.
*
* Required scopes: `comment:read`.
*/
async get(request, options) {
return (0, fp_js_1.unwrapAsync)((0, commentsGet_js_1.commentsGet)(this, request, options));
}
/**
* Delete a comment
*
* @remarks
* Deletes a comment by ID. If deleting a comment at the head of a thread, all messages in the thread are also deleted.
*
* Required scopes: `comment:read-write`.
*/
async delete(request, options) {
return (0, fp_js_1.unwrapAsync)((0, commentsDelete_js_1.commentsDelete)(this, request, options));
}
}
exports.Comments = Comments;
//# sourceMappingURL=comments.js.map