Giter Club home page Giter Club logo

jira.js's Introduction

JavaScript JIRA API Client

A JavaScript/TypeScript wrapper for the JIRA REST API

npm Downloads Minizipped size dependencies Status devDependencies Status Build Status

Installation

Install with the npm:

$ npm install jira.js

Install with the yarn:

$ yarn add jira.js

Examples

Create the JIRA client

// ES5
var { Client } = require("jira.js");

// ES6
import { Client } from "jira.js";

// Initialize
var client = new Client({
  host: "https://jira.somehost.com"
});

Get all projects

// ES5/ES6
client.projects
  .getAllProjects()
  .then(projects => console.log(projects))
  .catch(error => console.log(error));

// ES7
async function getProjects() {
  const projects = await client.projects.getAllProjects();

  console.log(projects);

  return projects;
}

Authorization

Basic authorization

const client = new Client({
  host: "https://jira.somehost.com",
  authentication: {
    basic: {
      username: "MyUsername",
      apiToken: "My Password or API Token"
    }
  }
});

JWT authentication

const client = new Client({
  host: 'https://jira.somehost.com',
  authentication: {
    jwt: {
      iss: 'id';
      secret: 'secret key';
    }
  }
});

OAuth2.0 authentication

const client = new Client({
  host: "https://jira.somehost.com",
  authentication: {
    accessToken: "my access token"
  }
});

Documentation

Can't find what you need in the readme? Check out our documentation here: https://mrrefactoring.github.io/jira.js/

Road map

  • Response models
  • Method names reducing

Changelog

1.6.1

  • FIX: Added the ability to use the library without authorization #75

1.6.0

  • FEATURE: New API IssueTypeScreenSchemes added
  • FEATURE: New API ProjectEmail added

  • FEATURE: Method bulkGetGroups added to Groups
  • FEATURE: Method restoreDeletedProject added to Projects
  • FEATURE: Method createIssueTypeScheme added to IssueTypeSchemes
  • FEATURE: Method deleteIssueTypeScheme added to IssueTypeSchemes
  • FEATURE: Method updateIssueTypeScheme added to IssueTypeSchemes
  • FEATURE: Method addIssueTypesToIssueTypeScheme added to IssueTypeSchemes
  • FEATURE: Method deleteIssueTypeFromIssueTypeScheme added to IssueTypeSchemes

  • FEATURE: Property id added to IssueFieldConfigurations.getAllFieldConfigurations
  • FEATURE: Property sortByOpsBarAndStatus added to Issues.getTransitions
  • FEATURE: Property accountId added to Permissions.getBulkPermissions

  • DEPRECATION: Method getIssueTypeScreenSchemes are deprecated in Screens
  • DEPRECATION: Method getIssueTypeScreenSchemeItems are deprecated in Screens
  • DEPRECATION: Method getIssueTypeScreenSchemesForProjects are deprecated in Screens

1.5.0

  • FEATURE: Method getAllFieldConfigurationSchemes added to IssueFieldConfigurations
  • FEATURE: Method getFieldConfigurationSchemesForProjects added to IssueFieldConfigurations
  • FEATURE: Property fieldConfigurationSchemeId added to issueFieldConfigurations.getFieldConfigurationIssueTypeItems
  • FEATURE: Method getIssueSecurityLevelMembers added to IssueSecurityLevel
  • FEATURE: Issue type schemes API added
  • FEATURE: Method getLicensedProjectTypes added to ProjectTypes
  • FEATURE: Method deleteProjectAsynchronously added to Projects
  • FEATURE: Method getIssueTypeScreenSchemes added to Screens
  • FEATURE: Method getAllScreenSchemes renamed to getScreenSchemes
  • DEPRECATION: getAllScreenSchemes are deprecated (Renamed to getScreenSchemes)

1.4.0

  • FEATURE: Now requests where there are no required parameters do not have to pass an empty object to make a request
  • FEATURE: dashboards.createDashboard was added
  • FEATURE: dashboards.updateDashboard was added
  • FEATURE: dashboards.deleteDashboard was added
  • FEATURE: dashboards.copyDashboard was added
  • FEATURE: screens.getIssueTypeScreenSchemesForProjects was added
  • FEATURE: issueFieldConfigurations.getAllFieldConfiguration was added
  • FEATURE: issueFieldConfigurations.getFieldConfigurationItems was added
  • FEATURE: issueFieldConfigurations.getFieldConfigurationIssueTypeItems was added
  • FEATURE: In issues.getTransitions was added includeUnavailableTransitions property
  • DEPRECATION: issueFields.getFieldConfigurationItems are deprecated (Removed from official API, use issueFieldConfigurations.getFieldConfigurationItems). Will be removed in next major version

1.3.0

  • FEATURE: jiraExpressions.analyseJiraExpression was added
  • FEATURE: screens.getIssueTypeScreenSchemeItems was added
  • FEATURE: In projects.getProjectsPaginated was added status property
  • FEATURE: In projects.deleteProject was added enableUndo property
  • DEPRECATION: timeTracking.disableTimeTracking are deprecated (Removed from official API). Will be removed in next major version

1.2.0

  • FEATURE: issueFields.getAllFieldConfigurations added as experimental
  • FEATURE: issueFields.getFieldConfigurationItems added as experimental
  • IMPROVEMENT: dependencies update

1.1.1

  • FIX: strictGDPR feature fixed
  • FIX: Cannot read property 'Authorization' of undefined fixed

1.1.0

  • FEATURE: strictGDPR property added to Config. Allows use only GDPR-compliant functionality
  • FEATURE: users.getAllUsersDefault added
  • FEATURE: issueCustomFieldOptions.updateCustomFieldOptions added as experimental
  • DEPRECATION: projectRoleActors.getActorsCountForProjectRole are deprecated (Removed from official API). Will be removed in next major version

1.0.3

  • DEPRECATION: permissionsSchemes and issueAttachment are deprecated
  • IMPROVEMENT: agile api typings improved
  • IMPROVEMENT: dependencies update
  • FIX: Authorization parameter excluded for agile API in the request body

1.0.2

  • FIX: JWT Authentication default expire time added
  • IMPROVEMENT: modified atlassian-jwt (removed lodash from dependencies, bundle size decreased)
  • IMPROVEMENT: small tests for authentication added

1.0.1

  • FIX: documentation link fixed

1.0.0

  • RELEASE

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.