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,2783 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v4-mini";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import * as openEnums from "../../types/enums.js";
8
+ import { ClosedEnum, OpenEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import * as types from "../../types/primitives.js";
11
+ import { smartUnion } from "../../types/smart-union.js";
12
+ import { SDKValidationError } from "../errors/sdk-validation-error.js";
13
+ import {
14
+ GetByUrlActivity,
15
+ GetByUrlActivity$inboundSchema,
16
+ GetByUrlCampaign,
17
+ GetByUrlCampaign$inboundSchema,
18
+ } from "./get-by-url-campaign.js";
19
+
20
+ export type GetByUrlContact = {
21
+ id: string;
22
+ linkedinUrl: string;
23
+ /**
24
+ * LinkedIn profile URN (e.g. urn:li:fsd_profile:ACoAAA...)
25
+ */
26
+ profileUrn: string | null;
27
+ /**
28
+ * LinkedIn vanity slug (e.g. joshuaau)
29
+ */
30
+ publicIdentifier: string | null;
31
+ name: string;
32
+ lifecycleStage: string;
33
+ hotScore: number;
34
+ qualificationNotes: string | null;
35
+ notes: string | null;
36
+ stageChangedAt: string | null;
37
+ profileData: any | null;
38
+ profileUpdatedAt: string | null;
39
+ conversationData: any | null;
40
+ conversationUpdatedAt: string | null;
41
+ outreachStatus: string;
42
+ lastContactedAt: string | null;
43
+ lastRepliedAt: string | null;
44
+ nextFollowUpAt: string | null;
45
+ doNotContact: boolean;
46
+ tags: Array<string>;
47
+ createdAt: string;
48
+ updatedAt: string;
49
+ activities: Array<GetByUrlActivity>;
50
+ campaigns: Array<GetByUrlCampaign>;
51
+ };
52
+
53
+ /**
54
+ * Contact found
55
+ */
56
+ export type GetByUrlResponse = {
57
+ success: true;
58
+ contact: GetByUrlContact;
59
+ /**
60
+ * Credits consumed by this call (always 0 for contacts queries).
61
+ */
62
+ creditsUsed: number;
63
+ /**
64
+ * Seconds to wait before next call of the same type (always 0 for contacts queries).
65
+ */
66
+ retryAfter: number;
67
+ };
68
+
69
+ export const ListMessagesQueryParamStatus = {
70
+ Draft: "draft",
71
+ Scheduled: "scheduled",
72
+ Sending: "sending",
73
+ Sent: "sent",
74
+ Failed: "failed",
75
+ Cancelled: "cancelled",
76
+ } as const;
77
+ export type ListMessagesQueryParamStatus = ClosedEnum<
78
+ typeof ListMessagesQueryParamStatus
79
+ >;
80
+
81
+ export type ListMessagesRequest = {
82
+ status?: ListMessagesQueryParamStatus | undefined;
83
+ contactId?: string | undefined;
84
+ campaignSlug?: string | undefined;
85
+ limit?: number | undefined;
86
+ offset?: number | undefined;
87
+ };
88
+
89
+ export const MessageStatus = {
90
+ Draft: "draft",
91
+ Scheduled: "scheduled",
92
+ Sending: "sending",
93
+ Sent: "sent",
94
+ Failed: "failed",
95
+ Cancelled: "cancelled",
96
+ } as const;
97
+ export type MessageStatus = OpenEnum<typeof MessageStatus>;
98
+
99
+ export type ListMessagesMessage = {
100
+ id: string;
101
+ contactId: string;
102
+ /**
103
+ * Contact name (included in list, absent in create)
104
+ */
105
+ contactName?: string | null | undefined;
106
+ /**
107
+ * Contact LinkedIn URL (included in list, absent in create)
108
+ */
109
+ contactLinkedinUrl?: string | null | undefined;
110
+ message: string;
111
+ status: MessageStatus;
112
+ scheduledSendAt: string | null;
113
+ sentAt: string | null;
114
+ campaignSlug: string | null;
115
+ /**
116
+ * Error message if status is 'failed'
117
+ */
118
+ errorMessage?: string | null | undefined;
119
+ createdAt: string;
120
+ };
121
+
122
+ /**
123
+ * Messages list
124
+ */
125
+ export type ListMessagesResponse = {
126
+ success: true;
127
+ messages: Array<ListMessagesMessage>;
128
+ total: number;
129
+ limit: number;
130
+ offset: number;
131
+ /**
132
+ * Credits consumed (always 0 for workspace operations).
133
+ */
134
+ creditsUsed: number;
135
+ /**
136
+ * Seconds to wait (always 0 for workspace operations).
137
+ */
138
+ retryAfter: number;
139
+ };
140
+
141
+ /**
142
+ * Default 'draft'
143
+ */
144
+ export const CreateStatusRequest = {
145
+ Draft: "draft",
146
+ Scheduled: "scheduled",
147
+ } as const;
148
+ /**
149
+ * Default 'draft'
150
+ */
151
+ export type CreateStatusRequest = ClosedEnum<typeof CreateStatusRequest>;
152
+
153
+ export type CreateRequest = {
154
+ /**
155
+ * Internal contact ID
156
+ */
157
+ contactId: string;
158
+ /**
159
+ * DM text
160
+ */
161
+ message: string;
162
+ /**
163
+ * Default 'draft'
164
+ */
165
+ status?: CreateStatusRequest | undefined;
166
+ /**
167
+ * ISO datetime for auto-send
168
+ */
169
+ scheduledSendAt?: string | undefined;
170
+ campaignSlug?: string | undefined;
171
+ };
172
+
173
+ export const ScheduledMessageStatus = {
174
+ Draft: "draft",
175
+ Scheduled: "scheduled",
176
+ Sending: "sending",
177
+ Sent: "sent",
178
+ Failed: "failed",
179
+ Cancelled: "cancelled",
180
+ } as const;
181
+ export type ScheduledMessageStatus = OpenEnum<typeof ScheduledMessageStatus>;
182
+
183
+ export type ScheduledMessage = {
184
+ id: string;
185
+ contactId: string;
186
+ /**
187
+ * Contact name (included in list, absent in create)
188
+ */
189
+ contactName?: string | null | undefined;
190
+ /**
191
+ * Contact LinkedIn URL (included in list, absent in create)
192
+ */
193
+ contactLinkedinUrl?: string | null | undefined;
194
+ message: string;
195
+ status: ScheduledMessageStatus;
196
+ scheduledSendAt: string | null;
197
+ sentAt: string | null;
198
+ campaignSlug: string | null;
199
+ /**
200
+ * Error message if status is 'failed'
201
+ */
202
+ errorMessage?: string | null | undefined;
203
+ createdAt: string;
204
+ };
205
+
206
+ /**
207
+ * Message created
208
+ */
209
+ export type CreateResponse = {
210
+ success: true;
211
+ scheduledMessage: ScheduledMessage;
212
+ /**
213
+ * Credits consumed (always 0 for workspace operations).
214
+ */
215
+ creditsUsed: number;
216
+ /**
217
+ * Seconds to wait (always 0 for workspace operations).
218
+ */
219
+ retryAfter: number;
220
+ };
221
+
222
+ export type BatchScheduleRequest = {
223
+ /**
224
+ * Schedule all drafts for these contacts
225
+ */
226
+ contactIds?: Array<string> | undefined;
227
+ /**
228
+ * Schedule specific messages
229
+ */
230
+ messageIds?: Array<string> | undefined;
231
+ /**
232
+ * ISO datetime for sending
233
+ */
234
+ scheduledSendAt: string;
235
+ /**
236
+ * Map of messageId → new content for last-minute edits before scheduling
237
+ */
238
+ editedMessages?: { [k: string]: string } | undefined;
239
+ };
240
+
241
+ /**
242
+ * Messages scheduled
243
+ */
244
+ export type BatchScheduleResponse = {
245
+ success: true;
246
+ /**
247
+ * Number of messages scheduled
248
+ */
249
+ scheduled: number;
250
+ /**
251
+ * Number of cron trigger failures (messages reverted to draft)
252
+ */
253
+ triggerFailures: number;
254
+ /**
255
+ * ISO datetime for first send
256
+ */
257
+ scheduledSendAt: string;
258
+ /**
259
+ * Minutes between staggered sends (0 if single message)
260
+ */
261
+ staggerMinutes: number;
262
+ /**
263
+ * ISO datetime when last staggered message will be sent
264
+ */
265
+ lastSendAt: string;
266
+ /**
267
+ * Credits consumed (always 0 for workspace operations).
268
+ */
269
+ creditsUsed: number;
270
+ /**
271
+ * Seconds to wait (always 0 for workspace operations).
272
+ */
273
+ retryAfter: number;
274
+ };
275
+
276
+ export type CancelRequest = {
277
+ /**
278
+ * Cancel specific messages
279
+ */
280
+ messageIds?: Array<string> | undefined;
281
+ /**
282
+ * Cancel all pending for these contacts
283
+ */
284
+ contactIds?: Array<string> | undefined;
285
+ };
286
+
287
+ /**
288
+ * Messages cancelled
289
+ */
290
+ export type CancelResponse = {
291
+ success: true;
292
+ cancelled: number;
293
+ /**
294
+ * Credits consumed (always 0 for workspace operations).
295
+ */
296
+ creditsUsed: number;
297
+ /**
298
+ * Seconds to wait (always 0 for workspace operations).
299
+ */
300
+ retryAfter: number;
301
+ };
302
+
303
+ export type ReviewDraftsRequest = {
304
+ /**
305
+ * Campaign ID
306
+ */
307
+ campaignId: string;
308
+ /**
309
+ * Message IDs to approve and send
310
+ */
311
+ approved?: Array<string> | undefined;
312
+ /**
313
+ * Message IDs to reject/cancel
314
+ */
315
+ rejected?: Array<string> | undefined;
316
+ /**
317
+ * Map of messageId to new text (applied before approval)
318
+ */
319
+ editedMessages?: { [k: string]: string } | undefined;
320
+ };
321
+
322
+ /**
323
+ * Review applied
324
+ */
325
+ export type ReviewDraftsResponse = {
326
+ success: true;
327
+ approved: number;
328
+ rejected: number;
329
+ };
330
+
331
+ export type ListEntriesRequest = {
332
+ /**
333
+ * Filter by scope (e.g. "campaign:abc", "user")
334
+ */
335
+ scope?: string | undefined;
336
+ /**
337
+ * Filter by type (e.g. "icp", "tone-voice")
338
+ */
339
+ type?: string | undefined;
340
+ };
341
+
342
+ export type ListEntriesEntry = {
343
+ /**
344
+ * Unique entry ID
345
+ */
346
+ id: string;
347
+ type: string;
348
+ label: string | null;
349
+ content: string;
350
+ scope: string;
351
+ updatedAt: string;
352
+ };
353
+
354
+ /**
355
+ * Context entries
356
+ */
357
+ export type ListEntriesResponse = {
358
+ success: true;
359
+ entries: Array<ListEntriesEntry>;
360
+ /**
361
+ * Credits consumed (always 0 for workspace operations).
362
+ */
363
+ creditsUsed: number;
364
+ /**
365
+ * Seconds to wait (always 0 for workspace operations).
366
+ */
367
+ retryAfter: number;
368
+ };
369
+
370
+ export type SetRequest = {
371
+ /**
372
+ * Context type: "user-profile", "product-pitch", "icp", "tone-voice", "playbook", or "custom:{slug}"
373
+ */
374
+ type: string;
375
+ /**
376
+ * Markdown content
377
+ */
378
+ content: string;
379
+ /**
380
+ * Defaults to "user"
381
+ */
382
+ scope?: string | undefined;
383
+ /**
384
+ * Display label
385
+ */
386
+ label?: string | undefined;
387
+ };
388
+
389
+ export type SetEntry = {
390
+ /**
391
+ * Unique entry ID
392
+ */
393
+ id: string;
394
+ type: string;
395
+ label: string | null;
396
+ content: string;
397
+ scope: string;
398
+ updatedAt: string;
399
+ };
400
+
401
+ /**
402
+ * Context saved
403
+ */
404
+ export type SetResponse = {
405
+ success: true;
406
+ entry: SetEntry;
407
+ /**
408
+ * Credits consumed (always 0 for workspace operations).
409
+ */
410
+ creditsUsed: number;
411
+ /**
412
+ * Seconds to wait (always 0 for workspace operations).
413
+ */
414
+ retryAfter: number;
415
+ };
416
+
417
+ export type DeleteRequest = {
418
+ /**
419
+ * Context type to delete
420
+ */
421
+ type: string;
422
+ /**
423
+ * Scope (defaults to "user")
424
+ */
425
+ scope?: string | undefined;
426
+ };
427
+
428
+ /**
429
+ * Context deleted
430
+ */
431
+ export type DeleteResponse = {
432
+ success: true;
433
+ /**
434
+ * Credits consumed (always 0 for workspace operations).
435
+ */
436
+ creditsUsed: number;
437
+ /**
438
+ * Seconds to wait (always 0 for workspace operations).
439
+ */
440
+ retryAfter: number;
441
+ };
442
+
443
+ export type Schedule = {
444
+ scheduleId: string;
445
+ /**
446
+ * Human-readable schedule name (e.g. 'DM Polling', 'Draft Send')
447
+ */
448
+ name: string;
449
+ cron: string | null;
450
+ isPaused: boolean;
451
+ /**
452
+ * ISO 8601 timestamp of last execution
453
+ */
454
+ lastRun: string | null;
455
+ /**
456
+ * ISO 8601 timestamp of next scheduled execution
457
+ */
458
+ nextRun: string | null;
459
+ /**
460
+ * Status of the last execution
461
+ */
462
+ lastStatus: any | null;
463
+ /**
464
+ * The endpoint URL this schedule invokes
465
+ */
466
+ destination: string;
467
+ };
468
+
469
+ /**
470
+ * Cron schedules
471
+ */
472
+ export type ListSchedulesResponse = {
473
+ success: true;
474
+ schedules: Array<Schedule>;
475
+ /**
476
+ * Credits consumed (always 0 for workspace operations).
477
+ */
478
+ creditsUsed: number;
479
+ /**
480
+ * Seconds to wait (always 0 for workspace operations).
481
+ */
482
+ retryAfter: number;
483
+ };
484
+
485
+ /**
486
+ * Action to perform
487
+ */
488
+ export const UpdateScheduleAction = {
489
+ Pause: "pause",
490
+ Resume: "resume",
491
+ Delete: "delete",
492
+ } as const;
493
+ /**
494
+ * Action to perform
495
+ */
496
+ export type UpdateScheduleAction = ClosedEnum<typeof UpdateScheduleAction>;
497
+
498
+ export type UpdateScheduleRequestBody = {
499
+ /**
500
+ * Action to perform
501
+ */
502
+ action: UpdateScheduleAction;
503
+ };
504
+
505
+ export type UpdateScheduleRequest = {
506
+ /**
507
+ * Schedule ID
508
+ */
509
+ scheduleId: string;
510
+ body: UpdateScheduleRequestBody;
511
+ };
512
+
513
+ /**
514
+ * Schedule updated
515
+ */
516
+ export type UpdateScheduleResponse = {
517
+ success: true;
518
+ /**
519
+ * Credits consumed (always 0 for workspace operations).
520
+ */
521
+ creditsUsed: number;
522
+ /**
523
+ * Seconds to wait (always 0 for workspace operations).
524
+ */
525
+ retryAfter: number;
526
+ };
527
+
528
+ /**
529
+ * Filter by task status
530
+ */
531
+ export const ListTasksQueryParamStatus = {
532
+ Queued: "queued",
533
+ Dispatched: "dispatched",
534
+ Accepted: "accepted",
535
+ Running: "running",
536
+ Succeeded: "succeeded",
537
+ Failed: "failed",
538
+ Cancelled: "cancelled",
539
+ } as const;
540
+ /**
541
+ * Filter by task status
542
+ */
543
+ export type ListTasksQueryParamStatus = ClosedEnum<
544
+ typeof ListTasksQueryParamStatus
545
+ >;
546
+
547
+ export type ListTasksRequest = {
548
+ /**
549
+ * Filter by task status
550
+ */
551
+ status?: ListTasksQueryParamStatus | undefined;
552
+ /**
553
+ * Filter by task type (e.g. outreach-batch)
554
+ */
555
+ type?: string | undefined;
556
+ /**
557
+ * Filter by campaign ID
558
+ */
559
+ campaignId?: string | undefined;
560
+ limit?: number | undefined;
561
+ offset?: number | undefined;
562
+ };
563
+
564
+ export const TaskStatus = {
565
+ Queued: "queued",
566
+ Dispatched: "dispatched",
567
+ Accepted: "accepted",
568
+ Running: "running",
569
+ Succeeded: "succeeded",
570
+ Failed: "failed",
571
+ Cancelled: "cancelled",
572
+ } as const;
573
+ export type TaskStatus = OpenEnum<typeof TaskStatus>;
574
+
575
+ export type ListTasksTask = {
576
+ id: string;
577
+ /**
578
+ * Task type (e.g. lead-gen-qualify, outreach-batch, lm-comments)
579
+ */
580
+ type: string;
581
+ campaignId: string | null;
582
+ status: TaskStatus;
583
+ priority: number;
584
+ model: string | null;
585
+ /**
586
+ * Structured task result (after completion)
587
+ */
588
+ result: any | null;
589
+ error: string | null;
590
+ connectorId: string | null;
591
+ workflowRunId: string | null;
592
+ createdAt: string;
593
+ dispatchedAt: string | null;
594
+ completedAt: string | null;
595
+ };
596
+
597
+ /**
598
+ * Task list
599
+ */
600
+ export type ListTasksResponse = {
601
+ tasks: Array<ListTasksTask>;
602
+ total: number;
603
+ limit: number;
604
+ offset: number;
605
+ };
606
+
607
+ export type CancelTaskRequest = {
608
+ /**
609
+ * Task ID
610
+ */
611
+ id: string;
612
+ };
613
+
614
+ /**
615
+ * Task cancelled or already terminal
616
+ */
617
+ export type CancelTaskResponse = {
618
+ success: true;
619
+ status: string;
620
+ message?: string | undefined;
621
+ };
622
+
623
+ export type EventsFeedRequest = {
624
+ /**
625
+ * ISO timestamp or epoch ms (default: 2 hours ago)
626
+ */
627
+ since?: string | undefined;
628
+ limit?: number | undefined;
629
+ };
630
+
631
+ export const EventsFeedType = {
632
+ TaskCompleted: "task:completed",
633
+ TaskFailed: "task:failed",
634
+ ReplyReceived: "reply:received",
635
+ ConnectionAccepted: "connection:accepted",
636
+ CampaignTargetReached: "campaign:target_reached",
637
+ CampaignCompleted: "campaign:completed",
638
+ CampaignPaused: "campaign:paused",
639
+ } as const;
640
+ export type EventsFeedType = OpenEnum<typeof EventsFeedType>;
641
+
642
+ export type Event = {
643
+ id: string;
644
+ type: EventsFeedType;
645
+ campaignId?: string | undefined;
646
+ campaignName?: string | undefined;
647
+ /**
648
+ * Human-readable one-line summary
649
+ */
650
+ summary: string;
651
+ metadata: { [k: string]: any };
652
+ /**
653
+ * Unix epoch ms
654
+ */
655
+ timestamp: number;
656
+ };
657
+
658
+ /**
659
+ * Events
660
+ */
661
+ export type EventsFeedResponse = {
662
+ events: Array<Event>;
663
+ /**
664
+ * Timestamp of most recent event (pass as 'since' for next poll)
665
+ */
666
+ cursor?: number | undefined;
667
+ };
668
+
669
+ export type CancelChainRequest = {
670
+ /**
671
+ * Workflow run ID
672
+ */
673
+ workflowRunId: string;
674
+ };
675
+
676
+ /**
677
+ * Chain cancelled
678
+ */
679
+ export type CancelChainResponse = {
680
+ success: true;
681
+ /**
682
+ * Number of in-flight tasks cancelled
683
+ */
684
+ tasksCancelled: number;
685
+ };
686
+
687
+ export type PullTaskTask = {
688
+ id: string;
689
+ type: string;
690
+ campaignId: string | null;
691
+ /**
692
+ * Task prompt for the agent
693
+ */
694
+ message: string;
695
+ model: string | null;
696
+ thinking: string | null;
697
+ timeoutSeconds: number | null;
698
+ sessionKey: string | null;
699
+ payload: any | null;
700
+ };
701
+
702
+ /**
703
+ * Task pulled (or null)
704
+ */
705
+ export type PullTaskResponse = {
706
+ task: PullTaskTask | null;
707
+ /**
708
+ * ID of a recently cancelled task the connector should abort
709
+ */
710
+ cancelTaskId: string | null;
711
+ /**
712
+ * Suggested poll interval in ms (5000 when busy, 30000 when idle)
713
+ */
714
+ pollIntervalMs: number;
715
+ };
716
+
717
+ /**
718
+ * Intermediate status update (no result yet)
719
+ */
720
+ export const SubmitTaskResultStatus = {
721
+ Accepted: "accepted",
722
+ Running: "running",
723
+ } as const;
724
+ /**
725
+ * Intermediate status update (no result yet)
726
+ */
727
+ export type SubmitTaskResultStatus = ClosedEnum<typeof SubmitTaskResultStatus>;
728
+
729
+ export type SubmitTaskResultRequestBody = {
730
+ /**
731
+ * Intermediate status update (no result yet)
732
+ */
733
+ status?: SubmitTaskResultStatus | undefined;
734
+ /**
735
+ * Structured TaskResult on completion
736
+ */
737
+ result?: any | undefined;
738
+ /**
739
+ * Error message on failure
740
+ */
741
+ error?: string | undefined;
742
+ };
743
+
744
+ export type SubmitTaskResultRequest = {
745
+ /**
746
+ * Task ID
747
+ */
748
+ id: string;
749
+ body: SubmitTaskResultRequestBody;
750
+ };
751
+
752
+ /**
753
+ * Result accepted
754
+ */
755
+ export type SubmitTaskResultResponse = {
756
+ success: true;
757
+ status: string;
758
+ message?: string | undefined;
759
+ };
760
+
761
+ export type Connector = {
762
+ id: string;
763
+ name: string;
764
+ /**
765
+ * online, idle, busy, or offline
766
+ */
767
+ status: string;
768
+ credentialsId: string;
769
+ lastSeenAt: string | null;
770
+ lastTaskAt: string | null;
771
+ createdAt: string;
772
+ /**
773
+ * True if lastSeenAt < 5 minutes ago
774
+ */
775
+ isOnline: boolean;
776
+ };
777
+
778
+ /**
779
+ * Connector list
780
+ */
781
+ export type ListConnectorsResponse = {
782
+ connectors: Array<Connector>;
783
+ };
784
+
785
+ export type ConnectorHeartbeatRequest = {
786
+ /**
787
+ * ID of currently executing task (sets status to 'busy')
788
+ */
789
+ currentTaskId?: string | undefined;
790
+ };
791
+
792
+ /**
793
+ * Heartbeat acknowledged
794
+ */
795
+ export type ConnectorHeartbeatResponse = {
796
+ success: true;
797
+ /**
798
+ * Number of queued tasks for this credential
799
+ */
800
+ pendingCount: number;
801
+ /**
802
+ * Suggested poll interval (5000 when tasks pending, 30000 when idle)
803
+ */
804
+ pollIntervalMs: number;
805
+ };
806
+
807
+ export type Context = {
808
+ type: string;
809
+ label: string | null;
810
+ content: string;
811
+ scope: string;
812
+ };
813
+
814
+ export type ActiveAccount = {
815
+ id: string;
816
+ name: string | null;
817
+ plan: string;
818
+ headline: string | null;
819
+ isUnlimited: boolean;
820
+ creditsLimit: number;
821
+ creditsCount: number;
822
+ simulateWrites: boolean;
823
+ isCurrent: boolean;
824
+ };
825
+
826
+ export type AgentSnapshotAccount = {
827
+ id: string;
828
+ name: string | null;
829
+ plan: string;
830
+ headline: string | null;
831
+ isUnlimited: boolean;
832
+ creditsLimit: number;
833
+ creditsCount: number;
834
+ simulateWrites: boolean;
835
+ isCurrent: boolean;
836
+ };
837
+
838
+ export type AgentSnapshotStageCounts = {
839
+ contact: number;
840
+ lead: number;
841
+ qualified: number;
842
+ approved: number;
843
+ rejected: number;
844
+ total: number;
845
+ };
846
+
847
+ export type ActiveCampaign = {
848
+ id: string;
849
+ name: string;
850
+ type: string;
851
+ status: string;
852
+ context: any | null;
853
+ stageCounts: AgentSnapshotStageCounts;
854
+ };
855
+
856
+ export const AgentSnapshotType = {
857
+ TaskCompleted: "task:completed",
858
+ TaskFailed: "task:failed",
859
+ ReplyReceived: "reply:received",
860
+ ConnectionAccepted: "connection:accepted",
861
+ CampaignTargetReached: "campaign:target_reached",
862
+ CampaignCompleted: "campaign:completed",
863
+ CampaignPaused: "campaign:paused",
864
+ } as const;
865
+ export type AgentSnapshotType = OpenEnum<typeof AgentSnapshotType>;
866
+
867
+ export type RecentEvent = {
868
+ id: string;
869
+ type: AgentSnapshotType;
870
+ campaignId?: string | undefined;
871
+ campaignName?: string | undefined;
872
+ /**
873
+ * Human-readable one-line summary
874
+ */
875
+ summary: string;
876
+ metadata: { [k: string]: any };
877
+ /**
878
+ * Unix epoch ms
879
+ */
880
+ timestamp: number;
881
+ };
882
+
883
+ /**
884
+ * Session snapshot
885
+ */
886
+ export type AgentSnapshotResponse = {
887
+ /**
888
+ * Credit balance and usage
889
+ */
890
+ credits: any | null;
891
+ /**
892
+ * Contact counts by lifecycle stage
893
+ */
894
+ pipeline: { [k: string]: number };
895
+ contexts: Array<Context>;
896
+ pendingDrafts: number;
897
+ failedDrafts: number;
898
+ unreadDMs: number;
899
+ pendingSentInvitations: number;
900
+ activeAccount: ActiveAccount | null;
901
+ accounts: Array<AgentSnapshotAccount>;
902
+ leadGenState: any | null;
903
+ outreachState: any | null;
904
+ activeCampaigns: Array<ActiveCampaign>;
905
+ campaignChecks: any;
906
+ sessionMeta: any | null;
907
+ onboardingState: any | null;
908
+ recentEvents: Array<RecentEvent>;
909
+ };
910
+
911
+ export type GetDmPollingSettingsSettings = {
912
+ dmPollingEnabled: boolean;
913
+ dmWebhookUrl: string | null;
914
+ dmLastPolledAt: string | null;
915
+ connectionPollingEnabled: boolean;
916
+ connectionLastPolledAt: string | null;
917
+ };
918
+
919
+ /**
920
+ * Polling settings
921
+ */
922
+ export type GetDmPollingSettingsResponse = {
923
+ success: true;
924
+ settings: GetDmPollingSettingsSettings;
925
+ /**
926
+ * Credits consumed (always 0 for workspace operations).
927
+ */
928
+ creditsUsed: number;
929
+ /**
930
+ * Seconds to wait (always 0 for workspace operations).
931
+ */
932
+ retryAfter: number;
933
+ };
934
+
935
+ export type PatchDmPollingSettingsRequest = {
936
+ dmPollingEnabled?: boolean | undefined;
937
+ /**
938
+ * Webhook URL for DM events
939
+ */
940
+ dmWebhookUrl?: string | null | undefined;
941
+ /**
942
+ * Enable polling to detect accepted connections
943
+ */
944
+ connectionPollingEnabled?: boolean | undefined;
945
+ };
946
+
947
+ export type PatchDmPollingSettingsSettings = {
948
+ dmPollingEnabled: boolean;
949
+ dmWebhookUrl: string | null;
950
+ dmLastPolledAt: string | null;
951
+ connectionPollingEnabled: boolean;
952
+ connectionLastPolledAt: string | null;
953
+ };
954
+
955
+ /**
956
+ * Settings updated
957
+ */
958
+ export type PatchDmPollingSettingsResponse = {
959
+ success: true;
960
+ settings: PatchDmPollingSettingsSettings;
961
+ /**
962
+ * Credits consumed (always 0 for workspace operations).
963
+ */
964
+ creditsUsed: number;
965
+ /**
966
+ * Seconds to wait (always 0 for workspace operations).
967
+ */
968
+ retryAfter: number;
969
+ };
970
+
971
+ export type DeleteWorkspaceAccountRequest = {
972
+ /**
973
+ * LinkedIn credentials ID
974
+ */
975
+ id: string;
976
+ };
977
+
978
+ /**
979
+ * Account removed
980
+ */
981
+ export type DeleteWorkspaceAccountResponse = {
982
+ success: true;
983
+ message: string;
984
+ };
985
+
986
+ export const UpgradeWorkspaceAccountAction = {
987
+ Upgrade: "upgrade",
988
+ Downgrade: "downgrade",
989
+ } as const;
990
+ export type UpgradeWorkspaceAccountAction = ClosedEnum<
991
+ typeof UpgradeWorkspaceAccountAction
992
+ >;
993
+
994
+ export type UpgradeWorkspaceAccountRequest = {
995
+ /**
996
+ * LinkedIn credentials ID
997
+ */
998
+ credentialsId: string;
999
+ action: UpgradeWorkspaceAccountAction;
1000
+ };
1001
+
1002
+ /**
1003
+ * Plan changed
1004
+ */
1005
+ export type UpgradeWorkspaceAccountResponse = {
1006
+ success: true;
1007
+ message: string;
1008
+ seatsUsed: number;
1009
+ seatsIncluded: number;
1010
+ };
1011
+
1012
+ /**
1013
+ * "create" to make a new invite, "list" to get existing
1014
+ */
1015
+ export const CreateWorkspaceInviteAction = {
1016
+ Create: "create",
1017
+ List: "list",
1018
+ } as const;
1019
+ /**
1020
+ * "create" to make a new invite, "list" to get existing
1021
+ */
1022
+ export type CreateWorkspaceInviteAction = ClosedEnum<
1023
+ typeof CreateWorkspaceInviteAction
1024
+ >;
1025
+
1026
+ export type CreateWorkspaceInviteRequest = {
1027
+ /**
1028
+ * "create" to make a new invite, "list" to get existing
1029
+ */
1030
+ action: CreateWorkspaceInviteAction;
1031
+ /**
1032
+ * Invitee email (sends invite email)
1033
+ */
1034
+ email?: string | undefined;
1035
+ /**
1036
+ * Invitee name
1037
+ */
1038
+ name?: string | undefined;
1039
+ /**
1040
+ * Max times code can be used
1041
+ */
1042
+ maxUses?: number | undefined;
1043
+ };
1044
+
1045
+ export type Invite2 = {
1046
+ id: string;
1047
+ email: string | null;
1048
+ name: string | null;
1049
+ code: string;
1050
+ status?: string | undefined;
1051
+ maxUses: number;
1052
+ useCount: number;
1053
+ expiresAt: string | null;
1054
+ createdAt: string;
1055
+ };
1056
+
1057
+ export type Workspace = {
1058
+ tier: string;
1059
+ proSeatsIncluded: number;
1060
+ proSeatsUsed: number;
1061
+ };
1062
+
1063
+ export type ResponseBody2 = {
1064
+ success: true;
1065
+ invites: Array<Invite2>;
1066
+ workspace: Workspace;
1067
+ };
1068
+
1069
+ export type Invite1 = {
1070
+ id: string;
1071
+ email: string | null;
1072
+ name: string | null;
1073
+ code: string;
1074
+ status?: string | undefined;
1075
+ maxUses: number;
1076
+ useCount: number;
1077
+ expiresAt: string | null;
1078
+ createdAt: string;
1079
+ };
1080
+
1081
+ export type ResponseBody1 = {
1082
+ success: true;
1083
+ invite: Invite1;
1084
+ };
1085
+
1086
+ /**
1087
+ * Invite created or listed
1088
+ */
1089
+ export type CreateWorkspaceInviteResponse = ResponseBody2 | ResponseBody1;
1090
+
1091
+ export type DeleteWorkspaceInviteRequest = {
1092
+ /**
1093
+ * Invite ID to delete
1094
+ */
1095
+ inviteId: string;
1096
+ };
1097
+
1098
+ /**
1099
+ * Invite deleted
1100
+ */
1101
+ export type DeleteWorkspaceInviteResponse = {
1102
+ success: true;
1103
+ };
1104
+
1105
+ /** @internal */
1106
+ export const GetByUrlContact$inboundSchema: z.ZodMiniType<
1107
+ GetByUrlContact,
1108
+ unknown
1109
+ > = z.object({
1110
+ id: types.string(),
1111
+ linkedinUrl: types.string(),
1112
+ profileUrn: types.nullable(types.string()),
1113
+ publicIdentifier: types.nullable(types.string()),
1114
+ name: types.string(),
1115
+ lifecycleStage: types.string(),
1116
+ hotScore: types.number(),
1117
+ qualificationNotes: types.nullable(types.string()),
1118
+ notes: types.nullable(types.string()),
1119
+ stageChangedAt: types.nullable(types.string()),
1120
+ profileData: types.nullable(z.any()),
1121
+ profileUpdatedAt: types.nullable(types.string()),
1122
+ conversationData: types.nullable(z.any()),
1123
+ conversationUpdatedAt: types.nullable(types.string()),
1124
+ outreachStatus: types.string(),
1125
+ lastContactedAt: types.nullable(types.string()),
1126
+ lastRepliedAt: types.nullable(types.string()),
1127
+ nextFollowUpAt: types.nullable(types.string()),
1128
+ doNotContact: types.boolean(),
1129
+ tags: z.array(types.string()),
1130
+ createdAt: types.string(),
1131
+ updatedAt: types.string(),
1132
+ activities: z.array(GetByUrlActivity$inboundSchema),
1133
+ campaigns: z.array(GetByUrlCampaign$inboundSchema),
1134
+ });
1135
+
1136
+ export function getByUrlContactFromJSON(
1137
+ jsonString: string,
1138
+ ): SafeParseResult<GetByUrlContact, SDKValidationError> {
1139
+ return safeParse(
1140
+ jsonString,
1141
+ (x) => GetByUrlContact$inboundSchema.parse(JSON.parse(x)),
1142
+ `Failed to parse 'GetByUrlContact' from JSON`,
1143
+ );
1144
+ }
1145
+
1146
+ /** @internal */
1147
+ export const GetByUrlResponse$inboundSchema: z.ZodMiniType<
1148
+ GetByUrlResponse,
1149
+ unknown
1150
+ > = z.object({
1151
+ success: types.literal(true),
1152
+ contact: z.lazy(() => GetByUrlContact$inboundSchema),
1153
+ creditsUsed: types.number(),
1154
+ retryAfter: types.number(),
1155
+ });
1156
+
1157
+ export function getByUrlResponseFromJSON(
1158
+ jsonString: string,
1159
+ ): SafeParseResult<GetByUrlResponse, SDKValidationError> {
1160
+ return safeParse(
1161
+ jsonString,
1162
+ (x) => GetByUrlResponse$inboundSchema.parse(JSON.parse(x)),
1163
+ `Failed to parse 'GetByUrlResponse' from JSON`,
1164
+ );
1165
+ }
1166
+
1167
+ /** @internal */
1168
+ export const ListMessagesQueryParamStatus$outboundSchema: z.ZodMiniEnum<
1169
+ typeof ListMessagesQueryParamStatus
1170
+ > = z.enum(ListMessagesQueryParamStatus);
1171
+
1172
+ /** @internal */
1173
+ export type ListMessagesRequest$Outbound = {
1174
+ status?: string | undefined;
1175
+ contactId?: string | undefined;
1176
+ campaignSlug?: string | undefined;
1177
+ limit: number;
1178
+ offset: number;
1179
+ };
1180
+
1181
+ /** @internal */
1182
+ export const ListMessagesRequest$outboundSchema: z.ZodMiniType<
1183
+ ListMessagesRequest$Outbound,
1184
+ ListMessagesRequest
1185
+ > = z.object({
1186
+ status: z.optional(ListMessagesQueryParamStatus$outboundSchema),
1187
+ contactId: z.optional(z.string()),
1188
+ campaignSlug: z.optional(z.string()),
1189
+ limit: z._default(z.int(), 50),
1190
+ offset: z._default(z.int(), 0),
1191
+ });
1192
+
1193
+ export function listMessagesRequestToJSON(
1194
+ listMessagesRequest: ListMessagesRequest,
1195
+ ): string {
1196
+ return JSON.stringify(
1197
+ ListMessagesRequest$outboundSchema.parse(listMessagesRequest),
1198
+ );
1199
+ }
1200
+
1201
+ /** @internal */
1202
+ export const MessageStatus$inboundSchema: z.ZodMiniType<
1203
+ MessageStatus,
1204
+ unknown
1205
+ > = openEnums.inboundSchema(MessageStatus);
1206
+
1207
+ /** @internal */
1208
+ export const ListMessagesMessage$inboundSchema: z.ZodMiniType<
1209
+ ListMessagesMessage,
1210
+ unknown
1211
+ > = z.object({
1212
+ id: types.string(),
1213
+ contactId: types.string(),
1214
+ contactName: z.optional(z.nullable(types.string())),
1215
+ contactLinkedinUrl: z.optional(z.nullable(types.string())),
1216
+ message: types.string(),
1217
+ status: MessageStatus$inboundSchema,
1218
+ scheduledSendAt: types.nullable(types.string()),
1219
+ sentAt: types.nullable(types.string()),
1220
+ campaignSlug: types.nullable(types.string()),
1221
+ errorMessage: z.optional(z.nullable(types.string())),
1222
+ createdAt: types.string(),
1223
+ });
1224
+
1225
+ export function listMessagesMessageFromJSON(
1226
+ jsonString: string,
1227
+ ): SafeParseResult<ListMessagesMessage, SDKValidationError> {
1228
+ return safeParse(
1229
+ jsonString,
1230
+ (x) => ListMessagesMessage$inboundSchema.parse(JSON.parse(x)),
1231
+ `Failed to parse 'ListMessagesMessage' from JSON`,
1232
+ );
1233
+ }
1234
+
1235
+ /** @internal */
1236
+ export const ListMessagesResponse$inboundSchema: z.ZodMiniType<
1237
+ ListMessagesResponse,
1238
+ unknown
1239
+ > = z.object({
1240
+ success: types.literal(true),
1241
+ messages: z.array(z.lazy(() => ListMessagesMessage$inboundSchema)),
1242
+ total: types.number(),
1243
+ limit: types.number(),
1244
+ offset: types.number(),
1245
+ creditsUsed: types.number(),
1246
+ retryAfter: types.number(),
1247
+ });
1248
+
1249
+ export function listMessagesResponseFromJSON(
1250
+ jsonString: string,
1251
+ ): SafeParseResult<ListMessagesResponse, SDKValidationError> {
1252
+ return safeParse(
1253
+ jsonString,
1254
+ (x) => ListMessagesResponse$inboundSchema.parse(JSON.parse(x)),
1255
+ `Failed to parse 'ListMessagesResponse' from JSON`,
1256
+ );
1257
+ }
1258
+
1259
+ /** @internal */
1260
+ export const CreateStatusRequest$outboundSchema: z.ZodMiniEnum<
1261
+ typeof CreateStatusRequest
1262
+ > = z.enum(CreateStatusRequest);
1263
+
1264
+ /** @internal */
1265
+ export type CreateRequest$Outbound = {
1266
+ contactId: string;
1267
+ message: string;
1268
+ status?: string | undefined;
1269
+ scheduledSendAt?: string | undefined;
1270
+ campaignSlug?: string | undefined;
1271
+ };
1272
+
1273
+ /** @internal */
1274
+ export const CreateRequest$outboundSchema: z.ZodMiniType<
1275
+ CreateRequest$Outbound,
1276
+ CreateRequest
1277
+ > = z.object({
1278
+ contactId: z.string(),
1279
+ message: z.string(),
1280
+ status: z.optional(CreateStatusRequest$outboundSchema),
1281
+ scheduledSendAt: z.optional(z.string()),
1282
+ campaignSlug: z.optional(z.string()),
1283
+ });
1284
+
1285
+ export function createRequestToJSON(createRequest: CreateRequest): string {
1286
+ return JSON.stringify(CreateRequest$outboundSchema.parse(createRequest));
1287
+ }
1288
+
1289
+ /** @internal */
1290
+ export const ScheduledMessageStatus$inboundSchema: z.ZodMiniType<
1291
+ ScheduledMessageStatus,
1292
+ unknown
1293
+ > = openEnums.inboundSchema(ScheduledMessageStatus);
1294
+
1295
+ /** @internal */
1296
+ export const ScheduledMessage$inboundSchema: z.ZodMiniType<
1297
+ ScheduledMessage,
1298
+ unknown
1299
+ > = z.object({
1300
+ id: types.string(),
1301
+ contactId: types.string(),
1302
+ contactName: z.optional(z.nullable(types.string())),
1303
+ contactLinkedinUrl: z.optional(z.nullable(types.string())),
1304
+ message: types.string(),
1305
+ status: ScheduledMessageStatus$inboundSchema,
1306
+ scheduledSendAt: types.nullable(types.string()),
1307
+ sentAt: types.nullable(types.string()),
1308
+ campaignSlug: types.nullable(types.string()),
1309
+ errorMessage: z.optional(z.nullable(types.string())),
1310
+ createdAt: types.string(),
1311
+ });
1312
+
1313
+ export function scheduledMessageFromJSON(
1314
+ jsonString: string,
1315
+ ): SafeParseResult<ScheduledMessage, SDKValidationError> {
1316
+ return safeParse(
1317
+ jsonString,
1318
+ (x) => ScheduledMessage$inboundSchema.parse(JSON.parse(x)),
1319
+ `Failed to parse 'ScheduledMessage' from JSON`,
1320
+ );
1321
+ }
1322
+
1323
+ /** @internal */
1324
+ export const CreateResponse$inboundSchema: z.ZodMiniType<
1325
+ CreateResponse,
1326
+ unknown
1327
+ > = z.object({
1328
+ success: types.literal(true),
1329
+ scheduledMessage: z.lazy(() => ScheduledMessage$inboundSchema),
1330
+ creditsUsed: types.number(),
1331
+ retryAfter: types.number(),
1332
+ });
1333
+
1334
+ export function createResponseFromJSON(
1335
+ jsonString: string,
1336
+ ): SafeParseResult<CreateResponse, SDKValidationError> {
1337
+ return safeParse(
1338
+ jsonString,
1339
+ (x) => CreateResponse$inboundSchema.parse(JSON.parse(x)),
1340
+ `Failed to parse 'CreateResponse' from JSON`,
1341
+ );
1342
+ }
1343
+
1344
+ /** @internal */
1345
+ export type BatchScheduleRequest$Outbound = {
1346
+ contactIds?: Array<string> | undefined;
1347
+ messageIds?: Array<string> | undefined;
1348
+ scheduledSendAt: string;
1349
+ editedMessages?: { [k: string]: string } | undefined;
1350
+ };
1351
+
1352
+ /** @internal */
1353
+ export const BatchScheduleRequest$outboundSchema: z.ZodMiniType<
1354
+ BatchScheduleRequest$Outbound,
1355
+ BatchScheduleRequest
1356
+ > = z.object({
1357
+ contactIds: z.optional(z.array(z.string())),
1358
+ messageIds: z.optional(z.array(z.string())),
1359
+ scheduledSendAt: z.string(),
1360
+ editedMessages: z.optional(z.record(z.string(), z.string())),
1361
+ });
1362
+
1363
+ export function batchScheduleRequestToJSON(
1364
+ batchScheduleRequest: BatchScheduleRequest,
1365
+ ): string {
1366
+ return JSON.stringify(
1367
+ BatchScheduleRequest$outboundSchema.parse(batchScheduleRequest),
1368
+ );
1369
+ }
1370
+
1371
+ /** @internal */
1372
+ export const BatchScheduleResponse$inboundSchema: z.ZodMiniType<
1373
+ BatchScheduleResponse,
1374
+ unknown
1375
+ > = z.object({
1376
+ success: types.literal(true),
1377
+ scheduled: types.number(),
1378
+ triggerFailures: types.number(),
1379
+ scheduledSendAt: types.string(),
1380
+ staggerMinutes: types.number(),
1381
+ lastSendAt: types.string(),
1382
+ creditsUsed: types.number(),
1383
+ retryAfter: types.number(),
1384
+ });
1385
+
1386
+ export function batchScheduleResponseFromJSON(
1387
+ jsonString: string,
1388
+ ): SafeParseResult<BatchScheduleResponse, SDKValidationError> {
1389
+ return safeParse(
1390
+ jsonString,
1391
+ (x) => BatchScheduleResponse$inboundSchema.parse(JSON.parse(x)),
1392
+ `Failed to parse 'BatchScheduleResponse' from JSON`,
1393
+ );
1394
+ }
1395
+
1396
+ /** @internal */
1397
+ export type CancelRequest$Outbound = {
1398
+ messageIds?: Array<string> | undefined;
1399
+ contactIds?: Array<string> | undefined;
1400
+ };
1401
+
1402
+ /** @internal */
1403
+ export const CancelRequest$outboundSchema: z.ZodMiniType<
1404
+ CancelRequest$Outbound,
1405
+ CancelRequest
1406
+ > = z.object({
1407
+ messageIds: z.optional(z.array(z.string())),
1408
+ contactIds: z.optional(z.array(z.string())),
1409
+ });
1410
+
1411
+ export function cancelRequestToJSON(cancelRequest: CancelRequest): string {
1412
+ return JSON.stringify(CancelRequest$outboundSchema.parse(cancelRequest));
1413
+ }
1414
+
1415
+ /** @internal */
1416
+ export const CancelResponse$inboundSchema: z.ZodMiniType<
1417
+ CancelResponse,
1418
+ unknown
1419
+ > = z.object({
1420
+ success: types.literal(true),
1421
+ cancelled: types.number(),
1422
+ creditsUsed: types.number(),
1423
+ retryAfter: types.number(),
1424
+ });
1425
+
1426
+ export function cancelResponseFromJSON(
1427
+ jsonString: string,
1428
+ ): SafeParseResult<CancelResponse, SDKValidationError> {
1429
+ return safeParse(
1430
+ jsonString,
1431
+ (x) => CancelResponse$inboundSchema.parse(JSON.parse(x)),
1432
+ `Failed to parse 'CancelResponse' from JSON`,
1433
+ );
1434
+ }
1435
+
1436
+ /** @internal */
1437
+ export type ReviewDraftsRequest$Outbound = {
1438
+ campaignId: string;
1439
+ approved?: Array<string> | undefined;
1440
+ rejected?: Array<string> | undefined;
1441
+ editedMessages?: { [k: string]: string } | undefined;
1442
+ };
1443
+
1444
+ /** @internal */
1445
+ export const ReviewDraftsRequest$outboundSchema: z.ZodMiniType<
1446
+ ReviewDraftsRequest$Outbound,
1447
+ ReviewDraftsRequest
1448
+ > = z.object({
1449
+ campaignId: z.string(),
1450
+ approved: z.optional(z.array(z.string())),
1451
+ rejected: z.optional(z.array(z.string())),
1452
+ editedMessages: z.optional(z.record(z.string(), z.string())),
1453
+ });
1454
+
1455
+ export function reviewDraftsRequestToJSON(
1456
+ reviewDraftsRequest: ReviewDraftsRequest,
1457
+ ): string {
1458
+ return JSON.stringify(
1459
+ ReviewDraftsRequest$outboundSchema.parse(reviewDraftsRequest),
1460
+ );
1461
+ }
1462
+
1463
+ /** @internal */
1464
+ export const ReviewDraftsResponse$inboundSchema: z.ZodMiniType<
1465
+ ReviewDraftsResponse,
1466
+ unknown
1467
+ > = z.object({
1468
+ success: types.literal(true),
1469
+ approved: types.number(),
1470
+ rejected: types.number(),
1471
+ });
1472
+
1473
+ export function reviewDraftsResponseFromJSON(
1474
+ jsonString: string,
1475
+ ): SafeParseResult<ReviewDraftsResponse, SDKValidationError> {
1476
+ return safeParse(
1477
+ jsonString,
1478
+ (x) => ReviewDraftsResponse$inboundSchema.parse(JSON.parse(x)),
1479
+ `Failed to parse 'ReviewDraftsResponse' from JSON`,
1480
+ );
1481
+ }
1482
+
1483
+ /** @internal */
1484
+ export type ListEntriesRequest$Outbound = {
1485
+ scope?: string | undefined;
1486
+ type?: string | undefined;
1487
+ };
1488
+
1489
+ /** @internal */
1490
+ export const ListEntriesRequest$outboundSchema: z.ZodMiniType<
1491
+ ListEntriesRequest$Outbound,
1492
+ ListEntriesRequest
1493
+ > = z.object({
1494
+ scope: z.optional(z.string()),
1495
+ type: z.optional(z.string()),
1496
+ });
1497
+
1498
+ export function listEntriesRequestToJSON(
1499
+ listEntriesRequest: ListEntriesRequest,
1500
+ ): string {
1501
+ return JSON.stringify(
1502
+ ListEntriesRequest$outboundSchema.parse(listEntriesRequest),
1503
+ );
1504
+ }
1505
+
1506
+ /** @internal */
1507
+ export const ListEntriesEntry$inboundSchema: z.ZodMiniType<
1508
+ ListEntriesEntry,
1509
+ unknown
1510
+ > = z.object({
1511
+ id: types.string(),
1512
+ type: types.string(),
1513
+ label: types.nullable(types.string()),
1514
+ content: types.string(),
1515
+ scope: types.string(),
1516
+ updatedAt: types.string(),
1517
+ });
1518
+
1519
+ export function listEntriesEntryFromJSON(
1520
+ jsonString: string,
1521
+ ): SafeParseResult<ListEntriesEntry, SDKValidationError> {
1522
+ return safeParse(
1523
+ jsonString,
1524
+ (x) => ListEntriesEntry$inboundSchema.parse(JSON.parse(x)),
1525
+ `Failed to parse 'ListEntriesEntry' from JSON`,
1526
+ );
1527
+ }
1528
+
1529
+ /** @internal */
1530
+ export const ListEntriesResponse$inboundSchema: z.ZodMiniType<
1531
+ ListEntriesResponse,
1532
+ unknown
1533
+ > = z.object({
1534
+ success: types.literal(true),
1535
+ entries: z.array(z.lazy(() => ListEntriesEntry$inboundSchema)),
1536
+ creditsUsed: types.number(),
1537
+ retryAfter: types.number(),
1538
+ });
1539
+
1540
+ export function listEntriesResponseFromJSON(
1541
+ jsonString: string,
1542
+ ): SafeParseResult<ListEntriesResponse, SDKValidationError> {
1543
+ return safeParse(
1544
+ jsonString,
1545
+ (x) => ListEntriesResponse$inboundSchema.parse(JSON.parse(x)),
1546
+ `Failed to parse 'ListEntriesResponse' from JSON`,
1547
+ );
1548
+ }
1549
+
1550
+ /** @internal */
1551
+ export type SetRequest$Outbound = {
1552
+ type: string;
1553
+ content: string;
1554
+ scope?: string | undefined;
1555
+ label?: string | undefined;
1556
+ };
1557
+
1558
+ /** @internal */
1559
+ export const SetRequest$outboundSchema: z.ZodMiniType<
1560
+ SetRequest$Outbound,
1561
+ SetRequest
1562
+ > = z.object({
1563
+ type: z.string(),
1564
+ content: z.string(),
1565
+ scope: z.optional(z.string()),
1566
+ label: z.optional(z.string()),
1567
+ });
1568
+
1569
+ export function setRequestToJSON(setRequest: SetRequest): string {
1570
+ return JSON.stringify(SetRequest$outboundSchema.parse(setRequest));
1571
+ }
1572
+
1573
+ /** @internal */
1574
+ export const SetEntry$inboundSchema: z.ZodMiniType<SetEntry, unknown> = z
1575
+ .object({
1576
+ id: types.string(),
1577
+ type: types.string(),
1578
+ label: types.nullable(types.string()),
1579
+ content: types.string(),
1580
+ scope: types.string(),
1581
+ updatedAt: types.string(),
1582
+ });
1583
+
1584
+ export function setEntryFromJSON(
1585
+ jsonString: string,
1586
+ ): SafeParseResult<SetEntry, SDKValidationError> {
1587
+ return safeParse(
1588
+ jsonString,
1589
+ (x) => SetEntry$inboundSchema.parse(JSON.parse(x)),
1590
+ `Failed to parse 'SetEntry' from JSON`,
1591
+ );
1592
+ }
1593
+
1594
+ /** @internal */
1595
+ export const SetResponse$inboundSchema: z.ZodMiniType<SetResponse, unknown> = z
1596
+ .object({
1597
+ success: types.literal(true),
1598
+ entry: z.lazy(() => SetEntry$inboundSchema),
1599
+ creditsUsed: types.number(),
1600
+ retryAfter: types.number(),
1601
+ });
1602
+
1603
+ export function setResponseFromJSON(
1604
+ jsonString: string,
1605
+ ): SafeParseResult<SetResponse, SDKValidationError> {
1606
+ return safeParse(
1607
+ jsonString,
1608
+ (x) => SetResponse$inboundSchema.parse(JSON.parse(x)),
1609
+ `Failed to parse 'SetResponse' from JSON`,
1610
+ );
1611
+ }
1612
+
1613
+ /** @internal */
1614
+ export type DeleteRequest$Outbound = {
1615
+ type: string;
1616
+ scope?: string | undefined;
1617
+ };
1618
+
1619
+ /** @internal */
1620
+ export const DeleteRequest$outboundSchema: z.ZodMiniType<
1621
+ DeleteRequest$Outbound,
1622
+ DeleteRequest
1623
+ > = z.object({
1624
+ type: z.string(),
1625
+ scope: z.optional(z.string()),
1626
+ });
1627
+
1628
+ export function deleteRequestToJSON(deleteRequest: DeleteRequest): string {
1629
+ return JSON.stringify(DeleteRequest$outboundSchema.parse(deleteRequest));
1630
+ }
1631
+
1632
+ /** @internal */
1633
+ export const DeleteResponse$inboundSchema: z.ZodMiniType<
1634
+ DeleteResponse,
1635
+ unknown
1636
+ > = z.object({
1637
+ success: types.literal(true),
1638
+ creditsUsed: types.number(),
1639
+ retryAfter: types.number(),
1640
+ });
1641
+
1642
+ export function deleteResponseFromJSON(
1643
+ jsonString: string,
1644
+ ): SafeParseResult<DeleteResponse, SDKValidationError> {
1645
+ return safeParse(
1646
+ jsonString,
1647
+ (x) => DeleteResponse$inboundSchema.parse(JSON.parse(x)),
1648
+ `Failed to parse 'DeleteResponse' from JSON`,
1649
+ );
1650
+ }
1651
+
1652
+ /** @internal */
1653
+ export const Schedule$inboundSchema: z.ZodMiniType<Schedule, unknown> = z
1654
+ .object({
1655
+ scheduleId: types.string(),
1656
+ name: types.string(),
1657
+ cron: types.nullable(types.string()),
1658
+ isPaused: types.boolean(),
1659
+ lastRun: types.nullable(types.string()),
1660
+ nextRun: types.nullable(types.string()),
1661
+ lastStatus: types.nullable(z.any()),
1662
+ destination: types.string(),
1663
+ });
1664
+
1665
+ export function scheduleFromJSON(
1666
+ jsonString: string,
1667
+ ): SafeParseResult<Schedule, SDKValidationError> {
1668
+ return safeParse(
1669
+ jsonString,
1670
+ (x) => Schedule$inboundSchema.parse(JSON.parse(x)),
1671
+ `Failed to parse 'Schedule' from JSON`,
1672
+ );
1673
+ }
1674
+
1675
+ /** @internal */
1676
+ export const ListSchedulesResponse$inboundSchema: z.ZodMiniType<
1677
+ ListSchedulesResponse,
1678
+ unknown
1679
+ > = z.object({
1680
+ success: types.literal(true),
1681
+ schedules: z.array(z.lazy(() => Schedule$inboundSchema)),
1682
+ creditsUsed: types.number(),
1683
+ retryAfter: types.number(),
1684
+ });
1685
+
1686
+ export function listSchedulesResponseFromJSON(
1687
+ jsonString: string,
1688
+ ): SafeParseResult<ListSchedulesResponse, SDKValidationError> {
1689
+ return safeParse(
1690
+ jsonString,
1691
+ (x) => ListSchedulesResponse$inboundSchema.parse(JSON.parse(x)),
1692
+ `Failed to parse 'ListSchedulesResponse' from JSON`,
1693
+ );
1694
+ }
1695
+
1696
+ /** @internal */
1697
+ export const UpdateScheduleAction$outboundSchema: z.ZodMiniEnum<
1698
+ typeof UpdateScheduleAction
1699
+ > = z.enum(UpdateScheduleAction);
1700
+
1701
+ /** @internal */
1702
+ export type UpdateScheduleRequestBody$Outbound = {
1703
+ action: string;
1704
+ };
1705
+
1706
+ /** @internal */
1707
+ export const UpdateScheduleRequestBody$outboundSchema: z.ZodMiniType<
1708
+ UpdateScheduleRequestBody$Outbound,
1709
+ UpdateScheduleRequestBody
1710
+ > = z.object({
1711
+ action: UpdateScheduleAction$outboundSchema,
1712
+ });
1713
+
1714
+ export function updateScheduleRequestBodyToJSON(
1715
+ updateScheduleRequestBody: UpdateScheduleRequestBody,
1716
+ ): string {
1717
+ return JSON.stringify(
1718
+ UpdateScheduleRequestBody$outboundSchema.parse(updateScheduleRequestBody),
1719
+ );
1720
+ }
1721
+
1722
+ /** @internal */
1723
+ export type UpdateScheduleRequest$Outbound = {
1724
+ scheduleId: string;
1725
+ body: UpdateScheduleRequestBody$Outbound;
1726
+ };
1727
+
1728
+ /** @internal */
1729
+ export const UpdateScheduleRequest$outboundSchema: z.ZodMiniType<
1730
+ UpdateScheduleRequest$Outbound,
1731
+ UpdateScheduleRequest
1732
+ > = z.object({
1733
+ scheduleId: z.string(),
1734
+ body: z.lazy(() => UpdateScheduleRequestBody$outboundSchema),
1735
+ });
1736
+
1737
+ export function updateScheduleRequestToJSON(
1738
+ updateScheduleRequest: UpdateScheduleRequest,
1739
+ ): string {
1740
+ return JSON.stringify(
1741
+ UpdateScheduleRequest$outboundSchema.parse(updateScheduleRequest),
1742
+ );
1743
+ }
1744
+
1745
+ /** @internal */
1746
+ export const UpdateScheduleResponse$inboundSchema: z.ZodMiniType<
1747
+ UpdateScheduleResponse,
1748
+ unknown
1749
+ > = z.object({
1750
+ success: types.literal(true),
1751
+ creditsUsed: types.number(),
1752
+ retryAfter: types.number(),
1753
+ });
1754
+
1755
+ export function updateScheduleResponseFromJSON(
1756
+ jsonString: string,
1757
+ ): SafeParseResult<UpdateScheduleResponse, SDKValidationError> {
1758
+ return safeParse(
1759
+ jsonString,
1760
+ (x) => UpdateScheduleResponse$inboundSchema.parse(JSON.parse(x)),
1761
+ `Failed to parse 'UpdateScheduleResponse' from JSON`,
1762
+ );
1763
+ }
1764
+
1765
+ /** @internal */
1766
+ export const ListTasksQueryParamStatus$outboundSchema: z.ZodMiniEnum<
1767
+ typeof ListTasksQueryParamStatus
1768
+ > = z.enum(ListTasksQueryParamStatus);
1769
+
1770
+ /** @internal */
1771
+ export type ListTasksRequest$Outbound = {
1772
+ status?: string | undefined;
1773
+ type?: string | undefined;
1774
+ campaignId?: string | undefined;
1775
+ limit: number;
1776
+ offset: number;
1777
+ };
1778
+
1779
+ /** @internal */
1780
+ export const ListTasksRequest$outboundSchema: z.ZodMiniType<
1781
+ ListTasksRequest$Outbound,
1782
+ ListTasksRequest
1783
+ > = z.object({
1784
+ status: z.optional(ListTasksQueryParamStatus$outboundSchema),
1785
+ type: z.optional(z.string()),
1786
+ campaignId: z.optional(z.string()),
1787
+ limit: z._default(z.int(), 50),
1788
+ offset: z._default(z.int(), 0),
1789
+ });
1790
+
1791
+ export function listTasksRequestToJSON(
1792
+ listTasksRequest: ListTasksRequest,
1793
+ ): string {
1794
+ return JSON.stringify(
1795
+ ListTasksRequest$outboundSchema.parse(listTasksRequest),
1796
+ );
1797
+ }
1798
+
1799
+ /** @internal */
1800
+ export const TaskStatus$inboundSchema: z.ZodMiniType<TaskStatus, unknown> =
1801
+ openEnums.inboundSchema(TaskStatus);
1802
+
1803
+ /** @internal */
1804
+ export const ListTasksTask$inboundSchema: z.ZodMiniType<
1805
+ ListTasksTask,
1806
+ unknown
1807
+ > = z.object({
1808
+ id: types.string(),
1809
+ type: types.string(),
1810
+ campaignId: types.nullable(types.string()),
1811
+ status: TaskStatus$inboundSchema,
1812
+ priority: types.number(),
1813
+ model: types.nullable(types.string()),
1814
+ result: types.nullable(z.any()),
1815
+ error: types.nullable(types.string()),
1816
+ connectorId: types.nullable(types.string()),
1817
+ workflowRunId: types.nullable(types.string()),
1818
+ createdAt: types.string(),
1819
+ dispatchedAt: types.nullable(types.string()),
1820
+ completedAt: types.nullable(types.string()),
1821
+ });
1822
+
1823
+ export function listTasksTaskFromJSON(
1824
+ jsonString: string,
1825
+ ): SafeParseResult<ListTasksTask, SDKValidationError> {
1826
+ return safeParse(
1827
+ jsonString,
1828
+ (x) => ListTasksTask$inboundSchema.parse(JSON.parse(x)),
1829
+ `Failed to parse 'ListTasksTask' from JSON`,
1830
+ );
1831
+ }
1832
+
1833
+ /** @internal */
1834
+ export const ListTasksResponse$inboundSchema: z.ZodMiniType<
1835
+ ListTasksResponse,
1836
+ unknown
1837
+ > = z.object({
1838
+ tasks: z.array(z.lazy(() => ListTasksTask$inboundSchema)),
1839
+ total: types.number(),
1840
+ limit: types.number(),
1841
+ offset: types.number(),
1842
+ });
1843
+
1844
+ export function listTasksResponseFromJSON(
1845
+ jsonString: string,
1846
+ ): SafeParseResult<ListTasksResponse, SDKValidationError> {
1847
+ return safeParse(
1848
+ jsonString,
1849
+ (x) => ListTasksResponse$inboundSchema.parse(JSON.parse(x)),
1850
+ `Failed to parse 'ListTasksResponse' from JSON`,
1851
+ );
1852
+ }
1853
+
1854
+ /** @internal */
1855
+ export type CancelTaskRequest$Outbound = {
1856
+ id: string;
1857
+ };
1858
+
1859
+ /** @internal */
1860
+ export const CancelTaskRequest$outboundSchema: z.ZodMiniType<
1861
+ CancelTaskRequest$Outbound,
1862
+ CancelTaskRequest
1863
+ > = z.object({
1864
+ id: z.string(),
1865
+ });
1866
+
1867
+ export function cancelTaskRequestToJSON(
1868
+ cancelTaskRequest: CancelTaskRequest,
1869
+ ): string {
1870
+ return JSON.stringify(
1871
+ CancelTaskRequest$outboundSchema.parse(cancelTaskRequest),
1872
+ );
1873
+ }
1874
+
1875
+ /** @internal */
1876
+ export const CancelTaskResponse$inboundSchema: z.ZodMiniType<
1877
+ CancelTaskResponse,
1878
+ unknown
1879
+ > = z.object({
1880
+ success: types.literal(true),
1881
+ status: types.string(),
1882
+ message: types.optional(types.string()),
1883
+ });
1884
+
1885
+ export function cancelTaskResponseFromJSON(
1886
+ jsonString: string,
1887
+ ): SafeParseResult<CancelTaskResponse, SDKValidationError> {
1888
+ return safeParse(
1889
+ jsonString,
1890
+ (x) => CancelTaskResponse$inboundSchema.parse(JSON.parse(x)),
1891
+ `Failed to parse 'CancelTaskResponse' from JSON`,
1892
+ );
1893
+ }
1894
+
1895
+ /** @internal */
1896
+ export type EventsFeedRequest$Outbound = {
1897
+ since?: string | undefined;
1898
+ limit: number;
1899
+ };
1900
+
1901
+ /** @internal */
1902
+ export const EventsFeedRequest$outboundSchema: z.ZodMiniType<
1903
+ EventsFeedRequest$Outbound,
1904
+ EventsFeedRequest
1905
+ > = z.object({
1906
+ since: z.optional(z.string()),
1907
+ limit: z._default(z.int(), 20),
1908
+ });
1909
+
1910
+ export function eventsFeedRequestToJSON(
1911
+ eventsFeedRequest: EventsFeedRequest,
1912
+ ): string {
1913
+ return JSON.stringify(
1914
+ EventsFeedRequest$outboundSchema.parse(eventsFeedRequest),
1915
+ );
1916
+ }
1917
+
1918
+ /** @internal */
1919
+ export const EventsFeedType$inboundSchema: z.ZodMiniType<
1920
+ EventsFeedType,
1921
+ unknown
1922
+ > = openEnums.inboundSchema(EventsFeedType);
1923
+
1924
+ /** @internal */
1925
+ export const Event$inboundSchema: z.ZodMiniType<Event, unknown> = z.object({
1926
+ id: types.string(),
1927
+ type: EventsFeedType$inboundSchema,
1928
+ campaignId: types.optional(types.string()),
1929
+ campaignName: types.optional(types.string()),
1930
+ summary: types.string(),
1931
+ metadata: z.record(z.string(), z.any()),
1932
+ timestamp: types.number(),
1933
+ });
1934
+
1935
+ export function eventFromJSON(
1936
+ jsonString: string,
1937
+ ): SafeParseResult<Event, SDKValidationError> {
1938
+ return safeParse(
1939
+ jsonString,
1940
+ (x) => Event$inboundSchema.parse(JSON.parse(x)),
1941
+ `Failed to parse 'Event' from JSON`,
1942
+ );
1943
+ }
1944
+
1945
+ /** @internal */
1946
+ export const EventsFeedResponse$inboundSchema: z.ZodMiniType<
1947
+ EventsFeedResponse,
1948
+ unknown
1949
+ > = z.object({
1950
+ events: z.array(z.lazy(() => Event$inboundSchema)),
1951
+ cursor: types.optional(types.number()),
1952
+ });
1953
+
1954
+ export function eventsFeedResponseFromJSON(
1955
+ jsonString: string,
1956
+ ): SafeParseResult<EventsFeedResponse, SDKValidationError> {
1957
+ return safeParse(
1958
+ jsonString,
1959
+ (x) => EventsFeedResponse$inboundSchema.parse(JSON.parse(x)),
1960
+ `Failed to parse 'EventsFeedResponse' from JSON`,
1961
+ );
1962
+ }
1963
+
1964
+ /** @internal */
1965
+ export type CancelChainRequest$Outbound = {
1966
+ workflowRunId: string;
1967
+ };
1968
+
1969
+ /** @internal */
1970
+ export const CancelChainRequest$outboundSchema: z.ZodMiniType<
1971
+ CancelChainRequest$Outbound,
1972
+ CancelChainRequest
1973
+ > = z.object({
1974
+ workflowRunId: z.string(),
1975
+ });
1976
+
1977
+ export function cancelChainRequestToJSON(
1978
+ cancelChainRequest: CancelChainRequest,
1979
+ ): string {
1980
+ return JSON.stringify(
1981
+ CancelChainRequest$outboundSchema.parse(cancelChainRequest),
1982
+ );
1983
+ }
1984
+
1985
+ /** @internal */
1986
+ export const CancelChainResponse$inboundSchema: z.ZodMiniType<
1987
+ CancelChainResponse,
1988
+ unknown
1989
+ > = z.object({
1990
+ success: types.literal(true),
1991
+ tasksCancelled: types.number(),
1992
+ });
1993
+
1994
+ export function cancelChainResponseFromJSON(
1995
+ jsonString: string,
1996
+ ): SafeParseResult<CancelChainResponse, SDKValidationError> {
1997
+ return safeParse(
1998
+ jsonString,
1999
+ (x) => CancelChainResponse$inboundSchema.parse(JSON.parse(x)),
2000
+ `Failed to parse 'CancelChainResponse' from JSON`,
2001
+ );
2002
+ }
2003
+
2004
+ /** @internal */
2005
+ export const PullTaskTask$inboundSchema: z.ZodMiniType<PullTaskTask, unknown> =
2006
+ z.object({
2007
+ id: types.string(),
2008
+ type: types.string(),
2009
+ campaignId: types.nullable(types.string()),
2010
+ message: types.string(),
2011
+ model: types.nullable(types.string()),
2012
+ thinking: types.nullable(types.string()),
2013
+ timeoutSeconds: types.nullable(types.number()),
2014
+ sessionKey: types.nullable(types.string()),
2015
+ payload: types.nullable(z.any()),
2016
+ });
2017
+
2018
+ export function pullTaskTaskFromJSON(
2019
+ jsonString: string,
2020
+ ): SafeParseResult<PullTaskTask, SDKValidationError> {
2021
+ return safeParse(
2022
+ jsonString,
2023
+ (x) => PullTaskTask$inboundSchema.parse(JSON.parse(x)),
2024
+ `Failed to parse 'PullTaskTask' from JSON`,
2025
+ );
2026
+ }
2027
+
2028
+ /** @internal */
2029
+ export const PullTaskResponse$inboundSchema: z.ZodMiniType<
2030
+ PullTaskResponse,
2031
+ unknown
2032
+ > = z.object({
2033
+ task: types.nullable(z.lazy(() => PullTaskTask$inboundSchema)),
2034
+ cancelTaskId: types.nullable(types.string()),
2035
+ pollIntervalMs: types.number(),
2036
+ });
2037
+
2038
+ export function pullTaskResponseFromJSON(
2039
+ jsonString: string,
2040
+ ): SafeParseResult<PullTaskResponse, SDKValidationError> {
2041
+ return safeParse(
2042
+ jsonString,
2043
+ (x) => PullTaskResponse$inboundSchema.parse(JSON.parse(x)),
2044
+ `Failed to parse 'PullTaskResponse' from JSON`,
2045
+ );
2046
+ }
2047
+
2048
+ /** @internal */
2049
+ export const SubmitTaskResultStatus$outboundSchema: z.ZodMiniEnum<
2050
+ typeof SubmitTaskResultStatus
2051
+ > = z.enum(SubmitTaskResultStatus);
2052
+
2053
+ /** @internal */
2054
+ export type SubmitTaskResultRequestBody$Outbound = {
2055
+ status?: string | undefined;
2056
+ result?: any | undefined;
2057
+ error?: string | undefined;
2058
+ };
2059
+
2060
+ /** @internal */
2061
+ export const SubmitTaskResultRequestBody$outboundSchema: z.ZodMiniType<
2062
+ SubmitTaskResultRequestBody$Outbound,
2063
+ SubmitTaskResultRequestBody
2064
+ > = z.object({
2065
+ status: z.optional(SubmitTaskResultStatus$outboundSchema),
2066
+ result: z.optional(z.any()),
2067
+ error: z.optional(z.string()),
2068
+ });
2069
+
2070
+ export function submitTaskResultRequestBodyToJSON(
2071
+ submitTaskResultRequestBody: SubmitTaskResultRequestBody,
2072
+ ): string {
2073
+ return JSON.stringify(
2074
+ SubmitTaskResultRequestBody$outboundSchema.parse(
2075
+ submitTaskResultRequestBody,
2076
+ ),
2077
+ );
2078
+ }
2079
+
2080
+ /** @internal */
2081
+ export type SubmitTaskResultRequest$Outbound = {
2082
+ id: string;
2083
+ body: SubmitTaskResultRequestBody$Outbound;
2084
+ };
2085
+
2086
+ /** @internal */
2087
+ export const SubmitTaskResultRequest$outboundSchema: z.ZodMiniType<
2088
+ SubmitTaskResultRequest$Outbound,
2089
+ SubmitTaskResultRequest
2090
+ > = z.object({
2091
+ id: z.string(),
2092
+ body: z.lazy(() => SubmitTaskResultRequestBody$outboundSchema),
2093
+ });
2094
+
2095
+ export function submitTaskResultRequestToJSON(
2096
+ submitTaskResultRequest: SubmitTaskResultRequest,
2097
+ ): string {
2098
+ return JSON.stringify(
2099
+ SubmitTaskResultRequest$outboundSchema.parse(submitTaskResultRequest),
2100
+ );
2101
+ }
2102
+
2103
+ /** @internal */
2104
+ export const SubmitTaskResultResponse$inboundSchema: z.ZodMiniType<
2105
+ SubmitTaskResultResponse,
2106
+ unknown
2107
+ > = z.object({
2108
+ success: types.literal(true),
2109
+ status: types.string(),
2110
+ message: types.optional(types.string()),
2111
+ });
2112
+
2113
+ export function submitTaskResultResponseFromJSON(
2114
+ jsonString: string,
2115
+ ): SafeParseResult<SubmitTaskResultResponse, SDKValidationError> {
2116
+ return safeParse(
2117
+ jsonString,
2118
+ (x) => SubmitTaskResultResponse$inboundSchema.parse(JSON.parse(x)),
2119
+ `Failed to parse 'SubmitTaskResultResponse' from JSON`,
2120
+ );
2121
+ }
2122
+
2123
+ /** @internal */
2124
+ export const Connector$inboundSchema: z.ZodMiniType<Connector, unknown> = z
2125
+ .object({
2126
+ id: types.string(),
2127
+ name: types.string(),
2128
+ status: types.string(),
2129
+ credentialsId: types.string(),
2130
+ lastSeenAt: types.nullable(types.string()),
2131
+ lastTaskAt: types.nullable(types.string()),
2132
+ createdAt: types.string(),
2133
+ isOnline: types.boolean(),
2134
+ });
2135
+
2136
+ export function connectorFromJSON(
2137
+ jsonString: string,
2138
+ ): SafeParseResult<Connector, SDKValidationError> {
2139
+ return safeParse(
2140
+ jsonString,
2141
+ (x) => Connector$inboundSchema.parse(JSON.parse(x)),
2142
+ `Failed to parse 'Connector' from JSON`,
2143
+ );
2144
+ }
2145
+
2146
+ /** @internal */
2147
+ export const ListConnectorsResponse$inboundSchema: z.ZodMiniType<
2148
+ ListConnectorsResponse,
2149
+ unknown
2150
+ > = z.object({
2151
+ connectors: z.array(z.lazy(() => Connector$inboundSchema)),
2152
+ });
2153
+
2154
+ export function listConnectorsResponseFromJSON(
2155
+ jsonString: string,
2156
+ ): SafeParseResult<ListConnectorsResponse, SDKValidationError> {
2157
+ return safeParse(
2158
+ jsonString,
2159
+ (x) => ListConnectorsResponse$inboundSchema.parse(JSON.parse(x)),
2160
+ `Failed to parse 'ListConnectorsResponse' from JSON`,
2161
+ );
2162
+ }
2163
+
2164
+ /** @internal */
2165
+ export type ConnectorHeartbeatRequest$Outbound = {
2166
+ currentTaskId?: string | undefined;
2167
+ };
2168
+
2169
+ /** @internal */
2170
+ export const ConnectorHeartbeatRequest$outboundSchema: z.ZodMiniType<
2171
+ ConnectorHeartbeatRequest$Outbound,
2172
+ ConnectorHeartbeatRequest
2173
+ > = z.object({
2174
+ currentTaskId: z.optional(z.string()),
2175
+ });
2176
+
2177
+ export function connectorHeartbeatRequestToJSON(
2178
+ connectorHeartbeatRequest: ConnectorHeartbeatRequest,
2179
+ ): string {
2180
+ return JSON.stringify(
2181
+ ConnectorHeartbeatRequest$outboundSchema.parse(connectorHeartbeatRequest),
2182
+ );
2183
+ }
2184
+
2185
+ /** @internal */
2186
+ export const ConnectorHeartbeatResponse$inboundSchema: z.ZodMiniType<
2187
+ ConnectorHeartbeatResponse,
2188
+ unknown
2189
+ > = z.object({
2190
+ success: types.literal(true),
2191
+ pendingCount: types.number(),
2192
+ pollIntervalMs: types.number(),
2193
+ });
2194
+
2195
+ export function connectorHeartbeatResponseFromJSON(
2196
+ jsonString: string,
2197
+ ): SafeParseResult<ConnectorHeartbeatResponse, SDKValidationError> {
2198
+ return safeParse(
2199
+ jsonString,
2200
+ (x) => ConnectorHeartbeatResponse$inboundSchema.parse(JSON.parse(x)),
2201
+ `Failed to parse 'ConnectorHeartbeatResponse' from JSON`,
2202
+ );
2203
+ }
2204
+
2205
+ /** @internal */
2206
+ export const Context$inboundSchema: z.ZodMiniType<Context, unknown> = z.object({
2207
+ type: types.string(),
2208
+ label: types.nullable(types.string()),
2209
+ content: types.string(),
2210
+ scope: types.string(),
2211
+ });
2212
+
2213
+ export function contextFromJSON(
2214
+ jsonString: string,
2215
+ ): SafeParseResult<Context, SDKValidationError> {
2216
+ return safeParse(
2217
+ jsonString,
2218
+ (x) => Context$inboundSchema.parse(JSON.parse(x)),
2219
+ `Failed to parse 'Context' from JSON`,
2220
+ );
2221
+ }
2222
+
2223
+ /** @internal */
2224
+ export const ActiveAccount$inboundSchema: z.ZodMiniType<
2225
+ ActiveAccount,
2226
+ unknown
2227
+ > = z.object({
2228
+ id: types.string(),
2229
+ name: types.nullable(types.string()),
2230
+ plan: types.string(),
2231
+ headline: types.nullable(types.string()),
2232
+ isUnlimited: types.boolean(),
2233
+ creditsLimit: types.number(),
2234
+ creditsCount: types.number(),
2235
+ simulateWrites: types.boolean(),
2236
+ isCurrent: types.boolean(),
2237
+ });
2238
+
2239
+ export function activeAccountFromJSON(
2240
+ jsonString: string,
2241
+ ): SafeParseResult<ActiveAccount, SDKValidationError> {
2242
+ return safeParse(
2243
+ jsonString,
2244
+ (x) => ActiveAccount$inboundSchema.parse(JSON.parse(x)),
2245
+ `Failed to parse 'ActiveAccount' from JSON`,
2246
+ );
2247
+ }
2248
+
2249
+ /** @internal */
2250
+ export const AgentSnapshotAccount$inboundSchema: z.ZodMiniType<
2251
+ AgentSnapshotAccount,
2252
+ unknown
2253
+ > = z.object({
2254
+ id: types.string(),
2255
+ name: types.nullable(types.string()),
2256
+ plan: types.string(),
2257
+ headline: types.nullable(types.string()),
2258
+ isUnlimited: types.boolean(),
2259
+ creditsLimit: types.number(),
2260
+ creditsCount: types.number(),
2261
+ simulateWrites: types.boolean(),
2262
+ isCurrent: types.boolean(),
2263
+ });
2264
+
2265
+ export function agentSnapshotAccountFromJSON(
2266
+ jsonString: string,
2267
+ ): SafeParseResult<AgentSnapshotAccount, SDKValidationError> {
2268
+ return safeParse(
2269
+ jsonString,
2270
+ (x) => AgentSnapshotAccount$inboundSchema.parse(JSON.parse(x)),
2271
+ `Failed to parse 'AgentSnapshotAccount' from JSON`,
2272
+ );
2273
+ }
2274
+
2275
+ /** @internal */
2276
+ export const AgentSnapshotStageCounts$inboundSchema: z.ZodMiniType<
2277
+ AgentSnapshotStageCounts,
2278
+ unknown
2279
+ > = z.object({
2280
+ contact: types.number(),
2281
+ lead: types.number(),
2282
+ qualified: types.number(),
2283
+ approved: types.number(),
2284
+ rejected: types.number(),
2285
+ total: types.number(),
2286
+ });
2287
+
2288
+ export function agentSnapshotStageCountsFromJSON(
2289
+ jsonString: string,
2290
+ ): SafeParseResult<AgentSnapshotStageCounts, SDKValidationError> {
2291
+ return safeParse(
2292
+ jsonString,
2293
+ (x) => AgentSnapshotStageCounts$inboundSchema.parse(JSON.parse(x)),
2294
+ `Failed to parse 'AgentSnapshotStageCounts' from JSON`,
2295
+ );
2296
+ }
2297
+
2298
+ /** @internal */
2299
+ export const ActiveCampaign$inboundSchema: z.ZodMiniType<
2300
+ ActiveCampaign,
2301
+ unknown
2302
+ > = z.object({
2303
+ id: types.string(),
2304
+ name: types.string(),
2305
+ type: types.string(),
2306
+ status: types.string(),
2307
+ context: types.nullable(z.any()),
2308
+ stageCounts: z.lazy(() => AgentSnapshotStageCounts$inboundSchema),
2309
+ });
2310
+
2311
+ export function activeCampaignFromJSON(
2312
+ jsonString: string,
2313
+ ): SafeParseResult<ActiveCampaign, SDKValidationError> {
2314
+ return safeParse(
2315
+ jsonString,
2316
+ (x) => ActiveCampaign$inboundSchema.parse(JSON.parse(x)),
2317
+ `Failed to parse 'ActiveCampaign' from JSON`,
2318
+ );
2319
+ }
2320
+
2321
+ /** @internal */
2322
+ export const AgentSnapshotType$inboundSchema: z.ZodMiniType<
2323
+ AgentSnapshotType,
2324
+ unknown
2325
+ > = openEnums.inboundSchema(AgentSnapshotType);
2326
+
2327
+ /** @internal */
2328
+ export const RecentEvent$inboundSchema: z.ZodMiniType<RecentEvent, unknown> = z
2329
+ .object({
2330
+ id: types.string(),
2331
+ type: AgentSnapshotType$inboundSchema,
2332
+ campaignId: types.optional(types.string()),
2333
+ campaignName: types.optional(types.string()),
2334
+ summary: types.string(),
2335
+ metadata: z.record(z.string(), z.any()),
2336
+ timestamp: types.number(),
2337
+ });
2338
+
2339
+ export function recentEventFromJSON(
2340
+ jsonString: string,
2341
+ ): SafeParseResult<RecentEvent, SDKValidationError> {
2342
+ return safeParse(
2343
+ jsonString,
2344
+ (x) => RecentEvent$inboundSchema.parse(JSON.parse(x)),
2345
+ `Failed to parse 'RecentEvent' from JSON`,
2346
+ );
2347
+ }
2348
+
2349
+ /** @internal */
2350
+ export const AgentSnapshotResponse$inboundSchema: z.ZodMiniType<
2351
+ AgentSnapshotResponse,
2352
+ unknown
2353
+ > = z.object({
2354
+ credits: types.nullable(z.any()),
2355
+ pipeline: z.record(z.string(), types.number()),
2356
+ contexts: z.array(z.lazy(() => Context$inboundSchema)),
2357
+ pendingDrafts: types.number(),
2358
+ failedDrafts: types.number(),
2359
+ unreadDMs: types.number(),
2360
+ pendingSentInvitations: types.number(),
2361
+ activeAccount: types.nullable(z.lazy(() => ActiveAccount$inboundSchema)),
2362
+ accounts: z.array(z.lazy(() => AgentSnapshotAccount$inboundSchema)),
2363
+ leadGenState: types.nullable(z.any()),
2364
+ outreachState: types.nullable(z.any()),
2365
+ activeCampaigns: z.array(z.lazy(() => ActiveCampaign$inboundSchema)),
2366
+ campaignChecks: z.any(),
2367
+ sessionMeta: types.nullable(z.any()),
2368
+ onboardingState: types.nullable(z.any()),
2369
+ recentEvents: z.array(z.lazy(() => RecentEvent$inboundSchema)),
2370
+ });
2371
+
2372
+ export function agentSnapshotResponseFromJSON(
2373
+ jsonString: string,
2374
+ ): SafeParseResult<AgentSnapshotResponse, SDKValidationError> {
2375
+ return safeParse(
2376
+ jsonString,
2377
+ (x) => AgentSnapshotResponse$inboundSchema.parse(JSON.parse(x)),
2378
+ `Failed to parse 'AgentSnapshotResponse' from JSON`,
2379
+ );
2380
+ }
2381
+
2382
+ /** @internal */
2383
+ export const GetDmPollingSettingsSettings$inboundSchema: z.ZodMiniType<
2384
+ GetDmPollingSettingsSettings,
2385
+ unknown
2386
+ > = z.object({
2387
+ dmPollingEnabled: types.boolean(),
2388
+ dmWebhookUrl: types.nullable(types.string()),
2389
+ dmLastPolledAt: types.nullable(types.string()),
2390
+ connectionPollingEnabled: types.boolean(),
2391
+ connectionLastPolledAt: types.nullable(types.string()),
2392
+ });
2393
+
2394
+ export function getDmPollingSettingsSettingsFromJSON(
2395
+ jsonString: string,
2396
+ ): SafeParseResult<GetDmPollingSettingsSettings, SDKValidationError> {
2397
+ return safeParse(
2398
+ jsonString,
2399
+ (x) => GetDmPollingSettingsSettings$inboundSchema.parse(JSON.parse(x)),
2400
+ `Failed to parse 'GetDmPollingSettingsSettings' from JSON`,
2401
+ );
2402
+ }
2403
+
2404
+ /** @internal */
2405
+ export const GetDmPollingSettingsResponse$inboundSchema: z.ZodMiniType<
2406
+ GetDmPollingSettingsResponse,
2407
+ unknown
2408
+ > = z.object({
2409
+ success: types.literal(true),
2410
+ settings: z.lazy(() => GetDmPollingSettingsSettings$inboundSchema),
2411
+ creditsUsed: types.number(),
2412
+ retryAfter: types.number(),
2413
+ });
2414
+
2415
+ export function getDmPollingSettingsResponseFromJSON(
2416
+ jsonString: string,
2417
+ ): SafeParseResult<GetDmPollingSettingsResponse, SDKValidationError> {
2418
+ return safeParse(
2419
+ jsonString,
2420
+ (x) => GetDmPollingSettingsResponse$inboundSchema.parse(JSON.parse(x)),
2421
+ `Failed to parse 'GetDmPollingSettingsResponse' from JSON`,
2422
+ );
2423
+ }
2424
+
2425
+ /** @internal */
2426
+ export type PatchDmPollingSettingsRequest$Outbound = {
2427
+ dmPollingEnabled?: boolean | undefined;
2428
+ dmWebhookUrl?: string | null | undefined;
2429
+ connectionPollingEnabled?: boolean | undefined;
2430
+ };
2431
+
2432
+ /** @internal */
2433
+ export const PatchDmPollingSettingsRequest$outboundSchema: z.ZodMiniType<
2434
+ PatchDmPollingSettingsRequest$Outbound,
2435
+ PatchDmPollingSettingsRequest
2436
+ > = z.object({
2437
+ dmPollingEnabled: z.optional(z.boolean()),
2438
+ dmWebhookUrl: z.optional(z.nullable(z.string())),
2439
+ connectionPollingEnabled: z.optional(z.boolean()),
2440
+ });
2441
+
2442
+ export function patchDmPollingSettingsRequestToJSON(
2443
+ patchDmPollingSettingsRequest: PatchDmPollingSettingsRequest,
2444
+ ): string {
2445
+ return JSON.stringify(
2446
+ PatchDmPollingSettingsRequest$outboundSchema.parse(
2447
+ patchDmPollingSettingsRequest,
2448
+ ),
2449
+ );
2450
+ }
2451
+
2452
+ /** @internal */
2453
+ export const PatchDmPollingSettingsSettings$inboundSchema: z.ZodMiniType<
2454
+ PatchDmPollingSettingsSettings,
2455
+ unknown
2456
+ > = z.object({
2457
+ dmPollingEnabled: types.boolean(),
2458
+ dmWebhookUrl: types.nullable(types.string()),
2459
+ dmLastPolledAt: types.nullable(types.string()),
2460
+ connectionPollingEnabled: types.boolean(),
2461
+ connectionLastPolledAt: types.nullable(types.string()),
2462
+ });
2463
+
2464
+ export function patchDmPollingSettingsSettingsFromJSON(
2465
+ jsonString: string,
2466
+ ): SafeParseResult<PatchDmPollingSettingsSettings, SDKValidationError> {
2467
+ return safeParse(
2468
+ jsonString,
2469
+ (x) => PatchDmPollingSettingsSettings$inboundSchema.parse(JSON.parse(x)),
2470
+ `Failed to parse 'PatchDmPollingSettingsSettings' from JSON`,
2471
+ );
2472
+ }
2473
+
2474
+ /** @internal */
2475
+ export const PatchDmPollingSettingsResponse$inboundSchema: z.ZodMiniType<
2476
+ PatchDmPollingSettingsResponse,
2477
+ unknown
2478
+ > = z.object({
2479
+ success: types.literal(true),
2480
+ settings: z.lazy(() => PatchDmPollingSettingsSettings$inboundSchema),
2481
+ creditsUsed: types.number(),
2482
+ retryAfter: types.number(),
2483
+ });
2484
+
2485
+ export function patchDmPollingSettingsResponseFromJSON(
2486
+ jsonString: string,
2487
+ ): SafeParseResult<PatchDmPollingSettingsResponse, SDKValidationError> {
2488
+ return safeParse(
2489
+ jsonString,
2490
+ (x) => PatchDmPollingSettingsResponse$inboundSchema.parse(JSON.parse(x)),
2491
+ `Failed to parse 'PatchDmPollingSettingsResponse' from JSON`,
2492
+ );
2493
+ }
2494
+
2495
+ /** @internal */
2496
+ export type DeleteWorkspaceAccountRequest$Outbound = {
2497
+ id: string;
2498
+ };
2499
+
2500
+ /** @internal */
2501
+ export const DeleteWorkspaceAccountRequest$outboundSchema: z.ZodMiniType<
2502
+ DeleteWorkspaceAccountRequest$Outbound,
2503
+ DeleteWorkspaceAccountRequest
2504
+ > = z.object({
2505
+ id: z.string(),
2506
+ });
2507
+
2508
+ export function deleteWorkspaceAccountRequestToJSON(
2509
+ deleteWorkspaceAccountRequest: DeleteWorkspaceAccountRequest,
2510
+ ): string {
2511
+ return JSON.stringify(
2512
+ DeleteWorkspaceAccountRequest$outboundSchema.parse(
2513
+ deleteWorkspaceAccountRequest,
2514
+ ),
2515
+ );
2516
+ }
2517
+
2518
+ /** @internal */
2519
+ export const DeleteWorkspaceAccountResponse$inboundSchema: z.ZodMiniType<
2520
+ DeleteWorkspaceAccountResponse,
2521
+ unknown
2522
+ > = z.object({
2523
+ success: types.literal(true),
2524
+ message: types.string(),
2525
+ });
2526
+
2527
+ export function deleteWorkspaceAccountResponseFromJSON(
2528
+ jsonString: string,
2529
+ ): SafeParseResult<DeleteWorkspaceAccountResponse, SDKValidationError> {
2530
+ return safeParse(
2531
+ jsonString,
2532
+ (x) => DeleteWorkspaceAccountResponse$inboundSchema.parse(JSON.parse(x)),
2533
+ `Failed to parse 'DeleteWorkspaceAccountResponse' from JSON`,
2534
+ );
2535
+ }
2536
+
2537
+ /** @internal */
2538
+ export const UpgradeWorkspaceAccountAction$outboundSchema: z.ZodMiniEnum<
2539
+ typeof UpgradeWorkspaceAccountAction
2540
+ > = z.enum(UpgradeWorkspaceAccountAction);
2541
+
2542
+ /** @internal */
2543
+ export type UpgradeWorkspaceAccountRequest$Outbound = {
2544
+ credentialsId: string;
2545
+ action: string;
2546
+ };
2547
+
2548
+ /** @internal */
2549
+ export const UpgradeWorkspaceAccountRequest$outboundSchema: z.ZodMiniType<
2550
+ UpgradeWorkspaceAccountRequest$Outbound,
2551
+ UpgradeWorkspaceAccountRequest
2552
+ > = z.object({
2553
+ credentialsId: z.string(),
2554
+ action: UpgradeWorkspaceAccountAction$outboundSchema,
2555
+ });
2556
+
2557
+ export function upgradeWorkspaceAccountRequestToJSON(
2558
+ upgradeWorkspaceAccountRequest: UpgradeWorkspaceAccountRequest,
2559
+ ): string {
2560
+ return JSON.stringify(
2561
+ UpgradeWorkspaceAccountRequest$outboundSchema.parse(
2562
+ upgradeWorkspaceAccountRequest,
2563
+ ),
2564
+ );
2565
+ }
2566
+
2567
+ /** @internal */
2568
+ export const UpgradeWorkspaceAccountResponse$inboundSchema: z.ZodMiniType<
2569
+ UpgradeWorkspaceAccountResponse,
2570
+ unknown
2571
+ > = z.object({
2572
+ success: types.literal(true),
2573
+ message: types.string(),
2574
+ seatsUsed: types.number(),
2575
+ seatsIncluded: types.number(),
2576
+ });
2577
+
2578
+ export function upgradeWorkspaceAccountResponseFromJSON(
2579
+ jsonString: string,
2580
+ ): SafeParseResult<UpgradeWorkspaceAccountResponse, SDKValidationError> {
2581
+ return safeParse(
2582
+ jsonString,
2583
+ (x) => UpgradeWorkspaceAccountResponse$inboundSchema.parse(JSON.parse(x)),
2584
+ `Failed to parse 'UpgradeWorkspaceAccountResponse' from JSON`,
2585
+ );
2586
+ }
2587
+
2588
+ /** @internal */
2589
+ export const CreateWorkspaceInviteAction$outboundSchema: z.ZodMiniEnum<
2590
+ typeof CreateWorkspaceInviteAction
2591
+ > = z.enum(CreateWorkspaceInviteAction);
2592
+
2593
+ /** @internal */
2594
+ export type CreateWorkspaceInviteRequest$Outbound = {
2595
+ action: string;
2596
+ email?: string | undefined;
2597
+ name?: string | undefined;
2598
+ maxUses: number;
2599
+ };
2600
+
2601
+ /** @internal */
2602
+ export const CreateWorkspaceInviteRequest$outboundSchema: z.ZodMiniType<
2603
+ CreateWorkspaceInviteRequest$Outbound,
2604
+ CreateWorkspaceInviteRequest
2605
+ > = z.object({
2606
+ action: CreateWorkspaceInviteAction$outboundSchema,
2607
+ email: z.optional(z.string()),
2608
+ name: z.optional(z.string()),
2609
+ maxUses: z._default(z.int(), 1),
2610
+ });
2611
+
2612
+ export function createWorkspaceInviteRequestToJSON(
2613
+ createWorkspaceInviteRequest: CreateWorkspaceInviteRequest,
2614
+ ): string {
2615
+ return JSON.stringify(
2616
+ CreateWorkspaceInviteRequest$outboundSchema.parse(
2617
+ createWorkspaceInviteRequest,
2618
+ ),
2619
+ );
2620
+ }
2621
+
2622
+ /** @internal */
2623
+ export const Invite2$inboundSchema: z.ZodMiniType<Invite2, unknown> = z.object({
2624
+ id: types.string(),
2625
+ email: types.nullable(types.string()),
2626
+ name: types.nullable(types.string()),
2627
+ code: types.string(),
2628
+ status: types.optional(types.string()),
2629
+ maxUses: types.number(),
2630
+ useCount: types.number(),
2631
+ expiresAt: types.nullable(types.string()),
2632
+ createdAt: types.string(),
2633
+ });
2634
+
2635
+ export function invite2FromJSON(
2636
+ jsonString: string,
2637
+ ): SafeParseResult<Invite2, SDKValidationError> {
2638
+ return safeParse(
2639
+ jsonString,
2640
+ (x) => Invite2$inboundSchema.parse(JSON.parse(x)),
2641
+ `Failed to parse 'Invite2' from JSON`,
2642
+ );
2643
+ }
2644
+
2645
+ /** @internal */
2646
+ export const Workspace$inboundSchema: z.ZodMiniType<Workspace, unknown> = z
2647
+ .object({
2648
+ tier: types.string(),
2649
+ proSeatsIncluded: types.number(),
2650
+ proSeatsUsed: types.number(),
2651
+ });
2652
+
2653
+ export function workspaceFromJSON(
2654
+ jsonString: string,
2655
+ ): SafeParseResult<Workspace, SDKValidationError> {
2656
+ return safeParse(
2657
+ jsonString,
2658
+ (x) => Workspace$inboundSchema.parse(JSON.parse(x)),
2659
+ `Failed to parse 'Workspace' from JSON`,
2660
+ );
2661
+ }
2662
+
2663
+ /** @internal */
2664
+ export const ResponseBody2$inboundSchema: z.ZodMiniType<
2665
+ ResponseBody2,
2666
+ unknown
2667
+ > = z.object({
2668
+ success: types.literal(true),
2669
+ invites: z.array(z.lazy(() => Invite2$inboundSchema)),
2670
+ workspace: z.lazy(() => Workspace$inboundSchema),
2671
+ });
2672
+
2673
+ export function responseBody2FromJSON(
2674
+ jsonString: string,
2675
+ ): SafeParseResult<ResponseBody2, SDKValidationError> {
2676
+ return safeParse(
2677
+ jsonString,
2678
+ (x) => ResponseBody2$inboundSchema.parse(JSON.parse(x)),
2679
+ `Failed to parse 'ResponseBody2' from JSON`,
2680
+ );
2681
+ }
2682
+
2683
+ /** @internal */
2684
+ export const Invite1$inboundSchema: z.ZodMiniType<Invite1, unknown> = z.object({
2685
+ id: types.string(),
2686
+ email: types.nullable(types.string()),
2687
+ name: types.nullable(types.string()),
2688
+ code: types.string(),
2689
+ status: types.optional(types.string()),
2690
+ maxUses: types.number(),
2691
+ useCount: types.number(),
2692
+ expiresAt: types.nullable(types.string()),
2693
+ createdAt: types.string(),
2694
+ });
2695
+
2696
+ export function invite1FromJSON(
2697
+ jsonString: string,
2698
+ ): SafeParseResult<Invite1, SDKValidationError> {
2699
+ return safeParse(
2700
+ jsonString,
2701
+ (x) => Invite1$inboundSchema.parse(JSON.parse(x)),
2702
+ `Failed to parse 'Invite1' from JSON`,
2703
+ );
2704
+ }
2705
+
2706
+ /** @internal */
2707
+ export const ResponseBody1$inboundSchema: z.ZodMiniType<
2708
+ ResponseBody1,
2709
+ unknown
2710
+ > = z.object({
2711
+ success: types.literal(true),
2712
+ invite: z.lazy(() => Invite1$inboundSchema),
2713
+ });
2714
+
2715
+ export function responseBody1FromJSON(
2716
+ jsonString: string,
2717
+ ): SafeParseResult<ResponseBody1, SDKValidationError> {
2718
+ return safeParse(
2719
+ jsonString,
2720
+ (x) => ResponseBody1$inboundSchema.parse(JSON.parse(x)),
2721
+ `Failed to parse 'ResponseBody1' from JSON`,
2722
+ );
2723
+ }
2724
+
2725
+ /** @internal */
2726
+ export const CreateWorkspaceInviteResponse$inboundSchema: z.ZodMiniType<
2727
+ CreateWorkspaceInviteResponse,
2728
+ unknown
2729
+ > = smartUnion([
2730
+ z.lazy(() => ResponseBody2$inboundSchema),
2731
+ z.lazy(() => ResponseBody1$inboundSchema),
2732
+ ]);
2733
+
2734
+ export function createWorkspaceInviteResponseFromJSON(
2735
+ jsonString: string,
2736
+ ): SafeParseResult<CreateWorkspaceInviteResponse, SDKValidationError> {
2737
+ return safeParse(
2738
+ jsonString,
2739
+ (x) => CreateWorkspaceInviteResponse$inboundSchema.parse(JSON.parse(x)),
2740
+ `Failed to parse 'CreateWorkspaceInviteResponse' from JSON`,
2741
+ );
2742
+ }
2743
+
2744
+ /** @internal */
2745
+ export type DeleteWorkspaceInviteRequest$Outbound = {
2746
+ inviteId: string;
2747
+ };
2748
+
2749
+ /** @internal */
2750
+ export const DeleteWorkspaceInviteRequest$outboundSchema: z.ZodMiniType<
2751
+ DeleteWorkspaceInviteRequest$Outbound,
2752
+ DeleteWorkspaceInviteRequest
2753
+ > = z.object({
2754
+ inviteId: z.string(),
2755
+ });
2756
+
2757
+ export function deleteWorkspaceInviteRequestToJSON(
2758
+ deleteWorkspaceInviteRequest: DeleteWorkspaceInviteRequest,
2759
+ ): string {
2760
+ return JSON.stringify(
2761
+ DeleteWorkspaceInviteRequest$outboundSchema.parse(
2762
+ deleteWorkspaceInviteRequest,
2763
+ ),
2764
+ );
2765
+ }
2766
+
2767
+ /** @internal */
2768
+ export const DeleteWorkspaceInviteResponse$inboundSchema: z.ZodMiniType<
2769
+ DeleteWorkspaceInviteResponse,
2770
+ unknown
2771
+ > = z.object({
2772
+ success: types.literal(true),
2773
+ });
2774
+
2775
+ export function deleteWorkspaceInviteResponseFromJSON(
2776
+ jsonString: string,
2777
+ ): SafeParseResult<DeleteWorkspaceInviteResponse, SDKValidationError> {
2778
+ return safeParse(
2779
+ jsonString,
2780
+ (x) => DeleteWorkspaceInviteResponse$inboundSchema.parse(JSON.parse(x)),
2781
+ `Failed to parse 'DeleteWorkspaceInviteResponse' from JSON`,
2782
+ );
2783
+ }