diff --git a/.sdk-version b/.sdk-version index 338a4a18..8f8c6ffb 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.84.0 +v3.85.0 diff --git a/README.md b/README.md index e76b6a4a..12c89194 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this dependency to your project's POM: ai.reveng sdk - 3.84.0 + 3.85.0 compile ``` @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation "ai.reveng:sdk:3.84.0" + implementation "ai.reveng:sdk:3.85.0" } ``` @@ -94,6 +94,7 @@ Class | Method | HTTP request | Description *AnalysesCoreApi* | [**createAnalysis**](docs/AnalysesCoreApi.md#createAnalysis) | **POST** /v2/analyses | Create Analysis *AnalysesCoreApi* | [**deleteAnalysis**](docs/AnalysesCoreApi.md#deleteAnalysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis *AnalysesCoreApi* | [**getAnalysisBasicInfo**](docs/AnalysesCoreApi.md#getAnalysisBasicInfo) | **GET** /v2/analyses/{analysis_id}/basic | Gets basic analysis information +*AnalysesCoreApi* | [**getAnalysisBytes**](docs/AnalysesCoreApi.md#getAnalysisBytes) | **GET** /v3/analyses/{analysis_id}/bytes | Get the bytes of a binary *AnalysesCoreApi* | [**getAnalysisFunctionMap**](docs/AnalysesCoreApi.md#getAnalysisFunctionMap) | **GET** /v2/analyses/{analysis_id}/func_maps | Get Analysis Function Map *AnalysesCoreApi* | [**getAnalysisLogs**](docs/AnalysesCoreApi.md#getAnalysisLogs) | **GET** /v2/analyses/{analysis_id}/logs | Gets the logs of an analysis *AnalysesCoreApi* | [**getAnalysisParams**](docs/AnalysesCoreApi.md#getAnalysisParams) | **GET** /v2/analyses/{analysis_id}/params | Gets analysis param information @@ -151,6 +152,7 @@ Class | Method | HTTP request | Description *FunctionsAiDecompilationApi* | [**createAiDecompilationComment**](docs/FunctionsAiDecompilationApi.md#createAiDecompilationComment) | **POST** /v2/functions/{function_id}/ai-decompilation/comments | Create a comment for this function *FunctionsAiDecompilationApi* | [**createAiDecompilationTask**](docs/FunctionsAiDecompilationApi.md#createAiDecompilationTask) | **POST** /v2/functions/{function_id}/ai-decompilation | Begins AI Decompilation Process *FunctionsAiDecompilationApi* | [**deleteAiDecompilationComment**](docs/FunctionsAiDecompilationApi.md#deleteAiDecompilationComment) | **DELETE** /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} | Delete a comment +*FunctionsAiDecompilationApi* | [**deleteAiDecompilationInlineComment**](docs/FunctionsAiDecompilationApi.md#deleteAiDecompilationInlineComment) | **DELETE** /v3/functions/{function_id}/ai-decompilation/inline-comments/{line} | Delete a single inline comment *FunctionsAiDecompilationApi* | [**getAiDecompilation**](docs/FunctionsAiDecompilationApi.md#getAiDecompilation) | **GET** /v3/functions/{function_id}/ai-decompilation | Get AI decompilation result *FunctionsAiDecompilationApi* | [**getAiDecompilationComments**](docs/FunctionsAiDecompilationApi.md#getAiDecompilationComments) | **GET** /v2/functions/{function_id}/ai-decompilation/comments | Get comments for this function *FunctionsAiDecompilationApi* | [**getAiDecompilationInlineComments**](docs/FunctionsAiDecompilationApi.md#getAiDecompilationInlineComments) | **GET** /v3/functions/{function_id}/ai-decompilation/inline-comments | Get AI decompilation inline comments @@ -162,6 +164,7 @@ Class | Method | HTTP request | Description *FunctionsAiDecompilationApi* | [**getAiDecompilationTaskResult**](docs/FunctionsAiDecompilationApi.md#getAiDecompilationTaskResult) | **GET** /v2/functions/{function_id}/ai-decompilation | Polls AI Decompilation Process *FunctionsAiDecompilationApi* | [**getAiDecompilationTaskStatus**](docs/FunctionsAiDecompilationApi.md#getAiDecompilationTaskStatus) | **GET** /v2/functions/{function_id}/ai-decompilation/status | Check the status of a function ai decompilation *FunctionsAiDecompilationApi* | [**getAiDecompilationTokenised**](docs/FunctionsAiDecompilationApi.md#getAiDecompilationTokenised) | **GET** /v3/functions/{function_id}/ai-decompilation/tokenised | Get tokenised AI decompilation with function mapping +*FunctionsAiDecompilationApi* | [**patchAiDecompilationInlineComment**](docs/FunctionsAiDecompilationApi.md#patchAiDecompilationInlineComment) | **PATCH** /v3/functions/{function_id}/ai-decompilation/inline-comments | Update a single inline comment *FunctionsAiDecompilationApi* | [**regenerateAiDecompilationInlineComments**](docs/FunctionsAiDecompilationApi.md#regenerateAiDecompilationInlineComments) | **POST** /v3/functions/{function_id}/ai-decompilation/inline-comments | Regenerate AI decompilation inline comments *FunctionsAiDecompilationApi* | [**regenerateAiDecompilationSummary**](docs/FunctionsAiDecompilationApi.md#regenerateAiDecompilationSummary) | **POST** /v3/functions/{function_id}/ai-decompilation/summary | Regenerate AI decompilation summary *FunctionsAiDecompilationApi* | [**updateAiDecompilationComment**](docs/FunctionsAiDecompilationApi.md#updateAiDecompilationComment) | **PATCH** /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} | Update a comment @@ -197,8 +200,8 @@ Class | Method | HTTP request | Description *FunctionsRenamingHistoryApi* | [**revertFunctionName_0**](docs/FunctionsRenamingHistoryApi.md#revertFunctionName_0) | **POST** /v3/functions/{function_id}/history/{history_id}/revert | Revert function name *ModelsApi* | [**getModels**](docs/ModelsApi.md#getModels) | **GET** /v2/models | Gets models *ReportsApi* | [**createPdfReport**](docs/ReportsApi.md#createPdfReport) | **POST** /v3/analyses/{analysis_id}/pdf | Start PDF report generation -*ReportsApi* | [**downloadPdfReport**](docs/ReportsApi.md#downloadPdfReport) | **GET** /v3/analyses/{analysis_id}/pdf/{task_id} | Download generated PDF report -*ReportsApi* | [**getPdfReportStatus**](docs/ReportsApi.md#getPdfReportStatus) | **GET** /v3/analyses/{analysis_id}/pdf/{task_id}/status | Get PDF report workflow status +*ReportsApi* | [**downloadPdfReport**](docs/ReportsApi.md#downloadPdfReport) | **GET** /v3/analyses/{analysis_id}/pdf | Download generated PDF report +*ReportsApi* | [**getPdfReportStatus**](docs/ReportsApi.md#getPdfReportStatus) | **GET** /v3/analyses/{analysis_id}/pdf/status | Get PDF report workflow status *SearchApi* | [**searchBinaries**](docs/SearchApi.md#searchBinaries) | **GET** /v2/search/binaries | Binaries search *SearchApi* | [**searchCollections**](docs/SearchApi.md#searchCollections) | **GET** /v2/search/collections | Collections search *SearchApi* | [**searchFunctions**](docs/SearchApi.md#searchFunctions) | **GET** /v2/search/functions | Functions search @@ -484,6 +487,7 @@ Class | Method | HTTP request | Description - [PEModel](docs/PEModel.md) - [PaginationModel](docs/PaginationModel.md) - [Params](docs/Params.md) + - [PatchCommentBody](docs/PatchCommentBody.md) - [Platform](docs/Platform.md) - [ProcessActivityEntry](docs/ProcessActivityEntry.md) - [ProcessMemdumps](docs/ProcessMemdumps.md) diff --git a/build.gradle b/build.gradle index df632a92..5c407948 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'ai.reveng' -version = '3.84.0' +version = '3.85.0' @@ -171,7 +171,7 @@ mavenPublishing { publishToMavenCentral(true) signAllPublications() - coordinates("ai.reveng", "sdk", "3.84.0") + coordinates("ai.reveng", "sdk", "3.85.0") pom { name = "sdk" diff --git a/build.sbt b/build.sbt index d82582e8..fba7bcb9 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "ai.reveng", name := "sdk", - version := "3.84.0", + version := "3.85.0", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index 31817d56..1388c271 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -7,6 +7,7 @@ All URIs are relative to *https://api.reveng.ai* | [**createAnalysis**](AnalysesCoreApi.md#createAnalysis) | **POST** /v2/analyses | Create Analysis | | [**deleteAnalysis**](AnalysesCoreApi.md#deleteAnalysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis | | [**getAnalysisBasicInfo**](AnalysesCoreApi.md#getAnalysisBasicInfo) | **GET** /v2/analyses/{analysis_id}/basic | Gets basic analysis information | +| [**getAnalysisBytes**](AnalysesCoreApi.md#getAnalysisBytes) | **GET** /v3/analyses/{analysis_id}/bytes | Get the bytes of a binary | | [**getAnalysisFunctionMap**](AnalysesCoreApi.md#getAnalysisFunctionMap) | **GET** /v2/analyses/{analysis_id}/func_maps | Get Analysis Function Map | | [**getAnalysisLogs**](AnalysesCoreApi.md#getAnalysisLogs) | **GET** /v2/analyses/{analysis_id}/logs | Gets the logs of an analysis | | [**getAnalysisParams**](AnalysesCoreApi.md#getAnalysisParams) | **GET** /v2/analyses/{analysis_id}/params | Gets analysis param information | @@ -238,6 +239,81 @@ public class Example { | **200** | Successful Response | - | | **422** | Invalid request parameters | - | + +# **getAnalysisBytes** +> getAnalysisBytes(analysisId, page) + +Get the bytes of a binary + +Returns a 64kb byte page from the binary. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + +### Example +```java +// Import classes: +import ai.reveng.invoker.ApiClient; +import ai.reveng.invoker.ApiException; +import ai.reveng.invoker.Configuration; +import ai.reveng.invoker.auth.*; +import ai.reveng.invoker.models.*; +import ai.reveng.api.AnalysesCoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.reveng.ai"); + + // Configure API key authorization: APIKey + ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); + APIKey.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //APIKey.setApiKeyPrefix("Token"); + + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); + Long analysisId = 56L; // Long | Analysis ID + Long page = 56L; // Long | 64kb page of binary data + try { + apiInstance.getAnalysisBytes(analysisId, page); + } catch (ApiException e) { + System.err.println("Exception when calling AnalysesCoreApi#getAnalysisBytes"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **analysisId** | **Long**| Analysis ID | | +| **page** | **Long**| 64kb page of binary data | [optional] | + +### Return type + +null (empty response body) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **400** | Bad Request | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **422** | Unprocessable Entity | - | +| **500** | Internal Server Error | - | + # **getAnalysisFunctionMap** > BaseResponseAnalysisFunctionMapping getAnalysisFunctionMap(analysisId) diff --git a/docs/ErrorBody.md b/docs/ErrorBody.md index a8b010c2..87330efa 100644 --- a/docs/ErrorBody.md +++ b/docs/ErrorBody.md @@ -38,6 +38,7 @@ | INTERNAL_ISSUER | "INTERNAL_ISSUER" | | INVALID_CONVERSATION_ID | "INVALID_CONVERSATION_ID" | | INVALID_CREDENTIALS | "INVALID_CREDENTIALS" | +| INVALID_INVITE_CODE | "INVALID_INVITE_CODE" | | INVALID_RESET_CODE | "INVALID_RESET_CODE" | | LAST_ORG_OWNER | "LAST_ORG_OWNER" | | LINKED_TO_ORG | "LINKED_TO_ORG" | diff --git a/docs/FunctionsAiDecompilationApi.md b/docs/FunctionsAiDecompilationApi.md index 23db1cac..dc616def 100644 --- a/docs/FunctionsAiDecompilationApi.md +++ b/docs/FunctionsAiDecompilationApi.md @@ -8,6 +8,7 @@ All URIs are relative to *https://api.reveng.ai* | [**createAiDecompilationComment**](FunctionsAiDecompilationApi.md#createAiDecompilationComment) | **POST** /v2/functions/{function_id}/ai-decompilation/comments | Create a comment for this function | | [**createAiDecompilationTask**](FunctionsAiDecompilationApi.md#createAiDecompilationTask) | **POST** /v2/functions/{function_id}/ai-decompilation | Begins AI Decompilation Process | | [**deleteAiDecompilationComment**](FunctionsAiDecompilationApi.md#deleteAiDecompilationComment) | **DELETE** /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} | Delete a comment | +| [**deleteAiDecompilationInlineComment**](FunctionsAiDecompilationApi.md#deleteAiDecompilationInlineComment) | **DELETE** /v3/functions/{function_id}/ai-decompilation/inline-comments/{line} | Delete a single inline comment | | [**getAiDecompilation**](FunctionsAiDecompilationApi.md#getAiDecompilation) | **GET** /v3/functions/{function_id}/ai-decompilation | Get AI decompilation result | | [**getAiDecompilationComments**](FunctionsAiDecompilationApi.md#getAiDecompilationComments) | **GET** /v2/functions/{function_id}/ai-decompilation/comments | Get comments for this function | | [**getAiDecompilationInlineComments**](FunctionsAiDecompilationApi.md#getAiDecompilationInlineComments) | **GET** /v3/functions/{function_id}/ai-decompilation/inline-comments | Get AI decompilation inline comments | @@ -19,6 +20,7 @@ All URIs are relative to *https://api.reveng.ai* | [**getAiDecompilationTaskResult**](FunctionsAiDecompilationApi.md#getAiDecompilationTaskResult) | **GET** /v2/functions/{function_id}/ai-decompilation | Polls AI Decompilation Process | | [**getAiDecompilationTaskStatus**](FunctionsAiDecompilationApi.md#getAiDecompilationTaskStatus) | **GET** /v2/functions/{function_id}/ai-decompilation/status | Check the status of a function ai decompilation | | [**getAiDecompilationTokenised**](FunctionsAiDecompilationApi.md#getAiDecompilationTokenised) | **GET** /v3/functions/{function_id}/ai-decompilation/tokenised | Get tokenised AI decompilation with function mapping | +| [**patchAiDecompilationInlineComment**](FunctionsAiDecompilationApi.md#patchAiDecompilationInlineComment) | **PATCH** /v3/functions/{function_id}/ai-decompilation/inline-comments | Update a single inline comment | | [**regenerateAiDecompilationInlineComments**](FunctionsAiDecompilationApi.md#regenerateAiDecompilationInlineComments) | **POST** /v3/functions/{function_id}/ai-decompilation/inline-comments | Regenerate AI decompilation inline comments | | [**regenerateAiDecompilationSummary**](FunctionsAiDecompilationApi.md#regenerateAiDecompilationSummary) | **POST** /v3/functions/{function_id}/ai-decompilation/summary | Regenerate AI decompilation summary | | [**updateAiDecompilationComment**](FunctionsAiDecompilationApi.md#updateAiDecompilationComment) | **PATCH** /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} | Update a comment | @@ -326,6 +328,81 @@ public class Example { | **403** | You can only delete your own comments | - | | **400** | Bad Request | - | + +# **deleteAiDecompilationInlineComment** +> CommentsData deleteAiDecompilationInlineComment(functionId, line) + +Delete a single inline comment + +Removes the comment for the given line number. Requires comments to have been generated first. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + +### Example +```java +// Import classes: +import ai.reveng.invoker.ApiClient; +import ai.reveng.invoker.ApiException; +import ai.reveng.invoker.Configuration; +import ai.reveng.invoker.auth.*; +import ai.reveng.invoker.models.*; +import ai.reveng.api.FunctionsAiDecompilationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.reveng.ai"); + + // Configure API key authorization: APIKey + ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); + APIKey.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //APIKey.setApiKeyPrefix("Token"); + + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); + Long functionId = 56L; // Long | Function ID + Long line = 56L; // Long | Line number of the comment to delete + try { + CommentsData result = apiInstance.deleteAiDecompilationInlineComment(functionId, line); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FunctionsAiDecompilationApi#deleteAiDecompilationInlineComment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **functionId** | **Long**| Function ID | | +| **line** | **Long**| Line number of the comment to delete | | + +### Return type + +[**CommentsData**](CommentsData.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **422** | Unprocessable Entity | - | +| **500** | Internal Server Error | - | + # **getAiDecompilation** > DecompilationData getAiDecompilation(functionId) @@ -1120,6 +1197,81 @@ public class Example { | **422** | Unprocessable Entity | - | | **500** | Internal Server Error | - | + +# **patchAiDecompilationInlineComment** +> CommentsData patchAiDecompilationInlineComment(functionId, patchCommentBody) + +Update a single inline comment + +Merges a single line comment into the existing AI-generated inline comments. Requires comments to have been generated first. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + +### Example +```java +// Import classes: +import ai.reveng.invoker.ApiClient; +import ai.reveng.invoker.ApiException; +import ai.reveng.invoker.Configuration; +import ai.reveng.invoker.auth.*; +import ai.reveng.invoker.models.*; +import ai.reveng.api.FunctionsAiDecompilationApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.reveng.ai"); + + // Configure API key authorization: APIKey + ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); + APIKey.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //APIKey.setApiKeyPrefix("Token"); + + FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient); + Long functionId = 56L; // Long | Function ID + PatchCommentBody patchCommentBody = new PatchCommentBody(); // PatchCommentBody | + try { + CommentsData result = apiInstance.patchAiDecompilationInlineComment(functionId, patchCommentBody); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling FunctionsAiDecompilationApi#patchAiDecompilationInlineComment"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **functionId** | **Long**| Function ID | | +| **patchCommentBody** | [**PatchCommentBody**](PatchCommentBody.md)| | | + +### Return type + +[**CommentsData**](CommentsData.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | OK | - | +| **403** | Forbidden | - | +| **404** | Not Found | - | +| **422** | Unprocessable Entity | - | +| **500** | Internal Server Error | - | + # **regenerateAiDecompilationInlineComments** > RegenerateOutputBody regenerateAiDecompilationInlineComments(functionId) diff --git a/docs/GeneratePDFOutputBody.md b/docs/GeneratePDFOutputBody.md index f5a89ed6..f66fb971 100644 --- a/docs/GeneratePDFOutputBody.md +++ b/docs/GeneratePDFOutputBody.md @@ -8,7 +8,6 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| |**alreadyRunning** | **Boolean** | True when an existing PDF generation is in progress for this analysis and user | [optional] | -|**taskId** | **String** | Workflow task ID — use to poll status and download the PDF | | diff --git a/docs/PatchCommentBody.md b/docs/PatchCommentBody.md new file mode 100644 index 00000000..84d100f4 --- /dev/null +++ b/docs/PatchCommentBody.md @@ -0,0 +1,14 @@ + + +# PatchCommentBody + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**comment** | **String** | Comment text | | +|**line** | **Long** | Line number to set the comment on | | + + + diff --git a/docs/ReportsApi.md b/docs/ReportsApi.md index 4e74388c..045ae486 100644 --- a/docs/ReportsApi.md +++ b/docs/ReportsApi.md @@ -5,8 +5,8 @@ All URIs are relative to *https://api.reveng.ai* | Method | HTTP request | Description | |------------- | ------------- | -------------| | [**createPdfReport**](ReportsApi.md#createPdfReport) | **POST** /v3/analyses/{analysis_id}/pdf | Start PDF report generation | -| [**downloadPdfReport**](ReportsApi.md#downloadPdfReport) | **GET** /v3/analyses/{analysis_id}/pdf/{task_id} | Download generated PDF report | -| [**getPdfReportStatus**](ReportsApi.md#getPdfReportStatus) | **GET** /v3/analyses/{analysis_id}/pdf/{task_id}/status | Get PDF report workflow status | +| [**downloadPdfReport**](ReportsApi.md#downloadPdfReport) | **GET** /v3/analyses/{analysis_id}/pdf | Download generated PDF report | +| [**getPdfReportStatus**](ReportsApi.md#getPdfReportStatus) | **GET** /v3/analyses/{analysis_id}/pdf/status | Get PDF report workflow status | @@ -15,7 +15,7 @@ All URIs are relative to *https://api.reveng.ai* Start PDF report generation -Starts an asynchronous PDF report generation workflow for the given analysis. Returns a deterministic task_id used to poll status and download the resulting PDF. Idempotent: if a workflow is already running for this analysis and user, the same task_id is returned with `already_running: true` so the caller can rejoin the in-flight workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +Starts an asynchronous PDF report generation workflow for the given analysis. Poll status and download the resulting PDF using the same analysis ID. Idempotent: if a workflow is already running for this analysis and user, the response sets `already_running: true` and the caller rejoins the in-flight workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found ### Example ```java @@ -84,11 +84,11 @@ public class Example { # **downloadPdfReport** -> downloadPdfReport(analysisId, taskId) +> downloadPdfReport(analysisId) Download generated PDF report -Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when the task does not exist or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - `500` [`REPORT_RENDER_FAILED`](/errors/REPORT_RENDER_FAILED) — Report Render Failed +Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when no report generation exists for this analysis or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - `500` [`REPORT_RENDER_FAILED`](/errors/REPORT_RENDER_FAILED) — Report Render Failed ### Example ```java @@ -113,9 +113,8 @@ public class Example { ReportsApi apiInstance = new ReportsApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID - String taskId = "taskId_example"; // String | Task ID returned by the create endpoint try { - apiInstance.downloadPdfReport(analysisId, taskId); + apiInstance.downloadPdfReport(analysisId); } catch (ApiException e) { System.err.println("Exception when calling ReportsApi#downloadPdfReport"); System.err.println("Status code: " + e.getCode()); @@ -132,7 +131,6 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **analysisId** | **Long**| Analysis ID | | -| **taskId** | **String**| Task ID returned by the create endpoint | | ### Return type @@ -159,11 +157,11 @@ null (empty response body) # **getPdfReportStatus** -> WorkflowProgress getPdfReportStatus(analysisId, taskId) +> WorkflowProgress getPdfReportStatus(analysisId) Get PDF report workflow status -Returns live workflow progress for the given task. Returns 404 when the task does not exist or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found +Returns live workflow progress for the given analysis. Returns 404 when no report generation exists for this analysis or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found ### Example ```java @@ -188,9 +186,8 @@ public class Example { ReportsApi apiInstance = new ReportsApi(defaultClient); Long analysisId = 56L; // Long | Analysis ID - String taskId = "taskId_example"; // String | Task ID returned by the create endpoint try { - WorkflowProgress result = apiInstance.getPdfReportStatus(analysisId, taskId); + WorkflowProgress result = apiInstance.getPdfReportStatus(analysisId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ReportsApi#getPdfReportStatus"); @@ -208,7 +205,6 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **analysisId** | **Long**| Analysis ID | | -| **taskId** | **String**| Task ID returned by the create endpoint | | ### Return type diff --git a/pom.xml b/pom.xml index 4d024a2a..f6f90e83 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ sdk jar sdk - 3.84.0 + 3.85.0 https://github.com/RevEngAI/sdk-java Java SDK for the RevEng.AI API diff --git a/src/main/java/ai/reveng/api/AnalysesCoreApi.java b/src/main/java/ai/reveng/api/AnalysesCoreApi.java index 18708c57..c2539cf9 100644 --- a/src/main/java/ai/reveng/api/AnalysesCoreApi.java +++ b/src/main/java/ai/reveng/api/AnalysesCoreApi.java @@ -516,6 +516,157 @@ public okhttp3.Call getAnalysisBasicInfoAsync(@javax.annotation.Nonnull Integer localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for getAnalysisBytes + * @param analysisId Analysis ID (required) + * @param page 64kb page of binary data (optional) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call getAnalysisBytesCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nullable Long page, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v3/analyses/{analysis_id}/bytes" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "APIKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call getAnalysisBytesValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nullable Long page, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'analysisId' is set + if (analysisId == null) { + throw new ApiException("Missing the required parameter 'analysisId' when calling getAnalysisBytes(Async)"); + } + + return getAnalysisBytesCall(analysisId, page, _callback); + + } + + /** + * Get the bytes of a binary + * Returns a 64kb byte page from the binary. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + * @param analysisId Analysis ID (required) + * @param page 64kb page of binary data (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public void getAnalysisBytes(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nullable Long page) throws ApiException { + getAnalysisBytesWithHttpInfo(analysisId, page); + } + + /** + * Get the bytes of a binary + * Returns a 64kb byte page from the binary. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + * @param analysisId Analysis ID (required) + * @param page 64kb page of binary data (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public ApiResponse getAnalysisBytesWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nullable Long page) throws ApiException { + okhttp3.Call localVarCall = getAnalysisBytesValidateBeforeCall(analysisId, page, null); + return localVarApiClient.execute(localVarCall); + } + + /** + * Get the bytes of a binary (asynchronously) + * Returns a 64kb byte page from the binary. **Error codes:** - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `400` [`BAD_REQUEST`](/errors/BAD_REQUEST) — Bad Request + * @param analysisId Analysis ID (required) + * @param page 64kb page of binary data (optional) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call getAnalysisBytesAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nullable Long page, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = getAnalysisBytesValidateBeforeCall(analysisId, page, _callback); + localVarApiClient.executeAsync(localVarCall, _callback); + return localVarCall; + } /** * Build call for getAnalysisFunctionMap * @param analysisId (required) diff --git a/src/main/java/ai/reveng/api/FunctionsAiDecompilationApi.java b/src/main/java/ai/reveng/api/FunctionsAiDecompilationApi.java index 668fd6af..152e36a7 100644 --- a/src/main/java/ai/reveng/api/FunctionsAiDecompilationApi.java +++ b/src/main/java/ai/reveng/api/FunctionsAiDecompilationApi.java @@ -39,6 +39,7 @@ import ai.reveng.model.CreateAIDecompOutputBody; import ai.reveng.model.DecompilationData; import ai.reveng.model.FunctionCommentCreateRequest; +import ai.reveng.model.PatchCommentBody; import ai.reveng.model.RegenerateOutputBody; import ai.reveng.model.RegenerateTarget; import ai.reveng.model.SummaryData; @@ -708,6 +709,159 @@ public okhttp3.Call deleteAiDecompilationCommentAsync(@javax.annotation.Nonnull localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for deleteAiDecompilationInlineComment + * @param functionId Function ID (required) + * @param line Line number of the comment to delete (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call deleteAiDecompilationInlineCommentCall(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull Long line, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/v3/functions/{function_id}/ai-decompilation/inline-comments/{line}" + .replace("{" + "function_id" + "}", localVarApiClient.escapeString(functionId.toString())) + .replace("{" + "line" + "}", localVarApiClient.escapeString(line.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "APIKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call deleteAiDecompilationInlineCommentValidateBeforeCall(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull Long line, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'functionId' is set + if (functionId == null) { + throw new ApiException("Missing the required parameter 'functionId' when calling deleteAiDecompilationInlineComment(Async)"); + } + + // verify the required parameter 'line' is set + if (line == null) { + throw new ApiException("Missing the required parameter 'line' when calling deleteAiDecompilationInlineComment(Async)"); + } + + return deleteAiDecompilationInlineCommentCall(functionId, line, _callback); + + } + + /** + * Delete a single inline comment + * Removes the comment for the given line number. Requires comments to have been generated first. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * @param functionId Function ID (required) + * @param line Line number of the comment to delete (required) + * @return CommentsData + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public CommentsData deleteAiDecompilationInlineComment(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull Long line) throws ApiException { + ApiResponse localVarResp = deleteAiDecompilationInlineCommentWithHttpInfo(functionId, line); + return localVarResp.getData(); + } + + /** + * Delete a single inline comment + * Removes the comment for the given line number. Requires comments to have been generated first. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * @param functionId Function ID (required) + * @param line Line number of the comment to delete (required) + * @return ApiResponse<CommentsData> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public ApiResponse deleteAiDecompilationInlineCommentWithHttpInfo(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull Long line) throws ApiException { + okhttp3.Call localVarCall = deleteAiDecompilationInlineCommentValidateBeforeCall(functionId, line, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Delete a single inline comment (asynchronously) + * Removes the comment for the given line number. Requires comments to have been generated first. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * @param functionId Function ID (required) + * @param line Line number of the comment to delete (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call deleteAiDecompilationInlineCommentAsync(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull Long line, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = deleteAiDecompilationInlineCommentValidateBeforeCall(functionId, line, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for getAiDecompilation * @param functionId Function ID (required) @@ -2279,6 +2433,159 @@ public okhttp3.Call getAiDecompilationTokenisedAsync(@javax.annotation.Nonnull L localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } + /** + * Build call for patchAiDecompilationInlineComment + * @param functionId Function ID (required) + * @param patchCommentBody (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call patchAiDecompilationInlineCommentCall(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull PatchCommentBody patchCommentBody, final ApiCallback _callback) throws ApiException { + String basePath = null; + // Operation Servers + String[] localBasePaths = new String[] { }; + + // Determine Base Path to Use + if (localCustomBaseUrl != null){ + basePath = localCustomBaseUrl; + } else if ( localBasePaths.length > 0 ) { + basePath = localBasePaths[localHostIndex]; + } else { + basePath = null; + } + + Object localVarPostBody = patchCommentBody; + + // create path and map variables + String localVarPath = "/v3/functions/{function_id}/ai-decompilation/inline-comments" + .replace("{" + "function_id" + "}", localVarApiClient.escapeString(functionId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) { + localVarHeaderParams.put("Accept", localVarAccept); + } + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); + if (localVarContentType != null) { + localVarHeaderParams.put("Content-Type", localVarContentType); + } + + String[] localVarAuthNames = new String[] { "APIKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call patchAiDecompilationInlineCommentValidateBeforeCall(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull PatchCommentBody patchCommentBody, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'functionId' is set + if (functionId == null) { + throw new ApiException("Missing the required parameter 'functionId' when calling patchAiDecompilationInlineComment(Async)"); + } + + // verify the required parameter 'patchCommentBody' is set + if (patchCommentBody == null) { + throw new ApiException("Missing the required parameter 'patchCommentBody' when calling patchAiDecompilationInlineComment(Async)"); + } + + return patchAiDecompilationInlineCommentCall(functionId, patchCommentBody, _callback); + + } + + /** + * Update a single inline comment + * Merges a single line comment into the existing AI-generated inline comments. Requires comments to have been generated first. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * @param functionId Function ID (required) + * @param patchCommentBody (required) + * @return CommentsData + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public CommentsData patchAiDecompilationInlineComment(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull PatchCommentBody patchCommentBody) throws ApiException { + ApiResponse localVarResp = patchAiDecompilationInlineCommentWithHttpInfo(functionId, patchCommentBody); + return localVarResp.getData(); + } + + /** + * Update a single inline comment + * Merges a single line comment into the existing AI-generated inline comments. Requires comments to have been generated first. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * @param functionId Function ID (required) + * @param patchCommentBody (required) + * @return ApiResponse<CommentsData> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public ApiResponse patchAiDecompilationInlineCommentWithHttpInfo(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull PatchCommentBody patchCommentBody) throws ApiException { + okhttp3.Call localVarCall = patchAiDecompilationInlineCommentValidateBeforeCall(functionId, patchCommentBody, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Update a single inline comment (asynchronously) + * Merges a single line comment into the existing AI-generated inline comments. Requires comments to have been generated first. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * @param functionId Function ID (required) + * @param patchCommentBody (required) + * @param _callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + * @http.response.details + + + + + + + + +
Response Details
Status Code Description Response Headers
200 OK -
403 Forbidden -
404 Not Found -
422 Unprocessable Entity -
500 Internal Server Error -
+ */ + public okhttp3.Call patchAiDecompilationInlineCommentAsync(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nonnull PatchCommentBody patchCommentBody, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = patchAiDecompilationInlineCommentValidateBeforeCall(functionId, patchCommentBody, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for regenerateAiDecompilationInlineComments * @param functionId Function ID (required) diff --git a/src/main/java/ai/reveng/api/ReportsApi.java b/src/main/java/ai/reveng/api/ReportsApi.java index dad9ad2c..bd8234b1 100644 --- a/src/main/java/ai/reveng/api/ReportsApi.java +++ b/src/main/java/ai/reveng/api/ReportsApi.java @@ -148,7 +148,7 @@ private okhttp3.Call createPdfReportValidateBeforeCall(@javax.annotation.Nonnull /** * Start PDF report generation - * Starts an asynchronous PDF report generation workflow for the given analysis. Returns a deterministic task_id used to poll status and download the resulting PDF. Idempotent: if a workflow is already running for this analysis and user, the same task_id is returned with `already_running: true` so the caller can rejoin the in-flight workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * Starts an asynchronous PDF report generation workflow for the given analysis. Poll status and download the resulting PDF using the same analysis ID. Idempotent: if a workflow is already running for this analysis and user, the response sets `already_running: true` and the caller rejoins the in-flight workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found * @param analysisId Analysis ID (required) * @return GeneratePDFOutputBody * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -170,7 +170,7 @@ public GeneratePDFOutputBody createPdfReport(@javax.annotation.Nonnull Long anal /** * Start PDF report generation - * Starts an asynchronous PDF report generation workflow for the given analysis. Returns a deterministic task_id used to poll status and download the resulting PDF. Idempotent: if a workflow is already running for this analysis and user, the same task_id is returned with `already_running: true` so the caller can rejoin the in-flight workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * Starts an asynchronous PDF report generation workflow for the given analysis. Poll status and download the resulting PDF using the same analysis ID. Idempotent: if a workflow is already running for this analysis and user, the response sets `already_running: true` and the caller rejoins the in-flight workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found * @param analysisId Analysis ID (required) * @return ApiResponse<GeneratePDFOutputBody> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body @@ -193,7 +193,7 @@ public ApiResponse createPdfReportWithHttpInfo(@javax.ann /** * Start PDF report generation (asynchronously) - * Starts an asynchronous PDF report generation workflow for the given analysis. Returns a deterministic task_id used to poll status and download the resulting PDF. Idempotent: if a workflow is already running for this analysis and user, the same task_id is returned with `already_running: true` so the caller can rejoin the in-flight workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * Starts an asynchronous PDF report generation workflow for the given analysis. Poll status and download the resulting PDF using the same analysis ID. Idempotent: if a workflow is already running for this analysis and user, the response sets `already_running: true` and the caller rejoins the in-flight workflow. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found * @param analysisId Analysis ID (required) * @param _callback The callback to be executed when the API call finishes * @return The request call @@ -219,7 +219,6 @@ public okhttp3.Call createPdfReportAsync(@javax.annotation.Nonnull Long analysis /** * Build call for downloadPdfReport * @param analysisId Analysis ID (required) - * @param taskId Task ID returned by the create endpoint (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -235,7 +234,7 @@ public okhttp3.Call createPdfReportAsync(@javax.annotation.Nonnull Long analysis 500 Internal Server Error - */ - public okhttp3.Call downloadPdfReportCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadPdfReportCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -252,9 +251,8 @@ public okhttp3.Call downloadPdfReportCall(@javax.annotation.Nonnull Long analysi Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v3/analyses/{analysis_id}/pdf/{task_id}" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) - .replace("{" + "task_id" + "}", localVarApiClient.escapeString(taskId.toString())); + String localVarPath = "/v3/analyses/{analysis_id}/pdf" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -282,26 +280,20 @@ public okhttp3.Call downloadPdfReportCall(@javax.annotation.Nonnull Long analysi } @SuppressWarnings("rawtypes") - private okhttp3.Call downloadPdfReportValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call downloadPdfReportValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'analysisId' is set if (analysisId == null) { throw new ApiException("Missing the required parameter 'analysisId' when calling downloadPdfReport(Async)"); } - // verify the required parameter 'taskId' is set - if (taskId == null) { - throw new ApiException("Missing the required parameter 'taskId' when calling downloadPdfReport(Async)"); - } - - return downloadPdfReportCall(analysisId, taskId, _callback); + return downloadPdfReportCall(analysisId, _callback); } /** * Download generated PDF report - * Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when the task does not exist or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - `500` [`REPORT_RENDER_FAILED`](/errors/REPORT_RENDER_FAILED) — Report Render Failed + * Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when no report generation exists for this analysis or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - `500` [`REPORT_RENDER_FAILED`](/errors/REPORT_RENDER_FAILED) — Report Render Failed * @param analysisId Analysis ID (required) - * @param taskId Task ID returned by the create endpoint (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -315,15 +307,14 @@ private okhttp3.Call downloadPdfReportValidateBeforeCall(@javax.annotation.Nonnu
500 Internal Server Error -
*/ - public void downloadPdfReport(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId) throws ApiException { - downloadPdfReportWithHttpInfo(analysisId, taskId); + public void downloadPdfReport(@javax.annotation.Nonnull Long analysisId) throws ApiException { + downloadPdfReportWithHttpInfo(analysisId); } /** * Download generated PDF report - * Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when the task does not exist or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - `500` [`REPORT_RENDER_FAILED`](/errors/REPORT_RENDER_FAILED) — Report Render Failed + * Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when no report generation exists for this analysis or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - `500` [`REPORT_RENDER_FAILED`](/errors/REPORT_RENDER_FAILED) — Report Render Failed * @param analysisId Analysis ID (required) - * @param taskId Task ID returned by the create endpoint (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -338,16 +329,15 @@ public void downloadPdfReport(@javax.annotation.Nonnull Long analysisId, @javax. 500 Internal Server Error - */ - public ApiResponse downloadPdfReportWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId) throws ApiException { - okhttp3.Call localVarCall = downloadPdfReportValidateBeforeCall(analysisId, taskId, null); + public ApiResponse downloadPdfReportWithHttpInfo(@javax.annotation.Nonnull Long analysisId) throws ApiException { + okhttp3.Call localVarCall = downloadPdfReportValidateBeforeCall(analysisId, null); return localVarApiClient.execute(localVarCall); } /** * Download generated PDF report (asynchronously) - * Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when the task does not exist or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - `500` [`REPORT_RENDER_FAILED`](/errors/REPORT_RENDER_FAILED) — Report Render Failed + * Streams the rendered PDF report. Returns 409 when the workflow is still running and 404 when no report generation exists for this analysis or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found - `409` [`ANALYSIS_NOT_READY`](/errors/ANALYSIS_NOT_READY) — Analysis Not Ready - `500` [`REPORT_RENDER_FAILED`](/errors/REPORT_RENDER_FAILED) — Report Render Failed * @param analysisId Analysis ID (required) - * @param taskId Task ID returned by the create endpoint (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -363,16 +353,15 @@ public ApiResponse downloadPdfReportWithHttpInfo(@javax.annotation.Nonnull 500 Internal Server Error - */ - public okhttp3.Call downloadPdfReportAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call downloadPdfReportAsync(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = downloadPdfReportValidateBeforeCall(analysisId, taskId, _callback); + okhttp3.Call localVarCall = downloadPdfReportValidateBeforeCall(analysisId, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getPdfReportStatus * @param analysisId Analysis ID (required) - * @param taskId Task ID returned by the create endpoint (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -387,7 +376,7 @@ public okhttp3.Call downloadPdfReportAsync(@javax.annotation.Nonnull Long analys 500 Internal Server Error - */ - public okhttp3.Call getPdfReportStatusCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getPdfReportStatusCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -404,9 +393,8 @@ public okhttp3.Call getPdfReportStatusCall(@javax.annotation.Nonnull Long analys Object localVarPostBody = null; // create path and map variables - String localVarPath = "/v3/analyses/{analysis_id}/pdf/{task_id}/status" - .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())) - .replace("{" + "task_id" + "}", localVarApiClient.escapeString(taskId.toString())); + String localVarPath = "/v3/analyses/{analysis_id}/pdf/status" + .replace("{" + "analysis_id" + "}", localVarApiClient.escapeString(analysisId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -434,26 +422,20 @@ public okhttp3.Call getPdfReportStatusCall(@javax.annotation.Nonnull Long analys } @SuppressWarnings("rawtypes") - private okhttp3.Call getPdfReportStatusValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getPdfReportStatusValidateBeforeCall(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { // verify the required parameter 'analysisId' is set if (analysisId == null) { throw new ApiException("Missing the required parameter 'analysisId' when calling getPdfReportStatus(Async)"); } - // verify the required parameter 'taskId' is set - if (taskId == null) { - throw new ApiException("Missing the required parameter 'taskId' when calling getPdfReportStatus(Async)"); - } - - return getPdfReportStatusCall(analysisId, taskId, _callback); + return getPdfReportStatusCall(analysisId, _callback); } /** * Get PDF report workflow status - * Returns live workflow progress for the given task. Returns 404 when the task does not exist or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * Returns live workflow progress for the given analysis. Returns 404 when no report generation exists for this analysis or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found * @param analysisId Analysis ID (required) - * @param taskId Task ID returned by the create endpoint (required) * @return WorkflowProgress * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -467,16 +449,15 @@ private okhttp3.Call getPdfReportStatusValidateBeforeCall(@javax.annotation.Nonn 500 Internal Server Error - */ - public WorkflowProgress getPdfReportStatus(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId) throws ApiException { - ApiResponse localVarResp = getPdfReportStatusWithHttpInfo(analysisId, taskId); + public WorkflowProgress getPdfReportStatus(@javax.annotation.Nonnull Long analysisId) throws ApiException { + ApiResponse localVarResp = getPdfReportStatusWithHttpInfo(analysisId); return localVarResp.getData(); } /** * Get PDF report workflow status - * Returns live workflow progress for the given task. Returns 404 when the task does not exist or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * Returns live workflow progress for the given analysis. Returns 404 when no report generation exists for this analysis or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found * @param analysisId Analysis ID (required) - * @param taskId Task ID returned by the create endpoint (required) * @return ApiResponse<WorkflowProgress> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -490,17 +471,16 @@ public WorkflowProgress getPdfReportStatus(@javax.annotation.Nonnull Long analys 500 Internal Server Error - */ - public ApiResponse getPdfReportStatusWithHttpInfo(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId) throws ApiException { - okhttp3.Call localVarCall = getPdfReportStatusValidateBeforeCall(analysisId, taskId, null); + public ApiResponse getPdfReportStatusWithHttpInfo(@javax.annotation.Nonnull Long analysisId) throws ApiException { + okhttp3.Call localVarCall = getPdfReportStatusValidateBeforeCall(analysisId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Get PDF report workflow status (asynchronously) - * Returns live workflow progress for the given task. Returns 404 when the task does not exist or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found + * Returns live workflow progress for the given analysis. Returns 404 when no report generation exists for this analysis or the caller is not authorised to see it. **Error codes:** - `403` [`ACCESS_DENIED`](/errors/ACCESS_DENIED) — Access Denied - `404` [`NOT_FOUND`](/errors/NOT_FOUND) — Not Found * @param analysisId Analysis ID (required) - * @param taskId Task ID returned by the create endpoint (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object @@ -515,9 +495,9 @@ public ApiResponse getPdfReportStatusWithHttpInfo(@javax.annot 500 Internal Server Error - */ - public okhttp3.Call getPdfReportStatusAsync(@javax.annotation.Nonnull Long analysisId, @javax.annotation.Nonnull String taskId, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getPdfReportStatusAsync(@javax.annotation.Nonnull Long analysisId, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getPdfReportStatusValidateBeforeCall(analysisId, taskId, _callback); + okhttp3.Call localVarCall = getPdfReportStatusValidateBeforeCall(analysisId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/ai/reveng/invoker/ApiClient.java b/src/main/java/ai/reveng/invoker/ApiClient.java index 70d47325..0be2be20 100644 --- a/src/main/java/ai/reveng/invoker/ApiClient.java +++ b/src/main/java/ai/reveng/invoker/ApiClient.java @@ -146,7 +146,7 @@ protected void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/3.84.0/java"); + setUserAgent("OpenAPI-Generator/3.85.0/java"); authentications = new HashMap(); } diff --git a/src/main/java/ai/reveng/invoker/Configuration.java b/src/main/java/ai/reveng/invoker/Configuration.java index 9cff67dc..cfc955e4 100644 --- a/src/main/java/ai/reveng/invoker/Configuration.java +++ b/src/main/java/ai/reveng/invoker/Configuration.java @@ -18,7 +18,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "3.84.0"; + public static final String VERSION = "3.85.0"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/main/java/ai/reveng/invoker/JSON.java b/src/main/java/ai/reveng/invoker/JSON.java index 0c610798..55eabca1 100644 --- a/src/main/java/ai/reveng/invoker/JSON.java +++ b/src/main/java/ai/reveng/invoker/JSON.java @@ -359,6 +359,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.PEModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.PaginationModel.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Params.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.PatchCommentBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ProcessActivityEntry.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ProcessMemdumps.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ProcessNode.CustomTypeAdapterFactory()); diff --git a/src/main/java/ai/reveng/model/ErrorBody.java b/src/main/java/ai/reveng/model/ErrorBody.java index a6641ddc..5e9eb51d 100644 --- a/src/main/java/ai/reveng/model/ErrorBody.java +++ b/src/main/java/ai/reveng/model/ErrorBody.java @@ -94,6 +94,8 @@ public enum CodeEnum { INVALID_CREDENTIALS("INVALID_CREDENTIALS"), + INVALID_INVITE_CODE("INVALID_INVITE_CODE"), + INVALID_RESET_CODE("INVALID_RESET_CODE"), LAST_ORG_OWNER("LAST_ORG_OWNER"), diff --git a/src/main/java/ai/reveng/model/GeneratePDFOutputBody.java b/src/main/java/ai/reveng/model/GeneratePDFOutputBody.java index fa75c295..8725b9d7 100644 --- a/src/main/java/ai/reveng/model/GeneratePDFOutputBody.java +++ b/src/main/java/ai/reveng/model/GeneratePDFOutputBody.java @@ -56,11 +56,6 @@ public class GeneratePDFOutputBody { @javax.annotation.Nullable private Boolean alreadyRunning; - public static final String SERIALIZED_NAME_TASK_ID = "task_id"; - @SerializedName(SERIALIZED_NAME_TASK_ID) - @javax.annotation.Nonnull - private String taskId; - public GeneratePDFOutputBody() { } @@ -82,25 +77,6 @@ public void setAlreadyRunning(@javax.annotation.Nullable Boolean alreadyRunning) this.alreadyRunning = alreadyRunning; } - - public GeneratePDFOutputBody taskId(@javax.annotation.Nonnull String taskId) { - this.taskId = taskId; - return this; - } - - /** - * Workflow task ID — use to poll status and download the PDF - * @return taskId - */ - @javax.annotation.Nonnull - public String getTaskId() { - return taskId; - } - - public void setTaskId(@javax.annotation.Nonnull String taskId) { - this.taskId = taskId; - } - /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -156,14 +132,13 @@ public boolean equals(Object o) { return false; } GeneratePDFOutputBody generatePDFOutputBody = (GeneratePDFOutputBody) o; - return Objects.equals(this.alreadyRunning, generatePDFOutputBody.alreadyRunning) && - Objects.equals(this.taskId, generatePDFOutputBody.taskId)&& + return Objects.equals(this.alreadyRunning, generatePDFOutputBody.alreadyRunning)&& Objects.equals(this.additionalProperties, generatePDFOutputBody.additionalProperties); } @Override public int hashCode() { - return Objects.hash(alreadyRunning, taskId, additionalProperties); + return Objects.hash(alreadyRunning, additionalProperties); } @Override @@ -171,7 +146,6 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GeneratePDFOutputBody {\n"); sb.append(" alreadyRunning: ").append(toIndentedString(alreadyRunning)).append("\n"); - sb.append(" taskId: ").append(toIndentedString(taskId)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -194,10 +168,10 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("already_running", "task_id")); + openapiFields = new HashSet(Arrays.asList("already_running")); // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("task_id")); + openapiRequiredFields = new HashSet(0); } /** @@ -212,17 +186,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in GeneratePDFOutputBody is not found in the empty JSON string", GeneratePDFOutputBody.openapiRequiredFields.toString())); } } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GeneratePDFOutputBody.openapiRequiredFields) { - if (jsonElement.getAsJsonObject().get(requiredField) == null) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); - } - } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("task_id").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `task_id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("task_id").toString())); - } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/ai/reveng/model/PatchCommentBody.java b/src/main/java/ai/reveng/model/PatchCommentBody.java new file mode 100644 index 00000000..4d1ea476 --- /dev/null +++ b/src/main/java/ai/reveng/model/PatchCommentBody.java @@ -0,0 +1,321 @@ +/* + * RevEng.AI API + * RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ai.reveng.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import ai.reveng.invoker.JSON; + +/** + * PatchCommentBody + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class PatchCommentBody { + public static final String SERIALIZED_NAME_COMMENT = "comment"; + @SerializedName(SERIALIZED_NAME_COMMENT) + @javax.annotation.Nonnull + private String comment; + + public static final String SERIALIZED_NAME_LINE = "line"; + @SerializedName(SERIALIZED_NAME_LINE) + @javax.annotation.Nonnull + private Long line; + + public PatchCommentBody() { + } + + public PatchCommentBody comment(@javax.annotation.Nonnull String comment) { + this.comment = comment; + return this; + } + + /** + * Comment text + * @return comment + */ + @javax.annotation.Nonnull + public String getComment() { + return comment; + } + + public void setComment(@javax.annotation.Nonnull String comment) { + this.comment = comment; + } + + + public PatchCommentBody line(@javax.annotation.Nonnull Long line) { + this.line = line; + return this; + } + + /** + * Line number to set the comment on + * minimum: 1 + * @return line + */ + @javax.annotation.Nonnull + public Long getLine() { + return line; + } + + public void setLine(@javax.annotation.Nonnull Long line) { + this.line = line; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the PatchCommentBody instance itself + */ + public PatchCommentBody putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PatchCommentBody patchCommentBody = (PatchCommentBody) o; + return Objects.equals(this.comment, patchCommentBody.comment) && + Objects.equals(this.line, patchCommentBody.line)&& + Objects.equals(this.additionalProperties, patchCommentBody.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(comment, line, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PatchCommentBody {\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" line: ").append(toIndentedString(line)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("comment", "line")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("comment", "line")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to PatchCommentBody + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!PatchCommentBody.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in PatchCommentBody is not found in the empty JSON string", PatchCommentBody.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : PatchCommentBody.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if (!jsonObj.get("comment").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `comment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("comment").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!PatchCommentBody.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'PatchCommentBody' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(PatchCommentBody.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, PatchCommentBody value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public PatchCommentBody read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + PatchCommentBody instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of PatchCommentBody given an JSON string + * + * @param jsonString JSON string + * @return An instance of PatchCommentBody + * @throws IOException if the JSON string is invalid with respect to PatchCommentBody + */ + public static PatchCommentBody fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, PatchCommentBody.class); + } + + /** + * Convert an instance of PatchCommentBody to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} +