newscatcher-catchall-sdk 1.1.2 → 1.4.0

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 (345) hide show
  1. package/README.md +365 -284
  2. package/dist/cjs/BaseClient.js +2 -2
  3. package/dist/cjs/Client.d.ts +18 -0
  4. package/dist/cjs/Client.js +83 -6
  5. package/dist/cjs/api/errors/BadRequestError.d.ts +1 -2
  6. package/dist/cjs/api/resources/datasets/client/Client.d.ts +245 -0
  7. package/dist/cjs/api/resources/datasets/client/Client.js +779 -0
  8. package/dist/cjs/api/resources/datasets/client/index.d.ts +1 -0
  9. package/dist/cjs/api/resources/datasets/client/index.js +17 -0
  10. package/dist/cjs/api/resources/datasets/client/requests/AddEntitiesToDatasetRequest.d.ts +15 -0
  11. package/dist/cjs/api/resources/datasets/client/requests/AddEntitiesToDatasetRequest.js +3 -0
  12. package/dist/cjs/api/resources/datasets/client/requests/CreateDatasetFromCsvRequest.d.ts +16 -0
  13. package/dist/cjs/api/resources/datasets/client/requests/CreateDatasetFromCsvRequest.js +3 -0
  14. package/dist/cjs/api/resources/datasets/client/requests/CreateDatasetRequest.d.ts +16 -0
  15. package/dist/cjs/api/resources/datasets/client/requests/CreateDatasetRequest.js +3 -0
  16. package/dist/cjs/api/resources/datasets/client/requests/DeleteDatasetRequest.d.ts +10 -0
  17. package/dist/cjs/api/resources/datasets/client/requests/DeleteDatasetRequest.js +3 -0
  18. package/dist/cjs/api/resources/datasets/client/requests/GetDatasetRequest.d.ts +10 -0
  19. package/dist/cjs/api/resources/datasets/client/requests/GetDatasetRequest.js +3 -0
  20. package/dist/cjs/api/resources/datasets/client/requests/GetDatasetStatusHistoryRequest.d.ts +10 -0
  21. package/dist/cjs/api/resources/datasets/client/requests/GetDatasetStatusHistoryRequest.js +3 -0
  22. package/dist/cjs/api/resources/datasets/client/requests/ListDatasetsRequest.d.ts +19 -0
  23. package/dist/cjs/api/resources/datasets/client/requests/ListDatasetsRequest.js +3 -0
  24. package/dist/cjs/api/resources/datasets/client/requests/ListEntitiesInDatasetRequest.d.ts +21 -0
  25. package/dist/cjs/api/resources/datasets/client/requests/ListEntitiesInDatasetRequest.js +3 -0
  26. package/dist/cjs/api/resources/datasets/client/requests/RemoveEntitiesFromDatasetRequest.d.ts +15 -0
  27. package/dist/cjs/api/resources/datasets/client/requests/RemoveEntitiesFromDatasetRequest.js +3 -0
  28. package/dist/cjs/api/resources/datasets/client/requests/UpdateDatasetRequest.d.ts +16 -0
  29. package/dist/cjs/api/resources/datasets/client/requests/UpdateDatasetRequest.js +3 -0
  30. package/dist/cjs/api/resources/datasets/client/requests/UploadCsvToDatasetRequest.d.ts +14 -0
  31. package/dist/cjs/api/resources/datasets/client/requests/UploadCsvToDatasetRequest.js +3 -0
  32. package/dist/cjs/api/resources/datasets/client/requests/index.d.ts +11 -0
  33. package/dist/cjs/api/resources/datasets/client/requests/index.js +2 -0
  34. package/dist/cjs/api/resources/datasets/exports.d.ts +2 -0
  35. package/dist/cjs/api/resources/datasets/exports.js +21 -0
  36. package/dist/cjs/api/resources/datasets/index.d.ts +1 -0
  37. package/dist/cjs/api/resources/datasets/index.js +17 -0
  38. package/dist/cjs/api/resources/entities/client/Client.d.ts +164 -0
  39. package/dist/cjs/api/resources/entities/client/Client.js +468 -0
  40. package/dist/cjs/api/resources/entities/client/index.d.ts +1 -0
  41. package/dist/cjs/api/resources/entities/client/index.js +17 -0
  42. package/dist/cjs/api/resources/entities/client/requests/CreateEntitiesBatchRequest.d.ts +35 -0
  43. package/dist/cjs/api/resources/entities/client/requests/CreateEntitiesBatchRequest.js +3 -0
  44. package/dist/cjs/api/resources/entities/client/requests/DeleteEntityRequest.d.ts +10 -0
  45. package/dist/cjs/api/resources/entities/client/requests/DeleteEntityRequest.js +3 -0
  46. package/dist/cjs/api/resources/entities/client/requests/GetEntityRequest.d.ts +10 -0
  47. package/dist/cjs/api/resources/entities/client/requests/GetEntityRequest.js +3 -0
  48. package/dist/cjs/api/resources/entities/client/requests/ListEntitiesRequest.d.ts +19 -0
  49. package/dist/cjs/api/resources/entities/client/requests/ListEntitiesRequest.js +3 -0
  50. package/dist/cjs/api/resources/entities/client/requests/UpdateEntityRequest.d.ts +22 -0
  51. package/dist/cjs/api/resources/entities/client/requests/UpdateEntityRequest.js +3 -0
  52. package/dist/cjs/api/resources/entities/client/requests/index.d.ts +5 -0
  53. package/dist/cjs/api/resources/entities/client/requests/index.js +2 -0
  54. package/dist/cjs/api/resources/entities/exports.d.ts +2 -0
  55. package/dist/cjs/api/resources/entities/exports.js +21 -0
  56. package/dist/cjs/api/resources/entities/index.d.ts +1 -0
  57. package/dist/cjs/api/resources/entities/index.js +17 -0
  58. package/dist/cjs/api/resources/index.d.ts +4 -0
  59. package/dist/cjs/api/resources/index.js +5 -1
  60. package/dist/cjs/api/resources/jobs/client/Client.d.ts +32 -31
  61. package/dist/cjs/api/resources/jobs/client/Client.js +75 -74
  62. package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.d.ts +28 -1
  63. package/dist/cjs/api/resources/jobs/client/requests/SubmitRequestDto.js +14 -0
  64. package/dist/cjs/api/resources/jobs/client/requests/index.d.ts +1 -1
  65. package/dist/cjs/api/resources/jobs/client/requests/index.js +3 -0
  66. package/dist/cjs/api/resources/meta/client/Client.d.ts +15 -3
  67. package/dist/cjs/api/resources/meta/client/Client.js +49 -1
  68. package/dist/cjs/api/resources/monitors/client/Client.d.ts +40 -40
  69. package/dist/cjs/api/resources/monitors/client/Client.js +101 -101
  70. package/dist/cjs/api/types/AdditionalAttributes.d.ts +7 -0
  71. package/dist/cjs/api/types/AdditionalAttributes.js +3 -0
  72. package/dist/cjs/api/types/CompanyAttributes.d.ts +17 -0
  73. package/dist/cjs/api/types/CompanyAttributes.js +3 -0
  74. package/dist/cjs/api/types/ConnectedEntity.d.ts +30 -0
  75. package/dist/cjs/api/types/ConnectedEntity.js +3 -0
  76. package/dist/cjs/api/types/CreateDatasetCsvResponse.d.ts +10 -0
  77. package/dist/cjs/api/types/CreateDatasetCsvResponse.js +3 -0
  78. package/dist/cjs/api/types/CreateEntitiesBatchResponse.d.ts +7 -0
  79. package/dist/cjs/api/types/CreateEntitiesBatchResponse.js +3 -0
  80. package/dist/cjs/api/types/CreateEntityRequest.d.ts +13 -0
  81. package/dist/cjs/api/types/CreateEntityRequest.js +3 -0
  82. package/dist/cjs/api/types/CreateEntityResponse.d.ts +6 -0
  83. package/dist/cjs/api/types/CreateEntityResponse.js +3 -0
  84. package/dist/cjs/api/types/DatasetEntityIdsRequest.d.ts +4 -0
  85. package/dist/cjs/api/types/DatasetEntityIdsRequest.js +3 -0
  86. package/dist/cjs/api/types/DatasetEntityListResponse.d.ts +11 -0
  87. package/dist/cjs/api/types/DatasetEntityListResponse.js +3 -0
  88. package/dist/cjs/api/types/DatasetListResponse.d.ts +11 -0
  89. package/dist/cjs/api/types/DatasetListResponse.js +3 -0
  90. package/dist/cjs/api/types/DatasetResponse.d.ts +20 -0
  91. package/dist/cjs/api/types/DatasetResponse.js +3 -0
  92. package/dist/cjs/api/types/DatasetSortBy.d.ts +7 -0
  93. package/dist/cjs/api/types/DatasetSortBy.js +10 -0
  94. package/dist/cjs/api/types/DatasetStatus.d.ts +15 -0
  95. package/dist/cjs/api/types/DatasetStatus.js +18 -0
  96. package/dist/cjs/api/types/DatasetStatusEntry.d.ts +11 -0
  97. package/dist/cjs/api/types/DatasetStatusEntry.js +3 -0
  98. package/dist/cjs/api/types/DatasetStatusHistoryResponse.d.ts +7 -0
  99. package/dist/cjs/api/types/DatasetStatusHistoryResponse.js +3 -0
  100. package/dist/cjs/api/types/EnrichmentType.d.ts +3 -1
  101. package/dist/cjs/api/types/EnrichmentType.js +3 -1
  102. package/dist/cjs/api/types/EntityListResponse.d.ts +11 -0
  103. package/dist/cjs/api/types/EntityListResponse.js +3 -0
  104. package/dist/cjs/api/types/EntityResponse.d.ts +20 -0
  105. package/dist/cjs/api/types/EntityResponse.js +3 -0
  106. package/dist/cjs/api/types/EntitySortBy.d.ts +7 -0
  107. package/dist/cjs/api/types/EntitySortBy.js +10 -0
  108. package/dist/cjs/api/types/EntityStatus.d.ts +15 -0
  109. package/dist/cjs/api/types/EntityStatus.js +18 -0
  110. package/dist/cjs/api/types/EntitySummary.d.ts +18 -0
  111. package/dist/cjs/api/types/EntitySummary.js +3 -0
  112. package/dist/cjs/api/types/EntityType.d.ts +11 -0
  113. package/dist/cjs/api/types/EntityType.js +14 -0
  114. package/dist/cjs/api/types/EntityValidationErrorBody.d.ts +16 -0
  115. package/dist/cjs/api/types/EntityValidationErrorBody.js +3 -0
  116. package/dist/cjs/api/types/GetPlanLimitsResponseDto.d.ts +5 -0
  117. package/dist/cjs/api/types/GetPlanLimitsResponseDto.js +3 -0
  118. package/dist/cjs/api/types/ManageEntitiesResponse.d.ts +6 -0
  119. package/dist/cjs/api/types/ManageEntitiesResponse.js +3 -0
  120. package/dist/cjs/api/types/MonitorListItemDto.d.ts +4 -2
  121. package/dist/cjs/api/types/MonitorRecord.d.ts +1 -0
  122. package/dist/cjs/api/types/PlanFeature.d.ts +12 -0
  123. package/dist/cjs/api/types/PlanFeature.js +3 -0
  124. package/dist/cjs/api/types/PullJobResponseDto.d.ts +12 -8
  125. package/dist/cjs/api/types/PullJobResponseDto.js +9 -0
  126. package/dist/cjs/api/types/Record_.d.ts +5 -0
  127. package/dist/cjs/api/types/SkippedRow.d.ts +13 -0
  128. package/dist/cjs/api/types/SkippedRow.js +3 -0
  129. package/dist/cjs/api/types/SortOrder.d.ts +11 -0
  130. package/dist/cjs/api/types/SortOrder.js +14 -0
  131. package/dist/cjs/api/types/UploadCsvToDatasetResponse.d.ts +8 -0
  132. package/dist/cjs/api/types/UploadCsvToDatasetResponse.js +3 -0
  133. package/dist/cjs/api/types/UserJob.d.ts +12 -0
  134. package/dist/cjs/api/types/UserJob.js +9 -0
  135. package/dist/cjs/api/types/ValidationReport.d.ts +17 -0
  136. package/dist/cjs/api/types/ValidationReport.js +3 -0
  137. package/dist/cjs/api/types/index.d.ts +29 -0
  138. package/dist/cjs/api/types/index.js +29 -0
  139. package/dist/cjs/core/auth/BasicAuth.d.ts +2 -2
  140. package/dist/cjs/core/auth/BasicAuth.js +7 -1
  141. package/dist/cjs/core/exports.d.ts +1 -0
  142. package/dist/cjs/core/exports.js +1 -0
  143. package/dist/cjs/core/fetcher/BinaryResponse.d.ts +1 -1
  144. package/dist/cjs/core/fetcher/Fetcher.d.ts +2 -0
  145. package/dist/cjs/core/fetcher/Fetcher.js +4 -0
  146. package/dist/cjs/core/fetcher/index.d.ts +2 -0
  147. package/dist/cjs/core/fetcher/index.js +3 -1
  148. package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
  149. package/dist/cjs/core/fetcher/makePassthroughRequest.js +135 -0
  150. package/dist/cjs/core/file/exports.d.ts +1 -0
  151. package/dist/cjs/core/file/exports.js +2 -0
  152. package/dist/cjs/core/file/file.d.ts +10 -0
  153. package/dist/cjs/core/file/file.js +222 -0
  154. package/dist/cjs/core/file/index.d.ts +2 -0
  155. package/dist/cjs/core/file/index.js +18 -0
  156. package/dist/cjs/core/file/types.d.ts +66 -0
  157. package/dist/cjs/core/file/types.js +2 -0
  158. package/dist/cjs/core/form-data-utils/FormDataWrapper.d.ts +15 -0
  159. package/dist/cjs/core/form-data-utils/FormDataWrapper.js +185 -0
  160. package/dist/cjs/core/form-data-utils/encodeAsFormParameter.d.ts +1 -0
  161. package/dist/cjs/core/form-data-utils/encodeAsFormParameter.js +12 -0
  162. package/dist/cjs/core/form-data-utils/index.d.ts +2 -0
  163. package/dist/cjs/core/form-data-utils/index.js +20 -0
  164. package/dist/cjs/core/index.d.ts +2 -0
  165. package/dist/cjs/core/index.js +3 -1
  166. package/dist/cjs/errors/CatchAllApiError.d.ts +3 -1
  167. package/dist/cjs/errors/CatchAllApiError.js +4 -1
  168. package/dist/cjs/errors/CatchAllApiTimeoutError.d.ts +4 -1
  169. package/dist/cjs/errors/CatchAllApiTimeoutError.js +4 -1
  170. package/dist/cjs/errors/handleNonStatusCodeError.js +4 -1
  171. package/dist/cjs/version.d.ts +1 -1
  172. package/dist/cjs/version.js +1 -1
  173. package/dist/esm/BaseClient.mjs +2 -2
  174. package/dist/esm/Client.d.mts +18 -0
  175. package/dist/esm/Client.mjs +44 -0
  176. package/dist/esm/api/errors/BadRequestError.d.mts +1 -2
  177. package/dist/esm/api/resources/datasets/client/Client.d.mts +245 -0
  178. package/dist/esm/api/resources/datasets/client/Client.mjs +742 -0
  179. package/dist/esm/api/resources/datasets/client/index.d.mts +1 -0
  180. package/dist/esm/api/resources/datasets/client/index.mjs +1 -0
  181. package/dist/esm/api/resources/datasets/client/requests/AddEntitiesToDatasetRequest.d.mts +15 -0
  182. package/dist/esm/api/resources/datasets/client/requests/AddEntitiesToDatasetRequest.mjs +2 -0
  183. package/dist/esm/api/resources/datasets/client/requests/CreateDatasetFromCsvRequest.d.mts +16 -0
  184. package/dist/esm/api/resources/datasets/client/requests/CreateDatasetFromCsvRequest.mjs +2 -0
  185. package/dist/esm/api/resources/datasets/client/requests/CreateDatasetRequest.d.mts +16 -0
  186. package/dist/esm/api/resources/datasets/client/requests/CreateDatasetRequest.mjs +2 -0
  187. package/dist/esm/api/resources/datasets/client/requests/DeleteDatasetRequest.d.mts +10 -0
  188. package/dist/esm/api/resources/datasets/client/requests/DeleteDatasetRequest.mjs +2 -0
  189. package/dist/esm/api/resources/datasets/client/requests/GetDatasetRequest.d.mts +10 -0
  190. package/dist/esm/api/resources/datasets/client/requests/GetDatasetRequest.mjs +2 -0
  191. package/dist/esm/api/resources/datasets/client/requests/GetDatasetStatusHistoryRequest.d.mts +10 -0
  192. package/dist/esm/api/resources/datasets/client/requests/GetDatasetStatusHistoryRequest.mjs +2 -0
  193. package/dist/esm/api/resources/datasets/client/requests/ListDatasetsRequest.d.mts +19 -0
  194. package/dist/esm/api/resources/datasets/client/requests/ListDatasetsRequest.mjs +2 -0
  195. package/dist/esm/api/resources/datasets/client/requests/ListEntitiesInDatasetRequest.d.mts +21 -0
  196. package/dist/esm/api/resources/datasets/client/requests/ListEntitiesInDatasetRequest.mjs +2 -0
  197. package/dist/esm/api/resources/datasets/client/requests/RemoveEntitiesFromDatasetRequest.d.mts +15 -0
  198. package/dist/esm/api/resources/datasets/client/requests/RemoveEntitiesFromDatasetRequest.mjs +2 -0
  199. package/dist/esm/api/resources/datasets/client/requests/UpdateDatasetRequest.d.mts +16 -0
  200. package/dist/esm/api/resources/datasets/client/requests/UpdateDatasetRequest.mjs +2 -0
  201. package/dist/esm/api/resources/datasets/client/requests/UploadCsvToDatasetRequest.d.mts +14 -0
  202. package/dist/esm/api/resources/datasets/client/requests/UploadCsvToDatasetRequest.mjs +2 -0
  203. package/dist/esm/api/resources/datasets/client/requests/index.d.mts +11 -0
  204. package/dist/esm/api/resources/datasets/client/requests/index.mjs +1 -0
  205. package/dist/esm/api/resources/datasets/exports.d.mts +2 -0
  206. package/dist/esm/api/resources/datasets/exports.mjs +3 -0
  207. package/dist/esm/api/resources/datasets/index.d.mts +1 -0
  208. package/dist/esm/api/resources/datasets/index.mjs +1 -0
  209. package/dist/esm/api/resources/entities/client/Client.d.mts +164 -0
  210. package/dist/esm/api/resources/entities/client/Client.mjs +431 -0
  211. package/dist/esm/api/resources/entities/client/index.d.mts +1 -0
  212. package/dist/esm/api/resources/entities/client/index.mjs +1 -0
  213. package/dist/esm/api/resources/entities/client/requests/CreateEntitiesBatchRequest.d.mts +35 -0
  214. package/dist/esm/api/resources/entities/client/requests/CreateEntitiesBatchRequest.mjs +2 -0
  215. package/dist/esm/api/resources/entities/client/requests/DeleteEntityRequest.d.mts +10 -0
  216. package/dist/esm/api/resources/entities/client/requests/DeleteEntityRequest.mjs +2 -0
  217. package/dist/esm/api/resources/entities/client/requests/GetEntityRequest.d.mts +10 -0
  218. package/dist/esm/api/resources/entities/client/requests/GetEntityRequest.mjs +2 -0
  219. package/dist/esm/api/resources/entities/client/requests/ListEntitiesRequest.d.mts +19 -0
  220. package/dist/esm/api/resources/entities/client/requests/ListEntitiesRequest.mjs +2 -0
  221. package/dist/esm/api/resources/entities/client/requests/UpdateEntityRequest.d.mts +22 -0
  222. package/dist/esm/api/resources/entities/client/requests/UpdateEntityRequest.mjs +2 -0
  223. package/dist/esm/api/resources/entities/client/requests/index.d.mts +5 -0
  224. package/dist/esm/api/resources/entities/client/requests/index.mjs +1 -0
  225. package/dist/esm/api/resources/entities/exports.d.mts +2 -0
  226. package/dist/esm/api/resources/entities/exports.mjs +3 -0
  227. package/dist/esm/api/resources/entities/index.d.mts +1 -0
  228. package/dist/esm/api/resources/entities/index.mjs +1 -0
  229. package/dist/esm/api/resources/index.d.mts +4 -0
  230. package/dist/esm/api/resources/index.mjs +4 -0
  231. package/dist/esm/api/resources/jobs/client/Client.d.mts +32 -31
  232. package/dist/esm/api/resources/jobs/client/Client.mjs +75 -74
  233. package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.d.mts +28 -1
  234. package/dist/esm/api/resources/jobs/client/requests/SubmitRequestDto.mjs +13 -1
  235. package/dist/esm/api/resources/jobs/client/requests/index.d.mts +1 -1
  236. package/dist/esm/api/resources/jobs/client/requests/index.mjs +1 -1
  237. package/dist/esm/api/resources/meta/client/Client.d.mts +15 -3
  238. package/dist/esm/api/resources/meta/client/Client.mjs +50 -2
  239. package/dist/esm/api/resources/monitors/client/Client.d.mts +40 -40
  240. package/dist/esm/api/resources/monitors/client/Client.mjs +101 -101
  241. package/dist/esm/api/types/AdditionalAttributes.d.mts +7 -0
  242. package/dist/esm/api/types/AdditionalAttributes.mjs +2 -0
  243. package/dist/esm/api/types/CompanyAttributes.d.mts +17 -0
  244. package/dist/esm/api/types/CompanyAttributes.mjs +2 -0
  245. package/dist/esm/api/types/ConnectedEntity.d.mts +30 -0
  246. package/dist/esm/api/types/ConnectedEntity.mjs +2 -0
  247. package/dist/esm/api/types/CreateDatasetCsvResponse.d.mts +10 -0
  248. package/dist/esm/api/types/CreateDatasetCsvResponse.mjs +2 -0
  249. package/dist/esm/api/types/CreateEntitiesBatchResponse.d.mts +7 -0
  250. package/dist/esm/api/types/CreateEntitiesBatchResponse.mjs +2 -0
  251. package/dist/esm/api/types/CreateEntityRequest.d.mts +13 -0
  252. package/dist/esm/api/types/CreateEntityRequest.mjs +2 -0
  253. package/dist/esm/api/types/CreateEntityResponse.d.mts +6 -0
  254. package/dist/esm/api/types/CreateEntityResponse.mjs +2 -0
  255. package/dist/esm/api/types/DatasetEntityIdsRequest.d.mts +4 -0
  256. package/dist/esm/api/types/DatasetEntityIdsRequest.mjs +2 -0
  257. package/dist/esm/api/types/DatasetEntityListResponse.d.mts +11 -0
  258. package/dist/esm/api/types/DatasetEntityListResponse.mjs +2 -0
  259. package/dist/esm/api/types/DatasetListResponse.d.mts +11 -0
  260. package/dist/esm/api/types/DatasetListResponse.mjs +2 -0
  261. package/dist/esm/api/types/DatasetResponse.d.mts +20 -0
  262. package/dist/esm/api/types/DatasetResponse.mjs +2 -0
  263. package/dist/esm/api/types/DatasetSortBy.d.mts +7 -0
  264. package/dist/esm/api/types/DatasetSortBy.mjs +7 -0
  265. package/dist/esm/api/types/DatasetStatus.d.mts +15 -0
  266. package/dist/esm/api/types/DatasetStatus.mjs +15 -0
  267. package/dist/esm/api/types/DatasetStatusEntry.d.mts +11 -0
  268. package/dist/esm/api/types/DatasetStatusEntry.mjs +2 -0
  269. package/dist/esm/api/types/DatasetStatusHistoryResponse.d.mts +7 -0
  270. package/dist/esm/api/types/DatasetStatusHistoryResponse.mjs +2 -0
  271. package/dist/esm/api/types/EnrichmentType.d.mts +3 -1
  272. package/dist/esm/api/types/EnrichmentType.mjs +3 -1
  273. package/dist/esm/api/types/EntityListResponse.d.mts +11 -0
  274. package/dist/esm/api/types/EntityListResponse.mjs +2 -0
  275. package/dist/esm/api/types/EntityResponse.d.mts +20 -0
  276. package/dist/esm/api/types/EntityResponse.mjs +2 -0
  277. package/dist/esm/api/types/EntitySortBy.d.mts +7 -0
  278. package/dist/esm/api/types/EntitySortBy.mjs +7 -0
  279. package/dist/esm/api/types/EntityStatus.d.mts +15 -0
  280. package/dist/esm/api/types/EntityStatus.mjs +15 -0
  281. package/dist/esm/api/types/EntitySummary.d.mts +18 -0
  282. package/dist/esm/api/types/EntitySummary.mjs +2 -0
  283. package/dist/esm/api/types/EntityType.d.mts +11 -0
  284. package/dist/esm/api/types/EntityType.mjs +11 -0
  285. package/dist/esm/api/types/EntityValidationErrorBody.d.mts +16 -0
  286. package/dist/esm/api/types/EntityValidationErrorBody.mjs +2 -0
  287. package/dist/esm/api/types/GetPlanLimitsResponseDto.d.mts +5 -0
  288. package/dist/esm/api/types/GetPlanLimitsResponseDto.mjs +2 -0
  289. package/dist/esm/api/types/ManageEntitiesResponse.d.mts +6 -0
  290. package/dist/esm/api/types/ManageEntitiesResponse.mjs +2 -0
  291. package/dist/esm/api/types/MonitorListItemDto.d.mts +4 -2
  292. package/dist/esm/api/types/MonitorRecord.d.mts +1 -0
  293. package/dist/esm/api/types/PlanFeature.d.mts +12 -0
  294. package/dist/esm/api/types/PlanFeature.mjs +2 -0
  295. package/dist/esm/api/types/PullJobResponseDto.d.mts +12 -8
  296. package/dist/esm/api/types/PullJobResponseDto.mjs +8 -1
  297. package/dist/esm/api/types/Record_.d.mts +5 -0
  298. package/dist/esm/api/types/SkippedRow.d.mts +13 -0
  299. package/dist/esm/api/types/SkippedRow.mjs +2 -0
  300. package/dist/esm/api/types/SortOrder.d.mts +11 -0
  301. package/dist/esm/api/types/SortOrder.mjs +11 -0
  302. package/dist/esm/api/types/UploadCsvToDatasetResponse.d.mts +8 -0
  303. package/dist/esm/api/types/UploadCsvToDatasetResponse.mjs +2 -0
  304. package/dist/esm/api/types/UserJob.d.mts +12 -0
  305. package/dist/esm/api/types/UserJob.mjs +8 -1
  306. package/dist/esm/api/types/ValidationReport.d.mts +17 -0
  307. package/dist/esm/api/types/ValidationReport.mjs +2 -0
  308. package/dist/esm/api/types/index.d.mts +29 -0
  309. package/dist/esm/api/types/index.mjs +29 -0
  310. package/dist/esm/core/auth/BasicAuth.d.mts +2 -2
  311. package/dist/esm/core/auth/BasicAuth.mjs +7 -1
  312. package/dist/esm/core/exports.d.mts +1 -0
  313. package/dist/esm/core/exports.mjs +1 -0
  314. package/dist/esm/core/fetcher/BinaryResponse.d.mts +1 -1
  315. package/dist/esm/core/fetcher/Fetcher.d.mts +2 -0
  316. package/dist/esm/core/fetcher/Fetcher.mjs +4 -0
  317. package/dist/esm/core/fetcher/index.d.mts +2 -0
  318. package/dist/esm/core/fetcher/index.mjs +1 -0
  319. package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
  320. package/dist/esm/core/fetcher/makePassthroughRequest.mjs +132 -0
  321. package/dist/esm/core/file/exports.d.mts +1 -0
  322. package/dist/esm/core/file/exports.mjs +1 -0
  323. package/dist/esm/core/file/file.d.mts +10 -0
  324. package/dist/esm/core/file/file.mjs +185 -0
  325. package/dist/esm/core/file/index.d.mts +2 -0
  326. package/dist/esm/core/file/index.mjs +2 -0
  327. package/dist/esm/core/file/types.d.mts +66 -0
  328. package/dist/esm/core/file/types.mjs +1 -0
  329. package/dist/esm/core/form-data-utils/FormDataWrapper.d.mts +15 -0
  330. package/dist/esm/core/form-data-utils/FormDataWrapper.mjs +147 -0
  331. package/dist/esm/core/form-data-utils/encodeAsFormParameter.d.mts +1 -0
  332. package/dist/esm/core/form-data-utils/encodeAsFormParameter.mjs +9 -0
  333. package/dist/esm/core/form-data-utils/index.d.mts +2 -0
  334. package/dist/esm/core/form-data-utils/index.mjs +2 -0
  335. package/dist/esm/core/index.d.mts +2 -0
  336. package/dist/esm/core/index.mjs +2 -0
  337. package/dist/esm/errors/CatchAllApiError.d.mts +3 -1
  338. package/dist/esm/errors/CatchAllApiError.mjs +4 -1
  339. package/dist/esm/errors/CatchAllApiTimeoutError.d.mts +4 -1
  340. package/dist/esm/errors/CatchAllApiTimeoutError.mjs +4 -1
  341. package/dist/esm/errors/handleNonStatusCodeError.mjs +4 -1
  342. package/dist/esm/version.d.mts +1 -1
  343. package/dist/esm/version.mjs +1 -1
  344. package/package.json +29 -7
  345. package/reference.md +1312 -58
package/README.md CHANGED
@@ -1,284 +1,365 @@
1
- # Newscatcher CatchAll TypeScript Library
2
-
3
- [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FNewscatcher%2Fnewscatcher-catchall-typescript)
4
- [![npm shield](https://img.shields.io/npm/v/newscatcher-catchall-sdk)](https://www.npmjs.com/package/newscatcher-catchall-sdk)
5
-
6
- The Newscatcher CatchAll TypeScript library provides convenient access to the Web Search APIs from TypeScript.
7
-
8
- ## Table of Contents
9
-
10
- - [Documentation](#documentation)
11
- - [Installation](#installation)
12
- - [Reference](#reference)
13
- - [Usage](#usage)
14
- - [Request and Response Types](#request-and-response-types)
15
- - [Exception Handling](#exception-handling)
16
- - [Advanced](#advanced)
17
- - [Additional Headers](#additional-headers)
18
- - [Additional Query String Parameters](#additional-query-string-parameters)
19
- - [Retries](#retries)
20
- - [Timeouts](#timeouts)
21
- - [Aborting Requests](#aborting-requests)
22
- - [Access Raw Response Data](#access-raw-response-data)
23
- - [Logging](#logging)
24
- - [Runtime Compatibility](#runtime-compatibility)
25
- - [Contributing](#contributing)
26
- - [Support](#support)
27
-
28
- ## Documentation
29
-
30
- API reference documentation is available [here](https://www.newscatcherapi.com/docs/web-search-api/api-reference/jobs/initialize-job).
31
-
32
- ## Installation
33
-
34
- ```sh
35
- npm i -s newscatcher-catchall-sdk
36
- ```
37
-
38
- ## Reference
39
-
40
- A full reference for this library is available [here](https://github.com/Newscatcher/newscatcher-catchall-typescript/blob/HEAD/./reference.md).
41
-
42
- ## Usage
43
-
44
- Instantiate and use the client with the following:
45
-
46
- ```typescript
47
- import { CatchAllApiClient } from "newscatcher-catchall-sdk";
48
-
49
- const client = new CatchAllApiClient({ apiKey: "YOUR_API_KEY" });
50
- await client.jobs.createJob({
51
- query: "AI company acquisitions",
52
- context: "Focus on deal size and acquiring company details",
53
- limit: 10,
54
- start_date: "2026-01-30T00:00:00Z",
55
- end_date: "2026-02-05T00:00:00Z"
56
- });
57
- ```
58
-
59
- ## Request and Response Types
60
-
61
- The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
62
- following namespace:
63
-
64
- ```typescript
65
- import { CatchAllApi } from "newscatcher-catchall-sdk";
66
-
67
- const request: CatchAllApi.InitializeRequestDto = {
68
- ...
69
- };
70
- ```
71
-
72
- ## Exception Handling
73
-
74
- When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
75
- will be thrown.
76
-
77
- ```typescript
78
- import { CatchAllApiError } from "newscatcher-catchall-sdk";
79
-
80
- try {
81
- await client.jobs.createJob(...);
82
- } catch (err) {
83
- if (err instanceof CatchAllApiError) {
84
- console.log(err.statusCode);
85
- console.log(err.message);
86
- console.log(err.body);
87
- console.log(err.rawResponse);
88
- }
89
- }
90
- ```
91
-
92
- ## Advanced
93
-
94
- ### Additional Headers
95
-
96
- If you would like to send additional headers as part of the request, use the `headers` request option.
97
-
98
- ```typescript
99
- import { CatchAllApiClient } from "newscatcher-catchall-sdk";
100
-
101
- const client = new CatchAllApiClient({
102
- ...
103
- headers: {
104
- 'X-Custom-Header': 'custom value'
105
- }
106
- });
107
-
108
- const response = await client.jobs.createJob(..., {
109
- headers: {
110
- 'X-Custom-Header': 'custom value'
111
- }
112
- });
113
- ```
114
-
115
- ### Additional Query String Parameters
116
-
117
- If you would like to send additional query string parameters as part of the request, use the `queryParams` request option.
118
-
119
- ```typescript
120
- const response = await client.jobs.createJob(..., {
121
- queryParams: {
122
- 'customQueryParamKey': 'custom query param value'
123
- }
124
- });
125
- ```
126
-
127
- ### Retries
128
-
129
- The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
130
- as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
131
- retry limit (default: 2).
132
-
133
- A request is deemed retryable when any of the following HTTP status codes is returned:
134
-
135
- - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
136
- - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
137
- - [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
138
-
139
- Use the `maxRetries` request option to configure this behavior.
140
-
141
- ```typescript
142
- const response = await client.jobs.createJob(..., {
143
- maxRetries: 0 // override maxRetries at the request level
144
- });
145
- ```
146
-
147
- ### Timeouts
148
-
149
- The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
150
-
151
- ```typescript
152
- const response = await client.jobs.createJob(..., {
153
- timeoutInSeconds: 30 // override timeout to 30s
154
- });
155
- ```
156
-
157
- ### Aborting Requests
158
-
159
- The SDK allows users to abort requests at any point by passing in an abort signal.
160
-
161
- ```typescript
162
- const controller = new AbortController();
163
- const response = await client.jobs.createJob(..., {
164
- abortSignal: controller.signal
165
- });
166
- controller.abort(); // aborts the request
167
- ```
168
-
169
- ### Access Raw Response Data
170
-
171
- The SDK provides access to raw response data, including headers, through the `.withRawResponse()` method.
172
- The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
173
-
174
- ```typescript
175
- const { data, rawResponse } = await client.jobs.createJob(...).withRawResponse();
176
-
177
- console.log(data);
178
- console.log(rawResponse.headers['X-My-Header']);
179
- ```
180
-
181
- ### Logging
182
-
183
- The SDK supports logging. You can configure the logger by passing in a `logging` object to the client options.
184
-
185
- ```typescript
186
- import { CatchAllApiClient, logging } from "newscatcher-catchall-sdk";
187
-
188
- const client = new CatchAllApiClient({
189
- ...
190
- logging: {
191
- level: logging.LogLevel.Debug, // defaults to logging.LogLevel.Info
192
- logger: new logging.ConsoleLogger(), // defaults to ConsoleLogger
193
- silent: false, // defaults to true, set to false to enable logging
194
- }
195
- });
196
- ```
197
- The `logging` object can have the following properties:
198
- - `level`: The log level to use. Defaults to `logging.LogLevel.Info`.
199
- - `logger`: The logger to use. Defaults to a `logging.ConsoleLogger`.
200
- - `silent`: Whether to silence the logger. Defaults to `true`.
201
-
202
- The `level` property can be one of the following values:
203
- - `logging.LogLevel.Debug`
204
- - `logging.LogLevel.Info`
205
- - `logging.LogLevel.Warn`
206
- - `logging.LogLevel.Error`
207
-
208
- To provide a custom logger, you can pass in an object that implements the `logging.ILogger` interface.
209
-
210
- <details>
211
- <summary>Custom logger examples</summary>
212
-
213
- Here's an example using the popular `winston` logging library.
214
- ```ts
215
- import winston from 'winston';
216
-
217
- const winstonLogger = winston.createLogger({...});
218
-
219
- const logger: logging.ILogger = {
220
- debug: (msg, ...args) => winstonLogger.debug(msg, ...args),
221
- info: (msg, ...args) => winstonLogger.info(msg, ...args),
222
- warn: (msg, ...args) => winstonLogger.warn(msg, ...args),
223
- error: (msg, ...args) => winstonLogger.error(msg, ...args),
224
- };
225
- ```
226
-
227
- Here's an example using the popular `pino` logging library.
228
-
229
- ```ts
230
- import pino from 'pino';
231
-
232
- const pinoLogger = pino({...});
233
-
234
- const logger: logging.ILogger = {
235
- debug: (msg, ...args) => pinoLogger.debug(args, msg),
236
- info: (msg, ...args) => pinoLogger.info(args, msg),
237
- warn: (msg, ...args) => pinoLogger.warn(args, msg),
238
- error: (msg, ...args) => pinoLogger.error(args, msg),
239
- };
240
- ```
241
- </details>
242
-
243
-
244
- ### Runtime Compatibility
245
-
246
-
247
- The SDK works in the following runtimes:
248
-
249
-
250
-
251
- - Node.js 18+
252
- - Vercel
253
- - Cloudflare Workers
254
- - Deno v1.25+
255
- - Bun 1.0+
256
- - React Native
257
-
258
- ### Customizing Fetch Client
259
-
260
- The SDK provides a way for you to customize the underlying HTTP client / Fetch function. If you're running in an
261
- unsupported environment, this provides a way for you to break glass and ensure the SDK works.
262
-
263
- ```typescript
264
- import { CatchAllApiClient } from "newscatcher-catchall-sdk";
265
-
266
- const client = new CatchAllApiClient({
267
- ...
268
- fetcher: // provide your implementation here
269
- });
270
- ```
271
-
272
- ## Contributing
273
-
274
- While we value open-source contributions to this SDK, this library is generated programmatically.
275
- Additions made directly to this library would have to be moved over to our generation code,
276
- otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
277
- a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
278
- an issue first to discuss with us!
279
-
280
- On the other hand, contributions to the README are always very welcome!
281
- ## Support
282
-
283
- - Documentation: [www.newscatcherapi.com/docs/web-search-api](https://www.newscatcherapi.com/docs/web-search-api/get-started/introduction)
284
- - Support: <support@newscatcherapi.com>
1
+ # Newscatcher TypeScript Library
2
+
3
+ [![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FNewscatcher%2Fnewscatcher-catchall-typescript)
4
+ [![npm shield](https://img.shields.io/npm/v/newscatcher-catchall-sdk)](https://www.npmjs.com/package/newscatcher-catchall-sdk)
5
+
6
+ The Newscatcher TypeScript library provides convenient access to the Newscatcher APIs from TypeScript.
7
+
8
+ ## Table of Contents
9
+
10
+ - [Documentation](#documentation)
11
+ - [Installation](#installation)
12
+ - [Reference](#reference)
13
+ - [Usage](#usage)
14
+ - [Environments](#environments)
15
+ - [Request and Response Types](#request-and-response-types)
16
+ - [Exception Handling](#exception-handling)
17
+ - [File Uploads](#file-uploads)
18
+ - [Advanced](#advanced)
19
+ - [Subpackage Exports](#subpackage-exports)
20
+ - [Additional Headers](#additional-headers)
21
+ - [Additional Query String Parameters](#additional-query-string-parameters)
22
+ - [Retries](#retries)
23
+ - [Timeouts](#timeouts)
24
+ - [Aborting Requests](#aborting-requests)
25
+ - [Access Raw Response Data](#access-raw-response-data)
26
+ - [Logging](#logging)
27
+ - [Custom Fetch](#custom-fetch)
28
+ - [Runtime Compatibility](#runtime-compatibility)
29
+ - [Contributing](#contributing)
30
+ - [Support](#support)
31
+
32
+ ## Documentation
33
+
34
+ API reference documentation is available [here](https://www.newscatcherapi.com/docs/web-search-api/api-reference/jobs/initialize-job).
35
+
36
+ ## Installation
37
+
38
+ ```sh
39
+ npm i -s newscatcher-catchall-sdk
40
+ ```
41
+
42
+ ## Reference
43
+
44
+ A full reference for this library is available [here](https://github.com/Newscatcher/newscatcher-catchall-typescript/blob/HEAD/./reference.md).
45
+
46
+ ## Usage
47
+
48
+ Instantiate and use the client with the following:
49
+
50
+ ```typescript
51
+ import { CatchAllApiClient } from "newscatcher-catchall-sdk";
52
+
53
+ const client = new CatchAllApiClient({ apiKey: "YOUR_API_KEY" });
54
+ await client.jobs.createJob({
55
+ query: "Series B funding rounds for SaaS startups",
56
+ context: "Focus on funding amount and company name",
57
+ limit: 10,
58
+ start_date: "2026-02-18T00:00:00Z",
59
+ end_date: "2026-02-23T00:00:00Z",
60
+ mode: "base"
61
+ });
62
+ ```
63
+
64
+ ## Environments
65
+
66
+ This SDK allows you to configure different environments for API requests.
67
+
68
+ ```typescript
69
+ import { CatchAllApiClient, CatchAllApiEnvironment } from "newscatcher-catchall-sdk";
70
+
71
+ const client = new CatchAllApiClient({
72
+ environment: CatchAllApiEnvironment.Default,
73
+ });
74
+ ```
75
+
76
+ ## Request and Response Types
77
+
78
+ The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
79
+ following namespace:
80
+
81
+ ```typescript
82
+ import { CatchAllApi } from "newscatcher-catchall-sdk";
83
+
84
+ const request: CatchAllApi.GetUserJobsRequest = {
85
+ ...
86
+ };
87
+ ```
88
+
89
+ ## Exception Handling
90
+
91
+ When the API returns a non-success status code (4xx or 5xx response), a subclass of the following error
92
+ will be thrown.
93
+
94
+ ```typescript
95
+ import { CatchAllApiError } from "newscatcher-catchall-sdk";
96
+
97
+ try {
98
+ await client.jobs.createJob(...);
99
+ } catch (err) {
100
+ if (err instanceof CatchAllApiError) {
101
+ console.log(err.statusCode);
102
+ console.log(err.message);
103
+ console.log(err.body);
104
+ console.log(err.rawResponse);
105
+ }
106
+ }
107
+ ```
108
+
109
+ ## File Uploads
110
+
111
+ You can upload files using the client:
112
+
113
+ ```typescript
114
+ import { createReadStream } from "fs";
115
+ import * as fs from "fs";
116
+ import { CatchAllApiClient } from "newscatcher-catchall-sdk";
117
+
118
+ const client = new CatchAllApiClient({ apiKey: "YOUR_API_KEY" });
119
+ await client.datasets.createDatasetFromCsv({
120
+ file: fs.createReadStream("/path/to/your/file"),
121
+ name: "name"
122
+ });
123
+ ```
124
+ The client accepts a variety of types for file upload parameters:
125
+ * Stream types: `fs.ReadStream`, `stream.Readable`, and `ReadableStream`
126
+ * Buffered types: `Buffer`, `Blob`, `File`, `ArrayBuffer`, `ArrayBufferView`, and `Uint8Array`
127
+
128
+ ### Metadata
129
+
130
+ You can configure metadata when uploading a file:
131
+ ```typescript
132
+ const file: Uploadable.WithMetadata = {
133
+ data: createReadStream("path/to/file"),
134
+ filename: "my-file", // optional
135
+ contentType: "audio/mpeg", // optional
136
+ contentLength: 1949, // optional
137
+ };
138
+ ```
139
+
140
+ Alternatively, you can upload a file directly from a file path:
141
+ ```typescript
142
+ const file : Uploadable.FromPath = {
143
+ path: "path/to/file",
144
+ filename: "my-file", // optional
145
+ contentType: "audio/mpeg", // optional
146
+ contentLength: 1949, // optional
147
+ };
148
+ ```
149
+
150
+ The metadata is used to set the `Content-Length`, `Content-Type`, and `Content-Disposition` headers. If not provided, the client will attempt to determine them automatically.
151
+ For example, `fs.ReadStream` has a `path` property which the SDK uses to retrieve the file size from the filesystem without loading it into memory.
152
+
153
+
154
+ ## Advanced
155
+
156
+ ### Subpackage Exports
157
+
158
+ This SDK supports direct imports of subpackage clients, which allows JavaScript bundlers to tree-shake and include only the imported subpackage code. This results in much smaller bundle sizes.
159
+
160
+ ```typescript
161
+ import { JobsClient } from 'newscatcher-catchall-sdk/jobs';
162
+
163
+ const client = new JobsClient({...});
164
+ ```
165
+
166
+ ### Additional Headers
167
+
168
+ If you would like to send additional headers as part of the request, use the `headers` request option.
169
+
170
+ ```typescript
171
+ import { CatchAllApiClient } from "newscatcher-catchall-sdk";
172
+
173
+ const client = new CatchAllApiClient({
174
+ ...
175
+ headers: {
176
+ 'X-Custom-Header': 'custom value'
177
+ }
178
+ });
179
+
180
+ const response = await client.jobs.createJob(..., {
181
+ headers: {
182
+ 'X-Custom-Header': 'custom value'
183
+ }
184
+ });
185
+ ```
186
+
187
+ ### Additional Query String Parameters
188
+
189
+ If you would like to send additional query string parameters as part of the request, use the `queryParams` request option.
190
+
191
+ ```typescript
192
+ const response = await client.jobs.createJob(..., {
193
+ queryParams: {
194
+ 'customQueryParamKey': 'custom query param value'
195
+ }
196
+ });
197
+ ```
198
+
199
+ ### Retries
200
+
201
+ The SDK is instrumented with automatic retries with exponential backoff. A request will be retried as long
202
+ as the request is deemed retryable and the number of retry attempts has not grown larger than the configured
203
+ retry limit (default: 2).
204
+
205
+ A request is deemed retryable when any of the following HTTP status codes is returned:
206
+
207
+ - [408](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408) (Timeout)
208
+ - [429](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429) (Too Many Requests)
209
+ - [5XX](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500) (Internal Server Errors)
210
+
211
+ Use the `maxRetries` request option to configure this behavior.
212
+
213
+ ```typescript
214
+ const response = await client.jobs.createJob(..., {
215
+ maxRetries: 0 // override maxRetries at the request level
216
+ });
217
+ ```
218
+
219
+ ### Timeouts
220
+
221
+ The SDK defaults to a 60 second timeout. Use the `timeoutInSeconds` option to configure this behavior.
222
+
223
+ ```typescript
224
+ const response = await client.jobs.createJob(..., {
225
+ timeoutInSeconds: 30 // override timeout to 30s
226
+ });
227
+ ```
228
+
229
+ ### Aborting Requests
230
+
231
+ The SDK allows users to abort requests at any point by passing in an abort signal.
232
+
233
+ ```typescript
234
+ const controller = new AbortController();
235
+ const response = await client.jobs.createJob(..., {
236
+ abortSignal: controller.signal
237
+ });
238
+ controller.abort(); // aborts the request
239
+ ```
240
+
241
+ ### Access Raw Response Data
242
+
243
+ The SDK provides access to raw response data, including headers, through the `.withRawResponse()` method.
244
+ The `.withRawResponse()` method returns a promise that results to an object with a `data` and a `rawResponse` property.
245
+
246
+ ```typescript
247
+ const { data, rawResponse } = await client.jobs.createJob(...).withRawResponse();
248
+
249
+ console.log(data);
250
+ console.log(rawResponse.headers['X-My-Header']);
251
+ ```
252
+
253
+ ### Logging
254
+
255
+ The SDK supports logging. You can configure the logger by passing in a `logging` object to the client options.
256
+
257
+ ```typescript
258
+ import { CatchAllApiClient, logging } from "newscatcher-catchall-sdk";
259
+
260
+ const client = new CatchAllApiClient({
261
+ ...
262
+ logging: {
263
+ level: logging.LogLevel.Debug, // defaults to logging.LogLevel.Info
264
+ logger: new logging.ConsoleLogger(), // defaults to ConsoleLogger
265
+ silent: false, // defaults to true, set to false to enable logging
266
+ }
267
+ });
268
+ ```
269
+ The `logging` object can have the following properties:
270
+ - `level`: The log level to use. Defaults to `logging.LogLevel.Info`.
271
+ - `logger`: The logger to use. Defaults to a `logging.ConsoleLogger`.
272
+ - `silent`: Whether to silence the logger. Defaults to `true`.
273
+
274
+ The `level` property can be one of the following values:
275
+ - `logging.LogLevel.Debug`
276
+ - `logging.LogLevel.Info`
277
+ - `logging.LogLevel.Warn`
278
+ - `logging.LogLevel.Error`
279
+
280
+ To provide a custom logger, you can pass in an object that implements the `logging.ILogger` interface.
281
+
282
+ <details>
283
+ <summary>Custom logger examples</summary>
284
+
285
+ Here's an example using the popular `winston` logging library.
286
+ ```ts
287
+ import winston from 'winston';
288
+
289
+ const winstonLogger = winston.createLogger({...});
290
+
291
+ const logger: logging.ILogger = {
292
+ debug: (msg, ...args) => winstonLogger.debug(msg, ...args),
293
+ info: (msg, ...args) => winstonLogger.info(msg, ...args),
294
+ warn: (msg, ...args) => winstonLogger.warn(msg, ...args),
295
+ error: (msg, ...args) => winstonLogger.error(msg, ...args),
296
+ };
297
+ ```
298
+
299
+ Here's an example using the popular `pino` logging library.
300
+
301
+ ```ts
302
+ import pino from 'pino';
303
+
304
+ const pinoLogger = pino({...});
305
+
306
+ const logger: logging.ILogger = {
307
+ debug: (msg, ...args) => pinoLogger.debug(args, msg),
308
+ info: (msg, ...args) => pinoLogger.info(args, msg),
309
+ warn: (msg, ...args) => pinoLogger.warn(args, msg),
310
+ error: (msg, ...args) => pinoLogger.error(args, msg),
311
+ };
312
+ ```
313
+ </details>
314
+
315
+
316
+ ### Custom Fetch
317
+
318
+ The SDK provides a low-level `fetch` method for making custom HTTP requests while still
319
+ benefiting from SDK-level configuration like authentication, retries, timeouts, and logging.
320
+ This is useful for calling API endpoints not yet supported in the SDK.
321
+
322
+ ```typescript
323
+ const response = await client.fetch("/v1/custom/endpoint", {
324
+ method: "GET",
325
+ }, {
326
+ timeoutInSeconds: 30,
327
+ maxRetries: 3,
328
+ headers: {
329
+ "X-Custom-Header": "custom-value",
330
+ },
331
+ });
332
+
333
+ const data = await response.json();
334
+ ```
335
+
336
+ ### Runtime Compatibility
337
+
338
+
339
+ The SDK works in the following runtimes:
340
+
341
+
342
+
343
+ - Node.js 18+
344
+ - Vercel
345
+ - Cloudflare Workers
346
+ - Deno v1.25+
347
+ - Bun 1.0+
348
+ - React Native
349
+
350
+
351
+ ## Contributing
352
+
353
+ While we value open-source contributions to this SDK, this library is generated programmatically.
354
+ Additions made directly to this library would have to be moved over to our generation code,
355
+ otherwise they would be overwritten upon the next generated release. Feel free to open a PR as
356
+ a proof of concept, but know that we will not be able to merge it as-is. We suggest opening
357
+ an issue first to discuss with us!
358
+
359
+ On the other hand, contributions to the README are always very welcome!
360
+ ## Support
361
+
362
+ - Documentation: [www.newscatcherapi.com/docs/web-search-api](https://www.newscatcherapi.com/docs/web-search-api/get-started/introduction)
363
+ - Support: <support@newscatcherapi.com>
364
+
365
+
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
43
43
  const headers = (0, headers_js_1.mergeHeaders)({
44
44
  "X-Fern-Language": "JavaScript",
45
45
  "X-Fern-SDK-Name": "newscatcher-catchall-sdk",
46
- "X-Fern-SDK-Version": "1.1.2",
47
- "User-Agent": "newscatcher-catchall-sdk/1.1.2",
46
+ "X-Fern-SDK-Version": "1.4.0",
47
+ "User-Agent": "newscatcher-catchall-sdk/1.4.0",
48
48
  "X-Fern-Runtime": core.RUNTIME.type,
49
49
  "X-Fern-Runtime-Version": core.RUNTIME.version,
50
50
  }, options === null || options === void 0 ? void 0 : options.headers);