newscatcher-catchall-sdk 3.0.1 → 4.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/cjs/BaseClient.d.ts +12 -0
- package/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/errors/BadRequestError.js +1 -1
- package/dist/cjs/api/errors/ForbiddenError.js +1 -1
- package/dist/cjs/api/errors/NotFoundError.js +1 -1
- package/dist/cjs/api/errors/UnauthorizedError.js +1 -1
- package/dist/cjs/api/errors/UnprocessableEntityError.js +1 -1
- package/dist/cjs/api/resources/datasets/client/Client.d.ts +5 -3
- package/dist/cjs/api/resources/datasets/client/Client.js +11 -8
- package/dist/cjs/api/resources/entities/client/Client.d.ts +8 -6
- package/dist/cjs/api/resources/entities/client/Client.js +12 -9
- package/dist/cjs/api/resources/entities/client/requests/UpdateEntityRequest.d.ts +3 -1
- package/dist/cjs/api/resources/jobs/client/Client.d.ts +16 -0
- package/dist/cjs/api/resources/jobs/client/Client.js +60 -4
- package/dist/cjs/api/resources/jobs/client/requests/GetJobResultsCsvRequest.d.ts +10 -0
- package/dist/cjs/api/resources/jobs/client/requests/GetJobResultsCsvRequest.js +3 -0
- package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.d.ts +4 -0
- package/dist/cjs/api/resources/jobs/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/monitors/client/Client.d.ts +16 -0
- package/dist/cjs/api/resources/monitors/client/Client.js +59 -3
- package/dist/cjs/api/resources/monitors/client/requests/PullMonitorResultsCsvRequest.d.ts +10 -0
- package/dist/cjs/api/resources/monitors/client/requests/PullMonitorResultsCsvRequest.js +3 -0
- package/dist/cjs/api/resources/monitors/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/projects/client/Client.js +4 -3
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +25 -0
- package/dist/cjs/api/resources/webhooks/client/Client.js +78 -4
- package/dist/cjs/api/resources/webhooks/client/requests/CreateWebhookRequestDto.d.ts +2 -2
- package/dist/cjs/api/resources/webhooks/client/requests/TriggerWebhookRequest.d.ts +23 -0
- package/dist/cjs/api/resources/webhooks/client/requests/TriggerWebhookRequest.js +3 -0
- package/dist/cjs/api/resources/webhooks/client/requests/UpdateWebhookRequestDto.d.ts +2 -2
- package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/CompanyAttributes.d.ts +0 -2
- package/dist/cjs/api/types/ConnectedDataset.d.ts +11 -0
- package/dist/cjs/api/types/ConnectedDataset.js +3 -0
- package/dist/cjs/api/types/ConnectedEntity.d.ts +2 -0
- package/dist/cjs/api/types/CreateEntityRequest.d.ts +6 -2
- package/dist/cjs/api/types/DatasetResponse.d.ts +15 -0
- package/dist/cjs/api/types/EntityResponse.d.ts +2 -0
- package/dist/cjs/api/types/EntitySummary.d.ts +2 -0
- package/dist/cjs/api/types/FormatterConfigDto.d.ts +15 -0
- package/dist/cjs/api/types/FormatterConfigDto.js +3 -0
- package/dist/cjs/api/types/InitializeResponseDto.d.ts +6 -1
- package/dist/cjs/api/types/PullJobResponseDto.d.ts +4 -0
- package/dist/cjs/api/types/PullMonitorResponseDto.d.ts +4 -0
- package/dist/cjs/api/types/WebhookResponseDto.d.ts +2 -2
- package/dist/cjs/api/types/index.d.ts +2 -0
- package/dist/cjs/api/types/index.js +2 -0
- package/dist/cjs/core/file/file.js +3 -0
- package/dist/cjs/core/form-data-utils/FormDataWrapper.js +3 -0
- package/dist/cjs/core/requestBody.d.ts +12 -0
- package/dist/cjs/core/requestBody.js +26 -0
- package/dist/cjs/core/url/qs.js +2 -2
- package/dist/cjs/errors/CatchAllApiError.d.ts +1 -0
- package/dist/cjs/errors/CatchAllApiError.js +5 -1
- package/dist/cjs/errors/CatchAllApiTimeoutError.d.ts +2 -2
- package/dist/cjs/errors/CatchAllApiTimeoutError.js +40 -6
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +12 -0
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/errors/BadRequestError.mjs +1 -1
- package/dist/esm/api/errors/ForbiddenError.mjs +1 -1
- package/dist/esm/api/errors/NotFoundError.mjs +1 -1
- package/dist/esm/api/errors/UnauthorizedError.mjs +1 -1
- package/dist/esm/api/errors/UnprocessableEntityError.mjs +1 -1
- package/dist/esm/api/resources/datasets/client/Client.d.mts +5 -3
- package/dist/esm/api/resources/datasets/client/Client.mjs +11 -8
- package/dist/esm/api/resources/entities/client/Client.d.mts +8 -6
- package/dist/esm/api/resources/entities/client/Client.mjs +12 -9
- package/dist/esm/api/resources/entities/client/requests/UpdateEntityRequest.d.mts +3 -1
- package/dist/esm/api/resources/jobs/client/Client.d.mts +16 -0
- package/dist/esm/api/resources/jobs/client/Client.mjs +60 -4
- package/dist/esm/api/resources/jobs/client/requests/GetJobResultsCsvRequest.d.mts +10 -0
- package/dist/esm/api/resources/jobs/client/requests/GetJobResultsCsvRequest.mjs +2 -0
- package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.d.mts +4 -0
- package/dist/esm/api/resources/jobs/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/monitors/client/Client.d.mts +16 -0
- package/dist/esm/api/resources/monitors/client/Client.mjs +59 -3
- package/dist/esm/api/resources/monitors/client/requests/PullMonitorResultsCsvRequest.d.mts +10 -0
- package/dist/esm/api/resources/monitors/client/requests/PullMonitorResultsCsvRequest.mjs +2 -0
- package/dist/esm/api/resources/monitors/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/projects/client/Client.mjs +4 -3
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +25 -0
- package/dist/esm/api/resources/webhooks/client/Client.mjs +78 -4
- package/dist/esm/api/resources/webhooks/client/requests/CreateWebhookRequestDto.d.mts +2 -2
- package/dist/esm/api/resources/webhooks/client/requests/TriggerWebhookRequest.d.mts +23 -0
- package/dist/esm/api/resources/webhooks/client/requests/TriggerWebhookRequest.mjs +2 -0
- package/dist/esm/api/resources/webhooks/client/requests/UpdateWebhookRequestDto.d.mts +2 -2
- package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/CompanyAttributes.d.mts +0 -2
- package/dist/esm/api/types/ConnectedDataset.d.mts +11 -0
- package/dist/esm/api/types/ConnectedDataset.mjs +2 -0
- package/dist/esm/api/types/ConnectedEntity.d.mts +2 -0
- package/dist/esm/api/types/CreateEntityRequest.d.mts +6 -2
- package/dist/esm/api/types/DatasetResponse.d.mts +15 -0
- package/dist/esm/api/types/EntityResponse.d.mts +2 -0
- package/dist/esm/api/types/EntitySummary.d.mts +2 -0
- package/dist/esm/api/types/FormatterConfigDto.d.mts +15 -0
- package/dist/esm/api/types/FormatterConfigDto.mjs +2 -0
- package/dist/esm/api/types/InitializeResponseDto.d.mts +6 -1
- package/dist/esm/api/types/PullJobResponseDto.d.mts +4 -0
- package/dist/esm/api/types/PullMonitorResponseDto.d.mts +4 -0
- package/dist/esm/api/types/WebhookResponseDto.d.mts +2 -2
- package/dist/esm/api/types/index.d.mts +2 -0
- package/dist/esm/api/types/index.mjs +2 -0
- package/dist/esm/core/file/file.mjs +3 -0
- package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +3 -0
- package/dist/esm/core/requestBody.d.mts +12 -0
- package/dist/esm/core/requestBody.mjs +23 -0
- package/dist/esm/core/url/qs.mjs +2 -2
- package/dist/esm/errors/CatchAllApiError.d.mts +1 -0
- package/dist/esm/errors/CatchAllApiError.mjs +5 -1
- package/dist/esm/errors/CatchAllApiTimeoutError.d.mts +2 -2
- package/dist/esm/errors/CatchAllApiTimeoutError.mjs +7 -6
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +216 -9
|
@@ -8,6 +8,7 @@ export * from "./BearerAuthDto.mjs";
|
|
|
8
8
|
export * from "./Citation.mjs";
|
|
9
9
|
export * from "./CompanyAttributes.mjs";
|
|
10
10
|
export * from "./CompanyEnrichmentOutput.mjs";
|
|
11
|
+
export * from "./ConnectedDataset.mjs";
|
|
11
12
|
export * from "./ConnectedEntity.mjs";
|
|
12
13
|
export * from "./Context.mjs";
|
|
13
14
|
export * from "./ContinueResponseDto.mjs";
|
|
@@ -44,6 +45,7 @@ export * from "./EntitySummary.mjs";
|
|
|
44
45
|
export * from "./EntityType.mjs";
|
|
45
46
|
export * from "./EntityValidationErrorBody.mjs";
|
|
46
47
|
export * from "./Error_.mjs";
|
|
48
|
+
export * from "./FormatterConfigDto.mjs";
|
|
47
49
|
export * from "./GetPlanLimitsResponseDto.mjs";
|
|
48
50
|
export * from "./GetWebhookResponseDto.mjs";
|
|
49
51
|
export * from "./HttpMethod.mjs";
|
|
@@ -8,6 +8,7 @@ export * from "./BearerAuthDto.mjs";
|
|
|
8
8
|
export * from "./Citation.mjs";
|
|
9
9
|
export * from "./CompanyAttributes.mjs";
|
|
10
10
|
export * from "./CompanyEnrichmentOutput.mjs";
|
|
11
|
+
export * from "./ConnectedDataset.mjs";
|
|
11
12
|
export * from "./ConnectedEntity.mjs";
|
|
12
13
|
export * from "./Context.mjs";
|
|
13
14
|
export * from "./ContinueResponseDto.mjs";
|
|
@@ -44,6 +45,7 @@ export * from "./EntitySummary.mjs";
|
|
|
44
45
|
export * from "./EntityType.mjs";
|
|
45
46
|
export * from "./EntityValidationErrorBody.mjs";
|
|
46
47
|
export * from "./Error_.mjs";
|
|
48
|
+
export * from "./FormatterConfigDto.mjs";
|
|
47
49
|
export * from "./GetPlanLimitsResponseDto.mjs";
|
|
48
50
|
export * from "./GetWebhookResponseDto.mjs";
|
|
49
51
|
export * from "./HttpMethod.mjs";
|
|
@@ -41,6 +41,9 @@ export function toMultipartDataPart(file) {
|
|
|
41
41
|
function getFileWithMetadata(file_1) {
|
|
42
42
|
return __awaiter(this, arguments, void 0, function* (file, { noSniffFileSize } = {}) {
|
|
43
43
|
var _a, _b, _c, _d, _e;
|
|
44
|
+
if (file == null) {
|
|
45
|
+
throw new Error(`Expected file to be a Blob, Buffer, ReadableStream, or an object with a "path" or "data" property, but received ${file === null ? "null" : "undefined"}.`);
|
|
46
|
+
}
|
|
44
47
|
if (isFileLike(file)) {
|
|
45
48
|
return getFileWithMetadata({
|
|
46
49
|
data: file,
|
|
@@ -36,6 +36,9 @@ export class FormDataWrapper {
|
|
|
36
36
|
}
|
|
37
37
|
appendFile(key, value) {
|
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
|
39
|
+
if (value == null) {
|
|
40
|
+
throw new Error(`File upload for "${key}" received ${value === null ? "null" : "undefined"}. The generated code should not call appendFile with null/undefined — check that optional file fields are guarded before this call.`);
|
|
41
|
+
}
|
|
39
42
|
const { data, filename, contentType } = yield toMultipartDataPart(value);
|
|
40
43
|
const blob = yield convertToBlob(data, contentType);
|
|
41
44
|
if (filename) {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spreads caller-supplied `additionalBodyParameters` (from `requestOptions.additionalBodyParameters`)
|
|
3
|
+
* on top of the request body. Caller-supplied properties win over the endpoint body. When no
|
|
4
|
+
* additional body parameters are provided, the original body is returned unchanged so serialization
|
|
5
|
+
* is unaffected.
|
|
6
|
+
*
|
|
7
|
+
* The merge only applies to plain-object (JSON object) bodies. When the body is `null`/`undefined`
|
|
8
|
+
* the additional parameters become the body; when the body is an array or a primitive JSON value it
|
|
9
|
+
* is returned unchanged, since object properties cannot be spread into it. This mirrors the Python
|
|
10
|
+
* SDK, which only merges additional body parameters into mapping bodies.
|
|
11
|
+
*/
|
|
12
|
+
export declare function mergeAdditionalBodyParameters(body: unknown, additionalBodyParameters: Record<string, unknown> | undefined): unknown;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spreads caller-supplied `additionalBodyParameters` (from `requestOptions.additionalBodyParameters`)
|
|
3
|
+
* on top of the request body. Caller-supplied properties win over the endpoint body. When no
|
|
4
|
+
* additional body parameters are provided, the original body is returned unchanged so serialization
|
|
5
|
+
* is unaffected.
|
|
6
|
+
*
|
|
7
|
+
* The merge only applies to plain-object (JSON object) bodies. When the body is `null`/`undefined`
|
|
8
|
+
* the additional parameters become the body; when the body is an array or a primitive JSON value it
|
|
9
|
+
* is returned unchanged, since object properties cannot be spread into it. This mirrors the Python
|
|
10
|
+
* SDK, which only merges additional body parameters into mapping bodies.
|
|
11
|
+
*/
|
|
12
|
+
export function mergeAdditionalBodyParameters(body, additionalBodyParameters) {
|
|
13
|
+
if (additionalBodyParameters == null) {
|
|
14
|
+
return body;
|
|
15
|
+
}
|
|
16
|
+
if (body == null) {
|
|
17
|
+
return Object.assign({}, additionalBodyParameters);
|
|
18
|
+
}
|
|
19
|
+
if (typeof body === "object" && !Array.isArray(body)) {
|
|
20
|
+
return Object.assign(Object.assign({}, body), additionalBodyParameters);
|
|
21
|
+
}
|
|
22
|
+
return body;
|
|
23
|
+
}
|
package/dist/esm/core/url/qs.mjs
CHANGED
|
@@ -16,7 +16,7 @@ function stringifyObject(obj, prefix = "", options) {
|
|
|
16
16
|
const parts = [];
|
|
17
17
|
for (const [key, value] of Object.entries(obj)) {
|
|
18
18
|
const fullKey = prefix ? `${prefix}[${key}]` : key;
|
|
19
|
-
if (value
|
|
19
|
+
if (value == null) {
|
|
20
20
|
continue;
|
|
21
21
|
}
|
|
22
22
|
if (Array.isArray(value)) {
|
|
@@ -36,7 +36,7 @@ function stringifyObject(obj, prefix = "", options) {
|
|
|
36
36
|
else {
|
|
37
37
|
for (let i = 0; i < value.length; i++) {
|
|
38
38
|
const item = value[i];
|
|
39
|
-
if (item
|
|
39
|
+
if (item == null) {
|
|
40
40
|
continue;
|
|
41
41
|
}
|
|
42
42
|
if (typeof item === "object" && !Array.isArray(item) && item !== null) {
|
|
@@ -7,7 +7,7 @@ export class CatchAllApiError extends Error {
|
|
|
7
7
|
if (Error.captureStackTrace) {
|
|
8
8
|
Error.captureStackTrace(this, this.constructor);
|
|
9
9
|
}
|
|
10
|
-
this.name =
|
|
10
|
+
this.name = "CatchAllApiError";
|
|
11
11
|
this.statusCode = statusCode;
|
|
12
12
|
this.body = body;
|
|
13
13
|
this.rawResponse = rawResponse;
|
|
@@ -15,6 +15,10 @@ export class CatchAllApiError extends Error {
|
|
|
15
15
|
this.cause = cause;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
+
get requestId() {
|
|
19
|
+
var _a, _b, _c;
|
|
20
|
+
return (_c = (_b = (_a = this.rawResponse) === null || _a === void 0 ? void 0 : _a.headers) === null || _b === void 0 ? void 0 : _b.get("x-request-id")) !== null && _c !== void 0 ? _c : undefined;
|
|
21
|
+
}
|
|
18
22
|
}
|
|
19
23
|
function buildMessage({ message, statusCode, body, }) {
|
|
20
24
|
const lines = [];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import * as errors from "./index.mjs";
|
|
2
|
+
export declare class CatchAllApiTimeoutError extends errors.CatchAllApiError {
|
|
3
3
|
constructor(message: string, opts?: {
|
|
4
4
|
cause?: unknown;
|
|
5
5
|
});
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
-
|
|
2
|
+
import * as errors from "./index.mjs";
|
|
3
|
+
export class CatchAllApiTimeoutError extends errors.CatchAllApiError {
|
|
3
4
|
constructor(message, opts) {
|
|
4
|
-
super(
|
|
5
|
+
super({
|
|
6
|
+
message: message,
|
|
7
|
+
cause: opts === null || opts === void 0 ? void 0 : opts.cause,
|
|
8
|
+
});
|
|
5
9
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
6
10
|
if (Error.captureStackTrace) {
|
|
7
11
|
Error.captureStackTrace(this, this.constructor);
|
|
8
12
|
}
|
|
9
|
-
this.name =
|
|
10
|
-
if ((opts === null || opts === void 0 ? void 0 : opts.cause) != null) {
|
|
11
|
-
this.cause = opts.cause;
|
|
12
|
-
}
|
|
13
|
+
this.name = "CatchAllApiTimeoutError";
|
|
13
14
|
}
|
|
14
15
|
}
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "
|
|
1
|
+
export declare const SDK_VERSION = "4.0.1";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "
|
|
1
|
+
export const SDK_VERSION = "4.0.1";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -394,6 +394,71 @@ await client.jobs.getJobResults({
|
|
|
394
394
|
</dl>
|
|
395
395
|
|
|
396
396
|
|
|
397
|
+
</dd>
|
|
398
|
+
</dl>
|
|
399
|
+
</details>
|
|
400
|
+
|
|
401
|
+
<details><summary><code>client.jobs.<a href="/src/api/resources/jobs/client/Client.ts">getJobResultsCsv</a>({ ...params }) -> string</code></summary>
|
|
402
|
+
<dl>
|
|
403
|
+
<dd>
|
|
404
|
+
|
|
405
|
+
#### 📝 Description
|
|
406
|
+
|
|
407
|
+
<dl>
|
|
408
|
+
<dd>
|
|
409
|
+
|
|
410
|
+
<dl>
|
|
411
|
+
<dd>
|
|
412
|
+
|
|
413
|
+
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.
|
|
414
|
+
</dd>
|
|
415
|
+
</dl>
|
|
416
|
+
</dd>
|
|
417
|
+
</dl>
|
|
418
|
+
|
|
419
|
+
#### 🔌 Usage
|
|
420
|
+
|
|
421
|
+
<dl>
|
|
422
|
+
<dd>
|
|
423
|
+
|
|
424
|
+
<dl>
|
|
425
|
+
<dd>
|
|
426
|
+
|
|
427
|
+
```typescript
|
|
428
|
+
await client.jobs.getJobResultsCsv({
|
|
429
|
+
job_id: "job_id"
|
|
430
|
+
});
|
|
431
|
+
|
|
432
|
+
```
|
|
433
|
+
</dd>
|
|
434
|
+
</dl>
|
|
435
|
+
</dd>
|
|
436
|
+
</dl>
|
|
437
|
+
|
|
438
|
+
#### ⚙️ Parameters
|
|
439
|
+
|
|
440
|
+
<dl>
|
|
441
|
+
<dd>
|
|
442
|
+
|
|
443
|
+
<dl>
|
|
444
|
+
<dd>
|
|
445
|
+
|
|
446
|
+
**request:** `CatchAllApi.GetJobResultsCsvRequest`
|
|
447
|
+
|
|
448
|
+
</dd>
|
|
449
|
+
</dl>
|
|
450
|
+
|
|
451
|
+
<dl>
|
|
452
|
+
<dd>
|
|
453
|
+
|
|
454
|
+
**requestOptions:** `JobsClient.RequestOptions`
|
|
455
|
+
|
|
456
|
+
</dd>
|
|
457
|
+
</dl>
|
|
458
|
+
</dd>
|
|
459
|
+
</dl>
|
|
460
|
+
|
|
461
|
+
|
|
397
462
|
</dd>
|
|
398
463
|
</dl>
|
|
399
464
|
</details>
|
|
@@ -730,6 +795,71 @@ await client.monitors.pullMonitorResults({
|
|
|
730
795
|
</dl>
|
|
731
796
|
|
|
732
797
|
|
|
798
|
+
</dd>
|
|
799
|
+
</dl>
|
|
800
|
+
</details>
|
|
801
|
+
|
|
802
|
+
<details><summary><code>client.monitors.<a href="/src/api/resources/monitors/client/Client.ts">pullMonitorResultsCsv</a>({ ...params }) -> string</code></summary>
|
|
803
|
+
<dl>
|
|
804
|
+
<dd>
|
|
805
|
+
|
|
806
|
+
#### 📝 Description
|
|
807
|
+
|
|
808
|
+
<dl>
|
|
809
|
+
<dd>
|
|
810
|
+
|
|
811
|
+
<dl>
|
|
812
|
+
<dd>
|
|
813
|
+
|
|
814
|
+
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.
|
|
815
|
+
</dd>
|
|
816
|
+
</dl>
|
|
817
|
+
</dd>
|
|
818
|
+
</dl>
|
|
819
|
+
|
|
820
|
+
#### 🔌 Usage
|
|
821
|
+
|
|
822
|
+
<dl>
|
|
823
|
+
<dd>
|
|
824
|
+
|
|
825
|
+
<dl>
|
|
826
|
+
<dd>
|
|
827
|
+
|
|
828
|
+
```typescript
|
|
829
|
+
await client.monitors.pullMonitorResultsCsv({
|
|
830
|
+
monitor_id: "monitor_id"
|
|
831
|
+
});
|
|
832
|
+
|
|
833
|
+
```
|
|
834
|
+
</dd>
|
|
835
|
+
</dl>
|
|
836
|
+
</dd>
|
|
837
|
+
</dl>
|
|
838
|
+
|
|
839
|
+
#### ⚙️ Parameters
|
|
840
|
+
|
|
841
|
+
<dl>
|
|
842
|
+
<dd>
|
|
843
|
+
|
|
844
|
+
<dl>
|
|
845
|
+
<dd>
|
|
846
|
+
|
|
847
|
+
**request:** `CatchAllApi.PullMonitorResultsCsvRequest`
|
|
848
|
+
|
|
849
|
+
</dd>
|
|
850
|
+
</dl>
|
|
851
|
+
|
|
852
|
+
<dl>
|
|
853
|
+
<dd>
|
|
854
|
+
|
|
855
|
+
**requestOptions:** `MonitorsClient.RequestOptions`
|
|
856
|
+
|
|
857
|
+
</dd>
|
|
858
|
+
</dl>
|
|
859
|
+
</dd>
|
|
860
|
+
</dl>
|
|
861
|
+
|
|
862
|
+
|
|
733
863
|
</dd>
|
|
734
864
|
</dl>
|
|
735
865
|
</details>
|
|
@@ -1802,6 +1932,79 @@ await client.webhooks.listWebhooksForResource({
|
|
|
1802
1932
|
</dl>
|
|
1803
1933
|
|
|
1804
1934
|
|
|
1935
|
+
</dd>
|
|
1936
|
+
</dl>
|
|
1937
|
+
</details>
|
|
1938
|
+
|
|
1939
|
+
<details><summary><code>client.webhooks.<a href="/src/api/resources/webhooks/client/Client.ts">triggerWebhook</a>({ ...params }) -> void</code></summary>
|
|
1940
|
+
<dl>
|
|
1941
|
+
<dd>
|
|
1942
|
+
|
|
1943
|
+
#### 📝 Description
|
|
1944
|
+
|
|
1945
|
+
<dl>
|
|
1946
|
+
<dd>
|
|
1947
|
+
|
|
1948
|
+
<dl>
|
|
1949
|
+
<dd>
|
|
1950
|
+
|
|
1951
|
+
Manually dispatches a webhook delivery for a resource on demand, without
|
|
1952
|
+
waiting for the next job or monitor cycle.
|
|
1953
|
+
|
|
1954
|
+
Use this to re-deliver results after a failed delivery, replay a specific
|
|
1955
|
+
job's results, or validate a webhook against live data. The webhook must
|
|
1956
|
+
already be assigned to the resource.
|
|
1957
|
+
</dd>
|
|
1958
|
+
</dl>
|
|
1959
|
+
</dd>
|
|
1960
|
+
</dl>
|
|
1961
|
+
|
|
1962
|
+
#### 🔌 Usage
|
|
1963
|
+
|
|
1964
|
+
<dl>
|
|
1965
|
+
<dd>
|
|
1966
|
+
|
|
1967
|
+
<dl>
|
|
1968
|
+
<dd>
|
|
1969
|
+
|
|
1970
|
+
```typescript
|
|
1971
|
+
await client.webhooks.triggerWebhook({
|
|
1972
|
+
resource_type: "job",
|
|
1973
|
+
resource_id: "3fec5b07-8786-46d7-9486-d43ff67eccd4",
|
|
1974
|
+
webhook_id: "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
|
|
1975
|
+
job_id: "3fec5b07-8786-46d7-9486-d43ff67eccd4"
|
|
1976
|
+
});
|
|
1977
|
+
|
|
1978
|
+
```
|
|
1979
|
+
</dd>
|
|
1980
|
+
</dl>
|
|
1981
|
+
</dd>
|
|
1982
|
+
</dl>
|
|
1983
|
+
|
|
1984
|
+
#### ⚙️ Parameters
|
|
1985
|
+
|
|
1986
|
+
<dl>
|
|
1987
|
+
<dd>
|
|
1988
|
+
|
|
1989
|
+
<dl>
|
|
1990
|
+
<dd>
|
|
1991
|
+
|
|
1992
|
+
**request:** `CatchAllApi.TriggerWebhookRequest`
|
|
1993
|
+
|
|
1994
|
+
</dd>
|
|
1995
|
+
</dl>
|
|
1996
|
+
|
|
1997
|
+
<dl>
|
|
1998
|
+
<dd>
|
|
1999
|
+
|
|
2000
|
+
**requestOptions:** `WebhooksClient.RequestOptions`
|
|
2001
|
+
|
|
2002
|
+
</dd>
|
|
2003
|
+
</dl>
|
|
2004
|
+
</dd>
|
|
2005
|
+
</dl>
|
|
2006
|
+
|
|
2007
|
+
|
|
1805
2008
|
</dd>
|
|
1806
2009
|
</dl>
|
|
1807
2010
|
</details>
|
|
@@ -1954,10 +2157,10 @@ await client.entities.listEntities({
|
|
|
1954
2157
|
|
|
1955
2158
|
Creates a new company entity and begins background enrichment.
|
|
1956
2159
|
|
|
2160
|
+
Each entity requires a `name` plus at least one of: a `description` or a `domain`. Providing both is recommended — `domain` is the highest-signal identifier because it is unambiguous; a well-written `description` is the best alternative when no domain is available.
|
|
2161
|
+
|
|
1957
2162
|
The entity status starts as `pending` and transitions to `ready` once
|
|
1958
|
-
enrichment completes.
|
|
1959
|
-
possible — `domain` is the highest-signal field because it is
|
|
1960
|
-
unambiguous.
|
|
2163
|
+
enrichment completes.
|
|
1961
2164
|
</dd>
|
|
1962
2165
|
</dl>
|
|
1963
2166
|
</dd>
|
|
@@ -1975,12 +2178,12 @@ unambiguous.
|
|
|
1975
2178
|
await client.entities.createEntity({
|
|
1976
2179
|
name: "NewsCatcher",
|
|
1977
2180
|
entity_type: "company",
|
|
1978
|
-
description: "
|
|
2181
|
+
description: "NewsCatcher is a data-as-a-service company providing news intelligence APIs including the CatchAll Web Search API (2B+ web pages indexed) and News API (140,000+ sources, 100+ countries).",
|
|
1979
2182
|
additional_attributes: {
|
|
1980
2183
|
company_attributes: {
|
|
1981
2184
|
domain: "newscatcherapi.com",
|
|
1982
2185
|
key_persons: ["Artem Bugara", "Maksym Sugonyaka"],
|
|
1983
|
-
alternative_names: ["
|
|
2186
|
+
alternative_names: ["NewsCatcher CatchAll", "NewsCatcher API"]
|
|
1984
2187
|
}
|
|
1985
2188
|
}
|
|
1986
2189
|
});
|
|
@@ -2033,6 +2236,8 @@ await client.entities.createEntity({
|
|
|
2033
2236
|
|
|
2034
2237
|
Creates multiple entities in a single request. Each entity is processed independently — a failure in one does not affect others.
|
|
2035
2238
|
|
|
2239
|
+
Each entity requires a `name` plus at least one of: a `description` or a `domain`. See [Create entity](https://www.newscatcherapi.com/docs/web-search-api/api-reference/entities/create-entity) for the full field reference.
|
|
2240
|
+
|
|
2036
2241
|
Returns an array of `{id, status}` objects in the same order as the input array.
|
|
2037
2242
|
</dd>
|
|
2038
2243
|
</dl>
|
|
@@ -2270,7 +2475,7 @@ await client.entities.updateEntity({
|
|
|
2270
2475
|
description: "Updated description",
|
|
2271
2476
|
additional_attributes: {
|
|
2272
2477
|
company_attributes: {
|
|
2273
|
-
alternative_names: ["
|
|
2478
|
+
alternative_names: ["NewsCatcher CatchAll", "NewsCatcher API", "NCA"]
|
|
2274
2479
|
}
|
|
2275
2480
|
}
|
|
2276
2481
|
});
|
|
@@ -2388,7 +2593,9 @@ await client.datasets.listDatasets({
|
|
|
2388
2593
|
<dl>
|
|
2389
2594
|
<dd>
|
|
2390
2595
|
|
|
2391
|
-
Creates a new dataset from a list of existing entity IDs.
|
|
2596
|
+
Creates a new dataset from a list of existing entity IDs. The optional `description` field here describes the dataset itself — it is separate from the entity-level `description` used for matching.
|
|
2597
|
+
|
|
2598
|
+
Entities must be created before adding them to a dataset. Each entity requires a `name` plus at least one of: a `description` or a `domain`. Use [Create entity](https://www.newscatcherapi.com/docs/web-search-api/api-reference/entities/create-entity) or [Create entities batch](https://www.newscatcherapi.com/docs/web-search-api/api-reference/entities/create-entities-batch) to create entities first.
|
|
2392
2599
|
|
|
2393
2600
|
If any of the provided entity IDs do not exist or do not belong to
|
|
2394
2601
|
your organization, the request fails with `400`. All entity IDs must
|
|
@@ -2462,12 +2669,12 @@ await client.datasets.createDataset({
|
|
|
2462
2669
|
<dl>
|
|
2463
2670
|
<dd>
|
|
2464
2671
|
|
|
2465
|
-
Creates a new dataset by uploading a CSV file. Each row in the CSV becomes an entity.
|
|
2672
|
+
Creates a new dataset by uploading a CSV file. Each row in the CSV becomes an entity. Each row requires a `name` plus at least one of: a `description` or a `domain`; all other columns are optional. Note: `description` in the CSV is the entity's matching description — it is separate from the dataset-level `description` field in the form data.
|
|
2466
2673
|
|
|
2467
2674
|
**CSV format:**
|
|
2468
2675
|
```csv
|
|
2469
2676
|
name,description,domain,alternative_names,key_persons
|
|
2470
|
-
NewsCatcher,"
|
|
2677
|
+
NewsCatcher,"NewsCatcher is a data-as-a-service company providing news intelligence APIs including the CatchAll Web Search API (2B+ web pages indexed) and News API (140,000+ sources, 100+ countries).",newscatcherapi.com,"NewsCatcher CatchAll;NewsCatcher API","Artem Bugara;Maksym Sugonyaka"
|
|
2471
2678
|
OpenAI,"Artificial intelligence research company",openai.com,"Open AI","Sam Altman"
|
|
2472
2679
|
```
|
|
2473
2680
|
|