Skip to content

Commit a6d7676

Browse files
2.13.0 RC (#197)
* export sorts * deprecation code fixed * tests compiling updated * Version 2 API updates * Version 3 API updates * Service Desk API updates * README updated
1 parent 429a6eb commit a6d7676

File tree

276 files changed

+3240
-2174
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+3240
-2174
lines changed

.eslintrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"browser": true
1818
},
1919
"rules": {
20+
"arrow-parens": ["error", "as-needed"],
2021
"@typescript-eslint/lines-between-class-members": "off",
2122
"max-len": "off",
2223
"class-methods-use-this": "off",

.npmignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ coverage
1010
.DS_Store
1111
yarn.lock
1212
yarn-error.log
13-
tsconfig.tests.json
13+
tsconfig.lint.json
1414
.env
1515
.env.example
1616
.prettierrc

CHANGELOG.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
# Jira.js changelog
22

3-
### 2.x.x
3+
### 2.13.0
4+
5+
- Service Desk:
6+
- `getAttachmentContent` method added to `Request` Service Desk API.
7+
- `getAttachmentThumbnail` method added to `Request` Service Desk API.
8+
- Version 2, Version 3:
9+
- `IssueAdjustmentsApps` API added.
10+
- `groupId` property added to `getFiltersPaginated` method in `Filters` API.
11+
- `groupId` property added to `addSharePermission` method in `FilterSharing` API.
12+
13+
### 2.12.0
414

515
- New error handling feature added.
616
- Readme improved.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ Available groups:
244244
- [groups](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-groups/#api-group-groups)
245245
- [instanceInformation](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-instance-information/#api-group-instance-information)
246246
- [issues](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issues/#api-group-issues)
247+
- [issueAdjustmentsApps](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-adjustments--apps-/#api-group-issue-adjustments--apps-)
247248
- [issueAttachments](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-attachments/#api-group-issue-attachments)
248249
- [issueComments](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-comments/#api-group-issue-comments)
249250
- [issueCustomFieldConfigurationApps](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-issue-custom-field-configuration--apps-/#api-group-issue-custom-field-configuration--apps-)
@@ -329,6 +330,7 @@ Available groups:
329330
- [groups](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-group-groups)
330331
- [instanceInformation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-instance-information/#api-group-instance-information)
331332
- [issues](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-group-issues)
333+
- [issueAdjustmentsApps](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-adjustments--apps-/#api-group-issue-adjustments--apps-)
332334
- [issueAttachments](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-group-issue-attachments)
333335
- [issueComments](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-group-issue-comments)
334336
- [issueCustomFieldConfigurationApps](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-configuration--apps-/#api-group-issue-custom-field-configuration--apps-)

package-lock.json

Lines changed: 858 additions & 567 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jira.js",
3-
"version": "2.12.0",
3+
"version": "2.13.0",
44
"description": "jira.js is a powerful Node.JS/Browser module that allows you to interact with the Jira API very easily",
55
"main": "out/index.js",
66
"types": "out/index.d.ts",
@@ -31,46 +31,49 @@
3131
"lint:fix": "npm run lint:tests -- --fix && npm run lint:src:agile -- --fix && npm run lint:src:clients -- --fix && npm run lint:src:services -- --fix && npm run lint:src:version2 -- --fix && npm run lint:src:version3 -- --fix && npm run lint:src:serviceDesk -- --fix && npm run lint:src:files -- --fix",
3232
"doc": "typedoc --name \"Jira.js - Jira Cloud API library\" --out docs ./src/index.ts --plugin typedoc-plugin-extras --footerDate --footerTime --footerTypedocVersion --favicon https://svgshare.com/i/bHF.svg",
3333
"test": "npm run test:unit && npm run test:integration",
34-
"test:unit": "ava --timeout=2m tests/unit",
34+
"test:unit": "ava tests/unit",
3535
"test:integration": "ava --timeout=2m --fail-fast --no-worker-threads -c 1 -s tests/integration/**/*.test.ts"
3636
},
3737
"ava": {
3838
"extensions": [
3939
"ts"
4040
],
4141
"require": [
42-
"ts-node/register",
42+
"@swc-node/register",
4343
"dotenv/config"
44-
]
44+
],
45+
"environmentVariables": {
46+
"SWC_NODE_PROJECT": "./tsconfig.lint.json"
47+
}
4548
},
4649
"devDependencies": {
50+
"@swc-node/register": "^1.4.2",
4751
"@types/express": "^4.17.13",
48-
"@types/node": "^17.0.23",
52+
"@types/node": "^17.0.27",
4953
"@types/oauth": "^0.9.1",
5054
"@types/sinon": "^10.0.11",
51-
"@typescript-eslint/eslint-plugin": "^5.16.0",
52-
"@typescript-eslint/parser": "^5.16.0",
53-
"ava": "^4.1.0",
55+
"@typescript-eslint/eslint-plugin": "^5.21.0",
56+
"@typescript-eslint/parser": "^5.21.0",
57+
"ava": "^4.2.0",
5458
"dotenv": "^16.0.0",
55-
"eslint": "^8.12.0",
59+
"eslint": "^8.14.0",
5660
"eslint-config-airbnb": "^19.0.4",
57-
"eslint-config-airbnb-typescript": "^16.1.4",
58-
"eslint-import-resolver-typescript": "^2.7.0",
59-
"eslint-plugin-import": "^2.25.4",
61+
"eslint-config-airbnb-typescript": "^17.0.0",
62+
"eslint-import-resolver-typescript": "^2.7.1",
63+
"eslint-plugin-import": "^2.26.0",
6064
"eslint-plugin-sort-exports": "^0.6.0",
61-
"prettier": "^2.6.1",
62-
"prettier-plugin-jsdoc": "^0.3.33",
63-
"sinon": "^13.0.1",
64-
"ts-node": "^10.7.0",
65-
"typedoc": "^0.22.13",
65+
"prettier": "^2.6.2",
66+
"prettier-plugin-jsdoc": "^0.3.38",
67+
"sinon": "^13.0.2",
68+
"typedoc": "^0.22.15",
6669
"typedoc-plugin-extras": "^2.2.3",
6770
"typescript": "^4.6.3"
6871
},
6972
"dependencies": {
7073
"atlassian-jwt": "^2.0.2",
71-
"axios": "^0.26.1",
74+
"axios": "^0.27.0",
7275
"form-data": "^4.0.0",
7376
"oauth": "^0.9.15",
74-
"tslib": "^2.3.1"
77+
"tslib": "^2.4.0"
7578
}
7679
}

src/agile/board.ts

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,10 @@ export class Board {
4343

4444
/**
4545
* Creates a new board. Board name, type and filter ID is required. <ul> <li><code>name</code> - Must be less than 255
46-
* characters.</li> <li><code>type</code> - Valid values: scrum, kanban</li> <li><code>filterId</code> - ID of a filter that the user has permissions to view. Note, if the user does not have the 'Create shared objects'
47-
* permission and tries to create a shared board, a private board will be created instead (remember that board sharing depends on the filter sharing).</li>
48-
* <li><code>location</code> - The container that the board will be located in. <code>location</code> must include the <code>type</code> property (Valid values: project, user).
46+
* characters.</li> <li><code>type</code> - Valid values: scrum, kanban</li> <li><code>filterId</code> - ID of a
47+
* filter that the user has permissions to view. Note, if the user does not have the 'Create shared objects'
48+
* permission and tries to create a shared board, a private board will be created instead (remember that board sharing
49+
* depends on the filter sharing).</li> <li><code>location</code> - The container that the board will be located in. <code>location</code> must include the <code>type</code> property (Valid values: project, user).
4950
* If choosing 'project', then a project must be specified by a <code>projectKeyOrId</code> property in <code>location</code>.
5051
* If choosing 'user', the current user is chosen by default. The <code>projectKeyOrId</code> property should not be provided.
5152
* </li>
@@ -71,9 +72,10 @@ export class Board {
7172
async createBoard<T = Models.CreateBoard>(parameters: Parameters.CreateBoard, callback: Callback<T>): Promise<void>;
7273
/**
7374
* Creates a new board. Board name, type and filter ID is required. <ul> <li><code>name</code> - Must be less than 255
74-
* characters.</li> <li><code>type</code> - Valid values: scrum, kanban</li> <li><code>filterId</code> - ID of a filter that the user has permissions to view. Note, if the user does not have the 'Create shared objects'
75-
* permission and tries to create a shared board, a private board will be created instead (remember that board sharing depends on the filter sharing).</li>
76-
* <li><code>location</code> - The container that the board will be located in. <code>location</code> must include the <code>type</code> property (Valid values: project, user).
75+
* characters.</li> <li><code>type</code> - Valid values: scrum, kanban</li> <li><code>filterId</code> - ID of a
76+
* filter that the user has permissions to view. Note, if the user does not have the 'Create shared objects'
77+
* permission and tries to create a shared board, a private board will be created instead (remember that board sharing
78+
* depends on the filter sharing).</li> <li><code>location</code> - The container that the board will be located in. <code>location</code> must include the <code>type</code> property (Valid values: project, user).
7779
* If choosing 'project', then a project must be specified by a <code>projectKeyOrId</code> property in <code>location</code>.
7880
* If choosing 'user', the current user is chosen by default. The <code>projectKeyOrId</code> property should not be provided.
7981
* </li>
@@ -225,8 +227,8 @@ export class Board {
225227

226228
/**
227229
* Get the board configuration. The response contains the following fields: <ul> <li><code>id</code> - ID of the
228-
* board.</li> <li><code>name</code> - Name of the board.</li> <li><code>filter</code> - Reference to the filter used by the given board.</li>
229-
* <li><code>location</code> - Reference to the container that the board is located in.
230+
* board.</li> <li><code>name</code> - Name of the board.</li> <li><code>filter</code> - Reference to the filter used
231+
* by the given board.</li> <li><code>location</code> - Reference to the container that the board is located in.
230232
* Includes the container type (Valid values: project, user).
231233
* </li>
232234
* <li><code>subQuery</code> (Kanban only) - JQL subquery used by the given board.</li>
@@ -249,8 +251,8 @@ export class Board {
249251
): Promise<void>;
250252
/**
251253
* Get the board configuration. The response contains the following fields: <ul> <li><code>id</code> - ID of the
252-
* board.</li> <li><code>name</code> - Name of the board.</li> <li><code>filter</code> - Reference to the filter used by the given board.</li>
253-
* <li><code>location</code> - Reference to the container that the board is located in.
254+
* board.</li> <li><code>name</code> - Name of the board.</li> <li><code>filter</code> - Reference to the filter used
255+
* by the given board.</li> <li><code>location</code> - Reference to the container that the board is located in.
254256
* Includes the container type (Valid values: project, user).
255257
* </li>
256258
* <li><code>subQuery</code> (Kanban only) - JQL subquery used by the given board.</li>
@@ -541,8 +543,9 @@ export class Board {
541543

542544
/**
543545
* Returns all projects that are statically associated with the board, for the given board ID. Returned projects are
544-
* ordered by the name. </p> A project is associated with a board if the board filter contains reference the project.</p> The board filter contains reference the project only if JQL query guarantees that returned issues will be
545-
* returned from the project set defined in JQL. For instance the query <code>project in (ABC, BCD) AND reporter =
546+
* ordered by the name. </p> A project is associated with a board if the board filter contains reference the
547+
* project.</p> The board filter contains reference the project only if JQL query guarantees that returned issues will
548+
* be returned from the project set defined in JQL. For instance the query <code>project in (ABC, BCD) AND reporter =
546549
* admin</code> have reference to ABC and BCD projects but query <code>project in (ABC, BCD) OR reporter =
547550
* admin</code> doesn't have reference to any project. </p>
548551
*/
@@ -552,8 +555,9 @@ export class Board {
552555
): Promise<void>;
553556
/**
554557
* Returns all projects that are statically associated with the board, for the given board ID. Returned projects are
555-
* ordered by the name. </p> A project is associated with a board if the board filter contains reference the project.</p> The board filter contains reference the project only if JQL query guarantees that returned issues will be
556-
* returned from the project set defined in JQL. For instance the query <code>project in (ABC, BCD) AND reporter =
558+
* ordered by the name. </p> A project is associated with a board if the board filter contains reference the
559+
* project.</p> The board filter contains reference the project only if JQL query guarantees that returned issues will
560+
* be returned from the project set defined in JQL. For instance the query <code>project in (ABC, BCD) AND reporter =
557561
* admin</code> have reference to ABC and BCD projects but query <code>project in (ABC, BCD) OR reporter =
558562
* admin</code> doesn't have reference to any project. </p>
559563
*/

src/agile/issue.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,7 @@ export class Issue {
106106
* on a issue. <p> Note that this resource changes the estimation field of the issue regardless of appearance the
107107
* field on the screen. </p> <p> Original time tracking estimation field accepts estimation in formats like "1w",
108108
* "2d", "3h", "20m" or number which represent number of minutes. However, internally the field stores and returns the
109-
* estimation as a number of seconds. </p>
110-
* <p>
109+
* estimation as a number of seconds. </p> <p>
111110
* The field used for estimation on the given board can be obtained from <a href="#agile/1.0/board-getConfiguration">board configuration resource</a>.
112111
* More information about the field are returned by
113112
* <a href="#api-rest-api-<ver>-issue-issueIdOrKey-editmeta-get">edit meta resource</a>
@@ -123,8 +122,7 @@ export class Issue {
123122
* on a issue. <p> Note that this resource changes the estimation field of the issue regardless of appearance the
124123
* field on the screen. </p> <p> Original time tracking estimation field accepts estimation in formats like "1w",
125124
* "2d", "3h", "20m" or number which represent number of minutes. However, internally the field stores and returns the
126-
* estimation as a number of seconds. </p>
127-
* <p>
125+
* estimation as a number of seconds. </p> <p>
128126
* The field used for estimation on the given board can be obtained from <a href="#agile/1.0/board-getConfiguration">board configuration resource</a>.
129127
* More information about the field are returned by
130128
* <a href="#api-rest-api-<ver>-issue-issueIdOrKey-editmeta-get">edit meta resource</a>

src/agile/models/boardFeature.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @deprecated Use BoardFeature instead. */
22
export type BoardFeatureBean = BoardFeature;
33

4-
/** @deprecated Use *Feature* model instead. */
4+
/** @deprecated Use _Feature_ model instead. */
55
export interface BoardFeature {
66
boardFeature?: string;
77
boardId?: number;

src/agile/models/boardFeatureResponse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/** @deprecated Use BoardFeatureResponse instead. */
22
export type BoardFeatureResponseBean = BoardFeatureResponse;
33

4-
/** @deprecated Use *FeatureResponse* model instead. */
4+
/** @deprecated Use _FeatureResponse_ model instead. */
55
export interface BoardFeatureResponse {
66
features?: {
77
boardFeature?: string;

0 commit comments

Comments
 (0)