client.jobs.validateQuery(request) -> ValidateQueryResponseDtoclient.entities.listEntities() -> EntityListResponseclient.webhooks.listWebhooks() -> ListWebhooksResponseDtoclient.webhooks.createWebhook(request) -> CreateWebhookResponseDtoclient.entities.createEntity(request) -> CreateEntityResponseclient.webhooks.getWebhook(webhookId) -> GetWebhookResponseDtoclient.entities.createEntitiesBatch(request) -> CreateEntitiesBatchResponseclient.webhooks.deleteWebhook(webhookId)client.entities.getEntity(entityId) -> EntityResponseclient.webhooks.updateWebhook(webhookId, request) -> UpdateWebhookResponseDtoclient.entities.deleteEntity(entityId)client.webhooks.testWebhook(webhookId, request) -> TestWebhookResponseDtoclient.entities.updateEntity(entityId, request) -> EntityResponseclient.webhooks.listWebhookResources(webhookId) -> ListWebhookResourcesResponseDtoclient.datasets.listDatasets() -> DatasetListResponseclient.webhooks.assignWebhookResource(webhookId, request) -> AssignWebhookResourceResponseDtoclient.webhooks.removeWebhookResource(webhookId, resourceType, resourceId)client.webhooks.listWebhooksForResource(resourceType, resourceId) -> ListWebhooksResponseDtoclient.webhooks.getWebhookDeliveryHistory() -> DeliveryHistoryResponseDtoclient.entities.listEntities() -> EntityListResponseclient.entities.createEntity(request) -> CreateEntityResponseclient.entities.createEntitiesBatch(request) -> CreateEntitiesBatchResponseclient.entities.getEntity(entityId) -> EntityResponseclient.entities.deleteEntity(entityId)client.entities.updateEntity(entityId, request) -> EntityResponseclient.datasets.listDatasets() -> DatasetListResponseclient.datasets.createDataset(request) -> DatasetResponseclient.datasets.createDatasetFromCsv(request) -> CreateDatasetCsvResponseclient.datasets.getDataset(datasetId) -> DatasetResponseclient.datasets.deleteDataset(datasetId)client.datasets.updateDataset(datasetId, request) -> DatasetResponseclient.datasets.addEntitiesToDataset(datasetId, request) -> ManageEntitiesResponseclient.datasets.removeEntitiesFromDataset(datasetId, request) -> ManageEntitiesResponseclient.datasets.listEntitiesInDataset(datasetId, request) -> DatasetEntityListResponseclient.datasets.getDatasetStatusHistory(datasetId) -> DatasetStatusHistoryResponseclient.datasets.uploadCsvToDataset(datasetId, request) -> UploadCsvToDatasetResponseclient.datasets.createDataset(request) -> DatasetResponseclient.projects.listProjects() -> ProjectListResponseDtoclient.datasets.createDatasetFromCsv(request) -> CreateDatasetCsvResponseclient.datasets.getDataset(datasetId) -> DatasetResponseclient.projects.createProject(request) -> CreateProjectResponseDtoclient.datasets.deleteDataset(datasetId)client.projects.getProject(projectId) -> ProjectResponseDtoclient.datasets.updateDataset(datasetId, request) -> DatasetResponseclient.projects.deleteProject(projectId)client.datasets.addEntitiesToDataset(datasetId, request) -> ManageEntitiesResponseclient.projects.updateProject(projectId, request) -> UpdateProjectResponseDtoclient.datasets.removeEntitiesFromDataset(datasetId, request) -> ManageEntitiesResponseclient.projects.getProjectOverview(projectId) -> ProjectOverviewResponseDtoclient.datasets.listEntitiesInDataset(datasetId, request) -> DatasetEntityListResponseclient.projects.listProjectResources(projectId) -> ProjectResourceListResponseDtoclient.datasets.getDatasetStatusHistory(datasetId) -> DatasetStatusHistoryResponseclient.projects.addResourceToProject(projectId, request) -> AddResourceResponseDtoclient.datasets.uploadCsvToDataset(datasetId, request) -> UploadCsvToDatasetResponseclient.projects.removeResourceFromProject(projectId, resourceType, resourceId) -> RemoveResourceResponseDtoFilter results to resources belonging to this project.
+ */ + @JsonSetter(value = "project_id", nulls = Nulls.SKIP) + public Builder projectId(OptionalReturns a quality assessment with a status level, identified issues, and actionable suggestions.
+ */ + public CompletableFutureReturns a quality assessment with a status level, identified issues, and actionable suggestions.
+ */ + public CompletableFutureReturns a quality assessment with a status level, identified issues, and actionable suggestions.
+ */ + public CompletableFutureReturns a quality assessment with a status level, identified issues, and actionable suggestions.
+ */ + public CompletableFutureReturns a quality assessment with a status level, identified issues, and actionable suggestions.
+ */ + public ValidateQueryResponseDto validateQuery(ValidateQueryRequestDto request) { + return this.rawClient.validateQuery(request).body(); + } + + /** + * Checks whether a query is well-formed and likely to produce good results before submitting a job. + *Returns a quality assessment with a status level, identified issues, and actionable suggestions.
+ */ + public ValidateQueryResponseDto validateQuery(ValidateQueryRequestDto request, RequestOptions requestOptions) { + return this.rawClient.validateQuery(request, requestOptions).body(); + } + /** * Get suggested validators, enrichments, and date ranges for a query. */ diff --git a/src/main/java/com/newscatcher/catchall/resources/jobs/RawJobsClient.java b/src/main/java/com/newscatcher/catchall/resources/jobs/RawJobsClient.java index 2a2c7f7..842067a 100644 --- a/src/main/java/com/newscatcher/catchall/resources/jobs/RawJobsClient.java +++ b/src/main/java/com/newscatcher/catchall/resources/jobs/RawJobsClient.java @@ -24,6 +24,7 @@ import com.newscatcher.catchall.resources.jobs.requests.GetUserJobsRequest; import com.newscatcher.catchall.resources.jobs.requests.InitializeRequestDto; import com.newscatcher.catchall.resources.jobs.requests.SubmitRequestDto; +import com.newscatcher.catchall.resources.jobs.requests.ValidateQueryRequestDto; import com.newscatcher.catchall.types.ContinueResponseDto; import com.newscatcher.catchall.types.DeleteJobResponseDto; import com.newscatcher.catchall.types.Error; @@ -32,6 +33,7 @@ import com.newscatcher.catchall.types.PullJobResponseDto; import com.newscatcher.catchall.types.StatusResponseDto; import com.newscatcher.catchall.types.SubmitResponseDto; +import com.newscatcher.catchall.types.ValidateQueryResponseDto; import com.newscatcher.catchall.types.ValidationErrorResponse; import java.io.IOException; import okhttp3.Headers; @@ -94,6 +96,10 @@ public CatchAllApiHttpResponseReturns a quality assessment with a status level, identified issues, and actionable suggestions.
+ */ + public CatchAllApiHttpResponseReturns a quality assessment with a status level, identified issues, and actionable suggestions.
+ */ + public CatchAllApiHttpResponseFilter results to resources belonging to this project.
+ */ + @JsonSetter(value = "project_id", nulls = Nulls.SKIP) + public Builder projectId(OptionalProject to assign this job to. The job appears in the project's resource list immediately after submission.
+ */ + _FinalStage projectId(OptionalIDs of webhooks to notify when the job completes. Maximum 5 per job.
+ */ + _FinalStage webhookIds(OptionalIDs of webhooks to notify when the job completes. Maximum 5 per job.
+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage webhookIds(ListIDs of webhooks to notify when the job completes. Maximum 5 per job.
+ */ + @java.lang.Override + @JsonSetter(value = "webhook_ids", nulls = Nulls.SKIP) + public _FinalStage webhookIds(OptionalProject to assign this job to. The job appears in the project's resource list immediately after submission.
+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage projectId(String projectId) { + this.projectId = Optional.ofNullable(projectId); + return this; + } + + /** + *Project to assign this job to. The job appears in the project's resource list immediately after submission.
+ */ + @java.lang.Override + @JsonSetter(value = "project_id", nulls = Nulls.SKIP) + public _FinalStage projectId(OptionalThe minimum relevance score a connected entity must reach for its record to be included in results.
*Only valid when connected_dataset_ids is set; otherwise ignored. Records where no connected entity meets the threshold are excluded entirely.
Plain text query to validate.
+ */ + _FinalStage query(@NotNull String query); + + Builder from(ValidateQueryRequestDto other); + } + + public interface _FinalStage { + ValidateQueryRequestDto build(); + + _FinalStage additionalProperty(String key, Object value); + + _FinalStage additionalProperties(MapPlain text query to validate.
+ *Plain text query to validate.
+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + @JsonSetter("query") + public _FinalStage query(@NotNull String query) { + this.query = Objects.requireNonNull(query, "query must not be null"); + return this; + } + + @java.lang.Override + public ValidateQueryRequestDto build() { + return new ValidateQueryRequestDto(query, additionalProperties); + } + + @java.lang.Override + public Builder additionalProperty(String key, Object value) { + this.additionalProperties.put(key, value); + return this; + } + + @java.lang.Override + public Builder additionalProperties(MapPOST /catchAll/webhooks/{webhook_id}/resources for each ID after creation.
+ * Maximum 5 per monitor.
*/
- @JsonProperty("webhook")
- public OptionalOptional webhook to receive notifications when jobs complete.
+ *IDs of centralized webhooks to notify on each run completion.
+ * Passing IDs here is equivalent to calling
+ * POST /catchAll/webhooks/{webhook_id}/resources for each ID after creation.
+ * Maximum 5 per monitor.
Maximum number of records per monitor run. If not provided, defaults to the plan limit.
@@ -191,6 +217,13 @@ public interface _FinalStage { _FinalStage backfill(OptionalProject to assign this monitor to. The monitor appears in the project's resource list after creation.
+ */ + _FinalStage projectId(OptionalProject to assign this monitor to. The monitor appears in the project's resource list after creation.
+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage projectId(String projectId) { + this.projectId = Optional.ofNullable(projectId); + return this; + } + + /** + *Project to assign this monitor to. The monitor appears in the project's resource list after creation.
+ */ + @java.lang.Override + @JsonSetter(value = "project_id", nulls = Nulls.SKIP) + public _FinalStage projectId(OptionalIf true, fills the data gap between the reference job's end_date and the first scheduled run. The reference job's end_date must be within the last 7 days.
If false, no gap filling occurs and the first run uses the current cron window only — the reference job's age does not matter.
@@ -292,22 +348,28 @@ public _FinalStage limit(OptionalOptional webhook to receive notifications when jobs complete.
+ *IDs of centralized webhooks to notify on each run completion.
+ * Passing IDs here is equivalent to calling
+ * POST /catchAll/webhooks/{webhook_id}/resources for each ID after creation.
+ * Maximum 5 per monitor.
Optional webhook to receive notifications when jobs complete.
+ *IDs of centralized webhooks to notify on each run completion.
+ * Passing IDs here is equivalent to calling
+ * POST /catchAll/webhooks/{webhook_id}/resources for each ID after creation.
+ * Maximum 5 per monitor.
Filter results to resources belonging to this project.
+ */ + @JsonSetter(value = "project_id", nulls = Nulls.SKIP) + public Builder projectId(OptionalReplaces all existing webhook assignments. Pass an empty array [] to clear all assignments. Omit to leave existing assignments unchanged.
Updated webhook configuration.
+ *Updated list of centralized webhook IDs for this monitor.
+ *Replaces all existing webhook assignments. Pass an empty array [] to clear all assignments. Omit to leave existing assignments unchanged.
Whether the operation succeeded.
+ *True if the operation succeeded; false otherwise.
*/ MessageStage success(boolean success); @@ -141,8 +141,8 @@ public Builder from(DisableMonitorResponse other) { } /** - *Whether the operation succeeded.
- *Whether the operation succeeded.
+ *True if the operation succeeded; false otherwise.
+ *True if the operation succeeded; false otherwise.
* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/newscatcher/catchall/resources/monitors/types/EnableMonitorResponse.java b/src/main/java/com/newscatcher/catchall/resources/monitors/types/EnableMonitorResponse.java index e9b9760..95ac68a 100644 --- a/src/main/java/com/newscatcher/catchall/resources/monitors/types/EnableMonitorResponse.java +++ b/src/main/java/com/newscatcher/catchall/resources/monitors/types/EnableMonitorResponse.java @@ -36,7 +36,7 @@ private EnableMonitorResponse( } /** - * @return Whether the operation succeeded. + * @return True if the operation succeeded; false otherwise. */ @JsonProperty("success") public boolean getSuccess() { @@ -90,7 +90,7 @@ public static SuccessStage builder() { public interface SuccessStage { /** - *Whether the operation succeeded.
+ *True if the operation succeeded; false otherwise.
*/ MessageStage success(boolean success); @@ -141,8 +141,8 @@ public Builder from(EnableMonitorResponse other) { } /** - *Whether the operation succeeded.
- *Whether the operation succeeded.
+ *True if the operation succeeded; false otherwise.
+ *True if the operation succeeded; false otherwise.
* @return Reference to {@code this} so that method calls can be chained together. */ @java.lang.Override diff --git a/src/main/java/com/newscatcher/catchall/resources/projects/AsyncProjectsClient.java b/src/main/java/com/newscatcher/catchall/resources/projects/AsyncProjectsClient.java new file mode 100644 index 0000000..01493ac --- /dev/null +++ b/src/main/java/com/newscatcher/catchall/resources/projects/AsyncProjectsClient.java @@ -0,0 +1,315 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.newscatcher.catchall.resources.projects; + +import com.newscatcher.catchall.core.ClientOptions; +import com.newscatcher.catchall.core.RequestOptions; +import com.newscatcher.catchall.resources.projects.requests.AddResourceRequestDto; +import com.newscatcher.catchall.resources.projects.requests.CreateProjectRequestDto; +import com.newscatcher.catchall.resources.projects.requests.DeleteProjectRequest; +import com.newscatcher.catchall.resources.projects.requests.GetProjectOverviewRequest; +import com.newscatcher.catchall.resources.projects.requests.GetProjectRequest; +import com.newscatcher.catchall.resources.projects.requests.ListProjectResourcesRequest; +import com.newscatcher.catchall.resources.projects.requests.ListProjectsRequest; +import com.newscatcher.catchall.resources.projects.requests.RemoveResourceFromProjectRequest; +import com.newscatcher.catchall.resources.projects.requests.UpdateProjectRequestDto; +import com.newscatcher.catchall.types.AddResourceResponseDto; +import com.newscatcher.catchall.types.CreateProjectResponseDto; +import com.newscatcher.catchall.types.ProjectListResponseDto; +import com.newscatcher.catchall.types.ProjectOverviewResponseDto; +import com.newscatcher.catchall.types.ProjectResourceListResponseDto; +import com.newscatcher.catchall.types.ProjectResourceType; +import com.newscatcher.catchall.types.ProjectResponseDto; +import com.newscatcher.catchall.types.RemoveResourceResponseDto; +import com.newscatcher.catchall.types.UpdateProjectResponseDto; +import java.util.concurrent.CompletableFuture; + +public class AsyncProjectsClient { + protected final ClientOptions clientOptions; + + private final AsyncRawProjectsClient rawClient; + + public AsyncProjectsClient(ClientOptions clientOptions) { + this.clientOptions = clientOptions; + this.rawClient = new AsyncRawProjectsClient(clientOptions); + } + + /** + * Get responses with HTTP metadata like headers + */ + public AsyncRawProjectsClient withRawResponse() { + return this.rawClient; + } + + /** + * Returns all projects visible to the authenticated user. + */ + public CompletableFutureFor jobs and monitors, counts are broken down by status (for example, completed, failed). For datasets and monitor_groups, only a total count is returned.
For jobs and monitors, counts are broken down by status (for example, completed, failed). For datasets and monitor_groups, only a total count is returned.
For jobs and monitors, counts are broken down by status (for example, completed, failed). For datasets and monitor_groups, only a total count is returned.
For jobs and monitors, counts are broken down by status (for example, completed, failed). For datasets and monitor_groups, only a total count is returned.
For jobs and monitors, counts are broken down by status (for example, completed, failed). For datasets and monitor_groups, only a total count is returned.
For jobs and monitors, counts are broken down by status (for example, completed, failed). For datasets and monitor_groups, only a total count is returned.
For jobs and monitors, counts are broken down by status (for example, completed, failed). For datasets and monitor_groups, only a total count is returned.
For jobs and monitors, counts are broken down by status (for example, completed, failed). For datasets and monitor_groups, only a total count is returned.
For jobs and monitors, counts are broken down by status (for example, completed, failed). For datasets and monitor_groups, only a total count is returned.
For jobs and monitors, counts are broken down by status (for example, completed, failed). For datasets and monitor_groups, only a total count is returned.
For jobs and monitors, counts are broken down by status (for example, completed, failed). For datasets and monitor_groups, only a total count is returned.
For jobs and monitors, counts are broken down by status (for example, completed, failed). For datasets and monitor_groups, only a total count is returned.