Skip to content

Commit

Permalink
Merge pull request #9 from BorvizRobi/regenerate-rest-api
Browse files Browse the repository at this point in the history
Regenerate rest api
  • Loading branch information
attila-kiss-it committed Sep 8, 2021
2 parents 28a81e5 + 2d2d94b commit 6649e5a
Show file tree
Hide file tree
Showing 1,022 changed files with 29,741 additions and 2,660 deletions.
8 changes: 5 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<groupId>org.everit.atlassian</groupId>
<artifactId>org.everit.atlassian.restclient.jiracloud</artifactId>
<version>3.0.3-202010281413</version>
<version>4.0.0-202109031402</version>

<packaging>bundle</packaging>

Expand Down Expand Up @@ -86,8 +86,10 @@
*
</Import-Package>
<Export-Package>
org.everit.atlassian.restclient.jiracloud.v2.*;version="3.0.0",
org.everit.atlassian.restclient.jiracloud.v3.*;version="3.0.0",
org.everit.atlassian.restclient.jiracloud.v2.model;version="4.0.0",
org.everit.atlassian.restclient.jiracloud.v2.api;version="4.0.0",
org.everit.atlassian.restclient.jiracloud.v3.model;version="4.0.0",
org.everit.atlassian.restclient.jiracloud.v3.api;version="4.0.0",
org.everit.atlassian.restclient.jiracloud.util;version="1.0.1"
</Export-Package>
</instructions>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
/*
* Copyright © 2011 Everit Kft. (http://www.everit.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.everit.atlassian.restclient.jiracloud.v2.api;

import java.util.Optional;

import io.reactivex.Single;
import io.reactivex.Completable;

import org.everit.http.client.HttpMethod;

import org.everit.http.restclient.RestClient;
import org.everit.http.restclient.RestClientUtil;
import org.everit.http.restclient.RestRequest;
import org.everit.http.restclient.RestRequestEnhancer;
import org.everit.http.restclient.TypeReference;

import org.everit.atlassian.restclient.jiracloud.v2.model.ConnectCustomFieldValues;
import org.everit.atlassian.restclient.jiracloud.v2.model.EntityPropertyDetails;
import java.util.UUID;
import org.everit.atlassian.restclient.jiracloud.v2.model.WorkflowRulesSearch;
import org.everit.atlassian.restclient.jiracloud.v2.model.WorkflowRulesSearchDetails;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AppMigrationApi {

private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.net";

private static final TypeReference<Object> returnType_appIssueFieldValueUpdateResourceUpdateIssueFieldsPut = new TypeReference<Object>() {};

private static final TypeReference<WorkflowRulesSearchDetails> returnType_migrationResourceWorkflowRuleSearchPost = new TypeReference<WorkflowRulesSearchDetails>() {};

private final RestClient restClient;

public AppMigrationApi(RestClient restClient) {
this.restClient = restClient;
}

/**
* Bulk update custom field value
* 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](#permissions) required:** Only Connect apps can make this request.
* @param atlassianTransferId The ID of the transfer. (required)
* @param atlassianAccountId The Atlassian account ID of the impersonated user. This user must be a member of the site admin group. (required)
* @param connectCustomFieldValues (required)
* @param restRequestEnhancer <p>Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.</p>
* @return Single&lt;Object&gt;
*/
public Single<Object> appIssueFieldValueUpdateResourceUpdateIssueFieldsPut(
String atlassianTransferId, String atlassianAccountId, ConnectCustomFieldValues connectCustomFieldValues, Optional<RestRequestEnhancer> restRequestEnhancer) {

RestRequest.Builder requestBuilder = RestRequest.builder()
.method(HttpMethod.PUT)
.basePath(DEFAULT_BASE_PATH)
.path("/rest/atlassian-connect/1/migration/field");

Map<String, String> pathParams = new HashMap<>();
requestBuilder.pathParams(pathParams);

Map<String, Collection<String>> queryParams = new HashMap<>();
requestBuilder.queryParams(queryParams);

Map<String, String> headers = new HashMap<>();
headers.put("Atlassian-Transfer-Id", atlassianTransferId);
headers.put("Atlassian-Account-Id", atlassianAccountId);
requestBuilder.headers(headers);

requestBuilder.requestBody(Optional.of(connectCustomFieldValues));

return restClient.callEndpoint(requestBuilder.build(), restRequestEnhancer, returnType_appIssueFieldValueUpdateResourceUpdateIssueFieldsPut);
}

/**
* Bulk update entity properties
* Updates the values of multiple entity properties for an object. This operation is for use by Connect apps during app migration.
* @param atlassianTransferId The app migration transfer ID. (required)
* @param atlassianAccountId The Atlassian account ID of the impersonated user. This user must be a member of the site admin group. (required)
* @param entityType The type indicating the object that contains the entity properties. (required)
* @param entityPropertyDetails (required)
* @param restRequestEnhancer <p>Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.</p>
* @return Completable
*/
public Completable migrationResourceUpdateEntityPropertiesValuePut(
String atlassianTransferId, String atlassianAccountId, String entityType, List<EntityPropertyDetails> entityPropertyDetails, Optional<RestRequestEnhancer> restRequestEnhancer) {

RestRequest.Builder requestBuilder = RestRequest.builder()
.method(HttpMethod.PUT)
.basePath(DEFAULT_BASE_PATH)
.path("/rest/atlassian-connect/1/migration/properties/{entityType}");

Map<String, String> pathParams = new HashMap<>();
pathParams.put("entityType", String.valueOf(entityType));
requestBuilder.pathParams(pathParams);

Map<String, Collection<String>> queryParams = new HashMap<>();
requestBuilder.queryParams(queryParams);

Map<String, String> headers = new HashMap<>();
headers.put("Atlassian-Transfer-Id", atlassianTransferId);
headers.put("Atlassian-Account-Id", atlassianAccountId);
requestBuilder.headers(headers);

requestBuilder.requestBody(Optional.of(entityPropertyDetails));

return restClient.callEndpoint(requestBuilder.build(), restRequestEnhancer);
}

/**
* Get workflow transition rule configurations
* Returns configurations for workflow transition rules migrated from server to cloud and owned by the calling Connect app.
* @param atlassianTransferId The app migration transfer ID. (required)
* @param workflowRulesSearch (required)
* @param restRequestEnhancer <p>Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.</p>
* @return Single&lt;WorkflowRulesSearchDetails&gt;
*/
public Single<WorkflowRulesSearchDetails> migrationResourceWorkflowRuleSearchPost(
String atlassianTransferId, WorkflowRulesSearch workflowRulesSearch, Optional<RestRequestEnhancer> restRequestEnhancer) {

RestRequest.Builder requestBuilder = RestRequest.builder()
.method(HttpMethod.POST)
.basePath(DEFAULT_BASE_PATH)
.path("/rest/atlassian-connect/1/migration/workflow/rule/search");

Map<String, String> pathParams = new HashMap<>();
requestBuilder.pathParams(pathParams);

Map<String, Collection<String>> queryParams = new HashMap<>();
requestBuilder.queryParams(queryParams);

Map<String, String> headers = new HashMap<>();
headers.put("Atlassian-Transfer-Id", atlassianTransferId);
requestBuilder.headers(headers);

requestBuilder.requestBody(Optional.of(workflowRulesSearch));

return restClient.callEndpoint(requestBuilder.build(), restRequestEnhancer, returnType_migrationResourceWorkflowRuleSearchPost);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

public class AppPropertiesApi {

private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.com";
private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.net";

private static final TypeReference<PropertyKeys> returnType_addonPropertiesResourceGetAddonPropertiesGet = new TypeReference<PropertyKeys>() {};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

public class ApplicationRolesApi {

private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.com";
private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.net";

private static final TypeReference<List<ApplicationRole>> returnType_getAllApplicationRoles = new TypeReference<List<ApplicationRole>>() {};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

public class AuditRecordsApi {

private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.com";
private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.net";

private static final TypeReference<AuditRecords> returnType_getAuditRecords = new TypeReference<AuditRecords>() {};

Expand All @@ -52,10 +52,10 @@ public AuditRecordsApi(RestClient restClient) {

/**
* Get audit records
* Returns a list of audit records. The list can be filtered to include items: * containing a string in at least one field. For example, providing *up* will return all audit records where one or more fields contains words such as *update*. * created on or after a date and time. * created or or before a date and time. * created during a time period. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* Returns a list of audit records. The list can be filtered to include items: * where each item in `filter` has at least one match in any of these fields: * `summary` * `category` * `eventSource` * `objectItem.name` If the object is a user, account ID is available to filter. * `objectItem.parentName` * `objectItem.typeName` * `changedValues.changedFrom` * `changedValues.changedTo` * `remoteAddress` For example, if `filter` contains *man ed*, an audit record containing `summary\": \"User added to group\"` and `\"category\": \"group management\"` is returned. * created on or after a date and time. * created or or before a date and time. **[Permissions](#permissions) required:** *Administer Jira* [global permission](https://confluence.atlassian.com/x/x4dKLg).
* @param offset The number of records to skip before returning the first result. (optional, default to 0)
* @param limit The maximum number of results to return. (optional, default to 1000)
* @param filter The query string. (optional)
* @param filter The strings to match with audit field content, space separated. (optional)
* @param from The date and time on or after which returned audit records must have been created. If `to` is provided `from` must be before `to` or no audit records are returned. (optional)
* @param to The date and time on or before which returned audit results must have been created. If `from` is provided `to` must be after `from` or no audit records are returned. (optional)
* @param restRequestEnhancer <p>Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

public class AvatarsApi {

private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.com";
private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.net";

private static final TypeReference<SystemAvatars> returnType_getAllSystemAvatars = new TypeReference<SystemAvatars>() {};

Expand Down Expand Up @@ -117,7 +117,7 @@ public Single<SystemAvatars> getAllSystemAvatars(

/**
* Get avatars
* Returns the system and custom avatars for a project or issue type. This operation can be accessed anonymously. **[Permissions](#permissions) required:** None.
* Returns the system and custom avatars for a project or issue type. This operation can be accessed anonymously. **[Permissions](#permissions) required:** * for custom project avatars, *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for the project the avatar belongs to. * for custom issue type avatars, *Browse projects* [project permission](https://confluence.atlassian.com/x/yodKLg) for at least one project the issue type is used in. * for system avatars, none.
* @param type The avatar type. (required)
* @param entityId The ID of the item the avatar is associated with. (required)
* @param restRequestEnhancer <p>Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

public class DashboardsApi {

private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.com";
private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.net";

private static final TypeReference<Dashboard> returnType_copyDashboard = new TypeReference<Dashboard>() {};

Expand Down Expand Up @@ -330,7 +330,7 @@ public Single<PropertyKeys> getDashboardItemPropertyKeys(
* @param orderBy [Order](#ordering) the results by a field: * `description` Sorts by dashboard description. Note that this sort works independently of whether the expand to display the description field is in use. * `favourite_count` Sorts by dashboard popularity. * `id` Sorts by dashboard ID. * `is_favourite` Sorts by whether the dashboard is marked as a favorite. * `name` Sorts by dashboard name. * `owner` Sorts by dashboard owner name. (optional, default to name)
* @param startAt The index of the first item to return in a page of results (page offset). (optional, default to 0l)
* @param maxResults The maximum number of items to return per page. (optional, default to 50)
* @param expand Use [expand](#expansion) to include additional information about dashboard in the response. This parameter accepts a comma-separated list. Expand options include: * `description` Returns the description of the dashboard. * `owner` Returns the owner of the dashboard. * `viewUrl` Returns the URL that is used to view the dashboard. * `favourite` Returns `isFavourite`, an indicator of whether the user has set the dashboard as a favorite. * `favouritedCount` Returns `popularity`, a count of how many users have set this dashboard as a favorite. * `sharePermissions` Returns details of the share permissions defined for the dashboard. (optional)
* @param expand Use [expand](#expansion) to include additional information about dashboard in the response. This parameter accepts a comma-separated list. Expand options include: * `description` Returns the description of the dashboard. * `owner` Returns the owner of the dashboard. * `viewUrl` Returns the URL that is used to view the dashboard. * `favourite` Returns `isFavourite`, an indicator of whether the user has set the dashboard as a favorite. * `favouritedCount` Returns `popularity`, a count of how many users have set this dashboard as a favorite. * `sharePermissions` Returns details of the share permissions defined for the dashboard. * `editPermissions` Returns details of the edit permissions defined for the dashboard. * `isWritable` Returns whether the current user has permission to edit the dashboard. (optional)
* @param restRequestEnhancer <p>Adds the possibility to modify the rest request before sending out. This can be useful to add authorizations tokens for example.</p>
* @return Single&lt;PageBeanDashboard&gt;
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

public class DynamicModulesApi {

private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.com";
private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.net";

private static final TypeReference<ConnectModules> returnType_dynamicModulesResourceGetModulesGet = new TypeReference<ConnectModules>() {};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

public class FilterSharingApi {

private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.com";
private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.net";

private static final TypeReference<List<SharePermission>> returnType_addSharePermission = new TypeReference<List<SharePermission>>() {};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

public class FiltersApi {

private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.com";
private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.net";

private static final TypeReference<Filter> returnType_createFilter = new TypeReference<Filter>() {};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

public class GroupAndUserPickerApi {

private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.com";
private static final String DEFAULT_BASE_PATH = "https://your-domain.atlassian.net";

private static final TypeReference<FoundUsersAndGroups> returnType_findUsersAndGroups = new TypeReference<FoundUsersAndGroups>() {};

Expand Down

0 comments on commit 6649e5a

Please sign in to comment.