From 00a5ce84632fb522b4100886b968a3d172fb0dba Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Fri, 6 Oct 2023 03:59:07 +0000 Subject: [PATCH] Release 0.0.16 --- build.gradle | 2 +- .../api/resources/apps/AppsClient.java | 215 ++++++++-------- .../api/resources/assets/AssetsClient.java | 167 +++++++------ .../api/resources/backups/BackupsClient.java | 40 +-- .../resources/comments/CommentsClient.java | 35 +-- .../resources/contents/ContentsClient.java | 236 +++++++++++------- .../diagnostics/DiagnosticsClient.java | 12 +- .../eventconsumers/EventConsumersClient.java | 20 +- .../api/resources/history/HistoryClient.java | 16 +- .../resources/languages/LanguagesClient.java | 14 +- .../api/resources/news/NewsClient.java | 8 +- .../notifications/NotificationsClient.java | 21 +- .../api/resources/ping/PingClient.java | 22 +- .../api/resources/plans/PlansClient.java | 20 +- .../api/resources/rules/RulesClient.java | 104 ++++---- .../api/resources/schemas/SchemasClient.java | 180 ++++++------- .../api/resources/search/SearchClient.java | 8 +- .../statistics/StatisticsClient.java | 32 +-- .../api/resources/teams/TeamsClient.java | 48 ++-- .../resources/templates/TemplatesClient.java | 12 +- .../translations/TranslationsClient.java | 12 +- .../usermanagement/UserManagementClient.java | 36 +-- .../api/resources/users/UsersClient.java | 39 +-- 23 files changed, 681 insertions(+), 618 deletions(-) diff --git a/build.gradle b/build.gradle index 84e76e6..4edcbdf 100644 --- a/build.gradle +++ b/build.gradle @@ -40,7 +40,7 @@ publishing { maven(MavenPublication) { groupId = 'io.squidex' artifactId = 'squidex' - version = '0.0.15' + version = '0.0.16' from components.java } } diff --git a/src/main/java/com/squidex/api/resources/apps/AppsClient.java b/src/main/java/com/squidex/api/resources/apps/AppsClient.java index b8f4bd7..2a3cf3d 100644 --- a/src/main/java/com/squidex/api/resources/apps/AppsClient.java +++ b/src/main/java/com/squidex/api/resources/apps/AppsClient.java @@ -51,10 +51,6 @@ public AppsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public AssetScriptsDto getAssetScripts() { - return getAssetScripts(null); - } - public AssetScriptsDto getAssetScripts(RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -82,8 +78,12 @@ public AssetScriptsDto getAssetScripts(RequestOptions requestOptions) { } } - public AssetScriptsDto putAssetScripts(UpdateAssetScriptsDto request) { - return putAssetScripts(request, null); + public AssetScriptsDto getAssetScripts() { + return getAssetScripts(null); + } + + public AssetScriptsDto putAssetScripts() { + return putAssetScripts(UpdateAssetScriptsDto.builder().build()); } public AssetScriptsDto putAssetScripts(UpdateAssetScriptsDto request, RequestOptions requestOptions) { @@ -120,15 +120,8 @@ public AssetScriptsDto putAssetScripts(UpdateAssetScriptsDto request, RequestOpt } } - public AssetScriptsDto putAssetScripts() { - return putAssetScripts(UpdateAssetScriptsDto.builder().build()); - } - - /** - * Gets all configured clients for the app with the specified name. - */ - public ClientsDto getClients() { - return getClients(null); + public AssetScriptsDto putAssetScripts(UpdateAssetScriptsDto request) { + return putAssetScripts(request, null); } /** @@ -162,11 +155,10 @@ public ClientsDto getClients(RequestOptions requestOptions) { } /** - * Create a new client for the app with the specified name. - * The client secret is auto generated on the server and returned. The client does not expire, the access token is valid for 30 days. + * Gets all configured clients for the app with the specified name. */ - public ClientsDto postClient(CreateClientDto request) { - return postClient(request, null); + public ClientsDto getClients() { + return getClients(null); } /** @@ -207,11 +199,19 @@ public ClientsDto postClient(CreateClientDto request, RequestOptions requestOpti } } + /** + * Create a new client for the app with the specified name. + * The client secret is auto generated on the server and returned. The client does not expire, the access token is valid for 30 days. + */ + public ClientsDto postClient(CreateClientDto request) { + return postClient(request, null); + } + /** * Only the display name can be changed, create a new client if necessary. */ - public ClientsDto putClient(String id, UpdateClientDto request) { - return putClient(id, request, null); + public ClientsDto putClient(String id) { + return putClient(id, UpdateClientDto.builder().build()); } /** @@ -252,15 +252,11 @@ public ClientsDto putClient(String id, UpdateClientDto request, RequestOptions r } } - public ClientsDto putClient(String id) { - return putClient(id, UpdateClientDto.builder().build()); - } - /** - * The application that uses this client credentials cannot access the API after it has been revoked. + * Only the display name can be changed, create a new client if necessary. */ - public ClientsDto deleteClient(String id) { - return deleteClient(id, null); + public ClientsDto putClient(String id, UpdateClientDto request) { + return putClient(id, request, null); } /** @@ -294,8 +290,11 @@ public ClientsDto deleteClient(String id, RequestOptions requestOptions) { } } - public ContributorsDto getContributors() { - return getContributors(null); + /** + * The application that uses this client credentials cannot access the API after it has been revoked. + */ + public ClientsDto deleteClient(String id) { + return deleteClient(id, null); } public ContributorsDto getContributors(RequestOptions requestOptions) { @@ -325,8 +324,8 @@ public ContributorsDto getContributors(RequestOptions requestOptions) { } } - public ContributorsDto postContributor(AssignContributorDto request) { - return postContributor(request, null); + public ContributorsDto getContributors() { + return getContributors(null); } public ContributorsDto postContributor(AssignContributorDto request, RequestOptions requestOptions) { @@ -363,8 +362,8 @@ public ContributorsDto postContributor(AssignContributorDto request, RequestOpti } } - public ContributorsDto deleteMyself() { - return deleteMyself(null); + public ContributorsDto postContributor(AssignContributorDto request) { + return postContributor(request, null); } public ContributorsDto deleteMyself(RequestOptions requestOptions) { @@ -394,8 +393,8 @@ public ContributorsDto deleteMyself(RequestOptions requestOptions) { } } - public ContributorsDto deleteContributor(String id) { - return deleteContributor(id, null); + public ContributorsDto deleteMyself() { + return deleteMyself(null); } public ContributorsDto deleteContributor(String id, RequestOptions requestOptions) { @@ -426,8 +425,8 @@ public ContributorsDto deleteContributor(String id, RequestOptions requestOption } } - public InputStream getImage() { - return getImage(null); + public ContributorsDto deleteContributor(String id) { + return deleteContributor(id, null); } public InputStream getImage(RequestOptions requestOptions) { @@ -457,8 +456,8 @@ public InputStream getImage(RequestOptions requestOptions) { } } - public AppDto uploadImage(File file, AppsUploadImageRequest request) { - return uploadImage(file, request, null); + public InputStream getImage() { + return getImage(null); } public AppDto uploadImage(File file, AppsUploadImageRequest request, RequestOptions requestOptions) { @@ -495,8 +494,8 @@ public AppDto uploadImage(File file, AppsUploadImageRequest request, RequestOpti } } - public AppDto deleteImage() { - return deleteImage(null); + public AppDto uploadImage(File file, AppsUploadImageRequest request) { + return uploadImage(file, request, null); } public AppDto deleteImage(RequestOptions requestOptions) { @@ -526,8 +525,8 @@ public AppDto deleteImage(RequestOptions requestOptions) { } } - public AppLanguagesDto getLanguages() { - return getLanguages(null); + public AppDto deleteImage() { + return deleteImage(null); } public AppLanguagesDto getLanguages(RequestOptions requestOptions) { @@ -557,8 +556,8 @@ public AppLanguagesDto getLanguages(RequestOptions requestOptions) { } } - public AppLanguagesDto postLanguage(AddLanguageDto request) { - return postLanguage(request, null); + public AppLanguagesDto getLanguages() { + return getLanguages(null); } public AppLanguagesDto postLanguage(AddLanguageDto request, RequestOptions requestOptions) { @@ -595,8 +594,12 @@ public AppLanguagesDto postLanguage(AddLanguageDto request, RequestOptions reque } } - public AppLanguagesDto putLanguage(String language, UpdateLanguageDto request) { - return putLanguage(language, request, null); + public AppLanguagesDto postLanguage(AddLanguageDto request) { + return postLanguage(request, null); + } + + public AppLanguagesDto putLanguage(String language) { + return putLanguage(language, UpdateLanguageDto.builder().build()); } public AppLanguagesDto putLanguage(String language, UpdateLanguageDto request, RequestOptions requestOptions) { @@ -634,12 +637,8 @@ public AppLanguagesDto putLanguage(String language, UpdateLanguageDto request, R } } - public AppLanguagesDto putLanguage(String language) { - return putLanguage(language, UpdateLanguageDto.builder().build()); - } - - public AppLanguagesDto deleteLanguage(String language) { - return deleteLanguage(language, null); + public AppLanguagesDto putLanguage(String language, UpdateLanguageDto request) { + return putLanguage(language, request, null); } public AppLanguagesDto deleteLanguage(String language, RequestOptions requestOptions) { @@ -670,8 +669,8 @@ public AppLanguagesDto deleteLanguage(String language, RequestOptions requestOpt } } - public RolesDto getRoles() { - return getRoles(null); + public AppLanguagesDto deleteLanguage(String language) { + return deleteLanguage(language, null); } public RolesDto getRoles(RequestOptions requestOptions) { @@ -701,8 +700,8 @@ public RolesDto getRoles(RequestOptions requestOptions) { } } - public RolesDto postRole(AddRoleDto request) { - return postRole(request, null); + public RolesDto getRoles() { + return getRoles(null); } public RolesDto postRole(AddRoleDto request, RequestOptions requestOptions) { @@ -739,8 +738,8 @@ public RolesDto postRole(AddRoleDto request, RequestOptions requestOptions) { } } - public List getPermissions() { - return getPermissions(null); + public RolesDto postRole(AddRoleDto request) { + return postRole(request, null); } public List getPermissions(RequestOptions requestOptions) { @@ -771,8 +770,8 @@ public List getPermissions(RequestOptions requestOptions) { } } - public RolesDto putRole(String roleName, UpdateRoleDto request) { - return putRole(roleName, request, null); + public List getPermissions() { + return getPermissions(null); } public RolesDto putRole(String roleName, UpdateRoleDto request, RequestOptions requestOptions) { @@ -810,8 +809,8 @@ public RolesDto putRole(String roleName, UpdateRoleDto request, RequestOptions r } } - public RolesDto deleteRole(String roleName) { - return deleteRole(roleName, null); + public RolesDto putRole(String roleName, UpdateRoleDto request) { + return putRole(roleName, request, null); } public RolesDto deleteRole(String roleName, RequestOptions requestOptions) { @@ -842,12 +841,8 @@ public RolesDto deleteRole(String roleName, RequestOptions requestOptions) { } } - /** - * You can only retrieve the list of apps when you are authenticated as a user (OpenID implicit flow). - * You will retrieve all apps, where you are assigned as a contributor. - */ - public List getApps() { - return getApps(null); + public RolesDto deleteRole(String roleName) { + return deleteRole(roleName, null); } /** @@ -881,11 +876,11 @@ public List getApps(RequestOptions requestOptions) { } /** - * You can only create an app when you are authenticated as a user (OpenID implicit flow). - * You will be assigned as owner of the new app automatically. + * You can only retrieve the list of apps when you are authenticated as a user (OpenID implicit flow). + * You will retrieve all apps, where you are assigned as a contributor. */ - public AppDto postApp(CreateAppDto request) { - return postApp(request, null); + public List getApps() { + return getApps(null); } /** @@ -925,11 +920,11 @@ public AppDto postApp(CreateAppDto request, RequestOptions requestOptions) { } /** - * You can only retrieve the list of apps when you are authenticated as a user (OpenID implicit flow). - * You will retrieve all apps, where you are assigned as a contributor. + * You can only create an app when you are authenticated as a user (OpenID implicit flow). + * You will be assigned as owner of the new app automatically. */ - public List getTeamApps(String team) { - return getTeamApps(team, null); + public AppDto postApp(CreateAppDto request) { + return postApp(request, null); } /** @@ -964,8 +959,12 @@ public List getTeamApps(String team, RequestOptions requestOptions) { } } - public AppDto getApp() { - return getApp(null); + /** + * You can only retrieve the list of apps when you are authenticated as a user (OpenID implicit flow). + * You will retrieve all apps, where you are assigned as a contributor. + */ + public List getTeamApps(String team) { + return getTeamApps(team, null); } public AppDto getApp(RequestOptions requestOptions) { @@ -994,8 +993,12 @@ public AppDto getApp(RequestOptions requestOptions) { } } - public AppDto putApp(UpdateAppDto request) { - return putApp(request, null); + public AppDto getApp() { + return getApp(null); + } + + public AppDto putApp() { + return putApp(UpdateAppDto.builder().build()); } public AppDto putApp(UpdateAppDto request, RequestOptions requestOptions) { @@ -1031,12 +1034,8 @@ public AppDto putApp(UpdateAppDto request, RequestOptions requestOptions) { } } - public AppDto putApp() { - return putApp(UpdateAppDto.builder().build()); - } - - public void deleteApp() { - deleteApp(null); + public AppDto putApp(UpdateAppDto request) { + return putApp(request, null); } public void deleteApp(RequestOptions requestOptions) { @@ -1064,8 +1063,12 @@ public void deleteApp(RequestOptions requestOptions) { } } - public AppDto putAppTeam(TransferToTeamDto request) { - return putAppTeam(request, null); + public void deleteApp() { + deleteApp(null); + } + + public AppDto putAppTeam() { + return putAppTeam(TransferToTeamDto.builder().build()); } public AppDto putAppTeam(TransferToTeamDto request, RequestOptions requestOptions) { @@ -1102,12 +1105,8 @@ public AppDto putAppTeam(TransferToTeamDto request, RequestOptions requestOption } } - public AppDto putAppTeam() { - return putAppTeam(TransferToTeamDto.builder().build()); - } - - public AppSettingsDto getSettings() { - return getSettings(null); + public AppDto putAppTeam(TransferToTeamDto request) { + return putAppTeam(request, null); } public AppSettingsDto getSettings(RequestOptions requestOptions) { @@ -1137,8 +1136,8 @@ public AppSettingsDto getSettings(RequestOptions requestOptions) { } } - public AppSettingsDto putSettings(UpdateAppSettingsDto request) { - return putSettings(request, null); + public AppSettingsDto getSettings() { + return getSettings(null); } public AppSettingsDto putSettings(UpdateAppSettingsDto request, RequestOptions requestOptions) { @@ -1175,8 +1174,8 @@ public AppSettingsDto putSettings(UpdateAppSettingsDto request, RequestOptions r } } - public WorkflowsDto getWorkflows() { - return getWorkflows(null); + public AppSettingsDto putSettings(UpdateAppSettingsDto request) { + return putSettings(request, null); } public WorkflowsDto getWorkflows(RequestOptions requestOptions) { @@ -1206,8 +1205,8 @@ public WorkflowsDto getWorkflows(RequestOptions requestOptions) { } } - public WorkflowsDto postWorkflow(AddWorkflowDto request) { - return postWorkflow(request, null); + public WorkflowsDto getWorkflows() { + return getWorkflows(null); } public WorkflowsDto postWorkflow(AddWorkflowDto request, RequestOptions requestOptions) { @@ -1244,8 +1243,8 @@ public WorkflowsDto postWorkflow(AddWorkflowDto request, RequestOptions requestO } } - public WorkflowsDto putWorkflow(String id, UpdateWorkflowDto request) { - return putWorkflow(id, request, null); + public WorkflowsDto postWorkflow(AddWorkflowDto request) { + return postWorkflow(request, null); } public WorkflowsDto putWorkflow(String id, UpdateWorkflowDto request, RequestOptions requestOptions) { @@ -1283,8 +1282,8 @@ public WorkflowsDto putWorkflow(String id, UpdateWorkflowDto request, RequestOpt } } - public WorkflowsDto deleteWorkflow(String id) { - return deleteWorkflow(id, null); + public WorkflowsDto putWorkflow(String id, UpdateWorkflowDto request) { + return putWorkflow(id, request, null); } public WorkflowsDto deleteWorkflow(String id, RequestOptions requestOptions) { @@ -1314,4 +1313,8 @@ public WorkflowsDto deleteWorkflow(String id, RequestOptions requestOptions) { throw new RuntimeException(e); } } + + public WorkflowsDto deleteWorkflow(String id) { + return deleteWorkflow(id, null); + } } diff --git a/src/main/java/com/squidex/api/resources/assets/AssetsClient.java b/src/main/java/com/squidex/api/resources/assets/AssetsClient.java index bc9d1c2..ce7d63b 100644 --- a/src/main/java/com/squidex/api/resources/assets/AssetsClient.java +++ b/src/main/java/com/squidex/api/resources/assets/AssetsClient.java @@ -50,8 +50,9 @@ public AssetsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public InputStream getAssetContentBySlug(String idOrSlug, String more, AssetsGetAssetContentBySlugRequest request) { - return getAssetContentBySlug(idOrSlug, more, request, null); + public InputStream getAssetContentBySlug(String idOrSlug, String more) { + return getAssetContentBySlug( + idOrSlug, more, AssetsGetAssetContentBySlugRequest.builder().build()); } public InputStream getAssetContentBySlug( @@ -127,13 +128,12 @@ public InputStream getAssetContentBySlug( } } - public InputStream getAssetContentBySlug(String idOrSlug, String more) { - return getAssetContentBySlug( - idOrSlug, more, AssetsGetAssetContentBySlugRequest.builder().build()); + public InputStream getAssetContentBySlug(String idOrSlug, String more, AssetsGetAssetContentBySlugRequest request) { + return getAssetContentBySlug(idOrSlug, more, request, null); } - public InputStream getAssetContent(String id, AssetsGetAssetContentRequest request) { - return getAssetContent(id, request, null); + public InputStream getAssetContent(String id) { + return getAssetContent(id, AssetsGetAssetContentRequest.builder().build()); } public InputStream getAssetContent(String id, AssetsGetAssetContentRequest request, RequestOptions requestOptions) { @@ -206,15 +206,15 @@ public InputStream getAssetContent(String id, AssetsGetAssetContentRequest reque } } - public InputStream getAssetContent(String id) { - return getAssetContent(id, AssetsGetAssetContentRequest.builder().build()); + public InputStream getAssetContent(String id, AssetsGetAssetContentRequest request) { + return getAssetContent(id, request, null); } /** * Get all asset folders for the app. */ - public AssetFoldersDto getAssetFolders(AssetsGetAssetFoldersRequest request) { - return getAssetFolders(request, null); + public AssetFoldersDto getAssetFolders() { + return getAssetFolders(AssetsGetAssetFoldersRequest.builder().build()); } /** @@ -252,12 +252,11 @@ public AssetFoldersDto getAssetFolders(AssetsGetAssetFoldersRequest request, Req } } - public AssetFoldersDto getAssetFolders() { - return getAssetFolders(AssetsGetAssetFoldersRequest.builder().build()); - } - - public AssetFolderDto postAssetFolder(CreateAssetFolderDto request) { - return postAssetFolder(request, null); + /** + * Get all asset folders for the app. + */ + public AssetFoldersDto getAssetFolders(AssetsGetAssetFoldersRequest request) { + return getAssetFolders(request, null); } public AssetFolderDto postAssetFolder(CreateAssetFolderDto request, RequestOptions requestOptions) { @@ -294,8 +293,8 @@ public AssetFolderDto postAssetFolder(CreateAssetFolderDto request, RequestOptio } } - public AssetFolderDto putAssetFolder(String id, RenameAssetFolderDto request) { - return putAssetFolder(id, request, null); + public AssetFolderDto postAssetFolder(CreateAssetFolderDto request) { + return postAssetFolder(request, null); } public AssetFolderDto putAssetFolder(String id, RenameAssetFolderDto request, RequestOptions requestOptions) { @@ -333,8 +332,8 @@ public AssetFolderDto putAssetFolder(String id, RenameAssetFolderDto request, Re } } - public void deleteAssetFolder(String id) { - deleteAssetFolder(id, null); + public AssetFolderDto putAssetFolder(String id, RenameAssetFolderDto request) { + return putAssetFolder(id, request, null); } public void deleteAssetFolder(String id, RequestOptions requestOptions) { @@ -364,8 +363,12 @@ public void deleteAssetFolder(String id, RequestOptions requestOptions) { } } - public AssetFolderDto putAssetFolderParent(String id, MoveAssetFolderDto request) { - return putAssetFolderParent(id, request, null); + public void deleteAssetFolder(String id) { + deleteAssetFolder(id, null); + } + + public AssetFolderDto putAssetFolderParent(String id) { + return putAssetFolderParent(id, MoveAssetFolderDto.builder().build()); } public AssetFolderDto putAssetFolderParent(String id, MoveAssetFolderDto request, RequestOptions requestOptions) { @@ -404,15 +407,8 @@ public AssetFolderDto putAssetFolderParent(String id, MoveAssetFolderDto request } } - public AssetFolderDto putAssetFolderParent(String id) { - return putAssetFolderParent(id, MoveAssetFolderDto.builder().build()); - } - - /** - * Get all tags for assets. - */ - public Map getTags() { - return getTags(null); + public AssetFolderDto putAssetFolderParent(String id, MoveAssetFolderDto request) { + return putAssetFolderParent(id, request, null); } /** @@ -446,8 +442,11 @@ public Map getTags(RequestOptions requestOptions) { } } - public Map putTag(String name, RenameTagDto request) { - return putTag(name, request, null); + /** + * Get all tags for assets. + */ + public Map getTags() { + return getTags(null); } public Map putTag(String name, RenameTagDto request, RequestOptions requestOptions) { @@ -486,11 +485,15 @@ public Map putTag(String name, RenameTagDto request, RequestOpt } } + public Map putTag(String name, RenameTagDto request) { + return putTag(name, request, null); + } + /** * Get all assets for the app. */ - public AssetsDto getAssets(AssetsGetAssetsRequest request) { - return getAssets(request, null); + public AssetsDto getAssets() { + return getAssets(AssetsGetAssetsRequest.builder().build()); } /** @@ -550,15 +553,11 @@ public AssetsDto getAssets(AssetsGetAssetsRequest request, RequestOptions reques } } - public AssetsDto getAssets() { - return getAssets(AssetsGetAssetsRequest.builder().build()); - } - /** - * You can only upload one file at a time. The mime type of the file is not calculated by Squidex and is required correctly. + * Get all assets for the app. */ - public AssetDto postAsset(File file, AssetsPostAssetRequest request) { - return postAsset(file, request, null); + public AssetsDto getAssets(AssetsGetAssetsRequest request) { + return getAssets(request, null); } /** @@ -606,11 +605,18 @@ public AssetDto postAsset(File file, AssetsPostAssetRequest request, RequestOpti } } + /** + * You can only upload one file at a time. The mime type of the file is not calculated by Squidex and is required correctly. + */ + public AssetDto postAsset(File file, AssetsPostAssetRequest request) { + return postAsset(file, request, null); + } + /** * Get all assets for the app. */ - public AssetsDto getAssetsPost(AssetsGetAssetsPostRequest request) { - return getAssetsPost(request, null); + public AssetsDto getAssetsPost() { + return getAssetsPost(AssetsGetAssetsPostRequest.builder().build()); } /** @@ -658,12 +664,11 @@ public AssetsDto getAssetsPost(AssetsGetAssetsPostRequest request, RequestOption } } - public AssetsDto getAssetsPost() { - return getAssetsPost(AssetsGetAssetsPostRequest.builder().build()); - } - - public AssetDto getAsset(String id) { - return getAsset(id, null); + /** + * Get all assets for the app. + */ + public AssetsDto getAssetsPost(AssetsGetAssetsPostRequest request) { + return getAssetsPost(request, null); } public AssetDto getAsset(String id, RequestOptions requestOptions) { @@ -694,11 +699,8 @@ public AssetDto getAsset(String id, RequestOptions requestOptions) { } } - /** - * You can only upload one file at a time. The mime type of the file is not calculated by Squidex and is required correctly. - */ - public AssetDto postUpsertAsset(String id, File file, AssetsPostUpsertAssetRequest request) { - return postUpsertAsset(id, file, request, null); + public AssetDto getAsset(String id) { + return getAsset(id, null); } /** @@ -745,8 +747,15 @@ public AssetDto postUpsertAsset( } } - public AssetDto putAsset(String id, AnnotateAssetDto request) { - return putAsset(id, request, null); + /** + * You can only upload one file at a time. The mime type of the file is not calculated by Squidex and is required correctly. + */ + public AssetDto postUpsertAsset(String id, File file, AssetsPostUpsertAssetRequest request) { + return postUpsertAsset(id, file, request, null); + } + + public AssetDto putAsset(String id) { + return putAsset(id, AnnotateAssetDto.builder().build()); } public AssetDto putAsset(String id, AnnotateAssetDto request, RequestOptions requestOptions) { @@ -784,12 +793,12 @@ public AssetDto putAsset(String id, AnnotateAssetDto request, RequestOptions req } } - public AssetDto putAsset(String id) { - return putAsset(id, AnnotateAssetDto.builder().build()); + public AssetDto putAsset(String id, AnnotateAssetDto request) { + return putAsset(id, request, null); } - public void deleteAsset(String id, AssetsDeleteAssetRequest request) { - deleteAsset(id, request, null); + public void deleteAsset(String id) { + deleteAsset(id, AssetsDeleteAssetRequest.builder().build()); } public void deleteAsset(String id, AssetsDeleteAssetRequest request, RequestOptions requestOptions) { @@ -825,12 +834,12 @@ public void deleteAsset(String id, AssetsDeleteAssetRequest request, RequestOpti } } - public void deleteAsset(String id) { - deleteAsset(id, AssetsDeleteAssetRequest.builder().build()); + public void deleteAsset(String id, AssetsDeleteAssetRequest request) { + deleteAsset(id, request, null); } - public List bulkUpdateAssets(BulkUpdateAssetsDto request) { - return bulkUpdateAssets(request, null); + public List bulkUpdateAssets() { + return bulkUpdateAssets(BulkUpdateAssetsDto.builder().build()); } public List bulkUpdateAssets(BulkUpdateAssetsDto request, RequestOptions requestOptions) { @@ -868,15 +877,8 @@ public List bulkUpdateAssets(BulkUpdateAssetsDto request, Request } } - public List bulkUpdateAssets() { - return bulkUpdateAssets(BulkUpdateAssetsDto.builder().build()); - } - - /** - * Use multipart request to upload an asset. - */ - public AssetDto putAssetContent(String id, File file, AssetsPutAssetContentRequest request) { - return putAssetContent(id, file, request, null); + public List bulkUpdateAssets(BulkUpdateAssetsDto request) { + return bulkUpdateAssets(request, null); } /** @@ -919,8 +921,15 @@ public AssetDto putAssetContent( } } - public AssetDto putAssetParent(String id, MoveAssetDto request) { - return putAssetParent(id, request, null); + /** + * Use multipart request to upload an asset. + */ + public AssetDto putAssetContent(String id, File file, AssetsPutAssetContentRequest request) { + return putAssetContent(id, file, request, null); + } + + public AssetDto putAssetParent(String id) { + return putAssetParent(id, MoveAssetDto.builder().build()); } public AssetDto putAssetParent(String id, MoveAssetDto request, RequestOptions requestOptions) { @@ -959,7 +968,7 @@ public AssetDto putAssetParent(String id, MoveAssetDto request, RequestOptions r } } - public AssetDto putAssetParent(String id) { - return putAssetParent(id, MoveAssetDto.builder().build()); + public AssetDto putAssetParent(String id, MoveAssetDto request) { + return putAssetParent(id, request, null); } } diff --git a/src/main/java/com/squidex/api/resources/backups/BackupsClient.java b/src/main/java/com/squidex/api/resources/backups/BackupsClient.java index c23c18b..aa08e29 100644 --- a/src/main/java/com/squidex/api/resources/backups/BackupsClient.java +++ b/src/main/java/com/squidex/api/resources/backups/BackupsClient.java @@ -27,10 +27,6 @@ public BackupsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public InputStream getBackupContent(String id) { - return getBackupContent(id, null); - } - public InputStream getBackupContent(String id, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -59,8 +55,8 @@ public InputStream getBackupContent(String id, RequestOptions requestOptions) { } } - public void deleteBackup(String id) { - deleteBackup(id, null); + public InputStream getBackupContent(String id) { + return getBackupContent(id, null); } public void deleteBackup(String id, RequestOptions requestOptions) { @@ -90,8 +86,12 @@ public void deleteBackup(String id, RequestOptions requestOptions) { } } - public InputStream getBackupContentV2(String id, BackupsGetBackupContentV2Request request) { - return getBackupContentV2(id, request, null); + public void deleteBackup(String id) { + deleteBackup(id, null); + } + + public InputStream getBackupContentV2(String id) { + return getBackupContentV2(id, BackupsGetBackupContentV2Request.builder().build()); } public InputStream getBackupContentV2( @@ -126,12 +126,8 @@ public InputStream getBackupContentV2( } } - public InputStream getBackupContentV2(String id) { - return getBackupContentV2(id, BackupsGetBackupContentV2Request.builder().build()); - } - - public BackupJobsDto getBackups() { - return getBackups(null); + public InputStream getBackupContentV2(String id, BackupsGetBackupContentV2Request request) { + return getBackupContentV2(id, request, null); } public BackupJobsDto getBackups(RequestOptions requestOptions) { @@ -161,8 +157,8 @@ public BackupJobsDto getBackups(RequestOptions requestOptions) { } } - public void postBackup() { - postBackup(null); + public BackupJobsDto getBackups() { + return getBackups(null); } public void postBackup(RequestOptions requestOptions) { @@ -191,8 +187,8 @@ public void postBackup(RequestOptions requestOptions) { } } - public RestoreJobDto getRestoreJob() { - return getRestoreJob(null); + public void postBackup() { + postBackup(null); } public RestoreJobDto getRestoreJob(RequestOptions requestOptions) { @@ -220,8 +216,8 @@ public RestoreJobDto getRestoreJob(RequestOptions requestOptions) { } } - public void postRestoreJob(RestoreRequestDto request) { - postRestoreJob(request, null); + public RestoreJobDto getRestoreJob() { + return getRestoreJob(null); } public void postRestoreJob(RestoreRequestDto request, RequestOptions requestOptions) { @@ -255,4 +251,8 @@ public void postRestoreJob(RestoreRequestDto request, RequestOptions requestOpti throw new RuntimeException(e); } } + + public void postRestoreJob(RestoreRequestDto request) { + postRestoreJob(request, null); + } } diff --git a/src/main/java/com/squidex/api/resources/comments/CommentsClient.java b/src/main/java/com/squidex/api/resources/comments/CommentsClient.java index 313d746..69242b4 100644 --- a/src/main/java/com/squidex/api/resources/comments/CommentsClient.java +++ b/src/main/java/com/squidex/api/resources/comments/CommentsClient.java @@ -28,10 +28,6 @@ public CommentsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public List getWatchingUsers(String resource) { - return getWatchingUsers(resource, null); - } - public List getWatchingUsers(String resource, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -61,11 +57,15 @@ public List getWatchingUsers(String resource, RequestOptions requestOpti } } + public List getWatchingUsers(String resource) { + return getWatchingUsers(resource, null); + } + /** * When passing in a version you can retrieve all updates since then. */ - public CommentsDto getComments(String commentsId, CommentsGetCommentsRequest request) { - return getComments(commentsId, request, null); + public CommentsDto getComments(String commentsId) { + return getComments(commentsId, CommentsGetCommentsRequest.builder().build()); } /** @@ -102,12 +102,11 @@ public CommentsDto getComments( } } - public CommentsDto getComments(String commentsId) { - return getComments(commentsId, CommentsGetCommentsRequest.builder().build()); - } - - public CommentDto postComment(String commentsId, UpsertCommentDto request) { - return postComment(commentsId, request, null); + /** + * When passing in a version you can retrieve all updates since then. + */ + public CommentsDto getComments(String commentsId, CommentsGetCommentsRequest request) { + return getComments(commentsId, request, null); } public CommentDto postComment(String commentsId, UpsertCommentDto request, RequestOptions requestOptions) { @@ -145,8 +144,8 @@ public CommentDto postComment(String commentsId, UpsertCommentDto request, Reque } } - public void putComment(String commentsId, String commentId, UpsertCommentDto request) { - putComment(commentsId, commentId, request, null); + public CommentDto postComment(String commentsId, UpsertCommentDto request) { + return postComment(commentsId, request, null); } public void putComment( @@ -186,8 +185,8 @@ public void putComment( } } - public void deleteComment(String commentsId, String commentId) { - deleteComment(commentsId, commentId, null); + public void putComment(String commentsId, String commentId, UpsertCommentDto request) { + putComment(commentsId, commentId, request, null); } public void deleteComment(String commentsId, String commentId, RequestOptions requestOptions) { @@ -217,4 +216,8 @@ public void deleteComment(String commentsId, String commentId, RequestOptions re throw new RuntimeException(e); } } + + public void deleteComment(String commentsId, String commentId) { + deleteComment(commentsId, commentId, null); + } } diff --git a/src/main/java/com/squidex/api/resources/contents/ContentsClient.java b/src/main/java/com/squidex/api/resources/contents/ContentsClient.java index 121436b..04eb3e2 100644 --- a/src/main/java/com/squidex/api/resources/contents/ContentsClient.java +++ b/src/main/java/com/squidex/api/resources/contents/ContentsClient.java @@ -57,8 +57,8 @@ public ContentsClient(ClientOptions clientOptions) { /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public ContentsDto getContents(String schema, ContentsGetContentsRequest request) { - return getContents(schema, request, null); + public ContentsDto getContents(String schema) { + return getContents(schema, ContentsGetContentsRequest.builder().build()); } /** @@ -131,15 +131,11 @@ public ContentsDto getContents(String schema, ContentsGetContentsRequest request } } - public ContentsDto getContents(String schema) { - return getContents(schema, ContentsGetContentsRequest.builder().build()); - } - /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public ContentDto postContent(String schema, ContentsPostContentRequest request) { - return postContent(schema, request, null); + public ContentsDto getContents(String schema, ContentsGetContentsRequest request) { + return getContents(schema, request, null); } /** @@ -198,8 +194,15 @@ public ContentDto postContent(String schema, ContentsPostContentRequest request, /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public ContentsDto getContentsPost(String schema, ContentsGetContentsPostRequest request) { - return getContentsPost(schema, request, null); + public ContentDto postContent(String schema, ContentsPostContentRequest request) { + return postContent(schema, request, null); + } + + /** + * You can read the generated documentation for your app at /api/content/{appName}/docs. + */ + public ContentsDto getContentsPost(String schema) { + return getContentsPost(schema, ContentsGetContentsPostRequest.builder().build()); } /** @@ -262,15 +265,18 @@ public ContentsDto getContentsPost( } } - public ContentsDto getContentsPost(String schema) { - return getContentsPost(schema, ContentsGetContentsPostRequest.builder().build()); + /** + * You can read the generated documentation for your app at /api/content/{appName}/docs. + */ + public ContentsDto getContentsPost(String schema, ContentsGetContentsPostRequest request) { + return getContentsPost(schema, request, null); } /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public ContentDto getContent(String schema, String id, ContentsGetContentRequest request) { - return getContent(schema, id, request, null); + public ContentDto getContent(String schema, String id) { + return getContent(schema, id, ContentsGetContentRequest.builder().build()); } /** @@ -320,15 +326,11 @@ public ContentDto getContent( } } - public ContentDto getContent(String schema, String id) { - return getContent(schema, id, ContentsGetContentRequest.builder().build()); - } - /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public ContentDto postUpsertContent(String schema, String id, ContentsPostUpsertContentRequest request) { - return postUpsertContent(schema, id, request, null); + public ContentDto getContent(String schema, String id, ContentsGetContentRequest request) { + return getContent(schema, id, request, null); } /** @@ -389,8 +391,8 @@ public ContentDto postUpsertContent( /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public ContentDto putContent(String schema, String id, ContentsPutContentRequest request) { - return putContent(schema, id, request, null); + public ContentDto postUpsertContent(String schema, String id, ContentsPostUpsertContentRequest request) { + return postUpsertContent(schema, id, request, null); } /** @@ -443,8 +445,8 @@ public ContentDto putContent( /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public ContentDto patchContent(String schema, String id, ContentsPatchContentRequest request) { - return patchContent(schema, id, request, null); + public ContentDto putContent(String schema, String id, ContentsPutContentRequest request) { + return putContent(schema, id, request, null); } /** @@ -494,11 +496,18 @@ public ContentDto patchContent( } } + /** + * You can read the generated documentation for your app at /api/content/{appName}/docs. + */ + public ContentDto patchContent(String schema, String id, ContentsPatchContentRequest request) { + return patchContent(schema, id, request, null); + } + /** * You can create an generated documentation for your app at /api/content/{appName}/docs. */ - public void deleteContent(String schema, String id, ContentsDeleteContentRequest request) { - deleteContent(schema, id, request, null); + public void deleteContent(String schema, String id) { + deleteContent(schema, id, ContentsDeleteContentRequest.builder().build()); } /** @@ -538,15 +547,11 @@ public void deleteContent( } } - public void deleteContent(String schema, String id) { - deleteContent(schema, id, ContentsDeleteContentRequest.builder().build()); - } - /** - * You can read the generated documentation for your app at /api/content/{appName}/docs. + * You can create an generated documentation for your app at /api/content/{appName}/docs. */ - public void getContentValidity(String schema, String id) { - getContentValidity(schema, id, null); + public void deleteContent(String schema, String id, ContentsDeleteContentRequest request) { + deleteContent(schema, id, request, null); } /** @@ -583,8 +588,15 @@ public void getContentValidity(String schema, String id, RequestOptions requestO /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public ContentsDto getReferences(String schema, String id, ContentsGetReferencesRequest request) { - return getReferences(schema, id, request, null); + public void getContentValidity(String schema, String id) { + getContentValidity(schema, id, null); + } + + /** + * You can read the generated documentation for your app at /api/content/{appName}/docs. + */ + public ContentsDto getReferences(String schema, String id) { + return getReferences(schema, id, ContentsGetReferencesRequest.builder().build()); } /** @@ -642,15 +654,19 @@ public ContentsDto getReferences( } } - public ContentsDto getReferences(String schema, String id) { - return getReferences(schema, id, ContentsGetReferencesRequest.builder().build()); + /** + * You can read the generated documentation for your app at /api/content/{appName}/docs. + */ + public ContentsDto getReferences(String schema, String id, ContentsGetReferencesRequest request) { + return getReferences(schema, id, request, null); } /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public ContentsDto getReferencing(String schema, String id, ContentsGetReferencingRequest request) { - return getReferencing(schema, id, request, null); + public ContentsDto getReferencing(String schema, String id) { + return getReferencing( + schema, id, ContentsGetReferencingRequest.builder().build()); } /** @@ -708,17 +724,19 @@ public ContentsDto getReferencing( } } - public ContentsDto getReferencing(String schema, String id) { - return getReferencing( - schema, id, ContentsGetReferencingRequest.builder().build()); + /** + * You can read the generated documentation for your app at /api/content/{appName}/docs. + */ + public ContentsDto getReferencing(String schema, String id, ContentsGetReferencingRequest request) { + return getReferencing(schema, id, request, null); } /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public InputStream getContentVersion( - String schema, String id, int version, ContentsGetContentVersionRequest request) { - return getContentVersion(schema, id, version, request, null); + public InputStream getContentVersion(String schema, String id, int version) { + return getContentVersion( + schema, id, version, ContentsGetContentVersionRequest.builder().build()); } /** @@ -765,16 +783,12 @@ public InputStream getContentVersion( } } - public InputStream getContentVersion(String schema, String id, int version) { - return getContentVersion( - schema, id, version, ContentsGetContentVersionRequest.builder().build()); - } - /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public List postContents(String schema, ImportContentsDto request) { - return postContents(schema, request, null); + public InputStream getContentVersion( + String schema, String id, int version, ContentsGetContentVersionRequest request) { + return getContentVersion(schema, id, version, request, null); } /** @@ -819,8 +833,8 @@ public List postContents(String schema, ImportContentsDto request /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public List bulkUpdateContents(String schema, BulkUpdateContentsDto request) { - return bulkUpdateContents(schema, request, null); + public List postContents(String schema, ImportContentsDto request) { + return postContents(schema, request, null); } /** @@ -866,8 +880,8 @@ public List bulkUpdateContents( /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public ContentDto putContentStatus(String schema, String id, ChangeStatusDto request) { - return putContentStatus(schema, id, request, null); + public List bulkUpdateContents(String schema, BulkUpdateContentsDto request) { + return bulkUpdateContents(schema, request, null); } /** @@ -928,8 +942,16 @@ public ContentDto putContentStatus( /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public ContentDto deleteContentStatus(String schema, String id, ContentsDeleteContentStatusRequest request) { - return deleteContentStatus(schema, id, request, null); + public ContentDto putContentStatus(String schema, String id, ChangeStatusDto request) { + return putContentStatus(schema, id, request, null); + } + + /** + * You can read the generated documentation for your app at /api/content/{appName}/docs. + */ + public ContentDto deleteContentStatus(String schema, String id) { + return deleteContentStatus( + schema, id, ContentsDeleteContentStatusRequest.builder().build()); } /** @@ -972,16 +994,18 @@ public ContentDto deleteContentStatus( } } - public ContentDto deleteContentStatus(String schema, String id) { - return deleteContentStatus( - schema, id, ContentsDeleteContentStatusRequest.builder().build()); + /** + * You can read the generated documentation for your app at /api/content/{appName}/docs. + */ + public ContentDto deleteContentStatus(String schema, String id, ContentsDeleteContentStatusRequest request) { + return deleteContentStatus(schema, id, request, null); } /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public ContentDto createDraft(String schema, String id, ContentsCreateDraftRequest request) { - return createDraft(schema, id, request, null); + public ContentDto createDraft(String schema, String id) { + return createDraft(schema, id, ContentsCreateDraftRequest.builder().build()); } /** @@ -1024,15 +1048,18 @@ public ContentDto createDraft( } } - public ContentDto createDraft(String schema, String id) { - return createDraft(schema, id, ContentsCreateDraftRequest.builder().build()); + /** + * You can read the generated documentation for your app at /api/content/{appName}/docs. + */ + public ContentDto createDraft(String schema, String id, ContentsCreateDraftRequest request) { + return createDraft(schema, id, request, null); } /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public ContentDto deleteVersion(String schema, String id, ContentsDeleteVersionRequest request) { - return deleteVersion(schema, id, request, null); + public ContentDto deleteVersion(String schema, String id) { + return deleteVersion(schema, id, ContentsDeleteVersionRequest.builder().build()); } /** @@ -1075,15 +1102,18 @@ public ContentDto deleteVersion( } } - public ContentDto deleteVersion(String schema, String id) { - return deleteVersion(schema, id, ContentsDeleteVersionRequest.builder().build()); + /** + * You can read the generated documentation for your app at /api/content/{appName}/docs. + */ + public ContentDto deleteVersion(String schema, String id, ContentsDeleteVersionRequest request) { + return deleteVersion(schema, id, request, null); } /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public Object getGraphQl(ContentsGetGraphQlRequest request) { - return getGraphQl(request, null); + public Object getGraphQl() { + return getGraphQl(ContentsGetGraphQlRequest.builder().build()); } /** @@ -1129,15 +1159,11 @@ public Object getGraphQl(ContentsGetGraphQlRequest request, RequestOptions reque } } - public Object getGraphQl() { - return getGraphQl(ContentsGetGraphQlRequest.builder().build()); - } - /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public Object postGraphQl(ContentsPostGraphQlRequest request) { - return postGraphQl(request, null); + public Object getGraphQl(ContentsGetGraphQlRequest request) { + return getGraphQl(request, null); } /** @@ -1185,8 +1211,15 @@ public Object postGraphQl(ContentsPostGraphQlRequest request, RequestOptions req /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public Object getGraphQlBatch(ContentsGetGraphQlBatchRequest request) { - return getGraphQlBatch(request, null); + public Object postGraphQl(ContentsPostGraphQlRequest request) { + return postGraphQl(request, null); + } + + /** + * You can read the generated documentation for your app at /api/content/{appName}/docs. + */ + public Object getGraphQlBatch() { + return getGraphQlBatch(ContentsGetGraphQlBatchRequest.builder().build()); } /** @@ -1232,15 +1265,11 @@ public Object getGraphQlBatch(ContentsGetGraphQlBatchRequest request, RequestOpt } } - public Object getGraphQlBatch() { - return getGraphQlBatch(ContentsGetGraphQlBatchRequest.builder().build()); - } - /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public Object postGraphQlBatch(ContentsPostGraphQlBatchRequest request) { - return postGraphQlBatch(request, null); + public Object getGraphQlBatch(ContentsGetGraphQlBatchRequest request) { + return getGraphQlBatch(request, null); } /** @@ -1288,8 +1317,15 @@ public Object postGraphQlBatch(ContentsPostGraphQlBatchRequest request, RequestO /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public ContentsDto getAllContents(ContentsGetAllContentsRequest request) { - return getAllContents(request, null); + public Object postGraphQlBatch(ContentsPostGraphQlBatchRequest request) { + return postGraphQlBatch(request, null); + } + + /** + * You can read the generated documentation for your app at /api/content/{appName}/docs. + */ + public ContentsDto getAllContents() { + return getAllContents(ContentsGetAllContentsRequest.builder().build()); } /** @@ -1360,15 +1396,18 @@ public ContentsDto getAllContents(ContentsGetAllContentsRequest request, Request } } - public ContentsDto getAllContents() { - return getAllContents(ContentsGetAllContentsRequest.builder().build()); + /** + * You can read the generated documentation for your app at /api/content/{appName}/docs. + */ + public ContentsDto getAllContents(ContentsGetAllContentsRequest request) { + return getAllContents(request, null); } /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public ContentsDto getAllContentsPost(AllContentsByPostDto request) { - return getAllContentsPost(request, null); + public ContentsDto getAllContentsPost() { + return getAllContentsPost(AllContentsByPostDto.builder().build()); } /** @@ -1449,15 +1488,11 @@ public ContentsDto getAllContentsPost(AllContentsByPostDto request, RequestOptio } } - public ContentsDto getAllContentsPost() { - return getAllContentsPost(AllContentsByPostDto.builder().build()); - } - /** * You can read the generated documentation for your app at /api/content/{appName}/docs. */ - public List bulkUpdateAllContents(ContentsBulkUpdateAllContentsRequest request) { - return bulkUpdateAllContents(request, null); + public ContentsDto getAllContentsPost(AllContentsByPostDto request) { + return getAllContentsPost(request, null); } /** @@ -1501,4 +1536,11 @@ public List bulkUpdateAllContents( throw new RuntimeException(e); } } + + /** + * You can read the generated documentation for your app at /api/content/{appName}/docs. + */ + public List bulkUpdateAllContents(ContentsBulkUpdateAllContentsRequest request) { + return bulkUpdateAllContents(request, null); + } } diff --git a/src/main/java/com/squidex/api/resources/diagnostics/DiagnosticsClient.java b/src/main/java/com/squidex/api/resources/diagnostics/DiagnosticsClient.java index 56f7bf3..06af994 100644 --- a/src/main/java/com/squidex/api/resources/diagnostics/DiagnosticsClient.java +++ b/src/main/java/com/squidex/api/resources/diagnostics/DiagnosticsClient.java @@ -20,10 +20,6 @@ public DiagnosticsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public void getDump() { - getDump(null); - } - public void getDump(RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -48,8 +44,8 @@ public void getDump(RequestOptions requestOptions) { } } - public void getGcDump() { - getGcDump(null); + public void getDump() { + getDump(null); } public void getGcDump(RequestOptions requestOptions) { @@ -75,4 +71,8 @@ public void getGcDump(RequestOptions requestOptions) { throw new RuntimeException(e); } } + + public void getGcDump() { + getGcDump(null); + } } diff --git a/src/main/java/com/squidex/api/resources/eventconsumers/EventConsumersClient.java b/src/main/java/com/squidex/api/resources/eventconsumers/EventConsumersClient.java index 6e049fa..62f56c9 100644 --- a/src/main/java/com/squidex/api/resources/eventconsumers/EventConsumersClient.java +++ b/src/main/java/com/squidex/api/resources/eventconsumers/EventConsumersClient.java @@ -22,10 +22,6 @@ public EventConsumersClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public EventConsumersDto getEventConsumers() { - return getEventConsumers(null); - } - public EventConsumersDto getEventConsumers(RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -51,8 +47,8 @@ public EventConsumersDto getEventConsumers(RequestOptions requestOptions) { } } - public EventConsumerDto startEventConsumer(String consumerName) { - return startEventConsumer(consumerName, null); + public EventConsumersDto getEventConsumers() { + return getEventConsumers(null); } public EventConsumerDto startEventConsumer(String consumerName, RequestOptions requestOptions) { @@ -82,8 +78,8 @@ public EventConsumerDto startEventConsumer(String consumerName, RequestOptions r } } - public EventConsumerDto stopEventConsumer(String consumerName) { - return stopEventConsumer(consumerName, null); + public EventConsumerDto startEventConsumer(String consumerName) { + return startEventConsumer(consumerName, null); } public EventConsumerDto stopEventConsumer(String consumerName, RequestOptions requestOptions) { @@ -113,8 +109,8 @@ public EventConsumerDto stopEventConsumer(String consumerName, RequestOptions re } } - public EventConsumerDto resetEventConsumer(String consumerName) { - return resetEventConsumer(consumerName, null); + public EventConsumerDto stopEventConsumer(String consumerName) { + return stopEventConsumer(consumerName, null); } public EventConsumerDto resetEventConsumer(String consumerName, RequestOptions requestOptions) { @@ -143,4 +139,8 @@ public EventConsumerDto resetEventConsumer(String consumerName, RequestOptions r throw new RuntimeException(e); } } + + public EventConsumerDto resetEventConsumer(String consumerName) { + return resetEventConsumer(consumerName, null); + } } diff --git a/src/main/java/com/squidex/api/resources/history/HistoryClient.java b/src/main/java/com/squidex/api/resources/history/HistoryClient.java index 56b711d..fa9d99b 100644 --- a/src/main/java/com/squidex/api/resources/history/HistoryClient.java +++ b/src/main/java/com/squidex/api/resources/history/HistoryClient.java @@ -25,8 +25,8 @@ public HistoryClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public List getAppHistory(HistoryGetAppHistoryRequest request) { - return getAppHistory(request, null); + public List getAppHistory() { + return getAppHistory(HistoryGetAppHistoryRequest.builder().build()); } public List getAppHistory(HistoryGetAppHistoryRequest request, RequestOptions requestOptions) { @@ -59,12 +59,12 @@ public List getAppHistory(HistoryGetAppHistoryRequest request, } } - public List getAppHistory() { - return getAppHistory(HistoryGetAppHistoryRequest.builder().build()); + public List getAppHistory(HistoryGetAppHistoryRequest request) { + return getAppHistory(request, null); } - public List getTeamHistory(String team, HistoryGetTeamHistoryRequest request) { - return getTeamHistory(team, request, null); + public List getTeamHistory(String team) { + return getTeamHistory(team, HistoryGetTeamHistoryRequest.builder().build()); } public List getTeamHistory( @@ -98,7 +98,7 @@ public List getTeamHistory( } } - public List getTeamHistory(String team) { - return getTeamHistory(team, HistoryGetTeamHistoryRequest.builder().build()); + public List getTeamHistory(String team, HistoryGetTeamHistoryRequest request) { + return getTeamHistory(team, request, null); } } diff --git a/src/main/java/com/squidex/api/resources/languages/LanguagesClient.java b/src/main/java/com/squidex/api/resources/languages/LanguagesClient.java index 55409cb..d798fd6 100644 --- a/src/main/java/com/squidex/api/resources/languages/LanguagesClient.java +++ b/src/main/java/com/squidex/api/resources/languages/LanguagesClient.java @@ -23,13 +23,6 @@ public LanguagesClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - /** - * Provide a list of supported language codes, following the ISO2Code standard. - */ - public List getLanguages() { - return getLanguages(null); - } - /** * Provide a list of supported language codes, following the ISO2Code standard. */ @@ -58,4 +51,11 @@ public List getLanguages(RequestOptions requestOptions) { throw new RuntimeException(e); } } + + /** + * Provide a list of supported language codes, following the ISO2Code standard. + */ + public List getLanguages() { + return getLanguages(null); + } } diff --git a/src/main/java/com/squidex/api/resources/news/NewsClient.java b/src/main/java/com/squidex/api/resources/news/NewsClient.java index 088954e..0870878 100644 --- a/src/main/java/com/squidex/api/resources/news/NewsClient.java +++ b/src/main/java/com/squidex/api/resources/news/NewsClient.java @@ -22,8 +22,8 @@ public NewsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public FeaturesDto getNews(NewsGetNewsRequest request) { - return getNews(request, null); + public FeaturesDto getNews() { + return getNews(NewsGetNewsRequest.builder().build()); } public FeaturesDto getNews(NewsGetNewsRequest request, RequestOptions requestOptions) { @@ -53,7 +53,7 @@ public FeaturesDto getNews(NewsGetNewsRequest request, RequestOptions requestOpt } } - public FeaturesDto getNews() { - return getNews(NewsGetNewsRequest.builder().build()); + public FeaturesDto getNews(NewsGetNewsRequest request) { + return getNews(request, null); } } diff --git a/src/main/java/com/squidex/api/resources/notifications/NotificationsClient.java b/src/main/java/com/squidex/api/resources/notifications/NotificationsClient.java index ef3c38d..45135d9 100644 --- a/src/main/java/com/squidex/api/resources/notifications/NotificationsClient.java +++ b/src/main/java/com/squidex/api/resources/notifications/NotificationsClient.java @@ -25,8 +25,9 @@ public NotificationsClient(ClientOptions clientOptions) { /** * When passing in a version you can retrieve all updates since then. */ - public CommentsDto getNotifications(String userId, NotificationsGetNotificationsRequest request) { - return getNotifications(userId, request, null); + public CommentsDto getNotifications(String userId) { + return getNotifications( + userId, NotificationsGetNotificationsRequest.builder().build()); } /** @@ -62,13 +63,11 @@ public CommentsDto getNotifications( } } - public CommentsDto getNotifications(String userId) { - return getNotifications( - userId, NotificationsGetNotificationsRequest.builder().build()); - } - - public void deleteComment(String userId, String commentId) { - deleteComment(userId, commentId, null); + /** + * When passing in a version you can retrieve all updates since then. + */ + public CommentsDto getNotifications(String userId, NotificationsGetNotificationsRequest request) { + return getNotifications(userId, request, null); } public void deleteComment(String userId, String commentId, RequestOptions requestOptions) { @@ -97,4 +96,8 @@ public void deleteComment(String userId, String commentId, RequestOptions reques throw new RuntimeException(e); } } + + public void deleteComment(String userId, String commentId) { + deleteComment(userId, commentId, null); + } } diff --git a/src/main/java/com/squidex/api/resources/ping/PingClient.java b/src/main/java/com/squidex/api/resources/ping/PingClient.java index 7a5534f..c06b29b 100644 --- a/src/main/java/com/squidex/api/resources/ping/PingClient.java +++ b/src/main/java/com/squidex/api/resources/ping/PingClient.java @@ -22,10 +22,6 @@ public PingClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public Map getInfo() { - return getInfo(null); - } - public Map getInfo(RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -52,11 +48,8 @@ public Map getInfo(RequestOptions requestOptions) { } } - /** - * Can be used to test, if the Squidex API is alive and responding. - */ - public void getPing() { - getPing(null); + public Map getInfo() { + return getInfo(null); } /** @@ -89,8 +82,8 @@ public void getPing(RequestOptions requestOptions) { /** * Can be used to test, if the Squidex API is alive and responding. */ - public void getAppPing() { - getAppPing(null); + public void getPing() { + getPing(null); } /** @@ -120,4 +113,11 @@ public void getAppPing(RequestOptions requestOptions) { throw new RuntimeException(e); } } + + /** + * Can be used to test, if the Squidex API is alive and responding. + */ + public void getAppPing() { + getAppPing(null); + } } diff --git a/src/main/java/com/squidex/api/resources/plans/PlansClient.java b/src/main/java/com/squidex/api/resources/plans/PlansClient.java index 5a22fa0..6ee6d64 100644 --- a/src/main/java/com/squidex/api/resources/plans/PlansClient.java +++ b/src/main/java/com/squidex/api/resources/plans/PlansClient.java @@ -25,10 +25,6 @@ public PlansClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public PlansDto getPlans() { - return getPlans(null); - } - public PlansDto getPlans(RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -56,8 +52,8 @@ public PlansDto getPlans(RequestOptions requestOptions) { } } - public PlanChangedDto putPlan(ChangePlanDto request) { - return putPlan(request, null); + public PlansDto getPlans() { + return getPlans(null); } public PlanChangedDto putPlan(ChangePlanDto request, RequestOptions requestOptions) { @@ -94,8 +90,8 @@ public PlanChangedDto putPlan(ChangePlanDto request, RequestOptions requestOptio } } - public PlansDto getTeamPlans(String team) { - return getTeamPlans(team, null); + public PlanChangedDto putPlan(ChangePlanDto request) { + return putPlan(request, null); } public PlansDto getTeamPlans(String team, RequestOptions requestOptions) { @@ -125,8 +121,8 @@ public PlansDto getTeamPlans(String team, RequestOptions requestOptions) { } } - public PlanChangedDto putTeamPlan(String team, ChangePlanDto request) { - return putTeamPlan(team, request, null); + public PlansDto getTeamPlans(String team) { + return getTeamPlans(team, null); } public PlanChangedDto putTeamPlan(String team, ChangePlanDto request, RequestOptions requestOptions) { @@ -162,4 +158,8 @@ public PlanChangedDto putTeamPlan(String team, ChangePlanDto request, RequestOpt throw new RuntimeException(e); } } + + public PlanChangedDto putTeamPlan(String team, ChangePlanDto request) { + return putTeamPlan(team, request, null); + } } diff --git a/src/main/java/com/squidex/api/resources/rules/RulesClient.java b/src/main/java/com/squidex/api/resources/rules/RulesClient.java index 9b42b4a..f27b9a6 100644 --- a/src/main/java/com/squidex/api/resources/rules/RulesClient.java +++ b/src/main/java/com/squidex/api/resources/rules/RulesClient.java @@ -34,10 +34,6 @@ public RulesClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public Map getActions() { - return getActions(null); - } - public Map getActions(RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -64,8 +60,8 @@ public Map getActions(RequestOptions requestOptions) { } } - public RulesDto getRules() { - return getRules(null); + public Map getActions() { + return getActions(null); } public RulesDto getRules(RequestOptions requestOptions) { @@ -95,8 +91,8 @@ public RulesDto getRules(RequestOptions requestOptions) { } } - public RuleDto postRule(CreateRuleDto request) { - return postRule(request, null); + public RulesDto getRules() { + return getRules(null); } public RuleDto postRule(CreateRuleDto request, RequestOptions requestOptions) { @@ -133,8 +129,8 @@ public RuleDto postRule(CreateRuleDto request, RequestOptions requestOptions) { } } - public void deleteRuleRun() { - deleteRuleRun(null); + public RuleDto postRule(CreateRuleDto request) { + return postRule(request, null); } public void deleteRuleRun(RequestOptions requestOptions) { @@ -163,8 +159,12 @@ public void deleteRuleRun(RequestOptions requestOptions) { } } - public RuleDto putRule(String id, UpdateRuleDto request) { - return putRule(id, request, null); + public void deleteRuleRun() { + deleteRuleRun(null); + } + + public RuleDto putRule(String id) { + return putRule(id, UpdateRuleDto.builder().build()); } public RuleDto putRule(String id, UpdateRuleDto request, RequestOptions requestOptions) { @@ -202,12 +202,8 @@ public RuleDto putRule(String id, UpdateRuleDto request, RequestOptions requestO } } - public RuleDto putRule(String id) { - return putRule(id, UpdateRuleDto.builder().build()); - } - - public void deleteRule(String id) { - deleteRule(id, null); + public RuleDto putRule(String id, UpdateRuleDto request) { + return putRule(id, request, null); } public void deleteRule(String id, RequestOptions requestOptions) { @@ -237,8 +233,8 @@ public void deleteRule(String id, RequestOptions requestOptions) { } } - public RuleDto enableRule(String id) { - return enableRule(id, null); + public void deleteRule(String id) { + deleteRule(id, null); } public RuleDto enableRule(String id, RequestOptions requestOptions) { @@ -270,8 +266,8 @@ public RuleDto enableRule(String id, RequestOptions requestOptions) { } } - public RuleDto disableRule(String id) { - return disableRule(id, null); + public RuleDto enableRule(String id) { + return enableRule(id, null); } public RuleDto disableRule(String id, RequestOptions requestOptions) { @@ -303,8 +299,8 @@ public RuleDto disableRule(String id, RequestOptions requestOptions) { } } - public void triggerRule(String id) { - triggerRule(id, null); + public RuleDto disableRule(String id) { + return disableRule(id, null); } public void triggerRule(String id, RequestOptions requestOptions) { @@ -335,8 +331,12 @@ public void triggerRule(String id, RequestOptions requestOptions) { } } - public void putRuleRun(String id, RulesPutRuleRunRequest request) { - putRuleRun(id, request, null); + public void triggerRule(String id) { + triggerRule(id, null); + } + + public void putRuleRun(String id) { + putRuleRun(id, RulesPutRuleRunRequest.builder().build()); } public void putRuleRun(String id, RulesPutRuleRunRequest request, RequestOptions requestOptions) { @@ -370,12 +370,8 @@ public void putRuleRun(String id, RulesPutRuleRunRequest request, RequestOptions } } - public void putRuleRun(String id) { - putRuleRun(id, RulesPutRuleRunRequest.builder().build()); - } - - public void deleteRuleEvents(String id) { - deleteRuleEvents(id, null); + public void putRuleRun(String id, RulesPutRuleRunRequest request) { + putRuleRun(id, request, null); } public void deleteRuleEvents(String id, RequestOptions requestOptions) { @@ -406,8 +402,8 @@ public void deleteRuleEvents(String id, RequestOptions requestOptions) { } } - public SimulatedRuleEventsDto simulatePost(CreateRuleDto request) { - return simulatePost(request, null); + public void deleteRuleEvents(String id) { + deleteRuleEvents(id, null); } public SimulatedRuleEventsDto simulatePost(CreateRuleDto request, RequestOptions requestOptions) { @@ -444,8 +440,8 @@ public SimulatedRuleEventsDto simulatePost(CreateRuleDto request, RequestOptions } } - public SimulatedRuleEventsDto simulateGet(String id) { - return simulateGet(id, null); + public SimulatedRuleEventsDto simulatePost(CreateRuleDto request) { + return simulatePost(request, null); } public SimulatedRuleEventsDto simulateGet(String id, RequestOptions requestOptions) { @@ -477,8 +473,12 @@ public SimulatedRuleEventsDto simulateGet(String id, RequestOptions requestOptio } } - public RuleEventsDto getEvents(RulesGetEventsRequest request) { - return getEvents(request, null); + public SimulatedRuleEventsDto simulateGet(String id) { + return simulateGet(id, null); + } + + public RuleEventsDto getEvents() { + return getEvents(RulesGetEventsRequest.builder().build()); } public RuleEventsDto getEvents(RulesGetEventsRequest request, RequestOptions requestOptions) { @@ -516,12 +516,8 @@ public RuleEventsDto getEvents(RulesGetEventsRequest request, RequestOptions req } } - public RuleEventsDto getEvents() { - return getEvents(RulesGetEventsRequest.builder().build()); - } - - public void deleteEvents() { - deleteEvents(null); + public RuleEventsDto getEvents(RulesGetEventsRequest request) { + return getEvents(request, null); } public void deleteEvents(RequestOptions requestOptions) { @@ -550,8 +546,8 @@ public void deleteEvents(RequestOptions requestOptions) { } } - public void putEvent(String id) { - putEvent(id, null); + public void deleteEvents() { + deleteEvents(null); } public void putEvent(String id, RequestOptions requestOptions) { @@ -581,8 +577,8 @@ public void putEvent(String id, RequestOptions requestOptions) { } } - public void deleteEvent(String id) { - deleteEvent(id, null); + public void putEvent(String id) { + putEvent(id, null); } public void deleteEvent(String id, RequestOptions requestOptions) { @@ -612,8 +608,8 @@ public void deleteEvent(String id, RequestOptions requestOptions) { } } - public List getEventTypes() { - return getEventTypes(null); + public void deleteEvent(String id) { + deleteEvent(id, null); } public List getEventTypes(RequestOptions requestOptions) { @@ -642,8 +638,8 @@ public List getEventTypes(RequestOptions requestOptions) { } } - public Object getEventSchema(String type) { - return getEventSchema(type, null); + public List getEventTypes() { + return getEventTypes(null); } public Object getEventSchema(String type, RequestOptions requestOptions) { @@ -671,4 +667,8 @@ public Object getEventSchema(String type, RequestOptions requestOptions) { throw new RuntimeException(e); } } + + public Object getEventSchema(String type) { + return getEventSchema(type, null); + } } diff --git a/src/main/java/com/squidex/api/resources/schemas/SchemasClient.java b/src/main/java/com/squidex/api/resources/schemas/SchemasClient.java index a689c64..28a35e9 100644 --- a/src/main/java/com/squidex/api/resources/schemas/SchemasClient.java +++ b/src/main/java/com/squidex/api/resources/schemas/SchemasClient.java @@ -35,10 +35,6 @@ public SchemasClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public SchemaDto postField(String schema, AddFieldDto request) { - return postField(schema, request, null); - } - public SchemaDto postField(String schema, AddFieldDto request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -75,8 +71,8 @@ public SchemaDto postField(String schema, AddFieldDto request, RequestOptions re } } - public SchemaDto postNestedField(String schema, int parentId, AddFieldDto request) { - return postNestedField(schema, parentId, request, null); + public SchemaDto postField(String schema, AddFieldDto request) { + return postField(schema, request, null); } public SchemaDto postNestedField(String schema, int parentId, AddFieldDto request, RequestOptions requestOptions) { @@ -117,8 +113,12 @@ public SchemaDto postNestedField(String schema, int parentId, AddFieldDto reques } } - public SchemaDto putSchemaUiFields(String schema, ConfigureUiFieldsDto request) { - return putSchemaUiFields(schema, request, null); + public SchemaDto postNestedField(String schema, int parentId, AddFieldDto request) { + return postNestedField(schema, parentId, request, null); + } + + public SchemaDto putSchemaUiFields(String schema) { + return putSchemaUiFields(schema, ConfigureUiFieldsDto.builder().build()); } public SchemaDto putSchemaUiFields(String schema, ConfigureUiFieldsDto request, RequestOptions requestOptions) { @@ -157,12 +157,8 @@ public SchemaDto putSchemaUiFields(String schema, ConfigureUiFieldsDto request, } } - public SchemaDto putSchemaUiFields(String schema) { - return putSchemaUiFields(schema, ConfigureUiFieldsDto.builder().build()); - } - - public SchemaDto putSchemaFieldOrdering(String schema, ReorderFieldsDto request) { - return putSchemaFieldOrdering(schema, request, null); + public SchemaDto putSchemaUiFields(String schema, ConfigureUiFieldsDto request) { + return putSchemaUiFields(schema, request, null); } public SchemaDto putSchemaFieldOrdering(String schema, ReorderFieldsDto request, RequestOptions requestOptions) { @@ -201,8 +197,8 @@ public SchemaDto putSchemaFieldOrdering(String schema, ReorderFieldsDto request, } } - public SchemaDto putNestedFieldOrdering(String schema, int parentId, ReorderFieldsDto request) { - return putNestedFieldOrdering(schema, parentId, request, null); + public SchemaDto putSchemaFieldOrdering(String schema, ReorderFieldsDto request) { + return putSchemaFieldOrdering(schema, request, null); } public SchemaDto putNestedFieldOrdering( @@ -244,8 +240,8 @@ public SchemaDto putNestedFieldOrdering( } } - public SchemaDto putField(String schema, int id, UpdateFieldDto request) { - return putField(schema, id, request, null); + public SchemaDto putNestedFieldOrdering(String schema, int parentId, ReorderFieldsDto request) { + return putNestedFieldOrdering(schema, parentId, request, null); } public SchemaDto putField(String schema, int id, UpdateFieldDto request, RequestOptions requestOptions) { @@ -285,8 +281,8 @@ public SchemaDto putField(String schema, int id, UpdateFieldDto request, Request } } - public SchemaDto deleteField(String schema, int id) { - return deleteField(schema, id, null); + public SchemaDto putField(String schema, int id, UpdateFieldDto request) { + return putField(schema, id, request, null); } public SchemaDto deleteField(String schema, int id, RequestOptions requestOptions) { @@ -319,8 +315,8 @@ public SchemaDto deleteField(String schema, int id, RequestOptions requestOption } } - public SchemaDto putNestedField(String schema, int parentId, int id, UpdateFieldDto request) { - return putNestedField(schema, parentId, id, request, null); + public SchemaDto deleteField(String schema, int id) { + return deleteField(schema, id, null); } public SchemaDto putNestedField( @@ -363,8 +359,8 @@ public SchemaDto putNestedField( } } - public SchemaDto deleteNestedField(String schema, int parentId, int id) { - return deleteNestedField(schema, parentId, id, null); + public SchemaDto putNestedField(String schema, int parentId, int id, UpdateFieldDto request) { + return putNestedField(schema, parentId, id, request, null); } public SchemaDto deleteNestedField(String schema, int parentId, int id, RequestOptions requestOptions) { @@ -399,11 +395,8 @@ public SchemaDto deleteNestedField(String schema, int parentId, int id, RequestO } } - /** - * A locked field cannot be updated or deleted. - */ - public SchemaDto lockField(String schema, int id) { - return lockField(schema, id, null); + public SchemaDto deleteNestedField(String schema, int parentId, int id) { + return deleteNestedField(schema, parentId, id, null); } /** @@ -441,10 +434,10 @@ public SchemaDto lockField(String schema, int id, RequestOptions requestOptions) } /** - * A locked field cannot be edited or deleted. + * A locked field cannot be updated or deleted. */ - public SchemaDto lockNestedField(String schema, int parentId, int id) { - return lockNestedField(schema, parentId, id, null); + public SchemaDto lockField(String schema, int id) { + return lockField(schema, id, null); } /** @@ -484,10 +477,10 @@ public SchemaDto lockNestedField(String schema, int parentId, int id, RequestOpt } /** - * A hidden field is not part of the API response, but can still be edited in the portal. + * A locked field cannot be edited or deleted. */ - public SchemaDto hideField(String schema, int id) { - return hideField(schema, id, null); + public SchemaDto lockNestedField(String schema, int parentId, int id) { + return lockNestedField(schema, parentId, id, null); } /** @@ -527,8 +520,8 @@ public SchemaDto hideField(String schema, int id, RequestOptions requestOptions) /** * A hidden field is not part of the API response, but can still be edited in the portal. */ - public SchemaDto hideNestedField(String schema, int parentId, int id) { - return hideNestedField(schema, parentId, id, null); + public SchemaDto hideField(String schema, int id) { + return hideField(schema, id, null); } /** @@ -570,8 +563,8 @@ public SchemaDto hideNestedField(String schema, int parentId, int id, RequestOpt /** * A hidden field is not part of the API response, but can still be edited in the portal. */ - public SchemaDto showField(String schema, int id) { - return showField(schema, id, null); + public SchemaDto hideNestedField(String schema, int parentId, int id) { + return hideNestedField(schema, parentId, id, null); } /** @@ -611,8 +604,8 @@ public SchemaDto showField(String schema, int id, RequestOptions requestOptions) /** * A hidden field is not part of the API response, but can still be edited in the portal. */ - public SchemaDto showNestedField(String schema, int parentId, int id) { - return showNestedField(schema, parentId, id, null); + public SchemaDto showField(String schema, int id) { + return showField(schema, id, null); } /** @@ -652,10 +645,10 @@ public SchemaDto showNestedField(String schema, int parentId, int id, RequestOpt } /** - * A disabled field cannot not be edited in the squidex portal anymore, but will be part of the API response. + * A hidden field is not part of the API response, but can still be edited in the portal. */ - public SchemaDto enableField(String schema, int id) { - return enableField(schema, id, null); + public SchemaDto showNestedField(String schema, int parentId, int id) { + return showNestedField(schema, parentId, id, null); } /** @@ -695,8 +688,8 @@ public SchemaDto enableField(String schema, int id, RequestOptions requestOption /** * A disabled field cannot not be edited in the squidex portal anymore, but will be part of the API response. */ - public SchemaDto enableNestedField(String schema, int parentId, int id) { - return enableNestedField(schema, parentId, id, null); + public SchemaDto enableField(String schema, int id) { + return enableField(schema, id, null); } /** @@ -738,8 +731,8 @@ public SchemaDto enableNestedField(String schema, int parentId, int id, RequestO /** * A disabled field cannot not be edited in the squidex portal anymore, but will be part of the API response. */ - public SchemaDto disableField(String schema, int id) { - return disableField(schema, id, null); + public SchemaDto enableNestedField(String schema, int parentId, int id) { + return enableNestedField(schema, parentId, id, null); } /** @@ -779,8 +772,8 @@ public SchemaDto disableField(String schema, int id, RequestOptions requestOptio /** * A disabled field cannot not be edited in the squidex portal anymore, but will be part of the API response. */ - public SchemaDto disableNestedField(String schema, int parentId, int id) { - return disableNestedField(schema, parentId, id, null); + public SchemaDto disableField(String schema, int id) { + return disableField(schema, id, null); } /** @@ -819,8 +812,11 @@ public SchemaDto disableNestedField(String schema, int parentId, int id, Request } } - public SchemasDto getSchemas() { - return getSchemas(null); + /** + * A disabled field cannot not be edited in the squidex portal anymore, but will be part of the API response. + */ + public SchemaDto disableNestedField(String schema, int parentId, int id) { + return disableNestedField(schema, parentId, id, null); } public SchemasDto getSchemas(RequestOptions requestOptions) { @@ -850,8 +846,8 @@ public SchemasDto getSchemas(RequestOptions requestOptions) { } } - public SchemaDto postSchema(CreateSchemaDto request) { - return postSchema(request, null); + public SchemasDto getSchemas() { + return getSchemas(null); } public SchemaDto postSchema(CreateSchemaDto request, RequestOptions requestOptions) { @@ -888,8 +884,8 @@ public SchemaDto postSchema(CreateSchemaDto request, RequestOptions requestOptio } } - public SchemaDto getSchema(String schema) { - return getSchema(schema, null); + public SchemaDto postSchema(CreateSchemaDto request) { + return postSchema(request, null); } public SchemaDto getSchema(String schema, RequestOptions requestOptions) { @@ -920,8 +916,12 @@ public SchemaDto getSchema(String schema, RequestOptions requestOptions) { } } - public SchemaDto putSchema(String schema, UpdateSchemaDto request) { - return putSchema(schema, request, null); + public SchemaDto getSchema(String schema) { + return getSchema(schema, null); + } + + public SchemaDto putSchema(String schema) { + return putSchema(schema, UpdateSchemaDto.builder().build()); } public SchemaDto putSchema(String schema, UpdateSchemaDto request, RequestOptions requestOptions) { @@ -959,12 +959,8 @@ public SchemaDto putSchema(String schema, UpdateSchemaDto request, RequestOption } } - public SchemaDto putSchema(String schema) { - return putSchema(schema, UpdateSchemaDto.builder().build()); - } - - public void deleteSchema(String schema) { - deleteSchema(schema, null); + public SchemaDto putSchema(String schema, UpdateSchemaDto request) { + return putSchema(schema, request, null); } public void deleteSchema(String schema, RequestOptions requestOptions) { @@ -994,8 +990,12 @@ public void deleteSchema(String schema, RequestOptions requestOptions) { } } - public SchemaDto putSchemaSync(String schema, SynchronizeSchemaDto request) { - return putSchemaSync(schema, request, null); + public void deleteSchema(String schema) { + deleteSchema(schema, null); + } + + public SchemaDto putSchemaSync(String schema) { + return putSchemaSync(schema, SynchronizeSchemaDto.builder().build()); } public SchemaDto putSchemaSync(String schema, SynchronizeSchemaDto request, RequestOptions requestOptions) { @@ -1034,12 +1034,12 @@ public SchemaDto putSchemaSync(String schema, SynchronizeSchemaDto request, Requ } } - public SchemaDto putSchemaSync(String schema) { - return putSchemaSync(schema, SynchronizeSchemaDto.builder().build()); + public SchemaDto putSchemaSync(String schema, SynchronizeSchemaDto request) { + return putSchemaSync(schema, request, null); } - public SchemaDto putCategory(String schema, ChangeCategoryDto request) { - return putCategory(schema, request, null); + public SchemaDto putCategory(String schema) { + return putCategory(schema, ChangeCategoryDto.builder().build()); } public SchemaDto putCategory(String schema, ChangeCategoryDto request, RequestOptions requestOptions) { @@ -1078,12 +1078,8 @@ public SchemaDto putCategory(String schema, ChangeCategoryDto request, RequestOp } } - public SchemaDto putCategory(String schema) { - return putCategory(schema, ChangeCategoryDto.builder().build()); - } - - public SchemaDto putPreviewUrls(String schema, Map request) { - return putPreviewUrls(schema, request, null); + public SchemaDto putCategory(String schema, ChangeCategoryDto request) { + return putCategory(schema, request, null); } public SchemaDto putPreviewUrls(String schema, Map request, RequestOptions requestOptions) { @@ -1122,8 +1118,12 @@ public SchemaDto putPreviewUrls(String schema, Map request, Requ } } - public SchemaDto putScripts(String schema, SchemaScriptsDto request) { - return putScripts(schema, request, null); + public SchemaDto putPreviewUrls(String schema, Map request) { + return putPreviewUrls(schema, request, null); + } + + public SchemaDto putScripts(String schema) { + return putScripts(schema, SchemaScriptsDto.builder().build()); } public SchemaDto putScripts(String schema, SchemaScriptsDto request, RequestOptions requestOptions) { @@ -1162,12 +1162,12 @@ public SchemaDto putScripts(String schema, SchemaScriptsDto request, RequestOpti } } - public SchemaDto putScripts(String schema) { - return putScripts(schema, SchemaScriptsDto.builder().build()); + public SchemaDto putScripts(String schema, SchemaScriptsDto request) { + return putScripts(schema, request, null); } - public SchemaDto putRules(String schema, ConfigureFieldRulesDto request) { - return putRules(schema, request, null); + public SchemaDto putRules(String schema) { + return putRules(schema, ConfigureFieldRulesDto.builder().build()); } public SchemaDto putRules(String schema, ConfigureFieldRulesDto request, RequestOptions requestOptions) { @@ -1206,12 +1206,8 @@ public SchemaDto putRules(String schema, ConfigureFieldRulesDto request, Request } } - public SchemaDto putRules(String schema) { - return putRules(schema, ConfigureFieldRulesDto.builder().build()); - } - - public SchemaDto publishSchema(String schema) { - return publishSchema(schema, null); + public SchemaDto putRules(String schema, ConfigureFieldRulesDto request) { + return putRules(schema, request, null); } public SchemaDto publishSchema(String schema, RequestOptions requestOptions) { @@ -1243,8 +1239,8 @@ public SchemaDto publishSchema(String schema, RequestOptions requestOptions) { } } - public SchemaDto unpublishSchema(String schema) { - return unpublishSchema(schema, null); + public SchemaDto publishSchema(String schema) { + return publishSchema(schema, null); } public SchemaDto unpublishSchema(String schema, RequestOptions requestOptions) { @@ -1275,4 +1271,8 @@ public SchemaDto unpublishSchema(String schema, RequestOptions requestOptions) { throw new RuntimeException(e); } } + + public SchemaDto unpublishSchema(String schema) { + return unpublishSchema(schema, null); + } } diff --git a/src/main/java/com/squidex/api/resources/search/SearchClient.java b/src/main/java/com/squidex/api/resources/search/SearchClient.java index a42b940..4c4095e 100644 --- a/src/main/java/com/squidex/api/resources/search/SearchClient.java +++ b/src/main/java/com/squidex/api/resources/search/SearchClient.java @@ -24,8 +24,8 @@ public SearchClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public List getSearchResults(SearchGetSearchResultsRequest request) { - return getSearchResults(request, null); + public List getSearchResults() { + return getSearchResults(SearchGetSearchResultsRequest.builder().build()); } public List getSearchResults( @@ -59,7 +59,7 @@ public List getSearchResults( } } - public List getSearchResults() { - return getSearchResults(SearchGetSearchResultsRequest.builder().build()); + public List getSearchResults(SearchGetSearchResultsRequest request) { + return getSearchResults(request, null); } } diff --git a/src/main/java/com/squidex/api/resources/statistics/StatisticsClient.java b/src/main/java/com/squidex/api/resources/statistics/StatisticsClient.java index fd323b2..fe1de18 100644 --- a/src/main/java/com/squidex/api/resources/statistics/StatisticsClient.java +++ b/src/main/java/com/squidex/api/resources/statistics/StatisticsClient.java @@ -26,10 +26,6 @@ public StatisticsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public LogDownloadDto getLog() { - return getLog(null); - } - public LogDownloadDto getLog(RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -57,8 +53,8 @@ public LogDownloadDto getLog(RequestOptions requestOptions) { } } - public CallsUsageDtoDto getUsages(String fromDate, String toDate) { - return getUsages(fromDate, toDate, null); + public LogDownloadDto getLog() { + return getLog(null); } public CallsUsageDtoDto getUsages(String fromDate, String toDate, RequestOptions requestOptions) { @@ -90,8 +86,8 @@ public CallsUsageDtoDto getUsages(String fromDate, String toDate, RequestOptions } } - public CallsUsageDtoDto getUsagesForTeam(String team, String fromDate, String toDate) { - return getUsagesForTeam(team, fromDate, toDate, null); + public CallsUsageDtoDto getUsages(String fromDate, String toDate) { + return getUsages(fromDate, toDate, null); } public CallsUsageDtoDto getUsagesForTeam( @@ -124,8 +120,8 @@ public CallsUsageDtoDto getUsagesForTeam( } } - public CurrentStorageDto getCurrentStorageSize() { - return getCurrentStorageSize(null); + public CallsUsageDtoDto getUsagesForTeam(String team, String fromDate, String toDate) { + return getUsagesForTeam(team, fromDate, toDate, null); } public CurrentStorageDto getCurrentStorageSize(RequestOptions requestOptions) { @@ -155,8 +151,8 @@ public CurrentStorageDto getCurrentStorageSize(RequestOptions requestOptions) { } } - public CurrentStorageDto getTeamCurrentStorageSizeForTeam(String team) { - return getTeamCurrentStorageSizeForTeam(team, null); + public CurrentStorageDto getCurrentStorageSize() { + return getCurrentStorageSize(null); } public CurrentStorageDto getTeamCurrentStorageSizeForTeam(String team, RequestOptions requestOptions) { @@ -186,8 +182,8 @@ public CurrentStorageDto getTeamCurrentStorageSizeForTeam(String team, RequestOp } } - public List getStorageSizes(String fromDate, String toDate) { - return getStorageSizes(fromDate, toDate, null); + public CurrentStorageDto getTeamCurrentStorageSizeForTeam(String team) { + return getTeamCurrentStorageSizeForTeam(team, null); } public List getStorageSizes(String fromDate, String toDate, RequestOptions requestOptions) { @@ -220,8 +216,8 @@ public List getStorageSizes(String fromDate, String toDa } } - public List getStorageSizesForTeam(String team, String fromDate, String toDate) { - return getStorageSizesForTeam(team, fromDate, toDate, null); + public List getStorageSizes(String fromDate, String toDate) { + return getStorageSizes(fromDate, toDate, null); } public List getStorageSizesForTeam( @@ -254,4 +250,8 @@ public List getStorageSizesForTeam( throw new RuntimeException(e); } } + + public List getStorageSizesForTeam(String team, String fromDate, String toDate) { + return getStorageSizesForTeam(team, fromDate, toDate, null); + } } diff --git a/src/main/java/com/squidex/api/resources/teams/TeamsClient.java b/src/main/java/com/squidex/api/resources/teams/TeamsClient.java index 8523740..2b0f73c 100644 --- a/src/main/java/com/squidex/api/resources/teams/TeamsClient.java +++ b/src/main/java/com/squidex/api/resources/teams/TeamsClient.java @@ -29,10 +29,6 @@ public TeamsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public ContributorsDto getContributors(String team) { - return getContributors(team, null); - } - public ContributorsDto getContributors(String team, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -60,8 +56,8 @@ public ContributorsDto getContributors(String team, RequestOptions requestOption } } - public ContributorsDto postContributor(String team, AssignContributorDto request) { - return postContributor(team, request, null); + public ContributorsDto getContributors(String team) { + return getContributors(team, null); } public ContributorsDto postContributor(String team, AssignContributorDto request, RequestOptions requestOptions) { @@ -98,8 +94,8 @@ public ContributorsDto postContributor(String team, AssignContributorDto request } } - public ContributorsDto deleteMyself(String team) { - return deleteMyself(team, null); + public ContributorsDto postContributor(String team, AssignContributorDto request) { + return postContributor(team, request, null); } public ContributorsDto deleteMyself(String team, RequestOptions requestOptions) { @@ -129,8 +125,8 @@ public ContributorsDto deleteMyself(String team, RequestOptions requestOptions) } } - public ContributorsDto deleteContributor(String team, String id) { - return deleteContributor(team, id, null); + public ContributorsDto deleteMyself(String team) { + return deleteMyself(team, null); } public ContributorsDto deleteContributor(String team, String id, RequestOptions requestOptions) { @@ -161,12 +157,8 @@ public ContributorsDto deleteContributor(String team, String id, RequestOptions } } - /** - * You can only retrieve the list of teams when you are authenticated as a user (OpenID implicit flow). - * You will retrieve all teams, where you are assigned as a contributor. - */ - public List getTeams() { - return getTeams(null); + public ContributorsDto deleteContributor(String team, String id) { + return deleteContributor(team, id, null); } /** @@ -200,11 +192,11 @@ public List getTeams(RequestOptions requestOptions) { } /** - * You can only create an team when you are authenticated as a user (OpenID implicit flow). - * You will be assigned as owner of the new team automatically. + * You can only retrieve the list of teams when you are authenticated as a user (OpenID implicit flow). + * You will retrieve all teams, where you are assigned as a contributor. */ - public TeamDto postTeam(CreateTeamDto request) { - return postTeam(request, null); + public List getTeams() { + return getTeams(null); } /** @@ -243,8 +235,12 @@ public TeamDto postTeam(CreateTeamDto request, RequestOptions requestOptions) { } } - public TeamDto getTeam(String team) { - return getTeam(team, null); + /** + * You can only create an team when you are authenticated as a user (OpenID implicit flow). + * You will be assigned as owner of the new team automatically. + */ + public TeamDto postTeam(CreateTeamDto request) { + return postTeam(request, null); } public TeamDto getTeam(String team, RequestOptions requestOptions) { @@ -273,8 +269,8 @@ public TeamDto getTeam(String team, RequestOptions requestOptions) { } } - public TeamDto putTeam(String team, UpdateTeamDto request) { - return putTeam(team, request, null); + public TeamDto getTeam(String team) { + return getTeam(team, null); } public TeamDto putTeam(String team, UpdateTeamDto request, RequestOptions requestOptions) { @@ -309,4 +305,8 @@ public TeamDto putTeam(String team, UpdateTeamDto request, RequestOptions reques throw new RuntimeException(e); } } + + public TeamDto putTeam(String team, UpdateTeamDto request) { + return putTeam(team, request, null); + } } diff --git a/src/main/java/com/squidex/api/resources/templates/TemplatesClient.java b/src/main/java/com/squidex/api/resources/templates/TemplatesClient.java index 55e81ce..fec9583 100644 --- a/src/main/java/com/squidex/api/resources/templates/TemplatesClient.java +++ b/src/main/java/com/squidex/api/resources/templates/TemplatesClient.java @@ -22,10 +22,6 @@ public TemplatesClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public TemplatesDto getTemplates() { - return getTemplates(null); - } - public TemplatesDto getTemplates(RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -51,8 +47,8 @@ public TemplatesDto getTemplates(RequestOptions requestOptions) { } } - public TemplateDetailsDto getTemplate(String name) { - return getTemplate(name, null); + public TemplatesDto getTemplates() { + return getTemplates(null); } public TemplateDetailsDto getTemplate(String name, RequestOptions requestOptions) { @@ -80,4 +76,8 @@ public TemplateDetailsDto getTemplate(String name, RequestOptions requestOptions throw new RuntimeException(e); } } + + public TemplateDetailsDto getTemplate(String name) { + return getTemplate(name, null); + } } diff --git a/src/main/java/com/squidex/api/resources/translations/TranslationsClient.java b/src/main/java/com/squidex/api/resources/translations/TranslationsClient.java index 401998f..0a7fb9a 100644 --- a/src/main/java/com/squidex/api/resources/translations/TranslationsClient.java +++ b/src/main/java/com/squidex/api/resources/translations/TranslationsClient.java @@ -27,10 +27,6 @@ public TranslationsClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public TranslationDto postTranslation(TranslateDto request) { - return postTranslation(request, null); - } - public TranslationDto postTranslation(TranslateDto request, RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -65,8 +61,8 @@ public TranslationDto postTranslation(TranslateDto request, RequestOptions reque } } - public List postQuestion(AskDto request) { - return postQuestion(request, null); + public TranslationDto postTranslation(TranslateDto request) { + return postTranslation(request, null); } public List postQuestion(AskDto request, RequestOptions requestOptions) { @@ -103,4 +99,8 @@ public List postQuestion(AskDto request, RequestOptions requestOptions) throw new RuntimeException(e); } } + + public List postQuestion(AskDto request) { + return postQuestion(request, null); + } } diff --git a/src/main/java/com/squidex/api/resources/usermanagement/UserManagementClient.java b/src/main/java/com/squidex/api/resources/usermanagement/UserManagementClient.java index e4d2836..76d69d9 100644 --- a/src/main/java/com/squidex/api/resources/usermanagement/UserManagementClient.java +++ b/src/main/java/com/squidex/api/resources/usermanagement/UserManagementClient.java @@ -27,8 +27,8 @@ public UserManagementClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public UsersDto getUsers(UserManagementGetUsersRequest request) { - return getUsers(request, null); + public UsersDto getUsers() { + return getUsers(UserManagementGetUsersRequest.builder().build()); } public UsersDto getUsers(UserManagementGetUsersRequest request, RequestOptions requestOptions) { @@ -64,12 +64,8 @@ public UsersDto getUsers(UserManagementGetUsersRequest request, RequestOptions r } } - public UsersDto getUsers() { - return getUsers(UserManagementGetUsersRequest.builder().build()); - } - - public UserDto postUser(CreateUserDto request) { - return postUser(request, null); + public UsersDto getUsers(UserManagementGetUsersRequest request) { + return getUsers(request, null); } public UserDto postUser(CreateUserDto request, RequestOptions requestOptions) { @@ -104,8 +100,8 @@ public UserDto postUser(CreateUserDto request, RequestOptions requestOptions) { } } - public UserDto getUser(String id) { - return getUser(id, null); + public UserDto postUser(CreateUserDto request) { + return postUser(request, null); } public UserDto getUser(String id, RequestOptions requestOptions) { @@ -134,8 +130,8 @@ public UserDto getUser(String id, RequestOptions requestOptions) { } } - public UserDto putUser(String id, UpdateUserDto request) { - return putUser(id, request, null); + public UserDto getUser(String id) { + return getUser(id, null); } public UserDto putUser(String id, UpdateUserDto request, RequestOptions requestOptions) { @@ -171,8 +167,8 @@ public UserDto putUser(String id, UpdateUserDto request, RequestOptions requestO } } - public void deleteUser(String id) { - deleteUser(id, null); + public UserDto putUser(String id, UpdateUserDto request) { + return putUser(id, request, null); } public void deleteUser(String id, RequestOptions requestOptions) { @@ -200,8 +196,8 @@ public void deleteUser(String id, RequestOptions requestOptions) { } } - public UserDto lockUser(String id) { - return lockUser(id, null); + public void deleteUser(String id) { + deleteUser(id, null); } public UserDto lockUser(String id, RequestOptions requestOptions) { @@ -231,8 +227,8 @@ public UserDto lockUser(String id, RequestOptions requestOptions) { } } - public UserDto unlockUser(String id) { - return unlockUser(id, null); + public UserDto lockUser(String id) { + return lockUser(id, null); } public UserDto unlockUser(String id, RequestOptions requestOptions) { @@ -261,4 +257,8 @@ public UserDto unlockUser(String id, RequestOptions requestOptions) { throw new RuntimeException(e); } } + + public UserDto unlockUser(String id) { + return unlockUser(id, null); + } } diff --git a/src/main/java/com/squidex/api/resources/users/UsersClient.java b/src/main/java/com/squidex/api/resources/users/UsersClient.java index 390f9fe..dc58aba 100644 --- a/src/main/java/com/squidex/api/resources/users/UsersClient.java +++ b/src/main/java/com/squidex/api/resources/users/UsersClient.java @@ -29,10 +29,6 @@ public UsersClient(ClientOptions clientOptions) { this.clientOptions = clientOptions; } - public ResourcesDto getUserResources() { - return getUserResources(null); - } - public ResourcesDto getUserResources(RequestOptions requestOptions) { HttpUrl httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl()) .newBuilder() @@ -58,8 +54,12 @@ public ResourcesDto getUserResources(RequestOptions requestOptions) { } } - public void postUser(UpdateProfileDto request) { - postUser(request, null); + public ResourcesDto getUserResources() { + return getUserResources(null); + } + + public void postUser() { + postUser(UpdateProfileDto.builder().build()); } public void postUser(UpdateProfileDto request, RequestOptions requestOptions) { @@ -94,15 +94,15 @@ public void postUser(UpdateProfileDto request, RequestOptions requestOptions) { } } - public void postUser() { - postUser(UpdateProfileDto.builder().build()); + public void postUser(UpdateProfileDto request) { + postUser(request, null); } /** * Search the user by query that contains the email address or the part of the email address. */ - public List getUsers(UsersGetUsersRequest request) { - return getUsers(request, null); + public List getUsers() { + return getUsers(UsersGetUsersRequest.builder().build()); } /** @@ -136,12 +136,11 @@ public List getUsers(UsersGetUsersRequest request, RequestOptions reque } } - public List getUsers() { - return getUsers(UsersGetUsersRequest.builder().build()); - } - - public UserDto getUser(String id) { - return getUser(id, null); + /** + * Search the user by query that contains the email address or the part of the email address. + */ + public List getUsers(UsersGetUsersRequest request) { + return getUsers(request, null); } public UserDto getUser(String id, RequestOptions requestOptions) { @@ -170,8 +169,8 @@ public UserDto getUser(String id, RequestOptions requestOptions) { } } - public InputStream getUserPicture(String id) { - return getUserPicture(id, null); + public UserDto getUser(String id) { + return getUser(id, null); } public InputStream getUserPicture(String id, RequestOptions requestOptions) { @@ -200,4 +199,8 @@ public InputStream getUserPicture(String id, RequestOptions requestOptions) { throw new RuntimeException(e); } } + + public InputStream getUserPicture(String id) { + return getUserPicture(id, null); + } }