bereach 1.4.2 → 1.5.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 (288) hide show
  1. package/README.md +71 -5
  2. package/esm/funcs/actions-connect-profile.d.ts +1 -1
  3. package/esm/funcs/actions-connect-profile.js +1 -1
  4. package/esm/funcs/actions-edit-profile.d.ts +18 -0
  5. package/esm/funcs/actions-edit-profile.d.ts.map +1 -0
  6. package/esm/funcs/actions-edit-profile.js +97 -0
  7. package/esm/funcs/actions-edit-profile.js.map +1 -0
  8. package/esm/funcs/chat-get-conversation-summary.d.ts +18 -0
  9. package/esm/funcs/chat-get-conversation-summary.d.ts.map +1 -0
  10. package/esm/funcs/chat-get-conversation-summary.js +100 -0
  11. package/esm/funcs/chat-get-conversation-summary.js.map +1 -0
  12. package/esm/funcs/chat-list-inbox.d.ts +1 -1
  13. package/esm/funcs/chat-list-inbox.js +1 -1
  14. package/esm/funcs/chat-save-conversation-summary.d.ts +18 -0
  15. package/esm/funcs/chat-save-conversation-summary.d.ts.map +1 -0
  16. package/esm/funcs/chat-save-conversation-summary.js +97 -0
  17. package/esm/funcs/chat-save-conversation-summary.js.map +1 -0
  18. package/esm/funcs/company-pages-get-analytics.d.ts +1 -1
  19. package/esm/funcs/company-pages-get-analytics.js +1 -1
  20. package/esm/funcs/connectors-agent-snapshot.d.ts +18 -0
  21. package/esm/funcs/connectors-agent-snapshot.d.ts.map +1 -0
  22. package/esm/funcs/connectors-agent-snapshot.js +86 -0
  23. package/esm/funcs/connectors-agent-snapshot.js.map +1 -0
  24. package/esm/funcs/connectors-connector-heartbeat.d.ts +18 -0
  25. package/esm/funcs/connectors-connector-heartbeat.d.ts.map +1 -0
  26. package/esm/funcs/connectors-connector-heartbeat.js +99 -0
  27. package/esm/funcs/connectors-connector-heartbeat.js.map +1 -0
  28. package/esm/funcs/connectors-list-connectors.d.ts +18 -0
  29. package/esm/funcs/connectors-list-connectors.d.ts.map +1 -0
  30. package/esm/funcs/connectors-list-connectors.js +86 -0
  31. package/esm/funcs/connectors-list-connectors.js.map +1 -0
  32. package/esm/funcs/connectors-pull-task.d.ts +18 -0
  33. package/esm/funcs/connectors-pull-task.d.ts.map +1 -0
  34. package/esm/funcs/connectors-pull-task.js +86 -0
  35. package/esm/funcs/connectors-pull-task.js.map +1 -0
  36. package/esm/funcs/connectors-submit-task-result.d.ts +18 -0
  37. package/esm/funcs/connectors-submit-task-result.d.ts.map +1 -0
  38. package/esm/funcs/connectors-submit-task-result.js +103 -0
  39. package/esm/funcs/connectors-submit-task-result.js.map +1 -0
  40. package/esm/funcs/contacts-global-activities.d.ts +18 -0
  41. package/esm/funcs/contacts-global-activities.d.ts.map +1 -0
  42. package/esm/funcs/contacts-global-activities.js +105 -0
  43. package/esm/funcs/contacts-global-activities.js.map +1 -0
  44. package/esm/funcs/profile-create-api-token.d.ts +18 -0
  45. package/esm/funcs/profile-create-api-token.d.ts.map +1 -0
  46. package/esm/funcs/profile-create-api-token.js +99 -0
  47. package/esm/funcs/profile-create-api-token.js.map +1 -0
  48. package/esm/funcs/profile-delete-api-token.d.ts +18 -0
  49. package/esm/funcs/profile-delete-api-token.d.ts.map +1 -0
  50. package/esm/funcs/profile-delete-api-token.js +99 -0
  51. package/esm/funcs/profile-delete-api-token.js.map +1 -0
  52. package/esm/funcs/profile-get-api-token.d.ts +18 -0
  53. package/esm/funcs/profile-get-api-token.d.ts.map +1 -0
  54. package/esm/funcs/profile-get-api-token.js +100 -0
  55. package/esm/funcs/profile-get-api-token.js.map +1 -0
  56. package/esm/funcs/profile-get-my-activity.d.ts +18 -0
  57. package/esm/funcs/profile-get-my-activity.d.ts.map +1 -0
  58. package/esm/funcs/profile-get-my-activity.js +104 -0
  59. package/esm/funcs/profile-get-my-activity.js.map +1 -0
  60. package/esm/funcs/profile-get-settings.d.ts +18 -0
  61. package/esm/funcs/profile-get-settings.d.ts.map +1 -0
  62. package/esm/funcs/profile-get-settings.js +86 -0
  63. package/esm/funcs/profile-get-settings.js.map +1 -0
  64. package/esm/funcs/profile-patch-settings.d.ts +18 -0
  65. package/esm/funcs/profile-patch-settings.d.ts.map +1 -0
  66. package/esm/funcs/profile-patch-settings.js +97 -0
  67. package/esm/funcs/profile-patch-settings.js.map +1 -0
  68. package/esm/funcs/profile-revalidate-linkedin.d.ts +18 -0
  69. package/esm/funcs/profile-revalidate-linkedin.d.ts.map +1 -0
  70. package/esm/funcs/profile-revalidate-linkedin.js +86 -0
  71. package/esm/funcs/profile-revalidate-linkedin.js.map +1 -0
  72. package/esm/funcs/sales-nav-search.d.ts +1 -1
  73. package/esm/funcs/sales-nav-search.js +1 -1
  74. package/esm/funcs/scheduled-messages-review-drafts.d.ts +18 -0
  75. package/esm/funcs/scheduled-messages-review-drafts.d.ts.map +1 -0
  76. package/esm/funcs/scheduled-messages-review-drafts.js +97 -0
  77. package/esm/funcs/scheduled-messages-review-drafts.js.map +1 -0
  78. package/esm/funcs/scrapers-collect-comment-replies.d.ts +1 -1
  79. package/esm/funcs/scrapers-collect-comment-replies.js +1 -1
  80. package/esm/funcs/scrapers-collect-comments.d.ts +1 -1
  81. package/esm/funcs/scrapers-collect-comments.js +1 -1
  82. package/esm/funcs/scrapers-collect-likes.d.ts +1 -1
  83. package/esm/funcs/scrapers-collect-likes.js +1 -1
  84. package/esm/funcs/scrapers-visit-profile.d.ts +2 -0
  85. package/esm/funcs/scrapers-visit-profile.d.ts.map +1 -1
  86. package/esm/funcs/scrapers-visit-profile.js +2 -0
  87. package/esm/funcs/scrapers-visit-profile.js.map +1 -1
  88. package/esm/funcs/search-people.d.ts +2 -2
  89. package/esm/funcs/search-people.js +2 -2
  90. package/esm/funcs/search-search.d.ts +1 -1
  91. package/esm/funcs/search-search.js +1 -1
  92. package/esm/funcs/settings-get-dm-polling-settings.d.ts +18 -0
  93. package/esm/funcs/settings-get-dm-polling-settings.d.ts.map +1 -0
  94. package/esm/funcs/settings-get-dm-polling-settings.js +86 -0
  95. package/esm/funcs/settings-get-dm-polling-settings.js.map +1 -0
  96. package/esm/funcs/settings-patch-dm-polling-settings.d.ts +18 -0
  97. package/esm/funcs/settings-patch-dm-polling-settings.d.ts.map +1 -0
  98. package/esm/funcs/settings-patch-dm-polling-settings.js +97 -0
  99. package/esm/funcs/settings-patch-dm-polling-settings.js.map +1 -0
  100. package/esm/funcs/tasks-cancel-chain.d.ts +18 -0
  101. package/esm/funcs/tasks-cancel-chain.d.ts.map +1 -0
  102. package/esm/funcs/tasks-cancel-chain.js +102 -0
  103. package/esm/funcs/tasks-cancel-chain.js.map +1 -0
  104. package/esm/funcs/tasks-cancel-task.d.ts +18 -0
  105. package/esm/funcs/tasks-cancel-task.d.ts.map +1 -0
  106. package/esm/funcs/tasks-cancel-task.js +102 -0
  107. package/esm/funcs/tasks-cancel-task.js.map +1 -0
  108. package/esm/funcs/tasks-events-feed.d.ts +18 -0
  109. package/esm/funcs/tasks-events-feed.d.ts.map +1 -0
  110. package/esm/funcs/tasks-events-feed.js +101 -0
  111. package/esm/funcs/tasks-events-feed.js.map +1 -0
  112. package/esm/funcs/tasks-list-tasks.d.ts +18 -0
  113. package/esm/funcs/tasks-list-tasks.d.ts.map +1 -0
  114. package/esm/funcs/tasks-list-tasks.js +104 -0
  115. package/esm/funcs/tasks-list-tasks.js.map +1 -0
  116. package/esm/funcs/workspace-create-workspace-invite.d.ts +18 -0
  117. package/esm/funcs/workspace-create-workspace-invite.d.ts.map +1 -0
  118. package/esm/funcs/workspace-create-workspace-invite.js +97 -0
  119. package/esm/funcs/workspace-create-workspace-invite.js.map +1 -0
  120. package/esm/funcs/workspace-delete-workspace-account.d.ts +18 -0
  121. package/esm/funcs/workspace-delete-workspace-account.d.ts.map +1 -0
  122. package/esm/funcs/workspace-delete-workspace-account.js +102 -0
  123. package/esm/funcs/workspace-delete-workspace-account.js.map +1 -0
  124. package/esm/funcs/workspace-delete-workspace-invite.d.ts +18 -0
  125. package/esm/funcs/workspace-delete-workspace-invite.d.ts.map +1 -0
  126. package/esm/funcs/workspace-delete-workspace-invite.js +97 -0
  127. package/esm/funcs/workspace-delete-workspace-invite.js.map +1 -0
  128. package/esm/funcs/workspace-upgrade-workspace-account.d.ts +18 -0
  129. package/esm/funcs/workspace-upgrade-workspace-account.d.ts.map +1 -0
  130. package/esm/funcs/workspace-upgrade-workspace-account.js +97 -0
  131. package/esm/funcs/workspace-upgrade-workspace-account.js.map +1 -0
  132. package/esm/hooks/hooks.d.ts.map +1 -1
  133. package/esm/hooks/hooks.js +0 -2
  134. package/esm/hooks/hooks.js.map +1 -1
  135. package/esm/lib/config.d.ts +5 -5
  136. package/esm/lib/config.d.ts.map +1 -1
  137. package/esm/lib/config.js +6 -6
  138. package/esm/lib/config.js.map +1 -1
  139. package/esm/lib/encodings.d.ts.map +1 -1
  140. package/esm/lib/encodings.js +20 -5
  141. package/esm/lib/encodings.js.map +1 -1
  142. package/esm/lib/security.d.ts +1 -1
  143. package/esm/lib/security.d.ts.map +1 -1
  144. package/esm/lib/security.js +19 -8
  145. package/esm/lib/security.js.map +1 -1
  146. package/esm/models/operations/{search-contacts-campaign.d.ts → archive-response.d.ts} +1174 -1151
  147. package/esm/models/operations/archive-response.d.ts.map +1 -0
  148. package/esm/models/operations/{search-contacts-campaign.js → archive-response.js} +456 -461
  149. package/esm/models/operations/archive-response.js.map +1 -0
  150. package/esm/models/operations/delete-workspace-invite-response.d.ts +1374 -0
  151. package/esm/models/operations/delete-workspace-invite-response.d.ts.map +1 -0
  152. package/esm/models/operations/delete-workspace-invite-response.js +901 -0
  153. package/esm/models/operations/delete-workspace-invite-response.js.map +1 -0
  154. package/esm/models/operations/{update-schedule-response.d.ts → get-by-url-campaign.d.ts} +1629 -1291
  155. package/esm/models/operations/get-by-url-campaign.d.ts.map +1 -0
  156. package/esm/models/operations/{update-schedule-response.js → get-by-url-campaign.js} +534 -341
  157. package/esm/models/operations/get-by-url-campaign.js.map +1 -0
  158. package/esm/models/operations/index.d.ts +4 -3
  159. package/esm/models/operations/index.d.ts.map +1 -1
  160. package/esm/models/operations/index.js +4 -3
  161. package/esm/models/operations/index.js.map +1 -1
  162. package/esm/models/operations/search-companies-response.d.ts +45 -12
  163. package/esm/models/operations/search-companies-response.d.ts.map +1 -1
  164. package/esm/models/operations/search-companies-response.js +10 -2
  165. package/esm/models/operations/search-companies-response.js.map +1 -1
  166. package/esm/models/operations/{update-account-response.d.ts → update-account-proxy-config-response.d.ts} +70 -38
  167. package/esm/models/operations/update-account-proxy-config-response.d.ts.map +1 -0
  168. package/esm/models/operations/{update-account-response.js → update-account-proxy-config-response.js} +27 -28
  169. package/esm/models/operations/update-account-proxy-config-response.js.map +1 -0
  170. package/esm/sdk/actions.d.ts +8 -1
  171. package/esm/sdk/actions.d.ts.map +1 -1
  172. package/esm/sdk/actions.js +11 -1
  173. package/esm/sdk/actions.js.map +1 -1
  174. package/esm/sdk/chat.d.ts +15 -1
  175. package/esm/sdk/chat.d.ts.map +1 -1
  176. package/esm/sdk/chat.js +21 -1
  177. package/esm/sdk/chat.js.map +1 -1
  178. package/esm/sdk/company-pages.d.ts +1 -1
  179. package/esm/sdk/company-pages.js +1 -1
  180. package/esm/sdk/connectors.d.ts +40 -0
  181. package/esm/sdk/connectors.d.ts.map +1 -0
  182. package/esm/sdk/connectors.js +58 -0
  183. package/esm/sdk/connectors.js.map +1 -0
  184. package/esm/sdk/contacts.d.ts +7 -0
  185. package/esm/sdk/contacts.d.ts.map +1 -1
  186. package/esm/sdk/contacts.js +10 -0
  187. package/esm/sdk/contacts.js.map +1 -1
  188. package/esm/sdk/profile.d.ts +49 -0
  189. package/esm/sdk/profile.d.ts.map +1 -1
  190. package/esm/sdk/profile.js +70 -0
  191. package/esm/sdk/profile.js.map +1 -1
  192. package/esm/sdk/sales-nav.d.ts +1 -1
  193. package/esm/sdk/sales-nav.js +1 -1
  194. package/esm/sdk/scheduled-messages.d.ts +7 -0
  195. package/esm/sdk/scheduled-messages.d.ts.map +1 -1
  196. package/esm/sdk/scheduled-messages.js +10 -0
  197. package/esm/sdk/scheduled-messages.js.map +1 -1
  198. package/esm/sdk/scrapers.d.ts +5 -3
  199. package/esm/sdk/scrapers.d.ts.map +1 -1
  200. package/esm/sdk/scrapers.js +5 -3
  201. package/esm/sdk/scrapers.js.map +1 -1
  202. package/esm/sdk/sdk.d.ts +12 -0
  203. package/esm/sdk/sdk.d.ts.map +1 -1
  204. package/esm/sdk/sdk.js +20 -0
  205. package/esm/sdk/sdk.js.map +1 -1
  206. package/esm/sdk/search.d.ts +3 -3
  207. package/esm/sdk/search.js +3 -3
  208. package/esm/sdk/settings.d.ts +19 -0
  209. package/esm/sdk/settings.d.ts.map +1 -0
  210. package/esm/sdk/settings.js +28 -0
  211. package/esm/sdk/settings.js.map +1 -0
  212. package/esm/sdk/tasks.d.ts +33 -0
  213. package/esm/sdk/tasks.d.ts.map +1 -0
  214. package/esm/sdk/tasks.js +48 -0
  215. package/esm/sdk/tasks.js.map +1 -0
  216. package/esm/sdk/workspace.d.ts +33 -0
  217. package/esm/sdk/workspace.d.ts.map +1 -0
  218. package/esm/sdk/workspace.js +48 -0
  219. package/esm/sdk/workspace.js.map +1 -0
  220. package/jsr.json +1 -1
  221. package/package.json +1 -1
  222. package/src/funcs/actions-connect-profile.ts +1 -1
  223. package/src/funcs/actions-edit-profile.ts +224 -0
  224. package/src/funcs/chat-get-conversation-summary.ts +229 -0
  225. package/src/funcs/chat-list-inbox.ts +1 -1
  226. package/src/funcs/chat-save-conversation-summary.ts +225 -0
  227. package/src/funcs/company-pages-get-analytics.ts +1 -1
  228. package/src/funcs/connectors-agent-snapshot.ts +205 -0
  229. package/src/funcs/connectors-connector-heartbeat.ts +230 -0
  230. package/src/funcs/connectors-list-connectors.ts +205 -0
  231. package/src/funcs/connectors-pull-task.ts +205 -0
  232. package/src/funcs/connectors-submit-task-result.ts +231 -0
  233. package/src/funcs/contacts-global-activities.ts +237 -0
  234. package/src/funcs/profile-create-api-token.ts +230 -0
  235. package/src/funcs/profile-delete-api-token.ts +230 -0
  236. package/src/funcs/profile-get-api-token.ts +229 -0
  237. package/src/funcs/profile-get-my-activity.ts +236 -0
  238. package/src/funcs/profile-get-settings.ts +205 -0
  239. package/src/funcs/profile-patch-settings.ts +224 -0
  240. package/src/funcs/profile-revalidate-linkedin.ts +205 -0
  241. package/src/funcs/sales-nav-search.ts +1 -1
  242. package/src/funcs/scheduled-messages-review-drafts.ts +224 -0
  243. package/src/funcs/scrapers-collect-comment-replies.ts +1 -1
  244. package/src/funcs/scrapers-collect-comments.ts +1 -1
  245. package/src/funcs/scrapers-collect-likes.ts +1 -1
  246. package/src/funcs/scrapers-visit-profile.ts +2 -0
  247. package/src/funcs/search-people.ts +2 -2
  248. package/src/funcs/search-search.ts +1 -1
  249. package/src/funcs/settings-get-dm-polling-settings.ts +205 -0
  250. package/src/funcs/settings-patch-dm-polling-settings.ts +225 -0
  251. package/src/funcs/tasks-cancel-chain.ts +229 -0
  252. package/src/funcs/tasks-cancel-task.ts +229 -0
  253. package/src/funcs/tasks-events-feed.ts +230 -0
  254. package/src/funcs/tasks-list-tasks.ts +233 -0
  255. package/src/funcs/workspace-create-workspace-invite.ts +225 -0
  256. package/src/funcs/workspace-delete-workspace-account.ts +230 -0
  257. package/src/funcs/workspace-delete-workspace-invite.ts +225 -0
  258. package/src/funcs/workspace-upgrade-workspace-account.ts +225 -0
  259. package/src/hooks/hooks.ts +0 -3
  260. package/src/lib/config.ts +6 -6
  261. package/src/lib/encodings.ts +23 -4
  262. package/src/lib/security.ts +14 -2
  263. package/src/models/operations/{search-contacts-campaign.ts → archive-response.ts} +2503 -2362
  264. package/src/models/operations/delete-workspace-invite-response.ts +2783 -0
  265. package/src/models/operations/{update-schedule-response.ts → get-by-url-campaign.ts} +3591 -2939
  266. package/src/models/operations/index.ts +4 -3
  267. package/src/models/operations/search-companies-response.ts +55 -14
  268. package/src/models/operations/{update-account-response.ts → update-account-proxy-config-response.ts} +112 -84
  269. package/src/sdk/actions.ts +19 -1
  270. package/src/sdk/chat.ts +37 -1
  271. package/src/sdk/company-pages.ts +1 -1
  272. package/src/sdk/connectors.ts +93 -0
  273. package/src/sdk/contacts.ts +18 -0
  274. package/src/sdk/profile.ts +122 -0
  275. package/src/sdk/sales-nav.ts +1 -1
  276. package/src/sdk/scheduled-messages.ts +18 -0
  277. package/src/sdk/scrapers.ts +5 -3
  278. package/src/sdk/sdk.ts +24 -0
  279. package/src/sdk/search.ts +3 -3
  280. package/src/sdk/settings.ts +43 -0
  281. package/src/sdk/tasks.ts +81 -0
  282. package/src/sdk/workspace.ts +81 -0
  283. package/esm/models/operations/search-contacts-campaign.d.ts.map +0 -1
  284. package/esm/models/operations/search-contacts-campaign.js.map +0 -1
  285. package/esm/models/operations/update-account-response.d.ts.map +0 -1
  286. package/esm/models/operations/update-account-response.js.map +0 -1
  287. package/esm/models/operations/update-schedule-response.d.ts.map +0 -1
  288. package/esm/models/operations/update-schedule-response.js.map +0 -1
@@ -0,0 +1,224 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { BereachCore } from "../core.js";
7
+ import { encodeJSON } from "../lib/encodings.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import { BereachError } from "../models/errors/bereach-error.js";
15
+ import {
16
+ ConnectionError,
17
+ InvalidRequestError,
18
+ RequestAbortedError,
19
+ RequestTimeoutError,
20
+ UnexpectedClientError,
21
+ } from "../models/errors/http-client-errors.js";
22
+ import * as errors from "../models/errors/index.js";
23
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
24
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
25
+ import * as operations from "../models/operations/index.js";
26
+ import { APICall, APIPromise } from "../types/async.js";
27
+ import { Result } from "../types/fp.js";
28
+
29
+ /**
30
+ * Batch approve/reject draft DMs
31
+ *
32
+ * @remarks
33
+ * Approve or reject draft messages for a campaign. Approved drafts are scheduled for immediate send. Optionally edit message text before approval. 0 credits.
34
+ */
35
+ export function scheduledMessagesReviewDrafts(
36
+ client: BereachCore,
37
+ request: operations.ReviewDraftsRequest,
38
+ options?: RequestOptions,
39
+ ): APIPromise<
40
+ Result<
41
+ operations.ReviewDraftsResponse,
42
+ | errors.BadRequestError
43
+ | errors.UnauthorizedError
44
+ | errors.ForbiddenError
45
+ | errors.NotFoundError
46
+ | errors.ConflictError
47
+ | errors.GoneError
48
+ | errors.UnprocessableEntityError
49
+ | errors.TooManyRequestsError
50
+ | errors.InternalServerError
51
+ | errors.BadGatewayError
52
+ | errors.ServiceUnavailableError
53
+ | BereachError
54
+ | ResponseValidationError
55
+ | ConnectionError
56
+ | RequestAbortedError
57
+ | RequestTimeoutError
58
+ | InvalidRequestError
59
+ | UnexpectedClientError
60
+ | SDKValidationError
61
+ >
62
+ > {
63
+ return new APIPromise($do(
64
+ client,
65
+ request,
66
+ options,
67
+ ));
68
+ }
69
+
70
+ async function $do(
71
+ client: BereachCore,
72
+ request: operations.ReviewDraftsRequest,
73
+ options?: RequestOptions,
74
+ ): Promise<
75
+ [
76
+ Result<
77
+ operations.ReviewDraftsResponse,
78
+ | errors.BadRequestError
79
+ | errors.UnauthorizedError
80
+ | errors.ForbiddenError
81
+ | errors.NotFoundError
82
+ | errors.ConflictError
83
+ | errors.GoneError
84
+ | errors.UnprocessableEntityError
85
+ | errors.TooManyRequestsError
86
+ | errors.InternalServerError
87
+ | errors.BadGatewayError
88
+ | errors.ServiceUnavailableError
89
+ | BereachError
90
+ | ResponseValidationError
91
+ | ConnectionError
92
+ | RequestAbortedError
93
+ | RequestTimeoutError
94
+ | InvalidRequestError
95
+ | UnexpectedClientError
96
+ | SDKValidationError
97
+ >,
98
+ APICall,
99
+ ]
100
+ > {
101
+ const parsed = safeParse(
102
+ request,
103
+ (value) => z.parse(operations.ReviewDraftsRequest$outboundSchema, value),
104
+ "Input validation failed",
105
+ );
106
+ if (!parsed.ok) {
107
+ return [parsed, { status: "invalid" }];
108
+ }
109
+ const payload = parsed.value;
110
+ const body = encodeJSON("body", payload, { explode: true });
111
+
112
+ const path = pathToFunc("/drafts/review")();
113
+
114
+ const headers = new Headers(compactMap({
115
+ "Content-Type": "application/json",
116
+ Accept: "application/json",
117
+ }));
118
+
119
+ const secConfig = await extractSecurity(client._options.token);
120
+ const securityInput = secConfig == null ? {} : { token: secConfig };
121
+ const requestSecurity = resolveGlobalSecurity(securityInput);
122
+
123
+ const context = {
124
+ options: client._options,
125
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
126
+ operationID: "reviewDrafts",
127
+ oAuth2Scopes: null,
128
+
129
+ resolvedSecurity: requestSecurity,
130
+
131
+ securitySource: client._options.token,
132
+ retryConfig: options?.retries
133
+ || client._options.retryConfig
134
+ || { strategy: "none" },
135
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
136
+ };
137
+
138
+ const requestRes = client._createRequest(context, {
139
+ security: requestSecurity,
140
+ method: "POST",
141
+ baseURL: options?.serverURL,
142
+ path: path,
143
+ headers: headers,
144
+ body: body,
145
+ userAgent: client._options.userAgent,
146
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
147
+ }, options);
148
+ if (!requestRes.ok) {
149
+ return [requestRes, { status: "invalid" }];
150
+ }
151
+ const req = requestRes.value;
152
+
153
+ const doResult = await client._do(req, {
154
+ context,
155
+ errorCodes: [
156
+ "400",
157
+ "401",
158
+ "403",
159
+ "404",
160
+ "409",
161
+ "410",
162
+ "422",
163
+ "429",
164
+ "4XX",
165
+ "500",
166
+ "502",
167
+ "503",
168
+ "5XX",
169
+ ],
170
+ retryConfig: context.retryConfig,
171
+ retryCodes: context.retryCodes,
172
+ });
173
+ if (!doResult.ok) {
174
+ return [doResult, { status: "request-error", request: req }];
175
+ }
176
+ const response = doResult.value;
177
+
178
+ const responseFields = {
179
+ HttpMeta: { Response: response, Request: req },
180
+ };
181
+
182
+ const [result] = await M.match<
183
+ operations.ReviewDraftsResponse,
184
+ | errors.BadRequestError
185
+ | errors.UnauthorizedError
186
+ | errors.ForbiddenError
187
+ | errors.NotFoundError
188
+ | errors.ConflictError
189
+ | errors.GoneError
190
+ | errors.UnprocessableEntityError
191
+ | errors.TooManyRequestsError
192
+ | errors.InternalServerError
193
+ | errors.BadGatewayError
194
+ | errors.ServiceUnavailableError
195
+ | BereachError
196
+ | ResponseValidationError
197
+ | ConnectionError
198
+ | RequestAbortedError
199
+ | RequestTimeoutError
200
+ | InvalidRequestError
201
+ | UnexpectedClientError
202
+ | SDKValidationError
203
+ >(
204
+ M.json(200, operations.ReviewDraftsResponse$inboundSchema),
205
+ M.jsonErr(400, errors.BadRequestError$inboundSchema),
206
+ M.jsonErr(401, errors.UnauthorizedError$inboundSchema),
207
+ M.jsonErr(403, errors.ForbiddenError$inboundSchema),
208
+ M.jsonErr(404, errors.NotFoundError$inboundSchema),
209
+ M.jsonErr(409, errors.ConflictError$inboundSchema),
210
+ M.jsonErr(410, errors.GoneError$inboundSchema),
211
+ M.jsonErr(422, errors.UnprocessableEntityError$inboundSchema),
212
+ M.jsonErr(429, errors.TooManyRequestsError$inboundSchema),
213
+ M.jsonErr(500, errors.InternalServerError$inboundSchema),
214
+ M.jsonErr(502, errors.BadGatewayError$inboundSchema),
215
+ M.jsonErr(503, errors.ServiceUnavailableError$inboundSchema),
216
+ M.fail("4XX"),
217
+ M.fail("5XX"),
218
+ )(response, req, { extraFields: responseFields });
219
+ if (!result.ok) {
220
+ return [result, { status: "complete", request: req, response }];
221
+ }
222
+
223
+ return [result, { status: "complete", request: req, response }];
224
+ }
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Scrape replies to a LinkedIn comment
31
31
  *
32
32
  * @remarks
33
- * Returns paginated replies for a specific LinkedIn comment. Use the commentUrn from the comments endpoint response. 1 credit per 20 items returned (minimum 1 if any results, 0 if empty).
33
+ * Returns paginated replies for a specific LinkedIn comment. Use the commentUrn from the comments endpoint response. 1 credit per 100 items returned (minimum 1 if any results, 0 if empty).
34
34
  */
35
35
  export function scrapersCollectCommentReplies(
36
36
  client: BereachCore,
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Scrape LinkedIn post comments
31
31
  *
32
32
  * @remarks
33
- * Returns paginated top-level comments for a LinkedIn post (newest first). 1 credit per 20 items returned (minimum 1 if any results, 0 if empty). Use count=0 for a free total-only check (0 credits, no rate-limit slot consumed). Response includes previousTotal (server-cached) to detect new comments without client tracking.
33
+ * Returns paginated top-level comments for a LinkedIn post (newest first). 1 credit per 100 items returned (minimum 1 if any results, 0 if empty). Use count=0 for a free total-only check (0 credits, no rate-limit slot consumed). Response includes previousTotal (server-cached) to detect new comments without client tracking.
34
34
  */
35
35
  export function scrapersCollectComments(
36
36
  client: BereachCore,
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
30
30
  * Scrape LinkedIn post likes
31
31
  *
32
32
  * @remarks
33
- * Returns up to 100 profiles per page that reacted to the specified post (LinkedIn API limit). Supports pagination. 1 credit per 20 items returned (minimum 1 if any results, 0 if empty). Use count=0 for a free total-only check.
33
+ * Returns up to 100 profiles per page that reacted to the specified post (LinkedIn API limit). Supports pagination. 1 credit per 100 items returned (minimum 1 if any results, 0 if empty). Use count=0 for a free total-only check.
34
34
  */
35
35
  export function scrapersCollectLikes(
36
36
  client: BereachCore,
@@ -33,6 +33,8 @@ import { Result } from "../types/fp.js";
33
33
  * Visit a LinkedIn profile and return contact data. Distance-1 profiles cached 24h (0 credits when cached). No dedup — always executes. campaignSlug is for tracking only. 1 credit (0 when cached).
34
34
  *
35
35
  * Optional enrichment flags (`includePosts`, `includeComments`, `includeAbout`) fetch additional data in parallel with minimal latency overhead. `includeAbout` fetches the About section and detailed position descriptions. `includeComments` returns posts the profile recently engaged with (topic + author), useful for personalization — note that the actual comment text is not available from this API.
36
+ *
37
+ * `followersCount` and `connectionsCount` are always included in the response at no extra cost.
36
38
  */
37
39
  export function scrapersVisitProfile(
38
40
  client: BereachCore,
@@ -86,9 +86,9 @@ import { Result } from "../types/fp.js";
86
86
  *
87
87
  * ## Multi-step workflow with filter ID resolution
88
88
  * ```
89
- * Step 1: POST /search/linkedin/parameters { type: 'GEO', keywords: 'San Francisco' }
89
+ * Step 1: GET /search/linkedin/parameters { type: 'GEO', keywords: 'San Francisco' }
90
90
  * → returns [{ id: '102277331', title: 'San Francisco, CA' }]
91
- * Step 2: POST /search/linkedin/parameters { type: 'COMPANY', keywords: 'Google' }
91
+ * Step 2: GET /search/linkedin/parameters { type: 'COMPANY', keywords: 'Google' }
92
92
  * → returns [{ id: '1441', title: 'Google' }]
93
93
  * Step 3: POST /search/linkedin/people { keywords: 'product manager', location: ['102277331'], currentCompany: ['1441'] }
94
94
  * → returns matching people
@@ -61,7 +61,7 @@ import { Result } from "../types/fp.js";
61
61
  * Without quotes, a multi-word query like `outreach automation` is treated as `outreach AND automation`, which may return broad results. Use `"outreach automation"` for exact matching.
62
62
  *
63
63
  * ## Resolving filter IDs
64
- * Many filters (location, industry, company, school) require LinkedIn numeric IDs. Use `POST /search/linkedin/parameters` to convert text (e.g. "San Francisco") into IDs (e.g. "103644278").
64
+ * Many filters (location, industry, company, school) require LinkedIn numeric IDs. Use `GET /search/linkedin/parameters` to convert text (e.g. "San Francisco") into IDs (e.g. "103644278").
65
65
  *
66
66
  * ## Pagination
67
67
  * Use `start` (offset, default 0) and `count` (page size, default 10, max 50). The response includes `paging.total` and `hasMore` to control iteration.
@@ -0,0 +1,205 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { BereachCore } from "../core.js";
6
+ import * as M from "../lib/matchers.js";
7
+ import { compactMap } from "../lib/primitives.js";
8
+ import { RequestOptions } from "../lib/sdks.js";
9
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
10
+ import { pathToFunc } from "../lib/url.js";
11
+ import { BereachError } from "../models/errors/bereach-error.js";
12
+ import {
13
+ ConnectionError,
14
+ InvalidRequestError,
15
+ RequestAbortedError,
16
+ RequestTimeoutError,
17
+ UnexpectedClientError,
18
+ } from "../models/errors/http-client-errors.js";
19
+ import * as errors from "../models/errors/index.js";
20
+ import { ResponseValidationError } from "../models/errors/response-validation-error.js";
21
+ import { SDKValidationError } from "../models/errors/sdk-validation-error.js";
22
+ import * as operations from "../models/operations/index.js";
23
+ import { APICall, APIPromise } from "../types/async.js";
24
+ import { Result } from "../types/fp.js";
25
+
26
+ /**
27
+ * Get DM polling settings
28
+ *
29
+ * @remarks
30
+ * Get DM and connection polling settings for the active LinkedIn account. 0 credits.
31
+ */
32
+ export function settingsGetDmPollingSettings(
33
+ client: BereachCore,
34
+ options?: RequestOptions,
35
+ ): APIPromise<
36
+ Result<
37
+ operations.GetDmPollingSettingsResponse,
38
+ | errors.BadRequestError
39
+ | errors.UnauthorizedError
40
+ | errors.ForbiddenError
41
+ | errors.NotFoundError
42
+ | errors.ConflictError
43
+ | errors.GoneError
44
+ | errors.UnprocessableEntityError
45
+ | errors.TooManyRequestsError
46
+ | errors.InternalServerError
47
+ | errors.BadGatewayError
48
+ | errors.ServiceUnavailableError
49
+ | BereachError
50
+ | ResponseValidationError
51
+ | ConnectionError
52
+ | RequestAbortedError
53
+ | RequestTimeoutError
54
+ | InvalidRequestError
55
+ | UnexpectedClientError
56
+ | SDKValidationError
57
+ >
58
+ > {
59
+ return new APIPromise($do(
60
+ client,
61
+ options,
62
+ ));
63
+ }
64
+
65
+ async function $do(
66
+ client: BereachCore,
67
+ options?: RequestOptions,
68
+ ): Promise<
69
+ [
70
+ Result<
71
+ operations.GetDmPollingSettingsResponse,
72
+ | errors.BadRequestError
73
+ | errors.UnauthorizedError
74
+ | errors.ForbiddenError
75
+ | errors.NotFoundError
76
+ | errors.ConflictError
77
+ | errors.GoneError
78
+ | errors.UnprocessableEntityError
79
+ | errors.TooManyRequestsError
80
+ | errors.InternalServerError
81
+ | errors.BadGatewayError
82
+ | errors.ServiceUnavailableError
83
+ | BereachError
84
+ | ResponseValidationError
85
+ | ConnectionError
86
+ | RequestAbortedError
87
+ | RequestTimeoutError
88
+ | InvalidRequestError
89
+ | UnexpectedClientError
90
+ | SDKValidationError
91
+ >,
92
+ APICall,
93
+ ]
94
+ > {
95
+ const path = pathToFunc("/settings/dm-polling")();
96
+
97
+ const headers = new Headers(compactMap({
98
+ Accept: "application/json",
99
+ }));
100
+
101
+ const secConfig = await extractSecurity(client._options.token);
102
+ const securityInput = secConfig == null ? {} : { token: secConfig };
103
+ const requestSecurity = resolveGlobalSecurity(securityInput);
104
+
105
+ const context = {
106
+ options: client._options,
107
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
108
+ operationID: "getDmPollingSettings",
109
+ oAuth2Scopes: null,
110
+
111
+ resolvedSecurity: requestSecurity,
112
+
113
+ securitySource: client._options.token,
114
+ retryConfig: options?.retries
115
+ || client._options.retryConfig
116
+ || { strategy: "none" },
117
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
118
+ };
119
+
120
+ const requestRes = client._createRequest(context, {
121
+ security: requestSecurity,
122
+ method: "GET",
123
+ baseURL: options?.serverURL,
124
+ path: path,
125
+ headers: headers,
126
+ userAgent: client._options.userAgent,
127
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
128
+ }, options);
129
+ if (!requestRes.ok) {
130
+ return [requestRes, { status: "invalid" }];
131
+ }
132
+ const req = requestRes.value;
133
+
134
+ const doResult = await client._do(req, {
135
+ context,
136
+ errorCodes: [
137
+ "400",
138
+ "401",
139
+ "403",
140
+ "404",
141
+ "409",
142
+ "410",
143
+ "422",
144
+ "429",
145
+ "4XX",
146
+ "500",
147
+ "502",
148
+ "503",
149
+ "5XX",
150
+ ],
151
+ retryConfig: context.retryConfig,
152
+ retryCodes: context.retryCodes,
153
+ });
154
+ if (!doResult.ok) {
155
+ return [doResult, { status: "request-error", request: req }];
156
+ }
157
+ const response = doResult.value;
158
+
159
+ const responseFields = {
160
+ HttpMeta: { Response: response, Request: req },
161
+ };
162
+
163
+ const [result] = await M.match<
164
+ operations.GetDmPollingSettingsResponse,
165
+ | errors.BadRequestError
166
+ | errors.UnauthorizedError
167
+ | errors.ForbiddenError
168
+ | errors.NotFoundError
169
+ | errors.ConflictError
170
+ | errors.GoneError
171
+ | errors.UnprocessableEntityError
172
+ | errors.TooManyRequestsError
173
+ | errors.InternalServerError
174
+ | errors.BadGatewayError
175
+ | errors.ServiceUnavailableError
176
+ | BereachError
177
+ | ResponseValidationError
178
+ | ConnectionError
179
+ | RequestAbortedError
180
+ | RequestTimeoutError
181
+ | InvalidRequestError
182
+ | UnexpectedClientError
183
+ | SDKValidationError
184
+ >(
185
+ M.json(200, operations.GetDmPollingSettingsResponse$inboundSchema),
186
+ M.jsonErr(400, errors.BadRequestError$inboundSchema),
187
+ M.jsonErr(401, errors.UnauthorizedError$inboundSchema),
188
+ M.jsonErr(403, errors.ForbiddenError$inboundSchema),
189
+ M.jsonErr(404, errors.NotFoundError$inboundSchema),
190
+ M.jsonErr(409, errors.ConflictError$inboundSchema),
191
+ M.jsonErr(410, errors.GoneError$inboundSchema),
192
+ M.jsonErr(422, errors.UnprocessableEntityError$inboundSchema),
193
+ M.jsonErr(429, errors.TooManyRequestsError$inboundSchema),
194
+ M.jsonErr(500, errors.InternalServerError$inboundSchema),
195
+ M.jsonErr(502, errors.BadGatewayError$inboundSchema),
196
+ M.jsonErr(503, errors.ServiceUnavailableError$inboundSchema),
197
+ M.fail("4XX"),
198
+ M.fail("5XX"),
199
+ )(response, req, { extraFields: responseFields });
200
+ if (!result.ok) {
201
+ return [result, { status: "complete", request: req, response }];
202
+ }
203
+
204
+ return [result, { status: "complete", request: req, response }];
205
+ }