Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .fern/metadata.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"cliVersion": "5.66.0",
"cliVersion": "5.89.4",
"generatorName": "fernapi/fern-java-sdk",
"generatorVersion": "4.11.1",
"generatorVersion": "4.17.0",
"generatorConfig": {
"publish-to": "central",
"client-class-name": "CatchAllApi",
"package-prefix": "com.newscatcher.catchall"
},
"originGitCommit": "1e66c85a387d0d844162c965656c6a0d36334c11",
"originGitCommit": "3f4bdad0a71333b0f9fb6f42d44d174f2e40167b",
"originGitCommitIsDirty": true,
"invokedBy": "ci",
"requestedVersion": "AUTO",
"ciProvider": "unknown",
"sdkVersion": "3.0.3"
"sdkVersion": "3.0.4"
}
8 changes: 7 additions & 1 deletion .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Add the dependency in your `build.gradle` file:

```groovy
dependencies {
implementation 'com.newscatcherapi:newscatcher-catchall-sdk:3.0.3'
implementation 'com.newscatcherapi:newscatcher-catchall-sdk:3.0.4'
}
```

Expand All @@ -47,7 +47,7 @@ Add the dependency in your `pom.xml` file:
<dependency>
<groupId>com.newscatcherapi</groupId>
<artifactId>newscatcher-catchall-sdk</artifactId>
<version>3.0.3</version>
<version>3.0.4</version>
</dependency>
```

Expand Down Expand Up @@ -266,3 +266,4 @@ On the other hand, contributions to the README are always very welcome!




4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ java {

group = 'com.newscatcherapi'

version = '3.0.3'
version = '3.0.4'

jar {
dependsOn(":generatePomFileForMavenPublication")
Expand Down Expand Up @@ -88,7 +88,7 @@ publishing {
maven(MavenPublication) {
groupId = 'com.newscatcherapi'
artifactId = 'newscatcher-catchall-sdk'
version = '3.0.3'
version = '3.0.4'
from components.java
pom {
name = 'newscatcher'
Expand Down
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## [3.0.4] - 2026-08-04

## 2.0.0 - 2026-05-19
### Breaking Changes
* **`ListEntitiesInDatasetRequest`** — renamed to **`ListDatasetEntitiesRequest`**; update all imports and usages to the new class name.
Expand Down
46 changes: 41 additions & 5 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,14 @@ client.jobs().getUserJobs(

**projectId:** `Optional<String>` — Filter results to resources belonging to this project.

</dd>
</dl>

<dl>
<dd>

**mode:** `Optional<GetUserJobsRequestMode>` — Filter results by processing mode. Returns only jobs that ran in the specified mode.

</dd>
</dl>
</dd>
Expand Down Expand Up @@ -586,7 +594,9 @@ client.jobs().getJobResults(
<dl>
<dd>

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.
Returns a completed job's result records as a CSV download. One row per record, with enrichment fields as columns and citations as a JSON column.

If the job used connected entity datasets, connected entities are split into `event_associated_entities` and `mention_entities` JSON columns. When no entity dataset was used, those two columns are omitted from the export entirely.
</dd>
</dl>
</dd>
Expand Down Expand Up @@ -1060,7 +1070,9 @@ client.monitors().pullMonitorResults(
<dl>
<dd>

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.
Returns the most recent run's records as a CSV download. One row per record, with enrichment fields as columns and citations as a JSON column.

If the monitor's reference job used connected entity datasets, connected entities are split into `event_associated_entities` and `mention_entities` JSON columns. When no entity dataset was used, those two columns are omitted from the export entirely.
</dd>
</dl>
</dd>
Expand Down Expand Up @@ -1602,6 +1614,8 @@ client.webhooks().listWebhooks(
<dd>

Creates a new webhook endpoint for the organization.

Optionally pass `project_id` to attach the webhook to a project in the same request.
</dd>
</dl>
</dd>
Expand All @@ -1623,6 +1637,7 @@ client.webhooks().createWebhook(
.url("https://hooks.slack.com/services/T000/B000/xxx")
.type(WebhookType.SLACK)
.deliveryMode(DeliveryMode.FULL)
.projectId("60a85db4-78ec-4b78-876a-bc7d9cdadd04")
.build()
);
```
Expand Down Expand Up @@ -1720,6 +1735,21 @@ Authentication forwarded with each delivery. Supported types:

**formatterConfig:** `Optional<FormatterConfigDto>` — Custom payload formatter. Required when `type` is `custom`.

</dd>
</dl>

<dl>
<dd>

**projectId:** `Optional<String>`

Optional project to attach this webhook to at creation time. Equivalent
to creating the webhook and then calling
[`POST /catchAll/projects/{project_id}/resources`](https://www.newscatcherapi.com/docs/web-search-api/api-reference/projects/add-resource)
with `resource_type: webhook`.

The project must belong to your organization.

</dd>
</dl>
</dd>
Expand Down Expand Up @@ -4200,7 +4230,9 @@ client.projects().getProject(
<dl>
<dd>

Deletes a project. By default, assigned resources are unassigned but not deleted.
Deletes a project. By default, assigned resources are unassigned but not deleted.

Webhooks are an exception: they are never deleted by this operation, even when `delete_resources` is `true`. Any attached webhook is detached from the project and continues to exist and deliver, because the same webhook may be attached to other projects.
</dd>
</dl>
</dd>
Expand Down Expand Up @@ -4243,7 +4275,11 @@ client.projects().deleteProject(
<dl>
<dd>

**deleteResources:** `Optional<Boolean>` — If true, permanently deletes all resources (jobs, monitors, datasets) assigned to the project. If false, the project is deleted and its resources are unassigned but not deleted.
**deleteResources:** `Optional<Boolean>`

If true, permanently deletes all resources (jobs, monitors, datasets, monitor groups) assigned to the project. If false, the project is deleted and its resources are unassigned but not deleted.

Webhooks are never deleted by either setting — they are only detached from the project.

</dd>
</dl>
Expand Down Expand Up @@ -4345,7 +4381,7 @@ client.projects().updateProject(

Returns resource counts for a project, grouped by type and status.

For `jobs` and `monitors`, counts are broken down by status (for example, `completed`, `failed`). For `datasets` and `monitor_groups`, only a `total` count is returned.
For `jobs` and `monitors`, counts are broken down by status (for example, `completed`, `failed`). For `datasets`, `monitor_groups`, and `webhooks`, only a `total` count is returned.
</dd>
</dl>
</dd>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ public class AsyncCatchAllApiBuilder {

private Optional<Integer> maxRetries = Optional.empty();

private Optional<Long> initialRetryDelayMillis = Optional.empty();

private Optional<Long> maxRetryDelayMillis = Optional.empty();

private Optional<Double> retryJitterFactor = Optional.empty();

private final Map<String, String> customHeaders = new HashMap<>();

private String apiKey = null;
Expand Down Expand Up @@ -60,6 +66,30 @@ public AsyncCatchAllApiBuilder maxRetries(int maxRetries) {
return this;
}

/**
* Sets the initial delay (in milliseconds) used for exponential backoff between retries. Defaults to 1000 milliseconds.
*/
public AsyncCatchAllApiBuilder initialRetryDelayMillis(long initialRetryDelayMillis) {
this.initialRetryDelayMillis = Optional.of(initialRetryDelayMillis);
return this;
}

/**
* Sets the maximum delay (in milliseconds) between retries. Defaults to 60000 milliseconds.
*/
public AsyncCatchAllApiBuilder maxRetryDelayMillis(long maxRetryDelayMillis) {
this.maxRetryDelayMillis = Optional.of(maxRetryDelayMillis);
return this;
}

/**
* Sets the jitter factor (between 0 and 1) applied to retry delays. Defaults to 0.2.
*/
public AsyncCatchAllApiBuilder retryJitterFactor(double retryJitterFactor) {
this.retryJitterFactor = Optional.of(retryJitterFactor);
return this;
}

/**
* Sets the underlying OkHttp client
*/
Expand Down Expand Up @@ -130,7 +160,9 @@ protected void setEnvironment(ClientOptions.Builder builder) {
* }</pre>
*/
protected void setAuthentication(ClientOptions.Builder builder) {
builder.addHeader("x-api-key", this.apiKey);
if (this.apiKey != null) {
builder.addHeader("x-api-key", this.apiKey);
}
}

/**
Expand All @@ -155,6 +187,15 @@ protected void setRetries(ClientOptions.Builder builder) {
if (this.maxRetries.isPresent()) {
builder.maxRetries(this.maxRetries.get());
}
if (this.initialRetryDelayMillis.isPresent()) {
builder.initialRetryDelayMillis(this.initialRetryDelayMillis.get());
}
if (this.maxRetryDelayMillis.isPresent()) {
builder.maxRetryDelayMillis(this.maxRetryDelayMillis.get());
}
if (this.retryJitterFactor.isPresent()) {
builder.retryJitterFactor(this.retryJitterFactor.get());
}
}

/**
Expand Down
43 changes: 42 additions & 1 deletion src/main/java/com/newscatcher/catchall/CatchAllApiBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ public class CatchAllApiBuilder {

private Optional<Integer> maxRetries = Optional.empty();

private Optional<Long> initialRetryDelayMillis = Optional.empty();

private Optional<Long> maxRetryDelayMillis = Optional.empty();

private Optional<Double> retryJitterFactor = Optional.empty();

private final Map<String, String> customHeaders = new HashMap<>();

private String apiKey = null;
Expand Down Expand Up @@ -60,6 +66,30 @@ public CatchAllApiBuilder maxRetries(int maxRetries) {
return this;
}

/**
* Sets the initial delay (in milliseconds) used for exponential backoff between retries. Defaults to 1000 milliseconds.
*/
public CatchAllApiBuilder initialRetryDelayMillis(long initialRetryDelayMillis) {
this.initialRetryDelayMillis = Optional.of(initialRetryDelayMillis);
return this;
}

/**
* Sets the maximum delay (in milliseconds) between retries. Defaults to 60000 milliseconds.
*/
public CatchAllApiBuilder maxRetryDelayMillis(long maxRetryDelayMillis) {
this.maxRetryDelayMillis = Optional.of(maxRetryDelayMillis);
return this;
}

/**
* Sets the jitter factor (between 0 and 1) applied to retry delays. Defaults to 0.2.
*/
public CatchAllApiBuilder retryJitterFactor(double retryJitterFactor) {
this.retryJitterFactor = Optional.of(retryJitterFactor);
return this;
}

/**
* Sets the underlying OkHttp client
*/
Expand Down Expand Up @@ -130,7 +160,9 @@ protected void setEnvironment(ClientOptions.Builder builder) {
* }</pre>
*/
protected void setAuthentication(ClientOptions.Builder builder) {
builder.addHeader("x-api-key", this.apiKey);
if (this.apiKey != null) {
builder.addHeader("x-api-key", this.apiKey);
}
}

/**
Expand All @@ -155,6 +187,15 @@ protected void setRetries(ClientOptions.Builder builder) {
if (this.maxRetries.isPresent()) {
builder.maxRetries(this.maxRetries.get());
}
if (this.initialRetryDelayMillis.isPresent()) {
builder.initialRetryDelayMillis(this.initialRetryDelayMillis.get());
}
if (this.maxRetryDelayMillis.isPresent()) {
builder.maxRetryDelayMillis(this.maxRetryDelayMillis.get());
}
if (this.retryJitterFactor.isPresent()) {
builder.retryJitterFactor(this.retryJitterFactor.get());
}
}

/**
Expand Down
Loading
Loading