Skip to content

its-dart/dart-tools-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

146aee1 · Mar 24, 2025

History

21 Commits
Feb 22, 2025
Feb 22, 2025
Jan 21, 2025
Dec 30, 2024
Dec 30, 2024
Feb 22, 2025
Dec 30, 2024
Mar 24, 2025
Dec 30, 2024
Jan 21, 2025
Jan 21, 2025
Jan 21, 2025
Dec 30, 2024
Mar 24, 2025

Repository files navigation

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.