bereach 1.4.3 → 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} +1166 -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} +454 -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 +28 -12
  163. package/esm/models/operations/search-companies-response.d.ts.map +1 -1
  164. package/esm/models/operations/search-companies-response.js +6 -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} +66 -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} +26 -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} +2493 -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 +34 -14
  268. package/src/models/operations/{update-account-response.ts → update-account-proxy-config-response.ts} +107 -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,901 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+ import * as z from "zod/v4-mini";
5
+ import { safeParse } from "../../lib/schemas.js";
6
+ import * as openEnums from "../../types/enums.js";
7
+ import * as types from "../../types/primitives.js";
8
+ import { smartUnion } from "../../types/smart-union.js";
9
+ import { GetByUrlActivity$inboundSchema, GetByUrlCampaign$inboundSchema, } from "./get-by-url-campaign.js";
10
+ export const ListMessagesQueryParamStatus = {
11
+ Draft: "draft",
12
+ Scheduled: "scheduled",
13
+ Sending: "sending",
14
+ Sent: "sent",
15
+ Failed: "failed",
16
+ Cancelled: "cancelled",
17
+ };
18
+ export const MessageStatus = {
19
+ Draft: "draft",
20
+ Scheduled: "scheduled",
21
+ Sending: "sending",
22
+ Sent: "sent",
23
+ Failed: "failed",
24
+ Cancelled: "cancelled",
25
+ };
26
+ /**
27
+ * Default 'draft'
28
+ */
29
+ export const CreateStatusRequest = {
30
+ Draft: "draft",
31
+ Scheduled: "scheduled",
32
+ };
33
+ export const ScheduledMessageStatus = {
34
+ Draft: "draft",
35
+ Scheduled: "scheduled",
36
+ Sending: "sending",
37
+ Sent: "sent",
38
+ Failed: "failed",
39
+ Cancelled: "cancelled",
40
+ };
41
+ /**
42
+ * Action to perform
43
+ */
44
+ export const UpdateScheduleAction = {
45
+ Pause: "pause",
46
+ Resume: "resume",
47
+ Delete: "delete",
48
+ };
49
+ /**
50
+ * Filter by task status
51
+ */
52
+ export const ListTasksQueryParamStatus = {
53
+ Queued: "queued",
54
+ Dispatched: "dispatched",
55
+ Accepted: "accepted",
56
+ Running: "running",
57
+ Succeeded: "succeeded",
58
+ Failed: "failed",
59
+ Cancelled: "cancelled",
60
+ };
61
+ export const TaskStatus = {
62
+ Queued: "queued",
63
+ Dispatched: "dispatched",
64
+ Accepted: "accepted",
65
+ Running: "running",
66
+ Succeeded: "succeeded",
67
+ Failed: "failed",
68
+ Cancelled: "cancelled",
69
+ };
70
+ export const EventsFeedType = {
71
+ TaskCompleted: "task:completed",
72
+ TaskFailed: "task:failed",
73
+ ReplyReceived: "reply:received",
74
+ ConnectionAccepted: "connection:accepted",
75
+ CampaignTargetReached: "campaign:target_reached",
76
+ CampaignCompleted: "campaign:completed",
77
+ CampaignPaused: "campaign:paused",
78
+ };
79
+ /**
80
+ * Intermediate status update (no result yet)
81
+ */
82
+ export const SubmitTaskResultStatus = {
83
+ Accepted: "accepted",
84
+ Running: "running",
85
+ };
86
+ export const AgentSnapshotType = {
87
+ TaskCompleted: "task:completed",
88
+ TaskFailed: "task:failed",
89
+ ReplyReceived: "reply:received",
90
+ ConnectionAccepted: "connection:accepted",
91
+ CampaignTargetReached: "campaign:target_reached",
92
+ CampaignCompleted: "campaign:completed",
93
+ CampaignPaused: "campaign:paused",
94
+ };
95
+ export const UpgradeWorkspaceAccountAction = {
96
+ Upgrade: "upgrade",
97
+ Downgrade: "downgrade",
98
+ };
99
+ /**
100
+ * "create" to make a new invite, "list" to get existing
101
+ */
102
+ export const CreateWorkspaceInviteAction = {
103
+ Create: "create",
104
+ List: "list",
105
+ };
106
+ /** @internal */
107
+ export const GetByUrlContact$inboundSchema = z.object({
108
+ id: types.string(),
109
+ linkedinUrl: types.string(),
110
+ profileUrn: types.nullable(types.string()),
111
+ publicIdentifier: types.nullable(types.string()),
112
+ name: types.string(),
113
+ lifecycleStage: types.string(),
114
+ hotScore: types.number(),
115
+ qualificationNotes: types.nullable(types.string()),
116
+ notes: types.nullable(types.string()),
117
+ stageChangedAt: types.nullable(types.string()),
118
+ profileData: types.nullable(z.any()),
119
+ profileUpdatedAt: types.nullable(types.string()),
120
+ conversationData: types.nullable(z.any()),
121
+ conversationUpdatedAt: types.nullable(types.string()),
122
+ outreachStatus: types.string(),
123
+ lastContactedAt: types.nullable(types.string()),
124
+ lastRepliedAt: types.nullable(types.string()),
125
+ nextFollowUpAt: types.nullable(types.string()),
126
+ doNotContact: types.boolean(),
127
+ tags: z.array(types.string()),
128
+ createdAt: types.string(),
129
+ updatedAt: types.string(),
130
+ activities: z.array(GetByUrlActivity$inboundSchema),
131
+ campaigns: z.array(GetByUrlCampaign$inboundSchema),
132
+ });
133
+ export function getByUrlContactFromJSON(jsonString) {
134
+ return safeParse(jsonString, (x) => GetByUrlContact$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetByUrlContact' from JSON`);
135
+ }
136
+ /** @internal */
137
+ export const GetByUrlResponse$inboundSchema = z.object({
138
+ success: types.literal(true),
139
+ contact: z.lazy(() => GetByUrlContact$inboundSchema),
140
+ creditsUsed: types.number(),
141
+ retryAfter: types.number(),
142
+ });
143
+ export function getByUrlResponseFromJSON(jsonString) {
144
+ return safeParse(jsonString, (x) => GetByUrlResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetByUrlResponse' from JSON`);
145
+ }
146
+ /** @internal */
147
+ export const ListMessagesQueryParamStatus$outboundSchema = z.enum(ListMessagesQueryParamStatus);
148
+ /** @internal */
149
+ export const ListMessagesRequest$outboundSchema = z.object({
150
+ status: z.optional(ListMessagesQueryParamStatus$outboundSchema),
151
+ contactId: z.optional(z.string()),
152
+ campaignSlug: z.optional(z.string()),
153
+ limit: z._default(z.int(), 50),
154
+ offset: z._default(z.int(), 0),
155
+ });
156
+ export function listMessagesRequestToJSON(listMessagesRequest) {
157
+ return JSON.stringify(ListMessagesRequest$outboundSchema.parse(listMessagesRequest));
158
+ }
159
+ /** @internal */
160
+ export const MessageStatus$inboundSchema = openEnums.inboundSchema(MessageStatus);
161
+ /** @internal */
162
+ export const ListMessagesMessage$inboundSchema = z.object({
163
+ id: types.string(),
164
+ contactId: types.string(),
165
+ contactName: z.optional(z.nullable(types.string())),
166
+ contactLinkedinUrl: z.optional(z.nullable(types.string())),
167
+ message: types.string(),
168
+ status: MessageStatus$inboundSchema,
169
+ scheduledSendAt: types.nullable(types.string()),
170
+ sentAt: types.nullable(types.string()),
171
+ campaignSlug: types.nullable(types.string()),
172
+ errorMessage: z.optional(z.nullable(types.string())),
173
+ createdAt: types.string(),
174
+ });
175
+ export function listMessagesMessageFromJSON(jsonString) {
176
+ return safeParse(jsonString, (x) => ListMessagesMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListMessagesMessage' from JSON`);
177
+ }
178
+ /** @internal */
179
+ export const ListMessagesResponse$inboundSchema = z.object({
180
+ success: types.literal(true),
181
+ messages: z.array(z.lazy(() => ListMessagesMessage$inboundSchema)),
182
+ total: types.number(),
183
+ limit: types.number(),
184
+ offset: types.number(),
185
+ creditsUsed: types.number(),
186
+ retryAfter: types.number(),
187
+ });
188
+ export function listMessagesResponseFromJSON(jsonString) {
189
+ return safeParse(jsonString, (x) => ListMessagesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListMessagesResponse' from JSON`);
190
+ }
191
+ /** @internal */
192
+ export const CreateStatusRequest$outboundSchema = z.enum(CreateStatusRequest);
193
+ /** @internal */
194
+ export const CreateRequest$outboundSchema = z.object({
195
+ contactId: z.string(),
196
+ message: z.string(),
197
+ status: z.optional(CreateStatusRequest$outboundSchema),
198
+ scheduledSendAt: z.optional(z.string()),
199
+ campaignSlug: z.optional(z.string()),
200
+ });
201
+ export function createRequestToJSON(createRequest) {
202
+ return JSON.stringify(CreateRequest$outboundSchema.parse(createRequest));
203
+ }
204
+ /** @internal */
205
+ export const ScheduledMessageStatus$inboundSchema = openEnums.inboundSchema(ScheduledMessageStatus);
206
+ /** @internal */
207
+ export const ScheduledMessage$inboundSchema = z.object({
208
+ id: types.string(),
209
+ contactId: types.string(),
210
+ contactName: z.optional(z.nullable(types.string())),
211
+ contactLinkedinUrl: z.optional(z.nullable(types.string())),
212
+ message: types.string(),
213
+ status: ScheduledMessageStatus$inboundSchema,
214
+ scheduledSendAt: types.nullable(types.string()),
215
+ sentAt: types.nullable(types.string()),
216
+ campaignSlug: types.nullable(types.string()),
217
+ errorMessage: z.optional(z.nullable(types.string())),
218
+ createdAt: types.string(),
219
+ });
220
+ export function scheduledMessageFromJSON(jsonString) {
221
+ return safeParse(jsonString, (x) => ScheduledMessage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ScheduledMessage' from JSON`);
222
+ }
223
+ /** @internal */
224
+ export const CreateResponse$inboundSchema = z.object({
225
+ success: types.literal(true),
226
+ scheduledMessage: z.lazy(() => ScheduledMessage$inboundSchema),
227
+ creditsUsed: types.number(),
228
+ retryAfter: types.number(),
229
+ });
230
+ export function createResponseFromJSON(jsonString) {
231
+ return safeParse(jsonString, (x) => CreateResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateResponse' from JSON`);
232
+ }
233
+ /** @internal */
234
+ export const BatchScheduleRequest$outboundSchema = z.object({
235
+ contactIds: z.optional(z.array(z.string())),
236
+ messageIds: z.optional(z.array(z.string())),
237
+ scheduledSendAt: z.string(),
238
+ editedMessages: z.optional(z.record(z.string(), z.string())),
239
+ });
240
+ export function batchScheduleRequestToJSON(batchScheduleRequest) {
241
+ return JSON.stringify(BatchScheduleRequest$outboundSchema.parse(batchScheduleRequest));
242
+ }
243
+ /** @internal */
244
+ export const BatchScheduleResponse$inboundSchema = z.object({
245
+ success: types.literal(true),
246
+ scheduled: types.number(),
247
+ triggerFailures: types.number(),
248
+ scheduledSendAt: types.string(),
249
+ staggerMinutes: types.number(),
250
+ lastSendAt: types.string(),
251
+ creditsUsed: types.number(),
252
+ retryAfter: types.number(),
253
+ });
254
+ export function batchScheduleResponseFromJSON(jsonString) {
255
+ return safeParse(jsonString, (x) => BatchScheduleResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'BatchScheduleResponse' from JSON`);
256
+ }
257
+ /** @internal */
258
+ export const CancelRequest$outboundSchema = z.object({
259
+ messageIds: z.optional(z.array(z.string())),
260
+ contactIds: z.optional(z.array(z.string())),
261
+ });
262
+ export function cancelRequestToJSON(cancelRequest) {
263
+ return JSON.stringify(CancelRequest$outboundSchema.parse(cancelRequest));
264
+ }
265
+ /** @internal */
266
+ export const CancelResponse$inboundSchema = z.object({
267
+ success: types.literal(true),
268
+ cancelled: types.number(),
269
+ creditsUsed: types.number(),
270
+ retryAfter: types.number(),
271
+ });
272
+ export function cancelResponseFromJSON(jsonString) {
273
+ return safeParse(jsonString, (x) => CancelResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CancelResponse' from JSON`);
274
+ }
275
+ /** @internal */
276
+ export const ReviewDraftsRequest$outboundSchema = z.object({
277
+ campaignId: z.string(),
278
+ approved: z.optional(z.array(z.string())),
279
+ rejected: z.optional(z.array(z.string())),
280
+ editedMessages: z.optional(z.record(z.string(), z.string())),
281
+ });
282
+ export function reviewDraftsRequestToJSON(reviewDraftsRequest) {
283
+ return JSON.stringify(ReviewDraftsRequest$outboundSchema.parse(reviewDraftsRequest));
284
+ }
285
+ /** @internal */
286
+ export const ReviewDraftsResponse$inboundSchema = z.object({
287
+ success: types.literal(true),
288
+ approved: types.number(),
289
+ rejected: types.number(),
290
+ });
291
+ export function reviewDraftsResponseFromJSON(jsonString) {
292
+ return safeParse(jsonString, (x) => ReviewDraftsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ReviewDraftsResponse' from JSON`);
293
+ }
294
+ /** @internal */
295
+ export const ListEntriesRequest$outboundSchema = z.object({
296
+ scope: z.optional(z.string()),
297
+ type: z.optional(z.string()),
298
+ });
299
+ export function listEntriesRequestToJSON(listEntriesRequest) {
300
+ return JSON.stringify(ListEntriesRequest$outboundSchema.parse(listEntriesRequest));
301
+ }
302
+ /** @internal */
303
+ export const ListEntriesEntry$inboundSchema = z.object({
304
+ id: types.string(),
305
+ type: types.string(),
306
+ label: types.nullable(types.string()),
307
+ content: types.string(),
308
+ scope: types.string(),
309
+ updatedAt: types.string(),
310
+ });
311
+ export function listEntriesEntryFromJSON(jsonString) {
312
+ return safeParse(jsonString, (x) => ListEntriesEntry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListEntriesEntry' from JSON`);
313
+ }
314
+ /** @internal */
315
+ export const ListEntriesResponse$inboundSchema = z.object({
316
+ success: types.literal(true),
317
+ entries: z.array(z.lazy(() => ListEntriesEntry$inboundSchema)),
318
+ creditsUsed: types.number(),
319
+ retryAfter: types.number(),
320
+ });
321
+ export function listEntriesResponseFromJSON(jsonString) {
322
+ return safeParse(jsonString, (x) => ListEntriesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListEntriesResponse' from JSON`);
323
+ }
324
+ /** @internal */
325
+ export const SetRequest$outboundSchema = z.object({
326
+ type: z.string(),
327
+ content: z.string(),
328
+ scope: z.optional(z.string()),
329
+ label: z.optional(z.string()),
330
+ });
331
+ export function setRequestToJSON(setRequest) {
332
+ return JSON.stringify(SetRequest$outboundSchema.parse(setRequest));
333
+ }
334
+ /** @internal */
335
+ export const SetEntry$inboundSchema = z
336
+ .object({
337
+ id: types.string(),
338
+ type: types.string(),
339
+ label: types.nullable(types.string()),
340
+ content: types.string(),
341
+ scope: types.string(),
342
+ updatedAt: types.string(),
343
+ });
344
+ export function setEntryFromJSON(jsonString) {
345
+ return safeParse(jsonString, (x) => SetEntry$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SetEntry' from JSON`);
346
+ }
347
+ /** @internal */
348
+ export const SetResponse$inboundSchema = z
349
+ .object({
350
+ success: types.literal(true),
351
+ entry: z.lazy(() => SetEntry$inboundSchema),
352
+ creditsUsed: types.number(),
353
+ retryAfter: types.number(),
354
+ });
355
+ export function setResponseFromJSON(jsonString) {
356
+ return safeParse(jsonString, (x) => SetResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SetResponse' from JSON`);
357
+ }
358
+ /** @internal */
359
+ export const DeleteRequest$outboundSchema = z.object({
360
+ type: z.string(),
361
+ scope: z.optional(z.string()),
362
+ });
363
+ export function deleteRequestToJSON(deleteRequest) {
364
+ return JSON.stringify(DeleteRequest$outboundSchema.parse(deleteRequest));
365
+ }
366
+ /** @internal */
367
+ export const DeleteResponse$inboundSchema = z.object({
368
+ success: types.literal(true),
369
+ creditsUsed: types.number(),
370
+ retryAfter: types.number(),
371
+ });
372
+ export function deleteResponseFromJSON(jsonString) {
373
+ return safeParse(jsonString, (x) => DeleteResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteResponse' from JSON`);
374
+ }
375
+ /** @internal */
376
+ export const Schedule$inboundSchema = z
377
+ .object({
378
+ scheduleId: types.string(),
379
+ name: types.string(),
380
+ cron: types.nullable(types.string()),
381
+ isPaused: types.boolean(),
382
+ lastRun: types.nullable(types.string()),
383
+ nextRun: types.nullable(types.string()),
384
+ lastStatus: types.nullable(z.any()),
385
+ destination: types.string(),
386
+ });
387
+ export function scheduleFromJSON(jsonString) {
388
+ return safeParse(jsonString, (x) => Schedule$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Schedule' from JSON`);
389
+ }
390
+ /** @internal */
391
+ export const ListSchedulesResponse$inboundSchema = z.object({
392
+ success: types.literal(true),
393
+ schedules: z.array(z.lazy(() => Schedule$inboundSchema)),
394
+ creditsUsed: types.number(),
395
+ retryAfter: types.number(),
396
+ });
397
+ export function listSchedulesResponseFromJSON(jsonString) {
398
+ return safeParse(jsonString, (x) => ListSchedulesResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListSchedulesResponse' from JSON`);
399
+ }
400
+ /** @internal */
401
+ export const UpdateScheduleAction$outboundSchema = z.enum(UpdateScheduleAction);
402
+ /** @internal */
403
+ export const UpdateScheduleRequestBody$outboundSchema = z.object({
404
+ action: UpdateScheduleAction$outboundSchema,
405
+ });
406
+ export function updateScheduleRequestBodyToJSON(updateScheduleRequestBody) {
407
+ return JSON.stringify(UpdateScheduleRequestBody$outboundSchema.parse(updateScheduleRequestBody));
408
+ }
409
+ /** @internal */
410
+ export const UpdateScheduleRequest$outboundSchema = z.object({
411
+ scheduleId: z.string(),
412
+ body: z.lazy(() => UpdateScheduleRequestBody$outboundSchema),
413
+ });
414
+ export function updateScheduleRequestToJSON(updateScheduleRequest) {
415
+ return JSON.stringify(UpdateScheduleRequest$outboundSchema.parse(updateScheduleRequest));
416
+ }
417
+ /** @internal */
418
+ export const UpdateScheduleResponse$inboundSchema = z.object({
419
+ success: types.literal(true),
420
+ creditsUsed: types.number(),
421
+ retryAfter: types.number(),
422
+ });
423
+ export function updateScheduleResponseFromJSON(jsonString) {
424
+ return safeParse(jsonString, (x) => UpdateScheduleResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpdateScheduleResponse' from JSON`);
425
+ }
426
+ /** @internal */
427
+ export const ListTasksQueryParamStatus$outboundSchema = z.enum(ListTasksQueryParamStatus);
428
+ /** @internal */
429
+ export const ListTasksRequest$outboundSchema = z.object({
430
+ status: z.optional(ListTasksQueryParamStatus$outboundSchema),
431
+ type: z.optional(z.string()),
432
+ campaignId: z.optional(z.string()),
433
+ limit: z._default(z.int(), 50),
434
+ offset: z._default(z.int(), 0),
435
+ });
436
+ export function listTasksRequestToJSON(listTasksRequest) {
437
+ return JSON.stringify(ListTasksRequest$outboundSchema.parse(listTasksRequest));
438
+ }
439
+ /** @internal */
440
+ export const TaskStatus$inboundSchema = openEnums.inboundSchema(TaskStatus);
441
+ /** @internal */
442
+ export const ListTasksTask$inboundSchema = z.object({
443
+ id: types.string(),
444
+ type: types.string(),
445
+ campaignId: types.nullable(types.string()),
446
+ status: TaskStatus$inboundSchema,
447
+ priority: types.number(),
448
+ model: types.nullable(types.string()),
449
+ result: types.nullable(z.any()),
450
+ error: types.nullable(types.string()),
451
+ connectorId: types.nullable(types.string()),
452
+ workflowRunId: types.nullable(types.string()),
453
+ createdAt: types.string(),
454
+ dispatchedAt: types.nullable(types.string()),
455
+ completedAt: types.nullable(types.string()),
456
+ });
457
+ export function listTasksTaskFromJSON(jsonString) {
458
+ return safeParse(jsonString, (x) => ListTasksTask$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListTasksTask' from JSON`);
459
+ }
460
+ /** @internal */
461
+ export const ListTasksResponse$inboundSchema = z.object({
462
+ tasks: z.array(z.lazy(() => ListTasksTask$inboundSchema)),
463
+ total: types.number(),
464
+ limit: types.number(),
465
+ offset: types.number(),
466
+ });
467
+ export function listTasksResponseFromJSON(jsonString) {
468
+ return safeParse(jsonString, (x) => ListTasksResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListTasksResponse' from JSON`);
469
+ }
470
+ /** @internal */
471
+ export const CancelTaskRequest$outboundSchema = z.object({
472
+ id: z.string(),
473
+ });
474
+ export function cancelTaskRequestToJSON(cancelTaskRequest) {
475
+ return JSON.stringify(CancelTaskRequest$outboundSchema.parse(cancelTaskRequest));
476
+ }
477
+ /** @internal */
478
+ export const CancelTaskResponse$inboundSchema = z.object({
479
+ success: types.literal(true),
480
+ status: types.string(),
481
+ message: types.optional(types.string()),
482
+ });
483
+ export function cancelTaskResponseFromJSON(jsonString) {
484
+ return safeParse(jsonString, (x) => CancelTaskResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CancelTaskResponse' from JSON`);
485
+ }
486
+ /** @internal */
487
+ export const EventsFeedRequest$outboundSchema = z.object({
488
+ since: z.optional(z.string()),
489
+ limit: z._default(z.int(), 20),
490
+ });
491
+ export function eventsFeedRequestToJSON(eventsFeedRequest) {
492
+ return JSON.stringify(EventsFeedRequest$outboundSchema.parse(eventsFeedRequest));
493
+ }
494
+ /** @internal */
495
+ export const EventsFeedType$inboundSchema = openEnums.inboundSchema(EventsFeedType);
496
+ /** @internal */
497
+ export const Event$inboundSchema = z.object({
498
+ id: types.string(),
499
+ type: EventsFeedType$inboundSchema,
500
+ campaignId: types.optional(types.string()),
501
+ campaignName: types.optional(types.string()),
502
+ summary: types.string(),
503
+ metadata: z.record(z.string(), z.any()),
504
+ timestamp: types.number(),
505
+ });
506
+ export function eventFromJSON(jsonString) {
507
+ return safeParse(jsonString, (x) => Event$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Event' from JSON`);
508
+ }
509
+ /** @internal */
510
+ export const EventsFeedResponse$inboundSchema = z.object({
511
+ events: z.array(z.lazy(() => Event$inboundSchema)),
512
+ cursor: types.optional(types.number()),
513
+ });
514
+ export function eventsFeedResponseFromJSON(jsonString) {
515
+ return safeParse(jsonString, (x) => EventsFeedResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EventsFeedResponse' from JSON`);
516
+ }
517
+ /** @internal */
518
+ export const CancelChainRequest$outboundSchema = z.object({
519
+ workflowRunId: z.string(),
520
+ });
521
+ export function cancelChainRequestToJSON(cancelChainRequest) {
522
+ return JSON.stringify(CancelChainRequest$outboundSchema.parse(cancelChainRequest));
523
+ }
524
+ /** @internal */
525
+ export const CancelChainResponse$inboundSchema = z.object({
526
+ success: types.literal(true),
527
+ tasksCancelled: types.number(),
528
+ });
529
+ export function cancelChainResponseFromJSON(jsonString) {
530
+ return safeParse(jsonString, (x) => CancelChainResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CancelChainResponse' from JSON`);
531
+ }
532
+ /** @internal */
533
+ export const PullTaskTask$inboundSchema = z.object({
534
+ id: types.string(),
535
+ type: types.string(),
536
+ campaignId: types.nullable(types.string()),
537
+ message: types.string(),
538
+ model: types.nullable(types.string()),
539
+ thinking: types.nullable(types.string()),
540
+ timeoutSeconds: types.nullable(types.number()),
541
+ sessionKey: types.nullable(types.string()),
542
+ payload: types.nullable(z.any()),
543
+ });
544
+ export function pullTaskTaskFromJSON(jsonString) {
545
+ return safeParse(jsonString, (x) => PullTaskTask$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PullTaskTask' from JSON`);
546
+ }
547
+ /** @internal */
548
+ export const PullTaskResponse$inboundSchema = z.object({
549
+ task: types.nullable(z.lazy(() => PullTaskTask$inboundSchema)),
550
+ cancelTaskId: types.nullable(types.string()),
551
+ pollIntervalMs: types.number(),
552
+ });
553
+ export function pullTaskResponseFromJSON(jsonString) {
554
+ return safeParse(jsonString, (x) => PullTaskResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PullTaskResponse' from JSON`);
555
+ }
556
+ /** @internal */
557
+ export const SubmitTaskResultStatus$outboundSchema = z.enum(SubmitTaskResultStatus);
558
+ /** @internal */
559
+ export const SubmitTaskResultRequestBody$outboundSchema = z.object({
560
+ status: z.optional(SubmitTaskResultStatus$outboundSchema),
561
+ result: z.optional(z.any()),
562
+ error: z.optional(z.string()),
563
+ });
564
+ export function submitTaskResultRequestBodyToJSON(submitTaskResultRequestBody) {
565
+ return JSON.stringify(SubmitTaskResultRequestBody$outboundSchema.parse(submitTaskResultRequestBody));
566
+ }
567
+ /** @internal */
568
+ export const SubmitTaskResultRequest$outboundSchema = z.object({
569
+ id: z.string(),
570
+ body: z.lazy(() => SubmitTaskResultRequestBody$outboundSchema),
571
+ });
572
+ export function submitTaskResultRequestToJSON(submitTaskResultRequest) {
573
+ return JSON.stringify(SubmitTaskResultRequest$outboundSchema.parse(submitTaskResultRequest));
574
+ }
575
+ /** @internal */
576
+ export const SubmitTaskResultResponse$inboundSchema = z.object({
577
+ success: types.literal(true),
578
+ status: types.string(),
579
+ message: types.optional(types.string()),
580
+ });
581
+ export function submitTaskResultResponseFromJSON(jsonString) {
582
+ return safeParse(jsonString, (x) => SubmitTaskResultResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SubmitTaskResultResponse' from JSON`);
583
+ }
584
+ /** @internal */
585
+ export const Connector$inboundSchema = z
586
+ .object({
587
+ id: types.string(),
588
+ name: types.string(),
589
+ status: types.string(),
590
+ credentialsId: types.string(),
591
+ lastSeenAt: types.nullable(types.string()),
592
+ lastTaskAt: types.nullable(types.string()),
593
+ createdAt: types.string(),
594
+ isOnline: types.boolean(),
595
+ });
596
+ export function connectorFromJSON(jsonString) {
597
+ return safeParse(jsonString, (x) => Connector$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Connector' from JSON`);
598
+ }
599
+ /** @internal */
600
+ export const ListConnectorsResponse$inboundSchema = z.object({
601
+ connectors: z.array(z.lazy(() => Connector$inboundSchema)),
602
+ });
603
+ export function listConnectorsResponseFromJSON(jsonString) {
604
+ return safeParse(jsonString, (x) => ListConnectorsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListConnectorsResponse' from JSON`);
605
+ }
606
+ /** @internal */
607
+ export const ConnectorHeartbeatRequest$outboundSchema = z.object({
608
+ currentTaskId: z.optional(z.string()),
609
+ });
610
+ export function connectorHeartbeatRequestToJSON(connectorHeartbeatRequest) {
611
+ return JSON.stringify(ConnectorHeartbeatRequest$outboundSchema.parse(connectorHeartbeatRequest));
612
+ }
613
+ /** @internal */
614
+ export const ConnectorHeartbeatResponse$inboundSchema = z.object({
615
+ success: types.literal(true),
616
+ pendingCount: types.number(),
617
+ pollIntervalMs: types.number(),
618
+ });
619
+ export function connectorHeartbeatResponseFromJSON(jsonString) {
620
+ return safeParse(jsonString, (x) => ConnectorHeartbeatResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ConnectorHeartbeatResponse' from JSON`);
621
+ }
622
+ /** @internal */
623
+ export const Context$inboundSchema = z.object({
624
+ type: types.string(),
625
+ label: types.nullable(types.string()),
626
+ content: types.string(),
627
+ scope: types.string(),
628
+ });
629
+ export function contextFromJSON(jsonString) {
630
+ return safeParse(jsonString, (x) => Context$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Context' from JSON`);
631
+ }
632
+ /** @internal */
633
+ export const ActiveAccount$inboundSchema = z.object({
634
+ id: types.string(),
635
+ name: types.nullable(types.string()),
636
+ plan: types.string(),
637
+ headline: types.nullable(types.string()),
638
+ isUnlimited: types.boolean(),
639
+ creditsLimit: types.number(),
640
+ creditsCount: types.number(),
641
+ simulateWrites: types.boolean(),
642
+ isCurrent: types.boolean(),
643
+ });
644
+ export function activeAccountFromJSON(jsonString) {
645
+ return safeParse(jsonString, (x) => ActiveAccount$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ActiveAccount' from JSON`);
646
+ }
647
+ /** @internal */
648
+ export const AgentSnapshotAccount$inboundSchema = z.object({
649
+ id: types.string(),
650
+ name: types.nullable(types.string()),
651
+ plan: types.string(),
652
+ headline: types.nullable(types.string()),
653
+ isUnlimited: types.boolean(),
654
+ creditsLimit: types.number(),
655
+ creditsCount: types.number(),
656
+ simulateWrites: types.boolean(),
657
+ isCurrent: types.boolean(),
658
+ });
659
+ export function agentSnapshotAccountFromJSON(jsonString) {
660
+ return safeParse(jsonString, (x) => AgentSnapshotAccount$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentSnapshotAccount' from JSON`);
661
+ }
662
+ /** @internal */
663
+ export const AgentSnapshotStageCounts$inboundSchema = z.object({
664
+ contact: types.number(),
665
+ lead: types.number(),
666
+ qualified: types.number(),
667
+ approved: types.number(),
668
+ rejected: types.number(),
669
+ total: types.number(),
670
+ });
671
+ export function agentSnapshotStageCountsFromJSON(jsonString) {
672
+ return safeParse(jsonString, (x) => AgentSnapshotStageCounts$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentSnapshotStageCounts' from JSON`);
673
+ }
674
+ /** @internal */
675
+ export const ActiveCampaign$inboundSchema = z.object({
676
+ id: types.string(),
677
+ name: types.string(),
678
+ type: types.string(),
679
+ status: types.string(),
680
+ context: types.nullable(z.any()),
681
+ stageCounts: z.lazy(() => AgentSnapshotStageCounts$inboundSchema),
682
+ });
683
+ export function activeCampaignFromJSON(jsonString) {
684
+ return safeParse(jsonString, (x) => ActiveCampaign$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ActiveCampaign' from JSON`);
685
+ }
686
+ /** @internal */
687
+ export const AgentSnapshotType$inboundSchema = openEnums.inboundSchema(AgentSnapshotType);
688
+ /** @internal */
689
+ export const RecentEvent$inboundSchema = z
690
+ .object({
691
+ id: types.string(),
692
+ type: AgentSnapshotType$inboundSchema,
693
+ campaignId: types.optional(types.string()),
694
+ campaignName: types.optional(types.string()),
695
+ summary: types.string(),
696
+ metadata: z.record(z.string(), z.any()),
697
+ timestamp: types.number(),
698
+ });
699
+ export function recentEventFromJSON(jsonString) {
700
+ return safeParse(jsonString, (x) => RecentEvent$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'RecentEvent' from JSON`);
701
+ }
702
+ /** @internal */
703
+ export const AgentSnapshotResponse$inboundSchema = z.object({
704
+ credits: types.nullable(z.any()),
705
+ pipeline: z.record(z.string(), types.number()),
706
+ contexts: z.array(z.lazy(() => Context$inboundSchema)),
707
+ pendingDrafts: types.number(),
708
+ failedDrafts: types.number(),
709
+ unreadDMs: types.number(),
710
+ pendingSentInvitations: types.number(),
711
+ activeAccount: types.nullable(z.lazy(() => ActiveAccount$inboundSchema)),
712
+ accounts: z.array(z.lazy(() => AgentSnapshotAccount$inboundSchema)),
713
+ leadGenState: types.nullable(z.any()),
714
+ outreachState: types.nullable(z.any()),
715
+ activeCampaigns: z.array(z.lazy(() => ActiveCampaign$inboundSchema)),
716
+ campaignChecks: z.any(),
717
+ sessionMeta: types.nullable(z.any()),
718
+ onboardingState: types.nullable(z.any()),
719
+ recentEvents: z.array(z.lazy(() => RecentEvent$inboundSchema)),
720
+ });
721
+ export function agentSnapshotResponseFromJSON(jsonString) {
722
+ return safeParse(jsonString, (x) => AgentSnapshotResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AgentSnapshotResponse' from JSON`);
723
+ }
724
+ /** @internal */
725
+ export const GetDmPollingSettingsSettings$inboundSchema = z.object({
726
+ dmPollingEnabled: types.boolean(),
727
+ dmWebhookUrl: types.nullable(types.string()),
728
+ dmLastPolledAt: types.nullable(types.string()),
729
+ connectionPollingEnabled: types.boolean(),
730
+ connectionLastPolledAt: types.nullable(types.string()),
731
+ });
732
+ export function getDmPollingSettingsSettingsFromJSON(jsonString) {
733
+ return safeParse(jsonString, (x) => GetDmPollingSettingsSettings$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDmPollingSettingsSettings' from JSON`);
734
+ }
735
+ /** @internal */
736
+ export const GetDmPollingSettingsResponse$inboundSchema = z.object({
737
+ success: types.literal(true),
738
+ settings: z.lazy(() => GetDmPollingSettingsSettings$inboundSchema),
739
+ creditsUsed: types.number(),
740
+ retryAfter: types.number(),
741
+ });
742
+ export function getDmPollingSettingsResponseFromJSON(jsonString) {
743
+ return safeParse(jsonString, (x) => GetDmPollingSettingsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'GetDmPollingSettingsResponse' from JSON`);
744
+ }
745
+ /** @internal */
746
+ export const PatchDmPollingSettingsRequest$outboundSchema = z.object({
747
+ dmPollingEnabled: z.optional(z.boolean()),
748
+ dmWebhookUrl: z.optional(z.nullable(z.string())),
749
+ connectionPollingEnabled: z.optional(z.boolean()),
750
+ });
751
+ export function patchDmPollingSettingsRequestToJSON(patchDmPollingSettingsRequest) {
752
+ return JSON.stringify(PatchDmPollingSettingsRequest$outboundSchema.parse(patchDmPollingSettingsRequest));
753
+ }
754
+ /** @internal */
755
+ export const PatchDmPollingSettingsSettings$inboundSchema = z.object({
756
+ dmPollingEnabled: types.boolean(),
757
+ dmWebhookUrl: types.nullable(types.string()),
758
+ dmLastPolledAt: types.nullable(types.string()),
759
+ connectionPollingEnabled: types.boolean(),
760
+ connectionLastPolledAt: types.nullable(types.string()),
761
+ });
762
+ export function patchDmPollingSettingsSettingsFromJSON(jsonString) {
763
+ return safeParse(jsonString, (x) => PatchDmPollingSettingsSettings$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchDmPollingSettingsSettings' from JSON`);
764
+ }
765
+ /** @internal */
766
+ export const PatchDmPollingSettingsResponse$inboundSchema = z.object({
767
+ success: types.literal(true),
768
+ settings: z.lazy(() => PatchDmPollingSettingsSettings$inboundSchema),
769
+ creditsUsed: types.number(),
770
+ retryAfter: types.number(),
771
+ });
772
+ export function patchDmPollingSettingsResponseFromJSON(jsonString) {
773
+ return safeParse(jsonString, (x) => PatchDmPollingSettingsResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PatchDmPollingSettingsResponse' from JSON`);
774
+ }
775
+ /** @internal */
776
+ export const DeleteWorkspaceAccountRequest$outboundSchema = z.object({
777
+ id: z.string(),
778
+ });
779
+ export function deleteWorkspaceAccountRequestToJSON(deleteWorkspaceAccountRequest) {
780
+ return JSON.stringify(DeleteWorkspaceAccountRequest$outboundSchema.parse(deleteWorkspaceAccountRequest));
781
+ }
782
+ /** @internal */
783
+ export const DeleteWorkspaceAccountResponse$inboundSchema = z.object({
784
+ success: types.literal(true),
785
+ message: types.string(),
786
+ });
787
+ export function deleteWorkspaceAccountResponseFromJSON(jsonString) {
788
+ return safeParse(jsonString, (x) => DeleteWorkspaceAccountResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteWorkspaceAccountResponse' from JSON`);
789
+ }
790
+ /** @internal */
791
+ export const UpgradeWorkspaceAccountAction$outboundSchema = z.enum(UpgradeWorkspaceAccountAction);
792
+ /** @internal */
793
+ export const UpgradeWorkspaceAccountRequest$outboundSchema = z.object({
794
+ credentialsId: z.string(),
795
+ action: UpgradeWorkspaceAccountAction$outboundSchema,
796
+ });
797
+ export function upgradeWorkspaceAccountRequestToJSON(upgradeWorkspaceAccountRequest) {
798
+ return JSON.stringify(UpgradeWorkspaceAccountRequest$outboundSchema.parse(upgradeWorkspaceAccountRequest));
799
+ }
800
+ /** @internal */
801
+ export const UpgradeWorkspaceAccountResponse$inboundSchema = z.object({
802
+ success: types.literal(true),
803
+ message: types.string(),
804
+ seatsUsed: types.number(),
805
+ seatsIncluded: types.number(),
806
+ });
807
+ export function upgradeWorkspaceAccountResponseFromJSON(jsonString) {
808
+ return safeParse(jsonString, (x) => UpgradeWorkspaceAccountResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UpgradeWorkspaceAccountResponse' from JSON`);
809
+ }
810
+ /** @internal */
811
+ export const CreateWorkspaceInviteAction$outboundSchema = z.enum(CreateWorkspaceInviteAction);
812
+ /** @internal */
813
+ export const CreateWorkspaceInviteRequest$outboundSchema = z.object({
814
+ action: CreateWorkspaceInviteAction$outboundSchema,
815
+ email: z.optional(z.string()),
816
+ name: z.optional(z.string()),
817
+ maxUses: z._default(z.int(), 1),
818
+ });
819
+ export function createWorkspaceInviteRequestToJSON(createWorkspaceInviteRequest) {
820
+ return JSON.stringify(CreateWorkspaceInviteRequest$outboundSchema.parse(createWorkspaceInviteRequest));
821
+ }
822
+ /** @internal */
823
+ export const Invite2$inboundSchema = z.object({
824
+ id: types.string(),
825
+ email: types.nullable(types.string()),
826
+ name: types.nullable(types.string()),
827
+ code: types.string(),
828
+ status: types.optional(types.string()),
829
+ maxUses: types.number(),
830
+ useCount: types.number(),
831
+ expiresAt: types.nullable(types.string()),
832
+ createdAt: types.string(),
833
+ });
834
+ export function invite2FromJSON(jsonString) {
835
+ return safeParse(jsonString, (x) => Invite2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Invite2' from JSON`);
836
+ }
837
+ /** @internal */
838
+ export const Workspace$inboundSchema = z
839
+ .object({
840
+ tier: types.string(),
841
+ proSeatsIncluded: types.number(),
842
+ proSeatsUsed: types.number(),
843
+ });
844
+ export function workspaceFromJSON(jsonString) {
845
+ return safeParse(jsonString, (x) => Workspace$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Workspace' from JSON`);
846
+ }
847
+ /** @internal */
848
+ export const ResponseBody2$inboundSchema = z.object({
849
+ success: types.literal(true),
850
+ invites: z.array(z.lazy(() => Invite2$inboundSchema)),
851
+ workspace: z.lazy(() => Workspace$inboundSchema),
852
+ });
853
+ export function responseBody2FromJSON(jsonString) {
854
+ return safeParse(jsonString, (x) => ResponseBody2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBody2' from JSON`);
855
+ }
856
+ /** @internal */
857
+ export const Invite1$inboundSchema = z.object({
858
+ id: types.string(),
859
+ email: types.nullable(types.string()),
860
+ name: types.nullable(types.string()),
861
+ code: types.string(),
862
+ status: types.optional(types.string()),
863
+ maxUses: types.number(),
864
+ useCount: types.number(),
865
+ expiresAt: types.nullable(types.string()),
866
+ createdAt: types.string(),
867
+ });
868
+ export function invite1FromJSON(jsonString) {
869
+ return safeParse(jsonString, (x) => Invite1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Invite1' from JSON`);
870
+ }
871
+ /** @internal */
872
+ export const ResponseBody1$inboundSchema = z.object({
873
+ success: types.literal(true),
874
+ invite: z.lazy(() => Invite1$inboundSchema),
875
+ });
876
+ export function responseBody1FromJSON(jsonString) {
877
+ return safeParse(jsonString, (x) => ResponseBody1$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseBody1' from JSON`);
878
+ }
879
+ /** @internal */
880
+ export const CreateWorkspaceInviteResponse$inboundSchema = smartUnion([
881
+ z.lazy(() => ResponseBody2$inboundSchema),
882
+ z.lazy(() => ResponseBody1$inboundSchema),
883
+ ]);
884
+ export function createWorkspaceInviteResponseFromJSON(jsonString) {
885
+ return safeParse(jsonString, (x) => CreateWorkspaceInviteResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateWorkspaceInviteResponse' from JSON`);
886
+ }
887
+ /** @internal */
888
+ export const DeleteWorkspaceInviteRequest$outboundSchema = z.object({
889
+ inviteId: z.string(),
890
+ });
891
+ export function deleteWorkspaceInviteRequestToJSON(deleteWorkspaceInviteRequest) {
892
+ return JSON.stringify(DeleteWorkspaceInviteRequest$outboundSchema.parse(deleteWorkspaceInviteRequest));
893
+ }
894
+ /** @internal */
895
+ export const DeleteWorkspaceInviteResponse$inboundSchema = z.object({
896
+ success: types.literal(true),
897
+ });
898
+ export function deleteWorkspaceInviteResponseFromJSON(jsonString) {
899
+ return safeParse(jsonString, (x) => DeleteWorkspaceInviteResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'DeleteWorkspaceInviteResponse' from JSON`);
900
+ }
901
+ //# sourceMappingURL=delete-workspace-invite-response.js.map