@rox-one/sdk 0.0.0-stage → 0.7.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 (482) hide show
  1. package/CALLS.md +82 -0
  2. package/README.md +1259 -2
  3. package/dist/chunk-AOHK5YXC.js +5585 -0
  4. package/dist/chunk-CATFKTFD.js +80 -0
  5. package/dist/chunk-FQGPXWPJ.js +1491 -0
  6. package/dist/chunk-G43PLP2U.js +1087 -0
  7. package/dist/chunk-LMJW65ML.js +836 -0
  8. package/dist/chunk-MCSQNZ4E.js +836 -0
  9. package/dist/chunk-NSJ3GKUC.js +1552 -0
  10. package/dist/chunk-OGFKJOK7.js +2068 -0
  11. package/dist/chunk-RDEJZJBZ.js +1351 -0
  12. package/dist/chunk-TMTYN2UK.js +1128 -0
  13. package/dist/chunk-V45LUJDI.js +838 -0
  14. package/dist/chunk-YRUXFEZM.js +1044 -0
  15. package/dist/chunk-ZYBAKW25.js +994 -0
  16. package/dist/generated/agent-fold/index.d.ts +4520 -0
  17. package/dist/generated/agent-fold/index.js +0 -0
  18. package/dist/generated/agent-harness/client/client.gen.d.ts +2 -0
  19. package/dist/generated/agent-harness/client/index.d.ts +10 -0
  20. package/dist/generated/agent-harness/client/types.gen.d.ts +120 -0
  21. package/dist/generated/agent-harness/client/utils.gen.d.ts +37 -0
  22. package/dist/generated/agent-harness/client.gen.d.ts +12 -0
  23. package/dist/generated/agent-harness/core/auth.gen.d.ts +25 -0
  24. package/dist/generated/agent-harness/core/bodySerializer.gen.d.ts +25 -0
  25. package/dist/generated/agent-harness/core/params.gen.d.ts +43 -0
  26. package/dist/generated/agent-harness/core/pathSerializer.gen.d.ts +33 -0
  27. package/dist/generated/agent-harness/core/queryKeySerializer.gen.d.ts +18 -0
  28. package/dist/generated/agent-harness/core/serverSentEvents.gen.d.ts +71 -0
  29. package/dist/generated/agent-harness/core/types.gen.d.ts +83 -0
  30. package/dist/generated/agent-harness/core/utils.gen.d.ts +19 -0
  31. package/dist/generated/agent-harness/index.d.ts +2 -0
  32. package/dist/generated/agent-harness/index.js +6 -0
  33. package/dist/generated/agent-harness/sdk.gen.d.ts +375 -0
  34. package/dist/generated/agent-harness/types.gen.d.ts +4725 -0
  35. package/dist/generated/agent-reviews/index.d.ts +895 -0
  36. package/dist/generated/agent-reviews/index.js +0 -0
  37. package/dist/generated/auth/client/client.gen.d.ts +2 -0
  38. package/dist/generated/auth/client/index.d.ts +10 -0
  39. package/dist/generated/auth/client/types.gen.d.ts +120 -0
  40. package/dist/generated/auth/client/utils.gen.d.ts +37 -0
  41. package/dist/generated/auth/client.gen.d.ts +12 -0
  42. package/dist/generated/auth/core/auth.gen.d.ts +25 -0
  43. package/dist/generated/auth/core/bodySerializer.gen.d.ts +25 -0
  44. package/dist/generated/auth/core/params.gen.d.ts +43 -0
  45. package/dist/generated/auth/core/pathSerializer.gen.d.ts +33 -0
  46. package/dist/generated/auth/core/queryKeySerializer.gen.d.ts +18 -0
  47. package/dist/generated/auth/core/serverSentEvents.gen.d.ts +71 -0
  48. package/dist/generated/auth/core/types.gen.d.ts +83 -0
  49. package/dist/generated/auth/core/utils.gen.d.ts +19 -0
  50. package/dist/generated/auth/index.d.ts +2 -0
  51. package/dist/generated/auth/index.js +6 -0
  52. package/dist/generated/auth/sdk.gen.d.ts +674 -0
  53. package/dist/generated/auth/types.gen.d.ts +5233 -0
  54. package/dist/generated/calendar/client/client.gen.d.ts +2 -0
  55. package/dist/generated/calendar/client/index.d.ts +10 -0
  56. package/dist/generated/calendar/client/types.gen.d.ts +120 -0
  57. package/dist/generated/calendar/client/utils.gen.d.ts +37 -0
  58. package/dist/generated/calendar/client.gen.d.ts +12 -0
  59. package/dist/generated/calendar/core/auth.gen.d.ts +25 -0
  60. package/dist/generated/calendar/core/bodySerializer.gen.d.ts +25 -0
  61. package/dist/generated/calendar/core/params.gen.d.ts +43 -0
  62. package/dist/generated/calendar/core/pathSerializer.gen.d.ts +33 -0
  63. package/dist/generated/calendar/core/queryKeySerializer.gen.d.ts +18 -0
  64. package/dist/generated/calendar/core/serverSentEvents.gen.d.ts +71 -0
  65. package/dist/generated/calendar/core/types.gen.d.ts +83 -0
  66. package/dist/generated/calendar/core/utils.gen.d.ts +19 -0
  67. package/dist/generated/calendar/index.d.ts +2 -0
  68. package/dist/generated/calendar/index.js +6 -0
  69. package/dist/generated/calendar/sdk.gen.d.ts +157 -0
  70. package/dist/generated/calendar/types.gen.d.ts +2333 -0
  71. package/dist/generated/cognition/client/client.gen.d.ts +2 -0
  72. package/dist/generated/cognition/client/index.d.ts +10 -0
  73. package/dist/generated/cognition/client/types.gen.d.ts +120 -0
  74. package/dist/generated/cognition/client/utils.gen.d.ts +37 -0
  75. package/dist/generated/cognition/client.gen.d.ts +12 -0
  76. package/dist/generated/cognition/core/auth.gen.d.ts +25 -0
  77. package/dist/generated/cognition/core/bodySerializer.gen.d.ts +25 -0
  78. package/dist/generated/cognition/core/params.gen.d.ts +43 -0
  79. package/dist/generated/cognition/core/pathSerializer.gen.d.ts +33 -0
  80. package/dist/generated/cognition/core/queryKeySerializer.gen.d.ts +18 -0
  81. package/dist/generated/cognition/core/serverSentEvents.gen.d.ts +71 -0
  82. package/dist/generated/cognition/core/types.gen.d.ts +83 -0
  83. package/dist/generated/cognition/core/utils.gen.d.ts +19 -0
  84. package/dist/generated/cognition/index.d.ts +2 -0
  85. package/dist/generated/cognition/index.js +6 -0
  86. package/dist/generated/cognition/sdk.gen.d.ts +348 -0
  87. package/dist/generated/cognition/types.gen.d.ts +4228 -0
  88. package/dist/generated/connection/client/client.gen.d.ts +2 -0
  89. package/dist/generated/connection/client/index.d.ts +10 -0
  90. package/dist/generated/connection/client/types.gen.d.ts +120 -0
  91. package/dist/generated/connection/client/utils.gen.d.ts +37 -0
  92. package/dist/generated/connection/client.gen.d.ts +12 -0
  93. package/dist/generated/connection/core/auth.gen.d.ts +25 -0
  94. package/dist/generated/connection/core/bodySerializer.gen.d.ts +25 -0
  95. package/dist/generated/connection/core/params.gen.d.ts +43 -0
  96. package/dist/generated/connection/core/pathSerializer.gen.d.ts +33 -0
  97. package/dist/generated/connection/core/queryKeySerializer.gen.d.ts +18 -0
  98. package/dist/generated/connection/core/serverSentEvents.gen.d.ts +71 -0
  99. package/dist/generated/connection/core/types.gen.d.ts +83 -0
  100. package/dist/generated/connection/core/utils.gen.d.ts +19 -0
  101. package/dist/generated/connection/index.d.ts +2 -0
  102. package/dist/generated/connection/index.js +854 -0
  103. package/dist/generated/connection/sdk.gen.d.ts +43 -0
  104. package/dist/generated/connection/types.gen.d.ts +252 -0
  105. package/dist/generated/contacts/client/client.gen.d.ts +2 -0
  106. package/dist/generated/contacts/client/index.d.ts +10 -0
  107. package/dist/generated/contacts/client/types.gen.d.ts +120 -0
  108. package/dist/generated/contacts/client/utils.gen.d.ts +37 -0
  109. package/dist/generated/contacts/client.gen.d.ts +12 -0
  110. package/dist/generated/contacts/core/auth.gen.d.ts +25 -0
  111. package/dist/generated/contacts/core/bodySerializer.gen.d.ts +25 -0
  112. package/dist/generated/contacts/core/params.gen.d.ts +43 -0
  113. package/dist/generated/contacts/core/pathSerializer.gen.d.ts +33 -0
  114. package/dist/generated/contacts/core/queryKeySerializer.gen.d.ts +18 -0
  115. package/dist/generated/contacts/core/serverSentEvents.gen.d.ts +71 -0
  116. package/dist/generated/contacts/core/types.gen.d.ts +83 -0
  117. package/dist/generated/contacts/core/utils.gen.d.ts +19 -0
  118. package/dist/generated/contacts/index.d.ts +2 -0
  119. package/dist/generated/contacts/index.js +6 -0
  120. package/dist/generated/contacts/sdk.gen.d.ts +47 -0
  121. package/dist/generated/contacts/types.gen.d.ts +108 -0
  122. package/dist/generated/email/client/client.gen.d.ts +2 -0
  123. package/dist/generated/email/client/index.d.ts +10 -0
  124. package/dist/generated/email/client/types.gen.d.ts +120 -0
  125. package/dist/generated/email/client/utils.gen.d.ts +37 -0
  126. package/dist/generated/email/client.gen.d.ts +12 -0
  127. package/dist/generated/email/core/auth.gen.d.ts +25 -0
  128. package/dist/generated/email/core/bodySerializer.gen.d.ts +25 -0
  129. package/dist/generated/email/core/params.gen.d.ts +43 -0
  130. package/dist/generated/email/core/pathSerializer.gen.d.ts +33 -0
  131. package/dist/generated/email/core/queryKeySerializer.gen.d.ts +18 -0
  132. package/dist/generated/email/core/serverSentEvents.gen.d.ts +71 -0
  133. package/dist/generated/email/core/types.gen.d.ts +83 -0
  134. package/dist/generated/email/core/utils.gen.d.ts +19 -0
  135. package/dist/generated/email/index.d.ts +2 -0
  136. package/dist/generated/email/index.js +6 -0
  137. package/dist/generated/email/sdk.gen.d.ts +301 -0
  138. package/dist/generated/email/types.gen.d.ts +3262 -0
  139. package/dist/generated/notification/client/client.gen.d.ts +2 -0
  140. package/dist/generated/notification/client/index.d.ts +10 -0
  141. package/dist/generated/notification/client/types.gen.d.ts +120 -0
  142. package/dist/generated/notification/client/utils.gen.d.ts +37 -0
  143. package/dist/generated/notification/client.gen.d.ts +12 -0
  144. package/dist/generated/notification/core/auth.gen.d.ts +25 -0
  145. package/dist/generated/notification/core/bodySerializer.gen.d.ts +25 -0
  146. package/dist/generated/notification/core/params.gen.d.ts +43 -0
  147. package/dist/generated/notification/core/pathSerializer.gen.d.ts +33 -0
  148. package/dist/generated/notification/core/queryKeySerializer.gen.d.ts +18 -0
  149. package/dist/generated/notification/core/serverSentEvents.gen.d.ts +71 -0
  150. package/dist/generated/notification/core/types.gen.d.ts +83 -0
  151. package/dist/generated/notification/core/utils.gen.d.ts +19 -0
  152. package/dist/generated/notification/index.d.ts +2 -0
  153. package/dist/generated/notification/index.js +6 -0
  154. package/dist/generated/notification/sdk.gen.d.ts +127 -0
  155. package/dist/generated/notification/types.gen.d.ts +2084 -0
  156. package/dist/generated/properties/client/client.gen.d.ts +2 -0
  157. package/dist/generated/properties/client/index.d.ts +10 -0
  158. package/dist/generated/properties/client/types.gen.d.ts +120 -0
  159. package/dist/generated/properties/client/utils.gen.d.ts +37 -0
  160. package/dist/generated/properties/client.gen.d.ts +12 -0
  161. package/dist/generated/properties/core/auth.gen.d.ts +25 -0
  162. package/dist/generated/properties/core/bodySerializer.gen.d.ts +25 -0
  163. package/dist/generated/properties/core/params.gen.d.ts +43 -0
  164. package/dist/generated/properties/core/pathSerializer.gen.d.ts +33 -0
  165. package/dist/generated/properties/core/queryKeySerializer.gen.d.ts +18 -0
  166. package/dist/generated/properties/core/serverSentEvents.gen.d.ts +71 -0
  167. package/dist/generated/properties/core/types.gen.d.ts +83 -0
  168. package/dist/generated/properties/core/utils.gen.d.ts +19 -0
  169. package/dist/generated/properties/index.d.ts +2 -0
  170. package/dist/generated/properties/index.js +6 -0
  171. package/dist/generated/properties/sdk.gen.d.ts +158 -0
  172. package/dist/generated/properties/types.gen.d.ts +1311 -0
  173. package/dist/generated/scheduled-action/client/client.gen.d.ts +2 -0
  174. package/dist/generated/scheduled-action/client/index.d.ts +10 -0
  175. package/dist/generated/scheduled-action/client/types.gen.d.ts +120 -0
  176. package/dist/generated/scheduled-action/client/utils.gen.d.ts +37 -0
  177. package/dist/generated/scheduled-action/client.gen.d.ts +12 -0
  178. package/dist/generated/scheduled-action/core/auth.gen.d.ts +25 -0
  179. package/dist/generated/scheduled-action/core/bodySerializer.gen.d.ts +25 -0
  180. package/dist/generated/scheduled-action/core/params.gen.d.ts +43 -0
  181. package/dist/generated/scheduled-action/core/pathSerializer.gen.d.ts +33 -0
  182. package/dist/generated/scheduled-action/core/queryKeySerializer.gen.d.ts +18 -0
  183. package/dist/generated/scheduled-action/core/serverSentEvents.gen.d.ts +71 -0
  184. package/dist/generated/scheduled-action/core/types.gen.d.ts +83 -0
  185. package/dist/generated/scheduled-action/core/utils.gen.d.ts +19 -0
  186. package/dist/generated/scheduled-action/index.d.ts +2 -0
  187. package/dist/generated/scheduled-action/index.js +6 -0
  188. package/dist/generated/scheduled-action/sdk.gen.d.ts +156 -0
  189. package/dist/generated/scheduled-action/types.gen.d.ts +3099 -0
  190. package/dist/generated/search/client/client.gen.d.ts +2 -0
  191. package/dist/generated/search/client/index.d.ts +10 -0
  192. package/dist/generated/search/client/types.gen.d.ts +120 -0
  193. package/dist/generated/search/client/utils.gen.d.ts +37 -0
  194. package/dist/generated/search/client.gen.d.ts +12 -0
  195. package/dist/generated/search/core/auth.gen.d.ts +25 -0
  196. package/dist/generated/search/core/bodySerializer.gen.d.ts +25 -0
  197. package/dist/generated/search/core/params.gen.d.ts +43 -0
  198. package/dist/generated/search/core/pathSerializer.gen.d.ts +33 -0
  199. package/dist/generated/search/core/queryKeySerializer.gen.d.ts +18 -0
  200. package/dist/generated/search/core/serverSentEvents.gen.d.ts +71 -0
  201. package/dist/generated/search/core/types.gen.d.ts +83 -0
  202. package/dist/generated/search/core/utils.gen.d.ts +19 -0
  203. package/dist/generated/search/index.d.ts +2 -0
  204. package/dist/generated/search/index.js +6 -0
  205. package/dist/generated/search/sdk.gen.d.ts +44 -0
  206. package/dist/generated/search/types.gen.d.ts +2532 -0
  207. package/dist/generated/static-files/client/client.gen.d.ts +2 -0
  208. package/dist/generated/static-files/client/index.d.ts +10 -0
  209. package/dist/generated/static-files/client/types.gen.d.ts +120 -0
  210. package/dist/generated/static-files/client/utils.gen.d.ts +37 -0
  211. package/dist/generated/static-files/client.gen.d.ts +12 -0
  212. package/dist/generated/static-files/core/auth.gen.d.ts +25 -0
  213. package/dist/generated/static-files/core/bodySerializer.gen.d.ts +25 -0
  214. package/dist/generated/static-files/core/params.gen.d.ts +43 -0
  215. package/dist/generated/static-files/core/pathSerializer.gen.d.ts +33 -0
  216. package/dist/generated/static-files/core/queryKeySerializer.gen.d.ts +18 -0
  217. package/dist/generated/static-files/core/serverSentEvents.gen.d.ts +71 -0
  218. package/dist/generated/static-files/core/types.gen.d.ts +83 -0
  219. package/dist/generated/static-files/core/utils.gen.d.ts +19 -0
  220. package/dist/generated/static-files/index.d.ts +2 -0
  221. package/dist/generated/static-files/index.js +842 -0
  222. package/dist/generated/static-files/sdk.gen.d.ts +43 -0
  223. package/dist/generated/static-files/types.gen.d.ts +220 -0
  224. package/dist/generated/storage/client/client.gen.d.ts +2 -0
  225. package/dist/generated/storage/client/index.d.ts +10 -0
  226. package/dist/generated/storage/client/types.gen.d.ts +120 -0
  227. package/dist/generated/storage/client/utils.gen.d.ts +37 -0
  228. package/dist/generated/storage/client.gen.d.ts +12 -0
  229. package/dist/generated/storage/core/auth.gen.d.ts +25 -0
  230. package/dist/generated/storage/core/bodySerializer.gen.d.ts +25 -0
  231. package/dist/generated/storage/core/params.gen.d.ts +43 -0
  232. package/dist/generated/storage/core/pathSerializer.gen.d.ts +33 -0
  233. package/dist/generated/storage/core/queryKeySerializer.gen.d.ts +18 -0
  234. package/dist/generated/storage/core/serverSentEvents.gen.d.ts +71 -0
  235. package/dist/generated/storage/core/types.gen.d.ts +83 -0
  236. package/dist/generated/storage/core/utils.gen.d.ts +19 -0
  237. package/dist/generated/storage/index.d.ts +2 -0
  238. package/dist/generated/storage/index.js +6 -0
  239. package/dist/generated/storage/sdk.gen.d.ts +2285 -0
  240. package/dist/generated/storage/types.gen.d.ts +34546 -0
  241. package/dist/generated/unfurl/client/client.gen.d.ts +2 -0
  242. package/dist/generated/unfurl/client/index.d.ts +10 -0
  243. package/dist/generated/unfurl/client/types.gen.d.ts +120 -0
  244. package/dist/generated/unfurl/client/utils.gen.d.ts +37 -0
  245. package/dist/generated/unfurl/client.gen.d.ts +12 -0
  246. package/dist/generated/unfurl/core/auth.gen.d.ts +25 -0
  247. package/dist/generated/unfurl/core/bodySerializer.gen.d.ts +25 -0
  248. package/dist/generated/unfurl/core/params.gen.d.ts +43 -0
  249. package/dist/generated/unfurl/core/pathSerializer.gen.d.ts +33 -0
  250. package/dist/generated/unfurl/core/queryKeySerializer.gen.d.ts +18 -0
  251. package/dist/generated/unfurl/core/serverSentEvents.gen.d.ts +71 -0
  252. package/dist/generated/unfurl/core/types.gen.d.ts +83 -0
  253. package/dist/generated/unfurl/core/utils.gen.d.ts +19 -0
  254. package/dist/generated/unfurl/index.d.ts +2 -0
  255. package/dist/generated/unfurl/index.js +6 -0
  256. package/dist/generated/unfurl/sdk.gen.d.ts +47 -0
  257. package/dist/generated/unfurl/types.gen.d.ts +145 -0
  258. package/dist/src/calls/browser.d.ts +14 -0
  259. package/dist/src/calls/browser.js +102 -0
  260. package/dist/src/calls/common.d.ts +18 -0
  261. package/dist/src/calls/node.d.ts +24 -0
  262. package/dist/src/calls/node.js +145 -0
  263. package/dist/src/calls/telemetry.d.ts +5 -0
  264. package/dist/src/config.d.ts +71 -0
  265. package/dist/src/entities/account-managers/grant.d.ts +62 -0
  266. package/dist/src/entities/account-managers/namespace.d.ts +29 -0
  267. package/dist/src/entities/activity/entity.d.ts +7 -0
  268. package/dist/src/entities/activity/namespace.d.ts +58 -0
  269. package/dist/src/entities/activity/namespace.test.d.ts +1 -0
  270. package/dist/src/entities/agent-sessions/activity.d.ts +48 -0
  271. package/dist/src/entities/agent-sessions/agent-session.d.ts +518 -0
  272. package/dist/src/entities/agent-sessions/code-execution.d.ts +60 -0
  273. package/dist/src/entities/agent-sessions/conversation.d.ts +91 -0
  274. package/dist/src/entities/agent-sessions/namespace.d.ts +142 -0
  275. package/dist/src/entities/agent-sessions/origin.d.ts +94 -0
  276. package/dist/src/entities/agent-sessions/queued-action.d.ts +60 -0
  277. package/dist/src/entities/agent-sessions/review.d.ts +114 -0
  278. package/dist/src/entities/agent-sessions/tool-approval.d.ts +25 -0
  279. package/dist/src/entities/agent-sessions/view.d.ts +11 -0
  280. package/dist/src/entities/agents/agent.d.ts +142 -0
  281. package/dist/src/entities/agents/namespace.d.ts +66 -0
  282. package/dist/src/entities/ai/namespace.d.ts +36 -0
  283. package/dist/src/entities/api-keys/api-key.d.ts +22 -0
  284. package/dist/src/entities/api-keys/namespace.d.ts +37 -0
  285. package/dist/src/entities/bots/bot.d.ts +143 -0
  286. package/dist/src/entities/bots/namespace.d.ts +50 -0
  287. package/dist/src/entities/bots/token.d.ts +39 -0
  288. package/dist/src/entities/calendar/booking-link.d.ts +55 -0
  289. package/dist/src/entities/calendar/booking-namespace.d.ts +143 -0
  290. package/dist/src/entities/calendar/booking-namespace.test.d.ts +1 -0
  291. package/dist/src/entities/calendar/booking.d.ts +97 -0
  292. package/dist/src/entities/calendar/calendar.d.ts +49 -0
  293. package/dist/src/entities/calendar/create-confirmed.test.d.ts +1 -0
  294. package/dist/src/entities/calendar/event.d.ts +283 -0
  295. package/dist/src/entities/calendar/event.test.d.ts +1 -0
  296. package/dist/src/entities/calendar/namespace.d.ts +334 -0
  297. package/dist/src/entities/calendar/namespace.test.d.ts +1 -0
  298. package/dist/src/entities/calendar/replacement.d.ts +31 -0
  299. package/dist/src/entities/calls/call-record.d.ts +231 -0
  300. package/dist/src/entities/calls/connection.d.ts +59 -0
  301. package/dist/src/entities/calls/errors.d.ts +15 -0
  302. package/dist/src/entities/calls/message.d.ts +55 -0
  303. package/dist/src/entities/calls/namespace.d.ts +41 -0
  304. package/dist/src/entities/calls/participant.d.ts +22 -0
  305. package/dist/src/entities/canvases/canvas.d.ts +329 -0
  306. package/dist/src/entities/channels/access-request.d.ts +42 -0
  307. package/dist/src/entities/channels/activity.d.ts +40 -0
  308. package/dist/src/entities/channels/channel.d.ts +302 -0
  309. package/dist/src/entities/channels/labels.d.ts +73 -0
  310. package/dist/src/entities/channels/message.d.ts +153 -0
  311. package/dist/src/entities/channels/message.test.d.ts +1 -0
  312. package/dist/src/entities/channels/namespace.d.ts +82 -0
  313. package/dist/src/entities/channels/namespace.test.d.ts +1 -0
  314. package/dist/src/entities/channels/picture.d.ts +11 -0
  315. package/dist/src/entities/channels/post.d.ts +37 -0
  316. package/dist/src/entities/channels/post.test.d.ts +1 -0
  317. package/dist/src/entities/channels/share.d.ts +9 -0
  318. package/dist/src/entities/channels/share.test.d.ts +1 -0
  319. package/dist/src/entities/channels/thread.d.ts +64 -0
  320. package/dist/src/entities/chats/chat.d.ts +121 -0
  321. package/dist/src/entities/chats/generation.d.ts +55 -0
  322. package/dist/src/entities/chats/namespace.d.ts +35 -0
  323. package/dist/src/entities/connected-apps/connected-app.d.ts +121 -0
  324. package/dist/src/entities/connected-apps/connector.d.ts +59 -0
  325. package/dist/src/entities/connected-apps/namespace.d.ts +92 -0
  326. package/dist/src/entities/crm/company.d.ts +154 -0
  327. package/dist/src/entities/crm/contact.d.ts +168 -0
  328. package/dist/src/entities/crm/namespace.d.ts +163 -0
  329. package/dist/src/entities/crm/pipeline-entry.d.ts +109 -0
  330. package/dist/src/entities/crm/pipeline.d.ts +426 -0
  331. package/dist/src/entities/crm/pipelines.d.ts +79 -0
  332. package/dist/src/entities/crm-email-privacy/email-privacy.d.ts +238 -0
  333. package/dist/src/entities/crm-email-privacy/email-rule-preview.d.ts +55 -0
  334. package/dist/src/entities/crm-email-privacy/email-rule-revision.d.ts +27 -0
  335. package/dist/src/entities/crm-email-privacy/email-rules.d.ts +32 -0
  336. package/dist/src/entities/databases/column.d.ts +122 -0
  337. package/dist/src/entities/databases/database.d.ts +431 -0
  338. package/dist/src/entities/databases/namespace.d.ts +109 -0
  339. package/dist/src/entities/databases/query.d.ts +86 -0
  340. package/dist/src/entities/databases/row.d.ts +29 -0
  341. package/dist/src/entities/databases/saved-query.d.ts +151 -0
  342. package/dist/src/entities/databases/table.d.ts +124 -0
  343. package/dist/src/entities/databases/view.d.ts +72 -0
  344. package/dist/src/entities/databases/webhook.d.ts +39 -0
  345. package/dist/src/entities/documents/ai-edit.d.ts +54 -0
  346. package/dist/src/entities/documents/anchor.d.ts +39 -0
  347. package/dist/src/entities/documents/comment.d.ts +68 -0
  348. package/dist/src/entities/documents/create.test.d.ts +1 -0
  349. package/dist/src/entities/documents/document.d.ts +675 -0
  350. package/dist/src/entities/documents/markdown.d.ts +25 -0
  351. package/dist/src/entities/documents/namespace.d.ts +291 -0
  352. package/dist/src/entities/documents/office-files.d.ts +47 -0
  353. package/dist/src/entities/documents/skills.test.d.ts +1 -0
  354. package/dist/src/entities/documents/system-skill.d.ts +36 -0
  355. package/dist/src/entities/documents/text-comment.d.ts +41 -0
  356. package/dist/src/entities/documents/text-comment.test.d.ts +1 -0
  357. package/dist/src/entities/documents/version.d.ts +26 -0
  358. package/dist/src/entities/email/attachment.d.ts +39 -0
  359. package/dist/src/entities/email/draft.d.ts +160 -0
  360. package/dist/src/entities/email/filter.d.ts +44 -0
  361. package/dist/src/entities/email/label.d.ts +37 -0
  362. package/dist/src/entities/email/link.d.ts +35 -0
  363. package/dist/src/entities/email/message.d.ts +223 -0
  364. package/dist/src/entities/email/namespace.d.ts +235 -0
  365. package/dist/src/entities/email/namespace.test.d.ts +1 -0
  366. package/dist/src/entities/email/thread.d.ts +268 -0
  367. package/dist/src/entities/entity-mentions/mention.d.ts +21 -0
  368. package/dist/src/entities/entity-mentions/namespace.d.ts +20 -0
  369. package/dist/src/entities/entity.d.ts +167 -0
  370. package/dist/src/entities/external-chat/chat.d.ts +173 -0
  371. package/dist/src/entities/external-chat/message.d.ts +54 -0
  372. package/dist/src/entities/external-chat/namespace.d.ts +22 -0
  373. package/dist/src/entities/external-chat/participant.d.ts +28 -0
  374. package/dist/src/entities/external-chat/send.d.ts +40 -0
  375. package/dist/src/entities/external-chat/upload.d.ts +25 -0
  376. package/dist/src/entities/favorites/namespace.d.ts +52 -0
  377. package/dist/src/entities/foreign/foreign-entity.d.ts +36 -0
  378. package/dist/src/entities/foreign/namespace.d.ts +54 -0
  379. package/dist/src/entities/forms/form.d.ts +319 -0
  380. package/dist/src/entities/forms/namespace.d.ts +30 -0
  381. package/dist/src/entities/forms/question.d.ts +65 -0
  382. package/dist/src/entities/forms/response.d.ts +52 -0
  383. package/dist/src/entities/forms/section.d.ts +31 -0
  384. package/dist/src/entities/github-pull-requests/namespace.d.ts +20 -0
  385. package/dist/src/entities/github-pull-requests/pull-request.d.ts +64 -0
  386. package/dist/src/entities/harnesses/harness.d.ts +76 -0
  387. package/dist/src/entities/harnesses/namespace.d.ts +83 -0
  388. package/dist/src/entities/harnesses/pairing.d.ts +50 -0
  389. package/dist/src/entities/images/image.d.ts +88 -0
  390. package/dist/src/entities/images/namespace.d.ts +55 -0
  391. package/dist/src/entities/images/namespace.test.d.ts +1 -0
  392. package/dist/src/entities/imports/entry.d.ts +65 -0
  393. package/dist/src/entities/imports/namespace.d.ts +103 -0
  394. package/dist/src/entities/imports/namespace.test.d.ts +1 -0
  395. package/dist/src/entities/initiatives/initiative.d.ts +185 -0
  396. package/dist/src/entities/initiatives/initiative.test.d.ts +1 -0
  397. package/dist/src/entities/initiatives/namespace.d.ts +90 -0
  398. package/dist/src/entities/me/namespace.d.ts +68 -0
  399. package/dist/src/entities/meetings/meeting.d.ts +81 -0
  400. package/dist/src/entities/meetings/namespace.d.ts +38 -0
  401. package/dist/src/entities/memory/namespace.d.ts +49 -0
  402. package/dist/src/entities/memory/namespace.test.d.ts +1 -0
  403. package/dist/src/entities/messages/discussion.d.ts +84 -0
  404. package/dist/src/entities/messages/thread.d.ts +115 -0
  405. package/dist/src/entities/notifications/namespace.d.ts +66 -0
  406. package/dist/src/entities/notifications/notification.d.ts +78 -0
  407. package/dist/src/entities/notifications/notification.test.d.ts +1 -0
  408. package/dist/src/entities/passwords/item.d.ts +118 -0
  409. package/dist/src/entities/passwords/namespace.d.ts +45 -0
  410. package/dist/src/entities/pins/namespace.d.ts +42 -0
  411. package/dist/src/entities/projects/namespace.d.ts +45 -0
  412. package/dist/src/entities/projects/project.d.ts +108 -0
  413. package/dist/src/entities/properties/namespace.d.ts +105 -0
  414. package/dist/src/entities/properties/namespace.test.d.ts +1 -0
  415. package/dist/src/entities/properties/property-definition.d.ts +70 -0
  416. package/dist/src/entities/properties/property-option.d.ts +44 -0
  417. package/dist/src/entities/reference.d.ts +82 -0
  418. package/dist/src/entities/referrals/namespace.d.ts +40 -0
  419. package/dist/src/entities/routines/namespace.d.ts +239 -0
  420. package/dist/src/entities/routines/routine.d.ts +341 -0
  421. package/dist/src/entities/routines/suggestion.d.ts +38 -0
  422. package/dist/src/entities/saved-views/namespace.d.ts +58 -0
  423. package/dist/src/entities/saved-views/saved-view.d.ts +78 -0
  424. package/dist/src/entities/search/exclusions.d.ts +6 -0
  425. package/dist/src/entities/search/namespace.d.ts +71 -0
  426. package/dist/src/entities/search/options.d.ts +30 -0
  427. package/dist/src/entities/search/types.d.ts +90 -0
  428. package/dist/src/entities/sharing/access.d.ts +120 -0
  429. package/dist/src/entities/sharing/permissions.d.ts +13 -0
  430. package/dist/src/entities/spreadsheets/spreadsheet.d.ts +201 -0
  431. package/dist/src/entities/suggestions/namespace.d.ts +118 -0
  432. package/dist/src/entities/suggestions/suggestion.d.ts +172 -0
  433. package/dist/src/entities/suggestions/suggestion.test.d.ts +1 -0
  434. package/dist/src/entities/tasks/namespace.d.ts +77 -0
  435. package/dist/src/entities/tasks/task.d.ts +99 -0
  436. package/dist/src/entities/teams/invite.d.ts +33 -0
  437. package/dist/src/entities/teams/namespace.d.ts +23 -0
  438. package/dist/src/entities/teams/team.d.ts +129 -0
  439. package/dist/src/entities/ui/app-link.d.ts +24 -0
  440. package/dist/src/entities/ui/namespace.d.ts +75 -0
  441. package/dist/src/entities/unfurls/namespace.d.ts +24 -0
  442. package/dist/src/entities/users/namespace.d.ts +41 -0
  443. package/dist/src/entities/users/profile-picture.d.ts +29 -0
  444. package/dist/src/entities/users/profile-picture.test.d.ts +1 -0
  445. package/dist/src/entities/users/user.d.ts +102 -0
  446. package/dist/src/entities/web/namespace.d.ts +67 -0
  447. package/dist/src/entities/web/namespace.test.d.ts +1 -0
  448. package/dist/src/entities/webhooks/namespace.d.ts +38 -0
  449. package/dist/src/entities/webhooks/webhook.d.ts +130 -0
  450. package/dist/src/entities/whatsapp/account.d.ts +24 -0
  451. package/dist/src/entities/whatsapp/chat.d.ts +62 -0
  452. package/dist/src/entities/whatsapp/namespace.d.ts +29 -0
  453. package/dist/src/entities/workspace/items.d.ts +14 -0
  454. package/dist/src/entities/workspace/namespace.d.ts +96 -0
  455. package/dist/src/entities/workspace/query.d.ts +39 -0
  456. package/dist/src/entities/workspace/query.test.d.ts +1 -0
  457. package/dist/src/entities/workspace/types.d.ts +99 -0
  458. package/dist/src/events/hydrate/agentSession.d.ts +192 -0
  459. package/dist/src/events/hydrate/call.d.ts +101 -0
  460. package/dist/src/events/hydrate/channel.d.ts +55 -0
  461. package/dist/src/events/hydrate/document.d.ts +59 -0
  462. package/dist/src/events/hydrate/message.d.ts +70 -0
  463. package/dist/src/events/hydrate/user.d.ts +14 -0
  464. package/dist/src/events/receiver.d.ts +91 -0
  465. package/dist/src/events/types.d.ts +44 -0
  466. package/dist/src/events/verify.d.ts +13 -0
  467. package/dist/src/local-portmap.d.ts +8 -0
  468. package/dist/src/mentions.d.ts +42 -0
  469. package/dist/src/raw.d.ts +12 -0
  470. package/dist/src/rox.d.ts +267 -0
  471. package/dist/src/rox.js +23217 -0
  472. package/dist/src/utils/activity.d.ts +34 -0
  473. package/dist/src/utils/activity.test.d.ts +1 -0
  474. package/dist/src/utils/client.d.ts +62 -0
  475. package/dist/src/utils/concurrency.d.ts +5 -0
  476. package/dist/src/utils/index.d.ts +5 -0
  477. package/dist/src/utils/lazy.d.ts +37 -0
  478. package/dist/src/utils/options.d.ts +7 -0
  479. package/dist/src/utils/pagination.d.ts +28 -0
  480. package/dist/src/utils/unwrap.d.ts +48 -0
  481. package/dist/src/utils/verbs.d.ts +3 -0
  482. package/package.json +82 -4
@@ -0,0 +1,154 @@
1
+ import type { GetCompanyResponses } from '../../../generated/storage/types.gen';
2
+ import type { RichMessage } from '../../mentions';
3
+ import type { RoxClient } from '../../utils/client';
4
+ import { PropertiedEntity } from '../entity';
5
+ import { DiscussionComment, type DiscussionThread } from '../messages/discussion';
6
+ import { MessageThread, type TimelineOptions } from '../messages/thread';
7
+ import { Team } from '../teams/team';
8
+ import { Contact } from './contact';
9
+ type CompanyDetail = GetCompanyResponses[200];
10
+ /** A CRM company: an organization the team has interacted with. */
11
+ export declare class Company extends PropertiedEntity<CompanyDetail> {
12
+ /**
13
+ * A shared message thread scoped to this resource.
14
+ *
15
+ * @readonly
16
+ */
17
+ messageThreadById(id: string): MessageThread;
18
+ /**
19
+ * A mixed message and activity timeline page.
20
+ *
21
+ * @readonly
22
+ */
23
+ timelinePage(selection?: TimelineOptions<DiscussionComment>): Promise<{
24
+ entries: ({
25
+ type: "activity";
26
+ activity: {
27
+ actor: import("../users/user").User;
28
+ action: string;
29
+ actor_id: string;
30
+ id: string;
31
+ occurred_at: string;
32
+ payload?: unknown;
33
+ };
34
+ message?: undefined;
35
+ } | {
36
+ type: "message";
37
+ message: DiscussionComment;
38
+ activity?: undefined;
39
+ })[];
40
+ nextCursor: import("../../../generated/storage").MessageCursor | undefined;
41
+ previousCursor: import("../../../generated/storage").MessageCursor | undefined;
42
+ }>;
43
+ /** Favorites identify CRM companies as `crm_company`. */
44
+ readonly entityType = "crm_company";
45
+ /** The properties service identifies CRM companies as `COMPANY`. */
46
+ protected readonly propertyEntityType = "COMPANY";
47
+ protected fetch(): Promise<CompanyDetail>;
48
+ /** A handle to a CRM company by id. Details load on first access. */
49
+ static byId(client: RoxClient, id: string): Company;
50
+ /** Build a company from an API record (pre-seeded, no fetch). */
51
+ static from(client: RoxClient, data: CompanyDetail): Company;
52
+ /** The company's display name, if resolved. */
53
+ readonly name: () => Promise<string | undefined>;
54
+ /** The company's display description, if any. */
55
+ readonly description: () => Promise<string | undefined>;
56
+ /** Whether the company is hidden from CRM listings. */
57
+ readonly hidden: () => Promise<boolean>;
58
+ /** Whether email sync is enabled for this company. */
59
+ readonly emailSync: () => Promise<boolean>;
60
+ /** The team that owns this company. */
61
+ readonly team: () => Promise<Team>;
62
+ /** When the company was first created in the CRM. */
63
+ readonly createdAt: () => Promise<string>;
64
+ /** When the company was last updated. */
65
+ readonly updatedAt: () => Promise<string>;
66
+ /**
67
+ * The company's primary domain (e.g. `acme.com`), if any.
68
+ *
69
+ * @readonly
70
+ */
71
+ domain(): Promise<string | undefined>;
72
+ /**
73
+ * All domains associated with the company, primary first.
74
+ *
75
+ * @readonly
76
+ */
77
+ domains(): Promise<string[]>;
78
+ /**
79
+ * The contacts attached to this company (hidden ones filtered for non-admins).
80
+ *
81
+ * @readonly
82
+ */
83
+ contacts(): Promise<Contact[]>;
84
+ /** Search CRM companies by name/domain, most relevant first, auto-paginated; `maxItems` caps the total. */
85
+ static search: (client: RoxClient, query: string, searchOpts?: import("../search/options").SearchOpts) => AsyncGenerator<Company, any, any>;
86
+ /**
87
+ * Hide the company from CRM listings: disables email sync and soft-hides
88
+ * its contacts. Reversible with {@link unhide}.
89
+ *
90
+ * @write
91
+ * @idempotent
92
+ */
93
+ hide(): Promise<void>;
94
+ /**
95
+ * Un-hide the company, restoring it and its contacts to CRM listings.
96
+ *
97
+ * @write
98
+ * @idempotent
99
+ */
100
+ unhide(): Promise<void>;
101
+ private setHidden;
102
+ /**
103
+ * Enable or disable team-wide email sync for this company. Rejects with 409
104
+ * when enabling on a hidden company — {@link unhide} first.
105
+ *
106
+ * @write
107
+ * @idempotent
108
+ */
109
+ setEmailSync(enabled: boolean): Promise<void>;
110
+ /**
111
+ * Rename the company for the caller's current team.
112
+ *
113
+ * @write
114
+ * @idempotent
115
+ */
116
+ rename(name: string): Promise<void>;
117
+ /**
118
+ * Create a contact under this company. The email is optional and need not
119
+ * match the company's domains, so personal addresses work too; omitting it
120
+ * adds the contact by name alone.
121
+ *
122
+ * @write
123
+ */
124
+ createContact(opts: {
125
+ email?: string;
126
+ name: string;
127
+ }): Promise<Contact>;
128
+ /** The CRM record this company's discussions hang off. */
129
+ private get commentParent();
130
+ /**
131
+ * The comment threads on this company, newest thread first.
132
+ *
133
+ * @readonly
134
+ */
135
+ comments(): Promise<DiscussionThread[]>;
136
+ /**
137
+ * Add a comment. Starts a new thread, or replies to an existing one when
138
+ * `threadId` (the thread's root comment id) is given.
139
+ *
140
+ * @param body - Plain text, or a rich body composed with {@link msg}.
141
+ *
142
+ * @write
143
+ */
144
+ comment(body: string | RichMessage, opts?: {
145
+ threadId?: string;
146
+ }): Promise<DiscussionComment>;
147
+ /**
148
+ * A handle to one of this company's comments by id.
149
+ *
150
+ * @readonly
151
+ */
152
+ commentById(id: string): DiscussionComment;
153
+ }
154
+ export {};
@@ -0,0 +1,168 @@
1
+ import type { GetContactResponses } from '../../../generated/storage/types.gen';
2
+ import type { RichMessage } from '../../mentions';
3
+ import type { RoxClient } from '../../utils/client';
4
+ import { FavoritableEntity } from '../entity';
5
+ import { DiscussionComment, type DiscussionThread } from '../messages/discussion';
6
+ import { MessageThread, type TimelineOptions } from '../messages/thread';
7
+ import { Company } from './company';
8
+ type ContactDetail = GetContactResponses[200];
9
+ /** A CRM contact: a person observed interacting with the team. */
10
+ export declare class Contact extends FavoritableEntity<ContactDetail> {
11
+ /**
12
+ * A shared message thread scoped to this resource.
13
+ *
14
+ * @readonly
15
+ */
16
+ messageThreadById(id: string): MessageThread;
17
+ /**
18
+ * A mixed message and activity timeline page.
19
+ *
20
+ * @readonly
21
+ */
22
+ timelinePage(selection?: TimelineOptions<DiscussionComment>): Promise<{
23
+ entries: ({
24
+ type: "activity";
25
+ activity: {
26
+ actor: import("../users/user").User;
27
+ action: string;
28
+ actor_id: string;
29
+ id: string;
30
+ occurred_at: string;
31
+ payload?: unknown;
32
+ };
33
+ message?: undefined;
34
+ } | {
35
+ type: "message";
36
+ message: DiscussionComment;
37
+ activity?: undefined;
38
+ })[];
39
+ nextCursor: import("../../../generated/storage").MessageCursor | undefined;
40
+ previousCursor: import("../../../generated/storage").MessageCursor | undefined;
41
+ }>;
42
+ /** Favorites identify CRM contacts as `crm_contact`. */
43
+ readonly entityType = "crm_contact";
44
+ protected fetch(): Promise<ContactDetail>;
45
+ /** A handle to a CRM contact by id. Details load on first access. */
46
+ static byId(client: RoxClient, id: string): Contact;
47
+ /** Build a contact from an API record (pre-seeded, no fetch). */
48
+ static from(client: RoxClient, data: ContactDetail): Contact;
49
+ /** The contact's display name, if one has been observed. */
50
+ readonly name: () => Promise<string | undefined>;
51
+ /** The contact's primary email address; absent for a contact added by name alone. */
52
+ readonly email: () => Promise<string | undefined>;
53
+ /** Every address the contact is known by: the primary first, then the rest oldest first. */
54
+ readonly emails: () => Promise<string[]>;
55
+ /**
56
+ * Whether the contact has an address on one of its company's domains. Such a
57
+ * contact cannot be unlinked from the company or moved to another.
58
+ */
59
+ readonly companyDomain: () => Promise<NonNullable<boolean | undefined>>;
60
+ /**
61
+ * The addresses on one of the company's domains. The last one cannot be
62
+ * removed while the contact is linked to the company.
63
+ */
64
+ readonly companyDomainEmails: () => Promise<string[]>;
65
+ /** The CRM company this contact belongs to, if it has one. */
66
+ readonly company: () => Promise<Company | undefined>;
67
+ /** Whether the contact is hidden from CRM listings. */
68
+ readonly hidden: () => Promise<boolean>;
69
+ /** When the contact was first created in the CRM. */
70
+ readonly createdAt: () => Promise<string>;
71
+ /** When the contact was last updated. */
72
+ readonly updatedAt: () => Promise<string>;
73
+ /** When the team first interacted with this contact. */
74
+ readonly firstInteraction: () => Promise<string>;
75
+ /** When the team last interacted with this contact. */
76
+ readonly lastInteraction: () => Promise<string>;
77
+ /**
78
+ * Hide the contact from CRM listings. Display-only; reversible with {@link unhide}.
79
+ *
80
+ * @write
81
+ * @idempotent
82
+ */
83
+ hide(): Promise<void>;
84
+ /**
85
+ * Un-hide the contact, restoring it to CRM listings.
86
+ *
87
+ * @write
88
+ * @idempotent
89
+ */
90
+ unhide(): Promise<void>;
91
+ private setHidden;
92
+ /**
93
+ * Rename the contact for the caller's current team.
94
+ *
95
+ * @write
96
+ * @idempotent
97
+ */
98
+ rename(name: string): Promise<void>;
99
+ /**
100
+ * Make an address the contact's primary, adding it when the contact does not
101
+ * hold it yet. The previous primary stays on the contact.
102
+ *
103
+ * @write
104
+ * @idempotent
105
+ */
106
+ setEmail(email: string): Promise<void>;
107
+ /**
108
+ * Add a further address the contact is known by. It must not belong to
109
+ * another contact in the team, and becomes the primary only when the contact
110
+ * has none.
111
+ *
112
+ * @write
113
+ * @idempotent
114
+ */
115
+ addEmail(email: string): Promise<void>;
116
+ /**
117
+ * Remove one of the contact's addresses. Nothing else is deleted: the contact
118
+ * stops showing that address's email history. Removing the primary promotes
119
+ * the oldest address left. The last address on a domain of the contact's
120
+ * company cannot be removed while the contact is linked to it.
121
+ *
122
+ * @destructive
123
+ * @idempotent
124
+ */
125
+ removeEmail(email: string): Promise<void>;
126
+ /**
127
+ * Link or switch the company of a contact whose primary address is on a
128
+ * personal provider. Rejected for a contact on its company's domain.
129
+ *
130
+ * @write
131
+ * @idempotent
132
+ */
133
+ setCompany(company: Company): Promise<void>;
134
+ /**
135
+ * Remove the contact's company link, leaving a contact without a company.
136
+ * Rejected for a contact on its company's domain.
137
+ *
138
+ * @write
139
+ * @idempotent
140
+ */
141
+ unlinkCompany(): Promise<void>;
142
+ /** The CRM record this contact's discussions hang off. */
143
+ private get commentParent();
144
+ /**
145
+ * The comment threads on this contact, newest thread first.
146
+ *
147
+ * @readonly
148
+ */
149
+ comments(): Promise<DiscussionThread[]>;
150
+ /**
151
+ * Add a comment. Starts a new thread, or replies to an existing one when
152
+ * `threadId` (the thread's root comment id) is given.
153
+ *
154
+ * @param body - Plain text, or a rich body composed with {@link msg}.
155
+ *
156
+ * @write
157
+ */
158
+ comment(body: string | RichMessage, opts?: {
159
+ threadId?: string;
160
+ }): Promise<DiscussionComment>;
161
+ /**
162
+ * A handle to one of this contact's comments by id.
163
+ *
164
+ * @readonly
165
+ */
166
+ commentById(id: string): DiscussionComment;
167
+ }
168
+ export {};
@@ -0,0 +1,163 @@
1
+ import type { CreateCrmCompanyRequest, CreateCrmTeamContactRequest, CrmStagesResponse, CrmTeamSettingsResponse, PipelineSharing, ReplaceCrmStagesRequest, UpdateCrmTeamSettingsRequest } from '../../../generated/storage/types.gen';
2
+ import type { RoxClient } from '../../utils/client';
3
+ import { CrmEmailPrivacyNamespace } from '../crm-email-privacy/email-privacy';
4
+ import type { Document } from '../documents/document';
5
+ import type { SearchOpts } from '../search/options';
6
+ import { Team } from '../teams/team';
7
+ import { Company } from './company';
8
+ import { Contact } from './contact';
9
+ import { CrmPipeline } from './pipeline';
10
+ import { type CompanyImport } from './pipeline-entry';
11
+ import { PipelineNamespace } from './pipelines';
12
+ /**
13
+ * @routing Use when working with CRM records and pipelines; not generic databases or email contribution.
14
+ *
15
+ * @agent
16
+ * ## How CRM pipelines work
17
+ *
18
+ * A pipeline is a board of deals. Each entry tracks one CRM company or contact and has its own fields: usually Stage, Owner and Revenue, plus any the team added. "Deal", "opportunity", "lead", "the pipeline", "move Acme to Negotiation" and "who's in Demo" all refer to pipeline entries. A pipeline is not a Rox database: work with it through the CRM pipeline methods, never database queries or SQL.
19
+ *
20
+ * Create a pipeline with its stages and fields in one `crm.pipelines.create` call. Work with entries by name through the pipeline's own methods: `find` (filters by field name and stage label, with per-stage counts and number totals such as Revenue), `addRecords`, `updateEntries` (a stage by its label, a person as `'me'`), `removeRecords`, and `edit` for fields and stage options. `importCsv` / `exportCsv` move entries through CSV, and `crm.importCompaniesCsv` loads a companies list. `crm.pipelines.entriesFor` and `searchEntries` find a company's deals across pipelines. Reach for `applyOps` and column ids only for what these cannot express.
21
+ *
22
+ * A company also has its own Stage, Owner and Revenue properties on its CRM page. They are separate from every pipeline and not kept in sync with it. When the user has pipelines, deal and stage requests mean pipeline entries; change the company's own properties only when the user asks for those properties specifically.
23
+ */
24
+ export declare class CrmNamespace {
25
+ private readonly client;
26
+ /** Your email contribution. */
27
+ readonly emailPrivacy: CrmEmailPrivacyNamespace;
28
+ /** Pipelines, their records and sharing settings. */
29
+ readonly pipelines: PipelineNamespace;
30
+ constructor(client: RoxClient);
31
+ /**
32
+ * Read the caller's current CRM access, including when access is denied.
33
+ * Existing handles do not bypass the server's current permission checks.
34
+ *
35
+ * @readonly
36
+ */
37
+ access(): Promise<{
38
+ team?: Team;
39
+ allowed: boolean;
40
+ }>;
41
+ /**
42
+ * A handle to a CRM company by id.
43
+ *
44
+ * @readonly
45
+ */
46
+ companyById(id: string): Company;
47
+ /**
48
+ * A handle to a CRM contact by id.
49
+ *
50
+ * @readonly
51
+ */
52
+ contactById(id: string): Contact;
53
+ /**
54
+ * Resolve a CRM contact by email in the caller's current team, if present.
55
+ *
56
+ * @readonly
57
+ */
58
+ contactByEmail(email: string): Promise<Contact | undefined>;
59
+ /**
60
+ * Search the caller's current team's CRM contacts whose email or name
61
+ * contains `query` (case-insensitive), most recently interacted first.
62
+ * An empty query lists the most recent contacts.
63
+ *
64
+ * @param opts.limit Maximum contacts to return (1-500, default 20).
65
+ *
66
+ * @readonly
67
+ */
68
+ searchContacts(query: string, opts?: {
69
+ limit?: number;
70
+ }): Promise<Contact[]>;
71
+ /**
72
+ * Create a CRM company for the caller's current team.
73
+ *
74
+ * @write
75
+ */
76
+ createCompany(opts: CreateCrmCompanyRequest): Promise<Company>;
77
+ /**
78
+ * Create a contact without a company for the caller's current team. The
79
+ * email is optional and may be at any domain. To add someone to a company,
80
+ * use {@link Company.createContact}.
81
+ *
82
+ * @write
83
+ */
84
+ createContact(opts: CreateCrmTeamContactRequest): Promise<Contact>;
85
+ /**
86
+ * The domains the caller's current team keeps out of email sync.
87
+ *
88
+ * @readonly
89
+ */
90
+ blockedDomains(): Promise<string[]>;
91
+ /**
92
+ * Block a domain from email sync without changing existing CRM records.
93
+ *
94
+ * Existing companies, contacts and their hidden states are preserved.
95
+ * Requires a team admin or owner.
96
+ *
97
+ * @destructive
98
+ * @idempotent
99
+ * @throws When the domain equals or covers a member's connected primary
100
+ * mailbox domain. The error preserves the server's explanation.
101
+ */
102
+ blockDomain(domain: string): Promise<void>;
103
+ /**
104
+ * Resume eligible email sync for a domain without changing existing CRM records.
105
+ *
106
+ * Email sync resumes for addresses the team's personal-email and
107
+ * generic-provider filters allow. Existing companies, contacts and their
108
+ * hidden states are preserved. Requires a team admin or owner.
109
+ *
110
+ * @write
111
+ * @idempotent
112
+ */
113
+ unblockDomain(domain: string): Promise<void>;
114
+ /**
115
+ * The caller's current team's CRM settings.
116
+ *
117
+ * @readonly
118
+ */
119
+ settings(): Promise<CrmTeamSettingsResponse>;
120
+ /**
121
+ * Partially update the caller's current team's CRM settings.
122
+ *
123
+ * @write
124
+ * @idempotent
125
+ */
126
+ updateSettings(settings: UpdateCrmTeamSettingsRequest): Promise<CrmTeamSettingsResponse>;
127
+ /**
128
+ * Replace the caller's current team's deal stages, in pipeline order.
129
+ *
130
+ * @destructive
131
+ * @idempotent
132
+ */
133
+ setStages(stages: ReplaceCrmStagesRequest): Promise<CrmStagesResponse>;
134
+ /**
135
+ * Reset the caller's current team's deal stages to the defaults.
136
+ *
137
+ * @destructive
138
+ * @idempotent
139
+ */
140
+ resetStages(): Promise<void>;
141
+ /**
142
+ * Create the companies a CSV lists (CSV text, or a CSV document), keyed by
143
+ * domain; companies the team already has are counted, not duplicated. When
144
+ * the CSV has Stage, Owner or Revenue columns, those go on entries of
145
+ * `pipeline` (a company pipeline), or of a new pipeline (private unless
146
+ * `newPipeline.sharing` is `team`, named after the file unless named).
147
+ *
148
+ * @write
149
+ */
150
+ importCompaniesCsv(source: string | Document, options?: {
151
+ pipeline?: CrmPipeline;
152
+ newPipeline?: {
153
+ name?: string;
154
+ sharing?: PipelineSharing;
155
+ };
156
+ }): Promise<CompanyImport>;
157
+ /**
158
+ * Search CRM companies by name/domain, most relevant first, auto-paginated; `maxItems` caps the total.
159
+ *
160
+ * @readonly
161
+ */
162
+ searchCompanies(query: string, opts?: SearchOpts): AsyncGenerator<Company>;
163
+ }
@@ -0,0 +1,109 @@
1
+ import type { CompanyImportResponse, EntryFieldChange, EntryFieldValue, FieldOptionCounts, FieldTotal, FieldValueInput, PipelineEntry as PipelineEntryRecord, PipelineFieldSummary, PipelineImportResponse, SkippedImportRecord } from '../../../generated/storage/types.gen';
2
+ import type { RoxClient } from '../../utils/client';
3
+ import { Company } from './company';
4
+ import { Contact } from './contact';
5
+ import type { CrmPipeline } from './pipeline';
6
+ /**
7
+ * A value to write into a pipeline field, or to match one against: an option
8
+ * label such as a stage (`'Negotiation'`), a person as `'me'`, an email or a
9
+ * `macro|` user id, a number, true/false, a date (`'2026-10-12'`), a list for
10
+ * a field holding several values (in a filter, any of them matches), or
11
+ * `null` to empty the field (in a filter, to match an empty field).
12
+ */
13
+ export type PipelineFieldInput = string | number | boolean | string[] | null;
14
+ /** Pipeline fields by name (case-insensitive), each with what to write or match. */
15
+ export type PipelineFieldInputs = Record<string, PipelineFieldInput>;
16
+ /** A stored pipeline field value, tagged with its kind: `labels` for a stage or other select, `references` for people (`macro|` user ids). */
17
+ export type PipelineFieldValue = EntryFieldValue;
18
+ /** A field of a pipeline as entries and filters name it. */
19
+ export type PipelineField = PipelineFieldSummary;
20
+ /**
21
+ * A field's value before and after an update; `undefined` when empty. A
22
+ * monetary field also carries the currency code of each amount.
23
+ */
24
+ export type PipelineFieldChange = {
25
+ field: string;
26
+ before: PipelineFieldValue | undefined;
27
+ after: PipelineFieldValue | undefined;
28
+ beforeCurrency?: string;
29
+ afterCurrency?: string;
30
+ };
31
+ /** The company or contact an entry tracks, or a contact's email to add (in a company pipeline, its company). */
32
+ export type PipelineRecordInput = Company | Contact | {
33
+ email: string;
34
+ };
35
+ /** Matched entries per option of a single-select field such as Stage, and how many have it empty. */
36
+ export type PipelineOptionCounts = FieldOptionCounts;
37
+ /** The sum of a number field such as Revenue over the matched entries. */
38
+ export type PipelineFieldTotal = FieldTotal;
39
+ /** A CSV row an import could not add: the company's domain or the contact's email, and why. */
40
+ export type PipelineImportSkip = SkippedImportRecord;
41
+ /** What a CSV import into a pipeline did. */
42
+ export type PipelineImport = Omit<PipelineImportResponse, 'pipelineId' | 'pipelineName'> & {
43
+ /** The pipeline filled. */
44
+ pipeline: CrmPipeline;
45
+ };
46
+ /** What a companies CSV import did. */
47
+ export type CompanyImport = Omit<CompanyImportResponse, 'pipeline'> & {
48
+ /** The entries made from the CSV's Stage, Owner and Revenue, when it had any. */
49
+ pipeline: PipelineImport | undefined;
50
+ };
51
+ /** @internal The wire form of named field values. */
52
+ export declare function fieldInputs(set: PipelineFieldInputs): FieldValueInput[];
53
+ /** @internal A pipeline import with its pipeline as a handle. */
54
+ export declare function pipelineImport(pipeline: CrmPipeline, outcome: PipelineImportResponse): PipelineImport;
55
+ /**
56
+ * A CRM pipeline entry (a deal), with its fields by name.
57
+ *
58
+ * It tracks a company or contact, or neither in a generic pipeline of
59
+ * free-form rows. Change it with {@link PipelineEntry.update} or take it
60
+ * out with {@link PipelineEntry.remove}.
61
+ *
62
+ * @mcp-exclude Built from a pipeline listing; use CrmPipeline.updateEntries and removeRecords.
63
+ */
64
+ export declare class PipelineEntry {
65
+ /** The pipeline holding it. */
66
+ readonly pipeline: CrmPipeline;
67
+ /** Entry identity within the pipeline. */
68
+ readonly id: string;
69
+ /** The company or contact it tracks; `undefined` in a generic pipeline. */
70
+ readonly record: Company | Contact | undefined;
71
+ /** The record's name; `undefined` when the caller cannot see it or there is none. */
72
+ readonly recordName: string | undefined;
73
+ /** A company's domain or a contact's email. */
74
+ readonly recordDetail: string | undefined;
75
+ /** Its fields that hold a value, by name, as the response that returned it carried them. */
76
+ readonly fields: Record<string, PipelineFieldValue>;
77
+ private constructor();
78
+ /** @internal Seed from a workflow response of a pipeline tracking `recordType`, or nothing. */
79
+ static from(client: RoxClient, pipeline: CrmPipeline, recordType: 'company' | 'contact' | null | undefined, entry: Pick<PipelineEntryRecord, 'entryId' | 'record'> & {
80
+ fields?: PipelineEntryRecord['fields'];
81
+ }): PipelineEntry;
82
+ /**
83
+ * Set fields by name: a stage by its label, a person as `'me'` or an email,
84
+ * `null` to empty. Pass `baseVersion` (from {@link CrmPipeline.find}) to
85
+ * refuse the change if the pipeline changed since.
86
+ */
87
+ update(set: PipelineFieldInputs, options?: {
88
+ baseVersion?: number;
89
+ }): Promise<{
90
+ entry: PipelineEntry;
91
+ changes: PipelineFieldChange[];
92
+ version: number | undefined;
93
+ }>;
94
+ /** Delete this entry; its company or contact stays in the CRM. */
95
+ remove(): Promise<void>;
96
+ /** Serialize identity and the values read, without an authenticated client. */
97
+ toJSON(): {
98
+ id: string;
99
+ pipelineId: string;
100
+ record: {
101
+ id: string;
102
+ name: string | undefined;
103
+ detail: string | undefined;
104
+ } | undefined;
105
+ fields: Record<string, EntryFieldValue>;
106
+ };
107
+ }
108
+ /** @internal A field change with absent values as `undefined`. */
109
+ export declare function fieldChange(change: EntryFieldChange): PipelineFieldChange;