https://github.com/udamir/youtrack-workflow-api-types
TypeScript definitions for the JetBrains YouTrack Scripting API
https://github.com/udamir/youtrack-workflow-api-types
typescript-definitions youtrack youtrack-workflow
Last synced: 3 months ago
JSON representation
TypeScript definitions for the JetBrains YouTrack Scripting API
- Host: GitHub
- URL: https://github.com/udamir/youtrack-workflow-api-types
- Owner: udamir
- License: mit
- Created: 2025-05-11T18:03:49.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2025-08-20T20:00:33.000Z (5 months ago)
- Last Synced: 2025-09-22T03:51:37.472Z (4 months ago)
- Topics: typescript-definitions, youtrack, youtrack-workflow
- Homepage:
- Size: 113 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# JetBrains YouTrack Scripting API TypeScript Definitions

TypeScript definitions for the JetBrains YouTrack Scripting API.
## Installation
```shell
npm install --save-dev youtrack-workflow-api-types
```
## Usage
Add `paths` to your project's `tsconfig.json` with following content:
```json
{
"compilerOptions": {
"checkJs": true,
"allowJs": true,
"resolveJsonModule": true,
"moduleResolution": "node",
"target": "es2021",
"module": "commonjs",
"baseUrl": ".",
"paths": {
"@jetbrains/youtrack-scripting-api": ["node_modules/youtrack-workflow-api-types"],
"@jetbrains/youtrack-scripting-api/*": ["node_modules/youtrack-workflow-api-types/*"]
}
},
"include": [
"**/*.js"
],
"exclude": [
"node_modules"
]
}
```
## Generic types
### Issue
```typescript
/**
* Represents an issue in YouTrack.
* @template F The type of the issue fields.
* @template W The type of the workflow.
*/
export class Issue extends BaseEntity
```
### IssueWorkItem
```typescript
/**
* Represents a work item that has been added to an issue.
* @template T The type of the work item.
*/
export class IssueWorkItem extends BaseWorkItem
```
## Autogenerated project custom fields and work item types definitions
You can use [`youtrack-workflow-cli`](https://github.com/udamir/youtrack-workflow-cli) tool to generate project custom fields and work item types definitions.
First, you need to initialize a new project:
```shell
npx youtrack-workflow-cli init [project-name]
cd [project-name]
npm install
```
Then, you can generate types:
```shell
npx ytw types [...]
```
## License
MIT