@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,2068 @@
1
+ // generated/auth/core/bodySerializer.gen.ts
2
+ var jsonBodySerializer = {
3
+ bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
4
+ };
5
+
6
+ // generated/auth/core/serverSentEvents.gen.ts
7
+ function createSseClient({
8
+ onRequest,
9
+ onSseError,
10
+ onSseEvent,
11
+ responseTransformer,
12
+ responseValidator,
13
+ sseDefaultRetryDelay,
14
+ sseMaxRetryAttempts,
15
+ sseMaxRetryDelay,
16
+ sseSleepFn,
17
+ url,
18
+ ...options
19
+ }) {
20
+ let lastEventId;
21
+ const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
22
+ const createStream = async function* () {
23
+ let retryDelay = sseDefaultRetryDelay ?? 3e3;
24
+ let attempt = 0;
25
+ const signal = options.signal ?? new AbortController().signal;
26
+ while (true) {
27
+ if (signal.aborted) break;
28
+ attempt++;
29
+ const headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
30
+ if (lastEventId !== void 0) {
31
+ headers.set("Last-Event-ID", lastEventId);
32
+ }
33
+ try {
34
+ const requestInit = {
35
+ redirect: "follow",
36
+ ...options,
37
+ body: options.serializedBody,
38
+ headers,
39
+ signal
40
+ };
41
+ let request = new Request(url, requestInit);
42
+ if (onRequest) {
43
+ request = await onRequest(url, requestInit);
44
+ }
45
+ const _fetch = options.fetch ?? globalThis.fetch;
46
+ const response = await _fetch(request);
47
+ if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
48
+ if (!response.body) throw new Error("No body in SSE response");
49
+ const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
50
+ let buffer = "";
51
+ const abortHandler = () => {
52
+ try {
53
+ reader.cancel();
54
+ } catch {
55
+ }
56
+ };
57
+ signal.addEventListener("abort", abortHandler);
58
+ try {
59
+ while (true) {
60
+ const { done, value } = await reader.read();
61
+ if (done) break;
62
+ buffer += value;
63
+ buffer = buffer.replace(/\r\n?/g, "\n");
64
+ const chunks = buffer.split("\n\n");
65
+ buffer = chunks.pop() ?? "";
66
+ for (const chunk of chunks) {
67
+ const lines = chunk.split("\n");
68
+ const dataLines = [];
69
+ let eventName;
70
+ for (const line of lines) {
71
+ if (line.startsWith("data:")) {
72
+ dataLines.push(line.replace(/^data:\s*/, ""));
73
+ } else if (line.startsWith("event:")) {
74
+ eventName = line.replace(/^event:\s*/, "");
75
+ } else if (line.startsWith("id:")) {
76
+ lastEventId = line.replace(/^id:\s*/, "");
77
+ } else if (line.startsWith("retry:")) {
78
+ const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
79
+ if (!Number.isNaN(parsed)) {
80
+ retryDelay = parsed;
81
+ }
82
+ }
83
+ }
84
+ let data;
85
+ let parsedJson = false;
86
+ if (dataLines.length) {
87
+ const rawData = dataLines.join("\n");
88
+ try {
89
+ data = JSON.parse(rawData);
90
+ parsedJson = true;
91
+ } catch {
92
+ data = rawData;
93
+ }
94
+ }
95
+ if (parsedJson) {
96
+ if (responseValidator) {
97
+ await responseValidator(data);
98
+ }
99
+ if (responseTransformer) {
100
+ data = await responseTransformer(data);
101
+ }
102
+ }
103
+ onSseEvent?.({
104
+ data,
105
+ event: eventName,
106
+ id: lastEventId,
107
+ retry: retryDelay
108
+ });
109
+ if (dataLines.length) {
110
+ yield data;
111
+ }
112
+ }
113
+ }
114
+ } finally {
115
+ signal.removeEventListener("abort", abortHandler);
116
+ reader.releaseLock();
117
+ }
118
+ break;
119
+ } catch (error) {
120
+ onSseError?.(error);
121
+ if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
122
+ break;
123
+ }
124
+ const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
125
+ await sleep(backoff);
126
+ }
127
+ }
128
+ };
129
+ const stream = createStream();
130
+ return { stream };
131
+ }
132
+
133
+ // generated/auth/core/pathSerializer.gen.ts
134
+ var separatorArrayExplode = (style) => {
135
+ switch (style) {
136
+ case "label":
137
+ return ".";
138
+ case "matrix":
139
+ return ";";
140
+ case "simple":
141
+ return ",";
142
+ default:
143
+ return "&";
144
+ }
145
+ };
146
+ var separatorArrayNoExplode = (style) => {
147
+ switch (style) {
148
+ case "form":
149
+ return ",";
150
+ case "pipeDelimited":
151
+ return "|";
152
+ case "spaceDelimited":
153
+ return "%20";
154
+ default:
155
+ return ",";
156
+ }
157
+ };
158
+ var separatorObjectExplode = (style) => {
159
+ switch (style) {
160
+ case "label":
161
+ return ".";
162
+ case "matrix":
163
+ return ";";
164
+ case "simple":
165
+ return ",";
166
+ default:
167
+ return "&";
168
+ }
169
+ };
170
+ var serializeArrayParam = ({
171
+ allowReserved,
172
+ explode,
173
+ name,
174
+ style,
175
+ value
176
+ }) => {
177
+ if (!explode) {
178
+ const joinedValues2 = (allowReserved ? value : value.map((v) => encodeURIComponent(v))).join(separatorArrayNoExplode(style));
179
+ switch (style) {
180
+ case "label":
181
+ return `.${joinedValues2}`;
182
+ case "matrix":
183
+ return `;${name}=${joinedValues2}`;
184
+ case "simple":
185
+ return joinedValues2;
186
+ default:
187
+ return `${name}=${joinedValues2}`;
188
+ }
189
+ }
190
+ const separator = separatorArrayExplode(style);
191
+ const joinedValues = value.map((v) => {
192
+ if (style === "label" || style === "simple") {
193
+ return allowReserved ? v : encodeURIComponent(v);
194
+ }
195
+ return serializePrimitiveParam({
196
+ allowReserved,
197
+ name,
198
+ value: v
199
+ });
200
+ }).join(separator);
201
+ return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
202
+ };
203
+ var serializePrimitiveParam = ({
204
+ allowReserved,
205
+ name,
206
+ value
207
+ }) => {
208
+ if (value === void 0 || value === null) {
209
+ return "";
210
+ }
211
+ if (typeof value === "object") {
212
+ throw new Error(
213
+ "Deeply-nested arrays/objects aren\u2019t supported. Provide your own `querySerializer()` to handle these."
214
+ );
215
+ }
216
+ return `${name}=${allowReserved ? value : encodeURIComponent(value)}`;
217
+ };
218
+ var serializeObjectParam = ({
219
+ allowReserved,
220
+ explode,
221
+ name,
222
+ style,
223
+ value,
224
+ valueOnly
225
+ }) => {
226
+ if (value instanceof Date) {
227
+ return valueOnly ? value.toISOString() : `${name}=${value.toISOString()}`;
228
+ }
229
+ if (style !== "deepObject" && !explode) {
230
+ let values = [];
231
+ Object.entries(value).forEach(([key, v]) => {
232
+ values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
233
+ });
234
+ const joinedValues2 = values.join(",");
235
+ switch (style) {
236
+ case "form":
237
+ return `${name}=${joinedValues2}`;
238
+ case "label":
239
+ return `.${joinedValues2}`;
240
+ case "matrix":
241
+ return `;${name}=${joinedValues2}`;
242
+ default:
243
+ return joinedValues2;
244
+ }
245
+ }
246
+ const separator = separatorObjectExplode(style);
247
+ const joinedValues = Object.entries(value).map(
248
+ ([key, v]) => serializePrimitiveParam({
249
+ allowReserved,
250
+ name: style === "deepObject" ? `${name}[${key}]` : key,
251
+ value: v
252
+ })
253
+ ).join(separator);
254
+ return style === "label" || style === "matrix" ? separator + joinedValues : joinedValues;
255
+ };
256
+
257
+ // generated/auth/core/utils.gen.ts
258
+ var PATH_PARAM_RE = /\{[^{}]+\}/g;
259
+ var defaultPathSerializer = ({ path, url: _url }) => {
260
+ let url = _url;
261
+ const matches = _url.match(PATH_PARAM_RE);
262
+ if (matches) {
263
+ for (const match of matches) {
264
+ let explode = false;
265
+ let name = match.substring(1, match.length - 1);
266
+ let style = "simple";
267
+ if (name.endsWith("*")) {
268
+ explode = true;
269
+ name = name.substring(0, name.length - 1);
270
+ }
271
+ if (name.startsWith(".")) {
272
+ name = name.substring(1);
273
+ style = "label";
274
+ } else if (name.startsWith(";")) {
275
+ name = name.substring(1);
276
+ style = "matrix";
277
+ }
278
+ const value = path[name];
279
+ if (value === void 0 || value === null) {
280
+ continue;
281
+ }
282
+ if (Array.isArray(value)) {
283
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
284
+ continue;
285
+ }
286
+ if (typeof value === "object") {
287
+ url = url.replace(
288
+ match,
289
+ serializeObjectParam({
290
+ explode,
291
+ name,
292
+ style,
293
+ value,
294
+ valueOnly: true
295
+ })
296
+ );
297
+ continue;
298
+ }
299
+ if (style === "matrix") {
300
+ url = url.replace(
301
+ match,
302
+ `;${serializePrimitiveParam({
303
+ name,
304
+ value
305
+ })}`
306
+ );
307
+ continue;
308
+ }
309
+ const replaceValue = encodeURIComponent(
310
+ style === "label" ? `.${value}` : value
311
+ );
312
+ url = url.replace(match, replaceValue);
313
+ }
314
+ }
315
+ return url;
316
+ };
317
+ var getUrl = ({
318
+ baseUrl,
319
+ path,
320
+ query,
321
+ querySerializer,
322
+ url: _url
323
+ }) => {
324
+ const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
325
+ let url = (baseUrl ?? "") + pathUrl;
326
+ if (path) {
327
+ url = defaultPathSerializer({ path, url });
328
+ }
329
+ let search = query ? querySerializer(query) : "";
330
+ if (search.startsWith("?")) {
331
+ search = search.substring(1);
332
+ }
333
+ if (search) {
334
+ url += `?${search}`;
335
+ }
336
+ return url;
337
+ };
338
+ function getValidRequestBody(options) {
339
+ const hasBody = options.body !== void 0;
340
+ const isSerializedBody = hasBody && options.bodySerializer;
341
+ if (isSerializedBody) {
342
+ if ("serializedBody" in options) {
343
+ const hasSerializedBody = options.serializedBody !== void 0 && options.serializedBody !== "";
344
+ return hasSerializedBody ? options.serializedBody : null;
345
+ }
346
+ return options.body !== "" ? options.body : null;
347
+ }
348
+ if (hasBody) {
349
+ return options.body;
350
+ }
351
+ return void 0;
352
+ }
353
+
354
+ // generated/auth/core/auth.gen.ts
355
+ var getAuthToken = async (auth, callback) => {
356
+ const token = typeof callback === "function" ? await callback(auth) : callback;
357
+ if (!token) {
358
+ return;
359
+ }
360
+ if (auth.scheme === "bearer") {
361
+ return `Bearer ${token}`;
362
+ }
363
+ if (auth.scheme === "basic") {
364
+ return `Basic ${btoa(token)}`;
365
+ }
366
+ return token;
367
+ };
368
+
369
+ // generated/auth/client/utils.gen.ts
370
+ var createQuerySerializer = ({
371
+ parameters = {},
372
+ ...args
373
+ } = {}) => {
374
+ const querySerializer = (queryParams) => {
375
+ const search = [];
376
+ if (queryParams && typeof queryParams === "object") {
377
+ for (const name in queryParams) {
378
+ const value = queryParams[name];
379
+ if (value === void 0 || value === null) {
380
+ continue;
381
+ }
382
+ const options = parameters[name] || args;
383
+ if (Array.isArray(value)) {
384
+ const serializedArray = serializeArrayParam({
385
+ allowReserved: options.allowReserved,
386
+ explode: true,
387
+ name,
388
+ style: "form",
389
+ value,
390
+ ...options.array
391
+ });
392
+ if (serializedArray) search.push(serializedArray);
393
+ } else if (typeof value === "object") {
394
+ const serializedObject = serializeObjectParam({
395
+ allowReserved: options.allowReserved,
396
+ explode: true,
397
+ name,
398
+ style: "deepObject",
399
+ value,
400
+ ...options.object
401
+ });
402
+ if (serializedObject) search.push(serializedObject);
403
+ } else {
404
+ const serializedPrimitive = serializePrimitiveParam({
405
+ allowReserved: options.allowReserved,
406
+ name,
407
+ value
408
+ });
409
+ if (serializedPrimitive) search.push(serializedPrimitive);
410
+ }
411
+ }
412
+ }
413
+ return search.join("&");
414
+ };
415
+ return querySerializer;
416
+ };
417
+ var getParseAs = (contentType) => {
418
+ if (!contentType) {
419
+ return "stream";
420
+ }
421
+ const cleanContent = contentType.split(";")[0]?.trim();
422
+ if (!cleanContent) {
423
+ return;
424
+ }
425
+ if (cleanContent.startsWith("application/json") || cleanContent.endsWith("+json")) {
426
+ return "json";
427
+ }
428
+ if (cleanContent === "multipart/form-data") {
429
+ return "formData";
430
+ }
431
+ if (["application/", "audio/", "image/", "video/"].some((type) => cleanContent.startsWith(type))) {
432
+ return "blob";
433
+ }
434
+ if (cleanContent.startsWith("text/")) {
435
+ return "text";
436
+ }
437
+ return;
438
+ };
439
+ var checkForExistence = (options, name) => {
440
+ if (!name) {
441
+ return false;
442
+ }
443
+ if (options.headers.has(name) || options.query?.[name] || options.headers.get("Cookie")?.includes(`${name}=`)) {
444
+ return true;
445
+ }
446
+ return false;
447
+ };
448
+ async function setAuthParams(options) {
449
+ for (const auth of options.security ?? []) {
450
+ if (checkForExistence(options, auth.name)) {
451
+ continue;
452
+ }
453
+ const token = await getAuthToken(auth, options.auth);
454
+ if (!token) {
455
+ continue;
456
+ }
457
+ const name = auth.name ?? "Authorization";
458
+ switch (auth.in) {
459
+ case "query":
460
+ if (!options.query) {
461
+ options.query = {};
462
+ }
463
+ options.query[name] = token;
464
+ break;
465
+ case "cookie":
466
+ options.headers.append("Cookie", `${name}=${token}`);
467
+ break;
468
+ case "header":
469
+ default:
470
+ options.headers.set(name, token);
471
+ break;
472
+ }
473
+ }
474
+ }
475
+ var buildUrl = (options) => getUrl({
476
+ baseUrl: options.baseUrl,
477
+ path: options.path,
478
+ query: options.query,
479
+ querySerializer: typeof options.querySerializer === "function" ? options.querySerializer : createQuerySerializer(options.querySerializer),
480
+ url: options.url
481
+ });
482
+ var mergeConfigs = (a, b) => {
483
+ const config = { ...a, ...b };
484
+ if (config.baseUrl?.endsWith("/")) {
485
+ config.baseUrl = config.baseUrl.substring(0, config.baseUrl.length - 1);
486
+ }
487
+ config.headers = mergeHeaders(a.headers, b.headers);
488
+ return config;
489
+ };
490
+ var headersEntries = (headers) => {
491
+ const entries = [];
492
+ headers.forEach((value, key) => {
493
+ entries.push([key, value]);
494
+ });
495
+ return entries;
496
+ };
497
+ var mergeHeaders = (...headers) => {
498
+ const mergedHeaders = new Headers();
499
+ for (const header of headers) {
500
+ if (!header) {
501
+ continue;
502
+ }
503
+ const iterator = header instanceof Headers ? headersEntries(header) : Object.entries(header);
504
+ for (const [key, value] of iterator) {
505
+ if (value === null) {
506
+ mergedHeaders.delete(key);
507
+ } else if (Array.isArray(value)) {
508
+ for (const v of value) {
509
+ mergedHeaders.append(key, v);
510
+ }
511
+ } else if (value !== void 0) {
512
+ mergedHeaders.set(
513
+ key,
514
+ typeof value === "object" ? JSON.stringify(value) : value
515
+ );
516
+ }
517
+ }
518
+ }
519
+ return mergedHeaders;
520
+ };
521
+ var Interceptors = class {
522
+ fns = [];
523
+ clear() {
524
+ this.fns = [];
525
+ }
526
+ eject(id) {
527
+ const index = this.getInterceptorIndex(id);
528
+ if (this.fns[index]) {
529
+ this.fns[index] = null;
530
+ }
531
+ }
532
+ exists(id) {
533
+ const index = this.getInterceptorIndex(id);
534
+ return Boolean(this.fns[index]);
535
+ }
536
+ getInterceptorIndex(id) {
537
+ if (typeof id === "number") {
538
+ return this.fns[id] ? id : -1;
539
+ }
540
+ return this.fns.indexOf(id);
541
+ }
542
+ update(id, fn) {
543
+ const index = this.getInterceptorIndex(id);
544
+ if (this.fns[index]) {
545
+ this.fns[index] = fn;
546
+ return id;
547
+ }
548
+ return false;
549
+ }
550
+ use(fn) {
551
+ this.fns.push(fn);
552
+ return this.fns.length - 1;
553
+ }
554
+ };
555
+ var createInterceptors = () => ({
556
+ error: new Interceptors(),
557
+ request: new Interceptors(),
558
+ response: new Interceptors()
559
+ });
560
+ var defaultQuerySerializer = createQuerySerializer({
561
+ allowReserved: false,
562
+ array: {
563
+ explode: true,
564
+ style: "form"
565
+ },
566
+ object: {
567
+ explode: true,
568
+ style: "deepObject"
569
+ }
570
+ });
571
+ var defaultHeaders = {
572
+ "Content-Type": "application/json"
573
+ };
574
+ var createConfig = (override = {}) => ({
575
+ ...jsonBodySerializer,
576
+ headers: defaultHeaders,
577
+ parseAs: "auto",
578
+ querySerializer: defaultQuerySerializer,
579
+ ...override
580
+ });
581
+
582
+ // generated/auth/client/client.gen.ts
583
+ var createClient = (config = {}) => {
584
+ let _config = mergeConfigs(createConfig(), config);
585
+ const getConfig = () => ({ ..._config });
586
+ const setConfig = (config2) => {
587
+ _config = mergeConfigs(_config, config2);
588
+ return getConfig();
589
+ };
590
+ const interceptors = createInterceptors();
591
+ const beforeRequest = async (options) => {
592
+ const opts = {
593
+ ..._config,
594
+ ...options,
595
+ fetch: options.fetch ?? _config.fetch ?? globalThis.fetch,
596
+ headers: mergeHeaders(_config.headers, options.headers),
597
+ serializedBody: void 0
598
+ };
599
+ if (opts.security) {
600
+ await setAuthParams(opts);
601
+ }
602
+ if (opts.requestValidator) {
603
+ await opts.requestValidator(opts);
604
+ }
605
+ if (opts.body !== void 0 && opts.bodySerializer) {
606
+ opts.serializedBody = opts.bodySerializer(opts.body);
607
+ }
608
+ if (opts.body === void 0 || opts.serializedBody === "") {
609
+ opts.headers.delete("Content-Type");
610
+ }
611
+ const resolvedOpts = opts;
612
+ const url = buildUrl(resolvedOpts);
613
+ return { opts: resolvedOpts, url };
614
+ };
615
+ const request = async (options) => {
616
+ const throwOnError = options.throwOnError ?? _config.throwOnError;
617
+ const responseStyle = options.responseStyle ?? _config.responseStyle;
618
+ let request2;
619
+ let response;
620
+ try {
621
+ const { opts, url } = await beforeRequest(options);
622
+ const requestInit = {
623
+ redirect: "follow",
624
+ ...opts,
625
+ body: getValidRequestBody(opts)
626
+ };
627
+ request2 = new Request(url, requestInit);
628
+ for (const fn of interceptors.request.fns) {
629
+ if (fn) {
630
+ request2 = await fn(request2, opts);
631
+ }
632
+ }
633
+ const _fetch = opts.fetch;
634
+ response = await _fetch(request2);
635
+ for (const fn of interceptors.response.fns) {
636
+ if (fn) {
637
+ response = await fn(response, request2, opts);
638
+ }
639
+ }
640
+ const result = {
641
+ request: request2,
642
+ response
643
+ };
644
+ if (response.ok) {
645
+ const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
646
+ if (response.status === 204 || response.headers.get("Content-Length") === "0") {
647
+ let emptyData;
648
+ switch (parseAs) {
649
+ case "arrayBuffer":
650
+ case "blob":
651
+ case "text":
652
+ emptyData = await response[parseAs]();
653
+ break;
654
+ case "formData":
655
+ emptyData = new FormData();
656
+ break;
657
+ case "stream":
658
+ emptyData = response.body;
659
+ break;
660
+ case "json":
661
+ default:
662
+ emptyData = {};
663
+ break;
664
+ }
665
+ return opts.responseStyle === "data" ? emptyData : {
666
+ data: emptyData,
667
+ ...result
668
+ };
669
+ }
670
+ let data;
671
+ switch (parseAs) {
672
+ case "arrayBuffer":
673
+ case "blob":
674
+ case "formData":
675
+ case "text":
676
+ data = await response[parseAs]();
677
+ break;
678
+ case "json": {
679
+ const text = await response.text();
680
+ data = text ? JSON.parse(text) : {};
681
+ break;
682
+ }
683
+ case "stream":
684
+ return opts.responseStyle === "data" ? response.body : {
685
+ data: response.body,
686
+ ...result
687
+ };
688
+ }
689
+ if (parseAs === "json") {
690
+ if (opts.responseValidator) {
691
+ await opts.responseValidator(data);
692
+ }
693
+ if (opts.responseTransformer) {
694
+ data = await opts.responseTransformer(data);
695
+ }
696
+ }
697
+ return opts.responseStyle === "data" ? data : {
698
+ data,
699
+ ...result
700
+ };
701
+ }
702
+ const textError = await response.text();
703
+ let jsonError;
704
+ try {
705
+ jsonError = JSON.parse(textError);
706
+ } catch {
707
+ }
708
+ throw jsonError ?? textError;
709
+ } catch (error) {
710
+ let finalError = error;
711
+ for (const fn of interceptors.error.fns) {
712
+ if (fn) {
713
+ finalError = await fn(finalError, response, request2, options);
714
+ }
715
+ }
716
+ finalError = finalError || {};
717
+ if (throwOnError) {
718
+ throw finalError;
719
+ }
720
+ return responseStyle === "data" ? void 0 : {
721
+ error: finalError,
722
+ request: request2,
723
+ response
724
+ };
725
+ }
726
+ };
727
+ const makeMethodFn = (method) => (options) => request({ ...options, method });
728
+ const makeSseFn = (method) => async (options) => {
729
+ const { opts, url } = await beforeRequest(options);
730
+ return createSseClient({
731
+ ...opts,
732
+ body: opts.body,
733
+ method,
734
+ onRequest: async (url2, init) => {
735
+ let request2 = new Request(url2, init);
736
+ for (const fn of interceptors.request.fns) {
737
+ if (fn) {
738
+ request2 = await fn(request2, opts);
739
+ }
740
+ }
741
+ return request2;
742
+ },
743
+ serializedBody: getValidRequestBody(opts),
744
+ url
745
+ });
746
+ };
747
+ const _buildUrl = (options) => buildUrl({ ..._config, ...options });
748
+ return {
749
+ buildUrl: _buildUrl,
750
+ connect: makeMethodFn("CONNECT"),
751
+ delete: makeMethodFn("DELETE"),
752
+ get: makeMethodFn("GET"),
753
+ getConfig,
754
+ head: makeMethodFn("HEAD"),
755
+ interceptors,
756
+ options: makeMethodFn("OPTIONS"),
757
+ patch: makeMethodFn("PATCH"),
758
+ post: makeMethodFn("POST"),
759
+ put: makeMethodFn("PUT"),
760
+ request,
761
+ setConfig,
762
+ sse: {
763
+ connect: makeSseFn("CONNECT"),
764
+ delete: makeSseFn("DELETE"),
765
+ get: makeSseFn("GET"),
766
+ head: makeSseFn("HEAD"),
767
+ options: makeSseFn("OPTIONS"),
768
+ patch: makeSseFn("PATCH"),
769
+ post: makeSseFn("POST"),
770
+ put: makeSseFn("PUT"),
771
+ trace: makeSseFn("TRACE")
772
+ },
773
+ trace: makeMethodFn("TRACE")
774
+ };
775
+ };
776
+
777
+ // generated/auth/client.gen.ts
778
+ var client = createClient(createConfig());
779
+
780
+ // generated/auth/sdk.gen.ts
781
+ var HeyApiClient = class {
782
+ client;
783
+ constructor(args) {
784
+ this.client = args?.client ?? client;
785
+ }
786
+ };
787
+ var HeyApiRegistry = class {
788
+ defaultKey = "default";
789
+ instances = /* @__PURE__ */ new Map();
790
+ get(key) {
791
+ const instance = this.instances.get(key ?? this.defaultKey);
792
+ if (!instance) {
793
+ throw new Error(`No SDK client found. Create one with "new Sdk()" to fix this error.`);
794
+ }
795
+ return instance;
796
+ }
797
+ set(value, key) {
798
+ this.instances.set(key ?? this.defaultKey, value);
799
+ }
800
+ };
801
+ var Sdk = class _Sdk extends HeyApiClient {
802
+ static __registry = new HeyApiRegistry();
803
+ constructor(args) {
804
+ super(args);
805
+ _Sdk.__registry.set(this, args?.key);
806
+ }
807
+ /**
808
+ * Forgets the agent's API key. Does not revoke it at the provider; succeeds
809
+ * when there was none.
810
+ */
811
+ deleteAgentApiKey(options) {
812
+ return (options.client ?? this.client).delete({ url: "/agents/{agent_id}/api-key", ...options });
813
+ }
814
+ /**
815
+ * The agent's API key, if it has one, and whether its plan allows one.
816
+ */
817
+ getAgentApiKey(options) {
818
+ return (options.client ?? this.client).get({ url: "/agents/{agent_id}/api-key", ...options });
819
+ }
820
+ /**
821
+ * Registers or replaces the agent's API key, for its model's provider.
822
+ * Only in-memory agents on an Anthropic or OpenAI model, on a paid plan.
823
+ */
824
+ putAgentApiKey(options) {
825
+ return (options.client ?? this.client).put({
826
+ url: "/agents/{agent_id}/api-key",
827
+ ...options,
828
+ headers: {
829
+ "Content-Type": "application/json",
830
+ ...options.headers
831
+ }
832
+ });
833
+ }
834
+ /**
835
+ * Turn automatic credit reloads on with the given
836
+ * thresholds, or off. Payer only. Enabling settles right away, so a balance
837
+ * already under the minimum reloads immediately.
838
+ */
839
+ updateAiBillingAutoReload(options) {
840
+ return (options.client ?? this.client).patch({
841
+ url: "/ai-billing/auto-reload",
842
+ ...options,
843
+ headers: {
844
+ "Content-Type": "application/json",
845
+ ...options.headers
846
+ }
847
+ });
848
+ }
849
+ /**
850
+ * Start a Stripe Checkout for a credit pack. Payer only.
851
+ */
852
+ createAiCreditCheckout(options) {
853
+ return (options.client ?? this.client).post({
854
+ url: "/ai-billing/credits/checkout",
855
+ ...options,
856
+ headers: {
857
+ "Content-Type": "application/json",
858
+ ...options.headers
859
+ }
860
+ });
861
+ }
862
+ /**
863
+ * Buy a credit pack now, charged to the payer's card on file. Any paid team
864
+ * member may buy, within the team's monthly credit limit.
865
+ */
866
+ purchaseAiCredits(options) {
867
+ return (options.client ?? this.client).post({
868
+ url: "/ai-billing/credits/purchase",
869
+ ...options,
870
+ headers: {
871
+ "Content-Type": "application/json",
872
+ ...options.headers
873
+ }
874
+ });
875
+ }
876
+ /**
877
+ * Retired direct-usage opt-in. Enabling is rejected; disabling remains supported.
878
+ */
879
+ updateAiBillingOverage(options) {
880
+ return (options.client ?? this.client).patch({
881
+ url: "/ai-billing/overage",
882
+ ...options,
883
+ headers: {
884
+ "Content-Type": "application/json",
885
+ ...options.headers
886
+ }
887
+ });
888
+ }
889
+ /**
890
+ * The plan catalog, credit packs, overage cap bounds, and automatic reload
891
+ * defaults and bounds.
892
+ */
893
+ getAiBillingPlans(options) {
894
+ return (options?.client ?? this.client).get({ url: "/ai-billing/plans", ...options });
895
+ }
896
+ /**
897
+ * The caller's current-period AI usage, credits, and overage settings.
898
+ *
899
+ * Runs a settlement first so the position reflects any credits or overage
900
+ * that were waiting to be booked.
901
+ */
902
+ getAiBillingSummary(options) {
903
+ return (options?.client ?? this.client).get({ url: "/ai-billing/summary", ...options });
904
+ }
905
+ disconnectCodex(options) {
906
+ return (options?.client ?? this.client).delete({ url: "/codex", ...options });
907
+ }
908
+ getCodexConnection(options) {
909
+ return (options?.client ?? this.client).get({ url: "/codex", ...options });
910
+ }
911
+ configureCodex(options) {
912
+ return (options.client ?? this.client).put({
913
+ url: "/codex/config",
914
+ ...options,
915
+ headers: {
916
+ "Content-Type": "application/json",
917
+ ...options.headers
918
+ }
919
+ });
920
+ }
921
+ listCodexEnvironments(options) {
922
+ return (options?.client ?? this.client).get({ url: "/codex/environments", ...options });
923
+ }
924
+ startCodexLogin(options) {
925
+ return (options?.client ?? this.client).post({ url: "/codex/login", ...options });
926
+ }
927
+ cancelCodexLogin(options) {
928
+ return (options.client ?? this.client).delete({ url: "/codex/login/{attempt_id}", ...options });
929
+ }
930
+ pollCodexLogin(options) {
931
+ return (options.client ?? this.client).get({ url: "/codex/login/{attempt_id}", ...options });
932
+ }
933
+ /**
934
+ * Forgets the caller's Cursor API key.
935
+ *
936
+ * This does **not** revoke the key at Cursor — it keeps working everywhere
937
+ * else it is used, and only Cursor can revoke it. Any UI offering this has to
938
+ * say so rather than implying otherwise.
939
+ *
940
+ * Deleting when there is nothing to delete succeeds: the caller's intent is
941
+ * "I should have no key registered", and that is already true.
942
+ */
943
+ deleteCursorApiKey(options) {
944
+ return (options?.client ?? this.client).delete({ url: "/cursor-api-key", ...options });
945
+ }
946
+ /**
947
+ * Whether the caller has a Cursor API key registered.
948
+ *
949
+ * Never returns the key, or any part of it. There is no screen that needs one,
950
+ * and a masked key still leaks its length and alphabet.
951
+ */
952
+ getCursorApiKey(options) {
953
+ return (options?.client ?? this.client).get({ url: "/cursor-api-key", ...options });
954
+ }
955
+ /**
956
+ * Registers or replaces the caller's Cursor API key.
957
+ *
958
+ * The key is validated on shape alone — this cannot distinguish a live key
959
+ * from forty random characters behind the right prefix. Confirming it against
960
+ * Cursor's `GET /v1/me` is the obvious improvement, and is what would let this
961
+ * report the connected account rather than only that a key exists.
962
+ */
963
+ putCursorApiKey(options) {
964
+ return (options.client ?? this.client).put({
965
+ url: "/cursor-api-key",
966
+ ...options,
967
+ headers: {
968
+ "Content-Type": "application/json",
969
+ ...options.headers
970
+ }
971
+ });
972
+ }
973
+ /**
974
+ * Choose the model, and optionally the effort, this user's `@cursor` sessions
975
+ * start on.
976
+ *
977
+ * Stores the id and effort value only; the other parameters are resolved from
978
+ * Cursor's own variants at session start. Saving a model without an effort
979
+ * clears the previous effort, which belonged to the previous model. Not
980
+ * validated against the live model list here — the settings controls offer
981
+ * only real values, and a stale id or effort degrades to the deployment or
982
+ * model default at spawn rather than failing, so a round trip to Cursor on
983
+ * every save would buy nothing.
984
+ */
985
+ putCursorDefaultModel(options) {
986
+ return (options.client ?? this.client).put({
987
+ url: "/cursor-api-key/default-model",
988
+ ...options,
989
+ headers: {
990
+ "Content-Type": "application/json",
991
+ ...options.headers
992
+ }
993
+ });
994
+ }
995
+ /**
996
+ * List the models the caller's Cursor account offers.
997
+ *
998
+ * Reached only from the settings dropdown, so it decrypts the user's own key
999
+ * and asks Cursor directly — the list is per-account and changes, so there is
1000
+ * nothing to cache statically. Reuses the harness's Cursor client rather than
1001
+ * reimplementing the `/v1/models` parse, keeping one source of truth for what
1002
+ * a model is.
1003
+ */
1004
+ listCursorModels(options) {
1005
+ return (options?.client ?? this.client).get({ url: "/cursor-api-key/models", ...options });
1006
+ }
1007
+ /**
1008
+ * Verifies the user's primary email for FusionAuth
1009
+ */
1010
+ verifyFusionauthUserEmail(options) {
1011
+ return (options.client ?? this.client).get({ url: "/email/fusionauth/verify/{verification_id}", ...options });
1012
+ }
1013
+ /**
1014
+ * Resend the user's primary email verification for FusionAuth
1015
+ */
1016
+ resendFusionauthVerifyUserEmail(options) {
1017
+ return (options.client ?? this.client).post({
1018
+ url: "/email/fusionauth_resend",
1019
+ ...options,
1020
+ headers: {
1021
+ "Content-Type": "application/json",
1022
+ ...options.headers
1023
+ }
1024
+ });
1025
+ }
1026
+ /**
1027
+ * Generates an email link for the user to verify their email address.
1028
+ */
1029
+ generateEmailLink(options) {
1030
+ return (options.client ?? this.client).post({
1031
+ url: "/email/generate/link",
1032
+ ...options,
1033
+ headers: {
1034
+ "Content-Type": "application/json",
1035
+ ...options.headers
1036
+ }
1037
+ });
1038
+ }
1039
+ /**
1040
+ * Verifies the user's email for a user profile
1041
+ */
1042
+ verifyEmailLink(options) {
1043
+ return (options.client ?? this.client).get({ url: "/email/verify/{verification_id}", ...options });
1044
+ }
1045
+ /**
1046
+ * Converts a GitHub pull request to a draft, or marks it ready for review,
1047
+ * as the authenticated user with their own GitHub grant.
1048
+ */
1049
+ setGithubPullRequestDraft(options) {
1050
+ return (options.client ?? this.client).post({
1051
+ url: "/github_pull_requests/draft",
1052
+ ...options,
1053
+ headers: {
1054
+ "Content-Type": "application/json",
1055
+ ...options.headers
1056
+ }
1057
+ });
1058
+ }
1059
+ /**
1060
+ * Enriches GitHub pull request references with live GitHub data for the authenticated user.
1061
+ */
1062
+ enrichGithubPullRequests(options) {
1063
+ return (options.client ?? this.client).post({
1064
+ url: "/github_pull_requests/enrich",
1065
+ ...options,
1066
+ headers: {
1067
+ "Content-Type": "application/json",
1068
+ ...options.headers
1069
+ }
1070
+ });
1071
+ }
1072
+ /**
1073
+ * Merges a GitHub pull request as the authenticated user, with their own
1074
+ * GitHub grant. GitHub applies the user's permissions and the repository's
1075
+ * branch protections; a refusal is returned with GitHub's message.
1076
+ */
1077
+ mergeGithubPullRequest(options) {
1078
+ return (options.client ?? this.client).post({
1079
+ url: "/github_pull_requests/merge",
1080
+ ...options,
1081
+ headers: {
1082
+ "Content-Type": "application/json",
1083
+ ...options.headers
1084
+ }
1085
+ });
1086
+ }
1087
+ /**
1088
+ * Reads whether each GitHub pull request merges cleanly into its base, as
1089
+ * the authenticated user sees it. Pull requests the user cannot see are
1090
+ * left out.
1091
+ */
1092
+ getGithubPullRequestMergeability(options) {
1093
+ return (options.client ?? this.client).post({
1094
+ url: "/github_pull_requests/mergeability",
1095
+ ...options,
1096
+ headers: {
1097
+ "Content-Type": "application/json",
1098
+ ...options.headers
1099
+ }
1100
+ });
1101
+ }
1102
+ /**
1103
+ * Closes a GitHub pull request, or reopens it, as the authenticated user
1104
+ * with their own GitHub grant.
1105
+ */
1106
+ setGithubPullRequestState(options) {
1107
+ return (options.client ?? this.client).post({
1108
+ url: "/github_pull_requests/state",
1109
+ ...options,
1110
+ headers: {
1111
+ "Content-Type": "application/json",
1112
+ ...options.headers
1113
+ }
1114
+ });
1115
+ }
1116
+ /**
1117
+ * Lists invite links, newest first. Rox staff only.
1118
+ */
1119
+ listGtmInviteLinks(options) {
1120
+ return (options?.client ?? this.client).get({ url: "/gtm-invite/links", ...options });
1121
+ }
1122
+ /**
1123
+ * Creates an invite link. Rox staff only.
1124
+ */
1125
+ createGtmInviteLink(options) {
1126
+ return (options.client ?? this.client).post({
1127
+ url: "/gtm-invite/links",
1128
+ ...options,
1129
+ headers: {
1130
+ "Content-Type": "application/json",
1131
+ ...options.headers
1132
+ }
1133
+ });
1134
+ }
1135
+ /**
1136
+ * Revokes an invite link nobody has signed up through. Rox staff only.
1137
+ */
1138
+ revokeGtmInviteLink(options) {
1139
+ return (options.client ?? this.client).delete({ url: "/gtm-invite/links/{id}", ...options });
1140
+ }
1141
+ /**
1142
+ * The promotion the signed-in user's account holds from an invite link, if
1143
+ * they redeemed one and have not started a paid subscription yet.
1144
+ */
1145
+ getGtmInviteOffer(options) {
1146
+ return (options?.client ?? this.client).get({ url: "/gtm-invite/offer", ...options });
1147
+ }
1148
+ /**
1149
+ * Resolves an invite link for the public welcome page and counts the open.
1150
+ *
1151
+ * Unauthenticated: the recipient has no account yet. Only the first name and
1152
+ * whether the link is still usable are exposed.
1153
+ */
1154
+ resolveGtmInviteLink(options) {
1155
+ return (options.client ?? this.client).get({ url: "/gtm-invite/public/{token}", ...options });
1156
+ }
1157
+ /**
1158
+ * Attributes the signed-in user's account to the invite link they opened and
1159
+ * grants them its offer. Idempotent for the same account.
1160
+ */
1161
+ redeemGtmInviteLink(options) {
1162
+ return (options.client ?? this.client).post({
1163
+ url: "/gtm-invite/redeem",
1164
+ ...options,
1165
+ headers: {
1166
+ "Content-Type": "application/json",
1167
+ ...options.headers
1168
+ }
1169
+ });
1170
+ }
1171
+ /**
1172
+ * Health check
1173
+ */
1174
+ healthHandler(options) {
1175
+ return (options?.client ?? this.client).get({ url: "/health", ...options });
1176
+ }
1177
+ /**
1178
+ * Generates a macro-api-token using the user's macro-access-token
1179
+ * You can either have your access token in the cookies or in the request
1180
+ * headers
1181
+ * Authorization: Bearer <access_token>
1182
+ * This returns a new macro-api-token
1183
+ */
1184
+ macroApiToken(options) {
1185
+ return (options.client ?? this.client).get({ url: "/jwt/macro_api_token", ...options });
1186
+ }
1187
+ /**
1188
+ * Refreshes a JWT token
1189
+ * You can either have your access token and refresh token in the cookies or in the request
1190
+ * headers
1191
+ * Authorization: Bearer <access_token>
1192
+ * x-macro-refresh-token: <refresh_token>
1193
+ * This returns the cookies with the new access and refresh token
1194
+ */
1195
+ refresh(options) {
1196
+ return (options?.client ?? this.client).post({ url: "/jwt/refresh", ...options });
1197
+ }
1198
+ /**
1199
+ * Initiates a link for a user
1200
+ */
1201
+ createInProgressLink(options) {
1202
+ return (options?.client ?? this.client).post({ url: "/link", ...options });
1203
+ }
1204
+ emailConnectionProviders(options) {
1205
+ return (options?.client ?? this.client).get({ url: "/link/email/providers", ...options });
1206
+ }
1207
+ /**
1208
+ * Deletes a github link for a user
1209
+ */
1210
+ deleteGithubLink(options) {
1211
+ return (options?.client ?? this.client).delete({ url: "/link/github", ...options });
1212
+ }
1213
+ /**
1214
+ * Initiates a link for a user
1215
+ */
1216
+ initGithubLink(options) {
1217
+ return (options.client ?? this.client).post({ url: "/link/github", ...options });
1218
+ }
1219
+ /**
1220
+ * Checks whether the authenticated user's GitHub link token is valid.
1221
+ */
1222
+ checkGithubLinkStatus(options) {
1223
+ return (options?.client ?? this.client).get({ url: "/link/github/status", ...options });
1224
+ }
1225
+ /**
1226
+ * Initiates a Gmail link for a user
1227
+ */
1228
+ initGmailLink(options) {
1229
+ return (options.client ?? this.client).post({ url: "/link/gmail", ...options });
1230
+ }
1231
+ /**
1232
+ * Checks whether the authenticated user's gmail link is valid.
1233
+ */
1234
+ checkGmailLinkStatus(options) {
1235
+ return (options?.client ?? this.client).get({ url: "/link/gmail/status", ...options });
1236
+ }
1237
+ /**
1238
+ * Initiates a Microsoft Outlook account link for an authenticated user.
1239
+ */
1240
+ initOutlookLink(options) {
1241
+ return (options?.client ?? this.client).post({ url: "/link/outlook", ...options });
1242
+ }
1243
+ /**
1244
+ * Completes the apple login flow
1245
+ */
1246
+ appleLogin(options) {
1247
+ return (options.client ?? this.client).post({
1248
+ url: "/login/apple",
1249
+ ...options,
1250
+ headers: {
1251
+ "Content-Type": "application/json",
1252
+ ...options.headers
1253
+ }
1254
+ });
1255
+ }
1256
+ /**
1257
+ * Performs a password login
1258
+ */
1259
+ passwordLogin(options) {
1260
+ return (options.client ?? this.client).post({
1261
+ url: "/login/password",
1262
+ ...options,
1263
+ headers: {
1264
+ "Content-Type": "application/json",
1265
+ ...options.headers
1266
+ }
1267
+ });
1268
+ }
1269
+ /**
1270
+ * Initiates a passwordless login
1271
+ */
1272
+ passwordlessLogin(options) {
1273
+ return (options.client ?? this.client).post({
1274
+ url: "/login/passwordless",
1275
+ ...options,
1276
+ headers: {
1277
+ "Content-Type": "application/json",
1278
+ ...options.headers
1279
+ }
1280
+ });
1281
+ }
1282
+ /**
1283
+ * Initiates an SSO login
1284
+ */
1285
+ ssoLogin(options) {
1286
+ return (options.client ?? this.client).get({ url: "/login/sso", ...options });
1287
+ }
1288
+ /**
1289
+ * Initiates a passwordless login
1290
+ */
1291
+ logout(options) {
1292
+ return (options?.client ?? this.client).post({ url: "/logout", ...options });
1293
+ }
1294
+ /**
1295
+ * Creates a merge request used to verify the user's email address in order to merge their
1296
+ * accounts.
1297
+ * This is different than generate_email_link which is used to verify a new email address to add a
1298
+ * new profile to a user's account.
1299
+ */
1300
+ createMergeRequest(options) {
1301
+ return (options.client ?? this.client).post({
1302
+ url: "/merge",
1303
+ ...options,
1304
+ headers: {
1305
+ "Content-Type": "application/json",
1306
+ ...options.headers
1307
+ }
1308
+ });
1309
+ }
1310
+ /**
1311
+ * Verifies the merge request
1312
+ */
1313
+ verifyMergeRequest(options) {
1314
+ return (options.client ?? this.client).get({ url: "/merge/verify/{code}", ...options });
1315
+ }
1316
+ /**
1317
+ * Emails a mobile lead a link to continue onboarding on desktop and enrolls
1318
+ * them in the Loops welcome sequence. No-ops if the address was already
1319
+ * captured, and rejects blocked addresses.
1320
+ */
1321
+ sendMobileWelcomeEmail(options) {
1322
+ return (options.client ?? this.client).post({
1323
+ url: "/mobile-welcome-email",
1324
+ ...options,
1325
+ headers: {
1326
+ "Content-Type": "application/json",
1327
+ ...options.headers
1328
+ }
1329
+ });
1330
+ }
1331
+ /**
1332
+ * Handles oauth redirect
1333
+ */
1334
+ passwordlessCallback(options) {
1335
+ return (options.client ?? this.client).get({ url: "/oauth/passwordless/{code}", ...options });
1336
+ }
1337
+ /**
1338
+ * Handles oauth redirect
1339
+ */
1340
+ oauthRedirect(options) {
1341
+ return (options?.client ?? this.client).get({ url: "/oauth/redirect", ...options });
1342
+ }
1343
+ /**
1344
+ * Custom OAuth2 callback
1345
+ */
1346
+ oauth2Callback(options) {
1347
+ return (options.client ?? this.client).get({ url: "/oauth2/{provider}/callback", ...options });
1348
+ }
1349
+ /**
1350
+ * Gets all permissions
1351
+ */
1352
+ getPermissions(options) {
1353
+ return (options?.client ?? this.client).get({ url: "/permissions", ...options });
1354
+ }
1355
+ /**
1356
+ * Gets a list of the users permissions
1357
+ */
1358
+ getUserPermissions(options) {
1359
+ return (options?.client ?? this.client).get({ url: "/permissions/me", ...options });
1360
+ }
1361
+ /**
1362
+ * Handler for `GET /referral-code`.
1363
+ *
1364
+ * Returns the authenticated user's referral code.
1365
+ */
1366
+ getReferralCode(options) {
1367
+ return (options?.client ?? this.client).get({ url: "/referral/code", ...options });
1368
+ }
1369
+ /**
1370
+ * Handler for `POST /referral/send`.
1371
+ *
1372
+ * Sends a referral code via email to a user
1373
+ */
1374
+ sendReferralCode(options) {
1375
+ return (options.client ?? this.client).post({
1376
+ url: "/referral/send",
1377
+ ...options,
1378
+ headers: {
1379
+ "Content-Type": "application/json",
1380
+ ...options.headers
1381
+ }
1382
+ });
1383
+ }
1384
+ /**
1385
+ * Refreshes a JWT token
1386
+ */
1387
+ sessionCreation(options) {
1388
+ return (options?.client ?? this.client).post({ url: "/session", ...options });
1389
+ }
1390
+ /**
1391
+ * Performs a login via session code
1392
+ */
1393
+ sessionLogin(options) {
1394
+ return (options.client ?? this.client).get({ url: "/session/login/{session_code}", ...options });
1395
+ }
1396
+ /**
1397
+ * The status every user sees. Public: the banner shows wherever the app
1398
+ * runs, signed in or not.
1399
+ */
1400
+ getSystemStatus(options) {
1401
+ return (options?.client ?? this.client).get({ url: "/system-status", ...options });
1402
+ }
1403
+ /**
1404
+ * Sets the status every user sees and pushes it to every open app. Macro
1405
+ * staff only.
1406
+ *
1407
+ * Authenticate with a Rox session, or from a script with a personal API
1408
+ * key (Settings → API keys) in the `x-macro-user-api-key` header. The body
1409
+ * is the new status:
1410
+ *
1411
+ * - `{"status": "operational"}` clears the banner. It takes no message.
1412
+ * - `{"status": "degraded", "message": "Search is slow to update."}`
1413
+ * - `{"status": "major_outage", "message": "Rox is unavailable. We're on it."}`
1414
+ *
1415
+ * Messages are trimmed and must be 1–500 characters. Every call is kept in
1416
+ * the history, even when it repeats the current status.
1417
+ */
1418
+ setSystemStatus(options) {
1419
+ return (options.client ?? this.client).post({
1420
+ url: "/system-status",
1421
+ ...options,
1422
+ headers: {
1423
+ "Content-Type": "application/json",
1424
+ ...options.headers
1425
+ }
1426
+ });
1427
+ }
1428
+ /**
1429
+ * Recent status updates, newest first, with who set each. Rox staff only.
1430
+ */
1431
+ listSystemStatusHistory(options) {
1432
+ return (options?.client ?? this.client).get({ url: "/system-status/history", ...options });
1433
+ }
1434
+ /**
1435
+ * Deletes a team.
1436
+ * This will update all team members roles and cancel your subscription for the team.
1437
+ * This action is **irreversible** and you will not be able to recover the team afterwards.
1438
+ */
1439
+ deleteTeam(options) {
1440
+ return (options?.client ?? this.client).delete({ url: "/team", ...options });
1441
+ }
1442
+ /**
1443
+ * Gets a team by ID.
1444
+ */
1445
+ getTeam(options) {
1446
+ return (options?.client ?? this.client).get({ url: "/team", ...options });
1447
+ }
1448
+ /**
1449
+ * Updates a team.
1450
+ */
1451
+ patchTeam(options) {
1452
+ return (options.client ?? this.client).patch({
1453
+ url: "/team",
1454
+ ...options,
1455
+ headers: {
1456
+ "Content-Type": "application/json",
1457
+ ...options.headers
1458
+ }
1459
+ });
1460
+ }
1461
+ /**
1462
+ * Creates a new team.
1463
+ */
1464
+ createTeam(options) {
1465
+ return (options.client ?? this.client).post({
1466
+ url: "/team",
1467
+ ...options,
1468
+ headers: {
1469
+ "Content-Type": "application/json",
1470
+ ...options.headers
1471
+ }
1472
+ });
1473
+ }
1474
+ /**
1475
+ * Toggles automatic domain joining for the team. When the team has no
1476
+ * auto-join domain, sets it to the team owner's email domain — rejected
1477
+ * with a 400 when that domain is a generic email provider domain (e.g.
1478
+ * gmail.com). When one is already set, removes it. New users whose email
1479
+ * domain matches a team's auto-join domain are added to that team on
1480
+ * signup. Requires the caller to be an Admin or Owner of the team.
1481
+ */
1482
+ toggleTeamAutoJoinDomain(options) {
1483
+ return (options?.client ?? this.client).post({ url: "/team/auto-join-domain/toggle", ...options });
1484
+ }
1485
+ /**
1486
+ * The team's computers, oldest first.
1487
+ */
1488
+ listTeamComputers(options) {
1489
+ return (options?.client ?? this.client).get({ url: "/team/computers", ...options });
1490
+ }
1491
+ /**
1492
+ * Buy a computer for the team, billed on the team subscription. An error
1493
+ * means nothing was charged; 202 means the charge is still being confirmed.
1494
+ */
1495
+ purchaseTeamComputer(options) {
1496
+ return (options.client ?? this.client).post({
1497
+ url: "/team/computers",
1498
+ ...options,
1499
+ headers: {
1500
+ "Content-Type": "application/json",
1501
+ ...options.headers
1502
+ }
1503
+ });
1504
+ }
1505
+ /**
1506
+ * Every size with its price and availability.
1507
+ */
1508
+ listTeamComputerOffers(options) {
1509
+ return (options?.client ?? this.client).get({ url: "/team/computers/offers", ...options });
1510
+ }
1511
+ /**
1512
+ * Keep a computer that was canceled at period end.
1513
+ */
1514
+ undoCancelTeamComputer(options) {
1515
+ return (options.client ?? this.client).delete({ url: "/team/computers/{computer_id}/cancel", ...options });
1516
+ }
1517
+ /**
1518
+ * Stop billing at the end of the current period.
1519
+ */
1520
+ cancelTeamComputer(options) {
1521
+ return (options.client ?? this.client).post({ url: "/team/computers/{computer_id}/cancel", ...options });
1522
+ }
1523
+ /**
1524
+ * Turn a computer on or off. A computer that is off keeps its disk and stays billed.
1525
+ */
1526
+ setTeamComputerPower(options) {
1527
+ return (options.client ?? this.client).post({
1528
+ url: "/team/computers/{computer_id}/power",
1529
+ ...options,
1530
+ headers: {
1531
+ "Content-Type": "application/json",
1532
+ ...options.headers
1533
+ }
1534
+ });
1535
+ }
1536
+ /**
1537
+ * Stop billing and destroy the computer now, without a refund.
1538
+ */
1539
+ releaseTeamComputer(options) {
1540
+ return (options.client ?? this.client).post({
1541
+ url: "/team/computers/{computer_id}/release",
1542
+ ...options,
1543
+ headers: {
1544
+ "Content-Type": "application/json",
1545
+ ...options.headers
1546
+ }
1547
+ });
1548
+ }
1549
+ /**
1550
+ * Keep a computer whose billing ended, during retention: re-adds its
1551
+ * billing item (the rest of the period is invoiced now) and keeps the
1552
+ * stopped computer and its disk.
1553
+ */
1554
+ restoreTeamComputer(options) {
1555
+ return (options.client ?? this.client).post({ url: "/team/computers/{computer_id}/restore", ...options });
1556
+ }
1557
+ /**
1558
+ * Retry a failed computer without changing billing.
1559
+ */
1560
+ retryTeamComputer(options) {
1561
+ return (options.client ?? this.client).post({ url: "/team/computers/{computer_id}/retry", ...options });
1562
+ }
1563
+ /**
1564
+ * Mark the guided setup after buying the computer finished. Idempotent;
1565
+ * allowed to the team's owner and admins, like Claude sign-in.
1566
+ */
1567
+ completeTeamComputerSetup(options) {
1568
+ return (options.client ?? this.client).post({ url: "/team/computers/{computer_id}/setup-complete", ...options });
1569
+ }
1570
+ /**
1571
+ * Legacy compatibility endpoint for team admins and owners. Enabling
1572
+ * is a no-op; disabling is rejected. CRM records remain available.
1573
+ * Each member manages mailbox contribution through `/crm/email-privacy`;
1574
+ * this endpoint does not enroll mailboxes, backfill emails, or purge records.
1575
+ */
1576
+ patchTeamCrmSettings(options) {
1577
+ return (options.client ?? this.client).patch({
1578
+ url: "/team/crm",
1579
+ ...options,
1580
+ headers: {
1581
+ "Content-Type": "application/json",
1582
+ ...options.headers
1583
+ }
1584
+ });
1585
+ }
1586
+ /**
1587
+ * Emails the caller's contacts on the team's auto-join domain that the team
1588
+ * exists, so they can sign up and join. Contacts already on Rox, on the
1589
+ * team, invited, or emailed before are skipped, and a team emails at most 25
1590
+ * people in total. Call it after sending the team's invites. Requires the
1591
+ * caller to be an Admin or Owner of the team.
1592
+ */
1593
+ sendTeamDomainNotice(options) {
1594
+ return (options?.client ?? this.client).post({ url: "/team/domain-notice", ...options });
1595
+ }
1596
+ /**
1597
+ * Invites a user to a team.
1598
+ */
1599
+ inviteToTeam(options) {
1600
+ return (options.client ?? this.client).post({
1601
+ url: "/team/invite",
1602
+ ...options,
1603
+ headers: {
1604
+ "Content-Type": "application/json",
1605
+ ...options.headers
1606
+ }
1607
+ });
1608
+ }
1609
+ /**
1610
+ * Turns off the team's invite link. Requires a team admin or owner.
1611
+ */
1612
+ deleteTeamInviteLink(options) {
1613
+ return (options?.client ?? this.client).delete({ url: "/team/invite-link", ...options });
1614
+ }
1615
+ /**
1616
+ * Gets the team's invite link. Anyone who may invite people to the team may
1617
+ * see it.
1618
+ */
1619
+ getTeamInviteLink(options) {
1620
+ return (options?.client ?? this.client).get({ url: "/team/invite-link", ...options });
1621
+ }
1622
+ /**
1623
+ * Creates the team's invite link, replacing any existing one. Anyone who may
1624
+ * invite people may create the first link; replacing one requires a team
1625
+ * admin or owner.
1626
+ */
1627
+ createTeamInviteLink(options) {
1628
+ return (options?.client ?? this.client).post({ url: "/team/invite-link", ...options });
1629
+ }
1630
+ /**
1631
+ * Joins the team an invite link belongs to.
1632
+ */
1633
+ joinTeamByInviteLink(options) {
1634
+ return (options.client ?? this.client).post({
1635
+ url: "/team/invite-link/join",
1636
+ ...options,
1637
+ headers: {
1638
+ "Content-Type": "application/json",
1639
+ ...options.headers
1640
+ }
1641
+ });
1642
+ }
1643
+ /**
1644
+ * Gets the team an invite link joins, so the user can see it before joining.
1645
+ */
1646
+ getTeamByInviteLink(options) {
1647
+ return (options.client ?? this.client).post({
1648
+ url: "/team/invite-link/team",
1649
+ ...options,
1650
+ headers: {
1651
+ "Content-Type": "application/json",
1652
+ ...options.headers
1653
+ }
1654
+ });
1655
+ }
1656
+ /**
1657
+ * Deletes a team invite from a team.
1658
+ */
1659
+ deleteTeamInviteHandler(options) {
1660
+ return (options.client ?? this.client).delete({ url: "/team/invite/{team_invite_id}", ...options });
1661
+ }
1662
+ /**
1663
+ * Gets all invites for a team.
1664
+ */
1665
+ getTeamInvites(options) {
1666
+ return (options?.client ?? this.client).get({ url: "/team/invites", ...options });
1667
+ }
1668
+ /**
1669
+ * Rejects an invitation to join a team.
1670
+ */
1671
+ rejectInvitation(options) {
1672
+ return (options.client ?? this.client).delete({ url: "/team/join/{team_invite_id}", ...options });
1673
+ }
1674
+ /**
1675
+ * Joins a team by accepting an invite.
1676
+ */
1677
+ joinTeam(options) {
1678
+ return (options.client ?? this.client).get({ url: "/team/join/{team_invite_id}", ...options });
1679
+ }
1680
+ /**
1681
+ * Disables a team member and revokes their server-side harness records.
1682
+ */
1683
+ disableTeamMember(options) {
1684
+ return (options.client ?? this.client).post({ url: "/team/members/{member_user_id}/disable", ...options });
1685
+ }
1686
+ /**
1687
+ * Re-enables a previously disabled team member.
1688
+ */
1689
+ enableTeamMember(options) {
1690
+ return (options.client ?? this.client).post({ url: "/team/members/{member_user_id}/enable", ...options });
1691
+ }
1692
+ /**
1693
+ * Moves one team member's seat between paid plans.
1694
+ *
1695
+ * Team admins and owners only. The team's subscription is re-billed for
1696
+ * the seat at once (prorated); the member's tier role and individual AI
1697
+ * allowance follow immediately.
1698
+ */
1699
+ patchTeamMemberPlan(options) {
1700
+ return (options.client ?? this.client).patch({
1701
+ url: "/team/members/{member_user_id}/plan",
1702
+ ...options,
1703
+ headers: {
1704
+ "Content-Type": "application/json",
1705
+ ...options.headers
1706
+ }
1707
+ });
1708
+ }
1709
+ /**
1710
+ * Toggles whether non-admin members may invite users to the team. Teams
1711
+ * start with this on (any member can invite); turning it off restricts
1712
+ * inviting to team admins and owners. Requires the caller to be an Admin
1713
+ * or Owner of the team.
1714
+ */
1715
+ toggleTeamNonAdminInvites(options) {
1716
+ return (options?.client ?? this.client).post({ url: "/team/non-admin-invites/toggle", ...options });
1717
+ }
1718
+ /**
1719
+ * Removes a user from a team.
1720
+ */
1721
+ removeUserFromTeam(options) {
1722
+ return (options.client ?? this.client).delete({ url: "/team/remove/{remove_user_id}", ...options });
1723
+ }
1724
+ /**
1725
+ * Clears a team's runtime allowlist, restoring the default local presets.
1726
+ */
1727
+ clearTeamRuntimePresets(options) {
1728
+ return (options?.client ?? this.client).delete({ url: "/team/runtime-presets", ...options });
1729
+ }
1730
+ /**
1731
+ * Replaces the exhaustive set of local runtime presets allowed for a team.
1732
+ */
1733
+ setTeamRuntimePresets(options) {
1734
+ return (options.client ?? this.client).put({
1735
+ url: "/team/runtime-presets",
1736
+ ...options,
1737
+ headers: {
1738
+ "Content-Type": "application/json",
1739
+ ...options.headers
1740
+ }
1741
+ });
1742
+ }
1743
+ /**
1744
+ * Gets all teams for the authenticated user.
1745
+ */
1746
+ getUserTeams(options) {
1747
+ return (options?.client ?? this.client).get({ url: "/team/user", ...options });
1748
+ }
1749
+ /**
1750
+ * Gets all of a user's invitations.
1751
+ */
1752
+ getUserInvites(options) {
1753
+ return (options?.client ?? this.client).get({ url: "/team/user/invites", ...options });
1754
+ }
1755
+ /**
1756
+ * The caller's team's agents, with their computers' status.
1757
+ */
1758
+ listTeamAgents(options) {
1759
+ return (options?.client ?? this.client).get({ url: "/team_agents", ...options });
1760
+ }
1761
+ /**
1762
+ * Invite an agent teammate and buy its computer. Requires a team admin or
1763
+ * owner using their own credential. The agent comes back `provisioning`.
1764
+ */
1765
+ createTeamAgent(options) {
1766
+ return (options.client ?? this.client).post({
1767
+ url: "/team_agents",
1768
+ ...options,
1769
+ headers: {
1770
+ "Content-Type": "application/json",
1771
+ ...options.headers
1772
+ }
1773
+ });
1774
+ }
1775
+ /**
1776
+ * Remove an agent teammate: release its computer, take it off the team and
1777
+ * delete its repository and account. Requires a team admin or owner.
1778
+ */
1779
+ deleteTeamAgent(options) {
1780
+ return (options.client ?? this.client).delete({ url: "/team_agents/{agent_user_id}", ...options });
1781
+ }
1782
+ /**
1783
+ * The agent's call voice, as committed in its workspace repository.
1784
+ * Requires a team admin or owner.
1785
+ */
1786
+ getTeamAgentVoice(options) {
1787
+ return (options.client ?? this.client).get({ url: "/team_agents/{agent_user_id}/voice", ...options });
1788
+ }
1789
+ /**
1790
+ * Change the agent's call voice: a commit to its workspace repository that
1791
+ * its next call picks up. Requires a team admin or owner.
1792
+ */
1793
+ setTeamAgentVoice(options) {
1794
+ return (options.client ?? this.client).put({
1795
+ url: "/team_agents/{agent_user_id}/voice",
1796
+ ...options,
1797
+ headers: {
1798
+ "Content-Type": "application/json",
1799
+ ...options.headers
1800
+ }
1801
+ });
1802
+ }
1803
+ /**
1804
+ * Finishes an agent's signup: joins the team that invited it and mints its
1805
+ * SDK token.
1806
+ *
1807
+ * Safe to repeat until the agent confirms it saved the token: a reload replaces
1808
+ * the key, and a failed join stays pending for the next attempt.
1809
+ */
1810
+ agentSetup(options) {
1811
+ return (options?.client ?? this.client).post({ url: "/user/agent_setup", ...options });
1812
+ }
1813
+ /**
1814
+ * Retrieves user names in bulk
1815
+ */
1816
+ getUserNames(options) {
1817
+ return (options.client ?? this.client).post({
1818
+ url: "/user/get_names",
1819
+ ...options,
1820
+ headers: {
1821
+ "Content-Type": "application/json",
1822
+ ...options.headers
1823
+ }
1824
+ });
1825
+ }
1826
+ /**
1827
+ * Gets names for passed user profile ids, falling back to the requesting user's email contact names
1828
+ */
1829
+ getUserNamesWithEmail(options) {
1830
+ return (options.client ?? this.client).post({
1831
+ url: "/user/get_names_with_email",
1832
+ ...options,
1833
+ headers: {
1834
+ "Content-Type": "application/json",
1835
+ ...options.headers
1836
+ }
1837
+ });
1838
+ }
1839
+ /**
1840
+ * Updates the user's group.
1841
+ */
1842
+ patchUserGroup(options) {
1843
+ return (options.client ?? this.client).patch({
1844
+ url: "/user/group",
1845
+ ...options,
1846
+ headers: {
1847
+ "Content-Type": "application/json",
1848
+ ...options.headers
1849
+ }
1850
+ });
1851
+ }
1852
+ /**
1853
+ * Claims a handle once for this account. Existing usernames are unchanged
1854
+ * until this endpoint is called; a taken handle is never replaced with a suffix.
1855
+ */
1856
+ claimHandle(options) {
1857
+ return (options.client ?? this.client).put({
1858
+ url: "/user/handle",
1859
+ ...options,
1860
+ headers: {
1861
+ "Content-Type": "application/json",
1862
+ ...options.headers
1863
+ }
1864
+ });
1865
+ }
1866
+ /**
1867
+ * Get the caller's interface language.
1868
+ */
1869
+ getUserLanguage(options) {
1870
+ return (options?.client ?? this.client).get({ url: "/user/language", ...options });
1871
+ }
1872
+ /**
1873
+ * Set the caller's interface language, or clear it to follow their team's,
1874
+ * else their browser's.
1875
+ */
1876
+ putUserLanguage(options) {
1877
+ return (options.client ?? this.client).put({
1878
+ url: "/user/language",
1879
+ ...options,
1880
+ headers: {
1881
+ "Content-Type": "application/json",
1882
+ ...options.headers
1883
+ }
1884
+ });
1885
+ }
1886
+ /**
1887
+ * Gets the calling user's info which matches what was given in the **deprecated**
1888
+ * getUserPermissions query in our graphql api.
1889
+ * This will eventually be removed and optimized to use smaller calls that grab
1890
+ * what is needed for various parts of the UI.
1891
+ */
1892
+ getLegacyUserPermissions(options) {
1893
+ return (options?.client ?? this.client).get({ url: "/user/legacy_user_permissions", ...options });
1894
+ }
1895
+ /**
1896
+ * Returns whether or not a given idp link exists for a user
1897
+ */
1898
+ getUserLinkExists(options) {
1899
+ return (options.client ?? this.client).get({ url: "/user/link_exists", ...options });
1900
+ }
1901
+ /**
1902
+ * Deletes the user who calls this endpoint
1903
+ */
1904
+ deleteUser(options) {
1905
+ return (options?.client ?? this.client).delete({ url: "/user/me", ...options });
1906
+ }
1907
+ /**
1908
+ * Gets the calling user's info
1909
+ */
1910
+ getUserInfo(options) {
1911
+ return (options?.client ?? this.client).get({ url: "/user/me", ...options });
1912
+ }
1913
+ /**
1914
+ * Retrieves the name of a particular user.
1915
+ */
1916
+ getUserName(options) {
1917
+ return (options?.client ?? this.client).get({ url: "/user/name", ...options });
1918
+ }
1919
+ /**
1920
+ * Sets the name of a particular user
1921
+ */
1922
+ putUserName(options) {
1923
+ return (options?.client ?? this.client).put({ url: "/user/name", ...options });
1924
+ }
1925
+ /**
1926
+ * Updates the user's onboarding.
1927
+ */
1928
+ patchUserOnboarding(options) {
1929
+ return (options.client ?? this.client).patch({
1930
+ url: "/user/onboarding",
1931
+ ...options,
1932
+ headers: {
1933
+ "Content-Type": "application/json",
1934
+ ...options.headers
1935
+ }
1936
+ });
1937
+ }
1938
+ /**
1939
+ * Retrieves the users organization if present.
1940
+ * Returns NO_CONTENT if the user is a not part of an organization.
1941
+ */
1942
+ getUserOrganization(options) {
1943
+ return (options?.client ?? this.client).get({ url: "/user/organization", ...options });
1944
+ }
1945
+ /**
1946
+ * Sets the profile picture URL for a particular user
1947
+ */
1948
+ putProfilePicture(options) {
1949
+ return (options.client ?? this.client).put({ url: "/user/profile_picture", ...options });
1950
+ }
1951
+ /**
1952
+ * Reserves storage for a new profile picture. Static file storage has no
1953
+ * RoxDB, so it cannot check API keys; this route lets key holders upload.
1954
+ */
1955
+ createProfilePictureUpload(options) {
1956
+ return (options.client ?? this.client).post({
1957
+ url: "/user/profile_picture/file",
1958
+ ...options,
1959
+ headers: {
1960
+ "Content-Type": "application/json",
1961
+ ...options.headers
1962
+ }
1963
+ });
1964
+ }
1965
+ /**
1966
+ * Sets the caller's profile picture to an image they uploaded.
1967
+ */
1968
+ putProfilePictureFile(options) {
1969
+ return (options.client ?? this.client).put({
1970
+ url: "/user/profile_picture/file",
1971
+ ...options,
1972
+ headers: {
1973
+ "Content-Type": "application/json",
1974
+ ...options.headers
1975
+ }
1976
+ });
1977
+ }
1978
+ /**
1979
+ * Retrieves profile picture URLs for a list of users
1980
+ */
1981
+ postProfilePictures(options) {
1982
+ return (options.client ?? this.client).post({
1983
+ url: "/user/profile_pictures",
1984
+ ...options,
1985
+ headers: {
1986
+ "Content-Type": "application/json",
1987
+ ...options.headers
1988
+ }
1989
+ });
1990
+ }
1991
+ /**
1992
+ * Retrieves the users quota.
1993
+ * Returns NO_CONTENT if the user is a premium user with no quota.
1994
+ */
1995
+ getUserQuota(options) {
1996
+ return (options?.client ?? this.client).get({ url: "/user/quota", ...options });
1997
+ }
1998
+ /**
1999
+ * Creates a Stripe checkout session for the user to subscribe.
2000
+ */
2001
+ createCheckoutSessionV2(options) {
2002
+ return (options.client ?? this.client).post({
2003
+ url: "/user/stripe/checkoutv2",
2004
+ ...options,
2005
+ headers: {
2006
+ "Content-Type": "application/json",
2007
+ ...options.headers
2008
+ }
2009
+ });
2010
+ }
2011
+ /**
2012
+ * Read subscription state for the authenticated user's seat.
2013
+ */
2014
+ getSubscriptionStatus(options) {
2015
+ return (options?.client ?? this.client).get({ url: "/user/stripe/plan", ...options });
2016
+ }
2017
+ /**
2018
+ * Changes the caller's paid plan. Upgrades are prorated immediately;
2019
+ * downgrades retain the active plan until renewal. Selecting the active plan
2020
+ * cancels a pending downgrade without charging or resetting usage.
2021
+ */
2022
+ changePlan(options) {
2023
+ return (options.client ?? this.client).post({
2024
+ url: "/user/stripe/plan",
2025
+ ...options,
2026
+ headers: {
2027
+ "Content-Type": "application/json",
2028
+ ...options.headers
2029
+ }
2030
+ });
2031
+ }
2032
+ /**
2033
+ * Creates a Stripe billing portal session.
2034
+ */
2035
+ createPortalSession(options) {
2036
+ return (options.client ?? this.client).post({
2037
+ url: "/user/stripe/portal",
2038
+ ...options,
2039
+ headers: {
2040
+ "Content-Type": "application/json",
2041
+ ...options.headers
2042
+ }
2043
+ });
2044
+ }
2045
+ /**
2046
+ * Read the caller's eligibility; checkout revalidates before granting a trial.
2047
+ */
2048
+ getTrialEligibility(options) {
2049
+ return (options?.client ?? this.client).get({ url: "/user/stripe/trial_eligibility", ...options });
2050
+ }
2051
+ /**
2052
+ * Updates the user's tutorialComplete flag.
2053
+ */
2054
+ patchUserTutorial(options) {
2055
+ return (options.client ?? this.client).patch({
2056
+ url: "/user/tutorial",
2057
+ ...options,
2058
+ headers: {
2059
+ "Content-Type": "application/json",
2060
+ ...options.headers
2061
+ }
2062
+ });
2063
+ }
2064
+ };
2065
+
2066
+ export {
2067
+ Sdk
2068
+ };