Skip to content

Commit

Permalink
Agile endpoints updated
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring committed May 12, 2024
1 parent fdb0e80 commit 4a17531
Show file tree
Hide file tree
Showing 70 changed files with 1,754 additions and 522 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Jira.js changelog

### 4.0.0

### 3.0.5

- Dependencies updated
Expand Down
24 changes: 12 additions & 12 deletions src/agile/backlog.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
import * as Parameters from './parameters';
import { Callback } from '../callback';
import { Client } from '../clients';
import { Callback } from '../callback';
import { RequestConfig } from '../requestConfig';

export class Backlog {
constructor(private client: Client) {}

/**
* Move issues to the backlog.
*
* Move issues to the backlog.\
* This operation is equivalent to remove future and active sprints from a given set of issues. At most 50 issues may
* be moved at once.
*/
async moveIssuesToBacklog<T = void>(parameters: Parameters.MoveIssuesToBacklog, callback: Callback<T>): Promise<void>;
/**
* Move issues to the backlog.
*
* Move issues to the backlog.\
* This operation is equivalent to remove future and active sprints from a given set of issues. At most 50 issues may
* be moved at once.
*/
Expand All @@ -36,18 +34,20 @@ export class Backlog {
}

/**
* Move issues to the backlog of a particular board (if they are already on that board). This operation is equivalent
* to remove future and active sprints from a given set of issues if the board has sprints If the board does not have
* sprints this will put the issues back into the backlog from the board. At most 50 issues may be moved at once.
* Move issues to the backlog of a particular board (if they are already on that board).\
* This operation is equivalent to remove future and active sprints from a given set of issues if the board has
* sprints If the board does not have sprints this will put the issues back into the backlog from the board. At most
* 50 issues may be moved at once.
*/
async moveIssuesToBacklogForBoard<T = void>(
parameters: Parameters.MoveIssuesToBacklogForBoard,
callback: Callback<T>,
): Promise<void>;
/**
* Move issues to the backlog of a particular board (if they are already on that board). This operation is equivalent
* to remove future and active sprints from a given set of issues if the board has sprints If the board does not have
* sprints this will put the issues back into the backlog from the board. At most 50 issues may be moved at once.
* Move issues to the backlog of a particular board (if they are already on that board).\
* This operation is equivalent to remove future and active sprints from a given set of issues if the board has
* sprints If the board does not have sprints this will put the issues back into the backlog from the board. At most
* 50 issues may be moved at once.
*/
async moveIssuesToBacklogForBoard<T = void>(
parameters: Parameters.MoveIssuesToBacklogForBoard,
Expand All @@ -62,8 +62,8 @@ export class Backlog {
method: 'POST',
data: {
issues: parameters.issues,
rankBeforeIssue: parameters.rankBeforeIssue,
rankAfterIssue: parameters.rankAfterIssue,
rankBeforeIssue: parameters.rankBeforeIssue,
rankCustomFieldId: parameters.rankCustomFieldId,
},
};
Expand Down
39 changes: 27 additions & 12 deletions src/agile/board.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,31 @@
import * as Models from './models';
import * as Parameters from './parameters';
import { Callback } from '../callback';
import { Client } from '../clients';
import { Callback } from '../callback';
import { Paginated } from '../paginated';
import { RequestConfig } from '../requestConfig';

export class Board {
constructor(private client: Client) {}

/** Returns all boards. This only includes boards that the user has permission to view. */
/**
* Returns all boards. This only includes boards that the user has permission to view.
*
* **Deprecation notice:** The required OAuth 2.0 scopes will be updated on February 15, 2024.
*
* - `read:board-scope:jira-software`, `read:project:jira`
*/
async getAllBoards<T = Models.GetAllBoards>(
parameters: Parameters.GetAllBoards | undefined,
callback: Callback<T>,
): Promise<void>;
/** Returns all boards. This only includes boards that the user has permission to view. */
/**
* Returns all boards. This only includes boards that the user has permission to view.
*
* **Deprecation notice:** The required OAuth 2.0 scopes will be updated on February 15, 2024.
*
* - `read:board-scope:jira-software`, `read:project:jira`
*/
async getAllBoards<T = Models.GetAllBoards>(parameters?: Parameters.GetAllBoards, callback?: never): Promise<T>;
async getAllBoards<T = Models.GetAllBoards>(
parameters?: Parameters.GetAllBoards,
Expand All @@ -34,6 +46,7 @@ export class Board {
negateLocationFiltering: parameters?.negateLocationFiltering,
orderBy: parameters?.orderBy,
expand: parameters?.expand,
projectTypeLocation: parameters?.projectTypeLocation,
filterId: parameters?.filterId,
},
};
Expand Down Expand Up @@ -101,10 +114,10 @@ export class Board {
url: '/rest/agile/1.0/board',
method: 'POST',
data: {
name: parameters.name,
type: parameters.type,
filterId: parameters.filterId,
location: parameters.location,
name: parameters.name,
type: parameters.type,
},
};

Expand Down Expand Up @@ -465,15 +478,17 @@ export class Board {
}

/**
* Move issues from the backlog to the board (if they are already in the backlog of that board). This operation either
* moves an issue(s) onto a board from the backlog (by adding it to the issueList for the board) Or transitions the
* issue(s) to the first column for a kanban board with backlog. At most 50 issues may be moved at once.
* Move issues from the backlog to the board (if they are already in the backlog of that board).\
* This operation either moves an issue(s) onto a board from the backlog (by adding it to the issueList for the board)
* Or transitions the issue(s) to the first column for a kanban board with backlog. At most 50 issues may be moved at
* once.
*/
async moveIssuesToBoard<T = void>(parameters: Parameters.MoveIssuesToBoard, callback: Callback<T>): Promise<void>;
/**
* Move issues from the backlog to the board (if they are already in the backlog of that board). This operation either
* moves an issue(s) onto a board from the backlog (by adding it to the issueList for the board) Or transitions the
* issue(s) to the first column for a kanban board with backlog. At most 50 issues may be moved at once.
* Move issues from the backlog to the board (if they are already in the backlog of that board).\
* This operation either moves an issue(s) onto a board from the backlog (by adding it to the issueList for the board)
* Or transitions the issue(s) to the first column for a kanban board with backlog. At most 50 issues may be moved at
* once.
*/
async moveIssuesToBoard<T = void>(parameters: Parameters.MoveIssuesToBoard, callback?: never): Promise<T>;
async moveIssuesToBoard<T = void>(
Expand All @@ -485,8 +500,8 @@ export class Board {
method: 'POST',
data: {
issues: parameters.issues,
rankBeforeIssue: parameters.rankBeforeIssue,
rankAfterIssue: parameters.rankAfterIssue,
rankBeforeIssue: parameters.rankBeforeIssue,
rankCustomFieldId: parameters.rankCustomFieldId,
},
};
Expand Down
2 changes: 1 addition & 1 deletion src/agile/builds.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Models from './models';
import * as Parameters from './parameters';
import { Callback } from '../callback';
import { Client } from '../clients';
import { Callback } from '../callback';
import { RequestConfig } from '../requestConfig';

export class Builds {
Expand Down
4 changes: 4 additions & 0 deletions src/agile/client/agileClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import {
Builds,
Deployments,
DevelopmentInformation,
DevopsComponents,
Epic,
FeatureFlags,
Issue,
Operations,
RemoteLinks,
SecurityInformation,
Sprint,
Expand All @@ -19,9 +21,11 @@ export class AgileClient extends BaseClient {
builds = new Builds(this);
deployments = new Deployments(this);
developmentInformation = new DevelopmentInformation(this);
devopsComponents = new DevopsComponents(this);
epic = new Epic(this);
featureFlags = new FeatureFlags(this);
issue = new Issue(this);
operations = new Operations(this);
remoteLinks = new RemoteLinks(this);
securityInformation = new SecurityInformation(this);
sprint = new Sprint(this);
Expand Down
2 changes: 1 addition & 1 deletion src/agile/deployments.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Models from './models';
import * as Parameters from './parameters';
import { Callback } from '../callback';
import { Client } from '../clients';
import { Callback } from '../callback';
import { RequestConfig } from '../requestConfig';

export class Deployments {
Expand Down
36 changes: 17 additions & 19 deletions src/agile/developmentInformation.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as Models from './models';
import * as Parameters from './parameters';
import { Callback } from '../callback';
import { Client } from '../clients';
import { Callback } from '../callback';
import { RequestConfig } from '../requestConfig';

export class DevelopmentInformation {
Expand Down Expand Up @@ -99,26 +99,24 @@ export class DevelopmentInformation {
}

/**
* Deletes development information entities which have all the provided properties. Entities will be deleted that
* match ALL of the properties (i.e. treated as an AND). For example if request is `DELETE
* Deletes development information entities which have all the provided properties. Repositories which have properties
* that match ALL of the properties (i.e. treated as an AND), and all their related development information (such as
* commits, branches and pull requests), will be deleted. For example if request is `DELETE
* bulk?accountId=123&projectId=ABC` entities which have properties `accountId=123` and `projectId=ABC` will be
* deleted. Special property `_updateSequenceId` can be used to delete all entities with updateSequenceId less or
* equal than the value specified. In addition to the optional `_updateSequenceId`, one or more query params must be
* supplied to specify properties to delete by. Deletion is performed asynchronously: specified entities will
* eventually be removed from Jira.
* deleted. Optional param `_updateSequenceId` is no longer supported. Deletion is performed asynchronously: specified
* entities will eventually be removed from Jira.
*/
async deleteByProperties<T = unknown>(
parameters: Parameters.DeleteByProperties,
callback: Callback<T>,
): Promise<void>;
/**
* Deletes development information entities which have all the provided properties. Entities will be deleted that
* match ALL of the properties (i.e. treated as an AND). For example if request is `DELETE
* Deletes development information entities which have all the provided properties. Repositories which have properties
* that match ALL of the properties (i.e. treated as an AND), and all their related development information (such as
* commits, branches and pull requests), will be deleted. For example if request is `DELETE
* bulk?accountId=123&projectId=ABC` entities which have properties `accountId=123` and `projectId=ABC` will be
* deleted. Special property `_updateSequenceId` can be used to delete all entities with updateSequenceId less or
* equal than the value specified. In addition to the optional `_updateSequenceId`, one or more query params must be
* supplied to specify properties to delete by. Deletion is performed asynchronously: specified entities will
* eventually be removed from Jira.
* deleted. Optional param `_updateSequenceId` is no longer supported. Deletion is performed asynchronously: specified
* entities will eventually be removed from Jira.
*/
async deleteByProperties<T = unknown>(parameters: Parameters.DeleteByProperties, callback?: never): Promise<T>;
async deleteByProperties<T = unknown>(
Expand All @@ -137,9 +135,9 @@ export class DevelopmentInformation {
}

/**
* Checks if development information which have all the provided properties exists. For example, if request is `GET
* existsByProperties?accountId=123&projectId=ABC` then result will be positive only if there is at least one entity
* or repository with both properties `accountId=123` and `projectId=ABC`. Special property `_updateSequenceId` can be
* Checks if repositories which have all the provided properties exists. For example, if request is `GET
* existsByProperties?accountId=123&projectId=ABC` then result will be positive only if there is at least one
* repository with both properties `accountId=123` and `projectId=ABC`. Special property `_updateSequenceId` can be
* used to filter all entities with updateSequenceId less or equal than the value specified. In addition to the
* optional `_updateSequenceId`, one or more query params must be supplied to specify properties to search by.
*/
Expand All @@ -148,9 +146,9 @@ export class DevelopmentInformation {
callback: Callback<T>,
): Promise<void>;
/**
* Checks if development information which have all the provided properties exists. For example, if request is `GET
* existsByProperties?accountId=123&projectId=ABC` then result will be positive only if there is at least one entity
* or repository with both properties `accountId=123` and `projectId=ABC`. Special property `_updateSequenceId` can be
* Checks if repositories which have all the provided properties exists. For example, if request is `GET
* existsByProperties?accountId=123&projectId=ABC` then result will be positive only if there is at least one
* repository with both properties `accountId=123` and `projectId=ABC`. Special property `_updateSequenceId` can be
* used to filter all entities with updateSequenceId less or equal than the value specified. In addition to the
* optional `_updateSequenceId`, one or more query params must be supplied to specify properties to search by.
*/
Expand Down
Loading

0 comments on commit 4a17531

Please sign in to comment.