Skip to content

Commit

Permalink
Few incremental improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring committed Feb 8, 2025
1 parent 63214a8 commit 570fbfa
Show file tree
Hide file tree
Showing 48 changed files with 1,561 additions and 45 deletions.
98 changes: 53 additions & 45 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,8 @@
// 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`
Expand All @@ -42,24 +15,29 @@
- **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.
- **Improvement:** Added the `releasedProjectKeys` property to the `Projects.updateProject` method.
- **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.
- **Improvement:** Added the `issueId` property to the `UserSearch.findAssignableUsers` method.
- **Improvement:** Added the optional `skipNotFoundPrecomputations` property to the `JqlFunctionsApps.updatePrecomputations` method.
- **Improvement:** Added the `failFast` parameter to the `Issues.getIssue` method.
- **Improvement:** Added the `failFast` parameter to the `IssueSearch.searchForIssuesUsingJql` method.
- **Improvement:** Added the `ari` and `metadata` parameters to the `ProjectComponents.createComponent` method.
- **Improvement:** Added the optional `componentSource` parameter to the `ProjectComponents.getProjectComponentsPaginated` method.
- **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.

- **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.
Expand All @@ -74,23 +52,53 @@
- `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.
- **New Method:** Added the `findComponentsForProjects` method to the `ProjectComponents` class.
- **New Methods:** Added the following methods to the `ProjectVersions` class:
- `deleteRelatedWork`: Delete related work for a version.
- `updateRelatedWork`: Update related work for a version.
- `createRelatedWork`: Create related work for a version.
- `getRelatedWork`: Retrieve related work for a version.

- **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`
- `IssueSearch.matchIssues`
- `IssueSearch.searchForIssuesUsingJql`
- `JiraExpressions.evaluateJiraExpression`
- **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`.
- **Fix:** Improved the `ProjectAvatars.createProjectAvatar` 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`.
- 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.

---

Expand Down
12 changes: 12 additions & 0 deletions src/version3/models/getAtlassianTeamResponse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export interface GetAtlassianTeamResponse {
/** The capacity for the Atlassian team. */
capacity?: number;
/** The Atlassian team ID. */
id: string;
/** The ID of the issue source for the Atlassian team. */
issueSourceId?: number;
/** The planning style for the Atlassian team. This is "Scrum" or "Kanban". */
planningStyle: 'Scrum' | 'Kanban' | string;
/** The sprint length for the Atlassian team. */
sprintLength?: number;
}
16 changes: 16 additions & 0 deletions src/version3/models/getPlanOnlyTeamResponse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export interface GetPlanOnlyTeamResponse {
/** The capacity for the plan-only team. */
capacity?: number;
/** The plan-only team ID. */
id: number;
/** The ID of the issue source for the plan-only team. */
issueSourceId?: number;
/** The account IDs of the plan-only team members. */
memberAccountIds?: string[];
/** The plan-only team name. */
name: string;
/** The planning style for the plan-only team. This is "Scrum" or "Kanban". */
planningStyle: 'Scrum' | 'Kanban' | string;
/** The sprint length for the plan-only team. */
sprintLength?: number;
}
12 changes: 12 additions & 0 deletions src/version3/models/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
export * from './getPlanOnlyTeamResponse';
export * from './getAtlassianTeamResponse';
export * from './pageWithCursorGetTeamResponseForPage';
export * from './serviceRegistry';
export * from './updatePrioritySchemeRequest';
export * from './updatePrioritySchemeResponse';
export * from './suggestedMappingsRequest';
export * from './priorityWithSequence';
export * from './prioritySchemeWithPaginatedPrioritiesAndProjects';
export * from './prioritySchemeId';
export * from './plan';
export * from './pageWithCursorGetPlanResponseForPage';
export * from './versionRelatedWork';
export * from './component';
export * from './worklogsMoveRequest';
Expand Down
10 changes: 10 additions & 0 deletions src/version3/models/pageWithCursorGetPlanResponseForPage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { GetPlanResponseForPage } from './getPlanResponseForPage';

export interface PageWithCursorGetPlanResponseForPage {
cursor?: string;
last?: boolean;
nextPageCursor?: string;
size?: number;
total?: number;
values?: GetPlanResponseForPage[];
}
10 changes: 10 additions & 0 deletions src/version3/models/pageWithCursorGetTeamResponseForPage.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { GetTeamResponseForPage } from './getTeamResponseForPage';

export interface PageWithCursorGetTeamResponseForPage {
cursor?: string;
last?: boolean;
nextPageCursor?: string;
size?: number;
total?: number;
values?: GetTeamResponseForPage[];
}
29 changes: 29 additions & 0 deletions src/version3/models/plan.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { GetCrossProjectReleaseResponse } from './getCrossProjectReleaseResponse';
import { GetCustomFieldResponse } from './getCustomFieldResponse';
import { GetExclusionRulesResponse } from './getExclusionRulesResponse';
import { GetIssueSourceResponse } from './getIssueSourceResponse';
import { GetPermissionResponse } from './getPermissionResponse';
import { GetSchedulingResponse } from './getSchedulingResponse';

export interface Plan {
/** The cross-project releases included in the plan. */
crossProjectReleases?: GetCrossProjectReleaseResponse[];
/** The custom fields for the plan. */
customFields?: GetCustomFieldResponse[];
exclusionRules?: GetExclusionRulesResponse;
/** The plan ID. */
id: number;
/** The issue sources included in the plan. */
issueSources?: GetIssueSourceResponse[];
/** The date when the plan was last saved in UTC. */
lastSaved?: string;
/** The account ID of the plan lead. */
leadAccountId?: string;
/** The plan name. */
name?: string;
/** The permissions for the plan. */
permissions?: GetPermissionResponse[];
scheduling?: GetSchedulingResponse;
/** The plan status. This is "Active", "Trashed" or "Archived". */
status: 'Active' | 'Trashed' | 'Archived' | string;
}
8 changes: 8 additions & 0 deletions src/version3/models/prioritySchemeId.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { TaskProgressBeanJsonNode } from './taskProgressBeanJsonNode';

/** The ID of a priority scheme. */
export interface PrioritySchemeId {
/** The ID of the priority scheme. */
id?: string;
task?: TaskProgressBeanJsonNode;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { PageBeanPriorityWithSequence } from './pageBeanPriorityWithSequence';
import { PageBeanProjectDetails } from './pageBeanProjectDetails';

/** A priority scheme with paginated priorities and projects. */
export interface PrioritySchemeWithPaginatedPrioritiesAndProjects {
default?: boolean;
/** The ID of the default issue priority. */
defaultPriorityId?: string;
/** The description of the priority scheme */
description?: string;
/** The ID of the priority scheme. */
id: string;
isDefault?: boolean;
/** The name of the priority scheme */
name: string;
priorities?: PageBeanPriorityWithSequence;
projects?: PageBeanProjectDetails;
/** The URL of the priority scheme. */
self?: string;
}
19 changes: 19 additions & 0 deletions src/version3/models/priorityWithSequence.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/** An issue priority with sequence information. */
export interface PriorityWithSequence {
/** The description of the issue priority. */
description?: string;
/** The URL of the icon for the issue priority. */
iconUrl?: string;
/** The ID of the issue priority. */
id?: string;
/** Whether this priority is the default. */
isDefault?: boolean;
/** The name of the issue priority. */
name?: string;
/** The URL of the issue priority. */
self?: string;
/** The sequence of the issue priority. */
sequence?: string;
/** The color used to indicate the issue priority. */
statusColor?: string;
}
15 changes: 15 additions & 0 deletions src/version3/models/serviceRegistry.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { ServiceRegistryTier } from './serviceRegistryTier';

export interface ServiceRegistry {
/** Service description */
description?: string;
/** Service ID */
id?: string;
/** Service name */
name?: string;
/** Organization ID */
organizationId?: string;
/** Service revision */
revision?: string;
serviceTier?: ServiceRegistryTier;
}
14 changes: 14 additions & 0 deletions src/version3/models/suggestedMappingsRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { SuggestedMappingsForPrioritiesRequestBean } from './suggestedMappingsForPrioritiesRequestBean';
import { SuggestedMappingsForProjectsRequestBean } from './suggestedMappingsForProjectsRequestBean';

/** Details of changes to a priority scheme that require suggested priority mappings. */
export interface SuggestedMappingsRequest {
/** The maximum number of results that could be on the page. */
maxResults?: number;
priorities?: SuggestedMappingsForPrioritiesRequestBean;
projects?: SuggestedMappingsForProjectsRequestBean;
/** The id of the priority scheme. */
schemeId?: number;
/** The index of the first item returned on the page. */
startAt?: number;
}
16 changes: 16 additions & 0 deletions src/version3/models/updatePrioritySchemeRequest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { PriorityMapping } from './priorityMapping';
import { UpdatePrioritiesInSchemeRequestBean } from './updatePrioritiesInSchemeRequestBean';
import { UpdateProjectsInSchemeRequestBean } from './updateProjectsInSchemeRequestBean';

/** Details of a priority scheme. */
export interface UpdatePrioritySchemeRequest {
/** The default priority of the scheme. */
defaultPriorityId?: number;
/** The description of the priority scheme. */
description?: string;
mappings?: PriorityMapping;
/** The name of the priority scheme. Must be unique. */
name?: string;
priorities?: UpdatePrioritiesInSchemeRequestBean;
projects?: UpdateProjectsInSchemeRequestBean;
}
8 changes: 8 additions & 0 deletions src/version3/models/updatePrioritySchemeResponse.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { PrioritySchemeWithPaginatedPrioritiesAndProjects } from './prioritySchemeWithPaginatedPrioritiesAndProjects';
import { TaskProgressBeanJsonNode } from './taskProgressBeanJsonNode';

/** Details of the updated priority scheme. */
export interface UpdatePrioritySchemeResponse {
priorityScheme?: PrioritySchemeWithPaginatedPrioritiesAndProjects;
task?: TaskProgressBeanJsonNode;
}
Loading

0 comments on commit 570fbfa

Please sign in to comment.