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
@@ -0,0 +1,468 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || (function () {
20
+ var ownKeys = function(o) {
21
+ ownKeys = Object.getOwnPropertyNames || function (o) {
22
+ var ar = [];
23
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
24
+ return ar;
25
+ };
26
+ return ownKeys(o);
27
+ };
28
+ return function (mod) {
29
+ if (mod && mod.__esModule) return mod;
30
+ var result = {};
31
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
32
+ __setModuleDefault(result, mod);
33
+ return result;
34
+ };
35
+ })();
36
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
37
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
38
+ return new (P || (P = Promise))(function (resolve, reject) {
39
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
40
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
41
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
42
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
43
+ });
44
+ };
45
+ var __rest = (this && this.__rest) || function (s, e) {
46
+ var t = {};
47
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
48
+ t[p] = s[p];
49
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
50
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
51
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
52
+ t[p[i]] = s[p[i]];
53
+ }
54
+ return t;
55
+ };
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
+ exports.EntitiesClient = void 0;
58
+ const BaseClient_js_1 = require("../../../../BaseClient.js");
59
+ const headers_js_1 = require("../../../../core/headers.js");
60
+ const core = __importStar(require("../../../../core/index.js"));
61
+ const environments = __importStar(require("../../../../environments.js"));
62
+ const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
63
+ const errors = __importStar(require("../../../../errors/index.js"));
64
+ const CatchAllApi = __importStar(require("../../../index.js"));
65
+ /**
66
+ * Operations to create, update, and delete company entities.
67
+ *
68
+ * Entities are the building blocks of Company Search. Each entity represents
69
+ * a company (or person) you want to track. Add identifying information such as
70
+ * domain, alternative names, and key persons to improve matching quality.
71
+ */
72
+ class EntitiesClient {
73
+ constructor(options = {}) {
74
+ this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
75
+ }
76
+ /**
77
+ * Returns a paginated list of entities belonging to the authenticated
78
+ * organization. Supports filtering by status and entity type, and
79
+ * sorting by name, status, or creation date.
80
+ *
81
+ * @param {CatchAllApi.ListEntitiesRequest} request
82
+ * @param {EntitiesClient.RequestOptions} requestOptions - Request-specific configuration.
83
+ *
84
+ * @throws {@link CatchAllApi.ForbiddenError}
85
+ *
86
+ * @example
87
+ * await client.entities.listEntities({
88
+ * search: "NewsCatcher"
89
+ * })
90
+ */
91
+ listEntities(request = {}, requestOptions) {
92
+ return core.HttpResponsePromise.fromPromise(this.__listEntities(request, requestOptions));
93
+ }
94
+ __listEntities() {
95
+ return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
96
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
97
+ const { page, page_size: pageSize, search, status, entity_type: entityType, sort_by: sortBy, sort_order: sortOrder, } = request;
98
+ const _queryParams = {
99
+ page,
100
+ page_size: pageSize,
101
+ search,
102
+ status: status != null ? status : undefined,
103
+ entity_type: entityType != null ? entityType : undefined,
104
+ sort_by: sortBy != null ? sortBy : undefined,
105
+ sort_order: sortOrder != null ? sortOrder : undefined,
106
+ };
107
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
108
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
109
+ const _response = yield core.fetcher({
110
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CatchAllApiEnvironment.Default, "catchAll/entities"),
111
+ method: "GET",
112
+ headers: _headers,
113
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
114
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
115
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
116
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
117
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
118
+ logging: this._options.logging,
119
+ });
120
+ if (_response.ok) {
121
+ return { data: _response.body, rawResponse: _response.rawResponse };
122
+ }
123
+ if (_response.error.reason === "status-code") {
124
+ switch (_response.error.statusCode) {
125
+ case 403:
126
+ throw new CatchAllApi.ForbiddenError(_response.error.body, _response.rawResponse);
127
+ default:
128
+ throw new errors.CatchAllApiError({
129
+ statusCode: _response.error.statusCode,
130
+ body: _response.error.body,
131
+ rawResponse: _response.rawResponse,
132
+ });
133
+ }
134
+ }
135
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/catchAll/entities");
136
+ });
137
+ }
138
+ /**
139
+ * Creates a new company entity and begins background enrichment.
140
+ *
141
+ * The entity status starts as `pending` and transitions to `ready` once
142
+ * enrichment completes. Provide as much identifying information as
143
+ * possible — `domain` is the highest-signal field because it is
144
+ * unambiguous.
145
+ *
146
+ * @param {CatchAllApi.CreateEntityRequest} request
147
+ * @param {EntitiesClient.RequestOptions} requestOptions - Request-specific configuration.
148
+ *
149
+ * @throws {@link CatchAllApi.BadRequestError}
150
+ * @throws {@link CatchAllApi.ForbiddenError}
151
+ *
152
+ * @example
153
+ * await client.entities.createEntity({
154
+ * name: "NewsCatcher",
155
+ * entity_type: "company",
156
+ * description: "AI-powered news data provider",
157
+ * additional_attributes: {
158
+ * company_attributes: {
159
+ * domain: "newscatcherapi.com",
160
+ * key_persons: ["Artem Bugara", "Maksym Sugonyaka"],
161
+ * alternative_names: ["NC", "NewsCatcher API"]
162
+ * }
163
+ * }
164
+ * })
165
+ */
166
+ createEntity(request, requestOptions) {
167
+ return core.HttpResponsePromise.fromPromise(this.__createEntity(request, requestOptions));
168
+ }
169
+ __createEntity(request, requestOptions) {
170
+ return __awaiter(this, void 0, void 0, function* () {
171
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
172
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
173
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
174
+ const _response = yield core.fetcher({
175
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CatchAllApiEnvironment.Default, "catchAll/entities"),
176
+ method: "POST",
177
+ headers: _headers,
178
+ contentType: "application/json",
179
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
180
+ requestType: "json",
181
+ body: request,
182
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
183
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
184
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
185
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
186
+ logging: this._options.logging,
187
+ });
188
+ if (_response.ok) {
189
+ return { data: _response.body, rawResponse: _response.rawResponse };
190
+ }
191
+ if (_response.error.reason === "status-code") {
192
+ switch (_response.error.statusCode) {
193
+ case 400:
194
+ throw new CatchAllApi.BadRequestError(_response.error.body, _response.rawResponse);
195
+ case 403:
196
+ throw new CatchAllApi.ForbiddenError(_response.error.body, _response.rawResponse);
197
+ default:
198
+ throw new errors.CatchAllApiError({
199
+ statusCode: _response.error.statusCode,
200
+ body: _response.error.body,
201
+ rawResponse: _response.rawResponse,
202
+ });
203
+ }
204
+ }
205
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/catchAll/entities");
206
+ });
207
+ }
208
+ /**
209
+ * Creates multiple entities in a single request. Each entity is
210
+ * processed independently — a failure in one does not affect others.
211
+ *
212
+ * Returns an array of `{id, status}` objects in the same order as
213
+ * the input array.
214
+ *
215
+ * @param {CatchAllApi.CreateEntitiesBatchRequest} request
216
+ * @param {EntitiesClient.RequestOptions} requestOptions - Request-specific configuration.
217
+ *
218
+ * @throws {@link CatchAllApi.BadRequestError}
219
+ * @throws {@link CatchAllApi.ForbiddenError}
220
+ *
221
+ * @example
222
+ * await client.entities.createEntitiesBatch({
223
+ * entities: [{
224
+ * name: "OpenAI",
225
+ * entity_type: "company",
226
+ * description: "Artificial intelligence research company",
227
+ * additional_attributes: {
228
+ * company_attributes: {
229
+ * domain: "openai.com",
230
+ * key_persons: ["Sam Altman"],
231
+ * alternative_names: ["Open AI"]
232
+ * }
233
+ * }
234
+ * }, {
235
+ * name: "Stripe",
236
+ * entity_type: "company",
237
+ * description: "Online payment processing platform",
238
+ * additional_attributes: {
239
+ * company_attributes: {
240
+ * domain: "stripe.com",
241
+ * key_persons: ["Patrick Collison", "John Collison"]
242
+ * }
243
+ * }
244
+ * }]
245
+ * })
246
+ */
247
+ createEntitiesBatch(request, requestOptions) {
248
+ return core.HttpResponsePromise.fromPromise(this.__createEntitiesBatch(request, requestOptions));
249
+ }
250
+ __createEntitiesBatch(request, requestOptions) {
251
+ return __awaiter(this, void 0, void 0, function* () {
252
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
253
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
254
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
255
+ const _response = yield core.fetcher({
256
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CatchAllApiEnvironment.Default, "catchAll/entities/batch"),
257
+ method: "POST",
258
+ headers: _headers,
259
+ contentType: "application/json",
260
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
261
+ requestType: "json",
262
+ body: request,
263
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
264
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
265
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
266
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
267
+ logging: this._options.logging,
268
+ });
269
+ if (_response.ok) {
270
+ return {
271
+ data: _response.body,
272
+ rawResponse: _response.rawResponse,
273
+ };
274
+ }
275
+ if (_response.error.reason === "status-code") {
276
+ switch (_response.error.statusCode) {
277
+ case 400:
278
+ throw new CatchAllApi.BadRequestError(_response.error.body, _response.rawResponse);
279
+ case 403:
280
+ throw new CatchAllApi.ForbiddenError(_response.error.body, _response.rawResponse);
281
+ default:
282
+ throw new errors.CatchAllApiError({
283
+ statusCode: _response.error.statusCode,
284
+ body: _response.error.body,
285
+ rawResponse: _response.rawResponse,
286
+ });
287
+ }
288
+ }
289
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/catchAll/entities/batch");
290
+ });
291
+ }
292
+ /**
293
+ * Returns a single entity by ID with all attributes and current status.
294
+ *
295
+ * @param {CatchAllApi.GetEntityRequest} request
296
+ * @param {EntitiesClient.RequestOptions} requestOptions - Request-specific configuration.
297
+ *
298
+ * @throws {@link CatchAllApi.ForbiddenError}
299
+ * @throws {@link CatchAllApi.NotFoundError}
300
+ *
301
+ * @example
302
+ * await client.entities.getEntity({
303
+ * entity_id: "854198fa-f702-49db-a381-0427fa87f173"
304
+ * })
305
+ */
306
+ getEntity(request, requestOptions) {
307
+ return core.HttpResponsePromise.fromPromise(this.__getEntity(request, requestOptions));
308
+ }
309
+ __getEntity(request, requestOptions) {
310
+ return __awaiter(this, void 0, void 0, function* () {
311
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
312
+ const { entity_id: entityId } = request;
313
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
314
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
315
+ const _response = yield core.fetcher({
316
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CatchAllApiEnvironment.Default, `catchAll/entities/${core.url.encodePathParam(entityId)}`),
317
+ method: "GET",
318
+ headers: _headers,
319
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
320
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
321
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
322
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
323
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
324
+ logging: this._options.logging,
325
+ });
326
+ if (_response.ok) {
327
+ return { data: _response.body, rawResponse: _response.rawResponse };
328
+ }
329
+ if (_response.error.reason === "status-code") {
330
+ switch (_response.error.statusCode) {
331
+ case 403:
332
+ throw new CatchAllApi.ForbiddenError(_response.error.body, _response.rawResponse);
333
+ case 404:
334
+ throw new CatchAllApi.NotFoundError(_response.error.body, _response.rawResponse);
335
+ default:
336
+ throw new errors.CatchAllApiError({
337
+ statusCode: _response.error.statusCode,
338
+ body: _response.error.body,
339
+ rawResponse: _response.rawResponse,
340
+ });
341
+ }
342
+ }
343
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/catchAll/entities/{entity_id}");
344
+ });
345
+ }
346
+ /**
347
+ * Permanently deletes an entity. The entity is removed from all
348
+ * datasets and the search index. This operation cannot be undone.
349
+ *
350
+ * @param {CatchAllApi.DeleteEntityRequest} request
351
+ * @param {EntitiesClient.RequestOptions} requestOptions - Request-specific configuration.
352
+ *
353
+ * @throws {@link CatchAllApi.ForbiddenError}
354
+ * @throws {@link CatchAllApi.NotFoundError}
355
+ *
356
+ * @example
357
+ * await client.entities.deleteEntity({
358
+ * entity_id: "854198fa-f702-49db-a381-0427fa87f173"
359
+ * })
360
+ */
361
+ deleteEntity(request, requestOptions) {
362
+ return core.HttpResponsePromise.fromPromise(this.__deleteEntity(request, requestOptions));
363
+ }
364
+ __deleteEntity(request, requestOptions) {
365
+ return __awaiter(this, void 0, void 0, function* () {
366
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
367
+ const { entity_id: entityId } = request;
368
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
369
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
370
+ const _response = yield core.fetcher({
371
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CatchAllApiEnvironment.Default, `catchAll/entities/${core.url.encodePathParam(entityId)}`),
372
+ method: "DELETE",
373
+ headers: _headers,
374
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
375
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
376
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
377
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
378
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
379
+ logging: this._options.logging,
380
+ });
381
+ if (_response.ok) {
382
+ return { data: undefined, rawResponse: _response.rawResponse };
383
+ }
384
+ if (_response.error.reason === "status-code") {
385
+ switch (_response.error.statusCode) {
386
+ case 403:
387
+ throw new CatchAllApi.ForbiddenError(_response.error.body, _response.rawResponse);
388
+ case 404:
389
+ throw new CatchAllApi.NotFoundError(_response.error.body, _response.rawResponse);
390
+ default:
391
+ throw new errors.CatchAllApiError({
392
+ statusCode: _response.error.statusCode,
393
+ body: _response.error.body,
394
+ rawResponse: _response.rawResponse,
395
+ });
396
+ }
397
+ }
398
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/catchAll/entities/{entity_id}");
399
+ });
400
+ }
401
+ /**
402
+ * Updates one or more fields of an existing entity.
403
+ *
404
+ * @param {CatchAllApi.UpdateEntityRequest} request
405
+ * @param {EntitiesClient.RequestOptions} requestOptions - Request-specific configuration.
406
+ *
407
+ * @throws {@link CatchAllApi.BadRequestError}
408
+ * @throws {@link CatchAllApi.ForbiddenError}
409
+ * @throws {@link CatchAllApi.NotFoundError}
410
+ *
411
+ * @example
412
+ * await client.entities.updateEntity({
413
+ * entity_id: "854198fa-f702-49db-a381-0427fa87f173",
414
+ * description: "Updated description",
415
+ * additional_attributes: {
416
+ * company_attributes: {
417
+ * alternative_names: ["NC", "NewsCatcher API", "NCA"]
418
+ * }
419
+ * }
420
+ * })
421
+ */
422
+ updateEntity(request, requestOptions) {
423
+ return core.HttpResponsePromise.fromPromise(this.__updateEntity(request, requestOptions));
424
+ }
425
+ __updateEntity(request, requestOptions) {
426
+ return __awaiter(this, void 0, void 0, function* () {
427
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
428
+ const { entity_id: entityId } = request, _body = __rest(request, ["entity_id"]);
429
+ const _authRequest = yield this._options.authProvider.getAuthRequest();
430
+ const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
431
+ const _response = yield core.fetcher({
432
+ url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CatchAllApiEnvironment.Default, `catchAll/entities/${core.url.encodePathParam(entityId)}`),
433
+ method: "PATCH",
434
+ headers: _headers,
435
+ contentType: "application/json",
436
+ queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
437
+ requestType: "json",
438
+ body: _body,
439
+ timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
440
+ maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
441
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
442
+ fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
443
+ logging: this._options.logging,
444
+ });
445
+ if (_response.ok) {
446
+ return { data: _response.body, rawResponse: _response.rawResponse };
447
+ }
448
+ if (_response.error.reason === "status-code") {
449
+ switch (_response.error.statusCode) {
450
+ case 400:
451
+ throw new CatchAllApi.BadRequestError(_response.error.body, _response.rawResponse);
452
+ case 403:
453
+ throw new CatchAllApi.ForbiddenError(_response.error.body, _response.rawResponse);
454
+ case 404:
455
+ throw new CatchAllApi.NotFoundError(_response.error.body, _response.rawResponse);
456
+ default:
457
+ throw new errors.CatchAllApiError({
458
+ statusCode: _response.error.statusCode,
459
+ body: _response.error.body,
460
+ rawResponse: _response.rawResponse,
461
+ });
462
+ }
463
+ }
464
+ return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/catchAll/entities/{entity_id}");
465
+ });
466
+ }
467
+ }
468
+ exports.EntitiesClient = EntitiesClient;
@@ -0,0 +1 @@
1
+ export * from "./requests/index.js";
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./requests/index.js"), exports);
@@ -0,0 +1,35 @@
1
+ import type * as CatchAllApi from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * entities: [{
6
+ * name: "OpenAI",
7
+ * entity_type: "company",
8
+ * description: "Artificial intelligence research company",
9
+ * additional_attributes: {
10
+ * company_attributes: {
11
+ * domain: "openai.com",
12
+ * key_persons: ["Sam Altman"],
13
+ * alternative_names: ["Open AI"]
14
+ * }
15
+ * }
16
+ * }, {
17
+ * name: "Stripe",
18
+ * entity_type: "company",
19
+ * description: "Online payment processing platform",
20
+ * additional_attributes: {
21
+ * company_attributes: {
22
+ * domain: "stripe.com",
23
+ * key_persons: ["Patrick Collison", "John Collison"]
24
+ * }
25
+ * }
26
+ * }]
27
+ * }
28
+ */
29
+ export interface CreateEntitiesBatchRequest {
30
+ /**
31
+ * Array of entities to create. Each item follows the same schema
32
+ * as single entity creation.
33
+ */
34
+ entities: CatchAllApi.CreateEntityRequest[];
35
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * entity_id: "854198fa-f702-49db-a381-0427fa87f173"
5
+ * }
6
+ */
7
+ export interface DeleteEntityRequest {
8
+ /** Unique entity identifier. */
9
+ entity_id: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @example
3
+ * {
4
+ * entity_id: "854198fa-f702-49db-a381-0427fa87f173"
5
+ * }
6
+ */
7
+ export interface GetEntityRequest {
8
+ /** Unique entity identifier. */
9
+ entity_id: string;
10
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ import type * as CatchAllApi from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * search: "NewsCatcher"
6
+ * }
7
+ */
8
+ export interface ListEntitiesRequest {
9
+ /** Page number to retrieve. */
10
+ page?: number;
11
+ /** Number of entities per page. */
12
+ page_size?: number;
13
+ /** Filter entities by name (case-insensitive substring match). */
14
+ search?: string;
15
+ status?: CatchAllApi.EntityStatus;
16
+ entity_type?: CatchAllApi.EntityType;
17
+ sort_by?: CatchAllApi.EntitySortBy;
18
+ sort_order?: CatchAllApi.SortOrder;
19
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,22 @@
1
+ import type * as CatchAllApi from "../../../../index.js";
2
+ /**
3
+ * @example
4
+ * {
5
+ * entity_id: "854198fa-f702-49db-a381-0427fa87f173",
6
+ * description: "Updated description",
7
+ * additional_attributes: {
8
+ * company_attributes: {
9
+ * alternative_names: ["NC", "NewsCatcher API", "NCA"]
10
+ * }
11
+ * }
12
+ * }
13
+ */
14
+ export interface UpdateEntityRequest {
15
+ /** Unique entity identifier. */
16
+ entity_id: string;
17
+ /** Updated entity name. */
18
+ name?: string;
19
+ /** Updated description. */
20
+ description?: string;
21
+ additional_attributes?: CatchAllApi.AdditionalAttributes;
22
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export type { CreateEntitiesBatchRequest } from "./CreateEntitiesBatchRequest.js";
2
+ export type { DeleteEntityRequest } from "./DeleteEntityRequest.js";
3
+ export type { GetEntityRequest } from "./GetEntityRequest.js";
4
+ export type { ListEntitiesRequest } from "./ListEntitiesRequest.js";
5
+ export type { UpdateEntityRequest } from "./UpdateEntityRequest.js";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export { EntitiesClient } from "./client/Client.js";
2
+ export * from "./client/index.js";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ // This file was auto-generated by Fern from our API Definition.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
16
+ };
17
+ Object.defineProperty(exports, "__esModule", { value: true });
18
+ exports.EntitiesClient = void 0;
19
+ var Client_js_1 = require("./client/Client.js");
20
+ Object.defineProperty(exports, "EntitiesClient", { enumerable: true, get: function () { return Client_js_1.EntitiesClient; } });
21
+ __exportStar(require("./client/index.js"), exports);