Skip to content

Commit

Permalink
Merge branch 'release/v4.1.0' into feature/MrRefactoring#354-Deprecat…
Browse files Browse the repository at this point in the history
…ion-of-JQL-search-and-Evaluate-expression-endpoints
  • Loading branch information
nessgor authored Feb 8, 2025
2 parents 683f9df + 63214a8 commit 3fd9097
Show file tree
Hide file tree
Showing 327 changed files with 6,052 additions and 1,311 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ parserOptions:
project: ./tsconfig.lint.json
plugins:
- import
- "@typescript-eslint"
env:
node: true
browser: true
rules:
"@typescript-eslint/lines-between-class-members": off
"@typescript-eslint/no-unnecessary-condition": [ error, { allowConstantLoopConditions: false } ]
arrow-parens:
- error
- as-needed
Expand Down
94 changes: 94 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,99 @@
# Jira.js changelog

### 4.1.0

// todo add links to code for new classes and modified methods

- **General Improvements:** Enhanced JSDoc documentation across the project for better clarity and developer experience.
- **Fix:** Updated the following methods in `Version2Client` and `Version3Client` to make the `parameters` argument mandatory (as it should have been initially):
- `IssueFieldConfigurations.createFieldConfiguration`
- `IssueFieldConfigurations.createFieldConfigurationScheme`
- `IssueLinks.linkIssues`
- `IssueTypeSchemes.createIssueTypeScheme`
- `IssueTypeSchemes.assignIssueTypeSchemeToProject`
- `IssueTypeScreenSchemes.createIssueTypeScreenScheme`
- `JQL.parseJqlQueries`
- `TimeTracking.setSharedTimeTrackingConfiguration`
- `WorkflowSchemeProjectAssociations.assignSchemeToProject`
- `IssueTypes.createIssueType`
- **Improvement:** Changed the return type of `ProjectKeyAndNameValidation.getValidProjectKey` and `ProjectKeyAndNameValidation.getValidProjectName` from `unknown` to `string` for improved type safety and usability.
- **Fix:** Improved the `Avatars.storeAvatar` method:
- Added the `contentType` parameter to specify the type of the uploaded avatar.
- Updated the type of the `avatar` parameter from `any` to `Buffer | ArrayBuffer | Uint8Array | any` for better type safety.
- Set the default value of the `size` parameter to `0`.
- **Fix:** Improved the `IssueTypes.createIssueTypeAvatar` method:
- Added the `contentType` parameter to specify the type of the uploaded avatar.
- Added the `avatar` parameter with the type `Buffer | ArrayBuffer | Uint8Array`.
- Set the default value of the `size` parameter to `0`.
- **New APIs:** Added the following classes to support additional Jira APIs:
- **`AppDataPolicies`**: Manage app access rule data policies, allowing developers to set and retrieve rules controlling app access ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-app-data-policies/#api-group-app-data-policies)).
- **`ClassificationLevels`**: Define and manage classification levels for sensitive information in Jira ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-classification-levels/#api-group-classification-levels)).
- **`IssueBulkOperations`**: Perform bulk operations on issues, such as moving multiple issues between projects or updating multiple fields in one request. For additional guidance, refer to [Bulk operation APIs: additional examples and FAQ](https://developer.atlassian.com/cloud/jira/platform/bulk-operation-additional-examples-and-faqs/) ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-bulk-operations/#api-group-issue-bulk-operations)).
- **`Plans`**: Manage advanced roadmaps plans, including creating, duplicating, updating, archiving, and trashing plans ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-plans/#api-group-plans)).
- **`PrioritySchemes`**: Create, retrieve, update, and delete issue priority schemes to standardize prioritization across projects ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-priority-schemes/#api-group-priority-schemes)).
- **`ProjectClassificationLevels`**: View and manage classification levels within individual projects to ensure compliance with organizational standards ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-classification-levels/#api-group-project-classification-levels)).
- **`ServiceRegistry`**: Access and manage attributes related to Jira Service Management’s service registry, which helps organize and maintain services ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-service-registry/#api-group-service-registry)).
- **`TeamsInPlan`**: Configure settings for Atlassian and custom teams within advanced roadmaps plans, including creating, updating, and deleting team configurations ([documentation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-teams-in-plan/#api-group-teams-in-plan)).
- **Improvement:** Added the `extendAdminPermissions` parameter to the following methods in the `Dashboard` class:
- `Dashboard.createDashboard`
- `Dashboard.updateDashboard`
- `Dashboard.copyDashboard`
- **Improvement:** Added the `approximateLastUsed` parameter to the `Filters.createFilter` method.
- **Improvement:** Added the `isSubstringMatch` parameter to the `Filters.getFiltersPaginated` method.
- **Improvement:** Updated the `IssueComments.updateComment` method to allow passing a plain string for the comment instead of requiring a specific object format.
- **Improvement:** Added the `parentId` parameter to the `IssueComments.deleteComment` method.
- **Deprecation:** Marked the `InstanceInformation.getLicense` method as deprecated.
- **New Method:** Added the `getCustomFieldsConfigurations` method to the `IssueCustomFieldConfigurationApps` class.
- **New Method:** Added the `replaceCustomFieldOption` method to the `IssueCustomFieldOptions` class.
- **New Methods:** Added the following methods to the `WorkflowSchemes` class:
- `readWorkflowSchemes`: Retrieve workflow schemes.
- `updateSchemes`: Update workflow schemes.
- `updateWorkflowSchemeMappings`: Update workflow scheme mappings.
- **Improvement:** Added the `releasedProjectKeys` property to the `Projects.updateProject` method.
- **New Method:** Added the `getNotificationSchemeForProject` method to the `Projects` class.
- **New Method:** Added the `getBulkScreenTabs` method to the `ScreenTabs` class.
- **Improvement:** Added the `avatarId` parameter to the `IssuePriorities.createPriority` method. This parameter will replace `iconUrl` starting **March 16, 2025**. The `iconUrl` parameter is now marked as deprecated.
- **Improvement:** Added the `priorityName` and `expand` properties to the `IssuePriorities.searchPriorities` method.
- **Improvement:** Added the `avatarId` parameter to the `IssuePriorities.updatePriority` method. This parameter will replace `iconUrl` starting **March 16, 2025**. The `iconUrl` parameter is now marked as deprecated.
- **New Method:** Added the `deletePriority` method to the `IssuePriorities` class.
- **Improvement:** Added the `issueId` property to the `UserSearch.findAssignableUsers` method.
- **Fix:** Replaced the `maxResults` property with `maxResult` in the `UserSearch.findUserKeysByQuery` method.
- **Change:** Removed the `filter` parameter from the `JqlFunctionsApps.getPrecomputations` method (experimental method, not a breaking change).
- **Improvement:** Added the optional `skipNotFoundPrecomputations` property to the `JqlFunctionsApps.updatePrecomputations` method.
- **New Method:** Added the `getPrecomputationsByID` method to the `JqlFunctionsApps` class.
- **New Methods:** Added the following methods to the `Workflows` class:
- `readWorkflows`: Retrieve workflows.
- `workflowCapabilities`: Get workflow capabilities.
- `createWorkflows`: Create new workflows.
- `validateCreateWorkflows`: Validate workflow creation.
- `updateWorkflows`: Update existing workflows.
- `validateUpdateWorkflows`: Validate workflow updates.
- **New Methods:** Added the following methods to the `Issues` class:
- `getBulkChangelogs`: Retrieve changelogs for multiple issues in bulk.
- `bulkFetchIssues`: Fetch multiple issues in bulk.
- `getCreateIssueMetaIssueTypes`: Retrieve metadata for issue types when creating issues.
- `getCreateIssueMetaIssueTypeId`: Retrieve metadata for a specific issue type by ID when creating issues.
- `getIssueLimitReport`: Retrieve a report on issue limits.
- **Improvement:** Changed the return type of `Issues.archiveIssuesAsync` from `unknown` to `string` (clarification, not a breaking change).
- **Deprecation:** Marked the `Issues.getCreateIssueMeta` method as deprecated.
- **Improvement:** Added the `failFast` parameter to the `Issues.getIssue` method.
- **New Methods:** Added the following methods to the `IssueSearch` class:
- `countIssues`: Count issues matching a query.
- `searchForIssuesIds`: Search for issue IDs using a query.
- `searchForIssuesUsingJqlEnhancedSearch`: Search and reconcile issues using JQL.
- `searchForIssuesUsingJqlEnhancedSearchPost`: Search and reconcile issues using JQL via POST request.
- **Fix:** Made the `parameters` argument mandatory for the following methods in the `IssueSearch` class (as it should have been initially):
- `IssueSearch.matchIssues`
- `IssueSearch.searchForIssuesUsingJql`
- **Improvement:** Added the `failFast` parameter to the `IssueSearch.searchForIssuesUsingJql` method.
- **New Methods:** Added the following methods to the `IssueWorklogs` class:
- `bulkDeleteWorklogs`: Delete multiple worklogs in bulk.
- `bulkMoveWorklogs`: Move multiple worklogs in bulk.
- **Fix:** Made the `parameters` argument mandatory for the `JiraExpressions.evaluateJiraExpression` method (as it should have been initially).
- **New Method:** Added the `evaluateJiraExpressionUsingEnhancedSearch` method to the `JiraExpressions` class.

---

### 4.0.6

- **#347:** Fixed an issue with adding attachments of type `Readable` or `ReadableStream` (e.g., `fs.createReadStream`). Thanks to [Lunatic174](/~https://github.com/Lunatic174) for [reporting the issue](/~https://github.com/MrRefactoring/jira.js/issues/347).
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,12 @@ Available groups:
<summary>Version 2 Cloud REST API group</summary>

- [announcementBanner](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-announcement-banner/#api-group-announcement-banner)
- [appDataPolicies](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-app-data-policies/#api-group-app-data-policies)
- [applicationRoles](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-application-roles/#api-group-application-roles)
- [appMigration](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-app-migration/#api-group-app-migration)
- [auditRecords](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-audit-records/#api-group-audit-records)
- [avatars](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-avatars/#api-group-avatars)
- [classificationLevels](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-classification-levels/#api-group-classification-levels)
- [dashboards](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-dashboards/#api-group-dashboards)
- [filters](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-filters/#api-group-filters)
- [filterSharing](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-filter-sharing/#api-group-filter-sharing)
Expand Down Expand Up @@ -333,10 +335,12 @@ Available groups:
<summary>Version 3 Cloud REST API group</summary>

- [announcementBanner](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-announcement-banner/#api-group-announcement-banner)
- [appDataPolicy](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-app-data-policies/#api-group-app-data-policies)
- [applicationRoles](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-application-roles/#api-group-application-roles)
- [appMigration](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-app-migration/#api-group-app-migration)
- [auditRecords](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-audit-records/#api-group-audit-records)
- [avatars](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-avatars/#api-group-avatars)
- [classificationLevels](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-classification-levels/#api-group-classification-levels)
- [dashboards](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-dashboards/#api-group-dashboards)
- [filters](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-filters/#api-group-filters)
- [filterSharing](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-filter-sharing/#api-group-filter-sharing)
Expand All @@ -345,6 +349,7 @@ Available groups:
- [instanceInformation](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-instance-information/#api-group-instance-information)
- [issues](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issues/#api-group-issues)
- [issueAttachments](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-attachments/#api-group-issue-attachments)
- [issueBulkOperations](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-bulk-operations/#api-group-issue-bulk-operations)
- [issueComments](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comments/#api-group-issue-comments)
- [issueCustomFieldConfigurationApps](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-custom-field-configuration--apps-/#api-group-issue-custom-field-configuration--apps-)
- [issueCommentProperties](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-issue-comment-properties/#api-group-issue-comment-properties)
Expand Down Expand Up @@ -382,9 +387,12 @@ Available groups:
- [myself](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-myself/#api-group-myself)
- [permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permissions/#api-group-permissions)
- [permissionSchemes](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-permission-schemes/#api-group-permission-schemes)
- [plans](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-plans/#api-group-plans)
- [prioritySchemes](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-priority-schemes/#api-group-priority-schemes)
- [projects](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-group-projects)
- [projectAvatars](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-avatars/#api-group-project-avatars)
- [projectCategories](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-categories/#api-group-project-categories)
- [projectClassificationLevels](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-classification-levels/#api-group-project-classification-levels)
- [projectComponents](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-components/#api-group-project-components)
- [projectEmail](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-email/#api-group-project-email)
- [projectFeatures](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-features/#api-group-project-features)
Expand All @@ -400,8 +408,10 @@ Available groups:
- [screenTabFields](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-screen-tab-fields/#api-group-screen-tab-fields)
- [screenSchemes](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-screen-schemes/#api-group-screen-schemes)
- [serverInfo](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-server-info/#api-group-server-info)
- [serviceRegistry](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-service-registry/#api-group-service-registry)
- [status](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-status/#api-group-status)
- [tasks](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-tasks/#api-group-tasks)
- [teamsInPlan](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-teams-in-plan/#api-group-teams-in-plan)
- [timeTracking](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-time-tracking/#api-group-time-tracking)
- [uiModificationsApps](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-ui-modifications--apps-/#api-group-ui-modifications--apps-)
- [users](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-group-users)
Expand Down
1 change: 1 addition & 0 deletions examples/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.idea/
node_modules/
src/credentials.ts

.DS_Store
7 changes: 4 additions & 3 deletions examples/src/credentials.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
export const host = 'https://jira-js.atlassian.net/';
export const email = 'mrrefactoring@yandex.ru';
export const apiToken = 'ATATT3xFfGF0CQo3Ed8gqWxZmT2nlOEinQZJkp7hVY-ynttVtAsRwGF5JYD1vBcSu0i3RNfilR_RbksRFBxU33tsWTi7R5ontSouy0mwNqPhTazoZiVm5ah3_Emcy9g7-KB0rW7XTm5uLHeCdUW9X-Fv1jqWUHjtrOgCr4pXtcV6DmJPyBLa3Jg=582DE538';
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
export const host = '';
export const email = '';
export const apiToken = '';

if (!host) {
throw new Error('Please specify host');
Expand Down
Loading

0 comments on commit 3fd9097

Please sign in to comment.