@rox-one/sdk 0.0.0-stage → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (482) hide show
  1. package/CALLS.md +82 -0
  2. package/README.md +1259 -2
  3. package/dist/chunk-AOHK5YXC.js +5585 -0
  4. package/dist/chunk-CATFKTFD.js +80 -0
  5. package/dist/chunk-FQGPXWPJ.js +1491 -0
  6. package/dist/chunk-G43PLP2U.js +1087 -0
  7. package/dist/chunk-LMJW65ML.js +836 -0
  8. package/dist/chunk-MCSQNZ4E.js +836 -0
  9. package/dist/chunk-NSJ3GKUC.js +1552 -0
  10. package/dist/chunk-OGFKJOK7.js +2068 -0
  11. package/dist/chunk-RDEJZJBZ.js +1351 -0
  12. package/dist/chunk-TMTYN2UK.js +1128 -0
  13. package/dist/chunk-V45LUJDI.js +838 -0
  14. package/dist/chunk-YRUXFEZM.js +1044 -0
  15. package/dist/chunk-ZYBAKW25.js +994 -0
  16. package/dist/generated/agent-fold/index.d.ts +4520 -0
  17. package/dist/generated/agent-fold/index.js +0 -0
  18. package/dist/generated/agent-harness/client/client.gen.d.ts +2 -0
  19. package/dist/generated/agent-harness/client/index.d.ts +10 -0
  20. package/dist/generated/agent-harness/client/types.gen.d.ts +120 -0
  21. package/dist/generated/agent-harness/client/utils.gen.d.ts +37 -0
  22. package/dist/generated/agent-harness/client.gen.d.ts +12 -0
  23. package/dist/generated/agent-harness/core/auth.gen.d.ts +25 -0
  24. package/dist/generated/agent-harness/core/bodySerializer.gen.d.ts +25 -0
  25. package/dist/generated/agent-harness/core/params.gen.d.ts +43 -0
  26. package/dist/generated/agent-harness/core/pathSerializer.gen.d.ts +33 -0
  27. package/dist/generated/agent-harness/core/queryKeySerializer.gen.d.ts +18 -0
  28. package/dist/generated/agent-harness/core/serverSentEvents.gen.d.ts +71 -0
  29. package/dist/generated/agent-harness/core/types.gen.d.ts +83 -0
  30. package/dist/generated/agent-harness/core/utils.gen.d.ts +19 -0
  31. package/dist/generated/agent-harness/index.d.ts +2 -0
  32. package/dist/generated/agent-harness/index.js +6 -0
  33. package/dist/generated/agent-harness/sdk.gen.d.ts +375 -0
  34. package/dist/generated/agent-harness/types.gen.d.ts +4725 -0
  35. package/dist/generated/agent-reviews/index.d.ts +895 -0
  36. package/dist/generated/agent-reviews/index.js +0 -0
  37. package/dist/generated/auth/client/client.gen.d.ts +2 -0
  38. package/dist/generated/auth/client/index.d.ts +10 -0
  39. package/dist/generated/auth/client/types.gen.d.ts +120 -0
  40. package/dist/generated/auth/client/utils.gen.d.ts +37 -0
  41. package/dist/generated/auth/client.gen.d.ts +12 -0
  42. package/dist/generated/auth/core/auth.gen.d.ts +25 -0
  43. package/dist/generated/auth/core/bodySerializer.gen.d.ts +25 -0
  44. package/dist/generated/auth/core/params.gen.d.ts +43 -0
  45. package/dist/generated/auth/core/pathSerializer.gen.d.ts +33 -0
  46. package/dist/generated/auth/core/queryKeySerializer.gen.d.ts +18 -0
  47. package/dist/generated/auth/core/serverSentEvents.gen.d.ts +71 -0
  48. package/dist/generated/auth/core/types.gen.d.ts +83 -0
  49. package/dist/generated/auth/core/utils.gen.d.ts +19 -0
  50. package/dist/generated/auth/index.d.ts +2 -0
  51. package/dist/generated/auth/index.js +6 -0
  52. package/dist/generated/auth/sdk.gen.d.ts +674 -0
  53. package/dist/generated/auth/types.gen.d.ts +5233 -0
  54. package/dist/generated/calendar/client/client.gen.d.ts +2 -0
  55. package/dist/generated/calendar/client/index.d.ts +10 -0
  56. package/dist/generated/calendar/client/types.gen.d.ts +120 -0
  57. package/dist/generated/calendar/client/utils.gen.d.ts +37 -0
  58. package/dist/generated/calendar/client.gen.d.ts +12 -0
  59. package/dist/generated/calendar/core/auth.gen.d.ts +25 -0
  60. package/dist/generated/calendar/core/bodySerializer.gen.d.ts +25 -0
  61. package/dist/generated/calendar/core/params.gen.d.ts +43 -0
  62. package/dist/generated/calendar/core/pathSerializer.gen.d.ts +33 -0
  63. package/dist/generated/calendar/core/queryKeySerializer.gen.d.ts +18 -0
  64. package/dist/generated/calendar/core/serverSentEvents.gen.d.ts +71 -0
  65. package/dist/generated/calendar/core/types.gen.d.ts +83 -0
  66. package/dist/generated/calendar/core/utils.gen.d.ts +19 -0
  67. package/dist/generated/calendar/index.d.ts +2 -0
  68. package/dist/generated/calendar/index.js +6 -0
  69. package/dist/generated/calendar/sdk.gen.d.ts +157 -0
  70. package/dist/generated/calendar/types.gen.d.ts +2333 -0
  71. package/dist/generated/cognition/client/client.gen.d.ts +2 -0
  72. package/dist/generated/cognition/client/index.d.ts +10 -0
  73. package/dist/generated/cognition/client/types.gen.d.ts +120 -0
  74. package/dist/generated/cognition/client/utils.gen.d.ts +37 -0
  75. package/dist/generated/cognition/client.gen.d.ts +12 -0
  76. package/dist/generated/cognition/core/auth.gen.d.ts +25 -0
  77. package/dist/generated/cognition/core/bodySerializer.gen.d.ts +25 -0
  78. package/dist/generated/cognition/core/params.gen.d.ts +43 -0
  79. package/dist/generated/cognition/core/pathSerializer.gen.d.ts +33 -0
  80. package/dist/generated/cognition/core/queryKeySerializer.gen.d.ts +18 -0
  81. package/dist/generated/cognition/core/serverSentEvents.gen.d.ts +71 -0
  82. package/dist/generated/cognition/core/types.gen.d.ts +83 -0
  83. package/dist/generated/cognition/core/utils.gen.d.ts +19 -0
  84. package/dist/generated/cognition/index.d.ts +2 -0
  85. package/dist/generated/cognition/index.js +6 -0
  86. package/dist/generated/cognition/sdk.gen.d.ts +348 -0
  87. package/dist/generated/cognition/types.gen.d.ts +4228 -0
  88. package/dist/generated/connection/client/client.gen.d.ts +2 -0
  89. package/dist/generated/connection/client/index.d.ts +10 -0
  90. package/dist/generated/connection/client/types.gen.d.ts +120 -0
  91. package/dist/generated/connection/client/utils.gen.d.ts +37 -0
  92. package/dist/generated/connection/client.gen.d.ts +12 -0
  93. package/dist/generated/connection/core/auth.gen.d.ts +25 -0
  94. package/dist/generated/connection/core/bodySerializer.gen.d.ts +25 -0
  95. package/dist/generated/connection/core/params.gen.d.ts +43 -0
  96. package/dist/generated/connection/core/pathSerializer.gen.d.ts +33 -0
  97. package/dist/generated/connection/core/queryKeySerializer.gen.d.ts +18 -0
  98. package/dist/generated/connection/core/serverSentEvents.gen.d.ts +71 -0
  99. package/dist/generated/connection/core/types.gen.d.ts +83 -0
  100. package/dist/generated/connection/core/utils.gen.d.ts +19 -0
  101. package/dist/generated/connection/index.d.ts +2 -0
  102. package/dist/generated/connection/index.js +854 -0
  103. package/dist/generated/connection/sdk.gen.d.ts +43 -0
  104. package/dist/generated/connection/types.gen.d.ts +252 -0
  105. package/dist/generated/contacts/client/client.gen.d.ts +2 -0
  106. package/dist/generated/contacts/client/index.d.ts +10 -0
  107. package/dist/generated/contacts/client/types.gen.d.ts +120 -0
  108. package/dist/generated/contacts/client/utils.gen.d.ts +37 -0
  109. package/dist/generated/contacts/client.gen.d.ts +12 -0
  110. package/dist/generated/contacts/core/auth.gen.d.ts +25 -0
  111. package/dist/generated/contacts/core/bodySerializer.gen.d.ts +25 -0
  112. package/dist/generated/contacts/core/params.gen.d.ts +43 -0
  113. package/dist/generated/contacts/core/pathSerializer.gen.d.ts +33 -0
  114. package/dist/generated/contacts/core/queryKeySerializer.gen.d.ts +18 -0
  115. package/dist/generated/contacts/core/serverSentEvents.gen.d.ts +71 -0
  116. package/dist/generated/contacts/core/types.gen.d.ts +83 -0
  117. package/dist/generated/contacts/core/utils.gen.d.ts +19 -0
  118. package/dist/generated/contacts/index.d.ts +2 -0
  119. package/dist/generated/contacts/index.js +6 -0
  120. package/dist/generated/contacts/sdk.gen.d.ts +47 -0
  121. package/dist/generated/contacts/types.gen.d.ts +108 -0
  122. package/dist/generated/email/client/client.gen.d.ts +2 -0
  123. package/dist/generated/email/client/index.d.ts +10 -0
  124. package/dist/generated/email/client/types.gen.d.ts +120 -0
  125. package/dist/generated/email/client/utils.gen.d.ts +37 -0
  126. package/dist/generated/email/client.gen.d.ts +12 -0
  127. package/dist/generated/email/core/auth.gen.d.ts +25 -0
  128. package/dist/generated/email/core/bodySerializer.gen.d.ts +25 -0
  129. package/dist/generated/email/core/params.gen.d.ts +43 -0
  130. package/dist/generated/email/core/pathSerializer.gen.d.ts +33 -0
  131. package/dist/generated/email/core/queryKeySerializer.gen.d.ts +18 -0
  132. package/dist/generated/email/core/serverSentEvents.gen.d.ts +71 -0
  133. package/dist/generated/email/core/types.gen.d.ts +83 -0
  134. package/dist/generated/email/core/utils.gen.d.ts +19 -0
  135. package/dist/generated/email/index.d.ts +2 -0
  136. package/dist/generated/email/index.js +6 -0
  137. package/dist/generated/email/sdk.gen.d.ts +301 -0
  138. package/dist/generated/email/types.gen.d.ts +3262 -0
  139. package/dist/generated/notification/client/client.gen.d.ts +2 -0
  140. package/dist/generated/notification/client/index.d.ts +10 -0
  141. package/dist/generated/notification/client/types.gen.d.ts +120 -0
  142. package/dist/generated/notification/client/utils.gen.d.ts +37 -0
  143. package/dist/generated/notification/client.gen.d.ts +12 -0
  144. package/dist/generated/notification/core/auth.gen.d.ts +25 -0
  145. package/dist/generated/notification/core/bodySerializer.gen.d.ts +25 -0
  146. package/dist/generated/notification/core/params.gen.d.ts +43 -0
  147. package/dist/generated/notification/core/pathSerializer.gen.d.ts +33 -0
  148. package/dist/generated/notification/core/queryKeySerializer.gen.d.ts +18 -0
  149. package/dist/generated/notification/core/serverSentEvents.gen.d.ts +71 -0
  150. package/dist/generated/notification/core/types.gen.d.ts +83 -0
  151. package/dist/generated/notification/core/utils.gen.d.ts +19 -0
  152. package/dist/generated/notification/index.d.ts +2 -0
  153. package/dist/generated/notification/index.js +6 -0
  154. package/dist/generated/notification/sdk.gen.d.ts +127 -0
  155. package/dist/generated/notification/types.gen.d.ts +2084 -0
  156. package/dist/generated/properties/client/client.gen.d.ts +2 -0
  157. package/dist/generated/properties/client/index.d.ts +10 -0
  158. package/dist/generated/properties/client/types.gen.d.ts +120 -0
  159. package/dist/generated/properties/client/utils.gen.d.ts +37 -0
  160. package/dist/generated/properties/client.gen.d.ts +12 -0
  161. package/dist/generated/properties/core/auth.gen.d.ts +25 -0
  162. package/dist/generated/properties/core/bodySerializer.gen.d.ts +25 -0
  163. package/dist/generated/properties/core/params.gen.d.ts +43 -0
  164. package/dist/generated/properties/core/pathSerializer.gen.d.ts +33 -0
  165. package/dist/generated/properties/core/queryKeySerializer.gen.d.ts +18 -0
  166. package/dist/generated/properties/core/serverSentEvents.gen.d.ts +71 -0
  167. package/dist/generated/properties/core/types.gen.d.ts +83 -0
  168. package/dist/generated/properties/core/utils.gen.d.ts +19 -0
  169. package/dist/generated/properties/index.d.ts +2 -0
  170. package/dist/generated/properties/index.js +6 -0
  171. package/dist/generated/properties/sdk.gen.d.ts +158 -0
  172. package/dist/generated/properties/types.gen.d.ts +1311 -0
  173. package/dist/generated/scheduled-action/client/client.gen.d.ts +2 -0
  174. package/dist/generated/scheduled-action/client/index.d.ts +10 -0
  175. package/dist/generated/scheduled-action/client/types.gen.d.ts +120 -0
  176. package/dist/generated/scheduled-action/client/utils.gen.d.ts +37 -0
  177. package/dist/generated/scheduled-action/client.gen.d.ts +12 -0
  178. package/dist/generated/scheduled-action/core/auth.gen.d.ts +25 -0
  179. package/dist/generated/scheduled-action/core/bodySerializer.gen.d.ts +25 -0
  180. package/dist/generated/scheduled-action/core/params.gen.d.ts +43 -0
  181. package/dist/generated/scheduled-action/core/pathSerializer.gen.d.ts +33 -0
  182. package/dist/generated/scheduled-action/core/queryKeySerializer.gen.d.ts +18 -0
  183. package/dist/generated/scheduled-action/core/serverSentEvents.gen.d.ts +71 -0
  184. package/dist/generated/scheduled-action/core/types.gen.d.ts +83 -0
  185. package/dist/generated/scheduled-action/core/utils.gen.d.ts +19 -0
  186. package/dist/generated/scheduled-action/index.d.ts +2 -0
  187. package/dist/generated/scheduled-action/index.js +6 -0
  188. package/dist/generated/scheduled-action/sdk.gen.d.ts +156 -0
  189. package/dist/generated/scheduled-action/types.gen.d.ts +3099 -0
  190. package/dist/generated/search/client/client.gen.d.ts +2 -0
  191. package/dist/generated/search/client/index.d.ts +10 -0
  192. package/dist/generated/search/client/types.gen.d.ts +120 -0
  193. package/dist/generated/search/client/utils.gen.d.ts +37 -0
  194. package/dist/generated/search/client.gen.d.ts +12 -0
  195. package/dist/generated/search/core/auth.gen.d.ts +25 -0
  196. package/dist/generated/search/core/bodySerializer.gen.d.ts +25 -0
  197. package/dist/generated/search/core/params.gen.d.ts +43 -0
  198. package/dist/generated/search/core/pathSerializer.gen.d.ts +33 -0
  199. package/dist/generated/search/core/queryKeySerializer.gen.d.ts +18 -0
  200. package/dist/generated/search/core/serverSentEvents.gen.d.ts +71 -0
  201. package/dist/generated/search/core/types.gen.d.ts +83 -0
  202. package/dist/generated/search/core/utils.gen.d.ts +19 -0
  203. package/dist/generated/search/index.d.ts +2 -0
  204. package/dist/generated/search/index.js +6 -0
  205. package/dist/generated/search/sdk.gen.d.ts +44 -0
  206. package/dist/generated/search/types.gen.d.ts +2532 -0
  207. package/dist/generated/static-files/client/client.gen.d.ts +2 -0
  208. package/dist/generated/static-files/client/index.d.ts +10 -0
  209. package/dist/generated/static-files/client/types.gen.d.ts +120 -0
  210. package/dist/generated/static-files/client/utils.gen.d.ts +37 -0
  211. package/dist/generated/static-files/client.gen.d.ts +12 -0
  212. package/dist/generated/static-files/core/auth.gen.d.ts +25 -0
  213. package/dist/generated/static-files/core/bodySerializer.gen.d.ts +25 -0
  214. package/dist/generated/static-files/core/params.gen.d.ts +43 -0
  215. package/dist/generated/static-files/core/pathSerializer.gen.d.ts +33 -0
  216. package/dist/generated/static-files/core/queryKeySerializer.gen.d.ts +18 -0
  217. package/dist/generated/static-files/core/serverSentEvents.gen.d.ts +71 -0
  218. package/dist/generated/static-files/core/types.gen.d.ts +83 -0
  219. package/dist/generated/static-files/core/utils.gen.d.ts +19 -0
  220. package/dist/generated/static-files/index.d.ts +2 -0
  221. package/dist/generated/static-files/index.js +842 -0
  222. package/dist/generated/static-files/sdk.gen.d.ts +43 -0
  223. package/dist/generated/static-files/types.gen.d.ts +220 -0
  224. package/dist/generated/storage/client/client.gen.d.ts +2 -0
  225. package/dist/generated/storage/client/index.d.ts +10 -0
  226. package/dist/generated/storage/client/types.gen.d.ts +120 -0
  227. package/dist/generated/storage/client/utils.gen.d.ts +37 -0
  228. package/dist/generated/storage/client.gen.d.ts +12 -0
  229. package/dist/generated/storage/core/auth.gen.d.ts +25 -0
  230. package/dist/generated/storage/core/bodySerializer.gen.d.ts +25 -0
  231. package/dist/generated/storage/core/params.gen.d.ts +43 -0
  232. package/dist/generated/storage/core/pathSerializer.gen.d.ts +33 -0
  233. package/dist/generated/storage/core/queryKeySerializer.gen.d.ts +18 -0
  234. package/dist/generated/storage/core/serverSentEvents.gen.d.ts +71 -0
  235. package/dist/generated/storage/core/types.gen.d.ts +83 -0
  236. package/dist/generated/storage/core/utils.gen.d.ts +19 -0
  237. package/dist/generated/storage/index.d.ts +2 -0
  238. package/dist/generated/storage/index.js +6 -0
  239. package/dist/generated/storage/sdk.gen.d.ts +2285 -0
  240. package/dist/generated/storage/types.gen.d.ts +34546 -0
  241. package/dist/generated/unfurl/client/client.gen.d.ts +2 -0
  242. package/dist/generated/unfurl/client/index.d.ts +10 -0
  243. package/dist/generated/unfurl/client/types.gen.d.ts +120 -0
  244. package/dist/generated/unfurl/client/utils.gen.d.ts +37 -0
  245. package/dist/generated/unfurl/client.gen.d.ts +12 -0
  246. package/dist/generated/unfurl/core/auth.gen.d.ts +25 -0
  247. package/dist/generated/unfurl/core/bodySerializer.gen.d.ts +25 -0
  248. package/dist/generated/unfurl/core/params.gen.d.ts +43 -0
  249. package/dist/generated/unfurl/core/pathSerializer.gen.d.ts +33 -0
  250. package/dist/generated/unfurl/core/queryKeySerializer.gen.d.ts +18 -0
  251. package/dist/generated/unfurl/core/serverSentEvents.gen.d.ts +71 -0
  252. package/dist/generated/unfurl/core/types.gen.d.ts +83 -0
  253. package/dist/generated/unfurl/core/utils.gen.d.ts +19 -0
  254. package/dist/generated/unfurl/index.d.ts +2 -0
  255. package/dist/generated/unfurl/index.js +6 -0
  256. package/dist/generated/unfurl/sdk.gen.d.ts +47 -0
  257. package/dist/generated/unfurl/types.gen.d.ts +145 -0
  258. package/dist/src/calls/browser.d.ts +14 -0
  259. package/dist/src/calls/browser.js +102 -0
  260. package/dist/src/calls/common.d.ts +18 -0
  261. package/dist/src/calls/node.d.ts +24 -0
  262. package/dist/src/calls/node.js +145 -0
  263. package/dist/src/calls/telemetry.d.ts +5 -0
  264. package/dist/src/config.d.ts +71 -0
  265. package/dist/src/entities/account-managers/grant.d.ts +62 -0
  266. package/dist/src/entities/account-managers/namespace.d.ts +29 -0
  267. package/dist/src/entities/activity/entity.d.ts +7 -0
  268. package/dist/src/entities/activity/namespace.d.ts +58 -0
  269. package/dist/src/entities/activity/namespace.test.d.ts +1 -0
  270. package/dist/src/entities/agent-sessions/activity.d.ts +48 -0
  271. package/dist/src/entities/agent-sessions/agent-session.d.ts +518 -0
  272. package/dist/src/entities/agent-sessions/code-execution.d.ts +60 -0
  273. package/dist/src/entities/agent-sessions/conversation.d.ts +91 -0
  274. package/dist/src/entities/agent-sessions/namespace.d.ts +142 -0
  275. package/dist/src/entities/agent-sessions/origin.d.ts +94 -0
  276. package/dist/src/entities/agent-sessions/queued-action.d.ts +60 -0
  277. package/dist/src/entities/agent-sessions/review.d.ts +114 -0
  278. package/dist/src/entities/agent-sessions/tool-approval.d.ts +25 -0
  279. package/dist/src/entities/agent-sessions/view.d.ts +11 -0
  280. package/dist/src/entities/agents/agent.d.ts +142 -0
  281. package/dist/src/entities/agents/namespace.d.ts +66 -0
  282. package/dist/src/entities/ai/namespace.d.ts +36 -0
  283. package/dist/src/entities/api-keys/api-key.d.ts +22 -0
  284. package/dist/src/entities/api-keys/namespace.d.ts +37 -0
  285. package/dist/src/entities/bots/bot.d.ts +143 -0
  286. package/dist/src/entities/bots/namespace.d.ts +50 -0
  287. package/dist/src/entities/bots/token.d.ts +39 -0
  288. package/dist/src/entities/calendar/booking-link.d.ts +55 -0
  289. package/dist/src/entities/calendar/booking-namespace.d.ts +143 -0
  290. package/dist/src/entities/calendar/booking-namespace.test.d.ts +1 -0
  291. package/dist/src/entities/calendar/booking.d.ts +97 -0
  292. package/dist/src/entities/calendar/calendar.d.ts +49 -0
  293. package/dist/src/entities/calendar/create-confirmed.test.d.ts +1 -0
  294. package/dist/src/entities/calendar/event.d.ts +283 -0
  295. package/dist/src/entities/calendar/event.test.d.ts +1 -0
  296. package/dist/src/entities/calendar/namespace.d.ts +334 -0
  297. package/dist/src/entities/calendar/namespace.test.d.ts +1 -0
  298. package/dist/src/entities/calendar/replacement.d.ts +31 -0
  299. package/dist/src/entities/calls/call-record.d.ts +231 -0
  300. package/dist/src/entities/calls/connection.d.ts +59 -0
  301. package/dist/src/entities/calls/errors.d.ts +15 -0
  302. package/dist/src/entities/calls/message.d.ts +55 -0
  303. package/dist/src/entities/calls/namespace.d.ts +41 -0
  304. package/dist/src/entities/calls/participant.d.ts +22 -0
  305. package/dist/src/entities/canvases/canvas.d.ts +329 -0
  306. package/dist/src/entities/channels/access-request.d.ts +42 -0
  307. package/dist/src/entities/channels/activity.d.ts +40 -0
  308. package/dist/src/entities/channels/channel.d.ts +302 -0
  309. package/dist/src/entities/channels/labels.d.ts +73 -0
  310. package/dist/src/entities/channels/message.d.ts +153 -0
  311. package/dist/src/entities/channels/message.test.d.ts +1 -0
  312. package/dist/src/entities/channels/namespace.d.ts +82 -0
  313. package/dist/src/entities/channels/namespace.test.d.ts +1 -0
  314. package/dist/src/entities/channels/picture.d.ts +11 -0
  315. package/dist/src/entities/channels/post.d.ts +37 -0
  316. package/dist/src/entities/channels/post.test.d.ts +1 -0
  317. package/dist/src/entities/channels/share.d.ts +9 -0
  318. package/dist/src/entities/channels/share.test.d.ts +1 -0
  319. package/dist/src/entities/channels/thread.d.ts +64 -0
  320. package/dist/src/entities/chats/chat.d.ts +121 -0
  321. package/dist/src/entities/chats/generation.d.ts +55 -0
  322. package/dist/src/entities/chats/namespace.d.ts +35 -0
  323. package/dist/src/entities/connected-apps/connected-app.d.ts +121 -0
  324. package/dist/src/entities/connected-apps/connector.d.ts +59 -0
  325. package/dist/src/entities/connected-apps/namespace.d.ts +92 -0
  326. package/dist/src/entities/crm/company.d.ts +154 -0
  327. package/dist/src/entities/crm/contact.d.ts +168 -0
  328. package/dist/src/entities/crm/namespace.d.ts +163 -0
  329. package/dist/src/entities/crm/pipeline-entry.d.ts +109 -0
  330. package/dist/src/entities/crm/pipeline.d.ts +426 -0
  331. package/dist/src/entities/crm/pipelines.d.ts +79 -0
  332. package/dist/src/entities/crm-email-privacy/email-privacy.d.ts +238 -0
  333. package/dist/src/entities/crm-email-privacy/email-rule-preview.d.ts +55 -0
  334. package/dist/src/entities/crm-email-privacy/email-rule-revision.d.ts +27 -0
  335. package/dist/src/entities/crm-email-privacy/email-rules.d.ts +32 -0
  336. package/dist/src/entities/databases/column.d.ts +122 -0
  337. package/dist/src/entities/databases/database.d.ts +431 -0
  338. package/dist/src/entities/databases/namespace.d.ts +109 -0
  339. package/dist/src/entities/databases/query.d.ts +86 -0
  340. package/dist/src/entities/databases/row.d.ts +29 -0
  341. package/dist/src/entities/databases/saved-query.d.ts +151 -0
  342. package/dist/src/entities/databases/table.d.ts +124 -0
  343. package/dist/src/entities/databases/view.d.ts +72 -0
  344. package/dist/src/entities/databases/webhook.d.ts +39 -0
  345. package/dist/src/entities/documents/ai-edit.d.ts +54 -0
  346. package/dist/src/entities/documents/anchor.d.ts +39 -0
  347. package/dist/src/entities/documents/comment.d.ts +68 -0
  348. package/dist/src/entities/documents/create.test.d.ts +1 -0
  349. package/dist/src/entities/documents/document.d.ts +675 -0
  350. package/dist/src/entities/documents/markdown.d.ts +25 -0
  351. package/dist/src/entities/documents/namespace.d.ts +291 -0
  352. package/dist/src/entities/documents/office-files.d.ts +47 -0
  353. package/dist/src/entities/documents/skills.test.d.ts +1 -0
  354. package/dist/src/entities/documents/system-skill.d.ts +36 -0
  355. package/dist/src/entities/documents/text-comment.d.ts +41 -0
  356. package/dist/src/entities/documents/text-comment.test.d.ts +1 -0
  357. package/dist/src/entities/documents/version.d.ts +26 -0
  358. package/dist/src/entities/email/attachment.d.ts +39 -0
  359. package/dist/src/entities/email/draft.d.ts +160 -0
  360. package/dist/src/entities/email/filter.d.ts +44 -0
  361. package/dist/src/entities/email/label.d.ts +37 -0
  362. package/dist/src/entities/email/link.d.ts +35 -0
  363. package/dist/src/entities/email/message.d.ts +223 -0
  364. package/dist/src/entities/email/namespace.d.ts +235 -0
  365. package/dist/src/entities/email/namespace.test.d.ts +1 -0
  366. package/dist/src/entities/email/thread.d.ts +268 -0
  367. package/dist/src/entities/entity-mentions/mention.d.ts +21 -0
  368. package/dist/src/entities/entity-mentions/namespace.d.ts +20 -0
  369. package/dist/src/entities/entity.d.ts +167 -0
  370. package/dist/src/entities/external-chat/chat.d.ts +173 -0
  371. package/dist/src/entities/external-chat/message.d.ts +54 -0
  372. package/dist/src/entities/external-chat/namespace.d.ts +22 -0
  373. package/dist/src/entities/external-chat/participant.d.ts +28 -0
  374. package/dist/src/entities/external-chat/send.d.ts +40 -0
  375. package/dist/src/entities/external-chat/upload.d.ts +25 -0
  376. package/dist/src/entities/favorites/namespace.d.ts +52 -0
  377. package/dist/src/entities/foreign/foreign-entity.d.ts +36 -0
  378. package/dist/src/entities/foreign/namespace.d.ts +54 -0
  379. package/dist/src/entities/forms/form.d.ts +319 -0
  380. package/dist/src/entities/forms/namespace.d.ts +30 -0
  381. package/dist/src/entities/forms/question.d.ts +65 -0
  382. package/dist/src/entities/forms/response.d.ts +52 -0
  383. package/dist/src/entities/forms/section.d.ts +31 -0
  384. package/dist/src/entities/github-pull-requests/namespace.d.ts +20 -0
  385. package/dist/src/entities/github-pull-requests/pull-request.d.ts +64 -0
  386. package/dist/src/entities/harnesses/harness.d.ts +76 -0
  387. package/dist/src/entities/harnesses/namespace.d.ts +83 -0
  388. package/dist/src/entities/harnesses/pairing.d.ts +50 -0
  389. package/dist/src/entities/images/image.d.ts +88 -0
  390. package/dist/src/entities/images/namespace.d.ts +55 -0
  391. package/dist/src/entities/images/namespace.test.d.ts +1 -0
  392. package/dist/src/entities/imports/entry.d.ts +65 -0
  393. package/dist/src/entities/imports/namespace.d.ts +103 -0
  394. package/dist/src/entities/imports/namespace.test.d.ts +1 -0
  395. package/dist/src/entities/initiatives/initiative.d.ts +185 -0
  396. package/dist/src/entities/initiatives/initiative.test.d.ts +1 -0
  397. package/dist/src/entities/initiatives/namespace.d.ts +90 -0
  398. package/dist/src/entities/me/namespace.d.ts +68 -0
  399. package/dist/src/entities/meetings/meeting.d.ts +81 -0
  400. package/dist/src/entities/meetings/namespace.d.ts +38 -0
  401. package/dist/src/entities/memory/namespace.d.ts +49 -0
  402. package/dist/src/entities/memory/namespace.test.d.ts +1 -0
  403. package/dist/src/entities/messages/discussion.d.ts +84 -0
  404. package/dist/src/entities/messages/thread.d.ts +115 -0
  405. package/dist/src/entities/notifications/namespace.d.ts +66 -0
  406. package/dist/src/entities/notifications/notification.d.ts +78 -0
  407. package/dist/src/entities/notifications/notification.test.d.ts +1 -0
  408. package/dist/src/entities/passwords/item.d.ts +118 -0
  409. package/dist/src/entities/passwords/namespace.d.ts +45 -0
  410. package/dist/src/entities/pins/namespace.d.ts +42 -0
  411. package/dist/src/entities/projects/namespace.d.ts +45 -0
  412. package/dist/src/entities/projects/project.d.ts +108 -0
  413. package/dist/src/entities/properties/namespace.d.ts +105 -0
  414. package/dist/src/entities/properties/namespace.test.d.ts +1 -0
  415. package/dist/src/entities/properties/property-definition.d.ts +70 -0
  416. package/dist/src/entities/properties/property-option.d.ts +44 -0
  417. package/dist/src/entities/reference.d.ts +82 -0
  418. package/dist/src/entities/referrals/namespace.d.ts +40 -0
  419. package/dist/src/entities/routines/namespace.d.ts +239 -0
  420. package/dist/src/entities/routines/routine.d.ts +341 -0
  421. package/dist/src/entities/routines/suggestion.d.ts +38 -0
  422. package/dist/src/entities/saved-views/namespace.d.ts +58 -0
  423. package/dist/src/entities/saved-views/saved-view.d.ts +78 -0
  424. package/dist/src/entities/search/exclusions.d.ts +6 -0
  425. package/dist/src/entities/search/namespace.d.ts +71 -0
  426. package/dist/src/entities/search/options.d.ts +30 -0
  427. package/dist/src/entities/search/types.d.ts +90 -0
  428. package/dist/src/entities/sharing/access.d.ts +120 -0
  429. package/dist/src/entities/sharing/permissions.d.ts +13 -0
  430. package/dist/src/entities/spreadsheets/spreadsheet.d.ts +201 -0
  431. package/dist/src/entities/suggestions/namespace.d.ts +118 -0
  432. package/dist/src/entities/suggestions/suggestion.d.ts +172 -0
  433. package/dist/src/entities/suggestions/suggestion.test.d.ts +1 -0
  434. package/dist/src/entities/tasks/namespace.d.ts +77 -0
  435. package/dist/src/entities/tasks/task.d.ts +99 -0
  436. package/dist/src/entities/teams/invite.d.ts +33 -0
  437. package/dist/src/entities/teams/namespace.d.ts +23 -0
  438. package/dist/src/entities/teams/team.d.ts +129 -0
  439. package/dist/src/entities/ui/app-link.d.ts +24 -0
  440. package/dist/src/entities/ui/namespace.d.ts +75 -0
  441. package/dist/src/entities/unfurls/namespace.d.ts +24 -0
  442. package/dist/src/entities/users/namespace.d.ts +41 -0
  443. package/dist/src/entities/users/profile-picture.d.ts +29 -0
  444. package/dist/src/entities/users/profile-picture.test.d.ts +1 -0
  445. package/dist/src/entities/users/user.d.ts +102 -0
  446. package/dist/src/entities/web/namespace.d.ts +67 -0
  447. package/dist/src/entities/web/namespace.test.d.ts +1 -0
  448. package/dist/src/entities/webhooks/namespace.d.ts +38 -0
  449. package/dist/src/entities/webhooks/webhook.d.ts +130 -0
  450. package/dist/src/entities/whatsapp/account.d.ts +24 -0
  451. package/dist/src/entities/whatsapp/chat.d.ts +62 -0
  452. package/dist/src/entities/whatsapp/namespace.d.ts +29 -0
  453. package/dist/src/entities/workspace/items.d.ts +14 -0
  454. package/dist/src/entities/workspace/namespace.d.ts +96 -0
  455. package/dist/src/entities/workspace/query.d.ts +39 -0
  456. package/dist/src/entities/workspace/query.test.d.ts +1 -0
  457. package/dist/src/entities/workspace/types.d.ts +99 -0
  458. package/dist/src/events/hydrate/agentSession.d.ts +192 -0
  459. package/dist/src/events/hydrate/call.d.ts +101 -0
  460. package/dist/src/events/hydrate/channel.d.ts +55 -0
  461. package/dist/src/events/hydrate/document.d.ts +59 -0
  462. package/dist/src/events/hydrate/message.d.ts +70 -0
  463. package/dist/src/events/hydrate/user.d.ts +14 -0
  464. package/dist/src/events/receiver.d.ts +91 -0
  465. package/dist/src/events/types.d.ts +44 -0
  466. package/dist/src/events/verify.d.ts +13 -0
  467. package/dist/src/local-portmap.d.ts +8 -0
  468. package/dist/src/mentions.d.ts +42 -0
  469. package/dist/src/raw.d.ts +12 -0
  470. package/dist/src/rox.d.ts +267 -0
  471. package/dist/src/rox.js +23217 -0
  472. package/dist/src/utils/activity.d.ts +34 -0
  473. package/dist/src/utils/activity.test.d.ts +1 -0
  474. package/dist/src/utils/client.d.ts +62 -0
  475. package/dist/src/utils/concurrency.d.ts +5 -0
  476. package/dist/src/utils/index.d.ts +5 -0
  477. package/dist/src/utils/lazy.d.ts +37 -0
  478. package/dist/src/utils/options.d.ts +7 -0
  479. package/dist/src/utils/pagination.d.ts +28 -0
  480. package/dist/src/utils/unwrap.d.ts +48 -0
  481. package/dist/src/utils/verbs.d.ts +3 -0
  482. package/package.json +82 -4
@@ -0,0 +1,54 @@
1
+ import type { ExternalChatMessage as ExternalChatMessageRecord } from '../../../generated/storage/types.gen';
2
+ import type { RoxClient } from '../../utils/client';
3
+ import { RoxEntity } from '../entity';
4
+ import type { ExternalChat } from './chat';
5
+ /** Message in an added external chat. */
6
+ export declare class ExternalChatMessage extends RoxEntity<ExternalChatMessageRecord> {
7
+ /** The chat this message is in. */
8
+ readonly chat: ExternalChat;
9
+ private constructor();
10
+ /** Reference a message within its original chat. */
11
+ static byId(client: RoxClient, chat: ExternalChat, id: string): ExternalChatMessage;
12
+ /** Seed a message handle from a timeline response. */
13
+ static from(client: RoxClient, chat: ExternalChat, record: ExternalChatMessageRecord): ExternalChatMessage;
14
+ protected fetch(): Promise<ExternalChatMessageRecord>;
15
+ /** Plain message text. */
16
+ readonly body: () => Promise<string>;
17
+ /** Protocol-verified sender association and display name. */
18
+ readonly sender: () => Promise<import("../../../generated/storage").ExternalChatSender>;
19
+ /** Provider timestamp. */
20
+ readonly sentAt: () => Promise<string>;
21
+ /** Last edit time. */
22
+ readonly editedAt: () => Promise<string | undefined>;
23
+ /** Deleted for everyone. */
24
+ readonly deleted: () => Promise<boolean>;
25
+ /** Reactions by emoji: who reacted, and whether the caller did. */
26
+ readonly reactions: () => Promise<import("../../../generated/storage").ExternalChatReaction[]>;
27
+ /** Caller-owned send's delivery state, when present. */
28
+ readonly deliveryState: () => Promise<NonNullable<import("../../../generated/storage").ExternalChatDeliveryState | null | undefined> | undefined>;
29
+ /** `message`, or `system` for something that happened in the chat (see `rich`). */
30
+ readonly kind: () => Promise<import("../../../generated/storage").ExternalChatMessageKind>;
31
+ /** Forwarded from another chat. */
32
+ readonly forwarded: () => Promise<boolean>;
33
+ /** Sent as view-once in the provider; Rox keeps and shows it like any media. */
34
+ readonly viewOnce: () => Promise<boolean>;
35
+ /** People the body @-mentions: `@<token>` in the body is this person. */
36
+ readonly mentions: () => Promise<import("../../../generated/storage").ExternalChatMention[]>;
37
+ /** Poll (with tallies), location, contact cards, event or system line. */
38
+ readonly rich: () => Promise<NonNullable<import("../../../generated/storage").ExternalChatRichContent | null | undefined> | undefined>;
39
+ /** Quoted message in this chat. */
40
+ readonly replyTo: () => Promise<ExternalChatMessage | undefined>;
41
+ /** Attachment states, with the stored file's URL once ready. */
42
+ readonly attachments: () => Promise<{
43
+ ordinal: number;
44
+ state: import("../../../generated/storage").ExternalChatAttachmentState;
45
+ fileName: string;
46
+ mime: string;
47
+ size: number;
48
+ width: number | undefined;
49
+ height: number | undefined;
50
+ durationSeconds: number | undefined;
51
+ presentation: import("../../../generated/storage").ExternalChatMediaPresentation | undefined;
52
+ url: string | undefined;
53
+ }[]>;
54
+ }
@@ -0,0 +1,22 @@
1
+ import type { RoxClient } from '../../utils/client';
2
+ import { ExternalChat } from './chat';
3
+ /**
4
+ * Chats from external messaging providers (WhatsApp today) that someone added
5
+ * to Rox: read, share and send in them. Find and add a provider's chats
6
+ * through its own namespace, such as `macro.whatsapp.chats()`.
7
+ *
8
+ * @routing Use when reading, sharing or sending in an external chat, such as a WhatsApp chat, already added to Macro; not Macro channels, or finding chats to add (`macro.whatsapp`).
9
+ */
10
+ export declare class ExternalChatsNamespace {
11
+ private readonly client;
12
+ /** Bind external chat operations to this authenticated client. */
13
+ constructor(client: RoxClient);
14
+ /**
15
+ * Added chats the caller can view, including without a provider account of their own.
16
+ *
17
+ * @readonly
18
+ */
19
+ list(): Promise<ExternalChat[]>;
20
+ /** Reference an added chat without fetching it. */
21
+ byId(id: string): ExternalChat;
22
+ }
@@ -0,0 +1,28 @@
1
+ import type { ExternalChatParticipant as ExternalChatParticipantRecord } from '../../../generated/storage/types.gen';
2
+ import type { ExternalChat } from './chat';
3
+ /** Someone in an added external chat, from its members; mention them in a text reply. */
4
+ export declare class ExternalChatParticipant {
5
+ /** The chat whose members list them. */
6
+ readonly chat: ExternalChat;
7
+ /** Their provider id (a WhatsApp JID): correlation data, not a Rox user. */
8
+ readonly id: string;
9
+ private readonly record?;
10
+ private constructor();
11
+ /** Reference a participant of a chat by provider id. */
12
+ static byId(chat: ExternalChat, id: string): ExternalChatParticipant;
13
+ /** Seed a participant from the chat's members. */
14
+ static from(chat: ExternalChat, record: ExternalChatParticipantRecord): ExternalChatParticipant;
15
+ /** Their provider display name, untrusted, when known. */
16
+ get displayName(): string | undefined;
17
+ /** The digits a text reply writes as `@<digits>` to mention them. */
18
+ get mentionToken(): string;
19
+ /** Whether they administer the group, when read from its members. */
20
+ get admin(): boolean | undefined;
21
+ /** Serialize the participant reference without credentials. */
22
+ toJSON(): {
23
+ id: string;
24
+ chat: string;
25
+ displayName: string | undefined;
26
+ admin: boolean | undefined;
27
+ };
28
+ }
@@ -0,0 +1,40 @@
1
+ import type { ExternalChatSendProgress } from '../../../generated/storage/types.gen';
2
+ import type { RoxClient } from '../../utils/client';
3
+ import { RoxEntity } from '../entity';
4
+ import type { ExternalChat, ExternalChatContent } from './chat';
5
+ import { ExternalChatMessage } from './message';
6
+ /** One deliberate send intent. Unknown outcomes must never be automatically resent. */
7
+ export declare class ExternalChatSend extends RoxEntity<ExternalChatSendProgress> {
8
+ /** The chat containing this send. */
9
+ readonly chat: ExternalChat;
10
+ private constructor();
11
+ /** Reference a send intent within its original chat. */
12
+ static byId(client: RoxClient, chat: ExternalChat, id: string): ExternalChatSend;
13
+ /** Seed a send handle from a server response. */
14
+ static from(client: RoxClient, chat: ExternalChat, record: ExternalChatSendProgress): ExternalChatSend;
15
+ protected fetch(): Promise<ExternalChatSendProgress>;
16
+ /** Last observed delivery state; refresh explicitly to poll again. */
17
+ readonly state: () => Promise<import("../../../generated/storage").ExternalChatDeliveryState>;
18
+ /** Sanitized failure code, when present. */
19
+ readonly errorCode: () => Promise<string | undefined>;
20
+ /** When the send intent was created. */
21
+ readonly createdAt: () => Promise<string>;
22
+ /** Chat message once the provider accepted the send. */
23
+ readonly message: () => Promise<ExternalChatMessage | undefined>;
24
+ /**
25
+ * Inspect the original intent for reconciliation; never resubmit an unknown outcome automatically.
26
+ *
27
+ * @readonly
28
+ */
29
+ request(): Promise<{
30
+ idempotencyKey: string;
31
+ message: ExternalChatContent;
32
+ replyTo?: ExternalChatMessage;
33
+ }>;
34
+ /**
35
+ * Fetch current delivery state without retrying or submitting the message.
36
+ *
37
+ * @readonly
38
+ */
39
+ refresh(): Promise<this>;
40
+ }
@@ -0,0 +1,25 @@
1
+ import type { ExternalChatUploadedAttachment } from '../../../generated/storage/types.gen';
2
+ import type { ExternalChat } from './chat';
3
+ /** A staged attachment scoped to one added chat; use it in a deliberate media send. */
4
+ export declare class ExternalChatUpload {
5
+ /** Correlation identity of the staged upload. */
6
+ readonly id: string;
7
+ /** The chat this upload can be sent to. */
8
+ readonly chat: ExternalChat;
9
+ /** Display filename supplied by the server. */
10
+ readonly filename?: string | undefined;
11
+ /** Media category supplied by the server. */
12
+ readonly kind?: ExternalChatUploadedAttachment["kind"] | undefined;
13
+ private constructor();
14
+ /** Reference a previously staged upload in its original chat. */
15
+ static byId(chat: ExternalChat, id: string): ExternalChatUpload;
16
+ /** Seed a handle from the server's upload receipt. */
17
+ static from(chat: ExternalChat, record: ExternalChatUploadedAttachment): ExternalChatUpload;
18
+ /** Serialize the upload reference without credentials. */
19
+ toJSON(): {
20
+ id: string;
21
+ chat: string;
22
+ filename: string | undefined;
23
+ kind: import("../../../generated/storage").ExternalChatMediaKind | undefined;
24
+ };
25
+ }
@@ -0,0 +1,52 @@
1
+ import type { Favorite, FavoriteEntityRef } from '../../../generated/storage/types.gen';
2
+ import type { RoxClient } from '../../utils/client';
3
+ import type { FavoritableEntity, RoxEntityType } from '../entity';
4
+ export type { Favorite, FavoriteEntityRef };
5
+ /**
6
+ * Which favorites to list.
7
+ *
8
+ * The two dimensions are independent. Within one, the values are alternatives;
9
+ * between them they are both required, so `entityTypes: ['document']` with
10
+ * `entityIds: [a, b]` matches only documents `a` and `b`. An omitted or empty
11
+ * list constrains nothing, which is why the default lists the whole collection.
12
+ */
13
+ export type FavoritesFilter = {
14
+ entityTypes?: RoxEntityType[];
15
+ entityIds?: string[];
16
+ };
17
+ /**
18
+ * The user's favorites: a manually ordered collection of entity references.
19
+ *
20
+ * @routing Use when adding or removing the user's favorites; not pins (`macro.pins`).
21
+ */
22
+ export declare class FavoritesNamespace {
23
+ private readonly client;
24
+ constructor(client: RoxClient);
25
+ /**
26
+ * The user's favorites, in manual order.
27
+ *
28
+ * @readonly
29
+ */
30
+ list(filter?: FavoritesFilter): Promise<Favorite[]>;
31
+ /**
32
+ * Favorite an entity. Returns the favorite record.
33
+ *
34
+ * @write
35
+ * @idempotent
36
+ */
37
+ add(entity: FavoritableEntity<unknown>): Promise<Favorite>;
38
+ /**
39
+ * Remove an entity from the user's favorites.
40
+ *
41
+ * @write
42
+ * @idempotent
43
+ */
44
+ remove(entity: FavoritableEntity<unknown>): Promise<void>;
45
+ /**
46
+ * Reorder the favorites: pass every favorited entity in the desired order.
47
+ *
48
+ * @write
49
+ * @idempotent
50
+ */
51
+ reorder(favorites: FavoriteEntityRef[]): Promise<void>;
52
+ }
@@ -0,0 +1,36 @@
1
+ import type { GetForeignEntityResponses } from '../../../generated/storage/types.gen';
2
+ import type { RoxClient } from '../../utils/client';
3
+ import { FavoritableEntity } from '../entity';
4
+ type ForeignEntityDetail = GetForeignEntityResponses[200];
5
+ /**
6
+ * A read-only mapping to an entity owned by an external system (e.g. a
7
+ * GitHub pull request). Keyed by the internal foreign-entity record id.
8
+ */
9
+ export declare class ForeignEntity extends FavoritableEntity<ForeignEntityDetail> {
10
+ /** Favorites identify foreign entities as `foreign_entity`. */
11
+ readonly entityType = "foreign_entity";
12
+ protected fetch(): Promise<ForeignEntityDetail>;
13
+ /** A handle to a foreign entity by its internal record id. Details load on first access. */
14
+ static byId(client: RoxClient, id: string): ForeignEntity;
15
+ /** Build a foreign entity from an already-fetched record (pre-seeded, no fetch). */
16
+ static fromRecord(client: RoxClient, record: ForeignEntityDetail): ForeignEntity;
17
+ /** The identifier assigned by the external system. */
18
+ readonly foreignEntityId: () => Promise<string>;
19
+ /** The source system that owns the external identifier (e.g. `github_pull_request`). */
20
+ readonly source: () => Promise<string>;
21
+ /** The internal entity id this foreign entity is stored for. */
22
+ readonly storedForId: () => Promise<string>;
23
+ /** The internal auth entity namespace this foreign entity is stored for. */
24
+ readonly storedForAuthEntity: () => Promise<string>;
25
+ /** When the record was created (ISO timestamp). */
26
+ readonly createdAt: () => Promise<string>;
27
+ /** When the record was last updated (ISO timestamp). */
28
+ readonly updatedAt: () => Promise<string>;
29
+ /**
30
+ * Arbitrary source-specific metadata stored with the mapping.
31
+ *
32
+ * @readonly
33
+ */
34
+ metadata(): Promise<unknown>;
35
+ }
36
+ export {};
@@ -0,0 +1,54 @@
1
+ import type { GithubRepositoryFacet, GithubLabelFacet as WireGithubLabelFacet, GithubUserFacet as WireGithubUserFacet } from '../../../generated/storage/types.gen';
2
+ import type { RoxClient } from '../../utils/client';
3
+ import { ForeignEntity } from './foreign-entity';
4
+ export type { GithubRepositoryFacet };
5
+ /** A GitHub user among the pull requests visible to the caller, as an author or an assignee. */
6
+ export type GithubUserFacet = Omit<WireGithubUserFacet, 'login'> & {
7
+ /** The user's most recently synced GitHub login, when known. */
8
+ login?: string;
9
+ };
10
+ /** A label among the GitHub pull requests visible to the caller. */
11
+ export type GithubLabelFacet = Omit<WireGithubLabelFacet, 'color'> & {
12
+ /** The label's most recently synced color, as six hex digits without `#`. */
13
+ color?: string;
14
+ };
15
+ /**
16
+ * Repositories, authors, assignees, and labels among the GitHub pull requests
17
+ * visible to the caller.
18
+ */
19
+ export interface GithubPullRequestFacets {
20
+ /** Repositories, most pull requests first. */
21
+ repositories: GithubRepositoryFacet[];
22
+ /** Authors, most pull requests first. */
23
+ authors: GithubUserFacet[];
24
+ /** Assignees, most pull requests first. */
25
+ assignees: GithubUserFacet[];
26
+ /** Labels, most pull requests first. */
27
+ labels: GithubLabelFacet[];
28
+ }
29
+ /**
30
+ * @routing Use when looking up, favoriting or muting an item linked into Rox from another system, such as a GitHub pull request, by its id in that system; not items created in Rox.
31
+ */
32
+ export declare class ForeignEntityNamespace {
33
+ private readonly client;
34
+ constructor(client: RoxClient);
35
+ byId(id: string): ForeignEntity;
36
+ /**
37
+ * Look a foreign entity up by the identifier its source system assigned.
38
+ *
39
+ * `foreignEntityId` may contain slashes — sources store them inside the
40
+ * identifier, for example `owner/repo/pull/12`.
41
+ *
42
+ * @readonly
43
+ */
44
+ bySource(source: string, foreignEntityId: string): Promise<ForeignEntity>;
45
+ /**
46
+ * Repositories, authors, assignees, and labels among the GitHub pull
47
+ * requests visible to the authenticated user and their team, each with how
48
+ * many pull requests it covers. A pull request visible to both the user and
49
+ * the team counts once.
50
+ *
51
+ * @readonly
52
+ */
53
+ githubPullRequestFacets(): Promise<GithubPullRequestFacets>;
54
+ }
@@ -0,0 +1,319 @@
1
+ import type { BookingTarget, CellValue, EntityAppearance, EntityKind, FilterGroup, FilterTest, FormDetail, FormPublicationProblem, ResponseStatus, SharePermissionV2, UnlockedBooking, UpdateForm, UpdateSharePermissionRequestV2, Widget } from '../../../generated/storage/types.gen';
2
+ import type { RoxClient } from '../../utils/client';
3
+ import type { Channel } from '../channels/channel';
4
+ import type { DatabaseColumn } from '../databases/column';
5
+ import { Database } from '../databases/database';
6
+ import { DatabaseRow } from '../databases/row';
7
+ import { DatabaseTable } from '../databases/table';
8
+ import { RoxEntity } from '../entity';
9
+ import { User } from '../users/user';
10
+ import { FormOption, FormQuestion } from './question';
11
+ import { FormResponse } from './response';
12
+ import { FormSection } from './section';
13
+ /** An entity handle used in a reference answer or rule. */
14
+ export interface FormEntityHandle {
15
+ /** The entity's identifier. */
16
+ readonly id: string;
17
+ }
18
+ /** A typed reference read from a form answer, without fetching the referenced entity. */
19
+ export declare class FormReference implements FormEntityHandle {
20
+ /** The referenced entity's kind. */
21
+ readonly entityType: EntityKind;
22
+ /** The referenced entity's identifier. */
23
+ readonly id: string;
24
+ private constructor();
25
+ /** Construct a reference when its kind and identifier are known. */
26
+ static byId(entityType: EntityKind, id: string): FormReference;
27
+ }
28
+ /** An answer value; references use handles, and scalar values keep their cell representation. */
29
+ export type FormAnswerValue = Exclude<CellValue, {
30
+ type: 'rows' | 'options' | 'entities';
31
+ }> | {
32
+ type: 'rows';
33
+ value: DatabaseRow[];
34
+ } | {
35
+ type: 'options';
36
+ value: FormOption[];
37
+ } | {
38
+ type: 'entities';
39
+ value: {
40
+ entityType: EntityKind;
41
+ entity: FormEntityHandle;
42
+ }[];
43
+ };
44
+ /** One question and its answer. */
45
+ export type FormAnswer = {
46
+ question: FormQuestion;
47
+ value: FormAnswerValue;
48
+ };
49
+ /** A form rule, with option and entity references represented by handles. */
50
+ export type FormRuleTest = Exclude<FilterTest, {
51
+ kind: 'options' | 'entities';
52
+ }> | {
53
+ kind: 'options';
54
+ operator: Extract<FilterTest, {
55
+ kind: 'options';
56
+ }>['operator'];
57
+ options: FormOption[];
58
+ } | {
59
+ kind: 'entities';
60
+ operator: Extract<FilterTest, {
61
+ kind: 'entities';
62
+ }>['operator'];
63
+ entities: FormEntityHandle[];
64
+ };
65
+ /** Conditions over columns asked in earlier sections. */
66
+ export type FormRules = {
67
+ conjunction: FilterGroup['conjunction'];
68
+ conditions: ({
69
+ kind: 'condition';
70
+ column: DatabaseColumn;
71
+ test: FormRuleTest;
72
+ } | ({
73
+ kind: 'group';
74
+ } & FormRules))[];
75
+ };
76
+ /** A question placement in a layout replacement. Omit question to mint a new stable question. */
77
+ export type FormQuestionPlacement = {
78
+ question?: FormQuestion;
79
+ column: DatabaseColumn;
80
+ helpText?: string;
81
+ required?: boolean;
82
+ widget?: Widget;
83
+ };
84
+ /** A section in a layout replacement. Omit section to mint a new stable section. */
85
+ export type FormSectionPlacement = {
86
+ section?: FormSection;
87
+ title: string;
88
+ description?: string;
89
+ } & ({
90
+ kind: 'questions';
91
+ questions: FormQuestionPlacement[];
92
+ } | {
93
+ kind: 'gate';
94
+ rules: FormRules;
95
+ message: string;
96
+ } | {
97
+ kind: 'booking';
98
+ target: BookingTarget;
99
+ });
100
+ /** A saved layout and any reason it is not yet visible to respondents. */
101
+ export type FormLayoutResult = {
102
+ form: Form;
103
+ publicationError?: FormPublicationProblem;
104
+ };
105
+ /** The public Rox booking destination selected by a form editor. */
106
+ export type FormBookingTarget = BookingTarget;
107
+ /** A booking step released after the form accepts the caller's answers. */
108
+ export type FormBookingStep = Omit<UnlockedBooking, 'section'> & {
109
+ section: FormSection;
110
+ };
111
+ /** The result of submitting or editing a response. A stopped submission has no row. */
112
+ export type FormSubmissionOutcome = {
113
+ outcome: 'submitted';
114
+ response: FormResponse;
115
+ row: DatabaseRow;
116
+ booking?: FormBookingStep;
117
+ } | {
118
+ outcome: 'stopped';
119
+ section: FormSection;
120
+ message: string;
121
+ };
122
+ /**
123
+ * The caller's receipt and current answers, read without access to other
124
+ * responses. On an anonymous form the caller only learns that they
125
+ * responded: nothing links them to their response.
126
+ */
127
+ export type MyFormResponse = SavedFormResponse | {
128
+ kind: 'anonymous';
129
+ };
130
+ /** The caller's saved response to a form that isn't anonymous. */
131
+ export type SavedFormResponse = {
132
+ kind: 'saved';
133
+ booking?: FormBookingStep;
134
+ response: FormResponse;
135
+ status: ResponseStatus;
136
+ stoppedAtSection?: FormSection;
137
+ row?: DatabaseRow;
138
+ submittedAt: string;
139
+ updatedAt: string;
140
+ answers: FormAnswer[];
141
+ };
142
+ /** Counts from the response ledger and its linked table. */
143
+ export type FormResponseSummary = {
144
+ submitted: number;
145
+ stopped: number;
146
+ stoppedBySection: {
147
+ section: FormSection;
148
+ count: number;
149
+ }[];
150
+ rows: number;
151
+ };
152
+ /** A question's public tally. Options with no votes are retained. */
153
+ export type FormQuestionTally = {
154
+ question: FormQuestion;
155
+ responses: number;
156
+ buckets: {
157
+ value: {
158
+ kind: 'option';
159
+ option: FormOption;
160
+ } | {
161
+ kind: 'checkbox';
162
+ checked: boolean;
163
+ };
164
+ count: number;
165
+ }[];
166
+ };
167
+ /**
168
+ * A form over a database table. Viewers can read its questions and submit;
169
+ * editors can build it and read responses; owners control its audience.
170
+ */
171
+ export declare class Form extends RoxEntity<FormDetail> {
172
+ protected fetch(): Promise<FormDetail>;
173
+ /** A form handle with details loaded on demand. */
174
+ static byId(client: RoxClient, id: string): Form;
175
+ /** Create a form, optionally over a table of a database the caller owns. */
176
+ static create(client: RoxClient, options: {
177
+ name: string;
178
+ table?: DatabaseTable;
179
+ }): Promise<Form>;
180
+ /** Forms shared with the caller, or live forms over a specified database. */
181
+ static list(client: RoxClient, database?: Database): Promise<Form[]>;
182
+ /**
183
+ * The form's presentation and column facts; this never contains response rows.
184
+ *
185
+ * @readonly
186
+ */
187
+ schema(): Promise<FormDetail>;
188
+ /** The form's display name. */
189
+ readonly name: () => Promise<string>;
190
+ /** Shared icon and color overrides. */
191
+ readonly appearance: () => Promise<EntityAppearance | null | undefined>;
192
+ /**
193
+ * Replace shared appearance. Pass {} to reset both overrides.
194
+ *
195
+ * @write
196
+ * @idempotent
197
+ */
198
+ setAppearance(appearance: EntityAppearance): Promise<EntityAppearance>;
199
+ /** Introductory text shown to respondents. */
200
+ readonly description: () => Promise<string>;
201
+ /** The owning user. */
202
+ readonly owner: () => Promise<User>;
203
+ /** The response database. Reading its contents requires separate access. */
204
+ readonly database: () => Promise<Database>;
205
+ /** The linked table, without fetching its contents. */
206
+ readonly table: () => Promise<DatabaseTable>;
207
+ /** Who may respond. */
208
+ readonly audience: () => Promise<import("../../../generated/storage").Audience>;
209
+ /** Whether submissions are currently enabled. A closing time can also close the form. */
210
+ readonly status: () => Promise<import("../../../generated/storage").FormStatus>;
211
+ /** Scheduled closing time, when set. */
212
+ readonly closesAt: () => Promise<string | undefined>;
213
+ /** The caller's access level. */
214
+ readonly access: () => Promise<import("../../../generated/storage").FormAccess>;
215
+ /**
216
+ * Share this form with a channel's current members, as posting it in the
217
+ * channel does. The caller must be in the channel and able to share the
218
+ * form; sharing again changes nothing.
219
+ *
220
+ * @write
221
+ * @idempotent
222
+ */
223
+ shareWithChannel(channel: Channel): Promise<void>;
224
+ /**
225
+ * Sections in display order.
226
+ *
227
+ * @readonly
228
+ */
229
+ sections(): Promise<FormSection[]>;
230
+ /**
231
+ * All questions in display order, skipping gates.
232
+ *
233
+ * @readonly
234
+ */
235
+ questions(): Promise<FormQuestion[]>;
236
+ /**
237
+ * Update presentation or owner-controlled settings; null explicitly clears the closing time.
238
+ *
239
+ * @write
240
+ * @idempotent
241
+ */
242
+ update(updates: UpdateForm): Promise<this>;
243
+ private assertOwns;
244
+ /**
245
+ * Save a replacement in the shared draft. Existing handles retain identity;
246
+ * omitted handles mint sections or questions. Column facts use the database API.
247
+ * A publicationError means the draft was saved but respondents still see the last
248
+ * valid version. Repair the reported problem or reload to retry publication.
249
+ *
250
+ * @destructive
251
+ * @idempotent
252
+ */
253
+ replaceLayout(sections: FormSectionPlacement[]): Promise<FormLayoutResult>;
254
+ private wireAnswers;
255
+ private unlockedBooking;
256
+ private outcome;
257
+ /**
258
+ * Submit answers. Signed-in respondents get at most one response; use editResponse afterwards.
259
+ *
260
+ * @write
261
+ */
262
+ submit(answers: FormAnswer[]): Promise<FormSubmissionOutcome>;
263
+ /**
264
+ * Replace the caller's answers while the form is open; gates are evaluated again.
265
+ *
266
+ * @destructive
267
+ * @idempotent
268
+ */
269
+ editResponse(answers: FormAnswer[]): Promise<FormSubmissionOutcome>;
270
+ /**
271
+ * Read the caller's receipt and answers without reading anyone else's responses.
272
+ *
273
+ * @readonly
274
+ */
275
+ myResponse(): Promise<MyFormResponse>;
276
+ /**
277
+ * Ledger counts and total table rows; requires edit access.
278
+ *
279
+ * @readonly
280
+ */
281
+ responseSummary(): Promise<FormResponseSummary>;
282
+ /**
283
+ * Choice and checkbox counts, available to viewers when tally visibility is enabled.
284
+ *
285
+ * @readonly
286
+ */
287
+ tally(): Promise<FormQuestionTally[]>;
288
+ /**
289
+ * Read the form's sharing grants. Requires ownership.
290
+ *
291
+ * @readonly
292
+ */
293
+ sharePermissions(): Promise<SharePermissionV2>;
294
+ /**
295
+ * Update grants. Public responding is controlled by audience, not link sharing.
296
+ *
297
+ * @write
298
+ * @idempotent
299
+ */
300
+ updateSharePermissions(request: UpdateSharePermissionRequestV2): Promise<SharePermissionV2>;
301
+ /**
302
+ * Open the form's builder in Rox.
303
+ *
304
+ * @readonly
305
+ */
306
+ webUrl(): string;
307
+ /** Identity, loaded detail and {@link webUrl}, so serialized handles carry their link. */
308
+ toJSON(): {
309
+ url: string;
310
+ id: string;
311
+ detail?: FormDetail | undefined;
312
+ };
313
+ /**
314
+ * The respondent page, which public forms also expose without signing in.
315
+ *
316
+ * @readonly
317
+ */
318
+ respondUrl(): string;
319
+ }
@@ -0,0 +1,30 @@
1
+ import type { RoxClient } from '../../utils/client';
2
+ import type { Database } from '../databases/database';
3
+ import type { DatabaseTable } from '../databases/table';
4
+ import { Form } from './form';
5
+ /**
6
+ * Forms collect answers into a database table without granting respondents table access.
7
+ *
8
+ * @routing Use when building a form, poll or survey, or reading its responses; not database tables.
9
+ */
10
+ export declare class FormNamespace {
11
+ private readonly client;
12
+ constructor(client: RoxClient);
13
+ /** A form handle. Details load on first access. */
14
+ byId(id: string): Form;
15
+ /**
16
+ * Create a form over an existing table, or create its own Responses database.
17
+ *
18
+ * @write
19
+ */
20
+ create(options: {
21
+ name: string;
22
+ table?: DatabaseTable;
23
+ }): Promise<Form>;
24
+ /**
25
+ * List forms shared with the caller, or forms over a database the caller can read.
26
+ *
27
+ * @readonly
28
+ */
29
+ list(database?: Database): Promise<Form[]>;
30
+ }