UNPKG

attio-js

Version:

Developer-friendly & type-safe JS/TS SDK based on the official OpenAPI spec of Attio.

70 lines 2.31 kB
/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { tasksCreate } from "../funcs/tasksCreate.js"; import { tasksDelete } from "../funcs/tasksDelete.js"; import { tasksGet } from "../funcs/tasksGet.js"; import { tasksList } from "../funcs/tasksList.js"; import { tasksUpdate } from "../funcs/tasksUpdate.js"; import { ClientSDK } from "../lib/sdks.js"; import { unwrapAsync } from "../types/fp.js"; export class Tasks extends ClientSDK { /** * List tasks * * @remarks * List all tasks. Results are sorted by creation date, from oldest to newest. * * Required scopes: `task:read`, `object_configuration:read`, `record_permission:read`, `user_management:read`. */ async list(request, options) { return unwrapAsync(tasksList(this, request, options)); } /** * Create a task * * @remarks * Creates a new task. * * At present, tasks can only be created from plaintext without record reference formatting. * * Required scopes: `task:read-write`, `object_configuration:read`, `record_permission:read`, `user_management:read`. */ async create(request, options) { return unwrapAsync(tasksCreate(this, request, options)); } /** * Get a task * * @remarks * Get a single task by ID. * * Required scopes: `task:read`, `object_configuration:read`, `record_permission:read`, `user_management:read`. */ async get(request, options) { return unwrapAsync(tasksGet(this, request, options)); } /** * Update a task * * @remarks * Updates an existing task by `task_id`. At present, only the `deadline_at`, `is_completed`, `linked_records`, and `assignees` fields can be updated. * * Required scopes: `task:read-write`, `object_configuration:read`, `record_permission:read`, `user_management:read`. */ async update(request, options) { return unwrapAsync(tasksUpdate(this, request, options)); } /** * Delete a task * * @remarks * Delete a task by ID. * * Required scopes: `task:read-write`. */ async delete(request, options) { return unwrapAsync(tasksDelete(this, request, options)); } } //# sourceMappingURL=tasks.js.map