From 912a5e595cc96548cc82478b1cda7717a266cbc1 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 12:30:16 +0000 Subject: [PATCH 1/2] [fern-generated] Update SDK Generated by Fern CLI Version: unknown Generators: - fernapi/fern-java-sdk: 4.9.2 --- .fern/metadata.json | 13 +- README.md | 5 +- build.gradle | 4 +- reference.md | 43 +++++++ .../catchall/core/ClientOptions.java | 4 +- .../datasets/AsyncRawDatasetsClient.java | 8 +- .../resources/datasets/RawDatasetsClient.java | 8 +- .../jobs/requests/InitializeRequestDto.java | 104 +++++++++++++++- .../jobs/requests/SubmitRequestDto.java | 111 +++++++++++++++++- .../catchall/types/ConnectedEntity.java | 49 +++++++- .../catchall/types/EntityAssociationType.java | 85 ++++++++++++++ 11 files changed, 406 insertions(+), 28 deletions(-) create mode 100644 src/main/java/com/newscatcher/catchall/types/EntityAssociationType.java diff --git a/.fern/metadata.json b/.fern/metadata.json index 61cfdde..293e3fd 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,15 +1,16 @@ { - "cliVersion": "5.38.0", + "cliVersion": "5.45.3", "generatorName": "fernapi/fern-java-sdk", - "generatorVersion": "4.8.11", + "generatorVersion": "4.9.2", "generatorConfig": { "publish-to": "central", "client-class-name": "CatchAllApi", "package-prefix": "com.newscatcher.catchall" }, - "originGitCommit": "5c18e5b13a9cc97f8ccdc7b91a6cd7b6f13ad6f4", + "originGitCommit": "56ea60da11c1b8d90274a137f5fbc3bb89b9fac4", "originGitCommitIsDirty": true, - "invokedBy": "manual", - "requestedVersion": "3.0.0", - "sdkVersion": "3.0.0" + "invokedBy": "ci", + "requestedVersion": "AUTO", + "ciProvider": "unknown", + "sdkVersion": "0.0.0-fern-placeholder" } \ No newline at end of file diff --git a/README.md b/README.md index 6eff517..21ad583 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.0' + 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.0 + 0.0.0-fern-placeholder ``` @@ -263,3 +263,4 @@ On the other hand, contributions to the README are always very welcome! + diff --git a/build.gradle b/build.gradle index 275971a..e611a96 100644 --- a/build.gradle +++ b/build.gradle @@ -47,7 +47,7 @@ java { group = 'com.newscatcherapi' -version = '3.0.0' +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.0' + version = '0.0.0-fern-placeholder' from components.java pom { name = 'newscatcher' diff --git a/reference.md b/reference.md index d51582c..195040c 100644 --- a/reference.md +++ b/reference.md @@ -210,6 +210,25 @@ client.jobs().initialize( **context:** `Optional` + + + +
+
+ +**connectedDatasetIds:** `Optional>` — Optional list of watchlist dataset IDs connected to this job. + +
+
+ +
+
+ +**fetchAllWatchlistNews:** `Optional` + +When true, returns generic news validators and enrichments suitable for +watchlist-based article collection instead of query-specific fields. +
@@ -383,6 +402,30 @@ Only valid when `connected_dataset_ids` is set; otherwise ignored. Records where **webhookIds:** `Optional>` — IDs of webhooks to notify when the job completes. Maximum 5 per job. + + + +
+
+ +**fetchAllWatchlistNews:** `Optional` + +When true, retrieves all news for connected Company Watchlist entities +without topic filtering. Requires connected_dataset_ids to be set. + +
+
+ +
+
+ +**edAssociationType:** `Optional` + +Filter events by entity association type. `event_associated` keeps only +events where the entity is a direct actor. `mention` keeps only events +where the entity is merely referenced. Only relevant when +connected_dataset_ids is set. +
diff --git a/src/main/java/com/newscatcher/catchall/core/ClientOptions.java b/src/main/java/com/newscatcher/catchall/core/ClientOptions.java index b35cc85..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.0"); + 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.0"); + put("X-Fern-SDK-Version", "0.0.0-fern-placeholder"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/com/newscatcher/catchall/resources/datasets/AsyncRawDatasetsClient.java b/src/main/java/com/newscatcher/catchall/resources/datasets/AsyncRawDatasetsClient.java index 5f878f0..acc2ceb 100644 --- a/src/main/java/com/newscatcher/catchall/resources/datasets/AsyncRawDatasetsClient.java +++ b/src/main/java/com/newscatcher/catchall/resources/datasets/AsyncRawDatasetsClient.java @@ -392,7 +392,7 @@ public CompletableFuture> crea Request.Builder _requestBuilder = new Request.Builder(); _requestBuilder.url(httpUrl.build()); _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(null))); + _requestBuilder.headers(Headers.of(this.clientOptions.headers((RequestOptions) null))); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); CompletableFuture> future = new CompletableFuture<>(); @@ -453,7 +453,7 @@ public CompletableFuture> crea Request.Builder _requestBuilder = new Request.Builder(); _requestBuilder.url(httpUrl.build()); _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(null))); + _requestBuilder.headers(Headers.of(this.clientOptions.headers((RequestOptions) null))); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); CompletableFuture> future = new CompletableFuture<>(); @@ -1439,7 +1439,7 @@ public CompletableFuture> up Request.Builder _requestBuilder = new Request.Builder(); _requestBuilder.url(httpUrl.build()); _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(null))); + _requestBuilder.headers(Headers.of(this.clientOptions.headers((RequestOptions) null))); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); CompletableFuture> future = new CompletableFuture<>(); @@ -1508,7 +1508,7 @@ public CompletableFuture> up Request.Builder _requestBuilder = new Request.Builder(); _requestBuilder.url(httpUrl.build()); _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(null))); + _requestBuilder.headers(Headers.of(this.clientOptions.headers((RequestOptions) null))); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); CompletableFuture> future = new CompletableFuture<>(); diff --git a/src/main/java/com/newscatcher/catchall/resources/datasets/RawDatasetsClient.java b/src/main/java/com/newscatcher/catchall/resources/datasets/RawDatasetsClient.java index 5657b94..0fa7b2b 100644 --- a/src/main/java/com/newscatcher/catchall/resources/datasets/RawDatasetsClient.java +++ b/src/main/java/com/newscatcher/catchall/resources/datasets/RawDatasetsClient.java @@ -335,7 +335,7 @@ public CatchAllApiHttpResponse createDatasetFromCsv(In Request.Builder _requestBuilder = new Request.Builder(); _requestBuilder.url(httpUrl.build()); _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(null))); + _requestBuilder.headers(Headers.of(this.clientOptions.headers((RequestOptions) null))); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); try (Response response = client.newCall(okhttpRequest).execute()) { @@ -379,7 +379,7 @@ public CatchAllApiHttpResponse createDatasetFromCsv( Request.Builder _requestBuilder = new Request.Builder(); _requestBuilder.url(httpUrl.build()); _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(null))); + _requestBuilder.headers(Headers.of(this.clientOptions.headers((RequestOptions) null))); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); try (Response response = client.newCall(okhttpRequest).execute()) { @@ -1155,7 +1155,7 @@ public CatchAllApiHttpResponse uploadCsvToDataset( Request.Builder _requestBuilder = new Request.Builder(); _requestBuilder.url(httpUrl.build()); _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(null))); + _requestBuilder.headers(Headers.of(this.clientOptions.headers((RequestOptions) null))); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); try (Response response = client.newCall(okhttpRequest).execute()) { @@ -1204,7 +1204,7 @@ public CatchAllApiHttpResponse uploadCsvToDataset( Request.Builder _requestBuilder = new Request.Builder(); _requestBuilder.url(httpUrl.build()); _requestBuilder.method("POST", body); - _requestBuilder.headers(Headers.of(this.clientOptions.headers(null))); + _requestBuilder.headers(Headers.of(this.clientOptions.headers((RequestOptions) null))); Request okhttpRequest = _requestBuilder.build(); OkHttpClient client = clientOptions.httpClient(); try (Response response = client.newCall(okhttpRequest).execute()) { diff --git a/src/main/java/com/newscatcher/catchall/resources/jobs/requests/InitializeRequestDto.java b/src/main/java/com/newscatcher/catchall/resources/jobs/requests/InitializeRequestDto.java index eca197c..af82c3b 100644 --- a/src/main/java/com/newscatcher/catchall/resources/jobs/requests/InitializeRequestDto.java +++ b/src/main/java/com/newscatcher/catchall/resources/jobs/requests/InitializeRequestDto.java @@ -13,6 +13,7 @@ import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.newscatcher.catchall.core.ObjectMappers; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; @@ -25,11 +26,22 @@ public final class InitializeRequestDto { private final Optional context; + private final Optional> connectedDatasetIds; + + private final Optional fetchAllWatchlistNews; + private final Map additionalProperties; - private InitializeRequestDto(String query, Optional context, Map additionalProperties) { + private InitializeRequestDto( + String query, + Optional context, + Optional> connectedDatasetIds, + Optional fetchAllWatchlistNews, + Map additionalProperties) { this.query = query; this.context = context; + this.connectedDatasetIds = connectedDatasetIds; + this.fetchAllWatchlistNews = fetchAllWatchlistNews; this.additionalProperties = additionalProperties; } @@ -43,6 +55,23 @@ public Optional getContext() { return context; } + /** + * @return Optional list of watchlist dataset IDs connected to this job. + */ + @JsonProperty("connected_dataset_ids") + public Optional> getConnectedDatasetIds() { + return connectedDatasetIds; + } + + /** + * @return When true, returns generic news validators and enrichments suitable for + * watchlist-based article collection instead of query-specific fields. + */ + @JsonProperty("fetch_all_watchlist_news") + public Optional getFetchAllWatchlistNews() { + return fetchAllWatchlistNews; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -55,12 +84,15 @@ public Map getAdditionalProperties() { } private boolean equalTo(InitializeRequestDto other) { - return query.equals(other.query) && context.equals(other.context); + return query.equals(other.query) + && context.equals(other.context) + && connectedDatasetIds.equals(other.connectedDatasetIds) + && fetchAllWatchlistNews.equals(other.fetchAllWatchlistNews); } @java.lang.Override public int hashCode() { - return Objects.hash(this.query, this.context); + return Objects.hash(this.query, this.context, this.connectedDatasetIds, this.fetchAllWatchlistNews); } @java.lang.Override @@ -88,12 +120,31 @@ public interface _FinalStage { _FinalStage context(Optional context); _FinalStage context(String context); + + /** + *

Optional list of watchlist dataset IDs connected to this job.

+ */ + _FinalStage connectedDatasetIds(Optional> connectedDatasetIds); + + _FinalStage connectedDatasetIds(List connectedDatasetIds); + + /** + *

When true, returns generic news validators and enrichments suitable for + * watchlist-based article collection instead of query-specific fields.

+ */ + _FinalStage fetchAllWatchlistNews(Optional fetchAllWatchlistNews); + + _FinalStage fetchAllWatchlistNews(Boolean fetchAllWatchlistNews); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements QueryStage, _FinalStage { private String query; + private Optional fetchAllWatchlistNews = Optional.empty(); + + private Optional> connectedDatasetIds = Optional.empty(); + private Optional context = Optional.empty(); @JsonAnySetter @@ -105,6 +156,8 @@ private Builder() {} public Builder from(InitializeRequestDto other) { query(other.getQuery()); context(other.getContext()); + connectedDatasetIds(other.getConnectedDatasetIds()); + fetchAllWatchlistNews(other.getFetchAllWatchlistNews()); return this; } @@ -115,6 +168,48 @@ public _FinalStage query(@NotNull String query) { return this; } + /** + *

When true, returns generic news validators and enrichments suitable for + * watchlist-based article collection instead of query-specific fields.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage fetchAllWatchlistNews(Boolean fetchAllWatchlistNews) { + this.fetchAllWatchlistNews = Optional.ofNullable(fetchAllWatchlistNews); + return this; + } + + /** + *

When true, returns generic news validators and enrichments suitable for + * watchlist-based article collection instead of query-specific fields.

+ */ + @java.lang.Override + @JsonSetter(value = "fetch_all_watchlist_news", nulls = Nulls.SKIP) + public _FinalStage fetchAllWatchlistNews(Optional fetchAllWatchlistNews) { + this.fetchAllWatchlistNews = fetchAllWatchlistNews; + return this; + } + + /** + *

Optional list of watchlist dataset IDs connected to this job.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage connectedDatasetIds(List connectedDatasetIds) { + this.connectedDatasetIds = Optional.ofNullable(connectedDatasetIds); + return this; + } + + /** + *

Optional list of watchlist dataset IDs connected to this job.

+ */ + @java.lang.Override + @JsonSetter(value = "connected_dataset_ids", nulls = Nulls.SKIP) + public _FinalStage connectedDatasetIds(Optional> connectedDatasetIds) { + this.connectedDatasetIds = connectedDatasetIds; + return this; + } + @java.lang.Override public _FinalStage context(String context) { this.context = Optional.ofNullable(context); @@ -130,7 +225,8 @@ public _FinalStage context(Optional context) { @java.lang.Override public InitializeRequestDto build() { - return new InitializeRequestDto(query, context, additionalProperties); + return new InitializeRequestDto( + query, context, connectedDatasetIds, fetchAllWatchlistNews, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/newscatcher/catchall/resources/jobs/requests/SubmitRequestDto.java b/src/main/java/com/newscatcher/catchall/resources/jobs/requests/SubmitRequestDto.java index f6fdfd0..f1549fb 100644 --- a/src/main/java/com/newscatcher/catchall/resources/jobs/requests/SubmitRequestDto.java +++ b/src/main/java/com/newscatcher/catchall/resources/jobs/requests/SubmitRequestDto.java @@ -14,6 +14,7 @@ import com.newscatcher.catchall.core.ObjectMappers; import com.newscatcher.catchall.resources.jobs.types.SubmitRequestDtoMode; import com.newscatcher.catchall.types.EnrichmentSchema; +import com.newscatcher.catchall.types.EntityAssociationType; import com.newscatcher.catchall.types.ValidatorSchema; import java.time.OffsetDateTime; import java.util.HashMap; @@ -50,6 +51,10 @@ public final class SubmitRequestDto { private final Optional> webhookIds; + private final Optional fetchAllWatchlistNews; + + private final Optional edAssociationType; + private final Map additionalProperties; private SubmitRequestDto( @@ -65,6 +70,8 @@ private SubmitRequestDto( Optional edScoreMin, Optional projectId, Optional> webhookIds, + Optional fetchAllWatchlistNews, + Optional edAssociationType, Map additionalProperties) { this.query = query; this.context = context; @@ -78,6 +85,8 @@ private SubmitRequestDto( this.edScoreMin = edScoreMin; this.projectId = projectId; this.webhookIds = webhookIds; + this.fetchAllWatchlistNews = fetchAllWatchlistNews; + this.edAssociationType = edAssociationType; this.additionalProperties = additionalProperties; } @@ -170,6 +179,26 @@ public Optional> getWebhookIds() { return webhookIds; } + /** + * @return When true, retrieves all news for connected Company Watchlist entities + * without topic filtering. Requires connected_dataset_ids to be set. + */ + @JsonProperty("fetch_all_watchlist_news") + public Optional getFetchAllWatchlistNews() { + return fetchAllWatchlistNews; + } + + /** + * @return Filter events by entity association type. event_associated keeps only + * events where the entity is a direct actor. mention keeps only events + * where the entity is merely referenced. Only relevant when + * connected_dataset_ids is set. + */ + @JsonProperty("ed_association_type") + public Optional getEdAssociationType() { + return edAssociationType; + } + @java.lang.Override public boolean equals(Object other) { if (this == other) return true; @@ -193,7 +222,9 @@ private boolean equalTo(SubmitRequestDto other) { && connectedDatasetIds.equals(other.connectedDatasetIds) && edScoreMin.equals(other.edScoreMin) && projectId.equals(other.projectId) - && webhookIds.equals(other.webhookIds); + && webhookIds.equals(other.webhookIds) + && fetchAllWatchlistNews.equals(other.fetchAllWatchlistNews) + && edAssociationType.equals(other.edAssociationType); } @java.lang.Override @@ -210,7 +241,9 @@ public int hashCode() { this.connectedDatasetIds, this.edScoreMin, this.projectId, - this.webhookIds); + this.webhookIds, + this.fetchAllWatchlistNews, + this.edAssociationType); } @java.lang.Override @@ -307,12 +340,34 @@ public interface _FinalStage { _FinalStage webhookIds(Optional> webhookIds); _FinalStage webhookIds(List webhookIds); + + /** + *

When true, retrieves all news for connected Company Watchlist entities + * without topic filtering. Requires connected_dataset_ids to be set.

+ */ + _FinalStage fetchAllWatchlistNews(Optional fetchAllWatchlistNews); + + _FinalStage fetchAllWatchlistNews(Boolean fetchAllWatchlistNews); + + /** + *

Filter events by entity association type. event_associated keeps only + * events where the entity is a direct actor. mention keeps only events + * where the entity is merely referenced. Only relevant when + * connected_dataset_ids is set.

+ */ + _FinalStage edAssociationType(Optional edAssociationType); + + _FinalStage edAssociationType(EntityAssociationType edAssociationType); } @JsonIgnoreProperties(ignoreUnknown = true) public static final class Builder implements QueryStage, _FinalStage { private String query; + private Optional edAssociationType = Optional.empty(); + + private Optional fetchAllWatchlistNews = Optional.empty(); + private Optional> webhookIds = Optional.empty(); private Optional projectId = Optional.empty(); @@ -354,6 +409,8 @@ public Builder from(SubmitRequestDto other) { edScoreMin(other.getEdScoreMin()); projectId(other.getProjectId()); webhookIds(other.getWebhookIds()); + fetchAllWatchlistNews(other.getFetchAllWatchlistNews()); + edAssociationType(other.getEdAssociationType()); return this; } @@ -364,6 +421,54 @@ public _FinalStage query(@NotNull String query) { return this; } + /** + *

Filter events by entity association type. event_associated keeps only + * events where the entity is a direct actor. mention keeps only events + * where the entity is merely referenced. Only relevant when + * connected_dataset_ids is set.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage edAssociationType(EntityAssociationType edAssociationType) { + this.edAssociationType = Optional.ofNullable(edAssociationType); + return this; + } + + /** + *

Filter events by entity association type. event_associated keeps only + * events where the entity is a direct actor. mention keeps only events + * where the entity is merely referenced. Only relevant when + * connected_dataset_ids is set.

+ */ + @java.lang.Override + @JsonSetter(value = "ed_association_type", nulls = Nulls.SKIP) + public _FinalStage edAssociationType(Optional edAssociationType) { + this.edAssociationType = edAssociationType; + return this; + } + + /** + *

When true, retrieves all news for connected Company Watchlist entities + * without topic filtering. Requires connected_dataset_ids to be set.

+ * @return Reference to {@code this} so that method calls can be chained together. + */ + @java.lang.Override + public _FinalStage fetchAllWatchlistNews(Boolean fetchAllWatchlistNews) { + this.fetchAllWatchlistNews = Optional.ofNullable(fetchAllWatchlistNews); + return this; + } + + /** + *

When true, retrieves all news for connected Company Watchlist entities + * without topic filtering. Requires connected_dataset_ids to be set.

+ */ + @java.lang.Override + @JsonSetter(value = "fetch_all_watchlist_news", nulls = Nulls.SKIP) + public _FinalStage fetchAllWatchlistNews(Optional fetchAllWatchlistNews) { + this.fetchAllWatchlistNews = fetchAllWatchlistNews; + return this; + } + /** *

IDs 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. @@ -587,6 +692,8 @@ public SubmitRequestDto build() { edScoreMin, projectId, webhookIds, + fetchAllWatchlistNews, + edAssociationType, additionalProperties); } diff --git a/src/main/java/com/newscatcher/catchall/types/ConnectedEntity.java b/src/main/java/com/newscatcher/catchall/types/ConnectedEntity.java index 57f8063..ff6efea 100644 --- a/src/main/java/com/newscatcher/catchall/types/ConnectedEntity.java +++ b/src/main/java/com/newscatcher/catchall/types/ConnectedEntity.java @@ -29,6 +29,8 @@ public final class ConnectedEntity { private final String relation; + private final Optional associationType; + private final String type; private final Optional company; @@ -40,6 +42,7 @@ private ConnectedEntity( String name, int edScore, String relation, + Optional associationType, String type, Optional company, Map additionalProperties) { @@ -47,6 +50,7 @@ private ConnectedEntity( this.name = name; this.edScore = edScore; this.relation = relation; + this.associationType = associationType; this.type = type; this.company = company; this.additionalProperties = additionalProperties; @@ -90,6 +94,14 @@ public String getRelation() { return relation; } + /** + * @return How the entity relates to the event: event_associated if the entity is a direct actor, mention if merely referenced. + */ + @JsonProperty("association_type") + public Optional getAssociationType() { + return associationType; + } + /** * @return The entity type. */ @@ -123,13 +135,15 @@ private boolean equalTo(ConnectedEntity other) { && name.equals(other.name) && edScore == other.edScore && relation.equals(other.relation) + && associationType.equals(other.associationType) && type.equals(other.type) && company.equals(other.company); } @java.lang.Override public int hashCode() { - return Objects.hash(this.entityId, this.name, this.edScore, this.relation, this.type, this.company); + return Objects.hash( + this.entityId, this.name, this.edScore, this.relation, this.associationType, this.type, this.company); } @java.lang.Override @@ -191,6 +205,13 @@ public interface _FinalStage { _FinalStage additionalProperties(Map additionalProperties); + /** + *

How the entity relates to the event: event_associated if the entity is a direct actor, mention if merely referenced.

+ */ + _FinalStage associationType(Optional associationType); + + _FinalStage associationType(String associationType); + /** *

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.

@@ -215,6 +236,8 @@ public static final class Builder private Optional company = Optional.empty(); + private Optional associationType = Optional.empty(); + @JsonAnySetter private Map additionalProperties = new HashMap<>(); @@ -226,6 +249,7 @@ public Builder from(ConnectedEntity other) { name(other.getName()); edScore(other.getEdScore()); relation(other.getRelation()); + associationType(other.getAssociationType()); type(other.getType()); company(other.getCompany()); return this; @@ -325,9 +349,30 @@ public _FinalStage company(Optional company) { 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. + */ + @java.lang.Override + public _FinalStage associationType(String associationType) { + this.associationType = Optional.ofNullable(associationType); + return this; + } + + /** + *

How the entity relates to the event: event_associated if the entity is a direct actor, mention if merely referenced.

+ */ + @java.lang.Override + @JsonSetter(value = "association_type", nulls = Nulls.SKIP) + public _FinalStage associationType(Optional associationType) { + this.associationType = associationType; + return this; + } + @java.lang.Override public ConnectedEntity build() { - return new ConnectedEntity(entityId, name, edScore, relation, type, company, additionalProperties); + return new ConnectedEntity( + entityId, name, edScore, relation, associationType, type, company, additionalProperties); } @java.lang.Override diff --git a/src/main/java/com/newscatcher/catchall/types/EntityAssociationType.java b/src/main/java/com/newscatcher/catchall/types/EntityAssociationType.java new file mode 100644 index 0000000..354c9a5 --- /dev/null +++ b/src/main/java/com/newscatcher/catchall/types/EntityAssociationType.java @@ -0,0 +1,85 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.newscatcher.catchall.types; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public final class EntityAssociationType { + public static final EntityAssociationType EVENT_ASSOCIATED = + new EntityAssociationType(Value.EVENT_ASSOCIATED, "event_associated"); + + public static final EntityAssociationType MENTION = new EntityAssociationType(Value.MENTION, "mention"); + + private final Value value; + + private final String string; + + EntityAssociationType(Value value, String string) { + this.value = value; + this.string = string; + } + + public Value getEnumValue() { + return value; + } + + @java.lang.Override + @JsonValue + public String toString() { + return this.string; + } + + @java.lang.Override + public boolean equals(Object other) { + return (this == other) + || (other instanceof EntityAssociationType + && this.string.equals(((EntityAssociationType) other).string)); + } + + @java.lang.Override + public int hashCode() { + return this.string.hashCode(); + } + + public T visit(Visitor visitor) { + switch (value) { + case EVENT_ASSOCIATED: + return visitor.visitEventAssociated(); + case MENTION: + return visitor.visitMention(); + case UNKNOWN: + default: + return visitor.visitUnknown(string); + } + } + + @JsonCreator(mode = JsonCreator.Mode.DELEGATING) + public static EntityAssociationType valueOf(String value) { + switch (value) { + case "event_associated": + return EVENT_ASSOCIATED; + case "mention": + return MENTION; + default: + return new EntityAssociationType(Value.UNKNOWN, value); + } + } + + public enum Value { + MENTION, + + EVENT_ASSOCIATED, + + UNKNOWN + } + + public interface Visitor { + T visitMention(); + + T visitEventAssociated(); + + T visitUnknown(String unknownType); + } +} From 39b64d5afb123b6e39db0889c3ee8d94181e1d05 Mon Sep 17 00:00:00 2001 From: fern-api <115122769+fern-api[bot]@users.noreply.github.com> Date: Wed, 10 Jun 2026 12:30:18 +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 293e3fd..670b5e8 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.1" } \ No newline at end of file diff --git a/README.md b/README.md index 21ad583..de3aa29 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.1' } ``` @@ -47,7 +47,7 @@ Add the dependency in your `pom.xml` file: com.newscatcherapi newscatcher-catchall-sdk - 0.0.0-fern-placeholder + 3.0.1 ``` diff --git a/build.gradle b/build.gradle index e611a96..7e47163 100644 --- a/build.gradle +++ b/build.gradle @@ -47,7 +47,7 @@ java { group = 'com.newscatcherapi' -version = '0.0.0-fern-placeholder' +version = '3.0.1' 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.1' 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..4a5c40b 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.1"); 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.1"); } }); this.headerSuppliers = headerSuppliers;