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.
Files changed (119) hide show
  1. package/README.md +2 -0
  2. package/dist/cjs/BaseClient.d.ts +12 -0
  3. package/dist/cjs/BaseClient.js +2 -2
  4. package/dist/cjs/api/errors/BadRequestError.js +1 -1
  5. package/dist/cjs/api/errors/ForbiddenError.js +1 -1
  6. package/dist/cjs/api/errors/NotFoundError.js +1 -1
  7. package/dist/cjs/api/errors/UnauthorizedError.js +1 -1
  8. package/dist/cjs/api/errors/UnprocessableEntityError.js +1 -1
  9. package/dist/cjs/api/resources/datasets/client/Client.d.ts +5 -3
  10. package/dist/cjs/api/resources/datasets/client/Client.js +11 -8
  11. package/dist/cjs/api/resources/entities/client/Client.d.ts +8 -6
  12. package/dist/cjs/api/resources/entities/client/Client.js +12 -9
  13. package/dist/cjs/api/resources/entities/client/requests/UpdateEntityRequest.d.ts +3 -1
  14. package/dist/cjs/api/resources/jobs/client/Client.d.ts +16 -0
  15. package/dist/cjs/api/resources/jobs/client/Client.js +60 -4
  16. package/dist/cjs/api/resources/jobs/client/requests/GetJobResultsCsvRequest.d.ts +10 -0
  17. package/dist/cjs/api/resources/jobs/client/requests/GetJobResultsCsvRequest.js +3 -0
  18. package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.d.ts +4 -0
  19. package/dist/cjs/api/resources/jobs/client/requests/index.d.ts +1 -0
  20. package/dist/cjs/api/resources/monitors/client/Client.d.ts +16 -0
  21. package/dist/cjs/api/resources/monitors/client/Client.js +59 -3
  22. package/dist/cjs/api/resources/monitors/client/requests/PullMonitorResultsCsvRequest.d.ts +10 -0
  23. package/dist/cjs/api/resources/monitors/client/requests/PullMonitorResultsCsvRequest.js +3 -0
  24. package/dist/cjs/api/resources/monitors/client/requests/index.d.ts +1 -0
  25. package/dist/cjs/api/resources/projects/client/Client.js +4 -3
  26. package/dist/cjs/api/resources/webhooks/client/Client.d.ts +25 -0
  27. package/dist/cjs/api/resources/webhooks/client/Client.js +78 -4
  28. package/dist/cjs/api/resources/webhooks/client/requests/CreateWebhookRequestDto.d.ts +2 -2
  29. package/dist/cjs/api/resources/webhooks/client/requests/TriggerWebhookRequest.d.ts +23 -0
  30. package/dist/cjs/api/resources/webhooks/client/requests/TriggerWebhookRequest.js +3 -0
  31. package/dist/cjs/api/resources/webhooks/client/requests/UpdateWebhookRequestDto.d.ts +2 -2
  32. package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +1 -0
  33. package/dist/cjs/api/types/CompanyAttributes.d.ts +0 -2
  34. package/dist/cjs/api/types/ConnectedDataset.d.ts +11 -0
  35. package/dist/cjs/api/types/ConnectedDataset.js +3 -0
  36. package/dist/cjs/api/types/ConnectedEntity.d.ts +2 -0
  37. package/dist/cjs/api/types/CreateEntityRequest.d.ts +6 -2
  38. package/dist/cjs/api/types/DatasetResponse.d.ts +15 -0
  39. package/dist/cjs/api/types/EntityResponse.d.ts +2 -0
  40. package/dist/cjs/api/types/EntitySummary.d.ts +2 -0
  41. package/dist/cjs/api/types/FormatterConfigDto.d.ts +15 -0
  42. package/dist/cjs/api/types/FormatterConfigDto.js +3 -0
  43. package/dist/cjs/api/types/InitializeResponseDto.d.ts +6 -1
  44. package/dist/cjs/api/types/PullJobResponseDto.d.ts +4 -0
  45. package/dist/cjs/api/types/PullMonitorResponseDto.d.ts +4 -0
  46. package/dist/cjs/api/types/WebhookResponseDto.d.ts +2 -2
  47. package/dist/cjs/api/types/index.d.ts +2 -0
  48. package/dist/cjs/api/types/index.js +2 -0
  49. package/dist/cjs/core/file/file.js +3 -0
  50. package/dist/cjs/core/form-data-utils/FormDataWrapper.js +3 -0
  51. package/dist/cjs/core/requestBody.d.ts +12 -0
  52. package/dist/cjs/core/requestBody.js +26 -0
  53. package/dist/cjs/core/url/qs.js +2 -2
  54. package/dist/cjs/errors/CatchAllApiError.d.ts +1 -0
  55. package/dist/cjs/errors/CatchAllApiError.js +5 -1
  56. package/dist/cjs/errors/CatchAllApiTimeoutError.d.ts +2 -2
  57. package/dist/cjs/errors/CatchAllApiTimeoutError.js +40 -6
  58. package/dist/cjs/version.d.ts +1 -1
  59. package/dist/cjs/version.js +1 -1
  60. package/dist/esm/BaseClient.d.mts +12 -0
  61. package/dist/esm/BaseClient.mjs +2 -2
  62. package/dist/esm/api/errors/BadRequestError.mjs +1 -1
  63. package/dist/esm/api/errors/ForbiddenError.mjs +1 -1
  64. package/dist/esm/api/errors/NotFoundError.mjs +1 -1
  65. package/dist/esm/api/errors/UnauthorizedError.mjs +1 -1
  66. package/dist/esm/api/errors/UnprocessableEntityError.mjs +1 -1
  67. package/dist/esm/api/resources/datasets/client/Client.d.mts +5 -3
  68. package/dist/esm/api/resources/datasets/client/Client.mjs +11 -8
  69. package/dist/esm/api/resources/entities/client/Client.d.mts +8 -6
  70. package/dist/esm/api/resources/entities/client/Client.mjs +12 -9
  71. package/dist/esm/api/resources/entities/client/requests/UpdateEntityRequest.d.mts +3 -1
  72. package/dist/esm/api/resources/jobs/client/Client.d.mts +16 -0
  73. package/dist/esm/api/resources/jobs/client/Client.mjs +60 -4
  74. package/dist/esm/api/resources/jobs/client/requests/GetJobResultsCsvRequest.d.mts +10 -0
  75. package/dist/esm/api/resources/jobs/client/requests/GetJobResultsCsvRequest.mjs +2 -0
  76. package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.d.mts +4 -0
  77. package/dist/esm/api/resources/jobs/client/requests/index.d.mts +1 -0
  78. package/dist/esm/api/resources/monitors/client/Client.d.mts +16 -0
  79. package/dist/esm/api/resources/monitors/client/Client.mjs +59 -3
  80. package/dist/esm/api/resources/monitors/client/requests/PullMonitorResultsCsvRequest.d.mts +10 -0
  81. package/dist/esm/api/resources/monitors/client/requests/PullMonitorResultsCsvRequest.mjs +2 -0
  82. package/dist/esm/api/resources/monitors/client/requests/index.d.mts +1 -0
  83. package/dist/esm/api/resources/projects/client/Client.mjs +4 -3
  84. package/dist/esm/api/resources/webhooks/client/Client.d.mts +25 -0
  85. package/dist/esm/api/resources/webhooks/client/Client.mjs +78 -4
  86. package/dist/esm/api/resources/webhooks/client/requests/CreateWebhookRequestDto.d.mts +2 -2
  87. package/dist/esm/api/resources/webhooks/client/requests/TriggerWebhookRequest.d.mts +23 -0
  88. package/dist/esm/api/resources/webhooks/client/requests/TriggerWebhookRequest.mjs +2 -0
  89. package/dist/esm/api/resources/webhooks/client/requests/UpdateWebhookRequestDto.d.mts +2 -2
  90. package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +1 -0
  91. package/dist/esm/api/types/CompanyAttributes.d.mts +0 -2
  92. package/dist/esm/api/types/ConnectedDataset.d.mts +11 -0
  93. package/dist/esm/api/types/ConnectedDataset.mjs +2 -0
  94. package/dist/esm/api/types/ConnectedEntity.d.mts +2 -0
  95. package/dist/esm/api/types/CreateEntityRequest.d.mts +6 -2
  96. package/dist/esm/api/types/DatasetResponse.d.mts +15 -0
  97. package/dist/esm/api/types/EntityResponse.d.mts +2 -0
  98. package/dist/esm/api/types/EntitySummary.d.mts +2 -0
  99. package/dist/esm/api/types/FormatterConfigDto.d.mts +15 -0
  100. package/dist/esm/api/types/FormatterConfigDto.mjs +2 -0
  101. package/dist/esm/api/types/InitializeResponseDto.d.mts +6 -1
  102. package/dist/esm/api/types/PullJobResponseDto.d.mts +4 -0
  103. package/dist/esm/api/types/PullMonitorResponseDto.d.mts +4 -0
  104. package/dist/esm/api/types/WebhookResponseDto.d.mts +2 -2
  105. package/dist/esm/api/types/index.d.mts +2 -0
  106. package/dist/esm/api/types/index.mjs +2 -0
  107. package/dist/esm/core/file/file.mjs +3 -0
  108. package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +3 -0
  109. package/dist/esm/core/requestBody.d.mts +12 -0
  110. package/dist/esm/core/requestBody.mjs +23 -0
  111. package/dist/esm/core/url/qs.mjs +2 -2
  112. package/dist/esm/errors/CatchAllApiError.d.mts +1 -0
  113. package/dist/esm/errors/CatchAllApiError.mjs +5 -1
  114. package/dist/esm/errors/CatchAllApiTimeoutError.d.mts +2 -2
  115. package/dist/esm/errors/CatchAllApiTimeoutError.mjs +7 -6
  116. package/dist/esm/version.d.mts +1 -1
  117. package/dist/esm/version.mjs +1 -1
  118. package/package.json +1 -1
  119. 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
+ }
@@ -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 === undefined) {
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 === undefined) {
39
+ if (item == null) {
40
40
  continue;
41
41
  }
42
42
  if (typeof item === "object" && !Array.isArray(item) && item !== null) {
@@ -11,4 +11,5 @@ export declare class CatchAllApiError extends Error {
11
11
  rawResponse?: core.RawResponse;
12
12
  cause?: unknown;
13
13
  });
14
+ get requestId(): string | undefined;
14
15
  }
@@ -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 = this.constructor.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
- export declare class CatchAllApiTimeoutError extends Error {
2
- readonly cause?: unknown;
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
- export class CatchAllApiTimeoutError extends Error {
2
+ import * as errors from "./index.mjs";
3
+ export class CatchAllApiTimeoutError extends errors.CatchAllApiError {
3
4
  constructor(message, opts) {
4
- super(message);
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 = this.constructor.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
  }
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "3.0.1";
1
+ export declare const SDK_VERSION = "4.0.1";
@@ -1 +1 @@
1
- export const SDK_VERSION = "3.0.1";
1
+ export const SDK_VERSION = "4.0.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "newscatcher-catchall-sdk",
3
- "version": "3.0.1",
3
+ "version": "4.0.1",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
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. Provide as much identifying information as
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: "AI-powered news data provider",
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: ["NC", "NewsCatcher API"]
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: ["NC", "NewsCatcher API", "NCA"]
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. The `name` and `domain`columns are required; all other columns are optional.
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,"AI-powered news data provider",newscatcherapi.com,"NC;NewsCatcher API","Artem Bugara;Maksym Sugonyaka"
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