mirror of
https://codeberg.org/gitnex/tea4j-autodeploy
synced 2026-06-06 18:02:16 +00:00
Synchronizing API and documentation updates
This commit is contained in:
@@ -608,6 +608,56 @@ public interface OrganizationApi {
|
||||
Call<Void> orgUpdateAvatar(
|
||||
@retrofit2.http.Path("org") String org, @retrofit2.http.Body UpdateUserAvatarOption body);
|
||||
|
||||
/**
|
||||
* Block a user
|
||||
*
|
||||
* @param org name of the organization (required)
|
||||
* @param username user to block (required)
|
||||
* @param note optional note for the block (optional)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@PUT("orgs/{org}/blocks/{username}")
|
||||
Call<Void> organizationBlockUser(
|
||||
@retrofit2.http.Path("org") String org,
|
||||
@retrofit2.http.Path("username") String username,
|
||||
@retrofit2.http.Query("note") String note);
|
||||
|
||||
/**
|
||||
* Check if a user is blocked by the organization
|
||||
*
|
||||
* @param org name of the organization (required)
|
||||
* @param username user to check (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@GET("orgs/{org}/blocks/{username}")
|
||||
Call<Void> organizationCheckUserBlock(
|
||||
@retrofit2.http.Path("org") String org, @retrofit2.http.Path("username") String username);
|
||||
|
||||
/**
|
||||
* List users blocked by the organization
|
||||
*
|
||||
* @param org name of the organization (required)
|
||||
* @param page page number of results to return (1-based) (optional)
|
||||
* @param limit page size of results (optional)
|
||||
* @return Call<List<User>>
|
||||
*/
|
||||
@GET("orgs/{org}/blocks")
|
||||
Call<List<User>> organizationListBlocks(
|
||||
@retrofit2.http.Path("org") String org,
|
||||
@retrofit2.http.Query("page") Integer page,
|
||||
@retrofit2.http.Query("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* Unblock a user
|
||||
*
|
||||
* @param org name of the organization (required)
|
||||
* @param username user to unblock (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@DELETE("orgs/{org}/blocks/{username}")
|
||||
Call<Void> organizationUnblockUser(
|
||||
@retrofit2.http.Path("org") String org, @retrofit2.http.Path("username") String username);
|
||||
|
||||
/**
|
||||
* Search for teams within an organization
|
||||
*
|
||||
|
||||
@@ -102,6 +102,17 @@ public interface UserApi {
|
||||
@POST("user/emails")
|
||||
Call<List<Email>> userAddEmail(@retrofit2.http.Body CreateEmailOption body);
|
||||
|
||||
/**
|
||||
* Block a user
|
||||
*
|
||||
* @param username user to block (required)
|
||||
* @param note optional note for the block (optional)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@PUT("user/blocks/{username}")
|
||||
Call<Void> userBlockUser(
|
||||
@retrofit2.http.Path("username") String username, @retrofit2.http.Query("note") String note);
|
||||
|
||||
/**
|
||||
* Check if one user is following another user
|
||||
*
|
||||
@@ -114,6 +125,15 @@ public interface UserApi {
|
||||
@retrofit2.http.Path("username") String username,
|
||||
@retrofit2.http.Path("target") String target);
|
||||
|
||||
/**
|
||||
* Check if a user is blocked by the authenticated user
|
||||
*
|
||||
* @param username user to check (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@GET("user/blocks/{username}")
|
||||
Call<Void> userCheckUserBlock(@retrofit2.http.Path("username") String username);
|
||||
|
||||
/**
|
||||
* Create a hook
|
||||
*
|
||||
@@ -527,6 +547,17 @@ public interface UserApi {
|
||||
@retrofit2.http.Query("page") Integer page,
|
||||
@retrofit2.http.Query("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* List users blocked by the authenticated user
|
||||
*
|
||||
* @param page page number of results to return (1-based) (optional)
|
||||
* @param limit page size of results (optional)
|
||||
* @return Call<List<User>>
|
||||
*/
|
||||
@GET("user/blocks")
|
||||
Call<List<User>> userListBlocks(
|
||||
@retrofit2.http.Query("page") Integer page, @retrofit2.http.Query("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* List the authenticated user's email addresses
|
||||
*
|
||||
@@ -673,6 +704,15 @@ public interface UserApi {
|
||||
@retrofit2.http.Query("page") Integer page,
|
||||
@retrofit2.http.Query("limit") Integer limit);
|
||||
|
||||
/**
|
||||
* Unblock a user
|
||||
*
|
||||
* @param username user to unblock (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@DELETE("user/blocks/{username}")
|
||||
Call<Void> userUnblockUser(@retrofit2.http.Path("username") String username);
|
||||
|
||||
/**
|
||||
* Update Avatar
|
||||
*
|
||||
|
||||
@@ -109,6 +109,9 @@ public class EditRepoOption implements Serializable {
|
||||
@SerializedName("private")
|
||||
private Boolean _private = null;
|
||||
|
||||
@SerializedName("projects_mode")
|
||||
private String projectsMode = null;
|
||||
|
||||
@SerializedName("template")
|
||||
private Boolean template = null;
|
||||
|
||||
@@ -715,6 +718,29 @@ public class EditRepoOption implements Serializable {
|
||||
this._private = _private;
|
||||
}
|
||||
|
||||
public EditRepoOption projectsMode(String projectsMode) {
|
||||
this.projectsMode = projectsMode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* `repo` to only allow repo-level projects, `owner` to only allow owner
|
||||
* projects, `all` to allow both.
|
||||
*
|
||||
* @return projectsMode
|
||||
*/
|
||||
@Schema(
|
||||
description =
|
||||
"`repo` to only allow repo-level projects, `owner` to only allow owner projects, `all` to"
|
||||
+ " allow both.")
|
||||
public String getProjectsMode() {
|
||||
return projectsMode;
|
||||
}
|
||||
|
||||
public void setProjectsMode(String projectsMode) {
|
||||
this.projectsMode = projectsMode;
|
||||
}
|
||||
|
||||
public EditRepoOption template(Boolean template) {
|
||||
this.template = template;
|
||||
return this;
|
||||
@@ -797,6 +823,7 @@ public class EditRepoOption implements Serializable {
|
||||
&& Objects.equals(this.mirrorInterval, editRepoOption.mirrorInterval)
|
||||
&& Objects.equals(this.name, editRepoOption.name)
|
||||
&& Objects.equals(this._private, editRepoOption._private)
|
||||
&& Objects.equals(this.projectsMode, editRepoOption.projectsMode)
|
||||
&& Objects.equals(this.template, editRepoOption.template)
|
||||
&& Objects.equals(this.website, editRepoOption.website);
|
||||
}
|
||||
@@ -833,6 +860,7 @@ public class EditRepoOption implements Serializable {
|
||||
mirrorInterval,
|
||||
name,
|
||||
_private,
|
||||
projectsMode,
|
||||
template,
|
||||
website);
|
||||
}
|
||||
@@ -883,6 +911,7 @@ public class EditRepoOption implements Serializable {
|
||||
sb.append(" mirrorInterval: ").append(toIndentedString(mirrorInterval)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" _private: ").append(toIndentedString(_private)).append("\n");
|
||||
sb.append(" projectsMode: ").append(toIndentedString(projectsMode)).append("\n");
|
||||
sb.append(" template: ").append(toIndentedString(template)).append("\n");
|
||||
sb.append(" website: ").append(toIndentedString(website)).append("\n");
|
||||
sb.append("}");
|
||||
|
||||
@@ -15,7 +15,9 @@ package org.gitnex.tea4j.v2.models;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -36,6 +38,9 @@ public class IssueFormField implements Serializable {
|
||||
@SerializedName("validations")
|
||||
private Map<String, Object> validations = null;
|
||||
|
||||
@SerializedName("visible")
|
||||
private List<String> visible = null;
|
||||
|
||||
public IssueFormField attributes(Map<String, Object> attributes) {
|
||||
this.attributes = attributes;
|
||||
return this;
|
||||
@@ -128,6 +133,33 @@ public class IssueFormField implements Serializable {
|
||||
this.validations = validations;
|
||||
}
|
||||
|
||||
public IssueFormField visible(List<String> visible) {
|
||||
this.visible = visible;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IssueFormField addVisibleItem(String visibleItem) {
|
||||
if (this.visible == null) {
|
||||
this.visible = new ArrayList<>();
|
||||
}
|
||||
this.visible.add(visibleItem);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get visible
|
||||
*
|
||||
* @return visible
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public List<String> getVisible() {
|
||||
return visible;
|
||||
}
|
||||
|
||||
public void setVisible(List<String> visible) {
|
||||
this.visible = visible;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(java.lang.Object o) {
|
||||
if (this == o) {
|
||||
@@ -140,12 +172,13 @@ public class IssueFormField implements Serializable {
|
||||
return Objects.equals(this.attributes, issueFormField.attributes)
|
||||
&& Objects.equals(this.id, issueFormField.id)
|
||||
&& Objects.equals(this.type, issueFormField.type)
|
||||
&& Objects.equals(this.validations, issueFormField.validations);
|
||||
&& Objects.equals(this.validations, issueFormField.validations)
|
||||
&& Objects.equals(this.visible, issueFormField.visible);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(attributes, id, type, validations);
|
||||
return Objects.hash(attributes, id, type, validations, visible);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -157,6 +190,7 @@ public class IssueFormField implements Serializable {
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" type: ").append(toIndentedString(type)).append("\n");
|
||||
sb.append(" validations: ").append(toIndentedString(validations)).append("\n");
|
||||
sb.append(" visible: ").append(toIndentedString(visible)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -220,6 +220,9 @@ public class Repository implements Serializable {
|
||||
@SerializedName("private")
|
||||
private Boolean _private = null;
|
||||
|
||||
@SerializedName("projects_mode")
|
||||
private String projectsMode = null;
|
||||
|
||||
@SerializedName("release_counter")
|
||||
private Long releaseCounter = null;
|
||||
|
||||
@@ -1181,6 +1184,25 @@ public class Repository implements Serializable {
|
||||
this._private = _private;
|
||||
}
|
||||
|
||||
public Repository projectsMode(String projectsMode) {
|
||||
this.projectsMode = projectsMode;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get projectsMode
|
||||
*
|
||||
* @return projectsMode
|
||||
*/
|
||||
@Schema(description = "")
|
||||
public String getProjectsMode() {
|
||||
return projectsMode;
|
||||
}
|
||||
|
||||
public void setProjectsMode(String projectsMode) {
|
||||
this.projectsMode = projectsMode;
|
||||
}
|
||||
|
||||
public Repository releaseCounter(Long releaseCounter) {
|
||||
this.releaseCounter = releaseCounter;
|
||||
return this;
|
||||
@@ -1430,6 +1452,7 @@ public class Repository implements Serializable {
|
||||
&& Objects.equals(this.parent, repository.parent)
|
||||
&& Objects.equals(this.permissions, repository.permissions)
|
||||
&& Objects.equals(this._private, repository._private)
|
||||
&& Objects.equals(this.projectsMode, repository.projectsMode)
|
||||
&& Objects.equals(this.releaseCounter, repository.releaseCounter)
|
||||
&& Objects.equals(this.repoTransfer, repository.repoTransfer)
|
||||
&& Objects.equals(this.size, repository.size)
|
||||
@@ -1494,6 +1517,7 @@ public class Repository implements Serializable {
|
||||
parent,
|
||||
permissions,
|
||||
_private,
|
||||
projectsMode,
|
||||
releaseCounter,
|
||||
repoTransfer,
|
||||
size,
|
||||
@@ -1570,6 +1594,7 @@ public class Repository implements Serializable {
|
||||
sb.append(" parent: ").append(toIndentedString(parent)).append("\n");
|
||||
sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n");
|
||||
sb.append(" _private: ").append(toIndentedString(_private)).append("\n");
|
||||
sb.append(" projectsMode: ").append(toIndentedString(projectsMode)).append("\n");
|
||||
sb.append(" releaseCounter: ").append(toIndentedString(releaseCounter)).append("\n");
|
||||
sb.append(" repoTransfer: ").append(toIndentedString(repoTransfer)).append("\n");
|
||||
sb.append(" size: ").append(toIndentedString(size)).append("\n");
|
||||
|
||||
Reference in New Issue
Block a user