From 41875efa51a59455ea482ea7e9425bc556d98b98 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 24 Jun 2026 15:57:09 +0000
Subject: [PATCH 1/2] [fern-generated] Update SDK
Generated by Fern
CLI Version: unknown
Generators:
- fernapi/fern-java-sdk: 4.10.16
---
.fern/metadata.json | 8 +-
README.md | 5 +-
build.gradle | 4 +-
reference.md | 126 +++++++++++
.../catchall/core/ClientOptions.java | 4 +-
.../catchall/core/DateTimeDeserializer.java | 12 +-
.../requests/UpdateEntityRequest.java | 35 ++-
.../resources/jobs/AsyncJobsClient.java | 30 +++
.../resources/jobs/AsyncRawJobsClient.java | 92 ++++++++
.../catchall/resources/jobs/JobsClient.java | 29 +++
.../resources/jobs/RawJobsClient.java | 73 +++++++
.../requests/GetJobResultsCsvRequest.java | 69 ++++++
.../monitors/AsyncMonitorsClient.java | 32 +++
.../monitors/AsyncRawMonitorsClient.java | 94 ++++++++
.../resources/monitors/MonitorsClient.java | 32 +++
.../resources/monitors/RawMonitorsClient.java | 76 +++++++
.../PullMonitorResultsCsvRequest.java | 69 ++++++
.../catchall/types/ConnectedDataset.java | 206 ++++++++++++++++++
.../catchall/types/ConnectedEntity.java | 92 +++++++-
.../catchall/types/CreateEntityRequest.java | 49 ++++-
.../catchall/types/EntityResponse.java | 72 ++++++
.../catchall/types/EntitySummary.java | 82 ++++++-
.../catchall/types/PullJobResponseDto.java | 90 ++++++++
.../types/PullMonitorResponseDto.java | 94 +++++++-
24 files changed, 1453 insertions(+), 22 deletions(-)
create mode 100644 src/main/java/com/newscatcher/catchall/resources/jobs/requests/GetJobResultsCsvRequest.java
create mode 100644 src/main/java/com/newscatcher/catchall/resources/monitors/requests/PullMonitorResultsCsvRequest.java
create mode 100644 src/main/java/com/newscatcher/catchall/types/ConnectedDataset.java
diff --git a/.fern/metadata.json b/.fern/metadata.json
index 670b5e8..4f36d10 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -1,16 +1,16 @@
{
- "cliVersion": "5.45.3",
+ "cliVersion": "5.50.6",
"generatorName": "fernapi/fern-java-sdk",
- "generatorVersion": "4.9.2",
+ "generatorVersion": "4.10.16",
"generatorConfig": {
"publish-to": "central",
"client-class-name": "CatchAllApi",
"package-prefix": "com.newscatcher.catchall"
},
- "originGitCommit": "56ea60da11c1b8d90274a137f5fbc3bb89b9fac4",
+ "originGitCommit": "f9a7ba07dda24e9d9936bb543686bc542355479e",
"originGitCommitIsDirty": true,
"invokedBy": "ci",
"requestedVersion": "AUTO",
"ciProvider": "unknown",
- "sdkVersion": "3.0.1"
+ "sdkVersion": "0.0.0-fern-placeholder"
}
\ No newline at end of file
diff --git a/README.md b/README.md
index de3aa29..666da34 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ Add the dependency in your `build.gradle` file:
```groovy
dependencies {
- implementation 'com.newscatcherapi:newscatcher-catchall-sdk:3.0.1'
+ implementation 'com.newscatcherapi:newscatcher-catchall-sdk:0.0.0-fern-placeholder'
}
```
@@ -47,7 +47,7 @@ Add the dependency in your `pom.xml` file:
com.newscatcherapi
newscatcher-catchall-sdk
- 3.0.1
+ 0.0.0-fern-placeholder
```
@@ -264,3 +264,4 @@ On the other hand, contributions to the README are always very welcome!
+
diff --git a/build.gradle b/build.gradle
index 7e47163..e611a96 100644
--- a/build.gradle
+++ b/build.gradle
@@ -47,7 +47,7 @@ java {
group = 'com.newscatcherapi'
-version = '3.0.1'
+version = '0.0.0-fern-placeholder'
jar {
dependsOn(":generatePomFileForMavenPublication")
@@ -78,7 +78,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.newscatcherapi'
artifactId = 'newscatcher-catchall-sdk'
- version = '3.0.1'
+ version = '0.0.0-fern-placeholder'
from components.java
pom {
name = 'newscatcher'
diff --git a/reference.md b/reference.md
index 195040c..b3fd070 100644
--- a/reference.md
+++ b/reference.md
@@ -566,6 +566,65 @@ client.jobs().getJobResults(
+
+
+
+
+client.jobs.getJobResultsCsv(jobId) -> String
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into `event_associated_entities` and `mention_entities` JSON columns.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.jobs().getJobResultsCsv(
+ "job_id",
+ GetJobResultsCsvRequest
+ .builder()
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**jobId:** `String` — Unique job identifier returned from [`POST /catchAll/submit`](https://www.newscatcherapi.com/docs/web-search-api/api-reference/jobs/create-job).
+
+
+
+
+
+
+
@@ -981,6 +1040,65 @@ client.monitors().pullMonitorResults(
+
+
+
+
+client.monitors.pullMonitorResultsCsv(monitorId) -> String
+
+-
+
+#### 📝 Description
+
+
+-
+
+
+-
+
+Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into `event_associated_entities` and `mention_entities` JSON columns.
+
+
+
+
+
+#### 🔌 Usage
+
+
+-
+
+
+-
+
+```java
+client.monitors().pullMonitorResultsCsv(
+ "monitor_id",
+ PullMonitorResultsCsvRequest
+ .builder()
+ .build()
+);
+```
+
+
+
+
+
+#### ⚙️ Parameters
+
+
+-
+
+
+-
+
+**monitorId:** `String` — Monitor identifier.
+
+
+
+
+
+
+
@@ -2885,6 +3003,14 @@ client.entities().updateEntity(
-
+**externalEntityId:** `Optional` — Updated external identifier for this entity.
+
+
+
+
+
+-
+
**additionalAttributes:** `Optional`
diff --git a/src/main/java/com/newscatcher/catchall/core/ClientOptions.java b/src/main/java/com/newscatcher/catchall/core/ClientOptions.java
index 4a5c40b..897675d 100644
--- a/src/main/java/com/newscatcher/catchall/core/ClientOptions.java
+++ b/src/main/java/com/newscatcher/catchall/core/ClientOptions.java
@@ -38,10 +38,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap() {
{
- put("User-Agent", "com.newscatcherapi:newscatcher-catchall-sdk/3.0.1");
+ put("User-Agent", "com.newscatcherapi:newscatcher-catchall-sdk/0.0.0-fern-placeholder");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.newscatcher.fern:api-sdk");
- put("X-Fern-SDK-Version", "3.0.1");
+ put("X-Fern-SDK-Version", "0.0.0-fern-placeholder");
}
});
this.headerSuppliers = headerSuppliers;
diff --git a/src/main/java/com/newscatcher/catchall/core/DateTimeDeserializer.java b/src/main/java/com/newscatcher/catchall/core/DateTimeDeserializer.java
index 7a10c34..e3828ba 100644
--- a/src/main/java/com/newscatcher/catchall/core/DateTimeDeserializer.java
+++ b/src/main/java/com/newscatcher/catchall/core/DateTimeDeserializer.java
@@ -14,6 +14,7 @@
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeParseException;
import java.time.temporal.TemporalAccessor;
import java.time.temporal.TemporalQueries;
@@ -42,8 +43,15 @@ public OffsetDateTime deserialize(JsonParser parser, DeserializationContext cont
if (token == JsonToken.VALUE_NUMBER_INT) {
return OffsetDateTime.ofInstant(Instant.ofEpochSecond(parser.getValueAsLong()), ZoneOffset.UTC);
} else {
- TemporalAccessor temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest(
- parser.getValueAsString(), OffsetDateTime::from, LocalDateTime::from);
+ String value = parser.getValueAsString();
+ TemporalAccessor temporal;
+ try {
+ temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest(value, OffsetDateTime::from, LocalDateTime::from);
+ } catch (DateTimeParseException e) {
+ // Fall back to space-separated format (e.g. "2025-02-15 10:30:00+00:00").
+ temporal = DateTimeFormatter.ISO_DATE_TIME.parseBest(
+ value.replace(' ', 'T'), OffsetDateTime::from, LocalDateTime::from);
+ }
if (temporal.query(TemporalQueries.offset()) == null) {
return LocalDateTime.from(temporal).atOffset(ZoneOffset.UTC);
diff --git a/src/main/java/com/newscatcher/catchall/resources/entities/requests/UpdateEntityRequest.java b/src/main/java/com/newscatcher/catchall/resources/entities/requests/UpdateEntityRequest.java
index f3b191f..667c0cf 100644
--- a/src/main/java/com/newscatcher/catchall/resources/entities/requests/UpdateEntityRequest.java
+++ b/src/main/java/com/newscatcher/catchall/resources/entities/requests/UpdateEntityRequest.java
@@ -25,6 +25,8 @@ public final class UpdateEntityRequest {
private final Optional description;
+ private final Optional externalEntityId;
+
private final Optional additionalAttributes;
private final Map additionalProperties;
@@ -32,10 +34,12 @@ public final class UpdateEntityRequest {
private UpdateEntityRequest(
Optional name,
Optional description,
+ Optional externalEntityId,
Optional additionalAttributes,
Map additionalProperties) {
this.name = name;
this.description = description;
+ this.externalEntityId = externalEntityId;
this.additionalAttributes = additionalAttributes;
this.additionalProperties = additionalProperties;
}
@@ -56,6 +60,14 @@ public Optional getDescription() {
return description;
}
+ /**
+ * @return Updated external identifier for this entity.
+ */
+ @JsonProperty("external_entity_id")
+ public Optional getExternalEntityId() {
+ return externalEntityId;
+ }
+
@JsonProperty("additional_attributes")
public Optional getAdditionalAttributes() {
return additionalAttributes;
@@ -75,12 +87,13 @@ public Map getAdditionalProperties() {
private boolean equalTo(UpdateEntityRequest other) {
return name.equals(other.name)
&& description.equals(other.description)
+ && externalEntityId.equals(other.externalEntityId)
&& additionalAttributes.equals(other.additionalAttributes);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.name, this.description, this.additionalAttributes);
+ return Objects.hash(this.name, this.description, this.externalEntityId, this.additionalAttributes);
}
@java.lang.Override
@@ -98,6 +111,8 @@ public static final class Builder {
private Optional description = Optional.empty();
+ private Optional externalEntityId = Optional.empty();
+
private Optional additionalAttributes = Optional.empty();
@JsonAnySetter
@@ -108,6 +123,7 @@ private Builder() {}
public Builder from(UpdateEntityRequest other) {
name(other.getName());
description(other.getDescription());
+ externalEntityId(other.getExternalEntityId());
additionalAttributes(other.getAdditionalAttributes());
return this;
}
@@ -140,6 +156,20 @@ public Builder description(String description) {
return this;
}
+ /**
+ * Updated external identifier for this entity.
+ */
+ @JsonSetter(value = "external_entity_id", nulls = Nulls.SKIP)
+ public Builder externalEntityId(Optional externalEntityId) {
+ this.externalEntityId = externalEntityId;
+ return this;
+ }
+
+ public Builder externalEntityId(String externalEntityId) {
+ this.externalEntityId = Optional.ofNullable(externalEntityId);
+ return this;
+ }
+
@JsonSetter(value = "additional_attributes", nulls = Nulls.SKIP)
public Builder additionalAttributes(Optional additionalAttributes) {
this.additionalAttributes = additionalAttributes;
@@ -152,7 +182,8 @@ public Builder additionalAttributes(AdditionalAttributes additionalAttributes) {
}
public UpdateEntityRequest build() {
- return new UpdateEntityRequest(name, description, additionalAttributes, additionalProperties);
+ return new UpdateEntityRequest(
+ name, description, externalEntityId, additionalAttributes, additionalProperties);
}
public Builder additionalProperty(String key, Object value) {
diff --git a/src/main/java/com/newscatcher/catchall/resources/jobs/AsyncJobsClient.java b/src/main/java/com/newscatcher/catchall/resources/jobs/AsyncJobsClient.java
index 35f9792..d202da5 100644
--- a/src/main/java/com/newscatcher/catchall/resources/jobs/AsyncJobsClient.java
+++ b/src/main/java/com/newscatcher/catchall/resources/jobs/AsyncJobsClient.java
@@ -7,6 +7,7 @@
import com.newscatcher.catchall.core.RequestOptions;
import com.newscatcher.catchall.resources.jobs.requests.ContinueRequestDto;
import com.newscatcher.catchall.resources.jobs.requests.DeleteJobRequest;
+import com.newscatcher.catchall.resources.jobs.requests.GetJobResultsCsvRequest;
import com.newscatcher.catchall.resources.jobs.requests.GetJobResultsRequest;
import com.newscatcher.catchall.resources.jobs.requests.GetJobStatusRequest;
import com.newscatcher.catchall.resources.jobs.requests.GetUserJobsRequest;
@@ -173,6 +174,35 @@ public CompletableFuture getJobResults(
return this.rawClient.getJobResults(jobId, request, requestOptions).thenApply(response -> response.body());
}
+ /**
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CompletableFuture getJobResultsCsv(String jobId) {
+ return this.rawClient.getJobResultsCsv(jobId).thenApply(response -> response.body());
+ }
+
+ /**
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CompletableFuture getJobResultsCsv(String jobId, RequestOptions requestOptions) {
+ return this.rawClient.getJobResultsCsv(jobId, requestOptions).thenApply(response -> response.body());
+ }
+
+ /**
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CompletableFuture getJobResultsCsv(String jobId, GetJobResultsCsvRequest request) {
+ return this.rawClient.getJobResultsCsv(jobId, request).thenApply(response -> response.body());
+ }
+
+ /**
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CompletableFuture getJobResultsCsv(
+ String jobId, GetJobResultsCsvRequest request, RequestOptions requestOptions) {
+ return this.rawClient.getJobResultsCsv(jobId, request, requestOptions).thenApply(response -> response.body());
+ }
+
/**
* Continue an existing job to process more records beyond the initial limit.
*/
diff --git a/src/main/java/com/newscatcher/catchall/resources/jobs/AsyncRawJobsClient.java b/src/main/java/com/newscatcher/catchall/resources/jobs/AsyncRawJobsClient.java
index 41e8a12..dd51402 100644
--- a/src/main/java/com/newscatcher/catchall/resources/jobs/AsyncRawJobsClient.java
+++ b/src/main/java/com/newscatcher/catchall/resources/jobs/AsyncRawJobsClient.java
@@ -19,6 +19,7 @@
import com.newscatcher.catchall.errors.UnprocessableEntityError;
import com.newscatcher.catchall.resources.jobs.requests.ContinueRequestDto;
import com.newscatcher.catchall.resources.jobs.requests.DeleteJobRequest;
+import com.newscatcher.catchall.resources.jobs.requests.GetJobResultsCsvRequest;
import com.newscatcher.catchall.resources.jobs.requests.GetJobResultsRequest;
import com.newscatcher.catchall.resources.jobs.requests.GetJobStatusRequest;
import com.newscatcher.catchall.resources.jobs.requests.GetUserJobsRequest;
@@ -610,6 +611,97 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
return future;
}
+ /**
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CompletableFuture> getJobResultsCsv(String jobId) {
+ return getJobResultsCsv(jobId, GetJobResultsCsvRequest.builder().build());
+ }
+
+ /**
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CompletableFuture> getJobResultsCsv(
+ String jobId, RequestOptions requestOptions) {
+ return getJobResultsCsv(jobId, GetJobResultsCsvRequest.builder().build(), requestOptions);
+ }
+
+ /**
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CompletableFuture> getJobResultsCsv(
+ String jobId, GetJobResultsCsvRequest request) {
+ return getJobResultsCsv(jobId, request, null);
+ }
+
+ /**
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CompletableFuture> getJobResultsCsv(
+ String jobId, GetJobResultsCsvRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("catchAll/pull")
+ .addPathSegment(jobId)
+ .addPathSegments("csv");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json");
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new CatchAllApiHttpResponse<>(responseBodyString, response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Error.class),
+ response));
+ return;
+ case 404:
+ future.completeExceptionally(new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Error.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new CatchAllApiApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (IOException e) {
+ future.completeExceptionally(new CatchAllApiException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new CatchAllApiException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
/**
* Continue an existing job to process more records beyond the initial limit.
*/
diff --git a/src/main/java/com/newscatcher/catchall/resources/jobs/JobsClient.java b/src/main/java/com/newscatcher/catchall/resources/jobs/JobsClient.java
index 2b1fec1..af2e8ec 100644
--- a/src/main/java/com/newscatcher/catchall/resources/jobs/JobsClient.java
+++ b/src/main/java/com/newscatcher/catchall/resources/jobs/JobsClient.java
@@ -7,6 +7,7 @@
import com.newscatcher.catchall.core.RequestOptions;
import com.newscatcher.catchall.resources.jobs.requests.ContinueRequestDto;
import com.newscatcher.catchall.resources.jobs.requests.DeleteJobRequest;
+import com.newscatcher.catchall.resources.jobs.requests.GetJobResultsCsvRequest;
import com.newscatcher.catchall.resources.jobs.requests.GetJobResultsRequest;
import com.newscatcher.catchall.resources.jobs.requests.GetJobStatusRequest;
import com.newscatcher.catchall.resources.jobs.requests.GetUserJobsRequest;
@@ -167,6 +168,34 @@ public PullJobResponseDto getJobResults(String jobId, GetJobResultsRequest reque
return this.rawClient.getJobResults(jobId, request, requestOptions).body();
}
+ /**
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public String getJobResultsCsv(String jobId) {
+ return this.rawClient.getJobResultsCsv(jobId).body();
+ }
+
+ /**
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public String getJobResultsCsv(String jobId, RequestOptions requestOptions) {
+ return this.rawClient.getJobResultsCsv(jobId, requestOptions).body();
+ }
+
+ /**
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public String getJobResultsCsv(String jobId, GetJobResultsCsvRequest request) {
+ return this.rawClient.getJobResultsCsv(jobId, request).body();
+ }
+
+ /**
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public String getJobResultsCsv(String jobId, GetJobResultsCsvRequest request, RequestOptions requestOptions) {
+ return this.rawClient.getJobResultsCsv(jobId, request, requestOptions).body();
+ }
+
/**
* Continue an existing job to process more records beyond the initial limit.
*/
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 842067a..4d1255c 100644
--- a/src/main/java/com/newscatcher/catchall/resources/jobs/RawJobsClient.java
+++ b/src/main/java/com/newscatcher/catchall/resources/jobs/RawJobsClient.java
@@ -19,6 +19,7 @@
import com.newscatcher.catchall.errors.UnprocessableEntityError;
import com.newscatcher.catchall.resources.jobs.requests.ContinueRequestDto;
import com.newscatcher.catchall.resources.jobs.requests.DeleteJobRequest;
+import com.newscatcher.catchall.resources.jobs.requests.GetJobResultsCsvRequest;
import com.newscatcher.catchall.resources.jobs.requests.GetJobResultsRequest;
import com.newscatcher.catchall.resources.jobs.requests.GetJobStatusRequest;
import com.newscatcher.catchall.resources.jobs.requests.GetUserJobsRequest;
@@ -495,6 +496,78 @@ public CatchAllApiHttpResponse getJobResults(
}
}
+ /**
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CatchAllApiHttpResponse getJobResultsCsv(String jobId) {
+ return getJobResultsCsv(jobId, GetJobResultsCsvRequest.builder().build());
+ }
+
+ /**
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CatchAllApiHttpResponse getJobResultsCsv(String jobId, RequestOptions requestOptions) {
+ return getJobResultsCsv(jobId, GetJobResultsCsvRequest.builder().build(), requestOptions);
+ }
+
+ /**
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CatchAllApiHttpResponse getJobResultsCsv(String jobId, GetJobResultsCsvRequest request) {
+ return getJobResultsCsv(jobId, request, null);
+ }
+
+ /**
+ * Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CatchAllApiHttpResponse getJobResultsCsv(
+ String jobId, GetJobResultsCsvRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("catchAll/pull")
+ .addPathSegment(jobId)
+ .addPathSegments("csv");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json");
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new CatchAllApiHttpResponse<>(responseBodyString, response);
+ }
+ try {
+ switch (response.code()) {
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Error.class), response);
+ case 404:
+ throw new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Error.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new CatchAllApiApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (IOException e) {
+ throw new CatchAllApiException("Network error executing HTTP request", e);
+ }
+ }
+
/**
* Continue an existing job to process more records beyond the initial limit.
*/
diff --git a/src/main/java/com/newscatcher/catchall/resources/jobs/requests/GetJobResultsCsvRequest.java b/src/main/java/com/newscatcher/catchall/resources/jobs/requests/GetJobResultsCsvRequest.java
new file mode 100644
index 0000000..e361b9c
--- /dev/null
+++ b/src/main/java/com/newscatcher/catchall/resources/jobs/requests/GetJobResultsCsvRequest.java
@@ -0,0 +1,69 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.newscatcher.catchall.resources.jobs.requests;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.newscatcher.catchall.core.ObjectMappers;
+import java.util.HashMap;
+import java.util.Map;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = GetJobResultsCsvRequest.Builder.class)
+public final class GetJobResultsCsvRequest {
+ private final Map additionalProperties;
+
+ private GetJobResultsCsvRequest(Map additionalProperties) {
+ this.additionalProperties = additionalProperties;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof GetJobResultsCsvRequest;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(GetJobResultsCsvRequest other) {
+ return this;
+ }
+
+ public GetJobResultsCsvRequest build() {
+ return new GetJobResultsCsvRequest(additionalProperties);
+ }
+
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/newscatcher/catchall/resources/monitors/AsyncMonitorsClient.java b/src/main/java/com/newscatcher/catchall/resources/monitors/AsyncMonitorsClient.java
index 76cc310..6db5d8f 100644
--- a/src/main/java/com/newscatcher/catchall/resources/monitors/AsyncMonitorsClient.java
+++ b/src/main/java/com/newscatcher/catchall/resources/monitors/AsyncMonitorsClient.java
@@ -12,6 +12,7 @@
import com.newscatcher.catchall.resources.monitors.requests.GetMonitorStatusHistoryRequest;
import com.newscatcher.catchall.resources.monitors.requests.ListMonitorJobsRequest;
import com.newscatcher.catchall.resources.monitors.requests.ListMonitorsRequest;
+import com.newscatcher.catchall.resources.monitors.requests.PullMonitorResultsCsvRequest;
import com.newscatcher.catchall.resources.monitors.requests.PullMonitorResultsRequest;
import com.newscatcher.catchall.resources.monitors.requests.UpdateMonitorRequestDto;
import com.newscatcher.catchall.resources.monitors.types.DisableMonitorResponse;
@@ -119,6 +120,37 @@ public CompletableFuture pullMonitorResults(
.thenApply(response -> response.body());
}
+ /**
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CompletableFuture pullMonitorResultsCsv(String monitorId) {
+ return this.rawClient.pullMonitorResultsCsv(monitorId).thenApply(response -> response.body());
+ }
+
+ /**
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CompletableFuture pullMonitorResultsCsv(String monitorId, RequestOptions requestOptions) {
+ return this.rawClient.pullMonitorResultsCsv(monitorId, requestOptions).thenApply(response -> response.body());
+ }
+
+ /**
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CompletableFuture pullMonitorResultsCsv(String monitorId, PullMonitorResultsCsvRequest request) {
+ return this.rawClient.pullMonitorResultsCsv(monitorId, request).thenApply(response -> response.body());
+ }
+
+ /**
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CompletableFuture pullMonitorResultsCsv(
+ String monitorId, PullMonitorResultsCsvRequest request, RequestOptions requestOptions) {
+ return this.rawClient
+ .pullMonitorResultsCsv(monitorId, request, requestOptions)
+ .thenApply(response -> response.body());
+ }
+
/**
* Return all jobs executed by a monitor.
*/
diff --git a/src/main/java/com/newscatcher/catchall/resources/monitors/AsyncRawMonitorsClient.java b/src/main/java/com/newscatcher/catchall/resources/monitors/AsyncRawMonitorsClient.java
index 0148d21..c225143 100644
--- a/src/main/java/com/newscatcher/catchall/resources/monitors/AsyncRawMonitorsClient.java
+++ b/src/main/java/com/newscatcher/catchall/resources/monitors/AsyncRawMonitorsClient.java
@@ -23,6 +23,7 @@
import com.newscatcher.catchall.resources.monitors.requests.GetMonitorStatusHistoryRequest;
import com.newscatcher.catchall.resources.monitors.requests.ListMonitorJobsRequest;
import com.newscatcher.catchall.resources.monitors.requests.ListMonitorsRequest;
+import com.newscatcher.catchall.resources.monitors.requests.PullMonitorResultsCsvRequest;
import com.newscatcher.catchall.resources.monitors.requests.PullMonitorResultsRequest;
import com.newscatcher.catchall.resources.monitors.requests.UpdateMonitorRequestDto;
import com.newscatcher.catchall.resources.monitors.types.DisableMonitorResponse;
@@ -340,6 +341,99 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
return future;
}
+ /**
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CompletableFuture> pullMonitorResultsCsv(String monitorId) {
+ return pullMonitorResultsCsv(
+ monitorId, PullMonitorResultsCsvRequest.builder().build());
+ }
+
+ /**
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CompletableFuture> pullMonitorResultsCsv(
+ String monitorId, RequestOptions requestOptions) {
+ return pullMonitorResultsCsv(
+ monitorId, PullMonitorResultsCsvRequest.builder().build(), requestOptions);
+ }
+
+ /**
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CompletableFuture> pullMonitorResultsCsv(
+ String monitorId, PullMonitorResultsCsvRequest request) {
+ return pullMonitorResultsCsv(monitorId, request, null);
+ }
+
+ /**
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CompletableFuture> pullMonitorResultsCsv(
+ String monitorId, PullMonitorResultsCsvRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("catchAll/monitors/pull")
+ .addPathSegment(monitorId)
+ .addPathSegments("csv");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json");
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ CompletableFuture> future = new CompletableFuture<>();
+ client.newCall(okhttpRequest).enqueue(new Callback() {
+ @Override
+ public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
+ try (ResponseBody responseBody = response.body()) {
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ future.complete(new CatchAllApiHttpResponse<>(responseBodyString, response));
+ return;
+ }
+ try {
+ switch (response.code()) {
+ case 403:
+ future.completeExceptionally(new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Error.class),
+ response));
+ return;
+ case 404:
+ future.completeExceptionally(new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Error.class),
+ response));
+ return;
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ future.completeExceptionally(new CatchAllApiApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response));
+ return;
+ } catch (IOException e) {
+ future.completeExceptionally(new CatchAllApiException("Network error executing HTTP request", e));
+ }
+ }
+
+ @Override
+ public void onFailure(@NotNull Call call, @NotNull IOException e) {
+ future.completeExceptionally(new CatchAllApiException("Network error executing HTTP request", e));
+ }
+ });
+ return future;
+ }
+
/**
* Return all jobs executed by a monitor.
*/
diff --git a/src/main/java/com/newscatcher/catchall/resources/monitors/MonitorsClient.java b/src/main/java/com/newscatcher/catchall/resources/monitors/MonitorsClient.java
index 6f9309a..c36aade 100644
--- a/src/main/java/com/newscatcher/catchall/resources/monitors/MonitorsClient.java
+++ b/src/main/java/com/newscatcher/catchall/resources/monitors/MonitorsClient.java
@@ -12,6 +12,7 @@
import com.newscatcher.catchall.resources.monitors.requests.GetMonitorStatusHistoryRequest;
import com.newscatcher.catchall.resources.monitors.requests.ListMonitorJobsRequest;
import com.newscatcher.catchall.resources.monitors.requests.ListMonitorsRequest;
+import com.newscatcher.catchall.resources.monitors.requests.PullMonitorResultsCsvRequest;
import com.newscatcher.catchall.resources.monitors.requests.PullMonitorResultsRequest;
import com.newscatcher.catchall.resources.monitors.requests.UpdateMonitorRequestDto;
import com.newscatcher.catchall.resources.monitors.types.DisableMonitorResponse;
@@ -114,6 +115,37 @@ public PullMonitorResponseDto pullMonitorResults(
.body();
}
+ /**
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public String pullMonitorResultsCsv(String monitorId) {
+ return this.rawClient.pullMonitorResultsCsv(monitorId).body();
+ }
+
+ /**
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public String pullMonitorResultsCsv(String monitorId, RequestOptions requestOptions) {
+ return this.rawClient.pullMonitorResultsCsv(monitorId, requestOptions).body();
+ }
+
+ /**
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public String pullMonitorResultsCsv(String monitorId, PullMonitorResultsCsvRequest request) {
+ return this.rawClient.pullMonitorResultsCsv(monitorId, request).body();
+ }
+
+ /**
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public String pullMonitorResultsCsv(
+ String monitorId, PullMonitorResultsCsvRequest request, RequestOptions requestOptions) {
+ return this.rawClient
+ .pullMonitorResultsCsv(monitorId, request, requestOptions)
+ .body();
+ }
+
/**
* Return all jobs executed by a monitor.
*/
diff --git a/src/main/java/com/newscatcher/catchall/resources/monitors/RawMonitorsClient.java b/src/main/java/com/newscatcher/catchall/resources/monitors/RawMonitorsClient.java
index e46d9f3..03e0ac3 100644
--- a/src/main/java/com/newscatcher/catchall/resources/monitors/RawMonitorsClient.java
+++ b/src/main/java/com/newscatcher/catchall/resources/monitors/RawMonitorsClient.java
@@ -23,6 +23,7 @@
import com.newscatcher.catchall.resources.monitors.requests.GetMonitorStatusHistoryRequest;
import com.newscatcher.catchall.resources.monitors.requests.ListMonitorJobsRequest;
import com.newscatcher.catchall.resources.monitors.requests.ListMonitorsRequest;
+import com.newscatcher.catchall.resources.monitors.requests.PullMonitorResultsCsvRequest;
import com.newscatcher.catchall.resources.monitors.requests.PullMonitorResultsRequest;
import com.newscatcher.catchall.resources.monitors.requests.UpdateMonitorRequestDto;
import com.newscatcher.catchall.resources.monitors.types.DisableMonitorResponse;
@@ -284,6 +285,81 @@ public CatchAllApiHttpResponse pullMonitorResults(
}
}
+ /**
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CatchAllApiHttpResponse pullMonitorResultsCsv(String monitorId) {
+ return pullMonitorResultsCsv(
+ monitorId, PullMonitorResultsCsvRequest.builder().build());
+ }
+
+ /**
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CatchAllApiHttpResponse pullMonitorResultsCsv(String monitorId, RequestOptions requestOptions) {
+ return pullMonitorResultsCsv(
+ monitorId, PullMonitorResultsCsvRequest.builder().build(), requestOptions);
+ }
+
+ /**
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CatchAllApiHttpResponse pullMonitorResultsCsv(
+ String monitorId, PullMonitorResultsCsvRequest request) {
+ return pullMonitorResultsCsv(monitorId, request, null);
+ }
+
+ /**
+ * Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns, citations as a JSON column, and connected entities split into event_associated_entities and mention_entities JSON columns.
+ */
+ public CatchAllApiHttpResponse pullMonitorResultsCsv(
+ String monitorId, PullMonitorResultsCsvRequest request, RequestOptions requestOptions) {
+ HttpUrl.Builder httpUrl = HttpUrl.parse(this.clientOptions.environment().getUrl())
+ .newBuilder()
+ .addPathSegments("catchAll/monitors/pull")
+ .addPathSegment(monitorId)
+ .addPathSegments("csv");
+ if (requestOptions != null) {
+ requestOptions.getQueryParameters().forEach((_key, _value) -> {
+ httpUrl.addQueryParameter(_key, _value);
+ });
+ }
+ Request.Builder _requestBuilder = new Request.Builder()
+ .url(httpUrl.build())
+ .method("GET", null)
+ .headers(Headers.of(clientOptions.headers(requestOptions)))
+ .addHeader("Accept", "application/json");
+ Request okhttpRequest = _requestBuilder.build();
+ OkHttpClient client = clientOptions.httpClient();
+ if (requestOptions != null && requestOptions.getTimeout().isPresent()) {
+ client = clientOptions.httpClientWithTimeout(requestOptions);
+ }
+ try (Response response = client.newCall(okhttpRequest).execute()) {
+ ResponseBody responseBody = response.body();
+ String responseBodyString = responseBody != null ? responseBody.string() : "{}";
+ if (response.isSuccessful()) {
+ return new CatchAllApiHttpResponse<>(responseBodyString, response);
+ }
+ try {
+ switch (response.code()) {
+ case 403:
+ throw new ForbiddenError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Error.class), response);
+ case 404:
+ throw new NotFoundError(
+ ObjectMappers.JSON_MAPPER.readValue(responseBodyString, Error.class), response);
+ }
+ } catch (JsonProcessingException ignored) {
+ // unable to map error response, throwing generic error
+ }
+ Object errorBody = ObjectMappers.parseErrorBody(responseBodyString);
+ throw new CatchAllApiApiException(
+ "Error with status code " + response.code(), response.code(), errorBody, response);
+ } catch (IOException e) {
+ throw new CatchAllApiException("Network error executing HTTP request", e);
+ }
+ }
+
/**
* Return all jobs executed by a monitor.
*/
diff --git a/src/main/java/com/newscatcher/catchall/resources/monitors/requests/PullMonitorResultsCsvRequest.java b/src/main/java/com/newscatcher/catchall/resources/monitors/requests/PullMonitorResultsCsvRequest.java
new file mode 100644
index 0000000..aaa220b
--- /dev/null
+++ b/src/main/java/com/newscatcher/catchall/resources/monitors/requests/PullMonitorResultsCsvRequest.java
@@ -0,0 +1,69 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.newscatcher.catchall.resources.monitors.requests;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.newscatcher.catchall.core.ObjectMappers;
+import java.util.HashMap;
+import java.util.Map;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = PullMonitorResultsCsvRequest.Builder.class)
+public final class PullMonitorResultsCsvRequest {
+ private final Map additionalProperties;
+
+ private PullMonitorResultsCsvRequest(Map additionalProperties) {
+ this.additionalProperties = additionalProperties;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof PullMonitorResultsCsvRequest;
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(PullMonitorResultsCsvRequest other) {
+ return this;
+ }
+
+ public PullMonitorResultsCsvRequest build() {
+ return new PullMonitorResultsCsvRequest(additionalProperties);
+ }
+
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/newscatcher/catchall/types/ConnectedDataset.java b/src/main/java/com/newscatcher/catchall/types/ConnectedDataset.java
new file mode 100644
index 0000000..c89a8ae
--- /dev/null
+++ b/src/main/java/com/newscatcher/catchall/types/ConnectedDataset.java
@@ -0,0 +1,206 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package com.newscatcher.catchall.types;
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.newscatcher.catchall.core.ObjectMappers;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import org.jetbrains.annotations.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = ConnectedDataset.Builder.class)
+public final class ConnectedDataset {
+ private final String id;
+
+ private final String name;
+
+ private final Optional isDeleted;
+
+ private final Map additionalProperties;
+
+ private ConnectedDataset(
+ String id, String name, Optional isDeleted, Map additionalProperties) {
+ this.id = id;
+ this.name = name;
+ this.isDeleted = isDeleted;
+ this.additionalProperties = additionalProperties;
+ }
+
+ /**
+ * @return Dataset identifier.
+ */
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * @return Dataset name as stored. Check is_deleted to determine whether the dataset is still active.
+ */
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * @return True when the dataset has been deleted.
+ */
+ @JsonProperty("is_deleted")
+ public Optional getIsDeleted() {
+ return isDeleted;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof ConnectedDataset && equalTo((ConnectedDataset) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(ConnectedDataset other) {
+ return id.equals(other.id) && name.equals(other.name) && isDeleted.equals(other.isDeleted);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.id, this.name, this.isDeleted);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static IdStage builder() {
+ return new Builder();
+ }
+
+ public interface IdStage {
+ /**
+ * Dataset identifier.
+ */
+ NameStage id(@NotNull String id);
+
+ Builder from(ConnectedDataset other);
+ }
+
+ public interface NameStage {
+ /**
+ * Dataset name as stored. Check is_deleted to determine whether the dataset is still active.
+ */
+ _FinalStage name(@NotNull String name);
+ }
+
+ public interface _FinalStage {
+ ConnectedDataset build();
+
+ _FinalStage additionalProperty(String key, Object value);
+
+ _FinalStage additionalProperties(Map additionalProperties);
+
+ /**
+ * True when the dataset has been deleted.
+ */
+ _FinalStage isDeleted(Optional isDeleted);
+
+ _FinalStage isDeleted(Boolean isDeleted);
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder implements IdStage, NameStage, _FinalStage {
+ private String id;
+
+ private String name;
+
+ private Optional isDeleted = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(ConnectedDataset other) {
+ id(other.getId());
+ name(other.getName());
+ isDeleted(other.getIsDeleted());
+ return this;
+ }
+
+ /**
+ * Dataset identifier.
+ * Dataset identifier.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ @JsonSetter("id")
+ public NameStage id(@NotNull String id) {
+ this.id = Objects.requireNonNull(id, "id must not be null");
+ return this;
+ }
+
+ /**
+ * Dataset name as stored. Check is_deleted to determine whether the dataset is still active.
+ * Dataset name as stored. Check is_deleted to determine whether the dataset is still active.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ @JsonSetter("name")
+ public _FinalStage name(@NotNull String name) {
+ this.name = Objects.requireNonNull(name, "name must not be null");
+ return this;
+ }
+
+ /**
+ * True when the dataset has been deleted.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage isDeleted(Boolean isDeleted) {
+ this.isDeleted = Optional.ofNullable(isDeleted);
+ return this;
+ }
+
+ /**
+ * True when the dataset has been deleted.
+ */
+ @java.lang.Override
+ @JsonSetter(value = "is_deleted", nulls = Nulls.SKIP)
+ public _FinalStage isDeleted(Optional isDeleted) {
+ this.isDeleted = isDeleted;
+ return this;
+ }
+
+ @java.lang.Override
+ public ConnectedDataset build() {
+ return new ConnectedDataset(id, name, isDeleted, additionalProperties);
+ }
+
+ @java.lang.Override
+ public Builder additionalProperty(String key, Object value) {
+ this.additionalProperties.put(key, value);
+ return this;
+ }
+
+ @java.lang.Override
+ public Builder additionalProperties(Map additionalProperties) {
+ this.additionalProperties.putAll(additionalProperties);
+ return this;
+ }
+ }
+}
diff --git a/src/main/java/com/newscatcher/catchall/types/ConnectedEntity.java b/src/main/java/com/newscatcher/catchall/types/ConnectedEntity.java
index ff6efea..de4daf8 100644
--- a/src/main/java/com/newscatcher/catchall/types/ConnectedEntity.java
+++ b/src/main/java/com/newscatcher/catchall/types/ConnectedEntity.java
@@ -5,12 +5,15 @@
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.newscatcher.catchall.core.Nullable;
+import com.newscatcher.catchall.core.NullableNonemptyFilter;
import com.newscatcher.catchall.core.ObjectMappers;
import java.util.HashMap;
import java.util.Map;
@@ -33,6 +36,8 @@ public final class ConnectedEntity {
private final String type;
+ private final Optional externalEntityId;
+
private final Optional company;
private final Map additionalProperties;
@@ -44,6 +49,7 @@ private ConnectedEntity(
String relation,
Optional associationType,
String type,
+ Optional externalEntityId,
Optional company,
Map additionalProperties) {
this.entityId = entityId;
@@ -52,6 +58,7 @@ private ConnectedEntity(
this.relation = relation;
this.associationType = associationType;
this.type = type;
+ this.externalEntityId = externalEntityId;
this.company = company;
this.additionalProperties = additionalProperties;
}
@@ -110,6 +117,17 @@ public String getType() {
return type;
}
+ /**
+ * @return External identifier for this entity. Null when not set.
+ */
+ @JsonIgnore
+ public Optional getExternalEntityId() {
+ if (externalEntityId == null) {
+ return Optional.empty();
+ }
+ return externalEntityId;
+ }
+
/**
* @return The stored attributes for this entity. Present only when attributes exist in the database.
* The field name matches the value of type — for example, "company" type entities have a company field.
@@ -119,6 +137,12 @@ public Optional getCompany() {
return company;
}
+ @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class)
+ @JsonProperty("external_entity_id")
+ private Optional _getExternalEntityId() {
+ return externalEntityId;
+ }
+
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
@@ -137,13 +161,21 @@ private boolean equalTo(ConnectedEntity other) {
&& relation.equals(other.relation)
&& associationType.equals(other.associationType)
&& type.equals(other.type)
+ && externalEntityId.equals(other.externalEntityId)
&& company.equals(other.company);
}
@java.lang.Override
public int hashCode() {
return Objects.hash(
- this.entityId, this.name, this.edScore, this.relation, this.associationType, this.type, this.company);
+ this.entityId,
+ this.name,
+ this.edScore,
+ this.relation,
+ this.associationType,
+ this.type,
+ this.externalEntityId,
+ this.company);
}
@java.lang.Override
@@ -212,6 +244,15 @@ public interface _FinalStage {
_FinalStage associationType(String associationType);
+ /**
+ * External identifier for this entity. Null when not set.
+ */
+ _FinalStage externalEntityId(Optional externalEntityId);
+
+ _FinalStage externalEntityId(String externalEntityId);
+
+ _FinalStage externalEntityId(Nullable externalEntityId);
+
/**
* The stored attributes for this entity. Present only when attributes exist in the database.
* The field name matches the value of type — for example, "company" type entities have a company field.
@@ -236,6 +277,8 @@ public static final class Builder
private Optional company = Optional.empty();
+ private Optional externalEntityId = Optional.empty();
+
private Optional associationType = Optional.empty();
@JsonAnySetter
@@ -251,6 +294,7 @@ public Builder from(ConnectedEntity other) {
relation(other.getRelation());
associationType(other.getAssociationType());
type(other.getType());
+ externalEntityId(other.getExternalEntityId());
company(other.getCompany());
return this;
}
@@ -349,6 +393,42 @@ public _FinalStage company(Optional company) {
return this;
}
+ /**
+ * External identifier for this entity. Null when not set.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage externalEntityId(Nullable externalEntityId) {
+ if (externalEntityId.isNull()) {
+ this.externalEntityId = null;
+ } else if (externalEntityId.isEmpty()) {
+ this.externalEntityId = Optional.empty();
+ } else {
+ this.externalEntityId = Optional.of(externalEntityId.get());
+ }
+ return this;
+ }
+
+ /**
+ * External identifier for this entity. Null when not set.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage externalEntityId(String externalEntityId) {
+ this.externalEntityId = Optional.ofNullable(externalEntityId);
+ return this;
+ }
+
+ /**
+ * External identifier for this entity. Null when not set.
+ */
+ @java.lang.Override
+ @JsonSetter(value = "external_entity_id", nulls = Nulls.SKIP)
+ public _FinalStage externalEntityId(Optional externalEntityId) {
+ this.externalEntityId = externalEntityId;
+ return this;
+ }
+
/**
* How the entity relates to the event: event_associated if the entity is a direct actor, mention if merely referenced.
* @return Reference to {@code this} so that method calls can be chained together.
@@ -372,7 +452,15 @@ public _FinalStage associationType(Optional associationType) {
@java.lang.Override
public ConnectedEntity build() {
return new ConnectedEntity(
- entityId, name, edScore, relation, associationType, type, company, additionalProperties);
+ entityId,
+ name,
+ edScore,
+ relation,
+ associationType,
+ type,
+ externalEntityId,
+ company,
+ additionalProperties);
}
@java.lang.Override
diff --git a/src/main/java/com/newscatcher/catchall/types/CreateEntityRequest.java b/src/main/java/com/newscatcher/catchall/types/CreateEntityRequest.java
index 1713c62..d658b02 100644
--- a/src/main/java/com/newscatcher/catchall/types/CreateEntityRequest.java
+++ b/src/main/java/com/newscatcher/catchall/types/CreateEntityRequest.java
@@ -27,6 +27,8 @@ public final class CreateEntityRequest {
private final Optional description;
+ private final Optional externalEntityId;
+
private final Optional additionalAttributes;
private final Map additionalProperties;
@@ -35,11 +37,13 @@ private CreateEntityRequest(
String name,
Optional entityType,
Optional description,
+ Optional externalEntityId,
Optional additionalAttributes,
Map additionalProperties) {
this.name = name;
this.entityType = entityType;
this.description = description;
+ this.externalEntityId = externalEntityId;
this.additionalAttributes = additionalAttributes;
this.additionalProperties = additionalProperties;
}
@@ -65,6 +69,14 @@ public Optional getDescription() {
return description;
}
+ /**
+ * @return Optional external identifier for this entity. Free-form string, not enforced as unique. Use it to store your own CRM, data warehouse, or internal database ID so you can join CatchAll results back to your systems.
+ */
+ @JsonProperty("external_entity_id")
+ public Optional getExternalEntityId() {
+ return externalEntityId;
+ }
+
@JsonProperty("additional_attributes")
public Optional getAdditionalAttributes() {
return additionalAttributes;
@@ -85,12 +97,14 @@ private boolean equalTo(CreateEntityRequest other) {
return name.equals(other.name)
&& entityType.equals(other.entityType)
&& description.equals(other.description)
+ && externalEntityId.equals(other.externalEntityId)
&& additionalAttributes.equals(other.additionalAttributes);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.name, this.entityType, this.description, this.additionalAttributes);
+ return Objects.hash(
+ this.name, this.entityType, this.description, this.externalEntityId, this.additionalAttributes);
}
@java.lang.Override
@@ -129,6 +143,13 @@ public interface _FinalStage {
_FinalStage description(String description);
+ /**
+ * Optional external identifier for this entity. Free-form string, not enforced as unique. Use it to store your own CRM, data warehouse, or internal database ID so you can join CatchAll results back to your systems.
+ */
+ _FinalStage externalEntityId(Optional externalEntityId);
+
+ _FinalStage externalEntityId(String externalEntityId);
+
_FinalStage additionalAttributes(Optional additionalAttributes);
_FinalStage additionalAttributes(AdditionalAttributes additionalAttributes);
@@ -140,6 +161,8 @@ public static final class Builder implements NameStage, _FinalStage {
private Optional additionalAttributes = Optional.empty();
+ private Optional externalEntityId = Optional.empty();
+
private Optional description = Optional.empty();
private Optional entityType = Optional.empty();
@@ -154,6 +177,7 @@ public Builder from(CreateEntityRequest other) {
name(other.getName());
entityType(other.getEntityType());
description(other.getDescription());
+ externalEntityId(other.getExternalEntityId());
additionalAttributes(other.getAdditionalAttributes());
return this;
}
@@ -183,6 +207,26 @@ public _FinalStage additionalAttributes(Optional additiona
return this;
}
+ /**
+ * Optional external identifier for this entity. Free-form string, not enforced as unique. Use it to store your own CRM, data warehouse, or internal database ID so you can join CatchAll results back to your systems.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage externalEntityId(String externalEntityId) {
+ this.externalEntityId = Optional.ofNullable(externalEntityId);
+ return this;
+ }
+
+ /**
+ * Optional external identifier for this entity. Free-form string, not enforced as unique. Use it to store your own CRM, data warehouse, or internal database ID so you can join CatchAll results back to your systems.
+ */
+ @java.lang.Override
+ @JsonSetter(value = "external_entity_id", nulls = Nulls.SKIP)
+ public _FinalStage externalEntityId(Optional externalEntityId) {
+ this.externalEntityId = externalEntityId;
+ return this;
+ }
+
/**
* Free-text description of the entity used for disambiguation when similar names exist.
* @return Reference to {@code this} so that method calls can be chained together.
@@ -218,7 +262,8 @@ public _FinalStage entityType(Optional entityType) {
@java.lang.Override
public CreateEntityRequest build() {
- return new CreateEntityRequest(name, entityType, description, additionalAttributes, additionalProperties);
+ return new CreateEntityRequest(
+ name, entityType, description, externalEntityId, additionalAttributes, additionalProperties);
}
@java.lang.Override
diff --git a/src/main/java/com/newscatcher/catchall/types/EntityResponse.java b/src/main/java/com/newscatcher/catchall/types/EntityResponse.java
index f1b4ed6..c6fa4fa 100644
--- a/src/main/java/com/newscatcher/catchall/types/EntityResponse.java
+++ b/src/main/java/com/newscatcher/catchall/types/EntityResponse.java
@@ -35,6 +35,8 @@ public final class EntityResponse {
private final Optional description;
+ private final Optional externalEntityId;
+
private final Optional additionalAttributes;
private final EntityStatus status;
@@ -53,6 +55,7 @@ private EntityResponse(
String organizationId,
String name,
Optional description,
+ Optional externalEntityId,
Optional additionalAttributes,
EntityStatus status,
Optional createdByUserId,
@@ -64,6 +67,7 @@ private EntityResponse(
this.organizationId = organizationId;
this.name = name;
this.description = description;
+ this.externalEntityId = externalEntityId;
this.additionalAttributes = additionalAttributes;
this.status = status;
this.createdByUserId = createdByUserId;
@@ -112,6 +116,17 @@ public Optional getDescription() {
return description;
}
+ /**
+ * @return External identifier for this entity. Null when not set.
+ */
+ @JsonIgnore
+ public Optional getExternalEntityId() {
+ if (externalEntityId == null) {
+ return Optional.empty();
+ }
+ return externalEntityId;
+ }
+
@JsonProperty("additional_attributes")
public Optional getAdditionalAttributes() {
return additionalAttributes;
@@ -152,6 +167,12 @@ private Optional _getDescription() {
return description;
}
+ @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class)
+ @JsonProperty("external_entity_id")
+ private Optional _getExternalEntityId() {
+ return externalEntityId;
+ }
+
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
@@ -169,6 +190,7 @@ private boolean equalTo(EntityResponse other) {
&& organizationId.equals(other.organizationId)
&& name.equals(other.name)
&& description.equals(other.description)
+ && externalEntityId.equals(other.externalEntityId)
&& additionalAttributes.equals(other.additionalAttributes)
&& status.equals(other.status)
&& createdByUserId.equals(other.createdByUserId)
@@ -184,6 +206,7 @@ public int hashCode() {
this.organizationId,
this.name,
this.description,
+ this.externalEntityId,
this.additionalAttributes,
this.status,
this.createdByUserId,
@@ -247,6 +270,15 @@ public interface _FinalStage {
_FinalStage description(Nullable description);
+ /**
+ * External identifier for this entity. Null when not set.
+ */
+ _FinalStage externalEntityId(Optional externalEntityId);
+
+ _FinalStage externalEntityId(String externalEntityId);
+
+ _FinalStage externalEntityId(Nullable externalEntityId);
+
_FinalStage additionalAttributes(Optional additionalAttributes);
_FinalStage additionalAttributes(AdditionalAttributes additionalAttributes);
@@ -294,6 +326,8 @@ public static final class Builder
private Optional additionalAttributes = Optional.empty();
+ private Optional externalEntityId = Optional.empty();
+
private Optional description = Optional.empty();
@JsonAnySetter
@@ -308,6 +342,7 @@ public Builder from(EntityResponse other) {
organizationId(other.getOrganizationId());
name(other.getName());
description(other.getDescription());
+ externalEntityId(other.getExternalEntityId());
additionalAttributes(other.getAdditionalAttributes());
status(other.getStatus());
createdByUserId(other.getCreatedByUserId());
@@ -439,6 +474,42 @@ public _FinalStage additionalAttributes(Optional additiona
return this;
}
+ /**
+ * External identifier for this entity. Null when not set.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage externalEntityId(Nullable externalEntityId) {
+ if (externalEntityId.isNull()) {
+ this.externalEntityId = null;
+ } else if (externalEntityId.isEmpty()) {
+ this.externalEntityId = Optional.empty();
+ } else {
+ this.externalEntityId = Optional.of(externalEntityId.get());
+ }
+ return this;
+ }
+
+ /**
+ * External identifier for this entity. Null when not set.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage externalEntityId(String externalEntityId) {
+ this.externalEntityId = Optional.ofNullable(externalEntityId);
+ return this;
+ }
+
+ /**
+ * External identifier for this entity. Null when not set.
+ */
+ @java.lang.Override
+ @JsonSetter(value = "external_entity_id", nulls = Nulls.SKIP)
+ public _FinalStage externalEntityId(Optional externalEntityId) {
+ this.externalEntityId = externalEntityId;
+ return this;
+ }
+
/**
* Free-text description.
* @return Reference to {@code this} so that method calls can be chained together.
@@ -483,6 +554,7 @@ public EntityResponse build() {
organizationId,
name,
description,
+ externalEntityId,
additionalAttributes,
status,
createdByUserId,
diff --git a/src/main/java/com/newscatcher/catchall/types/EntitySummary.java b/src/main/java/com/newscatcher/catchall/types/EntitySummary.java
index e604c76..17e7b54 100644
--- a/src/main/java/com/newscatcher/catchall/types/EntitySummary.java
+++ b/src/main/java/com/newscatcher/catchall/types/EntitySummary.java
@@ -34,6 +34,8 @@ public final class EntitySummary {
private final Optional description;
+ private final Optional externalEntityId;
+
private final Optional attributes;
private final Map additionalProperties;
@@ -44,6 +46,7 @@ private EntitySummary(
EntityType entityType,
EntityStatus status,
Optional description,
+ Optional externalEntityId,
Optional attributes,
Map additionalProperties) {
this.id = id;
@@ -51,6 +54,7 @@ private EntitySummary(
this.entityType = entityType;
this.status = status;
this.description = description;
+ this.externalEntityId = externalEntityId;
this.attributes = attributes;
this.additionalProperties = additionalProperties;
}
@@ -92,6 +96,17 @@ public Optional getDescription() {
return description;
}
+ /**
+ * @return External identifier for this entity. Null when not set.
+ */
+ @JsonIgnore
+ public Optional getExternalEntityId() {
+ if (externalEntityId == null) {
+ return Optional.empty();
+ }
+ return externalEntityId;
+ }
+
@JsonProperty("attributes")
public Optional getAttributes() {
return attributes;
@@ -103,6 +118,12 @@ private Optional _getDescription() {
return description;
}
+ @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class)
+ @JsonProperty("external_entity_id")
+ private Optional _getExternalEntityId() {
+ return externalEntityId;
+ }
+
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
@@ -120,12 +141,20 @@ private boolean equalTo(EntitySummary other) {
&& entityType.equals(other.entityType)
&& status.equals(other.status)
&& description.equals(other.description)
+ && externalEntityId.equals(other.externalEntityId)
&& attributes.equals(other.attributes);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.id, this.name, this.entityType, this.status, this.description, this.attributes);
+ return Objects.hash(
+ this.id,
+ this.name,
+ this.entityType,
+ this.status,
+ this.description,
+ this.externalEntityId,
+ this.attributes);
}
@java.lang.Override
@@ -177,6 +206,15 @@ public interface _FinalStage {
_FinalStage description(Nullable description);
+ /**
+ * External identifier for this entity. Null when not set.
+ */
+ _FinalStage externalEntityId(Optional externalEntityId);
+
+ _FinalStage externalEntityId(String externalEntityId);
+
+ _FinalStage externalEntityId(Nullable externalEntityId);
+
_FinalStage attributes(Optional attributes);
_FinalStage attributes(CompanyAttributes attributes);
@@ -194,6 +232,8 @@ public static final class Builder implements IdStage, NameStage, EntityTypeStage
private Optional attributes = Optional.empty();
+ private Optional externalEntityId = Optional.empty();
+
private Optional description = Optional.empty();
@JsonAnySetter
@@ -208,6 +248,7 @@ public Builder from(EntitySummary other) {
entityType(other.getEntityType());
status(other.getStatus());
description(other.getDescription());
+ externalEntityId(other.getExternalEntityId());
attributes(other.getAttributes());
return this;
}
@@ -263,6 +304,42 @@ public _FinalStage attributes(Optional attributes) {
return this;
}
+ /**
+ * External identifier for this entity. Null when not set.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage externalEntityId(Nullable externalEntityId) {
+ if (externalEntityId.isNull()) {
+ this.externalEntityId = null;
+ } else if (externalEntityId.isEmpty()) {
+ this.externalEntityId = Optional.empty();
+ } else {
+ this.externalEntityId = Optional.of(externalEntityId.get());
+ }
+ return this;
+ }
+
+ /**
+ * External identifier for this entity. Null when not set.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage externalEntityId(String externalEntityId) {
+ this.externalEntityId = Optional.ofNullable(externalEntityId);
+ return this;
+ }
+
+ /**
+ * External identifier for this entity. Null when not set.
+ */
+ @java.lang.Override
+ @JsonSetter(value = "external_entity_id", nulls = Nulls.SKIP)
+ public _FinalStage externalEntityId(Optional externalEntityId) {
+ this.externalEntityId = externalEntityId;
+ return this;
+ }
+
/**
* Free-text description.
* @return Reference to {@code this} so that method calls can be chained together.
@@ -301,7 +378,8 @@ public _FinalStage description(Optional description) {
@java.lang.Override
public EntitySummary build() {
- return new EntitySummary(id, name, entityType, status, description, attributes, additionalProperties);
+ return new EntitySummary(
+ id, name, entityType, status, description, externalEntityId, attributes, additionalProperties);
}
@java.lang.Override
diff --git a/src/main/java/com/newscatcher/catchall/types/PullJobResponseDto.java b/src/main/java/com/newscatcher/catchall/types/PullJobResponseDto.java
index 0b3ac05..a2bd9b4 100644
--- a/src/main/java/com/newscatcher/catchall/types/PullJobResponseDto.java
+++ b/src/main/java/com/newscatcher/catchall/types/PullJobResponseDto.java
@@ -59,6 +59,10 @@ public final class PullJobResponseDto {
private final Optional mode;
+ private final Optional> connectedDatasets;
+
+ private final Optional isAllNewsQuery;
+
private final Optional sharingInfo;
private final Optional> allRecords;
@@ -83,6 +87,8 @@ private PullJobResponseDto(
Optional pageSize,
Optional totalPages,
Optional mode,
+ Optional> connectedDatasets,
+ Optional isAllNewsQuery,
Optional sharingInfo,
Optional> allRecords,
Map additionalProperties) {
@@ -103,6 +109,8 @@ private PullJobResponseDto(
this.pageSize = pageSize;
this.totalPages = totalPages;
this.mode = mode;
+ this.connectedDatasets = connectedDatasets;
+ this.isAllNewsQuery = isAllNewsQuery;
this.sharingInfo = sharingInfo;
this.allRecords = allRecords;
this.additionalProperties = additionalProperties;
@@ -248,6 +256,22 @@ public Optional getMode() {
return mode;
}
+ /**
+ * @return Datasets used to narrow retrieval scope, each with id and name.
+ */
+ @JsonProperty("connected_datasets")
+ public Optional> getConnectedDatasets() {
+ return connectedDatasets;
+ }
+
+ /**
+ * @return True when the query was submitted as an all-news (watchlist-generic) query.
+ */
+ @JsonProperty("is_all_news_query")
+ public Optional getIsAllNewsQuery() {
+ return isAllNewsQuery;
+ }
+
/**
* @return Present when the job was shared with the authenticated user by another organization member. null when the user owns the job.
*/
@@ -314,6 +338,8 @@ private boolean equalTo(PullJobResponseDto other) {
&& pageSize.equals(other.pageSize)
&& totalPages.equals(other.totalPages)
&& mode.equals(other.mode)
+ && connectedDatasets.equals(other.connectedDatasets)
+ && isAllNewsQuery.equals(other.isAllNewsQuery)
&& sharingInfo.equals(other.sharingInfo)
&& allRecords.equals(other.allRecords);
}
@@ -338,6 +364,8 @@ public int hashCode() {
this.pageSize,
this.totalPages,
this.mode,
+ this.connectedDatasets,
+ this.isAllNewsQuery,
this.sharingInfo,
this.allRecords);
}
@@ -481,6 +509,20 @@ public interface _FinalStage {
_FinalStage mode(PullJobResponseDtoMode mode);
+ /**
+ * Datasets used to narrow retrieval scope, each with id and name.
+ */
+ _FinalStage connectedDatasets(Optional> connectedDatasets);
+
+ _FinalStage connectedDatasets(List connectedDatasets);
+
+ /**
+ * True when the query was submitted as an all-news (watchlist-generic) query.
+ */
+ _FinalStage isAllNewsQuery(Optional isAllNewsQuery);
+
+ _FinalStage isAllNewsQuery(Boolean isAllNewsQuery);
+
/**
* Present when the job was shared with the authenticated user by another organization member. null when the user owns the job.
*/
@@ -506,6 +548,10 @@ public static final class Builder implements JobIdStage, _FinalStage {
private Optional sharingInfo = Optional.empty();
+ private Optional isAllNewsQuery = Optional.empty();
+
+ private Optional> connectedDatasets = Optional.empty();
+
private Optional mode = Optional.empty();
private Optional totalPages = Optional.empty();
@@ -562,6 +608,8 @@ public Builder from(PullJobResponseDto other) {
pageSize(other.getPageSize());
totalPages(other.getTotalPages());
mode(other.getMode());
+ connectedDatasets(other.getConnectedDatasets());
+ isAllNewsQuery(other.getIsAllNewsQuery());
sharingInfo(other.getSharingInfo());
allRecords(other.getAllRecords());
return this;
@@ -635,6 +683,46 @@ public _FinalStage sharingInfo(Optional sharingInfo) {
return this;
}
+ /**
+ * True when the query was submitted as an all-news (watchlist-generic) query.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage isAllNewsQuery(Boolean isAllNewsQuery) {
+ this.isAllNewsQuery = Optional.ofNullable(isAllNewsQuery);
+ return this;
+ }
+
+ /**
+ * True when the query was submitted as an all-news (watchlist-generic) query.
+ */
+ @java.lang.Override
+ @JsonSetter(value = "is_all_news_query", nulls = Nulls.SKIP)
+ public _FinalStage isAllNewsQuery(Optional isAllNewsQuery) {
+ this.isAllNewsQuery = isAllNewsQuery;
+ return this;
+ }
+
+ /**
+ * Datasets used to narrow retrieval scope, each with id and name.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage connectedDatasets(List connectedDatasets) {
+ this.connectedDatasets = Optional.ofNullable(connectedDatasets);
+ return this;
+ }
+
+ /**
+ * Datasets used to narrow retrieval scope, each with id and name.
+ */
+ @java.lang.Override
+ @JsonSetter(value = "connected_datasets", nulls = Nulls.SKIP)
+ public _FinalStage connectedDatasets(Optional> connectedDatasets) {
+ this.connectedDatasets = connectedDatasets;
+ return this;
+ }
+
/**
* Processing mode used for this job.
* @return Reference to {@code this} so that method calls can be chained together.
@@ -1003,6 +1091,8 @@ public PullJobResponseDto build() {
pageSize,
totalPages,
mode,
+ connectedDatasets,
+ isAllNewsQuery,
sharingInfo,
allRecords,
additionalProperties);
diff --git a/src/main/java/com/newscatcher/catchall/types/PullMonitorResponseDto.java b/src/main/java/com/newscatcher/catchall/types/PullMonitorResponseDto.java
index efcb3dd..94eeb60 100644
--- a/src/main/java/com/newscatcher/catchall/types/PullMonitorResponseDto.java
+++ b/src/main/java/com/newscatcher/catchall/types/PullMonitorResponseDto.java
@@ -43,6 +43,10 @@ public final class PullMonitorResponseDto {
private final Optional limit;
+ private final Optional> connectedDatasets;
+
+ private final Optional isAllNewsQuery;
+
private final Map additionalProperties;
private PullMonitorResponseDto(
@@ -55,6 +59,8 @@ private PullMonitorResponseDto(
String status,
Optional> allRecords,
Optional limit,
+ Optional> connectedDatasets,
+ Optional isAllNewsQuery,
Map additionalProperties) {
this.monitorId = monitorId;
this.cronExpression = cronExpression;
@@ -65,6 +71,8 @@ private PullMonitorResponseDto(
this.status = status;
this.allRecords = allRecords;
this.limit = limit;
+ this.connectedDatasets = connectedDatasets;
+ this.isAllNewsQuery = isAllNewsQuery;
this.additionalProperties = additionalProperties;
}
@@ -141,6 +149,22 @@ public Optional getLimit() {
return limit;
}
+ /**
+ * @return Datasets used to narrow retrieval scope, each with id and name.
+ */
+ @JsonProperty("connected_datasets")
+ public Optional> getConnectedDatasets() {
+ return connectedDatasets;
+ }
+
+ /**
+ * @return True when the reference job was submitted as an all-news (watchlist-generic) query.
+ */
+ @JsonProperty("is_all_news_query")
+ public Optional getIsAllNewsQuery() {
+ return isAllNewsQuery;
+ }
+
@JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class)
@JsonProperty("limit")
private Optional _getLimit() {
@@ -167,7 +191,9 @@ private boolean equalTo(PullMonitorResponseDto other) {
&& records.equals(other.records)
&& status.equals(other.status)
&& allRecords.equals(other.allRecords)
- && limit.equals(other.limit);
+ && limit.equals(other.limit)
+ && connectedDatasets.equals(other.connectedDatasets)
+ && isAllNewsQuery.equals(other.isAllNewsQuery);
}
@java.lang.Override
@@ -181,7 +207,9 @@ public int hashCode() {
this.records,
this.status,
this.allRecords,
- this.limit);
+ this.limit,
+ this.connectedDatasets,
+ this.isAllNewsQuery);
}
@java.lang.Override
@@ -264,6 +292,20 @@ public interface _FinalStage {
_FinalStage limit(Integer limit);
_FinalStage limit(Nullable limit);
+
+ /**
+ * Datasets used to narrow retrieval scope, each with id and name.
+ */
+ _FinalStage connectedDatasets(Optional> connectedDatasets);
+
+ _FinalStage connectedDatasets(List connectedDatasets);
+
+ /**
+ * True when the reference job was submitted as an all-news (watchlist-generic) query.
+ */
+ _FinalStage isAllNewsQuery(Optional isAllNewsQuery);
+
+ _FinalStage isAllNewsQuery(Boolean isAllNewsQuery);
}
@JsonIgnoreProperties(ignoreUnknown = true)
@@ -274,6 +316,10 @@ public static final class Builder implements MonitorIdStage, ReferenceJobStage,
private String status;
+ private Optional isAllNewsQuery = Optional.empty();
+
+ private Optional> connectedDatasets = Optional.empty();
+
private Optional limit = Optional.empty();
private Optional> allRecords = Optional.empty();
@@ -302,6 +348,8 @@ public Builder from(PullMonitorResponseDto other) {
status(other.getStatus());
allRecords(other.getAllRecords());
limit(other.getLimit());
+ connectedDatasets(other.getConnectedDatasets());
+ isAllNewsQuery(other.getIsAllNewsQuery());
return this;
}
@@ -336,6 +384,46 @@ public _FinalStage status(@NotNull String status) {
return this;
}
+ /**
+ * True when the reference job was submitted as an all-news (watchlist-generic) query.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage isAllNewsQuery(Boolean isAllNewsQuery) {
+ this.isAllNewsQuery = Optional.ofNullable(isAllNewsQuery);
+ return this;
+ }
+
+ /**
+ * True when the reference job was submitted as an all-news (watchlist-generic) query.
+ */
+ @java.lang.Override
+ @JsonSetter(value = "is_all_news_query", nulls = Nulls.SKIP)
+ public _FinalStage isAllNewsQuery(Optional isAllNewsQuery) {
+ this.isAllNewsQuery = isAllNewsQuery;
+ return this;
+ }
+
+ /**
+ * Datasets used to narrow retrieval scope, each with id and name.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage connectedDatasets(List connectedDatasets) {
+ this.connectedDatasets = Optional.ofNullable(connectedDatasets);
+ return this;
+ }
+
+ /**
+ * Datasets used to narrow retrieval scope, each with id and name.
+ */
+ @java.lang.Override
+ @JsonSetter(value = "connected_datasets", nulls = Nulls.SKIP)
+ public _FinalStage connectedDatasets(Optional> connectedDatasets) {
+ this.connectedDatasets = connectedDatasets;
+ return this;
+ }
+
/**
* Record limit applied to this monitor's jobs.
* @return Reference to {@code this} so that method calls can be chained together.
@@ -486,6 +574,8 @@ public PullMonitorResponseDto build() {
status,
allRecords,
limit,
+ connectedDatasets,
+ isAllNewsQuery,
additionalProperties);
}
From b2f74e52882811df6a3cf56ac904b9a30ceb9de7 Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 24 Jun 2026 15:58:11 +0000
Subject: [PATCH 2/2] [fern-autoversion] SDK regeneration
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
🌿 Generated with Fern
---
.fern/metadata.json | 2 +-
README.md | 4 ++--
build.gradle | 4 ++--
.../java/com/newscatcher/catchall/core/ClientOptions.java | 4 ++--
4 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/.fern/metadata.json b/.fern/metadata.json
index 4f36d10..31605b2 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -12,5 +12,5 @@
"invokedBy": "ci",
"requestedVersion": "AUTO",
"ciProvider": "unknown",
- "sdkVersion": "0.0.0-fern-placeholder"
+ "sdkVersion": "3.0.2"
}
\ No newline at end of file
diff --git a/README.md b/README.md
index 666da34..f5d0480 100644
--- a/README.md
+++ b/README.md
@@ -35,7 +35,7 @@ Add the dependency in your `build.gradle` file:
```groovy
dependencies {
- implementation 'com.newscatcherapi:newscatcher-catchall-sdk:0.0.0-fern-placeholder'
+ implementation 'com.newscatcherapi:newscatcher-catchall-sdk:3.0.2'
}
```
@@ -47,7 +47,7 @@ Add the dependency in your `pom.xml` file:
com.newscatcherapi
newscatcher-catchall-sdk
- 0.0.0-fern-placeholder
+ 3.0.2
```
diff --git a/build.gradle b/build.gradle
index e611a96..45412c6 100644
--- a/build.gradle
+++ b/build.gradle
@@ -47,7 +47,7 @@ java {
group = 'com.newscatcherapi'
-version = '0.0.0-fern-placeholder'
+version = '3.0.2'
jar {
dependsOn(":generatePomFileForMavenPublication")
@@ -78,7 +78,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.newscatcherapi'
artifactId = 'newscatcher-catchall-sdk'
- version = '0.0.0-fern-placeholder'
+ version = '3.0.2'
from components.java
pom {
name = 'newscatcher'
diff --git a/src/main/java/com/newscatcher/catchall/core/ClientOptions.java b/src/main/java/com/newscatcher/catchall/core/ClientOptions.java
index 897675d..a903af7 100644
--- a/src/main/java/com/newscatcher/catchall/core/ClientOptions.java
+++ b/src/main/java/com/newscatcher/catchall/core/ClientOptions.java
@@ -38,10 +38,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap() {
{
- put("User-Agent", "com.newscatcherapi:newscatcher-catchall-sdk/0.0.0-fern-placeholder");
+ put("User-Agent", "com.newscatcherapi:newscatcher-catchall-sdk/3.0.2");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.newscatcher.fern:api-sdk");
- put("X-Fern-SDK-Version", "0.0.0-fern-placeholder");
+ put("X-Fern-SDK-Version", "3.0.2");
}
});
this.headerSuppliers = headerSuppliers;