@rox-one/sdk 0.0.0-stage → 0.7.1

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 (483) 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/body-rox-compat.d.ts +22 -0
  360. package/dist/src/entities/email/draft.d.ts +164 -0
  361. package/dist/src/entities/email/filter.d.ts +44 -0
  362. package/dist/src/entities/email/label.d.ts +37 -0
  363. package/dist/src/entities/email/link.d.ts +35 -0
  364. package/dist/src/entities/email/message.d.ts +223 -0
  365. package/dist/src/entities/email/namespace.d.ts +235 -0
  366. package/dist/src/entities/email/namespace.test.d.ts +1 -0
  367. package/dist/src/entities/email/thread.d.ts +268 -0
  368. package/dist/src/entities/entity-mentions/mention.d.ts +21 -0
  369. package/dist/src/entities/entity-mentions/namespace.d.ts +20 -0
  370. package/dist/src/entities/entity.d.ts +167 -0
  371. package/dist/src/entities/external-chat/chat.d.ts +173 -0
  372. package/dist/src/entities/external-chat/message.d.ts +54 -0
  373. package/dist/src/entities/external-chat/namespace.d.ts +22 -0
  374. package/dist/src/entities/external-chat/participant.d.ts +28 -0
  375. package/dist/src/entities/external-chat/send.d.ts +40 -0
  376. package/dist/src/entities/external-chat/upload.d.ts +25 -0
  377. package/dist/src/entities/favorites/namespace.d.ts +52 -0
  378. package/dist/src/entities/foreign/foreign-entity.d.ts +36 -0
  379. package/dist/src/entities/foreign/namespace.d.ts +54 -0
  380. package/dist/src/entities/forms/form.d.ts +319 -0
  381. package/dist/src/entities/forms/namespace.d.ts +30 -0
  382. package/dist/src/entities/forms/question.d.ts +65 -0
  383. package/dist/src/entities/forms/response.d.ts +52 -0
  384. package/dist/src/entities/forms/section.d.ts +31 -0
  385. package/dist/src/entities/github-pull-requests/namespace.d.ts +20 -0
  386. package/dist/src/entities/github-pull-requests/pull-request.d.ts +64 -0
  387. package/dist/src/entities/harnesses/harness.d.ts +76 -0
  388. package/dist/src/entities/harnesses/namespace.d.ts +83 -0
  389. package/dist/src/entities/harnesses/pairing.d.ts +50 -0
  390. package/dist/src/entities/images/image.d.ts +88 -0
  391. package/dist/src/entities/images/namespace.d.ts +55 -0
  392. package/dist/src/entities/images/namespace.test.d.ts +1 -0
  393. package/dist/src/entities/imports/entry.d.ts +65 -0
  394. package/dist/src/entities/imports/namespace.d.ts +103 -0
  395. package/dist/src/entities/imports/namespace.test.d.ts +1 -0
  396. package/dist/src/entities/initiatives/initiative.d.ts +185 -0
  397. package/dist/src/entities/initiatives/initiative.test.d.ts +1 -0
  398. package/dist/src/entities/initiatives/namespace.d.ts +90 -0
  399. package/dist/src/entities/me/namespace.d.ts +68 -0
  400. package/dist/src/entities/meetings/meeting.d.ts +81 -0
  401. package/dist/src/entities/meetings/namespace.d.ts +38 -0
  402. package/dist/src/entities/memory/namespace.d.ts +49 -0
  403. package/dist/src/entities/memory/namespace.test.d.ts +1 -0
  404. package/dist/src/entities/messages/discussion.d.ts +84 -0
  405. package/dist/src/entities/messages/thread.d.ts +115 -0
  406. package/dist/src/entities/notifications/namespace.d.ts +66 -0
  407. package/dist/src/entities/notifications/notification.d.ts +78 -0
  408. package/dist/src/entities/notifications/notification.test.d.ts +1 -0
  409. package/dist/src/entities/passwords/item.d.ts +118 -0
  410. package/dist/src/entities/passwords/namespace.d.ts +45 -0
  411. package/dist/src/entities/pins/namespace.d.ts +42 -0
  412. package/dist/src/entities/projects/namespace.d.ts +45 -0
  413. package/dist/src/entities/projects/project.d.ts +108 -0
  414. package/dist/src/entities/properties/namespace.d.ts +105 -0
  415. package/dist/src/entities/properties/namespace.test.d.ts +1 -0
  416. package/dist/src/entities/properties/property-definition.d.ts +70 -0
  417. package/dist/src/entities/properties/property-option.d.ts +44 -0
  418. package/dist/src/entities/reference.d.ts +82 -0
  419. package/dist/src/entities/referrals/namespace.d.ts +40 -0
  420. package/dist/src/entities/routines/namespace.d.ts +239 -0
  421. package/dist/src/entities/routines/routine.d.ts +341 -0
  422. package/dist/src/entities/routines/suggestion.d.ts +38 -0
  423. package/dist/src/entities/saved-views/namespace.d.ts +58 -0
  424. package/dist/src/entities/saved-views/saved-view.d.ts +78 -0
  425. package/dist/src/entities/search/exclusions.d.ts +6 -0
  426. package/dist/src/entities/search/namespace.d.ts +71 -0
  427. package/dist/src/entities/search/options.d.ts +30 -0
  428. package/dist/src/entities/search/types.d.ts +90 -0
  429. package/dist/src/entities/sharing/access.d.ts +120 -0
  430. package/dist/src/entities/sharing/permissions.d.ts +13 -0
  431. package/dist/src/entities/spreadsheets/spreadsheet.d.ts +201 -0
  432. package/dist/src/entities/suggestions/namespace.d.ts +118 -0
  433. package/dist/src/entities/suggestions/suggestion.d.ts +172 -0
  434. package/dist/src/entities/suggestions/suggestion.test.d.ts +1 -0
  435. package/dist/src/entities/tasks/namespace.d.ts +77 -0
  436. package/dist/src/entities/tasks/task.d.ts +99 -0
  437. package/dist/src/entities/teams/invite.d.ts +33 -0
  438. package/dist/src/entities/teams/namespace.d.ts +23 -0
  439. package/dist/src/entities/teams/team.d.ts +129 -0
  440. package/dist/src/entities/ui/app-link.d.ts +24 -0
  441. package/dist/src/entities/ui/namespace.d.ts +75 -0
  442. package/dist/src/entities/unfurls/namespace.d.ts +24 -0
  443. package/dist/src/entities/users/namespace.d.ts +41 -0
  444. package/dist/src/entities/users/profile-picture.d.ts +29 -0
  445. package/dist/src/entities/users/profile-picture.test.d.ts +1 -0
  446. package/dist/src/entities/users/user.d.ts +102 -0
  447. package/dist/src/entities/web/namespace.d.ts +67 -0
  448. package/dist/src/entities/web/namespace.test.d.ts +1 -0
  449. package/dist/src/entities/webhooks/namespace.d.ts +38 -0
  450. package/dist/src/entities/webhooks/webhook.d.ts +130 -0
  451. package/dist/src/entities/whatsapp/account.d.ts +24 -0
  452. package/dist/src/entities/whatsapp/chat.d.ts +62 -0
  453. package/dist/src/entities/whatsapp/namespace.d.ts +29 -0
  454. package/dist/src/entities/workspace/items.d.ts +14 -0
  455. package/dist/src/entities/workspace/namespace.d.ts +96 -0
  456. package/dist/src/entities/workspace/query.d.ts +39 -0
  457. package/dist/src/entities/workspace/query.test.d.ts +1 -0
  458. package/dist/src/entities/workspace/types.d.ts +99 -0
  459. package/dist/src/events/hydrate/agentSession.d.ts +192 -0
  460. package/dist/src/events/hydrate/call.d.ts +101 -0
  461. package/dist/src/events/hydrate/channel.d.ts +55 -0
  462. package/dist/src/events/hydrate/document.d.ts +59 -0
  463. package/dist/src/events/hydrate/message.d.ts +70 -0
  464. package/dist/src/events/hydrate/user.d.ts +14 -0
  465. package/dist/src/events/receiver.d.ts +91 -0
  466. package/dist/src/events/types.d.ts +44 -0
  467. package/dist/src/events/verify.d.ts +13 -0
  468. package/dist/src/local-portmap.d.ts +8 -0
  469. package/dist/src/mentions.d.ts +42 -0
  470. package/dist/src/raw.d.ts +12 -0
  471. package/dist/src/rox.d.ts +268 -0
  472. package/dist/src/rox.js +23231 -0
  473. package/dist/src/utils/activity.d.ts +34 -0
  474. package/dist/src/utils/activity.test.d.ts +1 -0
  475. package/dist/src/utils/client.d.ts +62 -0
  476. package/dist/src/utils/concurrency.d.ts +5 -0
  477. package/dist/src/utils/index.d.ts +5 -0
  478. package/dist/src/utils/lazy.d.ts +37 -0
  479. package/dist/src/utils/options.d.ts +7 -0
  480. package/dist/src/utils/pagination.d.ts +28 -0
  481. package/dist/src/utils/unwrap.d.ts +48 -0
  482. package/dist/src/utils/verbs.d.ts +3 -0
  483. package/package.json +82 -4
@@ -0,0 +1,2532 @@
1
+ export type ClientOptions = {
2
+ baseUrl: `${string}://${string}` | (string & {});
3
+ };
4
+ /**
5
+ * Side of a folded conversation.
6
+ */
7
+ export type AgentSessionAuthor = 'user' | 'agent';
8
+ /**
9
+ * Filters for agent sessions.
10
+ */
11
+ export type AgentSessionFilters = {
12
+ /**
13
+ * Agent session ids to filter by. Empty to include all accessible sessions.
14
+ */
15
+ ids?: Array<string>;
16
+ /**
17
+ * Opt this query into agent sessions at all. Agent sessions are off by
18
+ * default — see [`crate::ast::agent_session::AgentSessionLiteral::Include`].
19
+ * Asking for specific `ids` or `owners` also opts in.
20
+ */
21
+ include?: boolean;
22
+ /**
23
+ * Filter by session owner principal — a user ('macro|user@example.com'), a bot
24
+ * ('bot|<uuid>'), or a team (a bare hyphenated uuid). Empty to include every
25
+ * owner.
26
+ */
27
+ owners?: Array<string>;
28
+ };
29
+ /**
30
+ * One accessible agent session, grouped with its matching folded messages.
31
+ */
32
+ export type AgentSessionSearchResponseItem = {
33
+ /**
34
+ * Name and folded-message matches.
35
+ */
36
+ agent_session_search_results: Array<AgentSessionSearchResult>;
37
+ /**
38
+ * Agent persona ID.
39
+ */
40
+ bot_id: string;
41
+ /**
42
+ * Session creation time.
43
+ */
44
+ created_at: string;
45
+ /**
46
+ * Session ID.
47
+ */
48
+ id: string;
49
+ /**
50
+ * Current persisted name.
51
+ */
52
+ name: string;
53
+ /**
54
+ * Session owner.
55
+ */
56
+ owner_id: string;
57
+ /**
58
+ * Current persisted modification time.
59
+ */
60
+ updated_at: string;
61
+ };
62
+ /**
63
+ * A name match or one matching folded message.
64
+ */
65
+ export type AgentSessionSearchResult = {
66
+ goto?: null | SearchGotoAgentSession;
67
+ /**
68
+ * Matched name/content fragments.
69
+ */
70
+ highlight: SearchHighlight;
71
+ /**
72
+ * Search score.
73
+ */
74
+ score?: number | null;
75
+ };
76
+ /**
77
+ * A kind of attachment a thread's messages carry, by MIME type.
78
+ */
79
+ export type AttachmentKind = 'pdf' | 'image' | 'document';
80
+ /**
81
+ * Filters for canonical calendar-event entities.
82
+ */
83
+ export type CalendarEventFilters = {
84
+ /**
85
+ * Attendee email addresses.
86
+ */
87
+ attendees?: Array<string>;
88
+ /**
89
+ * Canonical event ids.
90
+ */
91
+ calendar_event_ids?: Array<string>;
92
+ /**
93
+ * Include master events ending after this instant.
94
+ */
95
+ ends_after?: string | null;
96
+ /**
97
+ * Organizer email addresses.
98
+ */
99
+ organizers?: Array<string>;
100
+ /**
101
+ * Include master events starting before this instant.
102
+ */
103
+ starts_before?: string | null;
104
+ /**
105
+ * Event statuses such as `confirmed`, `tentative`, or `cancelled`.
106
+ */
107
+ statuses?: Array<string>;
108
+ };
109
+ /**
110
+ * Metadata for a calendar event fetched from the database.
111
+ *
112
+ * The index carries the master span for ranking, but the occurrence a row
113
+ * should display depends on when the query ran, so it is resolved here
114
+ * rather than indexed.
115
+ */
116
+ export type CalendarEventMetadata = {
117
+ /**
118
+ * Display name of the calendar holding this copy. Absent on an event
119
+ * shared with the user, which is on none of their calendars.
120
+ */
121
+ calendarName?: string | null;
122
+ /**
123
+ * Direct conference join URL when known.
124
+ */
125
+ conferenceUrl?: string | null;
126
+ /**
127
+ * Whether a calendar holding this copy is on the user's schedule. The
128
+ * user can see calendars that are not theirs, such as a colleague's: a
129
+ * row without this, and that they do not attend, says what that calendar
130
+ * shows, not where the user is.
131
+ */
132
+ contributesToAvailability?: boolean | null;
133
+ createdAt: string;
134
+ /**
135
+ * Free-text description, when the event carries one. May contain HTML from
136
+ * the source; clients render a plain-text preview.
137
+ */
138
+ description?: string | null;
139
+ /**
140
+ * The connected inbox syncing that calendar. It stays the user's own
141
+ * address on a colleague's calendar, so it never says whose calendar it
142
+ * is.
143
+ */
144
+ inbox?: string | null;
145
+ /**
146
+ * Whether the canonical source prohibits mutation.
147
+ */
148
+ isReadOnly: boolean;
149
+ /**
150
+ * Whether the series carries a recurrence rule. Lets a row render a
151
+ * recurring badge without parsing the rules.
152
+ */
153
+ isRecurring: boolean;
154
+ occurrence?: null | CalendarEventSearchOccurrence;
155
+ organizer?: null | CalendarEventOrganizer;
156
+ role?: null | CalendarEventSearchRole;
157
+ /**
158
+ * Canonical status (`confirmed`, `tentative`, `cancelled`).
159
+ */
160
+ status: string;
161
+ /**
162
+ * The series' own span.
163
+ */
164
+ time: CalendarEventSearchTime;
165
+ updatedAt: string;
166
+ };
167
+ /**
168
+ * The organizer the provider names on the event. Either field can be absent
169
+ * when the source does not name it. On a read-only Outlook calendar, such as
170
+ * its holidays, Microsoft names the mailbox owner on every event, so this
171
+ * does not say the user organized anything: `role` does.
172
+ */
173
+ export type CalendarEventOrganizer = {
174
+ /**
175
+ * Organizer email address, when known.
176
+ */
177
+ email?: string | null;
178
+ /**
179
+ * Display name, when the source provided one.
180
+ */
181
+ name?: string | null;
182
+ };
183
+ /**
184
+ * The instance a search row points at.
185
+ *
186
+ * A recurring series is indexed once, as its master. Which instance the row
187
+ * should show is decided per request rather than baked into the index: the
188
+ * next occurrence at or after now, else the most recent past one. This is
189
+ * the same resolution a calendar mention performs, so a search row and a
190
+ * mention of the same event agree on where they land.
191
+ */
192
+ export type CalendarEventSearchOccurrence = {
193
+ /**
194
+ * Stable key of the resolved instance within its series.
195
+ */
196
+ occurrenceKey: string;
197
+ /**
198
+ * Span of the resolved instance.
199
+ */
200
+ time: CalendarEventSearchTime;
201
+ };
202
+ /**
203
+ * A single response item, part of the CalendarEventSearchResponse object
204
+ */
205
+ export type CalendarEventSearchResponseItem = {
206
+ calendar_event_search_results: Array<CalendarEventSearchResult>;
207
+ created_at: string;
208
+ /**
209
+ * Standardized fields that all item types will share.
210
+ */
211
+ id: string;
212
+ name: string;
213
+ owner_id: string;
214
+ updated_at: string;
215
+ };
216
+ /**
217
+ * CalendarEventSearchResponseItem with metadata fetched from macrodb.
218
+ */
219
+ export type CalendarEventSearchResponseItemWithMetadata = CalendarEventSearchResponseItem & {
220
+ metadata?: null | CalendarEventMetadata;
221
+ /**
222
+ * Entity properties (e.g. tags) on the event.
223
+ */
224
+ properties?: Array<SoupProperty> | null;
225
+ };
226
+ export type CalendarEventSearchResult = {
227
+ highlight: SearchHighlight;
228
+ /**
229
+ * The score of the result
230
+ */
231
+ score?: number | null;
232
+ };
233
+ /**
234
+ * What the user is on one copy of an event, through the inbox holding it.
235
+ */
236
+ export type CalendarEventSearchRole = 'organizer' | 'guest';
237
+ /**
238
+ * Which calendar events a unified search covers.
239
+ *
240
+ * Sharing an event with a channel lets its members see the sharer's copy,
241
+ * which is on none of their own calendars, so the default scope never finds
242
+ * it. Shared events are a separate scope rather than part of the default, so
243
+ * a caller can list them after the caller's own events without reordering
244
+ * those.
245
+ */
246
+ export type CalendarEventSearchScope = 'own' | 'shared_with_you';
247
+ /**
248
+ * Timed or all-day span of a calendar event.
249
+ *
250
+ * Deliberately a local mirror of `models_soup::calendar_event::SoupCalendarEventTime`
251
+ * rather than a reuse of it: this module needs both `ToSchema` (OpenAPI) and
252
+ * `JsonSchema` (AI tool schemas), and `models_soup` carries no schemars
253
+ * dependency. The wire shape is identical and must stay that way, so a
254
+ * client can decode a search row and a soup row with one mapping.
255
+ *
256
+ * Fields are camelCased per variant rather than via `rename_all_fields`,
257
+ * which utoipa ignores.
258
+ */
259
+ export type CalendarEventSearchTime = {
260
+ /**
261
+ * Exclusive end.
262
+ */
263
+ endsAt: string;
264
+ kind: 'timed';
265
+ /**
266
+ * Inclusive start.
267
+ */
268
+ startsAt: string;
269
+ /**
270
+ * Original IANA time zone.
271
+ */
272
+ timeZone?: string | null;
273
+ } | {
274
+ /**
275
+ * Exclusive end date.
276
+ */
277
+ endDate: string;
278
+ kind: 'allDay';
279
+ /**
280
+ * Inclusive start date.
281
+ */
282
+ startDate: string;
283
+ };
284
+ /**
285
+ * Filters for call records.
286
+ */
287
+ export type CallFilters = {
288
+ /**
289
+ * Legacy filter by whether the requesting user attended the call.
290
+ * Prefer [`CallFilters::status`] for new callers.
291
+ * `None` = no filter, `Some(true)` = only calls the user joined,
292
+ * `Some(false)` = only calls the user did not join.
293
+ */
294
+ attended?: boolean | null;
295
+ /**
296
+ * Call record IDs to filter by. Empty to include all calls.
297
+ */
298
+ call_ids?: Array<string>;
299
+ /**
300
+ * Channel IDs to filter calls by. Empty to include all calls.
301
+ */
302
+ channel_ids?: Array<string>;
303
+ /**
304
+ * Speaker macro user ids. Empty to include all.
305
+ */
306
+ speaker_ids?: Array<string>;
307
+ status?: null | CallStatus;
308
+ };
309
+ export type CallRecordMetadata = {
310
+ attended: boolean;
311
+ channel_name?: string | null;
312
+ created_by: string;
313
+ duration_ms: number;
314
+ ended_at: string;
315
+ started_at: string;
316
+ status: CallStatus;
317
+ updated_at: string;
318
+ };
319
+ export type CallRecordSearchResponseItem = {
320
+ call_id: string;
321
+ call_search_results: Array<CallRecordSearchResult>;
322
+ channel_id?: string | null;
323
+ id: string;
324
+ name?: string | null;
325
+ owner_id: string;
326
+ participant_ids: Array<string>;
327
+ };
328
+ export type CallRecordSearchResponseItemWithMetadata = CallRecordSearchResponseItem & {
329
+ metadata?: null | CallRecordMetadata;
330
+ /**
331
+ * Entity properties (e.g. tags) on the call.
332
+ */
333
+ properties?: Array<SoupProperty> | null;
334
+ };
335
+ export type CallRecordSearchResult = {
336
+ ended_at?: string | null;
337
+ highlight: SearchHighlight;
338
+ score?: number | null;
339
+ sequence_num?: number | null;
340
+ speaker_id?: string | null;
341
+ started_at?: string | null;
342
+ transcript_id?: string | null;
343
+ };
344
+ /**
345
+ * Viewer-relative attendance status for a call record.
346
+ * Serializes as `ATTENDED`, `MISSED`, or `UNATTENDED`.
347
+ */
348
+ export type CallStatus = 'ATTENDED' | 'MISSED' | 'UNATTENDED';
349
+ /**
350
+ * The channel message filters used to filter down what channel messages you search over.
351
+ */
352
+ export type ChannelFilters = {
353
+ /**
354
+ * Channel IDs to search within. Examples: ['general']. Empty to search all accessible channels.
355
+ */
356
+ channel_ids?: Array<string>;
357
+ /**
358
+ * Channel types to filter by. Examples: ['public'], ['direct_message', 'private']. Empty to search all channel types.
359
+ */
360
+ channel_types?: Array<string>;
361
+ /**
362
+ * Filter by channel importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing.
363
+ */
364
+ importance?: boolean | null;
365
+ /**
366
+ * Filter by whether the requesting user is an active participant of the channel.
367
+ * Presence of this filter also widens the candidate set to team channels of the
368
+ * user's teams that they have not joined, so `false` matches those channels.
369
+ * None to ignore (participant channels only, today's default).
370
+ */
371
+ is_participant?: boolean | null;
372
+ /**
373
+ * Channel user mentions to search for. Examples: ['@username']. Empty if not filtering by mentions.
374
+ */
375
+ mentions?: Array<string>;
376
+ /**
377
+ * Filter by channel notification state.
378
+ */
379
+ notification_filters?: NotificationFilters;
380
+ /**
381
+ * Channel organization ID to search within. Empty to ignore organization filtering.
382
+ */
383
+ org_id?: number | null;
384
+ /**
385
+ * Sender IDs to search within. Examples: ['user1']. Empty to search all accessible senders.
386
+ */
387
+ sender_ids?: Array<string>;
388
+ /**
389
+ * Channel team ID to search within. Empty to ignore team filtering.
390
+ */
391
+ team_id?: string | null;
392
+ /**
393
+ * Channel thread IDs to search within. Examples: ['thread123']. Empty to search all threads.
394
+ */
395
+ thread_ids?: Array<string>;
396
+ };
397
+ /**
398
+ * A single channel-message content hit in the unified search response.
399
+ * One item per matching message, timestamped by the message itself, so the
400
+ * unified sort interleaves channel messages with other entity types by
401
+ * their own recency.
402
+ */
403
+ export type ChannelMessageSearchResponseItem = {
404
+ /**
405
+ * The id of the channel the message belongs to
406
+ */
407
+ channel_id: string;
408
+ /**
409
+ * The type of channel
410
+ */
411
+ channel_type: string;
412
+ /**
413
+ * When the channel message was created
414
+ */
415
+ created_at: string;
416
+ /**
417
+ * When the channel message was deleted, if it has been
418
+ */
419
+ deleted_at?: string | null;
420
+ /**
421
+ * The highlights for the channel message
422
+ */
423
+ highlight: SearchHighlight;
424
+ /**
425
+ * Standardized id field shared by all item types; the channel id.
426
+ */
427
+ id: string;
428
+ /**
429
+ * The channel message id
430
+ */
431
+ message_id: string;
432
+ /**
433
+ * we don't store this for channels atm but keeping it here for consistency
434
+ */
435
+ owner_id?: string | null;
436
+ /**
437
+ * The score of the result
438
+ */
439
+ score?: number | null;
440
+ /**
441
+ * The sender id
442
+ */
443
+ sender_id: string;
444
+ /**
445
+ * The channel message thread id
446
+ */
447
+ thread_id?: string | null;
448
+ /**
449
+ * When the channel message was last updated
450
+ */
451
+ updated_at: string;
452
+ };
453
+ /**
454
+ * Metadata for a channel fetched from the database
455
+ */
456
+ export type ChannelMetadata = {
457
+ created_at: string;
458
+ interacted_at?: string | null;
459
+ updated_at: string;
460
+ viewed_at?: string | null;
461
+ };
462
+ /**
463
+ * A channel-name search hit.
464
+ */
465
+ export type ChannelNameSearchResponseItem = {
466
+ /**
467
+ * The channel id.
468
+ */
469
+ channel_id: string;
470
+ /**
471
+ * The type of channel.
472
+ */
473
+ channel_type: string;
474
+ /**
475
+ * The matched channel-name highlight.
476
+ */
477
+ highlight: SearchHighlight;
478
+ /**
479
+ * Standardized id field shared by all item types; the channel id.
480
+ */
481
+ id: string;
482
+ metadata?: null | ChannelMetadata;
483
+ /**
484
+ * The channel owner.
485
+ */
486
+ owner_id?: string | null;
487
+ /**
488
+ * The score of the result.
489
+ */
490
+ score?: number | null;
491
+ };
492
+ export type ChannelSearchRequest = (null | ChannelFilters) & {
493
+ /**
494
+ * If true, returns only 1 result per entity. False by default.
495
+ */
496
+ collapse?: boolean | null;
497
+ /**
498
+ * The match type to use when searching
499
+ */
500
+ match_type: MatchType;
501
+ /**
502
+ * The query to search for
503
+ */
504
+ query?: string | null;
505
+ /**
506
+ * Fields to search on (Name, Content, NameContent). Defaults to Content
507
+ */
508
+ search_on?: SearchOn;
509
+ /**
510
+ * Sort key for results. Defaults to `message`.
511
+ */
512
+ sort?: ChannelSortTimestamp;
513
+ /**
514
+ * Multiple terms to search over
515
+ */
516
+ terms?: Array<string> | null;
517
+ };
518
+ /**
519
+ * The document search response object
520
+ */
521
+ export type ChannelSearchResponse = {
522
+ /**
523
+ * Base64-encoded cursor for the next page; `None` when exhausted.
524
+ */
525
+ next_cursor?: string | null;
526
+ /**
527
+ * List containing results from email threads
528
+ */
529
+ results: Array<ChannelSearchResponseItemWithMetadata>;
530
+ /**
531
+ * Total number of matching channel messages across all pages.
532
+ */
533
+ total_count: number;
534
+ };
535
+ /**
536
+ * A single response item, part of the ChannelSearchResponse object
537
+ */
538
+ export type ChannelSearchResponseItem = {
539
+ /**
540
+ * The id of the channel
541
+ */
542
+ channel_id: string;
543
+ /**
544
+ * The search results for the channel
545
+ * This may be empty if the search result match was not on content
546
+ */
547
+ channel_message_search_results: Array<ChannelSearchResult>;
548
+ /**
549
+ * The type of channel
550
+ */
551
+ channel_type: string;
552
+ /**
553
+ * Standardized fields that all item types will share.
554
+ * These field names are being aligned across all item types
555
+ * for consistency in our data model.
556
+ */
557
+ id: string;
558
+ /**
559
+ * we don't store this for channels atm but keeping it here for consistency
560
+ */
561
+ owner_id?: string | null;
562
+ };
563
+ /**
564
+ * ChannelSearchResponseItem object with channel metadata we fetch from macrodb. we don't store these
565
+ * timestamps in opensearch as they would require us to update each chat message record for the chat
566
+ * every time the chat updates (specifically for updated_at and viewed_at and interacted_at)
567
+ */
568
+ export type ChannelSearchResponseItemWithMetadata = ChannelSearchResponseItem & {
569
+ metadata?: null | ChannelMetadata;
570
+ };
571
+ /**
572
+ * A channel message match for a given channel id
573
+ */
574
+ export type ChannelSearchResult = {
575
+ /**
576
+ * When the channel message was created
577
+ * This is only prsent if the search result is on the message content
578
+ */
579
+ created_at?: string | null;
580
+ /**
581
+ * When the channel message was deleted, if it has been
582
+ */
583
+ deleted_at?: string | null;
584
+ /**
585
+ * The highlights for the channel message
586
+ */
587
+ highlight: SearchHighlight;
588
+ /**
589
+ * The channel message id
590
+ * This is only prsent if the search result is on the message content
591
+ */
592
+ message_id?: string | null;
593
+ /**
594
+ * The score of the result
595
+ */
596
+ score?: number | null;
597
+ /**
598
+ * The sender id
599
+ * This is only prsent if the search result is on the message content
600
+ */
601
+ sender_id?: string | null;
602
+ /**
603
+ * The channel message thread id
604
+ */
605
+ thread_id?: string | null;
606
+ /**
607
+ * When the channel message was last updated
608
+ * This is only prsent if the search result is on the message content
609
+ */
610
+ updated_at?: string | null;
611
+ };
612
+ /**
613
+ * Sort key for channel content search results.
614
+ */
615
+ export type ChannelSortTimestamp = 'message' | 'thread';
616
+ /**
617
+ * The channel thread filters used to filter down channel-thread entities.
618
+ */
619
+ export type ChannelThreadFilters = {
620
+ /**
621
+ * Channel IDs containing the thread. Empty to include threads from all accessible channels.
622
+ */
623
+ channel_ids?: Array<string>;
624
+ /**
625
+ * Thread participant user IDs. A participant is the root message sender, anyone
626
+ * who replied in the thread, or anyone @-mentioned in the thread (group mentions
627
+ * like @here count through their per-user expansion at send time). Empty to
628
+ * include threads regardless of participants.
629
+ */
630
+ participant_ids?: Array<string>;
631
+ /**
632
+ * Sender IDs for the root thread message. Empty to include all root senders.
633
+ */
634
+ root_sender_ids?: Array<string>;
635
+ /**
636
+ * Channel thread parent message IDs to include. Empty to include all accessible threads.
637
+ */
638
+ thread_ids?: Array<string>;
639
+ };
640
+ /**
641
+ * The chat filters used to filter down what chats you search over.
642
+ */
643
+ export type ChatFilters = {
644
+ /**
645
+ * Chat ids to search over. Examples: ['chat1'], ['chat1', 'chat2']. When provided, chat search will only match results on these chats. Empty to search all accessible chats.
646
+ */
647
+ chat_ids?: Array<string>;
648
+ /**
649
+ * Filter by chat importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing.
650
+ */
651
+ importance?: boolean | null;
652
+ /**
653
+ * Filter by chat notification state.
654
+ */
655
+ notification_filters?: NotificationFilters;
656
+ /**
657
+ * Filter by chat owner principal — a user ('macro|user@example.com'), a bot
658
+ * ('bot|<uuid>'), or a team (a bare hyphenated uuid). Examples:
659
+ * ['macro|user@example.com'], ['macro|user@example.com', 'bot|0199...']. Empty to
660
+ * search all owners.
661
+ */
662
+ owners?: Array<string>;
663
+ /**
664
+ * A list of project ids to search within. Examples: ['project1']. Empty to ignore project filtering.
665
+ */
666
+ project_ids?: Array<string>;
667
+ /**
668
+ * Chat message roles to search. Examples: ['user'], ['assistant']. Empty to search all roles.
669
+ */
670
+ role?: Array<string>;
671
+ };
672
+ /**
673
+ * A chat match for a given message id
674
+ */
675
+ export type ChatMessageSearchResult = {
676
+ /**
677
+ * The chat message id for the chat
678
+ * This is only present if the search match was on the chat message content
679
+ */
680
+ chat_message_id?: string | null;
681
+ /**
682
+ * The highlights for the chat message
683
+ */
684
+ highlight: SearchHighlight;
685
+ /**
686
+ * The role of the chat message
687
+ * This is only present if the search match was on the chat message content
688
+ */
689
+ role?: string | null;
690
+ /**
691
+ * The score of the result
692
+ */
693
+ score?: number | null;
694
+ };
695
+ /**
696
+ * Metadata for a chat fetched from the database
697
+ */
698
+ export type ChatMetadata = {
699
+ created_at: string;
700
+ deleted_at?: string | null;
701
+ project_id?: string | null;
702
+ updated_at: string;
703
+ viewed_at?: string | null;
704
+ };
705
+ export type ChatSearchRequest = (null | ChatFilters) & {
706
+ /**
707
+ * If true, returns only 1 result per entity. False by default.
708
+ */
709
+ collapse?: boolean | null;
710
+ /**
711
+ * The match type to use when searching
712
+ */
713
+ match_type: MatchType;
714
+ /**
715
+ * The query to search for
716
+ */
717
+ query?: string | null;
718
+ /**
719
+ * Fields to search on (Name, Content, NameContent). Defaults to Content
720
+ */
721
+ search_on?: SearchOn;
722
+ /**
723
+ * Multiple terms to search over
724
+ */
725
+ terms?: Array<string> | null;
726
+ };
727
+ /**
728
+ * The chat search response object
729
+ */
730
+ export type ChatSearchResponse = {
731
+ /**
732
+ * List containing results from chats
733
+ */
734
+ results: Array<ChatSearchResponseItemWithMetadata>;
735
+ };
736
+ /**
737
+ * A single response item, part of the ChatSearchResponse object
738
+ */
739
+ export type ChatSearchResponseItem = {
740
+ /**
741
+ * The id of the chat
742
+ */
743
+ chat_id: string;
744
+ /**
745
+ * The search results for the chat
746
+ * This may be empty if the search result match was on the chat title only
747
+ */
748
+ chat_search_results: Array<ChatMessageSearchResult>;
749
+ /**
750
+ * Standardized fields that all item types will share.
751
+ * These field names are being aligned across all item types
752
+ * for consistency in our data model.
753
+ */
754
+ id: string;
755
+ name: string;
756
+ owner_id: string;
757
+ /**
758
+ * The id of the creator of the chat
759
+ */
760
+ user_id: string;
761
+ };
762
+ /**
763
+ * ChatSearchResponse object with channel metadata we fetch from macrodb. we don't store these
764
+ * timestamps in opensearch as they would require us to update each chat message record for the chat
765
+ * every time the chat updates (specifically for updated_at and viewed_at)
766
+ */
767
+ export type ChatSearchResponseItemWithMetadata = ChatSearchResponseItem & {
768
+ metadata?: null | ChatMetadata;
769
+ /**
770
+ * Entity properties (e.g. tags) on the chat.
771
+ */
772
+ properties?: Array<SoupProperty> | null;
773
+ };
774
+ /**
775
+ * The crm company filters used to narrow which CRM companies appear in soup.
776
+ */
777
+ export type CrmCompanyFilters = {
778
+ /**
779
+ * CRM company ids to filter by. Examples: ['11111111-...']. Empty to
780
+ * include all of the team's visible CRM companies.
781
+ */
782
+ company_ids?: Array<string>;
783
+ /**
784
+ * Optional `crm_companies.hidden` filter. `None` = visible only
785
+ * (default for back-compat with non-admin callers). `Some(false)` =
786
+ * visible only (explicit). `Some(true)` = hidden only — requires
787
+ * admin/owner team role; enforced by the CRM service from the
788
+ * caller's team receipt.
789
+ */
790
+ hidden?: boolean | null;
791
+ };
792
+ /**
793
+ * A CRM domain attached to a company in search results.
794
+ */
795
+ export type CrmCompanySearchDomain = {
796
+ /**
797
+ * The id of the company the domain belongs to.
798
+ */
799
+ companyId: string;
800
+ /**
801
+ * When the domain record was created.
802
+ */
803
+ createdAt: string;
804
+ /**
805
+ * The domain (lowercased, e.g. "acme.com").
806
+ */
807
+ domain: string;
808
+ /**
809
+ * The id of the domain record.
810
+ */
811
+ id: string;
812
+ };
813
+ /**
814
+ * A CRM company match in unified search results. Carries the display
815
+ * metadata resolved from the primary domain plus the highlighted name.
816
+ */
817
+ export type CrmCompanySearchResponseItem = {
818
+ /**
819
+ * When the company was created.
820
+ */
821
+ createdAt: string;
822
+ /**
823
+ * Display description from the primary domain's directory entry.
824
+ */
825
+ description?: string | null;
826
+ /**
827
+ * Domains associated with this company, primary first.
828
+ */
829
+ domains: Array<CrmCompanySearchDomain>;
830
+ /**
831
+ * Whether the company is hidden from CRM listings.
832
+ */
833
+ hidden: boolean;
834
+ /**
835
+ * The id of the company.
836
+ */
837
+ id: string;
838
+ /**
839
+ * Display name from the primary domain's directory entry.
840
+ */
841
+ name?: string | null;
842
+ /**
843
+ * `name` with matched spans wrapped in `<macro_em>…</macro_em>`.
844
+ */
845
+ nameHighlighted?: string | null;
846
+ /**
847
+ * The id of the team that owns this company record.
848
+ */
849
+ teamId: string;
850
+ /**
851
+ * When the company was last updated (the sort key).
852
+ */
853
+ updatedAt: string;
854
+ };
855
+ /**
856
+ * Data type for property values, determining storage and validation.
857
+ */
858
+ export type DataType = 'BOOLEAN' | 'DATE' | 'DATE_RANGE' | 'NUMBER' | 'STRING' | 'SELECT_NUMBER' | 'SELECT_STRING' | 'TAG' | 'ENTITY' | 'LINK';
859
+ /**
860
+ * A span of time from `start` to `end`, both included. The end is never
861
+ * before the start: a range that would end earlier does not deserialize.
862
+ */
863
+ export type DateRange = {
864
+ end: string;
865
+ start: string;
866
+ };
867
+ /**
868
+ * The document filters used to filter down what documents you search over.
869
+ */
870
+ export type DocumentFilters = {
871
+ /**
872
+ * Document ids to search over. Examples: ['doc1'], ['doc1', 'doc2']. Empty to search all accessible documents.
873
+ */
874
+ document_ids?: Array<string>;
875
+ /**
876
+ * Document file types to search. Examples: ['pdf'], ['md', 'txt']. Empty to search all file types.
877
+ */
878
+ file_types?: Array<string>;
879
+ /**
880
+ * Filter by document importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing.
881
+ */
882
+ importance?: boolean | null;
883
+ /**
884
+ * Filter by email attachment status. true = only email attachments, false = only non-email attachments, None = both.
885
+ */
886
+ is_email_attachment?: boolean | null;
887
+ /**
888
+ * Filter by document notification state.
889
+ */
890
+ notification_filters?: NotificationFilters;
891
+ /**
892
+ * Filter by document owner principal — a user ('macro|user@example.com'), a bot
893
+ * ('bot|<uuid>'), or a team (a bare hyphenated uuid). Examples:
894
+ * ['macro|user@example.com'], ['macro|user@example.com', 'bot|0199...']. Empty to
895
+ * search all owners.
896
+ */
897
+ owners?: Array<string>;
898
+ /**
899
+ * A list of project ids to search within. Examples: ['project1'].
900
+ * filtering. Empty to ignore project filtering.
901
+ */
902
+ project_ids?: Array<string>;
903
+ /**
904
+ * Filter by document sub type. Examples: ['task']. Empty to search all sub types.
905
+ */
906
+ sub_types?: Array<string>;
907
+ /**
908
+ * Task-specific filters that only apply to task subtype documents.
909
+ */
910
+ task_filters?: TaskFilters;
911
+ };
912
+ /**
913
+ * Metadata for a document fetched from the database
914
+ */
915
+ export type DocumentMetadata = {
916
+ created_at: string;
917
+ deleted_at?: string | null;
918
+ project_id?: string | null;
919
+ updated_at: string;
920
+ viewed_at?: string | null;
921
+ };
922
+ export type DocumentSearchRequest = (null | DocumentFilters) & {
923
+ /**
924
+ * If true, returns only 1 result per entity. False by default.
925
+ */
926
+ collapse?: boolean | null;
927
+ /**
928
+ * The match type to use when searching
929
+ */
930
+ match_type: MatchType;
931
+ /**
932
+ * The query to search for
933
+ */
934
+ query?: string | null;
935
+ /**
936
+ * Fields to search on (Name, Content, NameContent). Defaults to Content
937
+ */
938
+ search_on?: SearchOn;
939
+ /**
940
+ * Multiple terms to search over
941
+ */
942
+ terms?: Array<string> | null;
943
+ };
944
+ /**
945
+ * The document search response object
946
+ */
947
+ export type DocumentSearchResponse = {
948
+ /**
949
+ * List containing results from documents
950
+ */
951
+ results: Array<DocumentSearchResponseItemWithMetadata>;
952
+ };
953
+ /**
954
+ * A single response item, part of the DocumentSearchResponse object
955
+ */
956
+ export type DocumentSearchResponseItem = {
957
+ /**
958
+ * The id of the document
959
+ */
960
+ document_id: string;
961
+ /**
962
+ * The name of the document
963
+ */
964
+ document_name: string;
965
+ /**
966
+ * The search results for the document
967
+ * This may be empty if the search result match was on the document name only
968
+ */
969
+ document_search_results: Array<DocumentSearchResult>;
970
+ /**
971
+ * The file type of the document
972
+ */
973
+ file_type?: string | null;
974
+ /**
975
+ * Standardized fields that all item types will share.
976
+ * These field names are being aligned across all item types
977
+ * for consistency in our data model.
978
+ */
979
+ id: string;
980
+ name: string;
981
+ owner_id: string;
982
+ sub_type?: null | DocumentSubType;
983
+ };
984
+ /**
985
+ * DocumentSearchResponseItem object with document metadata we fetch from macrodb. we don't store these
986
+ * timestamps in opensearch as they would require us to update document page record
987
+ * every time the document updates (specifically for updated_at and viewed_at)
988
+ */
989
+ export type DocumentSearchResponseItemWithMetadata = DocumentSearchResponseItem & {
990
+ metadata?: null | DocumentMetadata;
991
+ /**
992
+ * Entity properties (assignees, status, priority, etc.) for markdown documents.
993
+ */
994
+ properties?: Array<SoupProperty> | null;
995
+ };
996
+ /**
997
+ * A document match for a given node
998
+ */
999
+ export type DocumentSearchResult = {
1000
+ /**
1001
+ * The highlights for the document
1002
+ */
1003
+ highlight: SearchHighlight;
1004
+ /**
1005
+ * The node id for the document.
1006
+ * This is only useful for markdown at the moment
1007
+ * This will only be provided if the match was on content
1008
+ */
1009
+ node_id?: string | null;
1010
+ /**
1011
+ * The raw content of the document.
1012
+ * This is only included for markdown files and will be the raw json node of the match
1013
+ */
1014
+ raw_content?: string | null;
1015
+ /**
1016
+ * The score of the result
1017
+ */
1018
+ score?: number | null;
1019
+ };
1020
+ /**
1021
+ * The document sub type enum represents all values of document sub types.
1022
+ * These values should match the `document_sub_type_value` table in macrodb.
1023
+ *
1024
+ * Wire, database, and `Display` spellings are all `snake_case` so a
1025
+ * multi-word variant serializes identically in every system.
1026
+ */
1027
+ export type DocumentSubType = 'task' | 'snippet' | 'skill' | 'initiative_description';
1028
+ /**
1029
+ * The email filters used to filter down what emails you search over.
1030
+ */
1031
+ export type EmailFilters = {
1032
+ /**
1033
+ * Only threads with at least one attachment of one of these kinds, by
1034
+ * MIME type, on any of their messages. Empty applies no constraint.
1035
+ */
1036
+ attachments?: Array<AttachmentKind>;
1037
+ /**
1038
+ * Email BCC addresses to filter by. Examples: ['user@example.com']. Empty if not filtering by BCC.
1039
+ */
1040
+ bcc?: Array<string>;
1041
+ /**
1042
+ * When `Some(true)`, only include threads that have at least one message
1043
+ * with an iCalendar attachment (`.ics` filename or `application/ics` mime
1044
+ * type). `Some(false)` and `None` apply no constraint.
1045
+ */
1046
+ calendar_only?: boolean | null;
1047
+ /**
1048
+ * Email CC addresses to filter by. Examples: ['user@example.com']. Empty if not filtering by CC.
1049
+ */
1050
+ cc?: Array<string>;
1051
+ /**
1052
+ * CRM-scoped address filter. When non-empty, expands visibility to every
1053
+ * teammate's mailbox and restricts to threads involving any of these
1054
+ * fully-qualified addresses. Each address is authorized against
1055
+ * `crm_contacts` + `crm_companies` (contact must not be hidden, company
1056
+ * must not be hidden, `email_sync` must be true).
1057
+ * Mutually exclusive with `crm_domains`. Listing email only: search
1058
+ * rejects a request that sets it with a 400.
1059
+ */
1060
+ crm_addresses?: Array<string>;
1061
+ /**
1062
+ * CRM-scoped domain filter. When non-empty, expands visibility to every
1063
+ * teammate's mailbox and restricts to threads involving any of these
1064
+ * domains (in any of sender/cc/bcc/recipient). Each domain is authorized
1065
+ * against `crm_domains` + `crm_companies` (must exist for the caller's
1066
+ * team, company must not be hidden, `email_sync` must be true).
1067
+ * Mutually exclusive with `crm_addresses`. Listing email only: search
1068
+ * rejects a request that sets it with a 400.
1069
+ */
1070
+ crm_domains?: Array<string>;
1071
+ /**
1072
+ * Filter by whether the thread is done: true for threads out of the
1073
+ * inbox (archived), false for threads still in it. This is the mailbox
1074
+ * state the Email view's Done filter uses, independent of notifications.
1075
+ */
1076
+ done?: boolean | null;
1077
+ /**
1078
+ * Email thread IDs to filter by. Examples: ['thread-uuid-1']. Empty to search all threads.
1079
+ */
1080
+ email_thread_ids?: Array<string>;
1081
+ /**
1082
+ * Exclude emails that have any of these labels. Supports both Gmail system labels (e.g. "CATEGORY_PROMOTIONS") and user-created labels. Empty to not exclude any labels.
1083
+ * Note: SPAM and TRASH emails are not indexed in OpenSearch, so they are already excluded by default.
1084
+ */
1085
+ exclude_labels?: Array<string>;
1086
+ /**
1087
+ * Filter by email importance. None to not filter. True to show only important emails
1088
+ * (drafts, personal, sent, or uncategorized). False to show only unimportant emails
1089
+ * (those categorized as promotions, social, updates, or forums).
1090
+ */
1091
+ importance?: boolean | null;
1092
+ /**
1093
+ * Only include emails that have at least one of these labels. Supports both Gmail system labels (e.g. "INBOX", "CATEGORY_PROMOTIONS") and user-created labels (e.g. "github"). Empty to not filter by included labels.
1094
+ * Note: SPAM and TRASH emails are not indexed in OpenSearch, so they will never appear in results regardless of this filter.
1095
+ */
1096
+ include_labels?: Array<string>;
1097
+ /**
1098
+ * Filter by the email thread's read flag, independently of notification state.
1099
+ */
1100
+ is_read?: boolean | null;
1101
+ /**
1102
+ * Restrict to specific inboxes by email_links.id. Empty means "any inbox the
1103
+ * caller can access" (soup expands to the full set at the router edge).
1104
+ */
1105
+ link_ids?: Array<string>;
1106
+ /**
1107
+ * Filter by email notification state.
1108
+ */
1109
+ notification_filters?: NotificationFilters;
1110
+ /**
1111
+ * Drive folder (project) ids to search within: threads filed in any of
1112
+ * these folders. Besides the caller's own threads, it reaches every
1113
+ * thread in a folder shared with the caller, whoever's inbox holds it,
1114
+ * as the folder's list does. Search takes at most 50 folders and
1115
+ * rejects more with a 400, and matches the query against at most 10,000
1116
+ * of their threads in all; threads past that are not searched, unless
1117
+ * `email_thread_ids` names them, and at most 10,000 named threads are
1118
+ * searched in all. Empty to ignore project filtering.
1119
+ */
1120
+ project_ids?: Array<string>;
1121
+ /**
1122
+ * Email Recipient addresses to filter by. Examples: ['user@example.com']. Empty if not filtering by Recipient.
1123
+ */
1124
+ recipients?: Array<string>;
1125
+ /**
1126
+ * Email sender addresses to filter by. Examples: ['user@example.com']. Empty to search all senders.
1127
+ */
1128
+ senders?: Array<string>;
1129
+ /**
1130
+ * Controls whether shared email threads are included in results.
1131
+ * Defaults to "exclude" (only the user's own threads).
1132
+ */
1133
+ shared?: SharedEmailFilter;
1134
+ view?: null | EmailSearchView;
1135
+ };
1136
+ /**
1137
+ * A participant (sender) in an email thread
1138
+ */
1139
+ export type EmailSearchParticipant = {
1140
+ email: string;
1141
+ name?: string | null;
1142
+ };
1143
+ export type EmailSearchRequest = (null | EmailFilters) & {
1144
+ /**
1145
+ * If true, returns only 1 result per entity. False by default.
1146
+ */
1147
+ collapse?: boolean | null;
1148
+ /**
1149
+ * The match type to use when searching
1150
+ */
1151
+ match_type: MatchType;
1152
+ /**
1153
+ * The query to search for
1154
+ */
1155
+ query?: string | null;
1156
+ /**
1157
+ * Fields to search on (Name, Content, NameContent). Defaults to Content
1158
+ */
1159
+ search_on?: SearchOn;
1160
+ /**
1161
+ * Multiple terms to search over
1162
+ */
1163
+ terms?: Array<string> | null;
1164
+ };
1165
+ /**
1166
+ * The document search response object
1167
+ */
1168
+ export type EmailSearchResponse = {
1169
+ /**
1170
+ * List containing results from email threads
1171
+ */
1172
+ results: Array<EmailSearchResponseItemWithMetadata>;
1173
+ };
1174
+ /**
1175
+ * A single response item, part of the EmailSearchResponse object
1176
+ */
1177
+ export type EmailSearchResponseItem = {
1178
+ /**
1179
+ * The search results for the document
1180
+ * This may be empty if the search result match was on the email subject only
1181
+ */
1182
+ email_message_search_results: Array<EmailSearchResult>;
1183
+ /**
1184
+ * Standardized fields that all item types will share.
1185
+ * These field names are being aligned across all item types
1186
+ * for consistency in our data model.
1187
+ */
1188
+ id: string;
1189
+ /**
1190
+ * The inbox that owns the thread. Drives the multi-inbox indicator
1191
+ * when the caller has more than one inbox.
1192
+ */
1193
+ link_id: string;
1194
+ /**
1195
+ * Subject of the email thread
1196
+ */
1197
+ name?: string | null;
1198
+ owner_id: string;
1199
+ /**
1200
+ * The participants (senders) in this email thread
1201
+ */
1202
+ participants: Array<EmailSearchParticipant>;
1203
+ /**
1204
+ * The subject of the email
1205
+ * This is only present if the search result is on the message content
1206
+ */
1207
+ subject?: string | null;
1208
+ /**
1209
+ * The id of the email thread
1210
+ */
1211
+ thread_id: string;
1212
+ /**
1213
+ * The id of the owner of the email thread
1214
+ */
1215
+ user_id: string;
1216
+ };
1217
+ /**
1218
+ * EmailSearchResponseItem object with email metadata we fetch from email service. we don't store these
1219
+ * timestamps in opensearch as they would require us to update each email message record for the thread
1220
+ * every time the thread updates (specifically for updated_at and viewed_at)
1221
+ */
1222
+ export type EmailSearchResponseItemWithMetadata = EmailSearchResponseItem & {
1223
+ created_at: string;
1224
+ inbox_visible: boolean;
1225
+ is_draft: boolean;
1226
+ is_important: boolean;
1227
+ is_read: boolean;
1228
+ /**
1229
+ * Entity properties (e.g. tags) on the thread.
1230
+ */
1231
+ properties?: Array<SoupProperty> | null;
1232
+ snippet?: string | null;
1233
+ updated_at: string;
1234
+ viewed_at?: string | null;
1235
+ };
1236
+ /**
1237
+ * A email message match for a given thread id
1238
+ */
1239
+ export type EmailSearchResult = {
1240
+ /**
1241
+ * This is only present if the search result is on the message content
1242
+ */
1243
+ bcc: Array<string>;
1244
+ /**
1245
+ * This is only present if the search result is on the message content
1246
+ */
1247
+ cc: Array<string>;
1248
+ /**
1249
+ * The highlights for the email message
1250
+ */
1251
+ highlight: SearchHighlight;
1252
+ /**
1253
+ * This is only present if the search result is on the message content
1254
+ */
1255
+ labels: Array<string>;
1256
+ /**
1257
+ * The email message id.
1258
+ * This is only present if the search result is on the message content
1259
+ */
1260
+ message_id?: string | null;
1261
+ /**
1262
+ * The pretty sender.
1263
+ * If the match is on the subject, the pretty sender is the latest sender on the thread.
1264
+ * This could be the sender's email if there is no contact name for the sender.
1265
+ */
1266
+ pretty_sender: string;
1267
+ /**
1268
+ * This is only present if the search result is on the message content
1269
+ */
1270
+ recipients: Array<string>;
1271
+ /**
1272
+ * The score of the result
1273
+ */
1274
+ score?: number | null;
1275
+ /**
1276
+ * The sender.
1277
+ * If the match is on the subject, the sender is the latest sender on the thread.
1278
+ */
1279
+ sender: string;
1280
+ /**
1281
+ * When the email message was sent
1282
+ * This is only present if the search result is on the message content
1283
+ */
1284
+ sent_at?: string | null;
1285
+ };
1286
+ /**
1287
+ * A mailbox view the Email list scopes a search to, as its tabs do.
1288
+ */
1289
+ export type EmailSearchView = 'sent' | 'drafts';
1290
+ /**
1291
+ * Empty response is required due to custom fetch forcing `response.json()`
1292
+ */
1293
+ export type EmptyResponse = {
1294
+ [key: string]: unknown;
1295
+ };
1296
+ /**
1297
+ * a bundle of all of the filters for each entity type
1298
+ */
1299
+ export type EntityFilters = {
1300
+ /**
1301
+ * the bundled [AgentSessionFilters]
1302
+ */
1303
+ agent_session_filters?: AgentSessionFilters;
1304
+ /**
1305
+ * the bundled [CalendarEventFilters]
1306
+ */
1307
+ calendar_event_filters?: CalendarEventFilters;
1308
+ /**
1309
+ * the bundled [CallFilters]
1310
+ */
1311
+ call_filters?: CallFilters;
1312
+ /**
1313
+ * the bundled [ChannelFilters]
1314
+ */
1315
+ channel_filters?: ChannelFilters;
1316
+ /**
1317
+ * the bundled [ChannelThreadFilters]
1318
+ */
1319
+ channel_thread_filters?: ChannelThreadFilters;
1320
+ /**
1321
+ * the bundled [ChatFilters]
1322
+ */
1323
+ chat_filters?: ChatFilters;
1324
+ /**
1325
+ * the bundled [CrmCompanyFilters]
1326
+ */
1327
+ crm_company_filters?: CrmCompanyFilters;
1328
+ /**
1329
+ * the bundled [DocumentFilters]
1330
+ */
1331
+ document_filters?: DocumentFilters;
1332
+ /**
1333
+ * the bundled [EmailFilters]
1334
+ */
1335
+ email_filters?: EmailFilters;
1336
+ /**
1337
+ * Restrict results to the authenticated viewer's favorites when true.
1338
+ */
1339
+ favorites_only?: boolean | null;
1340
+ /**
1341
+ * the bundled [ForeignEntityFilters]
1342
+ */
1343
+ foreign_entity_filters?: ForeignEntityFilters;
1344
+ /**
1345
+ * Initiative filters. Initiatives are opt-in.
1346
+ */
1347
+ initiative_filters?: InitiativeFilters;
1348
+ /**
1349
+ * the bundled [ProjectFilters]
1350
+ */
1351
+ project_filters?: ProjectFilters;
1352
+ /**
1353
+ * property-based filters applied across entity types
1354
+ */
1355
+ property_filters?: Array<PropertyFilter>;
1356
+ /**
1357
+ * How the `tag_option_ids` combine: `any` (default) matches entities
1358
+ * holding at least one selected tag, `all` requires every selected tag.
1359
+ */
1360
+ tag_filter_mode?: TagFilterMode;
1361
+ /**
1362
+ * tag option ids matched against `properties.values`, OR'd together across
1363
+ * all tag definitions. Option ids are globally unique, so the match ignores
1364
+ * the owning definition id (personal and team tags combine into one OR).
1365
+ */
1366
+ tag_option_ids?: Array<string>;
1367
+ };
1368
+ /**
1369
+ * Entity reference for entity-type property values.
1370
+ */
1371
+ export type EntityReference = {
1372
+ entity_id: string;
1373
+ entity_type: EntityType;
1374
+ /**
1375
+ * For CHANNEL, CHAT, THREAD entity types - optional specific message ID.
1376
+ * This allows referencing a specific message within a thread/channel/chat.
1377
+ */
1378
+ specific_message_id?: string | null;
1379
+ };
1380
+ /**
1381
+ * Type of entity that can be referenced by entity properties.
1382
+ */
1383
+ export type EntityType = 'CALENDAR_EVENT' | 'CALL_RECORD' | 'CHANNEL' | 'CHAT' | 'COMPANY' | 'DATABASE_ROW' | 'CONTACT' | 'DOCUMENT' | 'INITIATIVE' | 'PROJECT' | 'TASK' | 'THREAD' | 'USER';
1384
+ /**
1385
+ * A plain old json error response for use with axum.
1386
+ * yup, thats it.
1387
+ */
1388
+ export type ErrorResponse = {
1389
+ /**
1390
+ * Message to explain failure
1391
+ */
1392
+ message: string;
1393
+ };
1394
+ /**
1395
+ * Generates a FileType enum and associated ContentType enum with their implementations.
1396
+ *
1397
+ * This macro takes a list of tuples in the format:
1398
+ * (Variant, "extension", "mime_type", CONTENT_TYPE_VARIANT)
1399
+ *
1400
+ * For each tuple it generates:
1401
+ * - A variant in the FileType enum
1402
+ * - A variant in the ContentType enum
1403
+ * - Implementations for:
1404
+ * - FileType::to_str() - Converts FileType to extension string
1405
+ * - FileType::from_str() - Converts extension string to FileType
1406
+ * - From<FileType> for ContentType - Maps FileType to ContentType
1407
+ * - ContentType::mime_type() - Gets MIME type for ContentType
1408
+ *
1409
+ */
1410
+ export type FileType = 'docx' | 'pdf' | 'md' | 'spreadsheet' | 'canvas' | 'coffee' | 'cson' | 'iced' | 'c' | 'i' | 'cpp' | 'cppm' | 'cc' | 'ccm' | 'cxx' | 'cxxm' | 'cplusplus' | 'cplusplusm' | 'hpp' | 'hh' | 'hxx' | 'hplusplus' | 'h' | 'ii' | 'ino' | 'inl' | 'ipp' | 'ixx' | 'tpp' | 'txx' | 'hppin' | 'hin' | 'cu' | 'cuh' | 'cs' | 'csx' | 'cake' | 'css' | 'dart' | 'diff' | 'patch' | 'rej' | 'dockerfile' | 'containerfile' | 'go' | 'handlebars' | 'hbs' | 'hjs' | 'hlsl' | 'hlsli' | 'fx' | 'fxh' | 'vsh' | 'psh' | 'cginc' | 'compute' | 'html' | 'htm' | 'shtml' | 'xhtml' | 'xht' | 'mdoc' | 'jsp' | 'asp' | 'aspx' | 'jshtm' | 'volt' | 'ejs' | 'rhtml' | 'ini' | 'conf' | 'properties' | 'cfg' | 'directory' | 'gitattributes' | 'gitconfig' | 'gitmodules' | 'editorconfig' | 'repo' | 'java' | 'jav' | 'jsx' | 'js' | 'es6' | 'mjs' | 'cjs' | 'pac' | 'json' | 'bowerrc' | 'jscsrc' | 'webmanifest' | 'jsmap' | 'cssmap' | 'tsmap' | 'har' | 'jslintrc' | 'jsonld' | 'geojson' | 'ipynb' | 'vuerc' | 'jsonc' | 'eslintrc' | 'eslintrcjson' | 'jsfmtrc' | 'jshintrc' | 'swcrc' | 'hintrc' | 'babelrc' | 'jsonl' | 'ndjson' | 'codesnippets' | 'jl' | 'jmd' | 'sty' | 'cls' | 'bbx' | 'cbx' | 'tex' | 'ltx' | 'ctx' | 'bib' | 'less' | 'log' | 'lua' | 'mak' | 'mk' | 'mkd' | 'mdwn' | 'mdown' | 'markdown' | 'markdn' | 'mdtxt' | 'mdtext' | 'workbook' | 'm' | 'mm' | 'pl' | 'pm' | 'pod' | 't' | 'psgi' | 'raku' | 'rakumod' | 'rakutest' | 'rakudoc' | 'nqp' | 'p6' | 'pl6' | 'pm6' | 'php' | 'php4' | 'php5' | 'phtml' | 'ctp' | 'ps1' | 'psm1' | 'psd1' | 'pssc' | 'psrc' | 'py' | 'rpy' | 'pyw' | 'cpy' | 'gyp' | 'gypi' | 'pyi' | 'ipy' | 'pyt' | 'r' | 'rhistory' | 'rprofile' | 'rt' | 'cshtml' | 'razor' | 'rb' | 'rbx' | 'rjs' | 'gemspec' | 'rake' | 'ru' | 'erb' | 'podspec' | 'rbi' | 'rs' | 'scss' | 'sass' | 'shader' | 'sh' | 'bash' | 'bashrc' | 'bashaliases' | 'bashprofile' | 'bashlogin' | 'ebuild' | 'eclass' | 'profile' | 'bashlogout' | 'xprofile' | 'xsession' | 'xsessionrc' | 'zsh' | 'zshrc' | 'zprofile' | 'zlogin' | 'zlogout' | 'zshenv' | 'zshtheme' | 'fish' | 'ksh' | 'csh' | 'cshrc' | 'tcshrc' | 'yashrc' | 'yashprofile' | 'sql' | 'dsql' | 'swift' | 'ts' | 'cts' | 'mts' | 'tsx' | 'tsbuildinfo' | 'xml' | 'xsd' | 'ascx' | 'atom' | 'axml' | 'axaml' | 'bpmn' | 'cpt' | 'csl' | 'csproj' | 'csprojuser' | 'dita' | 'ditamap' | 'dtd' | 'ent' | 'mod' | 'dtml' | 'fsproj' | 'fxml' | 'iml' | 'isml' | 'jmx' | 'launch' | 'menu' | 'mxml' | 'nuspec' | 'opml' | 'owl' | 'proj' | 'props' | 'pt' | 'publishsettings' | 'pubxml' | 'pubxmluser' | 'rbxlx' | 'rbxmx' | 'rdf' | 'rng' | 'rss' | 'shproj' | 'storyboard' | 'targets' | 'tld' | 'tmx' | 'vbproj' | 'vbprojuser' | 'vcxproj' | 'vcxprojfilters' | 'wsdl' | 'wxi' | 'wxl' | 'wxs' | 'xaml' | 'xbl' | 'xib' | 'xlf' | 'xliff' | 'xpdl' | 'xul' | 'xoml' | 'xsl' | 'xslt' | 'yaml' | 'yml' | 'eyaml' | 'eyml' | 'cff' | 'yamltmlanguage' | 'yamltmpreferences' | 'yamltmtheme' | 'winget' | 'txt' | 'csv' | 'tsv' | 'jpeg' | 'jpg' | 'png' | 'gif' | 'svg' | 'webp' | 'avif' | 'bmp' | 'ico' | 'tiff' | 'tif' | 'heic' | 'heif' | 'tar' | 'targz' | 'tgz' | 'gz' | 'bz2' | 'tarbz2' | 'tbz2' | 'z' | 'tarz' | 'lz' | 'tarlz' | 'xz' | 'tarxz' | 'txz' | 'lzma' | 'tarlzma' | 'rar' | 'sevenz' | 'zst' | 'tarzst' | 'tzst' | 'zip' | 'exe' | 'msi' | 'dll' | 'bat' | 'cmd' | 'com' | 'appimage' | 'app' | 'bin' | 'deb' | 'rpm' | 'apk' | 'dmg' | 'pkg' | 'crx' | 'xpi' | 'mp3' | 'wav' | 'ogg' | 'flac' | 'aac' | 'm4a' | 'wma' | 'mid' | 'midi' | 'mp4' | 'mkv' | 'webm' | 'avi' | 'mov' | 'wmv' | 'mpg' | 'mpeg' | 'm4v' | 'flv' | 'f4v' | 'threegp' | 'ttf' | 'otf' | 'woff' | 'woff2' | 'eot' | 'rtf' | 'odt' | 'ods' | 'odp' | 'odg' | 'odf' | 'epub' | 'mobi' | 'azw' | 'azw3' | 'djvu' | 'xls' | 'xlsm' | 'ppt' | 'doc' | 'pptx' | 'xlsx' | 'db' | 'sqlite' | 'sqlite3' | 'mdb' | 'accdb' | 'dbf' | 'plist' | 'toml' | 'env' | 'dot' | 'gv' | 'torrent' | 'ics' | 'vcf' | 'ai' | 'eps' | 'ps' | 'dxf' | 'dwg' | 'fig' | 'psd' | 'psb' | 'stl' | 'obj' | 'fbx' | 'blend' | 'dae' | 'threeds' | 'gltf' | 'glb' | 'vhd' | 'vhdx' | 'vmdk' | 'ova' | 'ovf' | 'iso' | 'img' | 'swf';
1411
+ /**
1412
+ * Filters for foreign entity records.
1413
+ */
1414
+ export type ForeignEntityFilters = {
1415
+ /**
1416
+ * External entity identifiers to filter by. Empty to include all external IDs.
1417
+ */
1418
+ foreign_entity_ids?: Array<string>;
1419
+ /**
1420
+ * External source names to filter by. Empty to include all sources.
1421
+ */
1422
+ foreign_entity_sources?: Array<string>;
1423
+ /**
1424
+ * Internal foreign entity record IDs to filter by. Empty to include all records.
1425
+ */
1426
+ ids?: Array<string>;
1427
+ /**
1428
+ * When true, only return foreign entities whose metadata lists the requesting user as a
1429
+ * participant (GitHub `involves:me` semantics for `github_pull_request` records). False or
1430
+ * absent applies no filter. Serialized in filter ASTs as the `"me"` literal.
1431
+ */
1432
+ includes_me?: boolean;
1433
+ /**
1434
+ * Filter by the notification state of the foreign entity (e.g. whether the requesting user's
1435
+ * GitHub PR notification is done/seen).
1436
+ */
1437
+ notification_filters?: NotificationFilters;
1438
+ };
1439
+ /**
1440
+ * The search service version of a highlight
1441
+ */
1442
+ export type Highlight = {
1443
+ /**
1444
+ * If the match was on the entity content, this will provide a list of highlights
1445
+ * for each content match
1446
+ */
1447
+ content?: Array<string>;
1448
+ /**
1449
+ * If the match was on the entity name, this will be present with that highlight
1450
+ */
1451
+ name?: string | null;
1452
+ };
1453
+ /**
1454
+ * Filters for initiatives.
1455
+ */
1456
+ export type InitiativeFilters = {
1457
+ /**
1458
+ * Inclusive lower due-date bound.
1459
+ */
1460
+ due_after?: string | null;
1461
+ /**
1462
+ * Inclusive upper due-date bound.
1463
+ */
1464
+ due_before?: string | null;
1465
+ /**
1466
+ * Opt this query into initiatives at all. Initiatives are off by
1467
+ * default — see [`crate::ast::initiative::InitiativeLiteral::Include`].
1468
+ * Asking for specific `initiative_ids`, `owners` or `notification_filters`
1469
+ * also opts in.
1470
+ */
1471
+ include?: boolean;
1472
+ /**
1473
+ * Initiative ids to filter by. Empty to include all accessible initiatives.
1474
+ */
1475
+ initiative_ids?: Array<string>;
1476
+ /**
1477
+ * Case-insensitive name substring.
1478
+ */
1479
+ name?: string | null;
1480
+ /**
1481
+ * Filter by initiative notification state.
1482
+ */
1483
+ notification_filters?: NotificationFilters;
1484
+ /**
1485
+ * Filter by initiative owner principal — a user ('macro|user@example.com'), a
1486
+ * bot ('bot|<uuid>'), or a team (a bare hyphenated uuid). Empty to include
1487
+ * every owner.
1488
+ */
1489
+ owners?: Array<string>;
1490
+ };
1491
+ export type MatchType = 'exact' | 'partial' | 'regexp' | 'query';
1492
+ /**
1493
+ * Notification-level filters that apply to an entity type.
1494
+ */
1495
+ export type NotificationFilters = {
1496
+ /**
1497
+ * Include entities with a non-deleted notification in any of these exact states.
1498
+ * Empty means no notification restriction. Active means `[unseen, seen]`.
1499
+ */
1500
+ states?: Array<NotificationState>;
1501
+ };
1502
+ /**
1503
+ * The mutually exclusive lifecycle states of a user's notification.
1504
+ */
1505
+ export type NotificationState = 'unseen' | 'seen' | 'done';
1506
+ /**
1507
+ * The project filters used to filter down what projects you search over.
1508
+ */
1509
+ export type ProjectFilters = {
1510
+ /**
1511
+ * Filter by project importance. None to ignore, true to pass through (no clause), false to short-circuit and return nothing.
1512
+ */
1513
+ importance?: boolean | null;
1514
+ /**
1515
+ * When true, `project_ids` also matches the projects themselves in addition to their children.
1516
+ */
1517
+ include_root?: boolean;
1518
+ /**
1519
+ * Filter by project notification state.
1520
+ */
1521
+ notification_filters?: NotificationFilters;
1522
+ /**
1523
+ * Filter by project owner principal — a user ('macro|user@example.com'), a bot
1524
+ * ('bot|<uuid>'), or a team (a bare hyphenated uuid). Examples:
1525
+ * ['macro|user@example.com'], ['macro|user@example.com', 'bot|0199...']. Empty to
1526
+ * search all owners.
1527
+ */
1528
+ owners?: Array<string>;
1529
+ /**
1530
+ * Project IDs to search within. Examples: ['project1']. Empty to search all accessible projects.
1531
+ * By default matches children of these projects; set `include_root` to also match the projects themselves.
1532
+ */
1533
+ project_ids?: Array<string>;
1534
+ };
1535
+ /**
1536
+ * Metadata for a project fetched from the database
1537
+ */
1538
+ export type ProjectMetadata = {
1539
+ created_at: string;
1540
+ deleted_at?: string | null;
1541
+ parent_project_id?: string | null;
1542
+ updated_at: string;
1543
+ viewed_at?: string | null;
1544
+ };
1545
+ /**
1546
+ * Metadata associated with Project Search, to be used with SearchResponseItem
1547
+ */
1548
+ export type ProjectSearchMetadata = {
1549
+ created_at: string;
1550
+ owner_id: string;
1551
+ project_id: string;
1552
+ project_name: string;
1553
+ updated_at: string;
1554
+ };
1555
+ export type ProjectSearchRequest = (null | ProjectFilters) & {
1556
+ /**
1557
+ * If true, returns only 1 result per entity. False by default.
1558
+ */
1559
+ collapse?: boolean | null;
1560
+ /**
1561
+ * The match type to use when searching
1562
+ */
1563
+ match_type: MatchType;
1564
+ /**
1565
+ * The query to search for
1566
+ */
1567
+ query?: string | null;
1568
+ /**
1569
+ * Fields to search on (Name, Content, NameContent). Defaults to Content
1570
+ */
1571
+ search_on?: SearchOn;
1572
+ /**
1573
+ * Multiple terms to search over
1574
+ */
1575
+ terms?: Array<string> | null;
1576
+ };
1577
+ /**
1578
+ * A single response item, part of the ProjectSearchResponse object
1579
+ */
1580
+ export type ProjectSearchResponseItem = {
1581
+ created_at: string;
1582
+ /**
1583
+ * Standardized fields that all item types will share.
1584
+ * These field names are being aligned across all item types
1585
+ * for consistency in our data model.
1586
+ */
1587
+ id: string;
1588
+ name: string;
1589
+ owner_id: string;
1590
+ project_search_results: Array<ProjectSearchResult>;
1591
+ updated_at: string;
1592
+ };
1593
+ /**
1594
+ * ProjectSearchResponseItem object with project metadata we fetch from macrodb.
1595
+ * The index carries created_at/updated_at for ranking, but viewed_at is
1596
+ * per-user and deleted_at changes without a reindex, so metadata stays
1597
+ * database-sourced.
1598
+ */
1599
+ export type ProjectSearchResponseItemWithMetadata = ProjectSearchResponseItem & {
1600
+ metadata?: null | ProjectMetadata;
1601
+ /**
1602
+ * Entity properties (e.g. tags) on the project.
1603
+ */
1604
+ properties?: Array<SoupProperty> | null;
1605
+ };
1606
+ export type ProjectSearchResult = {
1607
+ highlight: SearchHighlight;
1608
+ /**
1609
+ * The score of the result
1610
+ */
1611
+ score?: number | null;
1612
+ };
1613
+ /**
1614
+ * UTC timestamp interval. Lower bounds are inclusive; upper bounds are exclusive.
1615
+ */
1616
+ export type PropertyDateFilterRange = {
1617
+ /**
1618
+ * Exclusive UTC upper bound, omitted for an open end.
1619
+ */
1620
+ end?: string | null;
1621
+ /**
1622
+ * Inclusive UTC lower bound, omitted for an open start.
1623
+ */
1624
+ start?: string | null;
1625
+ };
1626
+ /**
1627
+ * Property definition model (service representation).
1628
+ */
1629
+ export type PropertyDefinition = {
1630
+ created_at: string;
1631
+ data_type: DataType;
1632
+ display_name: string;
1633
+ id: string;
1634
+ /**
1635
+ * Flag to indicate if this is a system-generated metadata property.
1636
+ * Not stored in database - computed at service layer.
1637
+ */
1638
+ is_metadata: boolean;
1639
+ is_multi_select: boolean;
1640
+ /**
1641
+ * Flag to indicate if this is a system property (stored in DB).
1642
+ */
1643
+ is_system: boolean;
1644
+ owner: PropertyOwner;
1645
+ specific_entity_type: null | EntityType;
1646
+ updated_at: string;
1647
+ };
1648
+ /**
1649
+ * A single property-based filter condition.
1650
+ *
1651
+ * Each filter targets a specific property definition on entities of a given type,
1652
+ * matching against select option UUIDs or entity reference IDs.
1653
+ * Multiple values within a single filter are OR'd together.
1654
+ * Multiple filters are AND'd together.
1655
+ */
1656
+ export type PropertyFilter = {
1657
+ date_range?: null | PropertyDateFilterRange;
1658
+ /**
1659
+ * Entity reference IDs to match. Multiple values are OR'd together.
1660
+ */
1661
+ entity_ids?: Array<string>;
1662
+ /**
1663
+ * The entity type for the property lookup (e.g., "TASK", "DOCUMENT", "PROJECT").
1664
+ * When None, matches across all entity types.
1665
+ */
1666
+ entity_type?: string | null;
1667
+ /**
1668
+ * Flat Soup/search presence filter: true expands to an open date range, false to its negation.
1669
+ */
1670
+ has_date?: boolean | null;
1671
+ /**
1672
+ * Select option UUIDs to match. Multiple values are OR'd together.
1673
+ */
1674
+ option_ids?: Array<string>;
1675
+ /**
1676
+ * The UUID of the property definition to filter on.
1677
+ */
1678
+ property_definition_id: string;
1679
+ };
1680
+ /**
1681
+ * Defines who owns a property - user-scoped, team-scoped, database-scoped, or system.
1682
+ */
1683
+ export type PropertyOwner = {
1684
+ scope: 'user';
1685
+ user_id: string;
1686
+ } | {
1687
+ scope: 'team';
1688
+ team_id: string;
1689
+ } | {
1690
+ database_id: string;
1691
+ scope: 'database';
1692
+ } | {
1693
+ scope: 'system';
1694
+ };
1695
+ /**
1696
+ * Property value (service representation).
1697
+ *
1698
+ * Represents the actual value stored for an entity property.
1699
+ * This is serialized to/from JSONB in the database.
1700
+ */
1701
+ export type PropertyValue = {
1702
+ type: 'Boolean';
1703
+ /**
1704
+ * Boolean value
1705
+ * Serializes as: {"type": "Boolean", "value": true}
1706
+ */
1707
+ value: boolean;
1708
+ } | {
1709
+ type: 'Number';
1710
+ /**
1711
+ * Numeric value
1712
+ * Serializes as: {"type": "Number", "value": 42.5}
1713
+ */
1714
+ value: number;
1715
+ } | {
1716
+ type: 'String';
1717
+ /**
1718
+ * String value
1719
+ * Serializes as: {"type": "String", "value": "text"}
1720
+ */
1721
+ value: string;
1722
+ } | {
1723
+ type: 'Date';
1724
+ /**
1725
+ * Date/timestamp value
1726
+ * Serializes as: {"type": "Date", "value": "2025-01-01T00:00:00Z"}
1727
+ */
1728
+ value: string;
1729
+ } | {
1730
+ type: 'DateRange';
1731
+ /**
1732
+ * Date range value
1733
+ * Serializes as: {"type": "DateRange", "value": {"start": "2025-01-01T00:00:00Z", "end": "2025-01-31T00:00:00Z"}}
1734
+ */
1735
+ value: DateRange;
1736
+ } | {
1737
+ type: 'SelectOption';
1738
+ /**
1739
+ * Select option(s) - always an array (check is_multi_select to determine if single or multi)
1740
+ * Single-select: {"type": "SelectOption", "value": ["uuid"]} (length 0 or 1)
1741
+ * Multi-select: {"type": "SelectOption", "value": ["uuid1", "uuid2", ...]} (length 0+)
1742
+ */
1743
+ value: Array<string>;
1744
+ } | {
1745
+ type: 'EntityReference';
1746
+ /**
1747
+ * Entity reference(s) - always an array (check is_multi_select to determine if single or multi)
1748
+ * Single-select: {"type": "EntityReference", "value": [{...}]} (length 0 or 1)
1749
+ * Multi-select: {"type": "EntityReference", "value": [{...}, {...}, ...]} (length 0+)
1750
+ */
1751
+ value: Array<EntityReference>;
1752
+ } | {
1753
+ type: 'Link';
1754
+ /**
1755
+ * Link value(s) - always an array (check is_multi_select to determine if single or multi)
1756
+ * Single-select: {"type": "Link", "value": ["https://example.com"]} (length 0 or 1)
1757
+ * Multi-select: {"type": "Link", "value": ["https://example.com", "https://other.com"]} (length 0+)
1758
+ */
1759
+ value: Array<string>;
1760
+ };
1761
+ /**
1762
+ * Stable navigation target from the fold, independent of raw ACP log IDs.
1763
+ */
1764
+ export type SearchGotoAgentSession = {
1765
+ /**
1766
+ * Author within the turn.
1767
+ */
1768
+ author: AgentSessionAuthor;
1769
+ /**
1770
+ * Fold-assigned turn.
1771
+ */
1772
+ message_turn: number;
1773
+ };
1774
+ export type SearchGotoCallRecord = {
1775
+ channel_id?: string | null;
1776
+ ended_at?: string | null;
1777
+ participant_ids: Array<string>;
1778
+ sequence_num: number;
1779
+ speaker_id: string;
1780
+ started_at: string;
1781
+ transcript_id: string;
1782
+ };
1783
+ export type SearchGotoChannel = {
1784
+ /**
1785
+ * The channel message id
1786
+ */
1787
+ channel_message_id: string;
1788
+ };
1789
+ export type SearchGotoChat = {
1790
+ /**
1791
+ * The chat message id
1792
+ */
1793
+ chat_message_id: string;
1794
+ /**
1795
+ * The role of the chat message
1796
+ */
1797
+ role: string;
1798
+ };
1799
+ /**
1800
+ * The search service version of a goto
1801
+ */
1802
+ export type SearchGotoContent = SearchGotoAgentSession | SearchGotoDocument | SearchGotoChat | SearchGotoEmail | SearchGotoChannel | SearchGotoCallRecord;
1803
+ export type SearchGotoDocument = {
1804
+ /**
1805
+ * The node id of the document
1806
+ * This can be a stringified page number 0-indexed for pdf/docx files,
1807
+ * or it can be a unique id that is used in lexical for markdown files.
1808
+ */
1809
+ node_id: string;
1810
+ /**
1811
+ * The raw content of the document
1812
+ */
1813
+ raw_content?: string | null;
1814
+ };
1815
+ export type SearchGotoEmail = {
1816
+ bcc: Array<string>;
1817
+ cc: Array<string>;
1818
+ /**
1819
+ * The email message id
1820
+ */
1821
+ email_message_id: string;
1822
+ labels: Array<string>;
1823
+ recipients: Array<string>;
1824
+ sender: string;
1825
+ sent_at?: string | null;
1826
+ };
1827
+ export type SearchHighlight = {
1828
+ /**
1829
+ * The highlight match on the bcc (email only)
1830
+ */
1831
+ bcc?: Array<string>;
1832
+ /**
1833
+ * The highlight match on the cc (email only)
1834
+ */
1835
+ cc?: Array<string>;
1836
+ /**
1837
+ * The highlight match on the content field
1838
+ */
1839
+ content?: Array<string>;
1840
+ /**
1841
+ * The highlight match on the name field
1842
+ */
1843
+ name?: string | null;
1844
+ /**
1845
+ * The highlight match on the recipients (email only)
1846
+ */
1847
+ recipients?: Array<string>;
1848
+ /**
1849
+ * The highlight match on the sender (email only)
1850
+ */
1851
+ sender?: string | null;
1852
+ /**
1853
+ * The highlight match on the user (owner) of the entity
1854
+ */
1855
+ user_id?: string | null;
1856
+ };
1857
+ export type SearchOn = 'name' | 'content' | 'name_content';
1858
+ export type SearchResponse = {
1859
+ /**
1860
+ * List containing results from a request
1861
+ */
1862
+ results: Array<ProjectSearchResponseItemWithMetadata>;
1863
+ };
1864
+ /**
1865
+ * Controls whether shared email threads are included in results.
1866
+ */
1867
+ export type SharedEmailFilter = 'exclude' | 'include' | 'only';
1868
+ export type SimpleCalendarEventSearchResponseBaseItemHumanReadableTimestamp = {
1869
+ /**
1870
+ * The calendar event id
1871
+ */
1872
+ calendar_event_id: string;
1873
+ /**
1874
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
1875
+ */
1876
+ created_at: string;
1877
+ /**
1878
+ * The highlights on the event
1879
+ */
1880
+ highlight: SearchHighlight;
1881
+ /**
1882
+ * Whether the series carries a recurrence rule
1883
+ */
1884
+ is_recurring: boolean;
1885
+ /**
1886
+ * Stable key of the instance this row points at, when one resolved
1887
+ */
1888
+ occurrence_key?: string | null;
1889
+ /**
1890
+ * The event title
1891
+ */
1892
+ title: string;
1893
+ /**
1894
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
1895
+ */
1896
+ updated_at: string;
1897
+ /**
1898
+ * The owner of this event projection
1899
+ */
1900
+ user_id: string;
1901
+ };
1902
+ export type SimpleCallRecordSearchResponseBaseItemHumanReadableTimestamp = {
1903
+ call_id: string;
1904
+ channel_id?: string | null;
1905
+ channel_name?: string | null;
1906
+ duration_ms: number;
1907
+ /**
1908
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
1909
+ */
1910
+ ended_at: string;
1911
+ highlight: SearchHighlight;
1912
+ participant_ids: Array<string>;
1913
+ /**
1914
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
1915
+ */
1916
+ started_at: string;
1917
+ user_id: string;
1918
+ };
1919
+ export type SimpleChannelSearchReponseBaseItem = {
1920
+ /**
1921
+ * The channel id
1922
+ */
1923
+ channel_id: string;
1924
+ /**
1925
+ * The channel type
1926
+ */
1927
+ channel_type: string;
1928
+ /**
1929
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
1930
+ */
1931
+ created_at: string;
1932
+ /**
1933
+ * The highlights on the channel message
1934
+ */
1935
+ highlight: SearchHighlight;
1936
+ /**
1937
+ * The mentions
1938
+ */
1939
+ mentions: Array<string>;
1940
+ /**
1941
+ * The message id
1942
+ */
1943
+ message_id: string;
1944
+ /**
1945
+ * The org id
1946
+ */
1947
+ org_id?: number | null;
1948
+ /**
1949
+ * The sender id
1950
+ */
1951
+ sender_id: string;
1952
+ /**
1953
+ * The thread id
1954
+ */
1955
+ thread_id?: string | null;
1956
+ /**
1957
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
1958
+ */
1959
+ updated_at: string;
1960
+ };
1961
+ export type SimpleChannelSearchReponseBaseItemHumanReadableTimestamp = {
1962
+ /**
1963
+ * The channel id
1964
+ */
1965
+ channel_id: string;
1966
+ /**
1967
+ * The channel type
1968
+ */
1969
+ channel_type: string;
1970
+ /**
1971
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
1972
+ */
1973
+ created_at: string;
1974
+ /**
1975
+ * The highlights on the channel message
1976
+ */
1977
+ highlight: SearchHighlight;
1978
+ /**
1979
+ * The mentions
1980
+ */
1981
+ mentions: Array<string>;
1982
+ /**
1983
+ * The message id
1984
+ */
1985
+ message_id: string;
1986
+ /**
1987
+ * The org id
1988
+ */
1989
+ org_id?: number | null;
1990
+ /**
1991
+ * The sender id
1992
+ */
1993
+ sender_id: string;
1994
+ /**
1995
+ * The thread id
1996
+ */
1997
+ thread_id?: string | null;
1998
+ /**
1999
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
2000
+ */
2001
+ updated_at: string;
2002
+ };
2003
+ export type SimpleChannelSearchResponse = {
2004
+ /**
2005
+ * List containing results from channels.
2006
+ * Each item in the list is for a specific message in a channel.
2007
+ */
2008
+ results: Array<SimpleChannelSearchReponseBaseItem>;
2009
+ };
2010
+ export type SimpleChatSearchResponse = {
2011
+ /**
2012
+ * List containing results from chats.
2013
+ * Each item in the list is for a specific message in a chat.
2014
+ */
2015
+ results: Array<SimpleChatSearchResponseBaseItem>;
2016
+ };
2017
+ export type SimpleChatSearchResponseBaseItem = {
2018
+ /**
2019
+ * The chat id
2020
+ */
2021
+ chat_id: string;
2022
+ /**
2023
+ * The chat message id
2024
+ */
2025
+ chat_message_id: string;
2026
+ /**
2027
+ * The highlights on the chat
2028
+ */
2029
+ highlight: SearchHighlight;
2030
+ /**
2031
+ * The role
2032
+ */
2033
+ role: string;
2034
+ /**
2035
+ * The title
2036
+ */
2037
+ title: string;
2038
+ /**
2039
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
2040
+ */
2041
+ updated_at: string;
2042
+ /**
2043
+ * The user id
2044
+ */
2045
+ user_id: string;
2046
+ };
2047
+ export type SimpleChatSearchResponseBaseItemHumanReadableTimestamp = {
2048
+ /**
2049
+ * The chat id
2050
+ */
2051
+ chat_id: string;
2052
+ /**
2053
+ * The chat message id
2054
+ */
2055
+ chat_message_id: string;
2056
+ /**
2057
+ * The highlights on the chat
2058
+ */
2059
+ highlight: SearchHighlight;
2060
+ /**
2061
+ * The role
2062
+ */
2063
+ role: string;
2064
+ /**
2065
+ * The title
2066
+ */
2067
+ title: string;
2068
+ /**
2069
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
2070
+ */
2071
+ updated_at: string;
2072
+ /**
2073
+ * The user id
2074
+ */
2075
+ user_id: string;
2076
+ };
2077
+ export type SimpleDocumentSearchResponse = {
2078
+ /**
2079
+ * List containing results from documents.
2080
+ * Each item in the list is for a specific page/node of a document.
2081
+ */
2082
+ results: Array<SimpleDocumentSearchResponseBaseItem>;
2083
+ };
2084
+ export type SimpleDocumentSearchResponseBaseItem = {
2085
+ /**
2086
+ * The document id
2087
+ */
2088
+ document_id: string;
2089
+ /**
2090
+ * The document name
2091
+ */
2092
+ document_name: string;
2093
+ /**
2094
+ * The file type
2095
+ */
2096
+ file_type: string;
2097
+ /**
2098
+ * The highlights on the document
2099
+ */
2100
+ highlight: SearchHighlight;
2101
+ /**
2102
+ * The node id
2103
+ */
2104
+ node_id: string;
2105
+ /**
2106
+ * The owner id
2107
+ */
2108
+ owner_id: string;
2109
+ /**
2110
+ * The raw content of the document
2111
+ */
2112
+ raw_content?: string | null;
2113
+ /**
2114
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
2115
+ */
2116
+ updated_at: string;
2117
+ };
2118
+ export type SimpleDocumentSearchResponseBaseItemHumanReadableTimestamp = {
2119
+ /**
2120
+ * The document id
2121
+ */
2122
+ document_id: string;
2123
+ /**
2124
+ * The document name
2125
+ */
2126
+ document_name: string;
2127
+ /**
2128
+ * The file type
2129
+ */
2130
+ file_type: string;
2131
+ /**
2132
+ * The highlights on the document
2133
+ */
2134
+ highlight: SearchHighlight;
2135
+ /**
2136
+ * The node id
2137
+ */
2138
+ node_id: string;
2139
+ /**
2140
+ * The owner id
2141
+ */
2142
+ owner_id: string;
2143
+ /**
2144
+ * The raw content of the document
2145
+ */
2146
+ raw_content?: string | null;
2147
+ /**
2148
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
2149
+ */
2150
+ updated_at: string;
2151
+ };
2152
+ export type SimpleEmailSearchResponse = {
2153
+ /**
2154
+ * List containing results from emails.
2155
+ * Each item in the list is for a specific message in an email thread.
2156
+ */
2157
+ results: Array<SimpleEmailSearchResponseBaseItem>;
2158
+ };
2159
+ export type SimpleEmailSearchResponseBaseItem = {
2160
+ /**
2161
+ * The bcc
2162
+ */
2163
+ bcc: Array<string>;
2164
+ /**
2165
+ * The cc
2166
+ */
2167
+ cc: Array<string>;
2168
+ /**
2169
+ * The highlights on the email
2170
+ */
2171
+ highlight: SearchHighlight;
2172
+ /**
2173
+ * The labels
2174
+ */
2175
+ labels: Array<string>;
2176
+ /**
2177
+ * The link id
2178
+ */
2179
+ link_id: string;
2180
+ /**
2181
+ * The message id
2182
+ */
2183
+ message_id: string;
2184
+ /**
2185
+ * The recipients
2186
+ */
2187
+ recipients: Array<string>;
2188
+ /**
2189
+ * The sender
2190
+ */
2191
+ sender: string;
2192
+ /**
2193
+ * The time the email was sent
2194
+ */
2195
+ sent_at?: null | string;
2196
+ /**
2197
+ * The subject
2198
+ */
2199
+ subject?: string | null;
2200
+ /**
2201
+ * The thread id
2202
+ */
2203
+ thread_id: string;
2204
+ /**
2205
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
2206
+ */
2207
+ updated_at: string;
2208
+ /**
2209
+ * The user id
2210
+ */
2211
+ user_id: string;
2212
+ };
2213
+ export type SimpleEmailSearchResponseBaseItemHumanReadableTimestamp = {
2214
+ /**
2215
+ * The bcc
2216
+ */
2217
+ bcc: Array<string>;
2218
+ /**
2219
+ * The cc
2220
+ */
2221
+ cc: Array<string>;
2222
+ /**
2223
+ * The highlights on the email
2224
+ */
2225
+ highlight: SearchHighlight;
2226
+ /**
2227
+ * The labels
2228
+ */
2229
+ labels: Array<string>;
2230
+ /**
2231
+ * The link id
2232
+ */
2233
+ link_id: string;
2234
+ /**
2235
+ * The message id
2236
+ */
2237
+ message_id: string;
2238
+ /**
2239
+ * The recipients
2240
+ */
2241
+ recipients: Array<string>;
2242
+ /**
2243
+ * The sender
2244
+ */
2245
+ sender: string;
2246
+ /**
2247
+ * The time the email was sent
2248
+ */
2249
+ sent_at?: null | string;
2250
+ /**
2251
+ * The subject
2252
+ */
2253
+ subject?: string | null;
2254
+ /**
2255
+ * The thread id
2256
+ */
2257
+ thread_id: string;
2258
+ /**
2259
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
2260
+ */
2261
+ updated_at: string;
2262
+ /**
2263
+ * The user id
2264
+ */
2265
+ user_id: string;
2266
+ };
2267
+ export type SimpleProjectSearchResponse = {
2268
+ /**
2269
+ * List containing results from projects.
2270
+ * Each item in the list is for a specific project.
2271
+ */
2272
+ results: Array<SimpleProjectSearchResponseBaseItem>;
2273
+ };
2274
+ export type SimpleProjectSearchResponseBaseItem = {
2275
+ /**
2276
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
2277
+ */
2278
+ created_at: string;
2279
+ /**
2280
+ * The highlights on the project
2281
+ */
2282
+ highlight: SearchHighlight;
2283
+ /**
2284
+ * The project id
2285
+ */
2286
+ project_id: string;
2287
+ /**
2288
+ * The project name
2289
+ */
2290
+ project_name: string;
2291
+ /**
2292
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
2293
+ */
2294
+ updated_at: string;
2295
+ /**
2296
+ * The id of the user who created the project
2297
+ */
2298
+ user_id: string;
2299
+ };
2300
+ export type SimpleProjectSearchResponseBaseItemHumanReadableTimestamp = {
2301
+ /**
2302
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
2303
+ */
2304
+ created_at: string;
2305
+ /**
2306
+ * The highlights on the project
2307
+ */
2308
+ highlight: SearchHighlight;
2309
+ /**
2310
+ * The project id
2311
+ */
2312
+ project_id: string;
2313
+ /**
2314
+ * The project name
2315
+ */
2316
+ project_name: string;
2317
+ /**
2318
+ * DateTime<Utc> ts_seconds deserialization + RFC3339 serialization
2319
+ */
2320
+ updated_at: string;
2321
+ /**
2322
+ * The id of the user who created the project
2323
+ */
2324
+ user_id: string;
2325
+ };
2326
+ /**
2327
+ * The response for simple search
2328
+ */
2329
+ export type SimpleSearchResponse = {
2330
+ results: Array<SimpleSearchResponseItem>;
2331
+ };
2332
+ /**
2333
+ * Simple response item to mimic what we get back from opensearch
2334
+ */
2335
+ export type SimpleSearchResponseItem = {
2336
+ /**
2337
+ * ID of the chat, channel, email, or document
2338
+ */
2339
+ entity_id: string;
2340
+ entity_type: string;
2341
+ goto?: null | SearchGotoContent;
2342
+ highlight: Highlight;
2343
+ score?: number | null;
2344
+ };
2345
+ export type SimpleUnifiedSearchBaseResponse = {
2346
+ results: Array<SimpleUnifiedSearchResponseBaseItemHumanReadableTimestamp>;
2347
+ };
2348
+ export type SimpleUnifiedSearchResponseBaseItem = (SimpleDocumentSearchResponseBaseItemHumanReadableTimestamp & {
2349
+ type: 'document';
2350
+ }) | (SimpleChatSearchResponseBaseItemHumanReadableTimestamp & {
2351
+ type: 'chat';
2352
+ }) | (SimpleEmailSearchResponseBaseItemHumanReadableTimestamp & {
2353
+ type: 'email';
2354
+ }) | (SimpleChannelSearchReponseBaseItemHumanReadableTimestamp & {
2355
+ type: 'channel';
2356
+ }) | (SimpleProjectSearchResponseBaseItemHumanReadableTimestamp & {
2357
+ type: 'project';
2358
+ }) | (SimpleCallRecordSearchResponseBaseItemHumanReadableTimestamp & {
2359
+ type: 'call';
2360
+ }) | (SimpleCalendarEventSearchResponseBaseItemHumanReadableTimestamp & {
2361
+ type: 'calendarEvent';
2362
+ });
2363
+ export type SimpleUnifiedSearchResponseBaseItemHumanReadableTimestamp = (SimpleDocumentSearchResponseBaseItemHumanReadableTimestamp & {
2364
+ type: 'document';
2365
+ }) | (SimpleChatSearchResponseBaseItemHumanReadableTimestamp & {
2366
+ type: 'chat';
2367
+ }) | (SimpleEmailSearchResponseBaseItemHumanReadableTimestamp & {
2368
+ type: 'email';
2369
+ }) | (SimpleChannelSearchReponseBaseItemHumanReadableTimestamp & {
2370
+ type: 'channel';
2371
+ }) | (SimpleProjectSearchResponseBaseItemHumanReadableTimestamp & {
2372
+ type: 'project';
2373
+ }) | (SimpleCallRecordSearchResponseBaseItemHumanReadableTimestamp & {
2374
+ type: 'call';
2375
+ }) | (SimpleCalendarEventSearchResponseBaseItemHumanReadableTimestamp & {
2376
+ type: 'calendarEvent';
2377
+ });
2378
+ /**
2379
+ * A property attached to a Soup item.
2380
+ *
2381
+ * This is a simplified representation that includes only the definition and value,
2382
+ * omitting the entity property assignment metadata and options.
2383
+ */
2384
+ export type SoupProperty = {
2385
+ /**
2386
+ * The property definition
2387
+ */
2388
+ definition: PropertyDefinition;
2389
+ /**
2390
+ * Globally unique id of the assignment attaching this property to an entity.
2391
+ */
2392
+ id: string;
2393
+ value?: null | PropertyValue;
2394
+ };
2395
+ /**
2396
+ * How multiple `tag_option_ids` combine when filtering.
2397
+ */
2398
+ export type TagFilterMode = 'any' | 'all';
2399
+ /**
2400
+ * Task-only filters nested under document filters.
2401
+ */
2402
+ export type TaskFilters = {
2403
+ /**
2404
+ * Include tasks that are created by me, assigned to me, and not completed,
2405
+ * even when they do not match other document filters.
2406
+ */
2407
+ include_cbm_atm_nc?: boolean | null;
2408
+ };
2409
+ /**
2410
+ * How a query of several terms matches document content.
2411
+ */
2412
+ export type TermMatching = 'all' | 'dynamic';
2413
+ export type UnifiedSearchRequest = {
2414
+ /**
2415
+ * Which calendar events to search. Defaults to `own`: events on the
2416
+ * caller's own and delegated calendars. `shared_with_you` searches only
2417
+ * events shared with a channel the caller belongs to that are on none of
2418
+ * their calendars.
2419
+ */
2420
+ calendar_event_scope?: CalendarEventSearchScope;
2421
+ collapse?: boolean | null;
2422
+ /**
2423
+ * Entity filters in the same shape as soup. Entity types with a NIL UUID in their primary ID field are excluded from search.
2424
+ */
2425
+ filters?: EntityFilters;
2426
+ /**
2427
+ * Opt in to searching the caller's team CRM companies (name/domain).
2428
+ * Off by default: CRM results are only included when this is true and
2429
+ * the caller has a qualifying team membership. CRM has no content
2430
+ * index, so it is searched only under Name / NameContent.
2431
+ */
2432
+ include_crm?: boolean;
2433
+ /**
2434
+ * How to match the search terms. 'exact' for precise case-sensitive phrase matches, 'partial' for prefix/partial matches. REQUIRED field.
2435
+ */
2436
+ match_type: MatchType;
2437
+ /**
2438
+ * The search query string. Must not be empty; one character is enough.
2439
+ */
2440
+ query: string;
2441
+ /**
2442
+ * Fields to search on (Name, Content, NameContent). Defaults to Content
2443
+ */
2444
+ search_on?: SearchOn;
2445
+ /**
2446
+ * How a query of several terms matches document content. Defaults to
2447
+ * `all`, the strict AND that AI tools and the SDK rely on; the web
2448
+ * app's Search view asks for `dynamic`.
2449
+ */
2450
+ term_matching?: TermMatching;
2451
+ };
2452
+ export type UnifiedSearchResponse = {
2453
+ /**
2454
+ * The next cursor to use for paginating results
2455
+ */
2456
+ next_cursor?: string | null;
2457
+ /**
2458
+ * The search results
2459
+ */
2460
+ results: Array<UnifiedSearchResponseItem>;
2461
+ };
2462
+ export type UnifiedSearchResponseItem = (DocumentSearchResponseItemWithMetadata & {
2463
+ type: 'document';
2464
+ }) | (ChatSearchResponseItemWithMetadata & {
2465
+ type: 'chat';
2466
+ }) | (EmailSearchResponseItemWithMetadata & {
2467
+ type: 'email';
2468
+ }) | (ChannelMessageSearchResponseItem & {
2469
+ type: 'channelMessage';
2470
+ }) | (ChannelNameSearchResponseItem & {
2471
+ type: 'channel';
2472
+ }) | (ProjectSearchResponseItemWithMetadata & {
2473
+ type: 'project';
2474
+ }) | (CallRecordSearchResponseItemWithMetadata & {
2475
+ type: 'call';
2476
+ }) | (CrmCompanySearchResponseItem & {
2477
+ type: 'company';
2478
+ }) | (CalendarEventSearchResponseItemWithMetadata & {
2479
+ type: 'calendarEvent';
2480
+ }) | (AgentSessionSearchResponseItem & {
2481
+ type: 'agentSession';
2482
+ });
2483
+ export type UnifiedSearchData = {
2484
+ body: UnifiedSearchRequest;
2485
+ path?: never;
2486
+ query: {
2487
+ /**
2488
+ * The page size. Defaults to 10.
2489
+ */
2490
+ page_size: number;
2491
+ /**
2492
+ * Base64 encoded cursor value.
2493
+ */
2494
+ cursor?: string;
2495
+ };
2496
+ url: '/search';
2497
+ };
2498
+ export type UnifiedSearchErrors = {
2499
+ 400: ErrorResponse;
2500
+ 401: ErrorResponse;
2501
+ 500: ErrorResponse;
2502
+ };
2503
+ export type UnifiedSearchError = UnifiedSearchErrors[keyof UnifiedSearchErrors];
2504
+ export type UnifiedSearchResponses = {
2505
+ 200: UnifiedSearchResponse;
2506
+ };
2507
+ export type UnifiedSearchResponse2 = UnifiedSearchResponses[keyof UnifiedSearchResponses];
2508
+ export type SimpleUnifiedSearchData = {
2509
+ body: UnifiedSearchRequest;
2510
+ path?: never;
2511
+ query: {
2512
+ /**
2513
+ * The page size. Defaults to 10.
2514
+ */
2515
+ page_size: number;
2516
+ /**
2517
+ * Base64 encoded cursor for pagination.
2518
+ */
2519
+ cursor?: string;
2520
+ };
2521
+ url: '/search/simple';
2522
+ };
2523
+ export type SimpleUnifiedSearchErrors = {
2524
+ 400: ErrorResponse;
2525
+ 401: ErrorResponse;
2526
+ 500: ErrorResponse;
2527
+ };
2528
+ export type SimpleUnifiedSearchError = SimpleUnifiedSearchErrors[keyof SimpleUnifiedSearchErrors];
2529
+ export type SimpleUnifiedSearchResponses = {
2530
+ 200: SimpleSearchResponse;
2531
+ };
2532
+ export type SimpleUnifiedSearchResponse = SimpleUnifiedSearchResponses[keyof SimpleUnifiedSearchResponses];