Skip to content

Commit

Permalink
Version 3 simple updates
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring committed Jan 7, 2025
1 parent c41d3b9 commit b8b0020
Show file tree
Hide file tree
Showing 62 changed files with 564 additions and 414 deletions.
266 changes: 133 additions & 133 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jira.js",
"version": "4.0.5",
"version": "4.1.0",
"description": "A comprehensive JavaScript/TypeScript library designed for both Node.JS and browsers, facilitating seamless interaction with the Atlassian Jira API.",
"main": "out/index.js",
"types": "out/index.d.ts",
Expand Down Expand Up @@ -55,8 +55,8 @@
"devDependencies": {
"@types/node": "^18.19.70",
"@types/sinon": "^17.0.3",
"@typescript-eslint/eslint-plugin": "^8.19.0",
"@typescript-eslint/parser": "^8.19.0",
"@typescript-eslint/eslint-plugin": "^8.19.1",
"@typescript-eslint/parser": "^8.19.1",
"dotenv": "^16.4.7",
"eslint": "^8.57.1",
"eslint-config-airbnb-base": "^15.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/version3/announcementBanner.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 AnnouncementBanner {
Expand Down
22 changes: 11 additions & 11 deletions src/version3/appMigration.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 AppMigration {
Expand All @@ -12,15 +12,15 @@ export class AppMigration {
* fields can be updated.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only
* Connect apps can make this request.
* Connect apps can make this request
*/
async updateIssueFields<T = unknown>(parameters: Parameters.UpdateIssueFields, callback: Callback<T>): Promise<void>;
/**
* Updates the value of a custom field added by Connect apps on one or more issues. The values of up to 200 custom
* fields can be updated.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only
* Connect apps can make this request.
* Connect apps can make this request
*/
async updateIssueFields<T = unknown>(parameters: Parameters.UpdateIssueFields, callback?: never): Promise<T>;
async updateIssueFields<T = unknown>(
Expand All @@ -43,16 +43,16 @@ export class AppMigration {
}

/**
* Updates the values of multiple entity properties for an object, up to 50 updates per request. This operation is for
* use by Connect apps during app migration.
* Updates the values of multiple entity properties for an object, up to 50 updates per request. This operation is
* for use by Connect apps during app migration.
*/
async updateEntityPropertiesValue<T = unknown>(
parameters: Parameters.UpdateEntityPropertiesValue,
callback: Callback<T>,
): Promise<void>;
/**
* Updates the values of multiple entity properties for an object, up to 50 updates per request. This operation is for
* use by Connect apps during app migration.
* Updates the values of multiple entity properties for an object, up to 50 updates per request. This operation is
* for use by Connect apps during app migration.
*/
async updateEntityPropertiesValue<T = unknown>(
parameters: Parameters.UpdateEntityPropertiesValue,
Expand All @@ -77,16 +77,16 @@ export class AppMigration {
}

/**
* Returns configurations for workflow transition rules migrated from server to cloud and owned by the calling Connect
* app.
* Returns configurations for workflow transition rules migrated from server to cloud and owned by the calling
* Connect app.
*/
async workflowRuleSearch<T = Models.WorkflowRulesSearchDetails>(
parameters: Parameters.WorkflowRuleSearch,
callback: Callback<T>,
): Promise<void>;
/**
* Returns configurations for workflow transition rules migrated from server to cloud and owned by the calling Connect
* app.
* Returns configurations for workflow transition rules migrated from server to cloud and owned by the calling
* Connect app.
*/
async workflowRuleSearch<T = Models.WorkflowRulesSearchDetails>(
parameters: Parameters.WorkflowRuleSearch,
Expand Down
46 changes: 29 additions & 17 deletions src/version3/appProperties.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 AppProperties {
Expand All @@ -11,9 +11,8 @@ export class AppProperties {
* Gets all the properties of an app.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only a
* Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps published on the
* Marketplace can access properties of Connect apps they were [migrated
* from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/).
* Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app
* properties (stored against the same `app.connect.key`).
*/
async getAddonProperties<T = Models.PropertyKeys>(
parameters: Parameters.GetAddonProperties | string,
Expand All @@ -23,9 +22,8 @@ export class AppProperties {
* Gets all the properties of an app.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only a
* Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps published on the
* Marketplace can access properties of Connect apps they were [migrated
* from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/).
* Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app
* properties (stored against the same `app.connect.key`).
*/
async getAddonProperties<T = Models.PropertyKeys>(
parameters: Parameters.GetAddonProperties | string,
Expand All @@ -49,9 +47,8 @@ export class AppProperties {
* Returns the key and value of an app's property.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only a
* Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps published on the
* Marketplace can access properties of Connect apps they were [migrated
* from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/).
* Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app
* properties (stored against the same `app.connect.key`).
*/
async getAddonProperty<T = Models.EntityProperty>(
parameters: Parameters.GetAddonProperty,
Expand All @@ -61,9 +58,8 @@ export class AppProperties {
* Returns the key and value of an app's property.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only a
* Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps published on the
* Marketplace can access properties of Connect apps they were [migrated
* from](https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app/).
* Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app
* properties (stored against the same `app.connect.key`).
*/
async getAddonProperty<T = Models.EntityProperty>(
parameters: Parameters.GetAddonProperty,
Expand All @@ -88,7 +84,8 @@ export class AppProperties {
* maximum length is 32768 characters.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only a
* Connect app whose key matches `addonKey` can make this request.
* Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app
* properties (stored against the same `app.connect.key`).
*/
async putAddonProperty<T = Models.OperationMessage>(
parameters: Parameters.PutAddonProperty,
Expand All @@ -101,7 +98,8 @@ export class AppProperties {
* maximum length is 32768 characters.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only a
* Connect app whose key matches `addonKey` can make this request.
* Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app
* properties (stored against the same `app.connect.key`).
*/
async putAddonProperty<T = Models.OperationMessage>(
parameters: Parameters.PutAddonProperty,
Expand All @@ -124,14 +122,16 @@ export class AppProperties {
* Deletes an app's property.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only a
* Connect app whose key matches `addonKey` can make this request.
* Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app
* properties (stored against the same `app.connect.key`).
*/
async deleteAddonProperty<T = void>(parameters: Parameters.DeleteAddonProperty, callback: Callback<T>): Promise<void>;
/**
* Deletes an app's property.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only a
* Connect app whose key matches `addonKey` can make this request.
* Connect app whose key matches `addonKey` can make this request. Additionally, Forge apps can access Connect app
* properties (stored against the same `app.connect.key`).
*/
async deleteAddonProperty<T = void>(parameters: Parameters.DeleteAddonProperty, callback?: never): Promise<T>;
async deleteAddonProperty<T = void>(
Expand Down Expand Up @@ -159,6 +159,9 @@ export class AppProperties {
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only
* Forge apps can make this request.
*
* The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we
* recommend adding it to your app's scope list because we will eventually make it mandatory.
*/
async putAppProperty<T = Models.OperationMessage>(
parameters: Parameters.PutAppProperty,
Expand All @@ -177,6 +180,9 @@ export class AppProperties {
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only
* Forge apps can make this request.
*
* The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we
* recommend adding it to your app's scope list because we will eventually make it mandatory.
*/
async putAppProperty<T = Models.OperationMessage>(
parameters: Parameters.PutAppProperty,
Expand All @@ -200,13 +206,19 @@ export class AppProperties {
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only
* Forge apps can make this request.
*
* The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we
* recommend adding it to your app's scope list because we will eventually make it mandatory.
*/
async deleteAppProperty<T = void>(parameters: Parameters.DeleteAppProperty, callback: Callback<T>): Promise<void>;
/**
* Deletes a Forge app's property.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** Only
* Forge apps can make this request.
*
* The new `write:app-data:jira` OAuth scope is 100% optional now, and not using it won't break your app. However, we
* recommend adding it to your app's scope list because we will eventually make it mandatory.
*/
async deleteAppProperty<T = void>(parameters: Parameters.DeleteAppProperty, callback?: never): Promise<T>;
async deleteAppProperty<T = void>(
Expand Down
2 changes: 1 addition & 1 deletion src/version3/applicationRoles.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 ApplicationRoles {
Expand Down
2 changes: 1 addition & 1 deletion src/version3/auditRecords.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 AuditRecords {
Expand Down
2 changes: 1 addition & 1 deletion src/version3/dynamicModules.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 DynamicModules {
Expand Down
10 changes: 5 additions & 5 deletions src/version3/filterSharing.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 FilterSharing {
Expand Down Expand Up @@ -159,13 +159,13 @@ export class FilterSharing {
url: `/rest/api/3/filter/${parameters.id}/permission`,
method: 'POST',
data: {
type: parameters.type,
projectId: parameters.projectId,
accountId: parameters.accountId,
groupId: parameters.groupId,
groupname: parameters.groupname,
projectId: parameters.projectId,
projectRoleId: parameters.projectRoleId,
accountId: parameters.accountId,
rights: parameters.rights,
groupId: parameters.groupId,
type: parameters.type,
},
};

Expand Down
2 changes: 1 addition & 1 deletion src/version3/groupAndUserPicker.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 GroupAndUserPicker {
Expand Down
16 changes: 11 additions & 5 deletions src/version3/groups.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 Groups {
Expand Down Expand Up @@ -106,8 +106,11 @@ export class Groups {
* Note that users are ordered by username, however the username is not returned in the results due to privacy
* reasons.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:**
* _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** either
* of:
*
* - _Browse users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
* - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
*/
async getUsersFromGroup<T = Models.PageUserDetails>(
parameters: Parameters.GetUsersFromGroup,
Expand All @@ -120,8 +123,11 @@ export class Groups {
* Note that users are ordered by username, however the username is not returned in the results due to privacy
* reasons.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:**
* _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v3/intro/#permissions) required:** either
* of:
*
* - _Browse users and groups_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
* - _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
*/
async getUsersFromGroup<T = Models.PageUserDetails>(
parameters: Parameters.GetUsersFromGroup,
Expand Down
Loading

0 comments on commit b8b0020

Please sign in to comment.