Skip to content

Latest commit

 

History

History
98 lines (67 loc) · 2.63 KB

README.md

File metadata and controls

98 lines (67 loc) · 2.63 KB

Dart Tools TS

NPM License

Dart is Project Management powered by AI.

dart-tools-ts is the Dart TypeScript/JavaScript Library. It enables direct integration with Dart through TypeScript or JavaScript.

Installation

npm i dart-tools-ts

Usage

Authentication of the Dart Client

Visit your Dart profile and save the authentication token into the DART_TOKEN environment variable.

Importing

To use this package in a CommonJS (CJS) script, you can require the module with

const dart = require("dart-tools-ts");

To use this package in an ECMAScript Module (MJS) script, you can import the module with

import * as dart from "dart-tools-ts";

Example

// Get all tasks assigned to someone with a name or email like Peter
import { type PaginatedTaskList, TasksService } from "dart-tools-ts";
const filteredTasks: PaginatedTaskList = await TasksService.tasksList("Peter");

// Create a new task called 'Update the landing page' with priority 'Critical' (i.e. p0)
import { OperationModelKind, OperationKind, Priority, type TaskCreate, TransactionKind, TransactionsService } from "dart-tools-ts";

const taskCreate: TaskCreate = {
  title: "Update the landing page",
  priority: Priority.CRITICAL,
};
const createResult = await TransactionsService.transactionsCreate({
  items: [{
    kind: TransactionKind.TASK_CREATE,
    operations: [{
      kind: OperationKind.CREATE,
      model: OperationModelKind.TASK,
      data: taskCreate,
    }],
  }],
});

Help and Resources

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License.