Skip to content

Commit

Permalink
Add new API in Version2Client (#357)
Browse files Browse the repository at this point in the history
* Add boilerplate for new API in Version2Client

* Check and apply changes in Version3Client to Version2Client (#359)

* fix: build error

* chore: update unit test

* fix: missing failFast in SearchAndReconcileRequest

* fix: improvement to updateComment

Forgot to clone the same improvement as addComment.

* feat: v2 IssueBulkOperations

* fix: apply the same improvement to v2 prioritySchemes

* chore: remove unused import

* fix: apply the same improvement as v3

`ProjectKeyAndNameValidation.getValidProjectName` from `unknown` to `string` for improved type safety and usability.

* fix: Apply the same fix as v3

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.

* fix: apply the same fix as v3

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.

* fix: apply the same fix as v3

Fix: Improved the Avatars.storeAvatar method

* fix: apply the same fix as v3

Fix: Improved the IssueTypes.createIssueTypeAvatar method

* fix: apply the same deprecation notes as v3

* fix: align v3 naming to v2

issueSearch and jiraExpression with enhanced search

* Update readme.md

1. moved API token like to API token section
2. added description and link to PAT
3. moved Basic auth to bottom as it's the least preferred way to auth

* fix: rollback changes on v2

Copied v3 feat to v2 by mistake

* Update src/version2/parameters/getAvailableTransitions.ts

add number support to issue ids or keys

Co-authored-by: Vladislav Tupikin <[email protected]>

* Update src/version2/parameters/getBulkEditableFields.ts

add number support to issueIdsOrKeys

Co-authored-by: Vladislav Tupikin <[email protected]>

* fix: startAt and maxResults should be number

* fix: wrong link to v3 in version 2

* fix: incorrect version in anchor

* fix: revert changes on adding v3 only model

* Update src/version3/parameters/searchWorkflows.ts

Co-authored-by: Vladislav Tupikin <[email protected]>

* Update src/version3/parameters/searchWorkflows.ts

Co-authored-by: Vladislav Tupikin <[email protected]>

* chore: revert changes on README.md

move it to another PR

* fix: update *DTO in v3

---------

Co-authored-by: Vladislav Tupikin <[email protected]>

* `bulkFetchIssues` returned back for version2 client

* Clients added to Version2Client

* Clients added to README.md

* Integration test fixes

* Build fix

* Fixes

* Incremental improvements

* Incremental improvements

---------

Co-authored-by: Ness Li <[email protected]>
  • Loading branch information
MrRefactoring and nessgor authored Mar 1, 2025
1 parent e9dc1fd commit f74dfb0
Show file tree
Hide file tree
Showing 444 changed files with 7,913 additions and 1,218 deletions.
28 changes: 17 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

### 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.

- **Deprecation:** Marked the `InstanceInformation.getLicense` method as deprecated.
- **Deprecation:** Marked the `Issues.getCreateIssueMeta` method as deprecated.
- **Deprecation:** Marked the `PageBeanFieldConfigurationDetails` class as deprecated. Use `Paginated<FieldConfigurationDetails>` instead.
- **Deprecation:** Marked the `WorkflowUpdateResponse` and `WorkflowCreateResponse` classes as deprecated.

- **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)).
Expand All @@ -17,10 +20,6 @@
- **`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:** Changed the return type of `ProjectKeyAndNameValidation.getValidProjectKey` and `ProjectKeyAndNameValidation.getValidProjectName` from `unknown` to `string` for improved type safety and usability.
- **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.
Expand All @@ -38,6 +37,10 @@
- **Improvement:** Added the optional `componentSource` parameter to the `ProjectComponents.getProjectComponents` method.
- **Improvement:** Added the `approvers` and `driver` parameters to the `ProjectVersions.createVersion` and `ProjectVersions.updateVersion` methods.
- **Improvement:** Replaced the `maxResults` property with `maxResult` in the `UserSearch.findUserKeysByQuery` method.
- **Improvement:** Added the `extendAdminPermissions` parameter to the following methods in the `Dashboard` class:
- `Dashboard.createDashboard`
- `Dashboard.updateDashboard`
- `Dashboard.copyDashboard`

- **New Method:** Added the `getCustomFieldsConfigurations` method to the `IssueCustomFieldConfigurationApps` class.
- **New Method:** Added the `replaceCustomFieldOption` method to the `IssueCustomFieldOptions` class.
Expand Down Expand Up @@ -77,6 +80,12 @@
- `updateRelatedWork`: Update related work for a version.
- `createRelatedWork`: Create related work for a version.
- `getRelatedWork`: Retrieve related work for a version.
- **New Method:** Added the `getProjectUsagesForWorkflowScheme` method to the `WorkflowSchemes` class.
- **New Method:** Added the `getWorkflowProjectIssueTypeUsages` method to the `Workflows` class.
- **New Methods:** Added the following methods to the `Status` class:
- `getProjectIssueTypeUsagesForStatus`
- `getProjectUsagesForStatus`
- `getWorkflowUsagesForStatus`

- **Fix:** Updated the following methods in `Version2Client` and `Version3Client` to make the `parameters` argument mandatory (as it should have been initially):
- `IssueFieldConfigurations.createFieldConfiguration`
Expand All @@ -92,6 +101,8 @@
- `IssueSearch.matchIssues`
- `IssueSearch.searchForIssuesUsingJql`
- `JiraExpressions.evaluateJiraExpression`
- `Users.setUserColumns`
- `Users.getUser`
- **Fix:** Improved the `Avatars.storeAvatar` method:
- Added the `mimeType` 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.
Expand All @@ -106,11 +117,6 @@
- Set the default value of the `size` parameter to `0`.

- **Change:** Removed the `filter` parameter from the `JqlFunctionsApps.getPrecomputations` method (experimental method, not a breaking change).

- **Deprecation:** Marked the `InstanceInformation.getLicense` method as deprecated.
- **Deprecation:** Marked the `Issues.getCreateIssueMeta` method as deprecated.
- **Deprecation:** Marked the `PageBeanFieldConfigurationDetails` class as deprecated. Use `Paginated<FieldConfigurationDetails>` instead.

- **Change:** Renamed `JiraExpressionEvaluateContextBean` to `JiraExpressionEvaluateContext`.

- **Improvement:** Added type `string` for properties `projectId` in parameters and models:
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,12 @@ Available groups:
- [myself](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-myself/#api-group-myself)
- [permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-permissions/#api-group-permissions)
- [permissionSchemes](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-permission-schemes/#api-group-permission-schemes)
- [plans](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-plans/#api-group-plans)
- [prioritySchemes](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-priority-schemes/#api-group-priority-schemes)
- [projects](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-projects/#api-group-projects)
- [projectAvatars](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-avatars/#api-group-project-avatars)
- [projectCategories](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-categories/#api-group-project-categories)
- [projectClassificationLevels](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-classification-levels/#api-group-project-classification-levels)
- [projectComponents](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-components/#api-group-project-components)
- [projectEmail](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-email/#api-group-project-email)
- [projectFeatures](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-project-features/#api-group-project-features)
Expand All @@ -312,8 +315,10 @@ Available groups:
- [screenTabFields](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-screen-tab-fields/#api-group-screen-tab-fields)
- [screenSchemes](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-screen-schemes/#api-group-screen-schemes)
- [serverInfo](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-server-info/#api-group-server-info)
- [serviceRegistry](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-service-registry/#api-group-service-registry)
- [status](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-status/#api-group-status)
- [tasks](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-tasks/#api-group-tasks)
- [teamsInPlan](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-teams-in-plan/#api-group-teams-in-plan)
- [timeTracking](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-time-tracking/#api-group-time-tracking)
- [uiModificationsApps](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-ui-modifications--apps-/#api-group-ui-modifications--apps-)
- [users](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-users/#api-group-users)
Expand Down
Loading

0 comments on commit f74dfb0

Please sign in to comment.