Skip to content

Commit

Permalink
version2 deprecation stuff removed
Browse files Browse the repository at this point in the history
  • Loading branch information
MrRefactoring committed Oct 9, 2023
1 parent f8af9c3 commit 2d618c2
Show file tree
Hide file tree
Showing 154 changed files with 8 additions and 1,628 deletions.
7 changes: 0 additions & 7 deletions src/serviceDesk/models/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ export interface User {
* _5b10ac8d82e05b22cc7d4ef5_.
*/
accountId?: string;
/**
* @deprecated This property is no longer available and will be removed from the documentation soon. See the
* [deprecation
* notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/)
* for details.
*/
name?: string;
/** Customer's email address. Depending on the customer’s privacy settings, this may be returned as null. */
emailAddress?: string;
/**
Expand Down
5 changes: 0 additions & 5 deletions src/serviceDesk/models/userLink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,4 @@ export interface UserLink {
self?: string;
/** REST API URL for the customer. */
jiraRest?: string;
/**
* Links to the various sizes of the customer's avatar. Note that this property is deprecated, and will be removed in
* future versions.
*/
avatarUrls?: {};
}
14 changes: 0 additions & 14 deletions src/serviceDesk/parameters/getCustomerRequests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,6 @@ export interface GetCustomerRequests {
* the `searchTerm` parameter.
*/
searchTerm?: string;
/**
* Filters customer requests using the following values:
*
* `OWNED_REQUESTS` returns customer requests where the user is the creator. `PARTICIPATED_REQUESTS` returns customer
* requests where the user is a participant. `ORGANIZATION` returns customer requests for an organization of which the
* user is a member when used in conjunction with `organizationId`. `ALL_ORGANIZATIONS` returns customer requests that
* belong to all organizations of which the user is a member. `APPROVER` returns customer requests where the user is
* an approver. Can be used in conjunction with `approvalStatus` to filter pending or complete approvals.
* `ALL_REQUESTS` returns all customer requests. **Deprecated and will be removed, as the returned requests may change
* if more values are added in the future. Instead, explicitly list the desired filtering strategies.**
*
* Multiple values of the query parameter are supported. For example, `requestOwnership=OWNED_REQUESTS&requestOwnership=PARTICIPATED_REQUESTS` will only return customer requests where the user is the creator or a participant. If not specified, filtering defaults to `OWNED_REQUESTS`, `PARTICIPATED_REQUESTS`, and `ALL_ORGANIZATIONS`.
*/
requestOwnership?: string[];
/**
* Filters customer requests where the request is closed, open, or either of the two where:
*
Expand Down
1 change: 0 additions & 1 deletion src/serviceDesk/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export class Request {
method: 'GET',
params: {
searchTerm: parameters?.searchTerm,
requestOwnership: parameters?.requestOwnership,
requestStatus: parameters?.requestStatus,
approvalStatus: parameters?.approvalStatus,
organizationId: parameters?.organizationId,
Expand Down
2 changes: 1 addition & 1 deletion src/version2/appMigration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class AppMigration {
'Atlassian-Transfer-Id': parameters.transferId,
'Content-Type': 'application/json',
},
data: parameters.body ?? parameters.entities,
data: parameters.entities,
};

return this.client.sendRequest(config, callback);
Expand Down
2 changes: 1 addition & 1 deletion src/version2/appProperties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export class AppProperties {
const config: RequestConfig = {
url: `/rest/atlassian-connect/1/addons/${parameters.addonKey}/properties/${parameters.propertyKey}`,
method: 'PUT',
data: parameters.propertyValue ?? parameters.property,
data: parameters.propertyValue,
};

return this.client.sendRequest(config, callback);
Expand Down
4 changes: 0 additions & 4 deletions src/version2/client/version2Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import {
FilterSharing,
GroupAndUserPicker,
Groups,
InstanceInformation,
IssueAdjustmentsApps,
IssueAttachments,
IssueCommentProperties,
IssueComments,
Expand Down Expand Up @@ -102,8 +100,6 @@ export class Version2Client extends BaseClient {
filterSharing = new FilterSharing(this);
groupAndUserPicker = new GroupAndUserPicker(this);
groups = new Groups(this);
instanceInformation = new InstanceInformation(this);
issueAdjustmentsApps = new IssueAdjustmentsApps(this);
issueAttachments = new IssueAttachments(this);
issueCommentProperties = new IssueCommentProperties(this);
issueComments = new IssueComments(this);
Expand Down
1 change: 0 additions & 1 deletion src/version2/dashboards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ export class Dashboards {
params: {
dashboardName: parameters?.dashboardName,
accountId: parameters?.accountId,
owner: parameters?.owner,
groupname: parameters?.groupname,
groupId: parameters?.groupId,
projectId: parameters?.projectId,
Expand Down
44 changes: 0 additions & 44 deletions src/version2/filters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,49 +7,6 @@ import { RequestConfig } from '../requestConfig';
export class Filters {
constructor(private client: Client) {}

/**
* @deprecated Returns all filters. Deprecated, use [Search for filters](#api-rest-api-2-filter-search-get) that
* supports search and pagination. This operation can be accessed anonymously.
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None,
* however, only the following filters are returned:
*
* - Filters owned by the user.
* - Filters shared with a group that the user is a member of.
* - Filters shared with a private project that the user has _Browse projects_ [project
* permission](https://confluence.atlassian.com/x/yodKLg) for.
* - Filters shared with a public project.
* - Filters shared with the public.
*/
async getFilters<T = Models.Filter[]>(
parameters: Parameters.GetFilters | undefined,
callback: Callback<T>,
): Promise<void>;
/**
* @deprecated Returns all filters. Deprecated, use [ Search for filters](#api-rest-api-2-filter-search-get) that
* supports search and pagination. This operation can be accessed anonymously.
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** None,
* however, only the following filters are returned:
*
* - Filters owned by the user.
* - Filters shared with a group that the user is a member of.
* - Filters shared with a private project that the user has _Browse projects_ [project
* permission](https://confluence.atlassian.com/x/yodKLg) for.
* - Filters shared with a public project.
* - Filters shared with the public.
*/
async getFilters<T = Models.Filter[]>(parameters?: Parameters.GetFilters, callback?: never): Promise<T>;
async getFilters<T = Models.Filter[]>(parameters?: Parameters.GetFilters, callback?: Callback<T>): Promise<void | T> {
const config: RequestConfig = {
url: '/rest/api/2/filter',
method: 'GET',
params: {
expand: parameters?.expand,
},
};

return this.client.sendRequest(config, callback);
}

/**
* Creates a filter. The filter is shared according to the [default share scope](#api-rest-api-2-filter-post). The
* filter is not selected as a favorite.
Expand Down Expand Up @@ -270,7 +227,6 @@ export class Filters {
params: {
filterName: parameters?.filterName,
accountId: parameters?.accountId,
owner: parameters?.owner,
groupname: parameters?.groupname,
groupId: parameters?.groupId,
projectId: parameters?.projectId,
Expand Down
41 changes: 3 additions & 38 deletions src/version2/groups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,54 +7,21 @@ import { RequestConfig } from '../requestConfig';
export class Groups {
constructor(private client: Client) {}

/**
* @deprecated This operation is deprecated, use
* [`group/member`](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-groups/#api-rest-api-2-group-member-get).
* Returns all users in a group.
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
* _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
*/
async getGroup<T = Models.Group>(parameters: Parameters.GetGroup, callback: Callback<T>): Promise<void>;
/**
* @deprecated This operation is deprecated, use
* [`group/member`](https://developer.atlassian.com/cloud/jira/platform/rest/v2/api-group-groups/#api-rest-api-2-group-member-get).
* Returns all users in a group.
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:**
* _Administer Jira_ [global permission](https://confluence.atlassian.com/x/x4dKLg).
*/
async getGroup<T = Models.Group>(parameters: Parameters.GetGroup, callback?: never): Promise<T>;
async getGroup<T = Models.Group>(parameters: Parameters.GetGroup, callback?: Callback<T>): Promise<void | T> {
const config: RequestConfig = {
url: '/rest/api/2/group',
method: 'GET',
params: {
groupname: parameters?.groupname,
groupId: parameters?.groupId,
expand: parameters?.expand,
},
};

return this.client.sendRequest(config, callback);
}

/**
* Creates a group.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Site
* administration (that is, member of the _site-admin_ [group](https://confluence.atlassian.com/x/24xjL)).
*/
async createGroup<T = Models.Group>(
parameters: Parameters.CreateGroup | undefined,
callback: Callback<T>,
): Promise<void>;
async createGroup<T = Models.Group>(parameters: Parameters.CreateGroup, callback: Callback<T>): Promise<void>;
/**
* Creates a group.
*
* **[Permissions](https://developer.atlassian.com/cloud/jira/platform/rest/v2/intro/#permissions) required:** Site
* administration (that is, member of the _site-admin_ [group](https://confluence.atlassian.com/x/24xjL)).
*/
async createGroup<T = Models.Group>(parameters?: Parameters.CreateGroup, callback?: never): Promise<T>;
async createGroup<T = Models.Group>(parameters?: Parameters.CreateGroup, callback?: Callback<T>): Promise<void | T> {
async createGroup<T = Models.Group>(parameters: Parameters.CreateGroup, callback?: never): Promise<T>;
async createGroup<T = Models.Group>(parameters: Parameters.CreateGroup, callback?: Callback<T>): Promise<void | T> {
const config: RequestConfig = {
url: '/rest/api/2/group',
method: 'POST',
Expand Down Expand Up @@ -301,13 +268,11 @@ export class Groups {
url: '/rest/api/2/groups/picker',
method: 'GET',
params: {
accountId: parameters?.accountId,
query: parameters?.query,
exclude: parameters?.exclude,
excludeId: parameters?.excludeId,
maxResults: parameters?.maxResults,
caseInsensitive: parameters?.caseInsensitive,
userName: parameters?.userName,
},
};

Expand Down
2 changes: 0 additions & 2 deletions src/version2/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ export * from './filters';
export * from './filterSharing';
export * from './groupAndUserPicker';
export * from './groups';
export * from './instanceInformation';
export * from './issueAdjustmentsApps';
export * from './issueAttachments';
export * from './issueCommentProperties';
export * from './issueComments';
Expand Down
30 changes: 0 additions & 30 deletions src/version2/instanceInformation.ts

This file was deleted.

Loading

0 comments on commit 2d618c2

Please sign in to comment.