attio-js
Version:
Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.
52 lines • 1.82 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { commentsCreate } from "../funcs/commentsCreate.js";
import { commentsDelete } from "../funcs/commentsDelete.js";
import { commentsGet } from "../funcs/commentsGet.js";
import { ClientSDK } from "../lib/sdks.js";
import { unwrapAsync } from "../types/fp.js";
export class Comments extends 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 unwrapAsync(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 unwrapAsync(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 unwrapAsync(commentsDelete(this, request, options));
}
}
//# sourceMappingURL=comments.js.map